text:
ACCEPTED

#### According to
GRIN Taxonomy for Plants

#### Published in
J. Arnold Arbor. 20:421. 1939

#### Original name
null

### Remarks
null

redpajama_set_name: RedPajamaGithub


text:
/**
 *

 * Using the Amazon Cognito user pools API, you can create a user pool to manage directories and users. You can
 * authenticate a user to obtain tokens related to user identity and access policies.
 *

 *

 * This API reference provides information about user pools in Amazon Cognito user pools.
 *

 *

 * For more information, see the Amazon Cognito
 * Documentation.
 *

 */
package com.amazonaws.services.cognitoidp;


text:
class ResourceMaterial;

class CompMaterial : public Component
{
public:
	CompMaterial(Comp_Type t, GameObject* parent);
	CompMaterial(const CompMaterial& copy, GameObject* parent);
	~CompMaterial();

	void preUpdate(float dt);
	void Clear();
	void SetColor(float r, float g, float b, float a);
	void SetUUIDMesh(uint uuid);

	Color GetColor() const;
	uint GetTextureID() const;

	// EDITOR METHODS ----------
	void ShowOptions();
	void ShowInspectorInfo();
	// -------------------------

	// SAVE - LOAD METHODS ------------------------
	void Save(JSON_Object* object, std::string name, bool saveScene, uint& countResources) const;
	void Load(const JSON_Object* object, std::string name);
	// --------------------------------------------

public:
	ResourceMaterial* resourceMaterial = nullptr;

private:
	Color color = White;
	bool selectMaterial = false;

	uint uuid_material = 0;
	uint uuidResourceReimported = 0;
};

#endif


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

@Injectable()
export class DomHandler {

    public static zindex: number = 1000;

    public addClass(element: any, className: string): void {
        if (element.classList)
            element.classList.add(className);
        else
            element.className += ' ' + className;
    }

    public addMultipleClasses(element: any, className: string): void {
        if (element.classList) {
            let styles: string[] = className.split(' ');
            for (let i = 0; i < styles.length; i++) {
                element.classList.add(styles[i]);
            }

        }
        else {
            let styles: string[] = className.split(' ');
            for (let i = 0; i < styles.length; i++) {
                element.className += ' ' + styles[i];
            }
        }
    }

    public removeClass(element: any, className: string): void {
        if (element.classList)
            element.classList.remove(className);
        else
            element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
    }

    public hasClass(element: any, className: string): boolean {
        if (element.classList)
            return element.classList.contains(className);
        else
            return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
    }

    public siblings(element: any): any {
        return Array.prototype.filter.call(element.parentNode.children, function (child) {
            return child !== element;
        });
    }

    public find(element: any, selector: string): any[] {
        return element.querySelectorAll(selector);
    }

    public findSingle(element: any, selector: string): any {
        return element.querySelector(selector);
    }

    public index(element: any): number {
        let children = element.parentNode.childNodes;
        let num = 0;
        for (var i = 0; i < children.length; i++) {
            if (children[i] == element) return num;
            if (children[i].nodeType == 1) num++;
        }
        return -1;
    }

    public relativePosition(element: any, target: any): void {
        let elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element);
        let targetHeight = target.offsetHeight;
        let targetWidth = target.offsetWidth;
        let targetOffset = target.getBoundingClientRect();
        let viewport = this.getViewport();
        let top, left;

        if ((targetOffset.top + targetHeight + elementDimensions.height) > viewport.height)
            top = -1 * (elementDimensions.height);
        else
            top = targetHeight;

        if ((targetOffset.left + elementDimensions.width) > viewport.width)
            left = targetWidth - elementDimensions.width;
        else
            left = 0;

        element.style.top = top + 'px';
        element.style.left = left + 'px';
    }

    public absolutePosition(element: any, target: any): void {
        let elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element);
        let elementOuterHeight = elementDimensions.height;
        let elementOuterWidth = elementDimensions.width;
        let targetOuterHeight = target.offsetHeight;
        let targetOuterWidth = target.offsetWidth;
        let targetOffset = target.getBoundingClientRect();
        let windowScrollTop = this.getWindowScrollTop();
        let windowScrollLeft = this.getWindowScrollLeft();
        let viewport = this.getViewport();
        let top, left;

        if (targetOffset.top + targetOuterHeight + elementOuterHeight > viewport.height) {
            top = targetOffset.top + windowScrollTop - elementOuterHeight;
            if(top < 0) {
                top = 0 + windowScrollTop;
            }
        }
        else {
            top = targetOuterHeight + targetOffset.top + windowScrollTop;
        }

        if (targetOffset.left + targetOuterWidth + elementOuterWidth > viewport.width)
            left = targetOffset.left + windowScrollLeft + targetOuterWidth - elementOuterWidth;
        else
            left = targetOffset.left + windowScrollLeft;

        element.style.top = top + 'px';
        element.style.left = left + 'px';
    }

    public getHiddenElementOuterHeight(element: any): number {
        element.style.visibility = 'hidden';
        element.style.display = 'block';
        let elementHeight = element.offsetHeight;
        element.style.display = 'none';
        element.style.visibility = 'visible';

        return elementHeight;
    }

    public getHiddenElementOuterWidth(element: any): number {
        element.style.visibility = 'hidden';
        element.style.display = 'block';
        let elementWidth = element.offsetWidth;
        element.style.display = 'none';
        element.style.visibility = 'visible';

        return elementWidth;
    }

    public getHiddenElementDimensions(element: any): any {
        let dimensions: any = {};
        element.style.visibility = 'hidden';
        element.style.display = 'block';
        dimensions.width = element.offsetWidth;
        dimensions.height = element.offsetHeight;
        element.style.display = 'none';
        element.style.visibility = 'visible';

        return dimensions;
    }

    public scrollInView(container, item) {
        let borderTopValue: string = getComputedStyle(container).getPropertyValue('borderTopWidth');
        let borderTop: number = borderTopValue ? parseFloat(borderTopValue) : 0;
        let paddingTopValue: string = getComputedStyle(container).getPropertyValue('paddingTop');
        let paddingTop: number = paddingTopValue ? parseFloat(paddingTopValue) : 0;
        let containerRect = container.getBoundingClientRect();
        let itemRect = item.getBoundingClientRect();
        let offset = (itemRect.top + document.body.scrollTop) - (containerRect.top + document.body.scrollTop) - borderTop - paddingTop;
        let scroll = container.scrollTop;
        let elementHeight = container.clientHeight;
        let itemHeight = this.getOuterHeight(item);

        if (offset < 0) {
            container.scrollTop = scroll + offset;
        }
        else if ((offset + itemHeight) > elementHeight) {
            container.scrollTop = scroll + offset - elementHeight + itemHeight;
        }
    }

    public fadeIn(element, duration: number): void {
        element.style.opacity = 0;

        let last = +new Date();
        let opacity = 0;
        let tick = function () {
            opacity = +element.style.opacity + (new Date().getTime() - last) / duration;
            element.style.opacity = opacity;
            last = +new Date();

            if (+opacity < 1) {
                (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);
            }
        };

        tick();
    }

    public fadeOut(element, ms) {
        var opacity = 1,
            interval = 50,
            duration = ms,
            gap = interval / duration;

        let fading = setInterval(() => {
            opacity = opacity - gap;

            if (opacity <= 0) {
                opacity = 0;
                clearInterval(fading);
            }

            element.style.opacity = opacity;
        }, interval);
    }

    public getWindowScrollTop(): number {
        let doc = document.documentElement;
        return (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
    }

    public getWindowScrollLeft(): number {
        let doc = document.documentElement;
        return (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
    }

    public matches(element, selector: string): boolean {
        var p = Element.prototype;
        var f = p['matches'] || p.webkitMatchesSelector || p['mozMatchesSelector'] || p.msMatchesSelector || function (s) {
            return [].indexOf.call(document.querySelectorAll(s), this) !== -1;
        };
        return f.call(element, selector);
    }

    public getOuterWidth(el, margin?) {
        let width = el.offsetWidth;

        if (margin) {
            let style = getComputedStyle(el);
            width += parseFloat(style.marginLeft) + parseFloat(style.marginRight);
        }

        return width;
    }

    public getHorizontalPadding(el) {
        let style = getComputedStyle(el);
        return parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
    }

    public getHorizontalMargin(el) {
        let style = getComputedStyle(el);
        return parseFloat(style.marginLeft) + parseFloat(style.marginRight);
    }

    public innerWidth(el) {
        let width = el.offsetWidth;
        let style = getComputedStyle(el);

        width += parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
        return width;
    }

    public width(el) {
        let width = el.offsetWidth;
        let style = getComputedStyle(el);

        width -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
        return width;
    }

    public getInnerHeight(el) {
        let height = el.offsetHeight;
        let style = getComputedStyle(el);

        height += parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);
        return height;
    }

    public getOuterHeight(el, margin?) {
        let height = el.offsetHeight;

        if (margin) {
            let style = getComputedStyle(el);
            height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
        }

        return height;
    }

    public getHeight(el): number {
        let height = el.offsetHeight;
        let style = getComputedStyle(el);

        height -= parseFloat(style.paddingTop) + parseFloat(style.paddingBottom) + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);

        return height;
    }

    public getWidth(el): number {
        let width = el.offsetWidth;
        let style = getComputedStyle(el);

        width -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight) + parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);

        return width;
    }

    public getViewport(): any {
        let win = window,
            d = document,
            e = d.documentElement,
            g = d.getElementsByTagName('body')[0],
            w = win.innerWidth || e.clientWidth || g.clientWidth,
            h = win.innerHeight || e.clientHeight || g.clientHeight;

        return { width: w, height: h };
    }

    public getOffset(el) {
        let x = el.offsetLeft;
        let y = el.offsetTop;

        while (el = el.offsetParent) {
            x += el.offsetLeft;
            y += el.offsetTop;
        }

        return {left: x, top: y};
    }

    getUserAgent(): string {
        return navigator.userAgent;
    }

    isIE() {
        var ua = window.navigator.userAgent;

        var msie = ua.indexOf('MSIE ');
        if (msie > 0) {
            // IE 10 or older => return version number
            return true;
        }

        var trident = ua.indexOf('Trident/');
        if (trident > 0) {
            // IE 11 => return version number
            var rv = ua.indexOf('rv:');
            return true;
        }

        var edge = ua.indexOf('Edge/');
        if (edge > 0) {
           // Edge (IE 12+) => return version number
           return true;
        }

        // other browser
        return false;
    }

    appendChild(element: any, target: any) {
        if(this.isElement(target))
            target.appendChild(element);
        else if(target.el && target.el.nativeElement)
            target.el.nativeElement.appendChild(element);
        else
            throw 'Cannot append ' + target + ' to ' + element;
    }

    removeChild(element: any, target: any) {
        if(this.isElement(target))
            target.removeChild(element);
        else if(target.el && target.el.nativeElement)
            target.el.nativeElement.removeChild(element);
        else
            throw 'Cannot remove ' + element + ' from ' + target;
    }

    isElement(obj: any) {
        return (typeof HTMLElement === "object" ? obj instanceof HTMLElement :
            obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string"
        );
    }

    calculateScrollbarWidth(): number {
        let scrollDiv = document.createElement("div");
        scrollDiv.className = "ui-scrollbar-measure";
        document.body.appendChild(scrollDiv);

        let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
        document.body.removeChild(scrollDiv);

        return scrollbarWidth;
    }

    public invokeElementMethod(element: any, methodName: string, args?: any[]): void {
        (element as any)[methodName].apply(element, args);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Owin;
using Owin;
using Services_Common;

[assembly: OwinStartup(typeof(Services_Common.Startup))]

namespace Services_Common
{
    public partial class Startup
    {
        public void Configuration(IAppBuilder app)
        {
			app.MapSignalR();
		}
	}
}


text:
import { Server } from "./server";
import { Config } from "./config/config";

Server.instance().run(Config.port || 3000);


text:
:Beg
driver --load --path C:\Code\hadesmem\dist\debug\x64\chimera.sys --name Chimera
driver --unload --path C:\Code\hadesmem\dist\debug\x64\chimera.sys --name Chimera
goto Beg


text:
source ./env.sh

# Constants
REGION=us-central1

if echo "$OSTYPE" | grep -q darwin
then
  PUBSUB_TOKEN=$(uuidgen)
  GREEN='\x1B[1;32m'
  NOCOLOR='\x1B[0m'
  HYPERLINK='\x1B]8;;'
else
  PUBSUB_TOKEN=$(cat /proc/sys/kernel/random/uuid)
  GREEN='\033[1;32m'
  NOCOLOR='\033[0m'
  HYPERLINK='\033]8;;'
fi

print_green() {
  echo -e "${GREEN}$1${NOCOLOR}"
}

# Authorize with a Google Account.
gcloud auth login

print_green "Shoptimizer API Installation Started."

# Set default project.
gcloud config set project "$GCP_PROJECT"

# Enable all necessary APIs.
print_green "Enabling Cloud APIs if necessary..."
REQUIRED_SERVICES=(
  cloudbuild.googleapis.com
  logging.googleapis.com
  run.googleapis.com
  sourcerepo.googleapis.com
)

ENABLED_SERVICES=$(gcloud services list)
for SERVICE in "${REQUIRED_SERVICES[@]}"
do
  if echo "$ENABLED_SERVICES" | grep -q "$SERVICE"
  then
    echo "$SERVICE is already enabled."
  else
    gcloud services enable "$SERVICE" \
      && echo "$SERVICE has been successfully enabled."
  fi
done

# Create a new Cloud Source Repository for Git
print_green "Creating the Git repository..."
EXISTING_REPOS="$(gcloud source repos list --filter="$SOURCE_REPO")"
if echo "$EXISTING_REPOS" | grep -q -w "$SOURCE_REPO"
then
  echo "Cloud Source Repository $SOURCE_REPO already exists."
else
  gcloud source repos create "$SOURCE_REPO"
fi

# Setup Service Accounts and grant permissions
print_green "Setting up service account permissions..."
PROJECT_NUMBER=$(gcloud projects list --filter="PROJECT_ID=$GCP_PROJECT" --format="value(PROJECT_NUMBER)")
gcloud projects add-iam-policy-binding "$GCP_PROJECT" \
  --member serviceAccount:"$PROJECT_NUMBER"@cloudbuild.gserviceaccount.com \
  --role roles/iam.serviceAccountUser
gcloud projects add-iam-policy-binding "$GCP_PROJECT" \
  --member serviceAccount:"$PROJECT_NUMBER"@cloudbuild.gserviceaccount.com \
  --role roles/container.admin
gcloud projects add-iam-policy-binding "$GCP_PROJECT" \
  --member serviceAccount:"$PROJECT_NUMBER"@cloudbuild.gserviceaccount.com \
  --role roles/editor
gcloud projects add-iam-policy-binding "$GCP_PROJECT" \
  --member serviceAccount:"$PROJECT_NUMBER"@cloudbuild.gserviceaccount.com \
  --role roles/run.admin

# Setup CI/CD
print_green "Deleting and re-creating Cloud Build triggers..."
CreateTrigger() {
  TARGET_TRIGGER=$1
  DESCRIPTION=$2
  ENV_VARIABLES=$3
  gcloud alpha builds triggers create cloud-source-repositories \
  --build-config=cicd/"$TARGET_TRIGGER" \
  --repo="$SOURCE_REPO" \
  --branch-pattern=main \
  --description="$DESCRIPTION" \
  --substitutions ^::^"$ENV_VARIABLES"
}

# Recreate the Cloud Build trigger.
EXISTING_TRIGGERS=$(gcloud alpha builds triggers list --filter=name:Shoptimizer | grep "id:" | awk '{printf("%s\n", $2)}')
for TRIGGER in $(echo "$EXISTING_TRIGGERS")
do
  gcloud alpha builds triggers -q delete "$TRIGGER"
done

CreateTrigger deploy_shoptimizer_to_cloud_run.yaml \
  "Shoptimizer Deploy Shoptimizer API" \
  _GCP_PROJECT="$GCP_PROJECT"

print_green "Installation and setup finished. Please deploy via Cloud Build by pushing the code to your source repository at ${HYPERLINK}https://source.cloud.google.com/$GCP_PROJECT/$SOURCE_REPO\ahttps://source.cloud.google.com/$GCP_PROJECT/$SOURCE_REPO${HYPERLINK}\a"


text:
title: Hover
localeTitle: зависать
---
## зависать

`selector:hover` псевдо-класс `selector:hover` запускается, когда вы взаимодействуете с элементом (селектором) с указательным устройством, как правило, указателем мыши. Стили элемента, зависающего над, будут переопределены по стилю, определенному в `selector:hover` pseudo-class. Для правильного стиля ссылок / элементов правила должны быть определены в следующем порядке: : link -: visited -: hover -: active

**Синтаксис:**

```css
 selector:hover {
    css declarations;
 }
```

## Другие примеры

Ниже приведены некоторые более сложные примеры того, что вы можете сделать с псевдо-классом `:hover` . Имейте в виду, что `.second` div **должен** появиться после `.first` div во всех этих примерах.

1.  Когда вы наведите указатель мыши на элемент, измените соседний брат.

```html

<style>
  .first:hover + .second {
    background-color: blue;
  }
 </style>

 <div class="first">First</div>
 <div class="second">Second</div>
```

В приведенном выше коде будет изменен цвет фона `.second` до синего, когда вы наведите указатель мыши на `.first` .

2.  Когда вы наведите указатель мыши на элемент, измените общий брат.

```html

<style>
  .first:hover ~ .second {
    background-color: blue;
  }
 </style>

 <div class="first">First</div>
 <div class="middle">Middle</div>
 <div class="second">Second</div>
```

Этот пример дает немного большую гибкость, поскольку два элемента больше не должны быть непосредственно смежными.

3.  Когда вы наводите на элемент изменение прямого потомка.

```html

<style>
  .first:hover > .second {
    background-color: blue;
  }
 </style>

 <div class="first">
  First
  <div class="second">Second</div>
 </div>
```

В приведенном выше коде будет изменен цвет фона `.second` до синего, когда вы наведите указатель мыши на `.first` .

4.  Когда вы наведете над элементом изменение общего потомка.

```html

<style>
  .first:hover .second {
    background-color: blue;
  }
 </style>

 <div class="first">
  First
  <div class="container">
    Container
    <div class="second">Second</div>
  </div>
 </div>
```

Как и в примере 2, это также дает большую гибкость, поскольку два элемента больше не должны быть непосредственно смежными. Вы заметите, что область, `.first` от зависания, больше в примерах 3 и 4. Это происходит из-за того, что вы все еще `.first` если курсор находится над одним из его дочерних элементов.

#### Дополнительная информация:

[Веб-документы MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/%3Ahover) [w3schools](https://www.w3schools.com/cssref/sel_hover.asp)


text:
<?php

namespace Onend\PayPal\Common\Enum;

class ClientOption extends AbstractEnum
{
    const CLIENT_ID = "client_id";
    const SECRET = "secret";
    const ACCESS_TOKEN = "access_token";
}


text:
package org.apache.cassandra.io.util;

import java.nio.ByteBuffer;
import java.util.Optional;

import org.apache.cassandra.io.util.File;

public class ChecksummedSequentialWriter extends SequentialWriter
{
    private static final SequentialWriterOption CRC_WRITER_OPTION = SequentialWriterOption.newBuilder()
                                                                                .bufferSize(8 * 1024)
                                                                                .build();

    private final SequentialWriter crcWriter;
    private final ChecksumWriter crcMetadata;
    private final Optional<File> digestFile;

    public ChecksummedSequentialWriter(File file, File crcPath, File digestFile, SequentialWriterOption option)
    {
        super(file, option);
        crcWriter = new SequentialWriter(crcPath, CRC_WRITER_OPTION);
        crcMetadata = new ChecksumWriter(crcWriter);
        crcMetadata.writeChunkSize(buffer.capacity());
        this.digestFile = Optional.ofNullable(digestFile);
    }

    @Override
    protected void flushData()
    {
        super.flushData();
        ByteBuffer toAppend = buffer.duplicate();
        toAppend.position(0);
        toAppend.limit(buffer.position());
        crcMetadata.appendDirect(toAppend, false);
    }

    protected class TransactionalProxy extends SequentialWriter.TransactionalProxy
    {
        @Override
        protected Throwable doCommit(Throwable accumulate)
        {
            return super.doCommit(crcWriter.commit(accumulate));
        }

        @Override
        protected Throwable doAbort(Throwable accumulate)
        {
            return super.doAbort(crcWriter.abort(accumulate));
        }

        @Override
        protected void doPrepare()
        {
            syncInternal();
            digestFile.ifPresent(crcMetadata::writeFullChecksum);
            crcWriter.prepareToCommit();
        }
    }

    @Override
    protected SequentialWriter.TransactionalProxy txnProxy()
    {
        return new TransactionalProxy();
    }
}


text:
<?php

namespace PragmaRX\Health\Checkers;

use PragmaRX\Health\Support\Result;

class DiskSpace extends Base
{
    /**
     * Check resource.
     *
     * @return Result
     */
    public function check()
    {
        $free = disk_free_space($this->target->path);

        if (! $this->isEnough($free, $this->target->minimum)) {
            return $this->makeResult(
                false,
                sprintf(
                    $this->target->message,
                    $this->target->path,
                    bytes_to_human($free),
                    $this->target->minimum
                )
            );
        }

        return $this->makeHealthyResult();
    }

    public function isEnough($free, $minimum)
    {
        return $free > human_to_bytes($minimum);
    }
}


text:
#ifndef _ARSDK_WIRESHARK_H
#define _ARSDK_WIRESHARK_H

#include <stdint.h>

#define WS_DLL_PUBLIC_DEF __attribute__ ((visibility ("default")))
#define WS_DLL_PUBLIC     WS_DLL_PUBLIC_DEF extern

/* GLib types */
typedef unsigned int guint;
typedef int gint;
typedef uint8_t guint8;
typedef int8_t gint8;
typedef uint16_t guint16;
typedef int16_t gint16;
typedef uint32_t guint32;
typedef int32_t gint32;
typedef uint64_t guint64;
typedef int64_t gint64;
typedef char gchar;
typedef float gfloat;
typedef double gdouble;
typedef int gboolean;

#define TRUE 1
#define FALSE 0

/* Useful when you have an array whose size you can tell at compile-time */
#define array_length(x)	(sizeof x / sizeof x[0])

/* This handle is opaque outside of "packet.c". */
struct dissector_handle;
typedef struct dissector_handle *dissector_handle_t;

struct tvbuff;
typedef struct tvbuff tvbuff_t;

struct _packet_info;

struct epan_column_info;

typedef struct _address {
	int          type;         /* type of address */
	int          hf;           /* the specific field that this addr is */
	int          len;          /* length of address, in bytes */
	const void  *data;          /* pointer to address data */
} address;

/** data structure to hold time values with nanosecond resolution*/
typedef struct nstime_t {
        time_t  secs;
        int     nsecs;
} nstime_t;

/* anonymize some fields */
typedef struct _packet_info {
	const char *current_proto;
	struct epan_column_info *cinfo;
	void *fd;
	void *pseudo_header;
	int file_type_subtype;
	void *phdr;
	void *data_src;
	address dl_src;
	address dl_dst;
	address net_src;
	address net_dst;
	address src;
	address dst;
	guint32 ipproto;
	int ctype;
	guint32 circuit_id;
	const char *noreassembly_reason;
	gboolean fragmented;
	struct {
		guint32 in_error_pkt:1;
		guint32 in_gre_pkt:1;
	} flags;
	int ptype;
	guint32 srcport;
	guint32 destport;
	guint32 match_uint;
	const char *match_string;
	guint16 can_desegment;
	guint16 saved_can_desegment;
	int desegment_offset;
#define DESEGMENT_ONE_MORE_SEGMENT 0x0fffffff
#define DESEGMENT_UNTIL_FIN        0x0ffffffe
	guint32 desegment_len;
	guint16 want_pdu_tracking;
	guint32 bytes_until_next_pdu;
	int     p2p_dir;
#define DECRYPT_GSSAPI_NORMAL   1
#define DECRYPT_GSSAPI_DCE  2
	guint16 decrypt_gssapi_tvb;
	tvbuff_t *gssapi_wrap_tvb;
	tvbuff_t *gssapi_encrypted_tvb;
	tvbuff_t *gssapi_decrypted_tvb;
	gboolean gssapi_data_encrypted;

	void    *private_data;
	void *private_table;

	void *layers;
	guint8 curr_layer_num;
	guint16 link_number;
	guint8  annex_a_used;
	guint16 profinet_type;
	void *sccp_info;
	guint16 clnp_srcref;
	guint16 clnp_dstref;

	int link_dir;

	void* proto_data;
	void* dependent_frames;
	void* frame_end_routines;

	void *pool;
	void *epan;
	nstime_t     rel_ts;
	const gchar  *pkt_comment;
	const gchar *heur_list_name;
} packet_info;

struct _proto_node;

/** A protocol tree element. */
typedef struct _proto_node proto_tree;
/** A protocol item element. */
typedef struct _proto_node proto_item;

/*
 * Dissector that returns:
 *
 *	The amount of data in the protocol's PDU, if it was able to
 *	dissect all the data;
 *
 *	0, if the tvbuff doesn't contain a PDU for that protocol;
 *
 *	The negative of the amount of additional data needed, if
 *	we need more data (e.g., from subsequent TCP segments) to
 *	dissect the entire PDU.
 */
typedef int (*new_dissector_t)(tvbuff_t *, packet_info *, proto_tree *, void *);

WS_DLL_PUBLIC dissector_handle_t new_create_dissector_handle(new_dissector_t dissector,
					       const int proto);

/* Add an entry to a uint dissector table. */
WS_DLL_PUBLIC void dissector_add_uint(const char *abbrev, const guint32 pattern,
			dissector_handle_t handle);
/* Delete the entry for a dissector in a uint dissector table
   with a particular pattern. */
WS_DLL_PUBLIC void dissector_delete_uint(const char *name, const guint32 pattern,
			   dissector_handle_t handle);
/*
 * Routines to let modules that have preference settings register
 * themselves by name, and to let them register preference settings
 * by name.
 */
struct pref_module;

struct pref_custom_cbs;

typedef struct pref_module module_t;

/*
 * Register that a protocol has preferences.
 */
WS_DLL_PUBLIC module_t *prefs_register_protocol(int id, void (*apply_cb)(void));

/*
 * Register a preference with an unsigned integral value.
 */
WS_DLL_PUBLIC void prefs_register_uint_preference(module_t *module, const char *name,
				    const char *title, const char *description,
				    guint base, guint *var);

/* VALUE TO STRING MATCHING */

typedef struct _value_string {
	guint32      value;
	const gchar *strptr;
} value_string;

/** Make a const value_string[] look like a _value_string pointer, used to set header_field_info.strings */
#define VALS(x)	(const struct _value_string*)(x)

/* field types */
enum ftenum {
        FT_NONE,        /* used for text labels with no value */
        FT_PROTOCOL,
        FT_BOOLEAN,     /* TRUE and FALSE come from <glib.h> */
        FT_UINT8,
        FT_UINT16,
        FT_UINT24,      /* really a UINT32, but displayed as 3 hex-digits if FD_HEX*/
        FT_UINT32,
        FT_UINT64,
        FT_INT8,
        FT_INT16,
        FT_INT24,       /* same as for UINT24 */
        FT_INT32,
        FT_INT64,
        FT_FLOAT,
        FT_DOUBLE,
        FT_ABSOLUTE_TIME,
        FT_RELATIVE_TIME,
        FT_STRING,
        FT_STRINGZ,     /* for use with proto_tree_add_item() */
        FT_UINT_STRING, /* for use with proto_tree_add_item() */
        FT_ETHER,
        FT_BYTES,
        FT_UINT_BYTES,
        FT_IPv4,
        FT_IPv6,
        FT_IPXNET,
        FT_FRAMENUM,    /* a UINT32, but if selected lets you go to frame with that number */
        FT_PCRE,        /* a compiled Perl-Compatible Regular Expression object */
        FT_GUID,        /* GUID, UUID */
        FT_OID,         /* OBJECT IDENTIFIER */
        FT_EUI64,
        FT_AX25,
        FT_VINES,
        FT_REL_OID,     /* RELATIVE-OID */
        FT_SYSTEM_ID,
        FT_STRINGZPAD,  /* for use with proto_tree_add_item() */
        FT_NUM_TYPES /* last item number plus one */
};

typedef enum ftenum ftenum_t;

struct _ftype_t;
typedef struct _ftype_t ftype_t;

#define ENC_BIG_ENDIAN		0x00000000
#define ENC_LITTLE_ENDIAN	0x80000000

/*
 * Historically FT_TIMEs were only timespecs; the only question was whether
 * they were stored in big- or little-endian format.
 *
 * For backwards compatibility, we interpret an encoding of 1 as meaning
 * "little-endian timespec", so that passing TRUE is interpreted as that.
 */
#define ENC_TIME_TIMESPEC	0x00000000	/* "struct timespec" */
#define ENC_TIME_NTP		0x00000002	/* NTP times */
#define ENC_TIME_TOD		0x00000004	/* System/3xx and z/Architecture time-of-day clock */

/*
 * Historically, the only place the representation mattered for strings
 * was with FT_UINT_STRINGs, where we had FALSE for the string length
 * being big-endian and TRUE for it being little-endian.
 *
 * We now have encoding values for the character encoding.  The encoding
 * values are encoded in all but the top bit (which is the byte-order
 * bit, required for FT_UINT_STRING and for UCS-2 and UTF-16 strings)
 * and the bottom bit (which we ignore for now so that programs that
 * pass TRUE for the encoding just do ASCII).  (The encodings are given
 * directly as even numbers in hex, so that make-init-lua.pl can just
 * turn them into numbers for use in init.lua.)
 *
 * We don't yet process ASCII and UTF-8 differently.  Ultimately, for
 * ASCII, all bytes with the 8th bit set should be mapped to some "this
 * is not a valid character" code point, as ENC_ASCII should mean "this
 * is ASCII, not some extended variant thereof".  We should also map
 * 0x00 to that as well - null-terminated and null-padded strings
 * never have NULs in them, but counted strings might.  (Either that,
 * or the values for strings should be counted, not null-terminated.)
 * For UTF-8, invalid UTF-8 sequences should be mapped to the same
 * code point.
 *
 * For display, perhaps we should also map control characters to the
 * Unicode glyphs showing the name of the control character in small
 * caps, diagonally.  (Unfortunately, those only exist for C0, not C1.)
 */
#define ENC_CHARENCODING_MASK		0x7FFFFFFE	/* mask out byte-order bits */
#define ENC_ASCII			0x00000000
#define ENC_UTF_8			0x00000002
#define ENC_UTF_16			0x00000004
#define ENC_UCS_2			0x00000006
#define ENC_UCS_4			0x00000008
#define ENC_ISO_8859_1			0x0000000A
#define ENC_ISO_8859_2			0x0000000C
#define ENC_ISO_8859_3			0x0000000E
#define ENC_ISO_8859_4			0x00000010
#define ENC_ISO_8859_5			0x00000012
#define ENC_ISO_8859_6			0x00000014
#define ENC_ISO_8859_7			0x00000016
#define ENC_ISO_8859_8			0x00000018
#define ENC_ISO_8859_9			0x0000001A
#define ENC_ISO_8859_10			0x0000001C
#define ENC_ISO_8859_11			0x0000001E
/* #define ENC_ISO_8859_12			0x00000020 ISO 8859-12 was abandoned */
#define ENC_ISO_8859_13			0x00000022
#define ENC_ISO_8859_14			0x00000024
#define ENC_ISO_8859_15			0x00000026
#define ENC_ISO_8859_16			0x00000028
#define ENC_WINDOWS_1250		0x0000002A
#define ENC_3GPP_TS_23_038_7BITS	0x0000002C
#define ENC_EBCDIC			0x0000002E
#define ENC_MAC_ROMAN			0x00000030
#define ENC_CP437			0x00000032
#define ENC_ASCII_7BITS			0x00000034

/*
 * TODO:
 *
 * These could probably be used by existing code:
 *
 *	"IBM MS DBCS"
 *	JIS C 6226
 *
 * As those are added, change code such as the code in packet-bacapp.c
 * to use them.
 */

/*
 * For protocols (FT_PROTOCOL), aggregate items with subtrees (FT_NONE),
 * opaque byte-array fields (FT_BYTES), and other fields where there
 * is no choice of encoding (either because it's "just a bucket
 * of bytes" or because the encoding is completely fixed), we
 * have ENC_NA (for "Not Applicable").
 */
#define ENC_NA			0x00000000

/* For cases where either native type or string encodings could both be
 * valid arguments, we need something to distinguish which one is being
 * passed as the argument, because ENC_BIG_ENDIAN and ENC_ASCII are both
 * 0x00000000. So we use ENC_STR_NUM or ENC_STR_HEX bit-or'ed with
 * ENC_ASCII and its ilk.
 */
/* this is for strings as numbers "12345" */
#define ENC_STR_NUM             0x01000000
/* this is for strings as hex "1a2b3c" */
#define ENC_STR_HEX             0x02000000
/* a convenience macro for either of the above */
#define ENC_STRING              0x03000000
/* mask out ENC_STR_* and related bits - should this replace ENC_CHARENCODING_MASK? */
#define ENC_STR_MASK            0x0000FFFE

/* for cases where the number is allowed to have a leading '+'/'-' */
/* this can't collide with ENC_SEP_* because they can be used simultaneously */
#define ENC_NUM_PREF    0x00200000

/* For cases where a string encoding contains hex, bit-or one or more
 * of these for the allowed separator(s), as well as with ENC_STR_HEX.
 * See hex_str_to_bytes_encoding() in epan/strutil.h for details.
 */
#define ENC_SEP_NONE    0x00010000
#define ENC_SEP_COLON   0x00020000
#define ENC_SEP_DASH    0x00040000
#define ENC_SEP_DOT   0x00080000
#define ENC_SEP_SPACE   0x00100000
/* a convenience macro for the above */
#define ENC_SEP_MASK    0x001F0000

/* For cases where a string encoding contains a timestamp, use one
 * of these (but only one). These values can collide with above, because
 * you can't do both at the same time.
 */
#define ENC_ISO_8601_DATE       0x00010000
#define ENC_ISO_8601_TIME       0x00020000
#define ENC_ISO_8601_DATE_TIME  0x00030000
#define ENC_RFC_822             0x00040000
#define ENC_RFC_1123            0x00080000
/* a convenience macro for the above - for internal use only */
#define ENC_STR_TIME_MASK       0x000F0000

/* Values for header_field_info.display */

/* For integral types, the display format is a BASE_* field_display_e value
 * possibly ORed with BASE_*_STRING */

/** FIELD_DISPLAY_E_MASK selects the field_display_e value.  Its current
 * value means that we may have at most 16 field_display_e values. */
#define FIELD_DISPLAY_E_MASK 0x0F

typedef enum {
/* Integral types */
	BASE_NONE    = 0,   /**< none */
	BASE_DEC     = 1,   /**< decimal */
	BASE_HEX     = 2,   /**< hexadecimal */
	BASE_OCT     = 3,   /**< octal */
	BASE_DEC_HEX = 4,   /**< decimal (hexadecimal) */
	BASE_HEX_DEC = 5,   /**< hexadecimal (decimal) */
	BASE_CUSTOM  = 6,   /**< call custom routine (in ->strings) to format */

/* String types */
	STR_ASCII    = BASE_NONE, /**< shows non-printable ASCII characters as C-style escapes */
	/* XXX, support for format_text_wsp() ? */
	STR_UNICODE  = 7          /**< shows non-printable UNICODE characters as \\uXXXX (XXX for now non-printable characters display depends on UI) */
} field_display_e;

/* Following constants have to be ORed with a field_display_e when dissector
 * want to use specials value-string MACROs for a header_field_info */
#define BASE_RANGE_STRING 0x10
#define BASE_EXT_STRING   0x20
#define BASE_VAL64_STRING 0x40

/** BASE_ values that cause the field value to be displayed twice */
#define IS_BASE_DUAL(b) ((b)==BASE_DEC_HEX||(b)==BASE_HEX_DEC)

/* For FT_ABSOLUTE_TIME, the display format is an absolute_time_display_e
 * as per time_fmt.h. */
typedef enum {
    HF_REF_TYPE_NONE,       /**< Field is not referenced */
    HF_REF_TYPE_INDIRECT,   /**< Field is indirectly referenced (only applicable for FT_PROTOCOL) via. its child */
    HF_REF_TYPE_DIRECT      /**< Field is directly referenced */
} hf_ref_type;

/** information describing a header field */
typedef struct _header_field_info header_field_info;

/** information describing a header field */
struct _header_field_info {
	/* ---------- set by dissector --------- */
	const char		*name;           /**< [FIELDNAME] full name of this field */
	const char		*abbrev;         /**< [FIELDABBREV] abbreviated name of this field */
	enum ftenum		 type;           /**< [FIELDTYPE] field type, one of FT_ (from ftypes.h) */
	int			     display;        /**< [FIELDDISPLAY] one of BASE_, or field bit-width if FT_BOOLEAN and non-zero bitmask */
	const void		*strings;        /**< [FIELDCONVERT] value_string, val64_string, range_string or true_false_string,
				                      typically converted by VALS(), RVALS() or TFS().
				                      If this is an FT_PROTOCOL then it points to the
				                      associated protocol_t structure */
	guint32			 bitmask;        /**< [BITMASK] bitmask of interesting bits */
	const char		*blurb;          /**< [FIELDDESCR] Brief description of field */

	/* ------- set by proto routines (prefilled by HFILL macro, see below) ------ */
	int				     id;                /**< Field ID */
	int					 parent;            /**< parent protocol tree */
	hf_ref_type			 ref_type;          /**< is this field referenced by a filter */
	int                  same_name_prev_id; /**< ID of previous hfinfo with same abbrev */
	header_field_info	*same_name_next;    /**< Link to next hfinfo with same abbrev */
};

/**
 * HFILL initializes all the "set by proto routines" fields in a
 * _header_field_info. If new fields are added or removed, it should
 * be changed as necessary.
 */
#define HFILL -1, 0, HF_REF_TYPE_NONE, -1, NULL

#define HFILL_INIT(hf)   \
	hf.hfinfo.id				= -1;   \
	hf.hfinfo.parent			= 0;   \
	hf.hfinfo.ref_type			= HF_REF_TYPE_NONE;   \
	hf.hfinfo.same_name_prev_id	= -1;   \
	hf.hfinfo.same_name_next	= NULL;

/** Used when registering many fields at once, using proto_register_field_array() */
typedef struct hf_register_info {
	int				*p_id;	/**< written to by register() function */
	header_field_info		hfinfo;	/**< the field info to be registered */
} hf_register_info;

/** Create a subtree under an existing item.
 @param ti the parent item of the new subtree
 @param idx one of the ett_ array elements registered with proto_register_subtree_array()
 @return the new subtree */
WS_DLL_PUBLIC proto_tree* proto_item_add_subtree(proto_item *ti, const gint idx);

WS_DLL_PUBLIC proto_item *
proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb,
		    const gint start, gint length, const guint encoding);

/** Register a new protocol.
 @param name the full name of the new protocol
 @param short_name abbreviated name of the new protocol
 @param filter_name protocol name used for a display filter string
 @return the new protocol handle */
WS_DLL_PUBLIC int
proto_register_protocol(const char *name, const char *short_name, const char *filter_name);

/** Register a header_field array.
 @param parent the protocol handle from proto_register_protocol()
 @param hf the hf_register_info array
 @param num_records the number of records in hf */
WS_DLL_PUBLIC void
proto_register_field_array(const int parent, hf_register_info *hf, const int num_records);

/** Register a protocol subtree (ett) array.
 @param indices array of ett indices
 @param num_indices the number of records in indices */
WS_DLL_PUBLIC void
proto_register_subtree_array(gint *const *indices, const int num_indices);

/* Get amount of captured data in the buffer (which is *NOT* necessarily the
 * length of the packet). You probably want tvb_reported_length instead. */
WS_DLL_PUBLIC guint tvb_captured_length(const tvbuff_t *tvb);

/* Get reported length of buffer */
WS_DLL_PUBLIC guint tvb_reported_length(const tvbuff_t *tvb);

/************** START OF ACCESSORS ****************/
/* All accessors will throw an exception if appropriate */

WS_DLL_PUBLIC guint8 tvb_get_guint8(tvbuff_t *tvb, const gint offset);

WS_DLL_PUBLIC guint16 tvb_get_ntohs(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint32 tvb_get_ntoh24(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint32 tvb_get_ntohl(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint64 tvb_get_ntoh40(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gint64 tvb_get_ntohi40(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint64 tvb_get_ntoh48(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gint64 tvb_get_ntohi48(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint64 tvb_get_ntoh56(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gint64 tvb_get_ntohi56(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint64 tvb_get_ntoh64(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gfloat tvb_get_ntohieee_float(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gdouble tvb_get_ntohieee_double(tvbuff_t *tvb,
    const gint offset);

WS_DLL_PUBLIC guint16 tvb_get_letohs(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint32 tvb_get_letoh24(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint32 tvb_get_letohl(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint64 tvb_get_letoh40(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gint64 tvb_get_letohi40(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint64 tvb_get_letoh48(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gint64 tvb_get_letohi48(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint64 tvb_get_letoh56(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gint64 tvb_get_letohi56(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC guint64 tvb_get_letoh64(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gfloat tvb_get_letohieee_float(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gdouble tvb_get_letohieee_double(tvbuff_t *tvb,
    const gint offset);

/** Find size of stringz (NUL-terminated string) by looking for terminating
 * NUL.  The size of the string includes the terminating NUL.
 *
 * If the NUL isn't found, it throws the appropriate exception.
 */
WS_DLL_PUBLIC guint tvb_strsize(tvbuff_t *tvb, const gint offset);

/**
 * Given a tvbuff and an offset, with the offset assumed to refer to
 * a null-terminated string, find the length of that string (and throw
 * an exception if the tvbuff ends before we find the null), allocate
 * a buffer big enough to hold the string, copy the string into it,
 * and return a pointer to the string.  Also return the length of the
 * string (including the terminating null) through a pointer.
 *
 * This returns a constant (unmodifiable) string that does not need
 * to be freed; instead, it will automatically be freed once the next
 * packet is dissected.
 *
 * It is slightly more efficient than the other routines, but does *NOT*
 * do any translation to UTF-8 - the string consists of the raw octets
 * of the string, in whatever encoding they happen to be in, and, if
 * the string is not valid in that encoding, with invalid octet sequences
 * as they are in the packet.
 */
WS_DLL_PUBLIC const guint8 *tvb_get_const_stringz(tvbuff_t *tvb,
				    const gint offset, gint *lengthp);

struct epan_dissect;

/** @file
 *  Helper routines for column utility structures and routines.
 */

struct epan_column_info;
typedef struct epan_column_info column_info;

/**
 * All of the possible columns in summary listing.
 *
 * NOTE1: The entries MUST remain in this order, or else you need to reorder
 *        the slist[] and dlist[] arrays in column.c to match!
 *
 * NOTE2: Please add the COL_XYZ entry in the appropriate spot, such that the
 *        dlist[] array remains in alphabetical order!
 */
enum {
  COL_8021Q_VLAN_ID,  /**< 0) 802.1Q vlan ID */
  COL_ABS_YMD_TIME,   /**< 1) Absolute date, as YYYY-MM-DD, and time */
  COL_ABS_YDOY_TIME,  /**< 2) Absolute date, as YYYY/DOY, and time */
  COL_ABS_TIME,       /**< 3) Absolute time */
  COL_CIRCUIT_ID,     /**< 4) Circuit ID */
  COL_DSTIDX,         /**< 5) !! DEPRECATED !! - Dst port idx - Cisco MDS-specific */
  COL_SRCIDX,         /**< 6) !! DEPRECATED !! - Src port idx - Cisco MDS-specific */
  COL_VSAN,           /**< 7) VSAN - Cisco MDS-specific */
  COL_CUMULATIVE_BYTES, /**< 8) Cumulative number of bytes */
  COL_CUSTOM,         /**< 9) Custom column (any filter name's contents) */
  COL_DCE_CALL,       /**< 10) DCE/RPC connection oriented call id OR datagram sequence number */
  COL_DCE_CTX,        /**< 11) !! DEPRECATED !! - DCE/RPC connection oriented context id */
  COL_DELTA_TIME,     /**< 12) Delta time */
  COL_DELTA_CONV_TIME,/**< 13) Delta time to last frame in conversation */
  COL_DELTA_TIME_DIS, /**< 14) Delta time displayed*/
  COL_RES_DST,        /**< 15) Resolved dest */
  COL_UNRES_DST,      /**< 16) Unresolved dest */
  COL_RES_DST_PORT,   /**< 17) Resolved dest port */
  COL_UNRES_DST_PORT, /**< 18) Unresolved dest port */
  COL_DEF_DST,        /**< 19) Destination address */
  COL_DEF_DST_PORT,   /**< 20) Destination port */
  COL_EXPERT,         /**< 21) Expert Info */
  COL_IF_DIR,         /**< 22) FW-1 monitor interface/direction */
  COL_OXID,           /**< 23) !! DEPRECATED !! - Fibre Channel OXID */
  COL_RXID,           /**< 24) !! DEPRECATED !! - Fibre Channel RXID */
  COL_FR_DLCI,        /**< 25) !! DEPRECATED !! - Frame Relay DLCI */
  COL_FREQ_CHAN,      /**< 26) IEEE 802.11 (and WiMax?) - Channel */
  COL_BSSGP_TLLI,     /**< 27) !! DEPRECATED !! - GPRS BSSGP IE TLLI */
  COL_HPUX_DEVID,     /**< 28) !! DEPRECATED !! - HP-UX Nettl Device ID */
  COL_HPUX_SUBSYS,    /**< 29) !! DEPRECATED !! - HP-UX Nettl Subsystem */
  COL_DEF_DL_DST,     /**< 30) Data link layer dest address */
  COL_DEF_DL_SRC,     /**< 31) Data link layer source address */
  COL_RES_DL_DST,     /**< 32) Resolved DL dest */
  COL_UNRES_DL_DST,   /**< 33) Unresolved DL dest */
  COL_RES_DL_SRC,     /**< 34) Resolved DL source */
  COL_UNRES_DL_SRC,   /**< 35) Unresolved DL source */
  COL_RSSI,           /**< 36) IEEE 802.11 - received signal strength */
  COL_TX_RATE,        /**< 37) IEEE 802.11 - TX rate in Mbps */
  COL_DSCP_VALUE,     /**< 38) IP DSCP Value */
  COL_INFO,           /**< 39) Description */
  COL_COS_VALUE,      /**< 40) !! DEPRECATED !! - L2 COS Value */
  COL_RES_NET_DST,    /**< 41) Resolved net dest */
  COL_UNRES_NET_DST,  /**< 42) Unresolved net dest */
  COL_RES_NET_SRC,    /**< 43) Resolved net source */
  COL_UNRES_NET_SRC,  /**< 44) Unresolved net source */
  COL_DEF_NET_DST,    /**< 45) Network layer dest address */
  COL_DEF_NET_SRC,    /**< 46) Network layer source address */
  COL_NUMBER,         /**< 47) Packet list item number */
  COL_PACKET_LENGTH,  /**< 48) Packet length in bytes */
  COL_PROTOCOL,       /**< 49) Protocol */
  COL_REL_TIME,       /**< 50) Relative time */
  COL_REL_CONV_TIME,  /**< 51) !! DEPRECATED !! - Relative time to beginning of conversation */
  COL_DEF_SRC,        /**< 52) Source address */
  COL_DEF_SRC_PORT,   /**< 53) Source port */
  COL_RES_SRC,        /**< 54) Resolved source */
  COL_UNRES_SRC,      /**< 55) Unresolved source */
  COL_RES_SRC_PORT,   /**< 56) Resolved source port */
  COL_UNRES_SRC_PORT, /**< 57) Unresolved source port */
  COL_TEI,            /**< 58) Q.921 TEI */
  COL_UTC_YMD_TIME,   /**< 59) UTC date, as YYYY-MM-DD, and time */
  COL_UTC_YDOY_TIME,  /**< 60) UTC date, as YYYY/DOY, and time */
  COL_UTC_TIME,       /**< 61) UTC time */
  COL_CLS_TIME,       /**< 62) Command line-specified time (default relative) */
  NUM_COL_FMTS        /**< 63) Should always be last */
};

/** Add (replace) the text of a column element, the text will be copied.
 *
 * @param cinfo the current packet row
 * @param col the column to use, e.g. COL_INFO
 * @param str the string to add
 */
WS_DLL_PUBLIC void	col_add_str(column_info *cinfo, const gint col, const gchar *str);

/** Add (replace) the text of a column element, the text will be formatted and copied.
 *
 * Same function as col_add_str() but using a printf-like format string.
 *
 * @param cinfo the current packet row
 * @param col the column to use, e.g. COL_INFO
 * @param format the format string
 * @param ... the variable number of parameters
 */
WS_DLL_PUBLIC void col_add_fstr(column_info *cinfo, const gint col, const gchar *format, ...);

/** Sets a fence for the current column content,
 * so this content won't be affected by further col_... function calls.
 *
 * This can be useful if a protocol is more than once in a single packet,
 * e.g. multiple HTTP calls in a single TCP packet.
 *
 * @param cinfo the current packet row
 * @param col the column to use, e.g. COL_INFO
 */
WS_DLL_PUBLIC void	col_set_fence(column_info *cinfo, const gint col);

/** Clears the text of a column element.
 *
 * @param cinfo the current packet row
 * @param col the column to use, e.g. COL_INFO
 */
WS_DLL_PUBLIC void	col_clear(column_info *cinfo, const gint col);
/** Set (replace) the text of a column element, the text won't be copied.
 *
 * Usually used to set const strings!
 *
 * @param cinfo the current packet row
 * @param col the column to use, e.g. COL_INFO
 * @param str the string to set
 */
WS_DLL_PUBLIC void	col_set_str(column_info *cinfo, const gint col, const gchar * str);

#endif /* _ARSDK_WIRESHARK_H */


text:
namespace Simple.Data.UnitTest
{
    using System;
    using NUnit.Framework;

    [TestFixture]
    public class SimpleDataExceptionTest
    {
        [Test]
        [SetUICulture("en-US")]
        public void EmptyConstructor()
        {
            var actual = new SimpleDataException();
            Assert.IsNotNull(actual);
            Assert.AreEqual(actual.Message, "Exception of type 'Simple.Data.SimpleDataException' was thrown.");
        }

        [Test]
        public void StringConstructor()
        {
            var actual = new SimpleDataException("Foo");
            Assert.AreEqual("Foo", actual.Message);
        }

        [Test]
        public void StringAndExceptionConstructor()
        {
            var inner = new Exception();
            var actual = new SimpleDataException("Foo", inner);
            Assert.AreEqual("Foo", actual.Message);
            Assert.AreSame(inner, actual.InnerException);
        }
    }
}


text:
package net.java.sip.communicator.impl.protocol.jabber;

import java.util.*;

import org.jitsi.xmpp.extensions.colibri.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.service.protocol.media.*;
import org.jivesoftware.smack.*;
import org.jivesoftware.smack.iqrequest.*;
import org.jivesoftware.smack.packet.*;
import org.jxmpp.jid.*;

/**
 * Implements <tt>OperationSetVideoBridge</tt> for Jabber.
 *
 * @author Yana Stamcheva
 * @author Lyubomir Marinov
 */
public class OperationSetVideoBridgeImpl
    extends AbstractIqRequestHandler
    implements OperationSetVideoBridge,
               RegistrationStateChangeListener
{
    /**
     * The <tt>ProtocolProviderService</tt> implementation which initialized
     * this instance, owns it and is often referred to as its parent.
     */
    private final ProtocolProviderServiceJabberImpl protocolProvider;

    /**
     * Creates an instance of <tt>OperationSetVideoBridgeImpl</tt> by
     * specifying the parent <tt>ProtocolProviderService</tt> announcing this
     * operation set.
     *
     * @param protocolProvider the parent Jabber protocol provider
     */
    public OperationSetVideoBridgeImpl(
            ProtocolProviderServiceJabberImpl protocolProvider)
    {
        super(
            ColibriConferenceIQ.ELEMENT_NAME,
            ColibriConferenceIQ.NAMESPACE,
            IQ.Type.set,
            Mode.async);
        this.protocolProvider = protocolProvider;
        this.protocolProvider.addRegistrationStateChangeListener(this);
    }

    /**
     * Creates a conference call with the specified callees as call peers via a
     * video bridge provided by the parent Jabber provider.
     *
     * @param callees the list of addresses that we should call
     * @return the newly created conference call containing all CallPeers
     * @throws OperationFailedException if establishing the conference call
     * fails
     * @throws OperationNotSupportedException if the provider does not have any
     * conferencing features.
     */
    public Call createConfCall(String[] callees)
        throws OperationFailedException,
               OperationNotSupportedException
    {
        return
            protocolProvider
                .getOperationSet(OperationSetTelephonyConferencing.class)
                    .createConfCall(
                            callees,
                            new MediaAwareCallConference(true));
    }

    /**
     * Invites the callee represented by the specified uri to an already
     * existing call using a video bridge provided by the parent Jabber provider.
     * The difference between this method and createConfCall is that
     * inviteCalleeToCall allows a user to add new peers to an already
     * established conference.
     *
     * @param uri the callee to invite to an existing conf call.
     * @param call the call that we should invite the callee to.
     * @return the CallPeer object corresponding to the callee represented by
     * the specified uri.
     * @throws OperationFailedException if inviting the specified callee to the
     * specified call fails
     * @throws OperationNotSupportedException if allowing additional callees to
     * a pre-established call is not supported.
     */
    public CallPeer inviteCalleeToCall(String uri, Call call)
        throws OperationFailedException,
        OperationNotSupportedException
    {
        return
            protocolProvider
                .getOperationSet(OperationSetTelephonyConferencing.class)
                    .inviteCalleeToCall(uri, call);
    }

    /**
     * Indicates if there's an active video bridge available at this moment. The
     * Jabber provider may announce support for video bridge, but it should not
     * be used for calling until it becomes actually active.
     *
     * @return <tt>true</tt> to indicate that there's currently an active
     * available video bridge, <tt>false</tt> - otherwise
     */
    public boolean isActive()
    {
        Jid jitsiVideobridge = protocolProvider.getJitsiVideobridge();

        return ((jitsiVideobridge != null) && (jitsiVideobridge.length() > 0));
    }

    /**
     * Notifies this instance that a specific <tt>ColibriConferenceIQ</tt> has
     * been received.
     *
     * @param conferenceIQ the <tt>ColibriConferenceIQ</tt> which has been
     * received
     */
    private void processColibriConferenceIQ(ColibriConferenceIQ conferenceIQ)
    {
        /*
         * The application is not a Jitsi Videobridge server, it is a client.
         * Consequently, the specified ColibriConferenceIQ is sent to it in
         * relation to the part of the application's functionality which makes
         * requests to a Jitsi Videobridge server i.e. CallJabberImpl.
         *
         * Additionally, the method processColibriConferenceIQ is presently tasked
         * with processing ColibriConferenceIQ requests only. They are SET IQs
         * sent by the Jitsi Videobridge server to notify the application about
         * updates in the states of (colibri) conferences organized by the
         * application.
         */
        if (IQ.Type.set.equals(conferenceIQ.getType())
                && conferenceIQ.getID() != null)
        {
            OperationSetBasicTelephony<?> basicTelephony
                = protocolProvider.getOperationSet(
                        OperationSetBasicTelephony.class);

            if (basicTelephony != null)
            {
                Iterator<? extends Call> i = basicTelephony.getActiveCalls();

                while (i.hasNext())
                {
                    Call call = i.next();

                    if (call instanceof CallJabberImpl)
                    {
                        CallJabberImpl callJabberImpl = (CallJabberImpl) call;
                        MediaAwareCallConference conference
                            = callJabberImpl.getConference();

                        if ((conference != null)
                                && conference.isJitsiVideobridge())
                        {
                            /*
                             * TODO We may want to disallow rogue CallJabberImpl
                             * instances which may throw an exception to prevent
                             * the conferenceIQ from reaching the CallJabberImpl
                             * instance which it was meant for.
                             */
                            if (callJabberImpl.processColibriConferenceIQ(
                                    conferenceIQ))
                                break;
                        }
                    }
                }
            }
        }
    }

    @Override
    public IQ handleIQRequest(IQ iqRequest)
    {
        ColibriConferenceIQ conferenceIQ = (ColibriConferenceIQ) iqRequest;
        processColibriConferenceIQ(conferenceIQ);
        return IQ.createResultIQ(iqRequest);
    }

    /**
     * {@inheritDoc}
     *
     * Implements {@link RegistrationStateChangeListener}. Notifies this
     * instance that there has been a change in the <tt>RegistrationState</tt>
     * of {@link #protocolProvider}. Subscribes this instance to
     * {@link ColibriConferenceIQ}s as soon as <tt>protocolProvider</tt> is
     * registered and unsubscribes it as soon as <tt>protocolProvider</tt> is
     * unregistered.
     */
    public void registrationStateChanged(RegistrationStateChangeEvent ev)
    {
        RegistrationState registrationState = ev.getNewState();

        if (RegistrationState.REGISTERED.equals(registrationState))
        {
            protocolProvider.getConnection().registerIQRequestHandler(this);
        }
        else if (RegistrationState.UNREGISTERED.equals(registrationState))
        {
            XMPPConnection connection = protocolProvider.getConnection();

            if (connection != null)
                connection.unregisterIQRequestHandler(this);
        }
    }
}


text:
import AnimakitRotator from 'components/AnimakitRotator';

import React from 'react';
import PropTypes from 'prop-types';
// import Dotnav from 'components/Dotnav/Dotnav';
import Dotnav from 'dotnav';

import pathToImage from 'utils/path-to-image';

import dotnavStyles from 'components/Dotnav/Dotnav-my.css';
import styles from './RotatorPromo.css';

export default class RotatorPromo extends React.Component {
  constructor(props) {
    super(props);

    this.state = {
      index: 0,
      side: 'mars',
    };

    this.listeners = {
      setSide: this.setSide.bind(this),
    };
  }

  setSide(index) {
    const side = this.props.sides[index];
    this.setState({ index, side });
    this.props.handleChangeSide(side);
  }

  render() {
    return (

        <AnimakitRotator
          side = { this.state.side }
          duration = { 2000 }
          shadow
        >

Mars

              {`Mars is a terrestrial planet with a thin atmosphere,
              having surface features reminiscent both of the impact craters of the Moon
              and the valleys, deserts, and polar ice caps of Earth`}

Earth

              {`Earth is the third planet from the Sun, the densest planet in the Solar System,
                the largest of the Solar System's four terrestrial planets,
                and the only astronomical object known to harbor life`}

Venus

              {`Venus is a terrestrial planet and is sometimes called Earth's "sister planet"
              because of their similar size, mass, proximity to the Sun and bulk composition`}

Mercury

              {`Mercury is one of four terrestrial planets in the Solar System,
                the smallest, the one closest to the Sun,
                and is a rocky body like Earth`}

        </AnimakitRotator>
        <Dotnav
          count = { this.props.sides.length }
          index = { this.state.index }
          handleChange = { this.listeners.setSide }
          classes = {{
            dots: `${dotnavStyles.dotsVertical} ${dotnavStyles.dotsColored} ${styles.nav}`,
            dot: dotnavStyles.dot,
            dotActive: dotnavStyles.dotActive,
          }}
        />

    );
  }
}

RotatorPromo.propTypes = {
  sides: PropTypes.array,
  handleChangeSide: PropTypes.func,
};

RotatorPromo.defaultProps = {
  sides: [
    'mars',
    'earth',
    'venus',
    'mercury',
  ],
};


text:
'use strict';

const expect = require('chai').expect;
const securityManager = require('./security-manager');

describe.only('SECURITY MANAGER', () => {

    it('The received variable  to make an important of the module "securityManager" has an object', (done) => {

        expect(securityManager).to.be.an('object');
        done();
    });

    it('After to make an important of the module "securityManager" the variable has an object with eight properties', (done) => {

        expect(Object.keys(securityManager)).to.have.lengthOf(9);
        done();
    });

    it('After to make an important of the module "securityManager" the variable has an object with properties below', (done) => {

        const keysOfPropertiesObject = Object.keys(securityManager);

        expect(keysOfPropertiesObject.includes('generateToken')).to.be.true;
        expect(keysOfPropertiesObject.includes('generateHash')).to.be.true;
        expect(keysOfPropertiesObject.includes('dataEncrypt')).to.be.true;
        expect(keysOfPropertiesObject.includes('dataDecrypt')).to.be.true;
        expect(keysOfPropertiesObject.includes('generateKeys')).to.be.true;
        expect(keysOfPropertiesObject.includes('encrypt')).to.be.true;
        expect(keysOfPropertiesObject.includes('decrypt')).to.be.true;
        done();
    });

    it('After to make an important of the module "securityManager" all properties of the object has a function', (done) => {

        for(const method in securityManager) {
            if (securityManager.hasOwnProperty(method)) {
                expect(securityManager[method]).to.be.a('Function');
            }
        }
        done();
    });

    describe('generateHashSecrect', () => {

        it('should returned a hash secret string after pass a any string', (done) => {

            const hash = securityManager.generateHashSecrect('this is return a hash');
            expect(hash).to.equal('4a78ec7bce7ed709d7af2f39095a6e2fab9837df3fa53f0713d55daeef6cfb7a');
            done();
        });
    });

    describe('generateHash', () => {

        it('should returned a hash string after pass a any string', (done) => {

            const hash = securityManager.generateHash('this is return a hash');
            expect(hash).to.equal('211a6ab6088b183e824314f1ddc2f8e32ef58e8b593a78d5da7656812f774537');
            done();
        });
    });

    describe('generateToken', () => {

        it('should returned a format string with three dots', (done) => {

            const token = securityManager.generateToken('this is return a token');
            expect(token.split('.')).to.have.lengthOf(3);
            done();
        });
    });

    describe('verifyToken', () => {

        it('should returned a format string with three dots', (done) => {

            const token = securityManager.generateToken('this is return a token');
            securityManager.verifyToken(token)
                .then((message) => expect(message).to.have.lengthOf('this is return a token'))
                .catch((error) => error);
            done();
        });
    });

    describe('dataEncrypt', () => {

        it('After to pass a parameter as string, should returned a new cryptography', (done) => {

            const cryptography = securityManager.dataEncrypt('this is return a new cryptography');
            expect(cryptography).to.be.equal('be17facf16863302c2e6db56bdaee36d41481080859b7b8ea04322b045380cc5c9356840d54e9ee51c879b97db54a403');
            done();
        });

        it('After called the method without parameters, should returned a new cryptography', (done) => {

            const cryptography = securityManager.dataEncrypt();
            expect(cryptography).to.be.equal('93065f86bffa10ca5886a0f6dbf00f96');
            done();
        });

        it('After to pass a parameter as string "undefined", should returned a new cryptography', (done) => {

            const cryptography = securityManager.dataEncrypt('undefined');
            expect(cryptography).to.be.equal('789c0e372fa7dbee27b716847e71b749');
            done();
        });

        it('After to pass a parameter as null, should returned a new cryptography', (done) => {

            const cryptography = securityManager.dataEncrypt(null);
            expect(cryptography).to.be.equal('03bcdffa14f79cb323798907736d265e');
            done();
        });

        it('After to pass a parameter as NaN, should returned a new cryptography', (done) => {

            const cryptography = securityManager.dataEncrypt(NaN);
            expect(cryptography).to.be.equal('03bcdffa14f79cb323798907736d265e');
            done();
        });

        it('After to pass a parameter as array empty [], should returned a new cryptography', (done) => {

            const cryptography = securityManager.dataEncrypt([]);
            expect(cryptography).to.be.equal('fbff7b16696fa6627a7a4afbee128af1');
            done();
        });
    });

    describe('dataDecrypt', () => {

        it('After to pass a parameter as string, should returned a new cryptography', (done) => {

            const cryptography = securityManager.dataDecrypt('be17facf16863302c2e6db56bdaee36d41481080859b7b8ea04322b045380cc5c9356840d54e9ee51c879b97db54a403');
            expect(cryptography).to.be.equal('this is return a new cryptography');
            done();
        });

        it('After to pass a parameter cryptography, should returned an error object with status code 401 and unauthorized', (done) => {

            try {
                securityManager.dataDecrypt('93065f86bffa10ca5886a0f6dbf00f96');
            } catch (error) {
                expect(error.isBoom).to.be.true;
                expect(error.isServer).to.be.false;
                expect(error.output.statusCode).to.be.equal(401);
                expect(error.output.payload.statusCode).to.be.equal(401);
                expect(error.output.payload.error).to.be.equal('Unauthorized');
                expect(error.output.payload.message).to.be.equal('Unexpected end of JSON input');
            }
            done();
        });

        it('After to pass a parameter cryptography, should returned an error object with status code 401 and unauthorized', (done) => {

            try {
                securityManager.dataDecrypt('789c0e372fa7dbee27b716847e71b749');
            } catch (error) {
                expect(error.isBoom).to.be.true;
                expect(error.isServer).to.be.false;
                expect(error.output.statusCode).to.be.equal(401);
                expect(error.output.payload.statusCode).to.be.equal(401);
                expect(error.output.payload.error).to.be.equal('Unauthorized');
                expect(error.output.payload.message).to.be.equal('Unexpected token u in JSON at position 0');
            }
            done();
        });

        it('After to pass a parameter cryptography, should returned an null', (done) => {

            const cryptography = securityManager.dataDecrypt('03bcdffa14f79cb323798907736d265e');
            expect(cryptography).to.be.equal('null');
            done();
        });

        it('After to pass a parameter cryptography, should returned an null, in this case was returned NaN but this is not happened because I am using JSON.parse()', (done) => {

            const cryptography = securityManager.dataDecrypt('03bcdffa14f79cb323798907736d265e');
            expect(cryptography).to.be.equal('null');
            done();
        });

        it('After to pass a parameter cryptography, should returned an array empty', (done) => {

            const cryptography = JSON.parse(securityManager.dataDecrypt('fbff7b16696fa6627a7a4afbee128af1'));

            expect(cryptography).to.be.an('array').that.is.empty;
            expect(cryptography).to.have.an('array');
            done();
        });
    });

    describe('generateKeys', () => {

        it('After called the function generateKeys, should returned an object', (done) => {

            const object = securityManager.generateKeys();
            expect(object).to.be.an('object');
            done();
        });

        it('After called the function generateKeys, should returned an object with two properties', (done) => {

            const object = securityManager.generateKeys();
            expect(Object.keys(object)).to.have.lengthOf(2);
            done();
        });

        it('After called the function generateKeys, should returned an object with two properties called "publicServerSecret", "privateServerSecret"', (done) => {

            const object = securityManager.generateKeys();
            expect(object).to.have.property('publicServerSecret');
            expect(object).to.have.property('privateServerSecret');
            done();
        });
    });

    describe('encrypt', () => {

        let publicClientSecret = '';
        let publicServerSecret = '';
        let privateServerSecret = '';
        let encryptedPayload = {};

        beforeEach(() => {

            const generateKeys = securityManager.generateKeys();

            publicClientSecret = '02b502536c8c1a4730199a2ae0c028ac0e799d7088b61c041530d2c6ee96862b2d2e26a0a622e3f8df5edb1ad0c179b3bc';
            publicServerSecret = generateKeys.publicServerSecret;
            privateServerSecret = generateKeys.privateServerSecret;
            encryptedPayload = {
                data: securityManager.dataEncrypt({
                    name: 'Astésio',
                    lastName: 'Júnior',
                    age: 28,
                    city: 'São Paulo',
                    date: new Date()
                })
            };
        });

        // it('testing', (done) => {

            // const encrypt = securityManager.encrypt(publicClientSecret, privateServerSecret, encryptedPayload.data);
            // const decrypt = securityManager.decrypt(publicClientSecret, privateServerSecret, encrypt);
            // const decryptReal = securityManager.dataDecrypt(encryptedPayload.data);

            // console.log('dataEncrypt', encryptedPayload);
            // console.log('encrypt', encrypt);
            // console.log('decrypt', decrypt);
            // console.log('decryptReal', decryptReal);
            // done();
        // });
    });
});


text:
MEDUSA_BEGIN;
InputManager::InputManager()
{
	mIsDirty = false;
	mFirstResponder = nullptr;
}

InputManager::~InputManager()
{
}

bool InputManager::Uninitialize()
{
	RETURN_FALSE_IF_FALSE(FrameTask::Uninitialize());
	mDispatchers.Clear();
	return true;
}

void InputManager::BecomeFirstResponder(INode* node)
{
	mFirstResponder = node;
}

void InputManager::CancelFirstResponder(INode* node)
{
	if (mFirstResponder == node)
	{
		mFirstResponder = nullptr;
	}
}

void InputManager::Register(INode* node)
{
	bool isSuccess = mDispatchers.TryAdd(node);
	if (isSuccess)
	{
		mIsDirty = true;
	}
}

void InputManager::Unregister(INode* node)
{
	bool isSuccess = mDispatchers.Remove(node);
	if (isSuccess)
	{
		mIsDirty = true;
	}
}

void InputManager::UpdateInputPassingRecursively()
{
	RETURN_IF_FALSE(mIsDirty);
	IScene* scene = SceneManager::Instance().Current();
	scene->MutableInput().ResetPassing();

	for (auto node : mDispatchers)
	{
		node->MutableInput().EnablePassing();
	}

	mIsDirty = false;

}

void InputManager::Reset()
{
	for (auto node : mDispatchers)
	{
		node->MutableInput().Reset();
	}
}

void InputManager::OnUpdate(float dt)
{

}

bool InputManager::ShowKeyboard(INode* node)
{
	BecomeFirstResponder(node);

	UpdateInputPassingRecursively();
	IScene* scene = SceneManager::Instance().Current();
	RETURN_FALSE_IF_NULL(scene);
	KeyboardEventArg e;
	KeyboardWillShowHelper(scene, e);
	KeyboardShowedHelper(scene, e);

	SyncCommandExecutor::Instance().WaitForComplete();

	return true;
}

bool InputManager::HideKeyboard(INode* node)
{
	CancelFirstResponder(node);

	UpdateInputPassingRecursively();
	IScene* scene = SceneManager::Instance().Current();
	RETURN_FALSE_IF_NULL(scene);
	KeyboardEventArg e;
	KeyboardWillHideHelper(scene, e);
	KeyboardHidedHelper(scene, e);

	SyncCommandExecutor::Instance().WaitForComplete();

	return true;
}

void InputManager::TouchesBegan(TouchEventArg& e)
{
	if (mFirstResponder != nullptr)
	{
		InputDispatcher& dispatcher = mFirstResponder->MutableInput();
		if (dispatcher.HasHandler())
		{
			e.UpdateValidActiveTouches(mFirstResponder);
			dispatcher.TouchesBegan(e);
		}
	}
	else
	{
		UpdateInputPassingRecursively();
		IScene* scene = SceneManager::Instance().Current();
		RETURN_IF_NULL(scene);
		TouchesBeganHelper(scene, e);
	}

	SyncCommandExecutor::Instance().WaitForComplete();

}

void InputManager::TouchesMoved(TouchEventArg& e)
{
	if (mFirstResponder != nullptr)
	{
		InputDispatcher& dispatcher = mFirstResponder->MutableInput();
		if (dispatcher.HasHandler())
		{
			e.UpdateValidActiveTouches(mFirstResponder);
			dispatcher.TouchesMoved(e);
		}
	}
	else
	{
		UpdateInputPassingRecursively();
		IScene* scene = SceneManager::Instance().Current();
		RETURN_IF_NULL(scene);
		TouchesMovedHelper(scene, e);
	}

	SyncCommandExecutor::Instance().WaitForComplete();

}

void InputManager::TouchesEnded(TouchEventArg& e)
{
	if (mFirstResponder != nullptr)
	{
		InputDispatcher& dispatcher = mFirstResponder->MutableInput();
		if (dispatcher.HasHandler())
		{
			e.UpdateValidActiveTouches(mFirstResponder);
			dispatcher.TouchesEnded(e);

			if (dispatcher.IsSwallow())
			{
				CancelFirstResponder(mFirstResponder);
			}
		}
	}
	else
	{
		UpdateInputPassingRecursively();
		IScene* scene = SceneManager::Instance().Current();
		RETURN_IF_NULL(scene);
		TouchesEndedHelper(scene, e);
		if (e.IsAllTouchEnded())
		{
			Reset();
		}
	}

	SyncCommandExecutor::Instance().WaitForComplete();

}

void InputManager::TouchesCancelled(TouchEventArg& e)
{
	if (mFirstResponder != nullptr)
	{
		InputDispatcher& dispatcher = mFirstResponder->MutableInput();
		if (dispatcher.HasHandler())
		{
			e.UpdateValidActiveTouches(mFirstResponder);
			dispatcher.TouchesCancelled(e);
		}
	}
	else
	{
		UpdateInputPassingRecursively();
		IScene* scene = SceneManager::Instance().Current();
		RETURN_IF_NULL(scene);
		TouchesCancelledHelper(scene, e);
		Reset();
	}

	SyncCommandExecutor::Instance().WaitForComplete();

}

void InputManager::KeyDown(KeyDownEventArg& e)
{
	if (mFirstResponder != nullptr)
	{
		InputDispatcher& dispatcher = mFirstResponder->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.KeyDown(e);
		}
	}
	else
	{
		UpdateInputPassingRecursively();
		IScene* scene = SceneManager::Instance().Current();
		RETURN_IF_NULL(scene);
		KeyDownHelper(scene, e);
	}

	SyncCommandExecutor::Instance().WaitForComplete();
}

void InputManager::KeyUp(KeyUpEventArg& e)
{
	if (mFirstResponder != nullptr)
	{
		InputDispatcher& dispatcher = mFirstResponder->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.KeyUp(e);
		}
	}
	else
	{
		UpdateInputPassingRecursively();
		IScene* scene = SceneManager::Instance().Current();
		RETURN_IF_NULL(scene);
		KeyUpHelper(scene, e);
	}

	SyncCommandExecutor::Instance().WaitForComplete();
}

void InputManager::CharInput(CharInputEventArg& e)
{
	if (mFirstResponder != nullptr)
	{
		InputDispatcher& dispatcher = mFirstResponder->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.CharInput(e);
		}
	}
	else
	{
		UpdateInputPassingRecursively();
		IScene* scene = SceneManager::Instance().Current();
		RETURN_IF_NULL(scene);
		CharInputHelper(scene, e);
	}

	SyncCommandExecutor::Instance().WaitForComplete();
}

void InputManager::Scroll(ScrollEventArg& e)
{
	if (mFirstResponder != nullptr)
	{
		InputDispatcher& dispatcher = mFirstResponder->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.Scroll(e);
		}
	}
	else
	{
		UpdateInputPassingRecursively();
		IScene* scene = SceneManager::Instance().Current();
		RETURN_IF_NULL(scene);
		ScrollHelper(scene, e);
	}

	SyncCommandExecutor::Instance().WaitForComplete();
}

void InputManager::TouchesBeganHelper(INode* node, TouchEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();

	//Log::LogInfoFormat("Touch Began [{}]:{} %x",count,node->GetName().c_str(),node);

	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];

		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			//Log::LogInfoFormat("{} Touch Began {}:{} %x",i,child->Depth(),child->GetName().c_str(),child);

			TouchesBeganHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		else
		{
			//Log::LogInfoFormat("{} Touch Ignore {}:{} %x",i,child->Depth(),child->GetName().c_str(),child);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			e.UpdateValidActiveTouches(node);
			dispatcher.TouchesBegan(e);
			if (e.IsValid() && dispatcher.IsSwallow())
			{
				BecomeFirstResponder(node);
				e.Handled = true;
			}

			RETURN_IF_TRUE(e.Handled);
		}

		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}

	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];

		if (child->Input().IsPassingEnabled())
		{
			//Log::LogInfoFormat("{} Touch Began Child<=0:{}",i,child->GetName().c_str());
			TouchesBeganHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		else
		{
			//Log::LogInfoFormat("{} Touch Ignore Child<=0:{}",i,child->GetName().c_str());
		}

		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

}

void InputManager::TouchesMovedHelper(INode* node, TouchEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			TouchesMovedHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			e.UpdateValidActiveTouches(node);
			dispatcher.TouchesMoved(e);
			RETURN_IF_TRUE(e.Handled);
		}

		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}

	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			TouchesMovedHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::TouchesEndedHelper(INode* node, TouchEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();

	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			TouchesEndedHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		else
		{
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			e.UpdateValidActiveTouches(node);
			dispatcher.TouchesEnded(e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			TouchesEndedHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		else
		{
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::MockTouchHelper(INode* node, TouchEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			MockTouchHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			e.UpdateValidActiveTouches(node);
			dispatcher.MockTouch(e);
			RETURN_IF_TRUE(e.Handled);
		}

		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			MockTouchHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::TouchesCancelledHelper(INode* node, TouchEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			TouchesCancelledHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			e.UpdateValidActiveTouches(node);
			dispatcher.TouchesCancelled(e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}

	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			TouchesCancelledHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::KeyDownHelper(INode* node, KeyDownEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			KeyDownHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}

		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.KeyDown(e);
			RETURN_IF_TRUE(e.Handled);
		}

		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			KeyDownHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}

		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::KeyUpHelper(INode* node, KeyUpEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			KeyUpHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.KeyUp(e);
			RETURN_IF_TRUE(e.Handled);
		}

		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			KeyUpHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::CharInputHelper(INode* node, CharInputEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			CharInputHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.CharInput(e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}

	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			CharInputHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::ScrollHelper(INode* node, ScrollEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			ScrollHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.Scroll(e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}

	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			ScrollHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::KeyboardWillShowHelper(INode* node, KeyboardEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			KeyboardWillShowHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.KeyboardWillShow(e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}

	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			KeyboardWillShowHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::KeyboardShowedHelper(INode* node, KeyboardEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			KeyboardShowedHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.KeyboardShowed(e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}

	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			KeyboardShowedHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::KeyboardWillHideHelper(INode* node, KeyboardEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			KeyboardWillHideHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.KeyboardWillHide(e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}

	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			KeyboardWillHideHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

void InputManager::KeyboardHidedHelper(INode* node, KeyboardEventArg& e)
{
	NodeList& nodeList = node->MutableChildren();
	size_t count = nodeList.Count();
	intp i = count - 1;
	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		BREAK_IF(child->Depth() < 0);

		if (child->Input().IsPassingEnabled())
		{
			KeyboardHidedHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}

	{
		InputDispatcher& dispatcher = node->MutableInput();
		if (dispatcher.HasHandler())
		{
			dispatcher.KeyboardHided(e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (node->Input().IsModal())
		{
			e.Handled = true;
			return;
		}

	}

	for (; i >= 0; --i)
	{
		INode* child = nodeList[i];
		if (child->Input().IsPassingEnabled())
		{
			KeyboardHidedHelper(child, e);
			RETURN_IF_TRUE(e.Handled);
		}
		if (child->Input().IsModal())
		{
			e.Handled = true;
			return;
		}
	}
}

MEDUSA_END;


text:
namespace zuki::tools::llvm::clang {

//---------------------------------------------------------------------------
// TemplateArgument Constructor (private)
//
// Arguments:
//
//	handle			- Reference handle
//	index			- Index into the cursor template arguments

TemplateArgument::TemplateArgument(CursorHandle^ handle, unsigned int index)
{
	if(Object::ReferenceEquals(handle, nullptr)) throw gcnew ArgumentNullException("handle");

	CursorHandle::Reference cursor(handle);		// Unwrap and access the safe handle

	// Grab all of the properties for this argument during construction, no need to keep the handle
	m_kind = TemplateArgumentKind(clang_Cursor_getTemplateArgumentKind(cursor, index));
	m_type = local::Type::Create(handle->Owner, handle->TranslationUnit, clang_Cursor_getTemplateArgumentType(cursor, index));
	m_ivalue = (m_kind == TemplateArgumentKind::Integral) ? Nullable<__int64>(clang_Cursor_getTemplateArgumentValue(cursor, index)) : Nullable<__int64>();
	m_uvalue = (m_kind == TemplateArgumentKind::Integral) ? Nullable<unsigned __int64>(clang_Cursor_getTemplateArgumentUnsignedValue(cursor, index)) : Nullable<unsigned __int64>();
}

//---------------------------------------------------------------------------
// TemplateArgument::Create (internal, static)
//
// Creates a new TemplateArgument instance
//
// Arguments:
//
//	owner			- Owning SafeHandle instance
//	transunit		- TranslationUnitHandle instance
//	cursor			- Unmanaged CXCursor instance
//	index			- Index into the cursor template arguments

TemplateArgument^ TemplateArgument::Create(SafeHandle^ owner, TranslationUnitHandle^ transunit, CXCursor cursor, unsigned int index)
{
	return gcnew TemplateArgument(gcnew CursorHandle(owner, transunit, cursor), index);
}

//---------------------------------------------------------------------------
// TemplateArgument::Kind::get
//
// Gets the template argument kind

TemplateArgumentKind TemplateArgument::Kind::get(void)
{
	return m_kind;
}

//---------------------------------------------------------------------------
// TemplateArgument::Type::get
//
// Gets the template argument type

local::Type^ TemplateArgument::Type::get(void)
{
	return m_type;
}

//---------------------------------------------------------------------------
// TemplateArgument::UnsignedValue::get
//
// Gets the unsigned template argument value

Nullable<unsigned __int64> TemplateArgument::UnsignedValue::get(void)
{
	return m_uvalue;
}

//---------------------------------------------------------------------------
// TemplateArgument::Value::get
//
// Gets the signed template argument value

Nullable<__int64> TemplateArgument::Value::get(void)
{
	return m_ivalue;
}

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

} // zuki::tools::llvm::clang

#pragma warning(pop)


text:
filename: /packages/material-ui/src/Select/Select.js
---

# Select API

The API documentation of the Select React component. Learn more about the properties and the CSS customization points.

```js
import Select from '@material-ui/core/Select';
```

## Props

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| autoWidth | bool | false | If true, the width of the popover will automatically be set according to the items inside the menu, otherwise it will be at least the width of the select input. |
| children | node |  | The option elements to populate the select with. Can be some `MenuItem` when `native` is false and `option` when `native` is true.
⚠The `MenuItem` elements **must** be direct descendants when `native` is false. |
| classes | object |  | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. |
| displayEmpty | bool | false | If `true`, the selected item is displayed even if its value is empty. You can only use it when the `native` property is `false` (default). |
| IconComponent | elementType | ArrowDropDownIcon | The icon that displays the arrow. |
| input | element | <Input /> | An `Input` element; does not have to be a material-ui specific `Input`. |
| inputProps | object |  | [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. When `native` is `true`, the attributes are applied on the `select` element. |
| MenuProps | object |  | Properties applied to the [`Menu`](/api/menu/) element. |
| multiple | bool | false | If true, `value` must be an array and the menu will support multiple selections. |
| native | bool | false | If `true`, the component will be using a native `select` element. |
| onChange | func |  | Callback function fired when a menu item is selected.

**Signature:**
`function(event: object, child?: object) => void`
*event:* The event source of the callback. You can pull out the new value by accessing `event.target.value`.
*child:* The react element that was selected when `native` is `false` (default). |
| onClose | func |  | Callback fired when the component requests to be closed. Use in controlled mode (see open).

**Signature:**
`function(event: object) => void`
*event:* The event source of the callback |
| onOpen | func |  | Callback fired when the component requests to be opened. Use in controlled mode (see open).

**Signature:**
`function(event: object) => void`
*event:* The event source of the callback |
| open | bool |  | Control `select` open state. You can only use it when the `native` property is `false` (default). |
| renderValue | func |  | Render the selected value. You can only use it when the `native` property is `false` (default).

**Signature:**
`function(value: any) => ReactElement`
*value:* The `value` provided to the component. |
| SelectDisplayProps | object |  | Properties applied to the clickable div element. |
| value | any |  | The input value. This property is required when the `native` property is `false` (default). |
| variant | enum: 'standard' |
 'outlined' |
 'filled'
 |  | The variant to use. |

The `ref` is forwarded to the root element.

Any other properties supplied will be provided to the root element ([Input](/api/input/)).

## CSS

You can override all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:

| Name | Description |
|:-----|:------------|
| root | Styles applied to the `Input` component `root` class.
| select | Styles applied to the `Input` component `select` class.
| filled | Styles applied to the `Input` component if `variant="filled"`.
| outlined | Styles applied to the `Input` component if `variant="outlined"`.
| selectMenu | Styles applied to the `Input` component `selectMenu` class.
| disabled | Styles applied to the `Input` component `disabled` class.
| icon | Styles applied to the `Input` component `icon` class.

Have a look at the [overriding styles with classes](/customization/components/#overriding-styles-with-classes) section
and the [implementation of the component](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Select/Select.js)
for more detail.

If using the `overrides` [key of the theme](/customization/themes/#css),
you need to use the following style sheet name: `MuiSelect`.

## Inheritance

The properties of the [Input](/api/input/) component are also available.
You can take advantage of this behavior to [target nested components](/guides/api/#spread).

## Notes

The component can cause issues in [StrictMode](https://reactjs.org/docs/strict-mode.html).

## Demos

- [Selects](/components/selects/)