Questions tagged as 'for'

2
answers

"goto" command creating infinite loop in loop "for"

I want to simulate a school database that collects names, math and physics grades, and calculates the mean of both to 5 students (defined in a string of struct ). Any grade above 10 would be allowed, with no lock for that. Students wo...
asked by 28.09.2017 / 14:52
1
answer

How to transform a while structure in for? And vice versa? [closed]

I'm needing an explanation on how to transform a structure in while to for and vice versa. Thanks in advance for any help!     
asked by 28.04.2016 / 04:02
2
answers

How to do an ordered listing by letter?

I suppose I have a list of names in array in Javascript. But I'm looking for a suggestion box style, where you just press an alphabetic key inside the field and as soon as you get key word tips for the letter you typed in. Here is a simple...
asked by 30.03.2016 / 19:50
1
answer

Next loop element

I'm trying to implement a commit search algorithm between two tags with the git log tag1...tag2 command. For this I used the command git tag which returns the tags of a repository. With this result, I thought about iterating ove...
asked by 23.11.2018 / 18:47
1
answer

How to sort items in a list using two different values?

I have a list , which contains several values, each group of values corresponds to an audio of a language, but I am not able to sort using two conditions. audio_list = [{640: 640, 'lang': u'en', 'language': 'English', 'lang_code': 'en',...
asked by 16.10.2018 / 16:48
2
answers

Difficulties with FOR command in Python [closed]

I'm putting together a program that reads information about angles and distances from a text file and draws it according to the information contained therein. The program should also calculate the azimuths, and that's what I did, these variables...
asked by 21.12.2018 / 14:39
1
answer

How to make this FOR (in C #) list only the top five items?

I have an ordered list, that I need to display only the first 5 items, not all the bank records, so I'm not getting it. Here is my code as it is: public class DashboardController : Controller { private NFeWebContext db = new NFeWeb...
asked by 28.05.2018 / 16:00
2
answers

How can the end of "for" be a user-defined variable?

In a for in C, we define "start, end and increment step. " I know Python is not like this. I saw it called foreach . I wish the end of my for to be defined by the user. And that, at each iteration until the end of for, a value was requested...
asked by 12.05.2018 / 11:39
1
answer

How to pause and continue after an event?

To with this code here: function aparecer(){ const array1 = [1,2,3,4,5,6,8,9,10]; for (let i=0; i < array1.length;i++){ const lugar = document.getElementById('local'); const ul = document.createElement('UL');...
asked by 19.02.2018 / 19:30
1
answer

How to move an array in the correct way

Good evening guys, I'm having a lot of trouble with arrays ... I have the following array: array(6) { [0]=> array(1) { ["cep"]=> array(2) { [0]=> string(8) "15070650" [1]=> string(8) "03216040...
asked by 07.09.2018 / 23:13