Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Miclle Zheng
@miclle
高级会员
第 250 位会员 / 2011-11-24

[email protected]
上海
52 篇帖子 / 707 条回帖
23 关注者
2 正在关注
171 收藏
码农,骑公路自行车
GitHub Public Repos
  • qroom 2

  • space 2

  • linuxtools_rst 2

    Linux工具快速教程

  • miclle.github.io 1

    Miclle's web site

  • fox 1

    Fullstack web framework

  • godoc 1

  • thinking-in-crud 1

  • stack-go 1

  • api-guidelines 1

    Microsoft REST API Guidelines

  • gallery 1

    Get image info lib.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 一个 Markdown editor gem at 2013年07月10日

    https://github.com/chjj/marked 解析速度要快很多

    测试地址:http://markdown.miclle.com/

  • [上海][2013年7月9日] Ruby Tuesday 活动召集 at 2013年07月09日

    签到!

  • 这年 头的网络营销啊! at 2013年07月06日

    以前租房子的时候,在赶集上看到地铁边上超便宜的房子,还特么家电全配,拍的照片超好,一看时间不到一刻钟前发布的。 结果打电话去问,已经被租掉了,这特么速度,后来才知道,那些信息根本就是假的,图片是别的地方找来的,其目的就是让你打电话过去,然后给你推荐别的房子

  • 请问下面这行代码如何重构的漂亮点。 at 2013年07月06日

    #5 楼 @huobazi

    link_to 里有一个"data-over-text的属性,我是 JS 来切换显示文字的

    // over text
    // <a href="/painters/1/unfollow" data-over-text="取消关注" data-remote="true">已关注</a>
    // <a href="/u/2/unfollow" data-over-text="取消关注" over-rel="#follow-2-text">
    //   <span id="follow-2-text">已关注</span>
    // </a>
    
    $(document).delegate('[data-over-text]', 'mouseover', function() {
      var $element = $(this);
      var $target = $($element.attr('over-rel'));
      $element.data('original', $element.text());
      $target = $target.size() > 0 ? $target : $element;
      $target.text($element.attr('data-over-text'));
    });
    
    $(document).delegate('[data-over-text]', 'mouseout', function() {
      var $element = $(this);
      var $target = $($element.attr('over-rel'));
      $target = $target.size() > 0 ? $target : $element;
      $target.text($element.data('original'));
    });
    
  • 请问下面这行代码如何重构的漂亮点。 at 2013年07月06日

    我之前的做法是这样: help:

    # Painter follow button
     def painter_follow_button(painter)
         if current_user.favorite? painter
           render "painters/followed", :painter => painter
         else
           render "painters/follow", :painter => painter
         end
     end
    

    _followed.html.erb

    <%= link_to "已关注", unfollow_painter_path(painter), :remote => true, :method => :post, :class => "action", :id => "follow-action", "data-disable-with" => "请稍候...", "data-over-text" => "取消关注" %>
    

    _follow.html.erb

    <%= link_to "关注TA", follow_painter_path(painter), :remote => true, :method => :post, :class => "action", :id => "follow-action", "data-disable-with" => "请稍候..." %>
    

    follow.js.erb

    $('#follow-action').replaceWith("<%= escape_javascript(render('followed', :painter => @painter)) %>");
    

    unfollow.js.erb

    $('#follow-action').replaceWith("<%= escape_javascript(render('follow', :painter => @painter)) %>");
    
  • 第一次写 jquery 插件,求指点 at 2013年07月06日

    你至少也得写个 README 来说明一下这个插件是用来干嘛的

  • 卖东西的现在也要来托管代码了: 京东开放代码托管平台 at 2013年07月06日

    除了 gitcafe,其它貌似都在赤裸裸的抄袭

  • 无聊无聊!大家无聊时都干什么? at 2013年07月04日

    出去骑车

  • ruby link_to 去掉下划线 at 2013年07月04日

    块元素最好不要包含在内联元素里面

  • [上海][2013年7月9日] Ruby Tuesday 活动召集 at 2013年07月04日

    参加

  • AKB48 有一首歌叫《Ruby》 at 2013年07月03日

    Ruby Tuesday

  • 六一在家折腾个 WALL·E 给闺女玩 (已更新:Audio & Text to Speech) at 2013年07月01日

    #86 楼 @bigpig85 还没有,最近在忙别的事,没空折腾,估计完全弄好还要几个月

  • 10.9 dp2 无菊花进系统 at 2013年06月29日

    dp2 下 command+i 无法显示文件简介

  • 大家来 Show 一下自己的个人站 at 2013年06月22日

    #9 楼 @Levan 忘记弄面包屑了,pjax 可以用后退,呵呵

  • 10.9 Xcode Couldn't register bootstrap server at 2013年06月21日

    在 10.9 下用 Xcode5 老是 crash,刚把 Xcode4.6.2 升级到 4.6.3 后就没有这个问题了

  • Daniel Lv 明天是否有喜事呀 at 2013年06月21日

    💏新婚快乐 @lgn21st 明天去喝喜酒了

  • 大家来 Show 一下自己的个人站 at 2013年06月21日

    #5 楼 @SharpX 想做,还没加,不个不难

  • 假如是你,你会选择 (招) 王垠这样的人么? at 2013年06月21日

    我目前不是 BOSS,所以说招与不招都是在扯蛋 作为公司方,如果那个人解决不了你的问题,公司也不会招进去,不过要想清楚,招进去的是人,不是机器 为作个人,当然是要去一个能实现自己价值的地方,但不是一个要改变价值观的地方 互联网是开放并自由的,每个人都有权力表达自己的看法,你不满意,你也可以写 blog 反驳! 除了自己老婆陪着走一条路,人家走什么样的路,关我屁事!我只是偶尔看看风景。

  • 500 页面,应该如何设计? at 2013年06月19日

    #8 楼 @iamroody 那里面也有 500 的呀

  • 500 页面,应该如何设计? at 2013年06月19日

    http://bashooka.com/template/404-error-page-html-templates/

    太多了,只要你去 Google

  • 500 页面,应该如何设计? at 2013年06月19日

    http://themeforest.net/item/impact-404-html5-css3-error-page/2630810

    http://fusionmedia.dk/themeforest/impact/

  • Font Awesome 在 rails 中怎么用? at 2013年06月18日

    #10 楼 @Rei 短的嘛当然可以用用 content_tag,像楼主这种情况;太长了,当然就考虑到编码效率和可读性就用 block 了,

  • Font Awesome 在 rails 中怎么用? at 2013年06月18日

    #7 楼 @wuwx #8 楼 @swachian 用 content_tag 比#4 楼那样写解析效率略高一点

    详见 http://ruby-china.org/topics/6886

    slide 42 页

  • Font Awesome 在 rails 中怎么用? at 2013年06月18日

    <%= link_to content_tag('i', nil, class: "icon-white icon-home") + "Index", root_path %>

  • 六一在家折腾个 WALL·E 给闺女玩 (已更新:Audio & Text to Speech) at 2013年06月18日

    Raspberry Pi Audio 音频 https://github.com/miclle/WALL-E/blob/master/Raspberry-Pi/audio.md Raspberry Pi Text to Speech 文本转语音 https://github.com/miclle/WALL-E/blob/master/Raspberry-Pi/Text_to_Speech.md

  • 如何在 View 里面判定页面地址? at 2013年06月18日

    controller_name

  • 六一在家折腾个 WALL·E 给闺女玩 (已更新:Audio & Text to Speech) at 2013年06月16日

    Raspberry Pi Watchdog https://github.com/miclle/WALL-E/blob/master/Raspberry-Pi/watchdog.md

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