Questions tagged as 'while'

2
answers

Using links with PDO in PHP

I'm trying to create a PDO loop where I can choose the desired field to position it on the page. But the code I'm using is bringing all the fields in one go. My code looks like this: include("libraries/conn.php"); $sql = "SELECT content...
asked by 19.07.2018 / 16:29
1
answer

Why use Kernel # loop instead of begin-end-while / until?

I'm doing a repeat structure in Ruby using the following structure: begin [código] end <while/until> [condição] But RuboCop , which I use as a linting tool, says that I should use Kernel#loop with break . So: loop...
asked by 03.12.2017 / 15:52
1
answer

What's the difference between the "while" structure and repeat in VisualG?

What's the difference between the "while" structure and repeat in VisualG? Do you have an example?     
asked by 20.11.2016 / 16:44
2
answers

Convert File Names To Alphabet Letters

Convert File Names To Alphabet Letters For example , I have several image / photo files in a directory, and I want to pass these long names of their images into names designated by the letters of the alphabet Before IMG01-03082016.j...
asked by 21.08.2016 / 17:29
2
answers

While code does not do the correct condition

I need to create a code that reads only a double and registers in two variables the "lowest so far" and the "largest so far", I can even successfully complete a cycle but after that it prints any value that I enter. I tried some ways t...
asked by 07.11.2015 / 19:00
3
answers

Iteration using "while"

I have a little trouble understanding while and I came across an exercise that asked me to do the following: Read N sequences and find out how many 'f's' in each sequence. I can not use for on this issue. My code looks like t...
asked by 10.12.2018 / 22:11
1
answer

How to change the Cartesian coordinates of files, in an automated way

I have a certain folder with several files, and these in turn, contains in its interior description of Cartesian X and Y coordinate points. However, I want to replace these points automatically and dynamically, ie use while to run all...
asked by 18.06.2017 / 15:08
1
answer

I'm not understanding loops while nested

I'm having trouble understanding this code, because I do not understand how it behaves in 'while' loops, it follows instructions after the code. Obs1: I'm learning programming logic still, so       I'm "hitting head" with simple codes. Obs...
asked by 31.03.2017 / 17:49
1
answer

Table with 2 td with select inputs displaying return only on the first line

I have 1 table with 1 list of modules, and I have 2 columns that have some options that can be chosen through select.   The issue is that the select's only loads the data in the first row of the table, the next comes out blank, I think that's t...
asked by 06.09.2017 / 06:03
2
answers

While not loading records

I'm trying to repeat a region however, although mysqli_num_rows indicates that it has 9 records, in the while nothing is coming. My code looks like this: $qry = "SELECT pe_orclinhas.id_orclinha, pe_orcgrupos.grupo_orc...
asked by 20.04.2018 / 15:07