similar to: how to count totals for each unique name in a table?

Displaying 20 results from an estimated 100 matches similar to: "how to count totals for each unique name in a table?"

2007 May 22
2
find :all :include broken on Oracle 10
Hi, I am trying the following in Ruby using InstantRails 1.7 on WindowsXP Publication.find(:all, :include => [:doc_type, :release_state] ) but I get the error: OCIError: ORA-00904: "DOC_TYPES"."PUBLICATION_ID": invalid identifier: SELECT publications.id AS t0_r0, publications.docid AS t0_r1, publications.doc_type_id AS t0_r2, publications.title AS t0_r3,
2005 Dec 23
2
Bizarre problems with AJAX / missing variables
I''m having some really weird problems with an app I''m writing. Everything is working as expected on my development machine (OSX, Rails 0.14.4) but is cacking out with weird errors on the Textdrive demo site (FreeBSD, Rails 1.0.0). It complains about missing variables, with errors like this: undefined local variable or method `rawcode'' for
2011 Aug 29
32
Weird assignment problem, very confused :(
Hey, I have the following line in my controller: User.create(:email => "fuuu-+RB1Aph5k6s@public.gmane.org", :password => ''asldfkjadsfadsf'', :ip => request.remote_ip) my IP is 127.0.0.1 - now User.find_by_ip(''127.0.0.1'') returns 0 records although User.first contains ''127.0.0.1'' if I change it to: User.create(:email =>
2006 Aug 06
1
creating hash table, how do i? please help
hi, i have a noob question. how do i create a table but add additional fields? for example.. i have a total_table of total, county, and town where total_table inherites county_id and town_id from my town_county table where county_id has_many towns. in my view, id like to go through the hash like this table total_table for total_table.county { print total_table.county print
2006 Jun 16
3
Does HABTM support non "id" FKs?
Quick question. Say I have a geographical database with counties and zip codes where counties have and belong to many zip codes. zip_codes (id, zip_code) counties (id, name) When I create the association table, the Rails way says to do the following: counties_zip_codes (county_id, zip_code_id). However, given that zip_codes.zip_code is itself a candidate key, I would much prefer to do the
2006 Aug 13
3
ruby and mysql syntax? tried single quotes, double, none, ...
Hi, how do i use passed in arguments and convert those to something sql can understand? do the aliases have to be double qouted? single qouted? i think i tried all but no avail...thanks! def get_count(doctype, towne) @profiles = Profile.count_by_sql("SELECT COUNT(*) from Profiles where Profiles.doctype_id = 1 and town_id = towne") end -- Posted via
2006 Aug 13
7
you can pass multiple parameters using link_to? anything bad
i just found out i can pass mutiple parameters from views like <%= link_to doctype.name, :action => "show_towns", :id => doctype.name, :id2 => doctype.id%> silly me, i always had the impression that i could only pass 1. i guess i dont have to use sessions after all for my site. is there anything wrong with this? basically instead of the user filling out
2006 Jul 02
1
multitable form
Hi all, Although I''m experienced with programming I''m a beginner with ruby, RoR and MVC So I follow examples from books and so on and all is ok. I can make a model who is a class and who match to a table in my database and then I generate pretty forms on a webpage. I would like to know how I can do to make forms who interact with more than one table. For an example lets
2007 Jun 07
6
Problem with response.should render_template
Hello, I have problems with this spec controllers: http://pastie.caboo.se/68634 when I run: rake spec:controllers I get this error: ...............F...... 1) ''DocTypeController should update and redirect to show'' FAILED expected redirect to {:action=>"show", :id=>1}, got redirect to
2004 Apr 07
2
Graph
Hi how i''m going to define below example HOST IP test1 172.30.100.1 test2 172.30.100.2 ACCEPT test1 fw tcp 22 which file i should add in the test1 and test2. somemore is there any graph for the firewall so that i can view it. ------------------------------------------------------------------------ ------- Best Regards Liew Toh Seng Icq No: >> 36835809 << MSN:
2006 Aug 10
6
passing hash from controller to view and pluralization?
hi, i have 2 tables (counties and towns). counties has_many towns and towns belong_to counties. now my question: i thought i would need to do is say @counties = Counties.find(:all). should that not return to me all counties in the counties table WITH all towns associated with each county? in my view i was getting error when doing this if(counties.has_towns?) saying undefined has_towns
2006 Aug 01
0
how do i pass/save a selected param ID to different views?
hi, i have a link called ''family doctor''. when the user presses the ''family doctor'' link, it goes through town''s DB and searches in which towns where there is a family doctor. after this is done, the view displays all the towns with the total number of ''family doctors'' in each town. next i want the user to select the town that
2008 Sep 02
1
question about GLM
Hello R-users, I do not have much knowledge about generalized linear models therefore my question maybe quite stupid. I have data from 20 towns with their population and number of people with an illness from those towns. I would like to use glm function in R so I can calculate proportions of ill people (and later on produce confidence intervals). I also want to compare those with original
2001 Sep 10
1
data format for ppinit
After installation of R into VineLinux2.1.5, I started to enjoy statistics following some instruction, and found it very useful. One of my main purpose to use R is to try spatial statistics. Since library named "spatial" has already installed, I just tried ... > library(spatial) > towns <- ppinit(test.dat) ------- test.dat ------- x,y 4,7 5,7 5,8 5,9 6,7 6,8 6,9 7,8
2011 Jul 07
2
UNZ FM TOWNS Emulator not reading discs
Hello all, I've got Unz (FM Towns emulator) running under wine but its not capable of reading the original FM Towns CDROM images on my Mac. I have it working under Windows XP using Daemon Tools to mount the ISO but under OSX it does not work. I have the ISO mounted under finder and have pointed my wine configuration to the mount point. No luck. Has anyone successfully got this running under
2009 Jun 20
2
Special characters in Rd example section will cause errors
Hi (Duncan?), The other day I noticed some characters will cause errors in R CMD CHECK because of parse_Rd(), and AFAIK, these chars include '%', '{' and '}'. For example, note the comments in the example section: %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~% \name{testfun} \Rdversion{1.1} \alias{testfun} \title{ A Test } \description{ A test } \usage{ testfun() } \value{ NULL }
2004 Aug 20
1
Survey analysis of repeated relationships?
I just discovered the great piece of software that is available with the survey package. Many thanks and 'Hats off' to Thomas Lumley. While package survey covers analysis of features of objects sampled (in clusters, strata) I could not find analysis of features of repeated relationsships between sampled objects (in clusters, strata). My understanding is that it is not adequate to treat
2006 Aug 12
10
adding extra variable to a class, how to access it?
somple question here but pretty confusing on my side. i have a model towns that is mapped to my towns table. can i add an extra variable to the class and access it in my view? basicall what i am trying to do is return a list of towns, and next to each town, display a total number of what i have in each town. ive tried both attr_reader and @total but no avail. here is my view <% for
2003 Jul 16
2
Weighted SUR, 2SLS regressions
Is there an option for running SUR and 2SLS regressions with weighting (I am analysing mortality in towns, hence want to weight by population size) Many thanks Jon Anson -- Yonathan (Jon) Anson Department of Social Work Ben Gurion University of the Negev 84105 Be'er Sheva, Israel. Tel: +972 8 647 93 14(w) +972 8 6489286 (h) 067 233279 (m) Fax: +972 8 647 29 33
2011 Jan 01
2
Problem with uploading library
Hello. I'm new on that forum, so I would use some help... I'm programing with R program, have some exercise to do. So here it goes. 1. I have to upload two libraryes "sp" and "maptools" 2. This command is troubling me : towns <- readShapeSpatial("OB/OB.shp") 3. When I'm pressing f5, there is an error called: Error: could not find function