How to show MYSQL errors in AJAX?

I am learning AJAX with PHP-MYSQL. I have three files index.php, process.php and database.php… Javascript is included inside the index.php. index.php <main> <header> Displaying MYSQL errors </header> <!– Display error –> <section id=”error”></section> <div id=”submit_div”> <button id=”submit” name=”submit_btn”>Submit</button> </div> </main> Javascript <script> let submit_btn = document.getElementById(‘submit’); let error = document.getElementById(‘error’); function showHint() { var xhr…

Details

How to pass a custom openCV color-based image segmentation transformation to a keras CNN model?

I am trying to train a Keras CNN model on plant images. I needed to preprocess those images before training because they contain extra information that I don’t want the model to learn. Solution: Color-based segmentation with openCV, I kept just the green pixels def segmented(image): foto = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) hsv_foto = cv2.cvtColor(foto, cv2.COLOR_RGB2HSV) colormin=(25,50,50)…

Details

Conditional formatting requests in Google Sheets in .NET client

I know how to do batch spreadsheet update requests for values and other formatting in the Google Sheets API, but conditional formatting seems to be different. I have the request set up properly: AddConditionalFormatRuleRequest formatRequest = new AddConditionalFormatRuleRequest { Rule = new ConditionalFormatRule { Ranges = new List<GridRange> { new GridRange { // omitted }…

Details

Find the most freq sequence amongst other sequences

I was given 10 DNA sequences each one consisting of 18 bases and I was asked to write a program that calculates the most frequent sequence(consensus) amongst all these sequences. For example let’s say I have “ACTGGA”,”ACCAAT”,”CTTAGG”, “ATGAAG” The consensus sequence would be “A(CT)TA(GA)G” because in the first base position of each sequence “A” exists…

Details

Hover effect of streteched link

I use this code in Bootstrap 4. All I need is change background-color of .card element but it don’t work if I use stretched-link. Can you help me with solution? .card:hover { background-color: blue; } <link href=”https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css” rel=”stylesheet” /> <div class=”card bg-light wow fadeIn position-relative”> <div class=”row no-gutters”> <div class=”col-md-12″> <div class=”card-body”> <h4>Test</h4> <p>Caption</p> <a…

Details

Node SASS for preact

I started a project with preact-cli with the default template. I installed node-sass and sass-loader. I changed one of the .css file to .scss then the whle thing breaks and gives this error. ✖ ERROR BabelEsmPlugin: ./routes/profile/style.scss (../node_modules/preact-cli/lib/lib/webpack/proxy-loader.js??ref–6-0!./routes/profile/style.scss) Module build failed (from ../node_modules/preact-cli/lib/lib/webpack/proxy-loader.js): ValidationError: Invalid options object. Sass Loader has been initialised using an options…

Details