Paul Richard has Published 76 Articles

Static variables in Java

Paul Richard

Paul Richard

Updated on 04-Oct-2023 12:40:34

23K+ Views

Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block. There would only be one copy of each ... Read More

CSMA with Collision Avoidance (CSMA/CA)

Paul Richard

Paul Richard

Updated on 14-Sep-2023 21:52:01

27K+ Views

Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) is a network protocol for carrier transmission that operates in the Medium Access Control (MAC) layer. In contrast to CSMA/CD (Carrier Sense Multiple Access/Collision Detection) that deals with collisions after their occurrence, CSMA/CA prevents collisions prior to their occurrence.AlgorithmThe algorithm of CSMA/CA ... Read More

How to mark text superscript in HTML?

Paul Richard

Paul Richard

Updated on 29-Dec-2021 07:07:53

1K+ Views

To mark superscripted text in HTML, use the … tag. Just keep in mind both the opening and closing tag is mandatory while using the ... tag.The superscript text appears to be half a character above the normal line. It is displayed as a smaller font.You can try the following ... Read More

Write Python program to find duplicate rows in a binary matrix

Paul Richard

Paul Richard

Updated on 23-Jun-2020 16:19:16

249 Views

Given a binary matrix contains 0 and 1, our task is to find duplicate rows and print it.Python provides Counter() method which is used here.ExampleInput: 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 Output: (1, 1, 1, 1) (0, 0, 0, 0)AlgorithmStep ... Read More

Python program to count total set bits in all number from 1 to n.

Paul Richard

Paul Richard

Updated on 23-Jun-2020 16:12:51

255 Views

Given a positive integer n, then we change to its binary representation and count the total number of set bits.ExampleInput : n=3 Output : 4AlgorithmStep 1: Input a positive integer data. Step 2: then convert it to binary form. Step 3: initialize the variable s = 0. Step 4: traverse ... Read More

How to set the distance between lines in a text with JavaScript?

Paul Richard

Paul Richard

Updated on 23-Jun-2020 13:22:18

349 Views

To set the distance between lines, use the lineHeight property. You can try to run the following code to set the distance between lines in a text with JavaScript −ExampleLive Demo           Heading 1       This is Demo Text.This is Demo TextThis is ... Read More

How to set all outline properties in a single declaration with JavaScript?

Paul Richard

Paul Richard

Updated on 23-Jun-2020 12:01:37

64 Views

To set all outline properties in one declaration, use the outline property. It sets the following properties: outline-width, outline-style, and outline-color.ExampleYou can try to run the following code to learn how to work with outline properties −Live Demo                    #box ... Read More

How to set border width, border style, and border color in one declaration with JavaScript?

Paul Richard

Paul Richard

Updated on 23-Jun-2020 11:06:22

809 Views

To set the border width, style, and color in a single declaration, use the border property in JavaScript.ExampleYou can try to run the following code to learn how to set border in JavaScript −Live Demo           Set border             ... Read More

What will happen when 1 is converted to Boolean in JavaScript?

Paul Richard

Paul Richard

Updated on 23-Jun-2020 09:20:39

61 Views

You can try to run the following code to learn how to convert 1 to Boolean in JavaScript −ExampleLive Demo           Convert 1 to Boolean                var myVal = 1;          document.write("Boolean: " + Boolean(myVal));          

Which event occurs in JavaScript when the dragged element is over the target?

Paul Richard

Paul Richard

Updated on 23-Jun-2020 08:14:21

277 Views

The ondragover event triggers when the dragged element is over the drop target.ExampleYou can try to run the following code to learn how to implement ondragover event in JavaScript −Live Demo                    .drag {             ... Read More

1 2 3 4 5 ... 8 Next
Advertisements