September 16, 2014

Story about Imran Khan

ﺑﺎﮐﺴﺘﺎﻧﯿﻮ ﻭﮦ 103 ﺑﺨﺎﺭ ﻣﯿﮟ ﺗﭗ ﺭﮨﺎ ﺗﮭﺎ ، ﻭﮦ ﮔﺰﺷﺘﮧ ﭼﺎﻟﯿﺲ ﮔﮭﻨﭩﻮﮞ ﺳﮯ ﺳﻔﺮ ﻣﯿﮟ ﺗﮭﺎ ﺍﯾﮏ ﺁﻧﮑﮫ ﻧﮩﯿﮟ ﺳﻮﯾﺎ ﻭﮦ ﺑﺎﺭﺵ ﻣﯿﮟ ﺑﮭﯿﮓ ﮐﺮ ﻣﺰﯾﺪ ﺑﯿﻤﺎﺭ ﮨﻮ ﮔﯿﺎ ﺗﮭﺎ. ﻟﯿﮑﻦ ﺳﻮﭼﻨﮯ ﮐﯽ ﺑﺎﺕ ﯾﮧ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﺲ ﮐﮯ ﻟﯿﺌﮯ ﻭﮨﺎﮞ ﮐﮭﮍﺍ ﺗﮭﺎ ؟ ﺍﭘﻨﮯ ﻟﯿﺌﮯ ؟ ﺍﺱ ﮐﮯ ﭘﺎﺱ ﮐﺲ ﭼﯿﺰ ﮐﯽ ﮐﻤﯽ ﮨﮯ ؟

 ﺁﺝ ﺍﮔﺮ ﻭﮦ ﮐﺴﯽ ﺳﭙﻮﺭﭨﺲ ﭼﯿﻨﻞ ﮐﮯ ﻟﯿﺌﮯ ﺁﺭﭨﯿﮑﻞ ﻟﮑﮭﮯ ﯾﺎ ﭼﻨﺪ ﻣﯿﭽﺰ ﻣﯿﮟ ﮐﻤﻨﭩﺮﯼ ﮐﺮ ﺩﮮ ﺗﻮ ﻻﮐﮭﻮ ﮈﺍﻟﺮ ﺍﻭﺭ ﭘﻮﻧﮉ ﮐﻤﺎ ﺳﮑﺘﺎ ﮨﮯ ﮔﮭﺮ ﺑﯿﭩﮭﮯ ﮨﻮﺋﮯ , ﻭﮦ ﮔﮭﺮ ﺑﯿﭩﮫ ﮐﺮ ﭘﯿﺴﮯ ﮐﻤﺎ ﺳﮑﺘﺎ ﮨﮯ ﺍﺱ ﺳﮯ ﻧﮧ ﺗﻮ ﮐﻮﺋﯽ ﺍﺳﮑﯽ ﮐﺮﺩﺍﺭ ﮐﺸﯽ ﮐﺮﮮ ﮔﺎ ﻧﮧ ﮐﻮﺋﯽ ﭘﭩﻮﺍﺭﯼ ﺍﺳﮯ ﮔﺎﻟﯿﺎﮞ ﺩﮮ ﮔﺎ , ﻧﮧ ﮐﻮﺋﯽ ﺍﺱ ﭘﺮ ﺟﮭﻮﭨﮯ ﺍﻭﺭ ﻣﻦ ﮔﮭﮍﺕ ﺍﻟﺰﺍﻡ ﻟﮕﺎﺋﮯ ﮔﺎ .ﻭﮦ ﺁﺭﺍﻡ ﺳﮯ ﺑﯿﭩﮫ ﮐﺮ ﻋﯿﺎﺷﯽ ﺳﮯ ﺁﺳﻮﺩﮦ ﺯﻧﺪﮔﯽ ﮔﺰﺍﺭ ﺳﮑﺘﺎ ﮨﮯ 

 ﻣﮕﺮ ﻭﮦ ﺩﻥ ﺭﺍﺕ ﺧﻮﺍﺭ ﮨﻮ ﺭﮨﺎ ﮨﮯ ﭨﮑﮯ ﭨﮑﮯ ﮐﻮ ﻟﻮﮔﻮﮞ ﮐﯽ ﮔﺎﻟﯿﺎﮞ ﺳﻦ ﺭﮨﺎ ﮨﮯ ﺍﺳﮑﯽ ﮐﺮﺩﺍﺭ ﮐﺸﯽ ﮐﯽ ﺟﺎ ﺭﮨﯽ ﮨﮯ ﺩﻥ ﺭﺍﺕ ﺍﺱ ﭘﺮ ﮨﺎﺗﮫ ﺑﮭﺮ ﺑﮭﺮ ﮐﮯ ﮐﯿﭽﮍ ﺍﭼﮭﺎﻻ ﺟﺎ ﺭﮨﺎ ﮨﮯ  ، ﻃﺮﺡ ﻃﺮﺡ ﮐﮯ ﮔﮭﭩﯿﺎ ﺍﻟﺰﻣﺎﺕ ﻟﮕﺎﺋﮯ ﺟﺎ ﺭﮨﮯ ﮨﯿﮟ ﺟﻦ ﮐﻮ ﮔﻠﯽ ﮐﺎ ﮐﺘﺎ ﻧﮩﯿﮟ ﺟﺎﻧﺘﺎ ﺁﺝ ﻭﮦ ﺍﺱ ﺍﻧﺴﺎﻥ ﮐﻮ ﮔﺎﻟﯿﺎﮞ ﺩﮮ ﺭﮨﮯ ﮨﯿﮟ ﺍﺱ ﺍﻧﺴﺎﻥ ﮐﻮ ﺟﺲ ﻧﮯ ﺍﺱ ﻣﻠﮏ ﮐﮯ ﻟﯿﮯ ﺍﭘﻨﯽ ﺯﻧﺪﮔﯽ ﺩﺍﺅ ﭘﺮ ﻟﮕﺎ ﺩﯼ ﺍﺱ ﺍﻧﺴﺎﻥ ﮐﻮ ﮔﺎﻟﯿﺎﮞ ﺩﮮ ﺭﮨﮯ ﮨﯿﮟ ﺟﺲ ﻧﮯ ﺍﺱ ﻣﻠﮏ ﮐﻮ ﮐﯿﻨﺴﺮ ﺍﺳﭙﺘﺎﻝ ﺟﯿﺴﺎ ﺍﺩﺍﺭﮦ ﺑﻨﺎ ﮐﺮ ﺩﯼ ﺍﺱ ﮐﺎ ﺟﺮﻡ ﯾﮩﯽ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﺮﭘﺸﻦ ﮐﮯ ﺧﻼﻑ ﺑﺎﺕ ﮐﺮﺗﺎ ﮨﮯ

 ﺍﺳﮑﺎ ﺟﺮﻡ ﯾﮩﯽ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﮩﺘﺎ ﮨﮯ ﮐﮧ ﻟﻮﭨﯽ ﮨﻮﺋﯽ ﺩﻭﻟﺖ ﻭﺍﭘﺲ ﻣﻠﮏ ﻣﯿﮟ ﻻﺋﯽ ﺟﺎﮰ ﺍﻭﺭ ﻋﻮﺍﻡ ﭘﺮ ﺧﺮﭺ ﮐﯽ ﺟﺎﮰ ﺍﺳﮑﺎ ﺟﺮﻡ ﯾﮧ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﮩﺘﺎ ﮨﮯ ﮐﮧ ﻋﻮﺍﻡ ﮐﮯ ﭨﯿﮑﺲ ﮐﺎ ﭘﯿﺴﮧ ﻭﺍﻡ ﭘﺮ ﺧﺮﭺ ﮐﯿﺎ ﺟﺎﮰ . ﺍﺳﮑﺎ ﺟﺮﻡ ﯾﮧ ﮨﮯ ﮐﮧ ﻭﮦ ﭼﺎﮨﺘﺎ ﮨﮯ ﮐﮧ ﺍﻣﺮﯾﮑﮧ ﺍﻭﺭ ﺩﻭﺳﺮﮮ ﻣﻤﺎﻟﮏ ﮐﯽ ﻏﻼﻣﯽ ﮐﺎ ﻃﻮﻕ ﮔﻠﮯ ﺳﮯ ﺍﺗﺎﺭﺍ ﺟﺎﮰ ﺍﺳﮑﺎ ﺟﺮﻡ ﯾﮩﯽ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﮩﺘﺎ ﮨﮯ ﮐﮧ ﺑﯿﺮﻭﻧﯽ ﻗﺮﺿﮯ ﺑﻨﺪ ﮐﺮ ﺍﯾﮏ ﻣﻠﮑﯽ ﻭﺳﺎﺋﻞ ﮐﻮ ﺑﺮﻭﺋﮯ ﮐﺎﺭ ﻟﯿﺎ ﺟﺎﮰ ﺍﺳﮑﮯ ﺟﺮﺍﺋﻢ ﮐﯽ ﻓﮩﺮﺳﺖ ﺑﮩﺖ ﻟﻤﺒﯽﮨﮯ ﺩﻭﺳﺘﻮ ﮐﺎﺵ ﮐﮧ ﯾﮧ ﺟﺮﺍﺋﻢ ﺍﺱ ﻣﻠﮏ ﮐﺎ ﮨﺮ ﻓﺮﺩ ﮐﺮﮮ ﺗﻮ ﯾﮧ ﻣﻠﮏ ﺟﻨﺖ ﺑﮯ ﻧﻈﯿﺮ ﺑﻦ ﺟﺎﮰ ﮐﺎﺵ ﮐﮧ ﺍﯾﺴﮯ ﻣﺠﺮﻡ ﭘﺎﮐﺴﺘﺎﻥ ﻣﯿﮟ ﺳﺒﮭﯽ ﮨﻮ ﺟﺎﺋﯿﮟ ﺗﻮ ﯾﮧ ﻣﻠﮏ ﺩﻧﯿﺎ ﭘﺮ ﺭﺍﺝ ﮐﺮﮮ  

September 15, 2014

C# 6 Language Enhancements

Here I'd like to discuss some new features in C# 6, the upcomming version of C# that will ship with next version of Visual studio. The initial buzz about the next version of C# is that C# compiler complete rewrite, written in C# from ground up. C# 6 gives you a lot of features that enhance your productivity both writing and reading C# code.

1. PRIMARY CONSTRUCTORS:


C# 6 introduces the "Primary Constructor" concept, a way to express an initializing constructor in more concise syntax. 

===========
NEW WAY:
===========

public class Person(string first, string last) 
{
     public string First { get; } = first;
     public string Last { get; } = last;
}

===============
CURRENT WAY:
===============

public class Person
{
     private string first;
     private string last;

     public Person(string first, string last)
     {
         this.first = first;
         this.last = last;
     }

     public string First { get { return first; } }
     public string Last { get { return last; } }
}

2. AUTO PROPERTY INITIALIZERS:


Another good feature C# 6 introduce is "Auto Property Initializer", syntax for initializing properties to set constant values on any property.

=========
NEW WAY:
=========

public class Person
{
     public string First { get; set; } = "Jane";
     public string Last { get; set;} = "Doe";

And, it works on read only properties:

public class Person
{
     public string First { get; } = "Jane";
     public string Last { get; } = "Doe";
}

3. MATH CLASS: 


C# 6 introduces the "MATH" class - a single class instead of entire namespace. It’s another small language change that removes some friction in writing and reading code.

using System.Math;

Once you add that, you can reference any members of the System.Math class without any namespace or class qualifer:

var x = Sqrt(3*3 + 4*4);

4. DICTIONARY INITIALIZERS: 


C# 6 introduced a feature called "Lightweight dynamic" the feature that has changed names as it was refined. The concept is grab from JavaScript and JSON language and this feature allow C# to create DTOs (data transfer objects) in much lighter way rather than going through the overhead of creating a strongly typed class that had no behavior.

5. EXCEPTION FILTERS: 


This feature brings C# up to parity with VB.NET. They work as follows:

try 
   // … 
} catch (MyException e) if (myfilter(e)) 
{
    // … 

The catch clause will only be executed if myfilter(e) returns true. Otherwise, any catch clauses that follow are evaluated, or the exception propagates up the call stack.

September 12, 2014

Difference Between A Resume, Bio-Data & CV

1. BIO DATA: 

One page consisting attributes, hobbies, interests and educational qualification of person.

2. RESUME  : 
One to two pages "summary" of skills, education qualification and experience of person.

3. CV      : 
A longer, more detailed synopsis, indicating professional experience of a person.

September 1, 2014

WCF and ASP.NET Web API

WCF


ASP.NET Web API

Enables building services that support multiple transport protocols (HTTP, TCP, UDP, and custom transports) and allows switching between them.
HTTP only. First-class programming model for HTTP. More suitable for access from various browsers, mobile devices etc enabling wide reach.
Enables building services that support multiple encodings (Text, MTOM, and Binary) of the same message type and allows switching between them.
Enables building Web APIs that support wide variety of media types including XML, JSON etc.
Supports building services with WS-* standards like Reliable Messaging, Transactions, Message Security.
Uses basic protocol and formats such as HTTP, WebSockets, SSL, JQuery, JSON, and XML. There is no support for higher level protocols such as Reliable Messaging or Transactions.
Supports Request-Reply, One Way, and Duplex message exchange patterns.
HTTP is request/response but additional patterns can be supported through SignalRand WebSockets integration.
WCF SOAP services can be described in WSDL allowing automated tools to generate client proxies even for services with complex schemas.
There is a variety of ways to describe a Web API ranging from auto-generated HTML help page describing snippets to structured metadata for OData integrated APIs.
Ships with the .NET framework.
Ships with .NET framework but is open-source and is also available out-of-band as independent download.