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
{ | |
"bindings": [ | |
{ | |
"type": "httpTrigger", | |
"direction": "in", | |
"webHookTypeX": "genericJson", | |
"name": "req", | |
"methods": [ | |
"get", | |
"post", |
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
var f = new Form(); | |
var b = new Button(); | |
b.Text = "Show message"; | |
b.AutoSize = true; | |
f.Controls.Add(b); | |
b.Click += (s, e) => | |
{ | |
var p = new Form(); | |
p.Text = "Hello"; | |
p.Show(f); |
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
var listSize = 10000000; | |
var stopwatch = new Stopwatch(); | |
stopwatch.Restart(); | |
var s = Enumerable.Range(1, listSize) | |
.Select(n => n * 2) | |
.Select(n => Math.Sin((2 * Math.PI * n)/1000)) | |
.Select(n => Math.Pow(n,2)) | |
.Sum(); | |
stopwatch.Stop(); | |
Console.WriteLine("LINQ {0} items in {1}ms", listSize, stopwatch.ElapsedMilliseconds); |
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
<Query Kind="Program"> | |
<Reference><RuntimeDirectory>\System.Runtime.Serialization.dll</Reference> | |
<NuGetReference>WindowsAzure.ServiceBus</NuGetReference> | |
<Namespace>Microsoft.ServiceBus</Namespace> | |
<Namespace>Microsoft.ServiceBus.Messaging</Namespace> | |
</Query> | |
void Main() | |
{ | |
string connectionString = Util.GetPassword("Test Azure Service Bus Connection String"); |
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
// n.b. Linqpad script | |
class QueueSpellChooser : ISpellChooser | |
{ | |
private Queue<Spell> spellQueue; | |
public QueueSpellChooser(IEnumerable<Spell> spells) | |
{ | |
spellQueue = new Queue<Spell>(spells); | |
} |
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
@echo off | |
cls | |
if not exist ".\.nuget" mkdir ".\.nuget" | |
if not exist ".\.nuget\nuget.exe" powershell -Command "Invoke-WebRequest https://www.nuget.org/nuget.exe -OutFile .\.nuget\nuget.exe" | |
".nuget\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "packages" "-ExcludeVersion" | |
"packages\FAKE\tools\Fake.exe" build.fsx %* | |
pause |
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
<Window x:Class="WpfButtonStyles.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="WPF Example Button Styles" Height="350" Width="525"> | |
<Window.Resources> | |
<Style | |
TargetType="Button" x:Key="NewGameButtonStyle"> | |
<Setter Property="FontFamily" Value="Resources/teen bd.ttf#Teen" /> | |
<Setter Property="FontSize" Value="18" /> | |
<Setter Property="Template"> |
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
// Define other methods and classes here | |
/// <summary> | |
/// Sample Provider to allow fading in and out | |
/// </summary> | |
public class DelayFadeOutSampleProvider : ISampleProvider | |
{ | |
enum FadeState | |
{ | |
Silence, | |
FadingIn, |
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
<!DOCTYPE html> | |
<html lang=en-us> | |
<head> | |
<meta charset=utf-8><title>Highlight JS</title> | |
<meta name=viewport content="width=device-width, initial-scale=1.0, maximum-scale=1"> | |
<link rel=stylesheet href=//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/tomorrow-night.min.css"/> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/languages/fsharp.min.js"></script> |
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
<Page | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Page.Resources> | |
<Style TargetType="ProgressBar" x:Key="Basic"> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="ProgressBar" > | |
<Grid x:Name="Root"> | |
<Border |