Java 8 streams

Notes on practical usage of Java 8 stream filtering. Stream Filtering A Stream<T> references a sequence of T values, and exposes a set of aggregate operations we can use to manipulate data in a pipeline. As an example, we can find the name of any people older than 20. In java, you can loop Read more…

Parsing XML with Java

Here are some notes on parsing XML file with java to extract information Simple Example Assume we have an XML file and we want to extract specific attributes. A sample file could be: With XMLStreamReder Here is the code to quickly scan the XML file and get the values for Read more…

Passwords and Hashing

This page presents a few examples of using Java for passwords and hashing. Generate Password A Java example to generate a random password containing only alphanumeric characters. Java Code to ComputeSHA-512 digest other.. linux get sha-512/

Java Generics

Generics Generics were introduced in java 5 to add stability to the code. You can add type variables to classes, interfaces and methods. Generic Class Declaration Below you see an example of generic class declaration. by writing class Box<T>, you introduce the type parameter T, that can be used anywhere in the class. Read more…

Mongo DB Test

Installing MongoDB on Windows. Download MongoDB from its download page, and install it. I chose to install in C:\opt\MongoDB\Server\3.2. Create a folder for database and a folder for logs. Then create a mongod.cfg to represent this data. In my case, I put all under a new C:\data\ directory. And this is the Read more…

JSDT Project Structure

This post explains the JSDT projects structure, and it is the result of my direct experience. This page serves also as part discussion for JSDT developments. Kudos -all to those who comment and leave constructive feedback: here and on JSDT bugzilla. [486037, 477020] By reading this article you will be able to understand where the Read more…

JSDT Development

This post is about my experience in setting up a JSDT development environment. (see also wiki.eclipse.org/JSDT/Development) Setting up JSDT There are several ways to setup JSDT development environment. A good one is having an Eclipse Installation for development (IDE) and an Eclipse Installation as Target Platform (TP) . IDE : PDE, GIT, XML and Read more…