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 by Samual Sam
Page 38 of 151
Draw Lines with easelJS using Ticker in HTML
EaselJS is a JavaScript library that simplifies working with the HTML5 Canvas element. It's particularly useful for creating interactive graphics, animations, and games in web browsers. To draw animated lines using the Ticker method in HTML with EaselJS, you need to set up a stage, create shape objects, and use the Ticker to continuously update the canvas. Basic Setup First, create the HTML structure with a canvas element and include the EaselJS library: EaselJS Line Drawing ...
Read MoreDataView.byteOffset property in JavaScript
The byteOffset property of the DataView represents the offset (in bytes) from the start of the underlying ArrayBuffer where the DataView begins. Syntax Its syntax is as follows: dataView.byteOffset Return Value Returns a number representing the byte offset of the DataView from the beginning of its ArrayBuffer. Example 1: Basic byteOffset When creating a DataView without specifying an offset, the byteOffset property returns 0: JavaScript DataView byteOffset Example ...
Read MoreSet a dotted line for the border with CSS
To set a dotted line for the border in CSS, use the border-style property with the value dotted. This creates a border made up of small dots around the element. Syntax border-style: dotted; Example Here's how to create a dotted border using CSS: .dotted-border { border-width: 3px; ...
Read MoreSet the style of the border with CSS
To set the style of border, use the border-style property. The border-style property allows you to select one of the following styles of the border: none: No border solid: Border is a single solid line. dotted: Border is a series of dots. dashed: Border is a series of short lines. double: Border is two solid lines. groove: Border looks as though it is carved into the page. ridge: Border looks the opposite of groove. ...
Read MoreArrays Data Structure in Javascript
The array is a container which can hold a fixed number of items and these items should be of the same type. It stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type. Why do we need arrays? Let's say you want to record the average temperatures of all days of the week. You can record them as follows − let avgTempMon = 35; let ...
Read MoreEnable rear camera with HTML5
To enable the rear camera in HTML5, you need to access the device's camera sources and specify which camera to use. This is particularly useful on mobile devices that have both front and rear cameras. Getting Available Camera Sources First, use the MediaDevices.enumerateDevices() method to get all available media devices: Rear Camera Access Start Rear Camera async function getRearCamera() { ...
Read MoreUsage of border-top-style property in CSS
The border-top-style property changes the style of the top border of an element. This CSS property allows you to define different visual styles for the top border, such as solid, dashed, dotted, and more. Syntax border-top-style: value; Available Values The border-top-style property accepts the following values: none - No border (default) solid - A solid line dashed - A dashed line dotted - A dotted line double - Two solid lines groove - A 3D grooved border ridge - A 3D ridged border inset - A 3D inset border outset - A ...
Read MoreUsage of border-right-style property in CSS
The border-right-style property in CSS sets the line style of an element's right border. It determines how the right border appears, whether solid, dashed, dotted, or other styles. Syntax border-right-style: none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset; Property Values Value Description none No border (default) solid Single solid line dashed Series of dashes dotted Series of dots double Two solid lines groove 3D grooved appearance ridge ...
Read MoreMulti Dimensional Arrays in Javascript
Multi-dimensional arrays in JavaScript are arrays that contain other arrays as elements. They're useful when you need to organize data in rows and columns, like storing temperatures for each day of the week at different time intervals. Creating Multi-Dimensional Arrays Instead of creating separate arrays for each day: let monday = [35, 28, 29, 31]; let tuesday = [33, 24, 25, 29]; console.log("Monday temperatures:", monday); console.log("Tuesday temperatures:", tuesday); Monday temperatures: [ 35, 28, 29, 31 ] Tuesday temperatures: [ 33, 24, 25, 29 ] You can use a multi-dimensional array to ...
Read MoreUnicode Byte Order Mark (BOM) character in HTML5 document.
A byte order mark (BOM) consists of the character code U+FEFF at the beginning of a data stream, where it can be used as a signature defining the byte order and encoding form, primarily of unmarked plaintext files. In HTML5 documents, the BOM can help browsers automatically detect the file's encoding. What is a BOM? Many Windows programs (including Windows Notepad) add the bytes 0xEF, 0xBB, 0xBF at the start of any document saved as UTF-8. This is the UTF-8 encoding of the Unicode byte order mark (BOM), and is commonly referred to as a UTF-8 BOM even ...
Read More