« first day (1676 days earlier)      last day (3289 days later) » 

12:23 AM
Wee :D
I'm up for requests in case anyone cares :P
 
user2620028
Ugh i hate scooters so much
 
user2620028
That is really funny parking though
 
12:42 AM
Why was the => thick arrow syntax chosen over -> for ES6?
 
@HatterisMad try thinking about the word "scooter", repeating it in your head, while looking at this picture
Do you still hate scooters?
scoot scoot
 
@rlemon that's the difference between there and here - here he'd be fined and towed for it
 
@OliverSalzburg are you writing people's names? What is this?
 
now try imagining a tow truck actually towing a scooter
isn't that a funny mental image?
 
@BenjaminGruenbaum here the signs are on the same post like they should be
 
12:47 AM
@royhowie because of coffeescript and it not mattering very much - there was initially a proposal for two arrows => and -> but only => survived. -> was like => but didn't lexically bind
@rlemon here they do nasty stuff, like add a sign while you're sleeping and fine you
 
@BenjaminGruenbaum I know of the distinction in coffee script
they should've kept both
 
@royhowie why?
 
@BenjaminGruenbaum what if I want to be concise, but don't want to bind this
 
there. I imag[ed] it for you
 
12:50 AM
it's funnier without ever having actually seen it before
jokes on you, I corrected my typo
:P
 
History never lies!
 
var F = function () {
    this.answer = 5;
    var human = {
          answer: 0
        , getAnswer: () -> answer
        , getCorrectAnswer: () => answer
    }
    this.human = human;
}
@BenjaminGruenbaum I think?
 
This isn't a use case
But I see what you mean
 
!!s/\{.+/{return 5;}/
 
@Shmiddty 3Q: Strange interaction between new Function and evalIs there any reason why should this line of code fail?

new Function("eval('function foo(){return 5;}


It pops an alert in Chromium as expected, but fails in Firefox (foo is not defined). Is this a Firefox bug, or is there something wrong with my code?
javascript firefox [\(source\)](http://chat.stackoverflow.com/transcript/message/23368789#23368789)
 
12:53 AM
You have concise methods on objects though like:
 
@Zirak I broke it
 
var o = {
  foo(){ alert("HI"); },
  bar(){ return 3; }
}
Their justification was dynamic this is typically used in prototypical inheritance and you have classes now so use them
 
but I thought class was verboten
 
Don't have access to repo, no admins available, time for lolcatz
 
@royhowie ?
 
12:56 AM
@BenjaminGruenbaum I don't have the link anymoreโ€ฆ there was a huge discussion somewhere on why you shouldn't use class
 
@royhowie ..
 
user2620028
@Shea Yeah i don't understand your point?
 
idk, I guess I just find the word "scooter" funny, which makes it impossible for me to hate them
 
youtu.be/iukBMY4apvI is it okay to start using ES6 in development?
 
1:17 AM
@royhowie If you're ok with having babel as a dependency
 
@Shmiddty well, that's only needed in the browser, right?
 
user2620028
@shea i have them nearly kill me every day while going to school over here so my hatred for them has multiplied
 
I'm sorry, I didn't realize
way to make me feel like a jerk
I hope you're exaggerating, and scooters don't actually come to life and try to kill you.
 
@royhowie Do you not have a browser dependency?
 
user2620028
@shea nahh they are the taking the brunt of my disdain however
 
1:21 AM
well that's a very humble thing to realize
wait, I think 'humble' is the wrong term
anyways, good on you
 
I don't think @Shea understood what you said, @HatterisMad.
 
@Shmiddty nah, just server
 
help, I have to give a presentation on React soon
 
I'm in the dilemma of moving to promises/classes/other goodies in es6
 
and I've barely used it
 
1:35 AM
29 mins ago, by royhowie
https://youtu.be/iukBMY4apvI is it okay to start using ES6 in development?
 
Was that for me
?
 
@Firedrake969 yeah, the guy talks about reactive programming
 
@royhowie So what's stopping you from using whatever you want if you have control over the system?
 
I'm guessing there is no way to differentiate between a user scroll event and window.scrollTo()? I'm implementing smooth scrolling when a user clicks on a fragment identifier link for the same page and ideally I would like the user to be able to take control halfway through the scroll if they so desire.
 
@Firedrake969 lol why when you've barely used it?
 
1:45 AM
@joshhunt on('scroll', scrollAnimation.cancel);
 
@Shmiddty window.scrollTo() would fire that event though right?
 
I don't believe it fires an event.
 
hmmm I think it was but let me double check
yeah it does
 
I didn't know that. Interesting
 
I think maybe I could store the destination from the previous loop and in then in the next loop check to see if the current location is the previous destination. if not stop the loop
 
1:50 AM
It's better to log the more useful information
Also, addEventListener('wheel', ...) <--
 
2:05 AM
@Shmiddty Didn't know about that one thanks
 
jsfiddle.net/rlemon/8umz1zhk (this is just an example of the sprite sheet 'terrain' type I'm looking to make)
how would I avoid the nasty ass if's
 
I ended up just checking to see the current location was the expected location so that was it detects arrow keys and such
@rlemon could you just check t,m,b,l,c,r?
 
that is a basic demo, it doesn't contain all checks.
like single width cells
also i didn't make those sprites
also doesn't contain inside corners
 
@Shmiddty not really sureโ€ฆ
 
 
1 hour later…
3:22 AM
0
Q: Issue with scrolling height for jquery weekday calendar

Kala JI currently have a weekday calendar with some events on it. My calendar is custom and does not contain any times. Only Sun-Sat columns and blocks of information for events. The issue I'm having has to do with adjusting the scroll height(vertical scroll) for the column depending on the size/numb...

 
I'm trying to replace a content dynamically on my WordPress Site, I've countdown plugin installed, now what I'm trying to do is : when countdown reaches 00:00:00 the text above should dynamically update, is it possible ?
 
yes it is possible
use an if statement
 
I'm able to do it, but text updates when i reload the page not dynamically without reload here is the link to site http://mmanya.com/
and here is what I'm using to update the text http://jsfiddle.net/sog11qz8/ (this can be problem)
 
 
1 hour later…
4:36 AM
night
 
4:56 AM
0
Q: Addition Multiplication on Different ID using Jquery

Pooja RoyI am designing shopping cart website. and Fresher in Jquery My layout is I want to increment and Decrements value by one when Plus and Minus Button is pressed. also the total value for price should also be changed. I tried following jquery code. //Add and Subtract $("#add").on('click',functio...

 
@PoojaRoy 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.
 
ok sure @CapricaSix
 
5:10 AM
@PoojaRoy caprica is bot
 
@Jan..Yes if you are iterating over the list of element using class selector can cause your web page to freeze for a while — Vaibhav 4 mins ago
facepalm
 
morningz
 
5:27 AM
@NullPoiะธteั SOrry??
 
@PoojaRoy caprica is script
 
5:58 AM
0
Q: No JSON data displayed on php script

deepI have json data which looks as follows: { "firmware": [ { "Request": "/Firmware/samsung", "Count": "2954" }, { "Request": "/Firmware/apple", "Count": "2954" } ], "exe": [ { "Request": "/applications/appstore.exe", "Count": "448...

Spot the php
I can't find any
 
@Cerbrus - The file is saved as .php. Thanks!! — deep 2 mins ago
:)
 
That doesn't magically make the contents php. This is just html and JavaScript. — Cerbrus 3 mins ago
 
Yeah, I know
brb, renaming all my source files to .clj so I can add Clojure to my CV
 
hehe
 
6:14 AM
Mroning
*morning
goooooooooood, i cant even type morning x.x
 
*Good, *I, *can't
 
see
 
*See
 
... that happens when I start to work early
STOP IT
 
Too easy
Hehe
 
6:22 AM
my fcking MySQL data import query takes 6 hours... wtf
 
... nevermind this time :P
How much data is it?
 
idc, I don't wrote the import querys... it's around 20 querys, all along I think around 600MB CSV imported in a table, checked against given data, inserted into a third table, etcetc
 
Doesn't sound like something that should take 6 hours
 
The database is 100gb big... it joins on a 1 Billion data entry table
it's just stupid
I just got into this company 3 month ago and all I do since then is too look how to improve everything...
 
@Kovu Been there with a 1 billion row table, but in mssql
 
6:28 AM
but how to improve a database you can't move because the company is not giving you any new hardware, you can't touch because every single fcking query on this old hardware shit is running endless and nobody, really nobody, knows information about the given data, because the only one who had known quit 6 month ago
 
was allowed to write a query to truncate old data, it ran for 17 hours but that could be down to me being right out of school
 
the problem is, the 1.3 billion (to be exact) data ÌS the new data... before we truncated it, it was around 1.8 Billion
 
Hey guys, this might sound like silly question but I am not able to traverse over this output that I am getting from RestAngular.
I tried it with $scope.movies[0] but it didnt help.
 
@Kovu First six months are spent fixing all the dumb things. Second six months are spent realizing why they were there.
 
Its been a while that I am stuck on this.
Can anyone point me in the right direction please?
 
6:31 AM
Rahul: How are you loading that data?
 
This way:
$scope.movies = Movie.getList().$object;
 
.$object?
 
Its MongoDB data that is coming through Node.js
 
Hm, any way, the getList is an server call, right?
 
@Cerbrus Thats how they had it in the tutorial.
Yes.
 
6:32 AM
And when are you trying to access the data?
On the next line?
 
As soon as the controller is loaded.
Yes, next line.
 
But has the getList loaded then?
Probably not
 
It is because I can see other stuff in the view.
 
@SomeKittens I know that... I thought about switchting the company again but in fact I have very good payment here...
 
which is coming though getList
 
6:35 AM
The downside is: it's not an IT company, just a travel company with an IT deparment... what means we aren't allowed to do anything... no mobile phones, no headsets, no music at work, no private internert using
 
Let me try without the $object
 
I needed 2 weeks to get stack overflow in the firewall whitelist LOL
 
Rahul, that data may well have been rendered after you try to access it with [0]
Angular can tell when data has loaded (variables change), then adds it to the page, simply put.
 
I see.
 
Any way, you'll need to access the data in some kind of success callback in the getList
 
6:36 AM
Should I try adding a setTimeout ?
 
Noo
 
I see.
 
Nope nope noo
20
Q: $resource callback (error and success)

PaulIยดm using AngularJS 1.1.3 to use the new $resource with promises... How can I get the callback from that? I tried the same way I did with $http : $resource.get('...'). success(function(data, status) { alert(data); }). error(function(data, status) { alert((status); }); B...

Have a look at that
In your case:
Movie.getList().$promise.then(function(response){ /* */ })
Something like that may work
Or:
Movie.getList(function(response){ /* */ })
Not quite sure
 
@Cerbrus Movie.getList().then(function(movies){
^ seems to work!
Thanks mate :)
So whenever I see Array[0] in the console with come content in it, I should realise that its too early to access it. lol
 
It could be too early, yes.
 
6:44 AM
Appreciate it. +1
 
6:55 AM
-1
Q: Plz give a way to specify how to give different permision to two different user having same role in netsuite

Dipyaman Debstrong text Plz give a way to specify how to give different permision to two different user having same role in netsuite strong text

I don't think there's a reason that doesn't apply here
 
Target confirmed
 
hi all!
 
someone told me yesterday that AJAX success and failure were discontinued and replaced(?) with .done() and something else.
what's different?
 
@doodla I doubt anyone said they were discontinued, but, I presume you are looking for promises instead (then/catch)
 
I need advice
I have a web app
 
7:01 AM
Madara Uchiha
@doodla As of jQuery 1.8, $.ajax's success: and error: handlers are deprecated
Use .done() and .fail() on the resulting object. @RoelvanUden
 
Hello friends have a look at this question.
1
Q: select a specific text from a line of text

RahulGFor example if this is a line of text which is placed inside a file : The sun rises in the East. Also, in an HTML page it reads a text from a text box (say 'rises'). I need to check this text with the text inside the file to find a match. And I need to return the text value inside the file. How ...

 
most done with php js. Many users connect to it and do some job. But when people are working, some other users may see alerts sayin that user x has posted a new job, or has done something, or anything... with live connection. How would you manage doing this kind of events? Websocket? anyone already did that?
 
@Julo0sS Some kind of, yeah... Websokcets might be a good solution but in fact you have to check if all of your users are on one of the newest browsers since websockets are relative new
e.g. i had to do some sort of thing like u
but my users had ie9 (company intranet) installed, so I couldnt use it
 
@Kovu well, ws are not that new right? most browsers support it now
 
Eh.. relatively new? They are supported from IE10 onwards. IE10 isn't exactly new.
 
7:04 AM
okay okay
as I said... company intranet... ie9 on 40% of all my users
just to tell you: check it ;)
 
This is ok for me, most users are working on "relatively" new laptops so think most of them (+90%) are on firefox or ie10+
 
thats okay, then go with websockets
its easy to implement
 
well
thats not what i'd say
 
why not?
 
I already tried, to make myself an idea I took a "simple" tut on the web with nodejs and built a small chat app
 
7:06 AM
and? worked? :)
 
(it worked) and tbh, i don't really understand how I could manage many events instead of just the simple message thing
 
try, post a question on SO when stucking... cant help you without at least a bit of code ;)
 
think that when i'm working that should go fine. But problem for me is to understand where to start
 
build a server (you did this before with a chat, shouldnt that much different)
build a client of course..
connect the client
when ever a user post a job, message the server to client
client does something (e.g. alert())
Done?
 
I'll work a while on it now to be sure I understand the logic in this... the server is my main problem :/ I'm a bit confused with nodejs
 
7:19 AM
sorry I cant help you on node, my last implementation for the server was on asp.net given through my company
 
I also found some topics about ws server implemented with php but completely lost on this logic
 
sry, im not php freak here ;)
go in php chat ask for a php implementation of this server and help there maybe
 
I'll first go with nodejs i think^^
 
PM just asked "can't you just use a standard email validation?"
so young, so naive
 
7:36 AM
@Julo0sS It is your standard socket server. You can send whatever in whatever way you want. To maintain your PHP work flow, I'd suggest the NodeJS WS server to also have POST handlers so your PHP site can post events to the NodeJS server, which relays them to active web socket connections. Yay, realtime.
 
Morning
 
@Neoares morning
@JanDvorak Hi Jan and thanks for the help-offer. It is nothing too difficult I hope. Just wanted to know it "@require" is the only way to have multiple scripts share the same scope.
I am building a script for a chat bot, and since the logic is pretty long I was thinking to split it in multiple "modules". As now, the modules are loaded in the master one via @require. Wanted to know if there is an alternate way.
 
@require is pretty good, but if you want multiple userscripts communicating with each other, you can have them find each other through unsafeWindow.
 
@JanDvorak it isn't really "communicating", actually it is just a bigger script split in multiple files for readability sake, but thanks for the suggestion - will have a look at that.
as now there is just a script that creates some helper "classes" that the main one uses.
 
If they're just one script, stick with @require, or perhaps with precompilation
 
7:46 AM
-3
Q: Plz give a way to specify how to give different permision to two different user having same role in netsuite

Dipyaman Debstrong text Plz give a way to specify how to give different permision to two different user having same role in netsuite strong text

1 more
 
@RoelvanUden (@RoelvanUden @Kovu)I have some code (from my "simple chat" app built from tutorial), may we continue this on a dedicated room (I would create)? So I can show code and you may explain what's not clear to me?
 
closed
 
im okay with this, can help you when I can
 
@Julo0sS You can ask here. ;-)
 
yeh but i dont really want chat room spamming with my codes :/
 
7:51 AM
plz help me plz
xD
 
I opened a room
 
@Julo0sS gist
 
Isn't this tag more or less the definition of "opinion based"? stackoverflow.com/tags/conventions/info
 
@ivarni Yeah, pretty much
 
Wondering if it's worth posting a burnination request on meta, I see them occasionally but I never really quite understood the process behind it
maybe I should take this to the close-vote room though
 
8:03 AM
It's borderline. I don't like questions on those topics on SO because everything is hard to prove but many users like them.
 
for context, this is how I found the tag: stackoverflow.com/questions/30319225/…
but it's got quite a few questions tagged, 703 to be exact
so not sure if getting rid of it is even feasible
 
Hi guys
 
@user3722785 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.
 
Oh, yes, autowelcome is back!
 
OK
I have one issue regarding Hapijs
I have to set up the environment according to local and developement
 
8:16 AM
(and it has been determined it's not a joke...)
 
omg ms office pictures
 
I like it
 
the CEO is everywhere
 
I would guess I could learn a bit of MS FrontPage there... lets subscribe
 
8:20 AM
@FlorianMargaine Yep, it's like the paper of a little town, with the mayor at least twice on every pages...
 
"Students. Faculty. Institute.

Win. Win. Win."
wtf
 
Randolph G. Bias, Ph.D.,
I would totally listen to someone whose last name is Bias
 
I would ever try to not pronounce him biatch
Online Training is GREEN

Less fuel consumed in:

Commuting to classrooms
Running classrooms (e.g., heat, light)
Ground/air transport of paper products

Less paper consumed for:

Advertising
Course catalogs
Brochures
Stamps
wow
internet does not need fuel
 
Holy shit those flags
 
8:30 AM
Not sure it's everything even
 
@Kovu Sure it does, lol
 
three more to go, old ones, then this user's spam will be gone
 
Your computer takes electricity = fuel
The server serving you the lecture needs a lot of electricity + cooling = lots of fuel
 
@MadaraUchiha How much is it in chocolate bars / day?
 
@JanDvorak Approximately 42.
 
8:36 AM
@JanDvorak returning to Tavern. Thanks for now, will let you know how it went.
 
8:48 AM
user image
2
(stealing @dystroy's fame)
 
63
Q: How can I make my shell prompt look like a cheeseburger?

Corey GoldbergI want my shell prompt to look like a cheeseburger! ๐Ÿ”๐Ÿ”๐Ÿ” It would be nice if it also displayed: username, hostname, and current directory.

 
@BenFortune Insta canonical
Nice
I like how he congratulates himself "great choice!"
 
@FlorianMargaine I took it from reddit of course ^^
 
Upgraded my ubuntu server yesterday from 14 > 15, they switched from upstart to systemd
Royally fucked my Gitlab startup scripts
 
9:34 AM
!!youtube inactive
 
What would that do?
You can't navigate to multiple pages at once
 
@JanDvorak Sure you can, if you're chuck norris
 
I all I have a javascript code which gives me a graph.
I take certain arguments from user and then generate the graph. I am stuck at how to show graph when user clicks submit.
Currently i have an html file which shows the graph. But now that html is created on the fly. How do i solve this problem
 
Why not have one form if you want to submit everything?
Can you wrap the form element around the tab widget?
 
9:47 AM
I just want to see if I'm right but is it true that recent browsers compile JS rather then interpret it ?
(i've read it somewhere - don't remember where)
 
I'm using the below code, just that data points are given by user on clicking submit. How do I show this graph after clicking submit.

<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer",
{
title:{
text: "A Multi-series Column Chart"

},
data: [{
type: "column",
dataPoints: [
{ x: 10, y: 171 },
{ x: 20, y: 155},
{ x: 30, y: 150 },
{ x: 40, y: 165 },
{ x: 50, y: 195 },
{ x: 60, y: 168 },
{ x: 70, y: 128 },
{ x: 80, y: 134 },
 
@RoyiNamir Yes, they JIT it.
 
where can I read which browser/ver does it ?
 
@RoyiNamir for transparency's sake, it's as if it were interpretted, though it is read in its entirety and optimized
 
@Neil but optimized !=compiled
 
9:48 AM
@BenjaminGruenbaum Remember the promise question I answered yesterday ? It made me realize something: .all is everywhere in questions but I never use it because I always find something more convenient (map, reduce or spread usually) and I feel like it should not be frequently used in a well structured code. Do you frequently use all ?
 
@RoyiNamir No idea. From memory, IE9+ uses Chakra that does it, Chrome uses V8, and I haven't got the foggiest about FireFox.
 
@RoyiNamir I supposed it depends on your definition of compile.. the whole thing gets parsed before your program is "run"
doesn't go line by line, in other words
 
I am uploading a picture of my syllabus, just need some comments :->
(maybe in next 2 hours)
 
@dystroy spread is to be used with all
 
well, you can use spread following return [f1(),f2()]
 
9:52 AM
ah, true
 
@FlorianMargaine But you make me see that a reason I don't use it is I almost always start my chain from a promise factory
 
@dystroy no, but remember that .map .reduce .spread etc are bluebird methods.
The only aggregation method (other than .race) in native promises is .all
 
.race?
never heard of that
> The Promise.race(iterable) method returns a promise that resolves or rejects as soon as one of the promises in the iterable resolves or rejects, with the value or reason from that promise.
interesting
can't see a use case though, but I guess they exist
 
I see bad use cases mainly
 
@FlorianMargaine Maybe games?
 
9:58 AM
multiplayer games, yes, maybe
 
@FlorianMargaine Kind of like any, except it'll stop for a rejected promise
 

« first day (1676 days earlier)      last day (3289 days later) »