Jennifer Nicholas has Published 332 Articles

C++ Program to Implement Sorting containers in STL

Jennifer Nicholas

Jennifer Nicholas

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

118 Views

In this C++ program, we implement Sorting containers in STL.Functions and descriptions:Functions used here:    l.push_back() = It is used to push elements into a list from the front.    l.sort() = Sorts the elements of the list.    Where l is a list object.Example Code#include #include #include ... Read More

How to launch another app from your app?

Jennifer Nicholas

Jennifer Nicholas

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

4K+ Views

This example demonstrates How to launch another app from your appStep 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 store Hashmap in Singleton in android?

Jennifer Nicholas

Jennifer Nicholas

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

235 Views

Before getting into an 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 ... Read More

Descending order in Map and Multimap of C++ STL

Jennifer Nicholas

Jennifer Nicholas

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

3K+ Views

Generally, the default behavior of map and multimap map is to store elements is in ascending order. But we can store element in descending order by using the greater function.The map in descending order:Functions are used here -m::find() – Returns an iterator to the element with key value ‘b’ in ... Read More

Order MySQL records randomly and display name in Ascending order

Jennifer Nicholas

Jennifer Nicholas

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

210 Views

You can use subquery to order randomly and display name in asending order. The rand() is used for random, whereas ORDER BY is used to display name records in ascending order. The syntax is as follows −select *from (    select *from yourTableName order by rand() limit anyIntegerValue; ) anyVariableName ... Read More

How to implement a Keyword Search in MySQL?

Jennifer Nicholas

Jennifer Nicholas

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

1K+ Views

To implement a keyword search in MySQL, you can use LIKE operator. The syntax is as follows −SELECT *FROM yourTableName where yourColumnName Like ‘%anyKeywordName%’ or yourColumnName Like ‘%anyKeywordName%’;To understand it further, let us first create a table. The following is the query to create a table −mysql> create table KeywordSearchDemo ... Read More

How do I begin auto increment from a specific point in MySQL?

Jennifer Nicholas

Jennifer Nicholas

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

269 Views

To begin auto increment from a specific point, use ALTER command. The syntax is as follows −ALTER TABLE yourTableName auto_increment = anySpecificPoint;To understand the above concept, let us create a table. The query to create a table is as follows −mysql> create table AutoIncrementSpecificPoint −> ( ... Read More

Intel 8257 Programmable DMA Controller

Jennifer Nicholas

Jennifer Nicholas

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

468 Views

As per DIP package Intel 8257 DMA controller chip is a 40-pin programmable Integrated Circuit. The pin diagrams of physical and functional are indicated below. The DMA controller chip 8257 works in two modes namely −Slave Mode andMaster Mode.Likely the processor also works in two modes namely active mode and ... Read More

8085 Program to convert HEX to BCD

Jennifer Nicholas

Jennifer Nicholas

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

5K+ Views

In this program we will see how to convert binary numbers to its BCD equivalent.Problem StatementA binary number is store dat location 800H. Convert the number into its BCD equivalent and store it to the memory location 8050H.DiscussionHere we are taking a number from the memory, and initializing it as ... Read More

8085 Program to perform linear search

Jennifer Nicholas

Jennifer Nicholas

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

1K+ Views

In this program we will see how to search an element in a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to search a key value in a block of data using linear search technique.DiscussionIn this program the data are stored at location 8002H to 8007H. The 8000H ... Read More

Advertisements