Given with ‘a’(first term), ‘d’(common difference) and ‘n’ (number of values in a string) and the task is to generate the series and thereby calculating their sum.What is an Arithmetic seriesArithmetic series is the sequence of numbers with common difference where the first term of a series is fixed which is ‘a’ and the common difference between them is ‘d’.It is represented as −a, a + d, a + 2d, a + 3d, . . .ExampleInput-: a = 1.5, d = 0.5, n=10 Output-: sum of series A.P is : 37.5 Input : a = 2.5, d = 1.5, n ... Read More
Given with the rate of filling the tank, height of a tank and radius of a tank and the task is to check whether the tank is overflow, underflow and filled in given time.ExampleInput-: radius = 2, height = 5, rate = 10 Output-: tank overflow Input-: radius = 5, height = 10, rate = 10 Output-: tank undeflowApproach used below is as follows −Input the rate of filling time, height and radius of a tankCalculate the volume of a tank to find the original rate of flow of water.Check for the conditions to determine the resultIf expected < original ... Read More
nslookup is a network administration command-line tool available for many computer operating systems for querying Domain Name System (DNS) to obtain domain name or IP address mapping or for any other specific DNS record. This article explains about nslookup command in detail. Nslookup can be run in two modes, Interactive and Non-Interactive. The Interactive mode is used to query DNS-Server about various domains and hosts. Non-Interactive mode is used to query about information of a domain or host.To find out Find out “A” record (IP address) of Domain, use the following command –$ sudo nslookup tutorialspoint.comThe sample output should be ... Read More
OpenSSL is a CLI (Command Line Tool) which can be used to secure the server to generate public key infrastructure (PKI) and HTTPS. This article helps you as a quick reference to understand OpenSSL commands which are very useful in common, and for everyday scenarios especially for system administrators.Certificate Signing Requests (CSRs)If we want to obtain SSL certificate from a certificate authority (CA), we must generate a certificate signing request (CSR). A CSR consists of mainly the public key of a key pair, and some additional information. Both these components are merged into the certificate whenever we are signing for ... Read More
In this article, we will learn about the ‘date’ command in Linux and how to practically use the ‘date’ command in day-to-day usage with some practical examples. The ‘date’ command is used to print or to change the system date and time.General Syntax[root@localhost ~]# date [OPTION]... [+FORMAT] [root@localhost ~]# date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]The Date Command has the following UsagesWe can print date and time on the systemWe can display the date and time in the given format.We can read the date from the fileWe can display the Universal time.We can set the system date and time.Displaying the Date and Time from ... Read More
Did you anytime notice about automatically answering questions posted on Twitter and you desire to make one for yourself? you can do it. We find, Twitter bots not only answering the questions, but it also shares its source. You can copy as well make your own little assistant.Twitter Bots DesignThe Twitter bots are designed for the purpose of Tweeting, retweeting and sharing varied Tweets. That’s not all, Twitter bots can not only follow a specific Twitter user, but it also can correct spelling mistakes depending upon the program specification.Google ScriptsIn the past, python program codes were used, but in recent ... Read More
Guake is a drop-down terminal for GNOME and any other desktop. It aims to provide a quick-access terminal, that show/hide on screen with a simple key pressing. Its style of window is based on an fps games, and one of its goals is being easy to reach. Guake is written mostly in python and has a little piece in C. This article explains about how to install Guake terminal on Ubuntu.FeaturesIt is a Lightweight terminalSimple Easy and ElegantSmooth integration of terminal into GUIIt Appears when you call and disappears once you are done by pressing a predefined hotkey (F12 by ... Read More
Given with an input of string and the task is to check whether the first and last characters of given string is equal or not.ExampleInput-: study Output-: not equal As the starting character is ‘s’ and the end character of a string is ‘y’ Input-: nitin Output-: yes it have first and last equal characters As the starting character is ‘n’ and the end character of a string is ‘n’Approach used below is as follows −Input the string and store in an array of strings.Calculate the length of a string using length() functionCheck first and last element of ... Read More
In this article, we will learn how to setup TLS/SSL certificates using the “Let’s Encrypt” on Ubuntu server with Apache as a web server, we shall also cover how to automate the certificate renewal using corn jobs.PrerequisitesTo complete this demo we needed to have the below requirementsAn Ubuntu server with a user with sudo permissions.Apache server installed on it with a proper domain name configured.Installing the Dependencies on ServerWe needed to update the server using the below command and install the git to get the Let’s Encrypt client from the repository.$ sudo apt-get update$ sudo apt-get install gitDownload the Let’s ... Read More
Given a n number of vertices of a graph, the task is to calculate the edge cover of the graph. Edge cover is to find the minimum number of edges required to cover every vertex of the graph.Like we have n = 5Then its graph will be like −So its edge cover is 3Let’s take another example where the n is 8And its edge cover will be:4ExampleInput: n= 5 Output: 3 Input: n= 8 Output: 4Approach used below is as follows −Take the input from the userFind the ceiling value of the result of number of vertices by dividing it ... Read More