Questions tagged as 'array'

1
answer

Use an array as key for another associative array

I have these two arrays in php: Array ( [0] => nome [1] => cargo [2] => email ) Array ( [0] => Array ( [0] => nome1 [1] => cargo1 [2] => [email protected]...
asked by 22.06.2017 / 12:49
2
answers

Array returns wrong value in java

I have a question about a college job. I can read with numbers, remove the ";" and pass the values to the array while reading the file. However, when I try to access an array position outside of the file read, it does not return the value I have...
asked by 08.06.2017 / 01:17
1
answer

How to identify elements with repeated values in an array and create a new array

I have the following associative array: Current Array: Array ( [0] => Array ( [num] => 51 [totalparcial] => 2.50 ) [1] => Array ( [num] => 51 [totalparcial] => 3.70 ) [2]...
asked by 18.05.2017 / 03:57
1
answer

Array_push in multidimensional associative arrays in php

I started an array ($ arrDados = array ();) and now I need to add information (array_push) so that I can access the information later as follows: colA1 = $arrDados['NumeroEmpenhoAno']['code']; colA2 = $arrDados['NumeroEmpenhoAno']['size']; co...
asked by 21.05.2017 / 03:48
1
answer

Search for an element in the list

   Make a program that manages the vestibular result. For your happiness, there is only one course and the course has 10 places. The program must maintain the list of 10 classified. The program also maintains, in another list (20 positions), the...
asked by 12.05.2017 / 15:19
2
answers

How to test if a string is a number in the C language?

I'm a beginner in programming. I am performing an exercise in which I must determine whether a string is a number, whereas the user can write anything as input. Then I created the function below. I can only use the standard library. I'm tryin...
asked by 02.05.2017 / 11:52
1
answer

Convert String Json CSS Inline to an array or json with PHP

I have a database in json and inside it there is a style object in which it has an inline css code, such as: "padding: 90px 0px 20px 0px; background: # 000000; display: block;" Let's say the return would be: { "style" : "padding: 90px 0p...
asked by 02.06.2017 / 16:32
2
answers

Delete and Query function- Python

I have to do a simple program in Python. In the case of a library, however I am having difficulty in querying and deleting. I honestly stuck, tried several ways but I could not. My code is like this, what's wrong with me? livro=[] opc = 0 i...
asked by 25.05.2017 / 05:58
1
answer

I can not get it to print everything together as a vector, it gets all separated

                      P1-2017-RAD I                                                                                                                        <table> <tr> <th>Veculos</th> </tr&...
asked by 20.04.2017 / 21:45
1
answer

Error in returning a char

I'm wanting to make a program that converts a decimal number to binary. Doing this conversion, I wanted to store the decimal numbers in char . In the function it is stored right, but when I call the function in main , it is giving pr...
asked by 11.04.2017 / 18:17