码迷,mamicode.com
首页 >  
搜索关键字:python module    ( 144473个结果)
Permutations【python】
class Solution: # @param num, a list of integer # @return a list of lists of integers def permute(self, num): length=len(num) i...
分类:编程语言   时间:2014-08-27 20:11:28    阅读次数:200
python函数zip
zip函数可接受任意序列为参数,返回一个以tuple为元素的列表:>>>a=[1,2,3] >>>b=[4,5,6] >>>zip(a,b) [(1,4),(2,5),(3,6)] >>>当两个序列元素个数不一致时,以较少的为准:>>>a [1,2,3] >>>c [7,8,9,10] >>>z..
分类:编程语言   时间:2014-08-27 19:00:38    阅读次数:198
python函数map
map(function,iterable,...)Applyfunctiontoeveryitemofiterableandreturnalistoftheresults.Ifadditionaliterableargumentsarepassed,functionmusttakethatmanyargumentsandisappliedtotheitemsfromalliterablesinparallel.Ifoneiterableisshorterthananotheritisassumedtobee..
分类:编程语言   时间:2014-08-27 18:56:28    阅读次数:219
[OpenStack] Nova中的线程模型
1) greenlet - python中的协程库 1.1) 什么是协程 (Coroutine) Coroutine Wiki http://en.wikipedia.org/wiki/Coroutine CoRoutine是在Thread基础上的再次切分. 每一个Process可以包含多个Thread, 每个线程包含多个CoRoutine在任何时刻, 同一个Threa...
分类:编程语言   时间:2014-08-27 18:51:38    阅读次数:266
linux(debian)系统django配远程连接sqlserver数据库
费了将近一天时间,终于解决,记下来留给需要的人 需要安装的: python-odbc : https://github.com/mkleehammer/pyodbc 下载后install django-pyodbc : https://pypi.python.org/pypi/django-pyodbc 下载后install unixODBC:http://www.unixodb...
分类:数据库   时间:2014-08-27 18:45:58    阅读次数:434
Python闭包及装饰器
Python闭包先看一个例子:def outer(x): def inner(y): return x+y return innderadd = outer(8)print add(6)我们定义了一个方法outer,方法内部又定义了一个方法inner,方法outer返回值为...
分类:编程语言   时间:2014-08-27 18:32:58    阅读次数:197
Python升级2.7后命令行退格键等乱码
升级查看:http://blog.csdn.net/jcjc918/article/details/11022345升级后在命令行下 删除 前进 后退 上键 等乱码解决:需要readline安装包1.yum search readline #搜索readline相关安装包2.yum -y insta...
分类:编程语言   时间:2014-08-27 18:26:48    阅读次数:253
淘宝2015年秋招在线笔试题
1.按照CommonJS规范,在任何模块代码的作用域下内置了以下哪些变量? module context require exports2.以下关于application cache的说法,哪些是不正确的?· 对于目标页面而言,可以通过来启用application cache。· 对于启...
分类:其他好文   时间:2014-08-27 18:20:48    阅读次数:234
python-字符转换遇到的问题
1,异常: 'ascii' codec can't encode characters字符集的问题,在文件前加两句话:import sysreload(sys)sys.setdefaultencoding( "utf-8")2,unicode中的‘\xa0’字符在转换成gbk编码时会出现问题,gbk...
分类:编程语言   时间:2014-08-27 18:10:38    阅读次数:198
ndk如何将代码放在jni之外
LOCAL_PATH := $(call my-dir)SDK_PATH := ../../..include $(CLEAR_VARS)LOCAL_MODULE := libiconv_staticLOCAL_SRC_FILES := $(SDK_PATH)/base/3dparty/libico...
分类:其他好文   时间:2014-08-27 18:10:18    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!