摘要: public class Program { static void Main() { Random rd = new Random(); for (int i = 0; i < 10; i++) { int index = rd.Next(0, 4); var stortUrls = ShortU 阅读全文
posted @ 2020-08-20 11:36 摩诘 阅读(1119) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 无损压缩图片 /// </summary> /// <param name="sFile">原图片地址</param> /// <param name="dFile">压缩后保存图片地址</param> /// <param name="flag">压缩质量(数字 阅读全文
posted @ 2020-08-12 10:18 摩诘 阅读(1862) 评论(1) 推荐(0) 编辑
摘要: private static string CreateThumbnail(string filepath, int tWidth, int tHeight) { if (string.IsNullOrEmpty(filepath)) { return ""; } string paramOrigi 阅读全文
posted @ 2020-08-12 10:14 摩诘 阅读(503) 评论(0) 推荐(0) 编辑
摘要: Cron表达式是一个字符串,字符串以5或6个空格隔开,分为6或7个域,每一个域代表一个含义,Cron有如下两种语法格式: (1) Seconds Minutes Hours DayofMonth Month DayofWeek Year (2)Seconds Minutes Hours DayofM 阅读全文
posted @ 2020-08-08 17:10 摩诘 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1 public class QuartzHelper 2 { 3 /// <summary> 4 /// 时间间隔执行任务 5 /// </summary> 6 /// <typeparam name="T">任务类,必须实现IJob接口</typeparam> 7 /// <param name 阅读全文
posted @ 2020-08-08 14:29 摩诘 阅读(751) 评论(0) 推荐(0) 编辑
摘要: CHARINDEX(','+用逗号隔开的字段+',',','+是否包含的字段+',')>0 大于0则存在 阅读全文
posted @ 2020-08-05 19:21 摩诘 阅读(2007) 评论(0) 推荐(0) 编辑
摘要: 比如:string str="6>5"; 要的效果是:bool result=6>5 方案1: 命名空间:System.Data; DataTable dt = new DataTable(); bool result= (bool)dt.Compute("","");dt.Compute(str, 阅读全文
posted @ 2020-07-25 17:11 摩诘 阅读(2184) 评论(0) 推荐(0) 编辑
摘要: 1 public class EnumHelper 2 { 3 #region 获取枚举 4 public static List<EnumValue> GetEnumList(Type enumType) 5 { 6 var list = new List<EnumValue>(); 7 stri 阅读全文
posted @ 2020-07-25 17:05 摩诘 阅读(609) 评论(0) 推荐(0) 编辑
摘要: select t.TABLE_NAME from information_schema.columns t where t.COLUMN_NAME='列名'; 阅读全文
posted @ 2020-07-25 17:03 摩诘 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1、用VS2019建立一个web应用程序,选mvc模板 2、选中项目邮件新建文件夹Webservice,然后添加一般处理程序Verify.ashx然后右键打开改写如下 1 public class VerifyCode : IHttpHandler, IRequiresSessionState 2 阅读全文
posted @ 2020-07-11 12:23 摩诘 阅读(645) 评论(0) 推荐(0) 编辑