Solving Love vs Friendship in C
The challenge
If a = 1, b = 2, c = 3 ... z = 26
Then l + o + v + e = 54
and f + r + i + e + n + d + s + h + i + p = 108
So friendship is twice as …
In-depth guides, insights, and best practices for modern software engineering
If a = 1, b = 2, c = 3 ... z = 26
Then l + o + v + e = 54
and f + r + i + e + n + d + s + h + i + p = 108
So friendship is twice as …
Infrastructure code needs the same quality assurance practices as application code, but testing infrastructure presents unique challenges. How do you …
Read Article →A child is playing with a ball on the nth floor of a tall building. The height of this floor, h, is known.
He drops the ball out of the …
Read Article →Instructions
Write a function that takes a single string (word) as argument. The function must return an ordered list containing the …
AWS CLIStep 1
export bucketname='your-bucket-here'
Step 2
aws s3api delete-objects --bucket $bucketname --delete "$(aws …
Read Article →
If you are creating a FSx file system, and want to connect it to AWS Managed Active Directory, then you will need to create a VPC Security Group with …
Read Article →Multi-cloud strategies are becoming increasingly common as organizations seek to avoid vendor lock-in, leverage best-of-breed services, and meet …
Read Article →If you need to calculate variance in Python, then you can do the following.
variance() from Statistics moduleimport statistics
list …
Read Article →
If you need to calculate and get the sum of a list in Python, then you can do the following.
sum()myList = [1, 2, 3, 4, 5, 6, 7, 8, …
Read Article →
If you need to add a list to a set in Python, then you can do the following:
Tuplemyset = set((1,2,3,4))
mylist = list(1,2,3]) …
Read Article →
If you have a Python list, and want to remove all punctuation, then you can do the following:
string.punctuation …If you need to normalize a list of numbers in Python, then you can do the following:
Native Pythonlist = [6,1,0,2,7,3,8,1,5] …
Read Article →
If you need to multiply a list by a scalar in Python, then you can do one of the following:
List Comprehensionsli = [1,2,3,4] …
Read Article →
If you need to find the index of the minimum element in a list, you can do one of the following:
min() and index()lst = …
Read Article →
If you need to convert a set to a string in Python, then you can do one of the following:
map() and join()str_new = ', …
Read Article →
If you need to decrement a loop in Python, then you can do the following:
-1The optional third argument you …
Read Article →If you need to create a zip of a directory using Python, then you can do the following:
shutil in Pythonimport os
import shutil …
Read Article →
If you need to remove the last character of a string in PHP, then you can do the following:
rtrim()Syntax: rtrim($string, …
If you need to create a PHP function that returns multiple values, then you can do one of the following.
arrayfunction …
Read Article →
If you need to download a file in NodeJS without using any third party libraries, then you can do the following.
The NodeJS ecosystem comes with a fs …
If you need to execute a shell script in NodeJS, then you can use the exec keyword.
Syntax: exec(command [, options] [, callback]
const shell = …
Read Article →
If you need to print out multiple arguments using Python, then you can do one of the following:
printprint("Something", …
Read Article →
If you need to delete all resources created by Terraform, except for a single, specific one, then you can do the following:
If you need to copy files between two (2) nodes, using Ansible, then you can do the following:
This solution uses the synchronize module, specifically …