The HTML DOM Input Reset name property is used for setting or returning the name attribute of a reset button. The name attribute helps in identifying the form data after it has been submitted to the server.SyntaxFollowing is the syntax for −Setting the name property −resetObject.name = nameHere, name is for specifying the reset button name.ExampleLet us look at an example for the Reset name property − Input range name Property UserName: Location: Change the name of the above reset button by clicking the below button CHANGE NAME function ... Read More
The HTML DOM form method property is associated with the method attribute of a form element. This property is used for specifying how the form data should be sent to the server. The address to send data is specified by the action attribute. This property sets or gets the form method property value.SyntaxFollowing is the syntax for −Setting the method property −formObject.method = get|post;Here, get is the default method and appends the form-data to the url. Eg: URL?name=value&name=value. It is usually not secure and can be used for data that is not private. The user can see the data being ... Read More
The HTML DOM Form length property is used for returning the number of elements that are present inside the form. It is a read-only property.SyntaxFollowing is the syntax of the Form length property −ormObject.lengthExampleLet us look at an example of the Form length property − form{ border:2px solid blue; margin:2px; padding:4px; } function getLength() { var len=document.getElementById("FORM1").length ; document.getElementById("Sample").innerHTML = "Number of elements present inside the form are :"+len; } Form length property example ... Read More
A bidirectional search is a searching technique that runs two way. It works with two who searches that run simultaneously, first one from source too goal and the other one from goal to source in a backward direction. In in an optimal state, both the searches will meet in the middle off the data structure.The bidirectional search algorithm works on a directed graph to find the shortest path between the source(initial node) to the goal node. The two searches will start from their respective places and the algorithm stops when the two searches meet at a node.Importance of the bidirectional ... Read More
The iterators that have the privilege to access the sequence of elements of a range from both the directions that are from the end and from the beginning are known as bidirectional iterators. iterators can work on data types like list map and sets.Bidirectional iterators have the same properties as forwarding iterators, with the only difference that they can also be decremented −propertyvalid expressionsIs default-constructible, copy-constructible, copy-assignable and destructibleX a;X b(a);b = a;Can be compared for equivalence using the equality/inequality operators (meaningful when both iterator values iterate over the same underlying sequence).a == ba != bCan be dereferenced as an ... Read More
The HTML DOM Form action property is associated with the action attribute of the form element. The form action property specifies the web page to send the form data after being submitted by the user. This attribute is called after the form has been submitted to specify where to submit the form.SyntaxFollowing is the syntax for −Set the Form action property −formObject.action = URLHere, the URL specifies the address to send the form data to. It can be an absolute URL or a relative URL.ExampleLet us look at an example of the form action property − ... Read More
The HTML DOM Form acceptCharset property is associated with the accept-Charset attribute of the element. This property is used for setting and getting the accept-Charset attribute value of a form. It returns the character encoding in the string type.If accept-Charset value is not specified it will return UNKNOWN which indicate that the character encoding is set to the character encoding of the current HTML document.SyntaxFollowing is the syntax for −Setting the acceptCharset property −formObject.acceptCharset = character-setHere, the character-set is the list separated by semicolon or space indicating one or more of the character encoding value. Some of the most ... Read More
Pigeonhole Sort is an example of the non-comparison sorting technique. It is used where the number of items and the range of possible key values is approximately the same.To perform this sort, we need to make some holes. The number of holes needed is decided by the range of numbers. In each hole, items are inserted. Finally deleted from the hole and stored into an array for sorted order.Pigeonhole sorting, also known as count sort, is a sorting algorithm that is suitable for sorting lists of elements where the number of elements (n) and the number of possible key values ... Read More
Prime Factor− In number theory, the prime factors of a positive integer are the prime numbers that divide that integer exactly. The process of finding these numbers is called integer factorization, or prime factorization.Example− Prime factors of 288 are: 288 = 2 x 2 x 2 x 2 x 2 x 3 x 3Input: n = 124 Output: 31 is the largest prime factor!ExplanationYou will find all the prime factors of a number and find the largest of them. The prime factors 124 = 2 x 2 x 31. and 31 is the largest of them.Example#include int main() { ... Read More
Vector is a template class and is C++ only construct whereas arrays are built-in language construct and present in both C and C++.Vector are implemented as dynamic arrays with list interface whereas arrays can be implemented as statically or dynamically with primitive data type interface.Differences between a Vector and an ArrayA vector is a dynamic array, whose size can be increased, whereas THE array size can not be changed.Reserve space can be given for vector, whereas for arrays you cannot give reserved space.A vector is a class whereas an array is a datatype.Vectors can store any type of objects, whereas ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP