text:
/* IOOffset.h created by rsulack on Wed 17-Sep-1997 */
/* IOOffset.h converted to C++ by gvdl on Fri 1998-10-30 */

#ifndef _OS_OSNUMBER_H
#define _OS_OSNUMBER_H

#include <libkern/c++/OSObject.h>

/*!
 * @header
 *
 * @abstract
 * This header declares the OSNumber container class.
 */

/*!
 * @class OSNumber
 *
 * @abstract
 * OSNumber wraps an integer value in a C++ object
 * for use in Libkern collections.
 *
 * @discussion
 * OSNumber represents an integer of 8, 16, 32, or 64 bits
 * as a Libkern C++ object.
 * OSNumber objects are mutable: you can add to or set their values.
 *
 * Use Restrictions
 *
 * With very few exceptions in the I/O Kit, all Libkern-based C++
 * classes, functions, and macros are unsafe
 * to use in a primary interrupt context.
 * Consult the I/O Kit documentation related to primary interrupts
 * for more information.
 *
 * OSNumber provides no concurrency protection;
 * it's up to the usage context to provide any protection necessary.
 * Some portions of the I/O Kit, such as
 * @link //apple_ref/doc/class/IORegistryEntry IORegistryEntry@/link,
 * handle synchronization via defined member functions for setting
 * properties.
 */
class OSNumber : public OSObject
{
    friend class OSSerialize;

    OSDeclareDefaultStructors(OSNumber)

#if APPLE_KEXT_ALIGN_CONTAINERS

protected:
    unsigned int size;
    unsigned long long value;

#else /* APPLE_KEXT_ALIGN_CONTAINERS */

protected:
    unsigned long long value;
    unsigned int size;

    struct ExpansionData { };

    /* Reserved for future use.  (Internal use only)  */
    ExpansionData * reserved;

#endif /* APPLE_KEXT_ALIGN_CONTAINERS */

public:

   /*!
    * @function withNumber
    *
    * @abstract
    * Creates and initializes an instance of OSNumber
    * with an integer value.
    *
    * @param value        The numeric integer value for the OSNumber to store.
    * @param numberOfBits The number of bits to limit storage to.
    *
    * @result
    * An instance of OSNumber with a reference count of 1;
    * NULL on failure.
    *
    * @discussion
    * value is masked to the provided numberOfBits
    * when the OSNumber object is initialized.
    *
    * You can change the value of an OSNumber later
    * using @link setValue setValue@/link
    * and @link addValue addValue@/link,
    * but you can't change the bit size.
    */
    static OSNumber * withNumber(
        unsigned long long value,
        unsigned int       numberOfBits);

   /*!
    * @function withNumber
    *
    * @abstract
    * Creates and initializes an instance of OSNumber
    * with an unsigned integer value represented as a C string.
    *
    * @param valueString  A C string representing a numeric value
    *                     for the OSNumber to store.
    * @param numberOfBits The number of bits to limit storage to.
    *
    * @result
    * An instance of OSNumber with a reference count of 1;
    * NULL on failure.
    *
    * @discussion
    * This function does not work in I/O Kit versions prior to 8.0 (Mac OS X 10.4).
    * In I/O Kit version 8.0 and later, it works
    * but is limited to parsing unsigned 32 bit quantities.
    * The format of the C string may be decimal, hexadecimal ("0x" prefix),
    * binary ("0b" prefix), or octal ("0" prefix).
    *
    * The parsed value is masked to the provided numberOfBits
    * when the OSNumber object is initialized.
    *
    * You can change the value of an OSNumber later
    * using @link setValue setValue@/link
    * and @link addValue addValue@/link,
    * but you can't change the bit size.
    */
    static OSNumber * withNumber(
        const char   * valueString,
        unsigned int   numberOfBits);

   /*!
    * @function init
    *
    * @abstract
    * Initializes an instance of OSNumber with an integer value.
    *
    * @param value        The numeric integer value for the OSNumber to store.
    * @param numberOfBits The number of bits to limit storage to.
    *
    * @result
    * true if initialization succeeds,
    * false on failure.
    *
    * @discussion
    * Not for general use. Use the static instance creation method
    * @link
    * //apple_ref/cpp/clm/OSNumber/withNumber/staticOSNumber*\/(constchar*,unsignedint)
    * withNumber(unsigned long long, unsigned int)@/link
    * instead.
    */
    virtual bool init(
        unsigned long long value,
        unsigned int       numberOfBits);

   /*!
    * @function init
    *
    * @abstract
    * Initializes an instance of OSNumber
    * with an unsigned integer value represented as a C string.
    *
    * @param valueString  A C string representing a numeric value
    *                     for the OSNumber to store.
    * @param numberOfBits The number of bits to limit storage to.
    *
    * @result
    * true if initialization succeeds,
    * false on failure.
    *
    * @discussion
    * Not for general use. Use the static instance creation method
    * @link
    * //apple_ref/cpp/clm/OSNumber/withNumber/staticOSNumber*\/(constchar*,unsignedint)
    * withNumber(const char *, unsigned int)@/link
    * instead.
    */
    virtual bool init(
        const char   * valueString,
        unsigned int   numberOfBits);

   /*!
    * @function free
    *
    * @abstract
    * Deallocates or releases any resources
    * used by the OSNumber instance.
    *
    * @discussion
    * This function should not be called directly;
    * use
    * @link
    * //apple_ref/cpp/instm/OSObject/release/virtualvoid/()
    * release@/link
    * instead.
    */
    virtual void free() APPLE_KEXT_OVERRIDE;

   /*!
    * @function numberOfBits
    *
    * @abstract
    * Returns the number of bits used to represent
    * the OSNumber object's integer value.
    *
    * @result
    * The number of bits used to represent
    * the OSNumber object's integer value.
    *
    * @discussion
    * The number of bits is used to limit the stored value of the OSNumber.
    * Any change to its value is performed as an unsigned long long
    * and then truncated to the number of bits.
    */
    virtual unsigned int numberOfBits() const;

   /*!
    * @function numberOfBytes
    *
    * @abstract
    * Returns the number of bytes used to represent
    * the OSNumber object's integer value.
    *
    * @result
    * The number of bytes used to represent
    * the OSNumber object's integer value.
    * See @link numberOfBits numberOfBits@/link.
    */
    virtual unsigned int numberOfBytes() const;

// xx-review: should switch to explicitly-sized int types
// xx-review: but that messes up C++ mangled symbols :-(

   /*!
    * @function unsigned8BitValue
    *
    * @abstract
    * Returns the OSNumber object's integer value
    * cast as an unsigned 8-bit integer.
    *
    * @result
    * The OSNumber object's integer value
    * cast as an unsigned 8-bit integer.
    *
    * @discussion
    * This function merely casts the internal integer value,
    * giving no indication of truncation or other potential conversion problems.
    */
    virtual unsigned char unsigned8BitValue() const;

   /*!
    * @function unsigned16BitValue
    *
    * @abstract
    * Returns the OSNumber object's integer value
    * cast as an unsigned 16-bit integer.
    *
    * @result
    * Returns the OSNumber object's integer value
    * cast as an unsigned 16-bit integer.
    *
    * @discussion
    * This function merely casts the internal integer value,
    * giving no indication of truncation or other potential conversion problems.
    */
    virtual unsigned short unsigned16BitValue() const;

   /*!
    * @function unsigned32BitValue
    *
    * @abstract
    * Returns the OSNumber object's integer value
    * cast as an unsigned 32-bit integer.
    *
    * @result
    * Returns the OSNumber object's integer value
    * cast as an unsigned 32-bit integer.
    *
    * @discussion
    * This function merely casts the internal integer value,
    * giving no indication of truncation or other potential conversion problems.
    */
    virtual unsigned int unsigned32BitValue() const;

   /*!
    * @function unsigned64BitValue
    *
    * @abstract
    * Returns the OSNumber object's integer value
    * cast as an unsigned 64-bit integer.
    *
    * @result
    * Returns the OSNumber object's integer value
    * cast as an unsigned 64-bit integer.
    *
    * @discussion
    * This function merely casts the internal integer value,
    * giving no indication of truncation or other potential conversion problems.
    */
    virtual unsigned long long unsigned64BitValue() const;

// xx-review: wow, there's no addNumber(OSNumber *)!

   /*!
    * @function addValue
    *
    * @abstract
    * Adds a signed integer value to the internal integer value
    * of the OSNumber object.
    *
    * @param value  The value to be added.
    *
    * @discussion
    * This function adds values as 64-bit integers,
    * but masks the result by the bit size
    * (see @link numberOfBits numberOfBits@/link),
    * so addition overflows will not necessarily
    * be the same as for plain C integers.
    */
    virtual void addValue(signed long long value);

   /*!
    * @function setValue
    *
    * @abstract
    * Replaces the current internal integer value
    * of the OSNumber object by the value given.
    *
    * @param value  The new value for the OSNumber object,
    *               which is truncated by the bit size of the OSNumber object
    *               (see @link numberOfBits numberOfBits@/link).
    */
    virtual void setValue(unsigned long long value);

   /*!
    * @function isEqualTo
    *
    * @abstract
    * Tests the equality of two OSNumber objects.
    *
    * @param aNumber     The OSNumber to be compared against the receiver.
    *
    * @result
    * true if the OSNumber objects are equal,
    * false if not.
    *
    * @discussion
    * Two OSNumber objects are considered equal
    * if they represent the same C integer value.
    */
    virtual bool isEqualTo(const OSNumber * aNumber) const;

   /*!
    * @function isEqualTo
    *
    * @abstract
    * Tests the equality an OSNumber to an arbitrary object.
    *
    * @param anObject An object to be compared against the receiver.
    *
    * @result
    * true if the objects are equal,
    * false if not.
    *
    * @discussion
    * An OSNumber is considered equal to another object if that object is
    * derived from OSNumber and represents the same C integer value.
    */
    virtual bool isEqualTo(const OSMetaClassBase * anObject) const APPLE_KEXT_OVERRIDE;

   /*!
    * @function serialize
    *
    * @abstract
    * Archives the receiver into the provided
    * @link //apple_ref/doc/class/OSSerialize OSSerialize@/link object.
    *
    * @param serializer The OSSerialize object.
    *
    * @result
    * true if serialization succeeds, false if not.
    */
    virtual bool serialize(OSSerialize * serializer) const APPLE_KEXT_OVERRIDE;

    OSMetaClassDeclareReservedUnused(OSNumber, 0);
    OSMetaClassDeclareReservedUnused(OSNumber, 1);
    OSMetaClassDeclareReservedUnused(OSNumber, 2);
    OSMetaClassDeclareReservedUnused(OSNumber, 3);
    OSMetaClassDeclareReservedUnused(OSNumber, 4);
    OSMetaClassDeclareReservedUnused(OSNumber, 5);
    OSMetaClassDeclareReservedUnused(OSNumber, 6);
    OSMetaClassDeclareReservedUnused(OSNumber, 7);
};

#endif /* !_OS_OSNUMBER_H */


text:
package org.lwjgl.ovr;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

import static org.lwjgl.ovr.OVR.ovrEye_Count;

/**
 * Describes a layer that specifies a monoscopic or stereoscopic view. This is the kind of layer that's typically used as layer 0 to
 * {@link OVR#ovr_SubmitFrame}, as it is the kind of layer used to render a 3D stereoscopic view.
 *
 *
Member documentation

 *
 *

 *
{@code Header} – {@code Header.Type} must be {@link OVR#ovrLayerType_EyeFov}.

 *
{@code ColorTexture} – {@code ovrTextureSwapChains} for the left and right eye respectively. The second one of which can be {@code NULL}.

 *
{@code Viewport} – specifies the ColorTexture sub-rect UV coordinates. Both {@code Viewport[0]} and {@code Viewport[1]} must be valid.

 *
{@code Fov} – the viewport field of view

 *
{@code RenderPose} –
 * specifies the position and orientation of each eye view, with the position specified in meters. RenderPose will typically be the value returned from
 * {@link OVRUtil#ovr_CalcEyePoses}, but can be different in special cases if a different head pose is used for rendering.

 *
{@code SensorSampleTime} –
 * specifies the timestamp when the source {@link OVRPosef} (used in calculating RenderPose) was sampled from the SDK. Typically retrieved by calling
 * {@link OVR#ovr_GetTimeInSeconds} around the instant the application calls {@link OVR#ovr_GetTrackingState}. The main purpose for this is to accurately track app
 * tracking latency.

 *

 *
 *
Layout

 *
 *
struct ovrLayerEyeFov {
    {@link OVRLayerHeader ovrLayerHeader} Header;
    ovrTextureSwapChain ColorTexture[ovrEye_Count];
    {@link OVRRecti ovrRecti} Viewport[ovrEye_Count];
    {@link OVRFovPort ovrFovPort} Fov[ovrEye_Count];
    {@link OVRPosef ovrPosef} RenderPose[ovrEye_Count];
    double SensorSampleTime;
}

 */
public class OVRLayerEyeFov extends Struct implements NativeResource {

	/** The struct size in bytes. */
	public static final int SIZEOF;

	public static final int ALIGNOF;

	/** The struct member offsets. */
	public static final int
		HEADER,
		COLORTEXTURE,
		VIEWPORT,
		FOV,
		RENDERPOSE,
		SENSORSAMPLETIME;

	static {
		Layout layout = __struct(
			__member(OVRLayerHeader.SIZEOF, OVRLayerHeader.ALIGNOF),
			__array(POINTER_SIZE, ovrEye_Count),
			__array(OVRRecti.SIZEOF, OVRRecti.ALIGNOF, ovrEye_Count),
			__array(OVRFovPort.SIZEOF, OVRFovPort.ALIGNOF, ovrEye_Count),
			__array(OVRPosef.SIZEOF, OVRPosef.ALIGNOF, ovrEye_Count),
			__member(8)
		);

		SIZEOF = layout.getSize();
		ALIGNOF = layout.getAlignment();

		HEADER = layout.offsetof(0);
		COLORTEXTURE = layout.offsetof(1);
		VIEWPORT = layout.offsetof(2);
		FOV = layout.offsetof(3);
		RENDERPOSE = layout.offsetof(4);
		SENSORSAMPLETIME = layout.offsetof(5);
	}

	OVRLayerEyeFov(long address, ByteBuffer container) {
		super(address, container);
	}

	/**
	 * Creates a {@link OVRLayerEyeFov} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be
	 * visible to the struct instance and vice versa.
	 *
	 *
The created instance holds a strong reference to the container object.

	 */
	public OVRLayerEyeFov(ByteBuffer container) {
		this(memAddress(container), checkContainer(container, SIZEOF));
	}

	@Override
	public int sizeof() { return SIZEOF; }

	/** Returns a {@link OVRLayerHeader} view of the {@code Header} field. */
	public OVRLayerHeader Header() { return nHeader(address()); }
	/** Returns a {@link PointerBuffer} view of the {@code ColorTexture} field. */
	public PointerBuffer ColorTexture() { return nColorTexture(address()); }
	/** Returns the value at the specified index of the {@code ColorTexture} field. */
	public long ColorTexture(int index) { return nColorTexture(address(), index); }
	/** Returns a {@link OVRRecti}.Buffer view of the {@code Viewport} field. */
	public OVRRecti.Buffer Viewport() { return nViewport(address()); }
	/** Returns a {@link OVRRecti} view of the struct at the specified index of the {@code Viewport} field. */
	public OVRRecti Viewport(int index) { return nViewport(address(), index); }
	/** Returns a {@link OVRFovPort}.Buffer view of the {@code Fov} field. */
	public OVRFovPort.Buffer Fov() { return nFov(address()); }
	/** Returns a {@link OVRFovPort} view of the struct at the specified index of the {@code Fov} field. */
	public OVRFovPort Fov(int index) { return nFov(address(), index); }
	/** Returns a {@link OVRPosef}.Buffer view of the {@code RenderPose} field. */
	public OVRPosef.Buffer RenderPose() { return nRenderPose(address()); }
	/** Returns a {@link OVRPosef} view of the struct at the specified index of the {@code RenderPose} field. */
	public OVRPosef RenderPose(int index) { return nRenderPose(address(), index); }
	/** Returns the value of the {@code SensorSampleTime} field. */
	public double SensorSampleTime() { return nSensorSampleTime(address()); }

	/** Copies the specified {@link OVRLayerHeader} to the {@code Header} field. */
	public OVRLayerEyeFov Header(OVRLayerHeader value) { nHeader(address(), value); return this; }
	/** Copies the specified {@link PointerBuffer} to the {@code ColorTexture} field. */
	public OVRLayerEyeFov ColorTexture(PointerBuffer value) { nColorTexture(address(), value); return this; }
	/** Sets the specified value at the specified index of the {@code ColorTexture} field. */
	public OVRLayerEyeFov ColorTexture(int index, long value) { nColorTexture(address(), index, value); return this; }
	/** Copies the specified {@link OVRRecti.Buffer} to the {@code Viewport} field. */
	public OVRLayerEyeFov Viewport(OVRRecti.Buffer value) { nViewport(address(), value); return this; }
	/** Copies the specified {@link OVRRecti} at the specified index of the {@code Viewport} field. */
	public OVRLayerEyeFov Viewport(int index, OVRRecti value) { nViewport(address(), index, value); return this; }
	/** Copies the specified {@link OVRFovPort.Buffer} to the {@code Fov} field. */
	public OVRLayerEyeFov Fov(OVRFovPort.Buffer value) { nFov(address(), value); return this; }
	/** Copies the specified {@link OVRFovPort} at the specified index of the {@code Fov} field. */
	public OVRLayerEyeFov Fov(int index, OVRFovPort value) { nFov(address(), index, value); return this; }
	/** Copies the specified {@link OVRPosef.Buffer} to the {@code RenderPose} field. */
	public OVRLayerEyeFov RenderPose(OVRPosef.Buffer value) { nRenderPose(address(), value); return this; }
	/** Copies the specified {@link OVRPosef} at the specified index of the {@code RenderPose} field. */
	public OVRLayerEyeFov RenderPose(int index, OVRPosef value) { nRenderPose(address(), index, value); return this; }
	/** Sets the specified value to the {@code SensorSampleTime} field. */
	public OVRLayerEyeFov SensorSampleTime(double value) { nSensorSampleTime(address(), value); return this; }

	/** Initializes this struct with the specified values. */
	public OVRLayerEyeFov set(
		OVRLayerHeader Header,
		PointerBuffer ColorTexture,
		OVRRecti.Buffer Viewport,
		OVRFovPort.Buffer Fov,
		OVRPosef.Buffer RenderPose,
		double SensorSampleTime
	) {
		Header(Header);
		ColorTexture(ColorTexture);
		Viewport(Viewport);
		Fov(Fov);
		RenderPose(RenderPose);
		SensorSampleTime(SensorSampleTime);

		return this;
	}

	/** Unsafe version of {@link #set(OVRLayerEyeFov) set}. */
	public OVRLayerEyeFov nset(long struct) {
		memCopy(struct, address(), SIZEOF);
		return this;
	}

	/**
	 * Copies the specified struct data to this struct.
	 *
	 * @param src the source struct
	 *
	 * @return this struct
	 */
	public OVRLayerEyeFov set(OVRLayerEyeFov src) {
		return nset(src.address());
	}

	// -----------------------------------

	/** Returns a new {@link OVRLayerEyeFov} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */
	public static OVRLayerEyeFov malloc() {
		return create(nmemAlloc(SIZEOF));
	}

	/** Returns a new {@link OVRLayerEyeFov} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */
	public static OVRLayerEyeFov calloc() {
		return create(nmemCalloc(1, SIZEOF));
	}

	/** Returns a new {@link OVRLayerEyeFov} instance allocated with {@link BufferUtils}. */
	public static OVRLayerEyeFov create() {
		return new OVRLayerEyeFov(BufferUtils.createByteBuffer(SIZEOF));
	}

	/** Returns a new {@link OVRLayerEyeFov} instance for the specified memory address or {@code null} if the address is {@code NULL}. */
	public static OVRLayerEyeFov create(long address) {
		return address == NULL ? null : new OVRLayerEyeFov(address, null);
	}

	/**
	 * Returns a new {@link OVRLayerEyeFov.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed.
	 *
	 * @param capacity the buffer capacity
	 */
	public static Buffer malloc(int capacity) {
		return create(nmemAlloc(capacity * SIZEOF), capacity);
	}

	/**
	 * Returns a new {@link OVRLayerEyeFov.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed.
	 *
	 * @param capacity the buffer capacity
	 */
	public static Buffer calloc(int capacity) {
		return create(nmemCalloc(capacity, SIZEOF), capacity);
	}

	/**
	 * Returns a new {@link OVRLayerEyeFov.Buffer} instance allocated with {@link BufferUtils}.
	 *
	 * @param capacity the buffer capacity
	 */
	public static Buffer create(int capacity) {
		return new Buffer(BufferUtils.createByteBuffer(capacity * SIZEOF));
	}

	/**
	 * Create a {@link OVRLayerEyeFov.Buffer} instance at the specified memory.
	 *
	 * @param address  the memory address
	 * @param capacity the buffer capacity
	 */
	public static Buffer create(long address, int capacity) {
		return address == NULL ? null : new Buffer(address, null, -1, 0, capacity, capacity);
	}

	// -----------------------------------

	/** Returns a new {@link OVRLayerEyeFov} instance allocated on the thread-local {@link MemoryStack}. */
	public static OVRLayerEyeFov mallocStack() {
		return mallocStack(stackGet());
	}

	/** Returns a new {@link OVRLayerEyeFov} instance allocated on the thread-local {@link MemoryStack} and initializes all its bits to zero. */
	public static OVRLayerEyeFov callocStack() {
		return callocStack(stackGet());
	}

	/**
	 * Returns a new {@link OVRLayerEyeFov} instance allocated on the specified {@link MemoryStack}.
	 *
	 * @param stack the stack from which to allocate
	 */
	public static OVRLayerEyeFov mallocStack(MemoryStack stack) {
		return create(stack.nmalloc(ALIGNOF, SIZEOF));
	}

	/**
	 * Returns a new {@link OVRLayerEyeFov} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
	 *
	 * @param stack the stack from which to allocate
	 */
	public static OVRLayerEyeFov callocStack(MemoryStack stack) {
		return create(stack.ncalloc(ALIGNOF, 1, SIZEOF));
	}

	/**
	 * Returns a new {@link OVRLayerEyeFov.Buffer} instance allocated on the thread-local {@link MemoryStack}.
	 *
	 * @param capacity the buffer capacity
	 */
	public static Buffer mallocStack(int capacity) {
		return mallocStack(capacity, stackGet());
	}

	/**
	 * Returns a new {@link OVRLayerEyeFov.Buffer} instance allocated on the thread-local {@link MemoryStack} and initializes all its bits to zero.
	 *
	 * @param capacity the buffer capacity
	 */
	public static Buffer callocStack(int capacity) {
		return callocStack(capacity, stackGet());
	}

	/**
	 * Returns a new {@link OVRLayerEyeFov.Buffer} instance allocated on the specified {@link MemoryStack}.
	 *
	 * @param stack the stack from which to allocate
	 * @param capacity the buffer capacity
	 */
	public static Buffer mallocStack(int capacity, MemoryStack stack) {
		return create(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity);
	}

	/**
	 * Returns a new {@link OVRLayerEyeFov.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
	 *
	 * @param stack the stack from which to allocate
	 * @param capacity the buffer capacity
	 */
	public static Buffer callocStack(int capacity, MemoryStack stack) {
		return create(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity);
	}

	// -----------------------------------

	/** Unsafe version of {@link #Header}. */
	public static OVRLayerHeader nHeader(long struct) { return OVRLayerHeader.create(struct + OVRLayerEyeFov.HEADER); }
	/** Unsafe version of {@link #ColorTexture}. */
	public static PointerBuffer nColorTexture(long struct) {
		return memPointerBuffer(struct + OVRLayerEyeFov.COLORTEXTURE, ovrEye_Count);
	}
	/** Unsafe version of {@link #ColorTexture(int) ColorTexture}. */
	public static long nColorTexture(long struct, int index) { return memGetAddress(struct + OVRLayerEyeFov.COLORTEXTURE + index * 2147483647); }
	/** Unsafe version of {@link #Viewport}. */
	public static OVRRecti.Buffer nViewport(long struct) {
		return OVRRecti.create(struct + OVRLayerEyeFov.VIEWPORT, ovrEye_Count);
	}
	/** Unsafe version of {@link #Viewport(int) Viewport}. */
	public static OVRRecti nViewport(long struct, int index) {
		return OVRRecti.create(struct + OVRLayerEyeFov.VIEWPORT + index * OVRRecti.SIZEOF);
	}
	/** Unsafe version of {@link #Fov}. */
	public static OVRFovPort.Buffer nFov(long struct) {
		return OVRFovPort.create(struct + OVRLayerEyeFov.FOV, ovrEye_Count);
	}
	/** Unsafe version of {@link #Fov(int) Fov}. */
	public static OVRFovPort nFov(long struct, int index) {
		return OVRFovPort.create(struct + OVRLayerEyeFov.FOV + index * OVRFovPort.SIZEOF);
	}
	/** Unsafe version of {@link #RenderPose}. */
	public static OVRPosef.Buffer nRenderPose(long struct) {
		return OVRPosef.create(struct + OVRLayerEyeFov.RENDERPOSE, ovrEye_Count);
	}
	/** Unsafe version of {@link #RenderPose(int) RenderPose}. */
	public static OVRPosef nRenderPose(long struct, int index) {
		return OVRPosef.create(struct + OVRLayerEyeFov.RENDERPOSE + index * OVRPosef.SIZEOF);
	}
	/** Unsafe version of {@link #SensorSampleTime}. */
	public static double nSensorSampleTime(long struct) { return memGetDouble(struct + OVRLayerEyeFov.SENSORSAMPLETIME); }

	/** Unsafe version of {@link #Header(OVRLayerHeader) Header}. */
	public static void nHeader(long struct, OVRLayerHeader value) { memCopy(value.address(), struct + OVRLayerEyeFov.HEADER, OVRLayerHeader.SIZEOF); }
	/** Unsafe version of {@link #ColorTexture(PointerBuffer) ColorTexture}. */
	public static void nColorTexture(long struct, PointerBuffer value) {
		if ( CHECKS ) checkBufferGT(value, ovrEye_Count);
		memCopy(memAddress(value), struct + OVRLayerEyeFov.COLORTEXTURE, value.remaining() * POINTER_SIZE);
	}
	/** Unsafe version of {@link #ColorTexture(int, long) ColorTexture}. */
	public static void nColorTexture(long struct, int index, long value) { memPutAddress(struct + OVRLayerEyeFov.COLORTEXTURE + index * POINTER_SIZE, value); }
	/** Unsafe version of {@link #Viewport(OVRRecti.Buffer) Viewport}. */
	public static void nViewport(long struct, OVRRecti.Buffer value) {
		if ( CHECKS ) checkBufferGT(value, ovrEye_Count);
		memCopy(value.address(), struct + OVRLayerEyeFov.VIEWPORT, value.remaining() * OVRRecti.SIZEOF);
	}
	/** Unsafe version of {@link #Viewport(int, OVRRecti) Viewport}. */
	public static void nViewport(long struct, int index, OVRRecti value) { memCopy(value.address(), struct + OVRLayerEyeFov.VIEWPORT + index * OVRRecti.SIZEOF, OVRRecti.SIZEOF); }
	/** Unsafe version of {@link #Fov(OVRFovPort.Buffer) Fov}. */
	public static void nFov(long struct, OVRFovPort.Buffer value) {
		if ( CHECKS ) checkBufferGT(value, ovrEye_Count);
		memCopy(value.address(), struct + OVRLayerEyeFov.FOV, value.remaining() * OVRFovPort.SIZEOF);
	}
	/** Unsafe version of {@link #Fov(int, OVRFovPort) Fov}. */
	public static void nFov(long struct, int index, OVRFovPort value) { memCopy(value.address(), struct + OVRLayerEyeFov.FOV + index * OVRFovPort.SIZEOF, OVRFovPort.SIZEOF); }
	/** Unsafe version of {@link #RenderPose(OVRPosef.Buffer) RenderPose}. */
	public static void nRenderPose(long struct, OVRPosef.Buffer value) {
		if ( CHECKS ) checkBufferGT(value, ovrEye_Count);
		memCopy(value.address(), struct + OVRLayerEyeFov.RENDERPOSE, value.remaining() * OVRPosef.SIZEOF);
	}
	/** Unsafe version of {@link #RenderPose(int, OVRPosef) RenderPose}. */
	public static void nRenderPose(long struct, int index, OVRPosef value) { memCopy(value.address(), struct + OVRLayerEyeFov.RENDERPOSE + index * OVRPosef.SIZEOF, OVRPosef.SIZEOF); }
	/** Unsafe version of {@link #SensorSampleTime(double) SensorSampleTime}. */
	public static void nSensorSampleTime(long struct, double value) { memPutDouble(struct + OVRLayerEyeFov.SENSORSAMPLETIME, value); }

	/**
	 * Validates pointer members that should not be {@code NULL}.
	 *
	 * @param struct the struct to validate
	 */
	public static void validate(long struct) {
		checkPointer(memGetAddress(struct + OVRLayerEyeFov.COLORTEXTURE));
	}

	/**
	 * Calls {@link #validate(long)} for each struct contained in the specified struct array.
	 *
	 * @param array the struct array to validate
	 * @param count the number of structs in {@code array}
	 */
	public static void validate(long array, int count) {
		for ( int i = 0; i < count; i++ )
			validate(array + i * SIZEOF);
	}

	// -----------------------------------

	/** An array of {@link OVRLayerEyeFov} structs. */
	public static class Buffer extends StructBuffer<OVRLayerEyeFov, Buffer> implements NativeResource {

		/**
		 * Creates a new {@link OVRLayerEyeFov.Buffer} instance backed by the specified container.
		 *
		 * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
		 * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
		 * by {@link OVRLayerEyeFov#SIZEOF}, and its mark will be undefined.
		 *
		 *
The created buffer instance holds a strong reference to the container object.

		 */
		public Buffer(ByteBuffer container) {
			super(container, container.remaining() / SIZEOF);
		}

		Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) {
			super(address, container, mark, pos, lim, cap);
		}

		@Override
		protected Buffer self() {
			return this;
		}

		@Override
		protected Buffer newBufferInstance(long address, ByteBuffer container, int mark, int pos, int lim, int cap) {
			return new Buffer(address, container, mark, pos, lim, cap);
		}

		@Override
		protected OVRLayerEyeFov newInstance(long address) {
			return new OVRLayerEyeFov(address, container);
		}

		@Override
		protected int sizeof() {
			return SIZEOF;
		}

		/** Returns a {@link OVRLayerHeader} view of the {@code Header} field. */
		public OVRLayerHeader Header() { return OVRLayerEyeFov.nHeader(address()); }
		/** Returns a {@link PointerBuffer} view of the {@code ColorTexture} field. */
		public PointerBuffer ColorTexture() { return OVRLayerEyeFov.nColorTexture(address()); }
		/** Returns the value at the specified index of the {@code ColorTexture} field. */
		public long ColorTexture(int index) { return OVRLayerEyeFov.nColorTexture(address(), index); }
		/** Returns a {@link OVRRecti}.Buffer view of the {@code Viewport} field. */
		public OVRRecti.Buffer Viewport() { return OVRLayerEyeFov.nViewport(address()); }
		/** Returns a {@link OVRRecti} view of the struct at the specified index of the {@code Viewport} field. */
		public OVRRecti Viewport(int index) { return OVRLayerEyeFov.nViewport(address(), index); }
		/** Returns a {@link OVRFovPort}.Buffer view of the {@code Fov} field. */
		public OVRFovPort.Buffer Fov() { return OVRLayerEyeFov.nFov(address()); }
		/** Returns a {@link OVRFovPort} view of the struct at the specified index of the {@code Fov} field. */
		public OVRFovPort Fov(int index) { return OVRLayerEyeFov.nFov(address(), index); }
		/** Returns a {@link OVRPosef}.Buffer view of the {@code RenderPose} field. */
		public OVRPosef.Buffer RenderPose() { return OVRLayerEyeFov.nRenderPose(address()); }
		/** Returns a {@link OVRPosef} view of the struct at the specified index of the {@code RenderPose} field. */
		public OVRPosef RenderPose(int index) { return OVRLayerEyeFov.nRenderPose(address(), index); }
		/** Returns the value of the {@code SensorSampleTime} field. */
		public double SensorSampleTime() { return OVRLayerEyeFov.nSensorSampleTime(address()); }

		/** Copies the specified {@link OVRLayerHeader} to the {@code Header} field. */
		public OVRLayerEyeFov.Buffer Header(OVRLayerHeader value) { OVRLayerEyeFov.nHeader(address(), value); return this; }
		/** Copies the specified {@link PointerBuffer} to the {@code ColorTexture} field. */
		public OVRLayerEyeFov.Buffer ColorTexture(PointerBuffer value) { OVRLayerEyeFov.nColorTexture(address(), value); return this; }
		/** Sets the specified value at the specified index of the {@code ColorTexture} field. */
		public OVRLayerEyeFov.Buffer ColorTexture(int index, long value) { OVRLayerEyeFov.nColorTexture(address(), index, value); return this; }
		/** Copies the specified {@link OVRRecti.Buffer} to the {@code Viewport} field. */
		public OVRLayerEyeFov.Buffer Viewport(OVRRecti.Buffer value) { OVRLayerEyeFov.nViewport(address(), value); return this; }
		/** Copies the specified {@link OVRRecti} at the specified index of the {@code Viewport} field. */
		public OVRLayerEyeFov.Buffer Viewport(int index, OVRRecti value) { OVRLayerEyeFov.nViewport(address(), index, value); return this; }
		/** Copies the specified {@link OVRFovPort.Buffer} to the {@code Fov} field. */
		public OVRLayerEyeFov.Buffer Fov(OVRFovPort.Buffer value) { OVRLayerEyeFov.nFov(address(), value); return this; }
		/** Copies the specified {@link OVRFovPort} at the specified index of the {@code Fov} field. */
		public OVRLayerEyeFov.Buffer Fov(int index, OVRFovPort value) { OVRLayerEyeFov.nFov(address(), index, value); return this; }
		/** Copies the specified {@link OVRPosef.Buffer} to the {@code RenderPose} field. */
		public OVRLayerEyeFov.Buffer RenderPose(OVRPosef.Buffer value) { OVRLayerEyeFov.nRenderPose(address(), value); return this; }
		/** Copies the specified {@link OVRPosef} at the specified index of the {@code RenderPose} field. */
		public OVRLayerEyeFov.Buffer RenderPose(int index, OVRPosef value) { OVRLayerEyeFov.nRenderPose(address(), index, value); return this; }
		/** Sets the specified value to the {@code SensorSampleTime} field. */
		public OVRLayerEyeFov.Buffer SensorSampleTime(double value) { OVRLayerEyeFov.nSensorSampleTime(address(), value); return this; }

	}

}

redpajama_set_name: RedPajamaGithub


text:
package io.indy.beepboard.gfx;

import io.indy.beepboard.logic.Grid;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;
import java.nio.FloatBuffer;

import javax.microedition.khronos.opengles.GL10;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.opengl.GLUtils;

import android.util.Log;

public class GLGrid
{
    private static final String TAG = "GLGrid";

    private GLRenderer glRenderer;
    private Grid logicalGrid;

    private FloatBuffer vertexBufferOff;
    private FloatBuffer vertexBufferOn;
    private FloatBuffer vertexBufferActivated;

    public GLGrid(GLRenderer r)
    {
        glRenderer = r;
    }

    public void setLogicalGrid(Grid g)
    {
        logicalGrid = g;
    }

    public void setup(GL10 gl, float width, float height, float fov)
    {
        logicalGrid.dimensionChanged(width, height);

        vertexBufferOff = asVertexBuffer(verticesForOffState());
        vertexBufferOn = asVertexBuffer(verticesForOnState());
        vertexBufferActivated = asVertexBuffer(verticesForActivatedState());
    }

    public void draw(GL10 gl)
    {

        int i;
        int numTiles = logicalGrid.getNumTiles();
        int[] tileState = logicalGrid.getTileState();
        int activeColumn = logicalGrid.getActiveColumn();
        int gridHeight = logicalGrid.getGridHeight();
        int gridWidth = logicalGrid.getGridWidth();

        // tiles that are off
        gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBufferOff);
        gl.glColor4f(0f, 0f, 1f, 0.2f);

        for(i=0;i<numTiles;i++) {
            if(tileState[i] == 0) {
                gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, i * 4, 4);
            }
        }

        // tiles that are on
        gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBufferOn);
        gl.glColor4f(0.3f, 0.3f, 1f, 0.5f);

        for(i=0;i<numTiles;i++) {
            if(tileState[i] == 1 && i%gridWidth != activeColumn) {
                gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, i * 4, 4);
            }
        }

        // tiles that are active (on and are in the active column)
        gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBufferActivated);
        gl.glColor4f(1f, 0.3f, 1f, 1f);

        for(i=0;i<gridHeight;i++) {
            int tileIndex = (i*gridWidth)+activeColumn;
            if(tileState[tileIndex] == 1) {
                gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, tileIndex * 4, 4);
            }
        }
    }

    private float[] verticesForOffState()
    {
        return generateGridVertices(5f);
    }

    private float[] verticesForOnState()
    {
        return generateGridVertices(5f);
    }

    private float[] verticesForActivatedState()
    {
        return generateGridVertices(6f);
    }

    private float[] generateGridVertices(float halfSpaceDenominator)
    {
        float planeMaxSize = glRenderer.getPlaneMaxSize();
        float planeDistance = glRenderer.getPlaneDistance();

        int gridWidth = logicalGrid.getGridWidth();
        int gridHeight = logicalGrid.getGridHeight();
        int numTiles = logicalGrid.getNumTiles();

        float maxGridSize = planeMaxSize;

        // draw a grid of numTiles elements covering a space maxGridSize^2
        float tileMaxDim = maxGridSize / gridWidth;
        float tileHalfSpace = tileMaxDim / halfSpaceDenominator;

        float xOffset = -(planeMaxSize / 2f);
        float yOffset = -(planeMaxSize / 2f);;

        float xOrigin, yOrigin, zOrigin;
        int i, j, tBase;

        int tileNumCorners = 4;
        int tileDimensions = 3;
        float[] vertices;
        vertices = new float[numTiles * tileNumCorners * tileDimensions];

        for(j=0;j<gridHeight;j++) {
            for(i=0;i<gridWidth;i++) {
                xOrigin = xOffset + (i * tileMaxDim);
                yOrigin = yOffset + (j * tileMaxDim);
                zOrigin = -planeDistance;
                tBase = ((gridWidth * j) + i) * 12;

                vertices[tBase +  0] = xOrigin + tileHalfSpace;
                vertices[tBase +  1] = yOrigin + tileHalfSpace;
                vertices[tBase +  2] = zOrigin;

                vertices[tBase +  3] = xOrigin + tileMaxDim - tileHalfSpace;
                vertices[tBase +  4] = yOrigin + tileHalfSpace;
                vertices[tBase +  5] = zOrigin;

                vertices[tBase +  6] = xOrigin + tileHalfSpace;
                vertices[tBase +  7] = yOrigin + tileMaxDim - tileHalfSpace;
                vertices[tBase +  8] = zOrigin;

                vertices[tBase +  9] = xOrigin + tileMaxDim - tileHalfSpace;
                vertices[tBase + 10] = yOrigin + tileMaxDim - tileHalfSpace;
                vertices[tBase + 11] = zOrigin;
            }
        }
        return vertices;
    }

    private FloatBuffer asVertexBuffer(float[] vertices)
    {
        FloatBuffer vb;
        ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);
        vbb.order(ByteOrder.nativeOrder());
        vb = vbb.asFloatBuffer();
        vb.put(vertices);
        vb.position(0);
        return vb;
    }

}


text:
package com.sequenceiq.datalake.service.sdx;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.SSOType;
import com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.StackV4Request;
import com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.GatewayV4Request;
import com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.topology.GatewayTopologyV4Request;

@Service
public class GatewayManifester {

    private static final Logger LOGGER = LoggerFactory.getLogger(GatewayManifester.class);

    @Value("${sdx.gateway.ssotype}")
    private SSOType defaultSsoType;

    @Value("${sdx.gateway.topology.name}")
    private String topologyName;

    public StackV4Request configureGatewayForSdxCluster(StackV4Request stackV4Request) {
        if (stackV4Request.getCluster().getGateway() == null) {
            GatewayV4Request gatewayV4Request = new GatewayV4Request();
            gatewayV4Request.setTopologies(List.of(getGatewayTopologyV4Request()));
            gatewayV4Request.setSsoType(defaultSsoType);
            stackV4Request.getCluster().setGateway(gatewayV4Request);
            LOGGER.info("Configured gateway for SDX {}", stackV4Request.getName());
        }
        return stackV4Request;
    }

    private GatewayTopologyV4Request getGatewayTopologyV4Request() {
        GatewayTopologyV4Request gatewayTopologyV4Request = new GatewayTopologyV4Request();
        gatewayTopologyV4Request.setTopologyName(topologyName);
        gatewayTopologyV4Request.setExposedServices(List.of("ALL"));
        return gatewayTopologyV4Request;
    }

}


text:
package com.datagre.apps.omicron.common.controller;

import com.google.common.collect.Lists;
import com.google.gson.GsonBuilder;

import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.ByteArrayHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.GsonHttpMessageConverter;
import org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter;

import java.util.List;

/**
 * Created by Jason on 5/11/16.
 */
@Configuration
public class HttpMessageConverterConfiguration {
  @Bean
  public HttpMessageConverters messageConverters() {
    GsonHttpMessageConverter gsonHttpMessageConverter = new GsonHttpMessageConverter();
    gsonHttpMessageConverter.setGson(
            new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").create());
    final List<HttpMessageConverter<?>> converters = Lists.newArrayList(
            new ByteArrayHttpMessageConverter(), new StringHttpMessageConverter(),
            new AllEncompassingFormHttpMessageConverter(), gsonHttpMessageConverter);
    return new HttpMessageConverters() {
      @Override
      public List<HttpMessageConverter<?>> getConverters() {
        return converters;
      }
    };
  }
}


text:
<title>Scheduler Preferences</title>
<link rel="stylesheet" type="text/css" href="Resources.pak#dialog_prefs.css">
<link rel="stylesheet" type="text/css" href="SyHybrid.scx#hybrid\prefs_scheduler\prefs.css">

Scan

Schedule

Report

Notifications

Advanced

Name: <input type="text" cid="scheduledscan.name">

<button type="checkbox" cid="scheduledscan.enabled">Enable Scheduled Scan</button>
<fieldset><legend>Target</legend>

Type:

<select #targettype class="tag-list" type="select" cid="scheduledscan.target.type">
<option #targettypeurl value="url" selected>URL (Dynamic)</option>
<option #targettypegit value="urlgit">Project URL (Code)</option>
<option #targettypedir value="dir">Local Directory (Code)</option>
</select>

Source Directory:

<input #targetdir type="folder-path" novalue="Select Folder..." cid="scheduledscan.target.dir">

Start URL:

<input #targeturl type="text" style="width:350px;" cid="scheduledscan.target.url"> <button #btntargetlist type="selector" menu="#targetlist-items">..</button>
    <menu id="targetlist-items" style="display:none;">

Edit target list...

      %dynamic_targets%

    </menu>

Project URL (Azure DevOps / GIT / TFS):

<input #targeturlgit type="text" style="width:350px;" cid="scheduledscan.target.urlgit"> <button #btncodetargetlist type="selector" menu="#codetargetlist-items">..</button>
    <menu id="codetargetlist-items" style="display:none;">

Edit target list...

      %code_targets%

Vulnerable Repositories (Demo)
       <menu>

PHP

Java

Lua

       </menu>

    </menu>

GIT Branch:

<input #targetbranch type="text" style="width:50px;" cid="scheduledscan.target.branch">

</fieldset>
<fieldset><legend>Hunt Method</legend>

<select xtype="select" xsize=4 style="width:300px;" cid="scheduledscan.options.huntmethod">
<option value="appscan" selected>Application Scan (Default)</option>
<option value="appscanss">Application Scan (Server-Side Focused)</option>
<option value="faultinj">Fault Injection</option>
<option value="top25cwe">Top 25 (CWE Top 25)</option>
<option value="top10">Top 10 (OWASP Top 10)</option>
<option value="top5php">Top 5 (OWASP PHP Top 5)</option>
<option value="sqlinj">SQL Injection</option>
<option value="xss">Cross-Site Scripting (XSS)</option>
<option value="fileinc">File Inclusion</option>
<option value="spring4shell">Spring4Shell Scan</option>
<option value="log4shell">Log4Shell Scan</option>
<option value="malscan">Malware Content</option>
<option value="unvredir">Unvalited Redirects</option>
<option value="passive">Passive Scan (No Attacks)</option>
<option value="complete">Complete Pen-Test/Review (Time-Consuming)</option>
</select>

<button type="checkbox" cid="scheduledscan.dynamic.checks.dos">Perform DoS tests</button>

</fieldset>

<fieldset><legend>Report Generation</legend>

Report Template:

<select class="tag-list" type="select" cid="scheduledscan.report.template">
<option value="Standard" selected>Standard</option>
<option value="Comparison">Comparison</option>
<option value="Compliance">Compliance</option>
<option value="Complete">Complete</option>
</select>

<button type="checkbox" cid="scheduledscan.report.autogen">Automatically generate report after scanning</button>

Report Filename (Optional, eg: C:\Reports\Report_{$SN}.pdf):

<input type="text" style="width:350px;" cid="scheduledscan.report.outfilename">

<button type="checkbox" cid="scheduledscan.export.autogen">Automatically generate exports after scanning</button>

Export Filename 1 (Optional, eg: C:\Reports\Export_{$SN}.xml):

<input type="text" style="width:350px;" cid="scheduledscan.export.outfilename">

Export Filename 2 (Optional, eg: C:\Reports\Export_{$SN}.json):

<input type="text" style="width:350px;" cid="scheduledscan.export.outfilename2">

Available variables:

{$SN} - Unique scan session name

{$DT} - Current date and time (ex: 2022-12-01_19-10-30)

{$DD} - Current date (ex: 2022-12-01)

{$TM} - Current time (ex: 19-10-30)

</fieldset>

<fieldset><legend>Email Notification</legend>

<button type="checkbox" cid="scheduledscan.report.email.autoemail">Automatically email report after generation</button>

Account Preferences:

<select cid="scheduledscan.report.email.tracker">
<option value="" selected>Select Account Preferences</option>
%email_trackers%
</select>

Email account preferences can be added using the Issue Trackers screen.

Subject:

<input type="text" style="width:350px;" cid="scheduledscan.report.email.subject">

</fieldset>
<fieldset><legend>Tracker Notification</legend>

<select cid="scheduledscan.report.tracker.first">
<option value="" selected>Select Tracker</option>
%all_trackers%
</select>

<select cid="scheduledscan.report.tracker.second">
<option value="" selected>Select Tracker</option>
%all_trackers%
</select>

Note: if you select the same tracker of type email in email notification and here, two emails will be sent.

</fieldset>

<fieldset>

<button type="checkbox" cid="scheduledscan.chron.runonce">Run once</button>

<button type="checkbox" cid="scheduledscan.dynamic.emulator.js">Enable JavaScript emulation</button>

</fieldset>
<fieldset><legend>Incremental Scan</legend>

<select class="tag-list" type="select" cid="scheduledscan.options.incrementalscan">
<option value="auto" selected>Auto (Recommended)</option>
<option value="disabled">Disabled</option>
</select>

</fieldset>
<fieldset><legend>Fail Condition (Optional)</legend>

Minimum Severity:

<select class="tag-list" type="select" cid="scheduledscan.options.pfminseverity">
<option value="none" selected>None</option>
<option value="low">Low</option>
<option value="medium">Medium</option>
<option value="high">High</option>

</select>

</fieldset>

<fieldset><legend>Schedule Preferences</legend>

Time (Hour/Minute/Second):

<input cid="scheduledscan.chron.hour" type="number" step=1 minvalue="0" maxvalue="23" value="0" size="5"> : <input cid="scheduledscan.chron.min" type="number" step=1 minvalue="0" maxvalue="59" value="0" size="5"> : <input cid="scheduledscan.chron.sec" type="number" step=1 minvalue="0" maxvalue="59" value="0" size="5">

Date:

<select cid="scheduledscan.chron.month">
<option value="*" selected>Any Month</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select> <select cid="scheduledscan.chron.day">
<option value="*" selected>Any Day</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select> ,
<select cid="scheduledscan.chron.year">
<option value="*" selected>Any Year</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
<option value="2022">2022</option>
<option value="2023">2023</option>
<option value="2024">2024</option>
<option value="2025">2025</option>
<option value="2026">2026</option>
<option value="2027">2027</option>
<option value="2028">2028</option>
<option value="2029">2029</option>
<option value="2030">2030</option>
<option value="2031">2031</option>
<option value="2032">2032</option>
<option value="2033">2033</option>
<option value="2034">2034</option>
<option value="2035">2035</option>
<option value="2036">2036</option>
<option value="2037">2037</option>
<option value="2038">2038</option>
<option value="2039">2039</option>
<option value="2040">2040</option>
<option value="2041">2041</option>
<option value="2042">2042</option>
<option value="2043">2043</option>
<option value="2044">2044</option>
<option value="2045">2045</option>
<option value="2046">2046</option>
<option value="2047">2047</option>
<option value="2048">2048</option>
<option value="2049">2049</option>
<option value="2050">2050</option>
</select>

Day in Week:

<select cid="scheduledscan.chron.dayweek.frequency">
<option value="*" selected>Any Day</option>
<option value="specific">Specific Days:</option>
</select>
<button type="checkbox" cid="scheduledscan.chron.dayweek.mon">Mon</button>
<button type="checkbox" cid="scheduledscan.chron.dayweek.tue">Tue</button>
<button type="checkbox" cid="scheduledscan.chron.dayweek.wed">Wed</button>
<button type="checkbox" cid="scheduledscan.chron.dayweek.thu">Thu</button>
<button type="checkbox" cid="scheduledscan.chron.dayweek.fri">Fri</button>
<button type="checkbox" cid="scheduledscan.chron.dayweek.sat">Sat</button>
<button type="checkbox" cid="scheduledscan.chron.dayweek.sun">Sun</button>

Scan time limit (Optional, examples: 1d, 3h, 2h30m, 50m):

<input type="text" style="width:350px;" cid="scheduledscan.options.timelimit.value">

</fieldset>

<button #ok role="default-button" style="width:50px;margin-right:5px;">OK</button>
<button #cancel style="width:50px;margin-right:10px;">Cancel</button>


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.operator.aggregation;

import com.facebook.presto.operator.aggregation.state.CentralMomentsState;
import com.facebook.presto.operator.aggregation.state.CorrelationState;
import com.facebook.presto.operator.aggregation.state.CovarianceState;
import com.facebook.presto.operator.aggregation.state.RegressionState;
import com.facebook.presto.operator.aggregation.state.VarianceState;
import com.facebook.presto.spi.Page;
import com.facebook.presto.spi.block.Block;
import com.facebook.presto.spi.type.TypeSignature;
import com.google.common.base.CaseFormat;

import java.util.List;
import java.util.function.Function;

import static com.google.common.base.Preconditions.checkArgument;
import static java.util.Locale.ENGLISH;

public final class AggregationUtils
{
    private AggregationUtils()
    {
    }

    public static void updateVarianceState(VarianceState state, double value)
    {
        state.setCount(state.getCount() + 1);
        double delta = value - state.getMean();
        state.setMean(state.getMean() + delta / state.getCount());
        state.setM2(state.getM2() + delta * (value - state.getMean()));
    }

    public static void updateCentralMomentsState(CentralMomentsState state, double value)
    {
        long n1 = state.getCount();
        long n = n1 + 1;
        double m1 = state.getM1();
        double m2 = state.getM2();
        double m3 = state.getM3();
        double delta = value - m1;
        double deltaN = delta / n;
        double deltaN2 = deltaN * deltaN;
        double dm2 = delta * deltaN * n1;
        state.setCount(n);
        state.setM1(m1 + deltaN);
        state.setM2(m2 + dm2);
        state.setM3(m3 + dm2 * deltaN * (n - 2) - 3 * deltaN * m2);
        state.setM4(state.getM4() + dm2 * deltaN2 * (n * (double) n - 3 * n + 3) + 6 * deltaN2 * m2 - 4 * deltaN * m3);
    }

    public static void updateCovarianceState(CovarianceState state, double x, double y)
    {
        state.setCount(state.getCount() + 1);
        state.setSumXY(state.getSumXY() + x * y);
        state.setSumX(state.getSumX() + x);
        state.setSumY(state.getSumY() + y);
    }

    public static double getCovarianceSample(CovarianceState state)
    {
        return (state.getSumXY() - state.getSumX() * state.getSumY() / state.getCount()) / (state.getCount() - 1);
    }

    public static double getCovariancePopulation(CovarianceState state)
    {
        return (state.getSumXY() - state.getSumX() * state.getSumY() / state.getCount()) / state.getCount();
    }

    public static void updateCorrelationState(CorrelationState state, double x, double y)
    {
        updateCovarianceState(state, x, y);
        state.setSumXSquare(state.getSumXSquare() + x * x);
        state.setSumYSquare(state.getSumYSquare() + y * y);
    }

    public static double getCorrelation(CorrelationState state)
    {
        // This is defined as covariance(x, y) / (stdev(x) * stdev(y))
        double covariance = state.getCount() * state.getSumXY() - state.getSumX() * state.getSumY();
        double stdevX = Math.sqrt(state.getCount() * state.getSumXSquare() - state.getSumX() * state.getSumX());
        double stdevY = Math.sqrt(state.getCount() * state.getSumYSquare() - state.getSumY() * state.getSumY());

        // stdevX and stdevY deliberately not checked for zero because the result can be Infinity or NaN even
        // if they are both not zero
        return covariance / stdevX / stdevY;
    }

    public static void updateRegressionState(RegressionState state, double x, double y)
    {
        updateCovarianceState(state, x, y);
        state.setSumXSquare(state.getSumXSquare() + x * x);
    }

    public static double getRegressionSlope(RegressionState state)
    {
        // Math comes from ISO9075-2:2011(E) 10.9 General Rules 7 c xii
        double dividend = state.getCount() * state.getSumXY() - state.getSumX() * state.getSumY();
        double divisor = state.getCount() * state.getSumXSquare() - state.getSumX() * state.getSumX();

        // divisor deliberately not checked for zero because the result can be Infty or NaN even if it is not zero
        return dividend / divisor;
    }

    public static double getRegressionIntercept(RegressionState state)
    {
        // Math comes from ISO9075-2:2011(E) 10.9 General Rules 7 c xiii
        double dividend = state.getSumY() * state.getSumXSquare() - state.getSumX() * state.getSumXY();
        double divisor = state.getCount() * state.getSumXSquare() - state.getSumX() * state.getSumX();

        // divisor deliberately not checked for zero because the result can be Infty or NaN even if it is not zero
        return dividend / divisor;
    }

    public static void mergeVarianceState(VarianceState state, VarianceState otherState)
    {
        long count = otherState.getCount();
        double mean = otherState.getMean();
        double m2 = otherState.getM2();

        checkArgument(count >= 0, "count is negative");
        if (count == 0) {
            return;
        }
        long newCount = count + state.getCount();
        double newMean = ((count * mean) + (state.getCount() * state.getMean())) / (double) newCount;
        double delta = mean - state.getMean();
        double m2Delta = m2 + delta * delta * count * state.getCount() / (double) newCount;
        state.setM2(state.getM2() + m2Delta);
        state.setCount(newCount);
        state.setMean(newMean);
    }

    public static void mergeCentralMomentsState(CentralMomentsState state, CentralMomentsState otherState)
    {
        long na = state.getCount();
        long nb = otherState.getCount();

        checkArgument(nb >= 0, "count is negative");
        if (nb == 0) {
            return;
        }

        double m1a = state.getM1();
        double m2a = state.getM2();
        double m3a = state.getM3();
        double m1b = otherState.getM1();
        double m2b = otherState.getM2();
        double m3b = otherState.getM3();
        double n = na + nb; // Use double as type of n to avoid integer overflow for n*n and n*n*n
        double delta = m1b - m1a;
        double delta2 = delta * delta;
        double delta3 = delta * delta2;
        double delta4 = delta2 * delta2;

        state.setCount((long) n);
        state.setM1((na * m1a + nb * m1b) / n);
        state.setM2(m2a + m2b + delta2 * na * nb / n);
        state.setM3(m3a + m3b
                + delta3 * na * nb * (na - nb) / (n * n)
                + 3 * delta * (na * m2b - nb * m2a) / n);
        state.setM4(state.getM4() + otherState.getM4()
                + delta4 * na * nb * (na * na - na * nb + nb * nb) / (n * n * n)
                + 6 * delta2 * (na * na * m2b + nb * nb * m2a) / (n * n)
                + 4 * delta * (na * m3b - nb * m3a) / n);
    }

    private static void updateCovarianceState(CovarianceState state, CovarianceState otherState)
    {
        state.setSumX(state.getSumX() + otherState.getSumX());
        state.setSumY(state.getSumY() + otherState.getSumY());
        state.setSumXY(state.getSumXY() + otherState.getSumXY());
        state.setCount(state.getCount() + otherState.getCount());
    }

    public static void mergeCovarianceState(CovarianceState state, CovarianceState otherState)
    {
        if (otherState.getCount() == 0) {
            return;
        }

        updateCovarianceState(state, otherState);
    }

    public static void mergeCorrelationState(CorrelationState state, CorrelationState otherState)
    {
        if (otherState.getCount() == 0) {
            return;
        }

        updateCovarianceState(state, otherState);
        state.setSumXSquare(state.getSumXSquare() + otherState.getSumXSquare());
        state.setSumYSquare(state.getSumYSquare() + otherState.getSumYSquare());
    }

    public static void mergeRegressionState(RegressionState state, RegressionState otherState)
    {
        if (otherState.getCount() == 0) {
            return;
        }

        updateCovarianceState(state, otherState);
        state.setSumXSquare(state.getSumXSquare() + otherState.getSumXSquare());
    }

    public static String generateAggregationName(String baseName, TypeSignature outputType, List<TypeSignature> inputTypes)
    {
        StringBuilder sb = new StringBuilder();
        sb.append(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, outputType.toString()));
        for (TypeSignature inputType : inputTypes) {
            sb.append(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, inputType.toString()));
        }
        sb.append(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, baseName.toLowerCase(ENGLISH)));

        return sb.toString();
    }

    // used by aggregation compiler
    @SuppressWarnings("UnusedDeclaration")
    public static Function<Integer, Block> pageBlockGetter(final Page page)
    {
        return page::getBlock;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- WeatherNow -->
    <dimen name="spacer_top_size">10dp</dimen>
    <dimen name="spacer_mid_size">10dp</dimen>
    <dimen name="label_location_size">30sp</dimen>
    <dimen name="label_updatetime_size">12sp</dimen>
    <dimen name="weather_icon_size">80sp</dimen>
    <dimen name="weather_condition_size">24sp</dimen>
    <!-- Forecast -->
    <dimen name="forecast_panel_width">130dp</dimen>
    <dimen name="forecast_panel_height">155dp</dimen>
    <dimen name="forecast_icon_size">36sp</dimen>
</resources>


text:
A GLMApproximateScrollbarBrick can be used only with GLMScrollListBrick or with other lists that uses adaptors.

Approximates the height of band depending on average height of all visible items.


text:
var assert = require('chai').assert,
    R = require('ramda');

var service = require('../../../routes/api/tasks/internal.js');

describe('API - Task Service', function () {

  beforeEach(function () {
    service._reset();
  });

  it('shall add an new task', function () {
    var t = createTask();

    t = service.add(t);

    assert.isDefined(t.id);

    var ts = service.all();
    assert.equal(ts.length, 1);

  });

  it('shall update an existing task', function () {
    var t1 = createTask(),
        t2;

    t1 = service.add(t1);
    t2 = R.merge(t1, {
      description: 'updateed desc 111',
      deadline: '09/10/2015'
    });

    service.update(t2);

    var ts = service.all();

    assert.equal(ts.length, 1);
    assert.deepEqual(t2, ts[0]);

  });

  it('shall add an new task', function () {
    var t = service.add(createTask());
    var t2 = service.get(t.id);

    assert.equal(t, t2);

  });

  it('shall get all existing tasks', function () {
    service.add(createTask());
    service.add(createTask('Task2'));
    service.add(createTask('Task3'));

    var ts = service.all();
    assert.equal(ts.length, 3);

  });

  it('shall delete an existing task', function () {
    var t1 = service.add(createTask());
    service.add(createTask('Task2'));

    var ts = service.all();
    assert.equal(ts.length, 2);

    service.del(t1.id);
    assert.equal(service.all().length, 1);

  });

  it('shall throw when delete none existing task', function () {
    assert['throw'](function () {
      service.del("none-exists-task-id");
    });

  });

  function createTask(name) {
    name = name || 'Task1';
    return {
      name: name,
      description: 'desc 111',
      priority: 2,
      deadline: '08/10/2015',
      textMessage: false,
      tag: [],
      storyPoint: 3
    };
  }

});


text:
package com.yanzhenjie.album.provider;

import android.content.Context;
import android.support.v4.content.FileProvider;

/**
 *
For external access to files.

 * Created by Yan Zhenjie on 2017/3/31.
 */
public class CameraFileProvider extends FileProvider {

    /**
     * Get the provider of the external file path.
     *
     * @param context context.
     * @return provider.
     */
    public static String getProviderName(Context context) {
        return context.getPackageName() + ".app.file.provider";
    }

}


text:
package org.apache.vxquery.runtime.functions.comparison.general;

import org.apache.vxquery.runtime.functions.comparison.AbstractValueComparisonOperation;
import org.apache.vxquery.runtime.functions.comparison.ValueLeComparisonOperation;

import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;

public class GeneralLeComparisonScalarEvaluatorFactory extends AbstractGeneralComparisonScalarEvaluatorFactory {
    private static final long serialVersionUID = 1L;

    public GeneralLeComparisonScalarEvaluatorFactory(IScalarEvaluatorFactory[] args) {
        super(args);
    }

    @Override
    protected AbstractValueComparisonOperation createValueComparisonOperation() {
        return new ValueLeComparisonOperation();
    }
}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.activiti.engine.test.mock (Flowable - Engine 5.23.0 API)</title>
<meta name="date" content="2017-03-27">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

org.activiti.engine.test.mock

Classes

ActivitiMockSupport

MockElResolver

MockExpressionManager

MockResolverFactory

Mocks

Annotation Types

MockServiceTask

MockServiceTasks

NoOpServiceTasks


text:
title: crossnote
description: crossroads lab.のblog
header:
  overlay_image: /assets/images/cover/default.png
permalink: /note_list/
layout: posts
author_profile: false
site_map: false
---


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>hum-test</artifactId>
        <groupId>com.humbinal.beancake</groupId>
        <version>1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>premiere</artifactId>
    <packaging>jar</packaging>

    <name>premiere</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <scala.version>2.11.11</scala.version>
        <scala.major.version>2.11</scala.major.version>
        <spark.version>2.1.1</spark.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_${scala.major.version}</artifactId>
            <version>${spark.version}</version>
            <!--<scope>provided</scope>-->
            <!--<exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
            </exclusions>-->
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-sql_2.11</artifactId>
            <version>${spark.version}</version>
            <!-- <scope>provided</scope>-->
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-streaming_2.11</artifactId>
            <version>${spark.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>3.2.2</version>
                <executions>
                    <execution>
                        <id>compile-scala</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile-scala</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <recompileMode>incremental</recompileMode>
                    <compileOrder>Mixed</compileOrder>
                    <scalaVersion>${scala.version}</scalaVersion>
                    <args>
                        <arg>-deprecation</arg>
                    </args>
                    <jvmArgs>
                        <jvmArg>-Xms64m</jvmArg>
                        <jvmArg>-Xmx1024m</jvmArg>
                    </jvmArgs>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>com.humbinal.premiere.Application</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
</project>


text:
package alluxio.master.journal.ufs;

import alluxio.master.Master;
import alluxio.master.journal.Journal;
import alluxio.master.journal.JournalInputStream;
import alluxio.master.journal.JournalReader;
import alluxio.master.journal.JournalTailer;
import alluxio.proto.journal.Journal.JournalEntry;

import com.google.common.base.Preconditions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

import javax.annotation.concurrent.NotThreadSafe;

/**
 * Implementation of {@link JournalTailer} based on UFS.
 */
@NotThreadSafe
public final class UfsJournalTailer implements JournalTailer {
  private static final Logger LOG = LoggerFactory.getLogger(UfsJournalTailer.class);

  /** The master to apply all the journal entries to. */
  private final Master mMaster;
  /** The journal reader to read journal entries. */
  private final JournalReader mReader;
  /** This keeps track of the latest sequence number seen in the journal entries. */
  private long mLatestSequenceNumber = 0;

  /**
   * Creates a new instance of {@link UfsJournalTailer}.
   *
   * @param master the master to apply the journal entries to
   * @param journal the journal to tail
   */
  public UfsJournalTailer(Master master, Journal journal) {
    mMaster = Preconditions.checkNotNull(master);
    mReader = journal.getReader();
  }

  @Override
  public boolean isValid() {
    return mReader.isValid();
  }

  @Override
  public boolean checkpointExists() {
    try {
      mReader.getCheckpointLastModifiedTimeMs();
      return true;
    } catch (IOException e) {
      LOG.warn("Failed to check if checkpoint exists: {}", e.getMessage());
      LOG.debug("Exception: ", e);
      return false;
    }
  }

  @Override
  public long getLatestSequenceNumber() {
    return mLatestSequenceNumber;
  }

  @Override
  public void processJournalCheckpoint(boolean applyToMaster) throws IOException {
    // Load the checkpoint.
    LOG.info("{}: Loading checkpoint.", mMaster.getName());
    // The checkpoint stream must be retrieved before retrieving any log streams, because the
    // journal reader verifies that the checkpoint was read before the log streams.
    try (JournalInputStream is = mReader.getCheckpointInputStream()) {
      if (applyToMaster) {
        // Only apply the checkpoint to the master, if specified.
        mMaster.processJournalCheckpoint(is);
      }
      // update the latest sequence number seen.
      mLatestSequenceNumber = is.getLatestSequenceNumber();
    }
  }

  @Override
  public int processNextJournalLogs() throws IOException {
    int numFilesProcessed = 0;
    while (mReader.isValid()) {
      // Process the new completed log, if it exists.
      JournalInputStream inputStream = mReader.getNextInputStream();
      if (inputStream != null) {
        LOG.info("{}: Processing a completed log.", mMaster.getName());
        JournalEntry entry;
        while ((entry = inputStream.read()) != null) {
          mMaster.processJournalEntry(entry);
          // update the latest sequence number seen.
          mLatestSequenceNumber = inputStream.getLatestSequenceNumber();
        }
        inputStream.close();
        numFilesProcessed++;
        LOG.info("{}: Finished processing the log.", mMaster.getName());
      } else {
        return numFilesProcessed;
      }
    }
    LOG.info("{}: The checkpoint is out of date and must be reloaded.", mMaster.getName());
    return numFilesProcessed;
  }
}


text:
TestGithub
==========

My first Github repository
This is just first edititng.


text:
import {Component} from '@angular/core';

@Component({
    selector:'my-app',
    templateUrl: './app/app.html'
})

export class AppComponent {
    title = 'Tour of Accounts';
}


text:
package org.apache.jmeter.functions;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;

import org.apache.jmeter.engine.util.CompoundVariable;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.samplers.Sampler;
import org.apache.jmeter.threads.JMeterVariables;
import org.apache.jmeter.util.JMeterUtils;

/**
 * Provides a Random function which returns a random long integer between a min
 * (first argument) and a max (second argument).
 * @since 1.9
 */
public class Random extends AbstractFunction {

    private static final List<String> desc = new LinkedList<>();
    private static final String KEY = "__Random"; //$NON-NLS-1$

    static {
        desc.add(JMeterUtils.getResString("minimum_param")); //$NON-NLS-1$
        desc.add(JMeterUtils.getResString("maximum_param")); //$NON-NLS-1$
        desc.add(JMeterUtils.getResString("function_name_paropt")); //$NON-NLS-1$
    }

    private CompoundVariable varName;
    private CompoundVariable minimum;
    private CompoundVariable maximum;

    /**
     * No-arg constructor.
     */
    public Random() {
    }

    /** {@inheritDoc} */
    @Override
    public String execute(SampleResult previousResult, Sampler currentSampler)
            throws InvalidVariableException {

        long min = Long.parseLong(minimum.execute().trim());
        long max = Long.parseLong(maximum.execute().trim());

        long rand = ThreadLocalRandom.current().nextLong(min, max+1);

        String randString = Long.toString(rand);

        if (varName != null) {
            JMeterVariables vars = getVariables();
            final String varTrim = varName.execute().trim();
            if (vars != null && varTrim.length() > 0){// vars will be null on TestPlan
                vars.put(varTrim, randString);
            }
        }

        return randString;

    }

    /** {@inheritDoc} */
    @Override
    public void setParameters(Collection<CompoundVariable> parameters) throws InvalidVariableException {
        checkParameterCount(parameters, 2, 3);
        Object[] values = parameters.toArray();

        minimum = (CompoundVariable) values[0];
        maximum = (CompoundVariable) values[1];
        if (values.length>2){
            varName = (CompoundVariable) values[2];
        } else {
            varName = null;
        }

    }

    /** {@inheritDoc} */
    @Override
    public String getReferenceKey() {
        return KEY;
    }

    /** {@inheritDoc} */
    @Override
    public List<String> getArgumentDesc() {
        return desc;
    }

}


text:
package org.wso2.carbon.identity.entitlement.internal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.identity.core.util.IdentityIOStreamUtils;
import org.wso2.carbon.identity.entitlement.PDPConstants;
import org.xml.sax.SAXException;

import javax.xml.XMLConstants;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import java.io.InputStream;

public class SchemaBuilder implements Runnable {

    private static Log log = LogFactory.getLog(SchemaBuilder.class);

    private EntitlementConfigHolder configHolder;

    public SchemaBuilder(EntitlementConfigHolder configHolder) {
        this.configHolder = configHolder;
    }

    @Override
    public void run() {
        try {
            buildPolicySchema();
            log.info("XACML policy schema loaded successfully.");
        } catch (Exception e) {
            configHolder.getEngineProperties().setProperty(EntitlementExtensionBuilder.PDP_SCHEMA_VALIDATION, "false");
            log.warn("Error while loading policy schema. Schema validation will be disabled.");
        }
    }

    /**
     * Builds the policy schema map. There are three schemas.
     *
     * @param configHolder holder EntitlementConfigHolder
     * @throws SAXException if fails
     */
    public void buildPolicySchema() throws SAXException {

        if (!"true".equalsIgnoreCase((String) configHolder.getEngineProperties().get(
                EntitlementExtensionBuilder.PDP_SCHEMA_VALIDATION))) {
            log.warn("PDP schema validation disabled.");
            return;
        }

        String[] schemaNSs = new String[]{PDPConstants.XACML_1_POLICY_XMLNS,
                PDPConstants.XACML_2_POLICY_XMLNS,
                PDPConstants.XACML_3_POLICY_XMLNS};

        for (String schemaNS : schemaNSs) {

            String schemaFile;

            if (PDPConstants.XACML_1_POLICY_XMLNS.equals(schemaNS)) {
                schemaFile = PDPConstants.XACML_1_POLICY_SCHEMA_FILE;
            } else if (PDPConstants.XACML_2_POLICY_XMLNS.equals(schemaNS)) {
                schemaFile = PDPConstants.XACML_2_POLICY_SCHEMA_FILE;
            } else {
                schemaFile = PDPConstants.XACML_3_POLICY_SCHEMA_FILE;
            }

            InputStream schemaFileStream = EntitlementExtensionBuilder.class.getResourceAsStream("/" + schemaFile);
            try{
                SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
                Schema schema = schemaFactory.newSchema(new StreamSource(schemaFileStream));
                configHolder.getPolicySchemaMap().put(schemaNS, schema);
            } finally {
                IdentityIOStreamUtils.closeInputStream(schemaFileStream);
            }
        }
    }

}


text:
package secure2

type algorithm struct {
	name string
}

var (
	TypeA = algorithm{name: "TypeA"}
	TypeB = algorithm{name: "TypeB"}
)

// Compute accepts one of possible Algorithm types and a value and returns a hash.
func Compute(a algorithm, v string) (hash string) {
	return v + "-" + string(a.name)
}


text:
class Zelle:

    def __init__(self, zelleLebt1=True):
        self.zelleLebt = zelleLebt1
        pass

    def ueberlebt_version1(self, anzahlNachbarn):
        hatUeberlebt = False
        return hatUeberlebt

    def ueberlebt_version2(self, anzahlNachbarn):
        hatUeberlebt = False
        if anzahlNachbarn < 2:
            hatUeberlebt = False
        else:
            if anzahlNachbarn > 3:
                hatUeberlebt = False
            else:
                hatUeberlebt = True
        return hatUeberlebt

    def ueberlebt(self, anzahlNachbarn):
        hatUeberlebt = False
        if anzahlNachbarn < 2:
            hatUeberlebt = False
        else:
            if anzahlNachbarn > 3:
                hatUeberlebt = False
            else:
                if anzahlNachbarn == 2:
                    if self.zelleLebt:
                        hatUeberlebt = True
                    else:
                        hatUeberlebt = False
                else:
                    hatUeberlebt = True
        return hatUeberlebt

    def main(self):
        return

if __name__ == '__main__':
   pass


text:
kohana-person
=============

Kohana person module - can be used with or without the user module


text:
// Type definitions for react-stripe-elements 1.1
// Project: https://github.com/stripe/react-stripe-elements#readme
// Definitions by: dan-j <https://github.com/dan-j>
//                 Santiago Doldan <https://github.com/santiagodoldan>
//                 sonnysangha <https://github.com/sonnysangha>
//                 Andrew Goh Yisheng <https://github.com/9y5>
//                 Thomas Chia <https://github.com/thchia>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6

/// <reference types="stripe-v3" />
import * as React from 'react';

export namespace ReactStripeElements {
	import ElementChangeResponse = stripe.elements.ElementChangeResponse;
	import ElementsOptions = stripe.elements.ElementsOptions;
	import TokenOptions = stripe.TokenOptions;
	import TokenResponse = stripe.TokenResponse;
	import SourceResponse = stripe.SourceResponse;
	import SourceOptions = stripe.SourceOptions;

	/**
	 * There's a bug in @types/stripe which defines the property as
	 * `declined_code` (with a 'd') but it's in fact `decline_code`
	 */
	type PatchedTokenResponse = TokenResponse & {
		error?: { decline_code?: string };
	};

	interface StripeProviderOptions {
		stripeAccount?: string;
	}
	type StripeProviderProps = { apiKey: string; stripe?: never; options?: StripeProviderOptions } | { apiKey?: never; stripe: StripeProps | null; options?: StripeProviderOptions; };

	interface StripeProps {
		createSource(sourceData?: SourceOptions): Promise<SourceResponse>;

		createToken(options?: TokenOptions): Promise<PatchedTokenResponse>;
	}

	interface InjectOptions {
		withRef?: boolean;
	}

	interface InjectedStripeProps {
		stripe?: StripeProps;
	}

	interface ElementProps extends ElementsOptions {
		id?: string;

		className?: string;

		elementRef?(ref: any): void;

		onChange?(event: ElementChangeResponse): void;

		onBlur?(event: ElementChangeResponse): void;

		onFocus?(event: ElementChangeResponse): void;

		onReady?(): void;
	}
}

export class StripeProvider extends React.Component<ReactStripeElements.StripeProviderProps> {
}

export class Elements extends React.Component<stripe.elements.ElementsCreateOptions> {
}

export function injectStripe<P extends object>(
    WrappedComponent: React.ComponentType<P & ReactStripeElements.InjectedStripeProps>,
    componentOptions?: ReactStripeElements.InjectOptions): React.ComponentType<P>;

export class CardElement extends React.Component<ReactStripeElements.ElementProps> {
}

export class CardNumberElement extends React.Component<ReactStripeElements.ElementProps> {
}

export class CardExpiryElement extends React.Component<ReactStripeElements.ElementProps> {
}

export class CardCVCElement extends React.Component<ReactStripeElements.ElementProps> {
}

export class PostalCodeElement extends React.Component<ReactStripeElements.ElementProps> {
}

export class PaymentRequestButtonElement extends React.Component<ReactStripeElements.ElementProps> {
}


text:
package org.zstack.header.message;

import org.zstack.header.tag.TagPatternType;
import org.zstack.header.tag.TagPatternVO;

import java.util.ArrayList;
import java.util.List;

public class APICreateMessage extends APIMessage {
    /**
     * @desc resource uuid which must be of version 4(random) with dash stripped. For example,
     * '5d94103e-1925-4d86-96c0-f05489c259ab' is stripped as '5d94103e19254d8696c0f05489c259ab'.
     * When the field is provided, it's used as uuid for resource to be created. An internal error
     * is raised if the uuid conflicted with any existing resource uuid
     */
    private String resourceUuid;

    @APIParam(required = false, checkAccount = true, resourceType = TagPatternVO.class)
    private List<String> tagUuids;

    public void addSystemTag(String tag) {
        if (systemTags == null) {
            systemTags = new ArrayList<String>();
        }
        systemTags.add(tag);
    }

    public String getResourceUuid() {
        return resourceUuid;
    }

    public void setResourceUuid(String resourceUuid) {
        this.resourceUuid = resourceUuid;
    }

    public List<String> getTagUuids() {
        return tagUuids;
    }

    public void setTagUuids(List<String> tagUuids) {
        this.tagUuids = tagUuids;
    }
}


text:
#include "game/GameLoader.hpp"
#include <stdlib.h>     /* srand, rand */
#include <time.h>       /* time */

gsl::owner<Game*> GameLoader::loadTxtBoard(const std::string& filename){

	std::ifstream infile(filename.c_str());

	std::string line;
	int nbLines=0, nbColumns=0;

	std::vector<TileInterface*> tabTile;
	BotManager* botM = new VectorBotManager();

	int nbTurn = 20; // Number of turn for the game

	/* initialize random seed: */
	srand(time(NULL));

	while (std::getline(infile, line)){

		nbColumns = 0;

		std::stringstream ss(line);
		std::string tileDesc;

		char delim = ';';

		while (std::getline(ss, tileDesc, delim)) {

			TileInterface* created = nullptr;

			if (tileDesc == "#") {
				created = new WallTile();
			}
			else if (tileDesc == "F") {
				created = new FactoryTile();
			}
			else if (tileDesc == ".") {
				created = new Tile();
			}
			else if (tileDesc == "B") {
				created = new Tile();
				Bot* bot = new StupidBot(nbColumns, nbLines);
				botM->addBot(bot);
			}
			else if (tileDesc == "AB") {
				created = new Tile();
				AutoBot* bot = new AutoBot(nbColumns, nbLines);
				bot->setInstructions("./data/instructions/instructions.txt");
				botM->addBot(bot);
			}
			else if (tileDesc == "RB") {
				created = new Tile();
				AutoBot* bot = new AutoBot(nbColumns, nbLines);
				bot->setInstructions(nbTurn);
				botM->addBot(bot);
			}
			else {
				created = new Tile();
			}

			created->setLocation(nbColumns, nbLines );
			tabTile.push_back(created);

			nbColumns++;
		}
		nbLines++;
	}

	infile.close();

	gsl::owner<Board*> fb= new FixedBoard(nbColumns, nbLines);
	for (TileInterface* tile : tabTile) {
		tile->setBoard(fb);
	}

	Game* sg = new SimpleGame(fb, botM);
	sg->setNbturn(nbTurn);

	return sg;
}


text:
define(["require", "exports"], function (require, exports) {
    var webGLContextMonitor = function (canvas, contextLoss, contextGain) {
        var webGLContextLost = function (event) {
            event.preventDefault();
            contextLoss();
        };
        var webGLContextRestored = function (event) {
            event.preventDefault();
            var gl = canvas.getContext('webgl');
            contextGain(gl);
        };
        var that = {
            start: function () {
                canvas.addEventListener('webglcontextlost', webGLContextLost, false);
                canvas.addEventListener('webglcontextrestored', webGLContextRestored, false);
            },
            stop: function () {
                canvas.removeEventListener('webglcontextrestored', webGLContextRestored, false);
                canvas.removeEventListener('webglcontextlost', webGLContextLost, false);
            }
        };
        return that;
    };
    return webGLContextMonitor;
});


text:
package org.keycloak.guides;

import freemarker.template.TemplateException;
import org.keycloak.guides.maven.GuideBuilder;

import java.io.File;
import java.io.IOException;

public class DocsBuildDebugUtil {

    public static void main(String[] args) throws IOException, TemplateException {
        String userDir = System.getProperty("user.dir");
        File usrDir = new File(System.getProperty("user.dir"));
        File srcDir = usrDir.toPath().resolve("docs/guides/src/main").toFile();
        File targetDir = usrDir.toPath().resolve("target/generated-guides-tests").toFile();
        targetDir.mkdirs();
        GuideBuilder builder = new GuideBuilder(srcDir, targetDir, null);
        builder.server();
        System.out.println("Guides generated to: " + targetDir.getAbsolutePath().toString());
    }

}


text:
({
    init: function() {
        var event = $A.getEvt("dependencyTest:evtTarget");
        var status = event ? "SUCCESS" : "ERROR";
        $A.getEvt("markup://dependencyTest:notify").fire({status: status});
    }
})


text:
package uk.org.ulcompsoc.ld32.components.upgrades;

import uk.org.ulcompsoc.ld32.components.upgrades.Upgrade.UpgradeRoute;

public class Range_Increase_3 extends Upgrade {

	public Range_Increase_3() {
		this.costs = 0.9f;
		this.dmg = 1.1f;
		this.drops = 1f;
		this.simultanousFire = 0;
		this.stage = 3;
		this.range = 1.5f;
		this.type = UpgradeRoute.RED;
		name = "Range_Increase_3";
	}
}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.inceptus.subsystems;

/**
 *
 * @author inceptus
 */
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.camera.AxisCamera;
import edu.wpi.first.wpilibj.camera.AxisCamera.ExposureT;
import edu.wpi.first.wpilibj.camera.AxisCamera.WhiteBalanceT;
import edu.wpi.first.wpilibj.camera.AxisCameraException;
import edu.wpi.first.wpilibj.image.*;
import edu.wpi.first.wpilibj.image.Image;

/**
 * Identifies rectangular targets on back boards using Axis camera. Processing
 * images and getting target information are in separate methods to allow for
 * the processing to occur in its own thread if desired.
 *
*/
/*
 * Team 2264 10.22.64.11 Admin; root Team 2265 10.22.65.11 Admin; root
 */
public class TargetFinder {

    private final int redLow = 200;
    private final int redHigh = 256;
    private final int greenLow = 0;
    private final int greenHigh = 100;
    private final int blueLow = 0;
    private final int blueHigh = 100;
    private final int bboxWidthMin = 400;
    private final int bboxHeightMin = 400;
    private final float inertiaXMin = .5f;//originally .32f
    private final float inertiaYMin = .25f;//originally .18f
    private final double ratioMin = 1;
    private final double ratioMax = 2;
    private final int camBrightness = 0;
    private final int camColor = 100;
    private final WhiteBalanceT camWhiteBalance = WhiteBalanceT.automatic;
    private final ExposureT camExposure = ExposureT.hold;
    public static final int IMAGE_WIDTH = 320;
    public static final int IMAGE_HEIGHT = 240;
    AxisCamera cam;
    private Target highTarget = Target.NullTarget;
    private Target target1 = Target.NullTarget;
    private Target target2 = Target.NullTarget;
    private Target target3 = Target.NullTarget;
    private Target target4 = Target.NullTarget;
    private CriteriaCollection boxCriteria;
    private CriteriaCollection inertiaCriteria;

    public TargetFinder() {
        System.out.println("TargetFinder() begin " + Timer.getFPGATimestamp());

        cam = AxisCamera.getInstance();
        cam.writeResolution(AxisCamera.ResolutionT.k320x240);
        cam.writeBrightness(camBrightness);
        cam.writeColorLevel(camColor);
        cam.writeWhiteBalance(camWhiteBalance);
        cam.writeExposureControl(camExposure);
        cam.writeMaxFPS(15);
        cam.writeExposurePriority(AxisCamera.ExposurePriorityT.none);
        cam.writeCompression(50);
        //System.out.println("TargetFinder() * " + cam.toString() + "[" + Timer.getFPGATimestamp());
        boxCriteria = new CriteriaCollection();
        inertiaCriteria = new CriteriaCollection();
        boxCriteria.addCriteria(NIVision.MeasurementType.IMAQ_MT_BOUNDING_RECT_WIDTH,
                30, bboxWidthMin, false);
        boxCriteria.addCriteria(NIVision.MeasurementType.IMAQ_MT_BOUNDING_RECT_HEIGHT,
                40, bboxHeightMin, false);
        inertiaCriteria.addCriteria(NIVision.MeasurementType.IMAQ_MT_NORM_MOMENT_OF_INERTIA_XX,
                0, inertiaXMin, true);
        inertiaCriteria.addCriteria(NIVision.MeasurementType.IMAQ_MT_NORM_MOMENT_OF_INERTIA_YY,
                0, inertiaYMin, true);
        Timer.delay(7);
    }

    private void addTarget(Target t) {
        // Fill the first empty target slot.
        if (target1.isNull()) {
            target1 = t;
        } else if (target2.isNull()) {
            target2 = t;
        } else if (target3.isNull()) {
            target3 = t;
        } else if (target4.isNull()) {
            target4 = t;
        }
    }

    public boolean processImage() {
        boolean debugWriteImages = true;
        boolean success = cam.freshImage();
        if (success) {
            try {
                System.out.println("In Try loop");
                ColorImage im = cam.getImage();
                System.out.println("Got image");
                if (debugWriteImages) {
                    im.write("image1.jpg");
                    System.out.println("Wrote color image");
                }
                BinaryImage thresholdIm = im.thresholdRGB(redLow, redHigh,
                        greenLow, greenHigh,
                        blueLow, blueHigh);
                if (debugWriteImages) {
                    thresholdIm.write("image2.jpg");
                    System.err.println("Wrote Threshold Image");
                }
                BinaryImage filteredBoxIm = thresholdIm.particleFilter(boxCriteria);
                ParticleAnalysisReport[] xparticles = filteredBoxIm.getOrderedParticleAnalysisReports();
                System.out.println(xparticles.length + " particles at " + Timer.getFPGATimestamp());
                BinaryImage filteredInertiaIm = filteredBoxIm.particleFilter(inertiaCriteria);
                ParticleAnalysisReport[] particles = filteredInertiaIm.getOrderedParticleAnalysisReports();
                System.out.println(particles.length + " particles at " + Timer.getFPGATimestamp());
                // Loop through targets, find highest one.
                // Targets aren't found yet.
                highTarget = Target.NullTarget;
                target1 = Target.NullTarget;
                target2 = Target.NullTarget;
                target3 = Target.NullTarget;
                target4 = Target.NullTarget;
                System.out.println("Targets created");
                double minY = IMAGE_HEIGHT; // Minimum y <-> higher in image.
                for (int i = 0; i < particles.length; i++) {
                    Target t = new Target(i, particles[i]);
                    if (t.ratio > ratioMin && t.ratio < ratioMax) {
                        addTarget(t);
                        if (t.centerY <= minY) {
                            highTarget = t;
                        }
                    }
                    System.out.println("Target " + i + ": (" + t.centerX + "," + t.centerY + ") Distance: " + getDistance(t));
                }
                System.out.println("Best target: " + highTarget.index);
                System.out.println("Distance to the target: " + getDistance(highTarget));
                if (debugWriteImages) {
                    filteredBoxIm.write("image3.jpg");
                    filteredInertiaIm.write("image4.jpg");
                    System.out.println("Wrote Images");
                }
                // Free memory from images.
                im.free();
                thresholdIm.free();
                filteredBoxIm.free();
                filteredInertiaIm.free();
            } catch (AxisCameraException ex) {
                System.out.println("Axis Camera Exception Gotten" + ex.getMessage());
                ex.printStackTrace();
            } catch (NIVisionException ex) {
                System.out.println("NIVision Exception Gotten - " + ex.getMessage());
                ex.printStackTrace();
            }
        }
        return success;
    }
//Method assumes the camera is looking at the rectangle straight on: can be adjusted later

    public double getDistance(Target t) {
        boolean debugMyProc = true;
        double result;

        if (debugMyProc)
        {
            writeDebug("t.rawBboxHeight=" + t.rawBboxHeight);
            writeDebug("Center x, y (" + t.centerX + "," + t.centerY + ")");
            writeDebug("Cornerr x, y (" + t.rawBboxCornerX + "," + t.rawBboxCornerY + ")");
        }
        result = 3185.6 / (t.rawBboxHeight * Math.tan(0.4101));
        return (result * 1.0125);
    }

    public Target getHighestTarget() {
        return highTarget;
    }

    public Target getTarget1() {
        return target1;
    }

    public Target getTarget2() {
        return target2;
    }

    public Target getTarget3() {
        return target3;
    }

    public Target getTarget4() {
        return target4;
    }
    private void writeDebug(String pMsg)
    {
        System.out.println(pMsg);
    }
}


text:
from collections import defaultdict

class Solution(object):
    def isRectangleCover(self, rectangles):
        """
        :type rectangles: List[List[int]]
        :rtype: bool
        """
        left = min(rec[0] for rec in rectangles)
        bottom = min(rec[1] for rec in rectangles)
        right = max(rec[2] for rec in rectangles)
        top = max(rec[3] for rec in rectangles)

        points = defaultdict(int)
        for l, b, r, t in rectangles:
            for p, q in zip(((l, b), (r, b), (l, t), (r, t)), (1, 2, 4, 8)):
                if points[p] & q:
                    return False
                points[p] |= q

        for px, py in points:
            if left < px < right or bottom < py < top:
                if points[(px, py)] not in (3, 5, 10, 12, 15):
                    return False

        return True


text:
cask :v1 => 'orbit' do
  version :latest
  sha256 :no_check

  url 'http://orbitapp.net/updates/Orbit.zip'
  appcast 'http://orbitapp.net/updates/appcast.xml'
  homepage 'http://orbitapp.net'
  license :unknown    # todo: improve this machine-generated value

  app      'Orbit.app'
end


text:
package com.intellij.openapi.actionSystem;

import org.jetbrains.annotations.NotNull;

public class AnActionEventVisitor {
  public void visitEvent(@NotNull AnActionEvent e) {
  }

  public void visitGestureInitEvent(@NotNull AnActionEvent e) {
    visitEvent(e);
  }

  public void visitGesturePerformedEvent(@NotNull AnActionEvent e) {
    visitEvent(e);
  }

  public void visitGestureFinishEvent(@NotNull AnActionEvent e) {
    visitEvent(e);
  }

}