interface State{ public void handle(StateMachine statemachine);}class Eat implements State{ StateMachine statemachine=null; public void handle(StateMa...
分类:
编程语言 时间:
2015-04-02 22:07:04
阅读次数:
167
Ninject是C#语言的一款依赖性的注入器框架,我认为之所以会出现这个框架是因为类与类由于继承或者接口与类继承而出现的,首先这 个最典型存在是因为接口,首先我们来看看这个用了框架和没有用框架的区别吧。首先声明一个IDiscountHeler接口,然后用一个类继承接口public interface...
分类:
其他好文 时间:
2015-04-02 20:45:47
阅读次数:
120
#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UIImageView *tomImageView;@end@implementation ViewControlle...
分类:
移动开发 时间:
2015-04-02 20:38:42
阅读次数:
137
如果是xcode6和ios 8的话,需要调用 CLLocationManager requestAlwaysAuthorization 方法,具体步骤如下: 1. @interface里: ? ?CLLocationManager *locationManager; 2. 初始化: ? ?locationManager = [[C...
分类:
移动开发 时间:
2015-04-02 15:16:32
阅读次数:
131
1.接口public interface Hello { public void sayHello();}2.实例类public class Hello2 { public void sayHello() { System.out.println("hello world2...
分类:
编程语言 时间:
2015-04-02 13:21:29
阅读次数:
201
类别:
在ios项目开发中允许使用类别为现有的类添加新的方法,并不需要创建子类。通过类别我们可以动态地为现有的类添加新的方法,可以将类的定义模块化地布局到多个相关文件中。
使用类别的好处为:
一、进行模块化设计
二、利用类别来调用私有方法
接口部分格式如下:
@interface 已有类 (类别名)
//方法的定义
.....
@end
注意:类别中通常只定义新的方法。
类别...
分类:
移动开发 时间:
2015-04-02 11:46:39
阅读次数:
175
#import @interface CircleProgressView : UIView/**进度值*/@property(nonatomic,assign) CGFloat progressValue;@end#import "CircleProgressView.h"@implementa....
分类:
其他好文 时间:
2015-04-02 10:23:12
阅读次数:
131
IEnumerable, ICollection, IList,每种接口只适合某些特定场景,如何区别使用呢? IEnumerable接口,只提供了一个获取迭代器的方法,这也是为什么可以使用foreach遍历实现了IEnumerable接口集合的原因。 public interface IEnumer...
分类:
编程语言 时间:
2015-04-02 07:57:12
阅读次数:
233
三层交换SW:ipdhcppoolpc1network192.168.1.0255.255.255.0default-router192.168.1.254ipdhcppoolpc3network192.168.2.0255.255.255.0default-router192.168.2.254iproutinginterfaceFastEthernet0/1switchporttrunkencapsulationdot1qswitchportmodetrunk!interfaceFastEthe..
分类:
其他好文 时间:
2015-04-02 06:46:12
阅读次数:
163
原理iOS 和 SQL的对应关系Model类结构 => SQL表结构Model实例 => SQL表中的一行Model实例的属性 => SQL表中的一列Model和Table的对应@interface TestModel :NSObject
@property (assign, nonatomic) NSInteger age;
@property (assi...
分类:
移动开发 时间:
2015-04-01 23:48:00
阅读次数:
181