Questions tagged as 'while'

1
answer

Problems with the 'continue' or 'while' command in Python

So I was doing some exercises in python, the language in which I'm learning to program, and it seems to me that the execution flow is not following correctly. # Converte distancia def mettocent(met): cent = met * 100 return cent def c...
asked by 21.09.2018 / 21:27
2
answers

Store all records in a table in a variable (PHP)

I need to query my MySQL database and store all rows that are returned within the $dadosBrutos variable. The purpose is for each line to be separated by the character "§", for example: nomeCliente1,telefoneCliente1§nomeCliente2,telefon...
asked by 27.12.2018 / 02:32
1
answer

Error while using while generating barcode

First: I'm using the function below and I'm implementing a chile. Reason: I need to generate several codes, for example: 1 2 3 4 5 .... 98 99 100, follow code: <?php $i = 1; while ($i <= 100) { function geraCodigoBarra($numer...
asked by 19.08.2016 / 01:36
2
answers

Bootstrap Modal Loop While Opening item within Modal

I think it's a question of putting the code in the right place, but I'm breaking my head and I can not ... I tested the default BootStrap code, where it works on a button. I even put the data calls inside it and it worked. The question now...
asked by 27.08.2015 / 18:21
1
answer

Select from all users with only one result of each user [duplicate]

Hello, good evening. I think the title is a bit confusing, I'll try to explain it better. I'm doing a chat system and I'm wanting to list all user conversations, but only one message from each user. Example: Itisshowingallmessagesfromth...
asked by 23.04.2018 / 06:31
2
answers

What does while (x--) mean in C language?

I came across this code and I did not understand the while(a--) loop, what does it mean? int main(){ char pisca[10], a = 3; short numero; while(a--){ numero = 0; while(1){ scanf("%s caw",...
asked by 08.04.2018 / 05:53
1
answer

n = 1 in the while condition returns no value

Good evening. I'm starting to learn java and did a swing program that calculates the factorial of a number. I did using while, and in the condition, I tried to do with the condition (n >= 1) (I'll put the code snippet below), and th...
asked by 10.01.2017 / 00:55
2
answers

Where to use accumulators in an odd and even evaluation algorithm?

Where should I fit the accumulators of this code I wrote for now? #include <stdio.h> int main() { int N; int somapar; int somaimpar; do{ printf("\n Digite um número qualq...
asked by 13.10.2016 / 21:17
2
answers

PHP logic: how to construct this looping (for, while, foreach)?

Good evening. I'm in the following situation: I'm reading an XLS and playing in a table. This XLS has 52 rows and 6 columns. What I'm getting caught up to do is: $result[linha 1][coluna A] $result[linha 1][coluna B] $result[linha 1][colu...
asked by 03.01.2016 / 04:27
1
answer

The Bitsnoop API is catching WHILE

Hello, I'm using this Bitsnoop API , but a part of it is "locking" WHILE. WHILE only runs once and nothing below it loads. Code: if($sql = mysqli_query($coneccao, "SELECT * FROM arquivos_downloads WHERE nome LIKE '%$palavra_chave%' ORDER B...
asked by 12.05.2015 / 23:30