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
CamperBot
@camperbot
:cookie: 329 | @dna113p |http://www.freecodecamp.com/dna113p
greg
@wearenotgroot
@flindip read about asynchronous functions
flindip
@flindip
@wearenotgroot Is my top function blocking the second one?
Sorin Ruse
@sorinr
@jdtdesigns do you know how vue.js reactivity is working? if yes just gimme a clue on how to clear an already triggered instance
greg
@wearenotgroot
@flindip to be able to get the values of lat and lon the second $.getJSON should be inside the callback function of the first one
Syahri Ramadhan
@SPMechanic
Hello, there.. can i get any help for my project?
Paul Borawski
@iAmNawa
@SPMechanic How can I help??
greg
@wearenotgroot
@flindip
$(document).ready(function() {
$.getJSON("http://ip-api.com/json/?callback=?", function(data) {

       $.getJSON("https://api.openweathermap.org/data/2.5/weather?lat="+data.lat+"&lon="+data.lon+"&APPID=....");
      });

});
flindip
@flindip

@wearenotgroot I gotcha. how about this:

$(document).ready(function() {
$.getJSON("http://ip-api.com/json/?callback=?", function(data) {
var getLocation=function(data){
var lat= data.lat;
var lon= data.lon;
}
$.getJson("api.openweathermap.org/data/2.5/weather?lat="+lat"&lon="+lon), function(data){

});

});

});

thanks

CamperBot
@camperbot
flindip sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1149 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
JD Tadlock
@jdtdesigns
@sorinr Instead of using debounce, just use a setTimeout
greg
@wearenotgroot
@flindip also the recommended way of using $.getJSON
$.getJSON(url).done(callback).fail(errorCallback);
@flindip remember JSON part is all caps
Sorin Ruse
@sorinr
@jdtdesigns you mean to setTimeout on searchWiki? to delay the calls until for some interval no keyup event its comming up?
Syahri Ramadhan
@SPMechanic
@iAmNawa THis my codepen.: http://codepen.io/pen/

i just confused, how to centered <LI> element..what Bootstrap class that i must utilize? I hack my way to center the DIV element using css (got it from stack-overflow), but it not working for unordered list. :(
got my Bootstrap class reference from here: https://bootstrapcreative.com/resources/bootstrap-3-css-classes-index/

but i did not found any class suitable for my needs, i am just clueless...what did i miss?

JD Tadlock
@jdtdesigns
clearTimeout(window.delaySearch);

window.delaySearch = setTimeout(function() {
  // fire the search
}, 1200);
@sorinr
Paul Borawski
@iAmNawa
@SPMechanic You can probably write that whole page in just html and css
@SPMechanic That codepen you are sending is empty though
Syahri Ramadhan
@SPMechanic
@SPMechanic That codepen you are sending is empty though
ooh, sorry..here: http://codepen.io/ramadhan/pen/xOEmWy
@iAmNawa : here the codepen, still confuse using codepen itself...sorry, i am newbie: >> http://codepen.io/ramadhan/pen/xOEmWy
JD Tadlock
@jdtdesigns
@sorinr I'm trying to get you to figure out the logic on your own. Just think it through or write it out piece by piece then code it.
Paul Borawski
@iAmNawa
@SPMechanic Are you doing your tribute page to the Doctor or picking someone yourself?
Syahri Ramadhan
@SPMechanic

@iAmNawa

@SPMechanic You can probably write that whole page in just html and css

yes, but yesterday i asked the same question before..whether i am utilize Boostrap or pure html+css, and the asnweri got from fellow camper from channel #HELP, it must use Bootstrap.

Paul Borawski
@iAmNawa
@SPMechanic I private messaged you, continue conversation there
chibisan352
@chibisan352
I'm so confused on how to get started..
What did you guys start with when doing the tribute page?
andreas2249
@andreas2249

@chibisan352, I always start a project with pencil and paper. I make a quick sketch what I'd like a page to look like (drawing squares). Then for each of those squares, determine where I'm going to have <div> or <section> breaks, text, buttons, etc.

Once I'm satisfied that's the goal, I then write the basic structure of the page filling it with dummy text, images, etc. I'll then add links and wire up the buttons (connect buttons to links)

This is a generalization, the idea being "begin with the end in mind" but spend more time initially planning a project early on rather than just coding a project.
Daniel Cartín
@Danielcv93
i just need some help
why it doesn´t show the quotes?
pleaaaase! :(
greg
@wearenotgroot
@Danielcv93 did you add jquery? on codepen JS settings
@Danielcv93 also a bunch of syntax error
Sorin Ruse
@sorinr
@jdtdesigns yes but u r suggesting me only to "delay" a new http call to the api not canceling the previous ones. debounce in vue this is making: it delayes "reactivity"
greg
@wearenotgroot
@Danielcv93 line 5 forgotten semicolon, line 10 Math.random is a function/method forgotten parenthesis ()
Daniel Cartín
@Danielcv93
yes, i add it! but doesn't run!
ok, i add it, what else do you see? :/
greg
@wearenotgroot
@Danielcv93 you need to fix a bunch of error first
Sorin Ruse
@sorinr
@jdtdesigns try to fork my pen here and show me what you intend to explain to me: http://codepen.io/sorinr/pen/LZVqmJ
greg
@wearenotgroot
@Danielcv93 check the dev console it will point out what/where the errors are
JD Tadlock
@jdtdesigns
@sorinr You're simply canceling the previous call to the api on each key press and starting a new delay before searching. This will keep the delays from stacking up.
greg
@wearenotgroot
@Danielcv93 take out runrandom function and put it outside that annonymous function
gitgenie
@gitgenie
HI guys.. Please review my portfolio . tell me what you liked and what you didn't. Suggestions most welcome:)https://codepen.io/gitginie/pen/ZObgbV
Sorin Ruse
@sorinr
@jdtdesigns how to cancel prev calls if they are reactively called?
Daniel Cartín
@Danielcv93
@wearenotgroot you're a hgenious ! what was i supose to put it outside the function?