- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Both ArrayList and LinkedList are implementation of List interface in Java. Both classes are non-synchronized. But there are certain differences as well. Following are the important differences between ArrayList and LinkedList method. Sr. No. Key ArrayList LinkedList 1 Internal Implementation ArrayList internally uses a dynamic array to store its elements. LinkedList uses Doubly Linked List to store its elements. 2 Manipulation ArrayList is slow as array manipulation is slower. LinkedList is faster being node based as not much bit shifting required. 3 Implementation ArrayList implements only List. LinkedList implements List as well as Queue. It can acts as a queue as well. 4 Access ArrayList is faster in storing and accessing data. LinkedList is faster in manipulation of data. Example of ArrayList ... Read More
Enables Unicode-aware case folding. When you use this as flag value to the compile() method along with the CASE_INSENSITIVE flag and if you search for Unicode characters using regular expressions Unicode characters of both cases will be matched. Example import java.util.regex.Matcher; import java.util.regex.Pattern; public class UNICODE_CASE_Example { public static void main( String args[] ) { String regex = "\u00de"; //Compiling the regular expression Pattern pattern = Pattern.compile(regex, Pattern.UNICODE_CASE|Pattern.CASE_INSENSITIVE); //Retrieving the matcher object String str[] = {"\u00de", "\u00fe", ... Read More
This flag enables Unix lines mode. In the Unix lines mode, only '' is used as a line terminator and ‘\r’ is treated as a literal character. Example 1 import java.util.regex.Matcher; import java.util.regex.Pattern; public class LTERAL_Example { public static void main(String[] args) { String input = "This is the first line\r" + "This is the second line\r" + "This is the third line\r"; //Regular expression to accept date in MM-DD-YYY format ... Read More
Graphical User Interfaces (GUIs) play a vital role in modern software applications, allowing users to interact with programs through intuitive visual elements. Tkinter, the de facto standard GUI toolkit for Python, provides a robust set of tools and widgets to build GUI applications. In Tkinter, event handling is a fundamental concept, allowing developers to respond to user actions such as button clicks, key presses, and mouse movements. Two commonly used event formats in Tkinter are and . In this article, we will explore the differences between these two event formats and discuss their appropriate use cases. The Format The format ... Read More
The Tkinter library is a popular tool for building graphical user interfaces (GUIs) in Python. It provides a variety of methods and functionalities to create and customize GUI applications. One of the essential methods in Tkinter is the configure() method, which allows you to modify the parameters of a widget. In this article, we will explore the parameters of the configure() method in Tkinter and understand how they can be used to customize the appearance and behavior of widgets. The configure() method is used to modify the attributes or options of a widget in Tkinter. It is a versatile method that ... Read More
Tkinter is a standard Python library for creating graphical user interfaces (GUIs). It provides a set of tools and widgets for building interactive desktop applications with Python. One of the most important components of Tkinter is the tkapp, which is the root object of the Tkinter application. What is Tkinter's tkapp? The tkapp is the main object of the Tkinter application. It represents the root window of the application, which is the top-level window that contains all other windows, widgets, and controls in the application. The tkapp is created using the Tk() function, which is a constructor for the tkapp ... Read More
When developing graphical user interfaces (GUIs) in Python using Tkinter, it is important to provide users with efficient and intuitive editing capabilities, including the ability to undo and redo changes made in text entry fields. While Tkinter's Entry widget does not natively support undo and redo functionality, we can implement it using a slightly different approach. In this article, we will explore how to incorporate undo and redo operations in a Tkinter Entry widget using the built-in Text widget and customizing its behavior. Understanding the Entry Widget in Tkinter: Before we dive into the implementation details, let's first understand ... Read More
Tkinter is a popular library in Python for creating graphical user interfaces (GUIs). It provides a wide range of widgets that can be used to build interactive and visually appealing applications. One of the key features of Tkinter is the ability to create tables or grids of widgets. In this article, we will explore how to create a table of widgets using Tkinter and demonstrate some useful techniques. Tkinter provides a widget called Frame that serves as a container for other widgets. We can use frames to create a table-like structure by arranging multiple frames in rows and columns. Each ... Read More
Tkinter is a popular Python GUI toolkit that allows developers to create user interfaces for desktop applications. One of the key features of Tkinter is its ability to handle events, such as button clicks, mouse movements, and key presses. However, there may be times when you want to stop raising an event in Tkinter. In this article, we will explore how to stop raising an event in Tkinter. What are Events in Tkinter? In Tkinter, an event is a signal that is triggered when a certain action occurs, such as clicking a button, moving the mouse, or pressing a key. ... Read More
When creating data visualization applications using Python's Tkinter and Matplotlib, it is crucial to ensure that the figures displayed are independent of the user's screen resolution. This ensures that the visual representation of the data remains consistent across different devices and screen sizes. In this article, we will explore techniques to achieve screen resolution independence when integrating Matplotlib figures into Tkinter applications. The challenge arises due to the variation in screen resolutions among different devices. If the figures are not handled properly, they may appear distorted or inconsistent, making it difficult for users to interpret the data accurately. To overcome ... Read More