Category "java"

How to change window selenium java?

I'm trying to access iframe inside html tag.xpath is not working.How to change my window to iframe in selenium(java/maven)?

filter objects based on an ID and Date Java

I have a class that for which each instance has a unique Id, a name and update date. ID NAME UPDATE DATE 1200 ANNA* 2022-03-01 1300 JONH* 2022-04-01 1200 ANNA*

How to migrate Springfox' @Api to Springdoc's @Tag?

Manual just says replace @Api -> @Tag. But @Api has produces and consumes parameters, while @Tag has obligatory name parameter. How to migrate @Api(produces

RStudio fatal error when loading tabulizer

I recently updated R to version 4.2.0 on my Windows 10 PC. When I try to load the package tabulizer, RStudio crashes and the bomb icon with the correspondent "R

Error using SonarLint in Visual Studio Code (VsCode) and Java 11

I have a problem using SonarLint in visual studio code, I’ve been using very well this plugin in java 8 but arround last week, Vscode required java 11 as

Transaction rollback when @Async method fails

I am trying to read about Transaction but I cannot understand how would I rollback a async method call, is it even possible to do so. I am facing an issue wher

FileOutputStream in dart flutter

what's the equivalent fileoutputstream of java in dart? Java code file = new FileOutputStream(logFile, true); byte[] input = "String".getBytes(); file.write(inp

Sonarlint and Intelij: possible to run analysis only for files in a changelist?

I am currently running sonarlint plugin locally in Intelij which works well. I would like to run the plugin only for files that I have in my Changelist - before

How to get List of Objects with value in array in Spring-Boot CrudRepository

I have an Object defined that has ChildAccountList of Strings as one of the attributes. Is there a findBy method that I can use such that it will return the li

how to mock UUID?

is it possible to mock UUID? or any problem in my Source Code? Look at exmaple: MyTest Class @RunWith(PowerMockRunner.class) @PrepareForTest({UUID.class,Ac

How to convert List to Map?

Recently I have conversation with a colleague about what would be the optimal way to convert List to Map in Java and if there any specific benefits of doing so.

How to make unlimited AnchorPane's in JavaFX

I'm trying to create a program that will contains many blocks (AnchorPane's) using JavaFX. My problem is that when I created one block others don't appear becau

How do I set up a recursive, many-to-many relationship WITH an association class using JPA?

So I'm trying to create a pharmacy database that, among other things, keeps track of drug-to-drug interactions. I have a Drug entity with various members and as

How to get multiple values by index in an ojAlgo-array?

Let's say I have an ojAlgo-array defined like this ArrayAnyD<Double> regularArray = ArrayAnyD.PRIMITIVE64.make(10); regularArray.loopAll((final long[] ref

Facing SSL issue suddenly while calling razorpay api

I am working on a Razorpay payment gateway integration My API was working fine but suddenly I am started getting the error Unable to get local issuer certifica

Finding Arithmetic Mean of Subarrays Efficiently in an Array

I am trying to find number of ways o calculate arithmetic mean of a subarray of an array. It boils down to this; given an array X and an integer S, how many con

Average test score from result array with varying group sizes

I am working on a problem where I have to calculate the average from a bunch of test results with the following criteria. -his program was tested on several tes

Why can't mock static method in Spring condition

this is my code. class ACondition extends SpringBootConditoin { public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata meta

Getting 405 error in OpenAPI swagger page if I put only path variable attributes in a Rest Controller

I am trying to create Swagger documentation using OpenAPI 3.0. I am using spring-boot-starter 1.5.4.RELEASE and springdoc-openapi-ui version 1.4.2 <parent>

Micronaut Security - Set PublicKey for RSASignatureConfiguration

All the examples of how to validate a JWT token that I found in micronaut are using a "secret". They do it this way: micronaut: security: authentication: