摘要:
一、通过NuGet安装IP2Region(支持Framework)如果是Net6则可以使用IP2Region.Net版本 1、IP2Region使用方式: using (DbSearcher search = new DbSearcher(CommonHelper.MapPath("/Resourc 阅读全文
摘要:
比如一个例子: 有一个字符串:pdf,jpg,png,jpge,doc,docx,xls,xlsx,ppt,pptx,rar,zip 把它修改成以逗号连接的扩展名字符串,方法如下: var accept="pdf,jpg,png,jpge,doc,docx,xls,xlsx,ppt,pptx,rar 阅读全文
摘要:
什么是Content-Type?Content-Type是HTTP协议中的一个头部字段,用于指示请求或响应中所传输的实体的媒体类型。 为什么使用Content-Type?使用Content-Type可以告知接收方如何解析和处理传输的数据,确保数据能够正确地被解析和处理。 Content-Type有哪 阅读全文
摘要:
使用Win+R调出运行,输入: 1️⃣ shell:startup 用户开机自启动(程序开机自启动只针对当前登录的用户)打开的目录为C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup 阅读全文
摘要:
dataTable.Columns["Qty"].SetOrdinal(0); dataTable.Columns["Unit"].SetOrdinal(1); 扩展方法: public static class DataTableExtensions { public static void Se 阅读全文
摘要:
问题:先对数据进行时间倒序排列,然后再按照某字符分组,在每个分组内再按照某数字或字符正序排列 解答: var data=list.OrderByDescending(i => i.Date).ToList(); var gData = data.GroupBy(g => g.code).Select 阅读全文
摘要:
1. 将json字符串转化为json对象 方案一:jquery自带的$.parseJSON函数 var jsonstr="{\"id\":\"1\",\"name\":\"jack\"}"; var obj=$.parseJSON(jsonstr); 说明:使用该方法对json字符串的要求比较高,属 阅读全文
摘要:
1.Math.Round:四舍六入五取偶 Math.Round(17.475728155339805, 2, MidpointRounding.AwayFromZero)=17.48 Math.Round(0.0) //0Math.Round(0.1) //0Math.Round(0.2) //0M 阅读全文
摘要:
var data = db.Invoice.Select(i => new InvoiceVM { InvoiceId = i.InvoiceId, GroupIds = SqlFunctions.DateName("yyyy", i.BillDate )+"-"+SqlFunctions.Date 阅读全文
摘要:
比如如下js下的json数据: var list=[ {"ColName":"OrderDate","ColLabel":"日期","ColNewLabel":"日期","IsChecked":1,"Sort":"0"}, {"ColName":"OrderCode","ColLabel":"单据编 阅读全文