??xml version="1.0" encoding="utf-8" standalone="yes"?>96成人在线视频,亚洲天堂成人,偷拍与自拍一区http://www.aygfsteel.com/airong/春风不相识,何事入罗帏?zh-cnThu, 19 Jun 2025 13:00:01 GMTThu, 19 Jun 2025 13:00:01 GMT60[转]Windows 7下,快捷图标有阴影或者一层未知的快捷图标http://www.aygfsteel.com/airong/archive/2009/09/15/295083.html电子?/dc:creator>电子?/author>Mon, 14 Sep 2009 18:57:00 GMThttp://www.aygfsteel.com/airong/archive/2009/09/15/295083.htmlhttp://www.aygfsteel.com/airong/comments/295083.htmlhttp://www.aygfsteel.com/airong/archive/2009/09/15/295083.html#Feedback0http://www.aygfsteel.com/airong/comments/commentRss/295083.htmlhttp://www.aygfsteel.com/airong/services/trackbacks/295083.html
  • Ҏ一Q?/li>
打开C本,复制以下内容Qƈ保存?*.reg)格式,然后双击导入到注册表

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell Icons]
"29"="C:\\Windows\\System32\\shell32.dll,50"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]
"29"="C:\\Windows\\System32\\shell32.dll,50"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
"link"=hex:00,00,00,00


  • Ҏ?
同样打开C?复制以下内容,q保存ؓ(*.reg)格式Q然后双d入到注册?br />
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\lnkfile]
"isshortcut"=""

最后重启系l,大功告成Q本Z,有效?em>


]]>
[转帖]使用eclipsel计java代码行(图)http://www.aygfsteel.com/airong/archive/2009/07/29/288831.html电子?/dc:creator>电子?/author>Tue, 28 Jul 2009 19:15:00 GMThttp://www.aygfsteel.com/airong/archive/2009/07/29/288831.htmlhttp://www.aygfsteel.com/airong/comments/288831.htmlhttp://www.aygfsteel.com/airong/archive/2009/07/29/288831.html#Feedback1http://www.aygfsteel.com/airong/comments/commentRss/288831.htmlhttp://www.aygfsteel.com/airong/services/trackbacks/288831.html
用Eclipseq行JavaE序的开发,需要了解M码的行数Q如果不需要精的数字Q可以不用安装统计代码的插g。方法如下:
1Q?菜单栏,选择Search -> File... 打开File Search对话框(或者快捷键Ctrl + H,然后选择File Search标签Q?br /> 2Q?选中“正则表达?#8221;QRegular expressionQ,在搜索文本框输入 \n
3Q?文g名称输入 *.java
4Q?在范围里选中Enclosing projects
5Q??#8220;Search”q行搜烦。然后就可以l计出整个项目的代码行数?br />
如图Q?br /> imgFileSearch

转图h明?br />

]]>
Java需要引入闭包吗Q?/title><link>http://www.aygfsteel.com/airong/archive/2009/07/29/288830.html</link><dc:creator>电子?/dc:creator><author>电子?/author><pubDate>Tue, 28 Jul 2009 18:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/airong/archive/2009/07/29/288830.html</guid><wfw:comment>http://www.aygfsteel.com/airong/comments/288830.html</wfw:comment><comments>http://www.aygfsteel.com/airong/archive/2009/07/29/288830.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/airong/comments/commentRss/288830.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/airong/services/trackbacks/288830.html</trackback:ping><description><![CDATA[今天在javaeye论坛里看到的帖子Q认真地从头看到,寚w包有了进一步的认识。感谢原帖楼d所有回帖的朋友?br /> <br /> 原帖地址Q?a target="_blank" >http://www.javaeye.com/topic/412451</a><br /> 主题Q再论闭?br /> 作者:步行?br /> 寚w包感兴趣的朋友可以移步去看看?br /> <br /> 首先Q给出闭包的定义Q定义说法比较多Q本人偷懒,q接从原帖里摘取了。)Q?br /> <br /> <p style="margin: 0px; padding: 0px;"><strong style="font-weight: bold;"><span style="color: #0000ff;">闭包</span> <span style="color: #ff0000;"> </span> </strong>是可以包?span style="color: #0000ff;">自由Q未l定Q变?/span> 的代码块Q这些变量不是在q个代码块或者Q何全局上下文中定义的,而是在定义代码块的环境中定义?#8220;闭包” 一词来源于以下两者的l合Q要执行的代码块Q由于自由变量的存在Q相兛_量引用没有释放)和ؓ自由变量提供l定的计环境(作用域)?/p> <p style="margin: 0px; padding: 0px;"><br /> </p> <p style="margin: 0px; padding: 0px;">    可能上面的定义有Ҏ涩,下面看一?span style="color: #0000ff;">《Python 核心~程?/span> ?nbsp;<strong style="font-weight: bold;"><span style="color: #0000ff;">闭包 <span style="font-weight: normal;"><span style="color: #000000;">的解释?/span></span></span></strong></p> <p style="margin: 0px; padding: 0px;"><strong style="font-weight: bold;"><span style="color: #0000ff;"><span style="font-weight: normal;"><span style="color: #000000;"><br /> </span></span></span></strong></p> <p style="margin: 0px; padding: 0px;"><strong style="font-weight: bold;"><span><span style="font-weight: normal;">    如果在一个内部函数里Q对在外部作用域Q但不是在全局作用域)的变量进行引用,那么内部函数p定义?strong style="font-weight: bold;"><span style="color: #0000ff;">闭包</span> </strong>。定义在外部函数内的但由内部函数引用或者用的变量被称?span style="color: #0000ff;">自由变量</span> ?/span></span></strong></p> <p style="margin: 0px; padding: 0px;"><strong style="font-weight: bold;"></strong></p> <p style="margin: 0px; padding: 0px;"><strong style="font-weight: bold;"></strong></p> <p style="margin: 0px; padding: 0px;"><strong style="font-weight: bold;"></strong></p> <p style="margin: 0px; padding: 0px;"> </p> 原帖?#8220;liusong1111”回帖值得思考:<br /> <strong>[<em>closure作ؓ一{公民,可以被一个普通的变量引用、传递。在ruby里意味着它是Proc的一个对象(实例Q,自然可以调用Proc的方法(比如 callQ。以java的视角,cL用来l织数据的,不是描述行ؓ。而对于rubyQ行Z是数据,也可以用cLqͼcM是对象,cȝc还是对象,q才? 真正的Everything is Object。楼djava和java所谓的OO的媄响太深,评判q些问题Ӟ应该眼光往外多看看Q避免思维定势。尤其应该深入学习一门带闭包的语aQ? 看看它到底是怎么用的?/em>]</strong><br /> <br /> 首先Q我同意可以用OO模拟闭包的观点,q已l由原帖作?#8220;步行?#8221;l出详细的例子了。但是这势必在一定程度上会增加代码的复杂度和臃肿度。我惻I大部分时候大家更希望用更z的Ҏd成同L功能吧?br /> <br /> 另外Q对于闭包会破坏OO的结构的争论Q我更愿意从q义的角度来理解OO的定义。正如上面引用中所_“<strong><em>以java的视角,cL用来l织数据的,不是描述行ؓ。而对于rubyQ行Z是数据,也可以用cLqͼcM是对象,cȝc还是对?/em></strong>”。如果采用闭包,那么q个内部函数中可以定义局部变量,同时它本w就是行为,此时h属性和行ؓ的闭包,何尝不可以看做是OO的呢Q?br /> 个h的观Ҏ如果能达C下两条,那么我支持Java中引入闭包:<br /> <br /> 1Q引入闭包能够在保证E序的可L的基础上,化程序编写的复杂度,降低代码的臃肿度?br /> 2Q引入闭包至能够保证在大部分情况下Q程序的性能能够保持或者得到提升。(q里排除了极限情况)<br /> <br /> 本h寚w包的了解q远q不够,计划有空闲的时候,认真地学习下闭包的知识和相关的应用?br /> <br /> Ƣ迎讨论?br /> <br /> <img src ="http://www.aygfsteel.com/airong/aggbug/288830.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/airong/" target="_blank">电子?/a> 2009-07-29 02:33 <a href="http://www.aygfsteel.com/airong/archive/2009/07/29/288830.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]深入理解java多态性及个h的一Ҏ?/title><link>http://www.aygfsteel.com/airong/archive/2009/07/11/286340.html</link><dc:creator>电子?/dc:creator><author>电子?/author><pubDate>Fri, 10 Jul 2009 22:39:00 GMT</pubDate><guid>http://www.aygfsteel.com/airong/archive/2009/07/11/286340.html</guid><wfw:comment>http://www.aygfsteel.com/airong/comments/286340.html</wfw:comment><comments>http://www.aygfsteel.com/airong/archive/2009/07/11/286340.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/airong/comments/commentRss/286340.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/airong/services/trackbacks/286340.html</trackback:ping><description><![CDATA[原作者thinkGhosterQ链?a >http://blog.csdn.net/thinkGhoster/archive/2008/04/19/2307001.aspx</a><br /> 对原文进行了适当的调_更适合阅读?br /> <br /> <strong>注:</strong>本hd的一Ҏ考在文章最后?br /> <p><strong><font style="background-color: rgb(255, 255, 255);" color="#339966" size="4">Q一Q相关类</font></strong></p> <div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 95%;"> <div><img id="_8_178_Open_Image" onclick="this.style.display='none'; document.getElementById('_8_178_Open_Text').style.display='none'; document.getElementById('_8_178_Closed_Image').style.display='inline'; document.getElementById('_8_178_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="_8_178_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_8_178_Closed_Text').style.display='none'; document.getElementById('_8_178_Open_Image').style.display='inline'; document.getElementById('_8_178_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> A </span><span id="_8_178_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">...</span><span id="_8_178_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /> <img id="_44_91_Open_Image" onclick="this.style.display='none'; document.getElementById('_44_91_Open_Text').style.display='none'; document.getElementById('_44_91_Closed_Image').style.display='inline'; document.getElementById('_44_91_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="_44_91_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_44_91_Closed_Text').style.display='none'; document.getElementById('_44_91_Open_Image').style.display='inline'; document.getElementById('_44_91_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" align="top" />         </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> String show(D obj)</span><span id="_44_91_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">...</span><span id="_44_91_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">A and D</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />         }</span></span><span style="color: rgb(0, 0, 0);"> <br /> <img id="_128_175_Open_Image" onclick="this.style.display='none'; document.getElementById('_128_175_Open_Text').style.display='none'; document.getElementById('_128_175_Closed_Image').style.display='inline'; document.getElementById('_128_175_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="_128_175_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_128_175_Closed_Text').style.display='none'; document.getElementById('_128_175_Open_Image').style.display='inline'; document.getElementById('_128_175_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" align="top" />         </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> String show(A obj)</span><span id="_128_175_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">...</span><span id="_128_175_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">A and A</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />         }</span></span><span style="color: rgb(0, 0, 0);"> <br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: rgb(0, 0, 0);"> <br /> <img id="_198_367_Open_Image" onclick="this.style.display='none'; document.getElementById('_198_367_Open_Text').style.display='none'; document.getElementById('_198_367_Closed_Image').style.display='inline'; document.getElementById('_198_367_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="_198_367_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_198_367_Closed_Text').style.display='none'; document.getElementById('_198_367_Open_Image').style.display='inline'; document.getElementById('_198_367_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> B </span><span style="color: rgb(0, 0, 255);">extends</span><span style="color: rgb(0, 0, 0);"> A</span><span id="_198_367_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">...</span><span id="_198_367_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /> <img id="_234_281_Open_Image" onclick="this.style.display='none'; document.getElementById('_234_281_Open_Text').style.display='none'; document.getElementById('_234_281_Closed_Image').style.display='inline'; document.getElementById('_234_281_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="_234_281_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_234_281_Closed_Text').style.display='none'; document.getElementById('_234_281_Open_Image').style.display='inline'; document.getElementById('_234_281_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" align="top" />         </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> String show(B obj)</span><span id="_234_281_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">...</span><span id="_234_281_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">B and B</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />         }</span></span><span style="color: rgb(0, 0, 0);"><br /> <img id="_317_364_Open_Image" onclick="this.style.display='none'; document.getElementById('_317_364_Open_Text').style.display='none'; document.getElementById('_317_364_Closed_Image').style.display='inline'; document.getElementById('_317_364_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="_317_364_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_317_364_Closed_Text').style.display='none'; document.getElementById('_317_364_Open_Image').style.display='inline'; document.getElementById('_317_364_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" align="top" />         </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> String show(A obj)</span><span id="_317_364_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">...</span><span id="_317_364_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">B and A</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />         }</span></span><span style="color: rgb(0, 0, 0);"> <br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: rgb(0, 0, 0);"><br /> <img id="_386_387_Open_Image" onclick="this.style.display='none'; document.getElementById('_386_387_Open_Text').style.display='none'; document.getElementById('_386_387_Closed_Image').style.display='inline'; document.getElementById('_386_387_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="_386_387_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_386_387_Closed_Text').style.display='none'; document.getElementById('_386_387_Open_Image').style.display='inline'; document.getElementById('_386_387_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> C </span><span style="color: rgb(0, 0, 255);">extends</span><span style="color: rgb(0, 0, 0);"> B</span><span id="_386_387_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">...</span><span id="_386_387_Open_Text"><span style="color: rgb(0, 0, 0);">{}</span></span><span style="color: rgb(0, 0, 0);"> <br /> <img id="_407_408_Open_Image" onclick="this.style.display='none'; document.getElementById('_407_408_Open_Text').style.display='none'; document.getElementById('_407_408_Closed_Image').style.display='inline'; document.getElementById('_407_408_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="_407_408_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_407_408_Closed_Text').style.display='none'; document.getElementById('_407_408_Open_Image').style.display='inline'; document.getElementById('_407_408_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> D </span><span style="color: rgb(0, 0, 255);">extends</span><span style="color: rgb(0, 0, 0);"> B</span><span id="_407_408_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">...</span><span id="_407_408_Open_Text"><span style="color: rgb(0, 0, 0);">{}</span></span><span style="color: rgb(0, 0, 0);"> </span></div> </div> <p><font color="#339966" size="4"><strong>Q二Q问题:以下输出l果是什么?</strong></font></p> <div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 95%;"> <div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        <span style="color: rgb(0, 0, 0);">A a1 </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> A();<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        A a2 </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> B();<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        B b = </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> B();<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        C c </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> C(); <br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        D d </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> D(); <br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span><span style="color: rgb(0, 0, 0);">System.out.println(a1.show(b));   ?br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        System.out.println(a1.show(c));   ?br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        System.out.println(a1.show(d));   ?br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        System.out.println(a2.show(b));   ?br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        System.out.println(a2.show(c));   ?br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        System.out.println(a2.show(d));   ?br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        System.out.println(b.show(b));     ?br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        System.out.println(b.show(c));     ?br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        System.out.println(b.show(d));     ?nbsp;   </span></div> </div> <p><strong><font color="#339966" size="4">Q三Q答?/font></strong></p> <p>              ?nbsp;  A and A<br />               ?nbsp;  A and A<br />               ?nbsp;  A and D<br />               ?nbsp;  B and A<br />               ?nbsp;  B and A<br />               ?nbsp;  A and D<br />               ?nbsp;  B and B<br />               ?nbsp;  B and B<br />               ?nbsp;  A and D</p> <p><font color="#339966" size="4"><strong>Q四Q分?/strong></font></p> <p>        <font size="3">①②③比较好理解Q一般不会出错。④⑤就有点p涂了,Z么输出的不是"B and B”呢?Q!先来回顾一下多态性?/font></p> <p><font size="3">        q行时多态性是面向对象E序设计代码重用的一个最强大机制Q动态性的概念也可以被说成“一个接口,多个Ҏ”。Java实现q行时多态性的基础是动态方法调度,它是一U在q行时而不是在~译期调用重载方法的机制?/font></p> <p><font size="3">        Ҏ的重写Overriding和重载Overloading是Java多态性的不同表现?/font></p> <p><font size="3">       - <em><strong>重写(Overriding)</strong></em> 是父cM子类之间多态性的一U表现?/font><font size="3">如果在子cM定义某方法与其父cL相同的名U和参数Q我们说该方法被重写 (Overriding)。子cȝ对象使用q个ҎӞ调用子cM的定义,对它而言Q父cM的定义如同被“屏蔽”了?/font></p> <p><font size="3">       - <em><strong>重蝲(Overloading)</strong></em> 是一个类中多态性的一U表现。如果在一个类中定义了多个同名的方法,它们或有不同的参C数或有不同的参数cdQ则UCؓҎ的重?Overloading)。Overloaded的方法是可以改变q回值的cd?/font></p> <p><font size="3">        <font color="#0000ff"><strong><em>当超cd象引用变量引用子cd象时Q被引用对象的类型而不是引用变量的cd军_了调用谁的成员方法,但是q个被调用的Ҏ必须是在类中定义过的,也就是说被子c覆盖的Ҏ?/em></strong></font> Q但是如果强制把类转换成子cȝ话,可以调用子cM新添加而超cL有的Ҏ了。)</font></p> <p><font size="3">        好了Q先温习到这里,a归正传!实际上这里涉及方法调用的优先问题 Q优先由高C依次为:</font></p> <p><font size="3">       this.show(O), <br /> </font></p> <p><font size="3">       super.show(O)Q?br /> </font></p> <p><font size="3">       this.show((super)O),<br /> </font></p> <p><font size="3">       super.show((super)O)。让我们来看看它是怎么工作的?/font></p> <p><font size="3">        比如④,a2.show(b)Qa2是一个引用变量,cd为AQ则this为a2Qb是B的一个实例,于是它到cA里面找show(B obj)ҎQ没有找刎ͼ于是到A的super(类)找,而A没有类Q因此{到第三优先this.show((super)O)Qthis仍然? a2Q这里O为BQ?super)O?super)B即AQ因此它到类A里面找show(A obj)的方法,cA有这个方法,但是׃a2引用的是cB的一个对象,B覆盖了A的show(A obj)ҎQ因此最l锁定到cB的show(A obj)Q输Zؓ"B and A”?/font></p> <p><font size="3">        再比如⑧Qb.show(c)Qb是一个引用变量,cd为BQ则this为bQc是C的一个实例,于是它到cB找show(C obj)ҎQ没有找刎ͼ转而到B的超cA里面找,A里面也没有,因此也{到第三优先this.show((super)O)Qthis为bQO为CQ? (super)O?super)C即BQ因此它到B里面找show(B obj)ҎQ找CQ由于b引用的是cB的一个对象,因此直接锁定到类B的show(B obj)Q输Zؓ"B and B”?/font></p> <p><font size="3">        按照上面的方法,可以正确得到其他的结果?/font></p> <p><font size="3">        问题q要l箋Q现在我们再来看上面的分析过E是怎么体现色字体那句话的内늚。它_当超cd象引用变量引用子cd象时Q被引用对象的类型而不是引? 变量的类型决定了调用谁的成员ҎQ但是这个被调用的方法必L在超cM定义q的Q也是说被子类覆盖的方法。还是拿a2.show(b)来说吧?/font></p> <p><font size="3">        a2是一个引用变量,cd为AQ它引用的是B的一个对象,因此q句话的意思是由B来决定调用的是哪个方法。因此应该调用B的show(B obj)从而输?B and B”才对。但是ؓ什么跟前面的分析得到的l果不相W呢Q问题在于我们不要忽略了蓝色字体的后半部分,那里特别指明Q这个被调用的方法必L在超cM定义q的Q也是被子c覆盖的Ҏ。B里面的show(B obj)在超cA中有定义吗?没有Q那更谈不上被覆盖了。实际上q句话隐藏了一条信息:它仍然是按照Ҏ调用的优先来确定的。它在类A中找C show(A obj)Q如果子cB没有覆盖show(A obj)ҎQ那么它p用A的show(A obj)Q由于Bl承AQ虽然没有覆盖这个方法,但从类A那里l承了这个方法,从某U意义上_q是由B定调用的方法,只是Ҏ是在A中实现而已Q; 现在子类B覆盖了show(A obj)Q因此它最l锁定到B的show(A obj)。这是那句话的意义所在?/font></p> <p><font size="3"><br /> </font></p> <p><font face="Arial" size="3"><u><strong>个hd的一Ҏ考:</strong></u></font></p> <p><font face="Arial" size="3">W?个问题值得思考,输出 a2.show(c) Q答案是 B and A</font></p> <p><font face="Arial" size="3"><strong>分析Q?/strong><br /> </font></p> <p><font face="Arial" size="3">a2是类A的引用变量,引用的是cB的一个实例对象。c是类C的一个实例?/font></p> <p><font face="Arial" size="3"> 1Qthis.show(c)Q在A中找show(C obj)的方法,没有扑ֈQ进行第二步?<br /> </font></p> <p><font face="Arial" size="3">2Qsuper.show(c)QA没有类Q进行第三步?<br /> </font></p> <p><font face="Arial" size="3">3Qthis.show(super(c)), super(c)是BQA中是没有show(B obj)Ҏ的,但是q时候会l箋往上找Q找B的父c,super(B)是AQ在A中找show(A obj), 扑ֈ了?<br /> </font></p> <p><font face="Arial" size="3">4Qa2引用的是cB的一个对象,由B来决定调用哪个方法,因ؓcB中覆盖了A的show(A obj)ҎQ因此最l用cB中的show(A obj)Ҏ?nbsp;</font></p> <p><font face="Arial" size="3">所以结论是q里super(O)是采用了</font><font color="#336600" face="Arial" size="3"><strong>逐层往上寻?/strong></font><font face="Arial" size="3">的方式,具体来说Q父cL不到对应的showҎQ就扄cȝ父类Q如果还没有Ql往上找Q直到找到根基类?/font></p> <p><font face="Arial" size="3">Z验证作者原文中蓝色字体D|字的正确性,我测试了输出a1.show(c)Q结果和预想的一P是A and A. <br /> </font></p> <p><font face="Arial" size="3">q里Qa1.show(c)和a2.show(c)的区别在于持有的引用对象的不同,a1是持有了Acȝ一个实例对象,而a2是持有了Bcȝ一个实例对象,所以当都找CAcM?span id="_8_178_Open_Text"><span style="color: rgb(0, 0, 0);">show(A obj)Ӟ引用的对象的cd军_了该调用哪个成员的方法,前提是这个被调用的方法必被子类覆盖了。所?/span></span>a1.show(c)输出的是A and AQ?a2.show(c)输出的是 B and A.</font><font size="3"><font color="#0000ff"><strong><em></em></strong></font></font></p> <font color="#339966" size="4"><strong></strong></font> <img src ="http://www.aygfsteel.com/airong/aggbug/286340.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/airong/" target="_blank">电子?/a> 2009-07-11 06:39 <a href="http://www.aygfsteel.com/airong/archive/2009/07/11/286340.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]Java property文g中文解决Ҏhttp://www.aygfsteel.com/airong/archive/2009/07/09/285991.html电子?/dc:creator>电子?/author>Wed, 08 Jul 2009 19:42:00 GMThttp://www.aygfsteel.com/airong/archive/2009/07/09/285991.htmlhttp://www.aygfsteel.com/airong/comments/285991.htmlhttp://www.aygfsteel.com/airong/archive/2009/07/09/285991.html#Feedback0http://www.aygfsteel.com/airong/comments/commentRss/285991.htmlhttp://www.aygfsteel.com/airong/services/trackbacks/285991.html 原链?http://gostar.bokee.com/3885062.html

原作者: gostar

1.原理

Property文g中,使用的编码方式根据机器本w的讄可能是GBK或者UTF-8。而在JavaE序中读取Property文g的时候用的是Unicode~码方式Q这U编码方式不同会D中文q。因此需要将Property文g中的中文字符转化成Unicode~码方式才能正常昄中文?/font>

2.解决办法

Java提供了专门的工具对Property文gq行Unicode转化Q这U工具就是native2asciiQ它在JDK安装环境的bin目录下?

native2ascii 工具带有本机编码字W(非拉?1 和非单一码字W)的文件{换成带有Unicode~码字符的文件?

假设需要{化的属性文件ؓQD:\src\resources.propertiesQ含有中文字W)

转化后的属性文件ؓQD:\classes\resources.propertiesQ中文字W统一转化为UnicodeQ?

那么使用如下命o
JAVA_HOME\bin\native2ascii -encoding GBK D:\src\resources.properties D:\classes\resources.properties

p含有中文字W的属性文件{化成单一Unicode~码方式的属性文件。中文ؕ码自然会被解冟?



]]>
?TOM-Skype版本的拨h?/title><link>http://www.aygfsteel.com/airong/archive/2009/06/30/284694.html</link><dc:creator>电子?/dc:creator><author>电子?/author><pubDate>Mon, 29 Jun 2009 17:42:00 GMT</pubDate><guid>http://www.aygfsteel.com/airong/archive/2009/06/30/284694.html</guid><wfw:comment>http://www.aygfsteel.com/airong/comments/284694.html</wfw:comment><comments>http://www.aygfsteel.com/airong/archive/2009/06/30/284694.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/airong/comments/commentRss/284694.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/airong/services/trackbacks/284694.html</trackback:ping><description><![CDATA[<span><span style="font-family: Verdana; font-size: 12px; line-height: 18px;"><span>今天试着装了wm版的Skype,因ؓ是国际版Q所以发C了国内卡的余额。打国内手机L报余额不的错误。于是求助于GoogleQ果然网l上已有高hl出解决办法?br /> <br /> ? TOM-<strong class="highlight">Skype</strong>版本的长话通拨h法:<br /> </span></span></span> <ul> <li><span><span style="font-family: Verdana; font-size: 12px; line-height: 18px;"><span>拨打手机LQ?099008668033Q?Q手机号码?/span></span></span><span><span style="font-family: Verdana; font-size: 12px; line-height: 18px;"><span>CZ: 00990086680330<strong>13917497583</strong></span></span></span></li> </ul> <ul> <li><span><span style="font-family: Verdana; font-size: 12px; line-height: 18px;"><span>拨打座机LQ?099008668033Q区P不要?)Q电话号码?/span></span></span><span><span style="font-family: Verdana; font-size: 12px; line-height: 18px;"><span>CZ</span></span></span><span><span style="font-family: Verdana; font-size: 12px; line-height: 18px;"><span>: </span></span></span><span><span style="font-family: Verdana; font-size: 12px; line-height: 18px;"><span>0099008668033<strong>02161021281</strong></span></span></span><span><span style="font-family: Verdana; font-size: 12px; line-height: 18px;"><span>     </span></span></span></li> </ul> <span><span style="font-family: Verdana; font-size: 12px; line-height: 18px;"><span><br /> Z拨号方便Q徏议把常用L前面加+99008668033后保存ؓ联系人?/span></span><span> </span></span><img src="/CuteSoft_Client/CuteEditor/images/emsmile.gif" alt="" align="absmiddle" border="0" /><span> </span> <img src ="http://www.aygfsteel.com/airong/aggbug/284694.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/airong/" target="_blank">电子?/a> 2009-06-30 01:42 <a href="http://www.aygfsteel.com/airong/archive/2009/06/30/284694.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">կ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ٲ</a>| <a href="http://" target="_blank">ĺ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">̫</a>| <a href="http://" target="_blank">ֹ</a>| <a href="http://" target="_blank">۽</a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ѷ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʤ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ӣɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Զ</a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">κ</a>| <a href="http://" target="_blank">ľ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>