Questions tagged as 'java'

1
answer

Get ImageView id in a GridView

Images I want for in GridView private Integer[] imagens= { R.drawable.um, R.drawable.dois, R.drawable.tres, R.drawable.quatro, R.drawable.cinco, R.drawable.seis, R.drawable.sete, R.drawable.oito, R.drawable.nove, R.drawable.dez...
asked by 23.04.2017 / 22:31
2
answers

Calculate total store revenue in Java

I'm having trouble calculating the total billing of the totalV store, since I'm not sure how to store the total values of each totalProd product without a new product replacing the previous one. public static void main(String[] a...
asked by 24.04.2017 / 21:32
1
answer

Why is it taking so long to fill in the Data?

I have the following problem, when searching the data in the base and filling my object to manipulate on the screen, it is taking a long time and leaking memory, I tried to optimize but could not. The funniest is when I made the first queries...
asked by 30.03.2017 / 20:03
1
answer

Why is not the menu appearing?

I'm doing an online course and the menu section is not working in my Android Studio. First, I delete the Contents that came, I just left what is Activity in Layout . About the code: The App starts in a list, I click the "+" button and I go...
asked by 02.04.2017 / 16:12
1
answer

Calculating Random Password using ArrayList and ResultSet in Java

Good morning, I have a question, I need to calculate a new password for each patient when I go through this method: ps = getConexao().prepareStatement(SQL_VERIFICAR_PROTOCOLOS_PENDENTES); ps.setDate(1, new java.sql.Date(dto.getDa...
asked by 28.03.2017 / 15:01
2
answers

Sort Collection

I have a class called Object and inside it has a Collection of Events , summarizing it like this: public class Objeto{ private Collection<Evento> eventos; } In the Event class, I have my attributes and I have one of them: @Gette...
asked by 27.03.2017 / 18:51
1
answer

How to open new Activity when clicking the child element in ExpandableListView?

I would like to know if it is possible to open a new Activity by clicking on a child element of a ExpandableListView , keeping in mind that for each child item element it opens a specific Activity? My layout consists of a Tablayout with...
asked by 29.03.2017 / 21:36
2
answers

After @JoinColumn JPA does not find entity attribute

I have two entities that are directly related to State and City and my intention was to rename the foreign key present in the client entity, changing for example, 'city.status_id State' for 'city.status'. For this I used the annotation @Joi...
asked by 28.03.2017 / 04:50
2
answers

Regular expression to deny everything other than social reason

I'm trying to create a regular expression to remove everything that is not part of the business name in a string, but I'm having trouble not removing the symbols that are in the middle of it. Entry: 201700000000111 01/02/2017 11.111.111/000...
asked by 17.04.2017 / 17:34
1
answer

JSF change information in XHTML

Good evening. I have an application in java / jsf I'm having a hard time showing information in XHTML, Well I have SelectOneMenu to save an information in the database: <p:selectOneMenu id="PermissaoAcesso" value="#{usuario...
asked by 17.04.2017 / 04:57