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; | |
namespace NAudioUtils | |
{ | |
// https://tech.ebu.ch/docs/tech/tech3285.pdf | |
class BextChunkInfo | |
{ | |
public BextChunkInfo() | |
{ | |
//UniqueMaterialIdentifier = Guid.NewGuid().ToString(); |
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
import unittest | |
#helpers | |
def HighestRepeated(dice, minRepeats): | |
unique = set(dice) | |
repeats = [x for x in unique if dice.count(x) >= minRepeats] | |
return max(repeats) if repeats else 0 | |
def OfAKind(dice, n): | |
return HighestRepeated(dice,n) * n |
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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"voteReplicaCount":{ | |
"defaultValue": "1", | |
"type": "string", | |
"metadata": { | |
"description": "The number of service replicas for the vote service." | |
} |
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 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 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 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
$location = "West Europe" | |
$resGroupName = "RunFromPackageDemo" | |
az group create -n $resGroupName -l $location | |
$random = Get-Random -Minimum 10000 -Maximum 99999 | |
$storageAccountName = "runfrompackage$random" | |
az storage account create -n $storageAccountName -g $resGroupName --sku "Standard_LRS" | |
$connectionString = az storage account show-connection-string -n $storageAccountName -g $resGroupName --query "connectionString" -o tsv | |
$env:AZURE_STORAGE_CONNECTION_STRING = $connectionString |
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
<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 |
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.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Text; | |
using System.Windows.Forms; | |
using NAudio.Wave; | |
using System.Net; | |
using System.Threading; |
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 lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Simple JQuery Quiz</title> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" /> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="style.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div class="container"> |