摘要: 解决方法: 如果是忘记密码, 也可以用这个方法. 管理员身份启动cmd, 按以下步骤执行命令: 1. 停止mysql: net stop mysql 2. 免输密码模式, 文件目录改成自己的: mysqld --defaults-file="D:\MySQL\my.ini" --console -- 阅读全文
posted @ 2022-06-07 15:40 Vaynedy 阅读(894) 评论(0) 推荐(0) 编辑
摘要: 使用 System.AppContext.BaseDirectory 获取到的就是当前程序目录。 读取文件: var jsonFilePath = Path.Combine(System.AppContext.BaseDirectory, "Configs/Config.json"); var js 阅读全文
posted @ 2022-03-22 14:21 Vaynedy 阅读(618) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Runtime.Caching;namespace MyTools { /// <summary> /// 缓存类,此类型是线程安全的 /// </summary> public class CacheHelper { private static 阅读全文
posted @ 2022-02-18 13:42 Vaynedy 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 设置: 显示效果: 阅读全文
posted @ 2022-01-21 11:05 Vaynedy 阅读(275) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 生成随机姓名 /// </summary> public class GetNameHelper { /// <summary> /// 姓 /// </summary> private static List<string> SurnameList = new 阅读全文
posted @ 2021-08-06 17:48 Vaynedy 阅读(849) 评论(0) 推荐(0) 编辑
摘要: -- sql server 获取上周几和本周几 -- @@DATEFIRST 每周以周几开始,周一是 1 ,周日是 7 ,有些机器默认是7,有些机器默认是1 SELECT @@DATEFIRST -- 修改 @@DATEFIRST 的值 SET DATEFIRST 7 -- 查询当前每周是以周几开始 阅读全文
posted @ 2021-07-21 15:13 Vaynedy 阅读(789) 评论(0) 推荐(0) 编辑
摘要: using System.Linq; using System.Net; using System.Net.Sockets; /// <summary> /// 获取本机内网 IPv4 地址 /// </summary> /// <returns></returns> public static s 阅读全文
posted @ 2021-07-02 17:00 Vaynedy 阅读(291) 评论(2) 推荐(0) 编辑
摘要: import socket import struct # 初始化socket对象 def initialSocket(self): self.WrtLog('开始连接服务端...') try: self.tcp_client_socket = socket.socket(socket.AF_INE 阅读全文
posted @ 2021-07-01 14:01 Vaynedy 阅读(129) 评论(0) 推荐(0) 编辑
摘要: select top 1 * from table1 where 1=1 ORDER BY NEWID() 阅读全文
posted @ 2021-06-29 11:15 Vaynedy 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 先创建一个.Net Core应用,用来放到Docker容器中运行。 1.创建 .Net Core 应用,项目名:"App"dotnet new console -o App -n NetCore.Docker 2.启动应用:dotnet run 3.调用Visual Studio Code 中打开包 阅读全文
posted @ 2021-06-29 11:03 Vaynedy 阅读(93) 评论(0) 推荐(0) 编辑