This file contains 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
using System.Linq; | |
using System.Windows; | |
using System.Windows.Controls; | |
namespace PrisonersDilemma.Utility | |
{ | |
/// <summary> | |
/// Taken from: https://rachel53461.wordpress.com/2011/09/17/wpf-grids-rowcolumn-count-properties/ | |
/// </summary> | |
public class GridHelpers |
This file contains 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
namespace Combinations | |
{ | |
public class Combinations | |
{ | |
public static void Main(string[] args) | |
{ | |
GetCombination(new List<int> { 1, 2, 3 }); | |
} | |
public static void GetCombination(List<int> list) |
This file contains 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
/// <summary> | |
/// Provides masking behavior for any TextBox | |
/// </summary> | |
public static class Masking | |
{ | |
private static readonly DependencyPropertyKey _maskExpressionPropertyKey = DependencyProperty.RegisterAttachedReadOnly(""MaskExpression"", | |
typeof(Regex), | |
typeof(Masking), | |
new FrameworkPropertyMetadata()); |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) | |
{ | |
// Allocate memory for the array like this: | |
int** array; | |
array = malloc(n * sizeof(*array)); /* Assuming `n` is the number of rows */ |
This file contains 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
using System; | |
using System.IO; | |
using System.Xml.Linq; | |
using System.Xml.Schema; | |
namespace XmlValidation | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Windows; | |
using System.Collections.ObjectModel; | |
using System.IO; | |
using System.Linq; | |
using System.Windows.Input; | |
using System.Xml.Linq; | |
namespace StringProgram |
This file contains 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
using System; | |
using System.Drawing; | |
using System.Windows.Forms; | |
namespace CustomControls | |
{ | |
public class NodeControl : Control | |
{ | |
private Graphics G = null; |
This file contains 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 void main(int argc, char const *argv[]) | |
{ | |
// To identify the current configuration: | |
UINT32 PathArraySize = 0; | |
UINT32 ModeArraySize = 0; | |
DISPLAYCONFIG_PATH_INFO* PathArray; | |
DISPLAYCONFIG_MODE_INFO* ModeArray; | |
DISPLAYCONFIG_TOPOLOGY_ID CurrentTopology; |
NewerOlder