Questions tagged as 'array'

2
answers

PHP array_push in array inside another array

Good evening, I need to create a code in php that meets the following situation: I have an array of arrays $ arrayTudo = [$ array1, $ array2, $ array3]; I calculate an X value and I want to throw it in array1, for example. It could be in a...
asked by 24.03.2018 / 01:44
0
answers

Problem writing to datagrid column

I've broken my mind about it, but I can not do it haha I need the second column of my grid to do an arithmetic mean of the two values in the previous column and row. In this print, for example link , Xi should have given 2,66 but gave 0,...
asked by 24.03.2018 / 06:39
1
answer

C separating string with commas into vectors

I want to separate each line of a file into 2 vectors: v [i] .date and v [i] .value. However, when I run the code, no value I print is correct, and the outputs are random values. Is there something I should change?    Input   02/20 / 18,1140...
asked by 19.03.2018 / 17:48
1
answer

Multiply value in array

How do I multiply the elements of an array? What am I doing wrong? For example, if I have: int numbers[]={1,2,2,4,5,6}; and my card_block is 2, the remainder would give 1x4x5x6 = 120; int countCards(int [] cards, int BLOCK_CARD){ int...
asked by 19.03.2018 / 00:51
1
answer

Why does the array get too many lines?

private void abrirLabirintoToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog Abrir = new OpenFileDialog(); Abrir.ShowDialog(); string CarregaArq = null; string teste = null; //s...
asked by 16.03.2018 / 01:34
0
answers

Error returning next value to be removed in array

How do I remove a value from an array by putting -1 in place, and return the next index that has a value to be removed? Since this function should already return a position that has a value to be removed, I would not need to either verify and on...
asked by 28.03.2018 / 18:21
1
answer

Array help with multi-level PHP?

I'm getting this array : Array ( [0] => {"Status": {"Alerta": ["Uma ou mais companhias n\u00e3o retornaram voos"], "Erro": false, "Sucesso": true [1] => Busca": {"Criancas": 0, "Adultos": 1, "TipoViagem": 0, "Trechos": [{"D...
asked by 15.03.2018 / 17:25
1
answer

Reading files in Java

public static void loadfile(stock []a) throws IOException{ String fich; File fichDad; int i=countDatas(a); while(sc.nextLine().length()!=0); do{ System.out.print("\nQual é o nome do ficheiro q...
asked by 15.03.2018 / 17:13
0
answers

Print on-screen array as text

How do I print the contents of an array on the screen using text () in the processing language? I have the array parts: final int MAX_SIZE=56; char[] pecas= new char[MAX_SIZE]; I added 6 in the array. The rest is empty. When I use a loo...
asked by 14.03.2018 / 00:08
0
answers

Write an array with a loop in the bank with ajax and php

I would like the help of you to insert into the bank with ajax, being that I have to do 3 insert, in 3 tables in the bank. There are several questions in a single insert, so it's an array. The answers pertaining to each question are also an arra...
asked by 14.03.2018 / 20:56