Samual Sam has Published 2492 Articles

Writing a binary file in C++

Samual Sam

Samual Sam

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

6K+ Views

To write a binary file in C++ use write method. It is used to write a given number of bytes on the given stream, starting at the position of the "put" pointer. The file is extended if the put pointer is current at the end of the file. If this ... Read More

LocalTime query() Method in Java

Samual Sam

Samual Sam

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

34 Views

The LocalTime object can be queried as required using the query method in the LocalTime class in Java. This method requires a single parameter i.e. the query to be invoked and it returns the result of the query.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; import ... Read More

C++ Program to Implement Hash Tables Chaining with Doubly Linked Lists

Samual Sam

Samual Sam

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

481 Views

A hash table is a data structure which is used to store key-value pairs. Hash function is used by hash table to compute an index into an array in which an element will be inserted or searched.This is a C++ program to Implement Hash Tables chaining with doubly linked lists.AlgorithmFor ... Read More

LocalTime plus() method in Java

Samual Sam

Samual Sam

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

151 Views

An immutable copy of a LocalTime where the required duration is added to it can be obtained using the plus() method in the LocalTime class in Java. This method requires two parameters i.e. the duration to be added and the TemporalUnit of the duration. Also, it returns the LocalTime object ... Read More

Provider entrySet() method in Java

Samual Sam

Samual Sam

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

78 Views

The entries in the Provider have an unmodifiable set view that can be obtained using the method entrySet() in the class java.security.Provider. This method requires no parameters and it returns the unmodifiable set view for the entries in the Provider.A program that demonstrates this is given as follows −Example Live Demoimport ... Read More

How to insert a row into a table that has only a single autoincrement column?

Samual Sam

Samual Sam

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

337 Views

You can easily insert a row into a table that has only a single auto increment column. The syntax is as follows −insert into yourTableName set yourColumnName =NULL;You can use the below syntax −insert into yourTableName values(NULL);To understand the above syntax, let us create a table. The query to create ... Read More

LocalTime isSupported() method in Java

Samual Sam

Samual Sam

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

45 Views

It can be checked if a ChronoUnit is supported by the LocalTime class or not by using the isSupported() method in the LocalTime class in Java. This method requires a single parameter i.e. the ChronoUnit to check. It returns true if the ChronoUnit is supported by the LocalTime class and ... Read More

Java Program to convert this duration to the total length in milliseconds

Samual Sam

Samual Sam

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

163 Views

With this, get the milliseconds in days, hours and minutes. At first, set the Duration −Duration d1 = Duration.ofDays(20); Duration d2 = Duration.ofHours(100); Duration d3 = Duration.ofMinutes(150);Convert the above Duration to nanoseconds −System.out.println("Milliseconds in 20 days = "+d1.toMillis()); System.out.println("Milliseconds in 100 hours = "+d2.toMillis()); System.out.println("Milliseconds in 150 minutes = "+d3.toMillis());Example Live ... Read More

Provider getInfo() method in Java

Samual Sam

Samual Sam

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

411 Views

An easily readable description of the provider and its services can be obtained using the method getInfo() in the class java.security.Provider. This method requires no parameters and it returns a provider and services description.A program that demonstrates this is given as follows −Example Live Demoimport java.security.*; import java.util.*; public class Demo ... Read More

Static Channel Allocation in computer network

Samual Sam

Samual Sam

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

4K+ Views

When there is more than one user who desires to access a shared network channel, an algorithm is deployed for channel allocation among the competing users. Static channel allocation is a traditional method of channel allocation in which a fixed portion of the frequency channel is allotted to each user, ... Read More

Advertisements