« first day (1846 days earlier)      last day (3105 days later) » 

12:07 AM
wow
thats nuts man
 
12:18 AM
Were you using a react-bootstrap library or roll your own?
 
 
1 hour later…
1:41 AM
Ive done both @Luggage
react-bootstrap is pretty nice
only downside is they used to break the API a lot
but since its 1.0 I'm hoping that happens less often
when I rolled my own components (very recently) I didn't require mobile support
 
trying to use responsiveVoice.js with call back.
var f=function (){responsiveVoice.speak('this is text 2', "UK English Female", {"onstart": function(){alert('a')},"onend": function(){alert('b')}});};
	responsiveVoice.speak(text, "UK English Female", {"onend": function(){f();}});
alert 'b' fires twice. Once before second text is read, and again after text finishes
so alert b, alert a, alert b
 
3:09 AM
hi guys
can someone help explain this syntax?
export { default as AddFriendInput } from './AddFriendInput';
what is the 'default as _______'
 
that syntax lets you rename exported things from within an ES6 module
 
thanks phenomnomno, how is that different from just export {AddFriendInput} from './AddFriendInput'
 
3:36 AM
I have external js and this is the content, my question for this, is this correct I am putting inside $(function(){}); my anonymous function
$(function(){

    var customer = function(){

            $('#from').datetimepicker({
                format: 'YYYY-MM-DD hh:mm:ss'
            });


            $('#to').datetimepicker({
                format: 'YYYY-MM-DD hh:mm:ss'
            });
    };

    customer();

});
 
@copy Nice! I don't think my uni's going to have something like that, but I can always hope!
 
3:57 AM
Got the visa
 
@Abhishrek Congrats!
For work?
@Zirak :(
At least they're talking and trying to improve things, right?
 
Why is this channel now called Mocha instead of Javascript?
 
4:15 AM
@SomeGuy wow 9.7k
 
@Abhishrek What?
 
your rep
 
Oh, haha
I've been around 9k for at least a year
 
room topic changed to JavaScript: Read this: rules.javascriptroom.com. Before asking inform yourself on the XY problem goo.gl/taIqf | devdocs.io Documentation™ Helps. WooHoo ES2015 (ES6) released! Now featuring a normal room title! [ecmascript] [es6] [javascript] [kendalls-mom] [nodejs] [promises]
@William Whoever did that will be stoned to death
@SomeGuy It was a very cool course, although I find manual reverse engineering a bit tedious
I could have gotten a reverser job in my current company, but I choose programming instead
 
es6 released? What does that even mean?
 
4:25 AM
I don't know, it was there before
 
@copy Ah, nice. I don't know enough to go either way, yet
 
@SomeGuy I might be able get you an internship. How much experience do you have?
 
Not much, really. I've been doing HTML5 games for a few years, but that's kind of irrelevant. Recently, I've been taking courses online as I find the time
Software Security's a course I just finished
I've taken one on Cryptography
One on Machine Learning
 
Your programming knowledge alone should be sufficient
 
Neat! You guys do remote internships?
 
4:39 AM
I don't think so, but we'll fly you in and pay a for place to stay
 
Wow, really?
 
Yep
 
I really hope you aren't fucking with me :P
 
If you're interested I'll ask tomorrow
 
Yes, please!
Where do you work, btw?
 
4:45 AM
Sent you a mail
 
Got it
 
5:27 AM
Hello
@copy +1
8 hours ago, by rlemon
room topic changed to Mocha (a.k.a JavaScript): Read this: http://rules.javascriptroom.com. Before asking inform yourself on the XY problem http://goo.gl/taIqf | https://devdocs.io Documentation™ Helps. WooHoo ES2015 (ES6) released! [ecmascript] [es6] [javascript] [kendalls-mom] [nodejs] [promises]
 
How to set the style of a div or any other block element so that anything put into it is automatically vertically aligned?
 
6:12 AM
user image
2
 
@SomeGuy exceptional
truely exceptional
 
/r/ChildrenFallingOver
Best subreddit ever
 
@SomeGuy do try TIL
 
Oh, yeah, I have already
Isn't that one of the default subs?
 
Does any one know if using context.restore() will retore to your previous save() or will it just go to the default
 
6:26 AM
how can I make this an array?
var id = $('#cLoanOut tr.active').attr('id');
var emp_no = $('#cLoanOut tr.active').find('td.emp_no').html();
var date_resigned = $('#cLoanOut tr.active').find('td.date_resigned').html();
var tot_shrs_amt = $('#total_shares_amount').val();
var bnfts   = $('#benefits').val();
var dvdnd = $('#dividend').val();
var loan = $('#loan').val();
var grcery = $('#grocery').val();
var life_insrnce = $('#life_insurance').val();
var funeral_pln = $('#funeral_plan').val();
var flu_vccne = $('#flu_vaccine').val();
 
use .push @Micaela
 
and loop them
 
though you might want an object
with property names
rather than [0] [1] etc
 
can you give an example?
 
var obj = {};
obj.id = $(...);
 
6:33 AM
you guys see that today?
Raindrops effect
I thought it was a video
 
That's really cool
 
explanation on how it was done
/me goes to bed
 
@Loktar Damn, that's so cool!
 
6:56 AM
I understand the concept of arithmetic progression, so to get the range of numbers, I would do pastie.org/10531048#3 , but what are they doing github.com/mcandre/node-range/blob/master/lib/range.js#L21 here?
 
@Loktar o/
 
@Loktar awsome
 
Comes across vastly too broad question. Edited by a ~400k user. No closevotes.
I guess on stackoverflow.com/questions/33538167/… but I don't know why I even bother
 
7:12 AM
nvm, lucas' version is css only tho :D codepen.io/lbebber/pen/ZGGNvZ
 
m59
@ivarni >.>
 
(function() {
  return [
    (() => this.x).bind({ x: 'inner' })(),
    (() => this.x)()
  ]
}).call({ x: 'outer' });
why is the o/p outer outer and not inner outer
 
oh, apparently Lucas Bebber also made the webgl version...
 
7:31 AM
stackoverflow.com/questions/33538827/… Too broad. OP should look at php 101...
 
Sometimes I wonder if the site would be better off with a 500 rep requirement to ask questions and the removal of +2 rep per edit for <2k
 
guys
//$(".a,.b,.c").click(); or
// $(".a").click();$(".b").click();$(".c").click();

// which one is good ?
 
!!> (() => this.x).bind({ x: 'inner' })()
 
@Neil "TypeError: this is undefined"
 
no need tutorial just concept — T.Karthikeyan T.Karthikeyan 1 min ago
Oooh, He just wants the code
No.
 
7:36 AM
hmmm ? any one
 
No idea which perform better but I personally prefer the first one for readability. Someone else might prefer the second for the same reason.
(given that both works)
 
$(".a,.b,.c").click(); for maintainability
Also, I imagine it's faster since you've got only one selector
 
is there any performance differences ?
 
But that's probably a minor performance difference
 
hmmm thank you.
 
7:38 AM
Nothing significant
 
7:53 AM
How can I make this into loop array?
var id = $('#cLoanOut tr.active').attr('id');
var emp_no = $('#cLoanOut tr.active').find('td.emp_no').html();
var date_resigned = $('#cLoanOut tr.active').find('td.date_resigned').html();
var tot_shrs_amt = $('#total_shares_amount').val();
var bnfts   = $('#benefits').val();
var dvdnd = $('#dividend').val();
var loan = $('#loan').val();
var grcery = $('#grocery').val();
var life_insrnce = $('#life_insurance').val();
var funeral_pln = $('#funeral_plan').val();
var flu_vccne = $('#flu_vaccine').val();
 
crl
var [id, emp_no, ...]=['#cLoanOut tr.active', '#cLoanOut tr.active td.emp_no', ...].map(s=>$(s).val())
oh you ave some .attr('id') and .html().. brah..
 
oh sorry only these
var tot_shrs_amt = $('#total_shares_amount').val();
var bnfts   = $('#benefits').val();
var dvdnd = $('#dividend').val();
var loan = $('#loan').val();
var grcery = $('#grocery').val();
var life_insrnce = $('#life_insurance').val();
var funeral_pln = $('#funeral_plan').val();
var flu_vccne = $('#flu_vaccine').val();
var eye_glss = $('#eye_glass').val();
those are inputs
 
Not related to anything, but for the sake of potential co-workers please rename funeral_pln to funeral_plan, grcery to grocery etc. That one byte you saved there isn't worth it.
 
crl
var [tot_shrs_amt, bnfts , ...] or var inputs /* but you'll have to do inputs[i]*/ =['#total_shares_amount', '#benefits', ...].map(function(s){return $(s).val()})
but it's not really better than what you have, just keep your version, clearer, and you'll one day refactor this with another framework than jquery
 
I am utterly confused: line 84, why does clicking not fill the screen? I did try logging the values of w and h, and they seemed normal... codepen.io/towc/pen/KdxmJw/?editors=001
 
8:07 AM
@towc Because you're using lighter for globalCompositeOperation
 
shit, right
thanks!
 
Sure
 
@Micaela What are you hoping to achieve by leaving out letters in your variable names, there?
 
tot_shrs_amt, total_shares_amount, still the same.
No big deal
 
It is a big deal.
 
8:12 AM
why
 
Readability, and therefor maintainability, matters.
3
I'm just curious why you're shortening those names
 
1 min ago, by Cerbrus
Readability, and therefor maintainability, matters.
^this. so much
!!^
 
Star eeet! xD
I could pin it. But that's be abusing my powah
 
done :)
 
8:15 AM
Woo
 
too late to fix the typo though :p
 
That was totally intentional *cough*
 
But I haven't seen Jan for a while so I guess your off the hook
 
Hm, you're right
 
he's last seen 4 hours ago on SO so I guess he just gave up on chat
good to know he didn't run off to join IS or anything at least
 
8:20 AM
Maybe he accidentally closed the tab
 
crl
what ya think of gitter (vs slack)? damn gitter uses a lot of mem
 
They're both just clones of IRC, right? I never understood why people decided that chat is suddenly something that needs being re-invented
 
If you put it like that, why does SO have chat? It's also a re-invention.
Still, nobody cares about that. It's useful, and that's all that matters.
 
true
but if SO set up an IRC server I'd rather use that
 
I honestly wouldn't. Web interface is easier to access. Plus, Windows IRC clients suck hard. I use XChat (bought the license and all, because, it costs $ for Windows :/) but I can imagine most people don't want to do that.
 
8:32 AM
mIRC is still ok I think
 
I don't like it. It looks ancient.
 
*retro
point is, you can BYO client, with a web interface you can't (unless you're into userscripts)
 
Hi
Can somebody help me out on this -- http://stackoverflow.com/questions/33538212/firefox-back-button-not-working-properly
 
@RohanVeer 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.
 
True. But hey, a lot of people find it too much effort to even install a browser to get around the mess that is IE, so I think they'll be really unlikely to find a IRC client. Ton of people don't even know what IRC is :D
So yeah. I'm all in favor of web chat. Would be nice if they were hooked into a IRC back-end or something, for sure, but if that's not the case, I'll take web > irc any day.
 
8:36 AM
@CapricaSix Ok thanks.
 
Irc is nice and all, but it's not user-friendly.
At all
 
Yeah, an IRC back-end with the same web interface would be nice, then I could choose not to permanently occupy a tab. Chances of that ever happening: 0
@Cerbrus it's just picky about who its friends is :)
 
I managed to more or less shape a mirc client like I want
But someone that isn't a programmer will have significant trouble doing so...
 
that's a bonus
SOs target audience are programmers
 
@ivarni You'd think that, yes.
But looking at the questions, a large portion of the user-base isn't what we'd consider a "programmer"
 
crl
8:45 AM
since I'm chatting to just one person in gitter, I'd prefer hangout actually, less sucky in memory and overall
 
Yeah but Gitter is also a public room, so, that's preferable to a private chat if you have a public project/discussion
 
good day all!
 
crl
you can create private room there, but anyway I don't like it
 
Angular directives: When using $scope and $parse in the same directive, the directive doesn't like this. Normal?
 
crl
never used $parse, sorry
 
8:52 AM
ok nm, now it like
 
it's questions like these that make me never want to use angular again
 
whahahahahaha
 
why the fuck shouldn't you be able to use $scope and $parse together? A good framework shouldn't let you do things that blow up in your face
*major editing
 
Can't see the questions since it's probably asked by someone I've blocked, but there's nothing magical in angular that prevents you from using $parse and $scope together that I'm aware of
 
Probably not, I'm presuming @emporio just made the $inject wrong or something.
 
8:58 AM
@RoelvanUden This
$parse and $scope can be used together just fine
 
@RoelvanUden yes, I got some weird console error
but now it's fine
These courses keep me staring sometimes..
 
So you assumed the problem is the combination of parse and scope, because?
 
@Cerbrus yes, I thought an error is produced when both are used together
 
I'm asking you why you thought that
I'm debugging your debugging line of thought
 
wohoo! Webkit now supports #rgba and #rrggbbaa!
 
9:02 AM
hi
 
@RUKMANISELVARAJ 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.
 
crl
you're yelling in your username
 
crl
can the state of a component's mixin and the state of the component conflict? or tey are isolated?
I was wanting to use github.com/RubaXa/Sortable/blob/master/react-sortable-mixin.js but that's a bit ugly, I hesistate to just do my own DnD jsbin.com/pugafa/edit?html,js,output < but I have to support horizontal move now...
 
Hey I have a doubt
How to add a click event to a dynamically added element?
I know how to do this using jquery but don't know with JavaScript :(
 
crl
9:13 AM
mutationobservers maybe?
 
0
Q: How python code is minified?

Jaspreet SinghI am wondering that how python code is minified, trying to understand it from point of view of JS minification or CSS. As in python there is a strict case of indentation and new line for end previous code/logic. How python minifier does that, other than omitting extra new lines and comments, an...

That first line...
Something tells me he doesn't quite understand that minification =/= compilation
 
crl
confused op is confused ^
 
@crl was this meant for me?
 
crl
it works not bad, no? output.jsbin.com/pugafa
no (can't put at the end)
 
Node.js js files aren't compiled, are they?
Just interpreted?
 
crl
9:26 AM
I guess so, except when you have to compile some babel or jsx or other things,
 
That ain't compilation
Babel frontpage: "Babel is a JavaScript compiler."
Ugh.
My semantics sense is tingling
 
is it not?
 
I suppose they need to use that word because too many people don't understand what a transpiler is?
 
like me? XD
 
@ivarni Probably
@towc: Compulers outpur machine instructions
 
crl
9:29 AM
I think it's correct, Kendall said it the other day, compiling is any tranformation of language
 
Transpilers output code that has to be interpreted
 
couldn't you consider babel a js preprocessor ;)
 
a transpiler is basically just a glorified regexp
 
So, if transpilers are glorified regexes, are compilers the DOM manipulatiors of code transformation?
 
crl
a transpiler is just a compiler that hasn't a determined gender
 
9:31 AM
*Facedesk*
 
@crl That's racist
 
Congratulations, you managed to write a question that's opinion based, too broad, and a tool request. — Cerbrus 31 secs ago
*Sigh*
 
upgraded to win10 finally
 
@jarvis: My condolences.
 
win10 works just fine, only issue I had was with some drivers for my USB wifi-antenna
didn't want to share network with my VirtualBox vms
 
9:38 AM
Thanks. can't trust entering credentials of real account :P so using this sock btw
 
I've been using 10 since it's been released. Still relatively unstable
 
I like it better than win8 actually. It feels faster and snappier.
and Cortana isn't working for me :(
 
Faster, yes. But Visual studio is pretty darn unstable on it.
 
crl
☰ drag-and-drop me
bah damn chat
 
10:06 AM
how come I can't do this if x can be undefined?

if(x){
  //do something if x is defined
}
 
crl
!!> var x=undefined; console.log(x?'defined':'undefined')
 
@crl That didn't make much sense. Maybe you meant: 1, 2, 3, 4, 5, 6, 7, 8, 9, d, y, ^, !, π, ?, █
@crl "undefined" Logged: "undefined"
 
thx
is it safe?
or shoudl I do the type off or === null check
 
> var foo = undefined;
< undefined
> if(foo) "boo"
< undefined
> if(!foo) "boo"
< "boo"
> if(!!foo) "boo"
< undefined
 
How to add a click event to a dynamically added element?
I know how to do this using jquery but don't know with JavaScript :(
 
10:15 AM
how come if I type !!undeclaredVar into the console I get reference error?
 
Like you do with any other element you didn't add dynamically
 
that will not work
because while attaching the click event, the element itself was absent
the element was added later after registering a click event
 
So, you run the script after you loaded the content bro :)
 
@Mr_Green: jQuery?
Oh, native
 
yeah native
the content is being loaded at indefinite time
some elements with same class are already loaded but other some elements loading later after I do any click or after some time (having same class)
 
10:21 AM
May be of help
 
crl
one way is to listen click on body with that ^, but other way would be to observe mutations in the dom and add handlers when needed
 
crl
see the yellow thing
 
ok thanks
 
why would mutation events have been deprecated?
just because they wanted to make people use mutation observers or was there another reason?
 
crl
10:27 AM
it's written I think
 
I want to open popup window and close main window on button click .. can anyone help me?
 
crl
window.close?
 
thx @ErikLandvall however one of my fellow coders said doing if(someDefinedVar.undefinedProp) is bad, can you advise
 
crl
seems not that bad
can do x in y or y.hasOwnProperty(x) if you want
 
cool thx, if its good enough for you is good enough for me
I have to support ie8
 
10:36 AM
@crl window.close() close the popup window not the Main window. and I want to close main window not popup window
 
some say check for typeof undefined or === null but it seems verbose
 
crl
@RakeshRaka wow you're using a raw window.popup?
old style and often blocked by browsers
 
@crl no no I use window.open() method
 
crl
yea I meant that
 
@crl Any solution?
 
crl
10:39 AM
you can send messages from the popup to it's parent developer.mozilla.org/fr/docs/Web/API/Window/postMessage but that sucks a bit, you could just use some modal windows made by yourself or a UI-library, like you want
 
@crl Ok Thanks for this....I try Now
 
does anyone here knows a good tutorial on how to work around the window.open in safari?
what i found was just a warning telling people to switch off the pop-up blocker
 
crl
put a warning to make them download anoter browser then, and install another OS jk:)
 
@crl lololololol
:)
 
Or don't use popups :)
 
crl
10:47 AM
*lollipopups
 
hippopupotamus
 
crl
popuv (in Russia)
 
In Soviet Russia, browser pops you
 
@Neil spec and implementations were inconsistent
 
you mean the browsers did whatever they wanted rather than follow the spec?
 
10:59 AM
spec was terrible itself. rather like the current spec of contentEditable. and so were implementations.
 
11:12 AM
@SuperUberDuper http://stackoverflow.com/a/13633027/570796
I would do: `if(someDefinedVar.undefinedProp) ..` as you described. No problem with compatibility.
 
Have you seen that?
 
crl
11:33 AM
Where is it written which possible type I can put in dataTransfer? developer.mozilla.org/en-US/docs/Web/API/… oh ok developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_and_drop
I was wanting to transfer a json though
 
@KendallFrey you get a second pc
 
hm?
I have a work desktop and my old laptop
I'm planning to get a new gaming rig
 
hi guys
am trying to have a function that loops until an image is loaded.but I am getting the variable scope wrong somewhere.
here is my sample code
setTimeout(function() {
				    looptimer();
				}, 20000);
 function looptimer(){
	  var tid = setInterval(getImageUrl, 10000);
	  if(!myimg)
	  {
		clearInterval(tid );
	  }
  }

  function getImageUrl() {
           myimg = $('.o365cs-me-personaimg').attr('src');
           console.log(myimg + "am here");
  }
myimg is seen as undefined
 
image.onload = function() {};
 
@jAndy The Game
 
11:46 AM
but I thought it would be a global scope in the window
 
screw that timer thing
 
@GotaloveCode why would you use a global variable?
also, wat
 
@GotaloveCode wrong aproch, but sensce you have problem understanding the scope I vcan try and redefine it for you in a private chat if you like?
 
the image loads much later after page loads @jAndy I am not sure I can use image.onload in this case
 
private chat sounds like as if we were on some xxx website
 
11:48 AM
hehe
 
@jAndy don't be a dick blocker...
 
@GotaloveCode whenever the image gets loaded, you get a reference to that image (node) and assign a callback function to its onload property
so your functions gets called as soon as the image has been transfered
 
@ErikLandvall yea am not very confident in my understanding of js variable scope and @KendallFrey that is why I was thinking of using a global variable
 
@jAndy he has fundamental problems that he needs to understand before correcting the approch in my opinion :)
 
@jAndy the problem is knowing when the image is loaded.I cannot grab it using a selector since it not already loaded
 
11:51 AM
@ErikLandvall possibly. But the fundamental problem here is the fundamental wrong approach to the problem. Basic understanding is a also a problem tho.
 
@jAndy Semantics, but you see my point I think :)
 
@GotaloveCode Well somewhere, some code has to inject or create that image node right ? At that point, you need to intercept.
 
@jAndy exactly now my problem is I want to get the image with the class o365cs-me-personaimg' once its loaded but I cant have it directly under document.ready coz at that point its not yet loaded.
now the thing is I wwant to wait like 30 seconds then check for that
 
how does that image get injected into the DOM ?
 
if its not there I go ahead and wait then check again until I get it then I stop
 
11:57 AM
HAMMERTIME!
 
STAHP
 
HAMMAHTIME!
 

« first day (1846 days earlier)      last day (3105 days later) »