Pages
(Move to ...)
Home
Info
HowTo
Code
Publications
Finance
Links
Legal
▼
Showing posts with label
Java
.
Show all posts
Showing posts with label
Java
.
Show all posts
12/01/2025
[Android] Sprescia app for run activity tracking
›
No it is not Christmas today, but here is another free, no ads, no trackers, no data collection, minimalistic app to track your run activity...
[Android] MaiCar app for car expense management (refuels and maintenance)
›
Finally a free, no ads, no trackers, no data collection, minimalistic app to track your car expenses! Built for Android 14+ using help from ...
04/10/2024
[Java] Get type of elements in collection using reflection
›
Java type erasure logic means that at runtime some information is removed/replaced from generic declarations, which poses a minor challenge...
27/09/2024
[Java] Load entity with lazy children collections
›
When using JPA and lazy collection loading, at the time the parent entity is retrieved from DB, the lazy children are NOT also loaded in mem...
26/09/2024
[Java] Using annotation processing (and validating it) to execute logic at runtime
›
Sample project showcasing how to use annotations to perform runtime logic to log changes in object values. Remember it is a SAMPLE , so obvi...
05/09/2024
[Java] Serialize POJO to XML according to XSD
›
If you generate a class from an XSD schema , it will come with the necessary annotations to serialize it to an XML String. You can therefore...
[Java] Generate POJO from XSD in Maven
›
Assuming you have a nice correct XSD file with proper namespace references and all, then you could convert it to a POJO (or more) using jaxb...
19/08/2024
[Java] Prim algorithm to find Minimum Spanning Tree in a graph
›
The minimum spanning tree (MST) is a subset of all edges in a weighted, undirected, connected graph such that the resulting graph is still c...
17/08/2024
[Java] Graph union find algorithm
›
For an undirected graph, we can compute the disjointed sets that represent all connected nodes in the subgraph where each node resides. For ...
14/02/2024
[Java] Workflow management in microservices
›
Also published on Medium .
30/08/2023
[Spring] Synchronized methods and separate transactions
›
When marking a method as synchronized , it's important to remember that synchronization does NOT change the transactionality settings of...
09/08/2023
[Spring] Execute method in separate transaction
›
In Spring annotating a method as requiring a new transaction will not work if the caller of the method is in the same class . We can easily ...
21/12/2021
[Docker] Redirect app log file to container output
›
When running applications in containers, we might have log files that are relevant to monitor but are not automatically printed with the con...
[Docker] Set Java UTF-8 encoding
›
Sometimes a Java based app running in a container requires UTF8 encoding. Not all available images enable that by default, this can be fixed...
29/11/2021
[Docker] Multi stage builds
›
I've been recently introduced to a nice Docker feature: multi-stage builds . The idea is simple, if the build is containerized as well, ...
13/10/2021
[Java] Kerberos login and retrieve GSSCredentials from KerberosTicket
›
A scenario that popped up recently was to login a user via Java code to Kerberos and retrieve a GSSCredential object containing the Kerberos...
11/10/2021
[Java] Calculate the angle between clock hands
›
return null; Unless it's an analog clock, in which case: The hour hand makes a 360 degree turn every 12 hours or 12*60 = 720 minutes, th...
[Java] Distribute items in K buckets
›
Something simple which comes up often when problems require some sort of item distribution. Given an amount of items N and K buckets, distri...
[Java] Number of trailing zeroes in factorial
›
Given a number N, return the amount of trailing zeroes in its factorial. Example: 4! = 24, no trailing zeroes 10! = 3628800, two trailing ze...
02/10/2021
[Java] Generate the K-th number made only of primes 3, 5, 7
›
Generate the K-th number made only of primes 3, 5, 7. Expected results up to K = 15: 1, 3, 5, 7, 9, 15, 21, 25, 27, 35, 45, 49, 63, 75, 81 T...
›
Home
View web version