These are chat archives for FreeCodeCamp/Help

21st
Jun 2018
Zebralight
@zebralight
Jun 21 2018 00:44
I was wondering how to see our submitted answers to the challenges. I checked on my profile but only see links to my projects and some of the algo and data structures projects
Bjorn van de Peut
@bjorno43
Jun 21 2018 01:29
@zebralight Go to https://www.freecodecamp.org/ Click on Curriculum in the top menu after logging in. There you can see a list of every challenge you've completed and the ones you still need to do. If you click on the completed one, you'll be taken to the challenge. There your answer should be present in the code
Zebralight
@zebralight
Jun 21 2018 01:35
@bjorno43 I had assumed that that would be the case, but I'm presented with the setup code with my implementation missing. I actually do prefer that my answer doesn't show up when I review challenges I've already completed, but I was also hoping to have the option of seeing my previously submitted code as well
Bjorn van de Peut
@bjorno43
Jun 21 2018 01:39
@zebralight Hmm ye you're right. It seems it's only giving me my previous answers for a very select few of them
Kyle Holm
@thekholm80
Jun 21 2018 02:40
@bjorno43 it's fun finding these weird idiosyncrasies in JS. i like figuring out the reasoning behind them
Claudio Restifo
@Marmiz
Jun 21 2018 02:42
@thekholm80 so please tell me why `NaN !== NaN`. Never really got that one.
Kyle Holm
@thekholm80
Jun 21 2018 02:42
ugh i knew this one
only because i ran into this somewhere in a project or something, and had to learn the wonder of `isNaN()`
MDN's pollyfill is kind of cool
``````var isNaN = function(value) {
var n = Number(value);
return n !== n;
};``````
Bjorn van de Peut
@bjorno43
Jun 21 2018 02:46
According to the IEEE 754 floating-point standard, comparison with NaN always returns an unordered result. That is, NaN is not equal to, greater than, or less than anything, including itself
Kyle Holm
@thekholm80
Jun 21 2018 02:47

i like this:

pragmatically speaking, though, two values of which you only know they're not numbers can't logically be the same thing.

Claudio Restifo
@Marmiz
Jun 21 2018 02:47
@thekholm80 that's because `isNaN` coerce the value to a number and then test if it's one. On the other hand `Number.isNaN(val)` will be true only if val `is NaN`
Bjorn van de Peut
@bjorno43
Jun 21 2018 02:48
So to make it simple: Comparison with NaN should always return false
Claudio Restifo
@Marmiz
Jun 21 2018 02:50

@bjorno43 @thekholm80 I always take it for granted. But never actually saw the reasoning for them. Like I know `a NaN won't ever be equal to another NaN`...

but why :)

probably has to do with imprecision and coercion
Kyle Holm
@thekholm80
Jun 21 2018 02:51
in python it's really easy to see the why behind these things - i've not found docs like that for js
every change to python gets tagged and posted for everyone to see
Claudio Restifo
@Marmiz
Jun 21 2018 02:52
kinda like `since we cannot be sure of the exact value of this, and we actually have to coerce it to a different value to make it representable... let's say that it's unique. So won't ever be equal to anything else`
Bjorn van de Peut
@bjorno43
Jun 21 2018 02:52
NaN always returns an unordered result = Each call for NaN returns something else
@Marmiz @thekholm80 Here you go:
``````// Native implementation
function isNaN(x) {
// Coerce into number
x = Number(x);
// if x is NaN, NaN != NaN is true, otherwise it's false
return x != x;
}``````
Kyle Holm
@thekholm80
Jun 21 2018 02:55
Bjorn van de Peut
@bjorno43
Jun 21 2018 02:55
Yup, lol
Kyle Holm
@thekholm80
Jun 21 2018 02:56
i just wish there were a PEP for js
only i guess it would be JSEP
Christopher McCormack
@cmccormack
Jun 21 2018 02:56
@thekholm80 prettier :)
Kyle Holm
@thekholm80
Jun 21 2018 03:08
i wonder if there will ever be a time when instead of searching for hours for a built-in method to accomplish something, i'll think "hey, i could just write my own method" and then do it? it's not like it's a big deal to add new methods to a prototype
Bjorn van de Peut
@bjorno43
Jun 21 2018 03:08
Meh. The most interesting on the subject I can find is: https://brionv.com/log/2018/05/17/javascript-engine-internals-nan-boxing/
Bjorn van de Peut
@bjorno43
Jun 21 2018 03:17
Anyway, time to sleep. Gn8 all
Kyle Holm
@thekholm80
Jun 21 2018 03:17
@bjorno43 :wave:
Claudio Restifo
@Marmiz
Jun 21 2018 04:18
@bjorno43 gn :wave:
Akhil Kaithoju
@akhilkaithoju_twitter
Jun 21 2018 06:38
Hi
I have been using beta.freecodecamp.com. I have done the all the tasks but suddenly its not working . and it is changed to learn freecodecap.org .
when i login to the learn freecodecamp.org whatever the data is finished it is not restored.
Can you help me with that?
And How to get my previous data ?
Claudio Restifo
@Marmiz
Jun 21 2018 06:57

@akhilkaithoju_twitter as stated:

Your progress on beta.freecodecamp.com 8 will not be saved. We have a completely separate database just in case there is a bug that might corrupt your account’s data.

What you can do is manually re-submit projects so you can claim your certificates again.

but ask for some official confirmation from a mod :)

May Kittens Devour Your Soul
@diomed
Jun 21 2018 08:46
hello
I drank poison tho it was written that it's poisonous.
Shall I die? pls let me know, ASAP
Adam Jacks
@AdamHJ123
Jun 21 2018 08:54
Hey guys! I have worked as a front end developer for the past year and 2 months. I got let go yesterday so I need to build a new portfolio and look for new jobs ASAP
Steve Yoo
@StevieY_gitlab
Jun 21 2018 08:55
Hi guys, I am trying to change my h2 to red
<h2 style="color: red;">CatPhotoApps</h2>
Adam Jacks
@AdamHJ123
Jun 21 2018 08:55
I'm really bad at design so I'm looking at other portfolios for inspiration
Steve Yoo
@StevieY_gitlab
Jun 21 2018 08:55
It is not going through - Your style declaration should end with a ; .
Adam Jacks
@AdamHJ123
Jun 21 2018 08:55
Does anyone have a portfolio they could share to help me out?
Steve Yoo
@StevieY_gitlab
Jun 21 2018 08:55
what am I doing wrong here? Could anyone help please?
Adam Jacks
@AdamHJ123
Jun 21 2018 08:56
@StevieY_gitlab Could you send the whole code?
Steve Yoo
@StevieY_gitlab
Jun 21 2018 08:57
Do you need the whole code? It's quite long
I dont understand what this means: Note that it is a good practice to end inline style declarations with a ;
Adam Jacks
@AdamHJ123
Jun 21 2018 08:58
@StevieY_gitlab Nothing is wrong with that line
Steve Yoo
@StevieY_gitlab
Jun 21 2018 08:58
I've included ; after red
Adam Jacks
@AdamHJ123
Jun 21 2018 08:58
You did
Steve Yoo
@StevieY_gitlab
Jun 21 2018 08:59
yeah but it wont go through for some reason
thanks :)
Adam Jacks
@AdamHJ123
Jun 21 2018 08:59
Give me a second
Steve Yoo
@StevieY_gitlab
Jun 21 2018 09:00
Sure
Adam Jacks
@AdamHJ123
Jun 21 2018 09:00
Worked fine for me

`<h2 style="color: red;">CatPhotoApp</h2>

<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>`

Steve Yoo
@StevieY_gitlab
Jun 21 2018 09:01
hmmm weird
what does ''' used for?
Adam Jacks
@AdamHJ123
Jun 21 2018 09:02
They usually make the markup neater for code...
Steve Yoo
@StevieY_gitlab
Jun 21 2018 09:02

<h2 style="color: red;">CatPhotoApps</h2>

<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>

This is what I have..
I do not see anything different to yours
Adam Jacks
@AdamHJ123
Jun 21 2018 09:03
Reset it and do it again
Steve Yoo
@StevieY_gitlab
Jun 21 2018 09:04
wow that worked fine..
thanks so much lol
spent 20 minutes on it..sigh
cheers
Adam Jacks
@AdamHJ123
Jun 21 2018 09:04
Just be thankful it didn't happen on a real project haha
Tell me pls
Adam Jacks
@AdamHJ123
Jun 21 2018 09:57
@nalinpuri Basically it's your main container
nalinpuri
@nalinpuri
Jun 21 2018 09:58
Do i have to use all that is told in those User Story
Adam Jacks
@AdamHJ123
Jun 21 2018 09:58
So you could have your <header> element
After your end it liek so </header>
You can open a <main> with id="main"
@nalinpuri Yes
nalinpuri
@nalinpuri
Jun 21 2018 09:59
is it compulsary to pass
Adam Jacks
@AdamHJ123
Jun 21 2018 09:59
Yes
I believe so
nalinpuri
@nalinpuri
Jun 21 2018 09:59
using these instructions
@AdamHJ123 Ican understand half of the instructions
cant
what should i do
Adam Jacks
@AdamHJ123
Jun 21 2018 10:00
Take it step by step
Take it slow
Do it right
Just start it and you can bug me when you get confused
nalinpuri
@nalinpuri
Jun 21 2018 10:02
Do i have to make webpage same as https://codepen.io/freeCodeCamp/full/zNqgVx
@AdamHJ123
Adam Jacks
@AdamHJ123
Jun 21 2018 10:03
Not the same as
Do your own thing for it
YOu can reference it
nalinpuri
@nalinpuri
Jun 21 2018 10:04
Then what to do
Adam Jacks
@AdamHJ123
Jun 21 2018 10:04
I did one for Alex Honnold
You could do one about squirrels
Anything you want
nalinpuri
@nalinpuri
Jun 21 2018 10:04
Do i have to fullfil the User Stories given
Adam Jacks
@AdamHJ123
Jun 21 2018 10:05
Yes
nalinpuri
@nalinpuri
Jun 21 2018 10:08
I cant understand User story 1 @AdamHJ123
Adam Jacks
@AdamHJ123
Jun 21 2018 10:08
You must use a <main> element like so
<main id="main"> Your main content here</main>
nalinpuri
@nalinpuri
Jun 21 2018 10:09
In html
Adam Jacks
@AdamHJ123
Jun 21 2018 10:09
Yes
nalinpuri
@nalinpuri
Jun 21 2018 10:09
ok thanks
Adam Jacks
@AdamHJ123
Jun 21 2018 10:09
That is HTML
nalinpuri
@nalinpuri
Jun 21 2018 10:10
same
why are they calling tags id like <main>,id is #main
@AdamHJ123
Adam Jacks
@AdamHJ123
Jun 21 2018 10:15
It's just a good habit
nalinpuri
@nalinpuri
Jun 21 2018 10:16
<title>
<h1>Bhagat Singh</h1>
</title>
This is not working
on Codepen
Adam Jacks
@AdamHJ123
Jun 21 2018 10:16
That's not what a title is for
Title is used to change the name on the tab of your web browser
You want <header>
nalinpuri
@nalinpuri
Jun 21 2018 10:17
ok but is User Story it is telling me to write id as title
Adam Jacks
@AdamHJ123
Jun 21 2018 10:18
You can use <header id="title">
< h1 id="title>
Even <div id="squirrel">
nalinpuri
@nalinpuri
Jun 21 2018 10:19
ok
Jose Pagan
@josepagan
Jun 21 2018 10:20
there used to be a casual chat, has it gone? I cant find it
mstellaluna
@mstellaluna
Jun 21 2018 10:24
@josepagan the main room was closed several months ago
the casual chat room also as there was no longer any activity in the room
Jose Pagan
@josepagan
Jun 21 2018 10:25
yes I am a returner!
nalinpuri
@nalinpuri
Jun 21 2018 10:25
is gitter made by github devs
mstellaluna
@mstellaluna
Jun 21 2018 10:25
no
Jose Pagan
@josepagan
Jun 21 2018 10:25
Also I noticed that brownie points have been removed!!!
chengqingxing
@chengqingxing
Jun 21 2018 13:27
please tell me who can answerd to the question
Adam Jacks
@AdamHJ123
Jun 21 2018 13:27
@chengqingxing ??
chengqingxing
@chengqingxing
Jun 21 2018 13:29
who is chinese
who is chinese
who is chinese
who is chinese
who is chinese
who is chinese
who is chinese
who is chinese
who is chinese
who is chinesewho is chinese
who is chinese
who is chinese
who is chinese
who is chinese
who is chinesewho is chinese
who is chinese
who is chinese
who is chinese
who is chinese
who is chinese
who is chinese
who is chinesewho is chinese
who is chinese
Kyle Holm
@thekholm80
Jun 21 2018 13:29
stop
Adam Jacks
@AdamHJ123
Jun 21 2018 13:29
That's how you get banned
Kyle Holm
@thekholm80
Jun 21 2018 13:29
Tom
@moT01
Jun 21 2018 14:05
chinese people
Jose Pagan
@josepagan
Jun 21 2018 14:34
who is annoying, who is annoying….

@tone0000
Jun 21 2018 16:01
How to run test Target HTML Elements with Selectors Using jQuery

@tone0000
Jun 21 2018 16:07
no one online???
Moisés Man
@moigithub
Jun 21 2018 16:26
@tone0000 javascript is case sensitive
addClass withuppercase C
Payton Jewell
@paytonjewell
Jun 21 2018 16:34
https://codepen.io/lettiebear/pen/MXVpRV Would anybody be able to tell me why my headings throughout the page are not centered? I created it originally in sublime text and everything displays fine from the original html file, but for some reason once I put it into CodePen, my heading elements are not displaying correctly :(
Kyle Holm
@thekholm80
Jun 21 2018 17:05
@lettiebear css is so frustrating. i inspected the elements in the dev console and i can't figure out what's going on. hopefully someone smarter than me will come along and help you sort it out
Aditya
@ezioda004
Jun 21 2018 17:15
@lettiebear The problem seems to be coping pasting directly (meta tags and such into HTML section), apparently codpen removes your `<body>` tags and inserts its own (you can inspect). You can put all the dependencies in the appropriate sections (CSS, JS) and start the HTML from `<nav>` directly and it seems to center it back.
Kyle Holm
@thekholm80
Jun 21 2018 17:17
@ezioda004 you're the hero we need
Payton Jewell
@paytonjewell
Jun 21 2018 17:17
@ezioda004 Thank you! I'm gonna try that!
It worked!
Kyle Holm
@thekholm80
Jun 21 2018 17:20
:tada:
Aditya
@ezioda004
Jun 21 2018 17:25
:clap: :sparkles:
hensn5250
@hensn5250
Jun 21 2018 17:28
@thekholm80 @ezioda004 Do any of you guys know how to modify media queries for use on mobile?
I designed and app and it looks ok in the browser but it is very tiny when viewed on mobile
I think it has to do with the DPI vs width
Kyle Holm
@thekholm80
Jun 21 2018 17:39
@hensn5250 sorry i'm about the worst person you could ask about that stuff. I build truly bad UIs
hensn5250
@hensn5250
Jun 21 2018 17:42
no prob. just curious on the usage of media queries. I can never get my design to fit correctly on mobiles
Kyle Holm
@thekholm80
Jun 21 2018 17:43
@hensn5250 i read this article a while back that I felt did a good job explaining media query breakpoints, if that helps
hensn5250
@hensn5250
Jun 21 2018 17:44
@thekholm80 thanks . Will check it out.
Aditya
@ezioda004
Jun 21 2018 17:45
@hensn5250 Do you have`<meta name="viewport" content="width=device-width, initial-scale=1.0">` tag? This will make sure the website uses CSS pixels instead of device pixels, in short the page will follow the width of the device.
Also this article might help.
hensn5250
@hensn5250
Jun 21 2018 17:51
@ezioda004 yes I do
That article seems to address some of what I'm having issue with
Aita Kane
@aita-kane
Jun 21 2018 18:22
hello can someone help me please my justify-content: flex-end doesn't work
George5555ish
@George5555ish
Jun 21 2018 19:10
Hi..
I'm just starting the courses and I have this one criteria that won't check, "Your p element should contain the first few words of the provided additional kitty ipsum text." I've put that into the p element, but it's not clearing.... Help
Kyle Holm
@thekholm80
Jun 21 2018 19:12
can you show us your code?
it's hard to guess what the problem would be
George5555ish
@George5555ish
Jun 21 2018 19:12

here it is: <h2>CatPhotoApp</h2>

<main><p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p> Kitty ipsum text dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. </p>
</main>

it said to add 2 p tags... did i group them wrong?
Kyle Holm
@thekholm80
Jun 21 2018 19:13
can you give the link to the lesson?
George5555ish
@George5555ish
Jun 21 2018 19:13
Kyle Holm
@thekholm80
Jun 21 2018 19:14
Create a second p element after the existing p element with the following kitty ipsum text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
your second text doesn't look anything like the text in the instructions

### Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

George5555ish
@George5555ish
Jun 21 2018 19:15
oh wow... now i feel stupid...
Thanks a lot for the help
Kyle Holm
@thekholm80
Jun 21 2018 19:15
:+1:
Aditya
@ezioda004
Jun 21 2018 19:17

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

This cat knows how to live

Kyle Holm
@thekholm80
Jun 21 2018 19:17
lol
@ezioda004 which project did you choose?
Aditya
@ezioda004
Jun 21 2018 19:22
@thekholm80 Game of life, seems fun so far!
Kyle Holm
@thekholm80
Jun 21 2018 19:23
ah, cool
it is a fun project
Aditya
@ezioda004
Jun 21 2018 19:25
Yeah quite fun and frustrating, in other news Vue seems to have surpassed React on github. Came out as surprise cause I dont see anyone use Vue but React is everywhere
Kyle Holm
@thekholm80
Jun 21 2018 19:25
in stars, you mean?
Aditya
@ezioda004
Jun 21 2018 19:26
Yeah
Kyle Holm
@thekholm80
Jun 21 2018 19:27
Aditya
@ezioda004
Jun 21 2018 19:27
I mean I know its a not a good metric to measure but still surprising nonetheless
Kyle Holm
@thekholm80
Jun 21 2018 19:27
it's not quite close as far as users lol
almost 2 million less downloads per week
Aditya
@ezioda004
Jun 21 2018 19:27
Oh wow, not even close it is lol
Kyle Holm
@thekholm80
Jun 21 2018 19:28
still, it's cool to see vue is still growing
Aditya
@ezioda004
Jun 21 2018 19:29
Yeah, healthy competition is good as long as I dont have to learn Vue though :D
Kyle Holm
@thekholm80
Jun 21 2018 19:30
i'd learn vue before i'd learn angular
Aditya
@ezioda004
Jun 21 2018 19:31
Yeah Angular still seems like a mess from a distance, Vue is very beginner friendly so I've heard
Kyle Holm
@thekholm80
Jun 21 2018 19:32
i tried angular before i started learning react, it made my head hurt
Aditya
@ezioda004
Jun 21 2018 19:38
The course I'm doing has Angular and Ember, I'll keep Aspirin ready
Kyle Holm
@thekholm80
Jun 21 2018 19:38
you may like it. some things just never click for me
lmilliken
@lmilliken
Jun 21 2018 19:38
hey @thekholm80 , campers, do you know what this part is wanting me to do? https://learn.freecodecamp.org/apis-and-microservices/mongodb-and-mongoose/create-a-model/
Aditya
@ezioda004
Jun 21 2018 19:41
@thekholm80 Perhaps, but after learning React I'm feeling lazy learning any other frontend framework
Kyle Holm
@thekholm80
Jun 21 2018 19:44
@lmilliken i'm not sure, it kind of looks like the bottom half of the lesson text isn't really supposed to be there?
It has it's own heading and goes off in a different direction than the Mongoose lesson
i don't see any issues on github or questions on the forum
maybe i'm wrong, but it does seem odd
lmilliken
@lmilliken
Jun 21 2018 19:48
ok, thanks, didn't know if there was something painfully obvious that I was missing
btw, where on github are you looking for associated issues?
Kyle Holm
@thekholm80
Jun 21 2018 19:49
Mehdi Amlal
@mehdiamlal
Jun 21 2018 20:50
Hey guys! If I have an app with multiple html pages, in order to style them, should I use a single css/scss file or it's good practice to have a stylesheet for each html file?
Kyle Holm
@thekholm80
Jun 21 2018 20:59
@mehdiamlal here is what css-tricks has to say about it
lmilliken
@lmilliken
Jun 21 2018 21:11
hey everyone, what is the tutorial wanting me to do with the callback here? https://learn.freecodecamp.org/apis-and-microservices/mongodb-and-mongoose/create-and-save-a-record-of-a-model/
anthonygallina1
@anthonygallina1
Jun 21 2018 21:24
@thekholm80 :thumbsup:
Kyle Holm
@thekholm80
Jun 21 2018 21:25
@anthonygallina1 :wave:
anthonygallina1
@anthonygallina1
Jun 21 2018 21:25
:smile:
@mehdiamlal You could use partials if you know how. If not you will prob learn later. I which case I would use one style sheet and use different selectors
Kyle Holm
@thekholm80
Jun 21 2018 21:27
anthonygallina1
@anthonygallina1
Jun 21 2018 21:27
LOL