摘要: Demo:参考ASIHttpRequest的示例例如:PerformanceTest#import <Foundation/Foundation.h>#import "ASITestCase.h"@interface PerformanceTests : ASITestCase { NSURL *testURL; NSDate *testStartDate; int requestsComplete; NSMutableArray *responseData; unsigned long bytesDownloaded;}- (void)testASIHTTPR 阅读全文
posted @ 2012-09-20 10:20 Kalou 阅读(952) 评论(0) 推荐(0) 编辑
摘要: nsoperation支持特性:1.支持操作之间的依赖性2.支持一个可选的完成Block(等所有操作完成后执行)3.通过kvo来获取当前的运行状态4.改变操作的优先级5.支持取消操作 阅读全文
posted @ 2012-09-02 17:13 Kalou 阅读(135) 评论(0) 推荐(0) 编辑
摘要: object composition (Decorator pattern) is often a better technique than subclassing for extending class behavior.1.Abstract Factoryprovides an interface for creating families of related or dependent objects without specifying their concrete classes提供接口创建相同或类似的对象,不需要指定其具体的类型iso中主要体现在NSNumber和NSArray和 阅读全文
posted @ 2012-08-16 22:16 Kalou 阅读(304) 评论(0) 推荐(0) 编辑
摘要: When a low-memory condition occurs, the system may purge suspended apps without notice to make more space for the foreground app.The main difference is that instead of your app being made active, it enters the background state to handle the event and then is suspended shortly afterward. When launchi 阅读全文
posted @ 2012-08-15 20:43 Kalou 阅读(251) 评论(0) 推荐(0) 编辑
摘要: /*!* @class Calculator* This class implements a key-press--based calculator engine.* @throws NSInvalidArgumentException*/#import <Foundation/Foundation.h>@interface Calculator : NSObject {@private NSMutableString *_display; // The calculator display (the value a harwdare-based calculator shows 阅读全文
posted @ 2012-08-10 10:37 Kalou 阅读(1931) 评论(0) 推荐(0) 编辑
摘要: 1.C++ Primer Plus(第6版)中文版(C++ Primer Plus Sixth Edition)2.Imperfect C++中文版(Imperfect C++)3.C++代码设计与重用(Designing and Coding Reusable C++)4.C和指针(Pointers on C)5.C专家编程 (Expert C Programming)6.C陷阱与缺陷( C Traps and Pitfalls)7.C++沉思录 (Ruminations on C++:A Decade of Programming Insight and Experience) 阅读全文
posted @ 2012-06-28 15:50 Kalou 阅读(150) 评论(0) 推荐(0) 编辑
摘要: http://www.iteye.com/topic/114392http://wiki.jabbercn.org/RFC6120#STARTTLS.E5.8D.8F.E5.95.862.如果初始化实体有能力使用SASL 协商, 它必须(MUST)在初始化流的头信息中包含一个值为"1.0"的属性'version'。STARTTLS扩展的XML命名空间是 'urn:ietf:params:xml:ns:xmpp-tls'. 阅读全文
posted @ 2012-06-21 15:14 Kalou 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 转自http://blog.csdn.net/wbw1985/article/details/5502272XMPP(可扩展消息处理现场协议)是基于可扩展标记语言(XML)的协议,它用于即时消息(IM)以及在线现场探测。它在促进服务器之间的准即时操作。这个协议可能最终允许因特网用户向因特网上的其他任何人发送即时消息,即使其操作系统和浏览器不同。 XMPP的前身是Jabber,一个开源形式组织产生的网络即时通信协议。XMPP目前被IETF国际标准组织完成了标准化工作。标准化的核心结果分为两部分;在IETF 中,把IM协议划分为四种协议,即即时信息和出席协议(Instant Messaging . 阅读全文
posted @ 2012-06-16 17:11 Kalou 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1 NSString * result;2 NSArray * paths;3 4 result = nil;5 paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);6 if ( (paths != nil) && ([paths count] != 0) ) {7 assert([[paths objectAtIndex:0] isKindOfClass:[NSString class]]);8 result = [paths objectAtIn... 阅读全文
posted @ 2012-06-11 10:02 Kalou 阅读(145) 评论(0) 推荐(0) 编辑
摘要: http://blancer.com/tutorials/i-phone/58725/asset-libraries-and-blocks-in-ios-4/http://www.cocoachina.com/bbs/read.php?tid=64878&keyword=photohttp://www.icodeblog.com/2010/10/07/cloning-uiimagepickercontroller-using-the-assets-library-framework/ 阅读全文
posted @ 2012-05-04 12:55 Kalou 阅读(149) 评论(0) 推荐(0) 编辑