Sunday, March 30, 2008

Prophet Muhammad`s (PBUH) Farewell Sermon

(Taken from IslamiCity)

This sermon was delivered by Prophet Muhammad (PBUH) on the Ninth Day of Dhul Hijjah 10 A.H. in the 'Uranah valley of Mount Arafat' (in Mecca).

Audio

AKA: خطبة الوداع

After praising, and thanking Allah he said:

"O People, lend me an attentive ear, for I know not whether after this year, I shall ever be amongst you again. Therefore listen to what I am saying to you very carefully and TAKE THESE WORDS TO THOSE WHO COULD NOT BE PRESENT HERE TODAY.

O People, just as you regard this month, this day, this city as Sacred, so regard the life and property of every Muslim as a sacred trust. Return the goods entrusted to you to their rightful owners. Hurt no one so that no one may hurt you. Remember that you will indeed meet your Lord, and that He will indeed reckon your deeds. ALLAH has forbidden you to take usury (interest), therefore all interest obligation shall henceforth be waived. Your capital, however, is yours to keep. You will neither inflict nor suffer any inequity. Allah has Judged that there shall be no interest and that all the interest due to Abbas ibn 'Abd'al Muttalib (Prophet's uncle) shall henceforth be waived...

Beware of Satan, for the safety of your religion. He has lost all hope that he will ever be able to lead you astray in big things, so beware of following him in small things.

O People, it is true that you have certain rights with regard to your women, but they also have rights over you. Remember that you have taken them as your wives only under Allah's trust and with His permission. If they abide by your right then to them belongs the right to be fed and clothed in kindness. Do treat your women well and be kind to them for they are your partners and committed helpers. And it is your right that they do not make friends with any one of whom you do not approve, as well as never to be unchaste.

O People, listen to me in earnest, worship Allah, say your five daily prayers (Salah), fast during the month of Ramadan, and give your wealth in Zakat. Perform Hajj if you can afford to.

All mankind is from Adam and Eve, an Arab has no superiority over a non-Arab nor a non-Arab has any superiority over an Arab; also a white has no superiority over black nor a black has any superiority over white except by piety and good action. Learn that every Muslim is a brother to every Muslim and that the Muslims constitute one brotherhood. Nothing shall be legitimate to a Muslim which belongs to a fellow Muslim unless it was given freely and willingly. Do not, therefore, do injustice to yourselves.

Remember, one day you will appear before Allah and answer your deeds. So beware, do not stray from the path of righteousness after I am gone.

O People, no prophet or apostle will come after me and no new faith will be born. Reason well, therefore, O People, and understand words which I convey to you. I leave behind me two things, the QURAN and my example, the SUNNAH and if you follow these you will never go astray.
All those who listen to me shall pass on my words to others and those to others again; and may the last ones understand my words better than those who listen to me directly. Be my witness, O Allah, that I have conveyed your message to your people".



And here I am conveying the message to you, for those who didn't hear it before.
Read more...

Footnotes from floats in LaTeX: problem & solution

(Excerpted from Rhaptos Software Development )

LaTeX has floating environments, of which tables and figures are the most important. Footnotes from within those environments are problematic.

The LaTeX engine will by default move floats around, even onto different pages, in order to achieve optimal horizontal and vertical page layouts. Human book editors and typesetters do the same thing when preparing books for press.

Because of the way the LaTeX engine handles floats, footnotes from within them are problematic. In the normal case, the author inserts a \footnote{} command with the footnote text within the curly braces into the text at the point where the footnote marker should appear:

Example:

This is my blog\footnote{Actually, it is hosted at Google} site.

However, if the author is making a footnote from within a float environment, one inserts a \footnotemark command into the text in the float at the point where the footnote mark should appear, and then after the end of the float, one tacks on a \footnotetext{} command with the text of the footnote in it:

\begin{figure}
\includegraphics{blorgy.png}
\caption{This figure caption has a footnote.\footnotemark}
\end{figure}
\footnotetext{This is the text of the footnote.}

The \footnotemark command increments the footnote counter, so if you have more than one \footnotemark before the \footnotetext{} commands, you have to set the footnote counter back so that the first \footnotetext{} doesn't get the count of the last \footnotemark.

\begin{figure}
\includegraphics{blorgy.png}
\caption{This figure caption has a footnote.\footnotemark}
In fact, it has two.\footnotemark
\end{figure}
\addtocounter{footnote}{-2}
\stepcounter{footnote}\footnotetext{This is the text of the first footnote.}
\stepcounter{footnote}\footnotetext{This is the text of the second footnote.}


And that's it.
Read more...

Saturday, March 29, 2008

Health - Important Tips

I got this by email (thanks uncle Alaa), please comment if you find anything untrue.
  1. Answer the phone by LEFT ear.
  2. Do not drink coffee Twice day.
  3. Do not take pills with COOL water.
  4. Do not have HUGE meals after 5pm.
  5. Reduce the amount of OILY food you consume.
  6. Drink more WATER in the morning, less at night.
  7. Keep your distance from hand phone CHARGERS.
  8. Do not use headphones/earphone for LONG period of time.
  9. Best sleeping time is from 10pm at night to 6amin the morning.
  10. Do not lie down immediately after taking medicine before sleeping.
  11. When battery is down to the LAST grid/bar, do not answer the phone as the radiatiion is 1000 times.

Read more...

Tuesday, March 25, 2008

I love Egypt, but...

Do I love Egypt? I have to love my country. So why they imprisoned me for a whole year plus 45 days as a soldier? I wish I have practiced something useful when fighting comes. Instead I practiced writing letters, cleaning bathrooms and even electing good bean and rice particles to cook.

I still love Egypt, I have to. So why they took my driving license today? Should this solve corruption? Is this the only possible way to raise our country instead of busting rich thieves? Does everyone in his vehicle wrap his seat belt? Or it was only because I am long-bearded and my wife is wearing black?

I still love Egypt, but 26 years are enough and Egypt is not Syria!
Read more...

Monday, March 24, 2008

OpenFire: a Java Jabber/XMPP server

OpenFire is an open source project from igniterealtime. It is an IM (Instant Messaging) server that can be installed on any
corporate private network to provide IM solutions to its community. It uses the popular Jabber/XMPP protocol so you can communicate with it through almost any multi-protocol IM client (Pidgin for example). It has a counterpart IM client, Spark.

OpenFire has many plugins that extend its functionality. Examples are IM Gateway, SIP phone, Content Filter... The IM Gateway enables you to connect to other networks (Yahoo! IM, MSN, Google Talk, ...). Support for such protocols in a Jabber server is a built-in functionality in the XMPP (Extensible Messaging and Presence Protocol) itself. In an XMPP server you may broadcast any number of services so that your XMPP clients can perform service discovery and "register" in such services. Once they are registered, they can "log in" and "log out" from services through the XMPP exchange. Services may add/remove to registered users' rosters (contact-lists). You can send/receive messages to/from your roster contacts. All of this through the XMPP XML messages. The XMPP server takes the responsibility of implementing service-specific protocols, on behalf of clients.

Building on this, OpenFire created the Gateway IM plugin that implements famous IM protocols: Yahoo!, MSN, GTalk, ICQ,... You can implement your own protocol and configure the plugin to broadcast it as a service. Your Jabber clients can discover such new service and log in to their favorite networks without touching the client.
Read more...

LaTeX problem: Integrating ArabTeX with LLNCS

LaTeX, the typesetting system enables you to produce high-quality documents with less effort. Read more in my other post about LaTeX. On submitting to a conference, I had to work with their class files so I used \documentclass{llncs}. They use LaTeX Lecture Notes in Computer Science (llncs) from Springer.

In the same document, I use ArabTeX package to render Arabic characters. When I applied both packages I found that section numbers disappered! So instead of "1. Introduction" and "1.2 Title" I got "Introduction" and "Title". After spending an hour or two I found that ArabTeX redefines the section formatting command \section using \renewcommand in asect.sty. So I disabled the inclusion of such file in apatch.sty by commenting the following:

%\UsePackage {asect} % load LaTeX extensions for Arabic sections.

For a normal LaTeX installation, all files exist in /usr/share/texmf/tex/latex/arabtex/
I don't know who will ever make use of this piece of information, just spreading the word. Let Google help me in that!
Read more...

TeX, LaTeX, LyX: Authors kit and more

If you are related to IT and computer industry, most probably you heard about these terms. Its all about documents preparation. If you have used Microsoft Word (sorry, no hyperlink here) or OpenOffice.org then you have already practiced with document processing systems.

So what is the difference between document preparation and processing? The latter are WYSIWYG systems. You take care of everything to see it as you want to get it. It is a convinient matter for small documents. However, if you are preparing a technical paper or a thesis then those won't save you much. In such complex documents you include figures, tables, complex equations and refer to them by numbers. You include a lot of citations and footnotes. You may even number your pages in different manners in the same document. You don't want to track such numberings so that moving any section around won't mess with the numbers.

You might say Word supports many such features. In Word you have to format eveything, nevertheless you may select styles to be applied to different sections. Changing the format of the style will make you pass over all formatted instances. On the contrary, in TeX, the typesetting system, you only define your logical structure instead of formatting constructs. You define \title, \author, \chapter, \section, \subsection... and the TeX (or LaTeX) compiler will take care of the formatting according to \documentclass, whether it is book, article, CV or whatever.

If you aim at posting your paper to a technical conference, you have to abide to formatting rules of the conference. This is simply done by downloading the class files specific to that conference (usually available at the conference site) and including them in your document. Just run the LaTeX compiler and you instantly have a PostScript/PDF conforming to the conference style.


TeX, LaTeX? What is the difference? TeX is a macro language invented by Donald Knuth in the late 1970s It include simple commands to define logical structure and formatting. It is something like assembly code, noboy writes in TeX. LaTeX is a bundle of macro definitions that abstracts TeX in easy-to-write macros (\section, \title, ...). You write your documents in LaTeX and run the LaTeX compiler to generate DVI (DeVice Independant) files that can be viewed with Evince or KDVI. You may run dvips to generate PostScripts or pdflatex directly on the LaTeX source to generate PDFs. There are many other ways to convert between such formats.

Another reason why Word is not adequate for complex documents is that it may even crash! I know examples where some MS Office documents crashed when became quite complex. They left their owner with locked documents that are rendered useless.
MS Office stands against openness. When you write your docuemtns in Word and send them to others, you are urging them to purchase Microsoft products to see your "closed-format" document. OpenOffice could be a solution, but Microsoft deliberately changes its format almost from version to version. You may read more about this format conflict.

For LaTeX newbies, it is not easy to be productive. You have to be very familiar with LaTeX to play with it. LyX is a front-end software for LaTeX. It is WYSIWYM, as they claim: What You See Is What You Mean! You define logical structure through menus, toolbars and keyboard shortcuts and you instantly get an immediate near-preview of the format. LyX has a special language syntax (TeX, LaTeX and LyX all store files in ASCII format and can be edited with any usual text editor). However, you can export your document in LaTeX, PS, PDF,... etc.

My experience with such tools suggests boot-straping with LyX as a fast startup with TeX. The more you work, the more you know about LaTeX. At a certain stage, when you find LyX restrictive, you will export in LaTeX and continue writing in LaTeX. You may Kile for that to autocomplete commands and easily generate DVIs and PostScripts.


Read more...