These are chat archives for FreeCodeCamp/Help

11th
Nov 2018
glitz20
@glitz20
Nov 11 2018 01:22
Hi guys
I have this in react
 <div>
                <div className="descriptionheader">
                    <p className="destitle">{this.state.title}</p>
                    <p>{this.state.question}</p>
                </div>

            </div>
and this in css
.destitle{
    font-size: 10em !important;

}
but this is not changing the fontsize, anyone knows why?
why does
let ohRegex = /oh{3,6}\sno/i; // Change this line
work
but let ohRegex = /oh{3,6}\sno/ig; // Change this line
doesnt
why does the global break it
Eric Miller
@ericmiller777
Nov 11 2018 02:06
wow regex gets hard
I understand you can use it to do so much, but at the same time for me, it kills readability
Aditya
@ezioda004
Nov 11 2018 02:08
@ericmiller777 It doesnt work because /g flag in .test() works a bit differently. On subsequent test it starts from the lastIndex matched.
Eric Miller
@ericmiller777
Nov 11 2018 02:09
weird okay
@ezioda004 ty
Niraj Nandish
@Nirajn2311
Nov 11 2018 02:12
@ezioda004 but his code should work, meaning the test should be changed
Eric Miller
@ericmiller777
Nov 11 2018 02:15
@Nirajn2311 at the same time using /g for no reason is a bad practice? maybe?
or even just include "for testing purposes do not use /g"
Aditya
@ezioda004
Nov 11 2018 02:18
@Nirajn2311 Why?
Niraj Nandish
@Nirajn2311
Nov 11 2018 02:22
@ericmiller777 good point, didnt think of it “g” like that
Eric Miller
@ericmiller777
Nov 11 2018 02:29
whatever i said, im probably wrong >.>;
Aditya
@ezioda004
Nov 11 2018 02:33
@ericmiller777 /g flag has its use with .test(), so we cant outright say "dont use /g". It just it doesnt work in these cases because you need to reset the .test() index matched.
@Nirajn2311 The tests are fine:
var regex = /b/g;
console.log(regex.test("abc")); //true
console.log(regex.test("bc")); //false
Eric Miller
@ericmiller777
Nov 11 2018 02:37
I just looked up capture groups on google to try and figure out that one, and the example smade me sick :(
dyon gerwen
@fullstackinprogress_gitlab
Nov 11 2018 03:06

can someone see on this error

TokenError: Bad Request
    at Strategy.OAuth2Strategy.parseErrorResponse (C:\oauth-playlist-390ca36d9290600d55c8fee4b708414e7a58b05e\node_modules\passport-oauth2\lib\strategy.js:329:12)
    at Strategy.OAuth2Strategy._createOAuthError (C:\oauth-playlist-390ca36d9290600d55c8fee4b708414e7a58b05e\node_modules\passport-oauth2\lib\strategy.js:376:16)
    at C:\oauth-playlist-390ca36d9290600d55c8fee4b708414e7a58b05e\node_modules\passport-oauth2\lib\strategy.js:166:45
    at C:\oauth-playlist-390ca36d9290600d55c8fee4b708414e7a58b05e\node_modules\oauth\lib\oauth2.js:191:18
    at passBackControl (C:\oauth-playlist-390ca36d9290600d55c8fee4b708414e7a58b05e\node_modules\oauth\lib\oauth2.js:132:9)
    at IncomingMessage.<anonymous> (C:\oauth-playlist-390ca36d9290600d55c8fee4b708414e7a58b05e\node_modules\oauth\lib\oauth2.js:157:7)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1094:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

from this code:
https://github.com/iamshaunjp/oauth-playlist/tree/390ca36d9290600d55c8fee4b708414e7a58b05e
what is going wrong

Karma Drukpa
@coderkarma
Nov 11 2018 03:54
anyone who can explain me why we do this prototypes in react?
Contact.prototypes = {
 contact:PropTypes.object.isRequired,
};
something like that.
why do we need to do prototypes?
Aditya
@ezioda004
Nov 11 2018 04:04
@coderkarma Its .propTypes not .prototypes, its a static type checker.
Karma Drukpa
@coderkarma
Nov 11 2018 04:40
@ezioda004 I was following one udemy video he has mentioned prototypes for reason. I am reading some docs now. I found some it says proptypes are used for type checking . But you are right about type checker. Thanks. These stuff are new to me.
I am trying to digest it.
Aditya
@ezioda004
Nov 11 2018 04:54
@coderkarma Its probably a typo - you dont really use .prototype object directly in React.
Bjorn van de Peut
@bjorno43
Nov 11 2018 04:56
:wave:
Finally done it. Finally added the option for my users add / remove friends
Worst thing I ever had to program
Btw.. Dutch chatters are the worst. Chatsystem is online for 2 weeks now. There's a total of about 200 registrations and about 35 daily active users. They're usually only active for a few hours a day. And they seriously already sent about 100.000 messages through the chat..
Karma Drukpa
@coderkarma
Nov 11 2018 05:07
@bjorno43 :wave:
Bjorn van de Peut
@bjorno43
Nov 11 2018 05:08
Yo karma
Karma Drukpa
@coderkarma
Nov 11 2018 05:08
how are you?
How have you been?
Bjorn van de Peut
@bjorno43
Nov 11 2018 05:10
Exhausted, but good. Been working on my chatsysteem a lot lately. How are you?
Karma Drukpa
@coderkarma
Nov 11 2018 05:34
I am doing alright, learning React currently but and JavaScript is always there.
Bjorn van de Peut
@bjorno43
Nov 11 2018 05:35
Ah cool
Karma Drukpa
@coderkarma
Nov 11 2018 05:36
I haven't done any cool projects though still feels shaky when it comes to manipulating JS skill in the web application.
Self teaching everyday and attending one free programming class but I will doing this program from January for 12 weeks.
@bjorno43 what is your chatting app called?
Bjorn van de Peut
@bjorno43
Nov 11 2018 05:40
I guess at some point you just gotta say: This is what I want to create and just start developing it. At some point you just have to push yourself out of your comfort zone and let go of handholding guides and books etc. Only then you'll know how much you've actually learning and if you're ready
It's called Icecub Chat (https://www.icecub.nl) But it's in Dutch
Bjorn van de Peut
@bjorno43
Nov 11 2018 05:48
Anyway, gotta go. Cya :wave:
Karma Drukpa
@coderkarma
Nov 11 2018 05:49
@bjorno43 That is true. I am trying my best to get better and develop something so I could show to people or recruiter and get my foot in the door but it is just taking long time and self-teaching is hard. But yeah for sure at some point I have to work on my passion projects which would keep me going to be better developer. Thank you. It's always nice to hear from experience folks.
goodnight
Darren
@DarrenfJ
Nov 11 2018 08:32
evening fCC.. hope the coding is going well...
Anand Potukuchi
@anandpotukchi
Nov 11 2018 09:01
@DarrenfJ nope. not s intended
slower
much slower
Aditya
@ezioda004
Nov 11 2018 09:36
Machine Learning is boring >.>
Niraj Nandish
@Nirajn2311
Nov 11 2018 12:49
@ezioda004 but technically his code was correct, and also is there a problem if we inlcude the g flag in most of the regex just like that
Aditya
@ezioda004
Nov 11 2018 12:52
@Nirajn2311 No, his code wasnt correct. Thats the expected behavior with .test(). Most regex doesnt use that method so its fine.
Niraj Nandish
@Nirajn2311
Nov 11 2018 12:55
When i did in regexr, it worked with or without the global flag
Aditya
@ezioda004
Nov 11 2018 12:56
Yeah, thats what I'm saying. The challenge wants the user to use that method specifically so we're simply following that.
That code doesnt work in any runtime either, try it in console.
BrendaMoragwa
@BrendaMoragwa
Nov 11 2018 13:10
I have a problem in yii2 with my date picker and cannot get all data on the second page. is it a problem with pagination or get request?
Luc Martin
@fmartin5
Nov 11 2018 13:18
@BrendaMoragwa try to log the data to check it is there?
BrendaMoragwa
@BrendaMoragwa
Nov 11 2018 13:30
it is there but cannot return all data. lets say there are 40 records it can display lets say 20 records on the first page but in the next page it can do like 10 records only.
Luc Martin
@fmartin5
Nov 11 2018 13:35
@BrendaMoragwa Is there any error in the console? Does some code interact with the data before rendering?
BrendaMoragwa
@BrendaMoragwa
Nov 11 2018 13:39
no
I dont k ow if the issue is with pagination
i dont know
if IO search data its working but the problem is displaying all data from 2nd page
Luc Martin
@fmartin5
Nov 11 2018 13:43
That's very weird it displays partial data on second page
but yeahprobably pagination :/ try to set a debugger breakpoint and track down the rendering of the data maybe
BrendaMoragwa
@BrendaMoragwa
Nov 11 2018 14:19
alright thanks @fmartin5
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:06
@ezioda004 are you there, JS god, it's me, :cat:
Aditya
@ezioda004
Nov 11 2018 15:33
@diomed Maybe
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:34
@ezioda004 -I have some problems with displaying stuff
              <pre><code class="language-javascript">

<template>
  <p>My name is {{name}}</p>
  <button @click="changeName()">Change my name!</button>
</template>

<script>
export default {
  data() {
    return {
      name: 'Flavio'
    }
  },
  methods: {
    changeName: function() {
      this.name = 'Flavius'
    }
  }
}
</script>
              </code></pre>
apparently, whole template section doesn't display in code at all
Aditya
@ezioda004
Nov 11 2018 15:35
Is this vue?
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:35
example code IS vue, but code itself is not in vue
I mean html page doesnt use vue @ all here
Aditya
@ezioda004
Nov 11 2018 15:39
Sorry, I'm not sure whats wrong
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:41
F R _ _ _ _
_ _ T
F _ _ _ _ R _ _
@ezioda004 play
Niraj Nandish
@Nirajn2311
Nov 11 2018 15:44
@diomed S
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:44
no S
Niraj Nandish
@Nirajn2311
Nov 11 2018 15:44
O
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:44
F R _ _ _ _
_ O T
F _ _ _ _ R _ _
Niraj Nandish
@Nirajn2311
Nov 11 2018 15:44
H
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:45
nope
Niraj Nandish
@Nirajn2311
Nov 11 2018 15:45
T
Aditya
@ezioda004
Nov 11 2018 15:45
E
Ene Catalin
@EneCatalin
Nov 11 2018 15:45
N
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:45
10?
T is already there?
Niraj Nandish
@Nirajn2311
Nov 11 2018 15:45
10 10 10
G
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:46
F R E _ _ _
G O T
F _ N G E R E _
Ene Catalin
@EneCatalin
Nov 11 2018 15:46
i
I got it ?
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:47
F R E _ _ _
G O T
F I N G E R E _
Ene Catalin
@EneCatalin
Nov 11 2018 15:47
Freddy got fingered
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:47
bravo, ostrich! :congratulations:
:ballot_box_with_check:
haha :smile_cat:
Aditya
@ezioda004
Nov 11 2018 15:48
I was thinking French Got Fingers
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:48
category was: Movie name
Aditya
@ezioda004
Nov 11 2018 15:50
It could be a movie
About potatoes
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:50
you mean fries
Irish have potatoes. French have fries
Aditya
@ezioda004
Nov 11 2018 15:51
Arent fries made from potatoes?
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:52
yes, they source from that fruit
Aditya
@ezioda004
Nov 11 2018 15:54
TIL
May Kittens Devour Your Soul
@diomed
Nov 11 2018 15:57
also, I'm so glad World War I is finally over
Ene Catalin
@EneCatalin
Nov 11 2018 16:14
tbh WW2 had much better gameplay
Binyamin Aron Green
@b3u
Nov 11 2018 16:33
Can anyone give me another perspective on a UI I'm designing?
@cmccormack Can I ask you a quick question?
Christopher McCormack
@cmccormack
Nov 11 2018 16:37
I'm about to go to breakfast but you can ask
Binyamin Aron Green
@b3u
Nov 11 2018 16:38
Which shop looks better?
A or B, or a C with a title
Thanks
Philip Durbin
@pdurbin
Nov 11 2018 17:04
I like B the best.
Binyamin Aron Green
@b3u
Nov 11 2018 17:05
Thanks.
@pdurbin Any particular reason?
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:09
:bee:
Binyamin Aron Green
@b3u
Nov 11 2018 17:09
: P
@diomed Same Question
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:10
I already gave you the answer
Binyamin Aron Green
@b3u
Nov 11 2018 17:10
Sorry, any particular reason i meant.
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:11
simply, coz it has header image looks better than A and C
Binyamin Aron Green
@b3u
Nov 11 2018 17:13
I'll show you the how it looks in prod in a sec
Philip Durbin
@pdurbin
Nov 11 2018 17:13
yeah, I like the header
Thats the production version
Binyamin Aron Green
@b3u
Nov 11 2018 17:24
: |
argh. okay, I'll add that to my list.
But see what the shop page looks like as b?
On chrome, since that's where I designed it.
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:27
footer is in the middle of shop page on firefox
I have no intention of opening another browser. don't have chrome.
Binyamin Aron Green
@b3u
Nov 11 2018 17:28
Yep, i'm working on that.
Okay
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:28
what's that page for code writting on image?
I always forget. something on c..
Binyamin Aron Green
@b3u
Nov 11 2018 17:29
huh?
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:30
not everything is about you. something is about me
Binyamin Aron Green
@b3u
Nov 11 2018 17:31
I'm a bit confused. Are you talking about your question, or the website?
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:31
ah, it's Carbon https://carbon.now.sh
Binyamin Aron Green
@b3u
Nov 11 2018 17:32
Code repo is on bitbucket
Niraj Nandish
@Nirajn2311
Nov 11 2018 17:33
@diomed you can do the same thing in vscode using polacode
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:33
this vexes me
any ideas?
c:\webdev\xtreme>npm run dev
npm ERR! missing script: dev
Binyamin Aron Green
@b3u
Nov 11 2018 17:35
What does it do?
Ene Catalin
@EneCatalin
Nov 11 2018 17:37
you don't have that script there
so check the folder
maybe you forgot to create the project
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:39
didnt
what a rubbish
diomed @diomed deletes script(app) whatever
amarg26
@amarg26
Nov 11 2018 17:43
why freecodecamp does not shows output after correct program instead it shoes // running tests
// tests completed ?
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:44
is tests are completed your code is correct
amarg26
@amarg26
Nov 11 2018 17:45
but it was showing output earlier which was good.
why they remove this good feature ?
May Kittens Devour Your Soul
@diomed
Nov 11 2018 17:47
beats me
Niraj Nandish
@Nirajn2311
Nov 11 2018 17:53
@amarg26 the output for some of them appears if there is console.log in the challenge and before you click the button to run the tests
@diomed you got to know the answer for the vue problem you had earlier
Tommy Bogdanovich
@Tommyisr
Nov 11 2018 18:03
Hi guys, I have a question
Binyamin Aron Green
@b3u
Nov 11 2018 18:03
Shoot
Tommy Bogdanovich
@Tommyisr
Nov 11 2018 18:04
Is it possible to return separated colors in rgb from elements ?
Lets say I want to check only red channel
Binyamin Aron Green
@b3u
Nov 11 2018 18:05
Well, if you have the hex code, the red part is the first two characters. The, you have thehex value for the red channel
Tommy Bogdanovich
@Tommyisr
Nov 11 2018 18:08
Hm, I understand..
Thanks, so I'll try it with hex
Binyamin Aron Green
@b3u
Nov 11 2018 18:10
Do you want it in rgb?
Tommy Bogdanovich
@Tommyisr
Nov 11 2018 18:13
It doesn't matter, I thought in rgb it's easier
Binyamin Aron Green
@b3u
Nov 11 2018 18:14
Well, you can convert. And rgb is just (red, green, blue) channels.
Tommy Bogdanovich
@Tommyisr
Nov 11 2018 18:17
Yeah, I'll just use hex in my code
Binyamin Aron Green
@b3u
Nov 11 2018 18:17
Okay.
May Kittens Devour Your Soul
@diomed
Nov 11 2018 18:49
@Nirajn2311 what is the answer?
May Kittens Devour Your Soul
@diomed
Nov 11 2018 21:57
:arrow_forward: do not click this link
I am amazed why you did not listen. even tho I told you
mstellaluna
@mstellaluna
Nov 11 2018 22:53
@diomed what is that link?
Karma Drukpa
@coderkarma
Nov 11 2018 23:21
@cmccormack :wave:
Christopher McCormack
@cmccormack
Nov 11 2018 23:21
@coderkarma hi
Karma Drukpa
@coderkarma
Nov 11 2018 23:24
@cmccormack I am doing udemy course on React but I don't know why this doesn't seem working even following along the instructor's code. Could you help me if you can, when I am click the button it suppose to delete but it says deleteClickHandler is not a function.
I will share you screenshot
here's the screenshot
Christopher McCormack
@cmccormack
Nov 11 2018 23:25
are you getting the method from a parent as props?
Lia-Sue-Kim
@Lia-Sue-Kim
Nov 11 2018 23:25
Why programming in the begining is just boring
Philip Durbin
@pdurbin
Nov 11 2018 23:25
boring? :)
Lia-Sue-Kim
@Lia-Sue-Kim
Nov 11 2018 23:26
I mean you don't do anything that moves
or says hi to you or something
Karma Drukpa
@coderkarma
Nov 11 2018 23:26
Screen Shot 2018-11-11 at 2.25.12 PM.png
Christopher McCormack
@cmccormack
Nov 11 2018 23:28
@coderkarma spelling error
Karma Drukpa
@coderkarma
Nov 11 2018 23:28
where?
Christopher McCormack
@cmccormack
Nov 11 2018 23:28
in your child Contact attributes
you have Hander not Handler
Karma Drukpa
@coderkarma
Nov 11 2018 23:29
ahahhaha thank you
Lia-Sue-Kim
@Lia-Sue-Kim
Nov 11 2018 23:30
i love the view of your editor
Karma Drukpa
@coderkarma
Nov 11 2018 23:30
I was like WTH the function is there why that it is not working.
@Lia-Sue-Kim It is cool!! thanks
Lia-Sue-Kim
@Lia-Sue-Kim
Nov 11 2018 23:31
which editor do you use
Karma Drukpa
@coderkarma
Nov 11 2018 23:31
@cmccormack honestly i was scratching my head and staring the console.
vscode
Christopher McCormack
@cmccormack
Nov 11 2018 23:32
the rest looks good, I only saw that after confirming I didn't see any logic issues
Lia-Sue-Kim
@Lia-Sue-Kim
Nov 11 2018 23:38
I have trouble choosing a profession. Like sometimes i wanna be a teacher sometimes a scientist and sometimes programmer or CS scientist lol
Karma Drukpa
@coderkarma
Nov 11 2018 23:39
@cmccormack Thank you. What materials should I read to get good understanding of React, this jsx and state making me confuse.
@Lia-Sue-Kim Be a teacher and teach us lol
Understanding what JSX is doing really demystifies everything
Philip Durbin
@pdurbin
Nov 11 2018 23:41
Scientists are awesome. You should be a scientist.
Christopher McCormack
@cmccormack
Nov 11 2018 23:42
@coderkarma after those reading the rest of the react docs is really helpful, they try to do a good job teaching it in their own docs and I really like it
Lia-Sue-Kim
@Lia-Sue-Kim
Nov 11 2018 23:42
@coderkarma If I become a CS scientist I will change the way programming taught lol. Like 5 lecture 1 exercise
I mean mini project
@pdurbin Yes science changes your mind
you just don't see things just like objects around you but understand how things work their structure etc.
Philip Durbin
@pdurbin
Nov 11 2018 23:46
I just reread "A Short History of Nearly Everything" by Bill Bryson. It's basically a history of science. Great stuff.
Karma Drukpa
@coderkarma
Nov 11 2018 23:46
@cmccormack Yeah I am reading those docs. Thanks.
@Lia-Sue-Kim lol that's sounds interesting...
Lia-Sue-Kim
@Lia-Sue-Kim
Nov 11 2018 23:48
@pdurbin is it the name of a book?
Philip Durbin
@pdurbin
Nov 11 2018 23:48
yep