by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 25 2019 17:12
    @mstellaluna banned @cmal
  • Jan 08 2019 22:05
    @mstellaluna banned @dertiuss323
  • 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:13
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:58
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:15
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:23
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
  • Jun 27 2018 04:48
    @bjorno43 banned @eddiecervello
  • Jun 26 2018 20:45
    @bjorno43 banned @DesmondJameso2_twitter
  • May 23 2018 21:45
    @bjorno43 banned @CherryPlaysRoblox1
  • May 22 2018 01:28
    @bjorno43 banned @grimroot23
rongeee
@rongeee
that one
that's just the project-test
not a part of the actual site :)
lapizzaebella
@lapizzaebella

Could someone check my Record Collection code please? (It doesn't work...)

  if (prop === "tracks"){
    if(!collection[id].hasOwnProperty("tracks")){
      collection[id][prop] = [];
    }
    collection[id][prop] = value;
  }
  else if (value !== ""){
    collection[id][prop].push(value);
  }
  else {
    delete collection[id][prop];
  }
  return collection;
}

edit: link to the challenge:

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/record-collection/

Brad
@bradtaniguchi
@homebrainbox Do you have a link to the challenge so we can check the prompt ourselves easily?
Brad
@bradtaniguchi
@homebrainbox Your getting errors right?
lapizzaebella
@lapizzaebella
@bradtaniguchi correct. I'm getting the following error: Cannot read property 'push' of undefined
Brad
@bradtaniguchi
Yes, that means your essentially doing this: undefined.push(), undefined doesn't have that method (or attribute, this error is VERY common)
So looking at your code, you have 1 push call: collection[id][prop].push(value);
so you can deduce collection[id][prop]; is undefined at that time
Walk up the logic and you fill find your not setting it to an array
lapizzaebella
@lapizzaebella
@bradtaniguchi Thanks. I'll have to sleep on it
Brad
@bradtaniguchi
@homebrainbox np, goodlucl and feel free to come back to this room or the FCC HelpJavascriptRoom for help :D
Nicolas Ramirez
@kamatheuska

Hello everyone! I am working on a small project that is still not fully conceptualized and would like to have some feedback. I am building an authorization module with Vue, Node.js and Mongoose. My idea is to simplify the whole auth process (server, views, etc) and have sort of like a module, like a lego piece, that I can just plug into any vue + vue-router + vuex project and just work.

I am working with two repositories, one for showing the components + server in action, and the other that would be the actual module:

Deploy on Heroku: https://vue-auth-components.herokuapp.com/

Vue Cli 3 code: https://github.com/kamatheuska/proto-vue-auth
Actual Project: https://github.com/kamatheuska/vue-auth-components-server

I feel that I am making progress although I have a long way to way, in all senses. Criticism is very welcomed, that is how you learn :punch:! Thanks for the help!

Laurent Harel
@Lornz-

@longnt80 Sorry for my late late answer! Thank you so much for your review.

why don't you convert all var to let and const?

I just forgot to do it 😅. Thanks to point this out!

Why prevetDefault at the end? Why not at the beginning?

I refer you to that discussion on StackOverflow 👉 https://stackoverflow.com/questions/4476973/does-location-of-e-preventdefault-matter

Nate Mallison
@NJM8
@kamatheuska Looks good! A few things I would change, does the import of the css reset not work in App.vue? I think it should that way you don't have to import it into every file. Also I would recommend making an api module that the store connects to, that way your URL's are in one spot and it will be easier to change the URLs for the next project. Finally I would look at Axios's interceptors to do some error handling like an auto logout on a 401 unauthenticated response.
Nicolas Ramirez
@kamatheuska
@NJM8 Thanks for the feedback! I am working on a module for the server, based on express and mongodb
Victor Popescu
@VicPopescu
abraham anak agung
@padunk
@VicPopescu i got potato soup totem. Nice work :smile:
Victor Popescu
@VicPopescu
@padunk thx :))
Michael Bomholt
@bomholtm
hey everyone… check out my landing page and let me know what you think :)
Christopher McCormack
@cmccormack
@bomholtm that looks amazing! I really like the semi-whacky yet professional design
@bomholtm so many little style choices you made show you put a lot of thought into it, the social icons and the pixel art are great as well
Michael Bomholt
@bomholtm
@cmccormack thank you so much for your response. semi-whacky yet professional design was exactly what i was going for :P
Michael Bomholt
@bomholtm
it’s super awesome when people notice the little things i attempt to implement in most my of projects
Christopher McCormack
@cmccormack
I didn't miss the about section either, very good :) @bomholtm
Not so thrilled with the rick roll though lol
Travis Fantina
@tfantina
Hello, I'm new here. I've just finished my portfolieo and I'm looking for some feeback.
t0cc
@t0cc
Hi, is it normal that quite old test results are reset suddenly?
Wrong channel probably
Michael Bomholt
@bomholtm
@cmccormack hahahahaha thank you so much. i was hoping for someone to get rick rolled :D
Inferfire
@Inferfire
Anyone know their Big O notation here???
Was wondering if anyone would be able to help explain it to me
Brad
@bradtaniguchi
@Inferfire More or less Big O notation is a fancy way to classify an algorithm's worse case.
Aditya
@ezioda004
^^ technically its the "upper bound" of an algorithm - meaning this the worst time an algorithm can take.
Other related terms are Omega which is the best time of an algorithm, Theta which is the average time of an algorithm.
angelacabri
@angelacabri
can any review my code i need to show it to my professor
  function handleRevealerAnim({...args}, cb){
      return setTimeout(function() {
          args.target.classList.add(args.anim)
          cb && cb();
      }, args.ms);
  }


  function createLi(pages){
      const paginationContainer = document.querySelector('.pagination');
      for(var i=0; i < pages.length; i++){
        const targetText = pages[i].childNodes[3].childNodes[1].innerText;
        const LI = document.createElement('LI');
        const NUM = document.createElement('SPAN');
        const TEXTCONTAINER = document.createElement('SPAN');
        const textNode = document.createTextNode(targetText);
        const textNodeIndex = document.createTextNode(i);

        LI.appendChild(NUM);
        i === 0 ? LI.classList.add('pagination-li', 'active-pagination') : LI.classList.add('pagination-li');
        i === 0 ? TEXTCONTAINER.classList.add('pagination-title', 'active-text') : TEXTCONTAINER.classList.add('pagination-title', 'none')
        LI.appendChild(TEXTCONTAINER);
        TEXTCONTAINER.appendChild(textNode)
        NUM.appendChild(textNodeIndex)
        paginationContainer.appendChild(LI);
      }

  }


  (function() {
      const section = document.querySelector('.section')
      const tab = document.querySelector('body')
      const li = document.getElementsByClassName('pagination-li');      
      let pages = document.getElementsByClassName('work'),
      currentPage = 0,
      prev;       
      createLi(pages)
      handleRevealerAnim({
            target: section.childNodes[3].children[0], 
            ms: 300, 
            anim: 'scale-out-hor-right'
      });
      handleRevealerAnim({
            target: section.childNodes[5].children[0], 
            ms: 400, 
            anim: 'scale-out-ver-top'
      });
      handleRevealerAnim({
            target: section.childNodes[1], 
            ms: 400, 
            anim: 'slide-out-left'
      });
      handleRevealerAnim({
            target: section, 
            ms: 2000, 
            anim: 'slide-out-left'
      }, () => pages[currentPage].style.display = 'block');

      window.addEventListener('wheel', function(e) {
        console.log(e.deltaY)
        handleSections(e.deltaY)
      });

      const links = document.querySelectorAll('a');
      for(let a = 0; a < links.length; a++){
        links[a].addEventListener('click', function(e) {
          console.log(10)
        });
      }

    function handleSections(delta){
      var direction = (delta < 0) ? 'up' : 'down';
      if(direction == 'down' && currentPage <= pages.length - 2){
          prev = currentPage;
          currentPage = currentPage + 1;
          scrollIntoSection({
            prev,
            currentPage,
            pages
          })

      } else if(direction == 'up' && currentPage > 0) {
          prev = currentPage;
          currentPage--;
          scrollIntoSection({
            prev,
            currentPage,
            pages
          })
      }
    }

    function scrollIntoSection({...opts}){
      opts.pages[opts.prev].childNodes[1].classList.add('scale-out-hor-right');

      setTimeout(function(){
            opts.pages[opts.prev].childNodes[1].classList.remove('scale-out-hor-right');
            li[opts.prev].classList.remove('active-pagination'); 
            li[opts.prev].childNodes[1].classList.remove('active-text')


            opts.pages[opts.prev].style.display = 'none';
            opts.pages[opts.currentPage].style.display = 'block';
            li[opts.currentPage].classList.add('active-pagination');
            li[opts.currentPage].childNodes[1].classList.add('active-text'); 

      }, 500)
      opts.pages[opts.currentPage].scrollIntoView({behavior: "smooth", block: "start", inline: "nearest"});
    }  

  })();
Christopher McCormack
@cmccormack
@angelacabri Please use services like Codepen or CodeSandbox when posting large amounts of code. This could be considered spamming according to our Code of Conduct.
Nejc Korasa
@NejcKorasa_twitter
Hi everyone, I've created a Java library to compare Collections and Objects of same or different classes. Take a look: https://github.com/nejckorasa/compare-utils
The main purpose was to made it easy to compare Collections of different classes by comparing some of their fields. Any help and/or tips would be greatly appreciated! :)
Victor Popescu
@VicPopescu
Product Landing Page some feedback would be nice :D
abraham anak agung
@padunk
@VicPopescu nice one, i wish i could get one :smile: . One feedback is image of the reviewer could have some shadow, considering most of other elements have it.
Victor Popescu
@VicPopescu
@padunk thank you for your feedback! good idea, with the shadow
Subrata Sarker
@picklu
Here is my updated personal portfolio https://codepen.io/picklu/full/bpraBV. Please review the page and let me have your comments. Thank you.
Victor Popescu
@VicPopescu
I would appreciate some feedback on this project, thank you
https://codepen.io/VicPopescu/full/GPrvRY
Subrata Sarker
@picklu
Nice work, @VicPopescu. I like the mobile version.
Victor Popescu
@VicPopescu
@picklu thank you!
abraham anak agung
@padunk
@VicPopescu awesome as always. One think i want to ask what is this? let lastCopied: HTMLElement = null; I never see variable like this one.
Victor Popescu
@VicPopescu
@padunk thank you! that is a typescript declaration and initialization, its the equivalent of var lastCopied = null but with the type of the variable declared as HTMLElement