Skip to content

Instantly share code, notes, and snippets.

View jonpryor's full-sized avatar

Jonathan Pryor jonpryor

View GitHub Profile
@jonpryor
jonpryor / App.cs
Last active August 29, 2015 14:02 — forked from anaisbetts/App.cs
namespace MobileSample_Android
{
[Application(Label = "AndroidPlayground")]
public class App : Application
{
readonly AutoSuspendHelper suspendHelper;
public App(IntPtr handle, JniHandleOwnership transfer)
: base (handle, transfer)
{
@jonpryor
jonpryor / gist:4635021
Last active December 11, 2015 17:29 — forked from anonymous/gist:4635005
static readonly IList<ViewModel> registeredEntities = new List<ViewModel>();
protected static IList<ViewModel> RegisteredViewModels
{
get
{
return registeredEntities;
}
}
/*
## Mono JIT compiler version 2.10.9 (tarball Mon May 7 20:25:51 EDT 2012)
DynamicMethod creation: 0.0453009000ms
LINQ expressions creation: 0.0971724000ms
Delegate creation: 0.0044351000ms
DynamicMethod invocation: 0.0000612000ms
Expression invocation: 0.0000609000ms
MethodInfo invocation: 0.0007135000ms
Delegate invocation: 0.0000619000ms
/* output:
# test2: (* 10 10 )
# test: (+ 10 ((* 10 10 )))
# test2: (* 10 10 )
*/
namespace Schemin.AST
{
public interface IScheminType
{
Range:
Min/Max rather than Start/End, better naming when dealing with non-contiguous ranges.
Start and end values are inclusive.
How enumeration works for stepping, etc is left to the class to decide, provide a static class with some standard implementations that use Math<T>.
Assumption is the main IRange<T> can be either contiguous or non-contiguous
Assumptions for SubRanges():
No two sub-ranges overlap.
Each sub-range is atomic (ie contiguous).