Archive | March, 2012

Lottery Fever – America’s Million Dollar Madness

30 Mar

The Jackpot rose to a Whopping $ 640 000 000: FAT cash but Chances of winning are very, very SLIM! People across US lined up to buy their Lottery tickets with great hopes of pulling it off and getting America’s Winning Ticket – The biggest in world’s history. Richard Lustig, seven-time lotto winner says “You can actually game it, it is not a Scam.” “There is a method.” Well… I haven’t figured what that method is and neither bought Richard’s book! But here are some Quick Facts 🙂

  • Jackpot – $ 640 000 000 
  • Take Home – $ 462 000 000 
  • Odds of winning – 1 in $ 176 000 000
  • Uncle Sam’s Share – $ 161.7 000 000
  • State Share – ZERO for New Hampshire, Tennessee, Texas, South Dakota and Washington (don’t have a state income tax). Also Exempt – California, Pennsylvania and Delaware
  • For remaining States, The State tax varies between 3% – 12.69%
  • If you are a New York resident, you will have to pay another 3.87% to City Tax! That’s a whopping Tax of 12.69! Sweet, NOT! 
  • 42 States are in it to win it *AlabamaAlaskaHawaiiMississippiNevadaUtah, and Wyoming do not sell government-run lottery tickets. Although Puerto Rico has a lottery, it does not participate in either Mega Millions or Powerball; it does not plan to join either game*
  • A cafe worker in Arizona reported selling $2,600 worth of tickets to one buyer. Whoa!
  • $ 640 000 000 MEGA MILLION, RIGHT!? But… DID YOU KNOW that $640 Million is 11 hours of Foreign Imports in America! HA! 

Special Friday Indeed! The drawing takes place at 11:00 PM EST (8:00 PM PST). In the meantime, Let’s have some fun. It is Friday!! 🙂

#IFIHITTHEMEGAMILLION Wicked Twitter posts that cracked me up earlier today:

#IfIHitTheMegaMillion I would all of a sudden have a lot of “Friends” & “Family” That I never knew of.

#IfIHitTheMegaMillion the MegaMillion’s gonna have a broken jaw.

#IfIHitTheMegaMillion I’m changing my phone number

#IfIHitTheMegaMillion We’re all getting very, very high

#IfIHitTheMegaMillion………>Its funny how money deters peoples minds from the current issues. #justice4TrayvonMartin? Huh?

#IfIHitTheMegaMillion my record label LottoRecords gone take off! lol

#IfIHitTheMegaMillion This is an “idiot” tax and today, I am going to be an idiot!

#IfIHitTheMegaMillion i would hire 2 private investigators and get them to follow each other

Advertisements

Commonly asked .NET Technical Interview Questions and ANSWERS!

20 Mar

Here are some commonly asked .NET Interview Questions which you can expect in a Technical .NET Interview.

What is CLR?
Common Language Runtime.

  • CLR is responsible for managing the execution of .NET programs.
  • It invokes just-in-time (JIT) compiler which is responsible for converting IL code to machine code.
  • The CLR provides additional services including memory management, type safety and exception handling. Memory management is provided using Garbage collector.

What is CLS?
Common Language Specification.

  • Set of basic language features needed by many applications.
  • Helps enhance and ensure language interoperability by defining a set of features that developers can rely on to be available in a wide variety of languages

What is Inheritance?
It is one of the most important features of Object Oriented programming that helps in using existing functionality and we do not have to write same code again and again in all classes. (Please refer to my blog post on inheritance for further explanation)

What are Interfaces?
Interfaces define members without implementations. A class can only inherit from only one class but can implement more than one interface. See more information on inheritance below.

What is Polymorphism?
Through inheritance, a class can be used as more than one type; it can be used as its own type, any base types, or any interface type if it implements interfaces. This is called polymorphism.

What is Reflection?
All .NET compilers produce metadata about the types defined in the modules
they produce. This metadata is packaged along with the module (modules in
turn are packaged together in assemblies), and can be accessed by a
mechanism called reflection. The System.Reflection namespace contains
classes that can be used to interrogate the types for a module/assembly.

Does C# support multiple-inheritance?
No.

C# Tutorials: Inheritance

When you derive a class from a base class, the derived class will inherit all members of the base class except constructors.
Example: Let us define a base class “Location”. This class will have two Properties City and State. We will define two methods in this class, one is Get City which will be a virtual method (Derive class can override it) and other will be abstract method getState (Which must be overridden). Here is the code:

Code for Base Class:
using System;
namespace MyCode
{
public abstract class Location
{
/// <summary>
/// This is constructor
/// </summary>
public Location()
{
}
/// <summary>
/// this is Property
/// </summary>
public string City { get; set; }

/// <summary>
/// this is Property
/// </summary>
public string State { get; set; }

/// <summary>
/// getCity
/// </summary>
/// <returns></returns>
/// Virtual means derived class can override it
public virtual string getCity()
{
return City;
}

/// <summary>
/// getState
/// </summary>
/// <returns></returns>
/// abstract means derived class must overide it
public abstract string getState();

}
}
Now we will write two classes that will derive from the base class (Location). One class will override getCity Method and other will not.
Code for Derived Classes:
using System;
namespace MyCode
{
public class IBMCompanyLocation : Location
{
public IBMCompanyLocation()
{
State = “Texas”;
}
/// <summary>
/// getCity
/// </summary>
/// <returns></returns>
public override string getCity()
{
return “Austin”;
}
/// <summary>
/// getState
/// </summary>
/// <returns></returns>
public override string getState()
{
return State;
}
}
}
using System;
namespace MyCode
{
public class MicrosoftCompanyLocation : Location
{
public MicrosoftCompanyLocation()

{
State = “Washington”;
City = “Seattle”;
}
/// <summary>
/// getState
/// </summary>
/// <returns></returns>
public override string getState()
{
return State;
}
}
}

Twitter Basics

1 Mar

Twitter is the best way to share information – both personal and professional and discover what’s trending in the world right now!

  •  Signing up will quickly send a confirmation email to your email id and once you confirm that you will be taken to a welcome “Follow Freely” where you will be asked to follow 5 people for getting started. Just press follow button against people you would like to follow
  • Once you start following people – you will start getting their Tweets in your twitter feed (notice arrow pointer)
  • Start interacting with your followers by posting tweets
  • Click the Retweet (RT) button – to give someone a shout out in the public should you like their share/post/idea! Everyone loves a RT!
  • @UserName in the beginning of a tweet is used for Replies e.g. @consultpri thank you for explaining twitter basics 

  • @UserName in the middle of a sentence denotes a Mention e.g. so glad to have landed on @consultpri’s blog 

  • The # symbol (Hashtag) – a super sweet little goodie that makes your tweet publicly searchable. It is used to mark keywords or topics in a Tweet. Example – Thank You @consultpri for explaining Twitter  #twitterbasics
  • #FF – instant magic tablet that will increase your Twitter metabolism! e.g. posting a tweet: #FF @consultpri @Twitter @LinkedIn @Facebook would mean these people are an interesting bunch  and you should follow them. #FF literally means followfriday
  • If you want to say the above social media folks are worth following – you can simply say #FF @consultpri @Twitter @LinkedIn @Facebook #socialmedia

  • DM or Direct Message – should you want to engage with someone and keep it private e.g business ideas, job inquiries etc. P.S. you can only DM people once they follow you back 
  • Like what you are reading now – click the tweet button below
%d bloggers like this: