Category "java"

Why catch specific Java exceptions unless specific handling is needed?

Here is the code taken from https://dzone.com/articles/9-best-practices-to-handle-exceptions-in-java public void automaticallyCloseResource() { File file =

How to find the number of elements having the same CSS selector in selenium java?

I am using the latest version of selenium with java. I am trying to find the number of elements in a certain web page having the same css selector, but I don't

why nginx error 404 when downloading a file

When I try to download a file on a workbench with 3000+ records, a 404 nginx error crashes. When I try to download a file with fewer entries, everything is ok.

How to remove attribute from item in DynamoDB table?

I have an item whose particular attribute I want to remove using SDK 2.x from DynamoDB. How do I do this? I am using enhanced DynamoDB for table management. Her

Access GlusterFS file system in spring boot application

I am new to GlusterFS. After watching this video https://youtu.be/IGEtVYh0C2o , I have a big picture of how the GlusterFS servers are working. I understand a cl

GraalVM Native Image failing on Springdoc dependency

I am trying to create a sample application using spring boot and GraalVM Native Image, however as soon as I add the dependency for Springdoc the generated execu

How to make this code faster in python (algorithm question)

Today I was browsing for some questions that I saw this: Algorithm - Air Battle C ++ time limit: 1 second Java time limit: 2 seconds Python time limit: 10 secon

How to update the recyclerview when opening the app?

I'm looking for a list of movies in an API, the project is in MVVM and the search is being done perfectly. However, when opening the app, the user has to exit a

Getting reactor.pool.PoolShutdownException during save in database

Service is using org.springframework.r2dbc.core.DatabaseClient with reactor-pool and r2dbc-mysql driver. I'm doing inserts in the database every 5-10 seconds (5

Using Karate, how do I loop though a json to pick up the value for a key based on another key in that json block?

Below is the JSON response I get from which I want to extract y1. Before getting the response, I know x1 already but I don't know y1. So for that particular x k

change the json object value

{ "onboardingInformation": { "apiInvokerPublicKey": "string", "apiInvokerCertificate": "string", "onboardingSecret": "string" }, "notification

Pass value from properties to @Column annotation

Helo, Is it possible to pass value from application.properties to @Column annotation in entity? I tried this: @Column(name = "${foo.column-name}") private Strin

Can't Run Java in VSCode?

What would cause VS Code to not run java debugging or show any output for java? The JAVA_HOME variable is set, in both the user environment and in the VSCode se

Issues while decrypting Initialization Vector IV algorithm

I am tying to implement Intilization vector 4 the issue I am facing is I am able to encrypt my text using intilization vector4 algorithm but when it comes to de

Why does my boolean value remain as false despite meeting the if condition in my setter?

public class Main { public static void main(String[] args) { // test1 where all variables are valid Main test1 = new Main("David", "male", 2

Unsafe object binding checkmarx spring boot application

I'm getting this alert from checkmarx, saying that i have an unsafe object binding when trying to save a comment. I've read that we mustn't save objects directl

Connection refused trying to connect spring boot application in docker

I try to run spring boot application in Docker, Circle CI. Please, check how my .circleci/config.yml file looks like: version: 2.1 jobs: test: docker:

Processing messages with PossDupFlag set with QuickFixJ

In QuickFix/J we can send a ResendRequest message to the Acceptor to request messages to be resent to the Initiator, within a given MsgSeq number range. For exa

Alternative to requestLegacyExternalStorage and MANAGE_EXTERNAL_STORAGE for Public Folders in Android 10/API 29?

I have an Android app on the play store that publishes data to a simple .txt file and lets you share using any other app of your choice. It used to write direct

Task1:Search for people with their social security number. Task 2: Fetch the list of residents based on their gender

I've created an ArrayList of Residents. Each Residents consists of full name, ssn number and gender. I had to sort the elements by ssn number first and then by