text:
using CodeCracker.CSharp.Maintainability;
using Microsoft.CodeAnalysis;
using System.Threading.Tasks;
using Xunit;

namespace CodeCracker.Test.CSharp.Maintainability
{
    public class XmlDocumentationAnalyzerTests : CodeFixVerifier<XmlDocumentationAnalyzer, XmlDocumentationRemoveNonExistentParametersCodeFixProvider>
    {
        [Fact]
        public async Task IgnoresClassDocs()
        {
            const string source = @"
namespace ConsoleApplication1
{
    ///
    ///
    ///
    class TypeName
    {
    }
}";
            await VerifyCSharpHasNoDiagnosticsAsync(source);
        }

        [Fact]
        public async Task XmlDocumentationInsideMethodWithAttributeDoesNotCreateDiagnostic()
        {
            var source = @"
///
///
/// <param name=""value"" ></param>
/// <returns></returns>
[System.Runtime.CompilerServices.MethodImpl]
public int Foo(int value)
{
    ///
    var a = 1;
}".WrapInCSharpClass();
            await VerifyCSharpHasNoDiagnosticsAsync(source);
        }

        [Fact]
        public async Task XmlDocumentationWithInheritDocNotCreateDiagnostic()
        {
            var source = @"
interface IBar
{
    ///
    /// Lololol
    ///
    /// <param name=""a""></param>
    /// <param name=""b""></param>
    void foo(int a, int b);
}

class Bar : IBar
{
    /// <inheritdoc/>
    public void foo(int a, int b) { }
}

class Bar2 : IBar
{
    /// <inheritdoc/>
    /// <remarks>
    /// You can still specify all the normal XML tags here, and they will
    /// overwrite inherited ones accordingly.
    /// </remarks>
    public void foo(int a, int b) { }
}".WrapInCSharpClass();
            await VerifyCSharpHasNoDiagnosticsAsync(source);
        }

        [Fact]
        public async Task XmlDocumentationInsideMethodDoesNotCreateDiagnostic()
        {
            var source = @"
///
///
/// <param name=""value"" ></param>
/// <returns></returns>
public int Foo(int value)
{
    ///
    var a = 1;
}".WrapInCSharpClass();
            await VerifyCSharpHasNoDiagnosticsAsync(source);
        }

        [Fact]
        public async Task XmlDocumentationWithNonexistentParameterOfMethodAnalyzerCreateDiagnostic()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""analyzer"">The analyzer to run on the documents</param>
            /// <param name=""documents"">The Documents that the analyzer will be run on</param>
            /// <param name=""spans"">Optional TextSpan indicating where a Diagnostic will be found</param>
            /// <returns>An IEnumerable of Diagnostics that surfaced in teh source code, sorted by Location</returns>
            [System.Runtime.CompilerServices.MethodImpl]
            protected async static Task<Diagnostic[]> GetSortedDiagnosticsFromDocumentsAsync(DiagnosticAnalyzer analyzer, Document[] documents)
            {
            }
        }
    }";

            var expected = new DiagnosticResult
            {
                Id = DiagnosticId.XmlDocumentation.ToDiagnosticId(),
                Message = "You have missing/unexistent parameters in Xml Docs",
                Severity = DiagnosticSeverity.Warning,
                Locations = new[] { new DiagnosticResultLocation("Test0.cs", 6, 16) }
            };

            await VerifyCSharpDiagnosticAsync(source, expected);
        }

        [Fact]
        public async Task XmlDocumentationWithMissingParametersFromMethodAnalyzerCreateDiagnostic()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""sources"">Classes in the form of strings</param>
            /// <param name=""language"">The language the source code is in</param>
            /// <returns>A Project created out of the Douments created from the source strings</returns>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            var expected = new DiagnosticResult
            {
                Id = DiagnosticId.XmlDocumentation.ToDiagnosticId(),
                Message = "You have missing/unexistent parameters in Xml Docs",
                Severity = DiagnosticSeverity.Warning,
                Locations = new[] { new DiagnosticResultLocation("Test0.cs", 6, 16) }
            };

            await VerifyCSharpDiagnosticAsync(source, expected);
        }

        [Fact]
        public async Task XmlDocumentationWithMatchingParametersFromMethodAnalyzerDoesNotCreateDiagnostic()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""value"" ></param>
            /// <returns></returns>
            public int Foo(int value)
            {
            }
    }
    }";

            await VerifyCSharpHasNoDiagnosticsAsync(source);
        }

        [Fact]
        public async Task MethodWithoutXmlDocumentationAnalyzerDoesNotCreateDiagnostic()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            public int Foo(int value)
            {
            }
    }
    }";

            await VerifyCSharpHasNoDiagnosticsAsync(source);
        }
    }

    public class XmlDocumentationRemoveUnexistentParametersCodeFixTests : CodeFixVerifier<XmlDocumentationAnalyzer, XmlDocumentationRemoveNonExistentParametersCodeFixProvider>
    {
        [Fact]
        public async Task FixRemoveParameterDoc()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""analyzer"">The analyzer to run on the documents</param>
            /// <param name=""documents"">The Documents that the analyzer will be run on</param>
            /// <param name=""spans"">Optional TextSpan indicating where a Diagnostic will be found</param>
            /// <returns>An IEnumerable of Diagnostics that surfaced in teh source code, sorted by Location</returns>
            protected async static Task<Diagnostic[]> GetSortedDiagnosticsFromDocumentsAsync(DiagnosticAnalyzer analyzer, Document[] documents)
            {
            }
        }
    }";

            const string expected = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""analyzer"">The analyzer to run on the documents</param>
            /// <param name=""documents"">The Documents that the analyzer will be run on</param>
            /// <returns>An IEnumerable of Diagnostics that surfaced in teh source code, sorted by Location</returns>
            protected async static Task<Diagnostic[]> GetSortedDiagnosticsFromDocumentsAsync(DiagnosticAnalyzer analyzer, Document[] documents)
            {
            }
        }
    }";
            await VerifyCSharpFixAsync(source, expected);
        }

        [Fact]
        public async Task FixRemoveManyParameterDoc()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""analyzer"">The analyzer to run on the documents</param>
            /// <param name=""anotherToBeRemoved"">Optional TextSpan indicating where a Diagnostic will be found</param>
            /// <param name=""documents"">The Documents that the analyzer will be run on</param>
            /// <param name=""spansToBeRemoved"">Optional TextSpan indicating where a Diagnostic will be found</param>
            /// <returns>An IEnumerable of Diagnostics that surfaced in teh source code, sorted by Location</returns>
            protected async static Task<Diagnostic[]> GetSortedDiagnosticsFromDocumentsAsync(DiagnosticAnalyzer analyzer, Document[] documents)
            {
            }
        }
    }";

            const string expected = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""analyzer"">The analyzer to run on the documents</param>
            /// <param name=""documents"">The Documents that the analyzer will be run on</param>
            /// <returns>An IEnumerable of Diagnostics that surfaced in teh source code, sorted by Location</returns>
            protected async static Task<Diagnostic[]> GetSortedDiagnosticsFromDocumentsAsync(DiagnosticAnalyzer analyzer, Document[] documents)
            {
            }
        }
    }";
            await VerifyCSharpFixAsync(source, expected);
        }

    }

    public class XmlDocumentationCreateMissingParametersCodeFixTests : CodeFixVerifier<XmlDocumentationAnalyzer, XmlDocumentationCreateMissingParametersCodeFixProvider>
    {
        [Fact]
        public async Task FixCreateOneParameterDoc()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""sources"">Classes in the form of strings</param>
            /// <param name=""language"">The language the source code is in</param>
            /// <returns>A Project created out of the Douments created from the source strings</returns>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            const string expected = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""sources"">Classes in the form of strings</param>
            /// <param name=""language"">The language the source code is in</param>
            /// <param name=""workspace"">todo: describe workspace parameter on CreateProject</param>
            /// <returns>A Project created out of the Douments created from the source strings</returns>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            await VerifyCSharpFixAsync(source, expected);
        }

        [Fact]
        public async Task FixCreateManyParameterDoc()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <returns>A Project created out of the Douments created from the source strings</returns>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            const string expected = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""sources"">todo: describe sources parameter on CreateProject</param>
            /// <param name=""workspace"">todo: describe workspace parameter on CreateProject</param>
            /// <param name=""language"">todo: describe language parameter on CreateProject</param>
            /// <returns>A Project created out of the Douments created from the source strings</returns>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            await VerifyCSharpFixAsync(source, expected);
        }

        [Fact]
        public async Task FixCreateManyParameterDocWhenHaveFullDocSyntax()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            /// Some text
            ///
            /// <remarks>Remarks</remarks>
            /// Code sample
            /// <exception cref=""System.ArgumentException""></exception>
            /// <example>Some sample</example>
            /// <returns>A <see cref=""System.Threading.Tasks.Task""/> to you</returns>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            const string expected = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            /// Some text
            ///
            /// <param name=""sources"">todo: describe sources parameter on CreateProject</param>
            /// <param name=""workspace"">todo: describe workspace parameter on CreateProject</param>
            /// <param name=""language"">todo: describe language parameter on CreateProject</param>
            /// <remarks>Remarks</remarks>
            /// Code sample
            /// <exception cref=""System.ArgumentException""></exception>
            /// <example>Some sample</example>
            /// <returns>A <see cref=""System.Threading.Tasks.Task""/> to you</returns>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            await VerifyCSharpFixAsync(source, expected);
        }

        [Fact]
        public async Task FixCreateManyParameterDocWhenHaveOnlySummary()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            const string expected = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            ///
            ///
            ///
            /// <param name=""sources"">todo: describe sources parameter on CreateProject</param>
            /// <param name=""workspace"">todo: describe workspace parameter on CreateProject</param>
            /// <param name=""language"">todo: describe language parameter on CreateProject</param>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            await VerifyCSharpFixAsync(source, expected);
        }

        [Fact]
        public async Task FixCreateManyParameterDocWhenHaveOnlyReturns()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            /// <returns>A Project created out of the Douments created from the source strings</returns>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            const string expected = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            /// <param name=""sources"">todo: describe sources parameter on CreateProject</param>
            /// <param name=""workspace"">todo: describe workspace parameter on CreateProject</param>
            /// <param name=""language"">todo: describe language parameter on CreateProject</param>
            /// <returns>A Project created out of the Douments created from the source strings</returns>
            public static Project CreateProject(string[] sources, out AdhocWorkspace workspace, string language = LanguageNames.CSharp)
            {
            }
        }
    }";

            await VerifyCSharpFixAsync(source, expected);
        }

        [Fact]
        public async Task FixCreateManyParameterDocWhenHaveOnlyRemarks()
        {
            const string source = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            /// <remarks>
            /// Todo: Remove/Update when https://github.com/dotnet/roslyn/issues/2580 is completed and there is
            /// an api to check for analyzer exceptions
            /// </remarks>
            private static void CheckIfAnalyzerThrew(ImmutableArray<Diagnostic> diags)
            {
            }
        }
    }";

            const string expected = @"
    namespace ConsoleApplication1
    {
        class TypeName
        {
            /// <param name=""diags"">todo: describe diags parameter on CheckIfAnalyzerThrew</param>
            /// <remarks>
            /// Todo: Remove/Update when https://github.com/dotnet/roslyn/issues/2580 is completed and there is
            /// an api to check for analyzer exceptions
            /// </remarks>
            private static void CheckIfAnalyzerThrew(ImmutableArray<Diagnostic> diags)
            {
            }
        }
    }";

            await VerifyCSharpFixAsync(source, expected);
        }

    }
}


text:
import { DictItem } from '@/app-config/dicts'

export type WebsterlearnerConfig = DictItem<{
  defs: boolean
  phrase: boolean
  derived: boolean
  arts: boolean
  related: boolean
}>

export default (): WebsterlearnerConfig => ({
  lang: '10000000',
  selectionLang: {
    english: true,
    chinese: false,
    japanese: false,
    korean: false,
    french: false,
    spanish: false,
    deutsch: false,
    others: false,
    matchAll: false
  },
  defaultUnfold: {
    english: true,
    chinese: true,
    japanese: true,
    korean: true,
    french: true,
    spanish: true,
    deutsch: true,
    others: true,
    matchAll: false
  },
  preferredHeight: 265,
  selectionWC: {
    min: 1,
    max: 5
  },
  options: {
    defs: true,
    phrase: true,
    derived: true,
    arts: true,
    related: true
  }
})

redpajama_set_name: RedPajamaGithub


text:
import React from "react";
import PropTypes from "prop-types";
import api from "api.io/api.io-client";
import LightComponent from "ui-lib/light_component";
import {
    Section as TASection,
    MenuItem
} from "ui-components/type_admin";
import { BaselineSpecificationView } from "ui-components/data_view";

class Item extends LightComponent {
    async onForceRequest() {
        const response = await api.rest.action(
            "baselinegen.specification",
            this.props.item._id,
            "request"
        );

        console.log("onForceRequest: ", response);
    }

    render() {
        this.log("render", this.props, this.state);

        const menuItems = this.props.menuItems.slice(0);

        menuItems.push((
            <MenuItem
                key="force"
                caption="Force request"
                onClick={() => this.onForceRequest()}
            />
        ));

        return (
            <TASection
                controls={this.props.controls}
                breadcrumbs={this.props.breadcrumbs}
                menuItems={menuItems}
            >
                <div className={this.props.theme.container}>
                    <BaselineSpecificationView
                        item={this.props.item}
                    />
                </div>
            </TASection>
        );
    }
}

Item.propTypes = {
    theme: PropTypes.object,
    item: PropTypes.object.isRequired,
    pathname: PropTypes.string.isRequired,
    breadcrumbs: PropTypes.array.isRequired,
    menuItems: PropTypes.array.isRequired,
    controls: PropTypes.array.isRequired
};

export default Item;


text:
import selectors from '../selectors'; // eslint-disable-line no-unused-vars

import Presenter from './presenter';

export default class SearchView {
  constructor(usecases, commonApi) {
    this.commonApi = commonApi;
    this.presenter = new Presenter(usecases);

    this.search = this.search.bind(this);
    this.mostRecent = this.mostRecent.bind(this);
  }
  search(req, res) {
    const self = this;
    this.presenter.onSearch(
      selectors.req.searchQuery(req),
      selectors.req.skip(req),
      selectors.req.user.id(req))
    .then(
      (results) => {
        self.commonApi.json(res, {
          success: true,
          found: results,
        });
      },
      (error) => {
        self.commonApi.internalServerError(res, error);
      });
  }
  mostRecent(req, res) {
    const self = this;
    this.presenter.onMostRecent(
      selectors.req.user.id(req),
      selectors.req.dateFrom(req))
    .then(
      (results) => {
        self.commonApi.json(res, {
          success: true,
          found: results,
        });
      },
      (error) => {
        self.commonApi.internalServerError(res, error);
      });
  }
}


text:
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Demo No Zone</title>
    <base href="/" />

    <meta name="viewport" content="width=device-width, initial-scale=1" />
  </head>
  <body>
    <app-root></app-root>

    <script src="./angular/packages/zone.js/bundles/zone.umd.js"></script>
    <script type="module" src="./bundle/main.js"></script>
  </body>
</html>


text:
import { Component } from '@angular/core'

@Component({
  selector: 'sp-doc',
  styles: [
    `
      :host {
        display: block;
        width: 100%;
        margin: 50px 0;
      }
      h4 {
        margin: 20px 0;
      }
      .sel {
        font-size: 16px;
        color: #adadad;
      }
      tr > th {
        color: #adadad;
      }
      tr > th:first-child,
      .selContent {
        font-weight: bold;
        color: #ffc421;
      }
      tr > td:first-child {
        font-weight: bold;
      }
    `,
  ],
  templateUrl: './documentation.component.html',
})
export class DocumentationComponent {
  readonly splitDoc = {
    inputs: [
      {
        name: 'dir',
        type: 'string',
        default: '"ltr"',
        details:
          'Indicates the directionality of the areas: "ltr" (left to right) or "rtl" (right to left).',
      },
      {
        name: 'direction',
        type: 'string',
        default: '"horizontal"',
        details: 'Select split direction: "horizontal" or "vertical".',
      },
      {
        name: 'disabled',
        type: 'boolean',
        default: 'false',
        details:
          'Disable the dragging feature (remove cursor/image on gutters). (gutterClick)/(gutterDblClick) still emits.',
      },
      {
        name: 'gutterDblClickDuration',
        type: 'number',
        default: '0',
        details: `Milliseconds to detect a double click on a gutter. Set it around 300-500ms if you want to use <code>(gutterDblClick)</code> event.`,
      },
      {
        name: 'gutterSize',
        type: 'number',
        default: '11',
        details: `Gutters's size (dragging elements) in pixels.`,
      },
      {
        name: 'gutterStep',
        type: 'number',
        default: '1',
        details: `Gutter step while moving in pixels.`,
      },
      {
        name: 'restrictMove',
        type: 'boolean',
        default: 'false',
        details: 'Set to true if you want to limit gutter move to adjacent areas only.',
      },
      {
        name: 'unit',
        type: 'string',
        default: '"percent"',
        details: `Selected unit you want to use: <code>"percent"</code> or <code>"pixel"</code> to specify area sizes.`,
      },
      {
        name: 'useTransition',
        type: 'boolean',
        default: 'false',
        details:
          'Add transition when toggling visibility using [visible] or [size] changes.
Warning: Transitions are not working for IE/Edge/Safari',
      },
    ],
    outputs: [
      {
        name: 'dragEnd',
        value: '{gutterNum: number, sizes: Array<number>}',
        details: 'Emit when drag ends.',
      },
      {
        name: 'dragStart',
        value: '{gutterNum: number, sizes: Array<number>}',
        details: 'Emit when drag starts.',
      },
      {
        name: 'gutterDblClick',
        value: '{gutterNum: number, sizes: Array<number>}',
        details: 'Emit when user double clicks on a gutter. See [gutterDblClickDuration] input.',
      },
      {
        name: 'gutterClick',
        value: '{gutterNum: number, sizes: Array<number>}',
        details: 'Emit when user clicks on a gutter. See [gutterDblClickDuration] input.',
      },
      {
        name: 'transitionEnd',
        value: 'Array<number>',
        details:
          'Emit when transition ends (could be triggered from [visible] or [size] changes).
Only if [useTransition]="true".
Warning: Transitions are not working for IE/Edge/Safari',
      },
    ],
    class: [
      {
        name: 'dragProgress$',
        type: 'Observable<{gutterNum: number, sizes: Array<number>}>',
        details: `Emit when dragging. Replace old (dragProgress) template event for better flexibility about change detection mechanism.
Warning: Running outside zone by design, if you need to notify angular add this.splitEl.dragProgress$.subscribe(x => this.ngZone.run(() => this.x = x));`,
      },
      {
        name: 'getVisibleAreaSizes()',
        type: '() => Array<number>',
        details: 'Get all visible area sizes.',
      },
      {
        name: 'setVisibleAreaSizes()',
        type: '(Array<number>) => boolean',
        details:
          'Set all visible area sizes in one go, return a boolean to know if input values were correct. Useful when combined with dragProgress$ to sync multiple splits.',
      },
    ],
  }

  readonly splitAreaDoc = {
    inputs: [
      {
        name: 'lockSize',
        type: 'boolean',
        default: 'false',
        details: `Lock area size, same as <code>minSize</code> = <code>maxSize</code> = <code>size</code>.<br><u>Not working when <code>[size]="'*'"</code></u>`,
      },
      {
        name: 'maxSize',
        type: 'number',
        default: 'null',
        details: `Maximum pixel or percent size, should be equal to or larger than provided <code>[size]</code>.<br><u>Not working when <code>[size]="'*'"</code></u>`,
      },
      {
        name: 'minSize',
        type: 'number',
        default: 'null',
        details: `Minimum pixel or percent size, should be equal to or smaller than provided <code>[size]</code>.<br><u>Not working when <code>[size]="'*'"</code></u>`,
      },
      {
        name: 'order',
        type: 'number',
        default: 'null',
        details: `Order of the area. Used to maintain the order of areas when toggling their visibility. Toggling area visibility without specifying an <code>order</code> leads to weird behavior`,
      },
      {
        name: 'size',
        type: `number|'*'`,
        default: '-',
        details: `Size of the area in selected unit (percent/pixel).
Percent mode: All areas sizes should equal to 100, If not, all areas will have the same size.
Pixel mode: An area with  wildcard size ([size]="'*'") is mandatory (only one) and can't have [visible]="false" or minSize/maxSize/lockSize properties.`,
      },
      {
        name: 'visible',
        type: 'boolean',
        default: 'true',
        details: `Hide area visually but still present in the DOM, use <code>ngIf</code> to completely remove it.<br><u>Not working when <code>[size]="'*'"</code></u>`,
      },
    ],
  }

  readonly cssClasses = {
    split: [
      { name: 'ui-init', details: 'Added after component initialization.' },
      {
        name: 'ui-horizontal / ui-vertical',
        details: 'Depends on <ui-split [direction]="x">.',
      },
      {
        name: 'ui-disabled',
        details: 'Added when <ui-split [disabled]="true">.',
      },
      {
        name: 'ui-transition',
        details: 'Added when <ui-split [useTransition]="true">.',
      },
      { name: 'ui-dragging', details: 'Added while a gutter is dragged.' },
    ],
    area: [
      { name: 'ui-split-area', details: 'Added on all areas.' },
      {
        name: 'ui-hidden',
        details: 'Added when <ui-split-area [visible]="false">.',
      },
    ],
    gutter: [
      { name: 'ui-split-gutter', details: 'Added on all gutters.' },
      { name: 'ui-dragged', details: 'Added on gutter while dragged.' },
    ],
  }
}


text:
package org.datanucleus.store.cassandra;

import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.types.FileSet;
import org.datanucleus.util.Localiser;

/**
 * SchemaTool Ant Task. Accepts the following parameters
 *

 *
mode Mode of operation ("create", "delete", "validate", "dbinfo", "schemainfo").

 *
verbose Verbose output.

 *
props Name of a properties file for use in SchemaTool (PMF properties)

 *
ddlFile Name of a file to output the DDL into

 *
completeDdl Whether to output complete DDL (otherwise just the missing tables/constraints)

 *
persistenceUnit Name of a persistence-unit to manage the schema for

 *

 */
public class SchemaToolTask extends Java
{
    /** Localiser for messages. */
    private static final Localiser LOCALISER = Localiser.getInstance(
        "org.datanucleus.store.cassandra.Localisation", CassandraStoreManager.class.getClassLoader());

    /** Operating mode */
    private int runMode = SchemaTool.SCHEMATOOL_CREATE_MODE;

    /** Filesets of files (mapping or class) to be used in generating the schema. */
    List<FileSet> filesets = new ArrayList<FileSet>();

    /**
     * Constructor.
     */
    public SchemaToolTask()
    {
        setClassname("org.datanucleus.store.cassandra.SchemaTool");
        setFork(true); // Default to fork=true
    }

    /**
     * Execute method, to execute the task.
     * @throws BuildException if any error happens while running the task
     **/
    public void execute()
    throws BuildException
    {
        if (runMode == SchemaTool.SCHEMATOOL_CREATE_MODE)
        {
            createArg().setValue("-create");
        }
        else if (runMode == SchemaTool.SCHEMATOOL_DELETE_MODE)
        {
            createArg().setValue("-delete");
        }
        else if (runMode == SchemaTool.SCHEMATOOL_VALIDATE_MODE)
        {
            createArg().setValue("-validate");
        }
        else if (runMode == SchemaTool.SCHEMATOOL_DATABASE_INFO_MODE)
        {
            createArg().setValue("-dbinfo");
        }
        else if (runMode == SchemaTool.SCHEMATOOL_SCHEMA_INFO_MODE)
        {
            createArg().setValue("-schemainfo");
        }

        File[] files = getFiles();
        for (int i=0; i<files.length; i++)
        {
            createArg().setFile(files[i]);
        }

        super.execute();
    }

    /**
     * Add a fileset. @see ant manual
     * @param fs the FileSet
     */
    public void addFileSet(FileSet fs)
    {
        filesets.add(fs);
    }

    protected File[] getFiles()
    {
        List<File> v = new ArrayList<File>();

        Iterator<FileSet> filesetIter = filesets.iterator();
        while (filesetIter.hasNext())
        {
            FileSet fs = filesetIter.next();
            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
            ds.scan();
            String[] f = ds.getIncludedFiles();
            for (int j = 0; j < f.length; j++)
            {
                String pathname = f[j];
                File file = new File(ds.getBasedir(), pathname);
                file = getProject().resolveFile(file.getPath());
                v.add(file);
            }
        }

        return v.toArray(new File[v.size()]);
    }

    /**
     * set verbose
     * @param verbose Whether to give verbose output
     */
    public void setVerbose(boolean verbose)
    {
        if (verbose)
        {
            createArg().setValue("-v");
            log("SchemaTool verbose: " + verbose, Project.MSG_VERBOSE);
        }
    }

    /**
     * Get persistence properties from a file
     * @param propsFileName Name of props file
     */
    public void setProps(String propsFileName)
    {
        if (propsFileName != null && propsFileName.length() > 0)
        {
            createArg().setLine("-props " + propsFileName);
            log("SchemaTool props: " + propsFileName, Project.MSG_VERBOSE);
        }
    }

    /**
     * Set the file to output DDL to
     * @param file Name of DDL file
     */
    public void setDdlFile(String file)
    {
        if (file != null && file.length() > 0)
        {
            createArg().setLine("-ddlFile " + file);
            log("SchemaTool ddlFile: " + file, Project.MSG_VERBOSE);
        }
    }

    /**
     * Mutator for whether to output complete DDL.
     * @param complete Whether to give complete DDL
     */
    public void setCompleteDdl(boolean complete)
    {
        if (complete)
        {
            createArg().setValue("-completeDdl");
            log("SchemaTool completeDdl: " + complete, Project.MSG_VERBOSE);
        }
    }

    /**
     * Set the name of the persistence unit to manage
     * @param unitName Name of persistence-unit
     */
    public void setPersistenceUnit(String unitName)
    {
        if (unitName != null && unitName.length() > 0)
        {
            createArg().setLine("-pu " + unitName);
            log("SchemaTool pu: " + unitName, Project.MSG_VERBOSE);
        }
    }

    /**
     * Set the API Adapter
     * @param api API Adapter
     */
    public void setApi(String api)
    {
        if (api != null && api.length() > 0)
        {
            createArg().setValue("-api");
            createArg().setValue(api);
            log("SchemaTool api: " + api, Project.MSG_VERBOSE);
        }
    }

    /**
     * Sets the mode of operation.
     * @param mode The mode of operation ("create", "delete", "validate", "dbinfo", "schemainfo")
     */
    public void setMode(String mode)
    {
        if (mode == null)
        {
            return;
        }
        if (mode.equalsIgnoreCase("create"))
        {
            this.runMode = SchemaTool.SCHEMATOOL_CREATE_MODE;
        }
        else if (mode.equalsIgnoreCase("delete"))
        {
            this.runMode = SchemaTool.SCHEMATOOL_DELETE_MODE;
        }
        else if (mode.equalsIgnoreCase("validate"))
        {
            this.runMode = SchemaTool.SCHEMATOOL_VALIDATE_MODE;
        }
        else if (mode.equalsIgnoreCase("dbinfo"))
        {
            this.runMode = SchemaTool.SCHEMATOOL_DATABASE_INFO_MODE;
        }
        else if (mode.equalsIgnoreCase("schemainfo"))
        {
            this.runMode = SchemaTool.SCHEMATOOL_SCHEMA_INFO_MODE;
        }
        else
        {
            System.err.println(LOCALISER.msg("014036"));
        }
    }
}


text:
===============

This repo is no longer used or maintained by the intoximeters organization as of 8/9/21, and will be deleted 30 days from now.


text:
<?php
/**
 * Checkout coupon form
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-coupon.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see https://docs.woocommerce.com/document/template-structure/
 * @package WooCommerce/Templates
 * @version 3.4.4
 */

defined( 'ABSPATH' ) || exit;

if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine.
	return;
}

?>

	<?php wc_print_notice( apply_filters( 'woocommerce_checkout_coupon_message', esc_html__( 'Have a coupon?', 'woocommerce' ) . ' ' . esc_html__( 'Click here to enter your code', 'woocommerce' ) . '' ), 'notice' ); ?>

<form class="checkout_coupon woocommerce-form-coupon" method="post" style="display:none">

<?php esc_html_e( 'If you have a coupon code, please apply it below.', 'woocommerce' ); ?>

		<input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" />

		<button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>

</form>


text:
package com.navercorp.pinpoint.rpc.client;

import com.navercorp.pinpoint.common.util.Assert;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Woonduk Kang(emeroad)
 */
public class SocketOption implements Cloneable {

    private static final String CONNECT_TIMEOUT_MILLIS = "connectTimeoutMillis";
    static final int DEFAULT_CONNECT_TIMEOUT = 5000;

    private final int connectTimeout;
    private final boolean tcpNoDelay;
    private final boolean keepAlive;

    private final int sendBufferSize;
    private final int receiveBufferSize;

    private final int writeBufferHighWaterMark ;
    private final int writeBufferLowWaterMark;

    private SocketOption(int connectTimeout, boolean tcpNoDelay, boolean keepAlive, int sendBufferSize, int receiveBufferSize, int writeBufferHighWaterMark, int writeBufferLowWaterMark) {
        this.connectTimeout = connectTimeout;
        this.tcpNoDelay = tcpNoDelay;
        this.keepAlive = keepAlive;
        this.sendBufferSize = sendBufferSize;
        this.receiveBufferSize = receiveBufferSize;
        this.writeBufferHighWaterMark = writeBufferHighWaterMark;
        this.writeBufferLowWaterMark = writeBufferLowWaterMark;
    }

    public int getConnectTimeout() {
        return connectTimeout;
    }

    public boolean isTcpNoDelay() {
        return tcpNoDelay;
    }

    public boolean isKeepAlive() {
        return keepAlive;
    }

    public int getSendBufferSize() {
        return sendBufferSize;
    }

    public int getReceiveBufferSize() {
        return receiveBufferSize;
    }

    public Map<String, Object> toMap() {

        final Map<String, Object> options = new HashMap<String, Object>();
        // connectTimeout
        options.put(CONNECT_TIMEOUT_MILLIS, connectTimeout);
        // read write timeout needed?  isn't it needed because of nio?

        // tcp setting
        options.put("tcpNoDelay", tcpNoDelay);
        options.put("keepAlive", keepAlive);
        // buffer setting
        options.put("sendBufferSize", sendBufferSize);
        options.put("receiveBufferSize", receiveBufferSize);

        options.put("writeBufferHighWaterMark", writeBufferHighWaterMark);
        options.put("writeBufferLowWaterMark", writeBufferLowWaterMark);

        return options;
    }

    public static class Builder {

        private int connectTimeout = DEFAULT_CONNECT_TIMEOUT;
        private boolean tcpNoDelay = true;
        private boolean keepAlive = true;

        private int sendBufferSize = 1024*64;
        private int receiveBufferSize = 1024 * 64;

        private int writeBufferHighWaterMark = 1024 * 1024 * 16;
        private int writeBufferLowWaterMark = 1024 * 1024 * 8;

        public Builder() {
        }

        public int getConnectTimeout() {
            return connectTimeout;
        }

        public void setConnectTimeout(int connectTimeout) {
            if (connectTimeout < 0) {
                throw new IllegalArgumentException("connectTimeout cannot be a negative number");
            }
            this.connectTimeout = connectTimeout;
        }

        public boolean isTcpNoDelay() {
            return tcpNoDelay;
        }

        public void setTcpNoDelay(boolean tcpNoDelay) {
            this.tcpNoDelay = tcpNoDelay;
        }

        public boolean isKeepAlive() {
            return keepAlive;
        }

        public void setKeepAlive(boolean keepAlive) {
            this.keepAlive = keepAlive;
        }

        public int getSendBufferSize() {
            return sendBufferSize;
        }

        public void setSendBufferSize(int sendBufferSize) {
            this.sendBufferSize = sendBufferSize;
        }

        public int getReceiveBufferSize() {
            return receiveBufferSize;
        }

        public void setReceiveBufferSize(int receiveBufferSize) {
            this.receiveBufferSize = receiveBufferSize;
        }

        public int getWriteBufferHighWaterMark() {
            return writeBufferHighWaterMark;
        }

        public void setWriteBufferHighWaterMark(int writeBufferHighWaterMark) {
            Assert.isTrue(writeBufferHighWaterMark > 0, "must be writeBufferHighWaterMark > 0");
            this.writeBufferHighWaterMark = (int) writeBufferHighWaterMark;
        }

        public int getWriteBufferLowWaterMark() {
            return writeBufferLowWaterMark;
        }

        public void setWriteBufferLowWaterMark(int writeBufferLowWaterMark) {
            Assert.isTrue(writeBufferLowWaterMark > 0, "must be writeBufferLowWaterMark > 0");
            this.writeBufferLowWaterMark = (int) writeBufferLowWaterMark;
        }

        public SocketOption build() {
            return new SocketOption(this.connectTimeout, this.tcpNoDelay, this.keepAlive, this.sendBufferSize, this.receiveBufferSize, writeBufferHighWaterMark, writeBufferLowWaterMark);
        }
    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using System.Text;
using UnityEngine;
using MixedRealityToolkit.Utilities.Solvers;
using MixedRealityToolkit.UX.Buttons;
using System.Collections.Generic;

#if UNITY_WSA && UNITY_2017_2_OR_NEWER
using UnityEngine.XR.WSA;
#endif

namespace MixedRealityToolkit.UX.Dialog
{
    /// <summary>
    /// Dialog that approximates the look of a Hololens shell dialog
    /// </summary>
    public class DialogShell : Dialog
    {
        [SerializeField]
        private int maxCharsPerLine = 45;

        [SerializeField]
        private TextMesh titleText;

        [SerializeField]
        private TextMesh messageText;

        [SerializeField]
        private GameObject[] oneButtonSet;

        [SerializeField]
        private GameObject[] twoButtonSet;

        private DialogButton buttonPressed;

        public int MaxCharsPerLine
        {
            get
            {
                return maxCharsPerLine;
            }

            set
            {
                maxCharsPerLine = value;
            }
        }

        protected void OnDrawGizmos()
        {
            if (messageText != null)
            {
                messageText.text = WordWrap(messageText.text, MaxCharsPerLine);
            }
        }

        protected override void FinalizeLayout()
        {
            SolverConstantViewSize solver = GetComponent<SolverConstantViewSize>();

#if UNITY_WSA && UNITY_2017_2_OR_NEWER
            // Optimize the content for immersive headset
            if (HolographicSettings.IsDisplayOpaque)
            {
                solver.TargetViewPercentV = 0.35f;
            }
#else
            solver.TargetViewPercentV = 0.35f;
#endif
        }

        protected override void GenerateButtons()
        {
            //Get List of ButtonTypes that should be created on Dialog
            List<ButtonTypeEnum> buttonTypes = new List<ButtonTypeEnum>();
            foreach (ButtonTypeEnum buttonType in Enum.GetValues(typeof(ButtonTypeEnum)))
            {
                if (buttonType == ButtonTypeEnum.None)
                {
                    continue;
                }

                // If this button type flag is set
                if ((buttonType & result.Buttons) == buttonType)
                {
                    buttonTypes.Add(buttonType);
                }
            }

            oneButtonSet = new GameObject[1];
            twoButtonSet = new GameObject[2];

            //Activate/Deactivate buttons and set Titles
            foreach (Transform child in transform)
            {
                if (child.name == "ButtonParent")
                {
                    for (int childIndex = 0; childIndex < child.transform.childCount; ++childIndex)
                    {
                        Transform t = child.transform.GetChild(childIndex);
                        if (t != null)
                        {
                            DialogButton button = t.GetComponent<DialogButton>();
                            if (button != null)
                            {
                                button.ParentDialog = this;

                                if (button.name.Contains("ButtonOne") )
                                {
                                    button.gameObject.SetActive(buttonTypes.Count == 1);

                                    if (buttonTypes.Count == 1)
                                    {
                                        oneButtonSet[0] = button.gameObject;
                                        button.SetTitle(buttonTypes[0].ToString());
                                        button.ButtonTypeEnum = buttonTypes[0];
                                    }
                                }
                                else if (button.name.Contains("ButtonTwo"))
                                {
                                    button.gameObject.SetActive(buttonTypes.Count > 1);

                                    if (buttonTypes.Count > 1)
                                    {
                                        if (button.name.Contains("A"))
                                        {
                                            twoButtonSet[0] = button.gameObject;
                                            button.SetTitle(buttonTypes[0].ToString());
                                            button.ButtonTypeEnum = buttonTypes[0];
                                        }
                                        else if (button.name.Contains("B"))
                                        {
                                            twoButtonSet[1] = button.gameObject;
                                            button.SetTitle(buttonTypes[1].ToString());
                                            button.ButtonTypeEnum = buttonTypes[1];
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

        protected override void SetTitleAndMessage()
        {
            foreach (Transform child in transform)
            {
                if (child != null && child.name == "TitleText")
                {
                    titleText = child.GetComponent<TextMesh>();
                }
                else if( child != null && child.name == "TitleMessage")
                {
                    messageText = child.GetComponent<TextMesh>();
                }
            }

            if (titleText != null)
            {
                titleText.text = Result.Title;
            }

            if (messageText != null)
            {
                messageText.text = WordWrap(Result.Message, MaxCharsPerLine);
            }
        }

        public static string WordWrap(string text, int maxCharsPerLine)
        {
            int pos = 0;
            int next = 0;
            StringBuilder stringBuilder = new StringBuilder();

            if (maxCharsPerLine < 1)
                return text;

            for (pos = 0; pos < text.Length; pos = next) {
                int endOfLine = text.IndexOf(System.Environment.NewLine, pos);

                if (endOfLine == -1)
                {
                    next = endOfLine = text.Length;
                }
                else
                {
                    next = endOfLine + System.Environment.NewLine.Length;
                }

                if (endOfLine > pos)
                {
                    do
                    {
                        int len = endOfLine - pos;

                        if (len > maxCharsPerLine)
                            len = BreakLine(text, pos, maxCharsPerLine);

                        stringBuilder.Append(text, pos, len);
                        stringBuilder.Append(System.Environment.NewLine);

                        pos += len;

                        while (pos < endOfLine && Char.IsWhiteSpace(text[pos]))
                        {
                            pos++;
                        }

                    } while (endOfLine > pos);
                }
                else
                {
                    stringBuilder.Append(System.Environment.NewLine);
                }
            }

            return stringBuilder.ToString();
        }

        public static int BreakLine(string text, int pos, int max) {
            int i = max - 1;

            while (i >= 0 && !Char.IsWhiteSpace(text[pos + i])) {
                i--;
            }

            if (i < 0) {
                return max;
            }

            while (i >= 0 && Char.IsWhiteSpace(text[pos + i])) {
                i--;
            }

            return i + 1;
        }

        public void DismissDialog()
        {
            State = StateEnum.InputReceived;
        }

    }
}


text:
@class C2;
@class C3;
@class C3;
@__experimental_modules_import redecl_merge_left;
typedef struct my_struct_type *my_struct_ref;
@protocol P4;
@class C3;
@class C3;
@__experimental_modules_import redecl_merge_right;

@implementation A
- (Super*)init { return self; }
@end

void f(A *a) {
  [a init];
}

@class A;

B *f1() {
  return [B create_a_B];
}

@class B;

void testProtoMerge(id<P1> p1, id<P2> p2) {
  [p1 protoMethod1];
  [p2 protoMethod2];
}

struct S1 {
  int s1_field;
};

struct S3 {
  int s3_field;
};

void testTagMerge() {
  consume_S1(produce_S1());
  struct S2 s2;
  s2.field = 0;
  consume_S2(produce_S2());
  struct S1 s1;
  s1.s1_field = 0;
  consume_S3(produce_S3());
  struct S4 s4;
  s4.field = 0;
  consume_S4(produce_S4());
  struct S3 s3;
  s3.s3_field = 0;
}

void testTypedefMerge(int i, double d) {
  T1 *ip = &i;
  // in other file: expected-note{{candidate found by name lookup is 'T2'}}
  // FIXME: Typedefs aren't actually merged in the sense of other merges, because
  // we should only merge them when the types are identical.
  // in other file: expected-note{{candidate found by name lookup is 'T2'}}
  // in other file: expected-note{{candidate function}}
  T2 *dp = &d; // expected-error{{reference to 'T2' is ambiguous}}
}

void testFuncMerge(int i) {
  func0(i);
  // in other file: expected-note{{candidate function}}
  func1(i);
  func2(i); // expected-error{{call to 'func2' is ambiguous}}
}

void testVarMerge(int i) {
  var1 = i;
  // in other files: expected-note 2{{candidate found by name lookup is 'var2'}}
  var2 = i; // expected-error{{reference to 'var2' is ambiguous}}
  // in other files: expected-note 2{{candidate found by name lookup is 'var3'}}
  var3 = i; // expected-error{{reference to 'var3' is ambiguous}}
}

// Test redeclarations of entities in explicit submodules, to make
// sure we're maintaining the declaration chains even when normal name
// lookup can't see what we're looking for.
void testExplicit() {
  Explicit *e;
  int *(*fp)(void) = &explicit_func;
  int *ip = explicit_func();

  // FIXME: Should complain about definition not having been imported.
  struct explicit_struct es = { 0 };
}

// Test resolution of declarations from multiple modules with no
// common original declaration.
void test_C(C *c) {
  c = get_a_C();
  accept_a_C(c);
}

void test_C2(C2 *c2) {
  c2 = get_a_C2();
  accept_a_C2(c2);
}

void test_C3(C3 *c3) {
  c3 = get_a_C3();
  accept_a_C3(c3);
}

C4 *global_C4;

ClassWithDef *cwd1;

@__experimental_modules_import redecl_merge_left_left;

void test_C4a(C4 *c4) {
  global_C4 = c4 = get_a_C4();
  accept_a_C4(c4);
}

void test_ClassWithDef(ClassWithDef *cwd) {
  [cwd method];
}

@__experimental_modules_import redecl_merge_bottom;

void test_C4b() {
  if (&refers_to_C4) {
  }
}

@implementation B
+ (B*)create_a_B { return 0; }
@end

void g(A *a) {
  [a init];
}

@protocol P3
- (void)p3_method;
@end

id<P4> p4;
id<P3> p3;

#ifdef __cplusplus
void testVector() {
  Vector<int> vec_int;
  vec_int.push_back(0);
}
#endif

// Make sure we don't get conflicts with 'id'.
funcptr_with_id fid;
id id_global;


text:
@font-face {
  font-family: "Source Sans Pro";
  src: url('../font/SourceSansPro-Regular.otf');
}

@font-face {
  font-family: "Source Sans Pro";
  src: url('../font/SourceSansPro-Light.otf');
  font-weight: 200;
}

@font-face {
  font-family: "Source Sans Pro";
  src: url('../font/SourceSansPro-Semibold.otf');
  font-weight: 600;
}

body {
  font: 12px "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 400;
}

body {
  margin: 0;
  padding: 0;
  background: hsla(200, 2%, 30%, 1);
}

:focus {
  outline-color: transparent;
  outline-style: none;
}

input[type="radio"] {
  position: absolute;
  overflow: hidden;
  padding: 0;
  border: 0;
  opacity: 0.001;
  z-index: 1;
  vertical-align: top;
  outline: none;
}

.topcoat-radio-button,
.topcoat-radio-button__checkmark {
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.topcoat-radio-button__checkmark:before,
.topcoat-radio-button__checkmark {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  background-clip: padding-box;
}

.topcoat-radio-button,
.topcoat-radio-button__checkmark {
  position: relative;
  display: inline-block;
  vertical-align: top;
}

input[type="radio"]:disabled + .topcoat-radio-button__checkmark {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.topcoat-radio-button__checkmark:before {
  content: '';
  position: absolute;
  border-radius: 100%;
}

.topcoat-radio-button__checkmark:after {
  content: '';
  position: absolute;
  border-radius: 100%;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

/* topdoc
  name: Radio Button
  description: A button that can play music, but usually just plays ads.
  modifiers:
  markup:

      <input type="radio" name="topcoat">

      Left label
      <input type="radio" name="topcoat">

      <input type="radio" name="topcoat">

      Right label

      <input type="radio" name="topcoat" Disabled>

      Disabled

  examples:
    Mobile Radio Button: http://codepen.io/Topcoat/pen/HDcJj
  tags:
    - desktop
    - light
    - mobile
    - Radio
*/

input[type="radio"] {
  height: 1.063rem;
  width: 1.063rem;
  margin-top: 0;
  margin-right: -1.063rem;
  margin-bottom: -1.063rem;
  margin-left: 0;
}

input[type="radio"]:checked + .topcoat-radio-button__checkmark:after {
  opacity: 1;
}

.topcoat-radio-button {
  color: hsla(180, 2%, 78%, 1);
  line-height: 1.063rem;
}

.topcoat-radio-button__checkmark:before {
  width: 1.063rem;
  height: 1.063rem;
  background: hsla(180, 1%, 35%, 1);
  border: 1px solid hsla(180, 1%, 20%, 1);
  box-shadow: inset 0 1px hsla(0, 0%, 45%, 1);
}

.topcoat-radio-button__checkmark {
  position: relative;
  width: 1.063rem;
  height: 1.063rem;
}

.topcoat-radio-button__checkmark:after {
  opacity: 0;
  width: 0.313rem;
  height: 0.313rem;
  background: hsla(180, 2%, 78%, 1);
  border: 1px solid hsla(0, 0%, 0%, 0.05);
  box-shadow: 0 1px hsla(0, 100%, 100%, 0.1);
  -webkit-transform: none;
  transform: none;
  top: 0.313rem;
  left: 0.313rem;
}

input[type="radio"]:focus + .topcoat-radio-button__checkmark:before {
  border: 1px solid hsla(227, 100%, 50%, 1);
  box-shadow: inset 0 1px hsla(0, 100%, 100%, 0.36), 0 0 0 2px hsla(208, 82%, 69%, 1);
}

input[type="radio"]:active + .topcoat-radio-button__checkmark:before {
  border: 1px solid hsla(180, 1%, 20%, 1);
  background-color: hsla(210, 2%, 25%, 1);
  box-shadow: inset 0 1px hsla(0, 0%, 0%, 0.05);
}

input[type="radio"]:disabled:active + .topcoat-radio-button__checkmark:before {
  border: 1px solid hsla(180, 1%, 20%, 1);
  background: hsla(180, 1%, 35%, 1);
  box-shadow: inset 0 1px hsla(0, 0%, 45%, 1);
}


text:
import {Float32Buffer, NormalizedUint8Buffer, Uint8Buffer} from "./buffer"
import {AttributeConfig, BoundingBox, Texture2D, Vec2, Vec4} from "regl"

// Props are used to pass properties from GL glyph classes to ReGL functions.
type CommonProps = {
  scissor: BoundingBox
  viewport: BoundingBox
  canvas_size: Vec2
  pixel_ratio: number
  antialias: number
}

type LineProps = {
  linewidth: Float32Buffer
  line_color: NormalizedUint8Buffer
  line_cap: Uint8Buffer
  line_join: Uint8Buffer
}

type FillProps = {
  fill_color: NormalizedUint8Buffer
}

type DashProps = {
  length_so_far: Float32Buffer
  dash_tex: Texture2D
  dash_tex_info: number[]
  dash_scale: number
  dash_offset: number
}

type HatchProps = {
  hatch_pattern: Uint8Buffer
  hatch_scale: Float32Buffer
  hatch_weight: Float32Buffer
  hatch_color: NormalizedUint8Buffer
}

export type LineGlyphProps = CommonProps & {
  line_color: number[]
  linewidth: number
  miter_limit: number
  points: Float32Buffer
  show: Uint8Buffer
  nsegments: number
  line_cap: number
  line_join: number
}

export type LineDashGlyphProps = LineGlyphProps & DashProps

export type MarkerGlyphProps = CommonProps & LineProps & FillProps & {
  center: Float32Buffer
  nmarkers: number
  width: Float32Buffer
  height: Float32Buffer
  angle: Float32Buffer
  size_hint: number
  show: Uint8Buffer
}

export type MarkerHatchGlyphProps = MarkerGlyphProps & HatchProps

// Uniforms are used to pass GLSL uniform values from ReGL functions to shaders.
export type CommonUniforms = {
  u_canvas_size: Vec2
  u_pixel_ratio: number
  u_antialias: number
}

export type DashUniforms = {
  u_dash_tex: Texture2D
  u_dash_tex_info: Vec4
  u_dash_scale: number
  u_dash_offset: number
}

export type LineGlyphUniforms = CommonUniforms & {
  u_line_color: Vec4
  u_linewidth: number
  u_miter_limit: number
  u_line_join: number
  u_line_cap: number
}

export type LineDashGlyphUniforms = LineGlyphUniforms & DashUniforms

export type MarkerGlyphUniforms = CommonUniforms & {
  u_size_hint: number
}

// Attributes are used to pass GLSL attribute values from ReGL functions to shaders.
type LineAttributes = {
  a_linewidth: AttributeConfig
  a_line_color: AttributeConfig
  a_line_cap: AttributeConfig
  a_line_join: AttributeConfig
}

type FillAttributes = {
  a_fill_color: AttributeConfig
}

type HatchAttributes = {
  a_hatch_pattern: AttributeConfig
  a_hatch_scale: AttributeConfig
  a_hatch_weight: AttributeConfig
  a_hatch_color: AttributeConfig
}

export type LineGlyphAttributes = {
  a_position: AttributeConfig
  a_point_prev: AttributeConfig
  a_point_start: AttributeConfig
  a_point_end: AttributeConfig
  a_point_next: AttributeConfig
  a_show_prev: AttributeConfig
  a_show_curr: AttributeConfig
  a_show_next: AttributeConfig
}

export type LineDashGlyphAttributes = LineGlyphAttributes & {
  a_length_so_far: AttributeConfig
}

export type MarkerGlyphAttributes = LineAttributes & FillAttributes & {
  a_center: AttributeConfig
  a_show: AttributeConfig
  a_position: AttributeConfig
  a_width: AttributeConfig
  a_height: AttributeConfig
  a_angle: AttributeConfig
}

export type MarkerHatchGlyphAttributes = MarkerGlyphAttributes & HatchAttributes


text:
/*
 * File:   Application.h
 * Author: hanv
 *
 * Created on November 17, 2013, 12:20 PM
 */
#include <string>
#include <vector>
#include "iostream"
#ifndef APPLICATION_H
#define	APPLICATION_H
using namespace std;
class Application {
public:

    Application();
    virtual ~Application();

    static Application* getInstance();
    static void deInstance();

    void run();

private:
    void preprocess();
    void process();
    void sortParts();
//    void mergeParts();
    void mergeParts(vector<string>& _result, const vector<string>& parts, int mergeCount);

private:

    struct {
            bool operator()(const string* a, const string* b)
            {
                return a->compare(*b) < 0;
            }
        } StringLess;

    static Application* m_Instance;

    vector<string> m_PartFiles;
};

#endif	/* APPLICATION_H */


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>main</artifactId>
        <groupId>org.rioproject</groupId>
        <version>5.0-M3</version>
    </parent>
    <artifactId>rio-logging-support</artifactId>
    <name>Module :: Rio Logging Support</name>
    <packaging>jar</packaging>
    <description>
        The rio-logging-support module provides a Logback Appender, a j.u.l Handler that will send ServiceLogEvents
        as well as a j.u.l FileHandler.
    </description>

    <dependencies>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <optional>true</optional>
        </dependency>

    </dependencies>

    <build>
	    <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>


text:
package org.flywaydb.core.internal.dbsupport.h2;

import org.flywaydb.core.internal.dbsupport.DbSupport;
import org.flywaydb.core.internal.dbsupport.JdbcTemplate;
import org.flywaydb.core.internal.dbsupport.Schema;
import org.flywaydb.core.internal.dbsupport.SqlStatementBuilder;
import org.flywaydb.core.internal.util.jdbc.JdbcUtils;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;

/**
 * H2 database specific support
 */
public class H2DbSupport extends DbSupport {
    /**
     * Creates a new instance.
     *
     * @param connection The connection to use.
     */
    public H2DbSupport(Connection connection) {
        super(new JdbcTemplate(connection, Types.VARCHAR));
    }

    public String getDbName() {
        return "h2";
    }

    public String getCurrentUserFunction() {
        return "USER()";
    }

    protected String doGetCurrentSchemaName() throws SQLException {
        return jdbcTemplate.queryForString("CALL SCHEMA()");
    }

    @Override
    protected void doChangeCurrentSchemaTo(String schema) throws SQLException {
        jdbcTemplate.execute("SET SCHEMA " + schema);
    }

    public boolean supportsDdlTransactions() {
        return false;
    }

    public String getBooleanTrue() {
        return "1";
    }

    public String getBooleanFalse() {
        return "0";
    }

    public SqlStatementBuilder createSqlStatementBuilder() {
        return new H2SqlStatementBuilder();
    }

    @Override
    public String doQuote(String identifier) {
        return "\"" + identifier + "\"";
    }

    @Override
    public Schema getSchema(String name) {
        return new H2Schema(jdbcTemplate, this, name);
    }

    @Override
    public boolean catalogIsSchema() {
        return false;
    }
}


text:
var WYSIWYG = {

	/**
	 * Settings class, holds all customizeable properties
	 */
	Settings: function() {

		// Images Directory
		this.ImagesDir = "images/";

		// Popups Directory
		this.PopupsDir = "popups/";

		// CSS Directory File
		this.CSSFile = "styles/wysiwyg.css";

		// Default WYSIWYG width and height (use px or %)
		this.Width = "500px";
		this.Height = "200px";

		// Default stylesheet of the WYSIWYG editor window
		this.DefaultStyle = "font-family: Arial; font-size: 12px; background-color: #FFFFFF";

		// Stylesheet if editor is disabled
		this.DisabledStyle = "font-family: Arial; font-size: 12px; background-color: #EEEEEE";

		// Width + Height of the preview window
		this.PreviewWidth = 500;
		this.PreviewHeight = 400;

		// Confirmation message if you strip any HTML added by word
		this.RemoveFormatConfMessage = "Clean HTML inserted by MS Word ?";

		// Nofication if browser is not supported by openWYSIWYG, leave it blank for no message output.
		this.NoValidBrowserMessage = "openWYSIWYG does not support your browser.";

		// Anchor path to strip, leave it blank to ignore
		// or define auto to strip the path where the editor is placed
		// (only IE)
		this.AnchorPathToStrip = "auto";

		// Image path to strip, leave it blank to ignore
		// or define auto to strip the path where the editor is placed
		// (only IE)
		this.ImagePathToStrip = "auto";

		// Enable / Disable the custom context menu
		this.ContextMenu = true;

		// Enabled the status bar update. Within the status bar
		// node tree of the actually selected element will build
		this.StatusBarEnabled = true;

		// If enabled than the capability of the IE inserting line breaks will be inverted.
		// Normal: ENTER =
 , SHIFT + ENTER =

		// Inverted: ENTER =
, SHIFT + ENTER =

		this.InvertIELineBreaks = false;

		// Replace line breaks with
 tags
		this.ReplaceLineBreaks = false;

		// Page that opened the WYSIWYG (Used for the return command)
		this.Opener = "admin.asp";

		// Insert image implementation
		this.ImagePopupFile = "";
		this.ImagePopupWidth = 0;
		this.ImagePopupHeight = 0;

		// Holds the available buttons displayed
		// on the toolbar of the editor
		this.Toolbar = new Array();
		this.Toolbar[0] = new Array(
			"font",
			"fontsize",
			"headings",
			"bold",
			"italic",
			"underline",
			"strikethrough",
			"seperator",
			"forecolor",
			"backcolor",
			"seperator",
			"justifyfull",
			"justifyleft",
			"justifycenter",
			"justifyright",
			"seperator",
			"unorderedlist",
			"orderedlist",
			"outdent",
			"indent"
		);
		this.Toolbar[1] = new Array(
			"save",
			// "return",  // return button disabled by default
			"seperator",
			"subscript",
			"superscript",
			"seperator",
			"cut",
			"copy",
			"paste",
			"removeformat",
			"seperator",
			"undo",
			"redo",
			"seperator",
			"inserttable",
			"insertimage",
			"createlink",
			"seperator",
			"preview",
			"print",
			"seperator",
			"viewSource",
			"maximize",
			"seperator",
			"help"
		);

		// DropDowns
		this.DropDowns = new Array();
		// Fonts
		this.DropDowns['font'] = {
			id: "fonts",
			command: "FontName",
			label: "{value}",
			width: "90px",
			elements: new Array(
				"Arial",
				"Sans Serif",
				"Tahoma",
				"Verdana",
				"Courier New",
				"Georgia",
				"Times New Roman",
				"Impact",
				"Comic Sans MS"
			)
		};
		// Font sizes
		this.DropDowns['fontsize'] = {
			id: "fontsizes",
			command: "FontSize",
			label: "Size {value}",
			width: "54px",
			elements: new Array(
				"1",
				"2",
				"3",
				"4",
				"5",
				"6",
				"7"
			)
		};
		// Headings
		this.DropDowns['headings'] = {
			id: "headings",
			command: "FormatBlock",
			label: "<{value} style=\"margin:0px;text-decoration:none;font-family:Arial\">{value}</{value}>",
			width: "74px",
			elements: new Array(
				"H1",
				"H2",
				"H3",
				"H4",
				"H5",
				"H6"
			)
		};

		// Add the given element to the defined toolbar
		// on the defined position
		this.addToolbarElement = function(element, toolbar, position) {
			if(element != "seperator") {this.removeToolbarElement(element);}
			if(this.Toolbar[toolbar-1] == null) {
				this.Toolbar[toolbar-1] = new Array();
			}
			this.Toolbar[toolbar-1].splice(position+1, 1, element);
		};

		// Remove an element from the toolbar
		this.removeToolbarElement = function(element) {
			if(element == "seperator") {return;} // do not remove seperators
			for(var i=0;i<this.Toolbar.length;i++) {
				if(this.Toolbar[i]) {
					var toolbar = this.Toolbar[i];
					for(var j=0;j<toolbar.length;j++) {
						if(toolbar[j] != null && toolbar[j] == element) {
							this.Toolbar[i].splice(j,1);
						}
					}
				}
			}
		};

		// clear all or a given toolbar
		this.clearToolbar = function(toolbar) {
			if(typeof toolbar == "undefined") {
				this.Toolbar = new Array();
			}
			else {
				this.Toolbar[toolbar+1] = new Array();
			}
		};

	},

	/* ---------------------------------------------------------------------- *\
		!! Do not change something below or you know what you are doning !!
	\* ---------------------------------------------------------------------- */

	// List of available block formats (not in use)
	//BlockFormats: new Array("Address", "Bulleted List", "Definition", "Definition Term", "Directory List", "Formatted", "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Heading 5", "Heading 6", "Menu List", "Normal", "Numbered List"),

	// List of available actions and their respective ID and images
	ToolbarList: {
	//Name              buttonID               buttonTitle           	buttonImage               buttonImageRollover
	"bold":           ['Bold',                 'Bold',               	'bold.gif',               'bold_on.gif'],
	"italic":         ['Italic',               'Italic',             	'italics.gif',            'italics_on.gif'],
	"underline":      ['Underline',            'Underline',          	'underline.gif',          'underline_on.gif'],
	"strikethrough":  ['Strikethrough',        'Strikethrough',      	'strikethrough.gif',      'strikethrough_on.gif'],
	"seperator":      ['',                     '',                   	'seperator.gif',          'seperator.gif'],
	"subscript":      ['Subscript',            'Subscript',          	'subscript.gif',          'subscript_on.gif'],
	"superscript":    ['Superscript',          'Superscript',        	'superscript.gif',        'superscript_on.gif'],
	"justifyleft":    ['Justifyleft',          'Justifyleft',        	'justify_left.gif',       'justify_left_on.gif'],
	"justifycenter":  ['Justifycenter',        'Justifycenter',      	'justify_center.gif',     'justify_center_on.gif'],
	"justifyright":   ['Justifyright',         'Justifyright',       	'justify_right.gif',      'justify_right_on.gif'],
	"justifyfull": 	  ['Justifyfull', 		   'Justifyfull', 			'justify_justify.gif', 	  'justify_justify_on.gif'],
	"unorderedlist":  ['InsertUnorderedList',  'Insert Unordered List',	'list_unordered.gif',     'list_unordered_on.gif'],
	"orderedlist":    ['InsertOrderedList',    'Insert Ordered List',  	'list_ordered.gif',       'list_ordered_on.gif'],
	"outdent":        ['Outdent',              'Outdent',            	'indent_left.gif',        'indent_left_on.gif'],
	"indent":         ['Indent',               'Indent',             	'indent_right.gif',       'indent_right_on.gif'],
	"cut":            ['Cut',                  'Cut',                	'cut.gif',                'cut_on.gif'],
	"copy":           ['Copy',                 'Copy',               	'copy.gif',               'copy_on.gif'],
	"paste":          ['Paste',                'Paste',              	'paste.gif',              'paste_on.gif'],
	"forecolor":      ['ForeColor',            'Fore Color',          	'forecolor.gif',          'forecolor_on.gif'],
	"backcolor":      ['BackColor',            'Back Color',          	'backcolor.gif',          'backcolor_on.gif'],
	"undo":           ['Undo',                 'Undo',               	'undo.gif',               'undo_on.gif'],
	"redo":           ['Redo',                 'Redo',               	'redo.gif',               'redo_on.gif'],
	"inserttable":    ['InsertTable',          'Insert Table',        	'insert_table.gif',       'insert_table_on.gif'],
	"insertimage":    ['InsertImage',          'Insert Image',        	'insert_picture.gif',     'insert_picture_on.gif'],
	"createlink":     ['CreateLink',           'Create Link',         	'insert_hyperlink.gif',   'insert_hyperlink_on.gif'],
	"viewSource":     ['ViewSource',           'View Source',         	'view_source.gif',        'view_source_on.gif'],
	"viewText":       ['ViewText',             'View Text',           	'view_text.gif',          'view_text_on.gif'],
	"help":           ['Help',                 'Help',               	'help.gif',               'help_on.gif'],
	"fonts":     	  ['Fonts',           	   'Select Font',        	'select_font.gif',        'select_font_on.gif'],
	"fontsizes":      ['Fontsizes',            'Select Size',        	'select_size.gif',        'select_size_on.gif'],
	"headings":       ['Headings',             'Select Size',        	'select_heading.gif',     'select_heading_on.gif'],
	"preview":		  ['Preview', 			   'Preview',       	 	'preview.gif',			  'preview_on.gif'],
	"print":		  ['Print', 			   'Print',       	 	 	'print.gif',			  'print_on.gif'],
	"removeformat":   ['RemoveFormat',         'Strip Word HTML',    	'remove_format.gif',      'remove_format_on.gif'],
	"delete":         ['Delete',               'Delete',             	'delete.gif',     		  'delete_on.gif'],
	"save": 		  ['Save', 				   'Save document',         'save.gif', 			  'save_on.gif'],
	"return": 		  ['Return', 			   'Return without saving', 'return.gif', 			  'return_on.gif'],
	"maximize": 	  ['Maximize', 			   'Maximize the editor',   'maximize.gif', 		  'maximize_on.gif']
	},

	// stores the different settings for each textarea
	// the textarea identifier is used to store the settings object
	config: new Array(),
	// Create viewTextMode global variable and set to 0
	// enabling all toolbar commands while in HTML mode
	viewTextMode: new Array(),
	// maximized
	maximized: new Array(),

	/**
	 * Get the range of the given selection
	 *
	 * @param {Selection} sel Selection object
	 * @return {Range} Range object
	 */
	getRange: function(sel) {
		return sel.createRange ? sel.createRange() : sel.getRangeAt(0);
	},

	/**
	 * Return the editor div element
	 *
	 * @param {String} n Editor identifier
	 * @return {HtmlDivElement} Iframe object
	 */
	getEditorDiv: function(n) {
		return $("wysiwyg_div_" + n);
	},

	/**
	 * Return the editor table element
	 *
	 * @param {String} n Editor identifier
	 * @return {HtmlTableElement} Iframe object
	 */
	getEditorTable: function(n) {
		return $("wysiwyg_table_" + n);
	},

	/**
	 * Get the iframe object of the WYSIWYG editor
	 *
	 * @param {String} n Editor identifier
	 * @return {HtmlIframeElement} Iframe object
	 */
	getEditor: function(n) {
		return $("wysiwyg" + n);
	},

	/**
	 * Get editors window element
	 *
	 * @param {String} n Editor identifier
	 * @return {HtmlWindowElement} Html window object
	 */
	getEditorWindow: function(n) {
		return this.getEditor(n).contentWindow;
	},

	/**
	 * Attach the WYSIWYG editor to the given textarea element
	 *
	 * @param {String} id Textarea identifier (all = all textareas)
	 * @param {Settings} settings the settings which will be applied to the textarea
	 */
	attach: function(id, settings) {
		if(id != "all") {
			this.setSettings(id, settings);
			WYSIWYG_Core.includeCSS(this.config[id].CSSFile);
			WYSIWYG_Core.addEvent(window, "load", function generateEditor() {WYSIWYG._generate(id, settings);});
		}
		else {
			WYSIWYG_Core.addEvent(window, "load", function generateEditor() {WYSIWYG.attachAll(settings);});
		}
	},

	/**
	 * Attach the WYSIWYG editor to all textarea elements
	 *
	 * @param {Settings} settings Settings to customize the look and feel
	 */
	attachAll: function(settings) {
		var areas = document.getElementsByTagName("textarea");
		for(var i=0;i<areas.length;i++) {
			var id = areas[i].getAttribute("id");
			if(id == null || id == "") continue;
			this.setSettings(id, settings);
			WYSIWYG_Core.includeCSS(this.config[id].CSSFile);
			WYSIWYG._generate(id, settings);
		}
	},

	/**
	 * Display an iframe instead of the textarea.
	 * It's used as textarea replacement to display HTML.
	 *
	 * @param id Textarea identifier (all = all textareas)
	 * @param settings the settings which will be applied to the textarea
	 */
	display: function(id, settings) {
		if(id != "all") {
			this.setSettings(id, settings);
			WYSIWYG_Core.includeCSS(this.config[id].CSSFile);
			WYSIWYG_Core.addEvent(window, "load", function displayIframe() {WYSIWYG._display(id, settings);});
		}
		else {
			WYSIWYG_Core.addEvent(window, "load", function displayIframe() {WYSIWYG.displayAll(settings);});
		}
	},

	/**
	 * Display an iframe instead of the textarea.
	 * It's apply the iframe to all textareas found in the current document.
	 *
	 * @param settings Settings to customize the look and feel
	 */
	displayAll: function(settings) {
		var areas = document.getElementsByTagName("textarea");
		for(var i=0;i<areas.length;i++) {
			var id = areas[i].getAttribute("id");
			if(id == null || id == "") continue;
			this.setSettings(id, settings);
			WYSIWYG_Core.includeCSS(this.config[id].CSSFile);
			WYSIWYG._display(id, settings);
		}
	},

	/**
	 * Set settings in config array, use the textarea id as identifier
	 *
	 * @param n Textarea identifier (all = all textareas)
	 * @param settings the settings which will be applied to the textarea
	 */
	setSettings: function(n, settings) {
		if(typeof(settings) != "object") {
			this.config[n] = new this.Settings();
		}
		else {
			this.config[n] = settings;
		}
	},

	/**
	 * Insert or modify an image
	 *
	 * @param {String} src Source of the image
	 * @param {Integer} width Width
	 * @param {Integer} height Height
	 * @param {String} align Alignment of the image
	 * @param {String} border Border size
	 * @param {String} alt Alternativ Text
	 * @param {Integer} hspace Horizontal Space
	 * @param {Integer} vspace Vertical Space
	 * @param {String} n The editor identifier (the textarea's ID)
	 */
	insertImage: function(src, width, height, align, border, alt, hspace, vspace, n) {

		// get editor
		var doc = this.getEditorWindow(n).document;
		// get selection and range
		var sel = this.getSelection(n);
		var range = this.getRange(sel);

		// the current tag of range
		var img = this.findParent("img", range);

		// element is not a link
		var update = (img == null) ? false : true;
		if(!update) {
			img = doc.createElement("img");
		}

		// set the attributes
		WYSIWYG_Core.setAttribute(img, "src", src);
		WYSIWYG_Core.setAttribute(img, "style", "width:" + width + ";height:" + height);
		if(align != "") { WYSIWYG_Core.setAttribute(img, "align", align); } else { img.removeAttribute("align"); }
		WYSIWYG_Core.setAttribute(img, "border", border);
		WYSIWYG_Core.setAttribute(img, "alt", alt);
		WYSIWYG_Core.setAttribute(img, "hspace", hspace);
		WYSIWYG_Core.setAttribute(img, "vspace", vspace);
		img.removeAttribute("width");
		img.removeAttribute("height");

		// on update exit here
		if(update) { return; }

		// Check if IE or Mozilla (other)
		if (WYSIWYG_Core.isMSIE) {
			range.pasteHTML(img.outerHTML);
		}
		else {
			this.insertNodeAtSelection(img, n);
		}
	},

	/**
	 * Insert or modify a link
	 *
	 * @param {String} href The url of the link
	 * @param {String} target Target of the link
	 * @param {String} style Stylesheet of the link
	 * @param {String} styleClass Stylesheet class of the link
	 * @param {String} name Name attribute of the link
	 * @param {String} n The editor identifier (the textarea's ID)
	 */
	insertLink: function(href, target, style, styleClass, name, n) {

		// get editor
		var doc = this.getEditorWindow(n).document;
		// get selection and range
		var sel = this.getSelection(n);
		var range = this.getRange(sel);
		var lin = null;

		// get element from selection
		if(WYSIWYG_Core.isMSIE) {
			if(sel.type == "Control" && range.length == 1) {
				range = this.getTextRange(range(0));
				range.select();
			}
		}

		// find a as parent element
		lin = this.findParent("a", range);

		// check if parent is found
		var update = (lin == null) ? false : true;
		if(!update) {
			lin = doc.createElement("a");
		}

		// set the attributes
		WYSIWYG_Core.setAttribute(lin, "href", href);
		WYSIWYG_Core.setAttribute(lin, "class", styleClass);
		WYSIWYG_Core.setAttribute(lin, "className", styleClass);
		WYSIWYG_Core.setAttribute(lin, "target", target);
		WYSIWYG_Core.setAttribute(lin, "name", name);
		WYSIWYG_Core.setAttribute(lin, "style", style);

		// on update exit here
		if(update) { return; }

		// Check if IE or Mozilla (other)
		if (WYSIWYG_Core.isMSIE) {
			range.select();
			lin.innerHTML = range.htmlText;
			range.pasteHTML(lin.outerHTML);
		}
		else {
			var node = range.startContainer;
			var pos = range.startOffset;
			if(node.nodeType != 3) { node = node.childNodes[pos]; }
			if(node.tagName)
				lin.appendChild(node);
			else
				lin.innerHTML = sel;
			this.insertNodeAtSelection(lin, n);
		}
	},

	/**
	 * Strips any HTML added by word
	 *
     * @param {String} n The editor identifier (the textarea's ID)
	 */
	removeFormat: function(n) {

		if ( !confirm(this.config[n].RemoveFormatConfMessage) ) { return; }
		var doc = this.getEditorWindow(n).document;
		var str = doc.body.innerHTML;

		str = str.replace(/])*>( )*\s*<\/span>/gi, '');
	    str = str.replace(/]*>/gi, '');
	    str = str.replace(/<\/span[^>]*>/gi, '');
	    str = str.replace(/
])*>( )*\s*<\/p>/gi, '');
	    str = str.replace(/
]*>/gi, '');
	    str = str.replace(/<\/p[^>]*>/gi, '');
	    str = str.replace(/<h([^>])[0-9]>( )*\s*<\/h>/gi, '');
	    str = str.replace(/<h[^>][0-9]>/gi, '');
	    str = str.replace(/<\/h[^>][0-9]>/gi, '');
		str = str.replace (/]*>/ig, '');

		// var repl_i1 = /]*>/ig;
		// str = str.replace (repl_i1, '');

		str = str.replace (/
]*>/ig, '');
		str = str.replace (/<\/DIV>/gi, '');
		str = str.replace (/<[\/\w?]+:[^>]*>/ig, '');
		str = str.replace (/( ){2,}/ig, ' ');
		str = str.replace (//ig, '');
		str = str.replace (/<\/STRONG>/ig, '');
		str = str.replace (/<TT>/ig, '');
		str = str.replace (/<\/TT>/ig, '');
		str = str.replace (/]*>/ig, '');
		str = str.replace (/<\/FONT>/ig, '');
		str = str.replace (/STYLE=\"[^\"]*\"/ig, '');
		str = str.replace(/<([\w]+) class=([^ |>]*)([^>]*)/gi, '<$1$3');
  	    str = str.replace(/<([\w]+) style="([^"]*)"([^>]*)/gi, '<$1$3');
		str = str.replace(/width=([^ |>]*)([^>]*)/gi, '');
	    str = str.replace(/classname=([^ |>]*)([^>]*)/gi, '');
	    str = str.replace(/align=([^ |>]*)([^>]*)/gi, '');
	    str = str.replace(/valign=([^ |>]*)([^>]*)/gi, '');
	    str = str.replace(/<\\?\??xml[^>]>/gi, '');
	    str = str.replace(/<\/?\w+:[^>]*>/gi, '');
	    str = str.replace(/<st1:.*?>/gi, '');
	    str = str.replace(/o:/gi, '');

	    str = str.replace(//gi, '');
   		str = str.replace(/


text:
package com.amazonaws.services.resourcegroups.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListGroupResourcesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * The name of the resource group.
     *

     */
    private String groupName;
    /**
     *

     * Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation.
     *

     *

     *

     *

     * resource-type - Filter resources by their type. Specify up to five resource types in the format
     * AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.
     *

     *

     *

     */
    private java.util.List<ResourceFilter> filters;
    /**
     *

     * The maximum number of group member ARNs that are returned in a single call by ListGroupResources, in paginated
     * output. By default, this number is 50.
     *

     */
    private Integer maxResults;
    /**
     *

     * The NextToken value that is returned in a paginated ListGroupResources request. To get the next page of results,
     * run the call again, add the NextToken parameter, and specify the NextToken value.
     *

     */
    private String nextToken;

    /**
     *

     * The name of the resource group.
     *

     *
     * @param groupName
     *        The name of the resource group.
     */

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    /**
     *

     * The name of the resource group.
     *

     *
     * @return The name of the resource group.
     */

    public String getGroupName() {
        return this.groupName;
    }

    /**
     *

     * The name of the resource group.
     *

     *
     * @param groupName
     *        The name of the resource group.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListGroupResourcesRequest withGroupName(String groupName) {
        setGroupName(groupName);
        return this;
    }

    /**
     *

     * Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation.
     *

     *

     *

     *

     * resource-type - Filter resources by their type. Specify up to five resource types in the format
     * AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.
     *

     *

     *

     *
     * @return Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources
     *         operation.

     *

     *

     *

     *         resource-type - Filter resources by their type. Specify up to five resource types in the
     *         format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.
     *

     *

     */

    public java.util.List<ResourceFilter> getFilters() {
        return filters;
    }

    /**
     *

     * Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation.
     *

     *

     *

     *

     * resource-type - Filter resources by their type. Specify up to five resource types in the format
     * AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.
     *

     *

     *

     *
     * @param filters
     *        Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources
     *        operation.

     *

     *

     *

     *        resource-type - Filter resources by their type. Specify up to five resource types in the
     *        format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.
     *

     *

     */

    public void setFilters(java.util.Collection<ResourceFilter> filters) {
        if (filters == null) {
            this.filters = null;
            return;
        }

        this.filters = new java.util.ArrayList<ResourceFilter>(filters);
    }

    /**
     *

     * Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation.
     *

     *

     *

     *

     * resource-type - Filter resources by their type. Specify up to five resource types in the format
     * AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.
     *

     *

     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setFilters(java.util.Collection)} or {@link #withFilters(java.util.Collection)} if you want to override
     * the existing values.
     *

     *
     * @param filters
     *        Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources
     *        operation.

     *

     *

     *

     *        resource-type - Filter resources by their type. Specify up to five resource types in the
     *        format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.
     *

     *

     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListGroupResourcesRequest withFilters(ResourceFilter... filters) {
        if (this.filters == null) {
            setFilters(new java.util.ArrayList<ResourceFilter>(filters.length));
        }
        for (ResourceFilter ele : filters) {
            this.filters.add(ele);
        }
        return this;
    }

    /**
     *

     * Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation.
     *

     *

     *

     *

     * resource-type - Filter resources by their type. Specify up to five resource types in the format
     * AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.
     *

     *

     *

     *
     * @param filters
     *        Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources
     *        operation.

     *

     *

     *

     *        resource-type - Filter resources by their type. Specify up to five resource types in the
     *        format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.
     *

     *

     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListGroupResourcesRequest withFilters(java.util.Collection<ResourceFilter> filters) {
        setFilters(filters);
        return this;
    }

    /**
     *

     * The maximum number of group member ARNs that are returned in a single call by ListGroupResources, in paginated
     * output. By default, this number is 50.
     *

     *
     * @param maxResults
     *        The maximum number of group member ARNs that are returned in a single call by ListGroupResources, in
     *        paginated output. By default, this number is 50.
     */

    public void setMaxResults(Integer maxResults) {
        this.maxResults = maxResults;
    }

    /**
     *

     * The maximum number of group member ARNs that are returned in a single call by ListGroupResources, in paginated
     * output. By default, this number is 50.
     *

     *
     * @return The maximum number of group member ARNs that are returned in a single call by ListGroupResources, in
     *         paginated output. By default, this number is 50.
     */

    public Integer getMaxResults() {
        return this.maxResults;
    }

    /**
     *

     * The maximum number of group member ARNs that are returned in a single call by ListGroupResources, in paginated
     * output. By default, this number is 50.
     *

     *
     * @param maxResults
     *        The maximum number of group member ARNs that are returned in a single call by ListGroupResources, in
     *        paginated output. By default, this number is 50.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListGroupResourcesRequest withMaxResults(Integer maxResults) {
        setMaxResults(maxResults);
        return this;
    }

    /**
     *

     * The NextToken value that is returned in a paginated ListGroupResources request. To get the next page of results,
     * run the call again, add the NextToken parameter, and specify the NextToken value.
     *

     *
     * @param nextToken
     *        The NextToken value that is returned in a paginated ListGroupResources request. To get the next page of
     *        results, run the call again, add the NextToken parameter, and specify the NextToken value.
     */

    public void setNextToken(String nextToken) {
        this.nextToken = nextToken;
    }

    /**
     *

     * The NextToken value that is returned in a paginated ListGroupResources request. To get the next page of results,
     * run the call again, add the NextToken parameter, and specify the NextToken value.
     *

     *
     * @return The NextToken value that is returned in a paginated ListGroupResources request. To get the next page of
     *         results, run the call again, add the NextToken parameter, and specify the NextToken value.
     */

    public String getNextToken() {
        return this.nextToken;
    }

    /**
     *

     * The NextToken value that is returned in a paginated ListGroupResources request. To get the next page of results,
     * run the call again, add the NextToken parameter, and specify the NextToken value.
     *

     *
     * @param nextToken
     *        The NextToken value that is returned in a paginated ListGroupResources request. To get the next page of
     *        results, run the call again, add the NextToken parameter, and specify the NextToken value.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListGroupResourcesRequest withNextToken(String nextToken) {
        setNextToken(nextToken);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getGroupName() != null)
            sb.append("GroupName: ").append(getGroupName()).append(",");
        if (getFilters() != null)
            sb.append("Filters: ").append(getFilters()).append(",");
        if (getMaxResults() != null)
            sb.append("MaxResults: ").append(getMaxResults()).append(",");
        if (getNextToken() != null)
            sb.append("NextToken: ").append(getNextToken());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof ListGroupResourcesRequest == false)
            return false;
        ListGroupResourcesRequest other = (ListGroupResourcesRequest) obj;
        if (other.getGroupName() == null ^ this.getGroupName() == null)
            return false;
        if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false)
            return false;
        if (other.getFilters() == null ^ this.getFilters() == null)
            return false;
        if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false)
            return false;
        if (other.getMaxResults() == null ^ this.getMaxResults() == null)
            return false;
        if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
            return false;
        if (other.getNextToken() == null ^ this.getNextToken() == null)
            return false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode());
        hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode());
        hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
        return hashCode;
    }

    @Override
    public ListGroupResourcesRequest clone() {
        return (ListGroupResourcesRequest) super.clone();
    }

}


text:
package cn.com.warlock.rest.excetion;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.NotAllowedException;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.NotSupportedException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.com.warlock.rest.response.ResponseCode;
import cn.com.warlock.rest.response.WrapperResponseEntity;

import com.fasterxml.jackson.core.JsonProcessingException;

/**
 * REST 异常映射
 *
 * 将异常转换成RestResponse
 *
 *
 */
public class BaseExceptionMapper implements ExceptionMapper<Exception> {

    private static Logger      log = LoggerFactory.getLogger(BaseExceptionMapper.class);

    @Context
    private HttpServletRequest request;

    private ExcetionWrapper    excetionWrapper;

    public BaseExceptionMapper() {
    }

    public BaseExceptionMapper(ExcetionWrapper excetionWrapper) {
        super();
        this.excetionWrapper = excetionWrapper;
    }

    @Override
    public Response toResponse(Exception e) {

        WrapperResponseEntity response = null;
        if (e instanceof NotFoundException) {
            response = new WrapperResponseEntity(ResponseCode.NOT_FOUND);
        } else if (e instanceof NotAllowedException) {
            response = new WrapperResponseEntity(ResponseCode.FORBIDDEN);
        } else if (e instanceof JsonProcessingException) {
            response = new WrapperResponseEntity(ResponseCode.ERROR_JSON);
        } else if (e instanceof NotSupportedException) {
            response = new WrapperResponseEntity(ResponseCode.UNSUPPORTED_MEDIA_TYPE);
        } else {
            response = excetionWrapper != null ? excetionWrapper.toResponse(e) : null;
            if (response == null)
                response = new WrapperResponseEntity(ResponseCode.INTERNAL_SERVER_ERROR);
        }
        return Response.status(response.httpStatus()).type(MediaType.APPLICATION_JSON)
            .entity(response).build();
    }

}


text:
using System;
using System.IO;
using Exceptionless.Core;
using Foundatio.Jobs;
using Foundatio.Logging;

namespace EventUserDescriptionsJob {
    public class Program {
        public static int Main(string[] args) {
            var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\..\..\Api\App_Data");
            if (Directory.Exists(path))
                AppDomain.CurrentDomain.SetData("DataDirectory", path);

            Logger.SetMinimumLogLevel(Settings.Current.MinimumLogLevel);

            return JobRunner.RunInConsole(new JobRunOptions {
                JobType = typeof(Exceptionless.Core.Jobs.EventUserDescriptionsJob),
                ServiceProviderTypeName = "Exceptionless.Insulation.Jobs.FoundatioBootstrapper,Exceptionless.Insulation",
                InstanceCount = 1,
                Interval = TimeSpan.Zero,
                InitialDelay = TimeSpan.FromSeconds(3),
                RunContinuous = true
            });
        }
    }
}