Ankith Reddy has Published 1070 Articles

W and Z registers in 8085 Microprocessor

Ankith Reddy

Ankith Reddy

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

2K+ Views

To define Temporary Register, we can mention that it is an 8-bit non-programmable resister used to hold data during an arithmetic and logic operation (temporary resister is used to hold intermediate result). The result is stored in the accumulator, and the flags (flip-flops) are set or reset according to the ... Read More

MySQL Select Statement DISTINCT for Multiple Columns?

Ankith Reddy

Ankith Reddy

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

479 Views

To understand the MySQL select statement DISTINCT for multiple columns, let us see an example and create a table. The query to create a table is as followsmysql> create table selectDistinctDemo    -> (    -> InstructorId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> StudentId int,    -> TechnicalSubject ... Read More

memset in C++

Ankith Reddy

Ankith Reddy

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

873 Views

In this section we will see what is the purpose of memset() function in C++. This function converts the value of a character to unsigned character and copies it into each of first n character of the object pointed by the given str[]. If the n is larger than string ... Read More

How to find absolute difference between two numbers in MySQL?

Ankith Reddy

Ankith Reddy

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

3K+ Views

To get the difference between two number in MySQL, let us first create a demo tablemysql> create table findDifferenceDemo -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> FirstNumber float, -> SecondNumber float ... Read More

Temporary (temp) register in 8085 Microprocessor

Ankith Reddy

Ankith Reddy

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

3K+ Views

Temporary register is also an 8-bit register which the programmer can’t access at all. It is temporarily stored inside 8085 microprocessor which is 8 bit operand to the instruction set. For example, when the fetching of instructions “MVI M, 34H” is done the instruction register IR register will receive the ... Read More

Concatenate strings from two fields into a third field in MongoDB?

Ankith Reddy

Ankith Reddy

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

824 Views

To concatenate strings from two fields into a third field, you can use the following syntaxdb.yourCollectionName.aggregate(    [       { $project: { "yourNewFieldName": { $concat: [ "$yourFieldName1", " yourDellimiterValue ", "$yourFieldName2" ] } } }    ] );Let us first create a collection with documents>db.concatenateStringsDemo.insertOne({"StudentFirstName":"John", "StudentLastName":"Doe"}); {   ... Read More

Create Ennead Tuple from an array in Java

Ankith Reddy

Ankith Reddy

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

78 Views

To create Ennead Tuple from an array, use the fromArray() method. Using this method, create an Ennead Tuple using arrays in Java.Let us first see what we need to work with JavaTuples. To work with Ennead class in JavaTuples, you need to import the following package.import org.javatuples.Ennead;Note Download JavaTuples Jar ... Read More

Ternary Operator in Python?

Ankith Reddy

Ankith Reddy

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

11K+ Views

Many programming languages support ternary operator, which basically define a conditional expression.Similarly the ternary operator in python is used to return a value based on the result of a binary condition. It takes binary value(condition) as an input, so it looks similar to an “if-else” condition block. However, it also ... Read More

Order by a function of two columns in a single MySQL query

Ankith Reddy

Ankith Reddy

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

70 Views

Let us first create a tablemysql> create table orderByAFunctionDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> FirstNumber int,    -> SecodNumber int    -> ); Query OK, 0 rows affected (0.44 sec)Insert some records in the table using insert command. The query is ... Read More

C++ Program to Perform Stooge Sort

Ankith Reddy

Ankith Reddy

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

238 Views

Stooge Sort is used to sort the given data. It is a recursive sorting algorithm. Stooge Sort divides the array into two overlapping parts, 2/3 each and Sort the array in three steps by sorting I then II and again I part. The worst case time complexity of this algorithm ... Read More

Advertisements