similar to: Nested Data

Displaying 20 results from an estimated 4000 matches similar to: "Nested Data"

2006 Jun 18
3
ActiveRecord Help - Not finding Data
Hello, I''m farily new to RoR and am having a problem trying to retrieve data from my database. Here is the code from my controller: def index zip = params["zip"] @zip1 = Zipcode.find(:first, :conditions => ["zip = ?", zip]) lat = @zip1.latitude.to_f long = @zip1.longitude.to_f radius = 50 @bookstores = Bookstore.find_by_sql ["SELECT * FROM
2006 Jul 19
5
Model Validation - with a twist
I''m stuck in a catch-22 type problem. I have an insert form for a table that uses the validation in the model. i.e. When you click submit on the form and haven''t filled in the required fields then you get the nice rails error messages saying "field can not be blank". This works fine until I introduce some more logic. What I''m trying to do is to validate
2006 Apr 09
6
Write/Display AR query as Grouped Results?
I''ve got a publications table that contains an author_id foreign key and a pubrole_id foreign key. What I want to do is query the DB using AR so that I can get a list of all publications that belong_to a particular author, and group the results by the pubrole.role_name (Author, Joint Author, Editor, etc.) so that the results look something like: Author book1 info book2 info etc.
2004 Apr 27
3
Mixed Effects Models in S and S-Plus book
Anybody know where I can get the Pinheiro/Bates book? I can't find a bookstore w/ stock and the publisher says they don't know when they'll have it again. Thanks. -Frank
2006 May 03
2
grouped output
hello, Suppose I have a table that looks like this: center name email Health Jon jon@test.com Health Bob bob@test.com Admin Jane jan@test.com Admin Jill jill@test.com I would like the output to look like this: Health Jon jon@test.com Bob bob@test.com Admin Jane jan@test.com Jill jill@test.com when i using cold fusion, this was easy via a tag called cfoutput. when i was using java, this was
2004 Nov 11
1
Business software for Linux
I am hoping to find a inventory management program suitable for something like a bookstore or other 1-5 person smb. The software would need to be able to accept inputs from wireless handheld scanning devices for entry into the system. It must also work with their windows based PoS computer. Any suggestions would be highly appreciated. William -- My "Foundation" verse: Isa 54:17
2005 Jul 20
12
Mahler's Book - New Project
Hi all, I'm currently gearing up for a possible PBX replacement project using Asterisk, and I'm just breaching the iceberg of information that's available. I typically like to have something thick with pages in front of me. Mahler's book was the first one to come up and it seems like a good place to start. However, the big name bookstores tell me it'll take up to three
2003 Dec 03
0
Reprint of "The Official Samba-3 HOWTO and Reference Guide"
Hi All, I understand people have been frustrated trying to find copies of "The Official Samba-3 HOWTO and Reference Guide" edited by John Terpstra and Jelmer Vernooij. I apologize. Demand has been even greater than we anticipated and we immediately ran out of stock on the first printing. As bad luck would have it, the busy holiday printing season and a glitch at the printer delayed the
2008 Apr 23
0
self referential (n-n relationship) belongs many controller
Hi all, I ve some troubles in my small acpplication (only 2 tables). I want to follow up tasks but these tasks are linked to others tasks. So I ve tried to do store the nn relationship in other table called links 1st table : tasks columns : id | infos neutral... (as title, description etc ...) ----------------------------------------------------------------------------------- model : class
2013 Feb 11
5
split dates array with take_while does not work ?
I wonder why ruby core method ''take_while'' does not work as expected in the below Rails console example: irb(main):003:0> arr = [] => [] irb(main):004:0> arr << Date.today - 15.days => [Sun, 27 Jan 2013] irb(main):005:0> arr << Date.today - 25.days => [Sun, 27 Jan 2013, Thu, 17 Jan 2013] irb(main):006:0> arr << Date.today => [Sun, 27
2014 Dec 15
2
need guidance on getting started...again
Thanks, Mark. Um, how's about from the commandline or how do I get, I guess we're still using X11, windows to load. Sorry, :<}}} Clayton >-----Original Message----- >From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On >Behalf Of Mark LaPierre >Sent: Sunday, December 14, 2014 5:50 PM >To: centos at centos.org; Mark LaPierre >Subject: Re:
2006 Jul 31
1
Ruby Cookbook
Ruby Cookbook is out. I browsed the book today at the bookstore. It looks very good with a section on Rails. There is no review on Amazon yet. Did anyone get a chance to review this book?
2013 Jan 13
1
R error: system is computationally singular when building GMM model
Dear, I built the generalized method of moments model to estimate the sales rank in the bookstore using plm package in R. The equation is: data1.gmm <- pgmm(dynformula(lnsales_rank ~ ln_price + avg_ham_rate + avg_spam_rate + num_of_ham+ num_of_spam + ship_code2 +ship_code3 +ship_code4+ ship_code5+ ship_code6 + ship_ code7, lag = list(0, 0, 0, 0,0,0,0,0,0,0,0,0), log =FALSE), data=data,
2004 Apr 06
1
"Samba-3 by Example" now available
Hi All, Thanks to everyone who has written wanting more information on when "Samba-3 by Example" by John Terpstra will be available. The good news is that it is available right now through your local bookstore or online sites like Amazon.com. There are already a couple of very positive comments posted to Amazon. These indicate that if you want to get Samba-3 up and running, you'll
2010 Jan 20
4
Searching an array
Hi everyone! :) I''m currently accomplishing what I want, but I''d like to clean it up a bit. I''ve placed the following items in an array (please excuse my lack of proper syntax): @widgets = [1, red] [2, blue] [3, red] [4, blue] I''d like to learn a way to search through the @widgets variable an separate the widgets, so that I could have: @blue_widgets = [2,
2007 Sep 20
3
Bug? in wxSugar enumerable_controls.rb
Hi, I wanted to use wxSugar enumerable features to add a method for returning checked items'' index to the CheckListBox class : require ''wx_sugar/version'' require ''wx_sugar/wx_classes/control_with_items'' require ''wx_sugar/wx_classes/listctrl'' class Wx::CheckListBox def checked_items # use of find_all method from Enumerable
2006 May 31
7
Getting 22 elements
Hello, I''ve done === class HomeController < ApplicationController def index @country = Country.find(:all, :include => "cities") end end === And rhtml is: === <% @country.each do |country| %> <h1><%= country.name %></h1> <% country.cities.each do |city| %> - <%= link_to city.name, :action =>
2008 Feb 25
4
Using group in with find in an ActiveRecord appropriately
I''m playing around with the Practical Rails Projects code, and was attempting to make a change for graphing data differently using groupings. Basically the code went from: total_weight = @exercise.activities.collect {|e| e.repetitions * e.resistance} workout_dates = @exercise.activities.collect {|e| e.workout.date.to_s} To: total_weight =
2005 Feb 04
1
Rare Cases and SOM
I am trying to understand how the SOM algorithm works using library(class) SOM function. I have a 1000*10 matrix and I want to be able to summarize the different types of 10-element vectors. In my real world case it is likely that most of the 1000 values are of one kind the rest of other (this is an oversimplification). Say for example: InputA<-matrix(cos(1:10),nrow=900,ncol=10,byrow=TRUE)
2014 Dec 15
3
How serious are we about not wanting to see...
Redhat in centos? I type help and the first line says redhat. Are we paranoid about red..t? Clayton You can tell the caliber of a man by his gun--c. kirkwood