Questions tagged as 'array'

1
answer

What does i-thimo mean in an array?

What i-th means, I'm having trouble understanding its use in arrays and arrays.     
asked by 15.02.2016 / 14:57
2
answers

Order array for a property

I'm trying to sort an array by a specific property (weight), I found some possible solutions but they did not work for me, could anyone tell me where I'm doing something wrong or another way out of my need? How am I trying to sort: functio...
asked by 19.03.2014 / 15:52
2
answers

How to retrieve a large array in PHP quickly?

In the example below, I have a array in PHP with about 128,000 records that I retrieved from another file, and I use it in some applications to compare indexes as HashMap . > array(128521) { [0] => string(3) "aba" [1] =>...
asked by 11.01.2014 / 07:34
1
answer

How to make a function inside a function return a vector?

I have a job for my course, and it is necessary to make a program similar to the megasena game. It's almost ready, but I'm finding a little problem and need help. Data of the work: maximum of 10 players can bet, each one can bet from 6 up to 15...
asked by 29.05.2014 / 23:08
1
answer

Sort numeric vector without using Bubble sort

We usually learn in college that to sort entire vectors, we use a technique called bubble sort : int[] vetorOrdenado = new int[8]; vetorOrdenado[0] = 2; vetorOrdenado[1] = 41; vetorOrdenado[2] = 12; vetorOrdenado[3] = 6;...
asked by 27.01.2016 / 02:20
4
answers

Removing a specific element in an array

I have the following array $input = array("item 1", "item 2"); But since it is dynamic, items can change $input = array("item 2", "item 4"); $input = array("item 4"); Is it possible to use array_splice to remove, if it exists,...
asked by 01.08.2014 / 19:36
3
answers

How to check if an item is contained in an array?

What am I doing wrong in this if ? if (angular.uppercase(nome[id]) in ['A', 'E','I', 'O', 'U']) { .... } If I only do this, it works. But I'll have to repeat it to others. if (angular.uppercase(nome[id]) == 'A'){ ..... }...
asked by 25.12.2015 / 20:57
1
answer

What is the function of the array?

I'm studying algorithms with Portugol and I'm having difficulty understanding the vector's function in code. I already know how to use this structure.     
asked by 22.04.2016 / 22:10
2
answers

C ++ - Size of an array pointer

I have an array: char *exemplo[] = {"item1", "item2", "item3"}; And a function: void myFunc(**myArray) { } So, I want a function that returns the size of this array that I passed as a parameter. For example if I pass the array exem...
asked by 16.05.2014 / 21:18
3
answers

How to make the first two numbers of a Math.random sequence are not EQUAL

I made a lottery system in order to learn, I will not post the whole code here just the part that I am packed. It is as follows: The draw of the PC is a sequence of 6 numbers that I present in the DOM (it does not matter), so I want the first...
asked by 05.10.2014 / 07:02