Arjun Thakur has Published 1109 Articles

Remove seconds from time field in MySQL?

Arjun Thakur

Arjun Thakur

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

2K+ Views

You need to use TIME_FORMAT() to remove seconds from time field. The syntax is as follows:SELECT TIME_FORMAT(yourColumnName1, "%H:%i") AS anyVariableName, TIME_FORMAT(yourColumnName2, "%H:%i") 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 removeSecondsFromTime    -> ( ... Read More

How to add shadow Effect for a Text in Android?

Arjun Thakur

Arjun Thakur

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

3K+ Views

This example demonstrates how to add shadow Effect for a Text 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 ... Read More

How to deal with 'Boolean' values in PHP & MySQL?

Arjun Thakur

Arjun Thakur

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

3K+ Views

We are using MySQL version 8.0.12. Let us first check the MySQL version:mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.12    | +-----------+ 1 row in set (0.00 sec)To deal with Boolean in MySQL, you can use BOOL or BOOLEAN or TINYINT(1). If you use BOOL or BOOLEAN, ... Read More

Programmer's view of Z-80

Arjun Thakur

Arjun Thakur

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

284 Views

In this section we will see the basic architecture of the Z-80 Microprocessor, and different registers to write programs into it.To write programs we have to care about the registers and some instructions to access them during program execution.From this diagram it is clear that there are some special purpose ... Read More

How to remove onClickListener for a view in android?

Arjun Thakur

Arjun Thakur

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

1K+ Views

In some situations, We should not allow onClickListener for a view. This example demonstrates how to remove onClickListener for a view 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 − ... Read More

How can I know when an EditText loses focus in Android?

Arjun Thakur

Arjun Thakur

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

3K+ Views

This example demonstrates how can I know when an EditText loses focus.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

Check whether a field is empty or null in MySQL?

Arjun Thakur

Arjun Thakur

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

620 Views

NULL and empty string ‘ ’ both aren’t similar in MySQL. To check the field is empty like ‘ ’or is null, you need to use the IS NULL property or something else. You can check all the conditions with CASE statement. The syntax is as follows:SELECT *, CASE WHEN ... Read More

Interrupt structure in Z-80

Arjun Thakur

Arjun Thakur

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

1K+ Views

As we know that the Intel 8085 has five interrupt pins (TRAP, RST7.5, RST6.5, RST6.5 and INTR), but the Zilog Z-80 has only two interrupt pin. The NMI and INT . But it has superior interrupt structure compared to 8085.The INT InterruptIt is an active low, level triggered input interrupt. This is maskable and ... Read More

Convert output of MySQL query to UTF8?

Arjun Thakur

Arjun Thakur

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

2K+ Views

You need to use CAST() or CONVERT() function to convert output of MySQL query to UTF8. Here, I am using MySQL version 8.0.12. Let us first check the version:mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.12 | +-----------+ 1 row in set (0.00 sec)In this ... Read More

Concrete Exceptions in Python

Arjun Thakur

Arjun Thakur

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

2K+ Views

There are some common exceptions in python. These exceptions are usually raised in different programs. These may raise by the programmer explicitly, or the python interpreter can raise these type of exceptions implicitly. Some of these exceptions are − Exception AssertionError The AssertionError may raise, when an assert statement ... Read More

Advertisements