Samual Sam has Published 2492 Articles

What is auto refresh feature in JSP?

Samual Sam

Samual Sam

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

139 Views

JSP makes this job easy by providing you a mechanism where you can make a webpage in such a way that it would refresh automatically after a given interval.The simplest way of refreshing a Webpage is by using the setIntHeader() method of the response object. Following is the signature of ... Read More

MonthDay get() method in Java

Samual Sam

Samual Sam

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

67 Views

The value of the specified field from the MonthDay can be obtained using the get() method in the MonthDay class in Java. This method requires a single parameter i.e. ChronoField that is required and it returns the value of the specified field from the MonthDay.A program that demonstrates this is ... Read More

Using Time datatype in MySQL without seconds?

Samual Sam

Samual Sam

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

2K+ Views

You need to use DATE_FORMAT() for this. The syntax is as follows −SELECT DATE_FORMAT(yourColumnName, '%k:%i') as anyAliasName FROM yourTableName;You can use ‘%H:%i’ for the same result. To understand the above syntax, let us create a table.The query to create a table is as follows −mysql> create table TimeDemo    -> ... Read More

Duration ofSeconds() method in Java

Samual Sam

Samual Sam

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

823 Views

The duration can be obtained in a one second format using the ofSeconds() method in the Duration class in Java. This method requires two parameters i.e. the number of seconds and the adjustment required in nanoseconds. Also, it returns the duration in a one second format. If the capacity of ... Read More

The contains() method of Triplet class in JavaTuples

Samual Sam

Samual Sam

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

60 Views

The contains() method is used to search a value in Triplet class.Let us first see what we need to work with JavaTuples. To work with Triplet class in JavaTuples, you need to import the following package −import org.javatuples.Triplet;Note − Steps to download and run JavaTuples program If you are using ... Read More

Duration ZERO field in Java

Samual Sam

Samual Sam

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

376 Views

The ZERO field sets the duration to zero in the Duration class in Java. This field is quite the same as the null value in different data types in Java.A program that demonstrates the ZERO field is given as follows −Example Live Demoimport java.time.Duration; public class Demo {    public static ... Read More

MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=10'?

Samual Sam

Samual Sam

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

671 Views

You can use SET command, but SET OPTIOn deprecated. Therefore, use SET SQL_SELECT_LIMIT.The syntax is as follows −SET SQL_SELECT_LIMIT=yourIntegerValue;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table MySQLSelectDemo    -> (    -> Id int NOT NULL ... Read More

ShortBuffer hasArray() method in Java

Samual Sam

Samual Sam

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

67 Views

It can be checked if a buffer has the backing of an accessible short array by using the method hasArray() in the class java.nio.ShortBuffer. This method returns true if the buffer has the backing of an accessible double array and false otherwise.A program that demonstrates this is given as follows ... Read More

Duration toString() method in Java

Samual Sam

Samual Sam

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

114 Views

The string value of the duration can be obtained using the method toString() in the Duration class in Java. This method requires no parameters and it returns the string value of the duration.A program that demonstrates this is given as follows −Example Live Demoimport java.time.Duration; public class Demo { ... Read More

How to send a simple text based email using a JSP page?

Samual Sam

Samual Sam

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

225 Views

To send an email using a JSP, you should have the JavaMail API and the Java Activation Framework (JAF) installed on your machine.You can download the latest version of JavaMail (Version 1.2) from the Java's standard website.You can download the latest version of JavaBeans Activation Framework JAF (Version 1.0.2) from ... Read More

Advertisements