C#
LLM丶星
小菜鸟一枚,请多关照
展开
-
【串口处理类】
public static class SerialPortUtils { public static List<SerialPort> serialPorts = new List<SerialPort>(); /// <summary> /// 获取所有串口 /// </summary> /// <returns></returns>原创 2022-04-03 16:14:09 · 408 阅读 · 0 评论 -
C# 文件监听新增的一行内容
class Program{static FileSystemWatcher watcher = new FileSystemWatcher();//监听文件发生变化static int currentLine = 0;//记录读取的行号static void Main(string[] args){WatcherStrat(@“监听的文件目录”, “*.ini”, true, false);Console.ReadLine();}/// /// 初始化监听/// /// 需要监听的原创 2021-12-24 18:27:16 · 355 阅读 · 0 评论 -
C# 快速排序
static void Main(string[] args) { int[] array = new int[1000000];//定义一个长度为100的数组 Random random = new Random(); for (int i = 0; i < array.Length; i++) { array[i] = random.Ne...原创 2021-02-18 17:43:34 · 268 阅读 · 0 评论 -
C# 简单选择排序
C# 控制台直接输出 int[] array = new int[100];//定义一个长度为100的数组 Random random = new Random(); for (int i= 0; i < 100; i++) { array[i] = random.Next(1000);//给数组随机分配值 //Thread.Sleep(10)原创 2021-02-18 15:38:48 · 203 阅读 · 0 评论 -
C# 简单冒泡排序
static void Main(string[] args) { int[] array = new int[100];//定义一个长度为100的数组 Random random = new Random(); for (int i= 0; i < 100; i++) { array[i] = random.Next(1000);//给数组随机分配值原创 2021-02-18 14:50:25 · 130 阅读 · 0 评论 -
C# 文字识别功能实现
1.使用Visual Studio 个人版(这里推荐2019版)Nuget包管理器 在浏览中搜索Tesseract下载最新版到项目中进行安装,如最新稳定版4.1.1(本人使用的就是这个)2.需要在项目中新建一个文件夹,名字叫tessdata,然后里面放字库文件,可以在以下链接下载:https://github.com/tesseract-ocr/tessdata下载后缀名为traineddata的文件即可,这里我使用了chi_sim.traineddata和eng.traineddata,用于分别识别中原创 2021-02-18 10:33:25 · 3927 阅读 · 4 评论 -
C#数据库连接池
C#数据库连接池using MySql.Data.MySqlClient;using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;namespace Test{ public class ConnectionPool { private static ConnectionPool cpool = nul原创 2020-09-01 17:38:24 · 2543 阅读 · 0 评论