Questions tagged [long-integer]

A long integer is an integer number, typically twice the size of a standard integer. It is represented by the keyword 'long' in several programming languages.

A long integer is an integer number, typically twice the size of a standard integer. It is represented by the keyword 'long' in several programming languages.

http://en.wikipedia.org/wiki/Integer_(computer_science)#Long_integer

2408 questions
0
votes
0 answers

How can I reverse the bits of a 64 bit integer?

Given an unsigned 64-bit integer such as: 10000000000000000000000000000000000000000000000000000000000000000 How can I efficiently reverse the bits into something like this? 00000000000000000000000000000000000000000000000000000000000000001
0
votes
0 answers

Why does csv files convert to weird number format after it's been edited or renamed?

I had been facing this abnormal issue quite a while and yet to debug the real reason behind this why CSVs act so weird when they work with long numbers like Mobile Numbers. suppose, I was working with a CSV file which had one column with values as…
0
votes
1 answer

Java binary literal: "Long number too large."

So I am writing a chess engine. I have separate method for each piece's moves, which return a long array of size 2, including the long representation of move mask and also attack mask. The problem is that for some reason, when the piece move method…
user14717506
0
votes
1 answer

Would finding 0 in a number be faster if I convert the number to a string?

I need to find if a number contains 0 in it. So far, I have tried to take the modulo of the number with 10 and then divide the quotient by 10, and then repeat this process until the number is 0. Is converting this number to a string and searching…
user13977876
0
votes
1 answer

bad return type in lambda expression when creating a Long type maxHeap using PriorityQueue

I tried to create a Long type maxHeap using PriorityQueue. PriorityQueue maxHeap = new PriorityQueue((a, b) -> (b - a)); But the compiler returned an error incompatible types: bad return type in lambda expression Can someone…
Dyckia
  • 309
  • 2
  • 9
0
votes
1 answer

Wide to long dataframes - Error using timestamp as index

I am working with a dataframe having datetime as index in the form DD/MM/YYYY HH:mm:ss, followed by a series of columns named as Sitename_Parameter. For the same Sitename I have different parameters. I'd like to convert it into a long format with…
0
votes
1 answer

Filter observations by specifications in long form in R

My data looks like…
kna123
  • 115
  • 8
0
votes
1 answer

Android Cancel long operation (Asynctask,thread...?)

I tried AsyncTask, Thread and Handler but i don't get it. The method readXML() takes about 1-2 minutes and i only need a way to cancel this operation. All the solutions I've found were for short time operations (set flag, check flag and…
Simon Schubert
  • 2,010
  • 19
  • 34
0
votes
1 answer

In sqlite-jdbc driver(3.23 or 3.30),fail update when string is too long, without any exception. But in command line and navicat, it's OK

SQL replace into articles(id,grade,no,title,content,newchars,update_time) values(1394823098212,'1','8','title','**LongUtf8String**',1614001996557) If the length of LongUtf8String exceeds 2689 bytes, the operation will fail, without any…
flyinmind
  • 31
  • 1
0
votes
1 answer

How to tell ggplot several rows belong to one case in a long format dataset with nested variables

I have a dataset in long format in which each participant undergoes two conditions in an experiment (repeated measures) and each condition is composed of a number of trials. Participants scored (Score) per condition/group, but also have individual…
Lucas
  • 51
  • 6
0
votes
2 answers

Converting a string of ten digits to integer or generating a 10 digit long random integer to create an account number in Java

I would like to generate a ten digit account number greater than 1,000,000,000 and less than 9,999,999,999. I have 3 separate attempts that all are almost operational, but after 9 digits I either receive an error or a number that is generated is not…
Mark-Chi
  • 1
  • 1
  • 3
0
votes
0 answers

C++ code long integer function doesn't work properly unless I add extra 'cout' line?

I was writing a very basic C++ code. I am takin 2 lines of inputs First line -> number of integers: 1 long integers separated by whitespace: 0< ar[i] < 10^10 Example input: 5 1000000001 1000000002 1000000003 1000000004…
baymurat
  • 81
  • 5
0
votes
2 answers

Why NumberLong(9007199254740993) matches NumberLong(9007199254740992) in MongoDB from mongo shell?

This situation happens when the given number is big enough (greater than 9007199254740992), along with more tests, I even found many adjacent numbers could match a single number. Not only NumberLong(9007199254740996) would match…
Minix Li
  • 25
  • 7
0
votes
2 answers

Convert data and time into a numeric number in sql server

I have a data & time format column which I would like to convert to the following format in Microsoft SQL Server: yyyymmddhhmmss00000 So for example if I have 2021-02-04 11:49:50 this will be converted to 2021020411495000000. Any one knows how to do…
Annalise Azzopardi
  • 113
  • 1
  • 2
  • 13
0
votes
1 answer

How to change GCC long of Windows become 8 byte? Not Cygwin

So this is the requirement asked by our professor, we need to use c89 standard (there is no long long type). And in linux before compile we have to use -ansi flag. I prefer to debug in Windows first using VS Code, however one day I notice long…
Eric
  • 45
  • 1
  • 6