Friday, August 24, 2012

Hazrat Moses, Butcher and a mother's Prayer

Once Prophet Musa (a.s.) asked Allah (SWT) that who would be my neighbor in Heaven (Jannat). Allah replied that it would be that butcher…..

Prophet Musa (a.s.) was quite surprised and went to search for that butcher. He saw that the butcher was busy selling meat in his shop. At his day end he wrapped a piece of meat in clothe and returned home. To find out more about his house he pretended to be his guest for the night and the butcher readily accepted.

After reaching home he cooked the meat baked some bread and soaked the bread in the dish and went into a room where an extremely old lady was laying on the bed. With much effort he raised the old women from the bed and gave her food bite by bite. When he had finished serving the food he wiped her face. The old woman then said something in the butcher’s ears which made him to smile and laid her back on the bed and came out of the room.

Prophet Musa who was watching all this, asked the butcher, “who is this lady and what did she say in your ears that brought a smile on your face?”

The butcher replied, “O stranger, she is my mother. The first thing I do after returning home is to serve her. She gets pleased everyday and prays that may Allah make me the neighbor of Prophet Musa in Jannah, and on this I smile, look at my status and the status of Musa Kaleem ul Allah."


We Read in Surah Al-Israa, Ayah Number 23-24,

وَقَضَى رَبُّكَ أَلاَّ تَعْبُدُواْ إِلاَّ إِيَّاهُ وَبِالْوَالِدَيْنِ إِحْسَانًا إِمَّا يَبْلُغَنَّ عِندَكَ الْكِبَرَ أَحَدُهُمَا أَوْ كِلاَهُمَا فَلاَ تَقُل لَّهُمَا أُفٍّ وَلاَ تَنْهَرْهُمَا وَقُل لَّهُمَا قَوْلاً كَرِيمًا
And your Lord has commanded that you shall not serve (any) but Him, and goodness to your parents. If either or both of them reach old age with you, say not to them (so much as) "Ugh" nor chide them, and speak to them a generous word.

وَاخْفِضْ لَهُمَا جَنَاحَ الذُّلِّ مِنَ الرَّحْمَةِ وَقُل
رَّبِّ ارْحَمْهُمَا كَمَا رَبَّيَانِي صَغِيرًا

And make yourself submissively gentle to them with compassion, and say: O my Lord! have compassion on them, as they brought me up (when I was) little.
May god Give us Taufeeq to serve our Parents throughout our life time, Aameen.

Thursday, May 17, 2012

Grow Great By Dreams

Grow Great By Dreams

The question was once asked of a highly successful businessman, "How have you done so much in your lifetime?"
He replied, "I grow great by dreams. I have turned my mind loose to imagine what I wanted to do. Then I have gone to bed and thought about my dreams. In the night I dreamt about my dreams. And when I awoke in the morning, I saw the way to make my dreams real. While other people were saying, 'You can't do that, it is impossible,' I was well on my way to achieving what I wanted."

Once Woodrow Wilson, 28th President of the U.S., said: "We grow great by dreams. All big men are dreamers."

People see things in the soft haze of a spring day, or in the red fire on a long winter's evening. Some of us let these dreams die, but others nourish and protect them; nourish them through bad days until they bring them to the sunshine and light which comes always to those who sincerely hope that their dreams will come true.

So please, don not let anyone steal your dreams, or try to tell you they are too impossible.

"Sing your songs, and dream your dreams, hope your hope and pray your prayer."

Story about Success - Socrates

Story about Success - Socrates

Have you read about the secret success stories? Here we will tell you one interesting story.
A young man asked Socrates the secret to success. Socrates told the young man to meet him near the river the next morning .They met. Socrates asked the young man to walk with him toward the river. When the water got up to their neck, Socrates took the young man by surprise and ducked him into the water. The boy struggled to get out but Socrates was strong and kept him there until the boy started turning blue.
Socrates pulled his head out of the water and the first thing the young man did was to gasp and take a deep breath of air. Socrates asked: " What did you want the most when you were there?" The boy replied: "Air." Socrates said: "That is the secret to success. When you want success as badly as you wanted the air, then you will get it. There is no other secret."
The motivation to succeed comes from the burning desire to achieve a purpose. Napoleon Hill wrote: " Whenever the mind of man can conceive and believe, the mind can achieve."
A burning desire is the starting point of all accomplishment. Just like a small fire cannot give much heat, a weak desire cannot produce great results.

Hereafter in Islam : Preparing for the Hereafter

Once a man saw in his dream, that a lion was chasing him.
The man ran to a tree, climbed on to it and sat on a branch. He looked down and saw that the lion was still there waiting for him.
The man then looked to his side where the branch he was sitting on was attached to the tree and saw that two rats were circling around and eating the branch. One rat was black and the other one was white. The branch would fall on the ground very soon.
The man then looked below again with fear and discovered that a big black snake had come and settled directly under him. The snake opened its mouth right under the man so that he will fall into it.

The man then looked up to see if there was anything that he could hold on to. He saw another branch with a honeycomb. Drops of honey were falling from it.
The man wanted to taste one of the drops. So, he put his tongue out and tasted one of the fallen drops of honey. The honey was amazing in taste. So, he wanted to taste another drop. As he did, he got lost into the sweetness of the honey.
Meanwhile, he forgot about the two rats eating his branch away, the lion on the ground and the snake that is sitting right under him.
After a while, he woke up from his sleep.
To get the meaning behind this dream, the man went to a pious scholar of Islam. The Islamic scholar who interpret the dream said, the lion you saw is your death. It always chases you and goes wherever you go.
The two rats, one black and one white, are the night and the day. Black one is the night and the white one is the day. They circle around, coming one after another, to eat your time as they take you closer to death.
The big black snake with a dark mouth is your grave. It's there, just waiting for you to fall into it.
The honeycomb is this world and the sweet honey is the luxuries of this world. We like to taste a drop of the luxuries of this world but it's very sweet. Then we taste another drop and yet another.

Meanwhile, we get lost into it and we forget about our time, we forget about our death and we forget about our graves.
This Life is Material, and the Hereafter is Far Better and everlasting:
According to Islam, this life is very short and full of material things that can get in the way of our submission to Almighty Allah (SWT). It's not wrong to have these material possessions as long as we remember our obligations to Almighty Allah (SWT) and thank Him for those things. We shouldn't get preoccupied with this temporary worldly life and forget Hereafter.
It is narrated that Holy Prophet Muhammad (saww) has said:

"Most intellectual of man is he remembers the death most."

It is also narrated that Holy Prophet Muhammad (saww) has said:

"One who gains the love and grace of Allah (SWT), always end (Ajal) will be before his eyes and he will be always worried about his death. But the one who take Satan (Shaitan) as a friend and becomes Bad-Bakht. Shaitan overpowers him and indulge (Giraftaar) him in long long desires and them he never remember death."

The famous poet Longfellow calls human footprints sublime on the 'sands of time' while writer Margaret Mitchell declares generations will be 'gone with the wind'. The Ancient Greeks believed that the human race was like a bird, that came from a dark passage and flew away in another dark tunnel, with a momentary stay in a bright room, which they believed was our world.

[Taken completely from http://www.ezsoftech.com/stories/mis11.asp#islam]

Sunday, July 31, 2011

Don't We All


I was parked in front of the mall wiping off my car. I had just come from the car wash and was waiting for my wife to get out of work. Coming my way from across the parking lot was what society would consider a bum. From the looks of him, he had no car, no home, no clean clothes, and no money.
There are times when you feel generous but there are other times that you just don’t want to be bothered. This was one of those “don’t want to be bothered times.”
“I hope he doesn’t ask me for any money,” I thought. He didn’t.
He came and sat on the curb in front of the bus stop but he didn’t look like he could have enough money to even ride the bus. After a few minutes he spoke. “That’s a very pretty car,” he said. He was ragged but he had an air of dignity around him. His scraggly blond beard keeps more than his face warm. I said, “Thanks,” and continued wiping off my car. He sat there quietly as I worked. The expected plea for money never came.
As the silence between us widened something inside said, “Ask him if he needs any help.”
I was sure that he would say “yes” but I held true to the inner voice.
“Do you need any help?” I asked.
He answered in three simple but profound words that I shall never forget. We often look for wisdom in great men and women. We expect it from those of higher learning and accomplishments.
I expected nothing but an outstretched grimy hand. He spoke the three words that shook me.
“Don’t we all?” he said.
I was feeling high and mighty, successful and important, above a bum in the street, until those three words hit me like a twelve gauge shotgun. Don’t we all?
I needed help. Maybe not for bus fare or a place to sleep, but I needed help. I reached in my wallet and gave him not only enough for bus fare, but enough to get a warm meal and shelter for the day. Those three little words still ring true. No matter how much you have, no matter how much you have accomplished, you need help too. No matter how little you have, no matter how loaded you are with problems, even without money or a place to sleep, you can give help.
Even if it’s just a compliment, you can give that. You never know when you may see someone that appears to have it all. They are waiting on you to give them what they don’t have. A different perspective on life, a glimpse at something beautiful, a respite from daily chaos, that only you through a torn world can see. Maybe the man was just a homeless stranger wandering the streets.
Maybe he was more than that. maybe he was sent by a power that is great and wise, to messenger to a soul too comfortable in themselves. Maybe God looked down, called an Angel, dressed him like a bum, and then said, “Go messenger to that man cleaning the car, that man needs help.” Don’t we all?
“.....Even a smile can be charity.....” Holy Prophet Muhammad (Peace be upon him)"

Sunday, July 10, 2011

Linq to Sql/Entities Table values using Reflection

The following function takes input table name, data field column name and data value column name and returns list of ListItem so developer can use this list in dropdown and other list control. the following function uses reflection to access table and column for values.

 public List<ListItem> GetListOfValue(string dataFieldName, string dataFieldValue, string tableName)  
{
List<ListItem> listItemList = new List<ListItem>();
ListItem listItem = null;
MetaTable table = _dataContext.Mapping.GetTables().Where(t => t.TableName.ToUpper().Equals("DBO." + tableName.ToUpper())).FirstOrDefault();
if (table == null)
throw new NullReferenceException("table");
ITable iTable = _dataContext.GetTable(table.RowType.Type);
if (iTable == null)
throw new NullReferenceException("iTable");
List<object> objectList = iTable.OfType<object>().ToList();
foreach (object obj in objectList)
{
listItem = new ListItem();
foreach (PropertyInfo property in obj.GetType().GetProperties())
{
if (property.Name.ToUpper().Equals(dataFieldName.ToUpper()))
{
listItem.Text = property.GetValue(obj, null).ToString();
}
if (property.Name.ToUpper().Equals(dataFieldValue.ToUpper()))
{
listItem.Value = property.GetValue(obj, null).ToString();
}
}
listItemList.Add(listItem);
}
return listItemList;
}

Thursday, July 7, 2011

Request.QueryString Extension Method

Below are two extension methods that I have created for Request.QueryString.. as I am passing many parameters and playing with querystring a lot and every where i had to put IF condition for null and other things..

In order save myself from checking and validating again and again i have designed these two extension Method using some help from internet to save time and reduce number of lines of code.. kindly check them and you are welcome to criticize in constructive way.

I have some more functions in my mind to overload for Request.QueryString and will add later As following two functions have fulfilled my need

How to use..
byte? valueByte  
Guid? valueGuid

//check if "Server" key exits if yes then return value else return default value of null that we have passed

valueByte = Request.QueryString.GetValue<byte?>(Constants.FilterServer, null);
valueGuid = Request.QueryString.GetValue<Guid?>(Constants.FilterGuid, null);

//checks if "Server" Key exists then out value to provided variable and return true to if condition, else return false and assign default value to provided out variable
if(Request.TryParse<byte?>(Constants.FilterServer, null, out valueByte)){}

if(Request.TryParse<Guid?>(Constants.FilterGuid, null, out valueGuid)){}



public static T GetValue<T>(this NameValueCollection collection, string key, T defaultValue)
{
if (collection == null)
{
throw new ArgumentNullException("collection");
}
var value = collection[key];
if (value == null) { return defaultValue; }
var converter = TypeDescriptor.GetConverter(typeof(T));
if (!converter.CanConvertFrom(typeof(string))) {
throw new ArgumentException(String.Format("Cannot convert ' {0} ' to {1} ", value, typeof(string))); }
return (T)converter.ConvertFrom(value); }


public static bool TryParse<T>(this NameValueCollection collection, string key, T defaultValue, out T returnValue)
{
returnValue = default(T);
try
{ if (collection == null) {
throw new ArgumentNullException("collection"); }
var value = collection[key];
if (value == null)
{ return false;}
var converter = TypeDescriptor.GetConverter(typeof(T)); if (!converter.CanConvertFrom(typeof(string)))
{ throw new ArgumentException(String.Format("Cannot convert ' {0}' to {1} ", value, typeof(string))); }
returnValue = (T)converter.ConvertFrom(value);
return true; }
catch (ArgumentNullException ex) { return false;}
catch (ArgumentException ex) { return false;}
catch (NotSupportedException ex) {return false;} }