//数组功能扩展
Array.prototype.each=function(fn){
fn=fn||Function.K;
vara=[];
varargs=Array.prototype.slice.call(arguments,1);
for(vari=0;i<this.length;i++){
varres=fn.apply(this,[this[i],i].concat(args));
if(res!=null)a.push(res);
}
returna;
};
//数组是..
分类:
其他好文 时间:
2014-09-05 18:31:42
阅读次数:
260
获取类型:[object object],[object function],[object Undefined]等Object.prototype.toString.apply(obj);获取对象的所有属性方法:function t(obj){for(var i in obj)alert(i+"-...
分类:
编程语言 时间:
2014-09-05 18:05:21
阅读次数:
232
JS数组追加数组没有现成的函数,这么多年我已经习惯了a.push.apply(a, b);这样的自以为非常酷的,不须要写for循环的写法,一直也没遇到什么问题,直到今天我要append的b是个非常大的数组时才遇到了坑。1a=newArray();2b=newArray(125624);3a.push...
分类:
移动开发 时间:
2014-09-04 13:16:19
阅读次数:
233
@PathVariable是用来对指定请求的URL路径里面的变量
eg: Java代码
@RequestMapping(value = "form/{id}/apply", method = {RequestMethod.PUT, RequestMethod.POST})
{id}在这个请求的URL里就是个变量,可以使用@PathVariable来获取
@PathVariabl...
分类:
其他好文 时间:
2014-09-03 21:19:47
阅读次数:
331
scala中的所有操作符都是方法的调用,例如:1+2,等效于(1).+(2) 0 to 5,等效于(0).to(5),x(1)="scala",等效于(x).update(1,"scala"),x(1)等效于(x).apply(1) scala通过定义伴生对象,分离静态成员,类似于j...
分类:
编程语言 时间:
2014-09-03 13:24:46
阅读次数:
393
/** * @description Class 构造函数 * @function * @public */var Class = function(parent){ var Klass = function(){ this.init.apply(this,arguments) } /* @...
分类:
其他好文 时间:
2014-09-02 00:02:23
阅读次数:
160
用过 xtrabackup 工具的 innobackupex 脚本备份数据的人可能会注意到,–apply-log 处理过的备份数据里有两个文件说明该备份数据对应的 binlog 的文件名和位置。但有时这俩文件说明的位置可能会不同。经过实验和询问 Percona 公司,结论如下:1 对于纯 InnoD...
分类:
数据库 时间:
2014-09-01 21:01:13
阅读次数:
263
refer from :http://explainextended.com/2009/07/16/inner-join-vs-cross-apply/INNER JOINis the most used construct inSQL: it joins two tables together, ...
分类:
移动开发 时间:
2014-08-31 18:29:51
阅读次数:
158
1、对象的继承,一般的做法是复制:Object.extendprototype.js的实现方式是:Object.extend = function(destination, source) {for (property in source) {destination[property] = sour...
分类:
移动开发 时间:
2014-08-31 17:08:31
阅读次数:
194
; Run = function () { ; return Array.prototype.splice.call( arguments, -1 )[0].apply( this, arguments ) }; Loop = function () { var coun...
分类:
编程语言 时间:
2014-08-29 01:18:16
阅读次数:
298