Programming Articles - Page 2742 of 3366

Print with your own font using Python?

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:25

458 Views

In this, we are going to see how differently we can display our text in a very unique way using python.So let suppose I want to display “Hello, Python” and out many ways I could display my text/string (“Hello, Python”) like:Input“Hello, Python”Output 1___ ___ .__ .__ / | \ ____ | | | | ____ / ~ \_/ __ \| | | | / _ \ \ Y /\ ___/| |_| |_( ) \___|_ / \___ >____/____/\____/ /\ \/ \/ )/ __________ __ .__ \______ \___.__._/ |_| |__ ____ ____ | ___< | |\ __\ | \ / _ ... Read More

Formatted string literals (f-strings) in Python?

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

701 Views

Python now provides new way to format strings, called f-strings. This features is available from Python 3.6 under PEP-498. They are so called (f-string) because of the letter ‘f’ prefix with a string. The letter ‘f’ also indicates that these f-strings can be used for formatting.Below are some of the examples to demonstrates the use of f-strings.Program#1name = 'Rajesh' age = 13 * 3 fString = f'My name is {name} and my age is {age}' print(fString) #We can use Uppercase 'F' instead of lowercase 'f'. print(F'My name is {name} and my age is {age}') #As the fString valuation is done, ... Read More

Image based Steganography using Python?

Nitya Raut
Updated on 30-Jul-2019 22:30:25

968 Views

Steganography is a technique of hiding information behind the scene. It’s is not like cryptography which focuses on encrypting data(through different algorithms like SHA1, MD5 etc), steganography focuses more on hiding the data (data can be a file, image, message or video) within another file, image, message or video to avoid any attraction.So in this we’ll try to create a simple python program that hides the information behind the image without noticiable changes in the looks of the image. There are two main parts of the program – first is a decoding function that can extract secret information from an ... Read More

negate function in C++ STL

Farhan Muhamed
Updated on 15-May-2025 11:23:14

1K+ Views

The negate function in C++, is a function object (functor) that returns the negation of a the given value. In this article, we will learn how to use the negate function from the Standard Template Library (STL) in C++. What is negate? The negate function is a predefined function object defined in the STL that performs arithmetic negation. It takes a single value and returns its negative value. For example, if the input is 5, the output will be -5. This operation is useful when we want to apply negation inside STL algorithms like transform() or for_each() without writing ... Read More

multiset insert() function in C++ STL

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:25

240 Views

The multiset insert() function in C++ STL which insert elements in the multiset container from a position to another position from one multiset to a different multiset.List of functions used:ms.size() = Returns the size of multiset. ms.insert() = It is used to insert elements to the multiset.Example Code#include #include #include #include using namespace std; int main() {    multiset ms;    multiset::iterator it, it1;    int c, i;    while (1) {       cout

lldiv() function in C++ STL

Farhan Muhamed
Updated on 06-Jun-2025 18:56:54

161 Views

The lldiv() function is used to perform division operation on long long integers and return both quotient and remainder. In this article, we will learn how to use the lldiv() function from the Standard Template Library (STL) in C++. What is lldiv()? The lldiv() is a in-built function in C++ that is used to divide one long long integer by another and return the result as a structure that contains both the quotient and remainder. This function is useful when both values are needed after a division operation. The return type of this function is a structure called lldiv_t, ... Read More

iswalpha() function in C++ STL

Farhan Muhamed
Updated on 12-Aug-2025 17:16:47

245 Views

The iswalpha() function is an extension of the isalpha() function, which supports character identification of all languages. In this article, we will learn how to use the iswalpha() function from the Standard Template Library (STL) in C++. What is iswalpha()? The iswalpha() function is used to check whether a given wide character is an alphabetic character. Wide character means the larger set of characters, which includes the characters from all languages. The iswalpha() function returns true if the input character is a letter, such as from English, Hindi, Chinese, etc. The regular isalpha() function will only work with alphabets ... Read More

iswalnum() function in C++ STL

Farhan Muhamed
Updated on 13-May-2025 19:31:26

270 Views

The iswalnum() function is an extension of isalnum() function to support character identification of all languages. In this article, we will learn how to use the iswalnum() function from the Standard Template Library (STL) in C++. What is iswalnum()? The iswalnum() function is used to check whether a given wide character is alphanumeric. An alphanumeric character is either an alphabet letter (a-z, A-Z) or a digit (0-9). Wide character means, the larger set of characters, which include the characters from all the languages. The iswalnum() function returns true if the input character is either a letter from any language ... Read More

Insertion and Deletion in STL Set C++

Farhan Muhamed
Updated on 04-Jun-2025 18:48:48

1K+ Views

The STL set is a container that stores unique elements in a sorted order. Insertions and deletions are common operations performed in containers like std::set and std::vector. In this article, we will learn how to insert and delete elements in a C++ STL set. Insertion in STL Set To insert a new element into a std::set you can use the insert method or the emplace method. Let's understand how to use these methods with examples. Using insert Method Using emplace Method 1. Using insert Method The insert ... Read More

How to remove an item from a C++ STL vector with a certain value?

Farhan Muhamed
Updated on 03-Jun-2025 17:49:46

764 Views

To remove an item from a C++ STL vectors by value, you can use the std::remove inside the argument of erase method of the vector. There are some other methods as well. In this article, we will learn all the approaches to remove an item from a C++ STL vector. The easiest way to remove an item from a vector is to use the std::remove algorithm inside the erase method of the vector. For example: vector v = {1, 2, 2, 3, 2, 5}; // Remove all occurrences of 2 v.erase(remove(v.begin(), v.end(), 2), v.end()); Remove an ... Read More

Advertisements