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
Mikail Bayram
@mikail1998
@moigithub i will now try your code
i mean your way
Hong
@designBuildShipSoftware
@trip16661 @sorinr The .fail() method worked for me. .fail didn't fail.
Hong
@designBuildShipSoftware
Mikail Bayram
@mikail1998
@moigithub again nothing
but thank you for trying to help
@moigithub thank you
CamperBot
@camperbot
mikail1998 sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 1960 | @moigithub |http://www.freecodecamp.com/moigithub
Mikail Bayram
@mikail1998
Moisés Man
@moigithub
@mikail1998 well.. the syntax still wrong u didnt fixed....
to test ur code.. which IF block reach.. (flow execution) add DIFFErents console.log messages to each block... not the same text
if u still Not sure.. why ur block dont execute.. then evaluate each part of ur if condition expression separatedly above..
ie: console.log($("#result").text());
do u understand the concepts of "truthy" / "falsy".. ?
var test = false;
if (test) { console.log("meeee");}
else { console.log("booo"); }

Which message do u think it will log on console ???

Moisés Man
@moigithub
false, undefined, "" (empty string), 0, null
are falsy values... everything else are truthy
@mikail1998
soo check this condition... is correct ??
var b=1;
var a = 1;
if (a || b < 0) {
   console.log("a or b are less than 0");
} else { 
     console.log("zzzzzz")  ;
}
kennyq94
@kennyq94
hey everyone is this the correct code to get navigator to work on your browser, I wonder why it is not prompting me to use my location... pls help
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(location, error);
} else {
  alert("Geolocation not supported");
}

function error() {
  alert("Sorry you are in outer space");
}
encount
@encount
@kennyq94 I does not work in chrome
Zacch McKinney
@ZacchMckinney
Hello, I am having trouble getting my text to center in all screens on my tribute page. Can anyone help?
http://codepen.io/SeaWeasel/pen/oLOryL
Ayyaz Zafar
@ayyazzafar
Hello Everyone !
I need help regarding HTML5 video player. I have a mp4 video.
IT plays very well in desktop browser but if I play it in mobile browser then orientation is changed.
Why is that happening and how can I fix this?
Joe
@JoeMethven
@moigithub you need a < 0 for "a" on that if statement.
The the code between each || pipe is separate, you can't assume < 0 applies to both statements, as if the first rule is true (above 0 in this case) it will never check the second statement
Moisés Man
@moigithub
@JoeMethven that was an example/test for @mikail1998 :)
Joe
@JoeMethven
Yeah just realised, didn't read up 👍
Dylan
@dhcodes
@ayyazzafar seems you need to transcode the video with the rotation you want: http://stackoverflow.com/questions/29920331/video-orientation-is-incorrect-on-firefox
Ayyaz Zafar
@ayyazzafar
Thanks @dhcodes for reply.
Actually it's working fine in Desktop but not in mobile / android chrome. If I rotate orientation then it will be rotated in desktop where it was showing fine
CamperBot
@camperbot
ayyazzafar sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1346 | @dhcodes |http://www.freecodecamp.com/dhcodes
Will Kempster
@kempsterrrr
Hi! I am stuck on the Wikipedia Viewer project. At the moment I trying to call the Wiki API but getting "No 'Access-Control-Allow-Origin' header is present on the requested resource" as an error. I believe I need to use CORS (please correct me If i am wrong) but i cannot find any good tutorials on this subject. Does anyone have suggestions on where to look?
Ayyaz Zafar
@ayyazzafar
@WilliamFace there can be many solutions for this. But one of the solution is that you upload your app / script on a live hosting instead of localhost. That way I hope it will resolve your isue.
kennyq94
@kennyq94

hi guys my code isn't working at all I cannot get the temperature back from the call any idea why ? plssss help me.
var lat, lon, weather;
if ('geolocation' in navigator) {
navigator.geolocation.getCurrentPosition(location, error);
} else {
alert("Geolocation not supported");
}

function error() {
alert("Sorry you are in outer space");
}

function location(position) {
lat = position.coords.latitude;
lon = position.coords.longitude;

weather = "api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + lon + "&units=metric&APPID=";

$.ajax({
url: weather,
dataType: 'jsonp',
success: function(data) {
var temp = data.main.temp;
$("#temp").html(temp);
}

});
}
I didnt want to share my api

Will Kempster
@kempsterrrr
@ayyazzafar thanks for replying. I am doing the task on codepen and not locally hosting, is that okay?
CamperBot
@camperbot
williamface sends brownie points to @ayyazzafar :sparkles: :thumbsup: :sparkles:
:cookie: 8 | @ayyazzafar |http://www.freecodecamp.com/ayyazzafar
kennyq94
@kennyq94

sorry this one is more organized

var lat, lon, weather;
if ('geolocation' in navigator) {
  navigator.geolocation.getCurrentPosition(location, error);
} else {
  alert("Geolocation not supported");
}

function error() {
  alert("Sorry you are in outer space");
}

function location(position) {
  lat = position.coords.latitude;
  lon = position.coords.longitude;

  weather = "api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + lon + "&units=metric&APPID=";

  $.ajax({
    url: weather,
    dataType: 'jsonp',
    success: function(data) {
      var temp = data.main.temp;
      $("#temp").html(temp);
    }

  });
}

I didnt want to share my api

Dylan
@dhcodes
@WilliamFace can you paste you codepen link?
you likely need to add &callback=? to the end of your url
Ayyaz Zafar
@ayyazzafar
@WilliamFace there are possibilities that codepen has some restrictions. But please share your codepen. May be we can find some solution for you.
Will Kempster
@kempsterrrr
@dhcodes of course, here we go: http://codepen.io/dilliam/pen/rLbxZV
I have been messing around with this for about an hour now and changed a lot so there may be some stupid errors that I am not picking up :/
Dylan
@dhcodes
well i think it may be the s in https
but even if i remove it, it calls the https page
so idk, still messing with it
Will Kempster
@kempsterrrr
I had that issue with the weather App and ended up using this URL proxy service - https://crossorigin.me/
But no matter what I do I can't make this one work. I even tried copying in code from tutorials (forgive me) just too see if I as going mad but it was still throwing the same error
Dylan
@dhcodes
@WilliamFace i just used that prepend and it did work
add an s to your codepen url
https:// your codepen link
prepend your url with https://crossorigin.me
change your success function to console.log(request)