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
Tom
@moT01
is that intentional
maybe im wrong on that
Amit Patel
@AmitP88
@moT01 oh, I resolved it. turns out I was trying to use an object key value pair to create another key value pair within the same object. I was told I couldn't do that while the object was still being made
@moT01 thanks for looking into it though, I really appreciate it :)
CamperBot
@camperbot
amitp88 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 866 | @mot01 |http://www.freecodecamp.com/mot01
Linus
@nusli
Hey guys I have a problem with my simon game: When the computer play it activates all the buttons at the same time. Is there a way to do this one after another besides using setTimeout()?
Tom
@moT01
maybe if you share your code someone could find another way for you
set timeout is probly the way to go
but you might be able to put a css transition delay on it or something
Linus
@nusli
@moT01
this is one version of it, might be a little messy atm. the important functions here are "activateSquare" and "activateSeries"
https://codepen.io/nusli/pen/MEvoJo
Tom
@moT01
@nusli is it not working or are you just looking for another way
Linus
@nusli
@moT01 i know that settimeout would work but im looking for another way. The code i posted isn't working
Ken Haduch
@khaduch
@nusli - one problem is that the setTimeout calls that you make do not run sequentially, they would all run pretty much at the same time. You can add additional time to each subsequent invocation of setTimeout so that they would eventually fire at approximately the rate you are looking for. At least that's my guess at what is going on, without having too much time to delve into the operation of the code.
David Chen
@Obiwan777
anyone familiar with php and mysqli stuff
Zebralight
@zebralight
is anyone here familiar with using the google maps api with a framework like React or AngularJS, namely a way to consume it without the use of another script tag?
Linus
@nusli
@khaduch i know. I was looking for another way of doing this. I thought of promises but obviously that's not working
piteto
@piteto
@nusli your resolve() is firing immediately when activateSquare() is called - it needs to be called after the square finishes rotating
If you want a different approach though, it seems jQuery's .queue() method could work well here
http://api.jquery.com/queue/
  //function declarations
  function activateSquare(id) {
    return new Promise((resolve, reject) => {
      $("#" + id).addClass("square-rotate").delay(500).queue(function() {
        $(this).removeClass("square-rotate").dequeue();
        resolve();
      });
      sounds[id].play();
    });
  }
CXmanager
@CXmanager
Hi all, I want to create a clickable header button at the top that will take you to a particular section. Can someone review the approach and comment why this is not working. https://codepen.io/CXmanager/pen/mwwxYq
Ken Haduch
@khaduch
@CXmanager - a couple things that I see right off - your <div id=container> should be <div id="container"> But your button is working - either you fixed it since you posted the question, or the problem is that your content area is so small at this point that there isn't any scrolling that has to be done. If you shrink your rendered page area and click the "Portfolio" link, it will scroll the window up to show the portfolio section.
Tom
@moT01
hey @khaduch
Ken Haduch
@khaduch
@moT01 - howdy Tom!
Tom
@moT01
wanna attempt to fix an issue im having?
or help me figure it out
Ken Haduch
@khaduch
@moT01 - I can give it a shot...
Tom
@moT01
well, ill explain it, don't feel obligated if you dont want to...
im making a snake game
i enlarged the pieces
the food location is randomly generated
sometimes it shows up where the head of the snake it
is*
there's an xyHistory array with the location of all the snake pieces
(where you shouldn't be able to put the food)
and it works for all the spots but the head, meaning it shows up in the exact same spot as is last was when you eat it
am i making sense so far?
i dunno, i spent some time on it and can't quite get there - yet
the draw function at the bottom continuously loops
Tom
@moT01
not sure if that's part of p5.js or canvas - not important
or maybe it is - i guess im not sure how that works exactly
piteto
@piteto
Your navbar links are written correctly, but the sections need to be taller so you can scroll to them. Also, it would be better to use margins instead of html entities for spaces &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Altogether, update your CSS with the following to see:
section {
  min-height: 70vh;
}

li {
  list-style: none;
  display: inline;
  margin: 0 15px;
}
CXmanager
@CXmanager
@khaduch Thanks. Do you know how to make it scroll smoothly to that section?
CamperBot
@camperbot
cxmanager sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3329 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
@CXmanager - google for a JS package "scrollspy" - I think that is what people normally use. It might even be part of Bootstrap? I might be wrong about that for the smooth scrolling, but I think that's where you can find that functionality?
CXmanager
@CXmanager
Thanks
Ken Haduch
@khaduch
@CXmanager - this is the first link that came up with a google search: https://css-tricks.com/snippets/jquery/smooth-scrolling/ - you can find information there.
Alexx Martínez
@AlexxMart
I'm adding the final touch to my "Twitch TV" challenge and I need the page to display an error message when the user enters an incorrect username. The first time the user adds an incorrect user it works fine, but then it shows the error message even when the username is correct