自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 问答 (1)
  • 收藏
  • 关注

原创 Thrift TThread

Thrift TThread的使用[cpp] view plaincopy#include   #include   #include   #include     using namespace boost;  using namespace apache::thrift::concurrency;    c

2015-06-29 18:24:26 456

原创 CMake的CTest方法

参考:http://hahack.com/codes/cmake/Demo目录结构如下:Test/├── add.cpp└── CMakeLists.txtadd.cpp#include #include int main(int argc, char *argv[]){ if (argc != 3) { std::cout << "pa

2015-06-26 17:28:35 12263 1

转载 程序员最常去的网站

转自:http://blog.csdn.net/u011225629/article/details/46645431

2015-06-26 10:19:05 300

原创 nginx 内存池

nginx内存池测试了一下:#include #include "ngx_config.h"#include "ngx_conf_file.h"#include "nginx.h"#include "ngx_core.h"#include "ngx_string.h"#include "ngx_palloc.h"#include "ngx_array.h"volatile n

2015-06-25 19:02:04 259

原创 右值引用

我们写代码的时候,总会遇到下面的情况:class Obj {};Obj getObj() { Obj obj; // 创建临时变量 // some initialize code for obj return obj; // 返回一个临时变量}int main() { Obj obj = getObj(); // 这里会将返回值赋值给obj}

2015-06-24 16:31:47 256

原创 JsonCpp 使用

test.json{    "name":"huyanjie",    "age":25,    "peiou":{        "name":"guoran",        "age":26    }   }#include "json/json.h"#include #include const std::string jsonFile("test.

2015-06-17 10:33:27 252

原创 Thrift TServer

1. poll的使用#include #include #include #include #include #include int main(void) { struct pollfd fds[1]; int timeout_msecs = 10000; int ret; fds[0].fd = 0; fds[0].events =

2015-06-16 11:19:51 269

原创 thrift TProcessor

TProcessor Demo 如下:#include #include class TProcessorEventHandler {    public:        virtual ~TProcessorEventHandler() {}        virtual void processingEvent() {}};class TProc

2015-06-11 18:29:43 832

原创 thrift 继承设计

thrift采用了NVI(Non-Virtual Interface)模式, 我写了一个demo如下: #include #include class Parent { public: void read() { read_virt();

2015-06-11 17:39:22 2289

原创 Thrift 线程池

thrift线程池使用如下:#include #include #include #include #include #include using namespace apache::thrift::concurrency;using namespace apache::thrift::server;class MyTask : public Runnable { p

2015-06-11 17:02:40 3958

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除