Category "java"

Android why are two identical Fragments created when navigating with NavController

I have an app that uses the single activity and multiple fragments approach and I use the NavController for navigating. Unfortunately, when navigating to a Frag

why a project that contain spring data dependency doesn't work on tomcat9?

I am trying to deploy a small springboot app on tomcat9 , the tomcat9 is on ubuntu 20 on my account in digital ocean . the problem when i am adding the spring d

Bumblebee Android studio Plugin [id: 'com.android.application', version: '7.1.0', apply: false] was not found in any of the following sources:

I updated my android studio from Android studio fox to Android studio Bumblebee 2021.1.1 but none of my projects can run in Android studio Bumblebee 2021.1.1. I

Jpa reader Spring Batch

I would like to know, if this way is recommended to implement the reader spring batch with jpa or is it better to look for another solution and if this way is n

How can I add node and Edge in a different way so that I can add a large file

public static void main(String[] args){ Node A = new Node("A"); Node B = new Node("B"); Node C = new Node("C");

Why onAdDismissedFullScreenContent is being called lately?

I have created a function to show interstitial ad before showing another activity. It's working but onAdDismissedFullScreenContent is being called 2-3 sec latel

No property named "Id" exists in source parameter(s). Did you mean "null"?

I'm kind of stuck in below error Post.class @Data @Getter @Setter @Entity @Table(name = "posts", uniqueConstraints = { @UniqueConstraint(columnNames = { "title"

Why is reactor context throwing "Context does not contain key" when .block() is called?

I have a WebFilter that injects a context public class MyWebFilter implements WebFilter { @Override public Mono<Void> filter(ServerWebExchange exchang

Type erasure Generics

An error occurs at new T[5] during compile-time saying => error: generic array creation and according to my understanding, the array is created during compil

How to Direct Message a specific person with a Discord Bot

I have tried to DM myself using the code: User me = new UserById(myId); me.openPrivateChannel().flatMap(channel -> channel.sendMessage("hello")).queue(); Th

Why Concurrent Collector in Java besides using ConcurrentMap does not use some Concurrent List Implementation?

Consider the signature of the concurrentGroupBy: static <T,K> Collector<T,?,ConcurrentMap<K,List<T>>> groupingByConcurrent(Function<

java.lang.RuntimeException: Settings logger used after project was loaded

i am using play framework 2.6 and sbt latest version I ran sbt -jvm-debug 9000 and received this following error. not sure how to solve this. (any suggestions i

Changing x-axis in grafana graph to custom time series sent as label of gauge

I am working on a project in java using spring boot that requires working on prometheus and grafana. To send data to prometheus end-point, I am using "gauge" ha

Spark-Java : How to add an array column in spark Dataframe

I am trying to add a new column to my Spark Dataframe. New column added will be of a size based on a variable (say salt) post which I will use that column to ex

Can you read a File only from a certain character using SeekableByteChannel

In a text file I need to read the part after ':' using SeekableByteChannel, can I do that and save the number of Bytes read and also the number of Bytes skipped

Saving entity with Spring JPA Repository resets enum ttype value

I have an TimelineEntity entity, that uses HoTimelineType enum with custom integer value. That custom integer value is stored in the database. Implemented via U

Android - onRequestPermissionsResult() is deprecated. Are there any alternatives?

I tried to implement request permissions for writing and reading from storage. Everything worked good but today Android showed me that the method onRequestPermi

Does line length affect performance? [closed]

I have very long lines using lambda. Also, for example, I combined two loops with a condition into one line. Will such actions affect performa

selenium - generic function to enter test data in webpage using nested linkedhashmap - how to handle radio buttons

I am using Selenium with Java in POM based hybrid framework. I am trying to develop a generic function to enter data in the webpage. The function accepts a link

Device rebooting when i click any EditText on login and sign-up screen

Every time I click the password or email EditText to type something, a few seconds pass and my phone starts rebooting I have tried the following: Making a new A