摘要:
优点 降低耦合度:使用PIMPL可以减少头文件的依赖,降低编译时的耦合度。 隐藏实现细节:实现细节对使用者是不可见的,有利于封装。 编译依赖减少:当实现改变时,不需要重新编译依赖于接口的代码,只需重新编译实现代码即可。 注意事项: 运行时性能:每次通过指针访问实现类可能会有轻微的性能开销。 资源管理 阅读全文
摘要:
https://github.com/JPNaude/dev_notes/wiki/Using-Google-Breakpad-with-Qt https://chromium.googlesource.com/breakpad/breakpad/ 下载及编译 git clone https://c 阅读全文
摘要:
创建ubuntu 指定名称创建容器 docker run -t -i -d -v /opt:/opt --name ubuntu2004 ubuntu:20.04 /bin/bash 修改ustc镜像源 sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc. 阅读全文
摘要:
水星 SG108 PRO/1.0 网络端口镜像 使用流程 购买链接 https://item.jd.com/100001913315.html 水星智能网管交换机客户端应用程序 1.0.3 https://service.mercurycom.com.cn/download-1830.html 如上 阅读全文
摘要:
```c++ #include class SpinLock{ public: SpinLock():flag_(false){} void lock(){ bool except = false; while(!flag_.compare_exchange_weak(expect,true)) { 阅读全文
摘要:
``` import os import time import datetime import subprocess import mysql.connector # Docker容器名称 container_name = "containerName" # MySQL数据库连接配置 db_hos 阅读全文
摘要:
```c++ #include QByteArray hash2 = QCryptographicHash::hash(password.toLocal8Bit(), QCryptographicHash::Md5); auto pwd = hash2.toHex().toStdString(); 阅读全文
摘要:
下面是gpt回答的 1.libarchive 使用密码压缩文件和解压缩文件 #include <archive.h> #include <archive_entry.h> #include <stdio.h> #include <string.h> int create_encrypted_arch 阅读全文
摘要:
我刚才用了dynamic_cast 你给我普及一下C++ 中这几种类型转换吧 在C++中,有几种类型转换的方式,包括: 隐式转换 在一些情况下,编译器会自动进行类型转换。比如将整型变量赋值给浮点型变量,编译器就会自动将整型变量转换为浮点型变量。但是在大多数情况下,使用隐式转换可能会引起一些问题,所以 阅读全文
摘要:
QFile file("data.txt"); if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&file); in.setCodec("UTF-8"); // 指定编码格式 QString line = 阅读全文