Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • 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
ravi6112 sends brownie points to @alhazen1 :sparkles: :thumbsup: :sparkles:
:cookie: 395 | @alhazen1 |http://www.freecodecamp.com/alhazen1
does anybody know why my code in code pen works perfectly, why in my local file doesnt show the search icon?
thank you @Dirtier for your review
ravi6112 sends brownie points to @dirtier :sparkles: :thumbsup: :sparkles:
:cookie: 240 | @dirtier |http://www.freecodecamp.com/dirtier
this is my local html file
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Wikipedia Viewer</title>   

    <link rel="stylesheet" 
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
      <link rel="stylesheet" href="wikiStyle.css">

<div class="container-fluid " >
        <div class="row text-center aligeneral">
   <div class="wiki-area"> 
         <h1>Wikipedia Viewer</h1> 
  <form id="form-container" onsubmit="return false">    

         <div class="input-group">
  <span  class="input-group-addon" >
        <i class="fa fa-search"></i>
         <input class="form-control" type="search" id="wikiSearch" oninput="loadData()" value="" placeholder="Search..."> 


         <a href="https://en.wikipedia.org/wiki/Special:Random" class="btn btn-primary" target="_black">Random Wikipedia</a>

      <div id="wikiContent">


    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> 
    <script src="jquery.min.js"></script>
    <script src="wikiScript.js"></script>
this is my local css file
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: searchfield-cancel-button;}
background-size: cover;  
  width: 1150px;
margin-top: 40px;
margin-left: auto;
    margin-right: auto;
padding-top: 1px;
padding-left: 20px;
padding-right: 10px;
padding-bottom: 5px;
border-radius: 10px;
  font-size: 60px;
  font-weight: bold; 
  color: white;

width: 10%;
border-radius: 4px;
    font-size: 20px; 

form {
  width: 20%;
  margin-left: auto;
  margin-right: auto;
Chris Cullen
How do you push a last element of 1 array into another?
border:1px solid black;
I cannot figure it out,If I set bg-color inside the css,But it changes full page color,not just within the border.
If I want control the color within border.How should I do?
Henry Cabello
http://codepen.io/cabello986/pen/VKWbEZ How can i make it so the Clock function calls the break function n so on when the timer hits 0 ?
Hi , i want to use angularjs for "Random Quote machine" , but when i am calling "http://api.forismatic.com/api/1.0/" api , it is giving Cross origin error. How to get around this cors?
Muhammad Hasham
How can i make the ul elements and p element is the same row at some distance from each other
@MohammadHasham <p>tag will force a break in line.You can try bootstarp col-xs-6
not col-6
Can anyone tell how to just change the color of body,not the whole page.I cannot figure it out
I want to just my content area to be silver,not the whole page
Any help is fine.
Henry Cabello
wrap your content in a div
and add a background to it
@AliFox15 the first div add class="container" change the background color from body css to class .contaner{background-color:silver;}
Chris Cullen
If anyone has time please help me with my SIMON game... It may take 4 mins to understand but I am really stuck now and its hard to find help online when each question is so specific.
What is it? SIMON @123xylem
Richard Smith
@123xylem what is your question about it? I can see it isn't working right - what are you trying to do right now?
Muhammad Hasham
@AliFox15 i am not using bootstrap
Greg Duncan
@123xylem you could start by using the 'Tidy JS' button - it will make your code easier to read
It worked @hacu9
Greg Duncan
@123xylem Your logic is very hard to follow. I recommend you change the names of your varibles and functions to give the outsider some clarity. So not "TL" or "tl" but "green" - "index" instead of "ind".
Henry Cabello
@AliFox15 im glad c:
Darth Skywalker
ind sounds like short for India
Henry Cabello
Chris Cullen
@AnshulMalik yes simon game... @r1chard5mith Themain problem is I no longer know what my answers are doing... it inputs user answers to pSeq but it doesnt do so with the correct element sometimes and when i compare them in correct() it doesnt seem to compare them properly either... @GregatGit tidy is good and I do now and again but when i close up all the functions and press tidy it reopens them so i try not to too much.. point taken on names like cSeq pSeq btw
@hacu9 looks cool. nice animation.. 1 minor bug is when u stop clock and change break time it retains seconds in breaktime
maybe a bit more css on colors and border of time aswell maybe. bbut thats just aestetics
Richard Smith
@123xylem I think it's easier to generate the whole sequence once and then play the first note of it each time you restart
Chris Cullen

$(".panel").on("click", function() {
  cpuTurn = 1;
  var panelId = $(this).attr("id");
  audioF[panelId.toLowerCase()].play(); //<-----use id as key
  $("#" + panelId).toggleClass('animate');
  //HOW DO i get this to activate and go back to default onclick?

  if (turnSeq.length >= pSeq.length) {
  }; //Pushes only new moves into pSeq

 // if (turnSeq.length == cSeq.length) {
    //starts cpu only when user finished move or wrong
    // cpuTurn = 1;
    console.log("turn", turnSeq, turnSeq.length, "player", pSeq, pSeq.length, "cpu", cSeq, cSeq.length);

function correct(){if(cSeq.length==pSeq.length){
  for ( i = cSeq.length;  i--;) {

      if (cSeq[i] != pSeq[i]) {audioF['wrong'].play();

        console.log("wrong", cSeq, pSeq[i], pSeq);
    pSeq = [];  setInterval(lastSeq(), 4000); // Say wrong and replay last seq
        // cpuTurn = 0;};    

else { 
    $("#round").html("Round: "+roundVal);
    setInterval(cpuSeq(), 1000);
    console.log(cpuTurn, "Round= ", roundVal);
So sometimes pSeq doesnt get pushed the correct element (the new element of turnSeq - prev pSeq elements)>>> Even when it does happen the correct() check doesnt always recognise a match
At this point I am confused whats going on and arent sure where to even coonsole.log things
to debug
Richard Smith
@123xylem your for statement in the 'correct' function is missing a conditional
Muhammad Hasham
i am really frustrated and stuck with this i want to move my h3 element and ul element in one row but i have been failed to do so can anyone please help me with this stuff
Ayush Agrawal
How do I learn Bootstrap ?
Chris Cullen
@r1chard5mith yea when i add i>0it makes every answer incorrect
Richard Smith
@123xylem It's not a simple challenge - you may need to rethink the logic to make it simpler to reason about
@123xylem I say this knowing how much trouble I got into once I had to start cancelling and restarting the click handlers on the buttons
@ayush1810 You do the FreeCodeCamp courses that are on Bootstrap then you can check out http://www.w3schools.com/bootstrap/
Chris Cullen
@r1chard5mith yeaa may have to redo it or somehing... any video links that might help?