You can create a function using create function command. The syntax is as follows −delimiter // DROP FUNCTION if exists yourFunctionName; CREATE FUNCTION yourFunctionName(Parameter1, ...N) returns type BEGIN # declaring variables; # MySQL statementns END // delimiter ;First, here we will create a table and add some records in the table. After that, a simple function will be created. The following is the query to create a table −mysql> create table ViewDemo −> ( −> Id int, −> Name varchar(200), −> Age int −> ); ... Read More
NOTE: There is only one difference between AND and && is that AND is a standard while && is ownership syntax.Except the above statement, there is no difference between AND and &&. Let us look at all the conditions.The result of AND and && will always be either 1 or 0. As we know the AND and && both are logical operators, if there are more than one operand and any one of them has value 0 then result becomes 0 otherwise 1.Here is the demo of AND and &&.Case 1(a): If both operands are 1. Using AND.The query is ... Read More
The Zilog Z-80 is 40 pin DIP Microprocessor. Here we will see the actual pin level diagram of Z-80 and also the functional pin diagram of it.This is the actual pin diagram of Z-80 Microprocessor. Now we will see the functional pin diagram of it.Now let us see the Pin functions of the Z-80 microprocessor.PinsTypeFunctionA15 – A0Output16-bit address bus, which provides the addresses for memory (up to 64KB)D7 – D0Input/Output8-bit bi-directional data bus to transfer data between memory/IO devices and CPU.BUSACKOutputIt is Bus Acknowledge pin. It indicates the requesting device that the address bus, data bus, control bus enter into ... Read More
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
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
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
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 −
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
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
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