Questions tagged as 'array'

1
answer

Check for duplicate numbers and delete them

Enter the data in VET, and then check the repeated numbers, and leave in the VET1 only the numbers that are not repeated, but not able to do that last part at all, follow the code I have done so far: / p> #include <stdio.h> #include <s...
asked by 04.11.2018 / 02:04
1
answer

Rearrange array with parents and children

I'm doing a select in my database by skipping a lot of information, and I'm saving the results in an array, which is organized this way: link What I'm trying to do is sort the parents and children according to the level shown in the...
asked by 03.11.2018 / 20:57
1
answer

How do I display attributes of an object stored in a vector?

I'm doing a job that consists of a fictional real estate. In this program there is a class called principal where it receives Property (Class) and stores the real estate in a vector, a real estate class that has method of registering the real es...
asked by 27.10.2018 / 02:24
1
answer

How to build a simple APNS server with PHP?

I'm creating a small notification firing service. I made this code, to make several shots of pushs, where devicetokens comes from a server.  But I'm encountering the following problem: When I directly assign a token in the $deviceToken...
asked by 15.11.2014 / 03:27
2
answers

Error reading position (3) of the Two-dimensional array: Invalid argument supplied for foreach

How can I read the contents of array $detail[3] after using explode(implode) ? I'm doing the following: $aArray = array( "Titulo" => array( "Class|SubTitulo" => Array( "Detalhe01",...
asked by 15.08.2015 / 21:36
1
answer

Separate a single string into an array of strings [duplicate]

In this code I'm trying to make a string read and then put each space-separated word in an array of strings. I saw that in some cases the strtok function is used, but since I intend to use these strings for other functions, I do not know how t...
asked by 19.09.2018 / 22:39
1
answer

Problem with changing positions in vector

Good morning! Using C ++ Dev, I'm doing the following problem in C:    Make a program in C that reads a vector of 20 real-type positions. Change 1st place with 11th, 2nd with 12th, 3rd with 13th, ... 10th with 20th.   the modified vector....
asked by 14.08.2017 / 17:57
1
answer

Array reading with JSON

I have the following array: Array ( [xml] => { "orders": [ { "code":"PedidoTeste-1508156986545", "channel":"PedidoTeste", "placed_at":"2017-10-16T10:29:46-02:00",...
asked by 17.10.2017 / 14:22
2
answers

Java Help: Arrays

Exercise:    Make two lists of names in the form of arrays, compare how many names in List 1 are in List 2, and then calculate their percentage of the total percentage of people in List 2 Here is the code I've already done: import java....
asked by 10.07.2016 / 03:53
2
answers

Doubts about sum method

How to make a method that takes an integer as a parameter, computes the sum and returns the sum? I tried to do this, but it did not work, the sum is not done. public static void main(String[] args) { int[] vetor = new int[10]; int numer...
asked by 25.08.2017 / 21:00