Category "java"

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

In Java can we create an object of a subclass in the subclass itself and outside the methods of the subclass?

I need to create an object of a subclass in the subclass itself but outside of all the methods of the subclass. In the code below, I want to create an object of

C++ and Java array declaration/definition : differences

my question is really simple (which doesn't imply that the answer will be as simple.. :D ) why do arrays in C++ include the size as part of the type and Java's

request.getParameter() returns null when making a PUT ajax request in a Java servlet

I just started learning JSP and Java servlets and I stumbled upon an issue. I will use a simple example to show this unexpected behavior. I have a .jsp file whi

Docker access container from java application in different container

I created a Dockerfile and i want to conntect my crawler application with my selenium server. I have connected the services via link, but its not possible to re

Moving of scroll bar up and down hide records from hierarchical records tree from UI. gwt and extjs

I am using tree in treepanel and treestore to show hierarchical records on UI for one of my application. When I add some no of records vertical scroll bar is ap

How do I check for presence of keys in the object of a JSON response in restAssured Java

I have an endpoint that returns the json response as below: "abc" : [ { "name" : "XZ", "id" : "1234", "action" : { "attributes" : {