13eck
13eck
Explore posts from servers
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
CC#
Created by 13eck on 9/8/2023 in #help
❔ 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
CC#
Created by 13eck on 7/22/2023 in #help
❔ 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:
_cache = (ConcurrentDictionary<string, UserCacheItem>)_cache.Select(item => item.Value.Expiry > DateTimeOffset.Now);
_cache = (ConcurrentDictionary<string, UserCacheItem>)_cache.Select(item => item.Value.Expiry > DateTimeOffset.Now);
Is there a better way to do this?
15 replies
KPCKevin Powell - Community
Created by 13eck on 1/14/2023 in #resources
Low-Visibility Font
1 replies
KPCKevin Powell - Community
Created by 13eck on 11/23/2022 in #resources
An 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
const double = (num) => num * 2;
const double = (num) => num * 2;
```php <?php echo "The Best PHP Example"; ?> ``` becomes
<?php echo "The Best PHP Example"; ?>
<?php echo "The Best PHP Example"; ?>
```go greet := "Hello" fmt.Println("%s world!", greet) ``` becomes
greet := "Hello"
fmt.Println("%s world!", greet)
greet := "Hello"
fmt.Println("%s world!", greet)
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
<h1>This is my awesome heading!</h1>
<h1>This is my awesome heading!</h1>
```css *, *::before, *::after { box-sizing: border-box; } ``` becomes
*, *::before, *::after {
box-sizing: border-box;
}
*, *::before, *::after {
box-sizing: border-box;
}
```js const double = (num) => num * 2; ``` becomes
const double = (num) => num * 2;
const double = (num) => num * 2;
4 replies