Found 34469 Articles for Programming

Convert String to Byte Array in Java using getBytes (Charset) method

Way2Class
Updated on 18-Jul-2023 15:52:43

114 Views

Java programming involves the conversion of String to byte array, a handy technique for a multitude of purposes including network communication or data encryption. To achieve this, the String class provides an array of methods for such conversion, with the getBytes() method being one of them. It is crucial to note that choosing the appropriate encoding is crucial since each encoding utilizes different regulations when it comes to character to byte value mapping. In this article, we will delve into two techniques for converting a String to a byte array using Java's getBytes() method. Additionally, we will provide an ... Read More

Create Array of Zeros in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:33:49

174 Views

In MATLAB, the variables are typically stored in the form of a matrix or array. Sometimes, we require a matrix or array of zeros to perform a specific operation. Therefore, MATLAB allows us to create a matrix or array of zeros. For this task, we can use MATLAB's built-in functions or manual methods. In this article, we will learn different methods to create a matrix or array of zero with the help of example programs in MATLAB programming. Array of Zeros using `zeros()` Function in MATLAB MATLAB provides a built-in function named `zeros()` to create a matrix ... Read More

Like instagram pictures using Selenium and Python

Siva Sai
Updated on 18-Jul-2023 13:32:34

668 Views

With over a billion members, Instagram is a hugely successful social networking website. It is a favourite platform for data scientists, marketers, and developers alike because to its strong API and data accessibility. With the aid of 2-3 examples, we will examine how to like Instagram photos programmatically using Python and Selenium in this article. Please be aware that this information is only meant to be instructive. Respecting Instagram's rules and refraining from behaviour that can be construed as spamming are crucial. Getting Started: Installation and Setup You need to set up your environment before you start coding. Python and ... Read More

Light or Dark Theme Changer using Tkinter

Siva Sai
Updated on 18-Jul-2023 13:29:19

1K+ Views

A GUI (Graphical User Interface) that fluidly alternates between bright and dark themes may be something you're interested in programming. Tkinter is your go-to library for creating such apps if you're using Python. This tutorial will show you how to use Tkinter to make a light or dark theme changer. What is Tkinter? Python's default GUI package is Tkinter. It is a preferred method for developing desktop apps. One of Tkinter's numerous advantages is its simplicity and adaptability, which let you design widgets and interfaces with changeable properties like buttons, labels, text boxes, menus, and more. Importance of Theme Changing ... Read More

Java Program to traverse in a Directory

Way2Class
Updated on 18-Jul-2023 15:41:21

514 Views

Traversing a directory, a common task in various programming applications, involves navigating through the files and subdirectories in a folder. In Java, there exist different strategies for directory traversal, with recursion and iteration employing a stack being two common approaches. Recursion necessitates a function repeatedly calling itself to solve a problem, whereas iteration utilizing a stack requires a data structure to track the program's state. Both methods possess their own advantages and disadvantages, and the optimal approach hinges on the particular needs of the program. This article delves into both methods, presenting sample code to exemplify their use in Java. ... Read More

Checkbox in MATLAB App Building

Manish Kumar Saini
Updated on 18-Jul-2023 11:20:13

158 Views

MATLAB provides an integrated app building toolbox that we can use to create a graphical user interface based app without writing any kind of code. Hence, MATLAB allows users to create professional applications by just drag and drop facility. After that the user can write a MATLAB code to define the behavior of the app options. As mentioned above, this article is primarily meant for creating a user interface in the application which provides a list of options from which a user can select any number of choices. This user interface is referred to as checkbox. A checkbox ... Read More

Print Binary Equivalent of an Integer using Recursion in Java

Way2Class
Updated on 07-Nov-2023 10:28:11

204 Views

Recursion, a potent programming technique, entails the resolution of a problem by decomposing it into smaller, more manageable sub problems and applying the same algorithm to solve them. In the realm of Java programming, recursion proves to be an invaluable tool when it comes to printing the binary representation of an integer. The binary equivalent, expressed in a base-2 numeral system that employs only two digits, 0 and 1, poses a common challenge in the field. In this article, we shall embark to unravel the intricacies of printing the binary equivalent of an integer using recursion in Java. Our ... Read More

XSL Processor in Java

Way2Class
Updated on 18-Jul-2023 15:22:43

266 Views

The XSLT (eXtensible Stylesheet Language Transformations) Processor is a piece of software that processes XML documents and applies transformation rules to create new XML documents or other output formats like HTML, plain text, or PDF. With the use of templates, element selection and manipulation, and operations like sorting and filtering, developers can build rules for converting XML documents into various formats using the powerful language known as XSLT. An XSL processor that can be used to implement XSLT transformations is built into the popular programming language Java for processing XML documents. Developers can read, parse, and process XML documents, apply ... Read More

Combine two images in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:07:43

402 Views

MATLAB allows us to combine two images through various methods like image fusion, image join, image concatenate, image overlay, image blending, etc. In this tutorial, we will explore all these techniques of combining two images. Combine Two Image in MATLAB using `imtile()` Function In MATLAB, we can combine two images by using the `imtile()` function. This function allows us to arrange our multiple images in a tiled layout. Syntax To combine two images, the `imtile` function takes the following syntax: img = imtile({img1, img2}, 'GridSize', [1, 2]); Now, let us see the implementation of the ... Read More

Merging PDFs using Java

Way2Class
Updated on 18-Jul-2023 14:20:12

2K+ Views

PDFMergerUtility class is used for merging multiple PDF documents into a single PDF document. PDFMergerUtility class will take a number of PDF files and merge them, and save the result as a new document. To merge PDFs using java will require the installation of apache library. There may be different approches to merge PDF files using java. Definition: Merging PDFs using java Example Input − PDF1 = Alice.pdf, PDF2 = Bob.pdf Output − newMerged.pdf // merged pdf of pdf1 and pdf2 Program code// Merging two pdf documents here import org.apache.pdfbox.multipdf.PDFMergerUtility; import org.apache.pdfbox.pdmodel.PDDocument; import java.io.File; ... Read More

Advertisements