Questions tagged as 'array'

1
answer

Value of one of the array fields

I need to check the value of one of the fields in an array but I can not. var_dump($array_exemplo); array(1) { [0]=> array(3) { ["primeiro"]=> string(1) "1" ["segundo"]=> string(1) "2" ["terceir...
asked by 15.11.2017 / 14:20
2
answers

Variable outside the bounds of the matrix

I'm trying to put the items in positions of an array, but I get the error that the variable is outside the bounds of the array. I do not know how to fix the bug and I need help. Follow the code: Dim posicao As String = String.Join("", itens...
asked by 02.05.2016 / 00:19
1
answer

Print php array

Good afternoon everyone! : D I am creating a page in php that informs me of my local ip, I am doing this through the command: shell_exec('ipconfig') until then it is fine as it returns the ip of my correct machine, however it does not ret...
asked by 27.07.2016 / 20:58
2
answers

Word problem with same letters

I'm solving a problem where I get a array of strings with different words, I have to find out for each word ( string ) which are your friends. Friendly words are those that have the same letters in different or equal order. The proble...
asked by 02.08.2016 / 17:44
1
answer

Transform array and String

How do I transform an array similar to this and Strings to write each row in the Mysql database. I will only need the data of each array (date, site and Status) print_r($arrayOut); Array ( [1] => Array ( [date] =...
asked by 20.12.2016 / 15:50
1
answer

Implement a vector that accepts anything

I have to implement a vector that is capable of storing objects of any type. For example: V[3]= valor_int,valor_double,valor_float,valor_String . To do this I was thinking of creating a method that would parse the values I want to insert,...
asked by 26.05.2016 / 20:03
1
answer

Highest value of a vector, with recursion

I'm studying about recursion and vectors, but I can not figure out how this method works, which returns the highest value using recursion. int maximoR (int n, int v[]) { int x; if (n == 1) x = v[0]; else { x = maximoR (n-1, v);...
asked by 05.09.2016 / 16:55
1
answer

Property in javascript object

How can I make a check in an array of objects where the intention would be to delete the duplicates however, do I need to add the values of a property? Example: I have an array of objects: musicas = [{nome: 'Música 1', clicks: 1}, {nome:...
asked by 06.12.2015 / 23:26
2
answers

Extract key pair / value from a querystring

I have this code where I get the value of a post and ajax. $string = 'nome=Alexandre+Sousa&cpf=0000000000000&email=sousa.akira%40gmail.com&site=www.uniaomaker.com.br'; $dados = explode('&',$string); $total = count($dados); $a...
asked by 15.08.2015 / 06:02
1
answer

How to insert the size of an array according to user input?

How do I insert, asking the user through the class Scanner , the size of the array and it tells me the numbers of columns and rows you want, and then print the values, without using methods? I've tried but it's giving error: import java....
asked by 14.02.2016 / 01:23