Smita Kapse has Published 558 Articles

How to use upper () in Android sqlite?

Smita Kapse

Smita Kapse

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

131 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

629 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

393 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

79 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

Const Qualifier in C

Smita Kapse

Smita Kapse

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

2K+ 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 of the value of PI, you wouldn't like any part ... Read More

Collectors averagingInt() method in Java 8

Smita Kapse

Smita Kapse

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

757 Views

The averagingInt() method of the Collectors class returns a Collector that produces the arithmetic mean of a int-valued function applied to the input elements.The syntax is as follows −static Collector averagingInt(ToIntFunction

Advertisements