text:
#pragma once

#include "event_matcher.h"
#include "rtbkit/core/monitor/monitor_provider.h"
#include "rtbkit/core/agent_configuration/agent_configuration_listener.h"
#include "rtbkit/common/bidder_interface.h"
#include "soa/service/logs.h"
#include "soa/service/service_base.h"
#include "soa/service/loop_monitor.h"
#include "soa/service/zmq_endpoint.h"
#include "soa/service/zmq_named_pub_sub.h"
#include "soa/service/zmq_message_router.h"

namespace RTBKIT {

struct BidderInterface;

/******************************************************************************/
/* POST AUCTION SERVICE                                                       */
/******************************************************************************/

struct PostAuctionService : public ServiceBase, public MonitorProvider
{

    enum {
        DefaultWinLossPipeTimeout = 10,
        DefaultCampaignEventPipeTimeout = 10
    };

    PostAuctionService(ServiceBase & parent,
                    const std::string & serviceName);
    PostAuctionService(std::shared_ptr<ServiceProxies> proxies,
                    const std::string & serviceName);

    ~PostAuctionService() { shutdown(); }

    void initBidderInterface(Json::Value const & json);
    void init(size_t externalShard = 0, size_t internalShards = 1);
    void start(std::function<void ()> onStop = std::function<void ()>());
    void shutdown();

    /// Start listening on ports for connections from agents, routers
    /// and event sources
    void bindTcp();

    void addSource(std::string name, AsyncEventSource & source, int priority = 0)
    {
        loop.addSource(std::move(name), source, priority);
    }

    /************************************************************************/
    /* BANKER                                                               */
    /************************************************************************/

    std::shared_ptr<Banker> getBanker() const
    {
        return banker;
    }

    void setBanker(const std::shared_ptr<Banker> & newBanker)
    {
        matcher->setBanker(banker = newBanker);
        monitorProviderClient.addProvider(banker.get());
    }

    /**************************************************************************/
    /* TIMEOUTS                                                               */
    /**************************************************************************/

    void setWinTimeout(float timeout)
    {
        if (timeout < 0.0)
            throw ML::Exception("Invalid timeout for Win timeout");

        winTimeout = timeout;
        if (matcher) matcher->setWinTimeout(timeout);
    }

    void setAuctionTimeout(float timeout)
    {
        if (timeout < 0.0)
            throw ML::Exception("Invalid timeout for Auction timeout");

        auctionTimeout = timeout;
        if (matcher) matcher->setAuctionTimeout(timeout);
    }

    void setWinLossPipeTimeout(int timeout)
    {
        if (timeout < 0)
            throw ML::Exception("Invalid timeout for WinLoss Pipe timeout");

        winLossPipeTimeout = timeout;
    }

    void setCampaignEventPipeTimeout(int timeout)
    {
        if (timeout < 0)
            throw ML::Exception("Invalid timeout for Campaign Event Pipe timeout");

        campaignEventPipeTimeout = timeout;
    }

    /************************************************************************/
    /* LOGGING                                                              */
    /************************************************************************/

    /** Log a given message to the given channel. */
    template<typename... Args>
    void logMessage(const std::string & channel, Args... args)
    {
        logger.publish(channel, Date::now().print(5), args...);
    }

    /** Log a router error. */
    template<typename... Args>
    void logPAError(const std::string & function,
                    const std::string & exception,
                    Args... args)
    {
        logger.publish("PAERROR",
                Date::now().print(5), function, exception, args...);
        recordHit("error.%s", function);
    }

    /************************************************************************/
    /* EVENT MATCHING                                                       */
    /************************************************************************/

    /** Transfer the given auction to the post auction loop.  This method
        assumes that the given auction was submitted with a non-empty
        bid, and adds it to the internal data structures so that any
        post-auction messages can be matched up with it.
    */
    void injectSubmittedAuction(
            const Id & auctionId,
            const Id & adSpotId,
            std::shared_ptr<BidRequest> bidRequest,
            const std::string & bidRequestStr,
            const std::string & bidRequestStrFormat,
            const JsonHolder & augmentations,
            const Auction::Response & bidResponse,
            Date lossTimeout);

    /** Inject a WIN into the post auction loop.  Thread safe and
        asynchronous. */
    void injectWin(
            const Id & auctionId,
            const Id & adspot,
            Amount winPrice,
            Date timestamp,
            const JsonHolder & winMeta,
            const UserIds & ids,
            const AccountKey & account,
            Date bidTimestamp);

    /** Inject a LOSS into the router.  Thread safe and asynchronous.
        Note that this method ONLY is useful for simulations; otherwise
        losses are implicit.
    */
    void injectLoss(
            const Id & auctionId,
            const Id & adspot,
            Date timestamp,
            const JsonHolder & lossMeta,
            const AccountKey & account,
            Date bidTimestamp);

    /** Inject a campaign event into the router, to be passed on to the agent
        that bid on it.

        If the spot ID is empty, then the click will be sent to all agents
        that had a win on the auction.
    */
    void injectCampaignEvent(
            const std::string & label,
            const Id & auctionId,
            const Id & adSpotId,
            Date timestamp,
            const JsonHolder & eventMeta,
            const UserIds & ids);

    /************************************************************************/
    /* PERSISTENCE                                                          */
    /************************************************************************/

    void initStatePersistence(const std::string & path)
    {
        throw ML::Exception(
                "post auction service persistence is not yet implemented.");
    }

    /************************************************************************/
    /* STATS                                                                */
    /************************************************************************/

    struct Stats
    {
        size_t auctions;
        size_t events;

        size_t matchedWins;
        size_t matchedLosses;
        size_t matchedCampaignEvents;
        size_t unmatchedEvents;
        size_t errors;

        Stats();
        Stats(const Stats& other);
        Stats& operator=(const Stats& other);
        Stats& operator-=(const Stats& other);
        Stats& operator+=(const Stats& other);

    } stats;

    float sampleLoad() const { return loopMonitor.sampleLoad().load; }

    static Logging::Category print;
    static Logging::Category error;
    static Logging::Category trace;

private:

    std::string getProviderClass() const;
    MonitorIndicator getProviderIndicators() const;

    /** Initialize all of our connections, hooking everything in to the
        event loop.
    */
    void initConnections(size_t shard);
    void initMatcher(size_t shards);

    void doAuction(std::shared_ptr< SubmittedAuctionEvent> event);
    void doEvent(std::shared_ptr<PostAuctionEvent> event);
    void checkExpiredAuctions();

    /** Decode from zeromq and handle a new auction that came in. */
    void doAuctionMessage(const std::vector<std::string> & message);

    /** Decode from zeromq and handle a new auction that came in. */
    void doWinMessage(const std::vector<std::string> & message);

    /** Decode from zeromq and handle a new auction that came in. */
    void doLossMessage(const std::vector<std::string> & message);

    /** Decode from zeromq and handle a new campaign event message that came
     * in. */
    void doCampaignEventMessage(const std::vector<std::string> & message);

    void doConfigChange(
            const std::string & agent,
            std::shared_ptr<const AgentConfig> config);

    void doMatchedWinLoss(std::shared_ptr<MatchedWinLoss> event);
    void doMatchedCampaignEvent(std::shared_ptr<MatchedCampaignEvent> event);
    void doUnmatched(std::shared_ptr<UnmatchedEvent> event);
    void doError(std::shared_ptr<PostAuctionErrorEvent> error);

    float auctionTimeout;
    float winTimeout;

    int winLossPipeTimeout;
    int campaignEventPipeTimeout;

    Date lastWinLoss;
    Date lastCampaignEvent;

    MessageLoop loop;
    LoopMonitor loopMonitor;

    std::unique_ptr<EventMatcher> matcher;
    std::shared_ptr<Banker> banker;
    AgentConfigurationListener configListener;
    MonitorProviderClient monitorProviderClient;

    TypedMessageSink<std::shared_ptr<SubmittedAuctionEvent> > auctions;
    TypedMessageSink<std::shared_ptr<PostAuctionEvent> > events;

    ZmqNamedPublisher logger;
    ZmqNamedEndpoint endpoint;

    std::shared_ptr<BidderInterface> bidder;
    AgentBridge bridge;

    ZmqMessageRouter router;

};

} // namespace RTBKIT


text:
<?php

namespace Customer\Factory;

use Customer\Controller\CustomerReferenceController;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

class CustomerReference implements FactoryInterface {

    public function createService(ServiceLocatorInterface $controllers) {
        $services       = $controllers->getServiceLocator();
        $entitymanager  = $services->get('doctrine.entitymanager.orm_default');
        $controller     = new CustomerReferenceController();
        $controller->setEntityManager($entitymanager);
        $controller->setRepository('Reference\Entity\Reference');
        return $controller;
    }
}

redpajama_set_name: RedPajamaGithub


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.cosmos;

import com.fasterxml.jackson.annotation.JsonValue;

import java.util.HashMap;
import java.util.Map;

/**
 * Represents the consistency levels supported for Azure Cosmos DB client operations in the Azure Cosmos DB service.
 * <p>
 * The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. Consistency
 * levels by order of strength are STRONG, BOUNDED_STALENESS, SESSION and EVENTUAL.
 *
 * Refer to consistency level documentation for additional details: https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels
 */
public enum ConsistencyLevel {

    /**
     * STRONG Consistency guarantees that read operations always return the value that was last written.
     */
    STRONG("Strong"),

    /**
     * Bounded Staleness guarantees that reads are not too out-of-date. This can be configured based on number of
     * operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds)
     */
    BOUNDED_STALENESS("BoundedStaleness"),

    /**
     * SESSION Consistency guarantees monotonic reads (you never read old data, then new, then old again), monotonic
     * writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) within
     * any single session.
     */
    SESSION("Session"),

    /**
     * EVENTUAL Consistency guarantees that reads will return a subset of writes. ALL writes will be eventually be
     * available for reads.
     */
    EVENTUAL("Eventual"),

    /**
     * CONSISTENT_PREFIX Consistency guarantees that reads will return some prefix of all writes with no gaps. ALL
     * writes
     * will be eventually be available for reads.
     */
    CONSISTENT_PREFIX("ConsistentPrefix");

    private static Map<String, ConsistencyLevel> consistencyLevelHashMap = new HashMap<>();

    static {
        for (ConsistencyLevel cl : ConsistencyLevel.values()) {
            consistencyLevelHashMap.put(cl.toString(), cl);
        }
    }

    private final String overWireValue;

    ConsistencyLevel(String overWireValue) {
        this.overWireValue = overWireValue;
    }

    /**
     * Given the over wire version of ConsistencyLevel gives the corresponding enum or return null
     *
     * @param consistencyLevel String value of consistency level
     * @return ConsistencyLevel Enum consistency level
     */
    static ConsistencyLevel fromServiceSerializedFormat(String consistencyLevel) {
        // this is 100x faster than org.apache.commons.lang3.EnumUtils.getEnum(String)
        // for more detail refer to https://github.com/moderakh/azure-cosmosdb-benchmark
        return consistencyLevelHashMap.get(consistencyLevel);
    }

    @JsonValue
    @Override
    public String toString() {
        return this.overWireValue;
    }
}


text:
package com.siyeh.ig.performance;

import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.util.PsiUtil;
import com.intellij.util.IncorrectOperationException;
import com.siyeh.HardcodedMethodConstants;
import com.siyeh.InspectionGadgetsBundle;
import com.siyeh.ig.BaseInspection;
import com.siyeh.ig.BaseInspectionVisitor;
import com.siyeh.ig.InspectionGadgetsFix;
import com.siyeh.ig.PsiReplacementUtil;
import com.siyeh.ig.psiutils.*;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;

public class StringEqualsEmptyStringInspection extends BaseInspection {

  @Override
  @NotNull
  public String getDisplayName() {
    return InspectionGadgetsBundle.message("string.equals.empty.string.display.name");
  }

  @Override
  @NotNull
  protected String buildErrorString(Object... infos) {
    final boolean useIsEmpty = ((Boolean)infos[0]).booleanValue();
    if (useIsEmpty) {
      return InspectionGadgetsBundle.message("string.equals.empty.string.is.empty.problem.descriptor");
    } else {
      return InspectionGadgetsBundle.message("string.equals.empty.string.problem.descriptor");
    }
  }

  @Override
  public InspectionGadgetsFix buildFix(Object... infos) {
    final boolean useIsEmpty = ((Boolean)infos[0]).booleanValue();
    return new StringEqualsEmptyStringFix(useIsEmpty);
  }

  private static class StringEqualsEmptyStringFix extends InspectionGadgetsFix {

    private final boolean useIsEmpty;

    public StringEqualsEmptyStringFix(boolean useIsEmpty) {
      this.useIsEmpty = useIsEmpty;
    }

    @Override
    @NotNull
    public String getName() {
      if (useIsEmpty) {
        return InspectionGadgetsBundle.message("string.equals.empty.string.isempty.quickfix");
      }
      else {
        return InspectionGadgetsBundle.message("string.equals.empty.string.quickfix");
      }
    }

    @NotNull
    @Override
    public String getFamilyName() {
      return "Simplify empty string check";
    }

    @Override
    public void doFix(Project project, ProblemDescriptor descriptor) throws IncorrectOperationException {
      final PsiIdentifier name = (PsiIdentifier)descriptor.getPsiElement();
      final PsiReferenceExpression expression = (PsiReferenceExpression)name.getParent();
      if (expression == null) {
        return;
      }
      final PsiMethodCallExpression call = (PsiMethodCallExpression)expression.getParent();
      final PsiExpressionList argumentList = call.getArgumentList();
      final PsiExpression[] arguments = argumentList.getExpressions();
      if (arguments.length == 0) {
        return;
      }
      final PsiExpression qualifier = expression.getQualifierExpression();
      final PsiExpression argument = arguments[0];
      final PsiExpression checkedExpression;
      final boolean addNullCheck;
      if (ExpressionUtils.isEmptyStringLiteral(argument)) {
        checkedExpression = getCheckedExpression(qualifier);
        addNullCheck = false;
      }
      else {
        checkedExpression = getCheckedExpression(argument);
        addNullCheck = !isCheckedForNull(checkedExpression);
      }
      final StringBuilder newExpression;
      if (addNullCheck) {
        newExpression = new StringBuilder(checkedExpression.getText());
        newExpression.append("!=null&&");
      } else {
        newExpression = new StringBuilder("");
      }
      final PsiElement parent = call.getParent();
      final PsiExpression expressionToReplace;
      if (parent instanceof PsiExpression) {
        final PsiExpression parentExpression = (PsiExpression)parent;
        if (BoolUtils.isNegation(parentExpression)) {
          expressionToReplace = parentExpression;
          if (useIsEmpty) {
            newExpression.append('!').append(checkedExpression.getText()).append(".isEmpty()");
          }
          else {
            newExpression.append(checkedExpression.getText()).append(".length()!=0");
          }
        }
        else {
          expressionToReplace = call;
          if (useIsEmpty) {
            newExpression.append(checkedExpression.getText()).append(".isEmpty()");
          }
          else {
            newExpression.append(checkedExpression.getText()).append(".length()==0");
          }
        }
      }
      else {
        expressionToReplace = call;
        if (useIsEmpty) {
          newExpression.append(checkedExpression.getText()).append(".isEmpty()");
        }
        else {
          newExpression.append(checkedExpression.getText()).append(".length()==0");
        }
      }

      CommentTracker commentTracker = new CommentTracker();
      commentTracker.markUnchanged(checkedExpression);
      PsiReplacementUtil.replaceExpression(expressionToReplace, newExpression.toString(), commentTracker);
    }

    private static boolean isCheckedForNull(PsiExpression expression) {
      final PsiPolyadicExpression polyadicExpression =
        PsiTreeUtil.getParentOfType(expression, PsiPolyadicExpression.class, true, PsiStatement.class, PsiVariable.class);
      if (polyadicExpression == null) {
        return false;
      }
      final IElementType tokenType = polyadicExpression.getOperationTokenType();
      for (PsiExpression operand : polyadicExpression.getOperands()) {
        if (PsiTreeUtil.isAncestor(operand, expression, true)) {
          return false;
        }
        if (!(operand instanceof PsiBinaryExpression)) {
          continue;
        }
        final PsiBinaryExpression binaryExpression = (PsiBinaryExpression)operand;
        final IElementType operationTokenType = binaryExpression.getOperationTokenType();
        if (JavaTokenType.ANDAND.equals(tokenType)) {
          if (!JavaTokenType.NE.equals(operationTokenType)) {
            continue;
          }
        }
        else if (JavaTokenType.OROR.equals(tokenType)) {
          if (!JavaTokenType.EQEQ.equals(operationTokenType)) {
            continue;
          }
        }
        else {
          continue;
        }
        final PsiExpression lhs = binaryExpression.getLOperand();
        final PsiExpression rhs = binaryExpression.getROperand();
        if (rhs == null) {
          continue;
        }
        if (PsiType.NULL.equals(lhs.getType()) && EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(expression, rhs)) {
          return true;
        }
        else if (PsiType.NULL.equals(rhs.getType()) && EquivalenceChecker.getCanonicalPsiEquivalence()
          .expressionsAreEquivalent(expression, lhs)) {
          return true;
        }
      }
      return false;
    }

    private PsiExpression getCheckedExpression(PsiExpression expression) {
      if (useIsEmpty || !(expression instanceof PsiMethodCallExpression)) {
        return expression;
      }
      // to replace stringBuffer.toString().equals("") with
      // stringBuffer.length() == 0
      final PsiMethodCallExpression callExpression = (PsiMethodCallExpression)expression;
      final PsiReferenceExpression methodExpression = callExpression.getMethodExpression();
      final String referenceName = methodExpression.getReferenceName();
      final PsiExpression qualifierExpression = methodExpression.getQualifierExpression();
      if (qualifierExpression == null) {
        return expression;
      }
      final PsiType type = qualifierExpression.getType();
      if (HardcodedMethodConstants.TO_STRING.equals(referenceName) && type != null && (type.equalsToText(
        CommonClassNames.JAVA_LANG_STRING_BUFFER) || type.equalsToText(CommonClassNames.JAVA_LANG_STRING_BUILDER))) {
        return qualifierExpression;
      }
      else {
        return expression;
      }
    }
  }

  @Override
  public BaseInspectionVisitor buildVisitor() {
    return new StringEqualsEmptyStringVisitor();
  }

  private static class StringEqualsEmptyStringVisitor extends BaseInspectionVisitor {

    @Override
    public void visitMethodCallExpression(@NotNull PsiMethodCallExpression call) {
      super.visitMethodCallExpression(call);
      final PsiReferenceExpression methodExpression = call.getMethodExpression();
      @NonNls final String methodName = methodExpression.getReferenceName();
      if (!"equals".equals(methodName)) {
        return;
      }
      final PsiExpressionList argumentList = call.getArgumentList();
      final PsiExpression[] arguments = argumentList.getExpressions();
      if (arguments.length != 1) {
        return;
      }
      final PsiElement context = call.getParent();
      final boolean useIsEmpty = PsiUtil.isLanguageLevel6OrHigher(call);
      if (!useIsEmpty && context instanceof PsiExpressionStatement) {
        // cheesy, but necessary, because otherwise the quickfix will
        // produce uncompilable code (out of merely incorrect code).
        return;
      }

      final PsiExpression qualifier = methodExpression.getQualifierExpression();
      final PsiExpression argument = arguments[0];
      if (ExpressionUtils.isEmptyStringLiteral(qualifier)) {
        final PsiType type = argument.getType();
        if (!TypeUtils.isJavaLangString(type)) {
          return;
        }
      }
      else if (ExpressionUtils.isEmptyStringLiteral(argument)) {
        if (qualifier == null) {
          return;
        }
        final PsiType type = qualifier.getType();
        if (!TypeUtils.isJavaLangString(type)) {
          return;
        }
      }
      else {
        return;
      }
      registerMethodCallError(call, Boolean.valueOf(useIsEmpty));
    }
  }
}


text:
package java.awt.peer;

import java.awt.*;

import java.awt.image.BufferedImage;

/**
 * The peer interface for {@link Window}.
 *
 * The peer interfaces are intended only for use in porting
 * the AWT. They are not intended for use by application
 * developers, and developers should not implement peers
 * nor invoke any of the peer methods directly on the peer
 * instances.
 */
public interface WindowPeer extends ContainerPeer {

    /**
     * Makes this window the topmost window on the desktop.
     *
     * @see Window#toFront()
     */
    void toFront();

    /**
     * Makes this window the bottommost window on the desktop.
     *
     * @see Window#toBack()
     */
    void toBack();

    /**
     * Sets if the window should always stay on top of all other windows or
     * not.
     *
     * @param alwaysOnTop if the window should always stay on top of all other
     *        windows or not
     *
     * @see Window#setAlwaysOnTop(boolean)
     */
    void setAlwaysOnTop(boolean alwaysOnTop);

    /**
     * Updates the window's focusable state.
     *
     * @see Window#setFocusableWindowState(boolean)
     */
    void updateFocusableWindowState();

    /**
     * Sets if this window is blocked by a modal dialog or not.
     *
     * @param blocker the blocking modal dialog
     * @param blocked {@code true} to block the window, {@code false}
     *        to unblock it
     */
    void setModalBlocked(Dialog blocker, boolean blocked);

    /**
     * Updates the minimum size on the peer.
     *
     * @see Window#setMinimumSize(Dimension)
     */
    void updateMinimumSize();

    /**
     * Updates the icons for the window.
     *
     * @see Window#setIconImages(java.util.List)
     */
    void updateIconImages();

    /**
     * Sets the level of opacity for the window.
     *
     * @see Window#setOpacity(float)
     */
    void setOpacity(float opacity);

    /**
     * Enables the per-pixel alpha support for the window.
     *
     * @see Window#setBackground(Color)
     */
    void setOpaque(boolean isOpaque);

    /**
     * Updates the native part of non-opaque window.
     *
     * @see Window#setBackground(Color)
     */
    void updateWindow();

    /**
     * Instructs the peer to update the position of the security warning.
     */
    void repositionSecurityWarning();
}


text:
FROM python:3.6.6-stretch

WORKDIR /hug
COPY app.py app.py
COPY uwsgi.ini uwsgi.ini
COPY requirements.txt requirements.txt

RUN pip3 install -r requirements.txt

CMD ["uwsgi", "--ini", "uwsgi.ini"]


text:
abstracts="both"
add_corpora="no"
add_imprint_biblio="yes"
add_this_content_part_name="User-Provided Content"
add_this_content="none"
afterKWIC="5"
analyze_url="no"
angbr="<"
arxiv="no"
attribute_set="Default"
authorphoto="authorphoto.png"
backmatter="on"
beforeKWIC="3"
BISAC_code="None"
body=""
bold=""
booktitle=""
booktype="Reader"
booktypewebformid='"/item/booktype"'
breaking="no"
build_all_formats="yes"
build_bw_pdf="yes"
build_color_pdf="yes"
build_docx="no"
build_linkrich_epub="yes"
build_mobi="yes"
build_text_epub="yes"
build_txt_html_only="no"
builder="yes"
buildtarget="$mediatargetpath"
categories="4"
categoryid=2
closeparen=")"
cover_image_extension=".png"
coverbase="images/bottomcanvas.png"
covercolor="black"
coverfile="assets/NCP-cover.jpg"
coverfont="Georgia"
coverfontcolor="white"
coverRGB="0,0,0"
covertype_id="1"
customer_email="customer-test@pagekicker.com" # chsnge to your organization
customeridwebformid='"/item/customerid"'
customtitle="none"
daily_email_post_to_wp="no"
daily_email_post_to_wp_status="draft"
dedicationfilename="default.html"
dedicationfilename="default.html"
description="test"
docsandabstracts="'Document titles and abstracts:
'"
docxlinkname="Microsoft_Word_docx"
docxname="Microsoft_Word_docx"
dontcleanupseeds="yes"
dq='"'
ebookformat="epub"
ebookintro="includes/ebook.intro.html"
editedby="PageKicker" # chsnge to your default author
editorid="1"
endanchor="/a>"
endbody=""
endbold=""
endbr=">"
endhead="</endhead>"
endhtml=""
endp="
"
endurl="&prop=links&pllimit=500&format=xml"
epub=".epub"xmlstarletwebformstart="xmlstarlet sel -t -v"
epublinkname="ePub"
epublinkrichname="Pub"
exemplar_file="none"
exemplar_filedir_code=400 # this is the field code value used in the directory structure where magento webforms stores uploaded exemplar files -- softcoded below
expand_seeds_to_pages="no"
fb_announcement="no"
fetcharray=()
fetched_document_format="html"
fetchfile="fetch/fetchlist.csv"
firstname=""
fleet="yes"
flickr="no"
flickr="off"
frontmatter="on"
googler_on="no"
googler_news_on="no"
h1=$angbr"h1"$endbr
h1end=$angbr$slash"h1"$endbr
h2=$angbr"h2"$endbr
h2end=$angbr$slash"h2"$endr
h3=$angbr"h3"$endbr
h3end=$angbr$slash"h3"$endbr
head=""
html=""
httpvalidate='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
imgsrc="<IMG SRC="
import="no"
imprint="pagekicker" # overridden by --imprint parameter at cli
ISBN_assign_automatically="no"
ISBN_owner="0"
ISBN="012345679X"
jobprofilename="default"
lastname=""
LSI_import="yes"
mailtofred="yes"
maximages="4" #default
middlename=""
mobilinkname="Kindle"
montageur="off"
montageurdir="montageur"
mylibrary="yes"
nameprefix=""
negative_seed_weight=1
negative_seeds=""
newline="/n"
news_lasts_minutes="43200"
news_to_buffer="2592000"
on=" on "
openanchor="<a href="$dq
openparen="("
outfile="montage.jpg"
p="
"
pass_uuid="no"
pdflinkname="PDF"
pdfserif="MinionWebPro"
pipe="|"
positive_seed_weight=1
positive_seeds=""
price=0.99
printconfigfile="yes"
refresh="yes"
robot_location="Ann Arbor, Michigan, USA" # change to your location
robot_summary_length=10
rows=1
sample_tweets="no"
screen_numbered_seeds="no"
seedfile=""
seedfortheday=""
seedsource="PageKicker"
SEOmodule_status="off"
seriesdescriptionfilename="default.html"
shortform="no"
singleseed=""
singleseedwebformid='"/item/singleseed"'
sku=`tail -1 < "$LOCAL_DATA""SKUs/sku_list"`
slash="/"
slidebodyfont="DejaVu-Sans"  #Decimator
special_lasts_minutes="43200"
special_price="0"
special_to_buffer="2592000"
specialstoreid="0"
sq="'"
status="Enabled"
stopimagefolder="none" #default
storecode="admin"
storeids="0"
subtitle=""
summarizer_ngram_threshold=2
summarizer_on=Y
summary_length=10
summary="both"
text_extraction_on="yes"
thumbxsize=120 #default
thumbysize=120 #default
tldr=""
top_q="20" # number of nerv lines used divided by 2
toplabelfont="Utopia" #  #Decimator must be available font
toplabelfontname="Utopia" #Decimator
txtformatname=".txt"
txtwildcard="*.txt"
twitter_announcement="no"
two1="no"
type="downloadable"
userdatadir="none"
userdescription="no"
userid="1"
userlogo="assets/imprint.png"
verbose="no"
visibility="Catalog,Search"
websites="base"
wikilocale="en"
wordcount=0
wordcountpages=0
wordcountsummaries=0
x="x" # for imagemagick scripts
xmlstarletwebformstart="xmlstarlet sel -t -v"
xpathwebformid='"/item/webform_id"'
yourname="no"


text:
package alec_wam.CrystalMod.asm;

import java.util.Map;

import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;

//-Dfml.coreMods.load=alec_wam.CrystalMod.asm.LoadingPlugin
@IFMLLoadingPlugin.SortingIndex(1001)
public class LoadingPlugin implements IFMLLoadingPlugin
{
	public static boolean IN_MCP = false;

	@Override
	public String[] getASMTransformerClass()
	{
		return new String[] { ClassTransformer.class.getName() };
	}

	@Override
	public String getModContainerClass()
	{
		return null;
	}

	@Override
	public String getSetupClass()
	{
		return null;
	}

	@Override
	public void injectData(Map<String, Object> data)
	{
		IN_MCP = !(Boolean) data.get("runtimeDeobfuscationEnabled");
	}

	@Override
	public String getAccessTransformerClass()
	{
		return null;
	}

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<SyncNode>
  <SyncVersion>20110614</SyncVersion>
  <SyncNodeElements>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALI=</Component>
      <Component ccnbencoding="base64Binary">3E8SyBYXgGttqGEKcE2gkjxpS+n0UHdwdw96aZKqHzg=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALM=</Component>
      <Component ccnbencoding="base64Binary">ZTQ0d79oYC30CpijbB/TT6GgHMz3xWjmkof17NlEgcs=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALQ=</Component>
      <Component ccnbencoding="base64Binary">8p9wQUEw15yIkhfULASrTRotndYrNhGLoNqp01NpBv0=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALU=</Component>
      <Component ccnbencoding="base64Binary">8xRLrmZI2GmRLEtPp9aFmgsRq1REylcVoMSU0IBk+zA=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALY=</Component>
      <Component ccnbencoding="base64Binary">2QxZ6RZLRfPZXIe8QtFos6D8HBaGL+nJ7qvqSpKzpV0=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALc=</Component>
      <Component ccnbencoding="base64Binary">KhMHRhw2xk70TF3jVi7kDR/Ip+2cwbFRaSL7VXJeiIY=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALg=</Component>
      <Component ccnbencoding="base64Binary">zov02G0GluH3ltF9Ay05P3WpdWBfWyEXtXfyKLxOn0o=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALk=</Component>
      <Component ccnbencoding="base64Binary">/mzIk0VyNvxAtFJ7yx75V7SLh6pqpIy9qt8s1Pw3T1g=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALo=</Component>
      <Component ccnbencoding="base64Binary">O4VSPZMb3/MIymCb2DrEeSzGkNnNsCsS1+etW//RzLo=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALs=</Component>
      <Component ccnbencoding="base64Binary">b1tNXBhiMSvsNMWxoh9xb5y8geS8zKlfn7wzKgjGk/o=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ALw=</Component>
      <Component ccnbencoding="base64Binary">fw9mxKLA2atvUoQx4tBpY/enG9LKe7qvG8khVHuzBUw=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AL0=</Component>
      <Component ccnbencoding="base64Binary">Y6ZEojlxFwruX4Twv0z9g2GIIMDRYc6G9OL7j/atUMI=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AL4=</Component>
      <Component ccnbencoding="base64Binary">RvIGIKA3GNBE3JWuy6Qss8XYIy74fpJra1VAzbepoeQ=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AL8=</Component>
      <Component ccnbencoding="base64Binary">Y5zHzIwu2yQpp0YsZSklyPkdw1BQ9LdKuOwPZp6d9tY=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMA=</Component>
      <Component ccnbencoding="base64Binary">3BTlRo1mwRPAUautxZ0CVAufghd69b4xL72grBTDB8M=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AME=</Component>
      <Component ccnbencoding="base64Binary">tmTun6Ll1OIYXrrjlSSaCk8pwinqSrZaKf3QSgF0PGc=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMI=</Component>
      <Component ccnbencoding="base64Binary">iyye1pUaqEEmonxcEpwukUZMUccB3A36PdQXI0eGOTk=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMM=</Component>
      <Component ccnbencoding="base64Binary">xuyEuLx1Irc+A+4h2sV2QeNj7XEi5tzHfYkQabJqeVw=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMQ=</Component>
      <Component ccnbencoding="base64Binary">B4BVgPRDQW/bkYQro1H+inh3RfIWB/ge8+iDDW/JYHk=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMU=</Component>
      <Component ccnbencoding="base64Binary">nOa43kFz2Cyr4hCN6aQIMGasIFzbZklDxPhDQjt7/XA=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMY=</Component>
      <Component ccnbencoding="base64Binary">XqAwhpvyyg/ohcTWbfhUErUklCmtsrWq8ryCbqihpNs=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMc=</Component>
      <Component ccnbencoding="base64Binary">X3vsppTEOwIG4aYGpaikzx8Q7IATudGpq+6F2tg+iGM=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMg=</Component>
      <Component ccnbencoding="base64Binary">plnAXURPufXVt4cmrVudk63mURal2gQF+3+qPyJ0xWs=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMk=</Component>
      <Component ccnbencoding="base64Binary">JizuwLVAgVSndhQi0nAEzzDHq3telhBujyg2CZE5j0Q=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMo=</Component>
      <Component ccnbencoding="base64Binary">yUI3GGhbtKWX8j5F6iqXnlPAQ1aKe2kQZ92BwETSoKo=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMs=</Component>
      <Component ccnbencoding="base64Binary">7ETsTE+8YLL3gK7tJq+u7t/iIYZfMNi0Tddm3q4qpnM=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AMw=</Component>
      <Component ccnbencoding="base64Binary">IcS3JCMNLI8M8m/8EtWuegRn0wuX4seEsdj6KddLeFI=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AM0=</Component>
      <Component ccnbencoding="base64Binary">cOh9JhLt41VcXLJ5EouY7S+sguY6GDCJXhNGxBBpMPE=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AM4=</Component>
      <Component ccnbencoding="base64Binary">4LMfmbLq/gaKT4QjhEEkPpU55YxZ7uWZFWiTghfCWBc=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">AM8=</Component>
      <Component ccnbencoding="base64Binary">ehrL6udg77FBpSNvvE2gt+Fh8WGyY3luE64eQ+rU+Z4=</Component>
    </Name>
    <Name>
      <Component ccnbencoding="base64Binary">cm9vdA==</Component>
      <Component ccnbencoding="base64Binary">YmVlcg==</Component>
      <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
      <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
      <Component ccnbencoding="base64Binary">ANA=</Component>
      <Component ccnbencoding="base64Binary">0l/qD4Qz6OXuFFTzhs/m/QkJUChmJ+k7frvtQon7sxw=</Component>
    </Name>
  </SyncNodeElements>
  <SyncContentHash ccnbencoding="base64Binary">EbhzOhsEeBdMJsTp08r6MIbNxvGrKET31hSuETEl1dr3</SyncContentHash>
  <Name>
    <Component ccnbencoding="base64Binary">cm9vdA==</Component>
    <Component ccnbencoding="base64Binary">YmVlcg==</Component>
    <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
    <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
    <Component ccnbencoding="base64Binary">ALI=</Component>
    <Component ccnbencoding="base64Binary">3E8SyBYXgGttqGEKcE2gkjxpS+n0UHdwdw96aZKqHzg=</Component>
  </Name>
  <Name>
    <Component ccnbencoding="base64Binary">cm9vdA==</Component>
    <Component ccnbencoding="base64Binary">YmVlcg==</Component>
    <Component ccnbencoding="base64Binary">ZmxvYXQ=</Component>
    <Component ccnbencoding="base64Binary">/QT0wMfkPw==</Component>
    <Component ccnbencoding="base64Binary">ANA=</Component>
    <Component ccnbencoding="base64Binary">0l/qD4Qz6OXuFFTzhs/m/QkJUChmJ+k7frvtQon7sxw=</Component>
  </Name>
  <SyncNodeKind>0</SyncNodeKind>
  <SyncLeafCount>31</SyncLeafCount>
  <SyncTreeDepth>1</SyncTreeDepth>
  <SyncByteCount>0</SyncByteCount>
</SyncNode>
<!-- ccnx:/Topo/%C1.S.nf/%C9R%A1%9EK%0D8%22%C8R%83%C8J%E5%15%07%B5%03%226%F3%CE%9Fz%19~T%9B%18%AAc%F3/%11%B8s%3A%1B%04x%17L%26%C4%E9%D3%CA%FA0%86%CD%C6%F1%AB%28D%F7%D6%14%AE%111%25%D5%DA%F7 -->


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.data.cosmos.internal.directconnectivity.rntbd;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandler;
import io.netty.handler.codec.MessageToByteEncoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class RntbdRequestEncoder extends MessageToByteEncoder {

    private static final Logger logger = LoggerFactory.getLogger(RntbdRequestEncoder.class);

    /**
     * Returns {@code true} if the given message is an @{link RntbdRequest} instance
     *

     * If {@code false} this message should be passed to the next {@link ChannelOutboundHandler} in the pipeline.
     *
     * @param message the message to encode
     * @return {@code true}, if the given message is an an {@link RntbdRequest} instance; otherwise @{false}
     */
    @Override
    public boolean acceptOutboundMessage(final Object message) {
        return message instanceof RntbdRequestArgs;
    }

    /**
     * Encode a message into a {@link ByteBuf}
     *

     * This method will be called for each message that can be written by this encoder.
     *
     * @param context the {@link ChannelHandlerContext} which this {@link MessageToByteEncoder} belongs encode
     * @param message the message to encode
     * @param out     the {@link ByteBuf} into which the encoded message will be written
     */
    @Override
    protected void encode(final ChannelHandlerContext context, final Object message, final ByteBuf out) throws Exception {

        final RntbdRequest request = RntbdRequest.from((RntbdRequestArgs) message);
        final int start = out.writerIndex();

        try {
            request.encode(out);
        } catch (final Throwable error) {
            out.writerIndex(start);
            throw error;
        }

        if (logger.isDebugEnabled()) {
            final int length = out.writerIndex() - start;
            logger.debug("{}: ENCODE COMPLETE: length={}, request={}", context.channel(), length, request);
        }
    }
}


text:
package guru.nidi.codeassert.jacoco;

import guru.nidi.codeassert.Analyzer;
import guru.nidi.codeassert.AnalyzerResult;
import guru.nidi.codeassert.config.ValuedLocation;

import java.util.List;

public class JacocoResult extends AnalyzerResult<List<ValuedLocation>> {
    private final CoverageType[] types;

    JacocoResult(Analyzer<List<ValuedLocation>> analyzer, List<ValuedLocation> findings,
                 List<String> unusedActions, CoverageType[] types) {
        super(analyzer, findings, unusedActions);
        this.types = types;
    }

    public CoverageType[] getTypes() {
        return types;
    }
}


text:
@interface WFPsychicController ()

@end

@implementation WFPsychicController

- (void)viewDidLoad {
    [super viewDidLoad];
    // ////***********************************写死*************************************
    WFThemeModel *themeModel = [[WFThemeModel alloc] init];
    themeModel.themeId = @"13";
    themeModel.themeName = @"日常心理学";

    self.viewModel.themeModel = themeModel;

}

- (void)viewWillAppear:(BOOL)animated{

    [super viewWillAppear:animated];
    [self configNavBarUI];

}

@end


text:
/** namey */
window.namey = {

    /*
     * Lightweight JSONP fetcher
     * Copyright 2010 Erik Karlsson. All rights reserved.
     * BSD licensed
     */
    // Lightweight JSONP fetcher - www.nonobtrusive.com
    jsonP:(function(){var a=0,c,f,b,d=this;function e(j){var i=document.createElement("script"),h=false;i.src=j;i.async=true;i.onload=i.onreadystatechange=function(){if(!h&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){h=true;i.onload=i.onreadystatechange=null;if(i&&i.parentNode){i.parentNode.removeChild(i)}}};if(!c){c=document.getElementsByTagName("head")[0]}c.appendChild(i)}function g(h,j,k){f="?";j=j||{};for(b in j){if(j.hasOwnProperty(b)){f+=encodeURIComponent(b)+"="+encodeURIComponent(j[b])+"&"}}var i="json"+(++a);d[i]=function(l){k(l);try{delete d[i]}catch(m){}d[i]=null;};e(h+f+"callback="+i);return i}return{get:g}}()),

    /**
     * API for namey random name generator.  There's two basic ways to use it.  First, just call namey.get with a callback:
     *
     * namey.get(function(n) { console.log(n); }); => ["John Clark"]
     *
     * The call returns an array because there's an option to request more than one random name. For example:
     *
     * namey.get({ count: 3, callback: function(n) { console.log(n); }}); ; => ["John Cook", "Ruth Fisher", "Donna Collins"]
     *
     * Here's the full list of parameters:
     *
     * count -- how many names you would like (default: 1)
     *
     * type -- what sort of name you want 'female', 'male', 'surname', or leave blank if you want both genders
     *
     * with_surname -- true/false, if you want surnames with the first
     * name. If false, you'll just get first names.  Default is true.
     *
     * frequency -- 'common', 'rare', 'all' -- default is 'common'. This
     * picks a subset of names from the database -- common names are
     * names that occur frequently, rare is names that occur rarely.
     *
     * min_freq/max_freq  -- specific values to get back a really
     * specific subset of the names db. values should be between 0 and
     * 100. You probably don't need this, but here's an example:
     * namey.get({ count: 3, min_freq: 30, max_freq: 50, callback: function(n) { console.log(n); }});
     * => ["Crystal Zimmerman", "Joshua Rivas", "Tina Bryan"]
     *
     * callback -- a function to do something with the data.  The data
     * passed in will be an array of names -- use them wisely.
     *
     */
    get : function(options) {
	      var callback;
	      var tmp_params = {};
        var host = "namey.muffinlabs.com";
        //var host = window.location.host;

	      if ( typeof(options) == "function" ) {
	          callback = options;
	      }
	      else if ( typeof(options) == "object" ) {
	          callback = options.callback;

            if ( typeof(options.host) !== "undefined" ) {
                host = options.host;
            }

	          if ( typeof(options.count) == "undefined" ) {
		            options.count = 1;
	          }
	          tmp_params.count = options.count;

	          if ( typeof(options.type) != "undefined" && options.type != "both" ) {
		            tmp_params.type = options.type;
	          };

	          if ( options.type != "surname" && typeof(options.with_surname) != "undefined" ) {
		            tmp_params.with_surname = options.with_surname;
	          }
	          if ( options.min_freq ) {
		            tmp_params.min_freq = options.min_freq;
		            tmp_params.max_freq = options.max_freq;
	          }
	          else if ( typeof(options.frequency) != "undefined" ) {
		            tmp_params.frequency = options.frequency;
	          }

	      }

	      this.jsonP.get('http://' + host + '/name.json', tmp_params, function(d) {
	          if ( typeof(callback) == "function" ) {
		            callback(d);
	          }
	          else {
		            console.log(d);
	          }
	      });
    }
}

namey.get({ count: 3, callback: function(n) { console.log(n); }}); ;


text:
rule:
  aip: 132
  name: [core, '0132', response-message-name]
  summary: List methods must have standardized response message names.
permalink: /132/response-message-name
redirect_from:
  - /0132/response-message-name
---

# List methods: Response message

This rule enforces that all `List` RPCs have a response message name of
`List*Response`, as mandated in [AIP-132][].

## Details

This rule looks at any message matching beginning with `List`, and complains if
the name of the corresponding returned message does not match the name of the
RPC with the suffix `Response` appended.

## Examples

**Incorrect** code for this rule:

```proto
// Incorrect.
// Should be `ListBooksResponse`.
rpc ListBooks(ListBooksRequest) returns (Books) {
  option (google.api.http) = {
    get: "/v1/{parent=publishers/*}/books"
  };
}
```

**Correct** code for this rule:

```proto
// Correct.
rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) {
  option (google.api.http) = {
    get: "/v1/{parent=publishers/*}/books"
  };
}
```

## Disabling

If you need to violate this rule, use a leading comment above the method.
Remember to also include an [aip.dev/not-precedent][] comment explaining why.

```proto
// (-- api-linter: core::0132::response-message-name=disabled
//     aip.dev/not-precedent: We need to do this because reasons. --)
rpc ListBooks(ListBooksRequest) returns (Books) {
  option (google.api.http) = {
    get: "/v1/{parent=publishers/*}/books"
  };
}
```

If you need to violate this rule for an entire file, place the comment at the
top of the file.

[aip-132]: https://aip.dev/132
[aip.dev/not-precedent]: https://aip.dev/not-precedent


text:
user = User.create(name: "Messaging Bot", email: "default-user@email.com", password: "12345678", password_confirmation: "12345678")
puts "Created user: #{user.name}"


text:
//
//  SFCommittee.h
//  Congress
//
//  Created by Jeremy Carbaugh on 7/19/13.
//  Copyright (c) 2013 Sunlight Foundation. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SFSynchronizedObject.h"
#import "SFLegislator.h"

@interface SFCommittee : SFSynchronizedObject <SFSynchronizedObject>

@property (nonatomic, copy) NSString *committeeId;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *chamber;
@property (nonatomic, strong) NSString *url;
@property (nonatomic, strong) NSString *office;
@property (nonatomic, strong) NSString *phone;
@property (nonatomic, strong) SFCommittee *parentCommittee;
@property (nonatomic, strong) NSArray *members;
@property (nonatomic) BOOL isSubcommittee;

@property (nonatomic, readonly) NSString *prefixName;
@property (nonatomic, readonly) NSString *primaryName;
@property (nonatomic, readonly) SFLegislator *chairman;
@property (nonatomic, readonly) SFLegislator *rankingMember;
@property (nonatomic, readonly) NSString *shareURL;

@end

/* SFCommitteeMember */

@interface SFCommitteeMember : SFSynchronizedObject <SFSynchronizedObject>

@property (nonatomic, strong) NSString *side;
@property (nonatomic) NSUInteger rank;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) SFLegislator *legislator;

@end


text:
/**
 * @file mip-clickup 康网链接点击记录
 * @author cnkang
 */

define(function (require) {
    var $ = require('zepto');
    var util = require('util');
    var platform = util.platform;
    var customElement = require('customElement').create();
    customElement.prototype.build = function () {
        $('.clickup').click(function () {
            var canshu = $('.canshu').html();
            var shuliang = parseFloat(10000000000000 * Math.random());
            $.ajax({url: 'https://m.cnkang.com/api/urlview?position=' + canshu + '&' + new Date().getTime() + shuliang});
        });
    };
    return customElement;
});


text:
Jmbo Calendar
=============
**Jmbo calendar application. Provides calendars and events.**

.. figure:: https://travis-ci.org/praekelt/jmbo-calendar.svg?branch=develop
   :align: center
   :alt: Travis

.. contents:: Contents
    :depth: 5

Installation
------------
todo: mention humanize, atlas, postgis, why cal exists. ckeditor.

Content types
-------------


text:
package graphedit.model.elements;

import graphedit.model.components.GraphElement;
import graphedit.model.components.Link;
import graphedit.model.properties.PropertyEnums.LinkProperties;
import kroki.uml_core_basic.UmlNamedElement;

public interface GraphEditElement {

	public UmlNamedElement getUmlElement();
	public GraphElement element();
	public void setUmlElement(UmlNamedElement umlElement);
	public void setElement(GraphElement element);
	public void setName(String newName);
	public void link(Link link, Object...args);
	public void unlink(Link link, Object...args);
	public void changeLinkProperty(Link link, LinkProperties property, Object newValue, Object...args);
	public void setOldLink(Link link, Object...args);

}


text:
/**
 * Test file for Job: detectors
 */

var assert = require ('assert');
var detectors_SUT = require('../detectors');

var mockedConfig, mockedDependencies;

describe ('detectors test', function(){

  beforeEach(function (done) {

    mockedConfig = {
      globalAuth: {
        myconfigKey: {
          username: "myusername",
          password: "secretpassword"
        }
      },
      interval: 20000
    };

    mockedDependencies = {
      logger: console,
      easyRequest : {
        JSON : function (options, cb) {
          cb(null, {});
        }
      }
    };

    done();
  });

  it('should have tests :D', function (done){
    assert.ok(false, 'we don\'t have any tests :(');
    done();
  });

  describe ('config checks', function(){
    it('should check for valid credentials', function (done){
      // there are some nice examples of how to unit tests configuration handling
      // in the Atlassian package:
      // https://bitbucket.org/atlassian/atlasboard-atlassian-package/src/master/jobs
      done();
    });
  });

  describe ('http request example tests', function(){
    it('should handle server errors', function (done){

      mockedDependencies.easyRequest.HTML = function (options, cb){
        cb(null, 'hello from google');
      };

      var config = {};
      detectors_SUT.onRun(config, mockedDependencies, function(err, data){
        assert.equal(data.html, 'hello from google', 'expected a different reply from google: ' + data.html);
        done();
      });
    });
  });

});


text:
#include <aws/shield/model/DeleteProtectionGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Shield::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

DeleteProtectionGroupRequest::DeleteProtectionGroupRequest() :
    m_protectionGroupIdHasBeenSet(false)
{
}

Aws::String DeleteProtectionGroupRequest::SerializePayload() const
{
  JsonValue payload;

  if(m_protectionGroupIdHasBeenSet)
  {
   payload.WithString("ProtectionGroupId", m_protectionGroupId);

  }

  return payload.View().WriteReadable();
}

Aws::Http::HeaderValueCollection DeleteProtectionGroupRequest::GetRequestSpecificHeaders() const
{
  Aws::Http::HeaderValueCollection headers;
  headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSShield_20160616.DeleteProtectionGroup"));
  return headers;

}


text:
package org.cyclops.integrateddynamics.core.evaluate.variable;

import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.Tag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
import org.cyclops.integrateddynamics.api.evaluate.variable.IValue;
import org.cyclops.integrateddynamics.api.evaluate.variable.IValueType;

import javax.annotation.Nullable;

/**
 * A list proxy for a capability of an entity.
 */
public abstract class ValueTypeListProxyEntityCapability<C, T extends IValueType<V>, V extends IValue> extends ValueTypeListProxyEntityBase<T, V> {

    private final Capability<C> capability;
    private Direction side;

    public ValueTypeListProxyEntityCapability(ResourceLocation name, T valueType, Level world, Entity entity,
                                              Capability<C> capability, @Nullable Direction side) {
        super(name, valueType, world, entity);
        this.capability = capability;
        this.side = side;
    }

    protected LazyOptional<C> getCapability() {
        Entity e = getEntity();
        if(e != null) {
            return e.getCapability(this.capability, this.side);
        }
        return LazyOptional.empty();
    }

    @Override
    public void writeGeneratedFieldsToNBT(CompoundTag tag) {
        super.writeGeneratedFieldsToNBT(tag);
        if (side != null) {
            tag.putInt("side", side.ordinal());
        }
    }

    @Override
    public void readGeneratedFieldsFromNBT(CompoundTag tag) {
        super.readGeneratedFieldsFromNBT(tag);
        if (tag.contains("side", Tag.TAG_INT)) {
            this.side = Direction.values()[tag.getInt("side")];
        }
    }
}


text:
C
C+mapping_system
C
      subroutine mapping_system(interp,iocmd_results,def_sf,def_lsf,s)
C
C     The mapping system within postmortem.
C
C     Given:
C         TCL interpreter
              integer             interp(*)
C         results string
              character*(*)       iocmd_results
C         Current sample file name
              character*(*)       def_sf
C         Current logical sample file key
              integer             def_lsf

C     Returned:
C         Status variable - must be zero on entry - otherwise error
              integer             s
C
C     Combines all the mapping system functions in one place.
C
C-
C     ****************************************************************
C
C     Local constant and variable declarations
C
C     Constants
          include '/mrao/post/include/mapping_commands.inc'
          include '/mrao/post/include/lsflib_errors.inc'
          include '/mrao/post/include/post_common.inc'
          include '/mrao/include/chrlib_functions.inc'
          include '/mrao/include/iolib_errors.inc'

C     Variables, equivalences and commons
C         Current command.
              integer         command
C         Fortran unit number of current map.
              integer         lun
C         Current default map directory
              character*32    map_dir
C         General purpose file name.
              character*64    file_name
C         New lsf key
              integer         new_lsf
C         Dummy variables used for batch submission
c             integer         i4_values(20)
c             real*4          r4_values(20)
c             real*8          r8_values(20)
C         Command line prompt and length.
              character*40    prompt
              integer         lp
              data            prompt, lp / 'Map> ', 5 /
C         General purpose string, indexes and length
              character*80    string
              integer         i1, i2
              integer         ls
C         Current redtape save buffer
              integer         buffer(512)
C         Environment variables returned from io_enqexe
C         Current and previous output device unit number.
              integer         out, old_out

C     ****************************************************************
C
C     Subroutine initialisation
C
      if ( s .ne. 0 ) return

      if ( .not.map_init ) then
          call enmdir( map_dir, s )
          i2 = chr_ilstc( def_sf, '/') - 1
          i1 = chr_ilstc( def_sf(1:i2), '/') + 1
          call io_makfil( map_dir, def_sf(i1:i2), 'map', def_map, ls )
          call io_wrout( ' ' )
          string = 'Initialising map for ' // def_sf
          call io_wrout( string )
          call map_init_redtape( def_sf, def_lsf, s )
          call io_wrout( ' ' )
          map_init = .true.
      end if

C     ****************************************************************
C
C         Main Code
C         ---------
C

          call io_getcmd(prompt(1:lp), cmd_list, num_cmds, command, s)

          if (s .ne. 0) then
              continue
          else if ( command .eq. set_sample_file_cmd ) then
              file_name  = ' '
              new_lsf = -1
              call map_init_redtape( file_name, new_lsf, s )
              if ( s .eq. 0 ) then
                  def_sf  = file_name
                  def_lsf = new_lsf
                  call io_wrout ( ' ' )
                  call io_wrout ( def_sf )
                  call io_wrout ( ' ' )
                  i2 = chr_ilstc( def_sf, '/') - 1
                  i1 = chr_ilstc( def_sf(1:i2), '/') + 1
                  call io_makfil( map_dir, def_sf(i1:i2), 'map',
     *                                                     def_map, ls )
              end if
          else if (command .eq. set_lsf_cmd) then
              new_lsf = 0
              call map_init_redtape( def_sf, new_lsf, s )
              if ( s .eq. 0 ) then
                  def_lsf = new_lsf
              else if ( s .eq. NO_LSFSAVED ) then
                  s = 0
                  call io_wrout( 'No logical sample files are saved.' )
              end if
          else if ( command .eq. open_map_cmd ) then
              file_name = ' '
              call dpredt( buffer, s )
              call getmap( 'Map name : ', def_map, file_name, s )
              if ( s .eq. 0 ) then
                call opemap( lun, file_name, 'READ', 0, s )
                call rdredt( lun, 0, s )
                call map_chredt( s )
                close ( lun )
              end if

              if ( s .eq. 0 ) then
                call io_wrout( ' ' )
                def_map = file_name
                call enmlsf( 1, file_name, new_lsf, s )
                call enq_sfname( file_name, file_name, .false., s )
                if (s.ne.0) then
                  s = 0
                  call io_wrout('The LSF for this map is not available')
                else
                  call io_wrout( def_map )
                  def_sf  = file_name
                  def_lsf = new_lsf
                end if
              else if ( s .ne. usr_break ) then
                s = 0
               call io_wrout('That file is not a properly defined map.')
                call ldredt( buffer, s )
              end if
              call io_wrout( ' ' )
          else if ( command .eq. save_map_cmd ) then
              call map_save( def_map, s )
          else if ( command .eq. select_conv_cmd ) then
              call map_sel_conv( s )
          else if ( command .eq. select_grading_cmd ) then
              call map_sel_grading( s )
          else if ( command .eq. select_weight_cmd ) then
              call map_sel_weight( s )
          else if ( command .eq. select_size_cmd ) then
              call map_sel_size( s )
          else if ( command .eq. select_type_cmd ) then
              call map_sel_type( def_map, s )
          else if ( command .eq. select_proj_cmd ) then
              call map_sel_proj( s )
          else if ( command .eq. select_gr_cent_cmd ) then
              call map_sel_gr_cent( s )
          else if ( command .eq. select_uv_cent_cmd ) then
              call map_sel_uv_cent( s )
          else if ( command .eq. add_lsf_cmd ) then
              call map_add_lsf( s )
          else if ( command .eq. delete_lsf_cmd ) then
              call map_delete_lsf( s )
          else if ( command .eq. plot_cmd ) then
              call map_plot( plot_device, s )
          else if ( command .eq. print_redtape_cmd ) then
              call io_enqout( old_out )
              call io_opeout( out, s )
              call exm_print( 'ALL', s )
              if ( out .ne. old_out ) then
                  call io_close( out, s )
                  call io_setout( old_out )
              end if
          else if ( command .eq. make_map_cmd ) then
              file_name = ' '
              call io_system( 'setenv SAMPDIR '//def_dir, s )
              call getmap( 'Map name : ', def_map, file_name, s )
              call io_system( '/mrao/bin/mapper '//file_name//' &', s )
              if ( s .eq. 0 ) then
                  def_map = file_name
                  call io_wrout( ' ' )
                  call io_wrout( def_map )
                  call io_wrout( ' ' )
              end if
          else if ( command .eq. exit_cmd ) then
              map_init = .false.
          else
              ls = chr_lend( cmd_list(command), '.' )
              call io_wrout(
     *          'Command '//cmd_list(command)(1:ls)//'not implemented.')
          end if

C         Restore status.
          if ( s .eq. usr_break ) s = 0
          if ( s .ne. 0 ) goto 9999

      return

C     ****************************************************************
C
C         Error Handling
C         --------------
C
 9999 continue
          call io_wrerr( s, 'in subroutine MAPPING_SYSTEM' )
          return
      end


text:
<!--
  ~ 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>
    <groupId>org.apache.parquet</groupId>
    <artifactId>parquet</artifactId>
    <relativePath>../pom.xml</relativePath>
    <version>1.9.1-SNAPSHOT</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>

  <artifactId>parquet-thrift</artifactId>
  <packaging>jar</packaging>

  <name>Apache Parquet Thrift</name>
  <url>https://parquet.apache.org</url>

  <properties>
    <elephant-bird.version>4.4</elephant-bird.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-column</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-hadoop</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>${hadoop.version}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.twitter.elephantbird</groupId>
      <artifactId>elephant-bird-core</artifactId>
      <version>${elephant-bird.version}</version>
    </dependency>
    <dependency>
      <groupId>com.twitter.elephantbird</groupId>
      <artifactId>elephant-bird-pig</artifactId>
      <version>${elephant-bird.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-jackson</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${jackson.groupId}</groupId>
      <artifactId>jackson-mapper-asl</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>${jackson.groupId}</groupId>
      <artifactId>jackson-core-asl</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-column</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-pig</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.pig</groupId>
      <artifactId>pig</artifactId>
      <version>${pig.version}</version>
      <classifier>${pig.classifier}</classifier>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>2.9.7</version>
      <scope>provided</scope>
    </dependency>
    <dependency> <!-- for pig runtime in tests -->
      <groupId>org.antlr</groupId>
      <artifactId>antlr-runtime</artifactId>
      <version>3.5.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.thrift</groupId>
      <artifactId>libthrift</artifactId>
      <version>${thrift.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${slf4j.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <!-- needed for Pig tests -->
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-hadoop</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>
      <!-- thrift -->
      <plugin>
        <groupId>org.apache.thrift</groupId>
        <artifactId>thrift-maven-plugin</artifactId>
        <version>${thrift-maven-plugin.version}</version>
        <configuration>
          <thriftExecutable>${thrift.executable}</thriftExecutable>
        </configuration>
        <executions>
          <execution>
            <id>thrift-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <activation>
        <os>
          <family>!windows</family>
        </os>
      </activation>
      <id>UnixClassOS</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
              <execution>
                <id>check-thrift-version</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>sh</executable>
                  <workingDirectory>${basedir}</workingDirectory>
                  <arguments>
                    <argument>-c</argument>
                    <argument>${thrift.executable} -version | fgrep 'Thrift version ${thrift.version}' && exit 0;
                      echo "=================================================================================";
                      echo "========== [FATAL] Build is configured to require Thrift version ${thrift.version} ==========";
                      echo -n "========== Currently installed: ";
                      ${thrift.executable} -version;
                      echo "=================================================================================";
                      exit 1
                    </argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>
  </profiles>

</project>


text:
import { root } from '../util/root';

/**
 * @param PromiseCtor
 * @return {Promise<T>}
 * @method toPromise
 * @owner Observable
 */
export function toPromise<T>(PromiseCtor?: typeof Promise): Promise<T> {
  if (!PromiseCtor) {
    if (root.Rx && root.Rx.config && root.Rx.config.Promise) {
      PromiseCtor = root.Rx.config.Promise;
    } else if (root.Promise) {
      PromiseCtor = root.Promise;
    }
  }

  if (!PromiseCtor) {
    throw new Error('no Promise impl found');
  }

  return new PromiseCtor((resolve, reject) => {
    let value: any;
    this.subscribe((x: T) => value = x, (err: any) => reject(err), () => resolve(value));
  });
}

export interface ToPromiseSignature<T> {
  (): Promise<T>;
  (PromiseCtor: typeof Promise): Promise<T>;
}


text:
package kuberuntime

import (
	"encoding/json"
	"fmt"
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"

	v1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/util/sets"
	runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
	"k8s.io/kubernetes/pkg/credentialprovider"
	kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
)

func TestPullImage(t *testing.T) {
	_, _, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	imageRef, err := fakeManager.PullImage(kubecontainer.ImageSpec{Image: "busybox"}, nil, nil)
	assert.NoError(t, err)
	assert.Equal(t, "busybox", imageRef)

	images, err := fakeManager.ListImages()
	assert.NoError(t, err)
	assert.Equal(t, 1, len(images))
	assert.Equal(t, images[0].RepoTags, []string{"busybox"})
}

func TestPullImageWithError(t *testing.T) {
	_, fakeImageService, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	fakeImageService.InjectError("PullImage", fmt.Errorf("test-error"))
	imageRef, err := fakeManager.PullImage(kubecontainer.ImageSpec{Image: "busybox"}, nil, nil)
	assert.Error(t, err)
	assert.Equal(t, "", imageRef)

	images, err := fakeManager.ListImages()
	assert.NoError(t, err)
	assert.Equal(t, 0, len(images))
}

func TestListImages(t *testing.T) {
	_, fakeImageService, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	images := []string{"1111", "2222", "3333"}
	expected := sets.NewString(images...)
	fakeImageService.SetFakeImages(images)

	actualImages, err := fakeManager.ListImages()
	assert.NoError(t, err)
	actual := sets.NewString()
	for _, i := range actualImages {
		actual.Insert(i.ID)
	}

	assert.Equal(t, expected.List(), actual.List())
}

func TestListImagesWithError(t *testing.T) {
	_, fakeImageService, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	fakeImageService.InjectError("ListImages", fmt.Errorf("test-failure"))

	actualImages, err := fakeManager.ListImages()
	assert.Error(t, err)
	assert.Nil(t, actualImages)
}

func TestGetImageRef(t *testing.T) {
	_, fakeImageService, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	image := "busybox"
	fakeImageService.SetFakeImages([]string{image})
	imageRef, err := fakeManager.GetImageRef(kubecontainer.ImageSpec{Image: image})
	assert.NoError(t, err)
	assert.Equal(t, image, imageRef)
}

func TestGetImageRefImageNotAvailableLocally(t *testing.T) {
	_, _, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	image := "busybox"

	imageRef, err := fakeManager.GetImageRef(kubecontainer.ImageSpec{Image: image})
	assert.NoError(t, err)

	imageNotAvailableLocallyRef := ""
	assert.Equal(t, imageNotAvailableLocallyRef, imageRef)
}

func TestGetImageRefWithError(t *testing.T) {
	_, fakeImageService, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	image := "busybox"

	fakeImageService.InjectError("ImageStatus", fmt.Errorf("test-error"))

	imageRef, err := fakeManager.GetImageRef(kubecontainer.ImageSpec{Image: image})
	assert.Error(t, err)
	assert.Equal(t, "", imageRef)
}

func TestRemoveImage(t *testing.T) {
	_, fakeImageService, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	_, err = fakeManager.PullImage(kubecontainer.ImageSpec{Image: "busybox"}, nil, nil)
	assert.NoError(t, err)
	assert.Equal(t, 1, len(fakeImageService.Images))

	err = fakeManager.RemoveImage(kubecontainer.ImageSpec{Image: "busybox"})
	assert.NoError(t, err)
	assert.Equal(t, 0, len(fakeImageService.Images))
}

func TestRemoveImageNoOpIfImageNotLocal(t *testing.T) {
	_, _, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	err = fakeManager.RemoveImage(kubecontainer.ImageSpec{Image: "busybox"})
	assert.NoError(t, err)
}

func TestRemoveImageWithError(t *testing.T) {
	_, fakeImageService, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	_, err = fakeManager.PullImage(kubecontainer.ImageSpec{Image: "busybox"}, nil, nil)
	assert.NoError(t, err)
	assert.Equal(t, 1, len(fakeImageService.Images))

	fakeImageService.InjectError("RemoveImage", fmt.Errorf("test-failure"))

	err = fakeManager.RemoveImage(kubecontainer.ImageSpec{Image: "busybox"})
	assert.Error(t, err)
	assert.Equal(t, 1, len(fakeImageService.Images))
}

func TestImageStats(t *testing.T) {
	_, fakeImageService, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	const imageSize = 64
	fakeImageService.SetFakeImageSize(imageSize)
	images := []string{"1111", "2222", "3333"}
	fakeImageService.SetFakeImages(images)

	actualStats, err := fakeManager.ImageStats()
	assert.NoError(t, err)
	expectedStats := &kubecontainer.ImageStats{TotalStorageBytes: imageSize * uint64(len(images))}
	assert.Equal(t, expectedStats, actualStats)
}

func TestImageStatsWithError(t *testing.T) {
	_, fakeImageService, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	fakeImageService.InjectError("ListImages", fmt.Errorf("test-failure"))

	actualImageStats, err := fakeManager.ImageStats()
	assert.Error(t, err)
	assert.Nil(t, actualImageStats)
}

func TestPullWithSecrets(t *testing.T) {
	// auth value is equivalent to: "username":"passed-user","password":"passed-password"
	dockerCfg := map[string]map[string]string{"index.docker.io/v1/": {"email": "passed-email", "auth": "cGFzc2VkLXVzZXI6cGFzc2VkLXBhc3N3b3Jk"}}
	dockercfgContent, err := json.Marshal(dockerCfg)
	if err != nil {
		t.Errorf("unexpected error: %v", err)
	}

	dockerConfigJSON := map[string]map[string]map[string]string{"auths": dockerCfg}
	dockerConfigJSONContent, err := json.Marshal(dockerConfigJSON)
	if err != nil {
		t.Errorf("unexpected error: %v", err)
	}

	tests := map[string]struct {
		imageName           string
		passedSecrets       []v1.Secret
		builtInDockerConfig credentialprovider.DockerConfig
		expectedAuth        *runtimeapi.AuthConfig
	}{
		"no matching secrets": {
			"ubuntu",
			[]v1.Secret{},
			credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{}),
			nil,
		},
		"default keyring secrets": {
			"ubuntu",
			[]v1.Secret{},
			credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{
				"index.docker.io/v1/": {Username: "built-in", Password: "password", Provider: nil},
			}),
			&runtimeapi.AuthConfig{Username: "built-in", Password: "password"},
		},
		"default keyring secrets unused": {
			"ubuntu",
			[]v1.Secret{},
			credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{
				"extraneous": {Username: "built-in", Password: "password", Provider: nil},
			}),
			nil,
		},
		"builtin keyring secrets, but use passed": {
			"ubuntu",
			[]v1.Secret{{Type: v1.SecretTypeDockercfg, Data: map[string][]byte{v1.DockerConfigKey: dockercfgContent}}},
			credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{
				"index.docker.io/v1/": {Username: "built-in", Password: "password", Provider: nil},
			}),
			&runtimeapi.AuthConfig{Username: "passed-user", Password: "passed-password"},
		},
		"builtin keyring secrets, but use passed with new docker config": {
			"ubuntu",
			[]v1.Secret{{Type: v1.SecretTypeDockerConfigJson, Data: map[string][]byte{v1.DockerConfigJsonKey: dockerConfigJSONContent}}},
			credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{
				"index.docker.io/v1/": {Username: "built-in", Password: "password", Provider: nil},
			}),
			&runtimeapi.AuthConfig{Username: "passed-user", Password: "passed-password"},
		},
	}
	for description, test := range tests {
		builtInKeyRing := &credentialprovider.BasicDockerKeyring{}
		builtInKeyRing.Add(test.builtInDockerConfig)
		_, fakeImageService, fakeManager, err := customTestRuntimeManager(builtInKeyRing)
		require.NoError(t, err)

		_, err = fakeManager.PullImage(kubecontainer.ImageSpec{Image: test.imageName}, test.passedSecrets, nil)
		require.NoError(t, err)
		fakeImageService.AssertImagePulledWithAuth(t, &runtimeapi.ImageSpec{Image: test.imageName, Annotations: make(map[string]string)}, test.expectedAuth, description)
	}
}

func TestPullThenListWithAnnotations(t *testing.T) {
	_, _, fakeManager, err := createTestRuntimeManager()
	assert.NoError(t, err)

	imageSpec := kubecontainer.ImageSpec{
		Image: "12345",
		Annotations: []kubecontainer.Annotation{
			{Name: "kubernetes.io/runtimehandler", Value: "handler_name"},
		},
	}

	_, err = fakeManager.PullImage(imageSpec, nil, nil)
	assert.NoError(t, err)

	images, err := fakeManager.ListImages()
	assert.NoError(t, err)
	assert.Equal(t, 1, len(images))
	assert.Equal(t, images[0].Spec, imageSpec)
}


text:
module InfluxDB
  module Query
    module Cluster # :nodoc:
      def create_cluster_admin(username, password)
        execute("CREATE USER \"#{username}\" WITH PASSWORD '#{password}' WITH ALL PRIVILEGES")
      end

      def list_cluster_admins
        list_users.select { |u| u["admin".freeze] }.map { |u| u["username".freeze] }
      end

      def revoke_cluster_admin_privileges(username)
        execute("REVOKE ALL PRIVILEGES FROM \"#{username}\"")
      end
    end
  end
end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Person</title>
<meta name="date" content="2015-07-12">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Class Person

java.lang.Object

Person

public class Person
extends java.lang.Object

Created by Serge Martial on 09/06/2015.

Field Summary

Fields

Modifier and Type
Field and Description

java.lang.Integer
age

java.lang.Float
height

java.lang.String
name

java.util.Optional<java.lang.Integer>
nb

java.lang.String
password

Constructor Summary

Constructors

Constructor and Description

Person()

Person(java.lang.String name,
      java.lang.Integer age,
      java.lang.Float height)

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

boolean
equals(java.lang.Object o)

java.lang.Integer
getAge()

java.lang.Float
getHeight()

java.lang.String
getName()

java.util.Optional<java.lang.Integer>
getNb()

java.lang.String
getPassword()

int
hashCode()

java.lang.String
toString()

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

name

public java.lang.String name

age

public java.lang.Integer age

password

public java.lang.String password

height

public java.lang.Float height

nb

public java.util.Optional<java.lang.Integer> nb

Constructor Detail

Person

public Person()

Person

public Person(java.lang.String name,
              java.lang.Integer age,
              java.lang.Float height)

Method Detail

equals

public boolean equals(java.lang.Object o)

Overrides:

equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:

hashCode in class java.lang.Object

getName

public java.lang.String getName()

getAge

public java.lang.Integer getAge()

getPassword

public java.lang.String getPassword()

getHeight

public java.lang.Float getHeight()

getNb

public java.util.Optional<java.lang.Integer> getNb()

toString

public java.lang.String toString()

Overrides:

toString in class java.lang.Object

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
__all__ = (
    'CLEError',
    'CLEUnknownFormatError',
    'CLEFileNotFoundError',
    'CLEInvalidBinaryError',
    'CLEOperationError',
)

class CLEError(Exception):
    pass

class CLEUnknownFormatError(CLEError):
    pass

class CLEFileNotFoundError(CLEError):
    pass

class CLEInvalidBinaryError(CLEError):
    pass

class CLEOperationError(CLEError):
    pass

class CLECompatibilityError(CLEError):
    pass


text:
0.7.3 - Fixes and improvements
------------------------------

0.7.2 - Minor bugfixes
----------------------

Fixes:
    - Fix issue when Cohen fails to be discovered by xbox 360 dlna client
    - Fix issue when using Lazy Container on Samsung AllShare on 2012 Samsung TV fails

0.7.0 - Cohen project started
-----------------------------

General:
    - lots of refactoring
    - removed lots of Coherence stuff
    - moved to lxml instead of (c)ElementTree
    - Twisted >= 14.0 is now required
    - livestreamer is now required
    - cleanups and fixes

Backends:
    - twitch.tv backend added

0.0.1 - 0.7.0 - Coherence project
---------------------------------

Changelog skipped


text:
package com.dianping.cat.report.page;

import org.unidal.helper.Threads.Task;
import org.unidal.lookup.annotation.Inject;

import com.dianping.cat.Cat;
import com.dianping.cat.config.server.AllReportConfigManager;
import com.dianping.cat.config.server.BlackListManager;
import com.dianping.cat.consumer.config.ProductLineConfigManager;
import com.dianping.cat.consumer.metric.MetricConfigManager;
import com.dianping.cat.system.page.router.config.RouterConfigManager;

public class ConfigReloadTask implements Task {

	@Inject
	private ProductLineConfigManager m_productLineConfigManager;

	@Inject
	private MetricConfigManager m_metricConfigManager;

	@Inject
	private RouterConfigManager m_routerConfigManager;

	@Inject
	private BlackListManager m_blackListManager;

	@Inject
	private AllReportConfigManager m_allTransactionConfigManager;

	@Override
	public String getName() {
		return "Config-Reload";
	}

	@Override
	public void run() {
		boolean active = true;
		while (active) {
			try {
				m_productLineConfigManager.refreshConfig();
			} catch (Exception e) {
				Cat.logError(e);
			}
			try {
				m_metricConfigManager.refreshConfig();
			} catch (Exception e) {
				Cat.logError(e);
			}
			try {
				m_routerConfigManager.refreshConfig();
			} catch (Exception e) {
				Cat.logError(e);
			}
			try {
				m_blackListManager.refreshConfig();
			} catch (Exception e) {
				Cat.logError(e);
			}
			try {
				m_allTransactionConfigManager.refreshConfig();
			} catch (Exception e) {
				Cat.logError(e);
			}
			try {
				Thread.sleep(60 * 1000L);
			} catch (InterruptedException e) {
				active = false;
			}
		}
	}

	@Override
	public void shutdown() {
	}

}


text:
import math
from timeit import Timer

def solve_p10_sieve():
    return sum(sieve_primes_up_to(2000000))

def solve_p10_sieve_w_generator():
    return sum(prime_sieve_generator(2000000))

def sieve_primes_up_to(num):
    num_list = list(range(num))
    num_list[1] = 0 # cross out 1, special case
    i = 2

    while num_list[i] <= int(math.sqrt(num))+1:
        cross_out_composite_multiples(num_list[i], num_list)
        i = next_non_crossed_out_index(i, num_list)

    return [x for x in num_list if x != 0]

def cross_out_composite_multiples(multiple, num_list):
    for composite in range(multiple*2, len(num_list), multiple):
        num_list[composite] = 0

def prime_sieve_generator(limit):
    num_list = [True] * limit
    num_list[0] = num_list[1] = False
    square_root_limit = int(math.sqrt(limit))+1
    for i, isprime in enumerate(num_list):
        if isprime:
            yield i
            if i > square_root_limit:
               continue #optimization, composites already marked
            for composite in range(i*2, len(num_list), i):
                num_list[composite] = False

def next_non_crossed_out_index(i, num_list):
    increment_index = True
    while increment_index:
        i += 1
        increment_index = num_list[i] == 0
    return i

if __name__ == '__main__':
    sieve_timer = Timer(solve_p10_sieve)
    sieve_generator_timer = Timer(solve_p10_sieve_w_generator)
    print("Filter approach: {0}".format(sieve_timer.timeit(1)))
    print("Generator approach: {0}".format(sieve_generator_timer.timeit(1)))

    print(solve_p10_sieve())
    print(solve_p10_sieve_w_generator())