一、面向对象和封装面向对象的三大特性:封装(成员变量)、继承和多态在OC语言中,使用@interface和@implementation来处理类。@interface就好像暴露在外面的时钟表面,像外界提供展示以及接口。@implementation就好像隐藏在时钟内部的构造实现,把具体的实现封装了起...
分类:
其他好文 时间:
2014-08-18 00:12:03
阅读次数:
218
__FUNCTION__, __LINE__
今天无意之间看到一段代码,里面有这样一个片段:
if (!interface) {
err ("%s - error, can't find device for minor %d",
__FUNCTION__, subminor);
retval = -ENODEV;
goto exit;
}
这...
分类:
其他好文 时间:
2014-08-17 22:49:32
阅读次数:
285
工厂模式有两种类型:工厂方法模式和抽象工厂模式工厂方法模式定义:定义了一个创建对象的接口(这里的接口并不是单单是指java中的interface),但由子类决定实例化的类是哪一个。工厂方法让类把实例化推迟到子类中。抽象工厂模式定义:提供一个接口(这里的接口并不是单单是指java中的interface...
分类:
其他好文 时间:
2014-08-17 22:34:23
阅读次数:
415
1.硬盘的查看方式;
2.获得硬盘SCSI(Small Computer System Interface)ID;
3.绑定共享存储;
4.绑定共享存储的脚本;
分类:
系统相关 时间:
2014-08-17 18:15:42
阅读次数:
415
1、在ViewController.h中#import #import "TGJSBridge.h"@interface BaseViewController : UIViewController@property(nonatomic,strong)TGJSBridge *jsBridge;@pro...
分类:
Web程序 时间:
2014-08-17 15:31:32
阅读次数:
1436
我们过去介绍的数据结构都不是线性存储的结构,我们今天就来模拟一个最简单的数据结构基于数组构建存储连续的数据结构.
1.线性表顺序存储结构的接口
/**
* 指的是用一段地址连续的存储单元一次存储线性表的数据元素
* @ClassName: ISeqList
*/
public interface ISeqList {
/**
...
分类:
其他好文 时间:
2014-08-17 13:06:52
阅读次数:
305
我们开始模拟一下大家最熟悉的String数据结构的模拟,这个相信做java的没有不熟悉的吧.那我们开始
1.操作接口
public interface IString {
public void clear(); //将一个已经存在的串置成空串
public boolean isEmpty(); //判断当前串是否为空,为空...
分类:
其他好文 时间:
2014-08-17 13:05:52
阅读次数:
278
#import @interface Child : NSObject@property (nonatomic,assign) int age;-(id) initWithAge:(int) age;@end#import "Child.h"@implementation Child-(id) in...
分类:
移动开发 时间:
2014-08-17 12:58:22
阅读次数:
204
JNDI是 Java 命名与文件夹接口(Java Naming and Directory Interface),在J2EE规范中是重要的规范之中的一个,不少专家觉得,没有透彻理解JNDI的意义和作用,就没有真正掌握J2EE特别是EJB的知识。那么,JNDI究竟起什么作用?要了解JNDI的作用,我们...
分类:
其他好文 时间:
2014-08-17 10:20:22
阅读次数:
216
#import @class Author;@interface Books : NSObject{ @private NSString *color; int book_id; NSString *box; Author *author; NSArray *r...
分类:
移动开发 时间:
2014-08-17 03:48:31
阅读次数:
226