These are chat archives for FreeCodeCamp/HelpFrontEnd

3rd
Nov 2017
Morchid Chellali
@Morched23MJ
Nov 03 2017 00:05
#scoreStrict {
  margin: 40px auto;
}

#score {
  width: 100px;
  height: 50px;
  background: #55BAE5;
  border-radius: 10px;
  border: solid #2F687F 5px;
}

#strict {
  width: 30px;
  height: 30px;
  background: red;
}
I added the margin to the outer div scoreStrict, containing the inner divs score and strict, but it doesn't go on the center.
Here is the pen: https://codepen.io/Morched23MJ/pen/zEYxGo
korzo
@korzo
Nov 03 2017 00:08
@Morched23MJ
You want it in the middle of the 4 buttons?
put it inside #playGround
Morchid Chellali
@Morched23MJ
Nov 03 2017 00:09
Can't I just modify the #scoreStrict div so it goes in the middle? I don't want it in another div, every div has its own style.
@korzo
korzo
@korzo
Nov 03 2017 00:12
@Morched23MJ You will not have control over it's position then
Morchid Chellali
@Morched23MJ
Nov 03 2017 00:13
I don't want it there, because the border radius of the #playGround div will not be like I want it for the buttons of the game
Put it inside, and you'll see what I mean by that, @korzo
Can't I center the #scoreStrict div :l only?
Morchid Chellali
@Morched23MJ
Nov 03 2017 00:20
@korzo, I see what you meant earlier then. I want them in the center, but under the board, not in the middle of the board, sorry for this misunderstanding. :l
korzo
@korzo
Nov 03 2017 00:22
@Morched23MJ margin auto works only on elements with width set
Morchid Chellali
@Morched23MJ
Nov 03 2017 00:23
It worked, thanks @korzo
I want the cols centered each, in its area, now it's near each other.. :l @korzo
korzo
@korzo
Nov 03 2017 00:29
@Morched23MJ #score centered to yellow and #strict to blue?
Morchid Chellali
@Morched23MJ
Nov 03 2017 00:30
Kinda, yeah
But under it, not in the middle of it
korzo
@korzo
Nov 03 2017 00:32
@Morched23MJ wrap both #score and #strict in div with width 125px
Then use margin: auto
Morchid Chellali
@Morched23MJ
Nov 03 2017 00:43
@korzo, thank you. And thank you for sharing that book. :)
CamperBot
@camperbot
Nov 03 2017 00:43
morched23mj sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 724 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Nov 03 2017 00:47
@Morched23MJ glad to help.
Daniel
@DanJP2016
Nov 03 2017 00:48
Finished with the twitch viewer project, tried to come up with something awesome but failed. feedback welcome.
https://codepen.io/bones211/full/jGexdK/
Morchid Chellali
@Morched23MJ
Nov 03 2017 00:50
@DanJP2016, that is already very nice. Good job!
Daniel
@DanJP2016
Nov 03 2017 00:51
@Morched23MJ thank you.
CamperBot
@camperbot
Nov 03 2017 00:51
danjp2016 sends brownie points to @morched23mj :sparkles: :thumbsup: :sparkles:
:cookie: 316 | @morched23mj |http://www.freecodecamp.com/morched23mj
Morchid Chellali
@Morched23MJ
Nov 03 2017 01:00
https://codepen.io/Morched23MJ/full/zEYxGo/
Is the interface kind of nice? to start the javascript coding. @korzo
korzo
@korzo
Nov 03 2017 01:06
@Morched23MJ For me buttons feel too far from each other and the board.
Morchid Chellali
@Morched23MJ
Nov 03 2017 01:06
Which buttons? @korzo
korzo
@korzo
Nov 03 2017 01:09
start and strict. It's too much space between them and also between board.
But I would say don't waste time with this now. You can polish it, when it's done @Morched23MJ
Kaz Baig
@kbaig
Nov 03 2017 01:09
@Morched23MJ you prob already know this but the yellow and blue buttons don't light up when you click on em
Morchid Chellali
@Morched23MJ
Nov 03 2017 01:11
Yeah, I'm adding that :active now, @kbaig.
@korzo, yeah, you're right, I'll start with javascript, then I'll return to that later.
Thank you both. :smile:
CamperBot
@camperbot
Nov 03 2017 01:11
morched23mj sends brownie points to @kbaig and @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 401 | @kbaig |http://www.freecodecamp.com/kbaig
api offline
korzo
@korzo
Nov 03 2017 01:12
@Morched23MJ just separate UI and logic in your code. Than you can easy refactor UI
Morchid Chellali
@Morched23MJ
Nov 03 2017 01:12
Yup
Ruben Abraham
@BuBBRBbr1
Nov 03 2017 01:16
I am having trouble with CSS FCC. I was wondering if someone could help me.
Morchid Chellali
@Morched23MJ
Nov 03 2017 01:17
Explain what's going on there, and if possible give a link to your pen, and someone might help you.
CamperBot
@camperbot
Nov 03 2017 01:17

freeCodeCamp Wiki:

:point_right: The freeCodeCamp wiki can be found on our forum.
Please follow the link and search there.
Ruben Abraham
@BuBBRBbr1
Nov 03 2017 01:18
On css to style an element. I have tried to get the h2 element red but it is not working on the Cat Photo App.
Morchid Chellali
@Morched23MJ
Nov 03 2017 01:19
What's the style you gave it to h2?
Tom
@moT01
Nov 03 2017 01:19
@BuBBRBbr1 show us how you tried
Ruben Abraham
@BuBBRBbr1
Nov 03 2017 01:19
<style>
h2 .red-text { color: red;
<style>
Morchid Chellali
@Morched23MJ
Nov 03 2017 01:20
h2 .red-text {
color: red;
}
Like this?
Ruben Abraham
@BuBBRBbr1
Nov 03 2017 01:20
<h2 class ="red-text">
Daniel
@DanJP2016
Nov 03 2017 01:21
your missing the closing bracket
{}
Ruben Abraham
@BuBBRBbr1
Nov 03 2017 01:22
Still not working
Long Nguyen
@longnt80
Nov 03 2017 01:22
it's better to have a codepen
Morchid Chellali
@Morched23MJ
Nov 03 2017 01:22
h2.red-text instead of h2 .red-text
Long Nguyen
@longnt80
Nov 03 2017 01:23
this is probably just some typo
Daniel
@DanJP2016
Nov 03 2017 01:24
<style>
     h2 {
          color: red;
}
</style>
should be somethign like that, your missing the closing bracket is all
sorry for the weird formatting there, got a broken finger
Ruben Abraham
@BuBBRBbr1
Nov 03 2017 01:26
thanks for the help
Morchid Chellali
@Morched23MJ
Nov 03 2017 01:26
It worked?
Ruben Abraham
@BuBBRBbr1
Nov 03 2017 01:27
It is saying now that the stylesheet should declare a red text and have it's color set to red
João Porfírio
@pixelparker
Nov 03 2017 01:29
any react "experts" ?
Daniel
@DanJP2016
Nov 03 2017 01:29
<h2 style='color:red'>CatPhotoApp</h2>

<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>
you can also write it like this and it will still pass
Tom
@moT01
Nov 03 2017 01:30
@joaotporfirio
shahrukh170
@shahrukh170
Nov 03 2017 04:38
i am about to join a full stack development course offered by the govt , any idea what is full stack development , what can be included in it ?
gaitchs gangmei
@gaitchs
Nov 03 2017 05:22
Why can't I access gutter help channel from freecodecamp
Can't pass the java card game
Markus Kiili
@Masd925
Nov 03 2017 06:16
@shahrukh170 Full stack means that you develop code for backend and frontend both. Backend means server code that possibly also uses a database. Front end code would mean a web page that might communicate with that server.
There are many stacks that mean what different back and front languages you use.
Ryan Stegmann
@rstegg
Nov 03 2017 08:09
hey guys, does anyone know where to find jr developer positions? finding trouble with where to look
Carlos Nah
@RA9
Nov 03 2017 08:24
hey @Ryan check jrdeveloper.com
Ryan Stegmann
@rstegg
Nov 03 2017 08:27
is that site correct?
kutagullasukumar
@kutagullasukumar
Nov 03 2017 09:37
hey @Ryan check jrdeveloper.com , the domain is down now
Jake
@NeelDVirus
Nov 03 2017 10:55
what is the actual value of pixels for normal device-pixel ratio (where device-pixel-ratio = 1)?? somewhere i see the use of 72px, and somewhere 96. which one should be taken into account and be relied upon it?
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 10:57
72px?
72px its 1.9cm
Jake
@NeelDVirus
Nov 03 2017 11:09
@tiagocorreiaalmeida yeah there "72" is taken as the value of DPI in normal device-pixel-ratio screen. but somewhere the value "96" is taken as the value of DPI. For image specific context which value of DPI or PPI should i take into acount
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 11:13
never used it with values if you can simply check for the ratio if 1 or min of 2 cause there's even a 3
and you can check aswell for th screne width
cause mobiles have a ratio of 2 but you dotn wanna to set a big image on a mobile(just an example)
Ryan Stegmann
@rstegg
Nov 03 2017 11:50
hmm, how do i know if im a jr developer, even though i have a small amount of professional experience?(<1 year professional, >6 years total)
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 11:54
@alpox around?
function comp(array1, array2){
  if(array1 && array1.length === 0 && array2 && array2.length === 0) return true;
  if(array1.length === 0 || array2.length === 0) return false;
  array1 = array1.sort((a,b)=>a-b);
  array2 = array2.sort((a,b)=>a-b);
  return array1.filter((ele,ind)=>ele*ele === array2[ind]).length === array2.length;
}
is there a way to make this more simple?
dont like the way of what I ended up with :D
still might be a good solution not sure
@rstegg
Junior and Senior terminology is usually used when determining salary levels and responsibilities at a place of employment. There is no standards body or anything setting these criteria - it's determined by individual workplaces. Also, knowledge or technical skill usually isn't what primarily determines seniority, it's workplace experience and track record. 

A junior developer is usually someone with very little actual workplace experience, that will need the support of a more senior develor using the coming years. They might actually have lots of knowledge about their field (studying 5+ years of computer science and even lots of development experience prior to this, but lacks experience in actually building a system along real colleagues with real salaries paid from a real budget that will be used by real customers.

A senior developer is expected to take care of her peers to a much greater degree than they take care of her. They are expected to take charge of the reality of the team, will not need to be told what to do.

Junior and Senior terminology is usually used when determining salary levels and responsibilities at a place of employment. There is no standards body or anything setting these criteria - it's determined by individual workplaces. Also, knowledge or technical skill usually isn't what primarily determines seniority, it's workplace experience and track record.

A junior developer is usually someone with very little actual workplace experience, that will need the support of a more senior develor using the coming years. They might actually have lots of knowledge about their field (studying 5+ years of computer science and even lots of development experience prior to this, but lacks experience in actually building a system along real colleagues with real salaries paid from a real budget that will be used by real customers.

A senior developer is expected to take care of her peers to a much greater degree than they take care of her. They are expected to take charge of the reality of the team, will not need to be told what to do.

copied from quora
Lee
@LeeConnelly12
Nov 03 2017 12:24
Hi everyone, I'm trying to write a function that wraps an elements text in tags in a certain color.
html:
<h1>test header</h1>

js:
const wrapTags = (ele, tags, color) => {
    $(ele).text(`
        <${tags}>
            ${$(ele).text()}
        </${tags}>
    `);
}

wrapTags($('#myHeader'), 'h1', 'red') // returns "<h1>test header</h1>"

// How would i set the color of the tags i'm appending?
Stephen James
@sjames1958gm
Nov 03 2017 12:38
@LeeConnelly12 You can set the style property on $(ele)
@LeeConnelly12 Or rather the css property
$(ele ).css( "color" , "red");
Lee
@LeeConnelly12
Nov 03 2017 12:58
@sjames1958gm Thanks
CamperBot
@camperbot
Nov 03 2017 12:58
leeconnelly12 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8659 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Nov 03 2017 12:58
@LeeConnelly12 :+1:
Nikola
@n1x1
Nov 03 2017 13:11
I'm doing a tribute site ... when I start coding and give a body element width of 600px and center text it's centered on left...why?
Tom
@moT01
Nov 03 2017 13:12
i think center text will center whatever is in the body, not the body itself
Nikola
@n1x1
Nov 03 2017 13:14
@moT01 but when i give it a background-color it colors the whole preview part of codepen
...so i'm thinking it should have a white part/space on left or right when I give it a smaller width, right?
Tom
@moT01
Nov 03 2017 13:15
could try setting a max-width
wanna share the pen? is that what you're going for?
i think the body might behave a little different than other elements
Tom
@moT01
Nov 03 2017 13:21
you can play with the background property if you want the color split like that
or you might need to add elements in the body and play with those
Nikola
@n1x1
Nov 03 2017 13:27
@moT01 yeah ...
Nikola
@n1x1
Nov 03 2017 13:37

why is background-color painting all of my workspace and not just body element?

https://codepen.io/n1x1/pen/LOGqXa

Kaz Baig
@kbaig
Nov 03 2017 13:43
@n1x1 are you referring to how it's also painting the body's margin?
That's just how body works
You probably want to wrap your content around a container div if you want to set a background for a part of the page
Nikola
@n1x1
Nov 03 2017 13:46
@kbaig you are probably right, thanks for advice
CamperBot
@camperbot
Nov 03 2017 13:46
n1x1 sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 402 | @kbaig |http://www.freecodecamp.com/kbaig
Kaz Baig
@kbaig
Nov 03 2017 13:47
@n1x1 No problem. I think that even if you find the body behave like a regular block element, you probably shouldn't make it
linkin-park
@linkin-park
Nov 03 2017 13:47
which is better to go "_"
redux mobx .....
Kaz Baig
@kbaig
Nov 03 2017 13:48
haven't tried others but redux is pretty killer
what do you want to use it with?
linkin-park
@linkin-park
Nov 03 2017 13:49
react
i;m looking at vuejs too its really a simpler :)
Kaz Baig
@kbaig
Nov 03 2017 13:55
Well React Redux is super well supported
Since Dan Abramov works at Facebook
And it works like a charm
Tony Brackins
@mrbrackins
Nov 03 2017 13:57
I’m trying to stick with React because you can make mobilel apps with it @linkin-park
Redux is kicking my ass @kbaig
lol
Kaz Baig
@kbaig
Nov 03 2017 13:58
@mrbrackins Which part are you struggling with
Tony Brackins
@mrbrackins
Nov 03 2017 14:08
Well, right now I’m trying to fetch some data via action creator, I’ve got redux thunk in there. Then brought it into map state to props
Then I have a setState to this.props.variable
but once it loads it doesn’t reload state
I believe that’s what’s going on
I can only speak that much about it because I was trying to figure it out all yesterday @kbaig
Kaz Baig
@kbaig
Nov 03 2017 14:10
@mrbrackins You don't want to be using React state once you have started using Redux
Your Redux store is the only source of state
Instead of using this.setState, you want to pass down an action as a prop using mapDispatchtoProps in order to modify the redux store
Tony Brackins
@mrbrackins
Nov 03 2017 14:15
hmmm. ok, I have an action in mapDispatchToProps that is fetching the data, it’s what’s kicking off the async data receiving by url
so then, what variable would I use to map over?
I wonder if I could share my code w/ u
Kaz Baig
@kbaig
Nov 03 2017 14:16
You can
I'm willing to take a look
Tony Brackins
@mrbrackins
Nov 03 2017 14:16
awesome
Kaz Baig
@kbaig
Nov 03 2017 14:16
My whole team at work is meeting with the CEO right now but I'm too new to join :'(
Tony Brackins
@mrbrackins
Nov 03 2017 14:16
let me upload
Kaz Baig
@kbaig
Nov 03 2017 14:16
Can you stick it in a pen, would that be convenient
Tony Brackins
@mrbrackins
Nov 03 2017 14:16
ah man
hmmm if I stick it in a pen it won’t work anymore
I’m using React Native
but it’s difficult for me to put React in pens for some reason. I think because I don’t understand the whole redux thing fully
abraham anak agung
@padunk
Nov 03 2017 14:18
Redux is kicking my ass too :)
Tom
@moT01
Nov 03 2017 14:19
i concur
so on componentWillMount, using this: this.props.envelopesFetch();
right!? @padunk @moT01
lol
Kaz Baig
@kbaig
Nov 03 2017 14:24
@mrbrackins I'm saying you shouldn't have this.state and this.setstate in your code if you're using redux
Tom
@moT01
Nov 03 2017 14:24
im doing exactly what you're doing right now
Kaz Baig
@kbaig
Nov 03 2017 14:24
The whole point is to take that out of the components
Tony Brackins
@mrbrackins
Nov 03 2017 14:24
Yep. I get that. Wondering how I can pull the state from Redux instead
Kaz Baig
@kbaig
Nov 03 2017 14:25
Maybe in your Redux store, you have an attribute called envelopeList
Tony Brackins
@mrbrackins
Nov 03 2017 14:25
I know w/ an action, but something I’m doing isn’t making it happen
Kaz Baig
@kbaig
Nov 03 2017 14:26
and then pass envelopeList down from the root component to EnvelopeList component
Tony Brackins
@mrbrackins
Nov 03 2017 14:27
Oh gotcha
because I have my list as a container right now
w/ Redux in it
so pass it down via props instead
Kaz Baig
@kbaig
Nov 03 2017 14:28
Use one redux store for the whole app
Treat it as state
Tony Brackins
@mrbrackins
Nov 03 2017 14:28
@moT01 yep, let me know if I can assist at all. Once we figurfe this out lol
Kaz Baig
@kbaig
Nov 03 2017 14:28
Pass the pieces the components need down to them
Change state (ie Redux store) via actions
Tony Brackins
@mrbrackins
Nov 03 2017 14:29
hmm, I thought that’s what I was doing lol @kbaig
Kaz Baig
@kbaig
Nov 03 2017 14:29
No you have React state in your code
Get rid of that shiee
Tony Brackins
@mrbrackins
Nov 03 2017 14:30
I kinda “resorted” to that setState
abraham anak agung
@padunk
Nov 03 2017 14:30
You could map this.props.envelopes instead of list
Tony Brackins
@mrbrackins
Nov 03 2017 14:30
that’s actually what I had at first @padunk
then my list came up as blank
abraham anak agung
@padunk
Nov 03 2017 14:31
But u have to wait for it since it was async
Tony Brackins
@mrbrackins
Nov 03 2017 14:31
I looked at the props and the envelopes were empty
wondering. Is there a way to wait via code? @padunk
Kaz Baig
@kbaig
Nov 03 2017 14:32
@mrbrackins Wait you're not using mapDispatchToProps
Tony Brackins
@mrbrackins
Nov 03 2017 14:32
you’d think it just “set the state” once the async happened right?
Kaz Baig
@kbaig
Nov 03 2017 14:32
Why aren't you using mapDispatchToProps
Tony Brackins
@mrbrackins
Nov 03 2017 14:32
I’m not??
Kaz Baig
@kbaig
Nov 03 2017 14:32
Are you allowed to pass in an object?
export default connect(mapStateToProps, {employeeUpdate, envelopesFetch})(EnvelopeList);
Tony Brackins
@mrbrackins
Nov 03 2017 14:32
I thought so
Kaz Baig
@kbaig
Nov 03 2017 14:33
there's no mapDispatchToProps there
abraham anak agung
@padunk
Nov 03 2017 14:33
No need for mapdispatch
Kaz Baig
@kbaig
Nov 03 2017 14:33
why not
i didn't know you can pass in an object to that instead of a function
abraham anak agung
@padunk
Nov 03 2017 14:33
But your mapstate return name, etc...
So u had this.props.name etc
Tony Brackins
@mrbrackins
Nov 03 2017 14:34
I got that method from Stephen Grider. Took a class of his a while ago on Udemy
Kaz Baig
@kbaig
Nov 03 2017 14:34
@mrbrackins Are you seeing this.props.envelopeFetch when you log this.props to the console in componentDidMount
Tony Brackins
@mrbrackins
Nov 03 2017 14:35
Yep
but it’s empty
Kaz Baig
@kbaig
Nov 03 2017 14:35
Can you show
what it looks like
the logged envelopeFetch
abraham anak agung
@padunk
Nov 03 2017 14:35
@kbaig u couldpass object in connect
Tony Brackins
@mrbrackins
Nov 03 2017 14:36
sure
abraham anak agung
@padunk
Nov 03 2017 14:36
So basically u dont need mapdispatch
Kaz Baig
@kbaig
Nov 03 2017 14:36
@padunk but isn't that arg in connect expecting a function, not an object
Tony Brackins
@mrbrackins
Nov 03 2017 14:38

{"navigation":{"state":{"routeName":"envelopelist","key":"Init-id-1509719848811-3","params":{"title":"Envelopes","hideBackImage":true,"initial":true,"init":true}}},"title":"Envelopes","hideBackImage":true,"initial":true,"init":true,"name":"","phone":"","shift":"","user":"tony@mrbrackins.com","envelopes":[{"envelope_name":"Load Envelopes"}]}
envelopes":[{"envelope_name":"Load Envelopes"}]}
@kbaig that’s my initial state coming from the reducer
abraham anak agung
@padunk
Nov 03 2017 14:38
@kbaig dont know about that, but i learn that from Abramov redux tutorial in egghead
Tony Brackins
@mrbrackins
Nov 03 2017 14:39
but get this
Screen Shot 2017-11-03 at 7.40.00 AM.png
that’s what it’s looking like right now
but when I click that
and use this via that onclick: this.setState({list: this.props.envelopes})
Kaz Baig
@kbaig
Nov 03 2017 14:41
@mrbrackins I'm asking to see this.props of EnvelopeList
Which you're logging to the console in componentDidMount
Tony Brackins
@mrbrackins
Nov 03 2017 14:42
ok
my bad


logging this.props
7:42:29 AM
{"navigation":{"state":{"params":{"title":"Envelopes","hideBackImage":true,"initial":true,"init":true,"routeName":"envelopelist"},"key":"id-1509720133087-4","routeName":"envelopelist"}},"title":"Envelopes","hideBackImage":true,"initial":true,"init":true,"routeName":"envelopelist","name":"","phone":"","shift":"","user":"tony@mrbrackins.com","envelopes":[{"envelope_name":"Load Envelopes"}]}
7:42:29 AM
end logging this.props
there it is
I also have a "this.props.envelopesFetch();” before logging this.props in component will mount
Screen Shot 2017-11-03 at 7.41.10 AM.png
this happens only after I click on the “load envelopes"
so… seems the envelopes are making it there at some point
but they don’t update the state...
got me really thinking about that dispatch to props thing
Kaz Baig
@kbaig
Nov 03 2017 14:45
hmm not sure how to troubleshoot this without working with the code
not a super trivial problem
Tony Brackins
@mrbrackins
Nov 03 2017 14:45
Yea
Kaz Baig
@kbaig
Nov 03 2017 14:46
I see in the docs you can pass an object as the second arg to connect
Tony Brackins
@mrbrackins
Nov 03 2017 14:46
I think I need to wait somehow
via code
gotcha
abraham anak agung
@padunk
Nov 03 2017 14:46
Did it return a promise?
Kaz Baig
@kbaig
Nov 03 2017 14:46
but you should be able to see envelopeFetch in this.props and you don't
that's why I am being suspicious of your connect call
Tony Brackins
@mrbrackins
Nov 03 2017 14:47
interesting
yea, I went down that road too @padunk
got some error waiting for promise @padunk
rscales02
@rscales02
Nov 03 2017 14:48
@rscales02
can someone give me a hand with my minimax algorithm? on first click I log an error of cannot read property 'score' of undefined the undefined variable is result upon second click, however result becomes defined...
https://codepen.io/rscales02/pen/pWBLEK
abraham anak agung
@padunk
Nov 03 2017 14:48
What i usually do is fetch it in compdidmount, then use .then to setstate
Than if list !=== undefined, render it
Tony Brackins
@mrbrackins
Nov 03 2017 15:34
awesome thx!
Ruben Abraham
@BuBBRBbr1
Nov 03 2017 15:35
Guys I am having trouble with cahnging the font size of an element.
it looks loke this.
<style> .red-text { color:red; }
It is saying between the style tags give the p elements font size of 16px. Browswer and text zoom should be at 1000x.
My words color and font size are green instead of red. I don'
t know why
Kaz Baig
@kbaig
Nov 03 2017 15:42
Well you're not styling p elements here, you're styling the red-text class
Ruben Abraham
@BuBBRBbr1
Nov 03 2017 15:49
I figured it out. I forgot a dash line between the font size.
Thanks anyways!
Tony Brackins
@mrbrackins
Nov 03 2017 16:12
@kbaig @padunk @moT01 well, I figured it out. But I’m not sure exactly what I did lol I put this.props.envelopesFetch in component will mount and dropped this.props.envelopes.map and it worked
I’m starting to wonder if I did too many requests yesterday on my api
it worked :D
Kaz Baig
@kbaig
Nov 03 2017 16:12
@mrbrackins maybe a good idea to just work off a local mockup of your data for now
Tom
@moT01
Nov 03 2017 16:13
i made some progress on mine
had nothing to do with react or redux
Tony Brackins
@mrbrackins
Nov 03 2017 16:14
well, long story short. I actually built the API from scratch too. The data there is just mockup. Definitely trying to impliment working w/ API into my knowledge @kbaig
what did yours end up being? @moT01
Tom
@moT01
Nov 03 2017 16:14
had books instead of book
Tony Brackins
@mrbrackins
Nov 03 2017 16:14
haha nice!
Tom
@moT01
Nov 03 2017 16:14
sneaky little typo
Kaz Baig
@kbaig
Nov 03 2017 16:15
@moT01 that drives me nuts. Esp when it's looking for a prop of an object and it just silently fails
Tom
@moT01
Nov 03 2017 16:16
i couldnt get a response my api, and im yelling at the computer what are you talking about!!
its there
im asking, it should be responding
abraham anak agung
@padunk
Nov 03 2017 16:16
@mrbrackins :+1:
Tom
@moT01
Nov 03 2017 16:17
but i learned some more about redux as i chased my data through my app
Sunny Wong
@swong194
Nov 03 2017 16:20
hi every1
can i get some help with JS
;D
Tom
@moT01
Nov 03 2017 16:20
whats up
this is my codepen link and i'm trying to clone google's calculator
i was wondering how to add eventlistener click to all my 'num' classes
and have it just execute a function
Tom
@moT01
Nov 03 2017 16:23
jquery makes it pretty easy
Sunny Wong
@swong194
Nov 03 2017 16:24
i would like to do this with vanilla JS
if possible
D;
Tom
@moT01
Nov 03 2017 16:24
right, in that link
Sunny Wong
@swong194
Nov 03 2017 16:24
oh its the same explanation thank you
Tom
@moT01
Nov 03 2017 16:24
var classname = document.getElementsByClassName("classname");

for (var i = 0; i < classname.length; i++) {
    classname[i].addEventListener('click', myFunction, false);
}
Sunny Wong
@swong194
Nov 03 2017 16:24
@moT01 thank you
CamperBot
@camperbot
Nov 03 2017 16:24
swong194 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 894 | @mot01 |http://www.freecodecamp.com/mot01
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 16:40
@swong194 not sure what youy really looking for but
document.getElementById('confirmation').addEventListener('click', function(){
    console.log(this.id);
});
this might be enough
in this case change "confirmation" to your add or class
and if its class change the getelement
Sunny Wong
@swong194
Nov 03 2017 16:41
@tiagocorreiaalmeida i was originally trying to get the solution on online
one line**
but I think the solution Tom pointed me towards was helpful
@tiagocorreiaalmeida thank you
CamperBot
@camperbot
Nov 03 2017 16:42
swong194 sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 423 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
Sunny Wong
@swong194
Nov 03 2017 16:42
i would probably prefer it in separate parts, it would help me read and perhaps i can reuse the function later
thank you
Kaz Baig
@kbaig
Nov 03 2017 16:44
@swong194 @moT01 could always shorten that code if you want it to one line:
document.getElementsByClassName("classname").forEach(elem => elem.addEventListener('click', myFunction, false));
Sunny Wong
@swong194
Nov 03 2017 16:47
interesting
I did attempt ur shorten code
and it makes sense foreach
as i am assuming that if i get a bunch of classes under the same name it returns an array of those objects?
Kaz Baig
@kbaig
Nov 03 2017 16:48
indeed
Sunny Wong
@swong194
Nov 03 2017 16:49
for some reason its not working ;[
alpox
@alpox
Nov 03 2017 16:49
@kbaig that will most likely not work like this because getElementsByClassName doesnt return an array. Only an array-like object.
@swong194 there we go :D
Kaz Baig
@kbaig
Nov 03 2017 16:49
@alpox It's an iterable?
Sunny Wong
@swong194
Nov 03 2017 16:49
@alpox do u mind explaning?
alpox
@alpox
Nov 03 2017 16:50
@kbaig well its array-like so it has a length property and you can index it.
Sunny Wong
@swong194
Nov 03 2017 16:50
i thought it would return an array pointing to that specific object in the DOM
wouldnt it do something like
[button1 with num, button2 with num]
Kaz Baig
@kbaig
Nov 03 2017 16:50
@swong194 You can do a for loop over things besides arrays. The term for it is 'iterable'. So you wouldn't be able to do forEach because it's only for arrays
Sunny Wong
@swong194
Nov 03 2017 16:50
and i could then use foreach to add event click?
Kaz Baig
@kbaig
Nov 03 2017 16:50
@alpox Right so it's iterable
alpox
@alpox
Nov 03 2017 16:51
@swong194 you can convert it to an array with Array.prototype.slice.call(array_like_object)
@kbaig yep should be
Sunny Wong
@swong194
Nov 03 2017 16:51
why doesn't this produce the same impact as

// var numbersClass = document.getElementsByClassName("num");

// for (var i = 0; i < numbersClass.length; i++) {
// numbersClass[i].addEventListener('click', number, false);
// }

sorry for bad code ;[
Kaz Baig
@kbaig
Nov 03 2017 16:52
@swong194 because you can only do forEach on an array
and getElementsByClassName doesn't return an array
Sunny Wong
@swong194
Nov 03 2017 16:52
ooh i see
i understand now
Kaz Baig
@kbaig
Nov 03 2017 16:52
It returns something that is similar to an array
Sunny Wong
@swong194
Nov 03 2017 16:52
that's weird...
similar to an array but not exactly an array
ok it makes sense
That's what it returns
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 16:53
isn't the final idea get the value of the button?
Sunny Wong
@swong194
Nov 03 2017 16:53
ALLLLLL
yes @tiagocorreiaalmeida
alpox
@alpox
Nov 03 2017 16:53
@swong194 well it works a bit different in effect. getElementsByClassName actually returns something very funny. Im not on laptop to give a good example, but the list is self-updating according to the changes on the DOM!
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 16:53
but you want to get the value each time someone clicks
Sunny Wong
@swong194
Nov 03 2017 16:53
im trying to clone google calculator as an exercise ;X
yes @tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 16:54
if you want to get the value of it each times someone clicks a button you have the code I pasted above
change the this.id
to this.val()
and you probablty get what you need
alpox
@alpox
Nov 03 2017 16:54
@tiagocorreiaalmeida btw i will look at your challenge when im home, i didnt get to it yet :D
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 16:54
sec maybe val is not vanilla js
alpox
@alpox
Nov 03 2017 16:55
@tiagocorreiaalmeida its not - vanilla is .value
Sunny Wong
@swong194
Nov 03 2017 16:55
@tiagocorreiaalmeida i have another function since I have to set some rules with the values
i am using innerText, is that ok?
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 16:55
sec I willç make you a pen @swong194
and yeah figure it out now I should learn mroe about working with the dom and vanillajs but I alwways had jquery so never had the need for it
Sunny Wong
@swong194
Nov 03 2017 16:56
i appreciate the help
I did finish the FCC front end cert but that was more on my own
so the job I did wasn't great in terms of knowing everything
and of course being efficient in implementing functions
Kaz Baig
@kbaig
Nov 03 2017 16:57
@swong194 There's value in hacking something together regardless
Sunny Wong
@swong194
Nov 03 2017 16:57
@kbaig ty
CamperBot
@camperbot
Nov 03 2017 16:57
swong194 sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 406 | @kbaig |http://www.freecodecamp.com/kbaig
Sunny Wong
@swong194
Nov 03 2017 16:57
@tiagocorreiaalmeida i was told to
stay awway from jquery
Kaz Baig
@kbaig
Nov 03 2017 16:59
@swong194 how come
you don't really need it these days but it's not evil
Sunny Wong
@swong194
Nov 03 2017 17:01
@kbaig I was told by a friend that jquery is will not be the standard anymore
better to just start with vanilla JS?
alpox
@alpox
Nov 03 2017 17:05
Well vanilla JS DOM manipulations are not very standard either
If you are going for what companies use
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 17:05
@alpox finding strange the this.value notworking tough
document.getElementById('cal').addEventListener('click', function(){
    console.log(this.value);
});
<a href="#" id = "cal">dasdasdasdasdasdasdasdasdasdasdas</a>
alpox
@alpox
Nov 03 2017 17:06
They just dont use jquery anymore because they have react or angular
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 17:06
returns undefined
alpox
@alpox
Nov 03 2017 17:06
@tiagocorreiaalmeida .value only exists for input fields. Here you would have to use innerText
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 17:07
yeah n
nm
@swong194
document.getElementById('cal').addEventListener('click', function(){
    console.log(this.innerHTML);
});
there you go
Sunny Wong
@swong194
Nov 03 2017 17:09
if I had multiple elements with classes, I would have to loop to add the event listeners?
or does document.getElementById('cal').addEventListener('click', function(){ console.log(this.innerHTML); });
just add it to all elements with the id of 'cal'
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 17:09
you can't use id
id are unique
cyhange it to classname
Sunny Wong
@swong194
Nov 03 2017 17:10
class*
in my case
let me try this
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 17:10
and afrer you can use it for every element that has it
Sunny Wong
@swong194
Nov 03 2017 17:10
I think i tried that at first and it didn;'t work
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 17:10
show me your codepen
i commented out the working
stuff
BuntyBru
@BuntyBru
Nov 03 2017 17:13
hi all i want to do one thing if i click the button second time i want the temperature converted back to celsius
https://codepen.io/BuntyBru/pen/WXQvKX
Kaz Baig
@kbaig
Nov 03 2017 17:13
@swong194 jQuery is usually used in conjunction PHP these days. Outside of that workflow, we usually see Angular/React/Vue
That being said, understanding how the libraries get their stuff done on a basic level is where vanilla might be useful to you
BuntyBru
@BuntyBru
Nov 03 2017 17:16
Hello
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 17:17
you will need a loop for what I saw getting by classname returns an array as said above try to read some w3c and stackoverflow and you will get it working
Kaz Baig
@kbaig
Nov 03 2017 17:18
@BuntyBru You need to ask a specific question bud
Sunny Wong
@swong194
Nov 03 2017 17:18
@BuntyBru i think you should have a specific id for where you will display ur temperature value, then in Javascript you can read the current symbol with its respective value and toggle celsius / Faren as needed
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 17:19
@BuntyBru store the temperatura on a varaible and had a class like active and change the active between celsius and farheint depending if the user clicks the button in this case you will have the varaible and you will know if you need to set it without do calculations or do a calculation and send it back
Sunny Wong
@swong194
Nov 03 2017 17:19
@kbaig thank you, im trying to learn the fundamentals. I have used jquery for sure in the FCC projects
CamperBot
@camperbot
Nov 03 2017 17:19
swong194 sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
api offline
shashankbheeshva
@shashankbheeshva
Nov 03 2017 17:20
FCC ?
Sunny Wong
@swong194
Nov 03 2017 17:20
@tiagocorreiaalmeida thank you for the help !
CamperBot
@camperbot
Nov 03 2017 17:20
swong194 sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
api offline
Sunny Wong
@swong194
Nov 03 2017 17:20
@shashankbheeshva freecodecamp? ;]
shashankbheeshva
@shashankbheeshva
Nov 03 2017 17:20
:+1:
Nikola
@n1x1
Nov 03 2017 17:21

"Fulfill the below user stories. Use whichever libraries you need. Give it your own personal style."

I'm not quite sure what to with these task now...can someone help?

shashankbheeshva
@shashankbheeshva
Nov 03 2017 17:22
depending on what you know like html css bootstrap or angular or etc use your knowledge to complete the usestory functionality in your project
dont look at the example code
do you know what is a user story ?
Nikola
@n1x1
Nov 03 2017 17:23
yeah it's a tribute site...Dr. Norman Borlaug
Sunny Wong
@swong194
Nov 03 2017 17:24
I really appreciate the help everyone
Nikola
@n1x1
Nov 03 2017 17:24
so I write something about him? >>> where?
shashankbheeshva
@shashankbheeshva
Nov 03 2017 17:24
No
a user story is like a requirement from a customer to the developer
Kaz Baig
@kbaig
Nov 03 2017 17:25
It's a way of expressing the functionality your interface needs
shashankbheeshva
@shashankbheeshva
Nov 03 2017 17:25
so you will see like UserStory: i want the heading to be " Hello World" and it should be in the middle top of the page
read the use story and plan yourself how will you achieve it
what u need to do ?
Nikola
@n1x1
Nov 03 2017 17:26
oooooooooooo!!! to explain requirements from owner?
why he needs what he wants?
shashankbheeshva
@shashankbheeshva
Nov 03 2017 17:26
yes
something like that
u need to build it and give it to him
BuntyBru
@BuntyBru
Nov 03 2017 17:33
@kbaig
sorry man
its just that i am super disturbed these days
Not able to concentrate
seems like i am forgetting old concepts and everything
I dont know how to overcome this problem
quite disturbed
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 17:35
just pratice after a while things will start to stick to your head
Kaz Baig
@kbaig
Nov 03 2017 17:36
You learn the most when you struggle
BuntyBru
@BuntyBru
Nov 03 2017 17:39
i dont know man
all of a sudden everything seems to be going down
i am trying but i dont know
within minutes i feel like giving everything up
Kaz Baig
@kbaig
Nov 03 2017 17:44
Try breaking the problem up into the smallest possible parts
So you only have to think of one thing at a time
alpox
@alpox
Nov 03 2017 17:45
^ very important!
Never try to do everything at once, focus on one little thing, do it properly no matter how long it takes, then go on to the next
Kaz Baig
@kbaig
Nov 03 2017 17:46
It's very easy to feel overwhelmed otherwise
Nikola
@n1x1
Nov 03 2017 17:46
@BuntyBru listen man...you have to overcome this histeria and i dont mean this in a negative tone, its normal to complain because learning is the hardest thing on earth. there are a lot of people probably in much worse position then you so just keep going >>> there is a famous quote from a general in my country "who dears he can, if you dont know fear you have to keep going forward" >>> something like that
...so dont be afraid ;)
Tom
@moT01
Nov 03 2017 17:48
something like that
must not be that famous
BuntyBru
@BuntyBru
Nov 03 2017 17:49
@n1x1
i am not afraid of learning
its just that something else has happened and it is crushing m
*me
Jimmy Van Veen
@JimmayVV
Nov 03 2017 17:50
@BuntyBru life happens. It's ok to not code 24/7/365 - and if it's distracting you, don't let that simple fact ruin your outlook. We'll still be here days, weeks, months, years from now. A lot of coding is like riding a bike, you can take a break if you need to
and if you don't want to take a break, but still can't concentrate, then that's ok too.
Kaz Baig
@kbaig
Nov 03 2017 17:51
But also, talk to someone you care about in your life
We're only strangers on the internet, we can't really understand
rscales02
@rscales02
Nov 03 2017 17:52
any idea why a recursive function would run successfully a few thousand times before returning with cannot read property score of undefined?
Kaz Baig
@kbaig
Nov 03 2017 17:52
@rscales02 maybe it went past the max int? idk
alpox
@alpox
Nov 03 2017 17:52
@rscales02 not without code
Jimmy Van Veen
@JimmayVV
Nov 03 2017 17:52
@rscales02 could be a lot of reasons.
BuntyBru
@BuntyBru
Nov 03 2017 17:53
I graduated with a Computer science degree in the month of may 2016 Then i got a job in ericsson. Work there was much of operations related. Tech support kind of. I joined ericsson in september 2016. But still i wanted to get into coding jobs so i was preparing. There is a company in japan which accepted my resume. Then round of interviews started. i cleared all of them and then finally in the month of december 2016. I got the offer. I was happy and content. But the joining date was not sure from their side. So i continued working in ericsson. In the month of march 2016. They said they will give joining in october 2017. I agreed. I left ericsson in May 2017, I thought i will spend next 4 months at home but as soon as i left ericsson a startup contacted me and i ended up working for them for the next 4 months. In august 2017 , Works Application sent us a mail stating that "there had been a financial crisis in their company, And they have hired a lot of people so they will conduct a one month training period instead of 3 months from October, and would detain 85% of the students. They even gave us the offer that if we agree to withdraw from joining the company we would be eligible to get 1 months salary as compensation. I was horrified. I had already intimidated the startup that i am going to leave as it was august mid and i was supposed to join works applications on 1st october. I contacted few of my seniors who were working in that company. asked them about the previous training processes. They said that it would be related to web development. HTML,CSS and javascript. So i thought i know these things therefore i agreed to go for the training. i left the startup in the mid of september 2017 and then on october 1st i joined works applications First week was fine but on the second week they totally changed the procedure They told us to read JAVA and then within a week they took a tough test on it. The thing repeated for two weeks. And finally a day before they told that i did not qualify. They sent a resignation letter to me which i have to sign and send back to them which will notify that i resigned
Now the situation with me is that i have ended up with no job after 1 year of passing out from college
*march 2017

@kbaig

We're only strangers on the internet, we can't really understand

Not many people around mate

Kaz Baig
@kbaig
Nov 03 2017 17:55
I didn't follow where you are but sending you a letter for you to resign doesn't sound like a legal way to fire someone
alpox
@alpox
Nov 03 2017 17:56
^ yup. Never do that!
BuntyBru
@BuntyBru
Nov 03 2017 17:56
@JimmayVV
I like coding man.
i used to do competitive coding and
recently started with web development.
Though i started with FreeCodeCamp way back in may 2016
but its never that i hate coding
today too
few hours back i was looking through my profile at Hackerrank and practicing
Jimmy Van Veen
@JimmayVV
Nov 03 2017 17:57
@BuntyBru that's definitely a messed up situation - but unless you are withholding some damaging information, you actually sound like a very resourceful person, with a solid ability to get hired. Not everyone can say that
rscales02
@rscales02
Nov 03 2017 17:57
https://codepen.io/rscales02/pen/pWBLEK @kbaig @alpox @JimmayVV be warned that it might kill your page, but if you say ok it will run a few more times and come back with undefined...
BuntyBru
@BuntyBru
Nov 03 2017 17:58

@kbaig

I didn't follow where you are but sending you a letter for you to resign doesn't sound like a legal way to fire someone

Well its something related to their internal issues.
They sent me a mail stating that
i am not a fit for their engineering structure.
Thing which makes me angry is that i waited a lot for this company and now all this

Kaz Baig
@kbaig
Nov 03 2017 17:58
@rscales02 adding ?turn_off_js=true to the url disables js from autorunning
@BuntyBru Sure but if they wanted to fire you, they should fire you
rscales02
@rscales02
Nov 03 2017 17:58
the problem is with my minimax function and single player play
alpox
@alpox
Nov 03 2017 17:59
@BuntyBru i wouldnt fear that much :) guys like you should have it easy to find a new job. Try to do some networking, register on linkedin, go to events, apply.
rscales02
@rscales02
Nov 03 2017 17:59
@kbaig the problem script doesn't occur until after the human player makes his first move
BuntyBru
@BuntyBru
Nov 03 2017 18:00

@JimmayVV
I have an year of experience in Customer Support/ Tech support
I always had this desire to get into a core coding job
But now i dont have anything in hand.
I just wanted a remote kind of job related to tech support/customer support
so that i get atleast some salary to pay my bills and in the meantime i continue my preparation

But i have applied to more than 20 companies
nothing from them
I dont know why

Jimmy Van Veen
@JimmayVV
Nov 03 2017 18:00
@BuntyBru there is no doubt that this company screwed you. The important thing (and this is really important) is to not internalize failure. Success today is based on anyltics WAY more than in the past. While interpersonal skills and networking are important, everyone wants to use analytics to measure success or failure. As such, people who would have had life-long careers at companies sometimes have hard times getting in the door
BuntyBru
@BuntyBru
Nov 03 2017 18:00

@kbaig

@BuntyBru Sure but if they wanted to fire you, they should fire you

Well I dont know
maybe they dont want to bring up the word "fire" or something

alpox
@alpox
Nov 03 2017 18:01
@BuntyBru as far as i know, companies dont want to fire you but resign yourself just for you to loose the mandatory compensation salary!
At least thats the case where i live
Kaz Baig
@kbaig
Nov 03 2017 18:02
Mandatory? What country is it mandatory in
BuntyBru
@BuntyBru
Nov 03 2017 18:02
@JimmayVV
even after all this.
I am waking up early in the morning so that i can make my day productive
by coding.
But there are some moments where i feel pity on my luck/fate
alpox
@alpox
Nov 03 2017 18:02
@kbaig switzerland
Kaz Baig
@kbaig
Nov 03 2017 18:03
@alpox must be nice
BuntyBru
@BuntyBru
Nov 03 2017 18:03
@alpox
dont know man
i just wanted to work in this company and the interview was very very hard.
And now all that does not seem to matter
Kaz Baig
@kbaig
Nov 03 2017 18:03
US of A baby, where you can be fired without a cause and no protections are provided
alpox
@alpox
Nov 03 2017 18:03
@kbaig well they also try to come around it as you see but yea its kinda nice
BuntyBru
@BuntyBru
Nov 03 2017 18:03
@kbaig
in many countries it is mandatory to give compensation salary when they fire you
alpox
@alpox
Nov 03 2017 18:03
@kbaig here, after firing, they have to pay you 3 more months of salary
Jimmy Van Veen
@JimmayVV
Nov 03 2017 18:03
@BuntyBru because of the direction analytics are playing in company's nowadays, I'm finding that many jobs basically require you to be overqualified to fill it. Perhaps this has to do with a glut in applicants. While a company's specific needs might not require an over-qualified candidate, you basically have to be. Company A wants a kick-ass Angular developer. Company B wants a kick ass React developer. And Company C wants someone to be a JavaScript wizard using a custom in-house framework. Unless you focus on just one thing, and only one thing, and decide to apply to only those jobs that match your skills, you're going to always fight that analytical battle.
Kaz Baig
@kbaig
Nov 03 2017 18:04
3 months??? But then of course they'd want to make you miserable and leave on your own
Jimmy Van Veen
@JimmayVV
Nov 03 2017 18:04
@BuntyBru keep plugging away. You're going to find something that's right in your wheelhouse, and pass this entry-barrier. From there, then you can let your hard work and dedication win the crowd
@BuntyBru if you try focusing on too many things at once, that might also stress you out. If you want to go through the whole Ruby on Rails tutorial, while also completing a Udemy class on Node.js, and follow that up with a crash course in Angular, then, yeah, you're going to get stressed out. This is part of what I like FCC so much for - it really forces you to come up with many projects in one environment (JavaScript) - no bouncing around
BuntyBru
@BuntyBru
Nov 03 2017 18:07
Thats why i am planning to get a remote tech support job so that
i can save some of my time to start working hard on my coding skills
But i havent heard a thing from the recruiters

@JimmayVV
Man one thing which concerns me is that
as the days are passing

my unemployment counter is rising
and this would be a huge problem for me when i go for interviews and all

@JimmayVV
Man one thing which concerns me is that
as the days are passing

my unemployment counter is rising
and this would be a huge problem for me when i go for interviews and all

I applied everywhere
Kaz Baig
@kbaig
Nov 03 2017 18:08
@BuntyBru It's not impossible to explain your situation in a concise manner during interviews
BuntyBru
@BuntyBru
Nov 03 2017 18:08
@JimmayVV
may be you are right.
I am actually travelling on 3 boats at this moment.
1) Web development learning
2) C++ coding on Hackerrank and learning through CLRS Algorithm book
3) Searching for Jobs on various portals
Jimmy Van Veen
@JimmayVV
Nov 03 2017 18:08
@kbaig :thumbsup:
BuntyBru
@BuntyBru
Nov 03 2017 18:09

@kbaig
I know its not impossible but again there is this fear

and Fear kills

Jimmy Van Veen
@JimmayVV
Nov 03 2017 18:09
@BuntyBru I've been there. I want to code all the things. But I think you might just want to take a step back and focus on just one for now (probably front end, JS etc..)
BuntyBru
@BuntyBru
Nov 03 2017 18:09
irony is that i know that "Fear Kills" but still i fear
@JimmayVV
the plan is to get stick with that but
at the same time i am in a dire need of a job
Jimmy Van Veen
@JimmayVV
Nov 03 2017 18:10
@BuntyBru you've proven to be very resourceful so far, so don't put so much pressure on yourself to get the dream job so soon. Focus on working hard, don't focus on results
BuntyBru
@BuntyBru
Nov 03 2017 18:10
whatever it may be
Kaz Baig
@kbaig
Nov 03 2017 18:10
If you could rationalize fear away, it'd be a pretty useless thing to experience
BuntyBru
@BuntyBru
Nov 03 2017 18:12
@kbaig
trying to remove fear
Jimmy Van Veen
@JimmayVV
Nov 03 2017 18:13
@BuntyBru I've been there from a fear perspective. I had a stable job when I came across FCC, so I didn't feel the pressure to "get a job right now", but I knew I wanted to be a web dev. And I knew I never was one, despite the fact I can code cool stuff. While I still possess that fear that I'm a fraud, finishing the projects from FCC has done wonders for me from a confidence standpoint
@BuntyBru completing modest full projects like that indipendently really reassured me that I don't completely suck. I may not invent Facebook on the back of a napkin, but I can code decently well, and I'll be damned if my simple determiniation doesn't overcome whatever factors I otherwise lack
BuntyBru
@BuntyBru
Nov 03 2017 18:14
@JimmayVV
yeah even sometimes i do have that "fraud feeling"
Jimmy Van Veen
@JimmayVV
Nov 03 2017 18:15
@BuntyBru I've got to duck out for a meeting now, but my sincere hopes you find much success in your future :)
BuntyBru
@BuntyBru
Nov 03 2017 18:16
@JimmayVV
DM'd you
best of luck for the meeting mate
Kaz Baig
@kbaig
Nov 03 2017 18:30
Maybe I should redo the intermediate/advanced projects in react...
Could be interesting
alpox
@alpox
Nov 03 2017 18:55
@tiagocorreiaalmeida My take:
function comp(a, b) {
  return !!(a && b && a.length === b.length && 
    a.reduce((c,i) => 
      c-b.some((e,d) => e==i*i&&b.splice(d,1)||e==i*i), b.length) <= 0);
}
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 19:07
Thats looks a, bit confusing tovme ahaha
Did it passed tough?
alpox
@alpox
Nov 03 2017 19:09
@tiagocorreiaalmeida sure it did :D
Kaz Baig
@kbaig
Nov 03 2017 19:10
What problem is that for
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 19:10
Codewars cant remeber the link
Kaz Baig
@kbaig
Nov 03 2017 19:11
What was it meant to do tho
Tiago Correia
@tiagocorreiaalmeida
Nov 03 2017 19:11
And congrats alpox, still theres alot forvme to learn and getter thinking on the problems :smile:
Brb I send you theclink when i, get home and you see the problrm and try to do it
Muhammad Hasham
@MohammadHasham
Nov 03 2017 19:16
how can i change color of the text entered in an input bar if it matches with the word in paragraph text? what would be the approach
can anyone help?
shashankbheeshva
@shashankbheeshva
Nov 03 2017 19:19
in angular u have a search framework if you can find which does it , ill let you know if i get across
alpox
@alpox
Nov 03 2017 19:21
@MohammadHasham just listen on the input, when something changes, compare the value of the input with the paragraph text and if they equal you can add a class to the input on which some css is defined to make the background of the input change
Muhammad Hasham
@MohammadHasham
Nov 03 2017 19:22

but i want to only change a specific word in a paragraph.

For example

the input is 'apple' and the paragraph is " an apple a day keeps the doctor away".So when i type apple it shall only change it's background color not the whole paragraph
is this possible?
alpox
@alpox
Nov 03 2017 19:22
@MohammadHasham for that you have to put that word in its own span element
Muhammad Hasham
@MohammadHasham
Nov 03 2017 19:24
function highlight(high){
        res.forEach((value)=>{
            if(value == high){
                var para = document.createElement('p');
                var html = document.createTextNode(value);
                para.append(html);
                para.style.color= "blue";
                text.innerHTML.replace(high,para);
                console.log(high);

            }
        });
    }
is this implementation somewhat right? @alpox
alpox
@alpox
Nov 03 2017 19:25
@MohammadHasham you seem to only replace the whole paragraph?
Muhammad Hasham
@MohammadHasham
Nov 03 2017 19:26
yes but once the color of word is change
isn't that fine?
alpox
@alpox
Nov 03 2017 19:28
@MohammadHasham looka alright, yes. I wouldnt keep around text as global variable though
Muhammad Hasham
@MohammadHasham
Nov 03 2017 19:29
thanks i know that variables are really confusing
@alpox Thanks i'll look into it myself.
CamperBot
@camperbot
Nov 03 2017 19:29
mohammadhasham sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1429 | @alpox |http://www.freecodecamp.com/alpox
Paul Freeman
@pfreema1
Nov 03 2017 20:46
has anyone done the twitchtv json challenge recently? it looks like they are changing the api
Jimmy Van Veen
@JimmayVV
Nov 03 2017 20:47
@pfreema1 yup, I have. In fact, I've done it twice
I did it again a couple weeks ago
Paul Freeman
@pfreema1
Nov 03 2017 20:47
ok cool
what documentation did you use?
this is the github page now: https://github.com/justintv/Twitch-API
Jimmy Van Veen
@JimmayVV
Nov 03 2017 20:49
I used https://dev.twitch.tv/docs/v5/reference/streams/#get-stream-by-user as per FCC
when I re-wrote it, I just used the same API calls as V1
Paul Freeman
@pfreema1
Nov 03 2017 20:50
ok cool . thank you
Jimmy Van Veen
@JimmayVV
Nov 03 2017 20:50
base url https://wind-bow.gomix.me/twitch-api
Paul Freeman
@pfreema1
Nov 03 2017 20:51
i saw this: V5 is deprecated as of 8/31/17 and will be removed entirely on 12/31/18 (in favor of the new Twitch API, mentioned above).
Jimmy Van Veen
@JimmayVV
Nov 03 2017 20:51
@pfreema1 step 9 provides the alternate API
Paul Freeman
@pfreema1
Nov 03 2017 20:51
and wasnt sure if there was something else i should be looking at
do you think it will stop working after 12/31?
Jimmy Van Veen
@JimmayVV
Nov 03 2017 20:51
@pfreema1 perhaps, but that's over a year away
Paul Freeman
@pfreema1
Nov 03 2017 20:52
LOL. totally misread the year
Jimmy Van Veen
@JimmayVV
Nov 03 2017 20:52
@pfreema1 in the mean time, https://wind-bow.gomix.me/twitch-api that they provided in step 9 should work OK
Paul Freeman
@pfreema1
Nov 03 2017 20:52
i was thinking man this wont even work in a month or so
haha . thanks!
Jimmy Van Veen
@JimmayVV
Nov 03 2017 20:52
@pfreema1 no problem
Kris Baillargeon
@krisb1220
Nov 03 2017 22:57
backend is dead :(

function rot13(str) { // LBH QVQ VG!

  var appendString = "", // to return , set var
      strArray = str.split(" "); 

  strArray.forEach(function(item){ //loop through items in strArray

    for(var x=0;x <= item.length;x++) { //loop through each item in strArray[x]

      var y = item.charCodeAt(x), //get
          z = y + 13;

      if(z > 90) //filter
      { 
        z = z - 26;
      }
      else if(z < 65)
      { 
        z = y;
      }
      else if(x == item.length) 
      {
        appendString += " "; 
      }

      appendString += String.fromCharCode(z); //set

    }

  });
  console.log(appendString); 
}
rot13("SERR PBQR PNZC");
anyone know why my filter isn't catching question marks when ? = 63 but checks for > 65 ??
alpox
@alpox
Nov 03 2017 23:08
@krisb1220 i answered you there :)
Kris Baillargeon
@krisb1220
Nov 03 2017 23:26
@alpox thanks buddy
CamperBot
@camperbot
Nov 03 2017 23:26
krisb1220 sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1431 | @alpox |http://www.freecodecamp.com/alpox