自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

wangzhicheng2013的专栏

王志成IT心路历程

  • 博客(534)
  • 资源 (14)
  • 收藏
  • 关注

原创 进程锁

https://github.com/wangzhicheng2013/process_mutex

2020-10-26 15:13:16 336

原创 使用内存映射替换文件内容

template <class T>class single_instance {public: static inline T instance() { static T obj; return obj; }private: single_instance() = default; virtual ~single_instance() = default;};#include <string.h>#i.

2020-05-11 19:02:28 247 1

原创 libcap应用:按协议抓取网络包

#include <stdio.h>#include <stdlib.h>#include <time.h>#include <sys/time.h>#include <stdint.h>#include <string.h>#include <sys/socket.h>#include <n...

2020-03-22 15:33:41 465

原创 zlib压缩解压缩字符串为gzip格式

#include <stdio.h>#include <string.h>#include <iostream>#include <string>#include <fstream>#include <zlib.h>static bool gzip_compress(const std::string &...

2020-01-20 11:25:20 950 2

原创 rest_rpc应用-从服务器下载文件到本地

1.rest_rpc:https://github.com/qicosmos/rest_rpc2.服务端:server.cpp#include <iostream>#include <string>#include <fstream>#include <thread>#include "rpc_server.h"using n...

2020-01-19 15:08:16 541 1

原创 boost:any构建可变参数函数分发器

#include <iostream>#include <string>#include <algorithm>#include <unordered_map>#include <memory>#include <functional>#include <stdexcept>#include &lt...

2019-12-11 19:25:55 293

原创 boost asio组播

1.sender#include <iostream>#include <string>#include <sstream>#include <chrono>#include <boost/asio.hpp>class sender {public: sender(boost::asio::io_service ...

2019-12-10 11:19:05 2337 2

原创 crtp应用-- 具备多种行为类

#include <iostream>template <typename Derive>struct swim { swim(const Derive &d) : self(d) { } void to_swim() { std::cout << self.name << " can swim...

2019-12-09 14:15:31 217

原创 leetcode移除元素

class Solution {public: int removeElement(vector<int>& nums, int val) { int size = nums.size(); if (size <= 0) { return 0; } int start = ...

2019-12-09 10:03:32 68

原创 zmq发布订阅模式原型--支持断链重连 可扩展于多个业务场景 比如服务器发布配置信息等

1.zmq_ageng.hpp#ifndef SRC_ZMQ_AGENT_HPP_#define SRC_ZMQ_AGENT_HPP_#include <string.h>#include <string>#include <map>#include <zmq.h>namespace zmq_self_agent {enum so...

2019-12-03 16:18:27 995 3

原创 epoll tcp server 演示收发消息

#include <stdlib.h>#include <unistd.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include <sys/epoll.h>#include <sys/socket.h>#include &l...

2019-10-31 17:55:33 356

原创 trie_tree c++封装

#include <stdlib.h>#include <time.h>#include <iostream>#include <vector>#include <string>#include <thread>#define SAFE_DEL(p) do { if (nullptr != p) { delete...

2019-10-26 17:11:29 172

原创 统计网络流量

#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <ctype.h>#include <fcntl.h>#include <iostream>#include <s...

2019-10-21 17:46:01 249

原创 跳表程序

#include <string.h>#include <time.h>#include <iostream>#include <map>#include <stdexcept>template <typename KeyType, typename ValueType>struct skip_list_node...

2019-10-19 17:58:03 107

原创 元编程应用-判读容器类型

#include <iostream>#include <string>#include <vector>#include <map>#include <unordered_map>#include <list>#include <queue>#include <deque>#incl...

2019-09-16 21:04:14 193

原创 google benchmark应用

#include <string.h>#include <iostream>#include <set>#include <string>#include <benchmark/benchmark.h>#define SAFE_DEL(ptr) { if (ptr) delete ptr; ptr = nullptr; }t...

2019-09-07 15:15:31 470

原创 线程安全ring buffer

#include <iostream>#include <string>#include <vector>#include <atomic>struct SpinLock { SpinLock(std::atomic_flag &flag) : flag_(flag) { while (true == fla...

2019-09-04 11:20:48 556

原创 一种存储表结构方法

#include <stdlib.h>#include <assert.h>#include <iostream>#include <string>#include <unordered_map>#include <memory>static const std::string S_EMPTY_STRING;#...

2019-08-23 14:15:01 221

原创 lock free queue

#include <iostream>#include <string>#include <vector>#include <atomic>#include <chrono>#include <thread>#include <type_traits>#include <stdexcept&g...

2019-08-11 22:00:43 483

原创 异步asio udp server和client (单线程)

1.asyn_asio_udp_server.hpp#ifndef ASYN_ASIO_UDP_SERVER_HPP_#define ASYN_ASIO_UDP_SERVER_HPP_#include <string.h>#include <iostream>#include <string>#include "boost/asio.hpp"...

2019-07-07 14:06:50 1159 1

原创 测试系统堆内存

一 需求:使用new操作测试程序最多可申请多大的堆内存二 实现:1.直接使用new直接使用new可能会抛出bad_alloc异常,所以要使用try catch捕获2.使用new(nothrow)分配失败不会抛出异常,而是返回空指针三 代码:1.test.cpp#include <stdint.h>#include <iostream>...

2019-07-04 15:43:33 246

原创 redis client pool

1.redis_client.hpp#ifndef REDIS_CLIENT_HPP_#define REDIS_CLIENT_HPP_#include <hiredis/hiredis.h>#include <string.h>#include <iostream>#include <string>using namespace ...

2019-07-03 21:01:53 699

原创 程序性能优化---倒置字符串中单词

需求:输入 have a nice day输出 day nice a have实现:#include <unistd.h>#include <iostream>#include <vector>#include <sstream>#include <stack>using namespace std;stri...

2019-07-03 16:30:23 201

原创 使用select实现异步定时器

需求:实现异步定时器,不干扰其它线程实现:使用select作为超时API,但一定程度增加系统payload代码:select_timer.hpp#ifndef SRC_SELECT_TIMER_HPP_#define SRC_SELECT_TIMER_HPP_#include <sys/time.h>#include <iostream>#...

2019-07-01 18:55:52 1306

原创 使用消息注册机制实现消息通信机制

一 需求:将消息通信进行抽象,支持udp,tcp,zmq等方式二 实现:1.消息通信实体#ifndef SRC_MESSAGE_COMMUNICATE_ENTITY_HPP_#define SRC_MESSAGE_COMMUNICATE_ENTITY_HPP_#include <stdio.h>#include <stdlib.h>#include...

2019-06-20 13:45:17 507

原创 易用的zmq rounter/dealer模式

一 rounter/dealerclient <=> server (rounter<=>dealer) <=> work0, work1,...二 需求:client发送指令到server,server立刻回收到响应,server异步处理指令,周期性给client回复处理结果。三 解决思路:server采用rounter/dealer模式,...

2019-06-19 13:15:22 982

原创 android调用libGLES_mali.so识别问题解决

android调用libGLES_mali.so识别问题解决

2023-06-09 15:24:29 1097

原创 qnx slog2应用实践小结

在QNX系统上开发的应用需要打印日志以帮助开发人员排查相关问题,在C/C++程序中可以使用printf输出到控制台,但很多程序在后台运行,因此借助slog2相关API封装成日志类用于向slog输出日志

2023-04-26 16:26:51 1845 1

原创 Android MediaCodec dump MP4实践小结

在一些集成了算法SDK的Android APP中,这些APP是取出摄像头实时帧,然后调用视觉算法SDK并产生检测结果。而当测试人员发现某一场景下算法效果欠佳时,需要从摄像头实时原始数据帧dump一段视频(mp4格式),因此,这些Android APP中需要提供相应的功能,而Android MediaCodec则很方便为开发人员提供应用接口去实现Android视频方面的操作。

2023-04-20 15:23:53 685

原创 使用优先队列解决TopK问题

使用优先队列解决TopK问题

2023-04-12 15:01:54 160

原创 指向函数返回值与局部作用域

指向函数返回值与局部作用域

2023-04-09 16:33:12 76

原创 linux查看进程缺页中断次数

linux查看进程缺页中断次数。

2023-04-06 10:56:59 592

原创 欺骗的艺术--骗过编译器,C++类型转换器

欺骗的艺术--骗过编译器,C++类型转换器

2023-04-02 09:09:27 79

原创 stderror_r有bug

stderror_r有bug

2023-03-27 16:35:51 68

原创 android adb install安装APK报“INSTALL_FAILED_VERSION_DOWNGRADE”

android adb install安装APK报“INSTALL_FAILED_VERSION_DOWNGRADE”

2023-03-25 14:53:01 323

原创 MobaXterm_Personal_21.5上传文件到系统

MobaXterm_Personal_21.5上传文件到系统

2023-03-20 14:00:05 264

原创 调正opengles渲染坐标将图像旋转问题

调正opengles渲染坐标将图像旋转问题

2023-02-09 16:19:17 285

原创 Android 从一个Activity跳转到另一个APP的Activity

APP开发时需要点击某个按钮,退出本身Activity后跳转到系统中另一个APP的Activity

2023-02-08 09:31:02 1180

原创 android studio升级后导致Android工程无法编译问题的解决方法

android studio升级后导致Android工程无法编译问题的解决方法

2023-02-06 19:38:28 1727

原创 linux显示登录者IP、用户名等详细信息

linux显示登录者IP、用户名等详细信息

2023-02-02 09:48:56 233

多边形游戏

//多边形游戏:n个顶点,n条边的多边形,每一个顶点有一个整数值,每一条边上有*或+,代表乘法和加法 //从中任意删除一条边,用相邻的顶点和关联的边上的运算符进行运算,运算结果产生新的顶点 //用新的顶点取代原来的两个顶点和他们关联的边,这样依次做下去,最后只剩一个顶点,求出最大的顶点值

2012-01-22

字符串匹配程序

#include<iostream>#include<vector>#include<string> #include<sstream>using namespace std;

2012-01-21

计算机集群

distributed processing system, which consists of a collection of interconnected stand-alone computers working together as a single, integrated computing resource

2012-01-19

大规模并行处理机系统 MPP

In a massively parallel processing system, current levels of technology allow for

2012-01-18

对称多处理机

单一物理地址空间(single physical Address Space) 高速缓存一致性(Cache coherence) 低通信延迟(low Latency)Only an OS copy

2012-01-18

Interconnection Network

the n! Connection patterns of its n inputs and n outputs.For example Clos network.In contrast ,blocking network, for example Omega,multistage cube

2012-01-18

Communication in Multiprocessor Systems

在扩展的多处理机、多计算机机群或分布式系统中,各个组成模块都可以系统总线、I/O总线、交叉开关或多级开关互连之。

2012-01-18

高级计算机测试

A PLA has a set of inputs and corresponding input complements (which can be implemented with a set of inverters), and two stages of logic

2012-01-18

高级体系结构课程纲要

A PLA has a set of inputs and corresponding input mplements (which can be implemented with a set of inverters), and two stages of logic

2012-01-18

高级计算机体系结构

单片集成大量三极管,功能增强加工线条精细,三极管尺寸小,门延减小,频率提高集成度提高,功耗增加,温度升高引脚受空间限制线条电阻可能超过门延

2012-01-18

线性表的分析

线性表示一个有序的链表,集合里的元素是谓语有序的口岸

2011-12-19

CBR推理技术模型

AI资料介绍,一些详细的c++编码,和人工智能前沿的技术和方法论

2011-11-23

人工智能课件

人工智能方法与系统,涉及c++编程,还有一些人工智能前沿的问题。

2011-11-23

计算机技术人工智能1

人工智能第一课,的题目是什么呢,这样吧人工智能方法林离的

2011-10-30

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除