长风破浪会有时,直挂云帆济沧海

Dream Word

博客园 首页 新随笔 联系 订阅 管理
  148 随笔 :: 0 文章 :: 2 评论 :: 90304 阅读

05 2018 档案

摘要:boost 学习笔记 2: timer copy from:http://einverne.github.io/post/2015/12/boost-learning-note-2.html 1:timer 头文件 timer 位于boost命名空间,需要包含头文件 <boost/timer.hpp 阅读全文
posted @ 2018-05-29 14:46 长风II 阅读(313) 评论(0) 推荐(0) 编辑

摘要:参考原著地址:http://einverne.github.io/post/2015/12/boost-learning-note-1.html 转换对象要求 lexical_cast 对转换对象有如下要求: C++中内建类型(int,double等)和std::string 都是符合三个条件的。 阅读全文
posted @ 2018-05-29 14:28 长风II 阅读(187) 评论(0) 推荐(0) 编辑

摘要:boost 学习笔记 0: 安装环境 最完整的教程 http://einverne.github.io/post/2015/12/boost-learning-note-0.html Linux 自动安装boost sudo apt-get install libboost-all-dev Linu 阅读全文
posted @ 2018-05-29 14:22 长风II 阅读(179) 评论(0) 推荐(0) 编辑

摘要:1:环境 MAC+Pycharm 2:Web框架搭建 新建py工程: 工程右键->Open in terminal: django-admin startproject mysite cd mysite python manager.py startapp helloapp 在helloapp代码框 阅读全文
posted @ 2018-05-21 23:11 长风II 阅读(167) 评论(0) 推荐(0) 编辑

摘要:线程池的实现 1:自定义封装的条件变量 1 //condition.h 2 #ifndef _CONDITION_H_ 3 #define _CONDITION_H_ 4 5 #include <pthread.h> 6 7 typedef struct condition 8 { 9 pthrea 阅读全文
posted @ 2018-05-18 18:14 长风II 阅读(263) 评论(0) 推荐(0) 编辑

摘要:MySql 1:连接 1 #include <mysql.h> 2 MYSQL *mysql_init(MYSQL *); 3 MYSQL *mysql_real_connect(MYSQL *connection,const char *server_host,......); 4 void my 阅读全文
posted @ 2018-05-15 17:59 长风II 阅读(132) 评论(0) 推荐(0) 编辑

摘要:举个栗子 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <unistd.h> 4 #include <sys/types.h> 5 #include <pthread.h> 6 #include <errno.h> 7 #include 阅读全文
posted @ 2018-05-13 20:50 长风II 阅读(269) 评论(0) 推荐(0) 编辑

摘要:信号量API #include <semaphore.h> 2 //等待互斥量(原子操作) 3 int sem_wait(sem_t *serm); 4 //通知互斥量加一 5 int sem_post(sem_t *sem); 基于信号量与互斥锁实现的生产者和消费者 1 #include <std 阅读全文
posted @ 2018-05-13 20:46 长风II 阅读(258) 评论(0) 推荐(0) 编辑

摘要:(转载自 http://blog.sina.com.cn/s/blog_6b3765230100lazj.html) ulimit -c 输出如果为0,则说明coredump没有打开 ulimit -c 输出如果为unlimited,则说明coredump已打开 通过 ulimit -c unlim 阅读全文
posted @ 2018-05-10 17:21 长风II 阅读(20665) 评论(0) 推荐(0) 编辑

摘要:http://blog.csdn.net/centerpoint/article/details/38542719 根本原因: Linux默认启用了反向路由检查 如果2个网卡在一个Lan里面,那么服务器可能从eth0或者eth1发现网关, 如果一个包从eth0进入了, 而网关在eth1上, 那么从e 阅读全文
posted @ 2018-05-10 11:35 长风II 阅读(3764) 评论(0) 推荐(0) 编辑

摘要:void *mmap(void *addr,size_t len,int prot,int flags, int fd,off_t offset); prot:保护方式 PROT_READ:页面可读 PROT_WRITE:页面可写 PROT_EXEC: PROT_NONE: fiags: MAP_S 阅读全文
posted @ 2018-05-06 16:35 长风II 阅读(175) 评论(0) 推荐(0) 编辑

摘要:互斥:矛盾 同步:协作 消息队列 #include <sys/types.h> #include <sys/ipc.h> #include <sys/msg.h> int msgget(key_t key,int msgflg); int msgctl(int msgid,int cmd,stuct 阅读全文
posted @ 2018-05-06 12:42 长风II 阅读(156) 评论(0) 推荐(0) 编辑

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