摘要: 1 #include <iostream> 2 template <typename ... Ts> 3 struct CNAny { 4 static bool Do(int i) { 5 return (Ts::Do(i) || ...); 6 } 7 }; 8 9 template <type 阅读全文
posted @ 2024-08-27 16:51 RexfieldVon 阅读(1) 评论(0) 推荐(0) 编辑
摘要: HP-Socket 版本 5.3.2 其实这里是取了个巧,因为并不是真正意义上的在 OnClose 中。由于同一个连接的事件是串行的,所以 OnClose 事件不完成 socket 的状态始终悬置。 可以在 OnClose 中启动一个线程或者利用 std::condition_variable 通知 阅读全文
posted @ 2018-11-28 22:12 RexfieldVon 阅读(768) 评论(0) 推荐(0) 编辑
摘要: HP-Socket 版本 5.3.2 HP_Server_GetRemoteAddress 传入参数需要注意: 1、字符串内存需要在外面申请再传入,这个基本上都应该知道; 2、虽然长度是传入的指针,但是也必须先设置好字符串内存大小,否则如果为 0 的话函数会返回 FALSE。 阅读全文
posted @ 2018-11-28 22:08 RexfieldVon 阅读(533) 评论(0) 推荐(0) 编辑
摘要: HP-Socket 版本 5.3.2 HttpSyncClient其实并不需要监听器,在使用它访问网页的时候可以这样做: 阅读全文
posted @ 2018-11-28 22:04 RexfieldVon 阅读(1908) 评论(0) 推荐(0) 编辑
摘要: HP-Socket 版本 5.3.2 SetKeepAliveTime / SetKeepAliveInterval 这一对参数需要在 Start 之前设置,否则可能无效。 参数中的时间不能设置为小于 1000 的值,否则 Start 会失败,GetLastError=2,GetLastErrorD 阅读全文
posted @ 2018-11-28 21:49 RexfieldVon 阅读(3478) 评论(0) 推荐(0) 编辑
摘要: HP-Socket 版本 5.4.2 VisualStudio 在编译工程时如果引用了 HP-Socket 的头文件可能会出现一些莫名其妙的问题,比如说 MAX 宏定义不对啦、应输入标识符啦之类的。 别怀疑自己,不如试试把 HPSocket.h / HPSocket4C.h 头文件放到第一个 #in 阅读全文
posted @ 2018-11-28 21:39 RexfieldVon 阅读(687) 评论(0) 推荐(0) 编辑
摘要: PowerShell强行加入右键菜单也罢了,命令提示符还默认禁用,可谓巨硬又一次智障操作。通过操作注册表可以解除这个封印: 阅读全文
posted @ 2018-11-28 21:27 RexfieldVon 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 首先放结果: 创作步骤: 阅读全文
posted @ 2018-06-15 00:42 RexfieldVon 阅读(1258) 评论(0) 推荐(0) 编辑
摘要: 1. 在 app.module.ts 中引入模块 2. 在 @NgModule.imports 中引入它 阅读全文
posted @ 2018-05-29 23:36 RexfieldVon 阅读(4368) 评论(0) 推荐(1) 编辑
摘要: 1. 使用 ionic g pipe xxx 创建 Pipe 2. 在 components 文件夹下的 components.module.ts 文件中添加 PipesModule 引用: 3. 在 @NgModule 中的 imports 中添加 PipesModule: 4. 在自己的 com 阅读全文
posted @ 2018-05-27 20:12 RexfieldVon 阅读(271) 评论(0) 推荐(0) 编辑