Questions tagged as 'for'

1
answer

show the value of the children inputs of divs js

I need the for / while to display on the screen the string placed in the input of the first div the first time the loop is executed and the second time it shows on the screen the string placed in the input of the second div and so on. > <...
asked by 06.07.2018 / 16:27
1
answer

How to print on screen or console, an array of strings in php

I've been seeing the documentation but it's not clear how I do it. I have an array of strings: $remetente = $con->real_escape_string($_REQUEST['rem']); $arrai= array(); $remetenteArray[] = str_split($remetente, 1); As you can see, $re...
asked by 27.05.2018 / 14:53
1
answer

(JAVA) Error in foreach

Why does an error occur in executing the code below if I remove the break? The value of the ArrayList client is not updated every time it completes the? for (Cliente cliente : clientes) { if (identificacao==cliente....
asked by 15.04.2018 / 19:36
1
answer

Update value using For each event

I have this code here: var current = 0; var array1 = [1,2,3,4,5,6,8,9,10]; function aparecer(){ //verifica se o current é maior do que o array if ( (array1.length - 1) < current ) { alert("oi"); //isso deveria parar a fun...
asked by 19.02.2018 / 21:01
1
answer

NodeJS - Wait for 'for' to execute all 'pool.query' until the end

I have a small problem, and no matter how hard I tried to find a solution, I can not think of an excellent one. So I come to ask for your help! So here's the thing: I'm currently developing a betting site (from CSGO game skins) and my problem...
asked by 30.10.2017 / 18:25
1
answer

Create JSON with javascript

I would like to know how to create a json by taking the data from another json using a for var imdb = { "title": "Justice League", "content_rating": "PG-13", "original_title": "", "metadata": { "languages": [ "English"...
asked by 14.11.2017 / 19:01
1
answer

Question about vector [closed]

I'm trying to list the numbers that the user types but I'm not finding the function, can anyone give me a light? class Program { static void Main(string[] args) { int[] atividade = new int[6];...
asked by 19.08.2017 / 04:13
2
answers

Array returns wrong value in java

I have a question about a college job. I can read with numbers, remove the ";" and pass the values to the array while reading the file. However, when I try to access an array position outside of the file read, it does not return the value I have...
asked by 08.06.2017 / 01:17
1
answer

What is the explanation for the following question

This is a java certification simulation issue at Whizlabs. public class Whizlabs { public static void main(String[] args) { int[] testData = {1, 2, 3}; for(abc){ } } } The question is: "Choose the option to r...
asked by 14.05.2017 / 04:10
2
answers

Major / Minor / Sum in C ++ using 'for'

I want to make a program that reads 5 numbers and tell me the largest number, the smallest number and the sum of the numbers, in C ++ using the for loop. I tried and did so: #include <iostream> using namespace std; int main()...
asked by 08.04.2017 / 13:19