Nitya Raut has Published 276 Articles

Parsing a comma-delimited std::string in C++

Nitya Raut

Nitya Raut

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

6K+ Views

In this program we will see how to parse comma-delimited string in C++. We will put a string where some texts are present, and they are delimited by comma. After executing this program, it will split those strings into a vector type object.To split them we are using the getline() ... Read More

Best replacement of onItemClickListner in android recyclerview?

Nitya Raut

Nitya Raut

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

73 Views

This example demonstrates about Best replacement of onItemClickListner in android recyclerviewStep 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 to res/layout/activity_main.xml.           ... Read More

How to get information about USB mounted or not in android?

Nitya Raut

Nitya Raut

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

448 Views

This example demonstrate about How to get information about USB mounted or not in android.Step 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 to res/layout/activity_main.xml. ... Read More

How to set fit webview screen in android?

Nitya Raut

Nitya Raut

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

3K+ Views

This example demonstrate about How to set fit webview screen in android.Step 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 to res/layout/activity_main.xml. ... Read More

How to convert a timestamp object in to Date in JDBC program?

Nitya Raut

Nitya Raut

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

421 Views

The getTime() method of the Timestamp class retrieves and returns the time from the current timestamp in milliseconds (long) from epoch time 1, 1970 00:00:00.000 GMT.Timestamp timestamp = rs.getTimestamp("DispatTimestamp"); long time = timestamp.getTime();The constructor of the java.sql.Date class accepts a long variable representing the time in milliseconds from the epoch ... Read More

C++ Program to Implement Set in STL

Nitya Raut

Nitya Raut

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

443 Views

Set is abstract data type in which each element has to be unique, because the value of the element identifies it. The value of the element cannot be modified once it is added to the set, but it is possible to remove and add the modified value of that element.Functions ... Read More

C++ Program to Implement Set_Intersection in STL

Nitya Raut

Nitya Raut

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

438 Views

The intersection of two sets is formed only by the elements those are common in both sets. The elements copied by the function come always from the first set in the same order. The elements in the both the sets shall already be ordered.Common set operations are −Set UnionSet IntersectionSymmetric ... Read More

C++ Program to Implement Set_Symmetric_difference in STL

Nitya Raut

Nitya Raut

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

184 Views

This is a c++ program to implemet set_symmetric_difference. The symmetric difference of two sets is built by the elements that are present in one of the sets, but not in the other.Common set operations are −Set UnionSet IntersectionSymmetric Set Difference or Exclusive-ORSet Difference or SubtractionAlgorithmBegin    Declare set vector v ... Read More

How to convert a Date object in to Timestamp in JDBC program?

Nitya Raut

Nitya Raut

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

488 Views

The getTime() method of the java.sql.Date class retrieves and returns the time from the current timestamp in milliseconds (long) from epoch time 1, 1970 00:00:00.000 GMT.//Retrieving the date Date date = rs.getDate("Dispatch_Date");The constructor of the java.sql.Timestamp class accepts a long variable representing the time in milliseconds from the epoch time ... Read More

How to run continues thread in android?

Nitya Raut

Nitya Raut

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

445 Views

Before getting into an example, we should know what thread in android is. Threads are generic processing tasks that can do most things, but one thing they cannot do is update the UI.This example demonstrates about How to run continues thread in android.Step 1 − Create a new project in ... Read More

Advertisements