醉酒
天堂在上,彼岸在遠
How DWiki uses partial function evaluation
As part of a longer entry, Muharem Hrnjadovic asks :
I would love to see examples or code snippets that are made possibleand/or improved greatly by leveraging
functools.partial().
I'm not sure that my example qualifies, but I'll take a shot at it.
DWiki has a WSGI-like processing pipeline to handlerequests; they get passed from function to function, possibly gettingmutated on the way down and possibly having the results mutated on theway back up.
The pipeline functions look
你都做得到
What I want out of a Linux partitioning program
Programs like fdisk , sfdisk , and even parted are really irritatingto deal with most of the time because they ask you too many nitpickingquestions. What I want is a partitioning program with a command oriented'shell' interface, with the core command being:
make N SIZE [TYPE]
This makes partition N be SIZE big (with the default units beingmegabytes), optionally making its type be TYPE (which can be in hex orin English). If N is 1 to 4, it is a primary
Why I don't expect result-oriented work hours to work out
A recent Slashdot story pointed to this article onone company's more flexible approach to work hours. It hasthe line:
The goal at Best Buy is to judge performance on outputinstead of hours.
My immediate cynical reaction is that this is a marvelous theorybut doomed in most practices. The root problem is the sameseductive thought in management that leads to excessive overtime : 'if my employee is getting all this done in Nhours now, think how much more work she could do in N+Y hours
I'm a Hei Hei girl
但Hei Hei girl亦可以有真心,你不會有機會將她帶到床上。
昨天晚上我認識了一個男孩子,友人跟我說:「這人很好呀,別錯過他。」
是呀,我也知道。
年輕、英俊、有風度、有家世、不急色,甚至像變
(之前完全搞錯)
曾是寂寥金燼暗
陳智德
凌晨回家的路上,看見一男子倚著欄杆半躺半坐於街邊,雙腳直伸平放地面,一些好心路人正在察看,但見他應答幾句,揮手示意路人離去,似無大礙。我走近一瞥,認出是多年沒見的詩友,曾在朗
Another obnoxious discovery about Ubuntu's /var/run stuff
Today, I had the distinct pleasure of discovering that /var/run mustexist on the root filesystem , even if you have a separate /var filesystem . If your root filesystem does not have such a hidden /var/run , you experience mysterious failures of various boot stuff,including an inability to bring up the network; for bonus points,nothing gives you any meaningful error messages.
(For bonus points, the default Ubuntu server startup sequence wipes out the console scroll buffer, so you can't scroll
How not to set up your DNS (part 13)
In the traditional illustrated format:
; sdig ns aescorts.net.
ns1.bnmq.com.
ns2.bnmq.com.
; dig mx aescorts.net. @ns1.bnmq.com.
[...]
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
[...]
;; AUTHORITY SECTION:
. 1 IN SOA . abuse.opticaljungle.com. ...
That's an interestingly grandiose