- 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
Found 34484 Articles for Programming
143 Views
Suppose we have ‘N’ number of dice and we roll all of them at a time, then we need to show all the values that occurred on all dice. We have to emulate the same situation using Java programs. To solve this problem, we will use a class named ‘Random’ that comes under ‘java.util’ package. Java program to Emulate N Dice Roller Random Class We create an object of this class to generate pseudorandom numbers within a given range. We will customize this object and apply our own logic to select any random values from the specified dice. To retrieve ... Read More
1K+ Views
Servlets are small Java modules that are used on the server side of a web connection to enhance the functionality of web server. All the methods and classes for creating a servlet are available in ‘javax.servlet’ and ‘javax.servlet.http’ packages. Hence, it is important to import them into your program before working with the servlet They are useful when it comes to creating dynamic web pages and processing user inputs. This article aims to discuss all the necessary steps to create a servlet in detail. Steps to create a Servlet Before moving to the steps let’s discuss briefly about servlets. How ... Read More
205 Views
In today's data−driven world, for businesses and organizations efficiently analyzing and manipulating large data sets is difficult. MySQL, as a popular open−source relational database management system, and Python, as a versatile programming language, are two latest and trending technologies that when combined, can help achieve this goal. In this article, we will guide you through the process of computing the average of a column of a MySQL table using Python. From establishing a connection to your MySQL database, executing an SQL query to compute the average of a column, and fetching the result, we will provide a step−by−step guide ... Read More
5K+ Views
Calculus, the study of continuous change, is a fundamental subject in mathematics that has numerous applications in fields ranging from physics to economics. One of the key concepts in calculus is derivative, which measures the instantaneous rate of change of a function at a given point. If we have a function f(x), the derivative of that function at point x can be calculated as the limit of the difference quotient as h approaches zero: f'(a) = lim(h -> 0) [(f(a+b) - f(a))/h] However, computing derivatives can be a time−consuming and error−prone process when done by hand. Luckily, numerical computing ... Read More
1K+ Views
Cross−correlation is a concept widely used in signal processing and image processing to determine the similarity between two signals or images. Python, being one of the most popular programming languages, offers an efficient and user−friendly way to compute cross−correlation between numpy arrays using the NumPy library. The NumPy library offers the numpy.correlate() function to calculate the cross−correlation of one−dimensional numpy arrays. However, for two−dimensional arrays, we need to first flatten them and then use the same function to compute the cross−correlation. In this article, we will provide a detailed discussion on how to compute cross−correlation of two given numpy ... Read More
9K+ Views
In today's digital era, images have become a necessary part of our lives. They play an important and significant role in communication and expression across a wide range of platforms, from social media to websites. However, high−quality images can consume a considerable amount of storage space and it'll result in slower website loading times and longer upload times. Image compression becomes applicable in this situation. By reducing the size of an image, you can ensure faster loading times, lower bandwidth usage, and more storage space. In this article, we will look into the process of compressing images using Python and ... Read More
2K+ Views
Numpy is a widely used library in Python programming that offers efficient and useful ways for array manipulation. During the development process, it is common to encounter situations where it is necessary to compare two Numpy arrays. This can be for verifying the presence of identical elements or to detect the differences between them. In this article, we will look into various methods for comparing two Numpy arrays, including fundamental comparison operators such as == as well as more advanced functions such as numpy.array_equal() and numpy.setdiff1d(). Our aim is to provide a comprehensive understanding of how to compare Numpy ... Read More
848 Views
If you work with data analysis or data science, then you already know the importance of comparing DataFrames. Fortunately, the Python library, pandas, offers a handy " compare " method that allows you to compare two DataFrames and highlight their differences. This method is incredibly useful for identifying discrepancies between sets of data and making informed decisions based on those differences. In this article, we will explore how to use pandas compare to compare two DataFrames and dive into some of the customization options available. Whether you're an experienced data analyst or a fresher, this article will provide you ... Read More
9K+ Views
JSON, which stands for JavaScript Object Notation, is a widely used data format for exchanging data on the web. In Python, it is common to compare two JSON objects to determine if they are the same. However, comparing JSON objects can be a challenging task when the objects have the same elements but in different orders. In this article, we will explore three different methods for comparing JSON objects in Python regardless of their order. We will discuss techniques for converting JSON objects to dictionaries, sorting JSON objects, and utilizing the jsondiff third−party library to compare JSON objects. Each method ... Read More
6K+ Views
Python is a versatile and powerful programming language that has gained immense popularity in the field of data analysis and processing. With its extensive range of libraries and frameworks, Python provides developers with robust tools to handle complex data operations efficiently. PySpark, a Python API for Apache Spark, takes Python's capabilities to the next level by offering distributed computing capabilities for big data processing. One of the fundamental components of PySpark is the DataFrame, a tabular data structure that allows for seamless manipulation and analysis of large datasets. In this tutorial, we will explore an essential aspect of working with ... Read More