Adam K Dean

Posts in archive

Replace anchor tags with square bracket format

Published 18 December 2013 in archive with tags regex , csharp For reason I won't go into, I have just found myself needing to replace a lot of anchor tags with square bracket format anchor tags, like so: Continue reading …

Detect when ng-options has finished rendering

Published 10 December 2013 in archive with tags javascript , angular If you want to fire an event when ng-options finishes rendering options, you can do so by watching the model with scope.$watch and then queuing up the event code to fire on the next digest cycle with scope.$evalAsync. Like so: Continue reading …

Remove params from URL in JavaScript

Published 3 December 2013 in archive with tags regex , javascript Let us say the param we want to remove is session and our URL is http://www.example.com/?session=lasgfnasolgnasgn&id=500&other=100. We can remove it like so: Continue reading …

Cloning objects in JavaScript

Published 22 November 2013 in archive with tags javascript , jquery Just a quick snippet post today. Continue reading …

Invoke callbacks with unknown arguments

Published 14 November 2013 in archive with tags javascript Whilst working on some instrumentation code, I had need to pass a function and an unknown number of arguments to another function which would then time the execution of that function. This turned out to be quite easy using fn.prototype.apply. Continue reading …



Newer Page 23 of 41 Older