Latest Questions

Asking the user for input until they give a valid response

I am writing a program that accepts user input. #note: Python 2.7 users should use `raw_input`, the equivalent of 3.X's `input` age = int(input("Please enter yo

How do I call useQuery in a map function?

I have the below react component which is removing products from a mongodb collection based on the items in the cart. I get this error when I run the code: Comp

Performance issue when dragging/zooming high resolution image in KonvaJS canvas

I am currently loading a rather large image (15000x10000) into a konva canvas. The canvas is draggable in another canvas. The image is not drawn if parts of it

Insert scroll button horizontal using jQuery

I am trying to replicate this example into my own coding. The List tabs are generated dynamically using JS and each have their table (also generated using JS).

How to web scrape the text under <i class>?

I'm trying to get the text "PDF file" under <i class="fa fa-file-pdf-o">. I'm using BeautifulSoup and tried the following, but it didn't work: from bs4 im

Found errors in your .gitlab-ci.yml: unknown keys in `extends`

My code for the pipeline is: include: - template: Terraform/Base.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Terr

How to append data properly in the next line of an array?

def FunctionA(): ... ... ... sol #Here,sol is an array output = [] for i in sol: output.append(FunctionB(i)) print(output) print(output[0,:]) def Function

how does singleton bean handle dynamic index

I am working spring data elastic search. Based on different header in the request, I create @RequestScope object IndexConfig to hold different set of indexes. I

How to Convert A audio.wav file to base64 String in ReactNative

I am trying to build a mobile application and for sending my audio file from my reactnative frontend to my python backend I want to convert my audio.wav to base

Twilio Programmable Chat - Access denied (code: 54007) for old chats

We are using Twilio Programmable Chat on our project for 1 year. On the mobile side we use twilio-chat v.6.0.0 SDK. On the backend side we use java library - co

Apply zip_distance to every row

I have a dataframe with two columns, zip and CSZip. I am trying to apply a function to each row using: dist <- apply(vf, 1, zip_distance(zip, CSZip, lonlat =

Composable as method parameter

I have a Scaffold composable which is used as the basis of all screens : @Composable fun ScreenScaffold( navController: NavController? = null, modif

System.IO.BACnet - send ReadPropertyMultiple without specifying BacnetPropertyReference->propertyArrayIndex

I am using System.IO.BACnet library for my C# BACNet client. I am trying to send to server "ReadPropertyMultiple" request, however I am unable to read non-array

How to use "oneOf" in this schema?

I'd like to have either A or B, but not both (mutual exclusive.) I have to use whatever is avaliable in Draft 3, even though it says 4 on the top. Reason being,

WaitForSeconds is not scaling with Time.TimeScale

I have a script in a game which stuns a target and throws them up into the air. The problem is, the yield return new WaitForSeconds(0.01f), and by extension the

How to web scrape the text under <i class>?

I'm trying to get the text "PDF file" under <i class="fa fa-file-pdf-o">. I'm using BeautifulSoup and tried the following, but it didn't work: from bs4 im

Flask app routes not importing, all pages show 404. Passenger WSGI on DreamHost

I've got a Python Flask app that's working perfectly in my local environment, but when I try to get it to run on a DreamHost server all my pages turn up 404 err

how do i fix "HTML5 Audio pool exhausted, returning potentially locked audio object." i have tried add sound

this is my code it creates a new howl called sound, which defines some variables, than it plays a random song from a list of songs than after it ends, it ends t

pygame movement speed is not constant [duplicate]

I recently started with pygame and im trying to create movement but when I move my rectangle the speed changes at various times. it becomes sl

Multer super slow upload after recieving post request with images

Hello I'm on a (ReactJs Node Mysql Express) stack, my website has an events tab which the admin could upload to it events. Each event has a cover photo, inner p

Best strategy for localizing a mixed application: Razor, Angular, Typescript, .NET and database layer

Our application is a mix of: Front-end: Asp .NET with Razor pages (parent application), and some Angular Pages (displayed in an iFrame) along with typescript.

Uncaught (in promise) FirebaseError: Expected type 'Zu', but it was: a custom ea object

I'm trying to get data from firestore and show it in the frontend. But I keep getting this error "Uncaught (in promise) FirebaseError: Expected type 'Zu', but i

how does singleton bean handle dynamic index

I am working spring data elastic search. Based on different header in the request, I create @RequestScope object IndexConfig to hold different set of indexes. I

Function failing to update spacing after comma

I have a csv file that has inconsistent spacing after the comma, like this: 534323, 93495443,34234234, 3523423423, 2342342,236555, 6564354344 I have written a f

webpage whites out when scrolling up or down

https://habitat-commons.herokuapp.com/ When you scroll up or down on this site the divs white out and rerender no matter how fast the internet or how many times

How can I let a while loop pause for a specified time (datetime)?

I would like to let a while loop run, the stuff thats happening inside takes about 2 seconds to complete (it varies a small amount), so if I use time.sleep(60 o

Composable as method parameter

I have a Scaffold composable which is used as the basis of all screens : @Composable fun ScreenScaffold( navController: NavController? = null, modif

How to extract selectors from adapter from queries with arguments

I'm trying to extract selectors from queries in my apiSlice as said in this documentation: https://redux.js.org/tutorials/essentials/part-8-rtk-query-advanced T

WaitForSeconds is not scaling with Time.TimeScale

I have a script in a game which stuns a target and throws them up into the air. The problem is, the yield return new WaitForSeconds(0.01f), and by extension the

Laravel mix compile progress stuck (WSL)

I'm not sure if there is an issue here but it's been bothering me for a while. Whenever I'm using Laravel mix the various progress bars never complete and there