Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
吕小荣
@xiaoronglv
管理员
第 1638 位会员 / 2012-03-29

workstream.us
上海
198 篇帖子 / 1617 条回帖
236 关注者
0 正在关注
17 收藏
社区清洁工
GitHub Public Repos
  • xiaoronglv.github.io 4

    Ryan's Blog

  • golang-ent-playground-... 0

    https://entgo.io/docs/getting-started

  • surge-rules 0

  • docs.nestjs.com 0

    The official documentation https://docs.nestjs.com 📕

  • clash-rules 0

  • chinese-independent-blogs 0

    中文独立博客列表

  • express_projects_with_... 0

    Good open source projects powered by express.js

  • xiaoronglv 0

  • CKA-Exercises 0

    Practice for the Certified Kubernetes Administrator (CKA) Exam

  • CKAD-exercises 0

    A set of exercises to prepare for Certified Kubernetes Application Developer exam by Cloud Native...

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 「已经解决」怎么撤销 git checkout -f origin/master at 2013年12月06日

    貌似,没办法。。。

  • 有喝咖啡的不??都喝啥? at 2013年12月06日

    休息不好的时候,少喝咖啡。

    容易早博,敏感的人会觉得心慌。

  • 我如何把薪水从 50 人民币 / 天 提升到 100 美元 / 小时的 (4) -- 已更新 at 2013年12月03日

    期待下一篇。。。

  • 有没有人用跑步机的? at 2013年12月02日

    #14 楼 @mojidong

    晚上回家都七点半了,吃完饭八点钟。没办饭更早。。。

  • 有没有人用跑步机的? at 2013年12月02日

    #15 楼 @HungYuHei

    哈哈,作为一个庸医,我可以非常负责任的告诉你,短暂的无氧训练(举重、哑铃、)消耗的是肝糖原。不会消耗脂肪。

    要想减肥,超过 30 分钟的有氧训练才是王道。

  • Rails 中 Symbol 的用法? at 2013年11月28日

    那么 Symbol 对我们有什么用呢?当然也是内存。使用 String 的开销太大了,因为每一个 String 都是一个对象。想想前边的例子,一个字符串每出现一次 Ruby 就会创建一个 String 对象。

    1. 作为哈希表的 key

    哈希表是 Symbol 应用最为广泛的地方。 在 ruby 中,哈希和数组类似,一个哈希表是一系列 key/value 对的集合,只不过它的 key 取值范围更广泛,可以是任何对象,比如正则表达式。但通常我们都会取有意义的 key,比如 String、Symbol。 下面这个哈希表表示按城市分类的一些机器的集合。

    hosts{       
    'beijing' => 'machine1',      
     'shanghai'  => 'machine2',      
     'guangzhou' => 'machine3',       
    'tianjin' =>  'machine4',       
    'shenzhen' => 'machine5'}
    

    2. 哈希参数

    通常我们定义的函数的参数的个数和顺序是写死的,调用函数的时候要确保参数的个数、顺序匹配,有时候这样很不方便,使用哈希参数可以解决这个问题。 ROR 中就大量地运用这种方式,也许你已经看到了,到处都是 Symbol 和哈希。比如:

    link_to 'Show', :action => 'show', :id => productadd_column :products, :price, :decimal, :precision => 8, :scale => 2, :default => 0
    
    

    虽然这段资料是我抄袭的。但是看到排版这么辛苦的份上,给我个赞吧。

  • 看到彩程设计的 Tower 正式上线了。 at 2013年11月28日

    什么时候支持英文?

  • Slim 难用死了。。。。 at 2013年11月27日

    我是来看热闹的

  • [上海] Teahour 第一次线下活动 --2013年11月27日(今天) at 2013年11月27日

    玎玎也在上海吗?

  • RubyChina 有没有计划做关注某人的功能 at 2013年11月26日

    timeline 是最不能沉淀价值的产品形态。

  • 写出好的 commit message at 2013年11月26日

    我看到一种不错的 git message 格式:50/72 Formatting

    觉得不错,拿来分享。

    Provide a brief description of the change in the first line.

    • Insert a single blank line after the first line.
    • Provide a detailed description of the change in the following lines, breaking paragraphs where needed.
    • The first line should be limited to 50 characters and should not end with a period.
    • Subsequent lines should be wrapped at 72 characters.
    • Put the 'Change-id', 'Closes-Bug #NNNNN' and 'blueprint NNNNNNNNNNN' lines at the very end.

    For example

    Switch libvirt get_cpu_info method over to use config APIs    
    
    The get_cpu_info method in the libvirt driver currently uses    XPath queries to extract information from the capabilities    XML document. Switch this over to use the new config class    LibvirtConfigCaps. Also provide a test case to validate    the data being returned.    
    
    Closes-Bug: #1003373    
    Implements: blueprint libvirt-xml-cpu-model    
    Change-Id: I4946a16d27f712ae2adf8441ce78e6c0bb0bb657
    
    

    read more

    https://wiki.openstack.org/wiki/GitCommitMessages

  • Google 企业套件不免费了 大家改用那家的免费企业邮件了? at 2013年11月24日

    作为一个员工,习惯了 Gmail 的标签以及各种快捷键后,我已经适应不了 QQ 企业邮箱了。

  • 你为什么辞职?来自百度、阿里、豆瓣的回答。 at 2013年11月23日

    我都看了一下,貌似「迅雷」是要死的节奏。

    迅雷这个公司的管理层好 sb。

  • [上海][2013年11月23日] Ruby Tuesday 活动召集 (周六) (注意: 已更新活动时间) at 2013年11月23日

    出发

  • 你不需要这些 Gems at 2013年11月23日

    #50 楼 @Rei

    minitest 没有 context,这是超级不爽的地方。

  • 写出好的 commit message at 2013年11月22日

    这篇文章真好。多谢

  • 你不需要这些 Gems at 2013年11月22日

    我这么喜欢 simple form,你们为啥黑他。

  • # 初学 Rails# 一点 routes at 2013年11月22日

    #1 楼 @lissdy

    少用 match,它不够优雅。

  • 如果各位的工资每年贬值 9~11.9%,大伙会有什么对策呢? at 2013年11月22日

    我的对策:提高实力,赚更多的 money

  • 最糟的 Greeting 信 at 2013年11月22日

    这一条最重要:

    1. 用個人名義發出。
  • 如何预览 PDF at 2013年11月22日

    同学们都叫我雷锋

    http://goo.gl/zZ8JKH

  • 活着的意义 at 2013年11月21日

    虽然是个没有答案的问题,但思考这个问题的人至少不是行尸走肉。

  • [上海] Teahour 第一次线下活动 --2013年11月27日(今天) at 2013年11月19日

    果断参加

  • [上海] 容易网诚聘 Ruby 高级工程师 (附白富美老板靓照) at 2013年11月19日

    我是来看白富美的

  • 写了一个 Chrome 密码生成扩展,求围观 at 2013年11月19日

    有个工具叫 alfred,配合 flow,这些都是小 case

  • 济南的有招人的么~ at 2013年11月19日

    老乡,你好

  • 我如何把薪水从 50 人民币 / 天 提升到 100 美元 / 小时的 (4) -- 已更新 at 2013年11月18日

    等下一章节

  • 好朋友分手了…因为代码风格不同… at 2013年11月18日

    型号不匹配引起的悲剧。

  • [上海][2013年11月23日] Ruby Tuesday 活动召集 (周六) (注意: 已更新活动时间) at 2013年11月17日

    #38 楼 @kgen

    学习你们是如何翻墙的。 ^_^

  • 简单 BIZ 产品开发过程 (创业) 干货总结 at 2013年11月15日

    楼主的执行力,牛。

  • 上一页
  • 1
  • 2
  • …
  • 29
  • 30
  • 31
  • 32
  • 33
  • …
  • 47
  • 48
  • 下一页
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English