Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
JavaScript Program for Searching an Element in a Linked List
To search for an element in a linked list, we need to go through each node one by one and check if its value matches the target element. If we find the element, we return its position in the list. If not, we return a message saying the element is not found. In this article, our task is to implement a JavaScript program that searches for a specific element in a linked list and returns its position if found, or a message if it is not present. Example Let's look at the below examples: Linked ...
Read MoreWhich One is Better for Game Development—Python or JavaScript?
Aspiring game developers often face the dilemma of choosing the right programming language for their projects. Two popular contenders in the game development realm are Python and JavaScript. In this article, we will explore the strengths and weaknesses of each language, discuss their suitability for different types of games, and help you determine which language is the better choice for your game development journey. Python: The Versatile Giant Python has earned its reputation as a flexible, beginner-friendly language with a rich ecosystem of libraries and frameworks. Its clean syntax, readability, and ease of use have made it a ...
Read MoreHow to Build a REST API with Fastify?
Fastify is a high-performance web framework designed for Node.js backend development. Known for its lightweight architecture and impressive speed, Fastify positions itself as a faster alternative to popular frameworks like Express, Koa, and Hapi. What sets Fastify apart is its plugin-centric architecture—everything is treated as a plugin, allowing for better modularity and code reusability. This approach enables developers to encapsulate functionality and distribute it across projects efficiently. In this tutorial, we will explore how to build a complete REST API with Fastify, covering: Creating a basic Fastify server Defining API routes with proper controllers Implementing schema ...
Read MoreHow to check for two timestamps for the same day in JavaScript?
The Date object is essential in JavaScript applications for creating and manipulating dates according to developer requirements. A common requirement is checking whether two timestamps represent the same day, which is useful for features like daily task tracking or date-based user activity validation. In this tutorial, we will learn three different approaches to check whether two timestamps are for the same day. This is particularly useful when you need to compare a user's last activity date with the current date. Using getFullYear(), getMonth(), and getDate() Methods The most straightforward approach is to compare the year, month, and ...
Read MoreJavaScript Program to Check if all rows of a matrix are circular rotations of each other
A matrix in JavaScript is a 2-dimensional array where each row contains a fixed number of elements. In this tutorial, we'll learn how to check if all rows of a matrix are circular rotations of each other, meaning we can transform any row into another through left or right rotations. Circular rotation means shifting elements: rotating [1, 2, 3] right gives [3, 1, 2], and rotating left gives [2, 3, 1]. Problem Understanding Given a matrix, we need to determine if every row can be converted to the first row through circular rotations. Example 1 ...
Read MoreHow to Bundle up JavaScript Files using Rollup.js?
In this tutorial, we will understand how to use Rollup.js to bundle JavaScript files. Before we do that, the first step is to get familiar with the JavaScript module bundler called Rollup, which compiles files from multiple sources into a single bundle. Rollup is similar to webpack and Browserify. It is more popular than many other bundlers because of its ability to keep files small even after bundling them into a single unit. There are multiple features that Rollup brings to the table, some of them are mentioned below − Development is easier to manage when you ...
Read MoreJavaScript program for Shortest Un-Ordered SubarrayJavaScript program for Shortest Un-Ordered Subarray
The problem statement requires finding the shortest un-ordered subarray in an array of integers. In other words, we need to identify the smallest subarray in which the elements are not sorted in ascending or descending order. This problem can be solved through various approaches, but in this article, we will discuss a simple and efficient solution using JavaScript. So first we will start by defining what an un-ordered Subarray is, then understand the problem statement in detail and then proceed to explain the step-by-step solution using examples and code snippets. By the end of this article, you will have ...
Read MoreHow to Scrape a Website using Puppeteer.js?
Web scraping is one of the best ways to automate the process of data collection from the web. A web scraper, often called a "crawler, " surfs the web and extracts data from selected pages. This automation is much easier than manually extracting data from different web pages and provides a solution when websites don't offer APIs for data access. In this tutorial, we will create a web scraper in Node.js using Puppeteer.js to extract book information from a sample website. What is Puppeteer.js? Puppeteer is a Node.js library that provides a high-level API to control Chrome ...
Read MoreHow to Filter Object by Keys in Lodash?
Sometimes while working with objects in JavaScript we want to filter objects based on keys. We can easily do this by using Lodash, a popular JavaScript library that provides several inbuilt functions to achieve this easily. In this article, we are going to discuss how we can Filter Objects by Keys using Lodash. Prerequisite Lodash: Lodash is a popular JavaScript library used to deal with a variety of functions such as arrays, objects, strings, and more. Install Lodash We can install the Lodash library in the project by adding it via CDN ...
Read MoreWorking with Excel Files using Excel.js
Excel.js is a powerful Node.js library for reading, manipulating, and writing Excel files. It supports both XLSX and CSV formats, making it ideal for data processing applications. Installation To install Excel.js in your Node.js project, run the following command: npm install exceljs Once installed, you can start working with Excel files programmatically. All examples in this tutorial work with XLSX (Open XML Spreadsheet) files. Working with Excel Cells The getCell() method allows you to access individual cells by reference or coordinates. Here's how to read cell values: const Excel = ...
Read More