Displaying 20 results from an estimated 900 matches similar to: "Phone Numbers in Rails/MySQL"
2006 Jul 11
17
[Best Practices] phone numbers??
I''ve seen phone numbers handled many different ways. Is there a recommended
Rails way to store, format and display phone numbers? I''d appreciate
comments from the community on this.
1. Is it better to store phone number as a 10-digit string? Then format it
as desired when displaying it?
2. or, is it better to store with formatting, ie. "(222) 111-2222" ?
3. Is
2006 Apr 18
12
Formatting data drawn from a DB
Question for all:
Right now i have a Table in a mySQL DB that has a row called
Ingredients. When the data is entered into the DB its enter like so
from a text area:
1 1/2 lbs. beef top sirloin, thinly sliced
1/3 cup white sugar
1/3 cup rice wine vinegar
2 tablespoons frozen OJ concentrate
1 teaspoon salt
1 tablespoon soy sauce
1 cup long grain rice
2 cups water
1/4 cup cornstarch
2 teaspoons
2006 May 09
11
model filter?
Hi All,
Is there a way to filter / modify the output of a model class before
it''s returned to controller/view that''s calling it?
Example: I have a field phone_number which I always want to preformat
using the number_to_phone() helper....
Any help is appriciated.
Thanks!
--
Posted via http://www.ruby-forum.com/.
2018 Jun 21
2
Password complexity checks and local users...
AFAI've understood 'samba-tool domain passwordsettings' set domain
password settings, while the GPO equivalent settings is for the client
(windows client and server os).
Currently i've enabled password complexity checks server side:
root at vdcsv1:~# samba-tool domain passwordsettings show
Password informations for domain 'DC=ad,DC=fvg,DC=lnf,DC=it'
Password
2006 May 04
14
Rails Reference 1.1.2
As part of my 3 day training course on Rails, I hand out a 24 page
"short reference" of Rails. It''s collection of the most used calls,
methods, functions across a wide range of Rails functionality.
I have released it under a Creative Commons license, so feel free to
grab it and use it and improve it. It''s a bit rough around some of
it''s edges, and I
2006 May 09
3
remove Punctuation characters
Hi,
I want to remove all punctuation characters in a string. I was trying it use
a regular expressions but it doesn't work.
Here is a sample os what i want:
str <- 'ABD - remove de punct, and dot characters.'
str <- gsub('[:punct:]','',str)
str
"'ABD remove de punct and dot characters"
is there any function that do this kind of thing?
Thanks to
2008 May 18
2
[LLVMdev] Assembling the output of llc
Hello Talin,
> Yes exactly. I'm on OS X (x86), and I'm not specifying a target - I
> assumed that it would choose sensible defaults...
Could you please provide a .bc testcase? There can be multiple issues,
but at the first glance it seems, that names were not properly mangled.
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg
2018 Jun 21
2
Password complexity checks and local users...
Mandi! Rowland Penny via samba
In chel di` si favelave...
> It doesn't have to contain punctuation:
Ahem, i've write 'punctuation' but i meant 'Non-alphanumeric
characters'. Sorry.
> So, as I am sure you can see, 'kaaPxvqEXW' only passes the first two.
> It contains uppercase and lowercase, but neither numbers or punctuation.
Exactly i supposed.
2010 Dec 15
6
Numbers in a string
Hello, I have stings which have all sort of characters (numbers, letters,
punctuation marks, etc) I would like to stay only with the numbers in them,
does somebody know how to do this?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2006 May 08
4
gsub no workie
Don''t know why, but cant seem to get this to work for me.
I have a phone number field for an addressbook. In the addressbook model
I have a before_update declaration that says the following:
I''d like to be able to remove all special characters (just numbers
please), but this doesn''t want to work for me.
before_update :format_phone
def format_phone
self.phone =
2013 Mar 13
2
patch - Some CJK codepoints are also punctuation
--
Greg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xapian-some-cjk-codepoints-are-also-punctuation.patch
Type: text/x-patch
Size: 1499 bytes
Desc: not available
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20130313/4da8b0f9/attachment.bin>
2008 Nov 28
3
regexp help needed
Hello,
I have a vector of dates and I would like to grep the year component
from this vector (= all digits
after the last punctuation character)
dates <- c("28.7.08","28.7.2008","28/7/08", "28/7/2008", "28/07/2008",
"28-07-2008", "28-07-08")
the resulting vector should look like
"08" "2008"
2012 Jul 05
4
rsync based on checksum only
Is it possible to tell rsync *not* to use file names, date stamps, etc and
only use the checksum for deciding if a file is the same?
the remote machine "normalizes" a set of file names to remove all
punctuation marks and forces all file names to lower case. The files
themselves are unchanged.
--checksum looks promising but it does not say anything about file names:
-c, --checksum
2009 Dec 24
2
Two Easy questions
Sorry all for these two easy questions:
First, I have a matrix with trhee columns:
A=
Name Eight Puntuation
Pepe 1,85 10
Paco 1,7 7
Pablo 1,82 6
I want to scatter the two columns (I could use pairs or other functions...)
but the only doubt is that I cannot find the way to add in the associated
intersection (the point scattered) the label "Pepe" "Paco" and so
2008 Jun 17
1
GXW 4108 asterisk configuration
Dear,
I'm having problems with the configuration of this gateway(GrandStream GXW
4108), I used the instructions from GrandStream but it doesn't work. Someone
has a good configuration for this gateway?
Thanks in advance,
Nelson
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Aug 04
3
Password Strength Meter, Password Strength Validation
Has anyone seen or created a password strength meter, or password strength
validator (like at hotmail''s sign up)?
Examples would be great!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060804/14a94764/attachment.html
2005 Dec 21
13
Too many login generators?
there is a blog about it
http://www.realityforge.org/articles/2005/11/12/aaa_in_rails
There are so many Authentication/Authorization/Auditing generators now,
just like the situation in java''s world, Too many components doing the
samething just make me confusion. Why not add one to rails core lib and
everybody can extend it for their requirement ?
--
Posted via
2006 Apr 14
1
Grouping a list of links by category
Hi,
I want to display a list of links grouped by category like this:
Group 1
Link 1
Link 2
Group 2
Link 1
Link 2
I have this in my controller:
def index
@links = Link.find(:all, :order => "category_id")
end
And this in the view:
<ul>
<% for link in @links %>
<li>
<a href="<%= link.url %>"><%= link.link
2011 Mar 15
1
Changing order policy
Hi everybody,
Maybe I'm going to ask a bit weird question:
I have an item collection, most of them are writting with latin letters, but
some of them have chinese letters. There is a list page and numbers,
punctuation and chinese letters go first. I would like to change this order
policy in order to show first items that start with latin letters, and then
numbers, punctuation and chinese
2008 May 19
0
[LLVMdev] Assembling the output of llc
Anton Korobeynikov wrote:
> Hello Talin,
>
>> Yes exactly. I'm on OS X (x86), and I'm not specifying a target - I
>> assumed that it would choose sensible defaults...
>>
> Could you please provide a .bc testcase? There can be multiple issues,
> but at the first glance it seems, that names were not properly mangled.
>
I've created bug