Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:09
    thecodingaviator commented #31179
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:07
    thecodingaviator commented #31182
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator commented #31190
  • Apr 01 18:05
    thecodingaviator commented #31157
  • Apr 01 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 18:04
    thecodingaviator closed #31157
  • Apr 01 18:04
    thecodingaviator closed #33788
  • Apr 01 18:04
    thecodingaviator commented #33788
  • Apr 01 18:02
    thecodingaviator closed #31059
  • Apr 01 18:02
    thecodingaviator commented #31059
Ronique Ricketts
@RoniqueRicketts
@cmccormack lol DO IT>>> :)
Jason Luboff
@JLuboff
@cmccormack We all know you aren't getting any real work done anyhow
Christopher McCormack
@cmccormack
I'm in meetings all day, do they count as work?
Jason Luboff
@JLuboff
Nope.
Ronique Ricketts
@RoniqueRicketts
@JLuboff lol don't show him up like that. Meeting is not real work @cmccormack
Christopher McCormack
@cmccormack
Then don't tell my leadership - that's about all I do anymore :D
Jason Luboff
@JLuboff
Lol
Ronique Ricketts
@RoniqueRicketts
@cmccormack lol. smh. LUCKY BASTARD!
Jason Luboff
@JLuboff
@RoniqueRicketts It looks like you're the lucky one, hurricane irma is staying clear of Jamaica?
Ronique Ricketts
@RoniqueRicketts
@JLuboff lol I warned her not to come here. She knows that if she comes we plan to drunk her off with weed. :trollface:
Jason Luboff
@JLuboff
:joy:
Ronique Ricketts
@RoniqueRicketts
We got some heavy rains last-night but now the sun is out in all it glory.
weather.PNG
TWoerner94
@TWoerner94
Hey guys, hope someone can help me with my lil problem i got here
Im working on the pomodoro clock and right now im just simply tring to get the stop button to work
I wanted to have start and stop as one button
Blauelf
@Blauelf
@RoniqueRicketts Subtract 15 Kelvin from the temperature and that could be here.
TWoerner94
@TWoerner94
Theres a boolean called clicked that returns true while a countdown is running
so my loop basically checks if a countdown is running, if not it works as a start button and triggers a setInterval
if clicked returns true then it should stop the interval from running
I tried to do that with clearInterval(countdown) but it doesnt seem to work
Ronique Ricketts
@RoniqueRicketts
@Blauelf cool
Ronique Ricketts
@RoniqueRicketts
I have some questions for nodejs/php developers. When you setting up an app from scratch lets say you buy a domain name and you also buy a serverspace. What do you do next to get coding building up the back-end so you can start serving pages? Anyone has any documentation for nodejs that I could read to get some info?
Christopher McCormack
@cmccormack
@TWoerner94 probably a scoping issue, move var countdown outside your click handler so it's global
@TWoerner94 and don't forget to set clicked to false again in your else
TWoerner94
@TWoerner94
Oh cool thanks I'll try that thanks @cmccormack
CamperBot
@camperbot
twoerner94 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
api offline
TWoerner94
@TWoerner94
How do i do that though? I want countdown to be triggered on click
Christopher McCormack
@cmccormack
  var countdown
  //start stop button functionality
  $('#start').click(function() {
    if (!clicked) {
      clicked = true;
      let timer = len * 60;
      countdown = setInterval(function() {
        timer--;
        $('#remain').html(timer);
        if (timer === 0) {
          alarm.play();
          timer = brk * 60;
        }
      }, 1000);
    } else {
      clearInterval(countdown);
      clicked=false
    } 
  });
TWoerner94
@TWoerner94
Ohh just declaring the name, not a value
That makes sense thanks again @cmccormack
Christopher McCormack
@cmccormack
Right, sorry I wasn't more specific
CamperBot
@camperbot
twoerner94 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
api offline
Christopher McCormack
@cmccormack
np
TWoerner94
@TWoerner94
Worked perfectly :D
I was under the impression that var would be hoisted up to a higher level anyways
But maybe i just misunderstand hoisting
Jason Luboff
@JLuboff
@RoniqueRicketts I haven't looked too much into it myself, but you would need to purchase serverspace as opposed to web server space since with node you're creating the web server. I'm not entirely sure how that works since I've only used free hosts at this point (heroku and glitch)
Christopher McCormack
@cmccormack
@TWoerner94 it will hoist to the top of the scope, but I believe the scope is your callback function, and when you click it again you're calling it with a new callback function
Ronique Ricketts
@RoniqueRicketts
@JLuboff even that i've never uset it before can i do it :)
Jason Luboff
@JLuboff
@RoniqueRicketts I normally build up everything locally, and while doing so constantly (atleast once a day if not multiple times a day) push my code up to github. When I'm ready to deploy, I deploy from my github repo to either heroku or glitch
Christopher McCormack
@cmccormack
For my server I'm using godaddy, for my url I'm using Hover. Godaddy gives you a full unix interface to install what you need to do the backend stuff
Ronique Ricketts
@RoniqueRicketts
I wanna mess around with an application concept I have
@cmccormack So I just install node then I can install packages with npm?
Jason Luboff
@JLuboff
@RoniqueRicketts I would just do it locally then, no reason not to
Ronique Ricketts
@RoniqueRicketts
@JLuboff I wanna know how to use a server
Jason Luboff
@JLuboff
Thats the thing...with node, you're creating the server. Setting it up is roughly the same when doing it locally on your machine or doing it on a remote machine (only difference might be installing node as its going to be sliughtly different between windows/mac/linux)