similar to: creating hash table, how do i? please help

Displaying 20 results from an estimated 3000 matches similar to: "creating hash table, how do i? please help"

2006 Aug 04
1
how to count totals for each unique name in a table?
hello, i am having trouble on how to implement this. i have a table of doctor information where each doctor has a town and county field. i would like to create a view that shows the amount of doctor_types in each town. For example if the user selects the ''General Doctors'' search button, a view like this will show up. The next step would be for the user to select which
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
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 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
2004 Aug 04
2
2 sip servers
Good day all I have figured out most/basics of asterisk.I went with sip and made my own sip.conf and extensions.conf No I have 2 servers running sip in different towns.Both is connected with static ip so thats fine,but now. Lets say someone want to call someone else in the other town.How do I get asterisk to know,for instance sip extension 101 is on another sip server on a different ip. And I
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
2012 Oct 23
1
Extracting results from Google Search
Dear list, I have a long list of towns in Africa and would need to get their geographical coordinates. The Google query [/TownName Country coordinates/] works for most of the TownNames I have and give a nicely formatted Google output (try Ingall Niger coordinates for an example). I would like to launch a loop on the list of names I have and automatically extract the coordinates given by Google.
2013 Jan 26
2
Text mining
Hallo to everybody, I would like to perform an analysis but I don't know how to proceed and whether R packages are available for my purpose or not. Therefore I'm here to request your support. *The idea is the following:* I noticed that the names of the towns and villages in northern Italy most of the time sound differently from names of cities based on southern Italy. Just to give you an
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
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
2010 May 25
2
Get output values in a table
Hi, I use two similar scripts to put p-values of shapiro.test and, respectively, of wilcox.test in a table: a) d <- data.frame(dataset$GroupFactor, dataset[2:11]) # p-values for the shapiro test (by levels of GroupFactor) with(d, aggregate(d[,-1], list(d[,1]), FUN = function(x) shapiro.test(x)$p.value)) b) d <- data.frame(dataset$GroupFactor, dataset[2:11]) with(d, aggregate(d[,-1],
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
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
2006 Mar 11
0
Using :joins - How to help Rails populate a list of records from a complex join
Hi, Due to some performance issues, I want to use a custom query for a find method: def find_in_state(state) State.find :all, :limit => 10, :conditions => [''s.id = ? AND '' + ''s.id = c.state_id AND c.state_id = ? AND '' + ''c.id = col.county_id AND
2006 Jan 26
0
Bug with table_name_prefix?
Hi all, I think I have found a bug in ActiveRecord''s handling of eager loading when using table_name_prefix. Here is a reduction of the problem : class Cheese < ActiveRecord::Base ## ## id SERIAL ## name VARCHAR(32) ## county_id INTEGER ## belongs_to :county def self.table_name_prefix "stuff_" end end class County
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
2005 May 27
1
Fwd: Newbie here. Tips on setting up 100 phones wanted.
So in order to answer the background and backbone questions here is the system as it is. I hope this isn't too much for the list but I'll post it in response to a few inquiries. The current system is quite interesting. We have an office in a town that is about 50 miles from the ski area. The ski area is powered 100% of of generators and the telephone access and internet access goes from
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