会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
arrowxiang
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2018年5月6日
mysql的备份方法
摘要: 冷备: 需要停止当前正在运行mysqld,然后直接拷贝或打包数据文件 热备(逻辑备份): mysqld必须是运行着,不需要停掉mysql服务,但需要锁表): 逻辑备份=表结构+数据(插入) 每天4点做热备 增量备份: binlog --记录着mysql服务器增删改的操作记录. mysqlbinlog
阅读全文
posted @ 2018-05-06 17:23 盈波秋水泛清涛
阅读(272)
评论(0)
推荐(0)
2018年5月5日
python gevent并发socket
摘要: import queue import gevent from gevent import monkey; monkey.patch_socket()#猴子补丁代替python原有的socket selector = selectors.DefaultSelector() socket_server = socket.socket() address_server = ('0.0.0.0',8...
阅读全文
posted @ 2018-05-05 01:47 盈波秋水泛清涛
阅读(898)
评论(0)
推荐(0)
python 多线程队列套接字
摘要: #server端import socket import selectors import threading from threading import Thread import time import queue selector = selectors.DefaultSelector() socket_server = socket.socket() address_server = ...
阅读全文
posted @ 2018-05-05 00:21 盈波秋水泛清涛
阅读(193)
评论(0)
推荐(0)
2018年5月4日
python 并发socket
摘要: import socket import selectors import threading import time selector = selectors.DefaultSelector() socket_server = socket.socket() address_server = ('0.0.0.0',8080) socket_server.bind(address_server...
阅读全文
posted @ 2018-05-04 11:47 盈波秋水泛清涛
阅读(160)
评论(0)
推荐(0)
2018年5月2日
python 多线程
摘要: import threadingimport timefrom threading import Lockclass Mythread(threading.Thread):#继承与重写多线程 def __init__(self,num): threading.Thread.__init__(self
阅读全文
posted @ 2018-05-02 12:43 盈波秋水泛清涛
阅读(148)
评论(0)
推荐(0)
python回调函数
摘要: class Test(object): def __init__(self,a): self.a = a def func1(self): #调用回调函数 return self.func2(self.a,self.calls) def func2(self,aa,func): #执行回调函数 return func...
阅读全文
posted @ 2018-05-02 11:50 盈波秋水泛清涛
阅读(125)
评论(0)
推荐(0)
2018年4月29日
python生成器
摘要: def a(): for i in range(10): yield i# # print(a().__next__())# for i in a():# print(i)def b(): for i in range(10): # print(i) c = yield i print(i) # p
阅读全文
posted @ 2018-04-29 23:47 盈波秋水泛清涛
阅读(129)
评论(0)
推荐(0)
python装饰器
摘要: 带参数装饰器和不带参数装饰器
阅读全文
posted @ 2018-04-29 22:33 盈波秋水泛清涛
阅读(132)
评论(0)
推荐(0)
python对象的深复制与浅复制
摘要: 以下操作会会出现浅拷贝的情况 使用切片[:]操作 使用工厂函数(如list/dir/set) 使用copy模块中的copy()函数 对于对象中的元素,浅拷贝就只会使用原始元素的引用(内存地址) 对于对象中的元素,深拷贝都会重新生成一份(有特殊情况,下面会说明),而不是简单对原始元素的内存地址的引用
阅读全文
posted @ 2018-04-29 21:42 盈波秋水泛清涛
阅读(231)
评论(0)
推荐(0)
python对象的创建和实例的生成次数
摘要: pyhton用__new__来创建对象(__new__相当于Java中的构建函数), 对象创建好之后会立即调用__init__方法来初始化对象,__init__方法有个参数self就是刚才__new__创建好的那个对象。通过我们有__init__方法中给对象的属性进行赋值,或者动态线对象添加属性并赋
阅读全文
posted @ 2018-04-29 21:06 盈波秋水泛清涛
阅读(1180)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告