Rishi Rathor has Published 155 Articles

What is Bitwise AND in C++?

Rishi Rathor

Rishi Rathor

Updated on 11-Feb-2020 07:30:01

114 Views

The bitwise AND operator (&) compares each bit of first operand to the corresponding bit of second operand. If both bits are 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0. Both operands to the bitwise inclusive AND operator must be ... Read More

Difference between Relational operator(==) and std::string::compare() in C++

Rishi Rathor

Rishi Rathor

Updated on 11-Feb-2020 05:52:44

233 Views

There is only one difference between the relational operator == and std::string::compare(). That is the return value. Internally, string::operator==() is using string::compare()Relational operator(==) returns a boolean just signifying whether the 2 strings are equal or not while compare returns an integer that signifies how the strings relate to each other.To ... Read More

What is pointer operator & in C++?

Rishi Rathor

Rishi Rathor

Updated on 10-Feb-2020 13:30:36

2K+ Views

C++ provides two pointer operators, which are Address of Operator (&) and Indirection Operator (*). A pointer is a variable that contains the address of another variable or you can say that a variable that contains the address of another variable is said to "point to" the other variable. A ... Read More

What are signed and unsigned keywords in C++?

Rishi Rathor

Rishi Rathor

Updated on 10-Feb-2020 12:26:50

2K+ Views

All number types in C++ can either have a sign or not. For example, you can declare an int to only represent positive integers. Unless otherwise specified, all integer data types are signed data types, i.e. they have values which can be positive or negative. The unsigned keyword can be ... Read More

What are storage classes of variables in C++?

Rishi Rathor

Rishi Rathor

Updated on 10-Feb-2020 11:20:51

112 Views

A storage class defines the scope (visibility) and life-time of variables and/or functions within a C++ Program. These specifiers precede the type that they modify. There are following storage classes, which can be used in a C++ Program.autoregisterstaticexternmutableIn C, The auto storage class specifier lets you explicitly declare a variable ... Read More

How can we get the list of tables in a particular database from MySQL Server command line?

Rishi Rathor

Rishi Rathor

Updated on 10-Feb-2020 06:46:34

180 Views

We need to use ‘mysqlshow’ client program along with the name of the database to get the list of tables in a particular database. Its syntax would be as follows −Mysqlshow – u root db_name [pat_matching]Here db_name would be the name of the database from which we want to get ... Read More

Final variable in Java

Rishi Rathor

Rishi Rathor

Updated on 06-Feb-2020 06:08:17

6K+ Views

A final variable can be explicitly initialized only once. A reference variable declared final can never be reassigned to refer to a different object. However, the data within the object can be changed. So, the state of the object can be changed but not the reference.With variables, the final modifier often is ... Read More

Draw part of an image inside HTML5 canvas

Rishi Rathor

Rishi Rathor

Updated on 30-Jan-2020 06:14:59

355 Views

If you want to draw part of an image inside canvas, the image onload function only fires once when the image first loads into the browser. Let us see the example:$(document).ready(function () {    var cw1 = 200;    var ch1 = 300;    var ctx1 = $("#myCanvas")[0].getContext("3d");    var myImg1 ... Read More

JS Geolocation but without prompting possible?

Rishi Rathor

Rishi Rathor

Updated on 29-Jan-2020 08:14:44

260 Views

No, you will not be able to prevent the prompt. It is a security feature because not every user would want to share its location.As stated by W3C:A conforming implementation of this specification must provide a mechanism that protects the user's privacy and this mechanism should ensure that no location ... Read More

Two way communication between the browsing contexts in HTML5

Rishi Rathor

Rishi Rathor

Updated on 29-Jan-2020 07:26:39

243 Views

Two-way communication between the browsing contexts is called channel messaging. It is useful for communication across multiple origins.While creating messageChannel, it internally creates two ports to send the data and forwarded to another browsing context.postMessage() − Post the message throw channelstart() − It sends the dataclose() − it close the ... Read More

Previous 1 ... 7 8 9 10 11 ... 16 Next
Advertisements