Category "java"

Fast real valued random generator in java

java.util.Random.nextDouble() is slow for me and I need something really fast. I did some google search and I've found only integers based fast random generat

This Error Force close my app when I'm inspecting my table : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10

I have table in my application and I'm Running my app on Huawei y9 and this error pops up after a 30 sec and force close my application. I link my other questio

Solving crosswords efficiently [closed]

I have a crossword puzzle and a list of words which can be used to solve it (words can be placed multiple times or not even once). There is al

Access Headers at any time when implementing org.springframework.validation.Validator

I have a Spring Boot Application where I need to perform some validation over the request's fields based on a header value. So like any other Spring Boot App m

com.twitter.sdk.android.core.TwitterApiException: HTTP request failed, Status: 403

I have recently added fabric plugin in my android studio, but i am not finding twitter login option on that plugin. When i search on google then i found one qu

Java - Getting file from same package

If I want to read from "Words.txt" which is in the same package as the class, how would I do this? Doing simply Scanner = new Scanner(new File("Words.txt")); re

MapStruct implementation is not working in Spring Boot Web Application

I am a newbie to Spring Boot and MapStruct Tool. Earlier, A Project(written by other team using these technologies) is not starting up. Then, I had made some

WebSphere Server V.8.5 troubles with Eclipse project

I'm trying to create an IBM WebSphere V.8.5 web app using Eclipse. I downloaded and installed all the IBM packages needed and followed the official guide to cr

Find third largest no in Java

I'm little confused with this simple program.I have to find third largest no in array.I have done some code but getting only second largest no problem in third

How to convert Protobuf ByteString to an octal-escaped String in java?

Could anyone please let me know how to convert protobuf's ByteString to an octal escape sequence String in java? In my case, I am getting the ByteString value

Gwt/gson in eclipse, error: "Unable to invoke no-args constructor for class"

I'm playing around with this Google Web toolkit/GSON example that gets data from twitter. Everything is compiling just fine, but when I debug as Web Application

Is there a java/JS library which can compare two json files and produce comparison result as html?

The idea behind the question is to have some library/tool which can compare two json strings and produce comparison result as html. E.g. the way some online com

Gwt/gson in eclipse, error: "Unable to invoke no-args constructor for class"

I'm playing around with this Google Web toolkit/GSON example that gets data from twitter. Everything is compiling just fine, but when I debug as Web Application

Netbeans doesnt recognize class in the same package

i am creating a little game with libgdx framework and netbeans 8. I have all java classes in a single package that match with the directory structure. The probl

How do I map Spring MVC controller to a uri with and without trailing slash?

I have a Spring Controller with several RequestMappings for different URIs. My servlet is "ui". The servlet's base URI only works with a trailing slash. I would

Netbeans doesnt recognize class in the same package

i am creating a little game with libgdx framework and netbeans 8. I have all java classes in a single package that match with the directory structure. The probl

Spring Security with React.js front end on other port

I'm trying to create a spring security authorization for my university project. Unfortunately, I came across a problem, my frontend is on port 3000 and the back

Bad type on operand stack error when using hibernate

I am getting an error when using the hibernate. This is the stack trace:- java.lang.VerifyError: Bad type on operand stack Exception Details: Location: o

Mockito ClassCastException - A mock cannot be cast

I have a method in the class AppleProcessor which I would like to test: public void process(Fruit fruit) { if(fruit.getType() == Fruit.APPLE) { fru

How do I update an entity using spring-data-jpa?

Well the question pretty much says everything. Using JPARepository how do I update an entity? JPARepository has only a save method, which does not tell me if i