Longest Subsequence with Same Char as Substrings and Frequency Difference at Most K

Shubham Vora
Updated on 17-Jul-2023 16:12:19

268 Views

In this problem, we will find the maximum length of the subsequence such that it should contain the contiguous characters, and the frequency difference of all characters won’t differ more than K. We need to find all possible subsequences of the given string and check whether it contains every character continuously and maximum frequency difference to get the output. Problem statement− We have given a string alpha containing the lowercase alphabetical characters. Also, we have given the positive integer K. We need to find the maximum length of the subsequence of the given string such that it follows the below ... Read More

ifconfig vs ip: Understanding the Difference in Network Configuration

Satish Kumar
Updated on 17-Jul-2023 16:11:32

2K+ Views

As network administrators or anyone dabbling in network troubleshooting, you will often come across the terms 'ifconfig' and 'ip'. Both these commands are used in Unix-based operating systems for network interface configuration, but what makes them different? In this article, we will dissect the differences, delve into some examples and their outputs to understand these commands better. Introduction to Ifconfig Ifconfig (Interface Configuration) is a system administration utility in Unix and Unix-like operating systems to configure, control, and query TCP/IP network interface parameters. It is a part of the net-tools package which has been there almost since the inception of ... Read More

Sort By Value in PySpark

Tapas Kumar Ghosh
Updated on 17-Jul-2023 16:11:02

842 Views

PySpark is distributed data processing engine that will use to write the code for an API. PySpark is the collaboration of Apache Spark and Python. Spark is large-scale data processing platform that provides the capability to process petabyte scale data. In Python, we have PySpark built-in functions like orderBy(), sort(), sortBy(), createDataFrame(), collect(), and asc_nulls_last() that can be used to sort the values. Syntax The following syntax is used in the examples − createDataFrame() This is a built-in function in Python that represents another way to create the DataFrame from the PySpark module. orderBy() This is the built-in ... Read More

Install Ghost CMS Blog Publishing Platform on Debian and Ubuntu

Satish Kumar
Updated on 17-Jul-2023 16:09:12

599 Views

Introduction In the world of blogging, content management systems (CMS) play a vital role in managing and publishing articles. One popular CMS that has gained significant traction among bloggers is Ghost. Ghost is an open-source platform built on Node.js, known for its simplicity, speed, and elegant design. In this article, we will explore how to install Ghost on both Debian and Ubuntu operating systems. We will provide step-by-step instructions along with examples and their respective outputs to guide you through the installation process. Prerequisites Before we begin, make sure you have the following prerequisites − A server or virtual ... Read More

Skip Every Nth Index of NumPy Array

Tapas Kumar Ghosh
Updated on 17-Jul-2023 16:08:35

1K+ Views

In Python, we have some built-in functions like array(), len(), append, and, mod() that can be use to Skip every Nth index of Numpy array. There are many ways for skipping the nth index of a NumPy array. The numpy modulus technique is one option. We can first arrange the array into chunks of evenly spaced intervals using the numpy.arange() method. Then, using the nth index, apply the np.mod() technique to the generated list intervals and compute the modulus of each element. Syntax The following syntax is used in the examples − array() This is an in-built method that ... Read More

Install EHCP in RHEL, CentOS, Fedora, Ubuntu, Debian, and Linux Mint

Satish Kumar
Updated on 17-Jul-2023 16:07:51

2K+ Views

Introduction EHCP (Easy Hosting Control Panel) is a powerful and user-friendly web hosting control panel that simplifies the process of managing web servers and hosting websites. It provides a comprehensive set of features and tools to streamline the hosting experience. This article will guide you through the step-by-step process of installing EHCP on both Red Hat-based distributions (RHEL, CentOS, Fedora) and Debian-based distributions (Ubuntu, Debian, Linux Mint). Additionally, we will include examples and their output to illustrate the installation process. Prerequisites Before we begin, make sure you have the following prerequisites in place − A server or virtual machine ... Read More

Generate Binary String with Equal Number of 01 and 10 Subsequence

Shubham Vora
Updated on 17-Jul-2023 16:06:05

449 Views

In this problem, we will find the binary string of the given length having the same number of ‘01’ and ‘10’ subsequences. The naïve approach to solving the problem is to generate all binary strings of the given length and check whether it contains the same number of ‘10’ and ‘01’ subsequences using the dynamic programming technique. Another efficient approach is to prepare a binary string based on whether the given length is odd or even. Problem statement − We have given a positive integer ‘len’ which is greater than 2. The task is to find the binary string ... Read More

Set a Single Main Title for All Subplots in Matplotlib

Tapas Kumar Ghosh
Updated on 17-Jul-2023 16:05:58

4K+ Views

The multiple subplots are defined by a collection of different plotting graphs. The Matplotlib is name of the module that provides animated and interactive visualization in Python. In Python, we have some built-in function named suptitle() that can be used to Set a Single Main Title for All the Subplots in Matplotlib. Syntax The following syntax is used in the examples − array() The array method of Python is defined by returning the number of elements with its specific value. suptitle() This is the built-in method in Python that can be used to set the main title of ... Read More

Install Docker and Learn Basic Container Manipulation in CentOS and RHEL 8

Satish Kumar
Updated on 17-Jul-2023 16:05:28

328 Views

Introduction Docker has revolutionized the world of software development and deployment by providing a lightweight and efficient containerization platform. With Docker, developers can package their applications and dependencies into containers, making it easier to deploy and run them consistently across different environments. In this article, we will guide you through the process of installing Docker on CentOS and RHEL 8/7 and provide examples of basic container manipulation. Installing Docker on CentOS/RHEL 8 Preparing the System Before installing Docker, ensure that your system is up to date by running the following commands − $ sudo yum update $ sudo yum install ... Read More

Install and Configure Caching Only DNS Server in RHEL/CentOS 7

Satish Kumar
Updated on 17-Jul-2023 16:03:19

1K+ Views

Introduction DNS (Domain Name System) plays a crucial role in translating domain names into IP addresses, allowing users to access websites using human-readable URLs. To enhance DNS performance and reduce network latency, implementing a caching-only DNS server can significantly improve the speed and efficiency of DNS lookups. In this article, we will guide you through the process of installing and configuring a caching-only DNS server in RHEL/CentOS 7. Prerequisites Before proceeding, ensure that you have the following − A server running RHEL/CentOS 7. Root or sudo access to the server. Basic knowledge of the Linux command line. Update ... Read More

Advertisements