08 2023 档案

C# List.Reverse 方法使用
摘要:此方法用于 Array.Reverse 反转元素的顺序 ``` using System; using System.Collections.Generic; public class Example { public static void Main() { List dinosaurs = ne 阅读全文

posted @ 2023-08-29 11:21 糯米白白 阅读(74) 评论(0) 推荐(0) 编辑

.NET Core Entity Framework Core 创建数据库
摘要:自动创建数据库必须在NuGet 中安装一下EFCore库 Microsoft.EntityFrameworkCore.SqlServer Microsoft.EntityFrameworkCore.Tools 数据迁移常用命令 ``` dotnet ef migrations add NewColu 阅读全文

posted @ 2023-08-29 11:08 糯米白白 阅读(36) 评论(0) 推荐(0) 编辑

JS 捕捉浏览器关闭事件
摘要:function closeWin() { debugger } 阅读全文

posted @ 2023-08-25 14:49 糯米白白 阅读(132) 评论(0) 推荐(0) 编辑

JS 验证URL是否有效
摘要:``` function isValidHttpUrl(string) { try { const newUrl = new URL(string); return newUrl.protocol 'http:' || newUrl.protocol 'https:'; } catch (err) 阅读全文

posted @ 2023-08-25 14:47 糯米白白 阅读(7) 评论(0) 推荐(0) 编辑

npm 安装 pnpm
摘要:[官网](https://www.pnpm.cn/installation)提供了pnpm CLI的两个包,pnpm和@pnpm/exe。 pnpm是pnpm的普通版本,需要Node.js才能运行。 @pnpm.exe与Node.js一起打包为可执行文件,因此它可以在没有安装Node.js的系统上使 阅读全文

posted @ 2023-08-23 12:00 糯米白白 阅读(539) 评论(0) 推荐(0) 编辑

Nginx 常见的三种负载均衡策略
摘要:我们日常中最常见的三种nginx的负载均衡策略应当为(轮询、权重、ip绑定),这其中的区别体现在upstream代码块中,以下是upstream代码块示例(轮询)。 upstream alias { server 127.0.0.1:8080; server 127.0.0.1:8081; } up 阅读全文

posted @ 2023-08-22 09:35 糯米白白 阅读(170) 评论(0) 推荐(0) 编辑

IIS 添加MIME扩展类型及常用的MIME类型列表
摘要:经常用IIS作为下载服务器的时候有时传上去的文件比如 example.mp4 文件名上传后,但是用http打开的时候确显示为 404 文件不存在。其实是IIS对文件的一种保护,不在IIS指定的MIME类型里的文件不会被操作。 常见的有 mp4 / flv / iso / 7z / apk 等扩展名的 阅读全文

posted @ 2023-08-14 11:32 糯米白白 阅读(1460) 评论(0) 推荐(0) 编辑

SQL Server Convert将float 转成日期格式
摘要:日期中存储的是20230101格式的float型数据,要将其转成日期格式方法: convert(date,convert(varchar,convert(int,日期)),120) 先把float转成int,再把int转成varchar,再把varchar转成日期。 阅读全文

posted @ 2023-08-14 11:29 糯米白白 阅读(282) 评论(0) 推荐(0) 编辑

SQLite 四舍五入
摘要:SQLite数据库中需要四舍五入时可使用Round()函数,格式为Round(字段或数据, 小数位数) `select Round(384.690000001, 2)` 阅读全文

posted @ 2023-08-14 11:26 糯米白白 阅读(132) 评论(0) 推荐(0) 编辑

IIS 请求筛选模块被配置为拒绝包含双重转义序列的请求。
摘要:**方法1:** ``` web.config 内容如下: ``` 只需在其中添加这一节 `` 就行了. **方法2:** ![](https://img2023.cnblogs.com/blog/2922453/202308/2922453-20230814112310108-1394269388 阅读全文

posted @ 2023-08-14 11:24 糯米白白 阅读(217) 评论(0) 推荐(0) 编辑

SQL Server 使用charindex和substring截取
摘要:``` --关键字第一次出现开始截取 print substring('123-456-789',1,charindex('-','123-456-789')-1) ``` 输出:123 ``` --关键字最后一次出现开始截取 print SUBSTRING('123-456-789',1,len( 阅读全文

posted @ 2023-08-09 11:13 糯米白白 阅读(95) 评论(0) 推荐(0) 编辑

js 添加和移除disabled属性
摘要:``` //js的方式 //动态修改元素disabled属性 function disableTest(element,val){ document.getElementById(element).disabled=val; } document.getElementById("uid").disa 阅读全文

posted @ 2023-08-09 11:08 糯米白白 阅读(2572) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示