Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
hellorails
@hellorails
Member
NO. 36058 / 2018-09-20

1 Topics / 114 Replies
3 Followers
0 Following
0 Favorites
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • Ruby 不用花括号表达代码块,是一个设计缺陷吗 at October 17, 2018
    3.times { |i|
      puts i
    }
    
    3.times do |i| puts i; end
    

    都可以,只是习惯或约定不这样写而已

  • Matz:Ruby after 25 years (Matz 将在 10月13日 在 Ruby Summit China 2018 会场和大家分享 25年 后的 Ruby) at October 16, 2018

    看到要用手机号注册我就放弃了,很反感这种非得注册才能看,就个视频而已

  • Matz:Ruby after 25 years (Matz 将在 10月13日 在 Ruby Summit China 2018 会场和大家分享 25年 后的 Ruby) at October 15, 2018

    看个视频还要注册,被套手机号。。

  • Matz:Ruby after 25 years (Matz 将在 10月13日 在 Ruby Summit China 2018 会场和大家分享 25年 后的 Ruby) at October 14, 2018

    很遗憾没有去参加。 大会所有的幻灯片现在可以给出了么?另外演讲视频大概什么时候出哇?

  • 编程小书大本营 at October 13, 2018

    nice

  • 如何按照创建时间降序排列 再按照 system_id 去重?? at September 28, 2018

    https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by

    你的是 MariaDB,可能会有些区别(https://mariadb.com/kb/en/library/sql-mode/)

    MariaDB ONLY_FULL_GROUP_BY: For SELECT ... GROUP BY queries, disallow SELECTing columns which are not referred to in the GROUP BY clause, unless they are passed to an aggregate function like COUNT() or MAX(). Produce a 1055 error.

    我是分别在 MySQL 5.5.54 和 5.7.23 下测试的

  • 如何按照创建时间降序排列 再按照 system_id 去重?? at September 28, 2018

    还是只适用于老版本,MySQL 的不严谨坑了好多人。。。

  • 如何按照创建时间降序排列 再按照 system_id 去重?? at September 28, 2018

    如果不在 group by 里,就必须在聚合函数里。你的 MySQL 是哪个版本?老版本可能不一样

    https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html

  • 如何按照创建时间降序排列 再按照 system_id 去重?? at September 28, 2018
    SELECT system_id,created_at 
    FROM (
        SELECT system_id,created_at
        FROM false_feed_backs
        ORDER BY created_at DESC
    ) t
    GROUP BY system_id
    

    你这个子查询看上去没有意义啊,另外写了 GROUP BY system_id 但是 created_at 不用聚合函数,逻辑上看还是不对。。

    使用 group by 的时候,select 出来的多个列,要么在 group by 列表中,要么使用聚合函数

  • 富文本编辑器 Trix at September 28, 2018

    一个回车用 br,两个回车应该用 p

  • 如何按照创建时间降序排列 再按照 system_id 去重?? at September 28, 2018
    FalseFeedback.order("created_at desc").group("system_id")
    

    你这样生成的 SQL 在逻辑上是错误的,需要补一下 SQL 知识再使用 Active Record

  • [杭州] 杭州当客招聘 Ruby 工程师一名 (10~18K) at September 26, 2018

    我问的是 RSD

  • [杭州] 杭州当客招聘 Ruby 工程师一名 (10~18K) at September 26, 2018

    4、熟悉阿里云服务:ECS、CDN、SLB、RSD 等;

    RSD 是什么?

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