长夜漫漫啊!今天领导本地搭建一个站。发现用PHP 5.2 搭建不起来,站PHP代码里面有很多5.3以上的部分,领导让苦逼我更改在5.2下能运行。改着改着发现了一个地方return new static($val);这尼玛是神马,只见过return new self($val);于是上网查了下,他们两...
分类:
其他好文 时间:
2014-08-22 01:32:25
阅读次数:
231
// functional_mem_fun.cpp// compile with: /EHsc#include #include #include #include #include using namespace std;class StoreVals { int val;public:...
分类:
其他好文 时间:
2014-08-21 22:38:34
阅读次数:
211
文本框限制长度:(通过事件实现长度限制)onkeyup="this.value = this.value.slice(0, 80)"例如: 设置该文本框里只能输入80个字符
分类:
其他好文 时间:
2014-08-21 18:44:14
阅读次数:
166
我们先来看一个例子:var Demo1 = function(val){ this.value = val; this.getValue = function(){ return this.value; } };var demo1Obj = ...
分类:
Web程序 时间:
2014-08-21 16:38:35
阅读次数:
1111
数论问题:试题题目没有看懂,但是解题方法感觉的确是非常巧妙的,应该是属于数论一方面的试题。试题分析:首先是DouBiNan先取,所以肯定优先选取剩余中值最大的,于是不存在说DouBiNan值小的情况,只有大于和小于。然后,对于val(i)=1i+2i+?+(p?1)i%p来说,只有当i=?(p)=p...
分类:
其他好文 时间:
2014-08-21 11:06:43
阅读次数:
158
ng-app The ng-app directive tells AngularJS that the element is the "owner" of an AngularJS application.ng-model The ng-model directive binds the val....
分类:
Web程序 时间:
2014-08-21 06:19:13
阅读次数:
236
5 / \ 2 6 / \ \ 1 4 7 / 3class Node{ Node left; Node right; Node parent; int val;}/**1.如果有右子树,则结果为右子树的最左节点。...
分类:
其他好文 时间:
2014-08-21 01:30:33
阅读次数:
216
6、实用函数 ● 修剪字符串$('#id').val($.trim($('#someid').val()))● 遍历集合可能这样写:var anArray = ['one','two'];for(var n = 0; n 3;})console.log(arr);//结果是:4 5 6如果把grep...
分类:
Web程序 时间:
2014-08-20 23:53:33
阅读次数:
356
类型检查和转换
要测试某个对象是否属于某个给定的类,可以使用isInstanceOf方法,如果测试成功,你可以用asInstanceOf方法将引用转换为子类的引用
if(p.isInstanceOf[Employee]){
val s = p.asInstanceOf[Employee]
}
如果想测试p指向的是一个Employee对象但又不是其子类,...
分类:
其他好文 时间:
2014-08-20 21:10:32
阅读次数:
350
$("#download").click(function () { var beginTime = $("#beginTime").val(); var endTime = $("#endTime").val(); window.open('../loadjsonM/Sta...
分类:
其他好文 时间:
2014-08-20 19:34:52
阅读次数:
121