Latest Questions

How to read a text file into a list or an array with Python

I am trying to read the lines of a text file into a list or array in python. I just need to be able to individually access any item in the list or array after

How to set SharePoint path using a string variable on sheet

Dim path as String dim a as string dim b as string a = range("A4") // variable name in cell b = range("A106") // variable of other name in cell Workbooks.Open

My code returns an error when trying to split a vector

I have a problem with a Java code and I can't solve it, I have a Vector with 3.529 .txt files and I wanted to split it into 6 other vectors. I'm using the code

If there is an active class on two buttons, how do I add a function specific to the buttons with the active class?

This is my first time posting and I'm also very new to javascript. I've had this problem for days and have tried various solutions but none have worked. I have

Incrementing a Number Sequence in a Dynamic Table

I have a procedure called TableNumberSequence that adds a table row, pauses for a second and then adds another. It does this up until what's specified in the co

Converting Images to ASCII art using Python & Python Imaging Library

I'm currently trying to write a program that converts images into ASCII art in Python using Python Image Library Here's what I got so far: import PIL.Image # a

"ValueError: 'image_path \tpredicted_labels \tconfidence score' is not in list"

Getting this error when I run the following code in google colab "ValueError: 'image_path \tpredicted_labels \tconfidence score' is not in

Number to Excel column name conversion

In Excel, column names are characters from A to Z, if there are more columns needed, it continues with AA, AB ... I want to write a function, that converts inte

Polymorphic class

In a C++ program in which there is a base class with a virtual function and two derived classes with redefinition of that virtual function , which class is a po

Is there a way to resize a Libgdx window based on the monitor's maximum bound?

What I mean is there a way to set the window size to related to the result given by this method: GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWin

Using appsettings in Azure function

This is a follow up question to this question: appsettings.json and azure function by timer I want to have dynamic settings which I can change without redeployi

google cloud composer library installation failure

while attempting to update the installed pypi packages on my composer env, I'm getting the following error - UPDATE operation on this environment failed 7 minu

How to define the initial scroll position of scrollable div

I have a div card (bootstrap) in my project which contains messages from a chat. The new messages append below the old so, when the container is full the user c

Cypress Multi Domain Testing

Does Cypress support multidomain testing in the same test? I am getting the below error while navigating to the different domain: The new URL is considered a di

How can I group by below table from Customer ID and Product Code and get them to one row?

How can I group by below table from Customer ID and Product Code and get them to one row as below using Python? Customer ID Product Code Days since the last

Flutter local caching when app is background

I have a background service listening socketio and showing me notification. I wanna cache to local that i take from socketio but packages dont support caching w

Universal Links redirection to specific view

I'm having a hard time understanding how universal Link works. First I have tried redirection to a specific UIViewController (Universal link works as it redirec

Visual Studio Code C++ Linux Library's On Windows

So basically I am writing a socket program in C++ on a Windows machine. But I am running a WSL and compile the code within the WSL because I am building it for

get_object_or_404 and .get(id=pk) is not working when i try to access my model in to some view

i'm trying to access my model using both method but one of them is not working in my view. i want when a user click on {{question.title}} in my home page to be

Python 3.10 Type Hinting causes Syntax Error

I have defined two classes. A Bookshelf class and a Book class and have defined each with its own methods and type hints. When I run the below code in VS Code u

CircleCi job: I need to make the working-directory as a variable

I am working in many project in same time so i need to use a different working directory in circle,look what i did: steps: - checkout - run: name: Ru

How to return the response from an asynchronous call

I have a function foo which makes an asynchronous request. How can I return the response/result from foo? I am trying to return the value from the callback, as

Call Python file with main method inside Jupyter notebook

I have a problem. I want to call inside my Jupyter Notebook a Python File. I looked at How to execute a * .PY file from a * .IPYNB file on the Jupyter notebook?

setOnClickListener is not showing the Toast or doing the Intent

this is in Kotlin, it doesn't seem to work no matter what I try it's just a button with a click listener. Its function is to take me to another activity, I trie

Impose Constraint on CpModel only when some relation between IntVars is true

tl;dr: I'm using Google OR-Tools in Java. I want to add a conditional constraint to a CpModel depending on whether clause involving IntVar variables are true. B

Python - Division by zero

how can i make something divided by 0 equal base, EX: 5/0 output 5 Sorry I can't explain properly, I'm new to programming

indexing column name in the dataframe in r

> df A B C 1 1 2 3 2 4 5 6 3 7 8 9 This is an example from another stack over flow question. Actually, in my dataset, there are 301 columns. I wonder How

MPI - Send (unordered) map

I am trying to find a way to send an unordered map from one node to another using MPI. The exact data structure I am trying to send is a nested unordered map (s

Many unexpected CloudWatch Log Streams for EKS control plane components

I have an EKS cluster up & running, with everything going smoothly. However, I see there are several unexpected Log streams for the EKS control plane compon

How to pass id in path url as component property in react router v6 [duplicate]

I'm updating an outdated tutorial project using react hooks and react router v6. I want to pass the id in the path url to the component proper