Category "java"

Is there a better way of writing native SQL query with EntityManager Java Spring Boot application?

My current code look like this. I am not using any ORM framework like Hibernate. I need to use this raw SQL query. public List<String> getEndcodedKeyByLen

java socket InputStream hangs/blocks on both client and server

I am recently working on a tiny program aimed to close the browser remotely. The basic procedures are as follow: Server side: Create a SocketServer to listen to

different jdk versions returned when requesting system

i wanna understang why these three commands not always return the same jdk. In the third request, the jdk is not the same. 1- when i launch this command java -X

LinkedList Add Two Numbers: LeetCode

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single

How do I separate items in an arraylist by character in Java?

I'm working on a game of Go Fish for a school assignment and I need to separate a group of 4 cards in order to keep score. Any help would be greatly appreciated

How to set the shape rendering attribute to crispEdges using Apache Batik SVG 1.8

I'm trying to get Apache Batik 1.8 to output shape-rendering="crispEdges" instead of the default shape-rendering="auto" in the root <svg /> node. I've s

Strict @MockBean in a Spring Boot Test

I am developing a Spring Boot application. For my regular service class unit tests, I am able to extend my test class with MockitoExtension, and the mocks are s

Is there a way I can break up into more than 2 classes

I am wondering how/if I could possibly break this up into multiple classes but keep the values across objects to pass between both. I am unable to get things wo

Static variable evaluates to null at json.put()

I have a class only to store variables as keys like: public class V { public static final String SHOW_OR_FOUND = "show_or_found"; public static final in

Image doesn't send for other side Android Studio java

I have problem, because I can't send images for other side, it duplicates or sends empty message, but normal messages work fine. I've tried many tutorials and c

Flux delayElements without initial delay

I would like to emit elements where elements are delayed each other by some time without initial delay. I can not use Flux.delayElements(Duration) because it d

How to read a single char from the console in Java (as the user types it)?

Is there an easy way to read a single char from the console as the user is typing it in Java? Is it possible? I've tried with these methods but they all wait fo

Post request with content type application/x-www-form-urlencoded not working in Spring

I'm using OpenAPI generator to generate Spring REST APIs. Here is a fragment: openapi: 3.0.2 info: version: 1.0.0 title: Auth paths: '/auth/v1/token':

How get specific file from directory using apache camel in java?

I have an scenario, a directory contains various file named pattern filehhmm like: hh=hours mm=minutes dir: file1200.txt file1210.txt file1220.txt otherfile1.tx

android camera2 Api autoflash not working properly, the first picture is taken before the flash fires

I'm using camera 2 API, my project is heavily based on the archived project from google: https://github.com/googlearchive/android-Camera2Basic/ I'm starting the

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/MenuHost;

I'm making a google sign in process in my app. Whenever I open my app it crashes and gives NoClassDefFoundError I checked the logcat and found this:- ------

voice recognition constantly in background android [closed]

FfhggtffgtfgtgftI want develop application that whenever it recognizes a keyword it does something. it needs to be in listening mode all the t

AEM 6.5 publisher not starting

I have followed the steps listed out here for setting up my local AEM instances. The author is running just fine. the publisher instance is not, going to http:/

Spring JPA not returning Foreign keys in response

I have a database with some entities, ( in parent child relationship )I can say and when When I try to make a query to child table to get all the rows, I only g

Maven use dependency from dependency

I have 3 proyects on maven, A, B and C B has a dependency to C. And A has a dependency to C. This is my pom From C <?xml version="1.0" encoding="UTF-8"?>