﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-Kino's Blog</title><link>http://www.blogjava.net/kinoviti/</link><description /><language>zh-cn</language><lastBuildDate>Wed, 08 Apr 2026 09:48:36 GMT</lastBuildDate><pubDate>Wed, 08 Apr 2026 09:48:36 GMT</pubDate><ttl>60</ttl><item><title>Xen 基础一 虚拟化技术比较篇</title><link>http://www.blogjava.net/kinoviti/archive/2007/04/19/112071.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Thu, 19 Apr 2007 15:06:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2007/04/19/112071.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/112071.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2007/04/19/112071.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/112071.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/112071.html</trackback:ping><description><![CDATA[ 上一篇既然已经说了，现在除了 Xen 还有 VMWare等公司也在做虚拟化，而且VMWare在这个领域简直就是老大哥，那么作为由剑桥大学推出的小黑马 Xen为什么有那么大本事在很短时间内不但吸引了软件界也吸引了硬件界呢。
原因是，Xen真的是很快，性能很好。
对于VMWare等虚拟化软件，其实他是在 虚拟操作系统 与母体操作系统(Host机器)之间采用软件实现一整套硬件的emulator，当虚拟OS运行时，动态的针对虚拟OS的内核指令进行解析和处理，维护所有虚拟硬件的当前状态，同时防止虚拟OS的指令对于真实硬件的任何状态变更。这样的一整套处理一般会占用系统全体性能的30%到50%左右。这就是所谓的微内核虚拟化技术。
而对于Xen所采用的虚拟技术叫做paravirtualization。它在系统管理层（就是OS与硬件之间那一层）中封装了一层API。虚拟OS的CPU调度，内存访问，硬件中断等等都是通过这一层API来完成。在系统管理层中，对MMU,DMA的操作作了优化，所以相比较VMware的实现方式来说，性能上有了提高。不利的点是必须要在guestOS的内核中进行修改，将所有访问硬件的API替换为使用XEN的接口API。但是相比起性能的提高来说，还是值得的。

但是 但是  但是，Xen也有它的死穴：   加载在Xen上的虚拟机需要修改其内核。
对于VMWare我们可以拿普通的 os盘直接安装，不会有太多不爽的地方(FC6下的驱动比较不爽)。可是这些盘在Xen上就别想用了，对于没有VT-x技术的普通pc机器，我们必须下载支持xen的，经过修改的os，现今为止这种os还只限于linux阵营，毕竟么，windows的内核你咋改呢。呵呵。xen在intel和amd的大力支持下，相应的提出了vt-x架构的intel CPU和AMD的Pacifica，这两种机器都支持硬件级别的xen,那么，如果您有幸得到这2种机器，恭喜你，你可以直接使用我们普通的os盘，不用再为启动domainn0而大伤脑筋了。<img src ="http://www.blogjava.net/kinoviti/aggbug/112071.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2007-04-19 23:06 <a href="http://www.blogjava.net/kinoviti/archive/2007/04/19/112071.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Xen 基础一 背景篇</title><link>http://www.blogjava.net/kinoviti/archive/2007/03/09/102841.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Fri, 09 Mar 2007 07:29:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2007/03/09/102841.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/102841.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2007/03/09/102841.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/102841.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/102841.html</trackback:ping><description><![CDATA[既然是随笔，加之我确实也没有什么心得，那就允许我和大家聊一下吧。
说到Xen我们就不能不从虚拟化说起。虚拟化最初的需求就是，降低资源成本，把多操作系统进行集成。（节约思想）
借用我的一位前辈的资料，我就不细说了背景了。
OS虚拟化的概念出现于1972年IBM的一个名叫System 360的系统上。简单的说，就是在OS和硬件之间插入一个系统管理层，系统管理层负责调度多个OS之间的硬件使用，包括MMU，I/O，DMA等等。
在目前的IT系统中，虚拟化越来越成为一个关键的技术领域。主要的原因有以下几点。
费用的节省
目前大多数的服务器应用中，只能使用到服务器自身硬件能力的15%。但是为了扩展不同的业务，用户还需要购置新的服务器。按照统计，数据中心中的一台服务器需要每年一万美元的费用，另外还需要系统维护，管理，硬件和软件的license等等的费用。
在使用了虚拟化技术后，可以在每一台服务器上同时运行多个操作系统和应用。有效的利用服务器硬件自身的能力。从而减低系统的购置费用和全生命周期的维护费用。
提高了系统配布和管理能力
使用虚拟化，可以简单的实现OS的动态配布。patch的安装，不断电的系统维护等等也可以实现。
高可靠性的实现
将硬件与OS之间隔离，OS中所使用的物理设备变成了逻辑设备。提高了系统的可靠性。另外，针对虚拟化的系统，OS的备份恢复等非常容易实现，一旦出现系统故障也可以很快的恢复。
那么什么又是Xen呢：
XEN是一个基于X86平台的虚拟机系统，它支持多个操作系统共用系统硬件，而且更重要的是，它不会导致操作系统的功能性和性能性的劣化。它可以支持多种操作系统的虚拟化，比如Linux，BSD，Windows XP等等。
作为设计目标，XEN希望能够在一台服务器上同时运行多达100个虚拟机（VM）。此外，XEN有以下的几个特性。XEN是最快的和安全性最好的虚拟机系统，它是开源的系统，取得了世界领先的许多公司的支持。还有一点，它是免费的。
相对比已有的几个虚拟机系统，比如VMware，UML（User-Mode Linux）来说，XEN的性能有显著的提高。
此外，XEN提供了对于硬件虚拟化技术的全面支持。比如，Intel新一代的VT-x处理器中支持了CPU，MMU和内存的虚拟化。AMD的Pacifica也有相似的技术。对于此类硬件，XEN可以不修改GuestOS直接进行管理。

<img src ="http://www.blogjava.net/kinoviti/aggbug/102841.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2007-03-09 15:29 <a href="http://www.blogjava.net/kinoviti/archive/2007/03/09/102841.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>AJAX Web Tree 构建方案及实现思想</title><link>http://www.blogjava.net/kinoviti/archive/2006/01/27/29304.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Fri, 27 Jan 2006 08:42:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2006/01/27/29304.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/29304.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2006/01/27/29304.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/29304.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/29304.html</trackback:ping><description><![CDATA[<P>***************************************<BR><SPAN style="FONT-FAMILY: 宋体">关键字：AJAX,Tree,Struts，DOM</SPAN><SPAN lang=EN-US><BR></SPAN><SPAN style="FONT-FAMILY: 宋体">难易度：</SPAN> 中<BR><SPAN style="FONT-FAMILY: 宋体">软件版本：struts 1.2.8</SPAN><SPAN lang=EN-US><BR>时间：2006-01-27<BR>Author：Kino<BR>***************************************</SPAN><BR><BR>前阵子写了一个小代码处理AJAX下WebTree的构建，其中碰到了一些问题，也有一些想法，现在说出来希望大家一起看看，如果案由问题请不吝赐教，本人不胜感激啊。<BR><BR><STRONG>背景：<BR></STRONG>这次因为是加载在Struts上的开发，Web页面上的Tree作AJAX处理，因为有Node的增删改操作。Server端因为要和WebService连接，所以不做Cache。<BR><BR><STRONG>解决案：<BR></STRONG>1。使用Polling调用AJAX定期更新Tree。<BR>2。AJAX访问的地址是一个Action（例：createtree.do）。用来返回Tree模型或者错误消息（国际化）。<BR>3。Browser解析XML的TreeModel。<BR>4。在Browser比较新旧2个TreeModel，完成选中状态的继承。<BR>5。CSS渲染TreeNode。<BR><BR>以上是简单的思路。传统的AJAX应该是尽量减少XMl传输量，迫于没有Cache的缘故，并且WS给我的节点并不能简单的得到父子关系。我选择了，每次Polling更新整棵树的方案。性能未测。<BR><BR>我这次在web server 端构建Tree时直接用深度优先转换成XML。XMl中数据的先后顺序决定了Tree从父到子，从兄到弟的深度优先关系，indent决定了深度（也就是缩进）。这样我从Server端传入的也就成了一个标准的Tree显示Model。格式定义如下。<BR>&nbsp; *&nbsp;Gobal Master Tree DTD <BR>&nbsp;*&nbsp;&amp;lt!ELEMENT tree (tree*)&amp;gt<BR>&nbsp;*&nbsp;&amp;lt!ATTLIST tree<BR>&nbsp;*&nbsp;&nbsp;id&nbsp;&nbsp;&nbsp;CDATA&nbsp;#REQUIRED&nbsp;LoctionInfo's toString<BR>&nbsp;*&nbsp;&nbsp;indent&nbsp;&nbsp;CDATA&nbsp;#REQUIRED&nbsp;Tree's Level<BR>&nbsp;*&nbsp;&nbsp;text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA&nbsp;&nbsp; #REQUIRED&nbsp;label in html<BR>&nbsp;*&nbsp;&nbsp;tooltip&nbsp;&nbsp;&nbsp;&nbsp; CDATA&nbsp;&nbsp; #IMPLIED&nbsp;title in html<BR>&nbsp;*&nbsp;&nbsp;action&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA&nbsp;&nbsp; #IMPLIED&nbsp;href in html<BR>&nbsp;*&nbsp;&nbsp;icon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA&nbsp;&nbsp; #IMPLIED&nbsp;close icon with the node status<BR>&nbsp;*&nbsp;&nbsp;openicon&nbsp;&nbsp;&nbsp; CDATA&nbsp;&nbsp; #IMPLIED&nbsp;open icon with the node status<BR>&nbsp;*&nbsp;&nbsp;open&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA&nbsp;&nbsp; #IMPLIED&amp;gt&nbsp;node's open states ,default is false in server.<BR>&nbsp;*&nbsp;&nbsp;target&nbsp;&nbsp;CDATA&nbsp;#IMPLIED&nbsp;node's open target<BR>&nbsp;*<BR>&lt;span id="maintree"&gt;<BR>&nbsp;&lt;tree id="Ajax" indent=0 text="Root" tooltip="Root" action="/logout.do" icon="" openicon= "" open="false"/&gt;<BR>&nbsp;&lt;tree id="110" indent=1 text="Node 1" tooltip="Node 1" action="/logout.do" icon="" openicon= "" open="false"/&gt;<BR>&nbsp;&lt;tree id="120" indent=2 text="Node 2" tooltip="Node 2" action="/logout.do" icon="" openicon= "" open="false"/&gt;<BR>&nbsp;&lt;tree id="12580" indent=2 text="Node 3" tooltip="Node 3" action="/logout.do" icon="" openicon= "" open="false"/&gt;<BR>&nbsp;&lt;tree id="user" indent=1 text="Node 4" tooltip="Node 4" action="/logout.do" icon="" openicon= "" open="false"/&gt;<BR>&lt;/span&gt;<BR><BR>上边的 Tree显示出来如下<BR>Root<BR>&nbsp;│<BR>&nbsp;├Node 1<BR>&nbsp;│&nbsp;&nbsp;&nbsp; │<BR>&nbsp;│&nbsp;&nbsp;&nbsp; ├Node 2<BR>&nbsp;│&nbsp;&nbsp;&nbsp;&nbsp;└Node 3<BR>&nbsp;└Node 4<BR>indent&nbsp;&nbsp; 就是缩进。<BR>数据的先后顺序就是深度优先的遍历顺序。<BR></P>
<P>这样的数据到了Browser，会先被转成一个对象数组。<BR></P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Tree&nbsp;Node&nbsp;object</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;This&nbsp;function&nbsp;creates&nbsp;a&nbsp;node&nbsp;in&nbsp;the&nbsp;tree&nbsp;with&nbsp;the&nbsp;following&nbsp;arguments:</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;sId&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;The&nbsp;node's&nbsp;index&nbsp;within&nbsp;the&nbsp;global&nbsp;nodes_array</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;iIndent&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;The&nbsp;level&nbsp;within&nbsp;the&nbsp;tree&nbsp;hierarchy&nbsp;(0&nbsp;=&nbsp;top)</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;sText&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;The&nbsp;text&nbsp;displayed&nbsp;in&nbsp;the&nbsp;tree&nbsp;for&nbsp;this&nbsp;node</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;sTooltip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;the&nbsp;tool&nbsp;tip</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;oAction&nbsp;&nbsp;&nbsp;-&nbsp;For&nbsp;a&nbsp;document,&nbsp;the&nbsp;address&nbsp;it&nbsp;will&nbsp;display&nbsp;when&nbsp;clicked</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;sIcon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;the&nbsp;node's&nbsp;icon&nbsp;</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;sIconOpen&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;the&nbsp;node's&nbsp;icon&nbsp;state</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bOpen&nbsp;-&nbsp;true&nbsp;&nbsp;false</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">function</SPAN><SPAN style="COLOR: #000000">&nbsp;GMTreeNode(sId,iIndent,sText,sTooltip,sAction,sIcon,sIconOpen,bOpen,sTarget)<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_567_1052_Open_Image onclick="this.style.display='none'; Codehighlighter1_567_1052_Open_Text.style.display='none'; Codehighlighter1_567_1052_Closed_Image.style.display='inline'; Codehighlighter1_567_1052_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_567_1052_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_567_1052_Closed_Text.style.display='none'; Codehighlighter1_567_1052_Open_Image.style.display='inline'; Codehighlighter1_567_1052_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_567_1052_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_567_1052_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(sId)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.id&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sId;<BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(iIndent)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.indent&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;iIndent;<BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(sText)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.text&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sText;<BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(sAction)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.action&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sAction;<BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(sTooltip)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.tooltip&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sTooltip;<BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(sIcon)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.icon&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sIcon;<BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(sIconOpen)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.iconopen&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sIconOpen;<BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(bOpen)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.open&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;bOpen;<BR></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(sTarget)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.target&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sTarget;<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;//alert(this.id&nbsp;+&nbsp;"&nbsp;&nbsp;"&nbsp;+&nbsp;this.indent&nbsp;+&nbsp;"&nbsp;&nbsp;"&nbsp;+&nbsp;this.text&nbsp;+&nbsp;"&nbsp;&nbsp;"&nbsp;+&nbsp;this.action&nbsp;+&nbsp;"&nbsp;&nbsp;"&nbsp;+&nbsp;</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;this.tooltip&nbsp;+&nbsp;"&nbsp;&nbsp;"&nbsp;+&nbsp;this.icon&nbsp;+&nbsp;"&nbsp;&nbsp;"&nbsp;+&nbsp;this.iconopen&nbsp;+&nbsp;"&nbsp;&nbsp;"&nbsp;+&nbsp;this.open);</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN></DIV><BR>然后会和正在显示的Tree数组 进行一个 比较，用于写入展开状态，代码如下：<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">///////////////////////////////</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt;&gt;Compare&nbsp;</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;compare&nbsp;maintree&nbsp;with&nbsp;maintree.&nbsp;and&nbsp;copy&nbsp;maintree&nbsp;to&nbsp;maintree</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>//</SPAN><SPAN style="COLOR: #008000">///////////////////////////////</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">function</SPAN><SPAN style="COLOR: #000000">&nbsp;compareTreeModel()<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_176_687_Open_Image onclick="this.style.display='none'; Codehighlighter1_176_687_Open_Text.style.display='none'; Codehighlighter1_176_687_Closed_Image.style.display='inline'; Codehighlighter1_176_687_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_176_687_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_176_687_Closed_Text.style.display='none'; Codehighlighter1_176_687_Open_Image.style.display='inline'; Codehighlighter1_176_687_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_176_687_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_176_687_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">alert("I&nbsp;am&nbsp;here&nbsp;in&nbsp;compareTreeModel");</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #008000"><IMG id=Codehighlighter1_247_295_Open_Image onclick="this.style.display='none'; Codehighlighter1_247_295_Open_Text.style.display='none'; Codehighlighter1_247_295_Closed_Image.style.display='inline'; Codehighlighter1_247_295_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_247_295_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_247_295_Closed_Text.style.display='none'; Codehighlighter1_247_295_Open_Image.style.display='inline'; Codehighlighter1_247_295_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(ajaxtree.length&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_247_295_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_247_295_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">ajaxtree&nbsp;is&nbsp;null</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">TODO</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_325_392_Open_Image onclick="this.style.display='none'; Codehighlighter1_325_392_Open_Text.style.display='none'; Codehighlighter1_325_392_Closed_Image.style.display='inline'; Codehighlighter1_325_392_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_325_392_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_325_392_Closed_Text.style.display='none'; Codehighlighter1_325_392_Open_Image.style.display='inline'; Codehighlighter1_325_392_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(maintree.length&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_325_392_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_325_392_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">alert("maintree&nbsp;is&nbsp;null");</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maintree&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;ajaxtree;<BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">compare&nbsp;start</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">var&nbsp;maxlen&nbsp;=&nbsp;Math.max(ajaxtree.length,maintree.length);</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">var</SPAN><SPAN style="COLOR: #000000">&nbsp;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">ajaxtree.length;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_507_659_Open_Image onclick="this.style.display='none'; Codehighlighter1_507_659_Open_Text.style.display='none'; Codehighlighter1_507_659_Closed_Image.style.display='inline'; Codehighlighter1_507_659_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_507_659_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_507_659_Closed_Text.style.display='none'; Codehighlighter1_507_659_Open_Image.style.display='inline'; Codehighlighter1_507_659_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_507_659_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_507_659_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">var</SPAN><SPAN style="COLOR: #000000">&nbsp;j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;j</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">maintree.length;j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_548_655_Open_Image onclick="this.style.display='none'; Codehighlighter1_548_655_Open_Text.style.display='none'; Codehighlighter1_548_655_Closed_Image.style.display='inline'; Codehighlighter1_548_655_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_548_655_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_548_655_Closed_Text.style.display='none'; Codehighlighter1_548_655_Open_Image.style.display='inline'; Codehighlighter1_548_655_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_548_655_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_548_655_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(ajaxtree[i].id&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;maintree[j].id)<BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_594_651_Open_Image onclick="this.style.display='none'; Codehighlighter1_594_651_Open_Text.style.display='none'; Codehighlighter1_594_651_Closed_Image.style.display='inline'; Codehighlighter1_594_651_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_594_651_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_594_651_Closed_Text.style.display='none'; Codehighlighter1_594_651_Open_Image.style.display='inline'; Codehighlighter1_594_651_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_594_651_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_594_651_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">26</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ajaxtree[i].open&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;maintree[j].open;<BR></SPAN><SPAN style="COLOR: #008080">27</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">break</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">28</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">29</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">30</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">31</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">32</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;maintree&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;ajaxtree;<BR></SPAN><SPAN style="COLOR: #008080">33</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">34</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV>maintree 就是正在显示的 Tree，ajaxtree是刚得到的新Tree。2个对象都是TreeNode的数组。而TreeNode对象的Open属性即记录了节点的展开状态。那么这里就对这个节点状态进行“移植”，完毕后，把新Tree模型交付显示方法，也就是ToHtml方法。<BR><BR>转换Html部分算是一个比较容易出bug的危险点。<BR><BR>首先分析一下，生成的代码是什么样子的。<BR>这里仍然用上边的那棵树作例子。<BR>生成的DOM结构应该是<BR>&lt;div 父&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;div&nbsp; 收缩&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;img&nbsp; 折线&nbsp; /&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;img&nbsp;&nbsp;图标 /&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;a 节点动作&gt;节点Label&lt;/a&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;div 子&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....递归的构造<BR>&nbsp;&nbsp;&nbsp; &lt;/div 子&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/div 收缩&gt;<BR>&lt;/div 父&gt;<BR><BR>其次&nbsp;对于这种并不直接含有父子关系的节点首先要判明一个节点的子 和 兄弟，然后用递归解决。<BR>递归的思路如下深度优先：<BR>function toHtml(节点index)<BR>{<BR>&nbsp;&nbsp; var child_html；<BR>&nbsp;&nbsp; if 这个节点有子<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Loop子节点<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; child_html[i] = toHtml(子节点index)；<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; i++；访问下一个子节点<BR>&nbsp;&nbsp; }<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp; var 所有子节点Html模块 = &lt;div 收缩&gt;&nbsp;&nbsp; child_html.join("") &lt;/div&gt;<BR><BR>&nbsp;&nbsp; var 本节点Html模块 = &lt;div 本节点&gt;&lt;div 收缩&gt;&lt;img &gt;&lt;img&nbsp;&nbsp;图标 /&gt;&lt;a 节点动作&gt;节点Label&lt;/a&gt;所有子节点Html模块&lt;/div 收缩&gt;&lt;/div 本节点&gt;;<BR><BR>&nbsp;&nbsp; return&nbsp; 本节点Html模块;<BR>}<BR><BR>树就构建好了。<BR><BR>作为显示，使用了CSS的<BR>background-repeat:&nbsp;repeat-y;<BR>&nbsp;background-image:&nbsp;url("../images/tree/I.png") !important;<BR>&nbsp;background-position-y:&nbsp;1px !important;&nbsp;/* IE only */<BR><BR>还有padding-left作Div的向右偏移，默认的偏移量是19个像素点，然后根据Tree显示模型的indent相乘就ok了。<BR><BR>思路就是这些。希望能对 朋友们有所帮助。<BR>欢迎讨论。<BR><img src ="http://www.blogjava.net/kinoviti/aggbug/29304.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2006-01-27 16:42 <a href="http://www.blogjava.net/kinoviti/archive/2006/01/27/29304.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Subversion 客户端 配置及简单实用</title><link>http://www.blogjava.net/kinoviti/archive/2006/01/27/29291.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Fri, 27 Jan 2006 03:19:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2006/01/27/29291.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/29291.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2006/01/27/29291.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/29291.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/29291.html</trackback:ping><description><![CDATA[<P class=MsoTitle style="MARGIN: 12pt 0cm 3pt"><FONT size=5><SPAN lang=EN-US><FONT face=Arial><FONT color=#0000ff>请用过subversion的朋友一起交流一下使用心得吧。</FONT><BR><BR><STRONG>Subversion </STRONG></FONT></SPAN><STRONG><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">客户端</SPAN><FONT face=Arial> </FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">配置</SPAN></STRONG></FONT></P>
<H1 style="MARGIN: 17pt 0cm 16.5pt; TEXT-INDENT: 0cm"><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore">第一章 </SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">环境配置</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></H1>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">软件环境：</SPAN><SPAN lang=EN-US>TortoiseSVN-<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chsdate IsROCDate="False" IsLunarDate="False" Day="30" Month="12" Year="1899" w:st="on">1.2.4</st1:chsdate>.4479-svn-1.2.3.msi<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（</SPAN><SPAN lang=EN-US>Windows</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）<BR></SPAN><SPAN lang=EN-US>Linux</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：还使用命令行吧</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">嘿嘿</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不过也没有谁自己的</SPAN><SPAN lang=EN-US>client</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是</SPAN><SPAN lang=EN-US>Linux</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">吧</SPAN></P>
<H1 style="MARGIN: 17pt 0cm 16.5pt; TEXT-INDENT: 0cm"><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore">第二章 </SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">主要操作</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><o:p></o:p></SPAN></H1>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何下载</SPAN><SPAN lang=EN-US>CVS – checkout</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如图中</SPAN><SPAN lang=EN-US>URL of repository </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">输入服务器项目名称就好。（丛</SPAN><SPAN lang=EN-US>IE</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也能看啦）<BR></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:wrapblock><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape id=_x0000_s1026 style="MARGIN-TOP: 5.4pt; Z-INDEX: 1; LEFT: 0px; VISIBILITY: hidden; MARGIN-LEFT: 0px; WIDTH: 0pt; POSITION: absolute; HEIGHT: 0pt; TEXT-ALIGN: left" type="#_x0000_t75"><v:imagedata src="file:///C:\DOCUME~1\admin\LOCALS~1\Temp\msohtml1\01\clip_image001.jpg" o:title="001"></v:imagedata><?xml:namespace prefix = w ns = "urn:schemas-microsoft-com:office:word" /><w:wrap type="topAndBottom"></w:wrap></v:shape></o:wrapblock><BR><BR><IMG height=320 alt=001.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/Subversion/001.JPG" width=456 border=0><BR><BR><BR><BR><BR><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何追加新文件或者目录</SPAN> <SPAN lang=EN-US>– add</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Subversion</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是递归追加的，省去了</SPAN><SPAN lang=EN-US>cvs</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US>python</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这一步。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这里的追加仅仅是在本地打标记，别忘了提交！！！<BR><BR><BR><IMG height=386 alt=007.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/Subversion/007.JPG" width=498 border=0><BR></SPAN></P>
<P><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN><o:wrapblock><v:shape id=_x0000_s1027 style="MARGIN-TOP: 3.7pt; Z-INDEX: 2; LEFT: 0px; VISIBILITY: hidden; MARGIN-LEFT: 0px; WIDTH: 0pt; POSITION: absolute; HEIGHT: 0pt; TEXT-ALIGN: left" type="#_x0000_t75"><v:imagedata src="file:///C:\DOCUME~1\admin\LOCALS~1\Temp\msohtml1\01\clip_image002.jpg" o:title="007"></v:imagedata><w:wrap type="topAndBottom"><BR></w:wrap></v:shape></o:wrapblock><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore"><BR>l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何提交修改</SPAN> <SPAN lang=EN-US>– commit</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:wrapblock><v:shape id=_x0000_s1028 style="MARGIN-TOP: 2.25pt; Z-INDEX: 3; LEFT: 0px; VISIBILITY: hidden; MARGIN-LEFT: 0px; WIDTH: 0pt; POSITION: absolute; HEIGHT: 0pt; TEXT-ALIGN: left" type="#_x0000_t75"><v:imagedata src="file:///C:\DOCUME~1\admin\LOCALS~1\Temp\msohtml1\01\clip_image003.jpg" o:title="003"></v:imagedata><w:wrap type="topAndBottom"></w:wrap></v:shape></o:wrapblock><BR style="mso-ignore: vglayout" clear=all></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">英文和</SPAN><SPAN lang=EN-US>CVS</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一样，毕竟这</SPAN><SPAN lang=EN-US>2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个软件都有同一个“老爸”</SPAN><SPAN lang=EN-US>(</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">Karl</SPAN><SPAN lang=EN-US>)</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，相近也自然。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;<IMG height=515 alt=003.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/Subversion/003.JPG" width=551 border=0></o:p></SPAN><BR style="mso-ignore: vglayout" clear=all><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是不是比</SPAN><SPAN lang=EN-US>CVS</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">友好（这个</SPAN><SPAN lang=EN-US>Client</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还不错么）？</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">呵呵</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但这并不是</SPAN><SPAN lang=EN-US>Subversion</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">真正的强项。<BR><BR><IMG height=500 alt=004.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/Subversion/004.JPG" width=635 border=0><BR><BR><BR><BR><BR></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何撤销操作</SPAN> <SPAN lang=EN-US>– clean up / revert</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:wrapblock><v:shape id=_x0000_s1030 style="MARGIN-TOP: 0.3pt; Z-INDEX: 5; LEFT: 0px; VISIBILITY: hidden; MARGIN-LEFT: 0px; WIDTH: 0pt; POSITION: absolute; HEIGHT: 0pt; TEXT-ALIGN: left" type="#_x0000_t75"><v:imagedata src="file:///C:\DOCUME~1\admin\LOCALS~1\Temp\msohtml1\01\clip_image006.jpg" o:title="005"></v:imagedata><w:wrap type="topAndBottom"></w:wrap></v:shape></o:wrapblock><BR style="mso-ignore: vglayout" clear=all><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果你做了不该做的事情</SPAN><SPAN lang=EN-US>… -_-!<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">那么恢复就很重要了（当然了，这都是客户端的，如果已经提交了，那</SPAN><SPAN lang=EN-US>…</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就等着挨板子吧）</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Clean </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US> Revert </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">很相近。都是撤销提交前进行的所有修改。可以对目录作。<BR></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><BR><BR><IMG height=423 alt=005.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/Subversion/005.JPG" width=627 border=0><BR><BR><BR><BR>&nbsp;<BR></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何明确目录下的变更项</SPAN> <SPAN lang=EN-US>– status</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:wrapblock><v:shape id=_x0000_s1031 style="MARGIN-TOP: 3.4pt; Z-INDEX: 6; LEFT: 0px; VISIBILITY: hidden; MARGIN-LEFT: 0px; WIDTH: 0pt; POSITION: absolute; HEIGHT: 0pt; TEXT-ALIGN: left" type="#_x0000_t75"><v:imagedata src="file:///C:\DOCUME~1\admin\LOCALS~1\Temp\msohtml1\01\clip_image008.jpg" o:title="008"></v:imagedata><w:wrap type="topAndBottom"></w:wrap></v:shape></o:wrapblock><IMG height=523 alt=008.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/Subversion/008.JPG" width=707 border=0><BR><BR><BR><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">右键</SPAN> <o:wrapblock><v:shape id=_x0000_s1032 style="MARGIN-TOP: 3.4pt; Z-INDEX: 7; LEFT: 0px; VISIBILITY: hidden; MARGIN-LEFT: 0px; WIDTH: 0pt; POSITION: absolute; HEIGHT: 0pt; TEXT-ALIGN: left; mso-position-horizontal-relative: text; mso-position-vertical-relative: text" type="#_x0000_t75"><v:imagedata src="file:///C:\DOCUME~1\admin\LOCALS~1\Temp\msohtml1\01\clip_image008.jpg" o:title="008"></v:imagedata><w:wrap type="topAndBottom"></w:wrap></v:shape></o:wrapblock><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">右键</SPAN> <o:wrapblock><v:shape id=_x0000_s1033 style="MARGIN-TOP: 3.4pt; Z-INDEX: 8; LEFT: 0px; VISIBILITY: hidden; MARGIN-LEFT: 0px; WIDTH: 0pt; POSITION: absolute; HEIGHT: 0pt; TEXT-ALIGN: left; mso-position-horizontal-relative: text; mso-position-vertical-relative: text" type="#_x0000_t75"><v:imagedata src="file:///C:\DOCUME~1\admin\LOCALS~1\Temp\msohtml1\01\clip_image008.jpg" o:title="008"></v:imagedata><w:wrap type="topAndBottom"></w:wrap></v:shape></o:wrapblock><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还是右键。对，就是</SPAN><SPAN lang=EN-US> Check for Modifications </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这厮！</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何删除一个文件或者目录</SPAN> <SPAN lang=EN-US>– delete</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这就不说了，</SPAN><SPAN lang=EN-US>Delete </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这个东东就是，<SPAN style="COLOR: red">别忘了</SPAN></SPAN><SPAN style="COLOR: red"> </SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">提交！</SPAN><SPAN lang=EN-US style="COLOR: red"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何察看一个文件的或者目录的修改记录</SPAN><SPAN lang=EN-US> --- log</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;<BR></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:wrapblock><v:shape id=_x0000_s1034 style="MARGIN-TOP: -52.4pt; Z-INDEX: 9; LEFT: 0px; VISIBILITY: hidden; MARGIN-LEFT: 2.85pt; WIDTH: 0pt; POSITION: absolute; HEIGHT: 0pt; TEXT-ALIGN: left" type="#_x0000_t75"><v:imagedata src="file:///C:\DOCUME~1\admin\LOCALS~1\Temp\msohtml1\01\clip_image010.jpg" o:title="009"></v:imagedata><w:wrap type="topAndBottom"></w:wrap></v:shape></o:wrapblock><IMG height=647 alt=009.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/Subversion/009.JPG" width=633 border=0><BR><BR><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就是看</SPAN><SPAN lang=EN-US> history </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了。选</SPAN><SPAN lang=EN-US>Show Log</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就好。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何比较文件或者不同版本之间的比较</SPAN> <SPAN lang=EN-US>– diff</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如上图，得到历史版本后，就可以直接</SPAN><SPAN lang=EN-US>diff</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了，这个</SPAN><SPAN lang=EN-US>Client</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自带了</SPAN><SPAN lang=EN-US>Compare</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">功能。可能不如</SPAN><SPAN lang=EN-US>BC</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">强吧，不确定。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">明确提交文件时的用户权限验证</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:wrapblock><v:shape id=_x0000_s1035 style="MARGIN-TOP: 3.7pt; Z-INDEX: 10; LEFT: 0px; VISIBILITY: hidden; MARGIN-LEFT: 0px; WIDTH: 0pt; POSITION: absolute; HEIGHT: 0pt; TEXT-ALIGN: left" type="#_x0000_t75"><v:imagedata src="file:///C:\DOCUME~1\admin\LOCALS~1\Temp\msohtml1\01\clip_image012.jpg" o:title="006"></v:imagedata><w:wrap type="topAndBottom"></w:wrap></v:shape></o:wrapblock><BR><IMG height=408 alt=006.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/Subversion/006.JPG" width=652 border=0><BR><BR><BR><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">写个代码</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">容易么。都是体力啊！被人覆盖了，可不是气的嘴都歪了。所以</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">权限</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">管理也就顺应历史洪流，出现在</SPAN><SPAN lang=EN-US>Subversion</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中。这个图是提交时的密码输入。具体的设置请参考</SPAN><SPAN lang=EN-US>《subversion之Apache配置》</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">！</SPAN></P>
<H1 style="MARGIN: 17pt 0cm 16.5pt; TEXT-INDENT: 0cm"><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore">第三章 </SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">预设权限和使用者</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><o:p></o:p></SPAN></H1>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Subversion</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自带了一个小型的</SPAN><SPAN lang=EN-US>server</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">叫做</SPAN><SPAN lang=EN-US> svnserve </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但是他不能完成复杂的权限目录等的管理，因此我们这次借用</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">牛</SPAN><SPAN lang=EN-US>XX </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US>Apache Server</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（</SPAN><st1:chsdate IsROCDate="False" IsLunarDate="False" Day="30" Month="12" Year="1899" w:st="on"><SPAN lang=EN-US>2.0.53</SPAN></st1:chsdate><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用了他的</SPAN><SPAN lang=EN-US>Apache Base Auth </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">框架。具体设置</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参见</SPAN><SPAN lang=EN-US> <SPAN lang=EN-US>《subversion之Apache配置》</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">！</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 21.0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN></P><STRONG><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore">第四章 </SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参考</SPAN></STRONG><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><o:p></o:p></SPAN> 
<P></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">《使用</SPAN><SPAN lang=EN-US>Subversion</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进行版本控制》</SPAN><SPAN lang=EN-US> Orilly </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中文</SPAN> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><A href="http://172.28.25.61/voesvn/logparser/other/knowhow/html"></A></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">《</SPAN><SPAN lang=EN-US>Apache Securty</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》</SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>HTMLPage<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>ApacheGroup English</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><A href="http://172.28.25.61/voesvn/logparser/other/knowhow/html"></A></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<H1 style="MARGIN: 17pt 0cm 16.5pt; TEXT-INDENT: 0cm"><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore">第五章 </SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">疑问和联系者</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><o:p></o:p></SPAN></H1>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">kino&nbsp;<BR><BR><A href="mailto:kinoviti@gmail.co">kinoviti@gmail.co</A>m<BR>QQ:23493713</SPAN></SPAN></P><img src ="http://www.blogjava.net/kinoviti/aggbug/29291.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2006-01-27 11:19 <a href="http://www.blogjava.net/kinoviti/archive/2006/01/27/29291.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>AJAX之工程感触</title><link>http://www.blogjava.net/kinoviti/archive/2006/01/27/29290.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Fri, 27 Jan 2006 02:14:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2006/01/27/29290.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/29290.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2006/01/27/29290.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/29290.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/29290.html</trackback:ping><description><![CDATA[<P>恩，这个我觉得才是真正的 随笔吧。谈谈我的感触吧。<BR>AJAX&nbsp; Struts 这2大红大紫的技术都在强调 MVC（前者应该说是SPB），确实在理解上清晰了很多。但是在工作中，我认为 无论白猫、黑猫、抓住老鼠的就是好猫。（老板才不在乎你用的是什么，效率重要）为什么说这个，目的就一个：灵活变通。<BR><BR>在标准的概念和传统的例子里， AJAX传输的应该是XML（纯纯的数据对象），拿到Browser再通过JS解析、拼装，生成所需的真正对象。可JS毕竟离不开他的本质Script，性能就是瓶颈，把大量的数据放到客户端解析，本身就不好。<BR>在我上一个项目里，需要构建一颗web tree，能够动态更新。案有几个，最好的自然是js对象+onXX方法重载，传输纯Data，Browser解析、构建Tree，需要记住选中和展开方式。但是这时要有一定JS基础的。不然说起来容易，写起来就难了。这种代码，用JS实现在2k左右（行数），调试JS比吃蜡都头疼。我简化了一些功能，用1.5k实现了功能，但是还是调试太累。<BR><BR>我又选择了简单的另一种案，Tree显示Module直接就在Server构建好，传输的XML其实是Tree显示模型，具体一点来说比 案1 的数据多了2个 属性： iIndent(缩紧int)，iOrder（展开节点）。这2个属性和起来正好是 深度优先的构建顺序。那么在客户端，我放弃了复杂的对象化，直接用js解析xml，生成html代码。和案1相比功能一样，但是代码量降低到 700L。<BR><BR>总结一下吧，说得这么乱。那就是 因地制宜吧。如果你是学习结构那么SPB MVC绝对是好事情，如果是公司应用，时间要求的紧紧地，那么放弃这些 框框，怎么方便怎么来，毕竟科学是要转化为生产力才有用嘛。<BR><BR>敬请各位讨论。</P><img src ="http://www.blogjava.net/kinoviti/aggbug/29290.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2006-01-27 10:14 <a href="http://www.blogjava.net/kinoviti/archive/2006/01/27/29290.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>小探Subversion Server 之 Apache配置</title><link>http://www.blogjava.net/kinoviti/archive/2006/01/26/29277.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Thu, 26 Jan 2006 15:32:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2006/01/26/29277.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/29277.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2006/01/26/29277.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/29277.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/29277.html</trackback:ping><description><![CDATA[***************************************<BR><SPAN style="FONT-FAMILY: 宋体">关键字：Subversion,Apache,DAV</SPAN><SPAN lang=EN-US><BR></SPAN><SPAN style="FONT-FAMILY: 宋体">难易度：</SPAN> 简单 
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体">软件版本：subversion1.2.3<BR>apache-server 2.0.55</SPAN><SPAN lang=EN-US><BR>时间：2006-01-26<BR>Author：Kino<BR>***************************************<BR><STRONG><FONT style="BACKGROUND-COLOR: #ffffff">安装到Apache<BR></FONT></STRONG>Subversion作为CVS的次代作品，Kerl真的是煞费苦心啊。现在我们就来看看如何配置它到ApacheServer。<BR>Subversion本身有一个自带的小server就是bin下的cvsserve ，通过svn://XXXX进行访问。同时支持ssh配置。但是弱点就是这个server对于权限和用户管理很弱，对于大型项目，必须将他挂在ApacheServer这样的重磅萨巴上。<BR>[svnserve的用户文件需要修改conf下的2个文件，自己看看，很简单都有注释的，这里不说了]<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 你应该得到subversion的二进制安装版，比较稳定的是1.2.3版本，这个版本对于apacheserver最低的版本要求是2.0.45 所以我们可以去apache官方站点下载2.0.55版本（最新已经是2.5了吧）。分别安装2个软件。<BR>ok,软件环境好了，那就来连接他们吧。<BR><BR><FONT color=#000080><FONT color=#0000ff>数据库连接：</FONT><BR></FONT>（如果你懒得改，那么安装软件的时候就一定要先安装ApacheServer,Subversion安装的时候会自动修改）<BR>subversion可以被看作是一个特殊的数据库（事实上也就是，呵呵FSFS 和伯克利DB）。那么就需要让Apache能够访问subversion的数据库，这就用到了module概念，我们便来修改httpd.conf文件。<BR>1。打开Apache自带的DAVmodule：去掉“LoadModule dav_module modules/mod_dav.so”前的#<BR>2。追加访问subversion用的module：（subversion安装目录bin下自带有这2个modules）<BR>LoadModule dav_svn_module "C:/Program Files/Subversion/bin/mod_dav_svn.so"<BR>LoadModule authz_svn_module "C:/Program Files/Subversion/bin/mod_authz_svn.so"<BR><BR><FONT color=#0000ff>权限设置：</FONT><BR>比较麻烦的东西来了。我们需要配置3个东西：<BR>1。在httpd.conf中追加&lt;Location&nbsp;&gt; 。例子如下：<BR>#配置subversion用户权限<BR>&lt;Location /mysvn&gt;<BR>&nbsp; DAV svn<BR>&nbsp; #&nbsp;http中输入&nbsp;"/mysvn/Parser" URL will map to a repository F:/SVN/repository/Parser<BR>&nbsp;SVNParentPath F:/SVN/repository/</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp; #声明 accessfilepolicy&nbsp;文件，目的是确认Group分类和目录的访问权限<BR>&nbsp;AuthzSVNAccessFile F:/SVN/commonconf/accessfilepolicy&nbsp;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;# only authenticated users may access the repository<BR>&nbsp;# Require valid-user<BR>&nbsp;# For any operations other than these, require an authenticated user.<BR>&nbsp;&lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;<BR>&nbsp;&nbsp;&nbsp; Require valid-user<BR>&nbsp;&lt;/LimitExcept&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp; #&nbsp;声明userauthofapachedav文件，其内容是各个用户的md5密码<BR>&nbsp; AuthType Basic<BR>&nbsp; AuthName "HFSVB AuthName"<BR>&nbsp; AuthUserFile F:/SVN/commonconf/userauthofapachedav<BR>&lt;/Location&gt;<BR><BR>2。accessfilepolicy&nbsp;文件（放在项目的conf目录下，也可随意） 如下：<BR>#this file communicate with httpd file's Location Tag ,per file&nbsp; per Tag<BR>#like svnserve.conf&nbsp; here section is [repos-name:path] or [path]<BR>#if you use SVNParentPath in httpd.conf then here you MUST use repository name<BR>#if you use SVNPath ,no problem<BR>#r&nbsp;&nbsp; read&nbsp;&nbsp;&nbsp; &nbsp;w&nbsp;&nbsp; write&nbsp;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>#don't have any right to parser:/src/ of user guest<BR>#[repository名字：path] <BR>#[parser:/src/]<BR>#guest =</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>[groups]<BR>administrator = admin<BR>developer = tester<BR>everyone = admin, tester</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>#default no one has right to repos,so use * to everyone<BR>[parser:/] #根目录下所有的文件和目录，又继承关系<BR>* = r&nbsp; #默认的所有人都有 读权限<BR>@developer = rw&nbsp; #这就表明只有developer（tester）才有读写权限<BR>[ 具体的文件和内容可查阅 Orilly的《使用Subversion进行版本控制》<BR>访问 <A href="http://www.subversion.org.cn/svnbook/1.1/index.html">http://www.subversion.org.cn/svnbook/1.1/index.html</A>&nbsp; ]<BR>3。userauthofapachedav文件<BR>admin:$apr1$A45.....$WQ0RCK61I/PO4gSKt.kK60<BR>这个文件是如何生成的呢，使用apache 的bin目录下的htpasswd.exe。用法可以参照 --help的帮助。<BR>这里给一个例子吧<BR>&gt;htpasswd -cm&nbsp;C:/userauthofapachedav&nbsp; admin<BR>&gt;input password:admin123<BR>&gt;again : admin123&nbsp;<BR>具体的英文忘了。呵呵不过很简单的。<BR><BR>好了，就这么简单。祝大家开心。这只是入门。具体的操作还要靠各位自己去感受。<BR><BR>关于如何设置subversion的项目库，上边提到的orilly的书就有记载。<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></P><img src ="http://www.blogjava.net/kinoviti/aggbug/29277.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2006-01-26 23:32 <a href="http://www.blogjava.net/kinoviti/archive/2006/01/26/29277.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Log4j 简单配置</title><link>http://www.blogjava.net/kinoviti/archive/2006/01/26/29267.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Thu, 26 Jan 2006 10:09:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2006/01/26/29267.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/29267.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2006/01/26/29267.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/29267.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/29267.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Log4j 简单配置</SPAN><SPAN style="FONT-FAMILY: 宋体"></SPAN><SPAN lang=EN-US><BR>***************************************<BR></SPAN><SPAN style="FONT-FAMILY: 宋体">关键字：</SPAN><SPAN lang=EN-US>Log4j<BR></SPAN><SPAN style="FONT-FAMILY: 宋体">难易度：简单</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体">软件版本：apache-log4j-1.2.9</SPAN><SPAN lang=EN-US><BR>时间：2006-01-26<BR>Author：Kino<BR>***************************************<BR><BR>呵呵 快过年了。眼看身边的朋友一个一个离开，踏上归途，心里不免有些淡淡的忧伤。为了消磨时间，写写文章也和久违的大家聊聊。<BR><BR>这里先祝愿各位朋友新春快乐。在狗年旺、旺、旺旺旺。 <BR><BR>切入正题吧。大名鼎鼎的Log4j我也理解得不深，这里采用假设的问答方式介绍吧。<BR>Q：Log4j是个什么东西？<BR>A：Log4j应该叫做 Log for java吧，是ApacheGroup旗下的明星项目，已经应用在很多方面了。同类的还有针对c c++等的log4c log4XXX之类。请自己看链接：<BR><BR>Q：Log4j到底是怎么被应用得？<BR>A：这就要从结构上说了，首先我们应用的并不是Log4j而是Jakarta-Commons-logging，但是这只是一个interface包没有具体的实现（其实是有的，叫做SampleLog弱但是快）。所以在大火的source里你只需要面向Logging编程而无须关心到底是如何生成的。因为Logging项目支持很多实现并不一定是Log4j。还有JDK的Log也行啊。那我们要做的就是&nbsp; 配置 Log4j到系统就好了。<BR><BR>Q：Log4j到底要配置什么东西，才能被系统识别？<BR>A：2个：Jar包&nbsp; 和&nbsp; log4j配置文件。 Jar我就不说了。现在来说Log4j配置文件。这个文件可以随意命名，默认的文件是 log4j.properties 。放在你的src根目录下就好。比如 你的source的catagory是com.yourcompany.xx那么放在和com并列的目录下就好。<BR><BR>Q：如果我不想用默认的log4j.properties 我应该怎么定义，怎么做？<BR>A：那就使用下边的命令定义：<BR>System.setProperty("");&nbsp; -_-! 具体内容想不起来了，留言中补充吧。<BR>如果你是Struts工程或者Web工程，需要做一个sevlet把这段代码载入。重载ActionServlet的init方法就好。<BR><BR>Q：这个文件如何定义？<BR>A：如下例。（具体的可以查阅JavaDoc）<BR>### direct log messages to console ###<BR>log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender<BR>log4j.appender.CONSOLE.Target=System.out<BR>log4j.appender.CONSOLE.Threshold=INFO<BR>log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout<BR>log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy MMM dd HH:mm:ss:SSS} %-5p %m (%F:%L) [%t]%n<BR></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>### direct messages to file gm_web.log ###<BR>log4j.appender.FILE=org.apache.log4j.RollingFileAppender<BR>log4j.appender.FILE.File=../logs/gm_web.log<BR>log4j.appender.FILE.MaxFileSize=1000KB<BR>log4j.appender.FILE.MaxBackupIndex=5<BR>log4j.appender.FILE.Append=true<BR>log4j.appender.FILE.Threshold=DEBUG<BR>log4j.appender.FILE.layout=org.apache.log4j.PatternLayout<BR>log4j.appender.FILE.layout.ConversionPattern=%d{yyyy MMM dd HH:mm:ss:SSS} %-5p %m (%F:%L) [%t]%n<BR></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US># Set root category priority to INFO and its only appender to CONSOLE.<BR>log4j.rootCategory=ERROR, CONSOLE, FILE<BR>log4j.logger.com.mycompany.ui=DEBUG, CONSOLE, FILE<BR><BR>XML格式的定义，我就不说了，资料满天都是。<BR><BR>Q：听说Log记录有继承关系，那么多Log，效率太低了吧<BR>A：有继承关系，对应的当然就有打破继承的定义，比如上例。<BR>log4j.rootCategory=ERROR, CONSOLE, FILE<BR>log4j.logger.com.mycompany.ui=DEBUG, CONSOLE, FILE<BR>com.mycompany.ui就继承了rootCategory的Log记录级别。但是如果像破除使用additivity<BR>log4j.additivity.com.mycompany.ui=false<BR>就KO了。<BR><BR>Q：log4j.appender.FILE.File=yourlogfile.log 到底给我把Log放哪去了？能改不？<BR>A：如果是Tomcat那就放到bin下边了。能改啊，bin就是基准目录，写相对路径就好咯。如上例。<BR><BR>Q：Log4j中ConversionPattern到底都是什么意思，都怎么用啊？<BR>A： 如下解释</P>
<OL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 1.5in; DIRECTION: ltr; unicode-bidi: embed" type=1>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=1><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[c]/[C] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回用来决定</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana"> Class</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">名称</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana"> </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">以及</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana"> package</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">路径（路径也可是部分的）</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=2><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[d] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回时间</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana"> </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">可能有各种格式</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">format</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">的时间。</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=3><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[F] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回发出记载</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Log</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">请求的文件得名字。</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=4><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[l] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回生成</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">log</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">事件的调用者的</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Location Information</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">。</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=5><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[L] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回发出记载</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Log</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">请求的行数。</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=6><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[m] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回用户自己写的</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana"> message</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">。</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=7><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[M] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回发出记载</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Log</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">请求的方法名称。</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=8><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[n] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana"> </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">换行。（依据平台不同而不同）</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=9><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[p] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Log</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">事件的优先级。</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=10><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[r] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回从</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Application</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">开始到这条</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Log</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">事件产生之间的时间间隔。</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">(</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">毫秒</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">)</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=11><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[t] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回生成</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Log</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">事件的线程名称。</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=12><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[x] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回与生成</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Log</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">事件的线程相关的</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">NDC(</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">内嵌特征内容</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">)</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=13><SPAN lang=EN-US style="FONT-FAMILY: Verdana">[X] -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">返回与生成</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">Log</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">事件的线程相关的</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">MDC(</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">映射特征内容</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">)</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">，要</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">KeyofMDC</SPAN> 
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3" value=14><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">分隔符</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana"> -- </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">空格，可能在</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana">left </SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: SimSun">也可能在</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Verdana"> right</SPAN></LI></OL>
<P style="MARGIN-TOP: 0px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; FONT-FAMILY: SimSun; mso-outline-level: 3"><SPAN lang=EN-US style="FONT-FAMILY: Verdana"><BR>Q：ConversionPattern参数能去哪里参考呢？<BR>A：JavaDoc&nbsp; PatternLayout 类。</P></SPAN>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><A href="http://logging.apache.org/log4j/docs/api-unstable/index.html">http://logging.apache.org/log4j/docs/api-unstable/index.html</A><BR><BR>Q：Log4j会不会太慢啊，性能如何？<BR>A：这个问题不好回答。反正记录一条Log大约的时间是20ms 到 400ms吧，根据你ConversionPattern需要记录的格式内容，以及package catagory的继承关系来决定。那么每个pattern到底哪个快哪个慢，哪个超级慢，请看<A href="http://logging.apache.org/log4j/docs/api-unstable/index.html">http://logging.apache.org/log4j/docs/api-unstable/index.html</A>。总归一句话，只要让log4j给你trace调用关系，反射class 就别指望能快，格谁都一样，是吧。<BR><BR><BR>Q：下班了没，啰嗦这么多，有问题再问你吧，留下联系信息<BR>A：刚下班，还吃了朋友的蛋糕(他本人正在飞机上，哈哈，吃了个独食)，回家咯。讨论问题的请留言或者<A href="mailto:kinoviti@gmail.com">kinoviti@gmail.com</A>&nbsp;&nbsp; QQ:23493713</SPAN></P><img src ="http://www.blogjava.net/kinoviti/aggbug/29267.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2006-01-26 18:09 <a href="http://www.blogjava.net/kinoviti/archive/2006/01/26/29267.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C++  Test  之 RuleWizard 使用心得</title><link>http://www.blogjava.net/kinoviti/archive/2005/11/22/21007.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Tue, 22 Nov 2005 09:43:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2005/11/22/21007.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/21007.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2005/11/22/21007.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/21007.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/21007.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>C++&nbsp; Test&nbsp; 之 RuleWizard 使用心得</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN><SPAN lang=EN-US><BR>***************************************<BR></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">关键字：</SPAN><SPAN lang=EN-US>C++Test&nbsp;&nbsp;&nbsp; Rulewizard&nbsp;&nbsp;&nbsp; Python<BR></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">难易度：中</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">软件版本：</SPAN><SPAN lang=EN-US>Parasoft<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>C++ Test<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>6.5<BR>时间：2005-11-23<BR>Author：Kino<BR>********************************<BR><SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN><STRONG>一.介绍一下C++Test吧（这一部分请允许我ctrl + c/v ）</STRONG></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: ˎ̥; mso-hansi-font-family: ˎ̥">是单元测试和静态分析工具，自动测试</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: ˎ̥">C</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: ˎ̥; mso-hansi-font-family: ˎ̥">和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: ˎ̥">C</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: ˎ̥; mso-hansi-font-family: ˎ̥">＋＋类别、功能或组件，而无需编写单个测试实例、测试驱动程序或桩调用。只需点击按钮，</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: ˎ̥">C++Test</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: ˎ̥; mso-hansi-font-family: ˎ̥">即会采用业内编码标准执行代码的静态分析，测试代码构造（白盒测试），测试代码功能性（黑盒测试），并保持代码完整性（回归测试）。可以巡行在</SPAN><SPAN lang=EN-US>Windows 2000/XP </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US>Linux </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US>Solaris 7, 8, 9</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">平台之上。她的主要功能可以参见下边的链接网页：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US>http://www.superinst.com/cn/products/software_engineering/unit_testing/parasoft/ctest.html</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这里我想说明的不是</SPAN><SPAN lang=EN-US>C++Test</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有多么好用，而是要说明她内置的</SPAN><SPAN lang=EN-US>RuleWizard</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">™定制编码机能。那么什么才是</SPAN><SPAN lang=EN-US>RuleWizard</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">呢？他到底能干什么？</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN><STRONG>二.RuleWizard<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></STRONG></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US>C++Test</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">内置了</SPAN><SPAN lang=EN-US>300</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">多个静态测试项，一般的情况下其实也就够用了。但是如果有特殊的测试要求，动辄几十</SPAN><SPAN lang=EN-US>K</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的代码，用眼睛看，脑子想，太辛苦，也不“安全”。那么使用</SPAN><SPAN lang=EN-US>rulewizard</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定制自己的规则还是很有用的。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们首先要明确，</SPAN><SPAN lang=EN-US>rulewizard</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定制的是</SPAN> <SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><STRONG>不成功</STRONG></SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的情况。也就是应该被排除的。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US>Rule</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的创建有</SPAN><SPAN lang=EN-US>2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">种方式，一种是手工写规则，另一种是写入需要剔除的代码，让</SPAN><SPAN lang=EN-US>rulewizard</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">去帮你生成规则（最好别用，弱弱的</SPAN><SPAN lang=EN-US>autocreate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）。我这里主要重点放在自己写规则方面。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US>Rulewizard</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的界面如下图：</SPAN></P></SPAN>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center><BR><IMG height=666 alt=o_Rulewizard001.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/3830/o_Rulewizard001.JPG" width=891 border=0>*******<BR><BR>图1。RuleWizard界面</P></SPAN>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">右边的就是我们写的规则。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">那么我们先来大概的介绍一下</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">rulewizard</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义的基本组成部分吧。（实在不太会翻译，那么就沿用英文名字了，请大家多多包涵）</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Node</FONT></SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：规则的基本组成部分，通过</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">你可以很清楚的知道它的功能。比如表达式</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">a=b</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、变量的类型测试。。。分为：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><FONT face="Times New Roman">parentNode</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：规则中的主分支</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">或者次分支的主</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。内容可以是表达式、变量、函数等</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><FONT face="Times New Roman">childNode</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：规则的组成单元。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Commands</FONT></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用来在</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Nodes</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之间建立关联关系。形象一点就是点中一个</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然后右键显示出的快捷菜单的上半部分。如下图：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt" align=center><SPAN lang=EN-US><o:p><FONT face="Times New Roman">&nbsp;<IMG height=190 alt=o_Rulewizard002.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/3830/o_Rulewizard002.JPG" width=304 border=0></FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt" align=center><SPAN lang=EN-US><o:p><FONT face="Times New Roman">&nbsp;图2</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">介绍一下主要的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Command</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><FONT face="Times New Roman">Collector:</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合。这个概念更像数学中的集合而不是</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Java</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的广义集合。满足一定条件的数据或者方法或者变量的全体。比如，所有被声明过的变量，<SPAN style="COLOR: red">如下图<BR></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: center" align=center><SPAN lang=EN-US><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: center" align=center><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><IMG height=75 alt=o_Rulewizard003.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/3830/o_Rulewizard003.JPG" width=328 border=0><BR>图3</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><FONT face="Times New Roman">isDecl</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是用来返回前边的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是不是一个声明。那么</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">body</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">membervariable</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">返回了所有的包涵指定类型变量得语句（包括</SPAN><FONT face="Times New Roman"> </FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">变量付值、声明、判断等）那么这个图被理解为，所有不是声明得语句内使用的变量的集合。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">没有被声明的变量，<SPAN style="COLOR: red">如下图</SPAN>。<BR></SPAN><SPAN lang=EN-US style="COLOR: red"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: center" align=center><SPAN lang=EN-US></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: center" align=center><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><IMG height=78 alt=o_Rulewizard004.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/3830/o_Rulewizard004.JPG" width=332 border=0><BR>图4</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这里的意思是所有作为声明语句的变量的集合。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">那么通常情况下，</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">A</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合和</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">B</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合应该是相等的，也就是说所有被声明过的变量（</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">B</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合内容）应该都被使用</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">/</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">付值</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">/</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">判断（</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">A</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合的内容）。那么对于存在声明了但没有被使用的变量的特殊情况应该怎么样表示呢？</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><FONT face="Times New Roman">Node Set:Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合的处理。分为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Union</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（合并）、</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Intersection</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（交叉）、</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Difference</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（差值，左差</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">/</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">右差）、</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Xor</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（异或）。<SPAN style="COLOR: red">如下图</SPAN>：<BR></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: center" align=center><SPAN lang=EN-US></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: center" align=center><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><IMG height=255 alt=o_Rulewizard006.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/3830/o_Rulewizard006.JPG" width=297 border=0><BR>图5</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果</SPAN><FONT face="Times New Roman"> </FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">满足这个规则，那么输出相应得警告信息。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Output</FONT></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">如果满足</SPAN><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT face="Times New Roman">check</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">的条件，向用户返回一个消息（箭头表示）</SPAN><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><o:p><FONT face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">三．</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Python<o:p></o:p></FONT></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><SPAN style="mso-tab-count: 1"><FONT face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这里</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">python</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是用来给</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">rulewizard</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作补充的一个脚本语言。通过</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">python</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以定制一些特殊的，</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">rulewizard</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不能完成的规则。</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Python</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以使用</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">种方式被加入到规则中：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><I style="mso-bidi-font-style: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为一个输出</SPAN></I><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：如果规则没有被遵守那么可以调用一个违反规则的方法。（类似于输出错误消息，只不过这里用来启动一个方法而已）</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><I style="mso-bidi-font-style: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为一个单独的方法组件</SPAN></I><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：其实就是一个方法而已。比如，以上图为例子，如果我们不判断</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">B </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"> A</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的大小关系，就是想打印一下</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">A</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">B</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的内容，那么就得到如下的图：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt" align=center><SPAN lang=EN-US><o:p><FONT face="Times New Roman">&nbsp;<IMG height=220 alt=r_Rulewizard005.JPG src="http://www.blogjava.net/images/blogjava_net/kinoviti/3830/r_Rulewizard005.JPG" width=339 border=0></FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: center" align=center><SPAN lang=EN-US></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: center" align=center><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图6</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其中</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Method</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的内容是：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><FONT face="Times New Roman">def showCollectorContext(node,context):</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a = context.getList("A")</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>b = context.getList("B")</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>context.report("D's Context is " + str(a) + "C's Context is " + str(b))</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">那么在</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">c++test</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进行测试的时候就会得到输出我们需要的内容。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">关于</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">python</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的语法我这里就不写了，毕竟和这篇文章的内容美关系。如果想要了解，可以去下载相关资料，我这里建议使用</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"> Orielly</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"> Python in a Nutshell </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">四．不足点</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为一个能自定义规则的静态测试工具，不得不佩服</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">parasoft</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">兄弟们的才智。但是我觉得还有一些改善点的：（当然也不排除，已经有，但我没有发现的情况，如果各位知道请指教，谢谢先）</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 57.75pt; TEXT-INDENT: -36.75pt; mso-list: l0 level1 lfo1; tab-stops: list 57.75pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">1．<SPAN style="FONT: 7pt 'Times New Roman'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通过</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">pyhon</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们可以干涉规则的制定，比如，对于上例变量的确定，如果们不使用</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">collect<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>set</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Difference|left menus</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（就是图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中最下的那个</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">边形），而用</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">python</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一样的可以对比</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">List</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。但是就像他提供的功能是静态测试一样，这里我们得到的永远是经过处理的集合。而不能把</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">python</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">插入检测的循环中，不能一次得到一个变量，做点操作然后等下次的变量。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 57.75pt; TEXT-INDENT: -36.75pt; mso-list: l0 level1 lfo1; tab-stops: list 57.75pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">2．<SPAN style="FONT: 7pt 'Times New Roman'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合的概念在这里有</SPAN><FONT face="Times New Roman"> </FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">他的优点，也有缺点，如果我们想要明确的得到代码里相同变量的出现次数，那么通过现有的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">rulewizard</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是得不到的，因为我们得到的集合总是经过“合并”的、没有重复的数据结构。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 57.75pt; TEXT-INDENT: -36.75pt; mso-list: l0 level1 lfo1; tab-stops: list 57.75pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">3．<SPAN style="FONT: 7pt 'Times New Roman'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就我看到的资料，所有的内置的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都没有为用户提供接口。不能够把通过</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">python</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的处理结果正确的传递给内置的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。感觉所有的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">python</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">做成的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">node </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都是“叶子”。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 57.75pt; TEXT-INDENT: -36.75pt; mso-list: l0 level1 lfo1; tab-stops: list 57.75pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">4．<SPAN style="FONT: 7pt 'Times New Roman'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">技术支持和官方论坛人气低到，看了浑身发抖的地步。没有交流，没有讨论。不知道是不是因为太贵的原因。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 57.75pt; TEXT-INDENT: -36.75pt; mso-list: l0 level1 lfo1; tab-stops: list 57.75pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">5．<SPAN style="FONT: 7pt 'Times New Roman'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">贵！！！真的很贵。动辄就是</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">4XXX$</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">-_-! </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">反正贵。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">就写这么多，希望大家多多交流，国内关于软件的新闻有不少，经验却没有，希望能给我仍的“砖”能换来大家“玉”。谢谢！</SPAN></SPAN></P><img src ="http://www.blogjava.net/kinoviti/aggbug/21007.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2005-11-22 17:43 <a href="http://www.blogjava.net/kinoviti/archive/2005/11/22/21007.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C#与Java（一）</title><link>http://www.blogjava.net/kinoviti/archive/2005/11/11/19257.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Fri, 11 Nov 2005 02:27:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2005/11/11/19257.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/19257.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2005/11/11/19257.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/19257.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/19257.html</trackback:ping><description><![CDATA[<P align=left><FONT size=6><STRONG>C#与Java（一）</STRONG></FONT><BR><BR><BR>************************************************<BR>关键字：继承<BR>难易度：易<IMG height=20 src="http://www.blogjava.net/Emoticons/QQ/14.gif" width=20 border=0><BR>************************************************<BR><BR><BR>最近因为工作需要开展基于C#的研发。我在这里也就写一点作为Java程序员对于C#的部分感想吧。毕竟能力有限，请各位高手多多点拨。<BR><BR>1.1实现的继承<BR><BR>C#和Java一样不能继承private。但是C++可以在继承中明确指出要继承共有的还是私有的。如下：<BR><BR>这个是C#的继承书写方法，作为基类的CSharpBaseClass并没有限定符。</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">1</SPAN><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;CSharpClass&nbsp;：CSharpBaseClass<BR></SPAN><SPAN style="COLOR: #008080">2</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_35_45_Open_Image onclick="this.style.display='none'; Codehighlighter1_35_45_Open_Text.style.display='none'; Codehighlighter1_35_45_Closed_Image.style.display='inline'; Codehighlighter1_35_45_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_35_45_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_35_45_Closed_Text.style.display='none'; Codehighlighter1_35_45_Open_Image.style.display='inline'; Codehighlighter1_35_45_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_35_45_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_35_45_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">成员</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">4</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN></DIV>
<P>这个是Java了，熟悉吧。</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;Class&nbsp;JavaClass&nbsp;</SPAN><SPAN style="COLOR: #0000ff">extends</SPAN><SPAN style="COLOR: #000000">&nbsp;JavaBaseClass<BR><IMG id=Codehighlighter1_45_54_Open_Image onclick="this.style.display='none'; Codehighlighter1_45_54_Open_Text.style.display='none'; Codehighlighter1_45_54_Closed_Image.style.display='inline'; Codehighlighter1_45_54_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_45_54_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_45_54_Closed_Text.style.display='none'; Codehighlighter1_45_54_Open_Image.style.display='inline'; Codehighlighter1_45_54_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_45_54_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_45_54_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">成员</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN></DIV>
<P>C++的定义如下：</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;CPlusPlusClass:&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;CPlusPlusBaseClass<BR><IMG id=Codehighlighter1_48_58_Open_Image onclick="this.style.display='none'; Codehighlighter1_48_58_Open_Text.style.display='none'; Codehighlighter1_48_58_Closed_Image.style.display='inline'; Codehighlighter1_48_58_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_48_58_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_48_58_Closed_Text.style.display='none'; Codehighlighter1_48_58_Open_Image.style.display='inline'; Codehighlighter1_48_58_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_48_58_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_48_58_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">成员</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN></DIV>
<P>1.2虚函数<BR><BR>把一个基类函数声明为virtual，该函数就可以在任何派生类中重写了。<BR>Java的语法中没有virtual这个词，但是Java却彻彻底底的贯彻着这个概念，Java的所有函数都是虚拟的。<BR>C++的朋友可能比较熟悉这个词吧。对于这一点C#和C++是相同的。但是语法稍微有点不同，C#需要使用override类显示声明重写函数。如下例<BR></P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;BaseClass<BR><IMG id=Codehighlighter1_16_158_Open_Image onclick="this.style.display='none'; Codehighlighter1_16_158_Open_Text.style.display='none'; Codehighlighter1_16_158_Closed_Image.style.display='inline'; Codehighlighter1_16_158_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_16_158_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_16_158_Closed_Text.style.display='none'; Codehighlighter1_16_158_Open_Image.style.display='inline'; Codehighlighter1_16_158_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_16_158_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_16_158_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">virtual</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;VirtualMethod()<BR><IMG id=Codehighlighter1_73_156_Open_Image onclick="this.style.display='none'; Codehighlighter1_73_156_Open_Text.style.display='none'; Codehighlighter1_73_156_Closed_Image.style.display='inline'; Codehighlighter1_73_156_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_73_156_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_73_156_Closed_Text.style.display='none'; Codehighlighter1_73_156_Open_Image.style.display='inline'; Codehighlighter1_73_156_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_73_156_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_73_156_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">The&nbsp;virtual&nbsp;method&nbsp;in&nbsp;defined&nbsp;in&nbsp;Base&nbsp;class</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;ChildClass&nbsp;:&nbsp;BaseClass<BR><IMG id=Codehighlighter1_190_338_Open_Image onclick="this.style.display='none'; Codehighlighter1_190_338_Open_Text.style.display='none'; Codehighlighter1_190_338_Closed_Image.style.display='inline'; Codehighlighter1_190_338_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_190_338_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_190_338_Closed_Text.style.display='none'; Codehighlighter1_190_338_Open_Image.style.display='inline'; Codehighlighter1_190_338_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_190_338_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_190_338_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">override</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;VirtualMethod()<BR><IMG id=Codehighlighter1_251_336_Open_Image onclick="this.style.display='none'; Codehighlighter1_251_336_Open_Text.style.display='none'; Codehighlighter1_251_336_Closed_Image.style.display='inline'; Codehighlighter1_251_336_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_251_336_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_251_336_Closed_Text.style.display='none'; Codehighlighter1_251_336_Open_Image.style.display='inline'; Codehighlighter1_251_336_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_251_336_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_251_336_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">The&nbsp;override&nbsp;method&nbsp;in&nbsp;defined&nbsp;in&nbsp;child&nbsp;class</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV>
<P><BR><BR>1.3隐藏方法<BR>相同签名的方法在基类和子类都声明了，但方法不是vitrual。那么实际中到底哪个方法被执行，取决于引用实例的变量类型，而不是实力本身的类型。<BR>我们也不用太担心这个问题，因为C#会在编译期给出警告。<BR><BR>1.4调用积累函数的方法<BR>java中我们使用super，C#中使用base。<BR><BR>1.5抽象类和抽象函数<BR>和java一样使用abstract声明。<BR>和C++相比，C++的抽象函数被声明为纯虚函数。<BR><BR>1.6密封类和密封方法<BR>在Java中我们把它叫做final。也就是不能继承的类或不能重载的方法。</P>
<P>1.7构造函数的调用层次<BR>和Java一样，我就不多说了。这里强调一个特殊的语法格式：<BR><BR></P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;BaseClass<BR><IMG id=Codehighlighter1_23_280_Open_Image onclick="this.style.display='none'; Codehighlighter1_23_280_Open_Text.style.display='none'; Codehighlighter1_23_280_Closed_Image.style.display='inline'; Codehighlighter1_23_280_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_23_280_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_23_280_Closed_Text.style.display='none'; Codehighlighter1_23_280_Open_Image.style.display='inline'; Codehighlighter1_23_280_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_23_280_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_23_280_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;temp&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Default&nbsp;Construct</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;_flag<BR><IMG id=Codehighlighter1_88_141_Open_Image onclick="this.style.display='none'; Codehighlighter1_88_141_Open_Text.style.display='none'; Codehighlighter1_88_141_Closed_Image.style.display='inline'; Codehighlighter1_88_141_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_88_141_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_88_141_Closed_Text.style.display='none'; Codehighlighter1_88_141_Open_Image.style.display='inline'; Codehighlighter1_88_141_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_88_141_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_88_141_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_98_112_Open_Image onclick="this.style.display='none'; Codehighlighter1_98_112_Open_Text.style.display='none'; Codehighlighter1_98_112_Closed_Image.style.display='inline'; Codehighlighter1_98_112_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_98_112_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_98_112_Closed_Text.style.display='none'; Codehighlighter1_98_112_Open_Image.style.display='inline'; Codehighlighter1_98_112_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">get</SPAN><SPAN id=Codehighlighter1_98_112_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_98_112_Open_Text><SPAN style="COLOR: #000000">{&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;temp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_122_137_Open_Image onclick="this.style.display='none'; Codehighlighter1_122_137_Open_Text.style.display='none'; Codehighlighter1_122_137_Closed_Image.style.display='inline'; Codehighlighter1_122_137_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_122_137_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_122_137_Closed_Text.style.display='none'; Codehighlighter1_122_137_Open_Image.style.display='inline'; Codehighlighter1_122_137_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN id=Codehighlighter1_122_137_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_122_137_Open_Text><SPAN style="COLOR: #000000">{&nbsp;temp&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;value;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">Constructor&nbsp;with&nbsp;one&nbsp;Parameter</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;BaseClass(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;f)<BR><IMG id=Codehighlighter1_258_278_Open_Image onclick="this.style.display='none'; Codehighlighter1_258_278_Open_Text.style.display='none'; Codehighlighter1_258_278_Closed_Image.style.display='inline'; Codehighlighter1_258_278_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_258_278_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_258_278_Closed_Text.style.display='none'; Codehighlighter1_258_278_Open_Image.style.display='inline'; Codehighlighter1_258_278_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_258_278_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_258_278_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flag&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;f;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;ChildClass&nbsp;:&nbsp;BaseClass<BR><IMG id=Codehighlighter1_319_1043_Open_Image onclick="this.style.display='none'; Codehighlighter1_319_1043_Open_Text.style.display='none'; Codehighlighter1_319_1043_Closed_Image.style.display='inline'; Codehighlighter1_319_1043_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_319_1043_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_319_1043_Closed_Text.style.display='none'; Codehighlighter1_319_1043_Open_Image.style.display='inline'; Codehighlighter1_319_1043_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_319_1043_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_319_1043_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_372_373_Open_Image onclick="this.style.display='none'; Codehighlighter1_372_373_Open_Text.style.display='none'; Codehighlighter1_372_373_Closed_Image.style.display='inline'; Codehighlighter1_372_373_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_372_373_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_372_373_Closed_Text.style.display='none'; Codehighlighter1_372_373_Open_Image.style.display='inline'; Codehighlighter1_372_373_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;ChildClass():</SPAN><SPAN style="COLOR: #0000ff">base</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Customized&nbsp;Construct</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_372_373_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_372_373_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG id=Codehighlighter1_428_429_Open_Image onclick="this.style.display='none'; Codehighlighter1_428_429_Open_Text.style.display='none'; Codehighlighter1_428_429_Closed_Image.style.display='inline'; Codehighlighter1_428_429_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_428_429_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_428_429_Closed_Text.style.display='none'; Codehighlighter1_428_429_Open_Image.style.display='inline'; Codehighlighter1_428_429_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;Second(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;f):</SPAN><SPAN style="COLOR: #0000ff">base</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara&nbsp;=&nbsp;1:1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_428_429_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_428_429_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG id=Codehighlighter1_493_494_Open_Image onclick="this.style.display='none'; Codehighlighter1_493_494_Open_Text.style.display='none'; Codehighlighter1_493_494_Closed_Image.style.display='inline'; Codehighlighter1_493_494_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_493_494_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_493_494_Closed_Text.style.display='none'; Codehighlighter1_493_494_Open_Image.style.display='inline'; Codehighlighter1_493_494_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;Second(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;f,</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;g):</SPAN><SPAN style="COLOR: #0000ff">base</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara&nbsp;=&nbsp;1:2</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_493_494_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_493_494_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;showConstructFlag()<BR><IMG id=Codehighlighter1_543_966_Open_Image onclick="this.style.display='none'; Codehighlighter1_543_966_Open_Text.style.display='none'; Codehighlighter1_543_966_Closed_Image.style.display='inline'; Codehighlighter1_543_966_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_543_966_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_543_966_Closed_Text.style.display='none'; Codehighlighter1_543_966_Open_Image.style.display='inline'; Codehighlighter1_543_966_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_543_966_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_543_966_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Second();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Show&nbsp;ConstructFlag:\n&nbsp;ChildClass():base(\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Customized&nbsp;Construct\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">_Flag);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Second(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">test1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Show&nbsp;ConstructFlag:\n&nbsp;Second(string&nbsp;f,string&nbsp;g):base(\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">:</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">_Flag);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Second(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">test2</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">no&nbsp;use</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Show&nbsp;ConstructFlag:\n&nbsp;Second(string&nbsp;f,string&nbsp;g):base(\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">:</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">_Flag);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;Main()<BR><IMG id=Codehighlighter1_1006_1041_Open_Image onclick="this.style.display='none'; Codehighlighter1_1006_1041_Open_Text.style.display='none'; Codehighlighter1_1006_1041_Closed_Image.style.display='inline'; Codehighlighter1_1006_1041_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1006_1041_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1006_1041_Closed_Text.style.display='none'; Codehighlighter1_1006_1041_Open_Image.style.display='inline'; Codehighlighter1_1006_1041_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_1006_1041_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1006_1041_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;showConstructFlag();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV>
<P>结果如预计那样 ：<BR>如果基类含有带参数的构造函数，派生类不能调用默认基类构造函数。<BR>多参数派生类构造函数，可以调用参数数目不同的基类构造函数。<BR><BR>我们一起来看看为什么这2个结论可以成立：<BR>首先，对于带参数的基类构造函数在初始化的时候会试图去调用基类默认构造函数，但在上边的基类程序里，因为只声明了带一个参数的构造函数，所以public Second(string f):base()或者public Second(string f)就不会通过编译，因为他找不到基类的默认构造函数，只能追加<SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;BaseClass(</SPAN><SPAN style="COLOR: #000000">)才会通过。这一点和JAVA是不同的，java的默认构造函数默认是不出现在代码里的。C#却一定要写出来。<BR><BR>&lt;&lt;&lt;== <FONT color=#ff0000>有错误。C#的默认构造函数体制和Java是一样的。具体如下：<BR>1。父类没有自定义构造函数的情况下，使用默认构造函数。用户可以不写出来。<BR>2。一旦父类有了自定义的构造函数，那么如果要使用无参的默认构造函数就必须要显示定义。</FONT><BR><BR><BR><BR><BR>其次，下边派生类1个参数、2个参数甚至多个参数的构造函数为什么能访问只有一个参数的基类构造函数呢？原因是，关键字this，上边的程序改写如下我想大家就明白了。<BR></P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG id=Codehighlighter1_49_50_Open_Image onclick="this.style.display='none'; Codehighlighter1_49_50_Open_Text.style.display='none'; Codehighlighter1_49_50_Closed_Image.style.display='inline'; Codehighlighter1_49_50_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_49_50_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_49_50_Closed_Text.style.display='none'; Codehighlighter1_49_50_Open_Image.style.display='inline'; Codehighlighter1_49_50_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;Second(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;f):</SPAN><SPAN style="COLOR: #0000ff">base</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara&nbsp;=&nbsp;1:1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_49_50_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_49_50_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG id=Codehighlighter1_108_109_Open_Image onclick="this.style.display='none'; Codehighlighter1_108_109_Open_Text.style.display='none'; Codehighlighter1_108_109_Closed_Image.style.display='inline'; Codehighlighter1_108_109_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_108_109_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_108_109_Closed_Text.style.display='none'; Codehighlighter1_108_109_Open_Image.style.display='inline'; Codehighlighter1_108_109_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;Second(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;f,</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;g):</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;f,</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;None</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_108_109_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_108_109_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN></DIV>
<P dir=ltr style="MARGIN-RIGHT: 0px"></SPAN>2.1修饰符<BR>C#支持下边的集中修饰符：<BR>public&nbsp;，&nbsp;&nbsp; protected&nbsp;， internal&nbsp; ，private&nbsp;， protected internal<BR>同Java。internal和protected internal是.net framework新增的一个内容。根据定义。<BR>internal在同一个程序集内和public类似，不同的程序集间，public声明的类或方法仍然可用，但是internal的方法或类则被隐藏。<BR>protected internal合并了protected 和internal，但这是一种or关系，而不是and关系。protected internal成员在同一个程序集的任何代码都可见，在派生类可见。<BR><BR>2.3接口<BR>接口公约：<BR>不能实例化接口。<BR>接口不能有构造函数或字段。<BR>接口定义也不允许包含运算符重载。<BR>接口定义中还不允许声明成员上的修饰符。接口成员都是public的，不需要static也不需要virtual。<BR><BR>同Java<BR>接口可以彼此继承，其方式和类继承相同。如下：<BR><BR></P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000">&nbsp;my.test<BR><IMG id=Codehighlighter1_18_154_Open_Image onclick="this.style.display='none'; Codehighlighter1_18_154_Open_Text.style.display='none'; Codehighlighter1_18_154_Closed_Image.style.display='inline'; Codehighlighter1_18_154_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_18_154_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_18_154_Closed_Text.style.display='none'; Codehighlighter1_18_154_Open_Image.style.display='inline'; Codehighlighter1_18_154_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_18_154_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_18_154_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">interface</SPAN><SPAN style="COLOR: #000000">&nbsp;IBase<BR><IMG id=Codehighlighter1_47_152_Open_Image onclick="this.style.display='none'; Codehighlighter1_47_152_Open_Text.style.display='none'; Codehighlighter1_47_152_Closed_Image.style.display='inline'; Codehighlighter1_47_152_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_47_152_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_47_152_Closed_Text.style.display='none'; Codehighlighter1_47_152_Open_Image.style.display='inline'; Codehighlighter1_47_152_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_47_152_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_47_152_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;setName();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000">&nbsp;isMe(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;name);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;name<BR><IMG id=Codehighlighter1_125_147_Open_Image onclick="this.style.display='none'; Codehighlighter1_125_147_Open_Text.style.display='none'; Codehighlighter1_125_147_Closed_Image.style.display='inline'; Codehighlighter1_125_147_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_125_147_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_125_147_Closed_Text.style.display='none'; Codehighlighter1_125_147_Open_Image.style.display='inline'; Codehighlighter1_125_147_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_125_147_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_125_147_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">get</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000">&nbsp;my.test<BR><IMG id=Codehighlighter1_175_243_Open_Image onclick="this.style.display='none'; Codehighlighter1_175_243_Open_Text.style.display='none'; Codehighlighter1_175_243_Closed_Image.style.display='inline'; Codehighlighter1_175_243_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_175_243_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_175_243_Closed_Text.style.display='none'; Codehighlighter1_175_243_Open_Image.style.display='inline'; Codehighlighter1_175_243_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_175_243_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_175_243_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">interface</SPAN><SPAN style="COLOR: #000000">&nbsp;IChild:IBase<BR><IMG id=Codehighlighter1_215_241_Open_Image onclick="this.style.display='none'; Codehighlighter1_215_241_Open_Text.style.display='none'; Codehighlighter1_215_241_Closed_Image.style.display='inline'; Codehighlighter1_215_241_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_215_241_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_215_241_Closed_Text.style.display='none'; Codehighlighter1_215_241_Open_Image.style.display='inline'; Codehighlighter1_215_241_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_215_241_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_215_241_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000">&nbsp;isOK();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV>
<P dir=ltr style="MARGIN-RIGHT: 0px">告一段落吧。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (つづく)<BR><IMG height=20 src="http://www.blogjava.net/Emoticons/QQ/laf.gif" width=20 border=0>请多提意见，如果有什么不清楚的地方也请你写下来，一起调查咯。&nbsp;&nbsp;<IMG height=20 src="http://www.blogjava.net/Emoticons/QQ/laf.gif" width=20 border=0></P><img src ="http://www.blogjava.net/kinoviti/aggbug/19257.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2005-11-11 10:27 <a href="http://www.blogjava.net/kinoviti/archive/2005/11/11/19257.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Struts Logic标签库</title><link>http://www.blogjava.net/kinoviti/archive/2005/10/13/15446.html</link><dc:creator>-=Kinohl=-</dc:creator><author>-=Kinohl=-</author><pubDate>Thu, 13 Oct 2005 12:04:00 GMT</pubDate><guid>http://www.blogjava.net/kinoviti/archive/2005/10/13/15446.html</guid><wfw:comment>http://www.blogjava.net/kinoviti/comments/15446.html</wfw:comment><comments>http://www.blogjava.net/kinoviti/archive/2005/10/13/15446.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kinoviti/comments/commentRss/15446.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kinoviti/services/trackbacks/15446.html</trackback:ping><description><![CDATA[<P><BR><IMG height=20 src="http://www.blogjava.net/Emoticons/QQ/blink.gif" width=20 border=0>Struts Logic标签库<IMG height=20 src="http://www.blogjava.net/Emoticons/QQ/blink.gif" width=20 border=0>&nbsp;<BR><BR>Keywords: Struts&nbsp; &nbsp;Logic&nbsp; 标签&nbsp; JSP<BR>难度：易<BR><BR>背景：不知道是不是相应“与时俱进”的大号召。反正当今的JSP是越来越难懂了。不是说麻烦，而是因为太简单了，反而不懂了。都是因为引入了 标签库。 这下好了，除了基础HTML,JSP语法外还要学很多标签库的用法。加油吧。<BR><BR>概念：<BR>Struts Logic标签库中的标签可以根据特定的逻辑条件来控制输出网页的内容，或者循环遍历集合中的所有元素。主要用于表示层的显示。<BR>Logic标签库的标签大致分为以下几类：<BR><BR><BR>...没有时间写了。我倒，争取11月之前写完。<BR></P><img src ="http://www.blogjava.net/kinoviti/aggbug/15446.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kinoviti/" target="_blank">-=Kinohl=-</a> 2005-10-13 20:04 <a href="http://www.blogjava.net/kinoviti/archive/2005/10/13/15446.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>