These are chat archives for FreeCodeCamp/HelpFrontEnd

6th
Mar 2018
Brian
@BrianCodes33
Mar 06 2018 00:32
what do you want to do exactly?
what do you mean by sort out the contact section
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 06 2018 00:33
@BrianCodes33 It was messed up but i fixed it a bit, should be okay now
Brian
@BrianCodes33
Mar 06 2018 00:33
alright
Brian
@BrianCodes33
Mar 06 2018 00:39
on the tbody..

    display: flex;
    justify-content:  space-between;
    width: 80vw;
    flex-wrap: wrap;
think that looks better
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 06 2018 00:50
@BrianCodes33 Thanks a lot :)
CamperBot
@camperbot
Mar 06 2018 00:50
muhammedkarim sends brownie points to @briancodes33 :sparkles: :thumbsup: :sparkles:
:cookie: 38 | @briancodes33 |http://www.freecodecamp.org/briancodes33
the fbi agent watching you
@krennical_twitter
Mar 06 2018 02:23
@gaobin1019 THANKS!!! That's exactly what happened and I get it now!
CamperBot
@camperbot
Mar 06 2018 02:23
krennical_twitter sends brownie points to @gaobin1019 :sparkles: :thumbsup: :sparkles:
api offline
Victor De Los Santos
@rdelosh
Mar 06 2018 05:01
time to get b ack to my GameOfLife project :worried:
this is what it looks like so far http://vicsportal.com/freecodecamp/GameOfLife, i still need to add pause, clear, and adding specific cells to board.
Ken Haduch
@khaduch
Mar 06 2018 05:13
@rdelosh - how long has it been since you worked on it? Looks like it's still running...
Victor De Los Santos
@rdelosh
Mar 06 2018 05:17
yesterday
Ken Haduch
@khaduch
Mar 06 2018 05:18
@rdelosh - oh, I was thinking like my "time to get back to" for something that I worked on a few months ago... good luck with it! :)
Victor De Los Santos
@rdelosh
Mar 06 2018 05:19
haha, yeah sorry for the misunderstanding
I usually write code at nights
idk why but it seems i can only focus at nights
Daniel
@DanJP2016
Mar 06 2018 05:20
not as many distractions
Ken Haduch
@khaduch
Mar 06 2018 05:20
@rdelosh - I think that everyone has their times... maybe too much going on during the day and when it all quiets down you can focus?
Victor De Los Santos
@rdelosh
Mar 06 2018 05:21
yea i think thats what it is. Family goes to sleep, friends are sleeping too, so nobody is going to talk to me other than ppl on Gitter
:d
rrspence
@rrspence
Mar 06 2018 05:26
can someone help me figure out the mutation challenge? i feel like i'm super close but still not passing
here's what i have:

function mutation(arr) {
//   return arr;
  var lowerCaseArr = [];
  for (var i = 0; i < arr.length; i++) {
    lowerCaseArr.push(arr[i].toLowerCase()); 
  }
  for (var k = 0; k < lowerCaseArr.length; k++) {
    if (lowerCaseArr[k].indexOf(lowerCaseArr[k]) === -1) {
      return false;
    } 
    return true;
    }
  }
}
mutation(["hello", "hey"]);
Fabien SHAN
@X140hu4
Mar 06 2018 05:28
@rrspence What do you have to do again? I dont remember exactly ^^;
rrspence
@rrspence
Mar 06 2018 05:30

here's what its asking: Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.

For example, ["hello", "Hello"], should return true because all of the letters in the second string are present in the first, ignoring case."

Ken Haduch
@khaduch
Mar 06 2018 05:30
@rrspence - well, there are two entries in the array. The first one is the word that you are checking to see if it contains all of the letters in the second element. So you should be working with arr[0] and arr[1] separately .
@rrspence - so you should not have arr[i] in a for loop, it is not doing you any good.
rrspence
@rrspence
Mar 06 2018 05:33
@khaduch thanks for the advice. ok i'm going to keep playing around with this and see if i can get it to work knowing that
CamperBot
@camperbot
Mar 06 2018 05:33
rrspence sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3778 | @khaduch |http://www.freecodecamp.org/khaduch
Fabien SHAN
@X140hu4
Mar 06 2018 05:35
@rrspence Also your second for loop is just looping on the two elements of the array, not the individual letters if that is what you intended it to do
Ken Haduch
@khaduch
Mar 06 2018 05:35
you do want to convert both to lowercase, so you can use .toLowerCase() for that, no need to complicate it with a for loop, just do the entire word in one fell swoop... I'm going to let you work on it, since you are going to learn more with that method. Just analyze the logic that you need and try to come up with the most straightforward way of doing it - You can use for loops, if you get it to pass the tests that way, then you can use higher-order methods to simplify it. Good luck with it!
rrspence
@rrspence
Mar 06 2018 05:45
thanks @khaduch and @X140hu4!! i'll keep working on this
CamperBot
@camperbot
Mar 06 2018 05:45
rrspence sends brownie points to @khaduch and @x140hu4 :sparkles: :thumbsup: :sparkles:
api offline
:cookie: 348 | @x140hu4 |http://www.freecodecamp.org/x140hu4
Joshua Swift
@joshuaswift
Mar 06 2018 07:37
Is anyone aware of issues with the FCC weather api?
It seems to change the format of the response without warning
abraham anak agung
@padunk
Mar 06 2018 07:40
@joshuaswift it works fine for me. What is the issue?
Joshua Swift
@joshuaswift
Mar 06 2018 07:41
Basically sometimes it will format the data so that the weather icon is accessible with weather[0].icon
and I've just gone to work on it again and now it's responding with a completely different data format so that weather[0].icon is undefined
abraham anak agung
@padunk
Mar 06 2018 07:44
@joshuaswift don't know about it. have you try console.log the data that come?
Victor De Los Santos
@rdelosh
Mar 06 2018 08:14
@khaduch r u still there?
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 06 2018 08:16
@SweetCodingInc No worries. I fixed it
Brian
@BrianCodes33
Mar 06 2018 08:34

https://beta.freecodecamp.org/en/challenges/react/write-a-react-component-from-scratch

// change code below this line
class MyComponent extends React.Component {
  render() {
    return (
      <div>
        <h1>My First React Component!</h1>
      </div>
    )
  }
}

ReactDOM.render('<div />',document.getElementById('challenge-node'))

giving errors

Sweet Coding :)
@SweetCodingInc
Mar 06 2018 08:35

@BrianCodes33

Change this

ReactDOM.render('<div />', ...

to

ReactDOM.render('<MyComponent />', ...
Brian
@BrianCodes33
Mar 06 2018 08:37
still not passing
Anas Abdennaim
@Aka-Dev
Mar 06 2018 08:42
@BrianCodes33 ReactDOM.render(<MyComponent />, document.getElementById('challenge-node'));
Brian
@BrianCodes33
Mar 06 2018 08:43
its exactly what i have
Anas Abdennaim
@Aka-Dev
Mar 06 2018 08:43
@BrianCodes33 <MyComponent /> don't be string, remove ''
<MyComponent /> not ' <MyComponent />'
Brian
@BrianCodes33
Mar 06 2018 08:43
oh @SweetCodingInc said its a string thanks @Aka-Dev
CamperBot
@camperbot
Mar 06 2018 08:43
briancodes33 sends brownie points to @sweetcodinginc and @aka-dev :sparkles: :thumbsup: :sparkles:
:cookie: 314 | @aka-dev |http://www.freecodecamp.org/aka-dev
:cookie: 339 | @sweetcodinginc |http://www.freecodecamp.org/sweetcodinginc
Anas Abdennaim
@Aka-Dev
Mar 06 2018 08:44
@BrianCodes33 you're welcome
Sweet Coding :)
@SweetCodingInc
Mar 06 2018 08:45
@BrianCodes33 my bad
yes, it shouldn't be a string
I just copy pasted it and didn't notice it was wrapped in quotes
Brian
@BrianCodes33
Mar 06 2018 08:46
np @SweetCodingInc
Chantelle Robinson
@chantellerobinson
Mar 06 2018 10:33
Hello, I'm not really sure how the chat works on here to be honest as I've never used it before, but thought it might be a good place to come for some advice. Is there any sort of rules or sticking I should be reading before posting (I couldn't see anything)?
abraham anak agung
@padunk
Mar 06 2018 10:35
@chantellerobinson Hi, here is the rules
Markus Kiili
@Masd925
Mar 06 2018 10:36
@chantellerobinson If you have questions, try to ask on the specif room first and if you don't get help, you can ask in the general chat too.
Chantelle Robinson
@chantellerobinson
Mar 06 2018 10:42
@Masd925 @padunk Thank you for your quick responses! I've read through the rules, and found a more specific room, so I will try on there. Thank you
CamperBot
@camperbot
Mar 06 2018 10:42
chantellerobinson sends brownie points to @masd925 and @padunk :sparkles: :thumbsup: :sparkles:
:cookie: 464 | @padunk |http://www.freecodecamp.org/padunk
:star2: 4716 | @masd925 |http://www.freecodecamp.org/masd925
Markus Kiili
@Masd925
Mar 06 2018 10:47
@chantellerobinson Also, just ask your question on the room when you have one. People don't usually like to answer meta-questions like Can I get some help?, Is there anyone here?, or Any xxx expert around?.
Chantelle Robinson
@chantellerobinson
Mar 06 2018 10:49
@Masd925 Yeah, that makes sense. I have a specific issue I'd like to discuss so that shouldn't be an issue
Markus Kiili
@Masd925
Mar 06 2018 10:49
@chantellerobinson :+1:
Quantomistro3178
@Quantomistro3178
Mar 06 2018 11:41
Guys, we can also use the icons used in the example Pen for the weather app, right? Nothing wrong with it?
h1tag
@h1tag
Mar 06 2018 11:45
@Quantomistro3178 yes
Quantomistro3178
@Quantomistro3178
Mar 06 2018 11:45
@h1tag cool. thnx
CamperBot
@camperbot
Mar 06 2018 11:45
quantomistro3178 sends brownie points to @h1tag :sparkles: :thumbsup: :sparkles:
:cookie: 931 | @h1tag |http://www.freecodecamp.org/h1tag
Quantomistro3178
@Quantomistro3178
Mar 06 2018 11:46
Wish I was that good with css, to be able to make stuff like that.
Fabien SHAN
@X140hu4
Mar 06 2018 11:48
@Quantomistro3178 Get into the 100 days of css :D You will learn a great deal on how powerful CSS can be
Quantomistro3178
@Quantomistro3178
Mar 06 2018 11:51
I've thought of it, but it scares me. I'd never be able to keep up. Up till now, my routine on fCC has been: do a few challenges or a project, and then disappear for weeks and then come back. Not a good strategy, but my brain is always like "Ah, this is gonna take time so I'll try it on a holiday or weekend" which keeps on stretching....
@X140hu4 But hey, I'm trying to change. How do I get into it?
Fabien SHAN
@X140hu4
Mar 06 2018 11:55
@Quantomistro3178 https://100dayscss.com
They are all here. You would have to go to the bottom and go up :)
It may take more than 100 days, but if you persevere you will be able to learn a lot even if you do half.
@Quantomistro3178 Join the 100 days of code challenge too to build your coding habit
Quantomistro3178
@Quantomistro3178
Mar 06 2018 11:59
@X140hu4 Thanks a lot!
CamperBot
@camperbot
Mar 06 2018 11:59
quantomistro3178 sends brownie points to @x140hu4 :sparkles: :thumbsup: :sparkles:
:cookie: 349 | @x140hu4 |http://www.freecodecamp.org/x140hu4
Quantomistro3178
@Quantomistro3178
Mar 06 2018 12:08
Do I go from 1 to 100 or 100 to 1? I can't tell, because they all seem pretty difficult to me....
@X140hu4
Fabien SHAN
@X140hu4
Mar 06 2018 12:10
@Quantomistro3178 There is no real order. Maybe do the 5 first days and then hand pick the rest, your choice. The difficulty is not increasing day after day, it is a bit all over the place
Quantomistro3178
@Quantomistro3178
Mar 06 2018 12:11
@X140hu4 Ah, I see. Is there something like this for JS and other languages too? A little easy though, I'm still learning after all...
Fabien SHAN
@X140hu4
Mar 06 2018 12:12
Only HTML and CSS
Samiul Salehin Pritom
@Pritom-Mazhi
Mar 06 2018 13:27
I copied a bootstrap navbar example code from bootstrap site,but its not working as it should,i get problems with padding.
this kind of problems also happening if i get a navbar example from w3schools.
How to solve this issue? im on google chrome
Luis Graterol
@luisgraterol
Mar 06 2018 13:37
@Pritom-Mazhi be sure to check if the version of Bootstrap your are using is the same as the version of the code you copied from their site or w3schools
Maybe the versions are different
LydaTech
@lydatech
Mar 06 2018 13:41
@Pritom-Mazhi w3schools use bootstrap 3 if you copied the example from getbootstrap.com they are version 4
Raghav Mundra
@Raghav17
Mar 06 2018 13:49
@cmccormack Hey, Sorry. I looged off my computer yesterday. Thanks a lot for fixing things buddy.
CamperBot
@camperbot
Mar 06 2018 13:49
raghav17 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1367 | @cmccormack |http://www.freecodecamp.org/cmccormack
Dirk W du Plooy
@dirkduplooy
Mar 06 2018 14:35
@Pritom-Mazhi you can also check here for Bootstrap Version 4: https://getbootstrap.com/docs/4.0/getting-started/introduction/ and here https://www.w3schools.com/bootstrap4/default.asp
Gustavo Santana
@santanaG
Mar 06 2018 14:42
Is anyone here aware of any APIs for accessing MDN documentation data or something to that extent?
Tai Jones
@taiJones00
Mar 06 2018 14:51
I'm still kind of stuck on this React markdown viewer. Can I have some guidance on even where to start after importing the markdown API
Christopher McCormack
@cmccormack
Mar 06 2018 14:56
@taiJones00 importing the markdown api and using it is the smallest part of that project - do you have your React up and mostly working?
Tom
@moT01
Mar 06 2018 14:56
have an input that listens for an onchange - I think that would do it - and then also have a div or something where the state is whatever is typed in the input - but after you translate it with markdown @taiJones00
Tai Jones
@taiJones00
Mar 06 2018 14:57
I can do that but how would I transfer it to markdown? I tried the markdown.render() method but that didn't work https://codepen.io/taiJones00/pen/NyoGdm
Christopher McCormack
@cmccormack
Mar 06 2018 14:57
@taiJones00 actually using the API is basically setup config if necessary, invoking marked with your mark down text, and using this React method to add it to the DOM
Tai Jones
@taiJones00
Mar 06 2018 14:59
Hm I heard there's a way to do it without dangerouslySetInnerHtml @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 14:59
@taiJones00 then you should teach me once you get it working :) that's how I did it and I haven't used dangerouslySetInnerHtml since
Tai Jones
@taiJones00
Mar 06 2018 15:00
Oh okay i'll hmmm
that might work i'll try again @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 15:01
@taiJones00 I just changed yours slightly and it's working:
  render() {
    const mark = marked('# Marked in browser\n\nRendered by **marked**.');
    return (
      <div>
        <p dangerouslySetInnerHTML={{__html: mark}}></p>
      </div>
    );
  }
Tai Jones
@taiJones00
Mar 06 2018 15:02
WHHAAAA
So I had the write idea just one method away from getting it down
Glass half full @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 15:03
@taiJones00 I believe .renderer is used in your options, not for the text, but I could be wrong
Tai Jones
@taiJones00
Mar 06 2018 15:03
So dangerouslySetInnerHTML is an attribute for an element...
Christopher McCormack
@cmccormack
Mar 06 2018 15:04
@taiJones00 yes react won't let you add html directly without it I believe
Tai Jones
@taiJones00
Mar 06 2018 15:04
Okay. Well markeds text should be set to a changing state okay @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 15:05
Either state or props depending on how you build it, but yeah
Tai Jones
@taiJones00
Mar 06 2018 15:06
Awesome thank you @cmccormack
CamperBot
@camperbot
Mar 06 2018 15:06
taijones00 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1368 | @cmccormack |http://www.freecodecamp.org/cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 15:06
@taiJones00 np
@cmccormack
Okay I got a version that should take in the input of the text area and store that into state and update that for the p element but that's not working. Any idea why?
Christopher McCormack
@cmccormack
Mar 06 2018 15:39
@taiJones00 looking - check your developer console though you have an error
@taiJones00 move your ReactDOM.render to the bottom
Tai Jones
@taiJones00
Mar 06 2018 15:39
No access to the actual error object in development... I'll look that up @cmccormack
Okay
Ohhhhhhh
Silly me I forgot to move it when I uncommented the Textarea
Okay it's working. I'll fix the next issue thank you @cmccormack
CamperBot
@camperbot
Mar 06 2018 15:41
taijones00 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
api offline
Christopher McCormack
@cmccormack
Mar 06 2018 15:42
@taiJones00 np you can also wrap it if you like
window.onload = function() {
  ReactDOM.render(<Markdown />, document.getElementById("app"));
}
then you can put it anywhere in the body script
Tai Jones
@taiJones00
Mar 06 2018 15:42
? Why not keep it in the javaScript @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 15:43
just meant the body of the script, no positional requirement
Tai Jones
@taiJones00
Mar 06 2018 15:45
Oh okay
Now funny thing is it's almost done. Just got to figure out with the \n character is literally showing up but the hashtag is not @cmccormack https://codepen.io/taiJones00/pen/NyoGdm
This might actually be a very short project
I think it's because i'm putting text between the two textarea tags @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 15:48
@taiJones00 are you marking your text again before you render it but after you change your input?
Tai Jones
@taiJones00
Mar 06 2018 15:51
I'm marking up right after the render function starts. Two things are being recognized. The strong tag and the hashtag. The newline is being ignored @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 15:51
@taiJones00 ah I think you're trying to do a new header on the same line - try doing it on a new line
Tai Jones
@taiJones00
Mar 06 2018 15:52
What do you mean?
Nazar
@IsaakNazar
Mar 06 2018 15:52
@cmccormack hi Christopher, can you recommend some good ReactJS cources for beginners?
Christopher McCormack
@cmccormack
Mar 06 2018 15:53
@taiJones00 it seems like even if you do newline character it's still treating that whole line as if you already added a header tag. In your textarea, if you manually hit enter, you can add a new # tag and it will work
Tai Jones
@taiJones00
Mar 06 2018 15:54
Well here's something interesting. When I replace the p with the Viewer component, the text doesn't update. That might be why @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 15:55
@taiJones00 well yeah, you're not passing props
@IsaakNazar I'd suggest starting with the React documentation first and reading it thoroughly, lots of great examples
@IsaakNazar I found that I kept having to go back to the documentation when attempting to watch Learn React type videos on youtube because they weren't thorough enough
Stephen James
@sjames1958gm
Mar 06 2018 15:56
@IsaakNazar level up tuts on youtube or traversy media on youtube
Christopher McCormack
@cmccormack
Mar 06 2018 15:57
@taiJones00 I'm not certain but I think using something like \n in your markdown may not be recommended
Nazar
@IsaakNazar
Mar 06 2018 16:00
@cmccormack @sjames1958gm thx guys
CamperBot
@camperbot
Mar 06 2018 16:00
isaaknazar sends brownie points to @cmccormack and @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 1370 | @cmccormack |http://www.freecodecamp.org/cmccormack
:star2: 9062 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Tai Jones
@taiJones00
Mar 06 2018 16:01
class Viewer extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return <p className=" col-md-offset-1 col-md-5">{this.props.dangerouslySetInnerHTML}</p>;
  }
}
@cmccormack Is this valid
Christopher McCormack
@cmccormack
Mar 06 2018 16:02
@taiJones00 nope
Nazar
@IsaakNazar
Mar 06 2018 16:02
@cmccormack I'm reading the Docs, but those props states etc is little hard to understand , maybe it seems hard at first glance
Christopher McCormack
@cmccormack
Mar 06 2018 16:02
@taiJones00 pass down the marked text then apply dangerouslySetInnerHTML as an attribute of your element not an expression
@IsaakNazar yup, keep reading and reviewing examples, most people will not comprehend it 100% at first
@IsaakNazar but to simplify, state is your stored information in a component, and props is something you receive from a parent
@IsaakNazar Like a todo-list might have state in the top-level component TodoApp that is an object that contains all of the todo items, but pass down as props an individual item to a component like TaskItem or whatever
@IsaakNazar the child component can access and use that state passed down as props, but cannot modify it directly
@IsaakNazar but don't take my word for it, follow the intro! https://reactjs.org/tutorial/tutorial.html
Nazar
@IsaakNazar
Mar 06 2018 16:06
@cmccormack appreciate, thx again :+1:
CamperBot
@camperbot
Mar 06 2018 16:06
isaaknazar sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
api offline
Tai Jones
@taiJones00
Mar 06 2018 16:10
<h1>Hello, my name is: {this.props.name}/ </h1> Isn't this similar to my method of passing in state @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 16:11
@taiJones00 dangerouslySetInnerHTML is meant to be used as an attribute of an element, not props. You can take the marked data, pass it down as props, then assign that value to the attribute, like {__html: this.props.marked}

@taiJones00 so ...
in Markdown component:

<Viewer marked={mark}/>

in Viewer:

render() {
    return <p className=" col-md-offset-1 col-md-5" dangerouslySetInnerHTML={{__html: this.props.marked}}></p>;
  }
knight2
@knight2
Mar 06 2018 16:15
@kbaig i'm still stuck on this amination keyframes issue. No idea why the animation fails to load after state changes. I tried transition library but says it isn't working. I think the best thing is just to use normal keyframes. I tried doing something like this
class QuoteMove extends React.Component{
   render(){
     return (
        <div className="fadeIn" id="text">
          <p>{this.props.quote}</p>
        </div>
   );
   }
}
and then inside the main render react i'd have
        <QuoteMove quote={this.state.quote} />
Which works, again, on the first render of the webpage, but if you change the state, it will render the new state fine, but it will not play the fadeIn animation tied to that class.
I'm just giving up on trying to force React to do keyframe animations on changes on internal state. https://codepen.io/knight2/pen/QQodyJ?editors=0011 If anyone has ANY idea with clear examples on how to properly do it, i'd be all ears.
I don't see how my workaround solution is any different from this person's
function HelloWorld({onClick}) {
   return (
      <div className="fade-in">
         <h1>Hello World!</h1>
         <button type="button" onClick={onClick}>Next</button>
      </div>
   );
}

function GoodEvening({onClick}) {
   return (
      <div className="fade-in">
         <h1>Good evening</h1>
         <button type="button" onClick={onClick}>Previous</button>
      </div>
   );
}

class Test extends React.Component {
  constructor() {
    super();
    this.state = {
      toggle: false
    }
     this.toggle = this.toggle.bind(this);
  }

  toggle() {
    this.setState({
      toggle: !this.state.toggle
    })
  }

  render() {
    return this.state.toggle ?
       <GoodEvening onClick={this.toggle}/> :
       <HelloWorld onClick={this.toggle}/>;
  }
}

ReactDOM.render(
  <Test/>,
  document.getElementById('root')
);
Tom
@moT01
Mar 06 2018 16:45
@knight2 i think the difference is that in the test - the element gets added and removed - triggering the animation
and in yours you just change the text of the current element
KasimkhanAydin
@KasimkhanAydin
Mar 06 2018 16:54
Hello everyone . Why my browser doesnt see my own body style and but look something called reboot.scss ? http://prntscr.com/inomt0
rdollent
@rdollent
Mar 06 2018 16:56
@KasimkhanAydin put your style.css after reboot.scss in your head
say,
<head>
<link rel="stylesheet" href="/reboot.scss">
<link rel="stylesheet" href="/style.css">
</head>
matty001
@matty001
Mar 06 2018 17:04

andbody see any problems with this?

@font-face {
font-family: 'LeagueSpartan';
src: url(https://github.com/matty001/matty001.github.io/raw/master/LeagueSpartan.otf) format("opentype");
}

Darren
@DarrenfJ
Mar 06 2018 17:06
morning fCC
or whatever timezone yer in ;)
Christopher McCormack
@cmccormack
Mar 06 2018 17:14
@DarrenfJ yo
Darren
@DarrenfJ
Mar 06 2018 17:25
@cmccormack yo :D
Aycreativ
@Aycreativ_twitter
Mar 06 2018 17:26
Please can someone tell me how to use this room effectively. I am here to learn and as we contribute.
Christopher McCormack
@cmccormack
Mar 06 2018 17:30
@Aycreativ_twitter ask questions if you have frontend questions - answer them as you are able to
Tai Jones
@taiJones00
Mar 06 2018 17:31
https://codepen.io/taiJones00/pen/NyoGdm Okay it's pretty much working. Why isn't \n working again? @cmccormack
Okay so \n does work when the browser first loads. It's only not working when work with the textarea is invloved. I'll look there @cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 17:35
@taiJones00 it's most likely parsing it as text once it reads it from the textarea. I'm not sure why, if you're using a textarea, you would want to include newline escape characters
I don't think markdown parses these
@taiJones00 you could test this by logging what the value of your text is at every step of the way
Christopher McCormack
@cmccormack
Mar 06 2018 17:41
@taiJones00 ah one problem is you aren't properly using your input textarea - you should be passing down the input text from state as a prop to your textarea and using the value attribute
Christopher McCormack
@cmccormack
Mar 06 2018 17:42
Tai Jones
@taiJones00
Mar 06 2018 17:42
I GOT IT FIRST
YEEESSSS
Christopher McCormack
@cmccormack
Mar 06 2018 17:42
@taiJones00 haha great!
Tai Jones
@taiJones00
Mar 06 2018 17:42
Whew. Awesome it should work better now. Thank you @cmccormack
CamperBot
@camperbot
Mar 06 2018 17:42
taijones00 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1371 | @cmccormack |http://www.freecodecamp.org/cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 17:43
@taiJones00 yup np, that's a pretty important react concept to remember for forms so glad you figured it out
Tai Jones
@taiJones00
Mar 06 2018 17:43
yeet
Nick
@rhozeta
Mar 06 2018 17:55

Can anyone tell me how I would find the _id of a Mongo entry based on which of the entries is clicked in a list?

Looking to have a list of post titles on one side, and when you click the title it renders that post body in a new div.

knight2
@knight2
Mar 06 2018 18:00
@moT01 so how would I go about making it remove and add the element? There needs to be the element there at all times of changes.
@rhozeta You have the post title right? So just search for the matching _id in mongodb that matches the post title
Christopher McCormack
@cmccormack
Mar 06 2018 18:02
@rhozeta you can add a click handler to the list entry and use some attribute as the value you would want to lookup in your db
knight2
@knight2
Mar 06 2018 18:02
^or that, add on the _id value somewhere for when you create the post titles.
Nick
@rhozeta
Mar 06 2018 18:03
@knight2 its possible in this situation for many posts to have the same title, so idk if that would work
Connor
@cresharper
Mar 06 2018 18:05
Can this room be used for help on non-related FCC projects?
Christopher McCormack
@cmccormack
Mar 06 2018 18:05
@rhozeta you need to add something that you can look up off of
knight2
@knight2
Mar 06 2018 18:06
if post title isn't unqiue, then yes, you need to add some unique value to look it up
Christopher McCormack
@cmccormack
Mar 06 2018 18:06
@rhozeta even if it's a data-* attribute that contains some unique item like _id
Nick
@rhozeta
Mar 06 2018 18:06
What I am trying to do is grab the id of the "clicked" post, is there no way to do this? ie. "this.post._id"?
Christopher McCormack
@cmccormack
Mar 06 2018 18:07
@rhozeta sure, use the click event handler, event.target.id
knight2
@knight2
Mar 06 2018 18:08
Oh you didn't say that the item had the attribute ._id as part of it. ^above works.
Tom
@moT01
Mar 06 2018 18:08
@knight2 what if there were two elements there and you flipped back and fourth
Tai Jones
@taiJones00
Mar 06 2018 18:08
@cmccormack Time for design. Any suggestions? https://codepen.io/taiJones00/pen/NyoGdm
Nick
@rhozeta
Mar 06 2018 18:09
@knight2 @cmccormack I am talking about the mongo attribut _id that you'd access in mongo shell
knight2
@knight2
Mar 06 2018 18:10
The user is not accessing anything from the mongo shell.
Christopher McCormack
@cmccormack
Mar 06 2018 18:10

@rhozeta

What I am trying to do is grab the id of the "clicked" post, is there no way to do this? ie. "this.post._id"?

Do you want the id from the element or from the db? When you build the items, can you also add an attribute from your db?
knight2
@knight2
Mar 06 2018 18:10
@moT01 doesn't work with the purpose of the app.
Tom
@moT01
Mar 06 2018 18:11
@cresharper you can ask if you want - someone might help
@knight2 why not
Nick
@rhozeta
Mar 06 2018 18:11
@cmccormack i want the id from the DB so that I can fetch the post.body of the clicked post, and display it in another fiv
div*
Christopher McCormack
@cmccormack
Mar 06 2018 18:12
@rhozeta so add something to your element that is unique from your DB so you can provide that as part of your criteria
Are you building your elements initially from data in your db?
knight2
@knight2
Mar 06 2018 18:12
@moT01 Element is some text. If user clicks a button, it changes the element text to a random new text. Where exactly would flipping twoelements work into this user story?
Christopher McCormack
@cmccormack
Mar 06 2018 18:13
@taiJones00 like visual design? You're asking the wrong guy. Might need a different color on the output, contrasts a little funky
knight2
@knight2
Mar 06 2018 18:13
@taiJones00 try http://paletton.com for colors.
Christopher McCormack
@cmccormack
Mar 06 2018 18:13
@taiJones00 maybe something like rgb(100, 239, 255)
Tom
@moT01
Mar 06 2018 18:14
just like in your other test example or whatever - put them on top of each other - you would still need to change the text, but yea that's probly not the way to go
Tai Jones
@taiJones00
Mar 06 2018 18:14
Maybe this background style isn't the best choice either. I was going for a text editor but Idk
Nick
@rhozeta
Mar 06 2018 18:15
@cmccormack Yes the elements are built from the DB
knight2
@knight2
Mar 06 2018 18:16
so when you return whatever variables from the DB, add on the _id
Tai Jones
@taiJones00
Mar 06 2018 18:16
AHHHH
It looks like candy now!
Yaaas
knight2
@knight2
Mar 06 2018 18:16
then do what @cmccormack suggested for event on click or whatever
Christopher McCormack
@cmccormack
Mar 06 2018 18:17
@knight2 that won't work unless he's already adding something unique to each element from the db though
knight2
@knight2
Mar 06 2018 18:17
all elements added to a db have a id
Christopher McCormack
@cmccormack
Mar 06 2018 18:17
@rhozeta any reason you can't make your element id the same as your db _id?
Tom
@moT01
Mar 06 2018 18:17
i would switch my animation to a transition - and set the opacity property in your getQuote function - and use a timeout to set the opacity again...
getQuote {
  opacity=0
  setTimeout{
    change text()
    opacity=1;
  , lengthoftransition}
}
@knight2
i think that might work
Nick
@rhozeta
Mar 06 2018 18:20
@cmccormack no, but my entire issue is that I do not know how to query for the selected elements db _id.
Christopher McCormack
@cmccormack
Mar 06 2018 18:20
@rhozeta if you add the _id to the element's id, then you can use a click handler to get the id - one sec I'll show an example
Nick
@rhozeta
Mar 06 2018 18:24
@cmccormack yeah, I totally know what you're saying and get the logic I just can't seem to find the syntax for querying in JS using selected instead of already having the _id
@cmccormack thanks
CamperBot
@camperbot
Mar 06 2018 18:24
rhozeta sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1372 | @cmccormack |http://www.freecodecamp.org/cmccormack
Christopher McCormack
@cmccormack
Mar 06 2018 18:25
@rhozeta I'm still not 100% certain I know what you're trying to do but let me know if this helps
Nick
@rhozeta
Mar 06 2018 18:43
@cmccormack hey, I figured it out. since I am using Vue.js, they actually have a system for list rendering that provides an index for me to use. Thanks for your help though!
CamperBot
@camperbot
Mar 06 2018 18:43
rhozeta sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
api offline
Nick
@rhozeta
Mar 06 2018 18:43
If you're curious take a look here, its actually pretty nice https://vuejs.org/v2/guide/list.html
Tai Jones
@taiJones00
Mar 06 2018 18:45
Christopher McCormack
@cmccormack
Mar 06 2018 18:45
@rhozeta will that key be usable when you've rendered the page?
@taiJones00 maybe make the input smaller and the output bigger?
Nick
@rhozeta
Mar 06 2018 18:46
@cmccormack it appears so, I have it displaying the index beside each post title right now
KasimkhanAydin
@KasimkhanAydin
Mar 06 2018 18:47
@rdollent Thanks. but I dont have reboot.scss . I even dont know what is it . Im using bootstrap css html only .
CamperBot
@camperbot
Mar 06 2018 18:47
kasimkhanaydin sends brownie points to @rdollent :sparkles: :thumbsup: :sparkles:
:cookie: 338 | @rdollent |http://www.freecodecamp.org/rdollent
Gulsvi
@gulsvi
Mar 06 2018 18:47
@rhozeta We don't learn VueJS in Free Code Camp, but there's a large community for Vue here on Gitter at: https://gitter.im/vuejs/vue
@KasimkhanAydin Reboot is a collection of css styles included with bootstrap - it helps ensure bootstrap looks the same on every browser. It's similar to normalize.css in case you've heard of that. http://getbootstrap.com/docs/4.0/content/reboot/
Nick
@rhozeta
Mar 06 2018 19:05
@gulsvi I completed FCC, but this community is the best for getting help by far
Gulsvi
@gulsvi
Mar 06 2018 19:08
about @rhozeta
CamperBot
@camperbot
Mar 06 2018 19:08
:cookie: 205 | @rhozeta |http://www.freecodecamp.org/rhozeta
Connor
@cresharper
Mar 06 2018 19:08
Hey All - I need some help with a location.replace() event. Basically I have a piece of code that on click of a button, it replaces parameters of a URL with a checkbox value. The code looks like this:
Nick
@rhozeta
Mar 06 2018 19:09
Dif acct ;)
Gulsvi
@gulsvi
Mar 06 2018 19:09
;)
Anyway, just trying to point you somewhere with more people who know vue
This chat room is for help with the front end projects in free code camp, and as you know, those don't use vue :)
Nick
@rhozeta
Mar 06 2018 19:09
@gulsvi thanks
CamperBot
@camperbot
Mar 06 2018 19:09
rhozeta sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2648 | @gulsvi |http://www.freecodecamp.org/gulsvi
Gulsvi
@gulsvi
Mar 06 2018 19:10
No reason they can't though, in case you're re-doing them with Vue
Connor
@cresharper
Mar 06 2018 19:10
$("#apply-filter").click(function() {
    filterSite = location.host + location.pathname + location.search;
    filterSelection = $('.search-filter-dialog input[type="checkbox"]:checked').val()
    filterUrl = window.location.href;
    filterUrl = filterSite + '&site=' + filterSelection + '&page=1';
    console.log(filterUrl);
    location.replace('http://' + filterUrl);
  });
The expected behavior here is that on click of "apply-filter" it gives a new URL with the new parameters but instead it jst adds the new parameters on to the existing link
Nick
@rhozeta
Mar 06 2018 19:10
No, this isn't an FCC project
Just something I'm playing around with
Connor
@cresharper
Mar 06 2018 19:11
I thought location.replace() replaced the whole URL? If I console log the filterUrl variable I can see that it spits out a new URL everytime, so howcome it's not doing that in the browser? Anyone have any ideas?
Gulsvi
@gulsvi
Mar 06 2018 19:13
@cresharper I'm going to guess you need to store the new URL in a variable and then navigate there explicitly
Or something like: window.open(location.replace('http://' + filterUrl));
Connor
@cresharper
Mar 06 2018 19:15
@gulsvi my gripe with that is I want it to stay on the current tab/page which is why I want to use location.replace()
Also my variables are declared outside of the function scope, FYI
https://developer.mozilla.org/en-US/docs/Web/API/Location/replace - this says "The Location.replace() method replaces the current resource with the one at the provided URL." Considering in the console log debug line, it spits out the correct URL everytime, it should use that method to replace it with the new one...
So the way they're describing it is very misleading or there's something wrong with my code that 'm missing
Gulsvi
@gulsvi
Mar 06 2018 19:18
@cresharper have you tried window.location = location.replace('http://' + filterUrl);?
Connor
@cresharper
Mar 06 2018 19:18
@gulsvi no - hold on
Gulsvi
@gulsvi
Mar 06 2018 19:18
I'd have to play around with the code a bit more - have not tried what you're attempting, so just a suggestion
Connor
@cresharper
Mar 06 2018 19:20
So that returns undefined because I think you're assinging 2 different events to each other
Gulsvi
@gulsvi
Mar 06 2018 19:25
@cresharper This seems to work for me:
var newUrl = location.replace('http://' + filterUrl);
window.location.href = newUrl;
but without seeing your code, not sure if it will work for you. I do get an in-place redirect with that though
Connor
@cresharper
Mar 06 2018 19:28
You
you're most recent suggestiong throws undefined

Doing it like this:

$("#apply-filter").click(function() {
    filterSite = location.host + location.pathname + location.search;
    filterSelection = $('.search-filter-dialog input[type="checkbox"]:checked').val()
    filterUrl = filterSite + '&site=' + filterSelection + '&page=1';
    console.log(filterUrl);
    window.location = filterUrl;
  });

Is the closest, but now the window.location method doesn't fire. It just console.logs it. I even tried filterUrl.toString() but that didn't do anything

German Gamboa Gonzalez
@germangamboa95
Mar 06 2018 19:33
Made a todo app that saves to firebase database. It also saves to your local storage and uses it as a fallback incase firebase is down or you lose connection.
coderNewby
@coderNewby
Mar 06 2018 19:34
@DarrenfJ thanks for the PM
CamperBot
@camperbot
Mar 06 2018 19:34
codernewby sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2415 | @darrenfj |http://www.freecodecamp.org/darrenfj
German Gamboa Gonzalez
@germangamboa95
Mar 06 2018 19:34
Can I get some feedback on my spaghetti?
Tai Jones
@taiJones00
Mar 06 2018 19:39
Good. It's responsive and looks clean @germangamboa95
  1. Try adjusting the fonts. For example, a cursive font for the title font my look nice since it matches the theme of the words
  2. Add something like marginTop to the title to give some breathing room. The placeholder for the input box isn't giving clear directions.
  3. Try putting something simple like Enter task or something idk.
  4. Make the subtext cleaner. No exclamation point and the same thing but capitalize the first of every word
Gulsvi
@gulsvi
Mar 06 2018 19:42
@cresharper window.location.href = filterUrl; (the href is important there)
German Gamboa Gonzalez
@germangamboa95
Mar 06 2018 19:45
@taiJones00 thanks!
CamperBot
@camperbot
Mar 06 2018 19:45
germangamboa95 sends brownie points to @taijones00 :sparkles: :thumbsup: :sparkles:
:cookie: 268 | @taijones00 |http://www.freecodecamp.org/taijones00
Boris-the-Llama
@Boris-the-Llama
Mar 06 2018 19:45
hello!! is anyone here?
oh yes i can see ppl. ive made the twitch tv api but it looks really ugly! :cry:
German Gamboa Gonzalez
@germangamboa95
Mar 06 2018 19:49
@taiJones00 I added those fixes.
@Boris-the-Llama but does it work?
Stephen James
@sjames1958gm
Mar 06 2018 19:49
@Boris-the-Llama been there, working but ugly.
Vikash Saini
@Enigma10
Mar 06 2018 19:50
Hello all
Boris-the-Llama
@Boris-the-Llama
Mar 06 2018 19:51
i seem to have broken it now! it was working
Gulsvi
@gulsvi
Mar 06 2018 19:51
@Boris-the-Llama Cards seem to work well for Twitch. Bootstrap has some cool ones you can use. I chose to make simple ones without bootstrap and think it looks okay https://codepen.io/gulsvi/pen/prrOvy
Maybe some ideas to try
Vikash Saini
@Enigma10
Mar 06 2018 19:52
Hello , i need help with my ajax call
Gulsvi
@gulsvi
Mar 06 2018 19:52
I think it helps to use the same colors that twitch uses on their website - gives it some consistency... but I'm no designer
Vikash Saini
@Enigma10
Mar 06 2018 19:53
    var questions = []
    var request = new XMLHttpRequest();
    request.open('GET', 'https://cdn.rawgit.com/santosh-suresh/39e58e451d724574f3cb/raw/784d83b460d6c0150e338c34713f3a1c2371e20a/assignment.json', true);
    request.send();
    request.onload = function() {
        if (request.status >= 200 && request.status < 400) {
            // Success!
            questions = JSON.parse(request.responseText);
            console.log(questions)
        } else {
            // We reached our target server, but it returned an error
        }
    };
    console.log("hello",questions)
questions is coming as empty array in last console.log
Boris-the-Llama
@Boris-the-Llama
Mar 06 2018 19:54
that looks really good @gulsvi thanks
CamperBot
@camperbot
Mar 06 2018 19:54
boris-the-llama sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2649 | @gulsvi |http://www.freecodecamp.org/gulsvi
Boris-the-Llama
@Boris-the-Llama
Mar 06 2018 19:54
my problem is the jquery/css
Christopher McCormack
@cmccormack
Mar 06 2018 19:54
@Enigma10 ajax request is asynchronous so questions will be empty when that line is executed. Anything you want after the ajax call will have to be in your success function
im trying to use flexbox but its difficult to get the layout right
Vikash Saini
@Enigma10
Mar 06 2018 19:55
@cmccormack ohh yes ...Thanks
CamperBot
@camperbot
Mar 06 2018 19:55
enigma10 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1373 | @cmccormack |http://www.freecodecamp.org/cmccormack
Gulsvi
@gulsvi
Mar 06 2018 20:13
@Enigma10 You can wrap your request in a Promise if you want to log the data outside of the request:
function makeRequest() {
  return new Promise((res, rej) => {
    const url = "https://cdn.rawgit.com/santosh-suresh/39e58e451d724574f3cb/raw/784d83b460d6c0150e338c34713f3a1c2371e20a/assignment.json";
    const xhr = new XMLHttpRequest();
    xhr.open("GET", url, true);
    xhr.onload = () =>
      xhr.status >= 200 && xhr.status < 400
        ? res(JSON.parse(xhr.responseText))
        : rej(xhr.statusText);
    xhr.send();    
  });
}

makeRequest().then(questions => console.log("hello", questions));
Connor
@cresharper
Mar 06 2018 20:16
@gulsvi it still doesn't work when I do that...
Gulsvi
@gulsvi
Mar 06 2018 20:17
@cresharper Sorry :/ if you share your code, I could take a closer look and try to look into other options
Connor
@cresharper
Mar 06 2018 20:17
Let me put together a JSfiddle. Hang tight...
Amandeep Singh
@adsingh14
Mar 06 2018 20:18
Hi!
Any body help me to integrate github with fcc a/c?
???
Gulsvi
@gulsvi
Mar 06 2018 20:20
@adsingh14 What's the problem?
Amandeep Singh
@adsingh14
Mar 06 2018 20:20
hey! I signup fcc with mail id which I used for github
but after signup, I linked my github a/c with fcc
but github doesn't show my fcc progress/repo.
Am I doing something wrong ?
Gulsvi
@gulsvi
Mar 06 2018 20:22
@adsingh14 Nope, it looks like you have everything set up. If you want a repository with your FCC progress, you will have to do that manually.
Amandeep Singh
@adsingh14
Mar 06 2018 20:22
...
Gulsvi
@gulsvi
Mar 06 2018 20:22
...
Amandeep Singh
@adsingh14
Mar 06 2018 20:22
how ?
Gulsvi
@gulsvi
Mar 06 2018 20:22
You create the repository, create a file with your solution(s) and upload them to your repository
Amandeep Singh
@adsingh14
Mar 06 2018 20:23
what about tracker ?
Gulsvi
@gulsvi
Mar 06 2018 20:23
I think some people have created tools that help with it, but Free Code Camp doesn't offer any official ways to get your progress uploaded to github
Amandeep Singh
@adsingh14
Mar 06 2018 20:23
fcc grid is different from github
Connor
@cresharper
Mar 06 2018 20:23
Nevermind, jsfiddle is down
Gulsvi
@gulsvi
Mar 06 2018 20:23
The tracker is on your profile page for Free Code Camp, not on github: https://www.freecodecamp.org/adsingh14
Github is only used as a login authentication method with free code camp - and for chatting here in gitter
@cresharper https://codepen.io?
No need for an account, just open this link to enter your code and save it to get a URL: https://s.codepen.io/pen?editors=0012
Amandeep Singh
@adsingh14
Mar 06 2018 20:25
Is it okay to unlink github account from fcc then ?
Connor
@cresharper
Mar 06 2018 20:26
@gulsvi I'm not really sure how to replicate this code in that type of an environment, since it involves appending parameters to a URL...
Gulsvi
@gulsvi
Mar 06 2018 20:26
@adsingh14 I'm guessing if you log in with an email + password already, you do not need github and can unlink it, yes.
Amandeep Singh
@adsingh14
Mar 06 2018 20:26
thanks @gulsvi
CamperBot
@camperbot
Mar 06 2018 20:26
adsingh14 sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2650 | @gulsvi |http://www.freecodecamp.org/gulsvi
Amandeep Singh
@adsingh14
Mar 06 2018 20:27
& what about the portfolio task ? How can i identify which API/plugins should i use for that task?
Gulsvi
@gulsvi
Mar 06 2018 20:28
@adsingh14 If you aren't sure, just use Bootstrap since that's what we're taught. No need to find other things we haven't learned about yet.
Dinner time for me... I gotta go... good luck!
Amandeep Singh
@adsingh14
Mar 06 2018 20:30
good night!
Rob
@s31181
Mar 06 2018 20:53
Hi Everyone, was just wondering if anyone knew anything about font and font licensing. I have a design that wants to use a font that's installed on Mac's "Mayanmar MN" - I've exported the .ttc file and using it on the prototype (for styling purposes). I know some fonts are paid. Couldn't find any documentation on whether or not the "Apple Fonts" are fair game. My assumption is no.
Christopher McCormack
@cmccormack
Mar 06 2018 21:04
@s31181 go with your gut
Rob
@s31181
Mar 06 2018 21:09
thanks! @cmccormack
CamperBot
@camperbot
Mar 06 2018 21:09
s31181 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1374 | @cmccormack |http://www.freecodecamp.org/cmccormack
Ugur Ozcelik
@ugurozcelik
Mar 06 2018 21:26
https://codepen.io/ugurozcelik/pen/EQzxqK guys i couldnt figure out why my portfolio page act different when i try to make columns. Second and third blue section become smaller how could i prevent that? thank in advance
Gulsvi
@gulsvi
Mar 06 2018 22:03

@ugurozcelik You are missing two closing </div> tags for your portfolio section. Add:

  </div>
</div>

before your <div id="Contact" class="tabcontent">

Leigh Hobson
@leighhobson89
Mar 06 2018 22:12
Hi, does anyone have any idea why a html page that retrieves live API queries as you type a string in a search box works fine if it is saved as a .html file and run from the desktop, but the exact same code doesnt work when its in codepen? A bit general I know, but is there any known reason with Codepen why this might be?
Stephen James
@sjames1958gm
Mar 06 2018 22:13
@leighhobson89 Could be CORS issue, or http vs. https issue (if the API is http then it won't work from codepen)
Can someone please help me on this ?
Leigh Hobson
@leighhobson89
Mar 06 2018 22:13
thanks I'll try using a proxy then
Stephen James
@sjames1958gm
Mar 06 2018 22:14
@mananshah51 What;s the challenge
Manan Shah
@mananshah51
Mar 06 2018 22:14
Make Objects Properties Private.
Stephen James
@sjames1958gm
Mar 06 2018 22:14
I mean what part is challenging you.
Manan Shah
@mananshah51
Mar 06 2018 22:15
I am having a hard time understanding Object Oriented Programming concepts.
Leigh Hobson
@leighhobson89
Mar 06 2018 22:15
ahh yes I was missing a single 's' in my code right after 'http' - makes all the difference, thanks @sjames1958gm lol
CamperBot
@camperbot
Mar 06 2018 22:15
leighhobson89 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9064 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
Mar 06 2018 22:15
@leighhobson89 :+1:
@mananshah51 This challenge is having you hide a "property" value within a constructor function where you
fetch or modify through two functions.
Ugur Ozcelik
@ugurozcelik
Mar 06 2018 22:22
thanks @gulsvi
CamperBot
@camperbot
Mar 06 2018 22:22
ugurozcelik sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
api offline
Garo
@Garabed96
Mar 06 2018 22:48
Can someone please help me I've been stuck on this problem for like 4 hours, I think it's an import or something that's messing it all up. I'm just trying to get this modal to pop up.
Tiago Correia
@tiagocorreiaalmeida
Mar 06 2018 22:54
@Garabed96 is your state changing?
Garo
@Garabed96
Mar 06 2018 22:56
I believe so
Tiago Correia
@tiagocorreiaalmeida
Mar 06 2018 22:59
I dont think I have used react-bootstrap before, im doing a few stuff for now probably in 40min will try to clone your repository and test out just by looking at the code I get a bit lost
<Modal
        show={this.state.show}
what happens if you change show to true?
write true there and see if the modal starts opened
Garo
@Garabed96
Mar 06 2018 23:25
nothing
I think its some import or something
Heathercoraje
@Heathercoraje
Mar 06 2018 23:40
Hi friends, I have a question regarding deploying an app with DB. So like I was writing code on codeanywhere where I can use mysql,php without downloading Apache and it offers preview run where I can see the app. it also gives some sort of url which is not accessible when I close the code editor page. I am guessing this url does not mean that it is being deployed. Does anyone know about Codeanywhere?
Also, what would be simple and stable way to deploy app with server/DB?
(by the way good morning, it is 8 AM in my time zone :D)
Garo
@Garabed96
Mar 06 2018 23:41
@tiagocorreiaalmeida alright thank you
CamperBot
@camperbot
Mar 06 2018 23:41
garabed96 sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 506 | @tiagocorreiaalmeida |http://www.freecodecamp.org/tiagocorreiaalmeida
Brad
@bradtaniguchi
Mar 06 2018 23:44
@Heathercoraje The easiest current way to deploy your full stack would be to use a cloud server(AWS/Google/Microsoft). You still have to setup the environment, and migrate everything (all the ops stuff). Or you could split up your stack (host your DB somewhere else, maybe in the same cloud)
Its possible one of the cloud providers offers your stack as like a default or something, so you don't have to setup as much if anything