Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
ForzaMilan
@diudiutang
高级会员
第 292 位会员 / 2011-11-27

[email protected]
北京
15 篇帖子 / 563 条回帖
15 关注者
14 正在关注
124 收藏
a part of life
GitHub Public Repos
  • config 0

    my personal .dotfile.

  • apt-cyg 0

    Apt-cyg, an apt-get like tool for Cygwin

  • geocoder 0

    Complete Ruby geocoding solution.

  • try_git 0

  • dotfiles 0

    config files for zsh, bash, completions, gem, git, irb, rails

  • ruby-china 0

    ruby-china.org website source code.

  • rails-style-guide 0

    A community-driven Rails 3 style guide

  • rails_completion 0

    Bash completion support for Ruby on Rails.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 实验数据处理问题 at 2013年01月08日

    非 ruby 版本,文本处理还是管道方便快捷

    awk '{if($0%100 == 0) print;}' data.txt > result.txt
    
  • 关于随机转到一个帖子的实现 at 2013年01月08日

    刚才在一张 200w 的表上测了下

    item = Item.find(Item.pluck(:id).sample)
    

    其实只是去查询主键 id 而已,1 秒很快的

    (1131.2ms)  SELECT id FROM `users`
    User Load (0.7ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1764711 LIMIT 1
    
  • 今日惊喜 Ruby 2.0 RC1,Github 新的 Profile 页面 at 2013年01月08日

    github profile 又改版了。。

  • iPhone 5 怎么样? at 2013年01月08日

    很轻很薄,很容易掉漆

  • 关于随机转到一个帖子的实现 at 2013年01月07日
    item = Item.find(Item.pluck(:id).sample)
    

    以 id 查询应该不会太慢吧

  • 建议大家不要在社区谈 VP*N at 2013年01月07日

    出席本次会议的有 敏感词 敏感词 敏感词。。

  • [内蒙] 年关近了,招聘 ruby on rails 工程师 at 2013年01月06日

    不容易啊,半年过去了还没招到。

  • production 环境下怎么输出? at 2013年01月06日

    取消 config/environments/production.rb 第 35 行注释,然后重启项目

    config.log_level = :debug
    
  • 都来聊聊人生污点吧 at 2013年01月06日

    #16 楼 @ywencn 这是你的闪光点啊 👬

  • 果然是悲剧了 at 2013年01月05日

    #3 楼 @redvoilin http://ruby-china.org/topics/7748

  • 2012年12月21日以后的数据丢失了 at 2013年01月05日

    #10 楼 @iamzhangdabei 测试君连载了十几篇就这么悲剧啦

  • 2012年12月21日以后的数据丢失了 at 2013年01月05日

    那会看到你说用 beta.ruby-china.org, 数据库是正式环境数据库的时候就隐隐感到一丝不安。。

  • 我的屋子里有一只蝙蝠,不知道它冬天吃什么,会不会被饿死。 at 2012年12月17日

    #45 楼 @KoALa 人妖殊途啊

  • Rails 中使用 ETag 加速页面载入 at 2012年12月17日
    brew install figlet
    

    类似效果,但不是斜体

     ____        _              ____ _     _             
    |  _ \ _   _| |__  _   _   / ___| |__ (_)_ __   __ _ 
    | |_) | | | | '_ \| | | | | |   | '_ \| | '_ \ / _` |
    |  _ <| |_| | |_) | |_| | | |___| | | | | | | | (_| |
    |_| \_\\__,_|_.__/ \__, |  \____|_| |_|_|_| |_|\__,_|
                       |___/                            
    
  • 貌似 Github 的 Gist 的页面出新版本了? at 2012年12月12日

    个人 gist 页样式不错

  • 關於 joins (已解決) at 2012年12月12日

    默认的 joins 是 inner join, 只会查出 products 关联的 product_types 表中 product_id 存在的数据,直接用 all 就是查处 products 表中所有数据

    去数据库中写几条 sql 语句就明白了

    select count(*) from products p inner join product_types py on py.product_id = p.id;
    
    select count(*) from products p left join product_types py on py.product_id = p.id;
    
    select count(*) from products;
    
  • 我们的本地 CI 服务器到了…… :P at 2012年12月11日

    那请问碉堡如斯的东西什么地方有售呢

  • 36 氪网站底部惊现 Ruby China at 2012年12月08日

    #1 楼 @SErHo 从 isitrails 检测说不是 Rails 开发的

  • 36 氪网站底部惊现 Ruby China at 2012年12月08日

    这你都发现了。。话说那个位置应该是赞助商/选择的技术

  • 已完美实现 mac 下玩《魔兽世界》5.1 at 2012年12月06日

    #12 楼 @chenfengi http://nga.178.com/read.php?tid=5770878 下 5 个文件,替换掉就 OK 了

  • 已完美实现 mac 下玩《魔兽世界》5.1 at 2012年12月05日

    #7 楼 @xiaogui Mac 下客户端还是比较好整的。休闲玩家 2 区 安其拉

  • 应届毕业生没有三方协议会怎么样? at 2012年11月23日

    对你和学校都没有任何影响,企业不会想看,学校少一张纸对统计也影响不大。 那张纸只是学校拿来糊弄高中毕业生家长的,告诉家长我们学校出来的学生就业率多高多高

  • 帖子阅读页面的回复加入分页功能 at 2012年11月21日

    分页有种 v2ex 的感觉

  • Access denied for user 'root'@'localhost' (using password: YES) at 2012年11月20日
    mysql -u root -p
    

    输入这个进入不了说明密码已经改动了,这个问题刚开始学 Rails 的时候也遇到过,不过好像就遇到过一次,重置下密码就可以了

    ps -ef | grep -v grep | grep  mysql | awk '{print $2}' | xargs kill -9
    mysqld_safe --skip-grant-tables &
    mysql -uroot -p
    update user set password=password('123456') where user = 'root';
    

    写 database.yaml 的时候最好把三个环境的密码都添上

  • Access denied for user 'root'@'localhost' (using password: YES) at 2012年11月20日

    database.yml 中 mysql2 密码貌似要用"******"

  • 可以吐槽一下拍照的事情么。。。。 at 2012年11月20日

    求蜗牛果照!

  • RubyConfChina 现场花絮 at 2012年11月18日

    #12 楼 @chechaoyang 哈哈。你第一张笑的太逗了

  • rails_admin 后台导出 at 2012年11月08日

    有一个 gem:to_xls

    在 config/initializers/mime_types.rb 中添加对 xls 格式的支持

    Mime::Type.register "application/vnd.ms-excel", :xls

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