Questions tagged as 'while'

1
answer

Cycle is only executed once within a while and should always be executed

listaA = new ArrayList <>(); boolean n = true; while (listaA.size() < listab.size()) { Log.i( "while ordena" , String.valueOf( listaA.size() )); valorAl = nRandom.ne...
asked by 25.04.2018 / 00:30
2
answers

Add value in name

I have a while, and I wanted each loop to be added a different value in name, two two select fields. Ex: First loop first field comes: WeeklyPlan1 First loop first field comes: WeeklyGirl2 Does anyone have any ideas how I can do this?...
asked by 29.04.2018 / 00:59
0
answers

Query by part in SQL clause IN

I have to query more than 400 thousand records in the IN clause. It turns out that I can not do everything at once because I can crash the system of my company. So I have to run at a specific time and every 5,000 at a time. But I do n...
asked by 11.04.2018 / 15:20
1
answer

Calculating mean while sequence

I'm solving college exercises, but I caught myself in one: The exercise asks me to calculate the even numbers between two integers, and in the end, I do the arithmetic mean between the pairs. What I've done so far: int main() { int n...
asked by 06.04.2018 / 18:36
1
answer

Delete the last number that I typed

Friends, one more doubt (^^). Look at the following code: Numero = int(input('Digite um Numero')) inteiro = [] inteiro.append(Numero) while Numero>0: Numero = int(input('Digite um Numero')) inteiro.append(Numero) if Numero<0: pri...
asked by 05.03.2018 / 18:02
0
answers

About array foreach while loop for ... to leave results in alphabetical order

<? $n = 0; $limite = 10; while ($n <= $limite-1){ $dates = array($user["members"][$n]["rank"]); foreach ($dates as $value){ echo $value; } $n++; } ?> It returns the following value: 87 41 34 32 88 26 16 26 48 0 But I would like...
asked by 18.02.2018 / 04:57
1
answer

php, bring multiple rows from a linked table to another table of a single id

Hello, I'm having a hard time retrieving information. EDITING TO IMPROVE THE QUESTION Below is the code, In the data for printing, I need to show in the variable $ comp when it belongs to the same id_cadastro I am querying, so far so...
asked by 15.02.2018 / 03:09
1
answer

while read does not work in Unix shell script

I am programming a script and using while read twice it does 1 only once: un=$(echo $LOGNAME | tr '[A-Z]' '[a-z]') grep -v '^#' nodeteste.txt > auxiliar.txt while read line do ssh "$un@$line" "cat arquivo" > arquivo.externo cu...
asked by 13.02.2018 / 18:59
0
answers

How do I while with mysql to autogenerate scripts to populate the database

People, my problem is this, I have to populate a database based on an excel table, and for each entry in the variable quantity a new row should be added in the table, so I developed this logic where I am going to populate the data using =CONC...
asked by 30.01.2018 / 19:43
0
answers

do / while repeats twice the expression [duplicate]

The do / while prints on the screen the expression twice in the first run, as in the photo. I did the debugging and this does not happen, which made me think that it could be IDE error, but I tried it in eclipse and the same thing happens. I a...
asked by 13.01.2018 / 12:04