George John has Published 1167 Articles

Problem using the column name 'from' in a MySQL query?

George John

George John

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

264 Views

You cannot use ‘from’ as column name directly because ‘from’ is a reserved word in MySQL.If you want to still use it, then you need to use the backtick symbol.Let us first create a table −mysql> create table DemoTable    (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,   ... Read More

How to get the primary key “column name” of a specific table in MySQL?

George John

George John

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

780 Views

Let us first create a table wherein we have a Primary Key CustomerId −mysql> create table DemoTable    (    CustomerId int NOT NULL AUTO_INCREMENT,    CustomerName varchar(20),    CustomerAge int,    CustomerCountryName varchar(100),    PRIMARY KEY(CustomerId)    ); Query OK, 0 rows affected (0.94 sec)Following is the query to ... Read More

8085 program to subtract two consecutive bytes of an array

George John

George John

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

191 Views

Here we will see how we can subtract two consecutive elements in an array using 8085.Problem StatementWrite 8085 program to subtract two consecutive elements of an array and store them in the same location. The results will be placed at the same location from where they are taken. The numbers ... Read More

8085 Program to simulate a real-time clock

George John

George John

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

2K+ Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to generate real time clock using 8085.Problem Statement:Write 8085 Assembly language program to simulate real-time clock.Discussion:In this program we are creating a real time clock using 8085MPU. Here we are generating 1s delay ... Read More

Delete one row and reorder the others with the correct ID in MySQL?

George John

George John

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

434 Views

To understand the concept, let us first create a table. The query to create a table is as followsmysql> create table ReorderSortDemo -> ( -> UserId int -> ); Query OK, 0 rows affected (0.57 sec)Insert some records in the table ... Read More

String manipulation instructions in 8086 microprocessor

George John

George John

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

9K+ Views

String is a group of bytes/words and their memory is always allocated in a sequential order. String is either referred as byte string or word string. Here we will see some instructions which are used to manipulate the string related operations.The String manipulation instructions are as follows.OpcodeOperandDescriptionREPInstructionUsed to repeat the ... Read More

Removing all collections whose name matches a string in MongoDB

George John

George John

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

442 Views

To remove all collections whose name matches a string, you can follow some steps. Use for loop to iterate over all collections and find that particular collection name with certain string. After that, use the drop method to remove all collections.Let’s say we are using the database “sample”. The collections ... Read More

IntStream asLongStream() method in Java

George John

George John

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

210 Views

The asLongStream() method of the IntStream class returns a LongStream consisting of the elements of this stream, converted to long.The syntax is as followsLongStream asLongStream()Create an IntStream and add some elements in the StreamIntStream intStream = IntStream.of(30, 40, 60, 70, 90, 110, 140, 150);Now, use the asLongStream() method to convert ... Read More

Reset Accumulator (8085 & 8086 microprocessor)

George John

George John

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

3K+ Views

In this section we will see how to reset the accumulator content in Intel 8085 and 8086 microprocessors.In both of the microprocessors, there are four instructions to do the work. These instructions are doing the same in both cases.Let us see the 8085 instructions first to reset the Accumulator.MnemonicsDescriptionMVI A, ... Read More

C++ Program to Find the Minimum element of an Array using Binary Search approach

George John

George John

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

175 Views

This is a C++ Program to find the minimum element of an array using Linear Search approach. The time complexity of this program is O(log(n)).AlgorithmBegin Construct binary search tree for the given unsorted data array. To find out the minimum element move the pointer ... Read More

Advertisements