Tuesday, November 28, 2017

Read a text file in only one line of Java code

Since Java 7, you can do this with this wonderfull line :

new String(Files.readAllBytes(Paths.get(this.getClass().getResource("/file.txt").toURI())))

That makes Java powerfull and I love that.

Display Javascript console logs with jsfiddle

Jsfiddle is mainly made to test javascript code in a web context (aka with HTML and CSS). But, if you just want to use is to test backend c...