Kevin Powell - Community

KPC

Kevin Powell - Community

A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.

Join

front-end

resources

back-end

ui-ux

os-and-tools

redundant code?

I have a page (#options_07) that contains all of the rosters in my fantasy football league. I want the script to parse through the player links to identify the team name, player first/last name, position, and team bye so that i can reformat them. Can you help me understand why the bye week div is not being parsed correctly in this example? https://codepen.io/tvu1313/pen/rNEWpxz...

How to convert blobUrl to a video file or embed a video ?

Can anybody please help me with this ? I tried to google and used solutions but didnt work

Need help with design suggestions for my app

Hey guys, I'm developing an app for managing general assemblies using Spring and Angular. Users need to input assembly details (Type, Year, Date, Time, Address, City) and attach files (route sheet, invitation letter, attendance sheet, proxy, attendance form). Actions and their details are extracted from the uploaded Excel route sheet and displayed on a management page. Users can also attach deliverables to actions. Can you suggest a design for this?...

Does anyone use Drizzle here? Many-to-Many relationships and types

Hi, Am a bit confused with Drizzle tbh. I think this is how you set up and query a M:N relationship, but it seems very long-winded, so it kinda feels like a skill issue: Let's say I've got a Users and a Jobs table...

RewriteCond clarification - looking for how to implement RewriteRule Condition Pattern in bulk

Platform: Apache .htaccess file Reference Link: https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritecond Case: I have a series of pages that I want all of them routed to a single page, but only what matches the specified condition pattern should land there (e.g. passing the filter). Typically, I handle un-suffixed URIs to route to the corresponding hosted file for execution in this way:...

API fetching problem

I want to fetch an API (i dont own this) and when i fetch it with my browser, postman, CURL, some VSCode extensions for fetching API,... it works fine, perfectly. But when i use fetch() in my node project, i cant fetch the API, the API seems blocked me (it return Blocked by <the website> ) any idea ? please help ❤️...

newbie to backend ..need help with concepts

sending access and refresh token to client will help with auth but when the page is reloaded again , will the server again send the access token to the client again? this resets both the token s expiry time?

Consistent Hashing

What's the best way to implement consistent hashing in a database that doesn't have this feature by default, in my setup I have a bunch of nodes in a zookeeper path and when I retrieve all the nodes i hash a key and decide which node to place a user own, should my consistent hashing algorithm exist in my application code? And how I go about remapping the keys in the db

.Net 8 Database Interfaces

I'm working on my budget app and have come to the point where I need to use a database (SQLite specifically). I'm debating between using Microsoft.Data.Sqlite or just biting the bullet and using Entity Framework Core. The database tables are not very complex so the SQL statements won't be that verbose, but most places (from my research) use EFCore. But I don't like/understand EFCore (maybe some correlation/causation there :p). Thoughts?...
No description

Node.js memory leak error

I have this ts code that give me memory leak error every time: ``` type Conns = { name: string, platform: string,...
No description

What's the difference between a schema and model in mongoose?

I'm new to databases, and really to server side logic in general. I don't exactly understand the difference between schemas and models in mongoose, despite the fact i've read numerous explanations. Maybe someone here can explain it in a way that clicks with me. Thanks

Query MongoDB documents for a particular date range

Hi devs, I am trying to query documents based on particular date range. So I need all the documents where the createdDate is less than equal to current date and greater than equal to currentDate - 2. I am assuming that there is some issue in the date format between how mongo db stores and how I am trying to fire that in the query. Attached the screenshot. Can someone help...
No description

help with back end post request

Good morning, does anyone how to submit a post correct to the sever on a reactjs local host? I already doesn't express.js file to create a server and the message in the response tab Proxy error: Could not proxy request /api/submit from localhost: 3001 to http:// localhost:3003...

Java NIO

I've been learning about network programming and tho I understand thread per connection so easily I'm having trouble with java selector and register event loop way in NIO, particular reading when I key file descriptor that is ready to read do I just read till I get my protocol termination line e.g. /r/n/r/n in http, but I'm reading it might not always be available how do you read then pause and come back for a post request for example that has a large binary after the request how is this achieve...

Send API request with IP that user provided

i want to send a request to an API and i dont want the api backend recognise the sender ip , i want it to think im using the IP that i provided.

Making my first full stack website, and I want an authentification system

So I wanna make my first big fullstack project, and between the backend functionalities, I need an authentification system, the thing is that making it all by hand is extremely long and prone to being extremely not secure. I want my first project to have a good level of security. Is it okay to use a library like NextAuth or Firebase Auth for it? Will I still be learning or will it do everything for me? Cuz I want to learn from my fullstack project to some extent, and if these auth services do everything for you in one click isn't that counterproductive? People online do say that it's very recommended to use services because they were built by pros that know how to make them secure and flexible, and in the future I plan on using them again, but how will that look like in the eyes of companies that might hire me or if I want to freelance?...

Php and node.js

can i work in front-end with reactJs and in the back-end with php and can link between the two ?

Php Json how to get property?

I have a json file. I would like to get "Zangya" (which is in "animeName") ```php $datas = file_get_contents('getCharacters.json'); $datas = json_decode($datas);...

MAX height

```sql SELECT first_name, last_name, height...

Multi-provider authentication on Firestore

I'm working on an MV3 Chrome extension on a feature that requires authentication with a third party provider Considering that I'm not proficient in backend, I was wondering what's the right way to handle multi-provider authentication, i.e. letting the user to login with both Google and Facebook FYI, I chose Firebase for several reasons: 1. It has a great integration with extensions such that when I put a listener for a collection on Firestore in the background script, it prevents it from getting terminated 2. Firebase is quite beginner friendly...