Samual Sam has Published 2492 Articles

Java Program to mark the current position in this input stream

Samual Sam

Samual Sam

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

318 Views

The method java.io.InputStream.mark() is used to mark the current position in this input stream. This method requires a single parameter i.e. the bytes that can be read before the position marked is invalidated.A program that demonstrates this is given as follows −Exampleimport java.io.FileInputStream; import java.io.InputStream; public class Demo {   ... Read More

MySQL GROUP BY date when using datetime?

Samual Sam

Samual Sam

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

5K+ Views

To GROUP BY date while using datetime, the following is the syntax −select *from yourTableName GROUP BY date(yourColumnName);To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table groupByDateDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT ... Read More

How to append a vector in a vector in C++?

Samual Sam

Samual Sam

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

14K+ Views

To append a vector in a vector can simply be done by vector insert() method.AlgorithmBegin    Declare a function show().       Pass a constructor of a vector as a parameter within show()       function.       for (auto const& i: input)         ... Read More

Java Program to create a new list with values from existing list with Function Mapper

Samual Sam

Samual Sam

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

89 Views

To create a new list with values from fields from existing list with Function Mapper, the following is an example. Here, we have a class Employee −class Employee {    private String emp_name;    private int emp_age;    private String emp_zone; }The following is an example that creates a new ... Read More

Where is the MySQL table data stored in Windows?

Samual Sam

Samual Sam

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

461 Views

In order to know the location of MySQL table data, you can use the below syntax −select @@datadir;You can also use SHOW VARIABLES command for this. Following is the syntax −show variables where Variable_name ='datadir';Let us implement the above syntaxes to know where MySQL table stores data −mysql> select @@datadir;This ... Read More

How to write a switch statement in a JSP page?

Samual Sam

Samual Sam

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

2K+ Views

Following is the example of using a switch statement within a JSP page. Live Demo           SWITCH...CASE Example                   The above code will generate the following result −It's Wednesday.

Example Data Link Protocols

Samual Sam

Samual Sam

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

11K+ Views

The data link protocols operate in the data link layer of the Open System Interconnections (OSI) model, just above the physical layer.The services provided by the data link protocols may be any of the following −Framing − The stream of bits from the physical layer are divided into data frames ... Read More

AbstractSequentialList in Java

Samual Sam

Samual Sam

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

67 Views

The Java Collection Framework contains the AbstractSequentialList class. This class is used to create and implement an unmodifiable list. Also this class implements the Collection interface and the AbstractCollection class.A program that demonstrates this is given as follows −Example Live Demoimport java.util.*; public class Demo {    public static void main(String[] ... Read More

CharBuffer wrap() method in Java

Samual Sam

Samual Sam

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

199 Views

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

Packet over SONET

Samual Sam

Samual Sam

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

1K+ Views

Synchronous optical networking (SONET) is a physical layer protocol for transmitting multiple digital bit streams over optical fiber links that form the backbone of the communication networks. Packet-over-SONET (POS) is a standard that maps IP packets into SONET frames. To implement this mechanism, Point – to – Point Protocol (PPP) ... Read More

Advertisements