Paul Richard has Published 96 Articles

How to mark text superscript in HTML?

Paul Richard

Paul Richard

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

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

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

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

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

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

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

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

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

What is the role of the window.history object in JavaScript?

Paul Richard

Paul Richard

Updated on 23-Jun-2020 08:00:51

The window.history object is used to go back or to the next page of the web browser. It has the browser's history and comes with the following two methods −history.back − Go to previous URLhistory.next − Go to next URLExampleYou can try to run the following code to learn how ... Read More

How can we have multiple virtuals GENERATED COLUMNS in MySQL table with CREATE TABLE statement?

Paul Richard

Paul Richard

Updated on 22-Jun-2020 14:35:35

It is quite possible to add multiple virtual generated columns in a MySQL table. It can be illustrated with the following example as follows −Examplemysql> Create table profit(cost int, price int, profit int AS (price-cost), price_revised int AS (price-2)); Query OK, 0 rows affected (0.73 sec) mysql> Describe profit; ... Read More

1 2 3 4 5 ... 10 Next
Advertisements