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 TimedDisposed:IDisposable | |
| { | |
| Action<TimeSpan> _action; | |
| Action<TimeSpan, string> _markAction; | |
| DateTime _start; | |
| List<KeyValuePair<DateTime, string>> _marks = new List<KeyValuePair<DateTime, string>>(); | |
| public bool ActionEnabled { get; set; } | |
| public bool MarkActionEnabled { get; set; } |
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
| /* | |
| Uptime calculation for SLAs. | |
| Gary Kenneally | |
| */ | |
| const double daysInYear = 365.2425; | |
| const double monthsInYear = 12; | |
| const double daysInMonth = daysInYear / monthsInYear; | |
| const double second = 1; |
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 ( | |
| [string]$minutes = 25, # typically pomodoro tasks use 25 minutes or 'work' followed by a short break | |
| [string]$taskname = "Task" | |
| ) | |
| $start=$(get-date); | |
| $diff=$(get-date)-$start | |
| $total=new-object TimeSpan -argumentList 0,$minutes,0 | |
| $t=get-date |
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
| Console.WriteLine("Guess the frequency"); | |
| var random = new Random(); | |
| var playing = true; | |
| var MIN = 37; | |
| var MAX = 5000; | |
| var threshold = MAX / 20; | |
| var test = 37; | |
| while (test <= MAX) |
OlderNewer