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
Janusz Bujak
@JBuji
@mosaic-greg thanks!!! I'm new on FCC
CamperBot
@camperbot
jbuji sends brownie points to @mosaic-greg :sparkles: :thumbsup: :sparkles:
:star: 348 | @mosaic-greg | http://www.freecodecamp.com/mosaic-greg
Pete
@petegarvin1
@JBuji looks great :D
although i don't understand it
Tim Myers
@denvercoder
Hi everyoone
can I get some help with the weather app?
Nickolas Gettel
@nickolaskg
Ask away
Tim Myers
@denvercoder
here is my json result
{"coord":{"lon":-104.93,"lat":39.7},"weather":[{"id":521,"main":"Rain","description":"shower rain","icon":"09d"}],"base":"stations","main":{"temp":292.29,"pressure":1002,"humidity":24,"temp_min":288.71,"temp_max":295.15},"visibility":16093,"wind":{"speed":12.9,"deg":170,"gust":20.1},"clouds":{"all":75},"dt":1461622989,"sys":{"type":1,"id":546,"message":0.0289,"country":"US","sunrise":1461585966,"sunset":1461635363},"id":5423075,"name":"Glendale","cod":200}
Islam Ibakaev
@dagman
why when i get to skills section it's kind of jumping after animation http://codepen.io/dagman/full/WwKrgX/
Tim Myers
@denvercoder
$.getJSON(weatherAPIPath, function(data) {
            // console.log(data["main"]["temp"]);
            var tempKelvin = data.main.temp;
            var weatherDesc = data.weather["description"];
            var windSpeed = data.wind.speed;
            var windDirection = data.wind.deg;
            var windGust = data.wind.gust;
            var cityName = data.name;
            console.log(tempKelvin + " " + weatherDesc + " " + windSpeed + " " + windDirection + " " + windGust + " " + cityName);
        });

there is my code. they all work except for the

data.weather.description

i get undefined

I have tried

data.weather.desctription
data.weather["description"]

Nickolas Gettel
@nickolaskg
weather is in an array it looks like, try data.weather[0].description
Tim Myers
@denvercoder
ha so stupid
it works
Nickolas Gettel
@nickolaskg
sweet:)
Tim Myers
@denvercoder
I actually tried that but I did it wrong
Nickolas Gettel
@nickolaskg
key value pairs can be funky in some situations.
Tim Myers
@denvercoder

i did

data.weather[2] thinking I was getting the third element of the weather array

Nickolas Gettel
@nickolaskg
ah lol
doh
Tim Myers
@denvercoder
thanks @nickolaskg
CamperBot
@camperbot
timmyers1978 sends brownie points to @nickolaskg :sparkles: :thumbsup: :sparkles:
:star: 392 | @nickolaskg | http://www.freecodecamp.com/nickolaskg
Nickolas Gettel
@nickolaskg
I always get tripped up on the easy stuff
Stein-T Dale
@Lofthur
Hi i need some help with api call. When i use $.getJSON or $.ajax i get this error: XMLHttpRequest cannot load https://en.wikipedia.org/w/api.php?action=query&titles=San_Francisco&format=jsonfm. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access. How can i get around this. Im tryiong todo the Wikipedia Viewer project.
Bruce Young
@mutantspore
@Lofthur if you use the getJSON method, add &callback=? on the the end of the URL
Stein-T Dale
@Lofthur
@mutantspore Thanks. I got rid of that error but now I got another I'll never seen before :D http://codepen.io/Lofthur/pen/0cb5b7e4bc501ccf8f64d7813f7d4ed8?editors=1011
CamperBot
@camperbot
lofthur sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1450 | @mutantspore | http://www.freecodecamp.com/mutantspore
jalley3
@jalley3
hey guys, i just need a quick hand with something that should hopefully be small on my twitch project
if you scroll to line 42 of the javascript
it starts my page load queries
i do console log inside of the for each, and i have verified in the debugger that each array is set up the way i want...i do console log after constructing my "buttons" variable, to ensure that somthing did not get scrambled along the way
however, if i console.log the "buttons" variable....all of the user variables that i inserted into the html code get replaced with "undefined"
and i have no idea why this is
Bruce Young
@mutantspore
@Lofthur http://en.wikipedia.org/w/api.php?action=query&titles=San_Francisco&format=json&callback=?
@Lofthur and
$(document).ready(function() {
    wikipediaCall();
});
Stein-T Dale
@Lofthur
@mutantspore Super. I'worked. You got me out of hours of frustration :D Thanks again :D
CamperBot
@camperbot
lofthur sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:warning: lofthur already gave mutantspore points
Salomon May
@sollymay
Hi guys, so I am going nuts over the random quote project. I’ve been trying to get the information reloaded each time I click the button, but it just won’t do it. which jquery function can I use in order to do this?
$( document ).ready(function() {
  var url = "http://quotesondesign.com/wp-json/posts?filter[orderby]=rand"
  $( ".target" ).click(function() {
    $.getJSON(url, function(a) {
      var quote = a[0].content;
      var author = a[0].title;
      $(".content").append("<span id='quote'" + quote +"</span>" + "<p id='comida'>&mdash; " + author + "</p>");
      });
});
});
i know that append isn’t what I’m supposed to do, but I wanted to see if I could get a new one each time I was clicking
Stein-T Dale
@Lofthur
@sollymay hi i used the $('.target').on('click', function() {}); Im not sure if it's this you mean?
Salomon May
@sollymay
nope. @Lofthur. I’m also using it. what I am referring to is that each time I’m clicking the button I get the same quote instead of a new one, while if I copy paste the website and then reload it, I get a new random quote