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