Check Two ArrayList for Equality in Java

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

850 Views

Two ArrayList can be compared to check if they are equal or not using the method java.util.ArrayList.equals(). This method has a single parameter i.e. an ArrayList that is compared with the current object. It returns true if the two ArrayList are equal and false otherwise.A program that demonstrates this is given as follows −Example Live Demoimport java.util.ArrayList; import java.util.List; public class Demo { public static void main(String[] args) { List aList1 = new ArrayList(); aList1.add("Sun"); aList1.add("Moon"); ... Read More

Difference Between Two Timestamps in Seconds in MySQL

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:24

298 Views

You can use in-built function UNIX_TIMESTAMP() from MySQL to get the timestamps and the difference between two timestamps. The syntax is as follows −SELECT UNIX_TIMESTAMP(yourColumnName1) - UNIX_TIMESTAMP(yourColumnName2) as anyVariableName from yourTableName;To understand the above concept, let us create a table. The following is the query to create a table −mysql> create table DifferenceInSeconds −> ( −> FirstTimestamp TIMESTAMP, −> SecondTimestamp TIMESTAMP −> ); Query OK, 0 rows affected (0.93 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into DifferenceInSeconds values('2012-12-12 ... Read More

Difference Between CV and Resume

Leela
Updated on 30-Jul-2019 22:30:24

298 Views

To being with, the basic difference between CV and Resume is CV is British English and Resume is an American word for your career profile. Now, leaving the vocabulary aside, there are principle differences between the two and let us look at those differences.A CV (Curriculum Vitae, which means the course of life in Latin) is an elaborate document which runs over two or more pages. It is your professional biography which speaks in detail about your achievements and accomplishments. CV covers not only your academics and career graph but also other accomplishments like publications, awards, honors etc. This document ... Read More

Header Function in PHP

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

526 Views

The header() function sends a raw HTTP header to a client.Syntaxheader(string,replace,resp_code)Parametersstring − The header string to send.replace − Indicates whether the header should replace previous or add a second header.resp_code − It forces the HTTP response code to the specified valueReturnThe header() function returns nothing.ExampleThe following is an example to save a generated PDF −

Get Tail Set from TreeSet in Java

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

198 Views

To get the Tail Set from TreeSet, use the tailSet() method. Tail Set begins from a point and returns the elements greater than the element set in the beginning.First, create a TreeSet and add elements −TreeSet set = new TreeSet(); set.add("78"); set.add("56"); set.add("88"); set.add("54"); set.add("76"); set.add("34");Now, get the Tail Set −SortedSet sorted = set.tailSet("56");The following is an example to get Tail Set from TreeSet −Example Live Demoimport java.util.*; public class Demo {    public static void main(String args[]){       TreeSet set = new TreeSet();       set.add("78");       set.add("56");       set.add("88");       ... Read More

Combine Date and Time Column into a Timestamp in MySQL

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

13K+ Views

To combine date and time column into a timestamp, you can use cast() function with concat().The syntax is as follows −select cast(concat(yourDateColumnName, ' ', yourTimeColumnName) as datetime) as anyVariableName from yourTableName;In the above concept, you will use cast() when your date and time is in string format. The cast() function can be used only for datetime. To understand the above syntax, let us create a table.The query to create a table is as follows −mysql> create table DateAndTimeToTimestamp −> ( −> Duedate date, −> DueTime time −> ); ... Read More

Literary Qualities of Samuel Taylor Coleridge

Ridhi Arora
Updated on 30-Jul-2019 22:30:24

2K+ Views

Samuel Taylor Coleridge is a popular name among all Romantic poets who were influenced by the French Revolution. He was a leader of the British Romantic movement and was born on October 21, 1772, in Devonshire, England.Literary Qualities of Samuel Taylor Coleridge1. Treatment of the supernatural: He treats the supernatural in such a manner that it becomes convincing and at the same time, in some sense, a criticism of life.2. Suspension of Disbelief: The way in which Coleridge has achieved the willing suspension of disbelief has been even explained beautifully in the book The Romantic Imagination by Bowra.3. Realism: He ... Read More

FTP alloc Function in PHP

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

152 Views

The ftp_alloc() function allocates space for a file to be uploaded to the FTP server.Syntaxftp_alloc(connection,size_of_file,res);Parametersconnection − The FTP connection to usesize_of_file − The number of bytes to allocateres − A variable to store the server responseReturnThe ftp_alloc() function returns TRUE on success or FALSE on failureExampleThe following is an example −

Find Names Starting with A, B, or C Using MySQL Query

Ankith Reddy
Updated on 30-Jul-2019 22:30:24

7K+ Views

You need to use LIKE with OR operator to find all the names that starts with a or b or c. The syntax is as follows:SELECT *FROM yourTableName WHERE yourColumnName like 'A%' or yourColumnName like 'B%' or yourColumnName like 'C%';The above query finds all names that starts only with the letter ‘a’ or ‘b’ or ‘c’. To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table AllNamesStartWithAorBorC    -> (    -> Id int NOT NULL AUTO_INCREMENT,    -> EmployeeName varchar(20),    -> PRIMARY KEY(Id)    -> ); Query ... Read More

Interrupt Structure in Z-80

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

2K+ Views

As we know that the Intel 8085 has five interrupt pins (TRAP, RST7.5, RST6.5, RST6.5 and INTR), but the Zilog Z-80 has only two interrupt pin. The NMI and INT . But it has superior interrupt structure compared to 8085.The INT InterruptIt is an active low, level triggered input interrupt. This is maskable and using DI instruction this can be disabled. When the interrupt pin is disabled, the Z-80 will not be interrupted if the IO devices enables the INT pin. Even after the reset, it will be disabled. So if we want that the MPU will be interrupted by the pin, there must be ... Read More

Advertisements