Questions tagged as 'array-multidimensional'

1
answer

Vector ordering of character vectors with qsort stdlib.h

The next program is not ordering the chars vector vector correctly, but I do not know why. Maybe it's my helper function "cmpstr" that is not returning the right value in some cases, or my qsort call ... What's wrong? #include <stdio.h>...
asked by 16.06.2016 / 06:54
2
answers

Sum of multidimensional array values in PHP

I'm building a shopping cart and I'm using sessions to save the cart products. The array structure that saves the items is as follows: $_SESSION['carrinho'][ID_DO_PRODUTO;TAMANHO_SE_HOUVER] => QUANTIDADE An example of items in the shoppi...
asked by 29.12.2014 / 20:53
1
answer

Change sequence values of a multidimensional array

In the Framework I develop (PHP language), I use multidimensional array to generate HTML reports. There is a particular report that I can not sort properly in the SQL query, having only all the data I want to sort after array formation. Ar...
asked by 25.06.2014 / 20:33
2
answers

How to decode a JSON array [{}, {}] on my android

How do I transform this string into an array on my Android so that I can manipulate it? [{"id":"1","login":"Admin","senha":"Admin","nome":"Admin","msg":"Eba","logado":"0"}, {"id":"7","login":"Daniel","senha":"1234","nome":"Daniel","msg":"","...
asked by 20.05.2014 / 18:17
0
answers

Function to multiply each row of a matrix by the value of its corresponding secondary diagonal

I can not get the values of the secondary diagonal of an array by a function. /* 19) Elabore uma sub-rotina que receba como parâmetro uma matriz A(6,6) e multiplique cada linha pelo elemento da diagonal principal da linha. A sub-rotina deverá...
asked by 24.07.2018 / 21:08
0
answers

Write data from a Multidimensional PivotTable Array

Personally, I'm having a hard time on my Back-end. In a form I am sending data with dynamic data using for example name="qtd[]" . As far as beauty, in my PHP, I'm getting for example 2 lines of information, each column contains qtd, ite...
asked by 18.06.2018 / 22:06
0
answers

Unify Multidimensional Array in only 1 array in PHP

Is it possible to transform a Multidimensional array into just 1 (one) array in php? What would be the process for doing this? In the image below, I need to transform the array on the left side so that the records are the same as the one on t...
asked by 18.06.2018 / 16:13
0
answers

How to join information in a multidimensional array having the value of a key as a base?

I'm trying to organize a multidimensional array (just one) so that a child array always looks like your parent's "children", given your id. If there are duplicates, it should join (so that only one is left). I have tried to mix functions l...
asked by 04.06.2018 / 17:38
2
answers

Use array_search in a multidimensional array php

In a list of books within a% multidimensional%, every array has a different column category , I would like to search this sub_array for a category > for example: Array "livros" ( [Livro 1] => Array...
asked by 19.11.2016 / 00:45
1
answer

How to mount an array with std :: array and std :: vector in C ++ 11?

How to mount an array with std :: array and std :: vector in C ++ 11? What is the difference between the two architectures? How to scan this array with C ++ 11?     
asked by 15.07.2017 / 03:59