Programming about solving profit using VAT function

A sari-sari store needs a program that can help it add the corresponding profit and VAT values to its inventory.

The program should add 5% to the base price for the profit amount. The 12% VAT should be added to the price after the solving for the price with profit. Their functions should be separate (one function for the profit and one function for the VAT). As expected, this program will need to handle decimal values.

Flutter 2.0 State Management Introduction With Provider 5.0

With Flutter 2.0, you can build apps on mobile, web and desktop.  Graphics performance is fantastic and the development tools are great. The main barrier to learning Flutter is an understanding of state management.  This tutorial covers the Provider package, one of the most popular and easiest tools to manage state in Flutter.

A video version of this tutorial is available. Code and image files are on GitHub. 

Get Email Alerts When COVID-19 Vaccines Become Available Near You

India is currently in the midst of a second wave of the Coronavirus and this one is far more devastating than what we have seen last year. The country is reporting close to 400,000+ new cases every day but the actual count of daily infections could be much higher.

The COVID-19 vaccination program in India was earlier available to people above 45 years of age but starting today (May 1), anyone above the age of 18 years is eligible for Covid-19 vaccination.

Vaccine Availability

COVID-19 Vaccines Near Me

The government’s official website - cowin.gov.in - has a useful search section that allows you see the nearby vaccination centers in your city or zip code. You’ll also know how many vaccine doses are available at a specific center and the earliest date when the next batch of vaccine stocks are due.

Based on this public data, I have developed an open-source vaccine tracker that will monitor the vaccine availability near you and will send email alerts as stocks become available. The source code of the project is available on Github.

Build your own Covid-19 Vaccine Tracker

Step 1: To get started, click here to make a copy of the Vaccine Tracker Google Sheet in your Google Drive.

Step 2: Click the Vaccine Tracker menu (near the Help menu) and choose Enable as shown in the screenshot.

Vaccine Tracker Google Sheet

Step 3: You may see an authorization window. If you get an “unverified app” message, click the Advanced link and choose “Go to Vaccine Alerts”. The app is 100% safe and open-source.

Step 4: Go to Step 2 now and choose the Enable menu again to launch the tracker. Enter one more pin codes, the email address where you wish to receive the alerts and the age group for which you need to monitor vaccine availability.

Click the Create Email Alert button and your system is up and running. Google Sheets will run this monitor every day and send an email at 8 am indicating the availability of vaccines in your specified areas.

Here’s a copy of the email sent by the vaccine tracker.

Email Alert - Vaccine Tracker

And if you ever wish to stop Google Sheets from tracking vaccine availability, go to the same sheet and choose Disable from the menu.

Apache Kafka and MQTT (Part 3 of 5) – Manufacturing 4.0 and Industrial IoT

Apache Kafka and MQTT are a perfect combination for many Industrial IoT use cases. This blog series covers the pros and cons of both technologies. Various use cases across industries, including connected vehicles, manufacturing, mobility services, and smart city are explored. The examples use different architectures, including lightweight edge scenarios, hybrid integrations, and serverless cloud solutions. This post is part three: Manufacturing, Industrial IoT, and Industry 4.0.

Apache Kafka + MQTT Blog Series

How to Run Parallel Cypress Tests on BitBucket Pipeline

Do you use BitBucket Pipeline as your CI server? Are you struggling with slow E2E tests in Cypress? Did you know BitBucket Pipeline can run parallel steps? You can use it to distribute your browser tests across several parallel steps to execute end-to-end Cypress tests in a short amount of time.

How to Run Tests in Parallel

Distributing tests across parallel steps to spread the workload and run tests faster might be more challenging than you think. The question is how to divide Cypress test files across the parallel jobs in order to ensure the work is distributed evenly? But… is distributing work evenly what you actually want?

Top 10 Most Popular Posts on DZone: April 23-29

Introduction

Welcome to a new DZone weekly feature where we highlight the most popular articles on DZone. Are you ready to find out the most popular articles across all of DZone for the past week (April 23-29)? We compiled our top 10 trending and most popular DZone articles for our developer and software professional audiences!

Let us know in the comments which of these articles is your favorite and what article you hope to see next on DZone!

Detecting Viruses in Real-Time at Scale

Cybersecurity remains a persistent threat to both individuals and businesses, with data privacy concerns increasing for 86% of companies in 2020 and just 23% of consumers believing their personal data is very secure. As malware becomes steadily more omnipresent and sophisticated, a proactive approach to threat detection has become essential. Trend Micro is a global leader in hybrid cloud security, network defense, small business security, and endpoint security. To protect Android devices from viruses, the company built Trend Micro Mobile Security — a mobile app that compares APKs (Android Application Package) from the Google Play Store to a database of known malware. The virus detection system works as follows:

  • External APKs (Android application package) from the Google Play Store are crawled.
  • Known malware is converted into vectors and stored in Milvus.
  • New APKs are also converted into vectors, then compared to the malware database using similarity search.
  • If an APK vector is similar to any of the malware vectors, the app provides users with detailed information about the virus and its threat level.

To work, the system has to perform a highly efficient similarity search on massive vector datasets in real-time. Initially, Trend Micro used MySQL. However, as its business expanded so did the number of APKs with nefarious code stored in its database. The company’s algorithm team began searching for alternative vector similarity search solutions after quickly outgrowing MySQL.

Safari 14.1 Adds Support for Flexbox Gaps

Yay, it’s here! Safari 14.1 reportedly adds support for the gap property in flexbox layouts. We’ve had grid-gap support for some time, but true to its name, it’s limited to grid layouts. Now we can use gap in either type of layout:

.container {
  display: flex;
  flex-flow: row wrap;
  gap: 1.5rem;
}

Apple’s been rather quiet about the update. I didn’t even hear about it until Eric Meyer brought it up in an email, and he only heard about it when Jen Simmons tweeted it out.

I checked the WebKit CSS Feature Status and, sure enough, it’s supported. It just wasn’t called out in the release notes. Nothing is posted to Safari’s release notes archive just yet, so maybe we’ll hear about it officially there at some point. For now, it seems that Maximiliano Firtman‘s overview of iOS 14.5 is the deepest look at what’s new.

And how timely is it that Eric recently covered how to use the gap property, not only in grid and flexbox layouts, but multi-column as well.


The post Safari 14.1 Adds Support for Flexbox Gaps appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Setting up MongoDB Cluster and Replica-Set

Database Replication

Database replication is a process in which we run a set of database instances that maintain the same datasets and it provides redundancy and promises high availability of database servers. In case your one database falls down then you still will be able to use the other available database from the cluster and have the same datasets that you had in your previous replica. 

In this post, I am going to demonstrate the replication setup in MongoDB. If you're using some other database you might need to check if your database supports replication or not.

i want the answer to this question please help out this is urgent i ask

each quarter the marketing manager of a
retail store divides the customers into two groups based on their purchase behavior
in the previous quarter. The classes are denoted by L and H. The manager wishes to
determine to which group of customers he should sent a catalog. The cost of sending
a catalog is $15 per customer. If a customer from group L receives a catalog, then
the expected purchase in the current quarter is a $20, otherwise it is $10. If a
customer from group H receives a catalog, then the expected purchase in the current quarter
is $ 50, otherwise it is $ 25. Furthermore, if a customer from group L receives a catalog,
then the probablity that he will stay in group L for the next quarter is 0.3, otherwise, it
is 0.5. If a customer from group H receives a catalog, then the probabilty that he will stay
in grooup H for the next quarter is 0.8, otherwise, it is 0.4.
(a.) Formulate an average reward problem to help the manager.

How to Generate and Compare Perceptual Image Hashes in Java

Perceptual image hashing is a relatively new process used primarily in the multimedia industry for content identification and authentication. The process itself uses an algorithm to extract specific features from an image and calculate a hash value based on that information. The hash value that is generated acts as a kind of ‘fingerprint’ for the image; it is a distinct identifier that is unique to its parent image. 

As you may have guessed by the fingerprint comparison, perceptual image hashing is particularly useful for digital forensics, but it has become an important player in prohibiting online copyright infringement as well. By comparing the hash value of an original/authentic image with the hash value of a similar image, you can identify and match various images and calculate the Hamming Distance between them. For reference, Hamming Distance measures the minimum number of substitutions it takes to change one image to the other, so hash values that are closer together are more similar. 

inserting into mysql database through php

<?php
$pdo = new PDO('mysql:host=localhost;port=3306;dbname=crud', 'root', '');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$title = $_POST=['title'];
$description = $_POST = ['description'];
$price = $_POST = ['price'];
$date = date('Y-m-d H:i:s');
$products = $statement = $pdo->prepare("INSERT  INTO products (title, image, description, price, Create_date)
VALUES (:title, :image, :description, :price, :date)");
$statement->bindValue(':title', $title);
$statement->bindValue(':image', '');
$statement->bindValue(':description', $description);
$statement->bindValue(':price', $price);
$statement->bindValue(':date', $date);
$statement->execute();

?>

Top IoT App Development Trends in 2021

More Focus on Container Technologies in IoT Platforms

Gartner projects that over 75% of global organizations will be using containerized apps in production by 2022. So far, container technologies have been part of traditional enterprise IT environments and cloud architectures. Recent developments in industrial IoT platforms and the increased demand for vendor-neutral IoT technologies, however, have made containers increasingly relevant for the Internet of Things. 

Defining Containers

What is a container? It is a lightweight virtualization technology that includes an entire runtime environment. This means an application and all its dependencies, plus the libraries and configuration files required to run the application. Container technologies help you abstract differences in operating systems and underlying infrastructures. This is why they are often embedded in IoT platforms so that you can connect to any device and make virtually any machine or piece of legacy equipment IoT-ready.