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 Microsoft.VisualStudio.TestTools.UnitTesting; | |
using MSTestContrib.Specifications; | |
namespace Calculator.Core.Specifications | |
{ | |
[TestClass] | |
[SpecificationDescription("As a user I want to perform mathematical calculations so that my head doesn't hurt.")] | |
public class BasicCalculatorSpecification : Specification | |
{ |
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 Microsoft.VisualStudio.TestTools.UnitTesting; | |
using MSTestContrib.Specifications; | |
namespace Calculator.Core.Specifications | |
{ | |
[TestClass] | |
[SpecificationDescription("As a user I want to perform mathematical calculations so that my head doesn't hurt.")] | |
public class BasicCalculatorSpecification : Specification | |
{ |
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 class SubscriptionController : Controller | |
{ | |
public SubscriptionController(ISubscriberRepository subscriberRepository, IObserver<SubscribedToNewsletter> subscribedToNewsletterObserver, IObserver<UnsubscribedFromNewsletter> unsubscribedFromNewsletterObserver) | |
{ | |
SubscriberRepository = subscriberRepository; | |
SubscribedToNewsletterObserver = subscribedToNewsletterObserver; | |
UnsubscribedFromNewsletterObserver = unsubscribedFromNewsletterObserver; | |
} | |
} |
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; | |
public static class ShortUrlTokenGenerator | |
{ | |
private const string alphabet = "abcdefghijklmnopqrstuvwxyz0123456789"; | |
private static Random generator = new Random(); | |
public static string GenerateToken(int tokenLength) | |
{ | |
var builder = new StringBuilder(); |
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
sudo apt-get install nodejs npm node-semver | |
sudo apt-get install mono-complete | |
sudo apt-get install emacs |
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.Collections.ObjectModel; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Windows.Threading; | |
using Windows.Networking.Proximity; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge" /> | |
<title>Excel Selection Changed Demo</title> | |
<link rel="stylesheet" type="text/css" href="../Content/Office.css" /> | |
<link rel="stylesheet" type="text/css" href="../Content/App.css" /> | |
<script src="../Scripts/jquery-1.7.1.js"></script> | |
<!--<script src="https://appsforoffice.microsoft.com/lib/1.0/hosted/office.js"></script>--> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<location path="Node"> | |
<system.webServer> | |
<handlers> | |
<add name="iisnode" path="*.js" verb="*" modules="iisnode" /> | |
</handlers> | |
<defaultDocument enabled="true"> | |
<files> | |
<add value="server.js" /> |
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
var status = { | |
started: Date.now(), | |
heartbeat: Date.now(), | |
runtime: null | |
}; | |
var heartbeater = function() { | |
status.heartbeat = Date.now(); | |
status.runtime = status.heartbeat - status.started; | |
setTimeout(heartbeater, 1000); |
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 Newtonsoft.Json; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace FlatQuerySample |
OlderNewer