Category "integer"

Variable changes absurdly like 3 to 51? [duplicate]

I have been trying to solve a codewar question but when I use char to int .I get absurd results. like I enter 3 as base and 3 as power but res

How do you check if an arithmetic operation will overflow?

I am coming from looking at Rust and How do I detect unsigned integer multiply overflow? where in Rust they have checked_add, which is implemented like this: pu

Integer literal for fixed width integer types

Is there some c++ proposal for Integer literal for fixed width integer types like this? // i's type is unsigned int auto i = 10u; // j's type is uint32_t auto j

Integer literal for fixed width integer types

Is there some c++ proposal for Integer literal for fixed width integer types like this? // i's type is unsigned int auto i = 10u; // j's type is uint32_t auto j

An array of `int` values ​and return an array of boolean values

The task The correct implementation should receive an array of int values and return an array of booleans where each element is a result of a check if a corresp

string column conversion to float in Pandas DataFrame

I want to get left value (LD) pipe separated value from the DataFrame column "'CA Distance Nominal (LD | au)" here is the code. when I convert the string to flo

Multiple int input in same line python [duplicate]

I want to take multiple integer inputs in the same line. I know I can take str input and then convert them into integer in the next line but i

prevent numpy stack method change INT data to float

I try to stack three one dimension array. a and b are int that can be work as index and c is float. After I stack this three with axis=0, the a and b data chang

What is the difference between using INTXX_C macros and performing type cast to literals?

For example this code is broken (I've just fixed it in actual code..). uint64_t a = 1 << 60 It can be fixed as, uint64_t a = (uint64_t)1 << 60 but

What method in Java returns the absolute difference of two integers?

Is there a method in the Java Math class that returns the absolute difference of two integers? int absDiff = 8 - 15; int answer = 7;

How to prevent python program crash when receiving alphabetical characters

My code is working just the way I want - unless input contains alphabetical characters. If so, is crashes. How can I prevent that? My code is as follows: def ma

Power Automate reminders to be send on number of days from initial day

I am working on SharePoint List solution that acts on date trigger. The base date is a date of parcel receipt. I need a set of reminders that stop once Picked f

RSA key conversion from Uint8Array to BigInteger with node-rsa

I have a generated RSA key in the format of Uint8Array but I need the key in the format of BigInteger. See images below. How can I achieve such a conversion?

AttributeError: 'int' object has no attribute 'split' for pandas

AttributeError: 'int' object has no attribute 'split' Data is : print(df) Content Page no 0 My name is mark 3 1 My name is jeff

PHP, how to convert Int value to Week days

For saving the days of week in a database, I've the existing code : if (isset($_POST['day7'])){$dayOfWeek = 1;} else { $dayOfWeek = ''; } if (isset($_POST['day1

How can I safely add and clamp a signed integer in C?

I have a value, of type signed int, which is always clamped between, for example, ±1073741824 (2^30). I should be able to safely add or subtract any arbi

How can I resolve "The argument type 'String' can't be assigned to the parameter type 'int' " - Flutter

I'm trying to fetch data Online Using HTTP GET with Flutter SDK. I'm trying with this code https://github.com/RaglandCodes/Flutter-basic-API/blob/master/lib/mai

Changing the int and string from a string

The format_address function separates out parts of the address string into new strings: house_number and street_name, and returns: "house number X on street nam

If a '-' contain in int input it will print something [closed]

well what im trying to do its when you input a "-Number" it will print something and this the error im getting: Traceback (most recent call la

Why does this selectizeInput minimum values function not work correctly for 2 digit numbers even though it works fine for single digit numbers?

This one has me puzzled. The below code extract uses selectizeInput() to allow the user to choose to/from periods for purposes of data analysis (latter not show