2006/03/26

用上了OPERA TP2

看到了一场无聊的、可笑的争吵,为什么总有无聊的问题让无聊的家伙们争来争去? 喜欢firefox的,趁争吵的功夫写点userscript或者插件 喜欢opera的,OPERA TP2现在可以自己来写Widgets http://my.opera.com/mark_poleon/homes/images/kill_firefox.gif——————这可不是我说得哈! 对于'opera vs firefox' 'opera 和firefox谁好' 这样无聊的问题,我的答案对于只会争吵的家伙们,就别糟蹋了,用IE去吧;对于不需要这种问题答案的人用这俩brower都一样,看心情,看场合了。 同理,对于'perl 、python、ruby、java等等等等 谁更棒?' '用ADS还是MWO?'之类问题的答案就是: 殊途同归、因势利导、随遇而安、两面三刀、过河拆桥,就是别把所有的时间都花在选择上…… P.S. 利用js、html和CSS能开发出OperaWidgets如此精致的东西,是种实在特别的诱惑啊! Technorati Tags: , , ,

2006/03/22

lifehacker

从发现了delicious popular发现了 lifehacker ,其内容包罗万象,诸如如何使 耳机线不再乱成一团、怎样快速做一个吸管杯等等等等,好玩,有趣,有的还冒了点聪明的傻气。
http://blogumentary.typepad.com/photos/uncategorized/lifehacker.jpg
用Sage订阅了它的RSS后发现它的介绍,发人深省: Computers make us more productive. Yeah, right. Lifehacker recommends the downloads, web sites and shortcuts that actually save time. Don't live to geek; geek to live. 从它的推荐列表又发现了这样几个地方: Slacker ManagerThe Lazy Way to SuccessWorking Smartlifehacker.org 崇尚的一种Smart Lazzy Hard work is passé. The paradigm-shifting concept is "Smart Laziness" – where success comes through cleverly avoiding work but still getting the job done. In this oasis, we celebrate those magical ways where doing less accomplishes more. 看来,重要的是Smart,并不是Lazzy 人类需要hacker Technorati Tags: , , ,

2006/03/21

TrackBack from my honey

听出来了,夸我呢~嘿嘿! 病快点好吧 fox就要掉毛了 喷嚏有得打的 Technorati Tags: ,

新书到手

http://images.amazon.com/images/P/0596002815.01._SCLZZZZZZZ_.jpg
找了很久的书拿在手里的感觉 真的很舒服 想起疯子读书的怪僻;想到从前写了很多的代码,可是从来没有从头到尾看完一本教材。也许看的最多的就是代码和pydoc,给自己一个机会看完一本书吧。 恩,真的很舒服 非借不能读的不仅仅是书;不能的的书也不一定不是借的 PS: O'REILLY、ARTECH 这些出版商的东西有好多值得收藏的精品,可是,哪来那么多银子啊?有银子上哪卖啊?决心自己卖台牛x打印机,把喜欢的书都印出来…… Technorati Tags: , ,

2006/03/19

VIM TIP32

VimTip 32: Write your own vim function(scripts) 编写自己的vim函数 compare to C and shell(bash), herein is some vim specifics about vim-script: 相对于C和shell(bash)编程,这里有些vim脚本的细节要注意: 1. A function name must be capitalized. 1. 函数名必须大写 hex2dec is invalid Hex2dec is valid hex2dex是非法的 Hex2dec是合法的 while in c and shell(bash), both lowercase and uppercase is allowed. 但是在C或bash shell中,无论大小写都是可以的。 2. how to reference the parameters 2.如何传递参数

fu! Hex2dec(var1, var2) let str=a:var1 let str2=a:var2
you must prefix the parameter name with "a:", and a:var1 itself is read-only 你必须在参数前加前缀a:,并且a:var1是只读的 in c, you reference the parameter directly and the parameter is writable. 在C中,你直接调用参数并且参数是可读的 3. how to implement variable parameter 3. 如何执行变量
fu! Hex2dec(fixpara, ...)
a:0 is the real number of the variable parameter when you invoke the function, with :Hex2dec("asdf", 4,5,6), a:0=3, and a:1=4 a:2=5 a:3=6 当调用函数,a:0 是实数变量 you can combine "a:" and the number to get the value 你可以混合“a:"和数字来取得函数值
while i exe "let num=a:".i let i=i+1 endwhile
in c, the function get the real number by checking the additional parameter such as printf family, or by checking the special value such as NULL c中,函数取值是通过检验额外得参数比如printf族,或者检测特定得值是否为空 4. where is the vim-library 4.vim的库在哪? yes, vim has its own function-library, just like *.a in c :help functions 是的,vim有它自己的函数库,就像c语言中的*.a文件 :help functions 5. can I use += or ++ operator? 5.我可以使用+=或者++这样的操作符吗? Nop, += and ++ (and -=, -- and so on)operator gone away in vim. 遗憾的是vim没有类似+=和++这样的操作符(-=,--这些也是) 6. How can I assign a value to a variables and fetch its value? 6.如何分配变量置并取取其值呢?
let var_Name=value let var1=var2
like it does in c, except you must use let keyword 除了必须用关键字let以外,就像在c中做的一样。 7. Can I use any ex-mode command in a function? 7. 我可以在ex模式下调用函数吗? As I know, yes, just use it directly, as if every line you type appears in the familar : 据我所知,是的,可以直接用,就像每行都是你在熟悉的后输入的一样 8. Can I call a function recurse? 8. 可以使用递归调用吗? Yes, but use it carefully to avoid infinte call. 可以,但是要小心,避免无穷调用! 9. Can I call another function in a function? 9. 可以在函数中调用函数吗? Course, like C does. 当然,就像C一样 10. Must I compile the function? 10. 我必须编译函数吗? No, you needn't and you can't, just :so script_name, after this you can call the function freely. 不,你没必要也不能,仅仅:so script_name,之后就可以自由调用该函数了 11. Is it has integer and char or float data type? 11. 有整型,字符,浮点这样的数据类型吗? No, like perl, vim script justify the variable type depend upon the context 没有,就像perl,vim脚本自动根据变量值调整变量类型
:let a=1 :let a=a."asdf" :echo a
you'll get `1asdf' 将得到 `1asdf'
:let a=1 :let a=a+2 :echo a
you'll get 3 将得到 3 But it differs from perl. 但是它和perl有区别 12. Must I append a `;' in every statement? 必须在每一句后边加';'吗? No, never do that. 不,没必要 ; is required in C, and optional in shell for each statement in a alone line. ;在C是必须的,在shell中一行中的每一句是可选的 But is forbidden in vim. 但是在vim是禁止的 if you want combine servals statement in one single line, use `|'. 如果想在单行里边写多句,使用‘|' Take your mind that every statement appears in function should be valid in ex-mode(except for some special statement). 谨记除少数特殊声明外,函数中每一句都可以在ex模式下合法可用 Technorati Tags: ,

2006/03/18

Python for S60

Python for S60 brings the power and productivity of the Python programming language to the S60 platform. These snippets make your phone be really SMART!

read more | digg story

Technorati Tags: , ,

2006/03/11

累了。

该歇歇了 so......
Technorati Tags: