Skip to main content

Posts

Showing posts from April, 2009

Karen Spärck Jones

I would like to introduce this distinguished scientist from my personal experience as I was a PhD student of John I. Tait who was a PhD student of Karen Spärck Jones.

When I started my PhD studies I asked John Tait about new references in the field of cross language information retrieval (CLIR), he told me to go to the library and look for a book called Synonymy and Semantic Classification.

I went to the library and found the book, the book was old issued in 1986 for a PhD thesis wrote in 1964 as I remember. I thought that John Tait made a mistake, and at that time I did not know who Karen Sparck Jones is.

I took the book back home and started reading, I couldn't stop reading the book until I fall into sleep. I figured out that this book was written by a distinguished person.

After few days I had a meeting with John Tait and I told him do you remember the book that you advised me to read? He told me yes what about it? I told him it is an excellent book, the best I ever read. He told m…

Swine Influenza - Swine Flu

Introduction

Swine Influenza is a group of influenza viruses that affect pigs. There are four main types of it, but like all human influenza viruses, swine influenza viruses change constantly.

Human infections are uncommon, but have occurred in the past. Human infections with swine flu are more common in individuals who have direct exposure (close contact) with pigs.

The new strain that began circulating in April 2009 can move from person to person, and so more people than usual are being infected.

If a swine flu virus mutates to a form that can move from person-to person , it is likely to spread in the same ways traditional seasonal flu spreads between people. It's called “droplet” spread. When an infectious individual coughs, sneezes, talks, etc. they expel contaminated droplets. If these droplets get into someone else's mouth, eyes or nose, that person can become infected with the flu.

This is why personal hygiene is critical to staying well.

Definition

Swine influenza (also calle…

Why autosuggest field in coldfusion doesn't work with Firefox

I have faced this problem and it took me awhile to figure out what was the problem, while the same code worked find on Explorer but didn't on Firefox.

It looks that Firefox is sensitive to the structure of how you write your code, so you must well format your form tags and other html tags.

In my case I included the cfform inside the html table while I shouldn't do this I should start by the cfform then the table, please see the code below:

<cfform format="html" method="post" action="">
<table width="50%" align="center" border="0">
<tr><td class="text3">Member:
<cfinput name="username" type="text" autosuggest="#list#" label="Username:" size="30"/></td>
<td class="text3"><cfinput name="submit" type="submit" value="Show User"/></td></tr>
</table>
</cfform>


The #…

How to redirect web URL in PHP, Coldfusion and HTML

web page redirection is very common in web development, so for instance if some tried to access a paged without a valid authenticated session he will be redirected to a login page. Also if you move your site from a place to another you need to redirect traffic that goes to the old one to move to the new one.

How to redirect to another URL?

In coldfusion:

In coldfusion you have to use the following tag, please change the url in the cfset below to the URL you want to redirect the traffic to:
<cfset url="http://blog.abusalah.info">
<cflocation url="#url#">

In PHP see the code below, please note to change the URL to the url you want to redirect to:
<?php
$URL="http://blog.abusalah.info";
header("Location: $URL");
?>

In both Coldfusion and PHP when the redirection code is found the page will stop processing and will redirect the traffic. So if the tags are on the top of the page the anyother code in the page will be ignored, but if the code wa…

Arabs In London

I was not able to watch Arabs in London episodes during the last holy month of Ramadan. I watched it recently on MBC. I was really impressed by the performance of some actors and actresses. The most impressive one was Mais Hamdan who was able to present the Palestinian accent efficiently.

This TV series was written and directed by Anwar Qawadri a Syrian director who studied and lived in London.

The below video is about 8 minutes show when Sami finds out that his friend Eddy (Adnan) passed away.

Tour to Barcelona

We spent our Easter holiday in Barcelona and this was an advise from a colleague. I found Barcelona a friendly city and a good destination for families with small kids.

Barcelona has currently the biggest Aquarium in Europe (L'aquarium De Barcelona), while I knew recently that a new bigger aquarium is being build in Crete.

The aquarium lies on Barcelona beach and you can find there a shopping center (mall) also a teleferic tower (Telefèric de Montjuïc) is very close that takes you the the magic mountain.

The kids enjoyed Barcelona zoo, a family can spend a whole day there and enjoy the dolphin show and there is a great playground in addition to electrical cars and horse riding.

The Zoo is located in the biggest park in Barcelona (Parc de La Ciutadella), in this park you can hire a boat and cruise with the kids in the lake. Also the park has many activities especially on Saturdays where kids can enjoy face drawings etc. The park has also a lot of playgrounds.

You can also enjoy shopping…

How to Build RSS 2.0 Feed in Coldfusion 8

In this tutorial I will show some tips on how to create an RSS Feed in coldfusion by querying a Database.

This example will demonstrate how to create an RSS Feed for the quote of the day.

< cfquery name="qname" datasource="dbsource" maxrows="3">
SELECT PUBDATE,DESCR,FTITLE,LINK FROM wiki.url.rssfeed order by id desc
</cfquery>
<!--- Note here the query returns only the last three quotes and also it is sorted based on the id which is an auto increment ID.--->
<cfscript>
myStruct = StructNew();
mystruct.link = "http://blog.abusalah.info";
myStruct.title = "Mustafa Abusalah Quote of the Day";
mystruct.description = "Quote of the Day Tutorial";
mystruct.pubDate = Now();
mystruct.version = "rss_2.0";

<!--- Now the Query columns must be mapped to the RSS columns this is done by creating a struct and mapping them to the struct variables. Please not that the fields must be written in capital letters don't …

Mode Component (class) in Coldfusion

In statistics, the mode is the value that occurs the most frequently in a data set or a probability distribution. In some fields, notably education, sample data are often called scores, and the sample mode is known as the modal score. [1]

The code below will find the mode value in a non sorted array.

Save the below component with the name mode.cfc in a directory under wwwroot, in my case I save my components in a directory called classes:
<cfcomponent>
<cffunction name="getMode" access="public" returntype="string">
<cfargument name="amode" type="array" required="true">
<cfset oldcount=0><cfset oldtemp=0>
<cfloop from="1" to="#arrayLen(amode)-1#" index="i">
<cfset temp=amode[i]>
<cfset count=1>
<cfloop from="#i+1#" to="#arrayLen(amode)-1#" index="j">
<cfif temp is amode[j]&…