Samual Sam has Published 2310 Articles

Get the strings in the table records that ends with numbers?

Samual Sam

Samual Sam

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

88 Views

You need to use REGEXP for this. The syntax is as follows −select *from yourTableName where yourColumnName REGEXP '[[:digit:]]$';To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table StringEndsWithNumber    -> (    -> Id int NOT NULL ... Read More

What is autoFlush attribute in JSP?

Samual Sam

Samual Sam

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

2K+ Views

The autoFlush attribute specifies whether the buffered output should be flushed automatically when the buffer is filled, or whether an exception should be raised to indicate the buffer overflow.A value of true (default) indicates automatic buffer flushing and a value of false throws an exception.The following directive causes the servlet ... Read More

Java Program to find keys from a Linked HashMap and store it in a list

Samual Sam

Samual Sam

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

178 Views

Let us first create a LinkedHashMap with key-value pair −Mapmap = new LinkedHashMap(); map.put("1", "Katie"); map.put("2", "Peter"); map.put("3", "Amy"); map.put("4", "Kane"); map.put("5", "Colin"); map.put("6", "Andre"); map.put("7", "Pollard"); map.put("8", "David"); map.put("9", "Jofra"); map.put("10", "Akila");Now, create a new List and store the keys in it for the above Map −Listlist = new ... Read More

How do I remove a uniqueness constraint from a MySQL table?

Samual Sam

Samual Sam

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

201 Views

You can use DROP INDEX for this. The syntax is as follows −alter table yourTablename drop index yourUniqueName;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table removeUniquenessConstraint    -> (    -> Id int,    -> Name ... Read More

What are the different quote marks of MySQL?

Samual Sam

Samual Sam

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

285 Views

You can use backticks and single quotes in MySQL. The backtick can be used around the column name and table name while single quotes can be used for the column name values.Let us take an example for both the quote marks. To understand the above syntax, let us create a ... Read More

What is errorPage attribute in JSP?

Samual Sam

Samual Sam

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

693 Views

The errorPage attribute tells the JSP engine which page to display if there is an error while the current page runs. The value of the errorPage attribute is a relative URL.The following directive displays MyErrorPage.jsp when all uncaught exceptions are thrown −The isErrorPage attribute indicates that the current JSP can ... Read More

IntBuffer as ReadOnlyBuffer() method in Java

Samual Sam

Samual Sam

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

72 Views

A read-only int buffer can be created using the contents of a buffer with the method asReadOnlyBuffer() in the class java.nio.IntBuffer. The new buffer cannot have any modifications as it is a read-only buffer. However, the capacity, positions, limits etc. of the new buffer are the same as the previous ... Read More

How to pass a date variable in sql query in a JSP?

Samual Sam

Samual Sam

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

1K+ Views

The tag is used as a nested action for the and the tag to supply a date and time value for a value placeholder. If a null value is provided, the value is set to SQL NULL for the placeholder.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueValue ... Read More

How to fill multiple copies of specified Object to a List in Java

Samual Sam

Samual Sam

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

830 Views

To fill multiple copies of specified object to a list means let’s say you have an element 100 and want to display it 10 times. For this, let us see an example.The following is our list and iterator. We have used nCopiec Collections method to set the elements and how ... Read More

SecureRandom generateSeed() method in Java

Samual Sam

Samual Sam

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

190 Views

The number of seed bytes can be obtained using the method generateSeed() in class java.security.SecureRandom. This method requires a single parameter i.e. the number of seed bytes and it returns the seed bytes that are generated.A program that demonstrates this is given as follows −Example Live Demoimport java.security.*; import java.util.*; public ... Read More

Advertisements