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

Can strips pre-built checkout only be used surrounded by a form attribute?

I’m having trouble integrating stripe using firebase. My code seems correct but every time I click “checkout” nothing occurs even though I set it to redirect to stripe checkout. Is there a way to use it without having the form attribute around the button?...

Is it a good practice to put functions inside of class objects?

I am currently making a class called MainRESTHandler and it's going to have many functions, so I wanted to categorise the many functions in various objects. For example ```ts export class MainRESTHandler { constructor() {...

How to stop container and delete images in github actions script before docker builds?

I have this script in my github actions ```js - name: Build docker image run: |-...

Symphony Mailer with twig

This is the class I use to send mails, it works except for the template. When I open mailtrap I get the mails but only the TEXT parts not the html templates. Any ideas on why that happens?

How do I display a single entry from an array from MYSQL

This works ... ``` $result = mysqli_query($conn, "SELECT * from $table"); $pix = array(); while ($row = $result->fetch_assoc()) {...

SyntaxError Octal escape sequences are not allowed in strict mode.

I have a path to a file system, but when I use ts-node, it throws an error. How should I rewrite this so that I can get the file to work? Relevant Potion of code: ```ts const DATAPATH = "C:\path\to\repo\advent-of-code\2022\01\data.txt";...

Stripe checkout using Netlify - Receiving Error of bad request, missing form.

This is my first time using Netlify with an E-commerce site using Stripe. For some reason every time I click my checkout-button I received a message of "Bad Request, Missing Form". If anyone has experience using Netlify please help. I have provided my server code and checkout code as well.

SQL foreign key constraint fails

I try to insert a new row into a table with the foreign key. But he doesn't want to, I think because he doesn't find the primary key. Though the primary key exists since I just added it.

How to send a file as request body in post request in Express ?

I am sending a file as post request from postman and when i console.log(req.file) , I get undefined . Can anybody tell me the solution ?

cannot replace first symbol of string says im out of index range

```cs static string Word(string prevLine, string prevWord, string word) { Console.WriteLine(""{0}","{1}","{2}","{3}"", word, word[0],prevWord,prevLine); Console.WriteLine(!string.IsNullOrEmpty(word));...

issue installing netlify-cli with resulting EACCES permission denied error

For some reason when installing the netlify-cli I ran into an EACCES denied error. I’ve tried the sudo code as well with no luck. It also tells me to replace my directory from ‘/usr/local/lib/node_modules/netlify-cli’ —-> ‘/usr/local/lib/node_modules/.netlify-cli-IjWiS7ZL'. ...

phpMyAdmin - Error

hi everyone! I'm getting this issue on hosting could u help please... I repaired, and control database Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser. session_start(): open(SESSION_FILE, O_RDWR) failed: No such file or directory (2) ...

php function doesn't work on hosting but working localhost

hello, I run my php code on xampp localhost is works. But running on host I getting this issue ' This page is not working www.bigrafi.com.tr is currently unable to process this request. HTTP ERROR 500 '...

Fingerprint

Has anyone worked on a web based fingerprint authentication and what languages (excluding the C brothers) were used and how does the implementation go about

Form Email Database Setup

Hey, Looking for someone capable of assisting me by writing code to send an email to clients when they submit a form and an email to me that includes all the information included within the form. Need it implemented immediately. Deadline is tomorrow. The landing page is currently hosted with firebase so utilizing fireStore is perfectly fine. Please LMK if your interested and capable of implementing by end-of-day tomorrow via direct message along with compensation. I don't need anything fancy. Th...

php function does not work on hosting

hi, I run my php code on xampp localhost is works. No problem sending information to database. But running on host my form I currently getting the issue 'www.bigrafi.com.tr is currently unable to process this request' HTTP ERROR 500 etc. By the way, I'm submitting my form from an html page, that wouldn't be a problem, would it? While the page is being refreshed, I think there may be an article like your message has been sent. is this good or it could be a better suggestion...

Login system

Hi guys, I'm trying to make a production-grade app and have never done a login system before. I feel like I have the general gist: make a form, get username and password, check against a database table, and if valid, send a 200 and a JWT for subsequent requests for the client to authenticate. Problem is, I don't know a secure way to do this. I don't want to take any chances as this will be a production grade app, so does anyone have any resources I can follow to make a foolproof, secure login sy...

error Microsoft Visual C++ 14.0 or greater is required

I was trying to install Jupyter using pip and it's giving me this error. I've already installed Visual Studio Build Tools 2022 to try fixing this but it didn't work.
building 'psutil._psutil_windows' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
building 'psutil._psutil_windows' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Any suggestions?...

Node.js & React -- Cannot use import statement outside a module

I converted my Node.js files into modules and put "type": "module" inside of my package.json. The converted syntax works fine for most files. However, when I try to import my React component into my backend server.js file, it's giving me the error Cannot use import statement outside a module. Specifically, it's pointing to an import statement inside of my component file (that's inside of the client folder).

Best way to send Express data to React props

I have a webapp that pulls data from a table in a database through Express. I want to pass that data in to my React components. Currently, my react components are defined in the client. I read that you can use client-side rendering (using an api like axios to fetch data from express) or server-side rendering (where you fetch the data for the components during the initial page request and send back an html file with pre-filled data). I think I want to go with SSR, since I read it's better for SEO...