Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Pagnito
@Pagnito
how?
Gulsvi
@gulsvi
It's a promise object - it can't be accessed directly
Pagnito
@Pagnito
so how do i resolve it?
Gulsvi
@gulsvi
I'd have to see the code - but usually a .then(function(data) {})
Pagnito
@Pagnito
k hold on
i did that tho
Gulsvi
@gulsvi
Or, through Promise.resolve()
Pagnito
@Pagnito
class App extends React.Component {
  constructor(props){
    super(props)
    this.state = {
        leaders: []
    }
    this.handleShit = this.handleShit.bind(this);
    this.getLeadersList = this.getLeadersList.bind(this);
    this.getLeadersList()
  }
  getLeadersList(){
    fetch('https://fcctop100.herokuapp.com/api/fccusers/top/recent').then(listObj => {
      console.log(this.state.leaders.PromiseValue)
      this.setState({leaders: listObj.json()})
    }).catch(function(error) {
    console.log('Request failed', error);
  });
  }
  handleShit() {
    console.log(this.state.leaders)
  }
  render(){
    return (
      <div onClick={this.handleShit}>
          wtf

      </div>
    )
  }
}
ReactDOM.render(<App />, document.getElementById('jeff'));
Gulsvi
@gulsvi
@Pagnito fetch.then(res => res.json()).then(listObj =>
fetch always needs to parse the json in the initial response first with .then(res => res.json())
brb
Pagnito
@Pagnito
@SkyC0der saved the day!
John
@AnonymousLords
Hey guys i need help on a little math here
What would this mean? I'm using a forza tuning calculator & i dont know what this means. Its mathso you guys might be able to help
`Enter the strength in the form of whole percentage. The accepted Range is 1 to 200 (in increments of 1), where 100 = 100%. 100% represents default calculator output.
My front spring is 819.8 Pounds, so how would i turn that into a percentage?
Tom
@moT01
there must be some formula or something the percent is based off anyway
John
@AnonymousLords
The tutorial i found on youtube just skips this part, so i'm completely confused on what i should enter.
Should i link the site? It says "Not secure" so im not sure...
Tom
@moT01
are you making a calculator or tuning your car
John
@AnonymousLords
Tuning the car
Gulsvi
@gulsvi
@AnonymousLords They have a discord community - probably best to ask them over there
John
@AnonymousLords
Can you link it :P
Gulsvi
@gulsvi
It's on the top, right-hand corner of the calculator
John
@AnonymousLords
O
Gulsvi
@gulsvi
U2SC Discord
John
@AnonymousLords
Okay ill try it
Kingsley
@Kingwindie
can someone help me explain these lines of code,the one with the e.target.value,what is the e and the target doing?
document.getElementById('milesInput').addEventListener('input' , function(e){
var userInput = e.target.value;
John
@AnonymousLords
Thanks @SkyC0der @moT01
CamperBot
@camperbot
anonymouslords sends brownie points to @skyc0der and @mot01 :sparkles: :thumbsup: :sparkles:
:star2: 2518 | @skyc0der |http://www.freecodecamp.com/skyc0der
:cookie: 802 | @mot01 |http://www.freecodecamp.com/mot01
Elizabeth Paul
@Kowalatam
ehmm.. so for the calculations to work, im confused on how to look at it :( https://codepen.io/Kowalatam/pen/oeqrxa
Abhinav Mishra
@abhinav-m
@Kowalatam e is the event passed in your anonymous function
e.target represents the dom node
e.target.value represents the value of that
oops i mean @Kingwindie
John
@AnonymousLords
@Kowalatam Wheres the enter button :P
Elizabeth Paul
@Kowalatam
@AnonymousLords i'm unsure what u mean, but to see the result, u are supposed to press EXE
John
@AnonymousLords
EXE isnt working for me?
Elizabeth Paul
@Kowalatam
@AnonymousLords lol, that was part of my question lol
John
@AnonymousLords
lol
Kingsley
@Kingwindie
@abhinav-thinktank thanks
CamperBot
@camperbot
kingwindie sends brownie points to @abhinav-thinktank :sparkles: :thumbsup: :sparkles:
:cookie: 520 | @abhinav-thinktank |http://www.freecodecamp.com/abhinav-thinktank
Elizabeth Paul
@Kowalatam
i dunno how to do that part yet lol
John
@AnonymousLords
:)
Elizabeth Paul
@Kowalatam
/ havn't gotten there
John
@AnonymousLords
Okay