Ankith Reddy has Published 1070 Articles

How to determine if a value appears in a GROUP BY group in MySQL?

Ankith Reddy

Ankith Reddy

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

644 Views

You can use aggregate function SUM() along with IF to determine if a value appears in a GROUP BY group.Let us first create a demo tablemysql> create table GroupbygroupDemo -> ( -> UserId int, -> UserName varchar(20) -> ... Read More

General purpose registers in 8086 microprocessor

Ankith Reddy

Ankith Reddy

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

13K+ Views

The general purpose registers are used to store temporary data in the time of different operations in microprocessor. 8086 has eight general purpose registers. The description of these general purpose registersRegisterFunctionAXThis is the accumulator. It is 16-bit registers, but it is divided into two 8-bit registers. These registers are AH and ... Read More

How to remove all documents from a collection except a single document in MongoDB?

Ankith Reddy

Ankith Reddy

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

644 Views

To remove all documents from a collection except a single document in MongoDB, use remove() based on some condition. Let us create a collection with documents. Following is the query>db.removeAllDocumentsExceptOneDemo.insertOne({"StudentName":"Larry", "StudentAge":21}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9c9de42d66697741252478") } >db.removeAllDocumentsExceptOneDemo.insertOne({"StudentName":"Mike", "StudentAge":21, "StudentCountryName":"US"}); {    "acknowledged" : true,   ... Read More

Generation of time delay in 8085

Ankith Reddy

Ankith Reddy

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

24K+ Views

In this section we will see how to generate the time delay using 8085 programs. The delay will be used in different places to simulate clocks, or counters or some other area.When the delay subroutine is executed, the microprocessor does not execute other tasks. For the delay we are using ... Read More

C++ Program to Perform Uniform Binary Search

Ankith Reddy

Ankith Reddy

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

214 Views

In uniform binary search here we implement binary search using a lookup table. It is an improvement in binary search since table lookup is faster than a shift and addition. The time complexity of this approach is O(log(n)).AlgorithmBegin    Assign the data to the array in a sorted manner.   ... Read More

The equivalent of SQL Server function SCOPE_IDENTITY() in MySQL?

Ankith Reddy

Ankith Reddy

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

2K+ Views

The equivalent of SQL Server function SCOPE_IDENTITY() is equal to LAST_INSERT_ID() in MySQL. The syntax is as follows:SELECT LAST_INSERT_ID().This returns the id of last inserted record.Here, I am going to create a table with primary key column. The following is the demo of last_insert_id().First, let us create two tables. The ... Read More

How to make Android character by character display text animation?

Ankith Reddy

Ankith Reddy

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

684 Views

This example demonstrate about How to make Android character by character display text animation.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 src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Bundle; ... Read More

How to make the textview blinking in android?

Ankith Reddy

Ankith Reddy

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

622 Views

This example demonstrate about how to make the textview blinking 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 ... Read More

How to implement HorizontalScrollView like Gallery in Android?

Ankith Reddy

Ankith Reddy

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

3K+ Views

Before getting into an example, we should know what is Horizontal Scroll View. Horizontal Scrollview provides by android.widget.HorizontalScrollView class. It is used to scroll child views in a horizontal direction.This example demonstrates how to use horizontal Scroll view.Step 1 − Create a new project in Android Studio, go to File ... Read More

Android AsyncTasks Parallel Execution

Ankith Reddy

Ankith Reddy

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

388 Views

Before getting into the example, We should know that, What is asyncTask. AsyncTask is going to do operations/actions in background thread and update on mainthread. Here is the simple solution about Android AsyncTask Parallel Execution.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project ... Read More

Advertisements