今天刚刚开始看正则表达式就遇到一个十分头疼的问题,原文是这样的:“不幸的是,很多单词里包含hi这两个连续的字符,比如him,history,high等等。用hi来查找的话,这里边的hi也会被找出来。如果要精确地查找hi这个单词的话,我们应该使用\bhi\b。\b是正则表达式规定的一个特殊代码(好吧,...
分类:
其他好文 时间:
2014-06-12 19:11:47
阅读次数:
271
最近看到一种if语句if(!+"\v1")不知其用意,于是调式了一番,原来ie8与ie8以下浏览器中(!+“\v1”)返回true,其他主流浏览器跟ie9+则返回false。为什么会这样?先把语句拆分出来分析
1:“\v1”; \v在正则表达式中表示”竖向制表符“console.log("\v1")...
分类:
Web程序 时间:
2014-06-12 18:44:15
阅读次数:
209
原题地址:https://oj.leetcode.com/problems/jump-game/题意:Given
an array of non-negative integers, you are initially positioned at the first
index of the arr...
分类:
编程语言 时间:
2014-06-12 18:04:54
阅读次数:
540
原题地址:https://oj.leetcode.com/problems/jump-game-ii/题意:Given
an array of non-negative integers, you are initially positioned at the first
index of the ...
分类:
编程语言 时间:
2014-06-12 17:38:49
阅读次数:
323
原题地址:https://oj.leetcode.com/problems/maximum-subarray/题意:Find
the contiguous subarray within an array (containing at least one number) which
has the ...
分类:
编程语言 时间:
2014-06-12 17:06:04
阅读次数:
339