t=open("worker.log","a") t.write("aaaaa") t.flush() 如果正在写的worker.log被删掉了,那么python再写也不会报错,只是原文件句柄没有了,不会再写入新建的同名字的worker.log了 所以如果多进程操作文件的话,...
分类:
编程语言 时间:
2015-06-22 06:31:55
阅读次数:
128
刚用vagrant这东西,所以lnmp环境是必装。。开通外部访问权限:GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '111111' WITH GRANT OPTION;flush privileges;进行到这的时候本以为大功告成。但是...
分类:
数据库 时间:
2015-06-18 11:05:47
阅读次数:
155
createtableyw(idintunsignednotnullauto_increment,c1intnotnulldefault‘0‘,c2intnotnulldefault‘0‘,primarykey(id));创建一个存储过程callinsert_yw往表中插入数据插入时设置两个参数,提高插入性能innodb_flush_log_at_trx_commit=0sync_binlog=0callinsert_yw(4500000);sel..
分类:
其他好文 时间:
2015-06-17 18:34:49
阅读次数:
301
MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法环境:linux,mysql5.5.21错误:Host is blocked because of m...
分类:
数据库 时间:
2015-06-16 12:32:18
阅读次数:
123
在java API1.6对flush()方法的介绍如下:方法摘要voidclose() 关闭此流,但要先刷新它。voidflush() 刷新该流的缓冲。voidnewLine() 写入一个行分隔符。voidwrite(char[]cbuf, intoff, intlen) 写入字符数组的某一部分。v...
分类:
其他好文 时间:
2015-06-15 16:15:16
阅读次数:
474
org.hibernate.Session接口beginTransaction 开启事务clear 清缓存close 关闭sessionconnection - 过时 获取Connection连接delete 删除一个对象flush 让session与数据库进行一次同步get ...
分类:
其他好文 时间:
2015-06-14 21:14:10
阅读次数:
96
hibernate+mysql时,会出现事物不管用(transation.rollback();没效果,数据在session.flush后直接进行了数据库操作)很可能出现的问题是在mysql上。。。,在/etc/my.cnf中[mysqld]下加上default-storage-engine=InnoDB,效果是使用InnoDB引擎showengines;命令可以查看当前使用..
分类:
数据库 时间:
2015-06-12 22:23:14
阅读次数:
124
FileOutputStream 继承 OutputStream 并不提供flush方法的重写 所以无论内容多少write都会将二进制流直接传递给底层操作系统 flush无效果而Buffered系列的输入输出流函数单从Buffered这个单词就可以看出他们是使用缓冲区的应用程序每次IO都要和设备进行...
分类:
其他好文 时间:
2015-06-12 19:04:09
阅读次数:
135
php ob_start 与 ob_end_flush() 是 php 的缓冲输出函数。ob_start([string output_callback])- 打开输出缓冲区,所有的输出信息不在直接发送到浏览器,而是保存在输出缓冲区里面,可选得回调函数用于处理输出结果信息。ob_end_flush ...
分类:
Web程序 时间:
2015-06-12 16:57:18
阅读次数:
133
枚举法:#include #include #include #include #include #include typedef long long ll;using namespace std;const int MAXN=100005;bool has[52];int f(int start)...
分类:
其他好文 时间:
2015-06-11 21:12:10
阅读次数:
157