Found 34484 Articles for Programming

How to Concatenate Images Using Pillow in Python?

Prince Yadav
Updated on 21-Jul-2023 13:48:43

838 Views

Python is a popular programming language used by developers worldwide to build various applications. One of the significant advantages of Python is the availability of several powerful libraries that simplify complex tasks. One such library is Pillow, which is used for image−processing tasks like resizing, cropping, and manipulating images. In this tutorial, we will explore how to use Pillow to concatenate images horizontally and vertically in Python. Image concatenation is the process of combining two or more images into a single image. By concatenating images, we can create stunning image collages, combine multiple images into a single image, or create ... Read More

How to Concatenate Column Values of a MySQL Table Using Python?

Prince Yadav
Updated on 21-Jul-2023 13:09:27

256 Views

MySQL is an open−source relational database management system that is widely used to store, manage, and organize data. When working with MySQL tables, it is common to require the combination of multiple column values into a single string for reporting and analysis purposes. Python, a high−level programming language, offers several libraries that enable connection to MySQL databases and execution of SQL queries. In this article, we'll dive into the process of concatenating column values of a MySQL table using Python and the PyMySQL library. A step−by−step guide is provided on how to connect to a MySQL database, execute a SQL ... Read More

SPSA (Simultaneous Perturbation Stochastic Approximation) Algorithm using Python

Jaisshree
Updated on 21-Jul-2023 11:28:02

342 Views

A simultaneous perturbation stochastic optimization algorithm (SPSA) finds the minimum of an objective function by simultaneously perturbing the objective function. Using SPSA, the objective function gradient is estimated by evaluating a small number of functions at random perturbations. It is particularly useful when the objective function is noisy, non-differentiable, or has many parameters. A variety of applications, such as system identification, control, and machine learning, have been successfully implemented with this algorithm. Advantages Of Using The SPSA Algorithm The SPSA has been applied in various realms such as engineering, finance, and machine learning. It has several advantages ... Read More

Skin Cancer Detection using TensorFlow in Python

Jaisshree
Updated on 21-Jul-2023 11:01:04

554 Views

Early detection of any disease, especially cancer, is very crucial for the treatment phase. One such effort made in this direction is the use of machine learning algorithms to detect and diagnose skin cancer with the help of a machine learning framework like Tensorflow. The traditional method of cancer detection is quite time-consuming and requires professional dermatologists. However, with the help of TensorFlow, not only can this process be made fast, but more accurate and efficient. Moreover, people who do not get timely access to doctors and dermatologists, can use this meanwhile. Algorithm Step 1 − Import the ... Read More

How HashTable Works Internally in Java?

Shriansh Kumar
Updated on 20-Jul-2023 22:15:06

1K+ Views

The Hashtable class is a part of the Java Collection Framework that stores its element in key-value pairs in a hash table. The Key is an object that can be used to fetch and receive value associated with it. There exist a few similarities between a Hashtable and HashMapclass but Hash table is synchronized. Also, its keys must be associated with values, they could not be null. This article aims to explain how Hash table works internally in Java. Working of Hashtable in Java We can consider a Hashtable as an array of buckets, where each bucket contains a list ... Read More

How does Java process the backspace terminal control character?

Shriansh Kumar
Updated on 20-Jul-2023 22:10:46

419 Views

The backspace terminal control character is a special character represented by the ‘\b’notation. It is used to move the cursor one character back. It comes under Java escape characters, these characters are used with backslash (\) and hold a special meaning to the compiler. In this article, we will understand and see the practical implementation of‘\b’ notation through Java example programs. Working of Backspace Terminal Control Character Two types of situations may arise while working with this escape character. First, when we hard code the backspace character into a String and the second, when we take input using a keyboard. ... Read More

Different Ways to Copy Files in Java

Shriansh Kumar
Updated on 20-Jul-2023 22:05:36

661 Views

Java provides different ways to copy files including the ‘File’, ‘FileInputStream’ and‘FileOutputStream’ classes. There are times when we need to take a backup, compress a file or share it with others. In these situations, copying that file becomes necessary. Weare going to explore the methods and classes that will help us to copy the content of one file to another file through Java programs. Before jumping to the example program directly, let’s discuss some classes and built-in methods that we will be using. This will build a foundation for understanding the code. Note that these classes and methods are associated ... Read More

Different name reusing techniques in Java

Shriansh Kumar
Updated on 02-Aug-2023 17:06:44

123 Views

In Java, there exist different name reusing techniques for various types of entities, sucha s variables, methods, datatypes or packages. These techniques affect the accessibility and behavior of the entities according to their need and use. In this article, we will discuss four common ways to reuse a name in Java: overriding, hiding, overloading and shadowing Name reusing techniques in Java Shadowing This technique allows a local variable to have the same name as another field or member of the enclosing class. In this case, the previous implementation of the member gets shadowed by the declaration of a new variable. ... Read More

Different Method Calls in Java

Shriansh Kumar
Updated on 20-Jul-2023 21:40:19

85 Views

Java provides different method calls techniques that we can use according to the need andscenario in our program. Here, methods mean a block of code that can be reused multipletimes to perform a single operation. It saves our time and also reduces the size of code.The method call is referred to as invocation of methods. To use the functionality of amethod, it must be invoked by some means. This article aims to explain how methods arecalled in Java User-defined Method in Java Before discussing the method call, let’s familiarize ourselves with syntax of the userdefined methods Syntax accessSpecifier nonAccessModifier return_Type ... Read More

Heap and Stack Memory Errors in Java

Shriansh Kumar
Updated on 21-Jul-2023 11:06:46

175 Views

In Java, every interface, class, object, variable and method of a running program is stored in distinct reasons of computer memory. The heap is the part of memory area where values of variables, methods and classes are stored at runtime. Its allocation happens dynamically and can grow or shrink depending on the application's needs. On the other hand, the reference variables, names of methods and classes are stored in the stack memory area. However, if for some reason their allocation is not handled properly then, it may lead to memory errors that we are going to discuss in this article. ... Read More

Advertisements