These are chat archives for FreeCodeCamp/Help

5th
Jul 2018
Manish Giri
@Manish-Giri
Jul 05 2018 00:35
And ye, on rare occasions I have to ban someone for bad behaviour. But those rly are rare
Really? A quick peek into the admin room says otherwise..
Smootimus
@Smootimus
Jul 05 2018 02:05
:D
Claudio Restifo
@Marmiz
Jul 05 2018 02:29
@Manish-Giri with the :fire:
Kyle Holm
@thekholm80
Jul 05 2018 02:29
lol
Manish Giri
@Manish-Giri
Jul 05 2018 02:36
@Marmiz hey buddy
how's everything
Claudio Restifo
@Marmiz
Jul 05 2018 02:37
@Manish-Giri bad. I'm stuck in writing email templates!!
cries in html
Manish Giri
@Manish-Giri
Jul 05 2018 02:37
aw
Claudio Restifo
@Marmiz
Jul 05 2018 02:38
Jokes aside, pretty well :)
doing some interesting stuff.
Manish Giri
@Manish-Giri
Jul 05 2018 02:38
have some cake :cake: :cake: :cake:
with some :wine_glass:
Claudio Restifo
@Marmiz
Jul 05 2018 02:38

with some :wine_glass:

I can dig that <3

@Manish-Giri have you seen this project?
https://reasonml.github.io/en/

still don't know how I feel it, but I want to try it :)

Jake
@JakeDVirus
Jul 05 2018 02:42
can i import scss partials inside partials? Eg- importing _abc.scss inside _xyz.scss.
shall i add the underscore in the beggining of the filename(partial file which ll be imported)?
I've tried to import partials within another partials, it only worked when the underscore is omitted from the beggining of the filename, but it creates a redundancy by compiling the css of the partials, which ll be imported, if underscore is omitted.
Any advice will be appreciated
Manish Giri
@Manish-Giri
Jul 05 2018 02:42
Oh ReasonML
I've heard a lot about it
would be cool to try it out
@Marmiz thx for the link!!
Claudio Restifo
@Marmiz
Jul 05 2018 02:45

np ^^
came in my github feed. There's even a well mantained and used in production module for Reason React :smile:

Think I'll try to do some of the FCC algos with it

Amit Patel
@AmitP88
Jul 05 2018 03:04
hey guys, I'm stuck on the Apply Functional Programming to Convert Strings to URL Slugs challenge, and I need some help. I looked through my code, and I don't understand why my solution won't pass the last two tests. I even tried using the string inputs of those two tests, and when it runs, they pass, but then the rest of the tests won't pass. What gives?
dunno.png
I console.logged the solution outputs, and it just doesn't make any sense to me as why not all the tests are passing
Kyle Holm
@thekholm80
Jul 05 2018 03:07
@AmitP88 why are you using the global variable instead of the argument passed into the function?
Fill in the urlSlug function so it converts a string title and returns the hyphenated version for the URL.
Amit Patel
@AmitP88
Jul 05 2018 03:08
@thekholm80 crap, I didn't even notice that =/
Kyle Holm
@thekholm80
Jul 05 2018 03:08
i don't see you using title anywhere
Amit Patel
@AmitP88
Jul 05 2018 03:08
ok, one sec
@thekholm80 ok, I used title now. now all but one test passed, but I know what to do now. Thanks Kyle :)
Kyle Holm
@thekholm80
Jul 05 2018 03:09
:+1:
Amit Patel
@AmitP88
Jul 05 2018 03:09
I don't know why I jumped to using the global variable. Gotta break that habit lol
Kyle Holm
@thekholm80
Jul 05 2018 03:10
that's the whole point of functional programming
it will get easier, the more you do it
Amit Patel
@AmitP88
Jul 05 2018 03:12
yeah, I definitely need to review both Functional Programming and OOP
Kyle Holm
@thekholm80
Jul 05 2018 03:13
i'm not as solid with either as i'd like to be
Amit Patel
@AmitP88
Jul 05 2018 03:13
does React use both of those extensively?
I was thinking of reviewing those topics as I do the next cert
Claudio Restifo
@Marmiz
Jul 05 2018 03:14
JS in general is not FP friendly.
Everything is pretty much an object
Kyle Holm
@thekholm80
Jul 05 2018 03:14
yes and no - OOP in javascript is less than traditional
Amit Patel
@AmitP88
Jul 05 2018 03:15
I see
so functional programming is more of an adaptation in JS?
Kyle Holm
@thekholm80
Jul 05 2018 03:16
i think it's the best way to go about it ... much less chance of weird things happening
Amit Patel
@AmitP88
Jul 05 2018 03:17
I see. I guess I'll understand better once I'm using both concepts in projects
Kyle Holm
@thekholm80
Jul 05 2018 03:18
i'd do some reading, there's a lot of folks with way more experience than i have that have written extensively on the FP vs OOP in JS topic
like Eric Elliott
he's got some really good Medium articles
Amit Patel
@AmitP88
Jul 05 2018 03:19
definitely. I'm sure I can find some blogs on both topics. I'll check it out, thanks :)
Prakash Kumar
@ThePrakashKumar
Jul 05 2018 04:04
Image from Gyazo
Above is right way to do it?
Kyle Holm
@thekholm80
Jul 05 2018 04:05
id should be unique
there should never be more than one element with any given id
also, for should match id of the input it's for
like
<label for='catCheckbox'>Cat</label>
<input type='checkbox' id='catCheckbox'>
Prakash Kumar
@ThePrakashKumar
Jul 05 2018 04:08
Okay do I need to have label for question i.e. How likely is that you would recommend free CodeCamp to a friend: ?
Kyle Holm
@thekholm80
Jul 05 2018 04:08
i'd suggest using <fieldset>
along with <legend>
Prakash Kumar
@ThePrakashKumar
Jul 05 2018 04:13
Image from Gyazo
How is now?
Kyle Holm
@thekholm80
Jul 05 2018 04:15
looks good to me
Prakash Kumar
@ThePrakashKumar
Jul 05 2018 04:16
@thekholm80 Thank you so much sir. Really appreciate it. :)
Kyle Holm
@thekholm80
Jul 05 2018 04:16
you bet
if you don't like the border around the fieldset, you can remove it with a little css
fieldset {
  border: 0;
}
up to you, though
Prakash Kumar
@ThePrakashKumar
Jul 05 2018 04:21
Yeah I will remove it. Thanks.
Yvonne
@sautille
Jul 05 2018 04:59
Apologies if this has been asked in the past, but I noticed that the"challenge guides" that were previously in the forums are no longer being maintained, and no more solutions are being provided, specifically for the scripting problems. Has this been moved elsewhere, and are there plans to publish solutions and guides again? They are very
Oops - accidentally hit send before I finished my message
Anyway, I found the solutions and guides extremely helpful in studying, especially when cramming with a tight deadline. If anyone has any information on this please let me know, thanks!
Claudio Restifo
@Marmiz
Jul 05 2018 05:16
Have you checked fcc guides @sautille ?
Ahmad Abdolsaheb
@ahmadabdolsaheb
Jul 05 2018 06:36
hi everyone, wasn't there an fcc room for a job hunting ?
Chanchal Saini
@sainichanchal__twitter
Jul 05 2018 07:30
i am not able to get image on my screen with this code <img scr="https://qhdtgl.com/wp-content/uploads/data/2018/1/12/Cristiano-Ronaldo-Brazil-vs-Portugal-Wallpaper-PIC-WPC00921.jpg" alt="CR7 on field">
alpox
@alpox
Jul 05 2018 07:38
@sainichanchal__twitter scr--> src
Chanchal Saini
@sainichanchal__twitter
Jul 05 2018 07:40
@alpox oh my mistake thanks:)
KingCreate
@KingCreate
Jul 05 2018 08:31
Hey, im stuck on the survey project. How do i spilt the input and the label down the middle like the sample?
May Kittens Devour Your Soul
@diomed
Jul 05 2018 09:46
@KingCreate where?
show
who is this man? 
I ask myself as I look in his wikipedia page
Yvonne
@sautille
Jul 05 2018 11:44
@Marmiz yes I checked, it is much less comprehensive than the old guide and the search generates a lot of broken links
Norvin Burrus
@ndburrus
Jul 05 2018 14:03
@ahmadabdolsaheb you may enjoy this :sparkles:
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 14:43
Hey need help
I am using react
Cdns in my html file
Wit
*with script tags
And whatever react js code I am writing within my html file is working
But If I am trying to generate the same code by creating and external js file it is creating error
In console and hence not working
Can anyone help regarding this?
Stephen James
@sjames1958gm
Jul 05 2018 15:00
@SoumyoNawab8 What is the error you are seeing
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 15:01
Uncaught syntax error:Unexpected token <
Which is referring to my code in app.js to this div tag
return(
<div>
Some text
</div>
)
alpox
@alpox
Jul 05 2018 15:03
@SoumyoNawab8 Sounds like you need to use the babel compiler :)
Where did you write it that it worked first?
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 15:04
I wrote that in script tag in that same html file where I am using cdn of react,react-dom,Babel/browser.min.js
alpox
@alpox
Jul 05 2018 15:05
@SoumyoNawab8 Go sure that you import babel at the beginning of it all. Import every other script after babel
@SoumyoNawab8 When you import your script, go sure to use type="text/babel"
<script type="text/babel" src="foo.js"></script>
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 15:09
Now it showed another error failed to load filepath../app.js:cross origin requests are only supported for protocol scheme's:http, data, chrome,chrome-extension,https.
alpox
@alpox
Jul 05 2018 15:10
What does your script import look like?
Stephen James
@sjames1958gm
Jul 05 2018 15:12
@SoumyoNawab8 How are you loading the initial URL ?
Is it a file:// ?
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 15:13
@alpox @sjames1958gm have a look https://photos.app.goo.gl/L3KU4H45zLfHtGp86
And this is my app.js code
Stephen James
@sjames1958gm
Jul 05 2018 15:14
what are you typing into the address bar of the browser to load the html file?
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 15:22
@alpox
@sjames1958gm
Darren
@DarrenfJ
Jul 05 2018 15:23
morning fCC
how goes theeeeeee code
Kyle Holm
@thekholm80
Jul 05 2018 15:23
@DarrenfJ :wave: glad to see you're still alive!
Darren
@DarrenfJ
Jul 05 2018 15:24
yah.... been running the SL office QA and my key time to be online with them is 11:30 pm til 2:30 am which was my key hang out in fCC gitter chatroom time
alpox
@alpox
Jul 05 2018 15:24
@SoumyoNawab8 Did you access the page with file://.. instead of localhost/...?
Kyle Holm
@thekholm80
Jul 05 2018 15:25
@DarrenfJ is that a 'forever' thing or a 'transition' thing?
Darren
@DarrenfJ
Jul 05 2018 15:25
a bit of both
Kyle Holm
@thekholm80
Jul 05 2018 15:25
sorry :frowning:
Darren
@DarrenfJ
Jul 05 2018 15:25
will probably be online for a quick touch base at 11:30 and only stay in touch if needed eventually
Kyle Holm
@thekholm80
Jul 05 2018 15:25
hope it's not interfering with the improv group
Darren
@DarrenfJ
Jul 05 2018 15:25
that part is ok, so far
we're in the middle of a fringe show
Kyle Holm
@thekholm80
Jul 05 2018 15:26
oh good deal
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 15:26
@alpox yes I am not accessing it from any localhost I am double clicking on the HTML file and accessing it directly
Stephen James
@sjames1958gm
Jul 05 2018 15:27
You cannot load java script files when you start with a direct file
alpox
@alpox
Jul 05 2018 15:27
@SoumyoNawab8 Well, then you sure get that error. Go through localhost instead as you already use xampp and therefore apache
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 15:27
Ok
@alpox that worked thanks manπŸ˜€
alpox
@alpox
Jul 05 2018 15:36
@SoumyoNawab8 np :)
Thanks also to @sjames1958gm
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 15:43
@sjames1958gm thanks man πŸ˜€
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 16:02
@alpox new issur
*issue
Stephen James
@sjames1958gm
Jul 05 2018 16:03
@SoumyoNawab8 :+1:
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 16:04
Here is the issue with my code
Ok in topbar.js I also added export default Topbar
But nothing changed
@sjames1958gm
alpox
@alpox
Jul 05 2018 16:32
@SoumyoNawab8 to be able to use import/export you need webpack and therefore a full build system - which works quite different to what you know
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 16:33
@alpox Are you talking about using npm?
alpox
@alpox
Jul 05 2018 16:33
@SoumyoNawab8 npm and webpack
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 16:35
ok
ehutchllew
@ehutchllew
Jul 05 2018 17:16
@alpox @SoumyoNawab8 import should work on chrome without babel. Just not in Node.
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 17:18
I created a new react app using create-react-app
And trying from scratch as this includes all necessary modules
But do I need to install the webpack separately or using create-react-app command already did that for me?
alpox
@alpox
Jul 05 2018 17:23
@ehutchllew i dont think the browser support is there generally even if chrome can handle it
alpox
@alpox
Jul 05 2018 17:24
I saw that
Sadly only the totally newest versions support it and IE not at all
@SoumyoNawab8 create-react-app did that for you
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 17:27
Yes,I can see that now but can I replace my home page from index.html file to any other HTML file?
alpox
@alpox
Jul 05 2018 17:31
There should be an index.html file in your create-react-app setup
And in index.js you can replace the expression which tells react where to hook in
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 17:36
Can't find anything like that in index.js
Chris
@email362
Jul 05 2018 17:36
heyy
is this the official fcc chat room?
i cant find the link to it from the site anymore
has it been deleted??
ehutchllew
@ehutchllew
Jul 05 2018 17:47
@SoumyoNawab8 with react, there's no reason to really touch your HTML file. You can change how your home looks all in your .js files using JSX.
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 17:52
Problem solved with a new bug images are not leading with warnings in console
Chris
@email362
Jul 05 2018 17:52
Hey everyone, I was wondering if you guys could help me figure out why the test cases won't pass for my project. I thought I did everything correctly and I checked my spelling several times. https://codepen.io/email362/full/dKBbJE/
alpox
@alpox
Jul 05 2018 17:55
@SoumyoNawab8 Images are handled differently in webpack. You should import them and use the resulting url that webpack provides you (except you refer to them directly from the index.html. In that case you have to read the create-react-app docs to figure out how static assets are handled
Soumyojyoti Majumdar
@SoumyoNawab8
Jul 05 2018 18:04
@alpox I am actually adding the image in background of an element and that coding is written in case
*css
@SoumyoNawab8 You can refer to the image through a relative path (relative to the css)
Karma Drukpa
@coderkarma
Jul 05 2018 18:19
hello i need a help
hbar1st
@hbar1st
Jul 05 2018 18:25
hello @coderkarma what is up?
Smootimus
@Smootimus
Jul 05 2018 18:34
:smile:
Kyle Holm
@thekholm80
Jul 05 2018 18:38
@email362 can you show me where your h1 element is with id='title'?
go through each test, it will tell you why it's not passing
you need a <p id='description>
etc
oh wait, i'm on the wrong test :joy:
Chris
@email362
Jul 05 2018 18:39
@thekholm80 yeahh lol
@thekholm80 the tech doc project says that I'm missing id attributes for main section elements but i have them alll
Can you still get the front end certificate if one of your projects doesn't pass all the tests?
Kyle Holm
@thekholm80
Jul 05 2018 18:41
you can
i'd suggest debugging it first though
Chris
@email362
Jul 05 2018 18:42
I've been staring at it for 1 hour now. I can't find it so far DX
Kyle Holm
@thekholm80
Jul 05 2018 18:42
i'm looking through it (with the right tests this time lol)
Chris
@email362
Jul 05 2018 18:42
@thekholm80 thanks, I appreciate it
Smootimus
@Smootimus
Jul 05 2018 18:47
:wave:
Kyle Holm
@thekholm80
Jul 05 2018 18:47
@Smootimus hey
Smootimus
@Smootimus
Jul 05 2018 18:47
Hello
Chris
@email362
Jul 05 2018 18:47
:wave:
Smootimus
@Smootimus
Jul 05 2018 18:48
Ay @email362
Christopher McCormack
@cmccormack
Jul 05 2018 18:49
@email362 try removing the h3in your header maybe
Chris
@email362
Jul 05 2018 18:50
@cmccormack i tried that :(
@cmccormack didn't change anything unfortunately
Christopher McCormack
@cmccormack
Jul 05 2018 18:50
still in there from what I see
Chris
@email362
Jul 05 2018 18:50
I changed it back
because it didnt change anything
Christopher McCormack
@cmccormack
Jul 05 2018 18:51
@email362 well it could be both that and something else
@email362 also you should watch out for using < directly, try using &lt; instead
In codepen you can see some errors in your html so you may want to fix those first
Chris
@email362
Jul 05 2018 18:53
@cmccormack i saw another tech doc page and they used h2 tags as well and theirs passed
@cmccormack ok will do
Kyle Holm
@thekholm80
Jul 05 2018 18:56
@email362
<section class="main-section" id="Variables">
            <header>
                <h3>Variables</h3>
missing </header>
that got them all to pass for me
Chris
@email362
Jul 05 2018 18:57
WOWOWOWOWOWOWOWOOWWOWOWOWOWO
Kyle Holm
@thekholm80
Jul 05 2018 18:58
sometimes it just takes a second set of eyes
Chris
@email362
Jul 05 2018 18:58
@thekholm80 THANK YOU SO MUCH
Kyle Holm
@thekholm80
Jul 05 2018 18:58
:+1:
Chris
@email362
Jul 05 2018 18:58
@thekholm80 I CANT BELIEVE IT
@thekholm80 it mustve got lost from when i copied and pasted the code into codepen from vscode
Kyle Holm
@thekholm80
Jul 05 2018 18:59
that can happen
Chris
@email362
Jul 05 2018 18:59
@thekholm80 thanks again appreciate it
Kyle Holm
@thekholm80
Jul 05 2018 18:59
copy/paste is always risky
happy to help
Chris
@email362
Jul 05 2018 18:59
@cmccormack thanks again as well
Kaz Baig
@kbaig
Jul 05 2018 19:00
@thekholm80 yet another reason why I enjoy pug
Kyle Holm
@thekholm80
Jul 05 2018 19:00
@kbaig you hipsters with your silly fads
Kyle Holm
@thekholm80
Jul 05 2018 19:09
to be fair, though - usually my html is just
<body>
  <div id='app' />
</body>
kinda hard to mess that up
Kaz Baig
@kbaig
Jul 05 2018 19:10
In codepen, I still end up using Pug
So that my React app markup is just #app
Kyle Holm
@thekholm80
Jul 05 2018 19:11
i wouldn't even begin to know how to set up pug locally ... i assume it's similar to getting scss/sass running?
Kaz Baig
@kbaig
Jul 05 2018 19:11
Pretty much
Kyle Holm
@thekholm80
Jul 05 2018 19:11
it is just a pre-processor, right?
Kaz Baig
@kbaig
Jul 05 2018 19:11
yes sir
@thekholm80 :point_up: July 5, 2018 2:12 PM
Christopher McCormack
@cmccormack
Jul 05 2018 19:12
I wonder if Parcel handles pug by default
handles SCSS very well
@thekholm80 you played with Parcel? I'm really liking it so far
Kyle Holm
@thekholm80
Jul 05 2018 19:14
i've never heard of it
alpox
@alpox
Jul 05 2018 19:14
@thekholm80 Its like webpack but zero-configuration
Christopher McCormack
@cmccormack
Jul 05 2018 19:14
bundler like webpack
alpox
@alpox
Jul 05 2018 19:14
Heard good stuff about it. The only thing that is missing is aliases
Kyle Holm
@thekholm80
Jul 05 2018 19:14
oh that sounds nice
alpox
@alpox
Jul 05 2018 19:14
Which I generally don't use anyways
Christopher McCormack
@cmccormack
Jul 05 2018 19:14
yeah I decided to try it out on my current project, works pretty well
Kyle Holm
@thekholm80
Jul 05 2018 19:14
wait, is that Jaime whats-his-face's new project?
alpox
@alpox
Jul 05 2018 19:15
@thekholm80 Also, parcel is much faster than webpack
Christopher McCormack
@cmccormack
Jul 05 2018 19:15
only issues so far are errors in the dev-server that are completely opaque to me
Bjorn van de Peut
@bjorno43
Jul 05 2018 19:15
:wave:
Kyle Holm
@thekholm80
Jul 05 2018 19:15
@bjorno43 hi bob
Christopher McCormack
@cmccormack
Jul 05 2018 19:15
@bjorno43 hi
Bjorn van de Peut
@bjorno43
Jul 05 2018 19:15
Heya guys
Kyle Holm
@thekholm80
Jul 05 2018 19:18
@cmccormack are you using it with react?
Christopher McCormack
@cmccormack
Jul 05 2018 19:18
@thekholm80 yes
Kyle Holm
@thekholm80
Jul 05 2018 19:18
have you tried a production build yet, or just development?
Christopher McCormack
@cmccormack
Jul 05 2018 19:19
both
Kyle Holm
@thekholm80
Jul 05 2018 19:19
does it minify?
Christopher McCormack
@cmccormack
Jul 05 2018 19:19
as far as I've seen it does
Kyle Holm
@thekholm80
Jul 05 2018 19:19
sounds pretty good to me
Christopher McCormack
@cmccormack
Jul 05 2018 19:19
when you add build to the script it should minify, but it won't compress by default I think
Kyle Holm
@thekholm80
Jul 05 2018 19:19
i got so tired of trying to figure out which loaders i needed, how to configure them, etc with webpack
it's horsepoop
Christopher McCormack
@cmccormack
Jul 05 2018 19:20
It's a level of control most of us don't need that's for sure
alpox
@alpox
Jul 05 2018 19:20
@thekholm80 Thats why i used create-react-app and didn't care about webpack anymore
Kyle Holm
@thekholm80
Jul 05 2018 19:21
@GitHub-Henry check out what @cmccormack is saying about Parcel vs webpack
Christopher McCormack
@cmccormack
Jul 05 2018 19:21
my webpack config is pretty good now, easily reusable, but if Parcel does what I need I may not use it again
Kyle Holm
@thekholm80
Jul 05 2018 19:21
@alpox me too
CRA is the only way to go for me
Christopher McCormack
@cmccormack
Jul 05 2018 19:21
I don't like to give up that much control haha
Kyle Holm
@thekholm80
Jul 05 2018 19:22
the only thing i dislike about CRA is all the PWA stuff, i usually go through and remove all of that
Christopher McCormack
@cmccormack
Jul 05 2018 19:22
in the end it's optimizing with diminishing returns; if you have a good webpack config already it should be quick to spin up a new app just copying over a few files
Aita Kane
@aita-kane
Jul 05 2018 19:27
hello evrybody I have to build a website with php html and we have to use a framework for that. Any thoughts on which framework to use please ?
bjorno43 @bjorno43 hides
Bjorn van de Peut
@bjorno43
Jul 05 2018 19:29
Nah just kidding
I think the most popular PHP framework right now is Laravel @aita-kane Another popular one would be Symfony
Aita Kane
@aita-kane
Jul 05 2018 19:31
@bjorno43 yes thank you
Henry
@GitHub-Henry
Jul 05 2018 20:20
@thekholm80 I'll have to look into Parcel. Thanks for the heads up.
josecgomezvazquez
@josecgomezvazquez
Jul 05 2018 23:51
@josecgomezvazquez
say, can anyone help me with my survey form? I can't figure out why my age insert isnt forming the way I want to...
https://codepen.io/josecgv64/pen/RJzagX?editors=1100