This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//获取请求参数数组 | |
function getUrlVars(){ | |
var vars = [], hash; | |
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) | |
{ | |
hash = hashes[i].split('='); | |
vars.push(hash[0]); | |
vars[hash[0]] = hash[1]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*强调* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
Array.prototype.ayromove = function(dx) { | |
if(isNaN(dx)||dx>this.length){return false;} | |
this.splice(dx,1); | |
} | |
var arr = ['a', 'b', 'c']; | |
console.log("elements: "+ arr + " nLength: " + arr.length); | |
arr.ayromove(1); //删除下标为1的元素 | |
console.log("elements: "+ arr + " nLength: " + arr.length); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keepalived + nginx | |
容灾+负载 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 分析豆瓣阅读查看电子书的逻辑 | |
* | |
* 主要用到的JavaScript为 | |
* 1. OzJS(管理模块) | |
* 2. jQuery(base库) | |
* 3. Backbone.js(web application框架) | |
* | |
* 过程分析 | |
* -------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
命令方式启动tomcat没有滚屏日志信息,可以到logs目录下看。 | |
tomcat远程调试: | |
1. 修改startup.bat 在尾部修改成以下列方式启动 | |
set JPDA_ADDRESS=8000 | |
set JPDA_TRANSPORT=dt_socket | |
call "%EXECUTABLE%" jpda start | |
2. catalina.sh jpda start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod和数字改变文件或目录的访问权限 | |
chown改变目录或文件的所有权 | |
chown root $dir | |
-R 递归子目录 | |
http://soft.yesky.com/115/11046615.shtml | |
echo "" >>/> file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1024以下端口必须由root账户启动 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache: | |
httpd -t //检查配置是否正确 | |
service httpd reload //重新加载配置 | |
启动,重启和停止 | |
/usr/local/apache/bin/apachectl -k start (不加参数k也行) | |
/usr/local/apache/bin/apachectl -k restart | |
/usr/local/apache/bin/apachectl -k stop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln -s 源目录 目标目录 |
NewerOlder