Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
VincentJiang
@VincentJiang
会员
第 8904 位会员 / 2013-08-29

深圳
36 篇帖子 / 300 条回帖
6 关注者
1 正在关注
2 收藏
VincentJiang
GitHub Public Repos
  • vrails 9

    My WebSite

  • dotfiles 2

    My dot files

  • form_core 0

    A Rails engine providing ability to generate dynamic form.

  • vincentjiang.github.io 0

    Agile Life

  • GirlsCodingDayDemo 0

    GirlsCodingDayDemo

  • jimmylv.github.io 0

    :bowtie: Agile Learning based on GitHub issues, KEEP Retrospection and Introspection! Thanks to @...

  • railsgirls 0

    DJI Rails Girls 2015-08-01

  • accounts 0

    rails + reactjs

  • ROR-Bookmarks 0

  • Fluidbox 0

    Replicating and improving the lightbox module seen on Medium with fluid transitions.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • ruby round down 三位小数 at 2014年01月22日

    #13 楼 @zfjoy520 看 12 楼的方法

  • ruby round down 三位小数 at 2014年01月22日

    #13 楼 @zfjoy520 我试了一下,如果小数位多的话,会这样: (1.234567 * 10000).to_i * 0.0001 = 1.2345000000000002

  • 打印出数字 2014,但是代码里不能有任何数字 之 Ruby 版 at 2014年01月22日

    哈,总感觉有 Ruby 的世界真美好!

  • ruby round down 三位小数 at 2014年01月22日

    下面是我的想法,觉得 OK:

    class Test
        def round_down(x, n)
            index_n = x.to_s.index('.') + n + 1
            puts x.to_s[0, index_n].to_f
        end
    end
    
    t = Test.new
    t.round_down(1.23456, 4)
    
    => 1.2345
    
  • ruby round down 三位小数 at 2014年01月21日

    #9 楼 @jhjguxin 的确好笨的方法啊,ruby 有 round 方法,却没有 rounddown 的方法,真不解。。。

  • 部署 heroku 后,出现 RoutingError at 2014年01月16日

    我觉得你应该把 routs.rb 粘贴上来看看,不然问题很抽象

  • Prawn 中文显示问题 (已解决) at 2014年01月14日

    #3 楼 @quakewang 根据你的提示,我已经解决问题了,谢谢!

  • 周末活动介绍 Prawn 的 Slide at 2014年01月13日

    楼主好!我以前从来没有用过 Prawn,但现在非常需要用 Prawn,今天我有关于 Prawn 中文无法显示的问题,我已经写了个求救贴http://ruby-china.org/topics/16763,可否帮帮我,谢谢!!!

  • wrong number of arguments (0 for 1) at 2014年01月12日

    #9 楼 @allenfantasy #11 楼 @Martin91 感谢两位的提示,让我在登机关手机前得到提示,相信在空中可以完成我的 coding,谢谢

  • wrong number of arguments (0 for 1) at 2014年01月12日

    #9 楼 @allenfantasy 请问后台的 action 代码如何写?

  • 有多年 c 开发经验并且也懂 c++ 的人,读哪本书能尽快理解 ruby 且上手 ruby 开发? at 2014年01月12日

    #4 楼 @xds2000 so expensive

  • wrong number of arguments (0 for 1) at 2014年01月12日

    #7 楼 @boyishwei 那我应该怎样才能把 certificate 这个参数传到后台 mkpdf 的 action 去?因为我后台需要对 certificate 这个对象的相关属性进行调用

  • wrong number of arguments (0 for 1) at 2014年01月11日

    #3 楼 @Martin91 请问mkpdf_path(certificate)如何错?谢谢

  • wrong number of arguments (0 for 1) at 2014年01月11日

    #1 楼 @o_0 看过不止一遍了,若你能找出问题所在就回复吧

  • 号外!CentOS 宣布加入红帽公司! at 2014年01月08日

    #7 楼 @jasl 我也是这样感觉的

  • 号外!CentOS 宣布加入红帽公司! at 2014年01月08日

    #4 楼 @RainFlying 什么心态啊。。。

  • Ruby on Rails 简易安装攻略 for RailsGirls at 2014年01月08日

    #8 楼 @littlepxy 就 Sublime 吧

  • 推荐这个 chrome plugin at 2014年01月03日

    哎哟……不错哦……

  • Ruby 2.1 is out. at 2013年12月26日

    #41 楼 @lgn21st Thank you very much.

  • Ruby 2.1 is out. at 2013年12月26日

    我把 Mac 的 ruby 从 2.0.0 升级到 2.1.0 了,接着把项目中的 Gemfile 的 ruby 改成 2.1.0,然后 bundle install 就报下面这个错: Your Ruby version is 2.1.0, but your Gemfile specified 2.0.0 请问如何可以把项目的 ruby 也升级至 2.1.0?

  • 《Ruby on Rails 教程》Rails 3.2 版电子书免费 at 2013年12月13日

    谢谢楼主哈,我会好好研究一下。。。

  • 传值方法 at 2013年12月12日

    #3 楼 @ashchan 按你的提示,我已经不使用 date0 了,我的代码这样写成功了:

    class Date < ActiveRecord::Base
        after_initialize :auto
        def auto
                 self.date2 = date1
            end
    end
    

    谢谢哈。。。

  • 传值方法 at 2013年12月12日

    #1 楼 @oldfritter 是这样的,modal date.rb 里面有两个参数 date1 和 date2,但因为 date1 和 date2 始终相等,所以我在 new.html.erb 上我就不想重复输入了,而是用一个 input 输入一个值 date0,传至后台后,后台自己会把 date0 赋值给 date1 和 date2,之后保存到数据库里

  • 大家都用 haml 还是 erb 呢 at 2013年12月04日

    erb

  • 分享一本 Rails 的新书《learn-ruby-on-rails》 at 2013年12月03日

    #13 楼 @Peter #14 楼 @kidult #15 楼 @sooone #16 楼 @zhangyanan #17 楼 @xzl #18 楼 @Jijin 请到以下链接下载: https://drive.google.com/file/d/0BwATJ0g3bDhfNHpXSkRqSjV1RW8/edit?usp=sharing

  • mixture.io 的 CSS 框架 at 2013年12月02日

    #2 楼 @zlx_star #3 楼 @willmouse 因为之前看到 ruby-lang 参赛作品http://ruby-china.org/topics/15381 ,其中四号的 button 也是类似的设计,button 只有 border,我挺喜欢的,所以以为有这样的 CSS 框架

  • 刚接了个 ruby & rails 的项目,有人一起干吗?(兼职) at 2013年12月01日

    在深圳,RoR 差不多完成一个小项目了,一个人全搞定,基本的前后端都没问题,我平时上班相对轻松,而且双休,时间比较充裕,正在想找楼主这样的兼职,我的扣扣是四七一四九四五三九,楼主有需要的话可以联系我

  • mixture.io 的 CSS 框架 at 2013年11月30日

    没有大神知道吗?

  • Ruby 官网新设计 (結果公布) at 2013年11月30日

    喜欢四号呀!请问有人知道四号用什么 CSS 框架吗?我感觉 button 的样式好好看!

  • 分享一本 Rails 的新书《learn-ruby-on-rails》 at 2013年11月30日

    前天免费下载的,昨天就看完了。。。

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