Questions tagged as 'array'

1
answer

Insert field in table and compare if already exists, with JQuery

Good morning! I'm inserting products into a table with JQuery, similar to a shopping cart, and need to compare if the product has not been inserted before. I tried with the code below, but this is giving problems when comparing with the array, W...
asked by 17.04.2018 / 16:01
1
answer

How to copy values from one vector to another quickly

I'm making a question that the number of elements in the vector are in 10 ^ 6 and just wanted to copy certain element to it only I did the normal but common way, is there another possibility if I make the copy faster? > for(i = 0; i < teste;...
asked by 18.05.2018 / 18:27
2
answers

Treat for undefined index in the array

Dear experienced developers and apprentices of the art of coding. I think it's common for some system to have to check the next item for a array . For example in this case I'm checking if the next one is the same as the previous item:...
asked by 16.02.2018 / 13:46
3
answers

Dynamic Array - Android

How to create a dynamic array in this way: //Apenas um exemplo abaixo: String valor0 = "1;2;3;4;5;6;7;8;9;0"; String valor1 = "1;2;3;4;5;6;7;8;9;0"; String valor2 = "1;2;3;4;5;6;7;8;9;0"; //Um array dentro de outro array, porém sem definir s...
asked by 05.04.2018 / 22:31
1
answer

system with CRUD

I'm graduating in Systems and I'm developing a system, and my difficulty is to remove an element from an array, because the problem in question is that when it has more than one element it normally removes, but when it has one it does not remove...
asked by 11.12.2017 / 15:53
1
answer

Separate an array of JSON into columns and rows

I'm getting an array of JSON in the back end like this: {"idDistrito": "23", "nome": "rere", "codigoDne": "154545", "cns": "565665", "entidade": { "idEntidade": "1", "nome": "Entidade 01" }, "e...
asked by 11.12.2017 / 12:37
1
answer

How do I echo echo in array

public static function getAllCount(){ $sql = "SELECT COUNT(Title) from ".self::$tablename." GROUP BY category_id"; $query = Executor::doit($sql); return Model::many($query[0],new EventData()); } FOREACH --- foreach ($evcount as...
asked by 01.11.2016 / 17:54
3
answers

Can I store values without using static vectors?

I need to create a sparse array of type dynamic cross-list and my cells are of type: typedef struct CELULA{ int linha; int coluna; double valor; }CELULA; However, every time I create a new cell in a function, I do not know how...
asked by 05.11.2017 / 12:40
1
answer

Slow down file restricted file

I have a file in php proceso.php that receives information in looping via jquery and makes a request to another page with curl, this file does something around 4 to 5 thousand requests one by one, everything worked much more after I restricted a...
asked by 04.11.2017 / 05:36
1
answer

Error in the average calculation of a student record

printf("Nota 1: "); scanf("%.1f", &alu[n].not1); printf("Nota 2: "); scanf("%.1f", &alu[n].not2); alu[n].media = (alu[n].not1+alu[n].not2)/2; // o erro acontece NESSA LINHA    invalid operands to binary + (have 'float *' and 'float *'...
asked by 02.11.2017 / 21:40