Anvi Jain has Published 568 Articles

IntStream filter() method in Java

Anvi Jain

Anvi Jain

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

628 Views

The filter() method of the IntStream class in Java returns a stream consisting of the elements of this stream that match the given predicate.The syntax is as follows −IntStream filter(IntPredicate predicate)Here, the predicate parameter is a stateless predicate to apply to each element to determine if it should be included. ... Read More

C++ Program to Find the Vertex Connectivity of a Graph

Anvi Jain

Anvi Jain

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

764 Views

To find the Vertex Connectivity of a graph we need to find out Articulation Points of that graph. Articulation Points (or Cut Vertices) in a Graph is a point iff removing it (and edges through it) disconnects the graph. An articulation point for a disconnected undirected graph, is a vertex ... Read More

C++ Program to Implement the Solovay-Strassen Primality Test to Check if a Given Number is Prime

Anvi Jain

Anvi Jain

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

346 Views

Solovay-Strassen Primality Test is used to test a number whether it is a composite or possibly prime number.AlgorithmsBegin    Declare a function modulo to the long datatype to perform binary calculation.       Declare m_base, m_exp, m_mod of long datatype and pass them as a parameter.       ... Read More

How to convert date and time into int in Android sqlite?

Anvi Jain

Anvi Jain

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

308 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

DoubleStream allMatch() method in Java

Anvi Jain

Anvi Jain

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

138 Views

The allMatch() method in the DoubleStream class returns whether all elements of this stream match the provided predicate.The syntax is as follows −boolean allMatch(DoublePredicate predicate)Here, the argument predicate is a stateless predicate to apply to elements of this stream. The DoublePredicate is a predicate of one double-valued argument.To use the ... Read More

Macros and Preprocessors in C

Anvi Jain

Anvi Jain

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

3K+ Views

The C Preprocessor is not a part of the compiler, but is a separate step in the compilation process. In simple terms, a C Preprocessor is just a text substitution tool and it instructs the compiler to do required pre-processing before the actual compilation. We'll refer to the C Preprocessor ... Read More

Meaning of 'const' last in a function declaration of a C++ class?

Anvi Jain

Anvi Jain

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

859 Views

Sometimes we can find the keyword ‘const’ present at the last of function declaration. So what does it mean?Using this one function can be made as constant. The idea of constant function is that, the function cannot be modified from the objects, where they are called. It is recommended to ... Read More

How to print local time in Android sqlite?

Anvi Jain

Anvi Jain

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

193 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

Need of long data type in C

Anvi Jain

Anvi Jain

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

421 Views

In C or C++, there are four different datatypes, that are used for integer type data. These four datatypes are short, int, long and long long. Each of these datatypes takes different memory spaces. The size varies in different architecture and different operating systems. Sometimes int takes 4-bytes or sometimes ... Read More

Find value in a MongoDB Array with multiple criteria?

Anvi Jain

Anvi Jain

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

543 Views

To find value in the array with multiple criteria, for example, you can use $elemMatch along with $gt and $lt. The syntax is as follows −db.yourCollectionName.find({yourFieldName:{$elemMatch:{$gt:yourNegativeValue, $lt:yourPo sitiveValue}}}).pretty();To understand the above syntax, let us create a collection with the document. The query to create a collection with a document is ... Read More

Advertisements