Connection-Oriented Services

Jai Janardhan
Updated on 17-Jun-2020 12:24:55

7K+ Views

A connection-oriented service is one that establishes a dedicated connection between the communicating entities before data communication commences. It is modeled after the telephone system. To use a connection-oriented service, the user first establishes a connection, uses it and then releases it. In connection-oriented services, the data streams/packets are delivered to the receiver in the same order in which they have been sent by the sender.Connection-oriented services may be done in either of the following ways −Circuit-switched connection: In circuit switching, a dedicated physical path or a circuit is established between the communicating nodes and then data stream is transferred.Virtual circuit-switched ... Read More

Create a Triangle Using Python for Loop

Sravani S
Updated on 17-Jun-2020 12:24:20

6K+ Views

There are multiple variations of generating triangle using numbers in Python. Let's look at the 2 simplest forms:for i in range(5):    for j in range(i + 1):       print(j + 1, end="")    print("")This will give the output:1 12 123 1234 12345You can also print numbers continuously using:start = 1 for i in range(5):    for j in range(i + 1):       print(start, end=" ")       start += 1    print("")This will give the output:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15You can also print these numbers in reverse using:start = 15 for i in range(5):    for j in range(i + 1):       print(start, end=" ")       start -= 1    print("")This will give the output:15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

Connectionless Services

Arushi
Updated on 17-Jun-2020 12:24:16

5K+ Views

A Connectionless service is a data communication between two nodes where the sender sends data without ensuring whether the receiver is available to receive the data. Here, each data packet has the destination address and is routed independently irrespective of the other packets. Thus the data packets may follow different paths to reach the destination. There’s no need to setup connection before sending a message and relinquish it after the message has been sent. The data packets in a connectionless service are usually called datagrams.Protocols for connectionless services are −Internet Protocol (IP)User Datagram Protocol (UDP)Internet Control Message Protocol (ICMP)Connectionless services ... Read More

Reference Models in Computer Network

Paul Richard
Updated on 17-Jun-2020 12:23:16

23K+ Views

In computer networks, reference models give a conceptual framework that standardizes communication between heterogeneous networks.The two popular reference models are −OSI ModelTCP/IP Protocol SuiteOSI ModelOSI or Open System Interconnection model was developed by International Standards Organization (ISO). It gives a layered networking framework that conceptualizes how communication should be done between heterogeneous systems. It has seven interconnected layers.The seven layers of the OSI Model are a physical layer, data link layer, network layer, transport layer, session layer, presentation layer, and application layer. The hierarchy is depicted in the following figure −TCP / IP PROTOCOL SUITETCP stands for Transmission Control Protocol, while ... Read More

Run Two Python Loops Concurrently

Lakshmi Srinivas
Updated on 17-Jun-2020 12:22:33

851 Views

You will need to use a multiprocessing library. You will need to spawn a new process and provide the code to it as an argument. For example,from multiprocessing import Processdef loop_a():    for i in range(5):       print("a") def loop_b():    for i in range(5):       print("b") Process(target=loop_a).start() Process(target=loop_b).start()This might process different outputs at different times. This is because we don't know which print will be executed when.

The Data Link Layer of OSI Model

Vikyath Ram
Updated on 17-Jun-2020 12:21:31

2K+ Views

The data link layer (Layer 2) converts the raw transmission facility provided by the physical layer to a reliable and error-free link.The main functions of the data link layer are as follows −It breaks up the stream of bits into data frames having sizes from a few hundred to a few thousand bytes.It ensures distribution of the frames to the different systems. For this, it adds a header to the frame containing the address of the sender and the receiver.In case of reliable connection, this layer ensures that the receiver sends an acknowledgement frame. In absence of acknowledgement frames, frame ... Read More

Bootstrap 4 Card Header Class

Ricky Barnes
Updated on 17-Jun-2020 12:20:50

469 Views

Use the card-header class to create header of a Bootstrap card −   This is the header After including the card header, you can add the card body and footer as shown in the following code snippet −   This is demo content.   This is the footer. You can try to run the following code to implement the card-header class in Bootstrap 4 −ExampleLive Demo       Bootstrap Example                             Demo Heading           This is the header       This is demo content.       This is the footer      

Handle Exception Inside a Python For Loop

Arjun Thakur
Updated on 17-Jun-2020 12:20:33

3K+ Views

You can handle exception inside a Python for loop just like you would in a normal code block. This doesn't cause any issues. For example,for i in range(5):    try:       if i % 2 == 0:          raise ValueError("some error")       print(i) except ValueError as e:    print(e)This will give the outputsome error 1 some error 3 some error

Set Blue Outlined Bootstrap 4 Button

Ricky Barnes
Updated on 17-Jun-2020 12:18:35

126 Views

To set blue outlined Bootstrap 4 button, use the .btn-outline-primary class.Add a blue outline to a button −   Blue outline You can try to run the following code to implement the btn-outline-primary class in Bootstrap −ExampleLive Demo       Bootstrap Example                             Bootstrap 4     You can see blue outline below:     Blue outline

Bootstrap 4 Button btn-outline-light Class

Ricky Barnes
Updated on 17-Jun-2020 12:17:06

184 Views

Use the btn-outline-light class in Bootsrap 4 to set light grey outlined button.To include it on the web page, set it as a class in the element as shown in the following code snippet −Let us see an example to implement the btn-outline-light class −ExampleLive Demo       Bootstrap Example                         Demo Button   Below is a light grayed outline button:       Sample  

Advertisements