These are chat archives for FreeCodeCamp/Help

27th
Nov 2018
Zaza
@ForkInSpace
Nov 27 2018 00:00
it passes one of the tests but not both :/
kinopotato
@kinopotato
Nov 27 2018 00:01
I was thinking of putting a variable as a regex /variable here/ then using a loop to test each number, though I guess if it's a loop then better to use .test instead and push/concat/etc the matches to another array then using array.length
Jason Luboff
@JLuboff
Nov 27 2018 00:03
@ForkInSpace Keep in mind.. the second splice.. the array length has changed at that point..so we would want j -1 I'm pretty sure although thats still returning 3
Zaza
@ForkInSpace
Nov 27 2018 00:04
I totally missed that... thx
Jason Luboff
@JLuboff
Nov 27 2018 00:05
Ah..
I know the second issue
You can't have the element match at the same index ;)
...
if (array[i] == array[j] && j !== i) {
...
Zaza
@ForkInSpace
Nov 27 2018 00:07
thx m8
I literally spent 2 hours on that
Jason Luboff
@JLuboff
Nov 27 2018 00:07
I've spent days on algo's :smile:
Zaza
@ForkInSpace
Nov 27 2018 00:08
I just started last week
did bunch of time and space complexity tasks on interviewbit
grasped the basics but still oblivious about some of the concepts ( math ain't my cup of tea)
but definitely wanna improve in algos
Jason Luboff
@JLuboff
Nov 27 2018 00:09
Algo's are definitely not my strong point but... I get through it lol
Zaza
@ForkInSpace
Nov 27 2018 00:10
haha gotcha, like if I had to rewrite this and make it more efficient like o(n) I'd just walk out of the interview
:D
Jason Luboff
@JLuboff
Nov 27 2018 00:11
Don't worry, so would I
Actually..I wouldn't walk out
Just becuase you can't answer one question doesn't mean they wont consider you
Zaza
@ForkInSpace
Nov 27 2018 00:12
That's a good point
Jason Luboff
@JLuboff
Nov 27 2018 00:15
Personality can overcome knowledge ;) In fact... when I interviewed for my current job (pre-promotion) I wasn't the most knowledgable candidate (based on a set of questions my now coworkers came up with) but they felt that I would meld (is that a word?) with the team better than the other candidate who did a bit better on the questions
Zaza
@ForkInSpace
Nov 27 2018 00:16
personality and cultural fit does come thru no doubt
small startup/team ?
@JLuboff
Jason Luboff
@JLuboff
Nov 27 2018 00:19
No, I work for a medium size company. Started out as Help Desk/Network Tech. Worked my way into my now Systems Developer position (i.e I'm the DBA and Programmer)
Zaza
@ForkInSpace
Nov 27 2018 00:19
impressive
Jason Luboff
@JLuboff
Nov 27 2018 00:20
It was a lot of work.. lol
But totally worth it and I love what I'm doing now
Zaza
@ForkInSpace
Nov 27 2018 00:20
I don't doubt it ;)
had a career change the past January
went from sales dev & marketing to building websites and trying to learn every day
no regrets :D
Jason Luboff
@JLuboff
Nov 27 2018 00:23
Have you been enjoying it more?
Zaza
@ForkInSpace
Nov 27 2018 00:24
Absolutely, I love what I do and would do it for free
Jason Luboff
@JLuboff
Nov 27 2018 00:24
Awesome
kinopotato
@kinopotato
Nov 27 2018 01:36
anyone got experience using front end tools with microsoft access?
Philip Durbin
@pdurbin
Nov 27 2018 02:57
@fullstackinprogress_gitlab looks like you're getting help at https://gitter.im/gitterHQ/developers?at=5bfc9d24baf43f2b9b7c8cb2
dyon gerwen
@fullstackinprogress_gitlab
Nov 27 2018 02:58
@pdurbin thanks
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Nov 27 2018 05:34
why fcc looks like not active as before?
Sumeet Chavan
@Sumeet2796_twitter
Nov 27 2018 05:59
@Sumeet2796_twitter
how to maintain persistent express-session in node js when access from another controller..
i am stuck from 24 hrs... i get session undefined...Automatically flush
Aditya
@ezioda004
Nov 27 2018 06:17
@isemaj_gitlab FCC is doing better than ever but chat has been deprecated in favor for fcc forums.
kinopotato
@kinopotato
Nov 27 2018 06:28
Hello, can someone help me how to approach this mini project of mine?
https://codepen.io/kinopotato/pen/WYKJOj?editors=0010
I want to make a page where the user clicks on stuff (but there are presets) and inputs a number (a length in meters) then they will get a number (a price estimate based on what things are clicked)
So I need to get the value of only the things that are checked, I'm thinking of making a function that checks each input element if it is checked or selected, but that seems inefficient so I'm assuming there's a better way? Any tips?
Aditya
@ezioda004
Nov 27 2018 06:30
@kinopotato You can reuse functions in event listeners.
kinopotato
@kinopotato
Nov 27 2018 06:30
can you please write a pseudo code so I can understand?
Sumeet Chavan
@Sumeet2796_twitter
Nov 27 2018 06:31
@ezioda004 help me also
kinopotato
@kinopotato
Nov 27 2018 06:31
or do you mean I will write an event listener for every radio button?
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Nov 27 2018 06:31
@ezioda004 but discussions about backend topics such mongoose and mongodb in the forum seems is not active. What could be the reason?
kinopotato
@kinopotato
Nov 27 2018 06:32
probably because students don't get that far?
or not many have
compared to those who are at frontend and js (I think)
Aditya
@ezioda004
Nov 27 2018 06:32
@kinopotato No you can have an event listener on the parent element and let that function "overload" according to the event.target, look up "event delegation".
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Nov 27 2018 06:33
ok, I wish we will have more students to continue till the backend topics
Aditya
@ezioda004
Nov 27 2018 06:33
@Sumeet2796_twitter Sorry, I havent used express-session package.
kinopotato
@kinopotato
Nov 27 2018 06:33
@ezioda004 looks interesting. will read up asap :D
Aditya
@ezioda004
Nov 27 2018 06:33
@isemaj_gitlab You've posted your query on the forums?
Sumeet Chavan
@Sumeet2796_twitter
Nov 27 2018 06:33
Anyone use express-session package ../??
kinopotato
@kinopotato
Nov 27 2018 06:34
@isemaj_gitlab I'll be skipping 2 front end stuff in FCC and head to backend 8D I need some basic backend stuff anyway
Aditya
@ezioda004
Nov 27 2018 06:34
Data viz can be skipped, shouldnt skip frontend library tho.
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Nov 27 2018 06:35
@ezioda004 I will post later. @kinopotato ok
kinopotato
@kinopotato
Nov 27 2018 06:35
right now I just really need to finish something. haha, vanilla js seems to be enough
I mean, I'm probably not gonna be working for fb or something anyway so I just need to be able to make webpages do shit
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Nov 27 2018 06:36
on what part you are right now?
kinopotato
@kinopotato
Nov 27 2018 06:36
me on back end?
Aditya
@ezioda004
Nov 27 2018 06:36
@kinopotato I understand but since I've used so much React-Redux, making anything without those feels like a chore.
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Nov 27 2018 06:36
on the front end
btw is there any chance the fcc will support issuehunt?
Aditya
@ezioda004
Nov 27 2018 06:37
Whats issuehunt?
kinopotato
@kinopotato
Nov 27 2018 06:38
@ezioda004 even on small scale websites? Tbh, I think it is more important for me to learn node.js and mySQL for basic backend.
@isemaj_gitlab I just finished JS. I should probably learn react now though
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Nov 27 2018 06:39
issue-based bounty platform. Like there's a reward for any solved issue
Aditya
@ezioda004
Nov 27 2018 06:39
@kinopotato I guess you'd still be fine with vanilla JS but for long term maintainability of the projects, using something like an MVC framework is pretty good.
@isemaj_gitlab I dont think so, fcc is a non profit open source organization with only 5 core members.
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Nov 27 2018 06:41
who are those 5 core members?
Vijay Singh Khatri
@vijaykhatri96_twitter
Nov 27 2018 06:42
Hi Team, You can add hackr tutorials list into your post as well: https://hackr.io/tutorials/learn-angular
kinopotato
@kinopotato
Nov 27 2018 06:42
@ezioda004 I agree with you completely. Yeah, this is just short term. I don't want to be stuck in tutorial purgatory and I wanna help out with the family business. Once I complete at least one "proper" website with a good display of html/css/js then I can learn other shit again without feeling like I'm learning nothing
Aditya
@ezioda004
Nov 27 2018 06:43
@isemaj_gitlab Quincy, Murgesh, Stuart and forgot about the other 2. Besides, fccs github is very active, people are self initiative and solve issues with no incentive.
@kinopotato Sounds like a plan, I'd say you learn the most when you're working on a project!
kinopotato
@kinopotato
Nov 27 2018 06:45
someone told me to use localStorage instead of a database, any tips on that?
he made it sound like it's easier (and to me as well, since I'm imagining chrome using a text file which seems simple)
Aditya
@ezioda004
Nov 27 2018 06:48
Its definitely easier but you cant compare localstorage with DB
localStroage is still visible by client and you cant store sensitive info there
kinopotato
@kinopotato
Nov 27 2018 06:49
what are your thoughts on the migration process from localStorage to db in the future?
it's going to be a payroll system for less than 100 people (at most, regularly it's just going to be for around 20)
Aditya
@ezioda004
Nov 27 2018 06:50
I dont think setting up DB is hard, I can vouch for mongoDB, its pretty easy. You can learn that in couple of hours and just use that from the beginning
kinopotato
@kinopotato
Nov 27 2018 06:51
I need to learn node tho
Aditya
@ezioda004
Nov 27 2018 06:51
Migration seems like an unnecessary issue
Node is very easy, syntax shouldnt be a problem since you know JS
You'll just need to learn express which is beginner friendly
kinopotato
@kinopotato
Nov 27 2018 06:52
hmm, I should finish this mini project then so I can move to the payroll system. What is express?
express js or something? so I can google
Aditya
@ezioda004
Nov 27 2018 06:52
Express.js, its a backend framework used with Node.js
kinopotato
@kinopotato
Nov 27 2018 06:52
so express, node then mongo
here in the Philippines, mongo is a type of bean
Aditya
@ezioda004
Nov 27 2018 06:53
More like node > express > mongo > mongoose
kinopotato
@kinopotato
Nov 27 2018 06:53
just putting it out there
Aditya
@ezioda004
Nov 27 2018 06:53
Lol
Just try the backend section of fcc and you'll see its pretty easy
kinopotato
@kinopotato
Nov 27 2018 06:53
hmm, if I use all december to learn that then I can probably make something
Aditya
@ezioda004
Nov 27 2018 06:54
You've never used SQL before?
kinopotato
@kinopotato
Nov 27 2018 06:54
nope, I started fcc html
that's the breadth of my coding experience
Aditya
@ezioda004
Nov 27 2018 06:54
Oh, then DB will take a bit time to digest but its not that hard
kinopotato
@kinopotato
Nov 27 2018 06:55
learning to learn is a big part of FCC anyway, I still get stuck but I get stuck for shorter times
"Once these languages are live, about 80% of people on earth will be able to learn to code in their native language, for free." from the quincy update
I need to step up my game. competition with 80% of the population doesn't sound fun when you're on the bottom 10% xD
Aditya
@ezioda004
Nov 27 2018 06:58
Lmao, on the brighter side, you've got head start!
kinopotato
@kinopotato
Nov 27 2018 06:58
heading to bottom 20% then! hahaha
"We have a small team of 5 people — all of whom either write code or create learning resources." holy shit, fcc is run by 5 people.
Aditya
@ezioda004
Nov 27 2018 07:01
Yes, technically though there are many-many collaborators who help out all the time
kinopotato
@kinopotato
Nov 27 2018 07:02
yes, this just shows how amazing FCC is as a whole. 5 staff, and probably tens of thousands of contributors who did so voluntarily. That's quite a human feat.
Aditya
@ezioda004
Nov 27 2018 07:03
Indeed! Happy to see fcc doing so well, I personally owe a lot to fcc, and now I'm trying to give some of it back by contributing.
kinopotato
@kinopotato
Nov 27 2018 07:04
I'll try to do the same, once I no longer fear github. seriously to a beginner, github looks like cuthulu
Aditya
@ezioda004
Nov 27 2018 07:06
Lmao, do a tutorial or something on git/github basics, rest is pretty easy. We're pretty beginner friendly with contribution so you can get started right away!
why it is throwing me an error rather then displaying CommentDetail compoenent?@ ADITYA
Aditya
@ezioda004
Nov 27 2018 07:09
@coderkarma Because your relative path is wrong; it should be import CommentDetail from "../CommentDetail";
You should have all components inside the /src folder.
Karma Drukpa
@coderkarma
Nov 27 2018 07:10
oh shoot!! thanks
so I need to ../ to target src folder
Aditya
@ezioda004
Nov 27 2018 07:11
No, you ../ to go up one folder you're currently in.
Karma Drukpa
@coderkarma
Nov 27 2018 07:12
oh I thought just ./ will go up one folder .
Aditya
@ezioda004
Nov 27 2018 07:13
No, ./ targets in the current directory, like cd .. goes up one folder, its same with ../
Karma Drukpa
@coderkarma
Nov 27 2018 07:13
gotcha, same like cd ..
nice Thanks. Trying to install faker js packages on sandbox but I have no idea
just to test out some random name and images in the simple react app
Aditya
@ezioda004
Nov 27 2018 07:15
I think you can just click on the "Add dependency" button on the bottom left and search for the package and add it.
Karma Drukpa
@coderkarma
Nov 27 2018 07:18
Nice .thanks
嘻嘻
@sex-cjh
Nov 27 2018 08:16
EEEEEnglish
kinopotato
@kinopotato
Nov 27 2018 08:43
is there a code playground with better built in console than codepen?
kinopotato
@kinopotato
Nov 27 2018 09:37
Hello, quick question. Why is es6 string literal syntax not working?
estimateDisplay.textContent = `Estimated Price is : ${total}`;
nvm, brain fart moment
Henry
@GitHub-Henry
Nov 27 2018 09:40
kinopotato
@kinopotato
Nov 27 2018 09:56
Hello, why isn't my hasAttribute returning true?
framedGlass;
//returns "<div class='framedGlass box'><input type='radio' name='mainChoice' checked=''>Framed Glass</div>" (you can see the checked attribute)
framedGlass.hasAttribute("checked") // false
I used the same syntax on another thing and it works, but this one isn't :|
oh sorry, I was selecting the div like a dumbass does
kinopotato
@kinopotato
Nov 27 2018 10:18
so this question is real this time. is it normal behavior that if there are 2 radio buttons, and one has the attribute checked by default, if I click on the other one HTML won't know about it and the attribute "checked" will remain on the default that I placed.
Claudio Restifo
@Marmiz
Nov 27 2018 10:39
@kinopotato are they in a radio group?
kinopotato
@kinopotato
Nov 27 2018 10:39
yes but multiple radios and one select
Claudio Restifo
@Marmiz
Nov 27 2018 10:40
look at the example on the mdn page, you'll see that they use checked and is working, You can compare from there
(do they have the same name attr?)
kinopotato
@kinopotato
Nov 27 2018 10:49
what do you mean by "is working"? I mean my checked is also working, it's just not updating when I click on another radio button to pass that "checked" attribute to the new radio button I clicked
Stephen James
@sjames1958gm
Nov 27 2018 11:11
checked is a boolean, so there might be a problem assigning to an empty string
checked='' might be setting it to not checked?
Mohammed Boudad
@matrixersp
Nov 27 2018 11:13
Someone help me please, Ubuntu doesn't start after removing keyring sudo apt autoremove gnome-keyring
Zaza
@ForkInSpace
Nov 27 2018 11:15
@matrixersp do you have a bootable usb drive with ubuntu to run it and see what you've removed?
Mohammed Boudad
@matrixersp
Nov 27 2018 11:17
No I don't, but maybe I can install it in USB key and check, please give me the instructions
Zaza
@ForkInSpace
Nov 27 2018 11:17
I'm assuming you have a spare computer to do that ?
Mohammed Boudad
@matrixersp
Nov 27 2018 11:19
Yes I can boot into windows
Mohammed Boudad
@matrixersp
Nov 27 2018 11:25
Thanks man! I'm gonna install it now
Zaza
@ForkInSpace
Nov 27 2018 11:25
No problem. Best of luck
Let me know how you get on
kinopotato
@kinopotato
Nov 27 2018 11:31
@sjames1958gm it's html doing that though. I put "check" but when I console.log it gives a value to checked. Though to me it looks like " " so not empty maybe?
Mohammed Boudad
@matrixersp
Nov 27 2018 11:32
But hey it's just the gui doesn't start, I still can use the command linen we can't anything with it?
Zaza
@ForkInSpace
Nov 27 2018 11:32
can you get packages over internet ?
curious if you might have uninstalled ethernet drivers
Mohammed Boudad
@matrixersp
Nov 27 2018 11:33
I think I can
Zaza
@ForkInSpace
Nov 27 2018 11:33
try to apt-get
Mohammed Boudad
@matrixersp
Nov 27 2018 11:34
It's working
Zaza
@ForkInSpace
Nov 27 2018 11:35
good news.
Can you install the package(s) you removed?
kinda odd thought, seems like you've just removed a password manager software and I don't get why you'd lose GUI with that
Anything else you've removed ?
Mohammed Boudad
@matrixersp
Nov 27 2018 11:37
I did
Just keyring
autoremove might have removed other packages no?
Zaza
@ForkInSpace
Nov 27 2018 11:40
seems like it shouldn't have removed anything useful
Mohammed Boudad
@matrixersp
Nov 27 2018 11:40
Cause when I uninstall it freed about 150mb while when I reinstalled it it add about 3mb
Zaza
@ForkInSpace
Nov 27 2018 11:41
yeah it might have removed some dependencies
how long have you had ubuntu btw?
Mohammed Boudad
@matrixersp
Nov 27 2018 11:43
But when I did autoremove the theme changed
Zaza
@ForkInSpace
Nov 27 2018 11:44
my guess is some of the dependencies had to do with ubuntu-desktop package which might be removed
sudo apt-get install ubuntu-desktop
Mohammed Boudad
@matrixersp
Nov 27 2018 11:44
I've used it like 4 months
Zaza
@ForkInSpace
Nov 27 2018 11:44
try this
I see ;)
Mohammed Boudad
@matrixersp
Nov 27 2018 11:45
Okay, thanks man, I'll wait for it to install
Zaza
@ForkInSpace
Nov 27 2018 11:45
no worries
Can you check what other pkgs you've lost ?
Mohammed Boudad
@matrixersp
Nov 27 2018 11:55
@ForkInSpace I'm hugely thankful for you! You saved my day, It's fixed. I had a similar problem before and I had to reinstall the whole system and set up everything (It takes a lot of time), thanks again!
Zaza
@ForkInSpace
Nov 27 2018 11:56
No problem m8. Happy I could help ;)
Mohammed Boudad
@matrixersp
Nov 27 2018 11:56
:smile:
Mr-L
@Hao-Lv
Nov 27 2018 14:08

I have tried to change the size of words. My code is :

<p { font-size: 16px; }>

But I can`t achieve its goal.Please help me, thank you!

Christopher McCormack
@cmccormack
Nov 27 2018 15:24
@Hao-Lv if this is CSS the correct syntax would be
p {
    font-size: 16px;
}
if HTML, you could use something like
<p style="font-size: 16px;"> ... </p>
Karma Drukpa
@coderkarma
Nov 27 2018 21:57
@cmccormack which extension have you installed to format your code when you write react and jsx ?
I have prettier extension installed but when I save react and jsx code it doesn't format correctly.
Christopher McCormack
@cmccormack
Nov 27 2018 22:20
@coderkarma i'm not currently using prettier, I'll use a linter normally and keep the formatting as clean as I can