摘要: winform开发中,遇到“线程间操作无效: 从不是创建控件“Form2”的线程访问它”,明明使用了网上说的this.invoke,怎么还是会报这个错误呢? 代码如下,由于是测试configureAwait功能时发现的,所以带了它的一些使用 private async void button7_Cl 阅读全文
posted @ 2023-11-25 14:30 lunawzh 阅读(114) 评论(0) 推荐(0) 编辑
摘要: vue2中,改变集合或数据某值时有时候并不会自动更新到视图上去,解决办法 1、官方推荐 例如: projectList数组,show值点击一次改变一次方向 <td v-on:click="alertSub(index)"><a href="javascript:;">{{item.}}</a></t 阅读全文
posted @ 2023-05-13 18:12 lunawzh 阅读(895) 评论(0) 推荐(0) 编辑
摘要: var name="张"; var sql = "select * from goods where name like @name "; var res = conn.Query<Goods>(sql, new { @name = name + '%' }).ToList(); 阅读全文
posted @ 2022-12-29 20:31 lunawzh 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 一、HashSet去重 1、对简单类型的去重 HashSet<int> ints = new HashSet<int>() { 1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1}; foreach (var item in ints) { Console.WriteLine(ite 阅读全文
posted @ 2022-06-25 08:57 lunawzh 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 直接看实例 对日期字符串提取期中的数字 1、使用match string d = "12/5/2022 14:55:40"; var reg = new Regex(@"^(\d{1,2})\/(\d{1,2})\/(\d{4})\s+(.+)"); var ms = reg.Match(d); i 阅读全文
posted @ 2022-04-18 17:09 lunawzh 阅读(174) 评论(0) 推荐(0) 编辑
摘要: System.Text.Json.JsonException: A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maxi 阅读全文
posted @ 2022-02-19 17:50 lunawzh 阅读(525) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-02-14 22:40 lunawzh 阅读(21) 评论(0) 推荐(0) 编辑
摘要: https://getwaves.io/ 设计网站时可以用到这种造浪效果,使用得当界面会非常漂亮 阅读全文
posted @ 2022-02-14 22:30 lunawzh 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 错误信息: A possible object cycle was detected which is not supported. This can either be due to a cycle or if the object depth is larger than the maximum 阅读全文
posted @ 2022-02-05 18:33 lunawzh 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 如果商品与货柜存在外键,比如: public class Good{ public long id{ get; set; } public string name{get;set;} public long CabinetId { get; set; } public Cabinet Cabinet 阅读全文
posted @ 2022-02-05 11:19 lunawzh 阅读(39) 评论(0) 推荐(0) 编辑