1、 使用队列NSOperation下载时会将操作放在异步线程里面,不会放在主线程中换一种方法进行下载:- (void)download { self.data = [NSMutableData data]; //发送请求 NSURL *url = [NSURL URLWithString:@"ht...
分类:
其他好文 时间:
2014-07-12 12:52:59
阅读次数:
239
C#和php都有sleep让线程休眠指定时间后再继续执行后面的代码,swift中应该如何呢?首先,找一下objective-c版本是怎么做的[self performSelector:@selector(didTimeOut:) withObject:nil afterDelay:60];// 顺便...
分类:
编程语言 时间:
2014-07-12 00:35:19
阅读次数:
1116
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-07-12 00:15:07
阅读次数:
268
语言:Python描述:使用递归实现 1 class Solution: 2 # @return an integer 3 def numTrees(self, n): 4 if n == 0: 5 return 0 6 eli...
分类:
其他好文 时间:
2014-07-11 23:44:08
阅读次数:
216
CGRectrect =CGRectMake(100,100,100,100); UIView* bgView = [[UIViewalloc]initWithFrame:rect]; bgView.backgroundColor= [UIColorgrayColor]; [self.viewa.....
分类:
移动开发 时间:
2014-07-11 22:44:49
阅读次数:
250
题目:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.说明: 1)二叉树可.....
分类:
其他好文 时间:
2014-07-11 21:07:27
阅读次数:
273
题目:Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.说明: 1)实现与.....
分类:
其他好文 时间:
2014-07-11 20:40:38
阅读次数:
198
获取屏幕尺寸[[[UIScreen mainScreen] currentMode].size.width];[[[UIScreen mainScreen] currentMode].size.height];也能够:NSLog(@"FrameHeight:%fFrameWidth:%f",self...
分类:
移动开发 时间:
2014-07-09 14:53:40
阅读次数:
213
BeerParamTests TestInitParams adminEmail likewecare@wickedlysmart.com web.xml中的片段。这个片段针对的是TestInitParams这个servlet。getServletConfig()能够获得这个...
分类:
Web程序 时间:
2014-07-09 14:07:24
阅读次数:
310
iOS开发项目篇—11item一、UINavigationItem1.获得方式self.navigationItem // self是指控制器2. 作用可以用来设置当前控制器顶部导航栏的内容设置导航栏中间的内容self.navigationItem.titleself.navigationIte.....
分类:
移动开发 时间:
2014-07-09 13:14:09
阅读次数:
189