Category "java"

Convert while loop to recursive [closed]

I have the following code and I want to make the while loop recursive since I need a recursive function of the nth root of a number but I don'

Convert while loop to recursive [closed]

I have the following code and I want to make the while loop recursive since I need a recursive function of the nth root of a number but I don'

Simplest way to retrieve all messages of a Telegram channel in Java?

I hope this question is not too general. I'm looking for a way to retrieve all the messages (including media) that have been posted on a Telegram channel, and a

Is there a tree-like structure where nodes can appear multiple times and even be ancestors of themselves?

I'm crawling some web pages, recursively getting all the existing links, and I would like to preserve in some kind of structure the history of links I've had to

Exception in thread "main" java.lang.NoClassDefFoundError in the eclipse

import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import io.github.bonigarcia.wdm.WebDriverManager; public class TestFindin

Custom sort order on a Spark dataframe/dataset

I have a web service built around Spark that, based on a JSON request, builds a series of dataframe/dataset operations. These operations involve multiple joins,

Getting error: 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed

I tried to make a connection between my Angular frontend and a REST Endpoint in Java / Spring (which I didn't developed and don't know so well). By GET, all wor

Test Fails with "when() requires an argument which has to be 'a method call on a mock' " error on maven project(no frameworks used)

Hi I am trying to mock an insertion in my database and run it for a test. The test is failing with and error "when() requires an argument which has to be 'a met

Understanding how this recursive method works [duplicate]

Can someone please explain how this method works? I tried adding System.out.print statements but it didn't get me anywhere and I simply cannot

Test Fails with "when() requires an argument which has to be 'a method call on a mock' " error on maven project(no frameworks used)

Hi I am trying to mock an insertion in my database and run it for a test. The test is failing with and error "when() requires an argument which has to be 'a met

Can't jUnit test with file from resources folder

I'm trying to unit test with a file located under src/test/resources, but I can't always get a nullpointer when I'm trying to read it. I'm using Spring Boot 2.

How to Integrate Open API 3 with Spring project (not Spring Boot) using springdoc-openapi

My Existing Project is on Spring Framework not Spring Boot. I want to integrate Open API 3 with it. I want to integrate using springdoc-openapi not using Jers

what is different between ANDROID_HOME & ANDROID_SDK_HOME

I have 2 directory that look same, ANDROID_HOME=C:\Android\sdk ANDROID_SDK_HOME=C:\Users[user]\AppData\Local\Android\Sdk whats the different? can I set it in

log4j not creating log files

Below is the log4j.properties file which i have used in a project to generate logs. But the logs are not getting generated at the mentioned location. log4j.r

What is the role of the temp integer in the bubble sort code

int[] array = {4, 5, 7, 6, 9, 10,67,6,45}; for (int i = 0; i < array.length; i++) { for (int j = i+1; j < array.length; j++) { if (array[i] &g

How can I randomly pull out a String from an array list and put it in another?

As seen in the code that I tried to write, I want to grab a name from the Array list "names" and either add it to groupA or B. I do not need the groups to be ev

Apache spark, is it possible to have Google guice as dependency injection technique

Is it possible to use Google guice as dependency injection provider for a Apache spark Java application? I am able to achieve this if the execution is happening

A Gradle based sub-project throws `Could not find or load main class worker.org.gradle.process.internal.worker.GradleWorkerMain` during the build

I have a Gradle based multi-project. The issue is with one of the sub-projects. I have some tests there, but all code inside is commented out. Whenener I run "b

Spring Boot JMS MappingJackson2MessageConverter cannot find `_type` field even though it exists

I'm using Spring boot to receive JMS message and cURL to send it. Here's the Spring config: @Bean public MessageConverter jsonJmsMessageConverter() { Mapp

Discord onGuildMemberJoinEvent is not working

I have this problem with Discord JDA, and I'm completely frustrated about it. I hope you can help me. The problem is my console won't print a message when a use