岚天逸见

08 2023 档案

利用CONVERT和CAST解决MySQL查询的乱码问题
摘要:有如下一张表 : ```sql CREATE TABLE t_test_table (f_f1 varchar(16)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3; ``` 往表 t_test_table 的 f_f1 字段写入的为 阅读全文

posted @ 2023-08-30 17:14 岚天逸见 阅读(79) 评论(0) 推荐(0) 编辑

chatGPT的js信号量实现
摘要:### 信号量类 在 JavaScript 中,可以使用 Promise 和 async/await 来模拟信号量,下面是一个简单的信号量实现: ```js class Semaphore { constructor(maxConcurrency) { this.maxConcurrency = m 阅读全文

posted @ 2023-08-28 18:20 岚天逸见 阅读(33) 评论(0) 推荐(0) 编辑

Linux CPU 使用率统计
摘要:CPU 使用率统计脚本: ```bash for ((i=0;i<10000;++i)) do top -n 1|awk -F'[,| ]+' /'%Cpu'/'{ printf("%s %.01f\n",strftime("[%Y-%m-%d %H:%M:%S]",systime()),100-$ 阅读全文

posted @ 2023-08-25 15:00 岚天逸见 阅读(29) 评论(0) 推荐(0) 编辑

chatGPT用C++写的HMAC-SHA256函数
摘要:以下内容全为 chatGPT 生成: ```cpp #include #include #include #include std::string hmac_sha256(const std::string &key, const std::string &data) { unsigned char 阅读全文

posted @ 2023-08-15 15:58 岚天逸见 阅读(276) 评论(0) 推荐(0) 编辑

导航

统计信息

点击右上角即可分享
微信分享提示