- 博客(31)
- 资源 (2)
- 问答 (1)
- 收藏
- 关注
原创 boost log 配置实现多模块多文件
[root@localhost log]# cat config.ini#comments are allowed. Comment line begins with the '#' character# and spans until the end of the line.# Logging core settings section. May be omitted
2014-02-27 14:20:05 2187 3
原创 boost log 多模块多文件设置
[root@localhost log]# cat config.ini#comments are allowed. Comment line begins with the '#' character# and spans until the end of the line.# Logging core settings section. May be omitted
2014-02-27 14:16:23 3956
转载 centos 下 boost1.55 编译和安装
centos 下 boost1.55 编译和安装分类: BOOST Linux2014-01-31 17:23 258人阅读 评论(0) 收藏 举报解压tar zxvf ./boost_1_55_0.tar.bz2 进入目录后,执行./bootstrap.sh --with-libraries=system,filesystem
2014-02-26 10:14:45 3944
原创 boot log依赖的包
# Comments are allowed. Comment line begins with the '#' character# and spans until the end of the line.# Logging core settings section. May be omitted if no parameters specified within it.[
2014-02-26 07:57:17 1213
原创 boost log 代码实现多模块多文件
#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #i
2014-02-25 22:06:19 2363
转载 boost.log要点笔记
boost.log要点笔记 常用简写:namespace logging = boost::log;namespace src = boost::log::sources;namespace expr = boost::log::expressions;namespace sinks = boost::log::sinks;namespace attrs = b
2014-02-25 14:26:06 2143 1
转载 Handling Uncaught and Unexpected Exceptions (C++)
Handling Uncaught and Unexpected Exceptions (C++)Go Up to Standard C++ Exception HandlingIf an exception is thrown and no exception handler is found—that is, the exception is not caught—
2014-02-24 10:17:51 865
转载 PRTSCR即print screen。
PrtScr的快捷键编辑* PrintScreen:对整个屏幕进行截图* Alt + PrintScree:对当前窗口进行截图。* 左键:绘制需要的保存区域,也就是说可以截出不规则的区域。* 右键:绘制画线与注释。* Ctrl + 左键:截取矩形区域。* Ctrl + 右键:绘制矩形。* 鼠标滚轮:调整画线的大小。* Del/Back
2014-02-20 13:54:34 1077
转载 http://baiy.cn/doc/cpp/inside_exception.htm#栈回退(Stack_Unwind)机制
栈回退(Stack Unwind)机制“栈回退”是伴随异常处理机制引入 C++ 中的一个新概念,主要用来确保在异常被抛出、捕获并处理后,所有生命期已结束的对象都会被正确地析构,它们所占用的空间会被正确地回收。受益于栈回退机制的引入,以及 C++ 类所支持的“资源申请即初始化”语意,使得我们终于能够彻底告别既不优雅也不安全的 setjmp/longjmp 调用,简便又安全
2014-02-20 10:17:51 956
转载 oracle 连接 oracle数据库
http://lshirley2009.iteye.com/blog/811301http://blog.csdn.net/xiaobai1593/article/details/6671722
2014-02-18 15:21:32 643
原创 Java VS C++(14) 调用可能抛出异常的函数
调用可能抛出异常的函数(1)java看是否是受检异常,如果是必须try catch, 如果是非受检异常,则不用 try catchvoid test()throws MyException;(2)c++不必try catch,不会编译错误:func() throw(type) ,会抛出某种异常func() throw(),不会抛出fu
2014-02-17 15:26:54 1191
转载 throw(int);
void GetTag() throw(int);表示只抛出int类型异常void GetTag() throw(int,char);表示抛出in,char类型异常void GetTag() throw();表示不会抛出任何类型异常void GetTag() throw(...);表示抛出任何类型异常
2014-02-17 15:21:37 884
转载 placement new operator new
这就是placement new。最后来个总结吧:如果想在堆上创建一个对象,应该用new操作符,它分配内存,同时又为对象调用构造函数。如果仅仅想分配内存,就用operator new函数,它不会调用构造函数。如果你想定制自己的在堆对象被建立时的内存分配过程,应该重载写你自己的operator new函数,new操作符会调用你定制的operator new。如
2014-02-17 13:21:34 550
转载 c++ 产生随机数
#include#include#include#define random(x) (rand()%x)void main(){ srand((int)time(0)); for(int x=0;x<10;x++) printf("%d\n",random(100));}这样两次运行的结果就会不一样了!! double random(double start, double end){ retur
2014-02-14 17:01:35 474
转载 std::thread pthread boost::thread
14down voteacceptedIf you want to run code on many platforms, go for Posix Threads. They are available almost everywhere and are quite mature. OTOH if you only use Linux/gcc std::thread is
2014-02-14 16:47:46 2778
转载 调试 之gdb thread命令 与 ltrace/strace
分类: linux2010-06-21 21:30 1823人阅读 评论(0) 收藏 举报thread多线程我们可以通过 1) gdb prog_name -> r 用在逐步调试自己的程序时 2) gdb -> attach process_id 正在运行中的后台程序突然卡在了某个地方,先p
2014-02-14 10:05:34 861
转载 如何在Linux系统里使用sleep函数
如何在Linux系统里使用sleep函数 2011-06-06 21:30:05| 分类: Linux系统|举报|字号 订阅 Linux系统里的时延函数sleep 与 Windows系统里的Sleep函数是不一样的, 刚才在编写彩票程序的时候才发现这个问题: 首先 头文件不一样: Linux系统里的时延函数sleep的头文件是 unistd.
2014-02-13 14:25:32 8210
转载 编译器错误 C2662
编译器错误 C2662Visual Studio 2005其他版本1(共 1)对本文的评价是有帮助 - 评价此主题错误消息“function”: 不能将“this”指针从“type1”转换为“type2”编译器不能将 this 指针从 type1 转换为 type2。此错
2014-02-13 13:32:59 1051
转载 Constant Member Functions
Constant Member FunctionsVisual Studio 2013Other Versions6 out of 6 rated this helpful - Rate this topicDeclaring a member function with the const keywo
2014-02-13 13:31:57 679
转载 【Study Record】Using Google Mocking Framework in Unit Test ( Advanced )
【Study Record】Using Google Mocking Framework in Unit Test ( Advanced )By moemeow|ArchivesA Work log in CISCO China R&D Center实例:01020304050607
2014-02-13 11:31:53 1293
转载 VI删除与复制多行
VI删除与复制多行 (2011-05-20 23:22:03)转载▼标签: 杂谈VI删除与复制多行 一、删除多行dd删除一行ndd删除以当前行开始的n行dw删除以当前字符开始的一个字符ndw删除以当前字符开始的n个字符d$、D删除以当前字符开始的一行字符d)删除到下一句的开始d}删除到下一段的开始d回车删除2行二、复制多行任务:将第9行至第15行的数据,复制到第16行方法1:(强烈推荐):9,15
2014-02-11 14:53:33 601
转载 VI打开和编辑多个文件的命令
VI打开和编辑多个文件的命令VI打开和编辑多个文件的命令 可分两种情况: 1、在同一窗口中打开多个文件: vi file1 file2 file3:n 切换到下一个文件 (n=next):N 切换到上一个文件 2、在不同窗口中打开多个文件: 如果已经打开一个了一个文件,则在vi的命令输入状态下输入 :sp 另外一个文件的路
2014-02-11 14:49:39 856
转载 Linux下多线程编程__线程的创建pthread_create与退出pthread_exit,等待当前线程退出pthread_join,获取线程ID pthread_self
Linux下多线程编程__线程的创建pthread_create与退出pthread_exit,等待当前线程退出pthread_join,获取线程ID pthread_self 2010-11-24 12:31:06| 分类:Linux高性能开发 |举报|字号 订阅1、头文件: #include 2、线程描述符:
2014-02-11 11:00:27 2410
转载 PID PPID LWP NLWP
linux 查看线程信息(2012-07-19 14:31:18) 标签:linux操作系统线程标识符进程it分类:Linux/Unixlinux 查看线程信息 在linux操作系统中可以使用ps-eLf命令来查看线程信息:下面的数据为db2数据库的db2sysc进程中所包括的线程:192.168.
2014-02-11 10:19:35 13524
转载 linux的pthread_self与gettid的返回值和开销的区别
linux的pthread_self与gettid的返回值和开销的区别分类: 一些思考 2012-05-18 12:25 2942人阅读 评论(0)收藏 举报linux测试pthread_self()是POSIX的实现,它的返回值是pthread_t,pthread_t在linux中实际是无符号长整型,即unsigned long。gettid是系统调用,它
2014-02-11 10:05:54 2748
转载 查看进程pid/tid
验证TID是否正确的方法:查看进程pid(1) ps ux | grep prog_name(2) pgrep prog_name 查看线程tid(1) ps -efL | grep prog_name(2) ls /proc/pid/task
2014-02-11 09:49:30 5268
转载 C++的常用库(转载)
C++的常用库(转载)标准库 标准库中提供了C++程序的基本设施。虽然C++标准库随着C++标准折腾了许多年,直到标准的出台才正式定型,但是在标准库的实现上却很令人欣慰得看到多种实现,并且已被实践证明为有工业级别强度的佳作。 1、 Dinkumware C++ Library 参考站点:http://www.dinkumware.com/'>http://www.din
2014-02-07 11:30:45 523
原创 c++ 返回值是引用或者非引用
//============================================================================// Name : TestReference.cpp// Author : // Version :// Copyright : copy rigt// Description : He
2014-02-07 09:40:48 621
转载 boost::algorithm学习
boost::algorithm学习boost::algorithm学习#include using namespace std;using namespace boost; 一:大小写转换1 to_upper() 将字符串转为大写 Example: string str1(" hello world! "); to_upper(str1); // str
2014-02-06 22:02:58 567
原创 boost ptree
删除某个属性:不能用earse直接删除path,参数需要是key type,所以不支持删除。http://stackoverflow.com/questions/21501970/how-to-remove-xmls-attribute-using-boosts-ptree/21551698?noredirect=1#comment32629873_21551698int main(){
2014-02-06 17:06:32 3907
如何划分package?
2012-07-29
TA创建的收藏夹 TA关注的收藏夹
TA关注的人