Questions tagged as 'array'

1
answer

Creation of a random vector

from random import randint # para gerar os nums aleatorios def criaVetor(L, H, tam): vec = [] for i in range(tam): # vamos fazer isto tam (N) vezes vec.append(randint(L, H)) # gerar numero aleatorio entre L e H, e colocar na noss...
asked by 21.08.2016 / 18:02
1
answer

Language C: Manipulating a vector of structs within functions

Hello, I created a struct : typedef struct { float valor; float peso; } objeto; And inside main () I created a vector of these guys: objeto conjunto[50]; Here, I need to exchange a 'place' object with...
asked by 09.06.2016 / 17:04
2
answers

Index of the first negative number of a vector

I have to do a program in C that saves the index of the first negative number, but I can not do it. The question is this down: Construct a C program that enters 5 integers into an A vector, and print out the index of the first negative number...
asked by 18.06.2016 / 03:24
2
answers

Transform a JSON string into a non-associative array in PHP

Good afternoon, I would like to convert a string to a non-associative array in PHP, functions like json_encode / json_encode are not working properly. String:    word = '{"world": ["CE", "Supply"], "regional": ["CSC"   RJ / Verticalized...
asked by 19.10.2016 / 16:08
1
answer

How to display a json return in a listView

I'm trying to return a json that resulted from a select done in php (web service) for my application. The select is here: mysql_connect('localhost','root','ugauga'); mysql_select_db('noise') or die (mysql_error()); $Cod_Empresa = $_GET['...
asked by 19.04.2016 / 19:24
1
answer

Array, delete value [closed]

Good afternoon, someone can get some hint for an exercise in which it is necessary to go through an array and if it finds a certain value, delete it from the array, this in assembly. Any tips?     
asked by 19.05.2016 / 17:27
2
answers

Screen to enter values

I have this code and would like to create a user screen to enter values and they are inserted into their respective arrays, CREDIT (array a) and DEBIT (array b) and create a run button to run the code and print the response. Could you give a hel...
asked by 07.04.2016 / 21:14
1
answer

Grouping hashes by value in Ruby and manipulating them

I have this array with hashes that I simplified to get smaller. My goal is to join with marca of carros to make a small report showing how much marca is profiting based on compras . Notice that "tag1" repeats 2 times a...
asked by 20.01.2016 / 19:08
1
answer

How to reference an arrayList of another class

Personally my code is still unfinished and I'm creating a library system how college work I want to do as a reference to use an array list of another class in a new class. I want to use the same ClassList array as the Book class for the BookLoad...
asked by 30.05.2016 / 06:47
2
answers

Extract a new array from an array - Ruby

I have the following output: => [ [ 0] [ [0] "CELULA", [1] "LENNA ", [4] "jul 01", [5] " 2015 12:00:00 AM", [6] "N", ], [...
asked by 22.01.2016 / 02:17