Drawing a number of HTML canvases according to input value
I've got an ongoing project where I need to draw a number of HTML canvases (from 1 to 10) according to a number that is typed into the input field.Perhaps an easier way to go about this would be to...
View ArticleRails - how to redirect, flash an error / notice, and download a csv in the...
I'm building a feature that allows a user to process a mass update of records via a csv.I want the functionality to be, from the index page: upload csvreturn a flash notice of how many records were...
View Articlestreaming a remote image to the buffer using Koa
First time playing around with nodejs streams.. I feel like I'm missing something fundamental here about how streams work. When I make the request to the URL it logs out a 404. If I try to write to the...
View Articlerouting error, no route match for rails api request
I've got my controller namespaced with API, and can't seem to make a request due to the following error:ActionController::RoutingError (No route matches [GET] "/api/request_projects")Controller:module...
View ArticleReverse proxy CORS Configuration for NGINX
I have a nodejs server and react client app deployed to an ec2 instance. When I try to send a POST request to /api/emails route it returns a CORS / CORB error in the console.Cross-Origin Request...
View ArticleA regex to get any price string
I need to get the price from a string, but no other numbers. There are no restrictions on what the string can say, but it will always have a dollar amount in it. It's the dollar amount I need to get...
View ArticleDisplaying different images on an HTML canvas according to selected radio button
Using this project, you are supposed to be able to select a radio button for a specific color, click the big blue button, and a corresponding 150x150px color swatch will be drawn on an HTML canvas....
View ArticleRails 7 flash errors not displaying in application.html.erb
Having an issue in my Rails 7 app of alerts not showing up.notices, however, are.I am displaying alerts in application.html.erb using <%= alert %><%= render partial: "shared/navbar"...
View ArticleAnswer by Misha Krul for Rails ActionView::MissingTemplate, Template Is...
Figured it out.I tried regenerating the mailer via bundle exec rails generate mailer contact_us and noticed that it created a mailer at app/mailers/contact_us_mailer.rb .. My original mailer was...
View ArticleowlCarousel is not a function in rails app
I have a rails app where I'm attempting to use an owl carousel to display a list of testimonials with images. I think I have everything set up correctly, but I'm still receiving a console error that...
View ArticleRails 7 importmap with bulma and jquery
I'm having trouble getting Rails 7 importmaps to play nicely with jquery and bulma.config/importmap.rb:pin "application", preload: truepin "@hotwired/turbo-rails", to: "turbo.min.js", preload: truepin...
View ArticleTypescript not recognized in VSCode
I'm working on a new NextJS project w/ Typescript and Tailwind CSS. I'm working on Mac Ventura 13.3.1.I am importing dummy used data via the jsonplaceholder API.In my users/page.tsx component, I am...
View ArticleProperty 'user' does not exist on type WritableDraft
I have a redux userSlice that is attempting to get user data from the store.client/src/redux/features/userSlice.tsimport { createAsyncThunk, createSlice, PayloadAction } from "@reduxjs/toolkit";import...
View ArticleType mismatch of "root reducer"
In my Redux store, I am initializing a persistedReducer which takes the redux-persist config and "rootReducer":client/src/redux/store.ts:import { configureStore } from '@reduxjs/toolkit';import {...
View Articleundefined body in PUT request
I have a React / Redux / Node app that is making a request to update a user:client/src/components/pages/AlignmentPage.tsx:const AlignmentPage = () => { const dispatch = useAppDispatch(); const...
View ArticleAnswer by Misha Krul for undefined body in PUT request
I figured it out.I needed to pass express.json() as an argument when calling the user controller endpoint.api/src/routes/user.ts:router.put("/api/user/:userId", express.json(),...
View ArticleAnswer by Misha Krul for Getting an undefined body in express PUT request
I figured it out.I needed to pass express.json() as an argument when calling the user controller endpoint.api/src/routes/user.ts:router.put("/api/user/:userId", express.json(),...
View ArticleGetting an undefined body in express PUT request
I have a React / Node / Express app where I am trying to update a user.The Redux action that should be handling the request looks like this:export const updateUser = (userId: string, data: any) =>...
View Articleundefined currentUser in redux thunk
Here is the cloned repo I'm working in: https://github.com/mkrul/web-template (yes I'm aware this is using some VERY outdated conventions. I have plans to refactor this but right now I'm just trying to...
View ArticleComment by Misha Krul on server-side / client-side routing problem on browser...
That didn't fix it :\
View Article