fixnum Questions
8
Solved
I want find the length of a Fixnum, num, without converting it into a String.
In other words, how many digits are in num without calling the .to_s() method:
num.to_s.length
7
Solved
Is there a method in ruby to turn fixnum like 74239 into an array like [7,4,2,3,9]?
6
Solved
I need to be able to determine a systems maximum integer in Ruby. Anybody know how, or if it's possible?
4
Solved
I recently decided I wanted to list all the users in my Ruby On Rails application - since I couldn't figure out how to list them any other way, I decided to use partials.
I have the following on my...
Diggins asked 9/2, 2011 at 21:13
2
Solved
For example, if I want 987 to equal "900".
2
Solved
I am trying to answer the following question from Chris Pine's "Learn to Program" book:
Leap years. Write a program that asks for a starting year and an ending year and then puts all the leap ye...
3
Solved
I'm currently trying to divide counts["email"] a hash containing the number 82,000 by a variable total which contains the value 1.3 million.
When I run puts counts["email"]/total I get 0.
Why can...
2
Solved
I'm looking for the standard way to represent negative infinity in Lisp. Is there a symblic value which is recognised by Lisp's arithmetic functions as less than all other numbers?
Specifically, I...
1
© 2022 - 2024 — McMap. All rights reserved.