- 博客(373)
- 问答 (1)
- 收藏
- 关注
原创 rsync配置
uid = nobodygid = nobodyuse chroot = no max connections = 4 pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock log file = /var/log/rsyncd.log [rsynctest] path = /data1/r...
2013-03-05 22:41:14
225
原创 建立swap分区
sudo dd if=/dev/zero of=/mnt/512Mb.swap bs=1M count=512sudo mkswap /mnt/512Mb.swapsudo swapon /mnt/512Mb.swapgedit /etc/fstab/mnt/512Mb.swap none swap sw 0 0
2013-02-01 18:46:31
286
原创 linux glibc 升级
编译安装glibc下载glibcwget http://ftp.gnu.org/gnu/glibc/glibc-2.3.2.tar.gz下载glibc-linuxthreadswget http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.3.2.tar.gz解压tar -zxvf glibc-2.3.2.tar.gzcd glibc-2.3.2ta...
2013-01-17 18:59:43
407
原创 64位 linux 检测
file /sbin/init 或者 file /bin/ls/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped如果显示 64-bit 则为64位;file /sbin/i...
2013-01-17 17:37:32
204
原创 jetty continution api
http://hideto.iteye.com/blog/106466 http://beingchou.iteye.com/blog/552054 http://geeklu.com/2010/07/cometd-jetty-continuations/
2013-01-02 14:24:15
190
原创 nodejs 扒页面 api-docs
var continuation = require('../continuation');var http = require("http");var fs = require('fs');var url = require('url');var ps = require("path");//var request = require("request");funct...
2013-01-01 19:38:45
375
原创 ScheduledThreadPoolExecutor
ScheduledThreadPoolExecutor 我们先来学习一下JDK1.5 API中关于这个类的详细介绍: "可另行安排在给定的延迟后运行命令,或者定期执行命令。需要多个辅助线程时,或者要求 ThreadPoolExecutor 具有额外的灵活性或功能时,此类要优于 Timer。 一旦启用已延迟的任务就执行它,但是有关何时启用,启用后何时执行则...
2012-12-30 16:57:20
310
原创 red hat linux6 wget
去这里下载http://www.gnu.org/software/wget/ wget-1.14.tar.gz 挂载u盘 拷贝到linux 然后安装 tar -xzvf wget-1.14.tar.gz cd wget-1.14 ./configure --prefix=/usr make make inst...
2012-12-16 00:29:43
279
原创 挂载u盘
fdisk -l mkdir /mnt/usbdisk mount /dev/sdb6 /mnt/usbdisk cd /mnt/usbdisk
2012-12-15 23:21:25
169
原创 linux red hat 6 配置网卡上网
/etc/sysconfig/network-scripts/ifcfg-eth0 添加check_link_down() { return 1;} 添加ONBOOT="yes"//开机自动激活网卡 添加BOOTPROTO=dhcp 表示接受使用dhcp设置。 service network restart 重启网卡 设置静态I...
2012-12-15 22:07:54
778
原创 IE的UA
IE User-Agent是如何生成的http://tieba.baidu.com/f?kz=192127084 以Win XP/IE6为例,根据我的理解我来简介一下IE user-agent的生成,不对之处请指正。首先,IE的缺省标示为:User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)该标示共有...
2012-11-15 17:43:21
354
原创 前端面试题
1, 判断字符串是否是这样组成的,第一个必须是字母,后面可以是字母、数字、下划线,总长度为5-20var reg = /^[a-zA-Z][a-zA-Z_0-9]{4,19}$/;reg.test("a1a__a1a__a1a__a1a__");2,截取字符串abcdefg的efgvar str = "abcdefg";if (/efg/.test(str)) { v...
2012-11-07 11:30:24
426
原创 PHP读取打包JS文件
RewriteRule ^((.*/js/)?.*\.js)$ combinejs.php?path=$1&pre=$2&type=js [NC,L,QSA]RewriteCond %{REQUEST_URI} !\.js$RewriteCond %{REQUEST_URI} !combinejs\.php$RewriteCond %{REQUEST_FILENAM...
2012-10-31 16:09:15
409
原创 windows curl
http://www.paehl.com/open_source/?CURL_7.28.0 http://www.paehl.com/open_source/?CURL_7.28.0 curl 是一般linux发行版中都带有的小工具,利用这个工具可以很方便的下载文件,我一般使用这个工具来查看某个页面相应的HTTP头信息,在Windows系统中我们也一样可以使用这个工具,如果不需要支...
2012-10-31 15:29:19
270
原创 script.icio.us 中的拖拽
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>&
2012-10-20 22:16:24
132
原创 JS动画算法学习
function Opacity(dom , spec) { Element.extend(dom); var from = spec.from || dom.getOpacity(); var to = spec.to || '1.0'; var fps = spec.fps || 100; var delay = spec.delay || 0; var duratio...
2012-10-10 18:10:56
194
原创 script.icio.us 中动画的学习
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><
2012-10-09 16:35:02
120
原创 结合prototype自己做的Sortable
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><
2012-10-08 18:13:56
140
原创 Prototype框架学习
document.observe("dom:loaded", function() { Object.extend(String.prototype , { bLength : function () { if (!this.toString()) { return 0; } var b = this.toString(...
2012-10-04 23:26:48
129
原创 Chrome脚本访问window对象
var isChrome = window.chrome; function safeInvoke(callback) { /// <summary>沙箱模式下的回调</summary> //因为Chrome不支持require引入脚本包的功能,为避免需要将整个jQuery加载进来,这里使用非安全模式进行执行 if (isChrome) un...
2012-09-18 11:16:11
1556
原创 如何判断360浏览器
var f = false; try { window.external.twExtSendMessage2(); f = true } catch (g) {} if(f) { alert('是360浏览器');}
2012-09-09 09:24:58
333
原创 insertHTML
var insertHTML = function(node , html ,where) { if(node.ownerDocument.createRange) { var range = node.ownerDocument.createRange(); switch(where) { ...
2012-07-18 22:02:18
2485
原创 解析url的正则
function parse(str) { var result = {}; var reg = /^([a-z0-9]+):([\/]{1,3})((?:[a-z0-9\-\.]+)+\.[a-z0-9]+)(?::(\d+))?[\/]?([^?#]*)?[\?]?([^?#]*)?(?:#(.*))?$/i; var map = reg.exec(str) , ...
2012-07-17 13:26:04
134
原创 html实体转换的字符
< &lt; > &gt; & &amp; " &quot; " " &nbsp; ' &#39;
2012-07-15 20:27:54
114
原创 全角半角字符
全角转换为半角 * 半角字符范围(0x20 - 0x7e) 空格为0x20 * 全角字符范围(\uff01 - \uff5e) 空格特殊\u3000 * 相差65248
2012-07-15 17:34:07
220
原创 ajax跨子域
<h1>用document.domain解决Ajax跨子域</h1> <h3><a href="http://www.js8.in/443.html">用document.domain+iframe实现Ajax跨子域</a>|<a href="http://www.js8.in/443.html#comments&qu
2012-07-15 16:43:18
133
原创 window.name实现跨域
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><h1>我是A页面</h1><div id="addArea"> </div><iframe id="bpage" f
2012-07-15 10:57:19
163
原创 postMessage实现跨域
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><h1>我是A页面</h1><div id="addArea"> </div><iframe name="bpage"
2012-07-15 10:05:41
139
原创 通过iframe hash 实现跨域
<h1>我是A页面</h1><iframe name="bpage" frameborder="0" scrolling="no" width="300" height="150" src="http://b.com/kuayu/b/b.html"></iframe>&a
2012-07-14 21:59:36
348
原创 js ajax 函数
<script> var ajax = (function() { var parseParam = function(origin , target) { origin = origin || {}; target = target || {}; var obj = ...
2012-06-24 11:02:57
153
原创 firefox XPCOM Interface Reference
https://developer.mozilla.org/en/XPCOM_Interface_Reference
2012-06-20 16:51:59
122
原创 target,currentTarget,originalTarget,explicitOriginalTarget区别
console.log(e.target);console.log(e.currentTarget);console.log(e.originalTarget);console.log(e.explicitOriginalTarget); body上绑定的mousemovetarget:当前事件发生的对象 spancurrentTarget:事件冒泡到当前对...
2012-06-14 18:25:33
529
原创 Chrome和Firefox的xpi与crx加载第三方dll
Chrome上两个文件夹: │ manifest.json│└─plugins npScreenGrab.dll 其中manifest.json如下: { // Required "name": "Weibo Plugin For Chrome", "version": "1.0.0.6", ...
2012-06-03 14:28:11
4128
原创 不以XXX结尾的字符串
var reg = /.*[^(js|css)]$/;console.log(reg.test("asdasdadsasdasd.ttt"));
2012-05-11 18:38:25
238
原创 怎样删除一个Aptana里面错误的连接
There is no "Connection Manager" that you can delete it (I can't find it). I found one way to delete old or faulty FTP connection (let's say it's 'connection123').Create new Web Project (or choose ...
2012-05-11 16:38:22
85
原创 QQmail安装例子
http://m599.mail.qq.com/cgi-bin/readtemplate?t=browser_addon&check=false&returnsid=Z7ThgAXgmqkiOSZp&s=install
2012-04-16 17:41:21
282
原创 各个浏览器安装插件
if (_sBrowser == 'IE') { document.write(T(['<object classid="clsid:6CE20149-ABE3-462E-A1B4-5B549971AA38" codebase="/zh_CN/activex/%cab%?r=%rand%#version=#version#"><...
2012-04-16 17:34:25
375
原创 Number的三个方法
toExponential 使用科学计数法进行表示。 使用了科学技术法之后,小数点后保留几位。 toFixed 使用普通方法表示,小数点后保留几位。 toPrecision console.log(new Number(10).toPrecision(3))10.0console.log(new Number(10000).toPrec...
2012-03-12 10:25:16
191
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人