Questions tagged as 'for'

3
answers

Display success message once in loop for

I have the code: for ($i=0; $i < count($descricao); $i++) { $id_caixa_hoje = $linha['id_caixa_hoje']; $valor_formatado[$i] = abs($valor[$i]); $inserir = mysql_query("INSERT INTO caixa_valores_extras (id_caixa...
asked by 14.09.2017 / 18:11
2
answers

Calculation of the smallest divisible number giving infinite loop in C

I made a program in C to solve the following exercise: Code:#include"stdio.h" #include "stdlib.h" int main(int argc, char const *argv[]) { int num = 0; int count = 20; int contaDivisores = 0; for(int i = 1; i <= count; i++){ for(in...
asked by 20.04.2017 / 00:44
1
answer

How to show 5 in 5 hidden elements?

I've recently been hit with a question, for which I have to manipulate a number of elements hidden through display:none; which is set on the span that surrounds all of them. Example <html> <head> <sc...
asked by 15.02.2017 / 23:06
2
answers

How to use an existing variable as a counter

My goal is to get the alphabet letter that the user typed in and show, how many times he typed, the letters that preceded him and his successors, do you understand? Here's what I did: static int v; static String[] Alfa = {"A", "B", "C", "D", "...
asked by 15.10.2016 / 03:59
1
answer

Javascript + PHP

Hello, I need your help; I have my While in PHP listing all the materials, their quantities and a space where the Total is calculated as the quantity of the product increases. Here's my PHP: <?php $dadosMat...
asked by 03.04.2016 / 03:50
1
answer

For without the use of key

#include<stdio.h> int main ( void ){ int row; int column; for ( row = 1; row <= 7; row++ ){ for (column = 1; column <= row; column++ ) printf("*"); printf("\n"); } printf("\n"); }...
asked by 15.12.2016 / 01:14
1
answer

Ignore element in JSON with PHP

Let's say we have a JSON with 2 elements below: exemplo: { [{ "arquivo": "Arquio 1", "size": "2340" }, { "arquivo": "Arquivo 2", "size": "0" }, { "arquivo": "arquivo 3", "size": "4329" }    U...
asked by 19.04.2016 / 23:50
1
answer

How to run multiple FORs at once

In the code below I have 4 for and they run in sequence, but I need them to run all at the same time. public class main { public static void main(String[] args) { long init = System.currentTimeMillis(); ataque(999999, 999999);...
asked by 06.07.2015 / 22:38
1
answer

Sort vector from lowest to highest

PHP: array_push($var, $linha['data']); array_push($var, $linha['data_t']); array_push($var, $linha['data_f']); usort($var);// Adicionei essa linha para tentar formatar as datas da menor pra maior mas retornou o erro Warning...
asked by 29.08.2018 / 22:41
1
answer

How do I put a countdown timer on more than one publication on the page?

Good morning! I have the following problem, I have the view below that works as a timeline, inside it I have some publications. I get to each of the publications and get the amount in minutes that are missing to expire / start. The problem is th...
asked by 27.07.2018 / 14:28