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

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?...

Throwing Exceptions

Is this a totally valid / proper way of handling exceptions? For whatever reason I feel like this is improper ```java private String appendParametersToUrl(String url, String parameter, String string) throws IllegalArgumentException { if (StringUtils.isBlank(parameter) || StringUtils.isBlank(string)) {...

Architecture Question (not code specific)

I have this locations feature I'm working on implementing and I think I'm getting close to figuring it out but wondering on some architecture decisions. The way everything is set up now looks like this: ```...

error when use router handler in next js

โจฏ TypeError: l.json is not a function at g (/var/task/.next/server/app/api/route.js:1:2707) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:42484 at async eI.execute (/var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:32486)...
No description

The post method is not supported for this route. Supported methods: GET, HEAD. for login page

I have the following login.blade.php ```php <form method="POST" action="{{ route('login') }}"> @csrf
<input type="email" name="email" placeholder="Email" required>...

How to secure (https) without domain name is it possible?

If anyone have idea about secure ip address Of a server hosted in aws ec2 nginx without a domain name please share ......

Sanitize user input to avoid XSS attacks Question

I have username and password for login and want to avoid the cross site scripting. I read that using htmlspecialchars() is the way to go but not sure what to do after that. Any ideas?

Cookie Confusion

I'm using iron-session to store the information necessary for ConnectKit's Sign-In With Ethereum (SIWE) to work on a GitHub pages hosted site backed by Supabase edge functions. (ConnectKit expects to have access to a /session endpoint that returns the authenticated user's Ethereum address.) iron-session stores session information as an encrypted string sent back and forth as a cookie. The problem I'm having is if SameSite is set to Lax or Strict, I get an error:
This attempt to set a cookie via a set-cookie header was blocked because it had a SameSite="Lax" attribute but came from a cross-site response which was not a response to a top-level navigation....

store and display files

hello guys i was searching for a code that stores files in database and display them in the page I'm using nodejs rn but i did not find good resources if anyone can help me and thanks

runtime of loops

Why that variation occurs between for, for...of and forEach? I'm posting here because I was running it in a "nodejs env"...
No description

Trying to update a single movie property with PATCH

Hello, I'm building a REST API and I'm implementing a patchOneMovieById method, that takes an id and a an object of properties to update, I've split my code in the following files: movie.router.ts, movie.controller.ts, movie.service.ts and movie.repository.ts Here's the code for the service and repository: ```typescript...

PHP todo app database setup question

I have a some far a table in mind for username and passwords but not sure how to link their "tasks" to my database in order to save them for when they logout and later re login. Any tips?

upload files

i am having a big project where a teacher needs to upload files on a website and when he does,the files display in the page, it's like in classroom i am using nodejs but I did not know how to do that

JSON.parse unexpected error

I am making a MERN stack app where I have made a DB using Mongo Atlas and using node.js and express to fetch the data in my react app. I am calling the data using an useEffect() and awaiting the data as well. When I am trying to convert the data into json, it is giving me the error of Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data I am stuck here and cant solve this. I tried many different posts on net but none worked for me. The backend server is running on localhost:4000 and react app is on localhost:5173. I tried CORS and even adding a proxy in package.json but that also didnt work. ...

How do you fetch instagram?

I see some websites that can fetch an instagram profile and get all their posts, reels and videos by simply typing the username and I don't understand how they do it because it's so fast. I've tried scraping instagram's profile by doing this: ```js const fs = require("fs")...

What does the backend server listens to??

when u make backend, does your server listen to your pages URL?? that is when u say host your webpage, it is hosted on a url. does the the back listen to THAT url? or the localhost of the machine that hosts the site? The little so knowledge i have about backend thus far, FR and BE communicate with eachother via API. But the question i asked above, this occurred to me when I was thinking about how when u click a link, it redirects user to a certain route.. Now there 2 possible ways that can be done as far as I can think of
We just simply use anchor tags or js with location.href to simply add that route to the Link and redirect. As user lands on that page, static elements r rendered and dynamics infos r fetched using API from the backend and later rendered. In this case i suppose the server can just listen to the machines localhost??...