昨天有一个zTree的使用者在实际的项目中有着这样一个特殊的需求,要求同级树节点能够水平显示,根据设定的宽度自动换行,效果图如下所示: 通过在浏览器调试模式下观察其同级节点的css为: li { display: list-item; text-align: -webkit-match-parent...
分类:
其他好文 时间:
2014-11-21 15:39:20
阅读次数:
713
简单版本:Regex reg = new Regex(@"(?i)\bfrom\b(?![^\[\]]*\])\s+(\[[^\[\]]+\]|\S+)");MatchCollection mc = reg.Matches(yourStr);foreach (Match m in mc){ ...
分类:
其他好文 时间:
2014-11-21 14:10:55
阅读次数:
119
function getQueryStringByName(name) { var result = location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i")); if (result == null || ...
分类:
Web程序 时间:
2014-11-21 12:08:03
阅读次数:
227
file_name = $file_name;//默认用时间命名 $this->save_path = (preg_match('/\/$/',$save_path))?$save_path:$save_path.'/'; $this->allow_types = $allow_types ==.....
分类:
Web程序 时间:
2014-11-20 11:56:05
阅读次数:
162
消除SDK更新时的“https://dl-ssl.google.com refused”错误消除SDK更新时,有可能会出现这样的错误:Download interrupted: hostname in certificate didn't match: != Download interrupte....
分类:
Web程序 时间:
2014-11-20 11:38:12
阅读次数:
158
function getBrowser() { var Sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] : (s = ua.mat...
分类:
Web程序 时间:
2014-11-19 21:47:20
阅读次数:
166
iptables 指令语法iptables [-t table] command [match] [-j target/jump][-t table] 指定规则表-t 参数用来,内建的规则表有三个,分别是:nat、mangle 和 filter,当未指定规则表时,则一律视为是 filter。个规则表...
分类:
其他好文 时间:
2014-11-19 20:20:39
阅读次数:
271
从环信中找到的部分不错的代码,拿出来记录一下是否是中文-(BOOL)isChinese{ NSString *match=@"(^[\u4e00-\u9fa5]+$)"; NSPredicate *predicate = [NSPredicate predicateWithFormat:...
分类:
移动开发 时间:
2014-11-19 18:29:34
阅读次数:
151
一个demo,在xml布局中,某一行的高度为其他行的一半。之前用layout_weight,得出的效果也不太理想。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_...
分类:
移动开发 时间:
2014-11-19 14:16:01
阅读次数:
243
String.prototype.format = function() { ? ? var args = arguments; ? ? return this.replace(/{(\d+)}/g, function(match, i) {? ? ? ? return typeof args[i] != ‘undefined‘ ? args[i] : match; ? ...
分类:
其他好文 时间:
2014-11-18 16:16:28
阅读次数:
202