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
:cookie: 272 | @tourdejord |http://www.freecodecamp.com/tourdejord
Evan W
@Dirtier
@tourdejord It wasnt a problem with the game itself, it was with the way I was trying to get input from the user about which marker they wanted when they hit vs computer
Kevin Janada Roy Ardian
@kevinjanada
Hey all, hows it going?
Evan W
@Dirtier
I finished the game and most of the UI first and then kind of went back through and rectro-actively added the AI and the marker selection, which turned out to be way bigger of a pain in the ass than I thought it would
@sjames1958gm Thanks again man, can't believe it was that simple lol, after 3 days on stackoverflow and spamming questions in here and getting no answers you have no idea how much that just helped
CamperBot
@camperbot
:warning: dirtier already gave sjames1958gm points
dirtier sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
Evan W
@Dirtier
Now I just have to figure out why it isn't transitioning into the modal O.o and why the sounds aren't working on the welcome screen
Kevin Janada Roy Ardian
@kevinjanada
Im trying to assign an ajax response to a variable, but it is not working.
Could someone take a look at my code please?
```
Im trying to assign an ajax response to a variable, but it is not working.
Could someone take a look at my code please?

$(document).ready(function(){


var quoteData;

      $.ajax({
        url: 'https://andruxnet-random-famous-quotes.p.mashape.com/', // The URL to the API. You can get this in the API page of the API you intend to consume
        type: 'GET', // The HTTP Method, can be GET POST PUT DELETE etc
        dataType: 'json',
        success: function(data) { 
          console.log(data);
          quoteData = data;
        },
        error: function(err) { alert(err); },
        beforeSend: function(xhr) {
        xhr.setRequestHeader("X-Mashape-Authorization", "FBozgJ3jMGmshCl5vNX6duTY1Zuop1wJypcjsnL0HOmBEK4Jm4"); // Enter here your Mashape key
        }
    });

  console.log(quoteData);
console.log(quoteData) returns undefined
Evan W
@Dirtier
@kevinjanada can you post your codepen
Kevin Janada Roy Ardian
@kevinjanada
Evan W
@Dirtier
ok yea ive run into this before
its bc the ajax call is async I believe, so it has something to do with the data coming in at a different time and you can't move it outside
I'm not entirely sure why, just know you can't lol
I would just do everything you need to do inside the success function
Kantra
@removed~kantrakantra

Hey guys, can anybody help me figure out how to add the line of html code in my .on() function to the specified div element?

I must be doing something incorrectly because an image is supposed to appear in the center of the page when 'RUN' is clicked

http://codepen.io/kantrakantra/pen/qNZawR?editors=0010

Kevin Janada Roy Ardian
@kevinjanada
@Dirtier hmm ok, i will try that. thanks for that
CamperBot
@camperbot
kevinjanada sends brownie points to @dirtier :sparkles: :thumbsup: :sparkles:
:cookie: 250 | @dirtier |http://www.freecodecamp.com/dirtier
Evan W
@Dirtier
@kevinjanada heres an example if you want http://codepen.io/Dirtier/pen/ORjLoW
Just did everything I needed once it had successfully gotten the information from the API calls
Kantra
@removed~kantrakantra

Actually my mistake, it is working. But its stacking each new line of code instead of replacing the previous one everytime 'RUN' is clicked. Anybody know how to fix that?

http://codepen.io/kantrakantra/pen/qNZawR?editors=0010

Evan W
@Dirtier
@sjames1958gm You wouldn't happen to know why the on-hover tick sound isn't working on the welcome screen, would you?
Kantra
@removed~kantrakantra
Okay nvm I fixed it with .html()
Joaquin Ignacio Sanz
@JoacoSz
Do you guys know of any site to grab some good icons for the weather app?
Kevin Janada Roy Ardian
@kevinjanada
hey guys, could i get a hint as to why my quote button only works once?
DJ
@qualitymanifest
@kevinjanada you need to make it call the ajax function on click. right now you're only calling the ajax function once ever and your click function is displaying the data from that call.
Kevin Janada Roy Ardian
@kevinjanada
@qualitymanifest yes, it works now. Thanks!!
CamperBot
@camperbot
kevinjanada sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star2: 1435 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
cool :+1:
Greg D
@mosaic-greg
i think this is a good idea for tic tac toe?
var board = [null,null,null,null,null,null,null,null,null]
Greg D
@mosaic-greg
the click function (on the div) will check if null, then update the board array, and append the div to "X" or "O"
Ken Haduch
@khaduch
@JoacoSz - there is a set of weather icons that you can get - check here: https://erikflowers.github.io/weather-icons/
JD Tadlock
@jdtdesigns
@mosaic-greg It's mainly about the index value and not the type
c0d0er
@c0d0er
could anybody give some idea to solve the challenge Smallest Common Multiple? the following is my current code:
function smallestCommons(arr) {
    var a=[];
  for(var i=Math.min.apply(null,arr); i<=Math.max.apply(null,arr); i++){a.push(i);}
  console.log(a)
  var b=1;
//while(j%a[0]!==0||j%a[1]!==0||j%a[2]!==0||j%a[3]!==0||j%a[4]!==0||j%a[5]!==0){ j++;}//this code works
var test=function(){return b++;};
for(var y=0;y<a.length;y++){while(b%a[y]!==0||b%a[y+1]){
    test();}}
return b;
}
smallestCommons([18, 23]);
/*
smallestCommons([1, 5]) should return a number.
smallestCommons([1, 5]) should return 60.
smallestCommons([5, 1]) should return 60.
smallestCommons([1, 13]) should return 360360.
smallestCommons([23, 18]) should return 6056820.
*/
JD Tadlock
@jdtdesigns
If anybody wants to see an app being built from the ground up, i'm creating a DevWar app. https://ide.c9.io/jdtdesigns/devwar
Michael Karpinski
@karpimpski
@jdtdesigns are you going to make this public?
JD Tadlock
@jdtdesigns
@karpimpski for coding?
Michael Karpinski
@karpimpski
@jdtdesigns no, I mean are you going to make this a public website for people to actually practice coding or is this just a personal project?
JD Tadlock
@jdtdesigns
@karpimpski It'll be a public place to sign up for Dev War tournaments. The matches will be 3v3, 2v2 or 1v1 and streamed live on twitch.
The matches will consist of a huge variety of challenges from created standard html/css/js sites to full apps with node, php and other languages
Michael Karpinski
@karpimpski
@jdtdesigns that sounds really awesome!
JD Tadlock
@jdtdesigns
oh yes @karpimpski
i can't wait until i'm finished lol
Michael Karpinski
@karpimpski
@jdtdesigns make sure you let everybody here know when you are, I'd love to check it out once it's done
JD Tadlock
@jdtdesigns
i'll definitely spread the word