Jim
Member since Feb 4, 2009
- Profile: /members/2890-jim.htm
- URL: http://www.jaaulde.com/
- Comments: 10
Recent Blog Comments By Jim
-
When To Use $scope vs. scope In AngularJS
Posted on Nov 11, 2014 at 9:27 AM
@Ben, Thanks, that helps! I haven't had as much need for the non DI stuff in my current experimentation so I hadn't seen a lot of what you were talking about. I appreciate your writing on this site--I learn a lot!... read more »
-
When To Use $scope vs. scope In AngularJS
Posted on Nov 11, 2014 at 8:58 AM
Thanks, Ben! I too like to be "mindful of the code" so this post interests me. I am, however, rather new to AngularJS and wondered if you could give a contextual code example of when it would be proper to use `scope` vs. `$scope`? I am just not informed well enough to understand what you... read more »
-
Exploring Javascript's parseInt() And parseFloat() Functions
Posted on Sep 17, 2010 at 7:09 AM
@Vinh, No need to strip leading zeros, just give parseInt() the radix param telling it to use base10.... read more »
-
Exploring Javascript's parseInt() And parseFloat() Functions
Posted on Sep 16, 2010 at 1:14 PM
Mark, It is for that exact reason the the LINT (mentioned above) requires parseInt() always be given the radix parameter. Jim... read more »
-
Exploring Javascript's parseInt() And parseFloat() Functions
Posted on Sep 16, 2010 at 11:31 AM
Ben, JSLint ( http://www.jslint.com/ ) is a static code analysis ( http://en.wikipedia.org/wiki/Static_code_analysis ) tool written and maintained by Douglas Crockford. It is GREAT for avoiding issues common to JS as well as finding bugs when all other debugging efforts have failed. I even h... read more »
-
Exploring Javascript's parseInt() And parseFloat() Functions
Posted on Sep 16, 2010 at 11:18 AM
If you're just now learning this, you must not be LINTing your code. ;) LINT requires you pass the second param to avoid code bugs which can pop up when you let JS guess the base.... read more »
-
Wrapping The Window Object In A jQuery Wrapper
Posted on Feb 3, 2010 at 1:36 PM
I use the self executing lambda with params a LOT, but with window using self might be the simplest: jQuery( function( $ ){ var window = $( self ); console.log( window ); } );... read more »
-
Is Simulating User-Input Events With jQuery Ever A Good Idea?
Posted on Jan 30, 2010 at 4:01 PM
I find myself doing it a lot, but it's because I am working in an old system which needs some refactoring to its core. I completely agree that designing an API to avoid simulating user input or triggering the inout events is absolutely ideal.... read more »
-
A Graphical Explanation Of Javascript Closures In A jQuery Context
Posted on Feb 4, 2009 at 8:50 PM
...continued from my previous comment... I forgot to add that the chaining capabilities allow for "self executing" lambdas which is one of the coolest namespacing tools available.... read more »
-
A Graphical Explanation Of Javascript Closures In A jQuery Context
Posted on Feb 4, 2009 at 8:48 PM
What makes most of this possible is that JavaScript is "lexically scoped." This means that something is in the scope in which it was defined--not where it ends up. Wherever I wrote the function, it is in (and stays in) that scope. Lexical scoping and lambda (anonymous) functions combined with Jav... read more »