Questions tagged as 'java'

1
answer

How to create an administrator profile from this code?

How to create an administrator profile from this code, and when to have a check made if it is a regular user or an administrator? DaoUsuario.java package br.edu.facema.model.dao; import br.edu.facema.model.bean.Usuario; import java.sql.Con...
asked by 25.11.2014 / 05:45
1
answer

Interleaved Matrix

Hello, I'm doing this exercise, but I'm having a hard time. The following is the statement:    22) Write a program to generate an array (N x M) (
asked by 26.11.2014 / 00:28
1
answer

Date format in select

I have this method: public List<LoteEnvEntity> findallByDate(java.util.Date dataDe, java.util.Date dataAte) { String strQuery = "SELECT L FROM LoteEnvEntity as L WHERE 1=1"; //SimpleDateFormat simpledate = new SimpleDateForma...
asked by 06.11.2014 / 11:37
3
answers

Getting IP LAN for sending with ajax

I need to get the "LOCAL" (LAN) ip, using javascript. It turns out that I have an application on my servers, but a client requested a customized service. I need to retrieve the client's local ip over the internet and send it to the database on m...
asked by 05.11.2014 / 20:05
1
answer

How to use setText from a service running in java?

I have a service that runs a timer that loops one by one, how to set the text in the open activity? I'm using: //tempo new Thread(new Runnable() { @Override public void run(){ int ju...
asked by 28.02.2015 / 20:17
1
answer

Change and delete objects before persisting in DB

I have a functionality that aims to register customers, in which within such a register I have a relationship as follows: A customer can have several "Service", and each service can contain several destinations and / or related escorts....
asked by 26.11.2014 / 17:17
1
answer

Problem adding an element to a Collection at runtime

In this method, I have to fill out a collection, regardless of its type. public void loadBeanCollectionItems(B bean, Collection collection, JSONArray collectionJson) { for(int index = 0; index < collectionJson.length(); index++) {...
asked by 27.10.2014 / 23:25
1
answer

Android - Method with return using thread

Hello everyone, I'm developing an android application that uses the volley library (google) to perform my http requests. I have a method that returns a Boolean and depends on the return of the request, then that is the badness, the method return...
asked by 15.01.2015 / 18:58
1
answer

Operations with HashMap

Good afternoon people, I need to do some operations using HashMap. I'm new to the area. I have the following map protected Map<String, Map<String, Integer>> elementos = new HashMap<>();' The first String is a key, the v...
asked by 05.12.2014 / 18:50
2
answers

Error - HTTP Status 404

I'm having trouble with tomcat on my test site. When I log in it gives an error:    HTTP Status 404 - / liferay /       type Status report       message / liferay /       description The requested resource is not available.   Apache Tomcat...
asked by 08.12.2014 / 15:00