Blog Posts

How to Flex Grid 2 Columns using CSS

July 24, 2022

If you would like to flex grid 2 columns in CSS then you need three (3) divs.


Read More

How to Create a Hashtag Generator in Javascript

July 23, 2022

If you want to create a hashtag generator in Javascript, then you can do the following:


Read More

How to Confirm before Leaving Page in Javascript

July 22, 2022

You can implement a function to be called before the user leaves a page with Javascript as follows:


Read More

What are the multiples of 3 from 1 to 1000

July 21, 2022

If you need to calculate the multiples of 3, starting from 1 up until 1000, then you can use the following code:


Read More

How to Count Files in Directory on Linux

July 20, 2022

If you need to count how many files are in a directory on Linux, then you can use a combination of the ls command to list all the files, and the wc command to count how many lines are printed:


Read More

How to Read a File Line by Line in Java

July 19, 2022

If you need to read a file line by line in Java, then you can use one of the following three (3) options.


Read More

How can I clear or empty a StringBuilder

July 18, 2022

You can use Java’s StringBuilder to create and manipulate Strings as follows:


Read More

How to Approve a SageMaker model in AWS CLI

July 17, 2022

Sometimes you will need to manually approve a SageMaker model package from the AWS CLI.


Read More

How to Assume Role across Accounts in AWS

July 16, 2022

If you need to assume role between AWS accounts, or allow an account to assume a role and use resources in another AWS account, then you need to create a role and attach the following policy.


Read More

How to Style an Element using Javascript

July 15, 2022

If you need to style an element using Javascript then you can use the style object to support all your CSS needs.


Read More

How to Wait 1 Second in Javascript

July 14, 2022

If you need your Javascript code to wait one (1) second (or more) while executing, then there are a couple of ways to achieve this.


Read More

How to use forEach method in Javascript

July 13, 2022

Arrays come with a useful forEach function that allows you to loop through the array.


Read More

How to Remove an Element from an Array in Javascript

July 12, 2022

If you need to remove an element from an array in Javascript, then you can use one of the following five (5) options:


Read More

How to get the Alphabet as Array in Javascript

July 11, 2022

If you need to get an array of alphabetical letters in Javascript then you can use one of the following:


Read More

The Power of Two (2) Table

July 10, 2022

With the Power of Two, you can ask the following:


Read More

How to get the Screen Width in Javascript

July 9, 2022

Javascript gives a few options to determine the screen width.


Read More

How to Read a File in Rust

July 8, 2022

If you need to read a file in Rust, then you can use the fs package from the standard library:


Read More

How to Convert Array to String in Java

July 7, 2022

If you need to convert an array to a string in Java, then you could look at a solution like this:


Read More

How to Join Two Strings Together in Golang

July 6, 2022

If you need to join two (2) strings together in Golang, you can do the following, using the + concatenation operator:


Read More

How to Recursively Delete all Files in an AWS S3 Bucket

July 5, 2022

If you need to recursively delete all files in an AWS S3 bucket, then you can do the following:


Read More