Questions tagged as 'matriz'

2
answers

How to print an array with indexes and values in PHP?

I have the following array in PHP: $matriz['HGF']['Christus'] = 7; $matriz['HGF']['Unifor'] = 6; $matriz['HIAS']['Christus'] = 5; $matriz['HIAS']['Unifor'] = 4; I would like to print the array in html, displaying indexes and values, like th...
asked by 26.10.2017 / 16:31
2
answers

How do I pass an array as an argument to the user by setting the number of columns?

I will make a simple program just to exemplify my problem. #include<iostream> using namespace std; void recebeValor( int mat[][col]) // me da erro de comp; { mat[0][0] = 2; cout << mat[0][0]; } int main() { cout << "E...
asked by 23.11.2015 / 20:29
2
answers

Array diagonal in java

Firstly, I would like to inform you that I am new here on the site, and if by chance my question was left uninformed or poorly organized please speak. I was trying to solve this question: Iwasabletodevelopthiscode:importjava.util.Scanner;...
asked by 22.11.2015 / 23:06
1
answer

Make an array of sources and destinations

I need to populate a table with origins and destinations so that each cell contains the total number of people leaving from one location to another. The database has an id for each observation, as well as the source and destination. Each obse...
asked by 22.01.2018 / 06:24
1
answer

How to add values to an array of an array in Ruby?

puts "Alunos\n\n" alunos = [["Daniel: ", "Nota: 10\n\n"],["Abima: ", "Nota: 10\n\n"], ["Wilame: ", "Nota: 10\n\n"],["Felipe: ","Nota: 10\n\n"]] puts alunos I wonder if it is possible to add a new student with a new note as a new array in the...
asked by 11.11.2018 / 21:08
2
answers

Data window moving in time (t)

I want to make a Recursive prediction. I need every month (t) to move the data window from the last month to the next in a period (this period, that is, t + 1). dados<-read.table("C:/Biomedica/Doença/evolmensal.txt", header=T, dec=",") dado...
asked by 25.12.2014 / 23:36
2
answers

How do I correctly access elements of a dynamic array via pointer?

As many know (I believe) a multidimensional array is stored in memory in a linear fashion, ie each row of the array goes into memory one after the other. For example, I created the following image: Soyoucanmanipulateamultidimensionalarrayasi...
asked by 08.06.2018 / 03:27
1
answer

Matrix Ordering with Values Exchange

Good afternoon! I mounted an array that receives 9 records from a single variable and the values are displayed on the user's screen. However, when trying to put this array in ascending order, I tried to use the value exchange method, but at the t...
asked by 11.12.2018 / 22:03
1
answer

Search Index of the array from the json value using indexOf

I have the following array: var usuarios = [ {nome: "João", id: 1}, {nome: "Maria", id: 2}, {nome: "José", id: 3}, {nome: "Ana", id: 4}, ]; I need to return the user index José. I tried using indexOf as follows: var...
asked by 16.06.2016 / 02:12
1
answer

Hexagonal Matrix in Python

I would like to know how I could return the numbers of a vector of vectors (array) within a specific R (radius) using Python. Based on this image: Followingthevectorused:mapa=[[0.0,0.1,0.2,0.3,0.4,0.5,0.6],[1.0,1.1,1.2,1.3,1.4,1.5,1.6],[2...
asked by 29.05.2018 / 19:52