01 2017 档案

摘要:单例模式只有一个实例,多用于共享资源,不如数据库和线程池 单例模式的特点: 1、一个私有构造器,确保只有一个实例; 2、一个静态方法,用于获取实例; 3、一个静态变量,保存实例,静态变量可以被实例共享 阅读全文
posted @ 2017-01-22 16:50 xshang 阅读(153) 评论(0) 推荐(0) 编辑
摘要:QToolButton *button = new QToolButton(this); button->resize(100,30); button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); QStyle* style = QApplication::style(); QIcon icon = style->standardIcon(... 阅读全文
posted @ 2017-01-17 10:26 xshang 阅读(4678) 评论(0) 推荐(0) 编辑
摘要:#include #include #include using namespace std; void print(int elem) { cout &vec, int left, int right) { if(left key) { high--; } ... 阅读全文
posted @ 2017-01-14 20:45 xshang 阅读(174) 评论(0) 推荐(0) 编辑
摘要:只需一条命令: sudo apt install libboost-dev 阅读全文
posted @ 2017-01-11 22:07 xshang 阅读(231) 评论(0) 推荐(0) 编辑
摘要:boost array是一种静态数组,比stl中的vector效率高 阅读全文
posted @ 2017-01-06 09:09 xshang 阅读(1115) 评论(0) 推荐(0) 编辑

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