Questions tagged as 'int'

1
answer

How to sort an array of objects in java

Hello, I have a class times where they have score (% with%), number of wins (% with%), losses (% with%), etc. Within the int method, I have an array of 20 teams and need to sort them by the score, if the score is equal, I check who has the...
asked by 15.07.2016 / 06:12
1
answer

How to pass a "title" in a "UIAlertController" of type Int with swift?

Good afternoon, guys. I'm calling an alert in my code where I need its "title" to be the return id of a JSON, my json object has id and status, the id is of type Int, and the status is of type String, I tried to convert the id to string, but...
asked by 07.11.2015 / 21:29
1
answer

Insert values from an array of bytes into an int array without converting them

I have this int vector: int[] vetor = new int [dataRegCodeToCompare.length]; and this vector byte: (which receives the digest of another byte array) byte[] dataRegCodeToCompare = md5.digest(toHash); I want to put the values of the byte...
asked by 22.04.2015 / 20:40
1
answer

Python: 'int' object is not iterable Random function

I'm having this error when I run the code. If I set pos=(algum numero qualquer) the code runs normally, but if I use this random function of the error.    'int' object is not iterable on line 20 at the beginning. Where am I goin...
asked by 01.04.2018 / 20:18
1
answer

What's the difference between these forms of command execution?

These commands in Python: lista = eval('[' + input("Digite sua lista: ") + ']') And this: lista = input("Digite sua lista: ") And this: lista = [int(x) for x in input().strip()] Why does the latter give the error below?    Valu...
asked by 29.05.2018 / 18:07
1
answer

How to make a sum of two arrays generating a third in C #?

I can not do it, I tried to use the FOR loop and also the IF to store in the array before summing, but my knowledge in C # is scarce. and the matrix is a 2x2.     
asked by 30.09.2017 / 15:03
1
answer

How to prevent a variable from getting negative in Java?

I'm making an Android app in Android Studio where there is a list of items, where you can choose to increase or decrease the amount of each item, so I created two buttons for each item, one to increase and one to decrease quantity, follow templa...
asked by 14.09.2017 / 01:35
1
answer

Checkbox values in array session as string

I want to put a array in the values of a checkbox but as string and so that they are separated by% use in a mysql query array('string1','string2') . These values come from a checkbox for a session: $variavel= $_SESSION['checkbox...
asked by 23.06.2015 / 19:38
0
answers

Integer conversion on Controller Laravel

I have the following data in the controller: $sheets = printerChange::select('folhas'); $sheetsNew = printerChange::select('folhasnew'); $sheetsCompare = (int)$sheetsNew; if(!is_null($sheetsCompare > 0)){ $calcSheets->folhasnew = $re...
asked by 05.12.2018 / 14:21
1
answer

warning: initialization makes integer from pointer without cast [-Wint-conversion]

I have the following code in C that makes a connection to a mysql database and performs a query: #include <mysql.h> #include <stdio.h> int main(void){ MYSQL Connection; MYSQL_RES *res; MYSQL_ROW row; mysql_init(&...
asked by 02.03.2018 / 01:58