Samual Sam has Published 2310 Articles

KeyPairGenerator genKeyPair() method in Java

Samual Sam

Samual Sam

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

146 Views

A key pair can be generated using the genKeyPair() method in the class java.security.KeyPairGenerator. This method requires no parameters and it returns the key pair that is generated.A program that demonstrates this is given as follows −Example Live Demoimport java.security.*; import java.util.*; public class Demo {    public static void main(String[] ... Read More

Extract tuples with specified common values in another column in MySQL?

Samual Sam

Samual Sam

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

454 Views

To extract tuples with specified common values, use the following syntax −SELECT DISTINCT aliasName.yourColumnName1, aliasName.yourColumnName2, aliasName1.yourColumnName 1, aliasName1.yourColumnName2 FROM yourTableName aliasName INNER JOIN yourTableName aliasName1 ON aliasName.yourColumnName1 = aliasName1.yourColumnName1 WHERE aliasName.yourColumnName2 = 'value1' AND aliasName1.yourColumnName2 = 'value2';To understand the above syntax, let us create a table. The query to create ... Read More

IntBuffer wrap() method in Java

Samual Sam

Samual Sam

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

377 Views

An int array can be wrapped into a buffer using the method wrap() in the class java.nio.IntBuffer. This method requires a single parameter i.e. the array to be wrapped into a buffer and it returns the new buffer created. If the returned buffer is modified, then the contents of the ... Read More

How to write a MySQL “LIMIT” in SQL Server?

Samual Sam

Samual Sam

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

344 Views

You need to use TOP(1) in SQL Server. The syntax is as follows −SELECT TOP(1) *FROM yourTableName WHERE yourCondition;To understand the above syntax, let us create a table. The query to create a table is as follows −create table TopDemoInSQLServer (    Id int,    Name varchar(10) );The snapshot of ... Read More

How to apply XSL transformation on an XML document?

Samual Sam

Samual Sam

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

511 Views

The tag applies an XSL transformation on an XML document.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultdocSource XML document for the XSLT transformationNoBodydocSystemIdURI of the original XML documentNoNonexsltXSLT stylesheet providing transformation instructionsYesNonexsltSystemIdURI of the original XSLT documentNoNoneresultResult object to accept the transformation's resultNoPrint to pagevarVariable that is set to ... Read More

IntBuffer put() method in Java

Samual Sam

Samual Sam

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

115 Views

The required value can be written at the current position of the buffer and then the current position is incremented using the method put() in the class java.nio.IntBuffer. This method requires a single parameter i.e. the value to be written in the buffer and it returns the buffer in which ... Read More

KeyPairGenerator getInstance() method in Java

Samual Sam

Samual Sam

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

198 Views

A KeyPairGenerator object with the key pairs for a particular algorithm can be obtained using the getInstance() method in the class java.security.KeyPairGenerator. This method requires a single parameter i.e. the algorithm name and it returns the KeyPairGenerator object created.A program that demonstrates this is given as follows −Example Live Demoimport java.security.*; ... Read More

What is a taglib directive in JSP?

Samual Sam

Samual Sam

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

152 Views

The JavaServer Pages API allow you to define custom JSP tags that look like HTML or XML tags and a tag library is a set of user-defined tags that implement custom behavior.The taglib directive declares that your JSP page uses a set of custom tags, identifies the location of the ... Read More

LocalDateTime withDayOfMonth() method in Java

Samual Sam

Samual Sam

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

100 Views

An immutable copy of a LocalDateTime with the day of month altered as required is done using the method withDayOfMonth() in the LocalDateTime class in Java. This method requires a single parameter i.e. the day of month that is to be set in the LocalDateTime and it returns the LocalDateTime ... Read More

How to check if an input string contains a specified substring in JSP?

Samual Sam

Samual Sam

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

3K+ Views

The fn:contains() function determines whether an input string contains a specified substring.SyntaxThe fn:contains() function has the following syntax −boolean contains(java.lang.String, java.lang.String)ExampleFollowing example explains the functionality of fn:contains() function −           Using JSTL Functions     ... Read More

Advertisements