similar to: can''t convert true into integer

Displaying 20 results from an estimated 3000 matches similar to: "can''t convert true into integer"

2006 Jul 11
7
Rails associations: Easy Question requires dumb answer
***Scroll down to see the dumb quick question*** I have two Models: class Template < ActiveRecord::Base end which has this migration: /snip t.column :name, :string And the other model: class Product < ActiveRecord::Base has_one :template end with the migration: /snip t.column :qty, :integer, :default => 0 t.column :specialDescription, :string t.column
2006 Mar 17
1
How to update values in database in this form?
Hi, This is my rHtml page & Corresponding actions & model pages:- ===listform.rHtml================= <h1>Products List</h1> <%= start_form_tag(:action => "add_to_cart")%> <table> <tr> <% i=0 %> <th> Product No. </th> <th> Unit Price </th> <th> Available Qty. </th> <th> Demand Qty. </th>
2006 Dec 07
2
Problem saving parent and children using belongs_to, class_name, and foreign_key
Hi, I have a real simple association setup here that''s just trying to: - Create a new PayjunctionOrder - Create some LineItem objects and assign them to the PayjunctionOrder - Save everything I''m using Rails Edge. ---- class PayjunctionOrder < ActiveRecord::Base has_many :line_items end ------------------ ---- class LineItem < ActiveRecord::Base belongs_to :order,
2011 May 27
1
Unable to Plot using headers.
Hello List! Thank you for your input so far. I have successfully imported my data into R but have hit a snag in plotting. Simple plot commands are unable to find my headers when I try and plot my data on an x/y scatter. My data is a 2 column 8000 row table (saved as .txt file) imported into R. >demand=read.delim("C:\\Documents and Settings\\E066582\\My
2006 Apr 11
2
Extending Depot Example
Hi I am new to the whole Rails/Ruby world as having come from a MS .NET background, but I have followed the Depot example in the Agile Web Dev. with Rails book with relative ease. However as an exercise to see how much I had understood, I thought I would attempt to modify the example a bit and add a Quantity field to the store index so as to pass that value into the cart. I have extended the
2012 Dec 03
1
qr.qy and qr.qty give an error message when y is integer and LAPACK=TRUE
With this example set.seed(123) A <- matrix(runif(40), nrow = 8) y <- 1:nrow(A) A.laqr <- qr(A, LAPACK=TRUE) both qr.qy(A.laqr,y) and qr.qty(A.laqr,y) give the respective error messages Error in qr.qy(A.laqr, y) : 'b' must be a numeric matrix Error in qr.qty(A.laqr, y) : 'b' must be a numeric matrix However when Lapack is not used as in A.liqr <- qr(A,
2001 Mar 22
1
lazy evaluation and DUP=F
I am having some difficulty understanding the implication of lazy evaluation mixed with DUP=F in a .Fortran call. In qr.qty from base DUP is not used as an argument so defaults to T. I am calling qr.qty with a very large array and would like to set DUP=F in the .Fortran call so that qr.qty would be defined as copied below. Is there some risk that a variable used as the argument in the original
2009 May 27
4
Sale, pop and product
Hi, I couldn''t find a better word for pop, but let''s go: There are 3 models: sale, pop and product sale: -total:integer pop: -quantity:integer -discount:float product: -name:string -price:float A sale can have many different products, each one has a quantity and discount associated. So each sale has_many :products through => pops And each product has_many :sales
2011 May 27
1
FW: FW: Unable to Plot using headers (converting to Numeric)
I tried command as.numeric(Qty) #converting column"Qty" in object "demand" to numeric. However it remains a non-numeric value. What is the best way to convert a column of data to a numeric value in R? What is the best way to convert dates into a numeric format (or some format able to be used in an x,y scatter) while still maintaining its inherent "date" property?
2011 May 27
1
FW: Unable to Plot using headers.
-----Original Message----- From: Struckmeier, Nathanael Sent: Friday, May 27, 2011 1:39 PM To: 'stephen's mailinglist account' Subject: RE: [R] Unable to Plot using headers. Thanks for the input. Despite both graphing directly and with "attach" I am still getting a screwed up graphical output as well as an error. My table is object "demand" w/ columns Date and
2006 Jul 13
1
error_messages_for
I can''t seem to figure out how to validate a few fields some1 please help me out model--------- class Record < ActiveRecord::Base validates_presence_of :sw, :flex end controller------------ class RecordController < A;;icationController def new @record = Rrecord.new @product = Product.find(params[''product_id'']) end def create
2006 May 04
2
Building a FAQ
I''m new in Rails, and I''m building my first application. I''m trying to make a FAQ for this application, organized by product (questions about each product) and category (questions of different categories or topics), and there is something I can''t figure it out how to do. I have these tables: create_table "faqs" do |t| t.column "question",
2006 Apr 07
3
RJS removing content of div, but not div itself
Hi, I''m creating a list of ingredients on a page. When the user clicks the ''Add Ingredient'' button a record gets added to the db and the ingredient gets added to the page. On the page, each record is represented by a <div> with three <span>s inside. One of the <span>s has a link_to_remote to ''delete'' the ingredient. When the link
2012 Aug 20
1
function case in sqldf (datas from oracle) with a null value
I use sqldf to join 2 dataframes from 2 distinct databases : a and b come from old sqldf's. sqldf("select a.*, b.*, case a.QTY when null then b.QTY else a.QTY end as NEW_QTY" from a inner join b on a.OBJECT=b.OBJECT") R doesn't understand "when null". I tried with "when NA", "when '' ", "when ' ' " but it doesn't
2009 Feb 18
3
wrong number of arguments (1 for 0)
Hello, I am new to ruby on rails. When I tried to create a session I am getting an error, ''wrong number of arguments (1 for 0)'', in my controller. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ArgumentError in CustomerController#add_to_cart wrong number of arguments (1 for 0) RAILS_ROOT: /project/bob_shopping Application Trace | Framework Trace | Full
2007 May 15
2
QR Decompositon and qr.qty
Dear R people, I do not have much knowledge about linear algebra but currently I need to understand what the function qr.qty is actually doing. The documentation states that it calculates t(Q) %*% y via a previously performed QR matrix decomposition. In order to do that, I tried following basic example: m<-matrix(c(1,0,0,0,1,0,0,0,1,0,0,1),ncol=3) # 4x3 matrix
2006 Jan 05
2
Agile Depot Tutorial Help
anyone can explain me why in the Agile Depot Tutorial application they use i.product_id to find if a product already exist in the cart, because the cart contains items, each of them references a product. I tried i.product_id like in the tutorial and i.product.i all of these 2 notation works , but i find the second seems more clean??? isn''t it. Any explanation will be fine Regards
2005 Dec 20
1
nls problem
Hi list, I tried to use nls to do some nonlinear least square fitting on my data with 340 observations and 10 variables, but as I called nls() function, I got this error message: Error in qr.qty(QR, resid) : 'qr' and 'y' must have the same number of rows Then I traced back a little bit into nls() function, the error seemed to happen when calling nlsiter() internal function, but
2006 Jan 15
6
Saving one-many associations (elegant solution please)
What is the most elegant way to save new one-many associations? order = Order.new(:name => "My Order") order.line_items << LineItem.new(:product_id => 1, :quantity => 2) order.line_items << LineItem.new(:product_id => 2, :quantity => 5) order.save The above - which is by far the most elegant way of putting it - doesn''t work for me - the line_items
2010 Jun 23
2
Analyzing large transition matrix
Let's say you have a dataframe of car trade-ins. For example, each row contains oldcar newcar qty and a typical entry could be lexus bmw 1 I put the qty column to allow for fleet purchases, where one purchase may convert multiple cars at once. I'd like to show what's going on. I could do a histogram of newcar to show the frequency each type of car is bought. If there