long-integer Questions
6
Solved
I know, how to convert a Timestamp to a long, with the getTime() method.
Is there a method that convert a long to a TimeStamp?
Malines asked 14/5, 2012 at 20:8
6
Solved
I am new to C/C++, so I have a couple of questions about a basic type:
a) Can you explain to me the difference between int64_t and long (long int)?
In my understanding, both are 64 bit integers....
Commend asked 28/11, 2012 at 11:35
6
Solved
Here's an excerpt from Sun's Java tutorials:
A switch works with the byte, short, char, and int primitive data types. It also works with enumerated types (discussed in Classes and Inheritance) a...
Heidt asked 20/4, 2010 at 15:7
6
Solved
I have a java applciation in which I want to generate long ids for strings (in order to store those strings in neo4j). In order to avoid data duplication, I would like to generate an id for each st...
Mitis asked 16/2, 2012 at 10:34
5
Solved
How should I perform conversion from IPv6 to long and vice versa?
So far I have:
public static long IPToLong(String addr) {
String[] addrArray = addr.split("\\.");
long num = 0;
for (int i = ...
Directive asked 26/7, 2013 at 7:45
8
I tried to convert a double to its binary representation, but using this Long.toBinaryString(Double.doubleToRawLongBits(d)) doesn't help, since I have large numbers, that Long can't store them i.e ...
Celsacelsius asked 15/6, 2011 at 15:1
3
Solved
I have the following power function which operates on integers and it works fine:
int ipow( int base, int exp )
{
int result = 1;
while( exp )
{
if ( exp & 1 )
{
result *= base;
}
exp ...
Scalene asked 5/3, 2013 at 13:22
18
Solved
Random class has a method to generate random int in a given range. For example:
Random r = new Random();
int x = r.nextInt(100);
This would generate an int number more or equal to 0 and less th...
Verso asked 30/3, 2010 at 14:41
5
Solved
I have a list that contains very large integers and I want to cast it into a pandas column with a specific dtype. As an example, if the list contains 2**31, which is outside the limit of int32 dtyp...
Automate asked 11/10, 2023 at 0:35
2
How to fix this warning --- "Very long vector path (7985 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector." in the l...
Rocca asked 2/11, 2022 at 9:22
5
Solved
I want to convert a 64-width binary string to long, there is a static method:
Long.parseLong(String s, int radix)
to do this, but it isn't suitable for my case.
The problem is my binary string...
Bidden asked 2/12, 2011 at 6:42
4
Solved
The following C# program silently and implicitly calls an explicit decimal-to-long conversion operator, losing precision.
I don't understand why this happens. As far as I understand, in C# ex...
Colvert asked 25/5, 2023 at 20:47
5
Solved
I am running the exact same code on both windows and mac, with python 3.5 64 bit.
On windows, it looks like this:
>>> import numpy as np
>>> preds = np.zeros((1, 3), dtype=int)...
Aland asked 11/7, 2016 at 18:51
5
Solved
I am trying to display numbers in a string dynamically, so if the number has decimal's display them but if not don"t show the .0
example: display 5.5 as 5.5 and 5.0 as 5
This is what I have so fa...
Dowser asked 18/8, 2011 at 14:48
4
Solved
I'm trying to use a bitcoin address validator written in Python from here:
This snippet gives me trouble though:
def decode_base58(bc, length):
n = 0
for char in bc:
n = n * 58 + digits58.ind...
Cella asked 2/6, 2014 at 20:47
1
How does one shift a long array n positions to the right or left e.g. do a >>> n or << n on this array
long[] values = new long[]{
0b101101001111111100110011100000010011001110110111...
Rhinelandpalatinate asked 8/3, 2023 at 21:13
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
Solved
Wouldn't it have made more sense to make long 64-bit and reserve long long until 128-bit numbers become a reality?
Araujo asked 2/9, 2011 at 5:20
4
Solved
I have an unsigned long long (or uint64_t) value and want to convert it to a double. The double shall have the same bit pattern as the long value. This way I can set the bits of the double "by hand...
Tressietressure asked 1/7, 2013 at 16:20
7
Solved
Is this even possible? I don't even think it is, but I saw some code that was trying to do it. However, my unit tests showed that it was not working. I did see some similar thoughts:
Converting G...
Monochloride asked 10/10, 2010 at 14:30
18
Solved
How do I convert a long to a byte[] and back in Java?
I'm trying convert a long to a byte[] so that I will be able to send the byte[] over a TCP connection. On the other side I want to take that b...
Aggrieved asked 19/12, 2010 at 21:14
9
Solved
I often see questions relating to Overflow errors with vba.
My question is why use the integer variable declaration instead of just defining all numerical variables (excluding double etc.) as long...
Lutenist asked 16/10, 2014 at 16:11
3
I'm trying to generate a number based on a seed in C#. The only problem is that the seed is too big to be an int32. Is there a way I can use a long as the seed?
And yes, the seed MUST be a long.
Outflank asked 17/3, 2013 at 16:14
6
Solved
I've spent the past two hours debugging what seems extremely unlikely. I've stripped the method of a secondary Android Activity to exactly this:
public void onClick(View v) {
String str = "25...
Mur asked 11/9, 2011 at 7:17
9
I am trying to convert a Object type to Long type in Java and I got as:
public static Long castObjectToLong(Object object) {
return ((Long)object).longValue();
When I run, it throws ClassCastEx...
Cassondracassoulet asked 30/6, 2016 at 7:9
1 Next >
© 2022 - 2025 — McMap. All rights reserved.