Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Howl王
@mimosa
高级会员
第 5 位会员 / 2011-10-28

Autodesk
上海
39 篇帖子 / 570 条回帖
46 关注者
19 正在关注
42 收藏
┬─┬ノ❨°_°ノ❩ ..persecution mania
GitHub Public Repos
  • ansj_seg 6

  • docker-tengine 3

  • grape-erb 2

    Use erb in grape

  • shrine-tus-demo 1

    Demo integrating tus with Shrine

  • ChatGPT-Next-Web 1

    A well-designed cross-platform ChatGPT UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT 应用。

  • rest_cli 1

  • codeowners-checker 0

    Check .github/CODEOWNERS consistency

  • gatsby-starter-portfol... 0

    Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Especially des...

  • logstop 0

    Keep personally identifiable information (PII) out of your logs

  • readme-code-testing 0

    Helping test "any" code in readme with GitHub Action. All you need is unit testing synchronized e...

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 2016年5月21日 SH ❤ Ruby 聚会 (薄荷主办) at 2016年05月15日

    @awking 斗鱼直播要吗?

  • [上海][2016年5月10日] Ruby 聚会召集 at 2016年05月10日

    #12 楼 @xiaoronglv

    1. 怎么用?
      • 太好用了。
    2. 和 Google Analytic 啥区别?
      • 没法比,和 mixpanel 同一级别。
    3. 比传统工具先进在哪里?
      • 不用埋点。

    纯粹灌水,尽量无视 🔞

  • [上海][2016年5月10日] Ruby 聚会召集 at 2016年05月09日

    👍

  • 各位能否把 JavaScript 这个板块搞活跃起来? at 2016年05月05日

    随意冒个泡~~ 👍

    # components
    //= require jquery/dist/jquery
    //= require jquery.lazyload/jquery.lazyload
    //= require jquery.turbolinks/src/jquery.turbolinks
    //= require jquery-ujs/src/rails.js
    //= require lodash/lodash
    //= require moment/moment
    //= require moment/locale/zh-cn
    //= require handlebars/handlebars
    //= require jquery.remotipart
    //= require nprogress/nprogress
    //= require turbolinks
    //= require bootstrap-sass/assets/javascripts/bootstrap-sprockets
    
  • [西安] Ruby/Rails 线下聚会 at 2016年04月15日

    :plus1:

  • ActiveRecord 用 bulk_insert 来批量插入数据,提高效率 at 2016年04月07日

    :plus1:

  • 一行命令让 ElasticSearch 支持中文分词搜索 at 2016年03月25日

    @bosonnlp 后台如何自定义词组?

  • DHH 亲自给你演示, 如何用 Action Cable 做一个实时的聊天 app at 2015年12月24日

  • 大家都怎么用 Ruby on Rails 写数据的查询功能 at 2015年12月17日

    #2 楼 @karrra searchkick

  • Rails 中读取 CSV 时遇到的问题 at 2015年12月17日

    不知道具体情况,是编码错误。

    # GB18030 -> UTF-8
    rows = CSV.read('data.csv', 'rb:GB18030:UTF-8', headers: true, header_converters: :symbol, col_sep: ',' )
    
  • Nginx + Passenger 部署 Rails 应用时使用 request_store 遇到的坑,求高手指导 at 2015年12月03日

    命名空间问题吧👙

  • 客户端设备与本地开发环境调试? at 2015年11月06日

    localtunnel or ngrok

  • 求一个算法 at 2015年10月09日

    Rankings: You’re Doing It Wrong! https://github.com/joaomdmoura/gioco

  • [2015年9月28日] 下午三点左右,Ruby China 经受了一轮 DDOS 攻击 at 2015年09月28日

    👍

  • Rails Assets 网站似乎挂了? at 2015年09月21日

    换 bower-rails 吧👍

  • 讨论下有没有可能用 Rails 的方式开发 iOS 应用 ? at 2015年09月12日

    https://cocoapods.org

  • [上海][2015年9月8日] Ruby 聚会召集 at 2015年09月08日

    今天的 topic 定下来没?

  • Ruby 2.2.2 的关于 min 的一个 bug at 2015年08月31日
    [20, 32, 32, 21, 30, 25, 29, 13, 14].sort[0..1]
    # => [13, 24]
    
  • 怎样只用 friendly_id,禁用主键 id at 2015年08月24日
    create_table :users, id: false do |t|
    .....
    
    class User < ActiveRecord::Base
      self.primary_key = :username
    .....
    
  • [已解决] 部署服务器后报 ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8) at 2015年08月20日
    # 解决 ArgumentError::InvalidByteSequence 错误
    gem 'rack-utf8_sanitizer'
    
  • 折腾了两天,终于用 Elasticsearch + elasticsearch-rails 实现了搜索功能 at 2015年08月17日

    可以和 @menghuanwd 交流下。

  • [上海][私教来了-原阿里高管创立 O2O 企业] 招聘 Ruby 开发工程师 1 名 at 2015年08月10日

    @xuxm687 “剑僧”在 406 室 :plus1:

  • 提高 Ruby 程序员效率的 rc 文件 at 2015年08月06日

  • Rails ActiveRecord 如何获取 Mysql column comment? at 2015年07月17日

    以 MySQL 为例:

    module Utils
      module MySQL
        # 字段的备注字典
        def column_comments
          result = show_columns(self.column_names)
          result.inject({}){|h, arr| h.merge(arr[0] => arr[8]) }.symbolize_keys
        end
        # 指定字段名的备注
        def comment_of(field)
          field = field.to_s
          return "" unless self.column_names.include?(field)
    
          result = show_columns(field)
          result[0][8]
        end
    
        private
    
          def show_columns(field)
            condition_sql = if field.is_a?(Array)
              "IN ('" + field.join("', '") + "')"
            else
              "= '#{field}'"
            end
    
            sql = "SHOW FULL COLUMNS FROM `#{self.table_name}` WHERE FIELD " << condition_sql
            # 自行根据需求,进行修改
            result = Rails.cache.fetch(sql) do
              self.connection.execute(sql).to_a
            end
          end
      end
    end
    
    unless ActiveRecord::Base.respond_to?(:column_comments)
      ActiveRecord::Base.send :extend, Utils::MySQL
      puts '_' * 88 + 'Utils::MySQL'
    end
    

    调用:

    User.column_comments
    
    #> 
    {
     :id => '',
     :username => '用户名'
    }
    
    User.comment_of(:username)
    #>  '用户名'
    
  • [上海][2015年7月14日] Ruby 聚会召集 at 2015年07月15日

    #23 楼 @ibachue 求放方案分享 👏

  • rails 开发中必备的 gem 推荐 at 2015年07月09日

    #1 楼 @chairy11 三贱客 😄

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