int64 Questions
3
Solved
I have a nested dictionary that I am trying to convert to JSON using json.dumps(unserialized_data), indent=2). The dictionary currently looks like this:
{
"status": "SUCCESS",
...
4
Solved
When I parse this little piece of JSON:
{ "value" : 9223372036854775807 }
This is what I get:
{ value: 9223372036854776000 }
Is there any way to parse it properly?
Grissel asked 12/9, 2013 at 3:59
7
What is the proper way to convert a FILETIME structure into __int64? Can you please tell me?
10
Solved
How can I generate random Int64 and UInt64 values using the Random class in C#?
Vang asked 24/3, 2009 at 13:22
1
Pandas aggregation functions return TypeError: Object of type int64 is not JSON serializable.
Here is the dataframe:
d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data=d)
df
Out[47]:
col...
1
Solved
I'm trying to refactor an old C++ code. At some point I've something like:
#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
# define I64_CONST(X) X ## i64
#else
# define...
1
Solved
I was reviewing some code and came across this odd result. If you have a dataframe with one value of type integer and you coerce it to integer you get what I think you would expect:
library(dplyr)
...
2
Solved
In Go, what is the best strategy for converting int64 to int? I am having difficulty comparing the two
package main
import (
"math"
"strings"
"strconv"
)
type largestPrimeFactor struct {
N ...
3
Solved
I want to convert a string to an int64. What I find from the strconv package is the Atoi function. It seems to cast a string to an int and return it:
// Atoi is shorthand for ParseInt(s, 10, 0).
f...
7
Solved
How to convert program parameter from argv to int64_t? atoi() is suitable only for 32 bit integers.
2
Solved
I'm trying to parse a json stream in Go. I've created a simplified example:
package main
import (
"encoding/json"
"fmt"
)
var d = []byte(`{ "world":[{"data": 2251799813685312}, {"data": nul...
3
Solved
I have an open-source codebase that is written in both C and C++. I'm looking for an integer type that is guaranteed to be at least 64 bits wide, which can be reliably compiled on most OS X (Intel,...
5
Solved
I tried:
test_image = tf.convert_to_tensor(img, dtype=tf.float32)
Then following error appears:
ValueError: Tensor conversion requested dtype float32 for Tensor with dtype int64: 'Tensor("test/...
Endorsed asked 24/2, 2016 at 8:13
3
Solved
2
Solved
I'm trying to write a test case for some corner case. For input of type int64_t, the following line won't compile:
int64_t a = -9223372036854775808LL;
The error/warning is:
error: integer...
Coughlin asked 19/7, 2019 at 4:18
2
Solved
I am processing various arrays of UInt8 (little endian) and need to convert them to Int64.
In Swift 4 I used
let array: [UInt8] = [13,164,167,80,4,0]
let raw = Int64(littleEndian: Data(array).wi...
3
Solved
I want to convert a __int64 variable into a CString. The code is exactly this
__int64 i64TotalGB;
CString totalSpace;
i64TotalGB = 150;
printf("disk space: %I64d GB\n", i64TotalGB);
totalSpace.Fo...
2
Solved
i have a question. I was wondering why this is happend?
var dict : [String : Any] = ["intValue": 1234, "stringValue" : "some text"]
dict["intValue"] as? Int64 // = nil (why)
dict["intValue"] as? I...
3
Solved
The problem with the following code:
var x uint64 = 18446744073709551615
var y int64 = int64(x)
is that y is -1. Without loss of information, is the only way to convert between these two number ...
5
Solved
I have an Int64 value, but I only need the lower 32 bits. Thus I want a quick way to get the Int32 value from the lower 32 bits of the Int64 value.
Thanks
Springtime asked 19/9, 2009 at 5:4
4
Solved
Let's think about the following situation.
The Go routine creates a byte array where packs a Uint64 number 5577006791947779410 in 8 bytes Big Endian [77, 101, 130, 33, 7, 252, 253, 82].
In JavaSc...
Disembarrass asked 2/8, 2017 at 8:51
4
Solved
Why does the following program give an error?
#include <stdio.h>
int main()
{
unsigned int64_t i = 12;
printf("%lld\n", i);
return 0;
}
Error:
In function 'main':
5:19: error...
1
Solved
I want to use 64 bit integers in my C++ code. I understand I can either #include <cstdint> and then declare a uint64_t or use unsigned long long (or the equivalent for signed versions).
How...
Santiagosantillan asked 15/6, 2017 at 18:40
2
Solved
This is my code:
package main
import (
"strconv"
"fmt"
)
func main() {
t := strconv.Itoa64(1234)
fmt.Println(t)
}
Problem:
Why does it cause the following error message?
command-line-arg...
6
Solved
I am converting some code from C to C++ in MS dev studio under win32. In the old code I was doing some high speed timings using QueryPerformanceCounter() and did a few manipulations on the __int64 ...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.