« first day (108 days earlier)      last day (4835 days later) » 

10:00 PM
aahhh.. .then() not .when()
 
so unless $.ajax === $
:P
@jAndy so when => then, then yes
.invert is retarded :P
 
Hm no concerning the CV itself... US Style, or German Style >_>
 
$.when( $.ajax('/sucks.js') ).then(wtf).reject(logic)
bad thing is a call like this really is possible now
 
@jAndy :P
 
Soon all <del>JavaScript</del> jQuery code will look like this!
 
10:03 PM
@IvoWetzel <3
Rage @ .promise & .invert
Retarded methods are retarded
 
10:21 PM
I take that back. This is pretty clever.
 
10:32 PM
@Raynos: is .promise and .invert documented somewhere?
 
@jAndy nop. I dont get them yet. I get what there meant to do but now how they do it
Ehm the jQuery code and the github are different >_<
the github promise & invert are gah
Cant believe I was reading the wrong source -.-
it makes sense now
Damn son of a ! I finally understand it.
 
10:51 PM
How do I import another javascript library for use within a .js file? For example: creating a .js file that uses the jquery library.
 
@PerishableDave: there is no "import" or "require" or "use" or whatever in ecmascript
 
@PerishableDave I don't know
I think you have to do it in the parent html. Or use paste.
 
@PerishableDave In Browser?
Then search for requirejs
 
you would need to do it on your own, or use a library like "RequireJS"
 
@IvoWetzel @jAndy sweet thanks
 
10:56 PM
that is totally sweet @jAndy. I especially like the fixedwidth design aesthetic @ requirejs.org
 
> <!DOCTYPE html>
but a ton of divs...
 
@PerishableDave try supply.js !
 
word?
 
@Raynos got a link?
 
@PerishableDave: github.com/jAndreas/Supply
 
11:00 PM
if (!cancelled && !fired && !firing) {
    firing = 1;
    try {
        while (callbacks[0]) {
             callbacks.shift().apply(context, args);
        }
    } finally {
        fired = [context, args];
        firing = 0;
    }
}
Why have the if (!firing) check?
 
I wish I wasn't that lazy and finally would write backend parts in php & node
 
is it because of the async behaviour of try catch ?
@jAndy I'll get round to writing a backend for it in node at some point. Just nag me constantly, eventually i'll do it
 
@Raynos: heh
the snippet looks odd, shouldn't be necesarry to have a conditional like this
but I guess it's messing up in some browsers without
 
@jAndy nah the snippet is fine. I think you need the firing check because of the way catch works
youve got the try block because callbacks are 3rd party external code (written mostly by noobs)
You need to assert finally does happen or the code breaks
 
good night gentlemen
 
11:12 PM
@jAndy Good night
 
Sorry to bother you guys with this here, but I am pretty new to stackoverflow, and I have answered a question and the author has confirmed that it was helpful, but not marked it as the accepted answer. Is there any specific way, or any reason at all, for me to get him to mark it? Thanks
 
You can link him this with a friendly reminder that he should accept answers that solved his problem: meta.stackoverflow.com/questions/5234/…
 
thanks ivo :)
 
deferred = length <= 1 && object && jQuery.isFunction(object.promise) ? object : jQuery.Deferred(),
        // cache the promise
        promise = deferred.promise(),
I'm missing something
if length > 2 then deferred = false, then deferred.promise() == fail
nah I jsut fail :)
 
"All answers directly/indirectly imply 1 solution - "HASH"
You need to build a "HASH"."
 
11:32 PM
...
 
yeah i dunno
3
A: Is there a more efficient way to write this function?

davidvar month = function(n){ return ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][n-1]||false; }; alert(month(3)); Here is an example of how to do it using the module pattern (because that's ...

 
Dam, wrote a nice bug reply, hoping for a necromancer. Then realized that it was less than 60 days old. Sigh...
0
A: PHP OOP :: Building an API Wrapper class

ircmaxellPersonally, I would build this in 3 layers. Layer 1: API Interface This layer is where the actual line-level calls to the remote API take place. This layer is all about the protocol. There should be nothing in this layer that's API specific. Everything should be 100% generic, but should be a...

 
oh wow
0
Q: How to pass this parameter to this function?

RogerHere is my function: function updateRecord(id, textEl) { db.transaction(function(tx) { tx.executeSql("UPDATE products SET product = ? WHERE id = ?", [textEl.innerHTML, id], null, onError); }); } Here is the call: <span contenteditable="true" onkeyup="updateRecord('+item['...

tempted to ask for a live link so i can help 'test'
 
11:47 PM
lol
LOL
 
This should reduce later duplication of content from the CV
@CodingKitten Say something
 
@IvoWetzel you try micro optimising in JavaScript doesnt work, any more clem?
 
@CodingKitten What's a "clem"?
 
@IvoWetzel not for the same object. you that it take to get a generalist badge...
 
11:52 PM
@CodingKitten Has anyone really been far even as decided to use even go want to do look more like?
 
@david We PHP is so concise :D weren't even allowed to use any JS until 2 years ago when the last client enabled JS on other parts is fine. You search youtube until you subscribed to require a class to be consistent.
 
Do you think this is wrong (my assessment of his problem)?
0
A: Is there a design pattern for injecting methods into a class?

ircmaxellHonestly, it almost sounds like you're trying to do a Decorator. Basically, instead of directly modifying the classes/objects itself, you should write a "wrapper" object which adds the new functionality. Now, due to the limitations of JS with respect to this type of code, it's not a pure deco...

Honestly, not rep-hunting now. Just with my limited knowledge of JS...
 

« first day (108 days earlier)      last day (4835 days later) »