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
:cookie: 666 | @longnt80 |http://www.freecodecamp.com/longnt80
gaitchs gangmei
@gaitchs
could somebody explain to me why time is calculated like this
Date());
var seconds = Math.floor((t / 1000) % 60);
var minutes = Math.floor((t / 1000 / 60) % 60);
var hours = Math.floor((t / (1000 60 60)) % 24);
var days = Math.floor(t / (1000 60 60 * 24));
korzo
@korzo
@gaitchs because Date returns time in miliseconds
abraham anak agung
@padunk
@gaitchs about Date
korzo
@korzo
@gaitchs my answer was related to (t / 1000) part.
If you ask about modulo operator, then it's because you care only for remainder .
gaitchs gangmei
@gaitchs
function getTimeRemaining(endtime) {
var t = Date.parse(endtime) - Date.parse(new Date());
so what is returned to t
@padunk thanks reading it now..
CamperBot
@camperbot
gaitchs sends brownie points to @padunk :sparkles: :thumbsup: :sparkles:
:cookie: 387 | @padunk |http://www.freecodecamp.com/padunk
abraham anak agung
@padunk
@gaitchs t will be time remaining between endtime and the time your execute the function.
Bogdan
@oblanao
@oblanao
Hello, can you please give me feedback on my RecipeBox project? Take a look at : http://5a02dd7aa6188f3d7ea5f9ee.upholsterer-data-50377.netlify.com/ . Thanks !
sorry for the link, I built the React App on local machine and deployed it with netlify
CamperBot
@camperbot
sorry oblanao, you can't send brownie points to yourself! :sparkles: :sparkles:
Christopher Brown
@ChrisBrownie55
@BladymirL You should try writing it in plain CSS, the less you learn to rely on a framework the more you can do. And yeah, Bootstrap is kinda dying, I've never really used it for that reason. Plus nowadays there are new things in CSS that pretty much make certain things in Bootstrap obsolete. But I would suggest messing with more than padding and divs; try to make something that challenges you.
Mike Boardley
@Boardley
That's why FreeCodeCamp and Coding Bootcamps are doing a dis-service to their students by allowing them to rely on a FrontEndFramework. They think they understand CSS & HTML and the reality is that when it comes time to actually build a full page that doesn't follow Bootstrap's pattern, they're lost.
Christopher Brown
@ChrisBrownie55
@Boardley Yeah, I agree, when I first came to FreeCodeCamp and did the Tribute Page challenge, it was barely decent (it was pretty much a copy of the example), but I recently came back to FreeCodeCamp and redid that one and since I had actually learned CSS, HTML and JavaScript I was actually able to build some interesting things and not to mention have it change to work on different devices which they didn't do a great job of teaching before you reach the tribute page.
Harut
@harut-g
Who knows a good time tracker?
heroiczero
@heroiczero
@harut-g Do you want like a timer for events and stuff?
Harut
@harut-g
@heroiczero For freelancers
heroiczero
@heroiczero
@harut-g i mean you could make one or you could browse the website and search for one that has the features you want.
Harut
@harut-g
@heroiczero okay, thanks
CamperBot
@camperbot
harut-g sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2036 | @heroiczero |http://www.freecodecamp.com/heroiczero
Mafalda
@otmeek
Speaking of relying on Bootstrap, I start working at a company tomorrow as designer. What I have to do is 99% write scss. They use an in-house framework and I'm panicking about not understanding how to use it lol
heroiczero
@heroiczero
@otmeek do they have documentation on the framework? Read up on it.
Mafalda
@otmeek
@heroiczero no clue, I haven't been given any info, I'll need to ask all the questions tomorrow.
heroiczero
@heroiczero
@otmeek Usually if you understand CSS other frameworks are easier to pick up and manipulate.
Mafalda
@otmeek
Yeah I have a solid grasp on CSS, hope I can pick it up easily
I do rely on bootstrap's layouting tools a lot though
heroiczero
@heroiczero
@otmeek Well, relax. If there is no documentation online for their private framework, I do not think they are preparing you to fail. Hiring cost money and they hired you. So, they probably have a orientation or something for you to go through
@otmeek Just remember to remain "active" and ask question. Certain places like to accelerate really fast, and picking up the language fast is key to success :) Sometimes, taking your work with you to home and studying helps too. :) Especially, programming since languages get updated and changed all the time to create efficiency.
Mafalda
@otmeek
@heroiczero definitely! I'm nervous about it but excited
heroiczero
@heroiczero
@otmeek Well good luck on your job :+1: :)
Mafalda
@otmeek
@heroiczero thanks! :blush:
CamperBot
@camperbot
otmeek sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2037 | @heroiczero |http://www.freecodecamp.com/heroiczero
Victor Abeledo
@victorja
Hi guys! I'm writing a function to retrieve a token from localStorage and if not there, fetch the token and store it, but I have a bug because the second if never evaluates
  this.token = localStorage.getItem('myToken');//null when not loaded
  console.log(this.token);//401 invalid acces token
  if(this.token == null){
    let possibleToken:string = window.location.href;
    let position:number = possibleToken.indexOf('access_token=')+13;//13 is the length of 'acces_token='
    let lastPos:number = possibleToken.indexOf('&token_type');
      if(lastPos !== -1){//if we have token
        this.token = possibleToken.slice(position,lastPos);
        console.log(this.token);
        localStorage.setItem('myToken', this.token);
      }
  }
(last brace is from the function ngOnInit, it launches every time you refresh page)
Iam@Leet_Programmer
@leet-hacks
Capture.PNG
can anyone please help me solve this am having issues with this code of mine it's not returning the correct color all am getting is wrong
Garrus Napp
@GarrusNapp
@leet-hacks hi ill take a look
Kevin K. Lee
@kevinkiklee
@leet-hacks i think it has to do with your usage of this. what does this refer to you in your code?
think about the context of this in an anonymous function.
Kevin K. Lee
@kevinkiklee
so when you call var clicked = this.style.backgroundColor, what is this here? what is this.style? try console logging this
also, when you are sharing your code, it's much better for everyone involved if you use a collab editor like codepen, so that someone can actually go into your code and start tweaking around. dev in whatever env you want, and copy-paste into codepen to share.
Ken Haduch
@khaduch
@otmeek - well, congratulations and best of luck on the job! I agree with @heroiczero - if they went through all of the process of interviewing and hiring, they will want you to succeed. You can always focus on understanding some of the bootstrap CSS techniques for the features that you find to be really helpful, so you have a better grasp on what they do in their CSS. Again - good luck!
Mafalda
@otmeek
@khaduch thanks!