I have always used the NumberFormat class in Java to do simple number padding ie. turn 1, 2, 3... into 0001, 0002, 0003....
Is there a similar utility in ActionScript to do my padding, or will I have to write a custom function?
...
Is it possible to directly set the properties of NumberFormatter according to windows
" Regional Setting "?
If not, it there a function in Flex by which we can get
the Regional Setting, and then we can change the properties of NumberFormatter
according to it.
...
i'm automating excel, using the macro system as a guide to what i should do through automation. When i formatted a column as a date, the macro generated a NumberFormat for the column to be:
[$-409]m/d/yy h:mm AM/PM;@
i'm trying to decipher what this really means. i gather from googling, that the values in the square brackets are a con...
I'm trying to format a currency (Swiss Frank -- de-CH) with a symbol (CHF) that is different that what the default .Net culture is (SFr.). The problem is that the NumberFormat for the culture is ReadOnly.
Is there a simple way to solve this problem using CultureInfo and NumberFormat? Is there some way I can override the CurrencySymbol?
...
I want to change my NSNumberformatter from displaying negative numbers with parenthesis around them to putting the minus sign in front (or whatever the localized standard is).
I would assume I could do this with setNegativeFormat:
but reading Apple's oh so thorough docs I am left scratching my head:
setNegativeFormat:
Sets the fo...
hi i am using c# to do things in excel-2007, i have the below code
object mis = Type.Missing;
Excel.Workbook wb = (Excel.Workbook)Globals.ThisAddIn.GetActiveWorkbook();
Excel.Worksheet ws = (Excel.Worksheet)wb.Worksheets.Add(mis, mis, mis, mis);
Excel.Range range = (Excel.Range)ws.get_Range("A1", "HM232");
range.Formula =...
i am using excel 2007... i have the following ranges...
D E G H
5 1 2 1 1
6 2 2 1 1
now i select the range F8:G9 and write the following formula "=D5:E6*0.2+G5:H6*0.3" and press the CTRL+SHIFT+ENTER... i.e. doing matrix addition,... now i have the following result
F G
8 0.5...
I have a .NET application available in several different language. i basically load and save file (containing doubles) in the System Culture but i would like to force numbers to always be displayed and entered using the US culture format (comma as digit grouping, period as decimal separator). I tried to override the application Culture ...
Hi All
I have an ASP.NET Gridview with a BoundField that is bound to a decimal value. I use the following code to format the decimal number to a currency value:
DataFormatString="{0:C}"
We have a custom implementation of NumberFormatInfo though, which removes the currency symbol and modifies the thousands seperator. Normally this for...
hi . i have a text and i try to write this text to excel file by c#. this text include not one kind of value. i mean, it can be include "abc" "1.6", "1/6" etc. when i write 1.86 or 1/86 i see "feb.86" in the excel. but i want to see what i write to. what can i do to solve this problem?
...
Example:
I have a float value like 1294322.0000000, and I want to print it out in a label, like that:
1.294.322
So at every thousands-position one point inbetween. I bet you know what I mean. Don't know the exact english words for that.
Or, for example, I have a float like that: 15.29, then it should look like "15,29".
Or a float li...
That looks like a bug in the API:
When my input CGFloat is 0.0, I get this:
Input = 0.000000, Output = +0
When my input CGFloat is 1.0, I get this:
Input = 1.000000, Output = +2
Obviously that's not what I want ;-)
Now here is how I create that NSNumberFormatter object:
NSNumberFormatter *formatter = [[NSNumberFormatter allo...
I have tried both, separately
[formatter setMinusSign:@"?"];
The first one does not change the minus sign at all in my string. Doesn't have any visible effect. If I have a negative value, I see something like -321,65. But not ?321,65 for instance.
[formatter setNegativePrefix:@"?"];
Now, with that one I do get a ?321,65 for a float...
I have an Excel addin written in C# that imports a text file into Excel worksheet. Some of the fields in the file are text and some oare numbers.
Problem Steps:
Change the System's Regional Settings to Dutch (Belgium)
Open Excel and import the file into Excel. Records contain values such as 78,1118 which gets converted to 781.118. Not...
How to convert a double into a floating-point string representation without scientific notation in the .NET Framework?
"Small" samples (effective numbers may be of any size, such as 1.5E200 or 1e-200) :
3248971234698200000000000000000000000000000000
0.00000000000000000000000000000000000023897356978234562
None of the standard number...
When using the following NumberFormat:
NumberFormat amountFormat = NumberFormat
.getNumberInstance(I18N.getThreadLocale());
amountFormat.setMaximumFractionDigits(2);
amountFormat.setMinimumFractionDigits(2);
I get the following results when parsing via
System.out.println(amountFormat.parse(value));
10,50 => 1050
10,5 => 105
...
I have a monolingual GWT application (English) and I would like to use localized date and number formats.
I have added <inherits name="com.google.gwt.i18n.I18N"/> to my gwt.xml, but the formats remain in en-us. I have checked the browser lacale using this script
private native String getBrowserLocale() /*-{
return navigator.langu...
Hi all,
I want to use number_format function in PHP. For example:
$number = 234.51;
echo number_format($number,2);
This works for float numbers but I want to use it for different numbers. If a number is decimal and doesn't have any floating points, it shows like : 145.00 . How can I fix this? I mean I want to show as many floating po...
iPhone sdk 3.2.1
NSMutableDictionary *myDict = [NSMutableDictionary dictionaryWithCapacity:2];
[myDict setObject:[NSNumber numberWithDouble:0.1f] forKey:@"testDoubleObject"];
[myDict setValue:[NSNumber numberWithDouble:0.1f] forKey:@"testDoubleValue"];
Printing the description of myDict to the console yields this:
Printing descrip...
Hi everybody !
Can someone help me ? I have a NSString with @"12.34" and I want to convert it into a NSString with the same float number but in single precision 32bits binary floating-point format IEEE-754 : like @"\x41\x45\x70\xa4" (with hexa characters) or @"AEp¤"...
I'm sure it's something easy but after many hours of reading the doc...