05 2020 档案

摘要:What are the differences between Perl, Python, AWK and sed In order of appearance, the languages are sed, awk, perl, python. The sed program is a stre 阅读全文
posted @ 2020-05-29 22:41 SolidMango
摘要:What is the difference between sed and awk sed is a stream editor. It works with streams of characters on a per-line basis. It has a primitive program 阅读全文
posted @ 2020-05-24 10:49 SolidMango
摘要:# 立即重新启动计算机 echo "b" > /proc/sysrq-trigger # 立即关闭计算机echo "o" > /proc/sysrq-trigger # 导出内存分配的信息 (可以用/var/log/message 查看)echo "m" > /proc/sysrq-trigger 阅读全文
posted @ 2020-05-16 20:29 SolidMango
摘要:C++ Sqlite3的基本使用 |SQLite3简介 SQLite3只是一个轻型的嵌入式数据库引擎,占用资源非常低,处理速度比Mysql还快,专门用于移动设备上进行适量的数据存取,它只是一个文件,不需要服务器进程。 SQL语句是SQL操作的指令,我们用C/C++访问数据库时,需要用char*即C字 阅读全文
posted @ 2020-05-08 10:26 SolidMango 阅读(3775) 评论(0) 推荐(0)
摘要:asio tcp client and server implement tcp server #include <cstdlib> #include <iostream> #include <thread> #include <utility> #include "asio.hpp" using 阅读全文
posted @ 2020-05-05 20:01 SolidMango 阅读(414) 评论(0) 推荐(0)
摘要:pattern 1 client #include<sys/types.h> #include<sys/socket.h> #include<netinet/in.h> #include<arpa/inet.h> #include<errno.h> #include<unistd.h> #inclu 阅读全文
posted @ 2020-05-04 23:12 SolidMango 阅读(353) 评论(0) 推荐(0)
摘要:Scope Boost.Asio is a C++ library that started with a focus on networking, but its asynchronous I/O capabilities have been extended to other resources 阅读全文
posted @ 2020-05-04 22:54 SolidMango
摘要:聊聊select, poll 和 epoll 假设项目上需要实现一个TCP的客户端和服务器从而进行跨机器的数据收发,我们很可能翻阅一些资料,然后写出如下的代码。 服务端 void func(int sockfd) { char buff[MAX]; int n; // infinite loop f 阅读全文
posted @ 2020-05-03 21:35 SolidMango 阅读(1204) 评论(0) 推荐(1)
摘要:聊聊select, poll 和 epoll 假设项目上需要实现一个TCP的客户端和服务器从而进行跨机器的数据收发,我们很可能翻阅一些资料,然后写出如下的代码。 服务端 void func(int sockfd) { char buff[MAX]; int n; // infinite loop f 阅读全文
posted @ 2020-05-03 19:43 SolidMango 阅读(1178) 评论(0) 推荐(0)
摘要:C++操作Kafka使用Protobuf进行跨语言数据交互 Kafka 是一种分布式的流平台,具体是什么意思呢? A streaming platform has three key capabilities: Publish and subscribe to streams of records, 阅读全文
posted @ 2020-05-02 12:11 SolidMango 阅读(2799) 评论(0) 推荐(1)