text:
package com.lifePreserverDiet.PFD.UserInterface.Pages;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Chronometer;

import com.lifePreserverDiet.PFD.R;

/**
 * An Activity that shows the Splash screen.
 * It uses a Chronometer tick that counts 2-3 seconds then ends the Activity.
 *
 * @author David Murray
 */
public class Splash extends Activity {
	/**
	 * How many seconds have gone by.
	 */
	int counter = 0;

	/**
	 * Called on create of the Activity. Sets up the activity
	 * with its layout. Also sets up and starts the chronometer to tick
	 * and check the time. If it's over 3 seconds it'll close.
	 */
	public void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		setContentView(R.layout.page_splash);
		this.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);

		Chronometer chrono = (Chronometer) findViewById(R.id.chronometer_splash_chrono);
		chrono.setOnChronometerTickListener(new Chronometer.OnChronometerTickListener() {

			public void onChronometerTick(Chronometer chronometer) {
				counter++;
				if(counter > 2) {
					Intent intent = new Intent(Splash.this, Main.class);
					Splash.this.startActivity(intent);
					Splash.this.finish();
				}
			}
		});
		chrono.start();
	}
}


text:
#include <SDL.h>
#include "gf2d_graphics.h"
#include "gf2d_sprite.h"
#include "simple_logger.h"
#include <stdio.h>

/*----------------------------------NODE------CLASS----------------------------------------------*/

//Basic Node structure with one link, an integer priority, and a void pointer to the data
typedef struct node{
	int prior;
	void *data;
	struct node *next;
} node;

/**
*@brief Method to create a node
*@param *data takes the pointer to the data
*@param prior looks for an integer arguement to describe a given nodes priority
*@return sends the pointer to the newly created node
*/
node *create_node(void *data, int prior)
{
	node *new_node;
	new_node = (node *)malloc(sizeof(node));
	new_node->data = data;
	new_node->prior = prior;
	new_node->next = NULL;
	return new_node;
}

/**
 *@param pointer to the node to be deleted
**/
void free_node(node *bye)
{
	free(bye);
}

/*-------------------Priority-------QUEUE---------CLASS-----------------------------------*/

//Basic PQ structure, holds the head, the length, and the size of a given element
typedef struct PriorityQueue{
	node *head;
	int len;
	size_t size;
} PriorityQueue;

/**
*@brief Printf the nodes | Used for debugging
*@param *pq takes a pointer to a PQ structure to print to STD OUT
**/
void print_status_of_pq(PriorityQueue *pq)
{
	node* cur = pq->head;
	while (cur != NULL)
	{
		printf("%i, ", cur->prior);
		cur = cur->next;
	}
	printf("\n");
}

/**
*@brief Function to take the linked list structure and return a sorted Array from the data || leaves data in container
*@param *pq takes a pointer to a PQ structure to parse into the Array
*@return the pointer to array containing the data
**/
void* pq_toArray(PriorityQueue *pq)
{
	void* ret = malloc((pq->len) * (pq->size));
	char* ptr = (char*)ret;
	for (node* cur = pq->head; cur != NULL; cur = cur->next)
	{
		memcpy(ptr, (cur->data), (pq->size));
		ptr += (pq->size);
	}
	return ret;
}

/**
 *@brief PQ contruction method
 *@param elementSize takes the size of the dereferenced data to MEM ALLOC
 *@return the pointer to a PQ with no elements in the container
**/
PriorityQueue *pq_new(size_t elementSize)
{
	PriorityQueue *new_p = (PriorityQueue *)malloc(sizeof(PriorityQueue));
	new_p->len = 0;
	new_p->size = elementSize;
	new_p->head = NULL;
}

/**
*@brief Method to add a node | calls create node | adds the node by priority
*@param *pq takes the pointer to the PQ structure
*@param *data takes a pointer to the data
*@param priority looks for an integer value as the nodes prioirty
**/
void pq_insert(PriorityQueue *pq, void *data, int priority)
{
	node *newN = create_node(data, priority);
	node* cur = pq->head;
	node* prev = NULL;
	if (!cur)							// Check refernce for Empty Set
	{
		pq->head = newN;
		pq->len++;
		return;
	}
	else if (priority < cur->prior)		// Check for Preappend case
	{
		newN->next = cur;
		pq->head = newN;
		pq->len++;
		return;
	}
	else                               // Find insertion point
	{
		while (cur->next && priority >= cur->next->prior)        //iterate through list || found middle point or hit the trailer
		{
			prev = cur;
			cur = cur->next;
		}
		if (cur->next == NULL)		//stopped because weve hit the trailer  || can go before or after
		{
			if (priority < cur->prior)			//  before current node
			{
				if (prev)
					prev->next = newN;
				pq->len++;
				return;
			}
			else										//  new trailer
			{
				cur->next = newN;
				pq->len++;
				return;
			}
		}
		else                    //stopped between two nodes     ||     triplicate ptr swap
		{

			newN->next = cur->next;
			cur->next = newN;
			pq->len++;
			return;
		}
	}
}

/**
 *@brief Method to remove min || Sorted already will just step the head over
 *@param *pq takes the pointer to the PQ structure
 *@return sends the pointer to the removed node for consumption on the user end
**/
void *pq_delete_min(PriorityQueue *pq)
{
	node *ret = pq->head;
	if (!pq->head)				//check refernence
	{
		return;
	}
	if (pq->head->next)			//multiple item list || decapitate NED S
	{
		pq->head = pq->head->next;
	}
	else						//one item list		||  empty the container
	{
		pq->head = NULL;
	}
	return ret;					//return item for consumption

}

/**
 *@brief Method to remove man || Sorted already will just cut the tail
 *@param *pq takes the pointer to the PQ structure
 *@return sends the pointer to the removed node for consumption on the user end
**/
void *pq_delete_max(PriorityQueue *pq)
{
	if (!pq->head)			//check refernce
	{
		return;
	}
	node* cur = pq->head;
	node* prev = pq->head;
	while (cur->next)		//iterate to last reference
	{
		if (cur != pq->head)
			prev = prev->next;
		cur = cur->next;
	}
	prev->next = NULL;		//cut the tail
	return cur;				//return former tail for consumption
}

/**
*@brief Method to empty the container || frees the node references data and the node
*@param *pq takes the pointer to the PQ structure
**/
void pq_empty(PriorityQueue *pq)
{
	if (!pq->head)			//check refernce
	{
		return;
	}
	node* cur = pq->head;
	node* prev = pq->head;
	while (cur->next)		//iterate to last reference || removing the previous as you go
	{
		if (cur != pq->head)
			prev = cur;
		cur = cur->next;
		free_node(prev);
	}
	free_node(cur);
	pq->head = NULL;
}

/*---------------------------GAME---MAIN-------------------------------------------------*/

//basic structure of a brick to be used in a PQ implementation
typedef struct
{
    int width;
}Brick;

void draw_stack(Sprite *brick,Vector2D start,Brick *bricklist,unsigned int count)
{
    unsigned int i,j;
    int brickheight = 32;
    int brickwidth = 32;
    Vector2D drawPosition;
	//check pointers
    if (!brick)return;
    if (!bricklist)return;
    for (i = 0; i < count; i++)  //vertical control
    {
        drawPosition.x = start.x - ((bricklist[i].width * brickwidth)/2);
        drawPosition.y = start.y - ((i + 1) * brickheight);
        for (j = 0;j < bricklist[i].width;j++)  //horizontal control
        {
            drawPosition.x += brickwidth;
            gf2d_sprite_draw(
                brick,
                drawPosition,
                NULL,
                NULL,
                NULL,
                NULL,
                NULL,
                0);
		}
    }
}

int main(int argc, char * argv[])
{
    int done = 0;
    const Uint8 * keys;
    Sprite *sprite,*brick;
    static Brick bricklist[] =
    {
        {2},
        {7},
        {1},
        {5},
        {14},
        {9},
        {13},
        {24},
        {16},
        {22}
    };

	//iterator for looping
	int i = 0;
	//pointer to array of ints
	int *stack;

    int mx,my;
    float mf = 0;
    Sprite *mouse;
    Vector4D mouseColor = {0,0,255,200};

	//Initalize a pq
	PriorityQueue *pq = pq_new(sizeof(Brick));
	//populate the priority queue from bricklist
	while (i<10)
	{
		//insert values
		pq_insert(pq, &bricklist[i], bricklist[i].width);
/*used for value checking on STD OUT*/		//	if(i==9) print_status_of_pq(pq);
		i++;
	}

    init_logger("gf2d.log");
    slog("---==== BEGIN ====---");
    gf2d_graphics_initialize(
        "gf2d",
        1200,
        720,
        1200,
        720,
        vector4d(0,0,0,255),
        0);
    gf2d_graphics_set_frame_delay(17);
    gf2d_sprite_init(1024);
    SDL_ShowCursor(SDL_DISABLE);

    /*demo setup*/

    sprite = gf2d_sprite_load_image("images/backgrounds/bg_flat.png");
    brick = gf2d_sprite_load_all("images/brick.png",32,32,16);
    mouse = gf2d_sprite_load_all("images/pointer.png",32,32,16);

	//retrieve array from PQ ETL wrapper
	stack = pq_toArray(pq);
	//empty the sorting pq container
	pq_empty(pq);
	//free the conainter
	free(pq);

    /*main game loop*/

    while(!done)
    {
        SDL_PumpEvents();
        keys = SDL_GetKeyboardState(NULL);
        SDL_GetMouseState(&mx,&my);
        mf+=0.1;
        if (mf >= 16.0)		mf = 0;

        gf2d_graphics_clear_screen();
            gf2d_sprite_draw_image(sprite,vector2d(0,0));
            draw_stack(brick,vector2d(600,700),stack,10);
            gf2d_sprite_draw(
                mouse,
                vector2d(mx,my),
                NULL,
                NULL,
                NULL,
                NULL,
                &mouseColor,
                (int)mf);
        gf2d_grahics_next_frame();
        if (keys[SDL_SCANCODE_ESCAPE])	done = 1; // exit condition

/*Non self cleaning logs :(*/		//		slog("Rendering at %f FPS",gf2d_graphics_get_frames_per_second());
    }

	slog("---==== END ====---");
    return 0;
}
/*eol@eof*/

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Ardent\Iterator;

use Ardent\Pair;
use Ardent\Exception\TypeException;

class SortedMapIterator implements MapIterator {

    use IteratorCollection;

    /**
     * @var BinaryTreeIterator
     */
    private $iterator;

    private $size;

    function __construct(BinaryTreeIterator $iterator, $size) {
        $this->iterator = $iterator;
        $this->size = $size;
        $this->rewind();
    }

    function count() {
        return $this->size;
    }

    /**
     * @link http://php.net/manual/en/iterator.rewind.php
     * @return void
     */
    function rewind() {
        $this->iterator->rewind();
    }

    /**
     * @link http://php.net/manual/en/iterator.valid.php
     * @return boolean
     */
    function valid() {
        return $this->iterator->valid();
    }

    /**
     * @link https://bugs.php.net/bug.php?id=45684
     * @link http://php.net/manual/en/iterator.key.php
     * @return mixed
     * @throws TypeException
     */
    function key() {
        if (!$this->iterator->valid()) {
            return NULL;
        }

        /**
         * @var Pair $pair
         */
        $pair = $this->iterator->current();

        if (!($pair instanceof Pair)) {
            throw new TypeException(
                __CLASS__ . ' only works with a BinarySearchTreeIterator that returns pair objects as values'
            );
        }

        return $pair->first;
    }

    /**
     * @link http://php.net/manual/en/iterator.current.php
     * @throws TypeException
     * @return mixed
     */
    function current() {
        if (!$this->iterator->valid()) {
            return NULL;
        }
        /**
         * @var Pair $pair
         */
        $pair = $this->iterator->current();

        if (!($pair instanceof Pair)) {
            throw new TypeException(
                __CLASS__ . ' only works with a BinarySearchTreeIterator that returns pair objects as values'
            );
        }

        return $pair->second;
    }

    /**
     * @link http://php.net/manual/en/iterator.next.php
     * @return void
     */
    function next() {
        $this->iterator->next();
    }

}


text:
package com.smoketurner.dropwizard.consul.ribbon;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.client.JerseyClientConfiguration;
import io.dropwizard.util.Duration;
import io.dropwizard.validation.MinDuration;
import java.util.concurrent.TimeUnit;
import javax.validation.constraints.NotNull;

public class RibbonJerseyClientConfiguration extends JerseyClientConfiguration {

  @NotNull
  @MinDuration(value = 1, unit = TimeUnit.SECONDS)
  private Duration refreshInterval = Duration.seconds(10);

  @JsonProperty
  public Duration getRefreshInterval() {
    return refreshInterval;
  }

  @JsonProperty
  public void setRefreshInterval(Duration interval) {
    refreshInterval = interval;
  }
}


text:
package org.jclouds.aliyun.domain;

import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.Optional;

import javax.inject.Named;
import java.beans.ConstructorProperties;
import java.net.URI;

import static com.google.common.base.Preconditions.checkNotNull;

/**
 * For convenience, resources contain links to themselves. This allows a api to easily obtain a
 * resource URIs rather than to construct them.
 *
 * @see <a href= "http://docs.openstack.org/api/openstack-compute/1.1/content/LinksReferences.html"
 *      />
 */
public class Link {
    /**
     * Relations associated with resources.
     */
    public static enum Relation {
        /**
         * a versioned link to the resource. These links should be used in cases where the link will
         * be followed immediately.
         */
        SELF,
        /**
         * a permanent link to a resource that is appropriate for long term storage.
         */
        BOOKMARK,
        /**
         *
         */
        DESCRIBEDBY,
        /**
         * Indicates that the link's context is a part of a series, and that the next in the series is
         * the link target.
         */
        NEXT,

        /**
         * Indicates that the link's context is a part of a series, and that the previous in the
         * series is the link target.
         */
        PREVIOUS,

        ALTERNATE,
        /**
         * the value returned by the OpenStack service was not recognized.
         */
        UNRECOGNIZED;

        public String value() {
            return name().toLowerCase();
        }

        public static Relation fromValue(String v) {
            try {
                return valueOf(v.toUpperCase());
            } catch (IllegalArgumentException e) {
                return UNRECOGNIZED;
            }
        }
    }

    public static Link create(Relation relation, URI href) {
        return new Link(relation, null, href);
    }

    public static Link create(Relation relation, String type, URI href) {
        return new Link(relation, Optional.fromNullable(type), href);
    }

    public static Builder builder() {
        return new Builder();
    }

    public Builder toBuilder() {
        return builder().fromLink(this);
    }

    public static class Builder {

        protected Relation relation;
        protected Optional<String> type = Optional.absent();
        protected URI href;

        /**
         * @see org.jclouds.aliyun.domain.Link#getRelation()
         */
        public Builder relation(Relation relation) {
            this.relation = relation;
            return this;
        }

        /**
         * @see org.jclouds.aliyun.domain.Link#getType()
         */
        public Builder type(String type) {
            this.type = Optional.fromNullable(type);
            return this;
        }

        /**
         * @see org.jclouds.aliyun.domain.Link#getHref()
         */
        public Builder href(URI href) {
            this.href = href;
            return this;
        }

        public Link build() {
            return new Link(relation, type, href);
        }

        public Builder fromLink(Link in) {
            return this.relation(in.getRelation()).type(in.getType().orNull()).href(in.getHref());
        }
    }

    @Named("rel")
    private final Link.Relation relation;
    private final Optional<String> type;
    private final URI href;

    @ConstructorProperties({ "rel", "type", "href" })
    protected Link(Relation relation, Optional<String> type, URI href) {
        this.href = checkNotNull(href, "href");
        this.relation = checkNotNull(relation, "relation of %s", href);
        this.type = (type == null) ? Optional.<String> absent() : type;
    }

    /**
     * There are three kinds of link relations associated with resources. A self link contains a
     * versioned link to the resource. These links should be used in cases where the link will be
     * followed immediately. A bookmark link provides a permanent link to a resource that is
     * appropriate for long term storage. An alternate link can contain an alternate representation
     * of the resource. For example, an OpenStack Compute image may have an alternate representation
     * in the OpenStack Image service. Note that the type attribute here is used to provide a hint as
     * to the type of representation to expect when following the link.
     *
     * @return the relation of the resource in the current OpenStack deployment
     */
    public Relation getRelation() {
        return this.relation;
    }

    /**
     * @return the type of the resource or null if not specified
     */
    public Optional<String> getType() {
        return this.type;
    }

    /**
     * @return the href of the resource
     */
    public URI getHref() {
        return this.href;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(relation, type, href);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null || getClass() != obj.getClass())
            return false;
        Link that = Link.class.cast(obj);
        return Objects.equal(this.relation, that.relation) && Objects.equal(this.type, that.type)
                && Objects.equal(this.href, that.href);
    }

    protected ToStringHelper string() {
        return Objects.toStringHelper(this).omitNullValues().add("relation", relation).add("type", type.orNull())
                .add("href", href);
    }

    @Override
    public String toString() {
        return string().toString();
    }

}


text:
Terms of Use

Age

By using this site you must be at least thirteen years of age or have permission of your legal guardian or parent.

This site does not knowingly collect, either online or offline, personal information from persons under the age of thirteen.

Language

This site is designed for people of all ages including minors.

By using this site you agree to avoid using any language that is considered offensive/vulgar/inappropriate or any other language that an administrator deems unfit.

Failure to comply with these rules gives any administrator the full rights to ban or delete your account.

Security

The security of your account is yours alone.

By using this site you acknowledge that this site is not responsible if you share any personal account information which may compromise your account.

Liability

By using this site you agree that you will not hold this site accountable for any damage done to either you or anything you own.

This site is provided free of charge and has no obligation to serve your requests.

This site is also not responsible for any compromised passwords. Always use different passwords for each site.


text:
CREATE TABLE IF NOT EXISTS `CREDENTIAL` (
  `PRINCIPAL_ID` bigint(20) NOT NULL,
  `PASS_HASH` varchar(73) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
  `SECRET_KEY` varchar(100) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  PRIMARY KEY (`PRINCIPAL_ID`),
  CONSTRAINT `PRINCIPAL_ID_FK` FOREIGN KEY (`PRINCIPAL_ID`) REFERENCES `JDOUSERGROUP` (`ID`) ON DELETE CASCADE
)


text:
/**
 * This is the main class for StreetView animator. Each movie is an instance of
 * this class. A movie instance can contain sequences.
 * @param  {Object} options       The global options object
 * @return {Object}
 */
window.streetviewanimator.movie = function(options) {

    /**
     * Prevent scope issues by using `base` in callbacks instead of `this`
     * @type {Object}
     */
    var base = this;

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

    /**
     * Alias to main namespace
     * @type {Object}
     */
    var $SVA = window.streetviewanimator;

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

    /**
     * The default options object
     * @type {Object}
     */
    base.options = {
        'debug': false,
        'playerDebug': false,
        'router': {
            'apiKey': null
        },
        'frameWidth': 600,
        'frameHeight': 338,
        'player': {
            'frameRate': 12,
            'domElement': null
        },
        'scenes':[],
        'streetviewUrl': 'http://maps.googleapis.com/maps/api/streetview',

        //  Events
        'onReady': function() {},
        'onSceneCreate': function(scene) {},
        'onSceneUpdate': function(scene) {},
        'onSceneDestroy': function() {},
        'onGenerateStart': function() {},
        'onGenerateEnd': function() {},
        'onReset': function() {},

        //  Player Events
        'onPlayerReady': function(player) {},
        'onPlayerLoadStart': function(player) {},
        'onPlayerLoadStop': function(player) {},
        'onPlayerLoadProgress': function(player, lastFrameLoaded, totalFrames, percentageLoaded) {},
        'onPlayerLoadComplete': function(player) {},
        'onPlayerPlay': function(player) {},
        'onPlayerBufferStart': function(player) {},
        'onPlayerBufferStop': function(player) {},
        'onPlayerStop': function(player) {},
        'onPlayerFinish': function(player) {},
        'onPlayerEnterFrame': function(player, currentFrame) {},
        'onPlayerExitFrame': function(player, currentFrame) {},
        'onPlayerLoop': function(player) {},
        'onPlayerReset': function(player) {},

        //  Custom player events
        'onPlayerEnterScene': function(player, scene) {},
        'onPlayerExitScene': function(player, scene) {}
    };

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

    /**
     * Holds references to each scene within the movie
     * @type {Object}
     */
    base.scenes = {};

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

    /**
     * An array of scene's first frames
     * @type {Object}
     */
    base.sceneStartFrames = {};

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

    /**
     * An array of scene's first frames
     * @type {Object}
     */
    base.sceneStopFrames = {};

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

    /**
     * Holds whether the movie has been generated or not
     * @type {Boolean}
     */
    base.generated = false;

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

    /**
     * Whether the generation process is in progress
     * @type {Boolean}
     */
    base.isGenerating = false;

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

    /**
     * Holds the router instance
     * @type {Object}
     */
    base.router = null;

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

    /**
     * Holds the player instance
     * @type {Object}
     */
    base.player = null;

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

    /**
     * Constructs the movie
     * @return {Object}
     */
    base.__construct = function() {

        base.options = $.extend(true, base.options, options);

        //  Are we turning debugging on?
        if (base.options.debug) {
            $SVA.debug.enabled = true;
        }

        if (base.options.playerDebug) {
            base.options.player.debug = true;
        }

        base.log('Constructing');

        //  Reset everything
        base.doReset();

        //  Setup singletons
        base.router = new $SVA.router(base.options.router, base);

        //  And finally the player, check it exists first
        if (typeof window.frameplayer === 'undefined') {

            throw('Dependency FramePlayer is not available http://hellopablo.github.io/frameplayer');

        } else {

            base.options.player.playerWidth = base.options.frameWidth;
            base.options.player.playerHeight = base.options.frameHeight;

            base.options.player.onReady = function() {
                base.options.onPlayerReady.call(this);
            };
            base.options.player.onLoadStart = function() {
                base.options.onPlayerLoadStart.call(this);
            };
            base.options.player.onLoadStop = function() {
                base.options.onPlayerLoadStop.call(this);
            };
            base.options.player.onLoadProgress = function(lastFrameLoaded, totalFrames, percentageLoaded) {
                base.options.onPlayerLoadProgress.call(this, lastFrameLoaded, totalFrames, percentageLoaded);
            };
            base.options.player.onLoadComplete = function() {
                base.options.onPlayerLoadComplete.call(this);
            };
            base.options.player.onPlay = function() {
                base.options.onPlayerPlay.call(this);
            };
            base.options.player.onBufferStart = function() {
                base.options.onPlayerBufferStart.call(this);
            };
            base.options.player.onBufferStop = function() {
                base.options.onPlayerBufferStop.call(this);
            };
            base.options.player.onStop = function() {
                base.options.onPlayerStop.call(this);
            };
            base.options.player.onFinish = function() {
                base.options.onPlayerFinish.call(this);
            };
            base.options.player.onEnterFrame = function(currentFrame) {
                base.playerEnterFrame.call(base, currentFrame);
                base.options.onPlayerEnterFrame.call(this);
            };
            base.options.player.onExitFrame = function(currentFrame) {
                base.playerExitFrame.call(base, currentFrame);
                base.options.onPlayerExitFrame.call(this);
            };
            base.options.player.onLoop = function() {
                base.options.onPlayerLoop.call(this);
            };
            base.options.player.onReset = function()  {
                base.options.onPlayerReset.call(this);
            };

            base.player = new window.frameplayer.player(base.options.player, base);
        }

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

        //  Setup any predefined scenes
        if (base.options.scenes.length) {
            for (var i = 0; i < base.options.scenes.length; i++) {
                base.scene(base.options.scenes[i].id, base.options.scenes[i]);
            }
        }

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

        //  Fire the `onReady` event
        base.options.onReady.call(base);

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

        return base;
    };

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

    /**
     * Create, edit or fetch a scene instance
     * @param  {String} sceneId The scene ID
     * @param  {Object} options The scene options
     * @return {Object}
     */
    base.scene = function(sceneId, options) {

        //  Create a new scene if one doesn't exist by that ID and options have been supplied
        if (typeof base.scenes[sceneId] === 'undefined') {

            //  Create new scene
            base.scenes[sceneId] = new $SVA.scene(sceneId, options, base);

            //  Mark the movie as not generated, new scenes require processing
            base.generated = false;

            //  Fire the `onSceneCreate` event
            base.options.onSceneCreate.call(base, base.scenes[sceneId]);

        } else {

            //  Update existing scene
            base.scenes[sceneId].setOptions(options);

            //  Mark the movie as not generated, updated scenes require processing
            //  @todo Determine if a scene has *actually* been updated
            base.generated = false;

            //  Fire the `onSceneUpdate` event
            base.options.onSceneUpdate.call(base, base.scenes[sceneId]);
        }

        return base.scenes[sceneId];
    };

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

    /**
     * Returns the number of scenes in the movie
     * @return {Number}
     */
    base.getNumScenes = function() {

        var numScenes = 0;

        for (var key in base.scenes) {
            numScenes++;
        }

        return numScenes;
    };

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

    /**
     * Returns the number of scenes in the movie
     * @return {Number}
     */
    base.getNumFrames = function() {

        var numFrames = 0;
        var sceneNumFrames;

        for (var key in base.scenes) {

            sceneNumFrames = base.scenes[key].getNumFrames();
            numFrames += sceneNumFrames;
        }

        return numFrames;
    };

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

    /**
     * Generates the movie
     * @return {Object} A jQuery promise
     */
    base.generate = function() {

        //  Ignore other calls to this method if currently generating
        if (base.isGenerating) {

            base.warn('Generation in progress, ignoring call');
            return false;

        } else {

            base.log('Beginning scene generation');
            base.isGenerating = true;

            //  Update the player element so some visual feedback can be given easily
            base.player.element.addClass('generating');

            //  Fire the `onGenerateStart` event
            base.options.onGenerateStart.call(base);
        }

        var deferred = new $.Deferred();

        if (!base.requiresGeneration()) {

            base.log('Movie is already generated');

            //  Reset local variables
            base.isGenerating = false;
            base.generated = true;

            //  Resolve the promise
            deferred.resolve(deferred);

        } else {

            //  Process each scene
            base.doGenerate(deferred);
        }

        //  Fired when generation is complete
        deferred.done(function() {

            base.log('Completed movie generation');

            //  Reset local variables
            base.isGenerating = false;
            base.generated = true;

            //  Update the player element so some visual feedback can be given easily
            base.player.element.removeClass('generating');

            //  Fire the `onGenerateEnd` event
            base.options.onGenerateEnd.call(base);
        });

        return deferred.promise();
    };

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

    /**
     * The callback function which generates each scene
     * @param  {Object} deferred The deferred object to resolve
     * @return {Void}
     */
    base.doGenerate = function(deferred) {

        if (!base.getNumScenes()) {

            base.warn('No scenes are present in the movie');
            deferred.resolve();

        } else {

            //  Find a scene which has not been generated
            var scene;
            for (var key in base.scenes) {
                if (base.scenes[key].requiresGeneration()) {
                    scene = base.scenes[key];
                    break;
                }
            }

            if (scene) {

                scene.generate()
                .fail(function(data) {

                    base.warn('Scene [' + scene.getId() + '] failed to generate: ' + data.error);
                })
                .always(function() {

                    //  Generation of this scene complete, try again
                    base.doGenerate(deferred);
                });

            } else {

                //  No scenes to generate
                base.log('No scenes require generation');
                deferred.resolve();
            }
        }
    };

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

    /**
     * Returns whether the movie requires generation
     * @return {Boolean}
     */
    base.requiresGeneration = function() {
        return !base.generated;
    };

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

    /**
     * Begin playback
     * @return {Object} A jQuery promise
     */
    base.play = function() {

        var deferred = new $.Deferred();

        if (base.requiresGeneration()) {

            //  Once generated, set all the player frames, and begin playback
            base.log('Movie requires generation prior to playback');
            base.generate()
            .done(function() {

                base.resolvePlay(deferred);
            });

        } else {

            //  Already generated
            base.resolvePlay(deferred);
        }

        return deferred.promise();
    };

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

    /**
     * Set the player frames and a note the start/end frames (for the callbacks)
     * @param  {Object} deferred The deferred object to resolve
     * @return {Void}
     */
    base.resolvePlay = function(deferred, resetPlayer) {

        base.log('Setting frames in player and calculating start/end frames');
        base.player.reset(true);

        base.sceneStartFrames = {};
        base.sceneStopFrames = {};

        var lastStartFrame = 0;
        var lastEndFrame = -1;

        for (var key in base.scenes) {

            base.log('Setting frames for scene [' + key + ']');
            base.player.addFrames(base.scenes[key].getFrames());

            //  Set the start frame, it's the lastEndFrame + 1
            lastStartFrame = lastEndFrame + 1;
            base.sceneStartFrames['frame'+lastStartFrame] = base.scenes[key];

            //  Set the end frame, it's the start frame + number of frames
            lastEndFrame = lastStartFrame + base.scenes[key].getNumFrames() - 1;
            base.sceneStopFrames['frame'+lastEndFrame] = base.scenes[key];
        }

        //  Begin playback
        base.log('Beginning playback');
        base.player.play();

        //  Resolve the promise
        deferred.resolve();
    };

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

    /**
     * Stop playback
     * @return {Object}
     */
    base.stop = function() {
        base.player.stop();
        return base;
    };

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

    /**
     * Called when the player enters a frame and calculates whether it's the exit
     * frame of a scene, if so it triggers the `onEnterScene` event
     * @param  {Number} currentFrame The current frame
     * @return {Void}
     */
    base.playerEnterFrame = function(currentFrame) {

        var methodName = 'frame' + currentFrame;
        if (typeof base.sceneStartFrames[methodName] === 'object') {
            base.log('Entering Scene:' + base.sceneStartFrames[methodName].getId());
            base.options.onPlayerEnterScene.call(base.player, base.sceneStartFrames[methodName]);
        }
    };

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

    /**
     * Called when the player exists a frame and calculates whether it's the exit
     * frame of a scene, if so it triggers the `onExitScene` event
     * @param  {Number} currentFrame The current frame
     * @return {Void}
     */
    base.playerExitFrame = function(currentFrame) {

        var methodName = 'frame' + currentFrame;
        if (typeof base.sceneStopFrames[methodName] === 'object') {
            base.log('Exiting Scene:' + base.sceneStopFrames[methodName].getId());
            base.options.onPlayerExitScene.call(base.player, base.sceneStopFrames[methodName]);
        }
    };

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

    /**
     * Resets the movie to it's default state
     * @return {Object}
     */
    base.reset = function() {
        base.log('Resetting');
        base.doReset();
        base.options.onReset.call(base);
    };

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

    /**
     * Actually performs the reset, without any calls to the log or firing the
     * reset event
     * @return {Void}
     */
    base.doReset = function() {

        //  Local properties
        base.scenes = {};
        base.sceneStartFrames = {};
        base.sceneStopFrames = {};
        base.generated = false;
        base.isGenerating = false;

        //  Player
        if (base.player) {
            base.player.reset();
        }

        //  Router
        if (base.router) {
            base.router.reset();
        }
    };

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

    /**
     * Set the player's framerate
     * @param {Number} frameRate The framerate to use
     * @return {Object}
     */
    base.setFrameRate = function(frameRate) {

        base.log('Changing framerate from ' + base.options.player.frameRate + ' to ' + frameRate);
        base.options.player.frameRate = parseInt(frameRate, 10);
        return base;
    };

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

    /**
     * Set the player's framesize
     * @param {Number} width  The width of each frame
     * @param {Number} height The height of each frame
     * @return {Object}
     */
    base.setFrameSize = function(width, height) {

        base.log('Changing framesize from ' + base.options.frameWidth + 'x' + base.options.frameHeight + ' to ' + width + 'x' + height);
        base.options.frameWidth = parseInt(width, 10);
        base.options.frameHeight = parseInt(height, 10);
        return base;
    };

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

    base.setPlayerSize = function(width, height) {

        base.log('Changing framesize from ' + base.options.frameWidth + 'x' + base.options.frameHeight + ' to ' + width + 'x' + height);
        base.player.setPlayerSize(width, height);
        return base;
    };

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

    /**
     * Set the API key to use when contacting Google
     * @param {String} apiKey The API Key to use
     */
    base.setApiKey = function(apiKey) {

        base.log('Changing API key from ' + base.options.router.apiKey + ' to ' + apiKey);
        base.router.setApiKey(apiKey);
        return base;
    };

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

    /**
     * Sends an item to the log, prefixing it with a string so that the class
     * making the log is easily identifiable
     * @return {Object}
     */
    base.log = function() {

        $SVA.debug.log('SVA [Movie]:', arguments);
        return base;
    };

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

    /**
     * Sends an item to the error log, prefixing it with a string so that the class
     * making the log is easily identifiable
     * @return {Object}
     */
    base.warn = function() {

        $SVA.debug.warn('SVA [Movie]:', arguments);
        return base;
    };

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

    return base.__construct();
};


text:
package org.ohdsi.webapi.check.checker.characterization.helper;

import org.ohdsi.circe.cohortdefinition.CriteriaGroup;
import org.ohdsi.webapi.check.builder.ValidatorGroupBuilder;
import org.ohdsi.webapi.cohortcharacterization.dto.CcStrataDTO;

import static org.ohdsi.webapi.check.checker.criteria.CorelatedCriteriaHelper.prepareCorelatedCriteriaBuilder;
import static org.ohdsi.webapi.check.checker.criteria.CriteriaGroupHelper.prepareCriteriaGroupArrayBuilder;
import static org.ohdsi.webapi.check.checker.criteria.DemographicHelper.prepareDemographicBuilder;

public class CharacterizationStrataHelper {
    public static ValidatorGroupBuilder<CcStrataDTO, CriteriaGroup> prepareStrataBuilder() {
        ValidatorGroupBuilder<CcStrataDTO, CriteriaGroup> builder = new ValidatorGroupBuilder<CcStrataDTO, CriteriaGroup>()
                .attrName("subgroup analyses")
                .valueGetter(t -> t.getCriteria())
                .groups(
                        prepareCriteriaGroupArrayBuilder(),
                        prepareDemographicBuilder(),
                        prepareCorelatedCriteriaBuilder()
                );
        return builder;
    }
}


text:
import cpu
import logger
import api

def doChecks():
	#check cpu
	if cpuCap != 0:
		cpuPercent = cpu.cpuInfo
		if cpuPercent < cpuCap: # If we're good then ignore
			return false
		else:
			startTimer(time) #Not yet implemented calls a tick to check for clone complete for scaling.
			return true
	#check io

	#check bandwidth

def cloneLinode():

def swapIp():

def createImage():

def triggerJson():


text:
class DropSurveyEncounters < ActiveRecord::Migration[5.2]
  def change
    drop_table :survey_encounters do |t|
      t.integer :survey_id
      t.integer :user_id
      t.integer :encounter_id
      t.integer :position, null: false, default: 0
      t.integer :parent_survey_encounter_id
      t.timestamps null: false
      t.index [:survey_id, :encounter_id], unique: true
      t.index :user_id
      t.index :parent_survey_encounter_id
    end
  end
end


text:
package sacloud

// AuthStatus 現在の認証状態
type AuthStatus struct {
	Account            *Account    // アカウント
	Member             *Member     // 会員情報
	AuthClass          EAuthClass  `json:",omitempty"`      // 認証クラス
	AuthMethod         EAuthMethod `json:",omitempty"`      // 認証方法
	ExternalPermission string      `json:",omitempty"`      // 他サービスへのアクセス権
	IsAPIKey           bool        `json:",omitempty"`      // APIキーでのアクセスフラグ
	OperationPenalty   string      `json:",omitempty"`      // オペレーションペナルティ
	Permission         EPermission `json:",omitempty"`      // 権限
	IsOk               bool        `json:"is_ok,omitempty"` // 結果

	// RESTFilter [unknown type] `json:",omitempty"`
	// User [unknown type] `json:",omitempty"`

}

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

// EAuthClass 認証種別
type EAuthClass string

var (
	// EAuthClassAccount アカウント認証
	EAuthClassAccount = EAuthClass("account")
)

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

// EAuthMethod 認証方法
type EAuthMethod string

var (
	// EAuthMethodAPIKey APIキー認証
	EAuthMethodAPIKey = EAuthMethod("apikey")
)

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

// EExternalPermission 他サービスへのアクセス権
type EExternalPermission string

var (
	// EExternalPermissionBill 請求情報
	EExternalPermissionBill = EExternalPermission("bill")
	// EExternalPermissionCDN ウェブアクセラレータ
	EExternalPermissionCDN = EExternalPermission("cdn")
)

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

// EOperationPenalty ペナルティ
type EOperationPenalty string

var (
	// EOperationPenaltyNone ペナルティなし
	EOperationPenaltyNone = EOperationPenalty("none")
)

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

// EPermission アクセスレベル
type EPermission string

var (
	// EPermissionCreate 作成・削除権限
	EPermissionCreate = EPermission("create")

	// EPermissionArrange 設定変更権限
	EPermissionArrange = EPermission("arrange")

	// EPermissionPower 電源操作権限
	EPermissionPower = EPermission("power")

	// EPermissionView リソース閲覧権限
	EPermissionView = EPermission("view")
)


text:
/**
 * import(s)
 */

var debug = require('debug')('html-parser')

/**
 * export(s)
 */

module.exports = parser

function parser () {
}


text:
package org.apache.flink.table.plan.nodes.dataset

import org.apache.calcite.plan.{RelOptCluster, RelTraitSet}
import org.apache.calcite.rel.`type`.RelDataType
import org.apache.calcite.rel.core.Calc
import org.apache.calcite.rel.RelNode
import org.apache.calcite.rex._
import org.apache.flink.api.common.functions.FlatMapFunction
import org.apache.flink.api.java.DataSet
import org.apache.flink.api.java.typeutils.RowTypeInfo
import org.apache.flink.table.api.internal.BatchTableEnvImpl
import org.apache.flink.table.calcite.FlinkTypeFactory
import org.apache.flink.table.codegen.FunctionCodeGenerator
import org.apache.flink.table.plan.schema.RowSchema
import org.apache.flink.table.runtime.FlatMapRunner
import org.apache.flink.types.Row

import scala.collection.JavaConverters._

/**
  * Flink RelNode which matches along with LogicalCalc.
  */
class DataSetCalc(
    cluster: RelOptCluster,
    traitSet: RelTraitSet,
    input: RelNode,
    rowRelDataType: RelDataType,
    calcProgram: RexProgram,
    ruleDescription: String)
  extends DataSetCalcBase(
    cluster,
    traitSet,
    input,
    rowRelDataType,
    calcProgram,
    ruleDescription) {

  override def copy(traitSet: RelTraitSet, child: RelNode, program: RexProgram): Calc = {
    new DataSetCalc(cluster, traitSet, child, getRowType, program, ruleDescription)
  }

  override def translateToPlan(tableEnv: BatchTableEnvImpl): DataSet[Row] = {

    val config = tableEnv.getConfig

    val inputDS = getInput.asInstanceOf[DataSetRel].translateToPlan(tableEnv)

    val generator = new FunctionCodeGenerator(config, false, inputDS.getType)

    val returnType = FlinkTypeFactory.toInternalRowTypeInfo(getRowType).asInstanceOf[RowTypeInfo]

    val projection = calcProgram.getProjectList.asScala.map(calcProgram.expandLocalRef)
    val condition = if (calcProgram.getCondition != null) {
      Some(calcProgram.expandLocalRef(calcProgram.getCondition))
    } else {
      None
    }

    val genFunction = generateFunction(
      generator,
      ruleDescription,
      new RowSchema(getRowType),
      projection,
      condition,
      config,
      classOf[FlatMapFunction[Row, Row]])

    val runner = new FlatMapRunner(genFunction.name, genFunction.code, returnType)

    inputDS.flatMap(runner).name(calcOpName(calcProgram, getExpressionString))
  }
}


text:
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="FerienCamp 4 bis 10 Klasse. Englisch, Spanisch ">
    <meta name="author" content="Christine Nettelbeck-Stutterheim">

    <title>Beelingi.me Sprachkurse Ferien Camp</title>

    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">

    <!-- Custom Fonts -->

    <!-- Plugin CSS -->
    <link rel="stylesheet" href="css/animate.min.css" type="text/css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="css/main.css" type="text/css">
    <link rel="stylesheet" href="css/custom.css" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>


text:
@interface UIImage (WZXGImage)

// 加载最原始的图片,没有渲染
+ (UIImage *)originImageWithName: (NSString *)name;

// 绘制圆角
- (void)WZX_cornerImageWithSize:(CGSize)size fillColor:(UIColor *)fillColor completion:(void (^)(UIImage *image))completion;

@end


text:
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.8
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.badlogic.gdx.physics.bullet.collision;

import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Quaternion;
import com.badlogic.gdx.math.Matrix3;
import com.badlogic.gdx.math.Matrix4;

public class btSimplePair extends BulletBase {
	private long swigCPtr;

	protected btSimplePair(final String className, long cPtr, boolean cMemoryOwn) {
		super(className, cPtr, cMemoryOwn);
		swigCPtr = cPtr;
	}

	/** Construct a new btSimplePair, normally you should not need this constructor it's intended for low-level usage. */
	public btSimplePair(long cPtr, boolean cMemoryOwn) {
		this("btSimplePair", cPtr, cMemoryOwn);
		construct();
	}

	@Override
	protected void reset(long cPtr, boolean cMemoryOwn) {
		if (!destroyed)
			destroy();
		super.reset(swigCPtr = cPtr, cMemoryOwn);
	}

	public static long getCPtr(btSimplePair obj) {
		return (obj == null) ? 0 : obj.swigCPtr;
	}

	@Override
	protected void finalize() throws Throwable {
		if (!destroyed)
			destroy();
		super.finalize();
	}

  @Override protected synchronized void delete() {
		if (swigCPtr != 0) {
			if (swigCMemOwn) {
				swigCMemOwn = false;
				CollisionJNI.delete_btSimplePair(swigCPtr);
			}
			swigCPtr = 0;
		}
		super.delete();
	}

  public btSimplePair(int indexA, int indexB) {
    this(CollisionJNI.new_btSimplePair(indexA, indexB), true);
  }

  public void setIndexA(int value) {
    CollisionJNI.btSimplePair_indexA_set(swigCPtr, this, value);
  }

  public int getIndexA() {
    return CollisionJNI.btSimplePair_indexA_get(swigCPtr, this);
  }

  public void setIndexB(int value) {
    CollisionJNI.btSimplePair_indexB_set(swigCPtr, this, value);
  }

  public int getIndexB() {
    return CollisionJNI.btSimplePair_indexB_get(swigCPtr, this);
  }

  public void setUserPointer(long value) {
    CollisionJNI.btSimplePair_userPointer_set(swigCPtr, this, value);
  }

  public long getUserPointer() {
    return CollisionJNI.btSimplePair_userPointer_get(swigCPtr, this);
  }

  public void setUserValue(int value) {
    CollisionJNI.btSimplePair_userValue_set(swigCPtr, this, value);
  }

  public int getUserValue() {
    return CollisionJNI.btSimplePair_userValue_get(swigCPtr, this);
  }

}


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

<title>AbstractColumnFamilyRecordWriter (apache-cassandra API)</title>
<meta name="date" content="2015-06-05">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.apache.cassandra.hadoop

Class AbstractColumnFamilyRecordWriter<K,Y>

java.lang.Object

org.apache.hadoop.mapreduce.RecordWriter<K,Y>

org.apache.cassandra.hadoop.AbstractColumnFamilyRecordWriter<K,Y>

All Implemented Interfaces:

org.apache.hadoop.mapred.RecordWriter<K,Y>

public abstract class AbstractColumnFamilyRecordWriter<K,Y>
extends org.apache.hadoop.mapreduce.RecordWriter<K,Y>
implements org.apache.hadoop.mapred.RecordWriter<K,Y>

The ColumnFamilyRecordWriter maps the output <key, value>
 pairs to a Cassandra column family. In particular, it applies all mutations
 in the value, which it associates with the key, and in turn the responsible
 endpoint.

 Furthermore, this writer groups the mutations by the endpoint responsible for
 the rows being affected. This allows the mutations to be executed in parallel,
 directly to a responsible endpoint.

See Also:

ColumnFamilyOutputFormat

Nested Class Summary

Nested Classes

Modifier and Type
Class and Description

class
AbstractColumnFamilyRecordWriter.AbstractRangeClient<K>

A client that runs in a threadpool and connects to the list of endpoints for a particular
 range.

Field Summary

Fields

Modifier and Type
Field and Description

protected long
batchThreshold

protected org.apache.hadoop.conf.Configuration
conf

protected ConsistencyLevel
consistencyLevel

protected org.apache.hadoop.mapreduce.TaskAttemptContext
context

protected org.apache.hadoop.util.Progressable
progressable

protected int
queueSize

protected RingCache
ringCache

Constructor Summary

Constructors

Modifier
Constructor and Description

protected
AbstractColumnFamilyRecordWriter(org.apache.hadoop.conf.Configuration conf)

Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods

Modifier and Type
Method and Description

protected abstract void
close()

void
close(org.apache.hadoop.mapred.Reporter reporter)

Deprecated.

void
close(org.apache.hadoop.mapreduce.TaskAttemptContext context)

Close this RecordWriter to future operations, but not before
 flushing out the batched mutations.

Methods inherited from class org.apache.hadoop.mapreduce.RecordWriter

write

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface org.apache.hadoop.mapred.RecordWriter

write

Field Detail

conf

protected final org.apache.hadoop.conf.Configuration conf

ringCache

protected final RingCache ringCache

queueSize

protected final int queueSize

batchThreshold

protected final long batchThreshold

consistencyLevel

protected final ConsistencyLevel consistencyLevel

progressable

protected org.apache.hadoop.util.Progressable progressable

context

protected org.apache.hadoop.mapreduce.TaskAttemptContext context

Constructor Detail

AbstractColumnFamilyRecordWriter

protected AbstractColumnFamilyRecordWriter(org.apache.hadoop.conf.Configuration conf)

Method Detail

close

public void close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
           throws java.io.IOException,
                  java.lang.InterruptedException

Close this RecordWriter to future operations, but not before
 flushing out the batched mutations.

Specified by:

close in class org.apache.hadoop.mapreduce.RecordWriter<K,Y>

Parameters:

context - the context of the task

Throws:

java.io.IOException

java.lang.InterruptedException

close

@Deprecated
public void close(org.apache.hadoop.mapred.Reporter reporter)
                       throws java.io.IOException

Deprecated.

Fills the deprecated RecordWriter interface for streaming.

Specified by:

close in interface org.apache.hadoop.mapred.RecordWriter<K,Y>

Throws:

java.io.IOException

close

protected abstract void close()
                       throws java.io.IOException

Throws:

java.io.IOException

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2015 The Apache Software Foundation


text:
package jp.dodododo.dao.handler.factory;

import java.sql.Connection;
import java.util.Map;

import jp.dodododo.dao.IterationCallback;
import jp.dodododo.dao.dialect.Dialect;
import jp.dodododo.dao.handler.ResultSetHandler;
import jp.dodododo.dao.handler.impl.OneColumnResultSetHandler;
import jp.dodododo.dao.types.JavaType;

public class OneColumnResultSetHandlerFactory<TYPE> extends ResultSetHandlerFactory<TYPE> {

	@SuppressWarnings("rawtypes")
	public static final OneColumnResultSetHandlerFactory<?> INSTANCE = new OneColumnResultSetHandlerFactory();

	@Override
	public ResultSetHandler<TYPE> create(Class<TYPE> type, JavaType<?> javaType, IterationCallback<TYPE> callback, Dialect dialect,
			Map<String, Object> arg, Connection connection) {

		return new OneColumnResultSetHandler<TYPE>(callback, type, javaType);
	}

}


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

  <title>test_queue_link_ignores_emails (TestSpiderIntegrator)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />

# File test/spider_test_test.rb, line 15
  def test_queue_link_ignores_emails
    results = queue_link(FakeLink.new({ 'href' => 'mailto:joe@test.com' }), nil)
    assert @links_to_visit.empty?
  end


text:
local ffi = require "ffi"
local platform = require "turbo.platform"
local socket = require "turbo.socket_ffi"
local util = require "turbo.util"
require "turbo.cdef"

local crypto = {} -- crypto namespace

local lssl = ffi.load(os.getenv("TURBO_LIBSSL") or "ssl")
local libtffi = util.load_libtffi()

local EWOULDBLOCK, EINPROGRESS, ECONNRESET =
   socket.EWOULDBLOCK, socket.EINPROGRESS, socket.ECONNRESET

crypto.X509_FILETYPE_PEM =          1
crypto.X509_FILETYPE_ASN1 =         2
crypto.X509_FILETYPE_DEFAULT =      3
crypto.SSL_FILETYPE_ASN1 =          crypto.X509_FILETYPE_ASN1
crypto.SSL_FILETYPE_PEM =           crypto.X509_FILETYPE_PEM
crypto.SSL_ERROR_NONE =             0
crypto.SSL_ERROR_SSL =              1
crypto.SSL_ERROR_WANT_READ =        2
crypto.SSL_ERROR_WANT_WRITE =       3
crypto.SSL_ERROR_WANT_X509_LOOKUP = 4
crypto.SSL_ERROR_SYSCALL =          5
crypto.SSL_ERROR_ZERO_RETURN =      6
crypto.SSL_ERROR_WANT_CONNECT =     7
crypto.SSL_ERROR_WANT_ACCEPT =      8
-- use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options
-- are 'ored' with SSL_VERIFY_PEER if they are desired
crypto.SSL_VERIFY_NONE =        0x00
crypto.SSL_VERIFY_PEER =        0x01
crypto.SSL_VERIFY_FAIL_IF_NO_PEER_CERT = 0x02
crypto.SSL_VERIFY_CLIENT_ONCE =     0x04
crypto.validate =
{
    ["MatchFound"] = 0,
    ["MatchNotFound"] = 1,
    ["NoSANPresent"] = 2,
    ["MalformedCertificate"] = 3,
    ["Error"] = 4
}

crypto.ERR_get_error = lssl.ERR_get_error
crypto.SSL_get_error = lssl.SSL_get_error
crypto.lib = lssl

--- Convert OpenSSL unsigned long error to string.
-- @param rc unsigned long error from OpenSSL library.
-- @returns Lua string.
function crypto.ERR_error_string(rc)
    local buf = ffi.new("char[256]")
    lssl.ERR_error_string_n(rc, buf, ffi.sizeof(buf))
    return ffi.string(buf)
end

--- Initialize the SSL library.
-- Can be called multiple times without causing any pain. If the library is
-- already loaded it will pass.
function crypto.ssl_init()
    if not _G._TURBO_SSL_INITED then
       _TURBO_SSL_INITED = true
        lssl.SSL_load_error_strings()
        lssl.SSL_library_init()
        lssl.OPENSSL_add_all_algorithms_noconf()
    end
end
if _G.TURBO_SSL then
    crypto.ssl_init()
end

--- Create a client type SSL context.
-- @param cert_file (optional) Certificate file
-- @param prv_file (optional) Key file
-- @param ca_cert_path (optional) Path to CA certificates, or the system
-- wide in /etc/ssl/certs/ca-certificates.crt will be used.
-- @param verify (optional) Verify the hosts certificate with CA.
-- @param sslv (optional) SSL version to use.
-- @return Return code. 0 if successfull, else a OpenSSL error code and a
-- SSL error string, or -1 and a error string.
-- @return Allocated SSL_CTX *. Must not be freed. It is garbage collected.
function crypto.ssl_create_client_context(
        cert_file,
        prv_file,
        ca_cert_path,
        verify, sslv)
    local meth
    local ctx
    local err = 0
    -- Use standardish path to ca-certificates if not specified by user.
    -- May not be present on all Unix systems.
    ca_cert_path = ca_cert_path or "/etc/ssl/certs/ca-certificates.crt"
    meth = sslv or lssl.SSLv23_client_method()
    if meth == nil then
        err = lssl.ERR_peek_error()
        lssl.ERR_clear_error()
        return err, crypto.ERR_error_string(err)
    end
    ctx = lssl.SSL_CTX_new(meth)
    if ctx == nil then
        err = lssl.ERR_peek_error()
        lssl.ERR_clear_error()
        return err, crypto.ERR_error_string(err)
    else
        ffi.gc(ctx, lssl.SSL_CTX_free)
    end
    -- If client certificates are set, load them and verify.
    if type(cert_file) == "string" and type(prv_file) == "string" then
        if lssl.SSL_CTX_use_certificate_file(ctx, cert_file,
            crypto.SSL_FILETYPE_PEM) <= 0 then
            err = lssl.ERR_peek_error()
            lssl.ERR_clear_error()
            return err, crypto.ERR_error_string(err)
        end
        if lssl.SSL_CTX_use_PrivateKey_file(ctx, prv_file,
            crypto.SSL_FILETYPE_PEM) <= 0 then
            err = lssl.ERR_peek_error()
            lssl.ERR_clear_error()
            return err, crypto.ERR_error_string(err)
        end
        -- Check if pub and priv key matches each other.
        if lssl.SSL_CTX_check_private_key(ctx) ~= 1 then
            return -1, "Private and public keys does not match"
        end
    end
    if verify == true then
        if lssl.SSL_CTX_load_verify_locations(ctx,
                ca_cert_path, nil) ~= 1 then
            err = lssl.ERR_peek_error()
            lssl.ERR_clear_error()
            return err, crypto.ERR_error_string(err)
        end
        lssl.SSL_CTX_set_verify(ctx, crypto.SSL_VERIFY_PEER, nil);
    end
    return err, ctx
end

--- Create a server type SSL context.
-- @param cert_file Certificate file (public key)
-- @param prv_file Key file (private key)
-- @param ca_cert_path (optional) Path to CA certificates, or the system
-- wide in /etc/ssl/certs/ca-certificates.crt will be used.
-- @param sslv (optional) SSL version to use.
-- @return Return code. 0 if successfull, else a OpenSSL error
-- code and a SSL
-- error string, or -1 and a error string.
-- @return Allocated SSL_CTX *. Must not be freed. It is garbage collected.
function crypto.ssl_create_server_context(cert_file, prv_file, ca_cert_path, sslv)
    local meth
    local ctx
    local err = 0

    if not cert_file then
        return -1, "No cert file given in arguments";
    elseif not prv_file then
        return -1, "No priv file given in arguments";
    end
    meth = sslv or lssl.SSLv23_server_method()
    if meth == nil then
        err = lssl.ERR_peek_error()
        lssl.ERR_clear_error()
        return err, crypto.ERR_error_string(err)
    end
    ctx = lssl.SSL_CTX_new(meth)
    if ctx == nil then
        err = lssl.ERR_peek_error()
        lssl.ERR_clear_error()
        return err, crypto.ERR_error_string(err)
    else
        ffi.gc(ctx, lssl.SSL_CTX_free)
    end
    if lssl.SSL_CTX_use_certificate_file(ctx, cert_file,
        crypto.SSL_FILETYPE_PEM) <= 0 then
        err = lssl.ERR_peek_error()
        lssl.ERR_clear_error()
        return err, crypto.ERR_error_string(err)
    end
    if lssl.SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0 then
        err = lssl.ERR_peek_error()
        lssl.ERR_clear_error()
        return err, crypto.ERR_error_string(err)
    end
    if lssl.SSL_CTX_use_PrivateKey_file(ctx, prv_file,
        crypto.SSL_FILETYPE_PEM) <= 0 then
        err = lssl.ERR_peek_error()
        lssl.ERR_clear_error()
        return err, crypto.ERR_error_string(err)
    end
    return err, ctx
end

function crypto.ssl_new(ctx, fd_sock, client)
    local ssl
    local err

    ssl = crypto.lib.SSL_new(ctx)
    if ssl == nil then
        err = crypto.lib.ERR_peek_error()
        crypto.lib.ERR_clear_error()
        error(string.format(
            "Could not do SSL handshake. Failed to create SSL*. %s",
            crypto.ERR_error_string(err)))
    end

    ffi.gc(ssl, crypto.lib.SSL_free)

    if crypto.lib.SSL_set_fd(ssl, fd_sock) <= 0 then
        err = crypto.lib.ERR_peek_error()
        crypto.lib.ERR_clear_error()
        error(string.format(
            "Could not do SSL handshake. \
                Failed to set socket fd to SSL*. %s",
            crypto.ERR_error_string(err)))
    end

    if client then
        crypto.lib.SSL_set_connect_state(ssl)
    else
        crypto.lib.SSL_set_accept_state(ssl)
    end
    return ssl
end

function crypto.ssl_do_handshake(SSLIOStream)
    local err = 0
    local errno
    local rc = 0
    local ssl = SSLIOStream._ssl
    local client = SSLIOStream._ssl_options._type == 1

    -- This method might be called multiple times if we recieved
    -- EINPROGRESS or equaivalent on prior calls. The OpenSSL
    -- documentation states that SSL_do_handshake should be called again
    -- when its needs are satisfied.
    rc = crypto.lib.SSL_do_handshake(ssl)
    if rc <= 0 then
        if client and SSLIOStream._ssl_verify then
            local verify_err = crypto.lib.SSL_get_verify_result(ssl)
            if verify_err ~= 0 then
                error(
                    string.format(
                        "SSL certificate chain validation failed: %s",
                        ffi.string(
                            crypto.lib.X509_verify_cert_error_string(
                                verify_err))))
            end
        end
        err = crypto.lib.SSL_get_error(ssl, rc)
        -- In case the socket is O_NONBLOCK break out when we get
        -- SSL_ERROR_WANT_* or equal syscall return code.
        if err == crypto.SSL_ERROR_WANT_READ or
            err == crypto.SSL_ERROR_WANT_READ then
            return false
        elseif err == crypto.SSL_ERROR_SYSCALL then
            -- Error on socket.
            errno = ffi.errno()
            if errno == EWOULDBLOCK or errno == EINPROGRESS then
                return false
            elseif errno == ECONNRESET then
                SSLIOStream:close()
                return false
            elseif errno ~= 0 then
                local fd = SSLIOStream.socket
                SSLIOStream:close()
                error(
                    string.format("Error when reading from fd %d. "..
                        "Errno: %d. %s",
                        fd,
                        errno,
                        socket.strerror(errno)))
            else
                -- Popular belief ties this branch to disconnects before
                -- handshake is completed.
                local fd = SSLIOStream.socket
                SSLIOStream:close()
                error(string.format(
                    "Could not do SSL handshake. "..
                        "Client connection closed.",
                    fd,
                    errno,
                    socket.strerror(errno)))
            end
        elseif err == crypto.SSL_ERROR_SSL then
            err = crypto.lib.ERR_peek_error()
            crypto.lib.ERR_clear_error()
            error(
                string.format("Could not do SSL handshake. SSL error. %s",
                crypto.ERR_error_string(err)))
        else
            error(string.format(
                "Could not do SSL handshake. SSL_do_hanshake returned %d",
                err))
        end
    else
        if client and SSLIOStream._ssl_verify then
            rc = libtffi.validate_hostname(SSLIOStream._ssl_hostname, ssl)
            if rc ~= crypto.validate.MatchFound then
                error("SSL certficate hostname validation failed, rc " ..
                tonumber(rc))
            end
        end
    end
    return true
end

--- Write data to a SSL connection.
-- @param ssl (SSL *) OpenSSL struct SSL ptr.
-- @param buf (const char *) Buffer to send.
-- @param sz (Number) Bytes to send from buffer.
function crypto.SSL_write(ssl, buf, sz)
    if ssl == nil or buf == nil then
        error("SSL_write passed null pointer.")
    end
    return lssl.SSL_write(ssl, buf, sz)
end

--- Read data from a SSL connection.
-- @param ssl (SSL *) OpenSSL struct SSL ptr.
-- @param buf (char *) Buffer to read to.
-- @param sz (Number) Bytes to maximum read into buffer.
    function crypto.SSL_read(ssl, buf, sz)
        if ssl == nil or buf == nil then
        error("SSL_read passed null pointer.")
    end
    return lssl.SSL_read(ssl, buf, sz)
end

return crypto


text:
namespace Google.Cloud.Run.V2.Snippets
{
    // [START run_v2_generated_Services_DeleteService_sync_flattened_resourceNames]
    using Google.Cloud.Run.V2;
    using Google.LongRunning;

    public sealed partial class GeneratedServicesClientSnippets
    {
        /// <summary>Snippet for DeleteService</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void DeleteServiceResourceNames()
        {
            // Create client
            ServicesClient servicesClient = ServicesClient.Create();
            // Initialize request argument(s)
            ServiceName name = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]");
            // Make the request
            Operation<Service, Service> response = servicesClient.DeleteService(name);

            // Poll until the returned long-running operation is complete
            Operation<Service, Service> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Service result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<Service, Service> retrievedResponse = servicesClient.PollOnceDeleteService(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Service retrievedResult = retrievedResponse.Result;
            }
        }
    }
    // [END run_v2_generated_Services_DeleteService_sync_flattened_resourceNames]
}


text:
<?php
/**
 * Class Log
 * @Author Lich
 * 日志model
 */
class Logget extends Eloquent {
	protected $table = 'log';
    protected $fillable = array('uid', 'action');

}


text:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/add_habit"
        android:orderInCategory="100"
        android:title="Add a habit"
        android:onClick="addHabit"/>
    <item
        android:id="@+id/over_view"
        android:orderInCategory="100"
        android:title="Over view"
        android:onClick="overView"/>
</menu>


text:
package org.apache.hyracks.control.common.job.profiling.om;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import org.apache.hyracks.api.dataflow.TaskAttemptId;
import org.apache.hyracks.api.exceptions.Warning;
import org.apache.hyracks.api.job.profiling.IOperatorStats;
import org.apache.hyracks.api.job.profiling.IStatsCollector;
import org.apache.hyracks.api.partitions.PartitionId;
import org.apache.hyracks.control.common.job.profiling.StatsCollector;
import org.apache.hyracks.control.common.job.profiling.counters.MultiResolutionEventProfiler;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;

public class TaskProfile extends AbstractProfile {
    private static final long serialVersionUID = 1L;

    private TaskAttemptId taskAttemptId;

    private Map<PartitionId, PartitionProfile> partitionSendProfile;

    private IStatsCollector statsCollector;

    private Set<Warning> warnings;

    private long totalWarningsCount;

    public static TaskProfile create(DataInput dis) throws IOException {
        TaskProfile taskProfile = new TaskProfile();
        taskProfile.readFields(dis);
        return taskProfile;
    }

    private TaskProfile() {

    }

    public TaskProfile(TaskAttemptId taskAttemptId, Map<PartitionId, PartitionProfile> partitionSendProfile,
            IStatsCollector statsCollector, Set<Warning> warnings, long totalWarningsCount) {
        this.taskAttemptId = taskAttemptId;
        this.partitionSendProfile = new HashMap<>(partitionSendProfile);
        this.statsCollector = statsCollector;
        this.warnings = warnings;
        this.totalWarningsCount = totalWarningsCount;
    }

    public TaskAttemptId getTaskId() {
        return taskAttemptId;
    }

    public Map<PartitionId, PartitionProfile> getPartitionSendProfile() {
        return partitionSendProfile;
    }

    @Override
    public ObjectNode toJSON() {
        ObjectMapper om = new ObjectMapper();
        ObjectNode json = om.createObjectNode();

        json.put("activity-id", taskAttemptId.getTaskId().getActivityId().toString());
        json.put("partition", taskAttemptId.getTaskId().getPartition());
        json.put("attempt", taskAttemptId.getAttempt());
        if (partitionSendProfile != null) {
            ArrayNode pspArray = om.createArrayNode();
            for (PartitionProfile pp : partitionSendProfile.values()) {
                ObjectNode ppObj = om.createObjectNode();
                PartitionId pid = pp.getPartitionId();
                ObjectNode pidObj = om.createObjectNode();
                pidObj.put("job-id", pid.getJobId().toString());
                pidObj.put("connector-id", pid.getConnectorDescriptorId().toString());
                pidObj.put("sender-index", pid.getSenderIndex());
                pidObj.put("receiver-index", pid.getReceiverIndex());
                ppObj.set("partition-id", pidObj);
                ppObj.put("open-time", pp.getOpenTime());
                ppObj.put("close-time", pp.getCloseTime());
                MultiResolutionEventProfiler samples = pp.getSamples();
                ppObj.put("offset", samples.getOffset());
                int resolution = samples.getResolution();
                int sampleCount = samples.getCount();
                ArrayNode ftA = om.createArrayNode();
                int[] ft = samples.getSamples();
                for (int i = 0; i < sampleCount; ++i) {
                    ftA.add(ft[i]);
                }
                ppObj.set("frame-times", ftA);
                ppObj.put("resolution", resolution);
                pspArray.add(ppObj);
            }
            json.set("partition-send-profile", pspArray);
        }
        populateCounters(json);
        return json;
    }

    @Override
    protected void populateCounters(ObjectNode json) {
        ObjectMapper om = new ObjectMapper();
        Map<String, IOperatorStats> opTimes = statsCollector.getAllOperatorStats();
        ArrayNode countersObj = om.createArrayNode();
        opTimes.forEach((key, value) -> {
            ObjectNode jpe = om.createObjectNode();
            jpe.put("name", key);
            jpe.put("time", Double
                    .parseDouble(new DecimalFormat("#.####").format((double) value.getTimeCounter().get() / 1000000)));
            jpe.put("disk-io", value.getDiskIoCounter().get());
            countersObj.add(jpe);
        });
        json.set("counters", countersObj);
    }

    public IStatsCollector getStatsCollector() {
        return statsCollector;
    }

    public Set<Warning> getWarnings() {
        return warnings;
    }

    public long getTotalWarningsCount() {
        return totalWarningsCount;
    }

    @Override
    public void readFields(DataInput input) throws IOException {
        super.readFields(input);
        taskAttemptId = TaskAttemptId.create(input);
        int size = input.readInt();
        partitionSendProfile = new HashMap<>();
        for (int i = 0; i < size; i++) {
            PartitionId key = PartitionId.create(input);
            PartitionProfile value = PartitionProfile.create(input);
            partitionSendProfile.put(key, value);
        }
        statsCollector = StatsCollector.create(input);
        warnings = new HashSet<>();
        deserializeWarnings(input, warnings);
        totalWarningsCount = input.readLong();
    }

    @Override
    public void writeFields(DataOutput output) throws IOException {
        super.writeFields(output);
        taskAttemptId.writeFields(output);
        output.writeInt(partitionSendProfile.size());
        for (Entry<PartitionId, PartitionProfile> entry : partitionSendProfile.entrySet()) {
            entry.getKey().writeFields(output);
            entry.getValue().writeFields(output);
        }
        statsCollector.writeFields(output);
        serializeWarnings(output);
        output.writeLong(totalWarningsCount);
    }

    private void serializeWarnings(DataOutput output) throws IOException {
        output.writeInt(warnings.size());
        for (Warning warning : warnings) {
            warning.writeFields(output);
        }
    }

    private static void deserializeWarnings(DataInput input, Set<Warning> warnings) throws IOException {
        int warnCount = input.readInt();
        for (int i = 0; i < warnCount; i++) {
            warnings.add(Warning.create(input));
        }
    }
}


text:
package org.aesh.extensions.manual;

import java.io.File;

/**
 * @author Ståle W. Pedersen
 */
public interface ManCommand {
    File getManLocation();
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LizardmanCinemas.ViewModels
{
    public class DirectorDetails
    {
        public int Id { get; set; }
        public string FullName { get; set; }

        public int Age { get; set; }

        public string Picture { get; set; }

        public IEnumerable<MovieDetails> Movies { get; set; }
    }
}


text:
using opcode4.core.Model;

namespace opcode4.core.Exceptions
{
    public class EntityNotFoundException<T>: CustomException where T: TEntity
    {
        public EntityNotFoundException(string tag)
            : base(ExceptionCode.NOT_FOUND, "ENTITY TYPE[" + typeof(T).Name + "] NOT FOUND", tag) { }

        public EntityNotFoundException(ulong id)
            : base(ExceptionCode.NOT_FOUND, "ENTITY TYPE[" + typeof(T).Name + "] ID[" + id + "] NOT FOUND", "ENTITY_NOT_FOUND") { }
    }
}


text:
package com.github.pwittchen.yaas.sdk;

/**
 * Represents YaaS project, which is defined in the YaaS Builder web app
 */
public class YaaSProject {

  public final Zone zone;
  public final String organization;
  public final String service; // AKA tenant or Project Identifier
  public final String version;
  public final String clientId;
  public final String clientSecret;

  public YaaSProject(Zone zone, String organization, String service, String version,
      String clientId, String clientSecret) {
    this.zone = zone;
    this.organization = organization;
    this.service = service;
    this.version = version;
    this.clientId = clientId;
    this.clientSecret = clientSecret;
  }

  public static class Builder {
    private Zone zone;
    private String organization;
    private String service;
    private String version;
    private String clientId;
    private String clientSecret;

    public Builder withZone(final Zone zone) {
      this.zone = zone;
      return this;
    }

    public Builder withOrganization(final String organization) {
      this.organization = organization;
      return this;
    }

    public Builder withService(final String service) {
      this.service = service;
      return this;
    }

    public Builder withVersion(final String version) {
      this.version = version;
      return this;
    }

    public Builder withClientId(final String clientId) {
      this.clientId = clientId;
      return this;
    }

    public Builder withClientSecret(final String clientSecret) {
      this.clientSecret = clientSecret;
      return this;
    }

    public YaaSProject build() {
      return new YaaSProject(zone, organization, service, version, clientId, clientSecret);
    }
  }
}


text:
/*
 *  Profile module
 */
INSERT INTO cuyahoga_moduletype ([name], assemblyname, classname, path, editpath, inserttimestamp, updatetimestamp)
VALUES ('UserProfile', 'Cuyahoga.Modules', 'Cuyahoga.Modules.User.ProfileModule', 'Modules/User/EditProfile.ascx', NULL, '2005-10-20 14:36:28.324', '2005-10-20 14:36:28.324')
go

/*
 *  Version
 */
UPDATE cuyahoga_version SET major = 0, minor = 9, patch = 1 WHERE assembly = 'Cuyahoga.Modules'
go


text:
@implementation TWBarButtonItem

@end


text:
package pl.mmorpg.prototype.server.states;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.stream.Collectors;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

import com.badlogic.gdx.math.Rectangle;
import pl.mmorpg.prototype.clientservercommon.ItemIdentifiers;
import pl.mmorpg.prototype.clientservercommon.ObjectsIdentifiers;
import pl.mmorpg.prototype.server.UserInfo;
import pl.mmorpg.prototype.data.entities.components.InventoryPosition;
import pl.mmorpg.prototype.server.exceptions.UnknownItemTypeException;

public class GameCommandsHandler
{
	private final static String OBJECT_NAME = "Game";
	private final ScriptEngine javaScriptEngine;
	private PlayState game;
	private UserInfo userInfo;

	public GameCommandsHandler(PlayState game, UserInfo userInfo)
	{
		this.game = game;
		this.userInfo = userInfo;
		ScriptEngineManager manager = new ScriptEngineManager();
		javaScriptEngine = manager.getEngineByName("JavaScript");
		javaScriptEngine.put(OBJECT_NAME, this);
	}

	public Object execute(String code) throws ScriptException
	{
		if (codeRunsExecuteMethod(code))
			throw new ScriptException("Cannot run execute method directly!");
		return javaScriptEngine.eval(OBJECT_NAME + '.' + code);
	}

	private boolean codeRunsExecuteMethod(String code)
	{
		code = code.trim();
		String executeMethodName = "execute";
		return code.startsWith(executeMethodName) && code.length() > executeMethodName.length()
				&& code.charAt(executeMethodName.length()) == '(';
	}

	public void addMonster(String identifier, int x, int y)
	{
		game.addGameObject(identifier, x, y, new Rectangle(0, 0, Float.MAX_VALUE, Float.MAX_VALUE));
	}

	public void addGreenDragon(int x, int y)
	{
		game.addGameObject(ObjectsIdentifiers.GREEN_DRAGON, x, y);
	}

	public void addRedDragon(int x, int y)
	{
		game.addGameObject(ObjectsIdentifiers.RED_DRAGON, x, y);
	}

	public void addQuestBoard(int x, int y)
	{
		game.addGameObject(ObjectsIdentifiers.QUEST_BOARD, x, y);
	}

	public void additem(String identifier, int inventoryX, int inventoryY, int inventoryPage) throws ScriptException
	{
		addItem(identifier, 1, inventoryX, inventoryY, inventoryPage);
	}

	public void addItem(String identifier, int amount, int inventoryX, int inventoryY, int inventoryPage)
			throws ScriptException
	{
		InventoryPosition position = new InventoryPosition(inventoryPage, inventoryX, inventoryY);
		ItemIdentifiers itemIdentifier = tryConvertToItemIdentifier(identifier);
		game.addItem(itemIdentifier, amount, userInfo.userCharacter, position);
	}

	private ItemIdentifiers tryConvertToItemIdentifier(String identifier) throws ScriptException
	{
		try
		{
			return ItemIdentifiers.valueOf(identifier);
		}
		catch(IllegalArgumentException e)
		{
			throw new ScriptException(new UnknownItemTypeException(identifier));
		}
	}

	public String help()
	{
		 return Arrays.stream(getClass().getDeclaredMethods())
				.filter(this::isPublic)
				.filter(method -> !method.getName().equals("execute") && !method.getName().equals("help"))
				.map(this::createMethodInfo)
				.collect(Collectors.joining("\n"));
	}

	private String createMethodInfo(Method method)
	{
		StringBuilder methodInfo = new StringBuilder(method.getName());
		methodInfo.append('(');
		String parameters = Arrays.stream(method.getParameterTypes())
			.map(Class::getSimpleName)
			.collect(Collectors.joining(", "));
		methodInfo.append(parameters);
		methodInfo.append(");");
		return methodInfo.toString();
	}

	private boolean isPublic(Method method)
	{
		final int access = Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE;
		return (method.getModifiers() & access) == Modifier.PUBLIC;
	}
}


text:
package com.gs.fw.common.mithra.list;

import com.gs.fw.common.mithra.MithraTransaction;
import com.gs.fw.common.mithra.MithraTransactionalObject;
import com.gs.fw.common.mithra.TransactionalCommand;

import java.util.List;

public class CascadeInsertAllTransactionalCommand implements TransactionalCommand
{

    private List toBeInserted;

    public CascadeInsertAllTransactionalCommand(List toBeInserted)
    {
        this.toBeInserted = toBeInserted;
    }

    public Object executeTransaction(MithraTransaction tx) throws Throwable
    {
        for(int i=0;i < toBeInserted.size();i++)
        {
            ((MithraTransactionalObject)toBeInserted.get(i)).cascadeInsert();
        }
        return null;
    }
}


text:
package com.jeecg.alipay.api.base.vo.SendMessageTextOneVo;

public class SendMessage {

	private String toUserId;   //消息接收用户的userid
	private String msgType;    //消息类型,text
	private ConTent text;

	public String getToUserId() {
		return toUserId;
	}

	public void setToUserId(String toUserId) {
		this.toUserId = toUserId;
	}

	public String getMsgType() {
		return msgType;
	}

	public void setMsgType(String msgType) {
		this.msgType = msgType;
	}

	public ConTent getText() {
		return text;
	}

	public void setText(ConTent text) {
		this.text = text;
	}

}


text:
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Linq;

namespace Avalonia.Data
{
    /// <summary>
    /// An immutable struct that contains validation information for a <see cref="AvaloniaObject"/> that validates a single property.
    /// </summary>
    public struct ObjectValidationStatus : IValidationStatus
    {
        private Dictionary<Type, IValidationStatus> currentValidationStatus;

        public bool IsValid => currentValidationStatus?.Values.All(status => status.IsValid) ?? true;

        /// <summary>
        /// Constructs the structure with the given validation information.
        /// </summary>
        /// <param name="validations">The validation information</param>
        public ObjectValidationStatus(Dictionary<Type, IValidationStatus> validations)
            :this()
        {
            currentValidationStatus = validations;
        }

        /// <summary>
        /// Creates a new status with the updated information.
        /// </summary>
        /// <param name="status">The updated status information.</param>
        /// <returns>The new validation status.</returns>
        public ObjectValidationStatus UpdateValidationStatus(IValidationStatus status)
        {
            var newStatus = new Dictionary<Type, IValidationStatus>(currentValidationStatus ??
                                                                new Dictionary<Type, IValidationStatus>());
            newStatus[status.GetType()] = status;
            return new ObjectValidationStatus(newStatus);
        }

        public IEnumerable<IValidationStatus> StatusInformation => currentValidationStatus.Values;
    }
}


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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>io.skullabs.trip</groupId>
		<version>2.1.0</version>
		<artifactId>trip-parent</artifactId>
	</parent>

	<artifactId>trip-jsr-330-integration-tests</artifactId>
	<name>tRip: JSR 330 Integration Tests</name>
	<packaging>jar</packaging>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>trip-core</artifactId>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>trip-processor</artifactId>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>trip-jsr-330</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.enterprise</groupId>
			<artifactId>cdi-api</artifactId>
			<version>1.2</version>
		</dependency>
	</dependencies>

</project>


text:
namespace ob_type{
	STATIC_INIT(WebSocket){
		lua_State* L = OpenBlox::BaseGame::getGlobalState();

		luaL_newmetatable(L, lua_websocket_name);

		lua_pushstring(L, "__metatable");
		lua_pushstring(L, "This metatable is locked");
		lua_rawset(L, -3);

		lua_pushstring(L, "__methods");
		lua_newtable(L);
		luaL_Reg methods[]{
			{"send", lua_send},
			{"Send", lua_send},
			{"close", lua_close},
			{"Close", lua_close},
			{NULL, NULL}
		};
		luaL_register(L, NULL, methods);
		lua_rawset(L, -3);

		lua_pushstring(L, "__properties");
		lua_newtable(L);
		luaL_Reg props[]{
			{"readyState", lua_getReadyState},
			{"ReadyState", lua_getReadyState},
			{"OnOpen", lua_getOnOpen},
			{"onOpen", lua_getOnOpen},
			{"onopen", lua_getOnOpen},
			{"OnClose", lua_getOnClose},
			{"onClose", lua_getOnClose},
			{"onclose", lua_getOnClose},
			{"OnMessage", lua_getOnMessage},
			{"onMessage", lua_getOnMessage},
			{"onmessage", lua_getOnMessage},
			{NULL, NULL}
		};
		luaL_register(L, NULL, props);
		lua_rawset(L, -3);

		lua_pushstring(L, "__tostring");
		lua_pushcfunction(L, lua_toString);
		lua_rawset(L, -3);

		lua_pushstring(L, "__index");
		lua_pushcfunction(L, lua_index);
		lua_rawset(L, -3);

		lua_pushstring(L, "__newindex");
		lua_pushcfunction(L, lua_newindex);
		lua_rawset(L, -3);

		lua_pop(L, 1);
	}

	OpenBlox::Thread* WebSocket::webSocketThread = NULL;
	std::vector<WebSocket*>* WebSocket::activeWebSockets = NULL;

	#ifndef _WIN32
	bool WebSocket::isLocked = false;
	#endif

	WebSocket::WebSocket(const char* uri){
		this->uri = uri;

		#ifndef _WIN32
		sendQueue = std::vector<std::string>();
		#endif

		inited = false;

		OnOpen = new LuaEvent("OnOpen", 0);
		OnClose = new LuaEvent("OnClose", 0);//0 at this time. 2 expected in the future, long code, char* reason - https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
		OnMessage = new LuaEvent("OnMessage", 1);

		ws = NULL;

		if(activeWebSockets == NULL){
			activeWebSockets = new std::vector<WebSocket*>();
		}
		activeWebSockets->push_back(this);
		if(webSocketThread == NULL){
			webSocketThread = new OpenBlox::Thread([](){
				while(!activeWebSockets->empty()){
					for(std::vector<WebSocket>::size_type i = 0; i != activeWebSockets->size(); i++){
						WebSocket* ws = (*activeWebSockets)[i];
						if(ws != NULL){
							if(ws->ws == NULL && !ws->inited){
								ws->ws = easywsclient::WebSocket::from_url(std::string(ws->uri));
								if(ws->ws != NULL){
									if(ws->ws->getReadyState() == easywsclient::WebSocket::OPEN){
										std::vector<ob_type::VarWrapper> args = std::vector<ob_type::VarWrapper>();
										ws->OnOpen->Fire(args);
									}
								}
								ws->inited = true;
							}
						}
						if(ws != NULL && ws->ws != NULL && ws->ws->getReadyState() != easywsclient::WebSocket::CLOSED){
							ws->ws->poll();
							ws->ws->dispatch(handleMessage);
						}else{
							if(ws != NULL && ws->ws != NULL){
								std::vector<ob_type::VarWrapper> args = std::vector<ob_type::VarWrapper>();
								ws->OnClose->Fire(args);
								delete ws->ws;
								ws->ws = NULL;
							}
							activeWebSockets->erase(activeWebSockets->begin() + (i - 1));
							break;
						}
					}
					#ifndef _WIN32
					isLocked = true;
					for(std::vector<WebSocket>::size_type i = 0; i != activeWebSockets->size(); i++){
						WebSocket* ws = (*activeWebSockets)[i];
						if(ws != NULL && ws->ws != NULL && ws->ws->getReadyState() != easywsclient::WebSocket::CLOSED){
							if(!ws->sendQueue.empty()){
								for(std::vector<std::string>::size_type z = 0; z != ws->sendQueue.size(); z++){
									ws->ws->send(ws->sendQueue[z]);
								}
								ws->sendQueue.clear();
							}
							if(ws->shouldClose){
								ws->ws->close();
							}
						}
					}
					isLocked = false;
					#endif
					usleep(100);
				}
				//delete activeWebSockets;
				activeWebSockets = NULL;
				webSocketThread = NULL;
			});
			webSocketThread->start();
		}
	}

	WebSocket::~WebSocket(){
		delete OnClose;
		delete OnMessage;
	}

	void WebSocket::send(const char* msg){
		#ifndef _WIN32
			if(isLocked){
				while(isLocked){}
			}
			sendQueue.push_back(std::string(msg));
		#else
			ws->send(std::string(msg));
		#endif
	}

	void WebSocket::handleMessage(const std::string& msg, easywsclient::WebSocket::pointer ws){
		for(std::vector<WebSocket>::size_type i = 0; i != activeWebSockets->size(); i++){
			WebSocket* ws = (*activeWebSockets)[i];
			if(ws->ws){
				std::vector<ob_type::VarWrapper> args = std::vector<ob_type::VarWrapper>();
				args.push_back(msg.c_str());

				ws->OnMessage->Fire(args);
				break;
			}
		}
	}

	int WebSocket::lua_send(lua_State* L){
		WebSocket* LuaWebSocket = checkWebSocket(L, 1);
		if(LuaWebSocket != NULL){
			const char* msg = luaL_checkstring(L, 2);
			LuaWebSocket->send(msg);
		}
		return 0;
	}

	int WebSocket::lua_close(lua_State* L){
		WebSocket* LuaWebSocket = checkWebSocket(L, 1);
		if(LuaWebSocket != NULL){
			if(LuaWebSocket->ws){
				#ifndef _WIN32
					if(!LuaWebSocket->shouldClose){
						LuaWebSocket->shouldClose = true;
					}
				#else
					LuaWebSocket->ws->close();
				#endif
			}else{
				luaL_error(L, "WebSocket is already closed.");
			}
		}
		return 0;
	}

	int WebSocket::lua_getReadyState(lua_State* L){
		WebSocket* LuaWebSocket = checkWebSocket(L, 1);
		if(LuaWebSocket != NULL){
			int state = 3;
			if(LuaWebSocket->ws){
				state = LuaWebSocket->ws->getReadyState();
			}else{
				if(!LuaWebSocket->inited){
					lua_pushnumber(L, easywsclient::WebSocket::CONNECTING);
					return 1;
				}
			}
			lua_pushnumber(L, state);
			return 1;
		}
		lua_pushnumber(L, 2);
		return 1;
	}

	int WebSocket::lua_getOnOpen(lua_State* L){
		WebSocket* LuaWebSocket = checkWebSocket(L, 1);
		if(LuaWebSocket != NULL){
			return LuaWebSocket->OnOpen->wrap_lua(L);
		}
		lua_pushnil(L);
		return 1;
	}

	int WebSocket::lua_getOnClose(lua_State* L){
		WebSocket* LuaWebSocket = checkWebSocket(L, 1);
		if(LuaWebSocket != NULL){
			return LuaWebSocket->OnClose->wrap_lua(L);
		}
		lua_pushnil(L);
		return 1;
	}

	int WebSocket::lua_getOnMessage(lua_State* L){
		WebSocket* LuaWebSocket = checkWebSocket(L, 1);
		if(LuaWebSocket != NULL){
			return LuaWebSocket->OnMessage->wrap_lua(L);
		}
		lua_pushnil(L);
		return 1;
	}

	int WebSocket::lua_index(lua_State* L){
		WebSocket* LuaWebSocket = checkWebSocket(L, 1);
		if(LuaWebSocket != NULL){
			const char* name = luaL_checkstring(L, 2);

			lua_getmetatable(L, 1);
			lua_getfield(L, -1, "__properties");
			lua_getfield(L, -1, name);
			if(lua_iscfunction(L, -1)){
				lua_remove(L, -2);
				lua_remove(L, -2);

				lua_pushvalue(L, 1);
				lua_call(L, 1, 1);
				return 1;
			}else{
				lua_pop(L, 2);
				//Check methods
				lua_getfield(L, -1, "__methods");//-2
				lua_getfield(L, -1, name);//-1
				if(lua_iscfunction(L, -1)){
					lua_remove(L, -2);
					lua_remove(L, -3);

					return 1;
				}else{
					lua_pop(L, 3);
					return luaL_error(L, "attempt to index '%s' (a nil value)", name);
				}
			}
		}
		return 0;
	}

	int WebSocket::lua_newindex(lua_State* L){
		const char* name = luaL_checkstring(L, 2);
		return luaL_error(L, "%s cannot be assigned to", name);
	}

	int WebSocket::lua_toString(lua_State* L){
		WebSocket* LuaWebSocket = checkWebSocket(L, 1);
		std::string ret = "";
		ret += "WebSocket (" + std::string(LuaWebSocket->uri) + ")";
		lua_pushstring(L, ret.c_str());
		return 1;
	}

	int WebSocket::wrap_lua(lua_State* L){
		WebSocket** LuaWebSocket = (WebSocket**)lua_newuserdata(L, sizeof(*this));
		*LuaWebSocket = this;

		luaL_getmetatable(L, lua_websocket_name);
		lua_setmetatable(L, -2);
		return 1;
	}

	WebSocket* checkWebSocket(lua_State* L, int n){
		return *(WebSocket**)luaL_checkudata(L, n, lua_websocket_name);
	}
}


text:
package yan.com.taobaodb.adapter.util;

/**
 * Created by yan on 2015/10/22.
 */
public class RecyclerItmeClickListener {
}