Samual Sam has Published 2492 Articles

Atomics.xor() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 10:19:19

102 Views

The Atomic object of JavaScript is an object and which provides atomic operations such as add, sub, and, or, xor, load, store etc. as static methods, these methods are used with SharedArrayBuffer objects.The xor() function of the atomic object accepts a number and the position and, performs an xor operation ... Read More

DataView.byteOffset property in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 10:18:10

58 Views

The byteOffset property of the DataView represents the offset of the current DataView.SyntaxIts syntax is as followsdataView.byteOffset();ExampleTry the following example. Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(114);       var dataView = new DataView(arrayBuffer);       document.write(dataView.buffer.byteLength);     Output114

DataView.getFloat64() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 10:16:32

73 Views

The getFloat64() function of the DataView gets and returns a signed 64-bit floating point number at the specified position.SyntaxIts syntax is as followsdataView.getFloat64();ExampleTry the following example. Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new ... Read More

DataView.getInt16() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 10:15:54

63 Views

The getInt16() function of the DataView gets and returns a signed 16-bit integer at the specified position.SyntaxIts syntax is as followsdataView.getInt16();Example Live Demo JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new DataView(arrayBuffer);       dataView.setInt16(1, 3225); ... Read More

CSS quotes Property

Samual Sam

Samual Sam

Updated on 25-Jun-2020 10:01:05

110 Views

Use the quotes property to set quotation marks. You can try to run the following code to implement the quotes propertyExampleLive Demo                    #demo {             quotes: "'" "'";          }                                           This is demo text surrounded by quotes.                    

ArrayBuffer.slice() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 09:56:41

412 Views

ArrayBuffer object in JavaScript represents a fixed-length binary data buffer.The slice() method of the this object returns a portion or, chunk from the array buffer (as a separate object). It accepts two integer arguments representing the start (inclusive) and end (exclusive) of the portion of the array to be returned.SyntaxIts ... Read More

Copy all elements of ArrayList to an Object Array in Java

Samual Sam

Samual Sam

Updated on 25-Jun-2020 09:55:58

2K+ Views

All the elements of an ArrayList can be copied into an Object Array using the method java.util.ArrayList.toArray(). This method does not have any parameters and it returns an Object Array that contains all the elements of the ArrayList copied in the correct order.A program that demonstrates this is given as ... Read More

Atomics.and() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 09:55:53

81 Views

The Atomic object of JavaScript is an object and which provides atomic operations such as add, sub, and, or, xor, load, store etc. as static methods, these methods are used with SharedArrayBuffer objects.The and() function of the Atomic object accepts a value representing the position of an array, performs bitwise ... Read More

Atomics.isLockFree() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 09:54:40

81 Views

The Atomic object of JavaScript is an object and which provides atomic operations such as add, sub, and, or, xor, load, store etc. as static methods, these methods are used with SharedArrayBuffer objects.This method is used to determine whether to use locks or atomic operations.SyntaxIts syntax is as followsAtomics.isLockFree(size)Example Live Demo ... Read More

Java Program to remove all elements from a set in Java

Samual Sam

Samual Sam

Updated on 25-Jun-2020 09:53:59

1K+ Views

To remove all elements from a set, use the clear() method.Here is our set −HashSet set1 = new HashSet (); set1.add("Mat"); set1.add("Sat"); set1.add("Cat");Now, let us remove all the elements −set1.clear();The following is an example to remove all elements from a set −Example Live Demoimport java.util.*; public class Demo {   ... Read More

Advertisements