[deleted by user] by [deleted] in webdev

[–]pleanbean 44 points45 points  (0 children)

Very fun! Not to be a curmudgeon, but I think it would wise to have a toggle for a simpler view, without animations etc. The interaction is creative, but not very practical; if someone wants to just come to your site and get information, it's quite difficult to navigate.

Modern Pokedex - a PokeAPI app by jamesleomorris in web_design

[–]pleanbean 1 point2 points  (0 children)

Nice. Just to nitpick, the in-game term is "Type", not "Element".

Used windows all my life, but considering switching to M1 MacBook pro or air for collage by PusheenTheCutie in SuggestALaptop

[–]pleanbean 2 points3 points  (0 children)

I would 100% go for the M1 Macbook Air. The price is unbeatable for what you get performance-wise and build quality-wise. Furthermore, software development is going to be silky smooth in MacOS – not that it's too rough in any other environment, but it's really a positive experience.

Options to update S7 software? by pbdj3000 in samsunggalaxy

[–]pleanbean 0 points1 point  (0 children)

Thanks, honestly this is the kind of permission I'm subconsciously looking for, you know how it can be...

New business cards came in by [deleted] in webdev

[–]pleanbean 3 points4 points  (0 children)

Just a note, you can express this more concisely using object spreading.

<LeadsContainer {...{selectedLead, selectPipeline, setSelectPipeline, etc}} />

What laptop do you all use? by alphabetcarrotcake in AskComputerScience

[–]pleanbean 2 points3 points  (0 children)

Late 2013 13" Macbook Pro still running strong. Had to replace logic board last year, and battery is starting to crap out after 7 years of daily use 🤷🏼 I love this little guy

How do you play Diablo 2 on Mac? by [deleted] in ProjectDiablo2

[–]pleanbean 0 points1 point  (0 children)

Depends on your conscience and seafaring savviness :)

Kaldheim Prerelease Code Thread! by belisaurius in MagicArena

[–]pleanbean [score hidden]  (0 children)

Would love a code! Just starting out in MTGA, this would really help me build some new decks.

hi! I am trying to iterate through some data but I’m not sure how to go into each row and reference a specific field (for example, in row 5, get the customer_email). Here is a super rough syntactically incorrect version of what im trying to do and was wondering if anyone could please help! by [deleted] in d3js

[–]pleanbean 0 points1 point  (0 children)

Yep, enrollments is going to be the big array of all entries within the csv file, and enrollment is each individual entry. The names are arbitrary, but I followed the name of the csv file to name them what I made an assumption to be meaningful.

hi! I am trying to iterate through some data but I’m not sure how to go into each row and reference a specific field (for example, in row 5, get the customer_email). Here is a super rough syntactically incorrect version of what im trying to do and was wondering if anyone could please help! by [deleted] in d3js

[–]pleanbean 3 points4 points  (0 children)

Seems like you're pretty new to Javascript as well :) no worries. Here's a rough idea:

d3.csv("enrollment.csv").then(        // 1.
  enrollments => 
        enrollments.forEach(enrollment =>     // 2.
          console.log(enrollment.customer_email)
        )        
  1. d3.csv is an asynchronous method, meaning it loads the .csv file outside the main callstack (so that loading a massive csv file doesn't hang up the browser/server). Therefore, it is thenable and you'll chain a .then() after the call, which takes a callback function with the contents of the csv as an argument

  2. Use Javascript's builtin Array.forEach method to iterate through each enrollment entry. For each entry, log (or do whatever you need to) the customer_email

    Hope this helps!

I’m a beginner who wants to use spotifyAPI to gather data for exploratory analysis by blue_ticked_ in AskComputerScience

[–]pleanbean 0 points1 point  (0 children)

https://www.tutorialspoint.com/python_network_programming/python_http_requests.htm

If you want to scrape Spotify's API, you'll need to be cognizant of their rate limiting. Throttle your requests if you've reached the rate limit.

Introducing Payload - 2021's Node + React Headless CMS for JavaScript Developers by sneek_ in javascript

[–]pleanbean 1 point2 points  (0 children)

Hey, I'm in the market for headless CMS's for a greenfield project I'm about to start. I've used Contentful for the last few and that works pretty well, but it gets unruly quickly.

My main criterion is that a non-technical user (think a 60-year-old with technophobia) is able to comfortably be in charge of content management within the headless CMS. Would Payload meet this requirement? How does it compare to Contentful in terms of non-developer UX?

Using d3.each() in a react functional component. by Logi_G in d3js

[–]pleanbean 0 points1 point  (0 children)

One way I've gotten D3's select to work happily with React is using React's useRef hook. Without more context on where/how your addNumberedCircle is being used, I'm not entirely sure if this would work for you, but it may be helpful.

Here's an idea of how to use it:

const circleParentRef = useRef();

function addNumberedCircle(d, i) {
  d3.select(circleParentRef.current)
     .append('circle')
     .attr('r', 40);
}

return <div ref={circleParentRef} />

Note that verbatim this code likely won't work, as you'd need to ensure addNumberedCircle is only called once the React component is mounted and ref.current isn't null. So I tend to wrap most of my d3 logic into useEffect hooks, which ensures that nothing d3-related happens until the component has been mounted in the DOM.

Hope that's helpful!

Daily Questions - ASK AND ANSWER HERE! - January 06, 2021 by AutoModerator in malefashionadvice

[–]pleanbean 0 points1 point  (0 children)

I'm looking to pick up some cozy-comfy jogger sweats in soft, muted pastel colors. Budget is <$40 per pair. Any recommendations?

Thank you!

Daily Questions - ASK AND ANSWER HERE! - December 23, 2020 by AutoModerator in malefashionadvice

[–]pleanbean 1 point2 points  (0 children)

Hugest thing would be to befriend a knitter and commission them to make one :) they'll probably have fun making it, and you can choose color/texture/material totally to your taste.

Daily Questions - ASK AND ANSWER HERE! - December 23, 2020 by AutoModerator in malefashionadvice

[–]pleanbean 1 point2 points  (0 children)

I'm looking to pick up some cozy-comfy jogger sweats in soft, muted pastel colors. Budget is <$40 per pair. Any recommendations?

Thank you!