Thursday, February 22, 2018

Java File to String in one Line


This is the shortest version of how to read a file and convert it to String in Java:

String myFile = "";
try{
    myFile = new String(Files.readAllBytes(Paths.get(myFile.txt)) );
}
catch (IOException e)
{
    e.printStackTrace();
}

Sunday, October 9, 2016

C# 6.0 First Look


Check out new features in C# 6.0.

Enjoy!







Monday, September 26, 2016

Redis Cluster Setup


Redis is NoSQL key-value in-memory distributed data store. It can be used as super-fast database, cache or message broker.

Please check out this very useful article about Redis Cluster Setup on Linux: Configuring and Running Redis Cluster on Linux