text:
/* jshint maxlen: false */

'use strict';

var createAPIRequest = require('../../lib/apirequest');

/**
 * Cloud SQL Administration API
 *
 * @classdesc API for Cloud SQL database instance management.
 * @namespace sqladmin
 * @version  v1beta3
 * @variation v1beta3
 * @this Sqladmin
 * @param {object=} options Options for Sqladmin
 */
function Sqladmin(options) {

  var self = this;
  this._options = options || {};

  this.backupRuns = {

    /**
     * sql.backupRuns.get
     *
     * @desc Retrieves information about a specified backup run for a Cloud SQL instance.
     *
     * @alias sql.backupRuns.get
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.backupConfiguration - Identifier for the backup configuration. This gets generated automatically when a backup configuration is created.
     * @param  {string} params.dueTime - The start time of the four-hour backup window. The backup can occur any time in the window. The time is in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/backupRuns/{backupConfiguration}',
          method: 'GET'
        },
        params: params,
        requiredParams: ['project', 'instance', 'backupConfiguration', 'dueTime'],
        pathParams: ['backupConfiguration', 'instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.backupRuns.list
     *
     * @desc Lists all backup runs associated with a Cloud SQL instance.
     *
     * @alias sql.backupRuns.list
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.backupConfiguration - Identifier for the backup configuration. This gets generated automatically when a backup configuration is created.
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {integer=} params.maxResults - Maximum number of backup runs per response.
     * @param  {string=} params.pageToken - A previously-returned page token representing part of the larger set of results to view.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/backupRuns',
          method: 'GET'
        },
        params: params,
        requiredParams: ['project', 'instance', 'backupConfiguration'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.flags = {

    /**
     * sql.flags.list
     *
     * @desc Lists all database flags that can be set for Google Cloud SQL instances.
     *
     * @alias sql.flags.list
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object=} params - Parameters for request
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/flags',
          method: 'GET'
        },
        params: params,
        requiredParams: [],
        pathParams: [],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.instances = {

    /**
     * sql.instances.clone
     *
     * @desc Creates a Cloud SQL instance as a clone of a source instance.
     *
     * @alias sql.instances.clone
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.project - Project ID of the source as well as the clone Cloud SQL instance.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    clone: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/clone',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project'],
        pathParams: ['project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.delete
     *
     * @desc Deletes a Cloud SQL instance.
     *
     * @alias sql.instances.delete
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance to be deleted.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    delete: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}',
          method: 'DELETE'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.export
     *
     * @desc Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
     *
     * @alias sql.instances.export
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance to be exported.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    export: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/export',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.get
     *
     * @desc Retrieves information about a Cloud SQL instance.
     *
     * @alias sql.instances.get
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Database instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}',
          method: 'GET'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.import
     *
     * @desc Imports data into a Cloud SQL instance from a MySQL dump file stored in a Google Cloud Storage bucket.
     *
     * @alias sql.instances.import
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    import: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/import',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.insert
     *
     * @desc Creates a new Cloud SQL instance.
     *
     * @alias sql.instances.insert
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.project - Project ID of the project to which the newly created Cloud SQL instances should belong.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    insert: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project'],
        pathParams: ['project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.list
     *
     * @desc Lists instances for a given project, in alphabetical order by instance name.
     *
     * @alias sql.instances.list
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {integer=} params.maxResults - The maximum number of results to return per response.
     * @param  {string=} params.pageToken - A previously-returned page token representing part of the larger set of results to view.
     * @param  {string} params.project - Project ID of the project for which to list Cloud SQL instances.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances',
          method: 'GET'
        },
        params: params,
        requiredParams: ['project'],
        pathParams: ['project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.patch
     *
     * @desc Updates the settings of a Cloud SQL instance. This method supports patch semantics.
     *
     * @alias sql.instances.patch
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    patch: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}',
          method: 'PATCH'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.promoteReplica
     *
     * @desc Promotes the read replica instance to be a stand-alone Cloud SQL instance.
     *
     * @alias sql.instances.promoteReplica
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL read replica instance name.
     * @param  {string} params.project - ID of the project that contains the read replica.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    promoteReplica: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/promoteReplica',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.resetSslConfig
     *
     * @desc Deletes all client certificates and generates a new server SSL certificate for a Cloud SQL instance.
     *
     * @alias sql.instances.resetSslConfig
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    resetSslConfig: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/resetSslConfig',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.restart
     *
     * @desc Restarts a Cloud SQL instance.
     *
     * @alias sql.instances.restart
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance to be restarted.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    restart: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/restart',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.restoreBackup
     *
     * @desc Restores a backup of a Cloud SQL instance.
     *
     * @alias sql.instances.restoreBackup
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.backupConfiguration - The identifier of the backup configuration. This gets generated automatically when a backup configuration is created.
     * @param  {string} params.dueTime - The start time of the four-hour backup window. The backup can occur any time in the window. The time is in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    restoreBackup: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/restoreBackup',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project', 'instance', 'backupConfiguration', 'dueTime'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.setRootPassword
     *
     * @desc Sets the password for the root user of the specified Cloud SQL instance.
     *
     * @alias sql.instances.setRootPassword
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    setRootPassword: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/setRootPassword',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.instances.update
     *
     * @desc Updates the settings of a Cloud SQL instance.
     *
     * @alias sql.instances.update
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    update: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.operations = {

    /**
     * sql.operations.get
     *
     * @desc Retrieves information about a specific operation that was performed on a Cloud SQL instance.
     *
     * @alias sql.operations.get
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.operation - Instance operation ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/operations/{operation}',
          method: 'GET'
        },
        params: params,
        requiredParams: ['project', 'instance', 'operation'],
        pathParams: ['instance', 'operation', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.operations.list
     *
     * @desc Lists all operations that have been performed on a Cloud SQL instance.
     *
     * @alias sql.operations.list
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {integer=} params.maxResults - Maximum number of operations per response.
     * @param  {string=} params.pageToken - A previously-returned page token representing part of the larger set of results to view.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/operations',
          method: 'GET'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.sslCerts = {

    /**
     * sql.sslCerts.delete
     *
     * @desc Deletes an SSL certificate from a Cloud SQL instance.
     *
     * @alias sql.sslCerts.delete
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance to be deleted.
     * @param  {string} params.sha1Fingerprint - Sha1 FingerPrint.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    delete: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}',
          method: 'DELETE'
        },
        params: params,
        requiredParams: ['project', 'instance', 'sha1Fingerprint'],
        pathParams: ['instance', 'project', 'sha1Fingerprint'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.sslCerts.get
     *
     * @desc Retrieves an SSL certificate as specified by its SHA-1 fingerprint.
     *
     * @alias sql.sslCerts.get
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project that contains the instance.
     * @param  {string} params.sha1Fingerprint - Sha1 FingerPrint.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}',
          method: 'GET'
        },
        params: params,
        requiredParams: ['project', 'instance', 'sha1Fingerprint'],
        pathParams: ['instance', 'project', 'sha1Fingerprint'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.sslCerts.insert
     *
     * @desc Creates an SSL certificate and returns the certificate, the associated private key, and the server certificate authority.
     *
     * @alias sql.sslCerts.insert
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project to which the newly created Cloud SQL instances should belong.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    insert: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/sslCerts',
          method: 'POST'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * sql.sslCerts.list
     *
     * @desc Lists all of the current SSL certificates defined for a Cloud SQL instance.
     *
     * @alias sql.sslCerts.list
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.instance - Cloud SQL instance ID. This does not include the project ID.
     * @param  {string} params.project - Project ID of the project for which to list Cloud SQL instances.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/instances/{instance}/sslCerts',
          method: 'GET'
        },
        params: params,
        requiredParams: ['project', 'instance'],
        pathParams: ['instance', 'project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.tiers = {

    /**
     * sql.tiers.list
     *
     * @desc Lists service tiers that can be used to create Google Cloud SQL instances.
     *
     * @alias sql.tiers.list
     * @memberOf! sqladmin(v1beta3)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.project - Project ID of the project for which to list tiers.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/sql/v1beta3/projects/{project}/tiers',
          method: 'GET'
        },
        params: params,
        requiredParams: ['project'],
        pathParams: ['project'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };
}

/**
 * Exports Sqladmin object
 * @type Sqladmin
 */
module.exports = Sqladmin;


text:
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "StandaloneRendererPrivate.h"
#include "IOS/SlateOpenGLESView.h"
#include "IOSAppDelegate.h"
#include "IOS/IOSInputInterface.h"

@implementation SlateOpenGLESView

@synthesize Context;

- (id)initWithFrame:(CGRect)FrameRect
{
	if ((self = [super initWithFrame:FrameRect]))
	{
		self.opaque = NO;
		self.backgroundColor = [UIColor redColor];
	}
	return self;
}

/**
 * Pass touch events to the input queue for slate to pull off of, and trigger the debug console.
 *
 * @param View The view the event happened in
 * @param Touches Set of touch events from the OS
 */
void HandleSlateAppTouches(UIView* View, NSSet* Touches, TouchType Type)
{
	// ignore touches until game is booted
	SlateOpenGLESView* GLView = static_cast<SlateOpenGLESView*>( View );
	CGFloat Scale = [[UIScreen mainScreen] scale];

	TArray<TouchInput> TouchesArray;
	for (UITouch* Touch in Touches)
	{
		// get info from the touch
		CGPoint Loc = [Touch locationInView:View];
		CGPoint PrevLoc = [Touch previousLocationInView:View];

		//@todo zombie - Get the actual Controller ID, and touch pad index. Also, figure out how to deal with touch phases.
		TouchInput TouchMessage;
		TouchMessage.Handle = (int)Touch;
		TouchMessage.Type = Type;
		TouchMessage.Position = FVector2D(Loc.x, Loc.y) * Scale;
		TouchMessage.LastPosition = FVector2D(PrevLoc.x, PrevLoc.y) * Scale;
		TouchesArray.Add(TouchMessage);
	}

	FIOSInputInterface::QueueTouchInput(TouchesArray);
}

/**
 * Handle the various touch types from the OS
 *
 * @param touches Array of touch events
 * @param event Event information
 */
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
	HandleSlateAppTouches(self, touches, TouchBegan);
}

- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event
{
	HandleSlateAppTouches(self, touches, TouchMoved);
}

- (void) touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
{
	HandleSlateAppTouches(self, touches, TouchEnded);
}

- (void) touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event
{
	HandleSlateAppTouches(self, touches, TouchEnded);
}

@end

@implementation SlateOpenGLESViewController

/**
 * The ViewController was created, so now we need to create our view to be controlled (an EAGLView)
 */
- (void) loadView
{
	// get the landcape size of the screen
	CGRect Frame = [[UIScreen mainScreen] bounds];
	EAGLContext* Context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES2];
	SlateOpenGLESView* View = [[SlateOpenGLESView alloc] initWithFrame:Frame context:Context];
	self.view = View;

	// pass ownership to the view
	View.Context = Context;
	[Context release];

	// settings copied from InterfaceBuilder
	self.wantsFullScreenLayout = YES;
	self.view.clearsContextBeforeDrawing = NO;
	self.view.multipleTouchEnabled = NO;
	((GLKView*)self.view).enableSetNeedsDisplay = YES;
}

/**
 * Tell the OS that our view controller can auto-rotate between the two landscape modes
 */
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
	return YES;
}

@end

redpajama_set_name: RedPajamaGithub


text:
enum cef_dom_node_type_t CEF_CALLBACK domnode_get_type(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return DOM_NODE_TYPE_UNSUPPORTED;

  // Execute
  cef_dom_node_type_t _retval = CefDOMNodeCppToC::Get(self)->GetType();

  // Return type: simple
  return _retval;
}

int CEF_CALLBACK domnode_is_text(struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefDOMNodeCppToC::Get(self)->IsText();

  // Return type: bool
  return _retval;
}

int CEF_CALLBACK domnode_is_element(struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefDOMNodeCppToC::Get(self)->IsElement();

  // Return type: bool
  return _retval;
}

int CEF_CALLBACK domnode_is_form_control_element(struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefDOMNodeCppToC::Get(self)->IsFormControlElement();

  // Return type: bool
  return _retval;
}

cef_string_userfree_t CEF_CALLBACK domnode_get_form_control_element_type(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefString _retval = CefDOMNodeCppToC::Get(self)->GetFormControlElementType();

  // Return type: string
  return _retval.DetachToUserFree();
}

int CEF_CALLBACK domnode_is_same(struct _cef_domnode_t* self,
    struct _cef_domnode_t* that) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;
  // Verify param: that; type: refptr_same
  DCHECK(that);
  if (!that)
    return 0;

  // Execute
  bool _retval = CefDOMNodeCppToC::Get(self)->IsSame(
      CefDOMNodeCppToC::Unwrap(that));

  // Return type: bool
  return _retval;
}

cef_string_userfree_t CEF_CALLBACK domnode_get_name(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefString _retval = CefDOMNodeCppToC::Get(self)->GetName();

  // Return type: string
  return _retval.DetachToUserFree();
}

cef_string_userfree_t CEF_CALLBACK domnode_get_value(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefString _retval = CefDOMNodeCppToC::Get(self)->GetValue();

  // Return type: string
  return _retval.DetachToUserFree();
}

int CEF_CALLBACK domnode_set_value(struct _cef_domnode_t* self,
    const cef_string_t* value) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;
  // Verify param: value; type: string_byref_const
  DCHECK(value);
  if (!value)
    return 0;

  // Execute
  bool _retval = CefDOMNodeCppToC::Get(self)->SetValue(
      CefString(value));

  // Return type: bool
  return _retval;
}

cef_string_userfree_t CEF_CALLBACK domnode_get_as_markup(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefString _retval = CefDOMNodeCppToC::Get(self)->GetAsMarkup();

  // Return type: string
  return _retval.DetachToUserFree();
}

cef_domdocument_t* CEF_CALLBACK domnode_get_document(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefDOMDocument> _retval = CefDOMNodeCppToC::Get(self)->GetDocument(
      );

  // Return type: refptr_same
  return CefDOMDocumentCppToC::Wrap(_retval);
}

struct _cef_domnode_t* CEF_CALLBACK domnode_get_parent(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(self)->GetParent();

  // Return type: refptr_same
  return CefDOMNodeCppToC::Wrap(_retval);
}

struct _cef_domnode_t* CEF_CALLBACK domnode_get_previous_sibling(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(
      self)->GetPreviousSibling();

  // Return type: refptr_same
  return CefDOMNodeCppToC::Wrap(_retval);
}

struct _cef_domnode_t* CEF_CALLBACK domnode_get_next_sibling(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(self)->GetNextSibling();

  // Return type: refptr_same
  return CefDOMNodeCppToC::Wrap(_retval);
}

int CEF_CALLBACK domnode_has_children(struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefDOMNodeCppToC::Get(self)->HasChildren();

  // Return type: bool
  return _retval;
}

struct _cef_domnode_t* CEF_CALLBACK domnode_get_first_child(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(self)->GetFirstChild();

  // Return type: refptr_same
  return CefDOMNodeCppToC::Wrap(_retval);
}

struct _cef_domnode_t* CEF_CALLBACK domnode_get_last_child(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(self)->GetLastChild();

  // Return type: refptr_same
  return CefDOMNodeCppToC::Wrap(_retval);
}

void CEF_CALLBACK domnode_add_event_listener(struct _cef_domnode_t* self,
    const cef_string_t* eventType, struct _cef_domevent_listener_t* listener,
    int useCapture) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: eventType; type: string_byref_const
  DCHECK(eventType);
  if (!eventType)
    return;
  // Verify param: listener; type: refptr_diff
  DCHECK(listener);
  if (!listener)
    return;

  // Execute
  CefDOMNodeCppToC::Get(self)->AddEventListener(
      CefString(eventType),
      CefDOMEventListenerCToCpp::Wrap(listener),
      useCapture?true:false);
}

cef_string_userfree_t CEF_CALLBACK domnode_get_element_tag_name(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefString _retval = CefDOMNodeCppToC::Get(self)->GetElementTagName();

  // Return type: string
  return _retval.DetachToUserFree();
}

int CEF_CALLBACK domnode_has_element_attributes(struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefDOMNodeCppToC::Get(self)->HasElementAttributes();

  // Return type: bool
  return _retval;
}

int CEF_CALLBACK domnode_has_element_attribute(struct _cef_domnode_t* self,
    const cef_string_t* attrName) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;
  // Verify param: attrName; type: string_byref_const
  DCHECK(attrName);
  if (!attrName)
    return 0;

  // Execute
  bool _retval = CefDOMNodeCppToC::Get(self)->HasElementAttribute(
      CefString(attrName));

  // Return type: bool
  return _retval;
}

cef_string_userfree_t CEF_CALLBACK domnode_get_element_attribute(
    struct _cef_domnode_t* self, const cef_string_t* attrName) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;
  // Verify param: attrName; type: string_byref_const
  DCHECK(attrName);
  if (!attrName)
    return NULL;

  // Execute
  CefString _retval = CefDOMNodeCppToC::Get(self)->GetElementAttribute(
      CefString(attrName));

  // Return type: string
  return _retval.DetachToUserFree();
}

void CEF_CALLBACK domnode_get_element_attributes(struct _cef_domnode_t* self,
    cef_string_map_t attrMap) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: attrMap; type: string_map_single_byref
  DCHECK(attrMap);
  if (!attrMap)
    return;

  // Translate param: attrMap; type: string_map_single_byref
  std::map<CefString, CefString> attrMapMap;
  transfer_string_map_contents(attrMap, attrMapMap);

  // Execute
  CefDOMNodeCppToC::Get(self)->GetElementAttributes(
      attrMapMap);

  // Restore param: attrMap; type: string_map_single_byref
  cef_string_map_clear(attrMap);
  transfer_string_map_contents(attrMapMap, attrMap);
}

int CEF_CALLBACK domnode_set_element_attribute(struct _cef_domnode_t* self,
    const cef_string_t* attrName, const cef_string_t* value) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;
  // Verify param: attrName; type: string_byref_const
  DCHECK(attrName);
  if (!attrName)
    return 0;
  // Verify param: value; type: string_byref_const
  DCHECK(value);
  if (!value)
    return 0;

  // Execute
  bool _retval = CefDOMNodeCppToC::Get(self)->SetElementAttribute(
      CefString(attrName),
      CefString(value));

  // Return type: bool
  return _retval;
}

cef_string_userfree_t CEF_CALLBACK domnode_get_element_inner_text(
    struct _cef_domnode_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefString _retval = CefDOMNodeCppToC::Get(self)->GetElementInnerText();

  // Return type: string
  return _retval.DetachToUserFree();
}

// CONSTRUCTOR - Do not edit by hand.

CefDOMNodeCppToC::CefDOMNodeCppToC(CefDOMNode* cls)
    : CefCppToC<CefDOMNodeCppToC, CefDOMNode, cef_domnode_t>(cls) {
  struct_.struct_.get_type = domnode_get_type;
  struct_.struct_.is_text = domnode_is_text;
  struct_.struct_.is_element = domnode_is_element;
  struct_.struct_.is_form_control_element = domnode_is_form_control_element;
  struct_.struct_.get_form_control_element_type =
      domnode_get_form_control_element_type;
  struct_.struct_.is_same = domnode_is_same;
  struct_.struct_.get_name = domnode_get_name;
  struct_.struct_.get_value = domnode_get_value;
  struct_.struct_.set_value = domnode_set_value;
  struct_.struct_.get_as_markup = domnode_get_as_markup;
  struct_.struct_.get_document = domnode_get_document;
  struct_.struct_.get_parent = domnode_get_parent;
  struct_.struct_.get_previous_sibling = domnode_get_previous_sibling;
  struct_.struct_.get_next_sibling = domnode_get_next_sibling;
  struct_.struct_.has_children = domnode_has_children;
  struct_.struct_.get_first_child = domnode_get_first_child;
  struct_.struct_.get_last_child = domnode_get_last_child;
  struct_.struct_.add_event_listener = domnode_add_event_listener;
  struct_.struct_.get_element_tag_name = domnode_get_element_tag_name;
  struct_.struct_.has_element_attributes = domnode_has_element_attributes;
  struct_.struct_.has_element_attribute = domnode_has_element_attribute;
  struct_.struct_.get_element_attribute = domnode_get_element_attribute;
  struct_.struct_.get_element_attributes = domnode_get_element_attributes;
  struct_.struct_.set_element_attribute = domnode_set_element_attribute;
  struct_.struct_.get_element_inner_text = domnode_get_element_inner_text;
}

#ifndef NDEBUG
template<> long CefCppToC<CefDOMNodeCppToC, CefDOMNode,
    cef_domnode_t>::DebugObjCt = 0;
#endif


text:
namespace opencv_test
{

TEST(GStreamerPipelineFacadeTest, GetElsByFactoryNameUnitTest)
{
    auto comparator = [](GstElement* element, const std::string& factoryName) {
        cv::gapi::wip::gst::GStreamerPtr<gchar> name(
            gst_object_get_name(GST_OBJECT(gst_element_get_factory(element))));
        return name && (0 == strcmp(name, factoryName.c_str()));
    };

    cv::gapi::wip::gst::GStreamerPipelineFacade
        pipelineFacade("videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink1 "
                       "videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink2");

    auto videotestsrcs = pipelineFacade.getElementsByFactoryName("videotestsrc");
    EXPECT_EQ(2u, videotestsrcs.size());
    for (auto&& src : videotestsrcs) {
        EXPECT_TRUE(comparator(src, "videotestsrc"));
    }

    auto appsinks = pipelineFacade.getElementsByFactoryName("appsink");
    EXPECT_EQ(2u, appsinks.size());
    for (auto&& sink : appsinks) {
        EXPECT_TRUE(comparator(sink, "appsink"));
    }
}

TEST(GStreamerPipelineFacadeTest, GetElByNameUnitTest)
{
    auto comparator = [](GstElement* element, const std::string& elementName) {
        cv::gapi::wip::gst::GStreamerPtr<gchar> name(gst_element_get_name(element));
        return name && (0 == strcmp(name, elementName.c_str()));
    };

    cv::gapi::wip::gst::GStreamerPipelineFacade
        pipelineFacade("videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink1 "
                       "videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink2");

    auto appsink1 = pipelineFacade.getElementByName("sink1");
    GAPI_Assert(appsink1 != nullptr);
    EXPECT_TRUE(comparator(appsink1, "sink1"));
    auto appsink2 = pipelineFacade.getElementByName("sink2");
    GAPI_Assert(appsink2 != nullptr);
    EXPECT_TRUE(comparator(appsink2, "sink2"));
}

TEST(GStreamerPipelineFacadeTest, CompletePrerollUnitTest)
{
    cv::gapi::wip::gst::GStreamerPipelineFacade
        pipelineFacade("videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink1 "
                       "videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink2");

    auto appsink = pipelineFacade.getElementByName("sink1");
    pipelineFacade.completePreroll();

    cv::gapi::wip::gst::GStreamerPtr<GstSample> prerollSample(
#if GST_VERSION_MINOR >= 10
            gst_app_sink_try_pull_preroll(GST_APP_SINK(appsink), 5 * GST_SECOND)
#else // GST_VERSION_MINOR < 10
            // TODO: This function may cause hang with some pipelines, need to check whether these
            // pipelines are really wrong or not?
            gst_app_sink_pull_preroll(GST_APP_SINK(appsink))
#endif // GST_VERSION_MINOR >= 10
                                                             );
    GAPI_Assert(prerollSample != nullptr);
}

TEST(GStreamerPipelineFacadeTest, PlayUnitTest)
{
    cv::gapi::wip::gst::GStreamerPipelineFacade
        pipelineFacade("videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink1 "
                       "videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink2");

    auto appsink = pipelineFacade.getElementByName("sink2");

    pipelineFacade.play();

    cv::gapi::wip::gst::PipelineState state;
    GstStateChangeReturn status =
        gst_element_get_state(appsink, &state.current, &state.pending, 5 * GST_SECOND);
    EXPECT_EQ(GST_STATE_CHANGE_SUCCESS, status);
    EXPECT_EQ(GST_STATE_PLAYING, state.current);
    EXPECT_EQ(GST_STATE_VOID_PENDING, state.pending);
}

TEST(GStreamerPipelineFacadeTest, IsPlayingUnitTest)
{
    cv::gapi::wip::gst::GStreamerPipelineFacade
        pipelineFacade("videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink1 "
                       "videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink2");

    EXPECT_EQ(false, pipelineFacade.isPlaying());
    pipelineFacade.play();
    EXPECT_EQ(true, pipelineFacade.isPlaying());
}

TEST(GStreamerPipelineFacadeTest, MTSafetyUnitTest)
{
    cv::gapi::wip::gst::GStreamerPipelineFacade
        pipelineFacade("videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink1 "
                       "videotestsrc is-live=true pattern=colors num-buffers=10 ! "
                       "videorate ! videoscale ! "
                       "video/x-raw,width=1920,height=1080,framerate=3/1 ! "
                       "appsink name=sink2");

    auto prerollRoutine = [&pipelineFacade](){ pipelineFacade.completePreroll(); };
    auto playRoutine = [&pipelineFacade](){ pipelineFacade.play(); };
    auto isPlayingRoutine = [&pipelineFacade](){ pipelineFacade.isPlaying(); };

    using f = std::function<void()>;

    auto routinesLauncher = [](const f& r1, const f& r2, const f& r3) {
        std::vector<f> routines { r1, r2, r3 };
        std::vector<std::thread> threads { };

        for (auto&& r : routines) {
            threads.emplace_back(r);
        }

        for (auto&& t : threads) {
            t.join();
        }
    };

    routinesLauncher(prerollRoutine, playRoutine, isPlayingRoutine);
    routinesLauncher(prerollRoutine, isPlayingRoutine, playRoutine);
    routinesLauncher(isPlayingRoutine, prerollRoutine, playRoutine);
    routinesLauncher(playRoutine, prerollRoutine, isPlayingRoutine);
    routinesLauncher(playRoutine, isPlayingRoutine, prerollRoutine);
    routinesLauncher(isPlayingRoutine, playRoutine, prerollRoutine);

    EXPECT_TRUE(true);
}
} // namespace opencv_test

#endif // HAVE_GSTREAMER


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/openbmp-www.iml" filepath="$PROJECT_DIR$/.idea/openbmp-www.iml" />
    </modules>
  </component>
</project>


text:
@interface ICUserTableHeaderView : UIView

@property (nonatomic, strong) UIImageView* headImageView;
@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) UILabel *seniorityLabel;

@end


text:
package com.gta.hfdcs.base;

import com.datastax.driver.core.*;
import com.datastax.driver.core.exceptions.*;
import com.datastax.driver.core.Cluster.Builder;
import com.gta.hfdcs.json2dict.JSON2DICT;

import java.sql.*;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import net.sf.json.JSONArray;

public class BaseTask {
	private Cluster cluster;
	private JSON2DICT task_config;
	public Session session;
	public Buffer buffer;
	public Connection connect;
	private Logger logger = LogManager.getLogger(BaseTask.class);

	public BaseTask(JSON2DICT task_config) {
		this.task_config = task_config;
		if (this.task_config.containsKey("cassandra.keyspace")) {
			init_cassandra();
		}
		if (this.task_config.containsKey("buffer.memcache_hosts")) {
			init_buffer();
		}

		if (this.task_config.containsKey("mysql")) {
			initMysql();
		}

	}

	// ¶ÁÈ¡ÅäÖÃÎļþ£¬³õ'»¯cassandraÁ¬½Ó
	public void init_cassandra() {

		try {
			JSONArray hosts = (JSONArray) this.task_config
					.getValue("cassandra.hosts");

			String user_name = (String) this.task_config
					.getValue("cassandra.db_user_name");
			String user_password = (String) this.task_config
					.getValue("cassandra.db_user_password");

			Builder builder = Cluster.builder();

			// Ìí¼Ó½Úµã
			for (int i = 0; i < hosts.size(); i++) {
				builder.addContactPoint((String) hosts.get(i));
			}

			cluster = builder.withCredentials(user_name, user_password).build();
			session = cluster.connect();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			logger.error("Á¬½Ócassandra³ö´í");
			logger.error(e);
			e.printStackTrace();
		}

	}

	// ¶ÁÈ¡ÅäÖÃÎļþ£¬³õ'»¯redisÁ¬½Ó
	public void init_buffer() {
		String memcache_hosts = (String) this.task_config
				.getValue("buffer.memcache_hosts");
		buffer = new Buffer(memcache_hosts);
	}

	public void initMysql(){
		// JSONObject mysql_jo = this.task_config.getJSONObject("mysql");
		String hosts = (String) this.task_config.getValue("mysql.hosts");
		String db_name = (String) this.task_config.getValue("mysql.db");
		String url = "jdbc:mysql://" + hosts + ":3306/" + db_name;

		String user = (String) this.task_config.getValue("mysql.db_user_name");
		String password = (String) this.task_config
				.getValue("mysql.db_user_password");
		try {
			connect = DriverManager.getConnection(url, user, password);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			logger.error("Á¬½Ómysql³ö´í");
			logger.error(e);
			e.printStackTrace();
		}
	}

	public void stop() {
		if (this.task_config.containsKey("cassandra") && cluster != null) {
			cluster.close();
		}

		if (this.task_config.containsKey("buffer") && buffer != null) {
			buffer.close();
		}

		if (this.task_config.containsKey("mysql") && connect != null) {
			try {
				connect.close();
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				logger.error("mysql connect error");
				logger.error(e);
				e.printStackTrace();
			}
		}

	}
}


text:
var Media = require('..');
var userMedia = new Media({ start: true });

userMedia.render(document.body);


text:
Toto je hlavný template.

<?php $this->load->view($content_view); ?>


text:
package apps::pfsense::snmp::plugin;

use strict;
use warnings;
use base qw(centreon::plugins::script_snmp);

sub new {
    my ($class, %options) = @_;
    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
    bless $self, $class;

    $self->{version} = '0.1';
    $self->{modes} = {
        'list-pfinterfaces' => 'apps::pfsense::snmp::mode::listpfinterfaces',
        'packet-stats'      => 'apps::pfsense::snmp::mode::packetstats',
        'pfinterfaces'      => 'apps::pfsense::snmp::mode::pfinterfaces',
        'runtime'           => 'apps::pfsense::snmp::mode::runtime'
    };

    return $self;
}

1;

__END__

=head1 PLUGIN DESCRIPTION

Check pfSense in SNMP.

=cut


text:
<?php
/**
 * Created by PhpStorm.
 * User: chen
 * Date: 26.09.2015
 * Time: 11:48
 */

namespace NovaPoshtaAddress\Models\Objects;

class AreasObject
{
    private $Areas = [];

    public function addArea(AreaObject $area)
    {
        $this->Areas[$area->Ref] = $area;
    }

    /**
     * @param $ref
     * @return null|AreaObject
     */
    public function getArea($ref)
    {
        return isset($this->Areas[$ref]) ? $this->Areas[$ref] : null;
    }

    public function getAreas()
    {
        return $this->Areas;
    }
}


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

namespace AdaptHotel.views.Error
{
    public partial class Erro_404 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}


text: RAM


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:support="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/layoutRoot"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    android:orientation="vertical">

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/background"
        android:orientation="vertical">

        <include layout="@layout/include_friends_search_center" />

        <!--<LinearLayout-->
        <!--android:id="@+id/searchFriends"-->
        <!--android:layout_width="match_parent"-->
        <!--android:layout_height="45dp"-->
        <!--android:background="@color/transparent"-->
        <!--android:gravity="center"-->
        <!--android:orientation="horizontal">-->

        <!--<LinearLayout-->
        <!--android:layout_width="match_parent"-->
        <!--android:layout_height="30dp"-->
        <!--android:layout_marginLeft="21dp"-->
        <!--android:layout_marginRight="21dp"-->
        <!--android:background="@color/white"-->
        <!--android:gravity="center_vertical"-->
        <!--android:orientation="horizontal">-->

        <!--<TextView-->
        <!--android:layout_width="wrap_content"-->
        <!--android:layout_height="wrap_content"-->
        <!--android:layout_marginLeft="9dp"-->
        <!--android:drawableLeft="@drawable/bg_round_long_red"-->
        <!--android:drawablePadding="5dp"-->
        <!--android:gravity="center"-->
        <!--android:text="@string/add_friends_by_name"-->
        <!--android:textColor="@color/text_hint"-->
        <!--android:textSize="@dimen/text_size_3" />-->
        <!--</LinearLayout>-->
        <!--</LinearLayout>-->

        <TextView
            android:layout_width="match_parent"
            android:layout_height="32dp"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:paddingLeft="@dimen/content_border"
            android:text="@string/maybe_know_friends"
            android:textColor="@color/text_hint"
            android:textSize="@dimen/text_size_2" />

        <include layout="@layout/include_line" />

        <com.youzu.clan.base.widget.list.RefreshListView
            android:id="@+id/listView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/white"
            android:cacheColorHint="@color/transparent"
            android:divider="@null"
            android:listSelector="@drawable/selector_list_item"
            android:overScrollMode="never"
            android:scrollbars="none" />
    </LinearLayout>
</LinearLayout>


text:
using Microsoft.Xunit.Performance;
using System;
using System.Numerics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Reflection;
using System.Collections.Generic;
using Xunit;

[assembly: OptimizeForBenchmarks]
[assembly: MeasureInstructionsRetired]

public static class SeekUnroll
{

    // The purpose of this micro-benchmark is to measure the effect of unrolling
    // on this loop (taken from https://github.com/aspnet/KestrelHttpServer/pull/1138)
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    static int FindByte(ref Vector<byte> byteEquals)
    {
        var vector64 = Vector.AsVectorInt64(byteEquals);
        long longValue = 0;
        var i = 0;
        for (; i < Vector<long>.Count; i++)
        {
            longValue = vector64[i];
            if (longValue == 0) continue;
            break;
        }

        // Flag least significant power of two bit
        var powerOfTwoFlag = (ulong)(longValue ^ (longValue - 1));
        // Shift all powers of two into the high byte and extract
        var foundByteIndex = (int)((powerOfTwoFlag * _xorPowerOfTwoToHighByte) >> 57);
        // Single LEA instruction with jitted const (using function result)
        return i * 8 + foundByteIndex;
    }

    // Magic constant used in FindByte
    const ulong _xorPowerOfTwoToHighByte = (0x07ul |
                                            0x06ul << 8 |
                                            0x05ul << 16 |
                                            0x04ul << 24 |
                                            0x03ul << 32 |
                                            0x02ul << 40 |
                                            0x01ul << 48) + 1;

    // Inner loop to repeatedly call FindByte
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    static void InnerLoop(ref int foundIndex, ref Vector<Byte> vector)
    {
        for (int i = 0; i < InnerIterations; i++)
        {
            foundIndex = FindByte(ref vector);
        }
    }

    // Iteration counts for inner loop set to have each call take 1 or
    // 2 seconds or so in release, finish quickly in debug.
#if DEBUG
    static int InnerIterations = 1;
#else
    static int InnerIterations = 1000000000;
#endif

    // Function to meaure InnerLoop using the xunit-perf benchmark measurement facilities
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    static void XunitBenchmarkLoop(ref int foundIndex, ref Vector<Byte> vector)
    {
        foreach (var iteration in Benchmark.Iterations)
        {
            using (iteration.StartMeasurement())
            {
                InnerLoop(ref foundIndex, ref vector);
            }
        }
    }

    // Function to measure InnerLoop with manual use of a stopwatch timer
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    static void ManualTimerLoop(ref int foundIndex, ref Vector<Byte> vector)
    {
        for (int iteration = 0; iteration < ManualLoopTimes.Length; ++iteration)
        {
            var timer = System.Diagnostics.Stopwatch.StartNew();
            InnerLoop(ref foundIndex, ref vector);
            timer.Stop();
            ManualLoopTimes[iteration] = timer.ElapsedMilliseconds;
        }
    }
    static long[] ManualLoopTimes;

    // Function that tests one input, dispatching to either the xunit-perf
    // loop or the manual timer loop
    static bool Test(int index, bool isXunitBenchmark)
    {
        if (index >= Vector<Byte>.Count)
        {
            // FindByte assumes index is in range
            index = 0;
        }
        var bytes = new Byte[Vector<Byte>.Count];
        bytes[index] = 255;
        Vector<Byte> vector = new Vector<Byte>(bytes);

        int foundIndex = -1;

        if (isXunitBenchmark)
        {
            XunitBenchmarkLoop(ref foundIndex, ref vector);
        }
        else
        {
            ManualTimerLoop(ref foundIndex, ref vector);
        }

        Assert.Equal(index, foundIndex);
        return (index == foundIndex);
    }

    // Set of indices to pass to Test(int, bool)
    static int[] IndicesToTest = new int[] { 1, 3, 11, 19, 27 };

    // Entrypoint for xunit-perf to call the benchmark
    [Benchmark]
    [MemberData(nameof(ArrayedBoxedIndicesToTest))]
    public static bool Test(object boxedIndex)
    {
        return Test((int)boxedIndex, true);
    }

    // IndicesToTest wrapped up in arrays of boxes since that's
    // what xunit-perf needs
    public static IEnumerable<object[]> ArrayedBoxedIndicesToTest =
        IndicesToTest.Select((int index) => new object[] { index });

    // Main method entrypoint runs the manual timer loop
    public static int Main(string[] args)
    {
        int failures = 0;

        // On non-hardware accelerated platforms, the test times out because it runs for too long.
        // In those cases, we decrease InnerIterations so the test doesn't time out.
        if (!Vector.IsHardwareAccelerated)
        {
            InnerIterations = 100000;
        }

        int manualLoopCount = 1;
        if (args == null || args.Length == 0)
        {
            Console.WriteLine("Warning: no iteration count specified; defaulting to 1 iteration per case");
            Console.WriteLine("To use multiple iterations per case, pass the desired number of iterations as the first command-line argument to this test");
        }
        else
        {
            manualLoopCount = int.Parse(args[0]);
        }

        foreach(int index in IndicesToTest)
        {
            ManualLoopTimes = new long[manualLoopCount];
            bool passed = Test(index, false);
            if (!passed)
            {
                ++failures;
            }
            Console.WriteLine("Index {0}, times (ms) [{1}]", index, String.Join(", ", ManualLoopTimes));
        }

        return 100 + failures;
    }
}


text:
import Ember from 'ember';
import layout from '../templates/components/yebo-checkout';

/**
  A single page checkout that reactively responds to changes in the
  `yebo.checkouts` service.

 **To Override:** You'll need to run the components generator:

 ```bash
 ember g yebo-ember-storefront-components
 ```

 This will install all of the Yebo Ember Storefront component files into your
 host application at `app/components/yebo-*.js`, ready to be extended or
 overriden.

 @class YeboCheckout
 @namespace Component
 @extends Ember.Component
 */
export default Ember.Component.extend({
  layout: layout,
  action: 'transitionCheckoutState',
  checkoutLoading: false,

  orderDidChange: Ember.on('init', Ember.observer('yebo.currentOrder', function() {
    if(this.get("yebo.currentOrder.lineItems.length") >= 1) {
      this.get('yebo').get('checkouts').trigger('checkoutCalled');
    } else {
      console.log('cart is empty');
    }
  })),

  init() {
    this._super();

    this.get('yebo').on('checkoutStarted', () => {
      this.set("checkoutLoading", true);
    });

    this.get('yebo').on('checkoutEnded', () => {
      this.set("checkoutLoading", false);
    });
  },

  actions: {
    transitionCheckoutState: function(stateName) {
      this.sendAction('action', stateName);
    },
    setShipment: function(rateId) {
      // Trigger the event
      this.get('yebo').get('checkouts').trigger('setShipment', rateId);
    },
    checkout: function() {
      // Trigger the event
      this.get('yebo').get('checkouts').trigger('checkout');
    },
    editAddress: function(name) {
      // Trigger the event
      this.get('yebo').get('checkouts').trigger('editAddress', name);
    },
    cancel: function(){
      this.get('yebo').get('checkouts').set('editAddress', null);
    },
    loading: function(state) {
      this.set("checkoutLoading", state);
    }
  }
});


text:
<plugin>
  <name>goom</name>
  <description>GOOM visualization filter</description>
  <filename>../../gst/goom/.libs/libgstgoom.so</filename>
  <basename>libgstgoom.so</basename>
  <version>1.16.2</version>
  <license>LGPL</license>
  <source>gst-plugins-good</source>
  <package>GStreamer Good Plug-ins source release</package>
  <origin>Unknown package origin</origin>
  <elements>
    <element>
      <name>goom</name>
      <longname>GOOM: what a GOOM!</longname>
      <class>Visualization</class>
      <description>Takes frames of data and outputs video frames using the GOOM filter</description>
      <author>Wim Taymans <wim@fluendo.com></author>
      <pads>
        <caps>
          <name>sink</name>
          <direction>sink</direction>
          <presence>always</presence>
          audio/x-raw, format=(string)S16LE, rate=(int)[ 8000, 96000 ], channels=(int)1, layout=(string)interleaved; audio/x-raw, format=(string)S16LE, rate=(int)[ 8000, 96000 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003, layout=(string)interleaved
        </caps>
        <caps>
          <name>src</name>
          <direction>source</direction>
          <presence>always</presence>
          video/x-raw, format=(string)BGRx, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
        </caps>
      </pads>
    </element>
  </elements>
</plugin>


text:
require 'patina/collections/mongo/collection_builder'

RSpec.describe Patina::Collections::Mongo::CollectionBuilder do
  let(:mongo_client) { Spec.mongo_client }
  let(:collection_class) do
    Patina::Collections::Mongo::Collection
  end # let
  let(:collection_type) { :resources }
  let(:instance) do
    described_class.new collection_type, mongo_client
  end # let

  describe '::new' do
    it { expect(described_class).to be_constructible.with(2).arguments }
  end # describe

  describe '#build' do
    it { expect(instance).to respond_to(:build).with(0).arguments }

    it 'should build a collection' do
      collection       = instance.build
      mongo_collection = mongo_client[collection_type.to_s]

      expect(collection).to be_a collection_class
      expect(collection.name).to be == collection_type.to_s
      expect(collection.mongo_collection).to be == mongo_collection
    end # it

    context 'when the collection type is a denormalized collection name' do
      let(:collection_type) { 'Resource' }

      it 'should build a collection' do
        collection       = instance.build
        mongo_collection = mongo_client['resources']

        expect(collection.mongo_collection).to be == mongo_collection
      end # it
    end # context

    context 'when the collection type is a named resource' do
      example_class 'Spec::Resource'

      let(:collection_type) { Spec::Resource }

      it 'should build a collection' do
        collection       = instance.build
        mongo_collection = mongo_client['spec.resources']

        expect(collection.mongo_collection).to be == mongo_collection
      end # it
    end # context
  end # describe

  describe '#collection_class' do
    include_examples 'should have reader', :collection_class,
      ->() { collection_class }
  end # describe

  describe '#collection_name' do
    include_examples 'should have reader',
      :collection_name,
      ->() { be == collection_type.to_s }

    context 'when the collection type is a denormalized collection name' do
      let(:collection_type) { 'Resource' }

      it { expect(instance.collection_name).to be == 'resources' }
    end # context

    context 'when the collection type is a named resource' do
      example_class 'Spec::Resource'

      let(:collection_type) { Spec::Resource }

      it { expect(instance.collection_name).to be == 'spec.resources' }
    end # context
  end # describe

  describe '#collection_type' do
    include_examples 'should have reader', :collection_type,
      ->() { be == collection_type }
  end # describe
end # describe


text:
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { DomSanitizer } from '@angular/platform-browser';
import { TableViewService } from './table-view.service';
import { ViewModel } from './view.model';

@Component({
  selector: 'app-table-view',
  templateUrl: './table-view.component.html',
  styleUrls: ['./table-view.component.scss'],
  providers: [TableViewService]
})
export class TableViewComponent {

  // 项目ID
  releaseId: string;

  viewModel = ViewModel;

  viewType;

  role;

  rows = [];

  temp = [];

  columns = [];

  selected = [];

  @ViewChild('table') tableEl: any;

  constructor(private route: ActivatedRoute, private router: Router, private service: TableViewService, private sanitizer: DomSanitizer) {

    this.releaseId = sessionStorage.getItem('releaseId');

    this.role = sessionStorage.getItem('userRoleInProject');

    this.viewType = this.route.snapshot.data['type'];

    if (!this.releaseId || !this.role || !this.viewType || !this.viewModel[this.viewType]) {
      this.router.navigate([`/pages/${this.role}/release/view`]);
    } else {
      this.columns = this.viewModel[this.viewType].columns;
      this.initData();
    }

  }

  initData() {
    this.service
      .getViewData(this.releaseId, this.viewModel[this.viewType].url)
      .then(res => {
        if (res.message) {
          this.router.navigate([`/pages/${this.role}/release/view`]);
        }

        res.map(date => {
          date.name = date.title ? date.title : date.name;
        });

        // cache our list
        this.temp = [...res];

        // push our inital complete list
        this.rows = res;
      })
      .catch(err => console.log(err));
  }

  updateFilter(event) {
    const val = event.target.value.toLowerCase();

    // filter our data
    const temp = this.temp.filter(function (d) {
      return d.name.toLowerCase().indexOf(val) !== -1 || !val;
    });

    // update the rows
    this.rows = temp;
    // Whenever the filter changes, always go back to the first page
    this.tableEl.offset = 0;
  }

  toggleExpandRow(row) {
    // console.log('Toggled Expand Row!', row);
    event.stopPropagation();
    this.tableEl.rowDetail.toggleExpandRow(row);
  }

  onDetailToggle(event) {
    // console.log('Detail Toggled', event);
  }

  addItem() {
    this.router.navigate([`/pages/project/${this.viewType}/new`]);
  }

  ViewDetail(event) {
    if (event.type === 'click') {
      // console.log('Activate Event', event);
      this.router.navigate([`/pages/project/${this.viewType}/${event.row.id}`]);
    }
  }

}


text:
require 'mastermind/interact'
require 'mastermind/game_round'
require 'mastermind/player'

module Mastermind
  class PlayGame
    attr_accessor :interact, :instream, :outstream, :command

    def initialize(instream, outstream, interact)
      @instream  = instream
      @outstream = outstream
      @interact  = interact
      @command   = ""
    end

    def run
      outstream.puts interact.print_game_info
      outstream.puts interact.print_game_options
      until quit?
        get_command
        process_command
      end
      outstream.puts interact.print_intro
    end

    def get_command
      outstream.print interact.command_prompt
      self.command = instream.gets.strip.upcase
    end

    def process_command
      case
      when command == "S"
        players = player_gen(1)
        Mastermind::GameRound.new(instream, outstream, interact, players).play
        self.command = "Q"
      when command == "M"
        players = player_gen(2)
        Mastermind::GameRound.new(instream, outstream, interact, players).play
        self.command = "Q"
      when command == "I"
        puts "play-game"
      else                    outstream.puts interact.print_invalid(command)
      end
    end

    def player_gen(num_players)
      players = []
      outstream.puts interact.print_player_intro
      num_players.times do |i|
        name = get_name(i+1)
        players << Player.new(name)
      end
      players
    end

    def get_name(player_no)
      name = ""
      until valid_name?(name)
        outstream.print interact.name_prompt(player_no)
        name = instream.gets.strip
      end
      name
    end

    def valid_name?(name)
      name.length > 0 && name.length < 12
    end

    def quit?
      command == "Q" || command == "QUIT"
    end
  end
end


text:
	<title>Bruce Hawker's panel show appearances</title>

	<link rel="stylesheet" media="all" href="../style.css" type="text/css"/>

Bruce Hawker's panel show appearances

Bruce Hawker

Bruce Hawker (born 1955-08-18[ref]) has appeared in 1 episodes between 2017-2017.  Bruce Hawker on Wikipedia.

2017

2017-10-17 / The Drum


text:
/**
 * DMX utility functions.
 */

#ifndef CR_DMX_H
#define CR_DMX_H

#include <X11/Xlib.h>
#include <X11/extensions/dmxext.h>

#include "cr_spu.h"
#include "state/cr_statetypes.h"

typedef struct {
	GLXDrawable xwin;     /**< backend server's X window */
	GLXDrawable xsubwin;  /**< child of xwin, clipped to screen bounds */
	Display *dpy;         /**< DMX back-end server display */
	CRrecti visrect;      /**< visible rect, in front-end screen coords */
	GLboolean clipToScreen;     /**< Clip back-end windows against screen bounds? */
} CRDMXBackendWindowInfo;

#ifdef __cplusplus
extern "C" {
#endif

extern int
crDMXSupported(Display *dpy);

extern CRDMXBackendWindowInfo *
crDMXAllocBackendWindowInfo(unsigned int numBackendWindows);

extern void
crDMXFreeBackendWindowInfo(unsigned int numBackendWindows,
													 CRDMXBackendWindowInfo *backendWindows);

/* Given the DMX front-end display "dpy" and window "xwin", update the
 * backend window information in "backendWindows".  If new subwindows are
 * needed, and an OpenGL interface pointer is provided, use that interface
 * and the subwindowVisBits to create new subwindows.
 */
extern GLboolean
crDMXGetBackendWindowInfo(Display *dpy, GLXDrawable xwin,
													unsigned int numBackendWindows,
													CRDMXBackendWindowInfo *backendWindows,
													const crOpenGLInterface *openGlInterface,
													GLint subwindowVisBits);

#ifdef __cplusplus
}
#endif

#endif /* CR_DLM_H */


text:
package org.slc.sli.sample.transform;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.slc.sli.sample.entities.AcademicSubjectType;
import org.slc.sli.sample.entities.GradeLevelType;
import org.slc.sli.sample.entities.LearningObjective;
import org.slc.sli.sample.entities.LearningStandardId;
import org.slc.sli.sample.entities.LearningStandardIdentityType;
import org.slc.sli.sample.entities.LearningStandardReferenceType;
import org.slc.sli.sample.transform.CcsCsv2XmlTransformer.LearningStandardResult;

/**
 * @author dliu
 *
 *         Transform the Common Core Standard Math csv to edfi xml
 */
public class CCSMathCSV2XMLTransformer {
    // input csv files
    private static final String ccsCSVFile = "data/CC_Standards_6.25.10-Math.csv";

    // output Ed-Fi xml file
    private static final String interchangeCCSFile = "data/InterchangeAssessmentMetadata-CCS-Math.xml";
    private static final String outputPath = "data/";

    private static String GRADE_LEVELS = "K12345678";
    private static Pattern PATTERN = Pattern.compile("^([^.]+).([^.]+).(.+)");
    public static void main(String[] args) throws Exception {
        CcsCsvReader learningStandardReader = new CcsCsvReader();
        learningStandardReader.setFileLocation(ccsCSVFile);
        learningStandardReader.setContainsCopyright(true);
        learningStandardReader.load();

        CcsCsv2XmlTransformer transformer = new CcsCsv2XmlTransformer();
        transformer.setCcsCsvReader(learningStandardReader);
        transformer.setOutputLocation(interchangeCCSFile);
        transformer.setAcademicSubjectType(AcademicSubjectType.MATHEMATICS);

        // TODO set the learningObjectiveGenerator to handle difference between math and english to
        // build common core standard hierarchy, the code is the same as in english csv to xml
        // transformer and no learningObjective hierarchy is created for now
        transformer.setLearningObjectiveGenerator(new CcsCsv2XmlTransformer.LearningObjectiveGenerator() {
            @Override
            Collection<LearningObjective> generateLearningObjectives(
                    Map<String, Collection<CcsCsv2XmlTransformer.LearningStandardResult>> learningObjectiveIdToLearningStandardResults,
                    Map<String, String> idToGuidMap)
                    throws IOException {
                Collection<LearningObjective> learningObjectives = new ArrayList<LearningObjective>();
                for (String key : learningObjectiveIdToLearningStandardResults.keySet()) {
                    Collection<LearningStandardResult> learningStandardResults = learningObjectiveIdToLearningStandardResults
                            .get(key);
                    LearningObjective learningObjective = new LearningObjective();
                    LearningStandardId learningStandardId = new LearningStandardId();
                    learningStandardId.setIdentificationCode(CcsCsv2XmlTransformer.IdToGuidMapper.getInstance()
                            .getGuid(key));
                    learningObjective.setLearningObjectiveId(learningStandardId);

                    LearningStandardResult firstLearningStandardResult = learningStandardResults.iterator().next();
                    for (LearningStandardResult learningStandardResult : learningStandardResults) {
                        LearningStandardReferenceType learningStandardReferenceType = new LearningStandardReferenceType();
                        LearningStandardIdentityType learningStandardIdentityType = new LearningStandardIdentityType();
                        learningStandardIdentityType.setLearningStandardId(learningStandardResult.getLearningStandard()
                                .getLearningStandardId());
                        learningStandardReferenceType.setLearningStandardIdentity(learningStandardIdentityType);
                        learningObjective.getLearningStandardReference().add(learningStandardReferenceType);
                    }
                    learningObjective.setObjective(firstLearningStandardResult.getCategory());
                    learningObjective.setAcademicSubject(firstLearningStandardResult.getLearningStandard()
                            .getSubjectArea());
                    learningObjective.setObjectiveGradeLevel(firstLearningStandardResult.getLearningStandard()
                            .getGradeLevel());
                    learningObjectives.add(learningObjective);
                }
                return learningObjectives;
            }
        });
        transformer.setDotNotationToId(new CcsCsv2XmlTransformer.DotNotationToId() {
            @Override
            String getId(String dotNotation) {
                String id = dotNotation.replaceAll(" ", "");
                Matcher matcher = PATTERN.matcher(id);
                if(matcher.matches()) {
                    StringBuilder sb = new StringBuilder();
                    sb.append(matcher.group(1)).append(".").append(matcher.group(2)).append(".").append(matcher.group(3).replace(".", ""));
                    id = sb.toString();
                }
                // add Math. to id if the id start with k-8,otherwise add Math.HS to id
                if (GRADE_LEVELS.indexOf(id.charAt(0)) >= 0) {
                    id = "Math." + id;
                } else {
                    id = "Math.HS" + id.replaceFirst("[.]", "-");
                }
                return id;
            }
        });
        transformer.setGradeLevelMapper(new CcsCsv2XmlTransformer.GradeLevelMapper() {
            @Override
            public int getGradeLevel(String dotNotation) {
                String[] gradeLevels = dotNotation.split("\\.");
                int gradeLevel = 0;
                try {
                    gradeLevel = Integer.parseInt(gradeLevels[0]);
                } catch (NumberFormatException e) {
                    if (gradeLevels[0].toLowerCase().equals("k")) {
                        gradeLevel = 0;
                    } else {

                        // return Ninth grade for high school for now
                        // TODO map the grade level for each high school math
                        gradeLevel = 9;
                    }
                }
                return gradeLevel;
            }

        });
        transformer.printLearningStandards();
        SchemaValidator.check(outputPath);
        System.out.println(transformer.getCopyright());
    }
}


text:
<?php

namespace Sonata\AdminBundle\Mapper;

use Sonata\AdminBundle\Admin\AdminInterface;
use Sonata\AdminBundle\Builder\BuilderInterface;

/**
 * This class is used to simulate the Form API.
 *
 * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
 */
abstract class BaseMapper
{
    /**
     * @var AdminInterface
     */
    protected $admin;

    /**
     * @var BuilderInterface
     */
    protected $builder;

    public function __construct(BuilderInterface $builder, AdminInterface $admin)
    {
        $this->builder = $builder;
        $this->admin = $admin;
    }

    /**
     * @return AdminInterface
     */
    public function getAdmin()
    {
        return $this->admin;
    }

    /**
     * @param string $key
     *
     * @return mixed
     */
    abstract public function get($key);

    /**
     * @param string $key
     *
     * @return bool
     */
    abstract public function has($key);

    /**
     * @param string $key
     *
     * @return $this
     */
    abstract public function remove($key);

    // To be uncommented on 4.0.
    /**
     * Returns configured keys.
     *
     * @return string[]
     */
    //abstract public function keys();

    /**
     * @param array $keys field names
     *
     * @return $this
     */
    abstract public function reorder(array $keys);
}


text:
@implementation FruitTableAdapter

- (void)loadTableView:(UITableView *)tableView
{
//    tableView.delegate = self;
    if (!tableView.dataSource) {
//        tableView.dataSource = self;
    }
    [tableView reloadData];
}

- (id)getItemData:(NSInteger)position
{
    return self.dataSource[position];
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    if(!_dataSource){
        _dataSource = [NSMutableArray new];
    }
    return _dataSource.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *identifier = @"value1";

    UITableViewCell *nullableCell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if(!nullableCell){
        nullableCell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifier];
        NSLog(@"实例化一次");
    }

//    FruitEntity *fruit = _dataSource[indexPath.row];
//
//    nullableCell.textLabel.text = fruit.name;
//    nullableCell.detailTextLabel.text = fruit.descriptions;

    return nullableCell;
}

@end


text:
ROM - A dead-simple Redis Object Mapper
=======================================

A super flexible Redis Object Mapper. It's all about model method DRY-ness.

Usage
-----

ROM is easy to use!

__Import__

    var rom = require('rom');
    var client = require('redis').createClient();
    var db = rom.createDatabase('myDatabase', client);
    // Or you can just let rom pick-up your redis client automatically
    // var db = rom.createDatabase('myDatabase');

__Define your model and its methods__

    var User = db.Model.extend('user', {
        defaults: {
            first_name: "My First Name",
            last_name: "My Last Name"
        },
        fullName: function() {
            return this.get('first_name') + " " + this.get('last_name');
        },
        hello: function() {
            return "Hello, " + this.fullName() + "."
        }
    });

__Create an instance__

    var user = User({first_name: "John", last_name: "Doe"});

__Save your model__

    user.save();  // Returns the local state.
                  // You can get the db state by passing a callback.

__Call your method__

    user.hello();  // "Hello, John Doe."

Installation
------------

__Using npm:__

    $ npm install rom

License
-------

(MIT License)

Copyright (c) 2012 Jesse Panganiban <me@jpanganiban.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


text:
package play.boilerplate.api.client.dsl

import akka.stream.scaladsl.Source
import akka.util.ByteString
import play.api.libs.json.JsValue
import play.api.libs.ws._

object Compat extends AbstractCompat with JsonBodyWritables with JsonBodyReadables {

  override type WSClient = StandaloneWSClient
  override type WSRequest = StandaloneWSRequest
  override type WSResponse = StandaloneWSResponse

  implicit class WSResponseOps(val response: WSResponse) extends AnyVal {
    def json: JsValue = response.body[JsValue]
  }

  // Backport from Play WS

  implicit val writeableOf_urlEncodedForm: BodyWritable[Map[String, Seq[String]]] = {
    import java.net.URLEncoder
    BodyWritable[Map[String, Seq[String]]](
      transform = { formData =>
        val bytes = ByteString.fromString(formData.flatMap(item => item._2.map(c => item._1 + "=" + URLEncoder.encode(c, "UTF-8"))).mkString("&"))
        InMemoryBody(bytes)
      },
      contentType = "application/x-www-form-urlencoded; charset=utf-8"
    )
  }

  // multipart/form-data

  sealed trait Part
  final case class FilePart(key: String, filename: String, contentType: Option[String], ref: java.io.File) extends Part
  final case class DataPart(key: String, value: String) extends Part
  final case class MultipartFormData(dataParts: Map[String, Seq[String]], files: Seq[FilePart])

  def dataPart(key: String, value: Option[String]): Option[Part] = {
    value.map(DataPart(key, _))
  }

  def filePart(key: String, contentType: String, source: Option[java.io.File]): Option[Part] = {
    source.map(
      file => FilePart(key, file.getName, Some(contentType), file)
    )
  }

  def multipartFormData(parts: List[Option[Part]]): MultipartFormData = {
    MultipartFormData(
      dataParts = parts.collect {
        case Some(data: DataPart) => data
      }.groupBy(_.key).mapValues(_.map(_.value)),
      files = parts.collect {
        case Some(file: FilePart) => file
      }
    )
  }

  implicit val writeableOf_MultipartFormData: BodyWritable[MultipartFormData] = {

    import java.nio.file.{Files => JFiles}

    val boundary: String = "--------" + scala.util.Random.alphanumeric.take(20).mkString("")

    def formatDataParts(data: Map[String, Seq[String]]): ByteString = {
      val dataParts = data.flatMap {
        case (name, values) =>
          values.map { value =>
            s"--$boundary\r\nContent-Disposition: form-data; name=$name\r\n\r\n$value\r\n"
          }
      }.mkString("")
      ByteString.fromString(dataParts)
    }

    def filePartHeader(file: FilePart): ByteString = {
      val name = s""""${file.key}""""
      val filename = s""""${file.filename}""""
      val contentType = file.contentType.map { ct =>
        s"Content-Type: $ct\r\n"
      }.getOrElse("")
      ByteString.fromString(s"--$boundary\r\nContent-Disposition: form-data; name=$name; filename=$filename\r\n$contentType\r\n")
    }

    BodyWritable[MultipartFormData](
      transform = { form =>
        val bytes = formatDataParts(form.dataParts) ++ form.files.flatMap { file =>
          val fileBytes = ByteString.fromArray(JFiles.readAllBytes(file.ref.toPath))
          filePartHeader(file) ++ fileBytes ++ ByteString.fromString("\r\n")
        } ++ ByteString(s"--$boundary--")
        SourceBody(Source.single(bytes))
      },
      contentType = s"multipart/form-data; boundary=$boundary"
    )

  }

}


text:
@interface NSImage (BrightnessDetection)

- (CGFloat)averageBrightness;

@end


text:
/**
 */
/*
 * Created on 30.11.2004
 *
 */
package org.apache.harmony.test.func.api.java.io.InputStreamReader;

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

import org.apache.harmony.test.func.api.java.io.share.PrepareTestCleanupRunner;
import org.apache.harmony.test.func.api.java.io.share.InputStreamReader.InputStreamReaderTestShared;
import org.apache.harmony.share.Result;

public final class InputStreamReaderTest extends InputStreamReaderTestShared {
    public static void main(String[] args) {
        try {
            System.exit(PrepareTestCleanupRunner.run(args,
                    new InputStreamReaderTest()));
        } catch (IOException e) {
            System.err.println("Got exception - " + e.getMessage());
        }
    }

    public int cleanup(File dir) throws IOException {
        return super.cleanup(dir);
    }
    protected Reader getTestedReader() throws IOException {
        return super.getTestedReader();
    }
    protected Reader getTestedReader(Object lock) throws IOException {
        return super.getTestedReader(lock);
    }
    public int prepare(File dir) throws IOException {
        return super.prepare(dir);
    }
    public void setTestDir(File dir) {
        super.setTestDir(dir);
    }
    public Result testClose() throws IOException {
        return super.testClose();
    }
    public Result testConstructorCharset() throws IOException {
        return super.testConstructorCharset();
    }
    public Result testExceptionAfterClose() throws IOException {
        return super.testExceptionAfterClose();
    }
    public Result testGetEncoding() throws IOException {
        return super.testGetEncoding();
    }
    public Result testMark() throws IOException {
        return super.testMark();
    }
    public Result testMarkSupported() throws IOException {
        return super.testMarkSupported();
    }
    public Result testReadChar() throws IOException {
        return super.testReadChar();
    }
    public Result testReadChars0001() throws IOException {
        return super.testReadChars0001();
    }
    public Result testReadChars0002() throws IOException {
        return super.testReadChars0002();
    }
    public Result testReadCharset() throws IOException {
        return super.testReadCharset();
    }
    public Result testReady() throws IOException {
        return super.testReady();
    }
    public Result testSkip() throws IOException {
        return super.testSkip();
    }
    public Result testSkipNegative() throws IOException {
        return super.testSkipNegative();
    }
}


text:
package net.floodlightcontroller.odin.master;

import net.floodlightcontroller.util.MACAddress;

/**
 *
 * Odin Applications should use instances of this class to express
 * subscription requests. One instance of this class represents
 * a single subscription request against a single statistic.
 *
 * FIXME: The application should ensure it doesn't install the same
 * subscription twice.
 *
 * @author Lalith Suresh <suresh.lalith@gmail.com>
 *
 */
public class OdinEventSubscription {

	private final String WILD_CARD = "*";
	public enum Relation {
	    EQUALS,
	    GREATER_THAN,
	    LESSER_THAN,
	};

	private String client;
	private String statistic;
	private Relation relation;
	private double value;

	/**
	 * @return the client
	 */
	public String getClient() {
		return client;
	}

	/**
	 * @return the statistic
	 */
	public String getStatistic() {
		return statistic;
	}

	/**
	 * @return the relation
	 */
	public Relation getRelation() {
		return relation;
	}

	/**
	 * @return the value
	 */
	public double getValue() {
		return value;
	}

	/**
	 * Sets a subscription for an event, defined per client (or
	 * for all clients using *), for a particular statistic that
	 * satisfies a particular relation with a defined value.
	 *
	 * @param client client to be matched against. Should be a valid MAC addrress or wild-card.
	 * @param statistic any string which is a statistic. This field will be ignored by agents
	 * 		  which do not understand the requested statistic.
	 * @param rel a numerical relation with the said statistic
	 * @param value value to compare the statistic with using relation 'rel'
	 */
	public void setSubscription (String client, String stat, Relation rel, double val) {
		// Sanity checking
		try {
			MACAddress.valueOf(client);
		} catch (IllegalArgumentException e) {
			if (!client.equals(WILD_CARD)) {
				throw new IllegalArgumentException();
			}
		}

		this.client = client;
		this.statistic = stat;
		this.relation = rel;
		this.value = val;
	}
}


text:
all: site

site:
	./build.sh

site-container:
	podman run -ti --network host -v $(shell pwd):/workspace iquiw/alpine-emacs sh -c "cd /workspace; ./build.sh"

clean:
	rm -rf public/*