08 2017 档案

摘要:饿汉实现: 懒汉实现: 参考: https://www.cnblogs.com/TenosDoIt/p/3639395.html 阅读全文
posted @ 2017-08-28 17:21 cicero 阅读(353) 评论(0) 推荐(0) 编辑
摘要:server: client: 阅读全文
posted @ 2017-08-14 09:55 cicero 阅读(272) 评论(0) 推荐(0) 编辑
摘要:1 #!/usr/bin/python 2 # -*- coding: UTF-8 -*- 3 4 import thread 5 import time 6 7 8 # 为线程定义一个函数 9 def print_time(threadName, delay): 10 count = 0 11 while count < 5: 12 ti... 阅读全文
posted @ 2017-08-14 09:53 cicero 阅读(155) 评论(0) 推荐(0) 编辑
摘要:1 #!/usr/bin/python 2 3 import urllib2 4 import time 5 import logging 6 import threading 7 8 succCount = 0 9 failCount = 0 10 IP = '127.0.0.1' 11 port = '9997' 12 postUrl = "http://%s:%s/"... 阅读全文
posted @ 2017-08-14 09:50 cicero 阅读(169) 评论(0) 推荐(0) 编辑
摘要:1.默认情况下,logging将日志打印到屏幕,日志级别为WARNING;日志级别大小关系为:CRITICAL > ERROR > WARNING > INFO > DEBUG > NOTSET,当然也可以自己定义日志级别。 2.通过logging.basicConfig函数对日志的输出格式及方式做 阅读全文
posted @ 2017-08-11 15:56 cicero 阅读(135) 评论(0) 推荐(0) 编辑
摘要:1.urllib2可以接受一个Request对象,并以此可以来设置一个URL的headers,但是urllib只接收一个URL。 2.urllib模块可以提供进行urlencode的方法,该方法用于GET查询字符串的生成,urllib2的不具有这样的功能。 1) urllib2.urlopen(ur 阅读全文
posted @ 2017-08-11 10:08 cicero 阅读(270) 评论(0) 推荐(0) 编辑
摘要:sftp-- help 可用命令: cd 路径 更改远程目录到“路径” lcd 路径 更改本地目录到“路径” chgrp group path 将文件“path”的组更改为“group” chmod mode path 将文件“path”的权限更改为“mode” chown owner path 将 阅读全文
posted @ 2017-08-08 18:05 cicero 阅读(1283) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-08-07 10:28 cicero 阅读(242) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示