加载中
37张大佬手绘的图

导读:这是马云、马明哲、马化腾、顺丰王卫、李彦宏、张近东等大佬手绘的37张图,一张图就是一个商业世界,全面读懂这些商业巨头未来的商业布局... 画这些图的不是记者和编辑,是血拼在产业和...

2015/03/30 11:11
723
救赎“脑袋发热”的互联网创业者

很多创业项目的失败,并非死于“想法”,也并非死于“执行力”,而是死于“脑袋热”; 我也是一个经常“脑袋热”的人,每天有很多想法,其中不乏很多非常有创意,甚至很蓝海的想法。这些想法...

2015/03/29 01:42
156
实用漫画 老百姓如何与检察院打交道?

实用漫画 老百姓如何与检察院打交道? 微众阅读 www.vzone.la

2015/03/26 04:07
237
周鸿祎:2015年,在公司混日子等于浪费生命

我自己当年,无论我在方正给国内企业工作,还是我在雅虎给外国人工作,我都跟别人最大的不一样,我从来不觉得我在给他们打工,我真的可能是很有自信的人,我觉得我在为自己干。因为我干任何一...

2015/03/25 19:15
607
一张10元人民币,在上海的60年代能买些什么?心塞塞.....

生于60年代的上海老前辈们,对这些一定还记忆犹新,棒冰4分,大饼3分,油条3分,公交车是4分...那时平时是没得糖吃的,到春节时才会买上半两8分约6-7个,吃的时候是半颗半颗吃的。 10元 60年...

2015/03/24 00:45
1.5K
让Rails程序出现异常错误等自动发送错误邮件 - exception_notification

第一次配置时,网上资料较乱,走了不少弯路。特在此记录。 配置环境:Ruby 1.9.3 Rails 3.2.2 1.安装 exception_notification gem 在Gemfile中添加 gem 'exception_notification', '3.0.0' ...

2013/08/03 10:20
611
#23 Counter Cache Column

#migrations/006_add_tasks_count.rb def self.up add_column :projects, :tasks_count, :integer, :default => 0 Project.reset_column_information Project.find(:all).each d...

2013/05/10 13:51
65
#22 Eager Loading

Task.find(:all, :include => :projects) Task.find(:all, :include => [:projects, :comments]) Task.find(:all, :include => [:projects, {:comments => :user}])...

2013/05/10 13:41
47
#18 Looping Through Flash

s => <% flash.each do |key, msg| %> <%= content_tag :div, msg, :id => key %> <% end %>

2013/05/09 20:36
33
#17 HABTM Checkboxes

#product has many and belongs to categories #products/_form.rhtml <% for category in Category.find(:all) %> <div> <%= check_box_tag "product[category_ids][]", category.i...

2013/05/09 20:32
26
#16 Virtual Attributes

#users/new.rhtml <%= f.text_field :full_name %> #models/user.rb def full_name [first_name, last_name].join(' ') end def full_name=(name) split = name.split(' ', 2...

2013/05/09 17:54
15
#15 Fun with Find Conditions

Task.find(:all, :conditions => ["complete=? and priority=?", false, 3]) Task.find(:all, :conditions => ["complete=? and priority IS ?", false, nil]) Task.find(:all, :condition...

2013/05/09 17:36
34
#14 Performing Calculations on Models

Task.sum(:priority) Task.sum(:priority, :conditions => 'complete=0') Task.maximum(:priority) Task.minimum(:priority) Task.average(:priority) p = Project.find(:first) p.tas...

2013/05/09 17:31
21
#12 Refactoring User Name Part 3

#user_test.rb def test_full_name assert_equal 'John Doe', full_name('John', nil, 'Doe'), "nil middle initial" assert_equal 'John H. Doe', full_name('John', 'H', 'Doe'), "...

2013/05/09 16:41
11
#11 Refactoring User Name Part 2

def full_name [first_name, middle_initial_with_period, last_name].compact.join(' ') end def middle_initial_with_period "#{middle_initial}." unless middle_initial.blank...

2013/05/09 16:37
14
#10 Refactoring User Name Part 1

#show.rhtml Name: <%= @user.full_name %> #models/user.rb def full_name name = first_name + " " name += "#{middle_initial}. " unless middle_initial.nil? name += l...

2013/05/09 16:30
24

没有更多内容

加载失败,请刷新页面

返回顶部
顶部