摘要:
Arm 系统 查看系统时间:date 修改系统时间: date -s "2021-04-29 11:05:00" 修改时区:export TZ=CST-8 注: UTC 世界时,CST-8 东 8 区时间
阅读全文
posted @ 2021-04-29 11:06
青叶煮酒
阅读(1077)
推荐(0)
摘要:
发送/调用端: Metadata metadata = new Metadata(); metadata.Add("sendid", "123"); SyncInfo syncInfo = new SyncInfo(); client.SetSync(syncInfo, metadata); 接收/
阅读全文
posted @ 2021-04-13 14:49
青叶煮酒
阅读(251)
推荐(0)
摘要:
google protobuf 已经提供了空参数,用法示例如下: //greeter.proto import "google/protobuf/empty.proto"; service Greeter{ rpc emptyTestfunction(google.protobuf.Empty) r
阅读全文
posted @ 2021-04-12 14:12
青叶煮酒
阅读(1635)
推荐(0)
摘要:
解决方案:cmd 窗口菜单栏右击 -> 属性 -> 选项 -> 编辑选项处,取消“快速编辑模式”。如下图所示: 注:cmd 默认开启了“快速编辑模式”,只要当鼠标点击 cmd 任何区域时,就自动进入了编辑模式,之后的程序向控制台输入内容甚至后台的程序都会被阻塞。我们在控制台里面回车或者右键鼠标后,自
阅读全文
posted @ 2021-04-09 10:59
青叶煮酒
阅读(3976)
推荐(1)
摘要:
原因:32 位系统中 float 有1个符号位 + 8个2的幂次位 + 23个精度位 = 32位,long 有 1个符号位 + 31个精度位 = 32位, 当 long 的数值大于8 位时,直接转换有效数字会有损失。 测试代码如下:
阅读全文
posted @ 2021-04-08 16:41
青叶煮酒
阅读(376)
推荐(0)
摘要:
1. C# 调用时设置一下 deadline 参数即可,示例如下: RegAccessInfo result = client.RegisterRead(regAccessInfo, deadline:DateTime.UtcNow.AddSeconds(2)); 2. C++ 调用时设置一下 Cl
阅读全文
posted @ 2021-04-01 17:42
青叶煮酒
阅读(1272)
推荐(0)
摘要:
public static string GetLocalIp() { string hostname = Dns.GetHostName(); IPHostEntry localhost = Dns.GetHostEntry(hostname); if (localhost != null) {
阅读全文
posted @ 2021-03-10 15:47
青叶煮酒
阅读(243)
推荐(0)
摘要:
1. 导入 Electron dialog 模块 <script> const { dialog } = require('electron').remote;... </script> 2. 在代码中调用 Electron dialog 模块,如下所示: var selectedFilePath
阅读全文
posted @ 2021-02-27 16:17
青叶煮酒
阅读(1866)
推荐(0)
摘要:
1. 在 css 中定义 img 的 src <style> img { content:url("../../assets/power_on.png"); } </style 2. 控件缩放 transform: scaleX(x); /*沿X轴方向缩放*/ transform: scaleY(y
阅读全文
posted @ 2021-02-27 10:59
青叶煮酒
阅读(65)
推荐(0)
摘要:
1. 添加 NuGet 包 在解决方案管理器视图中的目标项目上右键 -> 管理 NuGet 程序包; 添加 Serilog、Serilog.Sinks.Console、Serilog.Sinks.File、Serilog.Sinks.Seq、Serilog.AspNetCore、Microsoft.
阅读全文
posted @ 2021-02-25 17:27
青叶煮酒
阅读(628)
推荐(0)