« first day (2075 days earlier)      last day (2866 days later) » 

12:00 AM
saw GoT
holy shit
10/10 on imdb lol
don't think I've ever seen that
 
GoT is ok not what I like though
 
the latest episode?
 
haven't' seen the latest just watched part of the series
 
@Mosho WOOT
 
@Luggage yeah
 
meh
 
I mean the episode
got a 10
 
right. meh.
 
I haven't seen a 10/10 anywhere, ever
 
anyway, some of the best combat in tv/cinema
ever
 
12:04 AM
it was basically just braveheart + apocolyptico
 
I think I saw Skyrim get a 10/10 somewhere
 
Yeah, it was the best episode of the season, which honestly doesn't say much, sionce this season has been kind of bad :(
 
breaking bad and the big bang theory are better
 
Your opinion is void if you think the Big Bang Theory is good.
 
^
^^^^^
^^^^^^^^^^^
 
12:05 AM
!!^
 
breaking bad is good the big bang theory I found better the GoT when I compared the 2
 
also, in one sentence with breaking bad
a troll if I've ever seen one
 
12:30 AM
so when is the next book coming out?
 
Never
 
meanie :'(
 
1:21 AM
Hiya, does anyone here have experience with Electron? http://electron.atom.io/
That is, building desktop applications via JS?
 
wtf visual studio code is built like a web app
 
yep, it's a fork of atom.
 
1:37 AM
The thing about the Edge vs other browsers experiment is that they didn't specify what options they have enabled, plugins, additional libraries, etc. Chrome, for example, tends to have stuff that's helpful to Chrome devs constantly running, and also hive-like information networks to help monitor everyone's experience, and these processes of course take CPU time/battery life. I'm not saying that's necessarily a Good Thing(tm), it's just not necessarily a fair contest. My 2c.
 
@tudor Welcome to the JavaScript chat! Please review the room 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.
 
What does the dot point "THE GAME!" mean in the rules?
 
It means that you lost the game.
 
By reading the rules? I don't follow.
 
!!tell tudor urban the game
 
1:46 AM
@tudor the game A game, The sole object of which is to not remember that you are playing it. As soon as you remember that it exists, you have lost and must start again.
 
oic. A colloquialism.
 
 
2 hours later…
3:22 AM
@SomeGuy Basically helping with their UI and React architecture - Been doing a bunch of refactoring. Love being product-side
 
 
2 hours later…
4:55 AM
any help regarding this question? any heads up if i'm doing something wrong here?
 
5:20 AM
hello guys
 
stackoverflow.com/a/7616484 what is the use of that last line hash |= 0; I have tried 97 | 0 , (97 * 31) | 0 .. its all the same
 
any idea for a regular expression for accept string only or string with space or string with dot or string with space and dot
 
@shortCircuit I was wondering about that, too. You could move the |= 0 to the return statement...?
 
it should accept: vishnu, vishnu s babu, vishnu.s.babu and vishnu s. babu
@le_m @AndrewCay @shortCircuit
 
@VishnuSBabu ?
 
5:34 AM
@VishnuSBabu regex101.com
@shortCircuit a |= 0 converts the number into a 32 bit integer - all bitwise operators do. Try Number.MAX_SAFE_INTEGER | 0
 
Hey all, I'm looking for some advice on building a JS Desktop App for OSX. I have plenty of experience in JS/Node, and a good idea on where to start (Electron by GitHub), but I have a requirement where this app needs to connect to a printer via BlueTooth... Most likely this printer would already be installed and connected via OSX. Y'all think this is possible using a JS desktop application?
 
5:55 AM
Why do you need direct connection to the printer? Would using the OS spooling service suffice?
 
Yes it most definitely would, however I am very ignorant towards JS apps and its API/access to the OS
I don't even know where to begin to look in regards to enabling print support within a JS desktop app
Is it something that is already made available from within the app browser container? Any insight or resources would be greatly appreciated.
 
Webpages do that by creating a @print media layout (which could theoretically hide the whole page and uncover entirely new content) and then calling window.print(), which triggers the same dialog as CTRL+P
You might want to show the same dialog as well
 
Ah excellent. For my app scenario, it's a kiosk where a user checks in, authenticates via our API, and then clicks a button to have a 'badge' printed for them (think a badge for attending a conference). So I assume the 'badge', which would be created in HTML/CSS, would have its own @print media layout, so that clicking the app 'print' button would trigger the standard CTRL-P dialog but with the badge as the requested print content.
Am I close to understanding this properly?
Let me look into window.print real quick
 
Yes. But if the content is that different, perhaps opening a new page with only the badge would be better?
 
Yes just read docs - "window.print() prints the current page". Since this is going to be a desktop app with an intended easy user interface, I'm wondering would an iFrame suffice?
 
6:09 AM
You can try.
 
Okay cool, well I'm on a much stronger path now of understanding thanks to you.
I appreciate it
 
Where are you reading this? The quote is incorrect
MDN says "Opens the Print Dialog to print the current document."
 
Yeah, drop w3schools
 
haha
 
was waiting for it
Ah good note there RE: the iFrame
 
They also miss that very important note, "Starting with Chrome 46.0 this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modal."
 
^^
What does 'sandbox attribute' exactly refer to?
<iFrame sandbox="*"> ?
 
So, my idea would be to open a new window with the badge showing and from that to open the print dialog
 
NVM on 'what is sandbox attrib'
 
Yeah well or I can just set that attribute to 'allow-modal'
I will attempt both and weigh the best method for user accesibility
 
6:34 AM
Thanks again @JanDvorak
 
!!> a={};a[true]=a[false]=0;for( var i = 0; i < 10000; ++i ) ++a[ typeof null === "undefined" ]; a
 
@towc {"false":10000,"true":0}
 
nvm
!!> var a = {}; a[true] = a[false] = 0; function foo(){ return typeof null === "undefined" } for( var i = 0; i < 10000; ++i ) ++a[ foo() ]; a
 
@towc 0
 
oh, no multiline, huh?
 
6:47 AM
@towc {"false":10000,"true":0}
 
Football players enter from the field one at a time starting with player 1 , player 2, etc. All lockers are initially open and as each player comes in, he closes opened lockers and opens closed lockers divisible by his player number. After the team is all entered, what is the pattern that emerges?
 
that's kinda weird
same code as cap
I guess there is no such issue in node or whatever she uses
nvm
and there are 11 lockers?
ideally you'd see that the most switched lockers have prime number indices
 
@towc well the question is really about the pattern so it is arbitrary
 
I guess
 
@towc least switched you mean?
 
6:51 AM
@Neil no, most
 
@towc why? It is only changed by player 1 and the player with the prime number
 
@Neil nope, player 6 would switch open 6, 3, 2 and 1
7 will change 7
 
Locker 36 would be opened and closed like a one dollar hooker
@towc right, so locker 7 changes little
 
:P you may have gotten the question the wrong way around
 
@towc err no
 
6:54 AM
or nvm, what about locker 36?
 
Player 6 would open/close lockers 6, 12, 18, ...
 
it's known for having many factors, but not because many things are divisible by it
nope, 6 would open 1,2,3,6
 
@towc you're going to argue what I meant regarding my own problem? ;)
 
yup
> he closes opened lockers and opens closed lockers divisible by his player number
that's what that means :P
OH SHOOT
nvm
I'm so sorry for all of this
 
:D
 
6:56 AM
no idea what am I thinking
and yeah, prime number lockers will always be closed in the end because they only get opened once, unless there's a guy whose number is 1
in which case they would all be open
 
@towc so how is locker 7 different from locker 6 in that respect?
They'd both wind up open
 
as more players come, the state of locker 6 will vary without tending towards any state
so it's both open and closed if you will
while locker 7 will only change when a player with 1 and 7 comes
and assuming there are no 2 players with the same number....
 
Quantum lockers, hmm interesting solution
 
why do you think locker 6 would be wind up open?
oh
 
6 would be open/closed by players 1, 2, 3, and 6
 
7:00 AM
nvm again
yeah, I was thinking the other way around again
well, for sure prime number lockers would always end up open :P
 
4 will be closed though
 
I'm not going to tell you anything else, because apparently my brain isn't working
 
@towc thinking when your brain hurts is healthy
 
more like I haven't had any sleep
 
Or so mai mamma sayd
@towc well sleep on it
 
7:03 AM
during school, for sure :P
morning here already
 
FUCK Windows and Micro$oft
 
Dat ascii art
 
nothing against ascii art in the rules that I could find
 
@William I don't have a problem with it, but people like to flag such things. Fair warning
Maybe ascii bunnies would be more accepted
 
will use next time
 
7:12 AM
Then, a "fuck windows and microsoft" wouldn't carry the same emphasis with a cute ascii bunny
 
Hi
 
someone disliked it
 
@Neil I think it would carry the exact same emphasis.
 
is any one have idea IE how to open blob object in new Tab
 
    (\ /)
    ( . .)
  C(") (")

Screw M$ and all that
See?
 
7:15 AM
Yes that is better thank you
to be fair middle finger isn't offensive everywhere I could live in india or something
 
@MadaraUchiha Jesus, why do I suddenly despise Microsoft all of a sudden? I bet they murder helpless bunnies!
 
Did you just use "Jesus" as an emphasis?
 
@JanDvorak Yes, I did. Jesus!
 
Please don't.
 
Can I use "cheeses"?
 
7:22 AM
Depends on your accent
 
I forgot what year it is
 
@Neil which calendar?
 
Cheeses Crisp!
 
!!> (new Date).getYear()
 
@MadaraUchiha 116
 
7:23 AM
@Neil It's 116, obviously.
 
That's the two-digit year
 
Can't doubt irrefutable evidence
 
by definition
 
@JanDvorak No, it's a three-digit year...
 
@JanDvorak by definition, that is a three digit number
 
 
@zeeshanQurban Welcome to the JavaScript chat! Please review the room 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.
 
@zeeshanQurban hiya
 
@zeeshanQurban hiya
 
7:35 AM
not canada!
 
Who needs canada anyways
 
Hello! How to Add a Single line of html inside an iframe <head> tags?
 
user3119231
Anyone got a clue how to make this youtube video "covering" the background? (fill the black space coming from iframe)
 
user3119231
 
user3119231
7:48 AM
I just need a youtube video to fit in the banner
 
@William my god
 
@Neoares yes
 
._.
 
( ͡O ͜ʖ ͡O)
 
any suggestions?
 
7:52 AM
@AbrarAhmed <head><singlelineofhtml></singlelineofhtml>...
 
http://jsfiddle.net/oscarj24/wTWjF/

I want to change the body contents of an iframe
@littlepootis
 
you just did..
 
Sorry this is the link.
http://jsfiddle.net/wTWjF/360/
 
Yeah, you can't do that. Security.
 
BLAME CANADA!!!
@AbrarAhmed depending on the iframe you couldn't do it
 
8:02 AM
They have animals that can rip off the roof of your car
 
imagine you have a paypal iframe, and you insert code that reads key inputs
 
@Neoares Don't just start blaming people like that. That's completely baseless. Blame @rlemon instead.
 
That's the doing of one of those canadian beasts.
 
nice car
 
It was
 
8:04 AM
I give you 1€ for it
 
You're the cheapest trash guy I've ever met.
 
@Neoares @JanDvorak Thank you! :)
 
MORNIN ALL
 
@choz way too enthusiastic for me this early in the morning
 
It's almost past noon here.. I just pretend to be more enthusiastic..
By using CAPS LOCK POWAHH...
 
8:12 AM
Is this possible to make a contenteditable div to show HTML 5 validations on error?
when I press submit button
using HTML5
 
If you pay attention to the punjab university guy who mentioned 'htm is basic for java'
he also said 'everything is possible'
 
<Khassaki> HI EVERYBODY!!!!!!!!!!
<Judge-Mental> try pressing the the Caps Lock key
<Khassaki> O THANKS!!! ITS SO MUCH EASIER TO WRITE NOW!!!!!!!
<Judge-Mental> fuck me
 
lol
 
Jan, that's an old joke
@Mr_Green not sure if i understood you correctly, but i think that you need to look into setCustomValidity or something like that
 
8:29 AM
@choz if u don't know java then it's not my fault
 
would it be useful to separate the authentication status of a user and the information (like email, phone ...) which belongs to him in different redux stores?
not sure if i should fetch all information and store them together or to make different calls
 
heh, radio news
> There was a strange accident, yesterday morning. A woman entered her car, started the engine but didn't have noticed that the clutch is in stance 1. As result of this, her car moved forward and entered her house's living room before she could stop it.
 
how?
I mean if you're not pressing the clutch, and it's in stance 1, the car stalls
automatically, and only moves like 5-10cm forward
 
@littlepootis No answer yet.. I'm sad
 
8:44 AM
@Neoares yeah, i've wondered that too
i believe that her car is automated and that she pressed the throttle per accident
 
Ok, this is stupid question. Anyone knows how I can drag a polygon shape on google map but by clicking the stroke of the shape only?
 
bind an event to it
 
@KarelG Which event?
 
the gmap API provides that functionality
just enable the drag event by using draggable: true option (default false)
 
I've got that already.. But which event should I listen to if I want to start dragging only while clicking on its stroke..
 
8:59 AM
okay... another Question. I have to write an vacationplanner. Should I store information like total_vacation_days & left_vacation_days in the localStorage or in a redux Store? I´m unsure at the moment... what would you guys do?
 
most of us are making such decisions on daily base. Just think about pros/cons when using either localStorage or redux store. And make the choice
@choz you said "clicking", so listen to a click event :P
 
@KarelG I'm totally f-ed..
 
lol @ "the stars"
I have to admit... that is commitment and passion for the game
 
@jAndy The Game
 
Only Caprica can say it the right way
 
9:18 AM
do you know why cap does that ?
(well, I guess that it is just entered manually)
 
No... some mad evil genius modified cap's code years ago, so it has a .5% chance to make me lose the game whenever I type something
 
But it happened 3 times that day ?
 
9:37 AM
@KarelG *by
 
@JanDvorak it's from bash.org? heh
 
@KarelG yea, unless 'someone lemon' manipulated that
 
9:54 AM
hello.
does somebody know how to build a json using a variable?
        var getAll = function (label)
        {
            var myLabel = "all" + label;
            var params = { myLabel: true };
        }
 
For the question, see JSON.stringify. For the example code, I'm not sure what it's supposed to do.
 
it even does not about json... just about to create an object with the property name passed in parameter
 
oh. Then []
 
you mean
var getAll = function (label)
{
var params = {};
params["all" + label] = 1;
 
Yes. Unless you want to use ES6
 
10:01 AM
what do you mean
no, I want my script compatible with all browsers
 
10:15 AM
Hi
I am looking for a good plugin which creates tags and shows suggestions to create tags
 
@Mr_Green react?
react-input-tags
otherwise start using react :D
 
10:53 AM
@Abhishrek not using react :(
regretting
 
write your own :D
 
no time
 
jQuery?
 
yes
saw some plugins but they require jquery ui too
 
@Mr_Green There was a project about that before, we have used Taggle.js
 
11:15 AM
@JanDvorak, thank you, man !
 
@rlemon : do you see something odd in this image? i.imgur.com/1SynJ0q.jpg
 
@KarelG Someone burnt those. (I saw that image before)
 
11:35 AM
They aren't edible?
 
technically everything is edible
 
Steel sheets aren't edible
 
Hi, I am Edible!
 
@JanDvorak They are if you grind em up
 
I've been bitten by that before.
 
11:38 AM
@VeronicaDeane I think your definition of "edible" differs from mine
 
probably
 
what wrong with this
var a = "a\b\c";
if (a.indexOf("\")) {
    var c = a.substring(a.lastIndexOf("\"));
          console.log(c);
        }
 
I use the Pippi Longstocking definition
@Mathematics The indenting
 
@VeronicaDeane indenting ?
 
that's the first problem I spotted
not the last
 
11:39 AM
@Mathematics \anything is a special character in a javascript string
 
@Neil ah that's it
 
There's no ` is \b`
 
brb
var a = "a/b/c";
if (a.indexOf("/")) {
  var c = a.substring(a.lastIndexOf("/") + 1);
  console.log(c);
}
fixed, thanks guys
 
there's still a bug
indexOf returns a number, not a boolean
 
lol
i had my onload function in the closing body tag
lol
 
11:43 AM
why are you laughing
 
cause its a silly mistake
 
what mistake?
 
the onload function belongs in the opening body tag, not the closing body tag.
 
oh you mean literally the attribute?
why are you using attributes
 
i'm using a body attribute so my javascript can perform things on that body
 
11:45 AM
why not use window.onload
 
great idea
 
@VeronicaDeane true
I figured out, I don't need indexOf at all :)
 
@Mathematics What did you use, then?
 
@Cerbrus nothing
in substring it ignores if there isn't any "/"
 
12:01 PM
any experience with cipher module folks?
 
what's your current question Math?
 
@JossieCalderon none at the moment
 
Hi all.
How to test whether my ionic app creates a local sqlite db or not?
 
@AvinashRaj I assume that there would be a database file of some sort
Otherwise you would have had to configure something
 
12:16 PM
@AvinashRaj Why are you assuming that it creates one in the first place?
 
I added necessary code for creating db and also the tables within that..
 
So, if you can create tables, it sounds like there is a database. Otherwise, there should be an error
 
@OliverSalzburg Added necessary codes for that (ionic popup for success as well as failures), But it won't show anything..
 
@AvinashRaj That sounds like the code isn't even running
 
On browser, it shows db related error..
ya, as we expect..
But donno what happened on my device.
 
12:22 PM
Might be a lower level error, which plugin are you using?
And what device are you testing on?
 
any java folks around
I just need to know what they are doing in the specific cipher operation so that I can replicate the same for node.js
it'll take a minute or two perhaps
 
@GandalftheWhite java jvm source code is available online if you want to see how they did it
 
export function getWorkingDays(startDate, endDate){
    var result = 0;

    var currentDate = startDate;
    while (currentDate <= endDate)  {

        var weekDay = currentDate.getDay();
        if(weekDay != 0 && weekDay != 6)
            result++;

        currentDate.setDate(currentDate.getDate()+1);
    }

    return result;
}

 console.log(getWorkingDays(begin, end));
 var days = getWorkingDays(begin, end);

 Why does console log the correct result and if I log "days" is results 0?
 
@Neil I just wanted to know what a code snippet is trying to do
will you spare a minute?
 
12:30 PM
does this belong to export or sth like this? do i have to handle such functions in another way?
 
@elsololobo Probably because you're modifying your dates
 
@OliverSalzburg where? how?
 
As in, begin is a reference to a date and getWorkingDays is manipulating the referenced date
currentDate.setDate → currentDate === startDate → startDate === begin
 
Thanks all. Make it to work using stackoverflow.com/a/28186445/3297613
 
At least that's what I'm assuming :P
 
12:31 PM
okay :)
wow... this has really just happen cause I performed the console.log before the actual logic... so you where right buddy ^^
 
@elsololobo In any case, you should just clone the input, so var currentDate = new Date(+startDate); or something like that
 
@OliverSalzburg it properly display the record inserted popup on browser but not on my device.
 
12:51 PM
@GandalftheWhite ok, shoot
 

« first day (2075 days earlier)      last day (2866 days later) »