Hey @costea_90, that sounds interesting - would you mind posting a codepen/jsfiddle demonstrating your method?
Excellent @nchudleigh, I'm glad they were helpful!
Following up on this, I loved the keys in ST3, but I found myself missing them in other applications so I ended up using Keyboard Maestro to set Vim shortcuts (and more) on browsers, email, IRC, etc. No doubt there's a Linux program that can do this too.
Thanks @steveinatorx, I'm glad the chain pattern was helpful!
@sally-yang-jing-ou, haha it's ok - I got eight emails for your comment, but only one comment appears in the thread so I think you discovered a Coderwall bug :)
As for returning a promise, it doesn't seem like _.bind is what's expecting the promise, but each of the .then()
functions likely is.
If you're using Q you could do something like this: http://pastebin.com/G2iGrxmt
If you're using a different promise library, the deferred calls would change, but the principle would be the same.
Hello @sally-yang-jing-ou
Could you give a little more detail on what you're trying to accomplish? Do you need to assemble a promise chain within the for loop, or return a promise afterward, or maybe resolve one afterward?
@ricobl, I didn't know about vi mode in bash! That's pretty cool. I might use that in combination with my new control-key movement since I should learn more vim shortcuts.
For now I ended up setting more shortcuts with Keyboard Maestro so I can toggle between split terminals and tabs, and scroll up and down in the buffer.
Hey @sandesh27
It seems like you're on the right track there. You could create a new var deferred = Q.defer();
before calling User.findOne
, then you could call deferred.resolve()
or deferred.reject()
inside the error and success conditions. Just make sure to use the deferred.promise
in your flow.
@veganoo - I'd look into the meta tag which is being set on that page: <meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>
. If that tag works in IE11 (which it appears to) then it would render without support for the :before
pseudo-element necessary to fill in the stars.
@veganoo - strange... it works in IE8+ for me. Did you work out what's going on in IE11?
That's a cool way to do it, @futbolpal - I assume that deferred
would be resolved within the_async_function
?
Thanks @fkiller - I'm glad to help!
@fredylg What does work in IE8? ;)
@paranoida Thanks. Updated with compatibility details!
@n1k0 You may be right. I'll leave that as an exercise to the reader ;)
@n1k0 Great point! That's much easier to read and avoids the need to create additional closures. I updated the examples with this.
@damienklinnert Thanks! I'm glad it was helpful :)
Achievements
1,842 Karma
251,980 Total ProTip Views

Nephila Komaci 3

Raven

Nephila Komaci

Walrus

Cub

@sunnyfrancis - see the last example. It shows how to do exactly what you're trying to do.