Tuesday, 29 December 2015


  1. Hot water will turn into ice faster than cold water
  2. The Mona Lisa has no eyebrows
  3. The sentence, “The quick brown fox jumps over the lazy dog” uses every letter in the English language
  4. The strongest muscle in the body is the tongue
  5. Ants never sleep!
  6. "I Am” is the shortest complete sentence in the English language
  7. Coca-Cola was originally green
  8. The most common name in the world is Mohammed
  9. When the moon is directly overhead, you will weigh slightly less
  10. Camels have three eyelids to protect themselves from the blowing desert sand
  11. My Inversion is unknown to this world let me disclose it in 2016
  12. :)
  13. The name of all the continents end with the same letter that they start with
  14. There are two credit cards for every person in the United States
  15. TYPEWRITER is the longest word that can be made using the letters only on one row of the keyboard
  16. Minus 40 degrees Celsius is exactly the same as minus 40 degrees Fahrenheit
  17. Chocolate can kill dogs, as it contains theobromine, which affects their heart and nervous system
  18. Women blink nearly twice as much as men!
  19. You can't kill yourself by holding your breath
  20. It is impossible to lick your elbow
  21. The Guinness Book of Records holds the record for being the book most often stolen from Public Libraries
  22. People say "Bless you" when you sneeze because when you sneeze, your heart stops for a millisecond
  23. It is physically impossible for pigs to look up into the sky
  24. The "sixth sick sheik's sixth sheep's sick" is said to be the toughest tongue twister in the English language
  25. “Rhythm” is the longest English word without a vowel
  26. If you sneeze too hard, you can fracture a rib If you try to suppress a sneeze, you can rupture a blood vessel in your head or neck and die
  27. Each king in a deck of playing cards represents great king from history
  28. Spades - King David Clubs - Alexander the Great, Hearts - Charlemagne Diamonds - Julius Caesar
  29. It is impossible to lick your elbow
  30. 111,111,111 x 111,111,111 = 12,345,678,987, 654,321
  31. If a statue of a person in the park on a horse has both front legs in the air, the person died in battle.If the horse has one front leg in the air, the person died as a result of wounds received in battle.If the horse has a all four legs on the ground, the person died of natural causes
  32. Question -What do bullet proof vests, fire escapes, windshield wipers and laser printers all have in common? Ans - All invented by women
  33. Question - This is the only food that doesn't spoil .What is this? Ans - Honey
  34. A crocodile cannot stick its tongue out
  35. A snail can sleep for three years
  36. All polar bears are left handed
  37. American Airlines saved $40,000 in 1987 by eliminating one olive from each salad served in first-class
  38. Butterflies taste with their feet
  39. Elephants are the only animals that can't jump
  40. In the last 4000 years, no new animals have been domesticated
  41. On average, people fear spiders more than they do death
  42. Stewardesses is the longest word typed with only the left hand
  43. The ant always falls over on its right side when intoxicated
  44. The electric chair was invented by a dentist
  45. The human heart creates enough pressure when it pumps out to the body to squirt blood 30 feet
  46. Rats multiply so quickly that in 18 months,two rats could have over million descendants
  47. Wearing headphones for just an hour will increase the bacteria in your ear by 700 times
  48. The cigarette lighter was invented before th match
  49. Most lipstick contains fish scales
  50. Like fingerprints, everyone's tongue print is different
Thanks Ather Sopori for sharing this

Some Amazing facts about India

  1. More than a million Indians are millionaires, yet most Indians live on less than two dollars a day. An estimated 35% of India’s population lives below the poverty line.
  2.  Every major world religion is represented in India. Additionally, Hinduism, Buddhism, Jainism, and Sikhism all originated in India
  3.  About 75% of Indians are Hindu. Muslims are the largest minority in India and form approximately 20% of the country’s population. In fact, India has the third largest population of Muslims in the world, after Indonesia and Pakistan
  4. Raziya Sultana (1205-1240) was the first woman leader of India. She was considered a great leader, though she ruled for only three years before being murdered.
  5. Alexander the Great invaded India partly because he wanted to solve the mystery of the “ocean,” which he had been told was a huge, continuous sea that flowed in a circle around the land. When he reached the Indian Ocean, he sacrificed some bulls to Poseidon for leading him to his goal
  6.  India experiences six seasons: summer, autumn, winter, spring, summer monsoon, and winter monsoon
  7. India has, arguably, greater linguistic diversity than any other large country.The precise number of languages spoken in India is probably over 1,000, but it is often hard to define when one language begins and another ends.   
  8. Indian Railways have maximum no. of employees in the world that is about 1.6 million also about 5 Billion people travel by Indian railways in a year
  9. The number of births that occur in India each year is more than the whole population of Australia
  10. Half the world’s outsourced IT services come from India, amounting to a $47 billion dollar industry
  11. Home to more mosques than any other country in the world; India has a large Islamic population, the second largest in the country.

Tuesday, 22 December 2015




A web API is just an application programming interface (API) over the web (that is, HTTP). When the resources of an application can be manipulated over HTTP using the standard HTTP methods of GET, POST, PUT, and DELETE, you can say that the application supports a web API for other applications to use. Because HTTP is platform-agnostic, HTTP services can be consumed by disparate devices across different platforms.
 A central concept of HTTP services is the existence of resources that can be identified through a uniform resource identifier (URI). If you equate resources to nouns, then actions on a resource can be equated to verbs and are represented by the HTTP methods such as GET, POST, PUT, and DELETE. For an application that deals with the Users of an organization, each User is a resource the application deals with.
 Let us see how an User’s details can be retrieved with an HTTP service. The URI is http://server<port>/API/Users/1000. It includes the User ID and serves as an identifier to the resource, which is an User in this case. Actions on this resource are accomplished through the HTTP verbs. To get the details of an User, you will perform an HTTP GET on the URIhttp://server<port>/API/Users/1000. To update this User, the request will be an HTTP PUT on the same URI. Similarly, to delete this User, the request will be an HTTP DELETE request, again on the same URI. To create a new User, the request will be an HTTP POST to the URI without any identifier (http://server<port>/API/Users).


Let us do something practical here. you will create a simple web API that basically exposes an in-memory List<User> over HTTP, for a client application to manipulate the list members. I know this is just limited or small concept but i am sure this will give you clear concept about what webAPI is and how to use it or will give you  understanding how to use the ASP.NET Web API framework to build your web API.

  1. Run Visual Studio and create a new project like shown below Give the project a name of Users and click OK, as shown in Figure 1-1.
  2. Select the ASP.NET Web template and click OK. You will see lots of option, as shown in Figure 1-2.

  3. Choose the Controllers folder in the Solution Explorer of Visual Studio. Select Add ➤ Controller and give a name of UsersController for the controller. Leave the option Empty API Controller selected in the Template dropdown and click Add, as shown in Figure 1-3. Notice that the generated controller class inherits from ApiController, a class that is part of the ASP.NET Web API framework.
  4. Right-click the Models folder in the Solution Explorer of Visual Studio. Select Add ➤ Class to add a new class with a name of User
  5. Add the code shown in Listing 1-3 to the User class. Listing 1-3. The User Class
    public class User
    public int Id { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
  6. Create a new static field at the controller level, as shown in Listing 1-4. This will be the list that our web API exposes over HTTP. Figure 1-3. Adding a controller
    Listing 1-4. The List of Users
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Net.Http;
    using System.Web.Http;
    using Users.Models;
    namespace Users.Controllers
    public class UsersController : ApiController
    private static IList<User> list = new List<User>()
    new User()
    {Id = 1000, FirstName = "Shabir", LastName = "Hakim" },
    new User()
    {Id = 1001, FirstName = "Raja", LastName = "Public"},
    new User()
    {Id = 1002, FirstName = "Rani", LastName = "Private"},
    new User()
    {Id = 1003, FirstName = "Shabir", LastName = "Robert" }
    // Action Get methods go here
    // GET api/Users
    public IEnumerable<User> Get()
    {return list;}
    // GET api/Users/1000
    public User Get(int id)
    {return list.First(e => e.Id == id);}
    Note Note: Since you used the User class, which is in a different namespace than HelloWebApi.Models in the controller class, you will need to add a using directive. In Visual Studio, the User references in the preceding code will have a wavy underline in red; right-click any of them and select Resolve ➤ using HelloWebApi.Models. This will add the necessary directive. This is a standard procedure and I will not repeat this step in later exercises, for the sake of brevity.
  7. Add five action methods, as shown in Listing 1-5. It is important to use the name as shown in the listing. You will learn more about why you must follow this naming convention in the next exercise. Listing 1-5. The Action Methods to Get, Post, Put, and Delete Users
    // GET api/Users
    public IEnumerable&ltUser> Get()
    return list;
    // GET api/Users/1000
    public User Get(int id)
    return list.First(e => e.Id == id);
    // POST api/Users
    public void Post(User User)
    int maxId = list.Max(e => e.Id);
    User.Id = maxId + 1;
    // PUT api/Users/1000
    public void Put(int id, User User)
    int index = list.ToList().FindIndex(e => e.Id == id);
    list[index] = User;
    // DELETE api/Users/1000
    public void Delete(int id)
    User User = Get(id);
  8. Build the Visual Studio solution and run it by pressing F5. Internet Explorer, which is the default browser associated with Visual Studio, shows the home page with a URL of http://localhost:55778/. (My ASP.NET Web API project uses port 55778. Your project will use a different one and based on that, Internet Explorer will display a different port in the URL.)
  9. In the address bar type http://localhost:<port>/api/Users Replace <port> with the actual port your application runs on.
    NoteNote:As you work through the exercises in this book, you will create several new projects, and the port will change every time you create a new ASP.NET MVC project. Remember to replace the port specified in the example code with your application’s actual port.
  10. When Internet Explorer asks if you want to open or save, click Open and choose Notepad as the program to open the file. Notepad will display JSON as shown in Listing 1-6. I have formatted the output for your reading pleasure.

  11. You can also get the details of a specific User by performing an HTTP GET on http://localhost:63482/Api/Users/1000. In this case, you get the JSON output shown in Listing 1-7.

  12. If you see the preceding two JSON outputs, you have just created your first web API and exposed the in-memory list of Users to the outside world over HTTP! Currently, we have tested only the HTTP GET but we will test the other methods in the upcoming exercises.