similar to: magic disappearing parameters

Displaying 20 results from an estimated 7000 matches similar to: "magic disappearing parameters"

2006 Jun 10
2
readline problems
I get the following error: rake test_units --trace ** Invoke test_units (first_time) ** Invoke test:units (first_time) ** Invoke db:test:prepare (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:test:prepare ** Invoke db:test:clone (first_time) ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Execute db:test:clone **
2013 Nov 29
1
How to catch warnings sent by arguments of s4 methods ?
Hello, I apologized if this had already been addressed, and I also submitted this problem on SO: http://stackoverflow.com/questions/20268021/how-to-catch-warnings-sent-during-s4-method-selection Example code: setGeneric('my_method', function(x) standardGeneric('my_method') ) setMethod('my_method', 'ANY', function(x) invisible())
2014 Jul 17
3
FW: Selección eficiente de individuos
Hola, Otra forma, utilizando la función de intervalos y la que comprueba si otro intervalo se solapa del paquete "lubridate": #---------------------- library(lubridate) fe.chas <- data.frame( entra=c('2001-01-01','2001-06-01','2003-01-01') ,sale=c('2002-01-01','2002-06-01','2004-01-01') ) ref <-
2008 Apr 04
5
First call to worker method doesn''t work
I have a worker as follows: class SampleWorker < BackgrounDRb::MetaWorker set_worker_name :sample_worker def create(args = nil) # this method is called, when worker is loaded for the first time end def my_method # Deliver test e-mail message Notifications.deliver_message(1, "DM") end end I have a rails controller that calls the following code: worker =
2005 Sep 27
2
No Custom Validation
Hi, Correct me if I am wrong but there doesn''t seem to be an easy way to add validation outside the pre-built ones (validates_presence_of, validates_lenght_of, etc.). Ideally there should be something like: Class Person < ActiveRecord::Base validates :my_method, :on => create, :message => ''was not valid'' def my_method(param) false unless
2003 Mar 24
2
Problem with the step() function
Dear all, I'm having some problems with using the step() function inside another function. I think it is an environment problem but I do not know how to overcome it. Any suggestions are appreciated. I've prepared a simple example to illustrate my problem: > library(MASS) > data(Boston) > my.fun <- function(dataset) { + l <- lm(medv ~ .,data=dataset) + final.l <-
2007 Jul 16
4
Set the return value to "same as block"
It would be good to be able to set the return value to be the same as the return value of the block. I am trying to test opening a file in a block and reading from it. It would be nice to use code like this: object.stubs(:open).with("/path/to/file", "r").yields( stub(:read => "The file contents") ).returns(from_block) Which would make open() take the return
2010 Feb 25
2
error using pvcm() on unbalanced panel data
Dear all I am trying to fit Variable Coefficients Models on Unbalanced Panel Data. I managed to fit such models on balanced panel data (the example from the "plm" vignette), but I failed to do so on my real, unbalanced panel data. I can reproduce the error on a modified example from the vignette: > require(plm) > data("Hedonic") > Hed <- pvcm(mv ~ crim + zn + indus
2006 Apr 14
8
Error with Web Service tests after upgrading to Rails 1.1.2
Hello. I hope this is the right place to describe my problem ? After upgrading to Rails version 1.1.2 from rails version 1.0.0, Web Service functional tests seem broken. I upgraded rails (as the root user / administrator) with: # gem update rails --include-dependencies then I upgraded my application (as myself) with: ? rake rails:update % rake rails:update:configs After these steps,
2006 Jun 19
1
AJAX - Image output to an IMG tag ?
Hi, I''m using the "link_to_remote" AJAX function call from my "view", and what i want is after i get the results from the function call, I want to update the result directly into to an image ie. <IMG> tag, how to do this.?? ie. if we want to update the result into a ''div'' element we do like this, which works fine.. link_to_remote(:update
2006 Aug 15
3
update or alter cart
I want to modify and update the items in the Depot - "display_cart". Since the cart is in a session, its a little hard to get at the data. I just want to create a way to change quantities, prices and recalculate. Has someone done this, and could you point me to the right direction. Thanks Chas -- Posted via http://www.ruby-forum.com/.
2006 Aug 12
5
Simple Newbie db ???
I''m trying to simply write to a mysql db from the console. Model = Entry , table = entries Problem is my values keep getting turned into instance variables and end up nil. >> Entry.create(:title =>"new title", :body => "Brand new body") => #<Entry:0x27178c4 @attributes={"body"=>nil, "title"=>nil, "id"=>6},
2006 Jun 14
0
problems with acts_as_tree
I have a class called Organization that is organized as a tree (organizations have parent organizations) using a parent_id column and an organizations_count column. I used the generate scaffold method to create the controller and views. But when I go to add or update an Organization, there is no select box to select the parent Organization. I am surprised that the scaffold generator
2005 Jul 22
3
testing application_helper.rb
I am trying to run some functional (or are they unit?) tests on my application_helper.rb. So far, I''ve not had any success in being able to call the methods defined in application_helper.rb. Here is my app/test/functional/helpers.rb require File.dirname(__FILE__) + ''/../test_helper'' require File.dirname(__FILE__) +
2006 Jun 07
8
erb Regex ?
Hi Got a column named ''sku'' in a table named ''product'' <%= product.sku %> ...looks like this.... ''1234_56'' These last two chars (56) are an audio Track number. I ultimately want to display: Track <%= product.sku %> I can isolate the first part with /\d+\_/ = 1234_ But can''t figure out how to get the last two
2006 Mar 16
1
application_helper.rb vs application.rb
I find that I want to put the same methods into both of these files. Whats the best way to get away with a single implemenation? Gareth -- Posted via http://www.ruby-forum.com/.
2006 Mar 04
2
application_helper can "include" another helper ?
My "application_helper.rb" become to large. I have basic functions that I use for all projects. Is it possible to define thoses functions inside an external "basic_helper.rb" and include it in "application_helper.rb" ?
2008 May 20
2
DateHelpers .. don' display.. ?
HI I don''t understand what happen .. if I use the script/console : >> include ActionView::Helpers::DateHelper => Object >> include GLoc => Object >> time_ago_in_words(Time.now, include_seconds = false) => "moins d''une minute" I get the correct answer.. but I I write in my view <%= time_ago_in_words(Time.now, include_seconds = false)
2006 Nov 27
2
ActionMailer & application_helper.rb
Hi, I''m trying to send some emails with the same formatting as my pages & I can''t seem to access my display routines in application_helper.rb. I''m trying a hack to bypass this. At the top of my ActionMailer notifier script I''ve included application_helper.rb - my understanding is that this should arrive as a module and should be able to be used
2008 Mar 16
2
CentOS 5.1 single (server) CD ??
Hi, Any chance of a CentOS 5.1 single server CD similiar to the one for 4.4? That CD wa very useful for 90% of the instals that I've been doing and whatever extras were needed were eaily added through Yum. Chas. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.