In Swift, a dictionary is an unordered collection in which data is stored in the form of key-value pairs, where keys are the unique identifiers. So to check the equality of two dictionaries we first need to check if the size of both the dictionaries is equal or not. If yes, then we check if both dictionaries contain the same key-value pairs or not. If both conditions are equal, then that means the given two dictionaries are equal. If any of the conditions are false then that means the given dictionaries are not equal. Algorithm Step 1 − Create ... Read More
Swift provides an hasPrefix() function to check if a string starts with a specified substring. The hasPrefix() function returns a boolean value which indicates whether the specified substring matches the starting string characters of the input string. The hasPrefix() function is case sensitive, which means according to this function “a”, and “A” are two different values. Input String = “Ram got first place” SubString = “Ram” Output Yes Here, the characters of the substring match the starting characters of the input string. Syntax func hasPrefix(value) Here, the value represents a string. This function returns true if the ... Read More
Swift provides an hasSuffix() function to check a string end with a specified substring. The hasSuffix() function returns a boolean value which indicates whether the specified substring matches the ending characters of the input string. The hasSuffix() function is case sensitive that means according to this function “t”, and “T” are two different values. Input String = “Today is cloudy day” SubString = “day” Output yes Here, the character of the substring matches the ending characters of the input string. Syntax func hasSuffix(value) Here, the value represents a string. This function returns true if the value matches ... Read More
In Swift, a dictionary is an unordered collection in which data is stored in the form of key-value pairs. To add elements to a dictionary we can use any of the following methods − Using Bracket notation Using updateValue() method Method 1: Using Brackets Notation We can key-value pairs in the dictionary using bracket notation or we can say that using subscript notation. In this method, we can add a new key in the brackets and assign the corresponding value. If the specified key already exists, then it will replace the value of that key we the new ... Read More
An array is a collection of elements of homogeneous datatypes stored in contiguous memory locations. Python does not provide support for the built-in arrays. If you need to work with arrays you need to import the "array" module or, use the arrays in numpy library.We can use lists instead of arrays in Python. However, we cannot restrict the elements of a list to be of the same data type. The given task is to remove all the occurrences of an element in an array/list. i, e. we to remove the specified element including the duplicate elements. Let us understand how this ... Read More
As cloud computing has become more common, it has led to the creation of many new things. Many facets of contemporary life have changed due to cloud computing, especially the nature of the modern workplace and how employees engage with one another there. As a result of the unwanted plague, many businesses have switched to cloud-based services to handle output problems. Cloud computing is one of the newest IT tools with the fastest expansion rate. Although technology has existed for over ten years, its appeal has recently soared. By 2023, cloud computing will overtake all other technologies based on current ... Read More
Introduction Many times in android applications we can see that OTP received for user authentication is detected automatically and it is added within the application automatically. Users don't have to add the otp manually. This can be done in android applications with the help of broadcast receivers. In this article we will take a look on How to listen for incoming sms messages in android application Implementation We will be creating a simple application in which we will be displaying two text views. First text view is for displaying the heading of our application. Second text view we will be ... Read More
Introduction Many times in android applications the address to the specific store or a location is being displayed in the form of an icon. On clicking on that google map icon the application redirects us to the Google Maps application in which we will get to see the route from users location to the stores location. In this article we will take a look on How to launch Google Maps Directions via an intent on Android. Implementation We will be creating a simple application in which we will be creating a text view for displaying the heading of our application. ... Read More
Introduction We can get to see different payment gateways used within any android application for collecting payments from the application users for providing the specific services such as Paytm, Razorpay, Paypal and many others. In this article we will take a look on How to integrate PayPal in an android application. Implementation We will be creating a simple application in which we will be creating a text view for displaying the heading of our application. After that we will create an edit text which is used to enter the amount for which the user has to make payment and a ... Read More
Many times in an android application we can get to see the data is being displayed in the form of a list such as in task tracker application we can get to see different types of tasks arranged in the form of a list in a specific order. Now inside those applications we can change the priority of tasks by simply changing their priority. We will add the task with highest priority at the top. So we can simply drag and drop that task to the top most position. So in this way Drag and Drop functionality is used for ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP