简单、可复制、实践

摘要: On Mon, 5 Aug 1996, Peter P. Eiserloh wrote: We need to keep a clear the concept of threads. Too many people seem to confuse a thread with a process. 阅读全文
posted @ 2016-09-01 18:34 若水天涯 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 安装 以安装最新版本的tengine 2.1.2版本 "下载连接" 利用tengine的变量属性,可以做到分钟级别以及秒级别切割日志(使用tengine内置的功能) 配置如下 之后重启nginx 注意到一个情况,在没有日志写入的情况下(没有访问的情况下),不会自动生成新的日志文件 阅读全文
posted @ 2016-08-03 18:57 若水天涯 阅读(1872) 评论(0) 推荐(0) 编辑
摘要: Most of the tools do not actually read a single line in from a file at a time, rather they use a buffer in memory to store chunks of lines. The tools 阅读全文
posted @ 2016-08-02 15:37 若水天涯 阅读(585) 评论(0) 推荐(0) 编辑
摘要: 我们通过bc的ibase和obase方法来进行进制转换 ibase是输入数字的进制,而obase就是输出数字的进制 两种方式进行转化 1. 交互式的 ==注意:需要先设置obase== [root@dev rsyslog] bc bc 1.06.95 Copyright 1991 1994, 199 阅读全文
posted @ 2016-07-29 15:41 若水天涯 阅读(602) 评论(0) 推荐(0) 编辑
摘要: 二分法 arr = range(10000000) start = 0 end = len(arr) 1 res = 776575 count = 0 print arr.index(res) while True: count = count+1 mid = (start+end)/2 if ar 阅读全文
posted @ 2016-07-14 11:41 若水天涯 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: What is the difference between HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR? it is impossible to say. Different proxies may implement these, or may not. Th 阅读全文
posted @ 2016-07-14 09:31 若水天涯 阅读(224) 评论(0) 推荐(0) 编辑
摘要: nginx配置 版本 1.4.4 压力测试,使用webbench测试 Benchmarking: GET http://blog.miaojunrs.com/ 50 clients, running 1200 sec. Speed=94 pages/min, 62367 bytes/sec. Req 阅读全文
posted @ 2016-07-13 19:41 若水天涯 阅读(1219) 评论(0) 推荐(0) 编辑
摘要: 在修改了配置文件之后,启动nginx的时候发现,进程已经存在了,但是端口没有监听到。 查看错误日志,有如下错误信息 2015/10/22 21:39:06 [alert] 26434 0: unlink() “/alidata/server/nginx/logs/nginx.pid” failed 阅读全文
posted @ 2016-07-13 09:53 若水天涯 阅读(1604) 评论(0) 推荐(0) 编辑
摘要: 之前搭建的ghost博客比较坑,修改comment之后重启数据丢了,对node不熟悉,所以就切换回到wordpress了。 回滚快照之后发现数据库crash了,提示如下信息 2016 06 15 23:21:32 3344 [Note] InnoDB: Database was not shutdo 阅读全文
posted @ 2016-07-13 09:52 若水天涯 阅读(1750) 评论(0) 推荐(0) 编辑
摘要: 两个表可以简单地写为select a.*,b.* from a left join b on a.id =b.id;三个以上select a.*,b.* from a left join b on a.id=b.id left join c on a.id=b.id where具体的例子select... 阅读全文
posted @ 2015-08-29 22:48 若水天涯 阅读(467) 评论(0) 推荐(0) 编辑