These are chat archives for FreeCodeCamp/Help

14th
Jun 2018
Lance
@texas2010
Jun 14 2018 01:31
@thekholm80 :wave:
Kyle Holm
@thekholm80
Jun 14 2018 01:40
@texas2010 :wave:
GSGV
@GSGV
Jun 14 2018 01:57
General Question to all:
When working with images for thumbnails, backgrounds, ect., where can you source them?
Everytime i find something i love and end up using from one of these free-photo sites, it disappears and messes up my portfolio page. Need a more permanent solution, preferably without added cost.
Kyle Holm
@thekholm80
Jun 14 2018 02:00
@GSGV if you can, it's best to download the images and serve them from your project instead of hotlinking to external sites. you won't have to worry about breaking changes you can't control
GSGV
@GSGV
Jun 14 2018 02:01
So far i've only learned to hotlink. How do i serve them from my project?
In codepen for example
Kyle Holm
@thekholm80
Jun 14 2018 02:02
with codepen, if you want to upload files you have to pay for pro
GSGV
@GSGV
Jun 14 2018 02:02
thats what i thought
Kyle Holm
@thekholm80
Jun 14 2018 02:02
in that case you could probably use something like google photos to host the images
GSGV
@GSGV
Jun 14 2018 02:03
it's rare to find one that's not copy protected
Kyle Holm
@thekholm80
Jun 14 2018 02:03
i've done that before with good results, but you have to make sure your photo's privacy settings will allow everyone to view them
https://www.pexels.com/royalty-free-images/ this site has images you can use without licensing or attribution
or you can google "royalty-free-images"
just make sure you read the fine print so you're compliant with their copyrights
GSGV
@GSGV
Jun 14 2018 02:05
Yea i actually used that site and another one. Problem is the rights to those photos can be bought, then they disappear, or the image is moved and your link expires.
bleh... i think i'm gonna have to scrap the portfolio and start over. It'll be good practice i guess.
Kyle Holm
@thekholm80
Jun 14 2018 02:08
once you move beyond codepen your options will really open up
if you can build it locally and host it somewhere like heroku or github pages then you'll be able to host the images yourself
anthonygallina1
@anthonygallina1
Jun 14 2018 02:11
:smile:
Kyle Holm
@thekholm80
Jun 14 2018 02:12
oh neat
GSGV
@GSGV
Jun 14 2018 02:12
@anthonygallina1 I used that and my portrait disappeared? has that never happened to you?
@thekholm80 do you have a suggestion other than codepen then?
Kyle Holm
@thekholm80
Jun 14 2018 02:13
do you know how to build with a text editor, like vs code or atom?
anthonygallina1
@anthonygallina1
Jun 14 2018 02:14
@GSGV No works here
Kyle Holm
@thekholm80
Jun 14 2018 02:14
are you using any frameworks or just html, css, JS/jQuery?
GSGV
@GSGV
Jun 14 2018 02:16
@thekholm80 right now no frameworks, but I can learn it if i have to. FCC doesn't so much go into it but i was using another learning source that started with it.
Norvin Burrus
@ndburrus
Jun 14 2018 02:16
@anark22 this may be useful :sparkles:
Kyle Holm
@thekholm80
Jun 14 2018 02:16
@GSGV you should be able to use github pages
anthonygallina1
@anthonygallina1
Jun 14 2018 02:17
yup
Kyle Holm
@thekholm80
Jun 14 2018 02:17
you can even write all the code in github's website if you want
Ammiel
@aemc
Jun 14 2018 03:34
@aemc
hi all, got a quick question. say you have a column of card components. each card has a button that turns on a drawer to the right. the info on that drawer depends on the card type. right now i have something like this implemented where i pass the ‘children’ of the cards into the container state and then pass that state into the drawer
was wondering if there’s a better way. it seems theres some lag when opening the drawer due to the payload
Tarun Garhwal
@eoo
Jun 14 2018 04:14
@aemc idk what you're saying but if you're looking for a better way to manage your app's state, look at Redux.js
Claudio Restifo
@Marmiz
Jun 14 2018 04:17

@aemc there are multiple factors:

is the drawer unique, and it's position is calculated on visibility change? (like a modal for instance)
Or you have n drawer for n cards?

Are this drawers rendered on the page and hidden, or they are rendered only on button click?

Also

i pass the ‘children’ of the cards into the container

Are you passing some data from a Child component to its Parent?

Henry
@GitHub-Henry
Jun 14 2018 07:51
any thoughts on React with (Flow or Typescript)?
Ankit Tiwari
@anku255
Jun 14 2018 07:52
@GitHub-Henry If you are starting with React then just start with React. Don't mix with it anything else until you are comfortable with React.
Amani Jones
@AmaniJones
Jun 14 2018 08:04
hey guys i cant back in to my FreeCodeCamp account im stuck on the >> Enter your email address to sign up or sign in. <<< and then you get >>>Enter the code you received on your email.<<< but i never get the code send to me
someone help please
Ankit Tiwari
@anku255
Jun 14 2018 08:05
@AmaniJones Did you check your spam or Promotions folder?
Amani Jones
@AmaniJones
Jun 14 2018 08:11
i did @anku255
Amani Jones
@AmaniJones
Jun 14 2018 08:17
found it lol
Ankit Tiwari
@anku255
Jun 14 2018 08:18
@AmaniJones Where was it?
Amani Jones
@AmaniJones
Jun 14 2018 08:18
in the Junk Mail lol i though "Other" in hotmail was the Junk Mail folder #deluded
Ankit Tiwari
@anku255
Jun 14 2018 08:19
@AmaniJones Hehe! Glad you found it. All the best for new challenges :thumbsup:
Norvin Burrus
@ndburrus
Jun 14 2018 09:11
@GitHub-Henry this may be useful :sparkles:
Ankit Tiwari
@anku255
Jun 14 2018 09:13
@ndburrus How are you doing this? Manually? or do you have some script in place?
Norvin Burrus
@ndburrus
Jun 14 2018 09:29
@anku255 a little of both, working on improving the process...
Nazar
@IsaakNazar
Jun 14 2018 13:59
:wave:
Kyle Holm
@thekholm80
Jun 14 2018 16:14
@IsaakNazar :wave:
Chukwunyekwum Ihezurumba
@EvaChuks
Jun 14 2018 16:15
Hi everyone, i changed my node version to v8.4.0 and my app started showing this error " throw new TypeError('app.use() requires a middleware function')
TypeError: app.use() requires a middleware function" I have checked my code i can't identify where the error is coming from, i have google and applied on the suggestions but nothing work. here is my code https://pastebin.com/AeKtZuJc thanks in advance
Ankit Tiwari
@anku255
Jun 14 2018 16:21
@EvaChuks Hi! It would be a lot easier for us to help you if you could share the project on glitch. Glitch is like codepen but works for server side as well.
Christopher McCormack
@cmccormack
Jun 14 2018 16:23
@EvaChuks do you have an app.use() somewhere where you aren't passing anything to .use()? Try doing a general search for that term
@EvaChuks did you mean to add your route in this function? app.use("/blog/:id/comments");
Karma Drukpa
@coderkarma
Jun 14 2018 16:45

```var p1Button = document.querySelector("#p1");
var p2Button = document.getElementById("p2");

p1Button.addEventListener("click", function(){
alert("clicked");
});```

var p1Button = document.querySelector("#p1");
var p2Button = document.getElementById("p2");


p1Button.addEventListener("click", function(){
  alert("clicked");
});
Henry
@GitHub-Henry
Jun 14 2018 17:15
@ndburrus appreciate the info, thanks
Norvin Burrus
@ndburrus
Jun 14 2018 17:15
@GitHub-Henry you're welcome! enjoy :palm_tree:
Suds-p
@Suds-p
Jun 14 2018 22:09
Hey everyone, quick question: is it required to have radio button inputs nested in <label> elements? What happens if you omitted those?
Christopher McCormack
@cmccormack
Jun 14 2018 22:09
@Suds-p they aren't necessarily supposed to be nested; instead use the for attribute on the label and reference the id of the input
Suds-p
@Suds-p
Jun 14 2018 22:11
@cmccormack Ah, so they should be side-by-side instead, like this?
<label for="indoor"></label>
<input type="radio" id="indoor" ...>
Christopher McCormack
@cmccormack
Jun 14 2018 22:12
@Suds-p that's how I would do it
Suds-p
@Suds-p
Jun 14 2018 22:13
@cmccormack Ok, so is there a difference between having the option text in the label element vs. having it after the <input>?
<label for="indoor">Indoor</label>
vs.
<input ...>Indoor
Christopher McCormack
@cmccormack
Jun 14 2018 22:14
@Suds-p input is a self closing tag, you shouldn't put anything in it
Suds-p
@Suds-p
Jun 14 2018 22:16
@cmccormack Oh I see, I think that just ends up being rendered as plain text outside of the <input> elements, which doesn't sound useful.
Christopher McCormack
@cmccormack
Jun 14 2018 22:16
@Suds-p https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text all of the examples have the label and input separate and the input is a self closing tag
@Suds-p right. You could probably target it as textContent but better to use the proper tools where you can
label allows you to click the text and select the box/radio as well. If you didn't use a label I believe you'd have to do this using Javascript
Suds-p
@Suds-p
Jun 14 2018 22:18
@cmccormack Ohhh ok, that makes sense, think I was confused at first cause both approaches had similar appearances. Thanks for your help!
Christopher McCormack
@cmccormack
Jun 14 2018 22:19
np
Kyle Holm
@thekholm80
Jun 14 2018 22:19
i think a lot of that stuff really helps out people using screen readers (vision impaired) and other accessibility things
i only vaguely remember what i've read about accessibility
Christopher McCormack
@cmccormack
Jun 14 2018 22:24
I always mean to be more accessible in my apps but when i finish them I don't bother going back to add it
Kyle Holm
@thekholm80
Jun 14 2018 22:42
i just rely on nobody ever using anything i build, so i don't have to worry about it
don't need to be accessible if nobody's trying to access it
Darren
@DarrenfJ
Jun 14 2018 23:53
afternoon fCC
:wave: @thekholm80
Kyle Holm
@thekholm80
Jun 14 2018 23:53
@DarrenfJ hey, canadian friend
how's life?