« first day (598 days earlier)      last day (4349 days later) » 

8:00 PM
or "Mrs.Google, should I use a DOM Shim or jQuery"
actually if you search those exactly you'll likely get an answer
 
@Zirak, Thank you, this is where I aim for now!
 
enjoy
 
@Hypn0tizeR see jsfiddle.net/7mhSw/10
@Hypn0tizeR sorry jsfiddle.net/7mhSw/11
 
Nice!!!
 
you may want to add some checks before attempting to remove "next". There is the possibility that it won't exist
 
8:10 PM
> IE up to 8 incorrectly counts comment nodes, too.
element.chidren
just be aware
 
Ok, will test it
 
<!-- comment --> is picked up as a node in IE<=8
 
@rlemon i just learned something, thanks!
 
I tried to do something the same but like @used2could did, but nothing happened)
Thank you men for your support
 
i'm a chick
i'm just manly
 
8:12 PM
lol
 
and have man parts...
 
learning new things day by day with you
 
wait...
 
:DD
 
what is the opposite of chick?
 
8:13 PM
Dead hen
 
i'm one of them ^
 
Decomposed hen
 
not ^
 
> JetBrains tools are very popular and very professional
is that true?
 
you're a Herm
 
8:14 PM
@FlorianMargaine never heard of them... so how 'popular' are they really
 
but I already have a bunch of querySelectors in my code, so a DOM-shim must be done))
 
@FlorianMargaine I've never heard of them
 
and not only
 
JetBrains is the ones who made WebStorm and such
And it's an IDE, so by definition it's shit
 
8:16 PM
emacs' fanboy there ^
 
Is there a way to launch IE6 for example having just the last version of IE? Something like ie.exe -launch ie6 blah blah blah
 
I've become a huge fan of Netbeans over the past year
 
lol
s/http\:\/\/chat\.stackoverflow\.com\/rooms\/17\/javascript/http\:\/\/google\.ca
 
@Hypn0tizeR no, that's why we invented virtual machines
 
Am I a dreamer? :D
 
8:18 PM
@Florian Margaine JetBrains tools are very popular and very professional — skwee 5 mins ago
 
Never will I understand what people mean by "professional"
 
@Zirak $$
 
What if my website is on localhost? Is there a software, freeware which allows me to test on different browsers without having them installed?
 
The explanations people give me sound like how Japanese people describe desu (which I understood to be a none-sense word, mostly)
 
Yes, its called installing all the browsers :)
 
8:20 PM
I guess it means "some people who earn their money with the web use these ides"
 
no you open up apache.conf and add Listen *:80 then in your VM goto 192.168.x.x
 
People can earn money coding things on Notepad
But you don't see people calling notepad "professional"
 
I am
it's on my resume
same with minesweeper expert
 
and jQuery developer
 
8:21 PM
professional means you know enough to last more than 6 months in a job
:)
 
minesweeper expert, lol
 
@used2could, Thanks!
 
Consecutive!?
 
@Hypn0tizeR seriously though... learn about how to make your localhost visible on your network... then your VM is just another box on your network. point it to the original machine.
I am doing this right now testing for IE
 
generally you will run into trouble if you dont do what @demon is saying
 
8:23 PM
@rlemon, i never use vm's what vm software are you using?
 
you dont need a VM
 
VirtualBox
 
install WAMP
 
don't you need to have a license for each OS you're testing in your VM?
 
I do (but i never checked to see if I didn't - I have all the software sources + keys)
 
8:24 PM
no, windows provide VMs to test their browser
hold on I'll find a link
 
I just don't want to have 6 computers on my desk.
 
trololol
 
thanks!
 
@AbePetrillo snooping, plz hold
 
I have WAMP installed, and what? But I don't really get what are you speaking about.. Less experience
 
Maybe I'm missing the point
do you need just one version of IE
or all of them?
 
Florian is copying my links :p
 
8:26 PM
@AbePetrillo, super handing. thanks a lot.
 
it's just nice to split screen and have two OS's to test on
 
handy*
 
Wow :)
 
yup
its a shame I dont get +1s here lol
 
and yes my displays are not the same size... or res... it is annoying at first but you get used to it.
 
8:27 PM
0
Q: Is there a better way of writing this JavaScript, or is it idiomatic?

briceMy background is with C and python, and Javascript is fairly new to me, so I'm wondering if this is reasonable code. In particular, is it appropriate to use the higher order function makecb in this context, or is there a better/shorter/clearer way of writing it? $(function(){ var controllers ...

 
@Hypn0tizeR++
 
@rlemon You can use workspaces, and have the VM take up a workspace
 
That's quite a nifty Ubuntu feature (11.04+ IIRC)
 
@Zirak but you cannot display separate workspaces on two displays. i tried.
short running two X sessions...
 
8:28 PM
you can run the windows VMs using virtual box ailis.de/~k/archives/…
 
yeah, if I had two monitors, I'd cream my pants and not use workspaces, sure ;)
 
hhh
Suppose objectA with objectA.name and objectA.surname, how can see the object as a list or something like that?
 
I have 4 :)
 
right monitor is always term/vm left is dev
workspaces break up projects
 
@hhh List of what? Values?
 
8:29 PM
objectA has to belong to an array @hhh
 
...what?
 
for value in objectA... look that up
 
@AbePetrillo i have many... but behind me is also three more pc's
 
I have a 14" CRT is anyone wants to lol at the flicker
 
hhh
8:30 PM
Well I am reading this Javascript SDK FB here and it has response.name but I would like to see what else it has.
 
Aren't those illegal now?
 
it's a FLATRON
they should be
 
ugh, w3schools
 
@AbePetrillo if you link w3schools one more time i'm flagging you
 
8:31 PM
lol
 
Just JSON.stringify the bitch
 
its offensive to real javascript developers
 
Or console.log it, really...
 
I SSH into the pc's that are behind me, I cannot stand looking at a CRT.
 
ah, it helps you get started
 
8:32 PM
@AbePetrillo no, it hinders your learning by providing false or incomplete information.
 
and I suppose a random blog post from a beginner is better
its the internet
nothing is accurate :)
 
Which also includes the previous statement
 
lol
 
I block w3schools from my google results!
and I have a shirt that tells the world!
 
hhh
Is it possible to do something like this pythonic thing in JS:

for( (x,y) in zip(response)){

}

for traversing {name: 'Mikie´, age: '13'}
 
8:34 PM
Why don't you try and see?
 
Zirak beat me to it lol
would be interesting if you can though
 
for( var obj in res ) {
    // assuming res is an array of objects
   obj.name; // "Mike"
   obj.age; //"13"
}
 
Tuples are in The Abomination, zip can be easily made.
 
Don
Hi I have a very simple jQuery selector question
 
oh my
 
hhh
8:36 PM
well I hope there was something such as R's puts that outputs the data-structure of the object, does such thing exist?
 
Just console.log(obj)
 
hhh
@Zirak library?
 
No, I'm a person
 
Don
How do I select all <span class="foo"> elements that are children (direct or indirect) of <div id="bar">
 
div.bar > span.foo // direct
div.bar span.foo // indirect
 
8:38 PM
Have you ever made CSS selectors?
bah...
I'm gonna go and sit in the corner
 
hhh
@Zirak Ofc, thanks -- tried to reinvent the wheel..
 
Don
@rlemon I was just about to add......when I already have a wrapped set containing <div id="bar">
 
hhh
@Zirak Abomination?
 
@Don so you have <div id="bar"><span class="foo"></span></div>
??
<div id="bar"><div id="bar"><span class="foo"></span></div></div> or this?
because if you have my second snippet you have conflicting id's and nothing will work (the way you expect it to)
 
Don
so I have

var bar = $('div#bar')

now, is there some way I can apply a function to foo so that it only looks for children that match 'span.foo'
so basically "search the children of the wrapped set that match a particular selector"
 
8:41 PM
.children(selector)
 
Don
sweet thanks rlemon, sorry for my laboured explanation
 
man are the docs broken today?!
 
at the risk of being attacked again, you can also use .find(selector) to get recursive children
 
this is like the third jQuery question where the most semantic function is the answer
 
Don
@AbePetrillo yes, I want to search all descendants, not just immediate children
so I guess I should use "find" then?
 
8:42 PM
well I would
 
yeah find would be the correct jQuery approach
but sans jquery id use element.querySelectorAll
/me goes home
@Zirak stealing the ipv6 joke
 
hhh
Any idea how to access the picture el of Graph API object in FB?

I can get it from URL but not from the object [here](http://pastie.org/private/ppvu6pu0tcpqgjrnujw).
 
Sam
Anyone able to help with this question? There is a bounty for it ->
8
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 rather than the default position of on top. 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 doe...

 
8:58 PM
use mapOverlay
i will try to post an answer tonight
 
Sam
Ok great :)
 
0
Q: Using require.js for handling plugin scripts, has anyone did that?

Nicola PeluchettiI'm starting to refactor the code of my plugin and i'm thinking about using require.js to handle the scripts so that i have a codebase which is more modular and testable. And i'm also planning to load by myself all the required dependencies (jQuery included) so that i'm not hindered by wordpress ...

 
hhh
What is "__proto__: Object"? In Facebook -object, I can access the fields but it has also an object (the latter) with getters etc -- any idea how to check where the picture is in this object?
 
don't rely on "proto"
 
hhh
9:18 PM
@DieVarDump ...how else are you supposing to get the image like this here? The object has the img?
(I can get the img like there with the url but not from the Graph API -object, picture is apparently in the proto...)
 
 
1 hour later…
10:31 PM
How to add my new elements before that Add Button? I've tried by inserting before, but probably I don't use correctly this function. jsfiddle.net/uq5Fb
I need the DOM to not be modified
 
I'll take a look
 
Thanks a lot!
 
i could try prepend, but i m not helping u with this code, u know better than me :) sorry
 
I'm not used to seeing raw HTML being injected into elements, but then, I don't use JQuery all that much ;)
 
can i try to make alternative of that code. let me try
 
10:40 PM
This is pure JS, not jQuery. Or I haven't got what you mean?
 
You must be using JQuery, either that or you overwrote the "$()" function it's famous for.
..though the fiddle does say you're not using a library, which is weird.
Derp.. found it
 
Ok, I got it working. I just appended the add button after adding the new element, forcing the add button to the bottom of the container it's in.
 
Oh nice! Thank you!
 
11:16 PM
First time that I'm in SO chat.. I'm analyzing Google Plus's source code, I found that Google use a iframe (id="js") to load more javascript intead writting down directly on the page.. Are someone know why they are doing this way?
And.. sorry for my english.. I'm trying do write better as I can...
 
Do you know where it's happening exactly?
And welcome!
 
Hello Jefferey, when you logged in at plus.google.com and then viewing the source code you can found this <iframe id="js" name="j624277340" src="/_/apps-static/_/js/home/b,s/rt=h/ver=bUuHrwJ-cgM.en./sv=1/am=!S9QerE1PzBOJlP3i3QVHfCTAKgIIhrHoF-uCErxhpfC3/d=1/rs=AItRSTOLD17y_BfNBeC3yFF5smyMeoQuRA" class="Pv" tabindex="-1"></iframe>
Inside that page is pure <script> tags, Google Plus's is loading more javascript in that iframe, but I can't see the reason to do that..
 
Well, I have known Google to use iframes for 'asynchronous' file uploading.
Maybe it's some sort of domain restriction... though I doubt it.
 
I detected that when I click a left sidebar link, a function was called inside that iframe and then the current <div> inside #contentPane was cloned and appended to <body> with "position: absolute".
 
You know... it could be "asynchronous script loading". If the script files are fairly large, it may be more practical to initiate another HTTP request, as opposed to locking the page while the scripts complete. I've heard of this practice before, though I've never known a practical reason to implement it, since well written scripts aren't usually 'that' big.
 
11:28 PM
Oh, that is a good point of view.
But Google usually use a <script> with document.createElement('SCRIPT') and then add 'async = true' to that dynamic created script to load it asynchronously...
Ok, 'async' attribute is not widely supported by browsers, maybe that is the reason for using iframe instead creating a script..
 
Yeah, I was thinking that too, but it (now) appears to be widely supported. It's a little strange to use an iframe just to minutely speed up the perceived performance. How big are these script files?
 
2300 lines..
http://caniuse.com/#feat=script-async

IE is the big problem there..
 
That's not too bad. That's probably about 50-100kb... Maybe 200-300 if it's condensed (and I know it is ;) )
Well, IE is always the big problem.
Now, if these script files are doing some time-consuming requests, there could be a good reason for it. For example, ads can take a few seconds to appear (though I always figured ads were asynch anyway)
 
Well, Google always have they performance reason to do thing in different way..
 
Poor Google has nothing better to do than to optimize ;)
 
11:41 PM
Thank you for clearing my doubts, I have never thought of it for performance reason..
 
Well, I still don't really know why they're doing it.
Best guess is optimization though.
 
What I'm looking for a better javascript load page mechanism than I have, and I figured that Google Plus have what I looking for..
 
Ah. What are you doing now?
 
A ERP webapp
 
No, I mean how are you loading Javascript now?
 
11:46 PM
creating <script> tag with javascript to load the page script. Into the page script I created the elements of the page and then 'appendChild' to the DIV.
 
Ah. How big are these script files (in KB)?
 
Well, less than 50kb
 
Oh, that's nothing. Have you read about Yahoo's optimization techniques?
 
Ok cool. With a file less than 50kb, you probably won't need to dynamically load the script file. Planting it at the bottom of the body tag's fine.
I'd argue that loading a script file by creating a script tag doesn't really give a performance boost.
Do you use onLoad where you could use DOMContentLoaded (or, since it's at the bottom of the page, nothing at all)? That could speed things up too.
 
11:54 PM
I didn't use onload neither DOMContentLoaded, just (function(){}());
 
Yeah, that's probably fine.
 

« first day (598 days earlier)      last day (4349 days later) »