摘要: 在 Snowflake 算法中,通常包含以下几个部分来构造一个唯一的 ID: 时间戳(Timestamp):占据了 64 位 ID 中的高 41 位,用来表示生成 ID 的时间。通过时间戳的递增,保证了生成的 ID 是递增且唯一的。 数据中心 ID(Data Center ID):用于标识不同的数据 阅读全文
posted @ 2024-03-20 19:23 He_LiangLiang 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 在C++中实现单例模式可以使用模板和C++11的特性来达到目的。下面是一个简单的示例代码: #include <iostream> template <typename T> class Singleton { public: static T& getInstance() { static T i 阅读全文
posted @ 2024-03-20 15:39 He_LiangLiang 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 错误信息 "Host '192.168.10.103' is not allowed to connect to this MariaDB server" 指出,从 IP 地址 192.168.10.103 尝试连接到 MariaDB 服务器的客户端被拒绝,因为该主机没有被授权访问数据库服务器。 要 阅读全文
posted @ 2024-03-20 06:38 He_LiangLiang 阅读(10) 评论(0) 推荐(0) 编辑
摘要: https://github.com/MariaDB/mariadb-docker/tree/master AIchatOS https://chat18.aichatos.xyz/#/chat/1710920186749 阅读全文
posted @ 2024-03-20 00:56 He_LiangLiang 阅读(2) 评论(0) 推荐(0) 编辑