var arr = [1,2,2,3,3,4,4,5,1];function getRepeat(
arr ){ var len = arr.length, map={}; for( var i = 0;i<len;i++ ){
if(!map[arr[i]]...
分类:
编程语言 时间:
2014-05-23 10:39:49
阅读次数:
285
http://www.ibm.com/developerworks/cn/opensource/os-cn-python-yield/清单 5. 使用
yield 的第四版 def fab(max): n, a, b = 0, 0, 1 while n >> for n in fab...
分类:
编程语言 时间:
2014-05-20 13:45:03
阅读次数:
319
一、javascipt的基本语法在基本语法方面与C语言等没有太大区别javascript的语法区别1、变量可以不进行数据类型的定义直接声明,其中用var声明的局部变量,不用var声明的是全局变量function
square(num){ total=num1*num2; return total;}...
分类:
编程语言 时间:
2014-05-20 13:17:43
阅读次数:
287
#include #include //function: charTowchar
//purpose:char to WCHAR 、wchar_t、LPWSTR etc void charTowchar(const char *chr,
wchar_t *wchar, int size) { .....
分类:
其他好文 时间:
2014-05-20 11:37:00
阅读次数:
326
关于php面向对象的基本代码: 1 name = $name;12 $this->pwd
= $pwd;13 $this->age = $age;14 }15 16 public function intro(){17 18 echo ...
分类:
Web程序 时间:
2014-05-20 11:34:15
阅读次数:
303
戳我去解题Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identic...
分类:
其他好文 时间:
2014-05-20 10:09:37
阅读次数:
201
在官网下载Django,这里选取Django1.6.5;进入下载路径,以我的路径为例:cd/home/user/download;解压第一步下载的压缩包:tar
-xzvf Django-1.6.5.tar.gz;进入文件夹Django-1.6.5,执行setup.py安装文件:python set...
分类:
其他好文 时间:
2014-05-20 09:24:43
阅读次数:
246
add by zhj:
其实作者是想说用Python来做那些Bash实现起来比较麻烦的部分,即将Bash与Python结合使用。英文原文:http://www.linuxjournal.com/content/python-scripts-replacement-bash-utility-scrip...
分类:
编程语言 时间:
2014-05-20 08:53:25
阅读次数:
735
参考:1.
使用Python进行线程编程:http://www.ibm.com/developerworks/cn/aix/library/au-threadingpython/2.
Python:使用threading模块实现多线程编程:http://blog.csdn.net/bravezhe/...
分类:
编程语言 时间:
2014-05-20 08:13:57
阅读次数:
445
http://www.cnblogs.com/cython/articles/2169009.htmlitertools模块包含创建有效迭代器的函数,可以用各种方式对数据进行循环操作,此模块中的所有函数返回的迭代器都可以与for循环语句以及其他包含迭代器(如生成器和生成器表达式)的函数联合使用。ch...
分类:
编程语言 时间:
2014-05-20 07:54:59
阅读次数:
655