Blog

  • Solution to chm file error of navigation cancelled or invalid address

    最近我又对 plobe 起了兴趣,找来了一个说明文档竟然是 chm 格式。我这里用了“竟然”,因为 plobe 不是微软的技术,文档编写者却用了微软的 html help。用了微软 html help 也罢了,可它竟然打开后读不了。提示信息是:已取消到该网页的导航,或无效地址。

    我试了很多办法,但都不切中要害:

    • 修改区域和语言为中国和中文
    • 注册文件关联
    • regsvr32 某些控件
    • 从微软网站下载 hhupd.exe 来安装
    • 降低 IE 安全级别

    结果我的电脑搞得一团糟,还是没解决问题。Google 了好久(google 这回不聪明了,把好的答案藏起来了)最后解决问题的方法是:

    在 CHM 文档上右键查看属性 -> 常规 -> 在下面有一个和属性相邻的安全:此文件来自其他计算机,可能被阻止以帮助保护该计算机。 右边有一个解除锁定的按钮。

    单击一下 解除锁定 -> 应用 就可以了!

    BTW, I found this chm file is not worth opening and reading at all. Does it imply whoever compiles documentation in chm for a non-microsoft technology is silly, and whoever tries to open such a chm is silly as well? I must admit I am silly.

  • The Consumer Credit Act cover full expenditure

    经济危机袭来,本来我不关心的事情如今却在身边发生。今天又学到一个保护自己的办法:尽量用信用卡消费。

    案例是某人从 mfi 订购了一个整体厨房,她用支票付了订金,后用信用卡付了余额。mfi 没能交货就倒闭了,她问她怎么把钱拿回来,可以拿回多少。答案是根据 The Consumer Credit Act,可以从信用卡公司 claim full amount,即使用支票付了大部分而用信用卡付了£1,同样可以从信用卡公司申请全额赔款。

    我不由感慨,在英国,消费者的权益保护到了极致。

  • Argos sent me two head boards of a bed

    我从 Argos 订购了一张木床,奢侈了一回。可是今天 Argos 送货来,发现其中有两块床头板,竟然没有床尾板!

    床是可以装配起来的,但看起来怪怪的。当初可是看中它漂亮的床尾板才买的,于是我越想越不服气,给 Argos customer serivce 写了封信,考验一下他们的售后服务。

    Hi,

    I received my order today. Thank you very much.

    However, it does NOT match the photo and the description of the product on your website. Your photo shows the foot board very nice, and description says “Features foot board with rail end”, but in the pack I received, there are only two head boards (no foot board). Although I can assemble one head board as foot board, the bed looks strange.

    I would like to know it is an error in your fulfillment or an error of mis-describing your product on the website. Many thanks for your help.

  • Controversial safe_mode

    safe_mode 恐怕是 php 里最有争议的环境参数了。要我说,这个参数名取得就不好,争议就难免了。safe_mode 可以设为 on / off,但并不是说 safe_mode = off 就不安全了。很多 ISP 的 shared hosting 环境下 safe_mode 也是 off 的,godaddy deluxe hosting 就是一例。

    光靠 safe_mode = on 是把不住安全关的,反而会限制某些程序的正常运行,比较麻烦。尽管麻烦,尽管我不是 share hosting,但我还是喜欢最大范围内设置 safe_mode = on。

    但是由于我习惯性使用 mod_php,最近才意识到 mod_php with safe_mode = on 在 php upload 时无法解决 “先有蛋或是先有鸡” 的问题,因为 apache 试图操作 user1 的目录。为了允许 apache 操作 user1 的目录,必须在 user1 的目录为 group 或 other 提供 write 权限。同理,为了允许 apache 操作 user2 的目录,必须在 user2 的目录为 group 或 other 提供 write 权限。这样一来,就很难隔离 user1 和 user2 之间相互的文件操作。

    suexec 对 mod_php 无效,看来只有抛弃 mod_php,改投 FastCGI 门下。

    顺便说一下,godaddy shared hosting 把 user1, user2 都归为一组,然后取消 group 读权限,允许 other (apache)读权限,虽然思路很巧妙,但有悖常规思维,通常我会认为 owner 权限 >= group 权限 >= other 权限。godaddy shared hosting 用的就是 FastCGI,不存在“鸡蛋”问题。

  • Samba can share files over internet

    Samba 太强大了,我没想到它可以在公网上共享文件和文件夹,如同在局域网内一样。

    如果给 samba server 一个公网 ip,就可以在 internet 上凭着 \\ip 就访问共享文件和文件夹。有点可怕,因为我原先认为 samba 会区别对待局域网内和局域网外用户,不经过一些特别的设置,samba server 不会让 internet 用户用 \\ip 访问共享文件和文件夹。事实不是这样,至少目前 samba 3.2.8 版不是。

    同理,如果把 WD Mybook World 建为 dmz,它的 public folder 就暴露给所有 internet users 了。

    所以得特别当心,如果想给 samba server internet visible,就不得设置 windows 局域网内共享常见的 guest 无密码访问。

  • CentOS Debian Fedora FreeBSD Ubuntu Comparison

    我还远没有资格做评测,CentOS Debian Fedora FreeBSD Ubuntu 里,除了用过 Fedora,其他的都没试用过。还有一些 linux distribution 有些近期不够活跃,有些在开源路线上不够明朗,对从零学起的用户来说,还是不用考虑把它们也加进 shortlist,就这些主流的 linux distribution 都已很让人困惑,该怎么选择?

    总的来说,选择谁都没有错,殊途同归。但可能这样的回答不会让人满意,那么根据我的研究结果,我用最短的词语来概括 CentOS Debian Fedora FreeBSD Ubuntu 特点,希望有助大家选择。

    • CentOS: 保证兼容(如果以后想买 redhat 其他产品的话)
    • Debian: 承诺免费(不用担心开发者日后见利起意)
    • Fedora: 技术追新(新版本的组件首先在 Fedora 实现,隔好久才能在 redhat 其他产品上见到)
    • FreeBSD: 发布活跃(相对Debian而言)
    • Ubuntu: 面向桌面(虽然近来在服务器领域日渐流行,但它毕竟是针对 laptop 和 desktop 设计的)
  • Ebuyer does not know what I want

    Yesterday I received an newsletter from ebuyer promoting an Extra Value PC at under £200. I particularly like the point no OS comes with this PC. However, the reason for not buying was its 32-bit CPU. I definitely want my next generation PC is 64-bit.

    I discarded that newsletter. The funny thing is just now I received another newsletter from ebuy promoting the same Extra Value PC, but with Vista Ultimate as a package. Of course price is increased, £264.98. It is making things worse.

    As many friends who know me know I hate Vista, ebuyer does not know what I want. Nevertheless, I can not expect ebuyer CRM system being so intelligent.

  • Cut copy paste in vim

    可能因为我刚入门 linux 吧,有些方面我还是认为它不太友好。比如在 ssh 状态使用 vim 作文本编辑器应该是绝佳的选择,我不指责它的编辑性能,倒是愣让人看不明白。难道它就非得用晦涩的文字写 manual?

    我无奈转向 google,一下子就找到了常人通俗易懂的语言,归纳如下:

    Cut 的等效快捷键
    dd delete current line
    D delete from cursor to end of line
    d$ delete from cursor to end of line
    d0 delete from cursor to beginning of line
    dw delete from cursor to end of current word
    db delete from cursor to beginning of current word

    Copy 的等效快捷键
    Y or yy copy (yank) one line
    2Y copy two lines
    10Y copy 10 lines
    yG copy all lines to the end of the file
    yw copy text from the current cursor position to the end of the word
    y$ copy text from the current cursor position to the end of the line

    Paste 的等效快捷键
    P paste above the current cursor position
    p paste below the current cursor position

  • I am with Fedora

    今天 Fedora 11 alpha 发布了。Fedora 10 我还没摸熟呢,Fedora 11 就来了,真让我高兴之中疲于奔命。

    无意中还发现 drupal, mediawiki, planet, wordpress 都包含在 Fedora 发行包中,这是不是跟 Fedora Project 自身使用了这几种技术有关?我的意思是:为什么不包含别的 packages,比如 magento, joomla, etc?

    Fedora 倡导的东西咱就支持一下。不管有用没有,咱全安装了(也就 drupal 暂时派不上用场)。

  • Actinic discounts.fil is giving away secrets

    I have many good reasons to dislike Actinic. One of the reasons is – as growing up to an Actinic expert, one can also be an Actinic hacker. In other words, Actinic is not nicely secured by the vendor. If an Actinic user wants enhanced security, he / she will work ten times harder to close the security hole.

    For example, Actinic does not have online database. Actinic keeps most of data offline, but it must have some data at server side, so itstores data in various files. This is a very doubtful approach. Of course all database software have bugs, but could Actinic file-based data do better than mysql, etc?

    Another example, I recently found Actinic stops recognising coupons after an update. During diagnosis, I found discounts.fil under acatalog folder serves as data file for coupon code etc. acatalog/discounts.fil can be accessed by public by default. All promotion secrets are exposed to competitors / customers by analysing this file. Coupon codes are hashed in discounts.fil, and hashing makes all original coupon codes not recognisable. The Actinic perl script does not compare hashed customer input coupon with hashed coupon code in discounts.fil. It compares raw customer input coupon with hashed coupon code in discounts.fil (of course they will not match). This is a bug in Actinic.

    I think closing security hole is out of most Actinic users’ capability. What is the point for an advanced Actinic user working so hard on Actinic?