博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2015年6月17日

摘要: tomcat 的ssl 会使用到jks,而haproxy的ssl(非tcp代理方式)会使用到pem如果从tomcat的ssl需要迁移到haproxy的ssl,就需要从jks中读取相关信息生成pem文件。========================先通过keytool导出成PKCS12格式(.p1... 阅读全文

posted @ 2015-06-17 14:50 fochan 阅读(1622) 评论(0) 推荐(0) 编辑

2015年6月12日

摘要: 以log4net为例,分为两种情况1.不同version,相同publicKeyToken在bin里放较新版本的dll并在web|app.config的下放 ... 阅读全文

posted @ 2015-06-12 10:07 fochan 阅读(1861) 评论(1) 推荐(4) 编辑

2014年5月20日

摘要: 1.在主服务器添加自定义登陆用户,比如TestUser2.在主服务器执行如下SQL,在master数据库创建存储过程sp_hexadecimal,sp_help_revloginUSE masterGOIF OBJECT_ID ('sp_hexadecimal') IS NOT NULL DROP... 阅读全文

posted @ 2014-05-20 19:05 fochan 阅读(1478) 评论(0) 推荐(0) 编辑

2014年4月16日

摘要: 这里所谓“保值”,是指在setTimeout中指定的时间后,执行指定的方法所用到的“参数”值,跟执行setTimeout时该“参数”值一样。是不是有点懵?看如下例子:=========================================for(var i=0;i<10;i++) { ... 阅读全文

posted @ 2014-04-16 15:10 fochan 阅读(480) 评论(0) 推荐(0) 编辑

2013年11月26日

摘要: 在正常删除Cluster 节点之后,再添加节点时,报“节点已经加入群集”,无法加入,注册表信息删除后可正常移除Cluster服务,如下:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ClusDiskHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ClusSvc转自:http://blog.csdn.net/snowfoxmonitor/article/details/7654593 阅读全文

posted @ 2013-11-26 19:27 fochan 阅读(451) 评论(0) 推荐(0) 编辑

2013年8月14日

摘要: HttpUtility.HtmlEncode HttpUtility.HtmlDecode HttpUtility.UrlEncode HttpUtility.UrlDecode 也会出现此异常。这是asp.net的一个bug。http://connect.microsoft.com/VisualStudio/feedback/details/578670/httputility-htmlencode-fails-in-application-start-with-response-is-not-available-in-this-context装上 .net4.5即可解决。 阅读全文

posted @ 2013-08-14 16:54 fochan 阅读(263) 评论(0) 推荐(0) 编辑

2013年4月11日

摘要: 对应的unicode 范围:\u4e00-\u9FA5select nchar(19968+rand()*(40869-19968)) 阅读全文

posted @ 2013-04-11 20:01 fochan 阅读(192) 评论(0) 推荐(0) 编辑

摘要: C#——db的数据类型对应AnsiString:VarCharBinary:VarBinaryByte:TinyIntBoolean:BitCurrency:MoneyDate:DateTimeDateTime:DateTimeDecimal:DecimalDouble:FloatGuid:UniqueIdentifierInt16:SmallIntInt32:IntInt64:BigIntObject:VariantSingle:RealString:NVarCharTime:DateTimeAnsiStringFixedLength:CharStringFixedLength:NCharX 阅读全文

posted @ 2013-04-11 14:50 fochan 阅读(397) 评论(0) 推荐(0) 编辑

2013年4月8日

摘要: 如果 如下处理select *,rand()*1000 as rfrom t那生成的 r列 都是同一个数。解决方式:select *,rand(ABS(CHECKSUM(NEWID()))) as rfrom t结果:延伸应用场景:将原先的测试数据的操作时间打散到过去的近3个月内update [tbDoc] set OperateDate = DATEADD(dd,-90*rand(ABS(CHECKSUM(NEWID()))),getdate())注:如果 是-90*rand() 则被更新的列的值将是同一个数! 阅读全文

posted @ 2013-04-08 12:27 fochan 阅读(925) 评论(0) 推荐(1) 编辑

2013年1月22日

摘要: 1 Bitmap bm = null; 2 ///图片+文字水印 3 System.Drawing.Image copyImage = System.Drawing.Image.FromFile(System.Web.HttpContext.Current.Server.MapPath("~/Images/xxx.png")); 4 5 string strContent = String.Format("@{0}", "你的文... 阅读全文

posted @ 2013-01-22 10:54 fochan 阅读(923) 评论(0) 推荐(0) 编辑