Author Archive for mahingupta

Fruitfultime – Monitoring, Analytics, and Enhancement of Productivity

Hi All,

Again I have found a great pair of magicians who allow me to check how productive I am.

Introducing Fruitfultime.


I have implemented following process in my office.

1. Every developer machine will have fruitfullTime installed.

2. Every machine will have Firefox installed with the plugin ScreenGrab image_8

3. Now FruitFullTime runs silently in task bar for whole day. Whenever you want to see the usage of time, just click on fruitFulltime iconimage_12 in taskbar and it will Show you a page in your browser ( We have Mozilla Firefox as default browser ) containing hell lot of statistics about your usage of computer today.

This is the example screen from their web site ( I can not show my screen for the reason of privacy ;) )

Using these stats I exactly know now how much time I am giving to bloody gTalk,gMail. I really surprised by knowing the amount of time I spend on gTalk.

4. Everyone will do ScreenGrab at the end of day for FruitFullTime statistics page and will mail it to one eMail Address.

I know I have created a work around to use a great system for free, but I will definitely try to purchase its Business edition as soon as it will be available.


You can check some reviews about it here.

You can  Download it from following location.


Best Regards,

Mahin Gupta


Typing speed – I enjoyed it a lot

I found Speedtest tool from rahul tyagi's blog. Its also interesting how I found his blog.

I wanted to know the meaning of word Masakalli  used in a song of upcoming Rakeysh Mehra movie Delihi -6.

I was not able to find the meaning of it but found this and loved it. So publishing it.

Catch : Actually on first attempt I got 48 words per minute but exactly when my time was getting finished I pressed backspace to correct a word and bingo, I found myself on the previous page. Beware of that.



35 words


Yet, if any one knows meaning of masakalli please let me know ;)

You can post your speeds also in the comments.. cant wait :)

LinkDom – The ultimate link kingdom – Issue 1

1. Ultimate List of Free Windows Software from Microsoft!70F64BC910C9F7F3!1231.entry?wa=wsignin1.0&sa=516393780

Really a great collection. After checking these you will not have to go for third party utilities for small little windows tweaks. I loved Open Command Window Here.

2. 10+ tools to save yourself in School

The bonus was interesting :)

3. Are My Sites Up ?

Good small tool to make sure your all web sites are up and serving the cause.

4. WhisperBot

Send and receive confidential notes securely and its free..

5. NoScript – FireFox Plugin image_thumb

If you want to know why I suggest you this and suggest you in BOLD fonts then please check the following blog posts. ( Please check comments section also )

Advice : Please check your gMail Filters if you have clicked and visited any links in these blog posts.

PhotoFunia … The ultimate fantasy machine :)

So introducing PhotoFunia. image_thumb_1

Put your face on any given image. It is amazing. They use face detection technology, and my my, magic.

1. Select and effect from gallery. These are basically collection of images there algorithm can process.


2. Select your photo, make sure to check My photo should not be available to the public, if you dont intend to do so.


3. Bingo….  You got your photo there.. now you are also a celebrity :)



There are lots of images from which you can choose…


I will give : 4/5

Superb work. They are doing just too good job.


Thanks and Regards,

Mahin Gupta

Checking Internet Connection

So basically there are 3 ways to do it. We will check each of them and will find the best out of them.

 1) Send WebRequest

                private static bool IsInternetConnected()
            HttpWebRequest req;
            HttpWebResponse resp;
            bool bRet = false;
                req = (HttpWebRequest) WebRequest.Create("");
                resp = (HttpWebResponse) req.GetResponse();
                bRet = resp.StatusCode.ToString().Equals("OK");
            catch (Exception exc)
                bRet = false;
                // resp.Close();
            return bRet;

Remarks : You need System.Net namespace to use HttpWebrequest and HttpWebresponse.


2) InternetGetConnectedState()  – wininet api


       private static bool APIInternetGetConnectedState()
            bool bRet = false;
                int Desc = 0;
                bRet = InternetGetConnectedState(ref Desc, 0);
            catch (Exception exc)
                bRet = false;
            return bRet;

Remarks : You need to create extern function to use this api and have to use runtime interop assemblies. So you need to reference namespace  

        System.Runtime.InteropServices and include following code in your class definition.

        private extern static bool InternetGetConnectedState(ref int description, int ReservedValue);


3 )InternetCheckConnection – wininet api

        private static bool APIInternetCheckConnection()
            bool bRet = false;
                bRet = InternetCheckConnection("", 0x01, 0);
            catch (Exception exc)
                bRet = false;
            return bRet;

Remarks : You need to create extern function to use this api and have to use runtime interop assemblies. So you need to reference namespace  

        System.Runtime.InteropServices and include following code in your class definition.

        private extern static bool InternetCheckConnection(string description,int flags, int ReservedValue);


Comparision :

Table shown below compares all the methods. Interestingly InternetGetConnectedState() reports connected even if we are not connected to Internet, and that is very natural since it has no way to detect if you are connected to actual Internet ( ie particular server ) unless you send a request to web server. You can find a good explanation about it here.Again you have to use interop services to use both this api which can cause performance issues.

Using Google server as server to request has also pros and cons. 1) Google is used heavily – but again it effectively uses CDN, so I don't think this argument holds a point. 2) You are almost very sure that Google server will be up and running in almost all circumstances, but yet for the sake of precaution use this as parameter and get it from either Database or App.Config

So after all of this for the time being I will go with Method 1 ie by using Send Web Request.

Method No Connection Connected to Intranet Connected to Internet
Send WebRequest false (0 ms) false (0 ms) true (550 ms)
InternetGetConnectedState false ( 30 ms ) true ( 0 ms ) true ( < 10 ms )
InternetCheckConnection false ( more than 2 seconds ) false ( 400 ms ) true ( 78 ms )


There exist other methods also to check Internet connectivity ie Create a socket connection to Web server, Use Ping or tracert, Open a telnet connection but many of this can create problems when firewall is on. yet, I am still interested in finding a better method than this. Please let me know if you know one.


Best Regards,

Mahin Gupta

Picasa -3 ….. Space eater

I wanted to install Visual Studio 2008 -SP1 , and it requires mind blowing 5.61 Gigs of space. :(

Again I ran out of space, so I have started to work on getting my C:\ space back again, and I got one more culprit, thanks to WinDir

Picasa !!!

We all know Picasa scans our computer and prepares its own database. it uses "C:\Documents and Settings\Mahin Gupta\Local Settings\Application Data\Google\Picasa2\db3" path for this.

I checked it and it was almost 900 MB.

I tried to search on Internet how can I change this location, I checked registry also but the bad news is that you can not change this location.

So what i have done ?

I just copied all *.db files from "C:\Documents and Settings\Mahin Gupta\Local Settings\Application Data\Google\Picasa2\db3" to one temporary location. Now my C:\ has more 900 MB space.

Now if I open Picasa, then it will again ask you to rescan your computer because it has no database now. I forcefully killed picasa process ( Because there is no way to stop it in that screen ). once again copied all the *.db files into "C:\Documents and Settings\Mahin Gupta\Local Settings\Application Data\Google\Picasa2\db3"  folder. Now again I opened picasa and bingo!!! all my images are back.

I will use this work around for the time being until google announces picasa version which let us to change image db location, till then watch this space.

I have also added this in my post where I have listed few steps of how to reclaim your c:\ space

Google Toolbar – Send to sms is retired…

Google toolbar had a feature to share a link with friends via sms. It was available for US numbers only.



But it seems that they have pulled out plugs from it.


I used it for couple of times to share something with my friends. it was very quick. Lets hope it will be back with same or some other name in near future.



Mahin Gupta

App_Offline.htm – An easy way to take your application offline.

Sometimes it is really a big pain to take your application offline. has one very good feature to take your application offline without any pain.

Method : put an HTML file named app_offline.htm in the root directory of your web site. will shutdown your application, Will unload your application domain, and for every request made to your web site it will return the content of App_Offline.htm

So now you don’t need to write any logic for taking your application offline.

Remarks :

1. Make sure you put at least 512 bytes content in the page, otherwise the browser will display 404 Not Found.


There is one more way to take your application offline : You can set enabled attribute to false  in <httpRuntime> tag.



Mahin Gupta

BlogEngine – Windows Live Writer Bug – Post not visible

I am using BlogEngine for my blog and using Windows Live Writer to post it to my blog.

I came across a very strange thing today.

I have posted a post using Windows Live Writer but it was not visible to the world. Strangely I was able to see it when I am logged in to my blog, moreover in the Month Archive

After digging sometime I got the point. BlogEngine comes with a handy feature of preposting, where you can publish a post in advance and it will be visible to the world only after it's publish time you have set.

The problem was basically of the difference between my Local Time and Server time.

When I post it using Live Writer it sets the publish time according to my local time. When BlogEngine displays any post it checks for its publish time and will display it only if the publish time is not in future.

So What is the solution :

1. When you post to your blog through live Writer, Set the publish date which is not in future for your Server.


1. Post to your blog through Live Writer, Go to your blog admin panel, change the publish date.


1. Wait for future… it will show up automatically. :)

Any ways…. Take my words, except this small problems the combination of BlogEngine and Windows Live Writer is killer… too Good.

I will give this pair 5/5.


Thanks and regards,

Mahin Gupta

Google Talk chatback badge on your Blog/Web

Here it is… Google again came with bang.

One of my client needed live Chat support on his web site. So I have tried lots of options including third party component, making my own chat system but than I came across the Google thing. Yes, you can add google talk chat support on your blog/Web site.

They call it Google Talk chatback badge.

If you want one for your own than go to

They will ask you for login, after login you will be redirected to Create a Google Talk chatback badge Page.


Rest of the steps are very easy..

1. Select a title for your badge.

2. Write your nick name : ( Mahin )

3. Select Style depending on layout of your website or blog.

4. if you want to display your status message there then check the checkbox Show your status message.

5. Click update badge.

You will be given a script in below textbox, just copy and paste this script in your blog/Website.


How it works :

1. If your gTalk Status is Available ie. Your status icon is green ball Available then your nick name/Title will become hyperlink. ( If your status is busy then it will not be a hyperlink.)

2. When someone will click on that link

– he will get a popup chat window.

– You will get a chat from with one link. If you want to join this chat than click on that link.

– you will be redirected to your default browser to open a popup window. if you are not already  logged in in to your gMail account than it will ask you to login.

– After login you will get Launch Chat button. Click on that and you will get a popup window, where you can chat with user.


Remarks :

1. Both party must have Flash 8 or higher plugin installed in their browsers.

2. System is quiet slow, so better you write warning about same in your blog/Website.

3. You should not put this type of things directly on your home page, because basically it is a cross domain request so it will affect the loading time of your home page. So better you put link for this on home page and open a pop up or new page for this.