numbers

How to convert number to words in java

We currently have a crude mechanism to convert numbers to words (e.g. using a few static arrays) and based on the size of the number translating that into an english text. But we are running into issues for numbers which are huge. 10183 = Ten thousand one hundred eighty three 90 = Ninety 5888 = Five thousand eight hundred eighty eight ...

Java generics and the Number class

I want to create a method that compares a number but can have an input that is any of the subclasses of Number. I have looked at doing this in the following manner... public static <T extends Number> void evaluate(T inputNumber) { if (inputNumber >= x) { ... } } I need to get the actual primative before I can perform the comp...

How to generate random positive and negative numbers in java

I am trying to generate random integers over the range (-32768, 32767) of the primitive data type short. The java Random object only generates positive numbers. How would I go about randomly creating numbers on that interval? Thanks. ...

Android: Clicking on ExpandableList to transfer contact number to edit text (for contact finder)

Hey, what i want to do is to do a SMS sender & receiver. All that is left is a contact finder. Basically what i can do right now (for the contact finder) : - Able to display the contacts - Able to toast text after clicking on the child But what i can't do is to transfer the contact number to an edit text , since i can't seem to find th...

String numbers into number numbers in PHP

Hi Guys, How come when I set 00 as a value like this: $var = 00; it ouputs as 0 when I use it? How can I set 00 so that $var++ would become 01? ...

String number into number in PHP

Hi Guys, Say I have a string like John01Lima is there any way to pull out the two numbers and have them as numbers that can be incremented with $number++ ? ...

LaTeX: Extract numbers and letters from command variables and conversion to roman numerals

I'm writing a thesis and have been searching on many occasions trying to find a solution to my programming problem. Basically, I have a series of items that I've distinguished in my research data as "A1", "A2", "A3", … , "A13", "B1", B2", and so on. These data labels, by the way, I can't change now because it's been used throughout my th...

R: number format, writing 1e-5 instead of 0.00001

Hello I've used read.table to read a file that contains numbers such as 0.00001 when I write them back with write.table those numbers appear as 1e-5 How can I keep the old format? thanks ...

eclipse java code display linenumber

what plugins do i need to install on eclipse so that .java files will show line number? how about show line number on .xml/.html as well? ...

What is the best way of converting a number to a alphabet string?

What is the best way of converting a multi-digit number to a alphabet string in C#. For example, if I have a number say, int digits = 1234567890 I want this to be converted to a string which would be string alpha = "ABCDEFGHIJ" This means 1 represents A, 2 represents B and so on. ...

Is there a limit to the base to which numbers can be associated to?

This may be very convoluted and twisted idea. Got it while learning some JavaScript. It piqued my mind. Hoping there may be someone else who would have thought about it before or might enlighten me :-) var n = 17; binary_string = n.toString(2); // Evaluates to "10001" octal_string = "0" + n.toString(8); // Evaluates to "021" h...

How to display a phone number with that green phone icon to the right just like in contacts

I have an application that I want to display a phone number (not one stored in contacts) with that green phone icon next to it much like in the contacts application. I've searched and can't find anything relating to this formatting in the documentation. ...

SQLite issue with Table Names using numbers?

Hello, I'm developing an app which requires that the user selects a year formatted like this 1992-1993 from a spinner. The tablename is also named 1992-1993 and the idea is that using SQL the values from this table are pulled through with a statement like this select * from 1992-1993. When I run the emulator however, it throws an error....

How do sites that use a phone dialer work?

Sites like icantfindmyphone.com -- what service is it using to make the phone calls? Just a google voice widget and he uses his own number? I'm curious. ...

how do i print currency format in javascript

hi guys, i have some price values to display in my page. i am writing a function which takes the float price and returns the formatted currency val with currency code too.. like fnPrice(1001.01) should print $ 1,000.01 ...

How can I check whether a string is a (very big) number?

I need to make a number validation for specified string. The problem is, the string could be a large number, larger than any numeric type in C# can represent, so I can't use TryParse functions, because they will give only information about whether they can convert to those types. It should take into account -/+, separator, and current c...

C#: Get all week numbers from within 2 dates globalized/ISO 8601 compatible

I have a startdate 2010-01-01 (I just assume its a first day of the week) and an enddate 2010-07-31 (I just assume its a first day of the week) I want to have returned from a method all week numbers for every first day of the week for the above timespan. I can not assume that the first day of week is always monday, because my user...