These are chat archives for FreeCodeCamp/HelpJavaScript

27th
Aug 2018
Greg Duncan
@GregatGit
Aug 27 2018 00:01
@Pagnito shouldn't reduce be used just to give you a final number rather than to push objects to seperate object
Pagnito
@Pagnito
Aug 27 2018 01:10
@GregatGit reduce is also used to flatten arrays an apperently this
This is code from deck gl team
Tiago Correia
@tiagocorreiaalmeida
Aug 27 2018 08:18
good morning
wrong chat but, does anyone knows a website with psd websites template files you can download for free?
Stephen James
@sjames1958gm
Aug 27 2018 08:42
@Pagnito looks like each taxi entry generates two points entries so map is probably going to work
Jefferson
@jeffersonnnn
Aug 27 2018 10:39
@tiagocorreiaalmeida I don't know if sketchappresources.com submits in psd but they are an amazing resource for free wireframes and templates. Even better when paired with Zeplin.
hi guys, I have a question. Does anyone know a helper functions or something quick and dirty for splitting an *empty array into bits? I am trying to implement multiple stacks on one array
Javier Pons
@JavierPons
Aug 27 2018 11:49
anyone can help with js?
Tom
@moT01
Aug 27 2018 12:55
@JavierPons whats the problem?
Jason Luboff
@JLuboff
Aug 27 2018 15:08
Morning :wave:
Christopher McCormack
@cmccormack
Aug 27 2018 15:11
Morning :wave:
Jason Luboff
@JLuboff
Aug 27 2018 15:14
How was the weekend?
Tom
@moT01
Aug 27 2018 15:19
:balloon:
Christopher McCormack
@cmccormack
Aug 27 2018 15:20
Long, was voluntold to sit on a call Friday night at 23:00 to run some validation tests after a big change, ended up on the call until 05:30
rest was good though
how was yours?
@moT01 hi
Tom
@moT01
Aug 27 2018 15:21
hi
Jason Luboff
@JLuboff
Aug 27 2018 15:21
@cmccormack Damn... thats a long night hah
What up tom
Tom
@moT01
Aug 27 2018 15:22
made a light bright
Christopher McCormack
@cmccormack
Aug 27 2018 15:23
@moT01 fun, I like that you can click for a new color and drag
don't like your favicon though
Jason Luboff
@JLuboff
Aug 27 2018 15:24
Neat
Tom
@moT01
Aug 27 2018 15:24
whats my favicon
Christopher McCormack
@cmccormack
Aug 27 2018 15:24
null
Tom
@moT01
Aug 27 2018 15:25
yea, thats not a good one
Christopher McCormack
@cmccormack
Aug 27 2018 15:25
haha
maybe use a circular gif that cycles through your colors!
Tom
@moT01
Aug 27 2018 15:26
i should have made it "null"
Christopher McCormack
@cmccormack
Aug 27 2018 15:26
draw null in paint so it doesn't look like an error
Tom
@moT01
Aug 27 2018 15:26
yea, there's a lot that could be added to make it better - but I dont really feel like it
i was thinking about adding a save to local storage feature
Christopher McCormack
@cmccormack
Aug 27 2018 15:27
just a few lines of code
if you're storing the array with the color that is
Tom
@moT01
Aug 27 2018 15:28
im not
but that could be added pretty quick, too
Christopher McCormack
@cmccormack
Aug 27 2018 15:32
4player pong?
Tom
@moT01
Aug 27 2018 15:33
ooh - not a bad idea
could at least make it 2 player
instead of just vs computer
Christopher McCormack
@cmccormack
Aug 27 2018 15:33
yeah use wasd and ijkl maybe? or numpad
Tom
@moT01
Aug 27 2018 15:34
i was thinking online
with sockets
so we could play each other
Christopher McCormack
@cmccormack
Aug 27 2018 15:34
should be fun
Tom
@moT01
Aug 27 2018 15:35
could be some timing issues
Christopher McCormack
@cmccormack
Aug 27 2018 15:36
gotta tweak that netcode
Tom
@moT01
Aug 27 2018 15:36
i was wondering what you said about having problems passing some of the d3 tests
didnt you say something about that
Christopher McCormack
@cmccormack
Aug 27 2018 15:36
yeah
main problem I see is positioning the axis with transform and then trying to position items with x y
Tom
@moT01
Aug 27 2018 15:37
oh that's right
Christopher McCormack
@cmccormack
Aug 27 2018 15:37
if you do that then the ticks won't match up with the item coords
I think the tests are using the x y attributes not actual position
Tom
@moT01
Aug 27 2018 15:38
i did my treemap
couldnt get one of the tests to pass unless my svg was a specific size
Christopher McCormack
@cmccormack
Aug 27 2018 15:40
I think I had that problem too, something to do with the size with outlines or whatever
Jason Luboff
@JLuboff
Aug 27 2018 15:40
Yes, yes, I agree
test 6 - only passes when its 960x600
whatever
Christopher McCormack
@cmccormack
Aug 27 2018 15:41
heh
I noticed the example treemap has a few errors in it
the text overlaps other boxes
@JLuboff you have nothing but time now right? Do your data viz!
Tom
@moT01
Aug 27 2018 15:42
yea, mine gets cut off a little
i could make the text smaller, but its already kinda small
Jason Luboff
@JLuboff
Aug 27 2018 15:43
@cmccormack Hah...I wish.
Christopher McCormack
@cmccormack
Aug 27 2018 15:43
@moT01 I think you text is fine, that's what hover text is for
Tom
@moT01
Aug 27 2018 15:45
@cmccormack your fcc repo is real nice and organized
i looked at your treemap for some hints
Christopher McCormack
@cmccormack
Aug 27 2018 15:45
@moT01 thanks! some projects I had to make outside fcc but tried to keep everything else in there
I didn't like the treemap very much because it looks hard to make responsive
Tom
@moT01
Aug 27 2018 15:46
yea, I wish I did mine like that
Christopher McCormack
@cmccormack
Aug 27 2018 15:46
still can right?
Tom
@moT01
Aug 27 2018 15:46
well, I could
Christopher McCormack
@cmccormack
Aug 27 2018 15:46
hah
Jason Luboff
@JLuboff
Aug 27 2018 15:47
You sound like me
Tom
@moT01
Aug 27 2018 15:47
a lot of the pages would need to be relinked
like I have links to a live demo using github pages or other ways
and the url I turned into fcc is some of those - which would also need to be changed
so basically im lazy
Christopher McCormack
@cmccormack
Aug 27 2018 15:48
I hear you
that's why I haven't updated my personal portfolio much since I first created it haha. Keep intending to but no real rush so I keep quitting
@JLuboff what's your next sysadmin test?
Jason Luboff
@JLuboff
Aug 27 2018 15:54
@cmccormack You refering to my next Microsoft exam?
Christopher McCormack
@cmccormack
Aug 27 2018 15:54
yeah
Jason Luboff
@JLuboff
Aug 27 2018 15:55
Next one is 70-762, Developing SQL Databases
Trying to aim to get it done by end of the year..if not sooner
Christopher McCormack
@cmccormack
Aug 27 2018 15:56
More sql, fun
how many more after this one?
Jason Luboff
@JLuboff
Aug 27 2018 15:58
That'll be the last one for a while
Once I pass that, I'll get my MCSA
Could go for an MCSE (one additional test) but... meh.. unless the incentive is good
Christopher McCormack
@cmccormack
Aug 27 2018 16:00
Yeah especially if you want to get more into development
Jason Luboff
@JLuboff
Aug 27 2018 16:00
Most of the tests to get the MCSE really don't apply to anything I'd be doing so doesn't make a ton of sense
Christopher McCormack
@cmccormack
Aug 27 2018 16:02
yeah unless your work is providing some kind of bonus for it
Jason Luboff
@JLuboff
Aug 27 2018 16:05
Ya, the incentive for passing this next test is a juicy one
Christopher McCormack
@cmccormack
Aug 27 2018 16:06
but nada for mcse?
Jason Luboff
@JLuboff
Aug 27 2018 16:09
Oh, no I'm sure there would be we just haven't discussed it
Christopher McCormack
@cmccormack
Aug 27 2018 16:09
You should ask them for a Pluralsight subscription if you don't have one
tell them it will help with the studies
Jason Luboff
@JLuboff
Aug 27 2018 16:10
How much is it per year?
Christopher McCormack
@cmccormack
Aug 27 2018 16:11
$300 a year per user
which isn't bad at all
my company has a license for all users in Technology
Jason Luboff
@JLuboff
Aug 27 2018 16:13
Ya thats not bad at all
They send individuals to out of state training which cost thousands..
Christopher McCormack
@cmccormack
Aug 27 2018 16:14
Out of state? that's crazy
unless it's some niche training
Jason Luboff
@JLuboff
Aug 27 2018 16:14
Eh... I'm sure they could find something more local
Christopher McCormack
@cmccormack
Aug 27 2018 16:16
heh
I have to run for a few someone is flooding my backyard
Jason Luboff
@JLuboff
Aug 27 2018 16:16
Flooding it? uh oh
Christopher McCormack
@cmccormack
Aug 27 2018 16:32
Oh man went over to the house and nobody lives there creepy
Jason Luboff
@JLuboff
Aug 27 2018 16:34
Someone left the water on?
Christopher McCormack
@cmccormack
Aug 27 2018 16:41
No idea
Jason Luboff
@JLuboff
Aug 27 2018 16:41
I hate when a mongo query works in the CLI but not in app
Christopher McCormack
@cmccormack
Aug 27 2018 16:41
couldn't get in the house
called the realtor though
Jason Luboff
@JLuboff
Aug 27 2018 16:41
Good idea
Christopher McCormack
@cmccormack
Aug 27 2018 16:42
@JLuboff why would it work in the cli but not the driver? different commands?
Jason Luboff
@JLuboff
Aug 27 2018 16:42
Ugh.. think I see why
Christopher McCormack
@cmccormack
Aug 27 2018 16:43
PEBCAK?
Jason Luboff
@JLuboff
Aug 27 2018 16:44
Pretty much
Jason Luboff
@JLuboff
Aug 27 2018 20:20
Working with times in queries can be a real pain in the ass
Christopher McCormack
@cmccormack
Aug 27 2018 20:35
Can you just convert everything to a single time and back again as needed?
Jason Luboff
@JLuboff
Aug 27 2018 20:35
I figured it out. I'm basically checking if the start and/or end time fall between existing times
find({
          Date: meetingDate,
          $or: [
            { SortField: { $gte: SortField, $lt: SortEndTime } },
            { SortEndTime: { $lte: SortEndTime, $gt: SortField } }]
        })
Basically had to combine two queries into one using OR operator
OR operator works a little different in mongodb than say JS or SQL. It will return results from both, not just the first that is true
Aditya
@ezioda004
Aug 27 2018 20:38
Yeah, like intersection
Jason Luboff
@JLuboff
Aug 27 2018 20:39
Yup