W and Z registers in 8085 Microprocessor

Ankith Reddy
Updated on 30-Jul-2019 22:30:25
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 result of the operation.W and Z are two 8-bit temporary registers of 8085 microprocessor, which is not accessible to the user. They are exclusively used for the internal operation by the microprocessor. These registers are used either to store 8-bit of information in each W and Z registers or a ... Read More

How to use pie chart graph in android?

Nitya Raut
Updated on 30-Jul-2019 22:30:25
This example demonstrate about How to use pie chart graph 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 − Open build.gradle(module level) and add library dependency.apply plugin: 'com.android.application' android {    packagingOptions {       exclude 'META-INF/proguard/androidx-annotations.pro'    }    packagingOptions {       exclude 'META-INF/DEPENDENCIES'       exclude 'META-INF/LICENSE'       exclude 'META-INF/LICENSE.txt'       exclude 'META-INF/license.txt'       exclude 'META-INF/NOTICE'       exclude 'META-INF/NOTICE.txt'       exclude 'META-INF/notice.txt'     ... Read More

JavaTuples addAtX() method for Quartet class

Samual Sam
Updated on 30-Jul-2019 22:30:25
The addAtX() method is used to add a value to the Quartet Tuple. The index can be set here with the X i.e. the place where the value gets added.Let us first see what we need to work with JavaTuples. To work with Quartet class in JavaTuples, you need to import the following package −import org.javatuples.Quartet;We will use Quintet class; therefore, we will import the following package −import org.javatuples.Quintet;Note − Steps to download and run JavaTuples program If you are using Eclipse IDE to run Quartet Class in JavaTuples, then Right Click Project → Properties → Java Build Path → ... Read More

How to setup a Web server like Tomcat to test JSP pages?

Samual Sam
Updated on 30-Jul-2019 22:30:25
Apache Tomcat is an open source software implementation of the JavaServer Pages and Servlet technologies and can act as a standalone server for testing JSP and Servlets, and can be integrated with the Apache Web Server. Here are the steps to set up Tomcat on your machine −Download the latest version of Tomcat from https://tomcat.apache.org/.Once you downloaded the installation, unpack the binary distribution into a convenient location. For example, in C:\apache-tomcat-5.5.29 on windows, or /usr/local/apache-tomcat-5.5.29 on Linux/Unix and create CATALINA_HOME environment variable pointing to these locations.Tomcat can be started by executing the following commands on the Windows machine −%CATALINA_HOME%\bin\startup.bat ... Read More

What is the use of tag in JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25
The tag allows proper URL request parameter to be specified with URL and also does the necessary URL encoding required.Within a tag, the name attribute indicates the parameter name, and the value attribute indicates the parameter value −AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultnameName of the request parameter to set in the URLYesNonevalueValue of the request parameter to set in the URLNoBodyExampleIf you need to pass parameters to a tag, use the tag to create the URL first as shown below − The above request will ... Read More

LocalDate toString() method in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25
The string value of the LocalDate object can be obtained using the method toString() in the LocalDate class in Java. This method requires no parameters and it returns the string value of the LocalDate object.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class Demo { public static void main(String[] args) { LocalDate ld = LocalDate.parse("2019-02-15"); System.out.println("The LocalDate is: " + ld.toString()); } }OutputThe LocalDate is: 2019-02-15Now let us understand the above program.The string value of the LocalDate ... Read More

The subList() method of AbstractList class in Java

George John
Updated on 30-Jul-2019 22:30:25
The subList() method returns a part of this list between the specified fromIndex, inclusive, and toIndex, exclusive. Get a sublist using the method by setting the range as the two parameters.The syntax is as follows.public List subList(int fromIndex, int toIndex)Here, the parameter fromIndex is the low endpoint (inclusive) of the subList and toIndex is the high endpoint (exclusive) of the subList.To work with the AbstractList class, import the following package.import java.util.AbstractList;The following is an example to implement subList() method of the AbstractlList class in Java.Exampleimport java.util.ArrayList; import java.util.AbstractList; public class Demo {    public static void main(String[] args) {   ... Read More

How to create MongoDB stored procedure?

Smita Kapse
Updated on 30-Jul-2019 22:30:25
The following is the syntax to create MongoDB stored procedure −db.system.js.save (    {       _id:"yourStoredProcedueName",       value:function(argument1,....N)       {          statement1,          .          .          N       }    } );Now implement the above syntax. The query to create a stored procedure is as follows −> db.system.js.save (    {       _id:"addTwoValue",       value:function(a,b)       {          return a+b       }    } );The following is the output −WriteResult({ "nMatched" : 0, "nUpserted" : 1, "nModified" : 0, "_id" : "addTwoValue" })Now you can call the stored procedure using eval(). The query is as follows −> db.eval("return addTwoValue(100,25)"); 125

How can I enforce compound uniqueness in MySQL?

Chandu yadav
Updated on 30-Jul-2019 22:30:25
You can enforce compound uniqueness in MySQL with the help of UNIQUE keyword. Here is the syntax to add UNIQUE keyword to your table column.The syntax is as followsCREATE TABLE yourTableName (    yourColumnName1 datatype,    yourColumnName2 datatype,    yourColumnName3 datatype,    .    .    N    UNIQUE yourConstarintName(yourColumnName2, yourColumnName3) );To understand the above concept, let us create a table with some columns and add a unique constraint to a table. The query to create a table is as followsmysql> create table UniqueDemo    -> (    -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> StudentName varchar(100), ... Read More

log() function in C++

George John
Updated on 30-Jul-2019 22:30:25
The C/C++ library function double log(double x) returns the natural logarithm (basee logarithm) of x. Following is the declaration for log() function.double log(double x)The parameter is a floating point value. And this function returns natural logarithm of x.Example Live Demo#include #include using namespace std; int main () {    double x, ret;    x = 2.7;    /* finding log(2.7) */    ret = log(x);    cout
Advertisements