What the difference between currentTimeMillis and nanoTime in Java?There are two similar methods in Java: System.currentTimeMillis() and System.nanoTime() that relate to time measurement. CurrentTimeMillis…May 1, 2024May 1, 2024
How to write Dockerfile for Rust projectRust is a powerful language that allows you to build native binary. Docker multi-stage builds separate compile and runtime stages. In the…Jan 26, 2024Jan 26, 2024
How to fix “The default package ‘.’ is not permitted by the Import-Package syntax” in OSGIWhen you build your OSGI project with “org.apache.felix:maven-bundle-plugin” you can found error like this:Jan 16, 2024Jan 16, 2024
Find the Number of Occurrences of a Substring in a String (JMH based Comparison)In this post we will solve the problem “Find the Number of Occurrences of a Substring in a String” using different approaches. More…May 17, 2023May 17, 2023
How to write Comparable in Modern Java (Java 8+)In Java when we want to add order for objects of our class we have to implement interface Comparable<T> . Typically, in the old days we had…May 9, 2023May 9, 2023
How to write tests for PySparkYou have to write tests in 2023. This technique lets you check code correctness at an early stage and reduce risk of regress issues. This…Feb 7, 2023Feb 7, 2023
How to migrate your Python library to R programming languageMigrating a library from one language to another can be a challenge but you can skip a lot of issues when you choose to migrate just…Feb 7, 2023Feb 7, 2023
How to configure Kubernetes memory limits for Java applicationDisclaimer. This post describes hotfix for Java less than 17. If you are using Java 17+ skip this post and just use -XX:UseContainerSupport…Jan 30, 20232Jan 30, 20232
How to fix the “UnexpectedRollbackException”: Transaction rolled back because it has been marked as…UnexpectedRollbackException is too incomprehensible when you meet it first time. This exception really unexpected and the main reason why…Aug 1, 20222Aug 1, 20222
How to rewrite private method in JavaIn this note I will explain how to rewrite private method in Java using dark magic like byte code generation in runtime.Jul 30, 2022Jul 30, 2022