Category "java"

Modeling a 4x4 Grid for Simple Game Using Looped ArrayLists in Java

I am meant to create a game in Java that specifically uses looping Arraylists to create a 4x4 grid. I have a Grid class, made up of an ArrayList of 4 Rows, a Ro

How to convert KML to GeoJSON using GeoTools in Java (GeoServer don't accept the result of my conversion)

I have a KML File and I need convert to GeoJSON. I am using Geotools in Java for convert KML because GeoServer has problems to import KML. I can convert the fil

JavaFX Maven shaded jar fails to open on double click but can run from terminal

This is the Maven shaded plugin I'm using in my pom.xml: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>mav

Why am I getting this error unexpected type required: variable, found: value in my method?

I am trying to update my account balance. I have a getAccountBalance accessor in my Account class in the same file as my main method, my main method has the Acc

WebFlux async responses from controllers

Hello everyone My task is to simply make controller that gives me results immediately when they are ready (simple example below) Imagine: I want to get the exac

Map database record to entity without knowing its id

Basically I have the system where there is entity called Dictionary, where all dictionary entries are stored (like countries in example below), these entries ar

Take a class as a parameter which has a particular method in it

I know that we can pass a class in a param which has a particular class as its super. For example, see this: public void sampleMethod(Class<? super MyParentC

When calling javax.imageio.ImageIO.read, can I specify the format?

In Java, I want to use the class javax.imageio.ImageIO to read a image from an InputStream. This class has a static method, read(InputStream input), which can d

Excluding @bean from ComponentScan

I have lot of beans declared in a single class package com.example; @Configuration public class MainBeanClass{ @Override @Bean("cachingSession") @Lazy public C

Spring cloud data flow custom stream auto kafka binding

Actually I'm doing my own streams in spring cloud data flow, developing my own processors and sinks. But I'm a bit stucked with the internal kafka bindings. I w

How to link deletion in room data

I have two data base or two tables ex:one for matches and one for chat jn event section in match note that the all messages is inserted in one table mean that e

Issue :: Microsoft Cognitive Services :: client-sdk :: Azure

I am trying to use Azure cognitive services and trying to convert "Text To Speech". I am able to convert the Text to Speech successfully on my local machine. Th

How to implement a search table with many to many relationship in Hibernate with a 3rd class entity

I am trying to learn Hibernate to create on startup the Db from entities, but I have only found articles suggesting how to implement many to many relationship w

How use projections in spring-data-jpa?

I need to get all the information about the ticket in one request, also the name, author, and year of the book. I have implemented this : I create interface Tic

how to resolve this sonarQube bug about hashmap in java

I have a hashMap : private static Map<String, JSONObject> laserDataList = new HashMap<String, JSONObject>(); I wrote this part of code : public void

ERRor:%android.database.CursorIndexOutOfBoundsException: Index 10 requested, with a size of 10%

Here is the complete code.. So the problem is that if there are 9 records in the table and by clicking on the ButtonNext , the application does not crash and di

How to load all the examples in to the @ExampleObject without specifying the ref so its visible in SwaggerUI?

I am developing a simple application where I would like to read the files from a remote URL and add them to the @ExampleObject. I am able to achieve this using

My docker run crash during the test phase of my gitlab CI

So i am quite new to the whole CI topic and im trying to run tests after my merge request in my pipeline. Except that when my command try to run the container i

Why does using 'Optional<>' give me the next error'Failed to convert from Optional to Mono?

I am doing a functionality that allows you to save users, but before that it does a validation to validate if the nick exists in the database, when I run I get

Google Drive setup push notifications

We want to receive notifications from google when we do anychange(Add,Edit OR Delete) on google drive folder for these purpose we have integrated google watch a