text:
package com.facebook.buck.android;

import com.facebook.buck.io.ExecutableFinder;
import com.facebook.buck.io.filesystem.ProjectFilesystem;
import com.facebook.buck.shell.ShellStep;
import com.facebook.buck.step.ExecutionContext;
import com.facebook.buck.util.HumanReadableException;
import com.facebook.buck.util.Verbosity;
import com.facebook.buck.util.concurrent.ConcurrencyLimit;
import com.facebook.buck.util.environment.Platform;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Optional;

public class NdkBuildStep extends ShellStep {

  private final ProjectFilesystem filesystem;
  private final Path root;
  private final Path makefile;
  private final Path buildArtifactsDirectory;
  private final Path binDirectory;
  private final ImmutableList<String> flags;
  private final Function<String, String> macroExpander;

  public NdkBuildStep(
      ProjectFilesystem filesystem,
      Path root,
      Path makefile,
      Path buildArtifactsDirectory,
      Path binDirectory,
      Iterable<String> flags,
      Function<String, String> macroExpander) {
    super(filesystem.getRootPath());

    this.filesystem = filesystem;
    this.root = root;
    this.makefile = makefile;
    this.buildArtifactsDirectory = buildArtifactsDirectory;
    this.binDirectory = binDirectory;
    this.flags = ImmutableList.copyOf(flags);
    this.macroExpander = macroExpander;
  }

  @Override
  public String getShortName() {
    return "ndk_build";
  }

  @Override
  protected boolean shouldPrintStderr(Verbosity verbosity) {
    return verbosity.shouldPrintStandardInformation();
  }

  @Override
  protected ImmutableList<String> getShellCommandInternal(ExecutionContext context) {
    Optional<Path> ndkBuild =
        new ExecutableFinder()
            .getOptionalExecutable(
                Paths.get("ndk-build"), context.getAndroidPlatformTarget().checkNdkDirectory());
    if (!ndkBuild.isPresent()) {
      throw new HumanReadableException("Unable to find ndk-build");
    }

    ConcurrencyLimit concurrencyLimit = context.getConcurrencyLimit();

    ImmutableList.Builder<String> builder = ImmutableList.builder();
    builder.add(
        ndkBuild.get().toAbsolutePath().toString(),
        "-j",
        // TODO(dancol): using -j here is wrong.  It lets make run too many work when we do
        // other work in parallel.  Instead, implement the GNU Make job server so make and Buck can
        // coordinate job concurrency.
        Integer.toString(concurrencyLimit.threadLimit),
        "-C",
        this.root.toString());

    Iterable<String> flags = Iterables.transform(this.flags, macroExpander);
    builder.addAll(flags);

    // We want relative, not absolute, paths in the debug-info for binaries we build using
    // ndk_library.  Absolute paths are machine-specific, but relative ones should be the
    // same everywhere.

    Path relativePathToProject = filesystem.resolve(root).relativize(filesystem.getRootPath());
    builder.add(
        "APP_PROJECT_PATH=" + filesystem.resolve(buildArtifactsDirectory) + File.separatorChar,
        "APP_BUILD_SCRIPT=" + filesystem.resolve(makefile),
        "NDK_OUT=" + filesystem.resolve(buildArtifactsDirectory) + File.separatorChar,
        "NDK_LIBS_OUT=" + filesystem.resolve(binDirectory),
        "BUCK_PROJECT_DIR=" + relativePathToProject);

    // Suppress the custom build step messages (e.g. "Compile++ ...").
    if (Platform.detect() == Platform.WINDOWS) {
      builder.add("host-echo-build-step=@REM");
    } else {
      builder.add("host-echo-build-step=@#");
    }

    // If we're running verbosely, force all the subcommands from the ndk build to be printed out.
    if (context.getVerbosity().shouldPrintCommand()) {
      builder.add("V=1");
      // Otherwise, suppress everything, including the "make: entering directory..." messages.
    } else {
      builder.add("--silent");
    }

    return builder.build();
  }
}


text: export default from './SigninPage';

redpajama_set_name: RedPajamaGithub


text:
import { Injectable } from '@angular/core';
/**
 * Provide an API for animating elements with CSS transitions
 */
@Injectable()
export class Animate {
  /**
   * Look up the transition event name for the browser type and cache it.
   */
  eventName: string = this.whichTransitionEvent();

  enter(el: HTMLElement, cssClass: string): Promise<void> {
    return new Promise<void>((resolve) => {
      el.classList.add(cssClass);
      const duration = this.getTransitionDuration(el, true);
      let callTimeout: any;
      const done = () => {
        clearTimeout(callTimeout);
        el.removeEventListener(this.eventName, done);
        resolve();
      };
      callTimeout = setTimeout(() => done(), duration);
      el.addEventListener(this.eventName, done);
    });
  }

  leave(el: HTMLElement, cssClass: string): Promise<void> {
    return new Promise<void>((resolve) => {
      const duration = this.getTransitionDuration(el, true);
      let callTimeout: any;
      const done = () => {
        clearTimeout(callTimeout);
        el.removeEventListener(this.eventName, done);
        resolve();
      };
      callTimeout = setTimeout(() => done(), duration);
      el.addEventListener(this.eventName, done);
      el.classList.remove(cssClass);
    });
  }

  /**
   * Get the duration of any transitions being applied to the given element.
   *
   * Based on: https://gist.github.com/snorpey/5323028
   * @param element The element to query
   * @param includeDelay Include any specified transition-delay value.
   * @returns {number}
   */
  getTransitionDuration(element: HTMLElement, includeDelay: boolean = false) {
    const prefixes = ['moz', 'webkit', 'ms', 'o', 'khtml'];
    const style: any = window.getComputedStyle(element);
    for (let i = 0; i < prefixes.length; i++) {
      let duration = style['-' + prefixes[i] + '-transition-duration'];
      if (!duration) {
        continue;
      }
      duration =
        duration.indexOf('ms') > -1
          ? parseFloat(duration)
          : parseFloat(duration) * 1000;
      if (includeDelay) {
        let delay = style['-' + prefixes[i] + '-transition-delay'];
        if (typeof delay !== 'undefined') {
          duration +=
            delay.indexOf('ms') > -1 ? parseFloat(delay) : parseFloat(delay) * 1000;
        }
      }
      return duration;
    }
    return 0;
  }

  /* From Modernizr */
  whichTransitionEvent(): string {
    let t: string;
    const el: any = document.createElement('fakeelement');
    const transitions: { [prefix: string]: string } = {
      transition: 'transitionend',
      OTransition: 'oTransitionEnd',
      MozTransition: 'transitionend',
      WebkitTransition: 'webkitTransitionEnd',
    };

    for (t in transitions) {
      if (el.style[t] !== undefined) {
        return transitions[t];
      }
    }
    throw new Error('No valid transition event found!');
  }
}


text:
(function () {
  'use strict';

  angular
    .module('guardians')
    .config(routeConfig);

  routeConfig.$inject = ['$stateProvider'];

  function routeConfig($stateProvider) {
    $stateProvider
      .state('guardian', {
        abstract: true,
        url: '/guardian',
        template: '<ui-view/>'
      })
    .state('guardian.view', {
        url: '',
        templateUrl: 'modules/guardians/client/views/view-myguardian.client.view.html',
        controller: 'MyGuardianController',
        controllerAs: 'vm',
        data: {
          pageTitle: 'My Guardian View'
        }
      });
  }
})();


text:
package org.wso2.siddhi.extension.string;

import junit.framework.Assert;
import org.apache.log4j.Logger;
import org.junit.Before;
import org.junit.Test;
import org.wso2.siddhi.core.ExecutionPlanRuntime;
import org.wso2.siddhi.core.SiddhiManager;
import org.wso2.siddhi.core.event.Event;
import org.wso2.siddhi.core.query.output.callback.QueryCallback;
import org.wso2.siddhi.core.stream.input.InputHandler;
import org.wso2.siddhi.core.util.EventPrinter;

public class CoalesceFunctionExtensionTestCase {
    static final Logger log = Logger.getLogger(CoalesceFunctionExtensionTestCase.class);
    private volatile int count;
    private volatile boolean eventArrived;

    @Before
    public void init() {
        count = 0;
        eventArrived = false;
    }

    @Test
    public void testCoalesceFunctionExtension() throws InterruptedException {
        log.info("CoalesceFunctionExtension TestCase");
        SiddhiManager siddhiManager = new SiddhiManager();

        String inStreamDefinition = "@config(async = 'true')define stream inputStream (symbol1 string, symbol2 string, symbol3 string);";
        String query = ("@info(name = 'query1') from inputStream select symbol1 , str:coalesce(symbol1,symbol2,symbol3) as coalescedString " +
                "insert into outputStream;");
        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query);

        executionPlanRuntime.addCallback("query1", new QueryCallback() {
            @Override
            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
                EventPrinter.print(timeStamp, inEvents, removeEvents);
                for (Event event : inEvents) {
                    count++;
                    if (count == 1) {
                        Assert.assertEquals("BBB", event.getData(1));
                        eventArrived = true;
                    }
                    if (count == 2) {
                        Assert.assertEquals("123", event.getData(1));
                        eventArrived = true;
                    }
                    if (count == 3) {
                        Assert.assertEquals("XYZ", event.getData(1));
                        eventArrived = true;
                    }
                    if (count == 4) {
                        Assert.assertEquals(null, event.getData(1));
                        eventArrived = true;
                    }
                }
            }
        });

        InputHandler inputHandler = executionPlanRuntime.getInputHandler("inputStream");
        executionPlanRuntime.start();
        inputHandler.send(new Object[]{null, "BBB", "CCC"});
        inputHandler.send(new Object[]{"123", null, "789"});
        inputHandler.send(new Object[]{null, null, "XYZ"});
        inputHandler.send(new Object[]{null, null, null});
        Thread.sleep(100);
        Assert.assertEquals(4, count);
        Assert.assertTrue(eventArrived);
        executionPlanRuntime.shutdown();
    }
}


text:
exports.mocha = require('./mocha_compiler');
exports.sequence_diagram = require('./sequence_diagram_compiler');
exports.static = require('./static');
exports.stripe = require('./stripe_compiler');
exports.twitter = require('./twitter_compiler.js');
exports.nps = require('./nps_compiler.js');


text:
<!DOCTYPE html>

<link th:replace="common/head :: common_link" />

					<form id="registerForm" class="form-horizontal">

							<input onClick="updateForm();" id="deleteBtn" type="button" class="btn btn-primary btn-sm whenRead" value="更新モードへ"></input>

							<input onClick="deleteKokyaku();" id="deleteBtn" type="button" class="btn btn-primary btn-sm whenRead" value="削除"></input>

顧客情報

							顧客コード

								<input class="form-control code whenRegister" th:field="${form.code}" id="code" name="code" type="text" />

							顧客名

								<input class="form-control required whenRegister whenUpdate" id="name" name="name" type="text" th:field="${form.name}" />

							顧客住所

								<input class="form-control required whenRegister whenUpdate" id="address" name="address" type="text"  th:field="${form.address}"/>

							顧客区分

								<select class="form-control selectCheck whenRegister whenUpdate" id="kokyakuKubun" name="kokyakuKubun"
									th:include='common/kubunOption :: option(kubunName=KokyakuKubun, selected=${form.kokyakuKubun})' />

							販売区分

								<select class="form-control selectCheck whenRegister whenUpdate" id="hanbaiKubun" name="hanbaiKubun"
									th:include='common/kubunOption :: option(kubunName=HanbaiKubun, selected=${form.hanbaiKubun})' />

部署情報

							主幹部署

								<select class="form-control selectCheck whenRegister whenUpdate" id="shukanBushoCode" name="shukanBushoCode">
									<option value="">選択してください</option>
									<option th:each="busho : ${bushoList}" th:value="${busho.code}" th:text='${busho.name}'
										th:selected="${busho.code.equals('__${form.shukanBushoCode}__')}" />
								</select>

請求情報

								請求締日

									<select class="form-control whenRegister whenUpdate" id="shimebi" name="shimebi">
										<option value="">選択してください</option>
										<option th:each="shimebi : ${shimebiList}" th:value="${shimebi}" th:text='${shimebi}'
											th:selected="${shimebi.equals(__${form.shimebi}__)}" />
									</select>

							入金方法

						      	<select class="form-control whenRegister whenUpdate" id="nyukinHohoKubun" name="nyukinHohoKubun"
									th:include='common/kubunOption :: option(kubunName=NyukinHohoKubun, selected=${form.nyukinHohoKubun})' />

							入金月区分

						    	<select class="form-control whenRegister whenUpdate" id="nyukinTsukiKubun" name="nyukinTsukiKubun"
									th:include='common/kubunOption :: option(kubunName=NyukinTsukiKubun, selected=${form.nyukinTsukiKubun})' />

							入金日

								<input class="form-control nyukinDate whenRegister whenUpdate" id="nyukinDate" name="nyukinDate" type="text"  th:field="${form.nyukinDate}"/>

								入金サイト

					    <input type="hidden" name="kokyakuVersion" th:value="${form.kokyakuVersion}" />
					    <input type="hidden" name="nyukinKakeInfoVersion" th:value="${form.nyukinKakeInfoVersion}" />
					    <input type="hidden" name="kokyakuRecordId" th:value="${form.kokyakuRecordId}" />
					    <input type="hidden" name="nyukinKakeInfoRecordId" th:value="${form.nyukinKakeInfoRecordId}" />

								<input onClick="register();" id="registerBtn" type="button" class="btn btn-primary btn-sm whenRegister" value="登録"></input>

								<input onClick="update();" id="updateBtn" type="button" class="btn btn-primary btn-sm whenUpdate" value="更新"></input>

					</form>