Category "java"

Proper mapping ( JPA ) composite key

For example i have entities @Entity public class A{ @Id Long Id; ... } @Entity public class B{ @Id Long Id; ... } @Entity @IdClass(ABId.class). public class AB{

Android selector layout of a menu item not working on a checkable item

I am trying to make a favourite item in the menu that can display a hollow heart when unchecked and a solid one when checked However the selector approach is no

stale element reference: while trying to access a drop down button

Have been trying to access the drop down button element using selenium, the page asks for a pincode on opening and after entering it and clicking ok it refreshe

stale element reference: while trying to access a drop down button

Have been trying to access the drop down button element using selenium, the page asks for a pincode on opening and after entering it and clicking ok it refreshe

Android selector layout of a menu item not working on a checkable item

I am trying to make a favourite item in the menu that can display a hollow heart when unchecked and a solid one when checked However the selector approach is no

Spring framework validate response data

I have custom simple endpoint that returns some object (record in my case). I would like to validate correctness of returned output data (i.e., output DTO does

Error while running cucumber feature file via testng

Below is the error i get: [RemoteTestNG] detected TestNG version 7.5.0 [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup(

OkHttpClient is not working inside Docker

I'm building server inside docker and trying to use OkHttpClient to get data but it seems not working. When I test with postman, there is nothing logged in serv

Java How to validate characters using a string?

I am working on a java project and was wondering how I could use a string to determine whether or not the chars in an array are valid. The given string is final

Java slenium wont getProperty when i use switch case

here is my simple code for getting a browser public WebDriver initializeDriver() { WebDriver driver; String browser = System.getProperty("bro

rdf4j on IntelliJ IDE?

Extreme beginner here trying to work on RDF. Can rdf4j work on IntelliJ IDEA or it works on Eclipse only? If it can work on IntelliJ, could anyone show me how?

spring boot dynamic scheduling with cron expression defined by the user

I want to send messages on different dates so I'm going to use java scheduler and dynamic cron expression but the problem is that user can send multiple messag

Prevent a JComboBox popup from appearing. Passing InputVerifier

Given the following scenario: one has a JComboBox and a JTextField the latter has an InputVerifier providing its own error message. the textField is the current

How can I use my utility classes in different git-projects at once?

I'm a beginning programmer and I apologize if my questions is trivial but I haven't found a sufficient answer to my problem. I have a git repository called "too

How to remove everything from ListView using a button onClick?

How to remove everything from ListView using a button onClick? When i try "fullCourseList.clear();", I can't add any more courses and the page is refreshed only

Using CombineFn instead of CoGroupByKey to handle hotkeys

I have a two very huge PCollections <KV<Long,XYZ>> and <KV<Long,ABC>>. I need to create a PCollection <KV<XYZ,ABC>> which I

Exception Handling using a Constructor (JAVA)

I'm currently working on a project in which I am to ask the user to input 2 numbers, divide them, and then throw an exception if the denominator is 0. I feel li

Leetcode Q9 Palindrome Number same code works in Java but not in C++

I tried solving this problem: https://leetcode.com/problems/palindrome-number/ using code: class Solution { public: bool isPalindrome(int x) { int r

finding the longest sequence of identical digits in an integer (Java)

I need to write a recursive method that takes an int as input and returns the longest sequence of identical numbers in it as an int (NOT as a string). counting

PDF from HTML with only alphabetic (Latin) using itextpdf

I believe that the answer to my question is very easy for those who have had experience with this, and I thank you in advance. Namely, I managed to export a PDF