2,922 questions
-1
votes
3
answers
91
views
SwiftUI TextField with number format ignores environment locale
I'm facing the issue that SwiftUI's TextField with a number format seems to ignore the locale set by the environment modifier.
struct MyView: View {
@State
var number: Decimal = 1.1
var ...
-1
votes
2
answers
63
views
How to get a space for a negative number in format() function [closed]
Use " " (a space) to insert a space before positive numbers and a minus sign before negative numbers:
txt = "The temperature is between{: } and{: } degrees celsius."
print(txt....
3
votes
1
answer
378
views
Export-Excel from PowerShell doesnt format dates properly
I've got some data in a CSV file that I'm trying to convert to an XLSX file. I've been trying this using the Import-Excel PS module. Here is an extract of what the CSV file looks like:
AMOUNT_BOUGHT,...
0
votes
3
answers
126
views
Format number to at most n digits in python
I know I can use format in order to format a number to whatever format. What I want is to format to at most n digts.
This can be achieved using the g-format-specifier. But there's one caveat here. ...
-2
votes
2
answers
88
views
How to print a list of float64 with justified decimal point in Go
I would like to print a slice of float64 values line by line having all decimal points at the same position in each line. I could print the integer part right justified, the decimal point and then the ...
0
votes
0
answers
39
views
Show number with different formatting
I am using ClosedXML to create an Excel file. The issue is I am having amount value in string variable and I want to display it with comma separate number format (like Indian currency culture). Having ...
1
vote
1
answer
76
views
How to Implement Localisation in Flutter for Numbers?
Let's consider in Flutter we are showing the number in language English. When the user changes the language to Hindi or any other Indian language, the number should be displayed as per the language, ...
0
votes
1
answer
158
views
Avalonia: Get Numeric UpDown to parse the text on lost focus
I have a numeric up down like this:
<NumericUpDown Value="{Binding Samples}" ShowButtonSpinner="False" ParsingNumberStyle="Integer"/>
Then I use this on the ...
2
votes
1
answer
92
views
Strange behaviour with the NumberFormatter class
I'm currently playing around with the NumberFormatter class, but I noticed a strange behaviour.
I'm trying to have two fraction digits, but depending on the PHP version, sometimes the result is ...
1
vote
1
answer
40
views
Value returned by NumberFormatter (PERCENT) looks equal to test value but isn't
running a PHPUnit test today gave me this strange result:
There was 1 failure:
1) App\StudioIntern\FormatServiceTest::testNumberToPercent
Failed asserting that two strings are equal.
--- Expected
+++ ...
-2
votes
3
answers
85
views
Creating copies of original lists in Python
I have 5 lists containing data: List_1, List_2, List_3, List_4, List_5
I want to perform an analysis to each of these lists, but also keep the original lists as a reference for later so I can compare ...
-6
votes
1
answer
186
views
Is there Swift 6 number formatting in string interpolation without "import Foundation"?
I like being able to do this:
print( "\("YYYY") \(454.90008)" )
but I want to do this:
print( "\("YYYY") \(String(format: "%.3f", 454.90008))" )
...
0
votes
1
answer
120
views
Format "04x" produces more than 4 hex digits
I thought f"0x{number:04x}" produces a hex number with four digits. But I recently noticed that this is not the case:
f"0x{13544123:04x}" = "0xceaabb" which has 6 digits. ...
0
votes
0
answers
62
views
Oracle PL/SQL - Changing Number formats using Numeric masks
I am having requirement where customer can enter a number in any format and I need to convert it into valid number format using plsql code dynamically. could you please guide me.
Test case1# (200....
2
votes
0
answers
95
views
How can I use PHP's NumberFormatter with `PADDING_POSITION` and `CURRENCY`?
I'm attempting to achieve the same thing I can achieve in javascript like so:
Intl.NumberFormat('en-CA', {style: 'currency', currency: 'CAD', notation: 'compact', maximumSignificantDigits: 5 }).format(...
1
vote
1
answer
138
views
How to show more decimal places in histogram axis
I have precision long number array in Octave and I would like to show it in histogram. It basically works well but it only shows a few decimal places on the histogram axis. I need to see more numbers ...
0
votes
1
answer
636
views
MudBlazor MudNumercField with thousand separator
Can I set Format parameter somehow to display the number with thousand separatot in MudNumericField, please. I tried to set it to "n" but it didn't work.
For example: 151 342
1
vote
0
answers
42
views
Can I Numberformat a date and then change to string to add additional characters to the end?
I have some dates I'm pulling from a database. These dates will go onto a Government report where they want these dates changed to UTC. Then, they want it formatted as "yyyy-mm-ddThh:mm:ss-[UTC ...
1
vote
1
answer
190
views
How to Automatically Format Numbers as Indian Numeration in HTML Input Fields?
I am working on a financial web application targeted at an Indian audience, and I need to allow users to enter monetary amounts in input fields that automatically format the numbers into Indian ...
0
votes
0
answers
16
views
Number not formatting correctly for locale countries when the range in between 1000 - 9999 in Javascript NumberFormat [duplicate]
I am using the following method - NumberFormat() to format numbers for locale countries. Most of the numbers formatting is correct but for numbers from 1000 - 9999 it is not adding any spaces. Though ...
1
vote
5
answers
198
views
What would be the most efficient way to encode a simple fraction on 32 or 64 bits? [closed]
What would be the best way to encode a positive simple fraction on 32 bits or 64 bits?
For casual binary fraction, we already have a well defined standard for floats and doubles.
In case of 32 bits, ...
1
vote
1
answer
46
views
sqlite3 format "12345.6789" to "12,345.68" on the native command line
This works as expected:
select printf("%f", 12345.6789); 12345.678900
This works as expected:
select printf("%.2f", 12345.6789); 12345.68
This works as expected (notice the comma):
...
1
vote
1
answer
250
views
How to handle decimal input values in a globalized MVC app
Currently trying to rework a .NET 4.8 MVC application to support globalization (needs to support both English and French). So far, everything has been working fine.
The issue, however, is with decimal ...
0
votes
1
answer
61
views
Concatenate two digit year with number formatted with leading zeros
I am trying to create an invoice number with VBA in excel. I want the invoice number to be displayed "YY####" where the number is formatted with leading zeros and will increase by one with ...
-6
votes
2
answers
162
views
how to number value in convert in indian currency format. like (120000 to 1.2Lakh & 50000000 to 5Cr [closed]
Hello guys I want to convert my number value in short form but in indian value short form
like
6500 to 6.5K
50000 to 50K
99900 to 99.9K
100000 to 1Lakh
150000 to 1.5Lakh
1000000 to 10Lakh
1450000 to ...