Archive for November, 2007»
我评”一个好博客需要有哪些特点?”
1、可以在title随机显示一些名言,哲言等等,像verycd那样。
//我不是传教士,也不需要在自己的blog里被教化,还是喜欢 网站站|文章名这样的形式
2、可以选择每篇博文的风格,图文,仅文字,图片集,视频,在线音乐,专辑,电影。。。。。当然,还必须有代码格式,技术文章格式。
//尽可能的简单就可以,for me
3、页面背景随意更换,样式随意更换
//青少年需要这些
4、有主题,页面不一定非要下来格式,我就像要横拉格式的页面
//同感
5、能自己上传当前主题的背景音乐,最好是列表形式,循环播放
//播放音乐给自己听:-)
5+、当然,也能上传当前主题的图片
//同意
6、文章式样要很多种,比如文字颜色要多,能随便放兔斯基的图片
//有同感
7、匿名评论也能有头像显示
//匿名评论的就显示一个外星人头像吧:-)
8、每篇文章都有自己的标志性图片
//这样恐怕载入会慢
9、摘要显示文章,标题显示文章
//许多blog已经是这样了
10、每篇文章下面都能随机显示几条其他文章列表
//典型的wordpress插件功能
11、考虑到隐性的域名跳转。或栏目多域名绑定
//有同感
via:大家说:一个好博客需要有哪些特点?
the big bang toeory-非一般搞笑
最近在看一部名叫the big bang toeory的肥皂剧,故事围绕着几个科学家和一个女孩展开,人物没什么特色,胜在对话极其有趣,这有趣不是一听就能令到你笑出来,是需要你思考才能明白。对我来说最重要的一个特色是每一集的剧情是“不连续”,不会说看了这一集就追着跟着什么什么样。
第五集
技巧:Vim的时间戳快捷键
Vim tips: 时间戳快捷键
使用:e $VIM/_vimrc命令打开vimrc文件
添加下面代码
map <F2> a<C-R>=strftime("%c")<CR><Esc>
这样在非编辑模式下,按F2就会在光标位置插入一个当前时间
全球15个顶级技术类博客
在
互联网世界当中,博客网站的种类是多种多样的。它们中的一些旨在教导、帮助人们交流协作、激发灵感,并拓展我们的思维空间。而另一些博客则侧重于激发我们的情感,让我们感到愤怒,或是让我们开怀大笑。《电脑世界(Computerworld)》网站的编辑们这些优秀博客网站搜集整理在了一起,为我们提供了一份最受他们所钟爱的博客网站的列表。最后,我们根据这些博客自身的信息广度、新闻价值、网站设计、更新频率以及娱乐价值,将这份50多位候选人的大名单做了进一步的缩减,最终得到了这份15个世界最顶级的技术类博客网站排行榜。
不错,这份排名的确包含了很大的主观成分,但是我们认为它是有史以来发表过的此类博客网站的最棒的排行榜之一。这份名单所涵盖的范围非常广泛:从严肃的技术性新闻,到对电脑游戏测评和评论,再到新潮消费者电子产品介绍。我们同时也在本份名单的最后增加了一些“荣誉提名”,因为这次排名的竞争是如此的激烈,让我们感到很难取舍。
当然了,肯定不会是每一个人都赞同我们的观点。如果你认为有某个博客网站非常的优秀,而又没有出现在我们的“前15名排行榜“中的话,请在本文后面的评论当中留言与我们分享。
1) 生活骇客(Lifehacker) //注:这里的hacker其实是指“很特别技巧,而不是搞破坏
http://www.lifehacker.com
生活骇客(Lifehacker)的座右铭表达了它的全部理念:“不要为技术而生活,要为生活而关注技术!”这个博客提供了有关于各方各面的“时间节省”小贴士,从Firefox网络浏览器的快捷操作,到来自“时间管理教”忠实信徒的谆谆教诲。
2) IT工具箱博客(IT Toolbox Blogs)
http://blogs.ittoolbox.com
IT工具箱博客(IT Toolbox Blogs)有着一大群“战斗在第一线”的IT专家们讨论有关于技术和IT管理的话题。它拥有一系列专业性的博客在处理跟IT安全、数据库、项目管理和其它等等相关的问题。这是一个包罗万象的网站。
3) 硅谷闲话(Valleywag)
http://valleywag.com
“众口铄金,积毁销骨”。硅谷闲话(Valleywag)是专门为那些相信“在技术行业中的生死在很大程度上都取决于硅谷周围所传播的闲话”的人准备的。对于那些热衷于制造、听闻和传播硅谷谣言的那些人来说,这个网站凭借着其卓越的“专业素养”而让人大为惊叹。
4) Kotaku
http://kotaku.com
Kotaku是电脑游戏爱好者的“加油站”。它拥有跟电脑游戏有关的一切,从对游戏的测评,到相关的讨论和扯淡,再到作弊技巧。这里有你所需要的一切,比如某款游戏到哪里去购买,以及怎样进行玩耍。
5) 威胁空间(Danger Room)
http://blog.wired.com/defense
《连线(Wired)》杂志所推出的军事和防卫博客网站,它向读者介绍了这个世界上最新、最酷、最令人震撼的军事技术——更不用提那些丑闻、争论和其它类型的军事新闻。网站中还提供了许多视频和图片。
6) 小发明(Gizmodo)
http://gizmodo.com
小发明(Gizmodo)网站专门为读者挖掘全世界最新、最酷、或是最稀奇古怪的技术发明——从高清晰电视、到咖啡机、到弹力腰带,再到USB驱动器。是的,他们同样也发布那些严肃的技术性新闻。
7) O’Reilly 雷达(O’Reilly Radar)
http://radar.oreilly.com
这是你能够阅读到Tim O’Reilly(著名的O’Reilly出版公司的创始人)和其它人讨论有关于网络、编程、开放源代码运动、知识产权、政策、Web 2.0和其它前沿科技的地方。
技术丑闻(Techdirt)
http://www.techdirt.com
技术丑闻(Techdirt)是一个话题中心,以在当前的互联网和电脑领域的热门事件上引发激烈争论而闻名。流言蜚语是它的所爱!简洁是它的特点!
9) Groklaw
http://www.groklaw.net
Groklaw网站的原本存在目的是支持SCO公司对IBM和Novell公司所发起的漫长的专利侵权诉讼,但是不知道什么时候,这里的讨论转向了其它方面,话题包括了技术、知识产权以及政府法规。
10) 改造一整天(Hack a Day)
http://www.hackaday.com
想要学习怎样为一个廉价的Linux路由器添加一个USB设备吗?想要制作一个蛇形机器人吗?或是将自己的XBox 360游戏机改造成一台笔记本?“改造一整天(Hack a Day)”上提供了这些地下室项目,以及其它更多有趣的项目。这个网站是为那些真正有一定技术素养,喜欢自己动手改造技术产品的玩家所准备的。但与此同时,你也可以在这里发现很多乐趣,说不定还会从中开发出一项新的爱好。
11)小玩意儿(Engadget)
http://www.engadget.com
就像可口可乐和百事可乐的关系一样,小玩意儿(Engadget)和小发明(Gizmodo)就像是一对孪生兄弟。它也是专注于技术产品相关的介绍、评论,有时候也会有充满激情的演讲和辩论。小玩意儿(Engadget)上充满了摄制精美的产品图片,而它网站的编辑们还有着广泛的内部渠道,可以在新潮的技术产品还处于先期或早期发布阶段,就可以一睹它们的芳容。同样的,小玩意儿(Engadget)上面也会刊登一些真正非常有趣的手工制作的玩意儿。但是,我们更喜欢小发明(Gizmodo)一点。
12) Feedster
www.feedster.com/feedpapers/Technology
一切都是那么的水到渠成。这个网站汇集了各种各样的博客站点,包括技术类、体育类、名人八卦、美食、个人体验等等等等——只要你能想到的,它都拥有。同时,它还提高了卓越的站内搜索功能,以及一个非常酷的RSS新闻阅读软件。它在技术新闻里面加入了非常出色的幽默感。这真是一个各方面都很优秀的网站。
13) 永远的骇客(Forever Geek)
http://forevergeek.com
永远的骇客(Forever Geek)是一个非常棒的网站,它有无数的博客文章,覆盖了多种多样的话题,从技术,到大众新闻,到好莱坞电影,再到电脑游戏测评。这绝对是一个骇客的天堂。假如你想要了解即将上映的好莱坞巨片《变形金刚》的最新消息,或是阅读一篇有关于Photoshop CS3软件的测评,这就是你应该去的地方。
14)粗鲁的文字(Rough Type)
www.roughtype.com
Nick Carr(笔名“Does IT Matter?”)撰写的一个思想锐利的博客,专门讨论与技术相关的各种各样的话题和趋势。他的文章文笔优美,让人阅读起来津津有味,但是同时也会常常激烈那些被批评的公司、人物、技术和政策。
15) 自助餐(Smorgasbord)
www.smorgasbord.net
作为一个为那些喜爱数码产品和电脑游戏的骇客们所专门打造的站点,这个网站同样也提供最新的有关于政治和名人的新闻。这种娱乐价值和技术新闻的战略组合,让自助餐(Smorgasbord)跻身于最优秀者的行列。
荣誉提名:
1) 苹果(Apple)非官方博客 (TUAW)
www.tuaw.com
TUAW集结了许多独立的博客——这些独立的博客虽然和苹果公司官方没有正式的关系,但是这并不意味着他们的信息不充分、意见没有影响力。这是一个了解苹果公司相关新闻的最好来源。它没有跻身前15名的唯一原因是它太过于专注于一个单一话题。
2) Elliot Back 的博客(Elliot Back’s blog)
http://elliottback.com/wp
作为自封的“计算机科学家”,Elliot对于每一件自己所关注的事情大放厥词,从为什么XML标准很糟,到泰坦尼克号的旅客名单,再到对好莱坞巨片《斯巴达300勇士》的影评。这个网站的内容多种多样,但是安排巧妙。此外,他还会提供一些非常棒的小贴士,比如如何增进系统的性能,以及屏蔽垃圾邮件。
3) Ed Foster 的牢骚录(Ed Foster’s Gripelog)
www.gripe2ed.com/scoop
时下有一类新的博客网站涌现了出来,它们专门抨击和曝光那些侵害消费者权益的公司和产品,诸如数码产品恶劣的售后服务、粗糙的产品外观或是其他诸如此类的一些问题,但是Ed Foster可谓是这一行的开山鼻祖。看看他最新所关注的一些话题:有缺陷的DRM系统、plasma品牌电视机的质保陷阱,以及糟糕的移动电话服务质量。
4) Gadgetell
www.gadgetell.com
假如你想要了解最新的数码产品、电玩游戏新闻,以及其他相关的一些消息,这是一个很棒的网站。
5) 4sysops
http://4sysops.com
它为Windows系统的管理员们提供了非常优秀的小提示和操作教程。
为什么要学ruby?(10 reasons to learn ruby)
有人翻译成中文(学ruby的十条理由),但删减太多,还是原味的好:-)
Preamble I discovered Ruby fairly recently, through the excellent Ruby on Rails framework.[1] Although I don’t consider myself a Ruby expert by any means, I read the PickAxe[2], I’ve coded a few utilities for my personal use in Ruby and I’m currently developing with Rails during my free time.
Ruby is currently my programming language of choice; I started off with Turbo Pascal in high school, discovered C and C++ at university, did my thesis in Java and learned PHP from scratch because I wanted to learn how to make websites quickly and easily. I guess I feel compelled to code sometimes, more as a form of entertainment than anything else. Rather dissatisfied with what I tried language-wise, I was determined to start learning either Python or Ruby. I chose the latter because I didn’t want incorrect indentation to break my code[3], and here I am, heaping praise upon it.
There are plenty[4] of introductions, tutorials, articles and essays of different sorts which aim to guide the novice and advise the guru on how to get the most out of Ruby. This article, however, is not one of them.
It’s more of a modest, humble, and incomplete list of a few reasons which may (or may not) entice you to use Ruby or at least play with it a bit. A word of caution: if you are using another programming language for work or whatever, don’t complain to me if you don’t want to use it anymore - that’s exactly what happened to me, but luckily, it didn’t matter. Ruby is a very beautiful and elegant language, but like all things of this sort, it may well poison your mind and corrupt your soul…
You have been warned.
Why learn Ruby?
#1 - You get all the treats without the tricks
Ruby borrows from all the best programming languages out there, from smalltalk to Java, Perl to Python[5]. Basically, here’s the features and functionalities Ruby gives you which you may have seen elsewhere:
- Exceptions: Believe it or not, exceptions are one of the most important things to master when developing any kind of application. PHP4 programmers probably won’t know anything about them and they’ll tell you to just print stuff on the screen or use their “extremely advanced” class for error handling. Please, ignore them. Fortunately for all of us, Ruby comes with try/catch (or better, begin/rescue) blocks and a series of predefined, extensible Exceptions to handle errors properly.
- Namespaces: Ruby modules make excellent and easy-to-use namespaces, for the joy of Java and C++ enthusiasts.
- Built-in Regular Expressions: For all the Perl monkeys, you can put something between slashes and it will become a regular expression, ready to be matched with a =~ operator.
- Overloadable operators: Ruby lets you define operators like +, -, >, etc., for any of your classes.
- Packages: Called “gems”, they really are solid and precious indeed…and they work! Packages support dependencies, and they can be either cross-platform or platform-dependent.
- Interactive Shell: the Interactive Ruby Shell can be used to test Ruby code instantly, similar to the Python console.
#2 - You’ll love the little things
Ruby is elegant. Why’s that? Because it doesn’t focus on making code concise so much as readable and usable. Here are some tips to help you out:
- You can use both if and unless in condition statements. Of course you can just use if and negate the condition, but unless can be less error-prone at times. Furthermore, you can use both operators as conditional modifiers, after a statement rather than before: order.new unless order.exists.
- You can use question marks and exclamation marks at the end of your methods. Although no convention is enforced, ? is added if the method should return true or false, while ! is used to clarify that the method does something forcefully, like destroying a database record, chopping off the last character of a string, etc.
- You can use the alias directives to create an alias for a method already defined. In this way you can have an exist and an exists method at no additional cost or repetition.
- You can use the attr_reader, attr_writer or attr_accessor directives to automatically generate getter and setter methods for specified class members.
- Some naming conventions are enforced for your own sanity: constants, classes and modules are capitalized, methods and members must start with a lowercase letter; global variables are prepended by a $, instance variables by @ and class variables by @@; etc.
- Parentheses are optional in method calls. You can therefore write File.open(”/home/h3rald/test.txt”) or simply File.open “/home/h3rald/test.txt”, which is particularly handy with methods that don’t take parameters.
#3 - You won’t ever use a semicolon again
You want to add another instruction? Just go on the next line. Hit <return> and you’re done. In Ruby, like in Python, newlines matter and you don’t have to remember to end your instructions with a semicolon. Unfortunately this means that you won’t be able to write your whole program in a single line of code, like the C++ folks…that’s too bad, isn’t it?
#4 - Everything is an object, as it should be
When I studied Java they taught me that everything is an object.
- “So 14 and 374346.678 are objects then?”
- “No, silly, they are numbers!”
In Ruby, numbers, strings, Boolean values et al are objects. Really. This means you’ll write things like:
"YOU SHOULDN'T ALWAYS USE CAPITALS".lowcase
#=> outputs "you shouldn't always use capitals"
instead of something like:
# PHP Code strtolower("YOU SHOULDN'T ALWAYS USE CAPITALS")
You save time, you save brackets, and it just makes more sense.
#5 - Everything has a value
Or “you’ll hardly ever use return to return values”. In a nutshell, all Ruby instructions return a value, even variable assignments, so you don’t really need to use the “return” keyword at the end of a method; the value of the last assignment will always be returned.
#6 - You can alter your environment in any way you like
The first time I saw this, it really freaked me out. Imagine a typical programming situation: you start using a system class or a class written by someone else and you notice that you’d like to have an additional method. At this point you have a few ways to handle this in ordinary programming languages:
- You modify the developer’s source code, if you have access to it. This is normally not a good idea, and you shouldn’t do it. Read more »
使用rtranslate
Usage:
sishen@lifegoo:~$ irb -rubygems
irb(main):001:0> require ‘rtranslate’
=> true
irb(main):002:0> $KCODE = ‘u’
=> “u”
irb(main):003:0> result = Translate.t(”china”, Language::ENGLISH, Language::CHINESE_SIMPLIFIED)
=> “中国”
irb(main):004:0> result = Translate.t(”china”, Language::ENGLISH, Language::JAPANESE)
=> “中華人民共和国”
irb(main):005:0> result = Translate.t(”china”, Language::ENGLISH, “zh-TW”)
=> “中國”
http://code.google.com/p/rtranslate/
在线生成一个漂亮的logo
打开http://h-master.net/web2.0/index.php
输入:i[c=ABBAAA]g[/c]nuts
就这样生成一个漂亮 web2.0 logo了。





