博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 5 6 7 8 9 10 下一页

2018年5月17日

摘要: 修改apache http/https 端口号 修改apache http/https 端口号 修改apache http/https 端口号 1、修改http的端口 打开$HTTPD_HOME/conf/httpd.conf文件,找到Listen,后面紧跟的是端口号,默认是80,把它修改为你想设置 阅读全文

posted @ 2018-05-17 20:54 alex_hrg 阅读(18556) 评论(0) 推荐(0)

2018年5月10日

摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- # author aliex-hrg import threading,time event = threading.Event() def redlight(): event.set() count = 1 while True: if count > 0 ... 阅读全文

posted @ 2018-05-10 15:06 alex_hrg 阅读(161) 评论(0) 推荐(0)

2018年5月9日

摘要: 同时可以执行的线程数,信号量常用于类似php,ssh等的线程池 阅读全文

posted @ 2018-05-09 22:36 alex_hrg 阅读(461) 评论(0) 推荐(0)

摘要: import threading,time #直接函数方式 # def run1(n): # print(n) # time.sleep(2) # t1 = threading.Thread(target=run1,args=("t1",)) # t1.start() # t2 = threading.Thread(target=run1,args=("t2",)) # t2.... 阅读全文

posted @ 2018-05-09 11:31 alex_hrg 阅读(153) 评论(0) 推荐(0)

摘要: 简单ssh登录 简单sftp登录 密钥方式SFTP 阅读全文

posted @ 2018-05-09 10:53 alex_hrg 阅读(1435) 评论(0) 推荐(0)

摘要: 安装python2.7 和 3.6不冲突直接安装就行 安装pip 访问https://pip.pypa.io/en/stable/installing/获取地址 安装模块 阅读全文

posted @ 2018-05-09 10:48 alex_hrg 阅读(985) 评论(0) 推荐(0)

2018年5月4日

摘要: 一个典型的TCPServer的建立 #ThreadingTCPServer从ThreadingMixIn和TCPServer继承 #class ThreadingTCPServer(ThreadingMixIn, TCPServer): pass server = ThreadingTCPServe 阅读全文

posted @ 2018-05-04 20:25 alex_hrg 阅读(1369) 评论(0) 推荐(0)

2018年5月2日

摘要: 类型一定转换成一样,比如 float 与 int 比较都会出错,坑了我一个小时 阅读全文

posted @ 2018-05-02 21:39 alex_hrg 阅读(800) 评论(0) 推荐(0)

2018年4月27日

摘要: sever side: import socketserver class MyTCPHandler(socketserver.BaseRequestHandler): def handle(self): '''try内的代码就是要实现的功能,目前是实现小写转大写,可以自定义, try是在客户端结束 阅读全文

posted @ 2018-04-27 09:55 alex_hrg 阅读(2118) 评论(0) 推荐(0)

2018年4月2日

摘要: 普通变量,如a=10,str="fdaf",它们在函数内的值是不会被带到函数外的,除非在函数内加上global,而引用是惰性原则,从最近的同名父级同名变量引用值 其它变量如列表,字典,集合他们在函数内的值是会被带到外面的 阅读全文

posted @ 2018-04-02 20:20 alex_hrg 阅读(185) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 下一页