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
Tomas
@TOMEJUS
Seems like it wont work, but worth a try
Philipp Scholz
@philipp32
@TOMEJUS take a look at my portfolio. It isn't finished but if you hover over the Obama picture, is that what you want?
Tomas
@TOMEJUS

@philipp32 similar, but no. I want to change the size of the picture, but keep the picture in the same dimensions.

Nice portfolio by the way! If it really is your first web design you're way ahead of me already! really like it.

Philipp Scholz
@philipp32
thank you. problem was I did all those pictures in photoshop and then i wanted to put it together. As you can see, not very responsive. :/
kirbyedy
@kirbyedy
@philipp32 small problems with your page, check the centering and font sizes
Screen Shot 2017-01-12 at 15.13.31.png
Philipp Scholz
@philipp32
@kirbyedy Atm I am not into the portfolio. I will re-design it later. I do appreciate your input, though.

Hello my fellow campers,
I have a little problem.

function getLocation(){
  // select HTML output elements
  var locationOutput = $('#location-output')
  // get JSON data
  $.getJSON("http://ip-api.com/json",
  // puts JSON data in console       
    function(jsonData){
    // can access JSON data in this function
    console.log(jsonData);
    var city = jsonData.city;    
    var country = jsonData.countryCode;
    locationOutput.html(city + ", " + country);       
    // makes lat & lon properties of windows, thus somewhat global
     var lat = jsonData.lat;
     var lon = jsonData.lon;
    function getWeather(){
      $getJSON("http://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + lon + "&appid=f9461b5a35486896321efd7ddd9d4bba", function(JSONData){
        console.log(JSONData);
        var temperature = JSONData.weather[0].main.temp;
        temperatureOutput.html(temperature);
        } // end of JSONData function      
               )} // end getWeather
               } // end function (jsonData)
               )} // end function get Location

The second API call either does not work or, my suspicion, the variables lat and lon aren't passed into the URL. Can someone confirm my suspicion?

kirbyedy
@kirbyedy
if you are using chrome yes its normal
most probably you are getting mixed content error
check your console
geolocation needs secure https:// connections in order to work, yet you are trying to call the api which goes over unsecure http:// connection
Philipp Scholz
@philipp32
@kirbyedy checked my console. Variables get passed but API doesn't call. How can I circumvent that with a proxy?
kirbyedy
@kirbyedy
can you give the link to check
does your console log the lat and long ?
Alexeggers
@Alexeggers
does anyone here have any experience with axios requests? I am trying to set the "Access-Control-Allow-Origin" header, but for some reason wikipedia still rejects my request
Ghulam Shabir
@ghulamshabir
@Alexeggers try adding &origin=* to the api url
Alexeggers
@Alexeggers
@ghulamshabir That works, thank you! Why though? Isn't that supposed to be a header?
CamperBot
@camperbot
alexeggers sends brownie points to @ghulamshabir :sparkles: :thumbsup: :sparkles:
:star2: 1667 | @ghulamshabir |http://www.freecodecamp.com/ghulamshabir
Ghulam Shabir
@ghulamshabir
@Alexeggers that's how wikipedia api is implemented, it uses that query parameter to allow cors
Alexeggers
@Alexeggers
@ghulamshabir fair enough. Is it just me, or is the wikipedia api wiki godawful?
Tomas
@TOMEJUS
@AkashKumarVerma @sorinr i've fixed it... 5 hours of my life, but I did it with one single line...
Ghulam Shabir
@ghulamshabir
pardon me I have not uderstood what you said, my first language is not english
Alexeggers
@Alexeggers
@ghulamshabir no Problem. I just mean that wikipedia does not explain its api very well. I had to ask a lot to get it to work
Ghulam Shabir
@ghulamshabir
@Alexeggers that's wiki api, not you if understand you correctly
@Alexeggers there are lot of issues for programmers to make things work, that's where communities and google search come into play :smile:
Alexeggers
@Alexeggers
@ghulamshabir Definitely! Thanks again mate!
CamperBot
@camperbot
alexeggers sends brownie points to @ghulamshabir :sparkles: :thumbsup: :sparkles:
:warning: alexeggers already gave ghulamshabir points
Ghulam Shabir
@ghulamshabir
@Alexeggers welcome :smile:
Kevin Nolan
@betaalpha987
Hiya. Can anyone help me a problem? My Calculator is using Flexbox to place the buttons. When I use 'flex-flow: column wrap' it doesn't wrap and stays in a single column. But if I set it to 'row wrap' it does wrap. I need columns to work. Any idea why this is happening? https://codepen.io/betaalpha/pen/rjaxeW
THe problem CSS is in .calc-b-panel
Ankit Agarwal
@ankit-prgmr
@betaalpha987 It's because your CSS class .calc-b-panel is missing height property. You're not restricting the container to wrap , that's why the container grows to adjust the content inside it
Kevin Nolan
@betaalpha987
Awww, so simples! Thanks Ankit, you star!
@ankit-prgmr thanks (to give you kudos)
CamperBot
@camperbot
betaalpha987 sends brownie points to @ankit-prgmr :sparkles: :thumbsup: :sparkles:
:cookie: 312 | @ankit-prgmr |http://www.freecodecamp.com/ankit-prgmr
Ankit Agarwal
@ankit-prgmr
@betaalpha987 :+1:
Akash Kumar Verma
@AkashKumarVerma
@TOMEJUS how
AstralWoof
@AstralWoof
can someone help to get my email to workhttps://codepen.io/NovaPaw/pen/MJYxGd
Tomas
@TOMEJUS
@AkashKumarVerma by adding display: inline-block; have no idea why did it work, but it did. http://codepen.io/monkevicius/full/ygevVY/ I did put random pictures now tho. What do you guys think about this portfolio in general? I know its not state of the art, but its something, i guess. Appreciate for all the help guys!
HAVENKTB13
@HAVENKTB13
how do i make my p element red?
playingwithinfinity
@playingwithinfinity

@HAVENKTB13 ```

<p class = "red-text">blah blah blah<p>```

Ugh... ```

<script type = "text/javascript" src = "test.js"></script>```

<script type = "text/javascript" src = "test.js"></script>
Wow that took a long time.
Wait.
Wait.