George John has Published 1081 Articles

How can I get the current screen orientation in Android?

George John

George John

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

3K+ Views

In some situation, we need to find an android activity orientation. This example demonstrates how to integrate Android Login and registration form.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 ... Read More

How to convert Varchar to Double in SQL?

George John

George John

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

5K+ Views

You can convert varchar to double using CAST() function. The syntax is as follows:SELECT yourColumnName1, yourColumnName2, ......N, CAST(yourColumnName AS DECIMAL(TotalDigit, DigitAfterDecimalPoint)) anyVariableName FROM yourtableName ORDER BY anyVariableName DESC;To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table VarcharToDouble   ... Read More

User-defined variables vs Local Variables in MySQL?

George John

George John

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

1K+ Views

The user defined variable is also known as session-specific variable. It is a type of loosely typed variable which can be initialized somewhere in session and contains the value of user defined variable until session ends.The user defined variable is prefixed with symbol @. For Example:@anyVariableName;There are two approaches by ... Read More

How to multiple insert or batch insert at a time in MySQL query?

George John

George John

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

508 Views

You need to use VALUES() with comma separation for multiple insert or batch insert at a time. Use the following syntax that does not produce an invalid MySQL query on insert. The syntax is as follows:INSERT INTO yourTableName VALUES(yourValue1), (yourValue1), (yourValue2), (yourValue3), (yourValue4), (yourValue5), .......N;To understand the above syntax, let ... Read More

How to determine if running on a rooted device or not in Android?

George John

George John

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

3K+ Views

In some cases, we should not allow application should run on rooted devices for payment gateways. This example demonstrates how to determine if running on a rooted device or not.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details ... Read More

How to prevent going back to the previous activity in Android?

George John

George John

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

2K+ Views

There are so many situations, where we should not call back action when user click on back button.This example demonstrates how to integrate Android Login and register form.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create ... Read More

Addressing modes of Z-80

George John

George John

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

2K+ Views

Here we will see the addressing modes of the Zilog Z-80 Microprocessor. But at first we will discuss about the mnemonics of Z-80.As we know there are many similarities between Intel 8085 and Zilog Z-80, so we can also find the similarity on the instructions. But in Z-80 the Mnemonics ... Read More

How to Rotate image in image view by an angle in Android?

George John

George John

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

2K+ Views

This example demonstrates how to Rotate image in image view by an angle.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

The difference between 'AND' and '&&' in MySQL?

George John

George John

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

2K+ Views

NOTE: There is only one difference between AND and && is that AND is a standard while && is ownership syntax.Except the above statement, there is no difference between AND and &&. Let us look at all the conditions.The result of AND and && will always be either 1 or ... Read More

Exchange of blocks in Z-80

George John

George John

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

217 Views

In this section we will see how we can use the Zilog Z-80 Microprocessor to Exchange the contents of each element from two different blocks.The number of items in each block are given at location 5000H, and the blocks are at position 5050H and 5070H.So before swapping the items in ... Read More

Advertisements