class Capture {private static $_CapSite = 222;function dd(){ echo self::$_CapSite; }}$cc=new Capture();$cc->dd();
分类:
Web程序 时间:
2015-10-04 22:09:18
阅读次数:
193
std::bind 用于绑定一个函数,返回另外一种调用方式的函数对象 ,可以改变参数顺序 和个数 std::function 用于构建一个函数特别是?回调函数 ?,用于替代 函数指针/*常和匿名函数一起用回调*/ 参考以下代码 #inc...
分类:
其他好文 时间:
2015-10-04 17:18:17
阅读次数:
152
ajaxStart()方法:当AJAX请求开始时,显示加载中的提示。$("#divMessage").ajaxStart(function(){ $(this).show(); //显示元素});当AJAX请求结束时,提示或显示某一信息。$("#divMessage").ajaxStop(funct...
分类:
Web程序 时间:
2015-10-04 17:07:53
阅读次数:
147
从Onethink代码里摘出来的 /**
?*?获取客户端IP地址
?*?@param?integer?$type?返回类型?0?返回IP地址?1?返回IPV4地址数字
?*?@return?mixed
?*/
function?get_client_ip($type?=?0)?{
????...
分类:
Web程序 时间:
2015-10-03 23:17:22
阅读次数:
349
pdo:php data object//查看开启的方法//echo phpinfo();//单例class A{ private static $a = null; static function shareInstance() { if(self::$a == n...
分类:
Web程序 时间:
2015-10-03 23:02:25
阅读次数:
150
Total Accepted:83663Total Submissions:200541Difficulty:EasyGiven two binary trees, write a function to check if they are equal or not.Two binary trees...
分类:
其他好文 时间:
2015-10-03 21:58:55
阅读次数:
164
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2015-10-03 21:55:41
阅读次数:
205
小编以前写wp的,所有习惯了有函数的重载,根据参数的不同,而可以调用名称相同的函数,可是js中的function对象也是以属性的形式出现的,在一个对象中增加与已有的function同名的function时,旧的function对象则会被覆盖。= =。 那么怎么让js也可以有这种特性呢?js中,...
分类:
其他好文 时间:
2015-10-03 20:44:55
阅读次数:
191
网站样式改变是随着样式表改变而改变的,所以整个网站的样式改变仅需要改变风格css文件即可。通常静态网站改改变样式方法如下:function shiftStyle(){ if(db_shiftstyle == 1){ if (getObj('widthCfg').innerHTML=='切换到宽版'....
分类:
Web程序 时间:
2015-10-03 18:11:39
阅读次数:
146
window.event.returnValue=false放到提交表单中的onclick事件中则不会提交表单,如果放到超链接中则不执行超链接还书function aDel(msg){ if(confirm(msg)){ return true; } else{ // stopDefault(...