Print All Pairs of Anagrams in a Given Array of Strings in C++

sudhir sharma
Updated on 22-Jan-2020 09:37:31

478 Views

In this problem, we are given an array of strings and we have to print all pairs of anagrams of that given array.Anagrams are strings that are formed by rearranging the character of another string. Like − hello and lolheLet’s take an example to understand the problem −Input: array = {“hello”, “hrdef”, “from”, “lohel”, “morf”}. Output: [hello, lohel] , [from , morf]To solve this problem, we will use the nesting of loops. We need two nested loops, the outer loop will traverse over the array and select elements. The nested loop will check each of the string and check if ... Read More

Monitor Your Linux Servers and Websites from Cloud

Sharon Christine
Updated on 22-Jan-2020 09:28:59

310 Views

This article will help you to monitor IT infrastructure, Servers, Websites from the cloud. There is a huge requirement of having a tool to monitor and cloudstats.com fits the bill of a cloud monitoring tool. One of the key feature of this tool is to send you alerts and notifications to the team for CPU, DISK, RAM, Network usage and also monitors the services like Apache, MySQL, Mail, FTP, DNS.Cloudstats.meCloudStats.me is a new monitoring tool from Linux server, which is very easy to use and has a good yet capable feature of providing most vital information of your servers. CloudStats ... Read More

Migrate MySQL to MariaDB on Linux

Sharon Christine
Updated on 22-Jan-2020 08:21:42

449 Views

This article will help you to migrate the database from MySQL to MariaDB as the binary compatibility of MySQL-to-MariaDB in the migration process is very much straightforward.After the Oracle’s acquisition of MySQL, the community has driven an outcome of such movement and developed a new database called MariaDB. MariaDB is the open-source and its compatibility with MySQL. Most of the Linux distributions (RH, CentOS, Fedora) have already started to use the support of MariaDB as a drop-in replacement of MySQL.If we want to migrate the database from MySQL to MariaDB then this article will help.Preparing a MySQL Database and TablesWe ... Read More

Migrating PHP 5.x to PHP 7 on CentOS 7

Samual Sam
Updated on 22-Jan-2020 08:14:19

503 Views

In this article, we will learn about how to upgrade and update PHP 5.x to PHP 7, PHP 7 which was released in 2015 with speed improvements comparable to the older versions of the PHP.PrerequisitesAssuming that we have already installed PHP 5.x on CentOS7, and mod_php module should be enabled by Apache, and we need Sudo privileges or root user.Enabling the PHP 7 RepositoryAs PHP 7.x is not available in the official repositories, so we need to use IUS community Project Repository.Download the IUS repository in the machine with the below command# curl 'https://setup.ius.io/' -o setup-ius.sh curl 'https://setup.ius.io/' -o setup-ius.sh ... Read More

Use Let's Encrypt SSL Certificate to Secure Nginx on CentOS 7

Samual Sam
Updated on 22-Jan-2020 08:12:08

357 Views

In this article, we will learn how to secure Ngnix using a free SSL from Let’s Encrypt, Let’s Encrypt which is a new certifying authority which provides an easy way to obtain and install it for free TSL/SSL certificates. We can enable HTTPS on web servers. Let’s Encrypt has simplified the process by providing a software client which automates most of the steps required for obtaining the SSL from the certifying authority. Currently Let’s Encrypt is still in open beta version. Also note that, the entire process for obtaining and installing the certificate is fully automated.PrerequisitesWe needed a CentOS 7 ... Read More

Kill a Process by Name in Linux

Sharon Christine
Updated on 22-Jan-2020 08:08:36

706 Views

This article shows you how to use the Linux pkill command to kill running processes within Linux by using a name. Pkill (see pgrep) is a command-line utility while Solaris 7 process is running. pkill works on a currently active running process and lists down process ID’s which matches with the criteria.To kill a process by name in Linux, use the following command –pkillTo get a list of process in Linux, use the following command –$ ps -AThe sample output should be like this –PID TTY          TIME CMD    1 ?           ... Read More

Use Nano Text Editor

Samual Sam
Updated on 22-Jan-2020 08:08:03

4K+ Views

Are you confused by all of the other text editors? then, this article is for you! Linux amateurs are often put off by other advanced text editors such as Vim and Emacs. While they are decent programs, they does require a bit of learning curve. Nano offers a perfect solution if you are looking for a small and friendly text editor. It offers many useful and productive features.What is Nano Text Editor?Nano is a text editor for Unix-like systems or any other environments using a command line interface. It emulates the Pico text editor, a part of the Pine email ... Read More

Stop a Windows Service Using PowerShell

Chirag Nagrekar
Updated on 22-Jan-2020 08:07:43

25K+ Views

To stop specific service using PowerShell, you need to use Stop-Service command.SyntaxStop-Service -Name ServiceName Stop-Service -DisplayName ServiceDisplayNameExampleStop-Service -Name Spooler To check if service is stopped, type Get-Service -Name Spooler.OutputStatus   Name           DisplayName ------   ----           ----------- Stopped  Spooler           Print SpoolerYou can also use -Verbose parameter to check the command processes.PS C:\Windows\system32> Stop-Service -Name spooler -Verbose VERBOSE: Performing the operation "Stop-Service" on target "Print Spooler (spooler)".You can also perform the stop the service using, Get-Service -Name Spooler | Stop-Service -Verbose You can also use the wildcard ... Read More

Get Service Information with WMI Method Using PowerShell

Chirag Nagrekar
Updated on 22-Jan-2020 08:06:34

3K+ Views

You can also use the WMI method to get the services information instead of standard command Get-Service.CommandTo get the service information on the server, you need to use WMI class Win32_Service.Get-WmiObject -Class Win32_ServiceOutputExitCode  : 0 Name      : Browser ProcessId : 0 StartMode : Manual State     : Stopped Status    : OK ExitCode  : 0 Name      : BTAGService ProcessId : 1468 StartMode : Manual State     : Running Status    : OK ExitCode  : 0 Name      : BthAvctpSvc ProcessId : 1460 StartMode : Manual State     : Running Status    : OK ExitCode  : 0 Name      : bthserv ... Read More

Get Services on Remote Computers with PowerShell

Chirag Nagrekar
Updated on 22-Jan-2020 08:05:08

14K+ Views

To get service on the remote computer(s), simply you need to add parameter – ComputerName and provide remote servers computer name or IP address.In the below example, we are getting services information on remote computer Win7 which has Automatic start-type.Get-Service -ComputerName Win7 | Where{$_.StartType -eq "Automatic"}Similarly, you can connect multiple computers separated by comma (, ) in – ComputerName parameter.Get-Service -ComputerName Win7, TestPC | Where{$_.StartType -eq "Automatic"} If you need to identify on which particular computer(s), services exist, you can use the machinename property. In the above example, we are adding a machine name property in Pipeline.Get-Service -ComputerName Win7, TestPC ... Read More

Advertisements