Questions tagged as 'array'

2
answers

How to optimally read a list of ArrayList dependencies?

I have 4 classes, each class has a ArrayList , where the last element depends on another ArrayList : Example Genêro-> Artists-> Albuns-> Songs To read the songs I'm doing the following. for (Genero ge : objeto.getLista()) { for...
asked by 10.07.2015 / 22:59
1
answer

usort php, order the brazilian table

Friends, I have an array with the brazilian table, it contains the team name, victories, balance of goals, goals pro, etc. I would like to sort the array using the Brazilian criterion, points > victories > goal difference > goals pro...
asked by 27.06.2015 / 06:18
1
answer

Array with information from a database

I'm starting an email system for a client. It has SMTP from locaweb and they have an API for sending mail. So far so good I can send the emails using their api, but I came across a question that I can not solve. It's like this: I need to moun...
asked by 15.04.2015 / 00:58
2
answers

Remove array element in C

I have the following struct. struct cadastro{ int codigo; char nome[200]; char cpf[11]; char rg[10]; char tel[12]; char end[100]; }cadastro;//struct do tipo cadastro. and the corresponding vector struct cadastro cd[10];//vetor da funcao...
asked by 10.05.2016 / 21:54
2
answers

Convert JSON to UTF-8 on Android

I have JSON Array and when it is displayed in ListView on Android, it appears with special characters: JSONgeneratedbyphp:[{"id":"1","titulo":"X-Burg","descricao":"Hambúrguer,...","preco":"R$ 7,50","tipo":"0"},{"id":"2","titulo"...
asked by 03.09.2014 / 14:09
1
answer

How to do sorting in classes?

The funny thing is that this was an answer! The problem I have is this: I have a Person class, which is initialized with a string, and it splits into a number and another string. After the class is mounted, I get an entire file and split it into...
asked by 30.03.2014 / 04:02
1
answer

How to customize the row of a ListVIew according to the value in the ArrayAdapter

Assuming that I have an object called Item, and that it has text, id, and validation properties, in this case, text is a string, id is an integer, and validation is a Boolean value. class Item { private int id; private String texto;...
asked by 25.09.2014 / 15:03
1
answer

Pass value of an input to an array of objects

I am trying to pass the value of an input text to an array of objects, via jQuery but I did not understand how to insert it into array . I tried to use something like: var usuario = $('#username').val(); And then add in place of carlos...
asked by 12.03.2015 / 18:49
2
answers

Print associative array element within string without concatenation

I have to print an tag HTML through a echo with the value of an associative array, but I can not get it to print using concatenation. Code .php (this way it is not working, I believe the quotation marks that surround 'name')...
asked by 25.01.2015 / 13:14
2
answers

Traversing Array within a String

I am creating a system that saves text and variables inside a .txt file and I need to add the results of an array inside this file as well. Code: $produtoImpressao = $_SESSION['produtoImpressao']; //Array de produtos $fp = fopen("manifes...
asked by 12.08.2014 / 20:13