摘要: install 首先设置需要生成动态/静态链接库的源文件 file (GLOB SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/xxx.cpp ...... ${CMAKE_CURRENT_SOURCE_DIR}/src/xxx.cpp ) 添加源文件到静态库te 阅读全文
posted @ 2022-10-19 11:07 umichan 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 网上查到的grant方式大多会报错,主要原因是MySQL版本8.0后不能再使用原来的方式 查询MySQL版本 SELECT version(); 在8.0版本下 grant all privileges on test.* to test@'%' identified by '123456'; 报错 阅读全文
posted @ 2022-08-26 11:14 umichan 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 在Linux下可以使用System V共享内存段实现共享内存,一共有4个API: 创建共享内存段或使用已经创建的共享内存段-shmget() 将进程附加到已经创建的共享内存段-shmat() 从已连接的共享内存段中分离进程-shmdt() 共享内存段上的控制操作-shmctl() 使用System 阅读全文
posted @ 2022-08-15 15:39 umichan 阅读(911) 评论(0) 推荐(0) 编辑
摘要: // ui_frameless_dialog.h #pragma once #include <QWidget> #include <QMouseEvent> class FramelessDialog : public QWidget { Q_OBJECT public: FramelessDia 阅读全文
posted @ 2022-07-29 19:29 umichan 阅读(141) 评论(0) 推荐(0) 编辑
摘要: // thread_pool.h #pragma once #include <vector> #include <deque> #include <thread> #include <functional> #include <condition_variable> class ThreadPoo 阅读全文
posted @ 2022-07-29 19:21 umichan 阅读(507) 评论(0) 推荐(0) 编辑
摘要: #include <yaml-cpp/yaml.h> #include <string> using namespace std; int main() { std::string file_path; // 读取yaml文件 YAML::Node yaml_node = YAML::LoadFil 阅读全文
posted @ 2022-07-29 18:44 umichan 阅读(3536) 评论(2) 推荐(2) 编辑
摘要: CMake文件 在vscode工作目录下创建CMakeLists.txt cmake_minimum_required(VERSION 3.5) project(test) set(CMAKE_CXX_STANDARD 11) add_executable(test test.cpp) C++文件 阅读全文
posted @ 2022-07-27 15:14 umichan 阅读(599) 评论(0) 推荐(0) 编辑
摘要: 编写proto文件并生成4个C++文件 首先编写proto文件,命名为test.proto,保存在工作目录下 syntax = "proto3"; package test.idl; message Student{ int32 id=1; string name=2; int32 score=3; 阅读全文
posted @ 2022-07-21 14:38 umichan 阅读(976) 评论(0) 推荐(0) 编辑
摘要: #include <Poco/DigestEngine.h> #include <Poco/DigestStream.h> #include <Poco/MD5Engine.h> #include <Poco/StreamCopier.h> #include <fstream> #include < 阅读全文
posted @ 2022-07-20 16:38 umichan 阅读(249) 评论(0) 推荐(0) 编辑
摘要: #include <Poco/Net/HTTPClientSession.h> #include <Poco/Net/HTTPRequest.h> #include <Poco/Net/HTTPResponse.h> #include <Poco/StreamCopier.h> #include < 阅读全文
posted @ 2022-07-19 19:50 umichan 阅读(712) 评论(0) 推荐(0) 编辑