摘要: ASIHTTPRequest简介:HTTP请求http://allseeing-i.com/ASIHTTPRequest/SBJson简介:JSON解析http://stig.github.com/json-framework/FMDB简介:SQLite数据库https://github.com/ccgus/fmdbwsdl2objc简介:SOAPhttp://code.google.com/p/wsdl2objc/ios-ntp简介:NTPhttps://github.com/jbenet/ios-ntpCocoaAsyncSocket简介:Sockethttps://github.com/ 阅读全文
posted @ 2012-12-24 13:15 Anthony Li 阅读(511) 评论(1) 推荐(0) 编辑
  2013年5月17日
摘要: Regular Expression(正则表达式)维基百科:http://en.wikipedia.org/wiki/Regular_expression正则表达式在线测试:http://tool.chinaz.com/regex/正则表达式,常用于文件搜索和数据校验等iOS 提供了对正则表达式的支持:NSRegularExpression代码示例:- (BOOL)isValidWithRegex:(NSString *) regex { BOOL result = NO; if (regex != nil) { NSError *error = nil; ... 阅读全文
posted @ 2013-05-17 17:04 Anthony Li 阅读(1834) 评论(0) 推荐(0) 编辑
摘要: AndroidAndroid Supported Media Formats :http://developer.android.com/guide/appendix/media-formats.htmliOSThe Basics: Audio Codecs, Supported Audio Formats, and Audio Sessions:http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html总结对比 Andro 阅读全文
posted @ 2013-05-17 14:55 Anthony Li 阅读(10738) 评论(0) 推荐(1) 编辑
摘要: 好友列表好友列表,在 XMPP 中被称为 roster,花名册?获取 roster 需要客户端发送 <iq /> 标签向 XMPP 服务器端查询一个 IQ 请求:<iq type="get" from="xiaoming@example.com" to="example.com" id="1234567"> <query xmlns="jabber:iq:roster"/><iq />type 属性,说明了该 iq 的类型为 get,与 HTTP 阅读全文
posted @ 2013-05-17 14:10 Anthony Li 阅读(17304) 评论(2) 推荐(0) 编辑
  2013年5月16日
摘要: 收发消息接收消息通过实现- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message;方法当接收到 <message /> 标签的内容时,XMPPFramework 框架回调该方法根据 XMPP 协议,消息体的内容存储在标签 <body /> 内- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message { NSString *messageBody = [[messag 阅读全文
posted @ 2013-05-16 17:06 Anthony Li 阅读(13743) 评论(1) 推荐(0) 编辑
  2013年5月13日
摘要: 好友状态获取好友状态,通过实现- (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence方法当接收到 <presence /> 标签的内容时,XMPPFramework 框架回调该方法一个 <presence /> 标签的格式一般如下:<presence from=""> <show>这里是显示的内容<show /> <status>这里是显示的状态<status /><pres 阅读全文
posted @ 2013-05-13 09:38 Anthony Li 阅读(8583) 评论(0) 推荐(0) 编辑
  2013年5月10日
摘要: 用户登录准备工作比较知名的开源XMPP服务器:一个是Openfire,一个是ejabberdOpenfire 使用 Java 语言编写,比较容易上手,地址:http://www.igniterealtime.org/projects/openfire/ejabberd 使用 Erlang 语言编写,是一款非常知名的 Erlang 开源项目,地址:http://www.ejabberd.im/安装 ejabberd,可以参考我的博客:【ejabberd】安装XMPP服务器ejabberd(Ubuntu 12.04)搭建一个自己的 XMPP 服务器之后,就让我们开始吧!连接服务器1、新建一个 XM 阅读全文
posted @ 2013-05-10 16:58 Anthony Li 阅读(25780) 评论(0) 推荐(1) 编辑
  2013年5月9日
摘要: XMPPFrameworkGitHub:https://github.com/robbiehanson/XMPPFramework获取源代码git clonehttps://github.com/robbiehanson/XMPPFramework.gitcheckout XMPPFramework 一个最新的branch添加依赖> 拷贝 <XMPPFramework>/Vendor/CocoaLumberjack 到项目根目录下,add files...,选择CocoaLumberjack 文件夹> 同样的步骤,拷贝CocoaAsyncSocket 和 KissXML 阅读全文
posted @ 2013-05-09 15:49 Anthony Li 阅读(19002) 评论(5) 推荐(1) 编辑
  2013年5月5日
摘要: Objective-C Reflection(Objective-C 反射机制)NSObject 方法除了个别例外,Cocoa 中大部分类都是 NSObject 的子类,因此大部分对象都继承了它所定义的方法。NSObject 提供了一些简单的查询运行时系统信息的方法:- (BOOL)isKindOfClass:(Class)aClass Returns a Boolean value that indicates whether the receiver is an instance of given class or an instance of any class that inherit 阅读全文
posted @ 2013-05-05 15:50 Anthony Li 阅读(9519) 评论(0) 推荐(1) 编辑
  2013年5月2日
摘要: Archive(归档)Archives provide a means to convert objects and values into an architecture-independent stream of bytes that preserves the identity of and the relationships between the objects and values.1、归档与解档ArchiveRootObject[NSKeyedArchiver archiveRootObject:[contentTextField text] toFile:[self archi 阅读全文
posted @ 2013-05-02 15:54 Anthony Li 阅读(1804) 评论(0) 推荐(0) 编辑
  2013年4月18日
摘要: 栈(Stack)维基百科:http://en.wikipedia.org/wiki/Stack_(abstract_data_type)在栈中,被删除的是最近插入的元素:栈实现的是一种后进先出(last-in, first-out, LIFO)策略。栈上的INSERT操作称为压入(PUSH), 而无元素参数的DELETE操作称为弹出(POP)。伪码:STACK-EMPTY(S) if S.top == 0 return TURE else return FALSEPUSH(S, x) S.top = S.top + 1 S[S.top] = xPOP(S) if STACK-E... 阅读全文
posted @ 2013-04-18 20:27 Anthony Li 阅读(738) 评论(0) 推荐(0) 编辑

博客园博客已停止更新,博客地址:dyinigbleed.com