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
Javascript Articles
Page 46 of 534
How to design a Loan EMI Calculator using HTML, CSS and JavaScript?
To design a Loan EMI Calculator, we will be using HTML to create the basic structure, CSS to design the user interface, and JavaScript to add functionality for calculating EMI based on loan amount, interest rate, and time period. In this article, we will understand the step-by-step process of creating a loan EMI calculator with a clean, interactive interface. Table of Contents Structuring Loan EMI Calculator using HTML Designing UI of Loan EMI Calculator using CSS Adding Functionalities using JavaScript ...
Read MoreHow to scale a Line object to a given width using FabricJS?
In this tutorial, we are going to learn how to scale a Line object to a given width using FabricJS. A Line element is one of the basic elements provided in FabricJS. It is used for creating straight lines. Because line elements are geometrically one-dimensional and do not contain an interior, they are never filled. We can create a line object by creating an instance of fabric.Line, specifying the x and y coordinates of the line and adding it to the canvas. In order to scale a Line object to a given width we use the scaleToWidth method. Syntax ...
Read MoreFabricJS – How to set a multiplier to scale by in the URL string of a Line object?
In this tutorial, we are going to learn about how to set a multiplier to scale by in the URL string of Line object using FabricJS. A Line element is one of the basic elements provided in FabricJS. It is used for creating straight lines. Because line elements are geometrically one-dimensional and do not contain an interior, they are never filled. We can create a line object by creating an instance of fabric.Line, specifying the x and y coordinates of the line and adding it to the canvas. In order to set a multiplier to scale by in the URL ...
Read MoreHow to Remove Duplicate Elements from an Array in JavaScript?
To remove duplicate elements from an array in JavaScript can be achieved using various approaches. We will be understanding six different approaches in this article, which can be used according to our requirement in various cases. In this article we are having a JavaScript array and our task is to remove duplicate elements from array in JavaScript. Original Array: ["apple", "banana", "apple", "orange", "banana", "grape"] ...
Read MoreFabricJS – How to set the position of a Line object with respect to origin?
In this tutorial, we are going to learn about how to set position of Line object with respect to origin using FabricJS. A Line element is one of the basic elements provided in FabricJS. It is used for creating straight lines. Because line elements are geometrically one-dimensional and do not contain an interior, they are never filled. We can create a line object by creating an instance of fabric.Line, specifying the x and y coordinates of the line and adding it to the canvas. In order to set the position of Line object with respect to origin we use the ...
Read MoreJavaScript array sorting by level
In this article, we will learn array sorting by level in JavaScript, creating a hierarchical tree structure from a flat array is a common challenge when dealing with relational data. This is a common task when dealing with hierarchical data, such as organizational charts, category trees, or file systems, where relationships like parent-child need to be represented. Problem Statement We have an array of objects representing nodes with _id, level, and parentId properties. Our goal is to transform this array into a tree structure where nodes are nested as children under their respective parents. The elements with the ...
Read MoreHow to set the angle of a Line in FabricJS?
In this tutorial, we are going to learn about how to set the angle of a Line object using FabricJS. A Line element is one of the basic elements provided in FabricJS. It is used for creating straight lines. Because line elements are geometrically one-dimensional and do not contain an interior, they are never filled. We can create a line object by creating an instance of fabric.Line, specifying the x and y coordinates of the line and adding it to the canvas. In order to set the angle of a line object we use the angle property. Syntax ...
Read MoreHow to set the angle of rotation of a Line using FabricJS?
In this tutorial, we are going to learn about how to set the angle of rotation of a Line using FabricJS. A Line element is one of the basic elements provided in FabricJS. It is used for creating straight lines. Because line elements are geometrically one-dimensional and do not contain an interior, they are never filled. We can create a line object by creating an instance of fabric.Line, specifying the x and y coordinates of the line and adding it to the canvas. The centeredRotation property allows us to use the center point of a line object as the ...
Read MoreConverting 12 hour Format Time to 24 hour Format in JavaScript
Converting 12 hour format time to 24 hour format in JavaScript can be easily achieved using various approaches which we will be discussing in this article. For conversion from 12 hour to 24 hour format we check for the modifier (AM or PM). Depending on the modifier we convert the time formats. In this article, we have specified a time at the beginning in 12 hour format. Our task is to convert 12 hour format time to 24 hour format in JavaScript. Approaches to Convert 12-hour Format to 24-hour Here is a list of approaches to convert ...
Read MoreJavaScript: How to return True if the focus is on the browser tab page?
In this article, we will learn to check if the browser tab page is focused and under use or not in JavaScript. This is mainly required to record the user's inactivity time on the app and then take any action upon it if required. Use Cases for Monitoring Browser Tab Focus Following are the use cases for monitoring browser tab focus and user inactivity: Prevent sending network requests if the page is not being used by the user as this reduces server traffic. Save server costs by reducing unnecessary resource ...
Read More