买个车有那么麻烦么?对上眼了就买了,不喜欢了就换掉嘛。
签到
:plus1:
:plus1:
我之前爬数据是放到 sidekiq 里,效率高很多
你仔细检查过你的代码么?
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style type="text/css">
    *{ margin: 0px; padding:0px; border:0; }
    .nav {
      background-color: #eee;
      width:600px;
      height: 40px;
      margin: 0 auto;
    }
    ul {
      list-style-type: none;
    }
    .nav ul li {
      float: left;
      line-height: 40px;
      text-align: center;
    }
    a {
      text-decoration: none;
      border: solid 3px purple;
      border-radius:5px;
      color: #000;
      padding: 0 10px;
      display: block;
    }
    a:hover {
      color: #FFF;
      background-color: #666;
    }
  </style>
</head>
<body>
  <div class=nav>
    <ul>
      <li><a href="#">home</a></li>
      <li>
        <a href="#">products</a>
        <ul>
          <li><a href="#">coffee</a></li>
          <li><a href="#">cake</a></li>
        </ul>
      </li>
      <li><a href="#">service</a></li>
      <li><a href="#">faqs</a></li>
      <li><a href="#">about us</a></li>
    </ul>
  </div>
</body>
</html>
支持 :plus1:
挺有规则的呀,用 nokogiri 可以解析
一直用 erb,从前端转为后端开发,erb 更直观一点,另外不喜欢完全靠缩进来控制代码 SASS 这个着实能提高编写效率
:plus1:
<%= content_tag :div, class: "strong", id: "tab-1", style: "display: block" do -%>
  Hello world!
<% end -%>
=>
<div class="strong" id="tab-1" style="display: block">Hello world!</div>
如果没有别的标签
<%= content_tag :div, "Hello world!", class: "strong", id: "tab-1", style: "display: block" -%>
你是不是要做字符串拼接呢?
"http://comiclover-comicimages.stor.sinaapp.com/ipadVolumCovers/#{self.comic_cover}"
"http://comiclover-comicimages.stor.sinaapp.com/ipadVolumCovers/#{URI::escape(self.comic_cover)}"
你还是用 #12 楼的方法吧,那样确实好很多。select 和 pluck 花在 DB 上的时间一样,但 select 会在内存中构建 ActiveRecord 对象,而 pluck 是直接返回数组
Unlike select, pluck directly converts a database result into a Ruby Array, without constructing ActiveRecord objects. This can mean better performance for a large or often-running query. However, any model method overrides will not be available. For example:
class Client < ActiveRecord::Base
  def name
    "I am #{super}"
  end
end
Client.select(:name).map &:name
# => ["I am David", "I am Jeremy", "I am Jose"]
Client.pluck(:name)
# => ["David", "Jeremy", "Jose"]
ModelB.where(:id => ModelA.select(:id).collect(&:id))
6k-9k 木有竞争力 后端开发还要‘ 精通 Javascript、HTML 和 CSS’还是分开招两个吧
初学者照着这个来就好了 http://railstutorial-china.org/
devise 这个即使你会用了你也搞不明白他是怎么实现的 cancan 简单的权限控制根本不需要
rolify 我没用过,不知道
楼主不是有 BF 了么,他的电脑可以拿来折腾的呀  
你上次问的“求一个相识度算法。” http://ruby-china.org/topics/18645 搞明白了么? 这么快就开始搞推荐算法了 ...
:plus1:
新项目 4.1 一个老项目 3.2