上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 56 下一页
摘要: 摘要: 函数指针作用一般有二:1 调用函数 2 作为参数。 需要注意的是typedef这种是定义了 一种函数指针的类型(特定的参数类型和返回值) 代码示例如下, int func1(int x){ return x; } int func2(int x){ cout<<"we ar... 阅读全文
posted @ 2014-01-22 11:06 唐僧吃肉 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 摘要:uwsgi执行顺序:启动master进程,执行python脚本的公共代码(import同一层)。然后生成worker进程,uwsgi.post_fork_hook=init_functions,初始化生成work子进程。然后请求来临时,每个子进程执行application代码 配置文... 阅读全文
posted @ 2014-01-21 17:59 唐僧吃肉 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 1 下载安装 2 编译的时候,需要添加头文件和链接对应的库 阅读全文
posted @ 2014-01-16 14:31 唐僧吃肉 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 使用VPN,每次都要在Terminal上重复输入命令: ssh -D port user@host 出来密码提示符后,把复杂的密码拷贝下来,然后粘贴到Terminal,敲回车... 终于忍受不了这样的重复了,于是用Shell写一个可以自动登录的脚本: Shell script代... 阅读全文
posted @ 2014-01-15 11:31 唐僧吃肉 阅读(738) 评论(0) 推荐(0) 编辑
摘要: 摘要: python中一切都可以看作类。那么如何查看每个类的API。使用ipython python protobuf 的函数在message中定义 此处所有的api说明:https://developers.google.com/protocol-buffers/docs/reference... 阅读全文
posted @ 2014-01-10 21:05 唐僧吃肉 阅读(2099) 评论(0) 推荐(0) 编辑
摘要: 启动 uwsgi -x etc/bfdds_cookiemapping_conf.xml --stats /tmp/stats.socket 查看 uwsgitop /tmp/stats.socket或者uwsgitop ip:port 阅读全文
posted @ 2014-01-10 17:08 唐僧吃肉 阅读(2556) 评论(0) 推荐(0) 编辑
摘要: [algo@localhost tmp]$ cat test 1 2 3 4 5 head得到头部2行,删掉尾部2行 [algo@localhost tmp]$ head -n +2 test 1 2 [algo@localhost tmp]$ head -n -2 test 1 2 ... 阅读全文
posted @ 2014-01-10 15:30 唐僧吃肉 阅读(1425) 评论(0) 推荐(0) 编辑
摘要: 要在linux下删除海量文件,比如有数十万个文件,此时常用的rm -rf * 就会等待时间很长。这时我们可以使用rsync快速删除大量文件。 1、建立一个空目录 mkdir -p /tmp/rsync_blank 2、确立需要清空的目标目录 /data/web/vip/htd... 阅读全文
posted @ 2014-01-10 11:14 唐僧吃肉 阅读(1407) 评论(0) 推荐(0) 编辑
摘要: 一、http_load 程序非常小,解压后也不到100K http_load以并行复用的方式运行,用以测试web服务器的吞吐量与负载。但是它不同于大多数压力测试工 具,它可以以一个单一的进程运行,一般不会把客户机搞死。还可以测试HTTPS类的网站请求。 下载地址:http://sof... 阅读全文
posted @ 2014-01-09 11:29 唐僧吃肉 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 一 conf.ini文件: [uwsgi] http = $(HOSTNAME):9033 http-keepalive = 1 pythonpath = ../ module = service master = 1 processes = 8 daemonize = logs/uwsgi... 阅读全文
posted @ 2014-01-07 13:36 唐僧吃肉 阅读(2372) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 56 下一页