I’ve been trying to get some Jasmine tests running with RequireJS and although my tests work with Jasmine 1.3.x, I’ve been getting an error if I use Jasmine 2.0 for the tests. Apparently, Jasmine 2.0 has changed how it loads and executes the tests. If you look at the source here, you’ll see all the […]
Readers would be pleased to know that I have teamed up with Packt Publishing to organize a Giveaway of their new book – Extending Bootstrap Three lucky winners stand a chance to win 3 digital copies of this book. Keep reading to find out how you can be one of the Lucky Winners. Book Overview […]
As a web developer, we all have to write cross-browser code on a day to day basis and most of the time, cross-browser really means making sure the code works in different versions of IE. IE10 and IE11 are a lot better than IE9 in terms of compatibility and the biggest challenge is usually IE8 […]
Readers would be pleased to know that I have teamed up with Packt Publishing to organize a Giveaway of the new book – Getting Started with Grunt: The JavaScript Task Runner Three lucky winners stand a chance to win 3 digital copies of this book. Keep reading to find out how you can be one […]
One of the things I learned today is that custom Dojo widgets do not completely get cleaned up if they have child widgets that have been programatically created. _WidgetBase’s internal call to destroy() or destroyRecursive() won’t completely destroy the programatically instantiated widgets and might leave some memory leaks. Consider this piece of code :- [js […]
Binary Search is one of the fundamental algorithms in computer science. It is used to quickly find a value is a sorted set of data. It is also referred to as half-interval search, sometimes, purely because on each successive iteration, it halves the number of items to check. Binary search works by comparing an input […]
This is a little programming exercise, purely for fun. The idea is to take a number (in digits) and convert it into it’s english form. So, e.g. 1000 becomes “one thousand”, 1450 becomes “one thousand, four hundred fifty” and so on… The approach I’ve taken is as follows :- Deal with numbers less than hundred […]
There are probably hundreds of examples of textarea counter plugins out there (most of them jQuery though, but I wanted to write one in Dojo. The idea is quite simple, you want a textarea that takes a maxlength parameter and displays a counter of what’s available and does not let you enter more characters than […]
The slow query log can be used to find queries that take a long time to execute and are therefore candidates for optimization. If you want to enable slow query log on your Amazon MySQL RDS instance, you need to be aware of 2 things :- To be able to enable and disable slow query log […]
The Dijit Tree component lets you select multiple options by default and there is no easy way to turn that off, or atleast none that I could find. Ideally, this should be a configurable property, byt sadly, that’s not the case. However, there is a “singular” property on the _dndSelector that would let us disable […]
Most recent comments