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
Ken Haduch
@khaduch
@kbaig - oh, okay - I guess if they don't tell you then there's no way you could cite it... thanks!
CamperBot
@camperbot
khaduch sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 347 | @kbaig |http://www.freecodecamp.com/kbaig
Kaz Baig
@kbaig
@khaduch Thanks for taking a look :)
Ivan Ngundela
@ingundela
hello everyone, please need some help with my project....I have added carousel image from bootstrap and also using smooth scrolling..... everytime I manually click prev or next arrow it show the next image but the website also move up and I don't understand what is going on here.... the site is: https://ingundela.github.io/imsaqa/
PLEASE HELP
Ian Gracia
@iangracia

"Given two sets (for example set A = {1, 2, 3} and set B = {2, 3, 4}), the mathematical term "symmetric difference" of two sets is the set of elements which are in either of the two sets, but not in both (A △ B = C = {1, 4})." "

Example : "sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]) should return [1, 4, 5]"

Why should the 5 be in the returned array? If it is in all the 3 arrays, then its not a symmetric difference?

Trommelochse
@Trommelochse
@ingundela working fine for me
Kaz Baig
@kbaig
@iangracia Take the diff of the first two and then take the difference of that and the third
CamperBot
@camperbot
kbaig sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 363 | @iangracia |http://www.freecodecamp.com/iangracia
Ivan Ngundela
@ingundela
@Trommelochse sorry, I've removed the smooth scrolling on this one tho share with the client... allow me to add and you will se it moving up
Ian Gracia
@iangracia
@kbaig thanks
CamperBot
@camperbot
iangracia sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 348 | @kbaig |http://www.freecodecamp.com/kbaig
Ivan Ngundela
@ingundela
@Trommelochse all the website a have with bootstrap carousel and smooth scrolling as the same issue and I don't know how to fix it have a look at this one aswell https://ingundela.github.io/tki/
Ian Gracia
@iangracia

https://codepen.io/iangracia/pen/ZXoYRp

can someone tell me why my calc's toPrecision function works with the equation 0.1 + 0.2 = 0.3 but not with 0.3 + 0.6 = 0.8999999999999999

Ian Gracia
@iangracia
pls someone help me im going crazy
piteto
@piteto
@iangracia I don't know the answer to your question, but you should be adding an argument to .toPrecision() and converting the result to a number
CamperBot
@camperbot
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 364 | @iangracia |http://www.freecodecamp.com/iangracia
piteto
@piteto
Number(holder1.toPrecision(12));
.toPrecision() without an argument is the same as .toString()
If the precision argument is omitted, behaves as Number.prototype.toString(). If the precision argument is a non-integer value, it is rounded to the nearest integer.
Ivan Ngundela
@ingundela
ANY HELP PLEASE: hello everyone, please need some help with my project....I have added carousel image from bootstrap and also using smooth scrolling..... everytime I manually click prev or next arrow it show the next image but the website also move up and I don't understand what is going on here.... the site is:https://ingundela.github.io/tki/
piteto
@piteto
@ingundela It works fine for me, please don't shout
Ian Gracia
@iangracia
var x = 3.0599999999999996;

console.log(Number(x.toPrecision(1));  //  3
console.log(Number(x.toPrecision(2));  // 3.1
console.log(Number(x.toPrecision(3));  // 3.06
console.log(Number(x.toPrecision(4));  // 3.06
console.log(Number(x.toPrecision(7));  // 3.06
console.log(Number(x.toPrecision());  // 3.06
@piteto this number can be put without any arg in the function and still returns a shortend number
Ivan Ngundela
@ingundela
@piteto Thanks... when you click the prev or next arrow it don't move up?
CamperBot
@camperbot
ingundela sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 231 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
@iangracia This is what I get:
console.log(Number(x.toPrecision(1)));  //  3
console.log(Number(x.toPrecision(2)));  // 3.1
console.log(Number(x.toPrecision(3)));  // 3.06
console.log(Number(x.toPrecision(4)));  // 3.06
console.log(Number(x.toPrecision(7)));  // 3.06
console.log(Number(x.toPrecision()));  // 3.059999999999996
CamperBot
@camperbot
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
api offline
Ivan Ngundela
@ingundela
@piteto Sorted... Thanks
CamperBot
@camperbot
api offline
ingundela sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
intcreate
@intcreate
can any1 make the slider effect look better?
https://codepen.io/anon/pen/LzmaaN
quickspeedy
@quickspeedy

How do you properly use for in loop through all the complex object?

I am stuck with this code:

  for(var key in weatherAdvices) {
    // console.log(key);
    if(key == "chilly") {
      for(var weatherCondition in key)
      console.log(key[0]);
    }
  }

My complex object:

  var weatherAdvices = {
     "chilly" : [
        {
          "Sunny" : "It's a beautiful day! Be sure to bring thick jacket!"
        },
        {
          "Cloudy" : "Don't let the weather get you down! Put a smile on your face and conquer the day!"
        },
        {
          "Rain" : "It's raining, be sure to bring an umbrella!"
        }
      ],
      "warm" : [
        {
          "Sunny" : "Ahh... So warm... Get out and enjoy the day!"
        },
        {
          "Cloudy" : "Don't let the weather get you down! Put a smile on your face and conquer the day!"
        },
        {
          "Rain" : "It's raining, be sure to bring an umbrella!"
        }
      ],
      "hot" : [
        {
          "Sunny" : "So hot! Be sure to use sunscreen lotion!"
        },
        {
          "Cloudy" : "Even though there is no sun, be sure to use sunscreen lotion!"
        },
        {
          "Rain" : "It's raining, be sure to bring an umbrella!"
        }
      ]
  }
The first if statement works and I decided to use another for in loop within that if statement but it doesn't work.
Any help would be appreciated!
piteto
@piteto
@quickspeedy
for(var key in weatherAdvices) {
  if (key == "chilly") {
    console.log(weatherAdvices[key][0])
  }
}
quickspeedy
@quickspeedy
Thanks. Didn't think of that. @piteto
CamperBot
@camperbot
quickspeedy sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 232 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
no problem!
piteto
@piteto
@intcreate You could move some of your HTML to your javascript to give more flexibility in adding more images. Something like: https://s.codepen.io/anon/pen/LzrENb?editors=0010
intcreate
@intcreate
cool
Mauricio Scioville
@invasorMou
hi
Tom
@moT01
any regex masters around?
Pagnito
@Pagnito
who did the dungeon crawler alrdy?