The Session Layer of OSI Model

Fendadis John
Updated on 17-Jun-2020 12:41:55

9K+ Views

The session layer (layer 5) is responsible for establishing, managing, synchronizing and terminating sessions between end-user application processes.The main functions of the session layer are as follows −It works as a dialog controller. It allows the systems to communicate in either half-duplex or full-duplex mode of communication.It is responsible for token management. Through this, it prevents the two users to simultaneously attempt the same critical operation.It synchronizes communication. It adds synchronization points or checkpoints in data streams for long communications. This ensures that data streams up to the checkpoints are successfully received and acknowledged. In case of any failures, only ... Read More

The Presentation Layer of OSI Model

Paul Richard
Updated on 17-Jun-2020 12:41:31

5K+ Views

The presentation layer (Layer 6) ensures that the message is presented to the upper layer in a standardized format. It deals with the syntax and the semantics of the messages.The main functions of the presentation layer are as follows −It encodes the messages from the user dependent format to the common format and vice versa, for communication among dissimilar systems.It is responsible for data encryption and decryption of sensitive data before they are transmitted over common channels.It is also responsible for data compression. Data compression is done at the source to reduce the number of bits to be transmitted. It ... Read More

Align Flex Item in the Center with Bootstrap 4

Amit Diwan
Updated on 17-Jun-2020 12:40:20

1K+ Views

To align a flex item in the center with Bootstrap 4, use the .align-self-center class.The following is my div for flex −Now add flex items and here I have applied the align-self-center class on the 3rd flex item −   A-one   B-one   C-one   D-one You can try to run the following code to implement the align-self-center class in Bootstrap −ExampleLive Demo       Bootstrap Example                             Align Specific Flex Item in the center           A-one       B-one       C-one       D-one      

Basic Print Formatting for Python Numbers

Ankith Reddy
Updated on 17-Jun-2020 12:39:20

246 Views

You can format a floating number to the fixed width in Python using the format function on the string. For example, nums = [0.555555555555, 1, 12.0542184, 5589.6654753] for x in nums:    print("{:10.4f}".format(x))This will give the output0.5556 1.0000 12.0542 5589.6655Using the same function, you can also format integersnums = [5, 20, 500] for x in nums:    print("{:d}".format(x))This will give the output:5 20 500You can use it to provide padding as well, by specifying the number before dnums = [5, 20, 500] for x in nums:    print("{:4d}".format(x))This will give the output5 20 500The https://pyformat.info/ website is a great resource ... Read More

The Host to Network Layer in TCP/IP Model

Arushi
Updated on 17-Jun-2020 12:37:53

6K+ Views

The host-to-network layer is the lowest layer of the TCP/IP model and is concerned with the physical transmission of data. It is also called a network interface layer or link layer. It can be considered as the combination of physical layer and data link layer of the OSI model.The functions of this layer are −It defines how bits are to be encoded into optical or electrical pulses.It accepts IP packets from the network layer and encapsulates them into frames. It synchronizes the transmission of the frames as well as the bits making up the frames, between the sender and the ... Read More

Set Key Content with Bootstrap 4 Card

Amit Diwan
Updated on 17-Jun-2020 12:36:31

154 Views

Add key stuff to a Bootstrap card, using the bg-primary class with the card class.Use the bg-primary class in the card class −       Eisner Award   I have used the text-white class above, to set the text to be white.Let us see a example how to include key stuff in a Bootstrap 4 card −ExampleLive Demo       Bootstrap Example                               Awards           The Pulitzer Prize               Eisner Award               Hugo & Nebula Awards      

Use Multiple For and While Loops Together in Python

Ankith Reddy
Updated on 17-Jun-2020 12:36:21

404 Views

You can create nested loops in python fairly easily. You can even nest a for loop inside a while loop or the other way around. For example,for i in range(5):    j = i    while j != 0:       print(j, end=', ')       j -= 1    print("")This will give the output1, 2, 1, 3, 2, 1, 4, 3, 2, 1,You can take this nesting to as many levels as you like.

Generate a Sorted List in Python

Lakshmi Srinivas
Updated on 17-Jun-2020 12:35:01

437 Views

The sort method on lists in python uses the given class's gt and lt operators to compare. Most built in classes already has these operators implemented so it automatically gives you sorted list. You can use it as follows:words = ["Hello", "World", "Foo", "Bar", "Nope"] numbers = [100, 12, 52, 354, 25] words.sort() numbers.sort() print(words) print(numbers)This will give the output:['Bar', 'Foo', 'Hello', 'Nope', 'World'] [12, 25, 52, 100, 354]If you don't want the input list to be sorted in place, you can use the sorted function to do so. For example, words = ["Hello", "World", "Foo", "Bar", "Nope"] sorted_words ... Read More

Bootstrap 4 Button btn-outline-info Class

David Meador
Updated on 17-Jun-2020 12:34:43

226 Views

To set an outline on a button that indicates information, you need to use the btn-outline-info class in Bootstrap.Include the button element and set the btn-outline-info class −   More Info You can try to run the following code to implement the btn-outline-info class −ExampleLive Demo       Bootstrap Example                         Event   The following are the details:       Event Timings 1PM TO 4PM     Venue: 21 KH, HG Lane, Alabama     For more information about the event:   More Info

Explain Python For Loop to List Comprehension

Ramu Prasad
Updated on 17-Jun-2020 12:32:24

210 Views

List comprehensions offer a concise way to create lists based on existing lists. When using list comprehensions, lists can be built by leveraging any iterable, including strings and tuples. list comprehensions consist of an iterable containing an expression followed by a for the clause. This can be followed by additional for or if clauses.Let’s look at an example that creates a list based on a string:hello_letters = [letter for letter in 'hello'] print(hello_letters)This will give the output:['h', 'e', 'l', 'l', 'o']string hello is iterable and the letter is assigned a new value every time this loop iterates. This list comprehension ... Read More

Advertisements