Java

Bit Array

Do you ever need to simply track the existence or lack thereof of something? Just a simple 1 or 0? Sure, we all do. Now, have you ever had to do this for millions of items? If so, what would you use? Many employ boolean arrays (just peruse database and data science projects on GitHub). […]

Bit Array Read More »

HMAC Verification

Hashed message authentication codes (HMAC) are a type of message authentication code employing a cryptographic hash function and secret key. It provides message integrity (via the hash function and encryption) and authentication (via encryption). It does not provide non-repudiation, as it uses a symmetric key which anyone can use to sign a message (no guarantee

HMAC Verification Read More »

Derby DB

At times it is more convenient to use a simple embedded database then to setup and configure a DBMS. For instance, one can use an embedded DB to store parameters or test results for quick and easy analysis. In this post, I will provide a simple example of using Apache Derby/JavaDB (JavaDB is Oracle’s version

Derby DB Read More »

LinkedHashMap Sorting

Sorting a single-element collection (e.g., arrays or lists) is quite easy in Java. It uses advanced techniques like CountingSort and DualPivotQuickSort. However, it is sometimes necessary to sort multi-element collects such as LinkedHashMaps. Prior to streams in Java 1.8, there was no relatively simply means of sorting these types of collections. I say “relatively simple”

LinkedHashMap Sorting Read More »