Chandu yadav

Chandu yadav

810 Articles Published

Articles by Chandu yadav

Page 18 of 81

How to convert a binary NodeJS Buffer to JavaScript ArrayBuffer?

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 920 Views

Converting a binary NodeJS Buffer to JavaScript ArrayBuffer is a common requirement when working with binary data across different JavaScript environments. There are multiple approaches to achieve this conversion. Method 1: Using buf.buffer Property (Direct Access) The simplest approach is to access the buf.buffer property directly. However, this creates a view of the underlying ArrayBuffer, not a copy. const buffer = Buffer.from([1, 2, 3, 4, 5]); console.log("Original Buffer:", buffer); // Direct access to underlying ArrayBuffer const arrayBuffer = buffer.buffer; console.log("ArrayBuffer byteLength:", arrayBuffer.byteLength); // Create Uint8Array view to inspect data const uint8View = new Uint8Array(arrayBuffer); ...

Read More

How to perform Automated Unit Testing with JavaScript?

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 281 Views

To perform automated unit testing in JavaScript, Unit.js is a cross-platform open-source unit testing framework that provides a simple and intuitive API for testing JavaScript applications. What is Unit.js? Unit.js is a JavaScript testing framework that works in both Node.js and browsers. It offers a fluent interface for writing readable test assertions and supports various testing patterns. Basic Syntax Unit.js uses a chainable syntax where you specify the data type and then chain assertion methods: test.dataType(value).assertionMethod(expectedValue); Simple String Testing Example Here's a basic example of testing a string value: ...

Read More

Usage of -moz-opacity property with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 857 Views

The -moz-opacity property was a Mozilla-specific CSS property used to set the opacity of HTML elements, including images. This property created transparent effects in older Firefox browsers before the standard opacity property was widely supported. Browser-Specific Opacity Properties Different browsers historically required different approaches for opacity: Mozilla Firefox: -moz-opacity Internet Explorer: filter: alpha(opacity=x) Modern browsers: opacity (standard) Syntax /* Legacy Mozilla syntax */ -moz-opacity: value; /* IE filter syntax */ filter: alpha(opacity=value); /* Modern standard syntax */ opacity: value; The value ranges from 0 (completely transparent) to 1 ...

Read More

Usage of CSS border-collapse property

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 80 Views

The border-collapse CSS property controls how adjacent table cell borders are displayed. It determines whether borders should merge together or remain separate. Syntax border-collapse: collapse | separate | initial | inherit; Values Value Description collapse Adjacent borders are merged into a single border separate Each cell maintains its own borders (default) initial Sets to default value (separate) inherit Inherits from parent element Example Here's a comparison showing both collapse and separate values: ...

Read More

Change the style of left border with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 155 Views

The border-left-style property in CSS allows you to change the style of an element's left border. This property accepts various values like solid, dashed, dotted, double, and more to create different visual effects. Syntax border-left-style: value; Available Border Styles The border-left-style property accepts several values: solid - A single solid line dashed - A series of dashes dotted - A series of dots double - Two parallel lines groove - A 3D grooved border ridge - A 3D ridged border inset - A 3D inset border outset - A 3D outset border ...

Read More

Raise the Mobile Safari HTML5 application cache limit?

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 757 Views

Mobile Safari imposes specific limits on HTML5 application cache storage, unlike desktop Safari which has no strict limits. Understanding these constraints is crucial for mobile web development. Mobile Safari Cache Limits The default application cache limit on mobile Safari is 5MB. This applies to the overall cache storage allocated to your web application. Desktop Safari No Limit Unlimited Cache Mobile Safari 5MB Limit ...

Read More

Usage of border-bottom-color property in CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 72 Views

The border-bottom-color CSS property sets the color of an element's bottom border. It only affects the color when a border style is already defined. Syntax border-bottom-color: color | transparent | inherit; Parameters The property accepts these values: color - Any valid CSS color value (hex, RGB, named colors) transparent - Makes the border invisible inherit - Inherits the color from parent element Example: Basic Usage ...

Read More

Usage of border-left-style property in CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 160 Views

The border-left-style property defines the style of an element's left border. It accepts various values like solid, dashed, dotted, double, and more to create different visual effects. Syntax border-left-style: value; Available Values Value Description none No border (default) solid Solid line dashed Series of dashes dotted Series of dots double Two parallel lines groove 3D grooved effect ridge 3D ridged effect Example: Different Border Styles ...

Read More

Make HTML5 Canvas fill the whole page

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 3K+ Views

To make an HTML5 canvas fill the entire browser viewport, you need to remove default margins/padding and set the canvas dimensions to 100% of the page. CSS Setup First, reset the default browser styles and set up the HTML structure: * { margin: 0; padding: 0; } body, html { height: 100%; overflow: hidden; /* Prevents scrollbars */ } #canvas { position: absolute; top: 0; left: 0; ...

Read More

Usage of border-bottom-width property in CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 71 Views

The border-bottom-width property sets the thickness of an element's bottom border. It only takes effect when border-style is defined, as borders need a style to be visible. Syntax border-bottom-width: value; Values The property accepts the following values: thin - A thin border (typically 1px) medium - A medium border (typically 3px) thick - A thick border (typically 5px) length - Custom width in px, em, rem, etc. inherit - Inherits from parent element Example with Different Widths ...

Read More
Showing 171–180 of 810 articles
« Prev 1 16 17 18 19 20 81 Next »
Advertisements