Wednesday, August 17, 2011

Arrays in c#


There are two types of arrays :

1)One Dimensional Array
2)Multi or Double Dimensional arrays

Programs for 1d array

1)Simple array program

class abc
{
static void Main()
{
string[] names=new string[5];
for(int i=0;i<5;i++)
{
System.Console.WriteLine("Enter name of People");
names[i]=System.Console.ReadLine();
}
for(int i=0;i<5;i++)
{
System.Console.WriteLine(names[i]);
}
}}


2)Reverse an array

class abc
{
static void Main()
{
int[] a={45,66,43,12,85};
for(int i=0;i {
System.Console.WriteLine(a[i]);
}
System.Array.Reverse(a);
System.Console.WriteLine("reverse is");

for(int i=0;i {
System.Console.WriteLine(a[i]);
}
}
}

Two dimensional arrays

1)Program for Populationa and sector

using System;
class abc
{
static void Main()
{
int[ , ] population = new int [5,2];
for(int i=0;i<5;i++)
{
Console.Write("Enter secttor no. ");
population[i,0]=Convert.ToInt32(Console.ReadLine());

Console.Write("Enter Population ");
population[i,1]=Convert.ToInt32(Console.ReadLine());
}
for(int i=0;i<5;i++)
{
Console.WriteLine("{0} population is {1}",population[i,0],population[i,1]);
}
}
}

2)Transpose of a matrix

class abc
{
static void Main()
{
int[ , ] matrix = new int[4,4];


int[ , ] matrix2 = new int[4,4];

for(int j=0;j<=3;j++)
{
for(int i=0;i<=3;i++)
{
System.Console.Write("Enter Element {0},{1} : ",j,i);
matrix[j,i]=System.Convert.ToInt32(System.Console.ReadLine());
}
}

for(int j=0;j<=3;j++)
{

for(int i=0;i<=3;i++)
{
System.Console.Write(matrix[j,i]);
}
System.Console.WriteLine("");
}

System.Console.WriteLine("its transpose is");

for(int j=0;j<=3;j++)
{
for(int i=0;i<=3;i++)
{
matrix2[i,j]=matrix[j,i];
}
}
for(int j=0;j<=3;j++)
{
for(int i=0;i<=3;i++)
{
matrix[i,j]=matrix2[i,j];
}
}

for(int j=0;j<=3;j++)
{

for(int i=0;i<=3;i++)
{
System.Console.Write(matrix[j,i]);
}
System.Console.WriteLine("");
}
}
}

Properities in C#

Property in C# in a method to access data members..it has get and set accesors.These are basically used to keep the data private.

Program 1)To calculate grade and percentage using properties.

class marks
{
private int phy;
private int che;
private int mth;
private char ch;

public int physics
{
set
{
phy=value;
}
get
{
return(phy);
}
}
public int chemistry
{
set
{
che=value;
}
get
{
return(che);
}
}
public int math
{
set
{
mth=value;
}
get
{
return(mth);
}
}
public int total
{
get
{
int total=phy+che+mth;
return(total);
}
}
public float percentage
{
get
{
float percent=(total/3);
return(percent);
}
}
public char grade
{
get
{
int p=(total/3);
if(p>70)
{
ch='A';
}
else
{
ch='B';
}
return(ch);
}
}
}

class abc
{
static void Main()
{
marks p1 = new marks();
p1.chemistry=87;
p1.math=79;
p1.physics=90;

System.Console.WriteLine("Total is {0}",p1.total);
System.Console.WriteLine("Percentage is {0} %",p1.percentage);
System.Console.WriteLine("Grade is {0}",p1.grade);

}
}

Functoins in C#

We wil try with some Basic use of Functions in Console using c#

class abc
{
static void Main()
{
MyDetails("ashir","tangori","b.tech");
string a=System.Console.ReadLine();
string b=System.Console.ReadLine();
string c=System.Console.ReadLine();
MyDetails(a,b,c);
}

static void MyDetails(string nm,string clge,string dgre)
{
System.Console.WriteLine("the name is {0}",nm);
System.Console.WriteLine("college is {0}",clge);
System.Console.WriteLine("degree is {0}",dgre);
}
}

2)Simple addition using functions

class abc
{
static void Main()
{
int x=Sum(7,8);
System.Console.WriteLine("the sum is {0}",x);
}
static int Sum(int a,int b)
{
int y=a+b;
return(y);
}
}

3) Program to check discount using functions

class abc
{
static void Main()
{
int a;
float b;
System.Console.WriteLine("enter quantity");
a=System.Convert.ToInt32(System.Console.ReadLine());
System.Console.WriteLine("Enter price");
b=System.Convert.ToSingle(System.Console.ReadLine());
float c=DiscountedAmount(a,b);
System.Console.WriteLine("The net Price is {0}",c);
}
static int DiscountedAmount(int quan,float price)
{
float total=quan*price;
if(total<10000)
{
float dis=total*5/100;
float net=total-dis;
int a=System.Convert.ToInt32(net);
return(a);
}
else if(total>10000 && total<15000)
{
float dis=total*10/100;
float net=total-dis;
int a=System.Convert.ToInt32(net);
return(a);
}
else if(total>15000 && total<20000)
{
float dis=total*15/100;
float net=total-dis;
int a=System.Convert.ToInt32(net);
return(a);
}
else
{
float dis=total*20/100;
float net=total-dis;
int a=System.Convert.ToInt32(net);
return(a);
}
}
}



Learn Asp.net

Here are my posts to help u learn Asp.Net...
We will start with some basic programs.......

Tuesday, August 16, 2011

Boom Boom Afridi - A Living Legend




Sahibzada Mohammad Shahid Khan Afridi (Urdu: صاحبزادہ محمد شاہد خان آفریدی) (born 1 March 1980 in Khyber Agency of the Federally Administered Tribal Areas, Pakistan[2]), popularly known as Shahid Afridi (Pashto: شاهد ‏افریدی), is a Pakistani cricketer. Between 1996 and 2011, Afridi played 27 Tests, 325 One Day Internationals, and 43 Twenty20 Internationals (T20Is) for the Pakistani national team. He made his ODI debut on 2 October 1996 against Kenya and his Test debut on 22 October 1998 against Australia.
He is known for his aggressive batting style, and holds the record for the fastest ODI century which he made in his first international innings, as well as scoring 32 runs in a single over, the second highest scoring over ever in an ODI.[3] He also holds the distinction of having hit the most number of sixes in the history of ODI cricket.[4] Afridi considers himself a better bowler than batsman, and has taken 48 Test wickets and over 300 in ODIs. Currently Afridi is the leading wicket taker in the Twenty20 format taking 53 wickets from 43 matches.
In June 2009, Afridi took over the Twenty20 captaincy from Younus Khan, and was later appointed ODI captain for the 2010 Asia Cup. In his first match as ODI captain against Sri Lanka he scored a century however Pakistan still lost by 16 runs. He then also took over the Test captaincy but resigned after one match in charge citing lack of form and ability to play Test cricket; at the same time he announced his retirement from Tests. He retained the captaincy in limited-overs form of the game and led the team in the 2011 World Cup. In May 2011, having led Pakistan in 34 ODIs Afridi was replaced as captain. Later that month he announced his conditional retirement from international cricket in protest against his treatment by the Pakistan Cricket Board (PCB).
ull Name : Sahibzada Mohammad Shahid Khan Afridi

Born : March 1, 1980, Khyber Agency

Major Teams : Karachi, Habib Bank Limited, Leicestershire, ICC World XI, Griqualand West, South Australia, Asia XI, Deccan Chargers, Pakistan

Batting Style : Right Hand Bat

Bowling Style : Leg Break and Googly

Test Debut : Pakistan Vs Australia, 3rd Test at National Stadium, Karachi, 1998/99

ODI Debut : Pakistan Vs Kenya at Nairobi (AK), KCA Centenary Tournament, 1996/97



Monday, August 15, 2011

Secret hacking techniques of facebook by Ashir

If u wanna hack someones profile....its easy ...all u need is some basic information about the person u wanna hack....
Hacking is a 2 layer process . In order to hack some1s facebook , u will need to find out his email address. First we will hack the Email address and then the facebook.
1)Click on forgot password
2)Enter the captcha.
3)Then click on answer security questions.
4)If u know the person u will know the answer as well becoz security questions are very basic.
5)After this Enter the new pass word .
6)Now goto Facebook and click on forget ur password.
7)A link will be sent to ur Hacked inbox
8)Click on the Link and facebook is hacked ..

It is a very basic trick n it works....believe me...its easier then it looks..
Do post comments if it works for u..
More hacking tips comming up...Bye for now

My first interview at T.C.S

I have been nervous these dayz as Tcs is comming to our college..
the competition is tough but i thinng i stand a good chance...bt i really need to work hard...ny way these apti papers are taking a toll on me...there r more tha hundreds of them
U can check them out at
http://freshersworld.com/blogs/post/10/08/30/TCS-Complete-Placement-Process-With-Questions-Of-Aptitude,-Technical,-MR-and-HR-
just go on the link and get answer to all ur quesries about tcs...
i wish all of u best of luck.......

Friday, May 6, 2011

Sme pieces of my mind

Its been two years that i have updated this blog...and i dnt blame myself for it....things have been quite tough lately.....the last time i updated this blog i was a newbie in punjab ...everything was DIFFERENT..all i wanted to do was go home.....the paradise i had left behind....
Today i stand a jst a few months away from ending my short stint here and it hurts

Sunday, April 17, 2011

google-site-verification=XPlJ4JdpQ0aAr4CWUrveXSAPbUgMmXApJd5qsXh-C4U

google-site-verification=XPlJ4JdpQ0aAr4CWUrveXSAPbUgMmXApJd5qsXh-C4U

Monday, March 8, 2010

UzUmAkI NaRuTo




This Article is dedicated to all the Lovers of the popular japanese manga serial Naruto.......
Its a Story Of a boy who has a deamonine tailed fox inside him.......Initially he had no family no friends.....
But he has one thing " The Guts To Never Give Up"..

Twelve years before the start of the series, the Nine-Tailed Demon Fox attacked the ninja village KONOHA, slaughtering many people. In response, the leader of Konoha and its ninja military – the Fourth Hokage – sacrificed his life to seal the demon inside Naruto when he was a newborn. Konohagakure, however, regarded Naruto as if he were the demon fox itself and mistreated him throughout most of his childhood. A decree made by the Third Hokage, who replaced the Fourth Hokage after his death, forbade anyone mention the attack of the demon fox to anyone. Years later, Naruto is tricked by the renegade ninja Mizuki into stealing a forbidden scroll, but is stopped by his teacher, Iruka Umino. When Iruka almost dies while protecting Naruto from Mizuki, Naruto defeats Mizuki using the power from the scroll, which develops the supernatural ability Jutsu Shadow Clone Technique that creates clones from himself. That encounter makes Naruto realize he was the container of the demon fox.

The main story follows Naruto and his friends' personal growth. Naruto befriends two comrades, Sasuke Uchiha and Sakura Haruno, who are assigned with him to form a three-person team named Team 7 under an experienced sensei named Kakashi Hatake. Like all the ninja teams from the every village, Team 7 is in charge in completing missions requested by villagers such as being bodyguards. During the course of the missions, Naruto also befriends other characters that he meets throughout the series. They learn new abilities, get to know each other and other villagers better, and experience a coming-of-age journey as Naruto dreams of becoming the Hokage of Konohagakure. After several missions, Kakashi allows Team 7 to participate into a ninja exam in which they can improve their ranks, and thus, be part of harder missions. During the exams, Orochimaru, a criminal at the top of Konohas most wanted list, attacks Konoha killing the Third Hokage as an act of revenge. This causes one of the three legendary ninja, Jiraiya to search for his partner Tsunade, to become the Fifth Hokage. During that search, it is revealed that Orochimaru also desires to acquire Sasuke Uchiha due to his powerful genetic heritage. Believing Orochimaru will be able to give him the strength needed to kill his brother Itachi, who destroyed all his clan, Sasuke goes to him. Tsunade sends a group of ninja including Naruto to make Sasuke return to Konoha, but Naruto is unable to defeat him. Naruto does not give up on Sasuke, leaving Konoha for two-and-a-half years of training under Jiraiya's tuition to prepare himself for the next time he encounters Sasuke.......



For more info stay tuned........



Tuesday, April 21, 2009

Kashmir.............."Paradise on Earth"???????????


IN the beginning Kashmir was under the influence of buddhists..........the signs of whch can be seen in Ladakh.....................

Huns gained control in sixth century. Mihira Kula, a Hun prince was known as cruel as death for his cruel behavior. The Ujjan empire took control in 530 AD. The Hindu king Lalitya Dityas' rule ( 724-761) marked an era of literature and learning. Kashmir as his base he led his armies deep into South India, Turkistan and Tibet. He built temples at Martand , Avantipor and Pandrethan which still remain. He set an example for Kashmir as an independent country.

King Unmattavati 939-944 AD was inauspicious. He ripped the abdomen of the pregnant women to see the fetus, plunged daggers in the hollows between the breasts of naked women. The saga of repression continued during the time of King Harisha 1089-1101 AD.

Pundit Kalhane the great poet of the 12th century wrote Rajatarangi (River of Kings). He wrote "Kashmir may be conquered by force of spiritual merit but never by force of soldiers" which, in present political climate may be worth remembering. The spate of literal tranquility was short lived , ferocious tartars ( 1300-1320AD) Zulfi Khan from Changis Khan family invaded and indulged in ruthless killing, loot and arson. He perished in a blizzard crossing the Devasar pass. Simha Deva and his associate Ram Chand ruled for a while but soon Prince Rinchen took over having killed Ram Chand and married his daughter, Kuta Rani. Rinchen converted to Islam and called himself Sultan sadru-ud-din and built the great Jama Masjid and Ziyarat for Bulbul shah who was his mentor. Rinchen died and Simbha Deva's brother Udayadeva married the widow Kuta Rani and ruled for 50 days. Shah Mir a Muslim from swat and adviser to Rinchen was waiting in the wings and took over the throne. This heralded the ' Sultan dynasty' which lasted 200 years.

In 1372 Shah Hamadan arrived from central Asia with thousands of followers and spread his message of Islam. People were converted to his faith enmasse.. In the meantime Shah Mir died and the throne was inherited by Sultan Skinder in 1389 who ruled for 24 years and destroyed idols and sacred thread (500 lbs) of the converted Hindus . The fifty years rule of Zainul Abidin (Budsha) which followed is known as the golden era in the history of Kashmir He invited artists from Iran and handicrafts boomed. His rule has been remarkable in progress, prosperity and justice. His rule extended to Tibet and Punjab. He built a palace in the island called Zainlank also made by him and inscribed on the edifice 'May this edifice be as firm as the foundation of the heavens' He married into a Hindu Raja family from Jammu.. His two sons fought with each other after his death in 1470 and lost the throne to Chak family , waiting in the wings.

Yousuf Shah Chak and his wife Haba Khatoon were ruling when Akbar the Mughul Emperor beguiled him and entered Kashmir on June 5, 1586 to rule for the next 166 years. Jehangir inherited the throne and became obsessed with the beauty of Kashmir. He and his wife Nur Jehan built 777 gardens and panted Chinar trees. On his death in 1627 he uttered 'Kashmir only Kashmir'.

Shah Jehan stepped in after his father Jehangir and also built places like Chashma Shahi and his sons Murad married to a Kashmiri girl built the Island called Char Chinar. His eldest son dara Shikoh built Pari Mahal and Greystone mask still standing today. It was Aurangzeb who got the throne having beheaded Dara. In 1664 Dec Aurangzeb set off from Delhi for Kashmir , accompanied by his sister Roshan Ara. 100,000 horsemen, camels, elephants and cattle. He lost most of his livestock in the mountains. The Mughal era came to an end with the ferocious invasion of Persian leader Nadir Shah in 1739. He took the peacock throne and Kohinoor and left the Mughals in disarray.



It was the Afghans who saw an opportunity and invaded Kashmir. Ahmad Shah Abdali ruled in a ruthless manner, he ordered public executions and people drowned in the Jehlem river. Afghans built Amira Kadal, Hari Parbat forte. One ruler 18 year old Azad Khan plundered , killed and raped like a lunatic. He slit the stomach of his doctor for not curing his eye ailment. Abdali died in Kabul in 1818 , the sons fought and lost Kashmir to Sikhs. It was like coming out of the frying pan into the fire !

The Sikhs were invited by locals to get rid of the Afghans but the 27 years rule from Sikhs was a hell . People were stoned to death for killing a cow. A despotic rule which led to pestilence, destitution followed unfortunately by earthquakes and famine of 1832. Ranjit Singh the ruler never visited Kashmir but wanted , taxes, shawls and women. Gulab Singh a dogra commander won his favor by fighting the British. He was awarded Jammu as Jagir.

It was Gulab Singh who conquered Ladakh and Dardistan in 1840. Poonch remained with his brother Dyan Singh. Gulab Singh betrayed his old master and helped the British to defeat Ranjit Singh. British demanded a heavy fine to relinquish Kashmir. Gulab Singh offered to pay and Kashmir was sold to him for Rs 75,000, one horse , 12 goats and three shawls. One shawl and 100 goats also to be given every year otherwise Kashmir would revert back to the British.. This became the famous Treaty of Amritsar.

Gulab Sigh consolidated power and Dogra rule of a complete century was heralded. He was very cruel and sought to reconvert all Muslims back to Hindus. 1857 Rambir Singh took over and helped British retake Delhi after a mutiny. His repressive rule lasted for 28 years and was succeeded by Major General Partap Singh. Partap Singh was dominated by British and he allowed a resident and a revenue commissioner Walter Lawrence was installed. This was a great relief for Kashmiris, because inhuman laws like 'Beggar' or forced free labor and execution for cow slaughter was abolished. In 1889 the British took over direct rule for sixteen years , giving a breathing time of relief for Kashmiris from repressive Dogra rule. Soon enough Maharaja was reinstalled in 1905 and saga of autocratic despotic rule continued. Hari Singh was the nephew ( Partap Sigh had no son) born and educated in Paris. He became the westernized Maharaja of Kashmir. Polo. golf, house -boats and trout fishing became the norm in Kashmir. British missionaries like Arthur Neve, Cecil Tyndale Biscoe, Miss Mellinson became the pioneers of development and education in Kashmir.

Srinagar Silk Weaving factory strike in 1924 when Said-ud-din Shawl and Noor Shah Naqshbandi were expelled was an important landmark for the political renascence of Kashmir. They submitted a petition to Lord Reading the viceroy of India with their grievances . On 13 July 1931 nine people were gunned down in front of central jail who were protesting against a Jammu policeman desecrating Quran. This became the 'Martyrs Day' A school teacher Shiekh Abdulla formed the 'Muslim Conference' which he later converted to National Conference to include the non-muslims in the party. Several thousand people got killed by Dogra army. The British set up the Glancy commission to investigate. Maharaja caved in and passed the constituent assembly act. Now 35 out of 70 seats would be elected. Muslim conference still active in Jammu under Choudry Abbas got 14 seats. The 'Quit Kashmir' movement launched by Abdulla took off like wild fire. Repression intensified. "Srinagar has been transformed into a graveyard" stated Nehru " I must go there" He was greeted with black flags by Pandits and arrested.

1947 sorting partition of India out Lord Mountbatten called a meeting of the party leaders on June 13, 47. Mr. Nehru said that no state can claim independence, but Mr. Jinnah said 'that constitutionally and legally the Indian states will be independent sovereign states on the termination of paramountcy and they will be free to decide for themselves to adopt any course they like. They can decide to remain independent. In the later case they enter into agreements and relationships, such as economic or commercial, with Hindustan or Pakistan as they may choose'

Maharaja and his Prime Minister Ram Chand Kak wanted independent Kashmir. A stand still agreement was signed with India and Pakistan. A trade agreement with Pakistan meant oil, salt could be imported and communication link kept open. Sudhans in Poonch revolted and got slaughtered by state forces. On 22 October Tribals from Waziristan invaded plunging Kashmir in darkness. They were only a few miles from capturing the capital city when Maharaja fleeing for life allegedly accepted provisional accession to India, in return for safety of his life. Indian army was flown in on 27th October and a war ensued between india and Pakistan. This resulted in partition of the state and 50 years on it still remains split and divided. The accession document signed by Lord Mountbatten states that the accession is probationary and subject to a plebiscite confirming his action. It is this plebiscite that people were promised that has now caused over 50,000 deaths of Kashmiris.

United Nations got involved. Jan, 24, 1948 Mr. Warren Austen of USA suggested an interim government followed by a plebiscite. Jan 1951 Australian PM , Mr. R G Menzies proposed stationing commonwealth troops or Indo Pakistan joint force or raise a local army in Kashmir It was rejected by India. United Nations or two deadly wars did not alter the status defacto position of Kashmir dispute nor did the Nehru-Abdulla agreement of July 24, 1952 Abdulla , the serving prime minister was arrested and jailed. The reasons for this action are elaborated ( 15 points )

September,4 ,1965 UN resolution stopped the Indo-Pakistani war, culminated in the Tashkent Declaration of Jan, 10, 1966. POW's were exchanged , but Kashmir was left simmering in the smoldering fire. One more Indo-Pakistani war erupted, this time in East Pakistan and culminated in the Simla agreement of July ,3,1972. Again after exchange of POW's Kashmir was left to be discussed later , in order to arrive at an amicable solution.

As time passed people eg Shastri, Ayub Khan , Nehru, Abdulla passed away; Even Mountbatten , who would have been an important witness was blown up by the IRA in Ireland. The local people have now come out in open revolt and every day more people die , more homes are blasted, more women molested and dehumanization is a norm. 

OVERVIEW OF KASHMIRI RULERS

KASHMIR IN 3RD CENTURY BC

The Imperial history of Kashmir begins in the third century BC with the rule of Asoka. At that time, Kashmiris became famous throughout Asia as learned, cultured and humane and the intellectual contribution of writers, poets, musicians, and scientists to the rest of south Asia was comparable to that of ancient Greece to European civilization. SADR-U-DIN

Rinchen, a Buddhist ruler, who was converted to Islam by a famous Muslim saint Bulbul shah and given the Islamic name Sadr-u-din, became the first Muslim monarch of Kashmir. He was considered to be the wise ruler, but his reign did not last for long. 

KINGDOM OF SHAHAB-UD-DIN
Shabab-ud-Din who came to the throne in 1354 is the first great king of Muslim period. Shahab-ud-Din devoted his attention to foreign expeditions, conquering Baltistan, Ladakh, Kishtwar and Jammu. Shahab-ud-Din loved learning and patronized art and architecture. In 1361 there was a devastating flood, but the atmosphere of general well being prevailed. On Shahab-ud-Din's death in 1373, Qutb-ud-Din succeeded him.

KINGDOM OF QUTB-UD-DIN
During Qutb-ud-Din's rule, the pace of conversion to Islam increased. Muslim from west and central Asia, in search of refuge from the Mongols, arrived in Kashmir. The most influential among them was Mir Syed Ali Hamadani (RA). He came with hundreds of missionaries i.e Syeds, from Hamadan and other parts of Persia who preached Islam and made this land the land of faithful. Sir Aurel Stein writes, "Islam made its way into Kashmir not by forcible conquest, but by gradual conversion."

KINGDOM OF BUD SHAH
After the death of Qutb-ud-Din his son Sikander took over the power in 1389. Sikander was succeeded by his younger son popularly know as Bud Shah (the great king) in 1420. During Bud Shah's long reign, which lasted until 1470, the valley prospered both economically and culturally. With the death of Bud Shah, the dynasty of the Shah Mirs began to decline.

MUGHAL RULE IN KASHMIR
Attracted by the fame of Kashmir, Mughals made several attempts to dominate it but they always failed. It was at Hamayun's ruling period that Mirza Haider Dughlat, a cousin of Babar's mother finally succeeded in conquering Kashmir in 1540. In 1555, Ghazi Chak, bringing the end to the 200-year old dynasty of Shah Mirs, became king of Kashmir. The Mughal Emperor Akbar led Kashmir's incorporation into Mughal Empire and ended the Kashmir's long history as a kingdom in its own right.

JAHANGEER'S GLORIOUS ERA 
Of all the rulers of Kashmir Akbar's son and successor, Jehangeer, is best remembered for his love of the valley Kashmir. He ascended the throne in 1605. During his reign Jehangeer adorned Kashmir with over 700 captivating and charming gardens. Their names evoke the beauty of the place: Shalimar (abode of love) and Nishat (garden of gladness) are the two most famous.

FALL OF MUGHAL REGIME 
Jehangir was succeeded by his son, Shah Jehan in 1627. He too loved Kashmir and the valley became a popular place of refuge for the Mughals during the hot summers. Aurangzeb, who came to the throne in 1658, was the last of the Mughal Emperors to make any impact on Kashmir's history.

AFGHANIS ARRIVAL IN KASHMIR
Nadir Shah's invasion of the seat of Mughal power at Delhi in 1738 had weakened their imperial hold on Kashmir. This in turn left Kashmir at the mercy of coming rulers. With the decline of Mughal power in India the governors of Kashmir became irresponsible and cruel. In 1762, in alliance with the Dogra Rajput ruler, Raja Ranjit Dev of Jammu, the Afghans attached Kashmir. When the Afghan leader, Ahmed Shah Durrani, died in 1772 Jawan Sher the Afghan ruler of Kashmir, set himself up as an independent ruler. Afghan domination lasted for little more than fifty years, but the period is generally remembered as one of the darkest periods of Kashmir's history.

SIKH RULE
After the overthrow of Afghan rulers, the state came under Sikh rule headed by Ranjeet Singh. Ranjeet Singh sent Colonel Mian Singh Kumedan, from Gujranwala as governor to Kashmir. Considered to be the best of all the Sikh governors, he attempted to bring the valley out of the economic chaos resulting from the 1833 famine. Gulab Singh had been Ranjit Singh's protégé for thirty years. When Ranjit Singh died, Gulab Singh, aged forty-seven, was well-placed to control events not only in the heart of the Sikh empire in Lahore but also in Kashmir. Until the death of Ranjit Singh, the East India Company had maintained cordial relations with the Sikhs; but after his death, the relationship soon fell apart. As relations deteriorated between the British and the Sikh prior to the outbreak of war in 1845, Gulab Singh played an important role, which ultimately helped to further his own territorial ambitions, enabling him to become a maharaja in his own right.

DARKEST DOGRA RULE
Under the Treaty of Amritsar, the Britishers sold Kashmir to Gulab Singh at a cost of 7,500,000 Nanak Shahi currency and hence commenced the Dogra rule in Kashmir. The Dogra rule in Kashmir is thought to be one of the darkest periods in Kashmir's history. In this period the people of Kashmir have suffered a lot at the hands of Dogra rulers. The successors of Dogra dynasty after Gulab Singh including Ranbir Singh (1858), Partab Singh (1885) and Hari Singh (1925). The latter was the last ruler of the dynasty until partition of the Sub Continent in 1947. 

About This Blog..................

This blog is very special in a unique way coz it will share ur problems and help to solve them ......

We have our panel of experts :

1)Er.S.Ashir Ehsan
2)Pr.Karan Jaitley
3)Lc.Prabhat 

These all the Experts will help u to solve ur problems..................................

So please log on to this blog daily...................n solve ur problems......................

We would be delighted to help......................