- The application is a simulation of a toy robot moving on a square tabletop, of dimensions 5 units x 5 units.
- There are no other obstructions on the table surface.
- The robot is free to roam around the surface of the table, but must be prevented from falling to destruction. Any movement that would result in the robot falling from the table must be prevented, however further valid movement
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
private ConcurrentQueue<Message> _queue = new ConcurrentQueue<Message>(); | |
private SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1); | |
public async Task DoTheThing() | |
{ | |
var tasks = new Task[20]; | |
for (var i = 0; i < tasks.Length; i++) | |
{ | |
tasks[i] = UploadMessages(); | |
} |
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
$isPr = "No"; | |
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) | |
{ | |
$isPr = "Yes = PR #: $env:APPVEYOR_PULL_REQUEST_NUMBER" | |
} | |
$isTag = "No"; | |
if ($env:APPVEYOR_REPO_TAG -eq $TRUE) | |
{ | |
$isTag = "Yes = Tag: $env:APPVEYOR_REPO_TAG_NAME" |
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
using System; | |
using System.Configuration; | |
using System.Text; | |
using System.Threading; | |
using System.Web.Mvc; | |
using StackExchange.Redis; | |
namespace WebApplication2.Controllers | |
{ | |
public class HomeController : Controller |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Raven.Client.Document; | |
namespace ConsoleApplication5 | |
{ | |
class Program |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Raven.Client.Document; | |
namespace ConsoleApplication5 | |
{ | |
class Program |
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
// How can I create a CatValidator and EagleValidator that both use (inherit) an AnimalValidator? | |
public abstract class Animal | |
{ | |
public string Name { get; set; } | |
} | |
public class Cat : Animal | |
{ |
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
using System.Collections.Generic; | |
using System.Linq; | |
using Nancy; | |
using Nancy.Testing; | |
using Newtonsoft.Json; | |
using Shouldly; | |
using Xunit; | |
namespace ConsoleApplication4 | |
{ |
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
/* | |
install-package raven.database | |
install-package xunit | |
install-package nancy.testing | |
install-package shouldly | |
install-package nbuilder | |
*/ | |
using System; | |
using System.Collections.Generic; |
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
using System.Collections; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using FizzWare.NBuilder; | |
using Raven.Client.Document; | |
using Raven.Client.Embedded; | |
using Raven.Client.Indexes; | |
using Shouldly; | |
using WorldDomination.Raven.Tests.Helpers; | |
using Xunit; |