摘要: 提问 WPF项目如何使用日志 回答 引入nuget log4net 加入配置特性 [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are locat 阅读全文
posted @ 2024-04-19 13:22 喜爱糖葫芦 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 提问 influxdb查询如何指定时区 回答 import "timezone" option location = timezone.location(name: "America/Los_Angeles") 参考 https://www.influxdata.com/blog/time-zone 阅读全文
posted @ 2024-04-17 14:14 喜爱糖葫芦 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 提问 vs code 如何将markdown导出word 回答 安装 运行 Ctrl + ` pandoc myfile.md -o myfile.docx 阅读全文
posted @ 2024-04-11 09:05 喜爱糖葫芦 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 提问 C# 如何时间戳转时间 回答 string id = TimeZoneInfo.Local.Id; DateTime start = new DateTime(1970, 1, 1) + TimeZoneInfo.Local.GetUtcOffset(DateTime.Now); DateTi 阅读全文
posted @ 2024-04-01 10:08 喜爱糖葫芦 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 提问 如何设置服务恢复 回答 sc.exe failure 服务名 reset=0 actions=restart/60000/restart/60000/restart/60000 阅读全文
posted @ 2024-03-28 11:57 喜爱糖葫芦 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 提问 vscode 如何 markdown创建目录 回答 1.安装插件 ctrl + shift + p 选择 create toc命令 阅读全文
posted @ 2024-03-27 08:26 喜爱糖葫芦 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 提问 git 提交后没push想撤回怎么办 回答 git reset 命令分为两种: git reset –-soft 与 git reset –-hard ,区别是: 前者表示只是改变了HEAD的指向,本地代码不会变化,我们使用git status依然可以看到,同时也可以git commit提交。 阅读全文
posted @ 2024-03-22 10:16 喜爱糖葫芦 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 提问 WPF 如何添加系统托盘 回答 1.引入nuget handycontrol cs xmlns:hc="https://handyorg.github.io/handycontrol" 2.窗体添加控件 cs <hc:NotifyIcon x:Name="NotifyIconContextCo 阅读全文
posted @ 2024-03-21 09:00 喜爱糖葫芦 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 提问 如何避免任务重复执行 回答 public readonly SemaphoreSlim semaphore = new(1); semaphore..Wait(); //do something ... //做完了 semaphore.Release(); 参考 https://learn.m 阅读全文
posted @ 2024-03-19 15:20 喜爱糖葫芦 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 提问 如何 10进制转16进制再转2进制 回答 static int HexString2BinString(object value, int index, int length) { try { if (int.TryParse(value.ToString(), out int intValu 阅读全文
posted @ 2024-02-22 13:33 喜爱糖葫芦 阅读(2) 评论(0) 推荐(0) 编辑