Sunday, January 22, 2012

Remove a label from all posts

I initially had tagged most of my posts here as Technical. But decided to remove it later on, as this is the "Tech" Thirst Day blog-site. I didnt want to remove the label individually from each post. So, here's a way to do that more easily.
http://www.youtube.com/watch?feature=player_embedded&v=wVvd-Y-_mD8

Web Browsers

As web developers, if we are to target 80 to 90% of world-wide web users, we need to ensure that our app works well on at least IE, Firefox & Chrome. You can add Opera, Safari and others if you want to do better.

What is a web browser?
http://en.wikipedia.org/wiki/Web_browser

List
http://en.wikipedia.org/wiki/List_of_web_browsers

Timeline
http://en.wikipedia.org/wiki/Timeline_of_web_browsers

Usage share
http://en.wikipedia.org/wiki/Usage_share_of_web_browsers

Tuesday, January 10, 2012

At var with JavaScript

What does the var keyword do in javascript? Well, it's a little known fact that it defines the scope of the variable. Take for instance this js snippet.

<script>
var i = 10;
fun();
function fun()
{
 j = 20;
 var k = 30;
 alert ('in fun scope: ' + i + ' ' + j + ' ' + k);
};
alert ('in global scope: ' + i + ' ' + j + ' ' + k);
</script>

The second alert statement will give a js error since (because of the var keyword next to it) k is defined only within the function. j, on the other hand, retains global scope since we didnt declare it with var.

Reference: http://www.hunlock.com/blogs/Functional_Javascript#quickIDX3

Sunday, January 8, 2012

Reclaim hard-disk space

A remote Windows server had run out of disk space on the primary logical partition of the hard-disk where the operating system was installed. I wanted to reclaim some of the disk space, since otherwise I couldn't even delete a file! I went looking around for files/folders which were huge and which could be moved without causing too much trouble.

I found some setup files under %windir%\Installer that I could remove.

Note:
1. The Installer folder is hidden. From Windows Explorer menu, Tools → Folder Options → 'View' tab, turn on option to 'Show hidden files, folders and drives' and turn off option to 'hide protected operating system files'. You might want to switch these settings back once you are done with this file move.
2. When you attempt to uninstall a program, these setup files are usually required. So, make sure you either do this temporarily, or if you intend to delete this, do so only for programs you do not wish to uninstall.
3. You can ignore the folders in the Installer folder with the guid names. They just have some files under them such as icons. Sort the folder by size to look at the setup files that take up the most space.
4. Right-click on the column headers on the right pane of the explorer. Click on 'More...' and select 'Subject'. The folder view will now show the name or product titles of the corresponding installer files. This should help identify the setup files instead of the alpha-numeric file names.