Top Stories Photos on Yahoo! News Photos
Wednesday, July 20, 2011
Tuesday, July 19, 2011
Monday, July 18, 2011
Friday, September 12, 2008
منٹو کے 'سياہ ماشے' سے ايک اقتباس
'لوٹا ہوا مال برآمد کرنے کيلیے پوليس نے چھاپے مارنے شروع کيے تو لوگ ڈر کے مارے لوٹا ہوا مال رات کے اندھيرے ميں باہر پھينکنے لگے۔ کچھ ايسے بھی تھے جنہوں نے اپنا ذاتی مال بھی موقع پا کر اپنے سے عليحدہ کرديا تاکہ قانونی گرفت سے سرے سے ہی بچ سکيں۔ ايک آدمی کو بہت مشکل پيش آئي، اسکے پاس شکر کی دو بورياں تھيں جو اس نے لوٹی ہوئی تھيں۔ ايک بوری تو اس نے رات کو کنويں ميں پھينک دی ليکن جب دوسری بوری اٹھا کر کھوہ ميں پھينکنے لگا تو خود بھی ساتھ چلا گيا۔ شور سن کر لوگوں نے کھوہ رسياں ڈال کر آدمی کو باہر نکالا ليکن وہ باہر آکر مرگيا۔ دوسرے دن لوگوں نے استعمال کيلیے پانی نکالا تو وہ ميٹھا تھا، اسی رات اس آدمی کی قبر پر دیے جل رہے تھے اور "سبحان اللہ سبحان اللہ" کا ورد ہو رہا تھا۔
Wednesday, September 10, 2008
Get Active Directory User Name/Loging Name/Email in C#.NET
This code snippet is a continuing part of my existing post that has been posted in August 2008.Here I m explaining how to get User Login Name,User Actual Name,User Email Addresses and other active directory information using C#.In the example below I m extracting only user login name[UserPrincipalname] but all filter has been applied for your convince.You can replace any one as per your requirement.
You can also remove other filters that are not related to you.
DirectoryEntry de = GetDirectoryObject();
DirectorySearcher deSearch = new DirectorySearcher();
deSearch.SearchRoot = de;
int Count =0;
deSearch.Filter = "(&(objectClass=user))";
deSearch.SearchScope = SearchScope.Subtree;
deSearch.PropertiesToLoad.Add("cn"); // username
deSearch.PropertiesToLoad.Add("name"); // full name
deSearch.PropertiesToLoad.Add("givenname"); // firstname
deSearch.PropertiesToLoad.Add("sn"); // lastname
deSearch.PropertiesToLoad.Add("mail"); // mail
deSearch.PropertiesToLoad.Add("initials"); // initials
deSearch.PropertiesToLoad.Add("ou"); // organizational unit
deSearch.PropertiesToLoad.Add("userPrincipalName"); // login name
deSearch.PropertiesToLoad.Add("distinguishedName"); // distinguised nam
SearchResultCollection results = deSearch.FindAll();
//lstADUsers.Items.Clear();
if ((results != null))
{
foreach (System.DirectoryServices.SearchResult value in results)
{
Count++;
if (value.GetDirectoryEntry().Properties != null)
{
if (value.GetDirectoryEntry().Properties["sn"].Value != null)
{
if (value.GetDirectoryEntry().Properties["userPrincipalName"].Value != null)
{
string AdUsername = value.GetDirectoryEntry().Properties["userPrincipalName"].Value.ToString();
if (AdUsername.Length > 0)
{
if (AdUsername.Contains("@"))
AdUsername = AdUsername.Substring(0, AdUsername.IndexOf('@'));
lstADUsers.Items.Add(AdUsername);
if (Count % 2 == 0)
lblWait.Text = "PLEASE WAIT. ";
else
lblWait.Text = "PLEASE WAIT...";
Application.DoEvents();
}
}
}
}
}
}
//return arlUsers;
}
private DirectoryEntry GetDirectoryObject()
{
DirectoryEntry oDE;
oDE = new DirectoryEntry("LDAP://AD.LMKR.NET", @"DOMAINNAME\LOGINNAME", "PASSWORD", AuthenticationTypes.ReadonlyServer );
return oDE;
}
Like it or dislike it please comment....If you like it then forward this
Khuda Hafiz
Raja Imran Nisar
You can also remove other filters that are not related to you.
DirectoryEntry de = GetDirectoryObject();
DirectorySearcher deSearch = new DirectorySearcher();
deSearch.SearchRoot = de;
int Count =0;
deSearch.Filter = "(&(objectClass=user))";
deSearch.SearchScope = SearchScope.Subtree;
deSearch.PropertiesToLoad.Add("cn"); // username
deSearch.PropertiesToLoad.Add("name"); // full name
deSearch.PropertiesToLoad.Add("givenname"); // firstname
deSearch.PropertiesToLoad.Add("sn"); // lastname
deSearch.PropertiesToLoad.Add("mail"); // mail
deSearch.PropertiesToLoad.Add("initials"); // initials
deSearch.PropertiesToLoad.Add("ou"); // organizational unit
deSearch.PropertiesToLoad.Add("userPrincipalName"); // login name
deSearch.PropertiesToLoad.Add("distinguishedName"); // distinguised nam
SearchResultCollection results = deSearch.FindAll();
//lstADUsers.Items.Clear();
if ((results != null))
{
foreach (System.DirectoryServices.SearchResult value in results)
{
Count++;
if (value.GetDirectoryEntry().Properties != null)
{
if (value.GetDirectoryEntry().Properties["sn"].Value != null)
{
if (value.GetDirectoryEntry().Properties["userPrincipalName"].Value != null)
{
string AdUsername = value.GetDirectoryEntry().Properties["userPrincipalName"].Value.ToString();
if (AdUsername.Length > 0)
{
if (AdUsername.Contains("@"))
AdUsername = AdUsername.Substring(0, AdUsername.IndexOf('@'));
lstADUsers.Items.Add(AdUsername);
if (Count % 2 == 0)
lblWait.Text = "PLEASE WAIT. ";
else
lblWait.Text = "PLEASE WAIT...";
Application.DoEvents();
}
}
}
}
}
}
//return arlUsers;
}
private DirectoryEntry GetDirectoryObject()
{
DirectoryEntry oDE;
oDE = new DirectoryEntry("LDAP://AD.LMKR.NET", @"DOMAINNAME\LOGINNAME", "PASSWORD", AuthenticationTypes.ReadonlyServer );
return oDE;
}
Like it or dislike it please comment....If you like it then forward this
Khuda Hafiz
Raja Imran Nisar
Labels:
.NET,
Active Directory,
C#,
Microsoft,
Programming
Tuesday, September 9, 2008
I thought you were bringing her back.
A Ban bury senior citizen drove his brand new BMW Z3 convertible out of the car salesroom. Taking off down the motorway, he floored it to 90 mph, enjoying the wind blowing through what little hair he had left. "Amazing!" he thought as he flew down the M40, enjoying pushing the pedal to the metal even more. Looking in his rear view mirror, he saw a police car behind him, blue lights flashing and siren blaring.
"I can get away from him - no problem!" thought the elderly nutcase as he floored it to 110mph, then 120, then 130mph. Suddenly, he thought, "What on earth am I doing? I'm too old for this nonsense!" So he pulled over to the side of the road and waited for the police car to catch up with him.
Pulling in behind him, the police officer walked up to the driver's side of the BMW, looked at his watch and said, "Sir, my shift ends in 10 minutes. Today is Friday and I'm taking off for the weekend. If you can give me a reason why you were speeding that I've never heard before, I'll let you go."
The man, looked very seriously at the policeman, and replied, "Years ago, my wife ran off with a policeman. I thought you were bringing her back."
"Have a good day, Sir," said the policeman
"I can get away from him - no problem!" thought the elderly nutcase as he floored it to 110mph, then 120, then 130mph. Suddenly, he thought, "What on earth am I doing? I'm too old for this nonsense!" So he pulled over to the side of the road and waited for the police car to catch up with him.
Pulling in behind him, the police officer walked up to the driver's side of the BMW, looked at his watch and said, "Sir, my shift ends in 10 minutes. Today is Friday and I'm taking off for the weekend. If you can give me a reason why you were speeding that I've never heard before, I'll let you go."
The man, looked very seriously at the policeman, and replied, "Years ago, my wife ran off with a policeman. I thought you were bringing her back."
"Have a good day, Sir," said the policeman
Know Your Baby By Their Month of Birth
*Jan*
Pretty/handsome. Loves to dress up. Easily bored. Fussy. Seldom shows
emotions. Takes time to recover when hurt. Sensitive. Down-to-Earth.
Stubborn.
*Feb *
Abstract thoughts. Loves reality and abstract. Intelligent and clever.
Changing personality. Attractive. Sexiest out of everyone. Temperamental.
Quiet, shy and humble. Honest And loyal. Determined to reach goals. Loves
freedom. Rebellious when restricted. Loves aggressiveness. Too sensitive and
easily hurt. Gets angry really easily but does not show it. Dislikes
unnecessary things. Loves making friends but rarely shows it. Horny. Daring
and stubborn. Ambitious. Realizing dreams and hopes. Sharp. Loves
entertainment and leisure. Romantic on the inside not outside. Superstitious
and ludicrous. Spendthrift. Tries to learn to show emotions.
*Mar *
Attractive personality. Sexy. Affectionate Shy and reserved. Secretive.
Naturally honest, generous and sympathetic. Loves peace and serenity.
Sensitive to others. Great kisser.. Easily angered. Trustworthy.
Appreciative and returns kindness. Hardly shows emotions. Tends to bottle
up feelings. Observant and assesses others.
*Apr*
Suave and compromising. Funny and humorous. Stubborn. Very talkative.
Calm and cool. Kind and sympathetic. Concerned and detailed. Loyal. Does
work well with others. Very confidant. Sensitive. Positive Attitude.
Thinking generous. Good memory. Clever and knowledgeable. Loves to look for
information. Able to cheer everyone up and/or make them laugh. Able to
motivate oneself and others. Understanding. Fun to be around. Outgoing.
Hyper. Bubbly personality. Secretive. Boy/girl crazy. Loves sports, music,
leisure and traveling. Systematic. Hot but has brains.
*May*
** Stubborn and hard-hearted. Strong-willed and highly motivated. Sharp
thoughts. Easily angered. Attracts others and loves attention. Deep
feelings. Beautiful physically and mentally. Firm Standpoint. Needs no
motivation. Shy towards opposite sex. Easily consoled. Systematic (left
brain). Loves to dream. Strong clairvoyance. Understanding. Sickness usually
in the ear and neck. Good imagination. Good physical. Weak breathing. Loves
literature and the arts. Loves traveling. Dislike being at home. Restless.
Not having many children. Hardworking. High-spirited.
*Jun*
You've got the best personality and are an absolute pleasure to be around.
You love to make new friends and be outgoing. You are a great flirt and more
than likely have an a very attractive partner. a wicked hottie. It is also
more than likely that you have a massive record collection. You have a great
choice in films, and may one day become a famous actor/actress yourself -
heck, you've got the looks for it!!!
*Jul *
Fun to be with. Secretive. Difficult to fathom and to be understood. Quiet
unless excited or tensed. Takes pride in oneself. Has reputation. Easily
consoled. Honest. Concerned about people's feelings. Tactful. Friendly.
Approachable. Emotional temperamental and unpredictable. Moody and easily
hurt. Witty and sparkly. spazzy at times. Not revengeful. Forgiving but
never forgets. dislikes nonsensical and unnecessary things. Guides others
physically and mentally. Sensitive and forms impressions carefully. Caring
and loving. Treats others equally. Strong sense of sympathy. Wary and sharp.
Judges people through observations. Hardworking. No difficulties in
studying. Loves to be alone. Always broods about the past and the old
friends. Waits for friends. Never looks for friends. Not aggressive unless
provoked. Loves to be loved. Easily hurt but takes long to recover. Repost
this in the next 5 mins and your reputation will boost someway in the next
12 days *
Aug*
Outgoing personality. takes risks. feeds on attention. No self-control.
Kind hearted. Self-confident. Loud and boisterous. VERY revengeful. Easy to
get along with and talk to. Has an "every thing's peachy" attitude. Likes
talking and singing. Loves music. Daydreamer. Easily distracted. Hates not
being trusted. BIG imagination. Loves to be loved. Hates studying. in need
of "that someone". Longs for freedom. Rebellious when withheld or
restricted. Lives by "no pain no gain" caring. Always a suspect. Playful.
Mysterious. "charming" or "beautiful" to everyone. stubborn. curious.
Independent. Strong willed. A fighter.
*Sept*
Active and dynamic. Decisive and haste but tends to regret. Attractive
and affectionate to oneself.. Strong mentality. Loves attention. Diplomatic.
Consoling, friendly and solves people's problems. Brave and fearless.
Adventurous. Loving and caring. Suave and generous. Usually you have many
friends. Enjoys to make love. Emotional. Stubborn. Hasty. Good memory.
Moving, motivates oneself and others. Loves to travel and explore.
Sometimes sexy in a way that only their lover can understand.
*Oct*
Loves to chat. Loves those who love them. Loves to takes things at the
center. Inner and physical beauty. Lies but doesn't pretend. Gets angry
often. Treats friends importantly. Brave and fearless. Always making
friends. Easily hurt but recovers easily. Daydreamer. Opinionated. Does not
care to control emotions. Unpredictable. Extremely smart, but definitely
the hottest AND sexiest of them all.
*Nov*
** Trustworthy and loyal. Very passionate and dangerous. Wild at times.
Knows how to have fun. Sexy and mysterious. Everyone is drawn towards your
inner and outer beauty and independent personality. Playful, but secretive.
Very emotional and temperamental sometimes. Meets new people easily and very
social in a group. Fearless and independent. Can hold their own. Stands out
in a crowd. Essentially very smart. Usually, the greatest men are born in
this month. If you ever begin a relationship with someone from this month,
hold on to them because their one of a kind.
*Dec *
This straight-up means you are the most good-looking person possible...
Better than all of these other months! Loyal and generous. Patriotic.
Competitive in everything. Active in games and interactions. Impatient and
hasty.. Ambitious. Influential in organizations. Fun to be with. Easy to
talk to, though hard to understand. Thinks far with vision, yet complicated
to know. Easily influenced by kindness. Polite and soft-spoken. Having lots
of ideas. Sensitive. Active mind. Hesitating tends to delay. Choosy and
always wants the best. Temperamental. Funny and humorous. Loves to joke.
Good debating skills. Has that someone always on his/her mind. Talkative.
Daydreamer. Friendly. Knows how to make friends. Abiding. Able to show
character. One guy/girl kind of person. Loveable. Easily hurt. Prone to
getting colds. Loves music. Pretty/handsome. Loves to dress up. Easily
bored. Fussy. Seldom shows emotions. Takes time to recover when hurt.
Sensitive.
Pretty/handsome. Loves to dress up. Easily bored. Fussy. Seldom shows
emotions. Takes time to recover when hurt. Sensitive. Down-to-Earth.
Stubborn.
*Feb *
Abstract thoughts. Loves reality and abstract. Intelligent and clever.
Changing personality. Attractive. Sexiest out of everyone. Temperamental.
Quiet, shy and humble. Honest And loyal. Determined to reach goals. Loves
freedom. Rebellious when restricted. Loves aggressiveness. Too sensitive and
easily hurt. Gets angry really easily but does not show it. Dislikes
unnecessary things. Loves making friends but rarely shows it. Horny. Daring
and stubborn. Ambitious. Realizing dreams and hopes. Sharp. Loves
entertainment and leisure. Romantic on the inside not outside. Superstitious
and ludicrous. Spendthrift. Tries to learn to show emotions.
*Mar *
Attractive personality. Sexy. Affectionate Shy and reserved. Secretive.
Naturally honest, generous and sympathetic. Loves peace and serenity.
Sensitive to others. Great kisser.. Easily angered. Trustworthy.
Appreciative and returns kindness. Hardly shows emotions. Tends to bottle
up feelings. Observant and assesses others.
*Apr*
Suave and compromising. Funny and humorous. Stubborn. Very talkative.
Calm and cool. Kind and sympathetic. Concerned and detailed. Loyal. Does
work well with others. Very confidant. Sensitive. Positive Attitude.
Thinking generous. Good memory. Clever and knowledgeable. Loves to look for
information. Able to cheer everyone up and/or make them laugh. Able to
motivate oneself and others. Understanding. Fun to be around. Outgoing.
Hyper. Bubbly personality. Secretive. Boy/girl crazy. Loves sports, music,
leisure and traveling. Systematic. Hot but has brains.
*May*
** Stubborn and hard-hearted. Strong-willed and highly motivated. Sharp
thoughts. Easily angered. Attracts others and loves attention. Deep
feelings. Beautiful physically and mentally. Firm Standpoint. Needs no
motivation. Shy towards opposite sex. Easily consoled. Systematic (left
brain). Loves to dream. Strong clairvoyance. Understanding. Sickness usually
in the ear and neck. Good imagination. Good physical. Weak breathing. Loves
literature and the arts. Loves traveling. Dislike being at home. Restless.
Not having many children. Hardworking. High-spirited.
*Jun*
You've got the best personality and are an absolute pleasure to be around.
You love to make new friends and be outgoing. You are a great flirt and more
than likely have an a very attractive partner. a wicked hottie. It is also
more than likely that you have a massive record collection. You have a great
choice in films, and may one day become a famous actor/actress yourself -
heck, you've got the looks for it!!!
*Jul *
Fun to be with. Secretive. Difficult to fathom and to be understood. Quiet
unless excited or tensed. Takes pride in oneself. Has reputation. Easily
consoled. Honest. Concerned about people's feelings. Tactful. Friendly.
Approachable. Emotional temperamental and unpredictable. Moody and easily
hurt. Witty and sparkly. spazzy at times. Not revengeful. Forgiving but
never forgets. dislikes nonsensical and unnecessary things. Guides others
physically and mentally. Sensitive and forms impressions carefully. Caring
and loving. Treats others equally. Strong sense of sympathy. Wary and sharp.
Judges people through observations. Hardworking. No difficulties in
studying. Loves to be alone. Always broods about the past and the old
friends. Waits for friends. Never looks for friends. Not aggressive unless
provoked. Loves to be loved. Easily hurt but takes long to recover. Repost
this in the next 5 mins and your reputation will boost someway in the next
12 days *
Aug*
Outgoing personality. takes risks. feeds on attention. No self-control.
Kind hearted. Self-confident. Loud and boisterous. VERY revengeful. Easy to
get along with and talk to. Has an "every thing's peachy" attitude. Likes
talking and singing. Loves music. Daydreamer. Easily distracted. Hates not
being trusted. BIG imagination. Loves to be loved. Hates studying. in need
of "that someone". Longs for freedom. Rebellious when withheld or
restricted. Lives by "no pain no gain" caring. Always a suspect. Playful.
Mysterious. "charming" or "beautiful" to everyone. stubborn. curious.
Independent. Strong willed. A fighter.
*Sept*
Active and dynamic. Decisive and haste but tends to regret. Attractive
and affectionate to oneself.. Strong mentality. Loves attention. Diplomatic.
Consoling, friendly and solves people's problems. Brave and fearless.
Adventurous. Loving and caring. Suave and generous. Usually you have many
friends. Enjoys to make love. Emotional. Stubborn. Hasty. Good memory.
Moving, motivates oneself and others. Loves to travel and explore.
Sometimes sexy in a way that only their lover can understand.
*Oct*
Loves to chat. Loves those who love them. Loves to takes things at the
center. Inner and physical beauty. Lies but doesn't pretend. Gets angry
often. Treats friends importantly. Brave and fearless. Always making
friends. Easily hurt but recovers easily. Daydreamer. Opinionated. Does not
care to control emotions. Unpredictable. Extremely smart, but definitely
the hottest AND sexiest of them all.
*Nov*
** Trustworthy and loyal. Very passionate and dangerous. Wild at times.
Knows how to have fun. Sexy and mysterious. Everyone is drawn towards your
inner and outer beauty and independent personality. Playful, but secretive.
Very emotional and temperamental sometimes. Meets new people easily and very
social in a group. Fearless and independent. Can hold their own. Stands out
in a crowd. Essentially very smart. Usually, the greatest men are born in
this month. If you ever begin a relationship with someone from this month,
hold on to them because their one of a kind.
*Dec *
This straight-up means you are the most good-looking person possible...
Better than all of these other months! Loyal and generous. Patriotic.
Competitive in everything. Active in games and interactions. Impatient and
hasty.. Ambitious. Influential in organizations. Fun to be with. Easy to
talk to, though hard to understand. Thinks far with vision, yet complicated
to know. Easily influenced by kindness. Polite and soft-spoken. Having lots
of ideas. Sensitive. Active mind. Hesitating tends to delay. Choosy and
always wants the best. Temperamental. Funny and humorous. Loves to joke.
Good debating skills. Has that someone always on his/her mind. Talkative.
Daydreamer. Friendly. Knows how to make friends. Abiding. Able to show
character. One guy/girl kind of person. Loveable. Easily hurt. Prone to
getting colds. Loves music. Pretty/handsome. Loves to dress up. Easily
bored. Fussy. Seldom shows emotions. Takes time to recover when hurt.
Sensitive.
Subscribe to:
Posts (Atom)
