$("#CheckBox").click(function(){if(this.checked){$("input[type='CheckBox']").each(function(){this.checked=true;});}else{$("input[type='CheckBox']").ea...
分类:
其他好文 时间:
2014-11-26 15:52:12
阅读次数:
132
function is_weixin(){ var ua = navigator.userAgent.toLowerCase(); if(ua.match(/MicroMessenger/i)=="micromessenger") { return true; } else { ...
分类:
微信 时间:
2014-11-26 15:51:19
阅读次数:
426
var value=0.041991;//04.1991
var value_str;
if(String(value).length>8){
value_str=String(value).substring(0,8);
}else{
value_str=String(value);
}
var temp_str = {str: value_str, startIndex: 1...
分类:
其他好文 时间:
2014-11-26 14:29:38
阅读次数:
172
Javascript重要知识点梳理一.Javascript流程控制js中常用的数据类型var关键字的使用if – else if – elseswitchwhilefor二.Javascript常用函数1. 字符串函数substringindexOflastIndexOfcharAtreplaces...
分类:
编程语言 时间:
2014-11-26 13:39:14
阅读次数:
197
#define DEBUG_ENABLE
#ifdef DEBUG_ENABLE
#define DPRINT(fmt, args...) fprintf(stderr, "[DPRINT...][%s %d] "fmt"\n", __FILE__, __LINE__, ##args);
#else
#define DPRINT(fmt, ...)
#endif...
分类:
其他好文 时间:
2014-11-26 11:26:15
阅读次数:
263
import scala.io.Source
if(args.length>0){
for(line <- Source.fromFile(args(0)).getLines)
println(line.length+" "+line)
}
else
Console.err.println("Please enter filename");...
分类:
其他好文 时间:
2014-11-26 11:24:54
阅读次数:
222
例如: 我在这个需要判定个bool值,因为在不适用指针的情况下,不能确定返回是否为空,而且2个方法过程又完全一样,没必要写2个方法,bool gettimestate(){ if(time>curtime) { return true; }else { return false; }}...
分类:
其他好文 时间:
2014-11-26 11:04:35
阅读次数:
180
// 判断文字是否为空格 (一个或者多个空格) -(BOOL)isEmpty:(NSString *)str{ if (!str) { returntrue; } else { NSCharacterSet *set = [NSCharacterSetwhitespaceA...
分类:
其他好文 时间:
2014-11-26 10:56:09
阅读次数:
175
#include<iostream>usingnamespacestd;char*reset(char*pa){ if(pa==NULL) { returnNULL; } else { chartemp; char*pch=pa; while(*pch!=‘\0‘) { pch++; } pch--; char*pb=pa; while(pb!=pch) { temp=*pch; *pch=*pb; *pb=temp; pb++; pch--; } }..
分类:
其他好文 时间:
2014-11-26 06:55:17
阅读次数:
151
#include<iostream>#include<string.h>usingnamespacestd;voidreplace(int*pa,intn){ int*arr=newint[n]; arr[0]=pa[0]; intk=0; for(inti=0;i<n;i++) { if(arr[k]==pa[i]) continue; else { k++; arr[k]=pa[i]; } } memset(pa,0,n*4); for(inti=0;i&..
分类:
其他好文 时间:
2014-11-26 06:53:04
阅读次数:
124