function createComparisonFunction(propertyName){ return function(object1,object2){ var value1 = object1[p...
分类:
编程语言 时间:
2015-06-24 15:50:33
阅读次数:
145
用途:校验ip地址的格式 输入:strIP:ip地址 返回:如果通过验证返回true,否则返回false; */ function?isIP(strIP)?{ if?(isNull(strIP))?return?false; var?re=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/g?//匹配...
分类:
Web程序 时间:
2015-06-24 13:09:12
阅读次数:
178
#26 Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for ...
分类:
其他好文 时间:
2015-06-24 12:59:55
阅读次数:
121
Problem:Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4...
分类:
其他好文 时间:
2015-06-24 12:52:00
阅读次数:
106
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键 no 可用于Table 2. 取消选取、防止复制 3. onpaste="return false" 不准粘贴 4. oncopy="return f...
分类:
编程语言 时间:
2015-06-24 12:42:44
阅读次数:
199
function showKeyPress(evt) { evt = (evt) ? evt : window.event return checkSpecificKey(evt.keyCode); } function checkSpecificKey(k...
分类:
Web程序 时间:
2015-06-24 12:40:30
阅读次数:
176
存储过程和存储函数MySQL的存储过程(stored procedure)和函数(stored function)统称为stored routines。1. MySQL存储过程和函数的区别函数只能通过return语句返回单个值或者表对象。而存储过程不允许执行return,但是通过out参数返回多个值...
分类:
数据库 时间:
2015-06-24 12:39:19
阅读次数:
225
非递归: public static int maxDepth(TreeNode root){ if(root==null) return 0; Queue q=new LinkedList(); q.offer(root); int enQu...
分类:
其他好文 时间:
2015-06-24 12:26:34
阅读次数:
98
安全的方法如下,别用Session s=getSession()........
/**
* 使用hql 语句进行操作
* @param hql HSQL 查询语句
* @param offset 开始取数据的下标
* @param length 读取数据记录数
* @return List 结果集
*/
public List getListForPage(fina...
分类:
Web程序 时间:
2015-06-24 11:06:09
阅读次数:
177
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-24 10:59:38
阅读次数:
112