Nitya Raut has Published 272 Articles

How to use Singleton Alert Dialog in android?

Nitya Raut

Nitya Raut

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

398 Views

Before getting into example, we should know what singleton design pattern is.  A singleton is a design pattern that restricts the instantiation of a class to only one instance. Notable uses include controlling concurrency, and creating a central point of access for an application to access its data store.This example ... Read More

Uninstall APKs programmatically

Nitya Raut

Nitya Raut

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

1K+ Views

This example demonstrate about Uninstall APKs programmaticallyStep 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.     In the above code, we have taken ... Read More

Function Decorators in Python?

Nitya Raut

Nitya Raut

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

456 Views

Python developers can extend and modify the behavior of a callable functions, methods or classes without permanently modifying the callable itself by using decorators. In short we can say they are callable objects which are used to modify functions or classes.Function decorators are functions which accepts function references as arguments ... Read More

How to disable action bar tittle in android?

Nitya Raut

Nitya Raut

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

186 Views

This example demonstrates How to disable action bar tittle 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.     In the above ... Read More

How to use the PI constant in C++?

Nitya Raut

Nitya Raut

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

15K+ Views

Here we will see how to use the PI constant in C++ program. The PI constant is present in the cmath header file. The name of the constant is M_PI. We can simply include that header file, and use the constant to perform operation.In the following example we will see ... Read More

How to get programmatically android device name?

Nitya Raut

Nitya Raut

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

2K+ Views

This example demonstrate about How to get programmatically android device name.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. In ... Read More

How to print list values in reverse order using Collections.reverse() in Android?

Nitya Raut

Nitya Raut

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

359 Views

This example demonstrates How to print list values in reverse order using Collections.reverse() 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

What is 0 (zero) - A decimal literal or An octal literal in C++

Nitya Raut

Nitya Raut

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

460 Views

The 0 (Zero) before a number is basically the octal literal.In C/C++ we can use octal literals by typing a zero before the actual number. For example, if an octal number is 25, then we have to write 025.Example Code#include int main() {    int a = 025;   ... Read More

How to Count Variable Numbers of Arguments in C?

Nitya Raut

Nitya Raut

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

2K+ Views

In this section we will see how to count number of arguments in case of variable number of arguments in C.The C supports ellipsis. This is used to take variable number of arguments to a function. User can count the arguments by using one of the three different ways.By passing ... Read More

How to remove unused space for arraylist Listview in Android?

Nitya Raut

Nitya Raut

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

178 Views

This example demonstrates How to remove unused space for arraylist Listview 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

Advertisements