How do I define classes for this JSON?

https://pastebin.com/P13GjAGy My JSON is at that link. It's too long to be posted here. I created an ArrayList of type Binding(class) in a class Result. And in Binding, I have objects of type Symbol, Open, High, Close, etc. In them I have Strings ...
more »

2017-12-03 23:12 (0) Answers

Easily add libraries to Eclipse Java Oxygen

I know there are post about JAVA libraries in Eclipse and I used a way to add some .jar files (like apache.poi and jsoup) to my project. My question is: Where do we have to put those libraries and what settings do we have to change, so to make the li...
more »

2017-12-03 22:12 (1) Answers

ScheduledExecutorService behaving unexpectedly

I have the following code snippet, using a ScheduledExecutorService to run every 3'000 milliseconds a check whether it should call a function onOutTimeout() or not. At least that's the idea. private void launchOutTimeoutChecker(){ Runnable chec...
more »

2017-12-03 21:12 (2) Answers

Sphinx4 helloworld indexOutOfBoundException

i'm running the HelloWorld code give by sphinx. It starts and waits for me to say something in the mic, but when i start speaking it gives me this error: Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 110, Size: 110 at ja...
more »

2017-12-03 14:12 (0) Answers

Spring POST receives object with null values

I have an AngularJS web application that looks like it is correctly sending JSON to the Tomcat server, but the server receives null values. This question didn't help because my property names are already lowercase, and this question didn't help becau...
more »

2017-12-03 13:12 (1) Answers

Do I need a map using @POST with jersey in tomcat

I'm trying to create a rest API with Jersey in a tomcat server, my application collects input from other services (no database). I have created the following pojos: //this a pojo for parameters the application takes in the @POST request, a location ...
more »

2017-12-03 12:12 (1) Answers

JavaFX TabPane tabs don't update position

I noticed that when adding and deleting tabs from a TabPane, it fails to match the position of the order of tabs in the underlying list. This only happens when at least one tab is hidden entirely due to the width of the parent. Here's some code that ...
more »

2017-12-03 08:12 (1) Answers

How do I send my Spring Boot to someone?

Hi. I'm studying Java Web and created an application using Spring Boot and Maven. The application is working fine using mvn spring-boot:run. How do I compile or build it to send it to someone? Hi. I'm studying Java Web and created an application us...
more »

2017-12-03 06:12 (2) Answers

Eclipse won't open after installing openjfx

I was attempting to use JavaFX, and I found that I needed to install the openjfx package, as the regular openJDK8 didn't come with the JavaFX files. However, since I did that Eclipse no longer opens. Instead, it crashes with the following crash log a...
more »

2017-12-03 04:12 (0) Answers

JDBC nested while loop

there. I am a beginner using java. I want to do a nested while loop for my SQL query results. My original result was like following, eno ename title date_visit ssn pname charge 103 Jekyl Doctor 20170717 946883650 Gers...
more »

2017-12-02 23:12 (1) Answers

Can't add CircularSeekBar to my project

Hey, I've been trying for hours to add this to my project to make a fuel gauge. I've been doing everything as it is shown in the instructions. But I happen to encounter some problems that I can't resolve. I've pasted the .java file as instructed e...
more »

2017-12-02 21:12 (1) Answers

Function in a function in java

Is there a way to use the first function in the second one to create a double array with random numbers? public static int[] build1(int size) { int[] arr = new int[size]; for (int i=0 ; i < arr.length ; i++) arr[i] = (int)(Math...
more »

2017-12-02 19:12 (1) Answers

Two separate behaviors for back button pressed

Rather new to Android development and I'm having a difficult time trying to solve this odd behavior. The back button in the upper left corner of my application acts differently then the back button built into the phone. The back button in the app w...
more »

2017-12-02 16:12 (1) Answers

Knapsack but exact weight

Is there a algorithm to determine a knapsack which has an exact weight W? I.e. it's like the normal 0/1 knapsack problem with n items each having weight w_i and value v_i. Maximise the value of all the items, however the total weight of the items in ...
more »

2017-12-02 15:12 (1) Answers

Problems when trying to persist an Entity

I'm getting errors when trying to persist my entity class into Oracle database. Here is my Entity class package com.airline.models; import java.io.Serializable; import java.time.LocalDate; import javax.persistence.Entity; import javax.persiste...
more »

2017-12-02 11:12 (0) Answers

JPA sequences using autogeneration

I have created for an Entity an auto generated id like: @Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id; and when tried to persist the entity I got the error: Exception [EclipseLink-4002] (Eclipse Persistence Servi...
more »

2017-12-02 11:12 (0) Answers

Weird behavior accessing tuple from Java

I am looking for explanation and/or versioning details (if possible) about a very strange behavior I found in Java accessing tuples created in Scala. I will show the weird behavior with an easy test I did. I created this Scala class: class Foo { ...
more »

2017-12-02 09:12 (2) Answers

How to get search results quickly?

I have a database of objects in the firebase database, and I need a function to return some search results; if I receive a string to search the "Title" aspect of objects for some substring, I need to return a list of all of the objects which satisfy ...
more »

2017-12-02 06:12 (1) Answers