text:
if ($PSVersionTable.PSVersion.Major -le 2)
{
    function Exit-CoverageAnalysis { }
    function Get-CoverageReport { }
    function Show-CoverageReport { }
    function Enter-CoverageAnalysis {
        param ( $CodeCoverage )

        if ($CodeCoverage) { & $SafeCommands['Write-Error'] 'Code coverage analysis requires PowerShell 3.0 or later.' }
    }

    return
}

function Enter-CoverageAnalysis
{
    [CmdletBinding()]
    param (
        [object[]] $CodeCoverage,
        [object] $PesterState
    )

    $coverageInfo =
    foreach ($object in $CodeCoverage)
    {
        Get-CoverageInfoFromUserInput -InputObject $object
    }

    $PesterState.CommandCoverage = @(Get-CoverageBreakpoints -CoverageInfo $coverageInfo)
}

function Exit-CoverageAnalysis
{
    param ([object] $PesterState)

    & $SafeCommands['Set-StrictMode'] -Off

    $breakpoints = @($PesterState.CommandCoverage.Breakpoint) -ne $null
    if ($breakpoints.Count -gt 0)
    {
        & $SafeCommands['Remove-PSBreakpoint'] -Breakpoint $breakpoints
    }
}

function Get-CoverageInfoFromUserInput
{
    param (
        [Parameter(Mandatory = $true)]
        [object]
        $InputObject
    )

    if ($InputObject -is [System.Collections.IDictionary])
    {
        $unresolvedCoverageInfo = Get-CoverageInfoFromDictionary -Dictionary $InputObject
    }
    else
    {
        $unresolvedCoverageInfo = New-CoverageInfo -Path ([string]$InputObject)
    }

    Resolve-CoverageInfo -UnresolvedCoverageInfo $unresolvedCoverageInfo
}

function New-CoverageInfo
{
    param ([string] $Path, [string] $Function = $null, [int] $StartLine = 0, [int] $EndLine = 0)

    return [pscustomobject]@{
        Path = $Path
        Function = $Function
        StartLine = $StartLine
        EndLine = $EndLine
    }
}

function Get-CoverageInfoFromDictionary
{
    param ([System.Collections.IDictionary] $Dictionary)

    [string] $path = Get-DictionaryValueFromFirstKeyFound -Dictionary $Dictionary -Key 'Path', 'p'
    if ([string]::IsNullOrEmpty($path))
    {
        throw "Coverage value '$Dictionary' is missing required Path key."
    }

    $startLine = Get-DictionaryValueFromFirstKeyFound -Dictionary $Dictionary -Key 'StartLine', 'Start', 's'
    $endLine = Get-DictionaryValueFromFirstKeyFound -Dictionary $Dictionary -Key 'EndLine', 'End', 'e'
    [string] $function = Get-DictionaryValueFromFirstKeyFound -Dictionary $Dictionary -Key 'Function', 'f'

    $startLine = Convert-UnknownValueToInt -Value $startLine -DefaultValue 0
    $endLine = Convert-UnknownValueToInt -Value $endLine -DefaultValue 0

    return New-CoverageInfo -Path $path -StartLine $startLine -EndLine $endLine -Function $function
}

function Convert-UnknownValueToInt
{
    param ([object] $Value, [int] $DefaultValue = 0)

    try
    {
        return [int] $Value
    }
    catch
    {
        return $DefaultValue
    }
}

function Resolve-CoverageInfo
{
    param ([psobject] $UnresolvedCoverageInfo)

    $path = $UnresolvedCoverageInfo.Path

    try
    {
        $resolvedPaths = & $SafeCommands['Resolve-Path'] -Path $path -ErrorAction Stop
    }
    catch
    {
        & $SafeCommands['Write-Error'] "Could not resolve coverage path '$path': $($_.Exception.Message)"
        return
    }

    $filePaths =
    foreach ($resolvedPath in $resolvedPaths)
    {
        $item = & $SafeCommands['Get-Item'] -LiteralPath $resolvedPath
        if ($item -is [System.IO.FileInfo] -and ('.ps1','.psm1') -contains $item.Extension)
        {
            $item.FullName
        }
        elseif (-not $item.PsIsContainer)
        {
            & $SafeCommands['Write-Warning'] "CodeCoverage path '$path' resolved to a non-PowerShell file '$($item.FullName)'; this path will not be part of the coverage report."
        }
    }

    $params = @{
        StartLine = $UnresolvedCoverageInfo.StartLine
        EndLine = $UnresolvedCoverageInfo.EndLine
        Function = $UnresolvedCoverageInfo.Function
    }

    foreach ($filePath in $filePaths)
    {
        $params['Path'] = $filePath
        New-CoverageInfo @params
    }
}

function Get-CoverageBreakpoints
{
    [CmdletBinding()]
    param (
        [object[]] $CoverageInfo
    )

    $fileGroups = @($CoverageInfo | & $SafeCommands['Group-Object'] -Property Path)
    foreach ($fileGroup in $fileGroups)
    {
        & $SafeCommands['Write-Verbose'] "Initializing code coverage analysis for file '$($fileGroup.Name)'"
        $totalCommands = 0
        $analyzedCommands = 0

        :commandLoop
        foreach ($command in Get-CommandsInFile -Path $fileGroup.Name)
        {
            $totalCommands++

            foreach ($coverageInfoObject in $fileGroup.Group)
            {
                if (Test-CoverageOverlapsCommand -CoverageInfo $coverageInfoObject -Command $command)
                {
                    $analyzedCommands++
                    New-CoverageBreakpoint -Command $command
                    continue commandLoop
                }
            }
        }

        & $SafeCommands['Write-Verbose'] "Analyzing $analyzedCommands of $totalCommands commands in file '$($fileGroup.Name)' for code coverage"
    }
}

function Get-CommandsInFile
{
    param ([string] $Path)

    $errors = $null
    $tokens = $null
    $ast = [System.Management.Automation.Language.Parser]::ParseFile($Path, [ref] $tokens, [ref] $errors)

    if ($PSVersionTable.PSVersion.Major -ge 5)
    {
        # In PowerShell 5.0, dynamic keywords for DSC configurations are represented by the DynamicKeywordStatementAst
        # class.  They still trigger breakpoints, but are not a child class of CommandBaseAst anymore.

        $predicate = {
            $args[0] -is [System.Management.Automation.Language.DynamicKeywordStatementAst] -or
            $args[0] -is [System.Management.Automation.Language.CommandBaseAst]
        }
    }
    else
    {
        $predicate = { $args[0] -is [System.Management.Automation.Language.CommandBaseAst] }
    }

    $searchNestedScriptBlocks = $true
    $ast.FindAll($predicate, $searchNestedScriptBlocks)
}

function Test-CoverageOverlapsCommand
{
    param ([object] $CoverageInfo, [System.Management.Automation.Language.Ast] $Command)

    if ($CoverageInfo.Function)
    {
        Test-CommandInsideFunction -Command $Command -Function $CoverageInfo.Function
    }
    else
    {
        Test-CoverageOverlapsCommandByLineNumber @PSBoundParameters
    }

}

function Test-CommandInsideFunction
{
    param ([System.Management.Automation.Language.Ast] $Command, [string] $Function)

    for ($ast = $Command; $null -ne $ast; $ast = $ast.Parent)
    {
        $functionAst = $ast -as [System.Management.Automation.Language.FunctionDefinitionAst]
        if ($null -ne $functionAst -and $functionAst.Name -like $Function)
        {
            return $true
        }
    }

    return $false
}

function Test-CoverageOverlapsCommandByLineNumber
{
    param ([object] $CoverageInfo, [System.Management.Automation.Language.Ast] $Command)

    $commandStart = $Command.Extent.StartLineNumber
    $commandEnd = $Command.Extent.EndLineNumber
    $coverStart = $CoverageInfo.StartLine
    $coverEnd = $CoverageInfo.EndLine

    # An EndLine value of 0 means to cover the entire rest of the file from StartLine
    # (which may also be 0)
    if ($coverEnd -le 0) { $coverEnd = [int]::MaxValue }

    return (Test-RangeContainsValue -Value $commandStart -Min $coverStart -Max $coverEnd) -or
           (Test-RangeContainsValue -Value $commandEnd -Min $coverStart -Max $coverEnd)
}

function Test-RangeContainsValue
{
    param ([int] $Value, [int] $Min, [int] $Max)
    return $Value -ge $Min -and $Value -le $Max
}

function New-CoverageBreakpoint
{
    param ([System.Management.Automation.Language.Ast] $Command)

    if (IsIgnoredCommand -Command $Command) { return }

    $params = @{
        Script = $Command.Extent.File
        Line   = $Command.Extent.StartLineNumber
        Column = $Command.Extent.StartColumnNumber
        Action = { }
    }

    $breakpoint = & $SafeCommands['Set-PSBreakpoint'] @params

    [pscustomobject] @{
        File       = $Command.Extent.File
        Function   = Get-ParentFunctionName -Ast $Command
        Line       = $Command.Extent.StartLineNumber
        Command    = Get-CoverageCommandText -Ast $Command
        Breakpoint = $breakpoint
    }
}

function IsIgnoredCommand
{
    param ([System.Management.Automation.Language.Ast] $Command)

    if (-not $Command.Extent.File)
    {
        # This can happen if the script contains "configuration" or any similarly implemented
        # dynamic keyword.  PowerShell modifies the script code and reparses it in memory, leading
        # to AST elements with no File in their Extent.
        return $true
    }

    if ($PSVersionTable.PSVersion.Major -ge 4)
    {
        if ($Command.Extent.Text -eq 'Configuration')
        {
            # More DSC voodoo.  Calls to "configuration" generate breakpoints, but their HitCount
            # stays zero (even though they are executed.)  For now, ignore them, unless we can come
            # up with a better solution.
            return $true
        }

        if (IsChildOfHashtableDynamicKeyword -Command $Command)
        {
            # The lines inside DSC resource declarations don't trigger their breakpoints when executed,
            # just like the "configuration" keyword itself.  I don't know why, at this point, but just like
            # configuration, we'll ignore it so it doesn't clutter up the coverage analysis with useless junk.
            return $true
        }
    }

    if (IsClosingLoopCondition -Command $Command)
    {
        # For some reason, the closing expressions of do/while and do/until loops don't trigger their breakpoints.
        # To avoid useless clutter, we'll ignore those lines as well.
        return $true
    }

    return $false
}

function IsChildOfHashtableDynamicKeyword
{
    param ([System.Management.Automation.Language.Ast] $Command)

    for ($ast = $Command.Parent; $null -ne $ast; $ast = $ast.Parent)
    {
        if ($PSVersionTable.PSVersion.Major -ge 5)
        {
            # The ast behaves differently for DSC resources with version 5+.  There's a new DynamicKeywordStatementAst class,
            # and they no longer are represented by CommandAst objects.

            if ($ast -is [System.Management.Automation.Language.DynamicKeywordStatementAst] -and
                $ast.CommandElements[-1] -is [System.Management.Automation.Language.HashtableAst])
            {
                return $true
            }
        }
        else
        {
            if ($ast -is [System.Management.Automation.Language.CommandAst] -and
                $null -ne $ast.DefiningKeyword -and
                $ast.DefiningKeyword.BodyMode -eq [System.Management.Automation.Language.DynamicKeywordBodyMode]::Hashtable)
            {
                return $true
            }
        }
    }

    return $false
}

function IsClosingLoopCondition
{
    param ([System.Management.Automation.Language.Ast] $Command)

    $ast = $Command

    while ($null -ne $ast.Parent)
    {
        if (($ast.Parent -is [System.Management.Automation.Language.DoWhileStatementAst] -or
            $ast.Parent -is [System.Management.Automation.Language.DoUntilStatementAst]) -and
            $ast.Parent.Condition -eq $ast)
        {
            return $true
        }

        $ast = $ast.Parent
    }

    return $false
}

function Get-ParentFunctionName
{
    param ([System.Management.Automation.Language.Ast] $Ast)

    $parent = $Ast.Parent

    while ($null -ne $parent -and $parent -isnot [System.Management.Automation.Language.FunctionDefinitionAst])
    {
        $parent = $parent.Parent
    }

    if ($null -eq $parent)
    {
        return ''
    }
    else
    {
        return $parent.Name
    }
}

function Get-CoverageCommandText
{
    param ([System.Management.Automation.Language.Ast] $Ast)

    $reportParentExtentTypes = @(
        [System.Management.Automation.Language.ReturnStatementAst]
        [System.Management.Automation.Language.ThrowStatementAst]
        [System.Management.Automation.Language.AssignmentStatementAst]
        [System.Management.Automation.Language.IfStatementAst]
    )

    $parent = Get-ParentNonPipelineAst -Ast $Ast

    if ($null -ne $parent)
    {
        if ($parent -is [System.Management.Automation.Language.HashtableAst])
        {
            return Get-KeyValuePairText -HashtableAst $parent -ChildAst $Ast
        }
        elseif ($reportParentExtentTypes -contains $parent.GetType())
        {
            return $parent.Extent.Text
        }
    }

    return $Ast.Extent.Text
}

function Get-ParentNonPipelineAst
{
    param ([System.Management.Automation.Language.Ast] $Ast)

    $parent = $null
    if ($null -ne $Ast) { $parent = $Ast.Parent }

    while ($parent -is [System.Management.Automation.Language.PipelineAst])
    {
        $parent = $parent.Parent
    }

    return $parent
}

function Get-KeyValuePairText
{
    param (
        [System.Management.Automation.Language.HashtableAst] $HashtableAst,
        [System.Management.Automation.Language.Ast] $ChildAst
    )

    & $SafeCommands['Set-StrictMode'] -Off

    foreach ($keyValuePair in $HashtableAst.KeyValuePairs)
    {
        if ($keyValuePair.Item2.PipelineElements -contains $ChildAst)
        {
            return '{0} = {1}' -f $keyValuePair.Item1.Extent.Text, $keyValuePair.Item2.Extent.Text
        }
    }

    # This shouldn't happen, but just in case, default to the old output of just the expression.
    return $ChildAst.Extent.Text
}

function Get-CoverageMissedCommands
{
    param ([object[]] $CommandCoverage)
    $CommandCoverage | & $SafeCommands['Where-Object'] { $_.Breakpoint.HitCount -eq 0 }
}

function Get-CoverageHitCommands
{
    param ([object[]] $CommandCoverage)
    $CommandCoverage | & $SafeCommands['Where-Object'] { $_.Breakpoint.HitCount -gt 0 }
}

function Get-CoverageReport
{
    param ([object] $PesterState)

    $totalCommandCount = $PesterState.CommandCoverage.Count

    $missedCommands = @(Get-CoverageMissedCommands -CommandCoverage $PesterState.CommandCoverage | & $SafeCommands['Select-Object'] File, Line, Function, Command)
    $hitCommands = @(Get-CoverageHitCommands -CommandCoverage $PesterState.CommandCoverage | & $SafeCommands['Select-Object'] File, Line, Function, Command)
    $analyzedFiles = @($PesterState.CommandCoverage | & $SafeCommands['Select-Object'] -ExpandProperty File -Unique)
    $fileCount = $analyzedFiles.Count

    $executedCommandCount = $totalCommandCount - $missedCommands.Count

    [pscustomobject] @{
        NumberOfCommandsAnalyzed = $totalCommandCount
        NumberOfFilesAnalyzed    = $fileCount
        NumberOfCommandsExecuted = $executedCommandCount
        NumberOfCommandsMissed   = $missedCommands.Count
        MissedCommands           = $missedCommands
        HitCommands              = $hitCommands
        AnalyzedFiles            = $analyzedFiles
    }
}

function Show-CoverageReport
{
    param ([object] $CoverageReport)

    if ($null -eq $CoverageReport -or $CoverageReport.NumberOfCommandsAnalyzed -eq 0)
    {
        return
    }

    $totalCommandCount = $CoverageReport.NumberOfCommandsAnalyzed
    $fileCount = $CoverageReport.NumberOfFilesAnalyzed
    $executedPercent = ($CoverageReport.NumberOfCommandsExecuted / $CoverageReport.NumberOfCommandsAnalyzed).ToString("P2")

    $commandPlural = $filePlural = ''
    if ($totalCommandCount -gt 1) { $commandPlural = 's' }
    if ($fileCount -gt 1) { $filePlural = 's' }

    $commonParent = Get-CommonParentPath -Path $CoverageReport.AnalyzedFiles
    $report = $CoverageReport.MissedCommands | & $SafeCommands['Select-Object'] -Property @(
        @{ Name = 'File'; Expression = { Get-RelativePath -Path $_.File -RelativeTo $commonParent } }
        'Function'
        'Line'
        'Command'
    )

    Write-Screen ''
    Write-Screen 'Code coverage report:'
    Write-Screen "Covered $executedPercent of $totalCommandCount analyzed command$commandPlural in $fileCount file$filePlural."

    if ($CoverageReport.MissedCommands.Count -gt 0)
    {
        Write-Screen ''
        Write-Screen 'Missed commands:'
        $report | & $SafeCommands['Format-Table'] -AutoSize | & $SafeCommands['Out-String'] | Write-Screen
    }
}

function Get-CommonParentPath
{
    param ([string[]] $Path)

    $pathsToTest = @( $Path | & $SafeCommands['Select-Object'] -Unique )

    if ($pathsToTest.Count -gt 0)
    {
        $parentPath = & $SafeCommands['Split-Path'] -Path $pathsToTest[0] -Parent

        while ($parentPath.Length -gt 0)
        {
            $nonMatches = $pathsToTest -notmatch "^$([regex]::Escape($parentPath))"

            if ($nonMatches.Count -eq 0)
            {
                return $parentPath
            }
            else
            {
                $parentPath = & $SafeCommands['Split-Path'] -Path $parentPath -Parent
            }
        }
    }

    return [string]::Empty
}

function Get-RelativePath
{
    param ( [string] $Path, [string] $RelativeTo )
    return $Path -replace "^$([regex]::Escape($RelativeTo))\\?"
}


text:
using System.Threading.Tasks;
using AVF.MemberManagement.StandardLibrary.Tbo;
using AVF.MemberManagement.ReportsBusinessLogic;

namespace AVF.MemberManagement.Console
{
    class Mitgliederbeitraege
    {
        internal async Task Main( )
        {
            OutputTarget oTarget = new OutputTarget( "Mitgliederbeitraege.txt" );

            decimal decHalbjahresSumme = 0;
            int iLfdNr = 0;

            foreach (Mitglied mitglied in Globals.DatabaseWrapper.P_mitglieder)
            {
                if (mitglied.Faktor > 0)
                {
                    int iProzentsatz = Globals.DatabaseWrapper.Familienrabatt(mitglied);
                    if ( iProzentsatz > 0 )
                    {
                        decimal decStdJahresbeitrag  = Globals.DatabaseWrapper.BK(mitglied).Beitrag;
                        decimal decJahresbeitrag     = decStdJahresbeitrag * iProzentsatz / 100;
                        decimal decHalbjahresbeitrag = decJahresbeitrag / 2;
                        decHalbjahresSumme += decHalbjahresbeitrag;
                        oTarget.Write($"{ ++iLfdNr, 3}  ");
                        oTarget.WriteMitglied( mitglied) ;
                        oTarget.Write($"{ Globals.DatabaseWrapper.BK_Text(mitglied),3} ");
                        oTarget.WriteAmount( decJahresbeitrag );
                        oTarget.Write($"{ mitglied.Familienmitglied } ");
                        oTarget.WriteAmount( decHalbjahresbeitrag );
                        oTarget.WriteLine();
                    }
                }
            }

            oTarget.WriteLine();
            oTarget.WriteLine("Halbjahressumme: ");
            oTarget.WriteAmount( decHalbjahresSumme );

            oTarget.CloseAndReset2Console();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Copy the `xml-parser.lua` file to your project's root directory, then import the module.

`local xml = require('xml-parser.lua')`

## Example

```
local xml = require('xml-parser.lua')

local xmlString = [[
	<Envelop>
		<Foo></Foo>
		<Bar ID="101"></Bar>
	</Evenlop>
]]

local xmlTable = xml.parse(xmlString)

print(xmlTable.children[1].name)
-- Output:
-- Foo

print(xmlTable:find('Bar').attributes['ID'])
-- Output:
-- 101

print(xml.prettyPrint(xmlTable))
-- Output:
-- <Envelop>
--     <Foo></Foo>
--     <Bar ID="101"></Bar>
-- </Evenlop>
```

## License

Lua XML Parser is distributed under the MIT License, meaning that you are free to use it in your free or proprietary software.


text:
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'

require_relative '../../config/environment'
require 'rspec/rails'
require 'rspec/autorun'

require 'support/focused_specs'

require 'capybara/rspec'

# Require all files in spec/features/support/
support_file_paths = File.expand_path('support/**/*.rb',
                                      File.dirname(__FILE__))
Dir[support_file_paths].each {|f| require f}

RSpec.configure do |config|
  config.use_transactional_fixtures = true
  config.infer_base_class_for_anonymous_controllers = false
  config.order = "random"
end


text:
package org.opensaml.xml.encryption.impl;

/**
 * A thread-safe Marshaller for {@link org.opensaml.xml.encryption.DHKeyValue} objects.
 */
public class DHKeyValueMarshaller extends AbstractXMLEncryptionMarshaller {

}


text:
class Cook extends Restaurant.Agent {

    Cook(String name) {
        super(name);
        this.setDaemon(true);
    }

    @Override public void run() {
        try {
            while (true) {
                Order order = Order.begin();
                act("cooking " + order, 12000);
                order.serve();
            }
        } catch (InterruptedException e) {
            log("got fired from the restaurant");
        }
    }
}


text:
{% if page.mediaplayer == true %}
<script>
$('audio,video').mediaelementplayer();
</script>
{% endif %}

<!-- jQuery -->
<script src="{{ site.url }}{{ site.baseurl }}/assets/js/javascript.min.js"></script>
<!-- lazy load -->
<script src="{{ site.url }}{{ site.baseurl }}/assets/js/jquery.lazyload.min.js"></script>

<script type="text/javascript">
// make all external links open in a new browser tab
// code credit: https://css-tricks.com/snippets/jquery/open-external-links-in-new-window/
$(function(){
  $('a').each(function() {
     var a = new RegExp('/' + window.location.host + '/');
     if(!a.test(this.href)) {
         $(this).click(function(event) {
             event.preventDefault();
             event.stopPropagation();
             window.open(this.href, '_blank');
         });
     }
  });

  // lazy load images with class "lazy"
  $("img.lazy").lazyload({
    threshold: 200,
    effect: "fadeIn"
  });
});

</script>

{% if page.url == '/work/' %}
<script src="{{ site.url }}{{ site.baseurl }}/assets/js/isotope.pkgd.js"></script>
<script src="{{ site.url }}{{ site.baseurl }}/assets/js/packery-mode.pkgd.js"></script>
<script src="{{ site.url }}{{ site.baseurl }}/assets/js/imagesloaded.pkgd.js"></script>
<script src="{{ site.url }}{{ site.baseurl }}/assets/js/theme.js"></script>
{% endif %}

{% if page.header.image_fullwidth %}
<script>
    $("#masthead").backstretch("{{ site.urlimg }}{{ page.header.image_fullwidth }}", {fade: 700});
    $("#masthead-with-text").backstretch("{{ site.urlimg }}{{ page.header.image_fullwidth }}", {fade: 700});
</script>
{% endif %}

{% if site.google_analytics_tracking_id %}
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', '{{ site.google_analytics_tracking_id }}', 'auto');
  ga('set', 'anonymizeIp', true);
  ga('send', 'pageview');

</script>
{% endif %}

{% comment %}
#  Start of Tawk.to Script
#
#  More information in _config.yml
#
{% endcomment %}
{% if site.tawkto_embed_uri and page.tawkto == true %}
<script type="text/javascript">
var $_Tawk_API={},$_Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='{{ site.tawkto_embed_uri }}';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
{% endif %}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
    <edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="2.0">
        <Schema Namespace="NuGet.Server.DataServices" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2006/04/edm">
            <EntityType Name="Package" m:HasStream="true">
                <Key>
                    <PropertyRef Name="Id" />
                    <PropertyRef Name="Version" />
                </Key>
                <Property Name="Id" Type="Edm.String" Nullable="false" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text" m:FC_KeepInContent="false" />

                <Property Name="Version" Type="Edm.String" Nullable="false" />
                <Property Name="Title" Type="Edm.String" Nullable="true" />
                <Property Name="Authors" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationAuthorName" m:FC_ContentKind="text" m:FC_KeepInContent="false" />
                <Property Name="IconUrl" Type="Edm.String" Nullable="true" />
                <Property Name="LicenseUrl" Type="Edm.String" Nullable="true" />
                <Property Name="ProjectUrl" Type="Edm.String" Nullable="true" />
                <Property Name="ReportAbuseUrl" Type="Edm.String" Nullable="true" />
                <Property Name="DownloadCount" Type="Edm.Int32" Nullable="false" />
                <Property Name="VersionDownloadCount" Type="Edm.Int32" Nullable="false" />

                <Property Name="RatingsCount" Type="Edm.Int32" Nullable="false" />
                <Property Name="VersionRatingsCount" Type="Edm.Int32" Nullable="false" />
                <Property Name="Rating" Type="Edm.Double" Nullable="false" />
                <Property Name="VersionRating" Type="Edm.Double" Nullable="false" />
                <Property Name="RequireLicenseAcceptance" Type="Edm.Boolean" Nullable="false" />
                <Property Name="Description" Type="Edm.String" Nullable="true" />
                <Property Name="Summary" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationSummary" m:FC_ContentKind="text" m:FC_KeepInContent="false" />
                <Property Name="ReleaseNotes" Type="Edm.String" Nullable="true" />
                <Property Name="Language" Type="Edm.String" Nullable="true" />

                <Property Name="Published" Type="Edm.DateTime" Nullable="false" />
                <Property Name="LastUpdated" Type="Edm.DateTime" Nullable="false" m:FC_TargetPath="SyndicationUpdated" m:FC_ContentKind="text" m:FC_KeepInContent="false" />
                <Property Name="Price" Type="Edm.Decimal" Nullable="false" />
                <Property Name="Dependencies" Type="Edm.String" Nullable="true" />
                <Property Name="PackageHash" Type="Edm.String" Nullable="true" />
                <Property Name="PackageSize" Type="Edm.Int64" Nullable="false" />
                <Property Name="ExternalPackageUri" Type="Edm.String" Nullable="true" />
                <Property Name="Categories" Type="Edm.String" Nullable="true" />
                <Property Name="Copyright" Type="Edm.String" Nullable="true" />

                <Property Name="PackageType" Type="Edm.String" Nullable="true" />
                <Property Name="Tags" Type="Edm.String" Nullable="true" />
                <Property Name="IsLatestVersion" Type="Edm.Boolean" Nullable="false" />
            </EntityType>
            <EntityContainer Name="PackageContext" m:IsDefaultEntityContainer="true">
                <EntitySet Name="Packages" EntityType="NuGet.Server.DataServices.Package" />
                <FunctionImport Name="Search" EntitySet="Packages" ReturnType="Collection(NuGet.Server.DataServices.Package)" m:HttpMethod="GET">
                    <Parameter Name="searchTerm" Type="Edm.String" Mode="In" />
                    <Parameter Name="targetFramework" Type="Edm.String" Mode="In" />
                </FunctionImport>
            </EntityContainer>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>


text:
aldeed:autoform-bs-button-group-input
=========================

An add-on Meteor package for [aldeed:autoform](https://github.com/aldeed/meteor-autoform). Provides a Bootstrap button group theme for the "select-checkbox", "select-radio", and "boolean-radios" AutoForm input types.

## Installation

In a Meteor app directory, enter:

```bash
$ meteor add aldeed:autoform-bs-button-group-input
```

## Usage

Specify "select-checkbox" or "select-radio" or "boolean-radios" for the `type` attribute of any input, and then specify "buttonGroup" as the `template` attribute.

```js
{{> afQuickField name="plans" type="select-radio" template="buttonGroup" value=2 label=false}}
```

## Contributing

Anyone is welcome to contribute. Fork, make your changes, and then submit a pull request.


text:
require 'bigdecimal'

describe "BigDecimal#-" do

  before(:each) do
    @one = BigDecimal("1")
    @zero = BigDecimal("0")
    @two = BigDecimal("2")
    @nan = BigDecimal("NaN")
    @infinity = BigDecimal("Infinity")
    @infinity_minus = BigDecimal("-Infinity")
    @one_minus = BigDecimal("-1")
    @frac_1 = BigDecimal("1E-99999")
    @frac_2 = BigDecimal("0.9E-99999")
  end

  it "returns a - b" do
    (@two - @one).should == @one
    (@one - @two).should == @one_minus
    (@one - @one_minus).should == @two
    (@frac_2 - @frac_1).should == BigDecimal("-0.1E-99999")
    (@two - @two).should == @zero
    (@frac_1 - @frac_1).should == @zero
    (BigDecimal('1.23456789') - BigDecimal('1.2')).should == BigDecimal("0.03456789")
  end

  it "returns NaN if NaN is involved" do
    (@one - @nan).nan?.should == true
    (@nan - @one).nan?.should == true
    (@nan - @nan).nan?.should == true
    (@nan - @infinity).nan?.should == true
    (@nan - @infinity_minus).nan?.should == true
    (@infinity - @nan).nan?.should == true
    (@infinity_minus - @nan).nan?.should == true
  end

  it "returns NaN both operands are infinite with the same sign" do
    (@infinity - @infinity).nan?.should == true
    (@infinity_minus - @infinity_minus).nan?.should == true
  end

  it "returns Infinity or -Infinity if these are involved" do
    (@infinity - @infinity_minus).should == @infinity
    (@infinity_minus - @infinity).should == @infinity_minus

    (@infinity - @zero).should == @infinity
    (@infinity - @frac_2).should == @infinity
    (@infinity - @two).should == @infinity
    (@infinity - @one_minus).should == @infinity

    (@zero - @infinity).should == @infinity_minus
    (@frac_2 - @infinity).should == @infinity_minus
    (@two - @infinity).should == @infinity_minus
    (@one_minus - @infinity).should == @infinity_minus
  end

end


text:
/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */

#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>

#include "vtkPointSetAlgorithmWrap.h"
#include "vtkDistanceToCameraWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkRendererWrap.h"
#include "../../plus/plus.h"

using namespace v8;

extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap;
Nan::Persistent<v8::FunctionTemplate> VtkDistanceToCameraWrap::ptpl;

VtkDistanceToCameraWrap::VtkDistanceToCameraWrap()
{ }

VtkDistanceToCameraWrap::VtkDistanceToCameraWrap(vtkSmartPointer<vtkDistanceToCamera> _native)
{ native = _native; }

VtkDistanceToCameraWrap::~VtkDistanceToCameraWrap()
{ }

void VtkDistanceToCameraWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkDistanceToCamera").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("DistanceToCamera").ToLocalChecked(), ConstructorGetter);
}

void VtkDistanceToCameraWrap::ConstructorGetter(
	v8::Local<v8::String> property,
	const Nan::PropertyCallbackInfo<v8::Value>& info)
{
	InitPtpl();
	info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction());
}

void VtkDistanceToCameraWrap::InitPtpl()
{
	if (!ptpl.IsEmpty()) return;
	v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
	VtkPointSetAlgorithmWrap::InitPtpl( );
	tpl->Inherit(Nan::New<FunctionTemplate>(VtkPointSetAlgorithmWrap::ptpl));
	tpl->SetClassName(Nan::New("VtkDistanceToCameraWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

	Nan::SetPrototypeMethod(tpl, "GetDistanceArrayName", GetDistanceArrayName);
	Nan::SetPrototypeMethod(tpl, "getDistanceArrayName", GetDistanceArrayName);

	Nan::SetPrototypeMethod(tpl, "GetRenderer", GetRenderer);
	Nan::SetPrototypeMethod(tpl, "getRenderer", GetRenderer);

	Nan::SetPrototypeMethod(tpl, "GetScaling", GetScaling);
	Nan::SetPrototypeMethod(tpl, "getScaling", GetScaling);

	Nan::SetPrototypeMethod(tpl, "GetScreenSize", GetScreenSize);
	Nan::SetPrototypeMethod(tpl, "getScreenSize", GetScreenSize);

	Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance);
	Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance);

	Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast);
	Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast);

	Nan::SetPrototypeMethod(tpl, "ScalingOff", ScalingOff);
	Nan::SetPrototypeMethod(tpl, "scalingOff", ScalingOff);

	Nan::SetPrototypeMethod(tpl, "ScalingOn", ScalingOn);
	Nan::SetPrototypeMethod(tpl, "scalingOn", ScalingOn);

	Nan::SetPrototypeMethod(tpl, "SetDistanceArrayName", SetDistanceArrayName);
	Nan::SetPrototypeMethod(tpl, "setDistanceArrayName", SetDistanceArrayName);

	Nan::SetPrototypeMethod(tpl, "SetRenderer", SetRenderer);
	Nan::SetPrototypeMethod(tpl, "setRenderer", SetRenderer);

	Nan::SetPrototypeMethod(tpl, "SetScaling", SetScaling);
	Nan::SetPrototypeMethod(tpl, "setScaling", SetScaling);

	Nan::SetPrototypeMethod(tpl, "SetScreenSize", SetScreenSize);
	Nan::SetPrototypeMethod(tpl, "setScreenSize", SetScreenSize);

#ifdef VTK_NODE_PLUS_VTKDISTANCETOCAMERAWRAP_INITPTPL
	VTK_NODE_PLUS_VTKDISTANCETOCAMERAWRAP_INITPTPL
#endif
	ptpl.Reset( tpl );
}

void VtkDistanceToCameraWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	if(!info.IsConstructCall())
	{
		Nan::ThrowError("Constructor not called in a construct call.");
		return;
	}

	if(info.Length() == 0)
	{
		vtkSmartPointer<vtkDistanceToCamera> native = vtkSmartPointer<vtkDistanceToCamera>::New();
		VtkDistanceToCameraWrap* obj = new VtkDistanceToCameraWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

	info.GetReturnValue().Set(info.This());
}

void VtkDistanceToCameraWrap::GetDistanceArrayName(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	char const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetDistanceArrayName();
	info.GetReturnValue().Set(Nan::New(r).ToLocalChecked());
}

void VtkDistanceToCameraWrap::GetRenderer(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	vtkRenderer * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetRenderer();
	VtkRendererWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkRendererWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkRendererWrap *w = new VtkRendererWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkDistanceToCameraWrap::GetScaling(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	bool r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetScaling();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkDistanceToCameraWrap::GetScreenSize(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetScreenSize();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkDistanceToCameraWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	vtkDistanceToCamera * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->NewInstance();
	VtkDistanceToCameraWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkDistanceToCameraWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkDistanceToCameraWrap *w = new VtkDistanceToCameraWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkDistanceToCameraWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0]))
	{
		VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject());
		vtkDistanceToCamera * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->SafeDownCast(
			(vtkObjectBase *) a0->native.GetPointer()
		);
		VtkDistanceToCameraWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkDistanceToCameraWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkDistanceToCameraWrap *w = new VtkDistanceToCameraWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkDistanceToCameraWrap::ScalingOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ScalingOff();
}

void VtkDistanceToCameraWrap::ScalingOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ScalingOn();
}

void VtkDistanceToCameraWrap::SetDistanceArrayName(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsString())
	{
		Nan::Utf8String a0(info[0]);
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetDistanceArrayName(
			*a0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkDistanceToCameraWrap::SetRenderer(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkRendererWrap::ptpl))->HasInstance(info[0]))
	{
		VtkRendererWrap *a0 = ObjectWrap::Unwrap<VtkRendererWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetRenderer(
			(vtkRenderer *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkDistanceToCameraWrap::SetScaling(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsBoolean())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetScaling(
			info[0]->BooleanValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkDistanceToCameraWrap::SetScreenSize(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkDistanceToCameraWrap *wrapper = ObjectWrap::Unwrap<VtkDistanceToCameraWrap>(info.Holder());
	vtkDistanceToCamera *native = (vtkDistanceToCamera *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsNumber())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetScreenSize(
			info[0]->NumberValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}


text:
#!/usr/bin/env ruby
#
# Copyright 2015 Google Inc. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require 'fileutils'

while true
  if ARGV[0] == '-s'
    test_serialization = true
    ARGV.shift
  elsif ARGV[0] == '-c'
    ckati = true
    ARGV.shift
    ENV['KATI_VARIANT'] = 'c'
  elsif ARGV[0] == '-n'
    via_ninja = true
    ARGV.shift
  else
    break
  end
end

def get_output_filenames
  files = Dir.glob('*')
  files.delete('Makefile')
  files.delete('build.ninja')
  files.delete('ninja.sh')
  files.delete('gmon.out')
  files.reject!{|f|f =~ /\.json$/}
  files.reject!{|f|f =~ /^kati\.*/}
  files
end

def cleanup
  (get_output_filenames + Dir.glob('.*')).each do |fname|
    next if fname == '.' || fname == '..'
    FileUtils.rm_rf fname
  end
end

def move_circular_dep(l)
  # We don't care when circular dependency detection happens.
  circ = ''
  while l.sub!(/Circular .* dropped\.\n/, '') do
    circ += $&
  end
  circ + l
end

expected_failures = []
unexpected_passes = []
failures = []
passes = []

if !ARGV.empty?
  test_files = ARGV.map do |test|
    "testcase/#{File.basename(test)}"
  end
else
  test_files = Dir.glob('testcase/*.mk').sort
  test_files += Dir.glob('testcase/*.sh').sort
end

def run_in_testdir(test_filename)
  c = File.read(test_filename)
  name = File.basename(test_filename)
  dir = "out/#{name}"

  FileUtils.mkdir_p(dir)
  Dir.glob("#{dir}/*").each do |fname|
    FileUtils.rm_rf(fname)
  end

  Dir.chdir(dir) do
    yield name
  end
end

def normalize_ninja_log(log)
  log.gsub!(/^\[\d+\/\d+\] .*\n/, '')
  log
end

def normalize_make_log(expected)
  expected.gsub!(/^make(?:\[\d+\])?: (Entering|Leaving) directory.*\n/, '')
  expected.gsub!(/^make(?:\[\d+\])?: /, '')
  expected = move_circular_dep(expected)

  # Normalizations for old/new GNU make.
  expected.gsub!(/[`'"]/, '"')
  expected.gsub!(/ (?:commands|recipe) for target /,
                 ' commands for target ')
  expected.gsub!(/ (?:commands|recipe) commences /,
                 ' commands commence ')
  expected.gsub!(' (did you mean TAB instead of 8 spaces?)', '')
  expected.gsub!('Extraneous text after', 'extraneous text after')
  # Not sure if this is useful.
  expected.gsub!(/\s+Stop\.$/, '')
  # GNU make 4.0 has this output.
  expected.gsub!(/Makefile:\d+: commands for target ".*?" failed\n/, '')
  # We treat some warnings as errors.
  expected.gsub!(/Nothing to be done for "test"\.\n/, '')

  expected
end

def normalize_kati_log(output)
  output = move_circular_dep(output)
  # kati specific log messages.
  output.gsub!(/^\*kati\*.*\n/, '')
  output.gsub!(/^c?kati: /, '')
  output.gsub!(/[`'"]/, '"')
  output.gsub!(/(: )(?:open )?(\S+): [Nn](o such file or directory)\nNOTE:.*/,
               "\\1\\2: N\\3\n*** No rule to make target \"\\2\".")
  output.gsub!(/\/bin\/sh: ([^:]*): command not found/,
               "\\1: Command not found")
  output
end

run_make_test = proc do |mk|
  c = File.read(mk)
  expected_failure = c =~ /\A# TODO(?:\((go|c)\))?/
  if $1
    if $1 == 'go' && ckati
      expected_failure = false
    elsif $1 == 'c' && !ckati
      expected_failure = false
    end
  end

  run_in_testdir(mk) do |name|
    # TODO: Fix
    if name =~ /eval_assign/ && ckati
      next
    end

    File.open("Makefile", 'w') do |ofile|
      ofile.print(c)
    end

    expected = ''
    output = ''

    testcases = c.scan(/^test\d*/).sort.uniq
    if testcases.empty?
      testcases = ['']
    end

    cleanup
    testcases.each do |tc|
      cmd = 'make'
      if via_ninja
        cmd += ' -s'
      end
      cmd += " #{tc} 2>&1"
      res = `#{cmd}`
      res = normalize_make_log(res)
      expected += "=== #{tc} ===\n" + res
      expected_files = get_output_filenames
      expected += "\n=== FILES ===\n#{expected_files * "\n"}\n"
    end

    cleanup
    testcases.each do |tc|
      json = "#{tc.empty? ? 'test' : tc}"
      cmd = "../../kati -save_json=#{json}.json -log_dir=."
      if ckati
        cmd = "../../ckati --use_find_emulator"
      end
      if via_ninja
        cmd += ' --ninja'
      end
      cmd += " #{tc} 2>&1"
      res = IO.popen(cmd, 'r:binary', &:read)
      if via_ninja && File.exist?('build.ninja')
        res += normalize_ninja_log(IO.popen('ninja -j1 -v', 'r:binary', &:read))
      end
      res = normalize_kati_log(res)
      output += "=== #{tc} ===\n" + res
      output_files = get_output_filenames
      output += "\n=== FILES ===\n#{output_files * "\n"}\n"
    end

    File.open('out.make', 'w'){|ofile|ofile.print(expected)}
    File.open('out.kati', 'w'){|ofile|ofile.print(output)}

    if expected =~ /FAIL/
      puts %Q(#{name} has a string "FAIL" in its expectation)
      exit 1
    end

    if expected != output
      if expected_failure
        puts "#{name}: FAIL (expected)"
        expected_failures << name
      else
        puts "#{name}: FAIL"
        puts `diff -u out.make out.kati`
        failures << name
      end
    else
      if expected_failure
        puts "#{name}: PASS (unexpected)"
        unexpected_passes << name
      else
        puts "#{name}: PASS"
        passes << name
      end
    end

    if name !~ /^err_/ && test_serialization && !expected_failure
      testcases.each do |tc|
        json = "#{tc.empty? ? 'test' : tc}"
        cmd = "../../kati -save_json=#{json}_2.json -load_json=#{json}.json -n -log_dir=. #{tc} 2>&1"
        res = IO.popen(cmd, 'r:binary', &:read)
        if !File.exist?("#{json}.json") || !File.exist?("#{json}_2.json")
          puts "#{name}##{json}: Serialize failure (not exist)"
          puts res
        else
          json1 = File.read("#{json}.json")
          json2 = File.read("#{json}_2.json")
          if json1 != json2
            puts "#{name}##{json}: Serialize failure"
            puts res
          end
        end
      end
    end
  end
end

run_shell_test = proc do |sh|
  run_in_testdir(sh) do |name|
    cleanup
    cmd = "sh ../../#{sh} make"
    expected = IO.popen(cmd, 'r:binary', &:read)
    cleanup
    cmd = "sh ../../#{sh} ../../kati --use_cache -log_dir=."
    output = IO.popen(cmd, 'r:binary', &:read)

    expected = normalize_make_log(expected)
    output = normalize_kati_log(output)
    File.open('out.make', 'w'){|ofile|ofile.print(expected)}
    File.open('out.kati', 'w'){|ofile|ofile.print(output)}

    if expected != output
      puts "#{name}: FAIL"
      puts `diff -u out.make out.kati`
      failures << name
    else
      puts "#{name}: PASS"
      passes << name
    end
  end
end

test_files.each do |test|
  if /\.mk$/ =~ test
    run_make_test.call(test)
  elsif /\.sh$/ =~ test
    run_shell_test.call(test)
  else
    raise "Unknown test type: #{test}"
  end
end

puts

if !expected_failures.empty?
  puts "=== Expected failures ==="
  expected_failures.each do |n|
    puts n
  end
end

if !unexpected_passes.empty?
  puts "=== Unexpected passes ==="
  unexpected_passes.each do |n|
    puts n
  end
end

if !failures.empty?
  puts "=== Failures ==="
  failures.each do |n|
    puts n
  end
end

puts

if !unexpected_passes.empty? || !failures.empty?
  puts "FAIL! (#{failures.size + unexpected_passes.size} fails #{passes.size} passes)"
else
  puts 'PASS!'
end


text:
namespace v8 {
namespace internal {
namespace compiler {
namespace js_native_context_specialization_unittest {

class JSNativeContextSpecializationTest : public GraphTest {
 public:
  explicit JSNativeContextSpecializationTest(int num_parameters = 1)
      : GraphTest(num_parameters), javascript_(zone()) {}
  ~JSNativeContextSpecializationTest() override {}

 protected:
  JSOperatorBuilder* javascript() { return &javascript_; }

 private:
  JSOperatorBuilder javascript_;
};

TEST_F(JSNativeContextSpecializationTest, GetMaxStringLengthOfString) {
  const size_t str_len = 3;
  const size_t num_len = kBase10MaximalLength + 1;

  Node* const str_node = graph()->NewNode(
      common()->HeapConstant(factory()->InternalizeUtf8String("str")));
  EXPECT_EQ(
      JSNativeContextSpecialization::GetMaxStringLength(broker(), str_node),
      str_len);

  Node* const num_node = graph()->NewNode(common()->NumberConstant(10.0 / 3));
  EXPECT_EQ(
      JSNativeContextSpecialization::GetMaxStringLength(broker(), num_node),
      num_len);
}

}  // namespace js_native_context_specialization_unittest
}  // namespace compiler
}  // namespace internal
}  // namespace v8


text:
<?php

namespace backend\controllers;

use Yii;
use backend\models\LoginForm;

class SiteController extends BackendController {

    public $enableCsrfValidation = true;

    public function actionTest() {

    }

    public function actionError() {
        return $this->render('error');
    }

    public function actionIndex() {
        return $this->render('index');
    }

    public function actionLogin() {
        if (!Yii::$app->user->isGuest) {
            return $this->goHome();
        }

        if (Yii::$app->request->isAjax) {
            $model = new LoginForm();
            if ($model->load(Yii::$app->request->post())) {
                if ($model->validate() && $model->login()) {
                    $this->ajaxSuccess(null, 6);
                } else {
                    $error = $model->getFirstErrors();
                    $type = isset(Yii::$app->session['admin_login_num']) && Yii::$app->session['admin_login_num'] >= Yii::$app->params['admin_login_max_count'] ? 3 : 1;
                    $this->ajaxError(array_values($error)[0], $type); //登录失败3次就自动刷新当前登录页面否则就不刷新
                }
            }
        }

        $this->setLayout();
        return $this->render('login');
    }

    public function actionLogout() {
        Yii::$app->session['user_login_num'] = null;
        Yii::$app->user->logout();
        return $this->goHome();
    }

    public function actionMyInfo() {
        if (Yii::$app->request->isAjax) {
            $model = Yii::$app->user->identity;
            $model->setScenario('my-info');

            if ($model->load(Yii::$app->request->post())) {
                if ($model->validate() && $model->save()) {
                    $this->ajaxSuccess();
                } else {
                    $error = $model->getFirstErrors();
                    $this->ajaxError(array_values($error)[0]);
                }
            }
        }

        $this->setLayout();
        return $this->render('my-info');
    }

    public function actionMyPassword() {
        if (Yii::$app->request->isAjax) {
            $model = Yii::$app->user->identity;
            $model->setScenario('my-password');

            if ($model->load(Yii::$app->request->post())) {
                if ($model->validate() && $model->save()) {
                    $this->ajaxSuccess();
                } else {
                    $error = $model->getFirstErrors();
                    $this->ajaxError(array_values($error)[0]);
                }
            }
        }

        $this->setLayout();
        return $this->render('my-password');
    }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
    <!-- Routing forms -->
    <form name="FindRoutings" type="single" target="FindRouting" title=""
        header-row-style="header-row" default-table-style="table">
        <field name="workEffortId" title="${uiLabelMap.ManufacturingRoutingId}">
            <text-find/>
        </field>
        <field name="workEffortName" title="${uiLabelMap.ManufacturingRoutingName}">
            <text-find/>
        </field>
        <field name="submitButton" title="${uiLabelMap.CommonFind}">
            <submit button-type="button"/>
        </field>
    </form>
    <form name="ListRoutings" type="list" title="" list-name="listIt"
        paginate-target="FindRouting" odd-row-style="alternate-row" default-table-style="table table-hover">
        <actions>
            <set field="entityName" value="WorkEffort"/>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="requestParameters"/>
                <field-map field-name="entityName" from-field="entityName"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <field name="workEffortId" widget-style="btn btn-link" title="${uiLabelMap.ManufacturingRoutingId}">
            <hyperlink description="${workEffortId}" target="EditRouting">
                <parameter param-name="workEffortId"/>
            </hyperlink>
        </field>
        <field name="workEffortName" title="${uiLabelMap.ManufacturingRoutingName}"><display/></field>
        <field name="description"><display/></field>
        <field name="quantityToProduce" title="${uiLabelMap.ManufacturingQuantityToProduce}"><display/></field>
    </form>
    <form name="EditRouting" type="single" target="UpdateRouting" title="" default-map-name="routing"
        header-row-style="header-row" default-table-style="table">
        <alt-target use-when="routing==null" target="CreateRouting"/>
        <field name="workEffortTypeId" use-when="routing==null"><hidden value="ROUTING"/></field>
        <field name="currentStatusId" use-when="routing==null"><hidden value="ROU_ACTIVE"/></field>
        <field name="workEffortId" use-when="routing!=null"><hidden/></field>
        <field name="workEffortName" title="${uiLabelMap.ManufacturingRoutingName}"><text/></field>
        <field name="description"><text/></field>
        <field name="quantityToProduce" title="${uiLabelMap.ManufacturingQuantityToProduce}"><text/></field>
        <field name="submitButton" title="${uiLabelMap.CommonSubmit}">
            <submit button-type="button"/>
        </field>
    </form>

    <!-- Routing Task Forms -->
    <form name="FindRoutingTasks" type="single" target="FindRoutingTask" title=""
         header-row-style="header-row" default-table-style="table">
        <field name="workEffortId" title="${uiLabelMap.ManufacturingRoutingTaskId}">
            <text-find/>
        </field>
        <field name="workEffortName" title="${uiLabelMap.ManufacturingTaskName}">
            <text-find/>
        </field>
        <field name="fixedAssetId">
            <drop-down allow-empty="true">
                <entity-options description="${fixedAssetName} [${fixedAssetId}]" entity-name="FixedAsset">
                    <entity-constraint name="fixedAssetTypeId" operator="equals" value="GROUP_EQUIPMENT"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="submitButton" title="${uiLabelMap.CommonFind}">
            <submit button-type="button"/>
        </field>
    </form>
    <form name="ListRoutingTasks" type="list" title="" list-name="listIt"
        paginate-target="FindRoutingTask" odd-row-style="alternate-row" default-table-style="table table-hover">
        <actions>
            <set field="entityName" value="WorkEffort"/>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="requestParameters"/>
                <field-map field-name="entityName" from-field="entityName"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <field name="workEffortId" title="${uiLabelMap.ManufacturingTaskId}" widget-style="btn btn-link">
            <hyperlink description="${workEffortId}" target="EditRoutingTask">
                <parameter param-name="workEffortId"/>
            </hyperlink>
        </field>
        <field name="workEffortName" title="${uiLabelMap.ManufacturingTaskName}"><display/></field>
        <field name="description"><display/></field>
        <field name="workEffortPurposeTypeId" title="${uiLabelMap.ManufacturingTaskPurpose}">
            <display-entity entity-name="WorkEffortPurposeType"/>
        </field>
        <field name="fixedAssetId">
            <display-entity entity-name="FixedAsset" description="${fixedAssetName}"/>
        </field>
        <field name="estimatedSetupMillis" title="${uiLabelMap.ManufacturingTaskEstimatedSetupMillis}"><display/></field>
        <field name="estimatedMilliSeconds" title="${uiLabelMap.ManufacturingTaskEstimatedMilliSeconds}"><display/></field>
    </form>
    <form name="EditRoutingTask" type="single" target="UpdateRoutingTask" title="" default-map-name="routingTask"
        header-row-style="header-row" default-table-style="table">
        <alt-target use-when="routingTask==null" target="CreateRoutingTask"/>
        <field name="workEffortTypeId" use-when="routingTask==null"><hidden value="ROU_TASK"/></field>
        <field name="currentStatusId" use-when="routingTask==null"><hidden value="ROU_ACTIVE"/></field>
        <field name="workEffortId" use-when="routingTask!=null"><hidden/></field>
        <field name="workEffortName" title="${uiLabelMap.ManufacturingTaskName}"><text/></field>
        <field name="workEffortPurposeTypeId" title="${uiLabelMap.ManufacturingTaskPurpose}">
            <drop-down allow-empty="true">
                <entity-options description="${description}" entity-name="WorkEffortPurposeType">
                    <entity-constraint name="workEffortPurposeTypeId" operator="like" value="ROU%"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="description"><text/></field>
        <field name="fixedAssetId">
            <drop-down allow-empty="true">
                <entity-options description="${fixedAssetName} [${fixedAssetId}]" entity-name="FixedAsset">
                    <entity-constraint name="fixedAssetTypeId" operator="equals" value="GROUP_EQUIPMENT"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="estimatedSetupMillis" title="${uiLabelMap.ManufacturingTaskEstimatedSetupMillis}"><text/></field>
        <field name="estimatedMilliSeconds" title="${uiLabelMap.ManufacturingTaskEstimatedMilliSeconds}"><text/></field>
        <field name="estimateCalcMethod">
            <drop-down allow-empty="true">
                <entity-options entity-name="CustomMethod" key-field-name="customMethodId" description="${description}">
                    <entity-constraint name="customMethodTypeId" operator="equals" value="TASK_FORMULA"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="reservPersons"><text/></field>
        <field name="submitButton" title="${uiLabelMap.CommonSubmit}">
            <submit button-type="button"/>
        </field>
    </form>
    <form name="ListRoutingTaskCosts" type="list" title="" list-name="allCosts"
        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="table table-hover">
        <auto-fields-entity entity-name="WorkEffortCostCalc" default-field-type="display"/>
        <field name="workEffortId"><hidden/></field>
        <field name="costComponentTypeId">
            <display-entity entity-name="CostComponentType"/>
        </field>
        <field name="costComponentCalcId">
            <display-entity entity-name="CostComponentCalc"/>
        </field>
        <!--
        <field name="costComponentCalcView" entry-name="costComponentCalcId" title=" " widget-style="btn btn-link">
            <hyperlink target="viewCostComponentCalc" description="${uiLabelMap.CommonViewFormula}" also-hidden="false">
                <parameter param-name="costComponentCalcId"/>
            </hyperlink>
        </field>
        -->
        <field name="calcelWorkEffortCostCalc" title=" " widget-style="btn btn-link">
            <hyperlink target="removeRoutingTaskCost" description="${uiLabelMap.CommonRemove}" also-hidden="false">
                <parameter param-name="costComponentCalcId"/>
                <parameter param-name="costComponentTypeId"/>
                <parameter param-name="fromDate"/>
                <parameter param-name="workEffortId"/>
            </hyperlink>
        </field>
    </form>
    <form name="AddRoutingTaskCost" type="single" target="addRoutingTaskCost" title=""
        header-row-style="header-row" default-table-style="table">
        <auto-fields-entity entity-name="WorkEffortCostCalc" default-field-type="edit"/>
        <field name="workEffortId"><hidden/></field>
        <field name="costComponentTypeId">
            <drop-down allow-empty="false">
                <entity-options entity-name="CostComponentType" description="${description}">
                    <entity-constraint name="parentTypeId" operator="equals" env-name="nullField"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="costComponentCalcId">
            <drop-down allow-empty="false">
                <entity-options entity-name="CostComponentCalc" description="${description}">
                </entity-options>
            </drop-down>
        </field>
        <field name="submitButton" title="${uiLabelMap.CommonSubmit}">
            <submit button-type="button"/>
        </field>
    </form>
    <form name="ListRoutingTaskRoutings" type="list" title="" list-name="allRoutings"
        odd-row-style="alternate-row" default-table-style="table table-hover">
        <field name="workEffortIdFrom" title="${uiLabelMap.ManufacturingRouting}">
            <display-entity entity-name="WorkEffort" key-field-name="workEffortId" description="[${workEffortId}] ${workEffortName}"/>
        </field>
        <field name="sequenceNum" title="${uiLabelMap.CommonSequenceNum}"><display/></field>
        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display/></field>
        <field name="editRouting" title=" " widget-style="btn btn-link">
            <hyperlink target="EditRouting" description="${uiLabelMap.ManufacturingEditRouting}" also-hidden="false">
                <parameter param-name="workEffortId" from-field="workEffortIdFrom"/>
            </hyperlink>
        </field>
    </form>

    <!-- Routing Task Assoc Forms -->
    <form name="ListRoutingTaskAssoc" type="list" target="EditRoutingTaskAssoc" title="" list-name="allRoutingTasks"
        odd-row-style="alternate-row" default-table-style="table table-hover">
        <auto-fields-service service-name="updateWorkEffortAssoc" map-name="routingTaskAssoc"/>
        <field name="workEffortIdFrom"><hidden/></field>
        <field name="sequenceNum" title="${uiLabelMap.CommonSequenceNum}"><display/></field>
        <field name="workEffortIdTo"  title="${uiLabelMap.ManufacturingTaskName}" widget-style="btn btn-link">
            <hyperlink target="EditRoutingTask" description="[${workEffortIdTo}] ${workEffortToName}" also-hidden="false">
                <parameter param-name="workEffortId" from-field="workEffortIdTo"/>
            </hyperlink>
        </field>
        <field name="workEffortAssocTypeId" ><hidden/></field>
        <field name="fromDate" title="${uiLabelMap.CommonFromDate}" ><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThruDate}" ><display/></field>
        <field name="workEffortToSetup" title="${uiLabelMap.ManufacturingTaskEstimatedSetupMillis}" ><display/></field>
        <field name="workEffortToRun" title="${uiLabelMap.ManufacturingTaskEstimatedMilliSeconds}" ><display/></field>
        <field name="deleteLink" title=" " widget-style="btn btn-link">
            <hyperlink target="RemoveRoutingTaskAssoc" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="workEffortId" from-field="workEffortIdFrom"/>
                <parameter param-name="workEffortIdFrom"/>
                <parameter param-name="workEffortIdTo"/>
                <parameter param-name="fromDate"/>
                <parameter param-name="workEffortAssocTypeId" value="ROUTING_COMPONENT"/>
            </hyperlink>
        </field>
        <sort-order>
            <sort-field name="workEffortIdFrom"/>
            <sort-field name="workEffortIdTo"/>
            <sort-field name="sequenceNum"/>
        </sort-order>
    </form>

     <form name="UpdateRoutingTaskAssoc" type="single" target="UpdateRoutingTaskAssoc" title=""
        header-row-style="header-row" default-table-style="table">
        <auto-fields-service service-name="updateWorkEffortAssoc" map-name="routingTaskAssoc"/>
        <field name="workEffortId"><hidden value="${workEffortIdFrom}"/></field>
        <field name="workEffortIdFrom"><hidden/></field>
        <field name="sequenceNum" title="${uiLabelMap.CommonSequenceNum}"></field>
        <field name="workEffortIdTo"  title="${uiLabelMap.ManufacturingRoutingTaskId}">
            <display description="${routingTask.workEffortName}"/></field>
        <field name="workEffortAssocTypeId" ><hidden/></field>
        <field name="fromDate" title="${uiLabelMap.CommonFromDate}" ><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThruDate}" ></field>
        <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
        <sort-order>
            <sort-field name="workEffortIdFrom"/>
            <sort-field name="workEffortIdTo"/>
            <sort-field name="sequenceNum"/>
        </sort-order>
    </form>

    <!-- Routing Product Assoc -->
    <form name="EditRoutingProductLink" type="single" target="UpdateRoutingProductLink" title="" default-map-name="routingProductLink"
        header-row-style="header-row" default-table-style="table">
        <alt-target use-when="routingProductLink==null" target="AddRoutingProductLink"/>
        <auto-fields-entity entity-name="WorkEffortGoodStandard" default-field-type="edit"/>
        <field name="workEffortId"><hidden/></field>
        <field name="statusId"><hidden/></field>
        <field name="workEffortGoodStdTypeId"><hidden value="ROU_PROD_TEMPLATE"/></field>
        <field name="productId" use-when="routingProductLink!=null" ><display/></field>
        <field name="productId" title="${uiLabelMap.ProductProductId}" use-when="routingProductLink==null" >
            <lookup target-form-name="LookupProduct"/>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFromDate}" use-when="routingProductLink!=null"><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"></field>
        <field name="estimatedQuantity" title="${uiLabelMap.ManufacturingQuantity}"></field>
        <field name="submitButton" title="${uiLabelMap.CommonUpdate}">
            <submit button-type="button"/>
        </field>
    </form>

   <form name="ListRoutingProductLink" type="list" target="EditRoutingProductLink" title="" list-name="allRoutingProductLinks"
        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="table table-hover">
        <field name="productId" widget-style="btn btn-link">
            <hyperlink description="${productId}" target="/catalog/control/ViewProductManufacturing" also-hidden="false" target-type="inter-app">
                <parameter param-name="productId"/>
            </hyperlink>
        </field>
        <field name="productName" entry-name="productId" title="${uiLabelMap.ProductProductName}">
            <display-entity key-field-name="productId" entity-name="Product" description="${internalName}"/>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display/></field>
        <field name="estimatedQuantity" title="${uiLabelMap.ManufacturingQuantity}"><display/></field>
       <field name="editLink" title=" " widget-style="btn btn-link" >
            <hyperlink target="EditRoutingProductLink" description="${uiLabelMap.CommonEdit}" also-hidden="false">
                <parameter param-name="workEffortId"/>
                <parameter param-name="productId"/>
                <parameter param-name="fromDate"/>
                <parameter param-name="workEffortGoodStdTypeId" value="ROU_PROD_TEMPLATE"/>
            </hyperlink>
        </field>
       <field name="deleteLink" title=" " widget-style="btn btn-link">
            <hyperlink target="removeRoutingProductLink" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="workEffortId"/>
                <parameter param-name="productId"/>
                <parameter param-name="fromDate"/>
                <parameter param-name="workEffortGoodStdTypeId" value="ROU_PROD_TEMPLATE"/>
            </hyperlink>
        </field>
    </form>
   <form name="ListRoutingTaskProducts" type="list" target="ListRoutingTaskProducts" title="" list-name="allProducts"
        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="table table-hover">
        <field name="productId" title="${uiLabelMap.ProductProductName}">
            <display-entity entity-name="Product" description="${productId} ${internalName}"/>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display/></field>
        <field name="editLink" title=" " widget-style="btn btn-link">
            <hyperlink target="EditRoutingTaskProduct" description="${uiLabelMap.CommonEdit}" also-hidden="false">
                <parameter param-name="workEffortId"/>
                <parameter param-name="productId"/>
                <parameter param-name="fromDate"/>
                <parameter param-name="workEffortGoodStdTypeId" value="PRUNT_PROD_DELIV"/>
                </hyperlink>
        </field>
        <field name="deleteLink" title=" " widget-style="btn btn-link">
            <hyperlink target="removeRoutingTaskProduct" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="workEffortId"/>
                <parameter param-name="productId"/>
                <parameter param-name="fromDate"/>
                <parameter param-name="workEffortGoodStdTypeId" value="PRUNT_PROD_DELIV"/>
                </hyperlink>
        </field>
    </form>
    <form name="EditRoutingTaskProduct" type="single" target="updateRoutingTaskProduct" title="" default-map-name="routingProductLink"
        header-row-style="header-row" default-table-style="table">
        <alt-target use-when="routingProductLink==null" target="addRoutingTaskProduct"/>
        <auto-fields-entity entity-name="WorkEffortGoodStandard" default-field-type="edit"/>
        <field name="workEffortId"><hidden/></field>
        <field name="statusId"><hidden/></field>
        <field name="estimatedQuantity"><hidden/></field>
        <field name="estimatedCost"><hidden/></field>
        <field name="workEffortGoodStdTypeId"><hidden value="PRUNT_PROD_DELIV"/></field>
        <field name="productId" use-when="routingProductLink!=null" ><display/></field>
        <field name="productId" title="${uiLabelMap.ProductProductId}" use-when="routingProductLink==null" >
            <lookup target-form-name="LookupProduct"/>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFromDate}" use-when="routingProductLink!=null"><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"></field>
        <field name="submitButton" title="${uiLabelMap.CommonUpdate}">
            <submit button-type="button"/>
        </field>
    </form>

    <!-- RoutingTask-FixedAsset association (WorkEffortFixedAssetStd) -->
    <form name="ListRoutingTaskFixedAssets" type="list" title="" target="updateRoutingTaskFixedAsset" list-name="allFixedAssets"
        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="table table-hover">
        <auto-fields-entity entity-name="WorkEffortFixedAssetStd"/>
        <field name="workEffortId"><hidden/></field>
        <field name="fixedAssetTypeId">
            <display-entity entity-name="FixedAssetType"/>
        </field>
        <field name="submitButton" title="${uiLabelMap.CommonUpdate}">
            <submit button-type="button"/>
        </field>
        <field name="deleteLink" title=" " widget-style="btn btn-link">
            <hyperlink target="removeRoutingTaskFixedAsset"     description="${uiLabelMap.CommonDelete}" also-hidden="false" >
                <parameter param-name="workEffortId"/>
                <parameter param-name="fixedAssetTypeId"/>
            </hyperlink>
        </field>
    </form>
    <form name="EditRoutingTaskFixedAsset" type="single" title="" target="createRoutingTaskFixedAsset"
        header-row-style="header-row" default-table-style="table">
        <auto-fields-entity entity-name="WorkEffortFixedAssetStd" default-field-type="edit"/>
        <field name="workEffortId"><hidden /></field>
        <field name="fixedAssetTypeId">
            <drop-down allow-empty="false">
                <entity-options entity-name="FixedAssetType" description="${description}"/>
            </drop-down>
        </field>
        <field name="submitButton" title="${uiLabelMap.CommonAdd}">
            <submit button-type="button"/>
        </field>
    </form>
</forms>


text:
function path_prepend() {
    if [ -d "$1" ]; then
        PATH=${PATH//":$1:"/:} #delete all instances in the middle
        PATH=${PATH/%":$1"/} #delete any instance at the end
        PATH=${PATH/#"$1:"/} #delete any instance at the beginning
        PATH="$1${PATH:+":$PATH"}" #prepend $1 or if $PATH is empty set to $1
    fi
}
# This is needed so HomeBrew packages get priority
path_prepend '/usr/local/bin'


text:
package org.geelato.core.orm;

/**
 * @author geemeta
 */
public enum Dialects {
    Mysql,
    SqlServer,
    Oracle
}


text:
package com.knockdata.spark.highcharts

import base.BaseModel
import net.liftweb.json._
import org.junit.Assert._
import org.skyscreamer.jsonassert.{JSONAssert, JSONCompare, JSONCompareMode, JSONCompareResult}

object Assert {
  def parseJson(str: String): JValue = {
    try {
      parse(str)
    }
    catch {
      case ex: Exception =>
        println(s"fail to parse\n$str")
        throw ex
    }
  }
  def assertEqualJson(expected: String, actual: String): Unit = {
    val compareMode = JSONCompareMode.NON_EXTENSIBLE
    val result = JSONCompare.compareJSON(expected, actual, compareMode)
    if(result.failed()) {
      val msg = s"actual \n$actual \n!= expected \n$expected"
      println(msg)
      throw new AssertionError(result.getMessage)
    }
    JSONAssert.assertEquals(expected, actual, false)
  }

  def assertEqualJson(expected: String, actual: BaseModel): Unit = {
    assertEqualJson(expected, actual.result)
  }

  def assertEqualJson(expected: String, actualJson: JValue): Unit = {
    assertEqualJson(expected, pretty(render(actualJson)))
  }

  def assertEqualJson(expectedJson: JValue, actualJson: JValue): Unit = {
    assertEqualJson(pretty(render(expectedJson)), pretty(render(actualJson)))
  }

}


text:
if [ "$EUID" != '0' ];
then
    echo "Need root"
    [[ $PS1 ]] && return || exit;
fi

# Use the pwntools binutils and install dependencies
apt-add-repository ppa:pwntools/binutils
apt-get update

for line in $(cat deps); do
apt-get install -y $line
done

# Install configuration
chown root:root  ./etc
chmod -R go-rwx  ./etc
cp -Rav ./etc/*   /etc/

# # Add pwnable user
# useradd pwntest

# # Kickstart svscan
# initctl start svscanboot


text:
"""
======================================
Compute LCMV beamformer on evoked data
======================================

Compute LCMV beamformer solutions on an evoked dataset for three different
choices of source orientation and store the solutions in stc files for
visualisation.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
#
# License: BSD (3-clause)

# sphinx_gallery_thumbnail_number = 3

import matplotlib.pyplot as plt
import numpy as np

import mne
from mne.datasets import sample
from mne.beamformer import make_lcmv, apply_lcmv

print(__doc__)

data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_raw.fif'
event_fname = data_path + '/MEG/sample/sample_audvis_raw-eve.fif'
fname_fwd = data_path + '/MEG/sample/sample_audvis-meg-eeg-oct-6-fwd.fif'
label_name = 'Aud-lh'
fname_label = data_path + '/MEG/sample/labels/%s.label' % label_name
subjects_dir = data_path + '/subjects'

###############################################################################
# Get epochs
event_id, tmin, tmax = 1, -0.2, 0.5

# Setup for reading the raw data
raw = mne.io.read_raw_fif(raw_fname, preload=True)
raw.info['bads'] = ['MEG 2443', 'EEG 053']  # 2 bads channels
events = mne.read_events(event_fname)

# Set up pick list: EEG + MEG - bad channels (modify to your needs)
picks = mne.pick_types(raw.info, meg=True, eeg=False, stim=True, eog=True,
                       exclude='bads')

# Pick the channels of interest
raw.pick_channels([raw.ch_names[pick] for pick in picks])
# Re-normalize our empty-room projectors, so they are fine after subselection
raw.info.normalize_proj()

# Read epochs
epochs = mne.Epochs(raw, events, event_id, tmin, tmax,
                    baseline=(None, 0), preload=True, proj=True,
                    reject=dict(grad=4000e-13, mag=4e-12, eog=150e-6))
evoked = epochs.average()

forward = mne.read_forward_solution(fname_fwd)
forward = mne.convert_forward_solution(forward, surf_ori=True)

# Compute regularized noise and data covariances
noise_cov = mne.compute_covariance(epochs, tmin=tmin, tmax=0, method='shrunk',
                                   rank=None)
data_cov = mne.compute_covariance(epochs, tmin=0.04, tmax=0.15,
                                  method='shrunk', rank=None)
evoked.plot(time_unit='s')

###############################################################################
# Run beamformers and look at maximum outputs

pick_oris = [None, 'normal', 'max-power']
names = ['free', 'normal', 'max-power']
descriptions = ['Free orientation, voxel: %i', 'Normal orientation, voxel: %i',
                'Max-power orientation, voxel: %i']
colors = ['b', 'k', 'r']

fig, ax = plt.subplots(1)
max_voxs = list()
for pick_ori, name, desc, color in zip(pick_oris, names, descriptions, colors):
    # compute unit-noise-gain beamformer with whitening of the leadfield and
    # data (enabled by passing a noise covariance matrix)
    filters = make_lcmv(evoked.info, forward, data_cov, reg=0.05,
                        noise_cov=noise_cov, pick_ori=pick_ori,
                        weight_norm='unit-noise-gain', rank=None)
    print(filters)
    # apply this spatial filter to source-reconstruct the evoked data
    stc = apply_lcmv(evoked, filters, max_ori_out='signed')

    # View activation time-series in maximum voxel at 100 ms:
    time_idx = stc.time_as_index(0.1)
    max_idx = np.argmax(np.abs(stc.data[:, time_idx]))
    # we know these are all left hemi, so we can just use vertices[0]
    max_voxs.append(stc.vertices[0][max_idx])
    ax.plot(stc.times, stc.data[max_idx, :], color, label=desc % max_idx)

ax.set(xlabel='Time (ms)', ylabel='LCMV value',
       title='LCMV in maximum voxel')
ax.legend(loc='lower right')
mne.viz.utils.plt_show()

###############################################################################
# We can also look at the spatial distribution

# Plot last stc in the brain in 3D with PySurfer if available
brain = stc.plot(hemi='lh', views='lat', subjects_dir=subjects_dir,
                 initial_time=0.1, time_unit='s', smoothing_steps=5)
for color, vertex in zip(colors, max_voxs):
    brain.add_foci([vertex], coords_as_verts=True, scale_factor=0.5,
                   hemi='lh', color=color)


text:
package io.rancher.type;

import io.rancher.base.AbstractType;
import java.util.Map;

public class ExternalEvent extends AbstractType {

    private String accountId;

    private String created;

    private Map<String, Object> data;

    private String eventType;

    private String externalId;

    private String kind;

    private String reportedAccountId;

    private String state;

    private String transitioning;

    private String transitioningMessage;

    private Integer transitioningProgress;

    private String uuid;

    public String getAccountId() {
        return this.accountId;
    }

    public void setAccountId(String accountId) {
      this.accountId = accountId;
    }

    public String getCreated() {
        return this.created;
    }

    public void setCreated(String created) {
      this.created = created;
    }

    public Map<String, Object> getData() {
        return this.data;
    }

    public void setData(Map<String, Object> data) {
      this.data = data;
    }

    public String getEventType() {
        return this.eventType;
    }

    public void setEventType(String eventType) {
      this.eventType = eventType;
    }

    public String getExternalId() {
        return this.externalId;
    }

    public void setExternalId(String externalId) {
      this.externalId = externalId;
    }

    public String getKind() {
        return this.kind;
    }

    public void setKind(String kind) {
      this.kind = kind;
    }

    public String getReportedAccountId() {
        return this.reportedAccountId;
    }

    public void setReportedAccountId(String reportedAccountId) {
      this.reportedAccountId = reportedAccountId;
    }

    public String getState() {
        return this.state;
    }

    public void setState(String state) {
      this.state = state;
    }

    public String getTransitioning() {
        return this.transitioning;
    }

    public void setTransitioning(String transitioning) {
      this.transitioning = transitioning;
    }

    public String getTransitioningMessage() {
        return this.transitioningMessage;
    }

    public void setTransitioningMessage(String transitioningMessage) {
      this.transitioningMessage = transitioningMessage;
    }

    public Integer getTransitioningProgress() {
        return this.transitioningProgress;
    }

    public void setTransitioningProgress(Integer transitioningProgress) {
      this.transitioningProgress = transitioningProgress;
    }

    public String getUuid() {
        return this.uuid;
    }

    public void setUuid(String uuid) {
      this.uuid = uuid;
    }

}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.IO;
using SteamKeyJ.Properties;

namespace SteamKeyJ
{
    public partial class SteamKeyConfig : Form
    {

        private Dictionary<int, Action> dictAction = new Dictionary<int, Action>();
        //string = action name, int = key (can be converted to friendly name at runtime)
        private Dictionary<string, int> dictAssigned = new Dictionary<string, int>();
        private bool isSetting = false;
        private TextBox tbSelected = null;

        public SteamKeyConfig()
        {
            InitializeComponent();
            this.Focus();

            AssignExistingValues();

            KeyRecogniser.RequestedKeysPressed += new EventHandler(KeyRecogniser_RequestedKeysPressed);

        }

        void AssignExistingValues()
        {
            if (Settings.Default.playpause != -1)
            {
                tbPlayPause.Text = ((Keys)Settings.Default.playpause).ToString();
                dictAssigned.Add("playpause", Settings.Default.playpause);
            }
            else
                dictAssigned.Add("playpause", -1);

            if (Settings.Default.next != -1)
            {
                tbNext.Text = ((Keys)Settings.Default.next).ToString();
                dictAssigned.Add("next", Settings.Default.next);
            }
            else
                dictAssigned.Add("next", -1);

            if (Settings.Default.previous != -1)
            {
                tbPrevious.Text = ((Keys)Settings.Default.previous).ToString();
                dictAssigned.Add("previous", Settings.Default.previous);
            }
            else
                dictAssigned.Add("previous", -1);

            if (Settings.Default.volumeup != -1)
            {
                tbVolumeUp.Text = ((Keys)Settings.Default.volumeup).ToString();
                dictAssigned.Add("volumeup", Settings.Default.volumeup);
            }
            else
                dictAssigned.Add("volumeup", -1);

            if (Settings.Default.volumedown != -1)
            {
                tbVolumeDown.Text = ((Keys)Settings.Default.volumedown).ToString();
                dictAssigned.Add("volumedown", Settings.Default.volumedown);
            }
            else
                dictAssigned.Add("volumedown", -1);

            if (Settings.Default.mute != -1)
            {
                tbMute.Text = ((Keys)Settings.Default.mute).ToString();
                dictAssigned.Add("mute", Settings.Default.mute);
            }
            else
                dictAssigned.Add("mute", -1);

            if (Settings.Default.repeat != -1)
            {
                tbRepeat.Text = ((Keys)Settings.Default.repeat).ToString();
                dictAssigned.Add("repeat", Settings.Default.repeat);
            }
            else
                dictAssigned.Add("repeat", -1);

            if (Settings.Default.shuffle != -1)
            {
                tbShuffle.Text = ((Keys)Settings.Default.shuffle).ToString();
                dictAssigned.Add("shuffle", Settings.Default.shuffle);
            }
            else
                dictAssigned.Add("shuffle", -1);
        }

        void KeyRecogniser_RequestedKeysPressed(object sender, EventArgs e)
        {
            if (isSetting && tbSelected != null)
            {
                string keyName = ((Keys)sender).ToString();
                tbSelected.Text = keyName;

                switch(tbSelected.Tag.ToString())
                {
                    case "playpause":
                        dictAssigned["playpause"] = (int)sender;
                        break;

                    case "next":
                        dictAssigned["next"] = (int)sender;
                        break;
                    case "previous":
                        dictAssigned["previous"] = (int)sender;
                        break;
                    case "volumeup":
                        dictAssigned["volumeup"] = (int)sender;
                        break;
                    case "volumedown":
                        dictAssigned["volumedown"] = (int)sender;
                        break;
                    case "mute":
                        dictAssigned["mute"] = (int)sender;
                        break;
                    case "repeat":
                        dictAssigned["repeat"] = (int)sender;
                        break;
                    case "shuffle":
                        dictAssigned["shuffle"] = (int)sender;
                        break;
                }
            }
        }

        private void textBox_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox_Leave(object sender, EventArgs e)
        {
            isSetting = false;
            tbSelected = null;
        }

        private void textBox_Focus(object sender, EventArgs e)
        {
            lblExplanation.Text = "Please press the key to assign";

            isSetting = true;
            tbSelected = sender as TextBox;
            tbSelected.Select(0, tbSelected.Text.Length);
            tbSelected.Focus();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {

            Settings.Default.playpause = dictAssigned["playpause"];
            Settings.Default.next = dictAssigned["next"];
            Settings.Default.previous = dictAssigned["previous"];
            Settings.Default.volumeup = dictAssigned["volumeup"];
            Settings.Default.volumedown = dictAssigned["volumedown"];
            Settings.Default.mute = dictAssigned["mute"];
            Settings.Default.shuffle = dictAssigned["shuffle"];
            Settings.Default.repeat = dictAssigned["repeat"];

            Settings.Default.Save();
            this.Close();

        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void buttonDelete_Click(object sender, EventArgs e)
        {
            Button selectedDeleteButton = sender as Button;
            switch(selectedDeleteButton.Tag.ToString())
            {
                case "delplaypause":
                    tbPlayPause.Clear();
                    dictAssigned["playpause"] = -1;
                    break;

                case "delnext":
                    tbNext.Clear();
                    dictAssigned["next"] = -1;
                    break;
                case "delprevious":
                    tbPrevious.Clear();
                    dictAssigned["previous"] = -1;
                    break;
                case "delvolumeup":
                    tbVolumeUp.Clear();
                    dictAssigned["volumeup"] = -1;
                    break;
                case "delvolumedown":
                    tbVolumeDown.Clear();
                    dictAssigned["volumedown"] = -1;
                    break;
                case "delmute":
                    tbMute.Clear();
                    dictAssigned["mute"] = -1;
                    break;
                case "shuffle":
                    tbMute.Clear();
                    dictAssigned["shuffle"] = -1;
                    break;
                case "repeat":
                    tbMute.Clear();
                    dictAssigned["repeat"] = -1;
                    break;

            }
        }
    }
}