﻿<?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>博客园-程序人生-最新评论</title><link>http://www.cnblogs.com/wxj1020/CommentsRSS.aspx</link><description /><language>zh-cn</language><pubDate>Fri, 16 May 2008 09:19:00 GMT</pubDate><lastBuildDate>Fri, 16 May 2008 09:19:00 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: 《Head.First设计模式》的学习笔记（6）－－单件模式</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/17/1154593.html#1201310</link><dc:creator>HedgeHog</dc:creator><author>HedgeHog</author><pubDate>Sat, 17 May 2008 05:42:06 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/17/1154593.html#1201310</guid><description><![CDATA[public static Singleton Instance<br>11        {<br>12            get<br>13            {<br>14                if (null == uniqueInstance)         // 先判断uniqueInstance是否为空，如果为空，再进行加锁 <br>15                {<br>16                    lock (obj)                      // 使用加锁，避免两个线程同时进入<br>17                    {<br>18                        if (null == uniqueInstance) // 如果uniqueInstance为空，说明对象没有被创建<br>19                        {<br>20                            uniqueInstance = new Singleton();<br>21                        }                        <br>22                    }<br>23                }<br>24                return uniqueInstance;<br>25            }<br>26        }<br><br><br>这 最里层的判断是不是多余了?<br><br>lock (obj)                      // 使用加锁，避免两个线程同时进入 15                { 16                    if (null == uniqueInstance) // 如果uniqueInstance为空，说明对象没有被创建 17                    { 18                        uniqueInstance = new Singleton(); 19                    } 20                    return uniqueInstance; 21                }<br><br>把 lock(obj)写到  if (null == uniqueInstance)里面,不就行了?<br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">HedgeHog</a> 2008-05-17 13:42 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/17/1154593.html#1201310#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 《Head.First设计模式》的学习笔记（9）－－外观模式</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/17/1200714.html#1201303</link><dc:creator>yelloweast</dc:creator><author>yelloweast</author><pubDate>Sat, 17 May 2008 05:20:35 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/17/1200714.html#1201303</guid><description><![CDATA[很好的例子，学习一下。<br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">yelloweast</a> 2008-05-17 13:20 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/17/1200714.html#1201303#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 从Excel中导数据到DataGridView</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/17/1174072.html#1201302</link><dc:creator>HedgeHog</dc:creator><author>HedgeHog</author><pubDate>Sat, 17 May 2008 05:20:01 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/17/1174072.html#1201302</guid><description><![CDATA[学习了<br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">HedgeHog</a> 2008-05-17 13:20 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/17/1174072.html#1201302#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 《Head.First设计模式》的学习笔记（9）－－外观模式</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200929</link><dc:creator>鹰击长空</dc:creator><author>鹰击长空</author><pubDate>Fri, 16 May 2008 09:19:00 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200929</guid><description><![CDATA[@ 炭炭<br>如果为了解耦，那么这些子系统的接口不能暴露。但是如果有特殊需求（比如提高性能），那么子系统的接口也可以暴露，此时外观模式只起到了简化接口的目的，没有降低耦合度。当然对每一个子系统的接口进行包装，那更好，但是性能可能会有损失。具体问题应该具体分析。<br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">鹰击长空</a> 2008-05-16 17:19 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200929#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 《Head.First设计模式》的学习笔记（9）－－外观模式</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200915</link><dc:creator>炭炭</dc:creator><author>炭炭</author><pubDate>Fri, 16 May 2008 09:10:00 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200915</guid><description><![CDATA[如果有必要，这些子系统的接口还可以继续暴露给客户，这就是所谓的高级功能（或称为自定义）。<br>------------------------<br><br>这样还怎么解耦阿，大哥。有什么东西不能在facade里包一下，必须直接暴露的？还请指教<br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">炭炭</a> 2008-05-16 17:10 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200915#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 《Head.First设计模式》的学习笔记（9）－－外观模式</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200839</link><dc:creator>鹰击长空</dc:creator><author>鹰击长空</author><pubDate>Fri, 16 May 2008 08:25:00 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200839</guid><description><![CDATA[@CoderZh<br>现在项目做的不多，体会不是很深。不过我会努力的。<br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">鹰击长空</a> 2008-05-16 16:25 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200839#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 《Head.First设计模式》的学习笔记（9）－－外观模式</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200792</link><dc:creator>CoderZh</dc:creator><author>CoderZh</author><pubDate>Fri, 16 May 2008 07:57:00 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200792</guid><description><![CDATA[希望能看到更多的楼主的自己的分析和理解~<br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">CoderZh</a> 2008-05-16 15:57 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/16/1200714.html#1200792#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 《Head.First设计模式》的学习笔记（7）－－命令模式</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/06/1182397.html#1184450</link><dc:creator>songcan</dc:creator><author>songcan</author><pubDate>Tue, 06 May 2008 00:46:00 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/06/1182397.html#1184450</guid><description><![CDATA[隐隐觉得这个模式与之前的策略模式好像似曾相识<br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">songcan</a> 2008-05-06 08:46 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/06/1182397.html#1184450#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: SQL语句优化技术分析</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/06/1173638.html#1184408</link><dc:creator>李海</dc:creator><author>李海</author><pubDate>Tue, 06 May 2008 00:27:00 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/06/1173638.html#1184408</guid><description><![CDATA[--引用--------------------------------------------------<br>俺是SQL砖家: &lt;img src=&quot;<a href="http://www.cnblogs.com/Emoticons/qface/055243188.gif&quot;" target="_new">http://www.cnblogs.com/Emoticons/qface/055243188.gif&quot;</a>  alt=&quot;&quot; /&gt;分析得很好。&lt;br /&gt;<br>&lt;br /&gt;<br>俺最喜欢看SQL最终的执行计划，查询优化器很少按俺的想象去优化。看执行计划后再调整SQL最准确。&lt;img src=&quot;<a href="http://www.cnblogs.com/Emoticons/msn/49_49.gif&quot;" target="_new">http://www.cnblogs.com/Emoticons/msn/49_49.gif&quot;</a>  alt=&quot;&quot; /&gt;<br><br>--------------------------------------------------------<br><br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">李海</a> 2008-05-06 08:27 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/06/1173638.html#1184408#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 《Head.First设计模式》的学习笔记（1）</title><link>http://www.cnblogs.com/wxj1020/archive/2008/05/05/1113185.html#1183951</link><dc:creator>长空新雁</dc:creator><author>长空新雁</author><pubDate>Mon, 05 May 2008 11:48:00 GMT</pubDate><guid>http://www.cnblogs.com/wxj1020/archive/2008/05/05/1113185.html#1183951</guid><description><![CDATA[＠ badnewfish<br>没有用到委托，只是一般的调用而已，和你认为的委托不是一回事。<br><br><div align=right><a style="text-decoration:none;" href="http://wxj1020.cnblogs.com/" target="_blank">长空新雁</a> 2008-05-05 19:48 <a href="http://www.cnblogs.com/wxj1020/archive/2008/05/05/1113185.html#1183951#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>