The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:
其他好文 时间:
2014-06-25 22:07:58
阅读次数:
330
SQL Server 2005引入的新方法。1 SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER BY keyField DESC) AS rowNum, * FROM tableName) AS t WHERE rowNum > start[比如:90] ...
分类:
数据库 时间:
2014-06-25 21:17:08
阅读次数:
256
typeof(1): numbertypeof(NaN): numbertypeof(Number.MIN_VALUE): numbertypeof(Infinity): numbertypeof("123"): stringtypeof(true): booleantypeof(window): ...
分类:
编程语言 时间:
2014-06-25 20:57:22
阅读次数:
295
UVA 10539 - Almost Prime Numbers
题目链接
题意:给定一个区间,求这个区间中的Almost prime number,Almost prime number的定义为:只能整除一个素数。
思路:既然是只能整除一个素数,那么这些数肯定为素数的x次方(x > 1),那么只要先打出素数表,然后在素数表上暴力找一遍就可以了,因为素数表只要找到sqrt(Max...
分类:
其他好文 时间:
2014-06-25 20:10:16
阅读次数:
181
题目
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching sh...
分类:
其他好文 时间:
2014-06-25 19:56:35
阅读次数:
275
Peterson's algorithm (AKA Peterson's solution) is a concurrent
programming algorithm for mutual
exclusion that allows two processes to share a single-use resource without conflict, using only shar...
分类:
编程语言 时间:
2014-06-25 19:38:19
阅读次数:
748
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using e...
分类:
其他好文 时间:
2014-06-24 23:30:08
阅读次数:
278
/*API-141*/Raphael.pathIntersection(path1, path2)获取两条线的交点参数列表:path1 字符串类型 路径的字符串表达形式path2 字符串类型 路径的字符串表达形式返回值:交点集合,格式如下:[{ x: //number类型 点的x坐标 y: //nu...
原来写的一个分页查询,回调了好几层。exports.list = function(req,res) { var params = {}; var current_page = common_util.get_param_value(req,'current_page','Number'...
分类:
Web程序 时间:
2014-06-24 12:41:15
阅读次数:
353
我们来看Interfaces ofport: OpenFlow port number for this interface. type: system: An ordinary network device, e.g. eth0 on Linux. internal: A simulated ne...
分类:
其他好文 时间:
2014-06-24 12:23:51
阅读次数:
316