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
iamlisakong
@iamlisakong
I'm still a noob and just finished the first part of html, css, and bootstrap. I'm nervous about building this personal portfolio webpage. Are there any tips and trickes?
Ken Haduch
@khaduch
@reeversedev - sorry that I've been away. If you want the location which, in your data, is "Cairns", you want data.name. If you want the country, then it would be data.sys.country
@iamlisakong - if you want to take a look at something for other examples, even some techniques, try w3schools.com/bootstrap and look for the "Themes" section - they walk through a few examples of creating a page like a portfolio from the ground up. If you are planning to use Bootstrap, that is - but it might be helpful to just walk through their lesson on how to do it anyway?
Prateek Gogia
@reeversedev
No @khaduch . My location is different.
Ken Haduch
@khaduch
@reeversedev - well, the location that is being returned from the data that you are fetching, which is based on an "id" value that you are requesting, is from a fixed site, as I recall, they have ID values for different cities / locations around the world. Your post has this: id: '2172797' which must translate to "Cairns, AU"? I'd have to go to their site to double check that...
Andrew Steller
@stelleaw
Anyone else have trouble getting a JSON call to work with openweathermap?
function getWeather(){
var api_url = 'https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?lat='+ lati + '&lon=' + long + '&units=imperial&appid=115fea402e58f61e6277a1c2463adb96';
$.getJSON(api_url, formatWeather);
}
Ken Haduch
@khaduch
you have to put your actual latitude and longitude in there, and change your request, to get your actual location, if that's what you're looking for, @reeversedev ?
iamlisakong
@iamlisakong
@khaduch Thanks, I'll look into w3schools.com/bootstrap.
CamperBot
@camperbot
iamlisakong sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2519 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
@iamlisakong - note that a lot of people will NOT recommend w3schools, but for the bootstrap section and these theme examples, I have found them to be satisfactory. It gives you some supplemental information about how to approach a page design of this type.
Prateek Gogia
@reeversedev
@khaduch What if i want to make it available to end user so that he/she can access his/her location? How do I do that?
Andrew Steller
@stelleaw
'
function getWeather(){
  var api_url = 'https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?lat='+ lati + '&lon=' + long + '&units=imperial&appid=115fea402e58f61e6277a1c2463adb96';
  $.getJSON(api_url, formatWeather);
}
I cant seem to get a successful reponse to call my display functions
Gulsvi
@gulsvi
@stelleaw Try it without the https://crossorigin.me/ in front of your url
Andrew Steller
@stelleaw
@SkyCoder01 I have, still nothing. and it definitely doesn't call my function either. I set that function up to work without the api data and it should change my page when called.
ZaCk FroST
@zakwanahmed
got to build a tribute page
first project
Gulsvi
@gulsvi
@stelleaw Are you using navigator.geolocation to get location with a Chrome browser?
Andrew Steller
@stelleaw
@SkyCoder01 yes but right now I have coordinates hard coded in. trying to test each piece individually. could it be my extensions I run a pretty heavy set of anti-trackers/adblockers/privacy stuff?
Gulsvi
@gulsvi
@stelleaw Try pasting the URL manually in your browser to test for adblocker/privacy blocking
in the address bar, I mean
Andrew Steller
@stelleaw
@SkyCoder01 I got a response that way. Used the exact url i have in the code
Gulsvi
@gulsvi
@stelleaw Then maybe your codepen is loaded over HTTPS? OpenWeatherMap will only work if your codepen is loaded over HTTP
Check your browser's debug console for mixed-content errors regarding HTTP/HTTPS
Andrew Steller
@stelleaw
@SkyCoder01 that is probably it, I run HTTPS everywhere and had similar issues on the quote generator too but using crossorigin fixed it there
Gulsvi
@gulsvi
@stelleaw I don't know about that proxy, maybe it's down or requires some extra headers in your code. I've seen people recommend it, but every person who visits your page is unknowingly sharing their location and IP address with a 3rd party proxy. You may be comfortable with that, but others may not.
You're also sharing your Open Weather Map API key with that 3rd party every time you make an API request, so best to just use HTTP or choose a weather API that supports HTTPS
Andrew Steller
@stelleaw
@SkyCoder01 got it, I need to get codepen to run in HTTP then, and ill check back
Ken Haduch
@khaduch
@reeversedev - you have to use some method of getting the user's location - the geolocation service (which was one of the FreeCodeCamp lessons) although it has a bit of a problem accessing the geolocation on some browsers (most notably Chrome) unless you are accessing the page (your codepen page) using https://. But the problem is that the free openweather account will not respond to an https:// request, so you cannot always get it to work. FireFox does not require https:// for the geolocation, at least not at this time. There are some alternatives that are discussed in a couple notes on the freecodecamp forum freeCodeCamp/freeCodeCamp#7853 and this one, too: freeCodeCamp/freeCodeCamp#9145 - you can scan through those, if you haven't seen them, and see the suggestions that they offer...
Andrew Steller
@stelleaw
@SkyCoder01 That looks like it did the trick. Thanks, I just couldnt put my finger on what wasn't paying nice with codepen
CamperBot
@camperbot
stelleaw sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 282 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Prateek Gogia
@reeversedev
@khaduch Thanks man! I'll have a look over it.
CamperBot
@camperbot
reeversedev sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2520 | @khaduch |http://www.freecodecamp.com/khaduch
Gulsvi
@gulsvi
@stelleaw Now you'll need to make sure you're getting location in a way that works with HTTP as well - just to save you a headache :) navigator.geolocation won't work in some browsers over HTTP. Check The comment above from @khaduch for more info
Andrew Steller
@stelleaw
@SkyCoder01 yup, was already looking into other location methods
Chiu
@yuchiu
been working on the calculator for long time
cant get the infix to postfix calculation function work
can someone help out or give some hint plz
it seems to skip out operator in the stack and move on to operand
Chris
@bestintown23
why are my pictures not full screen? https://codepen.io/bestintown23/pen/KaOBJR
Prateek Gogia
@reeversedev
I am getting the latitude and longitude but not the name of the country. How am I suppose to do that?
Gulsvi
@gulsvi
@reeversedev How are you getting location? If you're using navigator.geolocation, you'll have to do a reverse geocode
Jakov Horvat
@Yaaqovv
Hey guys do you know why my code is not working? please help me http://codepen.io/Yaaqov/pen/gmYvZy?editors=1111
is there maybe any problem with api?
Jasmin Parent
@charlesdarkwind
Is it really that bad to use the twitch api at the moment? I kinda wanna use it