text:
<?php

namespace GoetasWebservices\Xsd\XsdToPhp\Tests\Issues\I40;

use DMS\PHPUnitExtensions\ArraySubset\Assert;
use GoetasWebservices\XML\XSDReader\SchemaReader;
use GoetasWebservices\Xsd\XsdToPhp\Jms\YamlConverter;
use GoetasWebservices\Xsd\XsdToPhp\Naming\ShortNamingStrategy;
use GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter;
use PHPUnit\Framework\TestCase;

class I40Test extends TestCase
{
    public function testMissingClass()
    {
        $reader = new SchemaReader();
        $schema = $reader->readFile(__DIR__ . '/data.xsd');

        $yamlConv = new YamlConverter(new ShortNamingStrategy());
        $yamlConv->addNamespace('', 'Epa\\Schema');

        $yamlItems = $yamlConv->convert([$schema]);
        $this->assertEquals([
            'Epa\\Schema\\AdditionalIdentifiers' => [
                'Epa\\Schema\\AdditionalIdentifiers' => [
                    'xml_root_name' => 'additionalIdentifiers',
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifier' => [
                'Epa\\Schema\\AdditionalIdentifier' => [
                    'xml_root_name' => 'additionalIdentifier',
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierType' => [
                'Epa\\Schema\\AdditionalIdentifierType' => [
                    'xml_root_name' => 'additionalIdentifierType',
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierType\\AdditionalIdentifierTypeAType' => [
                'Epa\\Schema\\AdditionalIdentifierType\\AdditionalIdentifierTypeAType' => [
                    'properties' => [
                        'id' => [
                            'expose' => true,
                            'access_type' => 'public_method',
                            'serialized_name' => 'id',
                            'accessor' => [
                                'getter' => 'getId',
                                'setter' => 'setId',
                            ],
                            'xml_attribute' => true,
                            'type' => 'int',
                        ],
                    ],
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifier\\AdditionalIdentifierAType' => [
                'Epa\\Schema\\AdditionalIdentifier\\AdditionalIdentifierAType' => [
                    'properties' => [
                        'additionalIdentifierType' => [
                            'expose' => true,
                            'access_type' => 'public_method',
                            'serialized_name' => 'additionalIdentifierType',
                            'accessor' => [
                                'getter' => 'getAdditionalIdentifierType',
                                'setter' => 'setAdditionalIdentifierType',
                            ],
                            'type' => 'Epa\\Schema\\AdditionalIdentifierType',
                        ],
                    ],
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifiers\\AdditionalIdentifiersAType' => [
                'Epa\\Schema\\AdditionalIdentifiers\\AdditionalIdentifiersAType' => [
                    'properties' => [
                        'additionalIdentifier' => [
                            'expose' => true,
                            'access_type' => 'public_method',
                            'serialized_name' => 'additionalIdentifier',
                            'accessor' => [
                                'getter' => 'getAdditionalIdentifier',
                                'setter' => 'setAdditionalIdentifier',
                            ],
                            'xml_list' => [
                                'inline' => true,
                                'entry_name' => 'additionalIdentifier',
                            ],
                            'type' => 'array<Epa\\Schema\\AdditionalIdentifier>',
                        ],
                    ],
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierTypes' => [
                'Epa\\Schema\\AdditionalIdentifierTypes' => [
                    'xml_root_name' => 'additionalIdentifierTypes',
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierTypes\\AdditionalIdentifierTypesAType' => [
                'Epa\\Schema\\AdditionalIdentifierTypes\\AdditionalIdentifierTypesAType' => [
                    'properties' => [
                        'additionalIdentifierType' => [
                            'expose' => true,
                            'access_type' => 'public_method',
                            'serialized_name' => 'additionalIdentifierType',
                            'accessor' => [
                                'getter' => 'getAdditionalIdentifierType',
                                'setter' => 'setAdditionalIdentifierType',
                            ],
                            'xml_list' => [
                                'inline' => true,
                                'entry_name' => 'additionalIdentifierType',
                            ],
                            'type' => 'array<Epa\\Schema\\AdditionalIdentifierType>',
                        ],
                    ],
                ],
            ],
        ], $yamlItems);

        $phpConv = new PhpConverter(new ShortNamingStrategy());
        $phpConv->addNamespace('', 'Epa\\Schema');

        $phpClasses = $phpConv->convert([$schema]);

        $this->assertCount(count($yamlItems), $phpClasses);
        ksort($yamlItems);
        ksort($phpClasses);
        Assert::assertArraySubset(array_keys($yamlItems), array_keys($phpClasses));
    }

    public function getTestDetectSimpleParents()
    {
         return [
             [__DIR__ . '/data_nested.xsd', 'string', [], []],
             [__DIR__ . '/data_nested_array.xsd', 'array<string>', [
                 'xml_list' =>
                     array (
                         'inline' => true,
                         'entry_name' => 'AdditionalIdentifierRootEl',
                     ),

             ], []],
// this will be done in the future
//             [__DIR__ . '/data_nested_array_nested.xsd', 'array<string>', [
//                 'xml_list' =>
//                     array (
//                         'inline' => false,
//                         'entry_name' => 'AdditionalIdentifierRootEl',
//                         'skip_when_empty' => false
//                     ),
//
//             ],[]],
         ];
    }
    /**
     * @dataProvider getTestDetectSimpleParents
     */
    public function testDetectSimpleParents(string $f, string $t, array $extra, array $extraTypes)
    {
        $reader = new SchemaReader();
        $schema = $reader->readFile($f);

        $yamlConv = new YamlConverter(new ShortNamingStrategy());
        $yamlConv->addNamespace('', 'Epa\\Schema');

        $yamlItems = $yamlConv->convert([$schema]);

        $this->assertEquals($extraTypes + [
                'Epa\Schema\AdditionalIdentifierRootEl' => [
                    'Epa\Schema\AdditionalIdentifierRootEl' => [
                        'xml_root_name' => 'AdditionalIdentifierRootEl',
                        'properties' => [
                            '__value' => [
                                'expose' => true,
                                'xml_value' => true,
                                'access_type' => 'public_method',
                                'accessor' => [
                                    'getter' => 'value',
                                    'setter' => 'value',
                                ],
                                'type' => 'string',
                            ],
                        ],
                    ]
                ],
            'Epa\\Schema\\UserType' => [
                'Epa\\Schema\\UserType' => [
                    'properties' => [
                        'additionalIdentifierRootEl' => $extra + [
                            'expose' => true,
                            'access_type' => 'public_method',
                            'serialized_name' => 'AdditionalIdentifierRootEl',
                            'accessor' => [
                                'getter' => 'getAdditionalIdentifierRootEl',
                                'setter' => 'setAdditionalIdentifierRootEl',
                            ],
                            'type' => $t,
                        ],
                    ],
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierRootElType' => [
                'Epa\\Schema\\AdditionalIdentifierRootElType' => [
                    'properties' => [
                        '__value' => [
                            'expose' => true,
                            'xml_value' => true,
                            'access_type' => 'public_method',
                            'accessor' => [
                                'getter' => 'value',
                                'setter' => 'value',
                            ],
                            'type' => 'string',
                        ],
                    ],
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierRootElParentType' => [
                'Epa\\Schema\\AdditionalIdentifierRootElParentType' => [
                    'properties' => [
                        '__value' => [
                            'expose' => true,
                            'xml_value' => true,
                            'access_type' => 'public_method',
                            'accessor' => [
                                'getter' => 'value',
                                'setter' => 'value',
                            ],
                            'type' => 'string',
                        ],
                    ],
                ],
            ],
        ], $yamlItems);
    }

    public function getTestDetectSimpleParentsWithAttributes()
    {
        return [
            [__DIR__ . '/data_nested_with_attributes.xsd', 'Epa\\Schema\\AdditionalIdentifierRootEl', []],
        ];
    }

    /**
     * @dataProvider getTestDetectSimpleParentsWithAttributes
     */
    public function testDetectSimpleParentsWithAttributesZ(string $f, string $t, array $extra)
    {
        $reader = new SchemaReader();
        $schema = $reader->readFile($f);

        $yamlConv = new YamlConverter(new ShortNamingStrategy());
        $yamlConv->addNamespace('', 'Epa\\Schema');

        $yamlItems = $yamlConv->convert([$schema]);

        $this->assertEquals([
            'Epa\\Schema\\AdditionalIdentifierRootEl' => [
                'Epa\\Schema\\AdditionalIdentifierRootEl' => [
                    'xml_root_name' => 'AdditionalIdentifierRootEl',
                ],
            ],
            'Epa\\Schema\\UserType' => [
                'Epa\\Schema\\UserType' => [
                    'properties' => [
                        'additionalIdentifierRootEl' => $extra + [
                            'expose' => true,
                            'access_type' => 'public_method',
                            'serialized_name' => 'AdditionalIdentifierRootEl',
                            'accessor' => [
                                'getter' => 'getAdditionalIdentifierRootEl',
                                'setter' => 'setAdditionalIdentifierRootEl',
                            ],
                            'type' => $t,
                        ],
                    ],
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierRootElType' => [
                'Epa\\Schema\\AdditionalIdentifierRootElType' => [
                    'properties' => [
                    ],
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierRootElParentType' => [
                'Epa\\Schema\\AdditionalIdentifierRootElParentType' => [
                    'properties' => [
                        '__value' => [
                            'expose' => true,
                            'xml_value' => true,
                            'access_type' => 'public_method',
                            'accessor' => [
                                'getter' => 'value',
                                'setter' => 'value',
                            ],
                            'type' => 'string',
                        ],
                        'idType' => [
                            'expose' => true,
                            'access_type' => 'public_method',
                            'serialized_name' => 'idType',
                            'accessor' => [
                                'getter' => 'getIdType',
                                'setter' => 'setIdType',
                            ],
                            'xml_attribute' => true,
                            'type' => 'string',
                        ],
                    ],
                ],
            ],
        ], $yamlItems);

        $phpConv = new PhpConverter(new ShortNamingStrategy());
        $phpConv->addNamespace('', 'Epa\\Schema');

        $phpClasses = $phpConv->convert([$schema]);

        $this->assertCount(count($yamlItems), $phpClasses);
        ksort($yamlItems);
        ksort($phpClasses);
        Assert::assertArraySubset(array_keys($yamlItems), array_keys($phpClasses));
    }

    public function testDetectSimpleParentsWithAttributesInTheMiddle()
    {
        $reader = new SchemaReader();
        $schema = $reader->readFile(__DIR__ . '/data_nested_with_attributes_in_the_middle.xsd');

        $yamlConv = new YamlConverter(new ShortNamingStrategy());
        $yamlConv->addNamespace('', 'Epa\\Schema');

        $yamlItems = $yamlConv->convert([$schema]);

        $this->assertEquals([
            'Epa\\Schema\\AdditionalIdentifierRootEl' => [
                'Epa\\Schema\\AdditionalIdentifierRootEl' => [
                    'xml_root_name' => 'AdditionalIdentifierRootEl',
                ],
            ],
            'Epa\\Schema\\UserType' => [
                'Epa\\Schema\\UserType' => [
                    'properties' => [
                        'additionalIdentifierRootEl' => [
                            'expose' => true,
                            'access_type' => 'public_method',
                            'serialized_name' => 'AdditionalIdentifierRootEl',
                            'accessor' => [
                                'getter' => 'getAdditionalIdentifierRootEl',
                                'setter' => 'setAdditionalIdentifierRootEl',
                            ],
                            'type' => 'Epa\\Schema\\AdditionalIdentifierRootEl',
                        ],
                    ],
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierRootElType' => [
                'Epa\\Schema\\AdditionalIdentifierRootElType' => [
                    'properties' => [
                        '__value' => [
                            'expose' => true,
                            'xml_value' => true,
                            'access_type' => 'public_method',
                            'accessor' => [
                                'getter' => 'value',
                                'setter' => 'value',
                            ],
                            'type' => 'string',
                        ],
                        'idType' => [
                            'expose' => true,
                            'access_type' => 'public_method',
                            'serialized_name' => 'idType',
                            'accessor' => [
                                'getter' => 'getIdType',
                                'setter' => 'setIdType',
                            ],
                            'xml_attribute' => true,
                            'type' => 'string',
                        ],
                    ],
                ],
            ],
            'Epa\\Schema\\AdditionalIdentifierRootElParentType' => [
                'Epa\\Schema\\AdditionalIdentifierRootElParentType' => [
                    'properties' => [
                        '__value' => [
                            'expose' => true,
                            'xml_value' => true,
                            'access_type' => 'public_method',
                            'accessor' => [
                                'getter' => 'value',
                                'setter' => 'value',
                            ],
                            'type' => 'string',
                        ],
                    ],
                ],
            ],
        ], $yamlItems);

        $phpConv = new PhpConverter(new ShortNamingStrategy());
        $phpConv->addNamespace('', 'Epa\\Schema');

        $phpClasses = $phpConv->convert([$schema]);

        ksort($yamlItems);
        ksort($phpClasses);

        $this->assertCount(count($yamlItems), $phpClasses);
        Assert::assertArraySubset(array_keys($yamlItems), array_keys($phpClasses));
    }
}


text:
from django.core.management.base import BaseCommand

from celery.task.sets import TaskSet

from olympia.amo.utils import chunked
from olympia.activity.models import ActivityLog
from olympia.editors.tasks import add_versionlog

class Command(BaseCommand):
    help = 'Add a VersionLog entry for all ActivityLog items'

    def handle(self, *args, **options):
        pks = (ActivityLog.objects.review_queue().values_list('pk', flat=True)
                                  .order_by('id'))

        ts = [add_versionlog.subtask(args=[chunk])
              for chunk in chunked(pks, 100)]
        TaskSet(ts).apply_async()

redpajama_set_name: RedPajamaGithub


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W29777_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">A Gvrndata

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Directional Survev

    <p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Whiting Oil & Gas
Lease: Arnegard Well: 21-26-3H, 4" Drill Pipe Location: Pioneer #75, McKenzie County, North Dakota Job Number: RM1214GCM737

    <p class="styleSans3.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">NIEASURED

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">INCL
deg.

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">AZIMUTH
deg.

    <p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">DOGLEG SEVERITY deg./
25 fi.

    <p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">VERTICAL CLOSURE DEPTH DIST. AZIMUTH feet feet deg.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">10275.00 10300.00 10325.00

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">103 50 .00 103 75 .00 10400.00 10425.00 1 04 50.00
10475.00 10500.00 10525.00 10550.00 10575.00

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">10600.00 10625.00 10650.00 10675.00 10700.00

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">10725.00 10750.00 10775.00 10800.00

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Page 21 of 33

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">HORIZONTAL COORDINATES feet

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">0.46 0.49 0.31
0.34 0.42 0.67 0.46 0.38
0.55 0.60 0.60 0.43 0.69

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">0.79 0.76 2.23 6.53 11.13

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">14.72 18.00 19.14 22.03

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">7101 7487 4&81
9&19 7655 5423 7L35 3659
4&52 8632 6737 4&36 7058

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">52.57 71.54 209.98 211.87 202.34

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">206.98 209.18 201.42 196.75

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">0.25 0.03 0.25
0.27 0.17 0.32 0.27 0.26
0.20 0.38 0.20 0.24 0.34

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">0.25 0.26 2.84 4.30 4.82

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">3.73 3.34 2.72 3.32

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">10273.58 10298.58 10323.58
10348.58 10373.57 10398.57 10423.57 10448.57
10473.57 10498.57 10523.57 10548.57 10573.57

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">10598.56 10623.56 10648.56 10673.48 10698.18

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">10722.54 10746.52 10770.23 10793 .63

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">330.5 330.8 331.1
331.4 331.7 332.1 332.5 332.9
333.2 333.6 334.1 334.5 335.0

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">31.1 31.1 30.8 29.8 27.7

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">335.5 336.2 335.7 332.7 326.4

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">25.2 24.1 24.8 27.5

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">315.5 299.3 280.6 262.2

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">27.14 N 27.20 N 27.27 N
27.31 N 27.32 N 27.42 N 27.54 N 27.64 N
27.79 N 27.87 N 27.93 N 28.05 N 28.16 N

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">28.31 N 28.47 N 28.10 N 26.48 N 23.04 N

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">17.97 N 11.77 N 4.58 N 3.73 S

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">15.38W 15.18W 15.02W
14.90W 14.74W 14.53W 14.32W 14.17W
14.03W 13.81W 13.56W 13.37W 13.16W

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">12.88W 12.58W 12.67W 13.66W 15.33W

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">17.69W 21.01 W 24.39W 27.24W


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using DotVVM.Framework.Controls;
using DotVVM.Framework.Hosting;
using DotVVM.Framework.Runtime;
using DotVVM.Framework.Utils;
using FastExpressionCompiler;
using Microsoft.Extensions.Logging;

namespace DotVVM.Framework.Runtime
{
    public class AspNetCoreLoggerWarningSink: IDotvvmWarningSink
    {
        private ILogger? logger;
        private readonly IDotvvmRequestContext? requestContext;

        public AspNetCoreLoggerWarningSink(
            ILogger<AspNetCoreLoggerWarningSink>? logger = null,
            IDotvvmRequestContext? requestContext = null)
        {
            this.logger = logger;
            this.requestContext = requestContext;
        }

        public void RuntimeWarning(DotvvmRuntimeWarning warning)
        {
            logger?.Log(LogLevel.Warning, 0, new LogEvent(warning, requestContext), warning.RelatedException, (x, e) => x.ToString());
        }

        // custom log event implementing IEnumerable<KeyValuePair<string, object>> for Serilog's properties
        readonly struct LogEvent : IEnumerable<KeyValuePair<string, object>>
        {
            readonly DotvvmRuntimeWarning warning;
            readonly IDotvvmRequestContext? context;

            public LogEvent(DotvvmRuntimeWarning warning, IDotvvmRequestContext? context)
            {
                this.warning = warning;
                this.context = context;
            }

            public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
            {
                yield return new KeyValuePair<string, object>("Message", warning.Message);
                if (warning.RelatedControl is {} control)
                {
                    yield return new KeyValuePair<string, object>("RelatedControlType", control.GetType().ToCode());
                }
                if (context is {})
                {
                    if (context.Route?.RouteName is {} route)
                        yield return new KeyValuePair<string, object>("DotvvmRouteName", route);
                }
            }
            IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator();

            public override string ToString()
            {
                var header = context is {} ? $"DotVVM runtime error while processing {context.HttpContext.Request.Path}:" : "DotVVM runtime error:";
                return warning.Message + warning.RelatedControl?.Apply(c => "\nRelated to:\n" + c.DebugString());
            }
        }
    }
}


text:
/* Veneer
----------------------------------*/
.ui-veneer .ui-veneer-header { position: relative; z-index: 999;margin: 1px; zoom: 1; display: block;  padding: .2em .2em .2em .2em; }
.ui-veneer-header span {display: block;text-align: left;padding:0; margin:0; margin-left:30px;font-size:12px;}
.ui-veneer .ui-veneer-header-active { border-bottom: 0 !important; }

.ui-veneer .ui-veneer-header a { font-size: 1em; padding: 0 0 0 .7em; }
.ui-veneer-icons .ui-veneer-header a { padding-left: 2.2em; }
.ui-veneer .ui-veneer-header .ui-icon { position: absolute; left: -2em; top: 50%; margin-top: -8px; }

.ui-veneer .ui-veneer-content { position: relative; top: 1px; margin-bottom: 2px;  padding: 0 0 0 0;}

.ui-veneer-clickable { cursor:pointer; }

.ui-veneer-noUiBorder { border-width: 0px !important; }


text:
package debop4k.core.java8.collections;

import com.carrotsearch.junitbenchmarks.BenchmarkRule;
import lombok.extern.slf4j.Slf4j;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestRule;

import java.util.List;
import java.util.stream.IntStream;

import static java.util.stream.Collectors.toList;

/**
 * FibonacciTest
 *
 * @author sunghyouk.bae@gmail.com
 * @since 2015. 8. 10.
 */
@Slf4j
public class FibonacciTest {

  @Rule
  public TestRule benchmarkRun = new BenchmarkRule();

  private static final int N = 35;

  @Test
  public void cachedFibonacci() {
    List<Long> xs = IntStream.range(0, N)
                             .parallel()
                             .mapToObj(Fibonacci::get)
                             .collect(toList());
    //log.debug("fibonacci={}", xs);
  }

  @Test
  public void fibonacci() {
    List<Long> xs = IntStream.range(0, N)
                             .mapToObj(this::calcFibonacci)
                             .collect(toList());
  }

  private long calcFibonacci(int x) {
    if (x <= 0) return 0L;
    else if (x == 1) return 1L;
    return calcFibonacci(x - 1) + calcFibonacci(x - 2);
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
  <msapplication>
    <tile>
      <square70x70logo src="images/favicon-128.png"/>
      <square150x150logo src="images/favicon-196.png"/>
      <TileColor>#fff</TileColor>
    </tile>
  </msapplication>
</browserconfig>


text:
<?php
/**
 *
 *
 * All rights reserved.
 *
 * @author Falaleev Maxim
 * @email max@studio107.ru
 * @version 1.0
 * @company Studio107
 * @site http://studio107.ru
 * @date 27/05/14.05.2014 18:02
 */

namespace Tests\Orm;

use Tests\OrmDatabaseTestCase;
use Modules\Tests\Models\NestedModel;

abstract class AutoSlugFieldTest extends OrmDatabaseTestCase
{
    protected function getModels()
    {
        return [new NestedModel];
    }

    public function testInit()
    {
        list($rootModel, $created) = NestedModel::objects()->getOrCreate(['name' => 'test']);
        $this->assertEquals('test', $rootModel->slug);

        list($rootModelTwo, $created) = NestedModel::objects()->getOrCreate(['name' => 'test1']);
        $this->assertEquals('test1', $rootModelTwo->slug);

        list($nestedModel, $created) = NestedModel::objects()->getOrCreate(['name' => 'test2', 'parent' => $rootModelTwo]);
        $this->assertEquals('test1/test2', $nestedModel->slug);

        list($nestedTwo, $created) = NestedModel::objects()->getOrCreate(['name' => 'test3', 'parent' => $rootModelTwo]);
        $this->assertEquals('test1/test3', $nestedTwo->slug);

        list($threeLevelModel, $created) = NestedModel::objects()->getOrCreate(['name' => 'test4', 'parent' => $nestedTwo]);
        $this->assertEquals('test1/test3/test4', $threeLevelModel->slug);

        $this->assertEquals(5, NestedModel::objects()->count());
    }

    public function testInitTwo()
    {
        $rootModel = new NestedModel(['name' => 'test']);
        $rootModel->save();
        $this->assertEquals('test', $rootModel->slug);

        $rootModelTwo = new NestedModel(['name' => 'test1']);
        $rootModelTwo->save();
        $this->assertEquals('test1', $rootModelTwo->slug);

        $nestedModel = new NestedModel(['name' => 'test2', 'parent' => $rootModelTwo]);
        $nestedModel->save();
        $this->assertEquals('test1/test2', $nestedModel->slug);

        $nestedTwo = new NestedModel(['name' => 'test3', 'parent' => $rootModelTwo]);
        $nestedTwo->save();
        $this->assertEquals('test1/test3', $nestedTwo->slug);

        $threeLevelModel = new NestedModel(['name' => 'test4', 'parent' => $nestedTwo]);
        $threeLevelModel->save();
        $this->assertEquals('test1/test3/test4', $threeLevelModel->slug);

        // Play with parent attribute, bro.
        $threeLevelModel->parent = null;
        $this->assertNull($threeLevelModel->parent);
        $threeLevelModel->save();
        $this->assertEquals('test4', $threeLevelModel->slug);

        $threeLevelModel->parent = $nestedTwo;
        $this->assertEquals($nestedTwo->pk, $threeLevelModel->parent->pk);
        $threeLevelModel->save();
        $this->assertEquals('test1/test3/test4', $threeLevelModel->slug);
    }

    public function testReplace()
    {
        $this->testInit();
        $this->assertEquals(5, NestedModel::objects()->count());

        $model = NestedModel::objects()->filter(['name' => 'test1'])->get();
        $model->slug = 'qwe';
        $this->assertEquals('test1', $model->getOldAttribute('slug'));
        $this->assertEquals('qwe', $model->getAttribute('slug'));
        $this->assertEquals('qwe', $model->slug);

        $test2 = NestedModel::objects()->filter(['name' => 'test2'])->get();
        $this->assertEquals('test1/test2', $test2->slug);

        $model->save();

        $this->assertEquals('qwe', $model->getOldAttribute('slug'));
        $this->assertEquals('qwe', $model->getAttribute('slug'));
        $this->assertEquals('qwe', $model->slug);

        $test2 = NestedModel::objects()->filter(['name' => 'test2'])->get();
        $this->assertEquals('qwe/test2', $test2->slug);

        $test3 = NestedModel::objects()->filter(['name' => 'test3'])->get();
        $this->assertEquals('qwe/test3', $test3->slug);

        $test4 = NestedModel::objects()->filter(['name' => 'test4'])->get();
        $this->assertEquals('qwe/test3/test4', $test4->slug);

        $test3->slug = 'www';
        $test3->save(['slug']);

        $test4 = NestedModel::objects()->filter(['name' => 'test4'])->get();
        $this->assertEquals('qwe/www/test4', $test4->slug);
    }
}


text:
[Source](https://leetcode.com/contest/leetcode-weekly-contest-32/problems/kill-process/)

Given n processes, each process has a unique **PID (process id)** and its **PPID (parent process id)**.

Each process only has one parent process, but may have one or more children processes. This is just like a tree structure. Only one process has PPID that is 0, which means this process has no parent process. All the PIDs will be distinct positive integers.

We use two list of integers to represent a list of processes, where the first list contains PID for each process and the second list contains the corresponding PPID.

Now given the two lists, and a PID representing a process you want to kill, return a list of PIDs of processes that will be killed in the end. You should assume that when a process is killed, all its children processes will be killed. No order is required for the final answer.

**Example 1:**

```
Input:
pid =  [1, 3, 10, 5]
ppid = [3, 0, 5, 3]
kill = 5
Output: [5,10]
Explanation:
           3
         /   \
        1     5
             /
            10
Kill 5 will also kill 10.
```

**Note:**

1. The given kill id is guaranteed to be one of the given PIDs.
2. n >= 1.


text:
package main

import (
	"time"
)

// SparkleStats datatype
type SparkleStats struct {
	TopGiven []string `json:"top_given,omitempty"`
	TopGivers []string `json:"top_givers,omitempty"`
	FirstSparkle time.Time `json:"first_sparkle"`
	SimilarUsers []string `json:"similar_users,omitempty"`
	Categories []string `json:"categories"`
}

type SparkleGraph struct {
	Edges []SparkleGraphEdge `json:"edges"`
}

type SparkleGraphEdge struct {
	Sparkler string `json:"sparkler"`
	Sparklee string `json:"sparklee"`
	Weight int `json:"weight"`
}

func (s *SparkleDatabase) Graph() SparkleGraph {
  var sg SparkleGraph
  for _, v := range s.Sparkles {
    // See if the edge already exists. If it does, increment the score.
    // Otherwise, insert it.
    exists := false
    for k1, v1 := range sg.Edges {
      if (v.Sparkler == v1.Sparkler && v.Sparklee == v1.Sparklee) {
        sg.Edges[k1].Weight++
        exists = true
      }
    }

    if !exists {
      // Construct an edge
      var e SparkleGraphEdge
      e.Sparkler = v.Sparkler
      e.Sparklee = v.Sparklee
      e.Weight = 1
      sg.Edges = append(sg.Edges, e)
    }
  }
  return sg
}

func StatsForUser(user string) SparkleStats {
  var ss SparkleStats
  return ss
}


text:
namespace Intel.RealSense
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Runtime.InteropServices;

    public class ProxyDevice : Device
    {
        public ProxyDevice(IntPtr ptr) : base(ptr)
        {
        }
    }
}


text:
namespace Microsoft.Azure.Management.DataFactory.Models
{
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// A copy activity Azure Search Index sink.
    /// </summary>
    public partial class AzureSearchIndexSink : CopySink
    {
        /// <summary>
        /// Initializes a new instance of the AzureSearchIndexSink class.
        /// </summary>
        public AzureSearchIndexSink()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the AzureSearchIndexSink class.
        /// </summary>
        /// <param name="additionalProperties">Unmatched properties from the
        /// message are deserialized this collection</param>
        /// <param name="writeBatchSize">Write batch size. Type: integer (or
        /// Expression with resultType integer), minimum: 0.</param>
        /// <param name="writeBatchTimeout">Write batch timeout. Type: string
        /// (or Expression with resultType string), pattern:
        /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).</param>
        /// <param name="sinkRetryCount">Sink retry count. Type: integer (or
        /// Expression with resultType integer).</param>
        /// <param name="sinkRetryWait">Sink retry wait. Type: string (or
        /// Expression with resultType string), pattern:
        /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).</param>
        /// <param name="writeBehavior">Specify the write behavior when
        /// upserting documents into Azure Search Index. Possible values
        /// include: 'Merge', 'Upload'</param>
        public AzureSearchIndexSink(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), string writeBehavior = default(string))
            : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait)
        {
            WriteBehavior = writeBehavior;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets specify the write behavior when upserting documents
        /// into Azure Search Index. Possible values include: 'Merge', 'Upload'
        /// </summary>
        [JsonProperty(PropertyName = "writeBehavior")]
        public string WriteBehavior { get; set; }

    }
}


text:
/*
 * Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
 */

using System;

namespace Amazon.AutoScaling.Model
{
    /// <summary>
    /// Configuration for accessing Amazon DescribeAdjustmentTypes service
    /// </summary>
    public partial class DescribeAdjustmentTypesResponse : DescribeAdjustmentTypesResult
    {
        /// <summary>
        /// Gets and sets the DescribeAdjustmentTypesResult property.
        /// Represents the output of a DescribeAdjustmentTypes operation.
        /// </summary>
        [Obsolete(@"This property has been deprecated. All properties of the DescribeAdjustmentTypesResult class are now available on the DescribeAdjustmentTypesResponse class. You should use the properties on DescribeAdjustmentTypesResponse instead of accessing them through DescribeAdjustmentTypesResult.")]
        public DescribeAdjustmentTypesResult DescribeAdjustmentTypesResult
        {
            get
            {
                return this;
            }
        }
    }
}


text:
<?php

function add_carrier_position()
{
	$carriers = Db::getInstance()->executeS('
	SELECT `id_carrier`
	FROM `'._DB_PREFIX_.'carrier`
	WHERE `deleted` = 0');
	if (count($carriers) && is_array($carriers))
	{
		$i = 0;
		foreach ($carriers as $carrier)
		{
			Db::getInstance()->execute('
			UPDATE `'._DB_PREFIX_.'carrier`
			SET `position` = '.$i++.'
			WHERE `id_carrier` = '.(int)$carrier['id_carrier']);
		}
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

-->

<resources>

    <style name="TextAppearance.Polaris" parent="@android:style/TextAppearance">
        <item name="android:textColor">@color/polaris__primary</item>
        <item name="android:textSize">@dimen/polaris__font_size_normal</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColorLink">#33b5e5</item>
        <item name="android:textColorHighlight">#000000</item>
    </style>

    <style name="TextAppearance.Polaris.MapCallout" />

    <style name="TextAppearance.Polaris.MapCallout.Title">
        <item name="android:textColor">@color/polaris__primary</item>
        <item name="android:textSize">@dimen/polaris__font_size_normal</item>
        <item name="android:textStyle">bold</item>
    </style>

    <style name="TextAppearance.Polaris.MapCallout.Subtitle">
        <item name="android:textColor">@color/polaris__secondary</item>
        <item name="android:textSize">@dimen/polaris__font_size_small</item>
        <item name="android:textStyle">normal</item>
    </style>

</resources>


text:
cask "datagraph" do
  version :latest
  sha256 :no_check

  url "https://www.visualdatatools.com/DataGraph/DataGraph.dmg"
  name "DataGraph"
  homepage "https://www.visualdatatools.com/DataGraph/"

  app "DataGraph.app"
end


text:
/*jshint curly:false, eqeqeq:true, laxbreak:true, noempty:false */
/* AUTO-GENERATED. DO NOT MODIFY. */
/* see js/src/javascript/index.js */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.

 JS Beautifier
---------------

  Written by Einar Lielmanis, <einar@jsbeautifier.org>
      http://jsbeautifier.org/

  Originally converted to javascript by Vital, <vital76@gmail.com>
  "End braces on own line" added by Chris J. Shull, <chrisjshull@gmail.com>
  Parsing improvements for brace-less statements by Liam Newman <bitwiseman@gmail.com>

  Usage:
    js_beautify(js_source_text);
    js_beautify(js_source_text, options);

  The options are:
    indent_size (default 4)          - indentation size,
    indent_char (default space)      - character to indent with,
    preserve_newlines (default true) - whether existing line breaks should be preserved,
    max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk,

    jslint_happy (default false) - if true, then jslint-stricter mode is enforced.

            jslint_happy        !jslint_happy
            ---------------------------------
            function ()         function()

            switch () {         switch() {
            case 1:               case 1:
              break;                break;
            }                   }

    space_after_anon_function (default false) - should the space before an anonymous function's parens be added, "function()" vs "function ()",
          NOTE: This option is overriden by jslint_happy (i.e. if jslint_happy is true, space_after_anon_function is true by design)

    brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none" | any of the former + ",preserve-inline"
            put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are.
            preserve-inline will try to preserve inline blocks of curly braces

    space_before_conditional (default true) - should the space before conditional statement be added, "if(true)" vs "if (true)",

    unescape_strings (default false) - should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65"

    wrap_line_length (default unlimited) - lines should wrap at next opportunity after this number of characters.
          NOTE: This is not a hard limit. Lines will continue until a point where a newline would
                be preserved if it were present.

    end_with_newline (default false)  - end output with a newline

    e.g

    js_beautify(js_source_text, {
      'indent_size': 1,
      'indent_char': '\t'
    });

*/

// Object.values polyfill found here:
// http://tokenposts.blogspot.com.au/2012/04/javascript-objectkeys-browser.html
// This is required for early versions of IE.
if (!Object.values) {
    Object.values = function(o) {
        if (o !== Object(o)) {
            throw new TypeError('Object.values called on a non-object');
        }
        var k = [],
            p;
        for (p in o) {
            if (Object.prototype.hasOwnProperty.call(o, p)) {
                k.push(o[p]);
            }
        }
        return k;
    };
}

(function() {


text:
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">

  <title>qgis._core.QgsOWSConnection</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />

         Home

         Trees

         Indices

         Help

        qgis ::
        _core ::
        QgsOWSConnection ::
        Class QgsOWSConnection

[hide private]

[frames] | no frames]

Class QgsOWSConnection

       object --+
                |
sip.simplewrapper --+
                    |
          sip.wrapper --+
                        |
     PyQt4.QtCore.QObject --+
                            |
                           QgsOWSConnection

QgsOWSConnection(QString, QString)

        Instance Methods
        [hide private]

          childEvent(...)

          connectNotify(...)

          connectionInfo(...)

          connectionList(...)

          customEvent(...)

          deleteConnection(...)

          disconnectNotify(...)

          receivers(...)

          selectedConnection(...)

          sender(...)

          senderSignalIndex(...)

          setSelectedConnection(...)

          timerEvent(...)

          uri(...)

Inherited from PyQt4.QtCore.QObject:
      __getattr__,
      blockSignals,
      children,
      connect,
      deleteLater,
      destroyed,
      disconnect,
      dumpObjectInfo,
      dumpObjectTree,
      dynamicPropertyNames,
      emit,
      event,
      eventFilter,
      findChild,
      findChildren,
      inherits,
      installEventFilter,
      isWidgetType,
      killTimer,
      metaObject,
      moveToThread,
      objectName,
      parent,
      property,
      pyqtConfigure,
      removeEventFilter,
      setObjectName,
      setParent,
      setProperty,
      signalsBlocked,
      startTimer,
      thread,
      tr,
      trUtf8

Inherited from sip.simplewrapper:
      __init__,
      __new__

Inherited from object:
      __delattr__,
      __format__,
      __getattribute__,
      __hash__,
      __reduce__,
      __reduce_ex__,
      __repr__,
      __setattr__,
      __sizeof__,
      __str__,
      __subclasshook__

        Class Variables
        [hide private]

        mConnName = <sip.variabledescriptor object at 0x7f88d9c068c0>

        mConnectionInfo = <sip.variabledescriptor object at 0x7f88d9c0...

Inherited from PyQt4.QtCore.QObject:
      staticMetaObject

        Properties
        [hide private]

Inherited from object:
      __class__

        Method Details
        [hide private]

childEvent(...)

Overrides:
        PyQt4.QtCore.QObject.childEvent

connectNotify(...)

Overrides:
        PyQt4.QtCore.QObject.connectNotify

customEvent(...)

Overrides:
        PyQt4.QtCore.QObject.customEvent

disconnectNotify(...)

Overrides:
        PyQt4.QtCore.QObject.disconnectNotify

receivers(...)

Overrides:
        PyQt4.QtCore.QObject.receivers

sender(...)

Overrides:
        PyQt4.QtCore.QObject.sender

senderSignalIndex(...)

Overrides:
        PyQt4.QtCore.QObject.senderSignalIndex

timerEvent(...)

Overrides:
        PyQt4.QtCore.QObject.timerEvent

        Class Variable Details
        [hide private]

mConnectionInfo

Value:

<sip.variabledescriptor object at 0x7f88d9c06910>

         Home

         Trees

         Indices

         Help

    Generated by Epydoc 3.0.1 on Tue Jun 14 13:29:20 2016

      http://epydoc.sourceforge.net


text:
"""
Tests for states.py.
"""

from __init__ import DocutilsTestSupport

def suite():
    s = DocutilsTestSupport.ParserTestSuite()
    s.generateTests(totest)
    return s

totest = {}

totest['outdenting'] = [
["""\
Anywhere a paragraph would have an effect on the current
indentation level, a comment or list item should also.

+ bullet

This paragraph ends the bullet list item before a block quote.

  Block quote.
""",
"""\
<document source="test data">
    <paragraph>
        Anywhere a paragraph would have an effect on the current
        indentation level, a comment or list item should also.
    <bullet_list bullet="+">
        <list_item>
            <paragraph>
                bullet
    <paragraph>
        This paragraph ends the bullet list item before a block quote.
    <block_quote>
        <paragraph>
            Block quote.
"""],
["""\
+ bullet

.. Comments swallow up all indented text following.

  (Therefore this is not a) block quote.

- bullet

  If we want a block quote after this bullet list item,
  we need to use an empty comment:

..

  Block quote.
""",
"""\
<document source="test data">
    <bullet_list bullet="+">
        <list_item>
            <paragraph>
                bullet
    <comment xml:space="preserve">
        Comments swallow up all indented text following.
        \n\
        (Therefore this is not a) block quote.
    <bullet_list bullet="-">
        <list_item>
            <paragraph>
                bullet
            <paragraph>
                If we want a block quote after this bullet list item,
                we need to use an empty comment:
    <comment xml:space="preserve">
    <block_quote>
        <paragraph>
            Block quote.
"""],
]

if __name__ == '__main__':
    import unittest
    unittest.main(defaultTest='suite')


text:
var core = require('core');

// hook to wait for the api to load mostly just the language to get from it
Ti.App.addEventListener('apiloaded', function(e){
	var info = { 'lang':null, 'num':1 }, langindex = 0;
	(function(lang) {
		for (var i in lang) {
			var elem1 = Ti.UI.createPickerRow({title:lang[i].name});
			$.col_lang.add(elem1);
			if (i != 0) {
				var elem2 = Ti.UI.createPickerRow({title:i});
				$.col_amount.add(elem2);
			} else {
				info.lang = lang[i].name;
			}
		}

		// hook to the picker to know what it is set to
		$.picker.addEventListener('change', function(e) {
			info = { 'lang':e.selectedValue[0], 'num':e.selectedValue[1] };
		});
	})(core.Tool.language);

	// submit button opens the result page and starts the translations
	$.runbutton.addEventListener('click', function(e) {
		core.Tool.win('result', {
			text: $.textField.value,
			language: core.Tool.langcode(info['lang']),
			amount: info['num']
		}).open();
	});

	$.index.open();
});


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>zeppelin</artifactId>
    <groupId>com.nflabs.zeppelin</groupId>
    <version>0.3.3</version>
  </parent>

  <groupId>com.nflabs.zeppelin</groupId>
  <artifactId>zeppelin-sharkui</artifactId>
  <packaging>war</packaging>
  <version>0.3.3</version>
  <name>Zeppelin: Shark UI</name>
  <url>http://www.sigmoidanalytics.com</url>

  <build>
    <finalName>zeppelin-sharkui</finalName>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <configuration>
            <excludes combine.children="append">
              <exclude>**/*.conf</exclude>
              <exclude>**/*.css_t</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <!-- Swagger ui -->
      <plugin>
    	<groupId>org.apache.maven.plugins</groupId>
    	<artifactId>maven-war-plugin</artifactId>
    	<configuration>
    	  <failOnMissingWebXml>false</failOnMissingWebXml>
    	  <webResources>
    	    <resource>
    	      <directory>src/main/swagger</directory>
    	    </resource>
    	  </webResources>
    	</configuration>
    <executions>
      <execution>
        <phase>package</phase>
        <goals>
          <goal>war</goal>
        </goals>
      </execution>
    </executions>

      </plugin>

    </plugins>
  </build>
</project>


text:
import dne

def f():
    import baz

    baz


text:
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <utility>
#include <vector>

#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "device/bluetooth/device.h"
#include "device/bluetooth/public/mojom/gatt_result_type_converter.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"

namespace bluetooth {
Device::~Device() {
  adapter_->RemoveObserver(this);
}

// static
void Device::Create(scoped_refptr<device::BluetoothAdapter> adapter,
                    std::unique_ptr<device::BluetoothGattConnection> connection,
                    mojo::PendingReceiver<mojom::Device> receiver) {
  auto device_impl =
      base::WrapUnique(new Device(adapter, std::move(connection)));
  auto* device_ptr = device_impl.get();
  device_ptr->receiver_ =
      mojo::MakeSelfOwnedReceiver(std::move(device_impl), std::move(receiver));
}

// static
mojom::DeviceInfoPtr Device::ConstructDeviceInfoStruct(
    const device::BluetoothDevice* device) {
  mojom::DeviceInfoPtr device_info = mojom::DeviceInfo::New();

  device_info->name = device->GetName();
  device_info->name_for_display =
      base::UTF16ToUTF8(device->GetNameForDisplay());
  device_info->address = device->GetAddress();
  device_info->is_gatt_connected = device->IsGattConnected();

  if (device->GetInquiryRSSI()) {
    device_info->rssi = mojom::RSSIWrapper::New();
    device_info->rssi->value = device->GetInquiryRSSI().value();
  }

  return device_info;
}

void Device::DeviceChanged(device::BluetoothAdapter* adapter,
                           device::BluetoothDevice* device) {
  if (device->GetAddress() != GetAddress()) {
    return;
  }

  if (!device->IsGattConnected()) {
    receiver_->Close();
  }
}

void Device::GattServicesDiscovered(device::BluetoothAdapter* adapter,
                                    device::BluetoothDevice* device) {
  if (device->GetAddress() != GetAddress()) {
    return;
  }

  std::vector<base::OnceClosure> requests;
  requests.swap(pending_services_requests_);
  for (base::OnceClosure& request : requests) {
    std::move(request).Run();
  }
}

void Device::Disconnect() {
  receiver_->Close();
}

void Device::GetInfo(GetInfoCallback callback) {
  device::BluetoothDevice* device = adapter_->GetDevice(GetAddress());
  DCHECK(device);

  std::move(callback).Run(ConstructDeviceInfoStruct(device));
}

void Device::GetServices(GetServicesCallback callback) {
  device::BluetoothDevice* device = adapter_->GetDevice(GetAddress());
  DCHECK(device);

  if (device->IsGattServicesDiscoveryComplete()) {
    GetServicesImpl(std::move(callback));
    return;
  }

  // pending_services_requests_ is owned by Device, so base::Unretained is
  // safe.
  pending_services_requests_.push_back(base::BindOnce(
      &Device::GetServicesImpl, base::Unretained(this), std::move(callback)));
}

void Device::GetCharacteristics(const std::string& service_id,
                                GetCharacteristicsCallback callback) {
  device::BluetoothDevice* device = adapter_->GetDevice(GetAddress());
  DCHECK(device);

  device::BluetoothRemoteGattService* service =
      device->GetGattService(service_id);
  if (service == nullptr) {
    std::move(callback).Run(base::nullopt);
    return;
  }

  std::vector<mojom::CharacteristicInfoPtr> characteristics;

  for (const auto* characteristic : service->GetCharacteristics()) {
    mojom::CharacteristicInfoPtr characteristic_info =
        mojom::CharacteristicInfo::New();

    characteristic_info->id = characteristic->GetIdentifier();
    characteristic_info->uuid = characteristic->GetUUID();
    characteristic_info->properties = characteristic->GetProperties();

    characteristics.push_back(std::move(characteristic_info));
  }

  std::move(callback).Run(std::move(characteristics));
}

void Device::ReadValueForCharacteristic(
    const std::string& service_id,
    const std::string& characteristic_id,
    ReadValueForCharacteristicCallback callback) {
  device::BluetoothDevice* device = adapter_->GetDevice(GetAddress());
  DCHECK(device);

  device::BluetoothRemoteGattService* service =
      device->GetGattService(service_id);
  if (service == nullptr) {
    std::move(callback).Run(mojom::GattResult::SERVICE_NOT_FOUND,
                            base::nullopt /* value */);
    return;
  }

  device::BluetoothRemoteGattCharacteristic* characteristic =
      service->GetCharacteristic(characteristic_id);
  if (characteristic == nullptr) {
    std::move(callback).Run(mojom::GattResult::CHARACTERISTIC_NOT_FOUND,
                            base::nullopt /* value */);
    return;
  }

  auto copyable_callback = base::AdaptCallbackForRepeating(std::move(callback));
  characteristic->ReadRemoteCharacteristic(
      base::BindOnce(&Device::OnReadRemoteCharacteristic,
                     weak_ptr_factory_.GetWeakPtr(), copyable_callback),
      base::BindOnce(&Device::OnReadRemoteCharacteristicError,
                     weak_ptr_factory_.GetWeakPtr(), copyable_callback));
}

void Device::WriteValueForCharacteristic(
    const std::string& service_id,
    const std::string& characteristic_id,
    const std::vector<uint8_t>& value,
    WriteValueForCharacteristicCallback callback) {
  device::BluetoothDevice* device = adapter_->GetDevice(GetAddress());
  DCHECK(device);

  device::BluetoothRemoteGattService* service =
      device->GetGattService(service_id);
  if (service == nullptr) {
    std::move(callback).Run(mojom::GattResult::SERVICE_NOT_FOUND);
    return;
  }

  device::BluetoothRemoteGattCharacteristic* characteristic =
      service->GetCharacteristic(characteristic_id);
  if (characteristic == nullptr) {
    std::move(callback).Run(mojom::GattResult::CHARACTERISTIC_NOT_FOUND);
    return;
  }

  auto copyable_callback = base::AdaptCallbackForRepeating(std::move(callback));
  characteristic->WriteRemoteCharacteristic(
      value,
      base::BindOnce(&Device::OnWriteRemoteCharacteristic,
                     weak_ptr_factory_.GetWeakPtr(), copyable_callback),
      base::BindOnce(&Device::OnWriteRemoteCharacteristicError,
                     weak_ptr_factory_.GetWeakPtr(), copyable_callback));
}

void Device::GetDescriptors(const std::string& service_id,
                            const std::string& characteristic_id,
                            GetDescriptorsCallback callback) {
  device::BluetoothDevice* device = adapter_->GetDevice(GetAddress());
  if (!device) {
    std::move(callback).Run(base::nullopt);
    return;
  }

  device::BluetoothRemoteGattService* service =
      device->GetGattService(service_id);
  if (!service) {
    std::move(callback).Run(base::nullopt);
    return;
  }

  device::BluetoothRemoteGattCharacteristic* characteristic =
      service->GetCharacteristic(characteristic_id);
  if (!characteristic) {
    std::move(callback).Run(base::nullopt);
    return;
  }

  std::vector<mojom::DescriptorInfoPtr> descriptors;

  for (const auto* descriptor : characteristic->GetDescriptors()) {
    mojom::DescriptorInfoPtr descriptor_info = mojom::DescriptorInfo::New();

    descriptor_info->id = descriptor->GetIdentifier();
    descriptor_info->uuid = descriptor->GetUUID();
    descriptor_info->last_known_value = descriptor->GetValue();

    descriptors.push_back(std::move(descriptor_info));
  }

  std::move(callback).Run(std::move(descriptors));
}

void Device::ReadValueForDescriptor(const std::string& service_id,
                                    const std::string& characteristic_id,
                                    const std::string& descriptor_id,
                                    ReadValueForDescriptorCallback callback) {
  device::BluetoothDevice* device = adapter_->GetDevice(GetAddress());
  DCHECK(device);

  device::BluetoothRemoteGattService* service =
      device->GetGattService(service_id);
  if (!service) {
    std::move(callback).Run(mojom::GattResult::SERVICE_NOT_FOUND,
                            base::nullopt /* value */);
    return;
  }

  device::BluetoothRemoteGattCharacteristic* characteristic =
      service->GetCharacteristic(characteristic_id);
  if (!characteristic) {
    std::move(callback).Run(mojom::GattResult::CHARACTERISTIC_NOT_FOUND,
                            base::nullopt /* value */);
    return;
  }

  device::BluetoothRemoteGattDescriptor* descriptor =
      characteristic->GetDescriptor(descriptor_id);
  if (!descriptor) {
    std::move(callback).Run(mojom::GattResult::DESCRIPTOR_NOT_FOUND,
                            base::nullopt /* value */);
    return;
  }

  auto copyable_callback = base::AdaptCallbackForRepeating(std::move(callback));
  descriptor->ReadRemoteDescriptor(
      base::BindOnce(&Device::OnReadRemoteDescriptor,
                     weak_ptr_factory_.GetWeakPtr(), copyable_callback),
      base::BindOnce(&Device::OnReadRemoteDescriptorError,
                     weak_ptr_factory_.GetWeakPtr(), copyable_callback));
}

void Device::WriteValueForDescriptor(const std::string& service_id,
                                     const std::string& characteristic_id,
                                     const std::string& descriptor_id,
                                     const std::vector<uint8_t>& value,
                                     WriteValueForDescriptorCallback callback) {
  device::BluetoothDevice* device = adapter_->GetDevice(GetAddress());
  DCHECK(device);

  device::BluetoothRemoteGattService* service =
      device->GetGattService(service_id);
  if (!service) {
    std::move(callback).Run(mojom::GattResult::SERVICE_NOT_FOUND);
    return;
  }

  device::BluetoothRemoteGattCharacteristic* characteristic =
      service->GetCharacteristic(characteristic_id);
  if (!characteristic) {
    std::move(callback).Run(mojom::GattResult::CHARACTERISTIC_NOT_FOUND);
    return;
  }

  device::BluetoothRemoteGattDescriptor* descriptor =
      characteristic->GetDescriptor(descriptor_id);
  if (!descriptor) {
    std::move(callback).Run(mojom::GattResult::DESCRIPTOR_NOT_FOUND);
    return;
  }

  auto copyable_callback = base::AdaptCallbackForRepeating(std::move(callback));
  descriptor->WriteRemoteDescriptor(
      value,
      base::BindOnce(&Device::OnWriteRemoteDescriptor,
                     weak_ptr_factory_.GetWeakPtr(), copyable_callback),
      base::BindOnce(&Device::OnWriteRemoteDescriptorError,
                     weak_ptr_factory_.GetWeakPtr(), copyable_callback));
}

Device::Device(scoped_refptr<device::BluetoothAdapter> adapter,
               std::unique_ptr<device::BluetoothGattConnection> connection)
    : adapter_(std::move(adapter)), connection_(std::move(connection)) {
  adapter_->AddObserver(this);
}

void Device::GetServicesImpl(GetServicesCallback callback) {
  device::BluetoothDevice* device = adapter_->GetDevice(GetAddress());
  DCHECK(device);

  std::vector<mojom::ServiceInfoPtr> services;

  for (const device::BluetoothRemoteGattService* service :
       device->GetGattServices()) {
    services.push_back(ConstructServiceInfoStruct(*service));
  }

  std::move(callback).Run(std::move(services));
}

mojom::ServiceInfoPtr Device::ConstructServiceInfoStruct(
    const device::BluetoothRemoteGattService& service) {
  mojom::ServiceInfoPtr service_info = mojom::ServiceInfo::New();

  service_info->id = service.GetIdentifier();
  service_info->uuid = service.GetUUID();
  service_info->is_primary = service.IsPrimary();

  return service_info;
}

void Device::OnReadRemoteCharacteristic(
    ReadValueForCharacteristicCallback callback,
    const std::vector<uint8_t>& value) {
  std::move(callback).Run(mojom::GattResult::SUCCESS, std::move(value));
}

void Device::OnReadRemoteCharacteristicError(
    ReadValueForCharacteristicCallback callback,
    device::BluetoothGattService::GattErrorCode error_code) {
  std::move(callback).Run(mojo::ConvertTo<mojom::GattResult>(error_code),
                          base::nullopt /* value */);
}

void Device::OnWriteRemoteCharacteristic(
    WriteValueForCharacteristicCallback callback) {
  std::move(callback).Run(mojom::GattResult::SUCCESS);
}

void Device::OnWriteRemoteCharacteristicError(
    WriteValueForCharacteristicCallback callback,
    device::BluetoothGattService::GattErrorCode error_code) {
  std::move(callback).Run(mojo::ConvertTo<mojom::GattResult>(error_code));
}

void Device::OnReadRemoteDescriptor(ReadValueForDescriptorCallback callback,
                                    const std::vector<uint8_t>& value) {
  std::move(callback).Run(mojom::GattResult::SUCCESS, std::move(value));
}

void Device::OnReadRemoteDescriptorError(
    ReadValueForDescriptorCallback callback,
    device::BluetoothGattService::GattErrorCode error_code) {
  std::move(callback).Run(mojo::ConvertTo<mojom::GattResult>(error_code),
                          base::nullopt /* value */);
}

void Device::OnWriteRemoteDescriptor(WriteValueForDescriptorCallback callback) {
  std::move(callback).Run(mojom::GattResult::SUCCESS);
}

void Device::OnWriteRemoteDescriptorError(
    WriteValueForDescriptorCallback callback,
    device::BluetoothGattService::GattErrorCode error_code) {
  std::move(callback).Run(mojo::ConvertTo<mojom::GattResult>(error_code));
}

const std::string& Device::GetAddress() {
  return connection_->GetDeviceAddress();
}

}  // namespace bluetooth


text:
var Orchard;
(function (Orchard) {
    (function (Azure) {
        (function (MediaServices) {
            /// <reference path="typings/jquery.d.ts" />
            /// <reference path="typings/jqueryui.d.ts" />
            (function (CloudVideoEdit) {
                function hasCorsSupport() {
                    return 'withCredentials' in new XMLHttpRequest();
                }

                $(function () {
                    var corsSupported = hasCorsSupport();

                    if (corsSupported) {
                        CloudVideoEdit.initializeUploadDirect();
                    } else {
                        CloudVideoEdit.initializeUploadProxied();
                    }

                    var localStorage = window["localStorage"];
                    var isCreating = $("#tabs").data("cloudvideo-iscreating");
                    $("#tabs").tabs({
                        activate: function () {
                            if (localStorage && localStorage.setItem)
                                localStorage.setItem("selectedCloudVideoTab", $("#tabs").tabs("option", "active"));
                        },
                        active: !isCreating && localStorage && localStorage.getItem ? localStorage.getItem("selectedCloudVideoTab") : null
                    }).show();
                });
            })(MediaServices.CloudVideoEdit || (MediaServices.CloudVideoEdit = {}));
            var CloudVideoEdit = MediaServices.CloudVideoEdit;
        })(Azure.MediaServices || (Azure.MediaServices = {}));
        var MediaServices = Azure.MediaServices;
    })(Orchard.Azure || (Orchard.Azure = {}));
    var Azure = Orchard.Azure;
})(Orchard || (Orchard = {}));
//# sourceMappingURL=cloudmedia-edit-cloudvideopart.js.map