Category "java"

Which openssl keypair gen command produces a password-less private key that I can read in Java 17?

Burned better part of a day on this. Google says use PKCS#8 format for the private key, so I issued command (alpine openssl 1.1.1o) $ openssl genpkey -out my.p

Converting a mono object into two different mono object and the root mono is executing two times

Suppose I have create a Student entity and storing it into database using reactive. Student student{ id; name; institutionId; courseId; } I

Build complex PDF in kotlin [closed]

I want to create "complex" (footer, header, cells and pictures) pdf for my android application (kotlin). I've seen some people already asked f

How to pass hbase-site.xml to Google Cloud Dataflow template

We have a setup where we have a Hbase cluster running on Google cloud and using Dataflow I want to write into Hbase tables. For this, I want to pass my hbase-si

How to add a Lottie animation in Java programatically

I tried to add Lottie Animation to Java (Android) programmatically, but I keep failing. I will show my code below I need to change from drawable to Lottie. This

How to check if token expired in java?

I have user which have: id, username,password, tokenExpires which is Date. When i generate token i generate a string, how to check if token is not expired?

Difference between Static methods and Instance methods

I was just reading over the text given to me in my textbook and I'm not really sure I understand what it is saying. It's basically telling me that static method

How can i call cpprofiler in choco-solver for contrainst programming profiling

I found this on choco-solver documentation but i do not know how use it with provided choco-solver sample program in order to profile. NB: I already install cpp

org.hibernate.internal.ExceptionMapperStandardImpl.mapManagedFlushFailure HHH000346: Error during managed flush

I have a server mistake: > ERROR [http-nio-8080-exec-5] > org.hibernate.internal.ExceptionMapperStandardImpl.mapManagedFlushFailure > HHH000346: Error

Spring RequestBody with either List<Object> or Object. Name for both are same "data"

I want to handle json request for List of Object and Object it self in the same Spring controller. Below is the exact example. Json Request for Single Object:

Java get generic type of static method at runtime

So I was reading through the source code of Collections.java, there is a generic method copy(). I simplified it to this: public static <T> void copy(List&

Scanner is skipping nextLine() after using next() or nextFoo()?

I am using the Scanner methods nextInt() and nextLine() for reading input. It looks like this: System.out.println("Enter numerical value"); int option; o

Find the max value of the same length nails after hammered

I'm trying to solve this problem: Given an array of positive integers, and an integer Y, you are allowed to replace at most Y array-elements with lesser val

Bukkit - Change block on click (client side)

What I'm trying to do is to replace a block into a diamond block on client side when a player right clicks it public class setBlock implements Listener { @E

Is it possible to use data.sql without schema.sql

I want to initialise schema using spring.jpa.generate-ddl=true and then populate using data.sql. I tried it but it doesn't seem to work without schema.sql. Any

package javax.servlet does not exist | package jakarta.servlet does not exist

javac -classpath "/opt/tomcat/lib/servlet-api.jar" /opt/tomcat/webapps/ROOT/WEB-INF/classes/NewServlet.java I have tried replacing the javax.servlet with "jaka

Accessing json value using jsonpath?

I'm following the tutorial for using jsonpath (https://www.baeldung.com/guide-to-jayway-jsonpath) and using the endpoint https://api.binance.com/api/v3/exchange

How to export backup of Cloud SQL database in Google Storage?

I have a GAE project and for that to store the data i have used Cloud SQL database. I need to take on demand backup of my Cloud SQL database and the backup sho

Query through all provided schemas

I have kind of 'restaurant app' with multi tenant architecture. Each Tenant in short words have their Order table where I keep all data regarding orders which w

Meaning of Long in JPARepository?

What is Long here and what on basis do we configure this in JpaRepository? public interface FirstRepository extends JpaRepository<First, Long> { }