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 267 of 534
How to set whether the image-border should be repeated, rounded or stretched with JavaScript?
This tutorial will teach us to set whether the border image should be repeated, rounded, or stretched with JavaScript. Use the borderImageRepeat property to set whether the image-border is to be repeated, rounded, or stretched. Borders are used to decorate or focus an element. You can define its width, color, and type of border. Various styles can be applied to the borders. But, these borders are without any special effects or any other designs. Using the border-image property, we can set an image as a border of an element. It does not look like a line. It will ...
Read MoreHow can I escape HTML special chars in JavaScript?
HTML contains special characters such as '', '/' and many more such as single and double quotes. These special characters are used for HTML tags, such as '' are used to close HTML tags. This tutorial teaches us to escape HTML special characters in JavaScript. Now, the question is what if we want to use these characters inside the HTML content? If we use special characters normally in HTML content, it considers them as opening or closing HTML tags and produces an unknown error. For example, we need to render the below string to the browser: ...
Read MoreHow to set the direction of the flexible items with JavaScript?
In this tutorial, we will learn how to set the direction of the flexible items with JavaScript. The direction of the flexible items can be set using the flex-direction property of CSS. It defines how the flexible items will be placed in the flex container. Its default value is set to 'row', but it can have other values like 'column', 'row-reverse' etc. To set the direction of the flexible items with JavaScript, we have multiple ways, and in this tutorial, we will discuss two of them − Using the style.flexDirection Property ...
Read MoreSet how the item will shrink relative to the rest with JavaScript?
In this tutorial, let us look at the way to set how much the item will shrink relative to the rest of the elements in JavaScript. To set item shrink relative to the rest of the elements, we can utilize JavaScript's flexShrink property. Let's take a quick look at this. Using the Style flexShrink Property The flexShrink property specifies how much a flex item will shrink according to the other items in the same container. The element must be flexible for the flexShrink property to function. The property's value functions as a ratio. For instance, if ...
Read MoreClient-side image processing with HTML
Client-side image processing allows you to manipulate images directly in the browser using HTML, CSS, and JavaScript without server uploads. This approach provides instant feedback and reduces server load. HTML Structure for Image Processing Start with a basic HTML structure that includes file input and canvas elements: Client-side Image Processing Image Processing Demo ...
Read MoreSplitting and uploading extremely large files to Amazon S3
When dealing with extremely large files (10+ GB), uploading directly to Amazon S3 can be challenging due to network timeouts and bandwidth limitations. Amazon S3's multipart upload feature provides a robust solution by splitting large files into smaller chunks that can be uploaded independently and in parallel. How Multipart Upload Works The process involves three main steps: Initiate: Start a multipart upload session with S3 Upload Parts: Split the file into chunks and upload each part independently Complete: Combine all parts into the final object ...
Read MoreStack Data Structure in Javascript
In this article, we are going to discuss the stack data structure in JavaScript. A stack is an Abstract Data Type (ADT), commonly used in most programming languages. It is named stack as it behaves like a real-world stack, for example – a deck of cards or a pile of plates, etc. Element 1 (Top) Element 2 Element 3 Element 4 (Bottom) LIFO ...
Read MoreQueue Data Structure in Javascript
In this article, we are going to discuss the queue data structure in JavaScript. It is a linear data structure where the enqueue and dequeue of elements follow the FIFO (first in first out) principle. The queue is open at both ends - one end is used to insert data (enqueue) and the other is used to remove data (dequeue). We use two pointers: rear for insertion and front for removal. A real-world example of the queue can be a single-lane one-way road, where the vehicle that enters first, exits first. Other examples include printer job queues, task scheduling, ...
Read MoreThe Priority Queue in Javascript
In this article, we are going to discuss the priority queue data structure in JavaScript. A priority queue is an abstract data type (ADT) which is like a regular queue or stack data structure, but where additionally each element has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority. If two elements have the same priority, they are served according to their order in the queue. How Priority Queue Works Priority queues maintain elements in sorted order based on their priority values. Lower priority ...
Read MoreTypes of Linked List in Javascript
A linked list is a dynamic data structure where elements (nodes) are connected through pointers rather than stored in contiguous memory locations. Unlike arrays, linked lists allow efficient insertion and deletion without memory waste, as memory is allocated as needed. JavaScript supports three main types of linked lists: Singly Linked List − Navigation is forward-only through next pointers Doubly Linked List − Bidirectional navigation with both next and previous pointers Circular Linked List − The last node connects back to the first node, forming a loop ...
Read More