Found 34485 Articles for Programming

How to Set Border of Tkinter Label Widget

Tapas Kumar Ghosh
Updated on 14-Aug-2023 10:55:37

1K+ Views

In Python, Tkinter is GUI(Graphical User Interface) based library that accesses easier and faster ways to build the GUI application. The Tkinter Label Widget will be used to build the border that helps to improve the visibility of the user interface. A Tkinter Label Widget is such type of area that shows the text or images. In Python, we have some built−in functions such as Label(), TK(), Frame(), pack(), and, config() will be used to Set the Border of Tkinter Label Widget. Syntax The following syntax is used in the examples- Tk() The Tk() is a built−in function in ... Read More

How to Set up Multiple Subplots with Group Legends using Plotly in Python

Tapas Kumar Ghosh
Updated on 14-Aug-2023 10:51:49

709 Views

The multiple subplots are defined by assigning different graph plots. Plotly is a powerful Python library for creating interactive visualizations for data research and presentation. Its capacity to put up multiple subplots, that are independent plots placed within a single figure, is one of its primary characteristics. This feature allows us to compare and display various datasets or variables side by side, giving us a simple overview of the data. In Python, we have some built−in functions− add_trace, update_layout, and, show which can be used to set up multiple subplots with group legends using Plotly in Python. Syntax The ... Read More

Java Program to Find the smallest missing number

Shiva Keerthi
Updated on 25-Jun-2024 14:42:32

725 Views

Smallest missing number is the smallest number which is missing from a stream of elements or in an Array. The stream may or may not contain continuous elements. If the stream is continuous then the smallest missing number is nothing but the Smallest Missing Number in a stream. In this section, we will discuss the various approaches to find a Smallest Missing Number in a stream of elements using Java programming language. Example for smallest missing number in an array Example 1 Input arr=[1, 2, 3, 5, 6, 7, 8] Output 4 Explanation − In ... Read More

Java Program to Find the Lost Number

Shiva Keerthi
Updated on 25-Jun-2024 14:37:14

187 Views

Lost Number is the number which is missing from a continuous stream of elements or in an Array. In this section, we will discuss the various approaches to find a lost number in a stream of elements using java programming language. Example for a lost number in an array Lost number is a number which is missing from a continuous sequence of a numbers in an array. Example 1 Consider an array: arr=[1, 2, 3, 4, 5, 6, 8] In the above array ‘arr’, 7 is missing, so 7 is the lost number Example 2 Consider an array: arr=[1, ... Read More

Java Program to Get TreeMap Key, Value, or Entry Greater or Less than the Specified Value

Shiva Keerthi
Updated on 25-Jun-2024 14:53:17

323 Views

A TreeMap is a class provided by Java that implements Map Interface. It is a collection of key-value pairs and the key-value pairs in TreeMap are stored in sorted order based on key values. An Entry is defined as a key-value pair in a TreeMap. In this article, we will look in detail how to get TreeMap key-value pair or entry greater or less than the specified value. Methods Used Now, we will be looking into some of the inbuilt methods and their functionality of TreeMap which are used in this particular article. higherKey() − This method is ... Read More

Java Program to Get the Union & Intersection of Two TreeSet

Shiva Keerthi
Updated on 26-Jun-2024 12:49:10

183 Views

TreeSet is a class that implements Set interface in Java. In TreeSet the elements are stored in sorted order as it is implemented internally using a sorted balanced tree called as binary search tree. The elements in the TreeSet are stored in ascending order by default. Union of sets contains all the elements from both sets. Intersection of sets contain all the elements which are commonly present in both sets. In this section, we will be discussing about how to get the union and intersection of two TreeSet using Java. What are the Union and Intersection of Sets? ... Read More

Java Program to Get the Size of Given File in Bytes, KiloBytes and MegaBytes

Shiva Keerthi
Updated on 26-Jun-2024 12:51:24

2K+ Views

Size of a file is the amount of storage space occupied by that particular file on a particular storage device such as a hard drive. Size of a file is measured in terms of bytes. In this section, we will be discussing how to implement a java program to get the size of given file in bytes, kilobytes and megabytes. Understanding the file Sizes and Units of Measurement A byte is the smallest unit of digital information. One byte is equal to eight bits. 1 kilobyte (KB) = 1, 024 bytes 1 megabyte (MB) = ... Read More

Java Program to Get the First Element from LinkedHashSet

Shiva Keerthi
Updated on 03-Jul-2024 16:22:20

516 Views

LinkedHashSet is a class provided by Java that implements Set Interface. The first element of a LinkedhashSet is nothing but the first element in the collection. In this article, we will discuss different approaches to get the first element from LinkedHashset. What is a LinkedHashSet? A LinkedHashSet is a collection which is a combination of HashSet collection and a LinkedList collection. A HashSet is an unordered collection and also doesn’t allow duplicates. A LinkedList stores duplicates but also is an ordered collection i.e., it stores the elements in a way in which add elements to the collection. Coming to ... Read More

Java Program to Get System Motherboard Serial Number for Windows and Linux Machine

Shiva Keerthi
Updated on 24-Jun-2024 17:22:24

572 Views

Motherboard Serial Number is an id assigned to the motherboard of a computer. It is generally used to track the computer system and also to identify when the system is lost or stolen. In this section, we will be discussing different approaches to find the Motherboard Serial Number for Windows and Linux machines using Java programming language. Motherboard is a very crucial part of a computer. It is the backbone of the computer. All the components in a computer communicate through the motherboard. Motherboard helps in determining the factors like the amount of RAM we are going to ... Read More

Java Program to Get System MAC Address of a Windows and Linux Machine

Shiva Keerthi
Updated on 26-Jun-2024 17:39:44

1K+ Views

Computers can connect to a network and communicate with other devices using a hardware or software component known as Network Interface Controller (NIC). NIC helps in creating a layer which helps in transmitting and receiving data between two devices. MAC address known as Media Access Control address is a unique identifier of NIC. It is of 48 bits of hexadecimal digits. It is used by the data link layer to control access, ensure data integrity, and identify network devices. In this section, we will be learning about how to find a MAC address of a Windows and Linux machine using ... Read More

Advertisements