441 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
5
votes
2
answers
140
views
Update MySQL database column to round all values to 2 decimal places
I have a MySQL database of some 5000 products imported from Excel a while ago. Unfortunately, Excel truncates values with trailing zeroes so they were imported into the Price column in a mix of values ...
0
votes
1
answer
38
views
Preventing pandoc from adding a space after comma used as a decimal separator in math mode
I am using pandoc to convert markdown files containing TeX bits to html.
Because the text is in Italian, I want to use comma as a decimal separator. However, pandoc keeps adding a space after the ...
0
votes
1
answer
122
views
Can't enter decimal point in textbox bound to a float
I am using Dot Net 8.0 and I have created a WPF application. On a window I wish to have a textbox control that is bound to a Float so the user can see and modify it.
I have tried many things but ...
1
vote
2
answers
77
views
Put decimal separator after the first two digits in R
I have downloaded a table of temperature data from a datalogger where the decimal points dissapeared. Here is a fragment:
temperature<-c( 227725, 208957, 210834, 214588, 218342)
date<-c("...
0
votes
0
answers
99
views
The fastest way to split uint64 into two others by digit position
I have a function like:
func splitNumberByDecimals(u uint256, dec uint) (intFraction, decFraction uint){
...
}
The task is to extract an unsigned number, and the number of decimal places for this ...
0
votes
1
answer
781
views
Formula for Column to Keep a Running Balance of Transactions is Producing Additional Decimal Places
*Update: Solved
I've learned that it's not really a problem other than to annoy me. See additional blockquote notes for more info. If it still bugs you, I posted a solution.
Original Question:
I ...
1
vote
1
answer
688
views
Postgres how to insert reals with decimal comma?
My database is a postgres v14 database with en_US UTF-8 locale. I have to import many .csv files and they have usually a decimal point (3.14) for reals and sometimes a decimal comma (3,14). My ...
0
votes
1
answer
97
views
R+arrow: reading double with comma decimal separator
Please have a look at the code at the end of the post.
You can download the input tsv file (nothing malicious!) from
https://e.pcloud.link/publink/show?code=XZ5eCWZdrwFuo5POSVzi7ywCmteHfE4rdmV
I am ...
0
votes
1
answer
2k
views
How to check the number of decimal places in STRING number?
If I have a value, could be a type P or a string, i.e. 12.345, I want to know if the decimal places is more than two.
I cannot seem to find a conclusive way of doing this in ABAP from my research. ...
1
vote
0
answers
178
views
CS50 Week 1 "Half" practice problem is producing unexpected results. What is going wrong here?
I am currently working on the "Half" practice problem in CS50. I am struggling to get the program to output the correct decimal values. First of all, this is my current solution at the ...
0
votes
1
answer
162
views
Preserve decimal places in DataFrame
I'm trying to read the excel worksheet to DataFrame using pd.read_excel() function. I want to check if each element in the FX column contains 2 decimals and are displayed with 2 decimals. Actually all ...
1
vote
1
answer
62
views
I am having an issue correctly appending decimal pointers in my small Basic Calculator App
In my basic calculator app, I'm experiencing a problem with correctly appending decimal points. When I input a number like 2.5 and then try to perform a calculation, the decimal point disappears, ...
1
vote
2
answers
1k
views
Java set locale permanently
I am completely new to Java (I am mainly using Python) and I am using it on a Windows machine with the IntelliJIDEA IDE. When entering a decimal using the dot (".") instead of the comma (&...
0
votes
1
answer
134
views
Django normalize() is showing 1E+1
I'm trying to create a function in my model to display product info, and in my model I have the following:
class Product(models.Model):
price = models.DecimalField(max_digits=10, decimal_places=2)
...
-1
votes
1
answer
2k
views
Scientific notation in c
How can I print the output as 123.4e+04 by increasing the number of digits before the comma instead of 1.234e+06 when using scientific notation in c
I tried the %*.*e representations, as shown below, ...