The if statement evaluates an expression. If that expression is true,
then a statement is executed. If an else clause is given and if the
expression is false, then the else’s statement is executed.
Syntax:if( expression ) statement1;
Notifications. They’re those little numbers that pop
up on your application icons that you can’t help but notice. Facebook, Google+, Twitter clients and
email clients use them to let you know when you have new messages or
updates. Blogs can use them...
In the last month or two, there have been many great commits to Rails. Last week alone we saw: 0306f82 – implements automatic EXPLAIN logging for slow queries and a382d60 – ActiveRecord::Relation#pluck method.
Hello dear readers,Zend Framework is awesome and you probably know that already that's why you're using it. :)Have you ever needed to replace the non-ssl links automatically with their SSL equivalent ? Here is one way to achieve it using a front controller...
I’ve been travelling a lot lately and have attended a number of conferences at which the latest range of buzzwords are clearly being utilized by a new crop of startups. At the same time I’ve been railing against excessive use of acronyms that does nothing...
This article, based on chapter 5 of HTML5 in Action by Robert Crowther, Joe Lennon, and Ash Blue, shows you how you use the IndexedDB API to create, connect to, and use a database that is stored on the client-side in the user’s Web browser.
Today’s PhoneGap on Windows Phone 7 tip involves handling orientation
changes. This means when a user rotates their phone from portrait to
landscape, the content should rotate as well. Not only that, in some
scenarios elements on the screen should...
Chrome has just now, and just barely, overtaken Firefox; but Mozilla's almost ridiculous rapid-fire release schedule is building some kind of momentum (even if it's not the kind that translates into higher market share).
In terms of numbers, Opera may not be competing with the big browsers. But in several important respects, Opera runs impressively close to the bleeding edge of web standards. And Opera's Bruce Lawson is one of the more active HTML5 proponents on the web today.
Last week I demonstrated how to setup autocomplete in a new Rails 3.1 app using the Soulmate gem, from SeatGeek.
Soulmate uses Redis to cache all of the autocomplete phrases in memory,
providing lightning fast query results.
A setter for a certain field is present: maybe it's a generated method, or is used for Dependency Injection.However, in the current state of the code, there are no use cases for it [anymore]: it's either a never called method, or one called only during...
When I started using Ruby and Rails in 2004 I immediately knew that
Rails was going to be huge. At that time I was working mostly with Java.
Ruby and Rails brought so much joy to my programming world that it was
kind of a revolution in my programming...
The expression “linear search in sorted lists” itself sounds strange.
Why should we use this algorithm for sorted lists when there are lots
of other algorithms that are far more effective? As I mentioned in my previous post
the sequential search is...