(function($){ ????$.isBlank = function(obj){ ????????return(!obj || $.trim(obj) === ""); ????}; })(jQuery); $.isBlank(" ") //true $.isBlank("") //true $.isBlank("\n") //true $.i...
分类:
Web程序 时间:
2015-10-14 12:52:49
阅读次数:
782
1. 删除html 标签 和 空格//移出字符串中的所有html标签function removeHtmlTag($info){ $info = trim(preg_replace("//m", '', $info)); //$info = str_replace('','',$info...
分类:
其他好文 时间:
2015-10-14 12:23:03
阅读次数:
168
(1)遍历(2)长度(3)拼接(4)插值(5)大小写(6)trim(7)split……等等vara="你好"varb=String()a.isEmptyb="xxxxxyyyyy"b.isEmpty//遍历forcinb{println(c)}//计算长度countElements(b)//拼接a+...
分类:
编程语言 时间:
2015-10-13 00:05:45
阅读次数:
231
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".解题思路:用trim() 和splite("\\s+")把S...
分类:
其他好文 时间:
2015-10-11 06:44:34
阅读次数:
112
git reset --hard HEAD|commit HEAD清掉现在的head HEAD~2 清掉最后两次提交 | commit 跳转到指定的一次commitgitreflog 找回reset的撤销git revert commit 回滚到commitgit cherry-pick用于把...
分类:
其他好文 时间:
2015-10-09 12:15:00
阅读次数:
132
git reset, git checkout, git revert能让你撤销你本地仓储的一些修改, 前两种命令可以作用于commit或者一个文件.Commit级别的操作注意了git revert只能作用于commit不能作用于文件.reset在commit级别, reset把你的branch的顶...
分类:
其他好文 时间:
2015-10-06 00:38:00
阅读次数:
205
//去除字符串头尾空格或指定字符String.prototype.Trim= function(c){ if(c==null||c=="") { var str= this.replace(/^/s*/, ''); var rg = //s/; ...
分类:
编程语言 时间:
2015-09-30 18:07:17
阅读次数:
212
stl库的std::string类型没有提供常用的ltrim/rtrim/trim成员函数。下面的代码通过外部独立函数的形式实现了这些功能: 1 namespace { 2 bool isntspace(const char& ch) { 3 return !isspace(ch);...
分类:
其他好文 时间:
2015-09-30 09:48:06
阅读次数:
173
用途:trim, crop, remove adapters支持gz, bz2的fastqhttp://www.usadellab.org/cms/?page=trimmomatichttp://www.usadellab.org/cms/uploads/supplementary/Trimmoma...
分类:
其他好文 时间:
2015-09-29 06:31:18
阅读次数:
6597
git reset如果说git revert是一个安全的撤销方式, 那么git reset就是一个非常危险的方法了. 当你使用git reset撤销的时候, 你没有可能在回到最初了-他是一个永久的不可撤销的undo. git reset时Git命令中唯一一个有可能丢失你工作的命令.git reset...
分类:
其他好文 时间:
2015-09-29 01:07:07
阅读次数:
263