随笔分类 -  C#

摘要:public class UploadFileService { private readonly CacheService _cache; public UploadFileService(CacheService cache) { _cache = cache; } /// <summary> 阅读全文
posted @ 2024-08-22 09:44 一千零一夜 阅读(13) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2021-06-16 16:24 一千零一夜 阅读(3) 评论(0) 推荐(0)
摘要:class MyInit { ALiPayHelper aLiPayHelper = new ALiPayHelper(); HttpClientRequest request = new HttpClientRequest(); public void Init() { Mapper.Initia... 阅读全文
posted @ 2018-10-30 13:49 一千零一夜 阅读(404) 评论(0) 推荐(0)
摘要:/// <summary> /// WPS API接口调用 /// </summary> /// <param name="requestMethod">请求方式(get,post,put,delete)</param> /// <param name="requestUri">接口uri</par 阅读全文
posted @ 2018-07-04 09:33 一千零一夜 阅读(1933) 评论(0) 推荐(0)
摘要:using System; using System.Net.Http; using System.Threading; using System.Threading.Tasks; namespace CookBook { class Program { static void Main(string[] args) { ... 阅读全文
posted @ 2016-06-27 17:42 一千零一夜 阅读(165) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Data.SqlClient;using System.Reflection;using System.Text;using System.Text.RegularExpressio... 阅读全文
posted @ 2015-09-25 18:16 一千零一夜 阅读(179) 评论(0) 推荐(0)
摘要:/// /// post方法 /// /// /// /// public static string postJson(string serverUrl, string reqJson) {... 阅读全文
posted @ 2015-09-14 09:04 一千零一夜 阅读(181) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-09-12 14:31 一千零一夜 阅读(210) 评论(0) 推荐(0)
摘要:using System;namespace Bank{ public class Pay { public string Send(Func funcDo, T context, Bank.User model, Func funcLog, Func funcDoOthe... 阅读全文
posted @ 2015-09-07 23:00 一千零一夜 阅读(13293) 评论(0) 推荐(1)
摘要:private System.Threading.ReaderWriterLock rwl; public DataBase() { rwl = new System.Threading.ReaderWriterLock(); } ... 阅读全文
posted @ 2015-04-18 13:25 一千零一夜 阅读(157) 评论(0) 推荐(0)
摘要:本文转载自 http://www.cnblogs.com/icyJ/p/Parallel_TaskFactory.html很厉害的帖子Barrier _bar;int _maxLength = 20, _maxChannel = 2;//同时最多2条通道,每条通道最多20个数据bool _isCan... 阅读全文
posted @ 2015-04-17 17:30 一千零一夜 阅读(994) 评论(0) 推荐(0)
摘要:js中escape编码在后台+会被替换成空格可以使用encodeURIComponent解决 阅读全文
posted @ 2015-02-02 11:40 一千零一夜 阅读(133) 评论(0) 推荐(0)
摘要:ASP.NET版Memcached监控工具 合计: 0 3 0 5 0 6 0 9 0 7 0 2 dc.aspxusing... 阅读全文
posted @ 2013-12-30 11:25 一千零一夜 阅读(1234) 评论(0) 推荐(0)
摘要:HttpFileCollection hfc = Request.Files; if (hfc.Count > 0) { FileStream fs; Stream _stream; int btLen = 10000; byte[] _byte = new byte[btLen]; int len, ysc = 0; string _root = Server.MapPath("~"); HttpPostedFi... 阅读全文
posted @ 2013-09-30 12:47 一千零一夜 阅读(207) 评论(0) 推荐(0)
摘要://using Newtonsoft.Json; StringBuilder sb = new StringBuilder(); string str = "[{ID:'1',Name:'zhangsan',Other:[{Age:'111'}]}]"; JavaScriptArray javascript = (JavaScriptArray)JavaScriptConvert.DeserializeObject(str); if (javascript.Count > 0) { JavaScript... 阅读全文
posted @ 2013-09-24 10:23 一千零一夜 阅读(13807) 评论(0) 推荐(1)
摘要:using System;using System.Collections.Generic;using System.Web;using System.Drawing.Imaging;using System.Drawing;/// ///MakeThum 的摘要说明/// public class MakeThum{ public MakeThum() { // //TODO: 在此处添加构造函数逻辑 // } /// /// 生成缩略图//带压缩图片不压缩22k压缩2k /// /// 原始路径 ... 阅读全文
posted @ 2013-09-17 11:12 一千零一夜 阅读(334) 评论(0) 推荐(0)
摘要:public static string getUControlHtml(string controlName) { StringBuilder build = new StringBuilder(); HtmlTextWriter htmlWriter = new HtmlTextWriter(new StringWriter(build)); UserControl uc = new UserControl(); Control ctrl = uc.LoadControl(controlName + ".ascx");/... 阅读全文
posted @ 2013-08-16 11:05 一千零一夜 阅读(237) 评论(0) 推荐(0)
摘要:CommonJsonModelAnalyzer.csusing System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConvertJosn{ public class CommonJsonModelAnalyzer { protected string _GetKey(string rawjson) { if (string.IsNullOrEmpty(rawjson)) return... 阅读全文
posted @ 2013-06-07 21:04 一千零一夜 阅读(3250) 评论(0) 推荐(0)
摘要:public delegate void MyDelegate(object sender, EventArgs e); protected void Page_Load(object sender, EventArgs e) { MyDelegate md = new MyDelegate(Button1_Click); //md(Button1, null); md(Button1, new System.EventArgs()); //MyDelegate md1 = new MyDelegate(DropDownLis... 阅读全文
posted @ 2013-06-07 20:50 一千零一夜 阅读(142) 评论(0) 推荐(0)
摘要:protected StringBuilder sb = new StringBuilder(); protected void Page_Load(object sender, EventArgs e) { string str = QConnectSDK.CustomWebRequest.getResponse("/", QConnectSDK.Method.GET, null); Regex reg = new Regex("<img([^\\/>src]+)src=\"([^\"]+)\"([^\\/]*)\\/? 阅读全文
posted @ 2013-04-27 16:07 一千零一夜 阅读(2098) 评论(0) 推荐(1)