Installing Java 8 (OpenJDK) on Centos 7

OpenJDK Java 8 Runtime Environment (Can run but cannot compile Java code) # yum update # yum install java-1.8.0-openjdk   OpenJDK Java 8 Development Kit (Can run and compile Java code) # yum update # yum install java-1.8.0-openjdk-devel.x86_64   Not your cup of Java? See all flavors: # yum search java Advertisements

Windows Batch Script – Rename/Prepend and Change Extension of Files

I’m sharing a simple one liner Windows batch script to rename/prepend the filename, and change the extension of files (that match a pattern) within a folder. I take no credit for this script, as I was inspired by the post found on Stack Overflow here: The script is as follows: for %%f in (*.html) […]

Late Night Coding – Ternary if Operator

Midnight coding often results in weird/roundabout logic, such as the one expressed below. It is a snippet from a simple REST API server that uses Nodejs and the Express framework. (‘/dashboard’, function (req, res) { var reqBody = req.body if (reqBody.hasOwnProperty(‘transactionID’) && reqBody.hasOwnProperty(‘errorCode’)){ res.status(reqBody.errorCode).json(ErrorHandler(reqBody.transactionID, reqBody.errorCode)) }) function ErrorHandler (transactionID, errorCode) { if (errorCode == […]