text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/batch/v1/volume.proto

namespace Google\Cloud\Batch\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Volume and mount parameters to be associated with a TaskSpec. A TaskSpec
 * might describe zero, one, or multiple volumes to be mounted as part of the
 * task.
 *
 * Generated from protobuf message google.cloud.batch.v1.Volume
 */
class Volume extends \Google\Protobuf\Internal\Message
{
    /**
     * Mount path for the volume, e.g. /mnt/share
     *
     * Generated from protobuf field string mount_path = 4;
     */
    private $mount_path = '';
    /**
     * Mount options
     * For Google Cloud Storage, mount options are the global options supported by
     * gcsfuse tool. Batch will use them to mount the volume with the following
     * command:
     * "gcsfuse [global options] bucket mountpoint".
     * For PD, NFS, mount options are these supported by /etc/fstab. Batch will
     * use Fstab to mount such volumes.
     * https://help.ubuntu.com/community/Fstab
     *
     * Generated from protobuf field repeated string mount_options = 5;
     */
    private $mount_options;
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Batch\V1\NFS $nfs
     *           An NFS source for the volume (could be a Filestore, for example).
     *     @type \Google\Cloud\Batch\V1\GCS $gcs
     *           A Google Cloud Storage source for the volume.
     *     @type string $device_name
     *           Device name of an attached disk
     *     @type string $mount_path
     *           Mount path for the volume, e.g. /mnt/share
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $mount_options
     *           Mount options
     *           For Google Cloud Storage, mount options are the global options supported by
     *           gcsfuse tool. Batch will use them to mount the volume with the following
     *           command:
     *           "gcsfuse [global options] bucket mountpoint".
     *           For PD, NFS, mount options are these supported by /etc/fstab. Batch will
     *           use Fstab to mount such volumes.
     *           https://help.ubuntu.com/community/Fstab
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce();
        parent::__construct($data);
    }

    /**
     * An NFS source for the volume (could be a Filestore, for example).
     *
     * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1;
     * @return \Google\Cloud\Batch\V1\NFS|null
     */
    public function getNfs()
    {
        return $this->readOneof(1);
    }

    public function hasNfs()
    {
        return $this->hasOneof(1);
    }

    /**
     * An NFS source for the volume (could be a Filestore, for example).
     *
     * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1;
     * @param \Google\Cloud\Batch\V1\NFS $var
     * @return $this
     */
    public function setNfs($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\NFS::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * A Google Cloud Storage source for the volume.
     *
     * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3;
     * @return \Google\Cloud\Batch\V1\GCS|null
     */
    public function getGcs()
    {
        return $this->readOneof(3);
    }

    public function hasGcs()
    {
        return $this->hasOneof(3);
    }

    /**
     * A Google Cloud Storage source for the volume.
     *
     * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3;
     * @param \Google\Cloud\Batch\V1\GCS $var
     * @return $this
     */
    public function setGcs($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\GCS::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Device name of an attached disk
     *
     * Generated from protobuf field string device_name = 6;
     * @return string
     */
    public function getDeviceName()
    {
        return $this->readOneof(6);
    }

    public function hasDeviceName()
    {
        return $this->hasOneof(6);
    }

    /**
     * Device name of an attached disk
     *
     * Generated from protobuf field string device_name = 6;
     * @param string $var
     * @return $this
     */
    public function setDeviceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Mount path for the volume, e.g. /mnt/share
     *
     * Generated from protobuf field string mount_path = 4;
     * @return string
     */
    public function getMountPath()
    {
        return $this->mount_path;
    }

    /**
     * Mount path for the volume, e.g. /mnt/share
     *
     * Generated from protobuf field string mount_path = 4;
     * @param string $var
     * @return $this
     */
    public function setMountPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->mount_path = $var;

        return $this;
    }

    /**
     * Mount options
     * For Google Cloud Storage, mount options are the global options supported by
     * gcsfuse tool. Batch will use them to mount the volume with the following
     * command:
     * "gcsfuse [global options] bucket mountpoint".
     * For PD, NFS, mount options are these supported by /etc/fstab. Batch will
     * use Fstab to mount such volumes.
     * https://help.ubuntu.com/community/Fstab
     *
     * Generated from protobuf field repeated string mount_options = 5;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMountOptions()
    {
        return $this->mount_options;
    }

    /**
     * Mount options
     * For Google Cloud Storage, mount options are the global options supported by
     * gcsfuse tool. Batch will use them to mount the volume with the following
     * command:
     * "gcsfuse [global options] bucket mountpoint".
     * For PD, NFS, mount options are these supported by /etc/fstab. Batch will
     * use Fstab to mount such volumes.
     * https://help.ubuntu.com/community/Fstab
     *
     * Generated from protobuf field repeated string mount_options = 5;
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMountOptions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->mount_options = $arr;

        return $this;
    }

    /**
     * @return string
     */
    public function getSource()
    {
        return $this->whichOneof("source");
    }

}


text:
"""
Git helper command to make sparse checkouts easier.

Usage:
$ cd <git-repository>
$ git sparse                         # opens 'sparse-checkout' file for edit
$ git sparse add <path1> <path2> ... # add <path1>...<pathn> (alternative to 'git sparse')
$ git sparse update                  # update the working tree to show paths

Example workflow when cloning a new repo:
$ git clone -b <branch> -n --depth=1 <repo-url>  # shallow clone of one branch (no history)
$ cd <repo>
$ git sparse add <path1> <path2> ... <pathn>
$ git sparse update

Note:
- To see the whole repository again, add "/*" to the sparse-checkout-file and run "git sparse update".
- To change the default editor, set the $EDITOR environmental variable, e.g.:
  $ export EDITOR=nano
"""
from __future__ import print_function

import sys
import os

from subprocess import (check_output, call,
                        CalledProcessError)

def issparse():
    """Check if git repsitory is configured for sparse checkouts."""
    gitconf = check_output(['git', 'config', '--list'])
    if 'sparsecheckout=true' in gitconf.lower():
        return True
    else:
        return False

def make_sparse(gitpath):
    """Configure git repository at <gitpath> to accept
    sparse checkouts."""
    if not issparse():
        print('Sparse checkout not active.')
        print('Setting core.sparseCheckout to true...')
        call(['git', 'config',
              'core.sparseCheckout', 'true'])

def touch_checkout_file(gitpath):
    """Check that path and sparse-checkout file exist, otherwise create it."""
    infopath = gitpath + '/.git/info'
    if not os.path.exists(infopath):
        try:
            os.makedirs(infopath)
        except OSError as e:
            if e.errno != errno.EEXIST:
                raise
    open(infopath + '/sparse-checkout', 'a').close()

def edit(filename):
    """Open <filename> in default text editor.

    Opens either the editor defined by the
    $EDITOR environmental variable, or if not defined,
    the OS-defined preferred editor."""
    try:
        call([os.environ['EDITOR'], filename])
    except KeyError:
        call(['xdg-open', filename])

def open_checkout_file(gitpath):
    """Open sparse-checkout-file for repo at <gitpath>
    using preferred text editor."""
    print("Opening text editor... ")
    print("Add paths to checkout, then save and close.")
    touch_checkout_file(gitpath) # in case no file
    edit(gitpath + '/.git/info/sparse-checkout')

def update_worktree():
    """Update worktree according to content in sparse-checkout file."""
    call(['git', 'read-tree', '-mu', 'HEAD'])

def add_sparse(gitpath, path):
    """Write <path> to sparse-checkout-file in repo at <gitpath>."""
    with open(gitpath + '/.git/info/sparse-checkout', 'a') as f:
        print(path, file=f)

def gitroot():
    """Return root path of current git repository."""
    try:
        root = check_output(['git', 'rev-parse',
                                '--show-toplevel']).strip()
    except CalledProcessError:
        # "git sparse" called outside git repository
        print(__doc__)
        sys.exit(0)
    return root

def main():
    msg_to_update = ('Run "git sparse update" to see changes.')
    gitpath = gitroot()
    arguments = sys.argv
    try:
        if arguments[1] == 'update':
            update_worktree()
        elif arguments[1] == 'add':
            make_sparse(gitpath)
            touch_checkout_file(gitpath)
            for path in arguments[2:]:
                add_sparse(gitpath, path)
            print('Done!')
            print(msg_to_update)
        elif arguments[1] == 'help' or len(arguments) > 1:
            # help or argument not recognized
            print(__doc__)
    except IndexError: # "git sparse" called with no arguments.
        make_sparse(gitpath)
        open_checkout_file(gitpath)
        print(msg_to_update)

if __name__ == '__main__':
    main()

redpajama_set_name: RedPajamaGithub


text:
#include "config.h"
#include "JSNode.h"

#include "Attr.h"
#include "CDATASection.h"
#include "Comment.h"
#include "Document.h"
#include "DocumentFragment.h"
#include "DocumentType.h"
#include "Entity.h"
#include "EntityReference.h"
#include "ExceptionCode.h"
#include "HTMLAudioElement.h"
#include "HTMLCanvasElement.h"
#include "HTMLElement.h"
#include "HTMLFrameElementBase.h"
#include "HTMLImageElement.h"
#include "HTMLLinkElement.h"
#include "HTMLNames.h"
#include "HTMLScriptElement.h"
#include "HTMLStyleElement.h"
#include "JSAttr.h"
#include "JSCDATASection.h"
#include "JSComment.h"
#include "JSDOMBinding.h"
#include "JSDocument.h"
#include "JSDocumentFragment.h"
#include "JSDocumentType.h"
#include "JSEntity.h"
#include "JSEntityReference.h"
#include "JSEventListener.h"
#include "JSHTMLElement.h"
#include "JSHTMLElementWrapperFactory.h"
#include "JSNotation.h"
#include "JSProcessingInstruction.h"
#include "JSText.h"
#include "Node.h"
#include "Notation.h"
#include "ProcessingInstruction.h"
#include "RegisteredEventListener.h"
#include "ShadowRoot.h"
#include "StyleSheet.h"
#include "StyledElement.h"
#include "Text.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>

#if ENABLE(SVG)
#include "JSSVGElementWrapperFactory.h"
#include "SVGElement.h"
#endif

using namespace JSC;

namespace WebCore {

using namespace HTMLNames;

static inline bool isObservable(JSNode* jsNode, Node* node)
{
    // The root node keeps the tree intact.
    if (!node->parentNode())
        return true;

    if (jsNode->hasCustomProperties())
        return true;

    // A node's JS wrapper is responsible for marking its JS event listeners.
    if (node->hasEventListeners())
        return true;

    return false;
}

static inline bool isReachableFromDOM(JSNode* jsNode, Node* node, SlotVisitor& visitor)
{
    if (!node->inDocument()) {
        // If a wrapper is the last reference to an image element
        // that is loading but not in the document, the wrapper is observable
        // because it is the only thing keeping the image element alive, and if
        // the element is destroyed, its load event will not fire.
        // FIXME: The DOM should manage this issue without the help of JavaScript wrappers.
        if (isHTMLImageElement(node)) {
            if (toHTMLImageElement(node)->hasPendingActivity())
                return true;
        }
    #if ENABLE(VIDEO)
        else if (isHTMLAudioElement(node)) {
            if (!toHTMLAudioElement(node)->paused())
                return true;
        }
    #endif

        // If a node is firing event listeners, its wrapper is observable because
        // its wrapper is responsible for marking those event listeners.
        if (node->isFiringEventListeners())
            return true;
    }

    return isObservable(jsNode, node) && visitor.containsOpaqueRoot(root(node));
}

bool JSNodeOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
    JSNode* jsNode = jsCast<JSNode*>(handle.get().asCell());
    return isReachableFromDOM(jsNode, jsNode->impl(), visitor);
}

void JSNodeOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
    JSNode* jsNode = static_cast<JSNode*>(handle.get().asCell());
    DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
    uncacheWrapper(world, jsNode->impl(), jsNode);
    jsNode->releaseImpl();
}

JSValue JSNode::insertBefore(ExecState* exec)
{
    Node* imp = static_cast<Node*>(impl());
    ExceptionCode ec = 0;
    bool ok = imp->insertBefore(toNode(exec->argument(0)), toNode(exec->argument(1)), ec, AttachLazily);
    setDOMException(exec, ec);
    if (ok)
        return exec->argument(0);
    return jsNull();
}

JSValue JSNode::replaceChild(ExecState* exec)
{
    Node* imp = static_cast<Node*>(impl());
    ExceptionCode ec = 0;
    bool ok = imp->replaceChild(toNode(exec->argument(0)), toNode(exec->argument(1)), ec, AttachLazily);
    setDOMException(exec, ec);
    if (ok)
        return exec->argument(1);
    return jsNull();
}

JSValue JSNode::removeChild(ExecState* exec)
{
    Node* imp = static_cast<Node*>(impl());
    ExceptionCode ec = 0;
    bool ok = imp->removeChild(toNode(exec->argument(0)), ec);
    setDOMException(exec, ec);
    if (ok)
        return exec->argument(0);
    return jsNull();
}

JSValue JSNode::appendChild(ExecState* exec)
{
    Node* imp = static_cast<Node*>(impl());
    ExceptionCode ec = 0;
    bool ok = imp->appendChild(toNode(exec->argument(0)), ec, AttachLazily);
    setDOMException(exec, ec);
    if (ok)
        return exec->argument(0);
    return jsNull();
}

JSScope* JSNode::pushEventHandlerScope(ExecState* exec, JSScope* node) const
{
    if (inherits(JSHTMLElement::info()))
        return jsCast<const JSHTMLElement*>(this)->pushEventHandlerScope(exec, node);
    return node;
}

void JSNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
    JSNode* thisObject = jsCast<JSNode*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
    ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
    Base::visitChildren(thisObject, visitor);

    Node* node = thisObject->impl();
    node->visitJSEventListeners(visitor);

    visitor.addOpaqueRoot(root(node));
}

static ALWAYS_INLINE JSValue createWrapperInline(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
{
    ASSERT(node);
    ASSERT(!getCachedWrapper(currentWorld(exec), node));

    JSDOMWrapper* wrapper;
    switch (node->nodeType()) {
        case Node::ELEMENT_NODE:
            if (node->isHTMLElement())
                wrapper = createJSHTMLWrapper(exec, globalObject, toHTMLElement(node));
#if ENABLE(SVG)
            else if (node->isSVGElement())
                wrapper = createJSSVGWrapper(exec, globalObject, toSVGElement(node));
#endif
            else
                wrapper = CREATE_DOM_WRAPPER(exec, globalObject, Element, node);
            break;
        case Node::ATTRIBUTE_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, Attr, node);
            break;
        case Node::TEXT_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, Text, node);
            break;
        case Node::CDATA_SECTION_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, CDATASection, node);
            break;
        case Node::ENTITY_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, Entity, node);
            break;
        case Node::PROCESSING_INSTRUCTION_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, ProcessingInstruction, node);
            break;
        case Node::COMMENT_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, Comment, node);
            break;
        case Node::DOCUMENT_NODE:
            // we don't want to cache the document itself in the per-document dictionary
            return toJS(exec, globalObject, toDocument(node));
        case Node::DOCUMENT_TYPE_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, DocumentType, node);
            break;
        case Node::NOTATION_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, Notation, node);
            break;
        case Node::DOCUMENT_FRAGMENT_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, DocumentFragment, node);
            break;
        case Node::ENTITY_REFERENCE_NODE:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, EntityReference, node);
            break;
        default:
            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, Node, node);
    }

    return wrapper;
}

JSValue createWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
{
    return createWrapperInline(exec, globalObject, node);
}

JSValue toJSNewlyCreated(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
{
    if (!node)
        return jsNull();

    return createWrapperInline(exec, globalObject, node);
}

void willCreatePossiblyOrphanedTreeByRemovalSlowCase(Node* root)
{
    JSC::ExecState* scriptState = mainWorldExecState(root->document().frame());
    if (!scriptState)
        return;

    JSLockHolder lock(scriptState);
    toJS(scriptState, static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject()), root);
}

} // namespace WebCore


text:
package ibis.constellation;

import org.junit.Test;
import static org.junit.Assert.assertEquals;

/**
 * @version 1.0
 * @since 1.0
 *
 */
public class ConstellationCreationExceptionTest {

    @Test
    public void testConstructor1() {
        String message = "Hello World";
        ConstellationCreationException e = new ConstellationCreationException(message);
        assertEquals(e.getMessage(), message);
    }

    @Test
    public void testConstructor2() {
        String message = "Hello World";
        Exception ex = new Exception("bla");
        ConstellationCreationException e = new ConstellationCreationException(message, ex);
        assertEquals(e.getMessage(), message);
    }

    @Test
    public void testConstructor3() {
        String message = "Hello World";
        Exception ex = new Exception("bla");
        ConstellationCreationException e = new ConstellationCreationException(message, ex);
        assertEquals(e.getCause(), ex);
    }
}


text: export { default } from 'ember-fhir/models/value-set-parameter';


text:
WebPage::WebPage(WebPageManager *manager, QObject *parent) : QWebPage(parent) {
  m_loading = false;
  m_failed = false;
  m_manager = manager;
  m_uuid = QUuid::createUuid().toString();

  setForwardUnsupportedContent(true);
  loadJavascript();
  setUserStylesheet();

  m_confirm = true;
  m_prompt = false;
  m_prompt_text = QString();
  this->setCustomNetworkAccessManager();

  connect(this, SIGNAL(loadStarted()), this, SLOT(loadStarted()));
  connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool)));
  connect(this, SIGNAL(frameCreated(QWebFrame *)),
          this, SLOT(frameCreated(QWebFrame *)));
  connect(this, SIGNAL(unsupportedContent(QNetworkReply*)),
      this, SLOT(handleUnsupportedContent(QNetworkReply*)));
  resetWindowSize();

  settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
}

void WebPage::resetWindowSize() {
  this->setViewportSize(QSize(1680, 1050));
  this->settings()->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true);
}

void WebPage::resetLocalStorage() {
  this->currentFrame()->evaluateJavaScript("localStorage.clear()");
}

void WebPage::setCustomNetworkAccessManager() {
  setNetworkAccessManager(m_manager->networkAccessManager());
  connect(networkAccessManager(), SIGNAL(sslErrors(QNetworkReply *, QList<QSslError>)),
          SLOT(handleSslErrorsForReply(QNetworkReply *, QList<QSslError>)));
  connect(networkAccessManager(), SIGNAL(requestCreated(QByteArray &, QNetworkReply *)),
          SIGNAL(requestCreated(QByteArray &, QNetworkReply *)));
  connect(networkAccessManager(), SIGNAL(finished(QUrl &, QNetworkReply *)),
          SLOT(replyFinished(QUrl &, QNetworkReply *)));
}

void WebPage::replyFinished(QUrl &requestedUrl, QNetworkReply *reply) {
  NetworkReplyProxy *proxy = qobject_cast<NetworkReplyProxy *>(reply);
  setFrameProperties(mainFrame(), requestedUrl, proxy);
  foreach(QWebFrame *frame, mainFrame()->childFrames())
    setFrameProperties(frame, requestedUrl, proxy);
}

void WebPage::setFrameProperties(QWebFrame *frame, QUrl &requestedUrl, NetworkReplyProxy *reply) {
  if (frame->requestedUrl() == requestedUrl) {
    int statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
    frame->setProperty("statusCode", statusCode);
    QStringList headers;
    foreach(QNetworkReply::RawHeaderPair header, reply->rawHeaderPairs())
      headers << header.first+": "+header.second;
    frame->setProperty("headers", headers);
    frame->setProperty("body", reply->data());
    QVariant contentMimeType = reply->header(QNetworkRequest::ContentTypeHeader);
    frame->setProperty("contentType", contentMimeType);
  }
}

void WebPage::unsupportedContentFinishedReply(QNetworkReply *reply) {
  m_manager->replyFinished(reply);
}

void WebPage::loadJavascript() {
  QResource javascript(":/capybara.js");
  if (javascript.isCompressed()) {
    QByteArray uncompressedBytes(qUncompress(javascript.data(), javascript.size()));
    m_capybaraJavascript = QString(uncompressedBytes);
  } else {
    char * javascriptString =  new char[javascript.size() + 1];
    strcpy(javascriptString, (const char *)javascript.data());
    javascriptString[javascript.size()] = 0;
    m_capybaraJavascript = javascriptString;
  }
}

void WebPage::setUserStylesheet() {
  QString data = QString("*, :before, :after { font-family: 'Arial' ! important; }").toUtf8().toBase64();
  QUrl url = QUrl(QString("data:text/css;charset=utf-8;base64,") + data);
  settings()->setUserStyleSheetUrl(url);
}

QString WebPage::userAgentForUrl(const QUrl &url ) const {
  if (!m_userAgent.isEmpty()) {
    return m_userAgent;
  } else {
    return QWebPage::userAgentForUrl(url);
  }
}

QVariantList WebPage::consoleMessages() {
  return m_consoleMessages;
}

QVariantList WebPage::alertMessages() {
  return m_alertMessages;
}

QVariantList WebPage::confirmMessages() {
  return m_confirmMessages;
}

QVariantList WebPage::promptMessages() {
  return m_promptMessages;
}

void WebPage::setUserAgent(QString userAgent) {
  m_userAgent = userAgent;
}

void WebPage::frameCreated(QWebFrame * frame) {
  connect(frame, SIGNAL(javaScriptWindowObjectCleared()),
          this,  SLOT(injectJavascriptHelpers()));
}

void WebPage::injectJavascriptHelpers() {
  QWebFrame* frame = qobject_cast<QWebFrame *>(QObject::sender());
  frame->evaluateJavaScript(m_capybaraJavascript);
}

bool WebPage::shouldInterruptJavaScript() {
  return false;
}

InvocationResult WebPage::invokeCapybaraFunction(const char *name, bool allowUnattached, const QStringList &arguments) {
  QString qname(name);
  JavascriptInvocation invocation(qname, allowUnattached, arguments, this);
  return invocation.invoke(currentFrame());
}

InvocationResult WebPage::invokeCapybaraFunction(QString &name, bool allowUnattached, const QStringList &arguments) {
  return invokeCapybaraFunction(name.toLatin1().data(), allowUnattached, arguments);
}

void WebPage::javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID) {
  QVariantMap m;
  m["message"] = message;
  QString fullMessage = QString(message);
  if (!sourceID.isEmpty()) {
    fullMessage = sourceID + "|" + QString::number(lineNumber) + "|" + fullMessage;
    m["source"] = sourceID;
    m["line_number"] = lineNumber;
  }
  m_consoleMessages.append(m);
  m_manager->logger() << qPrintable(fullMessage);
}

void WebPage::javaScriptAlert(QWebFrame *frame, const QString &message) {
  Q_UNUSED(frame);
  m_alertMessages.append(message);
  m_manager->logger() << "ALERT:" << qPrintable(message);
}

bool WebPage::javaScriptConfirm(QWebFrame *frame, const QString &message) {
  Q_UNUSED(frame);
  m_confirmMessages.append(message);
  return m_confirm;
}

bool WebPage::javaScriptPrompt(QWebFrame *frame, const QString &message, const QString &defaultValue, QString *result) {
  Q_UNUSED(frame)
  m_promptMessages.append(message);
  if (m_prompt) {
    if (m_prompt_text.isNull()) {
      *result = defaultValue;
    } else {
      *result = m_prompt_text;
    }
  }
  return m_prompt;
}

void WebPage::loadStarted() {
  m_loading = true;
  m_errorPageMessage = QString();
}

void WebPage::loadFinished(bool success) {
  Q_UNUSED(success);
  m_loading = false;
  emit pageFinished(!m_failed);
  m_failed = false;
}

bool WebPage::isLoading() const {
  return m_loading;
}

QString WebPage::failureString() {
  QString message = QString("Unable to load URL: ") + currentFrame()->requestedUrl().toString();
  if (m_errorPageMessage.isEmpty())
    return message;
  else
    return message + m_errorPageMessage;
}

void WebPage::mouseEvent(QEvent::Type type, const QPoint &position, Qt::MouseButton button) {
  m_mousePosition = position;
  QMouseEvent event(type, position, button, button, Qt::NoModifier);
  QApplication::sendEvent(this, &event);
}

bool WebPage::clickTest(QWebElement element, int absoluteX, int absoluteY) {
  QPoint mousePos(absoluteX, absoluteY);
  m_mousePosition = mousePos;
  QWebHitTestResult res = mainFrame()->hitTestContent(mousePos);
  return res.frame() == element.webFrame();
}

bool WebPage::render(const QString &fileName, const QSize &minimumSize) {
  QFileInfo fileInfo(fileName);
  QDir dir;
  dir.mkpath(fileInfo.absolutePath());

  QSize viewportSize = this->viewportSize();
  this->setViewportSize(minimumSize);
  QSize pageSize = this->mainFrame()->contentsSize();
  if (pageSize.isEmpty()) {
    return false;
  }

  QImage buffer(pageSize, QImage::Format_ARGB32);
  buffer.fill(qRgba(255, 255, 255, 0));

  QPainter p(&buffer);
  p.setRenderHint( QPainter::Antialiasing,          true);
  p.setRenderHint( QPainter::TextAntialiasing,      true);
  p.setRenderHint( QPainter::SmoothPixmapTransform, true);

  this->setViewportSize(pageSize);
  this->mainFrame()->render(&p);

  //QImage pointer = QImage(":/pointer.png");
  //p.drawImage(m_mousePosition, pointer);

  p.end();
  this->setViewportSize(viewportSize);

  return buffer.save(fileName);
}

QString WebPage::chooseFile(QWebFrame *parentFrame, const QString &suggestedFile) {
  Q_UNUSED(parentFrame);
  Q_UNUSED(suggestedFile);

  return getAttachedFileNames().first();
}

bool WebPage::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output) {
  if (extension == ChooseMultipleFilesExtension) {
    static_cast<ChooseMultipleFilesExtensionReturn*>(output)->fileNames = getAttachedFileNames();
    return true;
  }
  else if (extension == QWebPage::ErrorPageExtension) {
    ErrorPageExtensionOption *errorOption = (ErrorPageExtensionOption*) option;
    m_errorPageMessage = " because of error loading " + errorOption->url.toString() + ": " + errorOption->errorString;
    m_failed = true;
    return false;
  }
  return false;
}

QStringList WebPage::getAttachedFileNames() {
  return currentFrame()->evaluateJavaScript(QString("Capybara.attachedFiles")).toStringList();
}

void WebPage::handleSslErrorsForReply(QNetworkReply *reply, const QList<QSslError> &errors) {
  Q_UNUSED(errors);
  if (m_manager->ignoreSslErrors())
    reply->ignoreSslErrors();
}

void WebPage::setSkipImageLoading(bool skip) {
  settings()->setAttribute(QWebSettings::AutoLoadImages, !skip);
}

int WebPage::getLastStatus() {
  return currentFrame()->property("statusCode").toInt();
}

QStringList WebPage::pageHeaders() {
  return currentFrame()->property("headers").toStringList();
}

QByteArray WebPage::body() {
  return currentFrame()->property("body").toByteArray();
}

QString WebPage::contentType() {
  return currentFrame()->property("contentType").toString();
}

void WebPage::handleUnsupportedContent(QNetworkReply *reply) {
  QVariant contentMimeType = reply->header(QNetworkRequest::ContentTypeHeader);
  if(!contentMimeType.isNull()) {
    triggerAction(QWebPage::Stop);
    UnsupportedContentHandler *handler = new UnsupportedContentHandler(this, reply);
    if (reply->isFinished())
      handler->renderNonHtmlContent();
    else
      handler->waitForReplyToFinish();
  }
}

bool WebPage::supportsExtension(Extension extension) const {
  if (extension == ErrorPageExtension)
    return true;
  else if (extension == ChooseMultipleFilesExtension)
    return true;
  else
    return false;
}

QWebPage *WebPage::createWindow(WebWindowType type) {
  Q_UNUSED(type);
  return m_manager->createPage(this);
}

QString WebPage::uuid() {
  return m_uuid;
}

QString WebPage::getWindowName() {
  QVariant windowName = mainFrame()->evaluateJavaScript("window.name");

  if (windowName.isValid())
    return windowName.toString();
  else
    return "";
}

bool WebPage::matchesWindowSelector(QString selector) {
  return (selector == getWindowName()           ||
      selector == mainFrame()->title()          ||
      selector == mainFrame()->url().toString() ||
      selector == uuid());
}

void WebPage::setFocus() {
  m_manager->setCurrentPage(this);
}

void WebPage::setConfirmAction(QString action) {
  m_confirm = (action == "Yes");
}

void WebPage::setPromptAction(QString action) {
  m_prompt = (action == "Yes");
}

void WebPage::setPromptText(QString text) {
  m_prompt_text = text;
}


text:
Name: PSNotes

Version: 0.2

Author: Kevin Doblosky (kdoblosky@gmail.com)

Source: https://github.com/kdoblosky/PSNotes

Last Updated: 2014-02-19

Note-taking utility for PowerShell.

I have a lot of projects that I'm juggling at any given time, and typically have at least one text file to contain notes for each. Opening up the correct file in Notepad++ takes too long, and using the built-in Add-Content and Get-Contents require retrieving the full path each time. I wanted a simpler solution.

This allows you to define any number of text files (referred to as notebooks in this project), and assign aliases to them. Once defined, date-stamped notes can easily be added, and the contents retrieved.

Includes several functions, aliases and variables.

Functions include:

- Get-Notebooks (alias nbs) - this will list all defined notebook aliases and paths
- Add-Notebook (alias anb) - this adds a new notebook and alias
- Get-Notes (alias gn) - retrieves the notes from a single notebook
- Add-NewNote (alias note) - Adds a date-stamped note to the specified notebook, optionally creating a new one
- Open-Notebook (alias onb) - Opens a notebook in a text editor. If the alias npp is defined, will use the editor that is an alias to, otherwise will use notepad.

Variables:
- $DefaultNotePath - specified where to create new notebooks, if a path is not provided.
- $NoteBookList - path to where list of notebooks is stored. The list is stored to disk as json.

Usage:

Dot-source PSNotes.ps1, or include its contents in your $profile.

```
# Create notebook list - assumes that $NoteBookList is set to a valid path.
# The file it points to doesn't need to exist yet, but the current user must
# have rights to create a file there:
$ > Get-Notebooks -Force

# Add a new notebook, with an alias of ABC:
$ > Add-Notebook -Alias ABC -NotebookPath D:\Scratch\ABC.txt

# Or, more compactly:
$ > anb ABC D:\Scratch\ABC.txt

# Add a note to ABC notebook:
$ > Add-NewNote -Notebook ABC -Note "Plan to take over the world is now 90% complete"

# Or, more compactly:
$ > note ABC "Plan to take over the world is now 90% complete"

# Create a new notebook in the default location, and add a note to it in one step:
$ > Add-NewNote -Notebook "DEF" -Note "My plan encountered an unexpected obstacle - ceiling fans." -Force

# Or, more compactly:
$ > note DEF "My plan encountered an unexpected obstacle - ceiling fans." -Force

# List all notebooks:
$> Get-Notebooks

Name                           Value
----                           -----
ABC                            D:\Scratch\ABC.txt
DEF                            D:\Notes\DEF.txt

# Get contents of notebook ABC:
$ > Get-Notes -Notebook ABC

# Or, more compactly:
$ > gn ABC
2014-02-18 - Plan to take over the world is now 90% complete

# Open notebook in editor
$ > onb ABC
```


text:
Build the tool with `npm run build`

The npm output will be written to `./dist`


text:
int main(int argc, char **argv)
{
	log4cpp::OstreamAppender *osAppender =
		new log4cpp::OstreamAppender("osAppender", &std::cout);
	osAppender->setLayout(new log4cpp::BasicLayout());

	log4cpp::Category& root = log4cpp::Category::getRoot();
	root.addAppender(osAppender);
	root.setPriority(log4cpp::Priority::CRIT);
	//root.setPriority(log4cpp::Priority::DEBUG);

	root.error("Hello log4cpp in a Error Message!");
	root.warn("Hello log4cpp in a Warning Message!");
	root.crit("Hello log4cpp in a CRIT Message!"); //Priority 低的信息不回输出来

	log4cpp::Category::shutdown();

	return 0;
}


text:
<?php

	class PageController{

		public function __construct(){

		}

	}


text:
package de.hub.cs.dbis.aeolus.testUtils;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

import backtype.storm.spout.ISpoutOutputCollector;

/**
 * @author mjsax
 */
public class TestSpoutOutputCollector implements ISpoutOutputCollector {
	public HashMap<String, LinkedList<List<Object>>> output = new HashMap<String, LinkedList<List<Object>>>();

	@Override
	public void reportError(Throwable error) {
		// empty
	}

	@Override
	public List<Integer> emit(String streamId, List<Object> tuple, Object messageId) {
		LinkedList<List<Object>> stream = this.output.get(streamId);
		if(stream == null) {
			stream = new LinkedList<List<Object>>();
			this.output.put(streamId, stream);
		}
		stream.add(tuple);
		return null;
	}

	@Override
	// TODO
	public void emitDirect(int taskId, String streamId, List<Object> tuple, Object messageId) {
		throw new UnsupportedOperationException("Not implemented yet.");
	}

	// @Override
	// public long getPendingCount() {
	// return 0;
	// }
	//
}


text:
namespace omaha {

// The cup credentials are persisted across sessions. The sk is encrypted
// while on the disk so only a user with the same login credentials as
// the encryptor can decrypt it. The credentials are protected
// using the system default security, so users can't modify each other's
// credentials. In case of elevated administrators, the credentials are
// protected from the non-elevated administrators, so the latter can't
// read the keys and attack the elevated administrator.
//
// Cup credentials can be negotiated using either production keys or
// test keys. There is a registry value override to specify that test keys
// be used. For the change to be effective, the old credentials must be cleared.
struct CupCredentials {
  std::vector<uint8> sk;             // shared key (sk)
  CStringA c;                        // client cookie (c)
};

namespace detail {

// The implementation uses the pimpl idiom or bridge design pattern to
// encapsulate the cup protocol implementation details from the calling code.
class CupRequestImpl;

}   // namespace detail

class CupRequest : public HttpRequestInterface {
 public:
  // Decorates an HttpRequestInterface to provide CUP functionality.
  // It takes ownership of the object provided as parameter.
  explicit CupRequest(HttpRequestInterface* http_request);

  virtual ~CupRequest();

  virtual HRESULT Close();

  virtual HRESULT Send();

  virtual HRESULT Cancel();

  virtual std::vector<uint8> GetResponse() const;

  virtual HRESULT QueryHeadersString(uint32 info_level,
                                     const TCHAR* name,
                                     CString* value) const;
  virtual CString GetResponseHeaders() const;

  virtual int GetHttpStatusCode() const;

  virtual CString ToString() const;

  virtual void set_session_handle(HINTERNET session_handle);

  virtual void set_url(const CString& url);

  virtual void set_request_buffer(const void* buffer, size_t buffer_length);

  virtual void set_network_configuration(const Config& network_config);

  // Sets the filename to receive the response instead of the memory buffer.
  virtual void set_filename(const CString& filename);

  virtual void set_low_priority(bool low_priority);

  virtual void set_callback(NetworkRequestCallback* callback);

  virtual void set_additional_headers(const CString& additional_headers);

  virtual CString user_agent() const;

  virtual void set_user_agent(const CString& user_agent);

  // Sets random bytes provided by the caller. This is useful for testing
  // purposes and it is not be called by production code.
  // Otherwise, when entropy is not provided, the implementation
  // fills in the internal entropy buffer with cryptographically random bytes.
  // Calling this method can result in compromising the security of the
  // protocol, depending on the quality of entropy provided.
  void SetEntropy(const void* data, size_t data_length);

 private:

  scoped_ptr<detail::CupRequestImpl> impl_;
  DISALLOW_EVIL_CONSTRUCTORS(CupRequest);
};

}   // namespace omaha

#endif  // OMAHA_NET_CUP_REQUEST_H__


text:
////////////////////////////////////////////////
/*   Provided Code - Please Don't Edit   */
////////////////////////////////////////////////
'use strict';

function getInput() {
    console.log("Please choose either 'rock', 'paper', or 'scissors'.")
    return prompt();
}
function randomPlay() {
    var randomNumber = Math.random();
    if (randomNumber < 0.33) {
        return "rock";
    } else if (randomNumber < 0.66) {
        return "paper";
    } else {
        return "scissors";
    }
}
////////////////////////////////////////////////
/*           Write Your Code Below            */
////////////////////////////////////////////////

function getPlayerMove(move) {
    // Write an expression that operates on a variable called `move`
    // If a `move` has a value, your expression should evaluate to that value.
    // However, if `move` is not specified / is null, your expression should equal `getInput()`.
    var playerMove;
    if (move){
        playerMove = move;
    }
    else {
        playerMove = getInput();
    }
    console.log(playerMove);
    return playerMove;
}

function getComputerMove(move) {
    // Write an expression that operates on a variable called `move`
    // If a `move` has a value, your expression should evaluate to that value.
    // However, if `move` is not specified / is null, your expression should equal `randomPlay()`.
    var computerMove;
    if (move){
        computerMove = move;
    }
    else {
        computerMove = randomPlay();
    };
    console.log(computerMove);
    return computerMove;
}

function getWinner(playerMove,computerMove) {
    var winner;
    if ((playerMove == "rock" && computerMove =="rock")||(playerMove == "scissors" && computerMove =="scissors")||(playerMove == "paper" && computerMove =="paper")){
        winner = "tie";
    }
    else if ((playerMove == "rock" && computerMove =="scissors")||(playerMove == "scissors" && computerMove =="paper")||(playerMove == "paper" && computerMove =="rock")){
        winner = "player";
    }
    else if ((computerMove == "rock" && playerMove =="scissors")||(computerMove == "scissors" && playerMove =="paper")||(computerMove == "paper" && playerMove =="rock")){
        winner = "computer";
    }

    // Write code that will set winner to either 'player', 'computer', or 'tie' based on the values of playerMove and computerMove.    // Assume that the only values playerMove and computerMove can have are 'rock', 'paper', and 'scissors'.
    // The rules of the game are that 'rock' beats 'scissors', 'scissors' beats 'paper', and 'paper' beats 'rock'.
    /* YOUR CODE HERE */
    console.log(winner);
    return winner;
}

function playToFive() {
    console.log("Let's play Rock, Paper, Scissors");
    var playerWins = 0;
    var computerWins = 0;
    var playerMove = 0;
    var computerMove = 0;
    var winner = "";
    var seed = "";
    // Write code that plays 'Rock, Paper, Scissors' until either the player or the computer has won five times.
    /* YOUR CODE HERE */
   while (playerWins !=5 && computerWins !=5 ){
        playerMove = getPlayerMove(seed);
        computerMove = getComputerMove(seed);
        winner = getWinner(playerMove,computerMove);
        if (winner == "computer"){
            computerWins = computerWins + 1;
        }
        else if (winner == "player"){
            playerWins = playerWins + 1;
        }
        else if (winner == "tie"){
        }
        console.log('Player chose ' + playerMove + ' while Computer chose ' + computerMove);
        console.log('The score is currently ' + playerWins + ' to ' + computerWins + '\n');
    }
    return [playerWins, computerWins];
}


text:
                <button type="button" class="close" data-dismiss="modal">×</button>

Attributes

                Close


text:
FROM linuxkit/alpine:630ee558e4869672fae230c78364e367b8ea67a9 AS mirror

# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
# removed openssl as I do not think server needs it
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
	alpine-baselayout \
	btrfs-progs \
	busybox \
	ca-certificates \
	curl \
	e2fsprogs \
	e2fsprogs-extra \
	iptables \
	musl \
	xfsprogs \
	xz
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache

FROM scratch
COPY --from=mirror /out/ /

# set up Docker group
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
RUN set -x \
	&& addgroup -S docker \
	&& addgroup -S dockremap \
	&& adduser -S -G dockremap dockremap \
	&& echo 'dockremap:165536:65536' >> /etc/subuid \
	&& echo 'dockremap:165536:65536' >> /etc/subgid

ENV DOCKER_BUCKET get.docker.com
ENV DOCKER_VERSION 17.05.0-ce
ENV DOCKER_SHA256 340e0b5a009ba70e1b644136b94d13824db0aeb52e09071410f35a95d94316d9

# we could avoid installing client here I suppose
RUN set -x \
	&& curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz \
	&& echo "${DOCKER_SHA256} *docker.tgz" | sha256sum -c - \
	&& tar -xzvf docker.tgz \
	&& mv docker/* /usr/bin/ \
	&& rmdir docker \
	&& rm docker.tgz \
	&& docker -v

# use the Docker copy of tini as our init for zombie reaping
ENTRYPOINT ["/usr/bin/docker-init", "/usr/bin/dockerd"]


text:
namespace loader
{
    /// <!-- description -->
    ///   @brief Used to execute the actual checks. We put the checks in this
    ///     function so that we can validate the tests both at compile-time
    ///     and at run-time. If a bsl::ut_check fails, the tests will either
    ///     fail fast at run-time, or will produce a compile-time error.
    ///
    /// <!-- inputs/outputs -->
    ///   @return Always returns bsl::exit_success.
    ///
    [[nodiscard]] constexpr auto
    tests() noexcept -> bsl::exit_code
    {
        helpers::init();
        constexpr auto func{&map_mk_stack};

        bsl::ut_scenario{"success"} = [&]() noexcept {
            bsl::ut_given{} = [&]() noexcept {
                span_t mut_stack{};
                root_page_table_t mut_rpt{};
                constexpr auto buf_size{0x2042_umx};
                bsl::array<bsl::uint8, buf_size.get()> mut_buf{};
                bsl::ut_when{} = [&]() noexcept {
                    mut_stack.addr = mut_buf.data();
                    mut_stack.size = mut_buf.size().get();
                    bsl::ut_then{} = [&]() noexcept {
                        helpers::ut_check(func(&mut_stack, {}, &mut_rpt));
                    };
                    bsl::ut_cleanup{} = [&]() noexcept {
                        helpers::reset();
                    };
                };
            };
        };

        bsl::ut_scenario{"platform_virt_to_phys fails"} = [&]() noexcept {
            bsl::ut_given{} = [&]() noexcept {
                span_t mut_stack{};
                root_page_table_t mut_rpt{};
                constexpr auto buf_size{0x2042_umx};
                bsl::array<bsl::uint8, buf_size.get()> mut_buf{};
                bsl::ut_when{} = [&]() noexcept {
                    mut_stack.addr = mut_buf.data();
                    mut_stack.size = mut_buf.size().get();
                    helpers::g_mut_platform_virt_to_phys = 1;
                    bsl::ut_then{} = [&]() noexcept {
                        helpers::ut_fails(func(&mut_stack, {}, &mut_rpt));
                    };
                    bsl::ut_cleanup{} = [&]() noexcept {
                        helpers::reset();
                    };
                };
            };
        };

        bsl::ut_scenario{"map_4k_page fails"} = [&]() noexcept {
            bsl::ut_given{} = [&]() noexcept {
                span_t mut_stack{};
                root_page_table_t mut_rpt{};
                constexpr auto buf_size{0x2042_umx};
                bsl::array<bsl::uint8, buf_size.get()> mut_buf{};
                bsl::ut_when{} = [&]() noexcept {
                    mut_stack.addr = mut_buf.data();
                    mut_stack.size = mut_buf.size().get();
                    helpers::g_mut_map_4k_page = 1;
                    bsl::ut_then{} = [&]() noexcept {
                        helpers::ut_fails(func(&mut_stack, {}, &mut_rpt));
                    };
                    bsl::ut_cleanup{} = [&]() noexcept {
                        helpers::reset();
                    };
                };
            };
        };

        return helpers::fini();
    }
}

/// <!-- description -->
///   @brief Main function for this unit test. If a call to bsl::ut_check() fails
///     the application will fast fail. If all calls to bsl::ut_check() pass, this
///     function will successfully return with bsl::exit_success.
///
/// <!-- inputs/outputs -->
///   @return Always returns bsl::exit_success.
///
[[nodiscard]] auto
main() noexcept -> bsl::exit_code
{
    bsl::enable_color();
    return loader::tests();
}


text:
package giterminism_manager

import (
	"context"

	"github.com/werf/logboek"

	"github.com/werf/werf/pkg/git_repo"
	"github.com/werf/werf/pkg/giterminism_manager/config"
	"github.com/werf/werf/pkg/giterminism_manager/errors"
	"github.com/werf/werf/pkg/giterminism_manager/file_reader"
	"github.com/werf/werf/pkg/giterminism_manager/inspector"
	"github.com/werf/werf/pkg/util"
)

type NewManagerOptions struct {
	LooseGiterminism bool
	Dev              bool
}

func NewManager(ctx context.Context, projectDir string, localGitRepo *git_repo.Local, headCommit string, options NewManagerOptions) (Interface, error) {
	sharedOptions := &sharedOptions{
		projectDir:       projectDir,
		localGitRepo:     localGitRepo,
		headCommit:       headCommit,
		looseGiterminism: options.LooseGiterminism,
		dev:              options.Dev,
	}

	if options.LooseGiterminism {
		err := errors.NewError(`DEPRECATION WARNING: The --loose-giterminism option (and WERF_LOOSE_GITERMINISM env variable) is forbidden and will be removed in v1.2!
Please use werf-giterminism.yaml config instead to loosen giterminism restrictions if needed.`)
		logboek.Context(ctx).Warn().LogLn(err)
	}

	fr := file_reader.NewFileReader(sharedOptions)

	c, err := config.NewConfig(ctx, fr)
	if err != nil {
		return nil, err
	}

	fr.SetGiterminismConfig(c)

	i := inspector.NewInspector(c, fr, sharedOptions)

	m := &Manager{
		sharedOptions: sharedOptions,
		fileReader:    fr,
		inspector:     i,
	}

	logboek.Context(ctx).Debug().LogF("-- giterminism_manager.NewManager: projectDir=%q localGitRepo.WorkTreeDir=%q\n", projectDir, localGitRepo.WorkTreeDir)

	return m, nil
}

type Manager struct {
	fileReader FileReader
	inspector  Inspector

	*sharedOptions
}

func (m Manager) FileReader() FileReader {
	return m.fileReader
}

func (m Manager) Inspector() Inspector {
	return m.inspector
}

type sharedOptions struct {
	projectDir       string
	headCommit       string
	localGitRepo     *git_repo.Local
	looseGiterminism bool
	dev              bool
}

func (s *sharedOptions) ProjectDir() string {
	return s.projectDir
}

func (s *sharedOptions) RelativeToGitProjectDir() string {
	return util.GetRelativeToBaseFilepath(s.LocalGitRepo().WorkTreeDir, s.projectDir)
}

func (s *sharedOptions) HeadCommit() string {
	return s.headCommit
}

func (s *sharedOptions) LocalGitRepo() *git_repo.Local {
	return s.localGitRepo
}

func (s *sharedOptions) LooseGiterminism() bool {
	return s.looseGiterminism
}

func (s *sharedOptions) Dev() bool {
	return s.dev
}


text:
@interface MenuViewController : RootViewController

@end


text:
/**
	@file FCDPhysicsMaterial.h
	This file contains the FCDPhysicsMaterial class.
*/

#ifndef _FCD_PHYSICSMATERIAL_H_
#define _FCD_PHYSICSMATERIAL_H_

#ifndef _FCD_ENTITY_H_
#include "FCDocument/FCDEntity.h"
#endif // _FCD_ENTITY_H_

class FCDocument;

/**
	A COLLADA physics material.

	A physics material contains physical properties for an object. Because
	there isn't anything interesting in the physics material instance, this
	class is used to represent that as well.

	@ingroup FCDocument
*/
class FCOLLADA_EXPORT FCDPhysicsMaterial : public FCDEntity
{
private:
	DeclareObjectType(FCDEntity);
	float staticFriction;
	float dynamicFriction;
	float restitution;

public:
	/** Constructor.
		@param document The COLLADA document that contains this rigid body. */
	FCDPhysicsMaterial(FCDocument* document);

	/** Destructor. */
	virtual ~FCDPhysicsMaterial();

	/** Retrieves the entity type for this class. This function is part of the
		FCDEntity interface.
		@return The entity type: PHYSICS_MATERIAL. */
	virtual Type GetType() const { return FCDEntity::PHYSICS_MATERIAL; }

	/** Retrieves the static friction for this physics material.
		@return The static friction. */
	float GetStaticFriction() const { return staticFriction; }

	/** Sets the static friction for this physics material.
		@param _staticFriction The static friction. */
	void  SetStaticFriction(float _staticFriction) { staticFriction = _staticFriction; SetDirtyFlag(); }

	/** Retrieves the dynamic friction for this physics material.
		@return The dynamic friction. */
	float GetDynamicFriction() const { return dynamicFriction; }

	/** Sets the dynamic friction for this physics material.
		@param _dynamicFriction The dynamic friction. */
	void  SetDynamicFriction(float _dynamicFriction) { dynamicFriction = _dynamicFriction; SetDirtyFlag(); }

	/** Retrieves the restitution for this physics material.
		@return The restitution. */
	float GetRestitution() const { return restitution; }

	/** Sets the restitution for this physics material.
		@param _restitution The restitution. */
	void  SetRestitution(float _restitution) { restitution = _restitution; SetDirtyFlag(); }

	/** Copies the physics material into a clone.
		@param clone The empty clone. If this pointer is NULL, a new physics
			material will be created and you will need to release the returned
			pointer manually.
		@param cloneChildren Whether to recursively clone this entity's
			children.
		@return The clone. */
	virtual FCDEntity* Clone(FCDEntity* clone = NULL, bool cloneChildren = false) const;
};

#endif // _FCD_MATERIAL_H_


text:
package com.hortonworks.streamline.cache.exception;

//TODO: Should this the a Checked Exception instead of a RuntimeException
public class CacheException extends RuntimeException {

    public CacheException(Throwable cause) {
        super(cause);
    }

    public CacheException(String message, Throwable cause) {
        super(message, cause);
    }

    public CacheException(String message) {
        super(message);
    }
}


text:
package org.strategoxt.lang;

import java.util.Iterator;

import org.spoofax.interpreter.core.Tools;
import org.spoofax.interpreter.terms.IStrategoList;
import org.spoofax.interpreter.terms.IStrategoTerm;

/**
 * Exception thrown when the application exits with an fatal error message.
 *
 * @author Lennart Kats <lennart add lclnet.nl>
 */
public class StrategoErrorExit extends StrategoExit {

	private static final long serialVersionUID = 1718563644820693442L;

	private final IStrategoTerm term;
	private final IStrategoList trace;

	public StrategoErrorExit(String message, IStrategoTerm term, Throwable cause) {
		super(1, message, cause);
		this.term = term;
		this.trace = null;
	}

	public StrategoErrorExit(String message, IStrategoTerm term,
			IStrategoList trace) {
		super(1, message, null);
		this.term = term;
		this.trace = trace;
	}

	public StrategoErrorExit(String message, IStrategoTerm term) {
		this(message, term, (IStrategoList) null);
	}

	public StrategoErrorExit(String message) {
		this(message, null, (IStrategoList) null);
	}

	public IStrategoTerm getTerm() {
		return term;
	}

	@Override
	public String getLocalizedMessage() { // used for toString() and stacktraces
		StringBuilder sb = new StringBuilder(getMessage());
		IStrategoTerm term = getTerm();
		if (term != null) {
			sb.append("\n\t" + term);
		}
		if (trace != null && !trace.isEmpty()) {
			IStrategoList tail = trace;
			while(!tail.isEmpty()) {
				IStrategoTerm t = tail.head();
				sb.append("\n\t" + (t.getTermType() == IStrategoTerm.STRING ? Tools.asJavaString(t) : t));
				tail = tail.tail();
			}
		}
		return sb.toString();
	}

	public IStrategoList getTrace() {
		return trace;
	}
}


text:
module Nokogiri
  module HTML4
    class ElementDescription
      ###
      # Is this element a block element?
      def block?
        !inline?
      end

      ###
      # Convert this description to a string
      def to_s
        "#{name}: #{description}"
      end

      ###
      # Inspection information
      def inspect
        "#<#{self.class.name}: #{name} #{description}>"
      end
    end
  end
end


text:
/*!
* Firebrick JS - Unit Tests
* @author Steven Masala [me@smasala.com]
*/
define(["jquery", "firebrick"], function($, Firebrick){
	"use strict";
	describe("Events: ", function() {

		it("(de)Register events 1", function(){

			Firebrick.addListener("hello1", function(){});
			expect(Firebrick.events._eventRegistry.hello1).toBeDefined();

			Firebrick.events.removeListener("hello1");
			expect(Firebrick.events._eventRegistry.hello1).not.toBeDefined();
		});

		it("(de)Register events 2", function(){
			var f = function(){};
			Firebrick.addListener("hello1", f);
			Firebrick.addListener("hello1", function(){});
			expect(Firebrick.events._eventRegistry.hello1).toBeDefined();
			expect(Firebrick.events._eventRegistry.hello1.length).toBe(2);

			Firebrick.events.removeListener("hello1", f);
			expect(Firebrick.events._eventRegistry.hello1.length).toBe(1);

			Firebrick.events.removeListener("hello1");
			expect(Firebrick.events._eventRegistry.hello1).not.toBeDefined();
		});

		it("Fire Event", function(){

			var eN = "testEvent";

			Firebrick.addListener(eN, function(event, int){
				expect(event).toBeDefined();
				expect($.isPlainObject(event)).toBe(true);
				expect(event.event).toBe(eN);
				expect($.isFunction(event.removeSelf)).toBe(true);
				expect(int).toBe(5);
				event.removeSelf();
				expect(Firebrick.events._eventRegistry[eN]).not.toBeDefined();
			});

			Firebrick.fireEvent(eN, 5);

		});

		it("Multiple Listeners", function(){

			Firebrick.addListener({
				test1: function(){},
				test2: function(){}
			});

			expect(Firebrick.events._eventRegistry.test1).toBeDefined();
			expect(Firebrick.events._eventRegistry.test2).toBeDefined();

			Firebrick.events.removeListener("test1");
			Firebrick.events.removeListener("test2");

			expect(Firebrick.events._eventRegistry.test1).not.toBeDefined();
			expect(Firebrick.events._eventRegistry.test2).not.toBeDefined();

		});

		it("On events", function(){
			var id = "abc123",
				elem;

			$("body").append("

");
			elem = $("#abc123");
			expect(elem.length).toBe(1);

			Firebrick.events.on("click", "#" + id, function(){
				expect(true).toBe(true);
			});

			elem[0].click();
			elem.remove();

		});

		it("Off events 1", function(){
			var id = "abc123",
				hid = "#" + id,
				elem,
				clicked = false,
				f = function(){
					clicked = true;
				};

			$("body").append("

");
			elem = $(hid);
			expect(elem.length).toBe(1);

			Firebrick.events.on("click", hid, f);
			Firebrick.events.off("click", hid, f);

			elem[0].click();

			expect(clicked).toBe(false);

			elem.remove();

		});

		it("Off events 2 (destroy)", function(){
			var clicked = 0;
			Firebrick.events.on("click", "html", function(){
				clicked++;
				this.destroy();
			});

			$("html")[0].click();

			expect(clicked).toBe(1);
		});

	});
});


text:
module Aws::FIS
  module Plugins
    class Endpoints < Seahorse::Client::Plugin
      option(
        :endpoint_provider,
        doc_type: 'Aws::FIS::EndpointProvider',
        docstring: 'The endpoint provider used to resolve endpoints. Any '\
                   'object that responds to `#resolve_endpoint(parameters)` '\
                   'where `parameters` is a Struct similar to '\
                   '`Aws::FIS::EndpointParameters`'
      ) do |cfg|
        Aws::FIS::EndpointProvider.new
      end

      # @api private
      class Handler < Seahorse::Client::Handler
        def call(context)
          # If endpoint was discovered, do not resolve or apply the endpoint.
          unless context[:discovered_endpoint]
            params = parameters_for_operation(context)
            endpoint = context.config.endpoint_provider.resolve_endpoint(params)

            context.http_request.endpoint = endpoint.url
            apply_endpoint_headers(context, endpoint.headers)
          end

          context[:endpoint_params] = params
          context[:auth_scheme] =
            Aws::Endpoints.resolve_auth_scheme(context, endpoint)

          @handler.call(context)
        end

        private

        def apply_endpoint_headers(context, headers)
          headers.each do |key, values|
            value = values
              .compact
              .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
              .join(',')

            context.http_request.headers[key] = value
          end
        end

        def parameters_for_operation(context)
          case context.operation_name
          when :create_experiment_template
            Aws::FIS::Endpoints::CreateExperimentTemplate.build(context)
          when :delete_experiment_template
            Aws::FIS::Endpoints::DeleteExperimentTemplate.build(context)
          when :get_action
            Aws::FIS::Endpoints::GetAction.build(context)
          when :get_experiment
            Aws::FIS::Endpoints::GetExperiment.build(context)
          when :get_experiment_template
            Aws::FIS::Endpoints::GetExperimentTemplate.build(context)
          when :get_target_resource_type
            Aws::FIS::Endpoints::GetTargetResourceType.build(context)
          when :list_actions
            Aws::FIS::Endpoints::ListActions.build(context)
          when :list_experiment_templates
            Aws::FIS::Endpoints::ListExperimentTemplates.build(context)
          when :list_experiments
            Aws::FIS::Endpoints::ListExperiments.build(context)
          when :list_tags_for_resource
            Aws::FIS::Endpoints::ListTagsForResource.build(context)
          when :list_target_resource_types
            Aws::FIS::Endpoints::ListTargetResourceTypes.build(context)
          when :start_experiment
            Aws::FIS::Endpoints::StartExperiment.build(context)
          when :stop_experiment
            Aws::FIS::Endpoints::StopExperiment.build(context)
          when :tag_resource
            Aws::FIS::Endpoints::TagResource.build(context)
          when :untag_resource
            Aws::FIS::Endpoints::UntagResource.build(context)
          when :update_experiment_template
            Aws::FIS::Endpoints::UpdateExperimentTemplate.build(context)
          end
        end
      end

      def add_handlers(handlers, _config)
        handlers.add(Handler, step: :build, priority: 75)
      end
    end
  end
end


text:
<?php

namespace Symfony\Component\PropertyAccess\Tests\Fixtures;

class TestClassSetValue
{
    protected $value;

    public function getValue()
    {
        return $this->value;
    }

    public function setValue($value)
    {
        $this->value = $value;
    }

    public function __construct($value)
    {
        $this->value = $value;
    }

    private function setFoo()
    {
    }
}


text:
/*
 * Legal Notice
 *
 * This document and associated source code (the "Work") is a part of a
 * benchmark specification maintained by the TPC.
 *
 * The TPC reserves all right, title, and interest to the Work as provided
 * under U.S. and international laws, including without limitation all patent
 * and trademark rights therein.
 *
 * No Warranty
 *
 * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION
 *     CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE
 *     AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER
 *     WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
 *     INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES,
 *     DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
 *     PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
 *     WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE.
 *     ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
 *     QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT
 *     WITH REGARD TO THE WORK.
 * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO
 *     ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE
 *     COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS
 *     OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT,
 *     INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY,
 *     OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT
 *     RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD
 *     ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
 *
 * Contributors
 * - Sergey Vasilevskiy
 */

/*
*   ODBC Database loader class for DAILY_MARKET table.
*/
#ifndef ODBC_DAILY_MARKET_LOAD_H
#define ODBC_DAILY_MARKET_LOAD_H

namespace TPCE
{

class CODBCDailyMarketLoad : public CDBLoader <DAILY_MARKET_ROW>
{
private:
    DBDATETIME  ODBC_DM_DATE;
    virtual inline void CopyRow(PT row)
    {
        memcpy(&m_row, row, sizeof(m_row));
        m_row.DM_DATE.GetDBDATETIME(&ODBC_DM_DATE);
    };

public:
    CODBCDailyMarketLoad(char *szServer, char *szDatabase, char *szLoaderParams, char *szTable = "DAILY_MARKET")
        : CDBLoader<DAILY_MARKET_ROW>(szServer, szDatabase, szLoaderParams, szTable)
    {
    };

    virtual void BindColumns()
    {
        //Binding function we have to implement.
        int i = 0;
        if (
               bcp_bind(m_hdbc, (BYTE *) &ODBC_DM_DATE, 0, SQL_VARLEN_DATA, NULL, 0, SQLDATETIME, ++i) != SUCCEED
            || bcp_bind(m_hdbc, (BYTE *) &m_row.DM_S_SYMB, 0, SQL_VARLEN_DATA, (BYTE *)"", 1, SQLCHARACTER, ++i) != SUCCEED
            || bcp_bind(m_hdbc, (BYTE *) &m_row.DM_CLOSE, 0, SQL_VARLEN_DATA, NULL, 0, SQLFLT8, ++i) != SUCCEED
            || bcp_bind(m_hdbc, (BYTE *) &m_row.DM_HIGH, 0, SQL_VARLEN_DATA, NULL, 0, SQLFLT8, ++i) != SUCCEED
            || bcp_bind(m_hdbc, (BYTE *) &m_row.DM_LOW, 0, SQL_VARLEN_DATA, NULL, 0, SQLFLT8, ++i) != SUCCEED
            || bcp_bind(m_hdbc, (BYTE *) &m_row.DM_VOL, 0, SQL_VARLEN_DATA, NULL, 0, SQLINT8, ++i) != SUCCEED
            )
            ThrowError(CODBCERR::eBcpBind);

        //if ( bcp_control(m_hdbc, BCPHINTS, "TABLOCK" ) != SUCCEED )
        //  ThrowError(CODBCERR::eBcpControl);
    };

};

}   // namespace TPCE

#endif //ODBC_DAILY_MARKET_LOAD_H


text:
const BasicController = require('./basic.server.controller');

class GoodsController extends BasicController {
  constructor() {
    super('Good', {
      fieldNames: [
        'name',
        'details'
      ]
    });
  }

  preUpdateHandler(req, item) {
    item.name = req.body.name;
    item.count = req.body.count;
    item.price = req.body.price;
    item.details = req.body.details;
    item.type = req.body.type;
    return item;
  }
}

module.exports = new GoodsController();

// const mongoose = require('mongoose');
// const Good = mongoose.model('Good');
// const errorHandler = require('../../../core/server/controllers/errors.server.controller');

/* exports.create = (req, res) => {
  const good = new Good(req.body);
  good.user = req.user;

  good.save((err) => {
    if (err) {
      return res.status(400).send({
        message: errorHandler.getErrorMessage(err)
      });
    } else {
      res.json(good);
    }
  });
};

exports.read = (req, res) => {
  res.json(req.good);
};

exports.update = (req, res) => {
  const { good } = req;

  good.name = req.body.name;
  good.count = req.body.count;
  good.price = req.body.price;
  good.details = req.body.details;
  good.type = req.body.type;

  good.save((err) => {
    if (err) {
      return res.status(400).send({
        message: errorHandler.getErrorMessage(err)
      });
    } else {
      res.json(good);
    }
  });
};

exports.delete = (req, res) => {
  const { good } = req;

  good.remove(function (err) {
    if (err) {
      return res.status(400).send({
        message: errorHandler.getErrorMessage(err)
      });
    } else {
      res.json(good);
    }
  });
};

exports.list = (req, res) => {
  const { limit, page } = req.query;
  const goods = Good.find()
    .limit(+limit)
    .skip((page - 1) * limit)
    .sort('-created')
    .populate('user', 'displayName');

  const count = Good.count();
  return Promise.props({
    goods, count
  })
    .then(data => res.json(data))
    .catch((err) => {
      console.log(err);
      return res.status(400).send({
        message: errorHandler.getErrorMessage(err)
      });
    });
};

exports.goodByID = (req, res, next, id) => {

  if (!mongoose.Types.ObjectId.isValid(id)) {
    return res.status(400).send({
      message: 'Good is invalid'
    });
  }

  Good.findById(id).populate('user', 'displayName').exec((err, good) => {
    if (err) {
      return next(err);
    } else if (!good) {
      return res.status(404).send({
        message: 'No good with that identifier has been found'
      });
    }
    req.good = good;
    next();
  });
};
*/


text:
interface Foo<T> {
   new (x: number): Foo<T>;
}
var f2: Foo<number> = new Foo(3);

//// [genericConstructInvocationWithNoTypeArg.js]
var f2 = new Foo(3);


text:
import opensteer as os

minTimToCollision = 1.5

_worldRadius = 0.0
_db = None
obstacles = []
flock = []

class Boid(os.TrivialVehicle):
    """ basic flocker """
    def __init__(self):
        os.TrivialVehicle.__init__(self)
        # a pointer to this boid's interface object for the proximity database
        self._proximityToken = _db.allocateToken(self)
        self.reset()

    def reset(self):
        os.TrivialVehicle.reset(self)
        # steering force is clipped to this magnitude
        self.setMaxForce(8.0)
        # velocity is clipped to this magnitude
        self.setMaxSpeed(2.0)
        self.setRadius(0.5)
        # initial slow speed
        self.setSpeed(self.maxSpeed() * 0.3)
        # randomize initial orientation
        self.randomizeHeadingOnXZPlane()
        v = os.RandomUnitVectorOnXZPlane() * 10
        # randomize initial position
        self.setPosition(v)
        # notify proximity database that our position has changed
        self._proximityToken.updateForNewPosition(self.position())
        self.separation = os.Vec3.zero
        self.avoidance = os.Vec3.zero
        self.alignment = os.Vec3.zero
        self.cohesion = os.Vec3.zero

    def moveTo(self,x,y,z):
        self.setPosition(os.Vec3(x,y,z))
        # notify proximity database that our position has changed
        self._proximityToken.updateForNewPosition(self.position())

    def __str__(self):
        p = self.position()
        return 'pos=(%f,%f,%f), @ %f'%(p.x,p.y,p.z,self.speed())

    def update(self, currentTime, elapsedTime):
        # steer to flock and avoid obstacles if any
        v = self.steerToFlock()
        v.setYtoZero()
        self.applySteeringForce (v, elapsedTime)
        # wrap around to contrain boid within the spherical boundary
        self.sphericalWrapAround ()
        # notify proximity database that our position has changed
        self._proximityToken.updateForNewPosition (self.position());

    def steerToFlock(self):
        # basic flocking
        # avoid obstacles if needed
        self.avoidance = self.steerToAvoidObstacles (minTimToCollision, obstacles)
        if self.avoidance != os.Vec3.zero:
            return self.avoidance;
        separationRadius =  5.0
        separationAngle  = -0.707
        separationWeight =  8.0

        alignmentRadius = 7.5
        alignmentAngle  = 0.7
        alignmentWeight = 8.0

        cohesionRadius = 9.0
        cohesionAngle  = -0.15
        cohesionWeight = 8.0

        maxRadius = max (separationRadius,
                         max (alignmentRadius,
                              cohesionRadius))

        # find all flockmates within maxRadius using proximity database
        neighbors = self._proximityToken.findNeighbors (self.position(), maxRadius);

        # determine each of the three component behaviors of flocking
        self.separation = self.steerForSeparation (separationRadius,
                                              separationAngle,
                                              neighbors)
        self.alignment  = self.steerForAlignment  (alignmentRadius,
                                              alignmentAngle,
                                              neighbors)
        self.cohesion   = self.steerForCohesion   (cohesionRadius,
                                              cohesionAngle,
                                              neighbors)

        # apply weights to components (save in variables for annotation)
        self.separation *= separationWeight
        self.alignment *= alignmentWeight
        self.cohesion *= cohesionWeight
        return self.separation + self.alignment + self.cohesion

    def sphericalWrapAround(self):
        pos = self.position()
        if pos.length() > _worldRadius:
            pos.sphericalWrapAround(os.Vec3.zero, _worldRadius)
            pos.setYtoZero()
            self.setPosition(pos)

def createWorld(worldRadius):
    global _worldRadius, _db
    _worldRadius = worldRadius
    _db = os.ProximityDatabase(os.Vec3(0,0,0),
                               os.Vec3(worldRadius,worldRadius,worldRadius),
                               os.Vec3(100,100,100))


text:
@interface IDEBatchFindFileSystemLocator : IDEBatchFindFileLocator
{
}

- (id)locationOperationForWorkspace:(id)arg1 withResultsBlock:(dispatch_block_t)arg2;
- (BOOL)requiresMainThread;

@end


text:
import moment from 'moment'
import winston from 'winston'

/**
 * Helps with logging things. Basically a Winston helper
 */
class LoggerUtil {

    public static init() {
        if (!this.isInitialized) {
            // @ts-ignore Method exists, will be added to ts def in next release.
            winston.loggers.add('logger', {
                format: winston.format.combine(
                    winston.format.colorize(),
                    winston.format.printf((info) => `[${moment().format('YYYY-MM-DD hh:mm:ss').trim()}] [${info.level}]: ${info.message}`)
                ),
                level: process.env.PRODUCTION ? 'info' : 'debug',
                transports: [
                    new winston.transports.Console()
                ]
            })
        }
    }

    public static logger() {
        // @ts-ignore Method exists, will be added to ts def in next release.
        return winston.loggers.get('logger')
    }

    private static isInitialized = false
}

export { LoggerUtil }


text:
Hudson kann Checkstyle
Reports einlesen und darstellen. Wenn dieses Plug-in aktiviert wird,
analysiert Hudson nach jedem Build die erzeugten Checkstyle Dateien und
stellt deren Informationen in verschiedenen Ansichten dar: Trend
Anzeige, Projekt und Package Statistiken, usw. Zudem zeigt Hudson die
jeweiligen Warnungen direkt in der betroffen Datei an.

Damit das Plug-in korrekt funktioniert, muss im Build
Checkstyle gestartet werden - das Hudson Plug-in selbst macht dies
nicht! Das Plug-in wird nicht aufgerufen, wenn der Build fehlgeschlagen
ist, sondern nur für stabile bzw. instabile Builds (mit fehlgeschlagenen
Tests).


text:
package com.mainSite.app.web.action.entry.etc;

import com.mainSite.app.web.action.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * 其他终端入口
 * @author zhouqing
 */
@Controller
@RequestMapping("/etccommon")
public class ETCCommonController extends BaseController{

    //private static Logger logger = LoggerFactory.getLogger(ETCCommonController.class);

}


text:
<?php
namespace Nats\Encoders;

/**
 * Interface Encoder
 *
 * @package Nats\Encoders
 */
interface Encoder
{

    /**
     * Encodes a message.
     *
     * @param string $payload Message to decode.
     *
     * @return mixed
     */
    public function encode($payload);

    /**
     * Decodes a message.
     *
     * @param string $payload Message to decode.
     *
     * @return mixed
     */
    public function decode($payload);
}