These are chat archives for FreeCodeCamp/Help

11th
Jan 2019
idris
@idris12
Jan 11 04:15
hello
Martin Kiogora
@mchungaji
Jan 11 04:19
Hi
Anand Potukuchi
@anandpotukchi
Jan 11 04:57
hello
psyperl
@psyperl
Jan 11 05:10

This week's quote: "If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside." - Robert Cringely

I don't understand that

does that mean computer dev cycle doesn't employ safety?
or does that mean he just don't like computers ? :laughing:
Anand Potukuchi
@anandpotukchi
Jan 11 05:58
anyone who did the information security challenges
Priyabrata Biswas
@pbiswas101
Jan 11 05:58

Hi guys, I would really appreciate if you read it and provide some valuable feedback! If you want, you can also indulge in constructive criticism…

This article is based on my open source project! And I’m sincerely looking for contributors…

Thank you for your time!

https://medium.freecodecamp.org/how-to-get-started-with-competitive-programming-in-javascript-76ad2e760efe

Anand Potukuchi
@anandpotukchi
Jan 11 06:00
@pbiswas101 read the first few paras
there're a few changes you can make
and tyehre are a few grammatical errors
Levis
@agabyte
Jan 11 08:31
is anyone here?
Mohammed Boudad
@matrixersp
Jan 11 08:36
@agabyte Yes?
Join the chat in FreeCodeCamp/YouCanDoThis
Mohammed Boudad
@matrixersp
Jan 11 08:39
What's the issue?
Did you work on it?
Garrus Napp
@GarrusNapp
Jan 11 08:40
@agabyte dispatch(this.props.submitNewMessage(this.state.input)); submitNewMessage has already dispatch inside of it, I think you may want to do just this.props.submitNewMessage(...)
Levis
@agabyte
Jan 11 08:44
@GarrusNapp Thanks
Karma Drukpa
@coderkarma
Jan 11 08:45
how can I update node v8 to 10 .
these commands didn't work
brew update
brew upgrade node
npm update -g npm
Garrus Napp
@GarrusNapp
Jan 11 08:55
@coderkarma linux?
Karma Drukpa
@coderkarma
Jan 11 08:55
no mac.
Garrus Napp
@GarrusNapp
Jan 11 08:56
sudo npm install n -g this?
Karma Drukpa
@coderkarma
Jan 11 08:57
what version will it be updated?
Garrus Napp
@GarrusNapp
Jan 11 08:57
and the sudo n stable
Karma Drukpa
@coderkarma
Jan 11 08:57
i want v10.15.1
Karma Drukpa
@coderkarma
Jan 11 08:57
okay
let me try that
Garrus Napp
@GarrusNapp
Jan 11 08:57
this is the link
Karma Drukpa
@coderkarma
Jan 11 09:01
Karma-5:~ karmadrukpa$ sudo npm install n -g
WARN tar EISDIR: illegal operation on a directory, open '/Users/karmadrukpa/.nvm/versions/node/v8.11.2/lib/node_modules/.staging/n-95e6b95f/.github'
WARN tar EISDIR: illegal operation on a directory, open '/Users/karmadrukpa/.nvm/versions/node/v8.11.2/lib/node_modules/.staging/n-95e6b95f/bin'
npm ERR! path /Users/karmadrukpa/.nvm/versions/node/v8.11.2/lib/node_modules/n/bin/n
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/karmadrukpa/.nvm/versions/node/v8.11.2/lib/node_modules/n/bin/n'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/karmadrukpa/.npm/_logs/2019-01-11T09_00_28_089Z-debug.log
Karma-5:~ karmadrukpa$
it threw me this errors
psyperl
@psyperl
Jan 11 09:46
@coderkarma have you use nvm before?
tundeiness
@tundeiness
Jan 11 14:30
so guys here is the update on my project https://codepen.io/highness/pen/ebNYVX?editors=0011 however I need to fix just a lil thing; the red button (upper right) seems to control both rendering of the component. If I click on the red button on the editor the previewer hides but if I click the button on the previewer the previewer hides instead of the editor hiding. How do I solve this?
Luc Martin
@fmartin5
Jan 11 15:22
I usually update my Nodejs installation by just downloading the latest node.exe and replacing old executable with new one
Kaz Baig
@kbaig
Jan 11 15:35

@tundeiness You have two problems. One is in your toggleDot handler - you're toggling the show state for both the editor and the previewer on every click of the red button. You need to only toggle the state for the component you want to hide.

The other problem is in your app's render function. You need to refactor the logic in the return statement

tundeiness
@tundeiness
Jan 11 15:37
@kbaig okay...right now i'm short on ideas any heads up?
Kaz Baig
@kbaig
Jan 11 15:37
@tundeiness what part specifically are you struggling with
You need to change the return statement in your app render method and also the toggleDot method
tundeiness
@tundeiness
Jan 11 15:39
@kbaig another Idea that came to mind was to have different toggle for both the editor and the previewer but the idea isn't sinking well. I guess that's where the challenge is.
@kbaig now the idea is this the editor red button should control the previewer and vice versa
Kaz Baig
@kbaig
Jan 11 15:43
@tundeiness you can break the toggleDot logic into two methods:
toggleShowPrev() {
  this.setState(prevstate => ({ showPrev: !prevState.showPrev }));
}

toggleShowEdit() {
  this.setState(prevstate => ({ showEdit: !prevState.showEdit }));
}
And then pass the handlers to their corresponding components
tundeiness
@tundeiness
Jan 11 15:45
@kbaig wow I actually did this but I reverted back when it seems nothing was working.
Kaz Baig
@kbaig
Jan 11 15:46
Then you need to change the logic in the render function's return statement as well
I recommend you refactor it to if/else so it reads easier
tundeiness
@tundeiness
Jan 11 15:46
@kbaig but what about in this.state={....} how will I set the state?
Kaz Baig
@kbaig
Jan 11 15:47
What do you mean
tundeiness
@tundeiness
Jan 11 15:47
@kbaig means that for the if/else approach it will be handled in the method?
Kaz Baig
@kbaig
Jan 11 15:48
You already have your initial state set up
I am saying you should refactor
return(
  <div>
    {(this.state.showEdit)? edit : (this.state.showPrev)? prev: [<div>{edit} {prev}</div>]}
  </div>
);
tundeiness
@tundeiness
Jan 11 15:48
@kbaig well I have this currently:
  this.state = {
      input: dummyText,
      showEdit:false,
      showPreview: false
     }
@kbaig okay...that's where I assumed then
Kaz Baig
@kbaig
Jan 11 15:49
Also, don't you want to show the editor and preview initially?
tundeiness
@tundeiness
Jan 11 15:54
@kbaig of course the default state is that both the editor and previewer are shown
Kaz Baig
@kbaig
Jan 11 15:55
So then showEdit and showPreview should be true initially
tundeiness
@tundeiness
Jan 11 15:55
@kbaig I will now end up with 3 states: default,state1 and state2
@kbaig true
@kbaig you are right
Kaz Baig
@kbaig
Jan 11 15:56
You've always had three possible states
tundeiness
@tundeiness
Jan 11 15:57
@kbaig but at the end of the day only the editor is visible initially and on toggling the red button the previewer is then visible meaning the editor red button controls the rendering of the previewer
Kaz Baig
@kbaig
Jan 11 16:00
@tundeiness As I said, you need to fix
return(
  <div>
    {(this.state.showEdit)? edit : (this.state.showPrev)? prev: [<div>{edit} {prev}</div>]}
  </div>
);
tundeiness
@tundeiness
Jan 11 16:00
@kbaig okay, will try and work on that.
AlexanderSavva
@AlexanderSavva
Jan 11 16:17
How do i disable email push notifications on gitter?
Ariel
@ArielLeslie
Jan 11 16:35
@AlexanderSavva The icon next to your avatar in the top-right
AlexanderSavva
@AlexanderSavva
Jan 11 16:36
Thank you!
Ariel
@ArielLeslie
Jan 11 16:37
You're welcome. FYI, if you are in multiple rooms, you'll need to specify yout settings for every room you're in.
AlexanderSavva
@AlexanderSavva
Jan 11 18:18
Dind't know that thank you fixed all the rooms :)
May Kittens Devour Your Soul
@diomed
Jan 11 18:19
hangman, any1?
S _ _ _ _ _
_ _ M _ _ _ H _ S M
Christopher McCormack
@cmccormack
Jan 11 18:25
P
@diomed :cat: !
just because we were sleeping doesn't mean you can
May Kittens Devour Your Soul
@diomed
Jan 11 18:28
S _ _ _ _ _
_ _ M _ _ P H _ S M
hi Chris. I thought no1's gonna show up
Christopher McCormack
@cmccormack
Jan 11 18:28
Friday's are notoriously quiet
May Kittens Devour Your Soul
@diomed
Jan 11 18:28
yup
everybody out partying
Christopher McCormack
@cmccormack
Jan 11 18:29
C is in Crayon
May Kittens Devour Your Soul
@diomed
Jan 11 18:29
:yum:
noC
Christopher McCormack
@cmccormack
Jan 11 18:29
yeah! party time
only 11:30 here so not time to party just yet
half hour :)
R
May Kittens Devour Your Soul
@diomed
Jan 11 18:30
one R for you
S _ _ _ _ _
_ _ M _ R P H _ S M
Christopher McCormack
@cmccormack
Jan 11 18:32
X as in Xenophobia
May Kittens Devour Your Soul
@diomed
Jan 11 18:32
S _ X _ _ _
_ _ M _ R P H _ S M
Christopher McCormack
@cmccormack
Jan 11 18:33
D as in Dimorphism
May Kittens Devour Your Soul
@diomed
Jan 11 18:33
:unamused:
Christopher McCormack
@cmccormack
Jan 11 18:33
L as in sexuaL
May Kittens Devour Your Soul
@diomed
Jan 11 18:33
if you know it, just say it :P
cmccormack @cmccormack waits for a ban
Christopher McCormack
@cmccormack
Jan 11 18:34
SEXUAL DIMORPHISM
Wanted to see if anyone else was playing :)
May Kittens Devour Your Soul
@diomed
Jan 11 18:34
:congratulations: @cmccormack :tada: :ballot_box_with_check:
Christopher McCormack
@cmccormack
Jan 11 18:34
i've been collecting those :congratulations: and putting them in my now empty brownie box
May Kittens Devour Your Soul
@diomed
Jan 11 18:34
:)
Christopher McCormack
@cmccormack
Jan 11 18:35
Why is it brownie and not browny?
stupid language
May Kittens Devour Your Soul
@diomed
Jan 11 18:35
really expressed in mandarin ducks
which are known to be delicious
or so they say...
Christopher McCormack
@cmccormack
Jan 11 18:35
it looks like someone turned down the saturation on one
Ariel
@ArielLeslie
Jan 11 18:36
@cmccormack Blame Sears
Christopher McCormack
@cmccormack
Jan 11 18:36
really? another thing to blame Sears for??
Ariel
@ArielLeslie
Jan 11 18:36
"The first known recipe for brownies was in the 1897 Sears, Roebuck Catalogue."
Christopher McCormack
@cmccormack
Jan 11 18:38
I see so it's an always pluralized name I guess
interesting read
everything is more complicated than we think
Ariel
@ArielLeslie
Jan 11 18:38
But I would guess that the reason it's 'ie' insteady of 'y' is because recipies, etc, always use the plural "brownies" so the singular is sort of an arbitrary choice based on the plural
Christopher McCormack
@cmccormack
Jan 11 18:39
it's only brownies when you cut it! I eat mine whole
Ariel
@ArielLeslie
Jan 11 18:39
I have an all edges brownie pan. 10/10. Do recommend. Would buy again.
Christopher McCormack
@cmccormack
Jan 11 18:40
is it that S-shaped thingy?
May Kittens Devour Your Soul
@diomed
Jan 11 18:40
pans are good for beating people
Tangled taught me that
Christopher McCormack
@cmccormack
Jan 11 18:40
man I love brownys now I may need to make some tonight
@ArielLeslie thanks for the trivia and pan suggestion, I'll get two so I can beat @diomed with one
May Kittens Devour Your Soul
@diomed
Jan 11 18:44
grrr :cat: is not to be beaten with pan
:cat: is noble animal. didn't deserve this
Ariel
@ArielLeslie
Jan 11 18:45
:cat: probably knocks the pan on the floor, ruining brownies for everyone.
pan The right way to make brownies
Kaz Baig
@kbaig
Jan 11 18:47
Now that's a tradeoff
Ariel
@ArielLeslie
Jan 11 18:49
bonus feature: they cook faster
Christopher McCormack
@cmccormack
Jan 11 18:52
brb running to bbab to get browny tray
AlexanderSavva
@AlexanderSavva
Jan 11 18:53
If you add mayo onto the brownie mix they bake in fifteen minutes
May Kittens Devour Your Soul
@diomed
Jan 11 18:54
what are you , what kind of savage?
@ArielLeslie how many private repos do you have on github?
ArielLeslie @ArielLeslie adds @AlexanderSavva to her list of confirmed human impersonators
May Kittens Devour Your Soul
@diomed
Jan 11 18:55
:smile_cat:
Ariel
@ArielLeslie
Jan 11 18:55
@diomed zero
May Kittens Devour Your Soul
@diomed
Jan 11 18:55
lol, what do you need pro for, then?
Christopher McCormack
@cmccormack
Jan 11 18:55
mayo is mainly oil and egg, which is used often in baking
I'm guessing the acidity helps it bake faster? no idea
Ariel
@ArielLeslie
Jan 11 18:55
@diomed I don't pay for pro. I have the student pack.
I mostly use my GitHub as a substitute for Google Drive that I can access at work.
:laughing:
May Kittens Devour Your Soul
@diomed
Jan 11 18:56
oh! cool cool cool
Ariel
@ArielLeslie
Jan 11 18:57
Which is why it contains pictures of my dogs.
Kaz Baig
@kbaig
Jan 11 18:57
@diomed private repos are free tho
May Kittens Devour Your Soul
@diomed
Jan 11 18:57
@ArielLeslie open source your avatar?
Ariel
@ArielLeslie
Jan 11 18:57
Yup :D
And my meme collection for replying to stupid work email chains
May Kittens Devour Your Soul
@diomed
Jan 11 18:58
wait, is that you on unsplash?
:eyes:
Ariel
@ArielLeslie
Jan 11 18:59
What's an unsplash?
May Kittens Devour Your Soul
@diomed
Jan 11 19:01
ummm...
whaaaaat?
@ArielLeslie I simply can't believe you have this :joy_cat:
like, do you even know where that gif comes from? :yum:
Ariel
@ArielLeslie
Jan 11 19:04
You have revealed that you know where that is from
May Kittens Devour Your Soul
@diomed
Jan 11 19:04
well, that was some oscar writing
Ariel
@ArielLeslie
Jan 11 19:04
:lemon:
May Kittens Devour Your Soul
@diomed
Jan 11 19:05
in about 2 mins word :lemon: was used approximately 80 times, or so
Ariel
@ArielLeslie
Jan 11 19:05
Hasn't it been like ten seconds since we looked at our lemon tree?
May Kittens Devour Your Soul
@diomed
Jan 11 19:05
hahaha
her wish to be lemon, tho... that's what got me.
that part really blew my mind
Ariel
@ArielLeslie
Jan 11 19:06
lemons
If anyone in here is under 18 or on public computer, you should not try to figure out what we're talking about.
May Kittens Devour Your Soul
@diomed
Jan 11 19:07
happy lemons obsessed couple
I was just showing this the other day to @Manish-Giri
of course - abridged version - coz we're only interested in good plots
Ariel
@ArielLeslie
Jan 11 19:11
Really the first couple minutes are the only parts worth watching
May Kittens Devour Your Soul
@diomed
Jan 11 19:12
I saw nothing else of that anyway
@ArielLeslie do you know one with the Bane plot?
Ariel
@ArielLeslie
Jan 11 19:13
Nope. Is it the same high-quality material?
May Kittens Devour Your Soul
@diomed
Jan 11 19:13
something like that - yeah
Ariel
@ArielLeslie
Jan 11 19:14
I'll do some searching when I'm not at work
May Kittens Devour Your Soul
@diomed
Jan 11 19:14
lol. ok
May Kittens Devour Your Soul
@diomed
Jan 11 19:33
hedgehog_1f994.png
May Kittens Devour Your Soul
@diomed
Jan 11 19:54
damn, I bet @cmccormack is cheating in hangman somehow.
After all he made that script :yum:
Christopher McCormack
@cmccormack
Jan 11 19:55
I don't, but that does give me an idea... :grinning:
AlexanderSavva
@AlexanderSavva
Jan 11 20:27
I was jk about the mayo lol
:}
Ariel
@ArielLeslie
Jan 11 20:28
@AlexanderSavva Nice try. You're on my list.
AlexanderSavva
@AlexanderSavva
Jan 11 20:29
Sexy List?
Hope soo..
May Kittens Devour Your Soul
@diomed
Jan 11 21:27
haha
Kyle Holm
@thekholm80
Jan 11 21:40
wait, is this tinder?
BuntyBru
@BuntyBru
Jan 11 21:47

wait, is this tinder?

hahaha

tundeiness
@tundeiness
Jan 11 21:56
hi guys!! thanks for the help so far! it has been awesome! but I just need a little push to achieve what i want. Now here is the project so far: https://codepen.io/highness/pen/ebNYVX?editors=0011 The default state should show both the editor and the previewer but so far I only end up with the editor at first. However If I don't click on the red button the previewer won't show up. Now I know it's the ternary condition in the render method but I have tweaked it show much so that I have ran out of ideas and so I need help on how to tweak it appropriately to get the result I want. looking forward to the help. Thanks.
AlexanderSavva
@AlexanderSavva
Jan 11 23:59
@tundeiness I wish I could help you but i am not at that stage yet unfortunatetly :(