Latest Questions

best method to require passwords for some pages in a web site

I have a site with most material publicly available but about 10% should be password protected. The site is published using NGINX on a Debian system. What is th

How can I change the pool ball detection code to OpenCV to remove the shaking?

I'm using pool ball detection with the HoughCircles function in OpenCV. import numpy as np import cv2 as cv cap = cv.VideoCapture(1) if not cap.isOpened():

Removing trailing newline character from fgets() input

I am trying to get some data from the user and send it to another function in gcc. The code is something like this. printf("Enter your Name: "); if (!(fgets(Na

How do I monitor a different folder (than the default) within Outlook for new mail (and then fire an event) with Python

I have the below code import win32com.client import pythoncom import time class Handler_Class(object): def OnNewMailEx(self, receivedItemsIDs)

Webclient DownloadFileAsync is way slower than downloading same file from Browser

So I wrote a program which downloads mp3 files from a website. They are about 17mb and if I download them using my browser, each file takes 2 seconds. However u

Unity NetCode IsLocalPlayer false client dosent have control (Host - Client Control Problem)

I am using netcode for multiplayer solution but there is a problem that I haven't been able to solve for a long time. In the past, my problem was that both clie

Plotly adding two sliders in python

I have read plotly slider instruction:https://plotly.com/python/sliders/, but still can't find a way to create two sliders in one graph. I'm new to plotly so an

Is the async keyword required to create asynchronous functionality? Did this functionality change in the recent past?

I'm attempting to show that it is possible for my team to add asynchronous functionality to a currently "fully-syncrhonous" program. Are there any reasons, such

Django Limit the Number of objects in a model

i am working on a django-cms project and (i have to make a image model which can only make 3 objects not more than that if someone tries there should be a messa

Google recaptcha not rendering properly

When I implemented google recaptcha for my site using the instructions given by Google everything works fine but the div itself renders a bit oddly: I am using

Applying weights to KNN dimensions

When doing a KNN searches in ES/OS it seems to be recommended to normalize the data in the knn vectors to prevent single dimensions from over powering the the f

Integrate Django and ReactJS with Kafka to generate some analytical data for users?

I'm implementing a Django web service, which is about to have different platform apps, Reactjs for computers, a swift app for ios, and Kotlin for android device

Office Add-in hangs on context.sync() when using wildcards in search

I'm trying to write an office plugin to find all telephone numbers and highlight them. I used the code template from the official documentation to write the fol

can I generate listenKey binance in app script

I try a lot of think to create listenKey in app script but nothing work. the binance URL: https://binance-docs.github.io/apidocs/spot/en/#user-data-streams this

Query with Elasticsearch and Return source field only

I have some data on Elasticsearch and retrieve data using Fastapi GET call. i used below code to GET data from Elasticsearch main.py @app.get("/get_all") def ge

How to use CPU only for Embedding?

I need to avoid this error: tensorflow.python error.framework.errors_impl.InternalError: Failed copying input tensor from /job:localhost/replica:0/task:0/device

How would you manually test a SwiftUI Framework?

I was applying for QA position and the SDET asked me this question: How would you manually test a SwiftUI Framework? I wasn't sure I answered it correctly. Just

Testcontainers works locally but fails on build server (DinD)

Our recent move to a jenkins in a docker-image has not been so smooth. We have a (over?)complicated setup where one docker container starts a new one and, previ

Why does Intellij idea warn about nullpointer in that if condition?

Here is my code if (!multipartFile.isEmpty() && multipartFile.getOriginalFilename() != null && !multipartFile.getOriginalFilename().isBlank()) {

Pyscf install error: failed building wheel

I keep getting this error after entering pip install pyscf pi@node0:~ $ pip install pyscf Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/

Gauss-seidel method algorithm code giving inf numbers in solution

I'm not sure why I'm getting inf values when plugging in a 3 equation answer, another set of eyes on the equation loop would be useful, when I use a single equa

Python, updating variables manual while code running

I have a code that contains a variable that I want to change manually when I want without stopping the main loop neither pause it (with input()). I can't find a

Converting categorical data into numerical values

I have a dataset with a lot of categorical mixed with numerical. I am trying to run a regression about obesity where the variables I'm trying to include are sta

How to create objects from a dict where the keys are the name objects and the values are the attributes? Using a loop

class Cars(object): def __init__(self,brand=None,color=None,cost=None): self.brand = brand self.color = color self.cost = cost ima

React Hooks - Using useRef without direct access to HTML Element Code?

With React I'm inside of one repository, and the HTML elements are loading from another repo, which I watch for using pageLoaded. Inside updateHeader there is j

Google Vault Upload 503 Service Unavailable

In the last ~week, several Google Vault uploads have failed with 503 errors: #<Google::Apis::ServerError: Server error status_code: 503 header:... @status_co

React Native Animated setValue() problem?

Actually I'm trying to set value of the animation with setValue() after Animated.timing() is finished and want to use this updated animated value then in a loop

How to get a Fieldvalue only if other fieldvalues in the same document are true

How to: If I want to retrieve a FieldValue (String) only if in the same document there is another field (boolean) which is true. For Example: If I have a Docume

Why does Jenkins creates a subfolder within the workspace@script folder to checkout git code instead of the workspace@script itself?

This happened after I updated some plugins and added 'blue ocean' to our Jenkins. Every job we have is using a JenkinsFile to build and package our applications

SQL Moving window over two level of groupby

I have the following table of orders for users like the following: CREATE TABLE orders ( order_id UUID, user_id UUID, date date,