上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 109 下一页

2015年8月31日

iOS7 CookBook精彩瞬间(二)NSSet、通过Subscript访问类成员等

摘要: 1.NSSet的用法 ①NSSet是一种无序集合,基于hash实现,可以在线性时间复杂度内查找某个元素,如果要让元素有序,应当使用NSOrderedSet,要让集合可变,与NSArray类似,使用NSMutableSet和NSMutableOrderedSet即可。 ②从Set中取出... 阅读全文

posted @ 2015-08-31 18:40 张大大123 阅读(162) 评论(0) 推荐(0) 编辑

2015年8月30日

iOS7 CookBook精彩瞬间(一)property、selector细节、__unused

摘要: 1.我们常常使用nonatomic,很多人只知道它的效率较高,却不知道其含义,其含义是非线程安全的,也就是说多线程修改时不加锁,可能出现多个线程先后修改而成为脏数据的情况。 2.unsafe_unretained和assign的作用是一致的,如果对象数据也采用这种方式,这个property就只是... 阅读全文

posted @ 2015-08-30 21:07 张大大123 阅读(190) 评论(0) 推荐(0) 编辑

2015年8月29日

1026. Table Tennis (30)

摘要: 题目如下: A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some t... 阅读全文

posted @ 2015-08-29 11:27 张大大123 阅读(890) 评论(0) 推荐(0) 编辑

2015年8月28日

1080. Graduate Admission (30)

摘要: 题目如下: It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would hel... 阅读全文

posted @ 2015-08-28 15:31 张大大123 阅读(151) 评论(0) 推荐(0) 编辑

1091. Acute Stroke (30)

摘要: 题目如下: One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the co... 阅读全文

posted @ 2015-08-28 14:30 张大大123 阅读(205) 评论(0) 推荐(0) 编辑

2015年8月27日

1095. Cars on Campus (30)

摘要: 题目如下: Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars cro... 阅读全文

posted @ 2015-08-27 16:30 张大大123 阅读(203) 评论(0) 推荐(0) 编辑

2015年8月25日

(一二五)手机网络状态的监听

摘要: 对于一些需要与服务器进行长连接的App,需要对网络状态进行监控,当网络不佳时及时提醒用户,从而提高用户体验。通过苹果自带的框架和Reachability类可以实现网络状态改变的监听。 要实现网络监听,按照下面的步骤进行。 ①导入SystemConfiguration框架。 ②通过Xcode的帮助... 阅读全文

posted @ 2015-08-25 22:47 张大大123 阅读(208) 评论(0) 推荐(0) 编辑

1030. Travel Plan (30)

摘要: 原题如下: A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to wri... 阅读全文

posted @ 2015-08-25 19:14 张大大123 阅读(134) 评论(0) 推荐(0) 编辑

2015年8月24日

1090. Highest Price in Supply Chain (25) -计层的BFS改进

摘要: 题目如下: A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier ... 阅读全文

posted @ 2015-08-24 18:24 张大大123 阅读(177) 评论(0) 推荐(0) 编辑

2015年8月23日

1079. Total Sales of Supply Chain (25) -记录层的BFS改进

摘要: 题目如下: A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier ... 阅读全文

posted @ 2015-08-23 22:57 张大大123 阅读(168) 评论(0) 推荐(0) 编辑

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 109 下一页

导航