Hoarding programming problems for you!

Looking for good programming challenges?

Use the search below to find our solutions for selected questions!

All posts tagged java

Implement the `cd` command

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

Distributed system for data security and data privacy – Part 1

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

Read CSV – Java

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.

Build WAR file with Maven and deploy with Ant

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

Configure Maven 3.2 to use JDK v1.7 under Mac OS X 10.9

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