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
: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:
:star2: 1151 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
flindip
@flindip
@andreas2249 thanks
CamperBot
@camperbot
flindip sends brownie points to @andreas2249 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for andreas2249
andreas2249
@andreas2249
@flindip, +lat+"&lon... (I know nothing about this -- only guessing coz it looks like you're concatenating... Ignore it if I'm totally off base)
IndiraShrestha
@IndiraShrestha
why should the function randomGenerateQuote be outside the document ready function when we load the data?
greg
@wearenotgroot
@IndiraShrestha it's a scope issue
IndiraShrestha
@IndiraShrestha
@wearenotgroot is there any material i could refer to?
Hassan Algoz
@HassanAlgoz
I think the question should be "why should it be inside document ready"?
Sujit Karki
@Swoozeki
@IndiraShrestha what about JSON are you having trouble with?
greg
@wearenotgroot
Hassan Algoz
@HassanAlgoz
@IndiraShrestha I think the question should be "why should it be inside document ready"?
@IndiraShrestha Because it is just a function, it does not get executed unless you call it
Suzanne Atkinson
@AdventureBear
suggestions wanted for making my Simon "pretty" before I start coding the logic. I know it doesn't need to be but I can enjoy it more that way. This is the hard part for me so spending time on the front end of the project forces me to learn CSS better. Here is my pen:
IndiraShrestha
@IndiraShrestha
@HassanAlgoz It didnt work when i had it inside document ready function
What I want is perfectly concentric circles. I've played with both pixels and percentages and the box model is throwing me off. I want gutters evenly spaced at the edges and the center. So figuring out the exact heigth/width and top / left settings is what's bugging me.
IndiraShrestha
@IndiraShrestha
@Swoozeki i think i am having trouble grasping the scope issue
@Swoozeki also i wanted to get the JSON of the http://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&key=1231&callback=? but having trouble getting it
JD Tadlock
@jdtdesigns
@AdventureBear Using absolutes and exact widths/heights is a way to do it. http://codepen.io/jdtadlock/pen/EyVbOM
Sujit Karki
@Swoozeki
@IndiraShrestha the link you gave me doesnt actually have data
IndiraShrestha
@IndiraShrestha
@Swoozeki In the codepen I am using the API