Category "java"

Duplicate tomcat logs

Have spring boot app with only one dependency spring-boot-starter web and want to see tomcat logs for that i added to logging.properties that handlers = 1catali

How to return a Key from HashMap based on its Value in Java

Consider the following: for (Boolean i: x.values()) { if (i == false) { return // KEY; } } In the above code, I am trying to iterate through th

Doubly linked list not working, specifict implementation

I need to implement a Doubly linked list, and implement a addNode method that takes 3 arguments (head, tail, value). Here is my interface: public interface Doub

WebElement.findElement is not finding child element

I am trying to get child element (Card Number) from an html codes where html tags and class names are same. Below is the html code snippet <li class="payment

Can't import any library to Android Studio and Gradle Failed to Resolve

I have tried these two libraries in order to make Image Zoomable, but I'm facing the same problem. This is the error message Failed to resolve: com.github.Mike

Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: users is not mapped [Select username from users]

what is causing the error -> Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: users is not mapped [Select username from users]. I am trying to

Java isPrime function: Check if input integer values are prime

In short, again I found the task on internet: Input integers from the keyboard, check whether prime numbers or not. When you input 0, the program ends. So far

selenium user profile in headless mode, chrome browser

Situation: i'm running chrome in headless mode (see arguments in section part of code), when i connect to page (let say i sign into the page before i run my app

How to use variables from other Activity for buttons in Custom list view Android studio

I am currently building a bare bones game app for university. In the Shop activity of the app I have created a custom list view in order to display items in the

Different @QuarkusTestResource per Quarkus profile

I have just set up my project to use H2DatabaseTestResource in the tests. I also have created a custom PostgresDatabaseTestResource, following this brilliant bl

Google SSO login is not working in my Android app for the last one week, Showing the account selection dialog continuously

From the last one week the Google SSO login is not working in my Android app and it keeps loading the account selection dialog even after selecting the account.

How to handle reactive types within Reactive Spring Integration?

I'm playing a little with Reactive Spring Integration and I try to perform the following basic operation: @Override protected IntegrationFlowDefinition&

My component scan on Spring 5.3.18 does not work

I have little problem with spring ComponentScan in my application. Here is my Test spring configuration: @Configuration @ComponentScan(basePackages = {"com.dhl.

How To Test Login Method In JUnit?

I have been using white box testing with JUnit to test some methods that I have in my DAO Implementation class. I am trying to test the login functionality, whi

Can I prefill Mobile number field in stripe express Onboarding?

Can I prefill the Mobile number field in stripe express Onboarding? Image This is my code, Here I am able to prefill all fields except phone number. I have tri

Copy image from xls to xslx using Apache Poi

I'm trying to copy an image from a XLS to a XLSX, using Apache Poi 4.1.2. I'm not able to calculate the right value for dy2. My code: package poisamples; impor

Why I can't send data from child fragment to parent fragment?

I have a parent fragment with 2 children fragments (home, detail). Inside the parent fragment, there are 2 button to change both children fragment: btn_home and

Spring Mvc integration test fails

I want to write an integration test for a delete method in my controller, but no matter how many times I tried rewriting it, I am still getting different errors

How to check if a player has collided with any wall Java

I am making a maze game and I am trying to implement a wall feature that will restrict the movement of a player if he collides with a wall. I have created a wal

Java "Catalan number" generator is almost working right

What a Catalan number is: https://en.wikipedia.org/wiki/Catalan_number I am doing some Java exercises and a couple of the test numbers aren't passing even thoug