1.文本框回车时间 function clickButton(){ if ( event.keyCode == 13 ) { document.all ( 'ibtnUpdate' ).click(); return false; }} functi...
分类:
Web程序 时间:
2015-06-14 13:38:46
阅读次数:
159
有时候我们看到的方法中有很多组的参数,可能会让大家觉得疑惑,其实是因为这个方法使用了柯里化。Swift里可以对方法进行柯里化,也就说有多个参数的方法可以接受第一个参数,然后变成一个接受余下参数并且返回结果的新方法,举个例子:
func twoTemp(a:Int)(b:Int) -> Int{
return a + b
}
这个方法有两组参数,可以只传第一个参数:
let oneTemp =...
分类:
编程语言 时间:
2015-06-14 12:30:13
阅读次数:
139
#include #include int cmp(const void *a,const void *b){ return (*(int *)a-*(int *)b);}int main(){ int n,arr[10001],i; scanf("%d",&n); for(...
分类:
其他好文 时间:
2015-06-14 12:23:37
阅读次数:
128
Description: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]...
分类:
其他好文 时间:
2015-06-14 10:50:59
阅读次数:
111
每一个引用类型的实例中,都有一个指针,指向其原型对象。这个指针在非IE浏览器里通过__proto__表示,而在IE里不提供。看如下代码:obj = {};obj.__proto__.toString = function() { return "__proto__"; }var ceshi ...
分类:
其他好文 时间:
2015-06-14 10:50:03
阅读次数:
135
Description:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the l...
分类:
其他好文 时间:
2015-06-14 10:44:51
阅读次数:
120
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2015-06-14 09:37:20
阅读次数:
103
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,
Given[3,2,1,5,6,4]and k = 2, return 5.Note:...
分类:
其他好文 时间:
2015-06-14 09:34:25
阅读次数:
120
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. Y...
分类:
其他好文 时间:
2015-06-14 09:32:09
阅读次数:
144
Description:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It...
分类:
其他好文 时间:
2015-06-14 09:21:24
阅读次数:
148