隐藏页面特效

08 2024 档案

摘要:public async Task<string> Wait3S() { await Task.Delay(3000); Console.WriteLine("Wait 3 S"); return ""; } #region 异步任务-状态机 #if true TestClass testClass 阅读全文 »
posted @ 2024-08-20 23:04 DaiWK 阅读(93) 评论(0) 推荐(1) 编辑
摘要:服务端测试代码 静态类 public class StaticClass { public static int Count = 0; public static int SafeCount = 0; public static int GetCount() { return Count++; } 阅读全文 »
posted @ 2024-08-19 00:39 DaiWK 阅读(27) 评论(0) 推荐(1) 编辑
摘要:冒泡排序 // 冒泡排序加去重 public static int[] DistinctAndOrder(int[] OldArray) { if (OldArray != null && OldArray.Length > 0) { //排序 for (int i = 0; i < OldArra 阅读全文 »
posted @ 2024-08-09 00:04 DaiWK 阅读(28) 评论(0) 推荐(0) 编辑
摘要:一、单一职责、命名规范遵循restful 二、接口安全 参数校验 接口鉴权 敏感数据脱敏、加密 防重复提交(前端控制、时间戳、接口幂等性) 数据防篡改(签名) 阅读全文 »
posted @ 2024-08-08 23:50 DaiWK 阅读(30) 评论(0) 推荐(0) 编辑
摘要:一、Nuget引入 StackExchange.Redis、DistributedLock.Redis依赖 二、使用 StackExchange.Redis 对redis操作做简单封装 public class RedisHelper { private static ConnectionMulti 阅读全文 »
posted @ 2024-08-05 16:12 DaiWK 阅读(65) 评论(0) 推荐(1) 编辑
摘要:晚上睡不着,脑子里总想着一些问题,试着写一写对于SQL查询优化的见解。 首先,数据库有自己的查询优化器,执行一条查询SQL优化器会选择最优的方式(不走索引、走索引、走哪个索引), 所以索引不是越多越好,因为创建索引需要成本,提高索引命中率是优化SQL的关键。 索引分为主键索引和普通索引,在Mysql 阅读全文 »
posted @ 2024-08-01 03:33 DaiWK 阅读(44) 评论(0) 推荐(2) 编辑

点击右上角即可分享
微信分享提示