- 博客(14)
- 资源 (8)
- 收藏
- 关注
原创 解决“请求被中止: 未能创建 SSL/TLS 安全通道”的问题
创建请求地址之前添加代码:System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);request.Method = "Get";request.Proxy = new WebProxy();request.GetResponse().GetResponseS
2021-10-11 17:39:22
1391
原创 指定汉字字符串中检索符合拼音索引字符串
/// <summary> /// 指定汉字字符串中检索符合拼音索引字符串 /// </summary> /// <param name="chineseCharacters">汉字字符串</param> /// <param name="isControlCharacter">是否返回控制字符</param> /// <return...
2021-09-22 14:44:00
198
原创 多张图片文件存储PDF格式
using PdfSharp.Drawing;using PdfSharp.Pdf;using System;using System.Collections.Generic; /// <summary> /// 图像文件转Pdf格式 /// </summary> /// <param name="sourceFiles">图像文件 /// Filter:Image Files(*.B...
2021-09-13 16:21:59
205
原创 TXT文件转DataTable和Workbook
/// <summary> /// 实例化Workbook /// </summary> /// <param name="extensionName">扩展名</param> /// <returns></returns> public static IWorkbook InstanceWorkbook(string extensionNa...
2021-09-08 18:01:05
250
原创 JavaScript通过Blob下载文件
function BlobDownloadFile(data) { const type = 'application/vnd.ms-excel'; const fileName = data.FileName; const fileBuffer = data.FileContent; const arrayBuffer = new window.ArrayBuffer(fileBuffer.length); const uint8Buffer = new windo...
2021-09-03 11:40:11
372
原创 MVC项目为Bundel包引用文件添加版本号(解决缓存问题)
1.添加IBundleTransform实现 public class BundleTransform : IBundleTransform { public void Process(BundleContext context, BundleResponse response) { foreach (var file in response.Files) { using (va...
2021-09-02 15:10:11
812
原创 SqlServer存储过程Merge数据进行新增或者更新
use [database_name]goset ansi_nulls ongoset quoted_identifier ongocreate procedure PROCEDURE_IMPORT_{upper(table_name)}asbegin begin try begin transaction; if ((select count(1) from [temp_table_name])> 0) be...
2021-09-01 17:55:38
527
原创 基于DataTable和数据库表结构创建临时表Sql
public string CreateTempTableSql(DataTable sourceDataTable, string sourceTabelName) { var createTempTableSql = string.Empty; try { if (sourceDataTable == null || (string.IsNullOrEmpty(sour...
2021-09-01 16:40:13
659
原创 按指定(字节)长度分段截取字符串
using System;using System.Collections.Generic;using System.Text;namespace Forest.Util.Security{ /// <summary> /// 文本工具类 /// </summary> public class TextHelper { private readonly static string emptyString = stri.
2021-08-24 14:44:27
387
原创 sql server 语句获取表的结构
select b.[name] tableName,a.[name] columnName,c.[name] typeName,a.[length] typeLength,(case when a.colstat=1 then 1 else 0 end )isIdentity,(case when a.colstat=4 then 1 else 0 end )isColstat,(case when isnull(e.[name],'')<>'' then 1 else 0 end) as
2021-08-23 11:44:27
700
原创 读写Ini文件
方法一 public class IniConfig { public static Dictionary<string, Dictionary<string, string>> IniConfigData = new Dictionary<string, Dictionary<string, string>>(); /// <summary> /// 读取Ini文件 ...
2021-07-12 10:57:13
122
原创 排序算法--SortingAlgorithm
/// <summary> /// 排序算法 /// </summary> public class SortingAlgorithm { /// <summary> /// [01][稳定] 冒泡排序 /// 1.比较相邻的元素。如果第一个比第二个大,就交换他们两个。 /// 2.对每一对相邻元素作同样的工作,从开始第一对到结尾的最后一对。这步做完后,最后的元素会是...
2021-07-12 10:44:50
434
转载 “跨库分页”的四种方案
分页需求互联网很多业务都有分页拉取数据的需求,例如:(1)微信消息过多时,拉取第N页消息(2)京东下单过多时,拉取第N页订单(3)浏览58同城,查看第N页帖子
2017-05-23 10:00:09
340
Extraor.Util.Files.zip
2021-09-22
Extraor.Util.Excel.zip
2021-09-07
Extraor.Util.Security.zip
2021-08-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人