岚天逸见

09 2015 档案

rapidjson常见使用示例
摘要:rapidjson相比jsoncpp性能高出太多,使用接口一样的简单的。官方中文帮助文档:http://rapidjson.org/zh-cn/。rapidjson的Move语意,请浏览http://rapidjson.org/zh-cn/md_doc_tutoria... 阅读全文

posted @ 2015-09-25 19:19 岚天逸见 阅读(8409) 评论(0) 推荐(0) 编辑

如何取得nginx做反向代理时的真实IP?
摘要:1. 编译对于client -> nginx reverse proxy -> apache,要想在程序中取得真实的IP,在执行nginx的configure时,必须指定参数“--with-http_realip_module”,示例:./configure --pr... 阅读全文

posted @ 2015-09-22 18:10 岚天逸见 阅读(444) 评论(0) 推荐(0) 编辑

程序员不常用Linux命令集
摘要:1) 关闭指定网卡,如关闭网卡eth0ifconfig eth0 down也可以使用ifdown,通常ifdown是一个指向ifup的软链接,而ifup为一个脚本文件。2) 命令自启动,如希望机器重启时自动关闭网卡eth0这个只需要在文件/etc/rc.d/rc.lo... 阅读全文

posted @ 2015-09-19 11:08 岚天逸见 阅读(177) 评论(0) 推荐(0) 编辑

再议GCC编译时的静态库依赖次顺问题
摘要:假设有如三个源代码文件:$ cat a.cppvoid a(){} $ cat b.cppextern void a();void b(){ a(); // 调用a.cpp中的a()} $ cat x.cppextern void b();int main(){... 阅读全文

posted @ 2015-09-18 15:49 岚天逸见 阅读(868) 评论(0) 推荐(0) 编辑

pthread_rwlock_rdlock和“No such file or directory”
摘要:pthread_rwlock_rdlock和“No such file or directory”调用pthread_rwlock_rdlock时,如果失败报错“pthread_rwlock_rdlock”,则可能是因为对同一把锁先加了写锁,再加读锁时就报这个错误了。... 阅读全文

posted @ 2015-09-15 17:38 岚天逸见 阅读(340) 评论(0) 推荐(0) 编辑

Thrift线程和状态机分析
摘要:目录目录 11. 工作线程和IO线程 12. TNonblockingServer::TConnection::transition() 23. RPC函数被调用过程 34. 管道和任务队列 45. 对象间关系 56. 相关代码摘要 6 1. 工作线程和IO线程启动T... 阅读全文

posted @ 2015-09-08 21:59 岚天逸见 阅读(782) 评论(0) 推荐(0) 编辑

Haodoop RPC解析
摘要:1. 前言 12. Hadoop RPC 12.1. 总体结构 12.1.1. RPC Interface 12.1.2. RPC Server 12.1.3. RPC Client 12.2. RPC Interface 22.2.1. getServer 22.2... 阅读全文

posted @ 2015-09-07 12:51 岚天逸见 阅读(158) 评论(0) 推荐(0) 编辑

Thrift结构分析及增加取客户端IP功能实现
摘要:目录目录 11. 前言 12. 示例Service 13. 网络部分类图 24. 线程模式 34.1. IO线程 34.2. 工作线程 44.2.1. 工作线程类图 44.2.2. 工作线程启动过程 55. 一个RPC函数被调用时序图 55.1. 启动准备 55.2.... 阅读全文

posted @ 2015-09-07 09:55 岚天逸见 阅读(1333) 评论(0) 推荐(0) 编辑

StarUML 5.0问题解决:Failed to open the model file. Invalid file format.
摘要:使用StarUML 5.0打开一个已有的文件时,如果遇到报“Failed to open the model file. Invalid file format.”错误,则原因可能是因为文件所在路径包含了中文,比如被打开的文件全路径为:D:\笔记\mooon.uml。... 阅读全文

posted @ 2015-09-07 09:49 岚天逸见 阅读(591) 评论(0) 推荐(0) 编辑

检测Linux系统是否支持某系统调用
摘要:随内核版本的变化,会增加一些新的系统调用,但如果glibc没有跟上,则不能直接调用,这个时候可以自己包装一下。如果想知道内核是否支持某系统调用,先得知道它的系统调用ID号,下面代码即是用来检查是否支持epoll_create1:// 文件名: x.cpp// 编译: ... 阅读全文

posted @ 2015-09-07 09:48 岚天逸见 阅读(392) 评论(0) 推荐(0) 编辑

eclipse的thrift插件
摘要:插件网址为:http://thrift4eclipse.sourceforge.net/en/install.html,经测试对Eclipse 4.4.2也有效:Eclipse 4.4.2上的安装步骤:1) 打开菜单:Help > Install New Softwa... 阅读全文

posted @ 2015-09-07 09:47 岚天逸见 阅读(570) 评论(0) 推荐(0) 编辑

导航

统计信息

点击右上角即可分享
微信分享提示