Questions tagged as 'java'

1
answer

How to create components dynamically, being created in relation to other already existing components?

In a project in android studio, when clicking on one of the 2 buttons in activity (01 and 101) a TextView displays a response corresponding to the choice. I would like to know how to create a new button just below this second TextView: Ik...
asked by 29.03.2017 / 01:43
1
answer

How to Insert List with JPA

Good afternoon! I'm doing a web service that gets a Json from the application, unencapsulates and inserts into the database. I can decode normally, the problem occurs at the time of inserting the data into the database. I have a list insid...
asked by 27.03.2017 / 21:43
0
answers

Admob Banner - Android

I'm trying to put a banner in my app, actually I got it. But when I boot the virtual machine, it gets underneath the buttons, the machine is a Nexus 5. Myactivity_maincodeistheone.<?xmlversion="1.0" encoding="utf-8"?> <android.suppo...
asked by 27.03.2017 / 20:42
1
answer

Query is repeating results - SQLite

I am doing a query in my SQLite bd, but it is returning me some repeated results I can not find the error. cursor = db.Select(DataBaseHandler.TABLE_OS + " LEFT JOIN " + DataBaseHandler.TABLE_SITUACAO + " ON " + DataBaseHandler.TABLE_SITUACAO...
asked by 14.04.2017 / 18:47
1
answer

How do I transfer the array data (objects) into inherited for the array (reservations)?

package pkg2017ppfp09; import ObjectManagement.ContainerOfObjects; /** * * @author pf */ public class GestorDeReservas extends ContainerOfObjects{ private final int MAX_RESERVAS = 10; private final Reserva[] Hist = new Reserva[10]; private Res...
asked by 15.04.2017 / 14:56
1
answer

How to iterate over a stream from a list that has an array and return if true?

How do I get the enum object with an ID that I passed as a parameter to check an element of the enum object if true? My builder: private WeaponInterface(int[] weaponId, int speed, FightType[] fightType) { this.setWeaponI...
asked by 07.04.2017 / 00:42
0
answers

Get data from Object []?

In the debugger I saw that the object receives ['product', 210] Object obj = prodRepositorio.somaById(); I would like to get the data in it but not cast casten or anything. I've tried String produto = (String)obj[0]; Long valor = (Long...
asked by 28.03.2017 / 04:16
0
answers

Version identification in Web projects

I work with WebServices on multiple glassfish servers, and the version ID is currently in the .war file itself, for example:    test-1.0.war I would like to know if this is the right way, or what would be the right way (web.xml and pom.xm...
asked by 28.03.2017 / 15:00
0
answers

Problems to pass two parameters in the url using thymeleaf

I have the following method in my controler: @RequestMapping(value = "/", method = RequestMethod.GET) public ModelAndView home(ModelMap model) { Page<Postagem> page = postagemService.findByPagination(0, 5); model.ad...
asked by 11.04.2017 / 16:06
1
answer

Elements with Date and Time Data Type

I would like to take a doubt, we should treat fields differently which have data type as time and date I say in relation to the view, why I have a problem I need to plot some date and time in a table in my view but the fields that are not date a...
asked by 11.04.2017 / 15:20