随笔分类 -  技术技巧

摘要:1 -(void)startTime{ 2 __block int timeout=30; //倒计时时间 3 dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0... 阅读全文
posted @ 2015-03-12 13:58 我的程序人生 阅读(250) 评论(0) 推荐(0)
摘要:This sample program illustrates a server application that uses nonblocking and theselect()API.Socket flow of events: Server that uses nonblocking I/O ... 阅读全文
posted @ 2015-02-10 16:37 我的程序人生 阅读(599) 评论(0) 推荐(0)
摘要:太挫比了.好久才找到这个.大家分享.http://stackoverflow.com/a/13020873 阅读全文
posted @ 2013-05-09 15:21 我的程序人生 阅读(111) 评论(0) 推荐(0)
摘要:[UIDevice currentDevice] uniqueIdentifier];UUID苹果己经禁用//新的UUID生成,随机生成,用于唯一标识,需要保存-(NSString*) uuid { CFUUIDRefpuuid =CFUUIDCreate(kCFAllocatorSystemDefault); CFStringRefuuidString =CFUUIDCreateString(nil, puuid ); NSString* result = (NSString*)CFStringCreateCopy(NULL, uuidString); CFRelease(puuid); C 阅读全文
posted @ 2013-05-06 11:51 我的程序人生 阅读(1166) 评论(0) 推荐(0)
摘要:我们在Finder上能轻而易举让Finder显示我们现在浏览文件夹的路径,但是好像还有很多朋友不知道这个小功能哦,跟着MacGG学习把。首先打开Finder,在菜单栏上选择“显示”->“显示路径栏”很简单把,操作完成,现在我们看看我的Finder底部的变化。这里就有个小问题了,这个路径怎么从根目录开始呀??我想直接从Home文件夹开始显示就好了,如mars->文稿,这样看起来好清爽。继续跟着MacGG吧。打开“终端”(在应用程序->工具文件夹),并输入以下命令:defaults write com.apple.finder PathBarRootAtHome -bool TR 阅读全文
posted @ 2013-01-24 14:14 我的程序人生 阅读(10196) 评论(0) 推荐(1)
摘要:我们可以在hosts文件加入 207.97.227.239 github.com65.74.177.129 www.github.com 207.97.227.252 nodeload.github.com 207.97.227.243 raw.github.com 204.232.175.78 documentcloud.github.com,204.232.175.78 pages.github.com 阅读全文
posted @ 2013-01-23 09:06 我的程序人生 阅读(317) 评论(0) 推荐(0)