Thursday, 15 January 2015

Numbers only textbox using JQuery

// Items marked for numbers should remain numbers only
$(".numbersonly").keydown(function(event) {
 // Allow: backspace, delete, tab, escape, and enter
 if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 ||
   // Allow: Ctrl+A
  (event.keyCode == 65 && event.ctrlKey === true) ||
   // Allow: home, end, left, right
  (event.keyCode >= 35 && event.keyCode <= 39)) {
    // let it happen, don't do anything
 else {
  // Ensure that it is a number and stop the keypress
  if (event.shiftKey || (event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) {

Simply add the class “numbersonly” to your HTML5 textbox, and this JQuery function takes care of the rest, making sure that textbox only allows the user to enter in numbers.


Sunday, 11 January 2015

Let’s get some facts about Marijuana for a change

drug-prevention-drogues-1170x347-engThere are two major sources of information about Marijuana inundating Canadians at the moment, and from my perspective it’s coming from two strongly opposed sides:

On the Right corner:

The “Government of Canada” which can be interchangeably described as the “Conservative Party of Canada” or their official name “The Harper Government” stands firm as the leader of the anti-marijuana crowd.


They embarked on a “” advertising campaign, which includes a fairly industrious website, several prime time television commercials, and borderline ridiculous flyers. Interestingly enough… The campaign is promoted under the name “Government of Canada”


Here is a commercial from that campaign:


The reason I bring up distinction between the “Government of Canada” and the “Harper Government” is important. It is this particular distinction that makes me quiver with fear as everything about this campaign smells of think tank tactics.


In case you are living under a rock, this year is an election year, and even though it’s too early for each party to begin campaigning for the election – American style politics have dictated otherwise, and think tanks and fundraising put forth a great advance effort in trying to change the conversation in order divide and conquer voters to favour their particular agenda. One of these divisive factors is that Harper opposes Marijuana legislation and Trudeau supports legislation, thus, any funding or promotion of the “War against drugs” that includes Marijuana negatively is a method of supporting Conservative/Harper/Government of Canada policy.


It is also important to note that the harper government does publicly deny that this campaign is any way an effort to campaign directly against Trudeau … but if it quacks like a duck … it is certainly possible that the “Government of Canada” could be doing this in an effort to preserve power and even though the “Government of Canada” doesn’t represent all elected officials – it, just like the elected officials that represent it, have the freedom of being just as misinformed as the rest of us.

On the Left corner:

Teenagers who smoke pot. The internet. Rebellious opinion. Colorado. Washington DC. Uruguay and Justin Trudeau.


Oh yea, one more: the general consensus of majority of the population.


Colorado become the first state in the United States to legalize marijuana, they implemented a series of rules that restrict access and use of the drug along with policing and taxation of it’s distribution.


Here is an infographic of findings within Denver, Colorado:

Infographic  Marijuana In Colorado

Now inforgraphics are not to be trusted as a first source of information, but reports published from the Denver government certainly can be, and they are reporting a significant reduction of crime – including automotive theft and homicide. Oh yea, six months.


Other arguments include:


Alcohol as a recreational drug is more dangerous than Marijuana, particularly with illegally driving under the influence.


Legalized marijuana can be distributed much more safely particularly through a regulatory process rather than having “dealers” provide it over the black market where marijuana can be unknowingly mixed with other drugs.


A new market for recreational drugs will open up as most cities and towns across Canada are already saturated with facilities for recreational alcohol and coffee/tea consumption. (yes, caffeine is a drug/stimulant)


Police resources can be freed up as opposed to investing millions cracking down on what is intended to be recreational drug use – these resources can fight crimes that do disrupt and endanger a society.


But all these arguments aside, there are many other factors that need to be considered. Good hard numbers too! MacLean's reported that during the Harper Government era arrests related to
Marijuana use have spiked 41% during his term to 405,000… yes… half a million arrests related to Marijuana. To give you an idea…

THAT IS 1% OF THE POPULATION OF CANADA HAS BEEN ARRESTED IN THE LAST 6 YEARS. 1… in 100 people have been arrested in all of Canada for Marijuana use – in the last 6 years…


I don’t want to even estimate the cost of policing, court costs, jail costs, and unnecessary penalties handed out. (But, if you do read the MacLean's report you will find out that it comes out to 300-500 million dollars just for enforcement – you will also find out that Marijuana legislation has derived from a potentially racist heritage, which, I'm certain that the majority of arrests in the last 6 years would have white people as a minority)


Granted amongst opinion and costs. What is not being discussed are the facts, and not the facts posted from a biased source, which now includes the Government of Canada, but from the scientific community at large. We must ask,

What about the Science?

What the debate over legalization truly needs is political philosophies to remove themselves from the equation entirely. A political agenda on Marijuana legalization forces research and studies to be formed with some sort of bias – which – somehow always produces a self fulfilling prophecy in their findings. This can be seen by all anti-marijuana articles and studies are funded by groups who are benefiting from prohibition, and many pro-marijuana articles and studies are promoted by groups, users, or those who benefit from legalization. These “sources” as ridiculous as they become can not be satisfactorily called “scientific” by any means.


This lack of “real” science makes advertising claims for or against virtually useless, for example, 10,000 jobs created as a positive attribute of marijuana can be said about the nicotine industry… That does not essentially mean that nicotine is good or should be more legal, wait – i mean, accessible because of the jobs it creates… Nicotine having scientific proof that it is significantly harmful should be legally stomped out – and marijuana – should be… studied.


Furthermore “Think Tanks” should stop formulating and developing the narrative of society, they form rhetorical questions which become perceived as facts, to develop support for a particular point of view. Police Chief turned politician, Julian Fantino, once argued that Marijuana served as a gateway drug. A common narrative from conservative political circles. However, not once did the Toronto police chief provide facts to support his claim, and concurrently it was never challenged that his statements considered beneficial for funding police. Is it much of a stretch to assume that a police chief is in favour of more enforcement?


Yes, I intentionally added that last rhetorical question to change the perspective of the “Marijuana as a gateway drug” argument from right to left. Maybe I should apply for a think-tank… or maybe… I find that question itself just as ridiculous as it serves no benefit but change the narrative and avoids scientific data entirely. Truth is, there are sources of legitimate information on the matter. Time magazine looked into this issue directly and found – that – there is no concrete evidence suggesting Marijuana is a gateway drug, and marijuana use is so wide-spread and accessible, that it is merely coincidence that it is the first drug used by addicts.


Furthermore, the scientific community at large is outlining that much marijuana research is inconclusive due to lack of ability for it to be researched or studied. The heavy legal prohibitions make studies scarce and the scientific community find themselves unable to come to any degree of conclusion just yet on the long term effects of the drug. For example, one study finds there to be some impact on brain development over a long period of chronic use. Granted, until this can be quantified, it serves no legal boundary of danger. How much brain damage is acceptable, is it more severe than alcohol use, and to what degree?!? These are not rhetorical questions… THESE ARE THE REAL QUESTIONS that both left or right politics have to be willing to invest in. If you want to say “Marijuana” is bad, allow for real research to be performed. If you want to “legalize” marijuana, allow for studies for quantifying restrictions or limits to be  evaluated.


It was this article I read years ago when I was in college, that made me strongly aware to the general ignorance of society at large. Most people, students, teachers and politicians alike had an opinion on a substance that the scientific community only scratched the surface of. In fact, mention the term “Cannabinoid” or “Cannabinoid Receptor” to anyone making an argument – and they will think you are completely insane or just stare blankly and inform you that “THC” is the active compound. Cool. Acetylsalicylic acid is the active compound in Aspirin. How it works and what it does and it’s long term side effects though is what needs to be known in order for us to set legal bounds on any drug. The only difference between marijuana and Aspirin is that, cannabis was never granted the freedom to be studied (until recently) and that it was categorized as a “Schedule 1 drug” by most countries for no quantifiable reason. It is now that institutions have the freedom to study marijuana we find that there isn’t any feasible data that makes marijuana as a recreational drug worse off than existing liquor or smoking, and as governments learn to accept this data, they appear to decriminalize it further and further.



/Alex Casamassima


Footnotes for sources i didn’t make up



Page Hits