会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
5
6
7
8
9
10
11
12
13
···
22
下一页
2021年4月29日
Arm 系统查看、修改系统时间
摘要: Arm 系统 查看系统时间:date 修改系统时间: date -s "2021-04-29 11:05:00" 修改时区:export TZ=CST-8 注: UTC 世界时,CST-8 东 8 区时间
阅读全文
posted @ 2021-04-29 11:06 青叶煮酒
阅读(834)
评论(0)
推荐(0)
编辑
2021年4月13日
通过 grpc 请求标头发送自定义数据
摘要: 发送/调用端: Metadata metadata = new Metadata(); metadata.Add("sendid", "123"); SyncInfo syncInfo = new SyncInfo(); client.SetSync(syncInfo, metadata); 接收/
阅读全文
posted @ 2021-04-13 14:49 青叶煮酒
阅读(236)
评论(0)
推荐(0)
编辑
2021年4月12日
gRpc 空参数
摘要: google protobuf 已经提供了空参数,用法示例如下: //greeter.proto import "google/protobuf/empty.proto"; service Greeter{ rpc emptyTestfunction(google.protobuf.Empty) r
阅读全文
posted @ 2021-04-12 14:12 青叶煮酒
阅读(1488)
评论(0)
推荐(0)
编辑
2021年4月9日
cmd 执行程序时有时会卡住,需要点击一下才会继续执行
摘要: 解决方案:cmd 窗口菜单栏右击 -> 属性 -> 选项 -> 编辑选项处,取消“快速编辑模式”。如下图所示: 注:cmd 默认开启了“快速编辑模式”,只要当鼠标点击 cmd 任何区域时,就自动进入了编辑模式,之后的程序向控制台输入内容甚至后台的程序都会被阻塞。我们在控制台里面回车或者右键鼠标后,自
阅读全文
posted @ 2021-04-09 10:59 青叶煮酒
阅读(2983)
评论(0)
推荐(1)
编辑
2021年4月8日
数值很大时,Long 转 Float 数据不正确问题
摘要: 原因:32 位系统中 float 有1个符号位 + 8个2的幂次位 + 23个精度位 = 32位,long 有 1个符号位 + 31个精度位 = 32位, 当 long 的数值大于8 位时,直接转换有效数字会有损失。 测试代码如下:
阅读全文
posted @ 2021-04-08 16:41 青叶煮酒
阅读(317)
评论(0)
推荐(0)
编辑
2021年4月1日
C#/C++ grpc 调用超时设置
摘要: 1. C# 调用时设置一下 deadline 参数即可,示例如下: RegAccessInfo result = client.RegisterRead(regAccessInfo, deadline:DateTime.UtcNow.AddSeconds(2)); 2. C++ 调用时设置一下 Cl
阅读全文
posted @ 2021-04-01 17:42 青叶煮酒
阅读(1044)
评论(0)
推荐(0)
编辑
2021年3月10日
C# 获取本机内网 IPv4 地址
摘要: public static string GetLocalIp() { string hostname = Dns.GetHostName(); IPHostEntry localhost = Dns.GetHostEntry(hostname); if (localhost != null) {
阅读全文
posted @ 2021-03-10 15:47 青叶煮酒
阅读(225)
评论(0)
推荐(0)
编辑
2021年2月27日
electron-vue 文件选择对话框
摘要: 1. 导入 Electron dialog 模块 <script> const { dialog } = require('electron').remote;... </script> 2. 在代码中调用 Electron dialog 模块,如下所示: var selectedFilePath
阅读全文
posted @ 2021-02-27 16:17 青叶煮酒
阅读(1721)
评论(0)
推荐(0)
编辑
css 使用笔记
摘要: 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 青叶煮酒
阅读(52)
评论(0)
推荐(0)
编辑
2021年2月25日
结构化日志工具 Serilog 使用
摘要: 1. 添加 NuGet 包 在解决方案管理器视图中的目标项目上右键 -> 管理 NuGet 程序包; 添加 Serilog、Serilog.Sinks.Console、Serilog.Sinks.File、Serilog.Sinks.Seq、Serilog.AspNetCore、Microsoft.
阅读全文
posted @ 2021-02-25 17:27 青叶煮酒
阅读(574)
评论(0)
推荐(0)
编辑
上一页
1
···
5
6
7
8
9
10
11
12
13
···
22
下一页