随笔分类 - ASP.NET/C#
摘要:``` public struct HashCode { private readonly int value; private HashCode(int value) { this.value = value; } public static implicit operator i...
阅读全文
摘要:``` public class RedisRateLimiter { private static Logger LOG = LogManager.GetLogger("redis-limiter"); private static readonly string TIME_KEY = "TIME_KEY"; private static readonly string...
阅读全文
摘要:``` using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Pactera.Bpm.TestProject.MiddlewareTest { [...
阅读全文
摘要:参考 " JWT(JSON WEB TOKENS) 一种无状态的认证机制" "基于Token的WEB后台认证机制" "各种语言版本的基于HMAC SHA256的base64加密" Java与.Net实现实现 结果: eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJ
阅读全文
摘要:POI Excel 单元格背景颜色设置方法以及颜色对照表: 复制 1 2 3 4 5 6 ICellStyle style = workbook.CreateCellStyle(); style.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.Red.I
阅读全文
摘要://服务代码[WebMethod]public string Test(int sleepTimes, int val){ Thread.Sleep(sleepTimes); var log = AppDomain.CurrentDomain.BaseDirectory + "/logs...
阅读全文
摘要:配置文件: 异步操作的连接字符串要加入:Asynchronous Processing=true;MultipleActiveResultSets=true测试代码:using System;using System.Collections.Generic;using ...
阅读全文
摘要:http://www.cnblogs.com/Soar1991/archive/2012/03/30/2426115.htmlQRCode 项目地址:http://qrcodenet.codeplex.com/ASP.NET 输出二维码图片using System;using System.Coll...
阅读全文
摘要:public static Dictionary SearchADInfo(string adName) { string strTemp = "LDAP://xxx.xxx.com"; DirectoryEntry entr...
阅读全文
摘要:下载地址:http://sourceforge.net/projects/itextsharp/iText is a PDF library that allows you to CREATE, ADAPT, INSPECT and MAINTAIN documents in the Portabl...
阅读全文
摘要:var list = session.QueryOver().JoinQueryOver(o => o.PluginModule, NHibernate.SqlCommand.JoinType.InnerJoin).List();
阅读全文
摘要:在我的项目有一些xml数据(格式如下)代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1234567891011121314以前的处理方式是这样:1...
阅读全文
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->// 获取 HttpWorkerRequest引用 IServiceProvider provider = (IServiceProvider)HttpCo...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1base.Response.ContentType="image/jpeg";2Bitmapimage...
阅读全文