Googler

两情相悦,又岂在朝朝暮暮。

05 2011 档案

DbUtility
摘要:public static void BackupSQLServerDB(string connectionString, string backupPath) { using (SqlConnection conn = new SqlConnection(connectionString)) { //string sql = "use master;backup database " + conn.Database + " to disk='" + backupPath + "'"; string sql = &qu 阅读全文

posted @ 2011-05-31 19:41 RockyLOMO 阅读(1559) 评论(0) 推荐(0)

C# SkipList
摘要:SkipListSkipListNode /// <summary> /// Represents a node in a SkipList. A SkipListNode has a Height and a set of neighboring /// SkipListNodes (precisely as many neighbor references as its Height, although some neighbor /// references may be null). Also, a SkipListNode contains some piece of d 阅读全文

posted @ 2011-05-23 13:19 RockyLOMO 阅读(768) 评论(0) 推荐(0)

c# 渐变算法
摘要:/// <summary> /// 渐变算法 /// </summary> /// <param name="sourceImg">位图源(物理路径)</param> /// <param name="colorHead">起点色(HTML格式)</param> /// <param name="colorTail">终点色(HTML格式)</param> /// <param name="imgPath"> 阅读全文

posted @ 2011-05-18 15:40 RockyLOMO 阅读(3110) 评论(1) 推荐(0)

DbCommand Extensions
摘要:public static DbCommand AddInParameter(this DbCommand cmd, string parameterName, object value) { DbParameter para = cmd.CreateParameter(); para.ParameterName = parameterName; para.Value = value ?? DBNull.Value; cmd.Parameters.Add(para); return cmd; } public static DbCommand AddInParameter(this DbCom 阅读全文

posted @ 2011-05-17 17:11 RockyLOMO 阅读(437) 评论(0) 推荐(0)

SetNoCache()
摘要:public static void SetNoCache() { HttpContext context = HttpContext.Current; context.Response.Buffer = true; context.Response.Charset = "gb2312"; context.Response.ContentType = "text/plain"; context.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1); context.Response.Cache.SetEx 阅读全文

posted @ 2011-05-08 12:29 RockyLOMO 阅读(310) 评论(0) 推荐(0)

Graph 数据结构
摘要:NodeGraphNode /// <summary> /// Represents a node in a graph. A graph node contains some piece of data, along with a set of /// neighbors. There can be an optional cost between a graph node and each of its neighbors. /// </summary> /// <typeparam name="T">The type of data 阅读全文

posted @ 2011-05-07 21:52 RockyLOMO 阅读(546) 评论(0) 推荐(0)

SpinWait
摘要:/// <summary> /// SpinWait只有在SMP或多核CPU下才具有使用意义。在单处理器下,旋转非常浪费CPU时间,没有任何意义。 /// 自旋锁特性导致其比较适用一些轻量级,极短时间的多核cpu系统上的锁保护。 /// </summary> public struct SpinWait { public static readonly bool IsSingleProcessor; private const int yieldFrequency = 4000; private const int yieldOneFrequency = 3 * yie 阅读全文

posted @ 2011-05-05 10:00 RockyLOMO 阅读(912) 评论(0) 推荐(0)

导航

Apple/苹果笔记本 Mac Air MC968CH/A 行货在保 I5 11寸 超级本