摘要: public static class Util{ /// <summary> /// MBD compact method (c) 2004 Alexander Youmashev /// !!IMPORTANT!! /// !确保调用此方法前要压缩的数据库没有打开的连接,为防止万一,应在压缩前进行备份。 /// !!IMPORTANT!! /// </summary> /// <param name="connectionString">到源数据库的连接字符串,源数据库是指要压缩的数据库</param> /// <p 阅读全文
posted @ 2011-04-18 18:54 梦幻泡影 阅读(426) 评论(0) 推荐(0) 编辑
摘要: 摘自 http://topic.csdn.net/u/20101231/09/039bdd22-3f0a-4bbb-908e-d887b4d7bbfe.html?19933"^\d+$" //非负整数(正整数 + 0)"^[0-9]*[1-9][0-9]*$" //正整数"^((-\d+)|(0+))$" //非正整数(负整数 + 0)"^-[0-9]*[1-9][0-9]*$" //负整数"^-?\d+$" //整数"^\d+(\.\d+)?$" //非负浮点数(正浮点数 阅读全文
posted @ 2011-04-17 19:33 梦幻泡影 阅读(304) 评论(1) 推荐(0) 编辑
摘要: /*----------------*//*** DHTML date validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)*/// Declaring valid date character, minimum year and maximum yearvar dtCh= "/";var minYear=1900;var maxYear=2100;function isInteger(s){ var i; for (i = 0; i < s.length; i 阅读全文
posted @ 2011-04-17 14:47 梦幻泡影 阅读(689) 评论(0) 推荐(0) 编辑
摘要: 可以在 Medium Trust Level 下运行的配置声明配置节<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" requirePermission="false"/>配置 <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <bytecode-pr 阅读全文
posted @ 2011-04-17 14:42 梦幻泡影 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Process open = new Process();open.StartInfo.FileName = "explorer";open.StartInfo.Arguments = @"/select," + location;open.Start(); 阅读全文
posted @ 2011-04-16 11:30 梦幻泡影 阅读(779) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// Rar 是调用 rar 命令行的工具。 /// </summary> public class Rar { /// <summary> /// /// </summary> /// <param name="rarCommandPath">rar命令行工具在路径,例如:"C:\Program Files\WinRAR\rar.exe"</param> public Rar(string rarCommandPath) { this._RarComm 阅读全文
posted @ 2011-04-16 11:19 梦幻泡影 阅读(1090) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> // // javascript 判断一个数字是不是身份证号 // 代码摘自 http: //topic.csdn.net/u/20110102/22/e79df4e8-7b0a-4c65-9490-1ef39837ff36.html?8841 function isChinaIDCard(StrNo) { StrNo = StrNo.toString() if (StrNo.length == 18) { var a, b, c if (!isInteger(StrNo.substr(0, 17) 阅读全文
posted @ 2011-04-16 11:15 梦幻泡影 阅读(869) 评论(0) 推荐(1) 编辑
摘要: 代码从csdn复制,未做测试public static class ChineseNumberUtil{ /// <summary> /// 将中文数字转换成阿拉伯数字 /// </summary> /// <param name="cnNumber"></param> /// <returns></returns> static int ConverToDigit(string cnNumber) { int result = 0; int temp = 0; foreach (char c in c 阅读全文
posted @ 2011-04-15 14:55 梦幻泡影 阅读(914) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Text;using System.IO;using System.Linq;using System.Net;/// <summary>/// 实用工具类。这个类支持以get和post方法读取网页, 支持代理和cookie/// </summary>public class PageLoader{ public string _proxy = null; public string Proxy { get { return _proxy; } set { _proxy = value; } } class Trust 阅读全文
posted @ 2011-04-15 14:50 梦幻泡影 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 支持 info.A.B.C 这样的排序表达式 /// <summary> /// 在 linq 查询中使用字符串表达式进行排序 /// </summary> public static class OrderByStringExpressionExtensions { public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> source, string property) { return ApplyOrder<T>(source, property 阅读全文
posted @ 2011-04-14 19:04 梦幻泡影 阅读(678) 评论(0) 推荐(0) 编辑