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; | |
class Player | |
{ | |
static void Main(string[] args) | |
{ | |
int width = int.Parse(Console.ReadLine()); | |
int height = int.Parse(Console.ReadLine()); | |
var grid = new char[width, height]; |
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 static class Populate | |
{ | |
public static Window[] FromHandles(string[] handles) | |
{ | |
var windows = new Window[handles.Length]; | |
for (int i = 0; i < windows.Length; ++i) | |
{ | |
windows[i] = new Window(new IntPtr(Convert.ToInt32(handles[i]))); | |
} |
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.Security.Cryptography; | |
public byte[] GetPasswordHash(string username, string password, string salt) | |
{ | |
// get salted byte[] buffer, containing username, password and some (constant) salt | |
byte[] buffer; | |
using (MemoryStream stream = new MemoryStream()) | |
using (StreamWriter writer = new StreamWriter(stream)) | |
{ | |
writer.Write(salt); |
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.Security.Cryptography; | |
namespace FDL.Library.Numeric | |
{ | |
public static class RandomNumber | |
{ | |
private static readonly RNGCryptoServiceProvider _generator = new RNGCryptoServiceProvider(); | |
public static int Between(int minimumValue, int maximumValue) |