• 26 December

    Repeat List N Times in Python

    This tutorial will demonstrate how to repeat list n times in Python. Using the * operator To repeat list n times in Python, use the * operator. Star operator(*) is used to multiply list by number e.g. lst*3 and this will repeat list 3 times. See the code below. [crayon-676cb861e9e39181197251/] Output: [2, 4, 6, 11, […]

  • 26 December

    Get First Day of Next Month in Python

    Get First Day of Next Month in Python This tutorial will demonstrate how to get first day of next month in Python. Using the datetime.replace() with datetime.timedelta() function To get first day of next month in Python: Use the datetime object to store the current date and time. Use the datetime.replace() and datetime.timedelta() function to […]

  • 25 December

    Convert String Array to Int Array in Python

    This tutorial will demonstrate how to convert string array to int array in Python. Using the for loop with int() function To convert string array to int array in Python: Use the for loop to loop through the array. Use the int() function to convert each element to an integer in every iteration. See the […]

  • 25 December

    Encode String to UTF-8 in Python

    The UTF-8 encoding is used by default in Python and represents 8-bit Unicode values. The upgrade to Python 3 saw a major change in using ASCII characters to Unicode characters by default for strings. Encode String to UTF-8 in Python This tutorial will demonstrate how to encode string to UTF-8 in Python. Using the encode() […]

  • 24 December

    Get AD User Description in PowerShell

    To get AD user description in powerShell, use Get-AdUser cmdlet with -Properties as Description. [crayon-676cb861eb751466381507/] Please note that you must must first install the Remote Server Administration Tools (RSAT) package and import the Active Directory module. Get AD User Description and Attributes in PowerShell The Get-ADUser cmdlet is a powerful tool in the Active Directory […]

  • 24 December

    Create Folder If Not Exist in PowerShell

    This tutorial will explain how to create a folder using PowerShell if it does not exist in the given location. Using Test-Path and New-Item Cmdlets To create folder if not exist in PowerShell: Use Test-Path cmdlet with if statement to check the path. If folder doesn’t exist, Create a new folder with New-Item cmdlet. [crayon-676cb861eb88a874738791/] […]

  • 24 December

    Check If String Contains Substring in PowerShell

    1. Overview In PowerShell scripting, a common requirement is to check whether a string contains a specific substring. This is a fundamental task in text processing, often used in conditional logic, data validation, or filtering operations. In this article, we will see different ways to check if string contains substring using various methods such as […]

  • 24 December

    Delete File If Exists in PowerShell

    This tutorial will discuss how to delete a file if it exists using PowerShell. Delete File If Exists in PowerShell To delete a file if exists in PowerShell: Use Test-Path cmdlet with if statement to check if file exists at given location. If files exists, use Remove-Item cmdlet to remove the file at given location. […]

  • 23 December

    Create Array from 1 to 100 in JavaScript

    Use for Loop To create the array from 1 to 100 in JavaScript: Use a for loop that will iterate over a variable whose value starts from 1 and ends at 100 while the variable’s value is incremented by 1 in each iteration. Inside the for loop, use the push() method to insert a value […]