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
Vincent D'Onofrio
@donofriov
@Aoladapo your code looks correct, are you pulling in jQuery to codepen?
Oladapo Ademola
@Aoladapo
@donofriov im trying to use jquery to style my page but not working so i dont know what im doing wrong
Vincent D'Onofrio
@donofriov
follow my video above
oh i’m sorry
you’re not using codepen
one sec
or are you? @Aoladapo
jQuery isn’t available by default. it’s a javascript library
Oladapo Ademola
@Aoladapo
thanks @donofriov got it
CamperBot
@camperbot
aoladapo sends brownie points to @donofriov :sparkles: :thumbsup: :sparkles:
:cookie: 289 | @donofriov |http://www.freecodecamp.com/donofriov
Vincent D'Onofrio
@donofriov
:thumbsup: awesome
playingwithinfinity
@playingwithinfinity
Can someone help me with the MiniMax algorithm? I used this link but I just don't get it. https://medium.freecodecamp.com/how-to-make-your-tic-tac-toe-game-unbeatable-by-using-the-minimax-algorithm-9d690bad4b37#.fi4d1u8ss
Nithin B Chandran
@beingnin
im stuck with weather app. I managed to find the current location using an location api, but cant store the location value to global var in order to append it on weather api url pls help
Marianissimus
@Marianissimus
@beingnin I'm there, too. It seems that the solution is a function nested inside the current location function, so that it gets the local values.
Nithin B Chandran
@beingnin
i tried almost everything. tried to return the value using a function and store the var with that return value. but no use
Marianissimus
@Marianissimus
@beingnin global values will not work, since it's a asynchronouscall (updated in real time). Guys, can you elaborate on this?
Vincent D'Onofrio
@donofriov
nesting your calls is a good way to go
Nithin B Chandran
@beingnin
@Marianissimus my code here:

var loc = getCity();

    /*The API don't work in https*/
    $(document).ready(
    function () {            

        console.log('http://api.openweathermap.org/data/2.5/weather?q=' + loc + '&APPID=a9d7d3831db421de7c057c04e495dd4f');
        $.ajax({

            type: 'GET',
            url: 'http://api.openweathermap.org/data/2.5/weather?q=' + loc + '&APPID=a9d7d3831db421de7c057c04e495dd4f',
            success: function (data) {

                $('#desc').html(data.weather[0].description);
                $('#temp').html(data.main.temp);
            }

        });
    })

/Get current city/
function getCity() {
var x = '';
$.ajax({
type: 'GET',
url: ('http://freegeoip.net/json/'),
success: function (data) {
x=data.city;

            }
        });
    return x;
    }
Vincent D'Onofrio
@donofriov
so .getJSON(locator url, function(json) { some code .getJSON(weather url, function(json2){ )
if you click on this http://freegeoip.net/json/
do you see a city in the data?
CamperBot
@camperbot
beingnin sends brownie points to @donofriov :sparkles: :thumbsup: :sparkles:
Nithin B Chandran
@beingnin
@donofriov thanks for the idea. lemme try.
CamperBot
@camperbot
:cookie: 291 | @donofriov |http://www.freecodecamp.com/donofriov
Vincent D'Onofrio
@donofriov
@beingnin your code looks pretty good, it might be a data issue
well i mean for the second appi call at least
you should be getting your lat / lon first using your geo api call
then you can get city as well as all the other info you need from the weather api
Nithin B Chandran
@beingnin
@donofriov k
Josh
@joshfilippi

could anyone help me center my tick-tac-toe board? I've explored all the options I know of and found no solutions googling the problem.

https://codepen.io/JoshFilippi/pen/EZBQvQ

When opened on a bigger screen it isn't centered
kirbyedy
@kirbyedy
@joshfilippi that might be related with your bootstrap library
instead of that 4.0 which is in the alpha stage
Josh
@joshfilippi
@kirbyedy Thanks, but still not centered
CamperBot
@camperbot
joshfilippi sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1828 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Nithin B Chandran
@beingnin
@beingnin thanks a lot. it worked. one more thing.. how can we then store a json data to use in some other functions in cases such that we cannot use nested functions??
Anemnesea
@Anemnesea
Hello, Can someone please help me out with my code? I can't seem to get the Find local news <div> to float to the right.
Zhu Wei
@zhuwei12
I'm stuck in buliding a random quote machine...My question is ,how can I find a json in a html?or I need to make one by myself?
if then,how to make a json and put it into the website?
how can i use it?
I don't understand....
kirbyedy
@kirbyedy
@zhuwei12 it is up to you, you can either create an array of quotes on your own, and place it inside your javascript section
or make a json file and host it somewhere
or you can use an quote api that will give you access to random quotes