Questions tagged as 'array'

1
answer

I want to count and quantify Array indexes on onclick control

I want to create a simple paging based on elements within an array. When I get to the first and / or last element of the array, I would like to disable its navigation button (eg, changing from disabled=false to disabled=true )...
asked by 25.01.2017 / 07:32
2
answers

How to sort array in decreasing order?

I have the following problem, after doing a array 'push, I want to return the amount of repetition of a term for this I did: $key = str_replace(array(',','.','https','/','#','!','@','&','?','\',':','\'','”','(',')', 'ª','º','1','2',...
asked by 14.09.2016 / 23:49
1
answer

Count values of elements of an array in PHP

I have the following array , for example: Array ( [0] => Array ( [ID] => 401675295 [DATA] => 2016-06-28 15:33:07 [TITULO] => Teste [TEXTO] => [TIPO]...
asked by 29.06.2016 / 15:33
3
answers

Incompatible types?

I'm passing 3 parameters: a vector with the names of 30 cities, one with the x coordinates of the respective cities and the other with the y coordinates. I need to print on the screen the cities to the north, south, etc. I'm still testing. I...
asked by 07.12.2014 / 02:37
2
answers

Segmentation Fault (core dumped): array reading

I have a problem with reading an array that produces the error    Segmentation Fault (core dumped) This is just the beginning of code development, but it already has an error after reading the first element of array . #include <st...
asked by 22.03.2015 / 14:55
3
answers

Get an array in JAVA

I am new to java, because of this I have the following situation, I would like to get the array in my case 2 of switch , the problem is that it says that the value was not initialized , but I first enter the values and size based...
asked by 20.08.2016 / 21:43
1
answer

How to set up a query with optional conditions?

In the example: SELECT * FROM exemplo WHERE ID in(2, 3, 4) It does if you have these ID in the bank. PHP: $id= implode(', ', $_GET['id']); $nome= implode(', ', $_GET['nome']); $cidade= implode(', ', $_GET['cidade']); $q...
asked by 04.08.2015 / 17:51
1
answer

How to use QVectorQVector double as array?

In mainwindow.h I have: private: QVector<QVector<double> > numbers; //Variável que será minha matriz public slot: void realizar_calcs(QVector<QVector<double> > &numbers); Na mainwindow.cpp void Ma...
asked by 09.11.2014 / 22:14
1
answer

How to get objects from an array, with filter passing as parameter an object with multiple ID's

Associating the "categories" object in "products"; With the IDs that I need to associate with such a product, so for example "products 1" should receive the "categories" with the ID [1, 3, 4]. creating another array by combining the data between...
asked by 23.10.2014 / 23:06
1
answer

Array bug in size 4

I'm asking you the following question: So I did this algorithm: #include <stdio.h> #include <stdlib.h> int main() { int i, j, x=0; int vetor[x]; printf ("Digite o tamanho do vetor:\n"); scanf ("%d", &x); for (i=...
asked by 12.05.2018 / 23:51