Latest Questions

pdf preview not working on html using ajax

url: "http://localhost/pdfupload/php/upload.php", dragDrop: true, multiple:true, acceptFiles:"application/pdf*", allowedTypes:"pdf", showPre

Select xml files and their corresponding jpg files from a folder with R

I have have a folder with about 4000 jpg files and only about 50 of them have a corresponding xml file. I want to select those jpg files that have a correspondi

Django template language how to fix

Hi I'm trying to build a simple django app but I can't get index.html file to recognise the variables created in views.py. Nothing I do seems to work. Does it h

TypeScript & React: What's the difference between 'React.HTMLProps<T>' and 'JSX.IntrinsicElements["T"]'

I am looking for the most "canonical" and/or "up-to-date" way to add a set of default HTML attributes as a set of allowed TypeScript props to a customized, "enh

How can I check the TextInput change completed in react native

Basically, I need to hit search API when the text changed but it's not a good thing to call API on every change in TextInput. So, is there any callback function

Find the K-Beauty of a Number Unexpected Runtime Error

I was recently doing the first question in the Leetcode Biweekly Competition 78, and I received an unexpected runtime error which I couldn't understand, especia

Issue with Keycloak and Cloudflare

I'm running a web site and I secured it with Keycloak, with running Cloudflare as well. All the login forms, registration forms etc. are used by Keycloak, so I

How to stop the Api icon keep adding when click the buttons?

I have to create a web with two buttons to show each city's information. When I clicked the button the icon would keep adding every each time i click it. I have

how to manipulate JSON files and add fields according to other fields

I have a JSON file that contains answers that user's answers I want to generate an SQL query that changed according to the user's answers and add it as a new fi

How to prevent SNI from displaying incorrect web page over port 443?

I have a server with ISPConfig 3 installed. When a new website is added to the server and is accessed via a browser with HTTPS, the website that is displayed is

Microsoft Login Check

I'm new to Powershell. I want to know how to do a check if the user log into their account successfully and if not loop back to the beginning. Thank you! if(-n

How can I pass in an unknown amount of objects in a dynamic react form to my sql database?

I'm having trouble connecting 0-6 dynamically rendered form elements to the backend/database using react. Perhaps the way I'm attempting to do this is not suppo

I can't add labels to svg path

I want to add a custom-styled label to my object. this is my code of SVG: <svg height="512" version="1.2" viewbox="0

Action requested: Declare your Ad ID permission, is for Admob?

I received this mail today, and i'm not using Admob ads, i'm ussing applovin and Facebook i have to add this permission or is only for the developers that they

How to get the frequency( count) of Variable C when Variables A and B are mentioned together?

I have the following dplyr code: df3 <- Table3%>% group_by(Q6,Q9,Q11) %>% summarise(count = n()) %>% mutate(per = paste0(round(100 *count/sum(

D3.js Arc Diagram - Tapered Ends

I have an arc diagram that is based on this blocks example, and I'd like to taper the ends of the arc path so that they are hidden behind the circles (or at lea

Name 'model' is not defined

When I input this code print(cross_val_score(model, X, y, cv=3)) An error comes back that reads name 'model' is not defined: print(cross_val_score(model, X, y

Not all edges showing in AtlasView NetworkX

I have the following network graph. # Create the graph with unique edges to check the algorithm correctness G = nx.MultiGraph() G.add_edge('A','B',route='56BM',

Why does interrupting a simple C++ program under Valgrind results in segmentation fault?

Consider the following program: #include <iostream> int main() { std::cout << "Hello, World!\n"; } I compile it with on Ubuntu 20.04 (Focal F

How can I write this function into my existing code, Keep getting a promise rejected error

Hi I am trying to Include the function below into my existing code so that after the users are filter based on matching city they will be filtered by the most m

Using Auth0 with NestJS on gRPC Methods

I am trying to implement NestJS Guards for Authentication and Authorization to my gRPC Services, which are implemented in NestJS. @GrpcMethod(USER_SERVICE_NAME,

Porting python PKCS1_v1_5 encryption code to java but java code not work

I have a backend,which receives codes and returns true or false. I send it codes using my python encryption,it returns true(the result varible): from Cryptodome

Pick schema of key in Joi schema

If I have a JOI schema const OBJ1 = Joi.object({ foo: Joi.number(), bar: Joi.string().pattern(/abc/) }); And then I want to have a second schema OBJ2 whic

How to open "vscode" and "zsh in vscode" using terminal?(already install shell code command in path in VsCode)

I just want to open vscode in terminal and I already install shell code command in path in vscode, I restart terminal by quitting and open and I have my vscode

Why i'm getting the following error? ValueError: invalid literal for int() with base 10: ''

Here is the code from time import sleep import keyboard # Condição de partida da máquina while True: if keyboard.is_pressed('ENTER'):

Should I use useImperativeHandle hook when needing multiple refs

I am building component(ThePieChart) where I need to perform quite a bit of DOM manipulation on its elements. Those manipulations I need to perform in parent co

how to plot 2d condition function

I want to plot a 2d condition function, and the code as below: from numpy import exp,arange from pylab import meshgrid,cm,imshow,show def z_func(x,y): zPar

java.lang.IllegalStateException: Error reading delta file, stateful spark structured streaming with kafka

We are running a stateful structured streaming job which reads from Kafka and writes to HDFS. And we are hitting this exception: 17/12/08 05:20:12 ERROR FileFor

Code works (mostly). But failure to remove duplicates

Summary: Hey I've got a filter for some data. It's filtering fine but it's not removing duplicate objects. Arguments taken in order: 1. datasource 2. filters (r

Create extra boolean property with name suffix `_ro`

Can I create an extra property with a property decorator? The way I'm trying to do this obviously does not work. const RoProp = () => { return <T>(ta