一、文档化函数 可以通过给出一个doc string文档化一个Python函数: def hello(): """hello func""" print("hello") 三重引号表示一个多行字符串,在开始与结束引号间的任何东西都被视为单个字符串的一部分,包括...
分类:
编程语言 时间:
2015-09-28 11:51:19
阅读次数:
212
只想简单地比较一下文本之间是否有变化,就可以函数defflib.context_diff来实现。例子:#python3.4.3
import difflib
text1 = ''' 1. Beautiful is better than ugly.
2. Explicit is better than implicit.
3. Simple is better than comp...
分类:
其他好文 时间:
2015-09-28 11:50:39
阅读次数:
433
1.网站测试版本,需要备份本地数据,导入到服务器上。在服务器上创建了表空间和若干个用户。现在删除无用的用户(1)查询出来所有的用户和对应的表空间:select username,default_tablespace from dba_users(2)删除某一个用户:drop user scsc081...
分类:
数据库 时间:
2015-09-28 11:44:14
阅读次数:
201
1.select distinct(DATE_FORMAT(updatetime,'%Y-%m')) as updatetime from barcode where pid!=0 order by updatetimedistinct()作用:重复的值中只选出一个date_format()作用:规...
分类:
数据库 时间:
2015-09-28 11:42:53
阅读次数:
201
2015.9.7a=[11,22,24,29,30,32]1)把28插入a列表的末端a=[11,22,24,29,30,32]a.append(28)2)在29后面插入57a.insert(4,57)3)将a列表元素从小到大排序a.sort()4)将a列表第一个元素改成6a[0]=65)删除元素32...
分类:
编程语言 时间:
2015-09-28 00:14:00
阅读次数:
254
1.先下载Python安装Next->安装完成2.以前安装过VS2013打开VS2013文件->新建项目(此时如果没有Python Application,请点击里面的安装插件)完成后选择工具->选项等待一会前后没要10分钟,就可以把VS2013作为Python的IDE了。开始刚下载Python下来...
分类:
编程语言 时间:
2015-09-28 00:09:29
阅读次数:
161
IntroductionThis guide is intended to provide you with simple instructions on how to install Nagios from source (code) on Fedora and have it monitorin...
分类:
移动开发 时间:
2015-09-27 22:46:54
阅读次数:
384
配置过程来自:http://docs.opencv.org/master/d5/de5/tutorial_py_setup_in_windows.html在Windows10-64位系统下配置,步骤如下:1.安装Python packages a. python 2.7.5 http:...
分类:
编程语言 时间:
2015-09-27 22:41:42
阅读次数:
328
1. 需要从oracle网站下载一下两个包instantclient-basic-linux.x64-11.2.0.4.0.zipinstantclient-sdk-linux.x64-11.2.0.4.0.zip2. 下载后解压到某目录下,如:/oracle3. 根据解压后的BUILD.txt 步...
分类:
数据库 时间:
2015-09-27 21:33:15
阅读次数:
450
python中数据结构,主要有列表、元组、字典、集合。python中最基本数据结构是序列(sequence)。序列中每个元素被分配一个序号——即元素位置,也成为索引。第一个索引是0,第二个是1,以此类推。python包含6种内建序列,其他内建序列类型有字符串、unicode字符串、buffer对象和...
分类:
编程语言 时间:
2015-09-27 21:28:35
阅读次数:
197