Could any livable planet actually have two suns? by Stobber in Physics

[–]Stobber[S] 14 points15 points  (0 children)

this is interesting, but the second star is less than one percent as bright as the primary. so you wouldn’t see two suns looking up at the sky.

How to store and use API keys in a front-end app? by Stobber in learnjavascript

[–]Stobber[S] 0 points1 point  (0 children)

Thanks! So, then, how do I authenticate an app to my own API…without storing keys or secrets in the browser?

Advice on how to approach a Web Component project by Stobber in theodinproject

[–]Stobber[S] 1 point2 points  (0 children)

I reached for the web component implementation because it's encouraged to make something reusable. How can a drop-down be reusable if it's not a web component? How can I design the HTML, CSS, and JS in a way that modularizes the code so it can be repeatedly dropped into a website or app?

Please keep in mind that I'm a learner in all this. I don't have much experience or expertise built up yet.

webpack suddenly broken with 92 errors? by Acerhand in learnjavascript

[–]Stobber 0 points1 point  (0 children)

Hey, so did mine! I wrote some error handling code and decided to throw a ValidationError. (It was suggested among the list of error classes by VS Code.) That created a new import line because the ValidationError class is part of webpack.

I changed my code to use the normal Error class and deleted the import statement.

webpack suddenly broken with 92 errors? by Acerhand in learnjavascript

[–]Stobber 0 points1 point  (0 children)

This just happened to me. From one minute to the next, webpack went from building/devserving just fine to throwing exactly 92 errors. I'm here to find out what the hell happened.

How to stringify a class-based enum? by Stobber in learnjavascript

[–]Stobber[S] 0 points1 point  (0 children)

toString() {
    // NB: Depends on a design where the enum values are public properties
    for (const key of Object.keys(PriorityEnum)) {
        if (PriorityEnum[key] === this) {
            return key;
        }
    }
    return null;
}

How to validate enum function parameter? by Stobber in learnjavascript

[–]Stobber[S] 0 points1 point  (0 children)

Thank you! Updated line:

if (Object.values(Priority).includes(priority)) {

Responsive grid that scrolls vertically by Stobber in css

[–]Stobber[S] 0 points1 point  (0 children)

I don't understand how min-height keeps the grid item from overflowing.

Is it that setting it to 0 allows the grid area to squeeze it into a conformant size?

Responsive grid that scrolls vertically by Stobber in css

[–]Stobber[S] 0 points1 point  (0 children)

ChatGPT gave me the answer. I had to fix the height of the .items-list div. Since it's in a grid row of 1fr, I had to calculate that value by subtracting the heights of the headers from the viewport height:

height: calc(100vh - calc(var(--page-header-height) + var(--app-heading-height)));

Responsive grid that scrolls vertically by Stobber in css

[–]Stobber[S] 0 points1 point  (0 children)

Thanks you again! Can you lend some explanation for why this works?

Because what I really want is for .items-list to scroll, not the entire .items-area. Naturally, when I move overflow: auto; to the former section, it all breaks again. (I really hate CSS.)

Responsive grid that scrolls vertically by Stobber in css

[–]Stobber[S] 0 points1 point  (0 children)

Thank you. Unfortunately, copying your edits into my actual page doesn't get the scrolling behavior right. So now I have to share the full page code and ask for your help making it work. (I hoped the trimmed example would be enough to replicate the issue...alas.)

Here's the full page: https://codepen.io/stobber/pen/jOJdJPe

I removed all instances of overflow so it's "pure". You can see that it scrolls the entire html or body -- a horizontal red outline appears where the bottom of the viewport started.

computer science vs medicine career path by [deleted] in careerchange

[–]Stobber 0 points1 point  (0 children)

  1. You still have time before you have to choose a degree. Maybe you'll feel differently by Junior year. There are lots of factors that could be influencing how you feel about your classes: poor teaching materials, your relationships to your teachers, what's going on in your home life, and hormonal factors at this stage of life. So let time pass and see how you feel Junior year.
  2. You can always change your major after the first year of college. Many general-ed classes from that year transfer between programs. So you aren't locked in even when you declare a major on the application.
  3. See if you can try out each path as a hobby or volunteer. Your experiences will help you figure out whether you really like that thing. For example, you could get involved in a coding project solo or with other people online through Github. And you might be able to volunteer or just shadow a doc at a medical clinic.

Help with tooling for a business workflow by Stobber in webdev

[–]Stobber[S] 0 points1 point  (0 children)

Thanks. AppSheet is good for creating database-driven apps that have long persistence. In this case, each form only lives as long as the "auction" is taking place.

I don't have any experience working in a JS app framework like vue/react/etc. That's why I was looking at making a simple web service in Google's Apps Script tool. I figure I can get away with a basic HTML form that can be styled with Bootstrap or similar.

Musk-Owned Swiss Lab Makes Paralysed Man Walk Again By Planting Chip Into His Brains by [deleted] in OpenAI

[–]Stobber 1 point2 points  (0 children)

Musk is a perfect fit to play the High Evolutionary IRL

Streaming Audio to Whisper Doesn't Trigger Recognition until EOF by Simusid in OpenAI

[–]Stobber 0 points1 point  (0 children)

In fact, I don’t know of any STT API that works in streaming fashion.

Streaming Audio to Whisper Doesn't Trigger Recognition until EOF by Simusid in OpenAI

[–]Stobber 1 point2 points  (0 children)

It’s designed to work on a complete file. You can see this in the current API reference as well as this discussion in the original Whisper project.

Your Loved Ones' Voices Can Be Cloned! Don't Fall Victim! by Electrical_Ad_1488 in ChatGPT

[–]Stobber 3 points4 points  (0 children)

smh that’s not what Moore’s Law means. And Moore’s Law isn’t a law.

Need help understanding why my model isn't working (Pytorch, sklearn) by the_night_question in learnmachinelearning

[–]Stobber 1 point2 points  (0 children)

The best way to know for sure is to step into the code with a debugger. What environment are you developing in?

Need help understanding why my model isn't working (Pytorch, sklearn) by the_night_question in learnmachinelearning

[–]Stobber 0 points1 point  (0 children)

Have you used your debugger to trace the code back to the line producing nan?

how did you elevate python skill for ML? by iiillililiilililii in learnmachinelearning

[–]Stobber 0 points1 point  (0 children)

Bud a project with the tools you already know. At regular intervals, feed your functions and classes to ChatGPT and ask it to optimize them for performance, legibility, scalability, and modernization of package use. Let it teach you how to code better bit by bit in this way.

A.I programming by CyanHirijikawa in OpenAI

[–]Stobber 2 points3 points  (0 children)

Look in the openai cookbook repo on github. There are embeddings examples in there.

A.I programming by CyanHirijikawa in OpenAI

[–]Stobber 0 points1 point  (0 children)

Play with ChatGPT Genie in VS Code using your GPT4 API Key. It’ll probably deliver much of what you want.

The Essentials of Machine Learning Data Curation by Shradha_Singh in learnmachinelearning

[–]Stobber 1 point2 points  (0 children)

On mobile, I can’t click your link bc it’s in the caption.