• 0 Posts
  • 17 Comments
Joined 1 year ago
cake
Cake day: July 3rd, 2023

help-circle



  • I have a wacom-type pen for a tablet that uses one of those. It was a total pain in the ass the time I was traveling and accidentally discharged it by jamming the button in a tight-packaged bag. Turns out, they are pretty much only available online. No normal shop ever stocks them, not even electronics shops nor radio shacks. Barely anyone even heard of them. Tried disassembling a few 9V’s, but all of them were the stacked kind. And with international shipping going 2-6 weeks and me changing locations more often than that, it was an extremely difficult to get hold of them.










  • In js there’s reduce. Something like

    arr.reduce((result, currentValue, currentIndex, original) => {
    if(currentIndex < original.length - 2
        && original[currentIndendex + 2] % 2 === 0 ) {
        result.push(currentValue / 2) 
    } else { 
        result.push(currentValue);
    }
    return result;
    }, []) 
    

    This would map arr and return halved values for elements for which the element two steps ahead is even. This should be available in languages where map is present. And sorry for possible typos, writing this on mobile.



  • While I think everyone can eventually learn, I know a few smart people for whom it just doesn’t click. Like, people who are great at math but get confused by simple concepts like variables and pointers. I know for me there are some topics that I just don’t get myself and unable to make a first move. Like woodworking, how would I even approach something like building a chair? I have no idea even though I’ve read and watched a few guides, just got a myriad of dumb questions instead.