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
| function Get-StatisticsResults { | |
| $NumberOfQuarters = 10; | |
| $PercentageOfGettingQuarterBack = 0.5; | |
| $NumberOfGumballs = 0; | |
| while ($NumberOfQuarters -ne 0) { | |
| $NumberOfGumballs++; | |
| $RandNumber = (Get-Random -Minimum 0.0 -Maximum 1.0) | |
| if ($RandNumber -lt $PercentageOfGettingQuarterBack) { |
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
| public class AlphanumericIdUtil { | |
| private static final String VALID_CHARACTERS = "23456789abcdefghjkmnpqrstuvwxyz"; | |
| public static void main(String[] args) { | |
| System.out.println(getNumberFromId("a8e2fz")); | |
| System.out.println(getIdFromNumber(24)); | |
| } | |
| /** |
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
| Import-Module posh-git | |
| [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding(850) | |
| function prompt { | |
| # Get the current path, but format it a bit differently | |
| $CurrentPath = (pwd).Path | |
| $ShortPath = $CurrentPath.Replace($HOME, '~').Replace("\", "/") | |
| $ShortPath = $ShortPath -Replace '^[^:]+::', '' |