0); return $output; } public function
decode($input) { $length = strlen($input); $number = 0; $...
分类:
其他好文 时间:
2014-05-24 02:46:45
阅读次数:
319
题目链接Given a string, find the length of the
longest substring without repeating characters. For example, the longest
substring without repeating letter...
分类:
其他好文 时间:
2014-05-24 02:15:57
阅读次数:
291
The "." command is one of the most simple yet
powerful commands in Vim. Itrepeats the last change. For instance, suppose you
are editing an HTML filea...
分类:
其他好文 时间:
2014-05-23 22:52:50
阅读次数:
372
declare @last table(year1 varchar(100),companycode1
varchar(100),lastmonth varchar(100))declare @now table(year
varchar(100),companycode varchar(100)....
分类:
其他好文 时间:
2014-05-23 11:20:05
阅读次数:
300
var arr = [1,2,2,3,3,4,4,5,1];function getRepeat(
arr ){ var len = arr.length, map={}; for( var i = 0;i<len;i++ ){
if(!map[arr[i]]...
分类:
编程语言 时间:
2014-05-23 10:39:49
阅读次数:
285
??
A Stack or A Queue?
Time Limit:
1 Second Memory Limit: 32768 KB
Do you know stack and queue? They're both important data structures. A stack is a "first in last out" (FILO) data ...
分类:
其他好文 时间:
2014-05-22 12:24:38
阅读次数:
236
找出单词的最长公共前缀
class Solution {
public:
string longestCommonPrefix(vector &strs) {
int len=strs.size();
if(len==0)
return "";
int length=strs[0].size(),j;
...
分类:
其他好文 时间:
2014-05-22 09:35:20
阅读次数:
230
表单验证
function check_1(param){//不为空
if(param==""||param==null){return false;}else{return true;}
}
function check_2(param){//长度限制,字母是10个,汉字也是10个
if(param.length>10){return false;}else...
分类:
Web程序 时间:
2014-05-20 17:15:45
阅读次数:
414
在类中使用typedef, 最好将其放在类定义的头部。
如下例:
{CSDN:CODE:353555}
在类定义体中声明的LENGTH的typedef被当做重复定义,导致编译失败。
并且类中的成员函数均绑定到全局的typedef。
当你的类定义体中使用了typedef,请尽量放在类定义的首部。那么类中对于该typedef的引用将会是正确且一致的。
{...
分类:
编程语言 时间:
2014-05-20 17:13:03
阅读次数:
382
在for循环中,你可以循环取得数组或是数组类似对象的值,譬如arguments和HTMLCollection对象。通常的循环形式如下:// 次佳的循环for
(var i = 0; i < myarray.length; i++) { // 使用myarray[i]做点什么}这种形式的循环的不足.....
分类:
编程语言 时间:
2014-05-20 09:49:23
阅读次数:
344