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.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
26 views

remainder of subsequences (non-empty) of a number in string format [closed]

I came across this question in my assessment for a company where I was supposed to write a function which takes 4 inputs: N: integer in string format K: integer which divides the subsequences of N Q: ...
Preet Rathod's user avatar
-4 votes
0 answers
17 views

100 million messages in 2 minutes [closed]

My question is, how can anybody code a programme to send 100 million people a precaution message at a time? You can add other necessary things to proceed the problem. I tried string and long long ...
Ashraful Islam's user avatar
-1 votes
0 answers
13 views

Translate long pdf

There is a code on the Internet to extract a book and it works in any language except Arabic, but it shows the translation of a page in the browser and the code puts the full translation in the PDF ...
ROK Kor's user avatar
0 votes
3 answers
90 views

Primitive Integert Datatype Limits in Java

I have a Java programt o display the limits of primitive integer datatypes which is as follows: import static java.lang.Math.*; class HelloWorld { public static void main(String[] args) { ...
vidyapu sandeep's user avatar
0 votes
0 answers
21 views

Oracle SQL Select Long Data Type [duplicate]

How can I get data with long data type as text from a table in Oracle database? When I run this code SELECT S.ISTEK_NO,S.RAPORX FROM RAD_SONUC S, widememo is returned to me.... Sample code SELECT S....
iremsu's user avatar
  • 1
0 votes
0 answers
10 views

Logical replication stops

I have built logical replication for the two server instances. There 105 tables in each server and two databases, All tables are same. I built logical replication for 50 tables and then another 50. ...
Alisahib Qadimov's user avatar
1 vote
2 answers
124 views

Why does Random.NextInt64 create duplicates and not distribute the values across the whole range

I have written a small C# console application to generate a million random longs I have already included ThreadLocal to avoid creating duplicates here if the code I am running: var random = new ...
JKennedy's user avatar
  • 18.3k
0 votes
0 answers
44 views

long arithmetic in C [duplicate]

can you divide two long datatypes and turn them into a fraction? If not, would you have to type convert the datatypes into floats? Can someone explain how long arithmetic works in C. This is a snippet ...
user22712878's user avatar
1 vote
1 answer
122 views

C: LONG_MIN and LONG_MAX are wrong [duplicate]

Running Windows 64 bit system. Values appear as if they are just int. int main() { long long_min = LONG_MIN; long long_max = LONG_MAX; printf("Minimum value of long: %ld \n", ...
WiiWi's user avatar
  • 21
0 votes
1 answer
25 views

Properties with Long type and properties with Integer type

<div class="mb-3 col-md-6"> <label asp-for="@Model.MERSISNumber" class="form-label">MERSIS Numarası</label> <input class="form-control&...
Dilara PINAR's user avatar
6 votes
5 answers
491 views

Why does an operation on a large integer silently overflow?

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 dtype, ...
cottontail's user avatar
  • 12.4k
0 votes
0 answers
13 views

Long to wide data using R

i'm working on machine learning with R. I want to import a dataset from excel sheet but to be more easy for me to work on it, i would like to transform my date sorted in multiple row for a same ...
DoctorBlood's user avatar
0 votes
0 answers
38 views

Type casting and sorting two arrays in java [duplicate]

I'm trying to sort an array in java using the inbuilt comparator and sort method but it is giving me an error incompatible type, object cannot be converted to int I want to sort an array and also want ...
user20837016's user avatar
-4 votes
2 answers
116 views

long integer is out of range negative product

I was trying to find product of some long long integer (0<=a[i]<=10^18)t. now how do i find that the product exeeds 10^18? does the product turn into negetive number (product<0)? #include<...
Humanware's user avatar
0 votes
0 answers
14 views

iOS Push notification long press requirements

To add long press options to a push notification, what is required? Does it require Rich notification? How are the long press options controlled? Haven’t tried yet, just setting up requirements for ...
Six SB's user avatar
  • 1
-1 votes
2 answers
89 views

Why won't my C long store a number bigger than a regular Int?

For some reason I cannot get the number 4294967296, or any bigger to be stored in a long. On the second run through the loop the change variable goes to 0 after being multiplied despite being a long. ...
John Serlin's user avatar
1 vote
0 answers
62 views

How to insert small int values to NumberLong in document DB / mongo DB by using python/pymongo

When we are trying to insert small integer values let's say 45 to documentDB. It's been saved as just an integer/Number value in documentDB. But I want that to be saved as NumberLong irrespective of ...
Rahman Shaik's user avatar
1 vote
1 answer
96 views

Converting a long to bytes for efficient transmission [duplicate]

I'm creating a serialisation format, and part of the header is the length of the body. To do this, I'm allocating a fixed number of bytes (currently 4) which I want to use to store as long a number as ...
Ian Newson's user avatar
  • 7,749
0 votes
0 answers
113 views

Excel convert YYYYMMDDhhmmss [14-char text] to Date + Time (fastest way)

Recently, I discovered a very quick way to convert YYYYMMDD [8-digit number starting with the year] to a date, via the "Text to Columns" conversion option in the data tab of MS Excel. It ...
Vasko's user avatar
  • 43
2 votes
2 answers
101 views

int vs size_t vs long

I have been seeing a lot of people lately say that you should use size_t instead of int. But what is the difference? Is it always better? Or are there situations for int, and situations for size_t? Or ...
Harr's user avatar
  • 101
0 votes
0 answers
73 views

Kotlin Convert Double to Long using A Swift TimeStamp

When sending a Swift timeStamp to FirebaseRTDB I use a Double (seconds): let timeStamp = Date().timeIntevalSince1970 // eg 1633598017.489507 When reading the value on an iOS device I use let ...
Lance Samaria's user avatar
1 vote
1 answer
36 views

The first int in one of two arrays is assigned 0 when I leave the for loop in which I assigned them values

I am chopping off every digit from a long "n" starting with the last and assigning them into two alternating arrays x[] & y[] using a for loop. I was expecting the first int in the array ...
NacerShucks's user avatar
1 vote
2 answers
89 views

How do I cast a String to a Long-int in C?

How do i turn a String in C to a Long integer, without removing the leading zero? I have used both sscanf() and strtol() functions but they both remove the leading zero as if its white-space. I have ...
El Barto's user avatar
0 votes
0 answers
6 views

mitigate long tail problem in recommendation using Earth mover's distance with Latent Dirichlet Allocation

Can reduce A long tail problem in recommendation with EMD and LDA? Can these techniques work for this? I am trying EMD and LDA techniques for reducing long tail problems in the recommendation and ...
Monika Yadav's user avatar
0 votes
0 answers
16 views

How to hold the splash screen for a longer period?

I am showing a splash screen while launching the app., but I would like to dismiss it upon the completion of certain action. Is there a way to achieve that? For example, I am launching the app which ...
Quest's user avatar
  • 1
0 votes
2 answers
138 views

How can I add up two 25 digit numbers?

I'm trying to work on addition of about 25 digit numbers in C. The result I am getting is a little different from the expected, possible cause datatype. /* Online C Compiler and Editor */ #include <...
Kester George's user avatar
0 votes
0 answers
8 views

Reading a binary file and change value but running 64m file takes a long time, every body can help me?

my code is not good, running 64m file takes a long time, can anyone help me? Thanks For example import re part = input("in put file bin: ") input_file = open(part, "rb") content = ...
tuan's user avatar
  • 1
1 vote
1 answer
76 views

Powershell SQLite query gets an int64 wrong

I have a database built with this statement: CREATE TABLE starsystems ( name TEXT NOT NULL COLLATE NOCASE, systemaddress INT UNIQUE, CONSTRAINT combined_uniques UNIQUE (name, systemaddress) ) ...
Parduz's user avatar
  • 648
0 votes
1 answer
32 views

Converting from wide to long data: reshape function placed the values in wrong column headers

I've spent so many hours trying to figure out how to convert my wide to long data correctly so that each item occupies two rows, one for pre-assessment and one for post-assessment. It seems so bizarre ...
Anita's user avatar
  • 1
3 votes
1 answer
63 views

Unable to use .to() operator on Long data type

The question is: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? I have written a code for it but it gives an error.The code is written in ...
Diwash Mainali's user avatar
0 votes
0 answers
40 views

18 digit field truncating

i have an account number that is 18 digits - when i try to extract the field to CSV it truncates the number (zeroing out last digits) how can i format this field so it doesnt truncate? what i ...
Mkhomiak2's user avatar
-1 votes
2 answers
51 views

not sure how to fix long.tostring failure

` I am doing a problem and we are supposed to write a program that reads a sequence of positive integers. The first zero terminates the input. For each input, N, the program computes the smallest base ...
helios's user avatar
  • 1
1 vote
1 answer
124 views

Why is strtol() returning 0x7fffffff instead of the expected 0xAABBCCDD?

// msvc 17.3.5 // sizeof (long) : 4 #include <stdlib.h> int main(){ long i = 0xAABBCCDD;// 0x AABBCCDD in debugger window char number[] = "AABBCCDD EEFF"; char* p; ...
Squared's user avatar
  • 69
1 vote
3 answers
105 views

Reg: String conversion issue

Please find a sample code below. #include <stdio.h> #include <string.h> int main () { char *str = "2160000000"; long int evid=0; evid = atol(str); printf("%s = str\n&...
Vimal Bhaskar's user avatar
-2 votes
1 answer
76 views

Extracting Raw Data from Integer and Long Variables in Java

I'm working on a Java project where I have been tasked with extracting raw data from both integer and long variables. Here's an input: Integer intValue = 42; Long longValue = 9876543210L; How can I ...
Aakash Patel's user avatar
19 votes
4 answers
741 views

Why in C# an explicit decimal => long conversion operator is called implicitly, losing precision? [duplicate]

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# explicit ...
kaalus's user avatar
  • 4,475
0 votes
0 answers
133 views

FastUtil - operation on Set fails with Long type

Minimum reproducible example below, with the dependency: <dependency> <groupId>it.unimi.dsi</groupId> <artifactId>fastutil</artifactId> <version>8.5.12&...
seinecle's user avatar
  • 10.2k
0 votes
0 answers
141 views

How to setup "Long" library for protobufjs as a NPM package

I'm building an Angular (Typescript) web application that uses Protobuf for communicating with other services. At first, we stored all .proto files in our project and used protobufjs to compile them ...
Lê Quang Bảo's user avatar
1 vote
1 answer
54 views

Elasticsearch shows not relevant data when sorting by 'long' field by desc

I have elasticsearch index with 113 million docs (about 133Gb in size) "mappings": { "dynamic": "strict", "properties": { ...some fields..., ...
Vasiliy Babenko's user avatar
0 votes
1 answer
33 views

How to pivot_longer when I have to split up the variable names and make them form a new column?

I want to pivot_longer my dataset. My problem is that I don't know how to exactly specify the pivot_longer function in order to tell R that I need to split up the variable names. As I've got a pre-...
juliawwu's user avatar
0 votes
3 answers
46 views

reshaping data using reshape() to wide format instead of dcast or pivot functions

I am having some problems understanding reshape function and would like to specifically use it as it uses base r. Consider the following code month <- c("jan", "feb", "mar&...
TheBoomerang's user avatar
0 votes
1 answer
58 views

Not showing correct output for a input 100000 - Runtime error [duplicate]

Sigma of Equation Given a number N, find the value of the below equation for the given number. Equation N ∑ {(X + 1)^2 - (3X + 1) + X} X = 1 Input Format First line contains an integer n Output ...
vinit yadav's user avatar
0 votes
1 answer
105 views

How to handle 64-bit signed integer coming from NextJS backend API

I have a NextJS application where one of the backend API routes returns a JSON object that contains a 64-bit signed integer. // userId is the 64-bit signed integer res.status(200).json({ id: userId, ...
dokgu's user avatar
  • 5,236
0 votes
0 answers
12 views

Trades won't close at set stop and profit level

I am creating a simple long/short pinescript. I want my long trades to close with +6% profit and close when -4% in loss. For my shorts I want it to close with +3% profit and when -2% in loss. Current ...
Pieter hein's user avatar
0 votes
0 answers
40 views

How to identify overflow error with long?

I am trying to use memoization to identify when overflow occurs: But the error is not being thrown (the Runtimeexception) so is still just outputting negative values as the result import java.util....
a2s4342's user avatar
0 votes
0 answers
18 views

Castor generates long variables for elements who are declared as Integer in xsd, how to correct the behavior and generate Integer variables?

Castor version used is 1.4.1. The Java classes contain long variables of Integer elements(from xsd) after generation by castor libraries
Naveen kumar's user avatar
0 votes
1 answer
118 views

How to Compare LONG Data Type with CLOB

I want to compare the text(LONG) FROM user_views dictionary view in oracle with text(CLOB) in user created table all_views_backup. Something like : CREATE TABLE all_views_backup AS SELECT view_name, ...
Garvit Vashisth's user avatar
0 votes
3 answers
69 views

String with binary to long and reverse. Unexpected results. Arduino

volatile long pakiet = 0; String longToBinaryString(long num) { String result = ""; for (int i = 31; i >= 0; i--) { if ((num >> i) & 1) { result += "1&...
MarcinanBarbarzynca's user avatar
0 votes
2 answers
119 views

Add objects to List of Long

I want to add a Long Object to a List of Long, but I get some error that I don't understand I have the following minimal example: package main; import java.util.List; public class Test { public ...
David Klein's user avatar
1 vote
2 answers
269 views

Dart/Flutter: jsonDecode() loses precision when converting Java Long to Dart int from a Json String

Summary: I am sending a Json String from Android Java side to Flutter Dart side. I use jsonDecode() to parse the Json String, but the Long type number will be converted to int and lose precision. I ...
jcpax's user avatar
  • 11

1
2 3 4 5
49