How to sort an array in JavaScript using Quick Sort Algorithm?

How Quick Sort Algorithm works? The following steps explain how quicksort works. First, select an element – as a pivot element Compare all elements with the selected pivot element and arrange these in an order such that the elements less than the pivot element are placed on its left side and elements greater than the... » read more

File Handling in Java

Java offers all the basic functionalities in file handling such as: Create Read Write Delete Before you begin with any of the file handling operations, you must import the java.io.File package, and then you have to create a Java file object. Apart from this, refer to the table below in order to learn all the... » read more

Polymorphism in Java

  Now, in both the subclasses, the “material” method will be used, and with polymorphism, it is possible to use the same method “material” of parent class in both the subclass. In Java, there are two types of Polymorphism available. Static Polymorphism Dynamic Polymorphism In this tutorial, you’ll learn about both of these with appropriate... » read more

Introduction to Java Applets for Beginners

In Java, Applets is a program that can run on a Web Page. Applet runs in a browser, and it can be embedded in the web browser (HTML page) using the Object tag. Applet makes Java more compatible and allows it to create dynamic web pages. Java Applet has a life cycle with appropriate methods... » read more

An introduction to TinyXML2 parser using C++ ( Read – Insert)

C++, without any doubt, is the most popular programming language that can be found literally everywhere. since its birthdate in 1985, C++ has been the base language for learners, engineers, scientists, and researchers. In some instances, an application written in C++ may require saving and retrieve data that is located in an XML file. There... » read more

Object-oriented vs. component-based design in software development

In this article, I am going to talk about the two concepts that may seem similar at so many levels. Like in .NET and Java, the class is also a component. Component and Objects also share a few properties, including reusability, encapsulation, minimal dependencies, etc. Component-based design primarily focuses on the decomposition of the design... » read more

How to perform DNS lookup on a domain name in PHP?

PHP offers a built-in function dns_get_record() to fetch DNS resource information associated with a domain name. Syntax of dns_get_record() The following is the syntax of dns_get_record() function. dns_get_record ( string $hostname [, int $type = DNS_ANY [, array &$authns [, array &$addtl [, bool $raw = FALSE ]]]] ) : array This function takes a... » read more

Design patterns every developer should know about

Design patterns are reusable solutions to problems that we often face as software engineers. It is not a component or class that can be reusable. It is more like a statement of the problem and solution that works best for that specific problem. The design patterns can be used as a plug-n-play part of the... » read more

Arrow Functions in JavaScript

One of the most admired features in modern JavaScript is the introduction of arrow functions, using the new => token. And in this tutorial, I will be teaching you the fundamentals of writing arrow functions. The arrow functions are easy to write, require less typing, and more intuitive scoping due to “this” binding. Syntax of... » read more

How to remove duplicates from an array of integers in C++?

The following piece of code traverses the list of integers, removes duplicate numbers, if any, and returns the remaining list. #include <iostream> #include <vector> #include <algorithm> void removeDuplicates(std::vector<int> &list) { auto end = list.end(); for (auto i = list.begin(); i != end; ++i) { end = std::remove(i + 1, end, *i); } list.erase(end, list.end()); }... » read more