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 FizzBuzz | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| for(int i=1;i<=100;i++) { | |
| switch (new { mod3 = i % 3, mod5 = i % 5 }) { |
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
| module AST = | |
| type Name = string | |
| type TypeName = string | |
| type Literal = Int of int | Bool of bool | String of string | Void | |
| type Expr = | |
| | Literal of Literal | |
| | Rem of Expr * Expr |
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
| #define NUM_SPHERE 6 | |
| #define NUM_LIGHT 3 | |
| struct Camera { | |
| vec3 position; | |
| vec3 forward; | |
| vec3 up; | |
| vec3 right; | |
| }; |
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
| .class public auto ansi abstract sealed Program | |
| extends [mscorlib]System.Object | |
| { | |
| .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( | |
| 01 00 07 00 00 00 00 00 | |
| ) | |
| .class nested public auto auto sealed serializable beforefieldinit DU | |
| extends [mscorlib]System.ValueType | |
| implements class [mscorlib]System.IEquatable`1<valuetype Program/DU>, | |
| [mscorlib]System.Collections.IStructuralEquatable, |
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
| float fTimer; | |
| float fPixellateFactor = 1.0f; | |
| sampler ColorMapSampler : register(s0); | |
| float4 NormalShader(float2 Tex:TEXCOORD0) : COLOR | |
| { | |
| float4 color = tex2D(ColorMapSampler, Tex); | |
| return color; | |
| } |
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
| type ColorF(r : float, g : float, b : float) = | |
| new(r : byte, g : byte, b : byte) = ColorF(float r / 255.0, float g / 255.0, float b / 255.0) | |
| member __.R = r | |
| member __.G = g | |
| member __.B = b | |
| member color.RGBA = | |
| let r = int (r * 255.0) | |
| let g = int (g * 255.0) | |
| let b = int (b * 255.0) |
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
| //add rand and bmp as dependencies in toml file | |
| extern crate rand; | |
| extern crate bmp; | |
| use bmp::Image; | |
| use rand::Rng; | |
| #[derive(Clone)] | |
| enum Expr { | |
| VariableX, | |
| VariableY, |
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
| class Ray | |
| { | |
| private readonly Vector3D position; | |
| private readonly Vector3D direction; | |
| public Ray(Vector3D position, Vector3D direction) | |
| { | |
| this.position = position; | |
| this.direction = direction; | |
| } |
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
| type Ray(position : Vector3D, direction:Vector3D) = | |
| member ray.Position = position | |
| member ray.Direction = direction | |
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
| open System | |
| open System.Diagnostics | |
| printfn "XDesProc killer" | |
| printfn "Press Return to Close" | |
| printfn "======================" | |
| let rec killer() = async { | |
| let xdesproc = Process.GetProcessesByName "xdesproc" |
NewerOlder