The session layer supports establishing, controlling, and eliminating a session or dialogue between the two end frameworks. It generates the session, handles the packets sent back and forth during the session and removes the session. The dialogue type/session type is also defined through half-duplex or full-duplex.The session layer also supports data synchronization and check pointing so that only the information transmitted after the point of failure should be retransmitted in the event of network failure.This layer also governs the dialogue between the two processes by deciding who can send and who can get at what point during the transmission.The session ... Read More
Physical layer is the shortest layer in the model. This layer is feasible for initiating, preserving, and deactivating a physical circuit between two end frameworks.The Physical Layer is vital for transmitting bits from one device to another device. It can change the series of bits into electric signals, light signals, or electromagnetic signals, relying on either the two hubs on a link circuit, fiber-optic circuit, or microwave/radio circuit.Passive hubs, simple active hubs, terminators, couplers, cables, connectors, repeaters, multiplexers, transmitters and receivers are the devices associated with the physical layer.The physical layer situation for the transmission channel and the data link ... Read More
OSI represents Open System Interconnection. The OSI reference model is a seven-layered architecture and is created in a hugely structured method. Each layer in the model has specific sets of procedures, functions, and protocols. One layer can communicate with an adjacent layer by using its interface.OSI model was advanced by the International Organization for Standardization (ISO) in Geneva, Switzerland, and by the Consultative Committee for International Telephone and Telegraph (CCITT).The figure given below displays the seven-layered Architecture of OSI Models, along with the protocols and interfaces.Functions of the OSI LayersThere are various functions of OSI Layers which are as follows:Physical LayerThis ... Read More
Lamda Functions (also referred to as Anonymous Function in Python) are very useful in building Tkinter GUI applications. They allow us to send multiple data through the callback function. Lambda can be inside any function that works as an anonymous function for expressions. In Button Command, lambda is used to pass the data to a callback function.ExampleIn this example, we will create an application that will have some buttons in it. The button command is defined with the lambda function to pass the specific value to a callback function.#Import the library from tkinter import * from tkinter import ttk ... Read More
Tkinter LabelFrame is similar to Frames in Tkinter Library. It works like a container where widgets can be placed. LabelFrame initially creates a container with some rectangular border around it. In order to style the LabelFrame widget, we have several style options such as background, borderwidth, labelanchor, highlightcolor and many more.ExampleIn this example, we will see the LabelFrame widget and its properties.#Import required libraries from tkinter import * #Create an instance of tkinter frame win= Tk() #Define the geometry of the window win.geometry("750x250") #Initialize a LabelFrame Widget labelframe= LabelFrame(win, text= "Frame 01", width= 600, height= 200, labelanchor= "n", font= ('Helvetica ... Read More
Tkinter is one of the Python-based libraries used to create and develop Desktop User interfaces and applications. Using the Tkinter library and its packages, we will create a Rock Paper Scissor Game Application. The game can be played between two people using hand gestures. The condition for winning the game is, If player A gets Paper and Player B gets scissors, then Scissor wins.If player A gets Paper and Player B gets Rock, then Paper wins.Similarly, If player A gets Rock and Player B gets scissors, then Rock wins.Following these game conditions, we will first create the GUI for the game user interface. The ... Read More
Oftentimes, we need to deal with plots in our Tkinter GUI-based application. To support the plots for the available data points, Python provides a Matplotlib package that can be imported into the application easily. In order to add a plot for the given data points, we have to install several other packages such as NumPy along with Matplotlib. NumPy is a Python library that helps to deal with scientific calculation in the Data.ExampleIn this example, we will create data points for the car prices starting from (100000) with the units in the range of 1000 to 5000.#Import the required Libraries ... Read More
Tkinter withdraw method hides the window without destroying it internally. It is similar to the iconify method that turns a window into a small icon. Let us suppose we want to reveal the hidden window during the execution of an application then we can use deiconify() method. It can be invoked with the window or frame of a widget in the application.ExampleIn this example, we will define a button in a Toplevel window (Popup Window) which can be the trigger to reveal the main window.#Import the library from tkinter import * from tkinter import ttk #Create an instance of Tkinter frame win= ... Read More
To process images with Tkinter and other Python packages, we generally refer to use Pillow Package or PIL in Python. It provides a way to load and process the images in the program wherever we need. Initially, we convert the image to an instance of PhotoImage object that allows images to be further used in many use cases. Further, the Canvas widget in Tkinter helps to draw the images in a Tkinter application, we can use the create_image(x, y, image_file) method to display the image in a particular application.Example#Import the required Libraries from tkinter import * from PIL import Image, ... Read More
The state property in Tkinter is used to change the state of any specific widget. We can make a widget either active or disabled whenever required. To disable the Checkbuttons widget, we have to set the state property as readonly or disabled. Changing the state will make all the checkbuttons inactive during the execution of the program.Example#Import the required Libraries from tkinter import * from tkinter import ttk #Create an instance of Tkinter frame win = Tk() #Set the geometry of Tkinter Frame win.geometry("750x250") #Add a Top widget Label(win, text= "Select an Option from the Menu", font=('Aerial', 15, 'bold')).pack(pady=15) ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP