package com.acework.js.components.bootstrap

import com.acework.js.utils.{Mappable, Mergeable}
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.prefix_<^._

import scala.scalajs.js.{UndefOr, undefined}

/**
 * Created by weiyin on 10/03/15.
 */
object Well extends BootstrapComponent {
  override type P = Well
  override type S = Unit
  override type B = Unit
  override type N = TopNode

  override def defaultProps = Well()

  case class Well(bsClass: UndefOr[Classes.Value] = Classes.well,
                  bsStyle: UndefOr[Styles.Value] = undefined,
                  bsSize: UndefOr[Sizes.Value] = undefined,
                  addClasses: String = "")
    extends BsProps with MergeableProps[Well] {

    def merge(t: Map[String, Any]): Well = implicitly[Mergeable[Well]].merge(this, t)

    def asMap: Map[String, Any] = implicitly[Mappable[Well]].toMap(this)

    def apply(children: ReactNode*) = component(this, children)

    def apply() = component(this)
  }

  override val component = ReactComponentB[Well]("Well")
    .render { (P, C) =>

    // TODO spread props
    <.div(^.classSet1M(P.addClasses, P.bsClassSet))(C)

  }.build

}


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>edu.clemson</groupId>
        <artifactId>resolve-master</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>resolve-runtime</artifactId>
    <name>RESOLVE Runtime</name>
    <description>The RESOLVE Runtime</description>

    <build>
        <sourceDirectory>src</sourceDirectory>
        <plugins>

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


package adf.launcher.option;

import adf.launcher.ConfigKey;
import rescuecore2.config.Config;

public class OptionPoliceOffice extends Option
{

	@Override
	public String getKey()
	{
		return "-po";
	}

	@Override
	public void setValue(Config config, String[] datas)
	{
		if(datas.length == 2)
		{
			config.setValue(ConfigKey.KEY_POLICE_OFFICE_COUNT, datas[1]);
		}
	}
}


#ifndef _SET_RADAR_LOD_ACTION_H_
#define _SET_RADAR_LOD_ACTION_H_

#ifndef _ACTION_H_
#include "Action.h"
#endif// _ACTION_H_

namespace Training
{
    //------------------------------------------------------------------------------
    // class definitions
    //------------------------------------------------------------------------------
    class SetRadarLODAction : public Action
    {
        public:
                    /* void */          SetRadarLODAction (RadarImage::RadarLOD radarLOD);
            virtual /* void */          ~SetRadarLODAction (void);
            virtual void                Execute (void);

        protected:
                    RadarImage::RadarLOD    m_radarLOD;
    };

    //------------------------------------------------------------------------------
}

#endif  //_SET_RADAR_LOD_ACTION_H_


package azure

import (
	"crypto/rsa"
	"crypto/x509"
	"fmt"
	"io"
	"io/ioutil"
	"time"

	"k8s.io/client-go/util/flowcontrol"
	"k8s.io/kubernetes/pkg/cloudprovider"
	"k8s.io/kubernetes/pkg/controller"
	"k8s.io/kubernetes/pkg/version"

	"github.com/Azure/azure-sdk-for-go/arm/compute"
	"github.com/Azure/azure-sdk-for-go/arm/disk"
	"github.com/Azure/azure-sdk-for-go/arm/network"
	"github.com/Azure/azure-sdk-for-go/arm/storage"
	"github.com/Azure/go-autorest/autorest"
	"github.com/Azure/go-autorest/autorest/adal"
	"github.com/Azure/go-autorest/autorest/azure"
	"github.com/ghodss/yaml"
	"github.com/golang/glog"
	"golang.org/x/crypto/pkcs12"
	"k8s.io/apimachinery/pkg/util/wait"
)

const (
	// CloudProviderName is the value used for the --cloud-provider flag
	CloudProviderName      = "azure"
	rateLimitQPSDefault    = 1.0
	rateLimitBucketDefault = 5
	backoffRetriesDefault  = 6
	backoffExponentDefault = 1.5
	backoffDurationDefault = 5 // in seconds
	backoffJitterDefault   = 1.0
)

// Config holds the configuration parsed from the --cloud-config flag
// All fields are required unless otherwise specified
type Config struct {
	// The cloud environment identifier. Takes values from https://github.com/Azure/go-autorest/blob/ec5f4903f77ed9927ac95b19ab8e44ada64c1356/autorest/azure/environments.go#L13
	Cloud string `json:"cloud" yaml:"cloud"`
	// The AAD Tenant ID for the Subscription that the cluster is deployed in
	TenantID string `json:"tenantId" yaml:"tenantId"`
	// The ID of the Azure Subscription that the cluster is deployed in
	SubscriptionID string `json:"subscriptionId" yaml:"subscriptionId"`
	// The name of the resource group that the cluster is deployed in
	ResourceGroup string `json:"resourceGroup" yaml:"resourceGroup"`
	// The location of the resource group that the cluster is deployed in
	Location string `json:"location" yaml:"location"`
	// The name of the VNet that the cluster is deployed in
	VnetName string `json:"vnetName" yaml:"vnetName"`
	// The name of the resource group that the Vnet is deployed in
	VnetResourceGroup string `json:"vnetResourceGroup" yaml:"vnetResourceGroup"`
	// The name of the subnet that the cluster is deployed in
	SubnetName string `json:"subnetName" yaml:"subnetName"`
	// The name of the security group attached to the cluster's subnet
	SecurityGroupName string `json:"securityGroupName" yaml:"securityGroupName"`
	// (Optional in 1.6) The name of the route table attached to the subnet that the cluster is deployed in
	RouteTableName string `json:"routeTableName" yaml:"routeTableName"`
	// (Optional) The name of the availability set that should be used as the load balancer backend
	// If this is set, the Azure cloudprovider will only add nodes from that availability set to the load
	// balancer backend pool. If this is not set, and multiple agent pools (availability sets) are used, then
	// the cloudprovider will try to add all nodes to a single backend pool which is forbidden.
	// In other words, if you use multiple agent pools (availability sets), you MUST set this field.
	PrimaryAvailabilitySetName string `json:"primaryAvailabilitySetName" yaml:"primaryAvailabilitySetName"`

	// The ClientID for an AAD application with RBAC access to talk to Azure RM APIs
	AADClientID string `json:"aadClientId" yaml:"aadClientId"`
	// The ClientSecret for an AAD application with RBAC access to talk to Azure RM APIs
	AADClientSecret string `json:"aadClientSecret" yaml:"aadClientSecret"`
	// The path of a client certificate for an AAD application with RBAC access to talk to Azure RM APIs
	AADClientCertPath string `json:"aadClientCertPath" yaml:"aadClientCertPath"`
	// The password of the client certificate for an AAD application with RBAC access to talk to Azure RM APIs
	AADClientCertPassword string `json:"aadClientCertPassword" yaml:"aadClientCertPassword"`
	// Enable exponential backoff to manage resource request retries
	CloudProviderBackoff bool `json:"cloudProviderBackoff" yaml:"cloudProviderBackoff"`
	// Backoff retry limit
	CloudProviderBackoffRetries int `json:"cloudProviderBackoffRetries" yaml:"cloudProviderBackoffRetries"`
	// Backoff exponent
	CloudProviderBackoffExponent float64 `json:"cloudProviderBackoffExponent" yaml:"cloudProviderBackoffExponent"`
	// Backoff duration
	CloudProviderBackoffDuration int `json:"cloudProviderBackoffDuration" yaml:"cloudProviderBackoffDuration"`
	// Backoff jitter
	CloudProviderBackoffJitter float64 `json:"cloudProviderBackoffJitter" yaml:"cloudProviderBackoffJitter"`
	// Enable rate limiting
	CloudProviderRateLimit bool `json:"cloudProviderRateLimit" yaml:"cloudProviderRateLimit"`
	// Rate limit QPS
	CloudProviderRateLimitQPS float32 `json:"cloudProviderRateLimitQPS" yaml:"cloudProviderRateLimitQPS"`
	// Rate limit Bucket Size
	CloudProviderRateLimitBucket int `json:"cloudProviderRateLimitBucket" yaml:"cloudProviderRateLimitBucket"`

	// Use instance metadata service where possible
	UseInstanceMetadata bool `json:"useInstanceMetadata" yaml:"useInstanceMetadata"`

	// Use managed service identity for the virtual machine to access Azure ARM APIs
	UseManagedIdentityExtension bool `json:"useManagedIdentityExtension"`
}

// Cloud holds the config and clients
type Cloud struct {
	Config
	Environment              azure.Environment
	RoutesClient             network.RoutesClient
	SubnetsClient            network.SubnetsClient
	InterfacesClient         network.InterfacesClient
	RouteTablesClient        network.RouteTablesClient
	LoadBalancerClient       network.LoadBalancersClient
	PublicIPAddressesClient  network.PublicIPAddressesClient
	SecurityGroupsClient     network.SecurityGroupsClient
	VirtualMachinesClient    compute.VirtualMachinesClient
	StorageAccountClient     storage.AccountsClient
	DisksClient              disk.DisksClient
	operationPollRateLimiter flowcontrol.RateLimiter
	resourceRequestBackoff   wait.Backoff
	metadata                 *InstanceMetadata

	*BlobDiskController
	*ManagedDiskController
	*controllerCommon
}

func init() {
	cloudprovider.RegisterCloudProvider(CloudProviderName, NewCloud)
}

// decodePkcs12 decodes a PKCS#12 client certificate by extracting the public certificate and
// the private RSA key
func decodePkcs12(pkcs []byte, password string) (*x509.Certificate, *rsa.PrivateKey, error) {
	privateKey, certificate, err := pkcs12.Decode(pkcs, password)
	if err != nil {
		return nil, nil, fmt.Errorf("decoding the PKCS#12 client certificate: %v", err)
	}
	rsaPrivateKey, isRsaKey := privateKey.(*rsa.PrivateKey)
	if !isRsaKey {
		return nil, nil, fmt.Errorf("PKCS#12 certificate must contain a RSA private key")
	}

	return certificate, rsaPrivateKey, nil
}

// GetServicePrincipalToken creates a new service principal token based on the configuration
func GetServicePrincipalToken(config *Config, env *azure.Environment) (*adal.ServicePrincipalToken, error) {
	oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, config.TenantID)
	if err != nil {
		return nil, fmt.Errorf("creating the OAuth config: %v", err)
	}

	if config.UseManagedIdentityExtension {
		glog.V(2).Infoln("azure: using managed identity extension to retrieve access token")
		msiEndpoint, err := adal.GetMSIVMEndpoint()
		if err != nil {
			return nil, fmt.Errorf("Getting the managed service identity endpoint: %v", err)
		}
		return adal.NewServicePrincipalTokenFromMSI(
			msiEndpoint,
			env.ServiceManagementEndpoint)
	}

	if len(config.AADClientSecret) > 0 {
		glog.V(2).Infoln("azure: using client_id+client_secret to retrieve access token")
		return adal.NewServicePrincipalToken(
			*oauthConfig,
			config.AADClientID,
			config.AADClientSecret,
			env.ServiceManagementEndpoint)
	}

	if len(config.AADClientCertPath) > 0 && len(config.AADClientCertPassword) > 0 {
		glog.V(2).Infoln("azure: using jwt client_assertion (client_cert+client_private_key) to retrieve access token")
		certData, err := ioutil.ReadFile(config.AADClientCertPath)
		if err != nil {
			return nil, fmt.Errorf("reading the client certificate from file %s: %v", config.AADClientCertPath, err)
		}
		certificate, privateKey, err := decodePkcs12(certData, config.AADClientCertPassword)
		if err != nil {
			return nil, fmt.Errorf("decoding the client certificate: %v", err)
		}
		return adal.NewServicePrincipalTokenFromCertificate(
			*oauthConfig,
			config.AADClientID,
			certificate,
			privateKey,
			env.ServiceManagementEndpoint)
	}

	return nil, fmt.Errorf("No credentials provided for AAD application %s", config.AADClientID)
}

// NewCloud returns a Cloud with initialized clients
func NewCloud(configReader io.Reader) (cloudprovider.Interface, error) {
	config, env, err := ParseConfig(configReader)
	if err != nil {
		return nil, err
	}
	az := Cloud{
		Config:      *config,
		Environment: *env,
	}

	servicePrincipalToken, err := GetServicePrincipalToken(config, env)
	if err != nil {
		return nil, err
	}

	az.SubnetsClient = network.NewSubnetsClient(az.SubscriptionID)
	az.SubnetsClient.BaseURI = az.Environment.ResourceManagerEndpoint
	az.SubnetsClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	az.SubnetsClient.PollingDelay = 5 * time.Second
	configureUserAgent(&az.SubnetsClient.Client)

	az.RouteTablesClient = network.NewRouteTablesClient(az.SubscriptionID)
	az.RouteTablesClient.BaseURI = az.Environment.ResourceManagerEndpoint
	az.RouteTablesClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	az.RouteTablesClient.PollingDelay = 5 * time.Second
	configureUserAgent(&az.RouteTablesClient.Client)

	az.RoutesClient = network.NewRoutesClient(az.SubscriptionID)
	az.RoutesClient.BaseURI = az.Environment.ResourceManagerEndpoint
	az.RoutesClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	az.RoutesClient.PollingDelay = 5 * time.Second
	configureUserAgent(&az.RoutesClient.Client)

	az.InterfacesClient = network.NewInterfacesClient(az.SubscriptionID)
	az.InterfacesClient.BaseURI = az.Environment.ResourceManagerEndpoint
	az.InterfacesClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	az.InterfacesClient.PollingDelay = 5 * time.Second
	configureUserAgent(&az.InterfacesClient.Client)

	az.LoadBalancerClient = network.NewLoadBalancersClient(az.SubscriptionID)
	az.LoadBalancerClient.BaseURI = az.Environment.ResourceManagerEndpoint
	az.LoadBalancerClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	az.LoadBalancerClient.PollingDelay = 5 * time.Second
	configureUserAgent(&az.LoadBalancerClient.Client)

	az.VirtualMachinesClient = compute.NewVirtualMachinesClient(az.SubscriptionID)
	az.VirtualMachinesClient.BaseURI = az.Environment.ResourceManagerEndpoint
	az.VirtualMachinesClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	az.VirtualMachinesClient.PollingDelay = 5 * time.Second
	configureUserAgent(&az.VirtualMachinesClient.Client)

	az.PublicIPAddressesClient = network.NewPublicIPAddressesClient(az.SubscriptionID)
	az.PublicIPAddressesClient.BaseURI = az.Environment.ResourceManagerEndpoint
	az.PublicIPAddressesClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	az.PublicIPAddressesClient.PollingDelay = 5 * time.Second
	configureUserAgent(&az.PublicIPAddressesClient.Client)

	az.SecurityGroupsClient = network.NewSecurityGroupsClient(az.SubscriptionID)
	az.SecurityGroupsClient.BaseURI = az.Environment.ResourceManagerEndpoint
	az.SecurityGroupsClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	az.SecurityGroupsClient.PollingDelay = 5 * time.Second
	configureUserAgent(&az.SecurityGroupsClient.Client)

	az.StorageAccountClient = storage.NewAccountsClientWithBaseURI(az.Environment.ResourceManagerEndpoint, az.SubscriptionID)
	az.StorageAccountClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	configureUserAgent(&az.StorageAccountClient.Client)

	az.DisksClient = disk.NewDisksClientWithBaseURI(az.Environment.ResourceManagerEndpoint, az.SubscriptionID)
	az.DisksClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
	configureUserAgent(&az.DisksClient.Client)

	// Conditionally configure rate limits
	if az.CloudProviderRateLimit {
		// Assign rate limit defaults if no configuration was passed in
		if az.CloudProviderRateLimitQPS == 0 {
			az.CloudProviderRateLimitQPS = rateLimitQPSDefault
		}
		if az.CloudProviderRateLimitBucket == 0 {
			az.CloudProviderRateLimitBucket = rateLimitBucketDefault
		}
		az.operationPollRateLimiter = flowcontrol.NewTokenBucketRateLimiter(
			az.CloudProviderRateLimitQPS,
			az.CloudProviderRateLimitBucket)
		glog.V(2).Infof("Azure cloudprovider using rate limit config: QPS=%g, bucket=%d",
			az.CloudProviderRateLimitQPS,
			az.CloudProviderRateLimitBucket)
	} else {
		// if rate limits are configured off, az.operationPollRateLimiter.Accept() is a no-op
		az.operationPollRateLimiter = flowcontrol.NewFakeAlwaysRateLimiter()
	}

	// Conditionally configure resource request backoff
	if az.CloudProviderBackoff {
		// Assign backoff defaults if no configuration was passed in
		if az.CloudProviderBackoffRetries == 0 {
			az.CloudProviderBackoffRetries = backoffRetriesDefault
		}
		if az.CloudProviderBackoffExponent == 0 {
			az.CloudProviderBackoffExponent = backoffExponentDefault
		}
		if az.CloudProviderBackoffDuration == 0 {
			az.CloudProviderBackoffDuration = backoffDurationDefault
		}
		if az.CloudProviderBackoffJitter == 0 {
			az.CloudProviderBackoffJitter = backoffJitterDefault
		}
		az.resourceRequestBackoff = wait.Backoff{
			Steps:    az.CloudProviderBackoffRetries,
			Factor:   az.CloudProviderBackoffExponent,
			Duration: time.Duration(az.CloudProviderBackoffDuration) * time.Second,
			Jitter:   az.CloudProviderBackoffJitter,
		}
		glog.V(2).Infof("Azure cloudprovider using retry backoff: retries=%d, exponent=%f, duration=%d, jitter=%f",
			az.CloudProviderBackoffRetries,
			az.CloudProviderBackoffExponent,
			az.CloudProviderBackoffDuration,
			az.CloudProviderBackoffJitter)
	}

	az.metadata = NewInstanceMetadata()

	if err := initDiskControllers(&az); err != nil {
		return nil, err
	}
	return &az, nil
}

// ParseConfig returns a parsed configuration and azure.Environment for an Azure cloudprovider config file
func ParseConfig(configReader io.Reader) (*Config, *azure.Environment, error) {
	var config Config
	var env azure.Environment

	if configReader == nil {
		return &config, &env, nil
	}

	configContents, err := ioutil.ReadAll(configReader)
	if err != nil {
		return nil, nil, err
	}
	err = yaml.Unmarshal(configContents, &config)
	if err != nil {
		return nil, nil, err
	}

	if config.Cloud == "" {
		env = azure.PublicCloud
	} else {
		env, err = azure.EnvironmentFromName(config.Cloud)
		if err != nil {
			return nil, nil, err
		}
	}
	return &config, &env, nil
}

// Initialize passes a Kubernetes clientBuilder interface to the cloud provider
func (az *Cloud) Initialize(clientBuilder controller.ControllerClientBuilder) {}

// LoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.
func (az *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool) {
	return az, true
}

// Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
func (az *Cloud) Instances() (cloudprovider.Instances, bool) {
	return az, true
}

// Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.
func (az *Cloud) Zones() (cloudprovider.Zones, bool) {
	return az, true
}

// Clusters returns a clusters interface.  Also returns true if the interface is supported, false otherwise.
func (az *Cloud) Clusters() (cloudprovider.Clusters, bool) {
	return nil, false
}

// Routes returns a routes interface along with whether the interface is supported.
func (az *Cloud) Routes() (cloudprovider.Routes, bool) {
	return az, true
}

// ScrubDNS provides an opportunity for cloud-provider-specific code to process DNS settings for pods.
func (az *Cloud) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string) {
	return nameservers, searches
}

// HasClusterID returns true if the cluster has a clusterID
func (az *Cloud) HasClusterID() bool {
	return true
}

// ProviderName returns the cloud provider ID.
func (az *Cloud) ProviderName() string {
	return CloudProviderName
}

// configureUserAgent configures the autorest client with a user agent that
// includes "kubernetes" and the full kubernetes git version string
// example:
// Azure-SDK-for-Go/7.0.1-beta arm-network/2016-09-01; kubernetes-cloudprovider/v1.7.0-alpha.2.711+a2fadef8170bb0-dirty;
func configureUserAgent(client *autorest.Client) {
	k8sVersion := version.Get().GitVersion
	client.UserAgent = fmt.Sprintf("%s; kubernetes-cloudprovider/%s", client.UserAgent, k8sVersion)
}

func initDiskControllers(az *Cloud) error {
	// Common controller contains the function
	// needed by both blob disk and managed disk controllers

	common := &controllerCommon{
		aadResourceEndPoint:   az.Environment.ServiceManagementEndpoint,
		clientID:              az.AADClientID,
		clientSecret:          az.AADClientSecret,
		location:              az.Location,
		storageEndpointSuffix: az.Environment.StorageEndpointSuffix,
		managementEndpoint:    az.Environment.ResourceManagerEndpoint,
		resourceGroup:         az.ResourceGroup,
		tenantID:              az.TenantID,
		tokenEndPoint:         az.Environment.ActiveDirectoryEndpoint,
		subscriptionID:        az.SubscriptionID,
		cloud:                 az,
	}

	// BlobDiskController: contains the function needed to
	// create/attach/detach/delete blob based (unmanaged disks)
	blobController, err := newBlobDiskController(common)
	if err != nil {
		return fmt.Errorf("AzureDisk -  failed to init Blob Disk Controller with error (%s)", err.Error())
	}

	// ManagedDiskController: contains the functions needed to
	// create/attach/detach/delete managed disks
	managedController, err := newManagedDiskController(common)
	if err != nil {
		return fmt.Errorf("AzureDisk -  failed to init Managed  Disk Controller with error (%s)", err.Error())
	}

	az.BlobDiskController = blobController
	az.ManagedDiskController = managedController
	az.controllerCommon = common

	return nil
}


module API
end


<?php

/** Zend_Config */
require_once 'Zend/Config.php';

/**
 * @package    Zend_Controller
 * @subpackage Router
 * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
interface Zend_Controller_Router_Route_Interface {
    public function match($path);
    public function assemble($data = array(), $reset = false, $encode = false);
    public static function getInstance(Zend_Config $config);
}


namespace bluez {

// This class contains a Bluetooth service attribute. A service attribute is
// defined by the following fields,
// type:  This is the type of the attribute. Along with being any of the
//        fixed types, an attribute can also be of type sequence, which means
//        that it contains an array of other attributes.
// size:  This is the size of the attribute. This can be variable for each type.
//        For example, a UUID can have the sizes, 2, 4 or 16 bytes.
// value: This is the raw value of the attribute. For example, for a UUID, it
//        will be the string representation of the UUID. For a sequence, it
//        will be an array of other attributes.
class DEVICE_BLUETOOTH_EXPORT BluetoothServiceAttributeValueBlueZ {
 public:
  enum Type { NULLTYPE = 0, UINT, INT, UUID, STRING, BOOL, SEQUENCE, URL };

  using Sequence = std::vector<BluetoothServiceAttributeValueBlueZ>;

  BluetoothServiceAttributeValueBlueZ();
  BluetoothServiceAttributeValueBlueZ(Type type,
                                      size_t size,
                                      std::unique_ptr<base::Value> value);
  explicit BluetoothServiceAttributeValueBlueZ(
      std::unique_ptr<Sequence> sequence);
  BluetoothServiceAttributeValueBlueZ(
      const BluetoothServiceAttributeValueBlueZ& attribute);
  BluetoothServiceAttributeValueBlueZ& operator=(
      const BluetoothServiceAttributeValueBlueZ& attribute);
  ~BluetoothServiceAttributeValueBlueZ();

  Type type() const { return type_; }
  size_t size() const { return size_; }
  const Sequence& sequence() const { return *sequence_.get(); }
  const base::Value& value() const { return *value_.get(); }

 private:
  Type type_;
  size_t size_;
  std::unique_ptr<base::Value> value_;
  std::unique_ptr<Sequence> sequence_;
};

}  // namespace bluez

#endif  // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_SERVICE_ATTRIBUTE_VALUE_BLUEZ_H_


use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
use ::test::run_test;

#[test]
fn vmovupd_1() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM6)), operand2: Some(Direct(XMM1)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 249, 16, 241], OperandSize::Dword)
}

#[test]
fn vmovupd_2() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM0)), operand2: Some(IndirectScaledIndexed(ECX, EDX, Four, Some(OperandSize::Xmmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 249, 16, 4, 145], OperandSize::Dword)
}

#[test]
fn vmovupd_3() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM3)), operand2: Some(Direct(XMM5)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 249, 16, 221], OperandSize::Qword)
}

#[test]
fn vmovupd_4() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM3)), operand2: Some(Indirect(RAX, Some(OperandSize::Xmmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 249, 16, 24], OperandSize::Qword)
}

#[test]
fn vmovupd_5() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM0)), operand2: Some(Direct(YMM6)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 253, 16, 198], OperandSize::Dword)
}

#[test]
fn vmovupd_6() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM5)), operand2: Some(Indirect(ESI, Some(OperandSize::Ymmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 253, 16, 46], OperandSize::Dword)
}

#[test]
fn vmovupd_7() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM5)), operand2: Some(Direct(YMM2)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 253, 16, 234], OperandSize::Qword)
}

#[test]
fn vmovupd_8() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM2)), operand2: Some(Indirect(RSI, Some(OperandSize::Ymmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 253, 16, 22], OperandSize::Qword)
}

#[test]
fn vmovupd_9() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM6)), operand2: Some(Direct(XMM7)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K4), broadcast: None }, &[98, 241, 253, 140, 16, 247], OperandSize::Dword)
}

#[test]
fn vmovupd_10() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM1)), operand2: Some(IndirectScaledIndexed(EDX, ECX, Four, Some(OperandSize::Xmmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K1), broadcast: None }, &[98, 241, 253, 137, 16, 12, 138], OperandSize::Dword)
}

#[test]
fn vmovupd_11() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM20)), operand2: Some(Direct(XMM4)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K6), broadcast: None }, &[98, 225, 253, 142, 16, 228], OperandSize::Qword)
}

#[test]
fn vmovupd_12() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM17)), operand2: Some(IndirectDisplaced(RCX, 1305176396, Some(OperandSize::Xmmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K1), broadcast: None }, &[98, 225, 253, 137, 16, 137, 76, 105, 203, 77], OperandSize::Qword)
}

#[test]
fn vmovupd_13() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM7)), operand2: Some(Direct(YMM4)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K7), broadcast: None }, &[98, 241, 253, 175, 16, 252], OperandSize::Dword)
}

#[test]
fn vmovupd_14() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM5)), operand2: Some(Indirect(EAX, Some(OperandSize::Ymmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K2), broadcast: None }, &[98, 241, 253, 170, 16, 40], OperandSize::Dword)
}

#[test]
fn vmovupd_15() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM28)), operand2: Some(Direct(YMM30)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K5), broadcast: None }, &[98, 1, 253, 173, 16, 230], OperandSize::Qword)
}

#[test]
fn vmovupd_16() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM30)), operand2: Some(IndirectDisplaced(RDX, 408359552, Some(OperandSize::Ymmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K4), broadcast: None }, &[98, 97, 253, 172, 16, 178, 128, 18, 87, 24], OperandSize::Qword)
}

#[test]
fn vmovupd_17() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(ZMM0)), operand2: Some(Direct(ZMM1)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K7), broadcast: None }, &[98, 241, 253, 207, 16, 193], OperandSize::Dword)
}

#[test]
fn vmovupd_18() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(ZMM0)), operand2: Some(IndirectScaledIndexed(ESI, ECX, Eight, Some(OperandSize::Zmmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K4), broadcast: None }, &[98, 241, 253, 204, 16, 4, 206], OperandSize::Dword)
}

#[test]
fn vmovupd_19() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(ZMM1)), operand2: Some(Direct(ZMM4)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K6), broadcast: None }, &[98, 241, 253, 206, 16, 204], OperandSize::Qword)
}

#[test]
fn vmovupd_20() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(ZMM11)), operand2: Some(IndirectScaledDisplaced(RBX, Eight, 1416962940, Some(OperandSize::Zmmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K1), broadcast: None }, &[98, 113, 253, 201, 16, 28, 221, 124, 35, 117, 84], OperandSize::Qword)
}

#[test]
fn vmovupd_21() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM1)), operand2: Some(Direct(XMM5)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 249, 16, 205], OperandSize::Dword)
}

#[test]
fn vmovupd_22() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(IndirectScaledIndexedDisplaced(EBX, ESI, Four, 270910934, Some(OperandSize::Xmmword), None)), operand2: Some(Direct(XMM0)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 249, 17, 132, 179, 214, 197, 37, 16], OperandSize::Dword)
}

#[test]
fn vmovupd_23() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM7)), operand2: Some(Direct(XMM4)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 249, 16, 252], OperandSize::Qword)
}

#[test]
fn vmovupd_24() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(IndirectScaledIndexedDisplaced(RDI, RSI, Four, 1129257858, Some(OperandSize::Xmmword), None)), operand2: Some(Direct(XMM4)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 249, 17, 164, 183, 130, 27, 79, 67], OperandSize::Qword)
}

#[test]
fn vmovupd_25() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM3)), operand2: Some(Direct(YMM7)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 253, 16, 223], OperandSize::Dword)
}

#[test]
fn vmovupd_26() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Indirect(EDI, Some(OperandSize::Ymmword), None)), operand2: Some(Direct(YMM6)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 253, 17, 55], OperandSize::Dword)
}

#[test]
fn vmovupd_27() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM5)), operand2: Some(Direct(YMM0)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 253, 16, 232], OperandSize::Qword)
}

#[test]
fn vmovupd_28() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(IndirectDisplaced(RSI, 1989076454, Some(OperandSize::Ymmword), None)), operand2: Some(Direct(YMM5)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 253, 17, 174, 230, 229, 142, 118], OperandSize::Qword)
}

#[test]
fn vmovupd_29() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM6)), operand2: Some(Direct(XMM4)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K2), broadcast: None }, &[98, 241, 253, 138, 16, 244], OperandSize::Dword)
}

#[test]
fn vmovupd_30() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(IndirectScaledIndexedDisplaced(EBX, ESI, Eight, 1711242735, Some(OperandSize::Xmmword), None)), operand2: Some(Direct(XMM2)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 249, 17, 148, 243, 239, 125, 255, 101], OperandSize::Dword)
}

#[test]
fn vmovupd_31() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(XMM16)), operand2: Some(Direct(XMM2)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K3), broadcast: None }, &[98, 225, 253, 139, 16, 194], OperandSize::Qword)
}

#[test]
fn vmovupd_32() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(IndirectDisplaced(RBX, 2001347007, Some(OperandSize::Xmmword), None)), operand2: Some(Direct(XMM24)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[98, 97, 253, 8, 17, 131, 191, 33, 74, 119], OperandSize::Qword)
}

#[test]
fn vmovupd_33() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM2)), operand2: Some(Direct(YMM2)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K5), broadcast: None }, &[98, 241, 253, 173, 16, 210], OperandSize::Dword)
}

#[test]
fn vmovupd_34() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Indirect(EDX, Some(OperandSize::Ymmword), None)), operand2: Some(Direct(YMM1)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 253, 17, 10], OperandSize::Dword)
}

#[test]
fn vmovupd_35() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(YMM1)), operand2: Some(Direct(YMM6)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K3), broadcast: None }, &[98, 241, 253, 171, 16, 206], OperandSize::Qword)
}

#[test]
fn vmovupd_36() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(IndirectDisplaced(RDI, 23682063, Some(OperandSize::Ymmword), None)), operand2: Some(Direct(YMM30)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[98, 97, 253, 40, 17, 183, 15, 92, 105, 1], OperandSize::Qword)
}

#[test]
fn vmovupd_37() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(ZMM0)), operand2: Some(Direct(ZMM7)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K5), broadcast: None }, &[98, 241, 253, 205, 16, 199], OperandSize::Dword)
}

#[test]
fn vmovupd_38() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(IndirectScaledDisplaced(EAX, Eight, 2015011794, Some(OperandSize::Zmmword), None)), operand2: Some(Direct(ZMM3)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[98, 241, 253, 72, 17, 28, 197, 210, 163, 26, 120], OperandSize::Dword)
}

#[test]
fn vmovupd_39() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(Direct(ZMM3)), operand2: Some(Direct(ZMM21)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K5), broadcast: None }, &[98, 177, 253, 205, 16, 221], OperandSize::Qword)
}

#[test]
fn vmovupd_40() {
    run_test(&Instruction { mnemonic: Mnemonic::VMOVUPD, operand1: Some(IndirectDisplaced(RDX, 1033804406, Some(OperandSize::Zmmword), None)), operand2: Some(Direct(ZMM10)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[98, 113, 253, 72, 17, 146, 118, 154, 158, 61], OperandSize::Qword)
}


using UnityEngine;
using System.Collections;

public class Arrow : MonoBehaviour {

	Animator _anim;
	Vector3 facing;
	public float rayDist;
	bool fall;
	Vector3 yPos;
	public float fallTime;
	Transform _myTransform;
	Vector3 boxScale;
	BoxCollider boxColl;
	[HideInInspector]public float damage;
	PlayerRanger pr;
	GameObject ranger;

	void Awake()
	{
		//_anim.GetComponent<Animator>();
		boxColl = GetComponent<BoxCollider>();
		boxScale = new Vector3(boxColl.size.x, boxColl.size.y, boxColl.size.z+.2f);
		_myTransform = transform;
		yPos = new Vector3(0, 1, 0);
		transform.up = yPos;
		ranger = GameObject.FindWithTag("Ranger");
	}

	void OnCollisionEnter(Collision other)
	{
		rigidbody.velocity = Vector3.zero;
		fall = true;
	}

	void OnTriggerEnter (Collider other)
	{
		if(other.tag == "Ranger")
		{
			other.GetComponent<PlayerRanger>().arrowsCurr++;
			Destroy(gameObject);
		}
	}

	void Update()
	{
		Debug.DrawRay (transform.position, transform.right * rayDist, Color.magenta);
		RaycastHit hit;
		if(Physics.Raycast(transform.position, transform.right, out hit, rayDist))
		{
			if(hit.collider.tag == "Prop")
			{
				rayDist = 0.015f;
				Collection();
			}
			if(hit.collider.tag == "Warrior")
			{
				rayDist = 0.015f;
				if(!hit.collider.GetComponent<PlayerWarrior>().lockedOn)
				{
					hit.collider.BroadcastMessage("ApplyDamage", damage);
					hit.collider.BroadcastMessage("StopHealthCharge");
					ranger.GetComponent<PlayerRanger>().arrowsCurr++;
					Destroy(gameObject);
				}
			}
		}

		if(fall)
		{
			rigidbody.useGravity = true;
			if(_myTransform.position.y <= -5.94f)
			{
				rigidbody.velocity = Vector3.zero;
				rigidbody.useGravity = false;
				Collection();
				GetComponent<BoxCollider>().size = boxScale;
				fall = false;
			}
		}
	}

	void Collection()
	{
		rigidbody.isKinematic = true;
		GetComponent<BoxCollider>().isTrigger = true;
		gameObject.layer = LayerMask.NameToLayer("Default");
	}
}


/**
 * CommonError.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.google.api.ads.dfp.v201302;

/**
 * A place for common errors that can be used across services.
 */
public class CommonError  extends com.google.api.ads.dfp.v201302.ApiError  implements java.io.Serializable {
    private com.google.api.ads.dfp.v201302.CommonErrorReason reason;

    public CommonError() {
    }

    public CommonError(
           java.lang.String fieldPath,
           java.lang.String trigger,
           java.lang.String errorString,
           java.lang.String apiErrorType,
           com.google.api.ads.dfp.v201302.CommonErrorReason reason) {
        super(
            fieldPath,
            trigger,
            errorString,
            apiErrorType);
        this.reason = reason;
    }

    /**
     * Gets the reason value for this CommonError.
     *
     * @return reason
     */
    public com.google.api.ads.dfp.v201302.CommonErrorReason getReason() {
        return reason;
    }

    /**
     * Sets the reason value for this CommonError.
     *
     * @param reason
     */
    public void setReason(com.google.api.ads.dfp.v201302.CommonErrorReason reason) {
        this.reason = reason;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof CommonError)) return false;
        CommonError other = (CommonError) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = super.equals(obj) &&
            ((this.reason==null && other.getReason()==null) ||
             (this.reason!=null &&
              this.reason.equals(other.getReason())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = super.hashCode();
        if (getReason() != null) {
            _hashCode += getReason().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(CommonError.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201302", "CommonError"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("reason");
        elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201302", "reason"));
        elemField.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201302", "CommonError.Reason"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


package net.sargue.mailgun;

import javax.ws.rs.client.*;
import java.util.List;

/**
 * Representation of a Mailgun's mail request.
 *

 * It must be built using a {@link MailBuilder}.
 */
public abstract class Mail {
    private final Configuration configuration;

    Mail(Configuration configuration) {
        this.configuration = configuration;
    }

    /**
     * Convenience shortcut to {@code MailBuilder.using(configuration)}
     *
     * @param configuration the configuration to use
     * @return a new {@link MailBuilder} which uses the specified configuration
     */
    public static MailBuilder using(Configuration configuration) {
        return new MailBuilder(configuration);
    }

    /**
     * Retrieves the value of a given mail parameter. If there are multiple
     * values the first one is returned. If the parameter hasn't been set
     * null is returned.
     *
     * Can only be used on simple parameters (String). So don't use it on
     * attachment for example. Doing so will throw a
     * {@link IllegalStateException}.
     *
     * @param param the name of the parameter
     * @return the first value of the parameter, if any, null otherwise
     * @throws IllegalStateException if the parameter is not a simple (basic text) one
     */
    public abstract String getFirstValue(String param);

    /**
     * Retrieves the values of a given mail parameter. If the parameter hasn't
     * been set an empty list is returned.
     *
     * Can only be used on simple parameters (String). So don't use it on
     * attachment for example. Doing so will throw a
     * {@link IllegalStateException}.
     *
     * @param param the name of the parameter
     * @return the list of values for the parameter or an empty list
     * @throws IllegalStateException if the parameter is not a simple (basic text) one
     */
    public abstract List<String> getValues(String param);

    /**
     * Sends the email.
     *

     * This method send the request to the Mailgun service. It is a
     * blocking method so it will return upon request
     * completion.
     *
     * @return the response from the Mailgun service or null if the message
     *         is not sent (filtered by {@link MailSendFilter}
     */
    public Response send() {
        if (!configuration.mailSendFilter().filter(this)) return null;
        prepareSend();
        return new Response(request().post(entity()));
    }

    /**
     * Sends the email asynchronously.
     *

     * This method returns immediately, sending the request to the Mailgun
     * service in the background. It is a non-blocking
     * method.
     *
     * @param callback the callback to be invoked upon completion or failure
     */
    public void sendAsync(final MailRequestCallback callback) {
        if (!configuration.mailSendFilter().filter(this)) return;
        prepareSend();
        request()
                .async()
                .post(entity(),
                      new InvocationCallback<javax.ws.rs.core.Response>() {
                          @Override
                          public void completed(javax.ws.rs.core.Response o) {
                              callback.completed(new Response(o));
                          }

                          @Override
                          public void failed(Throwable throwable) {
                              callback.failed(throwable);
                          }
                      });
    }

    /**
     * Sends the email asynchronously. It uses the configuration provided
     * default callback if available, ignoring the outcome otherwise.
     *
     * If you want to use a specific callback for this call use
     * {@link #sendAsync(MailRequestCallback)} instead.
     */
    public void sendAsync() {
        if (!configuration.mailSendFilter().filter(this)) return;
        MailRequestCallbackFactory factory = configuration.mailRequestCallbackFactory();
        if (factory == null) {
            prepareSend();
            request().async().post(entity());
        } else
            sendAsync(factory.create(this));
    }

    /**
     * Retrieves the configuration associated with this Mail.
     *
     * @return the underlying configuration
     */
    public Configuration configuration() {
        return configuration;
    }

    abstract Entity<?> entity(); //NOSONAR

    abstract void prepareSend();

    void configureTarget(WebTarget target) {
        //defaults to no-op
    }

    private Invocation.Builder request() {
        WebTarget target = configuration.getTarget();
        configureTarget(target);
        return target.path(configuration.domain()).path("messages").request();
    }
}


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:background="#484E61"
        >

        <TextView
            android:id="@+id/title_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:textColor="#fff"
            android:textSize="24sp"
            />
    </RelativeLayout>
    <ListView
        android:id="@+id/list_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >
    </ListView>
</LinearLayout>


<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\select2\Select2;

/* @var $this yii\web\View */
/* @var $model app\models\Empleado */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="empleado-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'nombre')->textInput() ?>

    <?= $form->field($model, 'direccion')->textInput() ?>

    <?= $form->field($model, 'contacto')->textInput() ?>

    <?= $form->field($model, 'telefono')->textInput() ?>

    <?= $form->field($model, 'correo')->textInput() ?>

        <?= Html::submitButton($model->isNewRecord ? 'Guardar' : 'Guardar cambios', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.gr4yscale.havit.MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!" />
</RelativeLayout>


// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// rcast.h: Rcpp R/C++ interface class library -- cast from one SEXP type to another
//
// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
// Rcpp is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// Rcpp is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.

#ifndef Rcpp_rcast_h
#define Rcpp_rcast_h

#include <Rcpp/exceptions.h>

namespace Rcpp{
    namespace internal {

        inline SEXP convert_using_rfunction(SEXP x, const char* const fun){
            Armor<SEXP> res ;
            try{
                SEXP funSym = Rf_install(fun);
                res = Rcpp_eval( Rf_lang2( funSym, x ) ) ;
            } catch( eval_error& e){
                throw not_compatible( std::string("could not convert using R function : ") + fun  ) ;
            }
            return res;
        }

        // r_true_cast is only meant to be used when the target SEXP type
        // is different from the SEXP type of x
        template <int TARGET>
        SEXP r_true_cast( SEXP x) {
            throw not_compatible( "not compatible" ) ;
            return x ; // makes solaris happy
        }

        template <int RTYPE>
        SEXP basic_cast( SEXP x){
            if( TYPEOF(x) == RTYPE ) return x ;
            switch( TYPEOF(x) ){
            case REALSXP:
            case RAWSXP:
            case LGLSXP:
            case CPLXSXP:
            case INTSXP:
                return Rf_coerceVector( x, RTYPE) ;
            default:
                throw ::Rcpp::not_compatible( "not compatible with requested type" ) ;
            }
            return R_NilValue ; /* -Wall */
        }

        template<>
        inline SEXP r_true_cast<INTSXP>(SEXP x){
            return basic_cast<INTSXP>(x) ;
        }
        template<>
        inline SEXP r_true_cast<REALSXP>(SEXP x){
            return basic_cast<REALSXP>(x) ;
        }
        template<>
        inline SEXP r_true_cast<RAWSXP>(SEXP x){
            return  basic_cast<RAWSXP>(x) ;
        }
        template<>
        inline SEXP r_true_cast<CPLXSXP>(SEXP x){
            return basic_cast<CPLXSXP>(x) ;
        }
        template<>
        inline SEXP r_true_cast<LGLSXP>(SEXP x){
            return basic_cast<LGLSXP>(x) ;
        }

        template <>
        inline SEXP r_true_cast<STRSXP>(SEXP x){
            switch( TYPEOF( x ) ){
            case CPLXSXP:
            case RAWSXP:
            case LGLSXP:
            case REALSXP:
            case INTSXP:
                {
                    // return Rf_coerceVector( x, STRSXP );
                    // coerceVector does not work for some reason
                    Shield<SEXP> call( Rf_lang2( Rf_install( "as.character" ), x ) ) ;
                    Shield<SEXP> res( Rcpp_eval( call, R_GlobalEnv ) ) ;
                    return res ;
                }
            case CHARSXP:
                return Rf_ScalarString( x ) ;
            case SYMSXP:
                return Rf_ScalarString( PRINTNAME( x ) ) ;
            default:
                throw ::Rcpp::not_compatible( "not compatible with STRSXP" ) ;
            }
            return R_NilValue ; /* -Wall */
        }
        template<>
        inline SEXP r_true_cast<VECSXP>(SEXP x) {
            return convert_using_rfunction(x, "as.list" ) ;
        }
        template<>
        inline SEXP r_true_cast<EXPRSXP>(SEXP x) {
            return convert_using_rfunction(x, "as.expression" ) ;
        }
        template<>
        inline SEXP r_true_cast<LISTSXP>(SEXP x) {
            switch( TYPEOF(x) ){
            case LANGSXP:
                {
                    Shield<SEXP> y( Rf_duplicate( x ));
                    SET_TYPEOF(y,LISTSXP) ;
                    return y ;
                }
            default:
                return convert_using_rfunction(x, "as.pairlist" ) ;
            }
        }
        template<>
        inline SEXP r_true_cast<LANGSXP>(SEXP x) {
            return convert_using_rfunction(x, "as.call" ) ;
        }

    } // namespace internal

    template <int TARGET> SEXP r_cast(SEXP x) {
        if (TYPEOF(x) == TARGET) {
            return x;
        } else {
            #ifdef RCPP_WARN_ON_COERCE
            Shield<SEXP> result( internal::r_true_cast<TARGET>(x) );
            Rf_warning("coerced object from '%s' to '%s'",
                CHAR(Rf_type2str(TYPEOF(x))),
                CHAR(Rf_type2str(TARGET))
            );
            return result;
            #else
            return internal::r_true_cast<TARGET>(x);
            #endif
        }
    }

} // namespace Rcpp

#endif


package org.apache.geronimo.connector;

import java.util.Timer;

import javax.resource.spi.UnavailableException;
import javax.resource.spi.XATerminator;
import javax.resource.spi.work.WorkManager;

import org.apache.geronimo.connector.work.GeronimoWorkManager;

/**
 * GBean BootstrapContext implementation that refers to externally configured WorkManager
 * and XATerminator gbeans.
 *
 * @version $Rev$ $Date$
 */
public class BootstrapContextImpl implements javax.resource.spi.BootstrapContext {
    private final GeronimoWorkManager workManager;

    /**
     * Normal constructor for use as a GBean.
     * @param workManager
     */
    public BootstrapContextImpl(final GeronimoWorkManager workManager) {
        this.workManager = workManager;
    }

    /**
     * @see javax.resource.spi.BootstrapContext#getWorkManager()
     */
    public WorkManager getWorkManager() {
        return workManager;
    }

    /**
     * @see javax.resource.spi.BootstrapContext#getXATerminator()
     */
    public XATerminator getXATerminator() {
        return workManager.getXATerminator();
    }

    /**
     * @see javax.resource.spi.BootstrapContext#createTimer()
     */
    public Timer createTimer() throws UnavailableException {
        return new Timer();
    }

//    public static final GBeanInfo GBEAN_INFO;
//
//    static {
//        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(BootstrapContext.class);
//          //adding interface does not work, creates attributes for references???
////        infoFactory.addInterface(javax.resource.spi.BootstrapContext.class);
//
//        infoFactory.addOperation("createTimer");
//        infoFactory.addOperation("getWorkManager");
//        infoFactory.addOperation("getXATerminator");
//
//        infoFactory.addReference("WorkManager", WorkManager.class);
//        infoFactory.addReference("XATerminator", XATerminator.class);
//
//        infoFactory.setConstructor(new String[]{"WorkManager", "XATerminator"});
//
//        GBEAN_INFO = infoFactory.getBeanInfo();
//    }
//
//    public static GBeanInfo getGBeanInfo() {
//        return GBEAN_INFO;
//    }

}


/*
    Name:       Base16 Atelier Dune Light
    Author:     Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)
    Pygments template by Jan T. Sott (https://github.com/idleberg)
    Created with Base16 Builder by Chris Kempson (https://github.com/chriskempson/base16-builder)
*/
.highlight .hll { background-color: #e8e4cf }
.highlight  { color: #6E6B5E; }
.highlight .c { color: #999580 } /* Comment */
.highlight .err { color: #d73737 } /* Error */
.highlight .k { color: #b854d4 } /* Keyword */
.highlight .l { color: #b65611 } /* Literal */
.highlight .n { color: #6E6B5E; } /* Name */
.highlight .o { color: #1fad83 } /* Operator */
.highlight .p { color: #6E6B5E; } /* Punctuation */
.highlight .cm { color: #999580 } /* Comment.Multiline */
.highlight .cp { color: #999580 } /* Comment.Preproc */
.highlight .c1 { color: #999580 } /* Comment.Single */
.highlight .cs { color: #999580 } /* Comment.Special */
.highlight .gd { color: #d73737 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gh { color: #20201d; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #60ac39 } /* Generic.Inserted */
.highlight .gp { color: #999580; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #1fad83; font-weight: bold } /* Generic.Subheading */
.highlight .kc { color: #b854d4 } /* Keyword.Constant */
.highlight .kd { color: #b854d4 } /* Keyword.Declaration */
.highlight .kn { color: #1fad83 } /* Keyword.Namespace */
.highlight .kp { color: #b854d4 } /* Keyword.Pseudo */
.highlight .kr { color: #b854d4 } /* Keyword.Reserved */
.highlight .kt { color: #ae9513 } /* Keyword.Type */
.highlight .ld { color: #60ac39 } /* Literal.Date */
.highlight .m { color: #b65611 } /* Literal.Number */
.highlight .s { color: #2A9292; } /* Literal.String */
.highlight .na { color: #6684e1 } /* Name.Attribute */
.highlight .nb { color: #B65611; } /* Name.Builtin */
.highlight .nc { color: #ae9513 } /* Name.Class */
.highlight .no { color: #d73737 } /* Name.Constant */
.highlight .nd { color: #1fad83 } /* Name.Decorator */
.highlight .ni { color: #20201d } /* Name.Entity */
.highlight .ne { color: #d73737 } /* Name.Exception */
.highlight .nf { color: #6684e1 } /* Name.Function */
.highlight .nl { color: #20201d } /* Name.Label */
.highlight .nn { color: #ae9513 } /* Name.Namespace */
.highlight .nx { color: #6684e1 } /* Name.Other */
.highlight .py { color: #20201d } /* Name.Property */
.highlight .nt { color: #1fad83 } /* Name.Tag */
.highlight .nv { color: #d73737 } /* Name.Variable */
.highlight .ow { color: #1fad83 } /* Operator.Word */
.highlight .w { color: #20201d } /* Text.Whitespace */
.highlight .mf { color: #b65611 } /* Literal.Number.Float */
.highlight .mh { color: #b65611 } /* Literal.Number.Hex */
.highlight .mi { color: #b65611 } /* Literal.Number.Integer */
.highlight .mo { color: #b65611 } /* Literal.Number.Oct */
.highlight .sb { color: #60ac39 } /* Literal.String.Backtick */
.highlight .sc { color: #20201d } /* Literal.String.Char */
.highlight .sd { color: #999580 } /* Literal.String.Doc */
.highlight .s2 { color: #60ac39 } /* Literal.String.Double */
.highlight .se { color: #b65611 } /* Literal.String.Escape */
.highlight .sh { color: #60ac39 } /* Literal.String.Heredoc */
.highlight .si { color: #b65611 } /* Literal.String.Interpol */
.highlight .sx { color: #60ac39 } /* Literal.String.Other */
.highlight .sr { color: #60ac39 } /* Literal.String.Regex */
.highlight .s1 { color: #60ac39 } /* Literal.String.Single */
.highlight .ss { color: #60ac39 } /* Literal.String.Symbol */
.highlight .bp { color: #CD0101 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #d73737 } /* Name.Variable.Class */
.highlight .vg { color: #d73737 } /* Name.Variable.Global */
.highlight .vi { color: #d73737 } /* Name.Variable.Instance */
.highlight .il { color: #b65611 } /* Literal.Number.Integer.Long */


export default {
  newConference: '新しい会議',
  dialInNumber: 'ダイヤルイン番号',
  host: 'ホスト',
  participants: '参加者',
  internationalParticipants: '海外の参加者',
  internationalNumbersHeader: '国際ダイヤルイン番号の選択',
  search: '検索...',
  inviteWithText: 'テキストで招待',
  inviteText: '{brandName}会議に参加してください\u3002\r\n\r\nダイヤルイン番号\uFF1A{formattedDialInNumber} \r\n{additionalNumbersSection} \r\n参加者のアクセス\uFF1A{participantCode} \r\n\r\n国際ダイヤルイン番号が必要な場合は\u3001次をご覧ください\uFF1A{dialInNumbersLinks} \r\n\r\nこの電話会議は\u3001{brandName} Conferencingを使用して開催されています\u3002',
  hostAccess: 'ホストのアクセス',
  participantsAccess: '参加者のアクセス',
  addinalDialInNumbers: '追加のダイヤルイン番号',
  selectNumbers: '番号の選択',
  enableJoinBeforeHost: 'ホストより前の参加を可能にする',
  conferenceCommands: '会議コマンド',
  inviteWithGCalendar: 'Googleカレンダーを使用して招待',
  joinAsHost: '会議を起動',
  internationalNumber: '国際ダイヤルイン番号\uFF1A',
};

// @key: @#@"newConference"@#@ @source: @#@"New Conference"@#@
// @key: @#@"dialInNumber"@#@ @source: @#@"Dial-in Number"@#@
// @key: @#@"hostAccess"@#@ @source: @#@"Host Access"@#@
// @key: @#@"participantsAccess"@#@ @source: @#@"Participants Access"@#@
// @key: @#@"addinalDialInNumbers"@#@ @source: @#@"Additional Dial-in Numbers"@#@
// @key: @#@"selectNumbers"@#@ @source: @#@"Select Numbers"@#@
// @key: @#@"enableJoinBeforeHost"@#@ @source: @#@"Enable join before Host"@#@
// @key: @#@"conferenceCommands"@#@ @source: @#@"Conference Commands"@#@
// @key: @#@"inviteWithGCalendar"@#@ @source: @#@"Invite with Google Calendar"@#@
// @key: @#@"inviteWithText"@#@ @source: @#@"Invite with Text"@#@
// @key: @#@"joinAsHost"@#@ @source: @#@"Launch Conference"@#@
// @key: @#@"internationalNumber"@#@ @source: @#@"International Dial-in Numbers:"@#@
// @key: @#@"inviteText_att"@#@ @source: @#@"Please join the {brandName} conference.\n\nDial-In Number: {formattedDialInNumber} \n{additionalNumbersSection} \nParticipant Access: {participantCode} \n\nNeed an international dial-in phone number? Please visit {dialInNumbersLinks} \n\nThis conference call is brought to you by {brandName} Conferencing."@#@
// @key: @#@"inviteText_bt"@#@ @source: @#@"Please join the {brandName} conference.\n\nDial-In Number: {formattedDialInNumber} \n{additionalNumbersSection} \nParticipant Access: {participantCode} \n\nAdditional dial-in numbers {dialInNumbersLinks}"@#@
// @key: @#@"inviteText_rc"@#@ @source: @#@"Please join the {brandName} conference.\n\nDial-In Number: {formattedDialInNumber} \n{additionalNumbersSection} \nParticipant Access: {participantCode} \n\nNeed an international dial-in phone number? Please visit {dialInNumbersLinks} \n\nThis conference call is brought to you by {brandName} Conferencing."@#@
// @key: @#@"inviteText_telus"@#@ @source: @#@"Please join the {brandName} conference.\n\nDial-In Number: {formattedDialInNumber} \n{additionalNumbersSection} \nParticipant Access: {participantCode} \n\nAdditional dial-in numbers {dialInNumbersLinks}"@#@


package org.gearvrf;

import org.gearvrf.utility.Log;
import org.gearvrf.utility.DockEventReceiver;
import org.gearvrf.utility.VrAppSettings;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.Window;
import android.view.WindowManager;

import com.oculus.vrappframework.VrActivity;

/**
 * The typical GVRF application will have a single Android {@link Activity},
 * which must descend from {@link GVRActivity}, not directly from
 * {@code Activity}.
 *
 * {@code GVRActivity} creates and manages the internal classes which use sensor
 * data to manage a viewpoint, and thus present an appropriate stereoscopic view
 * of your scene graph. {@code GVRActivity} also gives GVRF a full-screen window
 * in landscape orientation with no title bar.
 */
public class GVRActivity extends VrActivity {

    private static final String TAG = Log.tag(GVRActivity.class);

    // these values are copy of enum KeyEventType in VrAppFramework/Native_Source/Input.h
    public static final int KEY_EVENT_NONE = 0;
    public static final int KEY_EVENT_SHORT_PRESS = 1;
    public static final int KEY_EVENT_DOUBLE_TAP = 2;
    public static final int KEY_EVENT_LONG_PRESS = 3;
    public static final int KEY_EVENT_DOWN = 4;
    public static final int KEY_EVENT_UP = 5;
    public static final int KEY_EVENT_MAX = 6;

    private GVRViewManager mGVRViewManager = null;
    private GVRCamera mCamera;
    private VrAppSettings mAppSettings;
    private long mPtr;

    static {
        System.loadLibrary("gvrf");
    }

    public static native long nativeSetAppInterface(VrActivity act,
            String fromPackageName, String commandString, String uriString);

    static native void nativeSetCamera(long appPtr, long camera);
    static native void nativeSetCameraRig(long appPtr, long cameraRig);
    static native void nativeOnDock(long appPtr);
    static native void nativeOnUndock(long appPtr);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        /*
         * Removes the title bar and the status bar.
         */
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        mAppSettings = new VrAppSettings();
        super.onCreate(savedInstanceState);

        Intent intent = getIntent();
        String commandString = VrActivity.getCommandStringFromIntent(intent);
        String fromPackageNameString = VrActivity
                .getPackageStringFromIntent(intent);
        String uriString = VrActivity.getUriStringFromIntent(intent);

        mPtr = nativeSetAppInterface(this, fromPackageNameString,
                commandString, uriString);

        setAppPtr(mPtr);

        mDockEventReceiver = new DockEventReceiver(this, mRunOnDock, mRunOnUndock);
    }

    protected void onInitAppSettings(VrAppSettings appSettings) {

    }

    public VrAppSettings getAppSettings(){
        return mAppSettings;
    }

    @Override
    protected void onPause() {
        super.onPause();
        if (mGVRViewManager != null) {
            mGVRViewManager.onPause();
        }
        if (null != mDockEventReceiver) {
            mDockEventReceiver.stop();
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        if (mGVRViewManager != null) {
            mGVRViewManager.onResume();
        }
        if (null != mDockEventReceiver) {
            mDockEventReceiver.start();
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (mGVRViewManager != null) {
            mGVRViewManager.onDestroy();
        }
    }

    /**
     * Links {@linkplain GVRScript a script} to the activity; sets the version;
     * sets the lens distortion compensation parameters.
     *
     * @param gvrScript
     *            An instance of {@link GVRScript} to handle callbacks on the GL
     *            thread.
     * @param distortionDataFileName
     *            Name of the XML file containing the device parameters. We
     *            currently only support the Galaxy Note 4 because that is the
     *            only shipping device with the proper GL extensions. When more
     *            devices support GVRF, we will publish new device files, along
     *            with app-level auto-detect guidelines. This approach will let
     *            you support new devices, using the same version of GVRF that
     *            you have already tested and approved.
     *
     *

     *            The XML filename is relative to the application's
     *            {@code assets} directory, and can specify a file in a
     *            directory under the application's {@code assets} directory.
     */
    public void setScript(GVRScript gvrScript, String distortionDataFileName) {
        if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {

            GVRXMLParser xmlParser = new GVRXMLParser(getAssets(),
                    distortionDataFileName, mAppSettings);
            onInitAppSettings(mAppSettings);
            if (isVrSupported() && !mAppSettings.getMonoScopicModeParms().isMonoScopicMode()) {
                mGVRViewManager = new GVRViewManager(this, gvrScript, xmlParser);
            } else {
                mGVRViewManager = new GVRMonoscopicViewManager(this, gvrScript,
                        xmlParser);
            }
        } else {
            throw new IllegalArgumentException(
                    "You can not set orientation to portrait for GVRF apps.");
        }
    }

    /**
     * Sets whether to force rendering to be single-eye, monoscopic view.
     *
     * @param force
     *            If true, will create a GVRMonoscopicViewManager when
     *            {@linkplain setScript setScript()} is called. If false, will
     *            proceed to auto-detect whether the device supports VR
     *            rendering and choose the appropriate ViewManager. This call
     *            will only have an effect if it is called before
     *            {@linkplain #setScript(GVRScript, String) setScript()}.
     *
     * @deprecated
     *
     */
    @Deprecated
    public void setForceMonoscopic(boolean force) {
        mAppSettings.monoScopicModeParms.setMonoScopicMode(force);
    }

    /**
     * Returns whether a monoscopic view was asked to be forced during
     * {@linkplain #setScript(GVRScript, String) setScript()}.
     *
     * @see setForceMonoscopic
     * @deprecated
     */
    @Deprecated
    public boolean getForceMonoscopic() {
        return mAppSettings.monoScopicModeParms.isMonoScopicMode();
    }

    private boolean isVrSupported() {
        if ((Build.MODEL.contains("SM-N910"))
                || (Build.MODEL.contains("SM-N916"))
                || (Build.MODEL.contains("SM-G920"))
                || (Build.MODEL.contains("SM-G925"))) {
            return true;
        }

        return false;
    }

    public long getAppPtr(){
        return mPtr;
    }

    void drawFrame() {
        mGVRViewManager.onDrawFrame();
    }

    void oneTimeInit() {
        mGVRViewManager.onSurfaceCreated();
        Log.e(TAG, " oneTimeInit from native layer");
    }

    void oneTimeShutDown() {
        Log.e(TAG, " oneTimeShutDown from native layer");
    }

    void beforeDrawEyes() {
        mGVRViewManager.beforeDrawEyes();
    }

    void onDrawEyeView(int eye, float fovDegrees) {
        mGVRViewManager.onDrawEyeView(eye, fovDegrees);
    }

    void afterDrawEyes() {
        mGVRViewManager.afterDrawEyes();
    }

    void setCamera(GVRCamera camera) {
        mCamera = camera;

        nativeSetCamera(getAppPtr(), camera.getNative());
    }

    void setCameraRig(GVRCameraRig cameraRig) {
        nativeSetCameraRig(getAppPtr(), cameraRig.getNative());
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent event) {
        boolean handled = super.dispatchTouchEvent(event);// VrActivity's

        /*
         * Situation: while the super class VrActivity is implementing
         * dispatchTouchEvent() without calling its own super
         * dispatchTouchEvent(), we still need to call the
         * VRTouchPadGestureDetector onTouchEvent. Call it here, similar way
         * like in place of viewGroup.onInterceptTouchEvent()
         */
        onTouchEvent(event);

        return handled;
    }

    boolean onKeyEventNative(int keyCode, int eventType) {

        /*
         * Currently VrLib does not call Java onKeyDown()/onKeyUp() in the
         * Activity class. In stead, it calls VrAppInterface->OnKeyEvent if
         * defined in the native side, to give a chance to the app before it
         * intercepts. With this implementation, the developers can expect
         * consistently their key event methods are called as usual in case they
         * want to use the events. The parameter eventType matches with the
         * native side. It can be more than two, DOWN and UP, if the native
         * supports in the future.
         */

        switch (eventType) {
        case KEY_EVENT_SHORT_PRESS:
            return onKeyShortPress(keyCode);
        case KEY_EVENT_DOUBLE_TAP:
            return onKeyDoubleTap(keyCode);
        case KEY_EVENT_LONG_PRESS:
            return onKeyLongPress(keyCode, new KeyEvent(KeyEvent.ACTION_DOWN, keyCode));
        case KEY_EVENT_DOWN:
            return onKeyDown(keyCode, new KeyEvent(KeyEvent.ACTION_DOWN, keyCode));
        case KEY_EVENT_UP:
            return onKeyUp(keyCode, new KeyEvent(KeyEvent.ACTION_UP, keyCode));
        case KEY_EVENT_MAX:
            return onKeyMax(keyCode);
        default:
            return false;
        }
    }

    public boolean onKeyShortPress(int keyCode) {
        return false;
    }

    public boolean onKeyDoubleTap(int keyCode) {
        return false;
    }

    public boolean onKeyMax(int keyCode) {
        return false;
    }

    boolean updateSensoredScene() {
        return mGVRViewManager.updateSensoredScene();
    }

    private final Runnable mRunOnDock = new Runnable() {
        @Override
        public void run() {
            nativeOnDock(getAppPtr());
        }
    };

    private final Runnable mRunOnUndock = new Runnable() {
        @Override
        public void run() {
            nativeOnUndock(getAppPtr());
        }
    };

    private DockEventReceiver mDockEventReceiver;
}


@implementation TLNavigationController

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
	return UIInterfaceOrientationMaskAllButUpsideDown;
}

@end