我们先假设业务场景,是需要有这么一个扩展,提供一个叫ccvita_string的函数,他的主要作用是返回一段字符。(这个业务场景实在太假,大家就这么看看吧)对应的PHP代码可能是这样:function ccvita_string($str){ $result = 'Link'; return $.....
分类:
Web程序 时间:
2014-07-16 21:53:20
阅读次数:
278
语言:Python描述:使用递归实现 1 def getList(self, node): 2 if node is None: 3 return [] 4 5 if node.left is None and node.right ...
分类:
其他好文 时间:
2014-07-16 21:37:16
阅读次数:
174
1. 复制N个字符 String.prototype.repeat = function(num){ return (new Array(++num)).join(this);}var a = 'A';a.repeat(5); //'AAAAA'2. 替代if…else…var result;res...
分类:
Web程序 时间:
2014-07-16 21:33:45
阅读次数:
256
js代码 1 View Codehtml代码(里面有nice validator插件验证)/master/sysUser_updateSysUserPwd.action" method="post" onsubmit="return checkAll();" data-validator-optio...
分类:
其他好文 时间:
2014-07-16 21:21:19
阅读次数:
526
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2014-07-16 21:00:49
阅读次数:
208
Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,...
分类:
其他好文 时间:
2014-07-16 20:58:41
阅读次数:
173
这个里面float与零值的比较颇有些意思。bool: bool flag; if (flag == true) return; int: int var; if (var == 0) { return; }指针变量: char *p; if (p == n...
分类:
其他好文 时间:
2014-07-16 20:55:39
阅读次数:
126
1 统计登陆信息SQLcreate or replace function Get_StrArrayStrOfIndex(av_str varchar2, --要分割的字符串av_split varchar2, --分隔符号av_index number --取第几个元素)return varcha...
分类:
数据库 时间:
2014-07-16 20:53:56
阅读次数:
408
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
其他好文 时间:
2014-07-16 20:50:06
阅读次数:
137
源自leetcode上的一道题。题目为:Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "bl...
分类:
其他好文 时间:
2014-07-16 20:46:04
阅读次数:
185