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
Ademola Adegbuyi
@ooade
same ere
Andrew Perrin
@Pezz18
ok, i will have a look,,, how do ip address locations work? as i am based in Leicestershire UK, yet i notice the positions always pull my ip address as being located in Reading UK!
Stephen James
@sjames1958gm
@Pezz18 Yeah, not real accurate, but I guess good enough for this kind of challenge. A real application would run under https:// and not have this problem
d1sr3
@d1sr3
@sjames1958gm is it surely the problem? When I tried to console.log my position I got it withour problems
Stephen James
@sjames1958gm
@d1sr3 getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details. this is from the console when I run his pen from chrome. At least a newish chrome
Chrome/51.0.2704.103
d1sr3
@d1sr3
@sjames1958gm I set up my coordinates manually and got the same error
Ademola Adegbuyi
@ooade
@d1sr3 are you using openweather??
d1sr3
@d1sr3
Ademola Adegbuyi
@ooade
@d1sr3 openweather don't allow unsecured calls again
@d1sr3 make use of https://
d1sr3
@d1sr3
@marhyorh It didn't help
Ademola Adegbuyi
@ooade
@d1sr3 how did you make the call?
@d1sr3 they still allow http:// tho
d1sr3
@d1sr3
@marhyorh $.ajax({ url: 'http://api.openweathermap.org/data/2.5/find?lat=10&lon=10&cnt=1&appid=14c16869c29c68a5909a55fb623e1397', success: function(response) { console.log(response); } });
Thomas Burgess
@ThomasBurgess2000
Hey, for the JavaScript basic algorithm challenge "Return Largest Number in Array" this is the code I was trying, and it seemed to output the exact results it was looking for, but for some reason it's not accepting it as the solution.
var largestNumbers=[];
function largestOfFour(arr) {
  for (i=0; i<4; i++){
    var highest=0;
    for (a=0;a<4;a++){
      if (arr[i][a]>highest){
        highest=arr[i][a];        
      }
    }
    largestNumbers.push(highest);
  }
  return largestNumbers;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
Stephen James
@sjames1958gm
@ThomasBurgess2000 Cannot use globals as FCC will run your code multiple times and the global is not reset
Ademola Adegbuyi
@ooade
@d1sr3 it works here!
Joel Abees
@JoelAbees
Hey guys, I need help.
Ademola Adegbuyi
@ooade
@d1sr3 use $.getJSON() if your ajax call don't work but its working ere.. Share your pen
Thomas Burgess
@ThomasBurgess2000
Thank you so much, that fixed it @sjames1958gm
CamperBot
@camperbot
thomasburgess2000 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2249 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
CloudyShows
@CloudyShows
I'm making a portfolio site and i've made a navbar by looking at some examples on w3schools (I hope this isn't cheating). How do I make it so when I click a button on the navbar to scrolls to that part of the page? I'm guessing it has something to do with making an ID at each part of the page I want navigated to then using some sort of page scroll to id function? Thanks!
Joel Abees
@JoelAbees
I'm doing the random quote machine.
here is a skeletal version.
http://codepen.io/JoelAbees/full/JKBBOz/
my problem: Each time I press the button, A different quote should be displayed. I don't know how to do this. can you guys help me, what should I search for in google? can you fram my search? or help me with some links?
d1sr3
@d1sr3
@marhyorh $.getJSON didn't help https://codepen.io/d1sr3/pen/mEBxYd?editors=1111
Joel Abees
@JoelAbees
@CloudyShows you need to enclose each segments( home, contact, works) inside <div>
give Id to the divs and link the id to the buttons in the nav bar
Ademola Adegbuyi
@ooade
@d1sr3 navigator.geolocation is aving issues
d1sr3
@d1sr3
@marhyorh When I disabled it and set coordinates manually it didn't work either
Ademola Adegbuyi
@ooade
@d1sr3 because its wrapped inside navigator.geolocation function
demmak
@demmak
@JoelAbees You can try to put your quotes in js array and use random funtion to put a different one each time to your page
Dariusz Biskupski
@Visiona
Thanks for checking all involved, it occured simple z-index: 100; sorted whole problem... No need for scripts thankfully
d1sr3
@d1sr3
@marhyorh I said I have tried it without the navigator.geolocation function and it hasn't helped
Joel Abees
@JoelAbees
@demmak will give it a go.
Ademola Adegbuyi
@ooade
@d1sr3 read the log message. The request was blocked because you're trying to access it via https://
@d1sr3 openweather don't av an https for now
Joel Abees
@JoelAbees
@demmak coluld you look at my code and tell me what needs to be done?
Andrew Perrin
@Pezz18
hi, im back, struggling to understand how to get my getJSON call to run correctly,,,
how do you get it to set the lat data to a variable??
demmak
@demmak
@JoelAbees sorry, but my laptop just discharged, are you ok if I'll check it in few hours ?
Andrew Perrin
@Pezz18

current code ive been using is:

$.getJSON('http://ipinfo.io/', function(data){
lat = data.lat;
long = data.lon;
});

Xavier Velez
@JonSnow08
@Pezz18 i'll see if I can help you out
@Pezz18 you're trying to get location data?
Andrew Perrin
@Pezz18
@JonSnow08 thanks, yeah, im re-visiting my weather API challenge since the geo.location option has stopped working, so it was suggested to use a get JSON request to pull the long / lat data instead...
CamperBot
@camperbot
pezz18 sends brownie points to @jonsnow08 :sparkles: :thumbsup: :sparkles:
:cookie: 307 | @jonsnow08 |http://www.freecodecamp.com/jonsnow08
Andrew Perrin
@Pezz18
Xavier Velez
@JonSnow08
@Pezz18 that api you're using doesn't seperate latt and long