上一页 1 2 3 4 5 6 7 ··· 38 下一页
摘要: data2.txt 文件内容:BgwBankConfigFacadeImpl.queryPayBankList 3BgwBankConfigFacadeImpl.queryCardBinInfo 3BgwBankConfigFacadeImpl.queryCardBinInfo 1BgwBankCo... 阅读全文
posted @ 2014-03-21 16:21 前行者2011 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #判断元素出现的次数、总和#coding:utf-8d=[('a', 2), ('a', 1), ('b', 2), ('b', 5), ('c', 1), ('d', 5)]def main(): r ={} for a,b in d: t =r.get(a,{}) ... 阅读全文
posted @ 2014-03-21 15:52 前行者2011 阅读(118) 评论(0) 推荐(0) 编辑
摘要: #coding:utf-8'''1.类属性 -- 定义在类后2.数据属性 -- 定义在__init__方法中3.使用类属性c统计当前的对象个数'''class Hum(object): #类属性c、sing c=0 sing="hello" def __init__(self... 阅读全文
posted @ 2014-03-19 16:22 前行者2011 阅读(84) 评论(0) 推荐(0) 编辑
摘要: CentOS 操作系统1.编写备份程序2.使用crontab命令,定时执行备份程序步骤一:编写备份文件bak.py:#coding:utf-8import osimport timesource=["/root/","a.py"]#目标目录targetdir="/root/backup/"#目标目录... 阅读全文
posted @ 2014-03-19 14:34 前行者2011 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Python 处理 Excel,可以使用 xlrd/xlwt 2个模块,使用简单特好上手。xlrd安装:sudo easy_install xlrd # windows 参考http://pypi.python.org/pypi/xlrd简单使用:import xlrddata = xlrd.ope... 阅读全文
posted @ 2014-03-17 12:06 前行者2011 阅读(108) 评论(0) 推荐(0) 编辑
摘要: py手册:http://docs.python.org/2/library/xml.etree.elementtree.htmlxml内容如下: 将userName的值Jane修改为SAM:#coding:utf-8import xml.etree.ElementTree ... 阅读全文
posted @ 2014-03-13 12:00 前行者2011 阅读(212) 评论(0) 推荐(0) 编辑
摘要: crontab -e 编辑查看任务是否在运行:tail -f /var/log/syslog出现类似的信息:Apr 26 21:17:01 example CRON[18055]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)... 阅读全文
posted @ 2014-03-13 11:45 前行者2011 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 查看當前用戶下的表:select * from tabselect * from catselect * from user_tables查看所有的表:select * from all_tablesselect * from dba_tables查看當前用戶下的表的列:select * from ... 阅读全文
posted @ 2014-03-11 14:26 前行者2011 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 输出包含共同元素的变量值#coding:utf-8def main(): a1=1 a2=2 a3=3 for i in xrange(1,4): print eval("a%d" % i) # 或:exec('print a%d' %i)if __name__ == '__main__': ma... 阅读全文
posted @ 2014-03-11 13:55 前行者2011 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 使用 cursor对象的description获取列名printcur.description'''.descriptionThisread-onlyattributeisasequenceof7-itemsequences.Eachofthesesequencescontainsinformati... 阅读全文
posted @ 2014-03-11 12:53 前行者2011 阅读(530) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 38 下一页