Questions tagged as 'java'

1
answer

Example of a ViewModel using Google Component on Android

I'm trying to implement a ViewModel following that tutorial but I It seems that Google has renewed the libraries and left half the code obsolete. Someone has a functional example and its installation in the dependencies, I use Android S...
asked by 29.11.2017 / 17:26
1
answer

HTML communication with java?

I am working on a small test where I made a table of data in mysql and use hibernate to generate the pojo, the ingnieria inverse and the config file of hibernate cfg in xml. I made a small form in html to try to enter the data and store it in th...
asked by 29.11.2017 / 01:22
1
answer

Spinner Perzonalized Problem wide

I have this spinner with a perzonalized adapter, but the issue is that I'm not getting the expected result, at this moment it looks like this, As you can see I have 2 arrows, one is from my custom layout, and the other one is the one th...
asked by 08.11.2017 / 15:08
1
answer

does package does not exist?

Hi, I have this problem importing some things, I'm trying to use hibernate, but I see these errors. and these are the libraries that I'm using, I need to add libraries or where I can get them. Looking at other similar questions I saw th...
asked by 26.11.2017 / 03:47
1
answer

Binary tree to calculate simple operations

This tree represents the following logical operation: (((5 + 3) / 2) + ((1 - 5) * 2)) Does anyone know how to calculate it? You can use any data structure I have used the following: public class Elem{ char operacion; i...
asked by 21.11.2017 / 17:20
1
answer

How to do a search on a k-dimensional tree (KDTree)

I have a tree 2 dimensions and its structure is as follows: public class KDNodo{ int x; int y; KDNodo left; KDNodo rigth; } public KDTree{ KDNodo root; } It is necessary to have in the odd levels the x is taken and that the...
asked by 19.11.2017 / 12:50
1
answer

Problem with creating files and files in JAVA (After creating installer) [closed]

Well, the problem is as follows.   When programming with neatbeans and running the program everything works fine ... I create a folder and a .txt file as it should be, but, after creating the application installer and installing it (in C :) I do...
asked by 04.01.2018 / 03:52
1
answer

Uri in ImageView, does not load when closing application

Currently in my Android application, I have in my menu the possibility of saving an image, for this I have a form where I ask the user to choose one of your phone with the following code Code: @Override protected void onActivityResult(int r...
asked by 06.11.2017 / 19:06
1
answer

Deprecated .crossFade () on Android 4 Glide

I have updated from Glide 3.8.0 to Glide 4.1.1 and I find that part of the code has been compatible I followed the installation of Started Glide 4 compile 'com.github.bumptech.glide:glide:4.1.1' annotationProcessor 'com.gith...
asked by 28.10.2017 / 21:58
1
answer

Random speed on Java threads

I have done a small program simulating a race with three threads. My idea is to put these speeds with randoms number so that the result varies, but I do not know how to do it. Code: public class Carrera extends Thread { String nombre;...
asked by 28.10.2017 / 18:12