Displaying 20 results from an estimated 100 matches similar to: "How to sort child table on fields in the associated parent"
2006 May 18
3
access to an ApplicationController property from a view
Hi there,
How is it possible to get access to an ApplicationController property
from a view?
Consider this (simplified) situation:
class ApplicationController < ActionController::Base
def folder_id
@folder_id = params[:id]
return @folder_id
end
end
class FolderController < ApplicationController
def show
@folder = Folder.find_by_id(folder_id)
end
end
So far,
2008 Apr 18
3
Relating to records in same table
I''m in progress of making a little folder system with Ruby on Rails.
I''ve got a "folders" table. Each "folder" has got an id and a folder_id.
The folder_id is supposed to represent the folders'' parent folder.
How can I tell Rails?
I would like Rails to automaticly delete all subfolders of a folder when
I delete the folder it self.
Any ideas?
--
2014 Jan 31
2
Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
I am working with a number of our customers to ensure that NUT
works with different UPS's on Freebsd 9.1.
The current one I am looking is support for:
*Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower*
What seems to be supported in Freebsd is:
CXR1000
blazer_ser
LAN Saver 600
genericups upstype=0
Power Guardian
genericups upstype=7
PrOffice 650
USB blazer_usb
DS-800
USB
2014 Feb 01
0
Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
On Jan 31, 2014, at 3:14 PM, Chris Duffy wrote:
> The current one I am looking is support for:
>
> Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower
>
> What seems to be supported in Freebsd is:
Small clarification: the hardware compatibility list isn't broken down by operating system (theoretically, the drivers should work on any POSIX system, with additional
2006 Jan 11
3
Just update 1 field
Hi All,
I wonder how I can get rails to update just one field when I do Myfile.save.
Right now this happens when I do a Myfile.save:
UPDATE myfiles SET `folder_id` = 0, `filesize` = 1, `data` =
''2f7573722f6c6f63616c2f6d ... f7061636b65743d33324d'', `user_id` = 0,
`date_modified` = ''2006-01-11T23:33:57+0100'', `filename` =
''mysqlscripts.sql''
2014 Feb 04
2
Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
Thx for the info Charles.
Here is what I am seeing from
'usbconfig list'
ugen0.1: <EHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE
ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE
ugen0.2: <product 0x0024 vendor 0x8087> at usbus0, cfg=0 md=HOST
spd=HIGH (480Mbps) pwr=SAVE
ugen1.2: <product 0x0024 vendor
2013 Apr 12
5
how to change the date into an interval of date?
Hi,
I am not sure I understand your question correctly.
dat1<- read.table(text="
id??????????? responsed_at???????????????? number_of_connection????????????????? scores
1????????????????? 12-01-2010?????????????????????????????????? 1????????????????????????????????????????????? 2
1????????????????? 15-02-2010??????????????????????????????????
2013 May 07
4
how to calculate the mean in a period of time?
Hi,
Your question is still not clear.
May be this helps:
dat2<- read.table(text="
patient_id????? t???????? scores
1????????????????????? 0??????????????? 1.6
1????????????????????? 1??????????????? 2.6
1????????????????????? 2???????????????? 2.2
1????????????????????? 3???????????????? 1.8
2????????????????????? 0????????????????? 2.3
2?????????????????????? 2???????????????? 2.5
2010 Sep 07
2
Plotting longitudinal data
Hello,
Hope that someone could help me plotting longitudinal data below:
7213 3333330001 0.8300 13.05.09 1
1 3333330001 0.8700 09.02.05 NULL
4797 3333330001 0.7700 21.03.07 NULL
2399 3333330001 0.7800 12.04.06 NULL
2400 3333330002 NULL 27.03.06 NULL
7230 3333330002 0.8200 14.05.09 0
2 3333330002 0.8400 09.02.05 NULL
4798 3333330002 0.8700 20.03.07 0
4799 3333330003 0.9000 20.03.07 13
2401
2014 Feb 04
0
Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
On Feb 3, 2014, at 9:05 PM, Chris Duffy wrote:
> Thx for the info Charles.
>
> Here is what I am seeing from
> 'usbconfig list'
[...]
> ugen1.3: <USB UPS PPC> at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
>
>
> The last line I guess is key.
Unfortunately, it is not very unique: the vendor can pick the string "USB UPS PPC", but the drivers
2010 Jun 29
3
merging/intersecting 2 data frames
Dear R People:
I have two data frames, a.df and b.df as seen here:
> a.df[1:10,]
DATE GENDER PATIENT_ID AGE SYNDROME
1 4/16/2009 F 23686 45 RASH ON BODY
2 4/16/2009 F 13840 35 CANT URINATE
3 4/16/2009 M 12895 30 BLURRED VISION
4 4/16/2009 M 18375 33 UNABLE TO VOID
5 4/16/2009 M 2237 44
2005 Oct 23
12
Showing a neat error message
Hi All,
I''m trying to prevent users from deleting a folder that has contents
like this:
class Folder < ActiveRecord::Base
has_many :myfiles
has_many :folders
belongs_to :folder
validates_uniqueness_of :name, :scope => "folder_id"
before_destroy :dont_destroy_folder_with_contents
def dont_destroy_folder_with_contents
if Folder.find(id) != nil ||
2007 Feb 20
1
Reshape (pivot) question
Hi R-users,
I have a data set like this (first ten rows):
id patient_id date code class eala ID1564262 1562 6.4.2006 12:00 5555 1
NA ID1564262 1562 6.4.2006 12:00 5555 1 NA ID1564264 1365 14.2.2006 14:35
5555 1 50 ID1564265 1342 7.4.2006 14:30 2222 2 50 ID1564266 1648 7.4.200614:30
2222 2 50 ID1564267 1263 10.2.2006 15:45 2222 2 10 ID1564267 1263
10.2.200615:45
3333 3 10 ID1564269 5646
2010 Nov 02
2
multi-level cox ph with time-dependent covariates
Dear all,
I would like to know if it is possible to fit in R a Cox ph model with
time-dependent covariates and to account for hierarchical effects at
the same time. Additionally, I'd like also to know if it would be
possible to perform any feature selection on this model fit.
I have a data set that is composed by multiple marker measurements
(and hundreds of covariates) at different time
2007 Jun 26
1
A really simple data manipulation example
In response to those who asked for a better explanation of what the
Vilno software does, here's a simple example that gives some idea of
what it does.
LABRESULTS is a dataset with multiple rows per patient , with lab
sodium measurements. It has columns: PATIENT_ID, VISIT_NUM, and
SODIUM.
DEMO is a dataset with one row per patient, with demographic data.
It has columns: PATIENT_ID, GENDER.
2010 Jan 21
2
will_paginate ?
Does anyone have experience with will_paginate?
I''m trying to use it with acts_as_ferret.
routes.rb
...
map.search ''/search'', :controller => ''notes'', :action => ''search''
notes.rb
...
acts_as_ferret :fields => [ ''body'' ]
notes_controller.rb
...
def search
if params[ :query ]
@query = params[
2007 Sep 13
2
beginner's questions ... sorry
I have 316 files. Each file represents a patient's breathing track
(respiratory signal recorded for a variable number of cycles). All files
have the same are made up of a header followed by a variable number of
records.
Each record contains 7 comma separated fields.
The patient ID is recorder in the header which is stripped off when reading
the file into a R data.frame.
Since I need to keep
2006 Jul 13
5
how to get to the parent of a child object.
Hi, i have a problem with the following:
I have an application with patients <-->>consults
models are ok
in the view list_consults i do this:
for consult in @consults%>
<tr>
<td><%= consult.patient.name %></td>
<td><%= consult.reason %></td>
<td><%= consult.date %></td>
<td><%= link_to
2014 Feb 04
2
Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
Charles,
Here is the output:
ugen1.3: <USB UPS PPC> at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0008
idVendor = 0x06da
idProduct = 0x0005
bcdDevice = 0x0003
iManufacturer = 0x0003 <PPC>
2006 Mar 10
1
Validate fields and display errors from two models?
Hi,
I have here a problem I''ve been working at for a little while but I
can''t seem to get the error messages to appear correctly.
My form looks something like this for "ModelA":
[errors_for "modelA"]
[form for "modelA"]
[text "modelA" "fieldname1"]
[text "modelB" "fieldname2"]
[submit]
[/form]
The reason