Saturday, May 03, 2014

Unending love

I seem to have loved you in numberless forms, numberless times…
In life after life, in age after age, forever.
My spellbound heart has made and remade the necklace of songs,
That you take as a gift, wear round your neck in your many forms,
In life after life, in age after age, forever.

Whenever I hear old chronicles of love, it’s age old pain,
It’s ancient tale of being apart or together.
As I stare on and on into the past, in the end you emerge,
Clad in the light of a pole-star, piercing the darkness of time.
You become an image of what is remembered forever.

You and I have floated here on the stream that brings from the fount.
At the heart of time, love of one for another.
We have played along side millions of lovers,
Shared in the same shy sweetness of meeting,
the distressful tears of farewell,
Old love but in shapes that renew and renew forever.

Today it is heaped at your feet, it has found its end in you
The love of all man’s days both past and forever:
Universal joy, universal sorrow, universal life.
The memories of all loves merging with this one love of ours -
And the songs of every poet past and forever.

~by Rabindranath Tagore


Wednesday, April 30, 2014

تمام عمر کہاں کوئي ساتھ ديتا ہے


کٹھن ہے راہ گزر تھوڑي دور ساتھ چلو
بہت کڑا ہے سفر تھوڑي دور ساتھ چلو

تمام عمر کہاں کوئي ساتھ ديتا ہے
يہ جانتا ہوں مگر تھوڑي دور ساتھ چلو

نشے ميں چور ہوں ميں بھي تمہيں ہوش نہيں
بڑا مزہ ہو اگر تھوڑي دور ساتھ چلو

يہ ايک شب کي ملاقات بھي غنيمت ہے
کسے ہےکل کي خبر تھوڑي دور ساتھ چلو

ابھي تو جاگ رہے ہيں چراغ راہوں کے
ابھي ہے دور سحر تھوڑي دور ساتھ چلو

طواف منزل جاناں ہميں بھي کرنا ہے
فراز تم بھي اگر تھوڑي دور ساتھ چلو


احمد فراز

یا میرا دل پتھر کر دے یا اللہ


درد سے میرا دامن بھر دے یا اللہ
پھر چاہے دیوانہ کر دے یا اللہ

میں نے تجھ سے چاند ستارے کب مانگے
روشن دل بیدار نظر دے یا اللہ

سورج سی اک چیز تو ہم سب دیکھ چکے
سچ مچ کی اب کوی سحر دے یا اللہ

یا دھرتی کے زخموں پر مرہم رکھ دے
یا میرا دل پتھر کر دے یا اللہ

قتیل شفائی

Tuesday, April 22, 2014

SQL select row where id=max(id)

How to get MEX id of your table Primary Key.
The MAX() function returns the largest value of the selected column.

SQL MAX() Syntax

SELECT MAX(column_name) FROM table_name;

SELECT * FROM  tablename WHERE    id = (SELECT MAX(id ) FROM tablename

Demo Database

In this tutorial we will use the well-known Northwind sample database.
Below is a selection from the "Products" table:
ProductID ProductName SupplierID CategoryID Unit Price
1 Chais 1 1 10 boxes x 20 bags 18
2 Chang 1 1 24 - 12 oz bottles 19
3 Aniseed Syrup 1 2 12 - 550 ml bottles 10
4 Chef Anton's Cajun Seasoning 2 2 48 - 6 oz jars 21.35
5 Chef Anton's Gumbo Mix 2 2 36 boxes 25


SQL MAX() Example

The following SQL statement gets the largest value of the "Price" column from the "Products" table:

Example

SELECT MAX(ProductID) AS maxProductID FROM Products;

Monday, April 21, 2014

Search for an Item in a ListBox Control

In this example, you add some items to a Windows Forms ListBox control when the form is loaded. Then you search the ListBox for a specific item by clicking a button on the form. If the item is found, it is selected and a success message, which contains the item and its index, is sent by using a message box. Otherwise, an "Item not found" message is sent.



Example 01:

 private void Form1_Load(object sender, System.EventArgs e)
{
    listBox1.Items.Add("Angelina");
    listBox1.Items.Add("Isabella");
    listBox1.Items.Add("Sarah");
}

private void button1_Click(object sender, System.EventArgs e)
{
    // Set the search string:
    string myString = "Isabella";
    // Search starting from index -1:
    int index = listBox1.FindString(myString, -1);
    if (index != -1)
    {
        // Select the found item:
        listBox1.SetSelected(index,true);
        // Send a success message:
        MessageBox.Show("Found the item \"" + myString +
            "\" at index: " + index);
    }
    else
        MessageBox.Show("Item not found.");
}

ListBox Control with an Array of Strings


This example adds an array of strings to a ListBox control when the Windows Form opens.

Example  01:

private void Form1_Load(object sender, System.EventArgs e)
{
    string [] myList = new string[4];

    myList[0] = "One";
    myList[1] = "Two";
    myList[2] = "Three";
    myList[3] = "Four";

    listBox1.Items.AddRange(myList);
}

C# How to: Add and Clear Items in a ListBox Control


This example adds the contents of a Windows Forms TextBox control to a ListBox control when you click button1, and clears the contents when you click button2.

Example 1:

private void button1_Click(object sender, System.EventArgs e)
{
    listBox1.Items.Add("Sally");
    listBox1.Items.Add("Craig");
}

private void button2_Click(object sender, System.EventArgs e)
{
    listBox1.Items.Clear();
}

Thursday, April 17, 2014

میں ڈھونڈنے کو زمانے میں جب وفا نکلا

میں ڈھونڈنے کو زمانے میں جب  وفا نکلا
پتا چلا کےغلط  لَے  کہ  میں پتا نکلا 

جیےجو ہم لگے ستم ، عذاب ایسا 
 ڈھونڈ تا تھا ایک پل  میں  دل یہ جیسے سو دفع
نہ راستہ نہ کچھ پتا میں اس کو  ڈھونڈوں کہاں

میں ڈھونڈنے جو کبھی  جینے کی وجہ نکلا
پتا چلا کےغلط  لَے  کہ  میں پتا نکلا 

Wednesday, April 16, 2014

لڑکیوں کی زندگی اور گھر

لڑکیوں کی زندگی کا فلسفہ بھی عجیب ہے بلکہ بڑا ہی غریب ہے۔پہلے ماں باپ کا گھر،پھر میاں کا گھر اور آخر میں بچوں کا گھر ۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔
 ان کا اپنا گھر کونسا ہوتا ہے؟کہنے کو تو کہتے ہیں کہ تینوں گھر ان کے ہی ہیں ۔ مگر حقیقت میں ایسا نہیں ہوتا کیونکہ اگر ایسا ہوتا تو یہ سننے میں بھی نہ آتا کہ خاوند نے بیوی کو گھر سے نکال دیا،بچوں نے ماں کو گھر سے نکال دیا اور ماں باپ کے گھر کی کیا کہیں ۔۔۔ وہ اگر نہ نکالتے تو باقی گھروں سے کیوں نکلتی لیکن شاید یہ ہے زندگی یا پھر ہمارے جد امجد کی سنت،جنہیں جنت سے نکالا گیا تھا۔

Monday, April 14, 2014

SQL SERVER – Search Stored Procedure

If  you have the numbers of Stored Procedures in your database, it will be difficult to find a Stored Procedure you want to see / modify / changes in that, so for this issue you can search your Stored Procedure with below Syntex.

From this you can view Stored Procedure to display by text (code)

Syntax 01
sp_helptext @objname = 'sp_name'

From the below Syntax you can select all SP names and you can also search with Link operator too.

Syntax 02
Syntax
SELECT *  FROM sys.procedures;