Introduction In this article, we will show you how to add icons to your buttons in HTML. Icons are a great way to add visual appeal and enhance the usability of your buttons. They can be used to indicate the type of action a button will perform or make it easier for users to understand the function of a button. Approaches There are several ways to add icons to buttons in HTML, and in this article, we will cover two of the most popular methods − Using font libraries Using image files. Approach 1: Using Font Libraries One ... Read More
In this article, we will show you how to add a horizontal line to your webpage using HTML. A horizontal line, also known as a horizontal rule, is a way to separate content on a webpage and can be used for visual appeal or to indicate a change in content. There are multiple ways to add a horizontal line to your webpage in HTML, but the most common approach is by using the tag. The tag is a self-closing tag that creates a horizontal line on the webpage. This approach is simple and straightforward, and it requires ... Read More
Introduction In this article, we will show you how to add gradients to your project using CSS. Gradients are a great way to add visual interest to your website or application. They are a smooth transition between two or more colors and can be used to create a sense of depth or movement. They can also be used to create a subtle texture or pattern on your webpage. Approaches The following are the two approaches that we are going to follow in this article to add gradients to our project using CSS − Using the linear-gradient function Using ... Read More
Introduction In this article, we will walk you through the process of adding a file upload function to your webpage. We will show you how to create an HTML form with a file input field, as well as how to create a script that handles the file upload process. Approaches Two approaches that we can use to add a file upload function to our webpage in HTML are as follows − Using a basic HTML form with a file input field Using jQuery and ajax Let us discuss them in detail now. Approach 1: Using a basic HTML ... Read More
Introduction We use the fade effect to bring attention to certain parts of our website by gradually increasing or decreasing their opacity. This gradual change in opacity is called the fade-in or fade-out effect. When we gradually increase the opacity, it's known as the fade-in effect and is used to make the selected part of the page become more visible over a chosen amount of time. This creates a smooth transition and helps make our website more dynamic and engaging for our users. In this article, we will be exploring a few ways in which we can implement the fade-in ... Read More
An array is a linear data structure in which elements are stored in contiguous memory locations. As per problem statement, we need to print all elements that have at least one smaller element. In simple terms we can say printing all elements of the array except the smallest one as the smallest one does not have any smaller element than this. Let’s explore the article to see how it can be done by using Java programming language. To Show You Some Instances Instance-1 Suppose we have the below array [10, 2, 3, -5, 99, 12, 0, -1] Now all elements ... Read More
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. As per the problem statement we have to check whether one array is subset of another array. An array is a subset of another array if all the elements of subarray is present in the given array. Let’s explore the article to see how it can be done by using Java programming language. To Show you Some Instances Instance-1 Suppose the original array is array1 {33, 51, 5, 31, 9, 4, 3} The sub array is array2 {51, 9, 33, 3} ... Read More
In this article, we will learn a python program to sort the matrix row-wise and column-wise. Assume we have taken an input MxM matrix. We will now sort the given input matrix row-wise and column-wise using the nested for loop. Algorithm (Steps) Following are the Algorithms/steps to be followed to perform the desired task. − Create a function sortingMatrixByRow() to sort each row of matrix i.e, row-wise by accepting input matrix, m(no of rows) as arguments. Inside the function, use the for loop to traverse through the rows of a matrix. Use Another nested for loop to traverse ... Read More
In this article, we will learn how to remove elements larger than a specific value from a list in Python. Methods Used The following are the various methods used to accomplish this task − Using remove() Method Using List Comprehension Using the filter() method & lambda function Method 1: Using remove() Method remove() function(removes the first occurrence of the element from the list) Algorithm (Steps) Following are the Algorithms/steps to be followed to perform the desired task. − Create a variable to store the input list. Create another variable to store another input value. Use the for ... Read More
In this article, we will learn a python program to remove leading zeros from a number given as a string. Assume we have taken a number in string format. We will now remove all the leading zeros(zeros present at the beginning of a number) using the below-given methods. Methods Used The following are the various methods used to accomplish this task − Using For Loop and remove() function Using Regex Using int() Function Method 1: Using For Loop and remove() function Algorithm (Steps) Following are the Algorithms/steps to be followed to perform the desired task. − Create ... Read More