Issam Alameh's Blog

Blogging My Mind

Playing Chess in a Hypermarket

Playing Chess in a Hypermarket
By Issam Alameh

Life is a story. The actors might change, but the story seldom does.

Once upon a time, He and Somebody (whom sometimes likes to be called himself) went shopping.

He and Somebody had their own plans and objectives.

He wanted to have a respectful life regardless of the money he makes.

Somebody wanted to make money regardless of his life.

Like everyone else, they must enter this specific hypermarket,

He asked for the rules. He learned that ‘Chess Rules Apply’

Somebody, on the other hand, chose not to ask about the rules. Somebody thought himself can play his own rules.

Both entered the hypermarket. Lo and behold the hypermarket’s floor was designed just like the chessboard – large black and white squares positioned alternately with corners touching each other.

He decided to shop for compassion, courage, integrity, respect, forgiveness. He was looking primarily for Reason.

Somebody, on the other hand, did not care about Reason. Good or evil were meaningless to him. For him good and evil were just mere ideas without foundation in reality. For Somebody the best goods to shop for were arrogance, exploitation, separatism, disregard, negativity, rudeness, and unreliability.

He chose to walk always on the white square of this huge chess mat covering the whole hypermarket. He felt good and proud. He could look at everyone in the eyes. He could even see what was underneath and above him. He could see beyond himself. His constant smile made everyone smile at him in return.

Somebody, on the other hand, did not care where his steps led him. Somebody did not notice, however, that himself always seemed to step on the black squares. Somebody did not look at people’s eyes. Somebody just grabbed things that he wanted. Somebody did not hear the children’s cry. Somebody did not notice the other people’s surprise. Somebody’s eyes never left the floor. Somebody only cared about what Somebody wanted.

Somebody never heard the music playing, whose constant refrain was:

Life is a hypermarket,

The rules of chess apply

If you touch it you take it

There is no option to try

He and Somebody did not realize that they had been shopping for years. He looked at his shopping cart. It was filled with friends. A wife and a happy family were looking up with smiles and laughter. His journey through the hypermarket had its ups and downs. Choices had to be made. However He was a believer. With Reason he looked for ways to overcome obstacles without hurting anyone else. He was a good chess player. He reflected on all of the possible steps to take. He anticipated the results of his steps. When he passed by the problems aisle, he stopped to reflect and understand. He used the problems to learn, to become wise, and share what he learned with the other shoppers.

Somebody similarly looked at the shopping cart before him. Somebody likewise had friends who were noisy and rowdy. Somebody did not really know them. All that Somebody cared about was these people: the gang that worked for him in getting what he wanted. Somebody saw his wife and children but they appeared like strangers to him. Somebody saw no smiles on their faces nor laughter from their lips. Ah, but he had shopped for a mistress, who looked up to him from the cart with a seductive smirk and an outstretched hand. Somebody did not really care.

It was time for He and Somebody to leave the hypermarket. There was only one exit and only two cashiers. He took the exit on the right side while Somebody took the left.

The cashier greeted He with a smile and started to punch on the POS machine. Great was the joy of He when the cashier told him that He need not pay from his pocket. He had earned discounts and rewards for the goods that he chose. He even was not fined for the small oversights and extra services he tried to taste.

Somebody on the other side had to dig deep into his pocket and wallet to pay for everything that he placed on the cart. Somebody was fined for the goods himself took and dropped on the floor. Somebody did not receive any discount or rewards. Somebody left the hypermarket poor, wanting, and sad.

Somebody looked at He with envy. As they were leaving the cashier, Somebody asked He how did he earn all those discounts and rewards, while himself, Somebody, was even fined and now had no more money even for his transport home.

He looked at Somebody and whispered: If you had just asked and listened you would have realized that the rules of chess apply in the hypermarket of life!

serving static files with node written using coffeescript

In the previous tutorial we spoke about writing a server using coffeescript and node, however sometimes we need to serve static files from our server, not just respond to requests, and that could be done through ready modules, developed by some smart guys who have been developing node and js for sometime.

I asked my best friend ‘google’ about ‘serving static files with node’ and the second link was a link to node-static https://github.com/cloudhead/node-static, browsing to this, it was very easy this is on git, so i have to clone it

The only command I know and ever needed from git (at least until now) is git clone and followed by the link on github

before cloning the node-static i thought of reading the documentation, as it always contains what is needed to use what it is talking about

node-static has an in-memory file cache, making it highly efficient. node-static understands and supports conditional GET and HEAD requests. node-static was inspired by some of the other static-file serving modules out there, such as node-paperboy and antinode.

sounds what i am looking for, and here is the sample code mentioned in here

var static = require('node-static');

//
// Create a node-static server instance to serve the ‘./public’ folder
//
var file = new(static.Server)(‘./public’);

require(‘http’).createServer(function (request, response) {
request.addListener(‘end’, function () {
//
// Serve files!
//
file.serve(request, response);
});
}).listen(8080);

let us take it piece by piece and transfer it to coffeescript, i know this is not what you usually do as this is what you are going to use (the javascript version) however since i am willing to write all of the additional components of my application in coffeescript (i don’t know yet what would be the application :D ).

first line
var static = require('node-static');

in coffee script there is no var, no semi colon at the end of the line

so this would transfer to

static = require 'node-static'

don’t believe me, go to http://www.coffeescript.org click on TRY COFFEESCRIPT past the above code and check at the equivalent javascript equivalent to the coffee script code and you will get

var static;

static = require(‘node-static’);

pretty awesome, isn’t it.

let us proceed with the above code to transfer it to coffee script

var file = new(static.Server)('./public');
same thing

file = new static.Server './public'

and now the fun starts here

require('http').createServer(function (request, response) {
request.addListener('end', function () {
//
// Serve files!
//
file.serve(request, response);
});
}).listen(8080);

require(‘http’) let us make it a variable points to this require

http = require 'http'

so we can replace the require(‘http’) with it

now we can say

require('http').createServer(function (request, response) {

if we want to write the same we have to do the following

replace function with -> and put the parameters for the function before it and remove the curly braces { and }

it becomes

http.createServer (request, response) ->

try it on try coffee script and you will get
http.createServer(function(request, response) {});

next code
request.addListener('end', function () {

same as we did before

request.addListener 'end', ->

next code
file.serve(request, response);

ends up to be

file.serve request, response

to set a listen on this code we need to give the server created a name so make sure to have “server =” before the http.createServer and last line will be
server.listen 8000

and now http://localhost:8000 will server files in public directory

the full coffee script code will be like this

static = require 'node-static'
file = new static.Server './public'
http = require 'http'
server = http.createServer (request, response) ->
request.addListener 'end', ->
file.serve request, response
server.listen 8000

few things left to mention here, indentation and making node-static available

The indentation is what replace braces in coffee script

whenever you want to run a code in the context of the previous code, indent it with two white space or a tab…
and whenever you want to start a new context start it at the beginning of the line, indentation replace the need for braces.
if you are an expert and you want to explain it in different terms please use the comments in this blog

create a folder where you want to run the server, create a subfolder to have the static files in it and an index.html folder in it with the following content
CoffeeScript is Cool

in the top folder create a file call it server.coffee and put the above coffee script code in it

in the same directory clone the node-static by copying the url in node-static github page it is going to be something like
https://github.com/cloudhead/node-static.git
and type on the terminal window from inside the main folder

git clone https://github.com/cloudhead/node-static.git

if you dig into the new folder created by git, you will find node-static.js inside node-static/lib

change the coffee code line require ‘node-static’ to require ‘node-static/lib/node-static’

run the command

coffee –compile server.coffee

and then issue the node command
node server.js

and browse to http://localhost:8000

Enjoy :)

CoffeeScript and Node.js tutorial

I have been doing a lot of programming in PHP, Perl, Java, Objective-C (has nothing to do with what we are talking about here, but just to mention) and other languages (sometimes python) where i did not really care about the way the informatiojn been sent and received between the client (browser) and the server, until i met Node.

Node had changed the way i think, i found in node what i used to think it should be always in programming languages ‘The Non blocking Code’ (it exist in some but at least not natively in PHP which is used by almost 70% of the database driven websites in the world including wikipedia).

Node is Javascript implementation, or whatever you call it, it runs javascript code on the server side, browsers runs javascript on the client (jQuery, dhtml, html5, svg – google these with javascript) also as javascript being the programming language used by mobile applications developers (check appcelerator for example, that produce native iphone, blackberry and android code from javascript), I thought it is the time to learn javascript as it should.

looking around, skimming few books, and trying javascript and node, i found that i need to focus and i am really lazy about focusing, it takes a lot of brain cells and time, until i met coffeescript.

Coffeescript is fantastic, it has it all, python style, easily readable code, and translates into javascript and last not least it does not produce any overhead.

Being said so, I started reading the documentation in coffeescript.org it is amazing, and the try coffeescript in the page allow you to write coffeescript and see how it looks like in javascript. WAW its helps me learn even javascript.

There are plenty of information around the internet about installing node and coffeescript, so I am going to skip all of this however i will present two links which will help in installing those : http://www.coffeescript.org and http://www.nodejs.org

I will start this tutorial, by showing how we can write a tiny small application (the hello world!) using coffeescript and run it using node.js

First thing first is to understand how web servers works. When a user goes to a website by typing the URL in the browser, the browser sends the information typed in the address box to the webserver and tell the server it finished sending information by sending what node.js translates as ‘end’, so when node sees ‘end’ coming from a web client, it means the web client finished sending information. Once the server receives the request and notified by the bye bye thank you (‘end’), the server will send header information, which tells the browser what type of information (or content) that will be sent as a reply to the request sent by the client and then the content itself then its say bye bye thank you.

One last thing to say here is that the server is a named as a server because it listens to a port and received the requests through it.

Let us translate this into code
Even though the code will end up to be javascript and the documentation is javascript, please follow with me as I am going to read it so i can use it with coffee script.

As programming languages wraps pieces of code together to ease producing applications whenever we need to use any of these pieces of ready code, we need to have present in our application by giving it a name to deal with it through this name, let us call the pieces of code which we will be using modules

so we need the http module which has all of the code that we can call to handle replying to browser requests, so as we require this in our program we need to assign it to a name

the name will be http that will use the required http module

http = require 'http'

as we are building a server, the first thing to start with is to create that server, and it is as simple as typing createserver the code of the server is in http itself
http.createServer will create the server.
The documentation of everything we need is in the website http://www.nodejs.org, let us look at what http has as methods to call, that exist in http://nodejs.org/docs/v0.6.5/api/http.html

as it says (and we did wrote this earlier) To use the HTTP server and client one must require(‘http’).

First thing you will encounter in the documentation of http is http.Server:

This is an EventEmitter with the following events,

this is not really what we want, we want to create a server at this moment.

what follows is

http.createServer([requestListener]) #
Returns a new web server object.
The requestListener is a function which is automatically added to the ‘request’ event.

this is exactly what we are looking for,

read carefully:

http.createServer returns a new web server object, and it accepts a function [requestlistener] : automatically added to the ‘request’ event

mmmm, let us check for the ‘request’ event in the documentation, in the same page we will find

Event: ‘request’ #
function (request, response) { }

Emitted each time there is a request. Note that there may be multiple requests per connection (in the case of keep-alive connections). request is an instance of http.ServerRequest and response is an instance of http.ServerResponse

few things here:

  1. emitted each time there is a request
  2. request is an instance of http.ServerRequest
  3. response is an instance of http.ServerResponse

before explaining the above let us write some code (using coffeescript)
http = require 'http'

we have now the http module available
now we can create the server

http.createServer [requestListener]

from what we learned

createServer returns a server object

and since it retruns object we will put the object in a variable, and

[requestListener] is the Event request, which is a function with two params request and response

so the code looks like this
server = http.createServer (request, response) ->

by creating this we are and as soon as he request is ready in this request listener we can reply via the response variable to the requester, however we need to listen really to the completed request
let us look at the http.ServerRequest as recommended

http.ServerRequest
This object is created internally by a HTTP server — not by the user — and passed as the first argument to a ‘request’ listener.

I think this is quite clear, what is interesting is what follows

This is an EventEmitter with the following events:

This is really cool, and this is actually what makes the server respond to different requests. The server itself can respond, as it only launches the ‘(request, response) -> ‘ code after it receives a request, but let us look at the different request type that can be captured by the request EventEmitter

Event: ‘data’ #
function (chunk) { }

Emitted when a piece of the message body is received.

Example: A chunk of the body is given as the single argument. The transfer-encoding has been decoded. The body chunk is a string. The body encoding is set with request.setEncoding().

Event: ‘end’ #
function () { }

Emitted exactly once for each request. After that, no more ‘data’ events will be emitted on the request.

Event: ‘close’ #
function () { }

Indicates that the underlaying connection was terminated before response.end() was called or able to flush.

Just like ‘end’, this event occurs only once per request, and no more ‘data’ events will fire afterwards.

Note: ‘close’ can fire after ‘end’, but not vice versa.

this is too much of information, let us go through it one by one:

Event:’data’
function (chunk) { }
Emitted when a piece of the message body is received.

I am not going to use it now, we will use in another tutorial

Event: ‘end’
function () { }
Emitted exactly once for each request. After that, no more ‘data’ events will be emitted on the request.

yes this means that i can go and send a response because i am not expecting anything,

Event: ‘close’ which could be fired only after ‘end’, just go and read about it in the documentation, i found what i am looking for.

to start a listener, i need to add it as the listener on the request, i can say

request.addListener

I am listening to ‘end’

so i can say
request.addListener 'end'

everything in nodejs should be assynchronous as possible and this is done via callback functions,

callback functions are just a parameter to a method, but it is a function.

so once request received a ‘end’, then it will fire the callback function and do its job

so the above could be written as such

request.addListener 'end', ->
my code resides here

the code to write is the code that can send a response back to the requesting browser or client, as we have seend earlier, there are two parameters that handle the callback of the connection to the server: request and response, response as we have seen, is an instance of http.ServerResponse.

it is time now to look at http.ServerResponse

again from the documentation

This object is created internally by a HTTP server–not by the user. It is passed as the second parameter to the ‘request’ event. It is a Writable Stream.

this is clear and confirms what we have explained earlier, now what is interesting is the method there, from the documentation again:

response.writeContinue()
response.writeHead(statusCode, [reasonPhrase], [headers])
response.statusCode
response.setHeader(name, value)
response.getHeader(name)
response.removeHeader(name)
response.write(chunk, encoding=’utf8′)
response.addTrailers(headers)
response.end([data], [encoding])

I don’t want to retype each one of these here, but if we recall what we said earlier, we need to start by sending a header information, send content and close the connection

so I am interested in writeHead, write and end

let us see how these works

- response.writeHead(statusCode, [reasonPhrase], [headers])
I beleive they were mistaken in the documentation and should have written it response.writeHead(statusCode[,reasonPhrase], [headers])

notice that the comma before the reasonPhrase to show that this is the second command and it is optional (as second command)

so reasonPhrase I never used it and don’t know why it I am going to using if ever, ending up with two arguments statusCode and headers,

for a complete http status code refer to http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html and for complete http headers http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

the status code we shall use is 200 (which means OK) and the headers we will be interested in is content-type which is enough to send to the browser (you could implement all of the response headers, it is up to you)

so my code will look like

response.writeHead 200, {'content-type': 'text/plain'}
response.write 'Hello World!'
response.end ''

since we are done with our code, we need to start listening to the port

server.listen 8000

and this listens to the port 8000

the final code

http = require 'http'
server = http.createServer (request, response) ->
request.addListener 'end', ->
response.writeHead 200, {'Content-Type': 'text/plain'}
response.write 'Hello World!'
response.end()
server.listen 8000

save it in a file called server.coffee

if we compile the code using

coffee --compile server.coffee

we get server.js
run it

node server.js

and open the browser to http://localhost:8000/

bingo… you are done.

later we will go deeper in coffeescript and node

please if you have any comments post them

To Cloud or Not to Cloud

These days, most businesses operate in that virtual space between the screens of powerful handheld devices and constantly connected boardrooms. However, although businesses have changed where they carry out their activities, the need for powerful applications to empower these enterprises still exists.

Bulky servers, expensive technical support and inaccessible information no longer have a place amid successful ventures that strive to compete with larger operations. In cloud computing, applications, information and resources are all stored on the internet. The idea behind this is that it alleviates businesses from the rigorous hassle of establishing expensive and tiresome infrastructures locally in which to deliver their services in an effective and sustainable manner. Instead, their entire operation can be safely stored, administered and customised to their needs remotely, and at a fraction of the cost. As such, more and more successful businesses are moving to the cloud to create additional space right here on the ground for them to succeed.

We are seeing a real shift in the way companies operate. Big businesses are cutting millions of dollars in IT budgets, while smaller businesses are gaining access to services, which were previously exclusive to larger operations. The cloud is a true encapsulation of the power of the internet to change the ways in which we conduct business. It gives big businesses the chance to grow at a faster rate, and the chance for smaller businesses to compete with the bigger ones. It is safer, more reliable and definitely more accessible. Businesses can focus on their core specialty, without having to allocate so much of their resources to building an effective IT infrastructure.

In the cloud, solutions are customisable to the greatest degree of detail, and they combine as many applications as you need on a seamless platform. Businesses no longer need to hire overqualified staff to run their networks. With cloud computing solutions, all the expertise is included. Staff members can maintain, customise and expand the cloud with minimal training. Once your business is in the cloud, the sky is the limit.

Although every company would be interested in what cloud computing can bring to their business, some are still reluctant to trust sensitive information off-site. However, a cloud computing concept can be adopted behind a company’s firewall (or managed infrastructure). Companies with well-established IT infrastructures can take their infrastructure to a higher level by introducing private - or even hybrid – cloud solutions.

A private cloud would utilise virtualisation along with an added management layer. This would provide corporate network and data centre administrators with the ability to reallocate computing resources and make an infrastructure elastic and able to respond to peak periods easily.

Finding out how cloud computing can benefit your company requires some work, and it usually starts with training, which should be delivered to all decision-makers, executives and IT managers; the training then is followed by an assessment session with an experienced consultant.

Findings from such assessment should provide the needed information to select the services that can be moved to the cloud, and will enable the organisation to assess the ROI and performance gains from implementing private cloud. Needless to say, planning is the key to a successful cloud implementation.

Implementing a private cloud within your organisation would provide the ability to react quickly to major business changes, along with a smarter use of resources. If you think you are new to cloud computing, think again if any of these names ring a bell: Skype, Google voice, Facebook, Twitter, Linkedin, Picassa, YouTube, Flickr, BitTorrent, Hotmail and Yahoo. The cloud is already here.

 

Strange Facts of Technology

Aircraft Carrier
An aircraft carrier gets about 6 inches per gallon of fuel.

Airplanes
The first United States coast to coast airplane flight occurred in 1911 and took 49 days.

A Boeing 747s wingspan is longer than the Wright brother’s first flight (120ft).

Aluminum
The Chinese were using aluminum to make things as early as 300 AD Western civilization didn’t rediscover aluminum until 1827.

Automobile
George Seldon received a patent in 1895 – for the automobile. Four years later, George sold the rights for $200,000.

Coin Operated Machine
The first coin operated machine ever designed was a holy-water dispenser that required a five-drachma piece to operate. It was the brainchild of the Greek scientist Hero in the first century AD.

Compact Discs
Compact discs read from the inside to the outside edge, the reverse of how a record works.

Computers
ENIAC, the first electronic computer, appeared 50 years ago. The original ENIAC was about 80 feet long, weighed 30 tons, had 17,000 tubes. By comparison, a desktop computer today can store a million times more information than an ENIAC, and 50,000 times faster.

From the smallest microprocessor to the biggest mainframe, the average American depends on over 264 computers per day.

The first “modern” computer (i.e., general-purpose and program-controlled) was built in 1941 by Konrad Zuse. Since there was a war going on, he applied to the German government for funding to build his machines for military use, but was turned down because the Germans did not expect the war to last beyond Christmas.

The computer was launched in 1943, more than 100 years after Charles Babbage designed the first programmable device. Babbage dropped his idea after he couldn’t raise capital for it. In 1998, the Science Museum in London, UK, built a working replica of the Babbage machine, using the materials and work methods available at Babbage’s time. It worked just as Babbage had intended.

Electric Chair
The electric chair was invented by a dentist, Alfred Southwick.

E-Mail
The first e-mail was sent over the Internet in 1972.

Eye Glasses
The Chinese invented eyeglasses. Marco Polo reported seeing many pairs worn by the Chinese as early as 1275, 500 years before lens grinding became an art in the West.

Glass
If hot water is suddenly poured into a glass that glass is more apt to break if it is thick than if it is thin. This is why test tubes are made of thin glass.

Hard Hats
Construction workers hard hats were first invented and used in the building of the Hoover Dam in 1933.

Hoover Dam
The Hoover Dam was built to last 2,000 years. The concrete in it will not even be fully cured for another 500 years.

Limelight
Limelight was how we lit the stage before electricity was invented. Basically, illumination was produced by heating blocks of lime until they glowed.

Mobile (Cellular) Phones
As much as 80% of microwaves from mobile phones are absorbed by your head.

Nuclear Power
Nuclear ships are basically steamships and driven by steam turbines. The reactor just develops heat to boil the water.

Oil
The amount of oil that is used worldwide in one year is doubling every ten years. If that rate of increase continues and if the world were nothing but oil, all the oil would be used up in 400 years.

Radio Waves
Radio waves travel so much faster than sound waves that a broadcast voice can be heard sooner 18,000 km away than in the back of the room in which it originated.

Rickshaw
The rickshaw was invented by the Reverend Jonathan Scobie, an American Baptist minister living in Yokohama, Japan, built the first model in 1869 in order to transport his invalid wife. Today it remains a common mode of transportation in the Orient.

Ships & Boats
The world’s oldest surviving boat is a simple 10 feet long dugout dated to 7400 BC. It was discovered in Pesse Holland in the Netherlands.

Rock drawings from the Red Sea site of Wadi Hammamat, dated to around 4000 BC show that Egyptian boats were made from papyrus and reeds.

The world’s earliest known plank-built ship, made from cedar and sycamore wood and dated to 2600 BC, was discovered next to the Great Pyramid in 1952.

The Egyptians created the first organized navy in 2300 BC.

Oar-powered ships were developed by the Sumerians in 3500 BC.

Sails were first used by the Phoenicians around 2000 BC.

Silicon Chip
A chip of silicon a quarter-inch square has the capacity of the original 1949 ENIAC computer, which occupied a city block.

Skyscraper
The term skyscraper was first used way back in 1888 to describe an 11-story building.

Sound
Sound travels 15 times faster through steel than through the air.

Telephones
There are more than 600 million telephone lines today, yet almost half the world’s population has never made a phone call.

Television
Scottish inventor John Logie Baird gave the first public demonstration of television in 1926 in Soho, London. Ten years later there were only 100 TV sets in the world.

Traffic Lights
Traffic lights were used before the advent of the motorcar. In 1868, a lantern with red and green signals was used at a London intersection to control the flow of horse buggies and pedestrians.

Transistors
More than a billion transistors are manufactured… every second.

VCR’s
The first VCR, made in 1956, was the size of a piano.

Windmill
The windmill originated in Iran in AD 644. It was used to grind grain.

World Trade Center
The World Trade Center towers were designed to collapse in a pancake-like fashion, instead of simply falling over on their sides. This design feature saved hundreds, perhaps thousands of lives on Sept. 11, 2001, when they were destroyed by terrorists.

via Strange Facts of Technology.

Doing business in Qatar – Join the community

The State of Qatar is one of the most exciting countries in the Middle East, with the population predominantly young, the economy expanding, and the pace of modernization quickening every year.
A member of the six-nation Gulf Cooperation Council, Qatar has hosted meetings of the World Trade Organization and the Organization of the Islamic Conference. It is the home of Al-Jazeera Satellite Channel and of the Qatar Foundation’s Education City, one of the most ambitious and far-reaching centers for education and research in the Middle East.

If you are interested in doing business in Qatar, you may need to join the community http://bit.ly/businesscommunity

What I should not email about on linkedin

 Receiving emails means that the receiving party will spend sometime reading it and replying to it, and if he does not wish to receive such then it might be considered as spam, since he only optin for receiving professional emails through the network. on this occurance I started thinking about how would one judge what he should be sending and what he should not. Since linkedin is a professional network, then can i send the following:

  1. News about my company
  2. New Ideas
  3. New Products
  4. Tips related to my connection industry
  5. Information about industry specific trends and happenings
  6. Offering a Job?
  7. aRequesting for an opportunity
  8. Suggesting a connection
  9. Suggesting a group
  10. Inform about an update on my profile

Are these a yes or no? and what else i can communicate via linkedin? I look forward for your comments

Issam

We are celebrating in memory of the bravery of Ibrahim (a)

The principal aspect of the Hajj is remembering God’s test of Ibrahim where he was asked to sacrifice his first-born son Ismael. Also remembered is his path to the altar where Iblis (the devil) attempted to dissuade him three times. Those places where Satan appeared are marked with three symbolic pillars where pilgrims throw stones. Moreover a part of the Hajj is a commemoration of the sacrifice and efforts of the wife of Ibrahim – Hajar , to find water in the desert for her son Ismael, when he was near death with thirst. She ran between the two hills, Al-Safa and Al-Marwah, seven times in search of help. This ritual, known as Saaee in Arabic (means seeking/searching), is mandatory for all pilgrims to Mecca. On her fourth time on Mount Marwa (completing seven runs between the two mountains), Hajar saw the angel Jibreel (Gabriel) sheltering her son Ishmael from the sun as a spring of water emerged from beneath his feet. That spring became the basis of founding the city of Mecca, since fresh water was scarce in that barren land, and many tribes settled around there. The water from this spring, known to Muslims as Zam Zam, is still running and has been for thousands of years, purportedly since this event took place.

Today is the culminating event of the annual Islamic pilgrimage to Mecca, and it falls on the 2nd dayof pilgrimage rituals. At dawn of this day, nearly 3 million muslim pilgrims will make their way from Mecca to a nearby hillside and plain called Moun Arafat and the Plain of Arafat.
It was from this site that the Prophet Muhammad, peace be upon him, gave his famous Farewell Sermon in his final year of life.
During the entire day, from dawn until sunset, Muslim pilgrims stand in earnest supplication and devotion, praying for God’s abundant forgiveness. Tears are shed readily as those who gather make repentance and seek God’s mercy, recite words of prayer and remembrance, and gather together as equals before their Lord. Muslims around the world who are not participating in the pilgrimage often spend this day in fasting and devotion.

Wish you the best during these holy days.

Using aweber to subscribe users accessing files on your website

My company’s website Alameh Networks contains several links to presentations and i needed a way to capture the name and email address of those visitors who are interested in viewing these presentations.

For this purpose and as a user of the mighty aweber I thought of doing this by getting visitors when clicking on a link to feed in their name and email address and then push the link to them,

So, I logged in to my aweber account, created a mailing list in there and then created a form specifically for the link I want to capture the information for.

The thank you page and already subscribed page when setting up the webform on aweber were my presentation.

On my website, I have added the following javascript to the header of the of the file

<script language="JavaScript">
function ShowHide(divId)
{
var i;
var links= new Array();
links[0] = "Intro";
links[1] = "ERP";
links[2] = "EMAIL";

for (  i in links)
{
    if (links[i] != divId) {
       //document.write(divId);
      document.getElementById(links[i]).style.display='none';
}
}

if(document.getElementById(divId).style.display == 'none')
{
document.getElementById(divId).style.display='block';
}
else
{
document.getElementById(divId).style.display = 'none';
}
}
</script>

Where links are the divId I am going to use with the link code

and my links will look like this

<a href="javascript:;" onclick="javascript : ShowHide('EMAIL')"><span style="FONT-SIZE: 10pt">Check this presentation about our Hosted Email
                                    Solution</span></a>
                                 <div style="DISPLAY: none"
                                     id="EMAIL"
                                     class="mid"
                                     align="center">
                                    <script type="text/javascript" src="http://forms.aweber.com/form/44/804953344.js"></script>
                                </div>

on the same page I have multiple link items (3 Intro, EMAIL and ERP) as you probably have noticed, the the

<script type="text/javascript" src="http://forms.aweber.com/form/44/804953344.js"></script>

is exactly what I got when i requested the code to post aweber webform in my site,

The way it works is when someone clicks on any of the links the javascript shown above will hide all of the webforms other than the requested one, and if the link clicked was for an open form it will just close it.

With this set i will be able to capture who viewed the presentations with minimal technical knowledge.

There may be another way of doing this, if you know any please post a comment here.

Really was warm and cozy

I was in a visit to one of my prospects, to present Alameh Networks and our enterprise email solutions. The business owner (a local – Qatari) is a well rounded person, not only educated, is also so smart and intelligent.
When i got in there, I found that he is surrounded him self with a team of professionals he trust and respect.
Like any other presentation, I arrived there knowing in advance what kind of questions they will be asking and believing that I need always to defend my answers, may be because I always thought that very less people (if any) in this region would accept the idea of hosting their emails outside their premises for a reason other than being much cheaper and they have no other option.
I delivered the presentation and was interrupted once or may be only twice and that interruption was driven by me believing that I always need to wakeup people, even though I am not that boring.
During the presentation I did not get into much details, I thought of delivering only the enough information to get their buy in, and when i was done with the 40 minutes presentation, I asked the audience if they have any questions.
The first response i got was from the business owner, and what he said was : There is one missing thing you should have put in there, which is the depreciation of hardware, and he was referring to a slide where I showed that within three months they are able to return their money back and over 2 years they will be able to save about 80% of their investment in the email.
Yes Mr, I did not put it because if I did numbers will be hard to believe even though it is going to be correct, you know Mr that Going Cloudward, and hosting your emails with us, is just the piece of mind you and every other business owner looks for.
yes I got later questions about security, privacy, migration, and management of users, which is pretty normal, but all has started with a constructive, supportive comment, rarely one get.
BTW if you are asking if I closed the deal, the answer is yes and they will start entertaining the savings and the quality of service that we provide.
A Message to this Business Man: Thank you Mr. Mohammad S. for your support and for the warm and cozy environment that I have enjoyed.
Partly powered by CleverPlugins.com