1.基于已有对象扩充其属性和方法var Obj = new Object();Obj.saysomething = function(){}Obj.name = "";2.工厂方式function fun2(){}function creatObject(parame){ var object...
分类:
Web程序 时间:
2015-10-31 21:20:48
阅读次数:
218
$a = "nowamagic";$b =& $a;echo $b.$a;这意味着 $a 和 $b 指向了同一个变量。同一个变量内容有不同的变量名,引用就是这么个回事。function test(&$a){ $a = $a+100;}$b = 1;test($b); echo $b;结果是101
分类:
Web程序 时间:
2015-10-31 21:20:05
阅读次数:
157
if (!this.JSON) { this.JSON = {}; } (function () { function f(n) { return n < 10 ? '0' + n : n; } if (typeof Date.prototype.toJSON !== 'function') { D...
分类:
Web程序 时间:
2015-10-31 20:01:10
阅读次数:
252
1.代码function onloadReport() { if (crmForm.FormType != 1 && crmForm.FormType != 5) { $("#tab4Tab").click(function () { var test1 = document...
function centerposition( obj ){ var wWidth = document.documentElement.clientwidth; var wHeight = document.documentElement.clientHeight; va...
分类:
其他好文 时间:
2015-10-31 18:36:29
阅读次数:
102
通常的组合继承模式如下1 function Papa(){};2 function Child(){3 Papa.apply(this,arguments);4 };5 Child.prototype = new Papa();6 Child.prototype.constructor = ...
分类:
其他好文 时间:
2015-10-31 18:33:45
阅读次数:
195
public static function formatTime($date) { $str = ''; /* if(is_string($date)) { $timer = strtotime($date); } else{ $timer=$date; ...
分类:
其他好文 时间:
2015-10-31 18:19:59
阅读次数:
151
SVMtoy[label_matrix, instance_matrix] = libsvmread('ex8b.txt');options = '';% contour_level = [-1 0 1];contour_level = [-0.2 0.2 1 2];% function svm.....
分类:
其他好文 时间:
2015-10-31 17:01:00
阅读次数:
220
http://www.cnblogs.com/farseer810/p/4391318.html经过这几次的代码提交,发现很多人的代码风格不够规范。个人认为很有必要强制性规定一下代码的规范。整体来说,有三种代码风格,其中两种类似于这样的:public void function(){ //func....
分类:
系统相关 时间:
2015-10-31 16:58:50
阅读次数:
187