Property Files and Trimmed Values


Just Ponder You are reading from a properties file in java. Would you like the values to be trimmed already, or would you like the control to yourself? What actually happens?  Whenever you read from a property file, the values you get are left trimmed and not right trimmed. I love the expression on your face right now. Yes it is actually true. Consider a property file properties.properties, prop1=value1prop2=  value2prop3=value3prop4=   value4  **Please note: value1 has no spaces on the ...
Evernote: Data Everywhere

Evernote: Data Everywhere


The cloud is in, and someone is using it to the fullest. Have you ever thought of keeping your data (your notebooks, pics, tutorials, notes, reminders and documents) with yourself, in your pocket. Now it can be done easily; just search for “Evernote” and you’ll get what I am trying to say. Evernote makes it easy to remember things big and small from your everyday life using your computer, phone, tablet and the web. Why use Evernote? 1. Remember everything. ...

Simple Properties Files and Null Check


When performing a get on the properties from a property file,  If the property is entered, but the value is blank. e.g. file contains ‘field=’properties.get() returns ” If the property and its value is entered. e.g. file contains ‘field=value’properties.get() returns ‘value’ If the property is not entered into the property fileproperties.get() will return null. Lets the following code to demonstrate what I said just now. Tokenizer.java class Tokenizer { public static void main(String args[]) { Properties properties = new Properties(); ...

No. of Step Calculation in an Algorithm


There was a time when the processor were just starting to explore their potential. Then code optimization made a huge difference in the performance of the code. But, today most programmers take the optimization for granted as the compilers are smarter and the processors run like they have fire on their ass. But, to be a good programmer, one should always stick to the roots of programming. Let their be three arrays, A, B and C of equal lengths n. ...

Random Access Machine


In order to judge the performance of an algorithm, there exists a mental mathematical model. This mental mathematical model helps us to ensure the stability and high performance of algorithms. Also, one could compare two algorithms using this model. Mathematical Model: Random Access Machine. This model consists of a processor and memory. Designing algorithms for RAM:  Variable names are allowed Arrays, structures will be taken as Primitive data types Trees, lists etc are allowed. Instruction set:1. Arithmetic and Logical Operations ...