All posts tagged java
Problem statement Implement the cd command i.e. given a function cd(‘a/b’,’c/../d/e/../f’), where 1st param is current directory and 2nd param is the sequence of operations, find the final directory that the user will be in when the cd command is executed. Solution I am going to use a Stack to . . . Read more
In the first part, I have described how one can design a distributed system for maximum security and data privacy. Now its time to provide a sample technology stack for such a system as well as a basic functioning prototype. Technology Stack Our architecture will make use of the following . . . Read more
Introduction Suppose you are building a platform, that integrates data of sensitive nature. Such a platform can be an IT-solution, like a web application, for clinical studies that enables patients and doctors to login and access the data, such as findings, demographic data or enter new information. Another example would . . . Read more
The following code reads a CSV file and converts it to List<Map<String, String>> in Java. Each row is represented by a Map<String, String> entry in the resulting List. Map<String, String> maps column name (header value) to value.
Full code https://github.com/lucaslouca/database-comparison
Full code https://github.com/lucaslouca/compare-sheets
Problem Statement Given a graph G = (V, E), list all cycles within G. Algorithm 1. Compute a cycle basis of graph G = (V, E) * Find a minimal spanning tree (V, E’) of G, using Depth-first search (DFS) and its associated set of back edges * If e . . . Read more
Minimalistic Ant script for Tomcat war file deployment. This script first does a mvn clean and mvn install on the defined maven project. It then connects to the provided server, stops the running Tomcat, uploads the newly created .war file to the Tomcat’s webapp directory and starts the Tomcat again. . . . Read more
In this article i describe how to configure Maven 3.2 to use JDK v1.7 under Mac OS X 10.9 Step 1: Download Maven Go ahead and download the latest Maven version here. For this tutorial just download the binaries: apache-maven-3.2.1-bin.tar.gz. Step 2: Install Maven Once you have downloaded the zipped . . . Read more