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
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 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.Xml.XPath; | |
using System.Xml.Xsl; | |
using System.IO; | |
using System.Reflection; | |
using System.Xml; |
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.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 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"> | |
<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 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
let rec f n x acc = | |
if x = n then | |
x::acc | |
elif n % x = 0 then | |
f (n/x) x (x::acc) | |
else | |
f n (x+1) acc | |
let factorise n = f n 2 [] | |
let factors = factorise 124782 |
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 NAudio.Wave; | |
using NAudio.Wave.SampleProviders; | |
namespace FireAndForgetAudioSample | |
{ | |
class AudioPlaybackEngine : IDisposable | |
{ | |
private readonly IWavePlayer outputDevice; | |
private readonly MixingSampleProvider mixer; |
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; | |
namespace NAudioUtils | |
{ | |
// https://tech.ebu.ch/docs/tech/tech3285.pdf | |
class BextChunkInfo | |
{ | |
public BextChunkInfo() | |
{ | |
//UniqueMaterialIdentifier = Guid.NewGuid().ToString(); |
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 |
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> |
OlderNewer