Category "integer"

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

Given a sequence of integers, return the sum of all the integers that have an even index, multiplied by the integer at the last index

This is my solution and it passes some of the tests, but not all of them. Can anyone help me and explain why? Thank you :) function evenLast(numbers) { let su

Is it possible to distinguish Bool and Int in Swift?

I have an AnyObject type that can be String, Int or Bool type. I need to distinguish them. This code tries to do so, but it considers Bool to be Int: import C

Is it possible to distinguish Bool and Int in Swift?

I have an AnyObject type that can be String, Int or Bool type. I need to distinguish them. This code tries to do so, but it considers Bool to be Int: import C

Swift: Check which value in NSArray is closest to another given value

Lets say I have an array var values:[CGFloat] = [-12.0, 450, 300] I need to find out which of these numbers is closest to a given value, say var givenValue

How to separate range of integers into two equal parts

I have an array of integers like this one int [] num = {5, 8, 1, 1, 2, 3, 2} and I want to divide it into 2 parts, so that the total of 2 sets will be as equ

Integer division in Python

I'm confused about the following integer math in python: -7/3 = -3 since (-3)*3 = -9 < -7. I understand. 7/-3 = -3 I don't get how this is defined. (-3)*(-

What is the difference between “int” and “uint” / “long” and “ulong”?

I know about int and long (32-bit and 64-bit numbers), but what are uint and ulong?

Converting a string to an integer on Android

How do I convert a string into an integer? I have a textbox I have the user enter a number into: EditText et = (EditText) findViewById(R.id.entry1); String he