<?xml version="1.0" encoding="UTF-8" ?><?XML-stylesheet type="text/css" href="http://www.goberl.com/Theme/feed.css" ?><rss version="2.0">	<channel>	<title><![CDATA[Goberl]]></title>	<link><![CDATA[http://www.goberl.com/]]></link>	<description><![CDATA[Goberl的博客文章]]></description>	<language>Zh-CN</language>	 <ttl>60</ttl><item>	<title><![CDATA[杂记]]></title>	<link><![CDATA[http://www.goberl.com/archive/item68.aspx]]></link>	<description><![CDATA[<p><span style="font-size: larger;"><strong>1.随机查询链接</strong></span><br />
SELECT TOP 10 * FROM categories<br />
ORDER BY NEWID()<br />
<br />
<strong><span style="font-size: larger;">2..提高性能</span></strong><br />
&nbsp;&nbsp;&nbsp; 对建立了索引的列最好设置默认值，以去除is (not) null查询<br />
&nbsp;&nbsp;&nbsp; 少用Join、SQL连接字符串的查询<br />
&nbsp;&nbsp;&nbsp; 使用Like时，通配符不要放在句首<br />
&nbsp;&nbsp;&nbsp; 用&lt;、&gt;代替not<br />
&nbsp;&nbsp;&nbsp; 用EXITS代替IN<br />
&nbsp;&nbsp;&nbsp; 用&gt;=代替&gt;,&gt;2 TO &gt;=3<br />
&nbsp;&nbsp;&nbsp; OUTER JOIN 与 INNER JOIN 的处理方式是不同的：对于 INNER JOIN 表，优化器会尝试重新排列联接顺序，而对于 OUTER JOIN 表则不会。外部表（LEFT OUTER JOIN 中的左表和 RIGHT OUTER JOIN 中的右表）将首先访问，然后才会访问内部表。这一固定的联接顺序可能会导致执行计划不能达到最优（创建索引后，inner join更具有优势）。<br />
&nbsp;&nbsp;&nbsp; <strong>使用非规范化数据库 </strong><br />
规范化的数据库可防止数据存在功能相关性，以便轻松、高效地更新数据库。但是，查询数据库时可能需要联接许多表来组合信息。随着联接表数目的增多，查询运行时间会大大增加。因此，规范化的数据库并不一定是最佳的选择。如果数据库适当程度地不合规范，则可以减少必须联接在一起的表的数目，而不会使更新过程过于复杂。这通常是一个很好的折衷办法。<br />
&nbsp;&nbsp;&nbsp;<strong>&nbsp; 注意</strong>&nbsp; <br />
通常，如果有相当多的查询需要联接五个或六个以上的表，则应考虑使用非规范化数据库。 （http://msdn.microsoft.com/zh-cn/library/ms172432(SQL.90).aspx）<br />
&nbsp;&nbsp;&nbsp; 与固定长度列相比，可变长度列的缺点是一些操作的效率不高。例如，如果可变长度列开始时很小，而某 UPDATE 子句使其显著增大，则可能就要重新定位记录。此外，频繁的更新会导致数据页随着时间推移变得比较零碎。因此，在数据长度变化不大并且需要频繁进行更新时，建议使用固定长度列。<br />
&nbsp;&nbsp;&nbsp; 创建长度较小的行 <br />
&nbsp;&nbsp;&nbsp; 使用长度较小的键 <br />
&nbsp;&nbsp;&nbsp; 全文搜索性能（http://msdn.microsoft.com/zh-cn/library/ms142560(SQL.90).aspx）<br />
<br />
<span style="font-size: larger;"><strong>3.SQL区分大小写</strong></span><br />
区分大小写:select * from table where col='semye' collate Chinese_PRC_CS_AI<br />
不区分大小写:select * from table where col='semye' collate Chinese_PRC_CI_AI<br />
<br />
<br />
&nbsp;</p>]]>	</description>	<pubDate>2010-4-30 22:18:22</pubDate>	<category><![CDATA[Programming]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item68.aspx</guid></item><item>	<title><![CDATA[凤凰肉其实是山鸡肉]]></title>	<link><![CDATA[http://www.goberl.com/archive/item67.aspx]]></link>	<description><![CDATA[<p>有个很有趣的现象。比如买MP3，市场上几十上百（低于500）的Mp3比比皆是，可人们花了那个钱买了还是觉得赶不上上千元的iPod MP3&mdash;&mdash;真实奇迹啊，一个公司让成本只有数百RMB的产品卖你2000RMB，你还觉得自己那个酷、那个神气、那个得意，从来不认为自己是冤大头，难道不奇迹么？当然如果把iPod的核心技术算上，你会觉得不只那个价，可其成本又会比其他的Mp3贵得了多少呢？如果你认为独一无二是无价的，那我也没话说了。<br />
&nbsp; 又或者买一双Nike鞋吧，一听Nike，哇，挺牛的国际知名品牌，说不定你买的鞋子就在中国或者越南生产的。生产后送到美国打上标签，再运回中国销售，过了两次洋，这&ldquo;山鸡就变凤凰&rdquo;了。其实你吃的凤凰肉还是自己林子里长的山鸡。<br />
&nbsp; 又或者诺基亚、摩托罗拉手机吧，在未上壳之前，说不定就来自同一家生产厂家，可能其手机设计都来自同一家公司。不要以为诺基亚就比摩托罗拉强，他们或许在同一个厂家生产，甚至使用相同原材料。<br />
&nbsp; 为什么会发生这些奇怪的现在，人们宁愿花更多的Moeny去购买相同质量和性能的产品，仅仅因为他们是品牌或者服务（又有多少人真正享用了这些服务）。人们在购买这些品牌商品的时候除了商品的产品价值外，更获得了品牌价值，为了心理满足，必须为之付出代价的。<br />
&nbsp; 我不得不说，中国，真的缺少自己的品牌。生产环节的盈利是产品链中盈利最小的。可能这是中国当前国情决定的，但还是希望中国能多出几个具有国际竞争力的公司&mdash;&mdash;强调一下，当然不是中国移动、中国石油那种。</p>]]>	</description>	<pubDate>2009-12-29 11:59:17</pubDate>	<category><![CDATA[咸鱼炒蛋]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item67.aspx</guid></item><item>	<title><![CDATA[搜狗浏览器来了]]></title>	<link><![CDATA[http://www.goberl.com/archive/item66.aspx]]></link>	<description><![CDATA[<p>今晚搜狗输入法弹窗，我不小心点了&ldquo;确定&rdquo;安装了搜狗浏览器，在安装过程中我想点取消都没法点。好像那个弹窗也只有在右上角有常规的关闭按钮，中间只有&ldquo;确定&rdquo;。</p>
<p><br />
进来看界面还算不错，那个独立页面防假死、防无响应也很创新，用了一会，明显感觉比IE6快（当前使用的PC是IE6）所以跑到贴吧看看大伙的体验，看要不要卸载它。不过呢，发现贴吧貌似有很多枪手。还有搜狗浏览器官网说永久免费，其前提应该是IE已经付费了吧（IE的Money应该包含在Windows中吧，当然很多人包括我都是用的D版，对它免费不免费没什么概念）</p>
<p><br />
我开了搜狗浏览器20分钟左右，9个标签，一看任务管理器。发现这家伙吃了我65.46+54.57+10.20+13.85=163.88MB内存。其内存名称和所用内容如下：<br />
<span style="color: #808000">setask.exe,65.46MB<br />
setask.exe,54.57MB<br />
setask.exe,10.20MB<br />
SogouExplorer.exe,13.85MB<br />
65.46+54.57+10.20+13.85=163.88MB</span></p>
<p><br />
搜狗推出浏览器是说快（血本提供代理的原因？）、标签页独立稳定，360浏览器除了说快，更注重安全。看来他们都分了一杯属于自己的羹。&nbsp;</p>
<p>Chrome浏览器我也用了一段时间，感觉好多网页打开速度特慢（虽然Chrome运行JavaScript的速度很快），还有好多网页显示不正常（这个主要是由于chrome太标准化了，而网页制作者大多只编写适合IE的）</p>
<p><br />
我平时都用Firefox，在它之前用遨游，有一段时间不知道是由于电脑出故障还是咋的，遨游一而再再而三崩溃（包括系统重装、浏览器换版本），所以不得不另觅一款浏览器。当时准备在IE7和Firefox上做选择。我就用手动方式测试：<br />
不断地新建标签页，然后输入相同网址，直到浏览器崩溃或者反应超慢的时候为止，以最大标签数为衡量标准。当然创建标签的速度是能多快就多快。<br />
结果发现：<br />
IE7通常在10到20个的时候，就直接崩溃（不是无响应），而Firefox直到40个左右的时候才反应超慢或则偶尔崩溃，由此我对所有基于IE内核的浏览器都排斥了，那些采用了IE内核的浏览器再吹捧安全、稳定、快速都有其局限性；这也是为什么Chorme给我的印象虽然不好，但我相信它的发展空间。人家现在完全可以做更多贴近于用户的功能，而他们更关心的是内核，一个浏览器的内核在一定程度上决定着它未来的命运，这正是Google着眼于未来的网络操作系统的卓越眼光。</p>
<p><br />
当我写这篇文章写到一半的时候（为了查看开了几个标签页），不小心把正在打字的标签页关闭了，习惯性（Firefox）地右击鼠标发现没有&ldquo;恢复关闭的标签页&rdquo;，觉得这一点还真的只有Firefox才有，我喜欢。</p>
<p><br />
其实我喜欢Forefox的原因主要是由于其稳定性和扩展性，当然安全性不用说了吧，并且是开源、免费、跨平台的。比如上网上银行、支付宝什么的，需要使用IE才能正常访问，仅仅需要安装一个IE Tab，当访问这些&ldquo;特殊&rdquo;网站的时候，会自动切换到IE内核浏览模式；需要什么网络书签、导航什么的直接下载一个扩展就是了。近来我还发现了Fifefox的一个奇特之处&mdash;&mdash;当点击网络上的Email链接的时候，Firefox直接询问我是否选择Gmail、Yahoo，还是系统默认的邮件发送软件，而选择前两者似乎都直接打开相应的Email页面，如果账号已经登录，直接填写标题和内容，点击发送就是了，还真不错啊。&nbsp;</p>]]>	</description>	<pubDate>2009-12-15 21:50:32</pubDate>	<category><![CDATA[咸鱼炒蛋]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item66.aspx</guid></item><item>	<title><![CDATA[Information About Lucene]]></title>	<link><![CDATA[http://www.goberl.com/archive/item65.aspx]]></link>	<description><![CDATA[<p><strong>Lucene简介</strong><br />
<span style="color: rgb(128, 128, 0);">http://www.chedong.com/tech/lucene.html</span></p>
<p><strong>Luncene初见索引、检索</strong><br />
<span style="color: rgb(128, 128, 0);">http://topic.csdn.net/u/20080408/17/a9095641-b014-4223-9b68-6c694fd242f5.html</span></p>
<p>&nbsp;</p>
<p><strong>Luncene源码下载</strong><br />
<span style="color: rgb(128, 128, 0);">http://apache.freelamp.com/lucene/java/lucene-3.0.0-src.zip</span></p>
<p>&nbsp;</p>
<p><strong>Luncene jar下载</strong><br />
<span style="color: rgb(128, 128, 0);">http://apache.freelamp.com/lucene/java/lucene-3.0.0.zip</span></p>
<p>&nbsp;</p>
<p><strong>Lucene API</strong><br />
<span style="color: rgb(128, 128, 0);">http://lucene.apache.org/</span></p>
<p>&nbsp;</p>
<p><strong>Luncene Demo解说</strong><br />
<span style="color: rgb(128, 128, 0);">http://lucene.apache.org/java/3_0_0/demo</span></p>
<p>&nbsp;</p>
<p><strong>解决Luncene Demo中文无法索引</strong><br />
<span style="color: rgb(128, 128, 0);">http://blog.eood.cn/archives/247/</span></p>
<p>&nbsp;</p>
<p><strong>Luncene FQ</strong><br />
<span style="color: rgb(128, 128, 0);">http://wiki.apache.org/lucene-java/LuceneFAQ</span></p>
<p>&nbsp;</p>
<p><strong>Luncene索引HTML</strong><br />
<span style="color: rgb(128, 128, 0);">http://wiki.apache.org/lucene-java/LuceneFAQ#How_can_I_index_HTML_documents.3F</span></p>
<p><strong>Luncene索引OpenDocument (aka OpenOffice.org), RTF, Microsoft Word, Excel, PowerPoint,Visio, etc</strong><br />
<span style="color: rgb(128, 128, 0);">http://wiki.apache.org/lucene-java/LuceneFAQ#How_can_I_index_file_formats_like_OpenDocument_.28aka_<br />
OpenOffice.org.29.2C_RTF.2C_Microsoft_Word.2C_Excel.2C_PowerPoint.2C_Visio.2C_etc.3F</span></p>
<p>&nbsp;</p>
<p><strong>Luncene索引PDF</strong><br />
<span style="color: rgb(128, 128, 0);">http://wiki.apache.org/lucene-java/LuceneFAQ#How_can_I_index_PDF_documents.3F</span></p>
<p><strong>Luncene索引中文、日文、韩文</strong><br />
<span style="color: rgb(128, 128, 0);">http://wiki.apache.org/lucene-java/LuceneFAQ#Can_I_use_Lucene_to_index_text_in_Chinese.2C_<br />
Japanese.2C_Korean.2C_and_other_multi-byte_character_sets.3F</span></p>
<p>&nbsp;</p>
<p><strong>编码介绍</strong><br />
<span style="color: rgb(128, 128, 0);">http://hi.baidu.com/baseetoo/blog/item/951b612a05ffd3f0e7cd406c.html</span></p>
<p>&nbsp;</p>
<p><strong>UFT8转换到GB2312</strong><br />
<span style="color: rgb(128, 128, 0);">http://www.cnblogs.com/comsteed/articles/1126023.html</span></p>
<p>&nbsp;</p>
<p><strong>GB2312转换到UFT8</strong><br />
<span style="color: rgb(128, 128, 0);">http://topic.csdn.net/t/20051026/10/4350730.html</span></p>
<p>&nbsp;</p>
<p><strong>获取文档编码</strong><br />
<span style="color: rgb(128, 128, 0);">http://hi.baidu.com/i7521/blog/item/50d51d55166ecbcdb645ae01.html<br />
http://dev.csdn.net/Develop/article/10/10961.shtm<br />
http://dev.csdn.net/Develop/article/10/10962.shtm</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]>	</description>	<pubDate>2009-12-12 18:20:39</pubDate>	<category><![CDATA[互联网]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item65.aspx</guid></item><item>	<title><![CDATA[关于Linux的一点想法]]></title>	<link><![CDATA[http://www.goberl.com/archive/item64.aspx]]></link>	<description><![CDATA[<p>以前玩了一段时间Linxu，不但在Vmware中玩了，还把自己系统给装上了XP/Linux的双系统，可最终都因无法解决Linux的问题、应用软件 的不支持的，把Linux给卸载了，一切想学习Linux操作系统的计划都破产在那个陌生的Red Hat上，记得好像当时输入法坏了，不能输入汉字，搞了很久都没OK。</p>
<p>最近又想要学Linux，主要是因为学习Java的缘故，大家都知道Java最大的优点就在于其超强的迁移能力，无论是Windows还是Unix还是 Mac，只要装上Java虚拟机，那个Java程序是畅快的跑。而目前大型的服务器采用的系统都是Linux、Unix，很少网络巨人使用微软操作系统做服务器 （微软除外）。我是想既然学Java，那就把那个Java的极致表现出来，写Linux上的Java，可能会奇怪，在Widnows上写好了放在 Linux上跑就是了，可调试咋办呢？没人教我如何配置一台Linux电脑来跑JSP、PHP，虽然网上有那么多的教材，可都是那种一蹴而就的，可能当时 配置好了，可出问题了又不能解决。所以啊，我想好好的学Linux，学会使用它配置服务器环境，学会管理Linux服务器。</p>
<p>为了装双系统、也为了备份好我电脑里面的一些重要软件和资料，我前天&ldquo;冲动&rdquo;地买了个移动硬盘，等备份好数据后，再来从硬盘安装双系统吧。</p>
<p>说道Linxu，又不得不说Oracle，今天面试的时候，面试官问我对它了解多少，我就说仅仅是曾经好奇拿来测试了下，可能他仍然不明白我具体了解什 么，就问我&ldquo;Oracle有什么特点&rdquo;。我一想，有啥特点呢？就随便说了&ldquo;处理能力比MS SQL强、能够在多种OS上运行&rdquo;，也不知道咋的了。我以前电脑确实是装了Oracle，因电脑配置太低，装上后卡得要命，没两天我就把它给卸载了。我也 不知道Oracle有啥特点，只知道中石油、中石化这些大公司爱用&mdash;&mdash;他们的数据量太大了。而银行呢都不用Oracle，用DB2去了&mdash;&mdash;银行有钱啊。</p>]]>	</description>	<pubDate>2009-11-6 21:33:35</pubDate>	<category><![CDATA[Google微软]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item64.aspx</guid></item><item>	<title><![CDATA[Word转换到PDF、SWF]]></title>	<link><![CDATA[http://www.goberl.com/archive/item63.aspx]]></link>	<description><![CDATA[<p>最近在填写简历的过程中使用了pdf格式的文档，<wbr></wbr>偶然发现一个把<strong>Word转换为pdf或wsf格式</strong>的转换器&mdash;&mdash;<a href="http://www.adobe.com/products/flashpaper/" target="_blank">FlashPaper2</a>，<wbr></wbr>确实不错。</p>
<p>如果在Word中设置好格式，直接另存为网页文件，<wbr></wbr>会 失去本来的格式，原来不错的外观可能会&ldquo;支离破碎&rdquo;。而另存为swf格式，即使word里面插入了图片，也仍可保留格式、外观，还可以防止Copy，并且 可以在没有装Office的电脑上查看该文档，即使下载到桌面上仍然可以用浏览器、暴风影音等查看，这对于那些只希望别人查看,不希望被复制、被搜索引擎索引的文档实在是一件好事。</p>
<p>pdf这种文档对于我来说有点像Linux给我的印象，都说他好，可使用它的人却远没有使用Word的人多（国内至少如此，可能都是用的盗版Office 或者wps），一般用得较多的地方是论文库中的文档，通常在图书馆论文库搜索的文章都提供pdf格式下载，使用pdf是免费的，不用给人缴纳Moeny。</p>
<p><a href="http://www.adobe.com/products/flashpaper/" target="_blank">FlashPaper2</a>有30天的试用期，不过网上到处是注册码。在中国就是这样，盗版、山寨横行，都在用微软的系统，可没见几个正版的&mdash;&mdash;也可能是学校和个人电脑这种现象才普遍。微软不打击教育方面的盗版，让这些学生们在学校用Windows就用上瘾，走上社会搞商业了，再来&ldquo;勒索&rdquo;。像操作系统这种需要消耗大量时间和精力才能搞懂的东 西一旦用习惯了，是很难让消费者再去习惯另一种系统。</p>]]>	</description>	<pubDate>2009-11-6 21:04:34</pubDate>	<category><![CDATA[互联网]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item63.aspx</guid></item><item>	<title><![CDATA[改版后的Bug]]></title>	<link><![CDATA[http://www.goberl.com/archive/item62.aspx]]></link>	<description><![CDATA[<p>前几天就发现阅读次数总是显示1，以为问题出在JS上，昨晚检查项目文件终于发现在更新到数据库的时候没有累加，而是直接赋值1，这种逻辑性错误实在难找。在睡觉前更新了dll，现在应该能够正常工作了。</p>
<p>昨天学校双选了&mdash;&mdash;没戏。专业签了10多个销售的；一个软件开发的，在新疆太远了，没努力争取。现在觉得自己学的东西没一点优势，自己会的，别人也会。瞄上个不错的岗位，对他有兴趣，可要求又达不到&hellip;&hellip;</p>
<p>革命尚未成功，同志仍需努力！</p>
<p>&nbsp;</p>]]>	</description>	<pubDate>2009-11-3 9:09:22</pubDate>	<category><![CDATA[Programming]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item62.aspx</guid></item><item>	<title><![CDATA[Blog程序改版]]></title>	<link><![CDATA[http://www.goberl.com/archive/item61.aspx]]></link>	<description><![CDATA[<p>上周三到周末把博客改版了，但只修改了后台程序，页面皮肤没有修改。</p>
<ol>
    <li>采用了三层架构；</li>
    <li>增加了页面的关键词描述；</li>
    <li>部分地方使用多线程；</li>
    <li>丢弃以前的web服务，采用jQuery调用Ashx实现ajax；</li>
    <li>验证码字符增加随机旋转；</li>
    <li>优化了评论、友情链接管理模块；</li>
    <li>修复C#高亮代码模块的Bug；</li>
    <li>修改RSS仅显示最近发表的12篇新闻；</li>
    <li>tag排序的文章页添加分页功能；</li>
    <li>全局排序分页、分类排序分页、tag排序分页每页显示文章数和右侧菜单中各个模块调用数均采用了统一配置文件；</li>
    <li>可手动设置分类列表的排序情况。</li>
    <li>优化了分页查询语句</li>
</ol>
<p>这次改版最满意的是使用了三层架构，使用它非常有利于以后的升级。这几天在观察运行情况<img alt="" src="/fckeditor/editor/images/smiley/myface/img69.gif" /></p>]]>	</description>	<pubDate>2009-10-27 13:49:08</pubDate>	<category><![CDATA[Programming]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item61.aspx</guid></item><item>	<title><![CDATA[利用缓存过期在ASP.NET中实现定时器]]></title>	<link><![CDATA[http://www.goberl.com/archive/item60.aspx]]></link>	<description><![CDATA[<p>在B/S结构中要实现定时器（或者说是一个事务）实在不是一件好办的事。可当你在网上搜索&ldquo;<strong>ASP.NET定时器</strong>&rdquo;的时候，你会发现搜索结果是如此的多，可这大多数结果中的代码健壮性都是那样的脆弱&mdash;&mdash;没有考虑诸如IIS进程的<strong>自然消亡</strong>、<strong>IIS进程的故障崩溃</strong>、<strong>重启服务器</strong>等等因素。这些不可捕捉的错误会让你的定时器失去定时的功能。可能会有人问，为什么要用Web程序做计时器呢？自己添加一个Windows服务或者在数据库中添加一个作业不就解决了么？可事实上，又有多少人对自己购买的虚拟主机具有如此权限呢？如果你用的是自己的服务器或者更高权限的服务器，那此文对你的确是多余了。</p>
<p>我曾经为ASP.NET中的<span style="color: rgb(128, 128, 0);">Application_End</span>感到窃喜，以为有了它，以上提及的自然消亡、故障崩溃都可迎刃而解了，可经过自己的实践发现那个<span style="color: rgb(128, 128, 0);">Application_End</span>真的是很无助&mdash;&mdash;你在该代码段真的是nothing to do。国内搜索到的所谓ASP.NET定时器几乎都是采用<span style="color: rgb(128, 128, 0);">System.Thread</span>进程监控实现的，要让Thread在IIS进程中保持长期(比如1年365天时时刻刻)的稳定性实在是不敢打包票。</p>
<p>最后我在CodeProject上找到一篇文章<span style="text-decoration: underline;">《</span><a target="_blank" href="http://www.codeproject.com/KB/aspnet/ASPNETService.aspx">Simulate a Windows Service using ASP.NET to run scheduled jobs</a>》（在ASP.NET中模拟Widnows服务执行计划任务）。在这篇文章中，他利用<strong>缓存的过期</strong>来实现定时器功能。在ASP.NET中，当你添加缓存的时候，会有一个<strong>缓存回调函数</strong>让你同时加入，表示当缓存过期被系统清除的时候，你可以在这个回调函数中做一些事情。缓存回调函数正是实现ASP.NET定时器的重要基石。假设我们在00:00:00时刻加入一个缓存对象，缓存的过期时间我们设置为00:02:00，当到达00:02:00或者更提前的时候，缓存将被系统回收，当系统通知缓存被回收的时候我们再次添加一个缓存，如此循环往复（<strong>缓存被添加-&gt;过期-&gt;再次添加-&gt;过期&hellip;&hellip;</strong>）从而模拟出了钟表秒针。当每一次缓存过期的时候我们都检查是否有需要执行的事务，有则执行，然后再次添加一个缓存，从而模拟出了定时器。</p>
<p>但是要想添加缓存，必须有用户请求Web服务器才能使用<span style="color: rgb(128, 128, 0);">Cache</span>。所以，在缓存过期的时候，除了检查是否有事务需要执行外，还要用<span style="color: rgb(128, 128, 0);">WebClient</span>（或者其他方法）请求我们的Web页面，在页面被请求的时候添加缓存。</p>
<p>上面的思路已经基本模拟出了定时器的功能，但对于服务器重启、IIS故障仍然没有解决。《Simulate a Windows Service using ASP.NET to run scheduled jobs》中提到，可以把Google Robots抓取你网页的频率设置大一点，当出现上述情况时，以尽快的速度产生Web请求。只要有人（或者机器人）在访问你的Web程序，缓存定时器（我们把它称为&ldquo;<strong>缓存时钟</strong>&rdquo;吧）就可以正常工作，而他的工作是由系统自行维护的，而不是Thread进程维护，所以稳定性会有很大的提高。<u>经过我的实践，只要服务器没有重启、IIS进程没有崩溃，上述中采用<em>在缓冲过期时请求Web页面</em>（WebClient）的行为是不会让IIS进程自然消亡的（缓存过期时间长短、服务器配置也会影响）。（下划线文字的描述与事实不符，观测的结果可能受到网络蜘蛛的影响）</u>具体如何实现，请看下文。</p>
<p>&nbsp;</p>
<pre class="CodecSharp" id="CodecSharp0"><a onclick='copyCodeByID(0)' href="javascript:void(0);">复制代码</a>

<span class="code-keyword">using</span> System;
<span class="code-keyword">using</span> System.Data;
<span class="code-keyword">using</span> System.Net;
<span class="code-keyword">using</span> System.Configuration;
<span class="code-keyword">using</span> System.Web;
<span class="code-keyword">using</span> System.Text;
<span class="code-keyword">using</span> System.Web.Caching;
<span class="code-keyword">using</span> System.Web.Security;
<span class="code-keyword">using</span> System.Web.UI;
<span class="code-keyword">using</span> System.Web.UI.WebControls;
<span class="code-keyword">using</span> System.Web.UI.WebControls.WebParts;
<span class="code-keyword">using</span> System.Web.UI.HtmlControls;

<span class="code-keyword">public</span> <span class="code-keyword">class</span>CacheTimer

{

    <span class="code-keyword">const</span> <span class="code-keyword">string</span> logPath = <span class="code-str">@&quot;d:\cacheLogs\cacheLog.txt&quot;</span>;
    <span class="code-keyword">const</span> <span class="code-keyword">string</span> cacheKeyName = <span class="code-str">&quot;myCacheTimer&quot;</span>;<span class="code-note">//缓存的名字<br /><br /><br /></span>    <span class="code-keyword">const</span> <span class="code-keyword">string</span> rawUrl = <span class="code-str">&quot;http://localhost/CacheTimer/CacheTimmer.aspx&quot;</span>;<span class="code-note">//缓存过期时请求的页面地址<br /><br /></span>    <span class="code-keyword">public</span> <span class="code-keyword">void</span> RegistCacheTimmer()

    {

        <span class="code-keyword">if</span> (HttpContext.Current.Cache[cacheKeyName] != <span class="code-keyword">null</span>) <span class="code-keyword">return</span>;
        <span class="code-keyword">try</span>
        {

            HttpContext.Current.Cache.Add(cacheKeyName, '1', <span class="code-keyword">null</span>,
                DateTime.Now.AddSeconds(12), Cache.NoSlidingExpiration,
                CacheItemPriority.High,
                <span class="code-keyword">new</span> CacheItemRemovedCallback(CacheItemOnRemoved));
            WriteCacheLog(<span class="code-str">&quot;缓存时钟注册成功&quot;</span>);   
        }
        <span class="code-keyword">catch</span> (Exception e)
        {
            WriteCacheLog(<span class="code-str">&quot;缓存时钟注册失败:&quot;</span> + e.Message);
        }
    }
    <span class="code-keyword">protected</span> <span class="code-keyword">void</span> CacheItemOnRemoved(<span class="code-keyword">string</span> key, <span class="code-keyword">object</span> <span class="code-keyword">value</span>, CacheItemRemovedReason reason)
    {  
        <span class="code-keyword">if</span> (key == cacheKeyName)
        {   
            ExeJob();    
            RequestWebPage();         
        }
    }

    <span class="code-keyword">protected</span> <span class="code-keyword">void</span> ExeJob()
    {

        WriteCacheLog(<span class="code-str">&quot;被执行了&quot;</span>);   
        <span class="code-note">//如果日期的天数能被7整除、下午13点到13点15分的时候，则执行<br /><br /><br /></span>        <span class="code-keyword">if</span> (DateTime.Now.Day % 7 == 0 &amp;&amp; DateTime.Now.Hour == 13 &amp;&amp; DateTime.Now.Minute &lt;= 15)

        {
            <span class="code-note">//执行数据操作或者其他任务<br /><br /></span>        }
    }
    <span class="code-keyword">protected</span>  <span class="code-keyword">void</span> RequestWebPage()
    {
        WebClient wc = <span class="code-keyword">new</span> WebClient();
        wc.DownloadData(rawUrl);
    }

    <span class="code-keyword">public</span> <span class="code-keyword">static</span> <span class="code-keyword">void</span> WriteCacheLog(<span class="code-keyword">string</span> logInfor)
    {
        <span class="code-keyword">try</span>
        {
            System.IO.StreamWriter sw = <span class="code-keyword">new</span> System.IO.StreamWriter(logPath, <span class="code-keyword">true</span>, Encoding.GetEncoding(<span class="code-str">&quot;GB2312&quot;</span>));
            sw.WriteLine(DateTime.Now.ToString() + <span class="code-str">&quot;   &quot;</span> + logInfor);
            sw.Close();
            sw.Dispose();
        }
        <span class="code-keyword">catch</span>
        {

           <span class="code-note">//调试的时候注意是否对该文件有写权限<br /><br /></span>        }
    }
} 

</pre>
<p>&nbsp;</p>
<ol>
    <li>添加缓存:<span style="color: rgb(128, 128, 0);">RegistCacheTimmer</span></li>
    <li>请求页面:<span style="color: rgb(128, 128, 0);">RequestWebPage</span></li>
    <li>执行任务:<span style="color: rgb(128, 128, 0);">ExeJob</span></li>
    <li>缓存过期时候执行请求页、执行任务:<span style="color: rgb(128, 128, 0);">CacheItemOnRemoved</span></li>
    <li>写日志的方法:<span style="color: rgb(128, 128, 0);">WriteCacheLog</span></li>
</ol>
<p>然后在Global.asax文件中添加下列代码段：</p>
<p>&nbsp;</p>
<pre class="CodecSharp" id="CodecSharp1"><a onclick='copyCodeByID(1)' href="javascript:void(0);">复制代码</a>
   <span class="code-keyword">void</span> Application_BeginRequest(Object sender, EventArgs e)
    {        
        CacheTimer registTimer = new CacheTimer();
        registTimer.RegistCacheTimmer();        
    }
</pre>
<p>&nbsp;</p>
<p>但是如果我们的任务在没有执行完毕，IIS进程崩溃或者服务器重启了，怎么办？我的建议是把任务写人文件（包括数据库），检查的时候直接检查任务文件就可以保证重启IIS进程，任务不丢失了。</p>
<p>&nbsp;</p>
<p>感谢《<a target="_blank" href="http://www.codeproject.com/KB/aspnet/ASPNETService.aspx">Simulate a Windows Service using ASP.NET to run scheduled jobs</a>》的作者提供此定时器的解决方法。</p>
<p><a href="http://www.goberl.com/userAshx/fileDownLoad.ashx?fn=CacheTimer.rar" target="_blank">Goberl缓存时钟源码下载</a><br />
<br />
<br />
&nbsp;</p>]]>	</description>	<pubDate>2009-10-8 1:47:22</pubDate>	<category><![CDATA[Programming]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item60.aspx</guid></item><item>	<title><![CDATA[ASP.NET如何实现多线程]]></title>	<link><![CDATA[http://www.goberl.com/archive/item59.aspx]]></link>	<description><![CDATA[<p>上次做了个东西，用了多线程，现总结如下。</p>
<p>使用多线程是为了提高CPU的利用率，即在在相同的时间里面做更多的事情(但前提是系统资源没有完全耗尽），ASP.NET中使用多线程可以加快页面在服务器端的生成速度。一般页面生成过程中花费时间最多的是数据库查询阶段，如果你的页面有10个查询，不使用多线程的话，这10个查询将是串行执行的&mdash;&mdash;即依次执行每一个查询。如果使用多线程，将可以使这10个查询几乎同时执行。这显然会提高页面的生成速度。<br />
在网上搜索了些许帖子说在IIS进程中使用多线程是不稳定的，可我经过实践却发现ASP.NET使用多线程也没出啥问题。不过在ASP.NET中使用多线程得注意一些地方，不然确实是不稳定，甚至是行不通的。比如<strong>不能在多线程中使用HttpContext</strong>下的任何方法和属性，这就包括<span style="color: rgb(128, 128, 0);">Cookie</span>、<span style="color: rgb(128, 128, 0);">Session</span>、<span style="color: rgb(128, 128, 0);">Response</span>、<span style="color: rgb(128, 128, 0);">Request</span>、<span style="color: rgb(128, 128, 0);">Application</span>等等，当使用这些方法或者属性的时候,IIS进程将会直接崩溃。更要注意的是，由于多线程与页面的加载（Load）是异步执行的，<strong>必须让这些创建的线程在Load执行完之前同步</strong>，不然可能导致数据没有加载成功。 可能会有人问HttpContext等都被限制了，页面中还能做什么呢？我们完全可以把创建的线程与页面主体隔开，把需要的数据先在页面主体中获取，然后直接传入到创建的线程中就可解决。话不多说，具体如何，请看下文。</p>
<p>假设某个页面中有2个SQL查询，一个是根据Url传递来的参数P确定当前页的内容，另一个查询是显示所有分类。第一个查询语句需要用到<span style="color: rgb(128, 128, 0);">Request.QueryString</span>获取P传递来的页码，第二个查询语句则可直接写SQL语句。<br />
假设第一个查询语句如：<span style="color: rgb(128, 128, 0);">SELECT * FROM Archives WHERE Page=</span><span style="color: rgb(0, 0, 255);">传递的页码</span><br />
假设第二个查询语句如：<span style="color: rgb(128, 128, 0);">SELECT * FROM Category</span></p>
<p>我们先创建一个类，用于接受参数P和数据绑定控件ID(此处使用Repeater控件绑定数据),此类能够把SQL语句查询的结果绑定到数据控件(Repeater)中。</p>
<p>
  <pre id='CodecSharp0' class='CodecSharp'><a href='javascript:void(0);' onclick='copyCodeByID(0)'>复制代码</a>
<span class='code-keyword'>public</span> <span class='code-keyword'>class</span>BindData
{
    <span class='code-keyword'>private</span> int currentPage = 1;
    <span class='code-keyword'>private</span> Repeater rpID;

    <span class='code-keyword'>public</span> BindData(Repeater rpID)
    {
        <span class='code-keyword'>this</span>.rpID = rpID;
    }
    <span class='code-keyword'>public</span> BindData(Repeater rpID,int page)
    {
        <span class='code-keyword'>this</span>.rpID = rpID;
        <span class='code-keyword'>this</span>.currentPage = page;
    }   
    

    <span class='code-keyword'>public</span> <span class='code-keyword'>void</span> BindCategory()
    {
        <span class='code-keyword'>string</span> strSql=<span class='code-str'>&quot;SELECT * FROM Category&quot;</span>;
        <span class='code-keyword'>this</span>.BindDataToRepeater(strSql, <span class='code-keyword'>this</span>.rpID);

    }

    <span class='code-keyword'>public</span> <span class='code-keyword'>void</span> BindArchive()
    {
        <span class='code-keyword'>string</span> strSql = <span class='code-keyword'>string</span>.Format(<span class='code-str'>&quot;SELECT * FROM Archives WHERE Page={0}&quot;</span>,<span class='code-keyword'>this</span>.currentPage);
        <span class='code-keyword'>this</span>.BindDataToRepeater(strSql, <span class='code-keyword'>this</span>.rpID);
    }

    <span class='code-keyword'>private</span> <span class='code-keyword'>void</span> BindDataToRepeater(<span class='code-keyword'>string</span> strSql, Repeater rp)
    {
        <span class='code-keyword'>if</span> (rp == <span class='code-keyword'>null</span>) <span class='code-keyword'>return</span>;
        SqlConnection conn = <span class='code-keyword'>new</span> SqlConnection(<span class='code-str'>&quot;data source=数据服务器地址;User ID=用户名;pwd=密码;Initial Catalog=数据库名&quot;</span>);
        SqlCommand cmd = <span class='code-keyword'>new</span> SqlCommand(strSql, conn);
        SqlDataReader dtr;
        <span class='code-keyword'>try</span>

        {
            conn.Open();
            dtr = cmd.ExecuteReader();
            controlID.DataSource = rp;
            controlID.DataBind();
            <span class='code-keyword'>if</span> (!dtr.IsClosed)
                dtr.Close();
        }
        <span class='code-keyword'>catch</span> { }
        <span class='code-keyword'>finally</span>
        {
            cmd.Dispose();
            <span class='code-keyword'>if</span> (conn.State = ConnectionState.Open)
                conn.Close();
        }
 
    }
}
</pre>


</p>
<ol>
    <li>上面创建的<span style="color: rgb(128, 128, 0);">BindData</span>类中有2个构造函数，分别用于绑定分类、绑定Arhive的不同形式。如果使用其他数据绑定控件则可进行相应修改；</li>
    <li>创建了1个私有方法<span style="color: rgb(128, 128, 0);">BindDataToRepeater</span>用于把对应的SQL语句查询的结果绑定到对应的Repeater控件上。同时在此方法中使用了<span style="color: rgb(128, 128, 0);">SqlDataReader</span>，以提高绑定数据的速度。如果你使用了数据工厂可修改<span style="color: rgb(128, 128, 0);">BindDataToRepeater</span>中的具体实现过程；</li>
    <li>2个共有方法<span style="color: rgb(128, 128, 0);">BindCategory</span>和<span style="color: rgb(128, 128, 0);">BindArchive</span>分别用于创建不同SQL语句、设置Repater的ID；</li>
    <li>同时需要引入<span style="color: rgb(128, 128, 0);">System.Web.UI</span>、<span style="color: rgb(128, 128, 0);">System.Web.UI.HtmlControls</span>、<span style="color: rgb(128, 128, 0);">System.Data.SqlClient</span>3个必要的命名空间。</li>
</ol>
<p>值得注意的是在<span style="color: rgb(128, 128, 0);">BindDataToRepeater</span>方法中使用了try..catch语句，但并没有在catch块中做任何事情，为什么我们用try.catch却不在catch块中做点什么事情呢，不是多此一举吗？<strong>使用try..catch是为了防止在执行BindDataToRepeater时抛出异常，若此处出现异常且此方法是在多线程中执行的，将会导致IIS进程崩溃，进而影响其他页面的正常执行</strong>，故而用try...catch防止<span style="color: rgb(128, 128, 0);">BindDataToRepeater</span>抛出错误。</p>
<p>我们之所以为数据绑定创建一个类，是为了提高内存利用率，当数据加载（Load）完毕的时候，为这个类创建的实例就会销毁。我们也可以通过在页面中创建几个全局变量来实现。但我还是建议以类的形式传递数据而不是使用全局变量。下面，我们开始在页面的Load中创建线程了。首先你需要在页面中引入<span style="color: rgb(128, 128, 0);">System.Threading</span>命名空间。</p>
<p>
<pre id='CodecSharp0' class='CodecSharp'><a href='javascript:void(0);' onclick='copyCodeByID(0)'>复制代码</a>
<span class='code-keyword'>protected</span> <span class='code-keyword'>void</span> Page_Load(<span class='code-keyword'>object</span> sender, EventArgs e)
    {
        <span class='code-keyword'>if</span> (!IsPostBack)
        {
            int Page = 1;
            <span class='code-keyword'>if</span>(Request.QueryString[<span class='code-str'>&quot;p&quot;</span>]!=<span class='code-keyword'>null</span>)
                Page = Convert.ToInt32(Request.QueryString[<span class='code-str'>&quot;p&quot;</span>]);

            BindData LoadArchives = <span class='code-keyword'>new</span> BindData(rpArhive,Page);  
            Thread thArhives=<span class='code-keyword'>new</span> Thread(<span class='code-keyword'>new</span> ThreadStart(LoadArchives.BindArchive));  
            thArhives.Start();
      
            BindData LoadCategory=<span class='code-keyword'>new</span> BindData(rpCategory);
            Thread thCategory = <span class='code-keyword'>new</span> Thread(<span class='code-keyword'>new</span> ThreadStart(LoadCategory.BindCategory));
            thCategory.Start();

            <span class='code-note'>//进行页面的其他非数据绑定操作



</span>            thArhives.Join();
            thCategory.Join();
           
            

 
        }
    }
</pre>

</p>
<p>上面的代码显示在<span style="color: rgb(128, 128, 0);">!IsPostBack</span>状态下绑定数据。利用<span style="color: rgb(128, 128, 0);">Request.QueryString</span>获取了当前页码，并创建了<span style="color: rgb(128, 128, 0);">BindData</span>的2个实例<span style="color: rgb(128, 128, 0);">LoadArchives</span>、<span style="color: rgb(128, 128, 0);">LoadCategory</span>，通过<span style="color: rgb(128, 128, 0);"> <strong>Thread thArhives=new Thread(new ThreadStart(LoadArchives.BindArchive))</strong></span>为绑定Arhice创建线程，通过<span style="color: rgb(128, 128, 0);"><strong>Thread thCategory = new Thread(new ThreadStart(LoadCategory.BindCategory))</strong></span>为绑定分类创建线程，同时调用<span style="color: rgb(128, 128, 0);">Thread</span>的<span style="color: rgb(128, 128, 0);">Start</span>方法使2个线程进入执行状态。最后，在Load的最下面用Thread的<span style="color: rgb(128, 128, 0);">Join</span>方法使创建的2个线程与页面加载同步。<br />
值得注意的是，<strong>Join方法是必须的，如果不使用，可能导致创建的线程还未把数据完全绑定到Repeater上，Load就已经执行完毕，若如此页面上将没有任何数据。同时调用Start的代码行应尽量早，调用Join的代码行都应尽量迟&mdash;&mdash;尽量放在Page_Load代码段的末尾</strong>，这样才能达到多线程的目的，若你每调用一个Start马上调用Join，其实质和没有使用多线程的效果是一样的。Join在MSND上的解释是：<strong>在继续执行标准的 COM 和 SendMessage 消息泵处理期间，阻塞调用线程，直到某个线程终止为止</strong>。</p>
<p>只要设置好ASPX页面Repeater的绑定项，数据就可成功加载了。上面仅仅展示了2个SQL语句的查询，如果你有10个或者更多的SQL查询，在Page_Load中创建10个线程，让他们异步执行，最后用<span style="color: rgb(128, 128, 0);">Join</span>同步到Load，是一个提高性能的不错方法。</p>
<p><strong>本文由Goberl理解实践，但个人能力有限，若有错误，望请指教！</strong><br />
<br />
<br />
&nbsp;</p>]]>	</description>	<pubDate>2009-10-7 0:04:58</pubDate>	<category><![CDATA[Programming]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item59.aspx</guid></item><item>	<title><![CDATA[关于验证码的一点想法]]></title>	<link><![CDATA[http://www.goberl.com/archive/item58.aspx]]></link>	<description><![CDATA[<p>验证码，不用解释，用于区别人和机器的手段。</p>
<p>大多数<strong>验证码</strong>都采用图片<strong>方式</strong>，还有有声音和视频（包括Flash）方式的，采用图片是因为目前的图片识别技术还不够成熟，很难把图片上的文字还原成字符文本，这使得给现在的验证码提供了一个基石,倘若哪天图片识别已不是问题，验证码们不得不另谋媒体了。除了上面的几种方式，也有把验证码存储在网页文件或者Cookie中的，这两种方式可能能够瞒过那种专注在discuz、dvbbs、Phpwind等灌水的程序。但若是你的站点真是一个好站，在没有其他防灌水机前提下使用这两种方式<strong>存储</strong>验证码的话可能要被人罐饱。所以啊，验证码的存储要找个安全的地方放置。一般验证码都是存储在服务器上的，比如<strong>Session</strong>。</p>
<p>不过现在的网民们越来越抱怨验证码的复杂，复杂得瞅了半天输入的结果还是错误的，更有甚者瞅了半天没看出个字符来，有点像在玩苏轼的&rdquo;横看成岭侧成峰，远近高低各不同&ldquo;。一方面为了防止恶意程序，另一方面为了勉强用户体验，验证的方式也变得五花八门了， 比如做算术题、常识题什么的，真是道高一尺魔高一丈。</p>
<p>不过我对于数字、字母组合的验证码有个建议，就是不要把大写字母O、小写字母o、数字0、大写字母I、数字1加入<strong>验证码生成</strong>范畴了，这几个字符经过复杂变化实在是难以区分。</p>]]>	</description>	<pubDate>2009-10-6 3:19:59</pubDate>	<category><![CDATA[Programming]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item58.aspx</guid></item><item>	<title><![CDATA[保护Email地址的方式]]></title>	<link><![CDATA[http://www.goberl.com/archive/item57.aspx]]></link>	<description><![CDATA[<p>为了逃避邮件地址搜索器的搜索，很多站点的邮件地址的显示方式都用了转换方式，比如用图片、替换@、javascript等方式来显示。我比较推崇 javascript这种方式，因为如果真有谁想给你发送邮件的话，可能他更希望的是复制，而不是一个一个字符的输入邮件地址，虽然用其他字符替换也不 错，别人复制了仅需要修改一个字符就Ok，但毕竟没有Javascript的方式好。更进一步讲，别人增加邮件地址搜索器的防替换功能，你即使替换了@字 符，也可能被搜索到。<br />
javascript显示邮件的方式就多种多样了，比如document.write、为HTML元素增加一个子元素并设置 innerHTML（innerText）等等。javascript显示邮件地址的方式能防止被搜索到的根本原因在于用户看到的文本信息是存在于浏览器 的内存当中，而不是实际文件方式存在的，一般的搜寻器都是分析网页源代码来获取Email地址的。</p>]]>	</description>	<pubDate>2009-10-6 2:40:32</pubDate>	<category><![CDATA[互联网]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item57.aspx</guid></item><item>	<title><![CDATA[商务中国——你真牛A]]></title>	<link><![CDATA[http://www.goberl.com/archive/item56.aspx]]></link>	<description><![CDATA[<p>当你享受的web服务因为黑客攻击无法正常工作时，我们能做的仅仅是等待。等待多久？10分钟、1个小时、6个小时、24个小时、3天还是1个月？如果是没有汽车和飞机的封建社会可能还能忍受3、5个月才能送递一封信的漫长，可这是什么，这是互联网，以光速传递的互联网，你&mdash;&mdash;<strong>商务中国</strong>，让数万域名无法访问，并且等待的时间从9月27日到10月5日仍未结束，这能说明什么呢？至少说明你商务中国不是一个负责的公司，你根本不配在你的商标中注册中国二字。如此状态，只能成为另一个&ldquo;三株口服液&rdquo;。商务中国&mdash;&mdash;让你在你的沉闷中消失吧；商务中国，让你随着你沉默的DNS和客服服务放假去吧。</p>
<p>以下摘抄网友评论，以下内容不完全代表本人意志：</p>
<div style="padding: 3px; background-color: rgb(238, 238, 238); font-size: 13px;">
<p>回复：<a href="http://tieba.baidu.com/f?kz=648453880">商务中国的域名解析服务器被攻击了，网站都打不开了</a><br />
&nbsp;&nbsp; &nbsp;<br />
我们的上百个域名无法正常打开，时好时坏&mdash;&mdash;商务中国，你真该好好加强一下技术力量了！<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：户撒刀王 2009-9-29 20:56 回复此发言 <br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<br />
&nbsp;&nbsp;&nbsp; <br />
没法跟万网比呀,万网24小时值班,商务中国电话没人接...这就是差距,有机会转到万网去.<br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&nbsp; <br />
&nbsp; <br />
现在是不是还是不行啊<br />
我们的域名有的可以打开,有的打不开<br />
非常不稳定<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：121.28.88.* 2009-10-1 16:12 回复此发言<br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<br />
&nbsp;&nbsp;&nbsp; <br />
商务中国的服务的确太差了，电话没人接，也没在线客服，这么多天域名解析不正常，28号公告确说解决了，骗谁啊！目前1号还打不开 ，<strong>不知是没水平还是没道德</strong>，这样下去快关门了<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：125.112.25.* 2009-10-1 21:03 回复此发言<br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<br />
<br />
&nbsp;&nbsp; &nbsp;<br />
晕了，这么多天了还是偶尔打开一次，打电话，没人接，什么骗子公司啊，让我们损失惨重<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：125.65.167.* 2009-10-1 22:29 回复此发言<br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&nbsp;&nbsp; <br />
建议大公司的网站。不要用商务中的域名解析服务。我给市政府做的网站说是10月1日试运行的。我9月30日访问能正常的。10月1日与市长一起等待网站开张。一片空白。领导不懂这方面。只一句话说我是骗子。我在这个城市没有办法混了。QQ：49554791。建议大家组团索赔。空间用临时地址域名能访问。<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：58.54.63.* 2009-10-2 09:57 回复此发言 <br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&nbsp;&nbsp;&nbsp; <br />
<br />
&nbsp;&nbsp; &nbsp;<br />
商务中国域名,从28日到今天也没有好.强烈气愤!!<br />
同一网站,有的地方能打开,有的地方打不开.<br />
受其影响,损失严重!<br />
我们保留追究其责任的权利.<br />
同时,我们对商务中国相关防范技术深表失望!太讲不过去了,你们的技术都是割草出身啊??<br />
商务中国在出现这么多天问题后还没解决好，而且没有做好解释工作，没道德没职业操守！！！<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：sye51 2009-10-2 16:16 回复此发言 <br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&nbsp;&nbsp;&nbsp; <br />
<br />
&nbsp;&nbsp;&nbsp; <br />
妈的这B的什么域名啊还敢有中国2个字&nbsp; 中国人霉都被你倒光!!你们倒好 国庆自己休息去了 我们这么多人的域名都受罪&nbsp; 你知道损失多少钱吗? 这样的垃圾服务器攻击都防不了 明知道被攻击转移服务器不行吗? 买你域名真TM倒了八辈子霉.看我下辈子都不进你这垃圾站了&nbsp; 真想臭骂<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：218.73.164.* 2009-10-2 20:11 回复此发言<br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<br />
&nbsp;&nbsp;&nbsp; <br />
还有这狗B网站连联系他们电话都根本联系不到的 真TM火<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：218.73.164.* 2009-10-2 20:13 回复此发言 <br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<br />
&nbsp;&nbsp;&nbsp; <br />
都遇到这情况了，还赶公告放假，放TMB,就没见过这种公司，我公司上千个域名不正常，导致很多上万流量的客户的站都被降权和被K收录了，现在找我们打官司，索赔偿，这样的损失怎么办，<br />
这种公司太差了，大家都走人到万网去。<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：好玩大家一起来 2009-10-2 20:19 回复此发言<br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<br />
&nbsp;&nbsp;&nbsp; <br />
操商务中国的祖宗十八代，我的域名到现在还打不开，都4天了，还不解决，没那技术就别出来混啊，<br />
----------------------------------<br />
致：攻击商务中国的黑客：你们攻击DNS服务器有什么用啊，受损失的都是我们这些无辜的人，有本事把商务中国的网站一起黑了！！！<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：lmczq163m 2009-10-2 20:43 回复此发言 <br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; <br />
现在4号了，偶尔有上，真晕啊。&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：119.134.8.* 2009-10-4 10:33 回复此发言 <br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<br />
&nbsp;&nbsp;&nbsp; <br />
现在5号了，偶尔破天荒的打得开一次&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
作者：221.10.18.* 2009-10-5 14:18 回复此发言<br />
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;</p>
</div>
<p style="text-align: center;"><img src="/fckeditor/FCKPro/upLoadFiles/image/baiduNews_shangwuzhongguo.gif" alt="商务中国DNS遭攻击，客服不应，问题不解决" /><br />
<img src="/fckeditor/FCKPro/upLoadFiles/image/google_shangwuzhongguo.gif" alt="商务中国DNS遭攻击，客服不应，问题不解决" /></p>]]>	</description>	<pubDate>2009-10-5 23:06:21</pubDate>	<category><![CDATA[咸鱼炒蛋]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item56.aspx</guid></item><item>	<title><![CDATA[Google 企业应用套件(域名邮箱)]]></title>	<link><![CDATA[http://www.goberl.com/archive/item55.aspx]]></link>	<description><![CDATA[<p>Google 企业应用套件是让有域名的用户(例如：www.xx.yy)能够拥有类似abc@xx.yy的邮箱，类似域名邮箱（腾讯最近也推出这个服务了）.但是中国 地区是不能使用此服务的，(Google提示该地区的域名无法使用此服务)以前我都一直以为验证的方法是验证域名的IP是否为中国地区，前几天才发现是使 用访问者IP验证的，从而，用web代理服务器就可轻松注册使用此服务.</p>
<p><strong>第一步.注册</strong><br />
使用支持JS的web代理服务器或者代理IP（其他国家）访问http://www.google.com/a/cpanel/domain /new?hl=zh-CN，我用的是http://www.newsheadlinesdaily.com 。在填写电话号码的时候注意不要填写中国的(例如：00-1-213-XXXXXXX 为洛杉矶号码）</p>
<p><strong>第二步.配置域名cname</strong><br />
配置cname是为了让你能够通过类似mail.xx.yy访问登陆页面<br />
例如：mail.xx.yy 到 ghs.google.com</p>
<p><strong>第三步.配置域名MX</strong><br />
配置MX是为让Google邮件服务器能够正确的把邮件发到类似abc@xx.yy的邮件上.<br />
配置说明：http://www.google.com/support/a/bin/answer.py?answer=33352&amp;hl=zh_CN</p>
<p><strong>第四步.配置SPF</strong><br />
配置SPF是为了增加安全性<br />
配置说明：http://www.google.com/support/a/bin/answer.py?answer=33786&amp;query=SPF&amp;topic=&amp;type=</p>
<p><strong>第五步.使用说明</strong><br />
Email登陆地址1：http://mail.google.com/a/xx.yy/<br />
Email登陆地址2：第二步中配置的cname.例如：mail.xx.yy<br />
第六步.POP/SMTP配置<br />
配置说明：http://www.google.com/support/a/bin/answer.py?answer=33380&amp;query=pop&amp;topic=&amp;type=</p>]]>	</description>	<pubDate>2009-9-25 4:45:17</pubDate>	<category><![CDATA[Google微软]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item55.aspx</guid></item><item>	<title><![CDATA[由服务器控件引发的联想]]></title>	<link><![CDATA[http://www.goberl.com/archive/item54.aspx]]></link>	<description><![CDATA[<p>服务器控件，能免则免，大家都这么说。</p>
<p>比方说绑定数据的时候，如果还想ASP那样在数据访问层就使用HTML，而不用数据绑定控件，我想这样就失去了逻辑和表现分离的&ldquo;理想；<br />
比方说数据验证上，如果自己写JS客户端验证数据完整性和安全性，可能得写一大堆，而这些JS代码却还不能拦截非法数据到达服务器端，如果使用了服务器验证控件，稍一设置就可自动生成客户端和服务器端验证;<br />
比如说文本框Text，即使客户端的readonly设置为true，可也不能阻挡&ldquo;非法&rdquo;用户提交&ldquo;非法&rdquo;数据到服务器端，而服务器控件Text的readonly设置为true时，客户端的任何改变都不会影响到他的值（.NET 2.0++）。</p>
<p>使用服务器控件时方便了、快捷、安全了，可性能是降低了，可为了追求性能，又不得不去写很多码码。</p>
<p>当使用了服务器控件的时候，你会发现你的页面是那样的臃肿，ViewState、各种样式的JS函数乱窜于你的网页源文件中，如果只看被浏览器渲染的页面还算个美人痞子，当看到那些码码的时候总觉得她很脏，怎么有点像从青楼出来的呢。</p>
<p>我总是想让源文件变得干净点，可发现那样总是很困难。我一直企盼<a href="http://bbsmax.com/">BBSMAX</a>那样干净 的源文件，让写Web程序的人感觉不出来是在写Web程序，因为创建的很多项目里面根本就没有Web页面，全是逻辑处理，而Web项目里面有的仅仅是一些 HTML模板文件和Config配置文件，一切是那样的分明。就像一台专用服务器，你在电脑里面能够看到的都是模板、配置，你所需的功能都被固化到了硬件 当中了。性能在它诞生之日就已经决定了，&ldquo;外面&rdquo;的美丽完全是与性能无关的元素，没必要把他们俩放在同一个位置处理。</p>]]>	</description>	<pubDate>2009-8-30 21:04:45</pubDate>	<category><![CDATA[Programming]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item54.aspx</guid></item><item>	<title><![CDATA[Busying]]></title>	<link><![CDATA[http://www.goberl.com/archive/item53.aspx]]></link>	<description><![CDATA[<p>&nbsp;实在是有些事情，上个月25号域名就到期了，今天才发现，赶紧续费。<img alt="" src="/fckeditor/editor/images/smiley/myface/img53.gif" /></p>]]>	</description>	<pubDate>2009-7-6 18:51:56</pubDate>	<category><![CDATA[咸鱼炒蛋]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item53.aspx</guid></item><item>	<title><![CDATA[系统修复]]></title>	<link><![CDATA[http://www.goberl.com/archive/item52.aspx]]></link>	<description><![CDATA[<p>最近一次把机箱拆开，CPU风扇卸下，显卡卸下清理了大量灰尘，可这样一搞电脑倒出了不少问题&mdash;&mdash;开机时间久了会出现声音卡、鼠标卡的现象，甚至出现自动重启的现象，到后来是刚启动就出现这样的现象。网上搜索了些信息，有说是硬件的问题，可觉得自己电脑没那方面的问题，因为是前天晚上在运行一个大型程序的时候突然出现的；有说是驱动问题，我重装了驱动却仍然如此，甚至在电脑启动的过程中出现的滚动条都会出现一闪一卡的。</p>
<p>中午检查了风扇，安装稳固。用优化大师测试温度，CPU温度在47度左右，也不算很高（我的是单核）；硬盘在38度左右；显卡在48度左右，这些都基本符合安全水平。下午突然想到是否是因为CPU的硅胶出问题了，由于多次卸下CPU风扇，导致硅胶减少，电脑也用了接近3年了，硅胶的散热性能也会降低。借来同学的散热膏重新涂抹，测试ok。</p>
<p>上面提到的<span style="color: rgb(128, 128, 0);"><strong>&ldquo;突然</strong></span>&rdquo;鼠标卡可能是由于运行程序太久，导致cpu温度持续上升，最后超过临界值，就&ldquo;<strong><span style="color: rgb(128, 128, 0);">突然</span></strong>&rdquo;了。看来47摄氏度的cpu温度也不一定就是安全温度啊。</p>
<p style="text-align: center;"><img height="117" width="380" alt="系统温度，cpu温度，主板温度，显卡温度，硬盘温度" src="/fckeditor/FCKPro/upLoadFiles/image/os%E6%B8%A9%E5%BA%A6.png" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]>	</description>	<pubDate>2009-5-20 1:23:56</pubDate>	<category><![CDATA[Google微软]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item52.aspx</guid></item><item>	<title><![CDATA[Windows中的特殊文件夹]]></title>	<link><![CDATA[http://www.goberl.com/archive/item51.aspx]]></link>	<description><![CDATA[<p>在windows中你能创建&quot;con&quot;,&quot;prn&quot;,&quot;nul&quot; &quot;com1&quot; &quot;com2&quot; &quot;lpt1&quot; &hellip;&hellip;这些名字的文件夹吗？<br />
答案是否定的。</p>
<p>无论你是创建新的文件夹还是重命名现有文件夹，当你使用了上面那些名称的时候，xp系统会自动的还原为原文件夹名称，如果是Vista会提示你输入的名称无效。<br />
&nbsp;</p>
<p>这是上面原因呢？那是因为这些名称已经用来表示内部设别的名称了，因此我们不能创建，就如同程序语言里面的关键字，我们不能把他们作为变量的名称。</p>
<p>但是这仍然有可以创建如上名称(&quot;con&quot;,&quot;prn&quot;,&quot;nul&quot; &quot;com1&quot; &quot;com2&quot; &quot;lpt1&quot; &hellip;&hellip;)的文件夹。操作如下：<br />
1.&quot;开始&quot;-&gt;&quot;运行&quot;<br />
2.创建文件夹：<br />
&nbsp;&nbsp; <strong>C:\&gt;md </strong><a href="file://\\.\e:\con"><strong>\\.\e:\con</strong></a><strong><br />
</strong>e表示盘符，可以添加相应路径；<br />
con表示文件夹名称，可以是上述中的其他名称。<br />
3.删除文件夹：<br />
&nbsp; <strong>C:\&gt;rd </strong><a href="file://\\.\e:\con"><strong>\\.\e:\con</strong></a><strong><br />
</strong>提示：<span style="color: #808000">用普通的删除方法是无法删除这些文件夹的，只能用上述的命令删除方法</span></p>
<p>&nbsp;</p>]]>	</description>	<pubDate>2009-5-16 19:12:27</pubDate>	<category><![CDATA[Google微软]]></category>	<author><![CDATA[Goberl]]></author>	<guid>http://www.goberl.com/archive/item51.aspx</guid></item></channel></rss>