随笔分类 -  程序开发实践之路

一次项目是理论知识的直接或间接的实践过程,记录必要的足迹,以供自己体会之用.
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.ComponentModel; 4using System.Data;... 阅读全文
posted @ 2007-05-08 10:17 南守拥 阅读(964) 评论(0) 推荐(0)
摘要:1. 利用ItemRemovedCallBack实现缓存中的项的依赖。 private void MyItemRemovedCallBack(string key, object value, CacheItemRemovedReason reason) { // remove the item from the cache if... 阅读全文
posted @ 2007-04-30 16:00 南守拥 阅读(214) 评论(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 南守拥 阅读(292) 评论(0) 推荐(0)
摘要:当向MSMQ队列添加消息时,可以成功。通过计算机管理-》服务和应用程序-》消息队列-》传出队列 便可以找到你创建的特定队列,里面也有添加的消息。但从队列中读取消息出了 远程计算机不可用 remotemachinenotavailable 的错误。郁闷Ing.. 代码如下:/Files/nanshouyong326/MSMQ.rar 阅读全文
posted @ 2007-04-23 11:38 南守拥 阅读(1770) 评论(4) 推荐(0)
摘要:林子在了啥鸟都有!怎么出这种错误了。 阅读全文
posted @ 2007-04-23 10:19 南守拥 阅读(2170) 评论(1) 推荐(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 南守拥 阅读(285) 评论(0) 推荐(0)
摘要:Load办天还是用LoadFrom成功。 后来试了下,,把程序集加入,,SNK,就直接可以加载成功了。还没明白怎么回事呢! 阅读全文
posted @ 2007-04-18 15:57 南守拥 阅读(1460) 评论(1) 推荐(0)
摘要:在项目中可能会遇到这样的情况,我们需要时时的读取某个信息。如多个人一起报价,每个人的价格要在每个人的面前匿名显示。对于这样的时时性,很多时候我们就是定时的读数据库,显然这样不是最好的办法,在实际应用过程中,会出现很多问题,如速度、服务器负载。当我在看PetShop4.0的时候我看到了AggregateCacheDependency,它实现了Catch于数据库的时时性,并联想到了观察者模式,不知道那... 阅读全文
posted @ 2007-04-18 09:23 南守拥 阅读(1279) 评论(0) 推荐(0)
摘要:在项目中我们用SqlHelper,但又加了一下方法是返回Dataset的,于是项目中全部便用了返回DataSet的,看PetShop之类的例子人家用的是SqlDataReader,不知道有啥区别! 找到了一些数据:读取一百万条记录(秒)。SqlClient:Reader["ID"] 64.192304Reader[0] ... 阅读全文
posted @ 2007-04-17 17:29 南守拥 阅读(835) 评论(1) 推荐(0)
摘要:在做ScreenSaver的StartKit时,RSS源总报无效。看错误是 程服务器返回错误: (407) 需要代理身份验证才明白原来是公司上网用的是代理:怎么样给WebClient加上代理呢?代码如下: 下载RSS资源Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter... 阅读全文
posted @ 2007-04-09 17:31 南守拥 阅读(603) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/hide0511/archive/2006/10/24/538281.aspx 阅读全文
posted @ 2007-04-06 16:33 南守拥 阅读(200) 评论(0) 推荐(0)
摘要:/Files/nanshouyong326/a.rar 前些日子做了个动态生成控件,但却要在多个页面中使用,从而使代码重复的相当严重,想有时间把它做成控件.用以减少代码重复.上面是做了简单的一步.就没做,主要是思路没想好.. 阅读全文
posted @ 2007-02-02 13:03 南守拥 阅读(152) 评论(0) 推荐(0)
摘要:在项目中可能遇到这样的情况,我们要收集项目中的所有信息,而每种信息的收集方法是不一样的,我就遇到了这样的情况。起初我用的是直接收集合并,在二个时就已经很费力了,这次是把所有的信息(有11处之多)收集起来。我想到了策略模式的意图,把策略选择逻辑和策略执行逻辑分开。所以我就把4种选择方法分别做成了四种策略,每种策略的取分数方法做为策略的执行内容。于是上面的类图就出现了。通过应用策略模式我们把一个复杂... 阅读全文
posted @ 2007-01-25 10:25 南守拥 阅读(253) 评论(0) 推荐(0)
摘要:需要的JavaScriptCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 Div设置Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHi... 阅读全文
posted @ 2007-01-08 20:16 南守拥 阅读(757) 评论(1) 推荐(0)
摘要:.aspx.csCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections; 3using System.ComponentModel; 4using System.Dat... 阅读全文
posted @ 2006-12-27 15:29 南守拥 阅读(267) 评论(1) 推荐(0)
摘要:昨天用添加模板列的方法练了个动态添加列,以适应DataGrid列根据数据库变化。用SetRenderMethodDelegate实现表头合并效果。今天看业务实在看不懂,没事之下,找了个模式,实现了表头和列的固定。不用只能用在IE5以上。 模式如下:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.C... 阅读全文
posted @ 2006-12-26 19:42 南守拥 阅读(1540) 评论(3) 推荐(0)
摘要:测试库Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1CREATE TABLE [T_NanshouyongTest] (2 [ProvName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,... 阅读全文
posted @ 2006-12-25 19:34 南守拥 阅读(604) 评论(1) 推荐(0)
摘要:异步方法及其委托Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Threading; 3 4namespace Examples.AdvancedProgramming.Asynchrono... 阅读全文
posted @ 2006-12-25 11:44 南守拥 阅读(284) 评论(0) 推荐(0)
摘要:http://topic.csdn.net/t/20060212/15/4551821.html在CSDN上也有人提过同样的问题,,也有解答。。可以参考。。 阅读全文
posted @ 2006-12-21 13:29 南守拥 阅读(418) 评论(1) 推荐(0)
摘要:可以在PostBack之后保存其内动态生成控件的状态。 阅读全文
posted @ 2006-12-20 18:49 南守拥 阅读(501) 评论(1) 推荐(0)