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 MatchVariants : TowerFall.MatchVariants | |
{ | |
public Variant NoHeadBounce; | |
} | |
public class Player : TowerFall.Player | |
{ | |
public override void BouncedOn(TowerFall.Player bouncer) | |
{ | |
if (!((MatchVariants)Level.Session.MatchSettings.Variants).NoHeadBounce) |
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 data.int.basic | |
import data.int.order | |
open bool | |
open int | |
open eq.ops | |
-- 1 | |
abbreviation Var := 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
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" | |
> | |
<xsl:output method="xml" indent="yes"/> | |
<xsl:template match="/"> | |
<body> | |
<h1>Offene Bestellungen</h1> |
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
<ReportDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
ColumnWidth="400" FontSize="14" FontFamily="Georgia" | |
xmlns:c="clr-namespace:AptusSolutions.Reporting;assembly=AptusSolutions.Reporting"> | |
<ReportDocument.PageHeader> | |
<Paragraph> | |
Page Header | |
</Paragraph> | |
</ReportDocument.PageHeader> | |
<ReportDocument.ReportHeader> | |
<Paragraph> |
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
class Category | |
{ | |
// wiee, kein notify-Keyword :( ? | |
public string Header { get; set; } | |
public string Id { get; set; } | |
// two-way bound | |
public bool IsExpanded { get; set; } | |
public bool IsSelected { get; set; } | |
public ObservableCollection<Category> SubCategories { get; private set; } |
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 static Expression<Func<T,V>> Bind<T, U, V>(Expression<Func<T, U>> f1, Expression<Func<U, V>> f2) | |
{ | |
var param = Ex.Parameter(typeof(T), "hi"); | |
return Ex.Lambda<Func<T, V>>( | |
Ex.Invoke(f2, | |
Ex.Invoke(f1, param)), | |
param); | |
} |
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
[<Struct>] | |
type Point (x : int, y: int) = | |
new (i : int) = Point (i,i) | |
member p.X = x | |
member p.Y = y | |
static member (+) (p : Point, q : Point) = Point (p.X + q.X, p.Y + q.Y) | |
static member (-) (p : Point, q : Point) = Point (p.X - q.X, p.Y - q.Y) | |
static member (|Point|) (p : Point) = p.X,p.Y | |
static member DistanceSqr (p : Point) (q : Point) = sqr (p.X - q.X) + sqr (p.Y - q.Y) |
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
type LinearFunc = { M : float; B : float } | |
type Point = { X : float; Y : float } | |
let sqr x = x * x | |
let frac x = x - floor x | |
let calc f x = { X = x; Y = f.M * x + f.B } | |
let plusMinus delta dx = { -delta..dx..delta } | |
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
int dist(string a, string b) { | |
int n = a.length(), m = b.length(); | |
vector<int> row(m+1), prev(m+1); | |
// y == 0 | |
for (int x = 0; x <= m; x++) row[x] = x; | |
for (int y = 1; y <= n; y++) { | |
swap(prev, row); |
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
globalkeys = | |
... | |
-- Move all clients of active tags to next screen | |
awful.key({ modkey, "Control" }, "o", | |
function () | |
for i,t in ipairs(screen[mouse.screen]:tags()) do | |
if t.selected then | |
for j,c in ipairs(t:clients()) do | |
awful.client.movetoscreen(c) |
OlderNewer