Monthly Archives: May 2015

Excel Copy Column Value Based On Another Column Value Lookup

Problem: One Excel sheet named “Account Info” contains accountnumber and account name. The other sheet named “Order Info” contains order mapping between orderid and accountnumber. Now we need to add another column to the second sheet to show the matching … Continue reading

Posted in Excel | Tagged , , | Leave a comment

Use Hibernate Query Language to Join Tables and Map Column Values to Java Objects

The following example creates a HQL statement with named parameters, executes the query then maps the query result back to Java objects. The two named parameters in the example are accountNumber and trackingId. The three selected columns are unitPrice, qty … Continue reading

Posted in Database, Java | Tagged , | Leave a comment

Guava LoadingCache Example: Demoed With Java8 Duration and Instant

Guava LoadingCache is a very convenient utility for caching key based value for performance improvement. Whenever you have an expensive object or calculation can be identified with a key, you always should consider to cache it in one way or … Continue reading

Posted in Java | Tagged , , | Leave a comment

Excel Concatenate String With Cell Value

You can use the “&” operator for this purpose, see the attached screenshot.

Posted in Database, Excel, Tool and Debug | Tagged , | Leave a comment

Java Symmetric Encryption/Decryption With Message Authentication Code

This post demonstrates encrypting/decrypting messages by using symmetric algorithms such as AES. It also demonstrates computing MAC(Message Authentication Code) and encoding/decoding messages with Base64. Encryption Step Highlights Generate 128 random bit using SecureRandom Encrypt plain text using AES algorithm with … Continue reading

Posted in Java, Programming | Tagged , , , , , , , , | 1 Comment