Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Priya Mishra
Page 9 of 14
How to Add Leading Zeros to a Number in Python?
While working with numbers in Python, it is often necessary to add leading zeros to a number. Adding leading zeros is important when dealing with formatted data, ensuring consistent digit counts, or creating more readable output. In this article, we will explore different methods to add leading zeros to numbers in Python. Using str.zfill() Method The zfill() method is the most straightforward approach. It converts the number to a string and pads it with leading zeros to reach the specified width. Syntax str(number).zfill(desired_width) Example number = 50 desired_width = 5 ...
Read MoreHow to add custom fonts in Kivy - Python?
Kivy allows developers to use custom fonts in their applications, providing a personalized touch to widgets like buttons, labels, and windows. Adding custom fonts involves two main steps: registering the font with Kivy using LabelBase.register() and applying it to widgets via the font_name property. In this article, we will explore how to add custom fonts in Kivy applications, including font registration, widget application, and practical examples. Installing Custom Fonts Before using custom fonts in Kivy, you need to have the font files (.ttf or .otf format) available on your system or in your project directory ? ...
Read MoreHistogram in pygal
Pygal is a Python library for creating interactive charts and graphs. One of its supported chart types is the histogram, which provides a graphical representation of data distribution to help identify patterns, outliers, and trends in datasets. What is a Histogram? A histogram displays the frequency of data points within specific intervals called bins. The horizontal axis (x-axis) represents the range of values in the dataset, while the vertical axis (y-axis) shows the frequency of occurrences within each range. Histograms are particularly useful for visualizing continuous data, such as test scores, heights, or temperatures. They reveal the ...
Read MoreAppending a dictionary to a list in Python
In Python, dictionaries store key-value pairs while lists store multiple values in sequence. Appending dictionaries to lists is useful for collecting structured data, such as storing multiple records or configurations in a single container. Basic List and Dictionary Overview A list is an ordered collection of items enclosed in square brackets []. A dictionary is an ordered collection of key-value pairs enclosed in curly braces {}. # List example sample_list = ["Apple", "Banana", "Cherry"] print("List:", sample_list) # Dictionary example student = {"name": "John", "age": 25, "grade": "A"} print("Dictionary:", student) List: ['Apple', 'Banana', ...
Read MoreAnimated Floating Action Button in kivy
In Kivy, the Floating Action Button (FAB) is one of the most popular UI components in modern mobile applications. It represents the primary action and provides users with quick access to important functionality. Kivy is an open-source Python framework for creating cross-platform user interfaces. In this article, we will learn how to create an animated floating action button in Kivy. What is a Floating Action Button in Kivy? The floating action button is a circular button typically placed in the bottom-right corner of the screen. It represents the primary action of the application and provides a quick way ...
Read MoreHow to access a collection in MongoDB using Python?
MongoDB is a well-known NoSQL database that offers a scalable and flexible approach to store and retrieve data. Using Python with MongoDB enables developers to interact with database collections effortlessly through the PyMongo library. This article explains how to access a MongoDB collection using Python, covering the required steps, syntax, and techniques for connecting to, querying, and manipulating data. Syntax from pymongo import MongoClient # Connect to MongoDB client = MongoClient('mongodb://localhost:27017/') # Access database and collection db = client.database_name collection = db.collection_name # Perform operations collection.insert_one(document) collection.find(query) collection.update_one(filter, update) collection.delete_one(filter) PyMongo ...
Read MoreTop 5 Applications of Machine Learning in Cyber Security
We rely significantly on technology in the present day, yet as technology has advanced, cyber-attacks have gotten more regular and complex. Organizations must have strong cybersecurity systems in place to combat these assaults. Machine learning is one of the most effective methods for accomplishing this. Large volumes of data can be analysed by machine learning algorithms to find trends that may suggest a future cyber assault. In this article, we will look at the top five applications of machine learning in cybersecurity. Top 5 Applications of Machine Learning in Cyber Security Below are some of the applications of machine ...
Read MoreWhat is advanced Java?
Introduction to Advanced Java Core Java (J2SE) and Advanced Java are the two components that make up the Java programming language (JEE). The foundations of the Java programming language, including its data types, functions, operators, loops, threads, and exception handling, are discussed in the "core Java" section of this book. It is used in the process of developing apps for widespread usage. Whereas Intermediate Java focuses on more advanced topics, such as database connection, networking, Servlet, web services, and so on, Advanced Java addresses more fundamental ideas. In this article, we will talk about what advanced Java is, and the concepts ...
Read MoreWhat is the full form of Java?
What is the Full Form of JAVA? The full form of Java is "Just Another Virtual Accelerator". Java is not an abbreviation but some programmers made a full form. Basically, Java doesn’t have any full form or special meaning. This full form is used jokingly by the programmers. J Just A Another V Virtual A Accelerator Related Links Some of the related topics, you may like to read: Overview of Java programming language Features of Java programming language
Read MoreAppend data to an empty Pandas DataFrame
Introduction A data structure known as a data frame is a two-dimensional labelled array with columns that might be of various data kinds. You can compare it to a spreadsheet, a SQL table, or even a dict of Series objects to better understand it. It is the panda item that is used the vast majority of the time. In addition to the data itself, you have the option of also passing parameters for the index (row labels) and columns (column labels). If you supply an index and/or columns, you are assuring that those elements will be present in the DataFrame ...
Read More