text:
using System;
using System.ComponentModel;

namespace SharpKit.DotNet.Html
{

    using SharpKit.JavaScript;
    using SharpKit.DotNet.JavaScript;
    using SharpKit.DotNet.Html.fileapi;
    using SharpKit.DotNet.Html.html.shadow;
    using SharpKit.DotNet.Html.html.track;
    using SharpKit.DotNet.Html.inspector;
    using SharpKit.DotNet.Html.loader.appcache;
    using SharpKit.DotNet.Html.battery;
    using SharpKit.DotNet.Html.gamepad;
    using SharpKit.DotNet.Html.geolocation;
    using SharpKit.DotNet.Html.indexeddb;
    using SharpKit.DotNet.Html.intents;
    using SharpKit.DotNet.Html.mediasource;
    using SharpKit.DotNet.Html.mediastream;
    using SharpKit.DotNet.Html.networkinfo;
    using SharpKit.DotNet.Html.notifications;
    using SharpKit.DotNet.Html.proximity;
    using SharpKit.DotNet.Html.quota;
    using SharpKit.DotNet.Html.speech;
    using SharpKit.DotNet.Html.webaudio;
    using SharpKit.DotNet.Html.webdatabase;
    using SharpKit.DotNet.Html.plugins;
    using SharpKit.DotNet.Html.storage;
    using SharpKit.DotNet.Html.svg;
    using SharpKit.DotNet.Html.workers;

    [JsType(JsMode.Prototype, Export = false, PropertiesAsFields = true, NativeCasts = true, Name = "WebGLRenderingContext")]
    public partial class WebGLRenderingContext : CanvasRenderingContext
    {
        public static int DEPTH_BUFFER_BIT = 0x00000100;
        public static int STENCIL_BUFFER_BIT = 0x00000400;
        public static int COLOR_BUFFER_BIT = 0x00004000;

        public static int POINTS = 0x0000;
        public static int LINES = 0x0001;
        public static int LINE_LOOP = 0x0002;
        public static int LINE_STRIP = 0x0003;
        public static int TRIANGLES = 0x0004;
        public static int TRIANGLE_STRIP = 0x0005;
        public static int TRIANGLE_FAN = 0x0006;

        public static int ZERO = 0;
        public static int ONE = 1;

        public static int SRC_COLOR = 0x0300;
        public static int ONE_MINUS_SRC_COLOR = 0x0301;
        public static int SRC_ALPHA = 0x0302;
        public static int ONE_MINUS_SRC_ALPHA = 0x0303;
        public static int DST_ALPHA = 0x0304;
        public static int ONE_MINUS_DST_ALPHA = 0x0305;
        public static int DST_COLOR = 0x0306;
        public static int ONE_MINUS_DST_COLOR = 0x0307;
        public static int SRC_ALPHA_SATURATE = 0x0308;

        public static int CONSTANT_COLOR = 0x8001;
        public static int ONE_MINUS_CONSTANT_COLOR = 0x8002;
        public static int CONSTANT_ALPHA = 0x8003;
        public static int ONE_MINUS_CONSTANT_ALPHA = 0x8004;

        public static int BLEND_COLOR = 0x8005;
        public static int FUNC_ADD = 0x8006;
        public static int BLEND_EQUATION = 0x8009;
        public static int BLEND_EQUATION_RGB = 0x8009;
        public static int FUNC_SUBTRACT = 0x800A;
        public static int FUNC_REVERSE_SUBTRACT = 0x800B;
        public static int BLEND_EQUATION_ALPHA = 0x883D;
        public static int BLEND_DST_RGB = 0x80C8;
        public static int BLEND_SRC_RGB = 0x80C9;
        public static int BLEND_DST_ALPHA = 0x80CA;
        public static int BLEND_SRC_ALPHA = 0x80CB;

        public static int ARRAY_BUFFER = 0x8892;
        public static int ELEMENT_ARRAY_BUFFER = 0x8893;
        public static int ARRAY_BUFFER_BINDING = 0x8894;
        public static int ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;

        public static int STREAM_DRAW = 0x88E0;
        public static int STATIC_DRAW = 0x88E4;
        public static int DYNAMIC_DRAW = 0x88E8;
        public static int BUFFER_SIZE = 0x8764;
        public static int BUFFER_USAGE = 0x8765;
        public static int CURRENT_VERTEX_ATTRIB = 0x8626;

        public static int FRONT = 0x0404;
        public static int BACK = 0x0405;
        public static int FRONT_AND_BACK = 0x0408;
        public static int TEXTURE_2D = 0x0DE1;
        public static int CULL_FACE = 0x0B44;
        public static int BLEND = 0x0BE2;
        public static int DITHER = 0x0BD0;
        public static int STENCIL_TEST = 0x0B90;
        public static int DEPTH_TEST = 0x0B71;
        public static int SCISSOR_TEST = 0x0C11;
        public static int POLYGON_OFFSET_FILL = 0x8037;
        public static int SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
        public static int SAMPLE_COVERAGE = 0x80A0;
        public static int NO_ERROR = 0;
        public static int INVALID_ENUM = 0x0500;
        public static int INVALID_VALUE = 0x0501;
        public static int INVALID_OPERATION = 0x0502;
        public static int OUT_OF_MEMORY = 0x0505;
        public static int CW = 0x0900;
        public static int CCW = 0x0901;
        public static int LINE_WIDTH = 0x0B21;
        public static int ALIASED_POINT_SIZE_RANGE = 0x846D;
        public static int ALIASED_LINE_WIDTH_RANGE = 0x846E;
        public static int CULL_FACE_MODE = 0x0B45;
        public static int FRONT_FACE = 0x0B46;
        public static int DEPTH_RANGE = 0x0B70;
        public static int DEPTH_WRITEMASK = 0x0B72;
        public static int DEPTH_CLEAR_VALUE = 0x0B73;
        public static int DEPTH_FUNC = 0x0B74;
        public static int STENCIL_CLEAR_VALUE = 0x0B91;
        public static int STENCIL_FUNC = 0x0B92;
        public static int STENCIL_FAIL = 0x0B94;
        public static int STENCIL_PASS_DEPTH_FAIL = 0x0B95;
        public static int STENCIL_PASS_DEPTH_PASS = 0x0B96;
        public static int STENCIL_REF = 0x0B97;
        public static int STENCIL_VALUE_MASK = 0x0B93;
        public static int STENCIL_WRITEMASK = 0x0B98;
        public static int STENCIL_BACK_FUNC = 0x8800;
        public static int STENCIL_BACK_FAIL = 0x8801;
        public static int STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
        public static int STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
        public static int STENCIL_BACK_REF = 0x8CA3;
        public static int STENCIL_BACK_VALUE_MASK = 0x8CA4;
        public static int STENCIL_BACK_WRITEMASK = 0x8CA5;
        public static int VIEWPORT = 0x0BA2;
        public static int SCISSOR_BOX = 0x0C10;
        public static int COLOR_CLEAR_VALUE = 0x0C22;
        public static int COLOR_WRITEMASK = 0x0C23;
        public static int UNPACK_ALIGNMENT = 0x0CF5;
        public static int PACK_ALIGNMENT = 0x0D05;
        public static int MAX_TEXTURE_SIZE = 0x0D33;
        public static int MAX_VIEWPORT_DIMS = 0x0D3A;
        public static int SUBPIXEL_BITS = 0x0D50;
        public static int RED_BITS = 0x0D52;
        public static int GREEN_BITS = 0x0D53;
        public static int BLUE_BITS = 0x0D54;
        public static int ALPHA_BITS = 0x0D55;
        public static int DEPTH_BITS = 0x0D56;
        public static int STENCIL_BITS = 0x0D57;
        public static int POLYGON_OFFSET_UNITS = 0x2A00;
        public static int POLYGON_OFFSET_FACTOR = 0x8038;
        public static int TEXTURE_BINDING_2D = 0x8069;
        public static int SAMPLE_BUFFERS = 0x80A8;
        public static int SAMPLES = 0x80A9;
        public static int SAMPLE_COVERAGE_VALUE = 0x80AA;
        public static int SAMPLE_COVERAGE_INVERT = 0x80AB;
        public static int COMPRESSED_TEXTURE_FORMATS = 0x86A3;
        public static int DONT_CARE = 0x1100;
        public static int FASTEST = 0x1101;
        public static int NICEST = 0x1102;
        public static int GENERATE_MIPMAP_HINT = 0x8192;
        public static int BYTE = 0x1400;
        public static int UNSIGNED_BYTE = 0x1401;
        public static int SHORT = 0x1402;
        public static int UNSIGNED_SHORT = 0x1403;
        public static int INT = 0x1404;
        public static int UNSIGNED_INT = 0x1405;
        public static int FLOAT = 0x1406;
        public static int DEPTH_COMPONENT = 0x1902;
        public static int ALPHA = 0x1906;
        public static int RGB = 0x1907;
        public static int RGBA = 0x1908;
        public static int LUMINANCE = 0x1909;
        public static int LUMINANCE_ALPHA = 0x190A;
        public static int UNSIGNED_SHORT_4_4_4_4 = 0x8033;
        public static int UNSIGNED_SHORT_5_5_5_1 = 0x8034;
        public static int UNSIGNED_SHORT_5_6_5 = 0x8363;
        public static int FRAGMENT_SHADER = 0x8B30;
        public static int VERTEX_SHADER = 0x8B31;
        public static int MAX_VERTEX_ATTRIBS = 0x8869;
        public static int MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
        public static int MAX_VARYING_VECTORS = 0x8DFC;
        public static int MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
        public static int MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
        public static int MAX_TEXTURE_IMAGE_UNITS = 0x8872;
        public static int MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
        public static int SHADER_TYPE = 0x8B4F;
        public static int DELETE_STATUS = 0x8B80;
        public static int LINK_STATUS = 0x8B82;
        public static int VALIDATE_STATUS = 0x8B83;
        public static int ATTACHED_SHADERS = 0x8B85;
        public static int ACTIVE_UNIFORMS = 0x8B86;
        public static int ACTIVE_ATTRIBUTES = 0x8B89;
        public static int SHADING_LANGUAGE_VERSION = 0x8B8C;
        public static int CURRENT_PROGRAM = 0x8B8D;
        public static int NEVER = 0x0200;
        public static int LESS = 0x0201;
        public static int EQUAL = 0x0202;
        public static int LEQUAL = 0x0203;
        public static int GREATER = 0x0204;
        public static int NOTEQUAL = 0x0205;
        public static int GEQUAL = 0x0206;
        public static int ALWAYS = 0x0207;
        public static int KEEP = 0x1E00;
        public static int REPLACE = 0x1E01;
        public static int INCR = 0x1E02;
        public static int DECR = 0x1E03;
        public static int INVERT = 0x150A;
        public static int INCR_WRAP = 0x8507;
        public static int DECR_WRAP = 0x8508;
        public static int VENDOR = 0x1F00;
        public static int RENDERER = 0x1F01;
        public static int VERSION = 0x1F02;
        public static int NEAREST = 0x2600;
        public static int LINEAR = 0x2601;
        public static int NEAREST_MIPMAP_NEAREST = 0x2700;
        public static int LINEAR_MIPMAP_NEAREST = 0x2701;
        public static int NEAREST_MIPMAP_LINEAR = 0x2702;
        public static int LINEAR_MIPMAP_LINEAR = 0x2703;
        public static int TEXTURE_MAG_FILTER = 0x2800;
        public static int TEXTURE_MIN_FILTER = 0x2801;
        public static int TEXTURE_WRAP_S = 0x2802;
        public static int TEXTURE_WRAP_T = 0x2803;
        public static int TEXTURE = 0x1702;
        public static int TEXTURE_CUBE_MAP = 0x8513;
        public static int TEXTURE_BINDING_CUBE_MAP = 0x8514;
        public static int TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
        public static int TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
        public static int TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
        public static int TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
        public static int TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
        public static int TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
        public static int MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
        public static int TEXTURE0 = 0x84C0;
        public static int TEXTURE1 = 0x84C1;
        public static int TEXTURE2 = 0x84C2;
        public static int TEXTURE3 = 0x84C3;
        public static int TEXTURE4 = 0x84C4;
        public static int TEXTURE5 = 0x84C5;
        public static int TEXTURE6 = 0x84C6;
        public static int TEXTURE7 = 0x84C7;
        public static int TEXTURE8 = 0x84C8;
        public static int TEXTURE9 = 0x84C9;
        public static int TEXTURE10 = 0x84CA;
        public static int TEXTURE11 = 0x84CB;
        public static int TEXTURE12 = 0x84CC;
        public static int TEXTURE13 = 0x84CD;
        public static int TEXTURE14 = 0x84CE;
        public static int TEXTURE15 = 0x84CF;
        public static int TEXTURE16 = 0x84D0;
        public static int TEXTURE17 = 0x84D1;
        public static int TEXTURE18 = 0x84D2;
        public static int TEXTURE19 = 0x84D3;
        public static int TEXTURE20 = 0x84D4;
        public static int TEXTURE21 = 0x84D5;
        public static int TEXTURE22 = 0x84D6;
        public static int TEXTURE23 = 0x84D7;
        public static int TEXTURE24 = 0x84D8;
        public static int TEXTURE25 = 0x84D9;
        public static int TEXTURE26 = 0x84DA;
        public static int TEXTURE27 = 0x84DB;
        public static int TEXTURE28 = 0x84DC;
        public static int TEXTURE29 = 0x84DD;
        public static int TEXTURE30 = 0x84DE;
        public static int TEXTURE31 = 0x84DF;
        public static int ACTIVE_TEXTURE = 0x84E0;
        public static int REPEAT = 0x2901;
        public static int CLAMP_TO_EDGE = 0x812F;
        public static int MIRRORED_REPEAT = 0x8370;
        public static int FLOAT_VEC2 = 0x8B50;
        public static int FLOAT_VEC3 = 0x8B51;
        public static int FLOAT_VEC4 = 0x8B52;
        public static int INT_VEC2 = 0x8B53;
        public static int INT_VEC3 = 0x8B54;
        public static int INT_VEC4 = 0x8B55;
        public static int BOOL = 0x8B56;
        public static int BOOL_VEC2 = 0x8B57;
        public static int BOOL_VEC3 = 0x8B58;
        public static int BOOL_VEC4 = 0x8B59;
        public static int FLOAT_MAT2 = 0x8B5A;
        public static int FLOAT_MAT3 = 0x8B5B;
        public static int FLOAT_MAT4 = 0x8B5C;
        public static int SAMPLER_2D = 0x8B5E;
        public static int SAMPLER_CUBE = 0x8B60;
        public static int VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
        public static int VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
        public static int VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
        public static int VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
        public static int VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
        public static int VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
        public static int VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
        public static int COMPILE_STATUS = 0x8B81;
        public static int LOW_FLOAT = 0x8DF0;
        public static int MEDIUM_FLOAT = 0x8DF1;
        public static int HIGH_FLOAT = 0x8DF2;
        public static int LOW_INT = 0x8DF3;
        public static int MEDIUM_INT = 0x8DF4;
        public static int HIGH_INT = 0x8DF5;
        public static int FRAMEBUFFER = 0x8D40;
        public static int RENDERBUFFER = 0x8D41;
        public static int RGBA4 = 0x8056;
        public static int RGB5_A1 = 0x8057;
        public static int RGB565 = 0x8D62;
        public static int DEPTH_COMPONENT16 = 0x81A5;
        public static int STENCIL_INDEX = 0x1901;
        public static int STENCIL_INDEX8 = 0x8D48;
        public static int DEPTH_STENCIL = 0x84F9;
        public static int RENDERBUFFER_WIDTH = 0x8D42;
        public static int RENDERBUFFER_HEIGHT = 0x8D43;
        public static int RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
        public static int RENDERBUFFER_RED_SIZE = 0x8D50;
        public static int RENDERBUFFER_GREEN_SIZE = 0x8D51;
        public static int RENDERBUFFER_BLUE_SIZE = 0x8D52;
        public static int RENDERBUFFER_ALPHA_SIZE = 0x8D53;
        public static int RENDERBUFFER_DEPTH_SIZE = 0x8D54;
        public static int RENDERBUFFER_STENCIL_SIZE = 0x8D55;
        public static int FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
        public static int FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
        public static int FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
        public static int FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
        public static int COLOR_ATTACHMENT0 = 0x8CE0;
        public static int DEPTH_ATTACHMENT = 0x8D00;
        public static int STENCIL_ATTACHMENT = 0x8D20;
        public static int DEPTH_STENCIL_ATTACHMENT = 0x821A;
        public static int NONE = 0;
        public static int FRAMEBUFFER_COMPLETE = 0x8CD5;
        public static int FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
        public static int FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
        public static int FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
        public static int FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
        public static int FRAMEBUFFER_BINDING = 0x8CA6;
        public static int RENDERBUFFER_BINDING = 0x8CA7;
        public static int MAX_RENDERBUFFER_SIZE = 0x84E8;
        public static int INVALID_FRAMEBUFFER_OPERATION = 0x0506;
        public static int UNPACK_FLIP_Y_WEBGL = 0x9240;
        public static int UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
        public static int CONTEXT_LOST_WEBGL = 0x9242;
        public static int UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
        public static int BROWSER_DEFAULT_WEBGL = 0x9244;
        public int drawingBufferWidth { get; set; }
        public int drawingBufferHeight { get; set; }
        [JsMethod(Name = "activeTexture")]
        public void ActiveTexture(int texture) { }
        [JsMethod(Name = "attachShader")]
        public void AttachShader(WebGLProgram program, WebGLShader shader) { }
        [JsMethod(Name = "bindAttribLocation")]
        public void BindAttribLocation(WebGLProgram program, int index, JsString name) { }
        [JsMethod(Name = "bindBuffer")]
        public void BindBuffer(int target, WebGLBuffer buffer) { }
        [JsMethod(Name = "bindFramebuffer")]
        public void BindFramebuffer(int target, WebGLFramebuffer framebuffer) { }
        [JsMethod(Name = "bindRenderbuffer")]
        public void BindRenderbuffer(int target, WebGLRenderbuffer renderbuffer) { }
        [JsMethod(Name = "bindTexture")]
        public void BindTexture(int target, WebGLTexture texture) { }
        [JsMethod(Name = "blendColor")]
        public void BlendColor(double red, double green, double blue, double alpha) { }
        [JsMethod(Name = "blendEquation")]
        public void BlendEquation(int mode) { }
        [JsMethod(Name = "blendEquationSeparate")]
        public void BlendEquationSeparate(int modeRGB, int modeAlpha) { }
        [JsMethod(Name = "blendFunc")]
        public void BlendFunc(int sfactor, int dfactor) { }
        [JsMethod(Name = "blendFuncSeparate")]
        public void BlendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { }
        [JsMethod(Name = "bufferData")]
        public void BufferData(int target, ArrayBuffer data, int usage) { }
        [JsMethod(Name = "bufferData")]
        public void BufferData(int target, ArrayBufferView data, int usage) { }
        [JsMethod(Name = "bufferData")]
        public void BufferData(int target, int size, int usage) { }
        [JsMethod(Name = "bufferSubData")]
        public void BufferSubData(int target, int offset, ArrayBuffer data) { }
        [JsMethod(Name = "bufferSubData")]
        public void BufferSubData(int target, int offset, ArrayBufferView data) { }
        [JsMethod(Name = "checkFramebufferStatus")]
        public int CheckFramebufferStatus(int target) { return default(int); }
        [JsMethod(Name = "clear")]
        public void Clear(int mask) { }
        [JsMethod(Name = "clearColor")]
        public void ClearColor(double red, double green, double blue, double alpha) { }
        [JsMethod(Name = "clearDepth")]
        public void ClearDepth(double depth) { }
        [JsMethod(Name = "clearStencil")]
        public void ClearStencil(int s) { }
        [JsMethod(Name = "colorMask")]
        public void ColorMask(bool red, bool green, bool blue, bool alpha) { }
        [JsMethod(Name = "compileShader")]
        public void CompileShader(WebGLShader shader) { }
        [JsMethod(Name = "compressedTexImage2D")]
        public void CompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, ArrayBufferView data) { }
        [JsMethod(Name = "compressedTexSubImage2D")]
        public void CompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, ArrayBufferView data) { }
        [JsMethod(Name = "copyTexImage2D")]
        public void CopyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) { }
        [JsMethod(Name = "copyTexSubImage2D")]
        public void CopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { }
        [JsMethod(Name = "createBuffer")]
        public WebGLBuffer CreateBuffer() { return default(WebGLBuffer); }
        [JsMethod(Name = "createFramebuffer")]
        public WebGLFramebuffer CreateFramebuffer() { return default(WebGLFramebuffer); }
        [JsMethod(Name = "createProgram")]
        public WebGLProgram CreateProgram() { return default(WebGLProgram); }
        [JsMethod(Name = "createRenderbuffer")]
        public WebGLRenderbuffer CreateRenderbuffer() { return default(WebGLRenderbuffer); }
        [JsMethod(Name = "createShader")]
        public WebGLShader CreateShader(int type) { return default(WebGLShader); }
        [JsMethod(Name = "createTexture")]
        public WebGLTexture CreateTexture() { return default(WebGLTexture); }
        [JsMethod(Name = "cullFace")]
        public void CullFace(int mode) { }
        [JsMethod(Name = "deleteBuffer")]
        public void DeleteBuffer(WebGLBuffer buffer) { }
        [JsMethod(Name = "deleteFramebuffer")]
        public void DeleteFramebuffer(WebGLFramebuffer framebuffer) { }
        [JsMethod(Name = "deleteProgram")]
        public void DeleteProgram(WebGLProgram program) { }
        [JsMethod(Name = "deleteRenderbuffer")]
        public void DeleteRenderbuffer(WebGLRenderbuffer renderbuffer) { }
        [JsMethod(Name = "deleteShader")]
        public void DeleteShader(WebGLShader shader) { }
        [JsMethod(Name = "deleteTexture")]
        public void DeleteTexture(WebGLTexture texture) { }
        [JsMethod(Name = "depthFunc")]
        public void DepthFunc(int func) { }
        [JsMethod(Name = "depthMask")]
        public void DepthMask(bool flag) { }
        [JsMethod(Name = "depthRange")]
        public void DepthRange(double zNear, double zFar) { }
        [JsMethod(Name = "detachShader")]
        public void DetachShader(WebGLProgram program, WebGLShader shader) { }
        [JsMethod(Name = "disable")]
        public void Disable(int cap) { }
        [JsMethod(Name = "disableVertexAttribArray")]
        public void DisableVertexAttribArray(int index) { }
        [JsMethod(Name = "drawArrays")]
        public void DrawArrays(int mode, int first, int count) { }
        [JsMethod(Name = "drawElements")]
        public void DrawElements(int mode, int count, int type, int offset) { }
        [JsMethod(Name = "enable")]
        public void Enable(int cap) { }
        [JsMethod(Name = "enableVertexAttribArray")]
        public void EnableVertexAttribArray(int index) { }
        [JsMethod(Name = "finish")]
        public void Finish() { }
        [JsMethod(Name = "flush")]
        public void Flush() { }
        [JsMethod(Name = "framebufferRenderbuffer")]
        public void FramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, WebGLRenderbuffer renderbuffer) { }
        [JsMethod(Name = "framebufferTexture2D")]
        public void FramebufferTexture2D(int target, int attachment, int textarget, WebGLTexture texture, int level) { }
        [JsMethod(Name = "frontFace")]
        public void FrontFace(int mode) { }
        [JsMethod(Name = "generateMipmap")]
        public void GenerateMipmap(int target) { }
        [JsMethod(Name = "getActiveAttrib")]
        public WebGLActiveInfo GetActiveAttrib(WebGLProgram program, int index) { return default(WebGLActiveInfo); }
        [JsMethod(Name = "getActiveUniform")]
        public WebGLActiveInfo GetActiveUniform(WebGLProgram program, int index) { return default(WebGLActiveInfo); }
        [JsMethod(Name = "getAttachedShaders")]
        public void GetAttachedShaders(WebGLProgram program) { }
        [JsMethod(Name = "getAttribLocation")]
        public int GetAttribLocation(WebGLProgram program, JsString name) { return default(int); }
        [JsMethod(Name = "getBufferParameter")]
        public void GetBufferParameter() { }
        [JsMethod(Name = "getContextAttributes")]
        public WebGLContextAttributes GetContextAttributes() { return default(WebGLContextAttributes); }
        [JsMethod(Name = "getError")]
        public int GetError() { return default(int); }
        [JsMethod(Name = "getExtension")]
        public object GetExtension(JsString name) { return default(object); }
        [JsMethod(Name = "getFramebufferAttachmentParameter")]
        public void GetFramebufferAttachmentParameter() { }
        [JsMethod(Name = "getParameter")]
        public void GetParameter() { }
        [JsMethod(Name = "getProgramParameter")]
        public void GetProgramParameter() { }
        [JsMethod(Name = "getProgramInfoLog")]
        public JsString GetProgramInfoLog(WebGLProgram program) { return default(JsString); }
        [JsMethod(Name = "getRenderbufferParameter")]
        public void GetRenderbufferParameter() { }
        [JsMethod(Name = "getShaderParameter")]
        public void GetShaderParameter() { }
        [JsMethod(Name = "getShaderInfoLog")]
        public JsString GetShaderInfoLog(WebGLShader shader) { return default(JsString); }
        [JsMethod(Name = "getShaderPrecisionFormat")]
        public WebGLShaderPrecisionFormat GetShaderPrecisionFormat(int shadertype, int precisiontype) { return default(WebGLShaderPrecisionFormat); }
        [JsMethod(Name = "getShaderSource")]
        public JsString GetShaderSource(WebGLShader shader) { return default(JsString); }
        [JsMethod(Name = "getSupportedExtensions")]
        public JsString GetSupportedExtensions() { return default(JsString); }
        [JsMethod(Name = "getTexParameter")]
        public void GetTexParameter() { }
        [JsMethod(Name = "getUniform")]
        public void GetUniform() { }
        [JsMethod(Name = "getUniformLocation")]
        public WebGLUniformLocation GetUniformLocation(WebGLProgram program, JsString name) { return default(WebGLUniformLocation); }
        [JsMethod(Name = "getVertexAttrib")]
        public void GetVertexAttrib() { }
        [JsMethod(Name = "getVertexAttribOffset")]
        public int GetVertexAttribOffset(int index, int pname) { return default(int); }
        [JsMethod(Name = "hint")]
        public void Hint(int target, int mode) { }
        [JsMethod(Name = "isBuffer")]
        public bool IsBuffer(WebGLBuffer buffer) { return default(bool); }
        [JsMethod(Name = "isContextLost")]
        public bool IsContextLost() { return default(bool); }
        [JsMethod(Name = "isEnabled")]
        public bool IsEnabled(int cap) { return default(bool); }
        [JsMethod(Name = "isFramebuffer")]
        public bool IsFramebuffer(WebGLFramebuffer framebuffer) { return default(bool); }
        [JsMethod(Name = "isProgram")]
        public bool IsProgram(WebGLProgram program) { return default(bool); }
        [JsMethod(Name = "isRenderbuffer")]
        public bool IsRenderbuffer(WebGLRenderbuffer renderbuffer) { return default(bool); }
        [JsMethod(Name = "isShader")]
        public bool IsShader(WebGLShader shader) { return default(bool); }
        [JsMethod(Name = "isTexture")]
        public bool IsTexture(WebGLTexture texture) { return default(bool); }
        [JsMethod(Name = "lineWidth")]
        public void LineWidth(double width) { }
        [JsMethod(Name = "linkProgram")]
        public void LinkProgram(WebGLProgram program) { }
        [JsMethod(Name = "pixelStorei")]
        public void PixelStorei(int pname, int param) { }
        [JsMethod(Name = "polygonOffset")]
        public void PolygonOffset(double factor, double units) { }
        [JsMethod(Name = "readPixels")]
        public void ReadPixels(int x, int y, int width, int height, int format, int type, ArrayBufferView pixels) { }
        [JsMethod(Name = "releaseShaderCompiler")]
        public void ReleaseShaderCompiler() { }
        [JsMethod(Name = "renderbufferStorage")]
        public void RenderbufferStorage(int target, int internalformat, int width, int height) { }
        [JsMethod(Name = "sampleCoverage")]
        public void SampleCoverage(double value, bool invert) { }
        [JsMethod(Name = "scissor")]
        public void Scissor(int x, int y, int width, int height) { }
        [JsMethod(Name = "shaderSource")]
        public void ShaderSource(WebGLShader shader, JsString @JsString) { }
        [JsMethod(Name = "stencilFunc")]
        public void StencilFunc(int func, int @ref, int mask) { }
        [JsMethod(Name = "stencilFuncSeparate")]
        public void StencilFuncSeparate(int face, int func, int @ref, int mask) { }
        [JsMethod(Name = "stencilMask")]
        public void StencilMask(int mask) { }
        [JsMethod(Name = "stencilMaskSeparate")]
        public void StencilMaskSeparate(int face, int mask) { }
        [JsMethod(Name = "stencilOp")]
        public void StencilOp(int fail, int zfail, int zpass) { }
        [JsMethod(Name = "stencilOpSeparate")]
        public void StencilOpSeparate(int face, int fail, int zfail, int zpass) { }
        [JsMethod(Name = "texParameterf")]
        public void TexParameterf(int target, int pname, double param) { }
        [JsMethod(Name = "texParameteri")]
        public void TexParameteri(int target, int pname, int param) { }
        [JsMethod(Name = "texImage2D")]
        public void TexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ArrayBufferView pixels) { }
        [JsMethod(Name = "texImage2D")]
        public void TexImage2D(int target, int level, int internalformat, int format, int type, ImageData pixels) { }
        [JsMethod(Name = "texImage2D")]
        public void TexImage2D(int target, int level, int internalformat, int format, int type, HtmlImageElement image) { }
        [JsMethod(Name = "texImage2D")]
        public void TexImage2D(int target, int level, int internalformat, int format, int type, HtmlCanvasElement canvas) { }
        [JsMethod(Name = "texSubImage2D")]
        public void TexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ArrayBufferView pixels) { }
        [JsMethod(Name = "texSubImage2D")]
        public void TexSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, ImageData pixels) { }
        [JsMethod(Name = "texSubImage2D")]
        public void TexSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, HtmlImageElement image) { }
        [JsMethod(Name = "texSubImage2D")]
        public void TexSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, HtmlCanvasElement canvas) { }
        [JsMethod(Name = "uniform1f")]
        public void Uniform1f(WebGLUniformLocation location, double x) { }
        [JsMethod(Name = "uniform1fv")]
        public void Uniform1fv(WebGLUniformLocation location, Float32Array v) { }
        [JsMethod(Name = "uniform1i")]
        public void Uniform1i(WebGLUniformLocation location, int x) { }
        [JsMethod(Name = "uniform1iv")]
        public void Uniform1iv(WebGLUniformLocation location, Int32Array v) { }
        [JsMethod(Name = "uniform2f")]
        public void Uniform2f(WebGLUniformLocation location, double x, double y) { }
        [JsMethod(Name = "uniform2fv")]
        public void Uniform2fv(WebGLUniformLocation location, Float32Array v) { }
        [JsMethod(Name = "uniform2i")]
        public void Uniform2i(WebGLUniformLocation location, int x, int y) { }
        [JsMethod(Name = "uniform2iv")]
        public void Uniform2iv(WebGLUniformLocation location, Int32Array v) { }
        [JsMethod(Name = "uniform3f")]
        public void Uniform3f(WebGLUniformLocation location, double x, double y, double z) { }
        [JsMethod(Name = "uniform3fv")]
        public void Uniform3fv(WebGLUniformLocation location, Float32Array v) { }
        [JsMethod(Name = "uniform3i")]
        public void Uniform3i(WebGLUniformLocation location, int x, int y, int z) { }
        [JsMethod(Name = "uniform3iv")]
        public void Uniform3iv(WebGLUniformLocation location, Int32Array v) { }
        [JsMethod(Name = "uniform4f")]
        public void Uniform4f(WebGLUniformLocation location, double x, double y, double z, double w) { }
        [JsMethod(Name = "uniform4fv")]
        public void Uniform4fv(WebGLUniformLocation location, Float32Array v) { }
        [JsMethod(Name = "uniform4i")]
        public void Uniform4i(WebGLUniformLocation location, int x, int y, int z, int w) { }
        [JsMethod(Name = "uniform4iv")]
        public void Uniform4iv(WebGLUniformLocation location, Int32Array v) { }
        [JsMethod(Name = "uniformMatrix2fv")]
        public void UniformMatrix2fv(WebGLUniformLocation location, bool transpose, Float32Array array) { }
        [JsMethod(Name = "uniformMatrix3fv")]
        public void UniformMatrix3fv(WebGLUniformLocation location, bool transpose, Float32Array array) { }
        [JsMethod(Name = "uniformMatrix4fv")]
        public void UniformMatrix4fv(WebGLUniformLocation location, bool transpose, Float32Array array) { }
        [JsMethod(Name = "useProgram")]
        public void UseProgram(WebGLProgram program) { }
        [JsMethod(Name = "validateProgram")]
        public void ValidateProgram(WebGLProgram program) { }
        [JsMethod(Name = "vertexAttrib1f")]
        public void VertexAttrib1f(int indx, double x) { }
        [JsMethod(Name = "vertexAttrib1fv")]
        public void VertexAttrib1fv(int indx, Float32Array values) { }
        [JsMethod(Name = "vertexAttrib2f")]
        public void VertexAttrib2f(int indx, double x, double y) { }
        [JsMethod(Name = "vertexAttrib2fv")]
        public void VertexAttrib2fv(int indx, Float32Array values) { }
        [JsMethod(Name = "vertexAttrib3f")]
        public void VertexAttrib3f(int indx, double x, double y, double z) { }
        [JsMethod(Name = "vertexAttrib3fv")]
        public void VertexAttrib3fv(int indx, Float32Array values) { }
        [JsMethod(Name = "vertexAttrib4f")]
        public void VertexAttrib4f(int indx, double x, double y, double z, double w) { }
        [JsMethod(Name = "vertexAttrib4fv")]
        public void VertexAttrib4fv(int indx, Float32Array values) { }
        [JsMethod(Name = "vertexAttribPointer")]
        public void VertexAttribPointer(int indx, int size, int type, bool normalized, int stride, int offset) { }
        [JsMethod(Name = "viewport")]
        public void Viewport(int x, int y, int width, int height) { }

        [JsMethod(Name = "getUniform")]
        public object GetUniform(WebGLProgram program, WebGLUniformLocation location) { return null; }
        [JsMethod(Name = "getProgramParameter")]
        public object GetProgramParameter(WebGLProgram program, int pname) { return null; }
        [JsMethod(Name = "getShaderParameter")]
        public object GetShaderParameter(WebGLShader shader, int pname) { return null; }
        [JsMethod(Name = "getParameter")]
        public object GetParameter(int pname) { return null; }
    }

}


text:
require 'formula'

class Mcabber < Formula
  desc "Console Jabber client"
  homepage 'http://mcabber.com/'
  url 'http://lilotux.net/~mikael/mcabber/files/mcabber-1.0.0.tar.bz2'
  sha256 '5476bcba395e0b9527823f5a9bce725151756f685ce2dcf6fad3dbe50a157032'

  bottle do
    sha256 "d1a3153df34801476d80b8ee36c3a04d6b96906890be7d13a9a03da502001292" => :yosemite
    sha256 "bea407be11ef8b7a078c07a23f43e7141618f8a72902cc2573dbda53e1a862ba" => :mavericks
    sha256 "eb37bcb8e3352a76e65b48b2f342f04131a0a60a69472f83e573c14755eb84ad" => :mountain_lion
  end

  head do
    url 'http://mcabber.com/hg/', :using => :hg

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  deprecated_option "enable-aspell" => "with-aspell"
  deprecated_option "enable-enchant" => "with-enchant"

  depends_on 'pkg-config' => :build
  depends_on 'glib'
  depends_on 'loudmouth'
  depends_on 'gpgme'
  depends_on 'libgcrypt'
  depends_on 'libotr'
  depends_on 'libidn'
  depends_on "aspell" => :optional
  depends_on "enchant" => :optional

  def install
    if build.head?
      cd "mcabber"
      inreplace "autogen.sh", "libtoolize", "glibtoolize"
      system "./autogen.sh"
    end

    args = ["--disable-debug", "--disable-dependency-tracking",
            "--prefix=#{prefix}",
            "--enable-otr"]

    args << "--enable-aspell" if build.with? "aspell"
    args << "--enable-enchant" if build.with? "enchant"

    system "./configure", *args
    system "make install"

    (share+'mcabber').install %w[mcabberrc.example contrib]
  end

  def caveats; <<-EOS.undent
    A configuration file is necessary to start mcabber.  The template is here:
      #{share}/mcabber/mcabberrc.example
    And there is a Getting Started Guide you will need to setup Mcabber:
      http://wiki.mcabber.com/index.php/Getting_started
    EOS
  end
end

redpajama_set_name: RedPajamaGithub


text:
import logging

from keystoneclient.v2_0 import client as ksclient
from keystoneclient import exceptions

LOG = logging.getLogger(__name__)

class AuthException(Exception):
    """Raised when authorization fails."""
    def __init__(self, message):
        self.message = message

class KeystoneAuthV2(object):
    def __init__(self, auth_url='', username='', password='',
                 tenant_name='', tenant_id='', insecure=False, keystone=None):
        if not all([auth_url, username, password, tenant_name or tenant_id]):
            raise ValueError('Please provide auth_url, username, password,'
                             ' and tenant_id or tenant_name)')
        self._keystone = keystone or ksclient.Client(username=username,
                                                     password=password,
                                                     tenant_name=tenant_name,
                                                     auth_url=auth_url,
                                                     insecure=insecure)
        self._barbican_url = None
        #TODO(dmend): make these configurable
        self._service_type = 'keystore'
        self._endpoint_type = 'publicURL'

        self.tenant_name = self._keystone.tenant_name
        self.tenant_id = self._keystone.tenant_id

    @property
    def auth_token(self):
        return self._keystone.auth_token

    @property
    def barbican_url(self):
        if not self._barbican_url:
            try:
                self._barbican_url = self._keystone.service_catalog.url_for(
                    attr='region',
                    filter_value=self._keystone.region_name,
                    service_type=self._service_type,
                    endpoint_type=self._endpoint_type
                )
            except exceptions.EmptyCatalog:
                LOG.error('Keystone is reporting an empty catalog.')
                raise AuthException('Empty keystone catalog.')
            except exceptions.EndpointNotFound:
                LOG.error('Barbican endpoint not found in keystone catalog.')
                raise AuthException('Barbican endpoint not found.')
        return self._barbican_url


text:
@charset "UTF-8";
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline; }

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  display: block; }

body {
  line-height: 1; }

ol, ul {
  list-style: none; }

blockquote, q {
  quotes: none; }

blockquote:before, blockquote:after {
  content: "";
  content: none; }

q:before, q:after {
  content: "";
  content: none; }

table {
  border-collapse: collapse;
  border-spacing: 0; }

html {
  box-sizing: border-box; }

*, *::after, *::before {
  box-sizing: inherit; }

button, input[type="button"], input[type="reset"], input[type="submit"],
button {
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  -o-appearance: none;
  appearance: none;
  -webkit-font-smoothing: antialiased;
  background-color: #477dca;
  border-radius: 3px;
  border: none;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif;
  font-size: 1em;
  font-weight: 600;
  line-height: 1;
  padding: 0.75em 1em;
  text-decoration: none;
  user-select: none;
  vertical-align: middle;
  white-space: nowrap; }
  button:hover, button:focus, input[type="button"]:hover, input[type="button"]:focus, input[type="reset"]:hover, input[type="reset"]:focus, input[type="submit"]:hover, input[type="submit"]:focus,
  button:hover,
  button:focus {
    background-color: #2c5999;
    color: #fff; }
  button:disabled, input[type="button"]:disabled, input[type="reset"]:disabled, input[type="submit"]:disabled,
  button:disabled {
    cursor: not-allowed;
    opacity: 0.5; }

fieldset {
  background-color: #f7f7f7;
  border: 1px solid #ddd;
  margin: 0 0 0.75em;
  padding: 1.5em; }

input,
label,
select {
  display: block;
  font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif;
  font-size: 1em; }

label {
  font-weight: 600;
  margin-bottom: 0.375em; }
  label.required::after {
    content: "*"; }
  label abbr {
    display: none; }

input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="email"], input[type="month"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"], textarea,
select[multiple=multiple],
textarea {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif;
  font-size: 1em;
  margin-bottom: 0.75em;
  padding: 0.5em;
  transition: border-color;
  width: 100%; }
  input[type="color"]:hover, input[type="date"]:hover, input[type="datetime"]:hover, input[type="datetime-local"]:hover, input[type="email"]:hover, input[type="month"]:hover, input[type="number"]:hover, input[type="password"]:hover, input[type="search"]:hover, input[type="tel"]:hover, input[type="text"]:hover, input[type="time"]:hover, input[type="url"]:hover, input[type="week"]:hover, textarea:hover,
  select[multiple=multiple]:hover,
  textarea:hover {
    border-color: #c4c4c4; }
  input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="email"]:focus, input[type="month"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="week"]:focus, textarea:focus,
  select[multiple=multiple]:focus,
  textarea:focus {
    border-color: #477dca;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 5px rgba(55, 112, 192, 0.7);
    outline: none; }

textarea {
  resize: vertical; }

input[type="search"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  -o-appearance: none;
  appearance: none; }

input[type="checkbox"],
input[type="radio"] {
  display: inline;
  margin-right: 0.375em; }

input[type="file"] {
  padding-bottom: 0.75em;
  width: 100%; }

select {
  margin-bottom: 1.5em;
  max-width: 100%;
  width: auto; }

ul,
ol {
  list-style-type: none;
  margin: 0;
  padding: 0; }
dl {
  margin-bottom: 0.75em; }
  dl dt {
    font-weight: bold;
    margin-top: 0.75em; }
  dl dd {
    margin: 0; }

table {
  -webkit-font-feature-settings: "kern", "liga", "tnum";
  -moz-font-feature-settings: "kern", "liga", "tnum";
  -ms-font-feature-settings: "kern", "liga", "tnum";
  font-feature-settings: "kern", "liga", "tnum";
  border-collapse: collapse;
  margin: 0.75em 0;
  table-layout: fixed;
  width: 100%; }

th {
  border-bottom: 1px solid #b7b7b7;
  font-weight: 600;
  padding: 0.75em 0;
  text-align: left; }

td {
  border-bottom: 1px solid #ddd;
  padding: 0.75em 0; }

tr,
td,
th {
  vertical-align: middle; }

body {
  -webkit-font-feature-settings: "kern", "liga", "pnum";
  -moz-font-feature-settings: "kern", "liga", "pnum";
  -ms-font-feature-settings: "kern", "liga", "pnum";
  font-feature-settings: "kern", "liga", "pnum";
  -webkit-font-smoothing: antialiased;
  color: #333;
  font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif;
  font-size: 1em;
  line-height: 1.5; }

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif;
  font-size: 1em;
  line-height: 1.2;
  margin: 0 0 0.75em; }

p {
  margin: 0 0 0.75em; }

a {
  color: #477dca;
  text-decoration: none;
  transition: color 0.1s linear; }
  a:active, a:focus, a:hover {
    color: #2c5999; }
  a:active, a:focus {
    outline: none; }

hr {
  border-bottom: 1px solid #ddd;
  border-left: none;
  border-right: none;
  border-top: none;
  margin: 1.5em 0; }

img,
picture {
  margin: 0;
  max-width: 100%; }

body {
  font-family: "merriweather", serif;
  font-size: 18px; }
  body > main, body > header, body > footer {
    float: left;
    display: block;
    margin-right: 2.35765%;
    width: 100%; }
    body > main:last-child, body > header:last-child, body > footer:last-child {
      margin-right: 0; }

#wrapper {
  padding: 0 1em;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto; }
  #wrapper::after {
    clear: both;
    content: "";
    display: table; }

.container {
  float: left;
  display: block;
  margin-right: 2.35765%;
  width: 100%; }
  .container:last-child {
    margin-right: 0; }

article {
  padding: 2.36859em 0; }

.site-head {
  text-align: center; }

.site-head-content {
  margin-bottom: 5.61023em; }
  .site-head-content h1.blog-title {
    margin-left: -9999px;
    position: absolute; }
  .site-head-content .blog-logo, .site-head-content .blog-logo:hover {
    border: none !important; }
  .site-head-content .blog-logo img {
    width: 50%;
    max-width: 260px;
    margin: 3.15733em 0; }

.author-image {
  height: 400px;
  width: 100%;
  position: relative;
  margin-bottom: 2.36859em; }
  .author-image a {
    height: 100%;
    width: 100%;
    display: block;
    background-size: auto 400px;
    background-position: center center;
    border-bottom: none !important; }

a, p a {
  color: #931B22;
  background: transparent;
  -webkit-transition: all 350ms;
  -moz-transition: all 350ms;
  transition: all 350ms;
  border-bottom: 6px solid transparent; }
  a:hover, p a:hover {
    color: #931B22;
    border-bottom: 6px solid #F5F2F0; }

h1, h2, h3, h4, h5, h6 {
  font-family: "fira-sans-2", sans-serif;
  font-weight: 400;
  margin: 0;
  margin-top: 1.333em;
  padding-bottom: 0.42219em; }
  h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: black;
    border: none !important; }
    h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
      color: #931B22; }

h1 {
  font-size: 2.3em;
  margin-top: 0.42219em; }

h2 {
  font-size: 2em; }
  h2.blog-description {
    background-color: #fafafa;
    border-top: 1px solid #EBF2F6;
    border-bottom: 1px solid #EBF2F6;
    font-family: "merriweather", serif;
    font-style: italic;
    font-size: 0.8em;
    color: #444;
    padding: 1.333em; }

h3 {
  font-size: 1.6em; }

h4 {
  font-size: 1.5em; }

h5, h6 {
  font-size: 1.5em; }

.post-meta {
  font-size: 0.8em; }

.post-template .site-head-content {
  margin-bottom: 0; }
@media screen and (min-width: 960px) {
  .post-template .site-head {
    text-align: left;
    position: absolute;
    left: 30px;
    top: 10px;
    width: 200px;
    height: 200px;
    overflow: hidden; }
  .post-template article {
    margin-top: 30px; } }
.post-template .site-head h2 {
  display: none; }
.post-template .post-meta {
  padding: 1.333em 0;
  margin: 1.333em 0;
  border-top: 1px solid #EBF2F6;
  border-bottom: 1px solid #EBF2F6; }
.post-template article {
  padding-top: 0; }
.post-template header .site-head-content {
  padding: 1.77689em 0; }
  .post-template header .site-head-content .blog-logo img {
    margin: 0;
    width: 160px; }

.post-header {
  margin-bottom: 1.333em; }

.post-content h2 {
  border-top: 1px solid #EBF2F6;
  padding-top: 1.333em; }
.post-content p {
  margin-bottom: 1.77689em 0; }
.post-content ol, .post-content ul, .post-content p {
  line-height: 1.77689em; }
.post-content ol, .post-content ul {
  padding: 1.77689em 0;
  margin: 1.77689em 0; }
.post-content ul {
  list-style-type: disc; }
.post-content ol {
  list-style-type: decimal-leading-zero; }
.post-content ol img, .post-content ul img, .post-content p img {
  margin: 1.77689em auto;
  display: block; }

blockquote {
  border-left: 8px solid #EBF2F6;
  padding-left: 1em;
  font-style: italic;
  margin: 1.77689em 0; }

nav.pagination {
  padding: 2.36859em 0; }

span.by, .fancy {
  font-weight: lighter;
  font-style: italic;
  font-family: serif; }

.post-footer {
  font-size: 0.7em; }
  .post-footer .author-share {
    padding: 1.77689em 0;
    margin: 2.36859em 0;
    border-top: 1px solid #EBF2F6;
    border-bottom: 1px solid #EBF2F6; }
    .post-footer .author-share h4 {
      margin-top: 0; }
  .post-footer .fancy {
    font-size: 1.5em; }

.author-meta {
  padding: 0;
  margin: 0;
  list-style: none;
  line-height: 1;
  font-style: italic;
  color: #9EABB3; }

.author-meta li {
  float: left;
  margin-left: 10px; }

.author-meta li:before {
  content: "•";
  display: inline-block;
  margin-right: 10px;
  color: #BBC7CC; }

.author-meta li:first-child {
  margin-left: 0; }
  .author-meta li:first-child:before {
    content: none; }

.clearfix::after {
  clear: both;
  content: "";
  display: table; }

.hidden {
  display: none; }

.disqus {
  margin: 3.15733em 0; }

.author {
  float: left;
  display: block;
  margin-right: 2.35765%;
  width: 65.88078%; }
  .author:last-child {
    margin-right: 0; }
  .author p {
    padding: 0.3em 0 1.333em; }

.share {
  float: left;
  display: block;
  margin-right: 2.35765%;
  width: 31.76157%;
  text-align: right; }
  .share:last-child {
    margin-right: 0; }
  .share a, .share a:hover {
    color: black;
    font-size: 2em;
    border: none;
    padding-left: 10px;
    padding-right: 2px; }

footer.site-footer {
  position: relative;
  padding-top: 2.36859em;
  padding-bottom: 2.36859em;
  text-align: center;
  border-top: 1px solid #EBF2F6;
  font-size: 0.7em;
  clear: both; }
  footer.site-footer .inner {
    opacity: 0.8; }

code, tt {
  padding: 1px 3px;
  font-family: Inconsolata, monospace, sans-serif;
  font-size: 0.85em;
  white-space: pre-wrap;
  border: 1px solid #E3EDF3;
  background: #F7FAFB;
  border-radius: 2px; }

pre {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  margin: 1.6em 0;
  border: 1px solid #E3EDF3;
  width: 100%;
  padding: 10px;
  font-family: Inconsolata, monospace, sans-serif;
  font-size: 0.9em;
  white-space: pre;
  overflow: auto;
  background: #F7FAFB;
  border-radius: 3px; }

pre code, tt {
  font-size: 0.85em;
  white-space: -moz-pre-wrap;
  white-space: pre-wrap;
  background: transparent;
  border: none;
  padding: 0; }

/* Import the font file with the icons in it */
@font-face {
  font-family: "icons";
  src: url("../fonts/icons.eot");
  src: url("../fonts/icons.eot?#iefix") format("embedded-opentype"), url("../fonts/icons.woff") format("woff"), url("../fonts/icons.ttf") format("truetype"), url("../fonts/icons.svg#icons") format("svg");
  font-weight: normal;
  font-style: normal; }
/* Apply these base styles to all icons */
.icon-ghost:before,
.icon-feed:before,
.icon-twitter:before,
.icon-google-plus:before,
.icon-facebook:before {
  font-family: "icons";
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; }

/* Each icon is created by inserting the corret character into the
 * content of the :before pseudo element. Like a boss. */
.icon-ghost:before {
  content: ""; }

.icon-feed:before {
  content: ""; }

.icon-twitter:before {
  content: "";
  font-size: 1.1em; }

.icon-google-plus:before {
  content: ""; }

.icon-facebook:before {
  content: ""; }

.subscribe {
  width: 28px;
  height: 28px;
  position: absolute;
  top: -14px;
  margin-left: -15px;
  border: 1px solid #EBF2F6;
  text-align: center;
  line-height: 2.4rem;
  border-radius: 50px;
  background: #fff;
  transition: box-shadow 0.5s; }

/* The RSS icon, inserted via icon font */
.subscribe:before {
  color: #D2DEE3;
  font-size: 10px;
  position: absolute;
  top: 9px;
  left: 9px;
  font-weight: bold;
  transition: color 0.5s ease; }

/* Add a box shadow to on hover */
.subscribe:hover {
  box-shadow: rgba(0, 0, 0, 0.05) 0 0 0 3px;
  transition: box-shadow 0.25s; }

.subscribe:hover:before {
  color: #50585D; }

.rss {
  left: 50%;
  margin-left: -35px; }

.twitter {
  left: 50%;
  margin-left: 5px; }
  .twitter:before {
    font-size: 16px;
    left: 6px;
    top: 6px; }

/*# sourceMappingURL=styles.css.map */


text:
using System;
using System.Linq;

namespace Microsoft.WindowsAzure.Management.Models
{
    /// <summary>
    /// The name of a subscription operation.
    /// </summary>
    public static partial class SubscriptionOperationNames
    {
        public const string ActivateDomainName = "ActivateDomainName";

        public const string AddCertificates = "AddCertificates";

        public const string AddSubscriptionCertificate = "AddSubscriptionCertificate";

        public const string ChangeDeploymentConfiguration = "ChangeDeploymentConfiguration";

        public const string ChangeDeploymentConfigurationBySlot = "ChangeDeploymentConfigurationBySlot";

        public const string CommitImageUpload = "CommitImageUpload";

        public const string CreateAffinityGroup = "CreateAffinityGroup";

        public const string CreateDeployment = "CreateDeployment";

        public const string CreateDeploymentBySlot = "CreateDeploymentBySlot";

        public const string CreateHostedService = "CreateHostedService";

        public const string CreateStorageService = "CreateStorageService";

        public const string DeleteAffinityGroup = "DeleteAffinityGroup";

        public const string DeleteCertificate = "DeleteCertificate";

        public const string DeleteDeployment = "DeleteDeployment";

        public const string DeleteHostedService = "DeleteHostedService";

        public const string DeleteImage = "DeleteImage";

        public const string DeleteStorageService = "DeleteStorageService";

        public const string PrepareImageUpload = "PrepareImageUpload";

        public const string RebootDeploymentRoleInstance = "RebootDeploymentRoleInstance";

        public const string RebootDeploymentRoleInstanceBySlot = "RebootDeploymentRoleInstanceBySlot";

        public const string ReimageDeploymentRoleInstance = "ReimageDeploymentRoleInstance";

        public const string ReimageDeploymentRoleInstanceBySlot = "ReimageDeploymentRoleInstanceBySlot";

        public const string RegenerateStorageServiceKeys = "RegenerateStorageServiceKeys";

        public const string RegisterDomainName = "RegisterDomainName";

        public const string RemoveSubscriptionCertificate = "RemoveSubscriptionCertificate";

        public const string RollbackDeploymentUpdateOrUpgrade = "RollbackDeploymentUpdateOrUpgrade";

        public const string SetImageProperties = "SetImageProperties";

        public const string SetParentImage = "SetParentImage";

        public const string SwapDeployment = "SwapDeployment";

        public const string UnregisterDomainName = "UnregisterDomainName";

        public const string UpdateAffinityGroup = "UpdateAffinityGroup";

        public const string UpdateDeploymentStatus = "UpdateDeploymentStatus";

        public const string UpdateDeploymentStatusBySlot = "UpdateDeploymentStatusBySlot";

        public const string UpdateHostedService = "UpdateHostedService";

        public const string UpdateStorageService = "UpdateStorageService";

        public const string UpgradeDeployment = "UpgradeDeployment";

        public const string UpgradeDeploymentBySlot = "UpgradeDeploymentBySlot";

        public const string WalkUpgradeDomain = "WalkUpgradeDomain";

        public const string WalkUpgradeDomainBySlot = "WalkUpgradeDomainBySlot";
    }
}


text:
Install Yeoman, and the fabric generator

mkdir basic-contract-java

./gradlew clean build shadowJar

In the fabric samples directory

export PATH=$(pwd)/bin


text:
package com.intuit.wasabi.authorizationobjects;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.IOException;
import java.util.List;

import static java.util.Arrays.asList;

@JsonSerialize(using = Role.Serializer.class)
public enum Role {

    READONLY(Permission.READ),
    READWRITE(Permission.CREATE, Permission.READ, Permission.UPDATE, Permission.DELETE),
    ADMIN(Permission.CREATE, Permission.READ, Permission.UPDATE, Permission.DELETE, Permission.ADMIN),
    SUPERADMIN(Permission.CREATE, Permission.READ, Permission.UPDATE, Permission.DELETE,
            Permission.ADMIN, Permission.SUPERADMIN);

    //TODO: make enum not store states
    private final transient List<Permission> Permissions;

    Role(Permission... permissions) {
        this.Permissions = asList(permissions);
    }

    public List<Permission> getRolePermissions() {
        return Permissions;
    }

    public static Role toRole(String role) {
        for (Role role1 : Role.values()) {
            if (role1.name().equalsIgnoreCase(role)) {
                return role1;
            }
        }
        return null;
    }

    public static class Serializer extends JsonSerializer<Role> {
        @Override
        public void serialize(Role role, JsonGenerator generator, SerializerProvider provider)
                throws IOException {
            generator.writeString(role.toString());
        }
    }

}


text:
var MochaBin = require('mocha-bin').MochaBin;

(new MochaBin()).run();


text:
import * as ace from 'brace';
import { ComponentFixture, fakeAsync, flush, TestBed, tick } from '@angular/core/testing';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { DebugElement } from '@angular/core';
import { of } from 'rxjs';
import { ArtemisTestModule } from '../../test.module';
import { ParticipationWebsocketService } from 'app/overview/participation-websocket.service';
import { MockSyncStorage } from '../../helpers/mocks/service/mock-sync-storage.service';
import { MockParticipationWebsocketService } from '../../helpers/mocks/service/mock-participation-websocket.service';
import { User } from 'app/core/user/user.model';
import { AccountService } from 'app/core/auth/account.service';
import { LocalStorageService, SessionStorageService } from 'ngx-webstorage';
import { By } from '@angular/platform-browser';
import { MockComponent, MockPipe, MockProvider } from 'ng-mocks';
import { RepositoryFileService } from 'app/exercises/shared/result/repository.service';
import { StudentParticipation } from 'app/entities/participation/student-participation.model';
import { ProgrammingAssessmentRepoExportButtonComponent } from 'app/exercises/programming/assess/repo-export/programming-assessment-repo-export-button.component';
import { ProgrammingSubmission } from 'app/entities/programming-submission.model';
import { Feedback, FeedbackType } from 'app/entities/feedback.model';
import { ProgrammingAssessmentManualResultService } from 'app/exercises/programming/assess/manual-result/programming-assessment-manual-result.service';
import { ProgrammingExercise } from 'app/entities/programming-exercise.model';
import { Complaint } from 'app/entities/complaint.model';
import { ComplaintService } from 'app/complaints/complaint.service';
import { ExerciseHintService } from 'app/exercises/shared/exercise-hint/manage/exercise-hint.service';
import { MockRepositoryFileService } from '../../helpers/mocks/service/mock-repository-file.service';
import { MockExerciseHintService } from '../../helpers/mocks/service/mock-exercise-hint.service';
import { MockNgbModalService } from '../../helpers/mocks/service/mock-ngb-modal.service';
import { CodeEditorTutorAssessmentContainerComponent } from 'app/exercises/programming/assess/code-editor-tutor-assessment-container.component';
import { Result } from 'app/entities/result.model';
import { AssessmentType } from 'app/entities/assessment-type.model';
import { ProgrammingExerciseStudentParticipation } from 'app/entities/participation/programming-exercise-student-participation.model';
import { AssessmentLayoutComponent } from 'app/assessment/assessment-layout/assessment-layout.component';
import { HttpResponse } from '@angular/common/http';
import { Course } from 'app/entities/course.model';
import { delay } from 'rxjs/operators';
import { ProgrammingSubmissionService } from 'app/exercises/programming/participate/programming-submission.service';
import { ComplaintResponse } from 'app/entities/complaint-response.model';
import { ActivatedRoute, convertToParamMap, Router } from '@angular/router';
import { ProgrammingExerciseService } from 'app/exercises/programming/manage/services/programming-exercise.service';
import { CodeEditorRepositoryFileService } from 'app/exercises/programming/shared/code-editor/service/code-editor-repository.service';
import { CodeEditorAceComponent } from 'app/exercises/programming/shared/code-editor/ace/code-editor-ace.component';
import { CodeEditorFileBrowserComponent } from 'app/exercises/programming/shared/code-editor/file-browser/code-editor-file-browser.component';
import { FileType } from 'app/exercises/programming/shared/code-editor/model/code-editor.model';
import { RouterTestingModule } from '@angular/router/testing';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { CodeEditorContainerComponent } from 'app/exercises/programming/shared/code-editor/container/code-editor-container.component';
import { ResultComponent } from 'app/exercises/shared/result/result.component';
import { IncludedInScoreBadgeComponent } from 'app/exercises/shared/exercise-headers/included-in-score-badge.component';
import { ExerciseHintStudentComponent } from 'app/exercises/shared/exercise-hint/participate/exercise-hint-student-dialog.component';
import { AssessmentInstructionsComponent } from 'app/assessment/assessment-instructions/assessment-instructions/assessment-instructions.component';
import { UnreferencedFeedbackComponent } from 'app/exercises/shared/unreferenced-feedback/unreferenced-feedback.component';
import { ArtemisTranslatePipe } from 'app/shared/pipes/artemis-translate.pipe';
import { MockTranslateService } from '../../helpers/mocks/service/mock-translate.service';
import { TranslateService } from '@ngx-translate/core';
import { AssessmentHeaderComponent } from 'app/assessment/assessment-header/assessment-header.component';
import { ComplaintsForTutorComponent } from 'app/complaints/complaints-for-tutor/complaints-for-tutor.component';
import { AssessmentComplaintAlertComponent } from 'app/assessment/assessment-complaint-alert/assessment-complaint-alert.component';
import { CodeEditorGridComponent } from 'app/exercises/programming/shared/code-editor/layout/code-editor-grid.component';
import { CodeEditorActionsComponent } from 'app/exercises/programming/shared/code-editor/actions/code-editor-actions.component';
import { CodeEditorInstructionsComponent } from 'app/exercises/programming/shared/code-editor/instructions/code-editor-instructions.component';
import { KeysPipe } from 'app/shared/pipes/keys.pipe';
import { CodeEditorBuildOutputComponent } from 'app/exercises/programming/shared/code-editor/build-output/code-editor-build-output.component';
import { CodeEditorFileBrowserCreateNodeComponent } from 'app/exercises/programming/shared/code-editor/file-browser/code-editor-file-browser-create-node.component';
import { CodeEditorStatusComponent } from 'app/exercises/programming/shared/code-editor/status/code-editor-status.component';
import { CodeEditorFileBrowserFolderComponent } from 'app/exercises/programming/shared/code-editor/file-browser/code-editor-file-browser-folder.component';
import { CodeEditorFileBrowserFileComponent } from 'app/exercises/programming/shared/code-editor/file-browser/code-editor-file-browser-file.component';
import { CodeEditorTutorAssessmentInlineFeedbackComponent } from 'app/exercises/programming/assess/code-editor-tutor-assessment-inline-feedback.component';
import { AceEditorComponent } from 'app/shared/markdown-editor/ace-editor/ace-editor.component';
import { ExtensionPointDirective } from 'app/shared/extension-point/extension-point.directive';
import { TreeviewComponent } from 'app/exercises/programming/shared/code-editor/treeview/components/treeview/treeview.component';
import { TreeviewItem } from 'app/exercises/programming/shared/code-editor/treeview/models/treeview-item';

function addFeedbackAndValidateScore(comp: CodeEditorTutorAssessmentContainerComponent, pointsAwarded: number, scoreExpected: number) {
    comp.unreferencedFeedback.push({
        type: FeedbackType.MANUAL_UNREFERENCED,
        detailText: 'unreferenced feedback',
        credits: pointsAwarded,
    });
    comp.validateFeedback();
    expect(comp.manualResult?.score).toEqual(scoreExpected);
}

describe('CodeEditorTutorAssessmentContainerComponent', () => {
    // needed to make sure ace is defined
    ace.acequire('ace/ext/modelist.js');
    let comp: CodeEditorTutorAssessmentContainerComponent;
    let fixture: ComponentFixture<CodeEditorTutorAssessmentContainerComponent>;
    let debugElement: DebugElement;
    let programmingAssessmentManualResultService: ProgrammingAssessmentManualResultService;
    let complaintService: ComplaintService;
    let accountService: AccountService;
    let programmingSubmissionService: ProgrammingSubmissionService;
    let programmingExerciseService: ProgrammingExerciseService;
    let repositoryFileService: CodeEditorRepositoryFileService;
    let router: Router;

    let updateAfterComplaintStub: jest.SpyInstance;
    let findBySubmissionIdStub: jest.SpyInstance;
    let getIdentityStub: jest.SpyInstance;
    let getProgrammingSubmissionForExerciseWithoutAssessmentStub: jest.SpyInstance;
    let lockAndGetProgrammingSubmissionParticipationStub: jest.SpyInstance;
    let findWithParticipationsStub: jest.SpyInstance;

    const user = <User>{ id: 99, groups: ['instructorGroup'] };
    const result: Result = {
        feedbacks: [new Feedback()],
        participation: new StudentParticipation(),
        score: 80,
        successful: true,
        submission: new ProgrammingSubmission(),
        assessor: user,
        hasComplaint: true,
        assessmentType: AssessmentType.SEMI_AUTOMATIC,
        id: 2,
        resultString: '1 of 13 passed',
    };
    result.submission!.id = 1;

    const complaint = <Complaint>{ id: 1, complaintText: 'Why only 80%?', result };
    const exercise = {
        id: 1,
        templateParticipation: {
            id: 3,
            repositoryUrl: 'test2',
            results: [{ id: 9, submission: { id: 1, buildFailed: false } }],
        },
        maxPoints: 100,
        gradingInstructions: 'Grading Instructions',
        course: <Course>{ instructorGroupName: 'instructorGroup' },
    } as unknown as ProgrammingExercise;

    const participation: ProgrammingExerciseStudentParticipation = new ProgrammingExerciseStudentParticipation();
    participation.results = [result];
    participation.exercise = exercise;
    participation.id = 1;
    participation.student = { login: 'student1' } as User;
    participation.repositoryUrl = 'http://student1@bitbucket.ase.in.tum.de/scm/TEST/test-repo-student1.git';
    result.submission!.participation = participation;

    const submission: ProgrammingSubmission = new ProgrammingSubmission();
    submission.results = [result];
    submission.participation = participation;
    submission.id = 1234;
    submission.latestResult = result;

    const unassessedSubmission = new ProgrammingSubmission();
    unassessedSubmission.id = 12;

    const afterComplaintResult = new Result();
    afterComplaintResult.score = 100;

    const route = (): ActivatedRoute => ({ params: of({ submissionId: 123 }), queryParamMap: of(convertToParamMap({ testRun: false })) } as any as ActivatedRoute);
    const fileContent = 'This is the content of a file';
    const templateFileSessionReturn: { [fileName: string]: string } = { 'folder/file1': fileContent };

    beforeEach(() => {
        return TestBed.configureTestingModule({
            imports: [ArtemisTestModule, RouterTestingModule],
            declarations: [
                CodeEditorTutorAssessmentContainerComponent,
                MockComponent(ProgrammingAssessmentRepoExportButtonComponent),
                MockComponent(FaIconComponent),
                AssessmentLayoutComponent,
                MockComponent(AssessmentComplaintAlertComponent),
                MockComponent(AssessmentHeaderComponent),
                MockComponent(ComplaintsForTutorComponent),
                CodeEditorContainerComponent,
                CodeEditorFileBrowserComponent,
                MockPipe(KeysPipe),
                TreeviewComponent,
                MockComponent(CodeEditorStatusComponent),
                MockComponent(CodeEditorFileBrowserCreateNodeComponent),
                MockComponent(CodeEditorFileBrowserFolderComponent),
                MockComponent(CodeEditorFileBrowserFileComponent),
                MockComponent(CodeEditorBuildOutputComponent),
                MockComponent(CodeEditorGridComponent),
                MockComponent(CodeEditorActionsComponent),
                CodeEditorAceComponent,
                MockComponent(CodeEditorTutorAssessmentInlineFeedbackComponent),
                AceEditorComponent,
                MockComponent(CodeEditorInstructionsComponent),
                MockComponent(ResultComponent),
                MockComponent(IncludedInScoreBadgeComponent),
                MockComponent(ExerciseHintStudentComponent),
                MockComponent(AssessmentInstructionsComponent),
                MockComponent(UnreferencedFeedbackComponent),
                MockPipe(ArtemisTranslatePipe),
                ExtensionPointDirective,
            ],
            providers: [
                MockProvider(Router),
                { provide: TranslateService, useClass: MockTranslateService },
                { provide: ParticipationWebsocketService, useClass: MockParticipationWebsocketService },
                { provide: RepositoryFileService, useClass: MockRepositoryFileService },
                { provide: ExerciseHintService, useClass: MockExerciseHintService },
                { provide: NgbModal, useClass: MockNgbModalService },
                { provide: SessionStorageService, useClass: MockSyncStorage },
                { provide: LocalStorageService, useClass: MockSyncStorage },
                { provide: ActivatedRoute, useValue: route() },
            ],
        })
            .overrideModule(ArtemisTestModule, { set: { declarations: [], exports: [] } })
            .compileComponents()
            .then(() => {
                // Ignore console errors
                console.error = () => {
                    return false;
                };
                fixture = TestBed.createComponent(CodeEditorTutorAssessmentContainerComponent);
                comp = fixture.componentInstance;
                debugElement = fixture.debugElement;
                router = TestBed.inject(Router);

                programmingAssessmentManualResultService = debugElement.injector.get(ProgrammingAssessmentManualResultService);
                programmingSubmissionService = debugElement.injector.get(ProgrammingSubmissionService);
                complaintService = debugElement.injector.get(ComplaintService);
                accountService = debugElement.injector.get(AccountService);
                programmingExerciseService = debugElement.injector.get(ProgrammingExerciseService);
                repositoryFileService = debugElement.injector.get(CodeEditorRepositoryFileService);

                updateAfterComplaintStub = jest.spyOn(programmingAssessmentManualResultService, 'updateAfterComplaint').mockReturnValue(of(afterComplaintResult));
                lockAndGetProgrammingSubmissionParticipationStub = jest
                    .spyOn(programmingSubmissionService, 'lockAndGetProgrammingSubmissionParticipation')
                    .mockReturnValue(of(submission).pipe(delay(100)));
                findBySubmissionIdStub = jest.spyOn(complaintService, 'findBySubmissionId').mockReturnValue(of({ body: complaint } as HttpResponse<Complaint>));
                getIdentityStub = jest.spyOn(accountService, 'identity').mockReturnValue(new Promise((promise) => promise(user)));
                getProgrammingSubmissionForExerciseWithoutAssessmentStub = jest
                    .spyOn(programmingSubmissionService, 'getProgrammingSubmissionForExerciseForCorrectionRoundWithoutAssessment')
                    .mockReturnValue(of(unassessedSubmission));

                findWithParticipationsStub = jest.spyOn(programmingExerciseService, 'findWithTemplateAndSolutionParticipation');
                findWithParticipationsStub.mockReturnValue(of({ body: exercise }));
            });
    });

    afterEach(() => {
        jest.restoreAllMocks();
    });

    it('should use jhi-assessment-layout', () => {
        const assessmentLayout = fixture.debugElement.query(By.directive(AssessmentLayoutComponent));
        expect(assessmentLayout).not.toBe(undefined);
    });

    it('should show complaint for result with complaint and check assessor', fakeAsync(() => {
        comp.ngOnInit();
        tick(100);

        expect(getIdentityStub).toHaveBeenCalledTimes(1);
        expect(lockAndGetProgrammingSubmissionParticipationStub).toHaveBeenCalledTimes(1);
        expect(findBySubmissionIdStub).toHaveBeenCalledTimes(1);
        expect(comp.isAssessor).toBe(true);
        expect(comp.complaint).not.toBe(null);
        fixture.detectChanges();

        const complaintsForm = debugElement.query(By.css('jhi-complaints-for-tutor-form'));
        expect(complaintsForm).not.toBe(null);
        expect(comp.complaint).not.toBe(null);

        // Wait until periodic timer has passed out
        tick(100);
        flush();
    }));

    it('should lock a new submission', fakeAsync(() => {
        const activatedRoute: ActivatedRoute = fixture.debugElement.injector.get(ActivatedRoute);
        activatedRoute.params = of({ submissionId: 'new' });
        TestBed.inject(ActivatedRoute);

        getProgrammingSubmissionForExerciseWithoutAssessmentStub.mockReturnValue(of(submission));

        comp.ngOnInit();
        tick(100);
        expect(getProgrammingSubmissionForExerciseWithoutAssessmentStub).toHaveBeenCalledTimes(1);
        flush();
    }));

    it('should not show complaint when participation contains no complaint', fakeAsync(() => {
        findBySubmissionIdStub.mockReturnValue(of({ body: undefined }));
        comp.ngOnInit();
        tick(100);

        expect(getIdentityStub).toHaveBeenCalledTimes(1);
        expect(lockAndGetProgrammingSubmissionParticipationStub).toHaveBeenCalledTimes(1);
        expect(findBySubmissionIdStub).toHaveBeenCalledTimes(1);
        expect(comp.complaint).toBe(undefined);
        fixture.detectChanges();

        const complaintsForm = debugElement.query(By.css('jhi-complaints-for-tutor-form'));
        expect(complaintsForm).toBe(null);

        // Wait until periodic timer has passed out
        tick(100);
        flush();
    }));

    it('should calculate score correctly for IncludedCompletelyWithBonusPointsExercise', fakeAsync(() => {
        comp.ngOnInit();
        tick(100);

        comp.exercise.maxPoints = 10;
        comp.exercise.bonusPoints = 10;
        comp.automaticFeedback = [];
        comp.referencedFeedback = [];
        comp.unreferencedFeedback = [];
        addFeedbackAndValidateScore(comp, 0, 0);
        addFeedbackAndValidateScore(comp, -1, 0);
        addFeedbackAndValidateScore(comp, 1, 0);
        addFeedbackAndValidateScore(comp, 5, 50);
        addFeedbackAndValidateScore(comp, 5, 100);
        addFeedbackAndValidateScore(comp, 5, 150);
        addFeedbackAndValidateScore(comp, 5, 200);
        addFeedbackAndValidateScore(comp, 5, 200);
        flush();
    }));

    it('should calculate score correctly for IncludedCompletelyWithoutBonusPointsExercise', fakeAsync(() => {
        comp.ngOnInit();
        tick(100);

        comp.exercise.maxPoints = 10;
        comp.exercise.bonusPoints = 0;
        comp.automaticFeedback = [];
        comp.referencedFeedback = [];
        comp.unreferencedFeedback = [];
        addFeedbackAndValidateScore(comp, 0, 0);
        addFeedbackAndValidateScore(comp, -1, 0);
        addFeedbackAndValidateScore(comp, 1, 0);
        addFeedbackAndValidateScore(comp, 5, 50);
        addFeedbackAndValidateScore(comp, 5, 100);
        addFeedbackAndValidateScore(comp, 5, 100);
        flush();
    }));

    it('should calculate score correctly for IncludedAsBonusExercise', fakeAsync(() => {
        comp.ngOnInit();
        tick(100);

        comp.exercise.maxPoints = 10;
        comp.exercise.bonusPoints = 0;
        comp.automaticFeedback = [];
        comp.referencedFeedback = [];
        comp.unreferencedFeedback = [];
        addFeedbackAndValidateScore(comp, 0, 0);
        addFeedbackAndValidateScore(comp, -1, 0);
        addFeedbackAndValidateScore(comp, 1, 0);
        addFeedbackAndValidateScore(comp, 5, 50);
        addFeedbackAndValidateScore(comp, 5, 100);
        addFeedbackAndValidateScore(comp, 5, 100);
        flush();
    }));

    it('should calculate score correctly for NotIncludedExercise', fakeAsync(() => {
        comp.ngOnInit();
        tick(100);

        comp.exercise.maxPoints = 10;
        comp.exercise.bonusPoints = 0;
        comp.automaticFeedback = [];
        comp.referencedFeedback = [];
        comp.unreferencedFeedback = [];
        addFeedbackAndValidateScore(comp, 0, 0);
        addFeedbackAndValidateScore(comp, -1, 0);
        addFeedbackAndValidateScore(comp, 1, 0);
        addFeedbackAndValidateScore(comp, 5, 50);
        addFeedbackAndValidateScore(comp, 5, 100);
        addFeedbackAndValidateScore(comp, 5, 100);
        flush();
    }));

    it('should calculate score for result of submission', fakeAsync(() => {
        // When score is undefined
        result.score = undefined;
        comp.ngOnInit();
        tick(100);

        // Should calculate the score
        expect(comp.submission?.results?.[0].score).not.toBe(undefined);
    }));

    it('should save and submit manual result', fakeAsync(() => {
        comp.ngOnInit();
        tick(100);
        comp.automaticFeedback = [{ type: FeedbackType.AUTOMATIC, text: 'testCase1', detailText: 'testCase1 failed', credits: 0 }];
        comp.referencedFeedback = [{ type: FeedbackType.MANUAL, text: 'manual feedback', detailText: 'manual feedback for a file:1', credits: 2, reference: 'file:1_line:1' }];
        comp.unreferencedFeedback = [{ type: FeedbackType.MANUAL_UNREFERENCED, detailText: 'unreferenced feedback', credits: 1 }];
        comp.validateFeedback();
        comp.save();
        const alertElement = debugElement.queryAll(By.css('jhi-alert'));

        expect(comp.manualResult?.feedbacks?.length).toBe(3);
        expect(comp.manualResult?.feedbacks!.some((feedback) => feedback.type === FeedbackType.AUTOMATIC)).toBe(true);
        expect(comp.manualResult?.feedbacks!.some((feedback) => feedback.type === FeedbackType.MANUAL)).toBe(true);
        expect(comp.manualResult?.feedbacks!.some((feedback) => feedback.type === FeedbackType.MANUAL_UNREFERENCED)).toBe(true);
        expect(alertElement).not.toBe(null);

        // Reset feedbacks
        comp.manualResult!.feedbacks! = [];
        comp.validateFeedback();
        comp.submit();
        const alertElementSubmit = debugElement.queryAll(By.css('jhi-alert'));

        expect(comp.manualResult?.feedbacks?.length).toBe(3);
        expect(comp.manualResult?.feedbacks!.some((feedback) => feedback.type === FeedbackType.AUTOMATIC)).toBe(true);
        expect(comp.manualResult?.feedbacks!.some((feedback) => feedback.type === FeedbackType.MANUAL)).toBe(true);
        expect(comp.manualResult?.feedbacks!.some((feedback) => feedback.type === FeedbackType.MANUAL_UNREFERENCED)).toBe(true);
        expect(alertElementSubmit).not.toBe(null);
        flush();
    }));

    it('should cancel the assessment and navigate back', fakeAsync(() => {
        comp.ngOnInit();
        tick(100);
        const navigateBackStub = jest.spyOn(comp, 'navigateBack');
        const cancelBackStub = jest.spyOn(programmingAssessmentManualResultService, 'cancelAssessment').mockReturnValue(of(undefined));
        global.confirm = () => true;
        const confirmSpy = jest.spyOn(window, 'confirm');
        comp.cancel();

        expect(confirmSpy).toHaveBeenCalledTimes(1);
        tick(100);
        expect(comp.cancelBusy).toBe(false);
        expect(navigateBackStub).toHaveBeenCalledTimes(1);
        expect(cancelBackStub).toHaveBeenCalledTimes(1);
        flush();
    }));

    it('should go to next submission', fakeAsync(() => {
        const routerStub = jest.spyOn(router, 'navigate');

        comp.ngOnInit();
        const courseId = 123;
        comp.courseId = courseId;
        comp.exerciseId = exercise.id!;
        tick(100);
        comp.nextSubmission();

        const url = [
            '/course-management',
            courseId!.toString(),
            'programming-exercises',
            exercise.id!.toString(),
            'submissions',
            unassessedSubmission.id!.toString(),
            'assessment',
        ];
        const queryParams = { queryParams: { 'correction-round': 0 } };
        expect(getProgrammingSubmissionForExerciseWithoutAssessmentStub).toHaveBeenCalledTimes(1);
        expect(routerStub).toHaveBeenCalledWith(url, queryParams);
        flush();
    }));

    it('should highlight lines that were changed', fakeAsync(() => {
        // Stub
        const getFilesWithContentStub = jest.spyOn(repositoryFileService, 'getFilesWithContent');
        getFilesWithContentStub.mockReturnValue(of(templateFileSessionReturn));
        // Stub for ace editor
        const getFileStub = jest.spyOn(repositoryFileService, 'getFile');
        getFileStub.mockReturnValue(of({ fileContent: 'new file text' }));

        // Data for file browser
        const treeItems = [
            new TreeviewItem({
                internalDisabled: false,
                internalChecked: false,
                internalCollapsed: false,
                text: 'folder/file1',
                value: 'file1',
            } as any),
        ];

        const repositoryFiles = {
            folder: FileType.FOLDER,
            'folder/file1': FileType.FILE,
        };

        // Initialize component and children
        fixture.detectChanges();
        // wait until data is loaded from CodeEditorTutorAssessmentContainer
        tick(100);
        fixture.detectChanges();

        // Setup tree for file browser
        const codeEditorFileBrowserComp = fixture.debugElement.query(By.directive(CodeEditorFileBrowserComponent)).componentInstance;
        codeEditorFileBrowserComp.filesTreeViewItem = treeItems;
        codeEditorFileBrowserComp.repositoryFiles = repositoryFiles;
        codeEditorFileBrowserComp.selectedFile = 'folder/file1';
        fixture.detectChanges();
        codeEditorFileBrowserComp.isLoadingFiles = false;
        fixture.detectChanges();
        const browserComponent = fixture.debugElement.query(By.directive(CodeEditorFileBrowserComponent)).componentInstance;
        expect(browserComponent).not.toBe(undefined);
        expect(browserComponent.filesTreeViewItem).toHaveLength(1);

        const codeEditorAceComp = fixture.debugElement.query(By.directive(CodeEditorAceComponent)).componentInstance;
        codeEditorAceComp.isLoading = false;
        fixture.detectChanges();

        expect(codeEditorAceComp.markerIds).toHaveLength(1);

        getFilesWithContentStub.mockRestore();
        getFileStub.mockRestore();
        fixture.destroy();
        flush();
    }));

    it('should update assessment after complaint', fakeAsync(() => {
        comp.ngOnInit();
        tick(100);
        comp.onUpdateAssessmentAfterComplaint(new ComplaintResponse());
        expect(updateAfterComplaintStub).toHaveBeenCalledTimes(1);
        expect(comp.manualResult!.score).toBe(100);
        flush();
    }));
});


text:
@interface GDIPageIndicator()
- (void)initialize;
@end

@implementation GDIPageIndicator
@synthesize totalPages, selectedIndex;
@synthesize dotSpacing;
@synthesize normalDotImage, selectedDotImage;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self initialize];
    }
    return self;
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self) {
        [self initialize];
    }
    return self;
}

- (void)initialize
{
    totalPages = 0;
    selectedIndex = 0;
    dotSpacing = 1.f;
}

- (void)setTotalPages:(NSUInteger)pages
{
    totalPages = pages;
    [self setNeedsDisplay];
}

- (void)setSelectedIndex:(NSUInteger)index
{
    selectedIndex = index;
    [self setNeedsDisplay];
}

- (void)setSelectedDotImage:(UIImage *)image
{
    selectedDotImage = image;
    [self setNeedsDisplay];
}

- (void)setNormalDotImage:(UIImage *)image
{
    normalDotImage = image;
    [self setNeedsDisplay];
}

- (void)setFrame:(CGRect)frame
{
    [super setFrame:frame];
    [self setNeedsDisplay];
}

- (void)drawRect:(CGRect)rect
{
    if (!normalDotImage || !selectedDotImage || totalPages == 0) {
        return;
    }

    CGFloat totalWidth = normalDotImage.size.width * totalPages + ((totalPages-1) * dotSpacing);
    CGFloat startX = roundf(rect.size.width * .5 - totalWidth * .5);

    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextScaleCTM(context, 1, -1);
    CGContextTranslateCTM(context, 0, -rect.size.height);

    // draw all teh dots
    UIImage *image;
    CGSize imageSize;
    CGFloat dx = startX;
    CGFloat dy;
    for (int i=0; i < totalPages; i++) {

        if (i == selectedIndex) {
            image = selectedDotImage;
        }
        else {
            image = normalDotImage;
        }

        imageSize = image.size;
        dy = roundf(rect.size.height * .5 - imageSize.height * .5);

        CGContextDrawImage(context, CGRectMake(dx, dy, imageSize.width, imageSize.height), [image CGImage]);

        dx += imageSize.width + dotSpacing;
    }
}

@end


text:
define([
    'other-lib/underscore/lodash.min',
    'dijit/layout/TabContainer',
    'dijit/layout/ContentPane',
    'dijit/Tooltip',
    'dijit/layout/BorderContainer',
    'widgets/views/viewmanager',
    'dojo/domReady!'
], function (_, TabContainer, ContentPane, Tooltip, BorderContainer, vm) {
    'use strict';

    var view = function (id, title) {
        this._parent = null;
        this._tabDragable = true;	// Default : true
        this.contentPane = null;
        this._viewContainer = null;
        this.id = id;
        if (id && title) {
            this.contentPane = new ContentPane({
                id : id,
                title: title,
                closable: false,
                style: 'width:100%; height:100%; padding: 0; border: 1px solid #dadfe4 !important'
            });
        } else {
            console.log('id or title is null');
        }
        vm.addView(this);
    };

    view.prototype = {
        get : function (propName) {
            if (propName === 'title') {
                return this.contentPane.get('title');
            } else if (propName === 'closable') {
                return this.contentPane.get('closable');
            } else if (propName === 'tooltip') {
                return this.contentPane.get('tooltip');
            } else if (propName === 'content') {
                return this.contentPane.get('content').childNodes[0];
            } else if (propName === 'iconClass') {
                return this.contentPane.get('iconClass');
            }
        },

        set : function (propName, value) {
            if (propName === 'title') {
                this.contentPane.set('title', value);
            } else if (propName === 'closable') {
                this.contentPane.set('closable', value);
            } else if (propName === 'tooltip') {
                this.contentPane.set('tooltip', value);
            } /*else if (propName === 'content') {
                if (value) {
                    //this.contentPane.get('closable').childNodes[0].append(value);
                } else {
                    //this.contentPane.get('closable').childNodes[0].append(value);
                }
            } */ else if (propName === 'iconClass', value) {
                this.contentPane.set('iconClass', value);
            }
        },

        getIconClass : function () {
            return this.contentPane.iconClass;
        },

        setIconClass: function (iconClass) {
            this.contentPane.set('iconClass', iconClass);
        },

        getTopContainer : function () {
            return this.contentPane;
        },

        getId : function () {
            return this.id;
        },

        getParent : function () {
            return this._parent;
        },

        setParent : function (parent) {
            this._parent = parent;
        },

        getViewContainer : function () {
            //TODO FIXME
            var parent = this.contentPane.getParent();
            if (parent && parent.hasOwnProperty('viewContainerObject')) {
                return parent.viewContainerObject;
            }

            return null;
        },
        // prevent tab move
        setTabDragable : function (boolean) {
            this._tabDragable = boolean;
        },

        getTabDragable : function () {
            return this._tabDragable;
        },

        setTitle : function (title) {
            this.contentPane.set('title', title);
        },

        getTitle : function () {
            return this.contentPane.get('title');
        },

        setTooltip : function (tooltip) {
            this.contentPane.set('tooltip', tooltip);
        },

        getTooltip : function () {
            return this.contentPane.get('tooltip');
        },

        setContent : function (content) {
            this.contentPane.set('content', content);
        },

        getContent : function () {
            return this.contentPane.domNode.childNodes[0];
            //return this.contentPane.get('content');		???
        },

        destroy : function () {
            this.contentPane.destroyRecursive();
            this.contentPane = null;
            vm.removeView(this);
        },

        select : function (forceFireEvent) {
            var parent = this.getParent();
            if (parent) {
                parent.select(this, forceFireEvent);
            }
        },

        isSelected : function () {
            var viewContainer = this.getParent();
            if (viewContainer) {
                var contentPane = viewContainer.tabContainer.get('selectedChildWidget');
                if (contentPane && (contentPane === this.contentPane)) {
                    return true;
                }
            }
            return false;
        },

        emphasizeTitle : function () {
            var parent = this.getParent();
            if (parent) {
                var index = parent.getViewIndex(this);
                if (index >= 0) {
                    var titleNode = this.tabContainer.tablist.containerNode.childNodes[index];
                    if (titleNode) {
                        $(titleNode[3]).addClass('emphadize-view-title');
                    }
                }
            }
        },

        resetViewTitle : function () {
            var parent = this.getParent();
            if (parent) {
                var index = parent.getViewIndex(this);
                if (index >= 0) {
                    var titleNode = this.tabContainer.tablist.containerNode.childNodes[index];
                    if (titleNode) {
                        $(titleNode[3]).removeClass('emphadize-view-title');
                    }
                }
            }
        },

    };

    return view;
});


text:
import java.util.TimerTask;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author yzhang
 */
public class GameInterrupter extends TimerTask {

    @Override
    public void run() {

        if (GameStopper.GAME_ON) {
            this.generatePopupWindow();
        }

    }

    private void generatePopupWindow() {

        JFrame myFrame = new JFrame();

        JOptionPane.showMessageDialog(myFrame, "Stop playing games man!",
                "GameStopper", JOptionPane.INFORMATION_MESSAGE);

        myFrame.setAlwaysOnTop(true);

    }

}


text:
package me.yokeyword.sample.demo_wechat.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by YoKeyword on 16/2/1.
 */
public class Article implements Parcelable{
    private String title;
    private String content;
    private int imgRes;

    public Article(String title, String content) {
        this.title = title;
        this.content = content;
    }

    public Article(String title, int imgRes) {
        this.title = title;
        this.imgRes = imgRes;
    }

    protected Article(Parcel in) {
        title = in.readString();
        content = in.readString();
        imgRes = in.readInt();
    }

    public static final Creator<Article> CREATOR = new Creator<Article>() {
        @Override
        public Article createFromParcel(Parcel in) {
            return new Article(in);
        }

        @Override
        public Article[] newArray(int size) {
            return new Article[size];
        }
    };

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getImgRes() {
        return imgRes;
    }

    public void setImgRes(int imgRes) {
        this.imgRes = imgRes;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(title);
        dest.writeString(content);
        dest.writeInt(imgRes);
    }
}


text:
FindPatch
---------

The module defines the following variables:

``Patch_EXECUTABLE``
  Path to patch command-line executable.
``Patch_FOUND``
  True if the patch command-line executable was found.

The following :prop_tgt:`IMPORTED` targets are also defined:

``Patch::patch``
  The command-line executable.

Example usage:

.. code-block:: cmake

   find_package(Patch)
   if(Patch_FOUND)
     message("Patch found: ${Patch_EXECUTABLE}")
   endif()
#]=======================================================================]

set(_doc "Patch command line executable")
set(_patch_path )

if(CMAKE_HOST_WIN32)
    set(_patch_path
        "$ENV{LOCALAPPDATA}/Programs/Git/bin"
        "$ENV{LOCALAPPDATA}/Programs/Git/usr/bin"
        "$ENV{APPDATA}/Programs/Git/bin"
        "$ENV{APPDATA}/Programs/Git/usr/bin"
        )
endif()

# First search the PATH
find_program(Patch_EXECUTABLE
    NAME patch
    PATHS ${_patch_path}
    DOC ${_doc}
    )

if(CMAKE_HOST_WIN32)
    # Now look for installations in Git/ directories under typical installation
    # prefixes on Windows.
    find_program(Patch_EXECUTABLE
        NAMES patch
        PATH_SUFFIXES Git/usr/bin Git/bin GnuWin32/bin
        DOC ${_doc}
        )
endif()

if(Patch_EXECUTABLE AND NOT TARGET Patch::patch)
    add_executable(Patch::patch IMPORTED)
    set_property(TARGET Patch::patch PROPERTY IMPORTED_LOCATION ${Patch_EXECUTABLE})
endif()

unset(_patch_path)
unset(_doc)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Patch
                                  REQUIRED_VARS Patch_EXECUTABLE)


text:
module Finite

  # The transition class. Represents a transition between two states
  class Transition

    attr_reader :to, :from, :condition

    # Create a new transition object
    #
    # @param opts [Hash] the options for a transition. Include :to, :from, and :if
    def initialize(opts)
      @from = opts[:from]
      @to = opts[:to]
      @condition = opts[:if]
    end

    # Does this transition equal another transition?
    #
    # @param other [Transition] another transition
    # @return true if they are equal false if not
    def ==(other)
      from == other.from and to == other.to and condition == other.condition
    end
  end
end


text:
@implementation NSDictionary (ATLogExtension)

- (NSString *)descriptionWithLocale:(id)locale
{
    NSMutableString *str = [NSMutableString string];

    [str appendString:@"{\n"];

    // for-in all key-value
    [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
        [str appendFormat:@"\t%@ = %@,\n", key, obj];
    }];

    [str appendString:@"}"];

    // range of the last ','
    NSRange range = [str rangeOfString:@"," options:NSBackwardsSearch];
    if (range.length) {
        // remove the last ','
        [str deleteCharactersInRange:range];
    }

    return str;
}
@end

// ==================== [ array ] ==================== //
@implementation NSArray (ATLogExtension)
- (NSString *)descriptionWithLocale:(id)locale
{
    NSMutableString *str = [NSMutableString string];

    [str appendString:@"[\n"];

    // for-in all objects
    [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        [str appendFormat:@"%@,\n", obj];
    }];

    [str appendString:@"]"];

    // range of the last ','
    NSRange range = [str rangeOfString:@"," options:NSBackwardsSearch];
    if (range.length) {
        // remove the last ','
        [str deleteCharactersInRange:range];
    }

    return str;
}
@end