similar to: Weird Problem - probably a noob mistake

Displaying 20 results from an estimated 2000 matches similar to: "Weird Problem - probably a noob mistake"

2006 Apr 21
4
Dynamic Menu
Hi, I think I''m doing this the right way, but can''t get it going. I''m building a menu from the values in a mySQL table, and want to build it on the fly. This is something that should be working but only works halfway: <% @pages = Page.find(:all, :conditions => [''site_id = 4'']) %> <% @pages.each do |p| %> xyz <%p.id%> <%
2006 Apr 14
3
Many to Many
Hi, I have three tables, a domain of Sites, a domain of Users, and a junction of Sites_Users with the tables named as such. My RoR application has a model and controller both User and Site. I tried to add a controller and model named Site_User but I can''t reference any functions in the controller, I get an Uninitialized Constant error. I''m very new to RoR, but not to
2005 Nov 25
2
acts_as_list with 2 fields in the scope
Hi Railers, I''ve got a Categories table. I want it to act as a list within the scope of the parent_id AND the site_id. Categories table : id label site_id parent_id So, in my Category class, I have : acts_as_list :scope => ''site_id = #{site_id} AND parent_id = # {parent_id}'' The problem is that when I try to move_up a Category with a parent_id that is null,
2008 Oct 16
1
merge/combine data
Hi, I have the following data imported from a csv file user_id site_id name 1 1 11 februari 2 1 11 redbook 3 1 11 tips 7 3 6 sleep 8 3 6 monitoring 9 3 6 alarm Which I would like to merge/combine into user_id site_id name 1 1 11 februari,
2005 Jul 12
4
Calculation of group summaries
I know R has a steep learning curve, but from where I stand the slope looks like a sheer cliff. I'm pawing through the available docs and have come across examples which come close to what I want but are proving difficult for me to modify for my use. Calculating simple group means is fairly straight forward: data(PlantGrowth) attach(PlantGrowth) stack(mean(unstack(PlantGrowth)))
2010 Feb 20
1
Contingency Table - output to odfWeave not working for matrix
Hi guys I'm hoping someone can help me with this. It should be easy but it seems to get stuck for no obvious reason! I am trying to set a report up in odfWeave so that we can re-run the same analysis at 3 time points as the data matures and provide an 'instant' report. To simplify the situation we have two pieces of data: site_id (numerical value 1-9) and reaction (categorical Y or
2006 May 08
2
Noob Question - Variable Scope
I feel awful asking such a basic question, but here it goes.... I have a controller, "NewsController". The user enters and the "list" action is called and I populate an instance variable "@news" which contains all the elements I''d like to display using a form. The user then changes something and the "update" action is called. Is
2006 Apr 11
15
Migrating rails 1.0 app to 1.1 - Noob question
Hi all, I''ve upgraded my system to Rails 1.1.1 successfully. After much looking I haven''t found out how to migrate an existing application to a new rails version though. What is the procedure, if any, for upgrading the application I''ve developed in 1.0? Is there a script I need to run? -- Posted via http://www.ruby-forum.com/.
2006 Oct 27
1
has_many with nullable foreign_key?
Is there a way to use has_many and have it operate like such? select * from pages where site_id = #{id} or site_id is null I know there''s finder_sql, but then I''ll lose the find_in_collection goodness. Thanks, Joe -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2017 Jun 12
0
plotting gamm results in lattice
Hi Maria If you have problems just start with a small model with predictions and then plot with xyplot the same applies to xyplot Try library(gamm4) spring <- dget(file = "G:/1/example.txt") str(spring) 'data.frame': 11744 obs. of 11 variables: $ WATERBODY_ID : Factor w/ 1994 levels "GB102021072830",..: 1 1 2 2 2 3 3 3 4 4 ... $ SITE_ID
2006 Apr 27
2
Noob Design Question
I have chunk of data that I need for the life of the session. I am going to use it for selects through out my app. Is the best place to keep this data in the session? Is the session easily spoofed or cracked? While viewing the data is not critical in itself, spoofing it could cause me massive headaches. -- Posted via http://www.ruby-forum.com/.
2006 May 11
18
Object constructors - Noob Question
Hi: Sorry if this is a painfully stupid question... I have some data I need through the life of someone''s session. In the application controller, I grab the data and store it like so: session[:foo] = @foo Now, whenever I need to access data about foo I don''t need to cause any DB io, I can just grab foo from the session (it''s very small fyi). Here''s what I
2009 Jan 22
2
time date stamp since, january 1st 1970
Hello, we are receiving some data, sample below - with a weird time/date stamp format, we need some help with R on converting this time date stamp to a useable field in R, date and time in a data-frame. The developer says its the number of milliseconds since midnight, January 1, 1970. sample: *1232558018624* --------------------- How do I interpret the time stamp? Is there a date, i need
2017 Jun 12
2
plotting gamm results in lattice
Dear all,? I hope that you can help me on this. I have been struggling to figure this out but I haven't found any solution. I am running a generalised mixed effect model, gamm4, for an ecology project. Below is the code for the model: model<-gamm4(LIFE.OE_spring~s(Q95, by=super.end.group)+Year+Hms_Rsctned+Hms_Poaching+X.broadleaved_woodland? ? ? ? ? ? ?+X.urban.suburban+X.CapWks,
2012 Nov 02
1
[Rails 3.2.8] issue in regex scan
running a scan in irb is fine : 1.9.3p194 :001 > request_url = "http://lvh.me::3000/en/backoffice/cms-admin/site/6/pages" => "http://lvh.me::3000/en/backoffice/cms-admin/site/6/pages" request_url.scan(/^([\S]+)(backoffice\/cms-admin\/site\/)(\d+)(\/pages)$/)[0][2] => "6" however running it in my controller doesn''t gives any result : (rdb:1)
2010 Jan 20
0
putting labels back on a matrix.
I did not post this question to the ecology list, even though it is about an analysis using Vegan, since my question is based more on basic data manipulation in R. I think this is a fairly simple question but for the life of me I cannot find a reference for in the archives. I have an analysis using a matrix in which I needed to strip the ID variable off the input data to run the analysis. Now I
2010 Sep 06
1
PostScript/PDF graphics with another font
I am using the standard phonetic font "Doulos SIL" in a graph (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=DoulosSILfont) This is an example: windowsFonts(IPA="TT Doulos SIL") barplot(c(1,2,3,4,5),names=c("\u{0251}","\u{0252}","\u{0253}","\u{0254}","\u{0255}"),family="IPA") However, I am unable
2011 Aug 30
3
Descriptive Stats from Data Frame
I don't find how to do what I need to do in Dalgaard or 'R Cookbook', so I'm asking here. I have a data frame with water chemistry data and I want to start exploring these data. There are three factors (site, date, chemical) associated with each measurement. The data frame looks like this: > summary(chemdata) site_id.sample_date.param.quant
2006 May 10
4
Single Table Inheritance problem
I have two tables I am using single table inheritance with: Page and Item. "Page" has many "Items"; "Item" belongs to "Page". Item Model: class Item < ActiveRecord::Base end class Article < Item belongs_to :page end Page Model: class Page < ActiveRecord::Base end class Issue < Page has_many :articles end In my controller, when I
2006 Jul 29
0
Accessing vars within helpers in Markaby
I''ve been trying to figure out how to do this: select_tag ''site_id'', @helpers.options_from_collection_for_select(Site.find(:all, :order=>''name''), ''id'', ''name'', @site_id) The select_tag gets output fine, but the default value isn''t set. @site_id is set in the controller (@site_id = cookies[:site_id]). In