text:
import React from 'react'
import { Container, Row, Col } from 'reactstrap'
import i18n from '/imports/both/i18n/en'
import DCSLink from '/imports/client/ui/components/DCSLink/index.js'
import './styles.scss'

const { title, content } = i18n.Template.first_section
const {
  first,
  second,
  third,
  fourth,
  fifth,
  youtubeLink
} = content

const FirstSection = () => (

    <Container>
      <Row>
        <Col xs={6}>

            <DCSLink badge="true" format="speech-bubble" title={title} triggerId="section1" />

{second}

{third}

{fourth}

{fifth}

        </Col>
        <Col xs={6} className='attachment-content'>

{first}

        </Col>
      </Row>
    </Container>

)

export default FirstSection

redpajama_set_name: RedPajamaGithub


text:
using FluentAssertions;
using NUnit.Framework;

namespace NSpec.Tests.WhenRunningSpecs.BeforeAndAfter
{
    [TestFixture]
    public class inheritance : when_running_specs
    {
        class BaseSpec : sequence_spec
        {
            void before_all()
            {
                sequence = "A";
            }

            void before_each()
            {
                sequence += "C";
            }

            void after_each()
            {
                sequence += "F";
            }

            void after_all()
            {
                sequence += "H";
            }
        }

        class DerivedSpec : BaseSpec
        {
            void a_context()
            {
                beforeAll = () => sequence += "B";

                before = () => sequence += "D";
                specify = () => Assert.That(true, Is.True);
                after = () => sequence += "E";

                afterAll = () => sequence += "G";
            }
        }

        [SetUp]
        public void setup()
        {
            Run(typeof(DerivedSpec));
        }

        [Test]
        public void before_alls_at_every_level_run_before_before_eaches_from_the_outside_in()
        {
            DerivedSpec.sequence.Should().StartWith("ABCD");
        }

        [Test]
        public void after_alls_at_every_level_run_after_after_eaches_from_the_inside_out()
        {
            DerivedSpec.sequence.Should().EndWith("EFGH");
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<androidx.wear.widget.drawer.WearableDrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".activity.ActiveDrillActivity"
    tools:deviceIds="wear">

    <include layout="@layout/content_active_drill" />

    <androidx.wear.widget.drawer.WearableNavigationDrawerView
        android:id="@+id/top_navigation_drawer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorPrimary"/>

    <androidx.wear.widget.drawer.WearableActionDrawerView
        android:id="@+id/bottom_action_drawer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorPrimaryDark"
        app:actionMenu="@menu/action_drawer_menu"/>

</androidx.wear.widget.drawer.WearableDrawerLayout>


text:
@class Pin;

@interface GMSMapViewController : UIViewController
@property (nonatomic) Pin *pin;
@end


text:
The Ad object is a container for storing ads.

### Service

+ [AdGroupAdService](../../services/AdGroupAdService.md)

### Namespace

[AdGroupAdService#Namespace](../../services/AdGroupAdService.md#namespace)

| Field | Type | Description | response |
| ----- | ---- | ----------- | -------- |
| type | enum [AdType](./AdType.md) | The ad type. | yes | |

この 作品 は クリエイティブ・コモンズ 表示 - 改変禁止 2.1 日本 ライセンスの下に提供されています。


text:
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2022] EMBL-European Bioinformatics Institute
--
-- 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.

/**
@header patch_90_91_zb.sql - Rename another table
@desc   Rename another table
*/

rename table feature_set_qc_prop_reads_in_peaks to peak_calling_qc_prop_reads_in_peaks;

alter table peak_calling_qc_prop_reads_in_peaks change column feature_set_qc_prop_reads_in_peaks_id peak_calling_qc_prop_reads_in_peaks_id   int(10) unsigned NOT NULL;
alter table peak_calling_qc_prop_reads_in_peaks change column feature_set_id peak_calling_id int(10) unsigned NOT NULL;

-- patch identifier
INSERT INTO meta (species_id, meta_key, meta_value) VALUES (NULL, 'patch', 'patch_90_91_zb.sql|Rename another table');


text:
package wkt

import (
	"fmt"
	"reflect"
)

type UnsupportedGeometryError struct {
	Type reflect.Type
}

func (e UnsupportedGeometryError) Error() string {
	return "wkt: unsupported geometry type: " + e.Type.String()
}

type UnsupportedAxesError struct {
	Axes int
}

func (e UnsupportedAxesError) Error() string {
	return fmt.Sprintf("wkt: unsupported axes %d", e.Axes)
}


text:
namespace HexTiles
{
    /// <summary>
    /// Information about a tile that has been modified, used for
    /// recording undo actions.
    /// </summary>
    public struct ModifiedTileInfo
    {
        /// <summary>
        /// The chunk containing the tile that was added.
        /// </summary>
        public HexChunk Chunk { get; private set; }

        /// <summary>
        /// Whether the chunk was just created, already existed and was modified,
        /// or was deleted. Needed for recording what kind of Undo operation to use.
        /// </summary>
        public ChunkOperation Operation { get; private set; }

        public enum ChunkOperation
        {
            Added,
            Modified
        }

        public ModifiedTileInfo(HexChunk chunk, ChunkOperation operation)
        {
            Chunk = chunk;
            Operation = operation;
        }
    }
}


text:
package com.facebook.buck.skylark.parser;

import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;
import static org.hamcrest.Matchers.stringContainsInOrder;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;

import com.facebook.buck.event.BuckEventBusForTests;
import com.facebook.buck.io.filesystem.ProjectFilesystem;
import com.facebook.buck.io.filesystem.skylark.SkylarkFilesystem;
import com.facebook.buck.parser.ParserConfig;
import com.facebook.buck.parser.exceptions.BuildFileParseException;
import com.facebook.buck.parser.options.ProjectBuildFileParserOptions;
import com.facebook.buck.plugin.impl.BuckPluginManagerFactory;
import com.facebook.buck.rules.Cell;
import com.facebook.buck.rules.DefaultKnownBuildRuleTypesFactory;
import com.facebook.buck.rules.KnownBuildRuleTypesProvider;
import com.facebook.buck.rules.TestCellBuilder;
import com.facebook.buck.rules.coercer.DefaultTypeCoercerFactory;
import com.facebook.buck.sandbox.TestSandboxExecutionStrategyFactory;
import com.facebook.buck.testutil.FakeProjectFilesystem;
import com.facebook.buck.testutil.TestConsole;
import com.facebook.buck.util.DefaultProcessExecutor;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.EventCollector;
import com.google.devtools.build.lib.events.EventHandler;
import com.google.devtools.build.lib.events.EventKind;
import com.google.devtools.build.lib.events.PrintingEventHandler;
import com.google.devtools.build.lib.syntax.Type;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

public class SkylarkProjectBuildFileParserTest {

  private SkylarkProjectBuildFileParser parser;
  private ProjectFilesystem projectFilesystem;
  private KnownBuildRuleTypesProvider knownBuildRuleTypesProvider;

  @Rule public ExpectedException thrown = ExpectedException.none();
  private Cell cell;

  @Before
  public void setUp() throws Exception {
    projectFilesystem = FakeProjectFilesystem.createRealTempFilesystem();
    cell = new TestCellBuilder().setFilesystem(projectFilesystem).build();
    knownBuildRuleTypesProvider =
        KnownBuildRuleTypesProvider.of(
            DefaultKnownBuildRuleTypesFactory.of(
                new DefaultProcessExecutor(new TestConsole()),
                BuckPluginManagerFactory.createPluginManager(),
                new TestSandboxExecutionStrategyFactory()));
    parser = createParser(new PrintingEventHandler(EventKind.ALL_EVENTS));
  }

  private ProjectBuildFileParserOptions.Builder getDefaultParserOptions() {
    return ProjectBuildFileParserOptions.builder()
        .setProjectRoot(cell.getRoot())
        .setAllowEmptyGlobs(ParserConfig.DEFAULT_ALLOW_EMPTY_GLOBS)
        .setIgnorePaths(ImmutableSet.of())
        .setBuildFileName("BUCK")
        .setDescriptions(knownBuildRuleTypesProvider.get(cell).getDescriptions())
        .setBuildFileImportWhitelist(ImmutableList.of())
        .setPythonInterpreter("skylark");
  }

  private SkylarkProjectBuildFileParser createParserWithOptions(
      EventHandler eventHandler, ProjectBuildFileParserOptions options) {
    return SkylarkProjectBuildFileParser.using(
        options,
        BuckEventBusForTests.newInstance(),
        SkylarkFilesystem.using(projectFilesystem),
        new DefaultTypeCoercerFactory(),
        eventHandler);
  }

  private SkylarkProjectBuildFileParser createParser(EventHandler eventHandler) {
    return createParserWithOptions(eventHandler, getDefaultParserOptions().build());
  }

  @Test
  public void canParsePrebuiltJarRule() throws Exception {
    Path buildFile = projectFilesystem.resolve("src").resolve("test").resolve("BUCK");
    Files.createDirectories(buildFile.getParent());
    Files.write(
        buildFile,
        Arrays.asList(
            "prebuilt_jar("
                + "name='guava',"
                + "binary_jar='guava.jar',"
                + "licenses=['LICENSE'],"
                + "source_jar='guava-sources.jar',"
                + "visibility=['PUBLIC'],"
                + ")"));

    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("name"), equalTo("guava"));
    assertThat(rule.get("binaryJar"), equalTo("guava.jar"));
    assertThat(
        Type.STRING_LIST.convert(rule.get("licenses"), "license"),
        equalTo(ImmutableList.of("LICENSE")));
    assertThat(rule.get("sourceJar"), equalTo("guava-sources.jar"));
    assertThat(
        Type.STRING_LIST.convert(rule.get("visibility"), "PUBLIC"),
        equalTo(ImmutableList.of("PUBLIC")));
    assertThat(rule.get("buck.base_path"), equalTo("src/test"));
  }

  @Test
  public void detectsInvalidAttribute() throws Exception {
    Path buildFile = projectFilesystem.resolve("src").resolve("test").resolve("BUCK");
    Files.createDirectories(buildFile.getParent());
    Files.write(
        buildFile,
        Arrays.asList(
            "prebuilt_jar("
                + "name='guava',"
                + "binary_jarz='guava.jar',"
                + "licenses=['LICENSE'],"
                + "source_jar='guava-sources.jar',"
                + "visibility=['PUBLIC'],"
                + ")"));

    thrown.expect(BuildFileParseException.class);

    parser.getAll(buildFile, new AtomicLong());
  }

  @Test
  public void detectsMissingRequiredAttribute() throws Exception {
    Path buildFile = projectFilesystem.resolve("src").resolve("test").resolve("BUCK");
    Files.createDirectories(buildFile.getParent());
    Files.write(
        buildFile,
        Arrays.asList(
            "prebuilt_jar("
                + "name='guava',"
                + "licenses=['LICENSE'],"
                + "source_jar='guava-sources.jar',"
                + "visibility=['PUBLIC'],"
                + ")"));

    thrown.expect(BuildFileParseException.class);

    parser.getAll(buildFile, new AtomicLong());
  }

  @Test
  public void packageNameIsProvided() throws Exception {
    Path buildFile = projectFilesystem.resolve("src").resolve("test").resolve("BUCK");
    Files.createDirectories(buildFile.getParent());
    Files.write(buildFile, Arrays.asList("prebuilt_jar(name='guava', binary_jar=PACKAGE_NAME)"));

    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("binaryJar"), equalTo("src/test"));
  }

  @Test
  public void globFunction() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Path buildFile = directory.resolve("BUCK");
    Files.createDirectories(directory);
    Files.write(
        buildFile,
        Arrays.asList("prebuilt_jar(name='guava', binary_jar='foo.jar', licenses=glob(['f*']))"));
    Files.createFile(directory.resolve("file1"));
    Files.createFile(directory.resolve("file2"));
    Files.createFile(directory.resolve("bad_file"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(
        Type.STRING_LIST.convert(rule.get("licenses"), "license"),
        equalTo(ImmutableList.of("file1", "file2")));
  }

  @Test
  public void readConfigFunction() throws Exception {
    Path buildFile = projectFilesystem.resolve("BUCK");
    Files.write(
        buildFile,
        Arrays.asList(
            "prebuilt_jar(name=read_config('app', 'name', 'guava'), binary_jar='foo.jar')"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("name"), equalTo("guava"));
  }

  @Test
  public void missingRequiredAttributeIsReported() throws Exception {
    EventCollector eventCollector = new EventCollector(EnumSet.allOf(EventKind.class));
    parser = createParser(eventCollector);
    Path buildFile = projectFilesystem.resolve("BUCK");
    Files.write(buildFile, Arrays.asList("prebuilt_jar()"));
    try {
      parser.getAll(buildFile, new AtomicLong());
      fail("Should not reach here.");
    } catch (BuildFileParseException e) {
      assertThat(e.getMessage(), startsWith("Cannot evaluate build file "));
    }
    assertThat(eventCollector.count(), is(1));
    assertThat(
        eventCollector.iterator().next().getMessage(),
        stringContainsInOrder(
            "prebuilt_jar requires name and binary_jar but they are not provided.",
            "Need help? See https://buckbuild.com/rule/prebuilt_jar"));
  }

  @Test
  public void packageNameFunction() throws Exception {
    Path buildFile = projectFilesystem.resolve("pkg").resolve("BUCK");
    Files.createDirectories(buildFile.getParent());
    Files.write(
        buildFile, Arrays.asList("prebuilt_jar(name=package_name(), binary_jar='foo.jar')"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("name"), equalTo("pkg"));
  }

  @Test
  public void canUsePrintInBuildFile() throws Exception {
    EventCollector eventCollector = new EventCollector(EnumSet.allOf(EventKind.class));
    parser = createParser(eventCollector);
    Path buildFile = projectFilesystem.resolve("BUCK");
    Files.write(buildFile, Arrays.asList("print('hello world')"));
    parser.getAll(buildFile, new AtomicLong());
    Event printEvent = eventCollector.iterator().next();
    assertThat(printEvent.getMessage(), equalTo("hello world"));
    assertThat(printEvent.getKind(), equalTo(EventKind.DEBUG));
  }

  @Test
  public void canUsePrintInExtensionFile() throws Exception {
    EventCollector eventCollector = new EventCollector(EnumSet.allOf(EventKind.class));
    parser = createParser(eventCollector);
    Path buildFile = projectFilesystem.resolve("BUCK");
    Files.write(buildFile, Arrays.asList("load('//:ext.bzl', 'ext')"));
    Path extensionFile = projectFilesystem.resolve("ext.bzl");
    Files.write(extensionFile, Arrays.asList("ext = 'hello'", "print('hello world')"));
    parser.getAll(buildFile, new AtomicLong());
    Event printEvent = eventCollector.iterator().next();
    assertThat(printEvent.getMessage(), equalTo("hello world"));
    assertThat(printEvent.getKind(), equalTo(EventKind.DEBUG));
  }

  @Test
  public void packageNameFunctionInExtensionUsesBuildFilePackage() throws Exception {
    Path buildFileDirectory = projectFilesystem.resolve("test");
    Files.createDirectories(buildFileDirectory);
    Path buildFile = buildFileDirectory.resolve("BUCK");
    Path extensionFileDirectory = buildFileDirectory.resolve("ext");
    Files.createDirectories(extensionFileDirectory);
    Path extensionFile = extensionFileDirectory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//test/ext:build_rules.bzl', 'get_name')",
            "prebuilt_jar(name='foo', binary_jar=get_name())"));
    Files.write(extensionFile, Arrays.asList("def get_name():", "  return native.package_name()"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("binaryJar"), equalTo("test"));
  }

  @Test
  public void testImportVariable() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//src/test:build_rules.bzl', 'JAR')",
            "prebuilt_jar(name='foo', binary_jar=JAR)"));
    Files.write(extensionFile, Arrays.asList("JAR='jar'"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("binaryJar"), equalTo("jar"));
  }

  @Test
  public void canUseStructsInExtensionFiles() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//src/test:build_rules.bzl', 'jar')",
            "prebuilt_jar(name='foo', binary_jar=jar)"));
    Files.write(extensionFile, Arrays.asList("s = struct(x='j',y='ar')", "jar=s.x+s.y"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("binaryJar"), equalTo("jar"));
  }

  @Test
  public void testImportFunction() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//src/test:build_rules.bzl', 'get_name')",
            "prebuilt_jar(name='foo', binary_jar=get_name())"));
    Files.write(extensionFile, Arrays.asList("def get_name():", "  return 'jar'"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("binaryJar"), equalTo("jar"));
  }

  @Test
  public void testImportFunctionUsingBuiltInRule() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList("load('//src/test:build_rules.bzl', 'guava_jar')", "guava_jar(name='foo')"));
    Files.write(
        extensionFile,
        Arrays.asList(
            "def guava_jar(name):", "  native.prebuilt_jar(name=name, binary_jar='foo.jar')"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("name"), equalTo("foo"));
    assertThat(rule.get("binaryJar"), equalTo("foo.jar"));
  }

  @Test
  public void cannotUseGlobalGlobFunctionInsideOfExtension() throws Exception {
    thrown.expect(BuildFileParseException.class);

    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList("load('//src/test:build_rules.bzl', 'guava_jar')", "guava_jar(name='foo')"));
    Files.write(
        extensionFile,
        Arrays.asList(
            "def guava_jar(name):",
            "  native.prebuilt_jar(name=name, binary_jar='foo.jar', licenses=glob(['*.txt']))"));
    getSingleRule(buildFile);
  }

  @Test
  public void canUseNativeGlobFunctionInsideOfExtension() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList("load('//src/test:build_rules.bzl', 'guava_jar')", "guava_jar(name='foo')"));
    Files.write(
        extensionFile,
        Arrays.asList(
            "def guava_jar(name):",
            "  native.prebuilt_jar(name=name, binary_jar='foo.jar', licenses=native.glob(['*.txt']))"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("name"), equalTo("foo"));
    assertThat(rule.get("binaryJar"), equalTo("foo.jar"));
    assertThat(
        Type.STRING_LIST.convert(rule.get("licenses"), "license"), equalTo(ImmutableList.of()));
  }

  @Test
  public void canUseBuiltInListFunction() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Files.write(
        buildFile,
        Arrays.asList("prebuilt_jar(name='a', binary_jar='a.jar', licenses=list(('l1', 'l2')))"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(
        Type.STRING_LIST.convert(rule.get("licenses"), "license"),
        equalTo(ImmutableList.of("l1", "l2")));
  }

  @Test
  public void functionDefinitionsAreNotAllowedInBuildFiles() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Files.write(buildFile, Arrays.asList("def foo():", "  pass"));

    thrown.expect(BuildFileParseException.class);
    thrown.expectMessage("Cannot parse build file " + buildFile);

    parser.getAll(buildFile, new AtomicLong());
  }

  @Test
  public void evaluationErrorIsReported() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Files.write(buildFile, Arrays.asList("foo()"));

    thrown.expect(BuildFileParseException.class);
    thrown.expectMessage("Cannot evaluate build file " + buildFile);

    parser.getAll(buildFile, new AtomicLong());
  }

  @Test
  public void extensionFileEvaluationErrorIsReported() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(buildFile, Arrays.asList("load('//src/test:build_rules.bzl', 'guava_jar')"));
    Files.write(extensionFile, Arrays.asList("error"));

    thrown.expect(BuildFileParseException.class);
    thrown.expectMessage("Cannot evaluate extension file //src/test:build_rules.bzl");

    parser.getAll(buildFile, new AtomicLong());
  }

  @Test
  public void extensionFileIoEvaluationErrorIsReported() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Files.write(buildFile, Arrays.asList("load('//src/test:build_rule.bzl', 'guava_jar')"));

    thrown.expect(FileNotFoundException.class);
    thrown.expectMessage(Matchers.endsWith("build_rule.bzl (No such file or directory)"));

    parser.getAll(buildFile, new AtomicLong());
  }

  @Test
  public void canUseBuiltInListFunctionInExtension() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList("load('//src/test:build_rules.bzl', 'guava_jar')", "guava_jar(name='foo')"));
    Files.write(
        extensionFile,
        Arrays.asList(
            "def guava_jar(name):",
            "  native.prebuilt_jar(name=name, binary_jar='foo.jar', licenses=list(('l1', 'l2')))"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(
        Type.STRING_LIST.convert(rule.get("licenses"), "license"),
        equalTo(ImmutableList.of("l1", "l2")));
  }

  @Test
  public void testImportFunctionFromExtension() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Path extensionExtensionFile = directory.resolve("extension_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//src/test:build_rules.bzl', 'get_name')",
            "prebuilt_jar(name='foo', binary_jar=get_name())"));
    Files.write(extensionExtensionFile, Arrays.asList("def get_name():", "  return 'jar'"));
    Files.write(extensionFile, Arrays.asList("load('//src/test:extension_rules.bzl', 'get_name')"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("binaryJar"), equalTo("jar"));
  }

  @Test
  public void parsingOfExtensionWithSyntacticErrorsFails() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//src/test:build_rules.bzl', 'get_name')",
            "prebuilt_jar(name='foo', binary_jar=get_name())"));
    Files.write(extensionFile, Arrays.asList("def get_name():\n  return 'jar'\nj j"));
    thrown.expectMessage("Cannot parse extension file //src/test:build_rules.bzl");
    parser.getAll(buildFile, new AtomicLong());
  }

  @Test
  public void canImportExtensionFromAnotherCell() throws Exception {
    Cell cell = new TestCellBuilder().setFilesystem(projectFilesystem).build();

    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path anotherCell = projectFilesystem.resolve("tp2");
    Path extensionDirectory = anotherCell.resolve("ext");
    Files.createDirectories(extensionDirectory);
    Path extensionFile = extensionDirectory.resolve("build_rules.bzl");

    parser =
        SkylarkProjectBuildFileParser.using(
            ProjectBuildFileParserOptions.builder()
                .setProjectRoot(cell.getRoot())
                .setAllowEmptyGlobs(ParserConfig.DEFAULT_ALLOW_EMPTY_GLOBS)
                .setIgnorePaths(ImmutableSet.of())
                .setBuildFileName("BUCK")
                .setDescriptions(knownBuildRuleTypesProvider.get(cell).getDescriptions())
                .setBuildFileImportWhitelist(ImmutableList.of())
                .setPythonInterpreter("skylark")
                .setCellRoots(ImmutableMap.of("tp2", anotherCell))
                .build(),
            BuckEventBusForTests.newInstance(),
            SkylarkFilesystem.using(projectFilesystem),
            new DefaultTypeCoercerFactory(),
            new PrintingEventHandler(EnumSet.allOf(EventKind.class)));

    Files.write(
        buildFile,
        Arrays.asList(
            "load('@tp2//ext:build_rules.bzl', 'get_name')",
            "prebuilt_jar(name='foo', binary_jar=get_name())"));
    Files.write(extensionFile, Arrays.asList("def get_name():\n  return 'jar'"));
    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("name"), equalTo("foo"));
    assertThat(rule.get("binaryJar"), equalTo("jar"));
  }

  @Test
  public void attemptToLoadInvalidCellIsReported() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path anotherCell = projectFilesystem.resolve("tp2");
    Path extensionDirectory = anotherCell.resolve("ext");
    Files.createDirectories(extensionDirectory);
    Path extensionFile = extensionDirectory.resolve("build_rules.bzl");

    Files.write(
        buildFile,
        Arrays.asList(
            "load('@invalid_repo//ext:build_rules.bzl', 'get_name')",
            "prebuilt_jar(name='foo', binary_jar=get_name())"));
    Files.write(extensionFile, Arrays.asList("def get_name():\n  return 'jar'"));
    thrown.expectMessage(
        "@invalid_repo//ext:build_rules.bzl references an unknown repository invalid_repo");
    getSingleRule(buildFile);
  }

  @Test
  public void parseMetadataIsReturned() throws Exception {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("build_rules.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//src/test:build_rules.bzl', 'get_name')",
            "prebuilt_jar(name='foo', binary_jar=get_name())"));
    Files.write(extensionFile, Arrays.asList("def get_name():", "  return 'jar'"));
    ImmutableList<Map<String, Object>> allRulesAndMetaRules =
        parser.getAllRulesAndMetaRules(buildFile, new AtomicLong());
    assertThat(allRulesAndMetaRules, Matchers.hasSize(4));
    Map<String, Object> prebuiltJarRule = allRulesAndMetaRules.get(0);
    assertThat(prebuiltJarRule.get("name"), equalTo("foo"));
    Map<String, Object> includesMetadataRule = allRulesAndMetaRules.get(1);
    @SuppressWarnings("unchecked")
    ImmutableSet<String> includes = (ImmutableSet<String>) includesMetadataRule.get("__includes");
    assertThat(
        includes
            .stream()
            .map(projectFilesystem::resolve)
            .map(Path::getFileName) // simplify matching by stripping temporary path prefixes
            .map(Object::toString)
            .collect(ImmutableList.toImmutableList()),
        equalTo(ImmutableList.of("BUCK", "build_rules.bzl")));
    Map<String, Object> configsMetadataRule = allRulesAndMetaRules.get(2);
    assertThat(configsMetadataRule.get("__configs"), equalTo(ImmutableMap.of()));
    Map<String, Object> envsMetadataRule = allRulesAndMetaRules.get(3);
    assertThat(envsMetadataRule.get("__env"), equalTo(ImmutableMap.of()));
  }

  @Test
  public void cannotUseNativeRulesImplicitlyInBuildFilesIfDisabled()
      throws IOException, InterruptedException {
    EventCollector eventCollector = new EventCollector(EnumSet.allOf(EventKind.class));
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Files.write(buildFile, Arrays.asList("prebuilt_jar(name='foo', binary_jar='guava.jar')"));

    ProjectBuildFileParserOptions options =
        getDefaultParserOptions().setDisableImplicitNativeRules(true).build();

    parser = createParserWithOptions(eventCollector, options);
    thrown.expect(BuildFileParseException.class);
    thrown.expectMessage("Cannot evaluate build file");

    try {
      parser.getAll(projectFilesystem.resolve(buildFile), new AtomicLong());
    } catch (BuildFileParseException e) {
      Event event = eventCollector.iterator().next();
      assertEquals(EventKind.ERROR, event.getKind());
      assertThat(event.getMessage(), containsString("name 'prebuilt_jar' is not defined"));
      throw e;
    }
  }

  @Test
  public void cannotUseNativeRulesImplicitlyInExtensionFilesIfDisabled()
      throws IOException, InterruptedException {
    EventCollector eventCollector = new EventCollector(EnumSet.allOf(EventKind.class));
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("extension.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//src/test:extension.bzl', 'make_jar')",
            "make_jar(name='foo', binary_jar='guava.jar')"));
    Files.write(
        extensionFile,
        Arrays.asList("def make_jar(*args, **kwargs):", "    prebuilt_jar(*args, **kwargs)"));

    ProjectBuildFileParserOptions options =
        getDefaultParserOptions().setDisableImplicitNativeRules(true).build();

    parser = createParserWithOptions(eventCollector, options);
    thrown.expect(BuildFileParseException.class);
    thrown.expectMessage("Cannot evaluate build file");

    try {
      parser.getAll(projectFilesystem.resolve(buildFile), new AtomicLong());
    } catch (BuildFileParseException e) {
      Event event = eventCollector.iterator().next();
      assertEquals(EventKind.ERROR, event.getKind());
      assertThat(event.getMessage(), containsString("name 'prebuilt_jar' is not defined"));
      assertThat(event.getMessage(), containsString("extension.bzl\", line 2, in make_jar"));
      throw e;
    }
  }

  @Test
  public void canUseNativeRulesViaNativeModuleInExtensionFilesIfDisabled()
      throws IOException, InterruptedException {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("extension.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//src/test:extension.bzl', 'make_jar')",
            "make_jar(name='foo', binary_jar='guava.jar')"));
    Files.write(
        extensionFile,
        Arrays.asList(
            "def make_jar(*args, **kwargs):", "    native.prebuilt_jar(*args, **kwargs)"));

    ProjectBuildFileParserOptions options =
        getDefaultParserOptions().setDisableImplicitNativeRules(true).build();

    parser = createParserWithOptions(new PrintingEventHandler(EventKind.ALL_EVENTS), options);

    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("name"), equalTo("foo"));
    assertThat(rule.get("binaryJar"), equalTo("guava.jar"));
  }

  @Test
  public void canUseNativeRulesImplicitlyInBuildFilesIfNotDisabled()
      throws IOException, InterruptedException {
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Files.write(buildFile, Arrays.asList("prebuilt_jar(name='foo', binary_jar='guava.jar')"));

    ProjectBuildFileParserOptions options =
        getDefaultParserOptions().setDisableImplicitNativeRules(false).build();

    parser = createParserWithOptions(new PrintingEventHandler(EventKind.ALL_EVENTS), options);

    Map<String, Object> rule = getSingleRule(buildFile);
    assertThat(rule.get("name"), equalTo("foo"));
    assertThat(rule.get("binaryJar"), equalTo("guava.jar"));
  }

  @Test
  public void cannotUseNativeRulesImplicitlyInExtensionFilesIfNotDisabled()
      throws IOException, InterruptedException {
    EventCollector eventCollector = new EventCollector(EnumSet.allOf(EventKind.class));
    Path directory = projectFilesystem.resolve("src").resolve("test");
    Files.createDirectories(directory);
    Path buildFile = directory.resolve("BUCK");
    Path extensionFile = directory.resolve("extension.bzl");
    Files.write(
        buildFile,
        Arrays.asList(
            "load('//src/test:extension.bzl', 'make_jar')",
            "make_jar(name='foo', binary_jar='guava.jar')"));
    Files.write(
        extensionFile,
        Arrays.asList("def make_jar(*args, **kwargs):", "    prebuilt_jar(*args, **kwargs)"));

    ProjectBuildFileParserOptions options =
        getDefaultParserOptions().setDisableImplicitNativeRules(false).build();

    parser = createParserWithOptions(eventCollector, options);
    thrown.expect(BuildFileParseException.class);
    thrown.expectMessage("Cannot evaluate build file");

    try {
      parser.getAll(projectFilesystem.resolve(buildFile), new AtomicLong());
    } catch (BuildFileParseException e) {
      Event event = eventCollector.iterator().next();
      assertEquals(EventKind.ERROR, event.getKind());
      assertThat(event.getMessage(), containsString("name 'prebuilt_jar' is not defined"));
      assertThat(event.getMessage(), containsString("extension.bzl\", line 2, in make_jar"));
      throw e;
    }
  }

  private Map<String, Object> getSingleRule(Path buildFile)
      throws BuildFileParseException, InterruptedException, IOException {
    ImmutableList<Map<String, Object>> allRules = parser.getAll(buildFile, new AtomicLong());
    assertThat(allRules, Matchers.hasSize(1));
    return allRules.get(0);
  }
}


text:
package com.smeanox.games.ld35.desktop;

import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.smeanox.games.ld35.Consts;
import com.smeanox.games.ld35.LD35;

public class DesktopLauncher {
	public static void main (String[] arg) {
		LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
		config.width = (int) (Consts.WIDTH * Consts.DESKTOP_SCALE);
		config.height = ((int) (Consts.HEIGHT * Consts.DESKTOP_SCALE));
		config.title = Consts.GAME_NAME;
		new LwjglApplication(new LD35(), config);
	}
}


text:
var containerCreator = function (name) {
	var $wrapper = $('

'),
		$title = $('

'),
		$ul = $('

');
	$title.html(name);
	$wrapper.append($title);
	$wrapper.append($ul);
	$('body').append($wrapper);
	return {
		container: $ul,
		wrapper: $wrapper
	};
};

var colorGenerator = function(){
	return "#"+((1<<24)*Math.random()|0).toString(16);
};
export { containerCreator, colorGenerator };


text:
#include "wxlinechartoptions.h"

wxLineChartOptions::wxLineChartOptions()
    : m_dotRadius(4), m_dotStrokeWidth(1),
    m_lineWidth(2), m_hitDetectionRange(24)
{
}

const wxChartGridOptions& wxLineChartOptions::GetGridOptions() const
{
    return m_gridOptions;
}

wxChartGridOptions& wxLineChartOptions::GetGridOptions()
{
    return m_gridOptions;
}

wxDouble wxLineChartOptions::GetDotRadius() const
{
    return m_dotRadius;
}

unsigned int wxLineChartOptions::GetDotStrokeWidth() const
{
    return m_dotStrokeWidth;
}

unsigned int wxLineChartOptions::GetLineWidth() const
{
    return m_lineWidth;
}

wxDouble wxLineChartOptions::GetHitDetectionRange() const
{
    return m_hitDetectionRange;
}


text:
"use strict";

exports.__esModule = true;
exports.on = on;
exports.once = once;

var _src = require("zalgo-promise/src");

var _drivers = require("../drivers");

var _conf = require("../conf");

const getDefaultServerOptions = () => {
  // $FlowFixMe
  return {};
};

function on(name, options, handler) {
  if (!name) {
    throw new Error('Expected name');
  }

  options = options || getDefaultServerOptions();

  if (typeof options === 'function') {
    handler = options;
    options = getDefaultServerOptions();
  }

  if (!handler) {
    throw new Error('Expected handler');
  }

  options = options || {};
  options.name = name;
  options.handler = handler || options.handler;
  const win = options.window;
  const domain = options.domain;
  const listenerOptions = {
    handler: options.handler,
    handleError: options.errorHandler || (err => {
      throw err;
    }),
    window: win,
    domain: domain || _conf.WILDCARD,
    name
  };
  const requestListener = (0, _drivers.addRequestListener)({
    name,
    win,
    domain
  }, listenerOptions);
  return {
    cancel() {
      requestListener.cancel();
    }

  };
}

function once(name, options, handler) {
  options = options || getDefaultServerOptions();

  if (typeof options === 'function') {
    handler = options;
    options = getDefaultServerOptions();
  }

  const promise = new _src.ZalgoPromise();
  let listener; // eslint-disable-line prefer-const

  options.errorHandler = err => {
    listener.cancel();
    promise.reject(err);
  };

  listener = on(name, options, event => {
    listener.cancel();
    promise.resolve(event);

    if (handler) {
      return handler(event);
    }
  }); // $FlowFixMe

  promise.cancel = listener.cancel; // $FlowFixMe

  return promise;
}


text:
#import <TargetConditionals.h>
#if TARGET_OS_IOS || TARGET_OS_TV

#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
#import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"

#import "FirebaseInAppMessaging/Sources/FIRCore+InAppMessaging.h"
#import "FirebaseInAppMessaging/Sources/FIRInAppMessagingPrivate.h"
#import "FirebaseInAppMessaging/Sources/Private/Analytics/FIRIAMClientInfoFetcher.h"
#import "FirebaseInAppMessaging/Sources/Runtime/FIRIAMSDKRuntimeErrorCodes.h"

@interface FIRIAMClientInfoFetcher ()

@property(nonatomic, strong, nullable, readonly) FIRInstallations *installations;

@end

@implementation FIRIAMClientInfoFetcher

- (instancetype)initWithFirebaseInstallations:(FIRInstallations *)installations {
  if (self = [super init]) {
    _installations = installations;
  }
  return self;
}

- (void)fetchFirebaseInstallationDataWithProjectNumber:(NSString *)projectNumber
                                        withCompletion:
                                            (void (^)(NSString *_Nullable FID,
                                                      NSString *_Nullable FISToken,
                                                      NSError *_Nullable error))completion {
  if (!self.installations) {
    NSString *errorDesc = @"Couldn't generate Firebase Installation info";
    FIRLogDebug(kFIRLoggerInAppMessaging, @"I-IAM190010", @"%@", errorDesc);
    NSError *error = [NSError errorWithDomain:kFirebaseInAppMessagingErrorDomain
                                         code:FIRIAMSDKRuntimeErrorNoFirebaseInstallationsObject
                                     userInfo:@{NSLocalizedDescriptionKey : errorDesc}];
    completion(nil, nil, error);
    return;
  }

  [self.installations authTokenWithCompletion:^(
                          FIRInstallationsAuthTokenResult *_Nullable tokenResult,
                          NSError *_Nullable error) {
    if (error) {
      FIRLogWarning(kFIRLoggerInAppMessaging, @"I-IAM190006", @"Error in fetching FIS token: %@",
                    error.localizedDescription);
      completion(nil, nil, error);
    } else {
      FIRLogDebug(kFIRLoggerInAppMessaging, @"I-IAM190007", @"Successfully generated FIS token");

      [self.installations
          installationIDWithCompletion:^(NSString *_Nullable identifier, NSError *_Nullable error) {
            if (error) {
              FIRLogWarning(kFIRLoggerInAppMessaging, @"I-IAM190008", @"Error in fetching FID: %@",
                            error.localizedDescription);
              completion(nil, tokenResult.authToken, error);
            } else {
              FIRLogDebug(kFIRLoggerInAppMessaging, @"I-IAM190009",
                          @"Successfully in fetching both FID as %@ and FIS token as %@",
                          identifier, tokenResult.authToken);
              completion(identifier, tokenResult.authToken, nil);
            }
          }];
    }
  }];
}

- (nullable NSString *)getDeviceLanguageCode {
  // No caching since it's requested at pretty low frequency and we get the benefit of seeing
  // updated info the setting has changed
  NSArray<NSString *> *preferredLanguages = [NSLocale preferredLanguages];
  return preferredLanguages.firstObject;
}

- (nullable NSString *)getAppVersion {
  // Since this won't change, read it once in the whole life-cycle of the app and cache its value
  static NSString *appVersion = nil;
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
  });
  return appVersion;
}

- (nullable NSString *)getOSVersion {
  // Since this won't change, read it once in the whole life-cycle of the app and cache its value
  static NSString *OSVersion = nil;
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    NSOperatingSystemVersion systemVersion = [NSProcessInfo processInfo].operatingSystemVersion;
    OSVersion = [NSString stringWithFormat:@"%ld.%ld.%ld", (long)systemVersion.majorVersion,
                                           (long)systemVersion.minorVersion,
                                           (long)systemVersion.patchVersion];
  });
  return OSVersion;
}

- (nullable NSString *)getOSMajorVersion {
  NSArray *versionItems = [[self getOSVersion] componentsSeparatedByString:@"."];

  if (versionItems.count > 0) {
    return (NSString *)versionItems[0];
  } else {
    return nil;
  }
}

- (nullable NSString *)getTimezone {
  // No caching to deal with potential changes.
  return [NSTimeZone localTimeZone].name;
}

- (NSString *)getIAMSDKVersion {
  // FIRInAppMessaging_LIB_VERSION macro comes from pod definition
  return FIRFirebaseVersion();
}
@end

#endif  // TARGET_OS_IOS || TARGET_OS_TV


text:
using System.Diagnostics;
using System.Windows.Controls;
using System.Windows.Navigation;

namespace DDDLanguage
{
	public partial class ConfigurationPhpControl : UserControl
	{
		public ConfigurationPhpControl()
		{
			InitializeComponent();
		}

		private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
		{
			try
			{
				Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
			}
			catch { }
			e.Handled = true;
		}
	}
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="description" content="Metro, a sleek, intuitive, and powerful framework for faster and easier web development for Windows Metro Style.">
    <meta name="keywords" content="HTML, CSS, JS, JavaScript, framework, metro, front-end, frontend, web development">
    <meta name="author" content="Sergey Pimenov and Metro UI CSS contributors">

    <link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
    <title>Window :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style</title>

    <link href="css/metro.css" rel="stylesheet">
    <link href="css/metro-icons.css" rel="stylesheet">
    <link href="css/metro-responsive.css" rel="stylesheet">
    <link href="css/metro-schemes.css" rel="stylesheet">

    <link href="css/docs.css" rel="stylesheet">

 Window

        @@adsense

Window examples

                                Window caption

                                Window content

                                Window caption

                                Window content

                                Console

                                C:\>_

                                Window .success

                                Window content

                                Window .warning

                                Window content

                                Window .error

                                Window content

Window created by data-role

                            <div data-role="window"
                                 data-size='{"height": 100}'
                                 data-icon=""
                                 data-title="Window"
                                 data-buttons='{"btnClose": "true"}'
                                 data-on-btn-close-click="btnCloseClick"
                                 data-content="This window created with using data-role attribute">

                            <div data-role="window"
                                 data-size='{"height": 100}'
                                 data-caption-style='{"background": "ribbed-amber", "color": "fg-white"}'
                                 data-content-style='{"background": "bg-darkBlue", "color": "fg-yellow"}'
                                 data-icon=""
                                 data-title="Window"
                                 data-content="This window created with using data-role attribute">


text:
package com.speedment.common.tuple.internal.nullable;

import com.speedment.common.tuple.TupleOfNullables;
import com.speedment.common.tuple.internal.AbstractTupleOfNullables;
import com.speedment.common.tuple.nullable.Tuple10OfNullables;

import java.util.Optional;

/**
 * An implementation class of a {@link Tuple10OfNullables}.
 * <p>
 * Generated by com.speedment.sources.pattern.tuple.TupleImplPattern
 *
 * @param <T0> type of element 0
 * @param <T1> type of element 1
 * @param <T2> type of element 2
 * @param <T3> type of element 3
 * @param <T4> type of element 4
 * @param <T5> type of element 5
 * @param <T6> type of element 6
 * @param <T7> type of element 7
 * @param <T8> type of element 8
 * @param <T9> type of element 9
 *
 * @author Per Minborg
 */
public final class Tuple10OfNullablesImpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
extends AbstractTupleOfNullables
implements Tuple10OfNullables<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> {

    /**
     * Constructs a {@link TupleOfNullables} of type {@link Tuple10OfNullables}.
     *
     * @param e0 element 0
     * @param e1 element 1
     * @param e2 element 2
     * @param e3 element 3
     * @param e4 element 4
     * @param e5 element 5
     * @param e6 element 6
     * @param e7 element 7
     * @param e8 element 8
     * @param e9 element 9
     */
    public Tuple10OfNullablesImpl(
            T0 e0,
            T1 e1,
            T2 e2,
            T3 e3,
            T4 e4,
            T5 e5,
            T6 e6,
            T7 e7,
            T8 e8,
            T9 e9) {
        super(Tuple10OfNullablesImpl.class, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T0> get0() {
        return Optional.ofNullable((T0) values[0]);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T1> get1() {
        return Optional.ofNullable((T1) values[1]);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T2> get2() {
        return Optional.ofNullable((T2) values[2]);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T3> get3() {
        return Optional.ofNullable((T3) values[3]);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T4> get4() {
        return Optional.ofNullable((T4) values[4]);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T5> get5() {
        return Optional.ofNullable((T5) values[5]);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T6> get6() {
        return Optional.ofNullable((T6) values[6]);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T7> get7() {
        return Optional.ofNullable((T7) values[7]);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T8> get8() {
        return Optional.ofNullable((T8) values[8]);
    }

    @SuppressWarnings("unchecked")
    @Override
    public Optional<T9> get9() {
        return Optional.ofNullable((T9) values[9]);
    }
}


text:
.class final Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;
.super Landroid/os/Handler;
.source "LegacyGlobalActions.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/server/policy/LegacyGlobalActions;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x12
    name = "UIUpdateHandler"
.end annotation

# instance fields
.field final synthetic this$0:Lcom/android/server/policy/LegacyGlobalActions;

# direct methods
.method private constructor <init>(Lcom/android/server/policy/LegacyGlobalActions;)V
    .locals 0

    iput-object p1, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/android/server/policy/LegacyGlobalActions;Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;-><init>(Lcom/android/server/policy/LegacyGlobalActions;)V

    return-void
.end method

# virtual methods
.method synthetic -com_android_server_policy_LegacyGlobalActions$UIUpdateHandler-mthref-0()V
    .locals 1

    iget-object v0, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v0}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap27(Lcom/android/server/policy/LegacyGlobalActions;)V

    return-void
.end method

.method public handleMessage(Landroid/os/Message;)V
    .locals 14

    const/4 v8, 0x1

    const-wide/16 v12, 0x12c

    const/4 v10, 0x0

    const/4 v9, 0x0

    iget v7, p1, Landroid/os/Message;->what:I

    packed-switch v7, :pswitch_data_0

    :cond_0
    :goto_0
    :pswitch_0
    return-void

    :pswitch_1
    invoke-static {}, Lcom/android/server/policy/LegacyGlobalActions;->-get65()Z

    move-result v7

    if-eqz v7, :cond_6

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get29(Lcom/android/server/policy/LegacyGlobalActions;)Z

    move-result v7

    xor-int/lit8 v7, v7, 0x1

    if-eqz v7, :cond_6

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    if-eqz v7, :cond_0

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get17(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$GlobalActionsDialog;

    move-result-object v7

    if-eqz v7, :cond_0

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get23(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/globalactions/GlobalActionsFrameLayout;

    move-result-object v7

    const v8, 0x1020364

    invoke-virtual {v7, v8}, Lcom/android/server/policy/globalactions/GlobalActionsFrameLayout;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/LinearLayout;

    const/4 v1, 0x0

    :goto_1
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    invoke-virtual {v7}, Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;->getCount()I

    move-result v7

    if-ge v1, v7, :cond_2

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    iget-object v8, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v8}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap8(Lcom/android/server/policy/LegacyGlobalActions;)Z

    move-result v8

    invoke-static {v7, v8}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap0(Lcom/android/server/policy/LegacyGlobalActions;Z)Landroid/view/ViewGroup;

    move-result-object v7

    invoke-virtual {v7, v1}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v6

    if-eqz v6, :cond_1

    invoke-virtual {v6}, Landroid/view/View;->animate()Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v10}, Landroid/view/ViewPropertyAnimator;->alpha(F)Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v12, v13}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;

    :cond_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    :cond_2
    :try_start_0
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    const/4 v8, 0x0

    invoke-static {v7, v8}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap42(Lcom/android/server/policy/LegacyGlobalActions;F)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_2
    if-eqz v4, :cond_3

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->animate()Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v10}, Landroid/view/ViewPropertyAnimator;->alpha(F)Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v12, v13}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    new-instance v8, Lcom/android/server/policy/-$Lambda$5MW3rwZLV0XeeXCAuBbTFaPc3Pg;

    invoke-direct {v8, p0}, Lcom/android/server/policy/-$Lambda$5MW3rwZLV0XeeXCAuBbTFaPc3Pg;-><init>(Ljava/lang/Object;)V

    invoke-virtual {v7, v8}, Landroid/view/ViewPropertyAnimator;->withEndAction(Ljava/lang/Runnable;)Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7}, Landroid/view/ViewPropertyAnimator;->start()V

    :cond_3
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get11(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/widget/LinearLayout;

    move-result-object v7

    if-eqz v7, :cond_4

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get11(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/widget/LinearLayout;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/LinearLayout;->getVisibility()I

    move-result v7

    if-nez v7, :cond_4

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get11(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/widget/LinearLayout;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/LinearLayout;->animate()Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v10}, Landroid/view/ViewPropertyAnimator;->alpha(F)Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v12, v13}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;

    :cond_4
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get15(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/widget/LinearLayout;

    move-result-object v7

    if-eqz v7, :cond_5

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get15(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/widget/LinearLayout;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/LinearLayout;->getVisibility()I

    move-result v7

    if-nez v7, :cond_5

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get15(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/widget/LinearLayout;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/LinearLayout;->animate()Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v10}, Landroid/view/ViewPropertyAnimator;->alpha(F)Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v12, v13}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;

    :cond_5
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get22(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/widget/LinearLayout;

    move-result-object v7

    if-eqz v7, :cond_0

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get22(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/widget/LinearLayout;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/LinearLayout;->getVisibility()I

    move-result v7

    if-nez v7, :cond_0

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get22(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/widget/LinearLayout;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/LinearLayout;->animate()Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v10}, Landroid/view/ViewPropertyAnimator;->alpha(F)Landroid/view/ViewPropertyAnimator;

    move-result-object v7

    invoke-virtual {v7, v12, v13}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;

    goto/16 :goto_0

    :catch_0
    move-exception v0

    const-string/jumbo v7, "LegacyGlobalActions"

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v9, "updateWindowBlur : Exception : "

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v7, v8}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto/16 :goto_2

    :cond_6
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap27(Lcom/android/server/policy/LegacyGlobalActions;)V

    goto/16 :goto_0

    :pswitch_2
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    if-eqz v7, :cond_0

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    invoke-virtual {v7}, Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;->notifyDataSetChanged()V

    goto/16 :goto_0

    :pswitch_3
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    if-eqz v7, :cond_7

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    invoke-virtual {v7}, Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;->notifyDataSetChanged()V

    :cond_7
    invoke-static {}, Lcom/android/server/policy/LegacyGlobalActions;->-get73()Landroid/view/View;

    move-result-object v7

    if-eqz v7, :cond_0

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get53(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$SilentModeAction;

    move-result-object v7

    invoke-virtual {v7}, Lcom/android/server/policy/LegacyGlobalActions$SilentModeAction;->updateRingerMode()V

    goto/16 :goto_0

    :pswitch_4
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    invoke-virtual {v7}, Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;->notifyDataSetChanged()V

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap29(Lcom/android/server/policy/LegacyGlobalActions;)V

    goto/16 :goto_0

    :pswitch_5
    const-string/jumbo v7, "LegacyGlobalActions"

    const-string/jumbo v8, "handleMessage : MESSAGE_REFRESH_AIRPLANEMODE"

    invoke-static {v7, v8}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get7(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$ToggleAction;

    move-result-object v7

    if-eqz v7, :cond_8

    const-string/jumbo v7, "LegacyGlobalActions"

    const-string/jumbo v8, "handleMessage : MESSAGE_REFRESH_AIRPLANEMODE : call mAirplaneModeAction.updateState"

    invoke-static {v7, v8}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get7(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$ToggleAction;

    move-result-object v7

    iget-object v8, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v8}, Lcom/android/server/policy/LegacyGlobalActions;->-get8(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$ToggleAction$State;

    move-result-object v8

    invoke-virtual {v7, v8}, Lcom/android/server/policy/LegacyGlobalActions$ToggleAction;->updateState(Lcom/android/server/policy/LegacyGlobalActions$ToggleAction$State;)V

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    iget-object v8, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v8}, Lcom/android/server/policy/LegacyGlobalActions;->-get7(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$ToggleAction;

    move-result-object v8

    invoke-static {v7, v8}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap41(Lcom/android/server/policy/LegacyGlobalActions;Lcom/android/server/policy/LegacyGlobalActions$ToggleAction;)V

    :cond_8
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    if-eqz v7, :cond_0

    const-string/jumbo v7, "LegacyGlobalActions"

    const-string/jumbo v8, "handleMessage : MESSAGE_REFRESH_AIRPLANEMODE : call mAdapter.notifyDataSetChanged"

    invoke-static {v7, v8}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    invoke-virtual {v7}, Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;->notifyDataSetChanged()V

    goto/16 :goto_0

    :pswitch_6
    new-instance v3, Landroid/content/Intent;

    invoke-direct {v3}, Landroid/content/Intent;-><init>()V

    const-string/jumbo v7, "com.samsung.cover.STATE_CHANGE"

    invoke-virtual {v3, v7}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v7, "suppressCoverUI"

    invoke-virtual {v3, v7, v8}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string/jumbo v7, "miniModeUI"

    invoke-virtual {v3, v7, v8}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string/jumbo v8, "sender"

    iget-object v7, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v7, Ljava/lang/String;

    invoke-virtual {v3, v8, v7}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get12(Lcom/android/server/policy/LegacyGlobalActions;)Landroid/content/Context;

    move-result-object v7

    invoke-virtual {v7, v3}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    goto/16 :goto_0

    :pswitch_7
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7, v8, v9}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap30(Lcom/android/server/policy/LegacyGlobalActions;ZZ)V

    goto/16 :goto_0

    :pswitch_8
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7, v9, v9}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap30(Lcom/android/server/policy/LegacyGlobalActions;ZZ)V

    goto/16 :goto_0

    :pswitch_9
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    iget-object v8, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v8}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap8(Lcom/android/server/policy/LegacyGlobalActions;)Z

    move-result v8

    invoke-static {v7, v8}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap23(Lcom/android/server/policy/LegacyGlobalActions;Z)V

    goto/16 :goto_0

    :pswitch_a
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get17(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$GlobalActionsDialog;

    move-result-object v7

    if-eqz v7, :cond_0

    const/4 v1, 0x0

    :goto_3
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v7

    invoke-virtual {v7}, Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;->getCount()I

    move-result v7

    if-ge v1, v7, :cond_0

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    iget-object v8, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v8}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap8(Lcom/android/server/policy/LegacyGlobalActions;)Z

    move-result v8

    invoke-static {v7, v8}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap0(Lcom/android/server/policy/LegacyGlobalActions;Z)Landroid/view/ViewGroup;

    move-result-object v7

    invoke-virtual {v7, v1}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v5

    const v7, 0x1020006

    invoke-virtual {v5, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    invoke-virtual {v2}, Landroid/widget/ImageView;->getTag()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/lang/Integer;

    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v7

    iget-object v8, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v8}, Lcom/android/server/policy/LegacyGlobalActions;->-get32(Lcom/android/server/policy/LegacyGlobalActions;)I

    move-result v8

    if-ne v7, v8, :cond_9

    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    iget-object v8, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v8}, Lcom/android/server/policy/LegacyGlobalActions;->-get6(Lcom/android/server/policy/LegacyGlobalActions;)Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;

    move-result-object v8

    invoke-virtual {v8, v1}, Lcom/android/server/policy/LegacyGlobalActions$MyAdapter;->getItem(I)Lcom/android/server/policy/LegacyGlobalActions$Action;

    move-result-object v8

    invoke-static {v7, v5, v8, v9}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap25(Lcom/android/server/policy/LegacyGlobalActions;Landroid/view/View;Lcom/android/server/policy/LegacyGlobalActions$Action;Z)V

    :cond_9
    add-int/lit8 v1, v1, 0x1

    goto :goto_3

    :pswitch_b
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    iget-object v8, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v8}, Lcom/android/server/policy/LegacyGlobalActions;->-get31(Lcom/android/server/policy/LegacyGlobalActions;)I

    move-result v8

    invoke-static {v7, v8}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap28(Lcom/android/server/policy/LegacyGlobalActions;I)V

    goto/16 :goto_0

    :pswitch_c
    iget-object v7, p0, Lcom/android/server/policy/LegacyGlobalActions$UIUpdateHandler;->this$0:Lcom/android/server/policy/LegacyGlobalActions;

    invoke-static {v7}, Lcom/android/server/policy/LegacyGlobalActions;->-wrap31(Lcom/android/server/policy/LegacyGlobalActions;)V

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_2
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_3
        :pswitch_7
        :pswitch_8
        :pswitch_9
        :pswitch_a
        :pswitch_b
        :pswitch_0
        :pswitch_c
    .end packed-switch
.end method


text:
Package.describe({
  name: 'with-options',
  version: '1.0.0',
  summary: 'Sample package using bonce to make its browserified file.',
  git: '',
  documentation: 'README.md'
});

// Note:
//  there's no Npm.depends() because we don't want Meteor to get the modules
//  because we don't want them in the published package.

Package.onUse(function(api) {
  api.versionsFrom('1');
  api.addFiles([
    'package.browserified.js'  // this is the file created by bonce
  ], 'client');

  api.export('upperCase', 'client');
});

Package.onTest(function(api) {
  api.use('tinytest');
  api.use('with-options');
});


text:
<?xml version="1.0"?>

<document>
 <properties>
  <title>Building</title>
  <author email="dev@commons.apache.org">Commons Documentation Team</author>
 </properties>

Add a structured way to write IPTC image metadata to JPEG files.

Refactor interface. Rename Sanselan methods and public class names. Formats should subclass imagemetadata class to include format-specific info ie. GIF's transparency index.

More control over writing.

Share test image suite with comments.

Improve Javadoc and write more FAQs / examples.

Allow user to disable autoconvesion to sRGB/Grayscale.

Add support for more than 8 bits per channel.

Reading all images from .gif files isn't working. see: getAllBufferedImages().

Add request/hint params to ImageFactory, per Endre's suggestion.

Add DNG metadata/image info read. Perhaps some RAW formats as well.

Publish image library (possibly) and links to other libraries.

Develop suite of unit tests that only depend on images in the public domain.

Add support for reading and writing XMP metadata.

</document>


text:
package jetbrick.collections.bidimap;

import java.util.*;

public class BidiTreeMap<K, V> extends AbstractBidiSortedMap<K, V> {

    public BidiTreeMap() {
        super(new TreeMap<K, V>(), new TreeMap<V, K>(), null);
    }

    public BidiTreeMap(Comparator<? super K> keyComparator, Comparator<? super V> valueComparator) {
        super(new TreeMap<K, V>(keyComparator), new TreeMap<V, K>(valueComparator), null);
    }

    public BidiTreeMap(Map<? extends K, ? extends V> map) {
        super(new TreeMap<K, V>(), new TreeMap<V, K>(), null);
        putAll(map);
    }

    private BidiTreeMap(SortedMap<K, V> normalMap, SortedMap<V, K> reverseMap, BidiMap<V, K> inverseBidiMap) {
        super(normalMap, reverseMap, inverseBidiMap);
    }

    @Override
    protected BidiMap<V, K> createBidiMap(Map<V, K> normalMap, Map<K, V> reverseMap, BidiMap<K, V> inverseMap) {
        return new BidiTreeMap<V, K>((SortedMap<V, K>) normalMap, (SortedMap<K, V>) reverseMap, inverseMap);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;

namespace ARDrone.Capture
{
    public class SnapshotRecorder
    {
        public SnapshotRecorder()
        {

        }

        public void SaveSnapshot(Bitmap image, String filePath)
        {
            image.Save(filePath);
            image.Dispose();
        }

    }
}


text:
package com.twitter.finagle.tracing

import org.scalacheck.Gen
import org.scalatest.FunSuite
import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks

class TracerTest extends FunSuite with ScalaCheckDrivenPropertyChecks {

  case class TestTracer(res: Option[Boolean]) extends Tracer {
    def record(record: Record): Unit = ()
    def sampleTrace(traceId: TraceId): Option[Boolean] = res
    override def isActivelyTracing(traceId: TraceId): Boolean = res.getOrElse(true)
  }

  private val genNone: Gen[TestTracer] =
    Gen.const(TestTracer(None))

  private val genSomeTrue: Gen[TestTracer] =
    Gen.const(TestTracer(Some(true)))

  private val genSomeFalse: Gen[TestTracer] =
    Gen.const(TestTracer(Some(false)))

  private val genTracers: Gen[List[Tracer]] =
    Gen.listOf(Gen.oneOf(genNone, genSomeTrue, genSomeFalse))

  private val id = TraceId(None, None, SpanId(0L), None)

  test("BroadcastTracer.sampleTrace If all None returns None") {
    forAll(Gen.nonEmptyListOf(genNone)) { ts =>
      val bt = BroadcastTracer(ts)
      assert(bt.sampleTrace(id).isEmpty)
    }
  }

  test("BroadcastTracer.sampleTrace If one Some(true) returns Some(true)") {
    val gen = for {
      ts1 <- genTracers
      g <- genSomeTrue
      ts2 <- genTracers
    } yield (ts1 :+ g) ::: ts2

    forAll(gen) { ts =>
      val bt = BroadcastTracer(ts)
      assert(bt.sampleTrace(id).contains(true))
    }
  }

  test("BroadcastTracer.sampleTrace If one Some(false) returns None") {
    val gen = for {
      ts1 <- Gen.nonEmptyListOf(genNone)
      g <- genSomeFalse
      ts2 <- Gen.nonEmptyListOf(genNone)
    } yield (ts1 :+ g) ::: ts2

    forAll(gen) { ts =>
      val bt = BroadcastTracer(ts)
      assert(bt.sampleTrace(id).isEmpty)
    }
  }

  test("BroadcastTracer.sampleTrace If all Some(false) returns Some(false)") {
    forAll(Gen.nonEmptyListOf(genSomeFalse)) { ts =>
      val bt = BroadcastTracer(ts)
      assert(bt.sampleTrace(id).contains(false))
    }
  }

  test("BroadcastTracer.isActivelyTracing If any Some(true) returns true") {
    val gen = for {
      ts1 <- genTracers
      g <- genSomeTrue
      ts2 <- genTracers
    } yield (ts1 :+ g) ::: ts2

    forAll(gen) { ts =>
      val bt = BroadcastTracer(ts)
      assert(bt.isActivelyTracing(id))
    }
  }

  test("BroadcastTracer.isActivelyTracing If all Some(false) returns false") {
    val gen = for {
      ts1 <- Gen.listOf(genSomeFalse)
      g <- genSomeFalse
      ts2 <- Gen.listOf(genSomeFalse)
    } yield (ts1 :+ g) ::: ts2

    forAll(gen) { ts =>
      val bt = BroadcastTracer(ts)
      assert(!bt.isActivelyTracing(id))
    }
  }

  test("check equality of tracers") {
    val previous = DefaultTracer.self
    DefaultTracer.self = NullTracer

    val tracer = DefaultTracer
    assert(tracer == NullTracer, "Can't detect that tracer is NullTracer")

    DefaultTracer.self = ConsoleTracer
    assert(tracer != NullTracer, "Can't detect that tracer isn't NullTracer anymore")
    assert(tracer == ConsoleTracer, "Can't detect that tracer is ConsoleTracer")

    // Restore initial state
    DefaultTracer.self = previous
  }
}


text:
var FuzzyModule = require('./AI/FuzzyModule');
var FzAND = require('./AI/FzAND');
var FzOR = require('./AI/FzOR');

module.exports = function() {
  var self = this;
  this.attackModule = new FuzzyModule();
  this.distanceFLV = this.attackModule.createFLV("distance")
  this.close_to_target = this.distanceFLV.addLeftShoulderSet("close", 0, 9000, 40000);
  this.average_to_target = this.distanceFLV.addTriangleSet("average", 20000, 40000, 60000);
  this.far_to_target = this.distanceFLV.addRightShoulderSet("far", 40000, 60000, 400000);

  this.sizeFLV = this.attackModule.createFLV("size");
  this.small_target = this.sizeFLV.addLeftShoulderSet("small", 1, 3, 6);
  this.medium_target = this.sizeFLV.addTriangleSet("medium",3 ,6, 8);
  this.big_target = this.sizeFLV.addRightShoulderSet("big", 8, 9, 10);

  this.desirabilityFLV = this.attackModule.createFLV("desirability");
  this.undesirable = this.desirabilityFLV.addLeftShoulderSet("undesirable", 0, 30, 50);
  this.desirable = this.desirabilityFLV.addTriangleSet("desirable", 30, 50 ,70);
  this.very_desirable = this.desirabilityFLV.addRightShoulderSet("very_desirable", 50, 70, 100);

  this.declareRules = function() {
    self.attackModule.addRule(FzAND(self.close_to_target, self.small_target), self.desirable);
    self.attackModule.addRule(FzAND(self.close_to_target, self.medium_target), self.desirable);
    self.attackModule.addRule(FzAND(self.close_to_target, self.big_target), self.very_desirable);

    self.attackModule.addRule(FzAND(self.average_to_target, self.small_target), self.undesirable);
    self.attackModule.addRule(FzAND(self.average_to_target, self.medium_target), self.desirable);
    self.attackModule.addRule(FzAND(self.average_to_target, self.big_target), self.very_desirable);

    self.attackModule.addRule(FzAND(self.far_to_target, self.small_target), self.undesirable);
    self.attackModule.addRule(FzAND(self.far_to_target, self.medium_target), self.undesirable);
    self.attackModule.addRule(FzAND(self.far_to_target, self.big_target), self.desirable);
  }
}

module.exports.prototype.getCrispValue = function(distance, size) {
  this.attackModule.fuzzify("distance", distance);
  this.attackModule.fuzzify("size", size);
  this.declareRules();
  return this.attackModule.deFuzzify("desirability");
}


text:
import { GET_USER_REQUEST, GET_USER_SUCCESS, GET_USER_FAILURE } from '../constants/ActionTypes'

const initialState = {
    profile: {},
    isFetching: false
}

export default function users(state = initialState, action) {
    switch (action.type) {
        case GET_USER_REQUEST:
            return Object.assign({}, state, { isFetching: true })
        case GET_USER_SUCCESS:
            if (!state.profile[action.response.login]) {
                const profile = Object.assign({}, state.profile, { [action.response.login]: action.response })
                return Object.assign({}, state, { isFetching: false }, { profile })
            }
            return state
        case GET_USER_FAILURE:
            return Object.assign({}, state, { isFetching: false })
        default:
            return state
    }
}


text:
package org.hl7.v3;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for adxp.country complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="adxp.country">
 *   <complexContent>
 *     <restriction base="{urn:hl7-org:v3}ADXP">
 *       <attribute name="partType" type="{urn:hl7-org:v3}AddressPartType" fixed="CNT" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "adxp.country")
public class AdxpCountry
    extends ADXP
{

}