Top "Integer" questions

Common datatype in many programming languages for representing a whole number.

Why does "memset(arr, -1, sizeof(arr)/sizeof(int))" not clear an integer array to -1?

Is it not possible to use memset on an array of integers? I tried the following memset call and didn't …

c arrays memory integer memset
Counting positive integer elements in a list with Python list comprehensions

I have a list of integers and I need to count how many of them are > 0. I'm currently doing …

python list sum integer list-comprehension
Converting int to NSInteger

Possible Duplicate: How to convert An NSInteger to an int? I am new to iOS programming, how do I convert …

iphone ios integer nsinteger
Why does int num = Integer.getInteger("123") throw NullPointerException?

The following code throws NullPointerException: int num = Integer.getInteger("123"); Is my compiler invoking getInteger on null since it's static? That …

java integer nullpointerexception api-design autoboxing
What is the difference between "++" and "+= 1 " operators?

In a loop in C++, I usually encounter situations to use ++ or +=1, but I can't tell their difference. For instance, …

c++ loops integer auto-increment increment
Does Java have mutable types for Integer, Float, Double, Long?

I am in a situation where I want to use mutable versions of things like Integer. Do I have to …

java numbers integer mutable built-in
RGB Int to RGB - Python

How can I convert an RGB integer to the corresponding RGB tuple (R,G,B)? Seems simple enough, but I …

python integer rgb
Convert Integer Into String

I have a some numbers stored in a Integer called mode, but I need to use they in a TProcess. …

delphi string variables integer lazarus
C integer division and floor

In C, is there a difference between integer division a/b and floor(a/b) where both a and b …

c integer division integer-division floor
'0' as a string with empty() in PHP

I want a 0 to be considered as an integer and a '0' to be considered as a string, but …

php string integer zero