文章

杯具,Wordpress 3.1升级后,竟然无法访问,原因提示如下: ………网页页生成了 过多的重定向。清除此网站的 Cookie 或允许第三方 Cookie 可能会解决该问题。如果 不能解决,则可能是服务器配置的问题,而不是您的 计算机有问题。以下是一些建议:请稍后重新载入此网页。……….. 很是郁闷,弄了半天是空间本身的设置及 3.1的代码逻辑处理 综合作用的结果。 无奈,空间是没权限动了,只能修改wordpress 代码了: 找到 wp-include/template-loader.php 修改第一行处代码: if ( defined(‘WP_USE_THEMES’) && WP_USE_THEMES ) 改为(红色为增加部分) if ( false && define
2011-03-20
1分钟阅读时长
276字
阅读
昨天开发新类库,做到Json模块,使用了json2官方类为底层,使用中频遇异常,甚是不爽。看了下源码,json2 采用了优化处理机制,优先使用浏览器原生JSON处理。(事实是json自己的实现也如此)
2011-03-18
1分钟阅读时长
204字
阅读
一、安装 # 解压缩 tar jxvf httpd-2.2.2.tar.bz2 cd httpd-2.2.0 # vi server/mpm/worker/worker.c 找到下面几行,并改成如下的数值,其目的是在源码中修改apache可支持的最大线程数和最大客户端数目。 # define DEFAULT_SERVER_LIMIT 256 # define MAX_SERVER_LIMIT 40000 # define DEFAULT_THREAD_LIMIT 256 # define MAX_THREAD_LIMIT 40000 # 编译和安装 apr 1.2 cd srclib/apr ./configure –prefix=/home/liuchao/local/apr make make install # 编译和安装 apr-util 1.2 cd ../apr-util ./configure –prefix=/home/local/apr-util –with-apr=/home/local/apr make make install 优化编译选项及配置apache可加载的模块 patch -p1 < ../mod_limitipconn-0.22/apachesrc.diff /usr/local/apache2.2.3/bin/apxs -c -i -a mod_limitipconn.c /usr/local/apache2.2/bin/apxs -c -i -a mod_evasive20.c 更改2Glogs export CFLAGS=”-O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_L
2011-03-10
15分钟阅读时长
7108字
阅读
谷歌的Chart API真是全啊,下面这个就是比较实用的二维码: http://code.google.com/intl/zh-CN/apis/chart/docs/gallery/qr_codes.html
2011-01-30
1分钟阅读时长
32字
阅读
网络看到,记录下。 一般来说,我们判断 iframe 是否加载完成其实与 判断 JavaScript 文件是否加载完成 采用的方法很类似: var iframe = document.createElement("iframe"); iframe.src = "http://www.planabc.net"; if (!/*@cc_on!@*/0) { //if not IE iframe.onload = function(){ alert("Local iframe is now loaded."); }; } else { iframe.onreadystatechange = function(){ if (iframe.readyState == "complete"){ alert("Local iframe is now loaded."); } }; } document.body.appendChild(iframe); 最近, Nicholas C. Zakas 文章《Iframes, onload, and document.domain》的评论中 Christopher 提供了一个新的判断方法(很完美): var iframe = document.createElement("iframe"); iframe.src = "http://www.planabc.net"; if (iframe.attachEvent){ iframe.attachEvent("onload", function(){ alert("Local iframe is now loaded."); }); } else { iframe.onload = function(){ alert("Local iframe is now loaded."); }; } document.body.appendChild(iframe); 几点补充说明: IE 支持 iframe 的 onload 事件,不过是隐形的,需要通过 attachEvent 来注册。 第二种方法比第一种方法更完美,因为 readystatechange 事件相对于 load 事件有一些潜在的问题。
2011-01-13
1分钟阅读时长
244字
阅读
在任何编辑器中,获取光标位置都是非常重要的,很多人可能认为较难,其实只要处理好浏览器的兼容,还是比较容易实现的。
2011-01-13
3分钟阅读时长
1089字
阅读
如何获取当前 select 元素的值
2011-01-13
1分钟阅读时长
257字
阅读
如何在事件代理中正确使用 focus 和 blur 事件
2011-01-13
2分钟阅读时长
563字
阅读
This is a list of the API changes made from 1.2 to 1.3. It allows you to drop the compatibility layer mostly by doing search and replace. If you just want to update to MooTools Core 1.3 with your existing code, see Update from 1.2 to 1.3.
2011-01-13
2分钟阅读时长
360字
阅读
var getRandomColor = function() { return ‘#’ + (‘00000’ + (Math.random() * 0x1000000 « 0).toString(16)).substr(-6); } 网上看到,记录一下。
2011-01-12
1分钟阅读时长
35字
阅读