//编辑表格 function editRow(rowIndex) { $('#tt').datagrid('cancelEdit', lastIndex); $('#tt').datagrid('beginEdit', rowIndex); lastIndex = rowIndex; $('#tt...
分类:
其他好文 时间:
2014-10-08 14:17:15
阅读次数:
1028
记录最大的起始位置+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 中的RegExp对象是有状态的,初次调用之后会保存上次找到的位置,之后调用时会从lastIndex开始查找匹配,所以会出现同一个正则表达式,有时候找的到,有时候返回null的情形。要初始化匹配状态,可以通过重置lastIndex。reg.lastIndex = 0;
分类:
编程语言 时间:
2014-07-03 20:46:13
阅读次数:
245