Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2020 20:09
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 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
greg
@wearenotgroot
@GlaDdos because it hasnt receive the data yet
mjqblade
@mjqblade
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<form action="/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor"> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality"> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Crazy</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>

it says your div element should have the class contaner flood

kamil kawa
@GlaDdos
no it's not taht, i was trying to save position to global variable, and it keeps resseting to initial value outside getPCurrentPosition(some_function(){ here i get variables set to coords})
greg
@wearenotgroot
@GlaDdos to make sure that the longitude and latitude are receive before requesting the openweather api . do the openweather api call inside your getlocation callback function
mjqblade
@mjqblade

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>

<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>

<p>Top 3 things cats hate:</p>

<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>

greg
@wearenotgroot
@GlaDdos post the link to your pen
mjqblade
@mjqblade
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<form action="/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor"> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality"> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Crazy</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>

help plz excresice 74

Mooli
@Mooli88
question - the 'and' in this media query '@media not screen and (color) {...}' is more like '&&' or '| |' ?
kamil kawa
@GlaDdos
@wearenotgroot ```if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(function(position){
longitudeQuery = position.coords.longitude;
latitudeQuery = position.coords.latitude;
      weatherAPIQuery = "http://api.openweathermap.org/data/2.5/weather?lat=" + latitudeQuery + "&lon=" + longitudeQuery;

      console.log(weatherAPIQuery);
});```
oh well that formatting came up great XD
Bruce Young
@mutantspore
@GlaDdos you’ll need an api key to make it work
mjqblade
@mjqblade
@mutantspore help plz
kamil kawa
@GlaDdos
anyways longtitudeQuery is global variable, and outside this function its not showing coord but undefined or wahtever i assign to it before entering that function
Ednacode (New to Github and making mistakes)
@EdnaMode
@mjqblade @mjqblade did u get an ans?
greg
@wearenotgroot
@GlaDdos post your pen so we have the whole picture
mjqblade
@mjqblade
what\
Bruce Young
@mutantspore
@GlaDdos it’s not showing for the reasons mentioned earlier
mjqblade
@mjqblade
noooooooo
Mooli
@Mooli88
whats the difference between '@media print and (min-resolution: 300dpi) {...}' to '@media only print and (min-resolution: 300dpi) {...}'?
mjqblade
@mjqblade
@Mooli88 almost everythimg]]
@EdnaMode no
Ednacode (New to Github and making mistakes)
@EdnaMode
@mjqblade im new here so can you cut and paste the question fm the map and i will see if i have answered that
mjqblade
@mjqblade
i didnt
Mooli
@Mooli88
@mjqblade please be more specific
mjqblade
@mjqblade
@Mooli88 i dpnt know much but i know there diffrent becuase in one your asking something]
kamil kawa
@GlaDdos
Ednacode (New to Github and making mistakes)
@EdnaMode
@mjqblade exact question pls
?
mjqblade
@mjqblade
what
kamil kawa
@GlaDdos
i know it's not showing API responce yet, i'm trying to figure out why global variables are not storing values that are assigned to them in navigator.geolocation.getCurrentPosition(function(position) <- this place
Ednacode (New to Github and making mistakes)
@EdnaMode
what is the question on Map so i can locate it
mjqblade
@mjqblade
Use Responsive Design with Bootstrap Fluid Containers
greg
@wearenotgroot
@GlaDdos

$(document).ready(function(){
var weatherAPIKey = "6a8f3fff2528a34f3bc0896626b63742";
var longitudeQuery = 0;
var latitudeQuery = 0;
var weatherAPIQuery = "";
  if(navigator.geolocation){
    navigator.geolocation.getCurrentPosition(function(position){
          longitudeQuery = position.coords.longitude;
          latitudeQuery = position.coords.latitude;
console.log(longitudeQuery);
          weatherAPIQuery = "http://api.openweathermap.org/data/2.5/weather?lat=" + latitudeQuery + "&lon=" + longitudeQuery +'&appid=' + weatherAPIKey;

console.log(longitudeQuery);


      $.getJSON(weatherAPIQuery).done(function(weather){
          console.log(weather);
        })
        .fail(function(){
          console.log("error");
        });
    });

  }




});
Bruce Young
@mutantspore
@GlaDdos as has already been said. the process is asychonous .. the geolocation process gets started but you don’t know when it wil finish.. teh actual JS code just keeps rolling on and gets to teh bit outside the geolocate and well.. nothing has return yet.
kamil kawa
@GlaDdos
@mutantspore Oooooh...
greg
@wearenotgroot
@GlaDdos as said earlier to make sure that the longitude and latitude are set before making request to the openweather api you either set a timeout on the getJSON or do it inside the getCurrentPosition callback
Clark Arnold
@clarkarnold
@mutantspore @wearenotgroot I am working on the same project.. How do you control when the next part fires? I am getting my Coordinates but I can't figure out how to tell the rest of the code to wait for that part to happen first
Bruce Young
@mutantspore
either do it as @wearenotgroot has suggested or wrap your getjson in a function ..say.. getWeather and call it from inside the geolocation
greg
@wearenotgroot
@GlaDdos and as @mutantspore said you need to add the appid
kamil kawa
@GlaDdos
thatks you guys i get that now @mutantspore @wearenotgroot
i meant thanks @mutantspore @wearenotgroot
CamperBot
@camperbot
gladdos sends brownie points to @mutantspore and @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star: 869 | @wearenotgroot | http://www.freecodecamp.com/wearenotgroot
:star: 1129 | @mutantspore | http://www.freecodecamp.com/mutantspore
Bruce Young
@mutantspore
@clarkarnold as we just mentioned.. call the second part from within the first
Ednacode (New to Github and making mistakes)
@EdnaMode
@mjqblade @mjqblade this worked for me
<div class =" container-fluid">


<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</div>
dont forget the closing div at the bottom
that caught me out