Category "java"

Common object in two objects java

I am implementing one api and I have the following request bodies for 2 different endpoints: endpoint1: { "requests": [ { "id": "123" } ] }

AWS recognition SDK causes the gradle to not build in Android Studio

I tried manually adding the "aws-java-sdk-1.12.199.jar" to the library and added the line "implementation files('libs\aws-java-sdk-1.12.199.jar')" into the grad

JavaFX wait for all listeners to finish

I created a method that accepts a CheckListView (controlsFX), an item List, a TextField searchField and a BiPredicate. This functions allows for filtering the i

How to Close Statements and Connection in This Method

How to Close Statements and Connection in This Method public static ResultSet getData (String query){ try { Connection con = ConnectionPro

Spring boot mongodb QuerydslPredicateExecutor ClassNotFoundException: com.querydsl.mongodb.document.MongodbDocumentSerializer

I'm trying to use QuerydslPredicateExecutor. Here is my repository interface: public interface ProductsRepository extends MongoRepository<Product, String

Android: Check if my app is allowed to run background activities

I have an app that runs a stopwatch service, and I run the service in the foreground. I have a notification showing the timer, that updates each second. The not

How do I randomly output string to multiple labels from array without repeats

I am trying to make a basketball playoff simulator. I have an array for east conference teams and west conference teams. I want to randomly output the team name

How to solve this leetcode problem of phone number pattern

package Code; import java.util.*; public class PhoneNumber { public static void main(String[] args) { int[] digits = { 2, 3 }; // int n = n

Spring Boot gradle build - invalid source release: 11

I am trying to build my spring boot project with this command: ./gradlew build But it continuously throws this error: 'Execution failed for task ':compileJava'

How can send custom error message after git push from local git server by using jgit api

I have been making a local git server by using jgit . Following is my code repository for local git server. https://github.com/masumcse1/mygitserver https://git

How to generalize the implementation the .thenby of excel in Java 8?

I have the following service class: public class SheetSorter { // sorts the sheet public static Sheet sortSheet(Sheet sheet) { List<String[]

Flink Job submission throws java.nio.file.NoSuchFileException while the file actually exists

I tried to submit a flink job that is already packaged in a JAR. Basically it consumes a kafka topic protected by SASL authentication, thus it requires a .jks f

Android UI broken when run

I am facing very strange problem, though I am beginner level on Android. after designed my layout file, when i run this android project by using physical device

MappingSqlQuery pass parameter

String sql = select * from APPLICATION_LABELS where DATE_MODIFIED > '"+ new SimpleDateFormat("dd-MMM-yy").format(lastUpdate) +"'"); MappingSqlQuery&

Springboot 2.6.7 mongodb dependency not working on @SpringBootTest

I've recently upgraded my springboot dependencies from version 2.5.4 to 2.6.7 here my gradle file v2.5.4 plugins { id 'org.springframework.boot' version '2.5.4

What is the difference between jconn4.jar and jconn42.jar?

Basically in the installation SDK of Sybase 16 we have jconn4.jar and jconn42.jar. What is the difference between jconn4.jar and jconn42.jar?

JPA cascading delete fails with custom delete method

I ran into an error with custom delete method in spring data jpa. Basically there's a bag which contains items, and when deleting the bag, all the items in it s

TestNG - Test fixture in the style of pytest

Writing Appium tests with TestNG. I'd like to pass the AppiumDriver to my test methods as an argument, so I don't have to remember to get it in every test. For

sum up an array in the special style of reduction | (i * 2)

I am currently sitting on a java problem I've found online. We have an array which has several thousand, if not millions, of entries. the goal is to efficiently

this application requires the latest version of arcore but installed

I'm using AR for my app. when I want to use AR I got this message: this application requires the latest version of arcore but installed but it installed: de