text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context  http://www.springframework.org/schema/context/spring-context.xsd"
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context">

    <bean id="validator1" class="com.lee.jwaf.rule.ValidatorHolder">
        <property name="packagesToScan" value="com.lee.jwaf.rule.cases" />
    </bean>
    <bean id="validator2" class="com.lee.jwaf.rule.ValidatorHolder">
        <property name="packagesToScan" value="foo" />
    </bean>
    <bean id="validator3" class="com.lee.jwaf.rule.ValidatorHolder">
        <property name="packagesToScan" value="com.apache, com.lee" />
    </bean>
    <context:component-scan base-package="com.lee.jwaf.rule.cases" />
</beans>


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

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

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

<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">
  <parent>
    <artifactId>tajo-project</artifactId>
    <groupId>org.apache.tajo</groupId>
    <version>0.8.0-SNAPSHOT</version>
	  <relativePath>../../tajo-project</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>tajo-catalog-drivers</artifactId>
  <packaging>pom</packaging>
  <name>Tajo Catalog Drivers</name>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.15</version>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>hcatalog-cdh4.3.0</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>tajo-hcatalog</module>
      </modules>
    </profile>
    <profile>
      <id>hcatalog-cdh4.4.0</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>tajo-hcatalog</module>
      </modules>
    </profile>
    <profile>
      <id>hcatalog-cdh4.5.0</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>tajo-hcatalog</module>
      </modules>
    </profile>
    <profile>
      <id>hcatalog-cdh4.6.0</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>tajo-hcatalog</module>
      </modules>
    </profile>
    <profile>
      <id>hcatalog-0.12.0</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>tajo-hcatalog</module>
      </modules>
    </profile>
  </profiles>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.15</version>
      </plugin>
    </plugins>
  </reporting>
</project>

redpajama_set_name: RedPajamaGithub


text:
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="android:windowNoTitle">true</item>
    </style>

    <style name="TitleStyle">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">50dp</item>
        <item name="android:textColor">@color/black</item>
        <item name="android:textSize">22sp</item>
        <item name="android:gravity">center</item>
        <item name="android:background">#8866ff00</item>
    </style>

    <style name="ContentStyle">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_marginLeft">5dp</item>
        <item name="android:layout_marginTop">5dp</item>
        <item name="android:textColor">@color/black</item>
        <item name="android:textSize">18sp</item>
    </style>

    <style name="NextStyle">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_alignParentBottom">true</item>
        <item name="android:layout_alignParentRight">true</item>
        <item name="android:drawableRight">@drawable/next</item>
        <item name="android:background">@drawable/button_green_selector</item>
        <item name="android:text">下一步</item>
        <item name="android:onClick">next</item>
    </style>

    <style name="PreviousStyle">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_alignParentBottom">true</item>
        <item name="android:layout_alignParentLeft">true</item>
        <item name="android:drawableLeft">@drawable/previous</item>
        <item name="android:background">@drawable/button_green_selector</item>
        <item name="android:text">上一步</item>
        <item name="android:onClick">previous</item>
    </style>
    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
    <style name="widget_text">
        <item name="android:textSize">16.0dip</item>
        <item name="android:textColor">@color/textColorPrimaryDark</item>
    </style>
</resources>


text:
namespace uth
{
	class ResourceManager : public uth::Singleton<uth::ResourceManager>
	{
		friend class Singleton<uth::ResourceManager>;

	public:

        enum
        {
            SoundBuffers =	1,
            Images =		1 << 1,
            Textures =		1 << 2,
			Fonts =			1 << 3,

            All = SoundBuffers | Images | Textures | Fonts
        };

		SoundBuffer& LoadWAV(const std::string& filePath);
		Image& LoadTGA(const std::string& filePath);
		/// Only supports uncompressed .tga for now
        Texture& LoadTexture(const std::string& filePath);
        Font& LoadFont(const std::string& filePath);

        void Clear(const unsigned int flags);
        bool DeleteSoundBuffer(const std::string& filePath);
        bool DeleteImage(const std::string& filePath);
        bool DeleteTexture(const std::string& filePath);
        bool DeleteFont(const std::string& filePath);

	private:
		ResourceManager();
		~ResourceManager();

        std::unordered_map<std::string, std::unique_ptr<SoundBuffer>> m_soundBuffers;
		std::unordered_map<std::string, std::unique_ptr<Image>> m_images;
        std::unordered_map<std::string, std::unique_ptr<Texture>> m_textures;
        std::unordered_map<std::string, std::unique_ptr<Font>> m_fonts;
	};
}

#endif


text:
package com.github.akarnokd.rs.impl.ops;

import java.util.function.Predicate;

import org.reactivestreams.Publisher;

/**
 * Indicator interface to mark a Publisher that has the
 * capability of fusing with a filter predicate.
 */
public interface FilterFuseable<T> {
    Publisher<T> fuse(Predicate<? super T> predicate);
}


text:
package com.facebook.buck.apple;

import com.facebook.buck.io.ProjectFilesystem;
import com.facebook.buck.io.TeeInputStream;
import com.facebook.buck.log.Logger;
import com.facebook.buck.step.ExecutionContext;
import com.facebook.buck.step.Step;
import com.facebook.buck.step.StepExecutionResult;
import com.facebook.buck.test.selectors.TestDescription;
import com.facebook.buck.test.selectors.TestSelectorList;
import com.facebook.buck.util.Console;
import com.facebook.buck.util.Escaper;
import com.facebook.buck.util.HumanReadableException;
import com.facebook.buck.util.MoreThrowables;
import com.facebook.buck.util.ProcessExecutor;
import com.facebook.buck.util.ProcessExecutorParams;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Multimap;
import com.google.common.io.ByteStreams;
import com.google.common.io.CharStreams;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.util.Collection;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

import javax.annotation.Nullable;

/**
 * Runs {@code xctool} on one or more logic tests and/or application
 * tests (each paired with a host application).
 *
 * The output is written in streaming JSON format to stdout and is
 * parsed by {@link XctoolOutputParsing}.
 */
class XctoolRunTestsStep implements Step {

  private static final Semaphore stutterLock = new Semaphore(1);
  private static final ScheduledExecutorService stutterTimeoutExecutorService =
      Executors.newSingleThreadScheduledExecutor();
  private static final String XCTOOL_ENV_VARIABLE_PREFIX = "XCTOOL_TEST_ENV_";
  private static final String FB_REFERENCE_IMAGE_DIR = "FB_REFERENCE_IMAGE_DIR";

  private final ProjectFilesystem filesystem;

  public interface StdoutReadingCallback {
    void readStdout(InputStream stdout) throws IOException;
  }

  private static final Logger LOG = Logger.get(XctoolRunTestsStep.class);

  private final ImmutableList<String> command;
  private final ImmutableMap<String, String> environmentOverrides;
  private final Optional<Long> xctoolStutterTimeout;
  private final Path outputPath;
  private final Optional<? extends StdoutReadingCallback> stdoutReadingCallback;
  private final Supplier<Optional<Path>> xcodeDeveloperDirSupplier;
  private final TestSelectorList testSelectorList;
  private final Optional<String> logDirectoryEnvironmentVariable;
  private final Optional<Path> logDirectory;
  private final Optional<String> logLevelEnvironmentVariable;
  private final Optional<String> logLevel;
  private final Optional<Long> timeoutInMs;
  private final Optional<String> snapshotReferenceImagesPath;

  // Helper class to parse the output of `xctool -listTestsOnly` then
  // store it in a multimap of {target: [testDesc1, testDesc2, ...], ... } pairs.
  //
  // We need to remember both the target name and the test class/method names, since
  // `xctool -only` requires the format `TARGET:className/methodName,...`
  private static class ListTestsOnlyHandler implements XctoolOutputParsing.XctoolEventCallback {
    private @Nullable String currentTestTarget;
    public Multimap<String, TestDescription> testTargetsToDescriptions;

    public ListTestsOnlyHandler() {
      this.currentTestTarget = null;
      // We use a LinkedListMultimap to make the order deterministic for testing.
      this.testTargetsToDescriptions = LinkedListMultimap.create();
    }

    @Override
    public void handleBeginOcunitEvent(XctoolOutputParsing.BeginOcunitEvent event) {
      // Signals the start of listing all tests belonging to a single target.
      this.currentTestTarget = event.targetName;
    }

    @Override
    public void handleEndOcunitEvent(XctoolOutputParsing.EndOcunitEvent event) {
      Preconditions.checkNotNull(this.currentTestTarget);
      Preconditions.checkState(this.currentTestTarget.equals(event.targetName));
      // Signals the end of listing all tests belonging to a single target.
      this.currentTestTarget = null;
    }

    @Override
    public void handleBeginTestSuiteEvent(XctoolOutputParsing.BeginTestSuiteEvent event) {
    }

    @Override
    public void handleEndTestSuiteEvent(XctoolOutputParsing.EndTestSuiteEvent event) {
    }

    @Override
    public void handleBeginStatusEvent(XctoolOutputParsing.StatusEvent event) {
    }

    @Override
    public void handleEndStatusEvent(XctoolOutputParsing.StatusEvent event) {
    }

    @Override
    public void handleBeginTestEvent(XctoolOutputParsing.BeginTestEvent event) {
      testTargetsToDescriptions.put(
          Preconditions.checkNotNull(this.currentTestTarget),
          new TestDescription(
              Preconditions.checkNotNull(event.className),
              Preconditions.checkNotNull(event.methodName)));
    }

    @Override
    public void handleEndTestEvent(XctoolOutputParsing.EndTestEvent event) {
    }
  }

  public XctoolRunTestsStep(
      ProjectFilesystem filesystem,
      Path xctoolPath,
      ImmutableMap<String, String> environmentOverrides,
      Optional<Long> xctoolStutterTimeout,
      String sdkName,
      Optional<String> destinationSpecifier,
      Collection<Path> logicTestBundlePaths,
      Map<Path, Path> appTestBundleToHostAppPaths,
      Path outputPath,
      Optional<? extends StdoutReadingCallback> stdoutReadingCallback,
      Supplier<Optional<Path>> xcodeDeveloperDirSupplier,
      TestSelectorList testSelectorList,
      boolean waitForDebugger,
      Optional<String> logDirectoryEnvironmentVariable,
      Optional<Path> logDirectory,
      Optional<String> logLevelEnvironmentVariable,
      Optional<String> logLevel,
      Optional<Long> timeoutInMs,
      Optional<String> snapshotReferenceImagesPath) {
    Preconditions.checkArgument(
        !(logicTestBundlePaths.isEmpty() &&
          appTestBundleToHostAppPaths.isEmpty()),
        "Either logic tests (%s) or app tests (%s) must be present",
        logicTestBundlePaths,
        appTestBundleToHostAppPaths);

    this.filesystem = filesystem;

    this.command = createCommandArgs(
        xctoolPath,
        sdkName,
        destinationSpecifier,
        logicTestBundlePaths,
        appTestBundleToHostAppPaths,
        waitForDebugger);
    this.environmentOverrides = environmentOverrides;
    this.xctoolStutterTimeout = xctoolStutterTimeout;
    this.outputPath = outputPath;
    this.stdoutReadingCallback = stdoutReadingCallback;
    this.xcodeDeveloperDirSupplier = xcodeDeveloperDirSupplier;
    this.testSelectorList = testSelectorList;
    this.logDirectoryEnvironmentVariable = logDirectoryEnvironmentVariable;
    this.logDirectory = logDirectory;
    this.logLevelEnvironmentVariable = logLevelEnvironmentVariable;
    this.logLevel = logLevel;
    this.timeoutInMs = timeoutInMs;
    this.snapshotReferenceImagesPath = snapshotReferenceImagesPath;
  }

  @Override
  public String getShortName() {
    return "xctool-run-tests";
  }

  public ImmutableMap<String, String> getEnv(ExecutionContext context) {
    Map<String, String> environment = new HashMap<>();
    environment.putAll(context.getEnvironment());
    Optional<Path> xcodeDeveloperDir = xcodeDeveloperDirSupplier.get();
    if (xcodeDeveloperDir.isPresent()) {
      environment.put("DEVELOPER_DIR", xcodeDeveloperDir.get().toString());
    } else {
      throw new RuntimeException("Cannot determine xcode developer dir");
    }
    // xctool will only pass through to the test environment variables whose names
    // start with `XCTOOL_TEST_ENV_`. (It will remove that prefix when passing them
    // to the test.)
    if (logDirectoryEnvironmentVariable.isPresent() && logDirectory.isPresent()) {
      environment.put(
          XCTOOL_ENV_VARIABLE_PREFIX + logDirectoryEnvironmentVariable.get(),
          logDirectory.get().toString());
    }
    if (logLevelEnvironmentVariable.isPresent() && logLevel.isPresent()) {
      environment.put(
          XCTOOL_ENV_VARIABLE_PREFIX + logLevelEnvironmentVariable.get(),
          logLevel.get());
    }
    if (snapshotReferenceImagesPath.isPresent()) {
      environment.put(
          XCTOOL_ENV_VARIABLE_PREFIX + FB_REFERENCE_IMAGE_DIR,
          snapshotReferenceImagesPath.get());
    }

    environment.putAll(this.environmentOverrides);
    return ImmutableMap.copyOf(environment);
  }

  @Override
  public StepExecutionResult execute(ExecutionContext context) throws InterruptedException {
    ImmutableMap<String, String> env = getEnv(context);

    ProcessExecutorParams.Builder processExecutorParamsBuilder = ProcessExecutorParams.builder()
        .addAllCommand(command)
        .setDirectory(filesystem.getRootPath().toAbsolutePath())
        .setRedirectOutput(ProcessBuilder.Redirect.PIPE)
        .setEnvironment(env);

    if (!testSelectorList.isEmpty()) {
      try {
        ImmutableList.Builder<String> xctoolFilterParamsBuilder = ImmutableList.builder();
        int returnCode = listAndFilterTestsThenFormatXctoolParams(
            context.getProcessExecutor(),
            context.getConsole(),
            testSelectorList,
            // Copy the entire xctool command and environment but add a -listTestsOnly arg.
            ProcessExecutorParams.builder()
                .from(processExecutorParamsBuilder.build())
                .addCommand("-listTestsOnly")
                .build(),
            xctoolFilterParamsBuilder);
        if (returnCode != 0) {
          context.getConsole().printErrorText("Failed to query tests with xctool");
          return StepExecutionResult.of(returnCode);
        }
        ImmutableList<String> xctoolFilterParams = xctoolFilterParamsBuilder.build();
        if (xctoolFilterParams.isEmpty()) {
          context.getConsole().printBuildFailure(
              String.format(
                  Locale.US,
                  "No tests found matching specified filter (%s)",
                  testSelectorList.getExplanation()));
          return StepExecutionResult.SUCCESS;
        }
        processExecutorParamsBuilder.addAllCommand(xctoolFilterParams);
      } catch (IOException e) {
        context.getConsole().printErrorText("Failed to get list of tests from test bundle");
        context.getConsole().printBuildFailureWithStacktrace(e);
        return StepExecutionResult.ERROR;
      }
    }

    ProcessExecutorParams processExecutorParams = processExecutorParamsBuilder.build();

    // Only launch one instance of xctool at the time
    final AtomicBoolean stutterLockIsNotified = new AtomicBoolean(false);
    try {
      LOG.debug("Running command: %s", processExecutorParams);

      try {
        acquireStutterLock(stutterLockIsNotified);

        // Start the process.
        ProcessExecutor.LaunchedProcess launchedProcess =
            context.getProcessExecutor().launchProcess(processExecutorParams);

        int exitCode = -1;
        String stderr = "Unexpected termination";
        try {
          ProcessStdoutReader stdoutReader = new ProcessStdoutReader(launchedProcess);
          ProcessStderrReader stderrReader = new ProcessStderrReader(launchedProcess);
          Thread stdoutReaderThread = new Thread(stdoutReader);
          Thread stderrReaderThread = new Thread(stderrReader);
          stdoutReaderThread.start();
          stderrReaderThread.start();
          exitCode = waitForProcessAndGetExitCode(
              context.getProcessExecutor(),
              launchedProcess,
              timeoutInMs);
          stdoutReaderThread.join(timeoutInMs.orElse(1000L));
          stderrReaderThread.join(timeoutInMs.orElse(1000L));
          Optional<IOException> exception = stdoutReader.getException();
          if (exception.isPresent()) {
            throw exception.get();
          }
          stderr = stderrReader.getStdErr();
          LOG.debug("Finished running command, exit code %d, stderr %s", exitCode, stderr);
        } finally {
          context.getProcessExecutor().destroyLaunchedProcess(launchedProcess);
          context.getProcessExecutor().waitForLaunchedProcess(launchedProcess);
        }

        if (exitCode != 0) {
          if (!stderr.isEmpty()) {
            context.getConsole().printErrorText(
                String.format(
                    Locale.US,
                    "xctool failed with exit code %d: %s",
                    exitCode,
                    stderr));
          } else {
            context.getConsole().printErrorText(
                String.format(
                    Locale.US,
                    "xctool failed with exit code %d",
                    exitCode));
          }
        }

        return StepExecutionResult.of(exitCode);

      } catch (Exception e) {
        LOG.error(e, "Exception while running %s", processExecutorParams.getCommand());
        MoreThrowables.propagateIfInterrupt(e);
        context.getConsole().printBuildFailureWithStacktrace(e);
        return StepExecutionResult.ERROR;
      }
    } finally {
      releaseStutterLock(stutterLockIsNotified);
    }
  }

  private class ProcessStdoutReader implements Runnable {

    private final ProcessExecutor.LaunchedProcess launchedProcess;
    private Optional<IOException> exception = Optional.empty();

    public ProcessStdoutReader(ProcessExecutor.LaunchedProcess launchedProcess) {
      this.launchedProcess = launchedProcess;
    }

    @Override
    public void run() {
      try (OutputStream outputStream = filesystem.newFileOutputStream(outputPath);
           TeeInputStream stdoutWrapperStream = new TeeInputStream(
               launchedProcess.getInputStream(), outputStream)) {
        if (stdoutReadingCallback.isPresent()) {
          // The caller is responsible for reading all the data, which TeeInputStream will
          // copy to outputStream.
          stdoutReadingCallback.get().readStdout(stdoutWrapperStream);
        } else {
          // Nobody's going to read from stdoutWrapperStream, so close it and copy
          // the process's stdout to outputPath directly.
          stdoutWrapperStream.close();
          ByteStreams.copy(launchedProcess.getInputStream(), outputStream);
        }
      } catch (IOException e) {
        exception = Optional.of(e);
      }
    }

    public Optional<IOException> getException() {
      return exception;
    }
  }

  private static class ProcessStderrReader implements Runnable {

    private final ProcessExecutor.LaunchedProcess launchedProcess;
    private String stderr = "";

    public ProcessStderrReader(ProcessExecutor.LaunchedProcess launchedProcess) {
      this.launchedProcess = launchedProcess;
    }

    @Override
    public void run() {
      try (InputStreamReader stderrReader = new InputStreamReader(
               launchedProcess.getErrorStream(),
               StandardCharsets.UTF_8);
           BufferedReader bufferedStderrReader = new BufferedReader(stderrReader)) {
        stderr = CharStreams.toString(bufferedStderrReader).trim();
      } catch (IOException e) {
        StringWriter stackTraceOut = new StringWriter();
        e.printStackTrace(new PrintWriter(stackTraceOut));
        stderr = stackTraceOut.getBuffer().toString();
      }
    }

    public String getStdErr() {
      return stderr;
    }
  }

  @Override
  public String getDescription(ExecutionContext context) {
    return Joiner.on(' ').join(Iterables.transform(command, Escaper.SHELL_ESCAPER));
  }

  private static int listAndFilterTestsThenFormatXctoolParams(
      ProcessExecutor processExecutor,
      Console console,
      TestSelectorList testSelectorList,
      ProcessExecutorParams listTestsOnlyParams,
      ImmutableList.Builder<String> filterParamsBuilder) throws IOException, InterruptedException {
    Preconditions.checkArgument(!testSelectorList.isEmpty());
    LOG.debug("Filtering tests with selector list: %s", testSelectorList.getExplanation());

    LOG.debug("Listing tests with command: %s", listTestsOnlyParams);
    ProcessExecutor.LaunchedProcess launchedProcess =
        processExecutor.launchProcess(listTestsOnlyParams);

    ListTestsOnlyHandler listTestsOnlyHandler = new ListTestsOnlyHandler();
    String stderr;
    int listTestsResult;
    try (InputStreamReader isr =
         new InputStreamReader(
             launchedProcess.getInputStream(),
             StandardCharsets.UTF_8);
         BufferedReader br = new BufferedReader(isr);
         InputStreamReader esr =
         new InputStreamReader(
             launchedProcess.getErrorStream(),
             StandardCharsets.UTF_8);
         BufferedReader ebr = new BufferedReader(esr)) {
      XctoolOutputParsing.streamOutputFromReader(br, listTestsOnlyHandler);
      stderr = CharStreams.toString(ebr).trim();
      listTestsResult = processExecutor.waitForLaunchedProcess(launchedProcess).getExitCode();
    }

    if (listTestsResult != 0) {
      if (!stderr.isEmpty()) {
        console.printErrorText(
            String.format(
                Locale.US,
                "xctool failed with exit code %d: %s",
                listTestsResult,
                stderr));
      } else {
        console.printErrorText(
            String.format(
                Locale.US,
                "xctool failed with exit code %d",
                listTestsResult));
      }
    } else {
      formatXctoolFilterParams(
          testSelectorList, listTestsOnlyHandler.testTargetsToDescriptions, filterParamsBuilder);
    }

    return listTestsResult;
  }

  private static void formatXctoolFilterParams(
      TestSelectorList testSelectorList,
      Multimap<String, TestDescription> testTargetsToDescriptions,
      ImmutableList.Builder<String> filterParamsBuilder) {
    for (String testTarget : testTargetsToDescriptions.keySet()) {
      StringBuilder sb = new StringBuilder();
      boolean matched = false;
      for (TestDescription testDescription : testTargetsToDescriptions.get(testTarget)) {
        if (!testSelectorList.isIncluded(testDescription)) {
          continue;
        }
        if (!matched) {
          matched = true;
          sb.append(testTarget);
          sb.append(':');
        } else {
          sb.append(',');
        }
        sb.append(testDescription.getClassName());
        sb.append('/');
        sb.append(testDescription.getMethodName());
      }
      if (matched) {
        filterParamsBuilder.add("-only");
        filterParamsBuilder.add(sb.toString());
      }
    }
  }

  private static ImmutableList<String> createCommandArgs(
      Path xctoolPath,
      String sdkName,
      Optional<String> destinationSpecifier,
      Collection<Path> logicTestBundlePaths,
      Map<Path, Path> appTestBundleToHostAppPaths,
      boolean waitForDebugger) {
    ImmutableList.Builder<String> args = ImmutableList.builder();
    args.add(xctoolPath.toString());
    args.add("-reporter");
    args.add("json-stream");
    args.add("-sdk", sdkName);
    if (destinationSpecifier.isPresent()) {
      args.add("-destination");
      args.add(destinationSpecifier.get());
    }
    args.add("run-tests");
    for (Path logicTestBundlePath : logicTestBundlePaths) {
      args.add("-logicTest");
      args.add(logicTestBundlePath.toString());
    }
    for (Map.Entry<Path, Path> appTestBundleAndHostApp : appTestBundleToHostAppPaths.entrySet()) {
      args.add("-appTest");
      args.add(appTestBundleAndHostApp.getKey() + ":" + appTestBundleAndHostApp.getValue());
    }
    if (waitForDebugger) {
      args.add("-waitForDebugger");
    }

    return args.build();
  }

  private static int waitForProcessAndGetExitCode(
      ProcessExecutor processExecutor,
      ProcessExecutor.LaunchedProcess launchedProcess,
      Optional<Long> timeoutInMs)
      throws InterruptedException {
    int processExitCode;
    if (timeoutInMs.isPresent()) {
      ProcessExecutor.Result processResult = processExecutor.waitForLaunchedProcessWithTimeout(
          launchedProcess,
          timeoutInMs.get(),
          Optional.empty()
      );
      if (processResult.isTimedOut()) {
       throw new HumanReadableException(
           "Timed out after %d ms running test command",
           timeoutInMs.orElse(-1L)
       );
      } else {
        processExitCode = processResult.getExitCode();
      }
    } else {
      processExitCode = processExecutor.waitForLaunchedProcess(launchedProcess).getExitCode();
    }
    if (processExitCode == 0 || processExitCode == 1) {
      // Test failure is denoted by xctool returning 1. Unfortunately, there's no way
      // to distinguish an internal xctool error from a test failure:
      //
      // https://github.com/facebook/xctool/issues/511
      //
      // We don't want to fail the step on a test failure, so return 0 on either
      // xctool exit code.
      return 0;
    } else {
      // Some unknown failure.
      return processExitCode;
    }
  }

  private void acquireStutterLock(final AtomicBoolean stutterLockIsNotified)
      throws InterruptedException {
    if (!xctoolStutterTimeout.isPresent()) {
      return;
    }
    try {
      stutterLock.acquire();
    } catch (Exception e) {
      releaseStutterLock(stutterLockIsNotified);
      throw e;
    }
    stutterTimeoutExecutorService.schedule(
        () -> releaseStutterLock(stutterLockIsNotified),
        xctoolStutterTimeout.get(),
        TimeUnit.MILLISECONDS);
  }

  private void releaseStutterLock(AtomicBoolean stutterLockIsNotified) {
    if (!xctoolStutterTimeout.isPresent()) {
      return;
    }
    if (!stutterLockIsNotified.getAndSet(true)) {
      stutterLock.release();
    }
  }

  public ImmutableList<String> getCommand() {
    return command;
  }

}


text:
/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.content.model;

/**
 * Model definition for OrderShipmentLineItemShipment.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Content API for Shopping. For a detailed explanation
 * see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class OrderShipmentLineItemShipment extends com.google.api.client.json.GenericJson {

  /**
   * The ID of the line item that is shipped. Either lineItemId or productId is required.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String lineItemId;

  /**
   * The ID of the product to ship. This is the REST ID used in the products service. Either
   * lineItemId or productId is required.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String productId;

  /**
   * The quantity that is shipped.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Long quantity;

  /**
   * The ID of the line item that is shipped. Either lineItemId or productId is required.
   * @return value or {@code null} for none
   */
  public java.lang.String getLineItemId() {
    return lineItemId;
  }

  /**
   * The ID of the line item that is shipped. Either lineItemId or productId is required.
   * @param lineItemId lineItemId or {@code null} for none
   */
  public OrderShipmentLineItemShipment setLineItemId(java.lang.String lineItemId) {
    this.lineItemId = lineItemId;
    return this;
  }

  /**
   * The ID of the product to ship. This is the REST ID used in the products service. Either
   * lineItemId or productId is required.
   * @return value or {@code null} for none
   */
  public java.lang.String getProductId() {
    return productId;
  }

  /**
   * The ID of the product to ship. This is the REST ID used in the products service. Either
   * lineItemId or productId is required.
   * @param productId productId or {@code null} for none
   */
  public OrderShipmentLineItemShipment setProductId(java.lang.String productId) {
    this.productId = productId;
    return this;
  }

  /**
   * The quantity that is shipped.
   * @return value or {@code null} for none
   */
  public java.lang.Long getQuantity() {
    return quantity;
  }

  /**
   * The quantity that is shipped.
   * @param quantity quantity or {@code null} for none
   */
  public OrderShipmentLineItemShipment setQuantity(java.lang.Long quantity) {
    this.quantity = quantity;
    return this;
  }

  @Override
  public OrderShipmentLineItemShipment set(String fieldName, Object value) {
    return (OrderShipmentLineItemShipment) super.set(fieldName, value);
  }

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

}


text:
CREATE TABLE accounttype (
    id integer NOT NULL,
    code character varying(20),
    description character varying(60),
    last_update timestamp without time zone DEFAULT now() NOT NULL
);

CREATE SEQUENCE accounttype_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;

ALTER SEQUENCE accounttype_id_seq OWNED BY accounttype.id;

CREATE TABLE transactions (
    id integer NOT NULL,
    date integer NOT NULL,
    amount integer NOT NULL,
    description character varying(160) DEFAULT ''::character varying,
    hash character varying(40),
    last_update timestamp without time zone DEFAULT now() NOT NULL,
    trantype character varying(8) NOT NULL,
    account character varying(20) NOT NULL,
    owner integer NOT NULL,
    source character varying(20)
);

CREATE SEQUENCE transactions_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;

ALTER SEQUENCE transactions_id_seq OWNED BY transactions.id;

ALTER TABLE ONLY accounttype ALTER COLUMN id SET DEFAULT nextval('accounttype_id_seq'::regclass);
ALTER TABLE ONLY transactions ALTER COLUMN id SET DEFAULT nextval('transactions_id_seq'::regclass);
ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_hash_unique UNIQUE (hash);
ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_pkey PRIMARY KEY (id);
CREATE INDEX transactions_description_index ON transactions USING btree (description);
CREATE INDEX transactions_hash_index ON transactions USING btree (hash);

create table tag_labels (
id integer not null,
label varchar(60) not null,
owner integer not null
);

create table tag_list (
id integer not null,
tag integer not null,
transaction_id integer not null
);

create sequence tag_labels_id_seq;
create sequence tag_list_id_seq;

alter table tag_list ALTER id SET DEFAULT nextval('tag_list_id_seq');
alter table tag_labels ALTER id SET DEFAULT nextval('tag_labels_id_seq');

create index tag_labels_owner_index on tag_labels (owner);
create index tag_labels_label_index on tag_labels (label);
create index tag_labels_id_index on tag_labels (id);

create index tag_list_tag_index on tag_list (tag);
create unique index tag_list_tag_transaction_id_index on tag_list (tag, transaction_id);

INSERT INTO accounttype (code, description) VALUES ('bmo', 'Bank of Montreal Debit'), ('td', 'TD Canada Debit'), ('bmo_mastercard', 'Bank of Montreal Mastercard');

create table users (
	id integer not null,
	email varchar(255) not null,
	password varchar(100) not null,
	last_login integer
);

create sequence users_id_seq;

alter table users ALTER id SET DEFAULT nextval('users_id_seq');

create index users_email_index on users (email);
create index users_id_index on users (id);

create unique index users_email_unique_index on users (email);

create table tag_stats (
	id integer not null,
	user_id integer not null,
	tag_label_id integer not null,
	budget integer
);

create sequence tag_stats_id_seq;

alter table tag_stats ALTER id SET DEFAULT nextval('tag_stats_id_seq');

create index tag_stats_user_id_index on tag_stats (user_id);

create unique index tag_stats_user_id_tag_label_id_index on tag_stats (user_id, tag_label_id);


text:
import Home from './container'

export default {
  path: '',
  name: 'Home',
  component: Home,
  childRoutes: [
    { path: 'default-page', name: 'Default page', component: Home, isIndex: true }
  ]
}


text:
import functools

import IECore

import Gaffer
import GafferUI
import GafferImage

class RGBAChannelsPlugValueWidget( GafferUI.PlugValueWidget ) :

	def __init__( self, plug, **kw ) :

		self.__menuButton = GafferUI.MenuButton( menu = GafferUI.Menu( Gaffer.WeakMethod( self.__menuDefinition ) ) )
		self.__menuButton._qtWidget().setMinimumWidth( 150 )

		GafferUI.PlugValueWidget.__init__( self, self.__menuButton, plug, **kw )

		self._updateFromPlug()

	def _updateFromPlug( self ) :

		with self.getContext() :
			value = self.getPlug().getValue()

		assert( len( value ) == 4 )

		layers = [ GafferImage.ImageAlgo.layerName( x ) for x in value ]
		channels = [ GafferImage.ImageAlgo.baseName( x ) for x in value ]

		# Figure out a good label for the current list of channels.
		# Start out with "Custom" to represent something arbitrary
		# chosen via scripting, and then assign more descriptive labels
		# to anything that can be chosen via the menu.
		text = "Custom"
		if len( set( layers ) ) == 1 :
			prefix = layers[0] + "." if layers[0] else ""
			if channels == [ "R", "G", "B", "A" ] :
				text = prefix + "RGBA"
			elif len( set( channels ) ) == 1 :
				text = prefix + channels[0]

		self.__menuButton.setText( text )
		self.__menuButton.setEnabled( self._editable() )

	def __menuDefinition( self ) :

		image = next( iter( self.getPlug().node().children( GafferImage.ImagePlug ) ) )
		channelNames = []
		with self.getContext() :
			with IECore.IgnoredExceptions( Exception ) :
				channelNames = image["channelNames"].getValue()

		result = IECore.MenuDefinition()
		if not channelNames :
			result.append( "/No channels available", { "active" : False } )
			return result

		added = set()
		nonStandardLayers = set( [ GafferImage.ImageAlgo.layerName( x ) for x in channelNames
			if GafferImage.ImageAlgo.baseName( x ) not in [ "R", "G", "B", "A" ] ] )

		for channelName in sorted( channelNames, key = GafferImage.ImageAlgo.layerName ) :

			if GafferImage.ImageAlgo.baseName( channelName ) in [ "R", "G", "B", "A" ] :
				layerName = GafferImage.ImageAlgo.layerName( channelName )
				prefix = layerName + "." if layerName else ""
				text = prefix + "RGBA"
				value = [ prefix + x for x in [ "R", "G", "B", "A" ] ]
			else :
				text = channelName
				value = [ channelName ] * 4

			if text in added :
				continue

			added.add( text )

			if not GafferImage.ImageAlgo.layerName( text ) in nonStandardLayers:
				# If there are only the standard channels, we don't need a submenu
				text = text.replace( ".RGBA", "" )

			result.append(
				"/" + text.replace( ".", "/" ),
				{
					"command" : functools.partial( Gaffer.WeakMethod( self.__setValue ), value = value ),
					"checkBox" : text == self.__menuButton.getText(),
				}
			)

		return result

	def __setValue( self, unused, value ) :

		with Gaffer.UndoScope( self.getPlug().ancestor( Gaffer.ScriptNode ) ) :
			self.getPlug().setValue( IECore.StringVectorData( value ) )


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

<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <service id="miky_user.event_listener.menu.user_menu" class="Miky\Bundle\UserBundle\EventListener\Menu\UserMenuSubscriber">
            <tag name="kernel.event_subscriber"/>
        </service>
    </services>

</container>


text:
package jsontypes

import (
	"database/sql/driver"
	"encoding/json"
	"log"
	"time"
)

type NullTime struct {
	Val     time.Time
	Null    bool
	Present bool
}

func (t *NullTime) Set(val time.Time) {
	t.Present = true
	t.Val = val
}

func (t *NullTime) UnmarshalJSON(buf []byte) error {
	t.Present = true
	if buf[0] == 'n' {
		t.Null = true
		return nil
	} else {
		return json.Unmarshal(buf, &t.Val)
	}
}

func (t *NullTime) MarshalJSON() ([]byte, error) {
	if !t.Present || t.Null || t.Val.IsZero() {
		return []byte("null"), nil
	}
	return json.Marshal(t.Val)
}

func (t *NullTime) Scan(value interface{}) error {
	log.Println("NullTime.Scat is not implemented")
	return nil
}

func (t NullTime) Value() (driver.Value, error) {
	if t.Null || t.Val.IsZero() {
		return nil, nil
	}
	return t.Val, nil
}

func (t NullTime) Missing() bool {
	return !t.Present
}

type Time struct {
	Val     time.Time
	Present bool
}

func (t *Time) Set(val time.Time) {
	t.Present = true
	t.Val = val
}

func (t *Time) UnmarshalJSON(buf []byte) error {
	t.Present = true
	return json.Unmarshal(buf, &t.Val)
}

func (t *Time) MarshalJSON() ([]byte, error) {
	if !t.Present || t.Val.IsZero() {
		return []byte("null"), nil
	}
	return json.Marshal(t.Val)
}

func (t *Time) Scan(value interface{}) error {
	log.Println("Time.Scat is not implemented")
	return nil
}

func (t Time) Value() (driver.Value, error) {
	return t.Val, nil
}

func (t Time) Missing() bool {
	return !t.Present
}

type RONullTime struct {
	Val     time.Time
	Null    bool
	Present bool
}

func (t *RONullTime) Set(val time.Time) {
	t.Present = true
	t.Val = val
}

func (t *RONullTime) UnmarshalJSON(buf []byte) error {
	return ErrReadOnlyValue
}

func (t *RONullTime) MarshalJSON() ([]byte, error) {
	if !t.Present || t.Null || t.Val.IsZero() {
		return []byte("null"), nil
	}
	return json.Marshal(t.Val)
}

func (t *RONullTime) Scan(value interface{}) error {
	log.Println("RONullTime.Scat is not implemented")
	return nil
}

func (t RONullTime) Value() (driver.Value, error) {
	if t.Null || t.Val.IsZero() {
		return nil, nil
	}
	return t.Val, nil
}

func (t RONullTime) Missing() bool {
	return !t.Present
}

type ROTime struct {
	Val     time.Time
	Present bool
}

func (t *ROTime) Set(val time.Time) {
	t.Present = true
	t.Val = val
}

func (t *ROTime) UnmarshalJSON(buf []byte) error {
	return ErrReadOnlyValue
}

func (t *ROTime) MarshalJSON() ([]byte, error) {
	if !t.Present || t.Val.IsZero() {
		return []byte("null"), nil
	}
	return json.Marshal(t.Val)
}

func (t *ROTime) Scan(value interface{}) error {
	log.Println("ROTime.Scat is not implemented")
	return nil
}

func (t ROTime) Value() (driver.Value, error) {
	return t.Val, nil
}

func (t ROTime) Missing() bool {
	return !t.Present
}


text:
namespace Neighbours.Data.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Neighbours.Data.Common.Constants;

    public abstract class FileInfoModel
    {
        public int Id { get; set; }

        [Required]
        [MaxLength(ValidationConstants.MaxOriginalFileNameLength)]
        public string OriginalFileName { get; set; }

        [Required]
        [MaxLength(ValidationConstants.MaxFileExtensionLength)]
        public string FileExtension { get; set; }

        public string UrlPath { get; set; }

        public string NewFileName { get; set; }
    }
}


text:
namespace v8 {
namespace internal {

Object* BoilerplateDescription::name(int index) const {
  // get() already checks for out of bounds access, but we do not want to allow
  // access to the last element, if it is the number of properties.
  DCHECK_NE(size(), index);
  return get(2 * index);
}

Object* BoilerplateDescription::value(int index) const {
  return get(2 * index + 1);
}

int BoilerplateDescription::size() const {
  DCHECK_EQ(0, (length() - (this->has_number_of_properties() ? 1 : 0)) % 2);
  // Rounding is intended.
  return length() / 2;
}

int BoilerplateDescription::backing_store_size() const {
  if (has_number_of_properties()) {
    // If present, the last entry contains the number of properties.
    return Smi::ToInt(this->get(length() - 1));
  }
  // If the number is not given explicitly, we assume there are no
  // properties with computed names.
  return size();
}

void BoilerplateDescription::set_backing_store_size(Isolate* isolate,
                                                    int backing_store_size) {
  DCHECK(has_number_of_properties());
  DCHECK_NE(size(), backing_store_size);
  Handle<Object> backing_store_size_obj =
      isolate->factory()->NewNumberFromInt(backing_store_size);
  set(length() - 1, *backing_store_size_obj);
}

bool BoilerplateDescription::has_number_of_properties() const {
  return length() % 2 != 0;
}

namespace {

inline int EncodeComputedEntry(ClassBoilerplate::ValueKind value_kind,
                               unsigned key_index) {
  typedef ClassBoilerplate::ComputedEntryFlags Flags;
  int flags = Flags::ValueKindBits::encode(value_kind) |
              Flags::KeyIndexBits::encode(key_index);
  return flags;
}

void AddToDescriptorArrayTemplate(
    Isolate* isolate, Handle<DescriptorArray> descriptor_array_template,
    Handle<Name> name, ClassBoilerplate::ValueKind value_kind,
    Handle<Object> value) {
  int entry = descriptor_array_template->Search(
      *name, descriptor_array_template->number_of_descriptors());
  // TODO(ishell): deduplicate properties at AST level, this will allow us to
  // avoid creation of closures that will be overwritten anyway.
  if (entry == DescriptorArray::kNotFound) {
    // Entry not found, add new one.
    Descriptor d;
    if (value_kind == ClassBoilerplate::kData) {
      d = Descriptor::DataConstant(name, value, DONT_ENUM);
    } else {
      DCHECK(value_kind == ClassBoilerplate::kGetter ||
             value_kind == ClassBoilerplate::kSetter);
      Handle<AccessorPair> pair = isolate->factory()->NewAccessorPair();
      pair->set(value_kind == ClassBoilerplate::kGetter ? ACCESSOR_GETTER
                                                        : ACCESSOR_SETTER,
                *value);
      d = Descriptor::AccessorConstant(name, pair, DONT_ENUM);
    }
    descriptor_array_template->Append(&d);

  } else {
    // Entry found, update it.
    int sorted_index = descriptor_array_template->GetDetails(entry).pointer();
    if (value_kind == ClassBoilerplate::kData) {
      Descriptor d = Descriptor::DataConstant(name, value, DONT_ENUM);
      d.SetSortedKeyIndex(sorted_index);
      descriptor_array_template->Set(entry, &d);
    } else {
      DCHECK(value_kind == ClassBoilerplate::kGetter ||
             value_kind == ClassBoilerplate::kSetter);
      Object* raw_accessor = descriptor_array_template->GetValue(entry);
      AccessorPair* pair;
      if (raw_accessor->IsAccessorPair()) {
        pair = AccessorPair::cast(raw_accessor);
      } else {
        Handle<AccessorPair> new_pair = isolate->factory()->NewAccessorPair();
        Descriptor d = Descriptor::AccessorConstant(name, new_pair, DONT_ENUM);
        d.SetSortedKeyIndex(sorted_index);
        descriptor_array_template->Set(entry, &d);
        pair = *new_pair;
      }
      pair->set(value_kind == ClassBoilerplate::kGetter ? ACCESSOR_GETTER
                                                        : ACCESSOR_SETTER,
                *value);
    }
  }
}

Handle<NameDictionary> DictionaryAddNoUpdateNextEnumerationIndex(
    Handle<NameDictionary> dictionary, Handle<Name> name, Handle<Object> value,
    PropertyDetails details, int* entry_out = nullptr) {
  return NameDictionary::AddNoUpdateNextEnumerationIndex(
      dictionary, name, value, details, entry_out);
}

Handle<NumberDictionary> DictionaryAddNoUpdateNextEnumerationIndex(
    Handle<NumberDictionary> dictionary, uint32_t element, Handle<Object> value,
    PropertyDetails details, int* entry_out = nullptr) {
  // NumberDictionary does not maintain the enumeration order, so it's
  // a normal Add().
  return NumberDictionary::Add(dictionary, element, value, details, entry_out);
}

void DictionaryUpdateMaxNumberKey(Handle<NameDictionary> dictionary,
                                  Handle<Name> name) {
  // No-op for name dictionaries.
}

void DictionaryUpdateMaxNumberKey(Handle<NumberDictionary> dictionary,
                                  uint32_t element) {
  dictionary->UpdateMaxNumberKey(element, Handle<JSObject>());
  dictionary->set_requires_slow_elements();
}

constexpr int ComputeEnumerationIndex(int value_index) {
  // We "shift" value indices to ensure that the enumeration index for the value
  // will not overlap with minimum properties set for both class and prototype
  // objects.
  return value_index + Max(ClassBoilerplate::kMinimumClassPropertiesCount,
                           ClassBoilerplate::kMinimumPrototypePropertiesCount);
}

inline int GetExistingValueIndex(Object* value) {
  return value->IsSmi() ? Smi::ToInt(value) : -1;
}

template <typename Dictionary, typename Key>
void AddToDictionaryTemplate(Isolate* isolate, Handle<Dictionary> dictionary,
                             Key key, int key_index,
                             ClassBoilerplate::ValueKind value_kind,
                             Object* value) {
  int entry = dictionary->FindEntry(isolate, key);

  if (entry == kNotFound) {
    // Entry not found, add new one.
    const bool is_elements_dictionary =
        std::is_same<Dictionary, NumberDictionary>::value;
    STATIC_ASSERT(is_elements_dictionary !=
                  (std::is_same<Dictionary, NameDictionary>::value));
    int enum_order =
        is_elements_dictionary ? 0 : ComputeEnumerationIndex(key_index);
    Handle<Object> value_handle;
    PropertyDetails details(
        value_kind != ClassBoilerplate::kData ? kAccessor : kData, DONT_ENUM,
        PropertyCellType::kNoCell, enum_order);

    if (value_kind == ClassBoilerplate::kData) {
      value_handle = handle(value, isolate);
    } else {
      AccessorComponent component = value_kind == ClassBoilerplate::kGetter
                                        ? ACCESSOR_GETTER
                                        : ACCESSOR_SETTER;
      Handle<AccessorPair> pair(isolate->factory()->NewAccessorPair());
      pair->set(component, value);
      value_handle = pair;
    }

    // Add value to the dictionary without updating next enumeration index.
    Handle<Dictionary> dict = DictionaryAddNoUpdateNextEnumerationIndex(
        dictionary, key, value_handle, details, &entry);
    // It is crucial to avoid dictionary reallocations because it may remove
    // potential gaps in enumeration indices values that are necessary for
    // inserting computed properties into right places in the enumeration order.
    CHECK_EQ(*dict, *dictionary);

    DictionaryUpdateMaxNumberKey(dictionary, key);

  } else {
    // Entry found, update it.
    int enum_order = dictionary->DetailsAt(entry).dictionary_index();
    Object* existing_value = dictionary->ValueAt(entry);
    if (value_kind == ClassBoilerplate::kData) {
      // Computed value is a normal method.
      if (existing_value->IsAccessorPair()) {
        AccessorPair* current_pair = AccessorPair::cast(existing_value);

        int existing_getter_index =
            GetExistingValueIndex(current_pair->getter());
        int existing_setter_index =
            GetExistingValueIndex(current_pair->setter());
        if (existing_getter_index < key_index &&
            existing_setter_index < key_index) {
          // Both getter and setter were defined before the computed method,
          // so overwrite both.
          PropertyDetails details(kData, DONT_ENUM, PropertyCellType::kNoCell,
                                  enum_order);
          dictionary->DetailsAtPut(entry, details);
          dictionary->ValueAtPut(entry, value);

        } else {
          if (existing_getter_index < key_index) {
            DCHECK_LT(existing_setter_index, key_index);
            // Getter was defined before the computed method and then it was
            // overwritten by the current computed method which in turn was
            // later overwritten by the setter method. So we clear the getter.
            current_pair->set_getter(*isolate->factory()->null_value());

          } else if (existing_setter_index < key_index) {
            DCHECK_LT(existing_getter_index, key_index);
            // Setter was defined before the computed method and then it was
            // overwritten by the current computed method which in turn was
            // later overwritten by the getter method. So we clear the setter.
            current_pair->set_setter(*isolate->factory()->null_value());
          }
        }
      } else {
        // Overwrite existing value if it was defined before the computed one.
        int existing_value_index = Smi::ToInt(existing_value);
        if (existing_value_index < key_index) {
          PropertyDetails details(kData, DONT_ENUM, PropertyCellType::kNoCell,
                                  enum_order);
          dictionary->DetailsAtPut(entry, details);
          dictionary->ValueAtPut(entry, value);
        }
      }
    } else {
      AccessorComponent component = value_kind == ClassBoilerplate::kGetter
                                        ? ACCESSOR_GETTER
                                        : ACCESSOR_SETTER;
      if (existing_value->IsAccessorPair()) {
        AccessorPair* current_pair = AccessorPair::cast(existing_value);

        int existing_component_index =
            GetExistingValueIndex(current_pair->get(component));
        if (existing_component_index < key_index) {
          current_pair->set(component, value);
        }

      } else {
        Handle<AccessorPair> pair(isolate->factory()->NewAccessorPair());
        pair->set(component, value);
        PropertyDetails details(kAccessor, DONT_ENUM,
                                PropertyCellType::kNoCell);
        dictionary->DetailsAtPut(entry, details);
        dictionary->ValueAtPut(entry, *pair);
      }
    }
  }
}

}  // namespace

// Helper class that eases building of a properties, elements and computed
// properties templates.
class ObjectDescriptor {
 public:
  void IncComputedCount() { ++computed_count_; }
  void IncPropertiesCount() { ++property_count_; }
  void IncElementsCount() { ++element_count_; }

  bool HasDictionaryProperties() const {
    return computed_count_ > 0 || property_count_ > kMaxNumberOfDescriptors;
  }

  Handle<Object> properties_template() const {
    return HasDictionaryProperties()
               ? Handle<Object>::cast(properties_dictionary_template_)
               : Handle<Object>::cast(descriptor_array_template_);
  }

  Handle<NumberDictionary> elements_template() const {
    return elements_dictionary_template_;
  }

  Handle<FixedArray> computed_properties() const {
    return computed_properties_;
  }

  void CreateTemplates(Isolate* isolate, int slack) {
    Factory* factory = isolate->factory();
    descriptor_array_template_ = factory->empty_descriptor_array();
    properties_dictionary_template_ = factory->empty_property_dictionary();
    if (property_count_ || HasDictionaryProperties() || slack) {
      if (HasDictionaryProperties()) {
        properties_dictionary_template_ = NameDictionary::New(
            isolate, property_count_ + computed_count_ + slack);
      } else {
        descriptor_array_template_ =
            DescriptorArray::Allocate(isolate, 0, property_count_ + slack);
      }
    }
    elements_dictionary_template_ =
        element_count_ || computed_count_
            ? NumberDictionary::New(isolate, element_count_ + computed_count_)
            : factory->empty_slow_element_dictionary();

    computed_properties_ =
        computed_count_
            ? factory->NewFixedArray(computed_count_ *
                                     ClassBoilerplate::kFullComputedEntrySize)
            : factory->empty_fixed_array();

    temp_handle_ = handle(Smi::kZero, isolate);
  }

  void AddConstant(Handle<Name> name, Handle<Object> value,
                   PropertyAttributes attribs) {
    bool is_accessor = value->IsAccessorInfo();
    DCHECK(!value->IsAccessorPair());
    if (HasDictionaryProperties()) {
      PropertyKind kind = is_accessor ? i::kAccessor : i::kData;
      PropertyDetails details(kind, attribs, PropertyCellType::kNoCell,
                              next_enumeration_index_++);
      properties_dictionary_template_ =
          DictionaryAddNoUpdateNextEnumerationIndex(
              properties_dictionary_template_, name, value, details);
    } else {
      Descriptor d = is_accessor
                         ? Descriptor::AccessorConstant(name, value, attribs)
                         : Descriptor::DataConstant(name, value, attribs);
      descriptor_array_template_->Append(&d);
    }
  }

  void AddNamedProperty(Isolate* isolate, Handle<Name> name,
                        ClassBoilerplate::ValueKind value_kind,
                        int value_index) {
    Smi* value = Smi::FromInt(value_index);
    if (HasDictionaryProperties()) {
      UpdateNextEnumerationIndex(value_index);
      AddToDictionaryTemplate(isolate, properties_dictionary_template_, name,
                              value_index, value_kind, value);
    } else {
      *temp_handle_.location() = value;
      AddToDescriptorArrayTemplate(isolate, descriptor_array_template_, name,
                                   value_kind, temp_handle_);
    }
  }

  void AddIndexedProperty(Isolate* isolate, uint32_t element,
                          ClassBoilerplate::ValueKind value_kind,
                          int value_index) {
    Smi* value = Smi::FromInt(value_index);
    AddToDictionaryTemplate(isolate, elements_dictionary_template_, element,
                            value_index, value_kind, value);
  }

  void AddComputed(ClassBoilerplate::ValueKind value_kind, int key_index) {
    int value_index = key_index + 1;
    UpdateNextEnumerationIndex(value_index);

    int flags = EncodeComputedEntry(value_kind, key_index);
    computed_properties_->set(current_computed_index_++, Smi::FromInt(flags));
  }

  void UpdateNextEnumerationIndex(int value_index) {
    int next_index = ComputeEnumerationIndex(value_index);
    DCHECK_LT(next_enumeration_index_, next_index);
    next_enumeration_index_ = next_index;
  }

  void Finalize(Isolate* isolate) {
    if (HasDictionaryProperties()) {
      properties_dictionary_template_->SetNextEnumerationIndex(
          next_enumeration_index_);

      isolate->heap()->RightTrimFixedArray(
          *computed_properties_,
          computed_properties_->length() - current_computed_index_);
    } else {
      DCHECK(descriptor_array_template_->IsSortedNoDuplicates());
    }
  }

 private:
  int property_count_ = 0;
  int next_enumeration_index_ = PropertyDetails::kInitialIndex;
  int element_count_ = 0;
  int computed_count_ = 0;
  int current_computed_index_ = 0;

  Handle<DescriptorArray> descriptor_array_template_;
  Handle<NameDictionary> properties_dictionary_template_;
  Handle<NumberDictionary> elements_dictionary_template_;
  Handle<FixedArray> computed_properties_;
  // This temporary handle is used for storing to descriptor array.
  Handle<Object> temp_handle_;
};

void ClassBoilerplate::AddToPropertiesTemplate(
    Isolate* isolate, Handle<NameDictionary> dictionary, Handle<Name> name,
    int key_index, ClassBoilerplate::ValueKind value_kind, Object* value) {
  AddToDictionaryTemplate(isolate, dictionary, name, key_index, value_kind,
                          value);
}

void ClassBoilerplate::AddToElementsTemplate(
    Isolate* isolate, Handle<NumberDictionary> dictionary, uint32_t key,
    int key_index, ClassBoilerplate::ValueKind value_kind, Object* value) {
  AddToDictionaryTemplate(isolate, dictionary, key, key_index, value_kind,
                          value);
}

Handle<ClassBoilerplate> ClassBoilerplate::BuildClassBoilerplate(
    Isolate* isolate, ClassLiteral* expr) {
  // Create a non-caching handle scope to ensure that the temporary handle used
  // by ObjectDescriptor for passing Smis around does not corrupt handle cache
  // in CanonicalHandleScope.
  HandleScope scope(isolate);
  Factory* factory = isolate->factory();
  ObjectDescriptor static_desc;
  ObjectDescriptor instance_desc;

  for (int i = 0; i < expr->properties()->length(); i++) {
    ClassLiteral::Property* property = expr->properties()->at(i);
    ObjectDescriptor& desc =
        property->is_static() ? static_desc : instance_desc;
    if (property->is_computed_name()) {
      desc.IncComputedCount();
    } else {
      if (property->key()->AsLiteral()->IsPropertyName()) {
        desc.IncPropertiesCount();
      } else {
        desc.IncElementsCount();
      }
    }
  }

  //
  // Initialize class object template.
  //
  static_desc.CreateTemplates(isolate, kMinimumClassPropertiesCount);
  Handle<DescriptorArray> class_function_descriptors(
      isolate->native_context()->class_function_map()->instance_descriptors(),
      isolate);
  STATIC_ASSERT(JSFunction::kLengthDescriptorIndex == 0);
  {
    // Add length_accessor.
    PropertyAttributes attribs =
        static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY);
    static_desc.AddConstant(factory->length_string(),
                            factory->function_length_accessor(), attribs);
  }
  {
    // Add prototype_accessor.
    PropertyAttributes attribs =
        static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
    static_desc.AddConstant(factory->prototype_string(),
                            factory->function_prototype_accessor(), attribs);
  }
  if (FunctionLiteral::NeedsHomeObject(expr->constructor())) {
    PropertyAttributes attribs =
        static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
    Handle<Object> value(
        Smi::FromInt(ClassBoilerplate::kPrototypeArgumentIndex), isolate);
    static_desc.AddConstant(factory->home_object_symbol(), value, attribs);
  }
  {
    Handle<Smi> start_position(Smi::FromInt(expr->start_position()), isolate);
    Handle<Smi> end_position(Smi::FromInt(expr->end_position()), isolate);
    Handle<Tuple2> class_positions =
        factory->NewTuple2(start_position, end_position, NOT_TENURED);
    static_desc.AddConstant(factory->class_positions_symbol(), class_positions,
                            DONT_ENUM);
  }

  //
  // Initialize prototype object template.
  //
  instance_desc.CreateTemplates(isolate, kMinimumPrototypePropertiesCount);
  {
    Handle<Object> value(
        Smi::FromInt(ClassBoilerplate::kConstructorArgumentIndex), isolate);
    instance_desc.AddConstant(factory->constructor_string(), value, DONT_ENUM);
  }

  //
  // Fill in class boilerplate.
  //
  int dynamic_argument_index = ClassBoilerplate::kFirstDynamicArgumentIndex;

  for (int i = 0; i < expr->properties()->length(); i++) {
    ClassLiteral::Property* property = expr->properties()->at(i);

    ClassBoilerplate::ValueKind value_kind;
    switch (property->kind()) {
      case ClassLiteral::Property::METHOD:
        value_kind = ClassBoilerplate::kData;
        break;
      case ClassLiteral::Property::GETTER:
        value_kind = ClassBoilerplate::kGetter;
        break;
      case ClassLiteral::Property::SETTER:
        value_kind = ClassBoilerplate::kSetter;
        break;
      case ClassLiteral::Property::PUBLIC_FIELD:
        if (property->is_computed_name()) {
          ++dynamic_argument_index;
        }
        continue;
      case ClassLiteral::Property::PRIVATE_FIELD:
        DCHECK(!property->is_computed_name());
        continue;
    }

    ObjectDescriptor& desc =
        property->is_static() ? static_desc : instance_desc;
    if (property->is_computed_name()) {
      int computed_name_index = dynamic_argument_index;
      dynamic_argument_index += 2;  // Computed name and value indices.
      desc.AddComputed(value_kind, computed_name_index);
      continue;
    }
    int value_index = dynamic_argument_index++;

    Literal* key_literal = property->key()->AsLiteral();
    uint32_t index;
    if (key_literal->AsArrayIndex(&index)) {
      desc.AddIndexedProperty(isolate, index, value_kind, value_index);

    } else {
      Handle<String> name = key_literal->AsRawPropertyName()->string();
      DCHECK(name->IsInternalizedString());
      desc.AddNamedProperty(isolate, name, value_kind, value_index);
    }
  }

  // Add name accessor to the class object if necessary.
  bool install_class_name_accessor = false;
  if (!expr->has_name_static_property() &&
      expr->constructor()->has_shared_name()) {
    if (static_desc.HasDictionaryProperties()) {
      // Install class name accessor if necessary during class literal
      // instantiation.
      install_class_name_accessor = true;
    } else {
      // Set class name accessor if the "name" method was not added yet.
      PropertyAttributes attribs =
          static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY);
      static_desc.AddConstant(factory->name_string(),
                              factory->function_name_accessor(), attribs);
    }
  }

  static_desc.Finalize(isolate);
  instance_desc.Finalize(isolate);

  Handle<ClassBoilerplate> class_boilerplate =
      Handle<ClassBoilerplate>::cast(factory->NewFixedArray(kBoileplateLength));

  class_boilerplate->set_flags(0);
  class_boilerplate->set_install_class_name_accessor(
      install_class_name_accessor);
  class_boilerplate->set_arguments_count(dynamic_argument_index);

  class_boilerplate->set_static_properties_template(
      *static_desc.properties_template());
  class_boilerplate->set_static_elements_template(
      *static_desc.elements_template());
  class_boilerplate->set_static_computed_properties(
      *static_desc.computed_properties());

  class_boilerplate->set_instance_properties_template(
      *instance_desc.properties_template());
  class_boilerplate->set_instance_elements_template(
      *instance_desc.elements_template());
  class_boilerplate->set_instance_computed_properties(
      *instance_desc.computed_properties());

  return scope.CloseAndEscape(class_boilerplate);
}

}  // namespace internal
}  // namespace v8


text:
Templates is a jade template prepackager for [Express](http://expressjs.com), inspired by [Jammit](http://documentcloud.github.com/jammit)
Templates is written in coffeescript by [Marcel Miranda](http://reaktivo.com).

[Source Code](https://github.com/reaktivo/templates)

## Installation

    npm install templates

## Usage

Considering your project directory structure is like the following:

    app.js
    views/
    templates/
      notification/
        panel.jade
      profile.jade

### Server

    var templates = require 'templates'

    // Create express app
    var app = express.createServer()

    app.use(templates({

      // src is the directory where jade template files are stored
      src: __dirname + "/templates",

      // url is the url the request will respond to
      url: "/templates.js",

      // namespace is the javascript object the
      // templates will be attached to
      namespace: "window.templates"

    }))

### Client

    <!-- Add templates script to page -->
    <script src="/templates.js"></script>

    <!-- Use templates -->
    <script>

      templates.profile({name: "John", age: 25})
      // Will return a html string based on templates/profile.jade

      templates.notification.panel({title: "Error", message: "Could not log in"})
      // Will return a html string based on templates/notification/panel.jade

    </script>

## Production

Templates will look for the process.env.NODE_ENV to see if working on production environment.
When running on production, Templates will automatically compress the templates file using uglify-js.
When not running on production, Templates will leave jade's compileDebug option to true, which leaves line numbers for debugging purposes.

Copyright © 2012 Marcel Miranda. See LICENSE for further details.


text:
/* $OpenBSD: rsa_err.c,v 1.14 2014/07/09 19:51:38 jsing Exp $ */
/* ====================================================================
 * Copyright (c) 1999-2011 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
 *
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please contact
 *    openssl-core@OpenSSL.org.
 *
 * 5. Products derived from this software may not be called "OpenSSL"
 *    nor may "OpenSSL" appear in their names without prior written
 *    permission of the OpenSSL Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
 *
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 *
 * This product includes cryptographic software written by Eric Young
 * (eay@cryptsoft.com).  This product includes software written by Tim
 * Hudson (tjh@cryptsoft.com).
 *
 */

/* NOTE: this file was auto generated by the mkerr.pl script: any changes
 * made to it will be overwritten when the script next updates this file,
 * only reason strings will be preserved.
 */

#include <stdio.h>

#include <openssl/opensslconf.h>

#include <openssl/err.h>
#include <openssl/rsa.h>

/* BEGIN ERROR CODES */
#ifndef OPENSSL_NO_ERR

#define ERR_FUNC(func) ERR_PACK(ERR_LIB_RSA,func,0)
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_RSA,0,reason)

static ERR_STRING_DATA RSA_str_functs[] = {
	{ERR_FUNC(RSA_F_CHECK_PADDING_MD),	"CHECK_PADDING_MD"},
	{ERR_FUNC(RSA_F_DO_RSA_PRINT),	"DO_RSA_PRINT"},
	{ERR_FUNC(RSA_F_INT_RSA_VERIFY),	"INT_RSA_VERIFY"},
	{ERR_FUNC(RSA_F_MEMORY_LOCK),	"MEMORY_LOCK"},
	{ERR_FUNC(RSA_F_OLD_RSA_PRIV_DECODE),	"OLD_RSA_PRIV_DECODE"},
	{ERR_FUNC(RSA_F_PKEY_RSA_CTRL),	"PKEY_RSA_CTRL"},
	{ERR_FUNC(RSA_F_PKEY_RSA_CTRL_STR),	"PKEY_RSA_CTRL_STR"},
	{ERR_FUNC(RSA_F_PKEY_RSA_SIGN),	"PKEY_RSA_SIGN"},
	{ERR_FUNC(RSA_F_PKEY_RSA_VERIFY),	"PKEY_RSA_VERIFY"},
	{ERR_FUNC(RSA_F_PKEY_RSA_VERIFYRECOVER),	"PKEY_RSA_VERIFYRECOVER"},
	{ERR_FUNC(RSA_F_RSA_BUILTIN_KEYGEN),	"RSA_BUILTIN_KEYGEN"},
	{ERR_FUNC(RSA_F_RSA_CHECK_KEY),	"RSA_check_key"},
	{ERR_FUNC(RSA_F_RSA_EAY_PRIVATE_DECRYPT),	"RSA_EAY_PRIVATE_DECRYPT"},
	{ERR_FUNC(RSA_F_RSA_EAY_PRIVATE_ENCRYPT),	"RSA_EAY_PRIVATE_ENCRYPT"},
	{ERR_FUNC(RSA_F_RSA_EAY_PUBLIC_DECRYPT),	"RSA_EAY_PUBLIC_DECRYPT"},
	{ERR_FUNC(RSA_F_RSA_EAY_PUBLIC_ENCRYPT),	"RSA_EAY_PUBLIC_ENCRYPT"},
	{ERR_FUNC(RSA_F_RSA_GENERATE_KEY),	"RSA_generate_key"},
	{ERR_FUNC(RSA_F_RSA_GENERATE_KEY_EX),	"RSA_generate_key_ex"},
	{ERR_FUNC(RSA_F_RSA_ITEM_VERIFY),	"RSA_ITEM_VERIFY"},
	{ERR_FUNC(RSA_F_RSA_MEMORY_LOCK),	"RSA_memory_lock"},
	{ERR_FUNC(RSA_F_RSA_NEW_METHOD),	"RSA_new_method"},
	{ERR_FUNC(RSA_F_RSA_PADDING_ADD_NONE),	"RSA_padding_add_none"},
	{ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP),	"RSA_padding_add_PKCS1_OAEP"},
	{ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_PSS),	"RSA_padding_add_PKCS1_PSS"},
	{ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1),	"RSA_padding_add_PKCS1_PSS_mgf1"},
	{ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1),	"RSA_padding_add_PKCS1_type_1"},
	{ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2),	"RSA_padding_add_PKCS1_type_2"},
	{ERR_FUNC(RSA_F_RSA_PADDING_ADD_SSLV23),	"RSA_padding_add_SSLv23"},
	{ERR_FUNC(RSA_F_RSA_PADDING_ADD_X931),	"RSA_padding_add_X931"},
	{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_NONE),	"RSA_padding_check_none"},
	{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP),	"RSA_padding_check_PKCS1_OAEP"},
	{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1),	"RSA_padding_check_PKCS1_type_1"},
	{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2),	"RSA_padding_check_PKCS1_type_2"},
	{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_SSLV23),	"RSA_padding_check_SSLv23"},
	{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_X931),	"RSA_padding_check_X931"},
	{ERR_FUNC(RSA_F_RSA_PRINT),	"RSA_print"},
	{ERR_FUNC(RSA_F_RSA_PRINT_FP),	"RSA_print_fp"},
	{ERR_FUNC(RSA_F_RSA_PRIVATE_DECRYPT),	"RSA_private_decrypt"},
	{ERR_FUNC(RSA_F_RSA_PRIVATE_ENCRYPT),	"RSA_private_encrypt"},
	{ERR_FUNC(RSA_F_RSA_PRIV_DECODE),	"RSA_PRIV_DECODE"},
	{ERR_FUNC(RSA_F_RSA_PRIV_ENCODE),	"RSA_PRIV_ENCODE"},
	{ERR_FUNC(RSA_F_RSA_PUBLIC_DECRYPT),	"RSA_public_decrypt"},
	{ERR_FUNC(RSA_F_RSA_PUBLIC_ENCRYPT),	"RSA_public_encrypt"},
	{ERR_FUNC(RSA_F_RSA_PUB_DECODE),	"RSA_PUB_DECODE"},
	{ERR_FUNC(RSA_F_RSA_SETUP_BLINDING),	"RSA_setup_blinding"},
	{ERR_FUNC(RSA_F_RSA_SIGN),	"RSA_sign"},
	{ERR_FUNC(RSA_F_RSA_SIGN_ASN1_OCTET_STRING),	"RSA_sign_ASN1_OCTET_STRING"},
	{ERR_FUNC(RSA_F_RSA_VERIFY),	"RSA_verify"},
	{ERR_FUNC(RSA_F_RSA_VERIFY_ASN1_OCTET_STRING),	"RSA_verify_ASN1_OCTET_STRING"},
	{ERR_FUNC(RSA_F_RSA_VERIFY_PKCS1_PSS),	"RSA_verify_PKCS1_PSS"},
	{ERR_FUNC(RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1),	"RSA_verify_PKCS1_PSS_mgf1"},
	{0, NULL}
};

static ERR_STRING_DATA RSA_str_reasons[] = {
	{ERR_REASON(RSA_R_ALGORITHM_MISMATCH)    , "algorithm mismatch"},
	{ERR_REASON(RSA_R_BAD_E_VALUE)           , "bad e value"},
	{ERR_REASON(RSA_R_BAD_FIXED_HEADER_DECRYPT), "bad fixed header decrypt"},
	{ERR_REASON(RSA_R_BAD_PAD_BYTE_COUNT)    , "bad pad byte count"},
	{ERR_REASON(RSA_R_BAD_SIGNATURE)         , "bad signature"},
	{ERR_REASON(RSA_R_BLOCK_TYPE_IS_NOT_01)  , "block type is not 01"},
	{ERR_REASON(RSA_R_BLOCK_TYPE_IS_NOT_02)  , "block type is not 02"},
	{ERR_REASON(RSA_R_DATA_GREATER_THAN_MOD_LEN), "data greater than mod len"},
	{ERR_REASON(RSA_R_DATA_TOO_LARGE)        , "data too large"},
	{ERR_REASON(RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE), "data too large for key size"},
	{ERR_REASON(RSA_R_DATA_TOO_LARGE_FOR_MODULUS), "data too large for modulus"},
	{ERR_REASON(RSA_R_DATA_TOO_SMALL)        , "data too small"},
	{ERR_REASON(RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE), "data too small for key size"},
	{ERR_REASON(RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY), "digest too big for rsa key"},
	{ERR_REASON(RSA_R_DMP1_NOT_CONGRUENT_TO_D), "dmp1 not congruent to d"},
	{ERR_REASON(RSA_R_DMQ1_NOT_CONGRUENT_TO_D), "dmq1 not congruent to d"},
	{ERR_REASON(RSA_R_D_E_NOT_CONGRUENT_TO_1), "d e not congruent to 1"},
	{ERR_REASON(RSA_R_FIRST_OCTET_INVALID)   , "first octet invalid"},
	{ERR_REASON(RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE), "illegal or unsupported padding mode"},
	{ERR_REASON(RSA_R_INVALID_DIGEST_LENGTH) , "invalid digest length"},
	{ERR_REASON(RSA_R_INVALID_HEADER)        , "invalid header"},
	{ERR_REASON(RSA_R_INVALID_KEYBITS)       , "invalid keybits"},
	{ERR_REASON(RSA_R_INVALID_MESSAGE_LENGTH), "invalid message length"},
	{ERR_REASON(RSA_R_INVALID_MGF1_MD)       , "invalid mgf1 md"},
	{ERR_REASON(RSA_R_INVALID_PADDING)       , "invalid padding"},
	{ERR_REASON(RSA_R_INVALID_PADDING_MODE)  , "invalid padding mode"},
	{ERR_REASON(RSA_R_INVALID_PSS_PARAMETERS), "invalid pss parameters"},
	{ERR_REASON(RSA_R_INVALID_PSS_SALTLEN)   , "invalid pss saltlen"},
	{ERR_REASON(RSA_R_INVALID_SALT_LENGTH)   , "invalid salt length"},
	{ERR_REASON(RSA_R_INVALID_TRAILER)       , "invalid trailer"},
	{ERR_REASON(RSA_R_INVALID_X931_DIGEST)   , "invalid x931 digest"},
	{ERR_REASON(RSA_R_IQMP_NOT_INVERSE_OF_Q) , "iqmp not inverse of q"},
	{ERR_REASON(RSA_R_KEY_SIZE_TOO_SMALL)    , "key size too small"},
	{ERR_REASON(RSA_R_LAST_OCTET_INVALID)    , "last octet invalid"},
	{ERR_REASON(RSA_R_MODULUS_TOO_LARGE)     , "modulus too large"},
	{ERR_REASON(RSA_R_NON_FIPS_RSA_METHOD)   , "non fips rsa method"},
	{ERR_REASON(RSA_R_NO_PUBLIC_EXPONENT)    , "no public exponent"},
	{ERR_REASON(RSA_R_NULL_BEFORE_BLOCK_MISSING), "null before block missing"},
	{ERR_REASON(RSA_R_N_DOES_NOT_EQUAL_P_Q)  , "n does not equal p q"},
	{ERR_REASON(RSA_R_OAEP_DECODING_ERROR)   , "oaep decoding error"},
	{ERR_REASON(RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE), "operation not allowed in fips mode"},
	{ERR_REASON(RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE), "operation not supported for this keytype"},
	{ERR_REASON(RSA_R_PADDING_CHECK_FAILED)  , "padding check failed"},
	{ERR_REASON(RSA_R_P_NOT_PRIME)           , "p not prime"},
	{ERR_REASON(RSA_R_Q_NOT_PRIME)           , "q not prime"},
	{ERR_REASON(RSA_R_RSA_OPERATIONS_NOT_SUPPORTED), "rsa operations not supported"},
	{ERR_REASON(RSA_R_SLEN_CHECK_FAILED)     , "salt length check failed"},
	{ERR_REASON(RSA_R_SLEN_RECOVERY_FAILED)  , "salt length recovery failed"},
	{ERR_REASON(RSA_R_SSLV3_ROLLBACK_ATTACK) , "sslv3 rollback attack"},
	{ERR_REASON(RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD), "the asn1 object identifier is not known for this md"},
	{ERR_REASON(RSA_R_UNKNOWN_ALGORITHM_TYPE), "unknown algorithm type"},
	{ERR_REASON(RSA_R_UNKNOWN_MASK_DIGEST)   , "unknown mask digest"},
	{ERR_REASON(RSA_R_UNKNOWN_PADDING_TYPE)  , "unknown padding type"},
	{ERR_REASON(RSA_R_UNKNOWN_PSS_DIGEST)    , "unknown pss digest"},
	{ERR_REASON(RSA_R_UNSUPPORTED_MASK_ALGORITHM), "unsupported mask algorithm"},
	{ERR_REASON(RSA_R_UNSUPPORTED_MASK_PARAMETER), "unsupported mask parameter"},
	{ERR_REASON(RSA_R_UNSUPPORTED_SIGNATURE_TYPE), "unsupported signature type"},
	{ERR_REASON(RSA_R_VALUE_MISSING)         , "value missing"},
	{ERR_REASON(RSA_R_WRONG_SIGNATURE_LENGTH), "wrong signature length"},
	{0, NULL}
};

#endif

void
ERR_load_RSA_strings(void)
{
#ifndef OPENSSL_NO_ERR
	if (ERR_func_error_string(RSA_str_functs[0].error) == NULL) {
		ERR_load_strings(0, RSA_str_functs);
		ERR_load_strings(0, RSA_str_reasons);
	}
#endif
}


text:
"""
monotonic
~~~~~~~~~

This module provides a ``monotonic()`` function which returns the
value (in fractional seconds) of a clock which never goes backwards.

On Python 3.3 or newer, ``monotonic`` will be an alias of
``time.monotonic`` from the standard library. On older versions,
it will fall back to an equivalent implementation:

+------------------+----------------------------------------+
| Linux, BSD, AIX  | ``clock_gettime(3)``                   |
+------------------+----------------------------------------+
| Windows          | ``GetTickCount`` or ``GetTickCount64`` |
+------------------+----------------------------------------+
| OS X             | ``mach_absolute_time``                 |
+------------------+----------------------------------------+

If no suitable implementation exists for the current platform,
attempting to import this module (or to import from it) will
cause a ``RuntimeError`` exception to be raised.

"""
try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

setup(
    name='monotonic',
    version='1.4',
    license='Apache',
    author='Ori Livneh',
    author_email='ori@wikimedia.org',
    url='https://github.com/atdt/monotonic',
    description='An implementation of time.monotonic() for Python 2 & < 3.3',
    long_description=__doc__,
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    py_modules=('monotonic',),
)


text:
package iterator;

public class Operand {
  public  FldSpec  symbol;
  public  String   string;
  public  int      integer;
  public  float    real;
}


text:
zuisalive
=============================

[![Build Status](https://travis-ci.org/bscheibe/zuisalive.svg?branch=master)](https://travis-ci.org/bscheibe/zuisalive) ![Heroku](https://heroku-badge.herokuapp.com/?app=zuisalive&style=flat) ![License](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bscheibe/zuisalive?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge)

Visualizing data the easy way!

We're live at: https://zuisalive.herokuapp.com/

Data visualization app with ES6 (via Babel), CoffeeScript, Express/Node.js, Semantic-UI, Gulp and more.

**Do not that `heroku config:set NPM_CONFIG_PRODUCTION=true` since we want to now do no want to install devDependencies too.**

### Getting Started ###

1. Fork and/or clone
2. Run `npm install` && `bower install`
3. Run `npm install -g coffee-script` if not installed
4. Start the dev server by running `gulp`
5. Visit http://localhost:3000
6. Get to work!

### Languages / Frameworks / Libraries ###

* ES6 (via Babel)
* CoffeeScript with React sugar (.cjsx)
* Normalize-CSS for normalization of default element styles across browsers
* Semantic-UI CSS framework
* LESS for extended styling capabilities
* Autoprefixer for automatic vendor prefixing
# Jade for cleaner HTML
* JQuery because semantic wants it
* Express for server side logic
* Gulp for building and change monitoring
* LiveReload
* So, so much more

### Releasing ###

Release from the dist folder onto Heroku.

1. When ready run `gulp --production` to generate distribution with highest optimization
2. Commit changes with commit title `Heroku Release`
3. `git push <herokuRemoteName>`

Will get around to creating a branch just for distributions

### Development Notes ###

* ES6 is supported in JS files; these are transpiled to ES5 via Babel.  ~~There's an example of this in ```src/header.jsx```.~~
* The main stylesheet entry point is styles.less.
* The server entry point is server.coffee.

### Development Docs ###
* FontAwesome currently being used. Docs found [here](http://fortawesome.github.io/Font-Awesome/examples/#)
* Semantic UI currrently being used. Docs found [here](http://semantic-ui.com/collections/grid.html)
* NVD3 currently being used. Examples and Docs found [here](http://nvd3.org/examples/stackedArea.html)

### LiveReload ###

Install a live reload plugin for your browser (e.g. [RemoteLiveReload for Chrome](https://chrome.google.com/webstore/detail/remotelivereload/jlppknnillhjgiengoigajegdpieppei)) to instantly see your changes in the browser when a client side file (cjsx/coffee/jsx/js/less/css/html) changes.


text:
package sample.usecase

import org.springframework.boot.autoconfigure.condition._
import org.springframework.context.annotation.Bean

import org.springframework.context.annotation.Configuration
import org.springframework.security.core.authority.SimpleGrantedAuthority
import org.springframework.security.core.userdetails.UsernameNotFoundException

import sample.ErrorKeys
import sample.context.security._
import sample.util.ConvertUtils

/**
 * SpringSecurityのユーザアクセスコンポーネントを定義します。
 */
@Configuration
class SecurityService {

  /** 一般利用者情報を提供します。(see SecurityActorFinder) */
  @Bean
  @ConditionalOnBean(Array(classOf[SecurityConfigurer]))
  def securityUserService(service: AccountService): SecurityUserService =
    new SecurityUserService {
      def loadUserByUsername(username: String): ActorDetails =
        Option(username).map(ConvertUtils.zenkakuToHan(_)).flatMap(loginId =>
          service.getLoginByLoginId(loginId).flatMap(login =>
            service.getAccount(login.id).map(account =>
              ActorDetails(account.actor, login.password, List(new SimpleGrantedAuthority("ROLE_USER")))
            )
          )
        ).getOrElse(throw new UsernameNotFoundException(ErrorKeys.Login))
    }
  /** 社内管理向けの利用者情報を提供します。(see SecurityActorFinder) */
  @Bean
  @ConditionalOnBean(Array(classOf[SecurityConfigurer]))
  @ConditionalOnProperty(prefix = "extension.security.auth", name = Array("admin"), matchIfMissing = false)
  def securityAdminService(service: MasterAdminService): SecurityAdminService =
    new SecurityAdminService {
      def loadUserByUsername(username: String): ActorDetails =
        Option(username).map(ConvertUtils.zenkakuToHan(_)).flatMap(staffId =>
          service.getStaff(staffId).map(staff =>
            ActorDetails(staff.actor, staff.password,
              service.findStaffAuthority(staffId).map(sa => new SimpleGrantedAuthority(sa.authority))
              :+ new SimpleGrantedAuthority("ROLE_ADMIN"))
          )
        ).getOrElse(throw new UsernameNotFoundException(ErrorKeys.Login))
    }
}


text:
package ast

import (
	"fmt"
	"io"
	"os"
	"strings"
)

// Printer is a visitor to print AST to io.Writer
type Printer struct {
	indent int
	out    io.Writer
}

func (p Printer) VisitTopdown(e Expr) Visitor {
	fmt.Fprintf(p.out, "\n%s%s (%d:%d-%d:%d)", strings.Repeat("-   ", p.indent), e.Name(), e.Pos().Line, e.Pos().Column, e.End().Line, e.End().Column)
	return Printer{p.indent + 1, p.out}
}

func (p Printer) VisitBottomup(Expr) {
	return
}

// Fprint outputs a structure of AST to given io.Writer object
func Fprint(out io.Writer, a *AST) {
	fmt.Fprintf(out, "AST for %s:", a.File().Path)
	p := Printer{1, out}
	for _, t := range a.TypeDecls {
		Visit(p, t)
	}
	for _, e := range a.Externals {
		Visit(p, e)
	}
	Visit(p, a.Root)
}

// Print outputs a structure of AST to stdout.
func Print(a *AST) {
	Fprint(os.Stdout, a)
}

// Println does the same as Print and append newline at the end of output.
func Println(a *AST) {
	Print(a)
	fmt.Println()
}


text:
namespace School.Contracts
{
    public interface IStudent : INameable, IIdentifiable
    {
        bool JoinCourse(ICourse course);

        bool LeaveCourse(ICourse course);
    }
}


text:
Artist Directory

        search:
        <input ng-model="query" placeholder="Search for artists" autofocus>
        by:
            <select ng-model="artistOrder">
                <option value="name">Name</option>
                <option value="reknown">Reknown</option>
            </select>

            <input type="radio" ng-model="direction" name="direction" checked>
            ascending

            <input type="radio" ng-model="direction" name="direction" value="reverse">
            descending

            Details

{{item.name}}

{{item.reknown}}