摘要: StringUtils.split(String str, String separator) separator是一个正则表达式,里面字符是或的关系StringUtils.split("abdcde", "bd"); 按 b和d 来分,而不是db一起来分替代方法StringUtils.splitB... 阅读全文
posted @ 2014-12-06 15:36 午后微醺 阅读(516) 评论(0) 推荐(1) 编辑
摘要: 1. 关闭自动编译 Project --> Build Automatically2. 关闭自动提示 Java - Editor - Content Assist - Auto Activation 关闭3. UTF84. java formatter: spaces only / maxim... 阅读全文
posted @ 2014-11-29 12:08 午后微醺 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 全选,F2修改后, filename (1), filename (2), .....用此bat修改为filename1, filename2, ...@Echo Off&SetLocal ENABLEDELAYEDEXPANSIONFOR %%a in (*) do (set "name=%%a"... 阅读全文
posted @ 2014-11-11 17:13 午后微醺 阅读(222) 评论(0) 推荐(0) 编辑
摘要: grep 'www.sogou.com' log.2014${date} | grep "GET /${pt}?" | awk '{split($0, a, "GET /'${pt}'?"); split(a[2], b, "HTTP/1.1"); split(b[1], c, "?"); prin... 阅读全文
posted @ 2014-11-08 21:56 午后微醺 阅读(1923) 评论(0) 推荐(0) 编辑
摘要: 强制重载bashrc:source .bashrc.bashrcexport MARKPATH=$HOME/.marksfunction jump { cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"}function ma... 阅读全文
posted @ 2014-10-29 22:40 午后微醺 阅读(239) 评论(0) 推荐(0) 编辑
摘要: /** * 计算字符串的显示长度,半角算1个长度,全角算两个长度 * @param s * @return */ public static int computeDisplayLen( String s ) { int len = 0; ... 阅读全文
posted @ 2014-10-28 16:01 午后微醺 阅读(2698) 评论(0) 推荐(0) 编辑
摘要: 需要重新绑定事件时,可以先把事件off掉,然后重新onfunction foo() { xxxx;}$("#a").on("click", foo);//需要重新绑定事件时,可以先把事件off掉,然后重新on$("#a").off("click", foo).on("click", foo);... 阅读全文
posted @ 2014-10-23 19:45 午后微醺 阅读(576) 评论(0) 推荐(0) 编辑
摘要: JQuery API: http://jquery.cuishifeng.cn/JS/CSS 压缩: http://tool.css-js.com/在线代码格式化:http://tool.oschina.net/codeformat/xml JSON格式化:http://jsoneditoron... 阅读全文
posted @ 2014-10-23 18:55 午后微醺 阅读(148) 评论(0) 推荐(0) 编辑
摘要: if ( window.addEventListener ) { window.addEventListener("load", function(){sendPb(url);}, false);} else if ( window.attachEvent ) { window.atta... 阅读全文
posted @ 2014-10-17 13:26 午后微醺 阅读(1593) 评论(0) 推荐(0) 编辑
摘要: 一直记错jQuery on的用法http://api.jquery.com/on/$( "#dataTable tbody tr" ).on( "click", function() { alert( $( this ).text() );});$( "#dataTable tbody" ).on... 阅读全文
posted @ 2014-10-17 13:22 午后微醺 阅读(122) 评论(0) 推荐(0) 编辑