
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
687 Views
A semaphore is used to control access to a shared resource when a process is being executed. This is done with the help of a counter. When this counter value is greater than 0, access to share resource is provided. On the other hand, if the value of counter is ... Read More

AmitDiwan
299 Views
Quantifier is a concept that allows the programmer to specify the number of occurrences of a specific type of value in the regular expression. There are different types of quantifiers, some of them include ‘?’ (Reluctant quantifier), ‘+’ (Possessive quantifier). In this post, we will see how reluctant quantifier works.ExampleFollowing ... Read More

AmitDiwan
12K+ Views
The parent class can hold reference to both the parent and child objects. If a parent class variable holds reference of the child class, and the value is present in both the classes, in general, the reference belongs to the parent class variable. This is due to the run-time polymorphism ... Read More

AmitDiwan
321 Views
Let’s say the following is our array with non-empty and empty values −studentDetails[2] = "Smith"; studentDetails[3] = ""; studentDetails[4] = "UK"; function arrayHasEmptyStrings(studentDetails) { for (var index = 0; index < studentDetails.length; index++) {To check arrays for empty strings, the syntax is as follows. Set such condition for checking ... Read More

AmitDiwan
745 Views
NavigableMap is an extension of the SortedMap collection framework. It is used to arrange the elements in a uniform fashion. NavigableMap has different methods to iterate over the elements in the Map.ExampleFollowing is an example − Live Demoimport java.util.NavigableMap; import java.util.TreeMap; public class Demo { public static void main(String[] args) ... Read More

AmitDiwan
3K+ Views
For this, extract the time of specific date time and call the function using setTimeout(). The code is as follows −Example Live Demo Document function timeToAlert() { alert("The time is 9:36 AM"); } ... Read More

AmitDiwan
525 Views
Let’s say the following is our array with non-null, null and undefined values −var firstName=["John", null, "Mike", "David", "Bob", undefined];You can check for undefined or null cases by using the following code −Examplevar firstName=["John", null, "Mike", "David", "Bob", undefined]; for(var index=0;index node demo203.js John Mike David BobRead More

AmitDiwan
163 Views
Let’s say the following is our array;var theValuesIn3DArray = [75, [18, 89], [56, [97], [99]]];Use the concept of flat() within the Math.max() to get the largest number.Examplevar theValuesIn3DArray = [75, [18, 89], [56, [97], [99]]]; Array.prototype.findTheLargestNumberIn3dArray = function (){ return Math.max(...this.flat(Infinity)); } console.log("The largest number in 3D array is="); ... Read More

AmitDiwan
436 Views
For reaching the back page on button click, use the concept of −window.history.go(-1)Example Live Demo Document To run the above program, save the file name “anyName.html(index.html)” and right click on the file. Select the option ... Read More

AmitDiwan
210 Views
Following is the code −Examplefunction multiplication(firstValue, secondValue, callback) { var res = firstValue * secondValue; var err = isNaN(res) ? 'Something is wrong in input parameter' : undefined; callback(res, err); } multiplication(10, 50, function (result, error) { console.log("The multiplication result="+result); if (error) { ... Read More