摘要: 登录: mysql -u root mysql -uroot -p 修改密码: UPDATE user SET Password = password ( 'new-password' ) WHERE User = 'root' ; flush privileges ; 阅读全文
posted @ 2020-11-11 23:03 超难微猫 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.cnblogs.com/wcrBlog/p/11690460.html public static void BeginCollection() { //var manualRestEventA = new ManualResetEvent(false); //Thre 阅读全文
posted @ 2020-11-06 17:43 超难微猫 阅读(106) 评论(0) 推荐(0) 编辑
摘要: IEnumerable static IEnumerable<int> CreateSimpleIterator() { yield return 10; for (int i = 0; i < 3; i++) { yield return i; ; } yield return 20; } pub 阅读全文
posted @ 2020-11-04 15:03 超难微猫 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 观察者模式(Observer Design Pattern) 订阅注册接收通知 控制反转(Inversion of Control,缩写为IoC) 介绍:是面向对象编程中的一种设计原则 作用:用来降低计算机代码之间的耦合度 常见方式为依赖注入(Dependency Injection,简称DI) 里 阅读全文
posted @ 2020-11-03 10:07 超难微猫 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 网上找了几个方法,但是运行之后会报错,提示要解析的字符串格式不正确。然后我猜想可能是传入的字符串 \u60a8\u4eca\u65e5\u5df2\u7b7e\u5230 中带"\"的原因,加了一行 strDecode=strDecode.Replace("\\",""); 把斜杠去掉,果然,解析成 阅读全文
posted @ 2020-11-02 10:34 超难微猫 阅读(2744) 评论(0) 推荐(0) 编辑
摘要: IEnumerable/IEnumerator 两者区别: IEnumerable 是一个可以被遍历的序列; IEnumerator 像是序列里的光标,多个IEnumerator可以遍历同一个IEnumerable 创建一个集合 var usersList = Enumerable.Range(0, 阅读全文
posted @ 2020-10-29 13:51 超难微猫 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 随手记 C#/.net MVC WebForm SOILD 单一责任原则 (SRP) 开放封闭原则 (OCP) System.Collections LINQ 委托、事件 C# 异步/线程 C# lambda 笔记(不断修正中) 设计模式 从App.config中读取数据库连接字符串 数据库 分库分 阅读全文
posted @ 2020-10-28 11:36 超难微猫 阅读(85) 评论(0) 推荐(0) 编辑
摘要: //System.Linq.Expressions Namespace 包含允许将语言级代码表达式表示为表达式树形式的对象的类、接口和枚举。 //BinaryExpression Class 表示具有二进制运算符的表达式。 //BinaryExpression Class 表示具有二进制运算符的表达 阅读全文
posted @ 2020-10-28 11:24 超难微猫 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 因为爬虫要解析 &#x880cc这种字体编码的值,下载到一个ttf文件,用百度字体编辑器 打开,可以看到每个字符对应的Unicode (数字下方 $23、$2A...这些), 我需要拿到这些映射关系,才能解析对应数字。所以我百度搜索C# 读取ttf文件的unicode但是没有找到答案。直到用goog 阅读全文
posted @ 2020-09-12 16:34 超难微猫 阅读(2253) 评论(0) 推荐(0) 编辑
摘要: 想去抓取一个网站的html源码,但是用Chrome调试工具打开,发现Preview里是乱码,那为什么网页能正常显示呢?我用.net 请求,得到的依旧是乱码,搜索了很多篇文章都没解决问题,直到看了这篇文章: https://blog.csdn.net/zh453030035/article/detai 阅读全文
posted @ 2020-09-03 09:03 超难微猫 阅读(2393) 评论(0) 推荐(0) 编辑