Reset Accumulator in 8085 and 8086 Microprocessor

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, 00HThis instruction loads 00H into the accumulator. This is two-byte instruction.ANI 00HThis instruction performs AND operation between accumulator and 00H. This is also a two-byte instruction.XRA AThis one-byte instruction is performing the XOR operation with accumulator itself.SUB ASUB A is another one-byte instruction. It subtracts accumulator value from the accumulator. The ... Read More

Create Septet Tuple from Array in Java

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

145 Views

Let us first see what we need to work with JavaTuples. To work with Septet class in JavaTuples, you need to import the following package −import org.javatuples.Septet;Note − Steps to download and run JavaTuples program. If you are using Eclipse IDE to run Septet Class in JavaTuples, then Right Click Project → Properties → Java Build Path → Add External Jars and upload the downloaded JavaTuples jar file.The following is an example −Exampleimport org.javatuples.Septet; public class Demo { public static void main(String[] args) { String[] myArr = { ... Read More

Use of JSP Plugin Action Element

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

287 Views

The plugin action is used to insert Java components into a JSP page. It determines the type of browser and inserts the or tags as needed.If the needed plugin is not present, it downloads the plugin and then executes the Java component. The Java component can be either an Applet or a JavaBean.The plugin action has several attributes that correspond to common HTML tags used to format Java components. The element can also be used to send parameters to the Applet or Bean.Following is the typical syntax of using the plugin action −         ... Read More

JDBC CLOB Data Type: Store and Read Data

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

12K+ Views

CLOB stands for Character Large Object in general, an SQL Clob is a built-in datatype and is used to store large amount of textual data. Using this datatype, you can store data up to 2, 147, 483, 647 characters.The java.sql.Clob interface of the JDBC API represents the CLOB datatype. Since the Clob object in JDBC is implemented using an SQL locator, it holds a logical pointer to the SQL CLOB (not the data).MYSQL database provides support for this datatype using four variables.TINYTEXT: A CLOB type with a maximum of 28-1 (255) characters.TEXT: A CLOB type with a maximum of 216-1 ... Read More

IntStream peek Method in Java

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

752 Views

The peek() method in the IntStream class in Java returns a stream consisting of the elements of this stream. It additionally performs the provided action on each element as elements are consumed from the resulting stream.The syntax is as followsIntStream peek(IntConsumer action)Here, the parameter action is a non-interfering action to perform on the elements as they are consumed from the stream. The IntConsumer represents an operation that accepts a single int-valued argument and returns no result.The following is an example to implement IntStream peek() method in JavaExample Live Demoimport java.util.*; import java.util.stream.IntStream; public class Demo { public static ... Read More

Decade Class in Java Tuples

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

138 Views

A Decade class is a Tuple with 10 elements. It is in the JavaTuples library. The following is the declaration −public final class Decade extends Tuple implements IValue0, IValue1 , IValue2, IValue3, IValue4, IValue5, IValue6, IValue7, IValue8, IValue9Let us first see what we need to work with JavaTuples. To work with Decade class in JavaTuples, you need to import the following package −import org.javatuples.Decade;Note − Download JavaTuples Jar library to run JavaTuples program. If you are using Eclipse IDE, then Right Click Project -> Properties -> Java Build Path -> Add External Jars and upload the downloaded JavaTuples jar file. ... Read More

Create and Release a Save Point in JDBC

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

1K+ Views

When you set a save point you define a logical rollback point within a transaction. If an error occurs past a save point, you can use the rollback method to undo either all the changes or only the changes made after the save point.Savepoint interface gives you the additional transactional control. Most modern DBMS, support save points within their environments such as Oracle's PL/SQL.Setting a save pointYou can set a save point in a database using the setSavepoint(String savepointName) method of the Connection interface, this method accepts a string value representing the name of the save point and returns a ... Read More

Use Apply in Android Shared Preferences with Example

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

506 Views

Before getting into shared preference apply(), we should know what is shared preferences in android. Using share preference, we can store or retrieve values as key and value pair. There are five different methods are available in share preference as shown below -Edit()- It going to edit shared preference valuescommit()- it going to commit shared preference values in xml fileapply()- It going to commit back changes from editor to shared preference.remove(String key)- It going to remove key and vales from shared preference use key.Put()- It going to put key and values to shared preference xml.A sample example syntax of shared ... Read More

Find All Documents in MongoDB with a Specific Field

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

153 Views

To use MongoDB to find all documents which have a field, regardless of the value of that field, use the $exists operator. Following is the syntaxdb.yourCollectionName.find({yourFieldName:{$exists:true}});Let us create a collection with documents>db.findAllDocumentWhichHaveFieldDemo.insertOne({"StudentName":"John", "StudentAge":null}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9d1d60a629b87623db1b22") } >db.findAllDocumentWhichHaveFieldDemo.insertOne({"StudentName":"Larry", "StudentAge":null}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9d1d70a629b87623db1b23") } >db.findAllDocumentWhichHaveFieldDemo.insertOne({"StudentName":"Chris", "StudentAge":""}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9d1d7ba629b87623db1b24") } >db.findAllDocumentWhichHaveFieldDemo.insertOne({"StudentName":"Robert", "StudentAge":""}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9d1d81a629b87623db1b25") }Following is the query to display all documents from a collection with the help of find() method> db.findAllDocumentWhichHaveFieldDemo.find().pretty();This will produce the following ... Read More

Select Table with Greatest Number of Columns in MySQL

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

145 Views

You can use INFORMATION_SCHEMA.COLUMNS to get the table with the greatest number of columns. The syntax is as follows −SELECT TABLE_NAME, COUNT(*) AS anyAliasName FROM INFORMATION_SCHEMA.COLUMNS GROUP BY TABLE_NAME ORDER BY yourAliasName DESC LIMIT 1;Following is the query to select the table that has the greatest number of columns. We are getting this result because we have set the count to DESC and used GROUP BY TABLE_NAME −mysql> SELECT TABLE_NAME, COUNT(*) as TOTAL_COUNT FROM INFORMATION_SCHEMA.COLUMNS GROUP BY TABLE_NAME ORDER BY TOTAL_COUNT DESC LIMIT 1;This will produce the following output −+-----------------------------------+-------------+ | TABLE_NAME                   ... Read More

Advertisements