Karthikeya Boyini has Published 2383 Articles

FloatBuffer get() method in Java

karthikeya Boyini

karthikeya Boyini

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

125 Views

The value at the current position of the buffer is read and then incremented using the method get() in the class java.nio.FloatBuffer. This method returns the value that is at the current buffer position. Also, the BufferUnderflowException is thrown if underflow situation occurs.A program that demonstrates this is given as ... Read More

How to insert own values into auto_increment column in MySQL?

karthikeya Boyini

karthikeya Boyini

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

686 Views

You can achieve this with the help of INSERT statement i.e, you can simply insert it like a normal insert. The syntax is as follows −INSERT INTO yourTableName (yourIdColumnName, yourColumnName) values(value1, 'value2'); Let us first create a table: mysql> create table InsertValueInAutoIncrement -> ( ... Read More

Duration plusHours() method in Java

karthikeya Boyini

karthikeya Boyini

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

63 Views

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

Read/Write structure to a file using C

karthikeya Boyini

karthikeya Boyini

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

11K+ Views

fwrite() and fread() is used to write to a file in C.fwrite() syntaxfwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)whereptr - A pointer to array of elements to be writtensize - Size in bytes of each element to be writtennmemb - Number of elements, each one with a size ... Read More

FloatBuffer put() method in Java

karthikeya Boyini

karthikeya Boyini

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

91 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.FloatBuffer. 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

AlgorithmParameterGenerator getAlgorithm() method in Java

karthikeya Boyini

karthikeya Boyini

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

38 Views

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

Duration minusDays() method in Java

karthikeya Boyini

karthikeya Boyini

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

82 Views

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

What is the best way to read an entire file into a std::string in C++?

karthikeya Boyini

karthikeya Boyini

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

2K+ Views

This is an simple way to read an entire file into std::string in C++AlgorithmBegin    Take the filename as inputstream.    Declare a string variable str.    Read the file till the end by using rdbuf().    Put the data into st.    Print the data. End.Example Code#include #include #include ... Read More

FloatBuffer equals() method in Java

karthikeya Boyini

karthikeya Boyini

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

79 Views

The equality of two buffers can be checked using the method equals() in the class java.nio.FloatBuffer. Two buffers are equal if they have the same type of elements, the same number of elements and same sequence of elements. The method equals() returns true if the buffers are equal and false ... Read More

Duration toNanos() method in Java

karthikeya Boyini

karthikeya Boyini

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

71 Views

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

Advertisements