用lua遍历文件目录,收集特定类型的文件: 1 local LINUX = "linux" 2 local WIN = "win" 3 local platform = WIN 4 5 local need_the_filetype = function(tfiletype, filename) ....
分类:
其他好文 时间:
2014-08-23 19:02:01
阅读次数:
630
功能实现:点击添加按钮,表格增加一行并给其name属性赋予的值,方便获取点击删除,自动删除这一行JQuery中定义一个count变量 1 var count = 1; 2 function add() { 3 var tbl = document.all.ci; 4 ...
分类:
Web程序 时间:
2014-08-23 18:53:41
阅读次数:
179
mydd = $('.plist');mydd.each(function(i){ $(this).click(function(){ mydl.eq(i).hide("slow"); })});注意:此处 this 指代的是 DOM 对象而非 jQuery 对象。如果...
分类:
Web程序 时间:
2014-08-23 17:39:11
阅读次数:
238
! function () { var /* */_a = function (x) { ; x.forEach( function (v) { return v*v }) } , _b = function (x) { ...
分类:
编程语言 时间:
2014-08-23 15:15:31
阅读次数:
191
public function connect($h,$u,$p) { $this->conn = mysql_connect($h,$u,$p); if(!$this->conn) { $err = new Exception('连接失败'); ...
分类:
其他好文 时间:
2014-08-23 13:50:40
阅读次数:
214
The ProblemWrite a function that takes two parameters n and k and returns the value of Binomial Coefficient C(n, k).For example, your function should ...
分类:
其他好文 时间:
2014-08-23 12:41:20
阅读次数:
169
Javascript去掉字符串前后空格 function String.prototype.trim(){ return this.toString().replace(/^\s+|\s+$/g,""); } ===================================== =======...
分类:
编程语言 时间:
2014-08-23 12:32:40
阅读次数:
188
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2,3],Your function should r...
分类:
其他好文 时间:
2014-08-23 11:18:00
阅读次数:
167
Ext实现方式://方法一var key = new Ext.KeyMap(document,{key: 8,fn: function(obj,e){var type = e.target.type;var readonly = e.target.readOnly;if(type != 'text'...
分类:
编程语言 时间:
2014-08-23 09:54:50
阅读次数:
254
第一种:循环检查替换[javascript]//供使用者调用function trim(s){return trimRight(trimLeft(s));}//去掉左边的空白function trimLeft(s){if(s == null) {return "";}var whitespace =...
分类:
Web程序 时间:
2014-08-23 09:53:20
阅读次数:
162