C# net core 汉字转拼音或首字母(PinYinConverterCore)

打开 nuget管理器 搜索 PinYinConverterCore 安装public static class Helper{public static string ToPinYin(this string val, bool first = false) { return

阅读全文

SQL Server获取自增列的下一个id和重置自增列的初始化值

--查询某个表自增列的最大标识值,语法如下SELECT IDENT_CURRENT('TableName');--查询某个表自增类的标识值增量,语法如下:SELECT IDENT_INCR('TableName');--查询某个表自增列的下个标识值,语法如下:SELECT IDENT_CURRENT

阅读全文

c# Mapster对象转换

using Mapster;/// <summary>/// 对象映射/// </summary>public static class MapperExtension{ /// <summary> /// 对象属性映射 /// </sum

阅读全文

.netCore中使用配置实现下载apk文件

更好的选择是从config中读取扩展名/ mime类型对,并将其注入到Config方法中,这样可以从配置中管理扩展名:appsettings.json"StaticFilesConfig": { "AllowedExtensions": { &

阅读全文

C# 控制台,在一行中反复显示不同的内容(应用:进度条)

关键代码其实就两行:  1、将光标定位到最下面一行的最开头(之前的内容可使用 WriteLine 输出,这样光标定位的是换行后的开头);  2、使用 Console.Write() 打印内容!Console.SetCursorPosition(0, Console.CursorTop);Consol

阅读全文

dotnet core webAPI下载文件

[HttpGet] [ProducesResponseType(typeof(FileResult), 200)] public IActionResult downloadfile() { var FilePath = FHostingEnvironment.WebRo

阅读全文

H5低延迟直播流播放器

https://jessibuca.com/

阅读全文

vs code 代码片段

vue3 和 ts{"Print to console": {"prefix": "tsvue3","body": ["<template>","","<

阅读全文

vue3升级至vue3.4/vue升级版本

更新Vue的版本npm add vue@latest更新Vue CLI的版本npm add -g @vue/cli@latest检查依赖npm outdated

阅读全文

c# 备份与还原数据

数据库表CREATE TABLE [dbo].[Sys_Backup]([ID] [int] IDENTITY(1,1) NOT NULL,[Name] [nvarchar](500) NULL,[Version] [nvarchar](500) NULL,[BackupFileName] [nva

阅读全文