swagger @ApiParam ignores certain properties

I have a Spring Boot Project with springfox-swagger2 2.7.0 And I have the following controller: @Api(tags = { "Some" }, description = "CRUD for Some Stuff") @RestController @RequestMapping(path = "/some") public class SomeController { @ApiOperati...
more »

2017-11-15 22:11 (3) Answers

LibGDX: Parallax effect with tiled maps

Need to make parallax effect in the game with LibGDX and tiled map. Background should move with different speed then foreground. In the docs https://github.com/libgdx/libgdx/wiki/Tile-maps said: By rendering each layer separately and modifying t...
more »

2017-11-15 22:11 (1) Answers

Iterating multiple children nodes using Jackson

I'm having trouble iterating this structure. I know there are a few approaches using Jackson and I'm hoping someone could provide a quick and manageable solution. The JSON structure is consistent throughout and every child will have a "children" fi...
more »

2017-11-15 21:11 (1) Answers

Connect to RServe from JAVA using authentication

I am running RServe from Server machine using cmd Rserve.exe --RS-conf Rserv.conf --RS-port 12306 Rserv.conf file has following content: pwdfile RserveAuth.txt auth required remote enable plaintext disable RserveAuth.txt has following contents:...
more »

2017-11-15 11:11 (1) Answers

Java Years between 2 Instants

In Joda, we can calculate years between 2 Datetime using Years.between(dateTime1, dateTime2); Is there any easy way to find years between 2 instants using the java.time API instead without much logic? ChronoUnit.YEARS.between(instant1, instant2) ...
more »

2017-11-15 05:11 (1) Answers

Jackson/YAML: Parse key-value into class

I my input yaml file, I have the following: services: postgresql: image: "postgres:10" redis: image: "redis:4" It's easy to parse services field into a Map<String, Service>: public class DockerCompose { public static class S...
more »

2017-11-14 21:11 (1) Answers

convert a string to a list of object using Java 8

I have a string "Red apple, blue banana, orange". How could I split it by ", " first then add "_" between two words (such as Red_apple but not orange) and capitalize all letters. I read a few posts and found a solution but it only has the split p...
more »

2017-11-14 20:11 (6) Answers

InvocationTargetException when using JavaFX

I am trying to use Gluon/JavaFX for the first time, but I am receiving an InvocationTargetException at run-time. I have searched for answers on this site and others, but have received the same problem after trying each suggestion. Main: package Sce...
more »

2017-11-14 15:11 (2) Answers

Java 8: replace anonymous class with lambda

I'm having problem in replacing this particular example: Consumer consumer = new DefaultConsumer(channel) { @Override public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) ...
more »

2017-11-14 14:11 (1) Answers

Numerically sorting the String Arrays

I already know that we can sort string arrays numerically, by converting them to integer array then using Arrays.sort() or using any comparator. So my question is if those strings are beyond the limit of integer or long int then how can we sort them...
more »

2017-11-14 14:11 (3) Answers

Java functional generics

ComputeIfAbsent method of Map has following declaration: computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction). Why wasn't parameter declared as Function<K,V> when K and V types are not used anywhere else? Now I under...
more »

2017-11-14 10:11 (2) Answers

Eclipse 'computeCompletionProposals()' Error

Eclipse has been working very well for me recently, up until now. I am using Oxygen.1a Release (4.7.1a), and whenever I am typing, it seems that when I press the '.' key, it slows down the whole program for about 5 seconds. It is very laggy and annoy...
more »

2017-11-14 06:11 (0) Answers

JSoup can not parse a website

I am trying to get some data from a website. I make copy paste from my old program. But its not working. My code is below. import java.io.IOException; import javax.swing.JOptionPane; import org.jsoup.Jsoup; import org.jsoup.Connection.Response; imp...
more »

2017-11-13 20:11 (1) Answers