In log4j, output INFO logs of classes only from your package.

Been awhile since I’ve been using log4j for most of my projects. I wanted to output INFO statements only from my package and block log statements...

NachOS academic projects

We had the option of implementing 1.) Multi programming, 2.) Virtual Memory Management or 3.) File System in Not Another Completely Heuristic Operating System, or Nachos. I remember...

Statement vs. Prepared Statement (when using oracle)?

When do we use Statement vs. Prepared Statement? In my opinion unless you are executing DDL statements (which don’t allow variable binding) you are better...

Oracle password expired

Oracle passwords can expire and if your application uses any of those users it could suddenly stop working. You can check status of your...

Function minima and maxima recap.

Came accross interesting problem in some GATE computer science paper. Consider the function f(x) = sin (x) in the interval x ∈ [π/4, 7π/4]....

Loading properties files from classpath

You could load resources using ClassLoader.getResourceAsStream() or Class.getResourceAsStream(). Important thing to note is that Class.getResourceAsStream (String) delegates the call to ClassLoader.getResourceAsStream(String). You can see the same below. 1 2...

Issues with loading properties files using FileInputStream

App.java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 package com.my;  ...

Parametrize anything using maven Resource filtering.

Was trying to Parametrize persistence.xml in src/main/resources/META-INF .  Came accross concept of  Resource Filtering by maven Resources plugin. 1. Replace values with variables in whichever file...