search for: unit_type

Displaying 3 results from an estimated 3 matches for "unit_type".

2006 Mar 10
2
adding to has_many on create and edit
...lass AdminUnitsController < ApplicationController #snip def create @unit = Unit.new(params[:unit]) @unit.prices.create("price" => params[:price]) @levels = Level.find(:all, :order => "LPAD (`levels`.`elevator_number`,5,\"0\") ASC") @unit_types = UnitType.find(:all, :order => "`unit_types`.`name` ASC") if @unit.save Unit.find(@unit.id).update_attributes(params[:unit]) flash[:notice] = ''Unit was successfully created.'' redirect_to :action => ''list'' else...
2010 Sep 08
2
dataframe selection using a multi-value key
...quot;, "EMS", "EMS", "EMS", "FIRE", "EMS", "EMS")) responses = data.frame( INC_NO = c(1,2,2,2,3,4,5,6,7,8,8,8,9,10), INC_YEAR = c(2006, 2006, 2006, 2006, 2006, 2007, 2008, 2008, 2008, 2018, 2018, 2018, 2009, 2010), UNIT_TYPE = c("E2", "E2", "E5", "T1", "E7", "E6", "E2", "E2", "E1", "E3", "E7", "T1", "E7", "E5")) merged_data = merge(incidents, responses, by=c("INC_NO", &q...
2013 Jan 08
0
[PATCH] avoid undefined behavior in fmt_scaled()
...patch below performs an equivalent check without invoking undefined behavior. Nickolai. --- openssh-6.1p1/openbsd-compat/fmt_scaled.c 2008-05-19 18:57:08.000000000 -0400 +++ openssh-6.1p1/openbsd-compat/fmt_scaled.c 2013-01-08 12:18:29.883527421 -0500 @@ -196,12 +196,16 @@ unsigned int i; unit_type unit = NONE; + /* Not every negative long long has a positive representation. */ + if (number == LLONG_MIN) { + errno = ERANGE; + return -1; + } + abval = (number < 0LL) ? -number : number; /* no long long_abs yet */ - /* Not every negative long long has a positive representation. - * Al...