search for: drop_index

Displaying 2 results from an estimated 2 matches for "drop_index".

Did you mean: cdrom_index
2006 Apr 10
4
Many To Many''s Join table attributes + migrations
Hi all, just joined and have only just kicked off with Rails (coming, but not departing, from WebObjects development). And so far there seems to be a lot of promise except for one thing I can''t figure out as yet -- the above problem. Say I have the following conceptual relationships: ITEMS <<--->> CARTS i.e., each item can belong to one or more categories. So really
2011 Jun 16
7
[PATCH] replace fchmod()-based heartbeat with raindrops
...# See the Unicorn::Configurator RDoc for examples. -class Unicorn::Worker < Struct.new(:nr, :tmp, :switched) +class Unicorn::Worker + # :stopdoc: + attr_accessor :nr, :switched + attr_writer :tmp + + PER_DROP = Raindrops::PAGE_SIZE / Raindrops::SIZE + DROPS = [] + + def initialize(nr) + drop_index = nr / PER_DROP + @raindrop = DROPS[drop_index] ||= Raindrops.new(PER_DROP) + @offset = nr % PER_DROP + @raindrop[@offset] = 0 + @nr = nr + @tmp = @switched = false + end # worker objects may be compared to just plain Integers def ==(other_nr) # :nodoc: - nr == other_nr +...