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
c0d0er
@c0d0er
this is my local html file
<!DOCTYPE html>
<html lang="en">
<head>
<style> 
</style>
    <meta charset="UTF-8">
    <title>Wikipedia Viewer</title>   

    <link rel="stylesheet" 
    href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
      <link rel="stylesheet" href="wikiStyle.css">

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

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

        </div>

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

      <div id="wikiContent">

      </div>           
         </div>
        </div>
     </div>

    <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>
</body>
</html>
this is my local css file
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: searchfield-cancel-button;}
body
{
  background-color:#008299;  
background-size: cover;  
}
#wikiDiv{
  width: 1150px;
background-color:lightgray;
margin-top: 40px;
margin-left: auto;
    margin-right: auto;
padding-top: 1px;
padding-left: 20px;
padding-right: 10px;
color:black;
padding-bottom: 5px;
border-radius: 10px;
text-align:left;
}
h1{
  font-size: 60px;
  font-weight: bold; 
  color: white;
}

#wikiTitle{
  color:darkcyan;
}
input[type=search]{
width: 10%;
border-radius: 4px;
    font-size: 20px; 
}

form {
  width: 20%;
  margin-left: auto;
  margin-right: auto;
}
Chris Cullen
@123xylem
pSeq.push(turnSeq-1);
How do you push a last element of 1 array into another?
AliFox15
@AliFox15
body{
margin-top:60px;
margin-left:20%;
margin-right:20%;
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
@hacu9
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 ?
vtarun
@vtarun
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
@MohammadHasham
How can i make the ul elements and p element is the same row at some distance from each other
http://codepen.io/Mohammad_Hasham/pen/kkogvd
AliFox15
@AliFox15
@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
@hacu9
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
@123xylem
http://codepen.io/123xylem/pen/jrAKPN?editors=0011
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.
Anshul
@AnshulMalik
What is it? SIMON @123xylem
Richard Smith
@r1chard5mith
@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
@MohammadHasham
@AliFox15 i am not using bootstrap
Greg Duncan
@GregatGit
@123xylem you could start by using the 'Tidy JS' button - it will make your code easier to read
AliFox15
@AliFox15
It worked @hacu9
Greg Duncan
@GregatGit
@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
@hacu9
@AliFox15 im glad c:
Darth Skywalker
@adityaparab
ind sounds like short for India
Henry Cabello
@hacu9
Chris Cullen
@123xylem
@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
@r1chard5mith
@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
@123xylem

$(".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?

  turnSeq.push(panelId);
  if (turnSeq.length >= pSeq.length) {
pSeq.push(turnSeq.pop());
  }; //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);
setInterval(correct(),200);
});








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 { 
  pSeq=[];
     roundVal++;
    $("#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
@r1chard5mith
@123xylem your for statement in the 'correct' function is missing a conditional
Muhammad Hasham
@MohammadHasham
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
http://codepen.io/Mohammad_Hasham/pen/kkogvd
Ayush Agrawal
@ayush1810
How do I learn Bootstrap ?
Chris Cullen
@123xylem
@r1chard5mith yea when i add i>0it makes every answer incorrect
Richard Smith
@r1chard5mith
@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
Rimi.
@Codevotee
@ayush1810 You do the FreeCodeCamp courses that are on Bootstrap then you can check out http://www.w3schools.com/bootstrap/
Chris Cullen
@123xylem
@r1chard5mith yeaa may have to redo it or somehing... any video links that might help?
Sorin Ruse
@sorinr
@MohammadHasham here is the solution
AliFox15
@AliFox15
@ayush1810 Follow FreeCodeCamp courses
Dark Vanity
@DarkVanity
Hi guys, bit of a amateur question but how do you set a list of websites with a wikipedia url in the front neatly?
ADIL KARMOUZI
@mradil16
hi guys, How to make navbar elements (h1/ul) in fixed position without moving , when resizing the browser ?
Muhammad Hasham
@MohammadHasham
@sorinr Thanks.
CamperBot
@camperbot
mohammadhasham sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 753 | @sorinr |http://www.freecodecamp.com/sorinr
Muhammad Hasham
@MohammadHasham
@sorinr you have always been really helpful.Can you tell me how did that worked with centering and allowing 100% width