17 Dec

Google SMS Channels – The next thing in Socializing

There may be a dozen hundred providers providing the same feature as Google does, but when Google comes into the picture, they always take the market away from the others.

Google India Labs has recently launched SMS Channels. Apart from all the things it promises to do, this is what it means the most to me: Form SMS groups – much like the yahoo or Google groups. Only now, its accessible via the web as well as through a simple SMS which is a 10 digit mobile number. All facilities are available both on the web as well as via an SMS from your phone.


Create your own SMS Channel via the web here. Once created, you are provided a link which you can IM/email to your other members to invite them to the group. You can also invite them yourself by providing their phone numbers on the group page. Each invited member is sent an SMS asking him to respond to accept the invitation. To accept, simply reply to the message as ON <channel name> . You can also invite others to a group via SMS – simply send invite <channel name> <phone number> as an SMS to 9870807070. You can also accept invitations online by logging to your Google account and verify your phone number as the specified on the website and go to your My Channels tab to accept the invite.

You can be the only one posting messages to the group or you can allow all members to post. You can allow anyone to subscribe or only those that you invite.


You can visit the SMS channel page by logging into your Google account at : http://labs.google.co.in/smschannels. Then use the text box provided to send an SMS to the entire group. As long as incoming messages are free, no one will get charged for this. To send a message to the entire group from your cell phone, send the message as send <channel_name> <message> to 9870807070. Standard messaging rates will apply. For me, guess this is not a local number, hence I am being charged Rs. 0.50 per SMS instead of the regular Rs. 0.02. Each SMS you send is counted and charged as a single message by your service provider even though it is sent to multiple recipients by Google.

I have created a few channels for close groups of friends. Just send a message to the number above and it reaches everyone instantly, where ever they are in the country. Ain’t it a real benefit if you got friends across the country? And how much does Google charge you for this great service? Now read that question again. Google and charge? Not a penny. Its absolutely free!

Other Features

Now for the more advertised features: An SMS Channel can be tied to blogger URL and updates on the blog are sent to the subscribers via SMS. Similarly to a Google group. Even Google news via just Keywords. But the most important one for most people I am sure is that you can tie it up to any damn RSS/ATOM feed across the web!!! Every message posted can be viewed online on the Channel page so you actually don’t lose track of what’s happening even if you delete a message from your cell phone.

Last I saw there was a group called Live Cricket Score and also a group called IT-Freshers Jobs! Getting an idea of the huge benefit this feature is? There are thousands of groups already and tens of thousands of subscribers hooked on to them. The mobile revolution is here I presume.

Read more here: http://labs.google.co.in/smschannels/help

Google SMS Channels URL: http://labs.google.co.in/smschannels/browse

04 Jan

JavaScript Hacks: Add days to a date

If you were googling for a method to add a few days to a given date in JavaScript, you may be running up a blind alley.

As I painfully learnt that there is a simple way to accomplish this. If you are asking what’s so complex about that, here’s how: Subtract 10 days from the current date. Simply put, find today’s date (day of month as in Date().getDate()), subtract 10 from it. If that is less than 0, wrap around the date to the previous month after finding out the number of days in the previous month. Now if the month was January, wrap around to the previous year. etc.. Simple!!

Now that’s a tad bit too much of coding logic for something as simple as that. There has got to be a much simpler way. Isn’t there a dateAdd or dateSub kinda function? Oops.. Sorry. Gotta write that yourself.

But here’s the catch. JavaScript is foolish enough if we know how to outsmart it with its own Date() constructor.

The Date() object has a constructor that accepts parameters in the following format:

var someDate = new Date(iYear, iMonth, iDay);

Now here’s how we subtract 10 days from today’s date:

var today = new Date(); //Get today’s date

var interval = -10; //Setting the interval as a variable to show its applicability

var tenDaysPrior = new Date(today.getYear(), today.getMonth(), today.getDate()-0+interval);


And voila! No need to worry about wrapping across months or years or even bother about the number of days in any month. You could even add/subtract months/years in the same fashion. Try adding 60 days to current date. Works?

Another tip as I head off to bed, to find the number of days in any given month, here is a one liner:

var daysInMonth = new Date(iYear, iMonth-0+1, 0).getDate();

Two points to note:

– The Date object’s month runs from 0 through 11. So January would be 0, June would be 5 and December 11. The reason I am adding 1 to iMonth above is not to correct that but to infact get the 0th day of the next month, which automatically rolls back to the previous month’s last day.

Eg: To find the number of days in Feb 2008, we simply find the 0th day of March 2008. Remember that the month number of March is 2 (which coincides with our real world month number of February). I’ll let you use your brains to code that line.

– If you are wondering why I am subtracting 0 in my expressions, remember that JavaScript is not strongly typed. So to avoid ending up 1+1 with 11, I use the -0 to make sure that JavaScript treats them as numbers and not strings. One could also use *1 or /1 to the same effect.


24 Nov

Installing VS 2005 SP1 : Zap those Orphaned Patches

Did you know that when you install a patch/update/service pack for any product on your XP machine using Windows Installer, the patch source is cached in whole, consuming precious disk space? If your setup is canceled or exits due to an error, these caches can sometimes be left behind – forever! The next time you proceed with the same installation, the old cache is never used but a new copy is made at that time. This is what is called an Orphaned Patch. (I guess this is so common that they coined a neat looking term for it as well.)

I believed my system did not have any such orphans since I usually am extremely careful with software setups and updates (after my fiasco with the VS 2005 beta setup). But when again I was limited from installing the Microsoft’s released .NET Framework 3.5 due to VS 2005 SP1 not being installed, I was forced to do this update.

The VS 2005 SP1 has scores of known issues and there are pretty good workarounds for them. You can get more info on them here and here if you have planned to/just installed the SP and are facing issues.

But the most mind boggling part of the SP1 setup was the time it takes and the amount of disk space it requires. Documentation states it may take hours but common usage states it takes approx. 1 hour at 100% CPU utilization. But far more intriguing is the fact that the setup requires a minimum of 6.2GB space on your windows installation drive!!

This was totally unacceptable with me(and as I found out, with many others as well). So I found this great article by Heath Stewart who has put up many a post relating to these issues. All he suggests we do is disable the patch cache feature of Windows Installer(temporarily) and then proceed to do a silent install. My SP1 install was done in minutes and hardly consumed 500MB. Phew!!

But that’s not all. I discovered a means to remove those old orphaned cached patches from this article. How to go about doing that – Well, we’re back to the Windows Installer Cleanup Utility (yes, you read that right, its a tool that cleans up your goofed up windows installer installations). This very same tool was the godsend for me while solving my VS2005 Beta installation issues. What this tool does, you will read on the KB article. But the tool works by invoking a small command line utility called msizap (made available originally in the windows SDK). For our specific purpose to delete orphaned patch caches, simple invoke this tool with the parameter ‘G’ like this:

C:\Program Files\Windows Installer Clean Up\MsiZap.exe G

People who read the original article have reported they retrieved 23GB of space from their %WINDIR%. This gave me 2.3GB back on my 20GB partition. Great huh!

13 Mar

Vista AHOY!!

I was not very enthusiastic about installing or promoting Vista as such. Probably because I was extremely comfortable with XP and that I also didn’t have a legal copy of Vista to install. Now that I got this big parcel from Microsoft and opening it was a big ceremony at home. It was the Community Launch Kit which I had registered for some time ago. It had tons of stuff – 10*Dual Layer DVDs with Developer /IT Pro Session contents, on Launch DVD, 5 Copies of Vista Business(Full Version) and Office 2007 (Trial) plus posters, key chains, magnet stickers, Office 2007 pens, communicator status cube, Microsoft certifications vouchers etc. But of course, the most important thing among all these was V***a!!
And I sat down. I had a whole weekend to waste on this!! Upgrade to Vista! But on the safer side, decided to do a dual boot and slowly phase out XP if everything goes well.
And it was seamless. Well, almost. The network card didn’t get detected. Also had problems with AVG Free version, my TV Tuner card but these sorted out with some tweaking. But my scanner is still dead on Vista. But what really made me jump with joy was that every feature that Vista Business had to offer was enabled on my system without any qualms of hardware limitations. Of course, what good is 1.25GB RAM if not for Vista?
So I began installing stuff, found some incompatibility issues, explored some great features etc. Office 2007 also is real cool but I was using it on XP, so I will not describe its greatness here. I suppose enough has been said about both pieces of code!! 

31 Oct

Monitor control through

While just taking part in the routine online discussions, I came across this nice article which gave a complete explaination on how to control the monitor through code. Although the article was not meant for first timers, I took some time out to reformat and present the same content here so that anyone could read and understand.

The Monitor can be controlled by the SendMessage API. This is not a .NET API, hence we must delve into P/Invoke and COM Interop.. but dont worry, I wil keep it simple.

To use the interop functionality, you must first include the reference

using System.Runtime.InteropServices;

Then comes the DllImport using which we import the library that contains the SendMessage API – user32.dll


Then declare the SendMessage function

static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);

The parameters represent the following data:

  • hWnd – Handle to the window whose window procedure will receive the message. Should be a valid Windows handler
  • Msg – specifies the message to be sent
  • wParam – specifies additional message-specific information
  • lParam – specifies monitor state

hWnd can be set to the current window handle if it is a Windos Forms application using


But if it is a Console app of a class lib, then you would be better off setting it to -1. (Which sets the handle to the top level window in the system.)

Msg will be set to a predefined value of 0x0112. Even wParam will be set to a predefined value of 0xF170. I shall name the constants so as to avoid confusion.

const int WM_SYSCOMMAND = 0x0112;
const int SC_MONITORPOWER = 0xF170;

lParam specifies the monitor state. It has 3 states – ON, OFF and STANDBY with corresponding values -1, 2 and 1.

Hence a call to turn the monitor off would read something like this in a console application:

SendMessage((IntPtr) (-1), WM_SYSCOMMAND, (IntPtr)SC_MONITORPOWER, (IntPtr) 2);

Download the sample source code here.

31 Oct

Virtual Earth

Virtual Earth

Guys, Virtual Earth is here!!

Dont know what that is ???

Then i suggest you first check out this link: Local Live

Its the next generation to Google Earth! Why ??

Here are some tips to Why I recommend Local Live:-

Search What and Where

Unlike traditional online search engines, with Windows Live Local you can find information based on a specific location. You can search for both What (such as a specific business, a point-of-interest category like museums, or a type of store) and Where (such as a place name or an address), just What, or just Where. If you don’t specify a location, Windows Live Local filters your search results based on the current map view.

Use the Search Results Panels

Search results are displayed in search results panels on the left side of your screen and as pushpins on the map. The title bar for each search results panel is the same color as the pushpins for those search results, so you can quickly see which pushpins belong to which search results list. By default, you’ll see up to 10 listings at a time in the search results panel. To see no more than five results at a time, change the setting in the Options panel.

Get Details About a Listing

Search results show up as pushpins on the map and in a search results panel on the left side of your screen. The color of the pushpins matches the color of the title bar of the corresponding Search Results Panel. The number of each pushpin matches the corresponding listing. For each listing, you can view a pop-up that contains abbreviated information and a printable details page that contains more in-depth information.

Get Directions

You can get driving directions from any point on the map to any other point on the map. The Start and End points can be street addresses or specific points. The route and directions are displayed in Windows Live Local, and you can e-mail them or print them out for offline use.

Using Bird’s Eye Images

Bird’s Eye images provide a high-resolution, low-angle aerial view of a small area. Each image covers a specific area and has two zoom levels. Unlike the Aerial and Road map styles, Bird’s Eye images do not provide continuous coverage.

Change the Map Style

With Windows Live Local, you’re not limited to a basic road map. You can see the world from a variety of viewpoints. You can choose from the following map styles:

  • Road map—A typical street map style that shows streets, highways, landmarks, and so on.

  • Aerial photo (labels)—An aerial photo map that shows buildings and other geographic features as they are seen from space, but also includes labels for streets, highways, and landmarks. The default Aerial photo style includes labels.

  • Aerial photo (no labels)—A standard aerial photo map without any of the labels—just as you would see the world from space.

  • Bird’s Eye—A brand-new, low-angle, very high resolution view of locations all across the United States. Now you are no longer limited to seeing the tops of buildings—you can see the sides of buildings from up to four different directions!

  • Creating a Custom Pushpin

    You can create custom pushpins in Windows Live Local to show specific locations. These pushpins are added to your Scratch Pad and you can share them with other people.

    Use the Scratch Pad

    You can use the Scratch Pad to save and share your search results, addresses, and custom pushpins that are most interesting to you.

    Printing Routes and Directions

    You can print your route and driving directions from within Windows Live Local by using the Print Options page. This page allows you to customize the amount of information to print. To open the Print Options page, first create a route. From the Directions pane, click print.

    Create a Permalink

    A permalink is a permanent URL that encapsulates the current state of your Virtual Earth browser window, including your map view, the map style, zoom level, open searches, and Scratch Pad contents. Creating a permalink is a great way to save and share your Windows Live Local experience.

    You want an example:

    Here is a birds eye view of the Statue of Liberty

    Now isnt all that just too COOL!!

    Then why are you still reading this post. GO ahead and explore the world, from your desktop!

    PS.: Virtual Earth is presently limited to only US and Canada maps only. More areas are being added constantly and you can be seeing Asia and INDIA by 2007!

31 Oct


The MapPath method maps the specified relative or virtual path to the corresponding physical directory on the server




      Specifies the relative or virtual path to map to a physical directory.
      If Path starts with either a forward (/) or backward slash (\), the MapPath method returns a path as if Path were a full, virtual path.
      If Path doesn’t start with a slash, the MapPath method returns a path relative to the directory of the .asp file being processed.         

      This method does not check whether the path it returns is valid or exists on the server.
      MapPath is not available to the Session_OnEnd and the Application_OnEnd events.
      Because the MapPath method maps a path regardless of whether the specified directories currently exist, you can use the MapPath method to map a path to a physical directory structure, and then pass that path to a component that creates the specified directory or file on the server.


<%= Server.MapPath("data.txt")%><BR>

<%= Server.MapPath("script/data.txt")%><BR>

Use this method to find the physical path to a file on the server, without which the file open event will generate an error that the specified path doesnt exist!

© Copyright Sreenath H B 2017 | All Rights Reserved. Disclaimer