Questions tagged as 'java'

1
answer

Update UI every 1 second only updates every 4? Android Studio

I'm working on Android Studio and I have the following problem and I do not know why it happens: My code takes the current unix time in milliseconds, divides the unix time by 1000 to extract the seconds, subtracts a date in unix in seconds and s...
asked by 14.10.2018 / 19:05
1
answer

several clients in java sockets

Hi, I would like several clients to connect to my server at the same time package server.app; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.net.InetAddress; import java.net.ServerSocke...
asked by 12.10.2018 / 19:10
0
answers

what is the need to cast a daughter class to a father?

good morning just a question since I do not have the idea of casting an object of the daughter class to a parent class (since the daughter can practically access the properties and methods of the father) I have my father class: package interfa...
asked by 07.10.2018 / 14:52
0
answers

Error: android.os.NetworkOnMainThreadException AndroidStudio

I am trying to send two parameters to my webservice through POST and I am presented with the error android.os.NetworkOnMainThreadException , when trying to execute the line of code      String respuesta = mRequest.execute(nameValuePairs...
asked by 30.10.2018 / 13:40
0
answers

Read CSV files and create their respective tables in mysql

This is the function of my button when loading multiple CSV files, I would like to know how to implement the function so that those files can be generated in tables in MYSQL in a database that I already have . private void examinarAct...
asked by 15.11.2018 / 19:15
0
answers

Recursivity in the adjacencies of a matrix

I am trying to get my game to take the adjacent positions recursively, both on the sides (up, down, right, left) and on the diagonals. However, when calling the recursive function again I can not pass the row or the column as a parameter....
asked by 15.11.2018 / 10:06
1
answer

Convert JSON to Class

Friends like I could Convert a Json into Class: My Class is the created class to which I must adapt the Json that returns authorizationResponse.getResponse () miClase token = gson.fromJson(autorizationResponse.getResponse(),miClase.class);...
asked by 16.11.2018 / 14:27
1
answer

How to store a list in Hibernate

Here is the Container class with the PlazasBlock List that I want to store in hibernate @Entity @Table(name = "CONTENEDOR", uniqueConstraints = { @UniqueConstraint(columnNames = "IdContenedor")}) public class Contenedor implements Serializable...
asked by 09.10.2018 / 05:43
0
answers

Hibernate performs unwanted queries (@ManyToOne)

I have an entity A linked to B with a ManyToOne relation, of type Lazy public class A extends BaseEntity { @Enumerated(EnumType.STRING) private TipoTurnoEnum tipo; private String number; private String state; private Date date; @JoinColumn(...
asked by 09.10.2018 / 18:13
2
answers

Browse array and replace

I have this exercise, but I could not advance almost. Return a new string with the initial letter in upper case and the rest of the letters replace with points. If the string is "", return a string with a period. Example: String1("")...
asked by 17.10.2018 / 21:44