摘要: 压缩 zip_open创建zip文件,返回zip_t*。 zip_source_file打开文件为一个source,返回zip_source_t*。 zip_file_add把source添加到zip实现把文件添加到zip,返回zip_int64_t。错误时返回-1,调用zip_source_fre 阅读全文
posted @ 2025-04-30 13:28 仰望星河Leon 阅读(97) 评论(0) 推荐(0)
摘要: 1. Qt客户端 思路 点击【检查更新】按钮后,请求服务器获取当前版本信息json,甚至是版本信息字符串。 本地版本信息和最新版本信息比较,若落后,弹出弹框【询问用户是否要更新】,若用户确认则开始文件下载流程。 //使用QNetworkAccessManager发送GET请求,QNetworkRep 阅读全文
posted @ 2025-04-30 09:02 仰望星河Leon 阅读(62) 评论(0) 推荐(0)
摘要: 0.注意 先删除再插入,若主键相同,那就是UPDATE。不要犯蠢先DELETE再INSERT!! 1. 软删除 在使用软删除机制时,通常会为表增加一个表示记录是否被删除的字段,比如is_deleted。通过给该字段置1,表明该字段已删除,而不是直接物理删除。 好处:记录被软删除,仍然留在表中,便于后 阅读全文
posted @ 2025-04-28 09:18 仰望星河Leon 阅读(25) 评论(0) 推荐(0)
摘要: GET #include <fstream> #include <httplib.h> #include <iostream> int main() { httplib::Client cli("http://fanyi.baidu.com"); auto res = cli.Get("/gettt 阅读全文
posted @ 2025-04-20 01:52 仰望星河Leon 阅读(22) 评论(0) 推荐(0)
摘要: libcurl能够根据URL协议头自动识别协议类型 curl_global_init(CURL_GLOBAL_DEFAULT); curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, ftp_url.c_str 阅读全文
posted @ 2025-04-20 01:50 仰望星河Leon 阅读(40) 评论(0) 推荐(0)
摘要: text/event-stream 是一种基于 HTTP 的协议,用于实现服务器推送(Server-Sent Events,简称 SSE)。以下是关于它的定义、功能和应用场景的详细说明: 定义 text/event-stream 是一种 MIME 类型,用于在 Web 应用程序中实现服务器推送。它允 阅读全文
posted @ 2025-04-14 10:07 仰望星河Leon 阅读(296) 评论(0) 推荐(0)
摘要: 以下是后缀名为crt的证书和pem的证书的区别: 定义 • crt证书:crt是“Certificate”的缩写,通常是指X.509证书,是一种包含公钥的数字证书,用于验证通过SSL或TLS加密连接传输的数据的完整性。 • pem证书:pem是“Privacy Enhanced Mail”的缩写,是 阅读全文
posted @ 2025-04-14 09:07 仰望星河Leon 阅读(924) 评论(0) 推荐(0)
摘要: https://rapidjson.org/zh-cn/ 1. 概念 Document类代表整个DOM,每个 JSON 值都储存为 Value 类 #include "rapidjson/document.h" using namespace rapidjson; //把json字符串解析到doc 阅读全文
posted @ 2025-03-27 17:32 仰望星河Leon 阅读(53) 评论(0) 推荐(0)
摘要: https://github.com/mverbert/libzdb 1. 引入项目 地址:http://www.tildeslash.com/libzdb/ 2、安装 ./configure make make install 若出现 --without-<database> 错误,说明你电脑上没 阅读全文
posted @ 2025-03-26 15:33 仰望星河Leon 阅读(70) 评论(0) 推荐(0)
摘要: https://pistacheio.github.io/pistache/docs/ https://blog.csdn.net/zhizhengguan/article/details/116116644 不是head-only库 常用响应码 正确时 response.send(Http::Co 阅读全文
posted @ 2025-03-19 23:30 仰望星河Leon 阅读(40) 评论(0) 推荐(0)