2014年4月3日
摘要: 1 out_list = ['I am the outlist'] 2 3 def case1(): 4 # out_list is the global varible because it is not assigned in 5 # the function. It is only referenced 6 out_list.append('modified in case2') 7 print('in-case1 print: %s' % out_list) 8 return 9 10 11 def case2():12 # can .. 阅读全文
posted @ 2014-04-03 17:42 bluecoffee 阅读(462) 评论(0) 推荐(0) 编辑
  2013年8月19日
摘要: #include using namespace std;class CBase{public: virtual void PureVirtualMethod() = 0; virtual void VirtualMethod() { cout PureVirtualMethod(); b->CommonMethod(); b->VirtualMethod();}输出:Derived version of pure virtual methodBase version of common functionDerived version of comm... 阅读全文
posted @ 2013-08-19 21:35 bluecoffee 阅读(1452) 评论(0) 推荐(0) 编辑
  2013年8月8日
摘要: 1 #include 2 using namespace std; 3 4 class SlaveClass 5 { 6 public: 7 SlaveClass() 8 { 9 cout << "The construction of slave class" << endl;10 }11 };12 13 14 class MasterClass15 {16 public:17 MasterClass()18 {19 cout << "The construction of master class" << 阅读全文
posted @ 2013-08-08 20:05 bluecoffee 阅读(317) 评论(0) 推荐(0) 编辑
  2011年10月17日
摘要: 1.修改/etc/yum.repos.d/CentOS-Base.repo为:[base] name=CentOS-5 - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch& repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/ gpgcheck=1 gpgkey 阅读全文
posted @ 2011-10-17 09:14 bluecoffee 阅读(443) 评论(0) 推荐(0) 编辑
  2011年5月24日
摘要: 转自:http://www.cnblogs.com/chx197/archive/2008/11/09/1329934.html一、RenderMode属性,值为Block(默认值)为Inline在页面中输入以下代码:<asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager><asp:UpdatePanelID="UpdatePanel1"runat="server"RenderMode=" 阅读全文
posted @ 2011-05-24 12:02 bluecoffee 阅读(314) 评论(0) 推荐(0) 编辑
  2011年5月8日
摘要: 有些补充的是,控件的一些事件是在Page的PreRender之前的,比如说SqlDataSource的DataBind,所以在页面PreRender内,是有机会修改这些控件的参数的。但是可以再PreRender中提前执行控件的数据绑定。为何会有以下两种说法,不太明白。似乎页面的PreRender发生在控件的PreRender之前,所以第一种说法可能比较靠谱。Init,Load,PreRender事件执行顺序:1)控件的Init事件2)控件所在页面的Init事件3)控件所在页面的Load事件4)控件的Load事件5)控件所在页面的PreRender事件6)控件的PreRender事件规律:1)I 阅读全文
posted @ 2011-05-08 21:53 bluecoffee 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 对于插入模式:它首先会去找 InsertItemTemplate;如果没有就去找 EditItemTemplate;如果还没有就去找 ItemTemplate;如果还没有,就显示为空白行。对于编辑模式:它首先会去找 EditItemTemplate,如果没有就去找 ItemTemplate;如果还没有,就显示为空白行。对于查看模式:它首先会去找 ItemTemplate;如果没有,就显示为空白行。 阅读全文
posted @ 2011-05-08 15:51 bluecoffee 阅读(238) 评论(0) 推荐(0) 编辑
  2011年5月2日
摘要: Net 2中5个数据源控件,GridView,DataList,Repeator ,DetailsView,FormView其中前3个用于呈现多列数据,后面2个用于呈现单列数据,即常用的数据明细.GridView和DetailsView控件的布局固定,自定义数据显示的布局功能有限,一般适合布局简单的数据呈现DataList,Repeator和FormView数据控件都有很强的自定义布局能力,如果数据呈现需要较为复杂的布局方案,这3个控件是首选 GridView ,DetailsView和FormView都是2.0版本新增控件,内置了分页,排序等等功能,其改进程度是1.1所提供控件无法比的.Da 阅读全文
posted @ 2011-05-02 20:09 bluecoffee 阅读(316) 评论(0) 推荐(0) 编辑
  2011年4月23日
摘要: 转自:http://topic.csdn.net/u/20071117/11/c1ddc038-8e2a-4f8f-8108-0db57c4d45ab.html感谢原作者。如果熟悉设计或者自己写过框架,虚方法还有种作用就是当做扩展点来使用。比如有一个业务流程,需要执行a b c三个步骤,有很多其它的流程也是执行这三个步骤。但只是B步骤执行的功能不一样。这时可以把流程抽像出来。然后把B方法设置成虚方法。这样其它类继承这个流程类就可以随意改变B步骤的内容并保持原有的流程不变.C# code public class Flow { public void A() { //执行步骤A } public 阅读全文
posted @ 2011-04-23 13:02 bluecoffee 阅读(260) 评论(0) 推荐(0) 编辑
  2010年4月20日
摘要: private void setDHCP() { _doscmd = "netsh interface ip set address 本地连接 DHCP"; Process p = new Process(); p.StartInfo.FileName = "cmd.exe"; p.S... 阅读全文
posted @ 2010-04-20 08:25 bluecoffee 阅读(1112) 评论(0) 推荐(0) 编辑