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
Daniel Cartín
@Danielcv93
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?
Jonathan
@JonKaric
@gitgenie The title and description of yourself i feel needs to be vertically centerd. The yellow section is a bit strong on the eyes, kinda hard to see the white text. and i'd say bring the container smaller on larger devices, especially the contact section.
@gitgenie other than that the design is really nice. great choice of font
greg
@wearenotgroot
@Danielcv93 well to be able to access the runrandom function you need to create/declare it where other can access it meaning in higher scope. since it was inside another function(anonymous) the scope is hidden
Daniel Cartín
@Danielcv93
ok, i'll take that in mind!
greg
@wearenotgroot
@Danielcv93 another suggestion is to combine the quotes and the speaker array into one
Daniel Cartín
@Danielcv93
thanks @wearenotgroot
CamperBot
@camperbot
danielcv93 sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1150 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
gitgenie
@gitgenie
@JonKaric Noted. I shall take care of it.thank you very much
greg
@wearenotgroot
@Danielcv93 meaning making an array of objects instead
quotes = [
{
  quote:"...",  
  speaker: "...."
},
   ...
];
Sorin Ruse
@sorinr
@gitgenie just try to add some smooth transition between #links
andreas2249
@andreas2249

@gitgenie, very nice. I especially liked how your portfolio page kept the images centered despite the page size. Also liked how they stacked when reducing page size/width.

Depending how far you want to go with you, you might consider keeping the menu links always visible when the page is scrolled down.

Very nice. :)

gitgenie
@gitgenie
@sorinr @andreas2249 thanks guys , i shall take care of that
CamperBot
@camperbot
gitgenie sends brownie points to @sorinr and @andreas2249 :sparkles: :thumbsup: :sparkles:
:cookie: 374 | @sorinr |http://www.freecodecamp.com/sorinr
:warning: could not find receiver for andreas2249
Lars
@Oppenheimer1
This passes the test but only because I tweaked it to pass the last test. Any suggestions for improving this code would be greatly appreciated.
   function dropElements(arr, func) {
  // Drop them elements.
      var x = [];
      for(var i=0; i<arr.length; i++){
    if(func(arr[i]) === true){
        return arr.slice(i,arr.length);
    }
    if(func(arr[arr.length-1]) === false && func(arr[arr.length-2]) === false){
        return x;
    }
}
}
dropElements([1, 2, 3, 4], function(n) {return n > 5;});
Lars
@Oppenheimer1
ok, I think this next code is acceptable but I'm taking suggestions on how to refractor this.
function dropElements(arr, func) {
  // Drop them elements.
  var x = [];
  for(var i=0; i<arr.length; i++){
    if(func(arr[i]) === true){
        return arr.slice(i,arr.length);
    }
    if(func(arr[arr.length-1]) === false && func(arr[arr.length-2]) === false  &&   func(arr[arr.length-3]) === false && func(arr[arr.length-4]) === false && func(arr[arr.length-5]) === false){
        return x;
    }
}
}
Mickey H
@nganhthien
anyone help me disjoint 2 section overlap pls :worried:(
IndiraShrestha
@IndiraShrestha
@jdtdesigns after your suggestion about learning more about the $.getJSON. I read through some material and wanted to console.log the data from the API
This message was deleted
flindip
@flindip

trying to check if the lat/log values are being implemented in my weather app. Here is the code:

$(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){
console.log(data);
});

});

});

getting "Unexpected string literal '&lon='. Expected ')' to end a argument list."

greg
@wearenotgroot
@IndiraShrestha should it be data.quoteText and so on?
andreas2249
@andreas2249
@flindip, might need a + here to start...
+lat"&lon
greg
@wearenotgroot
@IndiraShrestha also put the randomGenerateQuote outside the .ready
@IndiraShrestha
//scope
function randomGenerateQuote(data){
    var QuoteGenerated = data.quoteText;
    var QuoteAuthor = data.quoteAuthor;
    $('.quote-text').text(QuoteGenerated);
}

$(document).ready(function(){
  var key = Math.floor(Math.random() * 10000 + 1);

  $.getJSON('http://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&lang=en&Key='+ key +'&jsonp=randomGenerateQuote&callback=?',randomGenerateQuote);


});
IndiraShrestha
@IndiraShrestha
@wearenotgroot I am trying to understand the JSON and have been watching tons of youtube video as well as documentation for it and I feel like i am struggling to grasp the concept of JSON
flindip
@flindip
@andreas2249 I get "Unexpected token ')'"
IndiraShrestha
@IndiraShrestha
@wearenotgroot Thank you for your help but quick question
CamperBot
@camperbot
indirashrestha sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles: