These are chat archives for FreeCodeCamp/HelpJavaScript

20th
Dec 2018
Brad
@bradtaniguchi
Dec 20 2018 00:32
@JLuboff Haha yea, oh yea before I forget, look at your window at 5:40pm, ULA is launching their big delta 4 rocket from vandenburg
Jason Luboff
@JLuboff
Dec 20 2018 00:33
I'll try to remember, thats dinner time!
Brad
@bradtaniguchi
Dec 20 2018 00:39
haha just drop the fork for 5 mins, they have scrubbed the launch 3 times, can't do it a fourth time :P
Jason Luboff
@JLuboff
Dec 20 2018 00:44
I'll see if I see anything.. might be able to since it'll be dark by then
Brad
@bradtaniguchi
Dec 20 2018 00:45
Yea you should be able to see it well this time, the entire west coast should be able to see it too
idk if it will be as nice as the spacex launch tho, but should at least be able to see it haha
Jason Luboff
@JLuboff
Dec 20 2018 00:46
Ya true
This data entry is gruelling..
Brad
@bradtaniguchi
Dec 20 2018 01:47
Freaken thing got scrubbed AGAIN
Pagnito
@Pagnito
Dec 20 2018 03:21
can i set cache for private must-revalidate?
or public or w/e basically still have it, but with revalidate
nvm found it
Brad
@bradtaniguchi
Dec 20 2018 04:15
oh dang, found out FCC forums has a dark theme. My life has changed
meixi
@maoxiaominice
Dec 20 2018 08:03
Gealous about you guys who can insist on learning coding ...
Aditya
@ezioda004
Dec 20 2018 08:35
@maoxiaominice I think its about finding the passion, I didnt like coding in school and in college, didnt interest me at all but now its all I think about.
Victor Popescu
@VicPopescu
Dec 20 2018 08:58
@maoxiaominice common, learning to code can be a lot easier then learning anything else on this scale. My girlfriend is an architect, she has to search books and books for a small piece of information. And other architects don't want to share anything, they are afraid you steal their clients. But here, you have everything at the speed of electricity, tons of information, hundreds of people ready to help you. So what's your excuse?
Nobody said "I waited to be a programmer", we are not like cheese or wine, getting better waiting to happen. You have to do it from 0 to where you want to be.
Ahmad Abdolsaheb
@ahmadabdolsaheb
Dec 20 2018 11:23
Does anyone know where to find the time and space complexity of javascript built-in functions?
Aditya
@ezioda004
Dec 20 2018 13:26
@ahmadabdolsaheb Which one? You can make an educated guess
Ahmad Abdolsaheb
@ahmadabdolsaheb
Dec 20 2018 13:35
@ezioda004 sort() for example, I am guessing nlogn for time, but not sure for time space because it totally depends on the algorithm/algorithms they are using under the hood.
Aditya
@ezioda004
Dec 20 2018 13:57
@ahmadabdolsaheb Chrome uses Tim sort IIRC, but you can expect the browsers will be using the efficient algorithms and since sorts upper bound is nlogn, it's reasonable to guess all browsers use a variation with that complexity.
Nate Mallison
@NJM8
Dec 20 2018 14:48
When inspecting one's webpack config, how can I tell if the input and out files location for the html file are the same?
Pagnito
@Pagnito
Dec 20 2018 15:33
hey anyone familiar with working with firebase database?
Jason Luboff
@JLuboff
Dec 20 2018 16:08
morning :wave:
Jason Luboff
@JLuboff
Dec 20 2018 17:11
For anyone who maybe around (no one? :joy: ) question.. I'm using a datalist input field which contains about a dozen different values. I want to validate that value before continuing to the next workflow step. Meaning, if the user inputs Potat but the actual value should be Potato (and would be in that list), whats the best way to detect that? Should I have an array of potential incorrect values? That seems kind of messy..
Chris
@crokita
Dec 20 2018 17:24
So you have a list of valid inputs and you want to check a value against that list? And additionally, inform the user if their input is close to one in the valid inputs?
Jason Luboff
@JLuboff
Dec 20 2018 17:25
@crokita Exactly. It'd be great if I could just use a dropdown list... but there is potential for a value that is not present. Which makes me think...maybe I should just have an Other option which than provides an input field...
Chris
@crokita
Dec 20 2018 17:28
Maybe, yeah. I'm not sure what to suggest in this case.
Jason Luboff
@JLuboff
Dec 20 2018 17:29
Ya.. i know haha. I think I would need to have a list to check against which as I said could get messy fast (and be long..)
Lets see what @ezioda004 thinks :point_up: December 20, 2018 9:11 AM
Chris
@crokita
Dec 20 2018 17:33
I have a really dumb idea. Have a difference checker between your input and all the possible valid values. Do some character counting and if the difference is small enough then consider that as a typo. Use hashes to keep track of character counts. Example: Potato has 1 P, 2 O's, 2 T's, 1 A. Potat has only a difference of 1 O. Inform if differences are less than.... 3? lol
Jason Luboff
@JLuboff
Dec 20 2018 17:33
Sounds complicated. Haha
Aditya
@ezioda004
Dec 20 2018 17:34
@JLuboff Is it a bad sign I have not heard of datalist element before? lol
Chris
@crokita
Dec 20 2018 17:34
this sounds like a problem someone would get in an interview or something
Jason Luboff
@JLuboff
Dec 20 2018 17:34
No...its not a common input type
Its basically a mix between a dropdown and a regular text input
@crokita Well...you're always up for interview prep, aren't you? :P
Chris
@crokita
Dec 20 2018 17:35
I'll be ready for it now lol
Jason Luboff
@JLuboff
Dec 20 2018 17:35
I guess realistically this can be looked at as if it was a normal text input for validating
Aditya
@ezioda004
Dec 20 2018 17:37
@JLuboff Cant you simply check the entered value against the correct value array/list?
Like .includes()
Or maybe I understood the question wrong
Jason Luboff
@JLuboff
Dec 20 2018 17:38
@ezioda004 But what if I have something like.. Onoin when it should be Onion?
Aditya
@ezioda004
Dec 20 2018 17:40
I'd probably check starting from the first character, like O then On and so on, until theres only 1 match
Jason Luboff
@JLuboff
Dec 20 2018 17:40
Ya.. I guess I could write an algo for that hehe
But..maybe I'll go with the dropdown idea... I'll have to check with the requestor
Aditya
@ezioda004
Dec 20 2018 17:42
Writing algo is much better, I had to do all the CSS stuff today - I started question my life choices :joy:
Jason Luboff
@JLuboff
Dec 20 2018 17:42
You think writing algo is better than the dropdown idea or better than CSS?
Aditya
@ezioda004
Dec 20 2018 17:44
Lol CSS, for your case I think dropdown is better
Jason Luboff
@JLuboff
Dec 20 2018 17:45
Haha ya...no thank you on the CSS :) But ya...thats what I'm, thinking
Pagnito
@Pagnito
Dec 20 2018 19:38
Screen Shot 2018-12-18 at 12.12.43 PM.png
oof wrong one
Screen Shot 2018-12-20 at 2.37.55 PM.png
how is this happening
oh wait
lemme check something first
ah ya its on top of it, i thought it was jus the border
but ya z-index doesnt seem to fix it
figured it out
position relative was on the bordered div
Brad
@bradtaniguchi
Dec 20 2018 19:52
Damn just spent like this whole morning dealing with an issue that just straight up wasn't documented anywhere :?
Jason Luboff
@JLuboff
Dec 20 2018 21:06
@bradtaniguchi Good thing you know how to document!
Kelechi Chinaka
@ke1echi
Dec 20 2018 21:57
https://codepen.io/kelechichinaka/full/rojRbO
pls checkout my portfolio page
feedback needed
Jason Luboff
@JLuboff
Dec 20 2018 22:49
Anyobdy off hand know where the babel config file is located when using CRA?
Christopher McCormack
@cmccormack
Dec 20 2018 23:04
@JLuboff I think it's in something like react-scripts maybe, in node_modules?
Pagnito
@Pagnito
Dec 20 2018 23:07
oooh u gotta be shitting me, google is shutting down their google+ apis
do they want ppl their firebase auth service instead?
Christopher McCormack
@cmccormack
Dec 20 2018 23:08
they are shutting down google plus
Pagnito
@Pagnito
Dec 20 2018 23:09
it says that their google plus sign in is gonna be deprecated
Jason Luboff
@JLuboff
Dec 20 2018 23:09
@cmccormack Shouldn't you be like...celebrating your anniversary or something?
Pagnito
@Pagnito
Dec 20 2018 23:09
does that mean the passport google stratey will die basically?
Christopher McCormack
@cmccormack
Dec 20 2018 23:09
yup just have an hour of downtime, popped open my laptop and saw your question :)
@Pagnito probably not
Jason Luboff
@JLuboff
Dec 20 2018 23:10
google OAuth2 is independent of google+ I would think
@cmccormack Fair enough :)
Pagnito
@Pagnito
Dec 20 2018 23:10
but to use it, u need to activate google plus apis on a project and get credentials
Jason Luboff
@JLuboff
Dec 20 2018 23:11
They wouldn't kill their OAuth2. Too many apps use it
it says here devs should move to their auth service
Jason Luboff
@JLuboff
Dec 20 2018 23:13
image.png
@cmccormack Didn't find the babel config, oh well. Was going to try and add Elvis operator but no big deal
Pagnito
@Pagnito
Dec 20 2018 23:13
yea but that was there before
it told me to update my projects that use that that auth
Christopher McCormack
@cmccormack
Dec 20 2018 23:15
@JLuboff looks like it's in the webpack loader config
@JLuboff if you want to edit that you should eject
Jason Luboff
@JLuboff
Dec 20 2018 23:16
npm eject?
Christopher McCormack
@cmccormack
Dec 20 2018 23:18
npm run eject?
from your root
should move your webpack stuff to your source or root I think
Jason Luboff
@JLuboff
Dec 20 2018 23:19
Well my scripts are start build test and eject normally I just use npm start
Thats why I'm assuming its npm eject
Christopher McCormack
@cmccormack
Dec 20 2018 23:20
npm start is special
Pagnito
@Pagnito
Dec 20 2018 23:20
@JLuboff oh, ok i see, i read that wrong
Jason Luboff
@JLuboff
Dec 20 2018 23:20
Is that the nice way to say its... challenged..? @cmccormack
Pagnito
@Pagnito
Dec 20 2018 23:20
i wonder why its tellin me to change tho
Jason Luboff
@JLuboff
Dec 20 2018 23:21
Does your project use it within its scope?
Pagnito
@Pagnito
Dec 20 2018 23:23
i dunno, i use passport js
Christopher McCormack
@cmccormack
Dec 20 2018 23:24
@JLuboff yes, yes it is :)
Pagnito
@Pagnito
Dec 20 2018 23:24
oh u know what, i think its talkin about the in button i tried to use in the beginning of the project
i guess its on the record as 'recent'
Christopher McCormack
@cmccormack
Dec 20 2018 23:25
@JLuboff adios
Jason Luboff
@JLuboff
Dec 20 2018 23:25
See ya