Anvi Jain has Published 629 Articles

Constructor Delegation in C++

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

1K+ Views

Here we will see what is the constructor delegation? When a constructor calls other constructor of the same class, then it is called the constructor delegation. This feature is present from C++11.Let us see the following program, and try to analyze what are the difficulties in this code.Example#include using ... Read More

Differences between C++ string == and compare()?

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

3K+ Views

In C++ we can compare two strings using compare() function and the == operator. Then the question is why there are two different methods? Is there any difference or not?There are some basic differences between compare() and == operator. In C++ the == operator is overloaded for the string to ... Read More

lrint() and llrint() in C++

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

67 Views

In this section we will see the lrint() and llring() in C++. At first let us discuss about the lrint().The lrint() function is used to round the fractional given value in the argument to an integral value using current rounding mode. The current mode is determined by using fesetround().>=This lrint() ... Read More

How to append data from treemap to arraylist for listview in Android?

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

157 Views

This example demonstrate about How to append data from tree map to array list for list view in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code ... Read More

How to compile 32-bit program on 64- bit gcc in C and C++

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

2K+ Views

Nowadays the compiler comes with default 64-bit version. Sometimes we need to compile and execute a code into some 32bit system. In that time, we have to use this feature.At first, we have to check the current target version of the gcc compiler. To check this, we have to type ... Read More

Check the current number of connections to MongoDB?

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

698 Views

You can check the current number of connections to MongoDB with the help of the following syntax −var anyVariableName= db.serverStatus(); yourVariableName.connections;The second syntax is as follows −db.serverStatus().connections;To understand both the above syntaxes, let us see them one by one −Case 1 − The first query is as follows −> var ... Read More

How to convert std::string to lower case in C++?

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

8K+ Views

In this section, we will see how to convert all letters of a C++ string to lowercase letters. To do this thing we have to use the transform function. This transform function is present in the algorithm library.The transform function takes the beginning pointer of the string and the ending ... Read More

Check privileges (grants) for a specific user in MySQL?

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

469 Views

If you want to check privileges for a specific user, then use the below syntax −SHOW GRANTS FOR 'yourUserName'@'yourHostName';The above syntax will check privileges for a specific user.To check the privileges for a specific user, then use FOR. Let’s say we have a username ‘JOHN‘ and host is ‘%’. Following ... Read More

Check if a given graph is Bipartite using DFS using C++

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

146 Views

A bipartite graph is a graph in which if the graph coloring is possible using two colors only i.e.; vertices in a set are colored with the same color. This is a C++ program to check whether a graph bipartite or not using DFS.AlgorithmBegin    An array color[] is used ... Read More

How to use cast() in Android sqlite?

Anvi Jain

Anvi Jain

Updated on 30-Jul-2019 22:30:25

301 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

Advertisements