Monthly Archives: January 2014

In Islam Women are less intelligent than men

Here is the proof

Volume 1, Book 6, Number 301 :
Narrated by Abu Said Al-Khudri
Once Allah’s Apostle went out to the Musalla (to offer the prayer) o ‘Id-al-Adha or Al-Fitr prayer. Then he passed by the women and said, “O women! Give alms, as I have seen that the majority of the dwellers of Hell-fire were you (women).” They asked, “Why is it so, O Allah’s Apostle ?” He replied, “You curse frequently and are ungrateful to your husbands. I have not seen anyone more deficient in intelligence and religion than you. A cautious sensible man could be led astray by some of you.” The women asked, “O Allah’s Apostle! What is deficient in our intelligence and religion?” He said, “Is not the evidence of two women equal to the witness of one man?” They replied in the affirmative. He said, “This is the deficiency in her intelligence. Isn’t it true that a woman can neither pray nor fast during her menses?” The women replied in the affirmative. He said, “This is the deficiency in her religion.”

Volume 2, Book 24, Number 541 :
Narrated by Abu Said Al-Khudri
On ‘Id ul Fitr or ‘Id ul Adha Allah’s Apostle (p.b.u.h) went out to the Musalla. After finishing the prayer, he delivered the sermon and ordered the people to give alms. He said, “O people! Give alms.” Then he went towards the women and said. “O women! Give alms, for I have seen that the majority of the dwellers of Hell-Fire were you (women).” The women asked, “O Allah’s Apostle! What is the reason for it?” He replied, “O women! You curse frequently, and are ungrateful to your husbands. I have not seen anyone more deficient in intelligence and religion than you. O women, some of you can lead a cautious wise man astray.” Then he left. And when he reached his house, Zainab, the wife of Ibn Masud, came and asked permission to enter It was said, “O Allah’s Apostle! It is Zainab.” He asked, ‘Which Zainab?” The reply was that she was the wife of Ibn Mas’ub. He said, “Yes, allow her to enter.” And she was admitted. Then she said, “O Prophet of Allah! Today you ordered people to give alms and I had an ornament and intended to give it as alms, but Ibn Masud said that he and his children deserved it more than anybody else.” The Prophet replied, “Ibn Masud had spoken the truth. Your husband and your children had more right to it than anybody else.”

Drinking in Islam

One sahabi used to drink frequently and would frequently get lashed

Volume 8, Book 81, Number 771 :
Narrated by ‘Umar bin Al-Khattab
During the lifetime of the Prophet there was a man called ‘Abdullah whose nickname was Donkey, and he used to make Allah’s Apostle laugh. The Prophet lashed him because of drinking (alcohol). And one-day he was brought to the Prophet on the same charge and was lashed. On that, a man among the people said, “O Allah, curse him ! How frequently he has been brought (to the Prophet on such a charge)!” The Prophet said, “Do not curse him, for by Allah, I know for he loves Allah and His Apostle.”

Muslim and sheeps

A time will come will Muslim will flee from prosecution to hight moutons and valleys with she eps and sheeps will be their best friend.

Volume 1, Book 2, Number 18 :
Narrated by Abu Said Al-Khudri
Allah’s Apostle said, “A time will come that the best property of a Muslim will be sheep which he will take on the top of mountains and the places of rainfall (valleys) so as to flee with his religion from afflictions.”

List all worker processess in IIS

run as adminIf you hit ctrl+alt+del, you will notice one ore many w3wp process. Each of these correspond to a different site (or Application Pool). In Windows Task Manager, you cannot judge which process is associated with which site. You can issue the following command to find that out. Copy and past the following in command Window. Make sure you start cmd in Administrator mode otherwise you will get an error

c:\Windows\System32\inetsrv\appcmd list wp

Or you can changed directory first and issue the same command

cd \Windows\System32\inetsrv.
appcmd list wp

If you did not start cmd prompt in administrator mode, you will end up getting this error

message:The WAS service is not available – try starting the service first

Quartz.net Example in ASP.NET

This is simple web based ASP.NET project that uses Quartz.net to send email every 30 seconds. This project can be used for testing Quartz.net on your local environment.

The project uses Log4Net also but that is not fully functional. The Solution consists of two projects

1. We based Application (website)
2. A model (A DLL based project)

Quartz.net is configured in the model. The application calls the model class method to initiate the job.

Download the project QuartzWebProject (1.7MB)

How to add Global.asax in ASP.NET

This question and this post talks about Global.asax template missing in Visual Studio. I have a similar problem in Visual Studio 2012. What you can do is download the default templates templates of Global.asax file and add it to the project. Simply download and copy it to the project. Then choose right click “Add Existing”, select the two files and you are done.

Global.asax template download (1KB)

Make sure you change the namespace in this file to what you are using in your project.

English Words that often pronounced wrong by pakistani people

Negotiable
Correct: Negooshiable, Wrong: Negoshiaable
contributor
Correct: Coontributor , Wrong:Contribuutor
Dependency
Correct: De-Pen-den-cy , Wrong:dee-pen-Den-cy
Declarative
Correct: De-cle-re-tiv , Wrong:da-cle-raa-tive
Integration
Correct: In-teg-raa-tion , Wrong:in-tig-raa-tion
Organization
Correct: or·gan·i·za·tion , Wrong:Oor-gun-nii-za-tion
Parameter
Correct: Par-Raa-Mi-Ter , Wrong:Para-meeeter
Divert
Correct: da-vert , Wrong:dye-vert
diameter

Correct:di-ahh-me-ter, wrong: dia-meeeter
Molecular
correct:’Mo-‘lic-o-‘lar, incorrect: Moo-li-‘cuu-lar
Customization

Correction:cus·tom·i·za·tion, wrong: cus·to·my·za·tion
JQuery

Correction:’Jay-queer-ee, wrong: jay-‘Query

xampp htaccess on mac

I searched quite a bit for this topic, but did not find any solid help where I can setup htaccess file locally on xampp on a site that is siting in htdocs folder. The following are the tips to setup htaccess properly on mac

  1. HTACCESS need to be put in htdoc folder. In previous version of XAMPP this would usually be installed in /users/{username}/sites/. In the latest version 1.8.3, this folder is in /Applicatoiin/Xampp/xamppfiles/htdoc/ folder.
  2. The name of the file should be .htaccess, not htaccess
  3. You can edit the file in any editor. I used textmate. Sometime basic editor may not work because in /Applications/ folder you need an editor which can handle permissions. Ordinary editors did not work for me.
  4. You do not need to edit anything else, provided it is all setup rightly (as of Exampp 1.8.3)
  5. A sample rewrite file looks like this, at least for me
    RewriteEngine On
    
    RewriteBase /demo
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^review/(.*)$ review.php?id=$1 [NC,QSA,L]

    Here the /demo/ folder is sitting in /htdocs/. /htdocs/ is the root folder.

I have seen one problem so far. The images do not load after using .htaccess. I have to change path of each image to full path. For example it used to be ./images/image1.jpg, but now I have to change it to /demo/images/image1.jpg. I will try to find a fix for that problem and update it here.

Solution: The reason the images do not load is probably because of the fact that my site is setup in htdocs folder and notas an independent site (Virtual Host). One setup as independent site, this problem will go away.

While writing this article, I got help from this SO question

HTACCESS in Virtual Host on XAMPP Mac

If you are setting up htaccess inside a virtual hosted site, the above step apply with the following modifications.

  1. .HTACCESS (not htaccess) file needs to sit the directory where the site is hosted. In this case not not to be in htdoc folder but inside the root directory of the website.
  2. You may need to add the following line to HTTPD-VHOST.conf file
    <VirtualHost *:80>
        ServerAdmin /Projects/Git/mysite.co
        DocumentRoot "/Projects/Git/mysite.co"
        ServerName mysite.git
    	ServerAlias mysite.git
        ErrorLog "/Projects/Git/mysite.co/logs/example.com-error_log"
        CustomLog "/Projects/Git/mysite.co/logs/example.com-access_log" common
    	<Directory "/Projects/Git/mysite.co">
    	        Allow from all
    		AllowOverride All     <----- This line is important
    	        Require all granted
    	</Directory>
    </VirtualHost>

How to test HTACCESS

The following htaccess can be used to test if your htaccess is being hit at all. Basically any url inside will be pointed to index.html file. For exmaple
www.helloworld.com
www.helloworld.com/just-a-test
www.hellowworld.com/test.php

All of the above will be pointed to index.html, if it exists.

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index2.html [NC,QSA,L]