text:
namespace jackal {

class OpenGLShader;
class OpenGLCommandBuffer;
class OpenGLTexture;
class OpenGLTexture2D;
class OpenGLTexture3D;
class OpenGLCubeMap;
class OpenGLSampler;
class OpenGLGraphicsPipelineState;
class OpenGLComputePipelineState;
class OpenGLRenderTarget;
class OpenGLRenderPass;
class OpenGLVertexBuffer;
class OpenGLUniformBuffer;
class OpenGLResources;
class OpenGLMaterialLayout;

// OpenGL Rendering Device. This Device handles all
// Rendering calls, creation, and modification of OpenGL
// Rendering functionality. It should act as a RHI, or
// Rendering Hardware Interface implementation of OpenGL.
class OpenGLDevice : public RenderDevice {
  static const char *renderAPI;

  // Keep Track of the number of opengl objects allocated by OpenGLDevice.
  static uint32       OGLShaders;
  static uint32       OGLFrameBuffers;
  static uint32       OGLRenderPasses;
  static uint32       OGLTextures;
  static uint32       OGLTexture2Ds;
  static uint32       OGLTexture3Ds;
  static uint32       OGLCubeMaps;
  static uint32       OGLSamplers;
  static uint32       OGLUniformBuffers;
  static uint32       OGLGraphicsPipelineStates;
  static uint32       OGLComputePipelineStates;
  static uint32       OGLRenderTargets;
  static uint32       OGLVertexBuffers;
  static uint32       OGLCommandBuffers;
  static uint32       OGLMaterialLayouts;

public:

  // Initialize OpenGL library for first time.
  // This must be called if you plan on using OpenGL.
  static bool8 InitOpenGL();

  OpenGLDevice()
    : mCurrentComputePipelineState(nullptr)
    , mCurrentGraphicsPipelineState(nullptr)
    , mCurrentVertexBuffer(nullptr)
    , mCurrentUniformBuffer(nullptr)
    , mCurrentRenderPass(nullptr)
    , mClearColor(Color(0, 0, 0, 255))
    , mCommandBuffers(nullptr)
    , mCommandBuffersCount(0) { }

  void                            Initialize() override;
  void                            CleanUp() override;

  Resources*                      GetResources() override;
  Shader*                         CreateShader() override;
  RenderPass*                     CreateRenderPass() override;
  Texture*                        CreateTexture() override;
  UniformBuffer*                  CreateUniformBuffer() override;
  GraphicsPipelineState*          CreateGraphicsPipelineState() override;
  ComputePipelineState*           CreateComputePipelineState() override;
  RenderTarget*                   CreateRenderTarget() override;
  VertexBuffer*                   CreateVertexBuffer() override;
  CommandBuffer*                  CreateCommandBuffer() override;
  MaterialLayout*                 CreateMaterialLayout() override;
  Sampler*                        CreateSampler() override;
  Texture2D*                      CreateTexture2D() override;
  Texture3D*                      CreateTexture3D() override;
  CubeMap*                        CreateCubeMap() override;
  StorageBuffer*                  CreateStorageBuffer() override { return nullptr; }

  void                            SetResourceHandler(Resources *resources) override;
  void                            DestroyShader(Shader *shader) override;
  void                            DestroyRenderPass(RenderPass *pass) override;
  void                            DestroyTexture(Texture *texture) override;
  void                            DestroyUniformBuffer(UniformBuffer *uniformbuffer) override;
  void                            DestroyGraphicsPipelineState(GraphicsPipelineState *pipeline) override;
  void                            DestroyComputePipelineState(ComputePipelineState *pipeline) override;
  void                            DestroyRenderTarget(RenderTarget *target) override;
  void                            DestroyCommandBuffer(CommandBuffer *buffer) override;
  void                            DestroyMaterialLayout(MaterialLayout *material) override;
  void                            DestroyVertexBuffer(VertexBuffer *vb) override;
  void                            DestroySampler(Sampler *sampler) override;
  void                            DestroyTexture2D(Texture2D *texture) override;
  void                            DestroyTexture3D(Texture3D *texture) override;
  void                            DestroyCubeMap(CubeMap *cube) override;
  void                            DestroyStorageBuffer(StorageBuffer* buffer) override { }

  const char *API() const override { return renderAPI; }

  CommandBuffer**                SwapChainCommandBuffers(uint16* count) override;

  // Still Ongoing work.
  // TODO(): Setters for setting up the pipeline and rendering core.

  // Submit command buffers to the GPU for rendering. If OpenGL is being used,
  // we go with CPU based rendering calls.
  void SubmitCommandBuffers(CommandBuffer *commandbuffers, uint32 buffers) override;

  // OpenGL Graphics Pipeline State object currently being used by this rendering
  // device.
  OpenGLGraphicsPipelineState*  mCurrentGraphicsPipelineState;

  // OpenGL Compute Pipeline State object currently being used by this rendering
  // device.
  OpenGLComputePipelineState*   mCurrentComputePipelineState;

  // OpenGL Vertex Buffer object currently being used by this rendering device.
  OpenGLVertexBuffer*           mCurrentVertexBuffer;

  // OpenGL Uniform Buffer object currently being used by this rendering device.
  OpenGLUniformBuffer*          mCurrentUniformBuffer;

  // OpenGL Material object currently being use by this rendering device.
  OpenGLMaterialLayout*         mCurrentMaterialLayout;

  // Current OpenGL RenderPass bound.
  OpenGLRenderPass*             mCurrentRenderPass;

  Color                         mClearColor;

private:
  CommandBuffer**               mCommandBuffers;
  uint16                        mCommandBuffersCount;
};
} // jackal


text:
import com.galois.symbolic.Symbolic;

/**
 * This class extends the SecureRandomSpi class implementing all its abstract methods.
 *
 *
To generate pseudo-random bits, the implementation uses technique described in
 * the "Random Number Generator (RNG) algorithms" section, Appendix A,
 * JavaTM Cryptography Architecture, API Specification & Reference.
 */
public class SHA1PRNG_SecureRandomImpl_KitKat {

    /**
     *  constant defined in "SECURE HASH STANDARD"
     */
    public static final int H0 = 0x67452301;

    /**
     *  constant defined in "SECURE HASH STANDARD"
     */
    public static final int H1 = 0xEFCDAB89;

    /**
     *  constant defined in "SECURE HASH STANDARD"
     */
    public static final int H2 = 0x98BADCFE;

    /**
     *  constant defined in "SECURE HASH STANDARD"
     */
    public static final int H3 = 0x10325476;

    /**
     *  constant defined in "SECURE HASH STANDARD"
     */
    public static final int H4 = 0xC3D2E1F0;

    /**
     * offset in buffer to store number of bytes in 0-15 word frame
     */
    public static final int BYTES_OFFSET = 81;

    /**
     * offset in buffer to store current hash value
     */
    public static final int HASH_OFFSET = 82;

    /**
     * # of bytes in H0-H4 words;

     * in this implementation # is set to 20 (in general # varies from 1 to 20)
     */
    public static final int DIGEST_LENGTH = 20;

    private static final long serialVersionUID = 283736797212159675L;

    // constants to use in expressions operating on bytes in int and long variables:
    // END_FLAGS - final bytes in words to append to message;
    //             see "ch.5.1 Padding the Message, FIPS 180-2"
    // RIGHT1    - shifts to right for left half of long
    // RIGHT2    - shifts to right for right half of long
    // LEFT      - shifts to left for bytes
    // MASK      - mask to select counter's bytes after shift to right

    private static final int[] END_FLAGS = { 0x80000000, 0x800000, 0x8000, 0x80 };

    private static final int[] RIGHT1 = { 0, 40, 48, 56 };

    private static final int[] RIGHT2 = { 0, 8, 16, 24 };

    private static final int[] LEFT = { 0, 24, 16, 8 };

    private static final int[] MASK = { 0xFFFFFFFF, 0x00FFFFFF, 0x0000FFFF,
            0x000000FF };

    // HASHBYTES_TO_USE defines # of bytes returned by "computeHash(byte[])"
    // to use to form byte array returning by the "nextBytes(byte[])" method
    // Note, that this implementation uses more bytes than it is defined
    // in the above specification.
    private static final int HASHBYTES_TO_USE = 20;

    // value of 16 defined in the "SECURE HASH STANDARD", FIPS PUB 180-2
    private static final int FRAME_LENGTH = 16;

    // miscellaneous constants defined in this implementation:
    // COUNTER_BASE - initial value to set to "counter" before computing "nextBytes(..)";
    //                note, that the exact value is not defined in STANDARD
    // HASHCOPY_OFFSET   - offset for copy of current hash in "copies" array
    // EXTRAFRAME_OFFSET - offset for extra frame in "copies" array;
    //                     as the extra frame follows the current hash frame,
    //                     EXTRAFRAME_OFFSET is equal to length of current hash frame
    // FRAME_OFFSET      - offset for frame in "copies" array
    // MAX_BYTES - maximum # of seed bytes processing which doesn't require extra frame
    //             see (1) comments on usage of "seed" array below and
    //             (2) comments in "engineNextBytes(byte[])" method
    //
    // UNDEFINED  - three states of engine; initially its state is "UNDEFINED"
    // SET_SEED     call to "engineSetSeed"  sets up "SET_SEED" state,
    // NEXT_BYTES   call to "engineNextByte" sets up "NEXT_BYTES" state

    private static final int COUNTER_BASE = 0;

    private static final int HASHCOPY_OFFSET = 0;

    private static final int EXTRAFRAME_OFFSET = 5;

    private static final int FRAME_OFFSET = 21;

    private static final int MAX_BYTES = 48;

    private static final int UNDEFINED = 0;

    private static final int SET_SEED = 1;

    private static final int NEXT_BYTES = 2;

    // Structure of "seed" array:
    // -  0-79 - words for computing hash
    // - 80    - unused
    // - 81    - # of seed bytes in current seed frame
    // - 82-86 - 5 words, current seed hash
    private transient int[] seed;

    // total length of seed bytes, including all processed
    private transient long seedLength;

    // Structure of "copies" array
    // -  0-4  - 5 words, copy of current seed hash
    // -  5-20 - extra 16 words frame;
    //           is used if final padding exceeds 512-bit length
    // - 21-36 - 16 word frame to store a copy of remaining bytes
    private transient int[] copies;

    // ready "next" bytes; needed because words are returned
    private transient byte[] nextBytes;

    // index of used bytes in "nextBytes" array
    private transient int nextBIndex;

    // variable required according to "SECURE HASH STANDARD"
    private transient long counter;

    // contains int value corresponding to engine's current state
    private transient int state;

    // The "seed" array is used to compute both "current seed hash" and "next bytes".
    //
    // As the "SHA1" algorithm computes a hash of entire seed by splitting it into
    // a number of the 512-bit length frames (512 bits = 64 bytes = 16 words),
    // "current seed hash" is a hash (5 words, 20 bytes) for all previous full frames;
    // remaining bytes are stored in the 0-15 word frame of the "seed" array.
    //
    // As for calculating "next bytes",
    // both remaining bytes and "current seed hash" are used,
    // to preserve the latter for following "setSeed(..)" commands,
    // the following technique is used:
    // - upon getting "nextBytes(byte[])" invoked, single or first in row,
    //   which requires computing new hash, that is,
    //   there is no more bytes remaining from previous "next bytes" computation,
    //   remaining bytes are copied into the 21-36 word frame of the "copies" array;
    // - upon getting "setSeed(byte[])" invoked, single or first in row,
    //   remaining bytes are copied back.

    /**
     *  Creates object and sets implementation variables to their initial values
     */
    public SHA1PRNG_SecureRandomImpl_KitKat() {

        seed = new int[HASH_OFFSET + EXTRAFRAME_OFFSET];
        seed[HASH_OFFSET] = H0;
        seed[HASH_OFFSET + 1] = H1;
        seed[HASH_OFFSET + 2] = H2;
        seed[HASH_OFFSET + 3] = H3;
        seed[HASH_OFFSET + 4] = H4;

        seedLength = 0;
        copies = new int[2 * FRAME_LENGTH + EXTRAFRAME_OFFSET];
        nextBytes = new byte[DIGEST_LENGTH];
        nextBIndex = HASHBYTES_TO_USE;
        counter = COUNTER_BASE;
        state = UNDEFINED;
    }

    /*
     * The method invokes the SHA1Impl's "updateHash(..)" method
     * to update current seed frame and
     * to compute new intermediate hash value if the frame is full.
     *
     * After that it computes a length of whole seed.
     */
    private void updateSeed(byte[] bytes) {

        // on call:   "seed" contains current bytes and current hash;
        // on return: "seed" contains new current bytes and possibly new current hash
        //            if after adding, seed bytes overfill its buffer
        // TODO
        updateHash(seed, bytes, 0, bytes.length - 1);

        seedLength += bytes.length;
    }

    /**
     * Writes random bytes into an array supplied.
     * Bits in a byte are from left to right.

     *
     * To generate random bytes, the "expansion of source bits" method is used,
     * that is,
     * the current seed with a 64-bit counter appended is used to compute new bits.
     * The counter is incremented by 1 for each 20-byte output.

     *
     * The method overrides engineNextBytes in class SecureRandomSpi.
     *
     * @param
     *       bytes - byte array to be filled in with bytes
     * @throws
     *       NullPointerException - if null is passed to the "bytes" argument
     */
    protected void engineNextBytes(byte[] bytes) {

        int i, n;

        long bits; // number of bits required by Secure Hash Standard
        int nextByteToReturn; // index of ready bytes in "bytes" array
        int lastWord; // index of last word in frame containing bytes
        final int extrabytes = 7;// # of bytes to add in order to computer # of 8 byte words

        if (bytes == null) {
            throw new NullPointerException("bytes == null");
        }

        lastWord = seed[BYTES_OFFSET] == 0 ? 0
                : (seed[BYTES_OFFSET] + extrabytes) >> 3 - 1;

        if (state == UNDEFINED) {

            // no seed supplied by user, hence it is generated thus randomizing internal state
            updateSeed(Symbolic.freshByteArray(DIGEST_LENGTH));
            nextBIndex = HASHBYTES_TO_USE;

            // updateSeed(...) updates where the last word of the seed is, so we
            // have to read it again.
            lastWord = seed[BYTES_OFFSET] == 0 ? 0
                    : (seed[BYTES_OFFSET] + extrabytes) >> 3 - 1;

        } else if (state == SET_SEED) {

            System.arraycopy(seed, HASH_OFFSET, copies, HASHCOPY_OFFSET,
                    EXTRAFRAME_OFFSET);

            // possible cases for 64-byte frame:
            //
            // seed bytes < 48      - remaining bytes are enough for all, 8 counter bytes,
            //                        0x80, and 8 seedLength bytes; no extra frame required
            // 48 < seed bytes < 56 - remaining 9 bytes are for 0x80 and 8 counter bytes
            //                        extra frame contains only seedLength value at the end
            // seed bytes > 55      - extra frame contains both counter's bytes
            //                        at the beginning and seedLength value at the end;
            //                        note, that beginning extra bytes are not more than 8,
            //                        that is, only 2 extra words may be used

            // no need to set to "0" 3 words after "lastWord" and
            // more than two words behind frame
            for (i = lastWord + 3; i < FRAME_LENGTH + 2; i++) {
                seed[i] = 0;
            }

            bits = (seedLength << 3) + 64; // transforming # of bytes into # of bits

            // putting # of bits into two last words (14,15) of 16 word frame in
            // seed or copies array depending on total length after padding
            if (seed[BYTES_OFFSET] < MAX_BYTES) {
                seed[14] = (int) (bits >>> 32);
                seed[15] = (int) (bits & 0xFFFFFFFF);
            } else {
                copies[EXTRAFRAME_OFFSET + 14] = (int) (bits >>> 32);
                copies[EXTRAFRAME_OFFSET + 15] = (int) (bits & 0xFFFFFFFF);
            }

            nextBIndex = HASHBYTES_TO_USE; // skipping remaining random bits
        }
        state = NEXT_BYTES;

        if (bytes.length == 0) {
            return;
        }

        nextByteToReturn = 0;

        // possibly not all of HASHBYTES_TO_USE bytes were used previous time
        n = (HASHBYTES_TO_USE - nextBIndex) < (bytes.length - nextByteToReturn) ? HASHBYTES_TO_USE
                - nextBIndex
                : bytes.length - nextByteToReturn;
        if (n > 0) {
            System.arraycopy(nextBytes, nextBIndex, bytes, nextByteToReturn, n);
            nextBIndex += n;
            nextByteToReturn += n;
        }

        if (nextByteToReturn >= bytes.length) {
            return; // return because "bytes[]" are filled in
        }

        n = seed[BYTES_OFFSET] & 0x03;
        for (;;) {
            if (n == 0) {

                seed[lastWord] = (int) (counter >>> 32);
                seed[lastWord + 1] = (int) (counter & 0xFFFFFFFF);
                seed[lastWord + 2] = END_FLAGS[0];

            } else {

                seed[lastWord] |= (int) ((counter >>> RIGHT1[n]) & MASK[n]);
                seed[lastWord + 1] = (int) ((counter >>> RIGHT2[n]) & 0xFFFFFFFF);
                seed[lastWord + 2] = (int) ((counter << LEFT[n]) | END_FLAGS[n]);
            }
            if (seed[BYTES_OFFSET] > MAX_BYTES) {
                copies[EXTRAFRAME_OFFSET] = seed[FRAME_LENGTH];
                copies[EXTRAFRAME_OFFSET + 1] = seed[FRAME_LENGTH + 1];
            }

            // TODO
            //SHA1Impl.computeHash(seed);
            int[] seedInit = new int[5];
            int si;
            for (si = 0; si < 5; si++) { seedInit[si] = seed[si]; }
            Symbolic.writeAiger("kitkat_prng.aig", seedInit);

            if (seed[BYTES_OFFSET] > MAX_BYTES) {

                System.arraycopy(seed, 0, copies, FRAME_OFFSET, FRAME_LENGTH);
                System.arraycopy(copies, EXTRAFRAME_OFFSET, seed, 0,
                        FRAME_LENGTH);

                // TODO
                //SHA1Impl.computeHash(seed);
                System.arraycopy(copies, FRAME_OFFSET, seed, 0, FRAME_LENGTH);
            }
            counter++;

            int j = 0;
            for (i = 0; i < EXTRAFRAME_OFFSET; i++) {
                int k = seed[HASH_OFFSET + i];
                nextBytes[j] = (byte) (k >>> 24); // getting first  byte from left
                nextBytes[j + 1] = (byte) (k >>> 16); // getting second byte from left
                nextBytes[j + 2] = (byte) (k >>> 8); // getting third  byte from left
                nextBytes[j + 3] = (byte) (k); // getting fourth byte from left
                j += 4;
            }

            nextBIndex = 0;
            j = HASHBYTES_TO_USE < (bytes.length - nextByteToReturn) ? HASHBYTES_TO_USE
                    : bytes.length - nextByteToReturn;

            if (j > 0) {
                System.arraycopy(nextBytes, 0, bytes, nextByteToReturn, j);
                nextByteToReturn += j;
                nextBIndex += j;
            }

            if (nextByteToReturn >= bytes.length) {
                break;
            }
        }
    }

    /**
     * The method appends new bytes to existing ones
     * within limit of a frame of 64 bytes (16 words).
     *
     * Once a length of accumulated bytes reaches the limit
     * the "computeHash(int[])" method is invoked on the array to compute updated hash,
     * and the number of bytes in the frame is set to 0.
     * Thus, after appending all bytes, the array contain only those bytes
     * that were not used in computing final hash value yet.
     *
     * No checks on arguments passed to the method, that is,
     * a calling method is responsible for such checks.
     *
     * @params
     *        intArray  - int array containing bytes to which to append;
     *                    intArray.length >= (BYTES_OFFSET+6)
     * @params
     *        byteInput - array of bytes to use for the update
     * @params
     *        from      - the offset to start in the "byteInput" array
     * @params
     *        to        - a number of the last byte in the input array to use,
     *                that is, for first byte "to"==0, for last byte "to"==input.length-1
     */
    static void updateHash(int[] intArray, byte[] byteInput, int fromByte, int toByte) {

        // As intArray contains a packed bytes
        // the buffer's index is in the intArray[BYTES_OFFSET] element

        int index = intArray[BYTES_OFFSET];
        int i = fromByte;
        int maxWord;
        int nBytes;

        int wordIndex = index >>2;
        int byteIndex = index & 0x03;

        intArray[BYTES_OFFSET] = ( index + toByte - fromByte + 1 ) & 077 ;

        // In general case there are 3 stages :
        // - appending bytes to non-full word,
        // - writing 4 bytes into empty words,
        // - writing less than 4 bytes in last word

        if ( byteIndex != 0 ) {       // appending bytes in non-full word (as if)

            for ( ; ( i <= toByte ) && ( byteIndex < 4 ) ; i++ ) {
                intArray[wordIndex] |= ( byteInput[i] & 0xFF ) << ((3 - byteIndex)<<3) ;
                byteIndex++;
            }
            if ( byteIndex == 4 ) {
                wordIndex++;
                if ( wordIndex == 16 ) {          // intArray is full, computing hash

                    //computeHash(intArray);
                    wordIndex = 0;
                }
            }
            if ( i > toByte ) {                 // all input bytes appended
                return ;
            }
        }

        // writing full words

        maxWord = (toByte - i + 1) >> 2;           // # of remaining full words, may be "0"
        for ( int k = 0; k < maxWord ; k++ ) {

            intArray[wordIndex] = ( ((int) byteInput[i   ] & 0xFF) <<24 ) |
                                  ( ((int) byteInput[i +1] & 0xFF) <<16 ) |
                                  ( ((int) byteInput[i +2] & 0xFF) <<8  ) |
                                  ( ((int) byteInput[i +3] & 0xFF)      )  ;
            i += 4;
            wordIndex++;

            if ( wordIndex < 16 ) {     // buffer is not full yet
                continue;
            }
            //computeHash(intArray);      // buffer is full, computing hash
            wordIndex = 0;
        }

        // writing last incomplete word
        // after writing free byte positions are set to "0"s

        nBytes = toByte - i +1;
        if ( nBytes != 0 ) {

            int w =  ((int) byteInput[i] & 0xFF) <<24 ;

            if ( nBytes != 1 ) {
                w |= ((int) byteInput[i +1] & 0xFF) <<16 ;
                if ( nBytes != 2) {
                    w |= ((int) byteInput[i +2] & 0xFF) <<8 ;
                }
            }
            intArray[wordIndex] = w;
        }

        return ;
    }

    public static void main(String[] args) {
        byte[] out = new byte[20];
        SHA1PRNG_SecureRandomImpl_KitKat prng = new SHA1PRNG_SecureRandomImpl_KitKat();
        prng.engineNextBytes(out);
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

class CarsTypesController extends \BaseController {

	/**
	* [validate description]
	* @param  [type] $data [description]
	* @return [type]       [description]
	*/
	public function validate($data) {
		$validation = Validator::make($data, array(
		    'name' => 'required'
		));
		if($validation->fails()){
			return $validation->messages();
		}
		return true;
	}

	/**
	 * Display a listing of the resource.
	 *
	 * @return Response
	 */
	public function getIndex()
	{
		$cartype = Cartype::getCartype();
		return View::make('store/car_type/index')->with('cartype', $cartype);
	}

	public function getAdd()
	{
		return View::make('store/car_type/add');
	}

	/**
	 * Show the form for creating a new resource.
	 *
	 * @return Response
	 */
	public function postCreate()
	{
		if (Request::isMethod('post')) {
			$data = Input::all();
			if($this->validate($data) === true) {
				$saved = Cartype::saveCartype($data);
					if($saved) {
						Session::flash('message', 'Saved success');
						return Redirect::to('store/cartypes');
					}
						Session::flash('message', $saved);
						return Redirect::to('store/cartypes');
			}else{
				Session::flash('message', $this->validate($data));
				return Redirect::to('store/cartypes');
			}
		}
	}

	/**
	 * Show the form for editing the specified resource.
	 *
	 * @return Response
	 */
	public function postEdit()
	{
		if (Request::isMethod('post')) {
			$data = Input::all();
			if($this->validate($data) === true) {
				$saved = Cartype::saveCartype($data);
					if($saved) {
						Session::flash('message', 'Saved success');
						return Redirect::to('store/cartypes');
					}
					Session::flash('message', $saved);
					return Redirect::to('store/cartypes');
			}else{
				Session::flash('message', $this->validate($data));
				return Redirect::to('store/cartypes');
			}
		}
	}

	/**
	* Remove the specified resource from storage.
	*
	* @param  int  $id
	* @return Response
	*/
	public function getDestroy($id)
	{
		$destroy = Cartype::deleteCartype($id);
		if($destroy) {
			Session::flash('message', 'Delete success!');
			return Redirect::to('store/cartypes');
		}
		Session::flash('message', 'Delete error!');
		return Redirect::to('store/cartypes');
	}

}


text:
namespace net {
namespace ct {

SignedTreeHead::SignedTreeHead() {}

SignedTreeHead::SignedTreeHead(Version version,
                               const base::Time& timestamp,
                               uint64_t tree_size,
                               const char sha256_root_hash[kSthRootHashLength],
                               const DigitallySigned& signature,
                               const std::string& log_id)
    : version(version),
      timestamp(timestamp),
      tree_size(tree_size),
      signature(signature),
      log_id(log_id) {
  memcpy(this->sha256_root_hash, sha256_root_hash, kSthRootHashLength);
}

SignedTreeHead::SignedTreeHead(const SignedTreeHead& other) = default;

SignedTreeHead::~SignedTreeHead() {}

void PrintTo(const SignedTreeHead& sth, std::ostream* os) {
  (*os) << "{\n"
        << "\t\"version\": " << sth.version << ",\n"
        << "\t\"timestamp\": " << sth.timestamp << ",\n"
        << "\t\"tree_size\": " << sth.tree_size << ",\n"
        << "\t\"sha256_root_hash\": \""
        << base::HexEncode(sth.sha256_root_hash, kSthRootHashLength)
        << "\",\n\t\"log_id\": \""
        << base::HexEncode(sth.log_id.data(), sth.log_id.size()) << "\"\n"
        << "}";
}

}  // namespace ct
}  // namespace net


text: Rails.application.config.assets.precompile += %w( spree/backend/variant_autocomplete.js )


text:
package com.codeest.geeknews;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static junit.framework.Assert.assertEquals;

/**
 * Instrumentation test, which will execute on an Android device.
 *
 * @see Testing documentation
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() throws Exception {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals("com.codeest.geeknews", appContext.getPackageName());
    }
}


text:
<?php

return array(
    'validate.alternate' => 'Alternate required',
    'validate.between' => '"%value%" is not between "%min%" and "%max%" (%inclusive%)',
    'validate.between.inclusive' => 'inclusive',
    'validate.between.notInclusive' => 'not inclusive',
    'validate.equal' => 'Doesn\'t match',
    'validate.forbidden' => '"%value%" is forbidden',
    'validate.identical.notMatch' => 'Does not match',
    'validate.notIdentical.match' => 'Unexpected match',
    'validate.inArray' => '"%value%" is not in the valid values',
    'validate.invalidAlnum' => 'Only english and number characters allowed',
    'validate.invalidAlpha' => 'Only english characters allowed',
    'validate.invalidEmail' => 'Invalid email-address',
    'validate.invalidInteger' => 'Invalid integer',
    'validate.invalidNumeric' => 'Only number characters allowed',
    'validate.invalidScalar' => 'Invalid scalar',
    'validate.invalidUrl' => 'Invalid URL',
    'validate.length.higher' => '"%value%"\'s length (%length%) is higher than the maximum "%max%"',
    'validate.length.lower' => '"%value%"\'s length (%length%) is lower than the minimum "%min%"',
    'validate.pattern' => '"%value%" does not match "%pattern%"',
    'validate.required' => 'Required',
    'validate.rpc.default' => 'Taken',
    'validate.rpc.error' => 'Error',
    'validate.rpc.returnFalse' => 'Taken',
    'validate.than.equal' => 'or equal',
    'validate.than.less' => 'Doesn\'t less',
    'validate.than.more' => 'Doesn\'t more',
    'validate.file.zip.cannotBeOpened' => 'File "%value%" cannot be opened as zip',
    'validate.file.zip.entryNotFound.%entry%' => 'Zip file "%value%" does not appears to be valid: entry "%entry%" not found',
);


text:
var WeatherApi = function(){
	this.apiKey = "";
	this.url = "http://api.openweathermap.org/data/2.5/";
}

WeatherApi.prototype.getForecast = function(cityId) {
	var requestUrl = this.url + "forecast/daily?id=" + cityId + "&cnt=16&APPID=" + this.apiKey;
	return $.ajax({
		url: requestUrl,
		type: "GET"
	});
}


text:
Welcome to Spyro Fanworks!

This site aims to bring all the Spyro fan created content in one place including fangames, hacks and tools. Below is listed the most recent additions to the site.

      {% include post_list.html %}


text:
HADOOP_PATH=~/hadoop-2.7.0

APP_NAME=SortDataPreprocessor
JAR_NAME=SortDataPreprocessor

# compile
$HADOOP_PATH/bin/hadoop com.sun.tools.javac.Main -Xlint ../common/*.java $APP_NAME.java

# packing
mv ../common/*.class .
jar cf $JAR_NAME.jar *.class


text:
module Liquid; class Tag; end; end

module Jekyll
  class SeoTag < Liquid::Tag
    VERSION = "2.7.1"
  end
end


text:
using System;
using System.Linq.Expressions;

namespace Mixins
{
    /// <summary>
    /// Gets property name using lambda expressions.
    /// </summary>
    public static class PropertyName
    {
        public static string For<T, T1>(Expression<Func<T, T1>> expression)
        {
            var body = expression.Body;
            return GetMemberName(body);
        }

        public static string For<T>(Expression<Func<T>> expression)
        {
            var body = expression.Body;
            return GetMemberName(body);
        }

        public static string GetMemberName(Expression expression)
        {
            var memberExpression = expression as MemberExpression;
            if (memberExpression != null)
            {
                if (memberExpression.Expression.NodeType == ExpressionType.MemberAccess)
                {
                    return GetMemberName(memberExpression.Expression) + "." + memberExpression.Member.Name;
                }
                return memberExpression.Member.Name;
            }

            var unaryExpression = expression as UnaryExpression;
            if (unaryExpression != null)
            {
                if (unaryExpression.NodeType != ExpressionType.Convert)
                    throw new Exception(string.Format("Cannot interpret member from {0}", expression));

                return GetMemberName(unaryExpression.Operand);
            }

            throw new Exception(string.Format("Could not determine member from {0}", expression));
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <title>Module: ApplicationHelper</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />

          Module
          ApplicationHelper

            In:

                app/helpers/application_helper.rb

Methods added to this helper will be available to all templates in the
application.

Methods

      class_for_nav
      google_maps_key
      log_or_new_path
      logged_in?
      login_or_users_path
      percentage
      quick_link
      rounded
      status
      vote_quick_link

Public Instance methods

          class_for_nav(params, action, controller = 'home')

[Source]

    # File app/helpers/application_helper.rb, line 42
42:   def class_for_nav(params, action, controller = 'home')
43:     params[:controller] == controller && params[:action] == action ? { :class => 'down' } : {}
44:   end

          google_maps_key()

[Source]

    # File app/helpers/application_helper.rb, line 11
11:   def google_maps_key
12:     if @controller.request.env['SERVER_NAME'] =~ /allourideas/
13:       # allourideas.org
14:       'ABQIAAAAYF1X_Xk6WVB2CJtN2ceMNRTLCQwoxxEaAy7MVXgS8jhkwc-a1hQayD28z5vhzz9k8nBR7mUClbkciQ'
15:     else
16:       # compairwise.photocracy.org
17:       'ABQIAAAAYF1X_Xk6WVB2CJtN2ceMNRSiwqBVK9UCwh-neRGNZQGFqE8clRQUTXNArLqWIfILMbRsjgmsvO3XEg'
18:     end
19:   end

          log_or_new_path()

[Source]

    # File app/helpers/application_helper.rb, line 38
38:   def log_or_new_path
39:     @controller.user_set? ? new_question_path : new_user_path
40:   end

          logged_in?()

[Source]

   # File app/helpers/application_helper.rb, line 3
3:   def logged_in?
4:     @controller.user_set?
5:   end

          login_or_users_path()

[Source]

    # File app/helpers/application_helper.rb, line 50
50:   def login_or_users_path
51:     @controller.user_set? ? users_path : login_path
52:   end

          percentage(num, denom)

[Source]

   # File app/helpers/application_helper.rb, line 7
7:   def percentage(num, denom)
8:     @controller.percentage(num, denom)
9:   end

          quick_link(uri, default)

[Source]

    # File app/helpers/application_helper.rb, line 30
30:   def quick_link(uri, default)
31:     unless @name
32:       q = Question.first(:conditions => { :pairwise_id => @question_id } )
33:       @name = q && !q.name.empty? ? q.name : true
34:     end
35:     @name == true ? default : "/#{@name}/#{uri}"
36:   end

          rounded(content, classes = "border")

[Source]

    # File app/helpers/application_helper.rb, line 46
46:   def rounded(content, classes = "border")
47:     render(:partial => 'shared/rounded', :locals => { :classes => classes, :content => content })
48:   end

          status(active)

[Source]

    # File app/helpers/application_helper.rb, line 21
21:   def status(active)
22:     active ? t('common.active') : t('common.inactive')
23:   end

          vote_quick_link(default)

[Source]

    # File app/helpers/application_helper.rb, line 25
25:   def vote_quick_link(default)
26:     q = Question.first(:conditions => { :pairwise_id => @question_id } )
27:     q && !q.name.empty? ? @controller.named_url_for_question(q) : default
28:   end

[Validate]


text:
<!DOCTYPE html>

		<meta http-equiv="content-type" content="text/html" charset="UTF-8">
		<meta name="viewport" content="height=device-height, width=device-width, user-scalable=no">

		<link type="text/css" rel="stylesheet" href="resources/css/jquery.mobile.min.css"/>
		<link type="text/css" rel="stylesheet" href="resources/css/main.css"/>
		<link type="text/css" rel="stylesheet" href="resources/css/level.css"/>

					<button id="menuCtrlBtn">Menu</button>
					<button id="resetCtrlBtn">Replay</button>
					<button id="nextCtrlBtn">Next</button>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="d8c55cc3-dd21-47da-ad15-779057035b43" name="Default" comment="" />
    <ignored path="android.iws" />
    <ignored path=".idea/workspace.xml" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="DaemonCodeAnalyzer">
    <disable_hints />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="android" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="PhoneRTCPlugin.java" pinned="false" current="true" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/PhoneRTCPlugin.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="4695" max-vertical-offset="6405">
              <caret line="348" column="94" selection-start-line="348" selection-start-column="94" selection-end-line="348" selection-end-column="94" />
              <folding>
                <element signature="imports" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Session.java" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/Session.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="4230" max-vertical-offset="6420">
              <caret line="282" column="46" selection-start-line="282" selection-start-column="46" selection-end-line="282" selection-end-column="46" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="VideoGLView.java" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoGLView.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="435">
              <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="VideoTrackRendererPair.java" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoTrackRendererPair.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="75" max-vertical-offset="540">
              <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="VideoConfig.java" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoConfig.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="1605">
              <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindManager">
    <FindUsagesManager>
      <setting name="OPEN_NEW_TAB" value="true" />
    </FindUsagesManager>
  </component>
  <component name="GradleLocalSettings">
    <option name="modificationStamps">
      <map>
        <entry key="$USER_HOME$/workspace/WizardPager" value="7067764920000" />
      </map>
    </option>
  </component>
  <component name="IdeDocumentHistory">
    <option name="changedFiles">
      <list>
        <option value="$PROJECT_DIR$/com/dooble/phonertc/PhoneRTCPlugin.java" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="53" />
    <option name="y" value="22" />
    <option name="width" value="1867" />
    <option name="height" value="1058" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectReloadState">
    <option name="STATE" value="0" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="android" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="android" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="android" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="android" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="android" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="phonertc" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
      <pane id="PackagesPane" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="GoToClass.includeLibraries" value="false" />
    <property name="GoToClass.toSaveIncludeLibraries" value="false" />
    <property name="GoToFile.includeJavaFiles" value="false" />
    <property name="MemberChooser.sorted" value="false" />
    <property name="MemberChooser.showClasses" value="true" />
    <property name="MemberChooser.copyJavadoc" value="false" />
    <property name="options.lastSelected" value="editor.preferences.appearance" />
    <property name="options.splitter.main.proportions" value="0.3" />
    <property name="options.splitter.details.proportions" value="0.2" />
    <property name="options.searchVisible" value="true" />
    <property name="FullScreen" value="false" />
  </component>
  <component name="RunManager">
    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
      <module name="" />
      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
      <option name="PROGRAM_PARAMETERS" />
      <method />
    </configuration>
    <configuration default="true" type="Remote" factoryName="Remote">
      <option name="USE_SOCKET_TRANSPORT" value="true" />
      <option name="SERVER_MODE" value="false" />
      <option name="SHMEM_ADDRESS" value="javadebug" />
      <option name="HOST" value="localhost" />
      <option name="PORT" value="5005" />
      <method />
    </configuration>
    <configuration default="true" type="Applet" factoryName="Applet">
      <module name="" />
      <option name="MAIN_CLASS_NAME" />
      <option name="HTML_FILE_NAME" />
      <option name="HTML_USED" value="false" />
      <option name="WIDTH" value="400" />
      <option name="HEIGHT" value="300" />
      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
      <option name="VM_PARAMETERS" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <method />
    </configuration>
    <configuration default="true" type="TestNG" factoryName="TestNG">
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="SUITE_NAME" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="GROUP_NAME" />
      <option name="TEST_OBJECT" value="CLASS" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="OUTPUT_DIRECTORY" />
      <option name="ANNOTATION_TYPE" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="moduleWithDependencies" />
      </option>
      <option name="USE_DEFAULT_REPORTERS" value="false" />
      <option name="PROPERTIES_FILE" />
      <envs />
      <properties />
      <listeners />
      <method />
    </configuration>
    <configuration default="true" type="Application" factoryName="Application">
      <option name="MAIN_CLASS_NAME" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="JUnit" factoryName="JUnit">
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="TEST_OBJECT" value="class" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="moduleWithDependencies" />
      </option>
      <envs />
      <patterns />
      <method />
    </configuration>
    <list size="0" />
    <configuration name="<template>" type="WebApp" default="true" selected="false">
      <Host>localhost</Host>
      <Port>5050</Port>
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="d8c55cc3-dd21-47da-ad15-779057035b43" name="Default" comment="" />
      <created>1424871272648</created>
      <updated>1424871272648</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="53" y="22" width="1867" height="1058" extended-state="0" />
    <editor active="false" />
    <layout>
      <window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24986301" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <option name="myTodoPanelSettings">
      <TodoPanelSettings />
    </option>
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/PhoneRTCPlugin.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="6690">
          <caret line="348" column="94" selection-start-line="348" selection-start-column="94" selection-end-line="348" selection-end-column="94" />
          <folding>
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/Session.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="4230" max-vertical-offset="6420">
          <caret line="282" column="46" selection-start-line="282" selection-start-column="46" selection-end-line="282" selection-end-column="46" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoGLView.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="435">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoTrackRendererPair.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="75" max-vertical-offset="540">
          <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoConfig.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="1605">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/PhoneRTCPlugin.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="4950" max-vertical-offset="6690">
          <caret line="348" column="94" selection-start-line="348" selection-start-column="94" selection-end-line="348" selection-end-column="94" />
          <folding>
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/Session.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="4230" max-vertical-offset="6420">
          <caret line="282" column="46" selection-start-line="282" selection-start-column="46" selection-end-line="282" selection-end-column="46" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoGLView.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="435">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoTrackRendererPair.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="75" max-vertical-offset="540">
          <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoConfig.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="1605">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/PhoneRTCPlugin.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="4950" max-vertical-offset="6690">
          <caret line="348" column="94" selection-start-line="348" selection-start-column="94" selection-end-line="348" selection-end-column="94" />
          <folding>
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/Session.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="4230" max-vertical-offset="6420">
          <caret line="282" column="46" selection-start-line="282" selection-start-column="46" selection-end-line="282" selection-end-column="46" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoGLView.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="435">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoTrackRendererPair.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="75" max-vertical-offset="540">
          <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoConfig.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="1605">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/PhoneRTCPlugin.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="4530" max-vertical-offset="6465">
          <caret line="341" column="12" selection-start-line="341" selection-start-column="12" selection-end-line="341" selection-end-column="12" />
          <folding>
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/Session.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="4230" max-vertical-offset="6420">
          <caret line="282" column="46" selection-start-line="282" selection-start-column="46" selection-end-line="282" selection-end-column="46" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoGLView.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="435">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoTrackRendererPair.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="75" max-vertical-offset="540">
          <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoConfig.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="1605">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoTrackRendererPair.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="405">
          <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/Session.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="3491" max-vertical-offset="5835">
          <caret line="282" column="46" selection-start-line="282" selection-start-column="46" selection-end-line="282" selection-end-column="46" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoGLView.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="375">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/VideoConfig.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="241" max-vertical-offset="1155">
          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/com/dooble/phonertc/PhoneRTCPlugin.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="4695" max-vertical-offset="6405">
          <caret line="348" column="94" selection-start-line="348" selection-start-column="94" selection-end-line="348" selection-end-column="94" />
          <folding>
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
  </component>
</project>


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

<extension href="EXT_texture_compression_rgtc/">
  <name>EXT_texture_compression_rgtc</name>
  <contact>
    WebGL working group (public_webgl 'at' khronos.org)
  </contact>
  <contributors>
    <contributor>Olli Etuaho, NVIDIA</contributor>
    <contributor>Members of the WebGL working group</contributor>
  </contributors>
  <number>39</number>
  <depends>
    <api version="1.0"/>
  </depends>
  <overview>

      This extension exposes the compressed texture format defined in the

      EXT_texture_compression_rgtc OpenGL extension to WebGL. Consult that extension
      specification for behavioral definitions, including error behaviors.

      Updates of partial tiles detailed in the "Implementation Note" section of the
      EXT_texture_compression_rgtc specification must be supported in an implementation of this
      WebGL extension.

    <features>
      <feature>
        Compression formats COMPRESSED_RED_RGTC1_EXT,
        COMPRESSED_SIGNED_RED_RGTC1_EXT,
        COMPRESSED_RED_GREEN_RGTC2_EXT,
        and COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT may be passed to
        the compressedTexImage2D and compressedTexSubImage2D entry points.
      </feature>
      <feature>
        Calling getParameter with the argument COMPRESSED_TEXTURE_FORMATS
        will include the formats from this specification.
      </feature>
      <feature>

The following format-specific restrictions must be enforced:

COMPRESSED_RED_RGTC1_EXT

COMPRESSED_SIGNED_RED_RGTC1_EXT

The byteLength of the ArrayBufferView, pixels, passed to
          compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:

            ceil(width / 4) * ceil(height / 4) * 8

If it is not, an INVALID_VALUE error is generated.

COMPRESSED_RED_GREEN_RGTC2_EXT

COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT

The byteLength of the ArrayBufferView, pixels, passed to
          compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:

            ceil(width / 4) * ceil(height / 4) * 16

If it is not, an INVALID_VALUE error is generated.

      </feature>
    </features>
  </overview>
  <idl xml:space="preserve">
[NoInterfaceObject]
interface EXT_texture_compression_rgtc {
    const GLenum COMPRESSED_RED_RGTC1_EXT = 0x8DBB;
    const GLenum COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC;
    const GLenum COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD;
    const GLenum COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE;
};
  </idl>

  <newtok>
    <function name="compressedTexImage2D">
      <param name="internalformat" type="GLenum"/>
      Accepted by the internalformat parameter:
      COMPRESSED_RED_RGTC1_EXT,
      COMPRESSED_SIGNED_RED_RGTC1_EXT,
      COMPRESSED_RED_GREEN_RGTC2_EXT,
      COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT

    </function>

    <function name="compressedTexSubImage2D">
      <param name="internalformat" type="GLenum"/>
      Accepted by the internalformat parameter:
      COMPRESSED_RED_RGTC1_EXT,
      COMPRESSED_SIGNED_RED_RGTC1_EXT,
      COMPRESSED_RED_GREEN_RGTC2_EXT,
      COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT

    </function>
  </newtok>

  <errors>
    <error enum="INVALID_VALUE">
      The error INVALID_VALUE is generated by compressedTexImage2D and
      compressedTexSubImage2D if the internalformat parameter is
      COMPRESSED_RED_RGTC1_EXT or COMPRESSED_SIGNED_RED_RGTC1_EXT
      and the byteLength of the ArrayBufferView is not:

        ceil(width / 4) * ceil(height / 4) * 8

    </error>
    <error enum="INVALID_VALUE">
      The error INVALID_VALUE is generated by compressedTexImage2D and
      compressedTexSubImage2D if the internalformat parameter is
      COMPRESSED_RED_GREEN_RGTC2_EXT or COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT
      and the byteLength of the ArrayBufferView is not:

        ceil(width / 4) * ceil(height / 4) * 16

    </error>
  </errors>

  <history>
    <revision date="2018/09/26">
      <change>Initial revision.</change>
    </revision>
    <revision date="2018/09/26">
      <change>Rename to EXT_texture_compression_rgtc from WEBGL_compressed_texture_rgtc</change>
    </revision>
    <revision date="2018/11/05">
      <change>Moved to Community Approved status.</change>
    </revision>
  </history>
</extension>