摘要: 1 #include <cassert> 2 #include <cmath> 3 #include <iostream> 4 #include <vector> 5 6 #ifndef M_PI 7 #define M_PI 3.1415926 8 #endif 9 // 定义精度常量 10 co 阅读全文
posted @ 2025-08-05 14:13 禅元天道 阅读(9) 评论(0) 推荐(0)
摘要: 1 enum class Type : int { 2 Undefined = 0, 3 Item1 = 1, 4 Item2 = 2, 5 Item3 = 3 6 }; 7 8 9 template <Type type = Type::Item3> 10 class XDevice; 11 12 阅读全文
posted @ 2025-04-09 17:10 禅元天道 阅读(11) 评论(0) 推荐(0)
摘要: 1 #include <cmath> // 用于数学运算 2 3 // 3D向量结构体(用于表示坐标、方向等) 4 struct vec3 { 5 float x, y, z; 6 7 vec3 operator-(const vec3& other) const { 8 return {x - o 阅读全文
posted @ 2025-04-07 17:40 禅元天道 阅读(20) 评论(0) 推荐(0)
摘要: java生成的密钥: symmetricKey: GpMJAk7pis9tTHQfsoFVbLiy7oMQMgMlOb/OhVsUdLU= publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnBA2p6XqWhWXf5KDeZtwlPvyW 阅读全文
posted @ 2025-03-03 10:31 禅元天道 阅读(28) 评论(0) 推荐(0)
摘要: 1 #ifndef LIVE_DATA_H 2 #define LIVE_DATA_H 3 4 #include <mutex> 5 #include <vector> 6 #include <functional> 7 8 template <typename T> 9 class LiveDat 阅读全文
posted @ 2025-02-19 18:07 禅元天道 阅读(26) 评论(0) 推荐(0)
摘要: windows环境下的基础代码: 1 // server.cpp 2 #include <stdio.h> 3 #include <winsock.h> 4 #pragma comment(lib, "ws2_32.lib") 5 6 int main() 7 { 8 // 初始化DLL 9 WSA 阅读全文
posted @ 2025-02-05 16:47 禅元天道 阅读(15) 评论(0) 推荐(0)
摘要: 1 using XTimePoint = std::chrono::time_point<std::chrono::system_clock>; 2 using XTimeSpan = std::chrono::seconds; 3 4 class XDataTime { 5 public: 6 X 阅读全文
posted @ 2025-01-12 13:51 禅元天道 阅读(31) 评论(0) 推荐(0)
摘要: 在配置文件中设置 USE_MATHJAX = YES . 行内公式, 嵌入在普通文字中. 使用 \f$ 或 \f( 和 \f) 包裹公式代码. 例如 /** * @brief The distance between \f$(x_1,y_1)\f$ and \f$(x_2,y_2)\f$ is * 阅读全文
posted @ 2024-09-23 09:24 禅元天道 阅读(97) 评论(0) 推荐(0)
摘要: 1 TopoDS_Edge edge0 = BRepBuilderAPI_MakeEdge(gp_Pnt(0, 0, 0), gp_Pnt(10, 10, 10)); 2 Geometry::instance()->addShape(ShapeType::Curve, edge0); 3 4 gp_ 阅读全文
posted @ 2024-09-12 14:15 禅元天道 阅读(132) 评论(0) 推荐(0)
摘要: #include <iostream> #include <numeric> #include <thread> #include <vector> template<typename Iterator, typename T> struct threadBlock { void operator( 阅读全文
posted @ 2024-08-08 13:07 禅元天道 阅读(16) 评论(0) 推荐(0)