循环引用:引用计数是一种便利的内存管理机制,但它有一个很大的缺点,那就是不能管理循环引用的对象。一个简单的例子如下:#include#include#include#includeclassparent;classchildren;typedefboost::shared_ptr
parent_pt...
分类:
其他好文 时间:
2014-05-09 13:01:22
阅读次数:
326
man netstat所看到的Active Internet connections
(TCP, UDP, raw)The protocol (tcp, udp, raw) used by the socket.Active UNIX
domain SocketsThe protocol (usua...
分类:
系统相关 时间:
2014-05-08 15:38:42
阅读次数:
381
著名端口端口号码 / 层名称注释1tcpmuxTCP
端口服务多路复用5rje远程作业入口7echoEcho
服务9discard用于连接测试的空服务11systat用于列举连接了的端口的系统状态13daytime给请求主机发送日期和时间17qotd给连接了的主机发送每日格言18msp消息发送协议1...
分类:
其他好文 时间:
2014-05-08 14:48:14
阅读次数:
538
boost::algorithm简介2007-12-08
16:59boost::algorithm提供了很多字符串算法,包括: 大小写转换; 去除无效字符; 谓词; 查找; 删除/替换; 切割; 连接;
我们用写例子的方式来了解boost::algorithm能够为我们做些什么。boost::al...
分类:
其他好文 时间:
2014-05-08 14:30:18
阅读次数:
397
直接代码:代码段1: 1 #include 2 #include 3 #include 4 5
class some_class 6 { 7 public: 8 typedef void result_type; 9 void
print_string(const ...
分类:
编程语言 时间:
2014-05-08 09:49:53
阅读次数:
368
下面的两个线程共享一个消息队列,一个用来放整数到队列,一个从队列里取消息出来。此程序在控制台不停的输出递增数字,主要是内存不会泄露
用到了多线程、ACE_Message_Queue、ACE_Message_Block、ACE_Thread_Manager::instance()->spawn等
#include
using namespace std;
#include "boost/lex...
分类:
其他好文 时间:
2014-05-07 21:29:38
阅读次数:
476
第一部分源码为基础实践: 1 /*Beyond the C++ Standard
Library ( An Introduction to Boost )[CN].chm*/ 2 /*bind的用法*/ 3 4 #include 5
#include 6 #include 7 #includ...
分类:
其他好文 时间:
2014-05-07 21:27:36
阅读次数:
536
开始学习模板元编程了
#include
#include
#include
#include
#include "boost/assign/list_of.hpp"
#include "boost/type_traits/is_const.hpp"
#include "boost/type_traits/is_reference.hpp"
#include "boost/type_tr...
分类:
其他好文 时间:
2014-05-07 16:32:27
阅读次数:
358
Abstract. One of the important features of the
boost polygon library is the implementation of the generic sweepline algorithm
to construct Voronoi dia...
分类:
其他好文 时间:
2014-05-07 13:43:36
阅读次数:
535
HP-Socket 是一套通用的高性能 TCP/UDP Socket 组件,包含服务端组件、客户端组件和 Agent 组件,广泛适用于各种不同应用场景的 TCP/UDP 通信系统,提供 C/C++、C#、Delphi、E、Java 等编程语言开发接口。...
分类:
其他好文 时间:
2014-05-07 12:14:17
阅读次数:
346