Displaying 20 results from an estimated 3000 matches similar to: "validation is giving me heartburn"
2014 May 22
1
qemu-kvm rebuild in Centos for oVirt in SIG Virt
Hi guys,
As we discussed in the last CentOS SIG Virt meeting below the steps that
we do to rebuild the qemu-kvm from http://vault.centos.org to enable the
rhev-features like live snapshot for CentOS.
1. Download the last qemu-kvm from
http://vault.centos.org/${version}/updates/Source/SPackages/
2. mock -D "${build_version}" -r epel-6-x86_64 --with=rhev-features
--rebuild
2009 Jan 13
1
[btrfs-progs 1/4] Add man/mkfs.btrfs.8.in
Add man/mkfs.btrfs.8.in
Kept the name with the name in, so that further processing such as
BUILD_DATE BUILD_VERSION etc. could be included later.
All man pages included in the man directory to avoid file cluttering.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.de>
---
man/mkfs.btrfs.8.in | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0
2006 Aug 10
5
Ampersand Heartburn
Greetings all.
I''m using the Microsoft "NorthWind Traders" database "orders" table as
test data for the Rico LiveGrid JavaScript.
The problem I''m noticing is that some of the records in the "ShipName"
field contain ampersands -- which for some reason are not being escaped
by Rails.
Rails does in fact automatically escape all of the other
2010 Mar 31
0
You are right and the problem is solved. Re: about the possible errors in Rgraphviz Package
Hi Gabor,
I just used your R code below and the code worked properly
without any error messages. Attached is the output graph, which
may be the one you expected.
library("Rgraphviz")
set.seed(123)
V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, 0.2)
g1
plot(g1)
Thanks.
Howard
On Wed Mar 31 11:18:25 EDT 2010, Gabor Grothendieck
<ggrothendieck at
2006 Jul 28
1
Nasty pitfall: don''t use ^ and $ in validation regexes!
Let''s say you want to validate that an attribute contains only 2-10
lowercase characters, e.g. with validates_format_of. The appropriate
regex is obviously /^[a-z]{2,10}$/, right?
Wrong! Try it with "abc\nANYTHING YOU LIKE" - this is perfectly valid.
On the second look the reason is clear: ^ matches the start of a line, $
matches the end of a line. So as long as one line in
2006 Jan 22
0
Validation on composed_of problem
I am having problems with this:
validates_presence_of :amount
validates_format_of :amount, :with => Money::PATTERN, :allow_nil =>
true
composed_of :amount, :class_name => Money, :mapping => [[:amount,
:to_s]]
The problem is when I use this field in a form, and the text is blank,
ActiveRecord gives me two errors:
"money is invalid"
"money
2008 Jan 27
2
conditional validation
Hi,
How can I validate user info under certain conditions? For example, I
just downloaded a plug-in that allows me to validate phone numbers,
but what I would like is to only validate the phone number if it is
not blank and if the user_type_id field is equal to one.
How can I achieve such a validation in my user model?
Thanks, - Dave
--~--~---------~--~----~------------~-------~--~----~
You
2012 Jan 19
0
Problem in testing with separate validation of :attachment_file_name
Using: RSpec, Shoulda, Paperclip (including matchers)
Example Model
class Example < ActiveRecord::Base
has_attached_file :attachment
validates_attachment_presence :attachment
validates_format_of :attachment_file_name, :with => /\.(png|jpe?g)$/
end
Example Test
require ''spec/helper''
describe Example do
it { should validate_attachment_presence(:attachment) }
2006 Nov 30
1
Rails validation - newbie
Hi,
Im getting the following error while attempting to apply valdiation to
email addresses on a form in my rails app:
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
Extracted source (around line #39):
36: <fieldset>
37: <legend>Feed subscriptions</legend>
38:
2006 Jun 23
0
Date class giving me errors
Whenever I try to use the Date class or its methods I get an error of
''ArgumentError'' and ''invalid date''. Even a call to Date.today gives
me the error. It works okay when I call it in irb and using the
''script/server'' script.
Any ideas?
-geoffrey
HydroMint
2011 Aug 11
1
Cv.glment question -- why giving me an error
Hi All,
I am trying to run cv.glmnet(x,y,family="multinomial", nfolds =4) and I only have 8 observations and the number of features I have is 1000, so my x matrix is 8 by 1000 and when I run the following, I get this error, I am not sure what is causing this problem.
Error in predmat[which, , seq(nlami)] = preds : number of items to replace is not a multiple of replacement length
Can
2009 Nov 23
3
3Com 3c940 moel only giving me 100 mb throughput to network switch
Hello all,
As the subject states, I have a 3Com 3c940 Ethernet card to a 1 gb network
switch. The switch detects it, but it only shows that it is giving me 100
mb/sec throughput. That card is rated for 1 GB...is there a way to force
it to try to use 1 GB/sec? System-config-network isn't helping me here.
Thanks for any help!
2010 Jun 07
3
Model validation giving problem
Hi,
I have a member registration form which takes a "Name", "Login",
"Password", "Confirm Password" and "Location". In the user model I have
added the validation
validate_uniqueness_of :login, validate_presence_of :password, :name,
:confirm_password.
When the member tries to register every thing working fine. I am using
same form for user to edit
2011 Oct 21
2
'Apply' giving me errors
So i have a simple function:
bmass=function(y){
weight=y$WT*y$MSTR
return(bio)
}
And want to apply to a whole bunch of rows in my data.frame:
final1=apply(final,1,yldbu)
BUT...recieve the following error:
"Error in y$WT : $ operator is invalid for atomic vectors"
However when i try:
> final[1,]$WT*final[1,]$MSTR
[1] 156.3
It gives me the correct answer....what is apply not
2008 Jul 06
1
Handful of files are giving me error 13, directory executable bit issue
I am getting a handful of these errors, and I am not sure why. The
directories in question have rights like this:
drw-r--r-- 2 osstbb osstbb 42 2008-05-02 00:04 12981826/
As root, why would it matter if it has executability? I can read it
just fine on the server.
Or is it an issue when it tries to create it on the -client- ? Is
there a way to fix this? I can chmod 0755 the dirs on the server
2010 Jan 20
1
Reshaping data with xtabs giving me 'extra' data
Dear all,
Lets say I have several data frames as follows:
> set.seed(42)
> dates <- as.Date(c("2010-01-19", "2010-01-20"))
> times <- c("09:30:00", "11:30:00", "13:30:00", "15:30:00")
> shows <- c("Red Dwarf", "Being Human", "Doctor Who")
>
> df1 <- data.frame(Date = dates[1],
2011 Nov 26
3
Asset pipeline giving me hard time. Please help !!! - (rails 3.1.3)
I am using rails 3.1.3.
Inside config/ application -> config.assets.enabled = true
Inside development.rb -> config.assets.compress = false
Inside production.rb -> config.serve_static_assets = false;
config.assets.compile = false
I have images placed in assets/images. If i do localhost:3000/assets/
image I get the image in the browser, but
unfortunately, on the browser i am
2008 Jun 07
3
DRY validates_format_of?
In a model I have following validates_format_of. Is there an easy way to
DRY this up? It seems to be rather repetitive.
validates_format_of :expiration_date, :with =>
/^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/
validates_format_of :activation_date, :with =>
/^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/
validates_format_of :some_other_date, :with =>
2005 Dec 16
4
Validation with Aggregation
ActiveRecord supports composed_of for value objects which is
fantastic but one thing that it doesn''t seem to support (or at least
I am unable to find any documentation for) validation of the value
objects.
For example, given the following:
class Message < ActiveRecord::Base
composed_of :sender, :class_name => ''EmailAddress''
composed_of :recipient,
2007 Mar 10
2
upgrading rails to 1.2.2 giving me mongrel errors
I''m working on upgrading to rails 1.2.2 from 1.1.6 and getting the mongrel
error below in development mode. Now things seem to work fine with 1.1.6and
1.2.2 (in prod mode).
Any ideas what might cause this? Googling gave me very little to work
with. This was the closest thing i found
http://dev.rubyonrails.org/ticket/6716
I''m running Ubuntu with mongrel 1.0.1 and fastthread