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
// c# / xulrunner host call interface [for geckofx-1.9, xulrunner-1.9.1.3] | |
// allows arb. calls to window.host.SomeMethod() to be marshaled to the host. | |
var last_host_call = 0; | |
window.host = { __noSuchMethod__: function(id, xs) | |
{ | |
/* host bridge for gecko-1.9.1 / geckofx-1.9.0 */ | |
/* set up the args object */ | |
$("callinfo").remove(); |
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
public static class ControllerInterface | |
{ | |
public static void DoHostCall(GeckoWebBrowser w, object controller) | |
{ | |
try | |
{ | |
var e = w.Document.GetElementsByTagName("callinfo").First(); | |
var methodName = e.GetAttribute("funcname"); | |
var method = controller.GetType().GetMethod(methodName); |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.IO; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
namespace codeshape | |
{ | |
static class Program |
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; | |
namespace event_combinators | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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.Text.RegularExpressions; | |
namespace MultiRegex | |
{ | |
class Program | |
{ |
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
namespace ExceptIsInteresting | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var xs = new[] { "a", "a", "b" }; | |
var ys = new[] { "b" }; | |
var result = xs.Except(ys); |
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.Collections.Generic; | |
using System.Drawing; | |
using OpenRa.Game.GameRules; | |
using OpenRa.Game.Graphics; | |
namespace OpenRa.Game.Traits | |
{ | |
enum DamageState { Normal, Half, Dead }; | |
// depends on the order of pips in WorldRenderer.cs! |
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.Drawing; | |
namespace OpenRa.Game.Graphics | |
{ | |
class Minimap | |
{ | |
Sheet sheet; | |
SpriteRenderer spriteRenderer; | |
Sprite sprite; |
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
static class OpenAL | |
{ | |
public const int ALC_DEFAULT_DEVICE_SPECIFIER = 4100; | |
public const int AL_FORMAT_MONO16 = 4353; | |
public const int AL_FORMAT_MONO8 = 4352; | |
public const int AL_FORMAT_STEREO16 = 4355; | |
public const int AL_FORMAT_STEREO8 = 4354; | |
public const int AL_PITCH = 4099; |