>
< HTTP/1.1 200 OK
< Server: nginx/1.10.0
< Date: Thu, 28 Dec 2017 04:27:39 GMT
< Content-Type: text/plain
< Transfer-Encoding: chunked
<
CLIENT VALUES:
client_address=172.17.0.1
command=GET
real path=/
query=nil
request_version=1.1
request_uri=http://app.example.com:8080/

SERVER VALUES:
server_version=nginx: 1.10.0 - lua: 10001

HEADERS RECEIVED:
accept=*/*
connection=close
host=app.example.com
user-agent=curl/7.53.0
x-forwarded-for=127.0.0.1
BODY:
```

Now, if you run `netstat`, you should port 80 is listened on by haproxy.

```bash
$ netstat -tuln | grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:2380          0.0.0.0:*               LISTEN
```

## FAQ

## Does Voyager configure firewalls for HostPort Ingress?

Voyager operator will configure firewall rules for HostPort Ingress for the following cloud providers: AWS, GCE/GKE .

## What IAM permissions are required for Voyager operator to configure firewalls for HostPort Ingress in AWS?

 - Master: For aws clusters provisioned via [Kops](https://github.com/kubernetes/kops/blob/master/docs/iam_roles.md), no additional permission should be needed. Master instances already has `ec2:*` iam permissions.

- Nodes: `Describe*` permissions are applied by default. Additional `write` permissions need to be applied are:
```
{
  "Effect": "Allow",
  "Action": [
	"ec2:AuthorizeSecurityGroupIngress",
	"ec2:CreateRoute",
	"ec2:CreateSecurityGroup",
	"ec2:CreateTags",
	"ec2:DeleteRoute",
	"ec2:DeleteSecurityGroup",
	"ec2:ModifyInstanceAttribute",
	"ec2:RevokeSecurityGroupIngress",
	"ec2:DescribeInstances",
	"ec2:DescribeRouteTables",
	"ec2:DescribeSecurityGroups",
	"ec2:DescribeSubnets"
  ],
  "Resource": "*"
}
```
---
title: Voyager Operator
menu:
  docs_{{ .version }}:
    identifier: voyager-operator
    name: Voyager Operator
    parent: reference-operator
product_name: voyager
menu_name: docs_{{ .version }}
section_menu_id: reference
---
## voyager operator

Launch Voyager Ingress Operator

### Synopsis

Launch Voyager Ingress Operator

```
voyager operator [flags]
```

### Options

```
      --burst int                  The maximum burst for throttle (default 1000000)
      --cloud-config string        The path to the cloud provider configuration file.  Empty string for no configuration file.
      --cloud-provider string      Name of cloud provider
      --coordinator-image string   HAProxy sidecar Docker image
      --custom-templates string    Glob pattern of custom HAProxy template files used to override built-in templates
      --haproxy-image string       HAProxy Docker image (default "appscode/haproxy:2.4.4-alpine")
  -h, --help                       help for operator
      --ingress-class string       Ingress class handled by voyager. Unset by default. Set to voyager to only handle ingress with annotation kubernetes.io/ingress.class=voyager.
      --kubeconfig string          Path to kubeconfig file with authorization information (the master location is set by the master flag).
      --license-file string        Path to license file
      --master string              The address of the Kubernetes API server (overrides any value in kubeconfig)
      --qps float                  The maximum QPS to the master from this client (default 1e+06)
      --resync-period duration     If non-zero, will re-list this often. Otherwise, re-list will be delayed aslong as possible (until the upstream source closes the watch or times out. (default 10m0s)
      --valida


 54.99211c35.184525 42.351743 54.601171 95.91041 54.601171 151.032833 0 0.912191 0.260626 1.824383 0.260626 2.736574-68.023416 44.436752-149.20845 70.369051-236.518198 70.369051s-168.364469-25.932298-236.518198-70.369051c0-0.912191 0.260626-1.69407 0.260626-2.736574 0-130.182744 105.944515-236.257572 236.257572-236.257572 121.712395 0 220.750318-99.037923 220.750318-220.750318s-99.037923-220.750318-220.750318-220.750318-220.750318 99.037923-220.750318 220.750318c0 70.499364 33.229829 133.179944 84.8338 173.576992-89.003818 42.872996-154.811911 126.533978-173.186053 226.614405C125.7521 737.571901 78.187834 630.193942 78.187834 512 78.187834 272.745228 272.745228 78.187834 512 78.187834s433.812166 194.557394 433.812166 433.812166c-0.130313 118.193942-47.694579 225.571901-124.709595 303.890048zM369.307203 415.698651c0-78.578773 63.983711-142.562484 142.562484-142.562484s142.562484 63.983711 142.562484 142.562484c0 78.709086-63.983711 142.562484-142.562484 142.562484S369.307203 494.277424 369.307203 415.698651z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
    --md-admonition-icon--story: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none'%3E%3Cg id='SVGRepo_bgCarrier' stroke-width='0'%3E%3C/g%3E%3Cg id='SVGRepo_tracerCarrier' stroke-linecap='round' stroke-linejoin='round'%3E%3C/g%3E%3Cg id='SVGRepo_iconCarrier'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 20c-3.2 0-4-2.667-4-4H3v2a2 2 0 0 0 2 2h10zm0 0a3 3 0 0 0 3-3v-7m0-6H7a2 2 0 0 0-2 2v10M18 4h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1m0-6v6m-4-2H9m2 4H9'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
    --md-admonition-icon--danger: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M29.618 14.609h0c-2.916-0.277-5.098-1.914-5.821-4.221-0.416-1.324-2.062-2.281-3.957-2.861-2.037-5.066-3.416-7.824-9.806-7.101 2.295 1.796 4.134 4.205 5.075 6.415-1.843-0.529-3.573


e)
	if err != nil {
		return err
	}
	tooltip := ni.toolTip
	ni.toolTip = ""
	err = ni.SetToolTip(tooltip)
	if err != nil {
		return err
	}
	return nil
}

func (ni *NotifyIcon) applyDPI() {
	dpi := ni.DPI()
	if dpi == ni.lastDPI {
		return
	}
	ni.lastDPI = dpi
	for _, action := range ni.contextMenu.actions.actions {
		if action.image != nil {
			ni.contextMenu.onActionChanged(action)
		}
	}
	icon := ni.icon
	ni.icon = nil
	if icon != nil {
		ni.SetIcon(icon)
	}
}

func (ni *NotifyIcon) notifyIconData() *win.NOTIFYICONDATA {
	nid := &win.NOTIFYICONDATA{
		UID:  ni.id,
		HWnd: ni.hWnd,
	}
	nid.CbSize = uint32(unsafe.Sizeof(*nid) - unsafe.Sizeof(win.HICON(0)))

	return nid
}

// Dispose releases the operating system resources associated with the
// NotifyIcon.
//
// The associated Icon is not disposed of.
func (ni *NotifyIcon) Dispose() error {
	if ni.hWnd == 0 {
		return nil
	}
	delete(notifyIcons, ni)

	nid := ni.notifyIconData()

	if !win.Shell_NotifyIcon(win.NIM_DELETE, nid) {
		return newError("Shell_NotifyIcon")
	}

	ni.hWnd = 0

	return nil
}

func (ni *NotifyIcon) showMessage(title, info string, iconType uint32, icon Image) error {
	nid := ni.notifyIconData()
	nid.UFlags = win.NIF_INFO
	nid.DwInfoFlags = iconType
	var oldIcon Image
	if iconType == win.NIIF_USER && icon != nil {
		oldIcon = ni.icon
		if err := ni.setNIDIcon(nid, icon); err != nil {
			return err
		}
		nid.UFlags |= win.NIF_ICON
	}
	if title16, err := syscall.UTF16FromString(title); err == nil {
		copy(nid.SzInfoTitle[:], title16)
	}
	if info16, err := syscall.UTF16FromString(info); err == nil {
		copy(nid.SzInfo[:], info16)
	}
	if !win.Shell_NotifyIcon(win.NIM_MODIFY, nid) {
		return newError("Shell_NotifyIcon")
	}
	if oldIcon != nil {
		ni.icon = nil
		ni.SetIcon(oldIcon)
	}

	return nil
}

// ShowMessage displays a neutral message balloon above the NotifyIcon.
//
// The NotifyIcon must be visible before calling this method.
func (ni *NotifyIcon) ShowMessage(title, info string) error {
	return ni.showMessage(title, info, win.NIIF_NONE, nil)
}

// ShowInfo displays an info message balloon above the NotifyIcon.
//
// The NotifyIcon must be visible before calling this method.
func (ni *NotifyIcon) ShowInfo(title, info string) error {
	return ni.showMessage(title, info, win.NIIF_INFO, nil)
}

// ShowWarning displays a warning message balloon above the NotifyIcon.
//
// The NotifyIcon must be visible before calling this method.
func (ni *NotifyIcon) ShowWarning(title, info string) error {
	return ni.showMessage(title, info, win.NIIF_WARNING, nil)
}

// ShowError displays an error message balloon above the NotifyIcon.
//
// The NotifyIcon must be visible before calling this method.
func (ni *NotifyIcon) ShowError(title, info string) error {
	return ni.showMessage(title, info, win.N


},

    _observe: function() {
      if (this._observed) {
        return;
      }

      var that = this,
          callbackWrapper = function(event) {
            var attributes = that._serialize();
            if (attributes == that.elementToChange) {
              that.fire("edit", attributes);
            } else {
              that.fire("save", attributes);
            }
            that.hide();
            event.preventDefault();
            event.stopPropagation();
          };

      dom.observe(that.link, "click", function() {
        if (dom.hasClass(that.link, CLASS_NAME_OPENED)) {
          setTimeout(function() { that.hide(); }, 0);
        }
      });

      dom.observe(this.container, "keydown", function(event) {
        var keyCode = event.keyCode;
        if (keyCode === wysihtml5.ENTER_KEY) {
          callbackWrapper(event);
        }
        if (keyCode === wysihtml5.ESCAPE_KEY) {
          that.fire("cancel");
          that.hide();
        }
      });

      dom.delegate(this.container, "[data-wysihtml5-dialog-action=save]", "click", callbackWrapper);

      dom.delegate(this.container, "[data-wysihtml5-dialog-action=cancel]", "click", function(event) {
        that.fire("cancel");
        that.hide();
        event.preventDefault();
        event.stopPropagation();
      });

      var formElements  = this.container.querySelectorAll(SELECTOR_FORM_ELEMENTS),
          i             = 0,
          length        = formElements.length,
          _clearInterval = function() { clearInterval(that.interval); };
      for (; i<length; i++) {
        dom.observe(formElements[i], "change", _clearInterval);
      }

      this._observed = true;
    },

    /**
     * Grabs all fields in the dialog and puts them in key=>value style in an object which
     * then gets returned
     */
    _serialize: function() {
      var data    = this.elementToChange || {},
          fields  = this.container.querySelectorAll(SELECTOR_FIELDS),
          length  = fields.length,
          i       = 0;

      for (; i<length; i++) {
        data[fields[i].getAttribute(ATTRIBUTE_FIELDS)] = fields[i].value;
      }
      return data;
    },

    /**
     * Takes the attributes of the "elementToChange"
     * and inserts them in their corresponding dialog input fields
     *
     * Assume the "elementToChange" looks like this:
     *    foo
     *
     * and we have the following dialog:
     *    <input type="text" data-wysihtml5-dialog-field="href" value="">
     *    <input type="text" data-wysihtml5-dialog-field="target" value="">
     *
     * after calling _interpolate() the dialog will look like this
     *    <input type="text" data-wysihtml5-dialog-field="href" value="http://www.google.com">
     *    <input type="text" data-wysihtml5-dialog-field="target" value="_blank">
     *
     * Basically it adopted the attribute values into the corresponding input fields
     *
     */
    _interpolate: function(avoidHiddenFields) {
      var field,
          fieldName,
          newValue,
          focusedElement = document.querySelector(":focus"),
          fields         = this.container.querySelectorAll(SELECTOR_FIELDS),
          length         = fields.length,
          i              = 0;
      for (; i<length; i++) {
        field = fields


8 C9 FF FF */	addi r6, r9, -1
/* 80272C30 0026E890  38 A5 85 1F */	addi r5, r5, 0x51EB851F@l
/* 80272C34 0026E894  38 09 00 03 */	addi r0, r9, 3
/* 80272C38 0026E898  7C A5 30 96 */	mulhw r5, r5, r6
/* 80272C3C 0026E89C  7C A7 3E 70 */	srawi r7, r5, 7
/* 80272C40 0026E8A0  7C A5 2E 70 */	srawi r5, r5, 5
/* 80272C44 0026E8A4  54 A6 0F FE */	srwi r6, r5, 0x1f
/* 80272C48 0026E8A8  7C 00 16 70 */	srawi r0, r0, 2
/* 80272C4C 0026E8AC  54 E8 0F FE */	srwi r8, r7, 0x1f
/* 80272C50 0026E8B0  7C A5 32 14 */	add r5, r5, r6
/* 80272C54 0026E8B4  7C 00 01 94 */	addze r0, r0
/* 80272C58 0026E8B8  7C C7 42 14 */	add r6, r7, r8
/* 80272C5C 0026E8BC  7C 05 00 50 */	subf r0, r5, r0
/* 80272C60 0026E8C0  7C E6 02 14 */	add r7, r6, r0
lbl_80272C64:
/* 80272C64 0026E8C4  55 20 F0 02 */	slwi r0, r9, 0x1e
/* 80272C68 0026E8C8  55 25 0F FE */	srwi r5, r9, 0x1f
/* 80272C6C 0026E8CC  7C 05 00 50 */	subf r0, r5, r0
/* 80272C70 0026E8D0  38 C0 00 00 */	li r6, 0
/* 80272C74 0026E8D4  54 00 10 3E */	rotlwi r0, r0, 2
/* 80272C78 0026E8D8  7C 00 2A 15 */	add. r0, r0, r5
/* 80272C7C 0026E8DC  40 82 00 28 */	bne lbl_80272CA4
/* 80272C80 0026E8E0  3C A0 51 EC */	lis r5, 0x51EB851F@ha
/* 80272C84 0026E8E4  38 05 85 1F */	addi r0, r5, 0x51EB851F@l
/* 80272C88 0026E8E8  7C 00 48 96 */	mulhw r0, r0, r9
/* 80272C8C 0026E8EC  7C 00 2E 70 */	srawi r0, r0, 5
/* 80272C90 0026E8F0  54 05 0F FE */	srwi r5, r0, 0x1f
/* 80272C94 0026E8F4  7C 00 2A 14 */	add r0, r0, r5
/* 80272C98 0026E8F8  1C 00 00 64 */	mulli r0, r0, 0x64
/* 80272C9C 0026E8FC  7C 00 48 51 */	subf. r0, r0, r9
/* 80272CA0 0026E900  40 82 00 28 */	bne lbl_80272CC8
lbl_80272CA4:
/* 80272CA4 0026E904  3C A0 51 EC */	lis r5, 0x51EB851F@ha
/* 80272CA8 0026E908  38 05 85 1F */	addi r0, r5, 0x51EB851F@l
/* 80272CAC 0026E90C  7C 00 48 96 */	mulhw r0, r0, r9
/* 80272CB0 0026E910  7C 00


@pragma('dart2js:noInline')
/*member: constantFoldNegative:function() {
  return 3;
}*/
int constantFoldNegative() {
  var a = -1;
  return a >>> 30;
}

@pragma('dart2js:noInline')
/*member: unspecialized:function(a) {
  return B.JSInt_methods.$shru(1, a);
}*/
int unspecialized(int a) {
  return 1 >>> a;
}

@pragma('dart2js:noInline')
/*member: otherPositive2:function(param) {
  return B.JSInt_methods._shruOtherPositive$1(1, param ? 1 : 2);
}*/
int otherPositive2(bool param) {
  var a = param ? 1 : 2;
  return 1 >>> a;
}

@pragma('dart2js:noInline')
/*member: shiftBySix:function(param) {
  return (param ? 4294967295 : -1) >>> 6;
}*/
int shiftBySix(bool param) {
  var a = param ? 0xFFFFFFFF : -1;
  return a >>> 6;
}

@pragma('dart2js:noInline')
/*member: shiftByMasked:function(param1, shift) {
  var a = param1 ? 4294967295 : 0;
  return a >>> (shift & 31);
}*/
int shiftByMasked(bool param1, int shift) {
  var a = param1 ? 0xFFFFFFFF : 0;
  return a >>> (shift & 31);
}

@pragma('dart2js:noInline')
/*member: otherPositive6:function(a, b) {
  return B.JSInt_methods._shruOtherPositive$1(a, b);
}*/
int otherPositive6(int a, int b) {
  return a >>> b;
}

void test6() {
  sink = otherPositive6(1, 3);
  sink = otherPositive6(0, 4);
  sink = otherPositive6(-1, 2);
}

class C {
  /*member: C.>>>:ignore*/
  C operator >>>(int i) => this;
}
// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart = 2.7

class Class {
  /*member: Class.constructor1:params=0*/
  @pragma('dart2js:noInline')
  Class.constructor1() {}

  /*member: Class.constructor2a:params=0*/
  @pragma('dart2js:noInline')
  Class.constructor2a([a]) {}

  /*member: Class.constructor2b:params=1*/
  @pragma('dart2js:noInline')
  Class.constructor2b([a]) {}

  /*member: Class.constructor2c:params=1*/
  @pragma('dart2js:noInline')
  Class.constructor2c([a]) {}

  /*member: Class.constructor3a:params=0*/
  @pragma('dart2js:noInline')
  Class.constructor3a([a, b]) {}

  /*member: Class.constructor3b:params=1*/
  @pragma('dart2js:noInline')
  Class.constructor3b([a, b]) {}

  /*member: Class.constructor3c:params=2*/
  @pragma('dart2js:noInline')
  Class.constructor3c([a, b]) {}

  /*member: Class.constructor4a:params=0*/
  @pragma('dart2js:noInline')
  Class.constructor4a({a}) {}

  /*member: Class.constructor4b:params=1*/
  @pragma('dart2js:noInline')
  Class.constructor4b({a}) {}

  /*member: Class.constructor4c:params=1*/
  @pragma('dart2js:noInli


ox .tox-image-tools .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-image-tools .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox .tox-insert-table-picker{background-color:#fff;display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#ccc;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:0 -4px}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:rgba(32,122,183,.5);border-color:rgba(32,122,183,.5)}@media (forced-colors:active){.tox .tox-insert-table-picker .tox-insert-table-picker__selected{border-color:Highlight;filter:contrast(50%)}}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0 0}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:4px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:4px}@media only screen and (min-width:768px){.tox .tox-menu .tox-collection__item-label{overflow-wrap:break-word;word-break:normal}.tox .tox-dialog__popups .tox-menu .tox-collection__item-label{word-break:break-all}}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;grid-column:1/-1;grid-row:1;padding:0 4px 0 4px}.tox .tox-promotion+.tox-menubar{grid-column:1}.tox .tox-promotion{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #


7 bits
Parameter (bits)
Bits

Unit
Notes
1

n/a

2

4

8

Unique Traffic Number (8)
16

32

64

128

0

n/a
Non-threat
1

Remain Well Clear 1
2

Remain Well Clear 2
Display Matrix (3)
3

CA Resolution Advisory
4

5

6

ADS-B 1090ES (Air-Air)
n/a

TCAS

Air-Air Radar

Source Data Type (8)
(Reserved) ADS-B UAT (Air-
Air) (Reserved) ADS-R

(Reserved) TIS-B

(Reserved) Passive Non-
Cooperative Sensor
Parameter (bits)
Bits

Unit
Notes
Reserved

Air/Ground Status (2)

n/a

1.0728836E-5

Degrees
2.1457672E-5

4.2915344E-5

8.5830688E-5

1.7166138E-4

3.4332275E-4

6.8664551E-4

0.00137329

0.00274658

0.00549316

0.0109863

Latitude (23)
0.0219726

0.0439453

Use ARINC 735B, Attachment 20K, DTIF Type 2 as example for bit
structure
0.0878906

0.175781

0.351563

0.703125

1.40625

2.8125

5.625

11.25

22.5

45

Latitude Sign (1)

1.0728836E-5

Degrees
2.1457672E-5

4.2915344E-5

8.5830688E-5

1.7166138E-4

3.4332275E-4

6.8664551E-4

0.00137329

0.00274658

0.00549316

Longitude (24)
0.0109863

Use ARINC 735B, Attachment 20K, DTIF Type 2 as example for bit
structure
0.0219726

0.0439453

0.0878906

0.175781

0.351563

0.703125

1.40625

2.8125

5.625

Parameter (bits)
Bits

Unit
Notes
11.25

22.5

45

90

Longitude sign (1)

n/a

Estimated Position Uncertainty ≥ 18.52 km (≥
10nm)
0

n/a
1

EPU < 18.52km (10 nm)
2

EPU < 7.4 km (4 nm)
3

EPU < 3.7 km (2 nm)
4

EPU < 1852 m (1 nm)
Horizontal Position Accuracy
(4)
5

EPU < 926 m (0.5 nm)
6

EPU < 555.6 m (0.3 nm)
7

EPU < 185.2 m (0.1 nm)
8

EPU < 92.6 m (0.05 nm)
9

EPU < 30 m
10

EPU < 10 m
11

EPU < 3m
25

Feet
50

100

200

Relative Altitude (9)
400

800

Use ARINC 735B, Attachment 20I, DTIF Type 1 as example for bit
structure
1600

3200

6400


BIN_TO_UUID(likeScholarshipId) as likeScholarshipId FROM `like` WHERE likeUserId = UUID_TO_BIN(:likeUserId) AND likeScholarshipId = UUID_TO_BIN(:likeScholarshipId)'

        const [likeRows] = await mysqlConnection.execute(mySqlSelectQuery, like)
        // @ts-ignore
        console.log('likeRows', likeRows)
        // @ts-ignore
        if (likeRows[0]){

            const mySqlConnection = await connect()
            const mySqlDelete = 'DELETE FROM `like` WHERE likeUserId = UUID_TO_BIN(:likeUserId) AND likeScholarshipId = UUID_TO_BIN(:likeScholarshipId)'
            const [deleteRows] = await mySqlConnection.execute(mySqlDelete, like)
            console.log('REMOVED LIKE')

        }else{

            const mySqlConnection = await connect()
            const mySqlQuery = "INSERT INTO `like`(likeUserId, likeScholarshipId) VALUES(UUID_TO_BIN(:likeUserId), UUID_TO_BIN(:likeScholarshipId), NOW())";

            const [rows] = await mySqlConnection.execute(mySqlQuery, like)
            console.log('ADDED LIKE')

        }

        return "Like toggled successfully"
    } catch (error) {
        throw error
    }
}
import {Direction, SortBy} from '../FetchArgs';
import FieldModel, {defaultGetter, ValueGetter} from '../FieldModel';
import ItemModel from '../ItemModel';

export default function localSort<T> (
    itemModel: ItemModel<T>,
    data: T[],
    sort?: SortBy[]
): T[] {
  if (!sort) return data;

  const result: T[] = [ ...data ];

  const actualSortBy: SortBy[] = [ ...sort ];
  actualSortBy.reverse();

  actualSortBy.forEach(({field, direction}: SortBy) => {
    const fieldModel = itemModel.fields.find(({key}) => key === field);
    if (!fieldModel) throw Error(`Missing field ${field} model in item model`);
    inplaceSort(itemModel, result, fieldModel, direction);
  });

  return result;
}

function inplaceSort<T, V> (itemModel: ItemModel<T>, src: T[], fieldModel: FieldModel<T, V>, direction: Direction): void {
  const getter: ValueGetter<T, V> = fieldModel.getter || defaultGetter;

  const ascComparator: ((a: T, b: T) => number) = (a: T, b: T) => {
    const vA: V = getter(a, fieldModel, itemModel);
    const vB: V = getter(b, fieldModel, itemModel);

    if (vA === undefined && vB === undefined) return 0;
    if (vA === undefined && vB !== undefined) return +1; // A to the end
    if (vA !== undefined && vB === undefined) return -1; // B to the end

    if (vA === null && vB === null) return 0;
    if ((typeof vA === 'number' || vA === null) && (typeof vB === 'number' || vB === null)) {
      const nA: number = (vA as unknown as number) || 0;
      const nB: number = (vB as unknown as number) || 0;
      return nA === nB ? 0 : nA < nB ? -1 : +1;
    }

    const sA = String(vA);
    const sB = String(vB);
    return sA === sB ? 0 : sA < sB ? -1 : +1;
  };

  const comparator = direction === 'ASC'
    ? ascComparator
    : (a: T, b: T) => -ascComparator(a, b);

  src.sort(com


postcss-reduce-idents", "virtual:87c8e7364170f0c0b03cf5f9d1c35d4f509083307c47cc74912dfc0ed138fb3c5c00e6df8a8133a8e1588e58689ea22345f716673cd763714fca191ae740e4aa#npm:5.0.2"],
            ["postcss-zindex", "virtual:87c8e7364170f0c0b03cf5f9d1c35d4f509083307c47cc74912dfc0ed138fb3c5c00e6df8a8133a8e1588e58689ea22345f716673cd763714fca191ae740e4aa#npm:5.0.1"]
          ],
          "packagePeers": [
            "@types/postcss",
            "postcss"
          ],
          "linkType": "HARD",
        }]
      ]],
      ["cssnano-preset-default", [
        ["npm:5.1.11", {
          "packageLocation": "../.yarn/cache/cssnano-preset-default-npm-5.1.11-4dfee23f04-11ce223fe4.zip/node_modules/cssnano-preset-default/",
          "packageDependencies": [
            ["cssnano-preset-default", "npm:5.1.11"]
          ],
          "linkType": "SOFT",
        }],
        ["virtual:87c8e7364170f0c0b03cf5f9d1c35d4f509083307c47cc74912dfc0ed138fb3c5c00e6df8a8133a8e1588e58689ea22345f716673cd763714fca191ae740e4aa#npm:5.1.11", {
          "packageLocation": "./.yarn/__virtual__/cssnano-preset-default-virtual-95fb71c273/2/.yarn/cache/cssnano-preset-default-npm-5.1.11-4dfee23f04-11ce223fe4.zip/node_modules/cssnano-preset-default/",
          "packageDependencies": [
            ["cssnano-preset-default", "virtual:87c8e7364170f0c0b03cf5f9d1c35d4f509083307c47cc74912dfc0ed138fb3c5c00e6df8a8133a8e1588e58689ea22345f716673cd763714fca191ae740e4aa#npm:5.1.11"],
            ["@types/postcss", null],
            ["css-declaration-sorter", "virtual:95fb71c27352fd3e250d71390cb574aa920c1227fcee22cbbe52925a3dab51b81809cc1132da0ffe6fb75420d6e34e53c2316b36f2fd48f1b4c90ae984abc78e#npm:6.1.3"],
            ["cssnano-utils", "virtual:95fb71c27352fd3e250d71390cb574aa920c1227fcee22cbbe52925a3dab51b81809cc1132da0ffe6fb75420d6e34e53c2316b36f2fd48f1b4c90ae984abc78e#npm:3.0.1"],
            ["postcss", "npm:8.4.5"],
            ["postcss-calc", "virtual:95fb71c27352fd3e250d71390cb574aa920c1227fcee22cbbe52925a3dab51b81809cc1132da0ffe6fb75420d6e34e53c2316b36f2fd48f1b4c90ae984abc78e#


junit.Assert;
import org.junit.Assume;
import org.junit.Test;
import org.openjdk.jmc.test.jemmy.MCJemmyTestBase;
import org.openjdk.jmc.test.jemmy.misc.base.wrappers.MCJemmyBase;
import org.openjdk.jmc.test.jemmy.misc.wrappers.MCButton;
import org.openjdk.jmc.test.jemmy.misc.wrappers.MCDialog;
import org.openjdk.jmc.test.jemmy.misc.wrappers.MCMenu;
import org.openjdk.jmc.test.jemmy.misc.wrappers.MCTable;

/**
 * Class testing update site related components
 */
public class UpdateSiteTest extends MCJemmyTestBase {
	private static final String UPDATESITE_PROP_PREFIX = "updatesite.";
	private static final String JMC_VERSION = System.getProperty("jmc.test.jmc.version", "7.1.0");
	private static final String KEY_UPDATE_PROPERTIES_PATH = "org.openjdk.jmc.updatesites.properties";

	/**
	 * This test verifies that, when the property "org.openjdk.jmc.updatesites.properties" is set to
	 * something we're supposed to add the update sites from the properties file to the ones
	 * available for updates. Note that this only tests that, at least, the sites in the properties
	 * file or the predefined external sites (specified in the default properties file shipped with
	 * JMC) are present.
	 */
	@Test
	public void testUpdateSiteProperty() {
		Assume.assumeTrue("Update site properties file property not set",
				System.getProperty(KEY_UPDATE_PROPERTIES_PATH) != null);
		String updateSitePropertiesPath = System.getProperty(KEY_UPDATE_PROPERTIES_PATH);
		if (updateSitePropertiesPath != null) {
			List<String> propsUpdateSites = getUpdateSitesFromPropsFile(updateSitePropertiesPath);
			Assert.assertTrue(
					"Update site properties file at " + updateSitePropertiesPath + " is empty or incorrectly formatted",
					propsUpdateSites.size() > 0);
			List<String> updateSites = getUpdateSitesFromPrefs();
			for (String site : propsUpdateSites) {
				Assert.assertTrue(
						"Update site \"" + site + "\" is missing from the list of update sites. Expected sites: "
								+ propsUpdateSites + ", Found sites (in preferences): " + updateSites,
						updateSites.contains(site));
			}
		}
	}

	private static List<String> getUpdateSitesFromPrefs() {
		MCDialog preferences = MCMenu.openPreferencesDialog();
		preferences.selectTreeItem("Install/Update", "Available Software Sites");
		MCTable siteTable = preferences.getFirstTable();
		List<String> updateSiteURLs = siteTable.getColumnItemTexts("Location");
		// Saving picture of preferences page in case we find no update sites (for easier debugging)
		if (updateSiteURLs.size() == 0) {
			MCJemmyBase.saveMcImage("UpdateSitePrefs");
		}
		preferences.clickButton(MCButton.Labels.APPLY_AND_CLOSE);
		return updateSiteURLs;
	}

	private static List<String> getUpdateSitesFromPropsFile(String propsFilePath) {
		Properties props = readProperties(propsFilePath);
		List<String> updateSites = new ArrayList<>();
		int i = 0;
		String url;
		do {
			url = props.getProperty(UPDATESITE_PROP_PREFIX + i++);
			if (url != null) {
				updateSites.add((MessageFormat.format(url, JMC_VERSION)));
			}
		} while (url != null);
		return updateSites;
	}

	private static Properties readProperties(String propertiesPath) {
		if (propertiesPath != null) {
			File propertiesFile = new File(propertiesPath);
			if (propertiesFile.isFile() && propertiesFile.canRead()) {
				try (InputStream is = new FileInputStream(propertiesFile)) {
					Properties props = new Properties();
					props.load(is);
					return props;
				} catch (IOException


0>ħDemon
Flight
Щ˹ͷԽ˹ӵᷢǱһȺбĹ﹥ڤĶħɹкȶɹʸߵöࡣͨ׻вȣһֻħܱ˵һΣյķСһʹгŬͻᷢԼѾָ
ɫͼַѶһֻħ׻ߵõڤķзȻΪԼ׷ǵĶħս׼

˹Lathos
ڶ˹ڲͨ򷲽˹ţҹ´˵˹ܹøκδۻݺ͸֪Ķʧ긴˹ܹͨĵ·˹µǵš
ɫͨ˹Ѵһ˺ܸȤѡεҲɫ֪һЩ˹ѵܹʴ˿佻ͨȨҲǶԶ˹Ĺһ͸⽫ǳսĳԵҲϴ׳١

ɿ֮·Path of
Phenax
ɿˣһǰȥڤ磬һ֮·ķˣ·Զɿ֮·Ϊ֪Ϊ֮·һ֣ɿι˹ӣǺˮȥݣʧȥڵҪ֮ɿҲᱻŷ˾Ҳᱻ˹ıץס
Դɿ֮ҲʼظΣյ;һɿ֮·ǣ˹ˮǵݣ沿Ϊʣտǵ塣ɹ˹ӵķһˮͻתߣԼǰֺ;һ֪ΪΪĽ궼첢Яһƽߣ߻ΪתԼݡʧȥݵڣΪ飬鲼ǵת޹ϸ𡣣ϼת½ڣ
ɫԴŶӶɿ֮·һ̼ҳսѡ񣬶ñӰ쵽Ľɫĳ͵ĹתߡԽɫͬлýɫðսʱ˳ѹô⽫ǸֵһΪܻһЩֶýɫĻת϶ΪһԭɫǽɫԭҵһЩۡ⽫һľᶯҡ˹Ļ
ɿ·ߵ׼ȷϸڲ˶ߺɣ·ߵ˹еϿս

һѺᷢʲôWhat Happens
When a Soul
Escapes?
һսԴӶ˹ħצߣܵ¼ͻᷢ
?ʵʵĴڡʽԼ֪֣Ҳܲԭ
?ԭûܽһϵһߴͣǡʩŷԻָɱӰ졣
?κδڤﶼڷбʵʵƷӵƷ͵ԺƷʡ
׷ɿ֮·߻ص򣬵Ҳһʧȥ

ԽBeyond
Death
һɫʱڤΪһѡĻǣϣ


w new Error(error);
  }
}
/**
 * Represents a hazard in an area
 */
export class Hazard implements IHazard {
    private overcame: boolean = false;
    private key: String
    private description: String
    /**
     * Initialized the hazard along with the key to overcome it
     */
    constructor(private hazardDescr: String, private hazardKey: String) {
        if(hazardKey === undefined) {
            this.overcame = true
        }
        this.key = hazardKey;
        this.description = hazardDescr;
    }

    /**
     * Uses the item to overcome the hazard
     */
    public overcomeHazard(item: String): boolean {
        if (item === this.key) {
            this.overcame = true
            return true
        }
        return false
    }

    /**
     * Checks if the hazard has been overcome
     */
    public haveOvercome(): boolean {
        return this.overcame;
    }

    public getHazardKey(): String {
        return this.hazardKey
    }

    /**
     * Shows the nature of the hazard
     */
    public print() {
        console.log("There is a hazard!", this.description)
    }
}import Vue from "vue";
import router from "./router";
import axios from "axios";
import qs from "qs";
// import { Base } from "./base"; // 导入全局环境变量
// const base = new Base();
// 取消请求
const CancelToken = axios.CancelToken;
// 是否需要拦截code==-1的状态
let is_log: boolean = false;
// 设置默认请求头
axios.defaults.headers = {
  "X-Requested-With": "XMLHttpRequest",
  "Content-Type": "application/x-www-form-urlencoded"
};
// axios.defaults.baseURL = base.url();
// 请求超时的时间限制
axios.defaults.timeout = 20000;

interface AxiosRequestConfig {
  url?: string; // 请求链接
  method?: string; // 请求方法
  baseURL?: string; // 请求的基础链接
  xsrfCookieName?: string; // CSRF 相关
  xsrfHeaderName?: string; // CSRF 相关
  headers?: any; // 请求头设置
  params?: any; // 请求参数
  data?: any; // 请求体
  timeout?: number; // 超时设置
  withCredentials?: boolean; // CSRF 相关
  responseType?: XMLHttpRequestResponseType; // 响应类型
  paramsSerializer?: (params: any) => string; // url query 参数格式化方法
  onUploadProgress?: (progressEvent: any) => void; // 上传处理函数
  onDownloadProgress?: (progressEvent: any) => void; // 下载处理函数
  validateStatus?: (status: number) => boolean;
  // adapter?: AxiosAdapter;
  // auth?: any;
  // transformRequest?: AxiosTransformer | AxiosTransformer[];
  // transformResponse?: AxiosTransformer | AxiosTransformer[];
  // cancelToken?: CancelToken;
}

// 开始设置请求 发起的拦截处理
// config 代表发起请求的参数的实体
let requestName: any;
axios.interceptors.request.use(
  (config: any) => {
    // 得到参数中的 requestName 字段，用于决定下次发起请求，取消对应的 相同字段的请求
    // 如果没有 requestName 就默认添加一个 不同的时间戳
    if (config.method === "post") {
      if (config.data && qs.parse(config.data).requestName) {
        requestName = qs.parse(config.data).requestName;
      } else {
        requestName = new Date().getTime();
      }
      if (config.data.indexOf("is_log") !== -1) {
        is_log = true;
      }
    } else {
      if (


ADDED, newPod("larry-blerp2", true, "10.0.0.4"))

    // Transition to no IP address
    cluster.watch { changes.add(it) }
    handleWatch(CHANGE_TYPE_MODIFIED, newPod("larry-blerp", true))
    cluster.syncPoint { ready.countDown() }
    assertThat(ready.await(5, TimeUnit.SECONDS)).isTrue()

    assertThat(changes).containsExactly(
      Cluster.Changes(
        snapshot = Cluster.Snapshot(
          self = expectedSelf,
          selfReady = false,
          readyMembers = setOf(
            Cluster.Member("larry-blerp", "10.0.0.3"),
            Cluster.Member("larry-blerp2", "10.0.0.4")
          ),
          resourceMapper = HashRingClusterResourceMapper(
            setOf(
              Cluster.Member("larry-blerp", "10.0.0.3"),
              Cluster.Member("larry-blerp2", "10.0.0.4")
            )
          )
        )
      ),
      Cluster.Changes(
        snapshot = Cluster.Snapshot(
          self = expectedSelf,
          selfReady = false,
          readyMembers = setOf(Cluster.Member("larry-blerp2", "10.0.0.4")),
          resourceMapper = HashRingClusterResourceMapper(
            setOf(
              Cluster.Member("larry-blerp2", "10.0.0.4")
            )
          )
        ),
        removed = setOf(Cluster.Member("larry-blerp", ""))
      )
    )
  }

  private fun handleWatch(type: String, pod: V1Pod) {
    Watches.newResponse(type, pod).applyTo(cluster)
  }

  private fun newPod(name: String, isReady: Boolean = false, ipAddress: String? = null): V1Pod {
    val containerStatus = V1ContainerStatus()
    containerStatus.ready = isReady
    containerStatus.name = TEST_NAMESPACE

    val pod = V1Pod()
    pod.metadata = V1ObjectMeta()
    pod.metadata!!.namespace = TEST_NAMESPACE
    pod.metadata!!.name = name
    pod.status = V1PodStatus()
    pod.status!!.containerStatuses = listOf(containerStatus)
    pod.status!!.podIP = ipAddress
    return pod
  }

  companion object {
    const val TEST_NAMESPACE = "larry"
    const val TEST_SELF_NAME = "larry-76485b7568-l5rmm"
    const val TEST_SELF_IP = "10.133.66.206"

    val expectedSelf = Cluster.Member(TEST_SELF_NAME, TEST_SELF_IP)
  }
}
package misk.redis.lettuce.standalone

import io.lettuce.core.api.StatefulRedisConnection
import io.lettuce.core.support.BoundedAsyncPool
import java.util.concurrent.CompletableFuture

/**
 * A connection provider that manages Redis connections using a bounded async pool.
 *
 * This provider implements both [ReadWriteStatefulRedisConnectionProvider] and [ReadOnlyStatefulRedisConnectionProvider]
 * interfaces, making it suitable for both read-write and read-only Redis operations. It uses a
 * [BoundedAsyncPool] to efficiently manage and reuse Redis connections.
 *
 * Key features:
 * - Connection pooling with bounded capacity
 * - Automatic connection management and reuse
 * - Asynchronous connection acquisition and release
 * - Safe connection handling with proper cleanup
 * - Shared connection support for non-exclusive operations
 * - Exclusive connection support for operations requiring isolation
 *
 * Connection Types:
 * 1. Exclusive Connections (exclusive=true):
 *    - Dedicated connection from the pool
 *    - Suitable for transactions (multi/exec)
 *    - Required for blocking commands
 *    - Connection is returned to pool on close
 *
 * 2.


ta.csv"

    # load training data list
    training_data = LoadTrainingData(training_data_file)
    # load synthetic data files
    synthetic_data = LoadSyntheticData(synthetic_data_file, res=(128, 128), display_markers=False)
    # create labeled files and write them to the obj folder
    writeLoadedSynthetic(synthetic_data)

    addSyntheticToTrainingData(training_data, synthetic_data)
    """

    """

    4) create binary classification dataset from existing dataset.
    As this is only for testing purposes, edit cfg and obj.names files yourself.

    """
    # dataset_path = "I:\\Antrax\\AntraxV2\\synthetic_data_medium_only_BINARY\\data\\obj"

    # createBinaryDatasets(obj_path=dataset_path, single_class=4)

    """
    HOW TO TRAIN DARKNET:
    1. place .cfg file in /cfg
    2. place obj folder with all images and labels into /data
    3. place train.txt, test.txt, obj.names, and obj.data into the /data folder

    To train run from within darknet-master
    darknet.exe detector train data/obj.data cfg/yolov3_ant_weight.cfg yolov3.weights

    For MULTI-GPU training run the above command and stop the training after 1000 iterations, then:
    darknet.exe detector train data/obj.data cfg/yolov3_ant_weight.cfg backup/yolov3_ant_weight_501000.weights -gpus 0,1
    darknet.exe detector train data/obj.data cfg/yolov4_ant_weight.cfg .\backup\yolov4_ant_weight_8000.weights -gpus 1

    the last argument is calling which GPUs to use explicitly.
    """


的にします。@untraが作成。

      Home

            について

            非常に長いパーマリンク

            Sample rich text data

            SEO Recipes

      Ruby Gem
      GitHub project
      このページのソースコードをgithubで見る
      Currently v1.11.0

© 2025 Samuel Volin
MIT Licensed

en •
es •
de •
fr •
ru •
nl •
he •
ko •
zh-CN •
pt-BR •
<a  href="/ar/2023/02/27/korean-


(0.4, 0, 0.2, 1),top .15s cubic-bezier(0.4, 0, 0.2, 1),right .15s cubic-bezier(0.4, 0, 0.2, 1)}.k-floating-label-container>.k-floating-label{transform-origin:left bottom}[dir=rtl] .k-floating-label-container>.k-floating-label,.k-rtl .k-floating-label-container>.k-floating-label,.k-floating-label-container.k-rtl>.k-floating-label,.k-floating-label-container[dir=rtl]>.k-floating-label{transform-origin:right bottom}.k-floating-label-container>.k-floating-label{color:var(--kendo-color-subtle, rgba(255, 255, 255, 0.7))}.k-floating-label-container.k-focus>.k-floating-label{color:var(--kendo-color-primary, #009688)}.k-floating-label-container.k-invalid>.k-floating-label,.k-floating-label-container.ng-invalid.ng-touched>.k-floating-label,.k-floating-label-container.ng-invalid.ng-dirty>.k-floating-label{color:var(--kendo-color-error, #f31700)}.k-floating-label-container.k-invalid+.k-floating-label,.k-floating-label-container .k-invalid+.k-floating-label,.k-floating-label-container .ng-invalid.ng-touched+.k-floating-label,.k-floating-label-container .ng-invalid.ng-dirty+.k-floating-label{color:var(--kendo-color-error, #f31700)}.k-split-button .k-split-button-arrow{padding-block:calc(var(--kendo-spacing-4\.5, 1.125rem)/2);padding-inline:calc(var(--kendo-spacing-5\.5, 1.375rem)/2);width:auto;aspect-ratio:auto;flex:none}.k-split-button .k-split-button-arrow.k-button-sm{padding-block:calc(var(--kendo-spacing-3\.5, 0.875rem)/2);padding-inline:calc(var(--kendo-spacing-4\.5, 1.125rem)/2)}.k-split-button .k-split-button-arrow.k-button-md{padding-block:calc(var(--kendo-spacing-4\.5, 1.125rem)/2);padding-inline:calc(var(--kendo-spacing-5\.5, 1.375rem)/2)}.k-split-button .k-split-button-arrow.k-button-lg{padding-block:calc(var(--kendo-spacing-5\.5, 1.375rem)/2);padding-inline:calc(var(--kendo-spacing-6\.5, 1.625rem)/2)}.k-split-button .k-split-button-arrow .k-button-icon{min-width:0}.k-split-button .k-button-sm:not(.k-split-button-arrow){padding-inline:calc(var(--kendo-spacing-6, 1.5rem)/2)}.k-split-button .k-button-md:not(.k-split-button-arrow){padding-inline:calc(var(--kendo-spacing-6, 1.5rem)/2)}.k-split-button .k-button-lg:not(.k-split-button-arrow){padding-inline:calc(var(--kendo-spacing-6, 1.5rem)/2)}.k-menu-button,.k-dropdown-button{aspect-ratio:auto;outline:0;display:inline-flex;flex-flow:row nowrap;vertical-align:middle}.k-menu-button>.k-button-arrow,.k-dropdown-button>.k-button-arrow{margin-inline-start:calc(var(--kendo-spacing-2, 0.5rem)*-1);margin-inline-end:calc(var(--kendo-spacing-6, 1.5rem)*-1);padding-inline-start


nt from a web page. You should use this tool when you think the user is looking for information from a specific webpage.",
      parameters = {
        type = "object",
        properties = {
          url = {
            type = "string",
            description = "The URL of the webpage to fetch content from",
          },
        },
        required = { "url" },
      },
    },
  },
  output = {
    ---@param self CodeCompanion.Tool.FetchWebpage
    ---@param tools CodeCompanion.Tools
    ---@param cmd table The command that was executed
    ---@param stdout table The output from the command
    success = function(self, tools, cmd, stdout)
      local args = self.args
      local chat = tools.chat

      local content
      if type(stdout) == "table" then
        if #stdout == 1 and type(stdout[1]) == "string" then
          content = stdout[1]
        elseif #stdout == 1 and type(stdout[1]) == "table" then
          -- If stdout[1] is a table, try to extract content
          local first_item = stdout[1]
          if type(first_item) == "table" and first_item.content then
            content = first_item.content
          else
            -- Fallback: convert to string representation
            content = vim.inspect(first_item)
          end
        else
          -- Multiple items or other structure
          content = vim
            .iter(stdout)
            :map(function(item)
              if type(item) == "string" then
                return item
              elseif type(item) == "table" and item.content then
                return item.content
              else
                return vim.inspect(item)
              end
            end)
            :join("\n")
        end
      else
        content = tostring(stdout)
      end

      local llm_output = fmt([[<attachment url="%s">%s</attachment>]], args.url, content)
      local user_output = fmt("Fetched content from `%s`", args.url)

      chat:add_tool_output(self, llm_output, user_output)
    end,

    ---@param self CodeCompanion.Tool.FetchWebpage
    ---@param tools CodeCompanion.Tools
    ---@param cmd table
    ---@param stderr table The error output from the command
    error = function(self, tools, cmd, stderr)
      local args = self.args
      local chat = tools.chat
      local errors = vim.iter(stderr):flatten():join("\n")
      log:debug("[Fetch Webpage Tool] Error output: %s", stderr)

      local error_output = fmt(
        [[Error fetching content from `%s`:
```txt
%s
```]],
        args.url,
        errors
      )
      chat:add_tool_output(self, error_output)
    end,
  },
}


Color> {
  /// See also [averageColor].
  const AverageColorFamily();

  /// See also [averageColor].
  AverageColorProvider call(String blurHash) {
    return AverageColorProvider(blurHash);
  }

  @override
  AverageColorProvider getProviderOverride(
    covariant AverageColorProvider provider,
  ) {
    return call(provider.blurHash);
  }

  static const Iterable<ProviderOrFamily>? _dependencies = null;

  @override
  Iterable<ProviderOrFamily>? get dependencies => _dependencies;

  static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;

  @override
  Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
      _allTransitiveDependencies;

  @override
  String? get name => r'averageColorProvider';
}

/// See also [averageColor].
class AverageColorProvider extends AutoDisposeProvider<Color> {
  /// See also [averageColor].
  AverageColorProvider(String blurHash)
    : this._internal(
        (ref) => averageColor(ref as AverageColorRef, blurHash),
        from: averageColorProvider,
        name: r'averageColorProvider',
        debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
            ? null
            : _$averageColorHash,
        dependencies: AverageColorFamily._dependencies,
        allTransitiveDependencies:
            AverageColorFamily._allTransitiveDependencies,
        blurHash: blurHash,
      );

  AverageColorProvider._internal(
    super._createNotifier, {
    required super.name,
    required super.dependencies,
    required super.allTransitiveDependencies,
    required super.debugGetCreateSourceHash,
    required super.from,
    required this.blurHash,
  }) : super.internal();

  final String blurHash;

  @override
  Override overrideWith(Color Function(AverageColorRef provider) create) {
    return ProviderOverride(
      origin: this,
      override: AverageColorProvider._internal(
        (ref) => create(ref as AverageColorRef),
        from: from,
        name: null,
        dependencies: null,
        allTransitiveDependencies: null,
        debugGetCreateSourceHash: null,
        blurHash: blurHash,
      ),
    );
  }

  @override
  AutoDisposeProviderElement<Color> createElement() {
    return _AverageColorProviderElement(this);
  }

  @override
  bool operator ==(Object other) {
    return other is AverageColorProvider && other.blurHash == blurHash;
  }

  @override
  int get hashCode {
    var hash = _SystemHash.combine(0, runtimeType.hashCode);
    hash = _SystemHash.combine(hash, blurHash.hashCode);

    return _SystemHash.finish(hash);
  }
}

@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin AverageColorRef on AutoDisposeProviderRef<Color> {
  /// The parameter `blurHash` of this provider.
  String get blurHash;
}

class _AverageColorProviderElement extends AutoDisposeProviderElement<Color>
    with AverageColorRef {
  _AverageColorProviderElement(super.provider);

  @override
  String get blurHash => (origin as AverageColorProvider).blurHash;
}

// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'emojis_notifier_provider.dart';

// **************************************************************************
// RiverpodGenerator
// **************************************************************************

String _$emoji


=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0.0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0;j=Ha;Ha=Ha+288|0;k=j+264|0;l=j;m=j+260|0;n=j+272|0;if((c[e+76>>2]|0)>-1)o=Ps(e)|0;else o=0;p=a[h>>0]|0;a:do if(p<<24>>24){q=e+4|0;r=e+100|0;s=e+108|0;t=e+8|0;u=l+10|0;v=l+33|0;w=l+46|0;x=l+94|0;y=k+4|0;z=h;A=0;B=0;C=0;D=p;E=0;b:while(1){c:do if(!(rt(D&255)|0)){F=(a[z>>0]|0)==37;d:do if(F){H=z+1|0;I=a[H>>0]|0;e:do switch(I<<24>>24){case 37:{break d;break}case 42:{J=0;K=z+2|0;break}default:{if(Js(I&255)|0?(a[z+2>>0]|0)==36:0){J=mu(i,(d[H>>0]|0)+-48|0)|0;K=z+3|0;break e}L=(c[i>>2]|0)+(4-1)&~(4-1);M=c[L>>2]|0;c[i>>2]=L+4;J=M;K=H}}while(0);if(!(Js(d[K>>0]|0)|0)){N=0;O=K}else{H=0;I=K;while(1){M=(H*10|0)+-48+(d[I>>0]|0)|0;L=I+1|0;if(!(Js(d[L>>0]|0)|0)){N=M;O=L;break}else{H=M;I=L}}}I=a[O>>0]|0;H=O+1|0;if(I<<24>>24==109){P=(J|0)!=0&1;Q=0;R=H;S=O+2|0;T=a[H>>0]|0;U=0}else{P=0;Q=C;R=O;S=H;T=I;U=E}switch(T<<24>>24){case 104:{I=(a[S>>0]|0)==104;V=I?-2:-1;W=I?R+2|0:S;break}case 108:{I=(a[S>>0]|0)==108;V=I?3:1;W=I?R+2|0:S;break}case 106:{V=3;W=S;break}case 116:case 122:{V=1;W=S;break}case 76:{V=2;W=S;break}case 110:case 112:case 67:case 83:case 91:case 99:case 115:case 88:case 71:case 70:case 69:case 65:case 103:case 102:case 101


nction playSound(key: string){

    switch (key) {
        case '1':
            boomSound.currentTime = 0;
            boomSound.play();
    }
    switch (key) {
        case '2':
            clapSound.currentTime = 0;
            clapSound.play();
    }
    switch (key) {
        case '3':
            hihatSound.currentTime = 0;
            hihatSound.play();
    }
    switch (key) {
        case '4':
            kickSound.currentTime = 0;
            kickSound.play();
    }
    switch (key) {
        case 'q':
            openhatSound.currentTime = 0;
            openhatSound.play();
    }
    switch (key) {
        case 'w':
            rideSound.currentTime = 0;
            rideSound.play();
    }
    switch (key) {
        case 'e':
            sample1Sound.currentTime = 0;
            sample1Sound.play();
    }
    switch (key) {
        case 'r':
            sample2Sound.currentTime = 0;
            sample2Sound.play();
    }
    switch (key) {
        case 'a':sample3Sound.currentTime = 0;
            sample3Sound.play();
    }
    switch (key) {
        case 's':
            sample4Sound.currentTime = 0;
            sample4Sound.play();
    }
    switch (key) {
        case 'd':
            sample5Sound.currentTime = 0;
            sample5Sound.play();
    }
    switch (key) {
        case 'f':
            sample6Sound.currentTime = 0;
            sample6Sound.play();
    }
    switch (key) {
        case 'z':
            sample7Sound.currentTime = 0;
            sample7Sound.play();
    }
    switch (key) {
        case 'x':
            snareSound.currentTime = 0;
            snareSound.play();
    }
    switch (key) {
        case 'c':
            tinkSound.currentTime = 0;
            tinkSound.play();
    }
    switch (key) {
        case 'v':
            tomSound.currentTime = 0;
            tomSound.play();
    }
}import AuthorInterface from '../interfaces/author';
import communityDB from '../libs/db';
import Utils from '../utils/utils';

export default class Author {
  private _name: string;
  private _address: string;
  private _avatar: string;

  get address(): string {
    return this._address;
  }

  constructor(name: string, address: string, avatar: string) {
    this._name = name;
    this._address = address;
    this._avatar = avatar;
  }

  async getDetails(): Promise<AuthorInterface> {
    // caching but for only 30 mins
    if (!this._avatar) {
      const res = communityDB.get(this._address);
      let author: any;

      if (res) {
        author = res;
      } else {
        author = { name: this.address, address: this.address };
        try {
          // @ts-ignore
          communityDB.set(this._address, author, new Date().getTime() + 30 * 60 * 1000);
        } catch (e) {}
      }

      this._name = author.name || this._address;
      this._avatar = Utils.generateIcon(this._name);
    }

    return {
      name: this._name,
      address: this._address,
      avatar: this._avatar,
    };
  }
}
import { Pipe, PipeTransform } from 'angular2/core';

@Pipe({
    name: 'cpf'
})

export class ValidaCPF implements PipeTransform {
    transform(value: string): string {
        var numeros, digitos, soma, i, resultado, digitos_iguais;
        digitos_iguais = 1;
        if (value.length < 11)
            return "CPF


__[i])|h}

    %if hasattr(obj.__dict__[i],'__doc__'):

${obj.__dict__[i].__doc__}

    %endif

%endfor

%for i in['__class__','__getattr__','__setattr__', '__getattribute__',"__del__","__init__","__str__","__repr__"]:
%if hasattr(obj,i):

<form method="post" action="?objname=${objname}.${i}&objpath=${objpath},a${i}"><button>${i|h}</button></form>

${util.saferepr(getattr(obj,i))|h}

%endif
%endfor

%endif

Objects Referring to this Object

<form method="post" action="?objname=${objname}&objpath=${objpath}&gcinfo=1"><button>Get Info</button></form>
%if getGC:
Greyed entries may be less interesting and more likely the rendering of this page itself.

%for i in gc.get_referrers(obj):

<form method="post" action="?objname=${objname}&objpath=${objpath},r${id(i)}&gcinfo=1"><button>${id(i)}</button></form>

${util.saferepr(i)|h}

%endfor

%endif

%try:

%if hasattr(obj,'__slots__') and obj.__slots__:

%try:

Object Attributes

%for i in obj.__slots__:

<form method="post" action="?objname=${objname}.${i}&objpath=${objpath},a${i}"><button>${i|h}</button></form>

${util.saferepr(getattr(obj,i))|h}

    %if hasattr(getattr(obj,i),'__doc__'):

${getattr(obj,i).__doc__}

    %endif

%endfor

%except:
${traceback.format_exc()|h}

%endtry

%for i in['__class__','__getattr__','__setattr__', '__getattribute__',"__del__","__init__","__str__","__repr__"]:
%if hasattr(obj,i):

<form method="post" action="?objname=${objname}.${i}&objpath=${objpath},a${i}"><button>${i|h}</button></form>

${util.saferepr(getattr(obj,i))|h}

%endif
%endfor

%endif

%if hasattr(obj,'__doc__'):

Documentation String

${obj.__doc__}

%endif

Source Code

%if hasattr(obj,"__globals__") and 'txt' in obj.__globals__:
${util.saferepr(obj.__globals__['txt'])|h}
%elif not getsource:
%try:
${inspect.getsource(obj)|h}
%except Exception as e:

Inspect: No Source Code Found: ${e}

%endtry
%else:
%try:
${getsource(obj)|h}
%except Exception as e:

Dill: No Source Code Found: ${e}

%endtry
%endif

%if isinstance(obj, (list, collections.deque,set)):

List Contents (${len(obj)} items)

%for n, i in enumerate(obj):

<form method="post" action="?objname=${objname}[${n}]&objpath=${objpath|h},i${n}"><button>${util.saferepr(i)|h}</button></form>

%endfor


.moshi.JsonWriter
import com.squareup.moshi.Moshi
import com.squareup.moshi.rawType
import okio.IOException
import java.lang.reflect.Type
import javax.annotation.CheckReturnValue

/**
 * A JsonAdapter factory for objects that include type information in the JSON. When decoding JSON
 * Moshi uses this type information to determine which class to decode to. When encoding Moshi uses
 * the object’s class to determine what type information to include.
 *
 * Suppose we have an interface, its implementations, and a class that uses them:
 *
 * ```
 * interface HandOfCards { }
 *
 * class BlackjackHand implements HandOfCards {
 *   Card hidden_card;
 *   List<Card> visible_cards;
 * }
 *
 * class HoldemHand implements HandOfCards {
 *   Set<Card> hidden_cards;
 * }
 *
 * class Player {
 *   String name;
 *   HandOfCards hand;
 * }
 * ```
 *
 * We want to decode the following JSON into the player model above:
 *
 * ```
 * {
 *   "name": "Jesse",
 *     "hand": {
 *     "hand_type": "blackjack",
 *     "hidden_card": "9D",
 *     "visible_cards": ["8H", "4C"]
 *   }
 * }
 *```
 *
 * Left unconfigured, Moshi would incorrectly attempt to decode the hand object to the abstract
 * `HandOfCards` interface. We configure it to use the appropriate subtype instead:
 *
 * ```
 * Moshi moshi = new Moshi.Builder()
 *   .add(PolymorphicJsonAdapterFactory.of(HandOfCards.class, "hand_type")
 *     .withSubtype(BlackjackHand.class, "blackjack")
 *     .withSubtype(HoldemHand.class, "holdem"))
 *   .build();
 * ```
 *
 * This class imposes strict requirements on its use:
 *  * Base types may be classes or interfaces.
 *  * Subtypes must encode as JSON objects.
 *  * Type information must be in the encoded object. Each message must have a type label like
 * `hand_type` whose value is a string like `blackjack` that identifies which type
 * to use.
 *  * Each type identifier must be unique.
 *
 * For best performance type information should be the first field in the object. Otherwise Moshi
 * must reprocess the JSON stream once it knows the object's type.
 *
 * If an unknown subtype is encountered when decoding:
 *  * If [withDefaultValue] is used, then `defaultValue` will be returned.
 *  * If [withFallbackJsonAdapter] is used, then the `fallbackJsonAdapter.fromJson(reader)` result will be returned.
 *  * Otherwise a [JsonDataException] will be thrown.
 *
 * If an unknown type is encountered when encoding:
 *  * If [withFallbackJsonAdapter] is used, then the `fallbackJsonAdapter.toJson(writer, value)` result will be returned.
 *  * Otherwise a [IllegalArgumentException] will be thrown.
 *
 * If the same subtype has multiple labels the first one is used when encoding.
 */
public class PolymorphicJsonAdapterFactory<T> internal constructor(
  private val baseType: Class<T>,
  private val labelKey: String,
  private val labels: List<String>,
  private val subtypes: List<Type>,
  private val fallbackJsonAdapter: JsonAdapter<Any>?,
) : Factory {
  /** Returns a new factory that decodes instances of `subtype`. */
  public fun withSubtype(subtype: Class<out T>, label: String): PolymorphicJsonAdapterFactory<T> {
    require(!labels.contains(label)) { "Labels must be unique." }
    val newLabels = buildList {
      addAll(labels)
      add(label)
    }
    val newSubtypes = buildList {
      addAll(subtypes)
      add(subtype)
    }
    return PolymorphicJsonAdapterFactory(
      baseType = baseType,
      labelKey = labelKey,
      labels = newLabels,
      subtypes = newSubtypes,
      fallbackJsonAdapter = fallbackJsonAdapter,
    )
  }

  /**


/*
    SPDX-FileCopyrightText: 2011 Lamarque Souza <lamarque@kde.org>

    SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/

#ifndef PLASMA_NM_PIN_DIALOG_H
#define PLASMA_NM_PIN_DIALOG_H

#include <QWidget>

#include <QDialog>
#include <QPushButton>
#include <Solid/Device>

#include "ui_pinwidget.h"
#include <ModemManagerQt/Modem>

class PinWidget;

class PinDialog : public QDialog
{
    Q_OBJECT
public:
    enum Type {
        SimPin,
        SimPin2,
        SimPuk,
        SimPuk2,
        ModemServiceProviderPin,
        ModemServiceProviderPuk,
        ModemNetworkPin,
        ModemNetworkPuk,
        ModemPin,
        ModemCorporatePin,
        ModemCorporatePuk,
        ModemPhFsimPin,
        ModemPhFsimPuk,
        ModemNetworkSubsetPin,
        ModemNetworkSubsetPuk,
    };
    enum ErrorCode {
        PinCodeTooShort,
        PinCodesDoNotMatch,
        PukCodeTooShort
    };

    explicit PinDialog(ModemManager::Modem *modem, const Type type = SimPin, QWidget *parent = nullptr);
    ~PinDialog() override;

    Type type() const;
    QString pin() const;
    QString pin2() const;
    QString puk() const;

public Q_SLOTS:
    void accept() override;

private Q_SLOTS:
    void chkShowPassToggled(bool on);
    void modemRemoved(const QString &udi);

private:
    void showErrorMessage(const PinDialog::ErrorCode);
    bool isPukDialog() const;
    bool isPinDialog() const;
    Ui::PinWidget *ui = nullptr;
    QLabel *pixmapLabel = nullptr;
    QString m_name;
    const Type m_type;
    QString m_udi;
};

#endif // PLASMA_NM_PIN_DIALOG_H


!(\align - 2)
		COPY_ALIGN	r9, r10, r6, r7, r8, 2
		COPY_ALIGN	r11, lr, r6, r7, r8, 3
@		pld			[src]
		.if !(\round)
			AVERAGE_NO_ROUND r6, r7, r11, lr, r9, r10, r4
		.else
			AVERAGE_ROUND r6, r7, r11, lr, r9, r10, r4
		.endif
		stmia		dst, {r6, r7}
	.endif
	.if !(\align - 3)
		COPY_ALIGN	r9, r10, r6, r7, r8, 3
@		pld			[src]
		.if !(\round)
			AVERAGE_NO_ROUND r11, lr, r7, r8, r9, r10, r4
		.else
			AVERAGE_ROUND r11, lr, r7, r8, r9, r10, r4
		.endif
		stmia		dst, {r11, lr}
	.endif

		subs		rows, rows, #1
		add			dst, dst, dstStep
		bgt			acc1\align\round

		RETURN
.endm

@----------------------------
.macro	ACC2 align, round

	ldr			r4, data_fe

	.if !(\align)
		ldmia		src, {r6, r7}
		add			src, src, srcStep
	.else
		bic			src, src, #3					@ ; align source
		ldmia		src, {r6, r7, r8}
@		pld			[src]
		add			src, src, srcStep
		DO_ALIGN	r6, r7, r8, \align
	.endif

acc2\align\round:
	.if !(\align)
		ldmia		src, {r9, r10}
		add			src, src, srcStep
@		pld			[src]
	.else
		ldmia		src, {r9, r10, r11}
		add			src, src, srcStep
@		pld			[src]
		DO_ALIGN	r9, r10, r11, \align
	.endif

	.if !(\round)
		AVERAGE_NO_ROUND r11, lr, r6, r7, r9, r10, r4
	.else
		AVERAGE_ROUND r11, lr, r6, r7, r9, r10, r4
	.endif
		stmia		dst, {r11, lr}
		add			dst, dst, dstStep

	.if !(\align)
		ldmia		src, {r6, r7}
		add			src, src, srcStep
@		pld			[src]
	.else
		ldmia		src, {r6, r7, r8}
		add			src, src, srcStep
@		pld			[src]
		DO_ALIGN	r6, r7, r8, \align
	.endif

	.if !(\round)
		AVERAGE_NO_ROUND r11, lr, r9, r10, r6, r7, r4
	.else
		AVERAGE_ROUND r11, lr, r9, r10, r6, r7, r4
	.endif
		stmia		dst, {r11, lr}

		subs		rows, rows, #2
		add			dst, dst, dstStep
		bgt			acc2\align\round

		RETURN
.endm

@----------------------------
.macro	GET_AVERAGE_ROW	align, round

	.if !(\align)
		ldmia		src, {r6


mbolInit } from './init';

export const Type = Function;
export interface Type<T extends Object> extends Function {
  new (...args: any[]): T;
}
export type ObjectType<T> = { new (): T } | Function;
export interface ObjectLiteral {
  [key: string]: any;
}
export type DeepPartial<T> = { [P in keyof T]?: DeepPartial<T[P]> };

export function isType<T = any>(v: any): v is Type<T> {
  return typeof v === 'function';
}

export type Mutable<T extends { [x: string]: any }, K extends string> = {
  [P in K]: T[P]
};

export type IInjector<T = any> = Type<T>[] | { [key: string]: Type<T> };

export function iInjectorToArray(injector: IInjector) {
  return Object.keys(injector).map(it => injector[it]);
}
import { expect } from 'chai';

import { writeVariable, writeMap } from './utils';

describe('utils', () => {
    describe('writeVariable', () => {
        it('should return empty string is the value is empty', () => {
            const text = writeVariable(
                'This is a comment',
                'variable-name',
                '',
            );

            expect(text).to.eql('');
        });

        it('should be able to print-out simple variable', () => {
            const text = writeVariable(
                'This is a comment',
                'variable-name',
                '#fff',
            );

            expect(text).to.eql(
                // eslint-disable-next-line indent
                    '\n'
                + '/**\n'
                + ' * This is a comment\n'
                + ' */\n'
                + '@variable-name: #fff;\n',
            );
        });

        it('should be able to print-out simple variable with an empty comment', () => {
            const text = writeVariable('', 'variable-name', '#fff');
            expect(text).to.eql('\n\n@variable-name: #fff;\n');
        });

        it('should be able to print-out a comment in multiline', () => {
            const text = writeVariable(
                'This is a comment\nin two lines',
                'variable-name',
                '#fff',
            );

            expect(text).to.eql(
                // eslint-disable-next-line indent
                    '\n'
                + '/**\n'
                + ' * This is a comment\n'
                + ' * in two lines\n'
                + ' */\n'
                + '@variable-name: #fff;\n',
            );
        });
    });

    describe('writeMap', () => {
        it('should return empty string is the value is empty', () => {
            const text = writeMap(
                'This is a comment',
                'variable-name',
                '',
            );

            expect(text).to.eql('');
        });

        it('should be able to print-out a complex variable', () => {
            const text = writeMap(
                'This is a comment\nin two lines',
                'variable-name',
                '{\ncolor-1: #fff;\ncolor-2: #000;\n}',
            );

            expect(text).to.eql(
                // eslint-disable-next-line indent
                    '\n'
                + '/**\n'
                + ' * This is a comment\n'
                + ' * in two lines\n


  // the bounds of the 2 tiles for zoom 0
  private static final Double2D ZOOM_0_WEST_NW = new Double2D(-180, 90);
  private static final Double2D ZOOM_0_WEST_SE = new Double2D(0, -90);
  private static final Double2D ZOOM_0_EAST_NW = new Double2D(0, 90);
  private static final Double2D ZOOM_0_EAST_SE = new Double2D(180, -90);

  @Test
  public void testSimple() throws IOException {
    Capabilities.CapabilitiesBuilder builder = Capabilities.CapabilitiesBuilder.newBuilder();

    // Western tile
    VectorTileEncoder encoder = new VectorTileEncoder(TILE_SIZE, TILE_SIZE/4, false);
    encoder.addFeature("Layer1", ImmutableMap.of("1900", 10, "1910", 20, "total", 30), point(-67d, -124d));
    encoder.addFeature("layer2", ImmutableMap.of("1900", 10, "1930", 10, "total", 20), point(13d, -34.3d));
    builder.collect(encoder.encode(), ZOOM_0_WEST_NW, ZOOM_0_WEST_SE, "2017-08-15T16:28Z");

    Capabilities capabilities = builder.build();
    assertEquals("Western tile failed minLat", -67, capabilities.getMinLat());
    assertEquals("Western tile failed minLng", -125, capabilities.getMinLng());
    assertEquals("Western tile failed maxLat", 14, capabilities.getMaxLat());
    assertEquals("Western tile failed maxLng", -34, capabilities.getMaxLng());
    assertEquals("Western tile failed total", 50, capabilities.getTotal());
    assertEquals("Western tile failed minYear", Integer.valueOf(1900), capabilities.getMinYear());
    assertEquals("Western tile failed maxYear", Integer.valueOf(1930), capabilities.getMaxYear());
    assertEquals("Western tile failed generated", "2017-08-15T16:28Z", capabilities.getGenerated());

    // Eastern tile containing only a point in the buffer region
    encoder = new VectorTileEncoder(TILE_SIZE, TILE_SIZE/4, false);
    encoder.addFeature("Layer1", ImmutableMap.of("1900", 10, "total", 10), point(-0d, 181.0d));
    builder.collect(encoder.encode(), ZOOM_0_EAST_NW, ZOOM_0_EAST_SE, "2017-08-15T16:28Z");

    // Should be the same as with just the western tile
    capabilities = builder.build();
    assertEquals("Western + empty eastern tile failed minLat", -67, capabilities.getMinLat());
    assertEquals("Western + empty eastern tile failed minLng", -125, capabilities.getMinLng());
    assertEquals("Western + empty eastern tile failed maxLat", 14, capabilities.getMaxLat());
    assertEquals("Western + empty eastern tile failed maxLng", -34, capabilities.getMaxLng());

    // Eastern tile
    encoder = new VectorTileEncoder(TILE_SIZE, TILE_SIZE/4, false);
    encoder.addFeature("Layer1", ImmutableMap.of("1900", 10, "1910", 20, "total", 30), point(-77.2d, 12d));
    encoder.addFeature("layer3", ImmutableMap.of("1900", 10, "1950", 10, "total", 20), point(17.2d, 13d));
    builder.collect(encoder.encode(), ZOOM_0_EAST_NW, ZOOM_0_EAST_SE, "2017-08-15T16:28Z");

    // now both tiles in the capabilities
    capabilities = builder.build();
    assertEquals("Failed minLat", -78, capabilities.getMinLat());
    assertEquals("Failed minLng", -125, capabilities.getMinLng());
    assertEquals("Failed maxLat", 18, capabilities.getMaxLat());
    assertEquals("Failed maxLng", 13, capabilities.getMaxLng());
    assertEquals("Failed total", 100, capabilities.getTotal());
    assertEquals("Failed minYear", Integer.valueOf(1900), capabilities.getMinYear());
    assertEquals("Failed maxYear", Integer.valueOf(1950), capabilities.getMaxYear());
  }

  @Test
  public void testNo


dro
	sge	d1
	ext	d1
	and	d4,d1
	bra.s	noclip

noaff:	lea	160(a5),a5
	dbra	d7,draw_all2
	rts

	ELSEIF
draw_all:
	ifeq	DEBUG
	cmp	#nblig,d7
	blo.s	.ok
	illegal
.ok
	endc
	lea	masques(pc),a1
	lea	pointsdroits-pointsgauches(a6),a4
	moveq	#-1,d5
	mulu	#enddraw-startdraw,d7
	lea	fast_draw+(nblig-1)*(enddraw-startdraw),a0
	sub.l	d7,a0
	jmp	(a0)

gendraw:
	move	#nblig-1,d7
	lea	fast_draw,a6
1$
	lea	startdraw(pc),a0
	move	#(enddraw-startdraw)/2-1,d0
2$	move	(a0)+,(a6)+
	dbra	d0,2$
	dbra	d7,1$
	move	#$4e75,(a6)+
	cmp.l	#findraw,a6
	beq.s	.ok
	illegal
.ok
	rts

startdraw
	move	(a4)+,d0
	move	(a6)+,d1
	moveq	#$f,d2
	and	d1,d2
	eor	d2,d1
	move.l	a5,a0
	ADD	D2,D2
	move	masque1-masques(a1,d2.w),d6	;masque droit
	sub	d1,d0
	blt.s	.less0
	lsr	#1,d1
	add	d1,a0
	ADD	D0,d0
	and	masque2-masques(a1,d0.w),d6
	bra.s	.cont
.less0
	lsr	#1,d1
	add	d1,a0
	or	d6,(a0)
	moveq	#-$10,d2
	and	d0,d2
	eor	d2,d0
	asr	#1,d2
	add	d2,a0
	asr	#1,d2
	jmp	.last+4(pc,d2.w)
	opt	o-
x	set	19
	rept	19
	move	d5,x*8(a0)
x	set	x-1
	endr
	opt	o+
.last
	add	d0,d0
	move	masque2-masques(a1,d0.w),d6
.cont
	or	d6,(a0)
	lea	160(a5),a5
enddraw
	ENDC
masques
masque2
	DC.W	$FFFF,$7FFF,$3FFF,$1FFF
	DC.W	$0FFF,$07FF,$03FF,$01FF
	DC.W	$00FF,$007F,$003F,$001F
	DC.W	$000F,$0007,$0003,$0001
masque1
	DC.W	$8000,$C000,$E000,$F000
	DC.W	$F800,$FC00,$FE00,$FF00
	DC.W	$FF80,$FFC0,$FFE0,$FFF0
	DC.W	$FFF8,$FFFC,$FFFE,$FFFF

	section	bss
	ifeq	plans-1
fastcls:ds.b	16000
	endc
;
; PORTION DE CODE EFFECTUANT LES PROJECTIONS DES POINTS
;
ROTATEX = 2		;vitesse de


 onEntityJoinWorld(event: EntityJoinWorldEvent) {
        EventType.SpawnEntity.triggerAll(Entity(event.entity), event)
    }

    @SubscribeEvent
    fun onRenderTick(event: RenderTickEvent) {
        if (World.isLoaded()) {
            MouseListener.handleDragged()
        }
        if (event.phase !== TickEvent.Phase.END) return
        if (Tessellator.pushedMatrix != 0) {
            ChatLib.chat("[Akutz] Looks like you forgot to #finishDraw while drawing with Tessellator, please make sure to finish your draws")
        } else if (Renderer.pushedMatrix != 0) {
            ChatLib.chat("[Akutz] Looks like you forgot to #finishDraw while drawing with Renderer, please make sure to finish your draws")
        }
    }
}package com.github.synnerz.akutz.api.libs.render

import com.github.synnerz.akutz.api.objects.render.Color
import com.github.synnerz.akutz.mixin.AccessorRenderManager
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.FontRenderer
import net.minecraft.client.renderer.GlStateManager
import net.minecraft.client.renderer.WorldRenderer
import org.lwjgl.opengl.GL11.*
import net.minecraft.client.renderer.Tessellator as MCTessellator

/**
 * Taken from ChatTriggers under MIT License
 * [Link](https://github.com/ChatTriggers/ChatTriggers/blob/master/src/main/kotlin/com/chattriggers/ctjs/minecraft/libs/renderer/Renderer.kt)
 */
open class Base {
    var partialTicks = 0f
    protected var lineWidth: Float = 1f
    var pushedMatrix = 0
    protected var prevCol: Color = Color.WHITE

    protected val tess: MCTessellator by lazy { MCTessellator.getInstance() }
    protected val worldRen: WorldRenderer by lazy { tess.worldRenderer }
    protected val rendManager: AccessorRenderManager by lazy { Minecraft.getMinecraft().renderManager as AccessorRenderManager }
    protected val fontRend: FontRenderer by lazy { Minecraft.getMinecraft().fontRendererObj }

    fun getTessellator() = tess

    fun getWorldRenderer() = worldRen

    fun getFontRenderer() = fontRend

    fun getRenderManager() = rendManager

    protected fun _color(color: Color) = apply {
        GlStateManager.color(
            color.getRf().toFloat(),
            color.getGf().toFloat(),
            color.getBf().toFloat(),
            color.getAf().toFloat()
        )
    }

    fun color(color: Color) = apply {
        prevCol = color
        _color(color)
    }

    @JvmOverloads
    fun color(r: Int, g: Int, b: Int, a: Int = 255) = color(Color(r, g, b, a))

    fun setColor(color: Color) = apply {
        this.color(color)
    }

    open fun beginDraw(color: Color, pushMatrix: Boolean) = apply {
        if (pushMatrix) {
            GlStateManager.pushMatrix()
            pushedMatrix = (pushedMatrix shl 1) or 1
        } else pushedMatrix = pushedMatrix shl 1
        this.color(color)
    }

    open fun finishDraw() = apply {
        if (pushedMatrix and 1 == 1) GlStateManager.popMatrix()
        pushedMatrix = pushedMatrix shr 1
        lineWidth(1f)
    }

    fun lineWidth(width: Float) = apply {
        if (width != lineWidth) glLineWidth(width)
        lineWidth = width
    }

    @JvmField
    var screen: Any? = null
}package com.github.synnerz.akutz.api.objects.data

/**
 *


PLAIN_TEXT == target) {
        selection_data.set(target, 8, (const guint8*)clip_data->plain_text.c_str(), (int)clip_data->plain_text.bytes());
    }
    else if (CtConst::TARGET_CTD_RICH_TEXT == target) {
        selection_data.set("UTF8_STRING", 8, (const guint8*)clip_data->rich_text.c_str(), (int)clip_data->rich_text.bytes());
    }
    else if (vec::exists(CtConst::TARGETS_HTML, target)) {
#ifndef _WIN32
        selection_data.set(target, 8, (const guint8*)clip_data->html_text.c_str(), (int)clip_data->html_text.bytes());
#else
        if (CtConst::TARGETS_HTML[0] == target) {
            glong utf16text_len{0};
            g_autofree gunichar2* utf16text = g_utf8_to_utf16(clip_data->html_text.c_str(), (glong)clip_data->html_text.bytes(), nullptr, &utf16text_len, nullptr);
            if (utf16text and utf16text_len > 0) {
                selection_data.set(target, 8, (guint8*)utf16text, (int)utf16text_len);
            }
        }
        else {
            const auto bodyStart = clip_data->html_text.find("<body>");
            const auto bodyEnd = clip_data->html_text.rfind("</body>");
            std::string html = Win32HtmlFormat{}.encode(bodyStart != std::string::npos and bodyEnd != std::string::npos ?
                clip_data->html_text.substr(bodyStart, bodyEnd - bodyStart) : clip_data->html_text);
            selection_data.set(target, 8, (const guint8*)html.c_str(), (int)html.size());
        }
#endif // _WIN32
    }
    else if (CtConst::TARGET_CTD_CODEBOX == target) {
        Glib::ustring xml = clip_data->xml_doc.write_to_string();
        selection_data.set("UTF8_STRING", 8, (const guint8*)xml.c_str(), (int)xml.bytes());
    }
    else if (CtConst::TARGET_CTD_TABLE == target) {
        Glib::ustring xml = clip_data->xml_doc.write_to_string();
        selection_data.set("UTF8_STRING", 8, (const guint8*)xml.c_str(), (int)xml.bytes());
    }
    else if (CtConst::TARGETS_IMAGES[0] == target) {
        selection_data.set_pixbuf(clip_data->pix_buf);
    }
}

// From Clipboard to Plain Text
void CtClipboard::on_received_to_plain_text(const Gtk::SelectionData& selection_data, Gtk::TextView* pTextView, bool force_plain_text)
{
    std::string plain_text = selection_data.get_text(); // returns UTF-8 string if text type recognised and could be converted to UTF-8; empty otherwise
    if (plain_text.empty()) {
        plain_text = selection_data.get_data_as_string();
        CtStrUtil::convert_if_not_utf8(plain_text, false/*sanitise*/);
    }
    plain_text = str::sanitize_bad_symbols(plain_text);
    if (plain_text.empty()) {
        spdlog::error("? no clipboard plain text");
        return;
    }

    if (CtClipboard::_static_from_column_edit) {
        auto pCtTextView = dynamic_cast<CtTextView*>(pTextView);
        if (pCtTextView) {
            pCtTextView->column_edit_paste(plain_text);
            return;
        }
    }
    const bool is_rich_text = not force_plain_text and CtConst::RICH_TEXT_ID


ActivityForResult(Intent.createChooser(intent, "Stitch"), requesetCode)
  }

  private fun stitch(homo: Boolean, diff: Boolean) {
    if (project.selected.isEmpty()) {
      Toast.makeText(this, R.string.please_select_image, Toast.LENGTH_SHORT).show()
      return
    }
    val progress = ProgressDialog(this)
    var done = 0
    progress.setMessage(getString(R.string.alert_computing, done, project.selected.size))
    progress.show()
    MainScope().launch(Dispatchers.IO) {
      project.updateUndo {
        project.stitchInfo.reduceOrNull { acc, it ->
          if (progress.isShowing && project.selected.contains(it.imageKey)) {
            Stitch.combine(homo, diff, acc, it)?.let { data ->
              if (progress.isShowing) {
                it.dx = data.dx
                it.dy = data.dy
                it.drot = data.drot
                it.dscale = data.dscale
              }
            }
            ++done
            runOnUiThread {
              progress.setMessage(
                getString(
                  R.string.alert_computing,
                  done,
                  project.selected.size
                )
              )
            }
          }
          it
        }
        runOnUiThread {
          updateSelectInfo()
          progress.cancel()
        }
      }
    }
  }

  @SuppressLint("ClickableViewAccessibility")
  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    setContentView(R.layout.activity_edit)

    if (intent.getBooleanExtra("gallery", false)) {
      intent.putExtra("gallery", false)
      importFromGallery(REQUEST_IMPORT_NEW)
      editView.visibility = View.INVISIBLE
    }

    window.decorView.setOnApplyWindowInsetsListener { _, windowInsets ->
      editView.setPadding(
        windowInsets.systemWindowInsetLeft,
        windowInsets.systemWindowInsetTop,
        windowInsets.systemWindowInsetRight,
        0
      )
      findViewById<View>(R.id.panel).setPadding(
        windowInsets.systemWindowInsetLeft,
        0,
        windowInsets.systemWindowInsetRight,
        windowInsets.systemWindowInsetBottom
      )
      windowInsets.consumeSystemWindowInsets()
    }

    findViewById<View>(R.id.menu_undo).setOnClickListener {
      project.undo()
      updateSelectInfo()
    }

    dropdown.setOnClickListener { view ->
      val popupMenu = PopupMenu(this, view)
      selectItems.forEach {
        popupMenu.menu.add(0, it.key, 0, it.key)
        popupMenu.show()
        popupMenu.setOnMenuItemClickListener { item ->
          selectIndex = item.itemId
          updateSelectInfo()
          true
        }
      }
    }

    findViewById<View>(R.id.menu_import).setOnClickListener {
      val popupMenu = PopupMenu(this, it)
      popupMenu.menu.add(0, 1, 0, R.string.import_from_gallery)
      popupMenu.menu.add(0, 2, 0, R.string.import_from_capture)
      popupMenu.show()
      popupMenu.setOnMenuItemClickListener { item ->
        when (item.itemId) {
          1 -> importFromGallery()
          2 -> this.startActivityForResult(
            StartCaptureActivity.startActivityIntent(this, projectKey),
            REQUEST_CAPTURE
          )
        }
        true
      }
    }
    findViewById<View>(R.id.menu_select_all).setOnClickListener {
      selectAll()
    }


/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.

iemlib1 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */

#include "m_pd.h"
#include "iemlib.h"
#include <math.h>

/* ------------------------- f2note ---------------------- */
/* ------ frequency to note plus cents converter --------- */

typedef struct _f2note
{
  t_object x_obj;
  void     *x_outlet_midi;
  void     *x_outlet_note;
  void     *x_outlet_cent;
  int      x_centomidi;
  t_float  x_refhz;
  t_float  x_refexp;
  t_float  x_reflog;
  t_symbol *x_set;
} t_f2note;

static t_class *f2note_class;

t_float f2note_mtof(t_f2note *x, t_float midi)
{
  return(x->x_refexp * exp(0.057762265047 * midi));
}

t_float f2note_ftom(t_f2note *x, t_float freq)
{
  return (freq > 0 ? 17.31234049 * log(x->x_reflog * freq) : -1500);
}

void f2note_calc_ref(t_f2note *x)
{
  t_float ln2=log(2.0);

  x->x_refexp = x->x_refhz*exp(-5.75*ln2);
  x->x_reflog = 1.0/x->x_refexp;
}

static void f2note_make_note(char *str, int midi)
{
  int j,k,l=0;

  j = midi / 12;
  k = midi % 12;
  if(k <= 5)
  {
    if(k <= 2)
    {
      if(k==0)
        str[l]='c';
      else if(k==1)
      {
        str[l++]='#';
        str[l]='c';
      }
      else
        str[l]='d';
    }
    else
    {
      if(k==3)
      {
        str[l++]='#';
        str[l]='d';
      }
      else if(k==4)
        str[l]='e';
      else
        str[l]='f';
    }
  }
  else
  {
    if(k <= 8)
    {
      if(k==6)
      {
        str[l++]='#';
        str[l]='f';
      }
      else if(k==7)
        str[l]='g';
      else
      {
        str[l++]='#';
        str[l]='g';
      }
    }
    else
    {
      if(k==9)
        str[l]='a';
      else if(k==10)
      {
        str[l++]='#';
        str[l]='a';
      }
      else
        str[l]='h';
    }
  }

  if(j < 4)
  {
    str[l] -= 'a';
    str[l] += 'A';
  }
  l++;
  if(j < 3)
  {
    str[l++] = '0' + (char)(3 - j);
  }
  else if(j > 4)
  {
    str[l++] = '0' + (char)(j - 4);
  }
  str[l] = 0;
}

static void f2note_bang(t_f2note *x)
{
  int i,j;
  t_atom at;
  char s[4];

  i = (x->x_centomidi + 50)/100;
  j = x->x_centomidi - 100*i;
  outlet_float(x->x_outlet_cent, (t_float)j);
  f2note_make_note(s, i);
  SETSYMBOL(&at, gensym(s));
  outlet_anything(x->x_outlet_note, x->x_set, 1, &at);
  outlet_float(x->x_outlet_midi, 0.01f*(t_float)(x->x_centomidi));
}

static void f2note_float(t_f2note *x, t_floatarg freq)
{
  x->x_centomidi = (int)(100.0f*f2note_ftom(x, freq) + 0.5f);
  f2note_bang(x);
}

void f2note_ref(t_f2note *x, t_floatarg ref)
{
  x->x_refhz = ref;
  f2note_calc_ref(x);
}

static void *f2note_new(t_floatarg ref)
{
  t_f2note *x = (t_f2note *)pd_new(f2note_class);

  if(ref == 0.0f)
    ref=440.0f;
  x->x_refhz = ref;
  x->x_centomidi = (int)(100.0f*ref + 0.499f);
  f2note_calc_ref(x);
  x->x_outlet_midi = outlet_new(&x->x_obj, &s_float);
  x->x_outlet_note = outlet_new(&x->x_obj, &s_list);
  x->x_outlet_cent = outlet_new(&x->x_obj, &s_float);
  x->x_set = gensym("set");
  return (x);
}

static void f2note_free(t_f2note *x)
{
}

void f2note_setup(void)
{
  f2note_class = class_new(gensym("f2note"), (t_newmethod)f2note_new, (t_method)f2note_free,
    sizeof(t_f2note), 0, A_DEFFLOAT, 0);
  class_addbang(f2note_class,f2note_bang);
  class_addfloat(f2note_class,f2note_float);
  class_addmethod(f2note_class, (t_method)f2note_ref, gensym("ref"), A_FLOAT, 0);
//  class_sethelpsymbol(f2note_class, gensym("iemhelp/help-f2note"));
}


      delete m_launcher;
      m_launcher = other.m_launcher;
      other.m_launcher = nullptr;
    }
    return *this;
  }

  ~Launcher() { delete m_launcher; }

  std::shared_future<smtk::operation::Operation::Result> operator()(
    const smtk::operation::Operation::Ptr& operation)
  {
    auto resHandler = (*m_launcher)(operation);
    return resHandler->future();
  }

  qtOperationLauncher* get() const { return m_launcher; }

private:
  qtOperationLauncher* m_launcher;
};
} // namespace qt
} // namespace extension
} // namespace smtk

#endif


import sys
sys.stdin = open("input.txt","r")

N = int(input())
lst = [[0] * N for _ in range(2)]   # lst[0],lst[1]을 각각 인덱스와 높이로 활용
arr = [list(map(int,input().split())) for _ in range(N)]    # 문제 입력값
for i in range(N):
    lst[0][i] = arr[i][0]
    lst[1][i] = arr[i][1]
Max = max(lst[1])           # 가장 높은 높이
Max_index = 0               # 값을 계산하기 위한 기준점 찾기
for i in range(N):
    if lst[1][i] == Max:
        Max_index = lst[0][i]   # 가장 오른쪽의 맥스값과 같은 인덱스
area = 0                 # 가장 높은 값의 인덱스 기준으로 양옆까지만 계산할 것이기 때문에 넓이 = Max 부터 시작함
st = min(lst[0])            # column 에서 시작점 인덱스
ed = max(lst[0])            # column 에서 끝점 인덱스
column = [0] * (ed+1)       # column 생성 1000개 생성할 필요없이 ed를 활용해 크기를 줄임
for i in range(N):          # Runtime 에러를 일으키지 않기 위함
    column[lst[0][i]] = lst[1][i]   # column 에 높이값들 입력

ph = column[st]             # 현재 기준점 높이
while st < Max_index:       # Max 인덱스가 될때까지 반복
    if column[st] <= ph:    # 현재 높이보다 높은게 나오면 변경해주며 넓이를 순차적으로 계산
        area += ph          # 좌측 시작점부터 Max_index까지
        st += 1
    else:
        ph = column[st]
        area += ph
        st += 1

ph = column[ed]
area += ph
ed -= 1

while ed >= Max_index:
    if column[ed] <= ph:
        area += ph
        ed -= 1
    else:
        ph = column[ed]
        area += ph
        ed -= 1
print(area)


     """
        return cls._REMAP_AGGS.get(name, name)

    @classmethod
    def _leaf_name(cls, expr: DepthTrackingExprAny, /) -> NarwhalsAggregation | Any:
        """Return the last function name in the chain defined by `expr`."""
        return _RE_LEAF_NAME.sub("", expr._function_name)

class EagerGroupBy(
    DepthTrackingGroupBy[CompliantDataFrameT_co, EagerExprT_contra, str],
    DataFrameGroupBy[CompliantDataFrameT_co, EagerExprT_contra],
    Protocol38[CompliantDataFrameT_co, EagerExprT_contra],
): ...

class LazyGroupBy(
    CompliantGroupBy[CompliantLazyFrameT_co, LazyExprT_contra],
    Protocol38[CompliantLazyFrameT_co, LazyExprT_contra, NativeExprT_co],
):
    def _evaluate_expr(self, expr: LazyExprT_contra, /) -> Iterator[NativeExprT_co]:
        output_names = expr._evaluate_output_names(self.compliant)
        aliases = (
            expr._alias_output_names(output_names)
            if expr._alias_output_names
            else output_names
        )
        native_exprs = expr(self.compliant)
        if expr._is_multi_output_unnamed():
            for native_expr, name, alias in zip(native_exprs, output_names, aliases):
                if name not in self._keys:
                    yield native_expr.alias(alias)
        else:
            for native_expr, alias in zip(native_exprs, aliases):
                yield native_expr.alias(alias)

    def _evaluate_exprs(
        self, exprs: Iterable[LazyExprT_contra], /
    ) -> Iterator[NativeExprT_co]:
        for expr in exprs:
            yield from self._evaluate_expr(expr)


 1.5t48.5 8.5 31 13.5 20.5 24.5 15.5 33.5 17 47.5 24 60l50-25q-3 40-23 60t-42.5 21-40 6.5T1189 908zm60-235q-5-5-13.5-15.5t-12-14.5-10.5-11.5-10-10.5l-8-8-8.5-7.5-8-5-8.5-4.5q-7-3-14.5-5t-20.5-2.5-22-.5h-70q-126 0-217 43 16-30 36-46.5t54-29.5 65.5-36 46-36.5 50-55T1122 398q12 9 28 31.5t32 36.5 38 13l12-1v76l22 1q247-95 371-190 28-21 50-39t42.5-37.5 33-31 29.5-34 24-31 24.5-37 23-38 27-47.5 29.5-53l7-9q-2 53-43 139-79 165-205 264t-306 142q-14 3-42 7.5t-50 9.5-39 14q3 19 24.5 46t21.5 34q0 11-26 30zm-221 921q39-26 131.5-47.5T1307 1546q9 0 22.5 15.5t28 42.5 26 50 24 51 14.5 33q-121 45-244 45-61 0-125-11zM790 968l48-12 109 177-73 48zm501 517q3 15 3 16 0 7-17.5 14.5t-46 13-54 9.5-53.5 7.5-32 4.5l-7-43q21-2 60.5-8.5t72-10 60.5-3.5h14zM834 857l-96 20-6-17q10-1 32.5-7t34.5-6q19 0 35 10zm195 634h31l10 83-41 12v-95zM1918 1V0v1zm0 0-1 5-2 2 1-3zm0 0 1-1z"/></svg>';
  static const String pied_piper_pp =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1536" height="1536" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1536 1536"><path fill="currentColor" d="M1046 892q0 64-38 109t-91 45q-43 0-70-15V754q28-17 70-17 53 0 91 45.5t38 109.5zM703 464q0 64-38 109.5T574 619q-43 0-70-15V327q28-17 70-17 53 0 91 45t38 109zm562 431q0-134-88-229t-213-95q-20 0-39 3-23 78-78 136-87 95-211 101v636l211-41v-206q51 19 117 19 125 0 213-95t88-229zM922 468q0-134-88.5-229T620 144q-74 0-141 36H293v840l211-41V773q55 19 116 19 125 0 213.5-95T922 468zm614-180v960q0 119-84.5 203.5T1248 1536H288q-119 0-203.5-84.5T0 1248V288Q0 169 84.5 84.5T288 0h960q119 0 203.5 84.5T1536 288z"/></svg>';
  static const String pinterest =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1536" height="1536" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1536 1536"><path fill="currentColor" d="M1536 768q0 209-103 385.5T1153.5 1433 768 1536q-111 0-218-32 59-93 78-164 9-34 54-211 2


}

fn bool_values() -> [bool; 2] {
    [true, false]
}

fn basic_bool_exprs() -> impl Iterator<Item = TestExpr> {
    bool_values()
        .into_iter()
        .flat_map(|x| [TestExpr::Count(x), TestExpr::Const(x)])
}

#[test]
fn test_basic() {
    test_ifs(&TestExpr::Const(true));
    test_ifs(&TestExpr::Const(false));
    test_ifs(&TestExpr::Count(true));
    test_ifs(&TestExpr::Count(false));
    test_ifs(&TestExpr::Not(box TestExpr::Const(true)));
    test_ifs(&TestExpr::Not(box TestExpr::Const(false)));
    test_ifs(&TestExpr::Not(box TestExpr::Count(true)));
    test_ifs(&TestExpr::Not(box TestExpr::Count(false)));
}

#[test]
fn test_and() {
    for lhs in basic_bool_exprs() {
        for rhs in basic_bool_exprs() {
            test_ifs(&TestExpr::BinOp(TestBinOp::And, box (lhs.clone(), rhs)));
        }
    }
}

#[test]
fn test_or() {
    for lhs in basic_bool_exprs() {
        for rhs in basic_bool_exprs() {
            test_ifs(&TestExpr::BinOp(TestBinOp::Or, box (lhs.clone(), rhs)));
        }
    }
}

#[test]
fn test_and_or_not() {
    for lhs in basic_bool_exprs() {
        for rhs in basic_bool_exprs() {
            for negate_lhs in [false, true] {
                for negate_rhs in [false, true] {
                    for bin_op in [TestBinOp::And, TestBinOp::Or] {
                        let lhs = if negate_lhs {
                            TestExpr::Not(box lhs.clone())
                        } else {
                            lhs.clone()
                        };
                        let rhs = if negate_rhs {
                            TestExpr::Not(box rhs.clone())
                        } else {
                            rhs.clone()
                        };
                        test_ifs(&TestExpr::BinOp(bin_op, box (lhs, rhs)));
                    }
                }
            }
        }
    }
}

const RANDOM_ITERATIONS: usize = 100;

fn max_depth_for_iter(i: usize) -> usize {
    if i < 5 {
        0
    } else if i < RANDOM_ITERATIONS / 50 {
        1
    } else if i < RANDOM_ITERATIONS / 25 {
        2
    } else if i < RANDOM_ITERATIONS / 10 {
        3
    } else if i < RANDOM_ITERATIONS / 3 {
        4
    } else if i < RANDOM_ITERATIONS / 2 {
        5
    } else {
        20
    }
}

fn random_expr(rng: &mut SmallRng, max_depth: usize) -> TestExpr {
    fn random_simple_expr(rng: &mut SmallRng) -> TestExpr {
        match rng.gen_range(0..4) {
            0 => TestExpr::Const(true),
            1 => TestExpr::Const(false),
            2 => TestExpr::Count(true),
            3 => TestExpr::Count(false),
            _ => unreachable!(),
        }
    }

    if max_depth == 0 {
        random_simple_expr(rng)
    } else {
        match rng.gen_range(0..4) {
            0 => random_simple_expr(rng),
            1 => TestExpr::Not(box random_expr(rng, max_depth - 1)),
            2 => TestExpr::BinOp(
                TestBinOp::And,
                box (
                    random_expr(rng, max_depth - 1),
                    ra


			sql.append(" and (t.name like ? or cust.sn like ? or cust.name like ? or t.mobile like ? or t.telephone like ?)");
			keyword="%"+keyword+"%";
			parame.add(keyword);
			parame.add(keyword);
			parame.add(keyword);
			parame.add(keyword);
			parame.add(keyword);
		}
		String customer_id=(String)filter.get("customer_id");
		if(StringUtils.isNotEmpty(customer_id)){
			sql.append(" and t.customer_id=? ");
			parame.add(customer_id);
		}
		String sortField=(String)filter.get("_sortField");
		if(StringUtils.isNotEmpty(sortField)){
			String sort=(String)filter.get("_sort");
			sql.append(" order by ");
			sql.append(sortField);
			sql.append(" ");
			sql.append(sort);
		}
		return this.paginate(pageNo, pageSize, "select t.*,cust.type as custType,cust.name as customer_name,c.realname creater_name,u.realname updater_name,h.realname head_name ",sql.toString(),parame.toArray());
	}
	public List<Contacts> list(String companyId, String customer_id) {
		return dao.find("select * from "+tableName+" where customer_id=? and company_id=? order by is_main desc",customer_id,companyId);
	}

}
package org.hibernate.engine.jdbc;

import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.sql.Clob;

public class SerializableClobProxy
  implements InvocationHandler, Serializable
{
  private static final Class[] PROXY_INTERFACES = { Clob.class, WrappedClob.class, Serializable.class };
  private final transient Clob clob;

  protected SerializableClobProxy(Clob clob)
  {
    this.clob = clob;
  }

  public Clob getWrappedClob() {
    if (this.clob == null) {
      throw new IllegalStateException("Clobs may not be accessed after serialization");
    }

    return this.clob;
  }

  public Object invoke(Object proxy, Method method, Object[] args)
    throws Throwable
  {
    if ("getWrappedClob".equals(method.getName()))
      return getWrappedClob();
    try
    {
      return method.invoke(getWrappedClob(), args);
    }
    catch (AbstractMethodError e) {
      throw new Exception("The JDBC driver does not implement the method: " + method, e);
    }
    catch (InvocationTargetException e) {
      throw e.getTargetException();
    }
  }

  public static Clob generateProxy(Clob clob)
  {
    return (Clob)Proxy.newProxyInstance(getProxyClassLoader(), PROXY_INTERFACES, new SerializableClobProxy(clob));
  }

  public static ClassLoader getProxyClassLoader()
  {
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    if (cl == null) {
      cl = WrappedClob.class.getClassLoader();
    }
    return cl;
  }
}/**
 * 微信公众平台开发模式(JAVA) SDK
 * (c) 2012-2014 ____′↘夏悸 <wmails@126.cn>, MIT Licensed
 * http://www.jeasyuicn.com/wechat
 */
package com.gson.plugin;

import java.io.IOException;
import java.net.JarURLConnection;
import java.net.


ITE", -- [32909]
	"NEWBIE_TOOLTIP_UNIT_VOTE_TO_KICK", -- [32910]
	"NEWBIE_TOOLTIP_UNMUTE", -- [32911]
	"NEWBIE_TOOLTIP_VIEWGUILD", -- [32912]
	"NEWBIE_TOOLTIP_VOICE_CHAT_SELECTOR", -- [32913]
	"NEWBIE_TOOLTIP_WHOTAB", -- [32914]
	"NEWBIE_TOOLTIP_WORLDMAP", -- [32915]
	"NEWBIE_TOOLTIP_XPBAR", -- [32916]
	"NEW_ACHIEVEMENT_EARNED", -- [32917]
	"NEW_CAPS", -- [32918]
	"NEW_CHAT_WINDOW", -- [32919]
	"NEW_COMPACT_UNIT_FRAME_PROFILE", -- [32920]
	"NEW_CONVERSATION_INSTRUCTIONS", -- [32921]
	"NEW_FEATURE_SHADOW_COLOR", -- [32922]
	"NEW_FEATURE_SHADOW_COLOR_CODE", -- [32923]
	"NEW_ITEM_ATLAS_BY_QUALITY", -- [32924]
	"NEW_LEADER", -- [32925]
	"NEW_RECIPE_LEARNED_TITLE", -- [32926]
	"NEW_TITLE_EARNED", -- [32927]
	"NEXT", -- [32928]
	"NEXT_ABILITY", -- [32929]
	"NEXT_BATTLE", -- [32930]
	"NEXT_BATTLE_LABEL", -- [32931]
	"NEXT_TALENT_LEVEL", -- [32932]
	"NIGHTMARE_RAID_XAVIUS_NIGHTMARE_CORRUPTION", -- [32933]
	"NIGHT_FAE_BLUE_COLOR", -- [32934]
	"NIGHT_FAE_BLUE_COLOR_CODE", -- [32935]
	"NO", -- [32936]
	"NONE", -- [32937]
	"NONEQUIPSLOT", -- [32938]
	"NONE_CAPS", -- [32939]
	"NONE_KEY", -- [32940]
	"NORMAL_FONT_COLOR", -- [32941]
	"NORMAL_FONT_COLOR_CODE", -- [32942]
	"NORMAL_QUEST_DISPLAY", -- [32943]
	"NOTCH_MODE", -- [32944]
	"NOTCH_MODE_OVERLAP", -- [32945]
	"NOTCH_MODE_SHIFT_UI", -- [32946]
	"NOTCH_MODE_WINDOW_BELOW", -- [32947]
	"NOTE", -- [32948]
	"NOTE_COLON", -- [32949]
	"NOTE_SUBMITTED", -- [32950]
	"NOTE_SUBMIT_FAILED", -- [32951]
	"NOT_APPLICABLE", -- [32952]
	"NOT_BOUND", -- [32953]
	"NOT_COLLECTED", -- [32954]
	"NOT_ENOUGH_MANA", -- [32955]
	"NOT_IN_GROUP", -- [32956]
	"NOT_ON_THREAT_COLOR", -- [32957]
	"NOT_ON_THREAT_COLOR_CODE", -- [32958]
	"NOT_READY", -- [32959]
	"NOT_READY_FEMALE", -- [32960]
	"NOT_TAMEABLE", -- [32961]
	"NOT_YET_SIGNED", -- [32962]
	"NO_ARENA_TEAM", -- [32963]
	"NO_ATTACHMENTS", -- [32964]
	"NO_BATTLETAG", -- [32965]
	"NO_BIDS", -- [32966]
	"NO_COMPLETED_ACHIEVEMENTS", -- [32967]
	"NO_DAILY_QUESTS_REMAINING", -- [32968]


 std::make_shared<const mpcd::SphereGeometry>(r, true);
    std::shared_ptr<Variant> kT = std::make_shared<VariantConstant>(1.5);
    std::shared_ptr<mpcd::RejectionVirtualParticleFiller<mpcd::SphereGeometry>> filler
        = std::make_shared<F>(sysdef, "B", 2.0, kT, sphere);
    filler->setCellList(cl);

    /*
     * Test basic filling up for this cell list
     */
    unsigned int Nfill_0(0);
    filler->fill(0);
        {
        ArrayHandle<Scalar4> h_pos(pdata->getPositions(), access_location::host, access_mode::read);
        ArrayHandle<Scalar4> h_vel(pdata->getVelocities(),
                                   access_location::host,
                                   access_mode::read);
        ArrayHandle<unsigned int> h_tag(pdata->getTags(), access_location::host, access_mode::read);

        // ensure first particle did not get overwritten
        UP_ASSERT_CLOSE(h_pos.data[0].x, Scalar(1), tol_small);
        UP_ASSERT_CLOSE(h_pos.data[0].y, Scalar(-2), tol_small);
        UP_ASSERT_CLOSE(h_pos.data[0].z, Scalar(3), tol_small);
        UP_ASSERT_CLOSE(h_vel.data[0].x, Scalar(123), tol_small);
        UP_ASSERT_CLOSE(h_vel.data[0].y, Scalar(456), tol_small);
        UP_ASSERT_CLOSE(h_vel.data[0].z, Scalar(789), tol_small);
        UP_ASSERT_EQUAL(h_tag.data[0], 0);

        // check if the particles have been placed outside the confinement
        unsigned int N_out(0);
        for (unsigned int i = pdata->getN(); i < pdata->getN() + pdata->getNVirtual(); ++i)
            {
            // tag should equal index on one rank with one filler
            UP_ASSERT_EQUAL(h_tag.data[i], i);
            // type should be set
            UP_ASSERT_EQUAL(__scalar_as_int(h_pos.data[i].w), 1);

            Scalar3 pos = make_scalar3(h_pos.data[i].x, h_pos.data[i].y, h_pos.data[i].z);
            const Scalar r2 = dot(pos, pos);
            if (r2 > r * r)
                ++N_out;
            }
        UP_ASSERT_EQUAL(N_out, pdata->getNVirtual());
        Nfill_0 = N_out;
        }

    /*
     * Fill the volume again, which should approximately double the number of virtual particles
     */
    filler->fill(1);
        {
        ArrayHandle<Scalar4> h_pos(pdata->getPositions(), access_location::host, access_mode::read);
        ArrayHandle<Scalar4> h_vel(pdata->getVelocities(),
                                   access_location::host,
                                   access_mode::read);
        ArrayHandle<unsigned int> h_tag(pdata->getTags(), access_location::host, access_mode::read);

        // check if the particles have been placed outside the confinement
        unsigned int N_out(0);
        for (unsigned int i = pdata->getN(); i < pdata->getN() + pdata->getNVirtual(); ++i)
            {
            // tag should equal index on one rank with one filler
            UP_ASSERT_EQUAL(h_tag.data[i], i);
            // type should be set
            UP_ASSERT_EQUAL(__scalar_as_int(h_pos.data[i].w), 1);

            Scalar3 pos = make_scalar3(h_pos.data[i].x, h_pos.dat


--[[
Copyright (C) 2008-2016 Vana Development Team

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
--]]
-- Spinel (Tour Guide, teleports to/from Zipangu)

dofile("scripts/utils/npcHelper.lua");

if getMap() == 800000000 then
	wtOrigin = getPlayerVariable("wt_origin", type_int);
	if wtOrigin == nil then
		wtOrigin = 100000000;
	end

	choices = {
		makeChoiceHandler("Yes, I'm done with traveling. Can I go back to " .. mapRef(wtOrigin) .."? ", function()
			addText("Alright. ");
			addText("I'll now take you back to where you were before the visit to Japan. ");
			addText("If you ever feel like traveling again down the road, please let me know!");
			sendNext();

			setMap(wtOrigin);
			deletePlayerVariable("wt_origin");
		end),
		makeChoiceHandler("No, I'd like to continue exploring this place.", function()
			addText("OK. If you ever change your mind, please let me know.");
			sendOk();
		end),
	};

	addText("How's the traveling? ");
	addText("Are you enjoying it?\r\n");
	addText(blue(choiceRef(choices)));
	choice = askChoice();

	selectChoice(choices, choice);
else
	addText("If you're tired of the monotonous daily life, how about getting out for a change? ");
	addText("There's nothing quite like soaking up a new culture, learning something new by the minute! ");
	addText("It's time for you to get