这个模块提供了一系列的函数操作。比如,operator.add(x,y)等于x+ya=[1,2,3]b=[5,6,7]c=map(operator.mul,a,b)c的值就为[5,12,21]abs(...)abs(a)--Sameasabs(a).add(...)add(a,b)--Sameasa+b.and_(...)and_(a,b)--Sameasa&b.concat(...)concat(a,b)--Sameasa+b,foraandbseq..
分类:
编程语言 时间:
2014-09-10 19:48:01
阅读次数:
310
print all unique solution to split number n, given choice of 1 3 5 10for example if n is 4{1, 1, 1, 1}{1, 3}思路:用DFS肯定可以求解,但需要遍历所有可能,进行剪纸之后用递推实现。主要剪枝思想...
分类:
其他好文 时间:
2014-09-10 19:27:20
阅读次数:
144
验证码类的代码:ValidationCodewidth=$width; $this->height=$height; $this->codeNum=$codeNum; $this->checkCode=$this->createCheckCode(); $number=floor($...
分类:
Web程序 时间:
2014-09-10 15:47:40
阅读次数:
235
NaN&INF定义
在一些情况会出现无效的浮点数,例如除0,例如负数求平方根等,像这类情况,获取到的浮点数的值是无效的。
NaN 即 Not a Number 非数字
INF 即 Infinite 无穷大...
分类:
其他好文 时间:
2014-09-10 14:17:40
阅读次数:
908
Usage: vmstat [options] [delay [count]]Options: -a, --active active/inactive memory -f, --forks number of forks since boot -m, --...
分类:
其他好文 时间:
2014-09-10 14:02:10
阅读次数:
206
1functionconvertCurrency(currencyDigits){2//Constants:3varMAXIMUM_NUMBER=99999999999.99;4//Predefinetheradixcharactersandcurrencysymbolsforoutput:5/*6...
分类:
Web程序 时间:
2014-09-10 13:54:10
阅读次数:
265
Fire Station
Time Limit: 5000MS
Memory Limit: 65536K
Total Submissions: 3783
Accepted: 1337
Description
A city is served by a number of fire stations. Some resident...
分类:
其他好文 时间:
2014-09-10 12:31:20
阅读次数:
244
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.对每个点,考察其他点与它组成的直线斜率,使用HashMap将斜率与点个数对应起来。需要注意的一点是特殊斜率...
分类:
编程语言 时间:
2014-09-10 12:25:00
阅读次数:
174
字元功能說明\number代表除了換行字元以外的所有字元。\d代表字串位於開頭。\D代表字串位於結尾。\s代表空格字元,即r'[ \t\n\r\f\v]'。\S代表非空格字元,即r'[^ \t\n\r\f\v]'。\w代表英數字,即[0-9a-zA-Z]。\W代表\w定義以外的所有字元。reg中的s...
分类:
编程语言 时间:
2014-09-10 12:06:20
阅读次数:
286
android_server_BluetoothService.cpp在该文件修改如下函数的如下参数
bool btmtk_gap_discovery(native_data_t *nat, btbm_discovery_type mode)
{
...
req_p->inquiry_number = 25; // the number can be modify less t...
分类:
移动开发 时间:
2014-09-10 10:55:07
阅读次数:
300