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
// TrimArray.cs | |
// From: https://stackoverflow.com/questions/26303030/how-can-i-delete-rows-and-columns-from-2d-array-in-c | |
// See: https://stackoverflow.com/questions/1183083/is-it-possible-to-extend-arrays-in-c | |
void Main() | |
{ | |
int[,] array = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } }; | |
array.Dump(); | |
var trim = TrimArray(1, 1, array); | |
var trimRow = ArrayRemoveRow(2, array); |
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
// From: http://stackoverflow.com/questions/406760/whats-your-most-controversial-programming-opinion | |
// Given that Pi can be estimated using the function 4 * (1 - 1/3 + 1/5 - 1/7 + ...) | |
// write a function that calculates Pi to an accuracy of 5 decimal places. | |
var oddFractions = new List<double>(); | |
var pi = 4.0; | |
// Fill the oddFractions list until we have 5 decimal places of accuracy. | |
for (int i = 1, j = 1; j < 1000000; i++, j+=2) | |
{ |
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
/// | |
/// CharacterHistogram.cs | |
/// by tkp | |
/// | |
void Main() | |
{ | |
var s1 = "NOE TIMMY HEATH"; | |
var s2 = "NOEL TIMOTHY HEATH"; |
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
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
cinst powershell -pre | |
cinst notepadplusplus | |
cinst git-credential-winstore | |
cinst console-devel | |
cinst sublimetext2 | |
cinst poshgit | |
cinst 7zip |