1、声明NSTimer *timer;2、定义timer= [NSTimerscheduledTimerWithTimeInterval:1.0ftarget:selfselector:@selector(updateValue)userInfo:nilrepeats:YES];以下是调用函数...
分类:
移动开发 时间:
2014-10-25 17:19:32
阅读次数:
187
第一种:用CADisplayLink可以实现不停重绘。例子:CADisplayLink* gameTimer;gameTimer= [CADisplayLink displayLinkWithTarget:selfselector:@selector(updateDisplay:)];[gameTi...
分类:
其他好文 时间:
2014-10-25 17:18:09
阅读次数:
214
调用一次计时器方法:[cpp]view plaincopymyTimer=[NSTimerscheduledTimerWithTimeInterval:1.5target:selfselector:@selector(scrollTimer)userInfo:nilrepeats:NO];//不重复...
分类:
移动开发 时间:
2014-10-25 17:16:51
阅读次数:
171
1、初始化+ (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;+ (N...
分类:
移动开发 时间:
2014-10-25 17:12:08
阅读次数:
245
就爬取和解析内容而言,我们有太多选择。比如,很多人都觉得Jsoup就可以解决所有问题。无论是Http请求、DOM操作、CSS query selector筛选都非常方便。 关键是这个selector,仅通过一个表达式筛选出的只能是一个node。如过我想获得一个text或者一个node的属性值,我需要...
分类:
编程语言 时间:
2014-10-24 21:59:32
阅读次数:
241
Find Minimum in Rotated Sorted ArrayQuestion SolutionSuppose a sorted array is rotated at some pivot unknown to youbeforehand.(i.e., 0 1 2 4 5 6 7 mig...
分类:
其他好文 时间:
2014-10-24 20:26:46
阅读次数:
258
我文章提到,加载一个文件的部分列是可行。两列,你只读一列,没问题。
但是,两个文件,f1和f2,f1有42列,f2有43列,同时加载到一个流对象,如何?
答:成功加载。但是无结构,discribe后看到:Schema for origin_cleaned_data unknown。这种情况类似merge,合并两个不同列的对象,会生成一个未知模式对象。
背景:因为老日志42列,新日志多...
分类:
其他好文 时间:
2014-10-24 18:55:55
阅读次数:
313
用两张图片做了个selector,使用ImageView的src或background使用selector点击时,总没出现点击效果,这是为什么呢?经常一番折腾后来才发现一个“秘密”。先不公开,大家
来看一看:
上面的例子,你们试试,使用时不会出现点击效果。
这个例子,会出现点击效果。
总结经验:de...
分类:
其他好文 时间:
2014-10-24 16:41:04
阅读次数:
353
一、基本语法
1、fadeIn淡入、fadeOut淡出、fadeToggle淡入淡出切换(已经淡出点击淡入,或者相反):
$(selector).fadeIn(duration,complete);$(selector).fadeOut(duration,complete);$(selector).fadeToggle(duration,complete);
可选的 speed 参数规定...
分类:
Web程序 时间:
2014-10-24 16:28:47
阅读次数:
274
1.Reachability// 监听网络状态改变的通知[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkStateChange) name:kReachabilityChangedNot...
分类:
移动开发 时间:
2014-10-24 16:22:23
阅读次数:
343