文件加密的扫盲介绍

2011-05-14 原文 #编程随想 的其它文章

文件加密的扫盲介绍

★引子


上一个帖子点评了爱国愤青 关于拉登同学的几个误区 。话说美国佬把拉登灭掉之后不到一星期,从拉登老巢缴获的电脑资料,就开始在美国政府的网站曝光了(比如拉登的生活录像)。另据美国某安全官员说,缴获的电脑资料之多,抵得上一个小型图书馆。单从这点可以判断出:拉登同学对自己手头的存储设备(比如硬盘),没有进行【足够强度】的加密处理。这令俺很吃惊啊!——堂堂的恐怖大亨,竟然连这点常识都没有啊?!
想当年,陈冠希同学就是因为疏忽了数据加密,导致艳照满世界流传,不光搞臭了一堆女明星,也造福了无数男网民。这回,基地组织估计要步陈同学的后尘了——区别在于,这次倒霉的是基地组织的残余势力,受益的是美国情报机构。


★文件加密的重要性


有些同学以为,自己既不是影视明星,又不是恐怖分子,不需要采用文件加密之类的工具,那就大错特错啦。下面俺来大致聊聊,文件加密的用武之地。

◇防范失窃


这年头,笔记本电脑、平板电脑越来越流行,而这类便捷的移动设备,也增加了丢失的概率。一旦你的移动设备丢失,存储在上面的个人敏感信息就有暴露的风险。比如用浏览器保存的登录口令、邮件客户端存储的私人邮件、等等。如果你的敏感信息是加密的,失窃后的风险就大大降低。

◇保存个人隐私


很多人的家用电脑,都是几个家庭成员共用的。你可能会有一些个人隐私的信息,不希望被其他家庭成员看到。比如你上网下载的毛片、艳照、等,多半不希望被你父母或子女看到。这时候,文件加密就可以防止你的隐私外泄。

◇加密备份数据


很多同学把电脑中的数据备份到移动硬盘上。有些同学觉得放家里的移动硬盘还不保险(万一家里遭火灾,一样废掉)。正好近2年,"云"的概念炒得很热。所以,那些忧患意识很强的同学,就开始考虑用"云存储"(俗称网盘)来做异地备份。
一旦你把数据备份到"云端",就得考虑加密问题了。假如你用的是国内公司提供的网盘,那你一定得小心。因为党国是很关心屁民的隐私滴(具体的原因,你懂的:)。如果你把数据备份到国外的网盘,也未必安全。这不,连大名鼎鼎的Dropbox,最近都曝出数据安全的丑闻(懂洋文的同学,可以看 Wired 网站的爆料 )。

◇对付六扇门的人


前几种情况比较常见,俺再介绍一种比较少见的情况。
假如你跟俺一样,经常在网上恶毒攻击朝廷;或者你是一个维权人士、民运人士、持不同政见者;或者你是一名黑客;......那么,你有可能会被天朝的六扇门盯上。如果你的身份是公开的,或者朝廷追踪到了你的真实身份。那么,这些党国的走狗就有可能搜查你的住所,没收你的电脑。然后,通过你电脑中存储的资料,定你的罪,或者再牵连出其他人。
关于这种情况,俺在《 如何隐藏你的踪迹,避免跨省追捕 》系列教程中,已经有介绍。当时提及的几个注意事项,就包括了电脑存储设备的加密问题。不过捏,当时没有详细介绍加密工具的使用细节。所以,今天俺会把这部分补上。

接下来,俺把几种常见的加密方式介绍一下,并分析各自的优缺点。


★使用“压缩软件”


俺发现很多人(尤其是技术菜鸟),首先想到的加密方式,就是把敏感文件用压缩工具(比如 7zip、WinRAR)压缩一下,并设置一个口令。

◇优点


优点1——【不】需要额外安装软件
压缩软件几乎是装机必备的软件。因此,使用这种方法,多半不需要额外安装其它软件。

优点2——便于备份
可以把压缩文件 copy 到任何地方,只要知道口令就能打开。

◇缺点


缺点1——加密强度【没】保证
压缩软件的强项是压缩,而不是加密。有些压缩软件,本身的加密强度不够,还有些压缩软件(比如早期的 WinZip),加密机制有缺陷,会导致攻击者轻易破解。

缺点2——查看文件不方便
每次要查看加密压缩包里的文件,都需要先解压出来,看完再删除。非常麻烦!

缺点3——查看文件容易泄密
如果你解压并看完之后,忘记删除敏感文件,就有泄密的风险。
即便你的每次看完都对敏感文件进行【彻底删除】,也还是不保险。因为很多压缩软件在解压时,会先解到系统的临时目录。而压缩软件在使用完临时目录后,仅仅进行简单删除,而不是【彻底删除】。这样的话,敏感文件的内容有可能还在磁盘上。专业人士通过反删除工具,还是有可能恢复出来。

缺点4——功能非常有限
用压缩软件加密,无法加密整个分区,无法加密某些系统文件(比如 Windows 的虚拟内存文件)。

◇小结


用这个方法来加密自己电脑中的大量文件,显然是不方便的。如果你要给朋友传递一些需要保密的文件(但是密级又不是很高),或许还可以用一用。


★使用 EFS(文件系统级加密)


稍微懂点技术的用户,可能会选择 EFS 来加密文件。
所谓的 EFS,就是把加密功能集成到文件系统中。通常,EFS 都是跟操作系统用户绑定的。某个用户加密的文件,只有该用户能看。也就是说,只要你能用此用户登录到系统中里,也就可以打开 EFS 加密的文件。考虑到 Windows 系统的用户居多,以下仅介绍 Windows 的 EFS。
对于 Windows 系统而言,从 Win2000 开始,就支持 NTFS 文件系统,也就具有了 EFS 的功能。你只要查看某个文件的属性,在“属性”对话框中点“高级”按钮,即可看到如下的“高级属性”对话框。勾选“加密内容以便保护数据”,即可完成对该文件的加密。
不见图、请翻墙

◇优点


优点1——【不】需要安装额外的软件
只要你的文件分区是 NTFS 格式,就可以使用 NTFS 的 EFS 功能。

优点2——加密强度有保证
俺没有仔细研究 NTFS 的 EFS 的加密机制。不过捏,像微软这种级别的公司,搞出来的加密机制,强度是不会太弱的。

优点3——查看方便
由于 EFS 直接集成到文件系统,因此你查看加密文件跟查看普通文件,没有任何区别。

◇缺点


缺点1——太依赖于当前系统
EFS 的一个主要缺点,是太依赖当前的系统。如果你没有导出密钥,一旦系统重装了,那你就无法再访问被 EFS 加密的文件了。即便你用同样的安装盘重装,安装的时候使用同样的用户名和口令,也不行。更加神奇的是,即便你事先用 Ghost 把原来的系统分区克隆出来,再恢复回去,那些 EFS 加密过的文件,也【不】可用啦!

缺点2——【没有】独立的认证方式
前面提到了,EFS 依赖于操作系统本身的用户认证。如果你和家人共用一台电脑的【同一个系统用户】,那这种加密方式形同虚设。

缺点3——备份密钥的麻烦
比方说,你把某个移动硬盘的文件用 EFS 加密。如果你希望在另外一台电脑上也能查看该 EFS 加密的文件。那么你必须先在加密的那台电脑中把秘钥导出,然后在第二台电脑导入。具体的操作步骤极其麻烦。如果你打算重装系统,也要搞这套复杂的秘钥导出步骤。(经网友在评论中提醒,从 Vista 开始,密钥的导入/导出步骤简化了很多)

缺点4——【无法】跨操作系统和文件系统
比如 NTFS 的 EFS,显然只能用于 NTFS 分区,FAT 分区(FAT16、FAT32)用不了。
另外,Windows、Linux 都有各自的 EFS 加密功能,互相之间是不能混用的。比如你一台 Windows 和一台 Linux,想在这两台电脑之间共用一个 U 盘,那 EFS 加密的方式就行不通。

◇小结


EFS 的方式,对于防范电脑失窃,还是蛮方便滴;但对于另外几种用途,EFS 就【不】太方便啦。
&#补充说明一下:自从 Vista 开始,Windows 内置了另外一种文件加密机制——BitLocker。它比传统的 EFS 有更多优点:增加了多种认证方式,用户界面更友好。但是,仅能用于 Vista 及之后的 Windows 系统,而且对具体的版本还有限制(据说仅限于 Enterprise 版和 Ultimate 版,不爽)。
&#不过&#65292;俺把 BitLocker 归类到"专门的文件加密工具"&#65292;后面会介绍&#12290;<br /> <br /> <br /> <h2>&#9733;专业的文件加密软件</h2><br /> &#12288;&#12288;从前面的介绍可以看出&#65292;上述这几种方式&#65292;都有不少缺点&#12290;有些缺点还很要命&#12290;现在&#65292;俺要介绍今天的重点&#8212;&#8212;基于专门的文件加密工具进行加密&#12290;<br /> <br /> <h3>&#9671;根据加密对象分类</h3><br /> &#12288;&#12288;根据被加密对象的不同&#65292;大致有如下几种加密类型&#12290;有些加密工具&#65292;可以同时支持其中的几种&#12290;<br /> <br /> &#12288;&#12288;<b>1. 针对文件/文件夹的加密</b><br /> &#12288;&#12288;这种好理解&#65292;就是可以选择某几个文件或目录&#65292;然后对其进行加密&#12290;每一个文件/目录&#65292;都可以设置单独的认证信息&#65288;通常用口令&#65289;&#12290;<br /> &#12288;&#12288;以文件/目录为单位进行加密&#65292;一旦文件/目录的数量多了&#65292;管理起来不方便&#12290;<br /> <br /> &#12288;&#12288;<b>2. 针对物理硬盘的加密</b><br /> &#12288;&#12288;这种方式&#65292;就是把整个硬盘&#65292;或者硬盘的某个分区进行加密&#12290;如果你想访问该硬盘或者分区&#65292;需要通过认证&#65288;通常是输入口令&#65289;&#12290;认证之后&#65292;该硬盘可以像普通硬盘一样使用了&#12290;因此&#65292;即便别人拿到你的硬盘后&#65288;比如电脑被偷&#65289;&#65292;也得不到被加密的数据&#12290;<br /> &#12288;&#12288;比如前面提到的 BitLocker 就支持物理硬盘的加密&#12290;<br /> <br /> &#12288;&#12288;<b>3. 针对虚拟硬盘的加密</b><br /> &#12288;&#12288;这种方式&#65292;说起来比较复杂&#12290;<br /> &#12288;&#12288;你可以通过加密软件&#65292;创建出一个虚拟硬盘&#12290;这个虚拟硬盘其实对应到一个你物理硬盘上的一个文件&#12290;你往这个虚拟硬盘上写入的数据&#65292;&#65288;经过加密之后&#65289;都存储在这个文件中&#12290;你创建的虚拟硬盘有多大&#65292;这个数据文件就有多大&#12290;<br /> &#12288;&#12288;在使用上&#65292;这种方式跟加密物理硬盘类似&#12290;要先通过认证才能使用&#12290;认证之后&#65292;就跟普通的硬盘没啥区别了&#12290;你一样可以对它进行分区&#65288;虚拟硬盘上的分区&#65292;就是虚拟分区&#65289;&#65292;一样可以在上面安装软件&#12290;<br /> <br /> &#12288;&#12288;上述3种方式&#65292;俺比较喜欢"虚拟硬盘/虚拟分区"的方式&#12290;虽然加密物理硬盘和加密虚拟硬盘&#65292;在使用上没啥明显区别&#12290;但是虚拟硬盘只是一个数据文件&#65292;备份很方便&#12290;还可以把这个数据文件放在U盘上&#65292;在多台电脑之间公用&#8212;&#8212;就像移动硬盘一样&#12290;<br /> <br /> <h3>&#9671;根据是否开源分类</h3><br /> &#12288;&#12288;有些加密工具是开源的&#65292;有些是闭源的&#12290;<br /> &#12288;&#12288;显然&#65292;开源的比较爽&#12290;因为源代码开放&#65292;可以确保软件中&#12304;没有&#12305;暗藏后门&#65292;可以确保加密机制&#12304;没有&#12305;太明显的弱点&#12290;而且&#65292;开源软件通常也是&#12304;免费&#12305;滴&#12290;<br /> <br /> <h3>&#9671;根据加密算法分类</h3><br /> &#12288;&#12288;有些加密软件使用&#8220;公开算法&#8221;&#65292;有些则使用&#8220;私有算法&#8221;&#12290;<br /> &#12288;&#12288;略懂密码学的网友应该晓得&#8212;&#8212;<b>&#12304;公开&#12305;算法比较靠谱</b>&#12290;毕竟&#65292;公开算法&#65288;尤其是那些知名且使用广泛的&#65289;是经过许多密码学大牛严格论证滴&#65292;确保其&#12304;算法设计&#12305;没有明显的缺陷&#12290;<br /> <br /> <h3>&#9671;如何选择&#65311;</h3><br /> &#12288;&#12288;那如何选择文件加密工具捏&#65292;俺觉得如下几点要注意&#65306;<br /> 1. 知名度高&#65292;口碑好<br /> 2. 有较多的用户使用<br /> 3. 支持主流加密算法<br /> 4. 最好支持虚拟加密盘<br /> 5. 最好是免费且开源<br /> 6. 最好支持多种操作系统<br /> <br /> &#12288;&#12288;考虑到有不少网友留言&#65292;让俺推荐一款加密软件&#12290;于是专门写了一个帖子<a href="https://program-think.blogspot.com/2011/05/recommend-truecrypt.html">推荐 TrueCrypt</a>&#12290;若干年之后&#65292;又把&#8220;TrueCrypt 教程&#8221;写成一个系列&#12290;<br /> &#12288;&#12288;补充说明&#65306;<br /> &#12288;&#12288;虽然 TrueCrypt 开源项目已经在2014年死亡&#65292;但是它的替代品&#65288;VeraCrypt&#65289;&#12304;完全兼容&#12305;TrueCrypt 原有的功能&#12290;另外&#65292;Linux 社区的 LUKS&#65288;dm-crypt&#65289;也已经兼容 TC 加密盘格式&#12290;所以&#65292;大伙儿可以继续使用 TC 格式的加密盘&#12290;<br /> <br /> <h3>&#9671;小结</h3><br /> &#12288;&#12288;如果你选择的加密工具足够好&#65292;那么&#65292;前面提及的通过压缩软件或EFS加密导致的各种麻烦&#65292;大都可以避免&#12290;反之&#65292;如果你选择的工具不好&#65292;不光容易泄露敏感数据&#65307;万一工具的质量没保证&#65288;比如软件有Bug&#65289;&#65292;还会损坏你的数据&#65292;导致你的敏感数据丢失&#12290;<br /> <br /> <br /> <b>俺博客上&#65292;和本文相关的帖子&#65288;需翻墙&#65289;</b>&#65306;<br /> &#12298;<a href="https://program-think.blogspot.com/2013/07/online-backup-virtual-encrypted-disk.html">文件备份技巧&#65306;组合&#8220;虚拟加密盘&#8221;与&#8220;网盘&#8221;</a>&#12299;<br /> &#12298;<a href="https://program-think.blogspot.com/2019/02/Use-Disk-Encryption-Anti-Computer-Forensics.html">如何用&#8220;磁盘加密&#8221;对抗警方的&#12304;取证软件&#12305;和&#12304;刑讯逼供&#12305;&#65292;兼谈数据删除技巧</a>&#12299;<br /> &#12298;<a href="https://program-think.blogspot.com/2011/05/recommend-truecrypt.html#index">TrueCrypt 使用经验</a>&#12299;&#65288;系列&#65289;<br /> &#12298;<a href="https://program-think.blogspot.com/2015/10/VeraCrypt.html">扫盲 VeraCrypt&#8212;&#8212;跨平台的 TrueCrypt 替代品</a>&#12299;<br /> &#12298;<a href="https://program-think.blogspot.com/2015/10/dm-crypt-cryptsetup.html">扫盲 dm-crypt&#8212;&#8212;多功能 Linux 磁盘加密工具&#65288;兼容 TrueCrypt 和 VeraCrypt&#65289;</a>&#12299;<br /> &#12298;<a href="https://program-think.blogspot.com/2020/06/Linux-Logical-Volume-Manager.html">扫盲 Linux 逻辑卷管理&#65288;LVM&#65289;&#8212;&#8212;兼谈 RAID 以及&#8220;磁盘加密工具的整合&#8221;</a>&#12299; <div class='post-copyright'> <b>版权声明</b><br/>本博客所有的原创文章&#65292;作者皆保留版权&#12290;转载必须包含本声明&#65292;保持本文完整&#65292;并以超链接形式注明作者<a href='mailto:program.think@gmail.com'>编程随想</a>和本文原始地址&#65306;<br/> <a href='https://program-think.blogspot.com/2011/05/file-encryption-overview.html' id='OriginalPostUrl'>https://program-think.blogspot.com/2011/05/file-encryption-overview.html</a> </div> <div style='clear: both;'></div> </div> <div class='post-footer' style='margin-bottom:50px;'> <div class='post-footer-line post-footer-line-1' style='display:none;'> <span class='post-author vcard'> </span> <span class='reaction-buttons'> </span> <span class='star-ratings'> </span> <span class='post-icons'> </span> <span class='post-backlinks post-comment-link'> </span> </div> <div class='post-footer-line post-footer-line-2 post-toolbar'> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> <hr/> <div class='comments' id='comments' init_num='31'> <a name='comments'></a> <h4 id='comments-label'>31 条评论</h4> <div id='comments-toolbar'></div> <div id='comments-warning'> <noscript> 由于你的浏览器&#12304;禁用了&#12305;JavaScript 脚本&#65292;所以无法发布新的评论 :( </noscript> </div> <div id='comments-loading'></div> <div id='comments-content'> <script async='async' src='' type='text/javascript'></script> <div id='comment-holder'> <div class="comment-thread toplevel-thread"><ol id="top-ra"><li class="comment" id="c5950647423657278100"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">匿名</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1305368747045#c5950647423657278100">2011年5月14日 下午6:25:00</a></span></div><p class="comment-content">一直在看博主的文章&#65292;挺好的&#12290;<br><br>不过今天这篇&#65292;有关EFS的介绍有误&#12290;EFS是一种基于公钥方式的加密机制&#65292;因此实际上只要具备私钥&#65292;就可以对相应公钥加密的文件进行解密&#12290;<br><br>进而&#65292;只要备份好自己的公钥私钥对&#65292;重装系统后还原到系统中&#65292;一样可以解密之前的文件<br><br>具体方法如下&#65306;http://windows.microsoft.com/zh-CN/windows-vista/Back-up-Encrypting-File-System-EFS-certificate</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="5950647423657278100">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=5950647423657278100">删除</a></span></span></div><div class="comment-replies"><div id="c5950647423657278100-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c5950647423657278100-ra" class="thread-chrome thread-expanded"><div></div><div id="c5950647423657278100-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="5950647423657278100">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c5950647423657278100-ce"></div></li><li class="comment" id="c1252341080550772836"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">匿名</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1305368925728#c1252341080550772836">2011年5月14日 下午6:28:00</a></span></div><p class="comment-content">补充一下&#12290;<br><br>密钥的导出步骤比较多&#65292;但操作并不是太困难&#12290;<br><br>实际上从Vista开始&#65292;一个帐户首次使用EFS加密文件的时候&#65292;系统就会用非常醒目的气泡通知&#65292;告知用户为什么要备份自己的密钥&#65292;并且点击后按照向导就可以用更简单的方式对密钥进行备份&#12290;已经简化了不少了</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="1252341080550772836">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=1252341080550772836">删除</a></span></span></div><div class="comment-replies"><div id="c1252341080550772836-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c1252341080550772836-ra" class="thread-chrome thread-expanded"><div></div><div id="c1252341080550772836-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="1252341080550772836">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c1252341080550772836-ce"></div></li><li class="comment" id="c593711779835074262"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1305369109256#c593711779835074262">2011年5月14日 下午6:31:00</a></span></div><p class="comment-content">楼上同学的反馈很迅速啊:)<br>不过&#65292;俺写的内容跟你说的&#65292;好像不矛盾&#12290;</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="593711779835074262">回复</a><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=593711779835074262">删除</a></span></span></div><div class="comment-replies"><div id="c593711779835074262-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c593711779835074262-ra" class="thread-chrome thread-expanded"><div></div><div id="c593711779835074262-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="593711779835074262">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c593711779835074262-ce"></div></li><li class="comment" id="c2102099092957986602"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1305369787636#c2102099092957986602">2011年5月14日 下午6:43:00</a></span></div><p class="comment-content">楼上的同学&#65306;<br>关于&#8220;从Vista开始&#65292;简化了EFS的密钥导入/导出操作&#8221;这一点&#65292;俺已经补充到原文中&#12290;<br>多谢提醒 :)</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="2102099092957986602">回复</a><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=2102099092957986602">删除</a></span></span></div><div class="comment-replies"><div id="c2102099092957986602-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c2102099092957986602-ra" class="thread-chrome thread-expanded"><div></div><div id="c2102099092957986602-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="2102099092957986602">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c2102099092957986602-ce"></div></li><li class="comment" id="c932248044257863476"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">希锐亚</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1305372261363#c932248044257863476">2011年5月14日 下午7:24:00</a></span></div><p class="comment-content">若在加密后再ghost就可以</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="932248044257863476">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=932248044257863476">删除</a></span></span></div><div class="comment-replies"><div id="c932248044257863476-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c932248044257863476-ra" class="thread-chrome thread-expanded"><div></div><div id="c932248044257863476-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="932248044257863476">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c932248044257863476-ce"></div></li><li class="comment" id="c5906538628037996021"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="http://t.qq.com/HeartBlade" rel="nofollow">天涯倦客</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1305389021568#c5906538628037996021">2011年5月15日 上午12:03:00</a></span></div><p class="comment-content">TrueCrypt用了很久了&#12290;</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="5906538628037996021">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=5906538628037996021">删除</a></span></span></div><div class="comment-replies"><div id="c5906538628037996021-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c5906538628037996021-ra" class="thread-chrome thread-expanded"><div></div><div id="c5906538628037996021-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="5906538628037996021">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c5906538628037996021-ce"></div></li><li class="comment" id="c5308279293343398121"><div class="avatar-image-container"><img src="//lh3.googleusercontent.com/zFdxGE77vvD2w5xHy6jkVuElKv-U9_9qLkRYK8OnbDeJPtjSZ82UPq5w6hJ-SA=s35" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/17914218100973185089" rel="nofollow">ipcjs</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1305467366943#c5308279293343398121">2011年5月15日 下午9:49:00</a></span></div><p class="comment-content">那么&#65292;用那个加密工具好呢&#65311;</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="5308279293343398121">回复</a><span class="item-control blog-admin blog-admin pid-1700029145"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=5308279293343398121">删除</a></span></span></div><div class="comment-replies"><div id="c5308279293343398121-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c5308279293343398121-ra" class="thread-chrome thread-expanded"><div></div><div id="c5308279293343398121-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="5308279293343398121">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c5308279293343398121-ce"></div></li><li class="comment" id="c837891986693868965"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">匿名</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1305475498511#c837891986693868965">2011年5月16日 上午12:04:00</a></span></div><p class="comment-content">多谢博主的post&#65292;对需要文件加密的人们真的非常有帮助 :-)</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="837891986693868965">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=837891986693868965">删除</a></span></span></div><div class="comment-replies"><div id="c837891986693868965-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c837891986693868965-ra" class="thread-chrome thread-expanded"><div></div><div id="c837891986693868965-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="837891986693868965">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c837891986693868965-ce"></div></li><li class="comment" id="c1789061540347240209"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">匿名</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1305516107979#c1789061540347240209">2011年5月16日 上午11:21:00</a></span></div><p class="comment-content">博主请推荐几个工具&#65311;</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="1789061540347240209">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=1789061540347240209">删除</a></span></span></div><div class="comment-replies"><div id="c1789061540347240209-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c1789061540347240209-ra" class="thread-chrome thread-expanded"><div></div><div id="c1789061540347240209-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="1789061540347240209">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c1789061540347240209-ce"></div></li><li class="comment" id="c2641984134120570637"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">匿名</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1306064009511#c2641984134120570637">2011年5月22日 下午7:33:00</a></span></div><p class="comment-content">博主&#65292;请问微软家的word加密如何&#65311;2007版本的话&#65292;有没可能有后门&#65311;如果密钥长度超过8还可能暴力破解吗&#65311;谢谢&#65281;</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="2641984134120570637">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=2641984134120570637">删除</a></span></span></div><div class="comment-replies"><div id="c2641984134120570637-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c2641984134120570637-ra" class="thread-chrome thread-expanded"><div></div><div id="c2641984134120570637-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="2641984134120570637">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c2641984134120570637-ce"></div></li><li class="comment" id="c2487980597678018692"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1306066211869#c2487980597678018692">2011年5月22日 下午8:10:00</a></span></div><p class="comment-content">to 楼上的几位让俺推荐加密工具的网友&#65306;<br>请看俺5月18日发的帖子&#65306;<br>TrueCrypt&#8212;&#8212;文件加密的法宝</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="2487980597678018692">回复</a><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=2487980597678018692">删除</a></span></span></div><div class="comment-replies"><div id="c2487980597678018692-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c2487980597678018692-ra" class="thread-chrome thread-expanded"><div></div><div id="c2487980597678018692-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="2487980597678018692">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c2487980597678018692-ce"></div></li><li class="comment" id="c8379284808749671756"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1306071237133#c8379284808749671756">2011年5月22日 下午9:33:00</a></span></div><p class="comment-content">to 楼上的楼上&#65306;<br><br>Word 2007的加密&#65292;是否有后门&#65292;俺不好说&#12290;<br><br>在Word 2007本身的加密机制没有缺陷的前提下&#65292;如果要防止暴力&#65292;一个因素是口令的长度&#65292;另一个因素是口令的复杂度&#12290;<br>如果口令只有8个字符&#65292;但是同时包含有大小写字母&#12289;数字&#12289;特殊符号&#65292;那强度应该还可以&#12290;<br>如果8个字符的口令只包含数字&#65292;那被破解的风险就大得多&#12290;<br>为了保险起见&#65292;俺建议再设长一些&#65288;比如12-16个字符&#65289;&#12290;</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="8379284808749671756">回复</a><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=8379284808749671756">删除</a></span></span></div><div class="comment-replies"><div id="c8379284808749671756-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c8379284808749671756-ra" class="thread-chrome thread-expanded"><div></div><div id="c8379284808749671756-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="8379284808749671756">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c8379284808749671756-ce"></div></li><li class="comment" id="c1690442979156968907"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="http://www.srcloft.com/" rel="nofollow">srcloft</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1353402062196#c1690442979156968907">2012年11月20日 下午5:01:00</a></span></div><p class="comment-content">太多好文章了&#65292;学习了&#65281;</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="1690442979156968907">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=1690442979156968907">删除</a></span></span></div><div class="comment-replies"><div id="c1690442979156968907-rt" class="comment-thread inline-thread"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c1690442979156968907-ra" class="thread-chrome thread-expanded"><div><li class="comment" id="c6356901509611423178"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1369720981537#c6356901509611423178">2013年5月28日 下午2:03:00</a></span></div><p class="comment-content">TO srcloft<br>多谢捧场 :)</p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=6356901509611423178">删除</a></span></span></div><div class="comment-replies"><div id="c6356901509611423178-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c6356901509611423178-ra" class="thread-chrome thread-expanded"><div></div><div id="c6356901509611423178-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="6356901509611423178">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c6356901509611423178-ce"></div></li></div><div id="c1690442979156968907-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="1690442979156968907">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c1690442979156968907-ce"></div></li><li class="comment" id="c403385683452722076"><div class="avatar-image-container"><img src="//lh3.googleusercontent.com/zFdxGE77vvD2w5xHy6jkVuElKv-U9_9qLkRYK8OnbDeJPtjSZ82UPq5w6hJ-SA=s35" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/10139784851730503105" rel="nofollow">Unknown</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1369408884054#c403385683452722076">2013年5月24日 下午11:21:00</a></span></div><p class="comment-content">TrueCrypt应该是磁盘加密,那关于文件加密和磁盘加密&#65292;各有什么优点&#65311;到底哪个好呢&#65311;</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="403385683452722076">回复</a><span class="item-control blog-admin blog-admin pid-1648052124"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=403385683452722076">删除</a></span></span></div><div class="comment-replies"><div id="c403385683452722076-rt" class="comment-thread inline-thread"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c403385683452722076-ra" class="thread-chrome thread-expanded"><div><li class="comment" id="c551098008212913418"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1369721717680#c551098008212913418">2013年5月28日 下午2:15:00</a></span></div><p class="comment-content">TO Curtis Wilbur<br>TrueCrypt 是针对&#8220;磁盘分区&#8221;一级的加密&#12290;<br>EFS&#65288;Windows&#65289;和 eCryptfs&#65288;Linux&#65289;可以看成是针对&#8220;文件&#8221;一级的加密&#12290;<br>两者的优缺点&#65292;俺稍微列举一些&#65288;不一定全面&#65289;<br><br>TrueCrypt 的优点是&#65306;<br>1. 同时支持多种平台<br>2. 支持&#8220;便携模式&#8221;&#65288;无需安装&#65292;但需要管理员权限&#65289;<br>3. 如果是基于虚拟盘的加密&#65292;虚拟加密盘可以跨操作系统使用<br>4. 基于优点3&#65292;TrueCrypt 很适合用来做跨机器备份&#65288;比如备份到外置硬盘&#65292;备份到网盘&#65289;<br>5. 支持用 keyfile 做认证方式&#65292;无需口令&#65292;而且难以暴力破解&#65288;也可以用 keyfile+password 搞双因素认证&#65289;<br><br>EFS 和 eCryptfs 的优点&#65306;<br>1. 比较灵活&#65288;可以仅加密个别文件&#65292;不需要加密整个分区&#65289;<br>2. 可以跟操作系统无缝整合&#65288;使用者只需用操作系统用户登录&#65292;无需额外口令&#65289;</p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=551098008212913418">删除</a></span></span></div><div class="comment-replies"><div id="c551098008212913418-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c551098008212913418-ra" class="thread-chrome thread-expanded"><div></div><div id="c551098008212913418-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="551098008212913418">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c551098008212913418-ce"></div></li></div><div id="c403385683452722076-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="403385683452722076">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c403385683452722076-ce"></div></li><li class="comment" id="c4435432988991785653"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">noname</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1370422184785#c4435432988991785653">2013年6月5日 下午4:49:00</a></span></div><p class="comment-content">编程大能推荐个轻量级 文件/文件夹加密 的软件吗&#65311;<br>EFS基于操作系统用户&#65292;bitlocker和TrueCrypt都是整卷磁盘加密&#65292;<br>能找到的单文件/文件夹加密工具都是改名字+改属性+隐藏的方法&#12290;<br>烦请大大推荐个&#65281;<br><br></p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="4435432988991785653">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=4435432988991785653">删除</a></span></span></div><div class="comment-replies"><div id="c4435432988991785653-rt" class="comment-thread inline-thread"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c4435432988991785653-ra" class="thread-chrome thread-expanded"><div><li class="comment" id="c8950672135068488865"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1370870400455#c8950672135068488865">2013年6月10日 下午9:20:00</a></span></div><p class="comment-content">TO noname<br>能否说说你的具体需求&#65311;<br>不同的需求&#65292;采用的加密工具也是不同的&#12290;<br><br>另外&#65292;你提到的&#8220;改名字+改属性+隐藏&#8221;的方法&#65292;是非常不靠谱的&#12290;<br>可以说形同虚设&#12290;<br>可靠的加密&#65292;一定要基于专门的&#65292;靠谱的工具</p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=8950672135068488865">删除</a></span></span></div><div class="comment-replies"><div id="c8950672135068488865-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c8950672135068488865-ra" class="thread-chrome thread-expanded"><div></div><div id="c8950672135068488865-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="8950672135068488865">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c8950672135068488865-ce"></div></li><li class="comment" id="c5021611224587584279"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">noname</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1371377485748#c5021611224587584279">2013年6月16日 下午6:11:00</a></span></div><p class="comment-content">支持windows系统&#65292;能够跨机解密.<br>可以对单个文件或整个文件夹加密&#65292;<br>速度的话不要太慢&#65292;安全性一般就行.<br><br><br>最近博客垃圾评论有点多&#65292;比较影响阅读&#12290;<br>博主曾说过不删留言&#65292;不过众5毛&#12289;NC们大举进犯&#65292;形势不一样了&#65292;<br>垃圾评论中不乏人身攻击&#65292;没有鲜明论点&#65292;重复率很高&#65292;<br>有点怀念&#8220;忠党爱国&#8221;了..<br></p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=5021611224587584279">删除</a></span></span></div><div class="comment-replies"><div id="c5021611224587584279-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c5021611224587584279-ra" class="thread-chrome thread-expanded"><div></div><div id="c5021611224587584279-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="5021611224587584279">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c5021611224587584279-ce"></div></li><li class="comment" id="c9093563731187397901"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1371623045498#c9093563731187397901">2013年6月19日 下午2:24:00</a></span></div><p class="comment-content">TO noname<br>如果只用于 Windows 系统&#65292;可以考虑 Windows 自带的 EFS&#65288;从 Win2000 开始提供&#65289;<br>对于你的需求&#65292;唯一的不足是&#8220;跨机器使用&#8221;<br>EFS 的密钥是可以导出的&#65292;能够&#8220;跨机器使用&#8221;&#65292;但是操作稍嫌麻烦&#12290;</p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=9093563731187397901">删除</a></span></span></div><div class="comment-replies"><div id="c9093563731187397901-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c9093563731187397901-ra" class="thread-chrome thread-expanded"><div></div><div id="c9093563731187397901-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="9093563731187397901">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c9093563731187397901-ce"></div></li><li class="comment" id="c261400880716630907"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1371623179400#c261400880716630907">2013年6月19日 下午2:26:00</a></span></div><p class="comment-content">TO noname<br>关于近期网评员泛滥&#65292;俺觉得挺高兴 :)<br>这是对俺努力写博的鼓励&#65292;也说明俺博客的影响力又增加了&#12290;<br><br>据俺观察&#65292;&#12298;每周转载&#65306;关于朝廷近期舆论和习近平的嘴脸&#12299;这篇博文发布后&#65292;网评员开始多起来&#12290;<br>显然&#65292;这篇博文触到朝廷的痛处了&#12290;<br>尤其是博文中习近平的那张&#8220;玉照&#8221;</p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=261400880716630907">删除</a></span></span></div><div class="comment-replies"><div id="c261400880716630907-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c261400880716630907-ra" class="thread-chrome thread-expanded"><div></div><div id="c261400880716630907-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="261400880716630907">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c261400880716630907-ce"></div></li><li class="comment" id="c3719458592590590749"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">匿名</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1371661724493#c3719458592590590749">2013年6月20日 上午1:08:00</a></span></div><p class="comment-content">你断章取义经济学人的封面还恬不知耻的装13 你活的真悲哀</p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=3719458592590590749">删除</a></span></span></div><div class="comment-replies"><div id="c3719458592590590749-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c3719458592590590749-ra" class="thread-chrome thread-expanded"><div></div><div id="c3719458592590590749-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="3719458592590590749">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c3719458592590590749-ce"></div></li><li class="comment" id="c8650828961875827516"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user">noname</cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1371667036481#c8650828961875827516">2013年6月20日 上午2:37:00</a></span></div><p class="comment-content">说什么&#65292;什么就到&#65292;那张&quot;玉照&quot;还是很贴切的&#12290;<br>博主更要注意网络安全&#65292;切勿大意&#12290;<br></p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=8650828961875827516">删除</a></span></span></div><div class="comment-replies"><div id="c8650828961875827516-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c8650828961875827516-ra" class="thread-chrome thread-expanded"><div></div><div id="c8650828961875827516-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="8650828961875827516">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c8650828961875827516-ce"></div></li><li class="comment" id="c3518005954060676615"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1372064490464#c3518005954060676615">2013年6月24日 下午5:01:00</a></span></div><p class="comment-content">TO noname<br>多谢对俺的关心 :)<br>俺一定会尽量小心&#65292;以便跟朝廷做长期斗争&#12290;</p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=3518005954060676615">删除</a></span></span></div><div class="comment-replies"><div id="c3518005954060676615-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c3518005954060676615-ra" class="thread-chrome thread-expanded"><div></div><div id="c3518005954060676615-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="3518005954060676615">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c3518005954060676615-ce"></div></li><li class="comment" id="c305381836675440460"><div class="avatar-image-container"><img src="//lh3.googleusercontent.com/zFdxGE77vvD2w5xHy6jkVuElKv-U9_9qLkRYK8OnbDeJPtjSZ82UPq5w6hJ-SA=s35" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/10139784851730503105" rel="nofollow">Unknown</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1372400766692#c305381836675440460">2013年6月28日 下午2:26:00</a></span></div><p class="comment-content">对于单文件&#65292;通过加密&#65288;算法是公开算法&#65289;&#65292;再隐藏&#65288;例如将它追加到图片或者其他文件的末尾&#65289;&#65292;安全性应该不错的&#12290;使用的时候通过专门的软件提取被加密隐藏的文件&#12290;</p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-1648052124"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=305381836675440460">删除</a></span></span></div><div class="comment-replies"><div id="c305381836675440460-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c305381836675440460-ra" class="thread-chrome thread-expanded"><div></div><div id="c305381836675440460-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="305381836675440460">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c305381836675440460-ce"></div></li><li class="comment" id="c7328358749993564517"><div class="avatar-image-container"><img src="//1.bp.blogspot.com/-_5va5DafROs/VtcrFXMaY_I/AAAAAAAABU4/lQWoB9z4jaI/s35/Thinker.jpg" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.blogger.com/profile/11741356469378252621" rel="nofollow">编程随想</a></cite><span class="icon user blog-author"></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1372757018933#c7328358749993564517">2013年7月2日 下午5:23:00</a></span></div><p class="comment-content">TO Curtis Wilbur<br>补充一下你说的&#12290;<br>光追加到图片文件尾部&#65292;隐藏效果不够好&#12290;<br><br>更好的隐藏方式是&#65306;采用&#8220;图像隐写术&#8221;<br>把加密内容隐写到图像中&#12290;<br>缺点是&#65292;如果要隐写的数据较多&#65292;就需要很大很大的图片&#12290;<br><br>关于这方面的介绍&#65292;可以看俺的博文<br>&#12298;[url=http://program-think.blogspot.com/2011/06/use-image-hide-information.html]用图片隐藏信息的技术实现[/url]&#12299;</p><span class="comment-actions secondary-text"><span class="item-control blog-admin blog-admin pid-1582521586"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=7328358749993564517">删除</a></span></span></div><div class="comment-replies"><div id="c7328358749993564517-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c7328358749993564517-ra" class="thread-chrome thread-expanded"><div></div><div id="c7328358749993564517-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="7328358749993564517">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c7328358749993564517-ce"></div></li></div><div id="c4435432988991785653-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="4435432988991785653">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c4435432988991785653-ce"></div></li><li class="comment" id="c2154156195301837289"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="https://www.phototrims.com/clipping-path-services/" rel="nofollow">Wahid</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1536556300747#c2154156195301837289">2018年9月10日 下午1:11:00</a></span></div><p class="comment-content">True Crypt should be disk encryption. What are the advantages of file encryption and disk encryption? Which is better?</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="2154156195301837289">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=2154156195301837289">删除</a></span></span></div><div class="comment-replies"><div id="c2154156195301837289-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c2154156195301837289-ra" class="thread-chrome thread-expanded"><div></div><div id="c2154156195301837289-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="2154156195301837289">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c2154156195301837289-ce"></div></li><li class="comment" id="c7084041358821544031"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="http://www.educationbangla.com/" rel="nofollow">Education Bangla</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1539142891294#c7084041358821544031">2018年10月10日 上午11:41:00</a></span></div><p class="comment-content">TrueCrypt should be disk encryption. What are the advantages of file encryption and disk encryption? Which is better?</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="7084041358821544031">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=7084041358821544031">删除</a></span></span></div><div class="comment-replies"><div id="c7084041358821544031-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c7084041358821544031-ra" class="thread-chrome thread-expanded"><div></div><div id="c7084041358821544031-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="7084041358821544031">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c7084041358821544031-ce"></div></li><li class="comment" id="c5423727207179023084"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="http://alodrivingschool.com/road-test/" rel="nofollow">Mridha</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1539143007514#c5423727207179023084">2018年10月10日 上午11:43:00</a></span></div><p class="comment-content">The cover of the Economist who is out of context is still shamelessly loaded. 13 You are really sad.</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="5423727207179023084">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=5423727207179023084">删除</a></span></span></div><div class="comment-replies"><div id="c5423727207179023084-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c5423727207179023084-ra" class="thread-chrome thread-expanded"><div></div><div id="c5423727207179023084-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="5423727207179023084">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c5423727207179023084-ce"></div></li><li class="comment" id="c4695053176894641015"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="http://savior.com" rel="nofollow">Savior</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1576438894240#c4695053176894641015">2019年12月16日 上午3:41:00</a></span></div><p class="comment-content"> And there went out another horse that was red: and power was given to him that sat thereon to take peace from the earth, and that they should kill one another: and there was given unto him a great sword.那张&#8220;玉照&#8221;那张&#8220;玉照&#8221;</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="4695053176894641015">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=4695053176894641015">删除</a></span></span></div><div class="comment-replies"><div id="c4695053176894641015-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c4695053176894641015-ra" class="thread-chrome thread-expanded"><div></div><div id="c4695053176894641015-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="4695053176894641015">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c4695053176894641015-ce"></div></li><li class="comment" id="c7107743366040859709"><div class="avatar-image-container"><img src="//resources.blogblog.com/img/blank.gif" alt=""/></div><div class="comment-block"><div class="comment-header"><cite class="user"><a href="http://savior.com" rel="nofollow">Savior</a></cite><span class="icon user "></span><span class="datetime secondary-text"><a rel="nofollow" href="https://program-think.blogspot.com/2011/05/file-encryption-overview.html?showComment=1576438977117#c7107743366040859709">2019年12月16日 上午3:42:00</a></span></div><p class="comment-content">1 And I saw when the Lamb opened one of the seals, and I heard, as it were the noise of thunder, one of the four beasts saying, Come and see.<br>2 And I saw, and behold a white horse: and he that sat on him had a bow; and a crown was given unto him: and he went forth conquering, and to conquer.<br>3 And when he had opened the second seal, I heard the second beast say, Come and see.<br>4 And there went out another horse that was red: and power was given to him that sat thereon to take peace from the earth, and that they should kill one another: and there was given unto him a great sword.<br>5 And when he had opened the third seal, I heard the third beast say, Come and see. And I beheld, and lo a black horse; and he that sat on him had a pair of balances in his hand.<br>6 And I heard a voice in the midst of the four beasts say, A measure of wheat for a penny, and three measures of barley for a penny; and see thou hurt not the oil and the wine.<br>7 And when he had opened the fourth seal, I heard the voice of the fourth beast say, Come and see.<br>8 And I looked, and behold a pale horse: and his name that sat on him was Death, and Hell followed with him. And power was given unto them over the fourth part of the earth, to kill with sword, and with hunger, and with death, and with the beasts of the earth.<br>9 And when he had opened the fifth seal, I saw under the altar the souls of them that were slain for the word of God, and for the testimony which they held:<br>10 And they cried with a loud voice, saying, How long, O Lord, holy and true, dost thou not judge and avenge our blood on them that dwell on the earth?<br>11 And white robes were given unto every one of them; and it was said unto them, that they should rest yet for a little season, until their fellowservants also and their brethren, that should be killed as* they were, should be fulfilled.<br>12 And I beheld when he had opened the sixth seal, and, lo, there was a great earthquake; and the sun became black as sackcloth of hair, and the moon became as blood;<br>13 And the stars of heaven fell unto the earth, even as a fig tree casteth her untimely figs, when she is shaken of a mighty wind.<br>14 And the heaven departed as a scroll when it is rolled together; and every mountain and island were moved out of their places.<br>15 And the kings of the earth, and the great men, and the rich men, and the chief captains, and the mighty men, and every bondman, and every free man, hid themselves in the dens and in the rocks of the mountains;<br>16 And said to the mountains and rocks, Fall on us, and hide us from the face of him that sitteth on the throne, and from the wrath of the Lamb:<br>17 For the great day of his wrath is come; and who shall be able to stand?<br>关于近期网评员泛滥</p><span class="comment-actions secondary-text"><a class="comment-reply" target="_self" data-comment-id="7107743366040859709">回复</a><span class="item-control blog-admin blog-admin pid-357517073"><a target="_self" href="https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=7107743366040859709">删除</a></span></span></div><div class="comment-replies"><div id="c7107743366040859709-rt" class="comment-thread inline-thread hidden"><span class="thread-toggle thread-expanded"><span class="thread-arrow"></span><span class="thread-count"><a target="_self">回复</a></span></span><ol id="c7107743366040859709-ra" class="thread-chrome thread-expanded"><div></div><div id="c7107743366040859709-continue" class="continue"><a class="comment-reply" target="_self" data-comment-id="7107743366040859709">回复</a></div></ol></div></div><div class="comment-replybox-single" id="c7107743366040859709-ce"></div></li></ol><div id="top-continue" class="continue"><a class="comment-reply" target="_self">添加评论</a></div><div class="comment-replybox-thread" id="top-ce"></div><div class="loadmore hidden" data-post-id="8566607804801212444"><a target="_self">加载更多...</a></div></div> </div> </div> <p class='comment-footer'> <div class='comment-form'> <a name='comment-form'></a> <p> </p> <a href='https://www.blogger.com/comment-iframe.g?blogID=5235590154125226279&postID=8566607804801212444' id='comment-editor-src'></a> <iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410px' id='comment-editor' name='comment-editor' src='' width='100%'></iframe> <script src='https://www.blogger.com/static/v1/jsbin/1817618210-comment_from_post_iframe.js' type='text/javascript'></script> <script type='text/javascript'> BLOG_CMT_createIframe('https://www.blogger.com/rpc_relay.html'); </script> </div> </p> <div id='backlinks-container'> <div id='Blog1_backlinks-container'> </div> </div> </div> <!--Can't find substitution for tag [adEnd]--> </div> <div class='blog-pager' id='blog-pager'> <span id='blog-pager-newer-link'> <a class='blog-pager-newer-link' href='https://program-think.blogspot.com/2011/05/recommend-truecrypt.html' id='Blog1_blog-pager-newer-link' title='较新的博文'>较新的博文</a> </span> <span id='blog-pager-older-link'> <a class='blog-pager-older-link' href='https://program-think.blogspot.com/2011/05/usama-bin-laden.html' id='Blog1_blog-pager-older-link' title='较早的博文'>较早的博文</a> </span> <a class='home-link' href='https://program-think.blogspot.com/'>首页</a> </div> <div class='clear'></div> </div></div> </div> <div id='sidebar-wrapper'> <div class='sidebar section' id='sidebar'><div class='widget HTML' data-version='1' id='HTML1'> <div class='widget-content'> <script type="text/javascript"> // Debug & test helper functions function assert(bCondition, sDesc) { if(!bCondition) { sDesc = (sDesc || "Assertion failed!"); throw (typeof Error !== "undefined") ? new Error(sDesc) : sDesc; } } window.g_bIsTest = !!location.search.match(/(?:\?|&)test=1/); function isTest() { return window.g_bIsTest; } function isBlogAdmin() { return (new Cookie("blog_admin")).loadInt() === 1; } function dump(sDesc) { console.log("======== Program-Think DUMP ========\n" + sDesc); } function reportError(sDesc) { console.log("======== Program-Think ERROR ========\n" + sDesc); (typeof ga === "function") && ga("send", "exception", {"exDescription":sDesc}); // ga is 'Google Analytics' } if(typeof window.onerror === "object") { window.onerror = function(sDesc, sUrl, nLine, nColumn, oErr) { return reportError(sDesc) && false } } // Object class if(!Object.keys) // For browser compatibility { Object.keys = (function() { "use strict"; var hasOwnProperty = Object.prototype.hasOwnProperty, hasDontEnumBug = !({ toString: null }).propertyIsEnumerable("toString"), dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLen = dontEnums.length; return function(obj) { (typeof obj !== "object") && (typeof obj !== "function" || obj === null) && assert(false, "Object.keys: Invalid 'obj'!"); var result = []; for(var prop in obj) { hasOwnProperty.call(obj, prop) && result.push(prop) } if(hasDontEnumBug) { for(var i=0; i<dontEnumsLen; i++){ hasOwnProperty.call(obj, dontEnums[i]) && result.push(dontEnums[i]) } } return result; }; }() ); } // Object.keys() end // Number class if(!Number.isInteger) // For browser compatibility { Number.isInteger = function(value) { return typeof value === "number" && isFinite(value) && Math.floor(value) === value; }; } Number.cmp = function(a, b) { assert(typeof a === "number" && typeof b === "number", "Number.cmp: Invalid argument type!"); return a == b ? 0 : (a>b ? 1 : -1); } function intToStr(nInput, nWidth, sPrefix) { assert(typeof nInput === "number" && nInput >= 0, "intToStr: Invalid 'nInput'!"); assert(typeof nWidth === "number" && nWidth > 0, "intToStr: Invalid 'nWidth'!"); assert(typeof sPrefix === "string" && sPrefix.length > 0, "intToStr: Invalid 'sPrefix'!"); var sText = String(nInput); while(sText.length < nWidth) { sText = sPrefix + sText } return sText; } // String class if(!String.prototype.startsWith) // For browser compatibility { String.prototype.startsWith = function(sTarget, nPos) { nPos = nPos || 0; return this.indexOf(sTarget, nPos) === nPos; }; } if(!String.prototype.endsWith) // For browser compatibility { String.prototype.endsWith = function(sTarget, nPos) { var sSub = this.toString(); ( typeof nPos !== 'number' || !isFinite(nPos) || Math.floor(nPos) !== nPos || nPos > sSub.length ) && (nPos = sSub.length); nPos -= sTarget.length; var nLastPos = sSub.lastIndexOf(sTarget, nPos); return (nLastPos !== -1) && (nLastPos === nPos); }; } if(!String.prototype.trim) // For browser compatibility { String.prototype.trim = function() { return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); }; } String.prototype.multiReplace = function(arrSyntax) // helper { assert(Array.isArray(arrSyntax), "String.multiReplace: Invalid 'arrSyntax'!"); var sRtn = this; $.each(arrSyntax, function(i, syntax){ sRtn = sRtn.replace(syntax[0], syntax[1]) }); return sRtn; }; String.prototype.count = function(regex) // helper { return (this.match(regex) || []).length; }; String.prototype.formatHex = function() // helper { var sHex = ""; for(var i=0; i<this.length; i++) { var sCode = this.charCodeAt(i).toString(16); sHex += ((sCode.length % 2) ? ("0"+sCode) : sCode) + " "; } return sHex; } String.prototype.mergeCJK = function() { var sProc = ""; for(var i=0; i<this.length; i++) { var ch = this.charAt(i); sProc.indexOf(ch) == -1 && String.isCJKChar(this.charCodeAt(i)) && (sProc += ch); } return sProc; }; String.prototype.htmlTrimTag = function() // HTML helper { var arrSyntax = // for security, some chars replace with full width [ [/<\s*br\s*\/?\s*>/gi, "\n"], // keep '<br>' before trim HTML tag, '\n' as placeholder [/<\s*\/\s*[a-z0-9]+\s*>/gi, ""], // HTML end tag [/<\s*[a-z0-9]+(?:\s+\w+\s*=\s*(?:"[^>"]*"|'[^>']*'|[^>]*))*\s*>/gi, ""], // HTML begin tag [/&#(\d+);/g, function(sMatch, s1){ return String.fromCharCode(parseInt(s1)) }], [/<|&lt;/g, "&#65308;"], [/>|&gt;/g, "&#65310;"], [/"|&quot;/g, "&#65282;"], [/'/g, "&#65287;"], [/[\u0600-\u06FF]/g, ""], [/ |\r|&nbsp;/g, "\t"] // '\t' as placeholder ]; return this.multiReplace(arrSyntax).trim(); }; String.isCJKChar = function(nCode) { return (0x4E00 <= nCode) && (nCode <= 0x9FFF); }; // Array class Array.isArray = Array.isArray || function(arg) // For browser compatibility { return Object.prototype.toString.call(arg) === '[object Array]'; }; Array.prototype.last = function() { assert(this.length >= 1, "Array.last: Invalid 'length'!"); return this[this.length - 1]; }; Array.prototype.insert = function(nIndex, item) // helper { this.splice(nIndex, 0, item); }; Array.prototype.asyncEach = function(nTimeSpan, fnProc, fnComplete) { assert(typeof nTimeSpan === "number" && nTimeSpan > 0, "Array.asyncEach: Invalid 'nTimeSpan': '" + nTimeSpan + "'"); assert(fnProc && typeof fnProc === "function", "Array.asyncEach: Invalid 'fnProc'!"); assert(!fnComplete || typeof fnProc === "function", "Array.asyncEach: Invalid 'fnComplete'!"); var self = this, nCur = 0; asyncLoop( function() { try { assert(nCur <= self.length, "Array.asyncEach: Invalid 'nCur': '"+ nCur +"'"); if(nCur < self.length) { fnProc(nCur, self[nCur]); nCur++; return true; } else // nCur == self.length { fnComplete && fnComplete(); return false; } } catch(err) { reportError("Array.asyncEach: Catch exception:\n" + err); return false; } }, nTimeSpan, "Array.asyncEach" ); }; // asyncEach() end // Date class Date.parseISO = function(str) // For browser compatibility { /* 0 = whole string 1 = year 2 = month 3 = day 4 = whole time part 5 = hour 6 = minute 7 = second 8 = millisecond (with dot) 9 = whole timezone 10 = offset sign (+ or -) 11 = offset hours 12 = offset minutes (with colon) */ var reISO = /^(\d{4})-(\d\d)-(\d\d)(T(\d\d):(\d\d):(\d\d)(\.\d{1,3})?(Z|([+-])(\d\d)(:\d\d)?)?)?$/; var results = reISO.exec(str), sErr = "Date.parseISO: Invalid "; if(!results) { return null } var nYear = Number(results[1]), nMonth = Number(results[2])-1, nDate = Number(results[3]); assert(0<=nMonth && nMonth<12, sErr + "month:" + nMonth); assert(1<=nDate && nDate<=31, sErr + "date:" + nDate); if(!results[4]) { return new Date(Date.UTC(nYear, nMonth, nDate)) } var nHour = Number(results[5]), nMinute = Number(results[6]), nSecond = Number(results[7]); assert(0<=nHour && nHour<24, sErr + "hour:" + nHour); assert(0<=nMinute && nMinute<60, sErr + "minute:" + nMinute); assert(0<=nSecond && nSecond<=60, sErr + "second:" + nSecond); var nMilliSecond = results[8] ? Number((results[8]+"000").substr(1,3)) : 0; if(!results[9]) { return new Date(nYear, nMonth, nDate, nHour, nMinute, nSecond, nMilliSecond) } results[11] && (nHour -= Number(results[10] + results[11])); results[12] && (nMinute -= Number(results[10] + results[12].substr(1))); return new Date(Date.UTC(nYear, nMonth, nDate, nHour, nMinute, nSecond, nMilliSecond)); } // parseISO() end Date.prototype.format = function(sStyle) // inner helper { var arrFlags = [ [ /%Y/g, String(this.getFullYear()) ], [ /%0m/g, intToStr(this.getMonth()+1, 2, "0") ], [ /%m/g, String(this.getMonth()+1) ], [ /%0d/g, intToStr(this.getDate(), 2 , "0") ], [ /%d/g, String(this.getDate()) ], [ /%w/g, String(this.getDay()) ], [ /%0H/g, intToStr(this.getHours(), 2 , "0") ], [ /%H/g, String(this.getHours()) ], [ /%0M/g, intToStr(this.getMinutes(), 2, "0") ], [ /%M/g, String(this.getMinutes()) ], [ /%0S/g, intToStr(this.getSeconds(), 2, "0") ], [ /%S/g, String(this.getSeconds()) ], [ /%0f/g, intToStr(this.getMilliseconds(), 3, "0") ], [ /%f/g, String(this.getMilliseconds()) ], [ /%%/g, "%" ] ]; return sStyle.multiReplace(arrFlags); } if(!Date.prototype.toISOString) // For browser compatibility { Date.prototype.toISOString = function() { return this.getUTCFullYear() + '-' + intToStr(this.getUTCMonth() + 1, 2, "0") + '-' + intToStr(this.getUTCDate(), 2, "0") + 'T' + intToStr(this.getUTCHours(), 2, "0") + ':' + intToStr(this.getUTCMinutes(), 2, "0") + ':' + intToStr(this.getUTCSeconds(), 2, "0") + '.' + (this.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'; }; } // Math class Math.log2 = Math.log2 || function(x) // For browser compatibility { return Math.log(x) * Math.LOG2E; }; // Url class function Url(sUrl) { this.bValid = false; function _getDefaultPort(sProtocol) { assert(sProtocol.match(/https?/), "_getDefaultPort: Invalid 'sProtocol': " + sProtocol); return "http" == sProtocol ? 80 : 443; } function _parseQueryString(sQueryString) { if(!sQueryString) { return {} } assert(sQueryString.charAt(0) == "?", "_parseQueryString: Invalid 'sQueryString': " + sQueryString); var mapParams = {}, arrParams = sQueryString.substr(1).split("&"); for(var i=0; i<arrParams.length; i++) { var results = arrParams[i].match(/^(\w+)=([^\?=#]*)$/); if(results && 3 == results.length) { var sName = results[1], sValue = results[2].replace(/\+/g, "%20"); try { mapParams[sName] = decodeURIComponent(sValue) } catch(err) { mapParams[sName] = "" } // decode failed } } return mapParams; } if(null == sUrl) { var sProtocol = location.protocol.toLowerCase(); this.sProtocol = sProtocol.substring(0, sProtocol.length - 1); // trim ':' this.sHost = location.hostname; this.nPort = location.port || _getDefaultPort(this.sProtocol); this.sPath = location.pathname || "/"; this.mapParams = _parseQueryString(location.search); this.sHash = location.hash || ""; this.bValid = true; } else { var results = sUrl.match(Url.getRegexp()); if(results && 7 == results.length) { this.sProtocol = results[1].toLowerCase(); this.sHost = results[2]; this.nPort = results[3] || _getDefaultPort(this.sProtocol); this.sPath = results[4] || "/"; this.mapParams = _parseQueryString(results[5]); this.sHash = results[6] || ""; this.bValid = true; } } } // Url() end Url.prototype.getParam = function(sName) { return (this.bValid && (sName in this.mapParams)) ? this.mapParams[sName] : null; } Url.getRegexp = function() { var regexp = /(https?)\:\/\/([\w\-]+(?:\.[\w\-]+)+)(?:\:(\d+))?(\/[\w\-\/\.\+\(\)\*%!@~=\,\:]*)?(\?(?:[\w\-]+=[\w\-\/\.\+\(\)\*%!@~\,\:]*)?(?:&[\w\-]+=[\w\-\/\.\+\(\)\*%!@~\,\:]*)*)?(#[\w\-\/\.\+\(\)\*%!@~=\,\:&]*)?/i; return regexp; } Url.getRegexpStr = function(needEscape) { var str = Url.getRegexp().toString(); str = str.substring(1, str.length - 2); return needEscape ? str.replace(/&/g, "&amp;") : str; } Url.getDomain = function() { return "program-think.blogspot.com"; } Url.isMirror = function() { return !(location.hostname.match(/^program\-think\.blogspot\.(?:\w+|com\.\w+|co\.\w+)$/i)); } Url.getFeedUrlPrefix = function() { return "/feeds"; } Url.preprocess = function(sText, sExcludeChars, func) { assert(typeof sText === "string", "Url.preprocess: Invalid type of 'sText'!"); assert(typeof sExcludeChars === "string", "Url.preprocess: Invalid type of 'sExcludeChars'!"); assert(func && typeof func === "function", "Url.preprocess: Invalid type of 'func'!"); var sUrlPattern = Url.getRegexpStr(true); var regex = new RegExp("(^|"+sExcludeChars+")" + "("+sUrlPattern+")" + "($|"+sExcludeChars+")", "g"); sText = sText.replace(regex, func); return sText.replace(regex, func); // to process overlap } // Radix encode & decode Radix64 = // Can NOT handle negative numbers and float number. { toStr : function(nNum) { assert(!isNaN(nNum) && isFinite(nNum), "Radix64: The input number is invalid!"); assert(nNum >= 0, "Radix64: Can't convert negative numbers!"); assert(Math.floor(nNum) == nNum, "Radix64: Can't convert float number!"); var sResult = ""; while(true) { sResult = this._sRixits.charAt(nNum % 64) + sResult; nNum = Math.floor(nNum / 64); if(0 == nNum) { break } } return sResult; }, toInt : function(sRadix64) { var nResult = 0; for(var i=0; i<sRadix64.length; i++) { var nIndex = this._sRixits.indexOf(sRadix64.charAt(i)); assert(nIndex >= 0, "Radix64: The input string is invalid!"); nResult = nResult * 64 + nIndex; } return nResult; }, // 0 8 16 24 32 40 48 56 63 _sRixits : "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_~" }; // Date & time helper functions function delayRun(func, nTimeSpan) // 'nTimeSpan' is milliseconds { assert(func && typeof func === "function", "delayRun: Invalid type of 'func'!"); assert(typeof nTimeSpan === "number" && nTimeSpan > 0, "delayRun: Invalid 'nTimeSpan': '" + nTimeSpan + "'"); var timer = setTimeout( function() { try { clearTimeout(timer); func(); } catch(err) { reportError("delayRun: Catch exception:\n" + err); } }, nTimeSpan ); } function asyncLoop(func, nTimeSpan, sTask) // 'nTimeSpan' is milliseconds { assert(func && typeof func === "function", "asyncLoop: Invalid type of 'func'!"); assert(typeof nTimeSpan === "number" && nTimeSpan > 0, "asyncLoop: Invalid 'nTimeSpan': '" + nTimeSpan + "'"); sTask = sTask || ""; //isTest() && dump("asyncLoop: start " + sTask); var timer = setInterval( function() { try { if(func() === false) { clearInterval(timer); //isTest() && dump("asyncLoop: stop " + sTask); } } catch(err) { clearInterval(timer); reportError("asyncLoop: Catch exception:\n" + err); } }, nTimeSpan ); } function asyncCallChain(arrFunc, nTimeSpan) // 'nTimeSpan' is milliseconds { assert(Array.isArray(arrFunc), "asyncCallChain: Invalid 'arrFunc'!"); assert(typeof nTimeSpan === "number" && nTimeSpan > 0, "asyncCallChain: Invalid 'nTimeSpan': '" + nTimeSpan + "'"); arrFunc.asyncEach( nTimeSpan, function(n, func) { assert(func && typeof func === "function", "asyncCallChain: Invalid function in 'arrFunc[" + n +" ]'!"); func(); } ); } function getCurrentMS() { return (new Date()).getTime(); } function getArticleTime() { var $post_timestamp = $(".post-toolbar .post-timestamp"); assert(1 == $post_timestamp.length, "getArticleTime: Invalid DOM!"); return Date.parseISO($post_timestamp.attr("data")); } function getMinTime() { return Date.parseISO("2009-01-15T00:00:00Z"); } function getDatePickerOpts() { var dateOpts = { dateFormat: "yy-mm-dd", showOtherMonths: false, changeYear: true, changeMonth: true, minDate: "2009-01-15", maxDate: new Date(), defaultDate: new Date(), nextText: "", prevText: "", monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], dayNamesMin: ["日", "一", "二", "三", "四", "五", "六"], dayNames: ["", "", "", "", "", "", ""], currentText: "今天" }; dateOpts.monthNamesShort = dateOpts.monthNames; dateOpts.dayNamesShort = dateOpts.dayNamesMin; return dateOpts; } function getRelativeTimeDesc(dt) { var nMinutes = Math.round( (getCurrentMS()-dt.getTime()) / 1000 / 60 ); if(nMinutes < 10) { return "刚才" } else if(nMinutes < 20) { return "10分钟前" } else if(nMinutes < 30) { return "20分钟前" } else if(nMinutes < 60) { return "半小时前" } else if(nMinutes < 60 * 24) { return Math.floor(nMinutes / 60) + "小时前" } else if(nMinutes < 60 * 24 * 7) { return Math.floor(nMinutes / 60 / 24) + "天前" } else { return dt.format("%Y年%m月%d日") } } // BBCode global functions function getImgHost(sUrl) { var arrImgHosts = [ [/\/\/lh\d+\.googleusercontent\.com\/|\/\/blob-s-docs\.googlegroups\.com\/|\/\/\d+\.bp\.blogspot\.com\//i, "Google"], [/\/\/pbs\.twimg\.com\//i, "Twitter"], [/\/\/i\.imgur\.com\/\w+\.(?:jpe?g|png|gif)$/i, "Imgur"], [/\/\/go\.imgs\.co\/u\/[\w\/]+?\.(?:jpe?g|png|gif)$/i, "IMGs"], [/\/\/(?:\w+\.)?chinadigitaltimes\.net\/.+?\.(?:jpe?g|png|gif)$/i, "中国数字时代"], [/\/\/mmbiz\.qpic\.cn\//i, "微信"], [/\/\/\w+\.sinaimg\.cn\//i, "新浪"], [/\/\/img\d+\.ph\.126\.net\//i, "网易"], [/\/\/img\d+\.laibafile\.cn\/p\//i, "天涯论坛"], [/\/\/imgcdn\.kdnet\.net\//i, "凯迪论坛"] ]; for(var i=0; i<arrImgHosts.length; i++) { if(sUrl.match(arrImgHosts[i][0])) { return arrImgHosts[i][1] } } return sUrl.match(/\.(?:jpe?g|png|gif)$/i) ? "N/A" : null; } function renderBBCode(sText, mapOpts) { assert(sText.search(/[<>"']/) == -1, "renderBBCode: Invalid char!"); mapOpts = mapOpts || {}; var nMaxImgNum = ("maxImgNum" in mapOpts ? mapOpts.maxImgNum : 5); function _escape(str) // reserved { return str; } function _forceHTTPS(sUrl) { var oUrl = new Url(sUrl); if("https" == oUrl.sProtocol) { return sUrl } var arrHosts = // famous domains that support HTTPS [ /(?:\w+\.)?wikipedia\.org/i, /(?:\w+\.)?google\.(?:\w+|com\.\w+|co\.\w+)/i, /(?:\w+\.)?github\.(?:com|io)/i, /program\-think\.blogspot\.(?:\w+|com\.\w+|co\.\w+)/i ]; for(var i=0; i<arrHosts.length; i++) { if(oUrl.sHost.match(arrHosts[i])) { return sUrl.replace(/^http:/i, "https:") } } return sUrl; } // _forceHTTPS() end function _renderImg(sImgUrl) { var sImgProxyService = "https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy"; var sImgProxyUrl = sImgProxyService + "?container=focus" + "&refresh=" + (3600 * 24 * 365) + "&url=" + encodeURIComponent(sImgUrl); return "<div class='bbcode image'><center>" + "<img class='icon' src='" + sImgProxyUrl + "&resize_w=128' alt='正在载入缩略图 ...'/>" + "<div style='overflow:auto;'><img class='real' style='display:none;'/></div>" + "<a class='show-real' href='javascript:;'>切换到原始图</a>" + "<a class='show-icon' href='javascript:;' style='display:none;'>切换到缩略图</a></center>" + "图片服务器&#65306;" + (getImgHost(sImgUrl) || "N/A") + "<br/>" + "图片的原始网址&#65306;<u>" + sImgUrl + "</u></div>"; } var sUrlPattern = Url.getRegexpStr(true), sTextPattern = "[^\\[\\]]+", nImgCount = 0; var arrSyntax = [ [ new RegExp("\\[img\\](" + sUrlPattern + ")\\[\\/img\\]", "g"), function(sMatch, s1) { nImgCount++; // anti spam DOS attack return (nImgCount <= nMaxImgNum) ? _renderImg(_forceHTTPS(s1)) : _forceHTTPS(s1); } ], [ new RegExp("\\[url\\](" + sUrlPattern + ")\\[\\/url\\]", "g"), function(sMatch, s1) { var sUrl = _forceHTTPS(s1); return "<a href='" + sUrl + "' class='bbcode simple' target='_blank' rel='nofollow'>" + sUrl + "</a>"; } ], [ new RegExp("\\[url=(" + sUrlPattern + ")\\](" + sTextPattern + ")\\[\\/url\\]", "g"), function(sMatch, s1, s2, s3, s4, s5, s6, s7, s8) { var sUrl = _forceHTTPS(s1), sText = _escape(s8); return "<a href='" + sUrl + "' class='bbcode text' target='_blank' rel='nofollow'>" + sText + "</a>"; } ], [ new RegExp("\\[b\\](" + sTextPattern + ")\\[\\/b\\]", "g"), function(sMatch, s1){ return "<b class='bbcode'>" + _escape(s1) + "</b>" } ], [ new RegExp("\\[i\\](" + sTextPattern + ")\\[\\/i\\]", "g"), function(sMatch, s1){ return "<i class='bbcode'>" + _escape(s1) + "</i>" } ], [ new RegExp("\\[center\\](" + sTextPattern + ")\\[\\/center\\]", "g"), function(sMatch, s1){ return "<center class='bbcode'>" + _escape(s1) + "</center>" } ], [ new RegExp("\\[quote\\](" + sTextPattern + ")\\[\\/quote\\]", "g"), function(sMatch, s1) { var sContent = _escape(s1).trim(), sTag = (sContent.indexOf("\n") == -1 ? "span" : "div"); return "<" + sTag + " class='bbcode quote'>" + sContent + "</" + sTag + ">"; } ], [ new RegExp("\\[del\\](" + sTextPattern + ")\\[\\/del\\]", "g"), function(sMatch, s1){ return "<del class='bbcode'>" + _escape(s1) + "</del>" } ] ]; // arrSyntax[] end { var nImgCount = 0; function _makeTag(sMatch, s1, s2, s3, s4, s5, s6, s7, s8, s9) { var sUrl = _forceHTTPS(s2), bIsImg = getImgHost(sUrl); bIsImg && nImgCount++; // anti spam DOS attack var sTag = (bIsImg && nImgCount <= nMaxImgNum) ? "img" : "url"; return (s1 + "["+sTag+"]" + sUrl + "[/"+sTag+"]" + s9); } var sPunct = "\\s:,\\u2000-\\u206F\\u3000-\\u303F\\uFF00-\\uFFEF", sCJK = "\\u4E00-\\u9FFF"; sText = Url.preprocess(sText, "["+sPunct+sCJK+"]", _makeTag); } sText = sText.multiReplace(arrSyntax); (sText.indexOf("[/") >= 0) && (sText.indexOf("]") >= 0) && (sText = sText.multiReplace(arrSyntax)); // nest bbcode return sText; } // renderBBCode() end // Cookie class Cookie.getExpireDays = function() { var nExpireDays = (new Cookie("expire_days")).loadInt(); if(null == nExpireDays || nExpireDays <= 0) { nExpireDays = 365; (new Cookie("expire_days")).saveInt(nExpireDays, nExpireDays); } return nExpireDays; } function Cookie(sName) { this.sName = sName; this.regex = new RegExp("^(?:.+?;)?\\s*"+sName+"\\s*=\\s*([^;]+)\\s*(?:;|$)", ""); } Cookie.prototype.isExisted = function() { return document.cookie.match(this.regex) ? true : false; } Cookie.prototype.load = function() { var results = document.cookie.match(this.regex); if(!results || results.length != 2) { return null } return decodeURIComponent(results[1]); } Cookie.prototype.save = function(sValue, nExpireDays) { if(isNaN(nExpireDays) || nExpireDays <= 0) { nExpireDays = Cookie.getExpireDays() } var sCookie = this.sName + "=" + encodeURIComponent(sValue); var dt = new Date(); dt.setTime(dt.getTime() + nExpireDays * 24 * 60 * 60 * 1000); sCookie += ";expires=" + dt.toUTCString(); sCookie += ";path=/"; document.cookie = sCookie; return this.isExisted(); } Cookie.prototype.loadInt = function() { var nNum = parseInt(this.load()); return isNaN(nNum) ? null : nNum; } Cookie.prototype.saveInt = function(nNum, nExpireDays) { return isNaN(nNum) ? false : this.save(""+nNum, nExpireDays); } // To minimize encodeURIComponent() output and keep readability, // use this format in cookie: key1(value1)key2(value2) Cookie.prototype.loadMap = function() { var sMap = this.load(); if(!sMap) { return {} } var arrPairs = sMap.split(")"); var map = {}; for(var i=0; i<arrPairs.length-1; i++) { var results = arrPairs[i].match(/^(.+?)\((.+)$/); if(results && 3 == results.length) { var sKey = results[1]; assert(sKey.length > 0, "Cookie.loadMap: Invalid key!"); map[sKey] = results[2]; } } return map; } Cookie.prototype.saveMap = function(map, nExpireDays) { if(!map) { return false } var sMap = ""; for(var sKey in map) { sMap += sKey + "("+map[sKey]+")" } return this.save(sMap, nExpireDays); } // Config helper function hadConfig() { return (new Cookie("options")).isExisted(); } function loadConfig() { var mapDefaultConfig = { "article.font-size" : "100", "article.inner-index" : "true", "comments.font-size" : "100", "comments.bbcode-img" : "auto", // unused "comments.limit-height" : "true", "tweets.font-size" : "100", "tweets.init-num" : "120", "tweets.auto-load" : "true", "tweets.auto-load-timeout" : "5", "side-toolbar.show" : "true", "side-toolbar.drag" : "true", "side-toolbar.drag-pos" : "" }; var mapConfig = (new Cookie("options")).loadMap(); if(!mapConfig) { return mapDefaultConfig } for(var sKey in mapDefaultConfig) { (sKey in mapConfig) || (mapConfig[sKey] = mapDefaultConfig[sKey]); } return mapConfig; } // loadConfig() end function saveConfig(mapConfig) { return (new Cookie("options")).saveMap(mapConfig); } // Extend jQuery jQuery.fn.extend({ hasAttr: function(sAttrName) { assert(typeof sAttrName === "string" && sAttrName, "jQuery.hasAttr: Invalid 'sAttrName'!"); var attr = this.attr(sAttrName); return (typeof attr !== typeof undefined && attr !== false); }, inScreen: function(bFully) { var nPageTop = jQuery(window).scrollTop(), nPageBottom = nPageTop + jQuery(window).height(); var nThisTop = this.offset().top, nThisBottom = nThisTop + this.height(); return bFully ? (nPageTop <= nThisTop && nThisBottom <= nPageBottom) : (nThisTop <= nPageBottom && nPageTop <= nThisBottom); }, scrollTo: function(sScrollType) { jQuery("html,body").animate({ scrollTop: this.offset().top }, sScrollType); return this; }, adjustPosition: function(offset) { var x = offset.left, y = offset.top; x = (x<0) ? 0 : x; y = (y<0) ? 0 : y; ( x > jQuery(window).width()-this.width() ) && ( x = jQuery(window).width()-this.width() ); ( y > jQuery(window).height()-this.height() ) && ( y = jQuery(window).height()-this.height() ); this.css({ left:x, top:y }); return { left:x, top:y }; }, asyncEach: function(nTimeSpan, fnProc, fnComplete) { assert(typeof nTimeSpan === "number" && nTimeSpan > 0, "jQuery.asyncEach: Invalid 'nTimeSpan': '" + nTimeSpan + "'"); assert(typeof fnProc === "function" && fnProc, "jQuery.asyncEach: Invalid 'fnProc'!"); assert(!fnComplete || typeof fnProc === "function", "jQuery.asyncEach: Invalid 'fnComplete'!"); this.get().asyncEach(nTimeSpan, function(n, item){ fnProc(jQuery(item)) }, fnComplete); }, doClick: function() { var offset = this.offset(); var event = jQuery.Event("mousedown", { which:1, pageX:offset.left, pageY:offset.top }); this.trigger(event); return this; } }); // jQueryUI helper Tooltip = { content : function(callback){ callback($(this).attr("title").replace(/\n/g, "<br/>")) }, open: function(event, ui, nTimeout) { ui.tooltip.hover(function(){ $(this).hide("fade") }); (nTimeout > 0) && delayRun(function(){ ui.tooltip.hide("fade") }, nTimeout); } }; // GUI helper function showBottomTip(sText, nTimeout) { assert(typeof sText === "string" && sText, "showBottomTip: Invalid 'sText'!"); assert(typeof nTimeout === "number" && nTimeout >= 0, "showBottomTip: Invalid 'nTimeout': " + nTimeout); var $element = jQuery("#bottom-tip"); $element.html(sText).show(); sText = $element.html(); // Save tip text (nTimeout > 0) && delayRun(function(){ $element.html() == sText && hideBottomTip() }, nTimeout); } function hideBottomTip() { jQuery("#bottom-tip").hide().html(""); } function layoutReset() { $("#sidebar").show(); $("#main").css("width", "67%"); $("#comments").show(); $("#Header1").show(); var mapConfig = loadConfig(); ("true" == mapConfig["side-toolbar.show"]) && $("#side-toolbar").show(); $(".maximize").show(); $(".minimize").hide(); } // Search helper function parseSearchKeywords(sParam) { if(!sParam) { return [] } var sValidChar = "\\w\\u4E00-\\u9FFF\\u2000-\\u206F\\u3000-\\u303F\\uFF00-\\uFFEF\\."; var reInclude = new RegExp("(?:^|\\s)(?:(["+sValidChar+"]+)|\"(["+sValidChar+"\\s]+)\")(?:\\s|$)", ""); var arrKeywords = []; while(true) { var sOld = sParam; sParam = sParam.replace( reInclude, function(sMatch, s1, s2) { s1 && arrKeywords.push(s1); s2 && arrKeywords.push(s2); return " "; } ); if(sParam == sOld) { break } } return arrKeywords; } // parseSearchKeywords() end function keywordToRegexp(sKeyword) { var arrCharMap = [ [/\:/g, "\\:"], [/\//g, "\\/"], [/\./g, "\\."], [/\-/g, "\\-"], [/\+/g, "\\+"], [/\*/g, "\\*"], [/\,/g, "\\,"], [/\(/g, "\\("], [/\)/g, "\\)"], [/\?/g, "\\?"], [/\s/g, "\\s"] ]; return new RegExp(sKeyword.multiReplace(arrCharMap), "gi"); } function highlightSearchKeywords(arg, arrKeywords) { if(!arrKeywords) { return } function _highlight(sMatch) { return (sMatch.search(/\sclass='highlight'/) != -1) ? sMatch : ("<span class='highlight'>" + sMatch + "</span>") } if(typeof arg === "string") { var sHtml = arg; $.each(arrKeywords, function(i, sKeyword){ sHtml = sHtml.replace(keywordToRegexp(sKeyword), _highlight) }); return sHtml; } else if(arg instanceof jQuery) //TODO: NOT used { var $element = arg; var sOldHtml = $element.html(); var sNewHtml = sOldHtml; $.each(arrKeywords, function(i, sKeyword){ sNewHtml = sNewHtml.replace(keywordToRegexp(sKeyword), _highlight) }); (sNewHtml != sOldHtml) && $element.html(sNewHtml); return sNewHtml != sOldHtml; } } // highlightSearchKeywords() end function reportHttpError(sOperType, xhr, sErrType) { if("notmodified" === sErrType) { return "" } var sDesc = sOperType+"&#65292;"; if("timeout" === sErrType) { sDesc += "网络传输超时&#65281;" } else if("parsererror" === sErrType) { sDesc += "无法解析网页数据&#65281;" } else { if(0 == xhr.status) { sDesc += "网络连接异常&#65281;" } else if(400 <= xhr.status && xhr.status < 600) { sDesc += "服务器返回 HTTP " + xhr.status + " 错误&#65281;" } else { sDesc += "出现未知错误&#65281;" } } showBottomTip("<b>"+sDesc+"</b>", 5000); return sDesc; } // Author class function Author(json) { this.sName = ""; this.sHomeUrl = ""; this.sAvatarUrl = ""; this.bIsAnonymous = true; if(json) { this.sName = json.name.$t; this.sAvatarUrl = json.gd$image.src.replace("http://", "https://"); // Force HTTPS this.bIsAnonymous = !!this.sAvatarUrl.match(/\/\/img1\.blogblog\.com\/img\/(?:anon36\.png|blank\.gif)$/i); ("uri" in json) && (this.sHomeUrl = json.uri.$t); } this.normalize(); } Author.prototype.normalize = function() { // Force HTTPS this.sAvatarUrl.startsWith("//") && (this.sAvatarUrl = "https:" + this.sAvatarUrl); this.sAvatarUrl.startsWith("http://") && (this.sAvatarUrl = this.sAvatarUrl.replace(/^http:/i, "https:")); this.sHomeUrl.startsWith("http://www.blogger.com/") && this.isLogined() && (this.sHomeUrl = this.sHomeUrl.replace(/^http:/i, "https:")); // Change name this.isAnonymous() && ("Anonymous" == this.sName) && (this.sName = "匿名"); this.sName = this.sName.htmlTrimTag().replace(/\n|&#12288;/g, "\t"); // '\t' as placeholder // Change avatar image (this.sAvatarUrl.indexOf("//img1.blogblog.com/img/blank.gif") > 0) && (this.sAvatarUrl = "https://img1.blogblog.com/img/anon36.png"); var sAdminAvatarUrl = "https://lh6.googleusercontent.com/-fpaYncBYqKs/Th477aX8reI/AAAAAAAAAco/nkud5M9T64w/s48/Thinker.jpg"; this.isAdmin() && (this.sAvatarUrl = sAdminAvatarUrl); return this; } Author.prototype.isAnonymous = function() { return this.bIsAnonymous; } Author.prototype.isLogined = function() { return !this.bIsAnonymous; } Author.prototype.isAdmin = function() { return this.isLogined() && "https://www.blogger.com/profile/11741356469378252621" == this.sHomeUrl; } Author.prototype.getKey = function() { return this.isAnonymous() ? ("匿名" == this.sName ? "" : this.sName) : this.sHomeUrl; } Author.prototype.isEqual = function(other) { return this.isAnonymous() ? (this.sName == other.sName) : (this.sHomeUrl == other.sHomeUrl); } // Comment class function Comment(json) { this.nId = null; this.sId = ""; this.sLongId = ""; this.sParentLongId = ""; this.bIsDeleted = false; this.bIsBanned = false; // banned by Google/Blogger this.bIsInstruction = false; this.nSpamType = 0; // 0: NOT spam; >0: @see 'getSpamTypeDesc()' this.nTextGroupId = null; this.sRepeatUrl = ""; this.oWordInfo = null; this.sText = ""; this.sUrl = ""; this.oAuthor = null; this.dtCreate = null; this.sItemControlClass = ""; this.nTopIndex = null; this.nSubIndex = null; if(null == json) { return } for(var i=0; i<json.link.length; i++) { if("alternate" == json.link[i].rel) { this.sUrl = json.link[i].href; } else if("self" == json.link[i].rel) { var results = json.link[i].href.match(/\/default\/(\d+)\?v=2$/); results && (2 == results.length) && (this.sLongId = results[1]); } else if("related" == json.link[i].rel) { var results = json.link[i].href.match(/\/default\/(\d+)\?v=2$/); results && (2 == results.length) && (this.sParentLongId = results[1]); } } var sTime = null; for(var i=0; i<json.gd$extendedProperty.length; i++) { if("blogger.itemClass" == json.gd$extendedProperty[i].name) { this.sItemControlClass = json.gd$extendedProperty[i].value; } else if("blogger.contentRemoved" == json.gd$extendedProperty[i].name) { this.bIsDeleted = ("true" == json.gd$extendedProperty[i].value); } else if("blogger.displayTime" == json.gd$extendedProperty[i].name) { sTime = json.gd$extendedProperty[i].value; } } if(this.sUrl) { this.sUrl = this.sUrl.replace(/(\?|&)showComment=/i, "$1comment=").replace(/#c\d+$/i, ""); this.sId = (new Url(this.sUrl)).getParam("comment"); this.nId = parseInt(this.sId); assert(!isNaN(this.nId), "Comment: Invalid comment url!"); this.dtCreate = new Date(this.nId); } else { assert(this.bIsDeleted, "Comment: Unknown json data!"); if("published" in json) { this.dtCreate = Date.parseISO(json.published.$t); assert(this.dtCreate, "Comment: Parse failed! " + json.published.$t); this.nId = this.dtCreate.getTime(); this.sId = "" + this.nId; } } this.oAuthor = new Author(json.author[0]); this.sText = json.content.$t; this.oAuthor.isAnonymous() && (this.oWordInfo = new WordInfo(this.sText)); this.normalize(); } // Comment() end Comment.mapArticles = null; Comment.initArticlesMap = function(nInitLoadNum) { if(null === Comment.mapArticles) { Comment.mapArticles = {} } else { return } nInitLoadNum = isNaN(nInitLoadNum) ? 8 : nInitLoadNum; $.ajax({ url: Url.getFeedUrlPrefix() + "/posts/summary?alt=json&max-results=" + nInitLoadNum, dataType: "json", success: function(json) { function _procLink(i, link) { if("alternate" != link.rel) { return true } Comment.mapArticles[(new Url(link.href)).sPath] = "&#12298;" + link.title + "&#12299;"; return false; } ("feed" in json) && ("entry" in json.feed) && $.each(json.feed.entry, function(i, entry){ $.each(entry.link, _procLink) }); }, timeout: 1000 * 48 }); } Comment.prototype.normalize = function() { this.oAuthor ? this.oAuthor.normalize() : (this.oAuthor = new Author(null)); this.sUrl.startsWith("http://") && (this.sUrl = this.sUrl.replace(/^http:/i, "https:")); // force HTTPS this.sText = ( (this.bIsDeleted || this.bIsBanned) ? "" : this.sText.htmlTrimTag().replace(/\n{3,}/g, "\n\n") ); this.oAuthor.isAdmin() && this.sText.match(/^\s*\{\s*"type"\s*\:/) && (this.bIsInstruction = true); return this; } Comment.prototype.isTop = function() { return "" === this.sParentLongId; } Comment.prototype.isSub = function() { return "" !== this.sParentLongId; } Comment.prototype.getSpamTypeDesc = function() { if(10 == this.nSpamType) { return "发布该留言的登录用户&#65292;存在&#12304;恶意刷屏&#12305;或&#12304;垃圾广告&#12305;的行为&#65292;已经被拉黑&#12290;" } else if(11 == this.nSpamType) { return "该留言的&#12304;用户名&#12305;冒充博主&#12290;" } else if(20 == this.nSpamType) { return "该留言的&#12304;发布时间&#12305;&#65292;同时出现了大量&#12304;匿名评论&#12305;&#12290;" } else if(30 == this.nSpamType && this.nTextGroupId && this.nTextGroupId != this.nId) { return "该留言的内容与 &#8220;<a href='#"+this.nTextGroupId+"'>这条</a>&#8221; 相似&#12290;" } else if(31 == this.nSpamType) { return "留言中的某个网址&#65288;" + this.sRepeatUrl + "&#65289;多次重复出现&#65292;疑似垃圾广告" } else if(40 == this.nSpamType) { return "留言内容的&#12304;信噪比&#12305;太差&#12290;" } else { assert(false, "getSpamTypeDesc: Invalid 'nSpamType'!") } } Comment.truncate = function(sText, mapOpts) { mapOpts = mapOpts || {}; var nColumnWidth = ("columnWidth" in mapOpts ? mapOpts.columnWidth : 100); var nMaxLineNum = ("maxLineNum" in mapOpts ? mapOpts.maxLineNum : 6); var mapConfig = loadConfig(); if(hadConfig() && "false" == mapConfig["comments.limit-height"]) { return sText } // user disable truncate var nCutPos = 0; for(var ln=0, cl=0; nCutPos<sText.length && ln<nMaxLineNum; nCutPos++) { cl += (sText.charCodeAt(nCutPos) < 128 ? 1 : 2); // ASCII is half width char ("\n" == sText.charAt(nCutPos) || cl >= nColumnWidth) && (ln += 1) && (cl = 0); } // Cut after first image url { var sFlag = "\n\n\n"; function _addFlag(sMatch, s1, s2, s3, s4, s5, s6, s7, s8, s9) { return s1 + s2 + (getImgHost(s2) ? sFlag : "") + s9; } var sPunct = "\\s:,\\u2000-\\u206F\\u3000-\\u303F\\uFF00-\\uFFEF", sCJK = "\\u4E00-\\u9FFF"; var sTemp = Url.preprocess(sText.substr(0, nCutPos), "["+sPunct+sCJK+"]", _addFlag); sTemp = sTemp.replace("[/img]", "[/img]" + sFlag); var nFlagPos = sTemp.indexOf(sFlag); if(nFlagPos > 0) { return sTemp.substr(0, nFlagPos) } } return sText.substr(0, nCutPos) + _smartExpand(sText.substr(nCutPos)); function _smartCut(sText) { (sText.length > nColumnWidth * 2) && (sText = sText.substr(0, nColumnWidth * 2)); var nPos = sText.indexOf("["); (nPos != -1) && (sText = sText.substr(0, nPos)); var arrRegex = [ /\n/, /[\s\?\!&#12288;&#12290;&#65311;&#65281;]/, /[\,\:;&#65292;&#65306;&#65307;&#12289;]/ ]; // TODO for(var i=0; i<arrRegex.length; i++) { var nPos = sText.search(arrRegex[i]); if(nPos >= 0) { sText = sText.substr(0, nPos); break; } } return sText + "&#12288;......"; } function _smartExpand(sText) { if( (sText.length <= nColumnWidth) && (sText.count(/\n/g) <= 2) ) { return sText } var nTagEnd1 = sText.indexOf("[/"); if(-1 == nTagEnd1 || sText.indexOf("[") < nTagEnd1) { return _smartCut(sText) } // NOT found partial BBCode var nTagEnd2 = sText.indexOf("]", nTagEnd1 + 2); if(-1 == nTagEnd2) { return _smartCut(sText) } // invalid BBCode syntax var sExt = sText.substring(0, nTagEnd2 + 1); if( (sExt.length < nColumnWidth * 2) && (sExt.count(/\n/g) <= 2) ) { return sExt } // expand to end tag return _smartCut(sExt) + sText.substring(nTagEnd1, nTagEnd2 + 1); // add end tag } } // truncate() end Comment.prototype.getContentHtml = function(mapOpts) { mapOpts = mapOpts || {}; var bShowSpam = ("showSpam" in mapOpts ? mapOpts.showSpam : false); // manual show var bTruncate = ("truncate" in mapOpts ? mapOpts.truncate : true); // manual expand !("maxImgNum" in mapOpts) && (mapOpts.maxImgNum = (this.oAuthor.isLogined() ? 12 : 6)); var sSelfDeleted = "<span class='deleted-comment'>这个用户删除了自己的评论 :(</span>"; var sHtml = ""; if(this.nSpamType > 0) { sHtml += "<b>此评论被&#8220;反刷屏程序&#8221;自动隐藏</b>&#65292;原因&#65306;" + this.getSpamTypeDesc(); sHtml += ( bShowSpam ? "<hr style='border:1px solid Black;'/>" : "<span class='restore spam'><a class='load' href='javascript:;'>查看内容</a></span>" ); if(!bShowSpam) { return sHtml } this.bIsDeleted && (sHtml += sSelfDeleted); } else if(this.bIsBanned) { return "<span class='banned-comment'>这个用户的评论被 Google 判定垃圾广告&#65292;所以无法显示 :(<br/>" + "博主会定期清理博客管理界面的&#8220;垃圾评论&#8221;&#65292;如果确认为&#12304;误判&#12305;&#65292;会把这条评论恢复出来&#12290;</span>"; } else if(this.bIsDeleted) { return sSelfDeleted; } var sText = this.sText; bTruncate && (sText = Comment.truncate(sText, mapOpts)); var sTruncateTip = (bTruncate && sText.length < this.sText.length) ? ("<div style='margin:15px 0px;'><hr style='border:1px solid Black;'/>" + "<b>&#65288;此评论太长&#65292;已截断&#65292;<a class='read-more' href='javascript:;'>展开评论全文</a>&#65289;</b></div>") : ""; (0 == this.nSpamType) && (sText = renderBBCode(sText, mapOpts)); sHtml += sText.replace(/\n/g, "<br/>").replace(/\t/g, "&nbsp;") + sTruncateTip; return (sHtml || "&nbsp;"); } // getContentHtml() end Comment.prototype.showFull = function(mapOpts) { mapOpts = mapOpts || {}; var nHotValue = ("hotValue" in mapOpts ? mapOpts.hotValue : null); var sHotTitle = ("hotTitle" in mapOpts ? mapOpts.hotTitle : ""); var sStarList = ("starList" in mapOpts ? mapOpts.starList : ""); var nMaxAuthorLen = ("maxAuthorLen" in mapOpts ? mapOpts.maxAuthorLen : 20); var bShowSpam = ("showSpam" in mapOpts ? mapOpts.showSpam : false); // manual show var sSubComments = ("subComments" in mapOpts ? mapOpts.subComments : ""); this.normalize(); // for robust var sClass = (this.isSub() ? "sub" : "top") + (this.nSpamType>0 ? " spam" : ""); var nIndex = (this.isSub() ? this.nSubIndex : this.nTopIndex); var sAuthor = this.oAuthor.sName; var sAuthorHex = (isTest() ? (" hex='"+sAuthor.formatHex()+"'") : ""); // dump HEX (sAuthor.length > nMaxAuthorLen) && (sAuthor = sAuthor.substr(0, nMaxAuthorLen) + "\t..."); // truncate sAuthor = sAuthor.replace(/\t/g, "&nbsp;"); // do it AFTER truncate var sUserClass = (this.oAuthor.isLogined() ? " logined" : "") + (this.oAuthor.isAdmin() ? " blog-author" : ""); var sDate = (this.dtCreate ? this.dtCreate.format("%Y年%m月%d日") : ""); var sTime = (this.dtCreate ? this.dtCreate.format("%0H:%0M:%0S") : ""); isBlogAdmin() && (sDate = this.dtCreate.format("%Y年%m月%d日 %0H:%0M:%0S")); isBlogAdmin() && (sTime = ""); var sCounter = this.nTopIndex+"楼" + (this.isSub() ? this.nSubIndex+"单元" : ""); var sDelLink = "https://www.blogger.com/delete-comment.g?blogID=5235590154125226279&amp;postID=" + this.sLongId; var sGoLevel = (this.isSub() ? "&nbsp;<a class='go-level-current' href='javascript:;' title='跳到本楼'>&nbsp;&#8896;&nbsp;</a>&nbsp;" : "<select class='go-level' update='0'><option>电梯</option></select>"); var sActions = ( (0 == this.nSpamType || bShowSpam) ? ("<div class='comment-actions'>" + "<a class='reply-btn' href='javascript:;'>回复"+this.nTopIndex+"楼</a>" + "<a class='item-control blog-admin "+this.sItemControlClass+"' " + "href='"+sDelLink+"' style='display:none;'>删除</a>" + "<span class='menubars' update='0'/>" + "<a class='add-btn' href='javascript:;'>另开新楼</a>" + "<a class='go-level-down' href='javascript:;' title='跳到热度排名的&#12304;后一个&#12305;楼层'>&nbsp;&#65310;&nbsp;</a>" + sGoLevel + "<a class='go-level-up' href='javascript:;' title='跳到热度排名的&#12304;前一个&#12305;楼层'>&nbsp;&#65308;&nbsp;</a>" + (isBlogAdmin() ? "<a class='mark-spam' href='javascript:;'>&#12288;SPAM&#12288;</a>" : "") + "</div>") : "" ); var sReplies = ( sSubComments ? ("<div class='comment-replies thread-expanded'>" + "<a class='thread-toggle' href='javascript:;'/>" + "<div class='comment-thread'>" + "<ol class='sub'>" + sSubComments + "</ol></div>" + "</div>") : "" ); var sHtml = "<li class='comment "+sClass+"' data='"+this.sId+"' index='"+nIndex+"' " + (nHotValue ? ("hot='"+nHotValue+"'") : "") + ">" + "<a name='"+this.sId+"'>&nbsp;</a>" + "<div class='avatar-image-container'><img src='"+this.oAuthor.sAvatarUrl+"'></div>" + "<div id='c"+this.sLongId+"' class='comment-block'>" + "<div class='comment-header'>" + "<cite class='user"+sUserClass+"'"+sAuthorHex+">" + (this.oAuthor.sHomeUrl ? ("<a href='"+this.oAuthor.sHomeUrl+"' target='_blank' rel='nofollow'>" + sAuthor + "</a>") : sAuthor) + "</cite>" + "<span class='star' update='0'>" + sStarList + "</span>" + "<span class='datetime' title='"+sTime+"'>" + ((this.bIsDeleted || this.bIsBanned) ? sDate : ("<a href='"+this.sUrl+"'>" + sDate + "</a>")) + "</span>" + "<span class='counter'>" + ((this.bIsDeleted || this.bIsBanned) ? sCounter : ("<a href='"+this.sUrl+"'>" + sCounter + "</a>")) + "</span>" + ((this.isSub() || this.nSpamType > 0) ? "" : ("<span class='hot'>" + sHotTitle + "</span>")) + "</div>" // comment-header + "<div class='comment-content'>" + this.getContentHtml(mapOpts) + "</div>" + sActions + "</div>" // comment-block + sReplies + "</li>"; return sHtml; } // showFull() end Comment.prototype.showSummary = function(mapOpts) { mapOpts = mapOpts || {}; var nMaxAuthorLen = ("maxAuthorLen" in mapOpts ? mapOpts.maxAuthorLen : 20); this.normalize(); // for robust Comment.initArticlesMap(); var sAuthor = this.oAuthor.sName; (sAuthor.length > nMaxAuthorLen) && (sAuthor = sAuthor.substr(0, nMaxAuthorLen) + "\t..."); // truncate sAuthor = sAuthor.replace(/\t/g, "&nbsp;"); // AFTER truncate ("highlightAuthor" in mapOpts) && (sAuthor = highlightSearchKeywords(sAuthor, mapOpts.highlightAuthor)); var sUserClass = (this.oAuthor.isLogined() ? " logined" : "") + (this.oAuthor.isAdmin() ? " blog-author" : ""); var sTime = this.dtCreate.format("%0H:%0M:%0S"); var $comment = $( "<div id='comment-"+this.sId+"'>" + "<div class='comment-header'>" + "<img class='avatar' src='"+this.oAuthor.sAvatarUrl+"'/>" + "<cite class='author"+sUserClass+"'>" + sAuthor + "</cite>" + "<span class='datetime' title='"+sTime+"'>" + getRelativeTimeDesc(this.dtCreate) + "</span></div>" + "<div class='comment-article'/>" + "<div class='comment-text'><a/></div>" + "</div>"); { var oUrl = new Url(this.sUrl); assert(oUrl.bValid, "Comment.showSummary: Invalid url: " + this.sUrl); var sUrl = oUrl.sPath + "?comment=" + oUrl.getParam("comment"); // relative path ("keywords" in mapOpts) && (sUrl += "&q=" + encodeURIComponent(mapOpts.keywords.join(" "))); ("scope" in mapOpts) && (sUrl += "&scope=" + mapOpts.scope); var $comment_link = $comment.find(".comment-text a"); $comment_link.attr("href", sUrl); ($comment_link[0].pathname != location.pathname) // NOT current page && $comment_link.attr("target", "_blank"); var sLongText = this.sText.replace(/\[\/?\w+\]|\[(?:URL|IMG)=[^\]]*\]/gi, " "); var sShortText = Comment.truncate(sLongText, mapOpts); (sLongText.length > sShortText.length) && $comment_link.tooltip({ content: function(callback) { callback($(this).attr("title").replace(/\n/g, "<br/>")) }, open: function(event, ui) { ui.tooltip.hover(function(){ $(this).hide("fade") }) } }).attr("title", sLongText); ("highlightText" in mapOpts) && (sShortText = highlightSearchKeywords(sShortText, mapOpts.highlightText)); $comment_link.html(sShortText.replace(/\n/g, "<br/>")); } // comment link while(true) { var $comment_article = $comment.children(".comment-article"); if($comment_article.html() !== "") { break } var sArticlePath = (new Url(this.sUrl)).sPath; if(sArticlePath in Comment.mapArticles) { function pollingTitle() { return (Comment.mapArticles[sArticlePath] !== "") ? (!!$comment_article.html(Comment.mapArticles[sArticlePath]) && false) : true; } (Comment.mapArticles[sArticlePath] !== "") ? $comment_article.html(Comment.mapArticles[sArticlePath]) : asyncLoop(pollingTitle, 1000, "pollingTitle"); break; } Comment.mapArticles[sArticlePath] = ""; // set flag $.ajax({ url: Url.getFeedUrlPrefix() + "/posts/summary?alt=json&path=" + encodeURIComponent(sArticlePath), dataType: "json", success: function(json) { function _procLink(i, link) { if("alternate" != link.rel) { return true } $comment_article.html( Comment.mapArticles[sArticlePath] = "&#12298;" + link.title + "&#12299;" ); return false; } ("feed" in json) && ("entry" in json.feed) && json.feed.entry.length && $.each(json.feed.entry[0].link, _procLink); }, timeout: 1000 * 24 }); break; } // while() end return $comment; } // Comment.prototype.showSummary() end // WordInfo class function WordInfo(sText) { assert(typeof sText === "string", "WordInfo: Invalid 'sText'!"); (sText.length > 1024) && (sText = sText.substr(0, 1024)); this.arrWords = []; this.mapCounter = {}; this.nWordNum = 0; this.nRawLen = sText.length; sText = WordInfo.trimUrl(sText, null); this.nUrlLen = this.nRawLen - sText.length; function _trimSyntax(sText) { var arrSyntax = [ [/\[\/?\w+\]|\[(?:URL|IMG)=[^\]]*\]/gi, " "], // bbcode [/(?:\s|^)[a-f0-9]{8,128}(?:\s|$)/gi, " hex "] // hex string ]; var sRtn = ""; $.each(sText.split("\n"), function(i, sLine){ sRtn += sLine.multiReplace(arrSyntax) + " " }); return sRtn; } sText = _trimSyntax(sText).trim(); this.nTrimCount = 0; var sWord = ""; for(var i=0; i<sText.length; i++) { var ch = sText.charAt(i), nCode = sText.charCodeAt(i); if(97 <= nCode && nCode <= 122) { sWord += ch } // 'a'~'z' else if(65 <= nCode && nCode <= 90) { sWord += String.fromCharCode(nCode + 32) } // 'A'~'Z' else if(65345 <= nCode && nCode <= 65370) { sWord += String.fromCharCode(nCode - 65248) } // 'a'~'z' else if(65313 <= nCode && nCode <= 65338) { sWord += String.fromCharCode(nCode - 65216) } // 'A'~'Z' else if(48 <= nCode && nCode <= 57) { sWord += ch } // '0'~'9' else { if(sWord) { this.addWord(sWord); sWord = ""; } String.isCJKChar(nCode) ? this.addWord(ch) : this.nTrimCount++; } } sWord && this.addWord(sWord); var map = this.mapCounter; this.arrWords.sort(function(a, b){ return Number.cmp(map[a], map[b]) * -1 }); } // WordInfo() end WordInfo.prototype.addWord = function(sWord) { if(sWord.length > 64 || sWord.match(/^[a-z0-9]{1,2}$/)) // trim noise { this.nTrimCount += sWord.length; return; } this.nWordNum++; if(sWord in this.mapCounter) { this.mapCounter[sWord] += 1; } else { this.mapCounter[sWord] = 1; this.arrWords.push(sWord); } } WordInfo.prototype.isSimilarity = function(wiOther, nCritical) { if(!this.arrWords.length || !wiOther.arrWords.length) { return false } var wiShort = this, wiLong = wiOther; if(this.arrWords.length > wiOther.arrWords.length) { wiLong = this; wiShort = wiOther; } if(wiLong.arrWords.length / wiShort.arrWords.length > 2.0) { return false } nCritical *= (this.nWordNum + wiOther.nWordNum); var nCount = 0; var nRatio = 5, nCheckPos = Math.floor(wiShort.arrWords.length/nRatio); for(var i=0; i<wiShort.arrWords.length; i++) { if(nCheckPos >= 1 && nCheckPos == i && nCount < nCritical/nRatio) { return false } var sWord = wiShort.arrWords[i]; if(sWord in wiLong.mapCounter) { nCount += wiShort.mapCounter[sWord] + wiLong.mapCounter[sWord]; if(nCount > nCritical) { return true } } } return false; } // isSimilarity() end WordInfo.trimUrl = function(sText, fnRepl) { fnRepl = fnRepl || function(sMatch, s1, s2, s3, s4, s5, s6, s7, s8, s9){ return s1 + " " + s9 }; var sPunct = "\\s:,\\[\\]=\\u2000-\\u206F\\u3000-\\u303F\\uFF00-\\uFFEF", sCJK = "\\u4E00-\\u9FFF"; var sExclude = "[" + sPunct + sCJK + "]"; var sUrlPattern = Url.getRegexpStr(true); var regex = new RegExp("(^|"+sExclude+")" + "("+sUrlPattern+")" + "($|"+sExclude+")", "g"); sText = sText.replace(regex, fnRepl); return sText.replace(regex, fnRepl); // process overlap } // DomainName function DomainName(sName) { assert(typeof sName === "string" && sName.length >= 3, "DomainName: Invalid 'sName'!"); this.sName = sName; this.arrLetters = []; this.mapCounter = {}; for(var i=0; i<this.sName.length; i++) { var ch = this.sName.charAt(i); if('.' == ch) { continue } if(ch in this.mapCounter) { this.mapCounter[ch] += 1; } else { this.mapCounter[ch] = 1; this.arrLetters.push(ch); } } var map = this.mapCounter; this.arrLetters.sort(function(a, b){ return Number.cmp(map[a], map[b]) * -1 }); } DomainName.prototype.sameAs = function(dnOther) { if(this.sName == dnOther.sName) { return true } var dnShort = this, dnLong = dnOther; if(this.arrLetters.length > dnOther.arrLetters.length) { dnLong = this; dnShort = dnOther; } // optimize if(dnLong.arrLetters.length / dnShort.arrLetters.length > 2.0) { return false } for(var i=0; i<dnShort.arrLetters.length; i++) { if(dnLong.sName.indexOf(dnShort.arrLetters[i]) == -1) { return false } } var sLongName = dnLong.sName, sShortName = dnShort.sName, arrCommon = []; for(var i=0; i<dnLong.arrLetters.length; i++) { var ch = dnLong.arrLetters[i]; if(sShortName.indexOf(ch) == -1) { sLongName = sLongName.replace(new RegExp(ch, "g"), ""); if(sLongName == sShortName) { return true } } else { arrCommon.push(ch); } } var nTryNum = Math.floor(arrCommon.length / 3); for(var i=0; i<nTryNum; i++) { var re = new RegExp(arrCommon[i], "g"); sLongName = sLongName.replace(re, ""); sShortName = sShortName.replace(re, ""); if(sLongName == sShortName) { return true } } return false; } // sameAs() end // Anti spam utilities function UserAnalyzer(mapOpts) { mapOpts = mapOpts || {}; // reserved this.reAdminName = /^(博主)?[编編煸][程桯埕随隋隨]{2}想(的?博客|博主)?$/; this.mapBannedUserId = { "18141030690147245751" : null, "05790139454850952051" : null, "02119400702675800143" : null, "10630984068291402792" : null, "11816960879702029740" : null, "07413446777379638323" : null, "15207830749420122221" : null, "00615794917048730966" : null, "04409539673294542610" : null, "08847861307049076010" : null, "05905946985285695901" : 1561289469774, "13981560392385541852" : 1561172577533, "05292423574133415627" : 1562364379478, "09912882299755624050" : null, "11686161736171066379" : null }; this.mapFakedAdminId = { "08847861307049076010" : null, "05905946985285695901" : null, "13981560392385541852" : null }; } UserAnalyzer.prototype.isFakedAdmin = function(sName) { if(sName.length < 4) { return ("博主" == sName) } // optimize var sCJK = sName.substring(0, 10).replace(/[^\u4E00-\u9FFF]/g, ""); if("博主" == sCJK) { return true } if(sCJK.length >= 4 && sCJK.match(this.reAdminName)) { return true } return false; } UserAnalyzer.prototype.getSpamType = function(comment) { var author = comment.oAuthor; if(author.isAnonymous()) { return this.isFakedAdmin(author.sName) ? 11 : 0; } else // logined { var nPos = author.sHomeUrl.lastIndexOf("/"); assert(nPos > 0, "UserAnalyzer.getSpamType: Invalid 'sHomeUrl'!"); var sUserId = author.sHomeUrl.substr(nPos + 1); if((sUserId in this.mapFakedAdminId) && this.isFakedAdmin(author.sName)) { return 11 } if(sUserId in this.mapBannedUserId) { var nCommentId = this.mapBannedUserId[sUserId]; if(typeof nCommentId === "number") { return (comment.nId > nCommentId) ? 10 : 0 } return 10 } return 0; } } // getSpamType() end function TimeGroupAnalyzer(mapOpts) { mapOpts = mapOpts || {}; this.m_nRoundRange = ("range" in mapOpts ? mapOpts.range : 900); // default is a quarter this.m_nOffset = ("offset" in mapOpts ? mapOpts.offset : 300); // default is 5 minutes var nBase = getMinTime().getTime() / 1000; this.m_arrGroups = []; var nGroupNum = Math.floor(this.m_nRoundRange / this.m_nOffset); for(var i=0; i<nGroupNum; i++) { this.m_arrGroups.push({ nBase: nBase + i * this.m_nOffset, map:{} }); } } TimeGroupAnalyzer.prototype.calcKey = function(group, nTime) { var nSeconds = nTime / 1000; assert(nSeconds > group.nBase, "TimeGroupAnalyzer.calcKey: Invalid 'nTime'!"); return Math.floor( (nSeconds - group.nBase) / this.m_nRoundRange ); } TimeGroupAnalyzer.prototype.addTime = function(nTime) { var tga = this; $.each( this.m_arrGroups, function(i, group) { var nKey = tga.calcKey(group, nTime); (nKey in group.map) ? group.map[nKey].push(nTime) : (group.map[nKey] = [nTime]); } ); } TimeGroupAnalyzer.prototype.getSimilarNum = function(nTime) { var nMax = 0, tga = this; $.each( this.m_arrGroups, function(i, group) { var nKey = tga.calcKey(group, nTime); (nKey in group.map) && (group.map[nKey].length > nMax) && (nMax = group.map[nKey].length); } ); return nMax; } TimeGroupAnalyzer.prototype.getSimilarTimes = function(nTime) { var arrMax = [], tga = this; $.each( this.m_arrGroups, function(i, group) { var nKey = tga.calcKey(group, nTime); (nKey in group.map) && (group.map[nKey].length > arrMax.length) && (arrMax = group.map[nKey]); } ); return arrMax; } function TextGroupAnalyzer(mapOpts) { mapOpts = mapOpts || {}; // reserved this.mapTextGroup = {}; } TextGroupAnalyzer.prototype.addComment = function(comment, mapOpts) { if(comment.bIsDeleted || comment.bIsBanned) { return null } assert(comment.oWordInfo, "TextGroupAnalyzer.addComment: The 'comment.oWordInfo' is null!"); mapOpts = mapOpts || {}; var nCritical = ( ("critical" in mapOpts) ? mapOpts.critical : (comment.isTop() ? 0.9 : 0.85) ); for(var nGroupId in this.mapTextGroup) { var group = this.mapTextGroup[nGroupId]; if( !comment.oWordInfo.isSimilarity(group.oWordInfo, nCritical) ) { continue } group.arrCommentId.push(comment.nId); return nGroupId; } // NOT found similar, create new group var nGroupId = comment.nId; this.mapTextGroup[nGroupId] = { oWordInfo:comment.oWordInfo, arrCommentId:[comment.nId] }; return nGroupId; } TextGroupAnalyzer.prototype.getSimilarNum = function(comment) { var nGroupId = comment.nTextGroupId; if(null === nGroupId) { return 0 } return (nGroupId in this.mapTextGroup) ? this.mapTextGroup[nGroupId].arrCommentId.length : 0; } TextGroupAnalyzer.prototype.getSimilarId = function(comment) { var nGroupId = comment.nTextGroupId; if(null === nGroupId) { return [] } return (nGroupId in this.mapTextGroup) ? this.mapTextGroup[nGroupId].arrCommentId : []; } function UrlAnalyzer(mapOpts) { mapOpts = mapOpts || {}; this.nCritical = ("critical" in mapOpts ? mapOpts.critical : 3); this.mapUrl = {}; this.mapDomain = {}; this.bIsTest = isTest(); } UrlAnalyzer.prototype.isSpam = function(comment) { assert(!comment.sRepeatUrl, "UrlAnalyzer.isSpam: The 'sRepeatUrl' NOT empty!"); comment.sRepeatUrl = (this.find(comment.oAuthor.sName, true) || this.find(comment.sText, false)); return !!comment.sRepeatUrl; } UrlAnalyzer.prototype.find = function(sText, bMatchNormal) { var ua = this, sTarget = ""; function _addUrl(sUrl) { sUrl = sUrl.replace(/^https?\:\/\/|#.*$/g, ""); if( sUrl.startsWith(Url.getDomain()) || sUrl.search(/^(?:\d{1,3}\.){3}\d{1,3}(?:$|\/|\:)/) == 0 ) { return 1 } // white list return (sUrl in ua.mapUrl) ? (ua.mapUrl[sUrl] += 1) : (ua.mapUrl[sUrl] = 1); } function _replUrl(sMatch, s1, s2, s3, s4, s5, s6, s7, s8, s9) { (_addUrl(s2) >= ua.nCritical || bMatchNormal) && (sTarget = s2); return s1 + " " + s9; } sText = WordInfo.trimUrl(this.escape(sText), _replUrl); !sTarget && $.each( sText.split(/\n|https?\:\/\/|[^\w\-\.]{20,}/g), function(i, s){ return !(sTarget = ua.procLine(s, bMatchNormal)) } ); return sTarget; } // find() end UrlAnalyzer.prototype.procLine = function(sLine, bMatchNormal) { var ua = this; function _addDomain(sDomain, results) { assert(sDomain.length > 0 && results, "_addDomain"); var map = ua.mapDomain; if(sDomain in map) { var nNum = (map[sDomain] += 1); ua.bIsTest && (3 == ua.nCritical) && dump("_addDomain: " + nNum + " (" + sDomain + ")"); return nNum; } var dn = new DomainName(sDomain); for(var s in map) { if(!dn.sameAs(new DomainName(s))) { continue } var nNum = (map[s] += 1); isTest() && (3 == ua.nCritical) && dump("_addDomain: " + nNum + " (" + sDomain + ") (" + s + ")"); return nNum; } return (map[sDomain] = 1); } // _addDomain() end function _doMatch(sText) { // optimize if(sText.length <= 3 || sText.search(/[a-z]/) == -1) { return 0 } if(Url.getDomain() == sText) { return 1 } var results = sText.match(/(?:[a-z_\-]{2,}\.){2,3}[a-z_\-]{2,}/); return results ? _addDomain(sText, results) : 0; } var arrFields = sLine.split(/[^\a-z_\-\.]/g), sPartial = ""; for(var i=0; i<arrFields.length; i++) { var sField = arrFields[i], nNum = 0; if(sPartial && (nNum = _doMatch(sPartial + sField)) > 0) { if(nNum >= ua.nCritical || bMatchNormal) { return sPartial + sField } } else if((nNum = _doMatch(sField)) > 0) { if(nNum >= ua.nCritical || bMatchNormal) { return sField } } (nNum > 0) ? (sPartial = "") : (sPartial += sField); } return ""; } // procLine() end UrlAnalyzer.prototype.escape = function(sText) { sText = sText.trim().multiReplace([ [/@|&#65294;/g, "."], [/&#65293;/g, "-"], [/&#65343;/g, "_"] ]); var sRtn = ""; for(var i=0; i<sText.length; i++) { var ch = sText.charAt(i), nCode = sText.charCodeAt(i); if(65 <= nCode && nCode <= 90) { sRtn += String.fromCharCode(nCode + 32) } // 'A'~'Z' else if(65345 <= nCode && nCode <= 65370) { sRtn += String.fromCharCode(nCode - 65248) } // 'a'~'z' else if(65313 <= nCode && nCode <= 65338) { sRtn += String.fromCharCode(nCode - 65216) } // 'A'~'Z' else { sRtn += ch } } return sRtn; } function TextFeatureAnalyzer(mapOpts) { mapOpts = mapOpts || {}; this.nTrimRatio = ("trimRatio" in mapOpts ? mapOpts.trimRatio : 0.85); this.nMinWordRatio = ("minWordRatio" in mapOpts ? mapOpts.minWordRatio : 0.25); this.nMaxWordRatio = ("maxWordRatio" in mapOpts ? mapOpts.maxWordRatio : 0.9); this.bIsTest = isTest(); } TextFeatureAnalyzer.prototype.isSpam = function(comment) { if(comment.bIsDeleted || comment.bIsBanned) { return false } assert(comment.oWordInfo, "TextFeatureAnalyzer.isSpam: The 'comment.oWordInfo' is null!"); if(comment.sText.length >= 6) { var wi = comment.oWordInfo; if( (wi.nRawLen >= 200) && (wi.nTrimCount / wi.nRawLen > this.nTrimRatio) ) { return true } if(0 == wi.nWordNum) { return 0 == wi.nUrlLen; } else { var nRatio = wi.arrWords.length / wi.nWordNum; return (nRatio < this.nMinWordRatio) || ( (wi.nWordNum >= 150) && (nRatio > this.nMaxWordRatio) ); } } else { return comment.sText.search(/[a-z\u4E00-\u9FFF]/i) == -1; } } function ManualAnalyzer(mapOpts) { mapOpts = mapOpts || {}; // reserved this.mapSpam = {}; } ManualAnalyzer.prototype.parseSpamList = function(sHtml) { try { var nBegin = sHtml.lastIndexOf("<!--BANNED"); if(nBegin > 0) { nBegin += 10 var nEnd = sHtml.indexOf("-->", nBegin); assert(nEnd > 0, "ManualAnalyzer.parseSpamList: NOT found '-->'!"); var mapSpam = this.mapSpam, lst = JSON.parse(sHtml.substring(nBegin, nEnd)); $.each(lst, function(i, nId){ mapSpam[nId] = true }); } } catch(err) { reportError("ManualAnalyzer.parseSpamList: " + err); } } ManualAnalyzer.prototype.addCommentId = function(nCommentId) { this.mapSpam[nCommentId] = true; } ManualAnalyzer.prototype.isSpam = function(comment) { if(comment.bIsDeleted || comment.bIsBanned) { return false } return this.mapSpam[comment.nId]; } ManualAnalyzer.prototype.getBannedJson = function() { var sJson = "", lst = []; for(var nId in this.mapSpam) { lst.push(nId) } lst.sort(); $.each(lst, function(i, nId){ sJson += (sJson ? "," : "") + nId + ((9==(i%10)) ? "\n" : "") }); return "<!--BANNED\n[" + sJson + "]\n-->"; } </script> <style type="text/css"> /*--@ Message tip at bottom @--*/ #bottom-tip { display: none; background-color: Silver; border: 1px solid SlateGray; text-align: center; font-size: 125%; z-index: 1024; position: fixed; left: 0; bottom: 0; width: 100%; height: 64px; line-height: 64px; } </style> <noscript> <style type="text/css"> /*--@ Message tip at bottom @--*/ #bottom-tip { display: block !important; } #bottom-tip:after { font-weight: bold; content: "你的浏览器禁用了 JavaScript/JS 脚本, 导致某些功能无法正常显示 :("; } </style> </noscript> <div id="bottom-tip"></div> <!-- Target IE 7 and LOWER --> <!--[if lt IE 8 ]> <div id="ie-ver-lt-8"></div> <![endif]--> <!-- Target IE 8 and LOWER --> <!--[if lt IE 9 ]> <div id="ie-ver-lt-9"></div> <![endif]--> <!-- Target IE 9 and LOWER --> <!--[if lt IE 10 ]> <div id="ie-ver-lt-10"></div> <![endif]--> </div> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=HTML&widgetId=HTML1&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("HTML1"));' rel='nofollow' target='configHTML1' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div><div class='widget HTML' data-version='1' id='HTML2'> <div class='widget-content'> <script type="text/javascript"> jQuery(function($) { function initArticleInnerLinks(mapConfig) { if("true"!=mapConfig["article.inner-index"] || $(".post-inner-index").length==0) { return; } if($(".post-body h2").length == 0) { $(".post-inner-index").hide(); return; } $(".post-inner-index").css("padding-bottom", "2em") .append("<div><b style='font-size:120%;'>文章目录</b></div>"); $(".post-body h2").each( function(nIndex) { var sHash = "head-"+(nIndex+1); $(this).before("<a name='"+sHash+"'> </a>"); var sTitle = $(this).html().replace(/<.+?>|/g, ""); $(".post-inner-index").append("<a href='#"+sHash+"'>"+sTitle+"</a><br/>"); } ); } function initArticleInternalLinks() { var sSite = "http://"+Url.getDomain()+"/"; // Force HTTPS $(".post-body a").each( function(nIndex) { var sUrl = $(this).attr("href"); (sUrl && sUrl.startsWith(sSite)) && $(this).attr("href", sUrl.replace(/^http:/i, "https:")); } ); } function initArticleMaxMinBox() { $(".post-toolbar-1 .post-config-buttons") .append("<a href='/p/options.html#article' target='_blank' title='界面配置'><img src='https://lh5.googleusercontent.com/0x2IO713ZAWAhuqV2krwhjRydPOZgZ4Ura1l-5ghT9g9KpQ85qboSCNuo11J0xLI8QXb5NYVeqbtq7bWMewyChtuF-SsQzdi77lJwHUucsP-VGtahC3dbP8IfrexanTYs-8gioX-xLQ' alt='配置'/></a>") .append("<a class='maximize' title='进入全屏模式' href='javascript:;'><img src='https://lh4.googleusercontent.com/-xvmbNnFdxWU/VDx_uEPOw1I/AAAAAAAAA_s/-zd0eweSahg/maximize_32x32.png' alt='进入全屏'/></a>") .append("<a class='minimize' title='退出全屏模式' href='javascript:;'><img src='https://lh4.googleusercontent.com/-sijQmuC36C4/VDyBM8xDLeI/AAAAAAAABAc/fG3M6jUli74/minimize_32x32.png' alt='退出全屏'/></a>") $(".post-config-buttons .maximize").click( function() { $("#sidebar").hide(); $("#main").css("width", "100%"); $("#comments").hide(); $("#Header1").hide(); var mapConfig = loadConfig(); ("true"==mapConfig["side-toolbar.show"]) && $("#side-toolbar").hide(); $(".post-config-buttons .minimize").show(); $(this).hide(); $("a[name=article]").scrollTo("fast"); } ); $(".post-config-buttons .minimize").hide().click( function() { layoutReset() } ); } // initArticleMaxMinBox() end var RATIO_NUM = 10000; function loadToolbarPos() { if(!hadConfig()) { return; } var mapConfig = loadConfig(); if(mapConfig["side-toolbar.show"]!="true" || mapConfig["side-toolbar.drag"]!="true") { return; } $("#side-toolbar").css("margin-left", "0px"); $("#side-toolbar").css("margin-top", "0px"); var sPos = mapConfig["side-toolbar.drag-pos"]; if(sPos.match(/\d{1,5}_\d{1,5}/)) { var offset = { left: parseInt(sPos.split("_")[0]), top: parseInt(sPos.split("_")[1]) }; offset.left = Math.round($(window).width() * offset.left / RATIO_NUM); offset.top = Math.round($(window).height() * offset.top / RATIO_NUM); if(offset.left > $(window).width()/2) { offset.left -= $("#side-toolbar").width(); } if(offset.top > $(window).height()/2) { offset.top -= $("#side-toolbar").height(); } $("#side-toolbar").adjustPosition(offset); } else if("" == sPos) { var offset = { left: $(window).width() - 38, top: $(window).height()/2 - 60 }; $("#side-toolbar").adjustPosition(offset); } } function saveToolbarPos() { var offset = $("#side-toolbar").offset(); offset.left = offset.left - $(window).scrollLeft(); offset.top = offset.top - $(window).scrollTop(); offset = $("#side-toolbar").adjustPosition(offset); if(!hadConfig()) { showBottomTip("到&#8220;<a href='/p/options.html' target='_blank'>界面配置</a>&#8221;" + "开启相关选项&#65292;既可&#12304;自动保存&#12305;工具条的位置", 10000); return; } var mapConfig = loadConfig(); if(mapConfig["side-toolbar.show"]!="true" || mapConfig["side-toolbar.drag"]!="true") { return; } (offset.left > $(window).width()/2) && (offset.left += $("#side-toolbar").width()); (offset.top > $(window).height()/2) && (offset.top += $("#side-toolbar").height()); offset.left = Math.round(offset.left / $(window).width() * RATIO_NUM); offset.top = Math.round(offset.top / $(window).height() * RATIO_NUM); mapConfig["side-toolbar.drag-pos"] = offset.left+"_"+offset.top; if(saveConfig(mapConfig)) { showBottomTip("已经把工具条的位置保存到 cookie 中&#12290;", 3000); } else { showBottomTip("&#12304;无法&#12305;保存工具条的位置到 cookie 中&#65281;请检查你的浏览器设置&#12290;", 5000); } } function initToolbar(mapConfig) { if(mapConfig["side-toolbar.show"] != "true") { return; } $("#side-toolbar .go-options").show(); if("true" == mapConfig["side-toolbar.drag"]) { $("#side-toolbar").draggable({ cancel: "a", cursor: "move", start: function(event, ui) { $("#side-toolbar").css("margin-left", "0px"); $("#side-toolbar").css("margin-top", "0px"); }, stop: function(event, ui) { saveToolbarPos() } }); if(hadConfig()) { $("#side-toolbar").hover( function() { $("#side-toolbar .drag").show(); var offset = $("#side-toolbar").offset(); offset.left = offset.left - $(window).scrollLeft(); offset.top = offset.top - $(window).scrollTop() - 32; $("#side-toolbar").adjustPosition(offset); }, function() { $("#side-toolbar .drag").hide(); var offset = $("#side-toolbar").offset(); offset.left = offset.left - $(window).scrollLeft(); offset.top = offset.top - $(window).scrollTop() + 32; $("#side-toolbar").adjustPosition(offset); } ); } else { $("#side-toolbar .drag").show(); } } $(window).resize( function(event) { delayRun(function() { loadToolbarPos() }, 300) } ); $(window).trigger("resize"); // trick $("#side-toolbar").css("visibility", "visible"); } // initToolbar() end function init() { var mapConfig = loadConfig(); // Apply font size $(".post").css("font-size", mapConfig["article.font-size"]+"%"); $("#comments").css("font-size", mapConfig["comments.font-size"]+"%"); $("#tweets").css("font-size", mapConfig["tweets.font-size"]+"%"); initArticleMaxMinBox(); initToolbar(mapConfig); initArticleInnerLinks(mapConfig); initArticleInternalLinks(); $(document).tooltip({ content: Tooltip.content, open: function(event, ui) { Tooltip.open(event, ui, 3000); } }); } $(document).ready( function() { try { init(); } catch(err) { reportError("init: Catch exception:\n" + err); } } ); }); </script> <style type="text/css"> /*--@ jQueryUI font @--*/ .ui-widget { font: 100% "Trebuchet MS",verdana,sans-serif !important; } .ui-widget .ui-widget { font: 90% "Trebuchet MS",verdana,sans-serif !important; } /*--@ jQueryUI tooltip @--*/ .ui-tooltip { background: LightYellow !important; border-radius: 15px !important; font-size: 100% !important; max-width: 640px !important; } /*--@ jQueryUI progressbar @--*/ .ui-progressbar { position: relative; } /*--@ post-body @--*/ .post-body img { max-width: 100%; } /*--@ Toolbar on right side @--*/ #side-toolbar { display: none; visibility: hidden; background-color: LightGray; border: 1px solid SlateGray; z-index: 1024; position: fixed; top: 50%; margin-top: -60px; left: 100%; margin-left: -38px; width: 38px; height: auto; padding: 3px; font-size: 15px; } #side-toolbar div { width: 32px; height: 32px; border: none; margin: 0px; padding: 0px; } #side-toolbar .go-comments { text-align: center; background: url(https://lh5.googleusercontent.com/xG1s7ZZY2PP5W-Mm6TpxZylaN0HaP1xTFXiz64rbmmdPeHvKcAOfFAjVNA5NsX-ku3MKFiqwWO8jPdz0hK04ADiABoeOjvZD2AlOsSN6bczTigCJznEFvMNY3VwceQ9nBASw9Owzy3c) no-repeat scroll 0px 0px transparent; } #side-toolbar .go-comments a, #side-toolbar .go-comments a:link, #side-toolbar .go-comments a:visited { text-decoration: none; color: Fuchsia; line-height: 24px; font-size: 10px; } .post-toolbar-1 .post-config-buttons a { margin: 0px 3px; } </style> <noscript> <style type="text/css"> /*--@ Toolbar on right side @--*/ #side-toolbar { visibility: visible !important; } #side-toolbar .go-comments .comment-number:after { line-height: 24px; font-size: 10px; } </style> </noscript> <div id="side-toolbar"> <div class="drag" style="display:none;cursor:move;"> <img title="拖拽到你满意的位置" alt="拖拽" src="https://lh3.googleusercontent.com/Ao1nzEFjyJHvcUmsWbHrA4wCpy6jz5ea6T-j0O2rLbr_LaqZ6UtXPx36-JtgYUz6S7CejD2BAJY7bV2I4Rn_iPD1pq6cxU1CSpcTt5eo6OdgVF4TiNUNvHwZHnLA1mSSG7GZdRp0WWI"/> </div> <div class="go-home"> <a href="https://program-think.blogspot.com/" title="跳转到俺博客主页"><img alt="主页" src="https://lh6.googleusercontent.com/mQxa9WeERZzfc8I-kvgOf3n7ceDisEYYp_GK_LiDvZ5FuSw6165t5NTl6_7wgOVk6LJbLr-AH_9CBihA9V6t3-JrXkYKDQK29hXIua0DRCaaUqWZ2fpvgmqHtZo49KEN4tc_dHr6QzU"/></a> </div> <div class="go-article"> <a href="#article" title="跳转到正文区"><img alt="正文" src="https://lh3.googleusercontent.com/yYGW5VnTM60ivH7IdwG9oLwhQMQhjHnX3Z9ElUFV0hVBP5dtMCuxhf_ZYZdiUGqUXBgjrJRMNhfr-iLvioTSlOz0lvtGWIbRtLA_g0EAl8STcqXQeIUhMTNjmRevm098GssKDM0Qa5E"/></a> </div> <div class="go-comments"> <a class="comment-number" href="#comments" title="跳转到评论区"></a> </div> <div class="go-tweets"> <a href="#tweets" title="跳转到最新评论区"><img alt="最新" src="https://lh6.googleusercontent.com/MT0qhZfYk3XKrVisglHHNFnUNP9lQ2m4prj4bQ98vaAOqzrtrkUlvZguYvwbeIDk4mHKY_Q9uRHOGw_eYWFuRReQl9_jvyWieMt7ATakByxRXtj40ihWro38VoTXSQCssWQ0zZEha2U"/></a> </div> <div class="go-options" style="display:none;"> <a href="/p/options.html" target="_blank" title="跳转到界面配置"><img alt="配置" src="https://lh5.googleusercontent.com/0x2IO713ZAWAhuqV2krwhjRydPOZgZ4Ura1l-5ghT9g9KpQ85qboSCNuo11J0xLI8QXb5NYVeqbtq7bWMewyChtuF-SsQzdi77lJwHUucsP-VGtahC3dbP8IfrexanTYs-8gioX-xLQ"/></a> </div> </div> <!-- side-toolbar --> </div> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=HTML&widgetId=HTML2&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("HTML2"));' rel='nofollow' target='configHTML2' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div><div class='widget HTML' data-version='1' id='HTML3'> <div class='widget-content'> <img src="https://lh4.googleusercontent.com/-Wxl9HaDj1-I/SYPJWMNM65I/AAAAAAAAAcc/FjINutqB9_I/ThinkerSmall.jpg" alt="编程随想"/><br/> <br/> <a href="https://program-think.blogspot.com/" target="_blank">博客主站点 (BlogSpot)</a><br/> <a href="mailto:program.think@gmail.com" target="_blank">俺的邮箱 (Gmail)</a><br/> <a href="https://github.com/programthink" target="_blank">俺的收藏 (GitHub)</a><br/> <a href="https://twitter.com/programthink" target="_blank">俺的推特 (@programthink)</a><br/> <br/> <h2 class="title">博客订阅网址</h2> <a href="https://feeds2.feedburner.com/programthink" target="_blank" title="RSS 订阅"><img src="https://lh5.googleusercontent.com/-6oleSG-DCYU/SZ5PE7w1kgI/AAAAAAAAAao/MTZz9nhJ2Dw/feed-icon-animated.gif" border="0" alt="RSS 订阅网址"/></a>&#12288;&#12288;<a href="https://program-think.blogspot.com/2013/06/email-subscription.html" title="邮件订阅"><img src="https://lh6.googleusercontent.com/-aq_Tc06jlUM/UcMcVsTB6xI/AAAAAAAAAk8/wSTQfl9ytCQ/email-icon.png" border="0" alt="邮件订阅网址"/></a><br/> <br/> <h2 class="title">&#12304;免翻墙&#12305;的资源</h2> <b>博客打包下载&#65288;用于离线浏览&#65289;</b><br/> BTSync 同步密钥&#65306;&#65288;<a href="https://program-think.blogspot.com/2015/03/blog-sync.html" title="提供&#8220;离线浏览功能&#8221;&#65292;可一键生成 EPUB 或 CHM 电子书">使用说明</a>&#65289;<br/> B7P64IMWOCXWEYOXIMBX6HN5MHEULFS4V<br/> <br/> <b>俺分享的各类电子书</b><br/> <a href="https://github.com/programthink/books" target="_blank">电子书清单</a>&#65288;含&#8220;BTSync&#8221;与&#8220;微软网盘&#8221;两种下载链接&#65289;<br/> <br/> <b>曝光天朝权贵</b><br/> <a href="https://github.com/programthink/zhao" target="_blank">太子党关系网络</a><br/> <br/> <h2 class="title">博客主要内容</h2> <ul> <li>提升思维能力</li> <li>普及政治常识</li> <li>扫盲翻墙姿势</li> <li>揭露党国嘴脸</li> <li>网络安全教程</li> <li>软件开发技术</li> </ul> </div> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=HTML&widgetId=HTML3&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("HTML3"));' rel='nofollow' target='configHTML3' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div><div class='widget LinkList' data-version='1' id='LinkList2'> <h2>推荐帖子&#65288;翻墙技术&#65289;</h2> <div class='widget-content'> <ul> <li><a href='https://program-think.blogspot.com/2009/05/how-to-break-through-gfw.html'>如何翻墙&#65288;全方位入门扫盲&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2011/09/gfw-faq.html'>常见翻墙问题答疑</a></li> <li><a href='https://program-think.blogspot.com/2011/03/how-to-get-gfw-tools.html'>获取翻墙软件方法大全</a></li> <li><a href='https://program-think.blogspot.com/2013/01/cross-host-use-gfw-tool.html'>多台电脑如何共享翻墙通道</a></li> <li><a href='https://program-think.blogspot.com/2013/11/tor-faq.html'>关于 TOR 的常见问题解答</a></li> <li><a href='https://program-think.blogspot.com/2009/07/break-through-berlin-wall.html'>学习一下德国人民的翻墙精神</a></li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=LinkList&widgetId=LinkList2&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("LinkList2"));' rel='nofollow' target='configLinkList2' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget LinkList' data-version='1' id='LinkList6'> <h2>推荐帖子&#65288;信息安全&#65289;</h2> <div class='widget-content'> <ul> <li><a href='https://program-think.blogspot.com/2019/01/Security-Guide-for-Political-Activists.html'>为啥朝廷总抓不到俺&#8212;&#8212;十年反党活动的安全经验汇总</a></li> <li><a href='https://program-think.blogspot.com/2015/08/Technology-and-Freedom.html'>&#8220;对抗专制&#12289;捍卫自由&#8221;的 N 种技术力量</a></li> <li><a href='https://program-think.blogspot.com/2010/06/howto-prevent-hacker-attack-0.html'>如何防止黑客入侵&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2013/06/privacy-protection-0.html'>如何保护隐私&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2010/04/howto-cover-your-tracks-0.html'>如何隐藏你的踪迹&#65292;避免跨省追捕&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2012/10/system-vm-0.html'>扫盲操作系统虚拟机 (系列)</a></li> <li><a href='https://program-think.blogspot.com/2015/10/VeraCrypt.html'>扫盲 VeraCrypt&#8212;&#8212;跨平台的 TrueCrypt 替代品</a></li> <li><a href='https://program-think.blogspot.com/2011/05/recommend-truecrypt.html#index'>TrueCrypt 的扫盲教程和高级教程&#65288;VeraCrypt 也适用&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2011/05/file-encryption-overview.html'>文件加密的扫盲介绍</a></li> <li><a href='https://program-think.blogspot.com/2013/07/online-backup-virtual-encrypted-disk.html'>文件备份技巧&#65306;组合&#8220;虚拟加密盘&#8221;与&#8220;网盘&#8221;</a></li> <li><a href='https://program-think.blogspot.com/2013/02/file-integrity-check.html'>扫盲文件完整性校验&#8212;&#8212;关于散列值和数字签名</a></li> <li><a href='https://program-think.blogspot.com/2009/05/social-engineering-0-overview.html'>扫盲&#8220;社会工程学&#8221;&#65288;系列&#65289;</a></li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=LinkList&widgetId=LinkList6&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("LinkList6"));' rel='nofollow' target='configLinkList6' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget LinkList' data-version='1' id='LinkList3'> <h2>推荐帖子&#65288;提升个人能力&#65289;</h2> <div class='widget-content'> <ul> <li><a href='https://program-think.blogspot.com/2019/10/Systematic-Learning.html'>如何&#12304;系统性学习&#12305;&#8212;&#8212;从&#8220;媒介形态&#8221;聊到&#8220;DIKW 模型&#8221;</a></li> <li><a href='https://program-think.blogspot.com/2013/09/knowledge-structure.html'>如何完善自己的知识结构</a></li> <li><a href='https://program-think.blogspot.com/2013/04/how-to-read-book.html'>&#12298;如何阅读一本书&#12299;&#8212;&#8212;书评及内容纲要</a></li> <li><a href='https://program-think.blogspot.com/2015/12/Hobbies-and-Interests.html'>什么是&#12304;真正的&#12305;兴趣爱好&#65311;以及它有啥好处&#65311;</a></li> <li><a href='https://program-think.blogspot.com/2009/02/study-technology-in-three-steps.html'>学习技术的三部曲&#65306;WHAT&#12289;HOW&#12289;WHY</a></li> <li><a href='https://program-think.blogspot.com/2012/03/think-what-how-why.html'>用提问促进思维&#8212;&#8212;再谈 WHAT HOW WHY 三部曲</a></li> <li><a href='https://program-think.blogspot.com/2015/06/The-Mythical-Theories-of-Success.html'>成功学批判&#8212;&#8212;简述其危害性及各种谬误</a></li> <li><a href='https://program-think.blogspot.com/2018/12/Book-Review-Antifragile-Things-That-Gain-from-Disorder.html'>读书笔记&#65306;&#12298;反脆弱&#8212;&#8212;从不确定性中获益&#12299;</a></li> <li><a href='https://program-think.blogspot.com/2009/07/book-review-are-your-lights-on.html'>书评&#65306;&#12298;你的灯亮着吗&#65311;&#8212;&#8212;找到问题的真正所在&#12299;</a></li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=LinkList&widgetId=LinkList3&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("LinkList3"));' rel='nofollow' target='configLinkList3' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget LinkList' data-version='1' id='LinkList7'> <h2>推荐帖子&#65288;洗脑与反洗脑&#65289;</h2> <div class='widget-content'> <ul> <li><a href='https://program-think.blogspot.com/2014/02/brainwash-and-idiot.html'>聊聊洗脑和脑残&#8212;&#8212;分析&#8220;脑残的起源&#8221;和&#8220;脑残的觉醒&#8221;</a></li> <li><a href='https://program-think.blogspot.com/2013/05/difference-between-fact-and-opinion.html'>批判性思维扫盲&#8212;&#8212;学会区分&#8220;事实&#8221;与&#8220;观点&#8221;</a></li> <li><a href='https://program-think.blogspot.com/2011/03/logical-fallacies.html'>扫盲逻辑谬误&#8212;&#8212;以五毛言论为反面教材</a></li> <li><a href='https://program-think.blogspot.com/2014/12/brainwash-using-real-data.html'>比&#8220;欺骗&#8221;更狡猾的洗脑&#8212;&#8212;基于&#12304;真实数据&#12305;进行忽悠</a></li> <li><a href='https://program-think.blogspot.com/2014/01/doublethink.html'>比&#8220;欺骗&#8221;更有效的洗脑&#8212;&#8212;基于&#12304;双重思想&#12305;的思维控制</a></li> <li><a href='https://program-think.blogspot.com/2014/01/anti-brainwashing-and-enlightenment.html'>如何用互联网进行&#8220;反洗脑&#8221;和&#8220;政治启蒙&#8221;</a></li> <li><a href='https://program-think.blogspot.com/2010/10/book-review-asking-right-questions.html'>书评&#65306;&#12298;学会提问&#8212;&#8212;批判性思维指南&#12299;</a></li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=LinkList&widgetId=LinkList7&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("LinkList7"));' rel='nofollow' target='configLinkList7' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget LinkList' data-version='1' id='LinkList8'> <h2>推荐帖子&#65288;心理学&#65289;</h2> <div class='widget-content'> <ul> <li><a href='https://program-think.blogspot.com/2019/03/Why-Thinking-Hard-So-Hard.html'>为什么独立思考这么难&#8212;&#8212;谈谈心理学的成因&#65292;并分享俺的经验</a></li> <li><a href='https://program-think.blogspot.com/2014/05/fans-and-idolatry.html'>不要成为&#8220;粉丝&#8221;&#8212;&#8212;谈谈&#8220;偶像崇拜&#8221;的成因和危害</a></li> <li><a href='https://program-think.blogspot.com/2012/12/emperor-complex.html'>天朝民众的心理分析&#65306;圣君情结</a></li> <li><a href='https://program-think.blogspot.com/2012/06/stockholm-syndrome.html'>天朝民众的心理分析&#65306;斯德哥尔摩综合症</a></li> <li><a href='https://program-think.blogspot.com/2014/09/oversimplification.html'>各种&#12304;一元化思维&#12305;的谬误&#8212;&#8212;从&#8220;星座理论&#8221;到&#8220;共产主义社会&#8221;</a></li> <li><a href='https://program-think.blogspot.com/2015/05/Survivorship-Bias.html'>思维的误区&#65306;幸存者偏见&#8212;&#8212;顺便推荐巴菲特最著名的演讲</a></li> <li><a href='https://program-think.blogspot.com/2014/06/sunk-cost-fallacy-and-loss-aversion.html'>思维的误区&#65306;从&#8220;沉没成本谬误&#8221;到&#8220;损失厌恶情结&#8221;</a></li> <li><a href='https://program-think.blogspot.com/2010/02/about-mental-model.html'>认识你自己&#8212;&#8212;有关心智模式的扫盲介绍</a></li> <li><a href='https://program-think.blogspot.com/2010/04/how-to-attribute-success-failure.html'>你是如何看待&#12304;成败&#12305;的&#65311;&#8212;&#8212;兼谈&#12304;有效归因&#12305;</a></li> <li><a href='https://program-think.blogspot.com/2012/01/stockdale-paradox.html'>如何面对&#12304;逆境&#12305;&#65311;&#8212;&#8212;兼谈&#8220;斯托克戴尔悖论&#8221;</a></li> <li><a href='https://program-think.blogspot.com/2012/06/book-review-road-less-traveled.html'>书评&#65306;&#12298;少有人走的路&#8212;&#8212;心智成熟的旅程&#12299;</a></li> <li><a href='https://program-think.blogspot.com/2009/05/halo-effect.html'>光环效应引发的认知误区</a></li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=LinkList&widgetId=LinkList8&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("LinkList8"));' rel='nofollow' target='configLinkList8' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget LinkList' data-version='1' id='LinkList5'> <h2>推荐帖子&#65288;政治&#65289;</h2> <div class='widget-content'> <ul> <li><a href='https://program-think.blogspot.com/2018/09/Book-Review-The-Errors-of-Marxism-Leninism.html'>为什么马克思是错的&#8212;&#8212;全面批判马列主义的知名著作导读</a></li> <li><a href='https://program-think.blogspot.com/2020/04/Government-and-System-Robustness.html'>&#8220;政治体制&#8221;与&#8220;系统健壮性&#8221;&#8212;&#8212;基于&#8220;复杂性科学&#8221;的思考</a></li> <li><a href='https://program-think.blogspot.com/2011/06/june-fourth-incident-0.html'>回顾&#8220;六四&#8221;&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2011/12/revolution-0.html'>谈革命&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2018/07/Forty-Years-of-China-USA-Relations.html'>从量变到质变&#8212;&#8212;中美关系40年</a></li> <li><a href='https://program-think.blogspot.com/2018/08/USA-Containment-Strategies-in-Cold-War.html'>苏联是如何被慢慢勒死的&#65311;&#8212;&#8212;聊聊冷战中美国的遏制战略</a></li> <li><a href='https://program-think.blogspot.com/2015/01/Communism-Nazism-Caesaropapism.html'>人类自由的三大死敌&#8212;&#8212;谈谈&#8220;共产运动&#12289;纳粹主义&#12289;政教合一&#8221;的共性</a></li> <li><a href='https://program-think.blogspot.com/2013/12/political-concepts-state-citizenship-etc.html'>政治常识扫盲&#65306;理清&#8220;国家&#12289;政体&#12289;公民&#12289;政府&#12289;政党&#8221;等概念</a></li> <li><a href='https://program-think.blogspot.com/2014/02/freedom-of-speech.html'>政治常识扫盲&#65306;澄清&#8220;言论自由&#8221;的各种误区</a></li> <li><a href='https://program-think.blogspot.com/2012/07/form-of-government.html'>扫盲常见的政治体制</a></li> <li><a href='https://program-think.blogspot.com/2016/06/USA-Separation-of-Powers-with-Balances.html'>聊聊美国政体中的权力制衡&#8212;&#8212;不仅仅是三权分立</a></li> <li><a href='https://program-think.blogspot.com/2016/11/USA-Elections.html'>美国选举制度为啥这样设计&#65311;&#8212;&#8212;兼谈其历史演变</a></li> <li><a href='https://program-think.blogspot.com/2010/11/institutionalize.html'>谈谈体制化&#65292;并推荐&#12298;肖申克的救赎&#12299;</a></li> <li><a href='https://program-think.blogspot.com/2013/04/more-supervision-less-thankfulness.html'>对政府&#8212;&#8212;多些&#8220;监督问责&#8221;&#65292;少些&#8220;煽情感动&#8221;</a></li> <li><a href='https://program-think.blogspot.com/2012/03/national-people-congress.html'>看看全国人大代表都是啥货色&#8212;&#8212;兼谈&#8220;议会道路的改良&#8221;行不通</a></li> <li><a href='https://program-think.blogspot.com/2012/10/history-of-red-khmers.html'>最&#8220;纯正&#8221;的共产主义政权&#8212;&#8212;红色高棉简史</a></li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=LinkList&widgetId=LinkList5&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("LinkList5"));' rel='nofollow' target='configLinkList5' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget LinkList' data-version='1' id='LinkList9'> <h2>推荐帖子&#65288;历史&#65289;</h2> <div class='widget-content'> <ul> <li><a href='https://program-think.blogspot.com/2019/11/Brief-History-of-the-Berlin-Wall.html'>美苏冷战的缩影&#8212;&#8212;柏林墙简史</a></li> <li><a href='https://program-think.blogspot.com/2014/07/artists-and-ccp.html'>面对共产党&#8212;&#8212;民国人文大师的众生相</a></li> <li><a href='https://program-think.blogspot.com/2012/05/three-years-famine-0.html'>谈谈三年大饥荒&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2016/01/Taiwan-Political-Movements.html'>台湾民主运动与独立运动简史</a></li> <li><a href='https://program-think.blogspot.com/2010/09/censorship-of-images.html'>看看真理部是如何 PS 照片的</a></li> <li><a href='https://program-think.blogspot.com/2013/08/korean-war.html'>谈谈真理部对朝鲜战争的忽悠</a></li> <li><a href='https://program-think.blogspot.com/2010/09/sino-japanese-war.html'>谈谈真理部对抗战历史的篡改</a></li> <li><a href='https://program-think.blogspot.com/2014/04/history-china-fallen-behind-europe.html'>中国是从哪个朝代开始落后于西方&#65311;</a></li> <li><a href='https://program-think.blogspot.com/2011/03/ccp-vs-japanese.html'>谁是最可恨的人&#65311;&#8212;&#8212;写给仇日愤青们</a></li> <li><a href='https://program-think.blogspot.com/2015/11/Why-Islam-Is-Different-from-Other-Religions.html'>伊斯兰教为何如此奇葩&#65311;</a></li> <li><a href='https://program-think.blogspot.com/2015/01/Islamic-Extremism.html'>伊斯兰教极端主义溯源</a></li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=LinkList&widgetId=LinkList9&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("LinkList9"));' rel='nofollow' target='configLinkList9' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget LinkList' data-version='1' id='LinkList1'> <h2>推荐帖子&#65288;编程技术&#65289;</h2> <div class='widget-content'> <ul> <li><a href='https://program-think.blogspot.com/2012/05/weekly-share-5.html'>学习编程语言的3篇好文章</a></li> <li><a href='https://program-think.blogspot.com/2009/08/why-choose-python-0-overview.html'>为什么俺推荐 Python&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2009/03/producer-consumer-pattern-0-overview.html'>架构设计&#65306;生产者/消费者模式</a></li> <li><a href='https://program-think.blogspot.com/2009/02/multi-process-vs-multi-thread.html'>架构设计&#65306;进程还是线程&#65311;</a></li> <li><a href='https://program-think.blogspot.com/2009/02/how-to-choose-opensource-project.html'>如何选择开源项目&#65311;</a></li> <li><a href='https://program-think.blogspot.com/2009/02/cxx-object-destroy-overview.html'>C++ 对象是怎么死的&#65311;&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2009/01/cxx-cross-platform-develop-0-overview.html'>C++ 的移植性和跨平台开发&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2009/03/java-performance-tuning-0-overview.html'>Java 性能优化&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2009/01/defect-of-java-beginner-0-overview.html'>Java 新手的通病&#65288;系列&#65289;</a></li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=LinkList&widgetId=LinkList1&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("LinkList1"));' rel='nofollow' target='configLinkList1' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget LinkList' data-version='1' id='LinkList4'> <h2>推荐帖子&#65288;职场与管理&#65289;</h2> <div class='widget-content'> <ul> <li><a href='https://program-think.blogspot.com/2019/12/Time-and-Life.html'>时间与人生&#8212;&#8212;跨入本世纪20年代的随想</a></li> <li><a href='https://program-think.blogspot.com/2018/06/weekly-share-121.html'>德鲁克谈&#12304;自我管理&#12305;&#8212;&#8212;&#12298;哈佛商业评论&#12299;最受欢迎的文章</a></li> <li><a href='https://program-think.blogspot.com/2011/03/hiring-experience-0.html'>俺的招聘经验&#65288;系列&#65289;</a></li> <li><a href='https://program-think.blogspot.com/2009/04/defect-of-hire.html'>招聘的误区</a></li> <li><a href='https://program-think.blogspot.com/2016/04/Andy-Grove-Quotes-on-Leadership.html'>硅谷 CEO 们的教父&#8212;&#8212;分享安迪&#183;格鲁夫的管理经验</a></li> <li><a href='https://program-think.blogspot.com/2009/01/0.html'>如何成为优秀开发人员&#65288;系列&#65289;</a></li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=LinkList&widgetId=LinkList4&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("LinkList4"));' rel='nofollow' target='configLinkList4' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget HTML' data-version='1' id='HTML7'> <h2 class='title'>博客站内搜索</h2> <div class='widget-content'> <form action="https://program-think.blogspot.com/p/search.html" method="GET" target="_blank"> <input type="text" name="q" size="32" maxlength="64" title="请输入搜索关键词" value="" /> <input type="submit" value="搜索" /> </form><br/> </div> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=HTML&widgetId=HTML7&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("HTML7"));' rel='nofollow' target='configHTML7' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div><div class='widget Label' data-version='1' id='Label1'> <h2>分类标签</h2> <div class='widget-content list-label-widget-content'> <ul> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B'>编程</a> <span dir='ltr'>(69)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B.%E5%A4%9A%E7%BA%BF%E7%A8%8B'>编程.多线程</a> <span dir='ltr'>(6)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B.%E6%9E%B6%E6%9E%84'>编程.架构</a> <span dir='ltr'>(7)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B.%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE'>编程.开源项目</a> <span dir='ltr'>(10)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B.%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B'>编程.软件工程</a> <span dir='ltr'>(13)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B.%E7%AE%97%E6%B3%95'>编程.算法</a> <span dir='ltr'>(3)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B.%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96'>编程.性能优化</a> <span dir='ltr'>(6)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B.C'>编程.C</a> <span dir='ltr'>(15)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B.Java'>编程.Java</a> <span dir='ltr'>(12)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BC%96%E7%A8%8B.Python'>编程.Python</a> <span dir='ltr'>(8)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E5%8D%9A%E5%AE%A2%E9%80%9A%E5%91%8A'>博客通告</a> <span dir='ltr'>(33)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%AE%A1%E7%90%86'>管理</a> <span dir='ltr'>(16)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%8E%AF%E4%BF%9D'>环保</a> <span dir='ltr'>(13)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%95%99%E8%82%B2'>教育</a> <span dir='ltr'>(6)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%BB%8F%E6%B5%8E'>经济</a> <span dir='ltr'>(42)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E5%86%9B%E4%BA%8B'>军事</a> <span dir='ltr'>(17)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E7%A7%91%E6%99%AE'>科普</a> <span dir='ltr'>(5)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E5%8E%86%E5%8F%B2'>历史</a> <span dir='ltr'>(81)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%97%B6%E4%BA%8B%E8%AF%84%E8%AE%BA'>时事评论</a> <span dir='ltr'>(165)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E4%B9%A6%E8%AF%84%2F%E5%BD%B1%E8%AF%84'>书评/影评</a> <span dir='ltr'>(54)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E5%A4%96%E4%BA%A4'>外交</a> <span dir='ltr'>(22)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E5%BF%83%E7%90%86%E5%AD%A6'>心理学</a> <span dir='ltr'>(30)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E5%AD%A6%E4%BC%9A%E6%80%9D%E8%80%83'>学会思考</a> <span dir='ltr'>(23)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E5%AD%A6%E4%B9%A0%E6%96%B9%E6%B3%95'>学习方法</a> <span dir='ltr'>(13)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%94%BF%E6%B2%BB'>政治</a> <span dir='ltr'>(269)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%94%BF%E6%B2%BB.%E5%85%AB%E5%8D%A6'>政治.八卦</a> <span dir='ltr'>(19)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%94%BF%E6%B2%BB.%E5%B8%B8%E8%AF%86'>政治.常识</a> <span dir='ltr'>(22)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%94%BF%E6%B2%BB.%E6%B3%95%E5%88%B6'>政治.法制</a> <span dir='ltr'>(20)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%94%BF%E6%B2%BB.%E8%85%90%E8%B4%A5'>政治.腐败</a> <span dir='ltr'>(25)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%94%BF%E6%B2%BB.%E5%85%B1%E4%BA%A7%E8%BF%90%E5%8A%A8'>政治.共产运动</a> <span dir='ltr'>(12)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%94%BF%E6%B2%BB.%E6%9D%83%E8%B4%B5'>政治.权贵</a> <span dir='ltr'>(27)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E6%94%BF%E6%B2%BB.%E7%9C%9F%E7%90%86%E9%83%A8'>政治.真理部</a> <span dir='ltr'>(37)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E8%81%8C%E5%9C%BA%E7%82%B9%E6%BB%B4'>职场点滴</a> <span dir='ltr'>(21)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/%E8%BD%AC%E8%BD%BD'>转载</a> <span dir='ltr'>(146)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/IT'>IT</a> <span dir='ltr'>(198)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/IT.%E7%BF%BB%E5%A2%99'>IT.翻墙</a> <span dir='ltr'>(48)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/IT.%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD'>IT.人工智能</a> <span dir='ltr'>(3)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/IT.%E8%BD%AF%E4%BB%B6%E4%BB%8B%E7%BB%8D'>IT.软件介绍</a> <span dir='ltr'>(48)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/IT.%E4%BF%A1%E6%81%AF%E5%AE%89%E5%85%A8'>IT.信息安全</a> <span dir='ltr'>(95)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/IT.%E4%B8%9A%E7%95%8C%E8%AF%84%E8%AE%BA'>IT.业界评论</a> <span dir='ltr'>(15)</span> </li> <li> <a dir='ltr' href='https://program-think.blogspot.com/search/label/IT.Linux'>IT.Linux</a> <span dir='ltr'>(6)</span> </li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=Label&widgetId=Label1&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("Label1"));' rel='nofollow' target='configLabel1' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget PopularPosts' data-version='1' id='PopularPosts1'> <h2>最近30天热帖</h2> <div class='widget-content popular-posts'> <ul> <li> <a href='https://program-think.blogspot.com/2020/07/Security-News.html'>近期安全动态和点评&#65288;2020年2季度&#65289;</a> </li> <li> <a href='https://program-think.blogspot.com/2020/07/june-fourth-incident-34.html'>回顾六四系列[34]&#65306; 5月17日&#65292;&#8220;戒严令&#8221;出笼的经过</a> </li> <li> <a href='https://program-think.blogspot.com/2020/06/weekly-share-145.html'>每周转载&#65306;超级富豪王振华性侵9岁女童&#65288;大量网友评论&#65292;多图&#65289;</a> </li> <li> <a href='https://program-think.blogspot.com/2019/01/Security-Guide-for-Political-Activists.html'>为啥朝廷总抓不到俺&#8212;&#8212;十年反党活动的安全经验汇总</a> </li> <li> <a href='https://program-think.blogspot.com/2011/06/june-fourth-incident-0.html'>回顾六四系列[0]&#65306;为啥要写这个话题&#65311;</a> </li> <li> <a href='https://program-think.blogspot.com/2020/06/Common-Law.html'>如何理解&#8220;英美法系&#8221;&#65288;普通法系&#65289;&#8212;&#8212;从&#8220;英国古代史&#8221;聊到&#8220;香港国安法&#8221;</a> </li> <li> <a href='https://program-think.blogspot.com/2020/05/weekly-share-144.html'>每周转载&#65306;朝廷推香港版&#12298;国安法&#12299;&#65292;&#12304;一国一制&#12305;降临&#65288;外媒报道8篇&#65289;</a> </li> <li> <a href='https://program-think.blogspot.com/2020/05/Nuclear-Strategy-and-New-Cold-War.html'>聊聊&#8220;核战略的博弈模型&#8221;与&#8220;中美新冷战&#8221;</a> </li> <li> <a href='https://program-think.blogspot.com/2020/06/Linux-Logical-Volume-Manager.html'>扫盲 Linux 逻辑卷管理&#65288;LVM&#65289;&#8212;&#8212;兼谈 RAID 以及&#8220;磁盘加密工具的整合&#8221;</a> </li> <li> <a href='https://program-think.blogspot.com/2010/04/howto-cover-your-tracks-0.html'>如何隐藏你的踪迹&#65292;避免跨省追捕[0]&#65306;为啥要写此文&#65311;</a> </li> </ul> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=PopularPosts&widgetId=PopularPosts1&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("PopularPosts1"));' rel='nofollow' target='configPopularPosts1' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget BlogArchive' data-version='1' id='BlogArchive2'> <h2>历史归档</h2> <div class='widget-content'> <div id='ArchiveList'> <div id='BlogArchive2_ArchiveList'> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2020/'> 2020 </a> <span class='post-count' dir='ltr'>(17)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2020/07/'> 七月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2020/06/'> 六月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2020/05/'> 五月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2020/04/'> 四月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2020/03/'> 三月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2020/02/'> 二月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2020/01/'> 一月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/'> 2019 </a> <span class='post-count' dir='ltr'>(39)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/10/'> 十月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/09/'> 九月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/08/'> 八月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/07/'> 七月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/06/'> 六月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/05/'> 五月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/04/'> 四月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/03/'> 三月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/02/'> 二月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2019/01/'> 一月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/'> 2018 </a> <span class='post-count' dir='ltr'>(31)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/10/'> 十月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/09/'> 九月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/08/'> 八月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/07/'> 七月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/06/'> 六月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/05/'> 五月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/04/'> 四月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/03/'> 三月 </a> <span class='post-count' dir='ltr'>(1)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/02/'> 二月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2018/01/'> 一月 </a> <span class='post-count' dir='ltr'>(1)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/'> 2017 </a> <span class='post-count' dir='ltr'>(34)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/10/'> 十月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/09/'> 九月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/08/'> 八月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/07/'> 七月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/06/'> 六月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/05/'> 五月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/04/'> 四月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/03/'> 三月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/02/'> 二月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2017/01/'> 一月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/'> 2016 </a> <span class='post-count' dir='ltr'>(37)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/10/'> 十月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/09/'> 九月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/08/'> 八月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/07/'> 七月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/06/'> 六月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/05/'> 五月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/04/'> 四月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/03/'> 三月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/02/'> 二月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2016/01/'> 一月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/'> 2015 </a> <span class='post-count' dir='ltr'>(61)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/10/'> 十月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/09/'> 九月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/08/'> 八月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/07/'> 七月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/06/'> 六月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/05/'> 五月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/04/'> 四月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/03/'> 三月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/02/'> 二月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2015/01/'> 一月 </a> <span class='post-count' dir='ltr'>(8)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/'> 2014 </a> <span class='post-count' dir='ltr'>(76)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(8)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/10/'> 十月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/09/'> 九月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/08/'> 八月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/07/'> 七月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/06/'> 六月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/05/'> 五月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/04/'> 四月 </a> <span class='post-count' dir='ltr'>(7)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/03/'> 三月 </a> <span class='post-count' dir='ltr'>(7)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/02/'> 二月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2014/01/'> 一月 </a> <span class='post-count' dir='ltr'>(10)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/'> 2013 </a> <span class='post-count' dir='ltr'>(96)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(8)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(7)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/10/'> 十月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/09/'> 九月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/08/'> 八月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/07/'> 七月 </a> <span class='post-count' dir='ltr'>(7)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/06/'> 六月 </a> <span class='post-count' dir='ltr'>(10)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/05/'> 五月 </a> <span class='post-count' dir='ltr'>(10)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/04/'> 四月 </a> <span class='post-count' dir='ltr'>(10)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/03/'> 三月 </a> <span class='post-count' dir='ltr'>(11)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/02/'> 二月 </a> <span class='post-count' dir='ltr'>(8)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2013/01/'> 一月 </a> <span class='post-count' dir='ltr'>(11)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/'> 2012 </a> <span class='post-count' dir='ltr'>(109)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(13)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(10)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/10/'> 十月 </a> <span class='post-count' dir='ltr'>(11)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/09/'> 九月 </a> <span class='post-count' dir='ltr'>(10)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/08/'> 八月 </a> <span class='post-count' dir='ltr'>(9)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/07/'> 七月 </a> <span class='post-count' dir='ltr'>(12)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/06/'> 六月 </a> <span class='post-count' dir='ltr'>(8)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/05/'> 五月 </a> <span class='post-count' dir='ltr'>(10)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/04/'> 四月 </a> <span class='post-count' dir='ltr'>(9)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/03/'> 三月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/02/'> 二月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2012/01/'> 一月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate expanded'> <a class='toggle' href='javascript:void(0)'> <span class='zippy toggle-open'> &#9660;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/'> 2011 </a> <span class='post-count' dir='ltr'>(58)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(9)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/10/'> 十月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/09/'> 九月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/08/'> 八月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/07/'> 七月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/06/'> 六月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate expanded'> <a class='toggle' href='javascript:void(0)'> <span class='zippy toggle-open'> &#9660;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/05/'> 五月 </a> <span class='post-count' dir='ltr'>(6)</span> <ul class='posts'> <li><a href='https://program-think.blogspot.com/2011/05/use-image-hide-gfw-tool.html'>&#8220;如何翻墙&#8221;系列&#65306;用图片传播翻墙软件</a></li> <li><a href='https://program-think.blogspot.com/2011/05/through-gfw-with-skype.html'>&#8220;如何翻墙&#8221;系列&#65306;基于 Skype 翻墙</a></li> <li><a href='https://program-think.blogspot.com/2011/05/recommend-truecrypt.html'>TrueCrypt&#8212;&#8212;文件加密的法宝</a></li> <li><a href='https://program-think.blogspot.com/2011/05/file-encryption-overview.html'>文件加密的扫盲介绍</a></li> <li><a href='https://program-think.blogspot.com/2011/05/usama-bin-laden.html'>关于本&#183;拉登的几个误区</a></li> <li><a href='https://program-think.blogspot.com/2011/05/hiring-experience-3.html'>俺的招聘经验[3]&#65306;开放性问题 vs 封闭性问题</a></li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/04/'> 四月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/03/'> 三月 </a> <span class='post-count' dir='ltr'>(9)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/02/'> 二月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2011/01/'> 一月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/'> 2010 </a> <span class='post-count' dir='ltr'>(40)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/10/'> 十月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/09/'> 九月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/08/'> 八月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/07/'> 七月 </a> <span class='post-count' dir='ltr'>(2)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/06/'> 六月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/05/'> 五月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/04/'> 四月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/03/'> 三月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/02/'> 二月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2010/01/'> 一月 </a> <span class='post-count' dir='ltr'>(1)</span> </li> </ul> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/'> 2009 </a> <span class='post-count' dir='ltr'>(93)</span> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/12/'> 十二月 </a> <span class='post-count' dir='ltr'>(1)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/11/'> 十一月 </a> <span class='post-count' dir='ltr'>(1)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/10/'> 十月 </a> <span class='post-count' dir='ltr'>(1)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/09/'> 九月 </a> <span class='post-count' dir='ltr'>(3)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/08/'> 八月 </a> <span class='post-count' dir='ltr'>(4)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/07/'> 七月 </a> <span class='post-count' dir='ltr'>(5)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/06/'> 六月 </a> <span class='post-count' dir='ltr'>(6)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/05/'> 五月 </a> <span class='post-count' dir='ltr'>(8)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/04/'> 四月 </a> <span class='post-count' dir='ltr'>(10)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/03/'> 三月 </a> <span class='post-count' dir='ltr'>(15)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/02/'> 二月 </a> <span class='post-count' dir='ltr'>(21)</span> </li> </ul> <ul class='hierarchy'> <li class='archivedate collapsed'> <a class='toggle' href='javascript:void(0)'> <span class='zippy'> &#9658;&#160; </span> </a> <a class='post-count-link' href='https://program-think.blogspot.com/2009/01/'> 一月 </a> <span class='post-count' dir='ltr'>(18)</span> </li> </ul> </li> </ul> </div> </div> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=BlogArchive&widgetId=BlogArchive2&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("BlogArchive2"));' rel='nofollow' target='configBlogArchive2' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div> </div><div class='widget HTML' data-version='1' id='HTML5'> <div class='widget-content'> <script defer type="text/javascript"> jQuery(function($) { // Module variables var m_mapComments = {}; var m_arrCommentId = []; var m_mapLongId = {}; var m_arrLevelInfo = []; var m_nLevelUpdateTime = 0; var m_sPostId = null; var m_sEditorUrl = null; var m_mapAuthors = {}; var m_nAuthorsUpdateTime = 0; var m_sMenuState = "reset"; var m_nLastActiveTime = 0; // anti spam attack var m_spamManual = new ManualAnalyzer(); var m_spamUser = new UserAnalyzer(); var m_spamTextGroup = new TextGroupAnalyzer(); var m_spamTextUrl = new UrlAnalyzer({ critical:10 }); var m_spamTextFeature = new TextFeatureAnalyzer(); var m_spamTimeGroup = new TimeGroupAnalyzer({ range:900, offset:300 }); var m_nTimeGroupCritical = 20; function getComment(nCommentId) { assert(typeof nCommentId === "number", "getComment: Invalid type of 'nCommentId': '" + nCommentId + "'"); assert(nCommentId in m_mapComments, "getComment: NOT found comment id: " + nCommentId); return m_mapComments[nCommentId]; } function eachCommentId(arrCommentId, func) { assert(Array.isArray(arrCommentId), "eachCommentId: Invalid type of 'arrCommentId'!"); assert(typeof func === "function" && func, "eachCommentId: Invalid type of 'func'!"); $.each(arrCommentId, function(i, nId){ func(getComment(nId)) }); } function findLevel(nCommentId, bFindSub) { for(var i=0; i<m_arrLevelInfo.length; i++) { if(m_arrLevelInfo[i].nId == nCommentId) { return i } if(bFindSub && $.inArray(nCommentId, m_arrLevelInfo[i].arrSubId) != -1) { return i } } assert(false, "findLevel: Invalid comment id: " + nCommentId); } function asyncEachTopLevel(fnProc, fnComplete) { assert(typeof fnProc === "function" && fnProc, "asyncEachTopLevel: Invalid 'fnProc'!"); assert(!fnComplete || typeof fnProc === "function", "asyncEachTopLevel: Invalid 'fnComplete'!"); var nTimeSpan = 20; if(m_arrLevelInfo.length > 50) { m_arrLevelInfo.asyncEach(nTimeSpan, fnProc, fnComplete) // async call } else { $.each(m_arrLevelInfo, function(i, info){ fnProc(i, info) }); // sync call fnComplete && fnComplete(); } } function asyncEachTopComment(sSelector, fnProc, fnComplete) { assert(typeof sSelector === "string" && sSelector, "asyncEachTopComment: Invalid 'sSelector'!"); assert(typeof fnProc === "function" && fnProc, "asyncEachTopComment: Invalid 'fnProc'!"); assert(!fnComplete || typeof fnProc === "function", "asyncEachTopComment: Invalid 'fnComplete'!"); var $top_comment = $("#comments #comment-holder ol.top").children(sSelector); assert($top_comment.length <= m_arrLevelInfo.length, "asyncEachTopComment: Consistency check failed! The length is " + $top_comment.length + " & " + m_arrLevelInfo.length); var nTimeSpan = 30; ($top_comment.length > 50) ? $top_comment.asyncEach(nTimeSpan, fnProc, fnComplete) // async call : ( $top_comment.each(function(){ fnProc($(this)) }) && fnComplete && fnComplete() ); // sync call } function sortTopComments(sAttr, bReverse) { // active in 3 minutes, temporarily disable sort levels if( $("#comments").inScreen(false) && (getCurrentMS() - m_nLastActiveTime < 1000 * 180) ) { return } showBottomTip("正在根据热度重排楼层&#65292;请稍候", 2000); var arrLevelInfo = []; // make a copy without SPAM $.each( m_arrLevelInfo, function(i, info){ !getComment(info.nId).nSpamType && arrLevelInfo.push(info) } ); arrLevelInfo.sort(function(a, b){ return Number.cmp(a[sAttr], b[sAttr]) * (bReverse ? -1 : 1) }); var $top_ol = $("#comments #comment-holder ol.top:first"); delayRun( function() { function _moveDOM(i, info) { var $top_comment = $top_ol.children("li.comment.top").eq(i); ($top_comment.attr("data") != String(info.nId)) && $top_comment.before( $top_ol.children("li.comment.top[data='" + info.nId + "']") ); } $.each(arrLevelInfo, _moveDOM); // sort DOM hideBottomTip(); var nCurCommentId = parseInt(location.hash.substring(1)); if(!isNaN(nCurCommentId) && (nCurCommentId in m_mapComments)) { var $cur_comment = $top_ol.find("li.comment[data='" + nCurCommentId + "']"); !$cur_comment.length && assert(false, "sortTopComments: NOT found comment, id=" + nCurCommentId); ($cur_comment.length > 1) && assert(false, "sortTopComments: Repeat comment, id=" + nCurCommentId); $cur_comment.scrollTo("fast"); } }, 50 ); } // sortTopComments() end function findCommentsByUser(comment) { var arrResults = []; $.each( m_arrCommentId, function(i, nId){ comment.isEqual(getComment(nId)) && arrResults.push(nId) } ); return arrResults; } function showEditor(comment) { comment && (location.hash = "#" + comment.nId); // mark current comment if(!m_sEditorUrl) { return } var sParentId = (comment ? (comment.sParentLongId || comment.sLongId) : null); var sUrl = (sParentId ? m_sEditorUrl.replace(/#/, "&parentID=" + sParentId + "#") : m_sEditorUrl); function _getPopupOptions() { var nWidth = $(".sidebar.section").width(); var nHeight = (isBlogAdmin() ? 500 : 400); var nLeft = window.screen.width - nWidth; var nTop = window.screen.height - nHeight; return "width=" + nWidth + ",height=" + nHeight + ",left=" + nLeft + ",top=" + nTop + ",resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no,status=no"; } var wnd = window.open(sUrl, "new-comment-" + getCurrentMS(), _getPopupOptions()); try { wnd.closed } catch(err) { return } // for robust, test 'closed' property (IE 11 maybe fail) function _pollingWindow() // wait editor window closed and load new comment { if(!wnd.closed) { return true } g_loadNewComments(); window.g_loadTweets(false, true); return false; } asyncLoop(_pollingWindow, 500, "_pollingWindow"); } function getMenuHtml(comment) { assert(m_arrCommentId.length && m_arrLevelInfo.length, "getMenuHtml: Invalid call!"); var sUserThis = "只看此人的评论", sUserOthers = "隐藏此人的评论", sUserTip = "", sSearchUser = ""; if(comment.oAuthor.isAnonymous()) { if("匿名" == comment.oAuthor.sName) { sUserThis = ""; sUserOthers = "隐藏所有匿名评论"; sUserTip = "此人是&#12304;匿名&#12305;&#65288;未登录且没有设置网名&#65289;&#65292;对&#8220;匿名评论&#8221;完全无法区分作者&#65292;只能一起隐藏"; } else { sUserTip = "此人是&#12304;未登录用户&#12305;&#65292;只能根据&#8220;用户名&#8221;进行过滤\n因此无法区分&#12304;同名&#12305;的情况"; sSearchUser = "搜索与此人同名的评论"; } } else { sUserTip = "此人是&#12304;登录用户&#12305;&#65292;可以进行精确的过滤"; sSearchUser = "全站搜索此人的评论"; } var sHtml = "<span class='menubar'><ul class='dropdown filter' style='width:50px;'>" + "<li style='background-color: transparent;'><a>过滤</a><ul>" + "<li class='reset'><a>显示全部评论</a></li>" + (sUserThis ? "<li class='user-this'><a title='"+sUserTip+"'>"+sUserThis+"</a></li>" : "") + "<li class='user-others'><a title='"+sUserTip+"'>"+sUserOthers+"</a></li>" //+ "<li class='time-before'><a>只看早于这条的评论</a></li>" //+ "<li class='time-after'><a>只看晚于这条的评论</a></li>" + "</ul></li></ul></span>"; if(sSearchUser) { var reTrim = /[\/\\\(\)\[\]\{\}\|\?\!\*\+\-\,\:;"'<>~@#$%^&=]/g var sKeyword = ( comment.oAuthor.isLogined() ? comment.oAuthor.sHomeUrl : comment.oAuthor.sName.replace(reTrim, " ") ); var sUrl = "/p/search.html?scope=comment-author" + (comment.oAuthor.isLogined() ? "-url" : "") + "&q=" + encodeURIComponent(sKeyword); sHtml += "<span class='menubar'><ul class='dropdown search' style='width:50px;'>" + "<li style='background-color: transparent;'><a>搜索</a>" + "<ul><li><a href='"+sUrl+"' target='_blank'>"+sSearchUser+"</a></li></ul></li>" + "</ul></span>"; } if(comment.sText.search(/\[\/\w+\]/) > 0) { sHtml += "<span class='menubar'><ul class='dropdown bbcode' style='width:80px;'>" + "<li style='background-color: transparent;'><a>BBCode</a>" + "<ul><li class='bbcode-show'><a>显示 BBCode</a></li></ul></li>" + "</ul></span>"; } return sHtml; } // getMenuHtml() end function renderMenu($menubars) { $menubars.attr("update", getCurrentMS()); var menu = $menubars.find(".dropdown").menu({ position: {my:"left top", at:"left bottom"} }); $(menu).mouseleave(function(){ menu.menu("collapseAll") }); $menubars.find("li a").each( function() { !$(this).hasAttr("href") && $(this).attr("href", "javascript:;") } ).click(function(){ menu.menu("collapseAll") }); $menubars.find(".filter .user-this a").click( function() { var $cur_comment = $(this).closest("li.comment"); var sCurUser = $cur_comment.find("cite.user:first").html(); filterShow( function($comment){ return $comment.find("cite.user:first").html() == sCurUser }, function(){ location.hash = "#" + $cur_comment.attr("data") }, "user" ); } ); $menubars.find(".filter .user-others a").click( function() { var sCurUser = $(this).closest("li.comment").find("cite.user:first").html(); filterHide( function($comment){ return $comment.find("cite.user:first").html() == sCurUser }, function(){ location.hash = "#comments" } ); } ); $menubars.find(".filter .reset a").click( function() { filterReset(); location.hash = "#" + $(this).closest("li.comment").attr("data"); } ); $menubars.find(".bbcode .bbcode-show a").click( function() { var nCommentId = parseInt($(this).closest("li.comment").attr("data")); alert(getComment(nCommentId).sText.replace(/\t/g, " ")); } ); function _setMenuState($menubars) { if("reset" == m_sMenuState) // filterReset { $menubars.find(".filter .reset").hide(); } else if(m_sMenuState.startsWith("show")) // filterShow() { $menubars.find(".filter .reset").show(); ("show.user" == m_sMenuState) && $menubars.find(".filter .user-this").hide(); } else if("hide" == m_sMenuState) // filterHide() { $menubars.find(".filter .reset").show(); } else { assert(false, "_setMenuState: Invalid 'm_sMenuState'!"); } } _setMenuState($menubars); } // renderMenu() end function showRestoreLink($top_comment, sDesc) { assert($top_comment.is(":visible"), "showRestoreLink: The top comment is hidden!"); assert(typeof sDesc === "string", "showRestoreLink: Invalid 'sDesc'!"); (sDesc.length > 0) && (sDesc += "&#65292;"); var $restore = null, arrId = []; $top_comment.find("li.comment.sub").each( function() { var $sub_comment = $(this); if($sub_comment.is(":visible")) { if(arrId.length > 0) { assert($restore, "showRestoreLink: The '$restore' is null!"); $restore.attr("data", arrId.join(",")).find(".number").html(arrId.length); $restore = null; arrId = []; } } else // '$sub_comment' is hidden { if(0 == arrId.length) { assert(!$restore, "showRestoreLink: The '$restore' is NOT null!"); $restore = $("<li class='restore filter'><div>" + sDesc + "此处隐藏了<b class='number'/>条评论&#12290;" + "<a href='javascript:;'>重新显示这些评论</a></div></li>"); $sub_comment.before($restore); } arrId.push($sub_comment.attr("data")); } } ); arrId.length && $restore.attr("data", arrId.join(",")).find(".number").html(arrId.length); } // showRestoreLink() end function filterReset() { m_sMenuState = "reset"; $.each(m_arrLevelInfo, function(i, info){ info.bVisible = true }); var $comment_holder = $("#comments #comment-holder"); $comment_holder.find("li.comment:hidden").show(); $comment_holder.find("li.restore.filter").remove(); $comment_holder.find(".comment-block.match").removeClass("match"); m_nLevelUpdateTime = getCurrentMS(); initAllGoLevel(); showBottomTip("已经重新显示&#65306;所有被过滤的评论&#12290;", 3000); } function filterShow(fnCondition, fnComplete, sType) { assert(typeof fnCondition === "function" && fnCondition, "filterShow: Invalid 'fnCondition'!"); assert(typeof fnComplete === "function" && fnComplete, "filterShow: Invalid 'fnComplete'!"); assert(typeof sType === "string" && sType.length > 0, "filterShow: Invalid 'sType'!"); m_sMenuState = "show." + sType; location.hash = "#comments"; var nProcCount = 0; asyncEachTopComment( "li.comment.top:visible", function($top_comment) { var nLevel = findLevel(parseInt($top_comment.attr("data")), false); if(m_arrCommentId.length > 150) { nProcCount += m_arrLevelInfo[nLevel].arrSubId.length; var nPercent = Math.floor(1000 * nProcCount / m_arrCommentId.length) / 10; showBottomTip("正在过滤&#65292;已经完成 " + nPercent + "%&#65292;请稍候 ...", 0); } function _setMatch($comment) { $comment.show(); ("user" == sType || "time" == sType) && $comment.children(".comment-block").addClass("match"); ("user" == sType) && $comment.find(".filter:first .user-others").hide(); return true; } if(fnCondition($top_comment)) // top comment match { _setMatch($top_comment); $top_comment.find("li.comment.sub").each( function(){ fnCondition($(this)) ? _setMatch($(this)) : $(this).hide() } ); showRestoreLink($top_comment, "根据你的过滤条件"); } else // top comment NOT match { var bHad = false; $top_comment.find("li.comment.sub").each( function(){ fnCondition($(this)) ? (bHad = _setMatch($(this))) : $(this).hide() } ); bHad ? showRestoreLink($top_comment, "根据你的过滤条件") : $top_comment.hide() && (m_arrLevelInfo[nLevel].bVisible = false); // NOT found visible sub comment } }, function() { var nNum = $("#comments #comment-holder li.comment:visible").length; showBottomTip("过滤完成&#65292;还剩下 " + nNum + " 条评论", 5000); m_nLevelUpdateTime = getCurrentMS(); initAllGoLevel(); fnComplete(); } ); } // filterShow() end function filterHide(fnCondition, fnComplete) { assert(typeof fnCondition === "function" && fnCondition, "filterHide: Invalid 'fnCondition'!"); assert(typeof fnComplete === "function" && fnComplete, "filterHide: Invalid 'fnComplete'!"); m_sMenuState = "hide"; location.hash = "#comments"; var nProcCount = 0; asyncEachTopComment( "li.comment.top:visible", function($top_comment) { var nLevel = findLevel(parseInt($top_comment.attr("data")), false); if(m_arrCommentId.length > 150) { nProcCount += m_arrLevelInfo[nLevel].arrSubId.length; var nPercent = Math.floor(1000 * nProcCount / m_arrCommentId.length) / 10; showBottomTip("正在过滤&#65292;已经完成 " + nPercent + "%&#65292;请稍候 ...", 0); } if(fnCondition($top_comment)) { $top_comment.hide(); m_arrLevelInfo[nLevel].bVisible = false; } else { $top_comment.find("li.comment.sub").each(function(){ fnCondition($(this)) && $(this).hide() }); showRestoreLink($top_comment, "根据你的过滤条件"); } }, function() { var nNum = $("#comments #comment-holder li.comment:visible").length; showBottomTip("过滤完成&#65292;还剩下 " + nNum + " 条评论", 5000); m_nLevelUpdateTime = getCurrentMS(); initAllGoLevel(); fnComplete(); } ); } // filterHide() end function filterByTime(nMinTime, nMaxTime) { if(nMinTime > nMaxTime) { showBottomTip("<b>&#8220;时间范围&#8221;的设置有误&#8212;&#8212;&#8220;开始时间&#8221;必须小于或等于&#8220;结束时间&#8221;</b>", 5000); return; } filterReset(); function _condition($comment) { var nTime = Math.floor(parseInt($comment.attr("data")) / 1000); return (nMinTime <= nTime && nTime <= nMaxTime); } filterShow(_condition, function(){ location.hash = "#comments" }, "time"); } function initAllGoLevel() { var sHtml = "<option value=''>电梯</option>", nMaxWidth = String(m_arrLevelInfo.length).length, arrSpamRange = null; for(var i=0; i<m_arrLevelInfo.length; i++) { var info = m_arrLevelInfo[i]; if(!info.bVisible) { continue } var commentTop = getComment(info.nId); if(commentTop.nSpamType > 0) { (null === arrSpamRange) ? (arrSpamRange = [i, i]) : (arrSpamRange[1] = i); continue; } if(arrSpamRange) // show merge range { var sText = intToStr(arrSpamRange[0] + 1, nMaxWidth, " ").replace(/ /g, "&nbsp;"); (arrSpamRange[0] != arrSpamRange[1]) && (sText += "&#8212;&#8212;" + (arrSpamRange[1] + 1)); sHtml += "<option value='" + m_arrLevelInfo[arrSpamRange[0]].nId + "' class='spam'>" + sText + " 楼 (垃圾&#65295;刷屏)</option>"; arrSpamRange = null; } var sText = intToStr(i+1, nMaxWidth, " ").replace(/ /g, "&nbsp;") + " 楼"; var sTip = sText + ": " + commentTop.oAuthor.sName; info.arrSubId.length && (sText += " / " + info.arrSubId.length + " 回复"); info.arrSubId.length && (sTip += "\n最后回复: " + getComment(info.arrSubId.last()).oAuthor.sName); sHtml += "<option value='" + info.nId + "' title='" + sTip + "'>" + sText + "</option>"; } // for() end $(".comment-actions .go-level").each( function() { $(this).html(sHtml).change( function() { ($(this).val().length > 0) && (location.hash = "#" + $(this).val()); $(this)[0].selectedIndex = 0; } ).tooltip({ position: { my:"left center", at:"right+20 center-20" }, content: Tooltip.content, open: function(event, ui){ Tooltip.open(event, ui, 3000) } }); } ); } // initAllGoLevel() end function goLevelCurrent($cur_comment) { assert($cur_comment.hasClass("sub"), "goLevelCurrent: Invalid class!"); location.hash = "#" + $cur_comment.closest("li.comment.top").attr("data"); } function goLevelUp($cur_comment) { assert($cur_comment.hasClass("top") || $cur_comment.hasClass("sub"), "goLevelUp: Invalid class!"); if($cur_comment.hasClass("top")) { var $prev_comment = $cur_comment.prev(); while($prev_comment.length > 0) { if($prev_comment.is(":visible")) { location.hash = "#" + $prev_comment.attr("data"); return; } $prev_comment = $prev_comment.prev(); } showBottomTip("当前楼层已经是最高&#65281;", 3000); } else { goLevelUp($cur_comment.closest("li.comment.top")); } } function goLevelDown($cur_comment) { assert($cur_comment.hasClass("top") || $cur_comment.hasClass("sub"), "goLevelDown: Invalid class!"); if($cur_comment.hasClass("top")) { var $next_comment = $cur_comment.next(); while($next_comment.length > 0) { if($next_comment.is(":visible")) { location.hash = "#" + $next_comment.attr("data"); return; } $next_comment = $next_comment.next(); } showBottomTip("当前楼层已经是最低&#65281;", 3000); } else { goLevelDown($cur_comment.closest("li.comment.top")); } } function saveComment(commentNew, bAddUI) { assert(typeof commentNew.nId === "number", "saveComment: Invalid type of comment id!"); assert(!(commentNew.nId in m_mapComments), "saveComment: Repeat comment id!"); assert(m_arrCommentId.length == Object.keys(m_mapComments).length, "saveComment: Consistency check failed! The length is " + m_arrCommentId.length + " & " + Object.keys(m_mapComments).length); m_mapComments[commentNew.nId] = commentNew; var bNeedSort = (m_arrCommentId.length && commentNew.nId < m_arrCommentId.last()); // for robust m_arrCommentId.push(commentNew.nId); bNeedSort && m_arrCommentId.sort(); assert(!(commentNew.sLongId in m_mapLongId), "saveComment: Repeat long id!"); m_mapLongId[commentNew.sLongId] = commentNew.nId; if(commentNew.bIsInstruction) { return } if(commentNew.isTop()) { m_arrLevelInfo.push({ nId:commentNew.nId, arrSubId:[], bVisible:true, nHot:0.0 }); commentNew.nTopIndex = m_arrLevelInfo.length; commentNew.nSubIndex = 0; } else // is sub { if(commentNew.sParentLongId in m_mapLongId) // find parent { var nParentId = m_mapLongId[commentNew.sParentLongId], commentTop = getComment(nParentId); m_arrLevelInfo[commentTop.nTopIndex - 1].arrSubId.push(commentNew.nId); commentNew.nTopIndex = commentTop.nTopIndex; commentNew.nSubIndex = m_arrLevelInfo[commentNew.nTopIndex - 1].arrSubId.length; } else // NOT found parent, maybe banned by Google/Blogger { procBannedTopComment(commentNew, bAddUI) } } _detectSpam(commentNew); m_nLevelUpdateTime = getCurrentMS(); bAddUI && initAllGoLevel(); function _detectSpam(commentNew) // anti spam attack // The value of 'nSpamType', @see 'getSpamTypeDesc()' { m_spamManual.isSpam(commentNew) && (commentNew.nSpamType = 40); (0 == commentNew.nSpamType) && (commentNew.nSpamType = m_spamUser.getSpamType(commentNew)); if(commentNew.bIsDeleted) { return } if(commentNew.oAuthor.isLogined()) { return } // TODO m_spamTimeGroup.addTime(commentNew.nId); // for ALL anonymous comments (0 == commentNew.nSpamType) && m_spamTextFeature.isSpam(commentNew) && (commentNew.nSpamType = 40); (0 == commentNew.nSpamType) && m_spamTextUrl.isSpam(commentNew) && (commentNew.nSpamType = 31); if(0 == commentNew.nSpamType) { var nNum = m_spamTimeGroup.getSimilarNum(commentNew.nId); (nNum >= m_nTimeGroupCritical) && (commentNew.nSpamType = 20); if(nNum == m_nTimeGroupCritical) { var arrId = m_spamTimeGroup.getSimilarTimes(commentNew.nId); assert(arrId.length > 0, "_detectSpam: The 'arrId' is EMPTY!"); eachCommentId(arrId, function(comment){ !comment.nSpamType && (comment.nSpamType = 20) }); } } if(0 == commentNew.nSpamType) { commentNew.nTextGroupId = m_spamTextGroup.addComment(commentNew); var arrId = m_spamTextGroup.getSimilarId(commentNew); if(arrId.length >= 3) { assert(commentNew.nTextGroupId != commentNew.nId, "_detectSpam: Invalid 'nTextGroupId'"); commentNew.nSpamType = 30; (3 == arrId.length) && eachCommentId(arrId, function(comment){ (comment.nTextGroupId != comment.nId) && (comment.nSpamType = 30) }); } } } // _detectSpam() end } // saveComment() end function procBannedTopComment(commentSub, bAddUI) // TOP comment banned by Google/Blogger { var commentTop = new Comment(null); // make a fake comment as placeholder commentTop.nId = 1 + (m_arrLevelInfo.length ? m_arrLevelInfo.last().nId : getArticleTime().getTime()); commentTop.sId = String(commentTop.nId); commentTop.dtCreate = new Date(commentTop.nId); commentTop.sLongId = commentSub.sParentLongId; commentTop.bIsBanned = true; commentTop.sUrl = commentSub.sUrl.replace(commentSub.sId, commentTop.sId); commentTop.oAuthor = new Author(null); commentTop.oAuthor.sName = "匿名"; commentTop.oAuthor.sAvatarUrl = "https://img1.blogblog.com/img/anon36.png"; // Save banned parent assert(!(commentTop.nId in m_mapComments), "procBannedTopComment: Repeat parent id!"); m_mapComments[commentTop.nId] = commentTop; m_arrCommentId.push(commentTop.nId); m_arrCommentId.sort(); // for robust m_mapLongId[commentTop.sLongId] = commentTop.nId; m_arrLevelInfo.push({ nId:commentTop.nId, arrSubId:[], bVisible:true, nHot:0.0 }); commentTop.nTopIndex = m_arrLevelInfo.length; commentTop.nSubIndex = 0; // Save child m_arrLevelInfo[commentTop.nTopIndex - 1].arrSubId.push(commentSub.nId); commentSub.nTopIndex = commentTop.nTopIndex; commentSub.nSubIndex = m_arrLevelInfo[commentSub.nTopIndex - 1].arrSubId.length; if(!bAddUI) { return } // Show banned parent comment var $top_comment = $(commentTop.showFull()), $top_ol = $("#comments #comment-holder ol.top"); assert(1 == $top_ol.length, "procBannedTopComment: Multi 'ol.top'!"); $top_comment.appendTo($top_ol); assert(!$top_comment.find(".comment-replies").length, "procBannedTopComment: Found '.comment-replies'!"); $top_comment.append("<div class='comment-replies thread-expanded'>" + "<a class='thread-toggle' href='javascript:;'/>" + "<div class='comment-thread'><ol class='sub'/></div>" + "</div>"); // Show child comment var $sub_ol = $top_comment.find(".comment-replies .comment-thread ol.sub"); assert($sub_ol.length > 0, "procBannedTopComment: NOT found 'ol.sub'!"); $sub_ol.append( $(commentSub.showFull({ starList: getAuthorStarList(commentSub) })) ); calcAllHot(); asyncEachTopLevel( function(n, info) { $top_ol.children("li.comment.top[data='" + info.nId + "']").attr("hot", info.nHot) .find(".hot:first").html(formatHotTitle(info.nHot)); }, function() { sortTopComments("nHot", true); m_nLevelUpdateTime = getCurrentMS(); initAllGoLevel(); } ); } // procBannedTopComment() end function updateTitle() { var sTitle = (m_arrCommentId.length ? (m_arrLevelInfo.length + "楼 / " + m_arrCommentId.length + "条") : "暂无"); var nSpamCount = 0; eachCommentId(m_arrCommentId, function(comment){ comment.nSpamType && nSpamCount++ }); var sSpamDesc = (nSpamCount ? " &#65288;自动隐藏了 " + nSpamCount + " 条&#8220;垃圾&#65295;刷屏&#8221;&#65289;" : ""); $("#comments #comments-label").html(sTitle + "评论" + sSpamDesc); $(".post-toolbar .post-comment-link .comment-link").html("评论数&#65306;" + sTitle); $("#side-toolbar a.comment-number").html( m_arrCommentId.length >= 1000 ? (Math.floor(m_arrCommentId.length / 1000) + "K+") : m_arrCommentId.length ); } window.g_loadNewComments = function(mapOpts) { mapOpts = mapOpts || {}; var nMaxResults = ("maxResults" in mapOpts ? mapOpts.maxResults : 50); var fnOnData = ("onData" in mapOpts ? mapOpts.onData : null); var fnOnError = ("onError" in mapOpts ? mapOpts.onError : null); var nMinTime = 1 + (m_arrCommentId.length ? m_arrCommentId.last() : getArticleTime().getTime()); assert(m_sPostId.match(/\d+/), "g_loadNewComments: Invalid 'm_sPostId'!"); var sUrl = Url.getFeedUrlPrefix() + "/" + m_sPostId + "/comments/default" + "?alt=json&v=2&orderby=published&reverse=false&max-results=" + nMaxResults + "&published-min=" + new Date(nMinTime).toISOString(); var $top_ol = $("#comments #comment-holder ol.top"); assert(1 == $top_ol.length, "g_loadNewComments: Multi 'ol.top'!"); var bAddUI = $top_ol.is(":visible"); $.ajax({ url: sUrl, dataType: "json", success: function(json) { if(!("feed" in json) || !("entry" in json.feed)) { fnOnData && fnOnData(0); // notify 'no more data' return; } //delayRun(function(){ window.g_loadTweets(false, true) }, 1000); // Notify tweets module to refresh var nEntryNum = json.feed.entry.length; assert(nEntryNum > 0, "g_loadNewComments: The 'entry' is empty!"); fnOnData && fnOnData(nEntryNum); $.each(json.feed.entry, _procJson); }, error: function(xhr, sStatus) { reportHttpError("加载评论出错", xhr, sStatus); fnOnError && fnOnError(""); }, timeout: 1000 * 40 }); // ajax end function _procJson(i, entry) { var comment = new Comment(entry); if(comment.nId in m_mapComments) { return } if(comment.bIsDeleted && !comment.nId) // for robust, make a fake comment id { comment.nId = 1 + (m_arrCommentId.length ? m_arrCommentId.last() : getArticleTime().getTime()); comment.sId = "" + comment.nId; comment.dtCreate = new Date(comment.nId); } assert(comment.nId, "_procJson: Invalid url at entry[" + i + "]!"); saveComment(comment, bAddUI); _showComment(comment); } function _showComment(comment) { if(!bAddUI || comment.bIsInstruction) { return } // create DOM var mapOpts = { starList: getAuthorStarList(comment) }; if(comment.isTop()) { var info = m_arrLevelInfo[comment.nTopIndex - 1]; mapOpts.hotValue = info.nHot; mapOpts.hotTitle = formatHotTitle(info.nHot); } var $comment = $(comment.showFull(mapOpts)); // append DOM if(comment.isSub()) { var nParentId = m_arrLevelInfo[comment.nTopIndex - 1].nId; var $top_comment = $top_ol.children("li.comment[data='" + nParentId + "']"); if($top_comment.length > 0) // for robust { !$top_comment.find(".comment-replies").length && $top_comment.append("<div class='comment-replies thread-expanded'>" + "<a class='thread-toggle' href='javascript:;'/>" + "<div class='comment-thread'><ol class='sub'/></div>" + "</div>"); $top_comment.find(".comment-replies .comment-thread ol.sub").append($comment); } else { assert(false, "addComment: NOT found top comment, parent id: " + nParentId); } } else // is top { $comment.appendTo($top_ol); } (0 == comment.nSpamType) && $comment.children(".comment-block").addClass("unread"); updateTitle(); calcAllHot(); asyncEachTopLevel( function(n, info) { $top_ol.children("li.comment.top[data='" + info.nId + "']").attr("hot", info.nHot) .find(".hot:first").html(formatHotTitle(info.nHot)) }, function(){ sortTopComments("nHot", true) } ); } // _showComment() end } // g_loadNewComments() end function onHashChange() { var $comment_holder = $("#comments #comment-holder"); $comment_holder.find(".comment-block.current").removeClass("current"); var nCurCommentId = parseInt(location.hash.substring(1)); if(!(nCurCommentId in m_mapComments)) { return } var $cur_comment = $comment_holder.find("li.comment[data='" + nCurCommentId + "']"); if(0 == $cur_comment.length) { return } //TODO: show hidden spam comment $cur_comment.children(".comment-block").addClass("current"); if($cur_comment.is(":visible")) { return } // show hidden comments for(var i=0; i<m_arrLevelInfo.length; i++) { var info = m_arrLevelInfo[i]; if(info.nId == nCurCommentId) // current is top level { $cur_comment.show().scrollTo("fast").find("li.comment.sub").show(); info.bVisible = true; return; } if($.inArray(nCurCommentId, info.arrSubId) != -1) // current is sub level { $comment_holder.find("li.comment[data='" + info.nId + "']").show(); $cur_comment.show().scrollTo("fast"); return; } } } // onHashChange() end function getAuthorStarList(comment) { if(comment.nSpamType > 0) { return "" } var sAuthorKey = comment.oAuthor.getKey(); if(!sAuthorKey) { return "&#9733;" } // anonymous WITHOUT name if(!(sAuthorKey in m_mapAuthors)) { return "" } var info = m_mapAuthors[sAuthorKey]; var sStar = ""; for(var i=0; i<Math.floor(info.nStar); i++) { sStar += "&#9733;" } return sStar; } function initAuthorHot() { m_mapAuthors = {}; function _procComment(comment) { assert(comment.oAuthor, "initAuthorHot: Invalid 'oAuthor'!"); if(comment.bIsDeleted || comment.nSpamType > 0) { return } var sKey = comment.oAuthor.getKey(); if(!sKey) { return } (sKey in m_mapAuthors) ? m_mapAuthors[sKey].nCommentNum++ : (m_mapAuthors[sKey] = { oAuthor:comment.oAuthor, nCommentNum:1 }); } eachCommentId(m_arrCommentId, _procComment); for(var sKey in m_mapAuthors) { assert(sKey, "initAuthorHot: The 'sKey' is empty!"); var info = m_mapAuthors[sKey], author = info.oAuthor; info.nUserWeight = (author.isAnonymous() ? 1.5 : (author.isAdmin() ? 6.0 : 3.0) ); info.nStar = Math.log2(info.nCommentNum + 1); info.nHot = info.nUserWeight * info.nStar; info.sTip = "此人的用户类型权重&#65306;" + info.nUserWeight + "&#65288;" + (author.isAnonymous() ? "设了网名的匿名用户" : (author.isAdmin() ? "博主" : "登录用户") ) + "&#65289;" + "\n此人在本文的评论数&#65306;" + info.nCommentNum + "\n此人在本文的星级&#65306;" + (Math.round(info.nStar * 100) / 100) + " == log2(在本文的评论数+1)" + "\n此人每条评论的热度&#65306;" + (Math.round(info.nHot * 100) / 100) + " == 用户类型权重 * 在本文的星级"; } m_nAuthorsUpdateTime = getCurrentMS(); } // initAuthorHot() end function formatHotTitle(nHot) { return "热度 " + Math.round(nHot * 10) / 10 + "&#8451;"; } function getCommentHot(comment) { if(comment.bIsDeleted || comment.nSpamType > 0) { return 0.0 } var sAuthorKey = comment.oAuthor.getKey(); if(!sAuthorKey) { return 1.0 } if(sAuthorKey in m_mapAuthors) { return m_mapAuthors[sAuthorKey].nHot } reportError("getCommentHot: Invalid 'sAuthorKey':" + sAuthorKey); return 1.0; } function setCommentHot($comment) { var nCommentId = parseInt($comment.attr("data")); assert(nCommentId in m_mapComments, "setHotInfo: Invalid comment id!"); var oAuthor = getComment(nCommentId).oAuthor, sAuthorKey = oAuthor.getKey(); if(!sAuthorKey) // anonymous WITHOUT name { $comment.find(".comment-header:first .star").html("&#9733;").attr("update", getCurrentMS()); var sTip = "此人的用户类型权重&#65306;1&#65288;无网名的匿名用户&#65289;" + "\n此人在本文的评论数&#65306;1" + "\n此人在本文的星级&#65306;1 == log2(在本文的评论数+1)" // Math.log2(nCommentNum+1) + "\n此人每条评论的热度&#65306;1 == 用户类型权重 * 在本文的星级"; $comment.children(".comment-block").find(".user, .star").attr("title", sTip); return; } if(sAuthorKey in m_mapAuthors) { var info = m_mapAuthors[sAuthorKey], sStar = ""; for(var i=0; i<Math.floor(info.nStar); i++) { sStar += "&#9733;" } $comment.find(".comment-header:first .star").html(sStar).attr("update", getCurrentMS()); $comment.children(".comment-block").find(".user, .star").attr("title", info.sTip); } } // setCommentHot() end function calcAllHot() { initAuthorHot(); function _calcLevel(info) { if(getComment(info.nId).nSpamType > 0) { info.nHot = 0.0; return; } info.nHot = getCommentHot(getComment(info.nId)); // top if(info.arrSubId.length > 0) // sub { var mapUser = {}; eachCommentId( info.arrSubId, function(comment) { if(comment.bIsDeleted || comment.nSpamType > 0) { return } var sKey = comment.oAuthor.getKey(); if(!sKey) // anonymous user WITHOUT name { info.nHot += 1.0; } else if(comment.oAuthor.isAdmin()) // blogger admin { info.nHot += getCommentHot(comment); } else // logined user or anonymous user with name { var nNum = ((sKey in mapUser) ? ++mapUser[sKey] : (mapUser[sKey] = 1)); info.nHot += ((nNum <= 5) ? getCommentHot(comment) : m_mapAuthors[sKey].nUserWeight); } }); } } $.each(m_arrLevelInfo, function(i, info){ _calcLevel(info) }); } function initToolbar() { var sHtml = "<span><a href='/p/search.html?scope=comment-content' target='_blank'>全站搜索评论</a></span>" + "<span class='filter'><a class='reset'>显示全部评论</a></span>" + "<span class='menubar'><ul class='dropdown filter-time' style='width:100px;'>" + "<li style='background-color: transparent;'><a>按时间过滤</a><ul>"; var arrSpan = [ [3600 * 2, "2小时"], [3600 * 6, "8小时"], [3600 * 24, "1天"], [3600 * 24 * 3, "3天"], [3600 * 24 * 7, "1星期"], [3600 * 24 * 30, "1个月"] ]; for(var i=0; i<arrSpan.length; i++) { sHtml += "<li><a class='menuitem' span='" + arrSpan[i][0] + "'>只看 最近" + arrSpan[i][1] + "</a></li>"; } sHtml += "<li><a class='menuitem'>自定义时间段</a></li></ul></li></ul></span>"; var $toolbar = $("#comments #comments-toolbar").html("<div>" + sHtml + "</div>"); $toolbar.find(".filter").children("a").attr("href", "javascript:;"); $toolbar.find(".filter .reset").click(function(){ filterReset() }); var menu = $toolbar.find(".dropdown").menu({ position: {my:"left top", at:"left bottom"} }); $(menu).mouseleave(function(){ menu.menu("collapseAll") }); function showTimeRange() { var $range = $("<div class='filter-time-range'>" + "<b>自定义时间过滤&#65306;</b>&#12288;" + "开始 <input type='text' id='min-date'/> <select id='min-hour'/>&#12288;" + "结束 <input type='text' id='max-date'/> <select id='max-hour'/>&#12288;" + "<a id='search'>过滤</a></div>").appendTo($toolbar); $range.find("input").attr("size", "10").attr("readonly", true).attr("title", "日期") .datepicker(getDatePickerOpts()).val( (new Date()).format("%Y-%0m-%0d") ); var sOptionHtml = ""; for(var i=0; i<24; i++) { sOptionHtml += "<option value='" + intToStr(i, 2, "0") + "'>" + intToStr(i, 2, " ").replace(/ /g, "&nbsp;") + "</option>"; } $range.find("#min-hour, #max-hour").html(sOptionHtml).attr("title", "小时"); var $min_hour = $range.find("#min-hour").val("00"); var $max_hour = $range.find("#max-hour").val("23"); $range.children("a#search").click( function() { var dtMin = Date.parseISO($range.find("#min-date").val() + "T" + $min_hour.val() + ":00:00"); var dtMax = Date.parseISO($range.find("#max-date").val() + "T" + $max_hour.val() + ":59:59"); filterByTime(dtMin.getTime() / 1000, dtMax.getTime() / 1000); } ).attr("href", "javascript:;"); menu.menu("collapseAll"); } $toolbar.find(".filter-time li a.menuitem").click( function() { if($(this).hasAttr("span")) { var nSpan = parseInt($(this).attr("span")), nMaxTime = Math.floor(getCurrentMS() / 1000); assert(!isNaN(nSpan) && nSpan > 0, "initToolbar: Invalid 'span' attr!"); menu.menu("collapseAll"); delayRun(function(){ filterByTime(nMaxTime - nSpan, nMaxTime) }, 100); } else { showTimeRange(); $(this).parent().hide(); } } ).attr("href", "javascript:;"); } // initToolbar() end function complete() { $("#comments #comments-loading").remove(); $("#blog-pager").show(); initToolbar(); m_nLevelUpdateTime = getCurrentMS(); initAllGoLevel(); setInterval(function(){ g_loadNewComments() }, 1000 * 60 * 10); (parseInt($("#comments").attr("init_num")) <= m_arrCommentId.length) && m_arrCommentId.length && showBottomTip("本文的&#12304;全部评论&#12305;已经加载完成", 3000); if( ("onhashchange" in window) && ("addEventListener" in window) ) { window.addEventListener("hashchange", onHashChange, false); var nCommentId = parseInt((new Url(null)).getParam("comment")); !isNaN(nCommentId) && (nCommentId in m_mapComments) && (location.hash = "#" + nCommentId); onHashChange(); } } function setProgress(sType, nInc) { assert(typeof sType === "string", "setProgress: Invalid 'sType'!"); assert(typeof nInc === "number" && nInc >= 0, "setProgress: Invalid 'nInc'!"); var nLoadWeight = 2.0, nShowWeight = 1.0; if("load" == sType) { nInc *= nLoadWeight } else if("show" == sType) { nInc *= nShowWeight } else { assert(false, "setProgress: Invalid 'sType': " + sType) } var $comments = $("#comments"), nInitTotal = parseInt($comments.attr("init_num")); var nProcTotal = nInitTotal * (nShowWeight + nLoadWeight); var $progress_bar = $comments.find("#comments-loading #progress-bar"); assert(1 == $progress_bar.length, "setProgress: NOT found DOM '#progress-bar'!"); var nCurNum = parseInt($progress_bar.attr("data")); assert(!isNaN(nCurNum), "setProgress: Invalid 'data' attr!"); nCurNum += nInc; var nPercent = Math.floor(nCurNum * 100 / nProcTotal); (nPercent > 100) && (nPercent = 100); // @see 'procBannedTopComment' $progress_bar.attr("data", nCurNum).children("#progress-label").html(nPercent + "%"); $progress_bar.progressbar({value: nPercent}); return $progress_bar; } // setProgress() end function loadAllComments() { assert(Array.isArray(m_arrCommentId), "loadAllComments: Invalid size of 'm_arrCommentId'!"); var $comments = $("#comments"), nInitTotal = parseInt($comments.attr("init_num")); m_spamManual.parseSpamList($(".post .post-body").html()); setProgress("load", 0); (new Url(null)).getParam("comment") && $comments.scrollTo("fast"); var bIsLoading = false, dtLastLoad = new Date(), nLoadNum = 0, nNetErrNum = 0; var mapOpts = { onData: function(nCommentNum) { bIsLoading = false; if(nCommentNum > 0) { dtLastLoad = new Date(); nNetErrNum = 0; ((nLoadNum += nCommentNum) >= 50) && setProgress("load", nLoadNum) && (nLoadNum = 0); if(m_arrCommentId.length < nInitTotal) { return } } assert(!nCommentNum || m_arrCommentId.length >= nInitTotal, "loadAllComments.onData"); dtLastLoad = null; // flag of 'no more data' }, onError: function(sDesc) { bIsLoading = false; sDesc ? reportError(sDesc) : nNetErrNum++; }, maxResults: (nInitTotal < 800 ? 100 : 200) }; var timer = setInterval( function() { if(false == bIsLoading) { bIsLoading = true; nNetErrNum && (mapOpts.maxResults = 50); g_loadNewComments(mapOpts); // load again return; } if(!dtLastLoad) // no more data { clearInterval(timer); timer = null; asyncCallChain([calcAllHot, showAllComments], 50); return; } if( (nNetErrNum > 10) || (getCurrentMS() - dtLastLoad.getTime() > 1000 * 60) ) // load timeout { clearInterval(timer); timer = null; var sHtml = "<br/>由于" + (nNetErrNum ? "网络故障" : " JS 脚本出错") + "&#65292;只有 " + m_arrCommentId.length + " 条评论被加载&#12290;" + "<span><br/><br/><a id='show'>显示已加载的这部分评论</a></span>"; $comments.children("#comments-warning").append(sHtml) .find("a#show").attr("href", "javascript:;").click( function() { $(this).closest("span").remove(); $comments.children("#comments-loading").prepend("<div>正在处理已加载的这部分评论</div>"); asyncCallChain([calcAllHot, showAllComments], 50); } ); } }, 100 ); // setInterval() end } // loadAllComments() end function showAllComments() { var $top_ol = $("#comments #comment-holder").show().children(".comment-thread").children("ol"); updateTitle(); // SYNC sort array var arrLevelInfo = m_arrLevelInfo.slice(); arrLevelInfo.sort(function(a, b){ return Number.cmp(a.nHot, b.nHot) * -1 }); var nLevel = 0, nCommentCount = 0, sLevelsHtml = "", nTimeSpan = 30, arrTopSpamId = []; asyncLoop( function() { var nBeginTime = getCurrentMS(); while(nLevel < arrLevelInfo.length) { nCommentCount += _showLevel(arrLevelInfo[nLevel]); nLevel++; if(getCurrentMS() - nBeginTime > 500) { setProgress("show", nCommentCount) && (nCommentCount = 0); return true; } } sLevelsHtml && $top_ol.append(sLevelsHtml) && (sLevelsHtml = ""); (nCommentCount > 0) && setProgress("show", nCommentCount) && (nCommentCount = 0); arrTopSpamId.length && $top_ol.append(_mergeSpam(arrTopSpamId)); complete(); return false; }, nTimeSpan, "showAllComments" ); // asyncLoop end function _showLevel(info) { var nBufLen = 1024 * 128; (0 == getComment(info.nId).nSpamType) ? ((sLevelsHtml += _getLevelHtml(info)).length > nBufLen) && $top_ol.append(sLevelsHtml) && (sLevelsHtml = "") : arrTopSpamId.push(info.nId); // merge multi top spam return (1 + info.arrSubId.length); } function _getLevelHtml(info) { assert(Array.isArray(info.arrSubId), "_getLevelHtml: Invalid 'arrSubId' type!"); var commentTop = getComment(info.nId), sSubCommentHtml = "", arrSubSpamId = []; assert(0 == commentTop.nSpamType, "_getLevelHtml: Top comment is SPAM!"); function _procSub(commentSub) { if(commentSub.nSpamType > 0) // merge multi spam { arrSubSpamId.push(commentSub.nId); return; } arrSubSpamId.length && (sSubCommentHtml += _mergeSpam(arrSubSpamId)) && (arrSubSpamId = []); sSubCommentHtml += commentSub.showFull({ starList: getAuthorStarList(commentSub) }); } eachCommentId(info.arrSubId, _procSub); arrSubSpamId.length && (sSubCommentHtml += _mergeSpam(arrSubSpamId)); var mapOpts = { starList: getAuthorStarList(commentTop), hotValue: info.nHot, hotTitle: formatHotTitle(info.nHot), subComments: sSubCommentHtml }; return commentTop.showFull(mapOpts); } // _getLevelHtml() end function _mergeSpam(arrId) { var sHtml = "<li class='restore spam-merge'>"; $.each(arrId, function(i, nId){ sHtml += "<a name='" + nId + "'> </a>" }); var sSize = (arrId.length > 20 ? (arrId.length > 100 ? "150%" : "125%") : "100%"); sHtml += "<span>此处有 <b style='font-size:" + sSize + ";'>" + arrId.length + "</b> 条评论" + "被判定为&#8220;垃圾或刷屏&#8221;&#65292;已经自动隐藏&#12290;<a class='load' href='javascript:;'>重新显示</a></span></li>"; return sHtml; } } // showAllComments() end function initEvent($comments) { $(window).scroll(function(){ $comments.inScreen(false) && (m_nLastActiveTime = getCurrentMS()) }); $comments .on("click", ".comment-actions .add-btn", function(){ showEditor(null) }) .on("click", ".comment-actions .reply-btn", function() { var nCommentId = parseInt( $(this).closest("li.comment").attr("data") ); assert(!isNaN(nCommentId), "initEvent: Invalid 'data' attr at 'li.comment'!"); showEditor(getComment(nCommentId)); } ) .on("click", ".comment-actions .go-level-up", function(){ goLevelUp($(this).closest("li.comment")) }) .on("click", ".comment-actions .go-level-down", function(){ goLevelDown($(this).closest("li.comment")) }) .on("click", ".comment-actions .go-level-current", function(){ goLevelCurrent($(this).closest("li.comment")) }) .on("click", ".comment-actions .mark-spam", function() { var nCommentId = parseInt( $(this).closest("li.comment").attr("data") ); assert(!isNaN(nCommentId), "initEvent: Invalid 'data' attr at 'li.comment'!"); m_spamManual.addCommentId(nCommentId); $(this).after($("<b class='mark-spam'>&#12288;BANNED&#12288;</b>")).remove(); } ) .on("click", ".spam-actions .show-banned", function(){ $(this).parent().children("#banned-code").val(m_spamManual.getBannedJson()) } ) .on("mouseenter", "li.comment .comment-block", function() { _onMouseEnterComment($(this)); $(this).children(".comment-actions").find(".menubars, .blog-admin").show(); } ) .on("mouseleave", "li.comment .comment-block", function(){ $(this).children(".comment-actions").find(".menubars, .blog-admin").hide() } ) .on("click", ".comment-replies .thread-toggle", function(){ _toggleThread($(this)) }) .on("click", ".comment-replies .restore.filter a", function(){ _showFilterComments($(this)) }) .on("click", ".restore.spam-merge a.load", function(){ _loadSpamComments($(this)) }) .on("click", ".comment-content .restore.spam a.load", function(){ _loadSpamComment($(this)) }) .on("click", ".comment-content .read-more", function(){ _readMore($(this)) }) .on("click", ".comment-content a.bbcode", function(evt){ _clickBBCodeLink(evt, $(this)) }) .on("click", ".comment-content .bbcode.image .show-icon", function(){ _switchBBCodeIcon($(this)) }) .on("click", ".comment-content .bbcode.image .show-real", function(){ _switchBBCodeImg($(this)) }) .on("mouseenter", ".comment-content .bbcode", function(){ !$(this).hasAttr("title") && $(this).attr( "title", _getBBCodeTip($(this)) ) } ) .mousemove(function(){ m_nLastActiveTime = getCurrentMS() }); function _onMouseEnterComment($block) { var $comment = $block.closest("li.comment"), nCommentId = parseInt($comment.attr("data")); assert(!isNaN(nCommentId), "_onMouseEnterComment: Invalid 'data' attr!"); var $menubars = $block.children(".comment-actions").children(".menubars"); if($menubars.length>0 && $menubars.hasAttr("update")) { var nUpdateTime = parseInt($menubars.attr("update")); assert(!isNaN(nUpdateTime), "_onMouseEnterComment: Invalid 'update' attr at menubars!"); (!$menubars.find(".menubar").length || nUpdateTime < m_nLevelUpdateTime) && renderMenu($menubars.html( getMenuHtml(getComment(nCommentId)) )); } var nUpdateTime = parseInt( $block.children(".comment-header").children(".star").attr("update") ); assert(!isNaN(nUpdateTime), "_onMouseEnterComment: Invalid 'update' attr at star!"); (nUpdateTime<m_nAuthorsUpdateTime) && !$comment.hasClass("spam") && setCommentHot($comment); } function _toggleThread($btn) { var $replies = $btn.closest(".comment-replies"); if($replies.hasClass("thread-expanded")) { $replies.removeClass("thread-expanded").addClass("thread-collapsed"); } else if($replies.hasClass("thread-collapsed")) { $replies.removeClass("thread-collapsed").addClass("thread-expanded"); } else { assert(false, "_toggleThread: Invalid class!"); } } function _showFilterComments($btn) { var $restore = $btn.closest("li.restore.filter"), $top_comment = $restore.closest("li.comment.top"); $.each( $restore.attr("data").split(","), function(i, nId){ $top_comment.find("li.comment[data='" + nId + "']").show() } ); $restore.remove(); } function _loadSpamComments($btn) // load multi { var $restore = $btn.closest(".restore.spam-merge"), sHtml = ""; $restore.children("a").each( function() { var nCommentId = parseInt($(this).attr("name")); assert(!isNaN(nCommentId), "_loadSpamComments: Invalid 'name' attr!"); sHtml += getComment(nCommentId).showFull(); }); $restore.after($(sHtml)).remove(); } function _loadSpamComment($btn) // load single { var $comment = $btn.closest(".restore.spam").closest("li.comment"); var nCommentId = parseInt($comment.attr("data")), sHtml = ""; assert(!isNaN(nCommentId), "_loadSpamComment: Invalid 'data' attr at 'li.comment'!"); $comment.hasClass("top") && eachCommentId( m_arrLevelInfo[findLevel(nCommentId, false)].arrSubId, function(subComment){ sHtml += subComment.showFull() } ); sHtml = getComment(nCommentId).showFull({ showSpam: true, subComments: sHtml }); $comment.after($(sHtml)).remove(); } function _readMore($btn) { var $content = $btn.closest(".comment-content"); var nCommentId = parseInt($content.closest("li.comment").attr("data")); assert(!isNaN(nCommentId), "_readMore: Invalid 'data' attr at 'li.comment'!"); $content.html(getComment(nCommentId).getContentHtml({ showSpam: true, truncate: false })); } function _clickBBCodeLink(event, $btn) { var oUrl = new Url($btn.attr("href")), oUrlPage = new Url(); if(oUrlPage.sHost == oUrl.sHost && oUrlPage.sPath == oUrl.sPath) { event.preventDefault(); location.hash = "#" + (oUrl.getParam("comment") || ""); } } function _switchBBCodeIcon($btn) { var $center = $btn.hide().closest("center"); $center.find(".show-real, img.icon").show(); $center.find("img.real, .size").hide(); } function _switchBBCodeImg($btn) { var $center = $btn.hide().closest("center"); $center.find(".show-icon").show(); var $img_icon = $center.find("img.icon"), $img_real = $center.find("img.real"); if(!$img_icon.prop("complete")) { $img_icon.attr("alt", "无法显示评论图片 :( 可能是: 图片网址有误 或 网络传输超时"); return; } $img_icon.hide(); $img_real.show(); $center.find(".size").show(); if($img_real.hasAttr("src")) { return } var sImgUrl = $img_icon.attr("src").replace(/&resize_w=\d+/, ""); $img_real.attr("alt", "正在载入原始图 ......").attr("src", sImgUrl) .error(function(){ $(this).attr("alt", "图片无法加载 :( 可能是: 图片网址有误 或 网络传输超时") }) .load(function(){ onImgLoad($(this)) }); function onImgLoad($img) { var nFitWidth = $img.attr("alt", "").parent().width() - 8; if($img[0].clientWidth <= nFitWidth) { return } var sHtml = "<div class='size'><b>切换原始图的显示尺寸&#65306;</b><select>" + "<option value='" + $img[0].clientWidth + "'>适应图片尺寸</option>" + "<option value='" + nFitWidth + "'>适应窗口宽度</option></select></div>"; $(sHtml).insertAfter($img).children("select") .change(function(){ $img.css( "max-width", parseInt($(this).val()) ) }); } } // _switchBBCodeImg() end function _getBBCodeTip($element) { var sUrlProto = "\n\n&#65288;网址必须以 http:// 或 https:// 开头&#65289;"; var arrConfig = [ [ "a", "simple", "超链接语法:\n评论中插入的网址会自动识别成可点击的超链\n" + "为避免误判&#65292;网址&#12304;两端&#12305;最好是空格或回车&#65292;&#12304;不能是&#12305;半角符号" + sUrlProto ], [ "a", "text", "超链接语法:\n[url=网址]标题文字[/url]" + sUrlProto ], [ null, "image", "评论中的网址&#65292;如果对应的是图片&#65292;会被智能识别并把图片嵌入到评论中&#12290;\n\n" + "&#65288;为保护读者隐私&#65292;嵌入的图片用&#12304;Google图片代理&#12305;加载&#12290;\n" + "因此&#65292;存放图片的服务器&#12304;不会&#12305;看到你的&#8220;访问者IP&#8221;及&#8220;浏览器信息&#8221;&#65289;" ], [ "b", null, "粗体语法:\n[b]带粗体的文字[/b]" ], [ "i", null, "斜体语法:\n[i]带斜体的文字[/i]" ], [ "center", null, "居中语法:\n[center]居中的文字[/center]" ], [ null, "quote", "引用语法:\n[quote]被引用的文字[/quote]" ], [ "del", null, "删除线语法:\n[del]带删除线的文字[/del]" ] ]; var sTipContent = "&#12304;BBCode 语法提示&#12305;\n"; $.each( arrConfig, function(i, arrFields) { if(arrFields[0] && arrFields[0] != $element.prop("tagName").toLowerCase()) { return true } if(arrFields[1] && !$element.hasClass(arrFields[1])) { return true } return (sTipContent += arrFields[2]) && false; }); return sTipContent; } // _getBBCodeTip() end } // initEvent() end function init($comments) { { var $editor_src = $("a#comment-editor-src"); $editor_src.length && (m_sEditorUrl = $editor_src.attr("href")); assert(m_sEditorUrl, "init: Invalid 'm_sEditorUrl'!"); (m_sEditorUrl.indexOf("#") == -1) && (m_sEditorUrl += "#"); m_sPostId = (new Url(m_sEditorUrl)).getParam("postID"); assert(m_sPostId, "init: NOT found 'postID' in 'm_sEditorUrl' attr!"); } initEvent($comments); var nInitTotal = 0; if($comments.hasAttr("init_num")) { nInitTotal = parseInt($comments.attr("init_num")); assert(!isNaN(nInitTotal) && nInitTotal > 0, "init: Invalid 'init_num' attr!"); } else { $comments.attr("init_num", "0"); } $("#side-toolbar a.comment-number").html(nInitTotal >= 1000 ? (Math.floor(nInitTotal / 1000) + "K+") : nInitTotal); if(nInitTotal > 0) { $comments.find("#comment-holder").html("<div class='comment-thread'><ol class='top'/></div>"); $comments.children("#comments-loading").html("<div id='progress-bar' data='0'><div id='progress-label'/></div>"); $("#blog-pager").hide(); loadAllComments(); } else { var sHtml = "<a name='comments'> </a>" + "<h4 id='comments-label'/>" + "<div id='comments-toolbar'/>" + "<div id='comments-warning'/>" + "<div id='comments-content'>" + "<div id='comment-holder'><div class='comment-thread'><ol class='top'/></div></div>" + "</div>"; // comments-content $comments.html(sHtml).find("#comment-holder").show(); complete(); } // 'comment-actions' to add top comment { var sSpamTool = "<div class='spam-actions'><a class='show-banned' href='javascript:;'>BANNED CODE</a>" + "<br/><textarea id='banned-code' cols='100' rows='7' readonly='readonly'></textarea></div>"; var sHtml = "<div class='comment-actions top'><a class='add-btn' href='javascript:;'>添加评论</a></div>" + (isBlogAdmin() ? sSpamTool : ""); $comments.find("#comment-holder").after($(sHtml)); } $("#ie-ver-lt-10").length // IE version <= 9 && $comments.children("#comments-warning").html("你的 IE 版本太老&#65292;赶紧升级或者换个浏览器吧&#65281;"); } // init() end $(document).ready( function() { try { var $comments = $("#comments"); $comments.length && init($comments); } catch(err) { showBottomTip("<b>初始化评论界面出错&#65281;</b>", 0); reportError("init: Catch exception:\n" + err); } } ); }); </script> <style type="text/css"> #comments { margin-left: 0px !important; } /*--@ Label @--*/ #comments #comments-label { font-size: 140% !important; } /*--@ Loading info @--*/ #comments #comments-loading { width: 100%; text-align: left; } #comments #comments-loading #progress-label { position: absolute; left: 50%; margin-left: -20px; top: 50%; margin-top: -10px; font-size: 20px; font-weight: bold; } /*--@ Warning info @--*/ #comments #comments-warning { font-size: 125%; font-weight: bold; } /*--@ Toolbar @--*/ #comments #comments-toolbar { text-align: right; } #comments #comments-toolbar span { padding: 0px 12px; } #comments #comments-toolbar .filter-time-range { margin-top: 20px; } #comments #comments-toolbar .filter-time-range select { font-family: "Courier New", Courier, monospace; font-size: 1em; } /*--@ Dropdown menu @--*/ #comments .menubar { display: inline-block !important; } #comments .ui-menu { font-size: 100% !important; text-align: left; white-space: nowrap !important; z-index: 256; } #comments .ui-menu-icon { display: none; } #comments .ui-menu-item a { color: #0066FF; text-decoration: none; padding: 0px 10px; } #comments .ui-menu.dropdown { text-align: center !important; background-color: transparent !important; background: none !important; border-style: none !important; } /*--@ Thread @--*/ #comments #comment-holder { display: none; /* temporary hide */ } #comments .comment-thread ol { list-style-type: none !important; } #comments li.comment .comment-block { background: transparent; background-color: LightGray; padding: 10px !important; border: 3px solid Silver; border-radius: 10px; margin-left: 60px !important; } #comments li.comment .comment-block.match { border-color : CadetBlue !important; } #comments li.comment .comment-block.unread { background-color: Snow !important; } #comments li.comment .comment-block.current { border-color: DodgerBlue !important; } #comments li.comment.spam .comment-block { background-color: DarkGray !important; border-color: DarkGray !important; } #comments li.comment.sub { padding: 0px !important; } #comments li.comment.sub .comment-block { border: 2px solid Silver; } /*--@ Restore hidden comments @--*/ #comments li.restore { text-align: center; margin: 15px 0px; } /*--@ Button of expand/collapse @--*/ #comments .comment-replies.thread-expanded .comment-thread { display: block; } #comments .comment-replies.thread-expanded .thread-toggle { width: 60px !important; height: 18px !important; background: url(https://lh4.googleusercontent.com/-4ERG2oTbBto/VCLpPtQq6TI/AAAAAAAAAwY/McjQoGb27Hs/expanded.png) no-repeat scroll 0px 3px transparent; } #comments .comment-replies.thread-expanded .thread-toggle:after { content: "折叠"; float: right; color: Gray; } #comments .comment-replies.thread-collapsed .comment-thread { display: none; } #comments .comment-replies.thread-collapsed .thread-toggle { width: 60px !important; height: 18px !important; background: url(https://lh6.googleusercontent.com/-75fy7CaLijk/VCLpob33T4I/AAAAAAAAAwo/N5ANIayhyfU/collapsed.png) no-repeat scroll 0px 3px transparent; } #comments .comment-replies.thread-collapsed .thread-toggle:after { content: "展开"; float: right; color: Gray; } /*--@ Comment header @--*/ #comments .comment-header { overflow: hidden; padding-bottom: 8px; } #comments .comment-header .star { font-size: 80%; color: DeepPink; margin-left: 10px; } #comments .comment-header cite.user { font-style: normal !important; } #comments .comment-header cite.blog-author a { border-bottom: 2px solid !important; } #comments .comment-header cite.blog-author a:hover { text-decoration: none !important; } #comments .comment-header .datetime { margin-left: 40px !important; } #comments .comment-header .hot { float: right; text-align: right; font-size: 115%; color: DeepPink; margin-left: 15px; } #comments .comment-header .counter { float: right; text-align: right; font-size: 125%; margin-left: 15px; } #comments li.comment.sub .comment-header .counter { font-size: 100%; } /*--@ Button of actions @--*/ #comments .comment-actions { height: 30px; padding-top: 8px; } #comments .comment-actions .reply-btn, #comments .comment-actions .blog-admin, #comments .comment-actions .menubar { margin-right: 20px; } #comments .comment-actions .add-btn { float: right; margin-left: 20px; } #comments .comment-actions .mark-spam { float: right; padding-top: 5px; } #comments .comment-actions .go-level-current, #comments .comment-actions .go-level-up, #comments .comment-actions .go-level-down, #comments .comment-actions .go-level { float: right; margin-left: 10px; } #comments .comment-actions .go-level-up, #comments .comment-actions .go-level-down { font-size: 125%; } #comments .comment-actions .go-level { width: 75px; height: 30px; font-family: "Courier New", Courier, monospace; line-height: 30px; } #comments .comment-actions .go-level > option.spam { background-color: Gray; } #comments .comment-actions .add-btn, #comments .comment-actions .reply-btn { font-weight: bold; background: transparent url(https://lh3.googleusercontent.com/-Gvp33TYNyrw/SY01Gm5ITiI/AAAAAAAAAao/6Uh-A5Lm5tk/external_link.gif) no-repeat scroll right center; padding-right: 13px; } #comments .comment-actions.top { /* at page bottom */ font-size: 125%; margin: 40px 0px; } #comments .comment-actions.top .add-btn { /* at page bottom */ float: left; margin-left: 0px; } /*--@ Comment content @--*/ #comments .comment-content { overflow: hidden; position: relative !important; background-color: inherit !important; } /*--@ Deleted or banned comment @--*/ #comments .comment-content .deleted-comment, #comments .comment-content .banned-comment { font-style: italic !important; color: Gray !important; background-color: inherit !important; } /*--@ BBcode @--*/ #comments .comment-content a[target="_blank"] { background: transparent url(https://lh3.googleusercontent.com/-Gvp33TYNyrw/SY01Gm5ITiI/AAAAAAAAAao/6Uh-A5Lm5tk/external_link.gif) no-repeat scroll right center; padding-right: 13px; } #comments .comment-content .bbcode img { border: 1px solid Black; } #comments .comment-content .bbcode img.icon { max-width: 128px; max-height: 96px; } #comments .comment-content .quote { background-color: LightSteelBlue; } #comments .comment-content div.quote { margin: 0em 2em; } #comments .comment-content del { color: Gray; } /*--@ Image of avatar @--*/ #comments .avatar-image-container, #comments .avatar-image-container img { width: 48px !important; height: 48px !important; max-width: 48px !important; max-height: 48px !important; border: none !important; } /*--@ Editor @--*/ #comments .comment-form, #comments iframe#comment-editor { display: none !important; } /*--@ Button of 'load more' @--*/ #comments .loadmore { display: none !important; } /*--@ Comment footer @--*/ #comments .comment-footer { display: none !important; } </style> <noscript> <style type="text/css"> /*--@ Thread @--*/ #comments #comment-holder { display: block !important; /* restore visible */ } /*--@ Buttons @--*/ #comments .comment-thread .continue a, #comments .thread-count a { display: none !important; } #comments .comment-replies .thread-toggle { cursor: default !important; } #comments .comment-replies .thread-toggle:after { content: ""; } /*--@ Counter @--*/ #comments .comment-thread ol { counter-reset: comment_counter; } #comments .comment-thread li .comment-header:after { content: counter(comment_counter,decimal) "楼"; counter-increment: comment_counter; float: right; position: relative; z-index: 1; font-size: 125%; color: #0066FF; border: none; } #comments .comment-thread ol ol { counter-reset: child_comment_counter; } #comments .comment-thread li li .comment-header:after { content: counter(comment_counter,decimal) "楼 " counter(child_comment_counter,decimal) "单元"; counter-increment: child_comment_counter; font-size: 100%; } /*--@ Comment block @--*/ #comments .comment-header .datetime { display: inline-block !important; width: 144px !important; text-overflow: ellipsis !important; overflow: hidden !important; white-space: nowrap !important; } #comments .comment-actions { display: none !important; } </style> </noscript> </div> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=HTML&widgetId=HTML5&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("HTML5"));' rel='nofollow' target='configHTML5' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div><div class='widget HTML' data-version='1' id='HTML4'> <h2 class='title'>最新评论</h2> <div class='widget-content'> <script type="text/javascript"> jQuery(function($) { // Module variables var m_mapTweets = {}; var m_nMinCommentId = null; var m_nMaxCommentId = null; var m_nInitNum = 0; var m_bLoading = false; var m_nAutoLoadTimeout = null; var m_nAutoLoadCount = null; var m_nSpamNum = 0; var m_nNoiseNum = 0; // anti spam DOS attack var m_spamManual = new ManualAnalyzer(); var m_spamUser = new UserAnalyzer(); var m_spamTimeGroup = new TimeGroupAnalyzer({ range:900, offset:90 }); var m_spamTextGroup = new TextGroupAnalyzer(); var m_spamTextUrl = new UrlAnalyzer({ critical:2 }); var m_spamTextFeature = new TextFeatureAnalyzer(); var m_nTimeGroupCritical = 12; window.g_loadTweets = function(bInit, bAuto) { m_bLoading = true; var sFeedUrl = Url.getFeedUrlPrefix() + "/comments/full?alt=json&v=2&orderby=published"; var bLoadOld = false; if(bInit) { sFeedUrl += "&max-results=" + m_nInitNum; if(m_nMinCommentId !== null) { bLoadOld = true; sFeedUrl += "&published-max=" + (new Date(m_nMinCommentId-1)).toISOString(); $("#tweets .comments-loading").html("检测到刷屏&#65292;加载更早的评论..."); } else { $("#tweets .comments-loading").html("正在加载..."); } } else { if(null === m_nMaxCommentId) { return } sFeedUrl += "&published-min=" + (new Date(m_nMaxCommentId+1)).toISOString(); $("#tweets .comments-loading").html("正在刷新..."); } $.ajax({ url: sFeedUrl, dataType: "json", success: function(json) { loadComplete(json, bInit, bLoadOld); }, error: function(xhr, sStatus) { (!bAuto && !bInit) // Manual refresh && reportHttpError("获取最新评论出错", xhr, sStatus); }, complete: function() { m_bLoading = false; $("#tweets .comments-loading").html(""); (!bAuto && !bInit) // Manual refresh && $("#tweets .comments-toolbar .refresh").show(); }, timeout: 1000 * 30 }); } // g_loadTweets() end function updateCreateTime() { $("#tweets .comment-block .comment-header .datetime").each( function(nIndex) { var sId = $(this).closest(".comment-block").attr("id"); var nCommentTime = parseInt(sId.substr(8)); // Trim "comment-" assert(!isNaN(nCommentTime), "updateCreateTime: Invalid 'id' attr!"); $(this).html( getRelativeTimeDesc(new Date(nCommentTime)) ); } ); } function updateArticleTitle() { var bNotFoundComment = false; $("#tweets .comments-content .comment-text a").each( function(nIndex) { var $comment_link = $(this); if(location.pathname == $comment_link[0].pathname) { var $comment_block = $comment_link.closest(".comment-block"); var sCommentId = $comment_block.attr("id").substr(8); // Trim "comment-"; $comment_link.attr("href", "#" + sCommentId); $comment_block.children(".comment-article").html("&#65288;该评论已经在当前页面中&#65289;"); (0 == $("#comment-holder li.comment[data='" + sCommentId + "']").length) && (bNotFoundComment = true); } } ); bNotFoundComment && window.g_loadNewComments(); // Notify comment module to refresh } function loadComplete(json, bInit, bLoadOld) { saveTweets(json, bInit, bLoadOld); updateCreateTime(); if(!bInit) { updateArticleTitle(); return; } if($("#tweets .comments-content .comment-block").length < m_nInitNum) { delayRun(function(){ g_loadTweets(true, false) }, 200); } else { $("#tweets .comments-toolbar .refresh").show(); (new Url(null)).getParam("comment") && $("#comments #comments-loading").is(":visible") && $("#comments").scrollTo("fast"); // Make comment loading progressbar visible asyncLoop( // Wait comments UI load complete function(){ return $("#comments #comment-holder").is(":visible") ? (!!updateArticleTitle() && false) : true }, 500, "pollingCommentsUI" ); } } // loadComplete() end function saveTweets(json, bInit, bLoadOld) { if(!("feed" in json) || !("entry" in json.feed)) { return } var arrId = []; for(var n=json.feed.entry.length-1; n>=0; n--) // from old to new { var comment = new Comment(json.feed.entry[n]); if(comment.bIsInstruction || comment.nId in m_mapTweets) { continue } m_mapTweets[comment.nId] = comment; arrId.push(comment.nId); ( (null===m_nMinCommentId) || (comment.nId < m_nMinCommentId) ) && (m_nMinCommentId = comment.nId); ( (null===m_nMaxCommentId) || (comment.nId > m_nMaxCommentId) ) && (m_nMaxCommentId = comment.nId); // anti spam DOS attack m_spamManual.isSpam(comment) && (comment.nSpamType = 40); (0 == comment.nSpamType) && (comment.nSpamType = m_spamUser.getSpamType(comment)); if(comment.oAuthor.isAnonymous()) { m_spamTimeGroup.addTime(comment.nId); // for ALL anonymous // The value of 'nSpamType', @see 'getSpamTypeDesc()' (0 == comment.nSpamType) && m_spamTextUrl.isSpam(comment) && (comment.nSpamType = 31); (0 == comment.nSpamType) && m_spamTextFeature.isSpam(comment) && (comment.nSpamType = 40); (0 == comment.nSpamType) && (comment.nTextGroupId = m_spamTextGroup.addComment( comment, {critical:0.6} )); } } bLoadOld && arrId.sort(function(a, b){ return Number.cmp(a, b) * -1 }); // reverse sort showTweets(arrId, bInit, bLoadOld); (m_nSpamNum > 0 || m_nNoiseNum > 0) && $("#tweets hr").show(); (m_nSpamNum > 0) && $("#tweets .spam-count").html(m_nSpamNum).parent().show(); (m_nNoiseNum > 0) && $("#tweets .noise-count").html(m_nNoiseNum).parent().show(); } // saveTweets() end function showTweets(arrCommentId, bInit, bLoadOld) { var $content = $("#tweets .comments-content"); var nHiddenCount = 0; for(var i=0; i<arrCommentId.length; i++) { var comment = m_mapTweets[arrCommentId[i]]; if(comment.nSpamType > 0) { m_nSpamNum++; nHiddenCount++; continue; } if(comment.oAuthor.isAnonymous()) // anti spam DOS attack { if(m_spamTimeGroup.getSimilarNum(comment.nId) >= m_nTimeGroupCritical) { comment.nSpamType = 20; // @see 'getSpamTypeDesc()' m_nSpamNum++; nHiddenCount++; continue; } else if(comment.nTextGroupId && m_spamTextGroup.getSimilarNum(comment) >= 2) { comment.nSpamType = 30; // @see 'getSpamTypeDesc()' m_nSpamNum++; nHiddenCount++; continue; } } if(comment.sText.mergeCJK().length <= 6) // Too short, lacks info { m_nNoiseNum++; nHiddenCount++; continue; } var $comment_block = comment.showSummary({ columnWidth:40, maxLineNum:5 }).addClass("comment-block"); var sHtml = (nHiddenCount > 0 ? "<div class='comment-block ignore' data='"+nHiddenCount+"'>" + "&#65288;此处自动过滤了 "+nHiddenCount+" 条&#65289;</div>" : ""); bLoadOld ? $content.append($comment_block) : $content.prepend($comment_block); (nHiddenCount > 0) && (nHiddenCount = 0); if(!bInit) { $comment_block.css("background-color", "LightYellow"); delayRun(function(){ $comment_block.css("background-color", "White") }, 1000*10); } } // for() end } // showTweets() end function initAutoLoad(mapConfig) { if(mapConfig["tweets.auto-load"] != "true") { $("#tweets .comments-auto-load .disable").show(); return; } var nMinutes = parseInt(mapConfig["tweets.auto-load-timeout"]); (isNaN(nMinutes) || nMinutes<=0) && (nMinutes = 5); $("#tweets .comments-auto-load .enable .timeout").html(nMinutes); $("#tweets .comments-auto-load .enable").show(); m_nAutoLoadTimeout = nMinutes * 60; m_nAutoLoadCount = m_nAutoLoadTimeout; var nInterval = 5; setInterval( function() { if(!m_bLoading) { m_nAutoLoadCount -= nInterval; if(m_nAutoLoadCount <= 0) { m_nAutoLoadCount = m_nAutoLoadTimeout; g_loadTweets(false, true); } } }, 1000 * nInterval ); } // initAutoLoad() end function loadManualBannedId() { m_spamManual.parseSpamList($(".post .post-body").html()); $.ajax({ url: Url.getFeedUrlPrefix() + "/posts/full?alt=json&max-results=1", // only get newest post dataType: "json", success: function(json) { ("feed" in json) && ("entry" in json.feed) && m_spamManual.parseSpamList(json.feed.entry[0].content.$t); }, error: function(xhr, sStatus) { }, complete: function() { var mapConfig = loadConfig(); m_nInitNum = parseInt(mapConfig["tweets.init-num"]); assert(!isNaN(m_nInitNum), "init: Invalid 'init-num' attr!"); (m_nInitNum < 10) && (m_nInitNum = 10); (m_nInitNum > 100) && (m_nInitNum = 100); g_loadTweets(true, false); initAutoLoad(mapConfig); }, timeout: 1000 * 40 }); } // loadManualBannedId() end function init() { if(location.pathname.match(/^\/p\/\w+\.html$/)) // This is page, NOT article { $("#tweets").closest(".widget").hide(); return; } loadManualBannedId(); Comment.initArticlesMap(8); $("#tweets .comments-toolbar .refresh").click( function() { $(this).hide(); g_loadTweets(false, false); } ); setInterval(updateCreateTime, 1000 * 60 * 10); } // init() end $(document).ready( function() { try { init() } catch(err) { reportError("init: Catch exception: " + err) } } ); }); </script> <a name="tweets"></a> <div id="tweets"> <div class="comments-toolbar"> <a class="feed-link" href="https://program-think.blogspot.com/feeds/comments/default" title="订阅最新评论"><img src="https://lh5.googleusercontent.com/-6oleSG-DCYU/SZ5PE7w1kgI/AAAAAAAAAao/MTZz9nhJ2Dw/s24/feed-icon-animated.gif" width="24" height="24" alt="订阅地址"/></a> <a href="/p/options.html#tweets-auto-load" target="_blank" title="界面配置"><img src="https://lh5.googleusercontent.com/0x2IO713ZAWAhuqV2krwhjRydPOZgZ4Ura1l-5ghT9g9KpQ85qboSCNuo11J0xLI8QXb5NYVeqbtq7bWMewyChtuF-SsQzdi77lJwHUucsP-VGtahC3dbP8IfrexanTYs-8gioX-xLQ" width="24" height="24" alt="界面配置"/></a> <a class="refresh" href="javascript:;" title="手动刷新" style="display:none;"><img src="https://lh3.googleusercontent.com/QWEIcReBUwX5fSK_r00QkFeV8iJyZWXPzdKem1ya5FhezaPqgKa9RHz_MZPTRhITUcu3hEz13dh9wZqROZLdVNkvkhSlv__0eDc3q5u85edXC9_J7GrWeP9Lt-7Mvz5DNzz-LTw0sV8" width="24" height="24" alt="手动刷新"/></a> <span class="comments-loading"></span> </div> <div class="comments-auto-load"> <span class="enable" style="display:none;">自动刷新已启用&#65288;间隔 <b class="timeout"></b> 分钟&#65289;</span> <span class="disable" style="display:none;">自动刷新已禁用</span> </div> <hr style="display:none;"/> <div class="comments-warning"> <noscript> <b>你的浏览器&#12304;禁用了&#12305;JavaScript 脚本&#65292;<br/>无法显示&#8220;最新评论&#8221; :(</b> </noscript> <div style="display:none;"> 共自动过滤了 <span class="noise-count" style="font-weight:bold;"></span> 条&#12304;没信息量&#12305;的留言 </div> <div style="display:none;"> 共自动过滤了 <span class="spam-count" style="font-weight:bold;"></span> 条&#12304;垃圾或刷屏&#12305;的留言 </div> </div> <hr style="display:none;"/> <div class="comments-content"></div> </div> <style type="text/css"> #tweets { margin-right: 30px; } #tweets .comments-toolbar, #tweets .comments-auto-load, #tweets .comments-content, #tweets .comments-warning { padding-bottom: 6px; } #tweets .comments-content .comment-block { padding: 12px 0px; } #tweets .comments-content .comment-block.ignore { background-color: Silver; } /*--@ Comment header @--*/ #tweets .comments-content .comment-header img.avatar { width: 36px; height: 36px; max-width: 36px; max-height: 36px; border: none; } #tweets .comments-content .comment-header cite.author { font-style: normal; font-size: 100%; font-weight: bold; margin: 0px 18px; } #tweets .comments-content .comment-header cite.author.blog-author { border-bottom: 1px solid !important; } #tweets .comments-content .comment-header .datetime { font-size: 80%; font-style: italic; color: Gray; } #tweets .comments-content .comment-article { padding: 5px 0px; } /*--@ Comment text @--*/ #tweets .comments-content .comment-text a[target="_blank"] { background: transparent url(https://lh3.googleusercontent.com/-Gvp33TYNyrw/SY01Gm5ITiI/AAAAAAAAAao/6Uh-A5Lm5tk/external_link.gif) no-repeat scroll right center; padding-right: 13px; } </style> </div> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=HTML&widgetId=HTML4&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("HTML4"));' rel='nofollow' target='configHTML4' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div><div class='widget HTML' data-version='1' id='HTML6'> <div class='widget-content'> <script type="text/javascript"> jQuery(function($) { m_mapMaxim = { arrDefault : [ "一个人的价值, 在于他贡献了什么, 而不在于他获得了什么! @爱因斯坦", "你若喜爱你自己的价值, 你就得给世界创造价值! @歌德", "我从来不把安逸和享乐当作生活目的; 对这种伦理基础, 我称之为[猪栏的理想] @爱因斯坦 /2012/04/weekly-share-0.html", "未经反思自省的人生不值得去过 The unexamined life is not worth living. @苏格拉底 (哲学之父)", "大多数人在20到30岁就已经过完自己的一生; 一过了这个年龄段, 他们就变成自己的影子, 以后的生命只是在不断重复自己... @<约翰.克里斯朵夫>罗曼.罗兰 (作家 诺贝尔奖得主)", "活着, 如同生命最后一天般活着; 学习, 如同永远活着般学习! @圣雄甘地 (印度国父)", "人所面对的绝境, 在很多情况下都不是生存的绝境, 而是[精神]的绝境!", "世上只有一种英雄主义 -- 就是在认清生活的真相之后依然热爱生活 @罗曼.罗兰 (作家 诺贝尔奖得主)", "人的一切痛苦都是源于对自己无能的愤怒 @王小波 (作家)", "Stay hungry. Stay foolish. @乔布斯引自<全球概览> /2012/04/weekly-share-0.html", "人生中最大的两个财富是: 你的[才华]和你的[时间]&#12290; 才华越来越多而时间越来越少&#12290;我们的一生就是用时间来换取才华&#12290;", "拥有追随自己内心与直觉的勇气 -- 你的内心与直觉多少已经知道你真正想要成为什么样的人 Have the courage to follow your heart and intuition. They somehow already know what you truly want to become. @乔布斯 /2012/04/weekly-share-0.html", "善良比聪明重要 -- 聪明是一种天赋, 而善良是一种选择 Cleverness is a gift, kindness is a choice. @贝佐斯 (亚马逊公司创始人)", "我每天都自问: '如果今天是我生命的最后一天, 我还会做今天要做的事情吗?' 如果连续很多天得到[否定]的回答, 那我就需要作出一些改变了&#12290; @乔布斯 /2012/04/weekly-share-0.html", "预测未来最好的方法就是去创造未来 @林肯 (美国前总统)", "没有人可以回到过去, 重新开始; 但谁都可以从现在开始, 书写一个全然不同的结局!", "人生最大的痛苦不是失败 而是没有经历自己想要经历的一切", "许多人所谓的成熟, 不过是被习俗磨去了棱角, 变得世故而实际了; 那不是成熟, 而是精神的早衰和个性的夭亡! 真正的成熟, 应当是独特个性的形成, 真实自我的发现, 精神上的结果和丰收&#12290; @<在世纪的转折点上>尼采 (哲学家 思想家)", "这辈子没法做太多的事情, 所以每一件都要做到精彩绝伦! @乔布斯", "你的时间有限, 所以不要浪费时间去重复别人的生活! Your time is limited, so don`t waste it living someone else`s life. @乔布斯 /2012/04/weekly-share-0.html", "每个人出生的时候都是原创 可悲的是很多人渐渐都成了盗版", "时间会刺破青春的华丽精致 会把平行线刻上美人的额角 会吃掉稀世之珍和天生丽质 什么都逃不过它横扫的镰刀 @莎士比亚", "死亡是生命中最好的发明 -- 它把旧的清除以便给新的让路 @乔布斯", "一年之计 莫如树谷 十年之计 莫如树木 终身之计 莫如树人 @<管子>", "非淡泊无以明志 非宁静无以致远 @<淮南子>刘安", "你若不想做, 总能找到借口 你若想做, 总会找到方法 @阿拉伯谚语", "想得到你从未拥有过的东西 就必须做你从未做过的事情", "你若失去了财产, 你只失去了一点儿; 你若失去了荣誉, 你就失去了许多; 你若失去了勇气, 你就把一切都失去了! @歌德", "那不能杀死我的, 使我更强! What does not kill me, makes me stronger. @尼采 (哲学家 思想家) /2018/12/Book-Review-Antifragile-Things-That-Gain-from-Disorder.html", "对爱情的渴望, 对知识的追求, 对人类苦难不可遏制的同情心, 这三种纯洁而无比强烈的激情支配着我的一生&#12290; Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. @<我为什么而活着>罗素 (哲学家 数学家 思想家)", "围在城里的人想逃出来, 城外的人想冲进去; 对婚姻也罢, 职业也罢, 人生的愿望大都如此! @<围城>钱钟书", "授人以鱼不如授人以渔! 授人以鱼只救一时之急, 授人以渔则可解一生之需! (注: 这也是俺博客的宗旨)" ], arrThink : [ "兴趣是最好的老师 @爱因斯坦 /2015/12/Hobbies-and-Interests.html", "知识上的投资总能得到最好的回报 @富兰克林 (美国开国元勋 物理学家 作家) /2013/09/knowledge-structure.html", "学习不是填满水桶, 而是点燃火焰! Education is not the filling of a pail but the lighting of a fire. @叶芝 (爱尔兰诗人)", "我唯一能确定的就是自己的[无知] I know nothing except the fact of my ignorance. @苏格拉底 (哲学之父)", "真正的无知[不是]知识的贫乏 而是拒绝获取知识 @波普尔 (哲学家 思想家)", "读书是在别人思想的帮助下建立自己的思想 @尼古拉.鲁巴金 (作家) /2013/04/how-to-read-book.html", "不要盲目地崇拜任何权威 -- 因为你总能找到相反的权威 @罗素 (哲学家 数学家 思想家) /2014/05/fans-and-idolatry.html", "不必为自己的独特看法而害怕 因为我们现在所接受的常识都曾是独特看法 @<自由思想的十诫>罗素 (哲学家 数学家 思想家)", "仅仅凭借信仰跟从就等于[盲从] To follow by faith alone is to follow blindly. @富兰克林 (美国开国元勋 物理学家 作家)", "想象力比知识更重要! 因为知识是有限的, 而想象力概括着世界的一切, 推动着进步, 并且是知识进化的源泉 @爱因斯坦", "要打破人的偏见比崩解一个原子还难! @爱因斯坦", "大多数人宁愿相信[美丽的谎言] 而不愿意直面[丑陋的真相]", "你要按你所想的去生活 否则你迟早会按你所生活的去想", "知人者智 自知者明 胜人者有力 自胜者强 @<道德经>", "大多数人宁愿死去也不愿思考 事实上他们也确实到死都没有思考 @罗素 (哲学家 数学家 思想家)", "对知识分子而言, 成为思维的精英比成为道德的精英更重要! @王小波 (作家)", "只有两样东西可能是无限的 -- 宇宙的大小和人类的愚蠢 不过, 对于前者我不太确定 :-) @爱因斯坦" ], arrProgram : [ "没有银弹(万能药) NO silver bullet @<人月神话>Fred Brooks (图灵奖得主) /2009/03/book-review-mythical-man-month.html", "编程的艺术就是处理复杂性的艺术 @Edsger Dijkstra (图灵奖得主)", "简单即是美 Simple is beautiful", "简单是可靠的先决条件 Simplicity is prerequisite for reliability. @Edsger Dijkstra (图灵奖得主)", "优秀软件的作用是让复杂的东西看起来简单 @Grady Booch (UML 创始人之一)", "设计软件有两种方法: 一种是简单到极致而明显没有缺陷; 另一种是复杂到极致以至于没有明显的缺陷&#12290;前者要难得多! There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult. @C.A.R.Hoare (图灵奖得主 算法大牛)", "优秀的设计在不断地演化 糟糕的设计在不断地打补丁", "最纯粹&#12289;最抽象的设计难题就是设计桥梁 -- 你面对的问题是: 如何用最少的材料, 跨越给定的距离&#12290; @保罗.格雷汉姆 (顶级黑客 硅谷创业教父)", "从不同的层次审视你的设计", "在软件[可重用]之前先得[可用] @Ralph Johnson (设计模式四人帮之一)", "软件设计就像做爱, 一次犯错, 你要用余下的一生来维护 :-) @Michael Sinz", "更好的工具未必能做出更好的设计", "好的程序员是那种过单行道马路都要往两边看的人 @Doug Linder", "好的程序代码本身就是最好的文档 @<代码大全>Steve McConnell", "程序必须首先让人类可以理解 然后顺便让机器能执行 @<SICP>", "假如程序代码和注释不一致, 那么很可能两者都是错的! When code and comments disagree, both are probably wrong. @Norm Schryer (贝尔实验室科学家)", "你写下的任何代码, 六个月后再去看, 都像是别人写的 :-) @Tom Cargill (贝尔实验室科学家)", "程序员花90%的时间完成90%的代码量, 但是剩下的10%代码要再花费90%的开发时间 (90-90法则) @Tom Cargill (贝尔实验室科学家)", "不能影响你编程观点的语言, 不值得你去学! @Alan Perlis (第一个图灵奖得主)", "世界上只有两种编程语言 -- 要么充满了抱怨; 要么没人使用 :-) @Bjarne Stroustrup (C++ 之父)", "没有哪种编程语言能阻止程序员写出糟糕的代码, 不管这种语言的结构有多么好! @Larry Flon", "C 语言诡异离奇, 缺陷重重, 但却获得了巨大的成功 :-) @Dennis Ritchie (C 语言之父 Unix 之父)", "(相对 C 而言)在 C++ 里, 想搬起石头砸自己的脚更为困难了; 不过一旦你真这么做了, 整条腿都得报销 :-) @Bjarne Stroustrup (C++之父)", "Java 与 JavaScript 的关系, 如同雷锋与雷峰塔的关系 :-)", "在理论上, 理论和实践是没有差异的; 但在实践中, 是有差异的! In theory, there is no difference between theory and practice. But in practice, there is. @Snepscheut", "在进度落后的项目中增加人手只会导致进度更加落后 @<人月神话>Fred Brooks (图灵奖得主) /2009/03/book-review-mythical-man-month.html", "用代码行数测算软件开发进度 如同 按重量测算飞机的制造进度 @比尔.盖茨", "在水上行走和按需求文档开发软件都很容易 -- 前提是它们都处于冻结状态 @Edward V Berard", "乐观主义是软件开发的职业病 用户反馈则是其治疗方法 @Kent Beck (Extreme Programming 之父)", "软件开发是一场程序员和上帝的竞赛: 程序员要开发出更强更好&#12289;连傻瓜都会用的软件; 而上帝在努力创造更傻的傻瓜&#12290; 到目前为止, 一直是上帝赢 :-) @Rick Cook", "如果建筑工人像程序员写软件那样盖房子, 那第一只飞来的啄木鸟就能毁掉人类文明 :-) @Gerald Weinberg (软件工程大牛)", "如果说调试(debug)是去除 bug 的过程, 那么编程就是制造 bug 的过程&#12290; @Edsger Dijkstra (图灵奖得主)", "要在自己的代码里找 bug 是很难的; 而当你认为你的代码没有错误时, 找 bug 就更难了! @<代码大全>Steve McConnel", "调试代码比写代码更困难; 因此, 如果你尽自己所能写出了最复杂的代码, 你将没有更大的智慧去调试它 :-)", "过早的优化是万恶之源 Premature optimization is the root of all evil. @Donald Knuth (图灵奖得主 算法大牛)", "Tape is Dead, Disk is Tape, Flash is Disk, RAM Locality is King! @Jim Gray (图灵奖得主 数据库大牛)", "软件就像[性] -- 免费的时候更好 :-) Software is like sex, it`s better when it`s free. @Linus Torvalds (Linux 之父)" ], arrPolity : [ "在民主国家, 最高原则是全民的利益而不是统治者的利益&#12290; 服从民主国家的统治权并不会使人变为奴隶, 而是使人变为公民&#12290; @斯宾诺莎 (哲学家 思想家)", "国家为人而立, 而非人为国家而活&#12290; 国家的最高使命是保护个人, 使其有机会发展成为有创造才能的人&#12290; @爱因斯坦", "如果政府不能解决问题, 那它本身就成为问题! @里根 (美国前总统)", "民众不应该害怕他们的政府, 政府才应该害怕它的民众! People should not be afraid of their governments. Governments should be afraid of their people. @电影<V怪客&#65295;V字仇杀队> /2011/11/film-v-for-vendetta.html", "制造恐惧是专制政府的终极武器 @电影<V怪客&#65295;V字仇杀队> /2011/11/film-v-for-vendetta.html", "宪法的基本原则是: 个人可以做任何事情, 除非法律禁止; 政府不能做任何事情, 除非法律许可&#12290; @约翰.洛克 (哲学家 思想家)", "财产不应公有, 权力不应私有 -- 否则将会坠入地狱! @约翰.洛克 (哲学家 思想家)", "没有财产权就没有正义 @哈耶克 (诺贝尔经济学奖得主 政治思想家)", "爱国者的责任就是保护国家不受政府侵犯 @托马斯.潘恩 (政治思想家)", "[反抗政府]的精神, 在某些场合是如此珍贵, 我希望它永远保持活跃! @托马斯.杰斐逊 (美国前总统 <独立宣言>起草人)", "没有投票权的征税就是暴政 @詹姆斯.奥蒂斯 (美国独立时期评论家)", "当法律失去公正 则反抗成为义务 When injustice becomes law, resistance becomes duty.", "自由不是想做什么就做什么; 自由是教会你不想做什么就可以不做什么! Freedom is not letting you do whatever you wanna but teaching you not to do the things you don`t wanna do. @<实践理性批判>康德 (哲学家 思想家)", "牺牲[基本自由]来换取暂时的安全, 最后既得不到安全也得不到自由! @富兰克林 (美国开国元勋 物理学家 作家)", "民主制度在[自由]中寻求平等 社会主义制度在[奴役]中寻求平等 @哈耶克 (诺贝尔经济学奖得主 政治思想家)", "现在有人对你们说: '牺牲你们个人的自由, 去求国家的自由!' 我要对你们说: '争取个人的自由, 就是争取国家的自由; 争取个人的人格, 就是争取国家的国格&#12290;自由平等的国家不是一群奴才建造得起来的!' @胡适 (思想家) /2013/11/weekly-share-57.html", "美国人来了, 有面包有自由; 苏俄来了, 有面包无自由; 中共来了, 无面包无自由! @胡适 (思想家) /2014/07/artists-and-ccp.html", "告诉你我的孩子, 在你一生中有许多事值得争取, 但[自由]无疑是最重要的! 永远不要带着脚镣, 过奴隶的生活! @电影<勇敢的心>", "法律本身并不能保证言论自由; 要做到这一点, 必须所有人都有包容精神&#12290; Laws alone can not secure freedom of expression; in order that every man present his views without penalty there must be spirit of tolerance in the entire population. @爱因斯坦", "亲爱的同胞们, 不要问你们的国家能为你们做些什么, 而要问你们能为国家做些什么? 全世界的公民们, 不要问美国愿意为你们做些什么, 而应该问我们在一起能为人类的自由做些什么? (注: 这句名言经常被有意省略了第2段) @肯尼迪 (美国前总统)", "自由人不会去问: '他的国家能为他做些什么?' 也不会去问: '他能为他的国家做些什么?' 他们问的是: '我和我的同胞们能通过政府做些什么?' @米尔顿.弗里德曼 (诺贝尔经济学奖得主)", "解放一个习惯于被奴役的民族 比 奴役一个习惯于自由的民族 更难 @孟德斯鸠 (启蒙思想家) /2012/06/stockholm-syndrome.html", "将愚人从他们所敬拜的锁链下解放出来是非常困难的 @伏尔泰 (启蒙思想家) /2012/06/stockholm-syndrome.html", "专政与民主是对立的统一, 人民民主是基础, 只有充分民主才能有专政; 脱离了民主就成了[法西斯专政]! @胡耀邦 谈'人民民主专政'", "如果人民不欢迎我们, 我们就该下台了! @胡耀邦", "民主是自下而上争取的 不是自上而下赐予的 @方励之 (科学家 政治异议人士)", "民主并非只是选举投票; 它是生活方式, 是思维方式, 是你每天呼吸的空气, 举手投足的修养, 个人回转的空间... @龙应台 (台湾作家)", "共产主义是一种伪科学, 演变成一种伪宗教, 最终表现为僵化的集权式的邪恶政治集团! @<共产主义实录>Richard Pipes", "作为一名预言家, 马克思失败的原因, 完全在于历史主义的贫乏! @<历史决定论的贫困>波普尔 (哲学家 思想家)", "尝试创建人间天堂, 最终只会创造出地狱! The attempt to make heaven on earth invariably produces hell. @波普尔 (哲学家 思想家)", "总是使一个国家变成人间地狱的东西, 恰恰是人们试图将其变成天堂! What has always made the state a hell on earth has been precisely that man has tried to make it heaven. @荷尔德林 (哈耶克<通往奴役之路>第2章把此句作为引言)", "如何判断什么样的人是共产主义者捏? 共产主义者就是那些[阅读]了马克思和列宁著作的人; 那么, 什么样的人是反共产主义者捏? 反共产主义者是那些[理解]了马克思和列宁著作的人&#12290; @里根 (美国前总统)", "年青的时候不相信社会主义, 那是缺乏良心; 年老的时候还相信社会主义, 那是缺乏头脑! A young man who isn`t a socialist hasn`t got a heart. An old man who is a socialist hasn`t got a head. @克列蒙梭 (法国政治家)", "共产主义最大的优越性体现在 -- 可以克服别的主义下根本不存在的困难 :-)", "我们生下来时, 共产党就贪脏枉法/独裁专政/践踏人权/出卖国土 -- 这是我们一代人的无奈; 等到我们的孩子长大了, 共产党依然故我甚至变本加厉 -- 那就是我们这代人的无能!", "高等教育的价值在于培训思维, 而不在于传授事实! The value of a college education is not the learning of many facts but the training of the mind to think. @爱因斯坦", "成功的教学所需要的不是强制 而是激发学生的欲望 @托尔斯泰 (作家)", "花在孩子身上的钱和孩子的修养之间[没有]任何关系, 甚至成反比! 在子女教育方面, 父母应该投入的是[时间], 而不是金钱! @大前研一 (日本经济评论家)", "父母们最根本的缺点, 在于想要自己的孩子为自己争光&#12290; The fundamental defect of fathers is that they want their children to be a credit to them. @罗素 (哲学家 数学家 思想家)", "父母在教育孩子时, 通常只是让他们适应当前的世界 -- 哪怕当前是个堕落的世界&#12290; @康德 (哲学家 思想家)", "小时候一个劲地教你做好人, 长大了一个劲地教你做坏人 -- 这就是[中国式教育]", "任何专制国家的教育, 其目的都是在极力降低国民的心智&#12290; @孟德斯鸠 (启蒙思想家)", "古代愚民政策是不许民众受教育 现代愚民政策是只许民众受洗脑教育", "全中国只有一所学校, 就是党校 -- 其它的学校都是分校! @陈丹青 (艺术家)", "洗脑教育要塑造的, 不是铁屋中沉睡的人, 而是[装睡]的人; 因为沉睡的人你总有办法唤醒, 但是你永远无法唤醒装睡的人!", "当你试图了解你的祖国, 你已经走上了犯罪道路! @艾未未 (艺术家 持不同政见者)", "以前学英语是为了更好地了解外国 现在学英语是为了更好地了解中国", "我不同意你的观点 但是我誓死捍卫你说话的权利 @伏尔泰 (启蒙思想家) /2014/02/freedom-of-speech.html", "若批评不自由 则赞美无意义 @法国<费加罗报>的宗旨", "如果你来到一个陌生的国家, 看到报纸上全是好消息; 我敢打赌, 这个国家的好人都在监狱里! @帕特.莫尼汉(美国参议员 社会学家)", "你可以暂时地蒙骗所有人, 也可以永久地蒙骗部分人; 但你不可能永久地蒙骗所有人! You can fool all the people some of the time, some of the people all the time, but you can NOT fool all the people all the time. @林肯 (美国前总统)", "宁鸣而死 不默而生 @范仲淹", "在大欺骗的时代, 说出真相就是革命行为! @乔治.奥威尔 (<1984>作者)", "即使有一天, 党宣布'2+2=5', 你也不得不相信它 :-( @<1984>乔治.奥威尔 /2009/06/book-review-1984.html", "艺术家用谎言揭露真相 政治家用谎言掩盖真相 Artists use lies to tell the truth, while politicians use them to cover the truth up. @电影<V怪客&#65295;V字仇杀队> /2011/11/film-v-for-vendetta.html", "世上最难的两件事: 把自己的思想装进别人的脑袋, 把别人的钞票装进自己的口袋 -- 共产党都做到了", "在我们苏联, 谎言已不仅仅是道德问题, 而是国家的支柱! @索尔仁尼琴 (诺贝尔奖得主 政治异议人士)", "谎言重复千遍就是真理! @戈培尔 (纳粹德国宣传部长)", "报纸的任务就是把统治者的意志传递给被统治者, 使他们视地狱为天堂! @戈培尔 (纳粹德国宣传部长)", "人民大多数比我们想象的要蒙昧得多, 所以宣传的本质就是坚持简单和重复! @戈培尔 (纳粹德国宣传部长)", "要撒谎就撒弥天大谎 -- 因为弥天大谎往往具有某种可信的力量 民众在大谎和小谎之间更容易成为前者的俘虏 @戈培尔 (纳粹德国宣传部长)", "即使不封杀媒体, 也要让媒体感到自己随时可能被封杀, 从而让媒体展开[自我审查] @戈培尔 (纳粹德国宣传部长) /2012/12/censorship-in-china.html", "中共是这样的政党 -- 既千方百计阻止你知道真相, 又千方百计指责你不明真相", "如果把中宣部的官员和卫生部的官员对调, 那么中国既有了言论自由, 也有了食品安全 :-)", "中国共产党是一心一意为人民服务的政党 -- 你想拒绝它的服务都不行 :-(", "如果我说'张三的媳妇要忠于李四', 你一定认为我思维混乱; 可如果我说'人民的军队要忠于党', 你是不是立刻感觉到满满的正能量?", "索马里海盗说: 买面包只能吃一天, 买把枪能吃一辈子! 中国共产党说: 枪杆子里出政权!", "中国没有多少'人民内部矛盾', 主要是'党和人民的矛盾'; 党反复提'人民内部矛盾', 其实是挑拨离间!", "欧美的精英们已经不再为生存而担忧, 不用因恐惧而说话; 而中国的精英们还在为民主自由而耗尽精力甚至生命!", "如果鲁迅活在这个年代 他的博客首先会被和谐, 然后被有关部门请去喝茶, 最后以'煽动颠覆国家罪'被捕入狱...", "一个国家的监狱里有一个良心犯, 这个国家就不会有良心; 有两个, 这个国家就让人恶心; 有三个, 这就不是国家; 有四个, 亡国就是解放! @昂山素季 (缅甸民运领袖)", "天朝知识分子分三类: 1 沉默的大多数 2 公共知识分子 3 '公公'知识分子", "一百年了都没长进 -- 上面还是慈禧, 下面还是义和团! @资中筠 (中国社科院学者)", "要以世界的眼光看中国 不要以中国的眼光看世界 @周有光 (语言学家 经济学家)", "'中国模式'的核心竞争力就是[压榨劳动力] @谢国忠 (经济学家)", "中国比小说更离奇 @钟祖康 (作家)", "道德在书本里, 榜样在电视里, 国土在肺里, 爱情在房产证里, 幸福感在梦里... 这就是中国特色", "拜金不可怕, 可怕的是: 在一个不吃不喝也要几百年才能买房的社会却不许拜金; 低俗不可怕, 可怕的是: 在一个几千万男生找不到女友, 同龄少女都被老男人包养的国度却不准低俗!", "某微信群, 一帮'爱国者'在讨论哪个国家最反华? 于是开始列举: 限制华人自由出入, 限制华人买房买车, 限制华人子女就学, 对华人收更高的税, 强制华人买更贵的汽油, 给华人吃地沟油毒奶粉, 限制华人生孩子... 最后所有人都不说话了", "先帝爷留下一个烂摊子; 第二代治理者的办法是头疼医头, 脚疼医脚, 虽然去不了病根儿, 但起码减轻症状, 让你以为治好了; 第三代是头疼医脸, 脚疼也医脸 -- 对他们来说, 能否治好无所谓, 面子最重要; 这一代更邪乎了, 头疼堵嘴, 脚疼也堵嘴 -- 只要喊不出疼, 就算没病!", "在天朝, 可怕的不是逼良为娼; 而是逼良为娼之后, 再来扫黄!", "郭敬明和唐骏的共同点是 -- 他们这类人越成功, 就说明我们这个社会越失败!", "不是具有中国特色的社会主义 而是具有中国特色的社会达尔文主义", "权力导致腐败, 绝对的权力导致绝对的腐败! @阿克顿勋爵 (政治思想家)", "一切拥有权力的人都有滥用权力为自己谋求私利的倾向 @孟德斯鸠 (启蒙思想家) /2014/07/corruption-and-form-of-government.html", "一群[亿万富豪]在人民大会堂里开两会 -- 他们管自己叫[无产阶级先锋队] /2012/03/national-people-congress.html", "中国人民是伟大的 -- 用全球7%的耕地养活了全球50%的公务员, 并承受全球70%的官员腐败 :-(", "取之愚民 用之移民 -- 天朝官员的财富之道", "所谓'摸着石头过河'就是 -- 群众们都过河了, 官员们还在那里假装摸石头", "罗马之所以是这样的罗马 因为市民就是这样的市民 This City is what it is because our citizens are what they are. @柏拉图", "一个肮脏的国家, 如果人人讲规则而不是空谈道德, 最终会变成一个有人味儿的正常国家, 道德自然会逐渐回归; 反之, 一个干净的国家, 如果人人都不讲规则却大谈道德&#12289;谈高尚, 天天没事儿就讲道德规范, 人人大公无私, 最终这个国家会堕落成为一个伪君子遍布的肮脏国家! @胡适 (思想家) /2013/11/weekly-share-57.html", "你要看一个国家的文明, 只需考察三件事: 第一, 看他们怎样待小孩子 第二, 看他们怎样待女人 第三, 看他们怎样利用闲暇的时间 @胡适 (思想家) /2011/02/book-review-chinese-characteristics.html", "做奴隶虽然不幸, 但并不可怕, 因为知道挣扎, 毕竟还有挣脱的希望; 若是从奴隶生活中寻出美来, 赞叹, 陶醉, 就是万劫不复的奴才了! @鲁迅 /2012/06/stockholm-syndrome.html", "自有历史以来, 中国人是一向被[同族]屠戮&#12289;奴隶&#12289;敲掠&#12289;刑辱&#12289;压迫下来的, 非人类所能忍受的楚痛, 也都身受过&#12290; 每一考查, 真教人觉得不像活在人间&#12290; @鲁迅 /2011/02/book-review-chinese-characteristics.html", "信仰不能当饭吃, 所以不重要; 民主不能当饭吃, 所以不重要; 自由不能当饭吃, 所以不重要... 对中国人来说, 不能当饭吃的, 都不重要! 我们信奉了猪的生活原则, 也就得到了猪的命运 -- 迟早给别人当饭吃", "如果民众以猪的方式思考 那么统治者就会以屠夫的方式行事", "与恶魔战斗的勇士, 要小心自己也变成恶魔! 当你长久地凝视深渊, 深渊也在凝视着你! @尼采 (哲学家 思想家)", "真的猛士敢于在一个不正常的国家做一个正常的人", "一旦你习惯了戴面具的生活 你的脸将变得跟面具一样 @电影<V怪客&#65295;V字仇杀队> /2010/11/institutionalize.html", "每当有事情发生, 懦夫会问: '这么做安全吗?' 患得患失者会问: '这么做明智吗?' 虚荣者会问: '这么做受欢迎吗?' 但是良知只会问: '这么做正确吗?' @马丁.路德.金 (美国人权领袖)", "人道主义的含义是 -- 从不以[人]作为牺牲来达到某一目的 @施韦策 (诺贝尔和平奖得主)", "无限的宽容必将导致宽容的消失 Unlimited tolerance must lead to the disappearance of tolerance. @波普尔 (哲学家 思想家)", "雪崩时, 没有一片雪花觉得自己有责任 @伏尔泰 (启蒙思想家)" ], arrHistory : [ "谁控制过去, 谁就控制未来; 谁控制现在, 谁就控制过去! Who controls the past controls the future. Who controls the present controls the past. @<1984>乔治.奥威尔 /2009/06/book-review-1984.html", "以铜为镜 可以正衣冠 以史为镜 可以知兴替 以人为镜 可以明得失 @李世民 (唐太宗)", "人类从历史中学到的唯一教训就是 -- 人类没有从历史中学到任何教训! @汤因比 (历史学家)", "每个强国的命运都受两个因素支配 -- 内在的和外来的冲突, 也就是所谓[革命]与[战争]! 一个国家如果不是因为衰弱, 就绝不会主动谋求和平; 而使它们衰弱得最快的, 正是所谓的[安全感]! @<西方军事史>约翰.富勒", "人们总以为自己生活的时代糟糕透顶, 总是向往过去的黄金时代; 但在我们如今认为是身处黄金年代的那些人看来, 他们当时所处的世界同样是苍白无力的! @伍迪.艾伦 (作家 编剧 导演)", "中国人最悲哀的就是 -- 刚被历史的车轮碾过, 还没来得及爬起来, 发现历史在倒车 :-(" ], arrMilitary : [ "战争是流血的政治 政治是不流血的战争 @<战争论>克劳塞维茨", "百战百胜, 非善之善者也; 不战而屈人之兵, 善之善者也&#12290; 故上兵伐谋, 其次伐交, 其次伐兵, 其下攻城&#12290; @<孙子兵法>孙武", "知己知彼 百战不殆 不知彼而知己 一胜一负 不知彼不知己 每战必殆 @<孙子兵法>孙武", "投之亡地然后存 陷之死地然后生 @<孙子兵法>孙武", "兵无常势, 水无常形; 能因敌变化而取胜者, 谓之神! @<孙子兵法>孙武" ], arrManagement : [ "管理是一种实践 其本质不在于[知]而在于[行] 其验证不在于[逻辑]而在于[成果] @彼得.德鲁克 (管理学之父)", "企业无法持续成长壮大, 反而每况愈下濒临破产的最主要原因是 -- 当企业老板不应该做决策的时候, 却仍然紧握着决策权不放; 企业应该尽可能将决策权放到最低层级, 越接近行动的现场越好! @彼得.德鲁克 (管理学之父)", "管理是一项工作, 但它本身并[不是]全职工作&#12290; 在设计一项管理职务时, 要把[管理]与[工作](即一个人的'特殊职能'与'本身职务')结合起来&#12290; 一般而言, 管理人员应该既是一个管理人员, 又是一位专业人员&#12290; @彼得.德鲁克 (管理学之父)", "用人不在于如何减少人的短处 而在于如何发挥人的长处 @彼得.德鲁克 (管理学之父)", "企业最大的资产是人 @松下幸之助 (号称日本经营之神)", "你想雇用的人必须具备3种品质: 正直诚实, 聪明能干, 精力充沛; 如果缺少第一种, 后两种品质会要你命! @巴菲特 /2009/04/defect-of-hire.html", "以用户为中心 其它一切纷至沓来 @Google 信条", "只有偏执狂才能生存 @Andy Grove (英特尔公司创始人之一, 前任 CEO) /2016/04/Andy-Grove-Quotes-on-Leadership.html", "我们没有不懂技术的管理人员 因为寻求技术和管理的平衡毫不费力 @比尔.盖茨", "伟大的车工值得给他几倍于普通车工的薪水; 但一个伟大的程序员, 其价值相当于普通程序员的一万倍! @比尔.盖茨", "我的管理风格既不是美国的个人主义, 也不是日本的共识主义, 而是独特的达尔文主义(适者生存)! @比尔.盖茨", "当你用一个手指指着某人时, 请注意其它三个手指在指哪儿? @Gerald Weinberg (软件工程大牛) /2009/07/book-review-are-your-lights-on.html", "己所不欲 勿施于人 @<论语>", "水至清则无鱼 人至察则无徒 @<汉书 东方朔传>", "获得信任的技巧就是 -- 避免使用任何技巧 @Gerald Weinberg (软件工程大牛)", "不怕神一样的对手 就怕猪一样的队友" ], arrEconomy : [ "我也会有恐惧和贪婪, 只不过是 -- 在大众贪婪时恐惧, 在大众恐惧时贪婪! @巴菲特", "控制风险的最好办法是深入思考, 而不是投资组合! @巴菲特", "价值投资不能保证一定盈利 但价值投资提供了通向成功的[唯一]机会 @巴菲特", "我从事投资时会观察一家公司的[全貌] 而大多数投资人只盯着它的[股价] @巴菲特", "投资成功与否并非取决于你了解的东西, 而在于你能否老老实实地承认你所不知道的东西! 投资人并不需要做对很多事情, 重要的是不要犯重大的错误! @巴菲特", "退潮时便可知道谁在裸泳 @巴菲特", "短期而言, 股票市场是个投票机 长期而言, 股票市场是个称重器 @本杰明.格雷厄姆", "花自己的钱 办自己的事 -- 既讲节约 又讲效果 花自己的钱 办别人的事 -- 只讲节约 不讲效果 花别人的钱 办自己的事 -- 不讲节约 只讲效果 花别人的钱 办别人的事 -- 不讲节约 不讲效果 @米尔顿.弗里德曼 (诺贝尔经济学奖得主)", "中国股市比赌场还[不如] -- 因为在中国股市, 某些人可以看别人的底牌 @吴敬琏 (经济学家)", "最多人走的路肯定最安全 但别指望会在这样的路上碰到很多猎物 @纪德 (作家 诺贝尔奖得主)", "投资是预测资产收益的活动 投机是预测市场心理的活动 @凯恩斯 (经济学家)" ], arrGFW : [ "自由有许多困难, 民主亦非完美; 然而, 我们从未建造一堵墙, 把我们的人民关在里面, 不准他们离开 @<在柏林墙下的演说>肯尼迪 (美国前总统) /2009/07/break-through-berlin-wall.html", "这些(监狱的)围墙很有趣 -- 起初你痛恨它; 然后你逐渐习惯它; 足够长时间后, 你开始依赖它... 这就是体制化! @电影<肖申克的救赎> /2010/11/institutionalize.html", "Google 重新发明了搜索 Facebook 重新发明了社交 Apple 重新发明了手机 Amazon 重新发明了书籍 ... 天朝重新发明了局域网", "翻墙和 OOXX 的相似之处: 一旦会做就老想做; 做第一次之后觉得天地豁然开朗; 每次做都有快感; 觉得不会做的都是傻逼!", "GFW 把中国人挡在无数优秀网站之外, 仿佛在这些网站入口处设置了一道铁门, 上书八个大字: '华人与狗 不得入内'", "几十年来, 朝鲜的领导人只有一个, 叫'金胖子'; 几十年来, 天朝的领导人也只有一个, 叫'敏感词'", "大航海时代禁海 大贸易时代禁商 大数据时代禁网", "宁要社会主义的局域网 不要资本主义的互联网" ], arrOthers : [ "生于忧患 死于安乐 @<孟子 告子下>", "合抱之木生于毫末 九层之台起于累土 千里之行始于足下 @<道德经>", "海纳百川 有容乃大 壁立千仞 无欲则刚 @林则徐", "大胆假设 小心求证 认真做事 严肃做人 @胡适", "勿以恶小而为之 勿以善小而不为 @<三国志>陈寿", "判断一个人的人品, 不是看他好起来做什么好事, 而是看他坏起来[不做]什么坏事&#12290;", "君子之交淡若水 小人之交甘若醴 @<庄子>", "不要去欺骗别人 -- 因为你能骗到的, 都是相信你的人", "唯一不变的是变化本身!" ] }; // m_mapMaxim end function init() { var sLabels = ""; $("span.post-labels").children("a").each(function(){ sLabels += $(this).html()+"\n" }); var arrTagInfo = [ [/思考|心理/, m_mapMaxim.arrThink], [/政治/, m_mapMaxim.arrPolity], [/历史/, m_mapMaxim.arrHistory], [/军事/, m_mapMaxim.arrMilitary], [/编程/, m_mapMaxim.arrProgram], [/管理/, m_mapMaxim.arrManagement], [/经济/, m_mapMaxim.arrEconomy], [/翻墙/, m_mapMaxim.arrGFW] ]; var arrMaxim = m_mapMaxim.arrDefault.slice(), nCount = 0; $.each(arrTagInfo, function(i, info){ sLabels.match(info[0]) && (arrMaxim = arrMaxim.concat(info[1])) && nCount++ }); (nCount <= 3) && (arrMaxim = arrMaxim.concat(m_mapMaxim.arrOthers)); var sMaxim = arrMaxim[Math.floor(Math.random() * arrMaxim.length)]; var arrPunctMap = // map HALF width punct to FULL width [ [/\:\-\)/g, "&#9786;"], [/\:\-\(/g, "&#9785;"], [/\</g, "&#12298;"], [/\>/g, "&#12299;"], [/\(/g, "&#65288;"], [/\)/g, "&#65289;"], [/\[/g, "&#12304;"], [/\]/g, "&#12305;"], [/\t/g, "<br/>"], [/@/g, "&#8212;&#8212;"], [/ -- /g, "&#8212;&#8212;"], [/, /g, "&#65292;"], [/; /g, "&#65307;"], [/: /g, "&#65306;"], [/\! ?/g, "&#65281;"], [/\? ?/g, "&#65311;"], [/\'/g, "&#65282;"] ]; sMaxim = sMaxim.multiReplace(arrPunctMap); if(sMaxim.endsWith(".html")) { sMaxim = sMaxim.replace("<br/>/", "<br/><a href='https://"+Url.getDomain()+"/") .replace(".html", ".html' target='_blank'>与该格言相关的博文</a>"); } $("div.descriptionwrapper").children("p.description").html(sMaxim); } $(document).ready( function() { try { init(); } catch(err) { reportError("init: Catch exception:\n" + err); } } ); }); </script> </div> <div class='clear'></div> <span class='widget-item-control'> <span class='item-control blog-admin'> <a class='quickedit' href='//www.blogger.com/rearrange?blogID=5235590154125226279&widgetType=HTML&widgetId=HTML6&action=editWidget&sectionId=sidebar' onclick='return _WidgetManager._PopupConfig(document.getElementById("HTML6"));' rel='nofollow' target='configHTML6' title='修改'> <img alt='' height='18' src='https://resources.blogblog.com/img/icon18_wrench_allbkg.png' width='18'/> </a> </span> </span> <div class='clear'></div> </div></div> </div> <!-- spacer for skins that want sidebar and main to be the same height--> <div class='clear'>&#160;</div> </div> <!-- end content-wrapper --> </div></div> <!-- end outer-wrapper --> <script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/1235714080-widgets.js"></script> <script type='text/javascript'> window['__wavt'] = 'AOuZoY4xmbMCrlDZvAnDiXmUHWf2MF14rg:1596609954064';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d5235590154125226279','//program-think.blogspot.com/2011/05/file-encryption-overview.html','5235590154125226279'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '5235590154125226279', 'title': '编程随想', 'url': 'https://program-think.blogspot.com/2011/05/file-encryption-overview.html', 'canonicalUrl': 'https://program-think.blogspot.com/2011/05/file-encryption-overview.html', 'homepageUrl': 'https://program-think.blogspot.com/', 'searchUrl': 'https://program-think.blogspot.com/search', 'canonicalHomepageUrl': 'https://program-think.blogspot.com/', 'blogspotFaviconUrl': 'https://program-think.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'zh-CN', 'localeUnderscoreDelimited': 'zh_cn', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22编程随想的博客 - Atom\x22 href\x3d\x22https://program-think.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22编程随想的博客 - RSS\x22 href\x3d\x22https://program-think.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22编程随想的博客 - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/5235590154125226279/posts/default\x22 /\x3e\n\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22编程随想的博客 - Atom\x22 href\x3d\x22https://program-think.blogspot.com/feeds/8566607804801212444/comments/default\x22 /\x3e\n', 'meTag': '', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': false, 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/c54c289f4c644ceb', 'plusOneApiSrc': 'https://apis.google.com/js/plusone.js', 'disableGComments': true, 'sharing': {'platforms': [{'name': '获取链接', 'key': 'link', 'shareMessage': '获取链接', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': '分享到 Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'Twitter', 'key': 'twitter', 'shareMessage': '分享到 Twitter', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': '分享到 Pinterest', 'target': 'pinterest'}, {'name': '电子邮件', 'key': 'email', 'shareMessage': '电子邮件', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 300, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27zh_CN\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': '阅读全文', 'pageType': 'item', 'postId': '8566607804801212444', 'postImageThumbnailUrl': 'https://lh3.googleusercontent.com/k_HfajxQrtkDnZdPR_vjIJhP-jorIpol046WaDQel85IBdgqrj1UbFouFjxeyUM921BxQKgyh76CQJuohEcQLyYkMyeQdrhTncLql_YWfa0EfffTDj_LMEXK2h8nhOH70uJIt2Ix\x3ds72-c', 'postImageUrl': 'https://lh3.googleusercontent.com/k_HfajxQrtkDnZdPR_vjIJhP-jorIpol046WaDQel85IBdgqrj1UbFouFjxeyUM921BxQKgyh76CQJuohEcQLyYkMyeQdrhTncLql_YWfa0EfffTDj_LMEXK2h8nhOH70uJIt2Ix', 'pageName': '文件加密的扫盲介绍', 'pageTitle': '编程随想的博客: 文件加密的扫盲介绍'}}, {'name': 'features', 'data': {'sharing_get_link_dialog': 'true', 'sharing_native': 'false'}}, {'name': 'messages', 'data': {'edit': '修改', 'linkCopiedToClipboard': '链接已复制到剪贴板&#65281;', 'ok': '确定', 'postLink': '博文链接'}}, {'name': 'template', 'data': {'name': 'custom', 'localizedName': '自定义', 'isResponsive': false, 'isAlternateRendering': false, 'isCustom': true}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': '文件加密的扫盲介绍', 'description': '&#9733;引子 &#12288;&#12288;上一个帖子点评了爱国愤青 关于拉登同学的几个误区 &#12290;话说美国佬把拉登灭掉之后不到一星期&#65292;从拉登老巢缴获的电脑资料&#65292;就开始在美国政府的网站曝光了&#65288;比如拉登的生活录像&#65289;&#12290;另据美国某安全官员说&#65292;缴获的电脑资料之多&#65292;抵得上一个小型图书馆&#12290;单从这点可以判断出&#65306;拉登同学对自己手...', 'featuredImage': 'https://lh3.googleusercontent.com/k_HfajxQrtkDnZdPR_vjIJhP-jorIpol046WaDQel85IBdgqrj1UbFouFjxeyUM921BxQKgyh76CQJuohEcQLyYkMyeQdrhTncLql_YWfa0EfffTDj_LMEXK2h8nhOH70uJIt2Ix', 'url': 'https://program-think.blogspot.com/2011/05/file-encryption-overview.html', 'type': 'item', 'isSingleItem': true, 'isMultipleItems': false, 'isError': false, 'isPage': false, 'isPost': true, 'isHomepage': false, 'isArchive': false, 'isLabelSearch': false, 'postId': 8566607804801212444}}]); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'main', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/2492041722-lbx__zh_cn.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/368954415-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML1', 'sidebar', document.getElementById('HTML1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML2', 'sidebar', document.getElementById('HTML2'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML3', 'sidebar', document.getElementById('HTML3'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList2', 'sidebar', document.getElementById('LinkList2'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList6', 'sidebar', document.getElementById('LinkList6'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList3', 'sidebar', document.getElementById('LinkList3'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList7', 'sidebar', document.getElementById('LinkList7'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList8', 'sidebar', document.getElementById('LinkList8'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList5', 'sidebar', document.getElementById('LinkList5'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList9', 'sidebar', document.getElementById('LinkList9'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList1', 'sidebar', document.getElementById('LinkList1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList4', 'sidebar', document.getElementById('LinkList4'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML7', 'sidebar', document.getElementById('HTML7'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LabelView', new _WidgetInfo('Label1', 'sidebar', document.getElementById('Label1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_PopularPostsView', new _WidgetInfo('PopularPosts1', 'sidebar', document.getElementById('PopularPosts1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive2', 'sidebar', document.getElementById('BlogArchive2'), {'languageDirection': 'ltr', 'loadingMessage': '正在加载&#8230;'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML5', 'sidebar', document.getElementById('HTML5'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML4', 'sidebar', document.getElementById('HTML4'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML6', 'sidebar', document.getElementById('HTML6'), {}, 'displayModeFull')); </script> </body> </html>

文章版权归原作者所有。
二维码分享本站