Category "java"

Call a Java method using MySQL triggers

I'm writing an application that retrieves data from a table in a MySQL database and displays it in a JTable. Whenever an insert/update/delete operation is made

Clear table and reset autoincrement primary key

I want to delete all from my table and reset autoincrement primary key. I do this : @Query("delete from sqlite_sequence where name='bin';") void delete(); @

How to merge multiple Maps having the same keys but different values into a single Map

I have n maps of the kind: HashMap<String,Double> map1; HashMap<String,Double> map2; ... What could I do to merge all these maps into a single map?

Spring SimpleJdbcCall and BeanPropertyRowMapper

To get data from database I'm using SimpleJdbcCall as it is convenient for stored procedures. Along with it I'm using BeanPropertyRowMapper as the no of fields

Parameterize some tests but not others with RobolectricTest

I am looking to add a parameterized test to an existing test suite that uses the Robolectric test framework, like so: @RunWith(RobolectricTestRunner.class) publ

How to correctly close netty channel without workgroup termination

I have following binding to handle UDP packets private void doStartServer() { final UDPPacketHandler udpPacketHandler = new UDPPacketHandler(messageDeco

Apache POI: ${my_placeholder} is treated as three different runs

I have a .docx template with placeholders to be filled, such as ${programming_language}, ${education}, etc. The placeholder keywords must be easily distinguishe

Employee Salary Calculation

Task Description I have this problem statement: Create a class Employee with the following private member variables. int employeeId String employeeName double

how to fetch single attribute from redis cache spring boot?

how to fetch a single attribute from Redis cache spring boot? I want a response like this one { "answer": "FHFHFHFHFH" } but getting

how to disable gradle build scan permanently?

I know I can add --no-scan on an individual command line (see https://docs.gradle.com/build-scan-plugin/), but I'm looking for a way to disable this in build.gr

What are the defaults in Spring @Async?

Could you tell me what are the default parameters for Spring @Async ThreadPoolTaskExecutor or how can I find them one my own? What are the default values for m

generate auto increment id (int) in java for multi instance application

I have a table which stores users information(id, name, surname, address, email, etc). I don't want to use auto-increment function of the database. So, we don't

java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null

I have an error when I'm trying to copy data from csv file into mysql database, but when I launch the temps.etl.xml file with java launcher, it gives me an erro

Password manager autofill

how to make an autofill app like dashlane, or lastpass on android studio. I want to make an autofill app, example facebook, It can autofill my login credentials

spring boot - springdoc open api: No api definiation provided error

I need to document my spring boot application's rest apis with SpringDoc OpenApi. So, I added this dependency in my pom.xml: <dependency> <groupId&

Find an object with certain private value in a java Collection

I am currently coding a game that uses an 8x8 grid. I have to stock a domino (2x1 size) in the grid for every player but when a player wants to add a Domino to

Read entire File to String Spring Boot [duplicate]

I have a text file with path as resources/templates/temp.txt. I tried reading it with built in Files.readAllBytes() function found in java.nio

Java code static analysis to find whether the code contains a HTTP call?

I am working on a very complex java web project with about hundreds of developers and intend to improve the performance of this monolitic. What I am trying to d

I have an issue with ProgressBar Widget

Basically I have a ConsentForm Activity that the user scrolls through and give their consent. Upon pressing the consent Btn (Yes) a dialog where they have to en

handleWindowVisibility: no activity for token android.os.BinderProxy

I have a Login screen and upon success login, it finishes and shows another page that has information about the user. I read about this post and also this post.