david karapetyan
Member since Dec 2, 2010
- Profile: /members/7401-david-karapetyan.htm
- Comments: 8
Recent Blog Comments By david karapetyan
-
Learning Event-Driven Programming Best Practices From Web Browsers
Posted on Dec 13, 2010 at 10:47 PM
Sorry, but one more. I did an experiment as well using your template as a guide by setting up two input fields and trying to trampoline between the two. Similar to what you observed there is only a single back and forth. Here's the javascript code I used if you wanna mess with it. I just fou... read more »
-
Learning Event-Driven Programming Best Practices From Web Browsers
Posted on Dec 13, 2010 at 10:17 PM
An addendum to my original comment. Try the following Ben: var focusMe = $( "#focusMe" ); // Bind to the focus event on the input. focusMe.focus( function(){ // Log that fact that we made it. console.log( "User focused me!" ); // Re-trigger the focus event on the native ... read more »
-
Learning Event-Driven Programming Best Practices From Web Browsers
Posted on Dec 13, 2010 at 10:02 PM
Your example worries me a little bit. The browser shouldn't be concerned about you falling into an infinite event loop and prevent you from firing the same event from within the event handler. I can't think of a use case now but I'm certain some kind of recursive event handling is useful in some ins... read more »
-
Seven Languages In Seven Weeks: Prolog - Day 3
Posted on Dec 11, 2010 at 2:37 AM
You're a better man than me. I just skipped day 3.... read more »
-
Seven Languages In Seven Weeks: Prolog - Day 2
Posted on Dec 6, 2010 at 10:12 AM
Many of your solutions differed a lot from mine. You used a lot less parameters in your recursive solutions and it was a good learning experience to see solutions without accumulators. I'm not sure if that is good or bad because it's hard to get a sense of the complexity. All my intuitions a... read more »
-
Seven Languages In Seven Weeks: Prolog - Day 1
Posted on Dec 4, 2010 at 10:30 AM
@Ben, I agree about the weird semantics. Unification as a computational strategy is making my head spin. I was looking at the list reversing assignment for day 2 and I had no idea how to go about it so I cheated and I'm glad I did because there is no way I would have figured out how to do it on my ... read more »
-
Seven Languages In Seven Weeks: Prolog - Day 1
Posted on Dec 3, 2010 at 6:27 PM
Good write up Ben. It's good to know I wasn't the only one being tripped up by the negation operator. The wikipedia article http://en.wikipedia.org/wiki/Prolog#Negation has a short but terse explanation about its nature and the way I understand it is that the rules that contain the negation opera... read more »