Category "java"

How to select all items listed in Recyclerview using androidx.recyclerview.selection?

I am using androidx.recyclerview.selection for selecting items in a RecyclerView. I am trying to build an edit fragment in which it pre-populates the old views

How to Overlap Panels in Swing?

I am attempting to have multiple JPanels that can "overlap", also allowing me to perform custom painting. For this I am using a MainPanel, which extends JLayere

GameOver dialog in Android Game

This method must display results when the game ends, but in line final DialogFragment gameResult = new DialogFragment() {...} I have an error "Fragments should

RabbitMQ doesn't show me the queues and exchange created in my Spring consumer and publisher apps

I am trying to create a publisher and consumer apps in spring using RabbitMQ. Every thing works fine and when the publisher sends a message, the consumer receiv

RabbitMQ doesn't show me the queues and exchange created in my Spring consumer and publisher apps

I am trying to create a publisher and consumer apps in spring using RabbitMQ. Every thing works fine and when the publisher sends a message, the consumer receiv

Unable to find the xpath of star using selenium & java

Thank you in advance ! url - https://www.tripadvisor.in/UserReviewEdit-g641714-d1156207-Club_Mahindra_Madikeri_Coorg-Madikeri_Kodagu_Coorg_Karnataka.html i ne

How to create empty folder/object or new file in new folder (not upload) in Minio using Java Api

I am using Java API (https://docs.min.io/docs/java-client-api-reference.html) to use Minio Client. I want to create a new folder and a new file (empty or sample

Get body as raw string from ServerWebExchange/ServerHttpRequest

I need to get the request body as a raw JSON string in my controller. I'm using Spring WebFlux. If I could change @PostMapper function signature, it will be so

standardized method for writing an arbitrary typesafe Config to a hocon file?

in a Scala research application, i load a hocon file using PureConfig's ConfigSource.file() method, which represents the default configuration for a research ex

Manage unique fields insertion with hibernate

I'm working on a JAVA project and need to insert an entity in my DB using Hibernate but the fields need to be inserted only once. I have this ProjectEntity clas

Restrict a class for creating second object in java

Is there a way where we can restrict a class to create only a single object in java? It should give some exceptions if we try to create another new object. Exam

Why can't I use Gradle DSL in apply'ed files

In our team we have lot of projects built with Gradle. Some parts in the Gradle files are all the same. For example, we use Java 11 in all our projects. So my i

Unable to save the screenshot in Selenium using Robot class

When I try to take screenshot using the Robot Class. I'm getting javax.imageio.IIOException: Can't create an ImageOutputStream! error: Code Snippet: public

JAXB unmarshalling - reader cannot be null

I want to retrieve some data from JMS, filter them and send them to REST server. When I unmarshal those data I get an error: java.lang.IllegalArgumentException

Why do not work @Validated in spring boot 2.6.2

I have in my pom file: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validati

How to calculate the distance between GeoPoint and Polyline

Suppose i have: GeoPoint p = new GeoPoint(10.08, 11.09); //(lat, long) and a Polyline (a sequence of Geopoints) ArrayList<GeoPoint> waypoints = new Arra

`RUN ./gradlew build -x test` command error

I have been trying to install conductor using docker but I have been constantly getting errors. I tried using [https://github.com/Netflix/conductor/tree/main/do

I am getting an error "Failed to parse the JSON document", I have used JsonPath

//Get place { String getPlaceResponse = given().log().all().queryParam("key", "qaclick123").queryParam("place_id", placeId ) .when().get(

How to call an activity method from a fragment?

I need to call a method that is in an activity from a fragment , i can't even instatiate the activity in the fragment , I don't know how to approach this proble

How to call an activity method from a fragment?

I need to call a method that is in an activity from a fragment , i can't even instatiate the activity in the fragment , I don't know how to approach this proble