AngularJs Resources

I am trying to list up good tutorials and resources available on AngularJs . If you are one of those who are looking for some of the best resources to quickly learn AngularJs, here is the list for you. Please note that this is a “working post”. I will keep it updating with new resources.

Why Angular (from creators)?

Kickstart Your AngularJS Development with Yeoman, Grunt and Bower

Ultimate guide to learning AngularJS in one day

PhoneCat Tutorial App

Step by Step AngularJs Tutorial

Understanding Scopes

3-way data binding using firebase and Angular

AngularJS for jQuery Developers



Don’t get Scroogled

Microsoft gone after Google with its ad Campaign: and this is not first time. 🙂

Wondering if is any better option. Not sure how many of us would opt for Microsoft on the basis of claims made in their advertisement. I’ll figure this out for myself though.
First thought, why should I not use my own email services provided by Godaddy? They have decent up-time record and I don’t have a critical mission here. All I need to figure out what sort of privacy / security mechanism is in place.

2010 – Blogging off

Well, when I decided to land on my own blog today I never thought that I’d be surprised to see that there is not even a single post I made last year. It was a laziest year of my life I would like to add. However, it was not bad at all. I did what all I wanted to, be it personal or professional life. umm That’s fine.

Well, doing some lots of C# and SOA lately and my new love is Jquery. Its awesome by the way if you are new like me. fall back for more stuff.

Google Browser Size – A New Tool

Google has launched a new addition to its collection of Labs tools called Browser Size.

Google Browser Size is a visualization of browser window sizes for people who visit Google. For example, the “90%” contour means that 90% of people visiting Google have their browser window open to at least this size or larger.

 This seems much better service than Google Wave. 🙂

Google Wave Invitation Please

Google WaveGoogle have start sending the Google Wave Invitation to few (read it 1,00,000) early adopters. They have started sending them out yesterday and I wish I could get one. I see many peoples are trying hard to get one. I was not surprised to know that Invites are selling on ebay at $70.

With so much hype and buzz around it’s hard to wait for invitation. If anyone out there can send me an invitation at akajain [at] gmail [dot] com, that will be very appreciated.

How to Create IM BOT in Minutes

Recently I created an IM BOT that works with GTalk, Yahoo Messenger, Windows Live and other popular instant messaging clients.

To create your own IM Bot you need to have some very basic programming skills. You can use any programming language, I prefer PHP. You also need to have web space to host your bot.

For example, I have created a Twitter Bot that can be used to tweet in your twitter account using any IM client.

If you like to write a personal IM bot, just follow these simple steps:

Step 1: Register at Imified

Step 2: Create your Bot which is just a simple script which resides on your webserver. It can be in any programming language.

Step 3: Copy the path of your script in the clipboard shown below.


Your Bot is ready to serve now.

The script I wrote is self-explanatory.
Just Add in your IM client to try it.


	echo " start all over again now ";

else if($_REQUEST[('value'.($_REQUEST['step']-1))]=="?")
	echo " Hi, I am a Twitter Bot, you can tweet and see friend's timeline using me.
 type 'reset' to start again at any stage.";}


	switch ($_REQUEST['step'])
				case 1:
				echo "Enter Twitter UserName:";

				case 2:
				echo $_REQUEST['value1'];
				echo ",Enter Your Password, dont worry I dont store your password:";

				case 3:
				echo "Thankyou for submitting details
                                        Type 'tweet' to post a tweet and 'friend' to see friend's timeline";

				case 4:
				if (trim($_REQUEST['value3']," ")=="tweet")
					echo "Enter Message to tweet";

				else if($_REQUEST['value3']=="friend")
					echo "I am working on this function, will publish it soon";
					echo "enter correct choice ";

				case 5:
				$result=tweet($_REQUEST['value1'], $_REQUEST['value2'], $_REQUEST['value4']);
				echo $result;


No, This is not the only code you require. We need to use Twitter API as well, I have put that code in a seprate file.
You can make a number of Applications using different Open APIs

function tweet($username,$password,$message)

// The twitter API address
$url = ''; 

// Set up and execute the curl process
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$message");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password"); 

$resultArray = curl_getinfo($curl_handle);


    if($resultArray['http_code'] == "200")
    $result="Yipee, Check your profile ";
		 $result="Error , Username or Password is not correct ";
	return $result;

Learn How To Use Imified API
Happy Coding!

A Simple Silverlight Application

This post is about a simple application that I’ve created to get my hands on Silverlight 2. It is simple Digital Clock which shows local time using custom fonts and updates itself every second. My few observations that I would like to share with you:

Demo Application

  1. Custom Font Embedding in Silverlight
  2. Data Binding Modes and using INotifyPropertyChanged
  3. Using Dispatcher.BeginInvoke()

Before we start digging each of above topics lets first have a look at the application in running condition. I have named it SilverTimer.

Download: SilverTimer Source (C#/VS 2008)

Custom Font Embedding in Silverlight

I have used custom fonts (courtesy: DS-DIGI.TTF) in my SilverTimer application. These fonts are first downloaded automatically by the Silverlight Runtime. Here is excerpt showing how to embedd custom fonts –

FontFamily is comprise of this format – FONT_FILE#FONT_NAME. Having said that font file is “DS-DIGI.TTF” and the font named “DS-Digital” and are separated by‘#’. The real beauty is that we need not write any single line of code for downloading the font-file. Just keep DS-DIGI.TTF file “ClientBin” folder where the XAP file is located. One thing to note here is that before you use custom font you need to change the Build Action for your Font file to ‘Resource’ as shown below. This will make it as an assembly resource.


This is all you have to do to use the custom fonts. If you wish to know more about custom font embedding, you can watch this great video tutorial by Tim Heuer

Data Binding Modes and using INotifyPropertyChanged

I’d like to discuss it in three basic Steps

  1. Specifying DataBinding Mode
  2. Set the DataContext
  3. Implement INotifyPropertyChanged interface to the business object

Silverlight supports binding of Business Object properties with the UI Controls. The data flow between these can be controlled by specify the Data Binding Mode between source and target. Here source is the Business Object and target is the UI control. Modes supported are –

OneWay” – Binds source and target and update target subsequently as the source gets updated. (source -> target)
TwoWay” – It keeps source and target in sync. Source is updated when a target changed and vice versa. (source <-> target)
OneTime” – As the name suggest, it updates target with the data and never updates when a source get updated.

In application, I’ve used ‘OneWay’ Binding Mode to update the Time in application. Below is the excerpt from Page.xaml –

Here we are talking about this bit  “Text=”{Binding CurrentTime, Mode=OneWay}”, You can see the Text property is bind to the CurrentTime property and the mode is defined as ‘OneWay’.

Now, we need to specify which Object this property is associated with. We have to set the DataContext of target control to the Business Object. It goes like this –

txtTimer.DataContext = objTimer;

Specifying the Mode doesn’t do the job we need some mechanism/event which tells the UI controls (TextBlock) to update itself when a property of business object changed. This can be achieved by implementing the INotifyPropertyChanged interface to the business object. The INotifyPropertyChanged interface is used to notify clients, typically binding clients, that a property value has changed. In this case Timer.cs is the business object that implemented this interface and should raise a PropertyChanged event when “CrrentTime” is changed. –

        public string CurrentTime
                return currentTime;
                currentTime = value;
                if (PropertyChanged != null)
                    PropertyChanged(this,new PropertyChangedEventArgs("CurrentTime"));
  .. .. ..

Whenever the CurrentTime property changed it notify the clients and they will be updated accordingly. You can go through this excellent video tutorial by Jesse Liberty

Using Dispatcher.BeginInvoke()

Dispatcher.BeginInvoke is used to execute the delegate asynchronously. Dispatcher is associated with the thread which is UI thread in this case. Why we need to use this? Form controls should be accessed in a thread which they have been created. Doing otherwise may throw “Invalid Cross-thread access” exception.

So, as soon as “CurrentTime” property is changed, the binding controls will be notified which is trigger by the “PropertyChanged Event” of “INotifyPropertyChanged” interface. But as this happen in a new thread this cause “Invalid Cross-thread access” exception.

The key to resolve this error is to update the “CurrentTime” property using dispatcher which guarantees the code to be executed on UI thread.

         public void RunTimer(object oDispatch)
            while (true)
                // Making asynchronous call to update the Texblock using the UI Thread.
                ((Dispatcher)oDispatch).BeginInvoke(() =>
                       //Updating the property which inturn notify the clients to udpate.
                       this.CurrentTime = System.DateTime.Now.ToLongTimeString();

                // New thread sleeps for one second.

I hope you may have find this information useful. I would like to hear your comments and queries on this.

IBM Rational User Group Launch

IBM Rational User Group

IBM is presenting Rational User Group Launh on 21st April, 2009 at Hotel Taj Mahal, Delhi. Here is the excerpt of the mail I received…

It is our pleasure to invite you to Rational User Group meeting in Delhi on 21st April, 2009.

You are cordially invited to attend the launch and join the community of Rational users in Delhi.

The Rational User group will provide a platform for discussions with like minded people, share best practices and have some fun while we are at it.

The agenda will cover latest topics from Rational Software.

Please mark your calendars for the 21st April, 2009 from 5.00p.m onwards at Taj Mahal.
Do join us for dinner thereafter.

Thank you and look forward to meeting with you.

Agenda Topics:

* What is Jazz and Change Management using Rational Team Concert
* Quality Driven Software Delivery through Rational Quality Manager
* Secure Web Applications using Rational AppScan

Date: 21st April, 2009

Venue: Taj Mahal, Delhi

Click here to register