摘要: 修改站点IP策略的代码using System;using System.Text;using Microsoft.Web.Administration;internal static class Sample{ private static void Main() { using (ServerManager serverManager = new ServerManager()) { Configuration config = serverManager.GetApplicationHostConfiguration(); Co... 阅读全文
posted @ 2013-12-09 20:00 ascrat 阅读(484) 评论(0) 推荐(0) 编辑
摘要: var lastIndex = 0; var dvTest; var timesTotal = 200000; var lastDateTime = new Date().getTime(); window.onload = function(){ dvTest = document.getElementById("test"); TimerUpdater(); } function TimerUpdater(){ var last = new Date().getTime(); while(lastIndex < timesTotal){ dvTest.innerH 阅读全文
posted @ 2013-01-15 14:51 ascrat 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 跨线程安全调用的简单方式this.Invoke((Action) delegate{ button.Enabled = true;}); 阅读全文
posted @ 2012-07-24 21:45 ascrat 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 解决C#中ListView闪烁的办法在项目中使用ListView演示数据的变化过程, 发现闪烁得太厉害了, Google并综合对比后, 发现下面的方法比较简单且有效, 记录一下: 1 internal class ListViewNeverFlickering : System.Windows.Forms.ListView 2 { 3 public ListViewNeverFlickering() 4 { 5 // Activate double buffering 6 this.SetStyle... 阅读全文
posted @ 2012-01-29 16:52 ascrat 阅读(1361) 评论(0) 推荐(0) 编辑
摘要: 兼容主流浏览器的背景遮盖和居中浮动层的CSS样式 html, body { height: 100%; margin: 0px; font-size: 12px; } .mydiv { background: #f1f1f1; padding: 15px 30px; border: 5px solid #ccc; z-index: 99; left: ... 阅读全文
posted @ 2011-08-29 21:15 ascrat 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 在 http://www.regexlib.com/ 找到一个用于日期时间检测的正则表达式, 效果不错. /// <summary> /// 检测是否为可识别的日期时间格式 /// </summary> /// <param name="dateTime"></param> /// <returns></returns> internal static bool CheckDateTimeFormat(string dateTime) { string datePattern = @"^((( 阅读全文
posted @ 2011-06-11 18:31 ascrat 阅读(635) 评论(0) 推荐(0) 编辑
摘要: MS SQL SERVER 存储过程事务的实现方式目前找到两种实现方式:  1, 使用事务的存储过程使用特殊命名, 如UP_ProductAdd_Tran, 内部只需一对事务语句即可管理所有牵涉到业务的其他过程; 其他未使用此种方式命名的过程, 内部不能使用事务相关语句, 只需输出成功失败. 这种方式的好处是容易理解, 你只需要专心业务上的代码, 意外的时候返回错误, 在最外层直接回滚即可...缺... 阅读全文
posted @ 2010-07-01 19:38 ascrat 阅读(721) 评论(0) 推荐(0) 编辑
摘要: 京东商城基于jquery的图片懒加载实现脚本 阅读全文
posted @ 2010-06-29 13:09 ascrat 阅读(1550) 评论(2) 推荐(0) 编辑
摘要: jquery.modalbox 是一个轻量级的对话框插件, 支持模态, URL加载, 拖动. 模态方式如果想支持IE6, 需要bgiframe.js插件修正下拉框bug. 阅读全文
posted @ 2010-05-07 21:17 ascrat 阅读(816) 评论(0) 推荐(0) 编辑