Questions tagged as 'array'

2
answers

Get a specific value in an array

I'm trying to get only the name of an element from an array . I want to get the name of the first element of the array and also the name of the last element. I put my method in class Carreira public override string ToString() {...
asked by 06.03.2017 / 16:33
3
answers

How to organize items in an array in alphabetical order?

I'm having a hard time organizing this array: $array = []; $array[ "T3497012@CHOSTBRHDDSB@EICM_BORA@BPHS@Bamz", "T3497012@BHOSTBRHDDSB@EICM_BORA@BPHS@Bamz", "T3497012@AHOSTBRHDDSB@EICM_BORA@BPHS@Bamz", "T349701...
asked by 21.01.2018 / 21:51
3
answers

Arrays not started in C

How do I know how much size I should put to go through an uninitialized array []? For example in that with char []. #include <stdio.h> #include <stdlib.h> int main() { char texto[] = "Linguagem C."; /* for(int i=0; i<13;...
asked by 17.05.2015 / 04:09
3
answers

Union of two vectors in C

I need to merge two vectors, resulting in a third vector: a[5]={1, 2, 3, 4, 5}, b[5]={6, 7, 8, 9, 10}, c[10]; else if (select_menu == 4) { int select_f4, i, j, x; printf("Esta é uma opção que realiza a união dos conjuntos\n"); prin...
asked by 03.07.2018 / 06:40
2
answers

How to consume JSON files in PHP in different ways?

   This topic differs from subjects such as: "How to consume JSON in   PHP string ; "Extract json value in php";   php "or" Recover JSON in PHP "   Although there is co-relation in various PHP language subjects, and the JSON format, it d...
asked by 01.07.2017 / 00:08
2
answers

Check if value exists in array of objects

I have an array that is as follows [ { "Param": 1, "Valor": 68 }, { "Param" 1, "Valor": 79 }, { "Param": 2, "Valor": 165 } ] I would like to know how to check if the number (in Valor ) exists in t...
asked by 21.07.2017 / 19:49
3
answers

How do I get the largest value from an array / vector in python?

How do I get the highest value from an array or vector? For example, in this exercise I have to do a 4x4 array and return the row and column of the largest element , but I stopped there. m = [] for i in range(4): linha = [] for j i...
asked by 24.05.2017 / 17:15
2
answers

Change class vector size

I have to use the public static String vetor[] = new String [15]; vector in the class ... however this class is used in a servlet. And the size I need the vector is what the user chooses ... how can I pass the parameter that defines the v...
asked by 02.10.2014 / 15:46
2
answers

How to add index in an array

I'm creating a Javascript Array in the following format: series = [{ name: 'Tokyo', data: [7.0, 6.9, 9.5] }, { name: 'New York', data: [-0.2, 0.8, 5.7] }]...
asked by 01.08.2014 / 17:54
3
answers

Make a static method in the main class that writes on the screen all even numbers from 1 to 10000 that are palindromes

This is my method: public static void B() { int vet[]=new int [100]; int vet2[]=new int [vet.length/2]; for(int i=0;i<=vet.length;i++) { vet[i]=i+1; } for(int i=0;i<vet.length;i++) { int rest...
asked by 09.03.2017 / 11:04