George John has Published 1081 Articles

When do function-level static variables get initialized in C/C++?

George John

George John

Updated on 26-Jun-2020 13:59:45

840 Views

Static variables can be defined using the static keyword. They are variables that remain in memory while the program is running i.e. their lifetime is the entire program run. This is different than automatic variables as they remain in memory only when their function is running and are destroyed when ... Read More

How can I enable MySQL slow query log without restarting MySQL?

George John

George John

Updated on 26-Jun-2020 13:18:50

1K+ Views

We can enable the MySQL slow query log with the help of SET statement.The following is the syntax.SET GLOBAL slow_query_log = 'Value';In the above syntax, value can be filled with ON/OFF. To enable slow query log, let us see the query.mysql> SET GLOBAL slow_query_log = 'ON'; Query OK, 0 rows ... Read More

Making an existing field Unique in MySQL?

George John

George John

Updated on 26-Jun-2020 13:05:43

238 Views

Unique in MySQL means we cannot add duplicate records. Let us now see how to create a unique constraint in the column at the time of creating a table.mysql> create table UniqueConstDemo - > ( - > name varchar(100) unique - > ); Query OK, 0 rows affected (0.72 sec)Now, ... Read More

How to remove leading and trailing whitespace from a MySQL field value?

George John

George John

Updated on 26-Jun-2020 13:04:43

2K+ Views

We can remove the leading and trailing whitespaces from MySQL with the help of trim() function.The following is the syntax.mysql> SELECT TRIM(' AnyStringWithWhitespaces ');Let us now implement the above syntax in the below query.mysql> SELECT TRIM(' Leading And Trailing whitespaces Demo '); Here is the output that removes the whitespaces.+---------------------------------------+ ... Read More

Remove new line characters from rows in MySQL?

George John

George John

Updated on 26-Jun-2020 12:48:38

5K+ Views

The Trim() function is used to remove new line characters from data rows in MySQL. Let us see an example. First, we will create a table. The CREATE command is used to create a table.mysql> create table tblDemotrail - > ( - > id int, - > name varchar(100) - ... Read More

8085 Program to Add two multi-byte BCD numbers

George John

George John

Updated on 26-Jun-2020 12:14:21

1K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program is mainly for adding multi-digit BCD (Binary Coded Decimal) numbers.Problem StatementWrite 8085 Assembly language program to add two multi-byte BCD (Binary Coded Decimal) numbers. DiscussionWe are using 4-byte BCD numbers. The numbers are stored into the memory at location ... Read More

Immediate addressing mode in 8085 Microprocessor

George John

George John

Updated on 26-Jun-2020 11:55:19

2K+ Views

In this mode, the 8/16-bit data is specified in the instruction itself as one of its operand. For example MVI E, ABH: means ABH is copied into register A. Here the operand is immediately available in the instruction.MVI E ABHBeforeAfter(A)Any valueABHAs example, if we consider instruction MVI E, ABH then ... Read More

In-service register in 8259

George John

George John

Updated on 26-Jun-2020 10:57:54

776 Views

Also, an 8-bit register which keeps track records of the interrupt requests that are currently being executed. If the request IR6 is currently being served, whose contents of ISR will be 01000000. If by any means the request to IR3 becomes active during the service process of IR6, 8259 sets ... Read More

8085 Program to convert HEX to ASCII

George John

George John

Updated on 26-Jun-2020 10:53:12

6K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will convert HEX to ASCII values.Problem StatementWrite 8085 Assembly language programs to convert Hexadecimal characters to ASCII values.DiscussionWe know that the ASCII of number 00H is 30H (48D), and ASCII of 09H is39H (57D). So all other numbers ... Read More

8085 Program to Multiply two 8 bits numbers

George John

George John

Updated on 26-Jun-2020 10:42:57

1K+ Views

In this program, we will see how to multiply two 8-bit numbers using 8085 microprocessor.Problem StatementWrite 8085 Assembly language program to multiply two 8-bit numbers stored in a memory location and store the 16-bit results into the memory.DiscussionThe 8085 has no multiplication operation. To get the result of multiplication, we ... Read More

Advertisements