Displaying 20 results from an estimated 10000 matches similar to: "Inverting validates_format_of"
2008 Feb 24
1
validates_format_of no dots allowed
I need a validates_format_of that disallow dots.
In the api there is nothing to find about how validates_format_of exatly
works.
Is there a better documentation or is there something that can tell me
howto disallow dots.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2005 Jun 07
1
Problems with userPassword when it's base64 encoded
I'm switching from OpenLDAP to the newly released Fedora Directory
Server (formely known as the Netscape Directory Server) as a LDAP
backend for my Samba domain.
I'm now faced with a problem regarding how Fedora DS handles the
userPassword field.
Unlike OpenLDAP it encodes it in base64 so instead of reading
userPassword: {SSHA}0lP+r3Z1NVan7Caf4CG9oSgnTbQRrv/p
it reads:
userPassword::
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
Hey Scott,
On Wed, Apr 24, 2013 at 1:40 PM, Scott Pakin <pakin at lanl.gov> wrote:
...
>
> Is there some semantic reason that the increments aren't allowed to be
> combined, or is this a missed optimization opportunity in LLVM?
>
>
I believe that the wildcard is the extern keyword.
Since the external symbol isn't resolved until link time, I suspect that it
would be
2008 Apr 01
1
plugin announcement: acts_as_fu
We''ve all seen the job listings. We know what they''re looking for.
Rockstars. Code Monkeys. Rails Ninjas.
And you''re left thinking, "But I''m just a programmer." Well, not
anymore. Today, you become a Rails Kung-Fu Master!
"Not me," you say. "I''ve already tried using all the acts_as_something
plugins and all the something_fu
2010 Jan 27
1
Asterisk, NAT, and RTP?
Hello
I think I finally understood the issue/solution, but I'd like to make
sure I'm correct:
- In Diana Cionoiu's famous article on Freshmeat
(http://freshmeat.net/articles/nat-traversal-for-the-sip-protocol),
regardless of whether SIP end-points use a public IP or are behind a
NAT, RTP packets flow directly between the two SIP end-points because
the SIP server only acts... as an
2006 Feb 21
2
validates_format_of :url, regexp?
Hey,
Does anybody have a regexp for validating URLs? I found this one and am
trying to adapt it:
^(((ht|f)tp(s?))\:\/\/)?(www.|[a-zA-Z].)[a-zA-Z0-9\-\.]+\.(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk)(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\;\?\''\\\+&%\$#\=~_\-]+))*$
(http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_21245168.html)
I also found this one, but, um,
2005 Nov 28
4
validates_format_of nil
I''ve noticed that validates_format_of will return invalid if the field
is nil.
Question 1) How should we declare a validation that will validate it
with a regex if it is set, but, if the field is not set, just move on
Question 2) Why is it done this way? The other validators are only
invoked if the field is set . If you want to declare the field
mandatory, you add a
2006 Sep 10
1
validates_format_of :something, :with => /REGEX/
Hi all,
I''m hoping to stir the Rails pot a little bit here, so please go easy
with me ;-)
Regular Expressions is the most densely inhumane language construct
ever invented in any ''civilisation'', and the fact that we still have
to dirty our minds with this in Rails is something that (sh/c)ould
ideally be corrected in Rails (preferably before the release of 1.2
2006 Jan 20
4
validates_format_of > Invalid regular expression with simple pattern
Hello,
I try this :
validates_format_of :name , :with => /^[A-z0-9_.- ]*$/ , :message =>
"bad characters"
for accept any name with chars "A" to "z" , "0" to "9" , with "_" "."
"-" and " "
The pattern is really simple but I have this error :
SyntaxError in Login#register
2005 Oct 11
3
Is this correct?
Dear userR,
With the following results, are they correct or acceptable?
> x <- c(1.4, 1.2, 2.8)
> sum(x)
[1] 5.4
> sum(x) == 5.4
[1] FALSE
> (1.4 + 1.2 + 2.8) - 5.4
[1] -8.881784e-16
> (1.4 + 1.2) - 2.6
[1] -4.440892e-16
> 2.6 - 1.5 - 1.1
[1] 0
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor
1997 Aug 18
1
R-beta: bug report
The following seems to be a bug when I tried to use the predict function.
> forbes
boil.pt pressure log.pressure
[1,] 194.5 20.79 303.4472
[2,] 194.3 20.79 303.4472
[3,] 197.9 22.40 310.9061
[4,] 198.4 22.67 312.1042
[5,] 199.4 23.15 314.1995
[6,] 199.9 23.35 315.0597
[7,] 200.9 23.89 317.3460
[8,] 201.1 23.99
2007 Feb 16
13
negate the regexp in validates_format_of
Railsters:
ActiveRecord''s validation system puts other database systems to shame.
However, the newbies might not know how to write a regexp that
excludes a match, instead of tests for it. Understand - I''m just
asking this question to help them. I have been using Regexps since
''grep'' on Xenix! But the newbies here might not know how to do this:
2006 Apr 25
12
Newb Gem Install Help!
This seems newbish, but I can''t seem to get this gem to install no
matter what I do. The gem in question is login_generator, and no matter
what folder I put the .gem file in, it can''t read locally - am I missing
something?
Remote install hangs at updating the source.
--
Posted via http://www.ruby-forum.com/.
2004 Oct 21
2
How to calculate a double integral ...?
Dear R-Friends,
How can I calculate a double integral like
\int_a^b \int_c^y g(x, y) dx dy
where a, b, c are constants, g(x, y), e.g.,
g(x, y) = tan(x + y).
I tried to nested integrate() and adapt(),
but none of them working, seemingly due to the
limits can not be specified constants.
Best regards,
C. Joseph Lu
Department of Statistics
National Cheng-Kung University
Voice:
2008 Feb 07
1
Greek letters in legend without a space
I am trying to make a figure legend that says "uM" (but replace "u" with
mu).
When I use the following script, my legend looks more like "u M", rather
than "uM".
> legend(1,1, c(expression(1~mu~M)))
How do I get rid of the space R places in when using the expression command
to insert a greek letter?
Thanks very much in advance
Ming Kung
Graduate
2008 Jul 26
1
Coarsening the Resolution of a Dataset
Dear all,
I have gridded data at 5' (minutes) resolution, which I intend to coarsen to 0.5 degrees. How would I go about doing this in R? I've had a search online and haven't found anything obvious, so any help would be gratefully received.
I'm assuming that there will be several 'coarsening' techniques available - I'm after something fairly simple, which for example,
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 =>
2006 Apr 05
4
validates_format_of ?
Hi all,
I''ve got a form which accepts a "price" field and I''m attempting to
validate it and allow some flexibility in the way the user enters it.
It''s a numeric field but I want the user to be able to enter dollar
signs and commas naturally in the data entry.
I''m trying to understand how to use validates_format_of, and I''m not
sure what
2000 Aug 04
1
xlab=expression(...) won't work.
Dear all,
I found that the plotmath seems won't work on xlab in plot
(and other plot functions including matplot, contour, ...):
> plot(1:10, 1:10, xlab=expression(alpha))
the plot shows nothing for x-label.
My R-version is R.1.1.0
> version
_
platform Windows
arch x86
os Win32
system x86, Win32
status
major 1
2012 Aug 14
3
validates_format_of :message not working, validates_length_of :message is working
I''m using validates_format_of and the validation I want to do works, but I
can''t get an error message to be displayed if the data is invalid:
validates_format_of :mobile, :with => /\A[\+0-9]+\Z/, :message => " - Wrong"
I have another validation some where else that does display the error
message: " - Name is too long"
validates_length_of :name,