python 集成了 sqlite3 ,其接口很简单:import sqlite3db_connection = sqlite3.connect(db_filename)db_cursor = db_connection.cursor()db_cursor.execute('select * fro...
分类:
数据库 时间:
2014-07-02 17:46:35
阅读次数:
306
#!/usr/bin/env python#coding=utf-8import traceback try: 1/0except Exception, e: print e print traceback.format_exc()
分类:
编程语言 时间:
2014-07-02 17:34:59
阅读次数:
266
a=Nonefor i in a: print('zheli de i shi %d' % i)报错:TypeError: 'NoneType' object is not iterable除非你提供你自己的return语句,每个函数都在结尾暗含有return None语句。关于DocStri...
分类:
编程语言 时间:
2014-07-02 17:31:36
阅读次数:
189
1、编译库https://bitbucket.org/multicoreware/x265/src/tip/build/README.txt?at=default2、x265 Documentation :http://x265.readthedocs.org/en/default/
分类:
其他好文 时间:
2014-07-02 17:28:28
阅读次数:
158
介绍一些关于Gvim(windows 7系统 Vim 7.4)的基本配置,除了特别说明,代码一律添加在安装目录下的_vimrc文件中。1、取消自动备份:set nobackup2、F4一键添加作者信息:map :call TitleDet()'sfunction AddTitle() c...
分类:
其他好文 时间:
2014-07-02 17:12:17
阅读次数:
214
http://networkx.github.io/documentation/networkx-1.9/install.html1. 安装setuptoolswget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python2. 安装netw...
分类:
Web程序 时间:
2014-07-02 17:10:16
阅读次数:
337
从别处找来的方法,做记录。在全局vim配置文件中(/etc/vimrc)或个人vim配置文件中($HOME/vimrc)加入如下代码即可将自动缩进改为4空格:autocmd FileType python setlocal et sta sw=4 sts=4其中相关变量含义:变量名 缩写 含义(no...
分类:
编程语言 时间:
2014-07-02 17:08:59
阅读次数:
245
#!/usr/bin/pythonimportMySQLdbdefnew_mail_mysql(ak):printakconn=MySQLdb.connect(host=‘m3306.sae.sina.com.cn‘,user=‘sae_ol‘,passwd=‘7b149edb22ae7526‘,db=‘sae‘,port=3306)cur=conn.cursor()sql="selectnamefromappwhereaccesskey=‘%s‘"%akcur.execute(sql)app_name=cu..
分类:
数据库 时间:
2014-07-02 16:14:12
阅读次数:
285
今天用Python写了一段小代码,实现的功能是ping某一个网段的所有ip,然后将ping的结果提取出来,输出可以ping通的ip以及往返时间。初学Python,写得简陋,各位大侠多多指教。正则表达式请根据自己的系统进行调整,我这个是中文win7下的结果Python3.3下测试没问题ping测试的过程..
分类:
编程语言 时间:
2014-07-02 15:45:33
阅读次数:
201
repo init -u https://android.googlesource.com/platform/manifest -b l-preview
repo sync -j16
如果有以前同步的aosp源码, 则只需要在源码目录下, repo init -b l-preview 然后repo sync -j16 即可
另外Android源码的git地址是:
git...
分类:
移动开发 时间:
2014-07-02 15:28:38
阅读次数:
195