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
Joe
@fendermaniac
https://codepen.io/fendermaniac/pen/ZaPPNy can anyone help me figure out why the JSON response wont print out on the OpenWeather API?
I've made sure that I've casted the lat and long variables into strings
Joe
@fendermaniac
it seems like the lat and long are undefined
I created a variable lat and long and assign them the following values on document.ready()
lat = String(position.coords.latitude);
long = String(position.coords.longitude);    
then I concatenate them with the API
Daulis M Gonzalez
@daulis809
Hello everyone
Ken Haduch
@khaduch
@fendermaniac - looks like you got it working, at least it seems to be printing the information for my location?
@daulis809 - howdy
Joe
@fendermaniac
Hey @khaduch, You're right I was able to get it to work. I was calling the api from regular old http and not https
now i need to figure out how to access the inner JSON objects
Ken Haduch
@khaduch
@fendermaniac :+1:
Joe
@fendermaniac
do you know how one would access inner JSON? I can pass along data.main, but I want to access data.main.temp
AbrisM
@AbrisM
Hi could someone explain why no content is showing on the screen? It's suppose to be a table with selectable buttons and pricing with an image https://codepen.io/anon/pen/XzQyoR
Henry
@GitHub-Henry
@fendermaniac
image.png
Joe
@fendermaniac
hmm ok
I thought I did define the position
let me double check
@GitHub-Henry that was leftover code from my earlier tests, fixed!
Sorin Ruse
@sorinr
@fendermaniac your json call returns the right data for me. it's important that user enable geolocation on his browser otherwise you will not get any result.
@fendermaniac you need something like this:
if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(showPosition);
    } else {
       //here you need a fallbak like getting the location by IP
    }
AbrisM
@AbrisM
If someone knows why the page isn't displaying feel free to msg me :)
Daulis M Gonzalez
@daulis809
@fendermaniac try console.log(data); right after your call and inspect the page so you can see the response on the console and have a better uunderstanding
Daulis M Gonzalez
@daulis809
@AbrisM it worked for me after some changes
@AbrisM you should remove the css styling off the html side, than remove the <style> tag, than remove the </a> closing tag on top of the closing </h1> tag
Sorin Ruse
@sorinr
@AbrisM your html and css parts should be like this example on codepen
Daulis M Gonzalez
@daulis809
@AbrisM you also don't need <!DOCTYPE html> on the html window
danielgkang
@danielgkang
hello! how does one center an image within a div container
Ken Haduch
@khaduch
@danielgkang - are you using bootstrap, or just writing your own CSS?
Linus Phan
@linusphan
hey
when using font awesome
is there a way to link it to a url?
instead of downloading the file?
nvm I think i got it
danielgkang
@danielgkang
@khaduch using bootstrap!
Ken Haduch
@khaduch
@danielgkang - Version 3 or 4? If it is V 3, on the img add class="center-block" (or if you already have a class="something" make it class="something center-block" - that ought to do it. If you are using Bootstrap V4, then it's different.
Ken Haduch
@khaduch
@danielgkang - in Bootstrap V4, the new class is mx-auto(replacing the center-block of V3.) Update - the Bootstrap V4 incantation to center an image is class="d-block mx-auto" - you also need the d-block.
danielgkang
@danielgkang
@khaduch awesome! thanks a bunch that helped
CamperBot
@camperbot
danielgkang sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3566 | @khaduch |http://www.freecodecamp.org/khaduch
Ken Haduch
@khaduch
@danielgkang :+1:
Alper
@alper4
For the Simon Game project, I used the provided sample sounds, however two of the sounds are the same note https://s3.amazonaws.com/freecodecamp/simonSound1.mp3 and https://s3.amazonaws.com/freecodecamp/simonSound4.mp3, was that intentional or mistake?
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
@alper4 The sound different for me O.o
alpox
@alpox
@alper4 they are pretty much different
Alper
@alper4
The other two are pretty much different https://s3.amazonaws.com/freecodecamp/simonSound3.mp3 and https://s3.amazonaws.com/freecodecamp/simonSound2.mp3, but 1 and 4 are actually the same note maybe an octave apart or bass frequencies stripped from the latter. Anyway, I'm not here to argue, but it is annoying if you actually used them for testing your game.
Alper
@alper4
If you know any other free sounds I can use, feel free to inform.
iso
@iso1048

Hi. Why does $(this) in the code below refer to the window object and not the jQuery object that was clicked?

let wDuration=$('#workTime').text(),
    bDuration=$('#breakTime').text();
window.onload = function(){

  $('.increase, .decrease').on('click', (e)=>changeDuration(e,wDuration,bDuration));

}//window onload

function changeDuration(e,work,breakT){
  console.log(work);
  console.log(e);
  e.target.id.substring(0,4)==='work'?work++ : work--;
  console.log($(this));//window object
  console.log(work);

  $('#workTime').text(work);
  $('#breakTime').text(breakT);

}

Thanks

primuscovenant
@primuscovenant
@heroiczero thx
CamperBot
@camperbot
primuscovenant sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles: