Questions tagged as 'loop'

1
answer

What error in this while PHP?

The code below selects all results whose thumbnail of the video has not yet been created and if it was not, it creates a new one, but I'm getting an error that I can not find the solution: $video = BD::conn()->prepare("SELECT * FROM epi...
asked by 06.02.2017 / 15:51
1
answer

Loop code with condition not satisfied [closed]

import java.util.Scanner; public class CodigoDeBarras { public static void main (String[] args) { do { Scanner sc = new Scanner(System.in); System.out.println("Informe os primeiros 12 caracteres...
asked by 30.08.2017 / 21:38
1
answer

Array loop problem - JavaScript [duplicate]

When I try to loop, I do not even want to get into the for, I already checked and the array with the object is not empty, but it does not execute the loop ... Any ideas? var caminho = []; $.get("http://localhost/crocs/arquivo.json", functio...
asked by 11.10.2018 / 22:32
1
answer

"String index out of range: 5"

The error mentioned in the question in my program in java is occurring. The program is a bar code reader. The user informs the code digits (with the exception of the last one). The sum of the numbers q is in the odd position, and the odd numb...
asked by 31.08.2017 / 19:10
1
answer

Python Replay Structure [closed]

I need to solve the following equation in Python    N is an integer and positive value. Calculate and show the value of E according to the following formula:       E = 1 + 1/1! + 1/2! + 1/3! + ... + 1 / N! My attempt: n = int(input("Di...
asked by 13.09.2017 / 17:00
3
answers

Count how many times each character appears in a string (without using a function)

I have the doubt in a question of string exercises that I am doing. The question is this below:    Write a program that reads a string and prints how many times each   character       appears in this string       1st string: TTAAC      ...
asked by 26.03.2018 / 06:02
1
answer

How does an infinite loop [closed]

How do I handle the exception below: Fatal error: Maximum execution time of 30 seconds exceeded in ...     
asked by 12.10.2014 / 23:47
1
answer

jquery - capture content from all divs with a set class

I have a schedule that I want to hide when all days of the week are closed. So I did this function that analyzes if the content of the day is Closed and if all 7 days have Closed it hides the agenda. $( document ).ready(function() { va...
asked by 28.06.2017 / 18:56
2
answers

Compile error [closed]

I just started AI and I do not get too much of it ... The idea was to use while to show us all even numbers up to 100 but it is always giving error and I have not been able to fix this yet. while (i <= 100) { i += 1; if (i % 2 =...
asked by 03.11.2016 / 16:27
1
answer

How to do an infinite count loop in Java?

I'm starting my studies with Java now and would like to know how to do an infinite count I'm having difficulties, since I know that in Python it would be something like: a = 0 while True: a = a + 1 print(a)     
asked by 19.11.2018 / 18:42