摘要: import timeprint time.time() #返回纪元开始的秒数print time.ctime() # 正常的打印时间print time.clock() #clock()返回处理器时钟时间,它的返回值一般用于性能测试与基准测试。因此... 阅读全文
posted @ 2016-07-11 22:36 tyzZ001 阅读(136) 评论(0) 推荐(0) 编辑
摘要: import MySQLdb conn = MySQLdb.connect(host='127.0.0.1',user='root',passwd='19950801',db='rlp') #开门print conn #链接状态cur ... 阅读全文
posted @ 2016-07-11 20:59 tyzZ001 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 根据代码进行学习class Province: #定义了一个类 momo = '中国的23个省之一' # 字段 def __init__(self, name, city, leader, flag): # 构造器方法 self.N... 阅读全文
posted @ 2016-07-10 21:31 tyzZ001 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 哈哈哈 阅读全文
posted @ 2016-07-10 09:44 tyzZ001 阅读(114) 评论(0) 推荐(0) 编辑
摘要: python装饰器的使用def ty(func): #定义装饰器 def zty(): print 'hehehe' #装饰内容 func() ... 阅读全文
posted @ 2016-07-09 22:11 tyzZ001 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 生成六位验证码python代码import randomdef Verifi_code(): code = [] for i in range(6): if i == random.randint(1,5): code.append(... 阅读全文
posted @ 2016-07-09 22:06 tyzZ001 阅读(300) 评论(0) 推荐(0) 编辑
摘要: mysql> show variables like 'log_bin'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | log_bin | OFF | +-----... 阅读全文
posted @ 2016-07-08 21:47 tyzZ001 阅读(545) 评论(0) 推荐(0) 编辑
摘要: 安装了mysql5.7之后初始密码不再默认为空 1.查看初始密码: [root@VM_225_102_centos ~]# grep 'temporary password' /var/log/mysqld.log 2016-07-08T02:25:46.311098Z 1 [Note] A ... 阅读全文
posted @ 2016-07-08 10:44 tyzZ001 阅读(1414) 评论(0) 推荐(0) 编辑
摘要: 正在执行的程序 进程 进程管理的作用:(优先级) 判断服务器健康状态 查看系统中的所有进程 杀死进程 查看系统中的所有进程 ps aux [root@VM_225_102_centos ~]# ps aux USER PID %CPU %MEM VSZ RSS T... 阅读全文
posted @ 2016-07-07 21:18 tyzZ001 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 1.系统延迟任务发起命令 at [root@VM_225_102_centos mnt]# at 20:50 at> touch zty.txt at> #ctrl+D退出编辑。 job 1 at Wed Jul 6 20:50:00 2016 [root@VM_225_102_centos... 阅读全文
posted @ 2016-07-06 21:27 tyzZ001 阅读(208) 评论(0) 推荐(0) 编辑