text:
package com.arjuna.dbplugins.azure.sqlserver;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.arjuna.databroker.data.DataFlowNode;
import com.arjuna.databroker.data.DataFlowNodeFactory;
import com.arjuna.databroker.data.DataService;
import com.arjuna.databroker.data.InvalidClassException;
import com.arjuna.databroker.data.InvalidMetaPropertyException;
import com.arjuna.databroker.data.InvalidNameException;
import com.arjuna.databroker.data.InvalidPropertyException;
import com.arjuna.databroker.data.MissingMetaPropertyException;
import com.arjuna.databroker.data.MissingPropertyException;

public class AzureSQLServerDataFlowNodeFactory implements DataFlowNodeFactory
{
    public AzureSQLServerDataFlowNodeFactory(String name, Map<String, String> properties)
    {
        _name       = name;
        _properties = properties;
    }

    @Override
    public String getName()
    {
        return _name;
    }

    @Override
    public Map<String, String> getProperties()
    {
        return _properties;
    }

    @Override
    public List<Class<? extends DataFlowNode>> getClasses()
    {
        List<Class<? extends DataFlowNode>> classes = new LinkedList<Class<? extends DataFlowNode>>();

        classes.add(DataService.class);

        return classes;
    }

    @Override
    public <T extends DataFlowNode> List<String> getMetaPropertyNames(Class<T> dataFlowNodeClass)
        throws InvalidClassException
    {
        if (dataFlowNodeClass.equals(DataService.class))
        {
            List<String> metaPropertyNames = new LinkedList<String>();

            return metaPropertyNames;
        }
        else
            throw new InvalidClassException("Unsupported class", dataFlowNodeClass.getName());
    }

    @Override
    public <T extends DataFlowNode> List<String> getPropertyNames(Class<T> dataFlowNodeClass, Map<String, String> metaProperties)
        throws InvalidClassException, InvalidMetaPropertyException, MissingMetaPropertyException
    {
        if (dataFlowNodeClass.equals(DataService.class))
        {
            if (metaProperties.isEmpty())
            {
                List<String> propertyNames = new LinkedList<String>();

                propertyNames.add(AzureSQLServerDataService.SERVERNAME_PROPERTYNAME);
                propertyNames.add(AzureSQLServerDataService.DATABASENAME_PROPERTYNAME);
                propertyNames.add(AzureSQLServerDataService.USER_PROPERTYNAME);
                propertyNames.add(AzureSQLServerDataService.PASSWORD_PROPERTYNAME);

                return propertyNames;
            }
            else
                throw new MissingMetaPropertyException("No metaproperties expected", null);
        }
        else
            throw new InvalidClassException("Unsupported class", dataFlowNodeClass.getName());
    }

    @SuppressWarnings("unchecked")
    @Override
    public <T extends DataFlowNode> T createDataFlowNode(String name, Class<T> dataFlowNodeClass, Map<String, String> metaProperties, Map<String, String> properties)
        throws InvalidClassException, InvalidNameException, InvalidMetaPropertyException, MissingMetaPropertyException, InvalidPropertyException, MissingPropertyException
    {
        if (dataFlowNodeClass.equals(DataService.class))
        {
            if (metaProperties.isEmpty())
                return (T) new AzureSQLServerDataService(name, properties);
            else
                throw new InvalidMetaPropertyException("No metaproperties expected", null, null);
        }
        else
            throw new InvalidClassException("Unsupported class", dataFlowNodeClass.getName());
    }

    private String              _name;
    private Map<String, String> _properties;
}


text:
    Function Remove-Member
    {

    [cmdletbinding()]
    param
    (
        [parameter(Mandatory, ValueFromPipeline)]
        [psobject[]]$Object
        ,
        [parameter(Mandatory)]
        [string]$Member
    )
    begin {}
    process
    {
        foreach ($o in $Object)
        {
            $o.psobject.Members.Remove($Member)
        }
    }

    }

redpajama_set_name: RedPajamaGithub


text:
CREATE ALIAS AddGeometryColumn for "geodb.GeoDB.AddGeometryColumn"
CREATE ALIAS CreateSpatialIndex for "geodb.GeoDB.CreateSpatialIndex"
CREATE ALIAS DropGeometryColumn for "geodb.GeoDB.DropGeometryColumn"
CREATE ALIAS DropGeometryColumns for "geodb.GeoDB.DropGeometryColumns"
CREATE ALIAS DropSpatialIndex for "geodb.GeoDB.DropSpatialIndex"
CREATE ALIAS EnvelopeAsText for "geodb.GeoDB.EnvelopeAsText"
CREATE ALIAS GeometryType for "geodb.GeoDB.GeometryType"
CREATE ALIAS ST_Area FOR "geodb.GeoDB.ST_Area"
CREATE ALIAS ST_AsEWKB FOR "geodb.GeoDB.ST_AsEWKB"
CREATE ALIAS ST_AsEWKT FOR "geodb.GeoDB.ST_AsEWKT"
CREATE ALIAS ST_AsHexEWKB FOR "geodb.GeoDB.ST_AsHexEWKB"
CREATE ALIAS ST_AsText FOR "geodb.GeoDB.ST_AsText"
CREATE ALIAS ST_BBOX FOR "geodb.GeoDB.ST_BBox"
CREATE ALIAS ST_Boundary FOR "geodb.GeoDB.ST_Boundary"
CREATE ALIAS ST_Buffer FOR "geodb.GeoDB.ST_Buffer"
CREATE ALIAS ST_Centroid FOR "geodb.GeoDB.ST_Centroid"
CREATE ALIAS ST_Crosses FOR "geodb.GeoDB.ST_Crosses"
CREATE ALIAS ST_Contains FOR "geodb.GeoDB.ST_Contains"
CREATE ALIAS ST_ConvexHull FOR "geodb.GeoDB.ST_ConvexHull"
CREATE ALIAS ST_DWithin FOR "geodb.GeoDB.ST_DWithin"
CREATE ALIAS ST_Disjoint FOR "geodb.GeoDB.ST_Disjoint"
CREATE ALIAS ST_Distance FOR "geodb.GeoDB.ST_Distance"
CREATE ALIAS ST_Difference FOR "geodb.GeoDB.ST_Difference"
CREATE ALIAS ST_Dimension FOR "geodb.GeoDB.ST_Dimension"
CREATE ALIAS ST_Envelope FOR "geodb.GeoDB.ST_Envelope"
CREATE ALIAS ST_Equals FOR "geodb.GeoDB.ST_Equals"
CREATE ALIAS ST_GeoHash FOR "geodb.GeoDB.ST_GeoHash"
CREATE ALIAS ST_GeomFromEWKB FOR "geodb.GeoDB.ST_GeomFromEWKB"
CREATE ALIAS ST_GeomFromEWKT FOR "geodb.GeoDB.ST_GeomFromEWKT"
CREATE ALIAS ST_GeomFromText FOR "geodb.GeoDB.ST_GeomFromText"
CREATE ALIAS ST_GeomFromWKB FOR "geodb.GeoDB.ST_GeomFromWKB"
CREATE ALIAS ST_Intersection FOR "geodb.GeoDB.ST_Intersection"
CREATE ALIAS ST_Intersects FOR "geodb.GeoDB.ST_Intersects"
CREATE ALIAS ST_IsEmpty FOR "geodb.GeoDB.ST_IsEmpty"
CREATE ALIAS ST_IsSimple FOR "geodb.GeoDB.ST_IsSimple"
CREATE ALIAS ST_IsValid FOR "geodb.GeoDB.ST_IsValid"
CREATE ALIAS ST_MakePoint FOR "geodb.GeoDB.ST_MakePoint"
CREATE ALIAS ST_MakeBox2D FOR "geodb.GeoDB.ST_MakeBox2D"
CREATE ALIAS ST_Overlaps FOR "geodb.GeoDB.ST_Overlaps"
CREATE ALIAS ST_Relate FOR "geodb.GeoDB.ST_Relate"
CREATE ALIAS ST_SRID FOR "geodb.GeoDB.ST_SRID"
CREATE ALIAS ST_X FOR "geodb.GeoDB.ST_X"
CREATE ALIAS ST_Y FOR "geodb.GeoDB.ST_Y"
CREATE ALIAS ST_SetSRID FOR "geodb.GeoDB.ST_SetSRID"
CREATE ALIAS ST_Simplify FOR "geodb.GeoDB.ST_Simplify"
CREATE ALIAS ST_SymDifference FOR "geodb.GeoDB.ST_SymDifference"
CREATE ALIAS ST_Touches FOR "geodb.GeoDB.ST_Touches"
CREATE ALIAS ST_Union FOR "geodb.GeoDB.ST_Union"
CREATE ALIAS ST_Within FOR "geodb.GeoDB.ST_Within"
CREATE ALIAS Version FOR "geodb.GeoDB.Version"
CREATE DOMAIN POINT AS BLOB
CREATE DOMAIN LINESTRING AS BLOB
CREATE DOMAIN POLYGON AS BLOB
CREATE DOMAIN MULTIPOINT AS BLOB
CREATE DOMAIN MULTILINESTRING AS BLOB
CREATE DOMAIN MULTIPOLYGON AS BLOB
CREATE DOMAIN GEOMETRYCOLLECTION AS BLOB
CREATE DOMAIN GEOMETRY AS BLOB
CREATE AGGREGATE ST_Extent FOR "geodb.aggregate.Extent"
CREATE AGGREGATE ST_Union_Aggregate FOR "geodb.aggregate.Union"


text:
package com.blackboxgaming.engine.factories;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Matrix4;
import com.blackboxgaming.engine.components.Model;
import com.blackboxgaming.engine.components.Weapon;
import com.blackboxgaming.engine.util.Randomizer;

/**
 *
 * @author Adrian
 */
public class WeaponFactory {

    public static final int WEAPON_GUN = 1;
    public static final int WEAPON_LASER = 2;
    public static final int WEAPON_PROJECTILE = 3;
    public static final int WEAPON_PLASMA = 4;
    public static final int WEAPON_GRENADE = 5;
    public static final int WEAPON_MELEE = 6;

    public static Weapon getWeapon(int type, Matrix4 nozzle) {
        Weapon weapon;
        switch (type) {
            case WEAPON_GUN:
                weapon = createGun(nozzle);
                break;
            case WEAPON_LASER:
                weapon = null;
                break;
            case WEAPON_PROJECTILE:
                weapon = createProjectile(nozzle);
                break;
            case WEAPON_PLASMA:
                weapon = createPlasma(nozzle);
                break;
            case WEAPON_GRENADE:
                weapon = null;
                break;
            case WEAPON_MELEE:
                weapon = createMelee(nozzle);
                break;
            default:
                weapon = null;
                System.out.println("Can't resolve weapon type");
                break;
        }
        return weapon;
    }

    private static Weapon createGun(Matrix4 nozzle) {
        Weapon weapon = new Weapon(WEAPON_GUN, nozzle);
        weapon.damage = 1;
        weapon.fireRate = 100;
        weapon.range = 50;
        weapon.nozzleFireModel = new Model(ModelFactory.getConeModel(0.5f), Color.RED);
        weapon.nozzleFireModel.someoneElseHandlesDisposing = true;
        weapon.hitSplashModel = new Model(ModelFactory.getBoxModel(3, 0.1f, 0.1f), Randomizer.getRandomColor());
        weapon.hitSplashModel.someoneElseHandlesDisposing = true;
        return weapon;
    }

    private static Weapon createProjectile(Matrix4 nozzle) {
        Weapon weapon = new Weapon(WEAPON_PROJECTILE, nozzle);
        weapon.damage = 1;
        weapon.fireRate = 500;
        return weapon;
    }

    private static Weapon createPlasma(Matrix4 nozzle) {
        Weapon weapon = new Weapon(WEAPON_PLASMA, nozzle);
        weapon.damage = 8f;
        weapon.speed = 50f;
        weapon.fireRate = 100;
        weapon.bulletModel = new Model(ModelFactory.getSphereModel(0.5f), Randomizer.getRandomColor());
        weapon.bulletModel.someoneElseHandlesDisposing = true;
        return weapon;
    }

    private static Weapon createMelee(Matrix4 nozzle) {
        Weapon weapon = new Weapon(WEAPON_MELEE, nozzle);
        weapon.damage = 5.0f;
        weapon.fireRate = 250;
        weapon.range = 2;
        weapon.nozzleFireModel = new Model(ModelFactory.getBoxModel(0.25f, 0.75f, 0.75f), Color.RED);
        weapon.nozzleFireModel.someoneElseHandlesDisposing = true;
        return weapon;
    }

}


text:
package co.cask.cdap.cli.english;

/**
 * English word.
 */
public class Word {

  private static final String VOWELS = "[aeiouAEIOU]";

  private final String word;
  private final boolean plural;

  public Word(String word, boolean plural) {
    this.word = word;
    this.plural = plural;
  }

  public String getWord() {
    return word;
  }

  public boolean beginsWithVowel() {
    return word.matches("^" + VOWELS + ".+$");
  }

  public boolean isPlural() {
    return plural;
  }

  @Override
  public String toString() {
    return word;
  }
}


text:
'use strict';

angular.module('transcript.admin.user.view', ['ui.router'])

    .config(['$stateProvider', function($stateProvider) {
        $stateProvider.state('transcript.admin.user.view', {
            views: {
                "page" : {
                    templateUrl: '/webapp/app/Admin/User/View/View.html',
                    controller: 'AdminUserViewCtrl'
                }
            },
            url: '/{id}',
            ncyBreadcrumb: {
                parent: 'transcript.admin.user.list',
                label: 'Modification de {{ iUser.name }}'
            },
            tfMetaTags: {
                title: 'Modification de {{ iUser.name }} | Utilisateurs | Administration',
            },
            resolve: {
                user: function(UserService, $transition$) {
                    return UserService.getUser($transition$.params().id);
                }
            }
        })
    }])

    .controller('AdminUserViewCtrl', ['$log', '$rootScope','$scope', '$http', '$sce', '$state', 'user', 'flash', '$timeout', function($log, $rootScope, $scope, $http, $sce, $state, user, flash, $timeout) {
        $scope.iUser = user;
        $scope.roles = {
            submit: {
                loading: false,
                success: false
            }
        };
        $scope.remove = {
            silent: false,
            loading: false,
            success: false
        };

        /* Edit User Roles ------------------------------------------------------------------------------------------ */
        $scope.roles.submit.action = function() {
            $scope.roles.submit.loading = true;
            let form = {
                id: $scope.iUser.id,
                roles: $scope.iUser.roles,
                action: "set"
            };
            $log.debug(form);

            $http.post($rootScope.api+'/users/'+$scope.iUser.id+"/roles", form).
            then(function (response) {
                $log.debug(response.data);
                flash.success = "Les rôles ont bien été mis à jour";
                $scope.roles.submit.loading = false;
                $scope.roles.submit.success = true;
                $timeout(function() {
                    $scope.roles.submit.success = false;
                }, 5000);
            }, function errorCallback(response) {
                $scope.roles.submit.loading = false;
                if(response.data.code === 400) {
                    flash.error = "
";
                    for(let field in response.data.errors.children) {
                        for(let error in response.data.errors.children[field]) {
                            if(error === "errors") {
                                flash.error += "
"+field+" : "+response.data.errors.children[field][error]+"
";
                            }
                        }
                    }
                    flash.error += "
";

                }
                $log.debug(response);
            });
        };
        /* End: Edit User Roles ------------------------------------------------------------------------------------- */

        /* Remove User ---------------------------------------------------------------------------------------------- */
        $scope.remove.action = function() {
            $scope.remove.loading = true;

            $http.delete($rootScope.api+'/users/'+$scope.iUser.id+'?silent='+$scope.remove.silent).
            then(function (response) {
                $log.debug(response.data);
                flash.success = "Vous allez être redirigé dans quelques instants ...";
                $scope.remove.loading = false;
                $scope.remove.success = true;
                $state.go('transcript.admin.user.list');
            }, function errorCallback(response) {
                $scope.remove.loading = false;
                if(response.data.code === 400) {
                    flash.error = "
";
                    for(let field in response.data.errors.children) {
                        for(let error in response.data.errors.children[field]) {
                            if(error === "errors") {
                                flash.error += "
"+field+" : "+response.data.errors.children[field][error]+"
";
                            }
                        }
                    }
                    flash.error += "
";

                }
                $log.debug(response);
            });
        };
        /* End: Remove User ----------------------------------------------------------------------------------------- */
    }])
;


text:
package mllpsender

import (
	"fmt"
	"net"

	log "github.com/golang/glog"
	"github.com/GoogleCloudPlatform/mllp/mllp_adapter/mllp"
	"github.com/GoogleCloudPlatform/mllp/shared/monitoring"
)

const (
	sentMetric      = "mllpsender-messages-sent"
	ackErrorMetric  = "mllpsender-messages-ack-error"
	sendErrorMetric = "mllpsender-messages-send-error"
	dialErrorMetric = "mllpsender-connections-dial-error"
)

// MLLPSender represents an MLLP sender.
type MLLPSender struct {
	addr    string
	metrics monitoring.Client
}

// NewSender creates a new MLLPSender.
func NewSender(addr string, metrics monitoring.Client) *MLLPSender {
	metrics.NewCounter(sentMetric, "Number of HL7 messages sent to mllp_addr")
	metrics.NewCounter(ackErrorMetric, "Number of errors when receiving ACK from mllp_addr")
	metrics.NewCounter(sendErrorMetric, "Number of errors when sending HL7 message to mllp_addr")
	metrics.NewCounter(dialErrorMetric, "Number of errors when dialing to mllp_addr")
	return &MLLPSender{addr: addr, metrics: metrics}
}

// Send sends an HL7 messages via MLLP.
func (m *MLLPSender) Send(msg []byte) ([]byte, error) {
	m.metrics.IncCounter(sentMetric)

	conn, err := net.Dial("tcp", m.addr)
	if err != nil {
		m.metrics.IncCounter(dialErrorMetric)
		return nil, fmt.Errorf("dialing: %v", err)
	}
	defer func() {
		if err := conn.Close(); err != nil {
			log.Errorf("MLLP Sender: failed to clean up connection: %v", err)
		}
	}()

	if err := mllp.WriteMsg(conn, msg); err != nil {
		m.metrics.IncCounter(sendErrorMetric)
		return nil, fmt.Errorf("writing message: %v", err)
	}
	ack, err := mllp.ReadMsg(conn)
	if err != nil {
		m.metrics.IncCounter(ackErrorMetric)
		return nil, fmt.Errorf("reading ACK: %v", err)
	}
	return ack, nil
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Can. J. Bot. 61: 21 (1983)

#### Original name
Apostrasseria robusta Nag Raj, 1983

### Remarks
null


text:
package org.apache.hadoop.ozone.container.common.volume;

import java.util.concurrent.atomic.AtomicLong;

/**
 * This class is used to track Volume IO stats for each HDDS Volume.
 */
public class VolumeIOStats {

  private final AtomicLong readBytes;
  private final AtomicLong readOpCount;
  private final AtomicLong writeBytes;
  private final AtomicLong writeOpCount;
  private final AtomicLong readTime;
  private final AtomicLong writeTime;

  public VolumeIOStats() {
    readBytes = new AtomicLong(0);
    readOpCount = new AtomicLong(0);
    writeBytes = new AtomicLong(0);
    writeOpCount = new AtomicLong(0);
    readTime = new AtomicLong(0);
    writeTime = new AtomicLong(0);
  }

  /**
   * Increment number of bytes read from the volume.
   * @param bytesRead
   */
  public void incReadBytes(long bytesRead) {
    readBytes.addAndGet(bytesRead);
  }

  /**
   * Increment the read operations performed on the volume.
   */
  public void incReadOpCount() {
    readOpCount.incrementAndGet();
  }

  /**
   * Increment number of bytes written on to the volume.
   * @param bytesWritten
   */
  public void incWriteBytes(long bytesWritten) {
    writeBytes.addAndGet(bytesWritten);
  }

  /**
   * Increment the write operations performed on the volume.
   */
  public void incWriteOpCount() {
    writeOpCount.incrementAndGet();
  }

  /**
   * Increment the time taken by read operation on the volume.
   * @param time
   */
  public void incReadTime(long time) {
    readTime.addAndGet(time);
  }

  /**
   * Increment the time taken by write operation on the volume.
   * @param time
   */
  public void incWriteTime(long time) {
    writeTime.addAndGet(time);
  }

  /**
   * Returns total number of bytes read from the volume.
   * @return long
   */
  public long getReadBytes() {
    return readBytes.get();
  }

  /**
   * Returns total number of bytes written to the volume.
   * @return long
   */
  public long getWriteBytes() {
    return writeBytes.get();
  }

  /**
   * Returns total number of read operations performed on the volume.
   * @return long
   */
  public long getReadOpCount() {
    return readOpCount.get();
  }

  /**
   * Returns total number of write operations performed on the volume.
   * @return long
   */
  public long getWriteOpCount() {
    return writeOpCount.get();
  }

  /**
   * Returns total read operations time on the volume.
   * @return long
   */
  public long getReadTime() {
    return readTime.get();
  }

  /**
   * Returns total write operations time on the volume.
   * @return long
   */
  public long getWriteTime() {
    return writeTime.get();
  }

}


text:
package com.frank;

/**
 * Created by frank on 2016/1/30.
 */
public class Client {
    public static  void main(String[] args) {
        Component component = new ConcreteComponent();
        Decorator decorator = new ConcreteDecorator(component);

        decorator.operation();

    }
}


text:
namespace starboard {
namespace shared {
namespace ffmpeg {

// Forward class declaration of the explicit specialization with value FFMPEG.
template <>
class AudioDecoderImpl<FFMPEG>;

// Declare the explicit specialization of the class with value FFMPEG.
template <>
class AudioDecoderImpl<FFMPEG> : public AudioDecoder,
                                 private starboard::player::JobQueue::JobOwner {
 public:
  AudioDecoderImpl(SbMediaAudioCodec audio_codec,
                   const SbMediaAudioSampleInfo& audio_sample_info);
  ~AudioDecoderImpl() override;

  // From: AudioDecoder
  static AudioDecoder* Create(SbMediaAudioCodec audio_codec,
                              const SbMediaAudioSampleInfo& audio_sample_info);
  bool is_valid() const override;

  // From: starboard::player::filter::AudioDecoder
  void Initialize(const OutputCB& output_cb, const ErrorCB& error_cb) override;
  void Decode(const scoped_refptr<InputBuffer>& input_buffer,
              const ConsumedCB& consumed_cb) override;
  void WriteEndOfStream() override;
  scoped_refptr<DecodedAudio> Read(int* samples_per_second) override;
  void Reset() override;

 private:
  SbMediaAudioSampleType GetSampleType() const;
  SbMediaAudioFrameStorageType GetStorageType() const;

  void InitializeCodec();
  void TeardownCodec();

  static const int kMaxDecodedAudiosSize = 64;

  FFMPEGDispatch* ffmpeg_;
  OutputCB output_cb_;
  ErrorCB error_cb_;
  SbMediaAudioCodec audio_codec_;
  AVCodecContext* codec_context_;
  AVFrame* av_frame_;

  bool stream_ended_;
  std::queue<scoped_refptr<DecodedAudio> > decoded_audios_;
  starboard::media::AudioSampleInfo audio_sample_info_;
};

}  // namespace ffmpeg
}  // namespace shared
}  // namespace starboard

#endif  // STARBOARD_SHARED_FFMPEG_FFMPEG_AUDIO_DECODER_IMPL_H_


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

=============================================
|Apache CouchDB(TM)|_ |release| Documentation
=============================================

.. toctree::
    :maxdepth: 3
    :numbered: 3

    intro/index
    install/index
    config/index
    replication/index
    maintenance/index
    couchapp/index
    externals
    query-server/index
    fauxton/index
    api/index
    cluster/index
    json-structure
    experimental
    contributing
    whatsnew/index
    cve/index
    about

.. This is how you get a TM sign into a link. Haha. Seriously.
.. |Apache CouchDB(TM)| unicode:: Apache U+0020 CouchDB U+2122
.. _Apache CouchDB(TM): http://couchdb.apache.org/


text:
#!/usr/bin/env node --use_strict

console.log('background process has begun');

var fs = require('fs'),
  path = require('path'),
  scannerJson = './app/workers/scanner.json',
  cleanerJson = './app/workers/cleaner.json',
  mongoose = require('mongoose'),
  chalk = require('chalk'),
  init = require('../../config/init'),
  config = require('../../config/config');

init();

// connect to the database
mongoose.connect(config.db, function (err) {
  'use strict';
  if (err) {
    console.error(chalk.red('Could not connect to MongoDB!'));
    console.log(chalk.red(err));
  }
});

// set up the models
config.getGlobbedFiles('./app/models/**/*.js').forEach(function (modelPath) {
  'use strict';
  require(path.resolve(modelPath));
});

// start either the scanner or the cleaner as the background task
if (fs.existsSync(scannerJson)) {
  console.log('background process is a scanner');
  fs.readFile(scannerJson, {encoding : 'utf8'}, function (err, data) {
    'use strict';
    if (err) {
      console.error(err);
    } else {
      require('./scanner/index').scanFolder(JSON.parse(data));
      fs.unlinkSync(scannerJson);
    }
  });
} else if (fs.existsSync(cleanerJson)) {
  console.log('background process is a cleaner');
  fs.readFile(cleanerJson, {encoding : 'utf8'}, function (err, data) {
    'use strict';
    if (err) {
      console.error(err);
    } else {
      require('./cleaner/index').cleanFolder(JSON.parse(data));
      fs.unlinkSync(cleanerJson);
    }
  });
}


text:
package madgik.exareme.worker.art.container.event.closeSession;

import madgik.exareme.utils.eventProcessor.EventHandler;
import madgik.exareme.utils.eventProcessor.EventProcessor;
import org.apache.log4j.Logger;

import java.rmi.RemoteException;

/**
 * @author heraldkllapi
 */
public class CloseSessionEventHandler implements EventHandler<CloseSessionEvent> {
    public static CloseSessionEventHandler instance = new CloseSessionEventHandler();
    private static Logger log = Logger.getLogger(CloseSessionEventHandler.class);

    @Override public void handle(CloseSessionEvent event, EventProcessor proc)
        throws RemoteException {
        if (event.cSID != null) {
            log.debug("Destroying container session : " + event.sID.getLongId());
            //TODO(Vag): uncomment and find bug...
            //      int count = event.session.destroySession(event.cSID);
            ////      event.bufferPool.destroyContainerSession(event.cSID, event.sID, true);
            //      event.status.getOperatorMeasurement().changeActiveValue(-count);
        } else {
            log.debug("Destroying plan session : " + event.sID.getLongId());
            int count = event.session.destroySession();
            //      event.bufferPool.destroySessions(event.sID, true);
            event.status.getOperatorMeasurement().changeActiveValue(-count);
        }
    }
}


text:
// Simulator Controller|SDK_Simulator|003
namespace VRTK
{
#if VRTK_SDK_SIM
    using UnityEngine;
    using System.Collections.Generic;

    /// <summary>
    /// The Sim Controller SDK script provides functions to help simulate VR controllers.
    /// </summary>
    public class SDK_SimController : SDK_BaseController
    {
        SimControllers controllers;

        /// <summary>
        /// The ProcessUpdate method enables an SDK to run logic for every Unity Update
        /// </summary>
        /// <param name="index">The index of the controller.</param>
        /// <param name="options">A dictionary of generic options that can be used to within the update.</param>
        public override void ProcessUpdate(uint index, Dictionary<string, object> options)
        {
        }

        /// <summary>
        /// The GetControllerDefaultColliderPath returns the path to the prefab that contains the collider objects for the default controller of this SDK.
        /// </summary>
        /// <param name="hand">The controller hand to check for</param>
        /// <returns>A path to the resource that contains the collider GameObject.</returns>
        public override string GetControllerDefaultColliderPath(ControllerHand hand)
        {
            return "ControllerColliders/Simulator";
        }

        /// <summary>
        /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
        /// </summary>
        /// <param name="element">The controller element to look up.</param>
        /// <param name="hand">The controller hand to look up.</param>
        /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
        /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
        public override string GetControllerElementPath(ControllerElements element, ControllerHand hand, bool fullPath = false)
        {
            var suffix = (fullPath ? "/attach" : "");
            switch (element)
            {
                case ControllerElements.AttachPoint:
                    return "";
                case ControllerElements.Trigger:
                    return "" + suffix;
                case ControllerElements.GripLeft:
                    return "" + suffix;
                case ControllerElements.GripRight:
                    return "" + suffix;
                case ControllerElements.Touchpad:
                    return "" + suffix;
                case ControllerElements.ButtonOne:
                    return "" + suffix;
                case ControllerElements.SystemMenu:
                    return "" + suffix;
                case ControllerElements.Body:
                    return "";
            }
            return null;
        }

        /// <summary>
        /// The GetControllerIndex method returns the index of the given controller.
        /// </summary>
        /// <param name="controller">The GameObject containing the controller.</param>
        /// <returns>The index of the given controller.</returns>
        public override uint GetControllerIndex(GameObject controller)
        {
            uint index = 0;

            switch (controller.name)
            {
                case "Camera":
                    index = 0;
                    break;
                case "RightController":
                    index = 1;
                    break;
                case "LeftController":
                    index = 2;
                    break;
            }
            return index;
        }

        /// <summary>
        /// The GetControllerByIndex method returns the GameObject of a controller with a specific index.
        /// </summary>
        /// <param name="index">The index of the controller to find.</param>
        /// <param name="actual">If true it will return the actual controller, if false it will return the script alias controller GameObject.</param>
        /// <returns></returns>
        public override GameObject GetControllerByIndex(uint index, bool actual = false)
        {
            switch (index)
            {
                case 1:
                    return controllers.rightHand.gameObject;
                case 2:
                    return controllers.leftHand.gameObject;
                default:
                    return null;
            }
        }

        /// <summary>
        /// The GetControllerOrigin method returns the origin of the given controller.
        /// </summary>
        /// <param name="controller">The controller to retrieve the origin from.</param>
        /// <returns>A Transform containing the origin of the controller.</returns>
        public override Transform GetControllerOrigin(GameObject controller)
        {
            return controller.transform;
        }

        /// <summary>
        /// The GenerateControllerPointerOrigin method can create a custom pointer origin Transform to represent the pointer position and forward.
        /// </summary>
        /// <returns>A generated Transform that contains the custom pointer origin.</returns>
        public override Transform GenerateControllerPointerOrigin()
        {
            return null;
        }

        /// <summary>
        /// The GetControllerLeftHand method returns the GameObject containing the representation of the left hand controller.
        /// </summary>
        /// <param name="actual">If true it will return the actual controller, if false it will return the script alias controller GameObject.</param>
        /// <returns>The GameObject containing the left hand controller.</returns>
        public override GameObject GetControllerLeftHand(bool actual = false)
        {
            GameObject controller = null;
            GameObject simPlayer = SDK_InputSimulator.FindInScene();
            if (simPlayer != null)
            {
                controller = simPlayer.transform.FindChild("LeftHand").gameObject;
            }

            return controller;
        }

        /// <summary>
        /// The GetControllerRightHand method returns the GameObject containing the representation of the right hand controller.
        /// </summary>
        /// <param name="actual">If true it will return the actual controller, if false it will return the script alias controller GameObject.</param>
        /// <returns>The GameObject containing the right hand controller.</returns>
        public override GameObject GetControllerRightHand(bool actual = false)
        {
            GameObject controller = null;
            GameObject simPlayer = SDK_InputSimulator.FindInScene();

            if (simPlayer != null)
            {
                controller = simPlayer.transform.FindChild("RightHand").gameObject;
            }

            return controller;
        }

        /// <summary>
        /// The IsControllerLeftHand/1 method is used to check if the given controller is the the left hand controller.
        /// </summary>
        /// <param name="controller">The GameObject to check.</param>
        /// <returns>Returns true if the given controller is the left hand controller.</returns>
        public override bool IsControllerLeftHand(GameObject controller)
        {
            return CheckActualOrScriptAliasControllerIsLeftHand(controller);
        }

        /// <summary>
        /// The IsControllerRightHand/1 method is used to check if the given controller is the the right hand controller.
        /// </summary>
        /// <param name="controller">The GameObject to check.</param>
        /// <returns>Returns true if the given controller is the right hand controller.</returns>
        public override bool IsControllerRightHand(GameObject controller)
        {
            return CheckActualOrScriptAliasControllerIsRightHand(controller);
        }

        /// <summary>
        /// The IsControllerLeftHand/2 method is used to check if the given controller is the the left hand controller.
        /// </summary>
        /// <param name="controller">The GameObject to check.</param>
        /// <param name="actual">If true it will check the actual controller, if false it will check the script alias controller.</param>
        /// <returns>Returns true if the given controller is the left hand controller.</returns>
        public override bool IsControllerLeftHand(GameObject controller, bool actual)
        {
            return CheckControllerLeftHand(controller, actual);
        }

        /// <summary>
        /// The IsControllerRightHand/2 method is used to check if the given controller is the the right hand controller.
        /// </summary>
        /// <param name="controller">The GameObject to check.</param>
        /// <param name="actual">If true it will check the actual controller, if false it will check the script alias controller.</param>
        /// <returns>Returns true if the given controller is the right hand controller.</returns>
        public override bool IsControllerRightHand(GameObject controller, bool actual)
        {
            return CheckControllerRightHand(controller, actual);
        }

        /// <summary>
        /// The GetControllerModel method returns the model alias for the given GameObject.
        /// </summary>
        /// <param name="controller">The GameObject to get the model alias for.</param>
        /// <returns>The GameObject that has the model alias within it.</returns>
        public override GameObject GetControllerModel(GameObject controller)
        {
            return GetControllerModelFromController(controller);
        }

        /// <summary>
        /// The GetControllerModel method returns the model alias for the given controller hand.
        /// </summary>
        /// <param name="hand">The hand enum of which controller model to retrieve.</param>
        /// <returns>The GameObject that has the model alias within it.</returns>
        public override GameObject GetControllerModel(ControllerHand hand)
        {
            GameObject model = null;
            GameObject simPlayer = SDK_InputSimulator.FindInScene();
            if (simPlayer)
            {
                switch (hand)
                {
                    case ControllerHand.Left:
                        model = simPlayer.transform.FindChild("LeftHand/Hand").gameObject;
                        break;
                    case ControllerHand.Right:
                        model = simPlayer.transform.FindChild("RightHand/Hand").gameObject;
                        break;
                }
            }
            return model;
        }

        /// <summary>
        /// The GetControllerRenderModel method gets the game object that contains the given controller's render model.
        /// </summary>
        /// <param name="controller">The GameObject to check.</param>
        /// <returns>A GameObject containing the object that has a render model for the controller.</returns>
        public override GameObject GetControllerRenderModel(GameObject controller)
        {
            return controller.transform.parent.FindChild("Hand").gameObject;
        }

        /// <summary>
        /// The SetControllerRenderModelWheel method sets the state of the scroll wheel on the controller render model.
        /// </summary>
        /// <param name="renderModel">The GameObject containing the controller render model.</param>
        /// <param name="state">If true and the render model has a scroll wheen then it will be displayed, if false then the scroll wheel will be hidden.</param>
        public override void SetControllerRenderModelWheel(GameObject renderModel, bool state)
        {

        }

        /// <summary>
        /// The HapticPulseOnIndex method is used to initiate a simple haptic pulse on the tracked object of the given index.
        /// </summary>
        /// <param name="index">The index of the tracked object to initiate the haptic pulse on.</param>
        /// <param name="strength">The intensity of the rumble of the controller motor. `0` to `1`.</param>
        public override void HapticPulseOnIndex(uint index, float strength = 0.5f)
        {

        }

        /// <summary>
        /// The GetHapticModifiers method is used to return modifiers for the duration and interval if the SDK handles it slightly differently.
        /// </summary>
        /// <returns>An SDK_ControllerHapticModifiers object with a given `durationModifier` and an `intervalModifier`.</returns>
        public override SDK_ControllerHapticModifiers GetHapticModifiers()
        {
            return new SDK_ControllerHapticModifiers();
        }

        /// <summary>
        /// The GetVelocityOnIndex method is used to determine the current velocity of the tracked object on the given index.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>A Vector3 containing the current velocity of the tracked object.</returns>
        public override Vector3 GetVelocityOnIndex(uint index)
        {
            switch (index)
            {
                case 1:
                    return controllers.rightController.GetVelocity();
                case 2:
                    return controllers.leftController.GetVelocity();
                default:
                    return Vector3.zero;
            }
        }

        /// <summary>
        /// The GetAngularVelocityOnIndex method is used to determine the current angular velocity of the tracked object on the given index.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>A Vector3 containing the current angular velocity of the tracked object.</returns>
        public override Vector3 GetAngularVelocityOnIndex(uint index)
        {
            switch (index)
            {
                case 1:
                    return controllers.rightController.GetAngularVelocity();
                case 2:
                    return controllers.leftController.GetAngularVelocity();
                default:
                    return Vector3.zero;
            }
        }

        /// <summary>
        /// The GetTouchpadAxisOnIndex method is used to get the current touch position on the controller touchpad.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>A Vector2 containing the current x,y position of where the touchpad is being touched.</returns>
        public override Vector2 GetTouchpadAxisOnIndex(uint index)
        {
            return Vector2.zero;
        }

        /// <summary>
        /// The GetTriggerAxisOnIndex method is used to get the current trigger position on the controller.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>A Vector2 containing the current position of the trigger.</returns>
        public override Vector2 GetTriggerAxisOnIndex(uint index)
        {
            return Vector2.zero;
        }

        /// <summary>
        /// The GetGripAxisOnIndex method is used to get the current grip position on the controller.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>A Vector2 containing the current position of the grip.</returns>
        public override Vector2 GetGripAxisOnIndex(uint index)
        {
            return Vector2.zero;
        }

        /// <summary>
        /// The GetTriggerHairlineDeltaOnIndex method is used to get the difference between the current trigger press and the previous frame trigger press.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>The delta between the trigger presses.</returns>
        public override float GetTriggerHairlineDeltaOnIndex(uint index)
        {
            return 0;
        }

        /// <summary>
        /// The GetGripHairlineDeltaOnIndex method is used to get the difference between the current grip press and the previous frame grip press.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>The delta between the grip presses.</returns>
        public override float GetGripHairlineDeltaOnIndex(uint index)
        {
            return 0f;
        }

        /// <summary>
        /// The IsTriggerPressedOnIndex method is used to determine if the controller button is being pressed down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being pressed.</returns>
        public override bool IsTriggerPressedOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.Press, KeyCode.Mouse1);
        }

        /// <summary>
        /// The IsTriggerPressedDownOnIndex method is used to determine if the controller button has just been pressed down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been pressed down.</returns>
        public override bool IsTriggerPressedDownOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressDown, KeyCode.Mouse1);
        }

        /// <summary>
        /// The IsTriggerPressedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsTriggerPressedUpOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressUp, KeyCode.Mouse1);
        }

        /// <summary>
        /// The IsTriggerTouchedOnIndex method is used to determine if the controller button is being touched down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being touched.</returns>
        public override bool IsTriggerTouchedOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsTriggerTouchedDownOnIndex method is used to determine if the controller button has just been touched down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been touched down.</returns>
        public override bool IsTriggerTouchedDownOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsTriggerTouchedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsTriggerTouchedUpOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsHairTriggerDownOnIndex method is used to determine if the controller button has passed it's press threshold.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has passed it's press threshold.</returns>
        public override bool IsHairTriggerDownOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsHairTriggerUpOnIndex method is used to determine if the controller button has been released from it's press threshold.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released from it's press threshold.</returns>
        public override bool IsHairTriggerUpOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsGripPressedOnIndex method is used to determine if the controller button is being pressed down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being pressed.</returns>
        public override bool IsGripPressedOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.Press, KeyCode.Mouse0);
        }

        /// <summary>
        /// The IsGripPressedDownOnIndex method is used to determine if the controller button has just been pressed down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been pressed down.</returns>
        public override bool IsGripPressedDownOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressDown, KeyCode.Mouse0);
        }

        /// <summary>
        /// The IsGripPressedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsGripPressedUpOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressUp, KeyCode.Mouse0);
        }

        /// <summary>
        /// The IsGripTouchedOnIndex method is used to determine if the controller button is being touched down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being touched.</returns>
        public override bool IsGripTouchedOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsGripTouchedDownOnIndex method is used to determine if the controller button has just been touched down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been touched down.</returns>
        public override bool IsGripTouchedDownOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsGripTouchedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsGripTouchedUpOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsHairGripDownOnIndex method is used to determine if the controller button has passed it's press threshold.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has passed it's press threshold.</returns>
        public override bool IsHairGripDownOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsHairGripUpOnIndex method is used to determine if the controller button has been released from it's press threshold.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released from it's press threshold.</returns>
        public override bool IsHairGripUpOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsTouchpadPressedOnIndex method is used to determine if the controller button is being pressed down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being pressed.</returns>
        public override bool IsTouchpadPressedOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.Press, KeyCode.Q);
        }

        /// <summary>
        /// The IsTouchpadPressedDownOnIndex method is used to determine if the controller button has just been pressed down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been pressed down.</returns>
        public override bool IsTouchpadPressedDownOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressDown, KeyCode.Q);
        }

        /// <summary>
        /// The IsTouchpadPressedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsTouchpadPressedUpOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressUp, KeyCode.Q);
        }

        /// <summary>
        /// The IsTouchpadTouchedOnIndex method is used to determine if the controller button is being touched down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being touched.</returns>
        public override bool IsTouchpadTouchedOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsTouchpadTouchedDownOnIndex method is used to determine if the controller button has just been touched down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been touched down.</returns>
        public override bool IsTouchpadTouchedDownOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsTouchpadTouchedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsTouchpadTouchedUpOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsApplicationMenuPressedOnIndex method is used to determine if the controller button is being pressed down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being pressed.</returns>
        public override bool IsButtonOnePressedOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.Press, KeyCode.E);
        }

        /// <summary>
        /// The IsApplicationMenuPressedDownOnIndex method is used to determine if the controller button has just been pressed down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been pressed down.</returns>
        public override bool IsButtonOnePressedDownOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressDown, KeyCode.E);
        }

        /// <summary>
        /// The IsApplicationMenuPressedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsButtonOnePressedUpOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressUp, KeyCode.E);
        }

        /// <summary>
        /// The IsApplicationMenuTouchedOnIndex method is used to determine if the controller button is being touched down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being touched.</returns>
        public override bool IsButtonOneTouchedOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsApplicationMenuTouchedDownOnIndex method is used to determine if the controller button has just been touched down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been touched down.</returns>
        public override bool IsButtonOneTouchedDownOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsApplicationMenuTouchedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsButtonOneTouchedUpOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsButtonTwoPressedOnIndex method is used to determine if the controller button is being pressed down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being pressed.</returns>
        public override bool IsButtonTwoPressedOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.Press, KeyCode.R);
        }

        /// <summary>
        /// The IsButtonTwoPressedDownOnIndex method is used to determine if the controller button has just been pressed down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been pressed down.</returns>
        public override bool IsButtonTwoPressedDownOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressDown, KeyCode.R);
        }

        /// <summary>
        /// The IsButtonTwoPressedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsButtonTwoPressedUpOnIndex(uint index)
        {
            return IsButtonPressed(index, ButtonPressTypes.PressUp, KeyCode.R);
        }

        /// <summary>
        /// The IsButtonTwoTouchedOnIndex method is used to determine if the controller button is being touched down continually.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button is continually being touched.</returns>
        public override bool IsButtonTwoTouchedOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsButtonTwoTouchedDownOnIndex method is used to determine if the controller button has just been touched down.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been touched down.</returns>
        public override bool IsButtonTwoTouchedDownOnIndex(uint index)
        {
            return false;
        }

        /// <summary>
        /// The IsButtonTwoTouchedUpOnIndex method is used to determine if the controller button has just been released.
        /// </summary>
        /// <param name="index">The index of the tracked object to check for.</param>
        /// <returns>Returns true if the button has just been released.</returns>
        public override bool IsButtonTwoTouchedUpOnIndex(uint index)
        {
            return false;
        }

        private void OnEnable()
        {
            controllers = new SimControllers();
        }

        private bool IsButtonPressed(uint index, ButtonPressTypes type, KeyCode button)
        {
            if (index >= uint.MaxValue)
            {
                return false;
            }

            if (index == 1)
            {
                if (!controllers.rightController.Selected)
                {
                    return false;
                }
            }
            else if (index == 2)
            {
                if (!controllers.leftController.Selected)
                {
                    return false;
                }
            }
            else
            {
                return false;
            }

            switch (type)
            {
                case ButtonPressTypes.Press:
                    return Input.GetKey(button);
                case ButtonPressTypes.PressDown:
                    return Input.GetKeyDown(button);
                case ButtonPressTypes.PressUp:
                    return Input.GetKeyUp(button);
            }
            return false;
        }

        private class SimControllers
        {
            public Transform rightHand;
            public Transform leftHand;
            public SDK_ControllerSim rightController;
            public SDK_ControllerSim leftController;
            public SimControllers()
            {
                GameObject simPlayer = SDK_InputSimulator.FindInScene();
                if (simPlayer)
                {
                    rightHand = simPlayer.transform.FindChild("RightHand");
                    leftHand = simPlayer.transform.FindChild("LeftHand");
                    rightController = rightHand.GetComponent<SDK_ControllerSim>();
                    leftController = leftHand.GetComponent<SDK_ControllerSim>();
                }
            }
        }
    }
#else
    public class SDK_SimController : SDK_FallbackController
    {
    }
#endif
}


text:
protoc-gen-elmtypes
====================

Generate elm type definitions for proto3 messages and enums.

Contributions welcome.

```sh
$ cat simple.proto
```
```proto
syntax = "proto3";

message SearchRequest {
  string query = 1;
  int32 page_number = 2;
  int32 result_per_page = 3;
  enum Corpus {
    UNIVERSAL = 0;
    WEB = 1;
    IMAGES = 2;
    LOCAL = 3;
    NEWS = 4;
    PRODUCTS = 5;
    VIDEO = 6;
  }
  Corpus corpus = 4;
}

message SearchResponse {
  repeated string results = 1;
  int32 num_results = 2;
  SearchRequest original_request = 3;
}
```

# Example use
```sh
$ protoc -I. --elmtypes_out=. simple.proto
```
This generates Simple.elm.

## [Simple.elm](Simple.elm)
```elm
-- this is a generated file
module Simple exposing (..)
import Json.Encode as JE
import Json.Decode exposing (..)

type SearchRequestCorpus = UNIVERSAL | WEB | IMAGES | LOCAL | NEWS | PRODUCTS | VIDEO

type alias SearchRequest = {
  query: Maybe String,
  page_number: Maybe Int,
  result_per_page: Maybe Int,
  corpus: Maybe SearchRequestCorpus
}

type alias SearchResponse = {
  results: Maybe List String,
  num_results: Maybe Int,
  original_request: Maybe SearchRequest
}

(maybe ("SearchRequestCorpus" := UNIVERSAL | WEB | IMAGES | LOCAL | NEWS | PRODUCTS | VIDEO))

searchRequest = object4 SearchRequest (maybe ("query" := string)) (maybe ("page_number" := int)) (maybe ("result_per_page" := int)) (maybe ("corpus" := SearchRequestCorpus))

searchResponse = object3 SearchResponse (maybe ("results" := (list string))) (maybe ("num_results" := int)) (maybe ("original_request" := SearchRequest))
````


text:
<?php get_header(); ?>
<?php  if(have_posts() ): ?>

        <?php while (have_posts() ):the_post(); ?>
          <?php  get_template_part('content','single' );  ?>

              <button type="button" name="button" class="btn btn-default"><?php previous_post_link('&laquo %link', 'Previous Post') ?></button>

              <button type="button" name="button" class="btn btn-default"><?php next_post_link('%link &raquo', 'Next Post') ?></button>

      <?php endwhile?>

        <?php if (comments_open() || get_comments_number() ):
                comments_template();
              endif
          ?>

          <?php get_sidebar(); ?>

<?php endif?>

<?php get_footer(); ?>


text:
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
    arrayTag = '[object Array]',
    boolTag = '[object Boolean]',
    dateTag = '[object Date]',
    errorTag = '[object Error]',
    funcTag = '[object Function]',
    mapTag = '[object Map]',
    numberTag = '[object Number]',
    objectTag = '[object Object]',
    regexpTag = '[object RegExp]',
    setTag = '[object Set]',
    stringTag = '[object String]',
    weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]',
    float32Tag = '[object Float32Array]',
    float64Tag = '[object Float64Array]',
    int8Tag = '[object Int8Array]',
    int16Tag = '[object Int16Array]',
    int32Tag = '[object Int32Array]',
    uint8Tag = '[object Uint8Array]',
    uint8ClampedTag = '[object Uint8ClampedArray]',
    uint16Tag = '[object Uint16Array]',
    uint32Tag = '[object Uint32Array]';

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dateTag] = typedArrayTags[errorTag] =
typedArrayTags[funcTag] = typedArrayTags[mapTag] =
typedArrayTags[numberTag] = typedArrayTags[objectTag] =
typedArrayTags[regexpTag] = typedArrayTags[setTag] =
typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;

/** Used for built-in method references. */
var objectProto = Object.prototype;

/**
 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
 * of values.
 */
var objectToString = objectProto.toString;

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return !!value && typeof value == 'object';
}

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
function isTypedArray(value) {
  return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
}

module.exports = isTypedArray;


text:
//
//  PlayFileViewController.m
//  EZAudioPlayFileExample
//
//  Created by Syed Haris Ali on 12/16/13.
//  Copyright (c) 2013 Syed Haris Ali. All rights reserved.
//

#import "PlayFileViewController.h"

@interface PlayFileViewController (){
  float  *_waveformData;
  UInt32 _waveformDrawingIndex;
  UInt32 _waveformFrameRate;
  UInt32 _waveformTotalBuffers;
}
@end

@implementation PlayFileViewController
@synthesize audioFile = _audioFile;
@synthesize audioPlot = _audioPlot;
@synthesize eof = _eof;
@synthesize framePositionSlider = _framePositionSlider;

#pragma mark - Initialization
-(id)init {
  self = [super init];
  if(self){
    [self initializeViewController];
  }
  return self;
}

-(id)initWithCoder:(NSCoder *)aDecoder {
  self = [super initWithCoder:aDecoder];
  if(self){
    [self initializeViewController];
  }
  return self;
}

#pragma mark - Initialize View Controller Here
-(void)initializeViewController {
}

#pragma mark - Customize the Audio Plot
-(void)viewDidLoad {

  [super viewDidLoad];

  /*
   Customizing the audio plot's look
   */
  // Background color
  self.audioPlot.backgroundColor = [UIColor colorWithRed: 0.816 green: 0.349 blue: 0.255 alpha: 1];
  // Waveform color
  self.audioPlot.color           = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
  // Plot type
  self.audioPlot.plotType        = EZPlotTypeBuffer;
  // Fill
  self.audioPlot.shouldFill      = YES;
  // Mirror
  self.audioPlot.shouldMirror    = YES;

  /*
   Try opening the sample file
   */
  [self openFileWithFilePathURL:[NSURL fileURLWithPath:kAudioFileDefault]];

}

#pragma mark - Actions
-(void)changePlotType:(id)sender {
  NSInteger selectedSegment = [sender selectedSegmentIndex];
  switch(selectedSegment){
    case 0:
      [self drawBufferPlot];
      break;
    case 1:
      [self drawRollingPlot];
      break;
    default:
      break;
  }
}

-(void)play:(id)sender {
  if( ![[EZOutput sharedOutput] isPlaying] ){
    if( self.eof ){
      [self.audioFile seekToFrame:0];
    }
    [EZOutput sharedOutput].outputDataSource = self;
    [[EZOutput sharedOutput] startPlayback];
  }
  else {
    [EZOutput sharedOutput].outputDataSource = nil;
    [[EZOutput sharedOutput] stopPlayback];
  }
}

-(void)seekToFrame:(id)sender {
  [self.audioFile seekToFrame:(SInt64)[(UISlider*)sender value]];
}

#pragma mark - Action Extensions
/*
 Give the visualization of the current buffer (this is almost exactly the openFrameworks audio input example)
 */
-(void)drawBufferPlot {
  // Change the plot type to the buffer plot
  self.audioPlot.plotType = EZPlotTypeBuffer;
  // Don't fill
  self.audioPlot.shouldFill = NO;
  // Don't mirror over the x-axis
  self.audioPlot.shouldMirror = NO;
}

/*
 Give the classic mirrored, rolling waveform look
 */
-(void)drawRollingPlot {
  // Change the plot type to the rolling plot
  self.audioPlot.plotType = EZPlotTypeRolling;
  // Fill the waveform
  self.audioPlot.shouldFill = YES;
  // Mirror over the x-axis
  self.audioPlot.shouldMirror = YES;
}

-(void)openFileWithFilePathURL:(NSURL*)filePathURL {

  // Stop playback
  [[EZOutput sharedOutput] stopPlayback];

  self.audioFile                        = [EZAudioFile audioFileWithURL:filePathURL];
  self.audioFile.audioFileDelegate      = self;
  self.eof                              = NO;
  self.filePathLabel.text               = filePathURL.lastPathComponent;
  self.framePositionSlider.maximumValue = (float)self.audioFile.totalFrames;

  // Set the client format from the EZAudioFile on the output
  [[EZOutput sharedOutput] setAudioStreamBasicDescription:self.audioFile.clientFormat];

  // Plot the whole waveform
  self.audioPlot.plotType        = EZPlotTypeBuffer;
  self.audioPlot.shouldFill      = YES;
  self.audioPlot.shouldMirror    = YES;
  [self.audioFile getWaveformDataWithCompletionBlock:^(float *waveformData, UInt32 length) {
    [self.audioPlot updateBuffer:waveformData withBufferSize:length];
  }];

}

#pragma mark - EZAudioFileDelegate
-(void)audioFile:(EZAudioFile *)audioFile
       readAudio:(float **)buffer
  withBufferSize:(UInt32)bufferSize
withNumberOfChannels:(UInt32)numberOfChannels {
  if( [EZOutput sharedOutput].isPlaying ){
    dispatch_async(dispatch_get_main_queue(), ^{
      if( self.audioPlot.plotType     == EZPlotTypeBuffer &&
         self.audioPlot.shouldFill    == YES              &&
         self.audioPlot.shouldMirror  == YES ){
        self.audioPlot.shouldFill   = NO;
        self.audioPlot.shouldMirror = NO;
      }
      [self.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
    });
  }
}

-(void)audioFile:(EZAudioFile *)audioFile
 updatedPosition:(SInt64)framePosition {
  dispatch_async(dispatch_get_main_queue(), ^{
    if( !self.framePositionSlider.touchInside ){
      self.framePositionSlider.value = (float)framePosition;
    }
  });
}

#pragma mark - EZOutputDataSource
-(AudioBufferList *)output:(EZOutput *)output
 needsBufferListWithFrames:(UInt32)frames
            withBufferSize:(UInt32 *)bufferSize {
  if( self.audioFile ){

    // Reached the end of the file
    if( self.eof ){
      // Here's what you do to loop the file
      [self.audioFile seekToFrame:0];
      self.eof = NO;
    }

    // Allocate a buffer list to hold the file's data
    AudioBufferList *bufferList = [EZAudio audioBufferList];
    BOOL eof;
    [self.audioFile readFrames:frames
               audioBufferList:bufferList
                    bufferSize:bufferSize
                           eof:&eof];
    self.eof = eof;

    // Reached the end of the file on the last read
    if( eof ){
      [EZAudio freeBufferList:bufferList];
      return nil;
    }
    return bufferList;

  }
  return nil;
}

-(AudioStreamBasicDescription)outputHasAudioStreamBasicDescription:(EZOutput *)output {
  return self.audioFile.clientFormat;
}

@end


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v10/enums/external_conversion_source.proto

namespace Google\Ads\GoogleAds\V10\Enums\ExternalConversionSourceEnum;

use UnexpectedValueException;

/**
 * The external conversion source that is associated with a ConversionAction.
 *
 * Protobuf type google.ads.googleads.v10.enums.ExternalConversionSourceEnum.ExternalConversionSource
 */
class ExternalConversionSource
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum UNSPECIFIED = 0;
     */
    const UNSPECIFIED = 0;
    /**
     * Represents value unknown in this version.
     *
     * Generated from protobuf enum UNKNOWN = 1;
     */
    const UNKNOWN = 1;
    /**
     * Conversion that occurs when a user navigates to a particular webpage
     * after viewing an ad; Displayed in Google Ads UI as 'Website'.
     *
     * Generated from protobuf enum WEBPAGE = 2;
     */
    const WEBPAGE = 2;
    /**
     * Conversion that comes from linked Google Analytics goal or transaction;
     * Displayed in Google Ads UI as 'Analytics'.
     *
     * Generated from protobuf enum ANALYTICS = 3;
     */
    const ANALYTICS = 3;
    /**
     * Website conversion that is uploaded through ConversionUploadService;
     * Displayed in Google Ads UI as 'Import from clicks'.
     *
     * Generated from protobuf enum UPLOAD = 4;
     */
    const UPLOAD = 4;
    /**
     * Conversion that occurs when a user clicks on a call extension directly on
     * an ad; Displayed in Google Ads UI as 'Calls from ads'.
     *
     * Generated from protobuf enum AD_CALL_METRICS = 5;
     */
    const AD_CALL_METRICS = 5;
    /**
     * Conversion that occurs when a user calls a dynamically-generated phone
     * number (by installed javascript) from an advertiser's website after
     * clicking on an ad; Displayed in Google Ads UI as 'Calls from website'.
     *
     * Generated from protobuf enum WEBSITE_CALL_METRICS = 6;
     */
    const WEBSITE_CALL_METRICS = 6;
    /**
     * Conversion that occurs when a user visits an advertiser's retail store
     * after clicking on a Google ad;
     * Displayed in Google Ads UI as 'Store visits'.
     *
     * Generated from protobuf enum STORE_VISITS = 7;
     */
    const STORE_VISITS = 7;
    /**
     * Conversion that occurs when a user takes an in-app action such as a
     * purchase in an Android app;
     * Displayed in Google Ads UI as 'Android in-app action'.
     *
     * Generated from protobuf enum ANDROID_IN_APP = 8;
     */
    const ANDROID_IN_APP = 8;
    /**
     * Conversion that occurs when a user takes an in-app action such as a
     * purchase in an iOS app;
     * Displayed in Google Ads UI as 'iOS in-app action'.
     *
     * Generated from protobuf enum IOS_IN_APP = 9;
     */
    const IOS_IN_APP = 9;
    /**
     * Conversion that occurs when a user opens an iOS app for the first time;
     * Displayed in Google Ads UI as 'iOS app install (first open)'.
     *
     * Generated from protobuf enum IOS_FIRST_OPEN = 10;
     */
    const IOS_FIRST_OPEN = 10;
    /**
     * Legacy app conversions that do not have an AppPlatform provided;
     * Displayed in Google Ads UI as 'Mobile app'.
     *
     * Generated from protobuf enum APP_UNSPECIFIED = 11;
     */
    const APP_UNSPECIFIED = 11;
    /**
     * Conversion that occurs when a user opens an Android app for the first
     * time; Displayed in Google Ads UI as 'Android app install (first open)'.
     *
     * Generated from protobuf enum ANDROID_FIRST_OPEN = 12;
     */
    const ANDROID_FIRST_OPEN = 12;
    /**
     * Call conversion that is uploaded through ConversionUploadService;
     * Displayed in Google Ads UI as 'Import from calls'.
     *
     * Generated from protobuf enum UPLOAD_CALLS = 13;
     */
    const UPLOAD_CALLS = 13;
    /**
     * Conversion that comes from a linked Firebase event;
     * Displayed in Google Ads UI as 'Firebase'.
     *
     * Generated from protobuf enum FIREBASE = 14;
     */
    const FIREBASE = 14;
    /**
     * Conversion that occurs when a user clicks on a mobile phone number;
     * Displayed in Google Ads UI as 'Phone number clicks'.
     *
     * Generated from protobuf enum CLICK_TO_CALL = 15;
     */
    const CLICK_TO_CALL = 15;
    /**
     * Conversion that comes from Salesforce;
     * Displayed in Google Ads UI as 'Salesforce.com'.
     *
     * Generated from protobuf enum SALESFORCE = 16;
     */
    const SALESFORCE = 16;
    /**
     * Conversion that comes from in-store purchases recorded by CRM;
     * Displayed in Google Ads UI as 'Store sales (data partner)'.
     *
     * Generated from protobuf enum STORE_SALES_CRM = 17;
     */
    const STORE_SALES_CRM = 17;
    /**
     * Conversion that comes from in-store purchases from payment network;
     * Displayed in Google Ads UI as 'Store sales (payment network)'.
     *
     * Generated from protobuf enum STORE_SALES_PAYMENT_NETWORK = 18;
     */
    const STORE_SALES_PAYMENT_NETWORK = 18;
    /**
     * Codeless Google Play conversion;
     * Displayed in Google Ads UI as 'Google Play'.
     *
     * Generated from protobuf enum GOOGLE_PLAY = 19;
     */
    const GOOGLE_PLAY = 19;
    /**
     * Conversion that comes from a linked third-party app analytics event;
     * Displayed in Google Ads UI as 'Third-party app analytics'.
     *
     * Generated from protobuf enum THIRD_PARTY_APP_ANALYTICS = 20;
     */
    const THIRD_PARTY_APP_ANALYTICS = 20;
    /**
     * Conversion that is controlled by Google Attribution.
     *
     * Generated from protobuf enum GOOGLE_ATTRIBUTION = 21;
     */
    const GOOGLE_ATTRIBUTION = 21;
    /**
     * Store Sales conversion based on first-party or third-party merchant data
     * uploads. Displayed in Google Ads UI as 'Store sales (direct upload)'.
     *
     * Generated from protobuf enum STORE_SALES_DIRECT_UPLOAD = 23;
     */
    const STORE_SALES_DIRECT_UPLOAD = 23;
    /**
     * Store Sales conversion based on first-party or third-party merchant
     * data uploads and/or from in-store purchases using cards from payment
     * networks. Displayed in Google Ads UI as 'Store sales'.
     *
     * Generated from protobuf enum STORE_SALES = 24;
     */
    const STORE_SALES = 24;
    /**
     * Conversions imported from Search Ads 360 Floodlight data.
     *
     * Generated from protobuf enum SEARCH_ADS_360 = 25;
     */
    const SEARCH_ADS_360 = 25;
    /**
     * Conversions that track local actions from Google's products and services
     * after interacting with an ad.
     *
     * Generated from protobuf enum GOOGLE_HOSTED = 27;
     */
    const GOOGLE_HOSTED = 27;
    /**
     * Conversions reported by Floodlight tags.
     *
     * Generated from protobuf enum FLOODLIGHT = 29;
     */
    const FLOODLIGHT = 29;
    /**
     * Conversions that come from Google Analytics specifically for Search Ads
     * 360. Displayed in Google Ads UI as Analytics (SA360).
     *
     * Generated from protobuf enum ANALYTICS_SEARCH_ADS_360 = 31;
     */
    const ANALYTICS_SEARCH_ADS_360 = 31;
    /**
     * Conversion that comes from a linked Firebase event for Search Ads 360.
     *
     * Generated from protobuf enum FIREBASE_SEARCH_ADS_360 = 33;
     */
    const FIREBASE_SEARCH_ADS_360 = 33;
    /**
     * Conversion that is reported by Floodlight for DV360.
     *
     * Generated from protobuf enum DISPLAY_AND_VIDEO_360_FLOODLIGHT = 34;
     */
    const DISPLAY_AND_VIDEO_360_FLOODLIGHT = 34;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::WEBPAGE => 'WEBPAGE',
        self::ANALYTICS => 'ANALYTICS',
        self::UPLOAD => 'UPLOAD',
        self::AD_CALL_METRICS => 'AD_CALL_METRICS',
        self::WEBSITE_CALL_METRICS => 'WEBSITE_CALL_METRICS',
        self::STORE_VISITS => 'STORE_VISITS',
        self::ANDROID_IN_APP => 'ANDROID_IN_APP',
        self::IOS_IN_APP => 'IOS_IN_APP',
        self::IOS_FIRST_OPEN => 'IOS_FIRST_OPEN',
        self::APP_UNSPECIFIED => 'APP_UNSPECIFIED',
        self::ANDROID_FIRST_OPEN => 'ANDROID_FIRST_OPEN',
        self::UPLOAD_CALLS => 'UPLOAD_CALLS',
        self::FIREBASE => 'FIREBASE',
        self::CLICK_TO_CALL => 'CLICK_TO_CALL',
        self::SALESFORCE => 'SALESFORCE',
        self::STORE_SALES_CRM => 'STORE_SALES_CRM',
        self::STORE_SALES_PAYMENT_NETWORK => 'STORE_SALES_PAYMENT_NETWORK',
        self::GOOGLE_PLAY => 'GOOGLE_PLAY',
        self::THIRD_PARTY_APP_ANALYTICS => 'THIRD_PARTY_APP_ANALYTICS',
        self::GOOGLE_ATTRIBUTION => 'GOOGLE_ATTRIBUTION',
        self::STORE_SALES_DIRECT_UPLOAD => 'STORE_SALES_DIRECT_UPLOAD',
        self::STORE_SALES => 'STORE_SALES',
        self::SEARCH_ADS_360 => 'SEARCH_ADS_360',
        self::GOOGLE_HOSTED => 'GOOGLE_HOSTED',
        self::FLOODLIGHT => 'FLOODLIGHT',
        self::ANALYTICS_SEARCH_ADS_360 => 'ANALYTICS_SEARCH_ADS_360',
        self::FIREBASE_SEARCH_ADS_360 => 'FIREBASE_SEARCH_ADS_360',
        self::DISPLAY_AND_VIDEO_360_FLOODLIGHT => 'DISPLAY_AND_VIDEO_360_FLOODLIGHT',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }

    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ExternalConversionSource::class, \Google\Ads\GoogleAds\V10\Enums\ExternalConversionSourceEnum_ExternalConversionSource::class);


text:
package com.github.rvesse.airline.examples.userguide.help.sections;

import com.github.rvesse.airline.annotations.AirlineModule;
import com.github.rvesse.airline.annotations.Arguments;
import com.github.rvesse.airline.annotations.Command;
import com.github.rvesse.airline.annotations.help.Discussion;
import com.github.rvesse.airline.examples.ExampleExecutor;
import com.github.rvesse.airline.examples.ExampleRunnable;
import com.github.rvesse.airline.help.Help;
import com.github.rvesse.airline.model.CommandMetadata;

import java.io.IOException;
import java.util.List;

@Command(name = "discussed", description = "A command with a discussion section")
//@formatter:off
@Discussion(paragraphs =
    {
        "This command uses the @Discussion annotation to add a discussion section to its help",
        "This is an example of using a Help Section annotation to add content into our generated help output."
    })
//@formatter:on
public class Discussed implements ExampleRunnable {

    @AirlineModule
    private CommandMetadata metadata;

    @Arguments
    private List<String> arguments;

    @Override
    public int run() {
        try {
            Help.help(this.metadata);
            return 0;
        } catch (IOException e) {
            e.printStackTrace();
            return 1;
        }
    }

    public static void main(String[] args) {
        ExampleExecutor.executeSingleCommand(Discussed.class, args);
    }

}


text:
package de.javax.util.eventbinding.impl.testmodel;

public class ParentComponentEvent {

    public ParentComponentEvent() {
        // TODO Auto-generated constructor stub
    }

}


text:
TRIBITS_PROJECT_DEFINE_EXTRA_REPOSITORIES(
  preRepoOnePackage     ""  GIT  url1:/git/preRepoOnePackage         PRE  Continuous
  preCopyrightTrilinos  ""  GIT  url1.com:/git/preCopyrightTrilinos  ""   Continuous
  extraTrilinosRepo     ""  GIT  usr2.com:/git/extraTrilinosRepo     ""   Nightly
  ExtraTeuchosRepo  packages/teuchos/extrastuff GIT  url3.com:/ExtraStuff  NOPACKAGES  Continuous
  )


text:
package org.junit;

public class PackageLoaderClass2 {
}


text:
package org.apache.flex.compiler.internal.definitions;

import org.apache.flex.compiler.definitions.IMemberedDefinition;

/**
 * {@code MemberedDefinition} is the abstract base class for definitions that
 * have members, namely definitions for packages, classes, and interfaces.
 */
public abstract class MemberedDefinition extends ScopedDefinitionBase implements IMemberedDefinition
{
    /**
     * Constructor.
     *
     * @param name The name of this definition.
     */
    public MemberedDefinition(String name)
    {
        super(name);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tail.Filter
{
    using System.Text.RegularExpressions;

    /// <summary>
    /// Trims a tail line in the middle (i.e. from 1 regex group to the next group).  For example:
    ///
    /// Trim Regex = "(brown)(the)"
    /// Tail Line: "The quick brown fox jumps over the lazy dog"
    ///
    /// Result: "The quick lazy dog"
    /// </summary>
    public class TrimMiddleProcessor : PipelineMember, IFilterProcessor
    {
        private Regex trimMiddle = null;

        public TrimMiddleProcessor(string trimFromStr)
        {
            if (!string.IsNullOrWhiteSpace(trimFromStr))
            {
                trimMiddle = new Regex(trimFromStr, RegexOptions.Compiled | RegexOptions.Singleline);

                if (trimMiddle.GetGroupNumbers().Length < 2)
                {
                    throw new ArgumentException("Regex must have at least two groups, exmaple: (group1)(group2)");
                }
            }
        }

        protected override FilterResult Execute(FilterResult filterResult)
        {
            if (filterResult.IsMatch && trimMiddle != null)
            {
                var line = filterResult.Result;

                var match = trimMiddle.Match(line);

                if (match.Groups.Count >= 2)
                {
                    var start = match.Groups[0].Index;
                    var end = match.Groups[match.Groups.Count - 1].Index + match.Groups[match.Groups.Count - 1].Length;

                    filterResult.Result = line.Remove(start, end - start);
                }
            }

            return filterResult;
        }
    }
}


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

    <artifactId>melon-mock</artifactId>
    <packaging>jar</packaging>

    <name>melon-mock</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>LATEST</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.1</version>
        </dependency>
    </dependencies>
</project>


text:
/* eslint-env browser */
/* global rempl */

const subcriber = rempl.getSubscriber();
const output = document.body.appendChild(document.createElement('div'));

subcriber.subscribe((data) => {
    output.innerHTML = '<b>Current value:</b> ' + data;
});


text:
import test from 'ava';
import parser from '..';
import {parse} from './util/helpers';

test('node#clone', (t) => {
    parse('[href="test"]', (selectors) => {
        let selector = selectors.first.first;
        let clone = selector.clone();
        delete selector.parent;
        t.deepEqual(clone, selectors.first.first);
    });
});

test('node#clone of attribute', (t) => {
    parse('[href=test]', (selectors) => {
        let selector = selectors.first.first;
        let clone = selector.clone();
        delete selector.parent;
        t.deepEqual(clone, selectors.first.first);
    });
});

test('node#replaceWith', (t) => {
    let out = parse('[href="test"]', (selectors) => {
        let attr = selectors.first.first;
        let id = parser.id({value: 'test'});
        let className = parser.className({value: 'test'});
        attr.replaceWith(id, className);
    });
    t.deepEqual(out, '#test.test');
});

test('Node#appendToPropertyAndEscape', (t) => {
    let out = parse('.fo\\o', (selectors) => {
        let className = selectors.first.first;
        t.deepEqual(className.raws, {value: "fo\\o"});
        className.appendToPropertyAndEscape("value", "bar", "ba\\r");
        t.deepEqual(className.raws, {value: "fo\\oba\\r"});
    });
    t.deepEqual(out, '.fo\\oba\\r');
});

test('Node#setPropertyAndEscape with existing raws', (t) => {
    let out = parse('.fo\\o', (selectors) => {
        let className = selectors.first.first;
        t.deepEqual(className.raws, {value: "fo\\o"});
        className.setPropertyAndEscape("value", "bar", "ba\\r");
        t.deepEqual(className.raws, {value: "ba\\r"});
    });
    t.deepEqual(out, '.ba\\r');
});

test('Node#setPropertyAndEscape without existing raws', (t) => {
    let out = parse('.foo', (selectors) => {
        let className = selectors.first.first;
        t.deepEqual(className.raws, undefined);
        className.setPropertyAndEscape("value", "bar", "ba\\r");
        t.deepEqual(className.raws, {value: "ba\\r"});
    });
    t.deepEqual(out, '.ba\\r');
});

test('Node#setPropertyWithoutEscape with existing raws', (t) => {
    let out = parse('.fo\\o', (selectors) => {
        let className = selectors.first.first;
        t.deepEqual(className.raws, {value: "fo\\o"});
        className.setPropertyWithoutEscape("value", "w+t+f");
        t.deepEqual(className.raws, {});
    });
    t.deepEqual(out, '.w+t+f');
});

test('Node#setPropertyWithoutEscape without existing raws', (t) => {
    let out = parse('.foo', (selectors) => {
        let className = selectors.first.first;
        t.deepEqual(className.raws, undefined);
        className.setPropertyWithoutEscape("value", "w+t+f");
        t.deepEqual(className.raws, {});
        t.deepEqual(className.value, "w+t+f");
    });
    t.deepEqual(out, '.w+t+f');
});

test('Node#isAtPosition', (t) => {
    parse(':not(.foo),\n#foo > :matches(ol, ul)', (root) => {
        t.deepEqual(root.isAtPosition(1, 1), true);
        t.deepEqual(root.isAtPosition(1, 10), true);
        t.deepEqual(root.isAtPosition(2, 23), true);
        t.deepEqual(root.isAtPosition(2, 24), false);
        let selector = root.first;
        t.deepEqual(selector.isAtPosition(1, 1), true);
        t.deepEqual(selector.isAtPosition(1, 10), true);
        t.deepEqual(selector.isAtPosition(1, 11), false);
        let pseudoNot = selector.first;
        t.deepEqual(pseudoNot.isAtPosition(1, 1), true);
        t.deepEqual(pseudoNot.isAtPosition(1, 7), true);
        t.deepEqual(pseudoNot.isAtPosition(1, 10), true);
        t.deepEqual(pseudoNot.isAtPosition(1, 11), false);
        let notSelector = pseudoNot.first;
        t.deepEqual(notSelector.isAtPosition(1, 1), false);
        t.deepEqual(notSelector.isAtPosition(1, 4), false);
        t.deepEqual(notSelector.isAtPosition(1, 5), true);
        t.deepEqual(notSelector.isAtPosition(1, 6), true);
        t.deepEqual(notSelector.isAtPosition(1, 9), true);
        t.deepEqual(notSelector.isAtPosition(1, 10), true);
        t.deepEqual(notSelector.isAtPosition(1, 11), false);
        let notClass = notSelector.first;
        t.deepEqual(notClass.isAtPosition(1, 5), false);
        t.deepEqual(notClass.isAtPosition(1, 6), true);
        t.deepEqual(notClass.isAtPosition(1, 9), true);
        t.deepEqual(notClass.isAtPosition(1, 10), false);
        let secondSel = root.at(1);
        t.deepEqual(secondSel.isAtPosition(1, 11), false);
        t.deepEqual(secondSel.isAtPosition(2, 1), true);
        t.deepEqual(secondSel.isAtPosition(2, 23), true);
        t.deepEqual(secondSel.isAtPosition(2, 24), false);
        let combinator = secondSel.at(1);
        t.deepEqual(combinator.isAtPosition(2, 5), false);
        t.deepEqual(combinator.isAtPosition(2, 6), true);
        t.deepEqual(combinator.isAtPosition(2, 7), false);
    });
});