Vrundesha Joshi has Published 343 Articles

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

263 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

195 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

842 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

263 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

623 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

92 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

How to order DESC by a field, but list the NULL values first?

Vrundesha Joshi

Vrundesha Joshi

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

61 Views

To order by a field and list the NULL values first, you need to use the following syntax. This will order in descending order −select yourColumnName from yourTableName group by yourColumnName is null desc, yourColumnName desc;To understand the above syntax, let us first create a table −mysql> create table OrderByNullFirstDemo ... Read More

8085 Program to perform bubble sort in descending order

Vrundesha Joshi

Vrundesha Joshi

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

6K+ Views

In this program we will see how to sort a block of bytes in descending order using bubble sorting technique.Problem StatementWrite8085 Assembly language program to sort numbers in descending order where n number of numbers are stored in consecutive memory locations starting from 8041H and the value of n is ... Read More

Advertisements