How to add NSPhotoLibraryUsageDescription key in XCode for an iOS project

NSPhotoLibraryUsageDescription key was introduced in iOS 10. This key should be included in all iOS project if the app is accessing the user's photo library. In this post, I will show you how to add this key to an XCode project.

Read

Python string center method explanation with example

center() is an inbuilt method defined in the python string. Using this method, we can centre align a string. By default, we can centre align a string with space on its side. Or we can give specific characters as the fill character.

Read

How to read a user input list in python

Sometimes we need to read a list of inputs from the user. For example, if our program needs a list of strings as an input from the user, we will have to ask the user to enter these values. We can get them one by one or all in one go. In this post, I will show you how to handle this situation in Python.

Read

Backup and restore MongoDB using mongodump and mongorestore

Database backup is always required either you are developing an application or it is running on production. In this blog post, I will show you how to take the backup of a mongodb database using mongodump and how to restore that database using mongorestore.

Read

How to read a string in C++ using getline

We can read a string line or a user input line in many ways in C++. In this tutorial, we will show you how to read a line using getline() function. getline() has different variants. We will show you these variants with an example.

Read

Python String isspace() explanation with example

isspace() is used to check if a string contains all white space characters or not. If your program can't handle white spaces, this method really comes handy. For example, on your server, you can confirm a string before performing any operation on it.

Read

C++ program to print a hollow triangle using star

In this tutorial, we will learn how to print hollow triangle in C++. Our program will take the height of the triangle as an input from the user and print it out.

Read

log function in C++ explanation with example

log() function in C++ is used to find out the base-e logarithm or natural logarithm of a number. It has different overloaded versions to take different types of arguments.

Read

C++ program to check if all characters of a string are alphanumeric or not

Check if a string contains only alphanumeric characters in C++. The program will take the string as an input from the user to check if all characters are alphanumeric.

Read

Find if a number is prime or not in C++

This tutorial will show you how to verify if a number is prime or not in C++ programmatically. The program will ask the user to enter a number, it will check if it is prime or not and print out the result.

Read