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
/* The Computer Language Benchmarks Game | |
http://shootout.alioth.debian.org/ | |
contributed by Isaac Gouy, transliterated from Mike Pall's Lua program | |
*/ | |
using System; | |
public static class Program { | |
public static int[] fannkuch (int 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
/* The Computer Language Benchmarks Game | |
http://shootout.alioth.debian.org/ | |
contributed by Marek Safar | |
*/ | |
using System; | |
public static class Program { | |
const int minDepth = 4; |
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 MaterialSet : Squared.Render.MaterialSetBase { | |
public Squared.Render.MaterialDictionary<BlendModes> Geometry, TexturedGeometry, ScreenSpaceGeometry; | |
public Squared.Render.MaterialDictionary<BlendModes> Bitmap, ScreenSpaceBitmap; | |
public DelegateMaterial Glimmer; | |
public DelegateMaterial Text; | |
public DelegateMaterial BlurredTile; | |
public DelegateMaterial Clear; | |
public DelegateMaterial FlipRB; | |
} |
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 interface IInteractable { | |
bool CanInteract (IHasBounds interactor); | |
void BeginInteract (IHasBounds interactor); | |
void EndInteract (IHasBounds interactor); | |
string GetInteractLegend (); | |
} | |
public interface IUpdateable { | |
bool AllowWake { get; } | |
bool AllowSleep { get; } |
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 abstract class TooltipContentBase { | |
public Font Font; | |
public Point Location; | |
public Size Size; | |
public abstract void Render (Graphics g); | |
public abstract Size Measure (Graphics g); | |
} | |
public class DeltaInfoTooltipContent : TooltipContentBase { |
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 abstract class JSNode { | |
public virtual IEnumerable<JSNode> Children { | |
get { | |
yield break; | |
} | |
} | |
public IEnumerable<JSNode> AllChildrenRecursive { | |
get { | |
foreach (var child in Children) { |
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
// yhlqss0l, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | |
Program = {}; | |
Program.Main = function (args) { | |
a = JSIL.JaggedArray.New(System.String, 5, 10); | |
h = a.GetLength(0); | |
w = a.GetLength(1); | |
y = 0; | |
while ((y < h)) { | |
x = 0; |
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 interface IFuture { | |
Exception Error { | |
get; | |
} | |
bool Completed { | |
get; | |
} | |
bool Failed { | |
get; | |
} |
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 void VisitNode (JSBinaryOperatorExpression boe) { | |
if (boe.Operator != JSOperator.Assignment) { | |
base.VisitNode(boe); | |
return; | |
} | |
if (IsStruct(boe.Left.GetExpectedType(TypeSystem)) || IsStruct(boe.Right.GetExpectedType(TypeSystem))) { | |
Debug.WriteLine(String.Format("struct assignment {0} = {1}", boe.Left, boe.Right)); | |
if (boe.Right is JSLiteral) { | |
Debug.WriteLine(" copy not needed, literal"); |
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 JSIL; | |
public static class Program { | |
public static void Main (string[] args) { | |
const string pri = "pri"; | |
string nt = "nt"; | |
var p = Builtins.Global[pri + nt]; | |
if (p != null) |
OlderNewer