On 04/15/2011 03:05 PM, Rob McBroom wrote:
On Apr 15, 2011, at 2:58 PM, Ramin K wrote:
I use the IP address to generate a 32bit integer for the server_id for
my Mysql configs.
server_id =<%= ipaddress.split('.').inject(0) {|total,value| (total
<< 8 ) + value.to_i} %>
Would something like
On Apr 15, 9:30 am, Rob McBroom wrote:
> Details below, but the essential problem is this: I need to take a list of
> hostnames and assign an integer for each one and ensure that the integer “is
> non-negative and is no more than three decimal digits in length”. I’d prefer
> that the each hos
On Apr 15, 2011, at 2:58 PM, Ramin K wrote:
> I use the IP address to generate a 32bit integer for the server_id for
> my Mysql configs.
>
> server_id = <%= ipaddress.split('.').inject(0) {|total,value| (total
> << 8 ) + value.to_i} %>
>
> Would something like that work in your case?
Well, it h
I use the IP address to generate a 32bit integer for the server_id for
my Mysql configs.
server_id = <%= ipaddress.split('.').inject(0) {|total,value| (total
<< 8 ) + value.to_i} %>
Would something like that work in your case?
Ramin
On Apr 15, 7:30 am, Rob McBroom wrote:
> Details below, but t