上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
摘要: 一、创建控制台项目 二、安装Tesseract 三、安装语言包 路径:bin\Debug\net5.0\tessdata 四、执行Demo static void Main(string[] args) { string txtResult = string.Empty; using (var en 阅读全文
posted @ 2022-06-24 09:59 后跳 阅读(69) 评论(0) 推荐(0) 编辑
摘要: .NET var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers(); // Learn more about config 阅读全文
posted @ 2022-06-15 01:18 后跳 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 构造注入时接收空对象导致执行错误的处理方式: 基本情况: interface ILog { void Info(string msg); void Wran(string msg); } class BankAccount { private readonly ILog log; private i 阅读全文
posted @ 2022-06-13 11:07 后跳 阅读(15) 评论(0) 推荐(0) 编辑
摘要: Server: using System.Text; Console.WriteLine("UDP Server Satrt..."); Socket udpServer = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, Proto 阅读全文
posted @ 2022-06-13 00:22 后跳 阅读(26) 评论(0) 推荐(0) 编辑
摘要: suggested use Asynchronous Programming(Async Task) Server: int connectCount = 0; Console.WriteLine("wait for conncet..."); Socket tcpServer = new Sock 阅读全文
posted @ 2022-06-13 00:04 后跳 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 基础配置(连接、访问等) public class MongoDBHelper<T> where T : class { private static MongoClient _mongoClient; private static IMongoDatabase _mongodb; private 阅读全文
posted @ 2022-06-11 18:49 后跳 阅读(592) 评论(0) 推荐(0) 编辑
摘要: 解释器模式(Interpreter Pattern) 提供了评估语言的语法或表达式的方式,它属于行为型模式。这种模式实现了一个表达式接口,该接口解释一个特定的上下文。这种模式被用在 SQL 解析、符号处理引擎等。 .情景:将 string input = "(12+5)-(12+1)";进行解析,并 阅读全文
posted @ 2022-05-27 16:07 后跳 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 两个银行之间进行汇款: public class BankAccount { private int balance; private int overdraft = -500; /// <summary> /// 存款 /// </summary> /// <param name="amount" 阅读全文
posted @ 2022-05-26 13:44 后跳 阅读(40) 评论(0) 推荐(0) 编辑
摘要: public class BankAccount { private int balance; private int overdraft = -500; /// <summary> /// 存款 /// </summary> /// <param name="amount"></param> pu 阅读全文
posted @ 2022-05-26 10:54 后跳 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 命令模式(Command Pattern)是一种数据驱动的设计模式,它属于行为型模式。请求以命令的形式包裹在对象中,并传给调用对象。调用对象寻找可以处理该命令的合适的对象,并把该命令传给相应的对象,该对象执行命令。 银行取款存款例子: 把各中操作扁平化,然后自定义编辑指令进行组合。最后按顺序执行! 阅读全文
posted @ 2022-05-26 09:13 后跳 阅读(17) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页