ITEXT PDF / CATATAN</>↗iText PDF10 Mar 2024
In this example you’ll see how to add Image to a Table when creating a PDF document using iText 8. We start by finding the image resource using getResource() method and pass the absolute path to the resource name. The getResource() method return a java.net.URL object. With this URL object in hand we then create […]
ANDROID MISC / CATATAN</>↗Android Misc11 Feb 2024
I was trying to run Android Studio Emulator on my old 13-inch Mid 2012 MacBook Pro (Mac OS X Catalina, version 10.15.7). Every time I tried to start a Virtual Device it failed to start, it crashed all the time. Checking the idea.log, which located at $HOME/Library/Logs/Google/AndroidStudio2023.1/, give me some hints. The log tells me […]
TEXT PACKAGE / CATATAN</>↗Text Package06 Feb 2024
In Java, the NumberFormat class of java.text package can be used to format numbers. For formatting a number as a percentage string with fraction digits, you can use the getPercentInstance() method that returns a percentage format for the current default Locale. Here is a sample code snippet showing how to format a number as a […]
ITEXT PDF / CATATAN</>↗iText PDF05 Feb 2024
When it comes to generating PDF documents dynamically, iText 8 is a powerful and versatile Java library that provides a wide range of functionalities. One common requirement in PDF generation is the need to include tables to present structured data. In this blog post, we will explore how to create a table in a PDF […]
UTIL PACKAGE / CATATAN</>↗Util Package27 Jan 2024
The forEach() method in ConcurrentHashMap is used for iteration over the entries in the map. The method takes a BiConsumer as an argument, which is a functional interface that represents an operation that accepts two input arguments and returns no result. Here’s an example of how to use forEach() with a ConcurrentHashMap: package org.kodejava.util.concurrent; import […]
UTIL PACKAGE / CATATAN</>↗Util Package26 Jan 2024
The ConcurrentHashMap is a class in Java that implements the ConcurrentMap interface. It is part of the Java Collection Framework and extends the AbstractMap class. ConcurrentHashMap is thread-safe, which means it is designed to support high concurrency levels by handling multiple threads concurrently without any inconsistencies. It allows multiple threads to perform retrieve (get) and […]