输入一个递增数组,没有重复的元素,输出数组的分段 For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"] 已经有序了,所以直接遍历 ...
分类:
其他好文 时间:
2016-09-03 19:42:59
阅读次数:
154
Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Given s ...
分类:
其他好文 时间:
2016-09-03 16:25:41
阅读次数:
98
asp 控件 string FullName = FileUpload1.PostedFile.FileName;//获取路径名 if (FullName == "") { this.lbl.Text = "请选择excel文件!"; return; } FileInfo fi = new File ...
分类:
Web程序 时间:
2016-09-03 14:57:29
阅读次数:
163
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assume the ...
分类:
其他好文 时间:
2016-09-03 14:49:53
阅读次数:
113
publicfunctiongt($a,$b){$a=explode(‘.‘,$a);$b=explode(‘.‘,$b);$len=(count($a)>count($b))?count($a):count($b);for($i=0;$i<$len;$i++){if($a[$i]>$b[$i]){return1;break;}elseif($a[$i]<$b[$i]){return-1;break;}else{if($i==($len-1)){return0;}}}}$a="8.9...
分类:
其他好文 时间:
2016-09-03 07:32:21
阅读次数:
116
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont ...
分类:
其他好文 时间:
2016-09-03 06:24:38
阅读次数:
274
1、关系操作符 注意点:1)比较操作数是两个字符串,是比较字符串的字符编码值。 如:"a" > "b" 返回 false;"a" > "B" 返回 true; 2)[特别注意]如果是比较两个数字类型的字符串,也是按照字符编码值比较。 如:"256" > "6" 返回 false; 2、相等==和全等 ...
分类:
其他好文 时间:
2016-09-02 23:26:29
阅读次数:
192
1.datatable排序1: public DataTable SortDesc(DataTable dt){ DataView dv = new DataView(); dv.Table = dt; dv.Sort = "autoid desc"; return dv.ToTable();} 2 ...
分类:
编程语言 时间:
2016-09-02 20:24:36
阅读次数:
130
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex ...
分类:
其他好文 时间:
2016-09-02 19:01:43
阅读次数:
125
/** * 将数值四舍五入(保留2位小数)后格式化成金额形式 * * @param num 数值(Number或者String) * @return 金额格式的字符串,如'1,234,567.45' * @type String */function formatCurrency(num) { nu ...
分类:
Web程序 时间:
2016-09-02 18:42:09
阅读次数:
207