Category "java"

Truecaller like alert dialog in dart

I am trying to implement a true caller like alert dialog in flutter. Since I am very new to flutter+dart, I was looking for any out of the box implementation. S

How to calculate from a date to another date?

I am creating a workday calendar which calculates which date the workday ends. I have a code that sets daily worktime from e.g 8:00-16:00 (workDayStartStop). An

Mapstruct: Check for null for source before mapping to target

Mapstruct: Check for null for source before mapping to target. Require to throw a custom exception from mapstruct interface if the source is null.

Error when trying to create a model in PowerDesigner through Java

The actual code package OOM.src.createOOM; import org.eclipse.swt.internal.ole.win32.COM; import com.sybase.stf.powerdesigner.PdCommon.*; import com.sybase.stf

postman returning "status": 404, "error": "Not Found", for the spring boot

Thank you in advance, Hello I am new to spring boot. I am facing a problem with spring boot. When I run my URL in postman it shows an error below. I have also u

Assert two List have same subtypes in a certain order

I would like to check if two lists (let's say, ArrayLists) have exactly the same instance classes, based in an expected List. To do so, I have built the next me

java.lang.IllegalStateException: enterPictureInPictureMode: Current activity does not support picture-in-picture

Error message java.lang.IllegalStateException: enterPictureInPictureMode: Current activity does not support picture-in-picture. at android.os.Parcel.c

How to access a specific object in serialized data?

I'm using FlatBuffers to serialize a graph for an Android app I'm building (so I don't have to re-build it each time the user opens the app), but I'm having a b

How to register TestExecutionListener in Junit 5 and detect if all tests are executed

Hi I am trying to implement integration test using JUNIT 5 as a framework and we just want to start all the process once before all the test are executed and st

How to access many to many relationship auto generated table in Java Spring?

I have two table named recipe and tags, joined with many to many relationship This is recipe table: @Data @NoArgsConstructor @Entity() @Table(name = "recipes",

What's the recommend way of cloning a jOOQ Record object?

It seems like you can't create a copy constructor, you can't make it implement cloneable. I was thinking of using reflection to iterate over every attribute on

ERROR 18080 --- [main] o.s.boot.SpringApplication : Application startup failed Spring boot

I know question like this have been already asked but I am new to spring boot and trying to run this program as java but getting error. I tried to search this e

How to set the user object to Sentry in Spring Boot?

In a Spring Boot project I have a SentryConfig.java file package example.services.bo.config; import org.springframework.context.annotation.Bean; i

Turkish Identity Number Verification

How can I make sure that the given text is Turkish Identity Number? I have seen js version here and phthon version here Also, posted a question couple of days

Google foobar challenge (Prepare the bunnies escape)

I recently received an invitation to a google foobar challenge I am currently on level 3. I've written a code which passes 3/5 test cases and I can't seem to fi

Native module in React Native: function returns "undefined"

So, I am practicing making native modules in Java that can have functions exposed to the JavaScript code of React Native. For that, I decided to go for a simple

Spring @Valid Message Not Coming Through in Response

I have a CQRS Rest API using Spring and Axon. Validation is setup for inputs using the javax.validation library. The validation is working properly, and catchin

How to maintain accordionPanels in the same order?

I'm using accordionPanel in Primefaces. When I refresh the page the order changes! For example: I have 1,2,3 then they become 2,3,1 or 3,2,1 ! The order of the

Java Date.getTime() returns an incorrect response for 2022 April

Using Date.getTime() to calculate the number of milliseconds in a day. Google shows 86400 seconds or 86400000 milliseconds in a day. I measure every day in Apri

Spring - is it possible to give same url (path) in request mapping for two different post methods?

Is it possible to map same path (uri) in request mapping for two different post methods, only difference is request body. Example @RequestMapping(value = "/he