Category "java"

How do I view source code of built-in classes in Java (e.g. BigInteger etc.)? [duplicate]

For example, during some compilation errors, I get access to some built in source codes where the error has occured (maybe the perimeters were

Java "VariableDeclaratorId expected after this token"

I'm working on a little project for fun, that's essentially a little combat emulator. I'm trying to use a class similar to struct in C++, as in using it to crea

spark elasticsearch: Multiple ES-Hadoop versions detected in the classpath

I'm new to spark. I'm trying to run a spark job that loads data to elasticsearch. I've built a fat jar from my code and used it during spark-submit. spark-subm

Counting unique characters in a String given by the user

I have to write a program that counts the uniques characters in a String given by the user. For example "abc" returns 3 and "aabbccd" returns 4. I am not allow

Where is javax.annotation

Ok, so this is probably a NooB question (I'm more of a C++ guy), but I'm lost in the java woods and its frameworks forests... I'm trying to look into eclipse R

How to Pass JSON in the body of GET Request in Rest Assured?

Trying to pass this JSON in the body of a get request in rest assured. Is creating a JSON object a way to go ? { "pharmacyListId": null, "pharmacyListNa

When using Immersive Mode with dialogs, nav. bar reappears and resizes my layout

I'm using Immersive Mode in my app when it's running on Android 4.4+. (http://developer.android.com/training/system-ui/immersive.html) My activity indeed shows

Incompatible operand types char and string - JAVA

The program compares a character to a String and counts the number of times that character repeats in the String. Line 8 gives error "Incompatible operand types

ARCore – Session, Frame, Camera and Pose

I'm studying the ARCore References, Develop, make the course from Coursera, and read, understood and learn from the Samples. But I still missing some definitio

Dynamodb attribute converter provider for enhanced type extending Hashmap

I have a type which is extending HashMap<String, String>. As per the documentation here, it is possible to add a custom converter for the type. But it see

Error when trying to use a PieChart (hellocharts) on an Activity

I'm trying to use the external library "hellocharts" in my project. I have linked the library to my project already, but when the activity that has the chart st

Heroku session unexpectedly dropped/created

I am running an application on Heroku. We have a staging site and a production site. We are attempting to move to a standard 0 tier database. I have successfull

Java Serialization/De-serialization giving null object references

I'm working on a group project and we've run into a problem with the serialization part of our software. We have the class protocol: import java.io.Seria

How to append to existing excel file using Java HSSF

I am still relatively new to Java and have cobbled together enough code that allows me to write my data out to a new excel file. However, I want it to write (a

How to install a tagged version (i.e. not a snapshot) of your project locally and not to the maven central?

So I have done mvn release:clean and mvn release:prepare. As a result I have a clean tag on my subversion with the latest version 1.3.3 of my artifact. Now I

Apache Flink + CEP - Detect same events

I'd like to detect events that share the same property. Suppose I have a simple case class: case class Record(name: String, value: Int) Suppose there is the

Converting text file to all uppercase letters

I have an assignment for class and I have to make a program that takes an existing file and converts all the letters to uppercase. Below is part of the code (sp

Solve Integer division in floating point context

When doing: double a = 1000000000 / FPS; It gives me the warning: Integer division in floating point context. How can I solve this?

Quarkus extension filter doesn't work when registers via AdditionalBeanBuildItem

I want to implement my custom filter in my application. TemplateOverrideFilter public class TemplateOverrideFilter implements ContainerRequestFilter { priva

Spring boot + thymeleaf in IntelliJ: cannot resolve vars

I'm writing a short web form application using spring boot and thymeleaf on IntelliJ, but it seems that in the html file, all fields in the model cannot be reso