Check If a Checkbox Is Checked in JavaScript

Shubham Vora
Updated on 06-Sep-2023 14:13:45

53K+ Views

In this tutorial, we will learn to check whether a checkbox is checked in JavaScript. The checkbox is the input type in the HTML, which works as the selection box. The radio buttons which belong to the same group allow users to select only one value. Still, the checkbox which belongs to the same group allows users to select multiple values. Also, you have many uses of checkboxes in your mind yourself. The HTML can add a checkbox to the webpage, but to add the behaviour to the checkbox, we must use JavaScript. Programmers can add different behaviours to the ... Read More

Check if a String Contains a Number Using Java

Anjana
Updated on 06-Sep-2023 14:07:32

41K+ Views

To find whether a given string contains a number, convert it to a character array and find whether each character in the array is a digit using the isDigit() method of the Character class.ExampleLive Demopublic class ContainsExample {    public static void main(String args[]){       String sample = "krishna64";       char[] chars = sample.toCharArray();       StringBuilder sb = new StringBuilder();       for(char c : chars){          if(Character.isDigit(c)){             sb.append(c);          }       }       System.out.println(sb);    } }Output64

Table Rowspan and Colspan in HTML

Lokesh Badavath
Updated on 06-Sep-2023 14:05:41

44K+ Views

The rowspan and colspan are the attributes of tag. These are used to specify the number of rows or columns a cell should merge. The rowspan attribute is for merging rows and the colspan attribute is for merging columns of the table in HTML. These attributes should be placed inside the tag as shown in the image given below − Syntax Following is the syntax to merge table cells in HTML − cell data cell data Example 1 − Setting the rowspan Now let us look at an example where we set the rowspan of the ... Read More

Change Text Font in HTML

Sai Subramanyam
Updated on 06-Sep-2023 14:02:36

47K+ Views

To change the text font in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML tag, with the CSS property font-family, font-size, font-style, etc.HTML5 do not support the tag, so the CSS style is used to change font. The tag deprecated in HTML5.Just keep in mind, the usage of style attribute overrides any style set globally. It will override any style set in the HTML tag or external style sheet.ExampleYou can try to run the following code to change the font in HTMLLive ... Read More

Remove Existing HTML Elements in JavaScript

Lokesh Yadav
Updated on 06-Sep-2023 13:57:02

47K+ Views

This article discusses about how to delete an existing element in JavaScript. To remove the existing HTML elements, we first need to select the element to be deleted from the document. Then, use the methods like remove() and removeChild() in JavaScript to delete the elements from the document. We’ll discuss about both methods in this article. Using the remove() methodThe remove() method of JavaScript will remove the element from the document. The syntax for the remove method is shown below. Obj.remove(); Using removeChild() methodThe removeChild() method of JavaScript will remove the element from the document. The syntax for the ... Read More

Definite Numerical Integration Using quad in MATLAB

Manish Kumar Saini
Updated on 06-Sep-2023 13:36:50

251 Views

In this tutorial, we will learn how to calculate definite numerical integration using Quad function in MATLAB. But before that, let us first understand what is definite numerical integration. What is Definite Numerical Integration? In mathematics, a method of determining the approximate value of the definite integral of a function over a certain interval is termed as definite numerical integration. Where, the definite integral specifies the signed area under the curve of a function within the specified interval. The definite numerical integration is beneficial in approximating the value of a definite integral of a function when it is not possible ... Read More

Flag Register of 8086 Microprocessor

Arjun Thakur
Updated on 06-Sep-2023 13:34:45

51K+ Views

The flag register is one of the special purpose register. The flag bits are changed to 0 or 1 depending upon the value of result after arithmetic or logical operations.8086 has 16-bit flag register, and there are 9 valid flag bits. The format of flag register is like below.BitsD15D14D13D12D11D10D9D8D7D6D5D4D3D2D1D0Flags    ODITSZ AC P CY We can divide the flag bits into two sections. The Status Flags, and the Control Flags.Status FlagsIn 8086 there are 6 different flags which are set or reset after 8-bit or 16-bit operations. These flags and their functions are listed below.Flag BitFunctionSAfter any operation if the MSB is 1, then it indicates ... Read More

Cubic Spline Data Interpolation in MATLAB

Manish Kumar Saini
Updated on 06-Sep-2023 13:33:40

491 Views

In mathematics, the cubic spline data interpolation is a way of calculating values between data points of a given data set. This technique is widely used when we want to plot a smooth curve passing through these data points. In MATLAB, we can calculate the cubic spline data interpolation by using any of two built-in functions namely, 'spline' or 'interp1'. Syntax Where, the syntax of the 'spline' function is, I = spline(x, y, query); Here, 'x and 'y' are the vectors containing input data points required for interpolation, and 'query' is the vector that contains data points at which ... Read More

Passing Two-Dimensional Array to a C++ Function

Govinda Sai
Updated on 06-Sep-2023 13:28:22

46K+ Views

C++ does not allow to pass an entire array as an argument to a function. However, You can pass a pointer to an array by specifying the array's name without an index. There are three ways to pass a 2D array to a function −Specify the size of columns of 2D arrayvoid processArr(int a[][10]) {    // Do something }Pass array containing pointersvoid processArr(int *a[10]) {    // Do Something } // When callingint *array[10]; for(int i = 0; i < 10; i++)    array[i] = new int[10]; processArr(array);Pass a pointer to a pointervoid processArr(int **a) {    // ... Read More

Master AI for Powerful Data Analysis

Devang Delvadiya
Updated on 06-Sep-2023 13:24:26

244 Views

Data holds essential information that informs decision−making in many different disciplines in the modern world. However, employing conventional methods might be challenging when working with a large volume of complicated data. Artificial intelligence (AI), a potent tool that has transformed how we analyze data, enters the picture in this situation. Organizations can use AI to find hidden patterns and trends and improve decisions. In this article, the impact of AI on data analysis is examined using case studies from India's healthcare, financial, agricultural, governance, and educational sectors. India's innovation landscape is changing as a result of AI, creating a bright ... Read More

Advertisements