Questions tagged as 'loop'

1
answer

How to traverse attributes of a JSON?

I'm trying to traverse attributes of a json, I'm trying that way for (var i = 0, length = r.length; i < length; i++) { for (var i2 = 0,length = r[i].lenght; i2 < length; i2++ ){ console.log("teste"+r[i][i2]); } } How...
asked by 27.10.2015 / 13:06
1
answer

How to loop to generate graphics in R?

Consider the following Data Frame: ITENS <-c("A","B","C","D","E") Q.1 <-c(10,20,10,40,10) Q.2 <-c(5,25,0,50,10) Q.3 <-c(15,20,5,40,10) Q.4 <-c(15,30,5,30,5) Q.5 <-c(20,25,5,20,15) Q.6 <-c(10,20,10,40,10) df <- data.fram...
asked by 10.05.2018 / 02:37
2
answers

Loop Compile Error For

I'm doing a program that asks how many notes the user will type and then enters a 'for' loop asking what the notes are to type. The notes are stored in an array and finally the average is calculated. #include <iostream> using namespace...
asked by 14.12.2017 / 00:15
1
answer

Break loop in java

My Java project is a headlamp control with Arduino. So far so good. However I did a function in which the leds gets automatic in a loop after a RadionButton is selected. My problem is that when I select RadionButton my JFrame...
asked by 18.11.2016 / 07:39
1
answer

No logical error

Hi everyone, I'm trying to do a controlled loop for my program, so far it's normal, only in the first round, in the second repetition it jumps the first pass of the for and starts in the second position if someone wants to see my code : void In...
asked by 13.02.2016 / 19:54
1
answer

how to get the key in a while loop?

Let's say I have an associative array $array=array( "teste" => "1". "teste2" => "2" ); foreach($array AS $key=>$arr){ echo $key; } How do you loop? Do you have any way?     
asked by 04.03.2016 / 22:40
2
answers

C ++ doubts do-while loop

Good people, I have the following doubt: Every time I run this program the do-while loop does not stop at the second loop scanf in the program and ends up running twice and displaying the error message. I'd like to know how to fix this bug....
asked by 15.01.2016 / 13:12
4
answers

Multiplying values within a for

To using the for to generate a loop of 4 reps! Inside this loop I make a very simple numerical multiplication. <?php echo "Resultado: "; for($loop = 1; $loop <= 4; $loop += 1) { echo ($loop * 10)." ";...
asked by 30.05.2015 / 23:13
2
answers

Script to open index.html from multiple folders

How to make a script in bash that: Based on this example url: link Select the 12620 folder. Open the index.html of this folder in a Firefox tab in Kali (Debian) Select folder 12620, add +1, getting 12621, and open index.html from tha...
asked by 20.09.2015 / 21:32
1
answer

How to vary parameters of an equation?

For an equation of type y = ax + b , we have two values for a and two for b , that is, we have four different equations. We already have a code that returns the values of x and y for each equation separately. We...
asked by 23.03.2014 / 20:29