好心做壞事


什麼是青少年成長中最不安的問題?我覺得,是在學習階段不斷聽到別人說什麼學問“有用”,什麼知識“沒有用”,並漸漸聽到大人標籤什麼人“有用”,什麼人“沒有用”。我不敢妄斷任何學問或人“有用”或者“無用”,

Thinking about the Python equivalents of C's !! double negation

C's !! double negation idiom is a way of compressing all non-zerovalues of an expression down into a 1. There's a number of things thatyou can use to get the same effect in Python:

  • if you know that your result is always zero or positive, you can use cmp() . I'm ambivalent about whether this is obscure usage; you'reat least making it clear what you're doing, although probably not why.

    (If your result can be


為甚麼你去clubbing的時候沒有男人埋身

久不久就會收到一些留言:「Cher~~~ 我夠成日去clubbing啦,又唔見次次有男人埋身?唔好話你作大!」

每次也很想回應一句:「因為你生得太醜。」

但這就是事實的全部嗎?我隱約覺得不對。

和歷史悠久的神主牌 (註:神主牌這詞

巴黎愛漫遊 – 計較不計較

《巴黎愛漫遊》的主題並非浪漫愛情,也還是一齣「法國風情畫」,而且頗為陰暗,篇幅也不少。不過,我就不論本片如何探討法國。事實上,我真的為男主角 Jack 感到難為。他與女友 Marion 來到巴黎,他就渾身不自在,加上語言不通


How many bits of information are in a password?

The number of bits of information in a password are a function of thealphabet that the password is drawn from and how many characters longit is. The formula is:

nbits = ceil(log2(len(alphabet)) * nchars)

So what does that mean? Let's take the case of 8 character longUnix passwords, and do a table:

alphabet total bits (bits per character)
lower case ASCII384.7
lower case plus digits425.2
upper and lower

How not to set up your DNS (part 16)

Sort of presented in the traditional illustrated format:

; sdig ns ibc.com.au.ns1.ibc.com.au.ns2.ibc.com.au.; dig cname ibc.com.au. @ns1.ibc.com.au.[...];; flags: qr aa; QUERY: 1, ANSWER: 1, [...][...];; ANSWER SECTION:ibc.com.au. IN SOA ns1

遊樂場在哪裡

歸家途上,我看著玻璃窗外中環的景致。

從未在中環正式上班,但這個地方,是我的生活重心,是我回憶中的場景,是我的遊樂場。

小至買零食高跟鞋打掌購物吃飯看戲clubbing約會到學生年代的兼職曾經遇上的男人有發生過的愛情,

不要忘記7

如果在男人家中發現不屬你的護膚品,請不動聲色丟棄。
只是小小一支試用裝罷了,女人何必大驚小怪。

不要忘記6

女人不要自以為是,做盡一切感動男人的事,然後埋怨男人麻木不仁。
男人就是有權不賣帳。

A suggestion for HMAC signature construction

Here is a useful safety tip if you are constructing HMAC signatures for structured messages,things that you want to parse later: put a format version number intoeither the key or the message.

If you want messages in the old format to fail signature checks so thatthe rest of your code doesn't have to deal with them, put the versionnumber into the key. Put it into the message if you want your code togracefully deal with several generations of message formats; each willstill verify, but the