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

Optimising alogorithm for converting a long long int (e.g=12345678) to new long long int of this type (123456787654321) means reverse of it has added

I want to optimize the algorithm for converting a long long int (e.g=12345678) to a new long long int of this type (123456787654321) means the reverse of it has added. My current algorithm and function to do it is as; long long ans_int(long long…
def __init__
  • 1,092
  • 6
  • 17
0
votes
1 answer

How to force number to get to the next integer with HTML JS?

The project I'd like to display 9 images (3x3) on a page with dynamic src and change the images by using buttons (Next or previous). Every pictures have 5 tags (ex: sky, new-york, cooking,...) and by chosing a tag every pictures related to this tag…
0
votes
1 answer

Problem to return and printf unsigned long

I don't understand why my code is still printing int values (that are overflown) while I want unsigned long values! There is my code : #include unsigned long factorial(int num) { if ((num == 0) || (num == 1 )) { return 1; …
Tom Kuntz
  • 55
  • 1
  • 7
0
votes
1 answer

how to convert big double value into proper double number

I want current date and time. so for that I am using "System.currentTimeMillis()" in java to get current date and time. Now I am converting milliseconds to seconds by dividing milliseconds to 1000. after dividing it I am converting this number into…
0
votes
0 answers

Android Studio, java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long

I keep getting this error message java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long I am trying to pass a long value between activities using shared preferences here is the code for my first activity SharedPreferences…
0
votes
2 answers

Pivot longer by integrating mutiple columns

I want to bring data to long format and integrate information from multiple columns. Example data: Let's say we observe 4 products (id 1:4) in an online shop and the review comments (comment*) of different customers. One product (id = 1) has only…
Scijens
  • 541
  • 2
  • 11
0
votes
2 answers

Long to int truncation problem, truncating exceptions or handling error

Leetcode requires that the output of -91283472332 be converted to int, and the output result is -2147483648. I use long to store the result, and then return int. Why is the result returned -1089159116 here's my code int myAtoi(char * s){ char…
XiaoTian
  • 45
  • 5
0
votes
0 answers

Problem initializing enum using long in C++

I am trying to initialize an enum using the hash codes of the type label: enum ValueType { CLOSED = hashCode("CLOSED"), OPEN = hashCode("OPEN"), SEKIHAIRITSU = hashCode("SEKIHAIRITSU"), ZWEITMANDAT =…
KingWither
  • 29
  • 4
0
votes
0 answers

Flutter running gradle task 'assembledebug' ... long time, stucked

I am a newbie here, my problem is similar to: Flutter App stuck at "Running Gradle task 'assembleDebug'... " In fact I guess the problem was my laptop shut down while running app on my device, maybe something went wrong during that, and now it just…
rkris26
  • 317
  • 5
  • 15
0
votes
1 answer

Most effient way to find all combinations of elements in a long list Python

Sorry the title looks a little far-fetched. I was asked to calculate the sum of 2 or more elements in a list. I searched it up on the web, I found some results, I tested them, but it didn't…
0
votes
1 answer

Segmentation fault when using nanosleep()

$ ls baby.txt readlyrics.c I tried to write a simple program to print the text from a .txt file using nanosleep() to get some sort of animated effect: #include #include #include int main(int argc, char *argv[])…
init 1
  • 39
  • 6
0
votes
3 answers

R - Deleting all consequent ID rows if certain value in other column is met

I have a data frame in long format, that contains multiple entries per id. I also have a condition column that is either "app condition", "control condition" or NA. Each id has at least one "app condition" or "control condition" entry, but usually…
Luca
  • 43
  • 4
0
votes
1 answer

how to search two different ranges and input answer

this code almost works but im getting a Error "Method 'Range' of object'_Worksheet' failed" when trying to perform the action. any ideas? Dim k As Range For Each k In Sheet2.Range("h6:zz6").Cells If k = Sheet4.Range("e1").Value Then Dim…
Byron
  • 9
  • 3
0
votes
1 answer

Easy method to solve multiplication of many numbers followed by division

Please help for easy method to solve longish multiplications and division equation. Example like (667 x 6 x 74) / (384 x 384) Many Thanks in advance
0
votes
1 answer

How to check a type of an input and use if..else condition without an error in c#

I was doing a project where you have to enter a password. using System; namespace program.cs { class Program { static void Main(string[] args) { bool checkpoint1 = false; long password = 99101L; …
Yung
  • 83
  • 1
  • 2
  • 10