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

Trying to understand if I always need to identify commonjs or module?

I have the following package.json file and do not see a type key, but they are using es module import statement. They also import json files without using createRequire(). How is this possible? Add to that that they are using require statements as well...how? var os = require('os'); in index.js below ``` { "name": "incoming-mobile-event-service",...

POST with App Script for Google Sheets

๐Ÿ‘‹ Hello there, I am working on my own personal site. I have recently updated the contact form when the CONTACT button is clicked. A modal overlay opens up and displays the form, with a scrollbar. ...
No description

Having problem with cors - Flask

Hi guys! I am trying to setup restrictions to only allow requests from a certain origin. This is how I have it currently setup but it still allows every request (testing with postman). ``` app = Flask(name) cors = CORS(app, origins=["https://vetai.vercel.app/"])...
No description

useOptimistic - example needed - codesandbox / stackblitz / github

I need to change data immediately without waiting for response from server - https://www.youtube.com/watch?v=wg3xQogkZDA&ab_channel=SonnySangha If you did this with useOptimistic or react-query - please send me like to example Also I tried to do it and got this error...

DataBase

Are there any good tutorials on how to create a database and design a database schema ?

Running SQL query in batch file Error.

HI All, SQLCMD -DESKTOP-SDMAAAAA\AAAAAAA DESKTOP-SDAAAA\Suresh Pasham -DelayVerification -E -Q "select * from [adv].[Route] where convert(date,CreatedDate)=convert(date,getdate())" -s "," -o "C:\Users\Suresh Pasham\source\DailySales.csv" This is my query in my batch, when I run the batch file I am getting error : Invalid object name 'adv.Route'. ...

VISUAL BASIC 6.0

Good morning coders, can anyone help me with how to use visual basic 6.0 to solve some simple problems using visual basic 6.0. I would appreciate if you do that with images. Gracias.

Need help turning page into responsive

I created this page, and I am not sure how to make it responsive. I want my cards to go from horizontal to vertical. I am not sure where to post this considering I am using HTML, CSS, JS. Sorry for posting 5 files and a long explanation. But I need some help.
No description

Issue with supabase middleware.ts (auth with cookies)

I created github issue here - https://github.com/supabase/supabase/issues/18089 I bring attention to this issue because supabase docs was not tested for deploying on vercel - please vote up If you ever wrote auth with cookies with supbase - let me know how you set up your middleware.ts...

Not able to do import export functions in node.js project

I'm making a memory game, I want to export a function. logic.js ```js function incrementAttempts(){...

Page couldn't be rendered statically because it used `cookies` (supabase)

I got this error during build process
DynamicServerError: Dynamic server usage: Page couldn't be rendered statically because it used `cookies`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error
DynamicServerError: Dynamic server usage: Page couldn't be rendered statically because it used `cookies`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error
...

If `console.dir(x, {showHidden: true, });` prints `TestController {}`, does that mean x empty?

I wrote some code that keeps erroring saying click() does not exist on my testController object. To troubleshoot, I wrote this code: ```ts const testController = new TestController(); console.dir(testController, {showHidden: true, }); // TestController {}...

I want to add rate limit to nextjs app router APIs

am making website and i want to add rate limit for my api endpoints but can't seem to find good way or package that works with latest nextjs app router

Get JSON API and Post

I have a JSON API file attached in html file. Can i update data in the json file using a website and update it in the same JSON file? I want to match the username with the same username in API file and make username update his field accordingly? if is there a Github project related to this manner i would like to know about it. ...

phpdoc an array structure with autocomplete in vscode

is there any good way to phpdoc an array structure and have vscode autocomplete the keys? i know i can do it with an object and shoe-horn some stdClass shenanigans, but that doesnt help me. the format used by psalm and wordpress don't work as well, as vscode doesn't autocomplete the keys....

How do I build an API that lets me do `await t.a().b()` & `await t.a(); await t.b()`?

I want to build an API that lets me chain in two ways: ```js await t .a()...

How to store an if statement in a variable in Python

Is there a way to store an if statement in a variable that I can then print to the screen? It's an if statement with one elif and else- it's keeping scores in a game and prints who won with print statements but I need to print it using pygame font library to the screen. So, I only need the outcome of the if statement to be printed, so I thought storing it in a variable could help, but I'm having a problem figuring out how to do it.

dynamic meta tags for ecommerce

Hello! im making a webshop with php and mysql(mariadb) for someone. the idea is that the client can add items to the webshop by himself. ofc i will have one product page where the data of one product can be loaded in. the only thing is that im not sure how to deal with dynamic meta tags. does anyone know a good and/or a common practice to deal with that? the only thing i can think of is that i either use the product information that is also shown on the product page, but then im missing tags for keywords and likely some other things or i have to make seperate inputs for meta tags when the client adds a new product, but that seems off to me since the client might not know anything about meta tags and seo. if someone has other and/or better ways, id love to know. thanks for reading :)...

Issues with transitioning from index html page to city html after user enters search critieria

I'm having issues with my route where the user enters their search and after pressing enter, the url changes but the redirect isnt happening. The content is displaying on the index.html page when it isn't suppose to. Here is a link to the github of the current standing of the project https://github.com/MD-2016/Weather-App/ There is also an issue with the http request with the log http: superfluous response.WriteHeader call from main.search (main.go:77) showing up. The issue is starting in main.go...

overflow of footer on print preview

I want to fix overflow of fixed footer. When width of content increases then footer. Will overflow over content. I tried ``` overflow:hidden...
No description