text:
/***
* Inferno Engine v4 2015-2017
* Written by Tomasz "Rex Dex" Jonarski
*
* [#filter: command\tests #]
***/

#include "build.h"
#include "renderingTest.h"
#include "renderingTestShared.h"

#include "rendering/driver/include/renderingDriver.h"
#include "rendering/driver/include/renderingMicroOpWriter.h"

namespace rendering
{
    namespace test
    {
        /// indexed geometry test
        class RenderingTest_IndexedGeometry : public IRenderingTest
        {
            RTTI_DECLARE_VIRTUAL_CLASS(RenderingTest_IndexedGeometry, IRenderingTest);

        public:
            virtual void initialize() override final;
            virtual void render(microp::MicroOpWriter& cmd, const Uint32 frameIndex, const ImageRenderTargetView& backBufferView) override final;

        private:
            VertexIndexBunch<> m_indexedLineList;
            VertexIndexBunch<> m_indexedTriList;
            VertexIndexBunch<> m_indexedTriStrip;
            VertexIndexBunch<> m_indexedTriStripVertexRestart;
            PipelineLibrary m_shaders;
        };

        RTTI_BEGIN_TYPE_NOCOPY_CLASS(RenderingTest_IndexedGeometry);
        RTTI_METADATA(RenderingTestOrder).order(80);
        RTTI_END_TYPE();

        //---

        static const Uint32 GRID_SIZE_X = 64;
        static const Uint32 GRID_SIZE_Y = 16;

        static base::math::Color Rainbow(const Float x)
        {
            static const base::math::Color colors[] = {
                base::math::Color(148, 0, 211),
                 base::math::Color(75, 0, 130),
                 base::math::Color(0, 0, 255),
                 base::math::Color(0, 255, 0),
                 base::math::Color(255, 255, 0),
                 base::math::Color(255, 127, 0),
                 base::math::Color(255, 0, 0) };

            const auto numSegs = ARRAY_COUNT(colors) + 1;
            const auto i = (Int32)floor(fabs(x));
            const auto f = fabs(x) - (Float)i;

            return base::math::Blend(colors[i % numSegs], colors[(i + 1) % numSegs], f * 256.0f);
        }

        static const void PrepareRainbowVertices(const Float x, const Float y, const Float w, const Float h, VertexIndexBunch<>& outGeometry)
        {
            for (Uint32 py = 0; py < GRID_SIZE_Y; ++py)
            {
                for (Uint32 px = 0; px < GRID_SIZE_X; ++px)
                {
                    const auto dv = base::math::Vector2(px / (Float)GRID_SIZE_X, py / (Float)GRID_SIZE_Y);

                    Simple3DVertex v;
                    v.VertexPosition.x = x + w * dv.x;
                    v.VertexPosition.y = y + h * dv.y;
                    v.VertexPosition.z = 0.5f;
                    v.VertexColor = Rainbow(dv.length() * 17.0f);
                    outGeometry.m_vertices.pushBack(v);
                }
            }
        }

        static const void PrepareIndexedLineList(const Float x, const Float y, const Float w, const Float h, VertexIndexBunch<>& outGeometry)
        {
            PrepareRainbowVertices(x, y, w, h, outGeometry);

            for (Uint16 py = 0; py < GRID_SIZE_Y; ++py)
            {
                const Uint16 prevRow = range_cast<Uint16>((py - 1) * GRID_SIZE_X);
                const Uint16 thisRow = range_cast<Uint16>(py * GRID_SIZE_X);

                for (Uint16 px = 0; px < GRID_SIZE_X; ++px)
                {
                    if (px > 0)
                    {
                        outGeometry.m_indices.pushBack(thisRow + px - 1);
                        outGeometry.m_indices.pushBack(thisRow + px);
                    }

                    if (py > 0)
                    {
                        outGeometry.m_indices.pushBack(prevRow + px);
                        outGeometry.m_indices.pushBack(thisRow + px);
                    }
                }
            }
        }

        static const void PrepareIndexedTriangleList(const Float x, const Float y, const Float w, const Float h, VertexIndexBunch<>& outGeometry)
        {
            PrepareRainbowVertices(x, y, w, h, outGeometry);

            for (Uint16 py = 0; py < GRID_SIZE_Y; ++py)
            {
                const Uint16 prevRow = range_cast<Uint16>((py - 1) * GRID_SIZE_X);
                const Uint16 thisRow = range_cast<Uint16>(py * GRID_SIZE_X);

                for (Uint16 px = 0; px < GRID_SIZE_X; ++px)
                {
                    if (px > 0 && py > 0)
                    {
                        outGeometry.m_indices.pushBack(prevRow + px - 1);
                        outGeometry.m_indices.pushBack(prevRow + px);
                        outGeometry.m_indices.pushBack(thisRow + px);

                        outGeometry.m_indices.pushBack(prevRow + px - 1);
                        outGeometry.m_indices.pushBack(thisRow + px);
                        outGeometry.m_indices.pushBack(thisRow + px - 1);
                    }
                }
            }
        }

        static const void PrepareIndexedTriangleStrip(const Float x, const Float y, const Float w, const Float h, VertexIndexBunch<>& outGeometry)
        {
            PrepareRainbowVertices(x, y, w, h, outGeometry);

            for (Uint16 py = 0; py < GRID_SIZE_Y; ++py)
            {
                const Uint16 prevRow = range_cast<Uint16>((py - 1) * GRID_SIZE_X);
                const Uint16 thisRow = range_cast<Uint16>(py * GRID_SIZE_X);

                if (py > 1)
                    outGeometry.m_indices.pushBack(prevRow);

                for (Uint16 px = 0; px < GRID_SIZE_X; ++px)
                {
                    if (py > 0)
                    {
                        outGeometry.m_indices.pushBack(prevRow + px);
                        outGeometry.m_indices.pushBack(thisRow + px);
                    }
                }

                if (py > 0)
                    outGeometry.m_indices.pushBack(thisRow + GRID_SIZE_X - 1);
            }
        }

        static const void PrepareIndexedTriangleStripWithVertexRestart(const Float x, const Float y, const Float w, const Float h, VertexIndexBunch<>& outGeometry)
        {
            PrepareRainbowVertices(x, y, w, h, outGeometry);

            for (Uint16 py = 0; py < GRID_SIZE_Y; ++py)
            {
                const Uint16 prevRow = range_cast<Uint16>((py - 1) * GRID_SIZE_X);
                const Uint16 thisRow = range_cast<Uint16>(py * GRID_SIZE_X);

                if (py > 1)
                    outGeometry.m_indices.pushBack(0xFFFF);

                for (Uint16 px = 0; px < GRID_SIZE_X; ++px)
                {
                    if (py > 0)
                    {
                        outGeometry.m_indices.pushBack(prevRow + px);
                        outGeometry.m_indices.pushBack(thisRow + px);
                    }
                }
            }
        }

        void RenderingTest_IndexedGeometry::initialize()
        {
            m_shaders = loadShader("IndexedGeometry.csl");

            Float y = -0.9f;
            Float ystep = 0.48f;
            Float ysize = ystep * 0.9f;

            // create test for indexed lists
            {
                PrepareIndexedLineList(-0.9f, y, 1.8f, ysize, m_indexedLineList);
                m_indexedLineList.createBuffers(*this);
                y += ystep;
            }

            // create test for triangle list
            {
                PrepareIndexedTriangleList(-0.9f, y, 1.8f, ysize, m_indexedTriList);
                m_indexedTriList.createBuffers(*this);
                y += ystep;
            }

            // create test for triangle strip
            {
                PrepareIndexedTriangleStrip(-0.9f, y, 1.8f, ysize, m_indexedTriStrip);
                m_indexedTriStrip.createBuffers(*this);
                y += ystep;
            }

            // create test for triangle strip with restart vertex
            {
                PrepareIndexedTriangleStripWithVertexRestart(-0.9f, y, 1.8f, ysize, m_indexedTriStripVertexRestart);
                m_indexedTriStripVertexRestart.createBuffers(*this);
                y += ystep;
            }
        }

        void RenderingTest_IndexedGeometry::render(microp::MicroOpWriter& cmd, const Uint32 frameIndex, const ImageRenderTargetView& backBufferView)
        {
            pipeline::FrameBuffer fb;
            fb.setColorAttachmentWithClearOverride(0, backBufferView, base::math::Vector4(0.0f, 0.0f, 0.2f, 1.0f));

            const auto drawPass = m_shaders.findGraphicsPass("Test");
            if (cmd.opBeingPass(drawPass, fb))
            {
                {
                    const auto func = drawPass.getFunction("drawLineList");
                    m_indexedLineList.draw(cmd, func);
                }

                {
                    const auto func = drawPass.getFunction("drawTriangleList");
                    m_indexedTriList.draw(cmd, func);
                }

                {
                    const auto func = drawPass.getFunction("drawTriangleStrip");
                    m_indexedTriStrip.draw(cmd, func);
                }

                {
                    const auto func = drawPass.getFunction("drawTriangleStripVertexRestart");
                    m_indexedTriStripVertexRestart.draw(cmd, func);
                }

                cmd.opEndPass();
            }
        }

    } // test
} // rendering


text:
import logging

from .common import Transport, AsyncPipeSink
from ..link import RemoteLink
from ..controller import Controller

# -----------------------------------------------------------------------------
# Logging
# -----------------------------------------------------------------------------
logger = logging.getLogger(__name__)

# -----------------------------------------------------------------------------
async def open_transport(name):
    '''
    Open a transport by name.
    The name must be <type>:<parameters>
    Where <parameters> depend on the type (and may be empty for some types).
    The supported types are: serial,udp,tcp,pty,usb
    '''
    scheme, *spec = name.split(':', 1)
    if scheme == 'serial' and spec:
        from .serial import open_serial_transport
        return await open_serial_transport(spec[0])
    elif scheme == 'udp' and spec:
        from .udp import open_udp_transport
        return await open_udp_transport(spec[0])
    elif scheme == 'tcp-client' and spec:
        from .tcp_client import open_tcp_client_transport
        return await open_tcp_client_transport(spec[0])
    elif scheme == 'tcp-server' and spec:
        from .tcp_server import open_tcp_server_transport
        return await open_tcp_server_transport(spec[0])
    elif scheme == 'ws-client' and spec:
        from .ws_client import open_ws_client_transport
        return await open_ws_client_transport(spec[0])
    elif scheme == 'ws-server' and spec:
        from .ws_server import open_ws_server_transport
        return await open_ws_server_transport(spec[0])
    elif scheme == 'pty':
        from .pty import open_pty_transport
        return await open_pty_transport(spec[0] if spec else None)
    elif scheme == 'file':
        from .file import open_file_transport
        return await open_file_transport(spec[0] if spec else None)
    elif scheme == 'vhci':
        from .vhci import open_vhci_transport
        return await open_vhci_transport(spec[0] if spec else None)
    elif scheme == 'hci-socket':
        from .hci_socket import open_hci_socket_transport
        return await open_hci_socket_transport(spec[0] if spec else None)
    elif scheme == 'usb':
        from .usb import open_usb_transport
        return await open_usb_transport(spec[0] if spec else None)
    elif scheme == 'pyusb':
        from .pyusb import open_pyusb_transport
        return await open_pyusb_transport(spec[0] if spec else None)
    elif scheme == 'android-emulator':
        from .android_emulator import open_android_emulator_transport
        return await open_android_emulator_transport(spec[0] if spec else None)
    else:
        raise ValueError('unknown transport scheme')

# -----------------------------------------------------------------------------
async def open_transport_or_link(name):
    if name.startswith('link-relay:'):
        link = RemoteLink(name[11:])
        await link.wait_until_connected()
        controller = Controller('remote', link = link)

        class LinkTransport(Transport):
            async def close(self):
                link.close()

        return LinkTransport(controller, AsyncPipeSink(controller))
    else:
        return await open_transport(name)

redpajama_set_name: RedPajamaGithub


text:
<?php

require_once('pinjector/Module.php');
require_once('PhpConfiguration.php');

/**
 *
 * @author Tobias Sarnowski
 */
class PhpConfigurationModule implements Module {

    /**
     * @var PhpConfiguration
     */
    private $config;

    public function __construct($file) {
        $this->config = new PhpConfiguration($file);
    }

    public function configure(Binder $binder) {
        $binder->bind('Configuration')->toInstance($this->config);
    }
}


text:
Testing ftp_alloc returns true
--CREDITS--
Rodrigo Moyle <eu [at] rodrigorm [dot] com [dot] br>
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
require 'skipif.inc';
?>
--FILE--
<?php
require 'server.inc';

$ftp = ftp_connect('127.0.0.1', $port);
if (!$ftp) die("Couldn't connect to the server");
ftp_login($ftp, 'user', 'pass');

var_dump(ftp_alloc($ftp, 1024, $result));
var_dump($result);
?>
--EXPECT--
bool(true)
string(20) "1024 bytes allocated"


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: AdditionalComparators.proto

package org.apache.spark.sql.hbase.util;

public final class AdditionalComparatorsProtos {
  private AdditionalComparatorsProtos() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface ByteArrayComparableOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // optional bytes value = 1;
    /**
     * optional bytes value = 1;
     */
    boolean hasValue();
    /**
     * optional bytes value = 1;
     */
    com.google.protobuf.ByteString getValue();
  }
  /**
   * Protobuf type {@code ByteArrayComparable}
   */
  public static final class ByteArrayComparable extends
      com.google.protobuf.GeneratedMessage
      implements ByteArrayComparableOrBuilder {
    // Use ByteArrayComparable.newBuilder() to construct.
    private ByteArrayComparable(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private ByteArrayComparable(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final ByteArrayComparable defaultInstance;
    public static ByteArrayComparable getDefaultInstance() {
      return defaultInstance;
    }

    public ByteArrayComparable getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private ByteArrayComparable(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              value_ = input.readBytes();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_ByteArrayComparable_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_ByteArrayComparable_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.class, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.Builder.class);
    }

    public static com.google.protobuf.Parser<ByteArrayComparable> PARSER =
        new com.google.protobuf.AbstractParser<ByteArrayComparable>() {
      public ByteArrayComparable parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new ByteArrayComparable(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser<ByteArrayComparable> getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    // optional bytes value = 1;
    public static final int VALUE_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString value_;
    /**
     * optional bytes value = 1;
     */
    public boolean hasValue() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * optional bytes value = 1;
     */
    public com.google.protobuf.ByteString getValue() {
      return value_;
    }

    private void initFields() {
      value_ = com.google.protobuf.ByteString.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, value_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, value_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable)) {
        return super.equals(obj);
      }
      org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable other = (org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable) obj;

      boolean result = true;
      result = result && (hasValue() == other.hasValue());
      if (hasValue()) {
        result = result && getValue()
            .equals(other.getValue());
      }
      result = result &&
          getUnknownFields().equals(other.getUnknownFields());
      return result;
    }

    private int memoizedHashCode = 0;
    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptorForType().hashCode();
      if (hasValue()) {
        hash = (37 * hash) + VALUE_FIELD_NUMBER;
        hash = (53 * hash) + getValue().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code ByteArrayComparable}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparableOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_ByteArrayComparable_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_ByteArrayComparable_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.class, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.Builder.class);
      }

      // Construct using org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        value_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_ByteArrayComparable_descriptor;
      }

      public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable getDefaultInstanceForType() {
        return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.getDefaultInstance();
      }

      public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable build() {
        org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable buildPartial() {
        org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable result = new org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.value_ = value_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable) {
          return mergeFrom((org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable other) {
        if (other == org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.getDefaultInstance()) return this;
        if (other.hasValue()) {
          setValue(other.getValue());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // optional bytes value = 1;
      private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * optional bytes value = 1;
       */
      public boolean hasValue() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * optional bytes value = 1;
       */
      public com.google.protobuf.ByteString getValue() {
        return value_;
      }
      /**
       * optional bytes value = 1;
       */
      public Builder setValue(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        value_ = value;
        onChanged();
        return this;
      }
      /**
       * optional bytes value = 1;
       */
      public Builder clearValue() {
        bitField0_ = (bitField0_ & ~0x00000001);
        value_ = getDefaultInstance().getValue();
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:ByteArrayComparable)
    }

    static {
      defaultInstance = new ByteArrayComparable(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:ByteArrayComparable)
  }

  public interface CustomComparatorOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required .ByteArrayComparable comparable = 1;
    /**
     * required .ByteArrayComparable comparable = 1;
     */
    boolean hasComparable();
    /**
     * required .ByteArrayComparable comparable = 1;
     */
    org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable getComparable();
    /**
     * required .ByteArrayComparable comparable = 1;
     */
    org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparableOrBuilder getComparableOrBuilder();
  }
  /**
   * Protobuf type {@code CustomComparator}
   */
  public static final class CustomComparator extends
      com.google.protobuf.GeneratedMessage
      implements CustomComparatorOrBuilder {
    // Use CustomComparator.newBuilder() to construct.
    private CustomComparator(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private CustomComparator(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final CustomComparator defaultInstance;
    public static CustomComparator getDefaultInstance() {
      return defaultInstance;
    }

    public CustomComparator getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private CustomComparator(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.Builder subBuilder = null;
              if (((bitField0_ & 0x00000001) == 0x00000001)) {
                subBuilder = comparable_.toBuilder();
              }
              comparable_ = input.readMessage(org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(comparable_);
                comparable_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000001;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_CustomComparator_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_CustomComparator_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator.class, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator.Builder.class);
    }

    public static com.google.protobuf.Parser<CustomComparator> PARSER =
        new com.google.protobuf.AbstractParser<CustomComparator>() {
      public CustomComparator parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new CustomComparator(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser<CustomComparator> getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    // required .ByteArrayComparable comparable = 1;
    public static final int COMPARABLE_FIELD_NUMBER = 1;
    private org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable comparable_;
    /**
     * required .ByteArrayComparable comparable = 1;
     */
    public boolean hasComparable() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * required .ByteArrayComparable comparable = 1;
     */
    public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable getComparable() {
      return comparable_;
    }
    /**
     * required .ByteArrayComparable comparable = 1;
     */
    public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparableOrBuilder getComparableOrBuilder() {
      return comparable_;
    }

    private void initFields() {
      comparable_ = org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasComparable()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(1, comparable_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, comparable_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator)) {
        return super.equals(obj);
      }
      org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator other = (org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator) obj;

      boolean result = true;
      result = result && (hasComparable() == other.hasComparable());
      if (hasComparable()) {
        result = result && getComparable()
            .equals(other.getComparable());
      }
      result = result &&
          getUnknownFields().equals(other.getUnknownFields());
      return result;
    }

    private int memoizedHashCode = 0;
    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptorForType().hashCode();
      if (hasComparable()) {
        hash = (37 * hash) + COMPARABLE_FIELD_NUMBER;
        hash = (53 * hash) + getComparable().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code CustomComparator}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparatorOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_CustomComparator_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_CustomComparator_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator.class, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator.Builder.class);
      }

      // Construct using org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getComparableFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        if (comparableBuilder_ == null) {
          comparable_ = org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.getDefaultInstance();
        } else {
          comparableBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.internal_static_CustomComparator_descriptor;
      }

      public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator getDefaultInstanceForType() {
        return org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator.getDefaultInstance();
      }

      public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator build() {
        org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator buildPartial() {
        org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator result = new org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        if (comparableBuilder_ == null) {
          result.comparable_ = comparable_;
        } else {
          result.comparable_ = comparableBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator) {
          return mergeFrom((org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator other) {
        if (other == org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator.getDefaultInstance()) return this;
        if (other.hasComparable()) {
          mergeComparable(other.getComparable());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasComparable()) {

          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.CustomComparator) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // required .ByteArrayComparable comparable = 1;
      private org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable comparable_ = org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.Builder, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparableOrBuilder> comparableBuilder_;
      /**
       * required .ByteArrayComparable comparable = 1;
       */
      public boolean hasComparable() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * required .ByteArrayComparable comparable = 1;
       */
      public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable getComparable() {
        if (comparableBuilder_ == null) {
          return comparable_;
        } else {
          return comparableBuilder_.getMessage();
        }
      }
      /**
       * required .ByteArrayComparable comparable = 1;
       */
      public Builder setComparable(org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable value) {
        if (comparableBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          comparable_ = value;
          onChanged();
        } else {
          comparableBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * required .ByteArrayComparable comparable = 1;
       */
      public Builder setComparable(
          org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.Builder builderForValue) {
        if (comparableBuilder_ == null) {
          comparable_ = builderForValue.build();
          onChanged();
        } else {
          comparableBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * required .ByteArrayComparable comparable = 1;
       */
      public Builder mergeComparable(org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable value) {
        if (comparableBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001) &&
              comparable_ != org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.getDefaultInstance()) {
            comparable_ =
              org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.newBuilder(comparable_).mergeFrom(value).buildPartial();
          } else {
            comparable_ = value;
          }
          onChanged();
        } else {
          comparableBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * required .ByteArrayComparable comparable = 1;
       */
      public Builder clearComparable() {
        if (comparableBuilder_ == null) {
          comparable_ = org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.getDefaultInstance();
          onChanged();
        } else {
          comparableBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      /**
       * required .ByteArrayComparable comparable = 1;
       */
      public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.Builder getComparableBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getComparableFieldBuilder().getBuilder();
      }
      /**
       * required .ByteArrayComparable comparable = 1;
       */
      public org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparableOrBuilder getComparableOrBuilder() {
        if (comparableBuilder_ != null) {
          return comparableBuilder_.getMessageOrBuilder();
        } else {
          return comparable_;
        }
      }
      /**
       * required .ByteArrayComparable comparable = 1;
       */
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.Builder, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparableOrBuilder>
          getComparableFieldBuilder() {
        if (comparableBuilder_ == null) {
          comparableBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparable.Builder, org.apache.spark.sql.hbase.util.AdditionalComparatorsProtos.ByteArrayComparableOrBuilder>(
                  comparable_,
                  getParentForChildren(),
                  isClean());
          comparable_ = null;
        }
        return comparableBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:CustomComparator)
    }

    static {
      defaultInstance = new CustomComparator(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:CustomComparator)
  }

  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_ByteArrayComparable_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ByteArrayComparable_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_CustomComparator_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_CustomComparator_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\033AdditionalComparators.proto\"$\n\023ByteArr" +
      "ayComparable\022\r\n\005value\030\001 \001(\014\"<\n\020CustomCom" +
      "parator\022(\n\ncomparable\030\001 \002(\0132\024.ByteArrayC" +
      "omparableBF\n\037org.apache.spark.sql.hbase." +
      "utilB\033AdditionalComparatorsProtosH\001\210\001\001\240\001" +
      "\001"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          internal_static_ByteArrayComparable_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_ByteArrayComparable_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_ByteArrayComparable_descriptor,
              new java.lang.String[] { "Value", });
          internal_static_CustomComparator_descriptor =
            getDescriptor().getMessageTypes().get(1);
          internal_static_CustomComparator_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_CustomComparator_descriptor,
              new java.lang.String[] { "Comparable", });
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }

  // @@protoc_insertion_point(outer_class_scope)
}


text:
module SolutionsGrid::Routing
  def grid_routes
    map = self # to make 'map' available within the plugin route file

    map.sort "grid/:grid_name/sort_by/:column", :controller => 'grid', :action => 'sort'
    map.connect "grid/:grid_name/sort_by/:column.:format", :controller => 'grid', :action => 'sort'

    map.filter "grid/:grid_name/filter", :controller => 'grid', :action => 'filter'
    map.connect "grid/:grid_name/filter.:format", :controller => 'grid', :action => 'filter'

    map.connect "grid/test", :controller => 'grid', :action => "test"
    map.connect "grid/test.:format", :controller => 'grid', :action => "test"
  end
end

module ::ActionController #:nodoc:
  module Routing #:nodoc:
    class RouteSet #:nodoc:
      class Mapper #:nodoc:
        include SolutionsGrid::Routing
      end
    end
  end
end


text:
external help file: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll-Help.xml
Module Name: AzureRM.ApiManagement
ms.assetid: 2FD2C5C0-5A5A-4CF0-9260-21B9E3DE52B9
online version: https://docs.microsoft.com/en-us/powershell/module/azurerm.apimanagement/remove-azurermapimanagementproductfromgroup
schema: 2.0.0
---

# Remove-AzureRmApiManagementProductFromGroup

## SYNOPSIS
Removes a product from a group.

## SYNTAX

```
Remove-AzureRmApiManagementProductFromGroup -Context <PsApiManagementContext> -GroupId <String>
 -ProductId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

## DESCRIPTION
The **Remove-AzureRmApiManagementProductFromGroup** cmdlet removes a product from an existing group.
In other words, this cmdlet removes the group assignment from a product.

## EXAMPLES

### Example 1: Remove a product from a group
```
PS C:\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Remove-AzureRmApiManagementProductFromGroup -Context $apimContext -GroupId "0001" -ProductId "0123456789"
```

This command removes a product from an existing group.

## PARAMETERS

### -Context
Specifies a **PsApiManagementContext** object.
This parameter is required.

```yaml
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

```yaml
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -GroupId
Specifies the group ID.
This parameter is required.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -PassThru
Indicates that this cmdlet returns a value of $True, if it succeeds, or $False, otherwise.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -ProductId
Specifies the product ID.
This parameter is required.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

### System.String

### System.Management.Automation.SwitchParameter

## OUTPUTS

### System.Boolean

## NOTES

## RELATED LINKS

[Add-AzureRmApiManagementProductToGroup](./Add-AzureRmApiManagementProductToGroup.md)


text:
import netaddr
from oslo_utils import netutils

from django.conf import settings
from django.forms import ValidationError  # noqa
from django.utils.translation import ugettext_lazy as _

from horizon import forms
from horizon.utils import validators as utils_validators

def validate_icmp_type_range(icmp_type):
    if not netutils.is_valid_icmp_type(icmp_type):
        if icmp_type == -1:
            return
        raise ValidationError(_("Not a valid ICMP type"))

def validate_icmp_code_range(icmp_code):
    if not netutils.is_valid_icmp_code(icmp_code):
        if icmp_code == -1:
            return
        raise ValidationError(_("Not a valid ICMP code"))

class AddRule(forms.SelfHandlingForm):
    rule_menu = forms.ChoiceField(label=_('Rule'),
                                  widget=forms.Select(attrs={
                                      'class': 'switchable',
                                      'data-slug': 'rule_menu'}))

    # "direction" field is enabled only when custom mode.
    # It is because most common rules in local_settings.py is meaningful
    # when its direction is 'ingress'.
    direction = forms.ChoiceField(
        label=_('Direction'),
        required=False,
        widget=forms.Select(attrs={
            'class': 'switched',
            'data-switch-on': 'rule_menu',
            'data-rule_menu-tcp': _('Direction'),
            'data-rule_menu-udp': _('Direction'),
            'data-rule_menu-icmp': _('Direction'),
            'data-rule_menu-custom': _('Direction'),
            'data-rule_menu-all_tcp': _('Direction'),
            'data-rule_menu-all_udp': _('Direction'),
            'data-rule_menu-all_icmp': _('Direction'),
        }))

    ip_protocol = forms.IntegerField(
        label=_('IP Protocol'), required=False,
        help_text=_("Enter an integer value between 0 and 255."),
        validators=[utils_validators.validate_ip_protocol],
        widget=forms.TextInput(attrs={
            'class': 'switched',
            'data-switch-on': 'rule_menu',
            'data-rule_menu-custom': _('IP Protocol')}))

    port_or_range = forms.ChoiceField(
        label=_('Open Port'),
        choices=[('port', _('Port')),
                 ('range', _('Port Range'))],
        widget=forms.Select(attrs={
            'class': 'switchable switched',
            'data-slug': 'range',
            'data-switch-on': 'rule_menu',
            'data-rule_menu-tcp': _('Open Port'),
            'data-rule_menu-udp': _('Open Port')}))

    port = forms.IntegerField(label=_("Port"),
                              required=False,
                              help_text=_("Enter an integer value "
                                          "between 1 and 65535."),
                              widget=forms.TextInput(attrs={
                                  'class': 'switched',
                                  'data-switch-on': 'range',
                                  'data-range-port': _('Port')}),
                              validators=[
                                  utils_validators.validate_port_range])

    from_port = forms.IntegerField(label=_("From Port"),
                                   required=False,
                                   help_text=_("Enter an integer value "
                                               "between 1 and 65535."),
                                   widget=forms.TextInput(attrs={
                                       'class': 'switched',
                                       'data-switch-on': 'range',
                                       'data-range-range': _('From Port')}),
                                   validators=[
                                       utils_validators.validate_port_range])

    to_port = forms.IntegerField(label=_("To Port"),
                                 required=False,
                                 help_text=_("Enter an integer value "
                                             "between 1 and 65535."),
                                 widget=forms.TextInput(attrs={
                                     'class': 'switched',
                                     'data-switch-on': 'range',
                                     'data-range-range': _('To Port')}),
                                 validators=[
                                     utils_validators.validate_port_range])

    icmp_type = forms.IntegerField(label=_("Type"),
                                   required=True,
                                   help_text=_("Enter a value for ICMP type "
                                               "in the range (-1: 255)"),
                                   widget=forms.TextInput(attrs={
                                       'class': 'switched',
                                       'data-switch-on': 'rule_menu',
                                       'data-rule_menu-icmp': _('Type')}),
                                   validators=[
                                       validate_icmp_type_range])

    icmp_code = forms.IntegerField(label=_("Code"),
                                   required=True,
                                   help_text=_("Enter a value for ICMP code "
                                               "in the range (-1: 255)"),
                                   widget=forms.TextInput(attrs={
                                       'class': 'switched',
                                       'data-switch-on': 'rule_menu',
                                       'data-rule_menu-icmp': _('Code')}),
                                   validators=[
                                       validate_icmp_code_range])

    remote = forms.ChoiceField(label=_('Remote'),
                               choices=[('cidr', _('CIDR')),
                                        ('sg', _('Security Group'))],
                               help_text=_('To specify an allowed IP '
                                           'range, select "CIDR". '
                                           'To allow access from all '
                                           'members of another security '
                                           'group select "Security '
                                           'Group".'),
                               widget=forms.Select(attrs={
                                   'class': 'switchable',
                                   'data-slug': 'remote'}))

    cidr = forms.IPField(label=_("CIDR"),
                         required=False,
                         initial="0.0.0.0/0",
                         help_text=_("Classless Inter-Domain Routing "
                                     "(e.g. 192.168.0.0/24, or "
                                     "2001:db8::/128)"),
                         version=forms.IPv4 | forms.IPv6,
                         mask=True,
                         widget=forms.TextInput(
                             attrs={'class': 'switched',
                                    'data-switch-on': 'remote',
                                    'data-remote-cidr': _('CIDR')}))

    security_group = forms.ChoiceField(label=_('Security Group'),
                                       required=False,
                                       widget=forms.Select(attrs={
                                           'class': 'switched',
                                           'data-switch-on': 'remote',
                                           'data-remote-sg': _('Security '
                                                               'Group')}))
    # When cidr is used ethertype is determined from IP version of cidr.
    # When source group, ethertype needs to be specified explicitly.
    ethertype = forms.ChoiceField(label=_('Ether Type'),
                                  required=False,
                                  choices=[('IPv4', _('IPv4')),
                                           ('IPv6', _('IPv6'))],
                                  widget=forms.Select(attrs={
                                      'class': 'switched',
                                      'data-slug': 'ethertype',
                                      'data-switch-on': 'remote',
                                      'data-remote-sg': _('Ether Type')}))

    def __init__(self, *args, **kwargs):
        sg_list = kwargs.pop('sg_list', [])
        super(AddRule, self).__init__(*args, **kwargs)
        # Determine if there are security groups available for the
        # remote group option; add the choices and enable the option if so.
        if sg_list:
            security_groups_choices = sg_list
        else:
            security_groups_choices = [("", _("No security groups available"))]
        self.fields['security_group'].choices = security_groups_choices

        backend = getattr(settings, 'SECURITY_GROUP_BACKEND', 'neutron')
        rules_dict = getattr(settings, 'SECURITY_GROUP_RULES', [])
        common_rules = [(k, rules_dict[k]['name'])
                        for k in rules_dict
                        if rules_dict[k].get('backend', backend) == backend]
        common_rules.sort()
        custom_rules = [('tcp', _('Custom TCP Rule')),
                        ('udp', _('Custom UDP Rule')),
                        ('icmp', _('Custom ICMP Rule'))]
        if backend == 'neutron':
            custom_rules.append(('custom', _('Other Protocol')))
        self.fields['rule_menu'].choices = custom_rules + common_rules
        self.rules = rules_dict

        if backend == 'neutron':
            self.fields['direction'].choices = [('ingress', _('Ingress')),
                                                ('egress', _('Egress'))]
        else:
            # direction and ethertype are not supported in Nova secgroup.
            self.fields['direction'].widget = forms.HiddenInput()
            self.fields['ethertype'].widget = forms.HiddenInput()
            # ip_protocol field is to specify arbitrary protocol number
            # and it is available only for neutron security group.
            self.fields['ip_protocol'].widget = forms.HiddenInput()

    def _update_and_pop_error(self, cleaned_data, key, value):
        cleaned_data[key] = value
        self.errors.pop(key, None)

    def _clean_rule_icmp(self, cleaned_data, rule_menu):
        icmp_type = cleaned_data.get("icmp_type", None)
        icmp_code = cleaned_data.get("icmp_code", None)

        self._update_and_pop_error(cleaned_data, 'ip_protocol', rule_menu)
        if icmp_type == -1 and icmp_code != -1:
            msg = _('ICMP code is provided but ICMP type is missing.')
            raise ValidationError(msg)
        if self.errors.get('icmp_type'):
            msg = _('The ICMP type not in range (-1, 255)')
            raise ValidationError(msg)
        if self.errors.get('icmp_code'):
            msg = _('The ICMP code not in range (-1, 255)')
            raise ValidationError(msg)

        self._update_and_pop_error(cleaned_data, 'from_port', icmp_type)
        self._update_and_pop_error(cleaned_data, 'to_port', icmp_code)
        self._update_and_pop_error(cleaned_data, 'port', None)

    def _clean_rule_tcp_udp(self, cleaned_data, rule_menu):
        port_or_range = cleaned_data.get("port_or_range")
        from_port = cleaned_data.get("from_port", None)
        to_port = cleaned_data.get("to_port", None)
        port = cleaned_data.get("port", None)

        self._update_and_pop_error(cleaned_data, 'ip_protocol', rule_menu)
        self._update_and_pop_error(cleaned_data, 'icmp_code', None)
        self._update_and_pop_error(cleaned_data, 'icmp_type', None)
        if port_or_range == "port":
            self._update_and_pop_error(cleaned_data, 'from_port', port)
            self._update_and_pop_error(cleaned_data, 'to_port', port)
            if port is None:
                msg = _('The specified port is invalid.')
                raise ValidationError(msg)
        else:
            self._update_and_pop_error(cleaned_data, 'port', None)
            if from_port is None:
                msg = _('The "from" port number is invalid.')
                raise ValidationError(msg)
            if to_port is None:
                msg = _('The "to" port number is invalid.')
                raise ValidationError(msg)
            if to_port < from_port:
                msg = _('The "to" port number must be greater than '
                        'or equal to the "from" port number.')
                raise ValidationError(msg)

    def _clean_rule_custom(self, cleaned_data, rule_menu):
        # custom IP protocol rule so we need to fill unused fields so
        # the validation works
        self._update_and_pop_error(cleaned_data, 'icmp_code', None)
        self._update_and_pop_error(cleaned_data, 'icmp_type', None)

    def _apply_rule_menu(self, cleaned_data, rule_menu):
        cleaned_data['ip_protocol'] = self.rules[rule_menu]['ip_protocol']
        cleaned_data['from_port'] = int(self.rules[rule_menu]['from_port'])
        cleaned_data['to_port'] = int(self.rules[rule_menu]['to_port'])
        self._update_and_pop_error(cleaned_data, 'icmp_code', None)
        self._update_and_pop_error(cleaned_data, 'icmp_type', None)
        if rule_menu not in ['all_tcp', 'all_udp', 'all_icmp']:
            direction = self.rules[rule_menu].get('direction')
            cleaned_data['direction'] = direction

    def _clean_rule_menu(self, cleaned_data):
        rule_menu = cleaned_data.get('rule_menu')
        if rule_menu == 'icmp':
            self._clean_rule_icmp(cleaned_data, rule_menu)
        elif rule_menu == 'tcp' or rule_menu == 'udp':
            self._clean_rule_tcp_udp(cleaned_data, rule_menu)
        elif rule_menu == 'custom':
            self._clean_rule_custom(cleaned_data, rule_menu)
        else:
            self._apply_rule_menu(cleaned_data, rule_menu)

    def clean(self):
        cleaned_data = super(AddRule, self).clean()

        self._clean_rule_menu(cleaned_data)

        # NOTE(amotoki): There are two cases where cleaned_data['direction']
        # is empty: (1) Nova Security Group is used. Since "direction" is
        # HiddenInput, direction field exists but its value is ''.
        # (2) Template except all_* is used. In this case, the default value
        # is None. To make sure 'direction' field has 'ingress' or 'egress',
        # fill this field here if it is not specified.
        if not cleaned_data['direction']:
            cleaned_data['direction'] = 'ingress'

        remote = cleaned_data.get("remote")
        if remote == "cidr":
            self._update_and_pop_error(cleaned_data, 'security_group', None)
        else:
            self._update_and_pop_error(cleaned_data, 'cidr', None)

        # If cleaned_data does not contain a non-empty value, IPField already
        # has validated it, so skip the further validation for cidr.
        # In addition cleaned_data['cidr'] is None means source_group is used.
        if 'cidr' in cleaned_data and cleaned_data['cidr'] is not None:
            cidr = cleaned_data['cidr']
            if not cidr:
                msg = _('CIDR must be specified.')
                self._errors['cidr'] = self.error_class([msg])
            else:
                # If cidr is specified, ethertype is determined from IP address
                # version. It is used only when Neutron is enabled.
                ip_ver = netaddr.IPNetwork(cidr).version
                cleaned_data['ethertype'] = 'IPv6' if ip_ver == 6 else 'IPv4'

        return cleaned_data

    def handle(self, request, data):
        return True


text:
#!/usr/bin/env node

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// /!\ DO NOT MODIFY THIS FILE /!\
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// react-native-cli is installed globally on people's computers. This means
// that it is extremely difficult to have them upgrade the version and
// because there's only one global version installed, it is very prone to
// breaking changes.
//
// The only job of react-native-cli is to init the repository and then
// forward all the commands to the local version of react-native.
//
// If you need to add a new command, please add it to local-cli/.
//
// The only reason to modify this file is to add more warnings and
// troubleshooting information for the `react-native init` command.
//
// Do not make breaking changes! We absolutely don't want to have to
// tell people to update their global version of react-native-cli.
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// /!\ DO NOT MODIFY THIS FILE /!\
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

'use strict';

var fs = require('fs');
var path = require('path');
var exec = require('child_process').exec;
var spawn = require('child_process').spawn;
var prompt = require('prompt');

var CLI_MODULE_PATH = function() {
  return path.resolve(
    process.cwd(),
    'node_modules',
    'react-native-desktop',
    'cli.js'
  );
};

checkForVersionArgument();

var cli;
var cliPath = CLI_MODULE_PATH();
if (fs.existsSync(cliPath)) {
  cli = require(cliPath);
}

if (cli) {
  cli.run();
} else {
  var args = process.argv.slice(2);
  if (args.length === 0) {
    console.error(
      'You did not pass any commands, did you mean to run `react-native-desktop init`?'
    );
    process.exit(1);
  }

  switch (args[0]) {
  case 'init':
    if (args[1]) {
      var verbose = process.argv.indexOf('--verbose') >= 0;
      init(args[1], verbose);
    } else {
      console.error(
        'Usage: react-native-desktop init <ProjectName> [--verbose]'
      );
      process.exit(1);
    }
    break;
  default:
    console.error(
      'Command `%s` unrecognized. ' +
      'Did you mean to run this inside a react-native-desktop project?',
      args[0]
    );
    process.exit(1);
    break;
  }
}

function validatePackageName(name) {
  if (!name.match(/^[$A-Z_][0-9A-Z_$]*$/i)) {
    console.error(
      '"%s" is not a valid name for a project. Please use a valid identifier ' +
        'name (alphanumeric).',
      name
    );
    process.exit(1);
  }

  if (name === 'React') {
    console.error(
      '"%s" is not a valid name for a project. Please do not use the ' +
        'reserved word "React".',
      name
    );
    process.exit(1);
  }
}

function init(name, verbose) {
  validatePackageName(name);

  if (fs.existsSync(name)) {
    createAfterConfirmation(name, verbose);
  } else {
    createProject(name, verbose);
  }
}

function createAfterConfirmation(name, verbose) {
  prompt.start();

  var property = {
    name: 'yesno',
    message: 'Directory ' + name + ' already exist. Continue?',
    validator: /y[es]*|n[o]?/,
    warning: 'Must respond yes or no',
    default: 'no'
  };

  prompt.get(property, function (err, result) {
    if (result.yesno[0] === 'y') {
      createProject(name, verbose);
    } else {
      console.log('Project initialization canceled');
      process.exit();
    }
  });
}

function createProject(name, verbose) {
  var root = path.resolve(name);
  var projectName = path.basename(root);

  console.log(
    'This will walk you through creating a new React Native project in',
    root
  );

  if (!fs.existsSync(root)) {
    fs.mkdirSync(root);
  }

  var packageJson = {
    name: projectName,
    version: '0.0.1',
    private: true,
    scripts: {
      start: 'react-native-desktop start'
    }
  };
  fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify(packageJson));
  process.chdir(root);

  console.log('Installing react-native-desktop package from npm...');

  if (verbose) {
    runVerbose(root, projectName);
  } else {
    run(root, projectName);
  }
}

function run(root, projectName) {
  exec('npm install --save react-native-desktop', function(e, stdout, stderr) {
    if (e) {
      console.log(stdout);
      console.error(stderr);
      console.error('`npm install --save react-native-desktop` failed');
      process.exit(1);
    }

    var cli = require(CLI_MODULE_PATH());
    cli.init(root, projectName);
  });
}

function runVerbose(root, projectName) {
  var proc = spawn('npm', ['install', '--verbose', '--save', 'react-native-desktop'], {stdio: 'inherit'});
  proc.on('close', function (code) {
    if (code !== 0) {
      console.error('`npm install --save react-native-desktop` failed');
      return;
    }

    cli = require(CLI_MODULE_PATH());
    cli.init(root, projectName);
  });
}

function checkForVersionArgument() {
  if (process.argv.indexOf('-v') >= 0 || process.argv.indexOf('--version') >= 0) {
    var pjson = require('./package.json');
    console.log(pjson.version);
    process.exit();
  }
}


text:
package kodkod.engine.fol2sat;

import java.util.Iterator;
import java.util.Set;

import kodkod.ast.Formula;
import kodkod.engine.Solver;
import kodkod.engine.config.Options;
import kodkod.instance.Bounds;

/**
 * A log of the translations of the descendants of a given formula that
 * are either formulas or that desugar to formulas.
 * @specfield originalFormula: Formula // the {@linkplain Solver#solve(Formula, kodkod.instance.Bounds) original} formula, provided by the user
 * @specfield originalBounds: Bounds // the {@linkplain Solver#solve(Formula, kodkod.instance.Bounds) original} bounds, provided by the user
 * @specfield formula: Formula // desugaring of this.formula that was translated
 * @specfield bounds: Bounds // translation bounds
 * @specfield records: set TranslationRecord
 * @specfield replay: [0..#records) one->one records // replay order -- i.e. the order in the which records were added to the log
 * @invariant all r: records | r.node in formula.*children
 * @invariant Solver.solve(formula, bounds).instance() == null iff Solver.solve(originalFormula, originalBounds).instance() == null
 * @author Emina Torlak
 */
public abstract class TranslationLog {
	TranslationLog() {}

	/**
	 * Returns the roots of this.formula.  In other words, returns the subformulas, {f0, ..., fk},
     * of this.formula such that, for all 0<=i<=k, fi  [[f0 && ... && fk]] <=> [[formula]].
     * The granularity of the subdivision of this.formula into roots depends on the core granularity
     * specified in the {@linkplain Options} that were used when translating this.formula.
     *
     *
Unless a given root translates to a constant, the highest magnitude  literal corresponding to
     * each root (as given by this.records) is guaranteed to be present in the translation of this.formula
     * as a unit clause.  All the remaining clauses (except those comprising the symmetry
     * breaking predicate, encoded with its own unit clause containing the maximum literal)
     * that are reachable from such a unit clause represent the translations
     * of the given root's descendants.  We define reachability over the clauses in a translation
     * as follows:  let l1 be the highest magnitude literal in the clause c1, and let l2 be the
     * highest magnitude literal in c2.  If l2 occurs in c1 (in any polarity), then there is
     * an edge from c1 and c2. The unit clauses are always the last clauses to be added to a SAT solver
     * during translation.

     *
	 * @return roots of this.formula
	 */
	public abstract Set<Formula> roots();

	/**
	 * Returns this.bounds.
	 * @return this.bounds.
	 */
	public abstract Bounds bounds();

	/**
	 * Returns an iterator over the translation records in this log that are accepted
	 * by the given filter.  The iterator returns the records in the order in which
	 * they were generated.  This guarantees that records for the descendants of a
	 * node are always returned before the record for the node itself.
	 *
	 *
Note:The record objects returned by the iterator are not
	 * required to be immutable.  In particular, the state of a record object
	 * returned by <tt>next()</tt> is guaranteed to remain the same only until the
	 * subsequent call to <tt>next()</tt>.

	 * @return an iterator, in the proper replay sequence, over the translation records
	 * in this log that are accepted by the given filter.
	 */
	public abstract Iterator<TranslationRecord> replay(RecordFilter filter);

	/**
	 * Returns an iterator over all translation records in this log.  The iterator returns
	 * the records in the order in which they were generated.  This guarantees that records for
	 * the descendants of a  node are always returned before the record for the node itself.
	 * The effect of this method is the same as calling {@linkplain #replay(RecordFilter) replay(RecordFilter.ALL)}.
	 *
	 *
Note:The record objects returned by the iterator are not
	 * required to be immutable.  In particular, the state of a record object
	 * returned by <tt>next()</tt> is guaranteed to remain the same only until the
	 * subsequent call to <tt>next()</tt>.

	 * @return an iterator over all translation records in this.log, in the proper replay sequence.
	 * @see #replay(RecordFilter)
	 */
	public final Iterator<TranslationRecord> replay() {
		return replay(RecordFilter.ALL);
	}

//	/**
//	 * Compresses this translation log (optional operation) by eliminating
//	 * redundant records.
//	 * @ensures all r: this.records | one r': this.records' | r.node = r'.node && r.literal = r'.literal && r.env.equals(r'.env)
//	 * @throws UnsupportedOperationException  this log does not support compression
//	 */
//	public abstract void compress();
}


text:
require('babel-core/register')({ extensions: ['.es6'], ignore: false });
module.exports = require('./lib/scss-syntax');


text:
from setuptools import setup, find_packages

setup(name='sunshine',
      version='0.0.8',
      description='Sunshine - Selenium for Human Beings',
      author='Philipp Konrad',
      packages=find_packages(),
      install_requires=[
                'selenium',
                'six',
                'beautifulsoup4',])


text:
<?php

namespace Drupal\media_library\Ajax;

use Drupal\Core\Ajax\CommandInterface;

/**
 * AJAX command for adding media items to the media library selection.
 *
 * This command instructs the client to add the given media item IDs to the
 * current selection of the media library stored in
 * Drupal.MediaLibrary.currentSelection.
 *
 * This command is implemented by
 * Drupal.AjaxCommands.prototype.updateMediaLibrarySelection() defined in
 * media_library.ui.js.
 *
 * @ingroup ajax
 *
 * @internal
 *   This is an internal part of Media Library and may be subject to change in
 *   minor releases. External code should not instantiate or extend this class.
 */
class UpdateSelectionCommand implements CommandInterface {

  /**
   * An array of media IDs to add to the current selection.
   *
   * @var int[]
   */
  protected $mediaIds;

  /**
   * Constructs an UpdateSelectionCommand object.
   *
   * @param int[] $media_ids
   *   An array of media IDs to add to the current selection.
   */
  public function __construct(array $media_ids) {
    $this->mediaIds = $media_ids;
  }

  /**
   * {@inheritdoc}
   */
  public function render() {
    return [
      'command' => 'updateMediaLibrarySelection',
      'mediaIds' => $this->mediaIds,
    ];
  }

}


text:
class RacesController < ApplicationController
  before_action :set_race, only: [:show, :edit, :update, :destroy]

  # GET /races
  # GET /races.json
  def index
    @races = Race.all
  end

  # GET /races/1
  # GET /races/1.json
  def show
  end

  # GET /races/new
  def new
    @race = Race.new
  end

  # GET /races/1/edit
  def edit
  end

  # POST /races
  # POST /races.json
  def create
    @race = Race.new(race_params)
    respond_to do |format|
      if @race.save
        format.html { redirect_to @race, notice: 'Race was successfully created.' }
        format.json { render :show, status: :created, location: @race }
      else
        format.html { render :new }
        format.json { render json: @race.errors, status: :unprocessable_entity }
      end
    end
  end

  # PATCH/PUT /races/1
  # PATCH/PUT /races/1.json
  def update
    respond_to do |format|
      if @race.update(race_params)
        format.html { redirect_to @race, notice: 'Race was successfully updated.' }
        format.json { render :show, status: :ok, location: @race }
      else
        format.html { render :edit }
        format.json { render json: @race.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /races/1
  # DELETE /races/1.json
  def destroy
    @race.destroy
    respond_to do |format|
      format.html { redirect_to races_url, notice: 'Race was successfully destroyed.' }
      format.json { head :no_content }
    end
  end

  private
    # Use callbacks to share common setup or constraints between actions.
    def set_race
      @race = Race.find(params[:id])
    end

    # Never trust parameters from the scary internet, only allow the white list through.
    def race_params
      params.require(:race).permit(:raceid, :routeid)
    end
end


text:
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedHTMLMessage, injectIntl } from 'react-intl';
import { NEW_FOCAL_SET_PLACEHOLDER_ID } from '../FocusDescriptionForm';

const localMessages = {
  focalSetNew: { id: 'focus.create.confirm.focalSetNew', defaultMessage: 'Technique: Create a new one named {name} ({description}' },
  focalSetExisting: { id: 'focus.create.confirm.focalSetExisting', defaultMessage: 'Technique: Add to existing' },
  name: { id: 'focus.create.confirm.name', defaultMessage: 'Name: {name}' },
  description: { id: 'focus.create.confirm.description', defaultMessage: 'Description: {description}' },
  searchKeywords: { id: 'focus.create.confirm.booleanQuery.keywords', defaultMessage: 'Search using keywords : {keywords}' },
  searchMedia: { id: 'focus.create.confirm.booleanQuery.media', defaultMessage: 'Search using media : {names}' },
};

const SearchSummary = (props) => {
  const { formValues } = props;
  let focalSetContent = null;
  switch (formValues.focalSetDefinitionId) {
    case NEW_FOCAL_SET_PLACEHOLDER_ID:
      focalSetContent = <FormattedHTMLMessage {...localMessages.focalSetNew} values={{ name: formValues.focalSetName, description: formValues.focalSetDescription }} />;
      break;
    default:
      focalSetContent = <FormattedHTMLMessage {...localMessages.focalSetExisting} />;
  }
  return (

<FormattedHTMLMessage {...localMessages.name} values={{ name: formValues.focusName }} />

<FormattedHTMLMessage {...localMessages.description} values={{ description: formValues.focusDescription }} />

{focalSetContent}

<FormattedHTMLMessage {...localMessages.searchKeywords} values={{ keywords: formValues.keywords }} />

<FormattedHTMLMessage {...localMessages.searchMedia} values={{ names: formValues.media ? JSON.stringify(formValues.media.map(s => s.name)) : '' }} />

  );
};

SearchSummary.propTypes = {
  // from parent
  topicId: PropTypes.number.isRequired,
  formValues: PropTypes.object.isRequired,
  // form context
  intl: PropTypes.object.isRequired,
};

export default injectIntl(SearchSummary);


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;

namespace Microsoft.Diagnostics.Runtime
{
    [StructLayout(LayoutKind.Explicit)]
    public struct XmmSaveArea
    {
        public const int HeaderSize = 2;
        public const int LegacySize = 8;

        [FieldOffset(0x0)]
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = HeaderSize)]
        public M128A[] Header;

        [FieldOffset(0x20)]
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = LegacySize)]
        public M128A[] Legacy;

        [FieldOffset(0xa0)]
        public M128A Xmm0;
        [FieldOffset(0xb0)]
        public M128A Xmm1;
        [FieldOffset(0xc0)]
        public M128A Xmm2;
        [FieldOffset(0xd0)]
        public M128A Xmm3;
        [FieldOffset(0xe0)]
        public M128A Xmm4;
        [FieldOffset(0xf0)]
        public M128A Xmm5;
        [FieldOffset(0x100)]
        public M128A Xmm6;
        [FieldOffset(0x110)]
        public M128A Xmm7;
        [FieldOffset(0x120)]
        public M128A Xmm8;
        [FieldOffset(0x130)]
        public M128A Xmm9;
        [FieldOffset(0x140)]
        public M128A Xmm10;
        [FieldOffset(0x150)]
        public M128A Xmm11;
        [FieldOffset(0x160)]
        public M128A Xmm12;
        [FieldOffset(0x170)]
        public M128A Xmm13;
        [FieldOffset(0x180)]
        public M128A Xmm14;
        [FieldOffset(0x190)]
        public M128A Xmm15;
    }
}