Defination:累积分布函数:The cumulative distribution function (CDF) does just that. The CDF at point x tells us whatfraction of events has occurred “to the l...
分类:
其他好文 时间:
2014-10-23 22:30:51
阅读次数:
368
注意事项:1、request模块的中文编码缺陷:使用requset去获取中文html的时候,要把encoding设置为null,然后使用iconv或者iconv-lite转码,否则会出现乱码request({
url:feed,
timeout:100000,
poll:false,
encoding:null
},
function(err,res,body){
if(!err&&res.sta..
分类:
Web程序 时间:
2014-10-23 21:05:57
阅读次数:
353
当你必须要将字符串当做代码来执行,很多人第一印象是想到使用eval,但实际上,使用newFunction会更安全。为什么安全?看个例子。<script>
vara=1;
eval("vara=2;");//改变了当前域的变量a
alert(a);
newFunction("vara=3;")();//不改变当前作用域的变量
alert(a);
<..
分类:
编程语言 时间:
2014-10-23 20:58:33
阅读次数:
207
1 动态绑定模式: 1 display(); 6 } 7 8 public function index(){ 9 $user = D('User');10 $validate = array( 11 ...
分类:
Web程序 时间:
2014-10-23 20:42:58
阅读次数:
310
#include #include #include //function: 只保留中文、英文、数字和空格,将。!?;替换成换行符char *repUnlawChar(char *instr, char *outstr){#define SPLIT_CHAR '\n'if(instr == NULL...
分类:
编程语言 时间:
2014-10-23 20:40:08
阅读次数:
271
每天一个JavaScript实例-确定web页面的区域
function size(){
var width = 0;
var height = 0;
if(!window.innerWidth){
width = (document.documentElement.clientWidth ? document.documentElement.clientWidth:document....
分类:
编程语言 时间:
2014-10-23 19:19:10
阅读次数:
223
每天一个JavaScript实例-展示设置和获取CSS样式设置
#date{
width:200px;
background-color:lime;
}
function getStyle(date,cssprop,cssprop2){
//IE
if(date.currentStyle){
return date.currentStyle[cssprop];
}els...
分类:
编程语言 时间:
2014-10-23 17:47:47
阅读次数:
208
The remainder function and % operator.
下面这段代码过不了编译的(gcc)
#include
#include
int main()
{
double x = 10;
printf("x % 2 = %lf\n",x%2.0);
return 0;
}
operator % 仅能操作在整形数...
分类:
其他好文 时间:
2014-10-23 17:46:23
阅读次数:
195
在VS 2012 中编译 C 语言项目,如果使用了 scanf 函数,编译时便会提示如下错误:
error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To d...
分类:
其他好文 时间:
2014-10-23 17:35:21
阅读次数:
182
html <div>
????<span?id="show_info">正在发送升级命令,请勿刷新页面!</span>
????<span?id="timedown"></span>
</div> javascript function?checkTimeDown(time)
{
????var?timeId;
????...
分类:
其他好文 时间:
2014-10-23 16:30:33
阅读次数:
138