CCTV

Jan 发表于 2008-05-16 11:17:08

关键词(Tag): cctv earthquake
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

谷歌去死吧

Jan 发表于 2008-05-16 09:11:01

整天就知道舔美国主子的屁股

地震几天了?今天换上了个庆祝发明激光的logo。 google.com都没庆祝你们急着庆祝什么?

一群王八蛋


关键词(Tag): google cn
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Sun adds support for Amazon Web services, targets start-ups

Jan 发表于 2008-05-14 18:13:31

"That's because until now, you risked losing data in your database if your instance of EC2 crashed. Now Sun will give you a way to save that data and even a customer service number to call, when you think all is lost and you\u2019re about to jump off the balcony."

I'm curious how to achieve this ...

http://venturebeat.com/2008/05/04/sun-offers-support-for-amazon-web-services-aims-at-start-ups/
关键词(Tag): sun mysql support ec2
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Polymorphic Association

Jan 发表于 2008-05-13 16:12:00

"The polymorphic association, on the other hand, while it bears some resemblance to the regular polymorphic union of a class hierarchy, its not really the same since you're only dealing with a particular association to a single target class from any number of source classes, source classes which don't have anything else to do with each other; i.e. they aren't in any particular inheritance relationship and probably are all persisted in completely different tables. In this way, the polymorphic association has a lot less to do with object inheritance and a lot more to do with aspect oriented programming (AOP); a particular concept needs to be applied to a divergent set of entities which otherwise are not directly related. Such a concept is referred to as a cross cutting concern, such as, all the entities in your domain need to support a history log of all changes to a common logging table. In the AR example, an Order and a User object are illustrated to both require links to an Address object."

http://techspot.zzzeek.org/?p=13
关键词(Tag): rails association polymorphic
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

一方有难,八方支援(捐款捐物渠道)

Jan 发表于 2008-05-13 14:50:56

发信人: Penhui (2007), 信区: Quake5.12
标  题: ★一方有难,八方支援(捐款捐物渠道)★
发信站: 水木社区 (Tue May 13 01:26:17 2008), 站内

额外提醒:小额金额推荐使用短信捐款。

 建议渠道1:中国红十字会总会救灾账号和方式

  银行汇款
 开户单位:中国红十字会总会
 人民币
      开户行:中国工商银行北京分行东四南支行
  账  号:0200001009014413252
 外币
      开户行:中信银行酒仙桥支行
  账  号:7112111482600000209

  邮局汇款
    中国红十字会总会
 地址:北京市东城区北新桥三条8号
 邮编:100007

  网上捐款
    登陆中国红十字会总会网站:www.redcross.org.cn (访问人数过多可能导致崩溃)
    点击捐款热线栏目进行在线捐款。

 (通过银行、邮局和网上捐款在捐款时请注明捐款人姓名、通信地址、捐款意
     向如:四川地震捐款等信息,以便邮寄捐赠收据和感谢信)

  短信捐款
    中国移动、中国联通手机用户以及中国电信、中国网通小灵通用户均可编辑
    短信1或2,发送至1069999301,即向"红十字救援行动"捐款1元钱或2元钱。

 建议渠道2:中国红十字基金会

  邮局汇款
 地址: 北京市东城区东单北大街干面胡同53号
 邮编:100010

  银行汇款
 户名: 中国红十字基金会
 人民币
      开户银行1: 中国银行北京分行
  账号: 800100921908091001
  开户银行2:中国工商银行北京东四南支行
      账号:0200001019014483874
  开户银行3:中国建设银行北京朝内大街支行
  账号:11001070300059000427
    外币
      开户银行:中国银行
      账号: 800100086608091014

 建议渠道3:中国扶贫基金会"我们心在一起"--汶川地震紧急救援行动

 捐赠标准
  类别       价值           备注
  棉被       100元
  粮食       300元     大米、方便面、水等
  食用油     50元           5升
  执行费用   50元    用于救灾物资仓储、运输、发放等
  总计       500元   可以帮助灾民度过灾后一个月的生存危险期

 捐赠方式

  银行汇款
    开户单位:中国扶贫基金会
    开户行:中国银行北京科技会展中心支行
    账号:8145-11681908091001 (捐款请注明"汶川地震救援")

  邮局汇款
    地址:北京市海淀区双榆树西里36号南楼五层
    邮编:100086(捐款请注明"汶川地震救援")

      现场捐赠
    办公地址 北京市海淀区双榆树西里36号南楼五层
      咨询热线:010-62655199(8:30-21:00)
关键词(Tag): earthquake 512
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

地震了

Jan 发表于 2008-05-12 16:56:35

正在办公室happy coding,忽然头有点儿晕,身子骨发颤,心想真好玩,难不成是癫痫发作的预兆?

一转念想自己不是癫痫病人,然后发现显示器在晃,把腿抬起腿在晃,整个椅子都在晃,站起来终于发现原来是地在晃。。。顿时寒了一下,抓起钥匙冲了出去。本来想走楼梯,又怕走楼梯速度太慢走到一半被震了就不好玩了(谁让我在19楼。。。),于是等电梯,然后发现这果然是个非常失败的决定,电梯几乎在每一层都停一下,然后呼啦上来一堆人。。。如果真的地震我肯定挂了。电梯里面晃的很厉害。

还好老天保佑一坨人摇摇晃晃到了一楼,心稍安。过了一会儿有人说北京地震了,心想完了,死党不是在北京吗?赶忙打个电话过去,发现是假消息。待了一会儿好像没事了,回家先。。。 上网才知道四川地震了,老天保佑,大家平安。

对本次地震的反应,网易比新浪快多了。可惜网易的服务器不行啊,评论4页的时候服务器就挂了,我再也刷新不开。新浪虽然后发然而先至,瞬间评论超过50页,网页打开依旧流畅。新浪在我心中形象瞬间高大了许多~,新浪能成为国内新闻第一大站不是吹的。难道是nginx+memcache的功劳?网易不知道用的什么服务器,apache? 

后来发现CnBeta的报道似乎最早而且很全面,比网易新浪枯燥的几个字好许多。Web2.0的胜利?

国家地震局的网页打不开,邮件列表里面有朋友贴了美国地震局的报告,心里无限悲凉,别提向外输出价值观了,什么时候中国能向外输出地震报告了,也算是真正崛起了。
关键词(Tag): earthquake
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Moto with one wheel

Jan 发表于 2008-05-08 20:29:34

关键词(Tag): moto
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Subversion considers its future

Jan 发表于 2008-05-05 12:21:30

http://lwn.net/Articles/280472/

I have the same feeling after I tried git. Some guy told me Mercurial is worth a try and other guys told me bzr is cool. They are all DVCS.
关键词(Tag): subversion dvcs
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Agile Web Development with Rails, Third Edition

Jan 发表于 2008-04-24 09:32:10

by Sam Ruby, Dave Thomas, David Heinemeier Hansson, et al

Updated for Rails 2

http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition
关键词(Tag): rails agile
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

habtm and has_many :through

Jan 发表于 2008-04-23 17:26:15

Most articles on the web give ppl an impression that habtm(has_and_belongs_to_many) is outdated and you should use has_many :through in many-to-many relationship between ActiveRecord models. I'd say that's wrong.

In fact habtm is more closer to has_many without :through than has_many :through, like it will add #{collection}_ids method but has_many :through won't. And habtm is NOT outdated, has_many :through is not a replacement of habtm. You should restrict yourself to use has_many :through only when you have to model the join table in the middle, in any other case, habtm is the better choice.
关键词(Tag): through habtm has_many
收藏: QQ书签 del.icio.us 订阅: Google 抓虾