Displaying 20 results from an estimated 10000 matches similar to: "One-way change"
2007 Apr 20
2
cat() to STDERR
Dear R wizards---I read Brian Ripley's post from 2004 which said that
it was not possible to print to STDERR. Alas, I have more modest
needs. I was wondering if it was possible to just send a string to
STDERR with cat() while in CMD BATCH mode.
Is it not possible to open STDERR in R? (Or does R use STDERR for
itself and redirect it into the output stream?)
This would be on a standard Unix
2006 Mar 23
6
[mongrel] [fedora5] install error " can''t find ruby libs"
Installed Fedora5.
Installed Ruby 1.8.4.
Installed rubygems.
Installed rails.
Created test app to verify that ruby and rails were working.
When I attempted to install mongrel via:
sudo gem install mongrel
I get this error:
Install required dependency daemons? [Yn] y
Install required dependency gem_plugin? [Yn] y
Building native extensions. This could take a while...
can''t find
2006 Mar 21
2
Sorting by computed temporary field
Hey all,
I''m rather new to Ruby and Rails (and not great with SQL), but I''m
developing a ride sharing app and would like to be able to sort on
something I don''t have stored.
I have users, events, and rides, each of which has a zip code. Events
have_many rides, and rides belong_to events.
When an event is selected, I''d like to be able to show a list of
2007 May 23
6
RESTful RESOURCE PARTIAL UPDATE
I have modified scaffolding code slightly to get three edit actions
and three update actions.
The requirement: to allow users to edit attributes for the same model
from seperate forms instead of one form, while using the given
scaffolding code and performing model validations. I am using
restful_authentication with the login email password validations
defined.
class users_controller
2006 Apr 14
1
Validating Existing Models
I''ve got a user object which has quite a few attributes mapped to the
database. As of right now I''ve got some validations in the model like:
validates_presence_of :password, :message => "You must specify a valid
password."
validates_confirmation_of :password, :message => "Password doesn''t match
the confirmation."
validates_presence_of
2006 Mar 13
3
validates_associated problem
Hello,
I have a situation where an ''employee'' belongs to a ''department'' and
have setup the relationship as follows.
class Employee < ActiveRecord::Base
belongs_to :department, :foregin_key => "department_id"
validates_associated :department_id
end
class Department < ActiveRecord::Base
has_many :employees
def validate_on_update
2006 Jan 19
2
Easy way to handle form input without a model class?
I have a couple forms that I''d like to be able to validate and
automatically populate, but it shouldn''t be based on AR. In fact I
often have a bunch of small forms that I can''t really justify writing
a whole new model class for anyway. I''d like to validate the form
input, and then use rails helpers to automatically populate the form
if validations fail.
2011 Aug 24
3
Efficient way to Calculate the squared distances for a set of vectors to a fixed vector
I am pretty new to R. So this may be an easy question for most of you.
?
I would like to calculate the squared distances of a large set (let's say 20000) of vectors (let's say dimension of 5) to a fixed vector.
?
Say I have a data frame MY_VECTORS with 20000 rows and 5 columns, and one 5x1 vector y. I would like to efficiently calculate the squared distances?between each of the 20000
2008 Jan 06
2
[LLVMdev] trouble with getelementptr
Hello,
I have next code:
;begin
; ModuleID = 'sample.lz'
@.str1 = internal constant [20 x i8] c"\22hello, cruel
world\22" ; <[20 x i8]*> [#uses=1]
@.str4 = internal constant [9 x i8] c"\22hello, \22" ; <[9 x
i8]*> [#uses=1]
@.str7 = internal constant [7 x i8] c"\22heya!\22" ; <[7 x
i8]*> [#uses=1]
2006 Apr 12
2
Problems doing addition/subtraction with floats
Ok, I am sure this is a simplistic problem that I am just missing right now
(maybe eyes are crossed??).
However, I am trying to do simply math here.
I have these variables initialized as follows:
@amount_due = @amount_paid = @total_due = 0.0
I get @total_due and it is set to 1739.6 from the database.
I then get @amount_paid and it is set to 1739.6 from the database.
I then calculate the
2006 Dec 07
2
validate_on_destroy ?
What''s the best way to validate_on_destroy. Rails only seems to include
validate_on_create and validate_on_update methods. I don''t want to
resort to doing:
before_destroy do |j|
raise "There is an error" if j.etc
end
Is there a way of finding out what action (create/update/destroy) is
being performed if I use the ''validate'' method?
--
Posted via
2007 Apr 16
4
You disappear for five weeks...
And someone goes and redesigns the look and operation of the Trac. Quite
noice, but a couple of comments:
* The main toolbar ("Wiki", "Documentation", "Timeline") ends up under the
puppet logo on the left hand side, which is a pest.
* I can''t click on any link, text box, or button in the main part of the
page. All of the navigation links work fine, and I
2008 Apr 15
6
[LLVMdev] PATCH: Use size reduction -- wave2
Hi All,
here comes the patch for the second wave of Use class size reduction.
I have included all the machinery that is needed, and it is
*active*. The User* inside of Use is even sometimes NULL,
but the algorithm is able to recover it.
If there is a non-null User* present, then I am
asserting that it equals the computed value.
I did not receive feedback for the algorithmic part yet,
so I
2006 Feb 03
2
validation only on a specific action
Hello again!
I have a action that lists users and that allows an admin user to create
new users. When the admin user creates a new user an e-mail is sent to
the created user telling him to register in the site. I want to validate
the user name and password only when the user register and not when the
admin user creates it. Can anyone tell me how to do this?
Thanks.
Best regards,
Hugo
--
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
2008 Sep 27
3
Troubleshooting one-way voice... how to peek into SIP RTP?
I've got the following situation. I'm running Asterisk 1.4.18 on a
firewall/gateway machine, with some SPA-942 (f/w 5.1.15(a)) phones
behind it.
I'm peering SIP with a Coppercom switch sitting behind an SBC.
On outbound calls, I get 2-way voice, no worries.
On inbound calls, I get one-way voice (I can hear the caller but they
can't hear me).
I've looked at tcpdumps of
2005 Aug 03
2
Question driving external LCD from dell laptop
I have a dell inspiron 8200 laptop running centos 4.1 just fine.
I want to connect it to an external 32 inch LCD. This laptop is dual
boot windows.
I set windows up to 1024x768 and connected the LCD - it worked just
fine. LCD max is 1333x768
I then booted Centos 4.1 and set X to be 1024x768 also. rebooted the
laptop just ot make sure.
I then connected the LCD and it says can't display
2024 Jan 30
2
Basic astronomy package recommendation wanted.
On Tue, 30 Jan 2024, Richard O'Keefe writes:
> Given
> - UTC timestamp
> - a location (latitude,longitude,elevation)
> I want to know
> - the sun angles
> - the moon angles
> - the phase of the moon.
> I looked on CRAN for astronomy, but didn't notice anything that seems
> to offer what I want. I could try coding these functions myself, but
> "if
2017 Jul 01
1
Packages for Learning Algorithm Independent Branch and Bound for Feature Selection
See, I have built my own genetic algorithm already and tested it on this
problem. I have a solution, but due to the heuristic nature of GA, I cannot
guarantee that it is the optimal subset.
If I was simply doing this for a company project, you are spot on with the
type of algorithm I would use, but I am doing this for a scientific paper.
I need to be able to find the optimal subset over my
2003 Oct 10
6
one-way audio
Im experiencing a problem with a current setup and I've run out of ways to
debug it and come to a resolution.
I have two E100P's in a machine which is routing traffic over the internet
to a machine that has 1 E400P connected to the PSTN. Clients are able to
make calls successfully but when the call is connected experience one-way
audio. They cannot hear anything said by the person