上一页 1 2 3 4 5 6 7 8 9 10 ··· 23 下一页

2023年8月29日

.NET Core Entity Framework Core 创建数据库

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

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

2023年8月25日

JS 捕捉浏览器关闭事件

摘要: function closeWin() { debugger } 阅读全文

posted @ 2023-08-25 14:49 糯米白白 阅读(129) 评论(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 糯米白白 阅读(4) 评论(0) 推荐(0) 编辑

2023年8月23日

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 糯米白白 阅读(467) 评论(0) 推荐(0) 编辑

2023年8月22日

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 糯米白白 阅读(111) 评论(0) 推荐(0) 编辑

2023年8月14日

IIS 添加MIME扩展类型及常用的MIME类型列表

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

posted @ 2023-08-14 11:32 糯米白白 阅读(1225) 评论(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 糯米白白 阅读(248) 评论(0) 推荐(0) 编辑

SQLite 四舍五入

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

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

IIS 请求筛选模块被配置为拒绝包含双重转义序列的请求。

摘要: **方法1:** ``` web.config 内容如下: ``` 只需在其中添加这一节 `` 就行了. **方法2:** ![](https://img2023.cnblogs.com/blog/2922453/202308/2922453-20230814112310108-1394269388 阅读全文

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

2023年8月9日

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 糯米白白 阅读(61) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 23 下一页

导航