Strong Guarantee using Transaction
Posted on April 29th, 2008 at 23:24 by fr3@K
Abrahams Guarantees
在 C++ 的世界裡, 正確的 exception handling 是專業的 C++ programmer 不可或缺的技巧. 雖然它的概念並不困難, 但實作起來卻常不見得那麼容易.
要做到正確的 exception handling, 首先必須要了解什麼是 exception safety. 一個需要與 exception 打交道的 component 可在其介面實作人稱 Abrahams guarantees 的三種 exception safety 保證之一:
- The basic guarantee
允許操作失敗時改變物件的狀態, 但不能有 resource leak. 且該物件的狀態必須是可靠的仍然可以被解構, 操作失敗後該物件的狀態可以是不完全能被預測的.
- The strong guarantee
操作後的狀態只能是成功完成, 或是將該物件回復到操作之前的狀態並拋出一個 exception.
- The no-throw guarantee
操作不會拋出 exception.
(more…)
Video made for Microsoft’s sales team
Posted on April 21st, 2008 at 2:53 by fr3@K
Virtualization != 虛擬作業系統
Posted on April 18th, 2008 at 0:01 by fr3@K
首先我得說清楚我對 virtualization 這個題目沒有研究, 單純是個享福的使用者. 從很久 (8/9 年?) 以前在 MacOS 7.x (or 8.x?) 上用 Virtual PC 跑 Win95, 到近幾年的主要在 GNU/Linux 上用 QEMU 跑 Win2K 與 Minix 3.
一個不懂 virtualization 確切定義與技術細節的人, 一個使用過 Virtual PC, VMWare (player/workstation), QEMU, VirtaulBox 等 virtualization application 的人如我. 在使用過上述任何一種 virtualization application 後很容易就會知道, 把 virtual machine 開啟後首先會看到 POST (Power-on self-test) 畫面. 如果沒有其他如 boot image 等的設置, 接下來什麼也不會發生. 不會看到屬於某個 OS 的 shell 或是 desktop manager 的提示畫面, 使用者什麼事都做不了.
(more…)
Knock Knock, You’ve Been Hacked!
Posted on April 6th, 2008 at 7:31 by fr3@K
I received an email yesterday afternoon, informing me this blog has been hacked:
Regarding fsfoundry.org,
This email is not an April’s fools email and it has been sent to notify you that your blog’s version is old and needs to be updated ASAP as it was hacked.
While tracking some Viagra spammers I have come accross several links coming from your blog and, after testing it, it appears your blog is 2.1.* generation hence vulnerable to SQL injection blind-fishing attacks. Search Google to learn more. In a few words: spammers can take full control of your blog in a matter of minutes and deface it at will.
These attacks are as serious as they can get as the spammers have full access to your blog and add hidden HTML elements to mask their links.
You MUST update your blog to the latest official WordPress version and manually clean your last 5-10 posts of the parasite links which you will only see in HTML view.
Not doing so may attract severe search engine penalties as you are currently linking to sites with VERY bad reputation.
Hoping you will take required action,
A.S.S. (Anonymous Security Specialist)
PS: I got your email address from your Dashboard / Users Management Section. I have warned many during the past months regarding the vulnerable blogs, being a blogger myself, but it seems I haven’t warned everyone. Lateste WordPress is secure.
PPS: Your login name is XXXX and password hash is XXXXXXXXXXXXXXXXXX
(more…)
Mistake in IBM’s developerWorks
Posted on April 3rd, 2008 at 22:47 by fr3@K