Articles on Trending Technologies

Technical articles with clear explanations and examples

HTML DOM Input DatetimeLocal max Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 186 Views

The HTML DOM Input DatetimeLocal max property returns/sets max attribute of Input DatetimeLocal.SyntaxFollowing is the syntax −Returning string valueinputDatetimeLocalObject.maxSetting max to string valueinputDatetimeLocalObject.max = YYYY-MM-DDThh:mm:ssString ValuesHere, “YYYY-MM-DDThh:mm:ss” can be the following −stringValueDetailsYYYYIt defines year (eg:2006)MMIt defines month (eg: 06 for June).DDIt defines Day (eg: 17)TIt is a separator for date and timehhIt defines hour (eg:02)mmIt defines minutes (eg:21)ssIt defines seconds (eg:40)ExampleLet us see an example of Input DatetimeLocal max property − Input DatetimeLocal max    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * { ...

Read More

HTML DOM Kbd Object

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 152 Views

The Kbd Object represents an inline element which displays monospace font by default.SyntaxFollowing is the syntax −Creating a elementvar kbdObject = document.createElement(“KBD”)ExampleLet us see an example for Kbd object element − Kbd Object    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } Kbd Object Keyboard Input:    var divDisplay = document.getElementById("divDisplay");    var textSelect = document.getElementById("textSelect");    function convertKBD() {       var kbdObject = document.createElement("KBD");       var kbdText = document.createTextNode(textSelect.value);       kbdObject.appendChild(kbdText);       divDisplay.appendChild(kbdObject);    } OutputThis will produce the following output −Before clicking ‘Check’ button −After clicking ‘Check’ button −

Read More

HTML DOM Input Password disabled Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 213 Views

The HTML DOM Input Password disabled property is used for setting or returning whether the password field is disabled or not. It uses boolean values with true representing the element should be disabled and false otherwise. The disabled property is set to false by default. The disabled element is greyed out by default and is unclickable.SyntaxFollowing is the syntax for −Setting the disabled property −passwordObject.disabled = true|false;Here, true=password field is disabled and false=the password field is not disabled. It is false by default.ExampleLet us look at an example for the Input password disabled property − Input Password disabled ...

Read More

Difference between an Iterator and ListIterator in Java

Nitin Sharma
Nitin Sharma
Updated on 11-Mar-2026 1K+ Views

Java provided these two interfaces to traverse the data one by one stored in a collection. The internal implementation of iterator and list iterator makes them differ apart but the main agenda of both the iterators is the same.The following are the important differences between Iterator and ListIterator.Sr. No.KeyIteratorListIterator1ApplicableIterator can be used to traverse any collection irrespective of the type of collection.List iterator can only be used to iterate only List collection implemented classes like arraylist, linkedlist etc.2CallingAs mentioned Iterator must be used to enumerate elements in all Collections implemented interfaces like Set, List, Queue, Deque and also in all ...

Read More

Check if a number has same number of set and unset bits in C++

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Mar-2026 303 Views

In this section we will check whether a number has same number of set bits and unset bits or not. Suppose the number 12 is there. Its binary representation is 1100. This has same number of 0s and 1s.The approach is simple. We will check each bit of the number, and if that is 1, then increase set_bit_count, and if it is 0, then increase unset_bit_count. Finally, if they are same, then return true, otherwise false.Example#include using namespace std; bool hasSameSetUnset(int n) {    int set_count = 0, unset_count = 0;    while(n){       if((n & 1) ...

Read More

C++ bitset and its application ?

sudhir sharma
sudhir sharma
Updated on 11-Mar-2026 579 Views

A bitset is a dataset that stores multiple boolean values but takes lesser memory space as compared to other data sets that can store a sequence of bits like a boolean array or boolean vector.Bitsets stores the binary bits in a form that takes less memory space, it stores them in compressed from. Accessing any element is same as others i.e. by using its index value i.e. bitset_name[index]. But the indexing of elements in a bitset is reverse. Let’s take an example, for bitset {01101001} the element at 0th index is 1 and so on. So 0’s are at index ...

Read More

HTML DOM Input DatetimeLocal min Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 209 Views

The HTML DOM Input DatetimeLocal min property returns/sets min attribute of Input DatetimeLocal.SyntaxFollowing is the syntax −Returning string valueinputDatetimeLocalObject.minSetting min to string valueinputDatetimeLocalObject.min = YYYY-MM-DDThh:mm:ssString ValuesHere, “YYYY-MM-DDThh:mm:ss” can be the following −stringValueDetailsYYYYIt defines year (eg:199)MMIt defines month (eg: 07 for July)DDIt defines Day (eg: 11)TIt is a separator for date and timehhIt defines hour (eg:08)mmIt defines minutes (eg:18)ssIt defines seconds (eg:23)ExampleLet us see an example of Input DatetimeLocal min property − Input DatetimeLocal min    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * { ...

Read More

HTML DOM KeyboardEvent charCode Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 154 Views

The KeyboardEvent charCode property returns the unicode character codes corresponding to character that was pressed using an event.Note − Use key property instead for accurate resultsSyntaxFollowing is the syntax −Returning latest typed character’s charCode −event.charCodeExampleLet us see an example for KeyboardEvent charCode property − KeyboardEvent charCode    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } KeyboardEvent-charCode Fill in ...

Read More

HTML DOM Input Password form Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 206 Views

The HTML DOM Input Password form property is used for returning the form reference that contains the input password field. If the input password field is outside the form then it will simply return NULL. This property is read-only.SyntaxFollowing is the syntax for input password form property.passwordObject.formExampleLet us look at an example for the Input Password form property − Input Password form Property Password: Get the form id by clicking on the below button GET FORM    function formId() {       var P=document.getElementById("PASS").form.id;       document.getElementById("Sample").innerHTML = "The id of ...

Read More

Check if a given number is Pronic in C++

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Mar-2026 935 Views

Here we will see, how to check whether a number is Pronic number or not. A number that can be arranged to form a rectangle, are called the pronic numbers. First few pronic numbers are: 0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 156, 182, 210, 240, 272, 306, 342. The pronin numbers are product of two consecutive integers. So a pronic number n = x * (x + 1).Here we will check and generate some pronic numbers.Example#include #include using namespace std; bool isPronicNumber(int num) {    for (int i = 0; i

Read More
Showing 8341–8350 of 61,248 articles
« Prev 1 833 834 835 836 837 6125 Next »
Advertisements