Questions tagged as 'java'

1
answer

User has exceeded the 'max_user_connections' resource (current value: 4)

I have a problem with the open connections in the database, where an error is occurring if the application tries to create more connections than the limit. Assuming that the application creates and closes the connections for each interaction in...
asked by 26.05.2016 / 20:14
1
answer

Implement a vector that accepts anything

I have to implement a vector that is capable of storing objects of any type. For example: V[3]= valor_int,valor_double,valor_float,valor_String . To do this I was thinking of creating a method that would parse the values I want to insert,...
asked by 26.05.2016 / 20:03
2
answers

Error formatting date:

Hello, I am formatting the date with the following code: Date data = null; SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { data = format.parse(request.getParameter("txtdata")); } catch (Exce...
asked by 27.05.2016 / 22:44
1
answer

Java function equivalent to c ++ map ()

There is a function for java, equivalent to map () of c ++? Basically it calculates the ratio between the "minimum" and "maximum" values.     
asked by 28.05.2016 / 04:33
1
answer

Make Java application run as Service

I have a Java application and would like it to run as a service in Windows. I researched the net and saw some ways of doing it being some more practical and some confusing. Anyone who has done something like this could indicate which path they u...
asked by 01.06.2016 / 22:52
1
answer

Items being repeated in a RecyclerView

I have a fragment v4 that is managed by a SectionsPagerAdapter . In fragment I have a RecyclerView that has a Adapter custom that receives a ArrayList that contains exactly 96 objects, which represents th...
asked by 05.04.2017 / 02:21
1
answer

In an activity, first open method onCreate or class constructor?

In a scenario where you have an activity with a constructor (public, of course) and the onCreate method which is part of its lifecycle. Which of the two will run first?     
asked by 08.09.2016 / 18:45
2
answers

Rename large mass of files

I'm trying to create a java script to rename a large amount of files by applying a pattern to the formatting that would be: First capital letter and the lower case letter. Composite names with more than one word should follow the above pat...
asked by 04.03.2016 / 20:33
1
answer

Error 400 when creating InputStreamReader for URL with spaces or accents

Hello, I have a problem when I use InputStreamReader to read some URL's that contain spaces or accents. What happens is that I'm reading a URL that contains a JSON (One of the League of Legends APIs). I have no idea what's going on, when I use s...
asked by 26.03.2016 / 00:15
1
answer

Comparator ArrayList JSP Object

I'm having trouble implementing the Comparator method, to sort the ArrayList of Objects. I have a class of Entrepreneurship. Whereafter, I create an ArrayList, which is populated from a content manager system. I added the compareTo method,...
asked by 14.01.2016 / 13:31