Karthikeya Boyini has Published 2383 Articles

Date.now() function in JavaScript

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 10:33:22

191 Views

The Date object is a data type built into the JavaScript language. Date objects are created with the new Date( ) as shown below.Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, ... Read More

Check whether a NavigableMap empty or not in Java

karthikeya Boyini

karthikeya Boyini

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

137 Views

The isEmpty() method is used in Java to check whether a NavigableMap is empty or not.First, create a NavigableMap and add elements to it −NavigableMap n = new TreeMap(); n.put(5, "Tom"); n.put(9, "John"); n.put(14, "Jamie"); n.put(1, "Tim"); n.put(4, "Jackie"); n.put(15, "Kurt"); n.put(19, "Tiger"); n.put(24, "Jacob");Now, check whether the Map is ... Read More

Get an element from a Stack in Java without removing it

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 10:30:02

2K+ Views

The method java.util.Stack.peek() can be used to get an element from a Stack in Java without removing it. This method requires no parameters and it returns the element at the top of the stack. If the stack is empty, then the EmptyStackException is thrown.A program that demonstrates this is given ... Read More

Wrap the flex items with CSS

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 10:29:20

120 Views

To wrap the flex items, use the flex-wrap property. You can try to run the following code to implement the flex-wrap propertyExampleLive Demo                    .mycontainer {             display: flex;             ... Read More

DataView.getInt32() function in JavaScript

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 10:28:49

50 Views

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

DataView.getUint32() function in JavaScript

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 10:26:40

39 Views

The getUint32() function of the DataView gets and returns an unsigned 32-bit integer at the specified position.SyntaxIts syntax is as followsdataView.getUint32();Example Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new DataView(arrayBuffer);       dataView.setUint32(1, ... Read More

Get the asymmetric difference of two sets in Java

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 10:26:24

492 Views

Use removeAll() method to get the asymmetric difference of two sets.First set −HashSet set1 = new HashSet (); set1.add("Mat"); set1.add("Sat"); set1.add("Cat");Second set −HashSet set2 = new HashSet (); set2.add("Mat");To get the asymmetric difference −set1.removeAll(set2);The following is an example that displays how to get the asymmetric difference between two ... Read More

DataView.setInt16() function in JavaScript

karthikeya Boyini

karthikeya Boyini

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

28 Views

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

DataView.setInt8() function in JavaScript

karthikeya Boyini

karthikeya Boyini

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

29 Views

The setInt8() function of the DataView stores a signed 8-bit floating point number at the specified position.SyntaxIts syntax is as followsdataView.setInt8();Example Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new DataView(arrayBuffer);       dataView.setInt8(1, ... Read More

DataView.setUint32() function in JavaScript

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 10:22:03

32 Views

The setUint32() function of the DataView stores an unsigned 32-bit integer at the specified position.SyntaxIts syntax is as followsdataView.setUint32();Example Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new DataView(arrayBuffer);       dataView.setUint32(1, 45544);   ... Read More

Advertisements