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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.0</version>
    <relativePath />
  </parent>

  <groupId>eu.michael-simons</groupId>
  <artifactId>biking2</artifactId>
  <version>3.4.2-SNAPSHOT</version>

  <name>biking2</name>
  <url>https://biking.michael-simons.eu</url>
  <inceptionYear>2014</inceptionYear>
  <organization>
    <name>michael-simons.eu</name>
    <url>http://michael-simons.eu</url>
  </organization>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Michael J. Simons</name>
      <email>michael@simons.ac</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:michael-simons/biking2.git</connection>
    <developerConnection>scm:git:git@github.com:michael-simons/biking2.git</developerConnection>
    <url>https://github.com/michael-simons/biking2</url>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
    <build-date>${maven.build.timestamp}</build-date>

    <asciidoctor-maven-plugin.version>2.1.0</asciidoctor-maven-plugin.version>
    <bootstrap.version>3.1.1</bootstrap.version>
    <checkstyle.version>8.42</checkstyle.version>
    <jacoco-maven-plugin.version>0.8.7</jacoco-maven-plugin.version>
    <java.version>17</java.version>
    <jool.version>0.9.14</jool.version>
    <jooq.version>3.16.6</jooq.version>
    <joor.version>0.9.14</joor.version>
    <jqassistant.version>1.10.1</jqassistant.version>
    <jqassistant.plugin.version>1.10.1</jqassistant.plugin.version>
    <jquery.version>1.11.0</jquery.version>
    <angularjs.version>1.2.29</angularjs.version>
    <highcharts.version>3.0.10</highcharts.version>
    <openlayers.version>2.13.1</openlayers.version>
    <angular-ui-bootstrap.version>0.10.0</angular-ui-bootstrap.version>
    <angular-file-upload.version>1.2.8</angular-file-upload.version>
    <maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
    <maven-surefire-plugin.version>3.0.0-M3</maven-surefire-plugin.version>
    <momentjs.version>2.10.6</momentjs.version>
    <sockjs-client.version>1.0.2</sockjs-client.version>
    <stomp-websocket.version>2.3.3</stomp-websocket.version>
    <wro4j-spring-boot-starter.version>0.11.1</wro4j-spring-boot-starter.version>

    <start-class>ac.simons.biking2.Application</start-class>

    <snippetsDirectory>${project.build.directory}/generated-snippets</snippetsDirectory>

    <!-- Same exclusions as pure JaCoCo -->
    <sonar.coverage.exclusions>**/Application.java,**/JAXBContextFactory.java,src/main/java/ac/simons/biking2/config/*</sonar.coverage.exclusions>

    <db.url>jdbc:h2:${project.build.directory}/flyway-code-gen</db.url>
    <db.username>sa</db.username>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- ActiveMQ seems to have this in different versions in provided scope and our enforcer rules fail... -->
      <dependency>
        <groupId>org.apache.zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
        <version>3.4.14</version>
      </dependency>
      <!-- Zookeeper and Hibernate Java 8 issues -->
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
      </dependency>
      <!-- Again ActiveMQ -->
      <dependency>
        <groupId>org.linkedin</groupId>
        <artifactId>org.linkedin.util-core</artifactId>
        <version>1.7.1</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging-annotations</artifactId>
        <version>2.2.1.Final</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging-processor</artifactId>
        <version>2.2.1.Final</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-websocket</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-activemq</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-spring</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-stomp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-mqtt</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-reactor-netty</artifactId>
    </dependency>
    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-jpa</artifactId>
      <exclusions>
        <exclusion>
          <groupId>com.querydsl</groupId>
          <artifactId>querydsl-apt</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-jooq</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-java8</artifactId>
      <version>${hibernate.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-configuration-processor</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.module</groupId>
      <artifactId>jackson-module-jaxb-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jooq</groupId>
      <artifactId>jool</artifactId>
      <version>${jool.version}</version>
    </dependency>

    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
    </dependency>

    <!-- Tests and development -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jooq</groupId>
      <artifactId>joor</artifactId>
      <version>${joor.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.restdocs</groupId>
      <artifactId>spring-restdocs-mockmvc</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Web UI -->
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>bootstrap</artifactId>
      <version>${bootstrap.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.webjars</groupId>
          <artifactId>jquery</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>jquery</artifactId>
      <version>${jquery.version}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>angularjs</artifactId>
      <version>${angularjs.version}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>angular-ui-bootstrap</artifactId>
      <version>${angular-ui-bootstrap.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.webjars</groupId>
          <artifactId>angularjs</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.webjars</groupId>
          <artifactId>bootstrap</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>angular-file-upload</artifactId>
      <version>${angular-file-upload.version}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>momentjs</artifactId>
      <version>${momentjs.version}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>highcharts</artifactId>
      <version>${highcharts.version}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>openlayers</artifactId>
      <version>${openlayers.version}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>sockjs-client</artifactId>
      <version>${sockjs-client.version}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>stomp-websocket</artifactId>
      <version>${stomp-websocket.version}</version>
    </dependency>
    <dependency>
      <groupId>eu.michael-simons</groupId>
      <artifactId>wro4j-spring-boot-starter</artifactId>
      <version>${wro4j-spring-boot-starter.version}</version>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>build.properties</include>
          <include>wro.xml</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/webapp</directory>
      </resource>
      <resource>
        <directory>src/main/webapp</directory>
        <filtering>true</filtering>
        <includes>
          <include>/public/js/OpenLayersConfig.js</include>
        </includes>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <configLocation>src/checkstyle/checkstyle.xml</configLocation>
            <suppressionsLocation>src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
            <encoding>UTF-8</encoding>
            <consoleOutput>true</consoleOutput>
            <failsOnError>true</failsOnError>
            <linkXRef>false</linkXRef>
            <excludes>${project.build.directory}/generated-sources/**/*</excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-maven-plugin</artifactId>
        <version>${flyway.version}</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>migrate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <url>${db.url}</url>
          <user>${db.username}</user>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jooq</groupId>
        <artifactId>jooq-codegen-maven</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <jdbc>
            <url>${db.url}</url>
            <user>${db.username}</user>
          </jdbc>
          <generator>
            <database>
              <name>org.jooq.meta.h2.H2Database</name>
              <schemaVersionProvider>SELECT :schema_name || '_' || MAX("version") FROM "flyway_schema_history"</schemaVersionProvider>
              <includes>.*</includes>
              <excludes>schema_version</excludes>
              <schemata>
                <schema>
                  <inputSchema>PUBLIC</inputSchema>
                  <outputSchemaToDefault>true</outputSchemaToDefault>
                </schema>
              </schemata>
            </database>
            <generate>
              <deprecated>false</deprecated>
              <javaTimeTypes>true</javaTimeTypes>
            </generate>
            <target>
              <packageName>ac.simons.biking2.db</packageName>
              <directory>target/generated-sources/jooq</directory>
            </target>
          </generator>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <excludeDevtools>true</excludeDevtools>
          <excludes>
            <exclude>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
            </exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <release>${java.version}</release>
          <compilerArgs>
            <arg>-parameters</arg>
            <arg>-Xlint:unchecked</arg>
          </compilerArgs>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctor-maven-plugin</artifactId>
        <version>${asciidoctor-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>generate-docs</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>process-asciidoc</goal>
            </goals>
            <configuration>
              <backend>html</backend>
              <doctype>book</doctype>
              <imagesDir>img</imagesDir>
              <sourceDirectory>${basedir}/src/docs</sourceDirectory>
              <sourceDocumentName>index.adoc</sourceDocumentName>
              <attributes>
                <snippets>${snippetsDirectory}</snippets>
                <rules>${basedir}/src/jqassistant</rules>
              </attributes>
              <!-- Generate documentation in dedicated directory while removing unnecessary files -->
              <outputDirectory>
                ${project.build.outputDirectory}/public/docs
              </outputDirectory>
              <resources>
                <resource>
                  <directory>
                    ${basedir}/src/docs
                  </directory>
                  <excludes>
                    <exclude>biking2-architecture.*</exclude>
                    <exclude>10_quality_tree.nm5</exclude>
                    <exclude>degraph.*</exclude>
                  </excludes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce</id>
            <configuration>
              <rules>
                <DependencyConvergence />
                <requireMavenVersion>
                  <version>3.8.4</version>
                </requireMavenVersion>
              </rules>
            </configuration>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <configuration>
          <excludes>
            <!-- Application starter -->
            <exclude>ac/simons/biking2/Application.class</exclude>
            <!-- Checked JAXBException while creating contexts -->
            <exclude>ac/simons/biking2/misc/JAXBContextFactory.class</exclude>
            <!-- Configuration -->
            <exclude>ac/simons/biking2/config/*</exclude>
            <!-- jOOQ Code -->
            <exclude>ac/simons/biking2/db/**/*</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <id>pre-unit-test</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>post-unit-test</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
              <goal>check</goal>
            </goals>
            <configuration>
              <rules>
                <rule>
                  <element>BUNDLE</element>
                  <limits>
                    <limit>
                      <counter>INSTRUCTION</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.95</minimum>
                    </limit>
                    <limit>
                      <counter>COMPLEXITY</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.85</minimum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <forkCount>1</forkCount>
          <reuseForks>true</reuseForks>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.buschmais.jqassistant</groupId>
        <artifactId>jqassistant-maven-plugin</artifactId>
        <version>${jqassistant.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>scan</goal>
              <goal>analyze</goal>
            </goals>
            <configuration>
              <failOnSeverity>MINOR</failOnSeverity>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <rulesDirectory>${basedir}/src/jqassistant</rulesDirectory>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>com.buschmais.jqassistant</groupId>
        <artifactId>jqassistant-maven-plugin</artifactId>
        <version>${jqassistant.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
</project>


text:
local clock = os.clock
function sleep(n)  -- seconds
	local t0 = clock()
	io.write("\n\nSleeping for " .. n .. " seconds")
	while clock() - t0 <= n do end
end
-- warning: clock can eventually wrap around for sufficiently large n
-- (whose value is platform dependent).  Even for n == 1, clock() - t0
-- might become negative on the second that clock wraps.

io.write("Hello, may you input me a number? ")
theirNumber = io.read()
while tonumber(theirNumber) == nil do
	io.write("I'm sorry, that didn't seem to be a number, try again: ")
	theirNumber = io.read()
end
theirNumber = tonumber(theirNumber)
if theirNumber % 10 < 5 then
	theirNumber = theirNumber - (theirNumber % 10)
else
	theirNumber = theirNumber + 10 - (theirNumber % 10)
end
io.write("It appears your number rounded is " .. theirNumber .. "\n")

sleep(5)

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <dimen name="video_frame_list_margin">10dp</dimen>
    <dimen name="drawable_padding">4dp</dimen>
    <dimen name="layout_margin_30dp">30dp</dimen>
    <dimen name="layout_margin_20dp">20dp</dimen>
    <dimen name="layout_margin_12dp">12dp</dimen>
    <dimen name="layout_margin_10dp">10dp</dimen>
    <dimen name="layout_margin_5dp">5dp</dimen>
    <dimen name="layout_padding_15dp">15dp</dimen>
    <dimen name="thumbnail_height">50dp</dimen>
    <dimen name="bottom_bar_width">72dp</dimen>
    <dimen name="drawable_width">32dp</dimen>
    <dimen name="drawable_height">32dp</dimen>
</resources>


text:
<?php
/**
 * WPSEO plugin file.
 *
 * This file acts as a proxy. It will read external files and serves the like they are located locally.
 *
 * @package WPSEO\Admin
 */

switch ( filter_input( INPUT_GET, 'file', FILTER_SANITIZE_STRING ) ) {
	case 'research-webworker':
		$my_yoast_url              = 'https://my.yoast.com/api/downloads/file/analysis-worker';
		$my_yoast_url_content_type = 'text/javascript; charset=UTF-8';
		break;
}

if ( empty( $my_yoast_url ) ) {
	exit;
}

header( 'Content-Type: ' . $my_yoast_url_content_type );
header( 'Cache-Control: max-age=86400' );

readfile( $my_yoast_url );

exit;


text:
module Graphics.Gnuplot.Frame (
   Frame.T,
   cons, simple, empty,
   ) where

import qualified Graphics.Gnuplot.Frame.OptionSet as OptionSet
import qualified Graphics.Gnuplot.Private.Frame as Frame
import qualified Graphics.Gnuplot.Private.Plot as Plot
import qualified Graphics.Gnuplot.Private.GraphEmpty as Empty
import qualified Graphics.Gnuplot.Private.Graph as Graph

cons :: OptionSet.T graph -> Plot.T graph -> Frame.T graph
cons = Frame.Cons

simple :: Graph.C graph => Plot.T graph -> Frame.T graph
simple = cons OptionSet.deflt

empty :: Frame.T Empty.T
empty = simple $ Plot.pure []


text:
//
// Copyright RIME Developers
// Distributed under the BSD License
//
// Script translator
//
// 2011-07-10 GONG Chen <chen.sst@gmail.com>
//
#include <algorithm>
#include <stack>
#include <boost/algorithm/string/join.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <rime/composition.h>
#include <rime/candidate.h>
#include <rime/config.h>
#include <rime/context.h>
#include <rime/engine.h>
#include <rime/schema.h>
#include <rime/translation.h>
#include <rime/dict/dictionary.h>
#include <rime/algo/syllabifier.h>
#include <rime/gear/poet.h>
#include <rime/gear/script_translator.h>
#include <rime/gear/translator_commons.h>

//static const char* quote_left = "\xef\xbc\x88";
//static const char* quote_right = "\xef\xbc\x89";

namespace rime {

namespace {

struct SyllabifyTask {
  const Code& code;
  const SyllableGraph& graph;
  size_t target_pos;
  function<void (SyllabifyTask* task, size_t depth,
                      size_t current_pos, size_t next_pos)> push;
  function<void (SyllabifyTask* task, size_t depth)> pop;
};

static bool syllabify_dfs(SyllabifyTask* task,
                          size_t depth, size_t current_pos) {
  if (depth == task->code.size()) {
    return current_pos == task->target_pos;
  }
  SyllableId syllable_id = task->code.at(depth);
  auto z = task->graph.edges.find(current_pos);
  if (z == task->graph.edges.end())
    return false;
  // favor longer spellings
  for (const auto& y : boost::adaptors::reverse(z->second)) {
    size_t end_vertex_pos = y.first;
    if (end_vertex_pos > task->target_pos)
      continue;
    auto x = y.second.find(syllable_id);
    if (x != y.second.end()) {
      task->push(task, depth, current_pos, end_vertex_pos);
      if (syllabify_dfs(task, depth + 1, end_vertex_pos))
        return true;
      task->pop(task, depth);
    }
  }
  return false;
}

}  // anonymous namespace

class ScriptSyllabifier : public PhraseSyllabifier {
 public:
  ScriptSyllabifier(ScriptTranslator* translator,
                    const string& input,
                    size_t start)
      : translator_(translator), input_(input), start_(start) {
  }

  virtual Spans Syllabify(const Phrase* phrase);
  size_t BuildSyllableGraph(Prism& prism);
  string GetPreeditString(const Phrase& cand) const;
  string GetOriginalSpelling(const Phrase& cand) const;

  const SyllableGraph& syllable_graph() const { return syllable_graph_; }

 protected:
  ScriptTranslator* translator_;
  string input_;
  size_t start_;
  SyllableGraph syllable_graph_;
};

class ScriptTranslation : public Translation {
 public:
  ScriptTranslation(ScriptTranslator* translator,
                    const string& input, size_t start)
      : translator_(translator), start_(start),
        syllabifier_(New<ScriptSyllabifier>(translator, input, start)) {
    set_exhausted(true);
  }
  bool Evaluate(Dictionary* dict, UserDictionary* user_dict);
  virtual bool Next();
  virtual an<Candidate> Peek();

 protected:
  bool CheckEmpty();
  bool IsNormalSpelling() const;
  an<Sentence> MakeSentence(Dictionary* dict,
                                    UserDictionary* user_dict);

  ScriptTranslator* translator_;
  size_t start_;
  an<ScriptSyllabifier> syllabifier_;

  an<DictEntryCollector> phrase_;
  an<UserDictEntryCollector> user_phrase_;
  an<Sentence> sentence_;

  DictEntryCollector::reverse_iterator phrase_iter_;
  UserDictEntryCollector::reverse_iterator user_phrase_iter_;
  size_t user_phrase_index_ = 0;
};

// ScriptTranslator implementation

ScriptTranslator::ScriptTranslator(const Ticket& ticket)
    : Translator(ticket),
      Memory(ticket),
      TranslatorOptions(ticket) {
  if (!engine_)
    return;
  if (Config* config = engine_->schema()->config()) {
    config->GetInt(name_space_ + "/spelling_hints", &spelling_hints_);
  }
}

an<Translation> ScriptTranslator::Query(const string& input,
                                                const Segment& segment) {
  if (!dict_ || !dict_->loaded())
    return nullptr;
  if (!segment.HasTag(tag_))
    return nullptr;
  DLOG(INFO) << "input = '" << input
             << "', [" << segment.start << ", " << segment.end << ")";

  FinishSession();

  bool enable_user_dict = user_dict_ && user_dict_->loaded() &&
      !IsUserDictDisabledFor(input);

  // the translator should survive translations it creates
  auto result = New<ScriptTranslation>(this, input, segment.start);
  if (!result ||
      !result->Evaluate(dict_.get(),
                        enable_user_dict ? user_dict_.get() : NULL)) {
    return nullptr;
  }
  return New<DistinctTranslation>(result);
}

string ScriptTranslator::FormatPreedit(const string& preedit) {
  string result = preedit;
  preedit_formatter_.Apply(&result);
  return result;
}

string ScriptTranslator::Spell(const Code& code) {
  string result;
  vector<string> syllables;
  if (!dict_ || !dict_->Decode(code, &syllables) || syllables.empty())
    return result;
  result =  boost::algorithm::join(syllables,
                                   string(1, delimiters_.at(0)));
  comment_formatter_.Apply(&result);
  return result;
}

bool ScriptTranslator::Memorize(const CommitEntry& commit_entry) {
  bool update_elements = false;
  // avoid updating single character entries within a phrase which is
  // composed with single characters only
  if (commit_entry.elements.size() > 1) {
    for (const DictEntry* e : commit_entry.elements) {
      if (e->code.size() > 1) {
        update_elements = true;
        break;
      }
    }
  }
  if (update_elements) {
    for (const DictEntry* e : commit_entry.elements) {
      user_dict_->UpdateEntry(*e, 0);
    }
  }
  user_dict_->UpdateEntry(commit_entry, 1);
  return true;
}

// ScriptSyllabifier implementation

Spans ScriptSyllabifier::Syllabify(const Phrase* phrase) {
  Spans result;
  vector<size_t> vertices;
  vertices.push_back(start_);
  SyllabifyTask task{
    phrase->code(),
    syllable_graph_,
    phrase->end() - start_,
    [&](SyllabifyTask* task, size_t depth,
        size_t current_pos, size_t next_pos) {
      vertices.push_back(start_ + next_pos);
    },
    [&](SyllabifyTask* task, size_t depth) {
      vertices.pop_back();
    }
  };
  if (syllabify_dfs(&task, 0, phrase->start() - start_)) {
    result.set_vertices(std::move(vertices));
  }
  return result;
}

size_t ScriptSyllabifier::BuildSyllableGraph(Prism& prism) {
  Syllabifier syllabifier(translator_->delimiters(),
                          translator_->enable_completion(),
                          translator_->strict_spelling());
  size_t consumed = syllabifier.BuildSyllableGraph(input_,
                                                   prism,
                                                   &syllable_graph_);
  return consumed;
}

string ScriptSyllabifier::GetPreeditString(const Phrase& cand) const {
  const auto& delimiters = translator_->delimiters();
  std::stack<size_t> lengths;
  string output;
  SyllabifyTask task{
    cand.code(),
    syllable_graph_,
    cand.end() - start_,
    [&](SyllabifyTask* task, size_t depth,
        size_t current_pos, size_t next_pos) {
      size_t len = output.length();
      if (depth > 0 && len > 0 &&
          delimiters.find(output[len - 1]) == string::npos) {
        output += delimiters.at(0);
      }
      output += input_.substr(current_pos, next_pos - current_pos);
      lengths.push(len);
    },
    [&](SyllabifyTask* task, size_t depth) {
      output.resize(lengths.top());
      lengths.pop();
    }
  };
  if (syllabify_dfs(&task, 0, cand.start() - start_)) {
    return translator_->FormatPreedit(output);
  }
  else {
    return string();
  }
}

string ScriptSyllabifier::GetOriginalSpelling(const Phrase& cand) const {
  if (translator_ &&
      static_cast<int>(cand.code().size()) <= translator_->spelling_hints()) {
    return translator_->Spell(cand.code());
  }
  return string();
}

// ScriptTranslation implementation

bool ScriptTranslation::Evaluate(Dictionary* dict, UserDictionary* user_dict) {
  size_t consumed = syllabifier_->BuildSyllableGraph(*dict->prism());
  const auto& syllable_graph = syllabifier_->syllable_graph();

  phrase_ = dict->Lookup(syllable_graph, 0);
  if (user_dict) {
    user_phrase_ = user_dict->Lookup(syllable_graph, 0);
  }
  if (!phrase_ && !user_phrase_)
    return false;
  // make sentences when there is no exact-matching phrase candidate
  size_t translated_len = 0;
  if (phrase_ && !phrase_->empty())
    translated_len = (std::max)(translated_len, phrase_->rbegin()->first);
  if (user_phrase_ && !user_phrase_->empty())
    translated_len = (std::max)(translated_len, user_phrase_->rbegin()->first);
  if (translated_len < consumed &&
      syllable_graph.edges.size() > 1) {  // at least 2 syllables required
    sentence_ = MakeSentence(dict, user_dict);
  }

  if (phrase_)
    phrase_iter_ = phrase_->rbegin();
  if (user_phrase_)
    user_phrase_iter_ = user_phrase_->rbegin();
  return !CheckEmpty();
}

bool ScriptTranslation::Next() {
  if (exhausted())
    return false;
  if (sentence_) {
    sentence_.reset();
    return !CheckEmpty();
  }
  int user_phrase_code_length = 0;
  if (user_phrase_ && user_phrase_iter_ != user_phrase_->rend()) {
    user_phrase_code_length = user_phrase_iter_->first;
  }
  int phrase_code_length = 0;
  if (phrase_ && phrase_iter_ != phrase_->rend()) {
    phrase_code_length = phrase_iter_->first;
  }
  if (user_phrase_code_length > 0 &&
      user_phrase_code_length >= phrase_code_length) {
    DictEntryList& entries(user_phrase_iter_->second);
    if (++user_phrase_index_ >= entries.size()) {
      ++user_phrase_iter_;
      user_phrase_index_ = 0;
    }
  }
  else if (phrase_code_length > 0) {
    DictEntryIterator& iter(phrase_iter_->second);
    if (!iter.Next()) {
      ++phrase_iter_;
    }
  }
  return !CheckEmpty();
}

bool ScriptTranslation::IsNormalSpelling() const {
  const auto& syllable_graph = syllabifier_->syllable_graph();
  return !syllable_graph.vertices.empty() &&
      (syllable_graph.vertices.rbegin()->second == kNormalSpelling);
}

an<Candidate> ScriptTranslation::Peek() {
  if (exhausted())
    return nullptr;
  if (sentence_) {
    if (sentence_->preedit().empty()) {
      sentence_->set_preedit(syllabifier_->GetPreeditString(*sentence_));
    }
    if (sentence_->comment().empty()) {
      auto spelling = syllabifier_->GetOriginalSpelling(*sentence_);
      if (!spelling.empty() && spelling != sentence_->preedit()) {
        sentence_->set_comment(/*quote_left + */spelling/* + quote_right*/);
      }
    }
    return sentence_;
  }
  size_t user_phrase_code_length = 0;
  if (user_phrase_ && user_phrase_iter_ != user_phrase_->rend()) {
    user_phrase_code_length = user_phrase_iter_->first;
  }
  size_t phrase_code_length = 0;
  if (phrase_ && phrase_iter_ != phrase_->rend()) {
    phrase_code_length = phrase_iter_->first;
  }
  an<Phrase> cand;
  if (user_phrase_code_length > 0 &&
      user_phrase_code_length >= phrase_code_length) {
    DictEntryList& entries(user_phrase_iter_->second);
    const auto& entry(entries[user_phrase_index_]);
    DLOG(INFO) << "user phrase '" << entry->text
               << "', code length: " << user_phrase_code_length;
    cand = New<Phrase>(translator_->language(),
                       "phrase",
                       start_,
                       start_ + user_phrase_code_length,
                       entry);
    cand->set_quality(entry->weight +
                      translator_->initial_quality() +
                      (IsNormalSpelling() ? 0.5 : -0.5));
  }
  else if (phrase_code_length > 0) {
    DictEntryIterator& iter(phrase_iter_->second);
    const auto& entry(iter.Peek());
    DLOG(INFO) << "phrase '" << entry->text
               << "', code length: " << user_phrase_code_length;
    cand = New<Phrase>(translator_->language(),
                       "phrase",
                       start_,
                       start_ + phrase_code_length,
                       entry);
    cand->set_quality(entry->weight +
                      translator_->initial_quality() +
                      (IsNormalSpelling() ? 0 : -1));
  }
  if (cand->preedit().empty()) {
    cand->set_preedit(syllabifier_->GetPreeditString(*cand));
  }
  if (cand->comment().empty()) {
    auto spelling = syllabifier_->GetOriginalSpelling(*cand);
    if (!spelling.empty() && spelling != cand->preedit()) {
      cand->set_comment(/*quote_left + */spelling/* + quote_right*/);
    }
  }
  cand->set_syllabifier(syllabifier_);
  return cand;
}

bool ScriptTranslation::CheckEmpty() {
  set_exhausted((!phrase_ || phrase_iter_ == phrase_->rend()) &&
                (!user_phrase_ || user_phrase_iter_ == user_phrase_->rend()));
  return exhausted();
}

an<Sentence>
ScriptTranslation::MakeSentence(Dictionary* dict, UserDictionary* user_dict) {
  const int kMaxSyllablesForUserPhraseQuery = 5;
  const auto& syllable_graph = syllabifier_->syllable_graph();
  WordGraph graph;
  for (const auto& x : syllable_graph.edges) {
    UserDictEntryCollector& dest(graph[x.first]);
    if (user_dict) {
      auto user_phrase = user_dict->Lookup(syllable_graph, x.first,
                                           kMaxSyllablesForUserPhraseQuery);
      if (user_phrase)
        dest.swap(*user_phrase);
    }
    if (auto phrase = dict->Lookup(syllable_graph, x.first)) {
      // merge lookup results
      for (auto& y : *phrase) {
        DictEntryList& entries(dest[y.first]);
        if (entries.empty()) {
          entries.push_back(y.second.Peek());
        }
      }
    }
  }
  Poet poet(translator_->language());
  auto sentence = poet.MakeSentence(graph,
                                    syllable_graph.interpreted_length);
  if (sentence) {
    sentence->Offset(start_);
    sentence->set_syllabifier(syllabifier_);
  }
  return sentence;
}

}  // namespace rime


text:
clear

echo "********************************************************************************"
echo "   Installing we.Mix L3846 packages to AEM..."
echo "********************************************************************************"

cd `dirname $0`
curl -u admin:admin -F file=@packages/we.mix.l3846.content.assets-1.0-SNAPSHOT.zip -F name=we.mix.l3846.content.assets-1.0-SNAPSHOT -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp
curl -u admin:admin -F file=@packages/we.mix.l3846.content-1.0-SNAPSHOT.zip -F name=we.mix.lab.content-1.0-SNAPSHOT -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp
curl -u admin:admin -F file=@packages/we.mix.content.app-1.0-SNAPSHOT.zip -F name=we.mix.content.app-1.0-SNAPSHOT -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp

curl -u admin:admin -F file=@packages/we.mix.content.app-1.0-SNAPSHOT.zip -F name=we.mix.content.app-1.0-SNAPSHOT -F force=true -F install=true http://localhost:4503/crx/packmgr/service.jsp


text:
/**
 * (c) 2010-2017 Torstein Honsi
 *
 * License: www.highcharts.com/license
 */
'use strict';
import H from '../parts/Globals.js';
import '../parts/Utilities.js';
import '../parts/Options.js';
import './BoxPlotSeries.js';
var each = H.each,
    noop = H.noop,
    seriesType = H.seriesType,
    seriesTypes = H.seriesTypes;

/**
 * Error bars are a graphical representation of the variability of data and are
 * used on graphs to indicate the error, or uncertainty in a reported
 * measurement.
 *
 * @sample       highcharts/demo/error-bar/
 *               Error bars
 * @extends      {plotOptions.boxplot}
 * @product      highcharts highstock
 * @optionparent plotOptions.errorbar
 */
seriesType('errorbar', 'boxplot', {

    /**
     * The main color of the bars. This can be overridden by
     * [stemColor](#plotOptions.errorbar.stemColor) and
     * [whiskerColor](#plotOptions.errorbar.whiskerColor) individually.
     *
     * @type    {Color}
     * @sample  {highcharts} highcharts/plotoptions/error-bar-styling/
     *          Error bar styling
     * @default #000000
     * @since   3.0
     * @product highcharts
     */
    color: '#000000',

    grouping: false,

    /**
     * The parent series of the error bar. The default value links it to
     * the previous series. Otherwise, use the id of the parent series.
     *
     * @since   3.0
     * @product highcharts
     */
    linkedTo: ':previous',

    tooltip: {
        pointFormat: '\u25CF {series.name}: {point.low} - {point.high}
'
    },

    /**
     * The line width of the whiskers, the horizontal lines marking low
     * and high values. When `null`, the general
     * [lineWidth](#plotOptions.errorbar.lineWidth) applies.
     *
     * @type    {Number}
     * @sample  {highcharts} highcharts/plotoptions/error-bar-styling/
     *          Error bar styling
     * @since   3.0
     * @product highcharts
     */
    whiskerWidth: null

// Prototype members
}, {
    type: 'errorbar',
    pointArrayMap: ['low', 'high'], // array point configs are mapped to this
    toYData: function (point) { // return a plain array for speedy calculation
        return [point.low, point.high];
    },
    pointValKey: 'high', // defines the top of the tracker
    doQuartiles: false,
    drawDataLabels: seriesTypes.arearange ?
        function () {
            var valKey = this.pointValKey;
            seriesTypes.arearange.prototype.drawDataLabels.call(this);
            // Arearange drawDataLabels does not reset point.y to high,
            // but to low after drawing (#4133)
            each(this.data, function (point) {
                point.y = point[valKey];
            });
        } :
        noop,

    /**
     * Get the width and X offset, either on top of the linked series column
     * or standalone
     */
    getColumnMetrics: function () {
        return (this.linkedParent && this.linkedParent.columnMetrics) ||
            seriesTypes.column.prototype.getColumnMetrics.call(this);
    }
});

/**
 * A `errorbar` series. If the [type](#series.errorbar.type) option
 * is not specified, it is inherited from [chart.type](#chart.type).
 *
 * @type      {Object}
 * @extends   series,plotOptions.errorbar
 * @excluding dataParser,dataURL,stack,stacking
 * @product   highcharts
 * @apioption series.errorbar
 */

/**
 * An array of data points for the series. For the `errorbar` series
 * type, points can be given in the following ways:
 *
 * 1.  An array of arrays with 3 or 2 values. In this case, the values
 * correspond to `x,low,high`. If the first value is a string, it is
 * applied as the name of the point, and the `x` value is inferred.
 * The `x` value can also be omitted, in which case the inner arrays
 * should be of length 2\. Then the `x` value is automatically calculated,
 * either starting at 0 and incremented by 1, or from `pointStart`
 * and `pointInterval` given in the series options.
 *
 *  ```js
 *     data: [
 *         [0, 10, 2],
 *         [1, 1, 8],
 *         [2, 4, 5]
 *     ]
 *  ```
 *
 * 2.  An array of objects with named values. The objects are point
 * configuration objects as seen below. If the total number of data
 * points exceeds the series' [turboThreshold](#series.errorbar.turboThreshold),
 * this option is not available.
 *
 *  ```js
 *     data: [{
 *         x: 1,
 *         low: 0,
 *         high: 0,
 *         name: "Point2",
 *         color: "#00FF00"
 *     }, {
 *         x: 1,
 *         low: 5,
 *         high: 5,
 *         name: "Point1",
 *         color: "#FF00FF"
 *     }]
 *  ```
 *
 * @type      {Array<Object|Array>}
 * @extends   series.arearange.data
 * @excluding dataLabels,drilldown,marker,states
 * @sample    {highcharts} highcharts/chart/reflow-true/
 *            Numerical values
 * @sample    {highcharts} highcharts/series/data-array-of-arrays/
 *            Arrays of numeric x and y
 * @sample    {highcharts} highcharts/series/data-array-of-arrays-datetime/
 *            Arrays of datetime x and y
 * @sample    {highcharts} highcharts/series/data-array-of-name-value/
 *            Arrays of point.name and y
 * @sample    {highcharts} highcharts/series/data-array-of-objects/
 *            Config objects
 * @product   highcharts
 * @apioption series.errorbar.data
 */


text:
.class Landroid/webkit/WebViewCore$TextFieldInitData;
.super Ljava/lang/Object;
.source "WebViewCore.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/webkit/WebViewCore;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "TextFieldInitData"
.end annotation

# instance fields
.field public mClientRect:Landroid/graphics/Rect;

.field public mContentBounds:Landroid/graphics/Rect;

.field public mFieldPointer:I

.field public mIsAutoCompleteEnabled:Z

.field public mIsSpellCheckEnabled:Z

.field public mIsTextFieldNext:Z

.field public mIsTextFieldPrev:Z

.field public mLabel:Ljava/lang/String;

.field public mMaxLength:I

.field public mName:Ljava/lang/String;

.field public mNodeLayerId:I

.field public mText:Ljava/lang/String;

.field public mType:I

# direct methods
.method constructor <init>()V
    .locals 0

    .prologue
    .line 936
    invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


text:
angular.module('async', [])
  .factory('async', ['$window', function ($window) {
    var async = $window.async;
    //delete $window.async
    return async;
  }]);


text:
// ============================================================================
//
// Copyright (C) 2006-2018 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// https://github.com/Talend/data-prep/blob/master/LICENSE
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================

package org.talend.dataprep.api.folder;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * Model a folder tree node.
 */
public class FolderTreeNode implements Serializable {

    /**
     * Serialization UID.
     */
    private static final long serialVersionUID = 1L;

    /**
     * The node folder
     */
    private Folder folder;

    /**
     * The node children
     */
    private List<FolderTreeNode> children;

    /**
     * Default empty constructor.
     */
    public FolderTreeNode() {
        // for the json serialization
    }

    public FolderTreeNode(final Folder folder, final List<FolderTreeNode> children) {
        this.folder = folder;
        this.children = children;
    }

    /**
     * @return the node folder
     */
    public Folder getFolder() {
        return folder;
    }

    /**
     * @param folder the node folder
     */
    public void setFolder(final Folder folder) {
        this.folder = folder;
    }

    /**
     * @return the children
     */
    public List<FolderTreeNode> getChildren() {
        return children;
    }

    /**
     * @param children the node children
     */
    public void setChildren(final List<FolderTreeNode> children) {
        this.children = children;
    }

    /**
     * @see Object#equals(Object)
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final FolderTreeNode node = (FolderTreeNode) o;
        return Objects.equals(this.folder, node.folder) && Objects.equals(children, node.children);
    }

    /**
     * @see Object#hashCode
     */
    @Override
    public int hashCode() {
        return Objects.hash(folder, children);
    }

    /**
     * @see Object#toString()
     */
    @Override
    public String toString() {
        return "FolderTreeNode {" + //
                "   folder='" + folder + '\'' + //
                ",  children='" + children + '\'' + //
                '}';
    }
}


text:
Meteor.startup(function () {

  // New user email

  Router.route('/email/new-user/:id?', {
    name: 'newUser',
    where: 'server',
    action: function() {
      var user = Meteor.users.findOne(this.params.id);
      var emailProperties = {
        profileUrl: getProfileUrl(user),
        username: getUserName(user)
      };
      html = getEmailTemplate('emailNewUser')(emailProperties);
      this.response.write(buildEmailTemplate(html));
      this.response.end();
    }
  });

  // New post email

  Router.route('/email/new-post/:id?', {
    name: 'newPost',
    where: 'server',
    action: function() {
      var post = Posts.findOne(this.params.id);
      if (!!post) {
        html = getEmailTemplate('emailNewPost')(getPostProperties(post));
      } else {
        html = "
没有相关帖子.
"
      }
      this.response.write(buildEmailTemplate(html));
      this.response.end();
    }
  });

});


text:
<?php

namespace phpDocumentor\Transformer;

use Mockery as m;
use phpDocumentor\Transformer\Template\Parameter;

/**
 * Test class for phpDocumentor\Transformer\Transformation
 */
class TransformationTest extends m\Adapter\Phpunit\MockeryTestCase
{
    /** @var Transformation $fixture */
    protected $fixture;

    /** @var string */
    protected $query = 'queryString';

    /** @var string */
    protected $writer = 'writerString';

    /** @var string */
    protected $source = 'sourceString';

    /** @var string */
    protected $artifact = 'artifactString';

    /**
     * Initializes the fixture and dependencies for this testcase.
     */
    protected function setUp()
    {
        $this->fixture = new Transformation($this->query, $this->writer, $this->source, $this->artifact);
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::__construct
     * @covers \phpDocumentor\Transformer\Transformation::setQuery
     * @covers \phpDocumentor\Transformer\Transformation::setWriter
     * @covers \phpDocumentor\Transformer\Transformation::setSource
     * @covers \phpDocumentor\Transformer\Transformation::setArtifact
     */
    public function testIfDependenciesAreCorrectlyRegisteredOnInitialization()
    {
        $this->assertAttributeSame($this->query, 'query', $this->fixture);
        $this->assertAttributeSame($this->writer, 'writer', $this->fixture);
        $this->assertAttributeSame($this->source, 'source', $this->fixture);
        $this->assertAttributeSame($this->artifact, 'artifact', $this->fixture);
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getQuery
     */
    public function testGetQuery()
    {
        $this->assertSame($this->query, $this->fixture->getQuery());
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getWriter
     */
    public function testGetWriter()
    {
        $this->assertSame($this->writer, $this->fixture->getWriter());
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getSource
     */
    public function testGetSource()
    {
        $this->assertSame($this->source, $this->fixture->getSource());
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getArtifact
     */
    public function testGetArtifact()
    {
        $this->assertSame($this->artifact, $this->fixture->getArtifact());
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getParameters
     * @covers \phpDocumentor\Transformer\Transformation::setParameters
     */
    public function testSetAndGetParameters()
    {
        $this->assertSame([], $this->fixture->getParameters());

        $parameters = $this->givenAParameter();

        $this->assertSame($parameters, $this->fixture->getParameters());
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getParameter
     */
    public function testGetParameterWithExistingName()
    {
        $parameters = $this->givenAParameter();
        $this->assertSame($parameters['firstKey'], $this->fixture->getParameter('name'));
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getParameter
     */
    public function testGetParameterWithNonExistingName()
    {
        $this->assertNull($this->fixture->getParameter('somethingElse'));
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getParametersWithKey
     */
    public function testGetParametersWithKeyWithExistingName()
    {
        $parameters = $this->givenAParameter();
        $this->assertSame([$parameters['firstKey']], $this->fixture->getParametersWithKey('name'));
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getParametersWithKey
     */
    public function testGetParametersWithKeyWithNonExistingName()
    {
        $this->assertSame([], $this->fixture->getParametersWithKey('somethingElse'));
    }

    /**
     * @covers \phpDocumentor\Transformer\Transformation::getTransformer
     * @covers \phpDocumentor\Transformer\Transformation::setTransformer
     */
    public function testSetAndGetTransformer()
    {
        $transformer = m::mock('phpDocumentor\Transformer\Transformer');

        $this->assertNull($this->fixture->getTransformer());

        $this->fixture->setTransformer($transformer);

        $this->assertSame($transformer, $this->fixture->getTransformer());
    }

    /**
     * Sets a parameter in the fixture for tests that need to get parameters and
     * returns the parameter array used to set this parameter for comparison
     */
    private function givenAParameter()
    {
        $parameterMock = m::mock('phpDocumentor\Transformer\Template\Parameter');
        $parameterMock->shouldReceive('getKey')->andReturn('name');
        $parameters = ['firstKey' => $parameterMock];
        $this->fixture->setParameters($parameters);

        return $parameters;
    }
}


text:
        <form ng-show="$ctrl.displayed" ng-hide="!$ctrl.displayed" name="upload" ng-submit="$ctrl.submitFile()" novalidate>
            <input id="file" name="file" type="file">
            <input name="upload" type="submit" value="Upload">
        </form>

Add to database?

            <button id="yes" ng-click="$ctrl.uploadFile()">Yes</button>
            <button id="no" ng-click="$ctrl.deleteFile()">No</button>

Geotagged location:

{{$ctrl.payload.coordinates[1]}}, {{$ctrl.payload.coordinates[0]}}

Image not geotagged

{{$ctrl.payload.properties.head.name}}

Common: {{$ctrl.payload.properties.head.common}}

Duration: {{$ctrl.payload.properties.head.duration}}

Habit: {{$ctrl.payload.properties.head.habit}}

Family: {{$ctrl.payload.properties.head.family}}

Description:

{{$ctrl.payload.properties.description.main}}

Biology and Spread:

{{$ctrl.payload.properties.description.biology_and_spread}}

Ecological Threat:

{{$ctrl.payload.properties.description.ecological_threat}}

US Habitat:

{{$ctrl.payload.properties.description.us_habitat}}

History:

{{$ctrl.payload.properties.description.history}}

Distribution:

{{$ctrl.payload.properties.distribution.distribution}}

Native Origin:

{{$ctrl.payload.properties.distribution.native_origin}}

US Nativity:

{{$ctrl.payload.properties.distribution.us_nativity}}

US Presence:

{{$ctrl.payload.properties.distribution.us_present}}

Management:

{{$ctrl.payload.properties.management.main}}


text:
package edu.rit.honors.housing.jdo;

import java.util.List;

public class FloorList {

	private List<Floor> floors;

	public List<Floor> getFloors() {
		return floors;
	}

	public void setFloors(List<Floor> floors) {
		this.floors = floors;
	}

	public FloorList(){}

	public FloorList(List<Floor> floors){
		this.floors = floors;
	}

	/**
	 * Find the room corresponding to the room number
	 *
	 * @param room the room number to find
	 * @return the Room with that number or null if not found
	 */
	public Room getRoom(Integer room) {
        for(Floor f : this.getFloors()){
        	if(f.getRooms() != null){
	        	for(Room r : f.getRooms()) {
	        		if(r.getNumber() != null && r.getNumber().equals(room)){
	        			return r;
	        		}
	        	}
        	}
        }
		return null;
	}

}


text:
process.env.NODE_ENV = 'test';
var app = require('../server/app'),
    mongoose = require('mongoose'),
    assert = require("assert"),
    config = require('../server/_config');

describe('app environment', function(){
  it ('should be "test"', function(done) {
    assert.equal(process.env.NODE_ENV, 'test');
    assert.notEqual(process.env.NODE_ENV, 'development');
    assert.notEqual(process.env.NODE_ENV, 'stage');
    done();
  });

  it ('should be using the test database', function(done) {
    assert.equal(config.mongoURI[app.settings.env], "mongodb://localhost/hackathon-test");
    done();
  });

});


text:
pymatgen\.core\.periodic\_table module
======================================

.. automodule:: pymatgen.core.periodic_table
    :members:
    :undoc-members:
    :show-inheritance:


text:
package kubernetes

import (
	"context"
	"fmt"
	"net"
	"testing"

	"github.com/coredns/coredns/plugin/kubernetes/object"

	"github.com/miekg/dns"
	api "k8s.io/api/core/v1"
)

type APIConnTest struct{}

func (APIConnTest) HasSynced() bool                             { return true }
func (APIConnTest) Run()                                        {}
func (APIConnTest) Stop() error                                 { return nil }
func (APIConnTest) PodIndex(string) []*object.Pod               { return nil }
func (APIConnTest) SvcIndexReverse(string) []*object.Service    { return nil }
func (APIConnTest) SvcExtIndexReverse(string) []*object.Service { return nil }
func (APIConnTest) EpIndex(string) []*object.Endpoints          { return nil }
func (APIConnTest) EndpointsList() []*object.Endpoints          { return nil }
func (APIConnTest) Modified(bool) int64                         { return 0 }

func (a APIConnTest) SvcIndex(s string) []*object.Service {
	switch s {
	case "dns-service.kube-system":
		return []*object.Service{a.ServiceList()[0]}
	case "hdls-dns-service.kube-system":
		return []*object.Service{a.ServiceList()[1]}
	case "dns6-service.kube-system":
		return []*object.Service{a.ServiceList()[2]}
	}
	return nil
}

var svcs = []*object.Service{
	{
		Name:       "dns-service",
		Namespace:  "kube-system",
		ClusterIPs: []string{"10.0.0.111"},
	},
	{
		Name:       "hdls-dns-service",
		Namespace:  "kube-system",
		ClusterIPs: []string{api.ClusterIPNone},
	},
	{
		Name:       "dns6-service",
		Namespace:  "kube-system",
		ClusterIPs: []string{"10::111"},
	},
}

func (APIConnTest) ServiceList() []*object.Service {
	return svcs
}

func (APIConnTest) EpIndexReverse(ip string) []*object.Endpoints {
	if ip != "10.244.0.20" {
		return nil
	}
	eps := []*object.Endpoints{
		{
			Name:      "dns-service-slice1",
			Namespace: "kube-system",
			Index:     object.EndpointsKey("dns-service", "kube-system"),
			Subsets: []object.EndpointSubset{
				{Addresses: []object.EndpointAddress{{IP: "10.244.0.20"}}},
			},
		},
		{
			Name:      "hdls-dns-service-slice1",
			Namespace: "kube-system",
			Index:     object.EndpointsKey("hdls-dns-service", "kube-system"),
			Subsets: []object.EndpointSubset{
				{Addresses: []object.EndpointAddress{{IP: "10.244.0.20"}}},
			},
		},
		{
			Name:      "dns6-service-slice1",
			Namespace: "kube-system",
			Index:     object.EndpointsKey("dns6-service", "kube-system"),
			Subsets: []object.EndpointSubset{
				{Addresses: []object.EndpointAddress{{IP: "10.244.0.20"}}},
			},
		},
	}
	return eps
}

func (APIConnTest) GetNodeByName(ctx context.Context, name string) (*api.Node, error) {
	return &api.Node{}, nil
}
func (APIConnTest) GetNamespaceByName(name string) (*object.Namespace, error) {
	return nil, fmt.Errorf("namespace not found")
}

func TestNsAddrs(t *testing.T) {
	k := New([]string{"inter.webs.test."})
	k.APIConn = &APIConnTest{}
	k.localIPs = []net.IP{net.ParseIP("10.244.0.20")}

	cdrs := k.nsAddrs(false, false, k.Zones[0])

	if len(cdrs) != 3 {
		t.Fatalf("Expected 3 results, got %v", len(cdrs))
	}
	cdr := cdrs[0]
	expected := "10.0.0.111"
	if cdr.(*dns.A).A.String() != expected {
		t.Errorf("Expected 1st A to be %q, got %q", expected, cdr.(*dns.A).A.String())
	}
	expected = "dns-service.kube-system.svc.inter.webs.test."
	if cdr.Header().Name != expected {
		t.Errorf("Expected 1st Header Name to be %q, got %q", expected, cdr.Header().Name)
	}
	cdr = cdrs[1]
	expected = "10.244.0.20"
	if cdr.(*dns.A).A.String() != expected {
		t.Errorf("Expected 2nd A to be %q, got %q", expected, cdr.(*dns.A).A.String())
	}
	expected = "10-244-0-20.hdls-dns-service.kube-system.svc.inter.webs.test."
	if cdr.Header().Name != expected {
		t.Errorf("Expected 2nd Header Name to be %q, got %q", expected, cdr.Header().Name)
	}
	cdr = cdrs[2]
	expected = "10::111"
	if cdr.(*dns.AAAA).AAAA.String() != expected {
		t.Errorf("Expected AAAA to be %q, got %q", expected, cdr.(*dns.A).A.String())
	}
	expected = "dns6-service.kube-system.svc.inter.webs.test."
	if cdr.Header().Name != expected {
		t.Errorf("Expected AAAA Header Name to be %q, got %q", expected, cdr.Header().Name)
	}
}

func TestNsAddrsExternalHeadless(t *testing.T) {
	k := New([]string{"example.com."})
	k.APIConn = &APIConnTest{}
	k.localIPs = []net.IP{net.ParseIP("10.244.0.20")}

	// there are only headless sevices
	cdrs := k.nsAddrs(true, true, k.Zones[0])

	if len(cdrs) != 1 {
		t.Fatalf("Expected 0 results, got %v", cdrs)
	}

	cdr := cdrs[0]
	expected := "10.244.0.20"
	if cdr.(*dns.A).A.String() != expected {
		t.Errorf("Expected A address to be %q, got %q", expected, cdr.(*dns.A).A.String())
	}
	expected = "10-244-0-20.hdls-dns-service.kube-system.example.com."
	if cdr.Header().Name != expected {
		t.Errorf("Expected record name to be %q, got %q", expected, cdr.Header().Name)
	}
}

func TestNsAddrsExternal(t *testing.T) {
	k := New([]string{"example.com."})
	k.APIConn = &APIConnTest{}
	k.localIPs = []net.IP{net.ParseIP("10.244.0.20")}

	// initially no services have an external IP ...
	cdrs := k.nsAddrs(true, false, k.Zones[0])

	if len(cdrs) != 0 {
		t.Fatalf("Expected 0 results, got %v", len(cdrs))
	}

	// Add an external IP to one of the services ...
	svcs[0].ExternalIPs = []string{"1.2.3.4"}
	cdrs = k.nsAddrs(true, false, k.Zones[0])

	if len(cdrs) != 1 {
		t.Fatalf("Expected 1 results, got %v", len(cdrs))
	}
	cdr := cdrs[0]
	expected := "1.2.3.4"
	if cdr.(*dns.A).A.String() != expected {
		t.Errorf("Expected A address to be %q, got %q", expected, cdr.(*dns.A).A.String())
	}
	expected = "dns-service.kube-system.example.com."
	if cdr.Header().Name != expected {
		t.Errorf("Expected record name to be %q, got %q", expected, cdr.Header().Name)
	}
}

func TestNsAddrsExternalWithPreexistingExternalIP(t *testing.T) {
	k := New([]string{"example.com."})
	k.APIConn = &APIConnTest{}
	k.localIPs = []net.IP{net.ParseIP("10.244.0.20")}

	svcs[0].ExternalIPs = []string{"1.2.3.4"}

	// initially no services have an external IP ...
	cdrs := k.nsAddrs(true, false, k.Zones[0])

	if len(cdrs) != 1 {
		t.Fatalf("Expected 1 results, got %v", len(cdrs))
	}

	if len(cdrs) != 1 {
		t.Fatalf("Expected 1 results, got %v", len(cdrs))
	}
	cdr := cdrs[0]
	expected := "1.2.3.4"
	if cdr.(*dns.A).A.String() != expected {
		t.Errorf("Expected A address to be %q, got %q", expected, cdr.(*dns.A).A.String())
	}
	expected = "dns-service.kube-system.example.com."
	if cdr.Header().Name != expected {
		t.Errorf("Expected record name to be %q, got %q", expected, cdr.Header().Name)
	}
}


text:
package com.github.uchibori3.mfcloud.invoice.testkit

import com.github.uchibori3.mfcloud.invoice.request.{ CreatePartner, CreatePartnerRequest }

object CreatePartnerRequestFixtures {
  def build: CreatePartnerRequest = CreatePartnerRequest(
    partner = CreatePartner(
      code = None,
      name = "test partner",
      name_kana = Some("テストパートナー"),
      name_suffix = Some("様"),
      memo = Some("memo"),
      zip = Some("1234567"),
      tel = Some("9876543"),
      prefecture = Some("東京都"),
      address1 = Some("address 1"),
      address2 = Some("address 2-3-4"),
      person_name = Some("test person"),
      person_title = Some("test person title"),
      department_name = Some("test department"),
      email = Some("test@example.com"),
      cc_emails = Some("test1@exapmle.com, test2@example.com")
    )
  )
}


text:
#ifndef __INTERACTOR_STYLE_POLYGON_DRAW_H__
#define __INTERACTOR_STYLE_POLYGON_DRAW_H__

#include "AbstractNavigation.h"

#include <vtkSmartPointer.h>

class vtkContourWidget;
class vtkOrientedGlyphContourRepresentation;
class vtkContourRepresentation;
class vtkPolygon;
class vtkContourLineInterpolator;

class InteractorStylePolygonDraw : public AbstractNavigation
{
public:

	vtkTypeMacro(InteractorStylePolygonDraw, AbstractNavigation);
	static InteractorStylePolygonDraw* New();

	virtual void SetCustomEnabled(bool b);
	/**
	 * For better performance, NewContour() will not invoke EnabledOn()
	 * it need to be enable manually
	 */
	virtual void NewContour();

	virtual void SetContourLabel(unsigned char contourLabel);

	virtual void SetSmoothCurveEnable();
	virtual void SetPolygonEnable();
	virtual void SetLineInterpolator(int i);
	virtual void FillPolygon();

	virtual void FillPolygon(
		std::list<vtkSmartPointer<vtkContourWidget>>* contour,
		unsigned char label);
	virtual void FillPolygon(
		std::list<vtkSmartPointer<vtkPolygon>>* contourPolygon,
		unsigned char label);

	//virtual void FillPolygon(
	//	std::list<vtkSmartPointer<vtkContourWidget>>* contour,
	//	unsigned char label,
	//	int slice);

	/**
	 * Because the index of the sliceOrientation is wrong, it need to be specified
	 */
	virtual void FillPolygon(
		std::list<vtkSmartPointer<vtkPolygon>>* contourPolygon,
		unsigned char label,
		int slice);

	/**
	* For using delete contours one by one
	* if all contour is deleted, it set m_currentContour = nullptr
	*/
	virtual void CleanCurrentContour();
	virtual void CleanAllContours();
	virtual void SetAllContoursEnabled(int flag);

protected:
	InteractorStylePolygonDraw();
	~InteractorStylePolygonDraw();

	virtual void OnLeftButtonDown();
	virtual void OnRightButtonDown();
	virtual void OnMouseMove();
	virtual void OnKeyPress();

	//bool m_polygonDrawEnabledFlag = false;

	// defaule label
	unsigned char m_contourLabel = 1;

	vtkSmartPointer<vtkContourLineInterpolator> m_interpolator = nullptr;
	std::list<vtkSmartPointer<vtkContourWidget>> m_contours;

	vtkContourWidget* m_currentContour = nullptr;
	vtkOrientedGlyphContourRepresentation* m_currentContourRep = nullptr;

};

#endif // !__INTERACTOR_STYLE_POLYGON_DRAW_H__


text:
RSpec.describe(Dry::Monads::Maybe) do
  maybe = described_class

  let(:upcase) { :upcase.to_proc }

  describe maybe::Some do
    subject { described_class.new('foo') }

    let(:upcased_subject) { described_class.new('FOO') }

    it { is_expected.to be_some }
    it { is_expected.not_to be_none }

    it { is_expected.to eq(described_class.new('foo')) }
    it { is_expected.not_to eq(maybe::None.new) }

    it 'dumps to string' do
      expect(subject.to_s).to eql('Some("foo")')
    end

    it 'has custom inspection' do
      expect(subject.inspect).to eql('Some("foo")')
    end

    describe '#bind' do
      it 'accepts a proc and does not lift the result' do
        expect(subject.bind(upcase)).to eql('FOO')
      end

      it 'accepts a block too' do
        expect(subject.bind { |s| s.upcase }).to eql('FOO')
      end
    end

    describe '#value' do
      it 'returns wrapped value' do
        expect(subject.value).to eql('foo')
      end
    end

    describe '#fmap' do
      it 'accepts a proc and does not lift the result to maybe' do
        expect(subject.fmap(upcase)).to eq(upcased_subject)
      end

      it 'accepts a block too' do
        expect(subject.fmap { |s| s.upcase }).to eq(upcased_subject)
      end
    end

    describe '#or' do
      it 'accepts a value as an alternative' do
        expect(subject.or('baz')).to be(subject)
      end

      it 'accepts a block as an alternative' do
        expect(subject.or { 'baz' }).to be(subject)
      end
    end
  end

  describe maybe::None do
    subject { described_class.new }

    it { is_expected.not_to be_some }
    it { is_expected.to be_none }

    it { is_expected.to eq(described_class.new) }
    it { is_expected.not_to eq(maybe::Some.new('foo')) }

    it 'dumps to string' do
      expect(subject.to_s).to eql('None')
    end

    it 'has custom inspection' do
      expect(subject.inspect).to eql('None')
    end

    describe '#value' do
      it 'returns wrapped value' do
        expect(subject.value).to be nil
      end
    end

    describe '#bind' do
      it 'accepts a proc and returns itseld' do
        expect(subject.bind(upcase)).to be subject
      end

      it 'accepts a block and returns itself' do
        expect(subject.bind { |s| s.upcase }).to be subject
      end
    end

    describe '#fmap' do
      it 'accepts a proc and returns itself' do
        expect(subject.fmap(upcase)).to be subject
      end

      it 'accepts a block and returns itseld' do
        expect(subject.fmap { |s| s.upcase }).to be subject
      end
    end

    describe '#or' do
      it 'accepts value as an alternative' do
        expect(subject.or('baz')).to eql('baz')
      end

      it 'accepts block as an alternative' do
        expect(subject.or { 'baz' }).to eql('baz')
      end
    end
  end
end


text:
package LeetcodeTemplate;

public class _0828CountUniqueCharactersOfAllSubstringsOfAGivenString {

	public static void main(String[] args) {
		System.out.println(uniqueLetterString("ABC"));
		System.out.println(uniqueLetterString("ABA"));
		System.out.println(uniqueLetterString("LEETCODE"));
	}

	public static int uniqueLetterString(String s) {

	}

}


text:
<?php
namespace common\widgets\summernote;

use yii\helpers\Html;
use yii\helpers\Json;
use yii\helpers\ArrayHelper;
use yii\web\JsExpression;

class SummernoteWidget extends \yii\widgets\InputWidget
{
	private $defaultOptions = ['class' => 'form-control'];
    /** @var array */
    private $defaultClientOptions = [
        'height' => 300,
        'codemirror' => [
            'theme' => 'monokai'
        ],

    ];
    /** @var array */
    public $options = [];
    /** @var array */
    public $clientOptions = [];
    /** @var array */
    public $plugins = [];

    public $imgServer = 'http://uploads.im/api';

	public function init()
    {
    	//$this->defaultClientOptions['onImageUpload'] =  new JsExpression("function(files){summerNoteImgUpload(files[0])}");
        $this->options = array_merge($this->defaultOptions, $this->options);
        $this->clientOptions = array_merge($this->defaultClientOptions, $this->clientOptions);
        SummernoteAsset::register($this->getView());
        parent::init();
    }
    /**
     * @inheritdoc
     */
    public function run()
    {

        echo $this->hasModel()
            ? Html::activeTextarea($this->model, $this->attribute, $this->options)
            : Html::textarea($this->name, $this->value, $this->options);

        $this->clientOptions['onImageUpload'] =  new JsExpression("function(files){summerNoteImgUpload(files[0], '".$this->options['id']."','".$this->imgServer."')}");
        $clientOptions = empty($this->clientOptions)
            ? null
            : Json::encode($this->clientOptions);
        $this->getView()->registerJs('jQuery( "#' . $this->options['id'] . '" ).summernote(' . $clientOptions . ');');

    }

}
?>


text:
package com.tcl.simpletv.launcher2.localwidget;

import android.content.ComponentName;
import android.os.Parcel;
import android.os.Parcelable;

public class LocalWidgetInfo implements Parcelable{

	public String localWidgetName;
    public int localWidgetId;
    public String localWidgetClassName;

	/**
     * Widget is not resizable.
     */
    public static final int RESIZE_NONE             = 0;
    /**
     * Widget is resizable in the horizontal axis only.
     */
    public static final int RESIZE_HORIZONTAL       = 1;
    /**
     * Widget is resizable in the vertical axis only.
     */
    public static final int RESIZE_VERTICAL         = 2;
    /**
     * Widget is resizable in both the horizontal and vertical axes.
     */
    public static final int RESIZE_BOTH = RESIZE_HORIZONTAL | RESIZE_VERTICAL;

    /**
     * Indicates that the widget can be displayed on the home screen. This is the default value.
     */
    public static final int WIDGET_CATEGORY_HOME_SCREEN = 1;

    /**
     * Indicates that the widget can be displayed on the keyguard.
     */
    public static final int WIDGET_CATEGORY_KEYGUARD = 2;

    /**
     * Identity of this AppWidget component.  This component should be a {@link
     * android.content.BroadcastReceiver}, and it will be sent the AppWidget intents
     * {@link android.appwidget as described in the AppWidget package documentation}.
     *
     *
This field corresponds to the android:name attribute in
     * the <receiver> element in the AndroidManifest.xml file.
     */
    public ComponentName provider;

    /**
     * The default height of the widget when added to a host, in dp. The widget will get
     * at least this width, and will often be given more, depending on the host.
     *
     *
This field corresponds to the android:minWidth attribute in
     * the AppWidget meta-data file.
     */
    public int minWidth;

    /**
     * The default height of the widget when added to a host, in dp. The widget will get
     * at least this height, and will often be given more, depending on the host.
     *
     *
This field corresponds to the android:minHeight attribute in
     * the AppWidget meta-data file.
     */
    public int minHeight;

    /**
     * Minimum width (in dp) which the widget can be resized to. This field has no effect if it
     * is greater than minWidth or if horizontal resizing isn't enabled (see {@link #resizeMode}).
     *
     *
This field corresponds to the android:minResizeWidth attribute in
     * the AppWidget meta-data file.
     */
    public int minResizeWidth;

    /**
     * Minimum height (in dp) which the widget can be resized to. This field has no effect if it
     * is greater than minHeight or if vertical resizing isn't enabled (see {@link #resizeMode}).
     *
     *
This field corresponds to the android:minResizeHeight attribute in
     * the AppWidget meta-data file.
     */
    public int minResizeHeight;

    /**
     * How often, in milliseconds, that this AppWidget wants to be updated.
     * The AppWidget manager may place a limit on how often a AppWidget is updated.
     *
     *
This field corresponds to the android:updatePeriodMillis attribute in
     * the AppWidget meta-data file.
     *
     *
Note: Updates requested with updatePeriodMillis
     * will not be delivered more than once every 30 minutes.

     */
    public int updatePeriodMillis;

    /**
     * The resource id of the initial layout for this AppWidget.  This should be
     * displayed until the RemoteViews for the AppWidget is available.
     *
     *
This field corresponds to the android:initialLayout attribute in
     * the AppWidget meta-data file.
     */
    public int initialLayout;

    /**
     * The resource id of the initial layout for this AppWidget when it is displayed on keyguard.
     * This parameter only needs to be provided if the widget can be displayed on the keyguard,
     * see {@link #widgetCategory}.
     *
     *
This field corresponds to the android:initialKeyguardLayout attribute in
     * the AppWidget meta-data file.
     */
    public int initialKeyguardLayout;

    /**
     * The activity to launch that will configure the AppWidget.
     *
     *
This class name of field corresponds to the android:configure attribute in
     * the AppWidget meta-data file.  The package name always corresponds to the package containing
     * the AppWidget provider.
     */
    public ComponentName configure;

    /**
     * The label to display to the user in the AppWidget picker.  If not supplied in the
     * xml, the application label will be used.
     *
     *
This field corresponds to the android:label attribute in
     * the <receiver> element in the AndroidManifest.xml file.
     */
    public String label;

    /**
     * The icon to display for this AppWidget in the AppWidget picker.  If not supplied in the
     * xml, the application icon will be used.
     *
     *
This field corresponds to the android:icon attribute in
     * the <receiver> element in the AndroidManifest.xml file.
     */
    public int icon;

    /**
     * The view id of the AppWidget subview which should be auto-advanced by the widget's host.
     *
     *
This field corresponds to the android:autoAdvanceViewId attribute in
     * the AppWidget meta-data file.
     */
    public int autoAdvanceViewId;

    /**
     * A preview of what the AppWidget will look like after it's configured.
     * If not supplied, the AppWidget's icon will be used.
     *
     *
This field corresponds to the android:previewImage attribute in
     * the <receiver> element in the AndroidManifest.xml file.
     */
	public int previewImage;

    /**
     * The rules by which a widget can be resized. See {@link #RESIZE_NONE},
     * {@link #RESIZE_NONE}, {@link #RESIZE_HORIZONTAL},
     * {@link #RESIZE_VERTICAL}, {@link #RESIZE_BOTH}.
     *
     *
This field corresponds to the android:resizeMode attribute in
     * the AppWidget meta-data file.
     */
    public int resizeMode;

    /**
     * Determines whether this widget can be displayed on the home screen, the keyguard, or both.
     * A widget which is displayed on both needs to ensure that it follows the design guidelines
     * for both widget classes. This can be achieved by querying the AppWidget options in its
     * widget provider's update method.
     *
     *
This field corresponds to the widgetCategory attribute in
     * the AppWidget meta-data file.
     */
    public int widgetCategory;

    public LocalWidgetInfo() {
    }

    /**
     * Unflatten the WidgetInfo from a parcel.
     */
    public LocalWidgetInfo(Parcel in) {
        if (0 != in.readInt()) {
            this.provider = new ComponentName(in);
        }
        this.minWidth = in.readInt();
        this.minHeight = in.readInt();
        this.minResizeWidth = in.readInt();
        this.minResizeHeight = in.readInt();
        this.updatePeriodMillis = in.readInt();
        this.initialLayout = in.readInt();
        this.initialKeyguardLayout = in.readInt();
        if (0 != in.readInt()) {
            this.configure = new ComponentName(in);
        }
        this.label = in.readString();
        this.icon = in.readInt();
        this.previewImage = in.readInt();
        this.autoAdvanceViewId = in.readInt();
        this.resizeMode = in.readInt();
        this.widgetCategory = in.readInt();

        this.localWidgetName = in.readString();
        this.localWidgetId = in.readInt();
        this.localWidgetClassName = in.readString();

    }

    public void writeToParcel(android.os.Parcel out, int flags) {
        if (this.provider != null) {
            out.writeInt(1);
            this.provider.writeToParcel(out, flags);
        } else {
            out.writeInt(0);
        }
        out.writeInt(this.minWidth);
        out.writeInt(this.minHeight);
        out.writeInt(this.minResizeWidth);
        out.writeInt(this.minResizeHeight);
        out.writeInt(this.updatePeriodMillis);
        out.writeInt(this.initialLayout);
        out.writeInt(this.initialKeyguardLayout);
        if (this.configure != null) {
            out.writeInt(1);
            this.configure.writeToParcel(out, flags);
        } else {
            out.writeInt(0);
        }
        out.writeString(this.label);
        out.writeInt(this.icon);
        out.writeInt(this.previewImage);
        out.writeInt(this.autoAdvanceViewId);
        out.writeInt(this.resizeMode);
        out.writeInt(this.widgetCategory);

        out.writeString(this.localWidgetName);
        out.writeInt(this.localWidgetId);
        out.writeString(this.localWidgetClassName);
    }

    @Override
    public LocalWidgetInfo clone() {
    	LocalWidgetInfo that = new LocalWidgetInfo();
        that.provider = this.provider == null ? null : this.provider.clone();
        that.minWidth = this.minWidth;
        that.minHeight = this.minHeight;
        that.minResizeWidth = this.minResizeHeight;
        that.minResizeHeight = this.minResizeHeight;
        that.updatePeriodMillis = this.updatePeriodMillis;
        that.initialLayout = this.initialLayout;
        that.initialKeyguardLayout = this.initialKeyguardLayout;
        that.configure = this.configure == null ? null : this.configure.clone();
        that.label = this.label == null ? null : this.label.substring(0);
        that.icon = this.icon;
        that.previewImage = this.previewImage;
        that.autoAdvanceViewId = this.autoAdvanceViewId;
        that.resizeMode = this.resizeMode;
        that.widgetCategory  = this.widgetCategory;

        that.localWidgetName = this.localWidgetName;
        that.localWidgetId = this.localWidgetId;
        that.localWidgetClassName = this.localWidgetClassName;
        return that;
    }

    public int describeContents() {
        return 0;
    }

    /**
     * Parcelable.Creator that instantiates WidgetInfo objects
     */
    public static final Parcelable.Creator<LocalWidgetInfo> CREATOR
            = new Parcelable.Creator<LocalWidgetInfo>()
    {
        public LocalWidgetInfo createFromParcel(Parcel parcel)
        {
            return new LocalWidgetInfo(parcel);
        }

        public LocalWidgetInfo[] newArray(int size)
        {
            return new LocalWidgetInfo[size];
        }
    };

    public String toString() {
        return "WidgetInfo(provider=" + this.provider + ")";
    }
}


text:
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.diff;

import org.jetbrains.annotations.NotNull;

import javax.swing.*;

public interface DiffEditorTitleCustomizer {
  /**
   * @return component that will be used to replace an editor title
   */
  @NotNull
  JComponent getLabel();
}


text:
This is a guide to our GitHub Pages website found at [[https://uw-mode.github.io]].

## About the Website
The UW-Mode website is hosted on [GitHubPages](https://help.github.com/categories/github-pages-basics/) and is built using [Jekyll](http://jekyllrb.com/docs/home/).
The website code can be found at its GitHub repository [[https://github.com/UW-MODE/uw-mode.github.io/]].
Use [Git](https://guides.github.com/) to fork the repository.

The repository consists of two branches: ``master`` and ``source``.

The ``source`` repo maintains the files, images, and code that Jekyll uses to build the website.
The ``master`` repo maintains the actual ``<html>`` files that are built by Jekyll (the files in ``_site/``).

To use an analogy with `LaTeX`, the ``source`` branch is the ``.tex`` file and the ``master`` branch is the ``.pdf`` file.

## Adding Content to the Website
To add content to the website, you should make changes to the ``source`` branch and then make a "pull request".
This can be done in browser using GitHub or by "forking" the [website repository](https://github.com/UW-MODE/uw-mode.github.io/) and editing locally on your own machine with [Git](https://guides.github.com/).

Most changes will involve updating files in the ``/_data/`` or ``/img/`` folder.

After submitting a "pull request",
the website will not update until the webmaster (or someone with Jekyll)
verifies there are no errors, builds the website using Jekyll, and
pushes the new site to the ``master`` branch.

### How to add yourself to the People page
First add your info to ``_data/people.yml`` under the appropriate group.
Add your info as fields (the document has examples).
Required fields are
  * ``first_name`` and ``last_name`` - your name
  * ``pic`` - filename of a photo of yourself in the ``/img/team/`` folder
  * ``bio`` - a few line bio (currently not used)
  * ``social`` - a list of web link with urls (see examples)

Second place your photo in the ``/img/team/`` folder.
This photo will be adjusted to a 1:1 square aspect ratio, so crop accordingly.
Note: the image must have the filename specified in the ``pic`` field.

### How to add a Publication
Add the bibtex of your publication to ``_bibliography/pubs.bib`` (make sure you are on the ``source`` branch).

Then either:
  - Add a hyperlink to a pdf copy of the publication using the ``link`` field in the bibtex.
  - If you want to add link to your code, Add a hyperlink to a your code using the ``code`` field in the bibtex.

### How to add a Project

### Previewing Change (optional, for advanced users)

To preview your changes to the website,
you must clone a local repo of the ``source`` branch
and use Jekyll to build and view the website.

See the [wiki](https://github.com/UW-MODE/uw-mode.github.io/wiki) for additional details.

## Webmaster Notes
See the [wiki](https://github.com/UW-MODE/uw-mode.github.io/wiki) for details.

### Jekyll theme
The website is based on the [Agency bootstrap theme](http://startbootstrap.com/templates/agency/)
for more details, read [documentation](http://jekyllrb.com/)


text:
using Microsoft.AspNet.Identity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace web.Models
{
    public class UserStore : IUserStore<User>, IUserPasswordStore<User>
    {
        //private CustomDbContext database;

        public UserStore()
        {
            //this.database = new CustomDbContext();
        }

        public void Dispose()
        {
            //this.database.Dispose();
        }

        public async Task CreateAsync(User user)
        {
            // TODO
            Console.WriteLine("CreateAsync user");
        }

        public async Task UpdateAsync(User user)
        {
            // TODO
            Console.WriteLine("UpdateAsync user");
        }

        public async Task DeleteAsync(User user)
        {
            // TODO
            Console.WriteLine("DeleteAsync user");
        }

        public async Task<User> FindByIdAsync(string userId)
        {
            User user = new User()
            {
                Id = Guid.NewGuid().ToString(),
                UserName = "Foo"
            };
            return user;
        }

        public async Task<User> FindByNameAsync(string userName)
        {
            if (userName == "foo")
            {
                return new User()
                {
                    Id = Guid.NewGuid().ToString(),
                    UserName = "Foo"
                };
            }
            return null;
        }

        public async Task<string> GetPasswordHashAsync(User user)
        {
            Console.WriteLine("GetPasswordHashAsync user");
            return "1F400.AOcgsxDHtYNiyQIQ01JF0oqjw1JNwF5+ug/qng3VzgVEstu8JaAIIfIrlI4FoVinRw==";
        }

        public async Task<bool> HasPasswordAsync(User user)
        {
            Console.WriteLine("HasPasswordAsync user");
            return true;
        }

        public async Task SetPasswordHashAsync(User user, string passwordHash)
        {
            Console.WriteLine("SetPasswordHashAsync");
            Console.WriteLine(passwordHash);
        }
    }
}