上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页
摘要: 插件开发者地址:http://www.asual.com/jquery/address/简单说明:主要用于调整#之后的地址,来实现浏览器历史的记录及AJAX请求的时候生成历史记录使用:$.address.state('这里需要基本URL,地址不改变部分,一般为初始化进入页面地址').init(function(event){//插件初始化,一般这里调用$('.nav a').address(); 实现链接单击监听}).change(function(event){//当页面地址更改的时候调用,即#号之后的地址更改}).internalChange(functio 阅读全文
posted @ 2011-10-08 10:30 liushan 阅读(521) 评论(0) 推荐(0) 编辑
摘要: ret=[0,1,3] ;Jquery里有ret.concat.apply([],ret)这段.等价于[].concat.apply([],ret)关键作用的是apply,因为apply的第二个参数把ret的数组分成多个参数传入给concat作用:把二维数组转化为一维数组Array.prototype.slice.call(arguments);作用:用来把一些奇怪的对象转成数组 阅读全文
posted @ 2011-10-07 16:01 liushan 阅读(388) 评论(0) 推荐(0) 编辑
摘要: constructor属性始终指向创建当前对象的构造函数。比如下面例子: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->// 等价于 var foo = new Array(1, 56, 34, 12); var arr = [1, 56, 34, 12]; console.log(arr.constructor === Array); // true // 等价于 var foo = new Function(); var Foo =.. 阅读全文
posted @ 2011-09-28 23:26 liushan 阅读(2409) 评论(4) 推荐(2) 编辑
摘要: 现在大多数网站都用到了缓存,但数据结构简单的时候,缓存的设计是简单的,但当数据结构复杂到一定程度后,维护缓存也是非常复杂的事情而缓存的问题归根来源于数据的更新,插入,删除,如下例:一篇文章,和一个文章列表,如果是两个缓存,但添加,更新,删除(以上3项以下统称为更改)一篇文章的时候都需要去更新文章列表.就两个的时候很容易做好缓存维护,现在加一个产品,和一个产品列表,同样是上面的问题,独立的方式的话也... 阅读全文
posted @ 2011-08-09 16:27 liushan 阅读(695) 评论(2) 推荐(1) 编辑
摘要: kohana 3.3.0Validation==========实现数据的校验,相比3.*等版本,移除了数据的过滤合并回调到rule中CODE:publicfunctionaction_index(){//待校验数据$array=array('username'=>'afasdfs','ps'=>'');$validation=newValidation($array);//单个label$validation->label('username','USERRRRR');//多个l 阅读全文
posted @ 2011-08-09 12:05 liushan 阅读(1525) 评论(0) 推荐(0) 编辑
摘要: 最近装了WIN7 64位系统.以前的环境都用不了鸟,重新配环境,做个笔记下载NGINX,PHP (NGINX32位凑合用)php for window 64bit url: 如果你ECLIPSE用64位的千万记得要下64位的PHP,否则DEBUG用不鸟的http://windows.php.net/downloads/qa/archives/下载XDEBUG的时候记得下载TS版,否则也出现加载失败,zend debug自动无64位的PHP 5.3 VC9 TS (64 bit)XDEBUG下载地址:http://xdebug.org/download.phpPHP.ini配置:#有些PHP扩. 阅读全文
posted @ 2011-07-22 00:01 liushan 阅读(1596) 评论(0) 推荐(0) 编辑
摘要: 多人开发项目的时候不用自动部署,光维护就是一个非常大的负担,每次修改项目部署的时候总是小心翼翼,痛苦为了减负,决定搞phing+xinc来实现自动部署安装非常简单:(pear都没装的自己GOOGLE啦)pear channel-discover pear.phing.infopear install phing/phing半年前就是alpha状态的svn包,到现在还没发布正式版,晕,估计没戏了.执行 pear install pear/VersionControl_SVN报错:(略)pear install channel://pear.php.net/VersionControl_SVN-0 阅读全文
posted @ 2011-07-20 11:21 liushan 阅读(1509) 评论(0) 推荐(0) 编辑
摘要: .tar解包: tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)---------------------------------------------.gz解压1:gunzip FileName.gz解压2:g... 阅读全文
posted @ 2011-07-15 15:53 liushan 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 属性方法 属性 描述 boundingHeight 获取绑定 TextRange 对象的矩形的高度。 boundingLeft 获取绑定 TextRange 对象的矩形左边缘和包含 TextRange 对象的左侧之间的距离。 boundingTop 获取绑定 TextRange 对象的上边缘和包含 TextRange 对象的顶边之间的距离。 boundingWidth Retrieves the width of the rectangle that bounds the TextRange object. htmlText 获取绑定 TextRange 对象的矩形的宽度。 offsetLef 阅读全文
posted @ 2011-06-20 23:51 liushan 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 1.stringstream等对象在标准库sstream中,非stringstream中2.字符串与整数转变字符串转整数string sinta("1234");const char *tchar;tchar=sinta.c_str();int inta;inta=atoi(tchar); 整数转字符串int inta=12345;stringstream tsinta;tsinta << inta;string sinta =tsinta.str();//或者 string sinta; tsinta>> sinta;3.循环内定义的变量循环外是不 阅读全文
posted @ 2011-05-15 19:28 liushan 阅读(320) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页