码迷,mamicode.com
首页 >  
搜索关键字:interface    ( 13681个结果
Java 实现策略(Strategy)模式
/** * 策略模式:针对同一命令(或行为),不同的策略做不同的动作 * 商品促销 * 本类为:收取现金的类 * * @author stone */ public interface ICashSuper { double acceptCash(double money); } /** * 正常收取现金 * @author stone * */ public ...
分类:编程语言   时间:2014-10-10 19:17:14    阅读次数:148
iOS十进制分割格式转换
//@"123456789" 转换后 @"123,456,789" @interface NSString (num) - (NSString *)money; @end @implementation NSString (num) - (NSString *)money{ NSNumberFormatter *numFormat = [[NSNumberForma...
分类:移动开发   时间:2014-10-10 19:06:04    阅读次数:140
给图片添加手势,上传照片
.h#import @interface RootViewController : UIViewController{ UIImageView *imageView;}.m- (void)viewDidLoad{ [super viewDidLoad]; // Do any add...
分类:Web程序   时间:2014-10-10 17:21:44    阅读次数:305
别样JAVA学习(六)继承下(1.2)接口
接口 1、概念 初期理解,可以认为是一个特殊的抽象类          当抽象类中的方法都是抽象的,那么该类          可以通过接口的形式来表示。 class用于定义类 interface用于定义接口。 2、接口定义 1,接口中常见定义:常量,抽象方法。 2,接口中的成员都有固定修饰符(默认,可不写)。      常量:public static final   ...
分类:编程语言   时间:2014-10-10 13:52:04    阅读次数:168
iOS ... NS_REQUIRES_NIL_TERMINATION
看到官方的一个例子不错,这里留记。 #import @interface NSMutableArray (variadicMethodExample) - (void) appendObjects:(id) firstObject, ...; // This method takes a nil-terminated list of objects. @end @implementat...
分类:移动开发   时间:2014-10-10 13:32:54    阅读次数:227
Concurrency
The real problem with concurrency occurs when tasks that are executing in parallel begin to interface with each other. This can happen in such a subtl...
分类:其他好文   时间:2014-10-10 01:52:23    阅读次数:167
java中接口的定义与实现
1、定义接口 使用interface来定义一个接口。接口定义同类的定义类似,也是分为接口的声明和接口体,当中接口体由常量定义和方法定义两部分组成。定义接口的基本格式例如以下:[修饰符] interface 接口名 [extends 父接口名列表]{[public] [static] [final]....
分类:编程语言   时间:2014-10-10 00:03:01    阅读次数:332
协议练习改成block
更改协议成block,运行,设置一个头文件person.h#import @interface Person : NSObject@property (nonatomic, copy) void (^brak)(void); //声明void类返回void的block类型的brak,@propert...
分类:其他好文   时间:2014-10-09 23:34:48    阅读次数:194
利用归档保存数组数据
1首先创建一个模型类,一定要遵守NSCoding协意。@interface Contact : NSObject @property (nonatomic, copy) NSString *name;@property (nonatomic, copy) NSString *phone;@endim...
分类:其他好文   时间:2014-10-09 22:49:51    阅读次数:240
IPMI (Intelligent Platform Management Interface)
4.3.ipmitool - utility for controlling IPMI-enabled devices4.3.1.ipmitool4.3.1.1.ubuntu确定硬件是否支持 IPMI neo@monitor:~$ sudo dmidecode |grep -C 5 IPMI[...
分类:其他好文   时间:2014-10-09 20:46:37    阅读次数:267
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!