摘要: 将博客搬至CSDN 阅读全文
posted @ 2014-04-03 13:44 Eric.wei 阅读(207) 评论(2) 推荐(0) 编辑
摘要: Operation queues usually provide the threads used to run their operations. In OS X v10.6 and later, operation queues use the libdispatch library (also known as Grand Central Dispatch) to initiate the execution of their operations. As a result, operations are always executed on a separate thread, reg 阅读全文
posted @ 2013-05-01 19:46 Eric.wei 阅读(150) 评论(0) 推荐(0) 编辑
摘要: dispatch_queue_tA dispatch queue is a lightweight object to which your application submits blocks for subsequent execution.typedef struct dispatch_queue_s *dispatch_queue_t;DiscussionA dispatch queue invokes blocks submitted to it serially in FIFO order. A serial queue invokes only one block at a ti 阅读全文
posted @ 2013-05-01 16:04 Eric.wei 阅读(323) 评论(0) 推荐(0) 编辑
摘要: static dispatch_queue_t xml_request_operation_processing_queue() { static dispatch_queue_t af_xml_request_operation_processing_queue; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ af_xml_request_operation_processing_queue = dispatch_queue_create("com.alamofire.networ... 阅读全文
posted @ 2013-05-01 09:52 Eric.wei 阅读(400) 评论(0) 推荐(0) 编辑
摘要: Jedis是一个小巧稳定的redis java客户端。jedis是一个易用的客户端。Jedis跟Redis主干代码保持兼容。Jedis的主要功能点Redis的下面特性都被支持:sorting排序connection handling连接保持commands operating on all the kind of valuescommands operating on string valuescommands operating on hashescommands operating on listscommands operating on setscommands operating o 阅读全文
posted @ 2013-04-21 11:05 Eric.wei 阅读(239) 评论(0) 推荐(0) 编辑
摘要: notnoop/java-apns github:https://github.com/notnoop/java-apns简介java-apns是服务于APNS服务的java客户端,该库目的是提供一套面对苹果服务器的高扩展性、简单、模块化的接口。这些接口只需要很少的代码去完成大多数的cases,同时你还可以用永自己的网络链接库或者json库重新配置java-apns库。Links: InstallationJavadocsChangelog细节:简单易用,高性能的APNS API支持Apple反馈服务支持增强的Apple Push Notification支持MDM和NewStand Noti 阅读全文
posted @ 2013-04-21 10:12 Eric.wei 阅读(1522) 评论(0) 推荐(0) 编辑
摘要: 如果你在寻找一个UITableView加载远程图片的方法,推荐一个第三方类库:SDWebImage。这个类库为你的工程提供了灵活的加载&缓存网络图片的方法,而且非常容易在工程中使用。但当我开始使用时,当我加载不同分辨率的网络图片时,发现图片出现了不同宽度,很不美观,为了解决这个问题,我们需要对webimage中的不同宽度进行限制。下面是一个简便有效的处理方法,自定义layoutSubviews:1 - (void)layoutSubviews {2 [super layoutSubviews];3 self.imageView.frame = CGRectMake(5,5,40... 阅读全文
posted @ 2013-04-20 21:47 Eric.wei 阅读(607) 评论(0) 推荐(0) 编辑
摘要: 如果你需要编写一个软件,同时支持portrait&landscape,你会遇到一个问题:当屏幕旋转后,如果才能确保一些可视化的things依然居中呢。下面是一个简单的例子,无论设备是否旋转,UITableView的footer中的UILabel保持居中的方法。 1 //create the uiview container 2 UIView *tfooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, _tableView.frame.size.width, 45)]; 3 tfooterView.autor... 阅读全文
posted @ 2013-04-20 21:27 Eric.wei 阅读(805) 评论(0) 推荐(0) 编辑
摘要: __block修饰的变量是可以在blocks中共享block外的父类中的变量。这样,即使父类已经超出生存周期,只要任何父类的__block修饰的变量存在于任何一个没有销毁的block块中,那么这个变量就是有效的,不会出现BAD_access错误。多个block块在一个给定的作用域中可以同时的使用共享内存变量。__weak描述的是一个特定的引用类型,它不保证修饰的变量在生命周期。当weak修饰的变量所指向的强引用变量销毁时,weak类型的弱引用变量会被置为nil。这两个修饰变量的类型是完全不同的概念,当block中使用__block的变量时,__block变量不会copy一份在block中,而是 阅读全文
posted @ 2013-04-20 18:50 Eric.wei 阅读(482) 评论(0) 推荐(0) 编辑
摘要: WHY VERSION CONTROL IS IMPORTANT FOR SOLO DEVELOPERShttp://www.cimgf.com/2009/11/07/why-version-control-is-important-for-solo-developers/It’s common practice for any software project with multiple coders to use some version control mechanism. CVS or Subversion used to be popular. These days distribu 阅读全文
posted @ 2013-04-09 13:46 Eric.wei 阅读(156) 评论(0) 推荐(0) 编辑