similar to: Year cost optimisation

Displaying 20 results from an estimated 1000 matches similar to: "Year cost optimisation"

2006 Jul 15
0
Validate using boolean values
The Problem: how to do the validation. I have not written it correctly!!! Given two tables: sizes and prices; with a relation: has_many ,belongs_to a Price.unit_price for a given Size.meassure must be marked ''true'' as the standard unit_price for that meassure. There will be many other unit_prices for a given meassure, those must be marked ''false'' table
2006 Mar 01
2
active_record postgresql adapter problem
Instead of using numeric I created the field "unit_price" as PostgreSQL type money. Now when I try and add a row I get the following. How do I override AR default behaviour to cast numeric post data to money, or am I forced to only support database types that active_record knows about? RuntimeError: ERROR C42804 Mcolumn "unit_price" is of type money but expression is of
2006 Jan 06
3
Where to place a global function
Hi all, I have a little function called format_price(price) that simply formats the argument as a dollar sign, dollar amount, dot and penny amount. Then, in a .rhtml file, I could do this: <%= format_price(item.unit_price * item.quantity) %> But where do I put the format_price() function definition? The app couldn''t find it in app/controllers/application.rb. Where do I put it
2006 Apr 24
3
Form with multiple rows of content
I have looked at examples for this. I found a similar example in the Agile Web Dev... book but that didn''t help. Here''s what i am trying to do. A Cart has many line items. On the Display Cart page, I want to provide the user the option to update quantities. Here''s the rhtml code: <%= start_form_tag :action => ''update_cart'' %>
2010 Oct 13
5
Regular expression to find value between brackets
Hi, this should be an easy one, but I can't figure it out. I have a vector of tests, with their units between brackets (if they have units). eg tests <- c("pH", "Assay (%)", "Impurity A(%)", "content (mg/ml)") Now I would like to hava a function where I use a test as input, and which returns the units like: f <- function (x) sub("\\)",
2006 Jul 08
4
Hidden fields in forms
Please can someone show me the correct syntax for a hidden field in forms, this is my code <%= start_form_tag :action => ''create'' %> <div class="form1"> <table width="auto" boader="8" cellspacing="5" cellpadding="5"> <% hidden_field ''line_item'', ''client_id'', :value
2004 Oct 14
1
painfully slow uploads
I have several mail accounts, but collect all spam e-mail in the spam mailbox on one of them. After switching to dovecot (from imap-uw) I notice a very slow speed of bulk transfers and a very high CPU utilization by the dovecot's imap process during it -- sustained 62% of my server's Pentium2 @266MHz. Never saw such effects under imap-uw... My client is KMail (despite the awfull quality
2006 Aug 07
0
Re:
>From: Josh Kieschnick <jjkiesch@...> >Subject: Re: "Undefined method" problem in "Agile Web Development Wit >Newsgroups: gmane.comp.lang.ruby.rails >Date: 2006-03-22 04:39:56 GMT (19 weeks, 4 days, 23 hours and 8 minutes ago) >I am working through that book as well. I am getting the exact same >error. I thought it was something I did wrong but I have no
2006 Aug 14
1
NoMethodError
Hello, When i test this code <h1>contenu de votre panier</h1> <table> <% for item in @items product = item.product %> <tr> <td><%= item.quantity %></td> <td><%= h(product.title)%></td> <td align="right"><%=item.unit_price %></td> <td align="right"><%=item.unit_price * item.quantity
2006 Feb 22
0
Need help getting value from text_field_with_autocomplete
Good day. I have setup of a text field with auto complete and I need to grab the value from that text field and pass it into a method to update a row in a table. Here is the view: <tr> <td align="center" colspan="6"><%= text_field_with_auto_complete( :product, :product_code ) %></td> </tr> <tr> <td
2006 Feb 27
1
Odd problem in Agile tutorial
I am getting an undefined method error in my cart.rb class when trying to find in an array. I cannot see what my error is. Perhaps a view more eyes can help me with this: #--------------------------------------------------------------- 1 class Cart 2 3 attr_reader :items 4 attr_reader :total_price 5 6 def initialize 7 @items = [] 8
2007 Mar 01
4
How to read in this data format?
Hi, I recieved an ascii file, containing following information: $$ Experiment Number: $$ Associated Data: FUNCTION 1 Scan 1 Retention Time 0.017 399.8112 184 399.8742 0 399.9372 152 .... Scan 2 Retention Time 0.021 399.8112 181 399.8742 1 399.9372 153 ..... I would like to import this data in R into a dataframe, where there is a column time, the first numbers as column names, and the
2009 Mar 06
1
Extract dates from dataframe
Hi, I have the following dataframe: ID Dates 1 16-07-01 06-10-95 2 24/01/02 06-10-95 3 16/01/02 16/08/94 12/01/91 And I would like to extract the dates, but couple the ID's to the right dates, eg: ID Dates 1 16-07-01 1 06-10-95 2 24-01-02 2 .... I have no clue about how to get started, looks something for the
2010 Jul 15
3
Access web content from within R
Hi, I have to search in an online db for registered manufacturers of raw materials. Can I use R for the following: I have a list with monograph numbers eg: l <- c(198, 731,355) Now I want to make a dataframe, containing the monograph number and the information listed under COS: Certificate holder, certificate number, Status, Type Is this possible with R? kind regards Bart -- View this
2005 Dec 18
1
Fit non-lineair 3D Data
Hi, I have a problem with fitting a model: I made a dataframe with this data: a <- 1:3 b <- 1:3 c <- c(3, 2, 3, 2, 1, 2, 3, 2, 3) df <- expand.grid(a,b) df$result <- c names(df) <- c("A","B", "result") Although I can make a graph of the data: require(lattice) wireframe(result~A*B, data=df) I can't get a model to
2004 Apr 05
4
mpg123 issue and solution
All, I've been setting up an Asterisk PBX over the past few days and I stumbled across a problem with mpg123 that I have not seen documented anywhere. If you put mp3 files into your mohmp3 directory and these files have ID3v2 tags, mpg123 will throw an error message "Found new ID3 Header", regardless of the -q flag. This, in turn, will cause Asterisk to crash (yes), although
2013 Jan 24
4
sorting/grouping/classification problem?
Hi, I'm a database admin for a database which manage chromatographic results of products during stability studies. I use R for the reporting of the results in MS Word through R2wd. But now I think I need your help: suppose we have the following data frame: ID rrt Mnd Result 1 0.45 0 0.10 1 0.48 0 0.30 1 1.24 0 0.50 2 0.45 3 0.20 2 0.48 3 0.60 2 1.22 3 0.40 3
2006 Mar 22
1
How to retrieve attribute values of objects?????
Hi, I am writing following line in my code:- ================= @product1=Product.find(:all, :conditions => ["id = ? ", params[:product][''product_id''+count.to_s]]) print @product1.inspect =========================== So I am getting on console following output. ========================== [#<Product:0x3cd61c8 @attributes={"demand"=>nil,
2006 Aug 02
7
Same error ... again.
I reached page 82 of the Book "Agile Development with Rails" First Edition. After I compiled the code I got the following error message. [CODE] NoMethodError in Store#display_cart Showing app/views/store/display_cart.rhtml where line #11 raised: undefined method `product'' for 1099.0:Float 8: <table> 9: <% 10: for item in @items 11: product = item.product 12:
2007 May 09
1
Fitting model with response and day bias
Hi, I'm trying to fit a model which has a response bias, but also a day to day bias. If I try to simulate the data, I don't get the right values with optim, and also I can't use the function to give a prediction interval. My simulated data are: DF <- as.data.frame(cbind(x=rep(1:10,2),dag=rep(1:2,each=10))) bias <- c(-0.2,0.5) DF$y <- ((DF$x-0.1) * 5)+2 +