//主函数function StranText(txt,toFT,chgTxt){ if(txt==""||txt==null)return "" toFT=toFT==null?BodyIsFt:toFT if(chgTxt)txt=txt.replace((toFT?"简":"...
分类:
Web程序 时间:
2015-08-08 22:51:27
阅读次数:
145
题目Given a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5","7"].分析 题目的....
分类:
其他好文 时间:
2015-08-08 22:44:37
阅读次数:
186
function viewWidth(){ return window.innerWidth || document.documentElement.clientWidth;}function viewHeight(){ return window.innerHeight || docu...
分类:
其他好文 时间:
2015-08-08 22:41:40
阅读次数:
192
Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1sum2)return 1;16 else if(sum1<sum2)return -1;17 ...
分类:
其他好文 时间:
2015-08-08 22:36:56
阅读次数:
104
Given two strings s and t, write a function to determine if t is an anagram of s.
For example,
s = "anagram", t = "nagaram", return true.
s = "rat", t = "car", return false.
Note:
You may a...
分类:
其他好文 时间:
2015-08-08 21:21:56
阅读次数:
140
Given an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptnums[i].Solv...
分类:
其他好文 时间:
2015-08-08 21:17:51
阅读次数:
128
如果要定义的函数很简单,一个return语句就能搞定,可以使用lambda表达式来定义, lambda表达式的语法如下:lambda parameters: expression lambda表达式并不包含return语句,凡是使用函数作为参数或返回值的地方,都可以使用lambda表达式,l...
分类:
编程语言 时间:
2015-08-08 21:12:57
阅读次数:
155
数据结构之折半查找#includeint Binary_Search(int *a,int n,int key){ int low,mid,high; low = 1; high = n; while(lowa[mid]) low=mid+1; else return mid; } return 0...
分类:
其他好文 时间:
2015-08-08 19:46:47
阅读次数:
166
import osimport sysimport string#在一个特定的模式打开指定的文件,获取文件句柄def getFileIns(filePath,model): print("打开文件") print(filePath) print(model) return o...
分类:
编程语言 时间:
2015-08-08 19:41:57
阅读次数:
170
题目Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removing the second node from the end, the linked list...
分类:
其他好文 时间:
2015-08-08 18:23:31
阅读次数:
89