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
Tim Handy
@TimHandy
@alhazen1 I don't understand why one gets bigger whilst the other gets smaller, nor do i understand why they change size at all!
grantknaver
@grantknaver
im trying right now to offset the inputs at the end of my page but it wont allow me to. The inputs I am targeting have the class .contactFields
d wilder
@alhazen1
@TimHandy Hmmm... I'm not seeing that. I've tried it with and without a refresh of the screen and your name and h2 both seem to be same size as on large screen
Tim Handy
@TimHandy
@alhazen1 hmm, and you're on mobile view in dev tools?
and then you make the viewport window narrow?
d wilder
@alhazen1
@TimHandy Yes. Not sure what to tell you but that is a head scratcher
Tim Handy
@TimHandy
@alhazen1 OK, thanks for looking
CamperBot
@camperbot
timhandy sends brownie points to @alhazen1 :sparkles: :thumbsup: :sparkles:
:cookie: 396 | @alhazen1 |http://www.freecodecamp.com/alhazen1
d wilder
@alhazen1
@TimHandy you're welcome. I looked in Firefox too and looked good there also. Just as a precaution maybe you should try restarting the browser - maybe??
Tim Handy
@TimHandy
Yeah, I'll give that a go, and try it on another machine also. cheers
JD Tadlock
@jdtdesigns
@TimHandy what are you trying to achieve? centering inputs and submit button?
Tim Handy
@TimHandy
@jdtdesigns it was @grantknaver , not me :-)
JD Tadlock
@jdtdesigns
ah, sorry :P
JD Tadlock
@jdtdesigns
@grantknaver This is how you can center a group of inputs http://jsbin.com/juriziravu/edit?html,css,output
Ashish Acharya
@anarchyrucks
var Leaderboard = React.createClass({
  getInitialState: function(){
    return{
      type: "recent"
    }
  },
  showAllTime:function(){
    this.setState({type: "alltime"})
  },
  render: function() {
    return(
      <div>
        <div id="title">Leaderboard</div>
        <div className="container">
          <table className="table table-responsive">
            <thead>
              <tr>
                <th>#</th>
                <th>Camper's Name</th>
                <th className="recent" onClick={this.showRecent}>Points in last 30 days</th>
                <th className="alltime" onClick={this.showAllTime}>All time points</th>
              </tr>
            </thead>
            <Table url={this.props.url + this.state.type}/>
          </table>
        </div>
      </div>
    )
  }
});
why doesn't it update the table ??
Stephen James
@sjames1958gm
@anarchyrucks Are you getting an error that showRecent is not defined?
Ashish Acharya
@anarchyrucks
no
i forgot to type that
var Table = React.createClass({
  getInitialState: function(){
    return{
      data: []
    }
  },
  componentDidMount: function(){
     $.ajax({
      url: this.props.url,
      dataType: 'json', 
      cache: false,
      success: function(data) {
        this.setState({data: data});
      }.bind(this),
      error: function(xhr, status, err) {
        console.error(this.props.url, status, err.toString());
      }.bind(this)
    });
  },
  render: function(){
    return(
      <tbody className="table-striped">
        {
          this.state.data.map(function(value, index){
            return(
              <tr>
                <th>{index + 1}</th>
                <th><img src={value.img} />{value.username}</th>
                <th>{value.recent}</th>
                <th>{value.alltime}</th>
              </tr>
            )
          })
        }
      </tbody>
    )
  }
});

var Leaderboard = React.createClass({
  getInitialState: function(){
    return{
      type: "recent"
    }
  },
  showAllTime:function(){
    this.setState({type: "alltime"})
  },
  showRecent: function(){
    this.setState({type: "recent"})
  },
  render: function() {
    return(
      <div>
        <div id="title">Leaderboard</div>
        <div className="container">
          <table className="table table-responsive">
            <thead>
              <tr>
                <th>#</th>
                <th>Camper's Name</th>
                <th className="recent" onClick={this.showRecent}>Points in last 30 days</th>
                <th className="alltime" onClick={this.showAllTime}>All time points</th>
              </tr>
            </thead>
            <Table url={this.props.url + this.state.type}/>
          </table>
        </div>
      </div>
    )
  }
});
Ananay
@ananaymital
does anybody know how can I test if my github code works or not locally?
Stephen James
@sjames1958gm
@anarchyrucks I am not sure componentDidMount will get called if only props have changed?
Ashish Acharya
@anarchyrucks
@sjames1958gm i just realised you are on the top of the leaderboard haha
Stephen James
@sjames1958gm
@anarchyrucks :)
Ashish Acharya
@anarchyrucks
@sjames1958gm i'll look into that and get back to you
Nicholas D Shaw
@NicholasDShaw
Ashish Acharya
@anarchyrucks
@sjames1958gm please look into this
Stephen James
@sjames1958gm
@anarchyrucks You could try this:
  componentDidMount: function() {
    this.getInfo(this.props.url);
  },
  componentWillReceiveProps: function(props) {
    this.getInfo(props.url)
  },
  getInfo: function(url){
    $.ajax({
      url: url,
Ananay
@ananaymital
@sjames1958gm I just removed an error in a json file in atom from FCC repo but i want to check if it works or not. How can I do that?
nabinsademba
@nabinsademba
hey guys help me with the escape sequences in strings challange
Stephen James
@sjames1958gm
@Deadpool37 You cloned the repo?
@nabins13 What do you have?
Ananay
@ananaymital
i don't know exactly. It shows on my github dashboard does that mean cloned
Stephen James
@sjames1958gm
@Deadpool37 That probably means you forked the repo.
Ananay
@ananaymital
I opened the code in atom
Stephen James
@sjames1958gm
That created a version of the repo in your account.
Ananay
@ananaymital
you mean having a FCC folder in github locally?
Stephen James
@sjames1958gm
If you look in your repository list it will show that you forked the repo.
Ashish Acharya
@anarchyrucks
@sjames1958gm thanks it worked
CamperBot
@camperbot
anarchyrucks sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3606 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
You opened it in atom on your local machine? hmm
Ananay
@ananaymital
how do i know if i cloned it or not
yup
Stephen James
@sjames1958gm
@anarchyrucks :+1:
Ashish Acharya
@anarchyrucks
@sjames1958gm can you give a reference to that or explain?
Stephen James
@sjames1958gm
@anarchyrucks This page described the lifecycle methods https://facebook.github.io/react/docs/component-specs.html
It said that certain ones only get called at certain times, I think will mount was only at start and will receive props when the props changed.