« first day (597 days earlier)      last day (4576 days later) » 

00:55
*sees tons of gifs....
i think ill come back later
@Dave
can anyone tell me why id choose jQuery Masonry over Vanilla Masonry?
http://masonry.desandro.com/
why would i not use the jQuery one?
01:20
Why would you?
What's Masonry?
Hmm, cute name!
@tereško I mentioned i am just a beginner. I am designer not a hardcore programmer , i just use jquery sometimes ..
01:34
0
Q: Is this effective User data Storage?

Outlaw LemurI am writing my own website where users sign up. It then saves that data in an array. I want to know if this is effective or if there are better ways to do it. Thanks! var isLoggedOn = false; var numberOfUsers = 0; var users = new Array(); var correct = false; var currentUser = new User(); var d...

02:27
@russianbox It is so cool!
in Soviet Russia, you see a loading image before loading the loading image.
@OmeidHerat In Russia Union, you see before knowing it is a tag that is mysterious.
in Soviet Russia, questions you.
@OmeidHerat in Russia Union, answer your questions.
user1385191
03:38
what happened to this room?
user1385191
it looks like the North American iteration of the abomination known as the Android chat room
LOL
03:58
3
Q: Does heavy JavaScript use adversely impact Googleability?

A TI've been developing the client-side for my web-app in JavaScript. The JavaScript can communicate with my server over REST (HTTP)[JSON, XML, CSV] or RPC (XML, JSON). I'm writing writing this decoupled client in order to use the same code for both my main website and my PhoneGap mobile apps. Ho...

04:19
Hi friends, is there anyway to get the content height of an iframe in IE after some insertions?
sorry maybe I didn't express myself clearly, I mean that there is an <html> element in an iframe, $('html').height () do not change even if I insert some elements. This situation just occurs in IE.
$('html').height () // for example 140,
and then I do some insertions such as $('<p>This is a test</p>').appendTo ('sometarget');
$('html').height () // still 140 in IE, but 160 in Chrome, the later is what I want
Thank you all ;P
 
1 hour later…
05:37
RT @silviapfeiffer: New blog post: Video Conferencing in HTML5: WebRTC via Web Sockets http://bit.ly/KuMEGH
06:06
Should i actually write a module :-(
in C++
its epicly fast

56ms for 40 files instead of 5200ms for 20 files[in JS]
but my knowledge of C++ is poor :-(
06:48
gonna learn C++ t
can't you just create a C++ "bridge"?
or even in js
07:16
Hi, it's possible to create an associative array in JS using a number in the key value? like:

var arr = {abc : {0001 : 'string_0001', 0002: 'string_0002'}};

and then printing it using something like alert(arr.abc.0002)? I was trying it on jsfiddle but it didn't work.. http://jsfiddle.net/Pp3uE/8/
is there some workaround to do it? thanks
JSON.stringify
@FlorianMargaine even for the "bridge" i need to know stuff
@BeNdErR actually, you got the syntax wrong jsfiddle.net/Ralt/Pp3uE/16
@Abhishek guess so :/
and 2 years i have rusted my knowledge of C beyond repairment
@FlorianMargaine oh, awesome, thanks!
07:19
the thing that frustrates me about C++ /C is data-types.
like each and every library has its own representation of a nice lil string
v8::String != std::String != mpg123_string != lame's string i mean wtf~!
3 headers each with its own representation of string !
@BeNdErR if you want to see the whole object jsfiddle.net/Ralt/Pp3uE/19
@FlorianMargaine i seriously feel js is a beauty now (XD)
@FlorianMargaine thanks :)
@Abhishek hehe
:-/
esp libmpg123 ugh
its sooo badly procedural no OO atall!
07:51
hi to everyone. chat is awesome
hello
Sam
Sam
08:10
Morning
08:26
heh, full of jquery...
1
A: how to get the unique items in jquery

Florian Margainevar items = [], txt; $( '#ultreecurri li' ).each( function() { // Cache the text to avoid retrieving twice the same property txt = $( this ).text(); // If the text isn't in the array, add it if ( $.inArray( txt, items ) === -1 ) { items.push( txt ); } } ); console...

wish i had something like jQuery on C++ @FlorianMargaine (kidding)
you know you're going to hell for this sentence?
Sam
Sam
Haha :p
@FlorianMargaine lolol
i am just joking ^_^
I know
I'm not.
08:29
:-(
Sam
Sam
Can either of you 2 think of any way to improve this question? It hasnt had any answers since i posted it
5
Q: Google Maps InfoBubble pixelOffset (Moving from default position above marker)

SamI am trying to implement a custom infoBubble that has the box opening to the side of a marker. This has turned out to be harder than expected. Using the normal infoWindow you can use pixelOffset. See here for the documentation Using infoBubble this does not seem to be the case. Is there anyway ...

of course I am >_<
I am pretty sure somebody would someday ask on stackoverflow
"Is there something like jQuery.h for C++"
@Sam nice question, upvoting and starting a bounty if I can
yo wait
-4
Q: C++ html parser with jquery-like selectors

holden321C++ html parser with jquery-like selectors please recommend appropriate library

08:31
oh, it was asked yesterday
Sam
Sam
Oh great thanks @FlorianMargaine
you need to wait another day to be able to start a bounty
Upvoted.
@FlorianMargaine wanna downvote that question lol
Sam
Sam
It was yes, it says 12 hours till i can start a bounty
Cheers @Abhishek :)
@Abhishek nah, I won't downvote every single bad answer
08:33
seriously
peoples can be insane (XD)
C++ & jQuery trololol ...
no wait .. webkit.h pretty much internally CSS selectors should work like very very very limited jQuery ? right
dunno how internal css selectors work
iirc it's rather like DOM though
i will give it a read :D
// after i am done finding out my way through libmpg123
libuv and v8.h and node.h are awesome!
but libmpg123 , despite being very fast .. its yucky
09:07
o/
is someone have experienced with node-inspector on windows for nodejs
Sam
Sam
Not me im afraid
Hi again, i have some problems using jquery and jquerymobile.. i keep getting this error:

'undefined' is not an object (evaluating 'this.list[0].appendChild')

here you can find an example of what i'm trying to do http://jsfiddle.net/xdR43/12/
i think is something related to "append"
but I can't figure out how to fix it :\
Sam
Sam
I get this error in jsfiddle ->

Uncaught Error: Syntax error, unrecognized expression: :nth-child
Going to have a play around in jsfiddle now
eh i think is the same error i get in my app
but shifted to jsfiddle
Sam
Sam
09:18
Lulwut, there is no nth child in your fiddle, lol?!
09:28
I'm going crazy with that error
09:47
I fucking edited his post to contain MDN equivalent and he EDITED it back :DD
hehe
he seems to like w3schools
It needs enough downvotes to become transparent in opacity
so nobody can see the link recommended
one more needed
need a downvote?
nvm he deleted it
09:53
LOL
I wonder if he can see the connection from having upvote with MDN to -2 votes with w3schools
woot, got my rep point back :p
yeah they are now calculated instantly
10:08
jsfiddle.net/xdR43/12 anyone knows why I'm getting 'undefined' is not an object (evaluating 'this.list[0].appendChild') with this code?
 
1 hour later…
hahahaha
It's actually important :\
So many noobs abuse closures
yeah I know, btw this doesn't even test memory use
Well the closures are needed
I think
why do you nest
I only nest when I'm lazy
and with iterator functions
11:37
@Esailija I nest functions when I need access to closure variables
you are doing the var self = this thing, I prefer static functions in prototype that are bound per instance
I need var self = this in that code
so I can delegate the correct this value to f
if you can optimize the code with prototypes go ahead
the main motivation is to have clean list of equally indented functions somewhere instead of hunting them inside other functions
but sure I can look into it
is methods.js part of that library ?
12:13
Hello
Were not some of you responsible for helping with the regex for this monstrosity?
@rlemon lolwut :D
few days back someone was in here asking how to do some regex to do exactly this ^
12:33
@Esailija your version is less optimized
you check this.handlesForms on every request/response pair
@Esailija or you can use bind if you want access to the calling closure, like this gist.github.com/2867867
to remain in @Raynos's spirit
your still creating a new requestHandler and a new extractMethod function on every call
nope, only extractMethod and that's because I don't know what the hell is going on inside it :D
gist: 2868086, 2012-06-04 12:32:41Z
// Assume errorPage, jsonBody, formBody exist within scope.

function methods(routes, handleHttpForms) {
    if (handleHttpForms)  {
        return createHttpFormsRequestHandler(routes)
    }
    return requestHandler.bind(this)
}

function requestHandler(req, res) {
    var method = req.method,
        f = routes[method]
     if (f) {
        return f.apply(this, arguments)
    }
    errorPage(req, res, 405)
}


function createHttpFormsRequestHandler(routes) {
    return httpFormsRequestHandler

    function httpFormsRequestHandler(req, res) {
        if (req.method !== "POST") {
            return requestHandler.apply(this, arguments)
        }

        var args = arguments,
            self = this

        contentTypes(req, {
            "application/json": jsonBody,
            "default": formBody
        })(req, res, extractMethod)

        function extractMethod(body) {
            var method = body._method,
                f = routes[method]

            if (f) {
                return f.apply(self, args)
            }
            errorPage(req, res, 405)
        }
    }
}
no need to nest this way
So yes, new extractMethod is created for every form post
12:35
@FlorianMargaine your code breaks, you forgot the routes param
everything else is static
@Esailija .bind creates a new function :)
you're binding this, it will be available
@Raynos yes, that's what I'm referring to
True your right
The point is my one returns one of two functions. one of which creates a new function
it's the same
12:37
using bind just avoids unnecessary nesting
there is only 2 binds, the other one is only called once when you instantiate it
@Esailija and extractMethod reads the <input type='hidden' name='_method' value='PUT'>
so, for normal requests, or when the Methods instance doesn't handle forms, there is never new functions created
there is also far less indendation
if you really wanted to optimize the form thing you would just create 2 classes instead of that hacky boolean
or 3 classes, 1 to inherit from
:P
but that's just google style, soon you have 10 levels deep inheritance
if you go with that
Morning, I know this is a simple question but I'm having trouble finding any docs on the topic. How can I get the index/key of an object when searching by object value. For example:
var value; for( var key in object) { value = object[key]; //key is well,... key }
12:46
var obj = {1:'hello', 2:'world'};

I have the word 'world' and I want to get the key in the object to match
@Esailija in that example how is the variable 'world' used to find only that key?
!!> var obj = {1:'hello', 2:'world'}, value, key; for( key in obj) { value = object[key]; console.log(key); console.log(value); }
ffs
!!> var obj = {1:'hello', 2:'world'}, value, key; for( key in obj) { value = object[key]; console.log(key); console.log(value); }
@Esailija ReferenceError: object is not defined
!!> var obj = {1:'hello', 2:'world'}; Object.keys( obj ).forEach( function( key ) { if ( obj[ key ] === 'world' ) console.log( 'Yay!' ); } );
@FlorianMargaine SyntaxError: Unexpected token }
hahahahahahhahah
pro javascripters at work here :D
lol wow
@FlorianMargaine undefinedConsole log 1:"Yay!"
12:49
totally >_<
!!> var obj = {1:'hello', 2:'world'}; Object.keys( obj ).forEach( function( key ) { console.log( key + ': ' + obj[ key ] ); } );
@FlorianMargaine undefinedConsole log 1:"1: hello" Console log 2:"2: world"
@sadmicrowave btw, you get it...
@FlorianMargaine yea I'm trying it now
if you just want to know if a key exists in an object, you can use if ( key in obj )
!!> if( "toString" in {} ) "oh snap";
@Esailija "oh snap"
12:52
no I need the key of the specific property value
if it's a nested object, you'll have to include recursion though
ok, its not
@FlorianMargaine you're a drupal user yes?
got it setup on ubuntu?
12:54
right now?
and if i'm diving in, 6 or 7?
!!> console.log("test", "test", "test");
iwanna think 7
@Esailija Maximum execution time exceeded
12:55
setting it up on ubuntu is easy-peasy
@FlorianMargaine, @Esailija, will for( key in obj ) accept a tuple? like: for( key, value in obj ) ???
port forwarding on the seimens 2wire modem was a biatch :P
@rlemon go for 7. 6 is dead. The only case you'd go for 6 is if you absolutely need a module that you can't rewrite for 7
so anything easy will be nice :P
that's not related to ubuntu :p
@sadmicrowave js != python, there's no tuple :)
12:56
ok
and no, what you want to do is impossible, but you can use obj[ key ] to get the value
@rlemon why do you want to install it?
@FlorianMargaine so I can develop a site using it :P

« first day (597 days earlier)      last day (4576 days later) »