c++ 中的template和c#的什么有点相似?先看下定义方式:template T
myFunction(T param1,T param2...){ T result= param1; // do something return
result; ...
分类:
编程语言 时间:
2014-05-14 03:05:27
阅读次数:
332
作者:X
Wang出处:http://www.programcreek.com/2013/09/top-10-methods-for-java-arrays/转载文章,转载请注明作者和出处The
following are top 10 methods for Java Array. They ar...
分类:
编程语言 时间:
2014-05-12 22:07:28
阅读次数:
530
原题地址:http://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/题意:Given
a binary tree, return thebottom-up level ordertraversal of its node...
分类:
编程语言 时间:
2014-05-12 22:03:27
阅读次数:
581
原题地址:http://oj.leetcode.com/problems/binary-tree-zigzag-level-order-traversal/题意:Given
a binary tree, return thezigzag level ordertraversal of its nod...
分类:
编程语言 时间:
2014-05-12 22:02:26
阅读次数:
480
原题地址:http://oj.leetcode.com/problems/convert-sorted-array-to-binary-search-tree/题意:将一个排序好的数组转换为一颗二叉查找树,这颗二叉查找树要求是平衡的。解题思路:由于要求二叉查找树是平衡的。所以我们可以选在数组的中间那...
分类:
编程语言 时间:
2014-05-12 21:44:57
阅读次数:
379
目录instanceofconstructor构造函数名字鸭式辨型三种检测对象的类方式:
instanceof、constructor 、构造函数名字用法如下:1)instanceofconsole.log([1,2,3] instanceof
Array);trueconsole.log([1,2...
分类:
Web程序 时间:
2014-05-12 20:46:39
阅读次数:
426
该运动框架可以用于改变宽度、高度、字体大小、透明度、Left、top等值先上一个获取真正样式的函数//定义getStyle函数,获取真正样式function
getStyle(obj,attr){ if(obj.currentStyle){//兼容IE return obj.cu...
分类:
其他好文 时间:
2014-05-12 20:17:59
阅读次数:
357
Spiral MatrixGiven a matrix ofmxnelements
(mrows,ncolumns), return all elements of the matrix in spiral order.For
example,Given the following matrix:[...
分类:
其他好文 时间:
2014-05-12 20:04:43
阅读次数:
268
Given an integern, generate a square matrix
filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should
return the following matri...
分类:
其他好文 时间:
2014-05-12 19:53:23
阅读次数:
332
如何防止回车(enter)键提交表单,其实很简单,就一句话。onkeydown="if(event.keyCode==13)return
false;"把这句写在from标签里面就好了。如果在页面中按Enter键会自动提交的话,可以设置返回值防止自动提交如返回值必须是false function
g...
分类:
Web程序 时间:
2014-05-12 19:51:18
阅读次数:
511