2010-03-11

Shanghai on Rails 3/20号活动通告 ... no reply

Shanghai on Rails 3/20号活动通告





【时间】: 3月20号 下午1:00

【地点】: 普陀区云岭东路599弄汇银铭尊20号一楼咖啡厅(光复西路与丹巴路路口)

【交通】


地铁:2号线威宁路站下,4号口出,沿威宁路步行通过泸定路桥,到光复西路。
公交:推荐使用谷歌地图搜寻乘车路线。(ditu.google.com)




http://skitch.com/daniellv/n3cm7/screen-shot-2010-03-11-at-12.13.07-pm



活动演讲者及主题



Jeff Su
CTO Factual.com
演讲主题: JS2应用

Jason Chen
架构师 南京赛威
演讲主题:when ERP fell in love with rails

叶玎玎
架构师 Intridea.com
演讲主题: NoSQL: Re-think about the world

Richard Huang
架构师 Ekohe.com
演讲主题: static code analysis for ruby




报名方式

不设报名环节,到时候您人过来就可以了,free style! 注意:40人场地,座位先到先坐,迟了就没了,不设贵宾席!!!



P.S.

另外,会议还增设一个自由讨论环节,将由主持人引领大家来一次2009年Rails发展点评,2010年Rails得展望以及Rails3前瞻,Rails社区得发展等方面得自由讨论/头脑风暴环节。



现在每个演讲嘉宾已经确定,各项组织筹备,推广活动已经开始,请大家奔走相告,说给身边作Rails得人,对Rails有兴趣得人,我们3月20日不见不散!



Shanghaionrails 线下活动每个季度举办一次,去年成功举办了一次线下活动以及两次大型活动(首届RubyChina conf以及首届KungfuRails China),杭州两次线下活动。Shanghaionrails是个小圈子,我们就是这样一种活动组织,定期聚会碰头,交流心得... 我已经等不及了,你还等什么?


by wear at 2010-03-11 02:45 PM

Shanghai on Rails 3/20号活动通告 ... no reply


【时间】: 3月20号 下午1:00
【地点】:
普陀区云岭东路599弄汇银铭尊20号一楼咖啡厅(光复西路与丹巴路路口)
【交通】

地铁:2号线威宁路站下,4号口出,沿威宁路步行通过泸定路桥,到光复西路。公交:推荐使用谷歌地图搜寻乘车路线。(ditu.google.com)

http://skitch.com/daniellv/n3cm7/screen-shot-2010-03-11-at-12.13.07-pm

活动演讲者及主题

Jeff Su
CTO Factual.com
演讲主题: JS2应用

Jason Chen
架构师 南京赛威
演讲主题:when ERP fell in love with rails

叶玎玎
架构师 Intridea.com
演讲主题: NoSQL: Re-think about the world

Richard Huang
架构师 Ekohe.com
演讲主题: static code analysis for ruby


报名方式
不设报名环节,到时候您人过来就可以了,free style! 注意:40人场地,座位先到先坐,迟了就没了,不设贵宾席!!!

P.S.
另外,会议还增设一个自由讨论环节,将由主持人引领大家来一次2009年Rails发展点评,2010
年Rails得展望以及Rails3前瞻,Rails社区得发展等方面得自由讨论/头脑风暴环节。

现在每个演讲嘉宾已经确定,各项组织筹备,推广活动已经开始,请大家奔走相告,说给身边作Rails得
人,对Rails有兴趣得人,我们3月20日不见不散!

Shanghaionrails 线下活动每个季度举办一次,去年成功举办了一次线下活动以及两次大型活动(首届RubyChina conf以及首届KungfuRails China),杭州两次线下活动。Shanghaionrails是个小圈子,我们就是这样一种活动组织,定期聚会碰头,交流心得... 我已经等不及
了,你还等什么?


http://www.javaeye.com/topic/613532


by Caiwangqin at 2010-03-11 02:24 PM

2010-03-10

DHH合作的新书Rework,有人说读此书比MBA的创业课程更实用 ... 1 reply

http://37signals.com/rework/



节选下载
http://s3.amazonaws.com/37assets/svn/Rework-by-Jason-Fried-and-David-Heinemeier-Hansson-Excerpts.pdf

里面充斥着颠覆传统商业运作的诳语:
会议是毒药,创业起步找个对头单挑,计划就是瞎猜

不太理解的还有
不用尽全力去竞争Underdo your competition(体现在产品功能上不必求大而全多而杂)


by bd7lx at 2010-03-10 08:50 AM

淘宝MED团队招聘Ruby开发工程师 ... no reply

MED = Marketing Experience Design

我们的自主项目 banner.alimama.com 目前承载者百万PV/天的访问,是一个收入在持续增长的盈利项目。

我们是一个微型团队,至今FullTime的开发者仅有一人,如果算上AS工程师,共计三人。我们崇尚快速迭代,小步快跑。

所以,如果你想尝试从PD干到SA的感觉,可以来我们这里试试。产品可能因为你而改变,架构可能因为你而改变,没有什么不可以。

JD如下:

Ruby开发工程师
工作地点:杭州
招聘人数:1~2名

1、清楚自己为什么使用Ruby,体会到Ruby编程的乐趣,尝试过各种Ruby-Style的编程
2、有丰富的Linux使用经验,必要时能够承担起APP OPS的职责
3、读过Rails源码,了解Rails的基本代码结构,对历史版本的Rails有足够的了解。贡献过补丁或者代码者尤佳,贡献过Rails Plugin者尤佳!
4、对可伸缩web的部署和开发有心得,喜欢尝试新架构
5、热爱TDD或者BDD
6、熟悉MySQL,熟悉Memcached等Key-Value DB,有NoSQL DB使用经验者尤佳!
7、我们希望你是全能型选手


有意者请投递简历至:nowazhu@gmail.com


by nowa at 2010-03-10 08:24 AM

求高手给个rails 所见即所得的编译器插件。 ... 6 replies

做blog用,有哪些加粗啊,粘贴个图片啊什么的,

另外请教一下贴图片是怎么实现的?我把电脑的图片贴上,怎么也得给图片安个家吧,把jpeg加入mysql?


by jinleileiking at 2010-03-10 04:40 AM

程序员上火怎么办Programmers: What To Do If You Get Fired ... 3 replies

http://gilesbowkett.blogspot.com/2010/03/programmers-what-to-do-if-you-get-fired.html

不是靠喝汽水能解决的



主要探讨的还是声誉创造机会和财富


by bd7lx at 2010-03-10 02:33 AM

2010-03-08

gemsday 每周gem秀 ... no reply

http://gemsday.org/

Share your favorite new RubyGems weekly. Tweet #gemsday and a list of gems on Wed!


by bd7lx at 2010-03-08 12:38 AM

2010-03-07

使用seo_checker检查你的网站是否seo ... no reply

前几天刚刚做了一个rubygem seo_checker,主要是根据google出的search-engine-optimization-starter-guide.pdf来检查一些基本的seo。

检查内容包括:
use sitemap file
each page are reachable
each page has title
use unique title tags for each page
each page has meta description
ues unique descriptions for each page
url does not just use ID number.
url does not use excessive keywords
url does not have deep nesting of subdirectories

项目地址:http://github.com/flyerhzm/seo_checker

欢迎试用


by flyerhzm at 2010-03-07 09:39 AM

bullet2 beta released, supports rails3 beta ... no reply

这两天升级了bullet gem,使得可以支持rails3 beta。

bullet gem旨在通过减少sql 查询数量来帮助你提高应用的性能。 它会在你开发应用的时候监视你的sql查询,并提醒你哪里应该加eager loading(避免N+1查询),哪里使用了无用的eager loading,哪里应该使用counter cache。

项目地址:http://github.com/flyerhzm/bullet

现在比较流行出beta版的gem,如rails3和rspec2,所以我也赶下时髦,把当前版本作为beta版,等rails3正式release了,bullet2再发布正式版。

安装:sudo gem install bullet --pre

具体使用参看http://github.com/flyerhzm/bullet,其中Step by step example也已升级为rails3 beta应用。

欢迎大家使用

谢谢


by flyerhzm at 2010-03-07 09:09 AM

2010-03-06

【交换】《Programming ruby 中文版》第2版、《Ruby for rails中文版》、《Ruby on rails社区网站开发》 ... no reply

本人朋友欲用《Programming ruby 中文版》第2版、《Ruby for rails中文版》、《Ruby on rails社区网站开发》交换《python核心编程》或《Jakarta Commons Cookbook 中文版》

地点:北京
联系方式:QQ360597277


by Hooopo at 2010-03-06 02:07 PM

2010-03-05

游戏 Webgame 开发 ... 5 replies

职位描述:

游戏 Webgame 开发

职位1: 中级程序员

要求:

1、1~2年的Rails实践开发经验
2、有扎实的技术基础
3、熟悉linux、mysql等技术
4、能较熟练的阅读相应的英文技术资料
5、工作细心、敬业,踏实、好学


职位2: 高级程序员

要求:
1、Rails 两年以上经验
2、Web开发三年以上经验
3、有系统分析、设计经验

优先考虑 :
1、熟悉设计模式
2、有大访问量系统构架、数据库优化经验


by jingjing at 2010-03-05 07:35 AM

美国结构数据诚觅优秀网页UI工程师 ... no reply

美国结构数据(Factual.com)是一家总部位于洛杉矶的创新公司,致力于将更多更好的结构化数据开放给大众,以便于人们通过数据的利用完成各种研究、开发、创作,发挥数据带来的无限可能性。

现上海办公室急需网页UI工程师。

要求:HTML/CSS/W3C/跨浏览器/Photoshop/Dreamweaver/UI设计原则/英语沟通能力
加分:编程能力/JavaScript/Ruby on Rails


详见英文职位描述。


Requirements:

* have an intermediate to advanced knowledge of HTML/CSS, please be ready to show examples
* be able to write clean, reusable and readable html and css
* make sure markup is semantically correct and valid according w3c specifications
* be familiar with cross browser issues and how to handle them
* proficient in web design tools (ie: Photoshop, Dreamweaver, etc...)
* have experience in modern web concepts and design (ui standards, proper spacing, image sprites, etc.)
* must have excellent english communication skills


Preferences:

* prior programming experience is a plus (Javascript, Perl, Ruby, Python, or anything)
* javascript experience is a huge plus
* haml/sass experience
* ruby on rails experiences

Desired Characteristics:


* Able to work independently or with a team
* Good communicator (asks questions)
* Pays attention to detail
* Self motivated
* Keen interest in modern web
* Strong desire to learn


Job Description:

* Communicate with colleagues in Los Angeles office
* Read, understand and implement complex use cases
* Interact with software engineers to accomplish tasks
* Identify possible UI problems and provide solutions
* refactoring and reorganizing html/css into bulletproof ui elements
* ensure cross browser compatibility
* dealing with bugs using bug tracking and version control


欢迎对该职位有兴趣的朋友将中英文简历投至peggy@factual.com,谢谢!

另诚聘互联网前端开发工程师。


by peggy1031 at 2010-03-05 06:57 AM

Mai Kuraki -永远より ながく

http://www.ccok.me/photo/image/59/medium/mai3.jpg

 

感觉Mai越来越成熟有女人味了@_@

 

专辑介绍:

日本平成三大歌姬之一仓木麻衣(Mai Kuraki)2010年的第一支单曲《永遠より ながく》在2010年3月3日发售,这是Mai十周年纪念的首支单曲,标题曲目《永遠より ながく》是比较欢快的曲风!!

 


专辑曲目

1. 永遠よりながく
2. Drive me crazy
3. 永遠よりながく-Instrumental-
4. Drive me crazy -Instrumental-

 

电驴传送门: 踢我

 

 

by shitou at 2010-03-05 02:13 AM

2010-03-04

加强版的 irb 和 rails console ... 3 replies

使用 Wirble,可以为 ruby 和 rails 命令行增加代码高亮和代码记忆功能。

安装
sudo gem install wirble

在 ~/.irbrc 中加入
require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize


代码高亮效果图:
(怎么上图阿?)

更多说明:
http://zhangzhe.heroku.com/blogs/6-gong-zuo-ji-qiao-ji-lu-chi-xu-geng-xin


by zzhang at 2010-03-04 06:35 AM

twitter的开源工具。。 ... no reply

http://github.com/mzsanford/twitter-text-rb

Twitter text processing library (auto linking and extraction of usernames, lists and hashtags)
http://engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html


by rociiu at 2010-03-04 01:54 AM

2010-03-03

上海-美国结构数据诚觅网站前台开发工程师 ... 2 replies

美国结构数据(Factual.com)是一家总部位于洛杉矶的创新公司,致力于将更多更好的结构化数据开放给大众,以便于人们通过数据的利用完成各种研究、开发、创作,发挥数据带来的无限可能性。

现上海办公室急需互联网前端开发工程师。

Job Description:
* utilize javascript, html, and css with our api to develop new ways to visualize data
* communicate responsibly with colleagues in LA and Shanghai to provide swift problem resolution
* create classes for reusable ui elements
* refactor and reorganize html/css into bulletproof and clean code to ensure cross browser compatibility
* deal with bugs using bug tracking and version control
* make sure features are completed according to specification

Requirements:

* have an intermediate to advanced knowledge of HTML/CSS
* be able to write clean, valid, reusable and readable html and css
* be familiar with cross browser issues and how to handle them
* have an intermediate to advanced knowledge of javascript: OO, class methods
* must have excellent english communication skills
* have some prior programming experience (Javascript, Perl, Ruby, Python, etc.)


Preferences:

* experience building web aps using api's or creating api's
* ruby on rails experiences
* understand modern web design and standards
* experience in using ajax to build web apps


Desired Characteristics:

* Able to work independently or with a team
* Good communicator (asks questions)
* Pays attention to detail
* Self motivated
* Keen interest in modern web
* Strong desire to learn

欢迎对该职位感兴趣的朋友将简历发送至 peggy@factual.com, 请注明应聘职位及招聘信息来源。谢谢!


by peggy1031 at 2010-03-03 07:32 AM

acts_as_archive 可以在windows下使吗? ... 7 replies

我的开发环境是Ubuntu ,acts_as_archive是一个软删除的gem包 ,它在开发环境中一些正常

产品环境只能用windows的server产品,是我安装这个gem后 提示 找不到
lib/acts_as_archive/base

好像还和另一个叫 require 的gem 有关...
各路大哥有请解惑


by 邢星 at 2010-03-03 02:30 AM

2010-03-02

Ruby 工程师 ... 9 replies

职位描述:

负责、参与电子商务核心系统的设计和开发,参与底层框架和系统分析层面的开发工作



职位要求:

1、计算机或相关专业,能阅读相关英文技术文档;
2、熟悉RUBY编程语言,熟练使用Ruby On Rails框架进行网站应用开发,以及Ror的部署和优化;
3、Web开发经验,熟悉HTML,JAVASCRIPTS,DIV,CSS;
4、熟悉Linux操作系统,熟悉MYSQL或者ORACLE;
5、具有高度的责任感,工作积极主动,有较强的适应能力,有耐心;

联系方式:
mail : HR2010@imcol.cn
TEL: 010-68871322


by jingjing at 2010-03-02 02:47 AM

JRuby Startup Time Tips 启动提速贴士 ... no reply

http://blog.headius.com/2010/03/jruby-startup-time-tips.html

说道选什么JVM

据说Oracle收了SUN后要把旗下两个JVM合成一个

下面的client backend需要留意
most JVM installs preferred the "client" backend, which meant JVM startup was about as fast as it could get. Unfortunately, many newer JVM releases on many operating systems are either defaulting to "server" or defaulting to a 64-bit JVM (which only has "server")



http://chinaonrails.com/topic/view/2934.html


by bd7lx at 2010-03-02 01:08 AM

北京,上海寻Rails开发人员(兼职) ... 1 reply

1. 2到3年以上web开发经验。
2. 精通基于Ruby on Rails框架的WEB开发技术
3. 有经验开发过大型的Web应用程序,进行过可扩展web应用策划,设计的
4. 有团队开发经验的能够带领开发团队完成项目开发
5. 熟练运用基于JQuery或者prototype的Ajax框架开发
6. 掌握关系型数据库的基本概念,熟悉MySql数据库
7. 两年以上ROR项目开发经验优先考虑
8. 有良好的书写文档的习惯
职位要求:前端开发
1. 2-3年Web app设计
2. 精通HTML, CSS,javascript前端开发
3. 有一定UED背景或者经验
4. 能够很好配合程序人员,把页面制作好
5. 有一定ROR开发背景经验有限考虑
6. 良好的代码习惯


by irpr at 2010-03-02 12:59 AM

2010-02-26

请教flex+webORB交互的问题 ... 1 reply

我后台语言是rails,用ruby script/plugin install http://themidnightcoders.net:8089/svn/weborb安装最新的webORB但是一运行项目就会出现如下错误
C:\Ruby\bin\ruby.exe -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) D:/Workspace/mytest/script/server -p 3000 -b 127.0.0.1 -e development
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://127.0.0.1:3000
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing': uninitialized constant Rails::Plugin::Dependencies (NameError)
from D:/Workspace/mytest/vendor/plugins/weborb/init.rb:30:in `evaluate_init_rb'
from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:158:in `evaluate_init_rb'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:154:in `evaluate_init_rb'
from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:48:in `load'
from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:38:in `load_plugins'
from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `each'
from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `load_plugins'
... 12 levels...
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from D:/Workspace/mytest/script/server:3
from -e:1:in `load'
from -e:1

Process finished with exit code 1
知道的请告诉我是什么原因,谢谢


by byderek at 2010-02-26 07:49 AM

中文乱数排序,但标点符号位置固定 ... 3 replies

一段文字乱数排序,可以用这样的方式来执行:
>> a = "这是一段文,并且可以有“标点”以及“符号”。"
=> "这是一段文,并且可以有“标点”以及“符号”。"
>> a.split('').sort{rand(a.size) - 1}.join
=> "可及。这“符,“点文以有一是以标段并””且号"
>> a.split('').sort{rand(a.size) - 1}.join
=> "。有“这标并段点,号以可及””是“且符以一文"
>> a.split('').sort{rand(a.size) - 1}.join
=> "文。“符这标段”且号是并以可“”点有一及,以"
>> a.split('').sort{rand(a.size) - 1}.join
=> "。一“是且这标文“段”有并及,符以号点”以可"
>> a.split('').sort{rand(a.size) - 1}.join
=> "有”。是“这点,”且以以及段符“文并号标一可"

全部随机排序的方式下,
连标点符号也一起随机排序,
会造成标点符号不合逻辑的情况。
避免此情况,就是要把标点符号“定位”,
然后才把其他文字做随机排序。

所以不晓得要用怎样的方式,
可以把 “,。” 等标点符号记住该固定位置,
其他文字才做乱数排序填入标点符号之间?


by cor at 2010-02-26 02:24 AM

2010-02-25

New Relic 副总裁讲解 “应用性能指数”如何反映用户满意程度 ... no reply

http://blog.newrelic.com/2010/02/17/new-relic-ceo-lew-cirne-discusses-how-apdex-reveals-user-frustration-with-your-web-experience/

作为Apdex联盟之一,New Relic在丰富监控新兴各种服务器和架构的服务线同时,不遗余力地推广其客户满意程度的测量理念
http://www.rubyinside.com/new-relic-rpm-officially-supports-rack-and-sinatra-finally-3014.html

Apdex联盟,一个由众多网络分析技术公司和测量工业组成的联盟组织,它们联合起来开发了“应用性能指数”即“Apdex”(Application Performance Index),用一句话来概括,Apdex是用户对应用性能满意度的量化值。它提供了一个统一的测量和报告用户体验的方法,第一次把最终用户的体验和应用性能联系在了一起。


http://hi.baidu.com/gimn/blog/item/cfcead3e37b4563571cf6cfb.html



不能说New Relic太张狂,只能怨FiveRuns死的太快
http://chinaonrails.com/topic/view/282.html


by bd7lx at 2010-02-25 09:16 AM

文档式数据库的新选择——MongoDB ruby 支持 ... 4 replies

MongoDB (from "humongous") is a scalable, high-performance, open source, schema-free, document-oriented database. Written in C++, MongoDB features:

* Document-oriented storage (the simplicity and power of JSON-like data schemas)
* Dynamic queries
* Full index support, extending to inner-objects and embedded arrays
* Query profiling
* Fast, in-place updates
* Efficient storage of binary data large objects (e.g. photos and videos)
* Replication and fail-over support
* Auto-sharding for cloud-level scalability
* MapReduce for complex aggregation
* Commercial Support, Training, and Consulting

http://www.mongodb.org/display/DOCS/Home


by 邢星 at 2010-02-25 02:49 AM

iPad 托管主机服务?你舍得吗 ... no reply

http://www.ipadcolo.net/
ipadcolo.net 这家公司提供的服务是:
host iPads to be used as web servers, mail servers, or whatever else you'd like.

其实就是负责帮你每天充电

他们早在mac mini刚刚出来的时候就提供过hosting的服务
其承诺网络速度不会有问题,又有当地3G后备
但ipad不支持多任务,如何遥控其服务停下来并重新启动呢?

有招:他们有一指功


by bd7lx at 2010-02-25 01:06 AM

2010-02-24

读Sybase Advantage Database Server 文件的Ruby-ADT Gem ... no reply

http://chase.ratchetsoftware.com/2010/02/reading-advantage-database-server-files-adt-in-ruby/
Advantage Database Server 是一款功能全面的高性能客户端/服务器数据管理系统,专为满足商业应用程序开发人员的需求而设计。Advantage 在 Sybase 数据库产品中是独一无二的,原因在于它同时提供了对基于 ISAM(Indexed Sequential Access Method,索引顺序访问方法)表的数据和基于 SQL 的数据的访问,从而为旧数据库应用程序提供了一条迈向现代技术的发展之路。
优点

可通过本机关系 SQL 或直接的数据库导航命令进行灵活的数据访问。
数据访问经过优化,适用于所有开发环境,包括 Delphi、Visual Studio、Visual Objects、Visual Basic 等。
零管理,易于安装和控制 — 无需数据库管理员,从而消除了高昂的管理成本。
完整的参照完整性支持,包括主键/外键定义和级联的更新及删除。
基于服务器的完整的事务处理可避免数据库损坏,因此将大幅减少支持成本。
数据库安全性和加密支持。
一组源代码适用于本地、对等以及客户端/服务器环境 — 全面的可伸缩性。



http://github.com/chasemgray/Ruby-ADT
目前该ruby库只能读adt格式

require 'adt'

table = ADT::Table.new("test.adt")

table.each do |record|
puts record.name
puts record.email
end

有读foxpro的插件吗?
http://github.com/infused/dbf

DBF is a small fast Ruby library for reading dBase, xBase, Clipper and FoxPro database files


by bd7lx at 2010-02-24 09:11 AM

jruby能运行rails3吗?最新版本肯定行 ... no reply

http://blog.nicksieger.com/articles/2010/02/24/jruby-and-rails-3-sitting-in-a-tree



activerecord-jdbc-adapter 0.9.3 Released 支持rails3而来


by bd7lx at 2010-02-24 08:42 AM

大家有没有想创业的,谈谈想法 ... 4 replies

公司在技术上想基于rails
业务上想做一些在线的业务应用,目前瞄准小的物流企业的业务管理
有志同道和的,谈谈看法


by chengdh at 2010-02-24 08:19 AM

migrate 生成的表不能输入中文 ... 1 reply

rake db:migrate 生成的表为何只能输入英文不能输入中文?


by uuhui at 2010-02-24 07:50 AM

jQuery Simple Multi-Select 点点即多选 ... no reply

by bd7lx at 2010-02-24 02:55 AM

Apache Cassandra NoSQL Database

NoSQL Database越来越多了,也映射出了Web2.0在数据存储上的特点,数据量大,结构简单。之前有介绍过CouchDB, 这次是Cassandra, Cassandra已经成为Apache的顶级项目(貌似现在Apache下的项目越来越多了..),Cassandra不是简单的key/value存储,支持Hash的数据结构, 如:

 

Keyspace1.Standard1['jsmith']['first'] = 'John'

       \            \         \        \          \

        \            \         \_ key   \          \_ value

         \            \                  \_ column

          \_ keyspace  \_ column family

 

在存储数据形式方面更有利于把当前的关系数据库进行迁移.

 

架构上Cassandra支持分布式,容错,写同步等,官方说Rackspace, Digg, Facebook, Twitter, Cisco, Mahalo, Ooyala都在使用Cassandra

 

个人认为这种NoSQL数据库发展还是非常不错的.

 

链接

http://blog.evanweaver.com/articles/2009/07/06/up-and-running-with-cassandra/

 

by shitou at 2010-02-24 02:26 AM

2010-02-23

我的gem安装在哪里? ... 6 replies

今天重新手工编译安装了ruby1.9,rubygems
出现一个问题,不知道rubygems安装位置,无法启动它
1、编译ruby
# ./configure --prefix=/usr/local/ruby
# sudo make
# sudo make install
环境变量设置
PATH="/usr/local/ruby/bin" (增加了这个)
# sudo ruby /home/pt/setup.rb
也成功完成
后面来问题了
sudo gem update --system
unable to execute /usr/bin/gem: No such file or directory
我找了半天,搞不清gem安装在哪里?估计需要增加设置一个重要的环境变量,请问,如何解决这个问题呢?


by luofeiyu at 2010-02-23 02:27 PM

RubySlide.com ... 8 replies

上周做了一个网站,http://rubyslide.com,主要是受rubytu.be的启发,收集与ruby有关的slides和presentations,希望对大家有帮助


by flyerhzm at 2010-02-23 12:42 PM

rake和ant共建 ... no reply

沾上了想甩了就没那么容易,现实地折中是个不错的策略

http://www.engineyard.com/blog/2010/rake-and-ant-together-a-pick-it-n-stick-it-approach/

集成rake和ant 场景
JRuby’s Rake and Ant integration handles the following use cases:

Call any ant task or type from within Rake
Allow Rake to be invoked from within Ant
Allow Rake tasks to be imported as callable Ant targets
Allow Ant to be invoked from Rake
Allow Ant targets to be called as Rake tasks from within Rake


by bd7lx at 2010-02-23 05:46 AM

Rails 3 Upgrade Handbook 美刀12 ... no reply

http://www.railsupgradehandbook.com/

趁rails3刚出锅,赚快钱



还有新书
the Live Edition will include the Rails 3.x versions

http://broadcast.oreilly.com/2010/02/a-live-edition-for-learning-ra.html



作者在其博客omgbloglol 上传播rails3新知,声名鹊起


by bd7lx at 2010-02-23 04:37 AM

用RAILS3开发物流零担系统,招募合作者 ... 5 replies

用rails开发零担物流软件,打算在线运营,已做了部分原型,有兴趣的跟帖


by chengdh at 2010-02-23 03:45 AM

2010-02-22

在GoogleWave上交流Ruby和Rails技术,每周举行一次线上活动吧 ... 7 replies

BeijingonRails的活动,我参加过第一场,目前靠线下,我相信还是有不少人没法尽兴交流。这不,我发现Wave平台是个实时Chat的地方,噪音也小。我嘛,想尝试当个报幕员,用手上剩下的Wave Invite邀请,也方便给大家分享。我的Wave帐号xiaods@gmail.com,有wave帐号就加我。没wave帐号可以给我邮箱发送,我会把剩下的5个帐号用上,然后就是鸡生蛋,蛋生鸡的形成一个Wave。提一下,我不想搞成QQ群,所以只要有3个人以上,咱们可以约个星期三的下午,就Rails Web开发交流

向RobinLu,Joynet之类带动beijing线下活动致敬。

活动行动我会向台湾的Ruby Tuesday活动学习。Go


by xds2000 at 2010-02-22 05:53 AM

求上海环球培训的Ruby培训和Ruby on Raisl培训教材? ... 1 reply

有哪位大哥用完不用的可以卖给我嚒?


by michaelim at 2010-02-22 02:39 AM

2010-02-21

又一个Rails站点,亦庄分类信息网 ... 2 replies

http://www.yizinfo.com

原来这个网站才用php开源的mymps系统,

但是发现源代码上写着不允许修改,我晕,这叫什么开源。

只好拿rails重写,在开发网站期间经历了从丈夫到父亲的过程。

感谢我的家人和朋友对我的大力支持,我爱你们。

我爱我的家乡。


by 23c at 2010-02-21 07:41 AM

多个硬盘上ruby的执行问题 ... 1 reply

我的sda是当前磁盘,sdb挂载在sda的/mnt/usb下面,
sda安装了ruby1.9.1没有安装gem
sdb安装了ruby1.8,rubygem1.3.5
sdb的ruby命令安装在/usr/bin/ruby,我使用下面的命令无法执行ruby程序:(按照逻辑,应该正常执行的)

/mnt/usb/usr/bin/ruby /mnt/usb/home/pt/stocks.rb
报错:no such file to load--open-uri (LoadError)
我的命令,指定通过sdb上的ruby执行一个位于sdb上的程序,从错误故障看,ruby调用了sda上的东东(我的sda没有安装open-uri),这是不合逻辑的,设计有问题,还是我应该采取另一种方式下命令?
全部卸载sda\sdb,仅仅安装sdb(此时的sdb称为当前的sda),执行程序正常。
说明一个问题:ruby还是有小bug,该语言还需不断完善,细节上需要改进。


by luofeiyu at 2010-02-21 03:23 AM

2010-02-20

如何安装ruby最好? ... 3 replies

这几天,碰到问题,发现ruby1.9不支持fastercsv,于是重新卸载ruby\rubygems,手工安装ruby\rubygem
出了问题,我输入gem没有反应,必须输入gem1.8才有反应,于是又重新采用系统的apt安装,这下又出来新问题,不知问题以前可以运行的程序,现在又不能运行了,有个库出了问题,`require': no such file to load -- open-uri (LoadError)
气死我了。
我发现rubygem被ubuntu官方打包成1.8(或称为1.9),实际上rubygem的官方最高版本是1.3.5,有人也反应ubuntu官方打包版有小问题(本人使用ubuntu的实际经验也有体会,ubuntu官方安装包有时候比手工编译安装差,举个影响大的例子,我曾经用官方的virtualbox,虚拟xp的时候无法使用usb,网银受到影响,最后用virtualbox的闭源二进制版本手工编译安装,成功使用usb网银),请问,究竟如何安装ruby,在运行程序的时候碰到的问题最小?


by luofeiyu at 2010-02-20 01:20 PM

ruby对csv文件的操作 ... 1 reply

有这样的一个数据文件:
"1",17.01,18.61,1.69
"2",7.65,8.17,0.74
"3",12.88,13.98,1.15
"4",8.02,8.73,0.7
"5",12.1,12.9,0.91
我想将它读取出来,用一个数组来装,arry[0][0]为1,arry[0][1]为17.01,以此类推,好像ruby本身的方法不行,
我用arr=IO.readlines("/home/pt/data.csv","r")
发现arr这个数组按照字节的acsii码来理解数据的。
并且ruby将第一行理解成
"\"1\",\"600133\",17.01,18.61,1.69,25181943\n\n"
arr[0][0]居然是34,arr[0][0].chr才是\,arr[0][1].chr才是1。
这跟我的想象差太远了,请问,ruby有自身的方法做到我的想法吗?


by luofeiyu at 2010-02-20 07:29 AM

如何在写入文件数据时进行换行? ... 2 replies

下面的代码,将test.csv文件每行的前5个数据全部提取出来,存放在testback.csv,文件可以运行,但是testback.csv文件没有换行,没有读完5个数据后,重新开始一行,全部练成了一行,请问,如何解决这个问题?
io=open("/home/pt/test.csv","r")
ioback=open("/home/pt/testback.csv","w")
while line=io.gets
ioput=line[0,5]
ioback.write(ioput)
end


by luofeiyu at 2010-02-20 03:36 AM

Rails 3

Rails 3 beta 已经发布了, 变化非常大, 细节就不说了, 看这里这里, Rails每次的版本变化都是一件头疼的事,gems, plugins版本依赖是个大问题, 升级不是件容易的事情, 况且这次的改动非常大, Rails 3 使用Ruby 1.8.7或者1.9

 

------------------------

顺带贴下ruby 1.9的变化

 

by shitou at 2010-02-20 01:15 AM

2010-02-19

ruby对多维数组的操作? ... 1 reply

test.csv是一个csv文件,每行n个字段,一共m行
require 'csv'
infile = "/home/pt/test.csv"
data = CSV.read(infile)
这样做以后data成了一个多维数组,如何得到这个数组的维度参数,也就是n,m的具体数值。
如何获得m列的最大值?n行的最大值?
ruby有现成的方法吗?
我自己编程用多层循环也可以做到,但是有现成的方法更好。


by luofeiyu at 2010-02-19 02:27 PM

undefined method `require_gem' for main:Object ... no reply

在Ruby on Rails开发电子商务网站一书中的Emporium网络书店的案例中,启动服务器加载源代码时发生如题的提示,有谁知道是怎么回事吗?



D:\prog\src\Beginning_Ruby_on_Rails_E_Commerce_From_Novice_to_Professional-3200\
chapter13\chapter13>mongrel_rails start -p 3001
** Starting Mongrel listening at 0.0.0.0:3001
** Starting Rails with development environment...
D:/prog/src/Beginning_Ruby_on_Rails_E_Commerce_From_Novice_to_Professional-3200/
chapter13/chapter13/config/boot.rb:25:Warning: Gem::SourceIndex#search support f
or String patterns is deprecated, use #find_name
D:/prog/src/Beginning_Ruby_on_Rails_E_Commerce_From_Novice_to_Professional-3200/
chapter13/chapter13/config/boot.rb:28: undefined method `require_gem' for main:O
bject (NoMethodError)
from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from D:/prog/src/Beginning_Ruby_on_Rails_E_Commerce_From_Novice_to_Profe
ssional-3200/chapter13/chapter13/config/environment.rb:11
from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/
../lib/mongrel/rails.rb:147:in `rails'
from C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/
mongrel_rails:113:in `cloaker_'
from C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/
../lib/mongrel/configurator.rb:149:in `call'
... 6 levels...
from C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/
../lib/mongrel/command.rb:212:in `run'
from C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/
mongrel_rails:281
from C:/Ruby186/bin/mongrel_rails:19:in `load'
from C:/Ruby186/bin/mongrel_rails:19


by kezhon at 2010-02-19 06:45 AM

2010-02-18

fastcsv不能使用? ... 6 replies

require 'fastercsv'
infile = "/home/pt/sqlite/test.csv"
data = fastercsv.open(infile,'r')
p data[1][2]
上面的代码运行显示:
no such file to load -- fastercsv (LoadError)
我明明使用sudo gem install fastcsv,安装过了,在终端中使用 locate fastcsv也可以看到输出,
/var/lib/gems/1.9.1/gems/fastercsv-1.5.1/test/tc_csv_writing.rb
/var/lib/gems/1.9.1/gems/fastercsv-1.5.1/test/tc_data_converters.rb
/var/lib/gems/1.9.1/gems/fastercsv-1.5.1/test/tc_encodings.rb
/var/lib/gems/1.9.1/gems/fastercsv-1.5.1/test/tc_features.rb
/var/lib/gems/1.9.1/gems/fastercsv-1.5.1/test/tc_headers.rb
/var/lib/gems/1.9.1/gems/fastercsv-1.5.1/test/tc_interface.rb
/var/lib/gems/1.9.1/gems/fastercsv-1.5.1/test/tc_row.rb
为何不能运行呢,找了半天,也没有发现原因,请指教。


by luofeiyu at 2010-02-18 03:46 AM

2010-02-17

gsub如何完成这个操作? ... 3 replies

如何用gsub将 "\"Allpages\"" 变换成 "Allpages" ?


by luofeiyu at 2010-02-17 12:37 PM

阶乘有不止一种写法,利用ruby的特性,奥妙各不相同 ... no reply

http://gist.github.com/295352

有多少种写法,还能怎么写

def factorial(x)
if x == 0
return 1
else
return x * factorial(x - 1)
end
end
puts factorial(6)
puts factorial(0)

# Discovered #upto
def factorial(x)
factorial = 1
1.upto(x) do |i|
factorial *= i
end
factorial
end
puts factorial(6)
puts factorial(0)

# Discovered Enumerators
def factorial(x)
x.downto(1).inject(1) { |m, i| m * i }
end
puts factorial(6)
puts factorial(0)

# Discovered Range+Inject
def factorial(x)
(1..x).inject(1) { |m, i| m * i }
end
puts factorial(6)
puts factorial(0)

# Embraced 1.8.7/1.9
def factorial(x)
(1..x).inject(:*) || 1
end
puts factorial(6)
puts factorial(0)

# Discovered Ternary Operators
def fac(x); x == 0 ? 1 : x * fac(x - 1);end
puts fac(6)
puts fac(0)

# Discovered Operator Precedence
def factorial(x)
i = 1 and (i *= x and x -= 1 while x > 0) or i
end
puts factorial(6)
puts factorial(0)

# Discovered Rails
class Numeric
def fact
(1..self).inject(:*) || 1
end
end
puts 6.fact
puts 0.fact

# Discovered Camping
def F(x)((1..x).inject(:*)||1)end;p(F(6));p(F(0))

# Discovered Magic
module Math
extend self

def method_missing(method, *args)
if method.to_s =~ /^fact(orial)?/
class_eval <<-EOS
def #{method}(x)
(1..x).inject(:*) || 1
end
EOS
send(method, *args)
else
super
end

end
end
puts Math.fact(6)
puts Math.fact(0)

# Discovered Hash Magic
FACTORIALS = Hash.new { |h, k| h[k] = (1..k).inject(:*) || 1 }
puts FACTORIALS[6]
puts FACTORIALS[0]

# Attends Seattle.rb
require 'rubygems'
require 'inline'
class Factorial
class << self
inline do |builder|
builder.c %q{
long factorial(int value) {
long result = 1, i = 1;
for (i = 1; i <= value; i++) {
result *= i;
}
return result;
}
}
end
end
end
puts Factorial.factorial(6)
puts Factorial.factorial(0)

# Premature Optimizer + eval
class << self; class_eval "def factorial(x); case x; #{(0..100).map{|i|"when #{i} then #{(1..i).inject(:*) || 1};"}}; else (1..x).inject(:*) || 1 end end" end
puts factorial(6)
puts factorial(0)


by bd7lx at 2010-02-17 08:07 AM

菜鸟问题:mysql导入csv数据 ... 4 replies

以前用过access,它有一个简洁的数据导入方式,导入前,无须建立相应的数据表,access导入时可以将csv文件第一行的字符串作为表的字段。
我刚刚开始学习mysql,没有发现mysql有这样的功能,导入前需要准备一个表,设计好字段。(如果我的理解不对请指出)
现在,我想用ruby写一小段代码自动完成这个功能,发现,还有一定的难度。
1、用ruby读出文件第一行,并做解析,每个字符串赋值给一个数组元素。这个没有问题,我做到了
2、用sql建立表的字段,这个有点不好搞,无论人工很是自动
1)如果是人工,我可以看看csv文件,知道字段的类型,但是如果csv文件超级大,怎么办?INTEGER设置多长?字符类型设置多长?
如果不管不顾,设置长一点,太浪费空间了。
2)如果电脑自动识别,太费劲了,ruby如何判断数据的类型?
我在网上用英文检索了一下,create table from csv ,extract field names from first line,发现似乎php\perl写脚本可以做到?没有学过这两个,看不懂,好像程序都很短就实现了,微软的access都做到了,我想应该是可行的。
请问,ruby可以做到吗?如何做到呢?


by luofeiyu at 2010-02-17 05:59 AM

ruby调用shell ... 2 replies

查到资料,ruby使用system或者exec方法可以调用shell。
下面的两段小程序,都可以执行
ruby1
#!/usr/local/bin/ruby
p open("/home/pt/sqlite/test.csv").readlines[0]
exec 'head /home/pt/sqlite/test.csv'
ruby2
#!/usr/local/bin/ruby
p open("/home/pt/sqlite/test.csv").readlines[0]
system 'head /home/pt/sqlite/test.csv'
但是ruby3
#!/usr/local/bin/ruby
p open("/home/pt/sqlite/test.csv").readlines[0]
exec 'head /home/pt/sqlite/test.csv'
system 'head /home/pt/sqlite/test.csv'
执行结果发现,system、exec方法只有一个执行,好像只有system执行了,不知道为什么?


by luofeiyu at 2010-02-17 05:15 AM

1.8.7的枚举技巧 待一小会儿take_while 和 drop_while过了一小会儿 ... no reply

by bd7lx at 2010-02-17 03:55 AM

ruby读取指定的行 ... 1 reply

我的文件/home/pt/sqlite/test.csv
io=open("/home/pt/sqlite/test.csv")
p io.readline
运行后,读出了第一行的数据,如果想让它读出第10行,如何表达?


by luofeiyu at 2010-02-17 03:26 AM

超级模特supermodel:与AR相配的内存数据库 ... no reply

http://github.com/maccman/supermodel

如果你还记得曾经提到过的桌面开发-绳结Bowline

http://chinaonrails.com/topic/view/3209.html

Simple in-memory database using ActiveModel.

Primarily developed for Bowline applications.
http://github.com/maccman/bowline



当内存数据库来用的ruby库,sequel可能会有点心不甘

http://chinaonrails.com/topic/view/1691.html


by bd7lx at 2010-02-17 02:27 AM

2010-02-16

海港harbor: 新框架招商 ... no reply

http://wiecklabs.com/

git clone git://github.com/wiecklabs/harbor
git checkout -b 0.18.4 0.18.4
rake install

Harbor 是Ruby 做的新框架来拯救开发人员的负担

海港里面有港口

利用港口 ports 现成的应用,重组配置集成多个应用,就获得成为自己的码头

现在已经有开发出来的港口有

http://wiecklabs.com/marketplace


by bd7lx at 2010-02-16 02:17 AM

2010-02-15

目录类的理解 ... 3 replies

这段代码可以输入目录下面的目录和文件
dir=Dir.open("/home/pt/Downloads")
while name =dir.read
p name
end
dir.close
为何我直接要求输出p dir.read就不行?
1 dir=Dir.open("/home/pt/Downloads")
2 p dir.read
3 dir.close
第一句建立了一个新的目录类,
第二句 让它全部输出呀
运行后的结果,只有一个 "." ?
感觉ruby的类太难理解了。


by luofeiyu at 2010-02-15 02:30 AM

2010-02-13

如何下载指定链接? ... 4 replies

require 'open-uri'
page = open('http://quotes.money.163.com/corp/1034/code=601398.html')
data = page.read
f=File.new("/home/test.html", "w")
f<<data
上面可以抓网页,请问,如何下载指定链接?
http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/02006405004AD57603421101C258298CF7C098-611C-0EDE-B315-41DE752D0686?K=7097659a3c9cd45214101794


by luofeiyu at 2010-02-13 03:15 AM

2010-02-12

如何提取网页中的表格 ... 2 replies

有一个html文件,如下格式,
<TABLE border=1 cellPadding=0 >
<TBODY>
<TR height=20>
<TD align=middle>2005-2-8</TD>

</TR>
.
.
.
.
<TR height=20>
<TD align=middle>2005-2-14</TD>
</TBODY></TABLE>
我们可以看到它是很有规则的,用浏览器可以看到一个表格,请问如何用ruby将它提取出来,形成一个csv文件?
请给点思路?


by luofeiyu at 2010-02-12 02:19 AM

Buzzr: 让谷歌嗡嗡叫 ... no reply

Buzzr: Google Buzz Library For Ruby

http://github.com/conorh/buzzr

A simple wrapper to help retrieve and parse the Google Buzz Atom Feed.

安装
gem install buzzr

Buzzr is hosted on the Gemcutter repository. 依赖 RAtom library - http://github.com/seangeo/ratom

Google Buzz发布会上着重介绍的功能之一就是所谓的“自动跟随”系统,Buzz会自动将你经常写信或聊天的人加入好友列表里,这对一些人来说可能会是不合的导火索。



http://chinaonrails.com/topic/view/3012.html

也可以一键关停,不让它吱啦哇嘞叫


by bd7lx at 2010-02-12 12:28 AM

2010-02-11

如何抓取网页? ... 6 replies

请问,如何用ruby抓取网页,比如将http://chinaonrails.com/首页,或者新浪首页显示的文字,抓下来,存放到一个文件中?


by luofeiyu at 2010-02-11 04:26 AM

------