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

remove unused dependencies? Importance?

Just wondering if unused dependencies (in package.json) effect anything other than install time (and potentially deployment-time)? i'm taking a course, they provided some starter code - there was an unused dependency - I asked if i should remove it, they said "if you want" - so i'm trying to find out!...

Database setup for a simple login and registration page in terms of having a "remember me" function

I'm not sure how to setup my database to have a "Remember me" function in order to handle bypassing login. I know you use a cookie with a encoded string and other stuff but the database setup itself is a bit odd. I'm using a Postgres database and so far here are the fields I thought of... ``` user_id AUTOINCREMENT INTEGER email TEXT NOT NULL...

If Sveltekit, Next, Nuxt, are "Fullstack" frameworks, why would you need a backend language?

Am I to assume that sure, the Fullstack Frameworks can do fullstack, but they're limited to a certain point? they can handle API calls, server side rendering, off the top of my head, what's missing that a backend language solves?

Cookies aren't being assigned to the client

```js const session = require('express-session'); const MongoDBSession = require('connect-mongodb-session')(session); app.post('/api/login',express.json(),async (req, res) => { const { username, password } = req.body;...

My slash commands doesnt show up

i have created a slash command but it does not show up in any way, i dont get any error it just doesnt work at all
No description

firebase problem

this thing has appeared and I don't know how to fix it
No description

Socket.io Errors

I have one confusion. In my MERN chat app I had an issue of socket.io. It was suddenly losing connection and giving me bunch of errors of can't get url and also cors error so is there any common cases of why that might happen? I can provide repositories too if needed

host website

Hi, I have a website in Laravel and I would like to host it publicly to do some testing. Does anyone know a good platform?
No description

When to use htmlspecialchars vs filter_input ?

im confused when using htmlspecialchars vs filter_input for preventing bad input into php. I have got the hang of using prepared queries but I've not noticed when using the other two mentioned functions. Is htmlspecialchars mainly for outputting html to prevent XSS and is filter_input for handling the user input to prevent it from going through to cause harm?

Installing a library with JS

Hello, I'm trying to build a demo bar code scanner. I found this library: https://serratus.github.io/quaggaJS/#node-example I've installed Node + Quagga (library)...

For some reason the post value isn't being shown even tho in var_dump it shows that it's there.

You can see that the $_POST["ajaxMonth"] has a string value of "2" in the first image however when I echo it, it has nothing as show in the second image. Here is my php ```php $ajaxMonth = $_POST["ajaxMonth"];...
No description

PGJDBC Issue

Hello, I'm trying to setup PostgreSQL JDBC Driver with my Java project. I'm not using Maven, don't want to. I haven't been able to figure it out... Please, I need help. This happens when I run the program (after setting CLASSPATH to the path of my driver, which is in the same folder as MyClass):...

using namespaces and file paths in php properly

having mutiple issues with file paths and using namespaces and not sure why it seems they wont load.
Fatal error: Uncaught Error: Class "MD\model\TodoModel" not found in /var/www/html/app/controller/TodoController.php:7 Stack trace: #0 /var/www/html/app/view/todos/index.php(4): include() #1 {main} thrown in /var/www/html/app/controller/TodoController.php on line 7
Fatal error: Uncaught Error: Class "MD\model\TodoModel" not found in /var/www/html/app/controller/TodoController.php:7 Stack trace: #0 /var/www/html/app/view/todos/index.php(4): include() #1 {main} thrown in /var/www/html/app/controller/TodoController.php on line 7
here is code ...

PageSpeed Insights and GTMetrix Score Reading Is Difficult

I'm a relatively new developer. Last year I built a CMS in plain PHP, HTML, CSS, and JS, since that was what my boss of the startup company wanted during that time. Optimizing for page speed and PSI was easy because I know where to look since I built the cms and the website. Last November, I found a new job, fairly known to create websites for real estate agents and/or companies. They use wordpress, and a bunch of different plugins related to Real Estate which I'm very not familiar with. I receive daily tasks from updating the contact forms and plugins, to updating layouts and modules of different sites. However, one of my biggest pain points is optimizing for PSI and GTM. In a day if i get one of those kind of task, I feel like giving up. I know it's mainly because I don't fully understand what the score says or what the errors are saying whenever I run a website on those tools. It feels to me like when I change something on a wordpress site that I'm working on, it's never consistent if what I changed was good or bad. For example, I changed one image, and run both tools. at first they might give me a good score, then wait for a bit to run it again, boom, bad score. I tried looking up for YT videos to see If there's someone or something I can learn from optimizing a wordpress site, but all i get is "install this plugin, install that plugin" ...

Roadmap

Hello everyone, I'm learning online, would like to be a backend web developer, struggling with the roadmap since I'm self taught. I'm using Python as the programming language.Please help....

Using MediaStreams

Hi, I am wanting more information on creating Blobs in particular MediaStreams to convert my videos to Blobs. If there are any good online courses I will be interested I have posted my issue at https://stackoverflow.com/questions/77959428/blob-media-streams. Shout out to Kevin, since doing his Conquering Responsive Layouts I have gone back through one of my recent projects re-writing some of my media queries and getting rid of a bunch of code Cheers Kevin...

General input on relational db schema

Assignment job listing website database, does this look good enough?
No description

selecting where json field in a json type column in MySQL

Trying to select rows where a field in a json value is equal to whatever, and somewhat struggling. query so far, and example of the data stored in the json field Trying to query a json field and struggling to quite get the results in MySQL. This is the query I have so far, and whilst there is a row in the database that has this specific ID, i can't get it right, and the docs aren't quite sinking in ```sql...

Migration of J2EE to spring boot application

Hello, I'm at my first SWE job and I'm tasked with evaluating migrating away from enterprise services to Spring Boot. I have experience with Spring Boot but I have no idea on how to approach it, it is a huge project with many moving components. Please suggest on how I should approach this....

Laravel 10 Migration

I'm having a world of trouble with migration. As I understand it you need to have an existing database to perform a migration. I'm on Windows 10 and am trying to create and export a database for Laravel to do a migration on. Can this be done with XAMPP and phpmyadmin? Apparently exporting is not possible with no tables BUT Laravel wants to create the tables itself during the migration process. This CAN'T be this convoluted - can it???? How does one do this?...