Questions tagged as 'array'

3
answers

How to convert a variable int to vector?

I've been trying to do this problem but I can not finish it enter int and write it in letter Example 150 == one hundred fifty My biggest problem is that I get compile error when trying to print the vectors of numbers, I guess that is b...
asked by 17.09.2018 / 07:00
2
answers

warning: passing argument 1 of 'HashInsertar' from incompatible pointer type

I have this program that should implement a hasheo function. But throw the following warning that is above: warning: passing argument 1 of 'HashInsertar' from incompatible pointer type When you try to pass the number entered by the user t...
asked by 28.08.2018 / 23:25
1
answer

How can I make a variable depending on the url?

I'm trying to get this php redirect depending on the variable $ to have the include, and try to change preg_match by array but it just throws me 500 error, which could be and how I could make it work, thanks. <?php include('url.php'); $urls...
asked by 25.08.2018 / 17:55
2
answers

Value within php array

I have the following php structure. require_once('api.php'); $data = array( 'DETALLES' => array( array( 'ITEM' => 'N1', 'DESCRIPCION' => 'DESCRIPCION', ) ), ); $api = new api(); $res...
asked by 30.07.2018 / 23:27
1
answer

Chess board in java

I have been asked to create a chess board and now, all right, the problem arises when I want to give color to the boxes and I do not understand why. The code below creates the board, the problem is here: if((y+x+1)%2==0){ C...
asked by 20.07.2018 / 05:55
2
answers

How to fill an array with respect to the values of another javascript array?

I am doing the genetic algorithm of a flock of sheep. It turns out that from this exercise I generated a population that would be an array of objects. Population example, of course for this problem you must generate more objects, but this use...
asked by 10.05.2018 / 00:34
1
answer

Search for data from an array in a PHP array

My problem is as follows, for example, I have a matrix: ID - Name - Type 152 - item1 - type1 536 - element2 - type2 85 - element3 - type3 105 - item4 - type4 And I have a array : $busca = array(105,536,85); What I need is t...
asked by 18.05.2018 / 07:15
2
answers

Insert element at the beginning of an array. Java

How can I insert an element (an integer for example) at the beginning of an array? I can not use the ArrayList class or anything like that, can you help me please? Thanks in advance. This is the header of the method public void addFirst(int...
asked by 29.01.2018 / 18:07
1
answer

separate array laravel

I receive data from a view in this way, is there a way to separate them and make it like the example below? array:6 [▼ "id_producto" => array:1 [▼ "insumo" => "7" ] "precio" => array:1 [▼...
asked by 01.12.2017 / 19:05
3
answers

PHP - Create a dynamic array based on cycles

I find a big problem, I want to add an array within an array, but I can not find a solution, my code is this: $arrayDetalle = Array(); for($i = 0; $i < $this->contArticulos; $i++){ $arrayDetalle = array( "Nombre" =>...
asked by 06.10.2017 / 23:57