What is Multicasting in Computer Network

Moumita
Updated on 30-Jul-2019 22:30:26

8K+ Views

Multicasting in computer network is a group communication, where a sender(s) send data to multiple receivers simultaneously. It supports one – to – many and many – to – many data transmission across LANs or WANs. Through the process of multicasting, the communication and processing overhead of sending the same data packet or data frame in minimized.Ethernet MulticastEthernet multicast constitutes multicasting at the data link layer of the OSI model for Ethernet networks. Ethernet frames for multicasting are identified by a 1 bit in the LSB (least significant bit) of the first byte of the destination address.IP MulticastIP multicast provides ... Read More

HTML DOM Input Month Name Property

karthikeya Boyini
Updated on 30-Jul-2019 22:30:26

143 Views

The HTML DOM input month name property returns and modify the value of the name attribute of the input field of type=”month” in a HTML document.SyntaxFollowing is the syntax −1. Returning nameobject.name2. Modifying nameobject.name = “text”ExampleLet us see an example of HTML DOM input month name property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%)       center/cover no-repeat;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem; ... Read More

ACOS Function for Complex Number in C++

Arnab Chakraborty
Updated on 30-Jul-2019 22:30:26

181 Views

Here we will see the acos() method for the complex numbers. The complex numbers can be used using complex header file. In that header file the acos() function is also present. This is complex version of normal acos() function. This is used to find complex arc cosine of a complex number.This function takes a complex number as input parameter, and returns the arc cosine as output. Let us see one example to get the idea.Example Live Demo#include #include using namespace std; main() {    complex c1(5, 2);    //acos() function for complex number    cout

Align JLabel Text Vertically to Top in Java

Krantik Chavan
Updated on 30-Jul-2019 22:30:26

2K+ Views

Use the setVerticalAlignment() method to align JLabel text vertically to the top:JLabel label = label.setVerticalAlignment(JLabel.TOP);The following is an example to align JLabel text vertically to the top:Exampleimport java.awt.Color; import java.awt.Font; import javax.swing.*; import javax.swing.border.Border; public class SwingDemo {    public static void main(String args[]) {       JFrame frame = new JFrame("Demo");       JLabel label;       label = new JLabel("This is demo label!");       label.setFont(new Font("Verdana", Font.PLAIN, 14));       label.setVerticalAlignment(JLabel.TOP);       Border border = BorderFactory.createLineBorder(Color.ORANGE);       label.setBorder(border);       frame.add(label);       frame.setSize(600,300);       frame.setVisible(true);    } }Output

DatabaseMetaData supportsResultSetConcurrency Method with Example

Rishi Raj
Updated on 30-Jul-2019 22:30:26

289 Views

While creating a Statement object you can choose the concurrency and the type of the ResultSet object using the following variant of the createStatement() method −Statement createStatement(int resultSetType, int resultSetConcurrency)ResultSet ConcurrencyThe concurrency of the ResultSet object determines whether its contents can be updated or not.The ResultSet interface provides two values to specify the concurrency namely −CONCUR_READ_ONLY: If you set this as a value of the concurrency while creating the ResultSet object you cannot update the contents of the ResultSet you can only read/retrieve them.CONCUR_UPDATABLE: If you set this as a value of the concurrency while creating the ResultSet object you can update ... Read More

How Inline Variables Work in C++17

Chandu yadav
Updated on 30-Jul-2019 22:30:26

3K+ Views

In C++, we can use the inline keyword for functions. In C++ 17 version, the inline variable concept has come.The inline variable is allowed to be defined in multiple translation units. It also follows the one definition rule. If this is defined more than one time, the compiler merges them all into a single object in final program.In C++ (before C++17 version), we cannot initialize the value of static variables directly in the class. We have to define them outside of the class.Example Code#include using namespace std; class MyClass {    public:       MyClass() {       ... Read More

Create Left-Right Split Pane in Java

George John
Updated on 30-Jul-2019 22:30:26

289 Views

To create a left-right split pane, let us create two components and split them −JComponent one = new JLabel("Left Split"); one.setBorder(BorderFactory.createLineBorder(Color.MAGENTA)); JComponent two = new JLabel("Right Split"); two.setBorder(BorderFactory.createLineBorder(Color.ORANGE));Now, we will split them. The two components will be split one to the left of the other using HORIZONTAL_PANE constant −JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, one, two);The following is an example to create a left-right split pane in Java −Examplepackage my; import java.awt.Color; import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JSplitPane; public class SwingDemo {    public static void main(String[] a) {       JFrame frame = new JFrame("SplitPane ... Read More

Get Number of Rows in a Table Without Using COUNT in MySQL

Chandu yadav
Updated on 30-Jul-2019 22:30:26

796 Views

You can use count(1). Let us first see the syntax −select count(1) from yourTableName;Let us first create a table −mysql> create table DemoTable    (    StudentName varchar(100)    ); Query OK, 0 rows affected (0.84 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(StudentName) values('John Smith'); Query OK, 1 row affected (0.24 sec) mysql> insert into DemoTable(StudentName) values('Chris Brown'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable(StudentName) values('David Miller'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable(StudentName) values('Carol Taylor'); Query OK, 1 row affected (0.15 sec)Display all records from ... Read More

Write Your Own Header File in C

Anvi Jain
Updated on 30-Jul-2019 22:30:26

2K+ Views

Steps to write my own header file in C −Type a code and save it as “sub.h”.Write a main program “subtraction.c” in which −include new header file.Write “sub.h” instead of All the functions in sub.h header are now ready for use.Directly call the function sub().Both “subtraction.c” and “sub.h” should be in same folder.Sub.hint sub(int m, int n) {    return(m-n); }subtraction.cExample#include #include "sub.h" void main() {    int a= 7, b= 6, res;    res = sub(a, b);    printf("Subtraction of two numbers is: %d", res); }After running ”subtraction.c” the output will be −OutputSubtraction of two numbers is: 1Read More

What is Broadcasting in Computer Network

Moumita
Updated on 30-Jul-2019 22:30:26

15K+ Views

Broadcasting in computer network is a group communication, where a sender sends data to receivers simultaneously. This is an all − to − all communication model where each sending device transmits data to all other devices in the network domain.The ways of operation of broadcasting may be −A high level operation in a program, like broadcasting in Message Passing Interface.A low level networking operation, like broadcasting on Ethernet.Broadcasting is shown in the following figure −Advantages of BroadcastingBroadcast helps to attain economies of scale when a common data stream needs to be delivered to all, by minimizing the communication and processing ... Read More

Advertisements