Samual Sam has Published 2492 Articles

FloatBuffer slice() method in Java

Samual Sam

Samual Sam

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

79 Views

A new FloatBuffer with the content as a shared subsequence of the original FloatBuffer can be created using the method slice() in the class java.nio.FloatBuffer. This method returns the new FloatBuffer that is read-only if the original buffer is read-only and direct if the original buffer is direct.A program that ... Read More

AlgorithmParameterGenerator getProvider() method in Java

Samual Sam

Samual Sam

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

41 Views

The provider of the generator object can be obtained using the method getProvider() in the class java.security.AlgorithmParameterGenerator. This method requires no parameters and it returns the provider of the generator object.A program that demonstrates this is given as follows −Example Live Demoimport java.security.*; import java.util.*; public class Demo {    public ... Read More

Duration plusMinutes() method in Java

Samual Sam

Samual Sam

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

94 Views

An immutable copy of a duration where some minutes are added to it can be obtained using the plusMinutes() method in the Duration class in Java. This method requires a single parameter i.e. the number of minutes to be added and it returns the duration with the added minutes.A program ... Read More

How to listdown all the symbols in a .so file in C++

Samual Sam

Samual Sam

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

651 Views

To read a .so file in elf format, use readelfreadelf -Ws libName.soIt helps to extract symbol from binary.The standard tool used for listing all symbol is, nmnm -g libName.so

FloatBuffer wrap() method in Java

Samual Sam

Samual Sam

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

88 Views

A float array can be wrapped into a buffer using the method wrap() in the class java.nio.FloatBuffer. 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

Duration minusHours() method in Java

Samual Sam

Samual Sam

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

43 Views

An immutable copy of a duration where some hours are removed from it can be obtained using the minusHours() method in the Duration class in Java. This method requires a single parameter i.e. the number of hours to be subtracted and it returns the duration with the subtracted hours.A program ... Read More

Ignoring the year in MySQL Query with date range?

Samual Sam

Samual Sam

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

494 Views

To ignore the year with date range, use the DATE_FORMAT() with the between clause. Let us first create a demo table. The query to create a table is as follows −mysql> create table igonreYearDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> ShippingDate date ... Read More

FloatBuffer array() method in Java

Samual Sam

Samual Sam

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

137 Views

A float array for the buffer can be obtained using the method array() in the class java.nio.FloatBuffer. If the returned array is modified, then the contents of the buffer are also similarly modified and vice versa. If the buffer is read-only, then the ReadOnlyBufferException is thrown.A program that demonstrates this ... Read More

AlgorithmParameterGenerator generateParameters() method in Java

Samual Sam

Samual Sam

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

80 Views

The parameters can be generated using the method generateParameters() in the class java.security.AlgorithmParameterGenerator. This method requires no parameters and it returns the AlgorithmParameter object.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[] argv) {     ... Read More

Duration toMillis() method in Java

Samual Sam

Samual Sam

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

105 Views

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

Advertisements