How to Validate ISBN-10 numbers in Golang
The challenge
ISBN-10 identifiers are ten digits long. The first nine characters are digits 0-9. The last digit can be 0-9 or X, to indicate a value …
In-depth guides, insights, and best practices for modern software engineering
ISBN-10 identifiers are ten digits long. The first nine characters are digits 0-9. The last digit can be 0-9 or X, to indicate a value …
Create a new file called Application.java and paste the following:
import javax.swing.*;
import java.net.InetAddress;
import …
Read Article →
An output in Terraform is a way to view the result of an action that has been performed, or resource that has been created.
Let’s say that you …
Read Article →The goal of this challenge is to write a function that takes two inputs: a string and a character. The function will count the number of …
Read Article →If you have just upgraded Ubuntu on your AWS g4dn instance and need to install/reinstall Cuda drivers for your Nvidia chipset, then you can run the …
Read Article →If you need to view a list of all the services that are either running or stopped (or both) on an Ubuntu server, then you can use the following …
Read Article →If you get the following error while trying to delete an image in Docker:
Error response from daemon: conflict: unable to remove repository reference …
Upgrading an Ubuntu Server is quite easy, just follow the below commands:
sudo apt-get update && sudo …
Read Article →
Write a function that takes an array of numbers (integers for the tests) and a target number. It should find two different items in the …
Read Article →Santa’s senior gift organizer Elf developed a way to represent up to 26 gifts by assigning a unique alphabetical character to each …
Read Article →You are given an input string.
For each symbol in the string if it’s the first character occurrence, replace it with a ‘1’, else replace …
Read Article →A Noun Phrase is a phrase that can be replaced by a pronoun [he/she/it].
For example, in the sentence:
a girl ate the cookie
“A …
Read Article →Write function MaxRot(n) which given a positive integer n returns the maximum number you got doing rotations similar to the above …
Given a variable n,
If n is an integer, Return a string with dash'-'marks before and after each odd integer, but do not begin or end the …
Write a nickname generator function, nicknameGenerator that takes a string name as an argument and returns the first 3 or 4 letters as a …
Given two arrays a and b write a function comp(a, b) (orcompSame(a, b)) that checks whether the two arrays have the “same” …
Find the total sum of internal angles (in degrees) in an n-sided simple polygon.
N will be greater than 2.
Option …
Read Article →You are given a binary tree. Implement the method findMax which returns the maximal node value in the tree.
For example, the maximum in …
Read Article →The method below is the most simple string search algorithm. It will find the first occurrence of a word in a text string.
haystack = …
If you are automating AWS resources in Terraform, then you will want to not hardcode things as much as possible.
Terraform makes it possible to pull …
Read Article →If you get the following error when trying to run some Terraform:
error creating Appstream Fleet (): InvalidRoleException: AppStream 2.0 encountered …
AWS AppStream has finally made its way into the Terraform AWS Provider.
If you are using hashicorp/aws version 3.67 or above, then you can do the …
It’s possible to stop a Goroutine by sending a value into it via a signal channel:
exit := make(chan bool)
go func() {
for {
select …
Read Article →
If you need to create an empty branch in git, you can follow one of the below options.
If you are using git version 2.27 or newer, then follow the …
Read Article →