Skip to content

Tag: java

Formula recalculation in excel template POI JAVA

I have an Excel template file with formulas in some cells, I open it and fill in the values using POI. The problem is that the formulas aren’t automatically recalculated. But if I open this file and click on a cell with a value, it recalculates that cell. I found two ways to solve this issue in the docu…

Pass String array to Oracle query using jOOQ

I’m using the jOOQ code generator to call an query from an Oracle package. One of the parameters of the query is a String array. The first issue, is that the code generator used Object as the type of the parameter. The generated documentation tells me to use an explicit Binding, but doesn’t say ho…

Can’t create an image file in Java

What I need to do is I have a input image file and I need to change it as user’s parameters. For example if user wants to make it %30 darker, first I get all pixels with their RGB values and store them in an 2D array. Sample array given below. After that I overwrite that RGB values (in our

Java Swing – Show multiple panels

I’m using the Java Swing UI Designer in IntelliJ 🙁 I designed something in the designer using multiple panels and spacers with 1 parent panel. When I add the main panel, the first one inside it shows, but the others don’t. Frame structure: Panel1 GradientPanel Panel Spacers What I designed What I …

Why can’t server and client be started together?

Relevant code: Why can’t the server and client be started together in the @Test? I think it gets stuck in the infinite while loop but at the same time, shouldn’t there be context switching with the new threads started after accepting the connection? I expected at least the name of the 2 new thread…

ElasticSearch how to aggregation the “copy_to” field

I need to group by 9 fileds and get the count for each group in ElasticSearch, the orignal code use the “Script” and the performance is bad so i need to optimize it. I managed to create a new field and use “copy_to”, but when I aggregate with the new filed i found some problem. I use t…