Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Rei
@Rei
Admin
NO. 1 / 2011-10-28

[email protected]
深圳
189 Topics / 9165 Replies
731 Followers
0 Following
11 Favorites
中下水平 Rails 程序员
Reward
GitHub Public Repos
  • writings 941

    [Closed] Source code of writings.io

  • alipay 732

    Unofficial alipay ruby gem

  • code_campo 291

    [Closed] Source code of http://codecampo.com

  • asciidoctor-pdf-cjk-ka... 101

    **no longer maintained**

  • geeknote 34

  • asciidoctor-htmlbook 31

    Asciidoctor HTMLBook is an Asciidoctor backend for converting AsciiDoc documents to HTMLBook docu...

  • material-ui 17

  • rich-text-editor 12

  • htmlrenderer 12

  • rails-chatgpt-demo 8

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 牢骚下,Linux 下 QQ 真实头大 at May 19, 2013

    #11 楼 @as181920 性能够的话,放到第二桌面,还不怕弹消息打断工作。

  • 牢骚下,Linux 下 QQ 真实头大 at May 19, 2013

    vbox

  • 写一个 Gem 需要哪些知识? at May 17, 2013

    #4 楼 @hooopo 卧槽

  • 写一个 Gem 需要哪些知识? at May 17, 2013

    发布 gem 还需要一份责任心。

  • 一个重构代码的问题 at May 17, 2013
    class Product
      # overwrite the product#name method
      def name
        read_attribute(:name)
      end
    end
    

    奥,没留意楼主没用 ORM,那直接 2 楼行了

  • slim 有些情况写 js 是不是会有问题啊? at May 17, 2013

    版本多少,我今天 update 出问题了

    http://ruby-china.org/topics/11049

  • 我今天才知道 bundle update 不一定得到最新版本 at May 17, 2013

    To do this, run bundle update, which will ignore the Gemfile.lock, and resolve all the dependencies again. Keep in mind that this process can result in a significantly different set of the 25 gems, based on the requirements of new gems that the gem authors released since the last time you ran bundle update.

    我觉得我没理解错啊,update 不是升级到满足依赖的最新版的意思吗?

  • 我今天才知道 bundle update 不一定得到最新版本 at May 17, 2013

    If you run bundle update with no parameters, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources.

    http://gembundler.com/v1.3/bundle_update.html

    这咋回事。

  • 代码混写的问题 at May 16, 2013

    为什么楼主不想想是自己的问题?

  • 怎样在 rails 的 view 中调用 .coffee 中的函数 at May 16, 2013

    Working with JavaScript in Rails http://edgeguides.rubyonrails.org/working_with_javascript_in_rails.html

  • 怎样在 rails 的 view 中调用 .coffee 中的函数 at May 16, 2013

    #6 楼 @aptx4869 奥,才发现楼主的写法。

    onclick 这种方法很不时髦,转 unobtrusive javascript

  • gae 都支持 php 了,不知道什么时候支持 ruby! at May 16, 2013

    别想了。

  • 怎样在 rails 的 view 中调用 .coffee 中的函数 at May 16, 2013
    @test = test
    

    原理也是全局变量。

    如果不希望全局变量,其实是要好好规划自己的 js 模块。可以看看 turbolinks 的代码

    https://github.com/rails/turbolinks/blob/master/lib/assets/javascripts/turbolinks.js.coffee

  • Working With Unix Processes for Rubyist at May 16, 2013

    等中文版 epub 格式电子书。

  • ok, glass at May 16, 2013

    我已经饥渴难耐啦

  • [杭州][2013年5月16日] Ruby Tuesday 活动召集 - 朴灵讲 nodejs at May 16, 2013

    这么多人黑不缺我一个了 : )

    看这两段类似功能的代码量的对比

    https://github.com/chloerei/code_campo/blob/master/app/controllers/topics_controller.rb https://github.com/cnodejs/nodeclub/blob/master/controllers/topic.js

    虽然说 cnodejs 这段没有分离 model 代码所以多了不少,但主要还是异步回调还有错误码判断耗费太多代码。

    前端学 js 目前是唯一选择,即使用 coffee 也是基于对 js 的了解才能用好。后端我就不想用 js 了,什么用着舒服用什么,并发问题还有不少选择,Erlang 或 Go 对我吸引力还大点。

  • can't type chinese on mobile at May 15, 2013

  • @Rei writings.io 里面按删除键的时候略卡呢? at May 15, 2013

    自动保存问题,可以再看看 Google Doc,它也是每个输入都触发保存事件。writings.io 比它差的地方是每次都全文发送,Google 每次发送量都是固定的,writings.io 随着文字增加会越发越多,累计起来每篇文章大概 1M 的总流量差异,这对桌面网络环境来说不算什么(包月流量为啥不用),移动目前放弃。另外触发的事件次数没准 Google 还要多,因为光标上下左右移动 Google 都会保存,writings.io 只有实际输入才会保存。

    Google 耍了个小技巧,Saving -> Saved 的提示信息是延后几秒切换,所以用户看上去不会知道背后其实一直在频繁提交。我也打算这样弄,不过目前还在做别的东西。

  • @Rei writings.io 里面按删除键的时候略卡呢? at May 15, 2013

    回退卡应该是 Undo 机制的问题,因为还没有标准的 Undo 管理器,所以自己写了一个,又因为 Mac 和 Linux 两个平台的事件触发不一致,添加了额外的检查逻辑,所以实现得比较低效。

  • 麻烦推荐一些兼容 IE 6 的前端框架 at May 14, 2013

    根据 CNZZ 的统计数据,2012 年,IE6 在中国网民中的市场份额,从年初的 25% 降到了 16%,已经低于 IE8 的 22%,IE8 这一年基本维持稳定。

    http://www.pingwest.com/ie6-china/

    已经真到快要可以忽略的程度了吧,除非目标用户人群就在这 16% 里面。

  • 学习 RoR 这个看书顺序如何 at May 14, 2013

    341

  • Happycasts: Ajax on Rails at May 14, 2013

    搜了一下,下一版官方 guide 应该有 Javascript 部分了

    http://edgeguides.rubyonrails.org/working_with_javascript_in_rails.html

  • 平时写写画画的那些笔 at May 13, 2013

  • Solr 大数据量的分页问题 at May 13, 2013

    #8 楼 @ChanceDoor 首先查询过程是交给搜索引擎插件执行的,ActiveRecord 的分页插件的 :page :per_page 参数只能转换为数据库查询,所以要自己转换 :limit,:offset 这些参数输入给搜索引擎的查询。

    然后搜索引擎查询会返回一个结果集,包含结果数组,和 limt、offset、total_count 之类的信息,用这些信息组装一个分页插件能理解的结果集对象。具体要看分页插件的文档或者源码。

  • 我的一位老师说网络开发技术只有 Windows 的 DAO COM 和 J2EE at May 13, 2013

    #7 楼 @AlphaLiu 呵呵厚就行了。

  • Solr 大数据量的分页问题 at May 13, 2013

    看顶楼我就奇怪了,数组取前两个跟分页没啥关系。

    这个问题是要把 solr 返回的数组拼装成分页插件能理解的集合对象。

  • 我的一位老师说网络开发技术只有 Windows 的 DAO COM 和 J2EE at May 13, 2013

    完全脱离时代。

  • Solr 大数据量的分页问题 at May 13, 2013
    names.first(2).each do |n|
      puts n
    end
    
  • Rails Migration 写得心烦 at May 13, 2013

    一个人项目初期反复修改,一个 model 一个 migrate 就行了,然后 db:migrate:reset

  • Rails 如何禁用 Assets Pipline at May 13, 2013

    config.assets.enabled = false

    http://guides.rubyonrails.org/asset_pipeline.html

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