Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Def...
分类:
其他好文 时间:
2015-07-30 20:56:44
阅读次数:
112
需要设置Locale
NSDateFormatter *dateFormatter = [[[NSDateFormatter
alloc]
init] autorelease];
[dateFormatter
setDateFormat:@"yyyyMMddHHmmss"];
NSDate *currentDate = [[[NSDate
alloc] init]
a...
分类:
其他好文 时间:
2015-07-30 19:34:26
阅读次数:
118
我的思路很简单,就是这样:bool check(int n){ while (n != 2) { if (n % 2 != 0) { return false; } n /= 2; } return true;}boo...
分类:
其他好文 时间:
2015-07-30 19:15:39
阅读次数:
104
void Timer0_ISR( ) interrupt 5{ CountMilliseconds++;//只负责自加,加到最大又重新从0开始}u16 setDelay(u16 t){ return(CountMilliseconds + t - 1); ...
分类:
其他好文 时间:
2015-07-30 19:12:48
阅读次数:
152
数位dp 专题先来模板:int dfs(int i,int s,bool e) ///枚举第i位,第i位前一位的数字为s,e表示前缀是否已达到上界。(如果未达到,则枚举0000...~9999..,反之枚举0000...~abcd...){ if(i==-1) return 1; if(...
分类:
其他好文 时间:
2015-07-30 18:57:31
阅读次数:
170
#pragma mark - 答题区按钮点击方法- (void)answerClick:(UIButton *)button{ // 1. 如果按钮没有字,直接返回 if (button.currentTitle.length == 0) return; // 2. 如果有...
分类:
移动开发 时间:
2015-07-30 18:48:51
阅读次数:
123
1.xmlHttpRequest对象的创建ajax的核心的XMLHttpRequest对象,下面的代码给出了兼容各个浏览器的方法实现function createXHR(){ if(typeof XMLHttpRequest !="undefined"){ return new ...
分类:
编程语言 时间:
2015-07-30 18:44:33
阅读次数:
128
在大多数情况下,为事件处理函数返回false,可以防止默认的事件行为.例如,默认情况下点击一个元素,页面会跳转到该元素href属性指定的页.Return False 就相当于终止符,Return True 就相当于执行符。在js中return false的作用一般是用来取消默认动作的。比如你单击一个...
分类:
编程语言 时间:
2015-07-30 18:39:46
阅读次数:
111
委托1.将要开始编辑- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{return YES;}2.- (void)textFieldDidBeginEditing:(UITextField *)textField{//开始编辑时...
分类:
移动开发 时间:
2015-07-30 18:36:34
阅读次数:
146
java 正则表达式替换首尾字符或符号 private String replaceStr(String str){
Pattern pattern = Pattern.compile("^,+|,+$");
Matcher matcher = pattern.matcher(str);
return matche...
分类:
编程语言 时间:
2015-07-30 17:21:16
阅读次数:
162