摘要:简单工厂模式:从抽象类派生多个类型,在工厂类里面通过静态方法产生对象的实例 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 简单工...
阅读全文
摘要:如何保证一个类只能有一个实例存在? 在多线程情况下如何解决?Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->usingSystem;usingSystem.Collections.Generic;usingSystem.Text;namespaceSingleton{classSingleton{//构造函数私有化,保证不被显式实例化privateSingleton(){}//定义属性,返回Singleton对象privatestaticSi
阅读全文
摘要:最新可用NOD32免ID升级服务器 最新可用NOD32免ID升级服务器 ,请参阅这里,我会保持可用,^_^! 上面的解决不了,下面的慢慢尝试吧! --===------------------------------------------===--- 能用的及说明如下:(说明:我是电信2M独用宽带) http://corin.cn/nod32/约70K,很快 http://guizho...
阅读全文
摘要:1、Asp.net上下文中获得访问路径的常用属性: ?context.Request.PhysicalApplicationPath "E:""XUMH""EDUCTACTION""WEBFORM08""Asp_net_HTTP""" ?context.Request.PhysicalPath "E:""XUMH""EDUCTACTION""WEBFORM08""Asp_net_HTTP
阅读全文
摘要:圣诞节,25日,要交ACCP5.0认证的项目,其中有这样一个要求:书店的所有图书的封面放在了\images\convers\下面,要求所有引用这一路径下的图片都添加书店的店名水印图片。就是说拦截Http请求了,自然想到HttpHandler可以办到。考虑下,实现的效果应该是这样的:为了通用,监视的路径,水印图片路径,默认图片路径3者应该在配置文件里面设定,方便修改;监视路径下的所有图片只要物理存在...
阅读全文
摘要:DataSet包含DataTable类型的数组Tables。 每个DataTable又包含DataRow类型的Rows集合,包含DataColumn类型的Columns集合。 DataTable dataTable = dataSet.Tables[0]; DataRow dataRow = dataSet.Tables[0].Rows[0]; 取得列值: object columnValue =...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/**//*--===------------------------------------------===--- CommandBuilder: 如果DataTable映射到单个数据库表或...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/**//*--===------------------------------------------===--- CommandBuilder: 如果DataTable映射到单个数据库表或...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/**//*--===------------------------------------------===--- 使用DataAdapter来更新数据集 //--===----------...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/**//*--===------------------------------------------===---DataAdapter的数据映射:表和列映射许明会2007年12月22日22:18:09DataSet包含DataTable类型的集合Tables。每个DataTable又包含DataRow类型的Rows集合,包含DataColumn类型的Columns集合,还有表间关系的Rel
阅读全文
摘要:谁都会写代码!几个月的编程经验可以让你写出“可运行应用程序”。让它可运行容易,但是以最有效率的方式编码就需要下更多的功夫! 要知道,大多数程序员在写”可运行代码,“而不是”高效代码“。我们在这个指南课程前面提到,你想成为你们公司”最尊贵的专业人员“吗?写”高效代码“是一项艺术,你必须学习和实践它。 命名惯例和规范 注记 : Pascal 大小写形式-所有单词第一个字母大写,其他字母小写。 Cam...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Data; using System.Configuration; using System.Linq; using System.Web;...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> using System; using System.Web; namespace xumh { /// /// 多个HttpModule的应用示例: /// we...
阅读全文
摘要:HttpModule通过对HttpApplication对象的一系列事件的处理来对HTTP处理管道施加影响。这些事件要在HttpModule的Init方法中进行注册,包括:BeginRequest,AuthenticateRequest, AuthorizeRequest, ResolveRequestCache, AcquireRequestState, PreRequestHandlerExe...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> 无标题页 调用上面的验证程序: Code highlighting produced by Actipro CodeHighlighter (fre...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- XML序列号和反序列化:将类转换为xml文件/将文件转换为xml类 ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- XmlSchema:采用编码实现 许明会 2007年...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- DataSet架构测试 许明会 2007年12月13...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 装箱后,object仍然清楚其存储的类型 许明会 2...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> 测试vs2008对js脚本的支持能力 产品价格: 订购数量: 交付金额:
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> Untitled Page substitution控件可以让缓存的页面部分刷新,从而保持部分数据的动态更新。 该时间将被缓存: ...
阅读全文
摘要:ASP.NET2.0的数据库缓存依赖保证在表的内容发生改变后才使得缓存失效,能够保证缓存数据的及时刷新。根据我的实验,只要客户的重新编译,或者数据库表发生改变,都导致缓存失效。下面是具体的步骤。 1、启用表的缓存依赖,以Pubs数据库的Authors表为例: //aspnet_regsql -S .\sqlexpress -E -d pubs -ed //aspnet_regsql -S .\sq...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 匿名方法: 通过+= 后面跟delegate{}; 以内联方式编码 匿名方法是.N...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->超级郁闷,我希望在Console模式编写程序调用定时器,难道真的不行? 下面这个程序运行根本没有任何反应,有知道的请赐教。 /*--===----------------------------...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 客户端接收程序: TcpClient, NetworkStream ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 服务器端 TcpListener: Start(), AcceptTcpC...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 发送电子邮件 SmtpClient, MailMessage, NetworkCr...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- WebRequest, WebResponse 许明会 ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- WebClient测试 许明会 2007年12月9...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 测试DNS类,实现IP地址和域名之间的转换 许明会 ...
阅读全文
摘要:SilverLight2.0已经RTM了,自然.net framework升级到3.5sp1,大家可以从这里下载。 经历了这么多年(8年),忽然感觉还是底层的东西最可靠,不那么累,还是C语言+数据结构啊。 Download details: .NET Framework 3.5 Microsoft .NET Framework 3.5 Brief Description Microsoft ...
阅读全文
摘要:启动用户实例的进程时出错(Sql Server Exoress)我相信很多人在使用ASP.NET 2.0 + SQL2005 +aspnetdb(MemberShip等功能)时出现这个问题:“由于启动用户实例的进程时出错,导致无法生成 SQL Server的用户实例。该连接将关闭。”,其英文版本的相同问题的错误信息是:“Failed to generate a user instance ofSQ...
阅读全文
摘要:我的博客地址是:http://flaaash.cnblogs.com ,可以通过MetaWeblog访问:http://www.cnblogs.com/flaaash/services/metaweblog.aspx今天发现了几个博客发布工具,实验很好,收藏了。 共享给大家。1、 http://www.zoundry.com/download/zBlogWriter.exe2、Firefox的插件...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- Linq To Object with Lambda Expressions ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- Lambda表达式 Lambda Expressions ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 扩展方法 Extension Methods 许明会 ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 集合初始化器: Collection Initializer ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- Object Initializer: 对象初始化器 可以直接对属性赋值 --==...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 自动属性: Auto Property 常规的属性的get,set不必书写了。 ...
阅读全文
摘要:/*--===------------------------------------------===--- 匿名类型: Anonymouse Type --===------------------------------------------===--- private static void Main() { int[] numArray = new int[] { 3, ...
阅读全文
摘要:staticvoidMain(){int?a=null,b=null;strings=null;///??运算符称为null合并运算符,用于定义可以为null值的类型和引用类型的默认值。///如果此运算符的左操作数不为null,则此运算符将返回左操作数;否则返回右操作数。b=a??781023;Console.WriteLine("{0}",b);Console.WriteLine("sis{0}",s??"NULL");Console.Read();}
阅读全文