I would like to create an array of inputs with at least 1 input by default. while submitting the form inputs should not be empty. returned data should be an array with the all the values of inputs i've created this, and it works great but for some reason, append will not let me add/append new inputs while the previous one is empty. https://codesandbox.io/s/restless-moon-fhh27j?file=/src/App.js it will let you add extra input, only once the previous one is fulfilled with a value , and that's not the behaviour i want. i would like to be able to add as many as you like in first place. i can't exp
I am doing a 'JAVA project' in Eclipse Enterprise Edition IDE. Hibernate CRUD project to create user (student) details in my MySQL database (hibernatestudent). Hibernate version is Hibernate ORM core version 5.6.9.Final. My MySQL version is 8.0.29. I have the same version connector jar file for JDBC added in the build path library. All other related jar files related to Hibernate have been added also. I have tried the suggested solutions from other such issues of users but none seems to solve my problem. Below shows Exception when running StudentDAO.java file. Exception Jun 10, 2022 11:46:40 A
Recently I have added Firebase to my project to add event tracking. The problem is that I can not log custom events. I have enabled Analytics at firebase I have added the GoogleService-Info file I have enabled Firebase debug flag for my scheme I have implemented a class to encapsulate Firebase analytics stuff I call FirebaseApp.configure() and Firebase.Analytics.setAnalyticsCollectionEnabled(true) inside my AppDelegate This is how I log a custom event: func log(event: AnalyticsEvent, parameters: [String: Any]? = nil) { Analytics.logEvent(event.rawValue, parameters: parameters) } This is my out
I'm facing issue with setting the value of file input with multiple files choice. In a form i have two file input fields, one allows user to select only one file, and the second allow multiple files. So while applying setValue to the singular file input, it works fine and file goes to state, but at the same time, while i trying to setValue for the multiple files input, i get the following error "Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string." const handleSingle = (file, uploadedData) =
Trying to explore telegram python and create an automation that can send data, but for now I am trying to connect my server with centOS to telegram. During my testing I received an error when I run the python script. Does someone know what I need to check or modify in my script? Error: Request caused struct.error: required argument is not an integer: SendMessageRequest(peer=InputPeerUser(user_id='user_id', access_hash='user_hash'), message='Testing...', no_webpage=False, silent=None, background=None, clear_draft=False, reply_to_msg_id=None, random_id=57746331822001234, reply_markup=None, entit
I'm using Activity.startLockTask() for lock my app, but when I start startLockTask(), it showed popup like under. I tried solution: Use accessibility for handle Got it button, and perform a click on it Use accessibility and handlle click on center position of screen. But accessibility can't handle it, accessibility doesn't detect there popup. Who are know any solution? Please let me know. Thanks all.
I have a const std::vector<char> - not null-terminated. I want to print it using the fmt library, without making a copy of the vector. I would have hoped that specifying the precision would suffice, but the fmt documentation says that : Note that a C string must be null-terminated even if precision is specified. Well, mine isn't. Must I make a copy and pad it with \0, or is there something else I can do?
I am a new python and raspberry Pi user, I have run this regular code for ultrasonic sensor, the problem with it is that I have connected it to a system where it has continuous 5v input so it has no stop time --> resulting impossibility of stable distance measurement, I understood that I have to set a delay with time.sleep(1) somewhere to make it run for only 1 second for each measurement so it will get stable. My question is: where do I have to insert the delay? Is that answer right? Code: import RPi.GPIO as GPIO import time #GPIO Mode (BOARD / BCM) GPIO.setmode(GPIO.BCM) GPIO.setwarnings(Fal
i am using React Native i just want generator user ID with name Like Instagram, Twitter, TikTok, have you any Suggestion how it's possible? i try unique-username-generator but getting an Error of const crypto = require("crypto");
I am getting these two warning problems: WARNING: Ignoring invalid distribution -ip and WARNING: There was an error checking the latest version of pip. How to resolve it? C:\Users\ABDOU-ID>mysql-connector-python --version 'mysql-connector-python' is not recognized as an internal or external command, operable program or batch file. C:\Users\ABDOU-ID>mysql-connector-python 'mysql-connector-python' is not recognized as an internal or external command, operable program or batch file. C:\Users\ABDOU-ID>pip install mysql-connector-python WARNING: Ignoring invalid distribution -ip (c:\users\abdou-id\
I'm trying to add a date picker or calendar to a cell, but the Developer tab doesn't have the option to add one. I could not find any information on what to do if it is not on the Developer tab.
I'm trying to add a date picker or calendar to a cell, but the Developer tab doesn't have the option to add one. I could not find any information on what to do if it is not on the Developer tab.
I have a problem. I want to predict when the customer will place another order in how many days if an order comes in. I have already created my target variable next_purchase_in_days. This specifies in how many days the customer will place an order again. And I would like to predict this. Since I have too few features, I want to do feature engineering. I would like to specify how many orders the customer has placed in the last 90 days. For example, I have calculated back from today's date how many orders the customer has placed in the last 90 days. Is it better to say per row how many orders th
I'm trying to install the spacepy package on Pycharm (Mac), but the installation keeps failing. note: This error originates from a subprocess, and is unlikely a problem with pip Console output: Collecting spacepy Using cached spacepy-0.3.0.zip (19.8 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting h5py>=2.6 Using cached h5py-3.7.0-cp310-cp310-macosx_10_9_x86_64.whl (3.2 MB) Requirement already satisfied: scipy>=0.11 in ./venv/lib/python3.10/site-packages (from spacepy) (1.8.1) Requirement already sat
I have some code which validates that a non-profit is in good standing with the IRS by looking up the organization's Employer Identification Number (EIN) on the IRS website's Tax-Exempt Organization Search page using page scraping via PHP cURL. Recently it began to fail with 403/Forbidden errors. I re-wrote it to adapt to changes on the IRS website. Now I have code that works as expected on my development system(s) while the identical code (verified with "sum" on the two files involved) fails with a 403 error on our production system, but I'm stuck on identifying the difference causing the pro
I have stuck with my bash code. and needed some help. I trying to write bash code that : Length – minimum of 10 characters. Contain both alphabet and number. Include both the small and capital case letters. Color the output green if it passed the validation and red if it didn’t. Return exit code 0 if it passed the validation and exit code 1 if it didn’t., the problem that can be resolved for me is that code does not check upper and lower case. and have exit 0, which means the password ok in all cases. # Color for Output Warning='\033[0;31m' # Red Success='\033[0;32m' # Green NC="\033[0m" # No
Tengo este programa que pretende convertir un número decimal en hexadecimal. El tema es que el programa tira la advertencia de más arriba y no se como corregirlo. Se supone que la devolución (identificador de variable) debería ser un %s porque lo que se quiere mostrar es una cadena. #include <stdio.h> int main() { int n = 0; char hex = '\0'; const char * DIG_HEX = "0123456789ABCDEF"; printf ("Ingrese un entero positivo: "); scanf ("%d",&n); do{ hex = DIG_HEX [n % 16 + 1] + hex; n = (int) n/16; }while ( n != 0 ); printf ("\nHexadecimal= %s", hex); return 0; }
I am trying to run a maven application using spring on running the application compiles successfully but on running the command mvn spring-boot:run the following error appears. I am running the application in eclipse IDE. Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.7:run (default-cli) on project userms: Application finished with exit code: 1 -> [Help 1] This is my pom.xml file <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org
I am building a little local dev/testing/documentation environment for some components which are used across different projects and so want to create them as individual npm packages. Everything was working perfectly until I tried to use useState() in one of the components. Add this created the following errors: Invalid hook call. Hooks can only be called inside of the body of a function component. TypeError: Cannot read properties of null (reading 'useState') I feel this is strange and I can't figure out what is causing it. I also tested with other hooks to see if it was just useState that was
I'm trying to install leaflet version, pointing to some commit. package.json: { "dependencies": { "vue": "^3.0.0", "@vue-leaflet/vue-leaflet": "https://github.com/vue-leaflet/vue-leaflet#6bda39424bcb90c06a704e19022bc3f70f895fd7", }, } When I compiling with vite, I get the following error: [vite:resolve] Failed to resolve entry for package "@vue-leaflet/vue-leaflet". The package may have incorrect main/module/exports specified in its package.json: Failed to resolve entry for package "@vue-leaflet/vue-leaflet". The package may have incorrect main/module/exports specified in its package.json. **
I have a row with 4 columns that are each 3 wide, which adds up to the 12 that are supposed the be in a row, but for some reason the last one is still going onto a new row. Any idea how to fix this? Here's my code: <div class="container text-center"> <h3>Welcome to "Ender's Super Cool Recomendations" where I, Ender, give you, the reader, super cool recomendations for MOVIES you should watch!</h3><br> <div class="row"> <div class="col-sm-3"> <h4>Shows</h4> <div class="well"> <p><a href="heartstopper2.html">Heartstopper</a></p> <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAo
im using cv2 to try to take a picture here is my code import numpy as np import cv2 face_cascade = cv2.CascadeClassifier('cascades/data/haarcascade_frontalface_alt2.xml') eye_cascade = cv2.CascadeClassifier('cascades/data/haarcascade_eye.xml') cap = cv2.VideoCapture(0) while(True): ret, frame = cap.read() gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5) for (x, y, w, h) in faces: #print(x,y,w,h) roi_gray = gray[y:y+h, x:x+w] roi_color = frame[y:y+h, x:x+w] img_item = "my-image.png" cv2.imwrite(img_item, roi_color) strok
I have a pandas dataframe that looks as such: header1 header2 header3 val1 1 True val2 2 True val1 1 True val2 2 False and I want to conditionally deduplicate the rows, based upon if the last column is True or not. In the above table I want the output dataframe after drops to look like this: header1 header2 header3 val1 1 True val2 2 True val2 2 False having deduplicated the third row, as it had header 3 set to true, but not the fourth row, as it had header 3 set to false. I haven't yet been able to figure out how to do this, as drop_duplicates doesn't support this explicitly and it's not gene
I'm learning Javascript. This is a problem I'm stuck on: "Using a for loop, calculate the percentage of students' test scores stored in the testScore array. The test has a total of 100. Store the percentages in another array and display it to the console." This was my solution (I know there's "better" alternative methods of solving this, but since I'm just learning, I'd rather understand first what I'm doing wrong here.): const testScore = [10, 40, 30, 25]; const percentages = []; const gradePercentage = (scores) => { percentages[scores] = (scores / 100) * 100; return percentages; }; for (let
My company had a new server installed and now I can not access databases. This is the error message: The database NewDatabase is not accessible. (ObjectExplorer) and this is what it says under program location: at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.DatabaseNavigableItem.get_CanGetChildren() at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren(IGetChildrenRequest request) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent) I have already tried this solut
https://www.sublimemerge.com I see there is an option on Sublime Merge, right-click file and Open in Editor..., that will open the file in the default editor (sublime text here). However sometimes I prefer to open files on QtCreator. How can I have multiple editors on Sublime Merge? And then choose which one to use while opening a file.
We are migrating from a self-hosted GitLab to a gitlab.com subscription. We have 28 parent groups and under these groups there are multiple subgroups and projects. I know I can export one group and it will export all the subgroups under it and then I can import it, but documentation says to export/import single projects. I have almost 3000+ projects and doing this 3000+ times is not practical. How can I export/import all the projects under a group regardless of whether it is in a group or under some other subgroup in the hierarchy?
I want to create a Responsive 12 column grid system using CSS FLEXBOX for making my website responsive. I don't want to use any css framework instead I want to use my own 12 column grid system and with writing my own css. I want class names like this which are listed below. Any help would be appreciated. I tried something like below. Please correct me. *, *::after, *::before { box-sizing: border-box; } .container, .container-full { width: 100%; margin: auto; padding: 0 1rem; } .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 { padding: 1rem; bor
I am just getting started on my first web scraping project. Before I go and install a headless browser etc, I thought I would just save the page manually and work on parsing the dom, as a mini project. Well, Trying to just save the page with right-clicking and saving the file as -> HTML only.... is not resulting in an HTML file with any of the information I am looking to parse. I see the information I want in HTML tags, when I open the console. How can I get the HTML with the information in an external file, so that I can play with loading it into my js script? Also curious why it is that righ
I'm making a bot for a game and I want to call the function when I press hotkey. I already tried some solutions but it is not good. Here is my code: def start(): while True: if keyboard.is_pressed('alt+s'): break ... def main(): while True: if keyboard.is_pressed('alt+p'): start() This way is stable but it causes a lag, it is hard for me to type something. def main(): keyboard.add_hotkey('alt+p', start, args=(), suppress=True, trigger_on_release=True) while True: # waiting for the user to press hotkey continue As I know keyboard.add_hotkey only returns output so I can't stop the loop in the st