Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
XguoX
@xguox
高级会员
第 333 位会员 / 2011-11-30

广州
12 篇帖子 / 103 条回帖
12 关注者
0 正在关注
3 收藏
GitHub Public Repos
  • Lightroom-Presets 50

    A Fine Collection of Lightroom Presets

  • fks 3

    前端技能汇总 Frontend Knowledge Structure

  • kiba-plus 1

    Kiba enhancement for Ruby ETL.

  • xgo 1

  • coconut 0

    Go Shopping

  • grpc_example 0

  • protobuf_example 0

  • campop 0

    a simple cli tool for displaying photographic equipment.

  • xguox.github.io 0

  • NPWG_zh 0

    Network programming with Go 中文翻译版本

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • [郑州][10.13-14] Ruby Summit China 2018 报名 [早鸟票继续开放,更有晚宴开放],《日程更新》13日 晚所有参会人员送 3 个月的 RubyMine 试用 license at 2018年08月23日

    😏 要不跟去年那样走起 🚄

  • Ruby Kaigi 2017 没人关注么... at 2017年09月20日

    刚好看到一篇关于 PyCall 的文章 Using the scikit-learn machine learning library in Ruby using PyCall

  • Ruby 的并发, 进程, 线程, GIL, EventMachine, Celluloid at 2017年09月08日

    并没完全按原文,按自己理解改了一些添一些减一些,也许放翻译节点好一些。不过原文我是贴出来了。也贴了一些相关的文章。

    我也相信存在即合理

  • Ruby 的并发, 进程, 线程, GIL, EventMachine, Celluloid at 2017年09月08日

    知道多少说多少而已,比如楼上关于 copy on write 的我解决不了,所以,我不能多说什么,开篇也有注明。

    文中也并没有让其他人去用 Erlang, 只是想认识一些正在学习或者使用 Erlang 的人。

    相反,Erlang 的社区生态活跃度比起 Ruby 或者 Go 弱很多,更主流的就更没必要去比了,如果没有 Elixir 的话也许会更... 基于这样,我并不会随便推别人带着生产的目的去用 Erlang (即便目前依旧觉得这门语言很赞). 但是,用和学着玩是两码事。也许你是看不惯我贴了自己 Blog 的外链吧

  • Ruby 的并发, 进程, 线程, GIL, EventMachine, Celluloid at 2017年09月02日

    按我自己理解,如果只是在 Celluloid 中使用是安全的,但是,如果是在多线程的环境下又套着来用 (应该不会这么干吧 = 。 = ) 就不安全了。没找到合适场景例子 ╮(╯_╰)╭

    require 'celluloid'
    class Sheen
      include Celluloid
      @@executed = false
    
      def self.executed
        @@executed
      end
    
      def ensure_executed
        unless @@executed
          puts "executing!"
          p Thread.current
          sleep 2
          @@executed = true
        end
      end
    end
    
    10.times.map { Sheen.new.async.ensure_executed }
    
  • Ruby 的并发, 进程, 线程, GIL, EventMachine, Celluloid at 2017年09月01日

    类方法的实例变量那是类实例变量了吧? 普通的实例变量一般不会有线程问题,除非是线程在实例变量的作用域内产生的

  • Ruby 的并发, 进程, 线程, GIL, EventMachine, Celluloid at 2017年08月31日

    一个线程服务于一个请求,没理解你指的边界是什么意思。

    如果是在同一进程下的两个线程处理 A B 请求,那修改全局变量或者类变量这些都是不安全的

  • RubyConf China 2017 售票开始!(已更新日程安排) at 2017年07月17日

    超过一个月顶不上去了。🆙

  • [杭州][9.16 - 17] RubyConf China 2017 正式宣布!征集赞助、主题分享 at 2017年06月12日

    秀女友最高境界😏 😏 支持

  • [杭州][9.16 - 17] RubyConf China 2017 主题分享征集 (已更新主题) at 2017年06月01日

    @guyanbiao 经理我要去见猴哥,有假么🤓

  • ElasticSearch 的分数 (_score) 是怎么计算得出 (2.X & 5.X) at 2017年03月07日
    Pagination

    You can implement pagination with the from and size search parameters. However, search results can be automatically paginated with the kaminari or will_paginate gems. (The pagination gems must be added before the Elasticsearch gems in your Gemfile, or loaded first in your application.)

    response.page(2).results
    response.page(2).records
    
  • Bulk Upsert for MySQL & PostgreSQL at 2017年03月03日

    已打赏 16 元 👍

  • ElasticSearch 的分数 (_score) 是怎么计算得出 (2.X & 5.X) at 2017年03月03日

    很难通过你贴的这些得出结果,因为没有对应的数据长什么样,分词分出来的结果是什么样的也看不出。可以用 termvector 看看, 辣么长的一串查询 没命中的话,如果结果集较少,可以尝试删减一些查询条件,逐个分析哪里导致的吧。 ╮(╯_╰)╭

  • 从本周三 (2月8日) 起每周三晚八点直播 Rebuilding Rails at 2017年02月06日

    Rebuilding Rails - Get Your Hands Dirty and Build Your Own Ruby Web Framework

  • psql 数据导入,production 环境时,Heroku 跑 task 时不能写入文件再导入,有其他数据导入方式吗 at 2017年01月16日

    https://deveiate.org/code/pg/PG/Connection.html#method-i-copy_data

    不要生成临时的 csv,直接读了丢进 pg

  • ElasticSearch 的分数 (_score) 是怎么计算得出 (2.X & 5.X) at 2016年12月20日

    #1 楼 @jiazhen 自己写 scorer? 是指 function score 伐?

    #2 楼 @gyorou 各种对数函数什么的高中以后几乎就再也没怎么接触过了 ╮(╯_╰)╭

  • 注意 I18n.locale 是 thread-local at 2016年12月11日

    关于 Thread-local

    不知道大家如果用 redis 是直接

    $redis = Redis.new
    
    # 还是
    
    Thread.current[:redis] = Redis.new
    
  • 关于 ElasticSearch 的疑惑 at 2016年11月30日

    Searchkick 是将 Elasticsearch 集成到 Rails 的一个 gem, 大部分功能和你另外提到的那些 elasticsearch-xxxxx 差不多,可能有一些差异,但是要在 Rails 里用 Elasticsearch 的话一般选官方的 elasticsearch-xxxx 那几个或者单独只要一个 Searchkick 就可以了,用不着都加到 Gemfile

    一般而言,

    gem 'elasticsearch-model'
    gem 'elasticsearch-rails'
    
    # - OR - 
    
    gem 'searchkick'
    

    elasticsearch-persistence 用的少,看文档的说明像是用在一些 PORO 上,而不是 ActiveRecord 的对象上

  • 使用 Ruby 处理大型 CSV 文件 at 2016年11月09日

    #15 楼 @qunlee 还是贴一下主要代码吧,这么凭空说不准哪儿的问题

  • Ruby Hacking 指南,为啥社区没人翻译这本书。 at 2016年07月01日

    http://thinkinginruby.group.iteye.com/group/wiki/1262-chinese-version-of-the-ruby-hacking-guide

  • Rails.cache 缓存似乎把代码缓存了,而不是把结果缓存了 at 2016年06月12日

    #7 楼 @hooopo 被发现了 (逃 = . =

  • Rails.cache 缓存似乎把代码缓存了,而不是把结果缓存了 at 2016年06月12日

    之前遇到过这个疑问,
    楼主如果是真的要缓存所有的查询结果的话还得慎重哦,不然把整个结果集塞进内存有可能要爆呢,如果是 MemoryStore 的话

  • RubyConf China 2014 参会指南 at 2014年11月01日

    #12 楼 @Martin91 你们公司这次又是集体出洞吗?

  • v.swiftv.cn 这个视频网站是用什么开源系统搭建的吗? at 2014年06月11日

    = . =

  • [广州] 创业团队招聘 rails 高级工程师 at 2014年03月31日

    试试上传图片,顶顶

  • 有多少人工作是用 Air 11 寸的? at 2013年11月07日

    http://37signals.com/svn/posts/3237-a-few-product-recommendations

  • 哪里有前端设计规范?(update) at 2013年04月20日

    删除线

  • 欧冠八强抽签结果出来了 你们支持哪支队? at 2013年03月15日

    状哉大皇马

  • Teahour.fm 第 5 期发布 at 2013年03月06日

    很欢乐🆘@lgn21st 洗碗是运动吗?不是吗?是吗………O.O

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