« first day (1899 days earlier)      last day (3272 days later) » 

01:13
Hey guys, anybody know what language this syntax is from? {{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}
looks ugly
Huh, I didn't know Go had templating built-in. Kinda strange that it does
I actually like Go, but I wouldn't use their templating package... yuck
I have to. I'm using it for Docker's inspect command
It lets you iterate through the JSON output of the inspect command to only return the JSON data you want
e.g. docker inspect --format='{{json .NetworkSettings.Ports}}' CONTAINER_NAME
Why do world maps always split after Australia - why not any other place?
Is it just the fact that a vertical line can be drawn at that position without intersecting any other countries or is there more to it?
01:24
It's because you're viewing maps made by the "western" world. It's all about perspective.
01:49
@ndugger I got something for you :) codepen.io/towc/full/pgEYjy
well, also everyone in this room
but you more than others I guess
Hey man, I'm just glad it isn't a rainbow
did you open it?
and rainbows spit out, I thought you'd enjoy that :(
whatevz
ho ho ho
01:53
hey santa
nick bb
lettuce sex
cabbage sex
cheese
02:03
taco sex
 
1 hour later…
03:13
Anyone ever used the commander npm module?
I can't get boolean options to work at all
It only works if the option accepts a parameter
cmd
.command('setup').description('Setup a new Blackbeard project')
.option('-b, --boilerplate', 'Setup with boilerplate examples')
.option('-d, --database <db>', 'Setup necesary database modules', /^(postgres|mysql|mariadb|sqlite|mssql)$/i, 'postgres')
the -d flag works perfectly fine, as it accepts a parameter, but if I try to use the -b flag, it's as if it was never even used
I never used the boolean stuff, sorry
penus
have you done the parse?
03:24
yeah
cmd.parse(process.argv);
and cmd.boilerplate is undefined?
typos?
no typos, it is undefined, yes
I wish @SomeKittens was still in this room
he's a contributor
when doing circular animation do you guys store positions of angles in radians to avoid converting from degrees? or do most people store in degrees and convert when drawing
How to run javascript with link trought web console
with a href
?
Your question makes no sense
03:38
oh
how to run js in console
Just type
but with online file
this is file i want to run
copy/paste it
can you not just use the append line in console to append it
then it should go
var js = document.createElement('script');
js.src = "http://nexdon.github.io/NBOT.js";
document.getElementsByTagName('head')[0].appendChild(js);
03:41
I want to run it with a hhrome extension
chrome*
something like that
See my code
then do it; we can't read your mind
If you're writing a chrome extension, just include it in the html..?
document.head
I am not a page owner
i want to run javascript with a link
i did that before
03:42
@ndugger my girlfriend thinks i am able to read her's though!
but i forgot how
I JUST GAVE YOU THE CODE DAMMIT
i did that in one line before, but nvm
thanks for help :)
var js = document.createElement('script');js.src = "http://nexdon.github.io/NBOT.js";document.getElementsByTagName('head')[0].appen‌​dChild(js);
one line
:P
lol ^
03:55
W3.CSS: W3Schools' own CSS framework w3schools.com/lib/w3.css #wtf
> .w3-hoverable tbody tr{transition:background-color .25s ease}
w3schools pls
04:25
noice, using that on my next project
> Hello,
> does anyone any experiences with w3.css? If yes, does it mean that I should say: No more CSS?
>
> Another question. Is a Sass the most mature, if w3.ccs is newer than Sass?
> http://sass-lang.com// --->this site is describing Sass' as the most mature:)
0
Q: Inheritance hierarchy using constructor pattern

overexchange Animal class has four fields: name sound owner favFood Cat derived class has one field mode Derived class Cat is created such that every instance of Cat inherits instance members of Animal. In addition, Cat adds a new instance member mode. Constructo...

Dideyejustsee a 284:1 Q:A ratio..
04:40
@Meredith Book recommended on design patterns is good
Is there any javascript framework for login?
@AndreChristoga 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.
@AndreChristoga wat
i got
a is undefined
when html5mode(true)
in angular
any reason ?
05:05
05:21
I need help
with js
when my friend run this in web console he gets NBOT.js:1 Uncaught TypeError: fkey is not a function
1 message moved to Trash can
@NiKoLaPrO please do not post unformatted code into chat; use [Ctrl]+[K] to format code.
@@ndugger know what is the problem?
Manually format it if you have to, that's not fun to look at...
1 message moved to Trash can
I'm going to bed
guys how do I optimize if(x == "hello" || x == "world")?
I tried if(x == ("hello" || "world))
In this code, as per debugging, Animal.call(this) is executing local variable assignments in Animal class, Does that mean, those local variables(_name/..) will be created in derived class Cat as well?
05:26
if (x.match(/(hello)|(world)/))
but that's not exactly the same thing as ==
however, you should never use == in javascript anyways
make sure to use strict equals, ===
oh!
oh god, thanks for telling me!
!!> 0 == false
x in { "hello": 1, "world": 1 }
@ndugger "true"
!!> 0 === false
05:28
You know, I see a lot of people doing things like:
@ndugger "false"
if (x == false) or if(x == true)
instead of (!x) or (x)
Nah, you can do the latter, but make sure to use strict equals. double equals plays some nasty tricks in javascript
And sometimes I see stuff like : if(lucas == "red" && lucas == "blue" && lucas == "yellow" || lucas == "black")
So now I know to use strict equals
doing a simple match check does the job but
@ndugger had this conversation earlier
05:32
what other way is there to optimize those repetitive if conditions?
there isn't, really
8 hours ago, by Shea
user image
@Shea Not sure how you were confused, using a bang very obviously converts into a boolean
I wasn't confused, I was just bothered that VS:Code told me I couldn't do that, when I can and I am
var j = i % 2 ^ 1 or var j = 1 - i % 2
05:34
!!> true > 0
@Shea "true"
!!> true + 1
VS:Code is a stupid editor, as far as I'm concerned
beats Dreamweaver
05:35
It's pretty smart, helps you find bugs
lol, many things beat dreamweaver; don't settle for yet another pile of crap
Usually you don't intend to use < on booleans
I seriously need to get to bed now. Work in the morning, and I've been putzing away on my framework all day. Goodnight, folks
well when you've grown accustom to using crap for years, it's hard to pull yourself out of that rut
I like dreamweaver but it is a bit bloated
05:37
Try Haskell
I used it only for it's autocomplete, and got use to a bunch of bad habits that came with the rest of the IDE
06:16
@Shea It's not about whether you could. It's about whether you should.
And you shouldn't true to compare a boolean to a number.
Because the result is not obvious and not readable.
Like @copy says, let j = 1- i%2 or something like that is a much better choice.
@MadaraUchiha it's either var j = i%2 == 1 ? 0 : 1 or var j = !(i%2), and I prefer the later.
@Shea wat
However was willing to settle for var j = +(!(i%2)) in this case
What's wrong with let j = 1 - i%2?
Nothing at all, other than I just hadn't thought of it
Not really my usual style
06:20
So you'd rather convert to a boolean then convert to a number?
vOv
Well once it hits ++j, it's going to convert to a number anyways
The whole purpose was to avoid the ternary
@Shea It's not about the behavior. They're all the same behavior-wise
You basically want that someone else (which includes future you) from now WTFing when they read your code
Or at least, reduce the number of WTF/sec.
!!xkcd code quality
bah
!!xkcd wtf per second
var j = ~i & 1
Well, that's why I made such a big deal. There's no way I'd forget about that one, right? lol ;)
whatever -_-
!!> ~3 & 1
I like that
I mean do get me wrong, I'm open to learn a better way.
It's just that !(i%2) some how makes the most sense to me, and VS:Code slapped it down, even though it worked.
06:25
Guys I'm making an npm package. I don't want it to rely on babel as a dependency. Is anyone familiar with a workflow in which you develop a server app with a require-hook, but deploy it transpiled?
0
Q: Follow up - Creating Inheritance hierarchy using function constructor

overexchangeIn continuation with this question, Animal class has four fields: name sound owner favFood Cat derived class has one field mode Derived class Cat is created such that every instance of Cat inherits instance members of Animal. In addition, Cat adds a new i...

@MadaraUchiha you could compile on the pre-publish?
@phenomnomnominal Yeah, and what would I do about the require hook?
have two index.js
06:41
Different point of entry? ....
Hmm, yeah that would work
Thanks :)
9
Q: Print preview margin of print-hidden part in chrome new version

Sagar NaliyaparaI have shown some screenshots which shows problem... Problem: I'm trying to print this page with only table and as shown in image with open side pane i have put that side pane into print-hidden and it was working till the version of Google Chrome 46.0.2490.71 but after next update in @media pri...

if anyone can help
@MadaraUchiha
@SagarNaliyapara ?
I offer a 500 point bounty for every good canonical you post.
??
@MadaraUchiha
That's right
06:47
on the bases of what you provide bounty..??
@MadaraUchiha
@SagarNaliyapara Read the link in my profile for examples.
!!afk work
what about my above question
07:04
@MadaraUchiha
@SagarNaliyapara MadaraUchiha is afk: work
ok
@CapricaSix
crl
crl
07:57
@Shea just (i+1)%2
that's good, I like that. thanks
08:11
Which is the easiest way to change the position of an element inside the DOM? For example, you have a div with three elements, and you want to move the third in the second position and the second in the third position. I'm trying to modify the children property of the div, but I'm not sure if it's the cleanest way
@MadaraUchiha I don't understand what Node.appendChild() has to do with what I have to do
Sorry, wrong one
That's the one you want ^
o/
to everyone who celebrates it, a belated Merry Christmas
08:24
Pfff... Nobody comes to Miaou during holidays... It's dead... No one to play Tribo with :(
08:41
I'll need to give this Tribo a shot
@GNi33 I'm always available for a short game : dystroy.org/miaou/73
Guys, can anyone help understand why + operator in the [1] + [2] expression casts both operands to strings?
I'm at work right now, but I'll ping you when I got time for it :)
not sure if it answers your exact question, but this is a good read on the subject nontheless: 2ality.com/2012/01/object-plus-object.html
08:50
If I follow the steps I get If hint is "default", let hint be "number". which means that objects must be converted to a number
Oh I see, I was wrong
it's there
@GNi33 thanks
no problem :)
2ality is a great resource for all things JS
Yep, I'm following his RSS and have read both (?) his books
crl
crl
!!> "wow"[1]
@crl "o"
@crl "number"
crl
crl
!!> [['hel']+['lo']]+[[[['wo']+'r']+['l']]+['d']]
09:03
@crl "helloworld"
hello Caprica
!!give the horse a lick
@winner_joiner Mmmm! the horse tastes just like raisin
!!listcommands
@winner_joiner 3, 666, help, listen, eval, coffee, refresh, forget, info, listcommands, tell, afk, ban, unban, convert, define, doge, google, hang, imdb, jquery, learn, put..it..back...ლ(ಠ益ಠ)ლ, phucket, gtfo, moneycantbuylove, catmode, coffeetime, lifeban, stopmyself, instagram, kendallfrey, excited, manigga, meinneger, dgaf, infiniteriot, okay, feelsgoodman, fabulous, sausage, playerpimp, installjavascript, moarkittens, kendall, kfc, uwot, nsfw, facepalm, somekittens, erase, fry, dudeism
hahastillhere, onebox, morecoffee, steve, whoosh, burn, woosh, roomowner, phony, really, inur, coffeesc
crl
crl
!!Ï€
09:17
3.141592653589793238462643383279502884197169399375105820974944592307816406286208‌​998628034825342117067982148086513282306647093844609550582231725359408128481117450‌​284102701938521105559644622948954930381964428810975665933446128475648233786783165‌​271201909145648566923460348610454326648213393607260249141273724587006606315588174‌​881520920962829254091715364367892590360011330530548820466521384146951941511609433‌​057270365759591953092186117381932611793105118548074462379962749567351885752724891‌​227
Vienna?
09:40
1
Q: The sequence number for the field (ID) was not generating corerct using jquery clone

MahadevanCurrently working on jquery clone where when I click addmore button from the parent row the id was generating sequence order for the row but not for the inside fields example 1,2,3,4.. but when i did the inspect element for the fields which is there in the row id was not generating in the seque...

Any suggestion
pls
let us know what output you want exactly.
@PunitGajjar 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.
need help guys
0
Q: How to get value when I click move/remove on duallist button - JQUERY

Storm SpiritHow to get single value not all selected value on the duallistbox, this is what I've tried so far $(document).on("click", ".move", function(){ alert( $(".agentItems").val() ) }); $(document).on("click", ".remove", function(){ alert( $(".agentItems").val() ) }); but I want a single val...

crl
crl
09:55
!!define dualist
@crl My pocket dictionary just isn't good enough for you.
@crl [dualist](http://en.wiktionary.org/wiki?curid=1461243) Of or supporting dualism
She has a strictly dualist approach to morality.
crl
crl
spelling
really need help guys, how to get the value when I press button move
I've already put sample JSFIDDLE code
@StormSpirit The problem is your goal is really unclear. Especially as the answer doesn't seem to fulfill it
I really want it for my ajax/php insert to db
cause when I try alert( $(".agentItems").val() ) it display all value 1,3,2
I only want one moved item value so on php ajax it will be inserted
crl
crl
10:02
alert is for php beginners doing javascript
alert( $(".agentItems").text() )
try to move one jsfiddle.net/sdxaV/19
and I want only to alert 1
crl
crl
stap with alerts
I still don't get what you want really
jsfiddle.net/sdxaV/19
I want to alert on what you haved moved... example, move Three, tree then you will get value 2,3,4 instead 3. the flow is okay all I want is to alert what Is moved
can you test it here guys? jsfiddle.net/sdxaV/19
crl
crl
10:06
use confirm rather than alert, or prompt </sarcasm>
@crl no, it's just my testing, I will remove it if I get the value... sorry about that
do you understand my question guys?
sorry for my bad english
10:22
this is ungodly quick & dirty, but I think you can get the idea here
check the console
(hit F12 to get the console)
@GNi33 wow awesome
@GNi33 you're the best man... thanks so much,
want to mark you answer done. answer here stackoverflow.com/questions/34490741/…
no problem, I didn't check the plugin you're using though. There's probably a better way to do it
@GNi33 what do you mean?
what I'm doing now is storing the data and running a diff after changing the data
sure, it works, but it's not really a clean way of doing this
10:26
as long it works, it's done hahah
I don't know the internals of the plugin you're using there, so I'm not sure what happens here, but I think there should be a better way of doing this
the plugin probably offers a direct way to read the selected item
I'm too busy to look into it now though, you should probably read up on it a little
@StormSpirit that's sadly how programming works too many times I suppose :/
@GNi33 have an error, don't know where to fix it
jsfiddle.net/sdxaV/22 when there is empty, it shows null
sorry, not too good on javascript
10:49
and now explain me, what I did and why it fixed it
because that hasn't got that much to do with JS than general programming
crl
crl
11:07
my code is full of side-effects
s/effect/boob
@GNi33 ahh... if it's empty it will become empty array
if ($(".agentItems").val()) is empty, it will become empty array
I mean on result
@GNi33 one more problem is when you click remove on the last one value, it will error
crl
crl
I fucking found another Chromium bug, a real one, one minute
@GNi33 fixed it, I'm adding this `a1 = a1 || [];
a2 = a2 || [];` instead of `var result = $(".agentItems").val() || [];`
11:22
!!kumar
@pootis the most handsome boy in this universe
@StormSpirit yep, looks good
crl
crl
chrome--;
12:08
any handlebars GURU here???
@DavidPankov 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.
How can i loop in handlebars throught different value names?
yep
have a look at the .registerHelper - method
yes, but i cant find the right solution..can you check this ..stackoverflow.com/questions/34492980/…
each is a simple pre-built helper here
Handlebars.registerHelper('each', function(context, options) {
  var ret = "";

  for(var i=0, j=context.length; i<j; i++) {
    ret = ret + options.fn(context[i]);
  }

  return ret;
});
this is what it does. you'll just need to register your own helper just like that and you can loop through your properties in there
then you can use it just like #each
12:22
wow pretty good looking ..am gona try it..thanx in advance...i trought its something more complex :D
nah, it's pretty straight forward
13:07
@Mosho Jenny says you can't solve the Chrome mobile bug.
@Mosho I think you can, which one of us is right?
what chrome mobile bug?
oh man, I can't wait for my Pi to arrive
L.P
L.P
hello
@L.P 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.
L.P
L.P
need help with a script
anyone around?
crl
crl
3 mins ago, by Caprica Six
@L.P 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.
13:22
3 messages moved to Trash can
13:41
so Thunderbird decided to download all of my emails... I wasn't aware.
crl
crl
u no context?
old picture
@rlemon just out of curiosity: why would you use thunderbird?
@rlemon even more fun if it deletes the mail on the server
crl
crl
13:44
pop
which has been the default setting in some mail client I used years ago. that was the last time I used a desktop client for mails
@GNi33 Just don't use shitty clients..
I don't think gmail would even allow that though
just use mutt. tis great and does all the things
Just don't use desktop clients at all, why would I
13:45
preference
there's nothing even coming close to inbox/gmail, no need for a shitty application
but yeah, preference
I need to write a sublime plugin to read/send emails
then I'll be set
last update, february 2014... meh
only sends
> Using this package, you put your email-account credentials into sublime-text configuration.
nothx
13:49
yeah, my brain went out of order for a sec there
but I guess it's something one could build up on
@Zirak lol shut up
@rlemon did I miss the airing of grievances?!
Pragmatically reading new mails from Gmail is pretty easy thanks to mail.google.com/mail/feed/atom
crl
crl
wow @cinnamon in html room is really antipathetic/grumpy, shitty, and is a owner..
@SterlingArcher how was christmas? did you get turtle-necks? five in a dark black and five in a slightly darker black??
@crl really?
13:52
@crl lol
crl
crl
(just my opinion, but she keeps criticizing everything I say/do)
@rlemon nah, got "dumped" by Red and got a concussion. Other than that it was nice
Concussion was from wednesday when I sneezed under my desk and hit my head really hard
2
sounds like fun :/
@SterlingArcher hahaha, oh god
Red thing sucks.. but the concussion story is fucking Gold!
glad you're okay
Things still don't taste right but I think it's almost gone
!!afk scrummmm
aww dude
you're working?
Babel is cool but it comes with performances hits. I made a function 15 times faster by replacing for...of on array by simple for loops

« first day (1899 days earlier)      last day (3272 days later) »