« first day (1035 days earlier)      last day (3927 days later) » 

11:00 AM
Am in holidays in Berlin currently. I have a really great time. So great that I may change my plans and choose to come live here instead of London
And you ?
 
@BenjaminGruenbaum I heard about it several times, but never saw any proof. It was just a browser bug, probably of IE or FF 4.
 
@Zirak I can't find any citation, I've heard about it before, which is why I didn't bother verifying before quoting it.
@dievardump I love Berlin :) It's an awesome city. I'm doing good, working on mobile and web projects on a tight schedule, flying to Finland on Sep 1st to have a beer with @Esailija and to work on our mobile app.
Then I'm going to St. Petersburg for a week with the wife.
 
Great ! I didn't know you have an app going on.
 
Basically Microsoft and Nokia approached us about the possibility of us developing an app for their platform first. They've been really helpful giving us developer devices, software and a 4 week course with the system creators in Finland. Versions for other phones will come a few months later probably.
 
Nice!
For TipRanks?
 
11:04 AM
Yeah, it's called Appcademy
 
@Deeksha you from India?
 
@BenjaminGruenbaum I don't get the reference
 
@FlorianMargaine fuuuu
 
Wth! Gratz. I didn't know anything of that. What is the app about?
 
@BenjaminGruenbaum redirected to thedailywtf.com/Articles
 
11:05 AM
http://thedailywtf.com/Articles/Classic_WTF_-_What_is_Truth_0x3f_.aspx
 
good!
wait... wat?!
omg
"wtf" is suited there
 
@dievardump Finance :) You can check the product on tipranks.com we have a free version too
@FlorianMargaine Hence the appearance on tdwtf
 
hence my message :P
 
Hahaha
 
@ThiefMaster, really why? How could I guarantee that jquery was loaded without the ready? — Liam 1 min ago
*facepalm*
 
user1125394
11:11 AM
good one
 
@ThiefMaster Gotta love $(this).attr("href")
 
well, this.href does behave differently than the attribute in some browsers
at least when reading it
(the property often returns the full absolute url while the attribute returns the actual attribute)
 
@BenjaminGruenbaum programmers.stackexchange.com/a/208402/43298 how is this connected to OCP in any way at all
 
@Esailija I'm the downvoter of that
 
@BenjaminGruenbaum ok then I will feel comfortable downvoting it too :))
 
11:18 AM
@ThiefMaster And which of these two did OP use in his sample code :)?
@Esailija Hah :P
 
user1125394
@SomeGuy impressive but I feel like svg or canvas is better suited
 
I'm off to the marketplace to get fresh things, be back later
 
@BenjaminGruenbaum it is ridiculous how the OP was just using us to confirm his opinion
 
@cx Yeah, definitely.
 
what is that called..
 
11:19 AM
@Zirak an auto-responder for AFK messages in the chat, like when I get pinged and I left and I triggered !!/respond blah it should ping the pinger back with blah.
 
Hi @all
Is it possible to let the system type some key functionalities
like ctrl + C
when I click a button?
 
Nope.
 
@Mr_Green in which?
 
javascript
 
user1125394
11:24 AM
@Andy Mr greenwich
 
@Andy that is happening when I press ctrl + z
I need to happen the same when I click on a button
 
@Mr_Green ohhh I Think you want this
wait
 
what I am trying to do is--
copy some text to clipboard
realized that it is possible only in IE
I just kept some text ready to copy by selecting it
but I am stuck here in copying to clipboard thing
 
$('.item').click(function(){
$( document.body ).trigger({
type: 'keypress',
which: 37,
keyCode: 37
});
});
@Mr_Green you can call here
 
user1125394
<button>X</button>
 
11:30 AM
yup working..
realized that this stupidity will not call "copy to clipboard" function..
 
@Mr_Green Is it helpful for you?
 
ya helpful man
thanks Andy
 
@Mr_Green You'll have to use Flash.
 
welcome
 
I can't
Any other way?
 
11:33 AM
None that'll work across most browsers
8
A: Copy to Clipboard for all Browsers using javascript

HagaThis works on firefox 3.6.x and IE: function copyToClipboardCrossbrowser(s) { s = document.getElementById(s).value; if( window.clipboardData && clipboardData.setData ) { clipboardData.setData("Text", s); } ...

 
The use of Components is now deprecated.
 
@SomeGuy i challenge Thee
in .. chess :D - coding one
 
I decline.
You want me to code chess?
I've done that
For work
 
Did it learnt ?
from user ?
 
Na
No AI, either.
 
11:39 AM
awh :-( no fun either , [coding wise ]
 
Multiplayer.
Yeah
 
I am looking into chess playing codes
 
I wouldn't really know enough about machine learning to be able to, though.
 
they are pretty fun ... especially looks interesting for your cuisine of code
@SomeGuy Thats an understatement, you can learn on the fly
 
Hey I created chess too
using javascript
not a good one though
 
11:40 AM
mostly you will be troubled by the data-structures, and the names they use and this room + wikipedia = ownage
 
user1125394
var board =
[ ['R','N','B','Q','K','B','N','R'],
  ['P','P','P','P','P','P','P','P'],
  [' ',' ',' ',' ',' ',' ',' ',' '],
  [' ',' ',' ',' ',' ',' ',' ',' '],
  [' ',' ',' ',' ',' ',' ',' ',' '],
  [' ',' ',' ',' ',' ',' ',' ',' '],
  ['p','p','p','p','p','p','p','p'],
  ['r','n','b','q','k','b','n','r']];
print(board.join('\n') + '\n\n');

// Move King's Pawn forward 2
board[4][4] = board[6][4];
board[6][4] = ' ';
print(board.join('\n'));
 
@cx implement an AI ?
 
@Darkyen you should focus on one project instead of always having a new lubby every now and then :p
 
@dievardump cant do :P, i have one that i am working on and other i am just browsing code for some1 which intrigues me and i dive deep init
 
user1125394
what's Artif Intelligence for you?
 
@cx the black playing back ? and understanding your moves ?
 
user1125394
Machine learning? neural network?
 
@darkyen what about your social network ?
 
yeap @dievardump though i need to really do focus exercises
besides, this social network learns from people
so i was looking into machine learning algorithms.
 
user1125394
look at coursera, they have a good stuff on it
 
11:45 AM
Guys I want to marry with any software developer girl any body know then tell me please
 
hehe
 
@Andy dafuk ?
 
we will marry
why we will say you :P
 
This Andy guy is pretty annoying
 
@Mr_Green I am not guy hahaha
 
11:46 AM
Any pic for proof? :P
 
// copy you and badger are left away from this monarchy rule
 
hi everyone
I'm trying to use this script: jsfiddle.net/gfkM4/137 but when I put it on my page it doesn't work, probably something stupid but me + javascript = 2 so I can't figure out why
 
@Mokkun are you getting an error message?
 
0
Q: Colorbox Close Event not responding on Safari

PadysterI have color box implementation where on click of a URL(inside the colorbox) should close the colorbox itself. Below is the code: HTML Where on click of a URL opens a ColorBox of Image. <link rel="stylesheet" href="colorbox.css" type="text/css" media="all" /> <script src="jquery-1.8.3.min....

 
@JanDvorak nope no error
 
11:51 AM
@Mokkun do you wait for the DOM load?
 
@Zirak HTML.find(".example"); // Array of nodes returned if more than one, otherwise a node
 
@JanDvorak what do you mean?
 
Do you like that fact?
 
@Mokkun Call this after document.ready...
 
@Mokkun wrap the code in $(document).ready(...) or put it at the end of body
 
11:53 AM
thanks, so the problem was the script was executing before the html page?
 
yep.
 
yup
 
the elements you were binding to didn't exist when you were binding them
 
I see
hmm why I still have to put it on the bottom of my page even when I use doc ready?
 
12:09 PM
@copy I do not like that. I think the querySelector should always return an array of elements (even if only one) or null if no elements.
 
@JanDvorak @Andy any idea why it doesn't work if I load the page affected by the script with XMLHttpRequest?
works fine when I include the page, doesn't work when I load the page with ajax (xmlhttprequest)
 
@Mokkun I said "or". Either put it on the bottom, or use $(document).ready
if you're loading the page via XHR, it gets loaded later than you try to bind the elements that are being loaded
 
@JanDvorak I know, but it doesn't work if I put the script on the top with document ready
it works if I put the script on the bottom with doc ready
 
did you put it above the tag loading jQuery?
 
@JanDvorak nope below
 
12:15 PM
then it should have the same effect
how did you use document ready?
 
$(document).ready(function(){

    $('.tickets tbody').on('click', function(e){
        $('.tickets tbody').removeClass('ticket_active');
        $(this).addClass('ticket_active');
    })

}());
like so
 
@Mokkun can u share Code
 
under <script language="JavaScript"></script>
 
then it should work
 
a
 
12:16 PM
@Andy what why? D:
 
I want to see what you are doing
 
I can copy you a simple example
<script src="jquery-1.10.2.js"></script>
<script language="JavaScript">
$(document).ready(function(){

    $('.tabs li a').on('click', function(e){
        $('.tabs a').removeClass('active');
        $(this).addClass('active');
        $(this).closest('ul').closest('li').children('a').addClass('active');
    })

}());
</script>
<style>
#sub-nav  > .active {background:#AAA;}
.tabs li a.active { background: green; }
.tabs li a {font-size:20px;}
#sub-nav li a {font-size:16px; margin-left:20px;}
</style>
this doesn't work
<script src="jquery-1.10.2.js"></script>
<style>
#sub-nav  > .active {background:#AAA;}
.tabs li a.active { background: green; }
.tabs li a {font-size:20px;}
#sub-nav li a {font-size:16px; margin-left:20px;}
</style>
<ul class="tabs">

   <li class="accordion"><a href="#tab1">Boo1</a>

           <ul id="sub-nav">
              <li><a href="http://www.myweb.com"> Ipsum Text</a></li>
              <li><a> Lorem text</a></li>
              <li><a> More lorem text </a></li>
              <li><a> Dolor Sit Amet </a></li>
this works
as you can see, I have to use doc ready + put the script on the bottom of the page to make it work
@JanDvorak am I doing something wrong?
 
add the style tag before script tag the check it
 
do you realise #tab1 will get the handler as well?
 
@Mokkun try this and tell me
add the style tag before script tag the check it
 
12:25 PM
@Andy Please don't post the same thing more than once in a short period of time. If it's a question, try again in a few hours.
 
@CapricaSix welcome back
@Zirak this duplicate message was not meant in spam ^^^
 
I always find it hard to take any 'dev' seriously when they list jQuery before javascript in their skillset.
 
@Andy doesn't work
@JanDvorak it's just an example :/
 
user1125394
d3 is very chainy as library .foo(...).bar
 
> ECMAScript implementations may recognise white space characters from later editions of the Unicode Standard.
so the spec is admitting == is implementation defined... kind of
 
12:31 PM
:-)
 
user1125394
why not replacing == by === one day
 
because the result of 0 == y will depend on what is considered whitespace
AHHAH
it is not even theoretical
in firefox
"\uFEFF\uFEFF" == 0 //true
in chrome
"\uFEFF\uFEFF" == 0 //false
 
@Esailija I commented both on that post and on that bad answer.
 
no idea?
 
0
Q: How to get checked nodes in jquery jstree

AngelI have created one jquery jstree and it's working fine. Now the problem is how to get the the checked nodes details. For Creating JStree The code is: $(function () { $("#tree").jstree({ "json_data" : { "data" : [ {"data":"pe_opensourcescanning","id":0,"pId":-1,"children": [{"d...

 
user1125394
12:35 PM
How could I overflow (put just outside of its container, (just on the right)) a Dom element which has position: absolute
 
right: -Npx;
 
-100%?
 
yea, I dunno if he wants to 'hide' it or have it float to the right of an element?
brb - coffee
 
@Mokkun it is recommended that add the script and style tag in header but when we use it bottom of page then all html is fully loaded so best is to use it in bottom
 
user1125394
@rlemon nah it gets hidden
 
12:37 PM
styles in head, scripts at bottom <- do this, this is recommended
 
user1125394
but I'll fiddle that
 
Good morning pplz
 
@Andy it still should work in the top if I use document ready doesn't it?
 
@Mokkun yep
 
@Mokkun it will all instantly make sense to you once you go read how a document is loaded and parsed by the browser
 
12:38 PM
Rawr
 
this is a good article for some 'best practices'
 
@BenjaminGruenbaum I just made huge edit because of the implementation dependency
 
@Esailija I saw, I honestly thing the fact it can be 'tricked' is the right argument. I think cognitive load and consistency are much more important factors here. If I go through a code base and suddenly see a == I start thinking "Why the heck is there a == here.
 
Down voting shouldn't cost rep after a certain time. Like 10k rep or something.
Not that it matters (the rep)
 
at 10k you shouldn't care
it hurts more when you're low-rep or near a privilege
most of them get refunded, anyways
(except those dealt to Jeff Atwood on Meta.so)
 
12:51 PM
@JanDvorak could you help me to convert
$('.tickets tbody').on('click', function(){
$('.tickets tbody').removeClass('ticket_active');
$(this).addClass('ticket_active');
})
to a .live?
 
No
God no.
Never ever do that.
 
don't use live
delegate with on
 
I have to use it because I want my script to work when I load my page with XMLHttpRequest
isn't that the "solution"?
 
@najam 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.
 
@Mokkun event delegation: yes. .live: no
@Mokkun $(document).on("event", ".selector", function(){})
 
12:53 PM
@JanDvorak can you give me an example of event delegation?
 
@mokkun you can find more easy examples on jquery documentation with .on and delegate methods
 
document.body.onclick = function(e) { alert("Don't steal my files"); }
 
@copy eh, what?
 
 
ah, right
:-)
 
12:57 PM
@JanDvorak
so
    $('.tickets tbody').on('click', function(){
        $('.tickets tbody').removeClass('ticket_active');
        $(this).addClass('ticket_active');
    })

become:
     $(document).on("click", ".tickets", function(){
        $('tbody').removeClass('ticket_active');
        $(this).addClass('ticket_active');
     })
 
@Mokkun I believe you want to keep your event target pointing at tbody
 
@rlemon I downvote a lot
 
@JanDvorak yes why?
 
@Mokkun so ... .on('click', '.tickets tbody', function(){...
 
ohh god... I selected 'over write' instead of 'over write if source is newer'
fuck fuck fuck
 
1:00 PM
@JanDvorak fuck yeah
@JanDvorak thanks :D
 
@BenjaminGruenbaum it is for the op.. since he thinks there is nothing to worry about when comparing to a string
 
Yeah, exactly
I Should post troll answer saying to use Object.is :P
 
@rlemon did you drink coffee before overwriting your newer files?
 
that function doesn't even have a use case
well probably for a Map implementation
 
!!mdn object.is
 
but that doesn't mean anything since it implies people will map things to NaN
 
!!>Object.is("love", "love")
 
@JanDvorak true
 
> if (v1 !== v1) return v2 !== v2;
cute
should I edit those multiline braceless ifs out?
 
!!> Object.is(NaN,NaN)
 
1:07 PM
@BenjaminGruenbaum true
 
you know what is beautiful about javascript right now? The entire specification, which even includes implementations for the entire standard library, is 250 pages :D
the same just for Collections API would probably take 1000 pages alone
 
@Esailija Yeah, C# is like 580 pages, and it's empty. I think the spec needs to do some things better though.
Like, it could (and should) be clearer, it's very good but there is room for improvement
 
@JanDvorak yes :/
 
should I change them to single-line braceless?
 
but yeah but just think how TINY it is
sooo tiny
non-bloated
 
1:10 PM
also, I could normalize the semicolons in the examples section
 
@Esailija ever read lisp's spec?
 
ever read brainfuck spec?
 
lisp is completely useable though.
 
And so is Brainfuck
 
22 hours ago, by Darkyen
I am fully retarded
you're the one who said that, right?
 
1:13 PM
@copy yeah, because who needs non-destructive +
 
@FlorianMargaine that was not the point but how it includes implementations for stuff like JSON and regex
 
ah yeah, true
I can't find the full CL spec in one pdf
 
if we leave out standard library implementations we only have 100 pages
 
:D
 
1:15 PM
the full spec of brainfuck is 8 lines
 
the full spec of your brain is 0 line, yet we don't talk about it, do we?
 
lol
 
my brain is mostly UB
including random explosions
 
user1125394
chaos or random? it's different
 
my brain is fried.
 
1:18 PM
the only difference is the amount of determinism, which is hard to measure
there are probably some corellations, however
 
good morning, all
 
yeah, "somewhat chaotic occurence of" rather than "mostly random"
 
@BenjaminGruenbaum did you notice the straw man Not using a feature of a language for the sake of "consistency" is ridiculous. You don't write i += 1 instead of i++ so you can be consistent with i += 2.
 
user1125394
lul
 
@Safira 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.
 
1:19 PM
@Esailija I do write i+=1 in ruby
 
@JanDvorak yes but ++ is simply an exception
 
user1125394
!!Shall we break consistency?
 
@cx Not a chance
 
@Esailija Yeah lol. I's not even the same thing.
 
@BenjaminGruenbaum @Esailija what are you guys reading ?
 
1:21 PM
besides, it's totally different because i += 1 and i++ do the same thing
 
1
Q: What should be the sense to use strict comparison to this specific string: 'final'

Daniel ArandaIn a code review that I was doing to a coworker, I said that here: if (someValue === 'final'){ There is no sense to use strict comparison because the only way to pass it as true is with other string value equals to final. I think that it is enough: if (someValue == 'final'){ His argument i...

 
user1125394
!!> var x=0; ++(++x);
 
@cx "SyntaxError: invalid increment operand"
 
although they do return different values
 
When will people learn...
Who said anything about jQuery? Answering with jQuery code in non-jquery questions is generally frowned upon in StackOverflow. See this very related question in MetaBenjamin Gruenbaum 7 secs ago
 
1:24 PM
wait. 13 upvotes and the -2 gets the check?
programmers is crazy
 
@rlemon OP just wanted someone to agree with him
 
@BenjaminGruenbaum quote the tag wiki
g2g, sry
 
Heh, found a bug in the chrome dev tools.
Type (++x), see what error message you're getting.
It's the } from the with surrounding the expression :)
 
user1125394
> (++x)
1
 
@cx notice the ,
!!> (++d),
 
1:26 PM
@BenjaminGruenbaum "SyntaxError: syntax error"
 
user1125394
!!> var x=0; (++x),(++x)
 
@cx 2
 
    $('#list_header th a').on('click', function(){
        $('#list_header th').removeClass('active');
        $(this).addClass('active');
    })
what can I do if I don't want the class of "a" to be active but the class of the "th"? is there a (this.parent) or something?
 
@BenjaminGruenbaum waht :P
I just get referecne error x not defined
 
I want the th class to change to active when I click a link in #list_header th a
 
1:30 PM
(++x),
SyntaxError: Unexpected token }
heh
fun
 
you can simplify it with 1,
!!> 1,
 
@rlemon "SyntaxError: syntax error"
 
It gives the same error in the console, though.
 
we are trying to get the error
duhdoy
 
1:31 PM
Yeah, that's my point.
It didn't give the same error on the bot.
It does in the console.
So 1, passes!
 
bot === FF
 
@BenjaminGruenbaum yea I always wondered about that but never occurred to me to make the connection
 
Yeah, yeah, got it.
 
Damn lazy web inspector for not shipping with a syntax checker
 
1:33 PM
@SomeGuy don't "yea yea" me :P
 
@rlemon Yeah, yeah, okay.
:P
 
Similarly { gives you unexpected end of input which sounds to me like the correct error for other stuff, got to love the with , I have an answer with the code somewhere.
 
@SomeGuy Oh you are so on that things have now become very much like Donkey Kong
 
Hahaha
 

Andy is a creep

8 hours ago, 37 seconds total – 5 messages, 1 user, 0 stars

Bookmarked 7 secs ago by rlemon

 
1:37 PM
Hahahaha
 
0
Q: AngularJS, Directive improvement

CanttouchitI wrote my very first directive and I'd like to get some suggestions for improvement. My code - plnkr. webApp.controller('AppCtrl', function ($scope) { $scope.expandAdd = function() { $scope.hiddenAdd = true; }; $scope.addWeb = function() { $scope.hiddenAdd = false; }; }); webApp....

0
Q: why is remainder of division, multiplied by divisor ? using operator %

RapierI have started to learn Javascript. From book http://eloquentjavscript.net. http://prntscr.com/1ll128 // I need 10 rep points to place images. So just link. I don't understand, why it multiply the remainder fraction by divisor (after division). It is more complicated or less accurate. 10 / 3 ...

posted on August 16, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Don't worry. The drought of Hitler jokes won't last forever.

 
@Feeds Makes sense
 
The guy isn't the brightest.
Probably just got confused.
 
1:46 PM
Hi for all.
I've been out for two months. I want to know if anything has changed in this room. (regulations) ???
 
don't be a dick and you'll be good
 
I know that
but it's just so weird
 
For every bad question, you have to donate $1 to Mozilla
 
@FlorianMargaine Agreed
(Almost typed hg status in the chat window)
 
@RyanKinal I think a bunch of us typed ls in there
 
1:49 PM
@copy I haven't money :P and @rlemon do not be too vulgar...
 
@MirkoCianfarani "Don't be a dick" is not vulgar
 
lol at the characterization of 9k lines as "large" gocardless.com/blog/building-a-large-angular-application
 
@rlemon Seven years dungeon.
 
what?
is this a lemon guy reference?
I never actually watched the show
> It's not just you! github.com looks down from here.
:(
 
http://en.wikipedia.org/wiki/Dick I look on WIKIPEDIA and Dick, a colloquial vulgarism for the penis
But I undertand the situation of funny @rlemon
 
1:53 PM
@MirkoCianfarani continuing this conversation is being a dick.
I already told you not to be one
@RyanKinal I need to amend dudism into the rules page.
 
Ok now peace!!
but that who know the best program for program Android on Ubuntu?
I use Eclipse in Windows...
 
Eclipse is on linux too.
 
and this i not know and now I go for installing...
 
@rlemon remember me .. the ActiveX guy
 
I remember I had you ignored
there was probably a reason
 

« first day (1035 days earlier)      last day (3927 days later) »