Calculate age from date of birth in Google Docs (Spreadsheet)



Here is a simple way to calculate age from birthday in Google Spreadsheet (works in Microsoft Excel also)

Imagine that you have a column with date of births in it. Just create another column ‘Age’ and specify the following formula in each of its cell.

=IF(E2,DATEDIF(E2,TODAY(),”Y”),””)

E is the date of birth column.

Thanks to this post for showing it.



Spell-check web pages in Firefox



I must write about this as I badly needed a Firefox extension to spell check active web page. However, I couldn’t find one as I was using the latest Firefox version and the extensions did not support the latest version.

Thanks to Alex for the tip. To spell check the current web page, just paste the following line in your browser’s address bar and hit Enter key. That’s it. You will see the magic.

javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

If you are going to use this feature often, just create a bookmark with the above line as the URL.

Thanks.



NDIS.sys BSOD – blue screen crash



I have been facing this problem very often. When download or uploading files (especially FTP or torrent) suddenly Windows XP would crash with NDIS.sys blue screen of death (BSOD).

One of the workarounds is to rename all instances of NDIS.sys just before downloading/uploading and then rename back to original name NDIS.sys after downloading/uploading.

Here are the batch files that I wrote. Hopefully someone will find this useful.

DisableNDIS.bat

ren %SystemRoot%\ServicePackFiles\i386\ndis.sys _ndis.sys
ren %SystemRoot%\system32\dllcache\ndis.sys _ndis.sys
ren %SystemRoot%\system32\drivers\ndis.sys _ndis.sys
pause

EnableNDIS.bat

ren %SystemRoot%\ServicePackFiles\i386\_ndis.sys ndis.sys
ren %SystemRoot%\system32\dllcache\_ndis.sys ndis.sys
ren %SystemRoot%\system32\drivers\_ndis.sys ndis.sys
pause

Thanks.



Firefox’s Places.sqlite file too big due to Google Toolbar’s bug



Due to a bug in Google Toolbar, the size of Firefox history/bookmarks file places.sqlite bloats up drastically. Instead of being in the range of 20MB-30MB, it can grow as big as 300 MB. And it keeps growing as you browse more websites.

Google Toolbar, instead of keeping only 9 thumbnails in Places.sqlite file. It stores thumbnail of each website you visit. Pretty serious bug.

This affected RecentX‘s performance as RecentX reads the history from Places.sqlite.

Here is a tool called CompressSqliteDatabase, that can compress any sqlite3 database. As it was designed for RecentX, the tool automatically detects a firefox database and asks you if you wish to delete all the Google Toolbar thumbnails so that it can compress it back to a very small size.

Download CompressSqliteDatabase from here

Thanks.



Ctrl+minus and Ctrl+Shift+minus keys in Visual Studio



Thanks to this StackOverflow post from which I discovered very useful keys Ctrl+minus and Ctrl+Shift+minus keys.

It moves cursor back (or forwards) to the last place it was. No more scrolling back or PgUp/Dwn to find out where you were.

The above mentioned post is very useful. Do have a look at it to increase your productivity.



Download a file from automatically from an ftp server



Every week, I need to download a database file from my server as a backup copy. Instead of manually connecting to the ftp server every week, browsing to the database folder, downloading (waiting…), moving and renaming it appropriately, I’ll show you how I automated this whole thing using a batch file and an ftp script file.

Windows bundles an ftp program (ftp.exe) with its system files. The ftp program accepts a script file as part of its command line parameters.

Here is the sample script file (call it ftpscript.txt)

(ftpusername)
(ftppassword)
bin
hash
get “httpdocs/db/mydatabase.sql” “mydatabase.sql”

Replace (ftpusername) and (ftppassword) with your own ftp account’s username password. The 4th line “hash” displays the download progress using # characters. The 5th line “get” downloads the database file to the local directory from where the script is being executed.

Now we will write a batch file which will run the ftp command with the script file.

Here is the sample batch file (call it downloaddb.bat)

D:
cd “D:\Website\www\db\”
For /f “tokens=2-4 delims=/ ” %%a in (‘date /t’) do (set todaysdate=%%c%%a%%b)
del mydatabase_%todaysdate%.sql
ren mydatabase.sql mydatabase_%todaysdate%.sql
ftp -s:ftpscript.txt ftpserveraddress.com

In the above code we go to the local database folder, generate today’s date, append today’s date to the previously downloaded database and then run the script. Replace the ftpserveraddress.com with your own ftp server’s address.

Every time we run the batch file, it will rename the previously downloaded file (with today’s date) and download the new file.

Thanks.



Manually initiating IntelliSense in Visual Studio



Sometimes when coding in Visual Studio, IntelliSense just doesn’t work immediately. You press period (‘.’) and don’t see any response, don’t see any data members listed. This can be quite annoying.

It is normally believed and discussed that IntelliSense cannot be initiated manually. But there is a trick.

If you don’t see the data members listed when it should, just change the configuration from Debug to Release and back to Debug from the Standard toolbar. You will immediately see “Updating Intellisense…” in the status bar.

This is quite a relief sometimes.