All Posts

ADF: EntityImpl.refresh(…) has no effect

Many times we use entity.refresh(REFRESH_FORGET_NEW_ROWS | REFRESH_UNDO_CHANGES) to prevent any changes we made to that entity from getting committed to the DB. What the refresh() method effectively does is change the post state of the entity. (See difference between entity-state and post-state.) The post-state is later used to decided which DML operation to use for […]

Create a Tag field using Django-Select2.

The excellent framework – Select2, have had support for tags for a long time, but Django-Select2 lacked that, until now (version 4.2.0). Tag fields are very much like any multiple value input field except that it allows users to enter values which does not exist in the backing model. So, that the users can add […]

Find one’s complement of a decimal number.

One’s complement of a binary number (1001_{2}) is (0110_{2}). That is, we simply flip the bits. This is easy to do in binary. However, if the number is in base 10, then do we do that. Convert that to base 2 then flip the bits and change it back to base 2? Maybe, but if […]

Lessons learned from PhoneGap (Cordova) and jQueryMobile on Android

I recently created my first Android app – JustTodo. This is a simple app but took considerable time to finish due many unexpected problems. Google wasn’t too helpful either. Here is a list of issues I faced and their solutions I discovered. General tips Zooming and Scaling I presume that you have already encountered suggestions […]

How to register your Aadhaar number with your bank (ICICI) without the physical Aadhar card

If you are one of those unfortunates who need to register their Aadhaar number with your bank to get LPG gas subsidy, but you lost your Aadhaar card or did not receive that, then read on… About two years back I enrolled for Aadhaar. I never received that, but I did not bother checking, since […]

Securing the WordPress Login page

Of late I have seen quite a lot of brute force attempts to login into the admin account of this blog. The source IPs are wide and varied, ranging from Istanbul, Germany, Greece, US and more. In fact according to ArsTechnica article this has been happening for sometime now on a huge scale. I see a […]

Process to get new LPG gas connection

There are no silver bullets but it is better to know the process to avoid harassment. I recently got Indane LPG gas after making rounds of their office for about a month. Most of these was due to the lack of info. SO, here you go. First step is you need to get the KYC […]

Why we don’t hire programmers based on puzzles, API quizzes, math riddles, or other parlor tricks by David of 37signals

Why don’t hiring managers follow this? People do lack common sense. Why we don’t hire programmers based on puzzles, API quizzes, math riddles, or other parlor tricks by David of 37signals.

Configure your Belkin N150 router for BSNL broadband

Login to your router dashboard. It should usually be at http://192.168.2.1. Now under “Inertnet WAN” click on “Connection Type”. Here select “PPPoE” and click on Next. Provide your BSNL username and password. Leave the “Service Name” field blank. For “VPI/VCI” field provide 0 and 35 as values. For “Encapsulation” field choose “LLC”. Leave all other […]

Calculate Root of Any Whole Number in Java

The following Java program can find any root of a whole number. The logic is simple. Start by guessing some number and check if that is the correct value. If that overshoots then subtract some from the guess number else add to it. We add or subtract some fixed constant. If that constant is too […]

Google really finally allows India to sell Android apps

There were reports a month back I suppose when Google mistakenly added India to the list of approved countries. Later that they removed India from the list, apologizing for the mistake. Now finally all India Android devs can rejoice. India is finally in the list. I just enrolled today. Check the below official link to confirm. Supported locations […]

My Flickr Photostream

applegrew’s photostream on Flickr.