Questions tagged as 'loop'

1
answer

how do I identify the quantity that was repeated and the names repeated?

Make an algorithm in portugol that reads the name of up to 100 people and enter the number of names equal to "jose da silva" and the number of names equal to "ana maria". The algorithm should not accept empty names. algoritmo semNome; // Sínte...
asked by 25.03.2018 / 20:37
0
answers

Upload and display on-screen loop-time with PHP, Jquery, AJAX, javascript

I want to upload an array and at the same time I want to show each file that has been "upado" in a loop, at runtime of the loop, so that the page can not refresh, then load the files on the screen. I'm looking for not only a way to do this, but...
asked by 20.03.2018 / 20:39
0
answers

Run the hook 'beforeUpdate' only once in VueJS

I have a block of code inside the beforeUpdate() hook of the Vue instance, and it is running multiple times in a row. My question is: Is it normal for the beforeUpdate() hook to be called multiple times? If not, how do I avoi...
asked by 09.03.2018 / 21:14
3
answers

When to use recursion and when to use loops?

A problem can be solved and get the same result as a loop or through Recursive calls to a function.
asked by 16.06.2014 / 19:13
1
answer

Check if Node created with insertAdjacentHTML in a loop is "visible"

I'm looking for fragments of HTML with fetch() and adding to DOM with function insertAdjacentHTML() in loop for() ... the function that performs this task is in Promise() and its% return (in case of succ...
asked by 28.01.2018 / 18:51
3
answers

Count sql results in table having or not values

I have a subcategorias table and I have another anuncios , where it has the id of the subcategory. I need to fetch all subcategories and return by subcategory the number of ads it has, the problem is that I'm already generating the...
asked by 06.12.2017 / 12:53
1
answer

Loop Category on Wordpress

Does anyone know how I create a loop to display the categories and how many posts are there in each? Example:    Category-x (15)   Category-y (32)   Category-z (40) Where "category" = category and category name the number is the number...
asked by 04.10.2017 / 17:19
0
answers

Loop interrupts script, but does not give error

I am putting together a list that collects user data. As some data are in different tables (the one of appendices, precisely) I have set up a query select to get only those attachments that have the same id of user (table that I called...
asked by 30.09.2017 / 03:43
1
answer

How to page a foreach from a file_get_contents?

I am querying an API that gives me data formatted in JSON, I collect through file_get_contents and then print all values using a foreach. But there are many values, more than 5,000 items, I need to page them, I tried to limit them using an array...
asked by 03.09.2017 / 02:47
1
answer

String for an array inside a loop - javascript / nodejs

I want to pass the strings of a txt file to an array and as soon as each line was passed to the array the program would run it normally, then it would repeat and pick up the second string from the txt file. Everything is being done in javascript...
asked by 10.09.2017 / 14:42