.directive("contenteditable",?function(){
??return?{
????restrict:?"A",
????require:?"ngModel",
????link:?function(scope,?element,?attrs,?ngModel)?{
??????function?rea...
分类:
其他好文 时间:
2015-07-22 19:10:22
阅读次数:
114
递归版本的实现:
long long int Pow1(int x,unsigned int N)
{
if (N == 0)
{
return 1;
}
if (N & 0x01)
{
return Pow(x * x,N >> 1) * x;
}
else
return Pow(x * x,N >> 1);
}递归 的基准条件是:N==0 此时返回1(不调用自身...
分类:
其他好文 时间:
2015-07-22 19:05:37
阅读次数:
199
上一节讲异步原理的时候基本上把回掉函数也捎带讲了一些,这节主要举几个例子来具体化一下。在开始之前,首先要明白一件事,在javascript里函数可以作为参数进行传递,这里涉及到高阶函数的概念,大家可以自行google一下。传统的同步函数需要返回一个结果的话都是通过return语句实现,例如:func...
分类:
编程语言 时间:
2015-07-22 18:11:24
阅读次数:
191
1. oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键no 可用于Table2. 取消选取、防止复制3. onpaste="return false" 不准粘贴4. oncopy="return false;" oncut="retu....
分类:
编程语言 时间:
2015-07-22 18:10:16
阅读次数:
236
1:sortList nList= new List(); new List(sortStrings).ForEach(e => { nList.Add(int.Parse(e)); }); Item.Sort( (a, b) => { return nList.FindIndex(s => s =...
分类:
编程语言 时间:
2015-07-22 18:02:49
阅读次数:
110
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ...
分类:
其他好文 时间:
2015-07-22 18:00:14
阅读次数:
91
Given a set of distinct integers, nums, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
For ...
分类:
其他好文 时间:
2015-07-22 14:44:37
阅读次数:
146
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array nums = [1,1,1,2,2,3],
Your function should return length = 5, with the first fi...
分类:
编程语言 时间:
2015-07-22 14:44:00
阅读次数:
110
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]...
分类:
其他好文 时间:
2015-07-22 14:43:15
阅读次数:
81
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Given 1->1-...
分类:
编程语言 时间:
2015-07-22 14:42:16
阅读次数:
118