Smita Kapse has Published 560 Articles

DoubleStream skip() method in Java

Smita Kapse

Smita Kapse

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

81 Views

The skip() method of the DoubleStream class in Java returns a stream consisting of the remaining elements of this stream after discarding the first numEle elements of the stream. The numEle is a parameter which you can set to skip any number of elements from the stream.The syntax is as ... Read More

C++ Program to Generate Randomized Sequence of Given Range of Numbers

Smita Kapse

Smita Kapse

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

394 Views

At first let us discuss about the rand() function. rand() function is a predefined method of C++. It is declared in header file. rand() is used to generate random number within a range. Here min_n is the minimum range of the random numbers and max_n is the maximum range ... Read More

How to use upper () in Android sqlite?

Smita Kapse

Smita Kapse

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

123 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

How to write a short literal in C++?

Smita Kapse

Smita Kapse

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

556 Views

Here we will see how will be the short literal in C++. In C or C++, different types of data have different literals. These are listed below.Sr.NoDatatypes & Literals1int52unsigned int5U3Long5L4long long5LL5float5.0f6double5.07char‘\5’Now, there are int, long float, double etc, but no short is present. So we cannot use any literals for ... Read More

C++ Program to Perform Baillie-PSW Primality Test

Smita Kapse

Smita Kapse

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

355 Views

The Baillie-PSW Primality Test, this test named after Robert Baillie, Carl Pomerance, John Selfridge, and Samuel Wagstaff. It is a test which tests whether a number is a composite number or possibly prime.AlgorithmMillerTest()Begin    Declare a function MillerTest of Boolean type.    Declare MT_dt and MT_num of integer datatype and ... Read More

How to print julianday in Android sqlite?

Smita Kapse

Smita Kapse

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

70 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

Check if a field contains a string in MongoDB?

Smita Kapse

Smita Kapse

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

2K+ Views

You can use $regex operator to check if a field contains a string in MongoDB. The syntax is as follows −db.yourCollectionName.findOne({"yourFieldName":{$regex:".*yourValue.*"}});To understand the above concept, let us create a collection with the document. The query to create a collection with a document is as follows −> db.checkFieldContainsStringDemo.insertOne({"Id":1, "Name":"John"}); {   ... Read More

What is an unsigned char in C++?

Smita Kapse

Smita Kapse

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

5K+ Views

In C++ we have seen there is character type data called char. Sometimes we have seen unsigned char also. So here we will see what is basically the unsigned char means. What are the basic differences between signed char and unsigned char?Signed char and unsigned char both are used to ... Read More

Benefits of C over other languages

Smita Kapse

Smita Kapse

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

2K+ Views

The C programming language was developed by Dennis Ritchie during early 1970. It was developed to redesign UNIX operating system.Earlier the B language, which was used for UNIX system, it has different drawbacks. It does not support structures, and did not understand datatypes. For this reason, the C language was ... Read More

What are __FILE__, __LINE__, and __FUNCTION__ in C++

Smita Kapse

Smita Kapse

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

6K+ Views

Here we will see what are the __FILE, __LINE__ and __FUNCTION__ in C++.The __FILE__This macro is used to get the path of the current file. This is useful when we want to generate log files. The following code will explain its functionality.Example#include using namespace std; int errorLog (const char* file, ... Read More

Advertisements