« first day (1673 days earlier)      last day (3280 days later) » 

5:00 PM
@SomeKittens just won't stop talking about the digest cycle
 
i like the digest cycle and watchlist too :))))
 
Goodmorning
 
@StevensHaen You should ask Cookie Monster
 
@GarrettKadillak IT'S IMPORTANT
 
@SomeKittens It is, really. You should eat at least three meals a day!
 
5:05 PM
hehe
 
@SomeKittens there is a better way to write that code?
 
MGE
Hello
I'm in a link inside an span that is inside a li, and when I click in this link, I want to get the img element inside the li, but out from the span.
 
is there way to display external javascript code in html page withing <script>
 
Hey everyone.. I hope you can help me with this one : stackoverflow.com/questions/30276953/delay-time-on-slideshow
any help would be appreciated
 
@Mdermez 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.
 
MGE
5:10 PM
<ul>
<li><a class="noiframe" onclick="quickaddtoPlayer();" href="javascript:void(0);">+</a></li>
<li class="band_img"><img alt="Cover" class="cover" src="<?php echo BASE_URL.'band/picture/'.$value['artist'];?>" /></li>
</ul>
clicking in the a calling to quickaddtoPlayer(); I want to get img element
how can I do that?
 
document.querySelector(".cover") inside that oncllick function of yours
 
@argentum47 Yes, mostly through the removal of if(!$rootScope.$$phase) $rootScope.$apply();
 
MGE
@argentum47 there are lots of covers, in different >ul>
thats the problem
 
@MGE then use event delegation ...
 
MGE
i want to get the img inside the ul that I clicked the function
 
5:16 PM
Go to reddit.com/r/me_irl for some good giggles
 
@SomeKittens ok then, I will try to remove and check what more changes would be required if at all ... providers and directives are actually where things get interesting for me :P
 
Guys I don't know if you had a look at my question. Let me know if you need any additional information. I tried to solve this out but I am not that good in JS . :/
 
@GarrettKadillak Fun behind-the-scenes story: About halfway through the testing lecture yesterday, I realized I didn't know how to access the this of a controller (since we were using controllerAs) in the tests.
And everything I googled was still using $scope
ended up posting this:
0
Q: How do I access 'this' of a controller in unit tests when using controllerAs?

SomeKittensI have a simple controller: myApp.controller('HelloController', function () { this.greeting = 'Hello!'; }); I want to test it - but I can't access $scope like usual: beforeEach(inject(function ( _$rootScope_, $controller ) { $rootScope = _$rootScope_; scope = $rootScope....

 
@SomeKittens I noticed that things got a little hairy there
 
I've never seen engineers so eager to write some tests
(which is awesome, I just thought they'd all want to dig into performance)
 
5:27 PM
They were really into it which is a good thing for sure
 
@SomeKittens They just want to run performance tests on their unit tests
 
Angular heads - I'm looking for some beta testers for Batarang 0.8.0, ping if you're interested in helping out.
3
 
6:02 PM
Facebook : Microsoft :: Google : Apple
 
meeting's in 1 hour, right?
 
hi
 
@Coldplay 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.
 
Darn I'm going to miss the meeting, hope all goes well.
can you star in the mobile vs?
guess I'll find out
 
6:13 PM
Is there a cap on the number of RO's a room can have?
 
6:25 PM
meeting?
 
@BenjaminGruenbaum 34min
 
might even make it
 
I have really wanted to learn algorithms like bfs dfs and etc over the past couple of months, (or maybe an year) , but the idea of using C/C++ and pointers, freaks me out.. which language , might allow me to bypass this pointers thingy, and actually learn those algorithms
 
rust
 
@argentum47 I reaaaaally hate to say it, but Java
 
6:35 PM
Whichever, just pick one
No, not Java, think of your soul
 
can't believe I'm digging up my old blog, but here: recoding.blogspot.com/2013/02/is-there-place-for-java.html
I really should just turn that thing off.
 
but then what will happen to the burning computer story?
 
New blog has more hits with four articles than that thing did overall.
 
You'll have nothing to point at
 
6:37 PM
@Zirak @MadaraUchiha @Mosho any of you coming tomorrow?
 
@GarrettKadillak I'd rewrite the greatest hits, of course
 
Also, just got back from a music festival, was awesome.
 
@BenjaminGruenbaum Coming where?
 
@BenjaminGruenbaum kinda forgot to ask gilad
 
6:38 PM
Java doesn't offer anything (and less) than D, Nice, C#, ...
 
but I'll ask tomorrow
 
@Mosho wow dude your avatar such doge
 
@BenjaminGruenbaum Not my cup of tea, but I'll be cheering for you
 
dogii
 
ask
@Zirak lame
 
6:38 PM
@BenjaminGruenbaum Neat! Irish festival, right?
 
I could be going to dire straits
 
@BenjaminGruenbaum don't think I will
 
in 10 days or something
 
I'm not a huge Angular fan and I've got a shitload to do tomorrow :(
 
@Zirak Yeah, called "Jacob's Ladder", was really awesome good music nice people everyone was happy, everyone was jamming.
@MadaraUchiha it's not about Angular
 
6:40 PM
@BenjaminGruenbaum I WAANA BE THERE
 
@SomeKittens where? At the music festival or at my lecture tomorrow?
 
oh, this isn't ng-conf?
BOOOOO HISS
 
@BenjaminGruenbaum oh?
 
@BenjaminGruenbaum that was way too enthusiastic for either one
 
@BenjaminGruenbaum Sure looks like it... :|
 
6:40 PM
@Zirak my talk is about Rx, for example.
@MadaraUchiha look at the talks people are giving
 
@BenjaminGruenbaum Out of all the talks, only about 3 don't contain the word "Angular" in their titles lol
And one of those non-angulars is about Git XD
 
My talk has angular in the title but it's not about Angular.
It's about Rx
 
@BenjaminGruenbaum will you be publishing the slides?
 
You already read them, also - probably
 
@BenjaminGruenbaum Just looked at the schedule, and sorry, no way could I attend. Maaaybe the >1800 lectures.
 
6:42 PM
@BenjaminGruenbaum Yeah, I want to pass them around
 
@Zirak lame
@SomeKittens sure
 
You'll always be in my heart <3
 
meeting in 12 mins?
 
yep, just making myself a snack and starting to organise stuff
 
sure, thanks!
 
6:50 PM
The snack isn't for you
 
oh shit
I never did the summary of the last meeting :D
 
so there is no way to attach multiple event handlers for one event to an element from React. Stupid leaky abstraction.
 
sadly I won't be attending
 
It's because you're impotent, isn't it?
huh, I registered the event to an hour from now by accident. whoops.
 
6:53 PM
Zirak has removed an event from this room's schedule.
Zirak has added an event to this room's schedule.
 
whistles innocuously
@BenjaminGruenbaum You look stoned as hell in that speaker picture
 
@Zirak look
 
oh god react is terrible for event handling
 
Ok, @SomeKittens, @SomeGuy, @FlorianMargaine, @ssube, @MadaraUchiha, @KendallFrey, @Shmiddty, @phenomnomnominal, @Luggage, @towc, @NickDugger: Haul your ass over
 
sure mom
 
6:58 PM
Also @AwalGarg, @Abhishrek, @dystroy and @JanDvorak
 
ah yes
 
oh is there a meeting on?
 
Yeah bitches, haul ass there, we're lonely
 
there a topic list anywhere?
 
7:04 PM
@ElliotBonneville It's in the room topic
 
@ElliotBonneville Room meeting room's description.
 
cool, thx
 
@Zirak I just noticed DocumentFragment.prototype has getElementById (what you proposed but was discarded) :O
 
7:21 PM
@AwalGarg he asked for getElementsByClassName and getElementsByName
 
Woo I got the JS silver badge!
2
 
@SterlingArcher congrats!
 
So friggin close to 10k, too.
 
7:38 PM
I know finally I'll get to enjoy deleted lol's
 
Room meeting conclusions (not that exciting) gist.github.com/Zirak/…
4
@SterlingArcher Congrats
 
What's the difference between event.stopPropagation() and event.preventDefault()?
 
uh, what? Ignore the event
 
Hi?
 
@GarrettKadillak Google it :D
 
user2620028
7:51 PM
phantom ping?
 
Is this an event with beer?
 
Sure, I'll join the event since I was mysteriously pinged…
 
Great!
 
@BenjaminGruenbaum just to make sure I get it, preventDefault cancels the event (if it can) while stop propagation will prevent attaching the parent events?
 
So uh… what are we doing in this event? Oh, it's in the other room?
 
7:53 PM
@GarrettKadillak no, also - you can google it.
 
@BenjaminGruenbaum Dude, he's asking for help.
Not everyone's a vamp
 
@BenjaminGruenbaum ok will do
 
@SomeKittens I know, which is why I personally checked that searching for "preventDefault vs stopPropagation" returns good results on Google.
 
@SomeKittens He can still google it.
There's nothing wrong with reminding users to use the great tools they have.
 
I even remember being amused by it being Raynos
 
8:05 PM
y'all should get this to 600 for its three year anniversary stackoverflow.com/questions/10659097/…
 
I don't see much event happening here and it's been 7 minutes already! I want my money back!
 
hi guys
 
hi sandwich--I mean, taco
 
8:17 PM
@taco YOOOOOU
 
:o
 
hello
 
G'morning
 
crl
why aren't single quotes encoded?
!!> encodeURIComponent("'\"\'")
 
@crl "'%22'"
 
8:24 PM
Because they're not special
 
so I am by no means a coder , even though i have huge respect for the "art" , but i am wondering about the pluses of jquery v's javascript v's css.... obviously the "coder" answer is "well, it depends what your trying to do..... but is there a bias towards using one language over another for web development with different plaftorms/browser/resolutions in mind i wonder??
 
@user3504751 Your question reads like "what are the pluses of an old shoe, a hammer, and a saw?"
 
crl
!!> escape("'")
 
We have various tools for various purposes
 
@crl "ReferenceError: escape is not defined"
 
8:25 PM
css and javascript are two different languages, and jquery is a library. Your question is like "English vs. a dictionary vs. a shirt"
 
in js you can do what you can do in both jQuery and css
so definitely go for js
 
JavaScript is used to add interactivity to a page. CSS is used to describe how that page should look
 
!!> let foo = 'bar';
 
@user3504751 As to a "bias", JavaScript is the only programming language that runs in browsers, and will continue to be the only one for the foreseeable future.
 
yes but the more i appreciate the forms i realise that there is quite a lot of crossover for all 3 , especially where css can do a lot of interactivity things
 
8:26 PM
@MadaraUchiha "SyntaxError: let is a reserved identifier"
 
!!> 'use strict'; let foo = 'bar';
 
@MadaraUchiha "SyntaxError: let is a reserved identifier"
 
@user3504751 "interactivity" as in :hover is still defining how a page looks, just under certain cases.
 
i do wonder about the "you don't have javascript turned on" in many browsers thus impacting on javascripts' reach
 
@user3504751 That's a very small percentage of users
 
8:27 PM
no i mean in css terms animation webkits ...and so on
 
So what's your question? What problem are you trying to solve?
 
so you would say most browsers are javascript enabled as default , i hope so
 
Well, if you make a website with text to read, limit your use of JavaScript so that the page can be read without it
 
somekittens :- not really a problem i just care about you guys' opinion on choice of languages as i have no bias as i have no skill and may learn more about one over the other depending on the opinions of this forum
 
@user3504751 Well, what do you want to do with what you learn?
 
8:29 PM
How big is .net3.5 ?
 
im building a couple of websites and using jquery , css and html mainly
 
@user3504751 Learn JavaScript
 
@user3504751 the main reason to use jQuery for what it does is cross-browser compatibility. If you can't do it in JS without issue, do it in JS ... also jQuery isn't a language, it's a library. And like others have said, you can't really compare CSS to Javascript to jQuery
 
@user3504751 and don't touch jQuery until you are master in javascript
 
im sensing on responses that there is no outright "use this language" kinda thing
 
8:30 PM
right
 
That's right, because which tool you use depends on what you're trying to do.
 
they have their purposes. Define your project, then decide how to implement using the right tool for the job
 
Learn all three so you know what to use when.
(But avoid jQuery until you know JS, as others have said)
 
why avoid jquery ?
 
8:31 PM
i find it easier to read
 
@user3504751 do whatever, but remember to understand that document.getElement... yada yada is not a part of JavaScript.
 
MGE
Hello I have this var:
 
and apologies for the mistake , i get that its a library
 
@AwalGarg ?
 
MGE
var userlikes = '["092fda9","93e5466"]';
and I want to add items using userlikes.push('value');
 
8:32 PM
Awal you helped me yesterday !!!
 
@MGE are the quotes around the array intentional?
 
thanks so much for that btw
 
@user3504751 you didn't troll Zirak, though, did you?
 
MGE
@SomeKittens its the result of json_encode of an array
 
@MGE So you'll need to JSON.parse
 
MGE
8:33 PM
the problem is Uncaught TypeError: userlikes.push is not a function
 
@ElliotBonneville ??
 
@MGE yeah... strings don't have that method
 
What do you mean by this @AwalGarg?
> document.getElement... yada yada is not a part of JavaScript.
 
@AwalGarg ....whoops
 
MGE
I have this
<?php if (Controller::getUserConnection()) { echo 'var userlikes = \''.json_encode(Controller::getUserLikes()).'\';'; }?>
 
8:34 PM
i have do admit, i did not
 
MGE
it returns the string
 
i didn't feel as though i should troll people
maybe i am just a pussy
i dunno
 
MGE
I need to covert the string or something?
 
....and then there's php
 
@ElliotBonneville it means that it isn't a part of JavaScript? I am not sure how to explain that :/
 
8:35 PM
@MGE ew
 
@user3504751 lol, I was kidding :P
 
Ah okay, nvm then, I get what you're driving at
 
i changed my code in the end again , now it takes out the div completely then adds it back in
 
@user3504751 web development requires education + research. If you leave out the education part, you're gonna have a bad time
 
8:37 PM
didn't realise that if there aren't any changes in the DOM the browser does nothing to it so it wasn't reloading (although your clone code also worked well)
as do most things , they say 10,000 hrs on anything makes you pretty much an expert
 
most of the js knowledge that you will ever need is simple as hell. but people try to think of js as a client side browser scripting language which is inherently tied to the browser. this is useless complication which only pulls back people.
 
MGE
solved
with parse, ty
 
learn js -> learn web -> learn browser -> you are dev
 
I wouldn't agree with 10,000 hours on anything makes you an expert. I've worked with sysadmins who called the customers idiots, and then I had to call those customers back and help them out
some people are just lazy. I'm saying don't be lazy
 
i guess being an expert does not mean you will have empathy
 
8:40 PM
I doubt the average guy would put 10k hours of real work into their day job
 
i am certainly converted and must learn javascript now i have appreciated the necessity and power of it
 
yeah 10k hours is a bit much
 
well perhaps on average 10k hrs means about 5 years full time
2000 hrs a year
ish
40 hr week ?
 
that's an arbitrary number either way
 
substract slacking or doing useless stuff
 
8:42 PM
i have to admit , the example was initially applied to playing golf as a non golf player , it was a "scientific" study but that doesn't necesarrily give it additional credibility i appreciate
"useless"
 
yeah, sports/music and similar skills are where that rule applies
 
aren't all numbers arbitrary ? , but always relative
 
where you practice
 
MGE
I use var.push('value'); to add an element, how can I delete an element that have 'value' from the var?
 
I am no golfer , i just have an addiction to pointless news sites
... more of a musician
 
8:45 PM
I got my mic to work and you all leave ...
 
8:59 PM
typeof Object.prototype => "object"
typeof Function.prototype => "function"

typeof Function.prototype => "function" I didnt see that coming.
What is happening behind the scenes?
So basically then Function.prototype.prototype should exists?
 
Think about it: new Function creates functions, so of course Function.prototype is a function, much like Boolean.prototype is a boolean
new F just creates a copy of F.prototype
 
If you need physical key events, unaffected by keyboard layout, i.e. the key right of "t" is always "y", this now works in Firefox: developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code
 
@copy oh, like keyIdentifier in webkit?
 
9:15 PM
@copy nice
 
@Zirak I don't know keyIdentifier
Like SDL key events
 
JSFiddle supports SVG. What a delight.
 
If you want to contribute something to emscripten, this is your chance
 
9:38 PM
Hi! Can jquery's Deffered be used to load an array of assets asynchronously, do something when each one has finished loading and do something when everything is done?
 
sounds like a job for real promises instead
 
yeah
Know any resources that would help me understand the concept of promises?
 
!!tell Jovito mdn Promise
 
@Jovito Promise
 
I already read through that.
Still confused.
 
9:44 PM
They are a monad, similar to the IO monad in Haskell
 
In passportJS when deserializeUser()'s verify function invokes done(err, user) and passes the user object back to passport.authenticate(), which then passes it to the callback under req.user, what do we actually use it for in the callback? What's the point?
 
confused about what exactly? What in specific you don't understand?
 
assetManager.loadBundle(bundle).then(
        function finishCB() { ... }
        function errorCB(err) { ... }
        function progressCB(progress) { ... }
that's what I'm looking for.
 
Ah
 
bundle being an array of assets to be loaded.
 
9:53 PM
you want them to be loaded sequentially or parallely?
 
paralelly
 
just iterate over the array and call your function, then?
 
yes, but I need to know how many assets have loaded everytime one loads
 
loadBundle(bundle).then(function () { counter++; })
 
nope
 
10:01 PM
@MadaraUchiha @BenjaminGruenbaum is it possible to do something like console.log(yield delay(500)) with bluebird coroutine?
bluebird people^
@Jovito show some code?
 
I want to be able to load multiple bundles in one function call. So the promise somehow would have to return loaded / total.
 
var results = []
 
function loadBundles(bundles) {
    _.each(bundles, function(bundle) {
        this.loadAssets(bundle);
    }.bind(this);
}

function loadAssets(assets) {
    _.each(assets, filename) {
        // load each asset
    }.bind(this);
}
 
(using template strings and native promises so use a recent browser)
 
I'm pretty sure there's a missing ")" in there... and other things that hurt my brain...
 
10:13 PM
yeah, there is
 
in my code?
 
Jovitos
 
on mine
 
ok
 
does inline-block only add margin to the right of the element?
 
10:18 PM
@JoeConsterdine I'm going to take a weird guess and say you're using bootstrap... hah
 
@Zirak, "new F just creates a copy of F.prototype" i'm not sure that i understand you well, can you please explain it further. Here "F" is any constructor function or just "Function"?
 
@Srle former
 
Nah just learning layouts on Treehouse... the guy is splitting 2 columns using inline-block for each column and setting them to 60% and 40% respectively.

He's adding -5px margin because he says inline-block creates extra whitespace.
 
@AwalGarg your code still calls the load function multiple times.
 
10:31 PM
@Srle As Awal Garg said, any function.
 
0
Q: Unknown error when using bcrypt.hash

vamsiampoluI have this pre mongoose middleware for saving passwords,I previously used synchronous implementation,now I am doing an asynchronous implemntation as mongoose middleware: schema.pre('save', function(next) { var user = this; var SALT_WORK_FACTOR = 5; if (!user.isModified('local.password'))...

 
@vamsiampolu are you using bcrypt or bcrypt-nodejs?
 
bcrypt-nodejs,the tag was not availabl
e
 
@Zirak "new F just creates a copy of F.prototype", it sounds like every call to new F() will create new copy of F.prototype instead of creating blank object setting _ proto _ to point on F.prototype
 
10:39 PM
Same fashizzle, I basically meant Object.create(F.prototype)
 
0
A: Unknown error when using bcrypt.hash

SomeKittensYou're using bcrypt-nodejs, which expects two callbacks: hash(data, salt, progress, cb) docs You've only provided it once, and so cb isn't defined when bcrypt-nodejs hits it.

@vamsiampolu
 
i guess i can just pass null for the progress callback,a lot of old code does this
 
Is it possible to match a character or end of the string? Something like /a[b$]/
So the string is either "ab" or "a" but not "acd"
 
@vamsiampolu Did that answer your question?
 
yeah,let me accept the answer
 
10:55 PM
DARN IT, I hate being home so much :-(
Can't eat non-veg food T_T
 

« first day (1673 days earlier)      last day (3280 days later) »