2020年9月22日

环形队列,支持数据存储和读取,自定义二分查找

摘要: 1 #pragma once 2 #include <stdio.h> 3 #include <mutex> 4 #include <condition_variable> 5 #include <iostream> 6 #include <chrono> 7 #include <thread> 8 阅读全文

posted @ 2020-09-22 17:43 吃橙子 阅读(650) 评论(0) 推荐(0) 编辑

2019年6月25日

cmake 交叉编译添加zlib库

摘要: 一、下载源码并编译 下好后编译步骤: 1.解压 tar -xzvf zlib-1.2.11.tar.gz -C ./ 2.配置编译环境 source /opt/LTBOXCL02-linuxAPP/environment-setup-armv7a-vfp-neon-oe-linux-gnueabi 阅读全文

posted @ 2019-06-25 10:11 吃橙子 阅读(2577) 评论(0) 推荐(0) 编辑

2018年6月27日

实现C++双分派(转)

摘要: https://blog.csdn.net/xiaodan007/article/details/24340983 2014年04月23日 05:07:00 阅读数:956 2014年04月23日 05:07:00 阅读数:956 阅读数:956 [cpp] view plain copy /*** 阅读全文

posted @ 2018-06-27 13:45 吃橙子 阅读(185) 评论(0) 推荐(0) 编辑

设计模式的六大原则(转)

摘要: 转发地址:http://www.cnblogs.com/firstdream/p/7101289.html 单一职责原则 定义 不要存在多于一个导致类变更的原因。通俗的说,即一个类只负责一项职责。 问题由来 类T负责两个不同的职责:职责P1,职责P2。当由于职责P1需求发生改变而需要修改类T时,有可 阅读全文

posted @ 2018-06-27 11:16 吃橙子 阅读(518) 评论(0) 推荐(0) 编辑

2017年8月28日

CircleBuf

摘要: #include #include #include #include "Semaphore.h" #include "Mutex.h" class CCircleBuf { public: CCircleBuf() { m_state = false; } ~CCircleBuf() { } public: int Initial(int size) { if (m_state ... 阅读全文

posted @ 2017-08-28 23:45 吃橙子 阅读(401) 评论(0) 推荐(0) 编辑

2017年1月12日

设计模式

摘要: #ifndef __FACTORY__#define __FACTORY__#if 1#include <map>#include <string>using namespace std;template<typename Product, typename ConcreteProduct>clas 阅读全文

posted @ 2017-01-12 20:50 吃橙子 阅读(174) 评论(0) 推荐(0) 编辑

导航