Questions tagged as 'for'

1
answer

How to replace the contents of an array?

I have a div (mosaic of users) that inside it has a array (javascript) with photos of users (data coming from the bank). The number of user photos must be less than or equal to 15. If array has less than 15 users (photos), i...
asked by 01.11.2016 / 14:31
1
answer

Java - Swing - Timer with TimeUnit.sleep

I'm using Swing in NetBeans, creating a simple math game (I find it more viable than a calculator) whose goal is to add the random numbers of the buttons until it equals a number between 1 and 10000, which would be shown randomly. I used for...
asked by 22.03.2016 / 20:46
1
answer

Problem with FOR loop interaction using TStringList

I have TStringList that stores absolute path names of some files and I want to put those names in a text file only if the current checked name does not yet exist inside a text file. When you perform these steps for the first time, all...
asked by 23.04.2016 / 13:24
1
answer

Count number of occurrences in a for loop {Bash}

I have the following script #!/bin/bash for file in *.jpg; do convert $file -resize 1920x1080! -blur 0x8 alterado$file; echo "A Processar o ficheiro $file" done I want to echo with    The processor the xpto file (1 of...
asked by 11.11.2015 / 20:03
1
answer

How to loop a PHP array

Hello, I have this array that is inside another array and I would like to read it, but I will never know how many keys the array items will have, since it can always be increased or decreased, but what I was trying to do was foreach ($dat...
asked by 19.12.2018 / 12:27
1
answer

Split base with "for" in R

As my first for in R I found it difficult to apply this function. I have a base that has a base date with different years and I would like to split the base by base dates. The variable "date" has a split date from January 1995 (199501) until...
asked by 29.06.2017 / 22:53
0
answers

Add value in sequence to the end of the value of a php array

I would like to add values in sequence to the end of each value in my array. So that when the loop is executed add values to the end of my array. Example in pseudo code: // Array original $arr = ['1' => '1.','2'=>'2.']; FUNÇÃO QUE ADICIO...
asked by 23.12.2018 / 01:47
1
answer

AJAX request with FOR

My real question is: do you understand why your loop executes in the first ajax request, only to then loop in the second ajax request? Today I have this result: HTMLandJScode<html><head></head><body></bo...
asked by 05.12.2018 / 18:21
0
answers

Library keyboard applied within a for loop

I have a code with a loop. Within this loop that is running, I need to make the option that each time I press the letter O, a certain value x (previously defined by me in tbus ) is added to a given account in this loop for only one (the ac...
asked by 21.11.2018 / 01:54
1
answer

Go adding values from for into array

I created an array: var tagListArray = []; for(i = 0; i<resultados.item(i); i++){ tagListArray = ["valor1", "valor2"]; } console.log(tagListArray); This resultados.item(i) returns me values, how do I add them to the array?...
asked by 08.11.2018 / 14:37