Latest Questions

Testing React Component with React Router V6

I understand that React Testing Library has an example of testing with react router, but I couldn't get it to work (I think because I am using react router V6).

anything wrong with this trim() method in C

this method is for trimming a string in C by deleting spaces from the beginning and end. BTW iam not that good with C and actually facing some issues with deald

Import "brownie" could not be resolved in Pylance

Error is: Import "brownie" could not be resolvedPylance I know there are other SO posts that refer to this, but it seems most of them are talking about booting

How to run background task in parallel (python, FastAPI)

I am currently developing an API that has several endpoints. One of them is to register data in a database, other endpoints are related to simple CRUD endpoints

Is Ruby on Rails getting started guide up to date?

I'm trying to learn ruby on rails from the official website guide, and I copy paste almost all code but some seems not working. like this on for exemple, I get

Is there any way to filter by the first child using SqlAlchemy?

I'm trying to find a way to filter by the attribute of the first row returned as children. class Parent(Base): __tablename__ = "parent_table" id = Colum

flutter google_mobile_ads reqires higher android SDK version

I want to add google ads to my app. I rearrange pubspec file and AndroidManifest.xml file in android\app\main. but I get error as The plugin google_mobile_ads r

Redirect 404 to homepage in Nextjs with dynamic routes

I am trying to redirect 404 pages to the homepage in Nextjs, but because of a rule in the next.config.js it does not work. Every other 404 redirects to homepage

Regular expression to collect all IPs from Pod definition

I am trying to collect IP addresses of the pods which has 3 network interfaces attached to. From the output of kubectl get pod .. -o yaml, I would like to coll

React difference of using value in state vs value in object in state

I am getting different behaviour depending on whether I am using a boolvalue on with useState, or whether I am using a bool value inside an object with useState

nextjs and bootstrap5 modal

Hello I would like to use bootstrap 5 without react-bootstrap and reactstrap when I create my modal I end up with this error: TypeError: undefined is not an obj

mat-datepicker change date format not working

I am using the providers in my module to change the format of the datepicker in FiltriRecuperoComponent see code below export const MY_FORMATS = { parse: {

Binding Callback Function to a HeaderTemplate

How do I bind a callback function to a DataTemplate inside a HeaderTemplate in WinUI3? After reading various answers it appears the DataContext inside a HeaderT

Why can't i use the € symbol with printf?

How can i put this symbol (€) on the terminal using c. I've tried: printf("%c",0128); 0128 is the code on the ascii table but the compiller gives the error

I am unable to click on any element which is inside a frame tag in Test Cafe

I am able to login to my application but after that unable to perform any action because all elements are inside the frame tag. The approaches I have tried: Sel

Java Slick2D cmd output

Is there any way to disable automatic Slick2D info output to CMD window showing line INFO:Use Java PNG Loader = true every time it is used? Besides being pretty

First file created with Flutter leads to white screen

I got Flutter installed. No problems with flutter doctor. Installed Dart en Flutter in Android Studio, opened a new Flutter project and chose for Flutter (and f

React native reanimated runOnJs - does not update state every time

I have a list of items that should change state when they are swiped passed a certain threshold. I'm using runOnJs to call a function to change the state. Now w

Extending Vuetify's VBtn component to create a reusable icon button component

I've been using the example Codepen (https://codepen.io/whoistobias/pen/yLNgjwy) to try to extend the Vuetify VBtn component to create a reusable Button Icon co

Update custom hook's variable after initial call

I created a custom fetch hook called useFetch() and initialled it in my App.js component, to render a list of movies when the web app loads up the page. I am tr

Changing AudioHandler.mediaItem without a Queue

I am working on my first Flutter app which implements basic stream functionality. Upon starting, the app loads a stream from source A. The app contains navigati

Memory leak issue virtual camera macOS, swift SwiftUI zoom caphost

We are developing a application with virtual camera plugin for macOS by using swiftUI & swift. It has also C++ & objective C library. When we use that p

Go gorilla websocket write deadline

I am unable to understand this part of the code which uses c.conn.SetWriteDeadline function. // Time allowed to write a message to the peer. writeWait

Minimize chrome ribbon button in python selenium

I have python selenium code to expand chrome button as mentioned below. button.click() And it expands button like this: Now I want to minimize button. Is ther

Proper way of dealing with returning from a fetch

I'm a bit new to coding in a JS/TS way and I just wanted to know the best practice when it comes to returning and handling void and values that come from a fetc

Typescript - Object display correct datas but properties are undefined on access

When I log the entire object all the datas are displayed but when I try to access the properties they are undefined. As if the object's properties where not map

Running Pythonscript over SSH from a Jenkinsagent doesn't start the script

Update: The problem seems to be quite different from what I initially thought. Information about this is at the bottom of the post. I've been having quite the s

Laravel validation for numbers and hyphens

How do you validate the numeric values with Hypen's (-) ? I just want to validate the numeric value with Hypen's and without Hypen's. Thank you so much ! For ex

Can't send mail with Lumen framework and no error appears

Since yesterday I have had problems sending emails with Lumen. I think I have followed all the steps in the documentation correctly, but unfortunately I cannot

How do I connect to JawsDB (add-on) with a Github deployment (javascript program) on Heroku?

I have tried my best to debug this issue for the past few days with no luck. I am a beginner so there could totally be simple things I just didn't know. So I ha