All Questions
861 questions
1
vote
0
answers
99
views
how to convert a double field to a string field remove decimal and zero
in a r script why when converting a double field to a character field, it adds a dot and a decimal to a duckdb table, how can i fix this?
import duckdb
# Connect to DuckDB database
con = duckdb....
0
votes
1
answer
108
views
How to convert a localized string number to a double?
In my code I have a number that has been set by a user through a TextField.
struct ContentView: View {
@State private var numberText: String = ""
var body: some View {
...
-1
votes
3
answers
276
views
How to convert string into double value in C# [duplicate]
I am building simple C# Winforms desktop app using .NET framework.
I need to convert a string like "172.5632" into double value.
I tried Double.parse() and Convert.toString().
Both of them ...
-1
votes
2
answers
93
views
c# variable culture string to invariant culture double [closed]
I have found many questions for this topic but I couldn't find one that covers my case.
For a string input, which may be or may not be a real number of unknown culture, how can I try to cast it to a ...
0
votes
0
answers
65
views
Function that converts from double to string has issues with the fractional part
I have to create a computer that can calculate any expression that's inputted. I reached a point where I have the result of one expression and I have to convert it from double into string in order to ...
0
votes
1
answer
121
views
NumberFormatInfo NumberDecimalDigits not working despite similar answer
This seems a pretty simple task but I can't get this sort out.
I need to write a decimal number on whatever international system with
no thousand separator '
decimal separator as .
a fixed number of ...
0
votes
0
answers
255
views
Double to string with arduino::String prints format instead of value?
I've been experiencing this in a project where I'm doing a large volume of double and float to string conversions, but I've whittled it down to something very small that showcases the problem.
void ...
1
vote
0
answers
165
views
(update) What is causing this error? "terminate called after throwing an instance of 'std::invalid_argument' stod [1] 620756
I am trying to create an algorithm where I can enter an input.csv and output.csv. I have remade the code and changed some areas to try to fix the issue.
One issue I am having right now is whenever I ...
1
vote
1
answer
91
views
when running a function from my project, the stod() function gives an incorrect result
I have three files - a json file, my project, and test (main.cpp)
json file:
{
"points": {
"range": 25,
"step": 0.001
}
}
in file main.cpp this ...
0
votes
0
answers
19
views
Thread 1: Fatal error: Index out of range, changing array of double to array of string [duplicate]
I want to change my array of double to array of string with this code:
var arrayOfDouble: [[Double]] = [[..]]
func change(_ doubles: [[Double]]) -> [[String]]{
var result:[[String]] = [[]]
...
-2
votes
1
answer
66
views
Getting Java exception running the code on other machines
I made a project in Java, if I run the project from my machine everything works fine, but if I share the jar file and execute from another machine it does not work. I get this error:
Exception in ...
-1
votes
2
answers
611
views
How To Check If A Variable From Double Type Doesn't Have A Value. VB.NET
my problem in VB.NET.
I hope you see my code.not all the my code is important.
the important part is in the second if condition and which is if snum = "".
the snum variable is a variable ...
0
votes
2
answers
412
views
Calculation in Kotlin with Double data type gives unexpected result
The calculation below should result in "3.52" but outputs "3.5199999999999996". How can I fix this?
("4.52".toDouble() - 1).toString()
1
vote
1
answer
122
views
How do one convert double to string on c99? (embedded C) [closed]
I am collecting the digital values(integers) and doing a computation, which is of double type. I tried displaying the values using sprintf() and it is only displaying the integers correctly as ...
0
votes
1
answer
113
views
React Native Using Decimals
Hi I was working on a project, and I am on a part where I am adding up the total cost of orders in the order summary page. I have used
`
let totalPrice = Object.keys(cartItem).map((menuKey) => (
...