Questions tagged as 'array'

3
answers

Array listing with start and end

Example .. $inicio = '11:00'; $fim = '13:00'; $array = ['10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30']; I need to list the array .. but using the start value and final value .. excluding what is before $inicio...
asked by 07.08.2017 / 20:19
1
answer

Integer array conversion in String

I am a beginner in Java and would like to learn how to convert an array of integers to a String.     
asked by 24.06.2014 / 05:50
1
answer

Join two Arraylist

I made a ArrayList ( nomeTimes ) that receives a number of team names according to for below: for(int i = 0; i<numeroTimes;i++){ String nomeTime=entrada.next(); nomeTimes.add(nomeTime); } My idea...
asked by 03.11.2014 / 18:18
4
answers

Remove rows from numpy array

For example I have array arr1 and I want to take a row range of this array as below, what function can I use? arr1: array([[ 1, 1, 1], [ 2, 2, 2], [ 3, 3, 3], [ 4, 4, 4], [ 5, 5, 5], [ 6, 6, 6],...
asked by 18.10.2018 / 22:19
1
answer

Sort array of objects [duplicate]

I have the following data as a result of querying the database: Array ( [0] => stdClass Object ( [id] => 1 [nome] => Pizzaria 1 [latitude] => -8.12044775643893 [longitud...
asked by 29.05.2014 / 20:22
3
answers

How do I access an array and export the variables?

I have a code that receives data via $_POST of a form as follows: ... $certificate = $_POST['certificate']; ... If you make a print_r($certificate) , the result is as follows: Array ( ['cliente'] => White Martins G...
asked by 11.04.2017 / 17:05
2
answers

Pick items with array prefixes

I have a array like this: array('one' => 1, 'two' => 2, 'three' => 3, 'my_one' => 55, 'my_two' => 33) . But I'd like to get only data that starts with my_* . Is there a more elegant way, or will I have to run...
asked by 02.05.2015 / 04:21
1
answer

Passing Array as a parameter of a function

How to pass a array to a function without having to report how many indexes it has? Reporting the size #include "stdafx.h" #include <Windows.h> void imprimir(int _array[], int _tamanho) { for (int i = 0; i < _tamanho; i++) {...
asked by 05.08.2018 / 10:11
2
answers

C # - Starting an array / list

I would like to know if you can instantiate a vector of size n and already initialize it with a specific value. (Without using a for for this) For example, I would instantiate a vector, which will have size 100 and all indexes with -1. (Th...
asked by 13.08.2018 / 14:59
2
answers

Saving values from an array to a single variable

I could do so $array = array(12, 14, 121, 123); $var = $array[0].", ".$array[1].", "....... echo $var But how do I do if I do not know the exact size of the array ? Because I'm getting it through a post that comes from a <select...
asked by 08.11.2015 / 01:14