Questions tagged as 'array'

1
answer

How to know which is the last item selected from a listView?

Hello, I have a ListView using simple_list_item_multiple_choice , filled with ArrayString of all Brazilian states. I need to fill in the following SQL command with all the states selected by the user through the ufSelected...
asked by 18.05.2018 / 20:40
1
answer

dynamic reallocation - struct array

I need to do an exercise in which the code allocates memory as needed, but I need to relocate an array of structs, but I ended up locking in that part. My Struct is: typedef struct{ char nome[100]; char endereco[100]; int numero...
asked by 23.05.2018 / 00:01
2
answers

Factoring Hackerrank Solution - Using Only Algorithms

I'm learning to program and I'm doing the hackerrank algorithm exercises. I'm in the migratory birds exercise. Accessing the exercise requires login access. As many do not have access, I copy and paste the exercise here:    You have been a...
asked by 18.04.2018 / 04:11
1
answer

Storing into a vector without pressing ENTER at each insertion

It is necessary to store in a vector a sequence of numbers, but pressing the ENTER only at the end of the line. For example: ENTRADA: 10 20 30 15 50 <ENTER> Vetor[] = {10, 20, 30, 15, 50}     
asked by 03.04.2018 / 21:34
0
answers

How to check for existence of a certain array in another array?

At some point in my system, I need to consume a method that returns an array, which can contain arrays. I need to feed a second array with data contained in the main array . See example? arrayRetorno[0] = item[i].tasks[0].colleagueId;...
asked by 22.03.2018 / 20:05
2
answers

How to use forech in Wordpress using the WP_Query variable

Good morning! I am not able to implement a forech in a database search using the native wordpress variables, searching I found something similar but it is not what I need. <?php global $post; $args = array('category' => 17); $custom_po...
asked by 21.02.2018 / 14:12
1
answer

Paste string by format

I have an array with 1000 indexes with random text and random numbers, so I need to get in this text excerpts that are in particular formats containing pre-defined character quantities, such as a string as follows: 65 45 98 12 15 98 17 character...
asked by 12.01.2018 / 07:51
1
answer

Extracting array values and transforming into integers

Please, who can help me. The question is this: I need to extract two variables from an array and use them as integer type to compare values between them. The code is this: $sql = "SELECT * FROM inf_user WHERE login = '" . $login ."' and senha...
asked by 15.01.2018 / 13:58
1
answer

Send Array to DB

Good afternoon, guys. I'm trying to pass an array that I retrieve from a JSON to DB, but I'm not able to identify Array objects, I think I'm doing something wrong, I've done some tests with foreach but I did not succeed, follow the cod's. HTM...
asked by 27.12.2017 / 19:04
0
answers

Add constant to each key of an array

How to include a constant in a particular key of each array. Example: Array without change: array (size=3) 0 => array (size=3) 'id' => string '1' (length=1) 'image' => string '1.jpg' (length=5) 'carro' =...
asked by 18.01.2018 / 01:28