码迷,mamicode.com
首页 >  
搜索关键字:lastindex    ( 43个结果
easyui datagrid editor 特定列disabled
//编辑表格 function editRow(rowIndex) { $('#tt').datagrid('cancelEdit', lastIndex); $('#tt').datagrid('beginEdit', rowIndex); lastIndex = rowIndex; $('#tt...
分类:其他好文   时间:2014-10-08 14:17:15    阅读次数:1028
Longest Substring Without Repeating Characters[leetcode]
记录最大的起始位置+hash int lengthOfLongestSubstring(string s) { map charMap; int curLen, maxLen = 0,lastIndex = -1; for (int i = 0; i < s.size(); i++) { if (charMa...
分类:其他好文   时间:2014-09-14 12:53:27    阅读次数:158
Javascript - The same RegExp behave differently
Javascript 中的RegExp对象是有状态的,初次调用之后会保存上次找到的位置,之后调用时会从lastIndex开始查找匹配,所以会出现同一个正则表达式,有时候找的到,有时候返回null的情形。要初始化匹配状态,可以通过重置lastIndex。reg.lastIndex = 0;
分类:编程语言   时间:2014-07-03 20:46:13    阅读次数:245
43条   上一页 1 ... 3 4 5
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!