At the time of executing one 8085 program, interruption can be done in the mid-way by the virtue of the program by an Input Output device. Interruption can be done by the method according to which the processor works, since it wants urgent communication with the processor. The data transfer schemes always want for sending information to the processor, rather receiving information from the 8085 processor. It is so because sending and receiving information in the entire 8085 data transfer scheme process plays a vital role for executing the entire program rather process.The communication is not done directly with the ... Read More
const_castcan be used to remove or add const to a variable. This can be useful if it is necessary to add/remove constness from a variable.static_castThis is used for the normal/ordinary type conversion. This is also the cast responsible for implicit type coercion and can also be called explicitly. You should use it in cases like converting float to int, char to int, etc.dynamic_castThis cast is used for handling polymorphism. You only need to use it when you're casting to a derived class. This is exclusively to be used in inheritance when you cast from base class to derived class.reinterpret_castThis is ... Read More
If you are accessing one type of database, such as Oracle, Sybase, or IBM, the preferred driver type is 4.If your Java application is accessing multiple types of databases at the same time, type 3 is the preferred driver.Type 2 drivers are useful in situations, where a type 3 or type 4 driver is not available yet for your database.The type 1 driver is not considered a deployment-level driver, and is typically used for development and testing purposes only.
This example demonstrate about How to use equalsIgnoreCase () in Android textview.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 − Add the following code to res/layout/activity_main.xml. In the above code, we have taken name as Edit text, when user click on button it will take data and check that given string contains “point”.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; import ... Read More
The long value of a specified Chronofield can be obtained using the getLong() method in the MonthDay class in Java. This method requires a single parameter i.e. the ChronoField and it returns the long value of a specified Chronofield.A program that demonstrates this is given as followsExample Live Demoimport java.util.*; import java.time.*; import java.time.temporal.ChronoField; public class Demo { public static void main(String[] args) { MonthDay md = MonthDay.parse("--02-22"); System.out.println("The MonthDay is: " + md); System.out.println("The MONTH_OF_YEAR is: " + md.getLong(ChronoField.MONTH_OF_YEAR)); } }OutputThe MonthDay is: --02-22 The MONTH_OF_YEAR ... Read More
An immutable copy of a instant where some seconds are subtracted from it can be obtained using the minusSeconds() method in the Instant class in Java. This method requires a single parameter i.e. the number of seconds to be subtracted and it returns the instant with the subtracted seconds.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class Demo { public static void main(String[] args) { Instant i = Instant.now(); System.out.println("The current instant is: " + i); System.out.println("An instant with 10 seconds subtracted is: " + ... Read More
To get the maximum value from three different columns, use the GREATEST() function.The syntax is as followsSELECT GREATEST(yourColumnName1, yourColumnName2, yourColumnName3) AS anyAliasName FROM yourTableName;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table MaxOfThreeColumnsDemo -> ( -> First int, -> Second int, -> Third int -> ); Query OK, 0 rows affected (0.73 sec)Insert some records in the table using insert command.The query is as followsmysql> insert into MaxOfThreeColumnsDemo values(30, 90, 60); Query OK, 1 row affected (0.16 sec) mysql> insert into MaxOfThreeColumnsDemo values(100, ... Read More
You can switch from one database to another using the use command. Here, we are using the collection in the “test” database. Let us insert that collection in another database with the name “sample”.To understand further, let us create a collection with the document. The query to create a collection with a document is as follows −> db.insertOneRecordDemo.insertOne({"UserName":"Larry", "UserAge":23}); { "acknowledged" : true, "insertedId" : ObjectId("5c9534de16f542d757e2b452") } > db.insertOneRecordDemo.insertOne({"UserName":"Chris", "UserAge":26}); { "acknowledged" : true, "insertedId" : ObjectId("5c9534e816f542d757e2b453") } > db.insertOneRecordDemo.insertOne({"UserName":"David", "UserAge":25}); { "acknowledged" : true, "insertedId" : ObjectId("5c9534f116f542d757e2b454") }Display all documents from a collection ... Read More
Let us first create a table. Following is the query −mysql> create table gettingAndOrderingRowsDemo -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Value int -> ); Query OK, 0 rows affected (1.35 sec)Following is the query to insert some records in the table using insert command −mysql> insert into gettingAndOrderingRowsDemo(Value) values(10); Query OK, 1 row affected (0.33 sec) mysql> insert into gettingAndOrderingRowsDemo(Value) values(13); Query OK, 1 row affected (0.32 sec) mysql> insert into gettingAndOrderingRowsDemo(Value) values(0); Query OK, 1 row affected (0.17 sec) mysql> insert into gettingAndOrderingRowsDemo(Value) values(20); Query OK, 1 ... Read More
To keep the insertion order with LinkedHashMap, use Iterator. Let us first create a HashMap and add elements to it −LinkedHashMaplHashMap = new LinkedHashMap(); lHashMap.put("1", "A"); lHashMap.put("2", "B"); lHashMap.put("3", "C"); lHashMap.put("4", "D"); lHashMap.put("5", "E"); lHashMap.put("6", "F"); lHashMap.put("7", "G"); lHashMap.put("8", "H"); lHashMap.put("9", "I");Now, get the values with the values() method. Iterate through the elements and display them −Collection collection = lHashMap.values(); Iterator i = collection.iterator(); while (i.hasNext()) { System.out.println(i.next()); }Example Live Demoimport java.util.Collection; import java.util.Iterator; import java.util.LinkedHashMap; public class Demo { public static void main(String[] args) { LinkedHashMaplHashMap = new LinkedHashMap(); lHashMap.put("1", "A"); ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP