package main
import (
"fmt"
"log"
"github.com/kkdai/youtube/v2"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [string]$folderName | |
| ) | |
| # Function to capitalize the first letter of each word | |
| function Capitalize-FirstLetter { | |
| param ( | |
| [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] | |
| [string]$string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param( | |
| [Parameter(Mandatory=$true)] | |
| [string]$FileName | |
| ) | |
| # Convert the file name to lowercase | |
| $NewFileName = $FileName.ToLower() | |
| # Replace spaces with underscores | |
| $NewFileName = $NewFileName -replace '\s', '_' |
- Backtracking
- Big Integer
- Ciphers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "strings" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Extension | |
| extension RandomColorExtension on String { | |
| static const letters = "0123456789abcdefghijklmnopqrstuvwxyz"; | |
| static String _randomString() { | |
| final Random random = Random(); | |
| String result = ''; | |
| for (int i = 0; i < 6; i++) { |
Generating pseudorandom numbers typically involves using algorithms or processes that produce sequences of numbers that appear to be random but are actually determined by a specific formula or seed value. There are various methods for generating pseudorandom numbers, and I'll provide a comprehensive list of some common techniques:
-
Linear Congruential Generator (LCG): One of the oldest and simplest methods, it generates numbers using a linear congruential equation. The sequence depends on three parameters: modulus, multiplier, and increment.
-
Mersenne Twister: A widely used pseudorandom number generator that has a very long period and good statistical properties. It uses a large state space and produces high-quality random numbers.