C#上位机常用字节转换
字节转化常用方法封装 public class ByteHelper_V2 { /// <summary> /// 3字节的有符号数字转换为有符号整形32位数字 /// </summary> /// <param name="bytes">长度为3的字节数组</param> /// <…
70 2024-11-20 去围观WPF双向绑定数据模型
双向绑定数据模型 public class BaseModel : INotifyPropertyChanged//基础数据模型 { public event PropertyChangedEventHandler? PropertyChanged; protected void OnPropertyChanged([CallerMemberName] string? name = null) { …
65 2024-11-20 去围观WPF使用SqlLite数据库(EF版本)
添加NuGet包:Microsoft.EntityFrameworkCore.Sqlite 添加DataModel public class ResourceMessage { [Key]//主键 [DatabaseGenerated(DatabaseGeneratedOption.Identity)] //设置自增 public string Id { get; set; } public string? OtherK…
53 2024-11-20 去围观C#获取图片主色调算法(聚类提取)
1.调用方法 ColorThief colorThief = new ColorThief(); var thiefColors = colorThief.GetColors(path, ignoreWhite: false); var thiefColor = colorThief.GetAveColor(thiefColors); 2.帮助类代码块 public partial class ColorThief { public con…
52 2024-11-20 去围观MathNet常用计算方法
GoodnessOfFit.RSquared(tempDT, srcDT) Statistics.Variance(oneDts); private static double[] MinMaxNormalization(double[] data) { double min = data.Min(); double max = data.Max(); double range = max - min; double[] normalizedData …
53 2024-11-20 去围观ECG从I和II中得出III、aVR、aVL和aVF的计算公式
//III var voltageIII = voltageII - voltageI; //aVR var voltageaVR = (-0.5 * (voltageII + voltageI)); //aVL var voltageaVL = voltageI -0.5* voltageII; //aVF var voltageaVF = voltageII -0.5* voltageI;
64 2024-11-20 去围观C#通过EF方式使用Sqllite数据库
引用Nuget包 Microsoft.EntityFrameworkCore.Sqlite 创建数据模型类 [Index(nameof(Index))]//添加索引 public class CacheChannelModel { [Key]//主键 [DatabaseGenerated(DatabaseGeneratedOption.Identity)] //设置自增 public int Id …
64 2024-11-20 去围观