I hereby claim:
- I am CallumWatkins on github.
- I am callumwatkins (https://keybase.io/callumwatkins) on keybase.
- I have a public key whose fingerprint is 7A2C 9986 AF66 4A9E 2A8D 869F C71C 342D A44D AB84
To claim this, I am signing this object:
/// <summary> | |
/// Calculates the sum of all the integers in the range between two integers. | |
/// </summary> | |
/// <param name="start">The starting integer.</param> | |
/// <param name="end">The ending integer.</param> | |
/// <param name="exclusive">Whether or not the <paramref name="start"/> and <paramref name="end"/> integers are excluded from the sum.</param> | |
/// <returns>Returns the sum of the integers in the range.</returns> | |
private static long SumBetween(int start, int end, bool exclusive = false) | |
{ | |
if (start > end) { throw new ArgumentException("End value must be more than or equal to start value."); } |
public static class Compass | |
{ | |
public enum CompassDirection { N, NbE, NNE, NEbN, NE, NEbE, ENE, EbN, E, EbS, ESE, SEbE, SE, SEbS, SSE, SbE, S, SbW, SSW, SWbS, SW, SWbW, WSW, WbS, W, WbN, WNW, NWbW, NW, NWbN, NNW, NbW } | |
public enum CompassPoints { Four = 4, Eight = 8, Sixteen = 16, ThirtyTwo = 32 } | |
public static Dictionary<CompassDirection, string> CompassDirections | |
{ | |
get | |
{ | |
return new Dictionary<CompassDirection, string>() |
using System; | |
using System.IO; | |
/// <summary> | |
/// Creates all directories and subdirectories unless they already exist and creates or overwrites a file in the specified path. | |
/// </summary> | |
/// <param name="path">The full path of the file.</param> | |
public static FileStream CreateFileAndDirectory(string path) | |
{ | |
if (path == null) { throw new ArgumentNullException(nameof(path)); } |
public void SearchWindowsExplorer(string query, string location = null) | |
{ | |
if (location != null && !Directory.Exists(location)) | |
{ | |
throw new ArgumentException("Directory does not exist.", "location"); | |
} | |
string uri = "search:query=" + Uri.EscapeDataString(query) + | |
(location == null ? string.Empty : "&crumb=location:" + Uri.EscapeDataString(location)); | |
Process.Start(uri); | |
} |
/// <summary> | |
/// Checks whether any given integer is located in the range between two other integers. | |
/// </summary> | |
/// <param name="i">The integer to check.</param> | |
/// <param name="min">The minimum value of the range.</param> | |
/// <param name="max">The maximum value of the range.</param> | |
/// <param name="inclusive">Whether or not the minumum and maximum values are included in the range.</param> | |
/// <returns>Boolean</returns> | |
private static bool IsInIntegerRange(this int i, int min, int max, bool inclusive = true) | |
{ |
I hereby claim:
To claim this, I am signing this object:
Verifying that +callumwatkins is my blockchain ID. https://onename.com/callumwatkins |
/// <summary> | |
/// Splits a string into blocks of a specified length, delimited by a specified string. | |
/// </summary> | |
/// <param name="value">The string to split up.</param> | |
/// <param name="partLength">The number of characters between each delimiter.</param> | |
/// <param name="delimiter">The delimiter to be inserted.</param> | |
public static string SplitInParts(string value, int partLength, string delimiter) | |
{ | |
if (value == null) { throw new ArgumentNullException(nameof(value)); } | |
if (partLength < 1) { throw new ArgumentException("Part length must be positive and greater than zero.", nameof(partLength)); } |
@echo off | |
mode con: cols=55 lines=12 | |
title Network Checker | |
REM Server to be pinged | |
SET server=google.co.uk | |
REM Size of packet to be send to server (bytes) | |
SET packetSize=1 | |
REM Network info | |
SET netSSID=[SSID] |