Latest Questions

program to Read content from 1 file and write string which is started from specific word and end with specific word into another file in python

Write a program to Read content from one file and write a string which is started from a specific word and ends with a different specific word into another file

Passing information between while True statments in python

''' I am trying to figure out how to pass information between two while True statements. Basically when player1 asks for a card, I want to store that card in a

Calculate MAPE and apply to PySpark grouped Dataframe [@pandas_udf]

Goal: Calculate mean_absolute_percentage_error (MAPE) for each unique ID. y - real value yhat - predicted value Sample PySpark Dataframe: join_df +----------+--

Error using Tk inter, when creating an event

So I have an assessment where I have to create a pygame using Tkinter, the objective is that you drive a Car and you have to dodge other cars that pass by, the

vue 3 send value to ElMessageBox with element ui

codes are below, I send String to function clickDetails, and then show a ELMessageBox dialog, but the problem, I can't use String in ELMessageBox, show me error

Delete empty lines in file

I'm trying to delete empty lines from a file. Currently it deletes all except for the one I add at line 35:out_file << data_vector[i] << "\n"; How d

How to connect signals and slots over different class-instances

I have custom listviews with corresponding custom models. I use QML for the frontend and load the main file with Python and use python for the backend. The mode

Drawing a line that is an element of an array in p5.js

In my current p5.js project, I'm randomly plotting several lines on the canvas - so my background is in the setup function, but I wish to highlight the current

React navigation keyboard hides bottom bar

I am using react-navigation v6. On any screen when the keyboard is opened by text input, the bottom navigation bar hides and I close the keyboard, it remains hi

How do I search a string "backwards"?

I have the following code in Angular. I want to be able to find "north america" by typing "america north". How do I do that? const getContinents = keys =>

How can I make a function called build() have one string input and it returns a dictionary?

I have a project that requires me to make a function that takes a string input and return a dictionary. The string will be consist of a name and a phone number,

BeautifulSoup library Parsing very slow for Amazon Scraped pages (using both html.parser and lxml)

I have been scraping using BeautifulSoup library in Python for scraping Amazon.com. I am successful in that using proxy rotation, but the problem is that the pa

Why does my code keep running even after it reaches the end?

I am having some troubles with my program as when it reaches the end of the third() function, it continues to try to execute transactions. I tried having it ret

Test for non-parametric repeated measures for replicated block data

I asked 133 students to rate 12 audio-samples (on a hedonic scale from 1 to 9): 4 of those samples were generated by myself (human), 4 of those by an algorithm

Add property to all responses in asp.net core

I have an API with multiple endpoints. I'd like to add a property to all endpoint responses, without adding it to each endpoint response model individually. Ex:

Do invalid statements provide valid results [duplicate]

I made this code and it should be invalid #include<iostream> using namespace std; int main() { int a,b; a=3,014; //invalid b=(

Term_title not working for taxonomy on second level of hierarchie: title not replaced in TITLE tag of Wordpress

I added my own CPT together with a taxonomy. cpt is called: angebote taxonomy: themen (hierarchical) I created my own template file and redirected all calls for

how set Scroll to the top of the page after page change?

I have a problem, which I have no idea about. when the user changes the page the user stays at the bottom of the page. I want to take the user to the top of the

getting error " Plugin "react" was conflicted between "package.json » "

F:\\React tutoria;\\tut-3\\my-app\>npm run build [email protected] build react-scripts build Creating an optimized production build... Failed to compile. Plugi

How do I use a channel receiver inside a nested closure?

I want to share some data between an async function with another async function running on a separate thread. In this case it's a cronjob. This is the solution

Can Rendezvous hashing add a node efficiently?

The wikipedia article for Rendezvous hashing (https://en.wikipedia.org/wiki/Rendezvous_hashing) doesn't explain what happens when you add a node to the hash tab

How can I use a React context variable when initiating i18next interpolation?

The React app I'm working on is using react-18next. Inside the index.js file, there is a i18n.js file imported into it that configures and initiates i18n. This

How to make inherited fields of non-audited base entity being audited for audited child entity in JPA?

I have a base entity not intended to be audited: @Data @MappedSuperclass @EqualsAndHashCode(of = {"id"}) public abstract class BaseEntity implements Serializabl

How to get last modified date of a website?

I'm working on a crawler project, in my project I need the last modified date of the website to be added as important information. Is there any way to do this?

How do I change the default timeout setting in node.js in MarkLogic Grove?

I'm developing a UI application using MarkLogic Grove (React). I'm calling the REST API from the UI, but it times out in 2 minutes. I want to change this timeou

Pyinstaller can't find a module? (error loading Python DLL)

I compiled my program with pyinstaller, and it works fine on my computer, but whenever I ty to run it in another computer (with no python), I get the following

Can't seem to replace current sprites with image [duplicate]

I'm trying to replace the sprites with an image (in this case a race car), but the sprites aren't changing. They're remaining rectangles and a

Datatable with form on multipage validation issue

I have created table using datatable with in each row have td with input or select field. with having on multiple pages. The issues is the datatable render 10 r

Server error after opening many browser cards

I've a Vue app in production. There are 11 products subpages. When i'm opening all of them in new cards then on two of them i'm getting error like on screen. Af

Deep Learning Image Detection - Help needed deciphering machine learning loss and accuracy graph and finding solutions to fix model

I have an imbalanced dataset from Google OpenImages of 6 classes Train (starfish=439; Dolphin = 890; Turtle = 1362; Fish = 6216; Jellyfish = 733; Shellfish = 11