How to Recursively Delete a Directory in PowerShell
If you want to recursively delete a directory/folder using PowerShell, then you have 2 options.
I needed this when cleaning up build artifacts in a CI …
Read Article →In-depth guides, insights, and best practices for modern software engineering
If you want to recursively delete a directory/folder using PowerShell, then you have 2 options.
I needed this when cleaning up build artifacts in a CI …
Read Article →If you get the following message, then there’s a very easy fix:
npm ERR! could not determine executable to run
This error usually means your git …
Read Article →If you get the following error and need a solution, then look no further!
npm ERR! code 1
npm ERR! path ./node_modules/node-sass
npm ERR! command …
Read Article →
You can install lodash through yarn as follows:
Lodash is one of those utility libraries that saves you from writing the same helper functions over …
Read Article →If you need to SHA256 a String in Go, then you can use the crypto/sha256 package.
package main
import ( …
Read Article →
Go ships with an encoding/base64 package that allows for encode and decoding of Base64 strings.
Import the base64 package and then start using it! …
Read Article →In short, you can just do this:
new String(Base64.getEncoder().encode(bytes));
In Java 8 and above, you …
Read Article →If you have an aws_lambda_function block that needs to make use of environment variables, then you can simply do the following:
resource …
Read Article →
You will be given an array of integers whose elements have both a negative and a positive value, except for one integer that is either …
Read Article →Given a string str, reverse it omitting all non-alphabetic characters.
Examples:
For str = "krishan", the output should be …
Get the ASCII value of a character.
Option 1:
val getAscii = Char::toInt
Option 2:
fun getAscii(c: Char) = c.code …
Read Article →
You have 2 options:
I use this when starting work on a project that’s been sitting for a while and all the dependencies are outdated. The …
Read Article →Take the following IPv4 address: 128.32.10.1 This address has 4 octets where each octet is a single byte (or 8 bits).
Finish the solution so that it takes an input n (integer) and returns a string that is the decimal representation of the number grouped …
You have 3 options here:
I needed this when doing bulk find-and-replace across config files in a deployment script. The -i option is the most common …
If you have a BigNumber when using web3, then you can convert this to a regular Javascript Number using the ethers library as follows: …
Write a function that when given a number >= 0, returns an Array of ascending length subarrays.
pyramid(0) => [ ]
pyramid(1) => …
Read Article →
Your job is to create a calculator which evaluates expressions in Reverse Polish notation.
For example expression 5 1 2 + 4 * + 3 - …
If you need to declare a global variable in React, then you can do the following:
Create a file called config.js
module.exports = global.config = { …
Read Article →
An Arithmetic Progression is defined as one in which there is a constant difference between the consecutive terms of a given series of …
Read Article →The main idea is to count all the occurring characters in a string. If you have a string like aba, then the result should be {'a': 2, …
Use the following code block to get started:
function GetCount() {
const [count, setCount] = useState(1);
const incrementCounter = () => { …
Read Article →
If you would like to disable the text selection highlighting that is enabled by default on all browsers, then you can do this:
user-select: none;
If …
Read Article →You will have a list of rationals in the form:
lst = [ [numer_1, denom_1] , ... , [numer_n, denom_n] ]
where all numbers are positive …
Read Article →