Nitya Raut has Published 276 Articles

Which event occurs in JavaScript when an element is content is copied to clipboard?

Nitya Raut

Nitya Raut

Updated on 23-May-2020 09:12:11

85 Views

When a user copies the element’s content, then the oncopy event triggers.ExampleYou can try to run the following code to learn how to implement oncopy event in JavaScript.                          function copyFunction() {             document.write("Text copied!");          }          

What is the usage of onpageshow event in JavaScript?

Nitya Raut

Nitya Raut

Updated on 21-May-2020 07:46:57

143 Views

The onpageshow event triggers in JavaScript when a user reaches the new web page.ExampleYou can try to run the following code to learn how to implement onpageshow event in JavaScript.           On first visit, a welcome message is visible.                function newFunc() {             alert("Welcome!");          }          

How to use pattern attribute in HTML?

Nitya Raut

Nitya Raut

Updated on 14-May-2020 10:56:22

340 Views

The pattern attribute in HTML is used to set a regular expression in the following input types: text, url, tel, search, date, email, and password. For passwords, with the pattern attribute, you can set the minimum required values. For example, password should have at least 8 characters.ExampleYou can try to ... Read More

Set the types of files that the server accepts in HTML

Nitya Raut

Nitya Raut

Updated on 02-Mar-2020 12:35:56

105 Views

Use the accept attribute to set the types of files that the server accepts in HTML. Use the attribute only with .ExampleYou can try to run the following code to work with accept attribute −           File Upload Box                                  

How to read and parse CSV files in C++?

Nitya Raut

Nitya Raut

Updated on 11-Feb-2020 10:54:53

3K+ Views

You should really be using a library to parsing CSV files in C++ as there are many cases that you can miss if you read files on your own. The boost library for C++ provides a really nice set of tools for reading CSV files. For example, example#include vector parseCSVLine(string ... Read More

What should main() return in C and C++?

Nitya Raut

Nitya Raut

Updated on 11-Feb-2020 10:29:31

2K+ Views

The return value for main is used to indicate how the program exited. If the program execution was normal, a 0 return value is used. Abnormal termination(errors, invalid inputs, segmentation faults, etc.) is usually terminated by a non-zero return. There is no standard for how non-zero codes are interpreted.You can ... Read More

What are shift operators in C++?

Nitya Raut

Nitya Raut

Updated on 11-Feb-2020 07:39:27

6K+ Views

The bitwise shift operators are the right-shift operator (>>), which moves the bits of shift_expression to the right, and the left-shift operator (

Why does C++ need the scope resolution operator?

Nitya Raut

Nitya Raut

Updated on 11-Feb-2020 06:44:46

484 Views

The :: (scope resolution) operator is used to get hidden names due to variable scopes so that you can still use them. The scope resolution operator can be used as both unary and binary.You can use the unary scope operator if a namespace scope or global scope name is hidden ... Read More

What is the ?-->? operator in C++?

Nitya Raut

Nitya Raut

Updated on 10-Feb-2020 13:37:58

236 Views

There is no such operator in C++. Sometimes, we need to create wrapper types. For example, types like unique_ptr, shared_ptr, optional and similar. Usually, these types have an accessor member function called .get but they also provide the operator→ to support direct access to the contained value similarly to what ... Read More

What is the const Keyword in C++?

Nitya Raut

Nitya Raut

Updated on 10-Feb-2020 11:15:04

380 Views

We use the const qualifier to declare a variable as constant. That means that we cannot change the value once the variable has been initialized. Using const has a very big benefit. For example, if you have a constant value like the value of PI, you wouldn't like any part ... Read More

Previous 1 ... 6 7 8 9 10 ... 28 Next
Advertisements