摘要: 需要引入UAParser,IPTools.Core类库a 1 public static partial class HttpContextExtension 2 { 3 /// <summary> 4 /// 是否是ajax请求 5 /// </summary> 6 /// <param name 阅读全文
posted @ 2024-06-22 13:36 乐 乐——1128 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1 public static partial class Extensions 2 { 3 #region 转换为long 4 /// <summary> 5 /// 将object转换为long,若转换失败,则返回0。不抛出异常。 6 /// </summary> 7 /// <param na 阅读全文
posted @ 2024-06-22 11:44 乐 乐——1128 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1 public class HttpHelper 2 { 3 /// <summary> 4 /// 发起POST同步请求 5 /// </summary> 6 /// <param name="url"></param> 7 /// <param name="postData"></param> 阅读全文
posted @ 2024-06-22 11:24 乐 乐——1128 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1 public class DateTimeHelper 2 { 3 /// <summary> 4 /// 5 /// </summary> 6 /// <param name="dateTime"></param> 7 /// <returns></returns> 8 public stat 阅读全文
posted @ 2024-06-22 11:14 乐 乐——1128 阅读(3) 评论(0) 推荐(0) 编辑
摘要: public static class JsonHelper { /// <summary> /// 将对象序列化为JSON格式 /// </summary> /// <param name="o">对象</param> /// <returns>json字符串</returns> public s 阅读全文
posted @ 2024-06-22 10:58 乐 乐——1128 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 问题 解决方法 一 找到Navicat的安装路径,然后找到sqlncli_x64.msi文件并安装,安装成功后重启Navicat重新进行连接,看是否成功。 解决方法 二如果方法一没有找到找到sqlncli_x64.msi还是Navicat的安装路径,然后找到msodbcsql_64.msi文件并安装 阅读全文
posted @ 2024-04-25 15:10 乐 乐——1128 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 以下汇总了.NET(包括ASP.NET/WinForm等)获取当前路径的各种方法 //获取当前进程的完整路径,包含文件名(进程名)。 string str = this.GetType().Assembly.Location; result: X:\xxx\xxx\xxx.exe (.exe文件所在 阅读全文
posted @ 2024-04-23 17:29 乐 乐——1128 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 1、实体特性[SugarColumn(IsPrimaryKey = true)] 标识是否为主键[SugarColumn(IsIdentity = true)] 是否为自增长[SugarColumn(ColumnName = "id")] 对应数据库表里面的某列[SugarColumn(IsIgno 阅读全文
posted @ 2024-04-19 11:32 乐 乐——1128 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 我的情况是:本机原来安装了5版本,现在需要用8版本,因此机器同时存在了两个sql版本,一个占用了3306端口,一个占用了3307端口,但是后端默认配置的是3306端口,需要灵活更改版本和端口号。 开始吧,安全的更换mysql的端口号,5和8版本都是一样的操作。 停止mysql的服务 在对应盘符找到P 阅读全文
posted @ 2024-01-31 16:32 乐 乐——1128 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 1.主站,从站:Modbus是使用主从关系实现的请求 - 响应协议。 在主从关系中,通信总是成对发生 —— 一个设备必须发起请求,然后等待响应,并且发起设备(主设备)负责发起每次交互。 通常,主设备是人机界面(HMI)或监控和数据采集(SCADA)系统,从设备是传感器、可编程逻辑控制器(PLC)或可 阅读全文
posted @ 2024-01-31 15:58 乐 乐——1128 阅读(38) 评论(0) 推荐(0) 编辑