Here is the question from my friend (ex-colleague): “I have a mathematical expression say (45 + ((4 – 25) + 2)) as a string. How can you evaluate it to find the result using JAVA programming language?” Well, this is very easy with javascript as it has the powerful eval() function. But java is static, [...]
Archive for the ‘Programming’ Category
Couple of days back when I was travelling back to home from office, I overheard two fellow employees discussing over a programming problem… “If four points in a 2D plane (x,y) is given, how to find whether it forms a rectangle or not?”. Question sounds simple right? Well, how would you program this solution? what [...]
When I was creating a simple google widget for our office coffee club, I thought of showing current inventory status with a progress bar. To my surprise, I was not able to google any simple html/javascript code for it. All I found was hefty javascripts which does a zillion things to display just a progress [...]