
OpenSource
玄冬Wong
别把自己当回事儿,我还是一只菜鸟……
展开
-
slf4j的log级别
原文:http://www.slf4j.org/apidocs/org/apache/commons/logging/Log.htmlThe six logging levels used by Log are (in order):trace (the least serious)debuginfowarnerrorfatal (the most serious)...原创 2013-06-20 23:40:11 · 609 阅读 · 0 评论 -
libuv的多线程问题
原文:http://stackoverflow.com/questions/13838972/is-libuv-thread-safe?answertab=votes#tab-top I have created a new thread dedicated to a libuv run loop. The thread function looks something like th...原创 2013-08-14 18:22:05 · 732 阅读 · 0 评论 -
Google高效开源跨平台序列化库FlatBuffers 1.1新特性
FlatBuffers相对ProtocolBuffer的优势是:无需反序列化,但代价是encode之后的体积相对ProtocolBuffer更大原文:http://geek.youkuaiyun.com/news/detail/29744 经过几个月开发,FlatBuffers 1.1版本更新。这次的更新包含:对Java API进行了广泛的检修out-of-the-box支持C#和Go...原创 2015-04-07 20:50:07 · 271 阅读 · 0 评论 -
protobuf 2.6不再支持文件名通配符
protobuf 2.6之前的版本,同时为多个proto文件生成java或者c++代码时,是支持通配符的,比如protoc.exe --proto_path=custom_msg --cpp_out=build custom_msg/*.proto 但现在2.6已经不支持这种写法了,要同时指定多个proto文件名,必须追加文件名:protoc.exe --proto_pat...原创 2016-04-28 21:37:09 · 442 阅读 · 0 评论 -
protobuf C++生成代码中使用自己定义类型参数时的set问题
如果proto结构体的变量是基础变量,比如int、string等等,那么set的时候直接调用set_xxx即可。如果变量是自定义类型,那么C++的生成代码中,就没有set_xxx函数名,取而代之的是三个函数名:set_allocated_xxx()release_xxx()mutable_xxx()使用set_allocated_xxx()来设置变量的时候,变量不能...原创 2016-05-23 22:11:33 · 1432 阅读 · 0 评论