Questions tagged as 'array'

2
answers

removing the commas and sorting with php mysql

I have a problem here to solve ... I take the numbers that are grouped with commas in the bank. Separate with explode Ex: $dados = "36,38,40,42"; $separar = explode(",",$dados); $result = $separar[0]; Now comes the doubt ... how to list th...
asked by 03.05.2018 / 00:26
1
answer

Select Mysql with an array in a table

I have a table in the bank called actuation, in which generated the ID's of the areas chosen by the user ex: 1,5,4,9,15 I need the result of the query in Mysql to return all the users that have been selected in a checkbox list Can someone...
asked by 29.04.2018 / 17:16
1
answer

Group json with PHP?

How do I group a json according to a field? I have the following json: { "origem": [ { "id": 154826, "nm": "", "tp": "", "am": "", "sg": "SAO", "sq": 925 }, { "id": 2289, "nm": "...
asked by 25.04.2018 / 19:11
1
answer

Declare array in class not knowing what its size will be

How to declare an array inside a class, even though it does not know how large it will be, and make it accessible throughout the program. Note this class: class exemplo{ public: int tx{0}; int ty{0}; int array[tx][ty]; // se eu tentar d...
asked by 29.05.2018 / 19:45
1
answer

Separate values from a list of summaries in R

From the previous question How to execute a looping in R and save the results of a summary in a vector I have a list of 20 summaries with values calculated from a specified template. One of the answers obtained is of the form smry_list[[2]]...
asked by 18.04.2018 / 14:22
1
answer

VBA - Popular array string and no repeat values

I have an Excel WorkBook x. This WorkBook has 3 spreadsheets. The 1st is still empty; the 2nd is Birds and we have repeated values and the 3rd is Mammals also with repeated values. How do you populate a string array with the values of Birds a...
asked by 21.03.2018 / 06:10
2
answers

Function that returns vector

How to return a vector inside a function? And what do I call it in the main? This return in case: (return vector;) #include <conio.h> #include <stdio.h> #include <stdlib.h> float UK (int mat[4][4], float w[3]){ float *vet...
asked by 22.04.2018 / 00:19
2
answers

Help with Multi Array

Hello, can anyone help me with how to create a list with php this type of array. The data comes from two tables, Categories and Products. I'm using MySQL to fetch the data from the two tables. My tables: Categories = > id, name Pr...
asked by 17.03.2018 / 20:35
1
answer

Error counting values repeated in a vector

I'm trying to make an issue count the number of times that each value appears in the vector, which I tried, just count a number repeated, could someone help me with logic, Example of input 8 10 8 260 4 10 10 Output 4 appears 1 time (s) 8 appe...
asked by 25.04.2018 / 15:45