Found 10711 Articles for Web Development

How to add bootstrap toggle-switch using JavaScript?

Aayush Mohan Sinha
Updated on 10-Apr-2023 14:45:38

1K+ Views

The Bootstrap library provides a number of features to the user to make their coding experience smooth. One of such features which the user can choose from is the toggle-switch. The toggle-switch, one of its useful features, provides users the ability to add components which can switch between two states such as on and off. Bootstrap Toggle-switch The Cascading Style Sheets (CSS) framework Bootstrap is a toolkit that makes it simpler and more standards-compliant to create websites. It can be used, alongside JavaScript, to create a responsive user interface. The simple Bootstrap toggle-switch component is used to select one of ... Read More

How to add badge to list group in Bootstrap?

Aayush Mohan Sinha
Updated on 10-Apr-2023 17:32:36

184 Views

Adding badges to list groups in Bootstrap is a crucial aspect of creating engaging and informative user interfaces. Badges provide developers with the ability to display important information such as notification counts, unread messages, or upcoming events alongside list group items, allowing users to quickly and easily identify relevant content. While adding badges to list groups in Bootstrap may seem like a daunting task, the process can be easily accomplished with the proper guidance. In this article, we will explore the step-by-step approach to adding badges to list groups in Bootstrap, highlighting the underlying syntax and customization options available within ... Read More

How to add and remove input fields dynamically using jQuery with Bootstrap?

Aayush Mohan Sinha
Updated on 10-Apr-2023 14:16:31

3K+ Views

In proportion to the development of intricate and user-focused web applications, the capability to append and discard input fields dynamically has gained vital importance for developers. By amalgamating the influential abilities of jQuery and Bootstrap, developers can create responsive user interfaces that acknowledge user input instantly. The course of action for adding and removing input fields dynamically by means of jQuery and Bootstrap might seem daunting; however, with a profound comprehension of the inherent syntax and parameters, it can be executed with effortless ease. This paper delves into a step-by-step approach to adding and removing input fields dynamically with the ... Read More

How to add and remove CSS classes to an element using jQuery?

Aayush Mohan Sinha
Updated on 10-Apr-2023 14:42:24

1K+ Views

CSS classes perform a pivotal function in designing web pages and have a significant influence on their comprehensive facade. Since more significance is being placed on the aesthetics of pages, customizing web pages dynamically can greatly boost their value. At first observation, this task might appear to be intimidating, but utilizing jQuery, it becomes effortless to append or extract CSS classes from an HTML component in real-time, thereby providing an expeditious and effortless method of producing interactive and dynamic web pages. By affixing or eliminating CSS classes, we can reform the presentation of components on the spot, predicated on user ... Read More

JavaScript Program for Find the smallest missing number

Saurabh Anand
Updated on 10-Apr-2023 13:56:51

274 Views

We are given a sorted array of distinct non-negative integers, here we have to find the smallest missing number. Hence in this tutorial, we will explore different methods to solve this problem and discuss their time complexities with various examples. Understanding the Problem The problem statement is quite simple. Given a sorted array of distinct non-negative integers, we need to find the smallest missing number in it. Let's take an example to understand the problem. Example Let’s say that we have an array [1, 2, 4, 5, 6]. Here, We can see that there is a space between the ... Read More

JavaScript program to find the lost element from a duplicated array

Saurabh Anand
Updated on 10-Apr-2023 13:55:14

781 Views

We have problem to write a program in JavaScript that can identify the missing element in a duplicated array. The input for the program will be an array that contains duplicate elements except for one, which is missing. The program should be able to identify the missing element and return it as output. Prerequisite to solve this problem requires an understanding of JavaScript arrays and how to manipulate them to find the missing element. We must develop a program that should be efficient and able to handle large arrays with many duplicate elements. Problem Statement We are given ... Read More

JavaScript Program for Find k pairs with smallest sums in two arrays

Saurabh Anand
Updated on 10-Apr-2023 13:52:36

191 Views

In this article, we will first find all the pairs that can be made with two arrays. Then, according to the value of k, we will display the pairs with the smallest sums in two arrays. Here, we will first use the brute-force method to solve the problem, then we will use various methods to optimize the same. So, let’s get started with the problem statement and some examples. Problem Statement We are given with the two arrays arr1[] and arr2[] sorted in ascending order, and a nonnegative integer k, the objective is to find k pairs with ... Read More

JavaScript Program for Equilibrium index of an array

Saurabh Anand
Updated on 10-Apr-2023 13:47:28

326 Views

The position where the sum of the elements to its left and right equals one another is known as the equilibrium index of an array. To put it another way, if we take a look at an array of size n, the equilibrium index i is a point such that − arr[0] + arr[1] + ... + arr[i-1] = arr[i+1] + arr[i+2] + ... + arr[n-1] where i is the equilibrium index and arr is the input array. We may alternatively state that the array is divided into two parts by the equilibrium index i such that the total ... Read More

JavaScript Program for Diagonally Dominant Matrix

Saurabh Anand
Updated on 10-Apr-2023 13:40:44

114 Views

Matrix or matrices are great tools in computer science and mathematics for quickly approximating difficult calculations. A matrix is a collection of numbers organized in rows and columns that can represent data or mathematical problems. By this article, we will learn about the Diagonally Dominant matrix. We will look at the concepts, algorithms, and examples of diagonally dominant matrices, as well as their implementations in a variety of programming languages. Diagonally Dominant Matrix We can call a square matrix diagonally dominant if, for every row in the matrix, the magnitude of the diagonal entry in a row is ... Read More

Image Classification using JavaScript

Shubham Vora
Updated on 07-Apr-2023 09:45:22

762 Views

The meaning of image classification is to extract as much information from the image as possible. For example, when you upload an image to Google photos, it extracts information from the image and suggests the location based on that. We can use OpenCV to detect every small information from the image and predict the image. Training and testing models from scratch using JavaScript requires lots of effort, and also, it requires the proper dataset containing the different images. So, in this tutorial, we will use the pre-trained model of ml5.js to classify the image. The ml5.js library contains various pre-trained ... Read More

Advertisements