Tutorials


How to convert byte array to a hexadecimal string in C#, and vice versa?

This post contains two simple methods to convert byte array to hexadecimal string in C# and vice versa.

Get int value from Enum in C# with examples

To get int value from enum in C#, cast the enum to int

List all containers in Docker command

We can get a list of all containers in docker using docker container list or docker ps commands.

Copying files/folders from host to Docker container & docker container to host

To copy files or folders from host to docker container or docker container to host use docker cp command

How to convert string to enum in C#

To Convert string to enum in C# use Enum.TryParse and Enum.Parse methods

How To Check If A String Is Empty/Null/Undefined In JavaScript

To check if a string is null or empty or undefined use the following code snippet if(!emptyString){ // String is empty }

How To Create UUID/GUID In JavaScript With Examples

To create GUID or UUID in JavaScript we can use Math.Random() or ES6 crypto API getRandomValues method.GUID or UUID generated by Math.Random() may not be unique.

How To Check If An Object Is Empty In JavaScript Examples

In javascript, we can check if an object is empty or not by using JSON.stringify, Object.keys (ECMA 5+),Object.entries (ECMA 7+)

3 Methods To Replace All Occurrences Of A String In JavaScript

Javascript replace method, replaces only the first occurrence of the string. To replace all occurrences of a string in Javascript use string replace() & regex,Javascript split() & join(), Javascript indexOf method.

Javascript String Contains: Check If A String Contains A Substring

To check if a Javascript String Contains a substring or not, we can use 7 different Javascript methods as listed in below table.