Friday 30 August 2013

HTML5 database creation

HTML5 has some exciting features & one of them is database storage on your browser itself. In this tutorial i will guide you brief about creation of HTML5 database & start working with it. HTML5 database is created on SQLLite(open source db software) of browser .We have 3 types of ways to store data on browser :
  • localStorage , sessionStorage
  • Web SQL
  • IndexDB

Understanding Polymorphism

My first post on MB Coding starts with this small piece of code which tries to explain polymorphism concept.






























As you can see display function is in both classes , so when we call it from object of type father()
it invokes display function of father() & when that object tries to get assigned to children() , it
still invoke display function from father() . Why ? because father is father & children is children.

Children is a derived class hence when display function is called it calls display function of father only.
So if you want to call display function check this code below :

class father
{
   public father()
   {
      Console.WriteLine("In Father Constructor");
   }

   public virtual void display()
   {
      Console.WriteLine("In Father Class");
   }
}


class children : father
{
   public children()
   {
      Console.WriteLine("In Children Constructor");
   }

   public override void display()
   {
      Console.WriteLine("In Children Class");
   }

}

Polymorphism is just like eye , it observe or sees what is shown to it...or say it can understand
or interpret different objects.



Basics of Tree data structure

Tree data structure simulates a  hierarchical tree structure, with root and subtrees represented by linked nodes. Some Terminology Root...