Latest Questions

Replace null values by the mean of each group

I have a dataset similar to below with several columns which contain Nan values. I would like to group the dataset by location and fill the Nan in Iso code and

intersection oberserver used with a loop through all the elements ends in error

I want to show some cards on scroll and for that purpose I chose to use an intersection observer. But I ended up with: Uncaught TypeError: Failed to execute 'o

Time Complexity of Split AVL Tree Function

I have the following code for splitting the AVL tree and I'm not quite sure if it has Time Complexity of O(log(n)) or O((log n)2). Note: The Complexity of join

Error: Cannot set headers after they are sent to the client when using passport-oauth2 with pkce

Iam not sure where i called res twise in my code,iam trying to implement passport client for twitter oauth2 with pkce, any help finding out would be appreciated

Response.redirect execute the code inside the pageload twice

I have this link http://localhost:54818/offerslinks/offers.aspx?ID=1 when i clicked it. it loads the page and executes this code twice enter image description

How to import Facebook's Chisel fbchisellldb.py depend on the chip type(M1/Intel)?

I add the following shell code in the ~/.lldbinit. if [[ $(uname -p) == 'arm' ]]; then command script import /opt/homebrew/opt/chisel/libexec/fbchisellldb.p

errno vs errors returned by library functions

For errno, there are a bunch of library functions, like strerror(), etc. to convert or print the error code. But what about the error codes re

Exception: Java gateway process exited before sending its port number

I'm facing an issue when trying to use pyspark=3.1.2. I have java 1.8 installed and added in my user path. But according to the docs it does not need any other

Outputing single strings in python

I'm in need of some assistance in this code problem from a MOOC on python programming that I'm taking. This is just for self-learning, and not for any graded co

How is the best way to extract a section from word document with Apache poi?

I´m using Apache poi (XWPF) with Springboot in java 11. I need to extract the section number 2 (title and content) from a word document with the follow nu

`Executed 0 tests, with 0 failures (0 unexpected)` when running individual test cases in Xcode

When I run tests in Xcode, as long as I run all the tests collectively they execute normally. However, if I run only one individual test class or one individual

Python-Flask, Server generated from swagger file produces 'do some magic!' for all get methods

I have generated Python Flask-Server API from swagger editor: https://editor.swagger.io/ When I run the server locally, I noticed that all my get methods produc

Pyserial might lose bytes and sometimes won't receive data at all

I'm using PySerial library in order to read 255-byte packets from nRF52 board. But I'm facing some issues: as far as I know it needs 460800 baudrate, but Window

ReactJS - Convert to Array Mapping

How can I convert this link to a array mapping, I already tried making a array object with name, path, icons, and label properties. But when I do that the cart

pywinauto automate Power BI Desktop tabs

I have Power BI Desktop *.pbix with a number of graphs. Each graph is on a separate page. Each "page" is represented as a tab labelled 'Page 1' 'Page 2' and

Delete several TwoLineListItem from an MDList when creating a dinamic list without an ids in Kivy

Help here pls, I got to create several TwoLineListItem in an dynamic MDList,This start working when the list (list_general) have an item and this is gotten from

TouchableOpacity wont work as supposed in android

I got an app with flatlist ,I added to the app TouchableOpacity that covers the whole screen, works great when I click on item area but doesn't work when I clic

Can I pass a literal $ into a bash script from the command line?

I'm creating a bash script and I need to be able to accept a string as the first parameter. This string may contain the $ character. Script #/bin/bash pass="$1"

I want to make an calculator for average but i'm facing some issues

I want to make an calculator for average but i'm facing some issues. I want the numbers entered by the users come as a print statement but it is just throwing t

SSH disconnected after start docker on AWS

I installed docker on aws according to thes docs https://docs.docker.com/engine/install/centos/ https://docs.aws.amazon.com/AmazonECS/latest/developerguide/dock

When searching for non-primary key in MySQL using DAO it keeps returning a null object

The first method works but the second method keeps returning a null object. I don't see any difference except that flight_no is the primary key. What went wrong

How do i add a property from one Observable to the second Observable?

I am trying to add an address Observable to a user Observable. export interface Address { country: string; state: string; city: string; street: string; zip

Can not run pyinstaller, as I get enum34 error

I finished a python app, and now I want to packing into an executable, for an end user. I use windows 7 64 bit, and my python version it's Python 3.7.2 I alread

Dynamically change celery beat schedule params

I get schedule values from .env file. And sometimes parameters in .env file change. Is it possible to change schedule values of already running celery beat task

Problem by using for loop when loading data series from .csv file and save them as array matrix for every columns loaded

I want to load a series of data from 6 CSV files and save them per column of the data series. As I call the Column_A, Column_B and new_Column_A, only the last o

jstl variable is not even removed after setting it to null or using the c:remove

im trying to remove a session variable using the c:remove or c:set to ${null} but it did not work. I'm expecting the variable will be removed once I refresh the

Bindy skipping empty csv files

I built a camel route that unmarshals a csv file using camel bindy and writes the contents to a database. This works perfectly apart from when the file is empty

how to make Goroutine not Concurrency if Same Function

Is there any way to make goroutine execute one after another ( one by one) if it was the same function? I didn't mean to use goroutine firstly. However, "os/exe

neither find_all nor find works

I am trying to scrape the name of every favorites on the page of a user of our choice. but with this code I get the error "ResultSet object has no attribute 'fi

sqlplus query + loop on linux

I have pratically 0 experience on unix and few on mysql and I am finding hard where to start to complete this task, I have to write a .sh file to launch once a