参考资料:PHP手册-语言参考:http://php.net/manual/zh/language.namespaces.php概要:1. 声明了命名空间之后,下面的const, function, class都会划归到该命名空间。2. 只有声明过命名空间的PHP 文件才能加载有命名空间的PHP文件...
分类:
Web程序 时间:
2015-10-09 20:00:18
阅读次数:
231
function foo created via new Function var foo=new Function(); //equals to function foo(){} but the name is '' foo.__proto__===Function.prototype ...
分类:
其他好文 时间:
2015-10-09 19:56:52
阅读次数:
143
function sleep(d){ for(var t = Date.now();Date.now() - t <= d;);} sleep(5000); //当前方法暂停5秒
分类:
Web程序 时间:
2015-10-09 19:55:49
阅读次数:
125
/* * 获取下一个列名 * 注意,此方法最多支持到两位 * */function getNextColum($colum){ if(empty($colum))return 'A'; $key = ord(substr($colum,strlen($colum)-1,1)); i...
分类:
Web程序 时间:
2015-10-09 19:45:25
阅读次数:
165
页面加载完毕时会触发onload事件。基于内容(HTML)要与行为(JavaScript)分离的编码思想,我们需要将一些对页面的初始化操作写在方法内,并通过window.onload = functionName调用这些方法.需要调用多个方法时,若使用window.onload = function...
分类:
编程语言 时间:
2015-10-09 18:17:40
阅读次数:
144
static private function getPageHash($url){ $path = parse_url($url); $path = substr( $path['path'],0,4); $path = substr( md5 ( isset($path)?$path...
分类:
其他好文 时间:
2015-10-09 18:07:59
阅读次数:
129
1、错误描述Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Incorrect parameter count in the call to native function 'ISNULL'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0...
分类:
其他好文 时间:
2015-10-09 17:00:10
阅读次数:
660
再看backbone的路由配置部分1 调整options, 记录映射关系; 绑定映射关系给history; 初始化 var Router r = function(options) { options || (options = {}); if (options.routes) this...
分类:
Web程序 时间:
2015-10-09 16:57:17
阅读次数:
267
进来开发中碰到一个比较奇怪的问题,就是用jquery控制界面中的checkbox全选和全不选的时候,只能第一次成功使用不能重复操作。代码如下:全选$(‘input:checkbox‘).each(function(){$(this).attr(‘checked‘,true);});全不选$(‘input:checkbox‘).each(function(){$(this).attr(‘c..
分类:
Web程序 时间:
2015-10-09 15:37:47
阅读次数:
201
在jquery 中我们可以选择$().each() 与 $.each() 进行迭代对象和数组$(items).each(function(){ //item}) ,而后者则 $.each(items,function(i,item){//write yourcode})==============....
分类:
Web程序 时间:
2015-10-09 15:09:42
阅读次数:
152