
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 33676 Articles for Programming

993 Views
Test-Driven Development (TDD) is a software development approach where tests are written before the actual code. TDD has gained substantial traction due to its emphasis on code quality and maintainability. This article explores how TDD can be effectively implemented using JUnit5 and Mockito, two powerful frameworks in the Java ecosystem. What is Test-Driven Development? Test-Driven Development is an iterative development process where developers first write a test case for a new function or feature, then write the minimum amount of code to pass that test, and finally refactor the code for optimization. This approach enhances the design, reduces bugs, and ... Read More

6K+ Views
Introduction Optical Character Recognition (OCR) plays an instrumental role in digitizing printed text, allowing it to be edited, searched, and stored more compactly. One of the most powerful OCR tools available is Tesseract OCR. This article will explore how to use Tesseract OCR with Java, providing detailed examples to enhance your understanding. What is Tesseract OCR? Tesseract OCR is an open-source OCR engine sponsored by Google that can recognize more than 100 languages out of the box. It's widely regarded for its accuracy and adaptability, making it a popular choice for developers across various applications. Integrating Tesseract OCR with Java ... Read More

637 Views
An OTP is known as a one-time password. It is an automatically generated random numeric string which is used for a single login session or transaction on digital devices. It is generally used to enhance security by providing extra authentication. For example, “423193”, “489201’, etc. To generate OTP Swift provides the following methods − Using random() method Using randomElement() method Method 1: Using random() method As we know that OTP is a randomly generated string. So to generate a random string Swift provide an inbuilt function named as random(). It is used to create a random string of ... Read More

672 Views
A password is a combination of various characters of a specified length and is used to authenticate or gain access to the system or login to an account. It is designed for security purposes and ensures that only an authorized user can access or log in to the specific account. It is important to select a strong password so that other people cannot crack it. It is generated according to the following conditions − Contains at least one uppercase letter. Contains at least one lowercase letter. Contains at least one number. Length must be 8 characters Contains at ... Read More

722 Views
In Swift, a string is a sequence of characters. So a string can contain small and larger words. Hence using the following methods we can find the largest word in the string. Using component() method Using user-defined method Example Input String: "Rabbit run fast" Output String: "Rabbit" Here, the largest word among all the given words in the string is “Rabbit”. Method 1: Using component() method The components() method is used to create an array of substrings from the given string, where each substring is separated by the specified separator. So here we use the components(separatedBy:.whitespaces) method ... Read More

845 Views
Fahrenheit is the commonly used temperature-measuring unit. In this scale, the freezing point and boiling point of the water are 32 degrees and 212 degrees. Whereas Celsius is also a temperature-measuring scale. In the Celsius scale, the freezing point and the boiling point of the water are 0 degrees and 100 degrees. So in Swift, we can convert Fahrenheit to Celsius using the following methods − Using Formula Using converted() method Method 1: Using Formula We can easily convert Fahrenheit to Celsius using the mathematical formula. It is the easiest way to convert Fahrenheit to Celsius. ... Read More

1K+ Views
Fahrenheit is the commonly used temperature-measuring unit. In this scale, the freezing point and boiling point of the water are 32 degrees and 212 degrees. Whereas Celsius is also a temperature-measuring scale. In the Celsius scale, the freezing point and the boiling point of the water are 0 degrees and 100 degrees. So in Swift, we can convert Celsius to Fahrenheit using the following methods − Using Formula Using converted() method Method 1: Using Formula We can easily convert Celsius to Fahrenheit using the mathematical formula. It is the easiest way to convert Celsius to Fahrenheit. Syntax ... Read More

221 Views
A collection is a group of elements or objects that are gathered together for some specific tasks. Swift supports three types of collections: Array, Set, and Dictionary. They are implemented as generic collections, also they are clear about what type of values they can store which means you can not store the wrong type of values in the collections. Array It is an ordered collection which is used to store similar types of data or elements. It can store duplicate values. It is both mutable and immutable. Syntax var arr :[Type] = [E1, E2, E3] var arr = ... Read More

259 Views
In Swift, we can adjust the size of the string by trimming some specified number of characters from the right-hand side of the given string. Or we can also trim the extra whitespaces which we do not want on the right-hand side of the given string using the following methods − Method 1: Trim a string from the right side To trim a specified number of characters or a substring from the right side of the string we create a user-defined function which takes an input string and the length of the characters which we wanted to remove ... Read More

428 Views
In Swift, we can adjust the size of the string by trimming some specified number of characters from the left side of the string. Or we can also trim the extra whitespaces which we do not want on the left side of the original string using the following methods. Method 1: Trim a string from the left side To trim a specified number of characters or a substring from the left side of the string we create a user-defined function which takes an input string and the length of the characters which we wanted to remove from the left side ... Read More