Questions tagged as 'array'

2
answers

Get higher value in an array of numbers

Through given a function, I return an array with numerous random numbers. I need to get the largest number between this array, and for this I ended up finding the Math.max() function. The problem is that I can not get it to read my array...
asked by 25.05.2015 / 21:10
2
answers

Problem with String.Split

My problem is this: I want to get different objects from a string , dividing them by the character ; , except those in parentheses. Example: Linha1; Linha2; L i n h a 3; (linha que não quero que apareça; outra; mais uma;) Linha 4;...
asked by 07.06.2015 / 02:23
2
answers

Differences between array declarations

What's the difference between declaring an array like this: 'C# string MinhaMatriz[] = [] 'VB Dim MinhaMatriz() As String = { } and so: 'C# string[] MinhaMatriz = [] 'VB Dim MinhaMatriz As String() = { } or so: 'C# System.A...
asked by 26.06.2015 / 23:09
2
answers

Error displaying the sum of three read arrays

#include <stdio.h> #include <stdlib.h> int main() { int i, notas[5]; int soma = 0; for(i=0; i<3; i++) { printf("Digite os tres numeros:\n"); scanf("%d", &notas[i]); } for(i=0; i<3; i++) {...
asked by 18.05.2015 / 22:49
2
answers

Is there a function to reindex a multidimensional array?

Well, I need a help, I have a function that returns the following array: Array ( [0] => Array ( [0] => valor1 [2] => valor2 ) [1] => Array ( [0] => valor3 [1] => valor4 [...
asked by 27.11.2014 / 12:35
1
answer

Advanced ordering of items in an array

I have an advanced report, which ultimately sorts the items based on your score: // Variável $relatório contém dados levantados e calculados em blocos para N itens. Cada bloco possui uma pontuação total do mesmo. // Ex: $relatorio[0]['consoli...
asked by 24.03.2015 / 20:27
1
answer

Check if a value is present in an array

I have a table in my database with multiple numbers. I get the numbers from the database, I save in array , and I make echo in a table in PHP: echo "<table class='CSSTableGenerator'>"; echo "<tr>"; echo "<th>ar...
asked by 08.08.2015 / 17:28
2
answers

How do I subtract arrays

array_intersect_ukey($result1, $result2, 'key_compare_func2') // primeiro array array_intersect_ukey($result2, $result1, 'key_compare_func2') // segundo array Result: Array ( [bife] => 3 ) Array ( [bife] => 2 ) Desired: Ar...
asked by 17.09.2014 / 03:52
2
answers

Any method to save the data of an ArrayList

First of all, some information:   .NET Framework 4.0 Visual C # = = I am simulating a database using a class specifically for this, using a List<string[]> , however, I would like to be able to store and save this data even...
asked by 26.04.2014 / 02:12
1
answer

Conversion difference from Array to ArrayList with "asList" and with constructor

What's the difference between these two ways of converting an array ? If there is any difference, does it impact performance? List<String> list = Arrays.asList(meuArray); ArrayList<String> arrayList = new ArrayList<String>(...
asked by 05.11.2018 / 13:52