Vrundesha Joshi has Published 345 Articles

How to clear Singleton instance in android?

Vrundesha Joshi

Vrundesha Joshi

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

560 Views

Before getting into the 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

C++ Program to Implement Adjacency Matrix

Vrundesha Joshi

Vrundesha Joshi

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

13K+ Views

The adjacency matrix of a graph is a square matrix of size V x V. The V is the number of vertices of the graph G. In this matrix in each side V vertices are marked. If the graph has some edges from i to j vertices, then in the ... Read More

How to handle orientation change android?

Vrundesha Joshi

Vrundesha Joshi

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

1K+ Views

This example demonstrate about How to handle orientation change androidStep 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, ... Read More

How to refresh Singleton class every one hour in android?

Vrundesha Joshi

Vrundesha Joshi

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

250 Views

Before getting into example, we should know what singleton design patter 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 demonstrate ... Read More

How to make a call in android

Vrundesha Joshi

Vrundesha Joshi

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

193 Views

This example demonstrate about How to make a call in androidStep 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

C++ Program to Implement Stack in STL

Vrundesha Joshi

Vrundesha Joshi

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

804 Views

Stack is a linear data structure which follows a particular order in which the operations are performed. The order may be FILO (First In first out) or LIFO (Last In First Out)AlgorithmBegin Declare stack vector. Take the input as per choice. ... Read More

How to store JSON Object Singleton with Global Context in android?

Vrundesha Joshi

Vrundesha Joshi

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

254 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 demonstrate ... Read More

C++ Program to Find the Longest Increasing Subsequence of a Given Sequence

Vrundesha Joshi

Vrundesha Joshi

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

602 Views

Longest Increasing Subsequence is a subsequence where one item is greater than its previous item.Here we will try to find Longest Increasing Subsequence length, from a set of integers.Input: A set of integers. {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15} Output: ... Read More

Create date from day, month, year fields in MySQL?

Vrundesha Joshi

Vrundesha Joshi

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

2K+ Views

You can use in-built function STR_TO_DATE() from MySQL. The syntax is as follows −SELECT STR_TO_DATE(CONCAT(yourYearColumName, '-', LPAD(yourMonthColumName, 2, '00'), '-', LPAD(yourDayColumName, 2, '00')), '%Y-%m-%d') as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table DateCreateDemo ... Read More

Insert the results of a MySQL select? Is it possible?

Vrundesha Joshi

Vrundesha Joshi

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

88 Views

You do not need to use values whenever you insert the results of a select. To insert the results of select, let us first create two tables.The first table query is as follows −< FirstTableDemo> mysql> create table FirstTableDemo    −> (    −> StudentId int,    −> StudentName varchar(100) ... Read More

Advertisements