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
CamperBot
@camperbot
quickspeedy sends brownie points to @mstellaluna :sparkles: :thumbsup: :sparkles:
:cookie: 895 | @mstellaluna |http://www.freecodecamp.com/mstellaluna
quickspeedy
@quickspeedy
What's the common practice for placing onclick event? For example, do you place onclick event in the document.ready function or ...?
or do you place it in the onload function?
J.Chechelski
@SupaSaiyan
It's worth to learn jQuery in 2017 before looking for a first job when somebody know ES5,ES6 and API DOM well?
Trommelochse
@Trommelochse
@SupaSaiyan It can never be bad to know a language, especially one that is as wide-spread as jQuery. Learning the basics doesn't take long if you already have a solid understanding of Javascript and you will - at least in some way - profit from it; be it just increasing the love for modern frameworks ;)
I would not use jQuery for any personal project, but was forced to write some at work recently, since I have limited access to the environment I am working in, and jQuery was the only library available.
So, doing some DOM manipulation with jQuery for a week or two will definitely not hurt.
khorram bin salim khondkar
@khorramk
what is wrong with this function?

```function showUser(xmlhttp){
if(xmlhttp.status === 200){
var json = xmlhttp.responseText;
var user = JSON.parse(json);
for(var key in user){
if(user[key] === 'id'){
$('#profile h2').prepend('<user login>' + ' is GitHub user #' + '<user id>'
);
}

  }

}else{
$('#profile h2').prepend('No such user!')
}

//

}```

J.Chechelski
@SupaSaiyan
@Trommelochse thanks :D I will do that
CamperBot
@camperbot
supasaiyan sends brownie points to @trommelochse :sparkles: :thumbsup: :sparkles:
:cookie: 334 | @trommelochse |http://www.freecodecamp.com/trommelochse
Trommelochse
@Trommelochse
@khorramk you should format your code, it's readable
enclose it in 3 backtips on each side
so
Moisés Man
@moigithub
@khorramk 3 backticks must be on its own line
Trommelochse
@Trommelochse
ohyes, didn't see that he used some
and you should also start with ```js
so your code will be highlighted nicely
khorram bin salim khondkar
@khorramk
function showUser(xmlhttp){
  if(xmlhttp.status === 200){
    var json = xmlhttp.responseText;
    var user = JSON.parse(json);
    for(var key in user){
      if(user[key] === 'id'){
        $('#profile h2').prepend('<user login>' + ' is GitHub user #' + '<user id>'
);
      }

      }
  }else{
      $('#profile h2').prepend('No such user!')
    }

  //


}
Moisés Man
@moigithub
add some console.log to check ur data
also... on ur first prepend...
u can use a single string instead concatenate 3 strings
ie: 'user login is girhub user user id'
UNLESS.... <user login> and <user id > data comes from ur json , then thats should be variables instead
Michael Cordero
@CyberPutty
don't you need to make a new XMLHttpRequest() Object and make your function a child of that.
or a property
khorram bin salim khondkar
@khorramk
yes i already done that @CyberPutty
Michael Cordero
@CyberPutty
@khorramk your missing a semicolon on your second declaration. but other than that i don't really know unless your key that is declared outside your function is not meshing with the id, haven't really used xml for web yet
Kaz Baig
@kbaig
Marc
@MWBauer
Could I get a new set of eyeballs to look at this and tell me why Nav isn't working right?
Michael Cordero
@CyberPutty
@MWBauer use #id selector the navbar has dead links.
           <a href="#Experience">Experience</a>
           <a href="#Hobbies">Hobbies</a>
           <a href="#Projects">Projects</a>
Michael Cordero
@CyberPutty
@MWBauer is that what you mean by not working right?
Marc
@MWBauer
thanks @CyberPutty
CamperBot
@camperbot
mwbauer sends brownie points to @cyberputty :sparkles: :thumbsup: :sparkles:
:cookie: 294 | @cyberputty |http://www.freecodecamp.com/cyberputty
Marc
@MWBauer
that's awesome. That was all it was.
@CyberPutty Do you think I need to label the NavBar?
piteto
@piteto
@MWBauer Update to the latest bootstrap 4 and try out the standard navbar:
<nav class="navbar fixed-top navbar-expand-sm navbar-dark bg-dark">
  <a class="navbar-brand" href="#experience">Marc W. Bauer</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav">
      <li class="nav-item active">
        <a class="nav-link" href="#experience">Experience</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#hobbies">Hobbies</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#projects">Projects</a>
      </li>
    </ul>
  </div>
</nav>
That way you get a responsive navbar that works on mobile
Make sure your javascript includes jquery before bootstrap.js
Ken Haduch
@khaduch
@kbaig - that d3 project looks good! Any chance of putting a conversion from Celsius to Fahrenheit? Should you cite the source of the data that you are using?
Kaz Baig
@kbaig
@khaduch I guess I could add the functionality for fun. The dataset is from the D3 Heat Map challenge so I don't know what the source is
Ken Haduch
@khaduch
@kbaig - oh, okay - I guess if they don't tell you then there's no way you could cite it... thanks!
CamperBot
@camperbot
khaduch sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 347 | @kbaig |http://www.freecodecamp.com/kbaig
Kaz Baig
@kbaig
@khaduch Thanks for taking a look :)
Ivan Ngundela
@ingundela
hello everyone, please need some help with my project....I have added carousel image from bootstrap and also using smooth scrolling..... everytime I manually click prev or next arrow it show the next image but the website also move up and I don't understand what is going on here.... the site is: https://ingundela.github.io/imsaqa/
PLEASE HELP
Ian Gracia
@iangracia

"Given two sets (for example set A = {1, 2, 3} and set B = {2, 3, 4}), the mathematical term "symmetric difference" of two sets is the set of elements which are in either of the two sets, but not in both (A △ B = C = {1, 4})." "

Example : "sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]) should return [1, 4, 5]"

Why should the 5 be in the returned array? If it is in all the 3 arrays, then its not a symmetric difference?

Trommelochse
@Trommelochse
@ingundela working fine for me