13eck
Explore posts from serversKPCKevin Powell - Community
•Created by 13eck on 10/4/2024 in #resources
DB Diagrams
Free tool for diagramming your relational databases
https://dbdiagram.io/
2 replies
My Discord app is using all my memory. What am I doing wrong?
I'm making what I thought was a simple dice rolling app for Discord. The user tells it how many dice to roll, any static modifiers to the total, and an optional description for the action being taken.
However, when I run the app I can only do a small handful of commands before my computer tells me that VS Code is using too much memory and I need to close it down. Sometimes the console even says something about heartbeat being too slow and a possible thread starvation.
I don't have that much code written so I'm not sure what's going on, but here's what I currently have:
73 replies
Hope to declare class member with variable type
I’m making a simple dice rolling Discord app and I’m having issues creating classes for some of the data types as they have variable type members.
Specifically, the Application command interaction data option has a
value
field that can be a string, integer, double, or boolean.
How do I accommodate this in a class? I’m honestly thinking of just reading from a JsonDocument
and not worrying about it, but that can’t be a good idea, long-term, right?16 replies
KPCKevin Powell - Community
•Created by 13eck on 7/18/2024 in #back-end
.Net 8 Database Interfaces
26 replies
KPCKevin Powell - Community
•Created by 13eck on 4/5/2024 in #resources
Concurrency vs. Parallelism
1 replies
KPCKevin Powell - Community
•Created by 13eck on 3/27/2024 in #resources
Basics of Promises
This video was suggested to me by YT and it's really good!
https://youtu.be/Xs1EMmBLpn4?si=h1wZFI-iZlu2NoXe
4 replies
KPCKevin Powell - Community
•Created by 13eck on 12/7/2023 in #back-end
SQL Table Definition
I'm trying to make a database for a TTRPG (Fate, if you're wondering and am trying to figure out how to handle one specific part of the database.
Fate characters have both stress (plot armour) and consequences (long-term harm). My issue is that stress is a numeric (a character has X number of stress boxes) and consequences are textual (it's a short phrase describing the injury).
I currently am thinking that I need 2 tables: one for stress and one for consequences (as their enherit datatypes are different) but is there a way to have one "vitals" table (the term used on the character sheet for both stress and consequences) so I don't need to do too many joins (I already have a table for skills, aspects, stunts, and basic character stuff like name, etc).
Thoughts?
26 replies
KPCKevin Powell - Community
•Created by 13eck on 12/1/2023 in #resources
Web Accessibility Initiative Design Patterns
The W3C's WAI has an amazing page on various design patterns and how to code them in accessible ways.
2 replies
❔ Can I serve a static file using a wildcard route?
What I want to do is map a URL to a static file. I have a
character.html
file that has the JS to fetch the character info from the DB but I want to have the user navigate to /character/{character_id}
but still server the static file.
Can I do that somehow with app.UseFileServer()
or do I need to have a lone route that returns an HTML file? If so, what does that look like?32 replies
KPCKevin Powell - Community
•Created by 13eck on 8/21/2023 in #resources
THE IDEAL VIEWPORT DOESN’T EXIST
1 replies
❔ Filter a ConcurrentDictionary
I have a
ConcurrentDictionary
that I'm using for a small in-memory cache and I'm wondering what the best way to filter items out of it. one of the fields on the value stored in the dictionary is a DateTimeOffset
expiration time and I'm still new to using it.
Currently, I'm using .Select()
to filter out the expired items and casting it back to the Dict, overwriting the existing variable with a new one:
Is there a better way to do this?15 replies
KPCKevin Powell - Community
•Created by 13eck on 11/23/2022 in #resources
An Interactive Guide to Flexbox
Check it out, y’all!
https://www.joshwcomeau.com/css/interactive-guide-to-flexbox/
1 replies
KPCKevin Powell - Community
•Created by 13eck on 9/21/2022 in #back-end
How To Ask Good Questions
Choose a good title
* Summarise your question into one sentence
* Include error messages
* Include tech you're using (unless it's already known by the channel you're asking in)
Start explaining the problem
* What caused the problem?
* What have you tried already to fix it?
Provide code
That way others can run it themselves and get the same problem you got. Don't provide all your code, only enough to cause the problem you have.
Mark as SOLVED When Done
When your issue has been solved, please edit the tags to add SOLVED so others know it's not still unanswered!
Format all code
If your code is really long or has multiple files, use https://pen.new/, https://stackblitz.com/ or https://codesandbox.io/
`Inline code formatting`
becomes
Inline code formatting
```js
const double = (num) => num * 2;
```
becomes
```php
<?php echo "The Best PHP Example"; ?>
```
becomes
```go
greet := "Hello"
fmt.Println("%s world!", greet)
```
becomes
2 replies
KPCKevin Powell - Community
•Created by 13eck on 9/21/2022 in #front-end
How To Ask Good Questions
Search or Choose title
• Summarize your question into one sentence
• Add a tag(s) for specific language / type.
Start explaining the problem
• What caused the problem?
• What have you tried already to fix it?
Include Errors
• Include error messages
• Include tech you're using (unless it's already known by the channel you're asking in)
Provide code
That way others can run it themselves and get the same problem you got. Don't provide all your code, only enough to cause the problem you have. And do not provide screenshots of your code. Provide the actual code text.
Mark as SOLVED When Done
When your issue has been solved, please edit the tags to add SOLVED so others know it's not still unanswered!
Format all code
If your code is really long or has multiple files, use https://pen.new/, https://stackblitz.com/ or https://codesandbox.io/
`Inline code formatting`
becomes
inline code formatting
```html
<h1>This is my awesome heading!</h1>
```
becomes
```css
*, *::before, *::after {
box-sizing: border-box;
}
```
becomes
```js
const double = (num) => num * 2;
```
becomes
4 replies