会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
simp00
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
15
下一页
2023年5月12日
突然遇到一个加密需求和解密需求
摘要: 下面是gpt回答的 1.libarchive 使用密码压缩文件和解压缩文件 #include <archive.h> #include <archive_entry.h> #include <stdio.h> #include <string.h> int create_encrypted_arch
阅读全文
posted @ 2023-05-12 17:01 simp00
阅读(289)
评论(0)
推荐(0)
2023年4月29日
我刚才用了dynamic_cast 你给我普及一下C++ 中这几种类型转换吧
摘要: 我刚才用了dynamic_cast 你给我普及一下C++ 中这几种类型转换吧 在C++中,有几种类型转换的方式,包括: 隐式转换 在一些情况下,编译器会自动进行类型转换。比如将整型变量赋值给浮点型变量,编译器就会自动将整型变量转换为浮点型变量。但是在大多数情况下,使用隐式转换可能会引起一些问题,所以
阅读全文
posted @ 2023-04-29 14:17 simp00
阅读(62)
评论(0)
推荐(0)
2023年4月12日
Qt 指定编码读取文本文件
摘要: QFile file("data.txt"); if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&file); in.setCodec("UTF-8"); // 指定编码格式 QString line =
阅读全文
posted @ 2023-04-12 18:06 simp00
阅读(245)
评论(0)
推荐(0)
2023年3月20日
Qt 时间戳和时间相关的转换操作
摘要: #chatgpt 1.获取时间戳 #include <QDateTime> #include <QDebug> qint64 timestamp = QDateTime::currentDateTime().toSecsSinceEpoch(); qDebug() << "当前时间戳:" << ti
阅读全文
posted @ 2023-03-20 13:47 simp00
阅读(3056)
评论(0)
推荐(0)
Qt Json 处理
摘要: #chatgpt #include <QJsonDocument> #include <QJsonObject> #include <QDebug> // 从 JSON 字符串中解析数据 void parseJson(const QString& jsonString) { // 将 JSON 字符
阅读全文
posted @ 2023-03-20 13:38 simp00
阅读(67)
评论(0)
推荐(0)
Qt 生成uuid方法
摘要: #chatgpt结果 #include <QUuid> #include <QDebug> int main() { // 生成一个新的 UUID QUuid uuid = QUuid::createUuid(); // 将 UUID 转换为字符串,并打印输出 QString uuidString
阅读全文
posted @ 2023-03-20 10:05 simp00
阅读(1293)
评论(0)
推荐(0)
Qt Tcp Server
摘要: #chatgpt 结果 ##head // TcpServerBase.h #ifndef TCPSERVER_H #define TCPSERVER_H #include <QObject> #include <QTcpServer> #include <QTcpSocket> class Tcp
阅读全文
posted @ 2023-03-20 09:02 simp00
阅读(87)
评论(0)
推荐(0)
Qt 计算字符串和文件的md5 值
摘要: #chatgpt结果 string #include <QCryptographicHash> #include <QDebug> QString string = "Hello, World!"; QByteArray data = string.toUtf8(); QByteArray hash
阅读全文
posted @ 2023-03-20 09:00 simp00
阅读(224)
评论(0)
推荐(0)
2023年2月10日
记录一次svn提交限制提交日志 中文冲突
摘要: 首选通过搜索找到了pre-commit 这个脚本 直接上手修改,最终结果如下 需要的可以看一下 #!/bin/bash export LANG=zh_CN.UTF-8 REPOS="$1" TXN="$2" SVNLOOK=/var/packages/SVN/target/bin/svnlook L
阅读全文
posted @ 2023-02-10 18:41 simp00
阅读(90)
评论(0)
推荐(0)
2023年2月2日
在 Docker 的 Ubuntu 容器中设置 NTP 和时区
摘要: 在 Docker 的 Ubuntu 容器中设置 NTP 和时区需要以下步骤: 安装 NTP 服务器: apt-get update apt-get install ntp 编辑 NTP 配置文件 /etc/ntp.conf,并在文件中添加要使用的 NTP 服务器,例如: server 0.ubunt
阅读全文
posted @ 2023-02-02 11:18 simp00
阅读(1001)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
15
下一页
公告