« first day (1432 days earlier)      last day (3517 days later) » 

9:00 AM
okay, i'll try
 
Fuck yea! Netflix is finally available in Austria!
 
BUT, it will NOT help^^ almost sure...
 
@OctavianDamiean I would bother I was living in Austria
Honestly I won't bother at all, as it's avaiable in uk for last 3 years :/
 
Why'd you leave Austria mate?
 
Netflix is a trap
@OctavianDamiean too cold for me :-(
 
9:04 AM
You've left Austria because it was too cold and move to the UK?
haha
 
the problem does not come from the event i think... the problem comes from my way to "update" my select fields...
 
@Julo0sS was just saying that stopPropagation is not what you want. It haults all related events, including the ones you setup. preventDefault as the name suggests would prevent only the ones the browser sets.
 
xD, for last couple of years, UK has been alright tbh, not too cold
Dubai is next on the list though ;)
 
Where did you live in Austria?
 
well, if i analyze what's goin on... i have a form... with fields.. with NO selected item by default... when i click (my event) on my caller, the popup comes, and, with my ajax query, i get data from the caller id, then i put the data i get into the form's inputs
i "unselect" possible selected items in my <select> elements, then set new selected one with the data i have back from my ajax query
it works ONCE only
first time i call, my inputs are pre-set ok
i leave the popup, so my input are STILL set
i call the popup with another id
my popup inputs are set right with the new data i get from this other id
i leave the popup
NOW, if i call the popup again, with any id i already called before, my inputs are set ok, BUT my <select> elements are NOT set correctly
this makes me... crazy...
^^
 
9:14 AM
anyone on chrome ubuntu right now?
@SecondRikudo IIRC, you are on chrome in ubuntu right? Is the chrome guest account working for you?
 
Gee, I think I scared off that "Badger Girl" person.
 
Any idea Cerbrus?
 
She's okay
 
I tend to get very "Hell no"-ish when people start off asking for my facebook and saying we are meeting.
 
Does that happen on a regular basis?
 
9:20 AM
On here? No. On some other sites: You'd be surprised
Maybe I got the wrong impression of him / her... Ah well...
 
It's her, I checked
 
Double checked? ;)
 
lol
 
In case she reads back the chat: @BadgerGirl: Next time, try chatting to someone a bit before asking them for their FB pages / to meet. And don't just drop their real names in chat when they use an alias. That's kinda creepy. Just some friendly advice...
 
I don't wanna live on this planet anymore.
 
9:28 AM
wth, i think it's the first time that, after about 1hour (MORE THAN 60 MINUTES), i don't have a solution for my problem... StackOverflow has changed.. :P lol
 
@AbhishekHingnikar the founder of paypal runs a transport service to moon, try that. Not quite affordable though, $80k per trip.
 
@AwalGarg You mean Elon Musk and SpaceX? ;)
 
@Julo0sS no, your problem is weird. also, make a fiddle.
@Miszy ain't completely sure but maybe that.
 
@AwalGarg It's the guy behind Tesla Motors too
 
Swift debugger, Y U crash :/
Can't we be friends oh swift debugger?
 
9:30 AM
@BenjaminGruenbaum Xcode 6?
 
Oh hi @Miszy what's up?
 
@Miszy nice
 
Yeah, XCode 6
 
i'm sure, really, that, if i make a fiddle, the problem will NOT occur on it ! !! ! xD
 
I can't archive my app in Xcode 6 so I can't distribute it to the TestFlight. Fun, right?
 
9:30 AM
lol, awesome
 
> blah blah wrong certificate blah we can't fix it blah
And it used to work on Xcode 5 just fine ;)
 
&, on fiddle, i'll have to include libs like fancybox & so on... many code...
 
@BenjaminGruenbaum Well, I'm back in the land of the living ;)
 
@Miszy what happened?
 
@BenjaminGruenbaum Well… nothing really. I just took some time off, tried to spend more time on many different things not only the Internet ;)
 
9:34 AM
i'll try this :
i'll "empty" all of my "<select>" items, update its content with JQ and THEN, only set the selected ones... this will be... slower^^ but... this may work... (but, it won't help me understand the problem)
 
@Miszy cool then, do anything interesting?
 
@BenjaminGruenbaum Reading about Stock Exchange, Trading for a Living currently ;)
How are you?
 
If two of my stations are connecting using mdns for discovery is it logical to use tls between them ?
 
30-second Mjolnir. Booyaa!
 
Jesus did I make some conceptual mistakes when I was younger
3
I hate looking at my old code
 
9:38 AM
@Neil +1
 
@Neil lol I hate the code I wrote 2 months back ;p I have learned a lot after that, in this room specially.
 
@AbhishekHingnikar Don't star that. XD
 
i didn't
 
Actually, I did :P
 
@Cerbrus Great.. now everyone knows I'm human. Thanks!
 
9:40 AM
17, where you learn to hate your own code :P
 
Anybody got a good tutorial on torrents, as in using libtorrent programmatically and
https ?
 
I was using a std map all wrong
 
You weren't using an "std" map "safely"?
4
Sorry, couldn't resist
 
@Cerbrus Hah
 
hahahahaha
 
9:42 AM
I created new integer pointers and threw them into this map
 
@Miszy coding iOS apparently.
 
Because I suppose I thought that that way I could put in NULL and it would have some special meaning for me
 
@BenjaminGruenbaum Woah, that's big ;)
 
then I didn't delete them afterwards
Not sure why I didn't think to do that
 
hi
 
9:44 AM
@Miszy well, I'm fairly new at it, so I keep rewriting the thing over and over when I figure I did something wrong, having a lot of fun though.
 
Why Swift not Objective-C?
 
guys any client side JS practice project suggestions?
for exercising DOM specially.
 
Build a image processing app
Errr
Using divs as pixels </dom>
 
@AwalGarg Hmmm, make a menu, minimizing as much js as possible
 
define menu
 
9:46 AM
@Cerbrus precondition: really fast computer, lots of patience
 
!!google menu
 
Once that works, allow the possibility to put in combo boxes and checkboxes
 
@Neil what kind of menu? Like the ones at top File Edit Blah blah?
 
@JanDvorak: Actually, in canvas, some rudimentary image processing wouldn't test one's patience that much
 
9:46 AM
menu as in restaurant menu?
or ui menu
 
But the div thing... yea xD
 
@AwalGarg Sure, construct it entirely in the dom though. Don't make it from js, that's cheating
 
@Cerbrus I mean, it's going to be really slow
 
Menu is one of those things probably done many times before, but if your honest, you'll try to do it without copying from another's example
The point is, afterall, to learn right? Don't minimize the learning experience :)
 
@Neil hmm, not much difficult I guess. Lemme try that.
 
9:48 AM
A classmate wrote a small app with some basic filters you could apply to images. It wasn't that bad, actually
 
@Neil lol I hate copying other people's code
 
why is it bad to use a lib though?
its not like you write the asm to draw the menu thorough gdi if you are windows programming
 
"basic" being: noise, inverts, colour changes, nothing too clever
 
@Petah when you can write 2 lines of code yourself, don't include a 200 line lib.
 
@AwalGarg It has to open on click or hoverover and must include nested menus
Good luck :)
 
9:49 AM
a menu is not 2 lines....
 
@Petah are you sure?
 
yes
 
define "line"
 
@Neil nested? that... is... not easy I guess. Would try though.
 
I can do entirely without newlines
 
9:50 AM
I've seen nested menus done entirely using css, no js
 
@JanDvorak lololol
 
<nav class="top-bar" data-topbar role="navigation" ng-hide="!authentication.isAuth"><ul class="title-area"><li class="name"><h1><a href="#/home"><img src="~/App/assets/cl_logo-small.png" alt="" width="45" height="33"/></a></h1></li><li class="toggle-topbar menu-icon"><a href=""><span translate>NavMenu</span></a></li></ul>...
Etc
Just 1 line
 
@AwalGarg If you run into problems, we can help, assuming of course that we're around and we feel like it ;)
 
that's how most of PHP-generated HTML actually looks like
 
@Neil sure :D
 
9:51 AM
This was actually handwritten with all spacing removed :P
 
lloc
 
But same deal :P
 
actually, come to think of it, PHP-generated code wouldn't have those fancy space characters in it
 
are we talking about pure css/html or libraries as per the angular example above?
 
meta.stackoverflow.com/questions/271520/badge-electorate Can we close-vote as "OP doesn't get basic math"?
 
9:55 AM
@JanDvorak no, that's how most "bad"PHPcode generated HTML looks like. good php code = good output.
 
@Cerbrus The description is confusing
 
menu in jQuery: $(".menu-item").click(function(){$($(this).data("target")).toggle()})
 
@Miszy Confusing until you realize the absurdity of interpreting in the alternative way
 
!!jquery toggle
 
9:56 AM
@Neil It should be improve, +1
 
The only improvement I could suggest is to make the word "total" in that badge's description bold.
 
@Cerbrus I commented on your answer. It isn't a criticism
I think the whole thing that it is unclear is a little absurd
 
+1
This is the first time I ever CV's a meta post... As "Can't reproduce"
 
That's like if I said, "Give me a smoke, baby" and someone says, "Hmm, a little unclear here.. do you want a cigarette or a smoking baby? Perhaps we should rephrase for clarity sake."
 
http://stackoverflow.com/questions/25887429/anonymous-functions-bra‌​ckets-inside-or-outside
 
10:04 AM
The meaning is clear because while the alternative is valid english, it's bonkers
@Cerbrus Why is it being closed as primarily opinion based?
It's not even valid Nvm
 
can someone remind me what was that event which gets called when mouse is focused somewhere?
onmouse[something]?
 
So, basically, that means the description wasn't read properly. Which means this is just a case of "PEBCAK"Cerbrus 29 secs ago
 
@AwalGarg onmouseover, though you probably are looking for onmouseenter instead as onmouseover fires everytime mouse moves
 
@AwalGarg Sure. Google can do that ;)
 
@Neil no no, the one which fires when your pointer goes and sits on an element for a while.
@Miszy couldn't find it there.
mousedown yeah that... got it!
thanks :)
oh wait.
 
10:09 AM
@AwalGarg Define "for a while". You mean a delayed onmouseover of some sort?
 
for(;a;){while(){}} ?
 
You move your mouse over a div and what do you want to happen? Immediate one-time trigger of event, immediate multiple triggers of event, or on click?
 
@Neil ahh I guess there is no such thing. I think I made a custom function for that somewhile ago, and yeah, I mean, the pointer focusing on the element for "a while".
I would do the custom function thing again :)
 
a while just means, activate a timer, and at the end of which, assuming onmouseleave isn't triggered, you do something
 
@Neil yes that. exactly.
 
10:13 AM
just be careful not to trigger it multiple times, so use onmouseenter
 
ok
 
Also, onmouseleave, you would do well to cancel the timer event
if you set a flag, you risk that the user enters again before the timer ends and you have a mess on your hands
 
sure
 
you could probably still manage, but it gets complicated and not worth the complication
 
First time I see the new code snippet. It's not perfect but it's fine enough :)
 
10:17 AM
Quick, someone convince me to go to class
 
@Cereal There's no pretty chick in your room right now
 
@dystroy There's no pretty chick in my CS classes either, trust me
 
@Cereal Well... Maybe there's one right now ? 0% chances vs 0.1% chances...
 
Maybe I could just skip my first classs....
protip: Don't schedule 6 hours of lectures a day. You lose all will to go
back to back no less
 
i think i got the issue from my problem... but still can't solve it... need help to understand how to stop "href" when i click on an <a> tag, apply a function by on.click event on it, and, once my function done, need to re-enable the href from the first click on my <a> (without calling again this on.click function)....
anyone? :)
(kinda afraid to "ping" people :P )
 
10:26 AM
Hum... Maybe it's not time to use the new code snippet. Same answer than mine but with a fiddle instead of SO code snippet, coming after mine, is upvoted, not mine...
 
dystroy if you have a few minutes just to have a look at it... ;)
 
It is vastly unclear how easy this would be. Even assuming we could provide a precise answer for the technologies being used, you did not mention the size of the site, which seems to be paramount to knowing if 3000-5000 is acceptable. Let me respond your question with another question, "A client offers a construction company 20 thousand to build a house. Materials being used are: wood, steel, nails, sheetrock, glass. Is 20 thousand a good estimate?" — Neil 54 secs ago
How can people be this dense?
 
@Neil depends, is the house blue or green?
 
@OctavianDamiean It's white
Duh
 
That's a tough question then.
 
10:37 AM
Hey all
Would anyone be able to describe why this returns null and how I might be able to change it?
The code works in another application, however in that application this.value references a button, not a link.
 
is it possible to check via js which numbered child an element is of its parent?
 
@AwalGarg Yes.
 
@SecondRikudo how?
 
@SecondRikudo You don't seem to have any .resolveDialog element
 
@dystroy What?
 
10:42 AM
@AwalGarg with jQuery api.jquery.com/index
 
@SecondRikudo He''s talking to me
@dystroy Fuck.
 
console.log($(".resolveDialog").length); // => 0
 
Yeah it was meant to say dialog-confirm
 
@AwalGarg [].indexOf.call(element.parent.children, element)
 
10:43 AM
@SecondRikudo sorry... you happen to have a nick starting with a S and I happen to not being attentive enough
 
@dystroy kk
I usually type 2-3 characters, but even that is sometimes not enough :D
@Petah no jQuery needed please.
 
@dystroy Figured a solution, it's not a good one, but I can use ID instead of value.
The IDs will all be unique anyway as they'll be populated by primary keys in a db
 
@Sippy this.value is "undefined" and is not "1604"
 
@SecondRikudo ok thnx
 
@Julo0sS If you switch out value for ID it all works.
Because apparently A tags don't render value attributes.
 
10:46 AM
@Sippy That's understandable.
 
@Sippy : have a look at this pls ;) : stackoverflow.com/questions/25885239/…
 
values are for form inputs, a isn't a form input.
 
@SecondRikudo no obscurity needed please
 
@Petah var indexInParent = function(node) { return [].indexOf.call(node.parent.children, node); }
Done, no obscurity.
var index = indexInParent(this);
jQuery is good for certain things. Such trivial object queries, not so much.
 
@SecondRikudo sorry that is clearly expressed and easily understood
my mistake
 
11:00 AM
@SecondRikudo uhh..
node.index() - the jQuery way to do this
Slightly simpler I'd say :P
 
@BenjaminGruenbaum $(node).index() you mean
And also
 
Depends if your node is a DOM object or a jQuery selection set.
 
HTMLElement.prototype.index = function....
Is also pretty simple.
 
Yeah, but why risk implementing it a million times if you can use a version you know works everywhere?
 
@BenjaminGruenbaum If I don't have jQuery on my site, I wouldn't add it just for this.
 
11:01 AM
It's quite possible that - for instance - IE counts children differently from Firefox (let's say - IE ignores comment nodes and FF doesn't)
jQuery normalizes all that.
(Also, 99% of the times .index() is code smell anyway)
 
11:15 AM
does anyone on this chatroom have a few minutes to look at my problem please...
 
@BenjaminGruenbaum is this Angular module good with local storage API ? github.com/grevory/angular-local-storage
 
I have some elements with the same event listener attached. Now how to check which element caused the event firing?
 
@AwalGarg this will be the element which caused the event firing.
 
@SecondRikudo thanks :)
 
(Inside the event listener function)
 
11:22 AM
@SecondRikudo hm?
 
@AwalGarg el.addEventListener('click', function(e) { //this is the element that triggered the event
 
@SecondRikudo doesn't work
 
posted on September 16, 2014 by razvancaliman

Using CSS Shapes we can create experiences that we have never been able to create on the web before.

 
is passing the event object necessary?
 
@AwalGarg No.
Code?
 
11:26 AM
yea just a minute
 
<a href="#" id="r1A" role="button" tabindex="-1">
<input type="button" id="r1B" value="Back" role="option" aria-pressed="false" class="keyboard-enabled" tabindex="6">
</a>
<input type="submit" id="continue" value="CRA" name="continue" class="keyboard-enabled" tabindex="7">
 
@user2577756 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Julo0sS Your question is long and hard to read.
 
How to remove complete <a from this
Sorry
 
Consider editing it to get rid of unneeded parts, and fix your grammar.
 
11:28 AM
Question is : I have a Html having <a , <input lines in it and i want to remove complete <a part of it
how can i achieve
 
@user2577756 ... Is this a string? In the DOM? Do you want to remove just the a? A plus all children?
 
var myFunc = function(param){ console.log(param); //and do something else };
el.addEventListener('click', function(){ myFunc(this.dataset.myData); })
@SecondRikudo ^
It just references to undefined when called
 
Ex : <a href="#" id="r1A" role="button" tabindex="-1">
<input type="button" >
</a>
<input type="submit">
I want to have it output as
<input type="button" >
</a>
<input type="submit">
without </a> as well
 
noob alert:
how do I get from
var doublestruck = {
"ℂ" : "C",
"ℍ" : "H",
"ℕ" : "N",
"ℙ" : "P",
"ℚ" : "Q",
"ℝ" : "R",
"ℤ" : "Z"
}
the string "ℂ" I thought doublestruck[0];
 
el.dataset.myData is undefined then.
Is this d3?
 
11:30 AM
<a href="#" id="r1A" role="button" tabindex="-1">
<input type="button" >
</a>
<input type="submit"> TO => <input type="button" >
<input type="submit">
 
and how is this thing called in javascript ? a list ?
 
@90intuition an array?
 
@90intuition ℂ is the key, it's assumed that you know it (or some part of your program knows it).
 
I thought an array was [0,1,2,3,4] like
 
@SecondRikudo I can console.log it, so it is not undefined. and nope, this is not d3.
 
11:31 AM
@90intuition an object, or a dictionary
 
@90intuition That's an object.
You can get to it, but you'll likely have to iterate the object to get to it.
 
don't understand why this is not working.
 
@90intuition oh, yes what you wrote above is an object, not an array
 
@SecondRikudo I am adding the event listeners in a loop to multiple objects. Does that matter?
 
11:32 AM
Though a map isn't a "type" in javascript, you could call it a map because you're using it like one
 
@AwalGarg Shouldn't.
 
hmm, time to hit F12 then :D
 
@90intuition What is special about that value? It's the first one?
 
posted on September 17, 2014

It’s time for some browser stats, as always courtesy of StatCounter. I didn’t report the Q1 stats before because I was too busy with the book. So here are the Qa and Q2 stats in one easy-to-digest package. Headline: Chrome. Q1 and Q2 were Chrome’s quarters. The browser grew on desktop, mobile, and tablet, though the desktop growth was minimal. Mobile On mobile Chrome&#

 
@SecondRikudo ^^ so what should i do...? my english is not perfect, this is not my 1st language.. i try to do my best to be understandable, and i updated it 3 times... with new informations...
the main problem, actually is : i have href on my a link, my href enables my popup to be visible, so i can't disable it. on another side, i have on.click on my a link... my on.click event does some ajax and data update to my popup form... i think the main thing is that my data update has not finished when the popup shows up... need to handle this... disable my href, do my update, then when finished, enable my href again
to let the popup show up
 
11:33 AM
@KendallFrey now I just want to loop through it, and get both the double struck and the normal letter
but I can only loop through it can get the normal letter
 
@Julo0sS First, your question is too long. Make it shorter.
Your code sample is unneededly huge. Make it shorter.
 
@90intuition have you tried Object.keys?
 
@SecondRikudo ok i'll edit it now
 
Second, try to use I instead of i, use commas and periods to make reading easier.
 
var doublestruck = ["ℂ", "ℍ", "ℕ", "ℙ", "ℚ", "ℝ", "ℤ"];
console(doublestruck[0] === "ℂ");
 
11:34 AM
-1
Q: confused about this javascript closure pattern

Andrea Scarafonih = function(){ x = function(){ alert("try"); }(); x; }; I'm confused about this behavior: the inner function is immediately invoked, and it's ok. But why i must have an assignment? Why i can't write it anonymously?

What is this guy even trying to do?
 
@90intuition for (doubleLetter in doublestruck)
 
This would be an array. Maps are like arrays, just accessed by keys rather than an index (though you could also use numbers as keys)
 
Inside of the loop, doubleLetter refers to the double struck letter, and doublestruck[doubleLetter] refers to the normal letter.
You may want to change your variable names though
 
doublethought superplusgood
 
@SecondRikudo ah okay, thanks !
what is wrong with my variable names :P ?
it works :)
 
11:39 AM
@90intuition thisislessreadable thanThisOneWhichIsMoreReadableEvenThoughItsLonger
Second, doublestruck is not a good name for an array or map
doubleToNormalMap is nice
 
@SecondRikudo is it... "better"?
 
okay, I understand nice, I guess you are right, that is the only thing I kind of liked about objective C
 
@SecondRikudo ahh you were right. the dataset was... well, capitalization mistake. Sorry :D
 
@AwalGarg Capitalization is the difference between "I helped my uncle Jack off a horse" and "i helped my uncle jack off a horse"
 
bbiab
 
11:47 AM
one other question, I'm used to xcode, which I think is quite nice for iOS app, but what is a good tool for javascript ?
for osx ?
 
the dev console inside Chrome
 
@JanDvorak yeah sure ,but for writing ?
 
I use PSPad
 
I use sublime (as code editor, formatter not IDE)
 
jsfiddle.net/bwdz6u16 why can't i get the "users" to populate the text field?
 

« first day (1432 days earlier)      last day (3517 days later) »