« first day (1642 days earlier)      last day (3296 days later) » 

12:01 AM
yolo swag no scopes. peace out bruhs
 
@sehe is here.. did I miss a flag?
 
wtf i thought i got rid of him
drop chaff
 
@monners what?
@SomeKittens are you inviting me to this event and providing free beer?
 
12:16 AM
@Shog9 Only if you provide your own PJs.
 
@Shog9 Nevermind
 
12:30 AM
Any idea why 0.50 is returning undefined?
var getInteractionType = function (percentWatched) {
return {
'0': '100',
'0.25': '101',
'0.50': '101',
'0.75': '101',
'1': '103'
}[percentWatched];
};

console.log(getInteractionType(0));
console.log(getInteractionType(0.25));
console.log(getInteractionType(0.50));
console.log(getInteractionType(0.75));
console.log(getInteractionType(1));
 
0
A: Possible Mage Jobs in an Urban Fantasy

SomeKittensCelebrity chef Mages are fairly rare, so rich folks looking for the ultimate "Unique" experience would flock to mage-prepared food (and the mage could charge quite a bit for the experience). That being said, most of the food could be prepared as normal, with a few fireball-charbroiled steaks to...

 
@Blexy String versus Number
 
@Min
@mintsauce , but if I pass in 0, 0.25, 0.75, or 1, it they all return the correct string
 
console.log(getInteractionType('0.50'));
 
right, so it has to be passed in as a string?
 
12:33 AM
I'm setting up stripe on my website. I keep getting this error --> Blocked a frame with origin "https://js.stripe.com" from accessing a frame with origin "https://xxx.xxx.xx.xx". Protocols, domains, and ports must match.
What do I need to do to fix this?
 
@Blexy 0.50, when converted to a string key, becomes '0.5'.
All Object keys are strings.
 
ahhhhh, duh
thanks
 
No probs.
The JS chatroom is a slightly more advanced rubber duck.
 
 
1 hour later…
1:36 AM
so i have been struggling with something extremely simple and just wondering if you all had any ideas. Yes its titanium but really this is just JS and Backbone
programs.fetch();
var programsEntry = programs.get(id);{
programsEntry.active = "false";
Ti.API.info("Selected a program name: "+JSON.stringify(programsEntry));
my active property is never set to false? (programs is a backbone collection)
 
user4330208
Easiest way to have different animations play for different media queries? I tried putting the @keyframes{} inside of the @media{} selector but its still using my first @keyframes{} selector outside of the media querie. Solution? Plz I give u 5 dolla.
 
figured it out.... needed to do programsEntry.attributes.active = "false"; (not sure why though [why i need to call .attributes])
 
2:41 AM
Whoa windows 10 (well the rest is ignorable but cortana ... oh my !)
 
3:16 AM
what are some reasons node might return an ENOENT error on file open
besides the file not existing, maybe I need to drain memory?
 
m59
3:39 AM
anyone know how to use async/await/yield with a setTimeout?
 
@m59 er, as usual?
 
m59
It's very alien to me :) I'm just spamming await/yield/* all over the place.
 
async.parallel([function (cb) { setTimeout(cb, 1000);}, function (cb) { setTimeout (cb, 500);}], console.log.bind(console));
 
m59
wuuuuuttttt
I'm talking about es7
 
well, that changes a lot
 
m59
3:46 AM
async function foo() {
  let x = await bar();
  console.log(x);
}

function bar() {
  setTimeout(function() {
    // get a value from here to x
  });
}
I've managed to get the timing to work such that x is logged after the timeout delay
which is pretty great =D but useless if I can't get a value.
 
You need to return a promise, I believe. bluebird.promisify
 
m59
hm... I wonder why they wouldn't just lighten it up
async function bar() {
  setTimeout(function() {
    yield 'something'
  });
}
 
does that work?
 
m59
heck no, just saying something like it ought to. I don't see why not.
 
How would you yield from a nested async function?
 
m59
3:56 AM
heh that is the question :) so I guess that's just out of the picture.
 
 
4:41 AM
weeee, stand-up desk is back in action and I've got my balance board set up as well. Office-life just got less unhealthy.
 
@ivarni pics!
 
Balance board and standup desk? That sounds kinda awesome
 
For greater health! http://t.co/A3rZeNyL9W
 
Sweet!
 
hi, I am having a problem with application of angularjs filters .. The sort by rating isn't working properly ... I mean if I click on 3 stars the movies shown atleast shouldn't exceed three stars. here is the webpage mdb.t.proxylocal.com
 
4:51 AM
Wanted to use my indo-board but it's honestly impossible to concentrate on programming while trying to not die
those round low balance boards are much easier in that respect while stile activating some muscles and keep a bit more bloodflow in legs
 
:D .. so you were trying to balance a board and code at the same time !
 
well yes, I can do it on the round boards, but not on an indo-board, because they take a bit more... effort. fitstream.com/images/products/indo-board-3.jpeg
though, since your arms rest on the desk at all times anyway, it's a lot easier
 
this is interesting ..
 
I've seen studies that say sitting down for 8 hours every day has a similar effect on your health as smoking
juststand.org/tabid/816/default.aspx: “For people who sit most of the day, their risk of heart attack is about the same as smoking.”
 
@SecondRikudo did anyone end up writing that canonical?
 
5:02 AM
@SomeKittens don't think so
 
It's still pinned so I would guess not
 
5:22 AM
@ivarni I code standing sometimes, my waist hurts
 
@argentum47 When you start up using a standing desk, don't use it for too long at a time. It takes a while to get used to. The more you do it, the longer you can stand without getting tired, there's a guy on my team that didn't even want a chair when he came in
 
:D ... yeah that's true.. after a few minutes it feels a little akward
any help on my angular application :(
 
bit busy wrangling with a custom validation framework atm
 
ok. np I can wait and keep trying in the meantime
 
5:50 AM
Star Trek is "remarkable"
 
@monners I'm using a <table>!
 
@SomeKittens That's great, dear. Have fun.
I'm gonna assume you're telling me this because you intrinsically know I've been balls deep in awful markup for the past two weeks.
 
yuuup
 
6:05 AM
@monners O/
 
o.o
T.T
 
why the T.T ?
 
Awful markup
Like damn
Came across a fun little style declaration today...
#wrapper #main.content ul { float: left; }
 
@monners link them
 
Eh?
 
6:08 AM
wrong link
sorry super slow internet.
There is an article on css-tricks
which explains what exactly happens when they write crap code like that
 
Oh I know, but whoever built this is long gone
 
but this shall suffice.
 
Or dead in a ditch somewehre
 
@monners darn :-(
 
I kinda hope it's the latter
 
6:10 AM
I'd rather put that as the first line of my css file
if i was working with such aliens
/*
    DECLARATION OF SANITY : PLEASE READ THE LINKED FILE
    BEFORE YOU DROP YOUR FILTH INSIDE THIS WORK OF PERFECT
    ART.

    developer.mozilla.org/en-US/docs/Web/Guide/CSS/…

  */
 
lol, that might do the trick
 
THE
If we read election statements of most nominee's they start with "we want to help other users .... blah blah blah" but when it comes to reality they take there guns out on them, Hippocrates !!
 
I am going to leave now, See ya
@KendallFrey 4
 
hey all
I am new to web development
I want to learn
Javascript
 
@nitesh.kodle123 Welcome to the wonderful, frustrating world of JavaScript
 
6:15 AM
can you suggest me proper learning curve
 
!!tell nitesh.kodle123 resources
 
thanx @monn
*@monners
 
If you're really new to webdev, start with this
Then check out the JavaScript resources
 
wht needs to be followed next
oh sorry
This will only take huge time
Its kick off time :P
Thanx @monners @CapricaSix will be back with doubts.
thanx again
 
6:20 AM
No problemo
 
hi, $(document).ready and $(window).load both aren't invoked by IE9 (but works in firefox 33 and other mobile browsers). What can I do about it?
 
@thePetProjectProgrammer Are you sure that's what happens and that there's not some other error creeping in the console?
 
@ivarni yes, I stripped everything except alerts to be sure, and it doesn't work!
this code doesn't show any alert in IE9
<!DOCTYPE html>
<html>
<head>
<title>Trial</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$( window ).load(function() {
alert("window load");
});
$(document).ready(function(){
alert("document ready");
});
</script>
</head>
<body>
</body>
</html>
 
6:43 AM
@thePetProjectProgrammer Hm, can't say I spot anything wrong, type="text/javascript" shouldn't be required with HTML5 doctype and that version of JQuery should work with IE9.
You've made sure you haven't disabled javascript in the browser you're testing with?
 
good morning guys
 
5k! :D
mini-mini-BOOM!
 
Yolo any one alive ? :)
 
7:00 AM
yop
 
@SomeKittens No, are you interested?
 
@ivarni aaah! who woulda thunk! I primarily use FF so don't know how it was disabled. Thanks.
 
@Joseph how are you doing? :)
 
@RahulDesai :-]
 
7:28 AM
How to remove event click if I attach like this to bind event click

google.maps.event.addListener(marker, 'click', (function (marker, con, infowindow) {
return function () {
infowindow.setContent(con);
infowindow.open(map, marker);
};
})(marker, con, infowindow));
 
@jemz You can't
 
@jemz Use removeListener. You may want to put the function in a variable first.
 
7:46 AM
s/may/have to/
or just use a function
 
8:13 AM
Hey all. Trying to add a class to the last element of a list - in dire need of a sanity check.. :) jsfiddle.net/t07ok6b2
 
@WalterB 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.
 
@Sheepy like this google.maps.event.clearListeners(map, 'click'); ?
Am I right @FlorianMargaine ?
 
@WalterB this also removes all other classes
@WalterB or rather, pure JS doesn't define a $ function
 
And even if you include jQuery, you still get this error: Uncaught TypeError: Cannot set property 'className' of undefined
You're most likely looking for .addClass()
 
(and jQuery objects don't have a lastChild property)
 
8:16 AM
@JanDvorak Ah right, $ is the jQuery sign (I didn't intend to use jQuery, but ended up testing so many examples online that I ended up copying a jQuery example I am afraid)
 
@jemz Like it yes. You need to pass in the returned function (in addListener) as third parameter. So you need to keep a reference (e.g. a var) of it.
 
@WalterB jsfiddle.net/t07ok6b2/1 Updated version, though this uses jQuery
 
@WalterB document.getElementById
then you can do className += " otherclass"
 
Thank you for your quick help here Kippie and Jan
 
@Sheepy, can you please show me what you mean.
 
8:22 AM
Hello
iw ant to generate table onclick event for 2nd row
whenever page loads then 2ndrow onclick event is automatically fired
is there anyway to do this?
 
That sounds like a wierd requirement, what are you trying to achieve?
 
If you're manually triggering the event, why not just call the function?
 
var func;
google.maps.event.addListener(marker, 'click', (function() { return func = function () { ... }; })() );
// Later:
google.maps.event.removeListener(marker, 'click', func );
 
Just use a named function....
 
@JanDvorak I think jemz is trying to create a closure. Otherwise the original code can be much simpler.
 
8:36 AM
somehow I smell race conditions
 
I smell burnt toast
 
I smell
 
race condition inside a toaster only remembering to turn off the last toast?
 
@Sheepy,
Is this correct ? I am not good in closure.

function drawingmarker(){

var func;
for(.....){

.....
.....
.....
.....


google.maps.event.addListener(marker, 'click', (function (marker1, con, infowindow) {
return func = function () {
infowindow.setContent(con);
infowindow.open(map, marker1);
};
})(marker, con, infowindow));

google.maps.event.removeListener(marker, 'click', func );


}

}
 
8:50 AM
@tereško why does it just cut off at 03:34? :(
that was really good
 
huh ?!?
could it be bad upload ?
 
probably
 
@tereško god is an imagination... lets make that song :D
 
that is the band's name
 
8:54 AM
The name gave me an idea for a song name.
 
you usually would start out with a song and only name it when it has fully formed
 
@tereško those songs are good. Where are they from?
 
no idea
 
Ireland
 
I just know that there is such a band and have been listening to some stuff of theirs for about a year
 
THE
9:05 AM
Instead of giving specific color, the only option I have is adding a background with linear gradient ?
I would use linear gradient but then I need it to support IE-9 at least & other browsers
why is my gradient not working ? - jsfiddle.net/nhe613kt/330
 
9:30 AM
16
Q: Does IE9 support CSS linear gradients?

James AlexanderWith Chrome/Safari and Firefox there's the -webkit-gradient and -moz-linear-gradient properties. How can I do this same sort of thing with IE9?

@jemz Looks like it... except for the for. If you are adding listeners in a loop, you need to keep track of all returned functions and remove them one by one.
@THE Many questions has answer on SO or Google. Learn to use them.
 
THE
figured out myself, thanks :)
 
@THE A few question is fine, but in the past few days you are using this chatroom as your personal tutor it seems...
 
THE
@Sheepy What ?
if you don't want to help, you don't need to...
 
9:52 AM
Hello, beautiful people!

Could anyone have a look at the code snippet below and tell me what I'm doing wrong? I'm trying to load an image into my canvas with a data URI and then resize it so it scales to fit the canvas. But the division I'm running only seems to return a 1.

Sorry if it's sloppy, I'm still new to JS.
    function readImage() {
        if ( this.files && this.files[0] ) {
            var FR = new FileReader();
            FR.onload = function(e) {
                var img = new Image();
                img.onload = function() {
                    var imgW = this.width;
                    var imgH = this.height;
                    var imgDiff;
                    if (imgW > imgH) {
                        imgW = 600;
                        imgDiff = Math.floor(600/imgW);
                        imgH = imgDiff * imgH;
 
10:08 AM
hello
 
@user2964674 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.
 
please help me
 
Damn it, apparently my math skills are really off too. Just realized I divided 600 by 600. Heh.
 
i want the box like + −.
how to do this
 
posted on April 15, 2015 by mattgaunt

If you’ve worked with the Geolocation API before, chances are you’ve wanted to check if you had permission to use Geolocation without causing a prompt. This simply wasn’t possible. You had to request the current position and this would indicate the permission state or cause a prompt to be shown to the user. Not all APIs work this way. The Notifications API has its own way of allowing yo

posted on April 15, 2015 by mattgaunt

IE10 and above added support for the ‘cut’ and ‘copy’ commands through the Document.execCommand() method. As of Chrome version 43, these commands are also supported in Chrome. Any text selected in the browser when one of these commands is executed will be cut or copied to the user’s clipboard. This lets you offer the user a simple way to select a portion of text and copy it to the clipboa

 
10:19 AM
7
Q: imitate browser zoom with JavaScript

lior rHow is it possible to zoom out an entire document with JavaScript ? My goal is to imitate the built-in browser zoom and zoom the entire document to 90%. I have tried using document.body.zoom This works only with explorer and the page gets messy (a lot of elements are moving around). Is ther...

 
is there a free database of uk addresses?
 
@SuperUberDuper I have used uk postcode list, but I don't think it included address. What do you want to do?
 
10:44 AM
Well I want to datasantise a bunch of addresses @Sheepy
so I need to compare them to a source of truth
 
10:59 AM
Hey guys! Does anyone knows whether there is a method in javascript which will check if the div i have in my html is on two pages or on one page.
 
@shawwy 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.
 
define "pages"
are you printing? scrolling?
 
Printing
I would like to create a "check", if the element is on two pages in print view, then the element would be placed ONLY on the second page, not the first one
full element of course
For example let's say i have table with rows 1, 2, 3. Row 1 is on page A and 2,3 are on page B. The .js will check, see that it's like this and then change it so all the rows will be on one page.
 
hm.. I am not sure how you'd do that, I know how to force a page-break but not sure how you'd detect one unless you know the height of a printed page in pixels
(and printers can zoom, so knowing that is hard)
 
well i have printing settings defined in print.css
But i had an idea, maybe there's a way to check whether the element is on page A and page B and then if it is like that, then the element will be forced only on page B.
 
11:05 AM
I believe the best way to have complete control over print is to generate PDF, not sure how easy it is with HTML/CSS but maybe someone else here can chime in
 
for example:
if element(elementID) on page A && element(elementID) on page B{
moveToPageB
}
i found this jquery for that: stackoverflow.com/questions/4257906/…
But i think this is defined for .html page not for printing
 
sounds like it.. If that select box exists on the screen
that's why I asked if you were scrolling or printing, this is easily solvable in the scrolling case but I am very unsure if even possible when printing
I suspect you'll have to generate an on-the-fly PDF. We had to do that when trying to print a credit-card sized picture and have it work across all browsers and printers
granted, your usecase is simpler, but still :)
 
How's that going to help me?
 
generate a PDF?
 
Well i understand that PDF does not get changed
But beyond that i'm not following
 
11:11 AM
all I am saying is that your options for controlling print via HTML/CSS are fairly limited, you might have to find a different solution
 
Hmm, so controlling PDF is easier?
 
but browser support sound flakey
 
Second answer suggest setting it to tables
which will work in my case probably
because i'm working with tables
 
how many mods are elected?
 
@Mosho 3
 
11:19 AM
@Mosho Right now it's just preliminaries, 10 will go to next stage I believe
 
I see
@SecondRikudo good luck
you have my vote :>
 
Thanks! :)
 
11:43 AM
Is anyone accepted into the prelims, btw?
Because I thought there were like 28/30 people registered for them, and there were some pretty big differences in different candidates' experience
 
12:02 PM
for some reason I do this in a function:
window.onerror = this.onError;
and then window.onerror is still null, after in another function
 
12:15 PM
cc Anyone who likes rockets
 
tl;dr?
 
wait, when did they do this?
 
yesterday
 
how the hell did I miss that?
 
@JanDvorak stage one landing attempt.
 
12:16 PM
so they succeeded?
 
@GNi33 they didn't show the landing yesterday
it tipped over
still, more successful that the previous attempt
 
At least with the previous attempt we got to see a nice explosion :(
 
Thanks.
 
oh, okay. looks like they vastly improved though. nice
 
Falcon 9 first stage landing burn and touchdown on Just Read the Instructions https://vine.co/v/euEpIVegiIx
 
12:18 PM
Oh, wow
 
If this works, I'm treating myself to a volcano lair. It's time.
:D
 
hehe
 
They didn't show the part where it fell over
 
They're just like the US government, man. Censoring everything and keeping the truth from us
 
12:25 PM
ofc they didn't :P
 
i thought there was no way it'd land when it was going sideways there
 
Did that rocket actually reach orbit? Or was it just a lift-off + touch-down kinda thing?
@KendallFrey Well, in your defence, it didn't land
 
@Kippie Dragon reached orbit fine
@Kippie it did
it just fell over
 
Tipping over is still crashing in my book
 
It did land just fine. It just tipped over subsequently from the excess lateral velocity :-D
 
12:27 PM
As every Kerbal knows, if there are any pieces left, it's a successful landing.
 
I have never played ksp :(
 
> A good landing is one you can walk away from. A great landing is one where you can use the plane again.
 
Thanks for the bounty @BenjaminGruenbaum
 
how is the state of products = [] saved so that they can be used in two separate controllers, one to set the value and the fetch the value in another controller ?
 
m59
12:38 PM
Brilliant:
this post is not at all specific to ninja forms so should be taken with a pinch of salt. Even if it helped the question creator its a bad answer in itself — AdamJones 5 hours ago
 
@Kippie it says it resupplied the ISS
 
@m59 Just caught him using table for layout at adam-makes-websites.com/showcase so he's disqualified from having an opinion :)
 
m59
@ivarni oh no doubt, I could have guessed. It's pretty obvious he just needed to look cool on the internet and feel powerful for downvoting a 20k rep user.
 
> a pinch of salt
 
@SecondRikudo sure thing, just giving some back :)
 
12:58 PM
Elon Musk might be from South Africa, but he's a true 'Murican
 
posted on April 15, 2015

Today I rant about undocumented Chrome features and unreadable W3C specs. There’s too much of both nowadays, and I’m getting VERY tired of both. Google and W3C should clean up their act. Today’s problem: window.webkitStorageInfo, which gives information about available and used storage space for localStorage and sessionStorage (and maybe more storage types, but I haven’

 
user1994804
Hi Guys, I'm a total JS Newb and have a question after watching a tutorial.
 
user1994804
With the following code;
 

« first day (1642 days earlier)      last day (3296 days later) »