unique visitors counter
show/hide
Page: 1 2 3 4 5 6 ... 544 545 546 547 548
27376 article(s)
Items per page:
Images User comments My comments

Be vigilant. See your enemy before he sees you.

Fire leaves 19 homeless
2008-05-17 Ocho Rios, St Ann:Fire believed to have been caused by an electrical short circuit destroyed a 15-apartment building in Main Street, St Ann's Bay, yesterday, leaving 19 people homeless.The mostly wooden structure also housed...
Source: The Jamaica Gleaner
Parents warned to have children fully immunised
2008-05-17 The Ministry of Health and Environment is appealing to parents or guardians who have children between one and 18 years to ensure that they are fully immunised, in the wake of an imported case of measles.At the same time, the health ministry is making...
Source: The Jamaica Gleaner
Further delay for Cuban light-bulb case
2008-05-17 The fraud case involving former state minister for energy, Kern Spencer, and his two associates, Coleen Wright and Rodney Chin, has again been delayed to facilitate the prosecution.The three are facing fraud and money-laundering...
Source: The Jamaica Gleaner
Another JLP seat under threat - Mitchell appeal win jeopardises Mair's place in Parliament
2008-05-17 PEOPLE'S NATIONAL PARTY (PNP) caretaker for St Catherine North Eastern, Phyllis Mitchell, yesterday received the green light from the Court of Appeal to challenge Gregory Mair's eligibility to sit in Parliament.
Source: The Jamaica Gleaner
BRIEFS
2008-05-17 The three male teenagers who were arrested and charged, along with a church deacon in 2006, for trafficking in persons in a case involving a 14-year-old schoolgirl, pleaded guilty yesterday.The three pleaded guilty...
Source: The Jamaica Gleaner
New medication to treat Rhuematoid arthritis added to NHF drug list
2008-05-17 The active ingredient Leflunomide (Arava) that is used to treat rheumatoid arthritis has been added to the National Health Fund (NHF) Drug List effective May 2, 2008.
Source: The Jamaica Observer
Website for medical volunteers launched
2008-05-17 Medical teams planning to visit Jamaica now have a website they can rely on to look up vital information they can use for their trips.
Source: The Jamaica Observer
J'can teen charged with murder of mom, injury of dad in Baltimore
2008-05-17 A Jamaican teenager who allegedly bludgeoned his mother to death and seriously injured his father with a baseball bat in Baltimore, United States on Tuesday, waived a bail appearance in the Baltimore District Court yesterday.
Source: The Jamaica Observer
Sandals, Beaches Resorts treat 500 teachers
2008-05-17 MORE THAN 500 educators in the parishes of St James, Hanover, Westmoreland, St Ann and St Mary, were on Teachers' Day last week treated in style at luncheons hosted in their honour by Sandals & Beaches Resorts at luncheons hosted in their honour.
Source: The Jamaica Observer
World Bank approves US$65-m loan for three J'can projects
2008-05-17 WASHINGTON, USA - The World Bank Board of Directors on Tuesday approved three loans for Jamaica, totalling US$65 million, to support the country's efforts to strengthen its social safety net, improve services for young children and their parents, and support HIV/AIDS prevention and control.
Source: The Jamaica Observer
Church says leaders must start speaking the truth
2008-05-17 JAMAICA Council of Churches (JCC) president, Rev Karl Johnson, has called on the nations leaders to speak the truth about all aspect of the country's life, and suggested that calls for renewal of the moral fabric of the country are veiled in hypocrisy and no one wants to come clean.
Source: The Jamaica Observer
Polls now likely?
2008-05-17 THE Court of Appeal yesterday gave the People's National Party's (PNP's) Phyllis Mitchell the go-ahead to proceed with an election petition to have the Jamaica Labour Party's (JLP's) Desmond Gregory Mair disqualified as MP for North East St Catherine, because of his alleged holding of dual citizenship.
Source: The Jamaica Observer
Holiday Inn sends 60 workers on 'permanent holiday'
2008-05-17 ROSE HALL, St James - More than 60 unionised workers of the Holiday Inn Sunspree Resort yesterday demonstrated in front of the property after they were denied entry when they turned up for work. They later learnt that their jobs were made redundant.
Source: The Jamaica Observer
Three bullet-riddled bodies found in upscale St Andrew community
2008-05-17 A Plantation Heights couple had the shock of their lives when they awoke to find the bullet-riddled bodies of two men sprawled out in front of their home along Patrick Road in the upper St Andrew community yesterday morning.
Source: The Jamaica Observer
Public warned of fake policemen
2008-05-16 Flying Squad detectives are urging members of the public to be extremely cautious when approache...
Source: Radio Jamaica News
Teenage boys plead guilty in sexual assault tape case
2008-05-16 Three teenaged boys who were charged with human trafficking following the alleged sexual assault...
Source: Radio Jamaica News
Another policeman charged for corruption
2008-05-16 Yet another police officer has run afoul of the law.
Source: Radio Jamaica News
Tips on getting vitamin D for cancer prevention
2008-05-16 MINISTRY of Health officials have until the end of this month to complete a review of the Vital Essential and Necessary (VEN) list of drugs.
Source: The Jamaica Observer
FirstCaribbean revenues up 22 % in 2007
2008-05-16 FirstCaribbean International Bank Jamaica has reported another year of solid performance with growth in total revenues of 22 per cent or J$3.28 billion.
Source: The Jamaica Observer
Support for Cuba
2008-05-16 Jamaica is expected to push for a review of the United States' economic embargo against neighbouring Cuba at this week's summit of European, Latin American and Caribbean countries in Lima, Peru.
Source: The Jamaica Observer
Elderly store owner and customer robbed, shot dead
2008-05-16 GEORGES PLAIN, Westmoreland — Residents of this rural district were still in shock yesterday as they mourned for an elderly businessman and one of his customers, who were brutally murdered by gunmen during a robbery here Wednesday night.
Source: The Jamaica Observer
3 UTech students get Observer Food Awards scholarships
2008-05-16 Three well-deserving third-year students of the University of Technology's (UTech's) Hospitality and Tourism Management programme yesterday received Jamaica Observer Food Awards Scholarships valued at over $1 million.
Source: The Jamaica Observer
Jamaican economy stalls in the first quarter of 2008
2008-05-16 Unplanned events created a general slowdown of the economy during the first quarter fo the year. Speaking at the Planning Institute of Jamaica's (PIOJ) quarterly media briefing, Director general of the PIOJ, Dr Wesley Hughes, stated that the economy during the review period was impacted by global challenges in terms of the increased commodity prices in particular crude oil, wheat, rice and fertiliser, as well as unexpected heavy rains in February.
Source: The Jamaica Observer
Capital&Credit looks to secondary listing later this year
2008-05-16 The Capital & Credit Financial Group (CCFG) intends to list one or more of its subsidiaries by the third quarter, revamp its unit trust product and launch an individual retirement account with a view to energise the brand.
Source: The Jamaica Observer
Olint at the crossroads
2008-05-16 The alternative investment scheme Olint Corp headed by David Smith now finds itself at a crossroads, with its next move determining the very existence of the popular foreign currency trading outfit.
Source: The Jamaica Observer
Change is hard but necessary
2008-05-16 "Everyone wants to go to heaven but no one wants to die". These are well-known words and were even belted out by Peter Tosh in one of his hit songs. How does one go to heaven if death is not involved, as death is a necessary ingredient of making it to heaven? And this is the dilemma we face as a country.
Source: The Jamaica Observer
Screened for cancer?
2008-05-16 DAPHNE Sterling is 62, but has never been screened for cancer. In her mind she thought it was not important, but Wednesday she got a 'rude awakening' when she learnt that her unwillingness to be tested could prove fatal, as she could be living with cancer and not know it.
Source: The Jamaica Observer
'It's mischief'
2008-05-16 TOURISM Minister Edmund Bartlett has dismissed a news report that Spanish investors Grupo Excelencias have delayed plans to construct a hotel here, while major hoteliers Barcelo and Sol Melia have gone elsewhere because of the investment climate.
Source: The Jamaica Observer
Samuda issues strong warning to retailers who abuse system
2008-05-16 MINISTER of Industry, Investments and Commerce, Karl Samuda has warned retailers that his ministry will pressure those who fail to comply with its price stabilisation efforts. Samuda issued the warning as he made his sectoral debate presentation in the House of Representatives on Tuesday, and reiterated the point as he answered questions at a post sectoral press briefing at Jamaica House on Wednesday.
Source: The Jamaica Observer
Now Vaz files appeal in dual citizenship saga
2008-05-16 JUNIOR minister Daryl Vaz yesterday filed an appeal against Chief Justice Zaila McCalla's decision to disqualify him as member of parliament for the West Portland constituency last month.
Source: The Jamaica Observer
VoxPOP
2008-05-16 The National Works Agency (NWA) has announced plans to demolish the historic fountain at Sam Sharpe Square in Montego Bay, St James, as part of the $40-million traffic plan for the city.
Source: The Jamaica Gleaner
CHILD MONTH TIPS
2008-05-16 Tips for good communication - How you talk to your child can make a big difference in how you understand each other. DoSayListenI feel that right now you need to listen to me.PraiseYou worked so hard and I am proud of you. Feel I feel ...
Source: The Jamaica Gleaner
Kern returns to court
2008-05-16 THE CUBAN light-bulb spotlight will today be refocused on North East St Elizabeth Member of Parliament (MP) Kern Spencer and his co-accused, Rodney Chin and Coleen Wright, when they return to the Corporate Area Resident Magistrate's Court.
Source: The Jamaica Gleaner
Vaz appeals - New turn in West Portland battle
2008-05-16 The Court battle for the West Portland seat has intensified with Member of Parliament (MP) Daryl Vaz filing a surprise appeal yesterday, seeking to overturn the April 11 court ruling, which ousted him from Parliament. Vaz filed the appeal in the Court of Appeal yesterday...
Source: The Jamaica Gleaner
Rampage out west - Gunmen shoot six, three fatally
2008-05-16 WESTERN BUREAU: As the crime wave continues to grip the country, gunmen shot six more persons, three fatally, in western Jamaica in just over a 16-hour period. The first incident occurred in the quiet community of Georges Plain in Westmoreland,...
Source: The Jamaica Gleaner
Agriculture ministry has report on rice viability
2008-05-16 A report on the viability of the resumption of rice cultivation in the island is currently being examined by the Ministry of Agriculture. The report, which comprises recommendations made by Guyanese rice players and the ministry's assessment of former rice lands...
Source: The Jamaica Gleaner
Kingston takes early lead at Champs
2008-05-16 KINGSTON HOLD the lead heading into today's final day of the two-day Jamaica Teachers'
Source: Sports Jamaica
Champions to battle Jamaica XI
2008-05-16 THE AUSTRALIANS, un-disputed world champions of cricket, open their 10th tour of the West Indies
Source: Sports Jamaica
McKay takes it all for St Jago
2008-05-16 WE STARTED off the BPL and FA Cup season with four experts on the Prediction Panel.
Source: Sports Jamaica
ON THE BOUNDARY - The 'baggy greens' are back
2008-05-16 IN 1955, the Australians, the mighty Australians, with batsmen like Neil Harvey and Keith Miller,
Source: Sports Jamaica
'I'm very disappointed' - Former WI skipper calls ban unfortunate
2008-05-16 Richie Richardson, a member of the West Indies Cricket Board disciplinary committee,
Source: Sports Jamaica
Jamaica stars Facey, Anderson to clash at US college meet
2008-05-16 TWO athletes who will be looking to earn places on Jamaica's female sprint relay squad at the Beijing
Source: Sports Jamaica
Golden opportunity for West Indies, says Dyson
2008-05-16 West Indies coach John Dyson has urged his less decorated players to use the Australia series
Source: Sports Jamaica
Royal Image to trample rivals
2008-05-16 SATURDAY's Pick-9 carried the sting in its tail, 6-1 shots JAGMAR and DR STEPHANIE
Source: Sports Jamaica
Davies backs Bunting
2008-05-16 As Parliament's Ethics Committee prepares to discuss reports of so-called 'sweetheart' deal...
Source: Radio Jamaica News
Consensus on terms of reference for probe into financial breakdown of 1990’s -PNP
2008-05-16 Opposition Leader Portia Simpson-Miller has written to Prime Minister Bruce Golding seeking cons...
Source: Radio Jamaica News
Another investment scheme and bank at odds
2008-05-16 RBTT Jamaica Limited is barred for the next 14 days from closing the accounts of embattled alter...
Source: Radio Jamaica News
Another hike in water bills possible
2008-05-16 National Water Commission (NWC) customers will hear next week whether they will have to pay more...
Source: Radio Jamaica News
Preliminary forensic audit report on PCJ due
2008-05-16 Energy Minister Clive Mullings is expected to receive a preliminary report on the outcome of the ...
Source: Radio Jamaica News
Light bulb three back in court
2008-05-16 Former Junior Minister for Energy Kern Spencer and two co-accused in the Cuban Light Bulb Scandal...
Source: Radio Jamaica News


Page: 1 2 3 4 5 6 ... 544 545 546 547 548
27376 article(s)

Up

show/hide

Jamaican commentary

Jamaican social and political commentary

The assertion goes something like this: “Many Jamaicans have guns.” There will usually be nods all around. These are the sentiments of a delusional people who have been brainwashed by the crime hysteria and possibly a double onslaught of vybz kartel and movado lyrics. Reality check: FEW JAMAICANS HAVE GUNS. How do I know this? - Criminals are bolder than usual [...]
show/hide

The assertion goes something like this: “Many Jamaicans have guns.”

There will usually be nods all around.

These are the sentiments of a delusional people who have been brainwashed by the crime hysteria and possibly a double onslaught of vybz kartel and movado lyrics.

Reality check:

FEW JAMAICANS HAVE GUNS.

How do I know this?

- Criminals are bolder than usual here. They are too bold. They don’t expect their victims to be armed. A man will enter a bar and order five people to lie face down on the ground and then proceed to execute them which is what took place in Bog Walk, St. Catherine some months ago.

- The number of licensed firearm holders is of the order of tens of thousands. Extrapolate. Unlicensed firearm holders would not be much higher in this country. Think about it? How many law-abiding citizens would risk having an illegal gun in their possession? Few. Maybe you might but the ordinary citizen has too much to live for to bother with keeping around an illegal weapon which could get him a maximum life sentence under unfair laws.

- Common sense. If none or few of your friends or the people you know have guns and the people you know who do have guns are the hardened criminals, affluent or businessmen who are supposedly handling large sums of money then clearly gun ownership is not very high. Criminals will always have guns. It turns out that they do not respect laws so they do not have a problem with acquiring firearms illegally by any means necessary.

- Jamaicans have a fear of guns.

Yes,

Jamaicans are afraid of guns. Thank the Gun Court era for reinforcing this fear as well.

We were and still are slaves — most of us anyway. We were and still are being fed lies by our education system.

We were taught to believe that the maroons are heroes when in fact the maroons are traitors. Didn’t they make an agreement with the British to send back runaway slaves? Sure, they acted pragmatically to avoid a war of attrition but that does not erase the fact that they sold us out.

We were “granted” independence. What a damn disgrace! You can’t be granted independence. You have to fight for independence and only gain it at the cost of bloodshed. Jamaicans were abandoned and that is the reality. We became too expensive and we were pushed out and forced to fend for ourselves. Our masters led us to believe that we did it all by ourselves.

Free men own guns. Slaves do not.

The slavemasters were required to own firearms. Slaves could not touch them.

Most of our members of parliament are firearm holders. Most of our citizens are not.

If politicians really feared that the citizens had the means to overturn the government and exterminate them, then good governance would be a must.

Here are the people who do not want you to be armed:

- Politicians (who are afraid that you will shoot them for their bad governance and who are self-centered and already armed anyway)

- Criminals (because they don’t want their prey to have a fighting chance)

- You (because you don’t want the killing machine around. When you are being robbed and have a knife put to your throat then you might secretly wish for the killing machine)

Do you think that I am trying to convince you of anything?

No, I am just expressing my anger at what a shithole repressive system I live in where people must be the victims of their circumstances. I live in a system where I must be “handling large sums of money” before the Firearm Licensing Authority deems me worthy to have a permit.

I live in a country that is in the top three most murderous peacetime democratic countries.

When the wolves come for you, your best hope will be that they take some other sheep.

Website of the Firearm Licensing Authority (FLA):
http://www.fla.gov.jm/

So I am getting my hair cut today. There’s a woman in the chair across from me getting her eyebrow shaped with a razor who appeared at a glance to be someone decent. A boy in Khaki uniform who seems to be between five and seven is looking at flyers next to me. His younger [...]
show/hide

So I am getting my hair cut today. There’s a woman in the chair across from me getting her eyebrow shaped with a razor who appeared at a glance to be someone decent. A boy in Khaki uniform who seems to be between five and seven is looking at flyers next to me. His younger brother — I presume he’s his younger brother — is walking around the shop as a child is expected to do. They were not particularly noisy. In fact, these youngsters weren’t disturbing me as would be expected of those their age.

The barber is giving me my regular cut: close-cropped, no line-up, no fade, nothing special. Just a plain old haircut with no gimmicks. Out of nowhere, the mother takes a rag and slaps the boy in his face. I look at what is unfolding in front of me. The barber attending to her stifles a laugh. I cannot see the reaction of the barber behind me.

The woman begins to scream at the top of her lungs. “Hey pussyclaat bway, mi wi jook out yu bomboclaat yeye-dem mek police haffi come tek mi weh.”

She continues on her tirade. Sentences strung together with “fuck”, “bomboclaat”, “pussyhole”, “rass” leave the mouth of this woman who seemed to be in her early thirties maybe even late twenties.

I dig deep and weigh what is to be gained by saying something. I opt not to. I see a man in the mirror who had an expression indicating that he clearly knew this was wrong. The woman was slapping the children who really were not a disturbance in the barber shop. We were witnessing the propagation of a barbaric way of dealing with other human beings right before us. I thought: “My God, these people through their actions will unleash the next set of heartless coldblooded hooligans for the society to deal with.”

Incidents like this really leave you with the feeling that people ought to apply for a permit to have children. The most terrible people churn them out rapidly and the people who are actually most capable of rearing children in a respectable manner seldom do so.

This is Jamaica where the bad breed are slowly outnumbering people who could actually contribute. We are being overrun.

If you plan on being a health professional or plan to serve with the military then it’s understandable that you will be required to get tested for contagious diseases such as HIV. If you’re applying for a normal job such as customer care why are companies asking their potential employees for x-rays and blood [...]
show/hide

If you plan on being a health professional or plan to serve with the military then it’s understandable that you will be required to get tested for contagious diseases such as HIV. If you’re applying for a normal job such as customer care why are companies asking their potential employees for x-rays and blood tests for HIV? Certainly we can understand the drug testing but it really is an invasion of privacy and discriminatory practice. What will the companies do with their knowledge? Will they bar HIV positive Jamaicans from working? These people need to eat and if they can get no employment then they will become a problem for society.

These people are not your friends. So what if you don’t give them money and they stop talking to you? Big loss. Your car will be there even if you don’t give them money. It’s a scam. They’re not protecting anything. There is nothing to fear. Do you think a crackhead could really protect your car from [...]
show/hide

These people are not your friends.

So what if you don’t give them money and they stop talking to you? Big loss.

Your car will be there even if you don’t give them money. It’s a scam. They’re not protecting anything. There is nothing to fear. Do you think a crackhead could really protect your car from gunmen who are intent on stealing it?

Practise walking blindly past them and not even saying a word to them. Don’t bother with the crap talk like “No general, mi nuh have nutting.” Just don’t say a word to them. If you talk to them they’ll annoy you even more. Take my advice.

Ignore the children as well. They are not starving and they should be around their parents. It sounds callous but it’s all a scam that preys on the well-to-do who encourage the parasitic behaviour by giving without thinking.

In general, I would recommend stop giving alms on the street. If you want to help these people join a service organisation and contribute your money to reputable sources.

Don’t let them wash your vehicles either with the water that they steal. If you want to have your vehicle washed go to a car wash.

If you don’t spend money on them then they’ll eventually go away and New Kingston just might be a nice place to go to instead of the area for refuse, prostitutes, crackheads and drug dealers that it has become.

Getting Bail in Jamaica, as with anything you are entitled to by law, is a matter of the arbitrary abuse of power by the lowest level employee. Just as the helper can lock up the office and go on vacation with the key, the bottom level of Court Staff has the absolute unfettered power [...]
show/hide

Getting Bail in Jamaica, as with anything you are entitled to by law, is a matter of the arbitrary abuse of power by the lowest level employee. Just as the helper can lock up the office and go on vacation with the key, the bottom level of Court Staff has the absolute unfettered power to disregard a Court order. It is not a matter of rights which the Constitution and subsequent laws enshrine. It is the matter of the lowest of the low deciding to exercise their ‘power’ by stepping all over the rights of any one unfortunate enough to fall within their ambit. The police, for example, can neglect to take an accused to Court claiming ‘no vehicle’. A registrar can leave a name off a list. A judge may grant bail but a clerk can decide that s/he does not process documents after three thirty although there is nothing in law which so stipulates this ‘cut off’ time. Persons who stand surety are to present documents which substantiate their financial ability. It is not up to a clerk to determine whether or not a property is worth the value on the face of the land title. If there is fraud it is for the police to prosecute the individual who has used the document for the purposes of establishing their economic ability to stand surety. A Justice of the Peace, for example, certifies an individual is a fit and proper person to stand surety and nothing further required. In a kakistocracy, where the worst people rule, one can expect the lower levels to emulate their leaders. Astute lawyers, knowing the inherent corruption of the civil service, primary the Court Staff, will not leave the precincts of the Court until their client is walking out of the holding area. Others, who seem unable to grasp the fact that although a Judge might grant bail, although a Justice of the Peace might certify the acceptability of the person standing surety, this does not mean civil servants will perform as required by law. Hence, Kern Spencer, not a particularly popular person, was enabled to spend three nights in jail after receiving bail from a judge because the Court Staff decided to ‘fix’ him. Despite the fact it is Kern Spencer who was the victim of the standard callous disregard for human life practised by the staff at Half Way Tree, a serious inquiry should be held. Offending members should be removed from their posts and either shipped to Hanover, Trelawney, or St. Elizabeth, or the road in front of the Court House. Clear instructions must be given that the Day Court Staff works until replaced by the Night Court Staff. It seems clear those employed at the Half Way Tree Court House are guilty of false imprisonment and abuse of procedure. Far more important that Kern Spencer, than the Cuban Light Bulbs, is this trampling of human rights by the staff of a Court House. It is not Kern Spencer alone who has been subject to this denial of human rights, it is every citizen, whether arrested wrongly or not, who has been or can be subjected to this kind of abuse of process. If it was your son who was granted bail, and a clerk decided she wasn’t going to process his application and he spent that extra night in jail where he was murdered or raped by another inmate, would it hit home, then?

Technical stuff

This is the thing for you if you’re interested in finding out who are the cheaters on a multiple choice test. I will spare you the mathematics behind the method save to say that it’s a simple application of matrices. A square matrix results from some matrix multiplications comparing students against other students and themselves: Click here [...]
show/hide

This is the thing for you if you’re interested in finding out who are the cheaters on a multiple choice test. I will spare you the mathematics behind the method save to say that it’s a simple application of matrices.

A square matrix results from some matrix multiplications comparing students against other students and themselves:

Student response similarity as a square matrix

Click here to download the Microsoft Excel Spreadsheet

Okay, so you’ve read this far. That means you want some of the math:

Here are some student responses on a 5 question multiple choice test:
Matrices containing student multiple choice responses

We can represent these responses as a matrix of wrong and right answers (binary 1s and 0s):

Above, we have a 3×5 matrix of binary values representing wrong and right responses. We will call this matrix M.

The transpose of this matrix, transpose(M), is also shown above and it is a 5×3 matrix.
N is the number of questions on the test.
The similarity of the responses is determined by:

[ M * transpose(M) + (1-M) * (1-transpose(M)) ] / N * 100%

In words, this is saying:

Correct questions that students being compared have in common plus incorrect questions that students being compared have in common. The result is then converted to a percentage figure.
The more questions you have, the smaller the probability that highly similar papers will arise without collusion.

Remember: for the matrices A and B to be multiplied, the number of columns in A must be the same as the number of rows in B. The resulting matrix will have the same number of rows as A and the same number of columns as B.

In JavaScript, we set and remove cookies with the document.cookie object. What is a cookie? [Wikipedia] HTTP cookies, sometimes known as web cookies or just cookies, are parcels of text sent by a server to a web browser and then sent back unchanged by the browser each time it accesses that server. HTTP cookies are used [...]
show/hide

In JavaScript, we set and remove cookies with the document.cookie object. What is a cookie?

[Wikipedia] HTTP cookies, sometimes known as web cookies or just cookies, are parcels of text sent by a server to a web browser and then sent back unchanged by the browser each time it accesses that server. HTTP cookies are used for authenticating, tracking, and maintaining specific information about users, such as site preferences and the contents of their electronic shopping carts. The term “cookie” is derived from “magic cookie,” a well-known concept in unix computing which inspired both the idea and the name of HTTP cookies.

In the example that follows, we’ll look at using cookies in the context of an HTML form. When the user fills it out and opts to have the web page “remember” him the next time he visits, a cookie will be set containing his username.

To set a cookie, we simply insert a name-value pair into the document.cookie object. Example:

document.cookie = ‘username=johnbrown’

Spaces, semi-colons, equal signs are not permitted. In fact, the value part must be specially encoded with the escape() function. Spaces will turn into the familiar %20 and so on. To decode it, we use the unescape() function.

There is a special name that we can include in our cookie called expires which is a date in GMT format.

document.cookie = ‘username=johnbrown;expires=Wed, 31 Oct 2007 18:32:47 GMT’

This instructs the cookie that we would like it to expire on the date above. Please do not try to create a cookie that will last indefinitely. Users have the freedom to delete cookies at will. They often do and the browsers often remove cookies that haven’t been touched for a while.

Here’s how we read the current date and time into a variable

var myDate = new Date()

Here’s the current date and time in GMT format

alert(myDate.toGMTString())

Have no fear. By assigning a value to document.cookie we are not overwriting its contents. Only the name-value pair you are trying to add will be overwritten.

So, this will produce the cookie “username=joebloke;gender=male” without the double quotes of course:

document.cookie = ‘username=joebloke’
document.cookie = ‘gender=male’

Let us say that we no longer need the gender information, how do we delete a name-value pair from the cookie?

We’ll have to assign a null value to the name.

document.cookie = ‘gender=’

That takes care of that.

Now, what if we no longer need our cookie, how do we get rid of it. We’d have to set an expiry date some time in the past.

Take a look at the example that follows:
To download the .ZIP compressed example, click here

Now, in my HTML/JavaScript course that I teach, I suggested to my students how they could quickly and effectively determine if a colour is in the safe palette. Admittedly, the safe palette is not so important in this day and age where few devices connect to the internet with a display showing 256 colours or [...]
show/hide

Now, in my HTML/JavaScript course that I teach, I suggested to my students how they could quickly and effectively determine if a colour is in the safe palette. Admittedly, the safe palette is not so important in this day and age where few devices connect to the internet with a display showing 256 colours or less.

Background:
6-digit hex codes are used in HTML and CSS
3-digit hex codes are used in CSS

a 6 digit hex code is of the form : #RRGGBB (where R=red digit, G=green digit and B=blue digit)
a 3 digit hex code is of the form : #RGB

what is a safe palette? the safe palette is the set of colours which are guaranteed to display correctly on ALL browsers viewing your page without dithering. there are 216 of them. yes, very limited.

First, the key thing to remember is “666.” 6×6x6 = 216 colours in the safe palette. 256 colours - 40 windows system reserved colours = 216 colours.

a 6 digit hex code can be represented in 3 digit hex code (used in CSS) if the R digits are pairs, the G digits are pairs and the B digits are pairs.

so:
#AA7733 = #A73
#CC00FF = #C0F
#DD9933 = #D93

now,
#AEAEAE has no 3 digit representation for obvious reasons. those pairs aren’t there.

here’s how we determine just by looking at a number if it is in the safe palette or not.

0
0 + 3 = 3
3 + 3 = 6
6 + 3 = 9
9 + 3 = C
C + 3 = F

the safe digits are 0 3 6 9 C and F

so:
#36A is not safe because A is not among the safe digits
#990 is definitely safe
#CCC is definitely safe

and so on…

here’s how we approximate the safe colour from any given 6 digit hex code

given #B71369, how do we find the nearest safe colour?

first.. double up based on the first digit of the R, G, and B pairs.
doubling up would give us:

#BB1166

next step is to write the 3 digit hex code

#B16

next step is to check each digit and see which one of the safe digits it’s closest to:

B is closer to C than to 9
1 is closer to 0 than to 3
6 is safe

our nearest safe colour is #B16

now, have fun with this code. it will dynamically generate the safe palette using javascript.This example uses JavaScript to construct a 216
cell table which shows all the colours of the
safe palette. The example incorporates:

  • DIV containers
  • Functions with return values
  • The IF conditional
  • The SWITCH block
  • document.write, document.writeln
  • Escape codes (\n \’ \”)
  • Error trapping (try-catch blocks)
  • The FOR loop
  • .innerHTML
  • onMouseOver and onMouseOut
  • String concatenation

Download the ZIPped example


See the code in action

Up

show/hide

Courses

Courses

Emergency Medical Services in Jamaica

Emergency Medical Technician resource

Up

show/hide

Biography

On the following social networks: Facebook Hi5 MySpace
In the following blog communities: MyBlogLog

What do you think of Denton Tyndale?

Curriculum Vitae


I have taken my CV offline.

Gallery


Main gallery

FAQ

(No questions yet)

Contact information


+1 (876) 892-6860
Constant Spring P.O.
P.O. Box 3021
Kingston 8
Jamaica

Up

show/hide

Up

show/hide

Events

Up

show/hide

2006.01.15 - Gallery updated
2006.01.17 - CAO material posted
2006.01.18 - Gallery updated
2006.02.10 - Added style sheet. Made site easier to read.
2006.02.24 - Favourites icon added, links updated, Patwa articles added, tweaked the theme
2006.02.03 - Making preparations for site additions including multi-language support
2006.03.07 - Put in the blog section. No commentary yet. Thinking about doing some XML stuff.
2006.03.08 - XML Blog operational.
2006.03.21 - Routine maintenance, site enhancements
2006.03.29 - Image feature added to blog, fixed Internet Explorer table width shift problem.
2006.03.31 - Started coding calendar.
2006.05.01 - Custom RSS feed created
2006.05.13 - Created automatic news categoriser
2007.01.20 - Major site enhancements begin
2007.01.21 - Site re-design complete
2007.01.28 - Installed Mambo CMS to handle my courses page. cweb2301 has not yet been migrated to CMS.
2007.10.12 - Switched from file based news system to database driven system. Made page index cooler and slimmer.
2007.10.16 - Finished programming user comment system for news items.
2007.10.20 - Recovery from major site crash.
2007.10.26 - Forked the newsfetcher process so that it will run in the background without slowing down users. I can't believe I didn't think of this sooner. Forks are so sexy.
2007.10.28 - Added technical blog
2007.10.29 - Enhanced site look with AJAX. Enhanced look available here.
2007.12.03 - Realised that there was a problem with the user comment system. Nobody could post a comment because the verification image was unable to pass the information back to my comments script. Fixed it. Comment system users can now register their username.
2007.12.04 - Girlfriend was kind enough to give me a nice new navigation bar. Thanks babes

Up

show/hide

Up