Questions tagged as 'int'

3
answers

Get value Integer in end .00 and float value in .01 to 0.9

I have this code below that is from a calculator, however I have a problem: I wanted to return a float value when dividing 5/2 = 2.5 and returning an integer value when dividing 4/2 = 2 and not 2.0 ! Can anyone help me with this? The c...
asked by 20.06.2018 / 03:38
2
answers

How to transform byte integers into the Python language?

I'm using the pyserial module to send serial data, so I have a list of values like: Valores = [10,20,30,40,50,60,70,80,90,100] I need to convert the values of the list into bytes to be able to send, because if I try to send it like this:...
asked by 19.01.2018 / 18:50
1
answer

Working with Hexadecimal in Java

I saw an example code on the Java documentation site about bit that can be checked here . This class belongs to the example that is quoted in link above: class BitDemo { public static void main(String[] args) { int bitmask =...
asked by 09.06.2017 / 19:24
1
answer

Zero left inside integer variable [duplicate]

Good afternoon guys, hit the following doubt: When I define within an integer variable the left zero it returns me in the echo a number nothing to see, I would like to know why: Following is an example: <?php echo $inteiro = 015;...
asked by 12.09.2014 / 20:44
3
answers

How to convert 0 to null (Error inserting NULL into an INT field from a variable)

I'm editing this question to make it more didactic for other members, since there are only publications addressing this situation outside the community. I have a INT field with UNIQUE property that can have NULL value. The value th...
asked by 12.09.2017 / 19:14
1
answer

Integer array conversion in String

I am a beginner in Java and would like to learn how to convert an array of integers to a String.     
asked by 24.06.2014 / 05:50
2
answers

Modifiers int, unsigned and signed in C language

Algorithm "handle age": // idade deve sempre ser positiva, por isso vou usar unsigned unsigned int t1; printf("Digite sua idade:"); scanf("%d", &t1); printf("Idade: %d", t1); Doubt: Even though I enter with a negative value, 2 printf...
asked by 21.10.2017 / 02:39
2
answers

When converting 32-bit to 64-bit code in iOS

I know there is a lot of information about converting 32-bit to 64-bit code on iOS. However, I still have many doubts and I believe they are the same as other people, especially in the question of int variables. For example, as I could se...
asked by 29.10.2014 / 15:54
1
answer

Concatenate string with integer

I have a variable that is a vector of char, and in this vector I need to insert a number that is an integer, fetching it from another variable: int quantidade; char id[3] = 'p'; For example, if the quantity is 2, I need the string id to be...
asked by 29.06.2015 / 01:17
2
answers

Convert int to hex

What do I want to do, is it possible? convert the value variable to hex. private void button1_Click(object sender, EventArgs e) { int value = 255; byte[] buffer = new byte[5]; buffer[0] = 0xff; buffer[1] = value...
asked by 31.01.2017 / 16:26