Questions tagged as 'array'

1
answer

Average numbers of a matrix in C

I need to create a program that builds an array and returns me the average of its numbers. I already have the array built but I can not average the values. The code I already have: #include<stdio.h> #include<stdlib.h> int ma...
asked by 16.07.2017 / 03:11
1
answer

Remove only one value from the array

I have an array like this $arr = array('10', '12', '10', '15', '18', '18', '7', '18', '18', '15'); Four times the value 18. I need to extract only one value, example one 18, and it goes like this: $arr = array('10', '12', '10', '15', '18'...
asked by 06.07.2017 / 00:03
1
answer

Vectors and Matrices [closed]

Write a program in C that decodes words from an array that contains the values of the letters of the alphabet, as below: A = 7, B = 8, C = 9, D = 10, E = 11, etc. , the code: (a) 9 7 10 7, that is to say EVERY b) 9 7 10 11, that is to say CADE '...
asked by 26.06.2017 / 20:37
1
answer

How to join arrays with repeated keys?

I have the following code $teste1 = array( 1 => array( 1 => 'teste1', 2 => 'teste2', 3 => 'teste3'), 2 => array(3 => 'teste4', 5 => 'teste5') ); $teste2 = array( 1 => array( 3 => 'teste6', 4 =>...
asked by 26.06.2017 / 23:02
1
answer

Controller Laravel?

How can I style an object in a array in controller Laravel? Mapper::marker($marker['lat'], $marker['lng'],['label'=> "<div>".$marker['label']."</div>"]); Controller public function index(){ Map...
asked by 10.09.2017 / 01:35
2
answers

Can not convert JSON List to Array in Javascript

I'm having trouble getting javascript data from a json. To better explain, the data comes from the database, like this: // PHP $rs = mysqli_query($con, "SELECT id_acao as id, text FROM acoes"); $data = array(); if (mysqli_num_rows($rs) &...
asked by 11.07.2017 / 15:58
1
answer

Group PHP Array ()

I have the following array () Array ( [0] => stdClass Object ( [usu_id] => 1 [mod_base] => 1 [mod_id] => 4 ) [1] => stdClass Object ( [usu_id] =>...
asked by 11.06.2017 / 23:01
3
answers

Use return of a function in another function

I have a function in Python that receives a text and returns 2 lists, one with all the words that appear and the other returns the number of times each word appears. def frequencia(lista): conv = str(lista) plSeparadas = separa_palavra...
asked by 13.06.2017 / 13:36
1
answer

Query data in different arrays for report

Well to avoid too much processing in my Mysql when generating a report, I'd rather do a simple select and put it in an array, so I have more freedom to manipulate the data. But I came across a difficulty, where I have 3 different arrays, and...
asked by 14.06.2017 / 13:41
1
answer

Do not repeat data returned Mysqli [duplicate]

I have this code that brings me the months registered in the bank. More like it has several lines, I want to return only once each value. // Fazendo a conexão $conexao = mysqli_connect($this->dbservidor,$this->dbusuario,$this->...
asked by 29.06.2017 / 20:23