Dojo has this concept of Store’s which is a uniform way of accessing and manipulating stored data. The Store API is a standard API implemented by all the different kinds of Stores (Memory, JsonRest etc). The Store’s query() function returns filtered data from the store based on passed in criteria and optionally also sorts the […]
I’ve been working with Dojo Toolkit for the past few months and I have started to like it actually. It is a full featured stack that includes core DOM manipulation, selectors, widgets, unit testing framework, build scripts, charting etc all combined into one big library. I just think it is not as widely as it […]
This weekend, I decided to do a little practice project with AngularJS. I made a TicTacToe Game. Here are some notes about the game :- It’s a two player game, human vs computer. It uses NegaMax Search for computer moves. There are no DOM updates from the Angular controller (best practice). The controller simply changes […]
AngularJS does not allow duplicates in a ng-repeat directive. This means if you are trying to do the following, you will get an error. [js] // the below will throw an error Error: Duplicates in a repeater are not allowed. Repeater: row in [1,1,1] key: number:1 <div ng-repeat="row in [1,1,1]">[/js] However, changing the above code […]
By default, Javascript’s Math.round does not support decimal places. If the fractional portion of number is .5 or greater, the argument is rounded to the next higher integer. If the fractional portion of number is less than .5, the argument is rounded to the next lower integer. Here are 2 examples of the above :- […]
If you are using jQuery, you can easily use .bind() and .unbind(), or .on() and .off() to attach/detach event handlers on DOM elements. But there are times when jQuery is not available/desirable in the project for various reasons. This is actually quite easy to do in native JavaScript, without any libraries. Most browsers register the […]
ClassList is a native and convenient alternative to accessing an element’s list of classes as a space-delimited string via element.className. It makes it easier to accomplish common tasks such as adding class, removing class etc. I find myself using the ClassList API more and more recently (as opposed to the equivalent jQuery functions) and I […]
In this post, I will be demonstrating how to write a simple Grunt Task that would concatenate and minify your Javascript and CSS source files. GruntJS is a Javascript Task Runner that automates certain tasks and saves a lot of time. There are hundreds of plugins available and the community is growing quite impressively. The […]
I recently installed Railo 4.0 on a standard Amazon Linux AMI using the Railo 4.0 64-bit installer and everything went fine except that on startup, Railo won’t automatically startup. Even after a re-install (to make sure I had chosen to start Railo at boot during the installation), nothing changed. I still was not able to get […]
Mobile Safari (iOS) has no concept of hover, in general. Obviously, with touch devices, you can’t have this feature. The screen needs to be touched for it to detect any user interaction. That makes sense. And with that in mind, it would be OK to say that we can ignore all :hover CSS rules, because […]
Most recent comments