I came across this interesting gotcha while debugging through someone else's rails code. When you set a model's one-to-many attribute(an perhaps other association types as well), let's...
more
Okay, so in ruby:>> nil or 'value'=> "value"because nil acts as false when used with boolean operators and any other object acts as true. Now let's assign the result to a temp variable a:>> a =...
more
When you use Python optional arguments you should know that the default value you set is static, it is set at the time the function is defined, and does not change after that. If you a mutable type...
more
offsetTopelement.offsetTop does different things in gecko than IE, best bet is to use the function listed here: http://www.quirksmode.org/js/findpos.html, the code: function findPos(obj)...
more