摘要: You have a temporary variable assigned to more than once, but is not a loop variable nor a collecting temporary variable.Make a separate temporary variable for each assignment. 阅读全文
posted @ 2007-04-28 14:40 南守拥 阅读(136) 评论(0) 推荐(0) 编辑
摘要: You have a complicated expression. Put the result of the expression, or parts of the expression, in a temporary variable with a name that explains the purpose. 阅读全文
posted @ 2007-04-28 13:56 南守拥 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 我们知道在用ArrayList之类时,Net对系统已经写好的许多类型有排序支持,但只是在相同类型的前提下:如都是Int或都是String。如果混合会怎么呢?/Files/nanshouyong326/TemplateAndStrategyForSort.rar 阅读全文
posted @ 2007-04-27 12:11 南守拥 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 表结构: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Three]') and OBJECTPROPER... 阅读全文
posted @ 2007-04-26 00:01 南守拥 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Visible=' 0 %>'>后台: protected string FormatDate(object date) {if (date == DBNull.Value){ return "n/a";}try{return ((DateTime)date).ToShortDateString(); }catch{ return "n/a"; } } protected str... 阅读全文
posted @ 2007-04-24 12:20 南守拥 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 当向MSMQ队列添加消息时,可以成功。通过计算机管理-》服务和应用程序-》消息队列-》传出队列 便可以找到你创建的特定队列,里面也有添加的消息。但从队列中读取消息出了 远程计算机不可用 remotemachinenotavailable 的错误。郁闷Ing.. 代码如下:/Files/nanshouyong326/MSMQ.rar 阅读全文
posted @ 2007-04-23 11:38 南守拥 阅读(1757) 评论(4) 推荐(0) 编辑
摘要: 林子在了啥鸟都有!怎么出这种错误了。 阅读全文
posted @ 2007-04-23 10:19 南守拥 阅读(2158) 评论(1) 推荐(0) 编辑
摘要: You are using a temporary variable to hold the result of an expression. Extract the expression into a method. Replace all references to the temp with the expression. The new method can then be used in... 阅读全文
posted @ 2007-04-20 17:12 南守拥 阅读(214) 评论(0) 推荐(0) 编辑
摘要: You have a temp that is assigned to once with a simple expression, and the temp is getting in the way of other refactoring.Sample: BeforeCode highlighting produced by Actipro CodeHighlighter (freewar... 阅读全文
posted @ 2007-04-20 16:58 南守拥 阅读(190) 评论(0) 推荐(0) 编辑
摘要: A method's body is just as clear as its name. Put the method’s body into the body of its callers and remove the method.Sample: BeforeRefactorCode highlighting produced by Actipro CodeHighlighter (fr... 阅读全文
posted @ 2007-04-20 16:49 南守拥 阅读(197) 评论(0) 推荐(0) 编辑
摘要: You have a code fragment that can be grouped together.Turn the fragment into a method whose name explains the purpose of the method. Why: First, it increases the chances that other methods can use a ... 阅读全文
posted @ 2007-04-20 15:03 南守拥 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Test1 MyThreadCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace mult... 阅读全文
posted @ 2007-04-19 14:05 南守拥 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Load办天还是用LoadFrom成功。 后来试了下,,把程序集加入,,SNK,就直接可以加载成功了。还没明白怎么回事呢! 阅读全文
posted @ 2007-04-18 15:57 南守拥 阅读(1445) 评论(1) 推荐(0) 编辑
摘要: 在项目中可能会遇到这样的情况,我们需要时时的读取某个信息。如多个人一起报价,每个人的价格要在每个人的面前匿名显示。对于这样的时时性,很多时候我们就是定时的读数据库,显然这样不是最好的办法,在实际应用过程中,会出现很多问题,如速度、服务器负载。当我在看PetShop4.0的时候我看到了AggregateCacheDependency,它实现了Catch于数据库的时时性,并联想到了观察者模式,不知道那... 阅读全文
posted @ 2007-04-18 09:23 南守拥 阅读(1271) 评论(0) 推荐(0) 编辑
摘要: 在项目中我们用SqlHelper,但又加了一下方法是返回Dataset的,于是项目中全部便用了返回DataSet的,看PetShop之类的例子人家用的是SqlDataReader,不知道有啥区别! 找到了一些数据:读取一百万条记录(秒)。SqlClient:Reader["ID"] 64.192304Reader[0] ... 阅读全文
posted @ 2007-04-17 17:29 南守拥 阅读(824) 评论(1) 推荐(0) 编辑
摘要: http://www.xnadevelopment.com/tutorials.shtml http://codeanxiety.com/ 阅读全文
posted @ 2007-04-16 13:55 南守拥 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 请问谁有电子的。呵呵 阅读全文
posted @ 2007-04-16 11:13 南守拥 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 静态缓冲区: a enventCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 try 2 { 3 Device appDevice = new Device();//得到声音设备 4 ... 阅读全文
posted @ 2007-04-12 10:06 南守拥 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 在做ScreenSaver的StartKit时,RSS源总报无效。看错误是 程服务器返回错误: (407) 需要代理身份验证才明白原来是公司上网用的是代理:怎么样给WebClient加上代理呢?代码如下: 下载RSS资源Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter... 阅读全文
posted @ 2007-04-09 17:31 南守拥 阅读(590) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/hide0511/archive/2006/10/24/538281.aspx 阅读全文
posted @ 2007-04-06 16:33 南守拥 阅读(193) 评论(0) 推荐(0) 编辑
摘要: http://www.digipen.edu/main/Webcast/Introduction_to_3-D_Video_Game_Developmenthttp://www.microsoft.com/china/msdn/events/webcasts/shared/webcast/consyscourse/3D.aspx二个资源 http://www.thezbuffer.com/ 阅读全文
posted @ 2007-04-05 17:04 南守拥 阅读(222) 评论(0) 推荐(0) 编辑
摘要: the one is Blog: BlogCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections; 3 4using Castle.ActiveRecord; 5using C... 阅读全文
posted @ 2007-04-03 10:28 南守拥 阅读(546) 评论(1) 推荐(0) 编辑
摘要: 配置文件: 实体类:using System;using Castle.ActiveRecord;using NHibernate.Expression; namespace CastleLearning.OneTable{ [ActiveRecord("[User]")] public class User : ActiveRecordBase { ... 阅读全文
posted @ 2007-04-02 12:20 南守拥 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 实体UserCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2 3namespace NHibernate.Examples.QuickStart 4{ 5 /**//// 6 /// Summary ... 阅读全文
posted @ 2007-03-30 17:22 南守拥 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 对象和关系的映射被定义在XML文件里。这个XML文件被设计成易读易修改。这个映射语言是被定义为以对象为中心的而不是以表为中心的,这叫意味着负我们必须提供可持久化的类。正因为如果,许多NHibernate用户选择手工书写XML映射文件,其实有许多工具可以自动生成XML映射文件的,包括NHibernate.Mapping.Attributes library和许多支持模板级的生成工具(CodeSmit... 阅读全文
posted @ 2007-03-30 16:46 南守拥 阅读(581) 评论(2) 推荐(0) 编辑
摘要: An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data. 一个对象封闭了数据和操作。... 阅读全文
posted @ 2007-03-30 15:46 南守拥 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 事件源对象event.srcElement.tagNameevent.srcElement.type 捕获释放event.srcElement.setCapture(); event.srcElement.releaseCapture(); 事件按键event.keyCodeevent.shiftKeyevent.altKeyevent.ctrlKey 事件返回值event.returnVal... 阅读全文
posted @ 2007-02-13 09:00 南守拥 阅读(1005) 评论(1) 推荐(0) 编辑
摘要: Clients should not be forced to depend on methods that they do not use. 阅读全文
posted @ 2007-02-05 12:46 南守拥 阅读(313) 评论(1) 推荐(0) 编辑
摘要: a.High-level modules should not depend on low-level modules.Both should depend on abstractions.b.Abstractions should not depend on details.Detils should depend on abstractions. 阅读全文
posted @ 2007-02-05 12:39 南守拥 阅读(279) 评论(1) 推荐(0) 编辑
摘要: Subtypes must be substitutable for their base types. 阅读全文
posted @ 2007-02-05 12:33 南守拥 阅读(289) 评论(0) 推荐(0) 编辑
摘要: Software entities (class,modules,functions,etc.) should be open for extension,but closed for modification."Open for extension.":This means that the behavior of the module can be extended.As the requir... 阅读全文
posted @ 2007-02-05 12:28 南守拥 阅读(252) 评论(1) 推荐(0) 编辑
摘要: A class should have only one reason to change. 阅读全文
posted @ 2007-02-05 12:16 南守拥 阅读(203) 评论(1) 推荐(0) 编辑
摘要: Regidity--The system is hard to change because every change forces many other changes to other parts of the system. Fragility--Changes cause the system to break in places that have no concept... 阅读全文
posted @ 2007-02-05 12:05 南守拥 阅读(200) 评论(1) 推荐(0) 编辑
摘要: /Files/nanshouyong326/a.rar 前些日子做了个动态生成控件,但却要在多个页面中使用,从而使代码重复的相当严重,想有时间把它做成控件.用以减少代码重复.上面是做了简单的一步.就没做,主要是思路没想好.. 阅读全文
posted @ 2007-02-02 13:03 南守拥 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 在项目中可能遇到这样的情况,我们要收集项目中的所有信息,而每种信息的收集方法是不一样的,我就遇到了这样的情况。起初我用的是直接收集合并,在二个时就已经很费力了,这次是把所有的信息(有11处之多)收集起来。我想到了策略模式的意图,把策略选择逻辑和策略执行逻辑分开。所以我就把4种选择方法分别做成了四种策略,每种策略的取分数方法做为策略的执行内容。于是上面的类图就出现了。通过应用策略模式我们把一个复杂... 阅读全文
posted @ 2007-01-25 10:25 南守拥 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 照着上面的例子做了,怎么不能用啊。错误如下: 错误Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1NHibernate.MappingException: Could not compile the mapping document: QuickSt... 阅读全文
posted @ 2007-01-18 16:46 南守拥 阅读(624) 评论(0) 推荐(0) 编辑
摘要: ElementCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.Vi... 阅读全文
posted @ 2007-01-17 13:41 南守拥 阅读(487) 评论(0) 推荐(0) 编辑
摘要: AggregateCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.... 阅读全文
posted @ 2007-01-17 11:57 南守拥 阅读(489) 评论(1) 推荐(0) 编辑
摘要: ISimpleWriterCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.N... 阅读全文
posted @ 2007-01-15 16:06 南守拥 阅读(343) 评论(2) 推荐(0) 编辑
摘要: CommandCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.In... 阅读全文
posted @ 2007-01-12 18:25 南守拥 阅读(221) 评论(1) 推荐(0) 编辑