similar to: Randomised variables from sql

Displaying 20 results from an estimated 3000 matches similar to: "Randomised variables from sql"

2007 Jan 16
2
Links in view specs
Hi I have this simple view (used by the Gap controller): <h1>Gap#index</h1> <%= link_to "Get a GAP quote", :action => "get_quote" %> And this spec: context "A rendered gap/index" do setup do render ''gap/index'' end specify "should have a link to the get_quote page" do
2007 Jun 26
4
Fake SSL in specs when using ssl_requirement plug-in
Hi I''ve used the ssl_required line from the ssl_requirement plug-in at the start of a controller for SSL. Its implemented as redirects so I can spec this... describe "GET /gap/get_qote" do controller_name :gap it "should redirect to the HTTPS version of the action" do get ''get_quote'', :id => "finance"
2009 Jun 04
4
order() with randomised order in ties?
Hi I want to use order() to get the order of a vector. But I would need a different behavior when ties occur: similar to the parameter ties.method = "random" in the rank() function, I would need to randomise the ties. Is this possible? Example: x <- rep(1:10, 2) order(x) [1] 1 11 2 12 3 13 4 14 5 15 6 16 7 17 8 18 9 19 10 20 order(x) [1] 1 11 2 12 3 13 4 14 5 15
2006 Feb 01
1
Randomised Block Design
Hi, I'm studying math, and i have to make an analysys using Randomised Block Design. I have two factors, i know how to do this in Statistica, but how to do this in R, i read some manuals but the only thing that i have found was 2 factor ANOVA. Please could someone help me, or give some usefull links ?? Krzytsztof Suwada
2007 Jun 09
1
Blosxom + Markdown problem: randomised email links break RSS, Atom
As described here, "Markdown will... perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots" on automatic email address links like <rwhe at ludism.org>. http://daringfireball.net/projects/markdown/syntax#autolink I have had a problem with my RSS feed for months, where certain entries would refresh every hour or
2005 Feb 09
6
randomisation
Dear useRs I am looking for a way to randomise the values within a matrix: the conditions are that the sums of the rows and the sums of the columns should remain the same as in the original matrix. Any help would be appreciated Cheers Yann
2006 Mar 13
4
undefined method `validates_presence_of'' for #<ProductsContr
Hi, I am trying to use method `validates_presence_of'' for validating my input fields on form . I m using it in my action class as follows:- ======================= validates_presence_of(params[:product][:quantity]) ====================== But when I am running my application i m getting error like:- ========================= undefined method `validates_presence_of'' for
2006 Nov 04
2
Possible to use attr_reader/writer in model?
I have some properties that I want setable externally, but readable only internally. I''ve played around with attr_writer (and attr_reader separately) but can''t figure out how to get either to work. I can do what I want using attr_accessor, or just straight out defining the prop setter method. Anybody know how to use attr_writer or attr_reader with a model? You da man, Joe
2006 Mar 19
4
Trouble with composed_of
I''m trying to use composed_of within my model. I have a field in my database named ''card1'', which is simply a string. I have this in my model class Player < ActiveRecord::Base composed_of :card1, :class_name => ''Card'' end class Card attr_reader :value, :suit def initialize(s) @value = s[0].chr @suit = s[1].chr end end The
2008 Feb 16
2
nil error?
Hi everyone, I''m sure I''m doing something stupid with this, so if somebody could talk some sense into me that would be great :) I''m trying to just increment a variable and I think I''m missing some basic concept (this is RoR 2.0.2 btw) So have a "players" table with several variables, including one called "odds". I''m using the
2007 Aug 30
3
Rails - depot application
I''m doing the depot example in the Agle Web development book. I''m getting this error: "undefined method `product'' for #<BigDecimal:331ce70,''0.21E1'',8(8)> " "Extracted source (around line #9): 8: for item in @items 9: product = item.product 10: -%> 11: <tr> 12: <td><%= item.product%></td>"
2009 Nov 27
2
attr_accessible & attr_accessor - what's the difference?
i''m still new to rails and working on digesting everything i come across. recently i came across these two. what is the difference between attr_accessor and attr_accessible? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Jan 15
4
form inputs resetting on sumbit
I searched for forum for something about this but couldn''t find anything. For example I have this in my view: (you enter start/end dates from dropdowns, pick a category and a report is generated.) <%= start_form_tag :action => ''display_report'' %> From: <%= date_select ''report'', ''date1'' %> <br /> To: <%=
2006 Apr 12
1
Dynamically updating list
hi every body. i am try to do example of agil books.dynamically updating list of chapter 18. 1)this is my code for controller---- class ListnoajaxController < ApplicationController def index @items = Item.find_recent end def add_item item = Item.new(params[:item_body]) render(:partial => "item", :object => item) end def item end end 2)the code for item class in app/model class
2006 Mar 15
7
rails on OS X 10.3.9 not working
Hello, I''ve installed Ruby 1.8.4 via Darwinports, installed gem 0.8.11 too and then installed Rails via gem. I''m using OS X 10.3.9. When I now type rails in the terminal, the following lines appear: # rails /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ active_support/values/time_zone.rb:12: undefined method `attr_reamer'' for TimeZone:Class
2006 May 26
9
What syntax is this? belongs_to :Person
so when I''m reading the pick axe book second edition I don''t see anything like the syntax you see people using in rails code. Specifically when you see. belongs_to :Person has_many :Phones etc these are methods on ActiveRecord right? Why is this invocation syntax never described in the Pick Axe book? I do see things like attr_reader :some_attribute etc but you
2006 Jun 24
4
setting attribute in constructor, .NEW works but not .CREATE
I have table "decks" with three fields: "id", "created_at" and "cards" which is a 264-character string field. I have modified the model with a constructor, as follows: class Deck < ActiveRecord::Base attr_reader :cards def initialize @cards = "12345" end end If I call Deck.new from my controller, I get no errors and an object with the
2005 Feb 15
0
[LLVMdev] Entry block (Randomisation)
Hello, In an attempt to randomise the basic blocks in a function, is it possible that I can randomise the entry block as well? And maybe insert some instructions in the pass to call entry block while running the program ? Is it feasible? What does entry block consist of ? Thanks Tanu --------------------------------- Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second
2006 Jul 24
1
Newbie error: undefined local variable or method
When I add an item to the shopping cart, I get an error: undefined local variable or method `cart_item'' for #<#<Class:0x3715a78>:0x3715a48> Session info says the cart being updated properly. I''m just not able to output two variables: <%= cart_item.quantity %> &times; <%= h(cart_item.title) %> I did some research, and I can grasp that local
2007 May 24
2
Missing RspecScaffoldGenerator
Just a quick note that I had to make the following change after installing 1.0.2 as rails plugins to get the resource generator working: Index: rspec_scaffold_generator.rb =================================================================== --- rspec_scaffold_generator.rb (revision 2022) +++ rspec_scaffold_generator.rb (working copy) @@ -1,4 +1,4 @@ -class RspecResourceGenerator <