- 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 34473 Articles for Programming
![Sabid Ansari](https://www.tutorialspoint.com/assets/profiles/634897/profile/60_3421633-1680760954.jpg)
4K+ 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
![Ankita Saini](https://www.tutorialspoint.com/assets/profiles/489852/profile/60_2374666-1658225115.jpg)
331 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
![Ankita Saini](https://www.tutorialspoint.com/assets/profiles/489852/profile/60_2374666-1658225115.jpg)
413 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
![Ankita Saini](https://www.tutorialspoint.com/assets/profiles/489852/profile/60_2374666-1658225115.jpg)
454 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
![Ankita Saini](https://www.tutorialspoint.com/assets/profiles/489852/profile/60_2374666-1658225115.jpg)
495 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
![Ankita Saini](https://www.tutorialspoint.com/assets/profiles/489852/profile/60_2374666-1658225115.jpg)
700 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
![Ankita Saini](https://www.tutorialspoint.com/assets/profiles/489852/profile/60_2374666-1658225115.jpg)
125 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
![Ankita Saini](https://www.tutorialspoint.com/assets/profiles/489852/profile/60_2374666-1658225115.jpg)
126 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
![Ankita Saini](https://www.tutorialspoint.com/assets/profiles/489852/profile/60_2374666-1658225115.jpg)
177 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
![Ankita Saini](https://www.tutorialspoint.com/assets/profiles/489852/profile/60_2374666-1658225115.jpg)
214 Views
In Swift, we can adjust the size of the string by trimming some specified number of characters from both sides of the string. Or we can also trim the extra whitespaces which we do not want from both sides of the original string using the following methods. Method 1: Trim a string from the both sides To trim a specified number of characters or a substring from both sides 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 both sides of the original ... Read More