allViewPermissions, &api.RESTRolePermission{ID: viewOnlyPermitID, Read: true})
	}
	for _, rwPermissionIDs := range rwPermissionIDs {
		allViewPermissions = append(allViewPermissions, &api.RESTRolePermission{ID: rwPermissionIDs, Read: true})
	}
	// Prepare all modify-configurable permissions
	allModifyPermissions := make([]*api.RESTRolePermission, 0, 1+len(rwPermissionIDs))
	allModifyPermissions = append(allModifyPermissions, &api.RESTRolePermission{ID: "ci_scan", Write: true})
	for _, rwPermissionIDs := range rwPermissionIDs {
		allModifyPermissions = append(allModifyPermissions, &api.RESTRolePermission{ID: rwPermissionIDs, Write: true})
	}
	// Prepare all r/w-configurable permissions
	allPermissions := make([]*api.RESTRolePermission, 0, 1+len(viewOnlyPermissionIDs)+len(rwPermissionIDs))
	allPermissions = append(allPermissions, &api.RESTRolePermission{ID: "ci_scan", Write: true})
	for _, viewOnlyPermitID := range viewOnlyPermissionIDs {
		allPermissions = append(allPermissions, &api.RESTRolePermission{ID: viewOnlyPermitID, Read: true})
	}
	for _, rwPermissionIDs := range rwPermissionIDs {
		allPermissions = append(allPermissions, &api.RESTRolePermission{ID: rwPermissionIDs, Read: true, Write: true})
	}
	// Config with different configurable permissions
	configPermissions := [][]*api.RESTRolePermission{allViewPermissions, allModifyPermissions, allPermissions}
	for _, configPermission := range configPermissions {
		data.Config.Permissions = configPermission
		body, _ = json.Marshal(data)
		w = restCall("PATCH", "/v1/user_role/"+data.Config.Name, body, api.UserRoleAdmin)
		if w.status != http.StatusOK {
			t.Fatalf("Failed to modify role %s(all read permissions): status=%v.", data.Config.Name, w.status)
		}
		// Check configured role in cluster
		for _, p := range data.Config.Permissions {
			if p.Write && p.ID != "ci_scan" {
				p.Read = true // read permission is enabled as well when write permission is enabled, except for ci_scan which only supports modify
			}
		}
		verifyCustomRole("15", &data, accAdmin, t)
	}

	// Delete role
	w = restCall("DELETE", "/v1/user_role/"+data.Config.Name, nil, api.UserRoleAdmin)
	if w.status != http.StatusOK {
		t.Fatalf("Failed to delete role: status=%v.", w.status)
	}

	postTest()
}

func TestRoleConfigNegative(t *testing.T) {
	preTest()

	var mockCluster kv.MockCluster
	mockCluster.Init(nil, nil)
	clusHelper = &mockCluster
	cache.MockCacheInit()
	clusHelper.SetCacheMockCallback(share.CLUSConfigUserRoleStore, cache.MockUserRoleConfigUpdate)

	data := api.RESTUserRoleConfigData{
		Config: &api.RESTUserRoleConfig{
			Name:    "custom-role-1",
			Comment: "for viewing audit logs",
			Permissions: []*api.RESTRolePermission{
				{ID: "audit_events", Read: true},
			},
		}}

	// Try to config non-configurable roles
	names := []string{api.UserRoleAdmin, api.UserRoleReader, api.UserRoleCIOps, api.UserRoleFedAdmin, api.UserRoleFedReader, api.UserRoleIBMSA}
	for _, name := range names {
		data.Config.Name = name
		body, _ := json.Marshal(data)
		w := restCall("PATCH", "/v1/user


r(2, "c"));
});

test("oneOf", () => {
	expect(parse("c", G.oneOf([char("a"), char("b"), char("c")]))).toEqualOk("c");
	expect(parse("d", G.oneOf([char("a"), char("b"), char("c")]))).toMatchErr(
		[tokenError(0, "a"), tokenError(0, "b"), tokenError(0, "c")]
	);
});

test("optional", () => {
	expect(parse("", G.optional(char("a")))).toEqualOk(O.none());
	expect(parse("a", G.optional(char("a")))).toEqualOk(O.some("a"));
});

test("many", () => {
	expect(parse("", G.many(char("a")))).toEqualOk([]);
	expect(parse("a", G.many(char("a")))).toEqualOk(["a"]);
	expect(parse("aaa", G.many(char("a")))).toEqualOk(["a", "a", "a"]);
});

test("many1", () => {
	expect(parse("a", G.many1(char("a")))).toEqualOk(["a"]);
	expect(parse("aaa", G.many1(char("a")))).toEqualOk(["a", "a", "a"]);
	expect(parse("", G.many1(char("a")))).toMatchErr(tokenError(0, "a"));
});

test("and", () => {
	expect(parse("a", G.and(char("a"), char("a")))).toEqualOk("a");
	expect(parse("a", G.and(char("b"), char("a")))).toMatchErr(andError(0, tokenError(0, "b")));
});

test("not", () => {
	expect(parse("a", G.not(char("b"), char("a")))).toEqualOk("a");
	expect(parse("a", G.not(char("a"), char("a")))).toMatchErr(notError(0, "a"));
});

test("ref", () => {
	expect(parse("a", G.ref(() => char("a")))).toEqualOk("a");
	expect(parse("b", G.ref(() => char("a")))).toMatchErr(tokenError(0, "a"));
});

test("validate", () => {
	const validator = (c: string) => c === "a" ? R.ok(c) : R.err("not-a");
	expect(parse("a", G.validate(char("a"), validator))).toEqualOk("a");
	expect(parse("a", G.validate(char("b"), validator))).toMatchErr(tokenError(0, "b"));
	expect(parse("b", G.validate(char("b"), validator))).toMatchErr(validationError(0, "not-a"));
});

test("memo", () => {
	const p = G.memo(char("a"));
	expect(parse("a", G.memo(char("a")))).toEqualOk("a");
	expect(parse("ab", G.memo(G.seqOf([G.memo(char("a")), G.memo(char("b"))])))).toEqualOk(["a", "b"]);
	expect(parse("b", G.memo(G.oneOf([G.memo(char("a")), G.memo(char("b"))])))).toEqualOk("b");
	expect(parse("ba", G.oneOf([p, G.seqOf([char("b"), p])]))).toEqualOk(["b", "a"]);
});

test("parse", () => {
	expect(G.parse("a", G.make(char("a")))).toEqual(["a", 1]);
	expect(G.parse("a", G.mk(char("a")))).toEqual("a");
	expect(() => G.parse("b", G.make(char("a")), e => e.type)).toThrow(new Error(tokenError(0, "a").type));
	expect(() => G.parse("b", G.mk(char("a")


t list by swapping if necessary
       */
      if (a[lo] > a[hi])
      {
        int T = a[lo];

        a[lo] = a[hi];
        a[hi] = T;
      }

      return;
    }

    /*
     *  Pick a pivot and move it out of the way
     */
    int pivot = a[(lo + hi) / 2];

    a[(lo + hi) / 2] = a[hi];
    a[hi] = pivot;

    while (lo < hi)
    {

      /*
       *  Search forward from a[lo] until an element is found that
       *  is greater than the pivot or lo >= hi
       */
      while (a[lo] <= pivot && lo < hi)
      {
        lo++;
      }

      /*
       *  Search backward from a[hi] until element is found that
       *  is less than the pivot, or lo >= hi
       */
      while (pivot <= a[hi] && lo < hi)
      {
        hi--;
      }

      /*
       *  Swap elements a[lo] and a[hi]
       */
      if (lo < hi)
      {
        int T = a[lo];

        a[lo] = a[hi];
        a[hi] = T;

        // pause();
      }

      // if (stopRequested) {
      //    return;
      // }
    }

    /*
     *  Put the median in the "center" of the list
     */
    a[hi0] = a[hi];
    a[hi] = pivot;

    /*
     *  Recursive calls, elements a[lo0] to a[lo-1] are less than or
     *  equal to pivot, elements a[hi+1] to a[hi0] are greater than
     *  pivot.
     */
    sort(a, lo0, lo - 1);
    sort(a, hi + 1, hi0);
  }

  /**
   * Sort an array using a quicksort algorithm.
   *
   * @throws Exception
   */
  public void sort() throws Exception
  {
    sort(m_map, 0, m_firstFree - 1);
  }
}
/*
 * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
/*
 * Copyright 1999-2002,2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.sun.org.apache.xml.internal.serialize;

import java.io.OutputStream;
import java.io.Writer;
import java.io.UnsupportedEncodingException;
import com.sun.org.apache.xerces.internal.dom.DOMMessageFormatter;

/**
 * Default serializer factory can construct serializers for the three
 * markup serializers (XML, HTML, XHTML ).
 *
 *
 * @author Scott Boag
 * @author Assaf Arkin
 */
final class SerializerFactoryImpl
    extends SerializerFactory
{

    private String _method;

    SerializerFactoryImpl( String method )
    {
        _method = method;
        if ( ! _method.equals( Method.XML ) &&
             ! _method.equals( Method.HTML ) &&
             ! _method.equals( Method.XHTML


n = 5

for i in range(11):
    print(f"{n} x {i} = {n*i}")


 + L" \"" + path + L"\" ZIP compression error: " + mesg;
}

///
///  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
///
OmWString Om_errZipExtr(const OmWString& item, const OmWString& path, const OmWString& mesg)
{
  return item + L" \"" + path + L"\" ZIP extraction error: " + mesg;
}

///
///  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
///
OmWString Om_errExists(const OmWString& item, const OmWString& path)
{
  return item + L" \"" + path + L"\" already exists";
}

///
///  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
///
OmWString Om_errParam(const OmWString& value, const OmWString& type)
{
  return L"invalid parameter: \"" + value + L"\" is not a valid " + type;
}

///
///  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
///
OmWString Om_errBadAlloc(const OmWString& subject, const OmWString& name)
{
  return subject + L" \"" + name + L"\" error: out of memory.";
}
/*
  This file is part of Open Mod Manager.

  Open Mod Manager is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  Open Mod Manager 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 Open Mod Manager. If not, see <http://www.gnu.org/licenses/>.
*/
#include "OmBase.h"           //< string, vector, Om_alloc, OM_MAX_PATH, etc.
#include <regex>

///
///  -  -  -  -  -  -  -  -  - Base64 implementation  -  -  -  -  -  -  -  -  -
///
static const wchar_t __b64_enc_table[] = L"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const uint8_t __b64_dec_table[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,62, 0, 0, 0,63,52,53,54,55,56,57,58,59,60,61, 0, 0, 0, 0, 0, 0,
                                          0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25, 0, 0, 0, 0, 0,
                                          0,26


 json:"deployer,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (m *GetDeployerResponse) Reset()         { *m = GetDeployerResponse{} }
func (m *GetDeployerResponse) String() string { return proto.CompactTextString(m) }
func (*GetDeployerResponse) ProtoMessage()    {}
func (*GetDeployerResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_deployer_whitelist_d3d330037de96147, []int{7}
}
func (m *GetDeployerResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_GetDeployerResponse.Unmarshal(m, b)
}
func (m *GetDeployerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_GetDeployerResponse.Marshal(b, m, deterministic)
}
func (dst *GetDeployerResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetDeployerResponse.Merge(dst, src)
}
func (m *GetDeployerResponse) XXX_Size() int {
	return xxx_messageInfo_GetDeployerResponse.Size(m)
}
func (m *GetDeployerResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_GetDeployerResponse.DiscardUnknown(m)
}

var xxx_messageInfo_GetDeployerResponse proto.InternalMessageInfo

func (m *GetDeployerResponse) GetDeployer() *Deployer {
	if m != nil {
		return m.Deployer
	}
	return nil
}

type RemoveDeployerRequest struct {
	DeployerAddr         *types.Address `protobuf:"bytes,1,opt,name=deployer_addr,json=deployerAddr" json:"deployer_addr,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (m *RemoveDeployerRequest) Reset()         { *m = RemoveDeployerRequest{} }
func (m *RemoveDeployerRequest) String() string { return proto.CompactTextString(m) }
func (*RemoveDeployerRequest) ProtoMessage()    {}
func (*RemoveDeployerRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_deployer_whitelist_d3d330037de96147, []int{8}
}
func (m *RemoveDeployerRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_RemoveDeployerRequest.Unmarshal(m, b)
}
func (m *RemoveDeployerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_RemoveDeployerRequest.Marshal(b, m, deterministic)
}
func (dst *RemoveDeployerRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RemoveDeployerRequest.Merge(dst, src)
}
func (m *RemoveDeployerRequest) XXX_Size() int {
	return xxx_messageInfo_RemoveDeployerRequest.Size(m)
}
func (m *RemoveDeployerRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_RemoveDeployerRequest.DiscardUnknown(m)
}

var xxx_messageInfo_RemoveDeployerRequest proto.InternalMessageInfo

func (m *RemoveDeployerRequest) GetDeployerAddr() *types.Address {
	if m != nil {
		return m.DeployerAddr
	}
	return nil
}

type RemoveDeployerResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Re


= 0;
      //va_start( ap, zDate );
      int zIndex = 0;
      //do
      //{
      //N = (int)va_arg( ap, "int" );
      //min = (int)va_arg( ap, "int" );
      //max = (int)va_arg( ap, "int" );
      //nextC = (char)va_arg( ap, "char" );
      //pVal = (int)va_arg( ap, "int" );
      val = 0;
      while ( N-- != 0 )
      {
        if ( !sqlite3Isdigit( zDate[zIndex] ) )
        {
          goto end_getDigits;
        }
        val = val * 10 + zDate[zIndex] - '0';
        zIndex++;
      }
      if ( val < min || val > max || zIndex < zDate.Length && ( nextC != 0 && nextC != zDate[zIndex] ) )
      {
        goto end_getDigits;
      }
      pVal = val;
      zIndex++;
      cnt++;
//} while ( nextC != 0 && zIndex < zDate.Length );
end_getDigits:
      //va_end( ap );
      return cnt;
    }

    /*
    ** Read text from z[] and convert into a floating point number.  Return
    ** the number of digits converted.
    */
    //#define getValue sqlite3AtoF

    /*
    ** Parse a timezone extension on the end of a date-time.
    ** The extension is of the form:
    **
    **        (+/-)HH:MM
    **
    **
    ** Or the "zulu" notation:
    **
    **        Z
    **
    ** If the parse is successful, write the number of minutes
    ** of change in p.tz and return 0.  If a parser error occurs,
    ** return non-zero.
    **
    ** A missing specifier is not considered an error.
    */
    static int parseTimezone( string zDate, DateTime p )
    {
      int sgn = 0;
      int nHr = 0; int nMn = 0;
      char c;
      zDate = zDate.Trim();// while ( sqlite3Isspace( *(u8*)zDate ) ) { zDate++; }
      p.tz = 0;
      c = zDate.Length == 0 ? '\0' : zDate[0];
      if ( c == '-' )
      {
        sgn = -1;
      }
      else if ( c == '+' )
      {
        sgn = +1;
      }
      else if ( c == 'Z' || c == 'z' )
      {
        zDate = zDate.Substring( 1 ).Trim();//zDate++;
        goto zulu_time;
      }
      else
      {
        return c != '\0' ? 1 : 0;
      }
      //zDate++;
      if ( getDigits( zDate.Substring( 1 ), 2, 0, 14, ':', ref nHr, 2, 0, 59, '\0', ref nMn ) != 2 )
      {
        return 1;
      }
      //zDate += 5;
      p.tz = sgn * ( nMn + nHr * 60 );
      if ( zDate.Length == 6 ) zDate = "";
      else if ( zDate.Length > 6 ) zDate = zDate.Substring( 6 ).Trim();// while ( sqlite3Isspace( *(u8*)zDate ) ) { zDate++; }
zulu_time:
      return zDate != "" ? 1 : 0;
    }

    /*
    ** Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF.
    ** The HH, MM, and SS must each be exactly 2 digits.  The
    ** fractional seconds FFFF can be one or more digits.
    **
    ** Return 1 if there is a parsing error and 0 on success.
    */
    static int parseHhMmSs( stri


ckground-color: $help-color;
$inputnumber-input-border-radius: 8px;
$inputnumber-input-width: 40px;
$inputnumber-input-height: 20px;

// actionsheet
$zindex-actionsheet: 10001 !default;
$body-background: #f6f6f6 !default;
$light-color: #f6f6f6 !default;
$font-size-base: 14px !default;
$font-size-small: 12px !default;
// calendar
$calendar-primary-color: $primary-color;
$calendar-choose-color: #fef6f6;
$calendar-base-color: #333333;
$calendar-disable-color: #d1d0d0;
$calendar-title-font: $font-size-4;
$calendar-base-font: $font-size-3;
$calendar-text-font: $font-size-1;
$calendar-day-font: 18px;
//popup

$popup-close-icon-margin: 16px;
$popup-border-radius: 20px;
// ---- Animation ----
$animation-duration: 0.25s !default;
$transition-duration: 0.2s !default;
$transition-duration-fast: 0.2s !default;
$transition-duration-slow: 0.4s !default;
$animation-timing-fun: cubic-bezier(0.55, 0.085, 0.68, 0.53) !default;
$ease-in-out: cubic-bezier(0.445, 0.05, 0.55, 0.95);
$ease-out: cubic-bezier(0.895, 0.03, 0.685, 0.22);

// ---- z-index ----
$zindex-mask: 9998 !default;
$zindex-actionsheet: 10001 !default;
$zindex-dialog: 10000 !default;
$zindex-picker: 10050 !default;

// Notify
$notify-text-color: #fff;
$notify-padding: 8px 16px;
$notify-font-size: 28px;

$notify-base-background-color: linear-gradient(
  135deg,
  rgba(250, 44, 25, 1) 0%,
  rgba(250, 63, 25, 1) 45%,
  rgba(250, 89, 25, 1) 83%,
  rgba(250, 100, 25, 1) 100%
);
$notify-primary-background-color: linear-gradient(
  315deg,
  rgba(73, 143, 242, 1) 0%,
  rgba(73, 101, 242, 1) 100%
);
$notify-success-background-color: linear-gradient(
  135deg,
  rgba(38, 191, 38, 1) 0%,
  rgba(39, 197, 48, 1) 45%,
  rgba(40, 207, 63, 1) 83%,
  rgba(41, 212, 70, 1) 100%
);
$notify-danger-background-color: rgba(250, 50, 25, 1);
$notify-warning-background-color: linear-gradient(
  135deg,
  rgba(255, 93, 13, 1) 0%,
  rgba(255, 154, 13, 1) 100%
);
// 单行超长省略号
@mixin oneline-ellipsis() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
// 多行超长省略号
@mixin moreline-ellipsis($line: 2) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $line;
  overflow: hidden;
  word-break: break-all;
}
// ============== JDesignTokens 基础变量  ============== //
// 主色调
$color-primary: var(--nutui-color-primary) !default;
$color-primary-stop-1: var(--nutui-color-primary) !default;
$color-primary-


4(0,0,0,0);
                    } else {
                        if(cosVal < 0.0) {
                            texCoord.x = 1.0 - tx;
                        } else {
                            texCoord.x = tx;
                        }
                        ty = 0.5 - tx;
                        ty = 2.0*ty*scale;
                        texCoord.y = (ty+uv.y)/(1.0+(2.0*ty));
                        gl_FragColor = texture2D(uSampler, texCoord);
                    }
                } else {
                    tx =(uv.x-0.5)/cosVal;
                    if(tx > 0.5) {
                        gl_FragColor = vec4(0,0,0,0);
                    } else {
                        if(cosVal < 0.0) {
                            texCoord.x = 0.5-tx;
                        } else {
                            texCoord.x = 0.5+tx;
                        }
                        ty = tx;
                        ty = 2.0 * ty *scale;
                        texCoord.y = (uv.y - ty)/(1.0 -2.0*ty);
                        gl_FragColor = texture2D(uSampler, texCoord);
                    }
                }
            }
        `;
        let fragmentSrc2 = `
            precision lowp float;
            varying vec2 vTextureCoord;
            varying vec4 vColor;
            uniform sampler2D uSampler;

            uniform float angle;
            uniform float scale;

            void main() {
                vec2 uv = vTextureCoord.xy;
                vec2 texCoord = uv;
                float tx,ty,cosVal;
                cosVal = cos(angle);
                if(uv.y <= 0.5) {
                    ty = 0.5 - (0.5-uv.y)/cosVal;
                    if(ty < 0.0) {
                        gl_FragColor = vec4(0,0,0,0);
                    } else {
                        if(cosVal < 0.0) {
                            texCoord.y = 1.0 - ty;
                        } else {
                            texCoord.y = ty;
                        }
                        tx = 0.5 - ty;
                        tx = 2.0*tx*scale;
                        texCoord.x = (tx+uv.x)/(1.0+(2.0*tx));
                        gl_FragColor = texture2D(uSampler, texCoord);
                    }
                } else {
                    ty =(uv.y-0.5)/cosVal;
                    if(ty > 0.5) {
                        gl_FragColor = vec4(0,0,0,0);
                    } else {
                        if(cosVal < 0.0) {
                            texCoord.y = 0.5-ty;
                        } else {
                            texCoord.y = 0.5+ty;
                        }
                        tx = ty;
                        tx = 2.0 * tx *scale;
                        texCoord.x = (uv.x - tx)/(1.0 -2.0*tx);
                        gl_FragColor = texture2D(uSampler, texCoord);
                    }
                }
            }
        `;
        //水平翻转
        this.hFilter = new egret.CustomFilter(vertexSrc, fragmentSrc1, {
            angle: 0 * Math.PI / 180,
            scale: 0.0
        });
        //垂直翻转
        this.vFilter = new egret.CustomFilter(vertexSrc, fragmentSrc2, {
            angle: 0 * Math.PI / 180,
            scale: 0.0
        });
        this.updateData1 = { dir: -1, changed: false };
        this.updateData2 = { dir: -1, changed: false };

        this.poke1.filters = [this.hFilter];
        this.poke2.filters = [this.vFilter];
    }

    private hFilter: egret.CustomFilter;
    private vFilter: egret.CustomFilter;
}/// <reference path="Plot.ts" />

namespace D3.canvas {

    export interface boxPlotOptions extends PlotOptions {
        showBox: boolean
        showWhiskers: boolean
        showMedian: boolean
        showMean: boolean
        medianCSize: number
        showOutliers: boole


bytes to read (buffer must be at least this size).
 */
void CAT24C512_ReadBuffer(uint16_t addr, uint8_t *buffer, uint32_t len) {
    uint8_t addr_buf[2] = {addr >> 8, addr & 0xFF};

    i2c_write_blocking(EEPROM_I2C, CAT24C512_I2C_ADDR, addr_buf, 2, true);
    i2c_read_blocking(EEPROM_I2C, CAT24C512_I2C_ADDR, buffer, len, false);
}

/**
 * @brief Dumps the entire EEPROM contents into a buffer.
 *
 * This function reads the entire 64KB of the EEPROM memory and stores it in the provided buffer.
 * This can be useful for backing up EEPROM contents or for debugging purposes.
 *
 * @param buffer Pointer to a buffer of at least 65536 bytes (64KB) to store the EEPROM contents.
 *               The caller must ensure the buffer is large enough.
 */
void CAT24C512_Dump(uint8_t *buffer) {
    CAT24C512_ReadBuffer(0x0000, buffer, 65536); // Read entire EEPROM (64KB)
}

/**
 * @brief Dumps the EEPROM contents in a formatted hex table.
 *
 * This function reads the entire EEPROM memory and outputs its contents as a formatted
 * hexadecimal table to the standard output (typically UART). The output is organized
 * as 16-byte rows with address headers and column headers for easier reading.
 * The output is delimited by "EE_DUMP_START" and "EE_DUMP_END" markers.
 *
 * Output format example:
 * ```
 * EE_DUMP_START
 * Addr    00      01      02      03      04      05      06      07      08      09      0A 0B 0C
 * 0D      0E      0F 0x0000  FF      FF      FF      FF      FF      FF      FF      FF      FF FF
 * FF      FF      FF      FF      FF      FF 0x0010  FF      FF      FF      FF      FF      FF FF
 * FF      FF      FF      FF      FF      FF      FF      FF      FF
 * ...
 * EE_DUMP_END
 * ```
 */
void CAT24C512_DumpFormatted(void) {
    char line[256];
    char field[16];

    printf("EE_DUMP_START\n");
    // Print header row
    memset(line, 0, sizeof(line));
    snprintf(line, sizeof(line), "%-7s", "Addr");
    for (uint8_t col = 0; col < 16; col++) {
        char colStr[8];
        sprintf(colStr, "%02X", col);
        sprintf(field, "%-7s", colStr);
        strcat(line, field);
    }
    printf("%s\n", line);

    // Dump EEPROM contents in 16-byte blocks using a 32-bit loop counter
    for (uint32_t addr = 0; addr < EEPROM_SIZE; addr += 16) {
        memset(line, 0, sizeof(line));
        sprintf(field, "0x%04X", (uint16_t)addr);
        sprintf(line, "%-7s", field);
        uint8_t buffer[16];
        CAT24C512_ReadBuffer(addr, buffer, 16);
        for (uint8_t i = 0; i < 16; i++) {
            sprintf(field, "%02X     ", buffer[i]);
            strcat(line, field);
        }
        printf("%s\n", line);
    }
    printf("EE_DUMP_END\n");
}


||") >
 | <NOT:       ("NOT" | "!") >
 | <PLUS:      "+" >
 | <MINUS:     "-" >
 | <LPAREN:    "(" >
 | <RPAREN:    ")" >
 | <COLON:     ":" >
 | <CARAT:     "^" > : Boost
 | <QUOTED:     "\"" (~["\""])+ "\"">
 | <TERM:      <_TERM_START_CHAR> (<_TERM_CHAR>)*  >
 | <FUZZY_SLOP:     "~" ( (<_NUM_CHAR>)+ ( "." (<_NUM_CHAR>)+ )? )? >
 | <PREFIXTERM:  <_TERM_START_CHAR> (<_TERM_CHAR>)* "*" >
 | <WILDTERM:  <_TERM_START_CHAR>
               (<_TERM_CHAR> | ( [ "*", "?" ] ))* >
 | <RANGEIN_START: "[" > : RangeIn
 | <RANGEEX_START: "{" > : RangeEx
 }

 <Boost> TOKEN : {
 <NUMBER:    (<_NUM_CHAR>)+ ( "." (<_NUM_CHAR>)+ )? > : DEFAULT
 }

 <RangeIn> TOKEN : {
 <RANGEIN_TO: "TO">
 | <RANGEIN_END: "]"> : DEFAULT
 | <RANGEIN_QUOTED: "\"" (~["\""])+ "\"">
 | <RANGEIN_GOOP: (~[ " ", "]" ])+ >
 }

 <RangeEx> TOKEN : {
 <RANGEEX_TO: "TO">
 | <RANGEEX_END: "}"> : DEFAULT
 | <RANGEEX_QUOTED: "\"" (~["\""])+ "\"">
 | <RANGEEX_GOOP: (~[ " ", "}" ])+ >
 }

 // *   Query  ::= ( Clause )*
 // *   Clause ::= ["+", "-"] [<TERM> ":"] ( <TERM> | "(" Query ")" )

 int Conjunction() : {
   int ret = CONJ_NONE;
 }
 {
   [
     <AND> { ret = CONJ_AND; }
     | <OR>  { ret = CONJ_OR; }
   ]
   { return ret; }
 }

 int Modifiers() : {
   int ret = MOD_NONE;
 }
 {
   [
      <PLUS> { ret = MOD_REQ; }
      | <MINUS> { ret = MOD_NOT; }
      | <NOT> { ret = MOD_NOT; }
   ]
   { return ret; }
 }

 Query Query(String field) :
 {
   Vector clauses = new Vector();
   Query q, firstQuery=null;
   int conj, mods;
 }
 {
   mods=Modifiers() q=Clause(field)
   {
     addClause(clauses, CONJ_NONE, mods, q);
     if (mods == MOD_NONE)
         firstQuery=q;
   }
   (
     conj=Conjunction() mods=Modifiers() q=Clause(field)
     { addClause(clauses, conj, mods, q); }
   )*
     {
       if (clauses.size() == 1 && firstQuery != null)
         return firstQuery;
       else {
   return getBooleanQuery(clauses);
       }
     }
 }

 Query Clause(String field) : {
   Query q;
   Token fieldToken=null, boost=null;
 }
 {
   [
     LOOKAHEAD(2)
     fieldToken=<TERM> <COLON> {
       field=discardEscapeChar(fieldToken.image);
     }
   ]

   (
    q=Term(field)
    | <LPAREN> q=Query(field) <RPAREN> (<CARAT> boost=<NUMBER>)?

   )
     {
       if (boost != null) {
         float f = (float)1.0;
   try {
     f = Float.valueOf(boost.image).floatValue();
           q.setBoost(f);
   } catch (Exception ignored) { }
       }
       return q;
     }
 }

 Query Term(String field) : {
   Token term, boost=null, fuzzySlop=null, goop1, goop2;
   boolean prefix = fal


local config = {}

config.defaults = {
  path_to_love_bin = "love",
  restart_on_save = false,
  debug_window_opts = nil,
  setup_makeprg = true,
}

---@class options
---@field path_to_love_bin? string: The path to the Love2D executable
---@field restart_on_save? boolean: Restart Love2D when a file is saved
---@field debug_window_opts? table: Create split window with Love2D terminal output
---@field setup_makeprg? boolean: Setup makeprg and errorformat for Love2D projects
config.options = {}

---Setup the LSP for love2d using vim.lsp.config with proper merging
local function setup_lsp()
  vim.notify("Setting up LÖVE LSP...", vim.log.levels.INFO)

  local settings = {
    Lua = {
      runtime = { version = "LuaJIT" }, -- LuaJIT 2.1 == Lua 5.1 semantics
      workspace = { checkThirdParty = false },
    },
  }

  if vim.lsp.config.lua_ls then
    settings = vim.tbl_deep_extend("force", vim.lsp.config.lua_ls.settings or {}, settings)
  end

  -- Merge with existing libraries (vim.tbl_deep_extend doesn't work on lists)
  local libraries = {}
  if vim.lsp.config.lua_ls and vim.lsp.config.lua_ls.settings and vim.lsp.config.lua_ls.settings.Lua.workspace then
    libraries = vim.lsp.config.lua_ls.settings.Lua.workspace.library or {}
  end
  table.insert(libraries, vim.fn.globpath(vim.o.runtimepath, "love2d"))
  table.insert(libraries, vim.fn.globpath(vim.o.runtimepath, "luasocket"))

  ---@diagnostic disable-next-line: undefined-field
  settings.Lua.workspace.library = libraries

  -- Apply settings
  vim.lsp.config("lua_ls", { settings = settings })

  -- Restart lua_ls
  vim.lsp.enable({ "lua_ls" }, false)
  vim.lsp.enable({ "lua_ls" })
end

---Setup makeprg and errorformat for Love2D projects
local function setup_makeprg_and_errorformat()
  -- Set errorformat to parse Lov


prosessed_url_file = r'data\quic_chunk\online_chunk_quic_train.csv'
line1=[]
with open(prosessed_url_file, 'r', encoding='utf-8') as infile:
    for line in infile:
        line1.append(line)

chunk_url_file = r'data\quic_chunk\online_chunk_quic.csv'
line2 = []
with open(chunk_url_file, 'r', encoding='utf-8') as infile2:
    for line in infile2:
        line2.append(line)

train_url = r'data\quic_chunk\train_url.csv'
with open(train_url, 'r', encoding='utf-8') as file:
    with open(r'data\quic_chunk\test_chunk.csv', 'w', encoding='utf-8') as f1, open(r'data\quic_chunk\train_chunk.csv', 'w', encoding='utf-8') as f2:
        for url in file:
            for l1 in line1:
                if l1.strip().split(',')[0] == url.strip():
                    f2.write(l1)
            for l2 in line2:
                if l2.strip().split(',')[0] == url.strip():
                    f1.write(l2)


".. tag.Type..acoff)
    if (tag.Type=="SAM" and #bytes>23) then
      tag=segmentsToTag(bytes, tag)
      print(acgreen..(#tag.SEG+1).." Segment(s) found"..acoff)
    -- unsegmented Master-Token
    -- only tag-data
    else
      for i=0, #tag.Bck do
        table.insert(tag.data, tag.Bck[i])
      end
      tag.data[#tag.data]=tag.MTC[0]
      tag.Bck=nil
      --tag.MTC[0]=tag.MTC[1]
      --tag.MTC[1]=nil
    end
    print(accyan..#bytes.." bytes for Tag processed"..acoff)
    return tag

end

---
-- put segments from byte-table to tag-table
function segmentsToTag(bytes, tag)
  if(#bytes>23) then
    local start=23
    local i=-1
    if (istable(tag)) then
      repeat
        i=i+1
        tag.SEG[i]=getSegmentData(bytes, start, ("%02d"):format(i))
        if (tag.Type=="SAM") then
          if (checkKghCrc(tag, i)) then tag.SEG[i].kgh=true end
        end
        start=start+tag.SEG[i].len
      until ((tag.SEG[i].valid==0) or tag.SEG[i].last==1 or i==126)
      return tag
    else return oops("tag is no table in: segmentsToTag ("..type(tag)..")") end
  else print("no Segments: must be a MIM22") end
end

---
-- read Tag-Table in bytes-table
function tagToBytes(tag)
    if istable(tag) == false then return oops("tag is no table in tagToBytes ("..type(tag)..")") end

    local bytes = {}
    local i, i2
    -- main token-data
    table.insert(bytes, tag.MCD)
    table.insert(bytes, tag.MSN0)
    table.insert(bytes, tag.MSN1)
    table.insert(bytes, tag.MSN2)
    table.insert(bytes, tag.MCC)
    table.insert(bytes, tag.DCFl)
    table.insert(bytes, tag.DCFh)
    table.insert(bytes, tag.raw)
    table.insert(bytes, tag.SSC)
    -- raw token data
    for i=0, #tag.data do
      table.insert(bytes, tag.data[i])
    end
    -- backup data
    if(istable(tag.Bck)) then
      for i=0, #tag.Bck do
        table.insert(bytes, tag.Bck[i])
      end
    end
    -- token-create-time / master-token crc
    for i=0, #tag.MTC do
      table.insert(bytes, tag.MTC[i])
    end
    -- process segments
    if (type(tag.SEG[0])=='table') then
      for i=0, #tag.SEG do
        for i2=1, #tag.SEG[i].raw+1 do
          table.insert(bytes, #bytes+1, tag.SEG[i].raw[i2])
        end
        table.insert(bytes, #bytes+1, tag.SEG[i].crc)
        for i2=0, #tag.SEG[i].data-1 do
          table.insert(bytes, #bytes+1, tag.SEG[i].data[i2])
        end
      end
    end
    -- fill with zeros
    for i=#bytes+1, 1024 do
      table.insert(bytes, i, '00')
    end
    return bytes
  end

---
--- PM3 I/O ---
-- write virtual Tag to real Tag
function writeToTag(tag)
    local bytes
    local taglen = 22
    local writeDCF = false
    if(utils.confirm(acred.."\nPlace the (empty) Tag onto the PM3\nand confirm writing to this Tag: "..acoff) == false) then
        return
    end
    if(utils.confirm(acred.."\nShould the decremental field (DCF) be written?: "..acoff) == true) then
        writeDCF = true


splay";
  font-style: normal;
  font-weight: 700;
  src:
    local("SF Pro Display"),
    url("https://fonts.cdnfonts.com/s/59278/SFPRODISPLAYBOLD.woff")
      format("woff");
}
@font-face {
  font-family: "SF Pro Display";
  font-style: italic;
  font-weight: 800;
  src:
    local("SF Pro Display"),
    url("https://fonts.cdnfonts.com/s/59278/SFPRODISPLAYHEAVYITALIC.woff")
      format("woff");
}
@font-face {
  font-family: "SF Pro Display";
  font-style: italic;
  font-weight: 900;
  src:
    local("SF Pro Display"),
    url("https://fonts.cdnfonts.com/s/59278/SFPRODISPLAYBLACKITALIC.woff")
      format("woff");
}
body.theme-dark {
  --accent-h: 258;
  --accent-l: 66%;
  --accent-s: 88%;
  --anim-duration-fast: 140ms;
  --anim-duration-moderate: 300ms;
  --anim-duration-none: 0;
  --anim-duration-slow: 560ms;
  --anim-duration-superfast: 70ms;
  --anim-motion-delay: cubic-bezier(0.65, 0.05, 0.36, 1);
  --anim-motion-jumpy: cubic-bezier(0.68, -0.55, 0.27, 1.55);
  --anim-motion-smooth: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --anim-motion-swing: cubic-bezier(0, 0.55, 0.45, 1);
  --background-modifier-active-hover: hsla(258, 88%, 66%, 0.1);
  --background-modifier-border: #534f4e;
  --background-modifier-border-focus: #555555;
  --background-modifier-border-hover: #3f3f3f;
  --background-modifier-box-shadow: rgba(0, 0, 0, 0.3);
  --background-modifier-cover: rgba(10, 10, 10, 0.4);
  --background-modifier-error: #fb464c;
  --background-modifier-error-hover: #fb464c;
  --background-modifier-error-rgb: 251, 70, 76;
  --background-modifier-form-field: #2a2a2a;
  --background-modifier-form-field-hover: #2a2a2a;
  --background-modifier-hover: rgba(255, 255, 255, 0.067);
  --background-modifier-message: rgba(0, 0, 0, 0.9);
  --background-modifier-success: #44cf6e;
  --background-modifier-success-rgb: 68, 207, 110;
  --background-primary: #212121;
  --background-primary-alt: #282828;
  --background-secondary: #191717;
  --background-secondary-alt: #161414;
  --bases-cards-background: #212121;
  --bases-cards-border-width: 1px;
  --bases-cards-container-background: transparent;
  --bases-cards-cover-background: #282828;
  --bases-cards-group-padding: 12px;
  --bases-cards-line-height: 24px;
  --bases-cards-scale: 1;
  --bases-cards-shadow: 0 0 0 1px #534f4e;
  --bases-cards-shadow-hover:


 m = 8 for the 8-bit result, and P_8 = 0.
; This inequality can be rewritten as
;         X_m < Y_m,
; where
;         X_m = 2^m P_m + 2^{2m-2},
;         Y_m = N^2 - P_m^2,
; Starting values are: X_8 = 2^14 = 0x4000, Y_8 = N^2 (arg_hi:arg_lo).
; The recurrence relations to update X_m and Y_m are:
;         2X_m = X_{m + 1} + 2^{2m} + 2^{2m-1}, MSB stored in res,
;         Y_m = Y_{m + 1} - X_{m+1}           , MSB stored in arg_hi,
; and the last two terms in 2X_m are kept in the rotation mask.

	ldi  mask, 0xc0       ; MSB: 2^{2m} + 2^{2m-1} (m = 7)
	ldi  res,  0x40       ; MSB: X_m = 2^{2m-2} (m = 8)
	; Pre-condition: C = 0.
.Lnextbit:
	brcs 1f               ; if C = 1, X_m < Y_m already
	cp   arg_hi, res
	brcs 2f               ; if X_m > Y_m, update and start next bit
1:	sub  arg_hi, res      ; update Y_m -> Y_m - X_m
	or   res, mask        ; update 2X_m
2:	lsr  mask             ; shift mask right; C = 1 is the end of loop
	eor  res, mask        ; only shift test bit
	rol  arg_lo           ; save C from mask into bit 0
	rol  arg_hi           ; Y_m -> 2Y_m instead of shifting 2X_m right
	sbrs arg_lo, 0        ; exit if bit 0 is set
	rjmp .Lnextbit
	brcs 3f
	lsl  arg_lo
	cpc  res, arg_hi
3:	adc  res, __zero_reg__
#endif /* __AVR_HAVE_MUL__ */
	mov  arg_lo, res
	ret
ENDFUNC


solute;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 15px solid #fff;
  top: -12px;
  left: 5%; }

/* styling : floating layout; */
form.sow-search.sow-search-over .sow-search-input > .input-group-over {
  background-color: #fff;
  padding-left: 15px;
  padding-right: 15px; }

form.sow-search.sow-search-over .sow-search-input > .input-group-over .sow-search-buttons {
  margin-left: 15px;
  margin-right: 15px;
  padding-left: 6px;
  padding-right: 6px; }

form.sow-search .sow-search-container {
  top: 66px; }

form.sow-search.sow-search-over .sow-search-container {
  top: 96px; }

/* make sure will stay the same on form size change */
form.sow-search input.form-control-sow-search.form-control-lg:not(.form-control-custom) {
  height: 50px !important;
  padding-top: .58rem !important;
  padding-bottom: .58rem !important; }

form.sow-search input.form-control-sow-search:not(.form-control-custom):not(.form-control-lg) {
  height: 50px !important;
  font-size: 1rem !important; }

/* theme color customize */
/* highlighted term (if JS fuzzysearch plugin used) */
.sow-search-content a > em {
  font-style: normal;
  color: #2E2E2E; }

/*

	DESKTOP ONLY

*/
@media only screen and (min-width: 768px) {
  /* larger font size on desktop only */
  form.sow-search input.form-control-sow-search.form-control-lg:not(.form-control-custom) {
    font-size: 1.3rem !important; } }

/*
	MOBILE
*/
@media only screen and (max-width: 991px) {
  form.sow-search:not(.sow-search-mobile) {
    display: none; }
  form.sow-search-mobile {
    position: fixed !important;
    top: 18px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999;
    margin: 0 !important; }
  form.sow-search-mobile .sow-search-container {
    position: fixed;
    display: inline-flex !important;
    top: 96px;
    bottom: 15px; }
  form.sow-search-mobile .sow-search-input,
  form.sow-search-mobile .sow-search-container {
    margin-left: 15px;
    margin-right: 15px;
    width: calc(100% - 30px) !important; }
  form.sow-search-mobile .sow-search-input input {
    background-color: #fff !important;
    padding-right: 87px; }
  /* white, top fixed layout instead of floating */
  form.sow-search-mobile .sow-search-input > .input-group-over {
    height: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important; }
  form.sow-search-mobile input.form-control-sow-search,
  form.sow-search-mobile input.form-control-sow-search.form-control-lg {
    font-size: 1.09rem !important;
    color: #121212 !important;
    border: 0 !important;
    padding-left: 10px; }
  form.sow-search-mobile input.form-control-sow-search


in_stride_n]
    s_mul_i32 s[s_out_stride_n_n], s[s_move_slice_n], s[s_out_stride_n]
    s_lshl_b32 s[s_in_stride_move_n], s[s_in_stride_n], 2
    s_mul_i32 s[s_out_stride_move_n], s[s_out_stride_n], 3
    s_lshl_b32 s[s_wei_stride_k], s[s_wei_stride_k], 1
    s_lshl_b32 s[s_knum], s[s_gemmk_per_wg], 2
    s_add_i32 s[s_knum], s[s_knum], 31
    s_lshr_b32 s[s_knum], s[s_knum], 5
    s_lshl_b32 s[s_knum], s[s_knum], 5

    ; start MFMA loop, 32x32 wave tile with 2x2 repeat, 1x1 step, k_pack:4
    s_waitcnt vmcnt(4)
    v_pack_b32_f16 v[v_tmp], v[v_gld_b], v[v_gld_b+4]
    v_pack_b32_f16 v[v_tmp+1], v[v_gld_b+8], v[v_gld_b+12]
    v_pack_b32_f16 v[v_tmp+2], v[v_gld_b], v[v_gld_b+4] op_sel:[1, 1]
    v_pack_b32_f16 v[v_tmp+3], v[v_gld_b+8], v[v_gld_b+12] op_sel:[1, 1]
    ds_write_b128 v[v_sst_b_os], v[v_tmp:v_tmp+3]
    v_pack_b32_f16 v[v_tmp], v[v_gld_b+1], v[v_gld_b+5]
    v_pack_b32_f16 v[v_tmp+1], v[v_gld_b+9], v[v_gld_b+13]
    v_pack_b32_f16 v[v_tmp+2], v[v_gld_b+1], v[v_gld_b+5] op_sel:[1, 1]
    v_pack_b32_f16 v[v_tmp+3], v[v_gld_b+9], v[v_gld_b+13] op_sel:[1, 1]
    ds_write_b128 v[v_sst_b_os], v[v_tmp:v_tmp+3] offset:16
    v_pack_b32_f16 v[v_tmp], v[v_gld_b+2], v[v_gld_b+6]
    v_pack_b32_f16 v[v_tmp+1], v[v_gld_b+10], v[v_gld_b+14]
    v_pack_b32_f16 v[v_tmp+2], v[v_gld_b+2], v[v_gld_b+6] op_sel:[1, 1]
    v_pack_b32_f16 v[v_tmp+3], v[v_gld_b+10], v[v_gld_b+14] op_sel:[1, 1]
    ds_write_b128 v[v_sst_b_os], v[v_tmp:v_tmp+3] offset:32
    v_pack_b32_f16 v[v_tmp], v[v_gld_b+3], v[v_gld_b+7]
    v_pack_b32_f16 v[v_tmp+1], v[v_gld_b+11], v[v_gld_b+15]
    v_pack_b32_f16 v[v_tmp+2], v[v_gld_b+3], v[v_gld_b+7] op_sel:[1, 1]
    v_pack_b32_f16 v[v_tmp+3], v[v_gld_b+11],


}

		if (num - arr[lo] <= arr[hi] - num)
			return lo;

		return hi;
	}

	function nonNullIdx(data, _i0, _i1, dir) {
		for (let i = dir == 1 ? _i0 : _i1; i >= _i0 && i <= _i1; i += dir) {
			if (data[i] != null)
				return i;
		}

		return -1;
	}

	function getMinMax(data, _i0, _i1, sorted) {
	//	console.log("getMinMax()");

		let _min = inf;
		let _max = -inf;

		if (sorted == 1) {
			_min = data[_i0];
			_max = data[_i1];
		}
		else if (sorted == -1) {
			_min = data[_i1];
			_max = data[_i0];
		}
		else {
			for (let i = _i0; i <= _i1; i++) {
				if (data[i] != null) {
					_min = min(_min, data[i]);
					_max = max(_max, data[i]);
				}
			}
		}

		return [_min, _max];
	}

	function getMinMaxLog(data, _i0, _i1) {
	//	console.log("getMinMax()");

		let _min = inf;
		let _max = -inf;

		for (let i = _i0; i <= _i1; i++) {
			if (data[i] > 0) {
				_min = min(_min, data[i]);
				_max = max(_max, data[i]);
			}
		}

		return [
			_min ==  inf ?  1 : _min,
			_max == -inf ? 10 : _max,
		];
	}

	const _fixedTuple = [0, 0];

	function fixIncr(minIncr, maxIncr, minExp, maxExp) {
		_fixedTuple[0] = minExp < 0 ? roundDec(minIncr, -minExp) : minIncr;
		_fixedTuple[1] = maxExp < 0 ? roundDec(maxIncr, -maxExp) : maxIncr;
		return _fixedTuple;
	}

	function rangeLog(min, max, base, fullMags) {
		let minSign = sign(min);

		let logFn = base == 10 ? log10 : log2;

		if (min == max) {
			if (minSign == -1) {
				min *= base;
				max /= base;
			}
			else {
				min /= base;
				max *= base;
			}
		}

		let minExp, maxExp, minMaxIncrs;

		if (fullMags) {
			minExp = floor(logFn(min));
			maxExp =  ceil(logFn(max));

			minMaxIncrs = fixIncr(pow(base, minExp), pow(base, maxExp), minExp, maxExp);

			min = minMaxIncrs[0];
			max = minMaxIncrs[1];
		}
		else {
			minExp = floor(logFn(abs(min)));
			maxExp = floor(logFn(abs(max)));

			minMaxIncrs = fixIncr(pow(base, minExp), pow(base, maxExp), minExp, maxExp);

			min = incrRoundDn(min, minMaxIncrs[0]);
			max = incrRoundUp(max, minMaxIncrs[1]);
		}

		return [min, max];
	}

	function rangeAsinh(min, max, base, fullMags) {
		let minMax = rangeLog(min, max, base, fullMags);

		if (min == 0)
			minMax[0] = 0;

		if (max == 0)
			minMax[1] = 0;

		return minMax;
	}

	const rangePad = 0.1;

	const autoRangePart = {
		mode: 3,
		pad: rangePad,
	};

	const _eqRangePart = {
		pad:  0,
		soft: null,
		mode: 0,
	};

	const _eqRange = {
		min: _eqRangePart,
		max: _eqRangePart,
	};

	// this ensures that non-temporal


= &publicNetwork
	} else {
		destination.PublicNetwork = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Initialize_From_SignalRNetworkACLs_STATUS populates our SignalRNetworkACLs from the provided source SignalRNetworkACLs_STATUS
func (acLs *SignalRNetworkACLs) Initialize_From_SignalRNetworkACLs_STATUS(source *SignalRNetworkACLs_STATUS) error {

	// DefaultAction
	if source.DefaultAction != nil {
		defaultAction := genruntime.ToEnum(string(*source.DefaultAction), aCLAction_Values)
		acLs.DefaultAction = &defaultAction
	} else {
		acLs.DefaultAction = nil
	}

	// IpRules
	if source.IpRules != nil {
		ipRuleList := make([]IPRule, len(source.IpRules))
		for ipRuleIndex, ipRuleItem := range source.IpRules {
			var ipRule IPRule
			err := ipRule.Initialize_From_IPRule_STATUS(&ipRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling Initialize_From_IPRule_STATUS() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		acLs.IpRules = ipRuleList
	} else {
		acLs.IpRules = nil
	}

	// PrivateEndpoints
	if source.PrivateEndpoints != nil {
		privateEndpointList := make([]PrivateEndpointACL, len(source.PrivateEndpoints))
		for privateEndpointIndex, privateEndpointItem := range source.PrivateEndpoints {
			var privateEndpoint PrivateEndpointACL
			err := privateEndpoint.Initialize_From_PrivateEndpointACL_STATUS(&privateEndpointItem)
			if err != nil {
				return eris.Wrap(err, "calling Initialize_From_PrivateEndpointACL_STATUS() to populate field PrivateEndpoints")
			}
			privateEndpointList[privateEndpointIndex] = privateEndpoint
		}
		acLs.PrivateEndpoints = privateEndpointList
	} else {
		acLs.PrivateEndpoints = nil
	}

	// PublicNetwork
	if source.PublicNetwork != nil {
		var publicNetwork NetworkACL
		err := publicNetwork.Initialize_From_NetworkACL_STATUS(source.PublicNetwork)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_NetworkACL_STATUS() to populate field PublicNetwork")
		}
		acLs.PublicNetwork = &publicNetwork
	} else {
		acLs.PublicNetwork = nil
	}

	// No error
	return nil
}

// Network ACLs for the resource
type SignalRNetworkACLs_STATUS struct {
	// DefaultAction: Azure Networking ACL Action.
	DefaultAction *ACLAction_STATUS `json:"defaultAction,omitempty"`

	// IpRules: IP rules for filtering public traffic
	IpRules []IPRule_STATUS `json:"ipRules,omitempty"`

	// PrivateEndpoints: ACLs for requests from private endpoints
	PrivateEndpoints []PrivateEndpointACL_STATUS `json:"privateEndpoints,omitempty"`

	// PublicNetwork: Network ACL
	PublicNetwork *NetworkACL_STATUS `json:"publicNetwork,omitempty"`
}

var _ genruntime.FromARMConverter = &SignalRNetworkACLs_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (acLs *SignalRNetworkACLs_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.SignalRNetworkACLs_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (acLs *SignalRNetworkACLs_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.SignalRNetworkACLs_STATUS)
	if !ok {


                        СправаНалевоСнизуВверх (RightLeft_BottomTop)
                        Текст направлен справа на лево и снизу вверх.
                        6

Смотрите также

Библиотека OneScriptTerminalGui

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <TITLE>MouseEnter Event</TITLE>
    <META content="text/html; charset=Windows-1252" http-equiv="Content-Type">
    <LINK rel="stylesheet" type="text/css" href="mainstyle.css">

Верхний.МышьНадЭлементом (Toplevel.MouseEnter) Событие

Использование

Чтение и запись.

Значение

Тип: Действие (Action).

Возвращает или задает код для события, когда указатель мыши находится над элементом.

Примечание

Аргументы события

                        Игрек (Y)
                        Возвращает координату Y для события мыши.

                        Икс (X)
                        Возвращает координату X для события мыши.


TIP-TODO",
    )
    degRotY_09: int = ParamField(
        int16, "degRotY_09", default=0,
        tooltip="TOOLTIP-TODO",
    )
    colR_09: int = ParamField(
        int16, "colR_09", default=255,
        tooltip="TOOLTIP-TODO",
    )
    colG_09: int = ParamField(
        int16, "colG_09", default=255,
        tooltip="TOOLTIP-TODO",
    )
    colB_09: int = ParamField(
        int16, "colB_09", default=255,
        tooltip="TOOLTIP-TODO",
    )
    colA_09: int = ParamField(
        int16, "colA_09", default=0,
        tooltip="TOOLTIP-TODO",
    )
    _Pad15: bytes = ParamPad(4, "pad_09[4]")


as any)[key][key2] += (source[key] as any)[key2] as number;
				}
			}
		}
	}

	/**
	 * Higher number = higher priority = it will be executed first
	 */
	private addGatherObjectivePriorities(result: IObjectivePriority, tree: IExecutionTree) {
		if (tree.objective instanceof GatherFromCreature) {
			result.totalGatherObjectives++;
			result.gatherObjectives.GatherFromCreature++;

		} else if (tree.objective instanceof GatherFromCorpse) {
			result.totalGatherObjectives++;
			result.gatherObjectives.GatherFromCorpse++;

		} else if (tree.objective instanceof GatherFromGround) {
			// gather items from the ground before terrain
			result.totalGatherObjectives++;
			result.gatherObjectives.GatherFromGround++;

		} else if (tree.objective instanceof GatherFromTerrainResource) {
			result.totalGatherObjectives++;
			result.gatherObjectives.GatherFromTerrainResource++;

		} else if (tree.objective instanceof GatherFromDoodad) {
			result.totalGatherObjectives++;
			result.gatherObjectives.GatherFromDoodad++;

		} else if (tree.objective instanceof GatherFromChest) {
			// gather from chest last, since the chests are likely in our base
			result.totalGatherObjectives++;
			result.gatherObjectives.GatherFromChest++;
		}
	}

	/**
	 * Higher number = higher priority = it will be executed first
	 */
	private addAcquireObjectivePriorities(result: IObjectivePriority, tree: IExecutionTree) {
		if (tree.objective.getName() === "UseProvidedItem") {
			result.useProvidedItemObjectives++;
		}

		// todo: convert to the new system if needed>?
		// if (tree.objective.getName() === "AcquireItemFromDisassemble") {
		// 	// this objective may be providing items used by others in the tree
		// 	// move this up
		// 	// todo: implement actual objective dependency system? ex: objective B requires objective A to be ran first
		// 	result.priority += 1000000;
		// }
	}

}
import Node from "../2/Node";

export default class SetOfStacks<T> {
  top: Node<T> | null;
  private _nextStacks: Node<T>[];
  capacity: number;
  counter: number;

  constructor(capacity: number) {
    this.top = null;
    this.capacity = capacity;
    this._nextStacks = [];
    this.counter = 0;
  }

  push(d: T): void {
    const newTop = new Node(d);
    if (this.counter >= this.capacity && this.top) {
      this._nextStacks.push(this.top);
      this.top = newTop;
      this.counter = 1;
    } else {
      newTop.appendToTail(this.top);
      this.counter++;
      this.top = newTop;
    }
  }

  pop(): T {
    if (!this.top) {
      throw new Error("The stack is empty");
    }

    const temp = this.top.data;
    this.top = this.top.next;
    this.counter--;

    if (!this.top && this._nextStacks.length > 0) {
      // we exhausted the current stack but have the ability to change to the next
      const newTop = this._nextStacks.pop();
      if (newTop) {
        // It is trivial to check but typescript keeps throwing me errors
        this.top = newTop;
        this.counter = this.capacity;
      }
    }
    return temp;
  }

  peek(): T {
    if (!this.top) {
      throw new Error("The stack is empty");
    }

    return this.top.data;
  }

  isEmpty(): boolean {
    return this.top ? false : true;
  }

  flatten(): T[] {
    if (!this.top) return [];
    let res: T[] = [];
    let next = this._nextStacks.pop();
    res = [...res, ...


f2, %f26		! Conversions
	fdtoi		%f2, %f28		! Conversions
	fdtos		%f2, %f30
	fxtos		%f20, %f10
	fxtos		%f26, %f12
	fxtod		%f20, %f14
	fxtod		%f26, %f16
	fitos		%f22, %f18
	fitos		%f28, %f8
	fitod		%f22, %f6
	fitod		%f28, %f4

	setx		user_scratch, %l0, %l5	! scratch
	stx		%fsr, [%l5+0x0]		! Test out fsr
	ldx		[%l5+0x0], %fsr		! Need to test the sync operation

	add		%g2, 0x1, %g2
	subcc		%g2, %g1, %g0

	bne,a		fsdtoix_denorm_loop	! If not 0, go to test more
        nop

	add		%g7, 0x1, %g7
	subcc		%g7, %g6, %g0

	bne,a		fsdtoix_rd_denorm_loop	! If not 0, go to test more
        nop

	! Normals
	! Put them in a loop

	setx		data1_norm, %l0, %l4	! Denorm sp
	setx		ddata1_norm, %l0, %l6	! Denorm dp

	set		0x4, %g6		! Max loop count rd
	set		0x0, %g7		! loop iterator

	fsdtoix_rd_norm_loop:			! Rounding mode loop

	sll		%g7, 0x2, %g5		! Align address
	ld		[%l3+%g5], %fsr		! Read it from memory - trap disabled

	set		0x20, %g1		! Max loop count
	set		0x0, %g2		! loop iterator

	fsdtoix_norm_loop:

	sll		%g2, 0x2, %g3		! Align address
	sll		%g2, 0x3, %g4		! Align address
	ld		[%l4+%g3], %f0		! single precision
	ldd		[%l6+%g4], %f2		! double precision

	fstox		%f0, %f20		! Conversions
	fstoi		%f0, %f22		! Conversions
	fstod		%f0, %f24
	fdtox		%f2, %f26		! Conversions
	fdtoi		%f2, %f28		! Conversions
	fdtos		%f2, %f30
	fxtos		%f20, %f10
	fxtos		%f26, %f12
	fxtod		%f20, %f14
	fxtod		%f26, %f16
	fitos		%f22, %f18
	fitos		%f28, %f8
	fitod		%f22, %f6
	fitod		%f28, %f4

	setx		user_scratch, %l0, %l5	! scratch
	stx		%fsr, [%l5+0x0]		! Test out fsr

	stx		%fsr, [%l5+0x0]		! Test out fsr
	ldx		[%l5+0x0], %fsr		! Need to test the sync operation

	add		%g2, 0x1, %g2
	subcc		%g2, %g1, %g0

	bne,a		fsdtoix_norm_loop	! If not 0, go to test more
        nop

	add		%g7


le mx-[20rpx] my-[30rpx] text-2xl font-medium"},{default:l((()=>[_(" 最新资讯 ")])),_:1}),(s(!0),d(f,null,u(c.article,(e=>(s(),n(b,{key:e.id,"news-id":e.id,item:e},null,8,["news-id","item"])))),128))])),_:1})):m("v-if",!0),r(x)])),_:1})}}}),[["__scopeId","data-v-074bd20a"]]);export{N as default};
import{o as e,c as t,w as i,b as n,p as o,q as a,E as r,h as s,k as c,z as l,d,aa as u,u as p,X as f,m,A as g,P as h,ac as v,a3 as y,ad as _,ae as S,Y as w,L as k,g as x,l as b,t as I,e as T,F as C,x as M,a9 as L,af as V,K as P,v as A,ag as B,ah as O,ai as N,r as U,a as E,i as W,y as R}from"./index.cfa79457.js";import{_ as D}from"./u-image.a2832593.js";import{_ as j}from"./u-icon.48804dd6.js";import{_ as J,a as Q}from"./u-form-item.fa4e8c2b.js";import{_ as z}from"./u-verification-code.bee3c9e7.js";import{_ as q}from"./u-form.bc14ea02.js";import{_ as $}from"./u-checkbox.4f7151e8.js";import{_ as F}from"./u-button.3c53a2f3.js";import{_ as Z}from"./plugin-vue_export-helper.21dcd24c.js";import{g as G,O as X,l as H}from"./account.55f2d7a8.js";import{S as K}from"./appEnums.a2ba827b.js";import{i as Y,a as ee}from"./client.68d036db.js";import{c as te}from"./util.f31571a8.js";var ie=Z({name:"u-divider",props:{halfWidth:{type:[Number,String],default:150},borderColor:{type:String,default:"#dcdfe6"},type:{type:String,default:"primary"},color:{type:String,default:"#909399"},fontSize:{type:[Number,String],default:26},bgColor:{type:String,default:"#ffffff"},height:{type:[Number,String],default:"auto"},marginTop:{type:[String,Number],default:0},marginBottom:{type:[String,Number],default:0},useSlot:{type:Boolean,default:!0}},computed:{lineStyle(){let e={};return-1!=String(this.halfWidth).indexOf("%")?e.width=this.halfWidth:e.width=this.halfWidth+"rpx",this.borderColor&&(e.borderColor=this.borderColor),e}},methods:{click(){this.$emit("click")}}},[["render",function(l,d,u,p,f,m){const g=c;return e(),t(g,{class:"u-divider",style:a({height:"auto"==u.height?"auto":u.height+"rpx",backgroundColor:u.bgColor,marginBottom:u.marginBottom+"rpx",marginTop:u.marginTop+"rpx"}),onClick:m.click},{default:i((()=>[n(g,{class:o(["u-divider-line",[u.type?"u-divider-line--bordercolor--"+u.type:""]]),style:a([m.lineStyle])},null,8,["class","style"


//===------ utils/obj2yaml.hpp - obj2yaml conversion tool -------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
// This file declares some helper routines, and also the format-specific
// writers. To add a new format, add the declaration here, and, in a separate
// source file, implement it.
//===----------------------------------------------------------------------===//

#ifndef LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H
#define LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H

#include "llvm/Object/COFF.h"
#include "llvm/Object/Wasm.h"
#include "llvm/Support/raw_ostream.h"
#include <system_error>

std::error_code coff2yaml(llvm::raw_ostream &Out,
                          const llvm::object::COFFObjectFile &Obj);
std::error_code elf2yaml(llvm::raw_ostream &Out,
                         const llvm::object::ObjectFile &Obj);
std::error_code macho2yaml(llvm::raw_ostream &Out,
                           const llvm::object::Binary &Obj);
std::error_code wasm2yaml(llvm::raw_ostream &Out,
                          const llvm::object::WasmObjectFile &Obj);

// Forward decls for dwarf2yaml
namespace llvm {
class DWARFContext;
namespace DWARFYAML {
struct Data;
}
}

std::error_code dwarf2yaml(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y);

#endif


strconv"
	"sync"
	"testing"
	"time"
)

//--------------------------------------
// Request Vote
//--------------------------------------

// Ensure that we can request a vote from a server that has not voted.
func TestServerRequestVote(t *testing.T) {
	server := newTestServer("1", &testTransporter{})

	server.Start()
	if _, err := server.Do(&DefaultJoinCommand{Name: server.Name()}); err != nil {
		t.Fatalf("Server %s unable to join: %v", server.Name(), err)
	}

	defer server.Stop()
	resp := server.RequestVote(newRequestVoteRequest(1, "foo", 1, 0))
	if resp.Term != 1 || !resp.VoteGranted {
		t.Fatalf("Invalid request vote response: %v/%v", resp.Term, resp.VoteGranted)
	}
}

// // Ensure that a vote request is denied if it comes from an old term.
func TestServerRequestVoteDeniedForStaleTerm(t *testing.T) {
	s := newTestServer("1", &testTransporter{})

	s.Start()
	if _, err := s.Do(&DefaultJoinCommand{Name: s.Name()}); err != nil {
		t.Fatalf("Server %s unable to join: %v", s.Name(), err)
	}

	s.(*server).mutex.Lock()
	s.(*server).currentTerm = 2
	s.(*server).mutex.Unlock()

	defer s.Stop()
	resp := s.RequestVote(newRequestVoteRequest(1, "foo", 1, 0))
	if resp.Term != 2 || resp.VoteGranted {
		t.Fatalf("Invalid request vote response: %v/%v", resp.Term, resp.VoteGranted)
	}
	if s.Term() != 2 && s.State() != Follower {
		t.Fatalf("Server did not update term and demote: %v / %v", s.Term(), s.State())
	}
}

// Ensure that a vote request is denied if we've already voted for a different candidate.
func TestServerRequestVoteDeniedIfAlreadyVoted(t *testing.T) {
	s := newTestServer("1", &testTransporter{})

	s.Start()
	if _, err := s.Do(&DefaultJoinCommand{Name: s.Name()}); err != nil {
		t.Fatalf("Server %s unable to join: %v", s.Name(), err)
	}

	s.(*server).mutex.Lock()
	s.(*server).currentTerm = 2
	s.(*server).mutex.Unlock()
	defer s.Stop()
	resp := s.RequestVote(newRequestVoteRequest(2, "foo", 1, 0))
	if resp.Term != 2 || !resp.VoteGranted {
		t.Fatalf("First vote should not have been denied")
	}
	resp = s.RequestVote(newRequestVoteRequest(2, "bar", 1, 0))
	if resp.Term != 2 || resp.VoteGranted {
		t.Fatalf("Second vote should have been denied")
	}
}

// Ensure that a vote request is approved if vote occurs in a new term.
func TestServerRequestVoteApprovedIfAlreadyVotedInOlderTerm(t *testing.T) {
	s := newTestServer("1", &testTransporter{})

	s.Start()
	if _, err := s.Do(&DefaultJoinCommand{Name: s.Name()}); err != nil {
		t.Fatalf("Server %s unable to join: %v", s.Name(), err)
	}

	time.Sleep(time.Millisecond * 100)

	s.(*server).mutex.Lock()
	s.(*server).currentTerm = 2
	s.(*server).mutex.Unlock()
	defer s.Stop()
	resp := s.RequestVote(newRequestVoteRequest(2, "foo", 2, 1))
	if resp.Term != 2 || !resp.VoteGranted || s.VotedFor() != "foo" {
		t.Fatalf("First vote should not have been denied")
	}
	resp = s.RequestVote(newRequestVoteRequest(3, "bar", 2, 1))

	if resp.Term != 3 || !resp.VoteGranted || s.VotedFor() != "bar" {


Err(AllocErr::Exhausted { request: new_layout })
        } else {
            Ok(ptr)
        }
    }
}
//! Plan: generational copying

pub(super) mod gc_work;
pub(super) mod global;
pub(super) mod mutator;

pub use self::global::GenCopy;
use super::barriers::BarrierSelector;

/// # Barrier overhead measurement:
///  - Set `FULL_NURSERY_GC` to `true`.
/// ## 1. Baseline: No barrier
///  - Set `ACTIVE_BARRIER` to `BarrierSelector::NoBarrier`.
/// ## 2. Object barrier
///  - Set `ACTIVE_BARRIER` to `BarrierSelector::ObjectBarrier`.
pub const ACTIVE_BARRIER: BarrierSelector = BarrierSelector::ObjectBarrier;
/// Full heap collection as nursery GC.
pub const FULL_NURSERY_GC: bool = false;
/// Force object barrier never enters the slow-path.
/// If enabled,
///  - `FULL_NURSERY_GC` must be `true`.
///  - `ACTIVE_BARRIER` must be `ObjectBarrier`.
pub const NO_SLOW: bool = false;

pub use self::global::GENCOPY_CONSTRAINTS;

#[cfg(feature = "side_gc_header")]
use crate::util::gc_byte;
use crate::util::side_metadata::*;

const LOGGING_META: SideMetadataSpec = SideMetadataSpec {
    scope: SideMetadataScope::Global,
    #[cfg(not(feature = "side_gc_header"))]
    offset: GLOBAL_SIDE_METADATA_BASE_ADDRESS.as_usize(),
    #[cfg(feature = "side_gc_header")]
    offset: GLOBAL_SIDE_METADATA_BASE_ADDRESS.as_usize()
        + metadata_address_range_size(gc_byte::SIDE_GC_BYTE_SPEC),
    log_num_of_bits: 0,
    log_min_obj_size: 3,
};
<reponame>lzm0/shadowsocks-rust
use std::{
    ffi::CString,
    io::{self, ErrorKind},
    mem,
    net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
    os::windows::io::{AsRawSocket, FromRawSocket, IntoRawSocket, RawSocket},
    pin::Pin,
    ptr,
    task::{self, Poll},
};

use log::{debug, error, warn};
use pin_project::pin_project;
use socket2::{Domain, Protocol, SockAddr, Socket, TcpKeepalive, Type};
use tokio::{
    io::{AsyncRead, AsyncWrite, ReadBuf},
    net::{TcpSocket, TcpStream as TokioTcpStream, UdpSocket},
};
use tokio_tfo::TfoStream;
use winapi::{
    ctypes::{c_char, c_int},
    shared::{
        minwindef::{BOOL, DWORD, FALSE, LPDWORD, LPVOID},
        netioapi::if_nametoindex,
        ntdef::PCSTR,
        ws2def::{IPPROTO_IP, IPPROTO_IPV6, IPPROTO_TCP},
        ws2ipdef::IPV6_UNICAST_IF,
    },
    um::{
        mswsock::SIO_UDP_CONNRESET,
        winsock2::{setsockopt, WSAGetLastError, WSAIoctl, SOCKET, SOCKET_ERROR},
    },
};

use crate::net::{sys::set_common_sockopt_for_connect, AddrFamily, ConnectOpts};

// ws2ipdef.h
// FIXME: Use winapi's definition if issue resolved
// https://github.com/retep998/winapi-rs/issues/856
const TCP_FASTOPEN: DWORD = 15;

// ws2ipdef.h
// https://github.com/retep998/winapi-rs/pull/1007
const IP_UNICAST_IF: DWORD = 31;

/// A `TcpStream` that supports TFO (TCP Fast Open)
#[pin_project(project = TcpStreamProj)]


ة الكهربائية، والاتصالات، والاعلام الالي، ومسح الأراضي، مساعدتي في تطوير مقالة دوال مثلثية بأخذ بعض المعلومات من الفارسية المختارة (قسم "التطبيقات") أو إضافة معلومات مهمة المفقودة، لترشيحها كمقالة مختارة، تحياتي.
إذا رغب أحدكم أن يُدخِل إضافات جديدة إلى المقالة، أدخلوها في ملعبي، تحياتي. -- Abdeldjalil09 (نقاش) 20:15، 14 مارس 2020 (ت ع م)

Reply to c-Abdeldjalil09-2020-03-14T20:15:00.000Z-Abdeldjalil09-2020-02-20T21:53:00.000Z

لقد اقترحت اقتراح في <a href="//ar.wikipedia.org/wiki/%D9%88%D9%8A%D9%83%D9%8A%D8%A8%D9%8A%D8%AF%D9%8A%D8%A7:%D8%A7%D9%84%D9%85%D9%8A%D8%AF%D8%A7%D9%86/%D8%A7%D9%82%D8%AA%D8%B1%D8%A7%D8%AD%D8%A7%D8%AA" title="


idx - 232) * 10 + 8;
			m_ColTab[idx] = RGB(r, g, b);
		} else if ( idx == EXTCOL_VT_TEXT_FORE ) {
			m_ColTab[idx] = m_DefColTab[m_DefAtt.std.fcol];
		} else if ( idx == EXTCOL_VT_TEXT_BACK ) {
			m_ColTab[idx] = m_DefColTab[m_DefAtt.std.bcol];
		}
		DISPUPDATE();

	} else if ( BinaryFind((void *)para, (void *)x11coltab, sizeof(struct _x11coltab), X11COLTABMAX, x11ColCmp, &n) ) {
		m_ColTab[idx] = x11coltab[n].code;
		DISPUPDATE();
	}
}
void CTextRam::ToHexStr(CBuffer &buf, CString &out)
{
	CBuffer res, hex;

	m_pDocument->m_TextRam.m_IConv.StrToRemote(m_pDocument->m_TextRam.m_SendCharSet[m_pDocument->m_TextRam.m_KanjiMode], &buf, &res);
	hex.Base16Encode(res.GetPtr(), res.GetSize());
	out = (LPCTSTR)hex;
}

//////////////////////////////////////////////////////////////////////
// fc Procs...

void CTextRam::fc_IGNORE(DWORD ch)
{
	fc_KANJI(ch);
}
void CTextRam::fc_POP(DWORD ch)
{
	if ( m_StPos > 0 )
		fc_Case(m_Stack[--m_StPos]);
}
void CTextRam::fc_SESC(DWORD ch)
{
	if ( IsOptEnable(TO_RLC1DIS) ) {
		int bank = m_BankTab[m_KanjiMode][m_BankSG >= 0 ? m_BankSG : m_BankGR] & SET_MASK;
		if ( bank <= SET_96 )
			fc_TEXT(ch);
		else {
			fc_KANJI(ch);
			if ( IsOptEnable(TO_RLBRKMBCS) )
				fc_KANBRK();
			if ( IsOptEnable(TO_RLKANAUTO) )
				fc_KANCHK();
		}
	} else {
		fc_KANJI(ch);

		ch &= 0x1F;
		ch += '@';
		fc_Push(STAGE_ESC);
		fc_RenameCall(ch);
	}
}
void CTextRam::fc_CESC(DWORD ch)
{
	fc_POP(ch);		// STAGE_ESC pop
	fc_SESC(ch);
}

//////////////////////////////////////////////////////////////////////
// fc KANJI

static const WORD UnDefCp932[] = {	// 47
	0x81AD, 0x81B8, 0x81C0, 0x81C8, 0x81CF, 0x81DA, 0x81E9, 0x81F0,
	0x81F8, 0x81FC, 0x8240, 0x824F, 0x8259, 0x8260, 0x827A, 0x8281,
	0x829B, 0x829F, 0x82F2, 0x8340, 0x8397, 0x839F, 0x83B7, 0x83BF,
	0x83D7, 0x8440, 0x8461, 0x8470, 0x8492, 0x849F, 0x84BF, 0x8740,
	0x875E, 0x875F, 0x8776, 0x877E, 0x879D, 0x889F, 0x9873, 0x989F,
	0xEAA5, 0xED40, 0xEEED, 0xEEEF, 0xEF40, 0xF040, 0xFC4C,
};
static const WORD UnDefEuc1[] = {	// 42	EUCJP-MS-1
	0xA2AF, 0xA2BA, 0xA2C2, 0xA2CA, 0xA2


droid.build.gradle.internal.services.getBuildServiceName
import com.android.build.gradle.internal.tasks.MergeFileTask
import com.android.build.gradle.internal.utils.setDisallowChanges
import com.kotlin.model.ActivityGuardExtension
import org.gradle.api.Project
import org.gradle.api.provider.Provider
import org.gradle.api.services.BuildService
import org.gradle.api.services.BuildServiceParameters
import org.gradle.api.services.BuildServiceRegistry
import org.gradle.configurationcache.extensions.capitalized
import org.gradle.kotlin.dsl.register
import util.fileToClassMappingMap
import util.invokeOverloadedMethod

/**
 * Created by DengLongFei
 * 2024/12/27
 */
class ActivityGuardPlugin86 {
    fun apply(project: Project) {
        val actGuard = project.extensions.create("actGuard", ActivityGuardExtension::class.java)
            ?: ActivityGuardExtension()
        project.plugins.withType(AppPlugin::class.java) {

            val androidComponents =
                project.extensions.getByType(ApplicationAndroidComponentsExtension::class.java)
            androidComponents.onVariants { variant ->

                if (!actGuard.isEnable) {
                    println("activityGuard:Not executed, please open actGuard.enable ")
                    return@onVariants
                }
                if (!variant.isMinifyEnabled) {
                    println("activityGuard:Not executed, please open isMinifyEnabled ")
                    return@onVariants
                }
                val artifacts = if (variant.artifacts is AnalyticsEnabledArtifacts) {
                    (variant.artifacts as AnalyticsEnabledArtifacts).delegate as ArtifactsImpl
                } else {
                    variant.artifacts as ArtifactsImpl
                }
                println("activityGuard: start executed...")
                val variantName = variant.name.capitalized()
                //bundle 资源
                val bundleTask =
                    project.tasks.register<ActivityGuardBundleTask>("activityGuard${variantName}BundleTask")
                bundleTask.configure {
                    it.bundleResFiles.set(artifacts.get(InternalArtifactType.LINKED_RESOURCES_FOR_BUNDLE_PROTO_FORMAT))
                    it.aaptProguardFile.set(artifacts.get(InternalArtifactType.AAPT_PROGUARD_FILE))
                    project.layout.buildDirectory.file(
                        "intermediates/activityGuardBundleResTask/" +
                                "${variantName}/mapping.txt"
                    ).also { file ->
                        it.outputFile.set(file)
                    }

                }
                //apk 资源
                val apkTask =
                    project.tasks.register<ActivityGuardApkTask>("activityGuard${variantName}ApkTask")

                var request = variant.artifacts.use(apkTask)
                    .wiredWithDirectories(
                        ActivityGuardApkTask::inputProcessedRes,
                        ActivityGuardApkTask::outputProcessedRes
                    )
                request = if (request is AnalyticsEnabledInAndOutDirectoryOperationRequest) {
                    request.delegate as InAndOutDirectoryOperationRequestImpl
                } else {
                    request as InAndOutDirectoryOperationRequestImpl
                }
                val transformationRequest = invokeOverloadedMethod(
                    request,
                    "toTransformMany",
                    parameterTypes = listOf("ArtifactTypeT"),
                    InternalArtifactType.LINKED_RESOURCES_BINARY_FORMAT
                ) as ArtifactTransformationRequest<ActivityGuardApkTask>

                apkTask.configure


and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holders nor the names of its
//    contributors may be used to endorse or promote products derived from
//    this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
package jersey.repackaged.org.objectweb.asm;

/**
 * A {@link ClassVisitor} that generates a corresponding ClassFile structure, as defined in the Java
 * Virtual Machine Specification (JVMS). It can be used alone, to generate a Java class "from
 * scratch", or with one or more {@link ClassReader} and adapter {@link ClassVisitor} to generate a
 * modified class from one or more existing Java classes.
 *
 * @see JVMS 4
 * @author Eric Bruneton
 */
public class ClassWriter extends ClassVisitor {

  /**
   * A flag to automatically compute the maximum stack size and the maximum number of local
   * variables of methods. If this flag is set, then the arguments of the {@link
   * MethodVisitor#visitMaxs} method of the {@link MethodVisitor} returned by the {@link
   * #visitMethod} method will be ignored, and computed automatically from the signature and the
   * bytecode of each method.
   *
   *
Note: for classes whose version is {@link Opcodes#V1_7} of more, this option requires
   * valid stack map frames. The maximum stack size is then computed from these frames, and from the
   * bytecode instructions in between. If stack map frames are not present or must be recomputed,
   * used {@link #COMPUTE_FRAMES} instead.
   *
   * @see #ClassWriter(int)
   */
  public static final int COMPUTE_MAXS = 1;

  /**
   * A flag to automatically compute the stack map frames of methods from scratch. If this flag is
   * set, then the calls to the {@link MethodVisitor#visitFrame} method are ignored, and the stack
   * map frames are recomputed from the methods bytecode. The arguments of the {@link
   * MethodVisitor#visitMaxs} method are also ignored and recomputed from the bytecode. In other
   * words, {@link #COMPUTE_FRAMES} implies {@link #COMPUTE_MAXS}.
   *
   * @see #ClassWriter(int)
   */
  public static final int COMPUTE_FRAMES = 2;

  /**
   * The flags passed to the constructor. Must be zero or more of {@link #COMPUTE_MAXS} and {@link
   * #COMPUTE_FRAMES}.
   */
  private final int flags;

  // Note: fields are ordered as in the ClassFile structure, and those related to attributes are
  // ordered as in Section 4.7 of the JVMS.

  /**
   * The minor_version and major_version fields of the JVMS ClassFile structure. minor_version is
   * stored in the 16 most significant bits, and major_version in the 16 least significant bits.
   */
  private int version;

  /** The symbol table for this class (contains the constant_pool and the BootstrapMethods). */
  private final SymbolTable symbolTable;

  /**
   * The access_flags field of the JVMS ClassFile structure. This field can contain ASM specific
   * access flags, such as {@link Opcodes#ACC_DEPRECATED


over {
      background: transparent;
    }
  }

  &-icon__open {
    margin-right  : 2px;
    vertical-align: top;
  }

  &-icon__close {
    margin-right  : 2px;
    vertical-align: top;
  }

  // Tree with line
  &&-show-line {
    li {
      position: relative;

      span {
        &.@{tree-prefix-cls}-switcher {
          color     : @tree-showline-icon-color;
          background: @component-background;

          &.@{tree-prefix-cls}-switcher-noop {
            .antTreeShowLineIcon('tree-doc-icon');
          }

          &.@{tree-prefix-cls}-switcher_open {
            .antTreeShowLineIcon('tree-showline-open-icon');
          }

          &.@{tree-prefix-cls}-switcher_close {
            .antTreeShowLineIcon('tree-showline-close-icon');
          }
        }
      }
    }

    li:not(:last-child)::before {
      position   : absolute;
      left       : 12px;
      width      : 1px;
      height     : 100%;
      height     : calc(100% - 22px); // Remove additional height if support
      margin     : 22px 0 0;
      border-left: 1px solid @border-color-base;
      content    : ' ';
    }
  }

  &.@{tree-prefix-cls}-icon-hide {
    .@{tree-prefix-cls}-treenode-loading {
      .@{tree-prefix-cls}-iconEle {
        display: none;
      }
    }
  }

  &.@{tree-prefix-cls}-block-node {
    li {
      .@{tree-prefix-cls}-node-content-wrapper {
        width: ~'calc(100% - 24px)';
      }

      span {
        &.@{tree-prefix-cls}-checkbox {
          +.@{tree-prefix-cls}-node-content-wrapper {
            width: ~'calc(100% - 46px)';
          }
        }
      }
    }
  }
}@font-face {
  font-family: "iconfont"; /* Project id 3342903 */
  src: url('iconfont.woff2?t=1650561247483') format('woff2'),
       url('iconfont.woff?t=1650561247483') format('woff'),
       url('iconfont.ttf?t=1650561247483') format('truetype');
}

.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-jine:before {
  content: "\e658";
}

.icon-zoushitu:before {
  content: "\e6fe";
}

.icon-youhuiquan1:before {
  content: "\34231";
}

.icon-shouhou:before {
  content: "\e681";
}

.icon-tongjifenxi-xiangmubiaogetongji:before {
  content: "\e626";
}

.icon-meifumofabang:before {
  content: "\e740";
}

.icon-yonghu-copy:before {
  content: "\e8b0";
}

.icon-yonghu:before {
  content: "\e638";
}

.icon-shangpin-copy-copy:before {
  content: "\e8b1";
}

.icon-dingdan-copy:before {
  content: "\e8b2";
}

.icon-xiaofeizhe:before {
  content: "\e601";
}

.icon-dingdan:before {
  content: "\e8ae";
}

.icon-shangpin-copy:before {
  content: "\e8af";
}

ol,
ul,
dl {
  margin: 0;
  padding: 0;
}

// diy手机
.phone-content {
  position: absolute !important;
  left: 34%;
  width: 377px;
  margin-top: 25px;
  border-radius: 3px


// Copyright (c) Jeremy W. Kuhne. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace WInterop.DirectWrite;

/// <summary>
///  Represents the internal structure of a device pixel (i.e., the physical arrangement of red,
///  green, and blue color components) that is assumed for purposes of rendering text.
///  [DWRITE_PIXEL_GEOMETRY]
/// </summary>
public enum PixelGeometry
{
    /// <summary>
    ///  The red, green, and blue color components of each pixel are assumed to occupy the same point.
    ///  [DWRITE_PIXEL_GEOMETRY_FLAT]
    /// </summary>


,-0.15648 -0.25338,-0.74104 0.0256,-0.33187 -0.25569,0.0244 -0.1534,0.32197 -0.19989,0.15459 -0.0649,-0.11629 0.12105,-0.29298 0.0745,-0.48826 0.0707,-0.25416 -0.27363,8.3e-4 -0.0744,-0.18666 0.16777,-0.0265 0.0701,-0.003 -0.007,-0.35749 -0.007,-0.27999 0.36914,-0.48435 0.6907,-0.0733 1.01361,0.0881 0.14681,-0.71503"},"51181":{"name":"Surry, VA","path":"m 871.18806,296.55567 0.25646,0.0615 0.3132,-0.17265 0.1082,-0.59121 0.10191,-0.1799 -0.0534,-0.2153 0.13667,-0.18427 0.48747,0.35776 -0.0866,0.31351 0.13112,0.58211 -0.15453,1.85852 -2.37382,2.11744 -1.61528,1.551 -0.48316,-1.223 -0.20216,-0.82512 0.0745,-0.27063 -0.067,-0.1757 -0.27622,-0.0284 -0.25555,0.18967 -0.97081,-0.30222 -0.0738,0.2341 -0.49237,0.0285 -0.12249,-0.40614 -0.42765,0.0562 -0.29818,-0.23044 -0.57318,0.003 -0.21044,-0.13473 1.21797,-2.11369 0.75693,-0.37256 0.0911,-0.52051 0.10371,-0.14952 0.30957,-0.44584 0.27802,0.0242 0.39822,0.0712 0.93062,0.52843 0.50991,-0.2799 1.28103,-0.26255 0.0421,0.36757 0.33734,-0.0322 0.23517,0.30901 0.30268,0.0961 z"},"51183":{"name":"Sussex, VA","path":"m 864.06074,298.97514 0.21044,0.13473 0.57318,-0.003 0.29818,0.23044 0.42765,-0.0562 0.12249,0.40614 0.49237,-0.0285 0.0738,-0.2341 0.97081,0.30222 0.25555,-0.18967 0.27622,0.0284 0.067,0.1757 -0.0745,0.27063 0.20216,0.82512 0.48316,1.223 -7.46488,7.096 -1.1339,-0.1 -0.21425,-3.3179 -0.61524,0.41853 -0.5991,-0.0173 -0.55068,0.19256 -0.63113,-0.3422 -0.40269,-0.0437 3.43202,-3.393 3.80108,-3.576"},"51149":{"name":"Prince George, VA","path":"m 861.70192,295.01896 0.18734,-0.11813 -0.0163,-0.25341 0.25414,0.11564 0.20368,-0.0516 0.069,0.31292 0.21797,0.11974 0.21685,-0.0743 0.19031,-0.27806 0.21984,-0.007 0.0863,-0.12749 0.19739,-0.0115 0.23023,7.4e-4 0.30006,-0.1655 0.15153,-0.255 0.12


768, 32767] -> float [-1.0, 1.0)
 *              - To keep memory small and GC quiet:
 *                  * One 65,536-entry value LUT for short→float mapping
 *                  * Compact sin/cos LUTs of length bestLength for the NCO
 *                  * No per-(t, value) 2D tables (would be huge for 16-bit)
 *
 * @author Dennis Mantz
 *
 * Copyright (C) 2025 Dennis Mantz
 * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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 library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

class Signed16BitIQConverter : IQConverter() {

    // 16-bit normalization table: index is the unsigned short (0..65535),
    // value is mapped float in ~[-1.0, 1.0)
    private lateinit var lookupTable16: FloatArray

    // Per-time-step oscillator lookup (compact)
    private var cosLut: FloatArray? = null
    private var sinLut: FloatArray? = null

    override fun generateLookupTable() {
        // Build once; ~256 KB, fine for Android and avoids per-sample math
        val lut = FloatArray(65536)
        // Map u16 -> s16 -> float; dividing by 32768f matches typical SDR scaling
        //   -32768 / 32768f = -1.0f
        //    32767 / 32768f ≈  0.99997f
        for (u in 0 until 65536) {
            val s = (u.toShort()).toInt() // sign-extend to 32-bit int
            lut[u] = s / 32768.0f
        }
        lookupTable16 = lut
    }

    override fun generateMixerLookupTable(mixFrequencyIn: Int) {
        var mixFrequency = mixFrequencyIn
        // If mix frequency is too low, just add the sample rate (sampled spectrum is periodic):
        if (mixFrequency == 0 || (sampleRate / kotlin.math.abs(mixFrequency) > MAX_COSINE_LENGTH)) {
            mixFrequency += sampleRate
        }

        // Only regenerate if needed
        if (cosLut == null || mixFrequency != cosineFrequency) {
            cosineFrequency = mixFrequency
            val bestLength = calcOptimalCosineLength()

            val cosArr = FloatArray(bestLength)
            val sinArr = FloatArray(bestLength)
            val twoPiFOverFs = (2.0 * Math.PI * cosineFrequency) / sampleRate.toDouble()

            var t = 0
            while (t < bestLength) {
                val angle = twoPiFOverFs * t
                cosArr[t] = kotlin.math.cos(angle).toFloat()
                sinArr[t] = kotlin.math.sin(angle).toFloat()
                t++
            }

            cosLut = cosArr
            sinLut = sinArr
            cosineIndex = 0
        }
    }

    override fun fillPacketIntoSamplePacket(packet: ByteArray, samplePacket: SamplePacket): Int {
        val capacity = samplePacket.capacity()
        val startIndex = samplePacket.size()
        if (startIndex >= capacity) return 0

        val re = samplePacket.re()
        val im = samplePacket.im()
        val lut = lookupTable16
        val pkt = packet

        var count = 0
        var i = 0
        val pktEnd = pkt.size
        var outIdx = startIndex

        // Each complex sample: 4 bytes (Ilo, Ihi, Qlo, Qhi)
        while


> instance; \
        REGISTER_BENCHMARK(benchmarks, bytes, seed, stream, instance);                \
    }

#define CREATE_UNIQUE_BY_KEY_BENCHMARK(K, V, p)                                                 \
    {                                                                                \
        const device_select_unique_by_key_benchmark<K, V, rocprim::default_config, p> instance; \
        REGISTER_BENCHMARK(benchmarks, bytes, seed, stream, instance);                          \
    }

#define BENCHMARK_SELECT_PREDICATED_FLAG_TYPE(type, value)                          \
    CREATE_SELECT_PREDICATED_FLAG_BENCHMARK(type, value, select_probability::p005); \
    CREATE_SELECT_PREDICATED_FLAG_BENCHMARK(type, value, select_probability::p025); \
    CREATE_SELECT_PREDICATED_FLAG_BENCHMARK(type, value, select_probability::p050); \
    CREATE_SELECT_PREDICATED_FLAG_BENCHMARK(type, value, select_probability::p075)

#define BENCHMARK_SELECT_FLAG_TYPE(type, value)                          \
    CREATE_SELECT_FLAG_BENCHMARK(type, value, select_probability::p005); \
    CREATE_SELECT_FLAG_BENCHMARK(type, value, select_probability::p025); \
    CREATE_SELECT_FLAG_BENCHMARK(type, value, select_probability::p050); \
    CREATE_SELECT_FLAG_BENCHMARK(type, value, select_probability::p075)

#define BENCHMARK_SELECT_PREDICATE_TYPE(type)                          \
    CREATE_SELECT_PREDICATE_BENCHMARK(type, select_probability::p005); \
    CREATE_SELECT_PREDICATE_BENCHMARK(type, select_probability::p025); \
    CREATE_SELECT_PREDICATE_BENCHMARK(type, select_probability::p050); \
    CREATE_SELECT_PREDICATE_BENCHMARK(type, select_probability::p075)

#define BENCHMARK_UNIQUE_TYPE(type)                          \
    CREATE_UNIQUE_BENCHMARK(type, select_probability::p005); \
    CREATE_UNIQUE_BENCHMARK(type, select_probability::p025); \
    CREATE_UNIQUE_BENCHMARK(type, select_probability::p050); \
    CREATE_UNIQUE_BENCHMARK(type, select_probability::p075)

#define BENCHMARK_UNIQUE_BY_KEY_TYPE(K, V)                          \
    CREATE_UNIQUE_BY_KEY_BENCHMARK(K, V, select_probability::p005); \
    CREATE_UNIQUE_BY_KEY_BENCHMARK(K, V, select_probability::p025); \
    CREATE_UNIQUE_BY_KEY_BENCHMARK(K, V, select_probability::p050); \
    CREATE_UNIQUE_BY_KEY_BENCHMARK(K, V, select_probability::p075)

int main(int argc, char* argv[])
{
    cli::Parser parser(argc, argv);
    parser.set_optional<size_t>("size", "size", DEFAULT_BYTES, "number of bytes");
    parser.set_optional<int>("trials", "trials", -1, "number of iterations");
    parser.set_optional<std::string>("name_format",
                                     "name_format",
                                     "human",
                                     "either: json,human,txt");
    parser.set_optional<std::string>("seed", "seed", "random", get_seed_message());
#ifdef BENCHMARK_CONFIG_TUNING
    // optionally run an evenly split subset of benchmarks, when making multiple program invocations
    parser.set_optional<int>("parallel_instance",
                             "parallel_instance",
                             0,


s u64);

    let mut current_scene: Box<dyn Scene> =
        Box::new(MainMenuScene::new(only_exit_to_xochitl, false));

    loop {
        let before_input = SystemTime::now();
        for event in input_rx.try_iter() {
            current_scene.on_input(event);
        }

        current_scene.draw(&mut canvas);
        current_scene = update(current_scene, &mut canvas, only_exit_to_xochitl);

        // Wait remaining frame time
        let elapsed = before_input.elapsed().unwrap();
        if elapsed < FRAME_DURATION {
            sleep(FRAME_DURATION - elapsed);
        }
    }
}

fn update(
    scene: Box<dyn Scene>,
    canvas: &mut Canvas,
    only_exit_to_xochitl: bool,
) -> Box<dyn Scene> {
    if let Some(game_scene) = scene.downcast_ref::<GameScene>() {
        if game_scene.back_button_pressed {
            return Box::new(MainMenuScene::new(only_exit_to_xochitl, false));
        }
    } else if let Some(main_menu_scene) = scene.downcast_ref::<MainMenuScene>() {
        let pvp_rot_en = main_menu_scene.pvp_piece_rotation_enabled;
        if main_menu_scene.play_pvp_button_pressed {
            return Box::new(BoardSelectScene::new(GameMode::PvP, pvp_rot_en));
        } else if main_menu_scene.play_easy_button_pressed {
            return Box::new(BoardSelectScene::new(GameMode::EasyBot, pvp_rot_en));
        } else if main_menu_scene.play_normal_button_pressed {
            return Box::new(BoardSelectScene::new(GameMode::NormalBot, pvp_rot_en));
        } else if main_menu_scene.play_hard_button_pressed {
            return Box::new(BoardSelectScene::new(GameMode::HardBot, pvp_rot_en));
        } else if main_menu_scene.viewer_button_pressed {
            return Box::new(PgnSelectScene::new(None));
        } else if main_menu_scene.exit_xochitl_button_pressed {
            canvas.clear();
            canvas.update_full();
            Command::new("systemctl")
                .arg("start")
                .arg("xochitl")
                .status()
                .ok();
            std::process::exit(0);
        } else if main_menu_scene.exit_button_pressed {
            canvas.clear();
            canvas.update_full();
            std::process::exit(0);
        }
    } else if let Some(board_select_scene) = scene.downcast_ref::<BoardSelectScene>() {
        if board_select_scene.select_slot_1_button_pressed {
            return Box::new(GameScene::new(
                board_select_scene.selected_gamemode,
                SavestateSlot::First,
                board_select_scene.pvp_piece_rotation_enabled,
            ));
        } else if board_select_scene.select_slot_2_button_pressed {
            return Box::new(GameScene::new(
                board_select_scene.selected_gamemode,
                SavestateSlot::Second,
                board_select_scene.pvp_piece_rotation_enabled,
            ));
        } else if board_select_scene.select_slot_3_button_pressed {
            return Box::new(GameScene::new(
                board_select_scene.selected_gamemode,
                SavestateSlot::Third,
                board_select_scene.pvp_piece_rotation_enabled,
            ));
        } else if board_select_scene.reset_slot_


/WWE-000000.svg?style=for-the-badge&logo=WWE&logoColor=white

[3273]: https://img.shields.io/badge/Wwise-00549F.svg?style=for-the-badge&logo=Wwise&logoColor=white

[3274]: https://img.shields.io/badge/WXT-67D55E.svg?style=for-the-badge&logo=WXT&logoColor=white

[3275]: https://img.shields.io/badge/Wykop-367DA9.svg?style=for-the-badge&logo=Wykop&logoColor=white

[3276]: https://img.shields.io/badge/Wyze-1DF0BB.svg?style=for-the-badge&logo=Wyze&logoColor=white

X

|
[![Alt][3278]][3278]
X.Org
 |
[![Alt][3279]][3279]
XAMPP
    |
[![Alt][3280]][3280]
Xcode
 |
[![Alt][3281]][3281]
XDA Developers
 |
[![Alt][3282]][3282]
Xendit
 |
[![Alt][3283]][3283]
Xero
  |
| :----------------------------------: | :----------------------------------------: | :-----------------------------------: | :-------------------------------------------: | :------------------------------------: | :-----------------------------------: |
|
[![Alt][3284]][3284]
XFCE
 |
[![Alt][3285]][3285]
Xiaohongshu
 |
[![Alt][3286]][3286]
Xiaomi
 |
[![Alt][3287]][3287]
Xing
      |
[![Alt][3288]][3288]
XML
   |
[![Alt][3289]][3289]
XMPP
  |
|
[![Alt][3290]][3290]
XO
  |
[![Alt][3291]][3291]
XRP
     |
[![Alt][3292]][3292]
XSplit
 |
[![Alt][3293]][3293]
XState
     |
[![Alt][3294]][3294]
Xubuntu
 |
[![Alt][3295]][3295]
xyflow
 |

[3278]: https://img.shields.io/badge/X.Org-F28834.svg?style=for-the-badge&logo=xdotorg&logoColor=white

[3279]: https://img.shields.io/badge/XAMPP-FB7A24.svg?style=for-the-badge&logo=XAMPP&logoColor=white

[3280]: https://img.shields.io/badge/Xcode-147EFB.svg?style=for-the-badge&logo=Xcode&logoColor=white

[3281]: https://img.shields.io/badge/XDA%20Developers-EA7100.svg?style=for-the-badge&logo=XDA-Developers&logoColor=white

[3282]: https://img.shields.io/badge/Xendit-4573FF.svg?style=for-the-badge&logo=Xendit&logoColor=white

[3283]: https://img.shields.io/badge/Xero-13B5EA.svg?style=for-the-badge&logo=Xero&logoColor=white

[3284]: https://img.shields.io/badge/XFCE-2284F2.svg?style=for-the-badge&logo=XFCE&logoColor=white

[3285]: https://img.shields.io/badge/Xiaohongshu-FF2442.svg?style=for-the-badge


="white-space: nowrap;" class="col1"> 'nohistory'	 Don't keep history.

 'joseph'	 Use Joseph form for covariance

'dim', D	 Dimension of the robot's workspace.

D scalar; X: -D to +D, Y: -D to +D

D (1x2); X: -D(1) to +D(1), Y: -D(2) to +D(2)

D (1x4); X: D(1) to D(2), Y: D(3) to D(4)

Notes

If MAP is [] then it will be estimated.

If V_EST and P0 are [] the vehicle is assumed error free and
the filter will only estimate the landmark positions (map).

If V_EST and P0 are finite the filter will estimate the
vehicle pose and the landmark positions (map).

EKF subclasses Handle, so it is a reference object.

Dimensions of workspace are normally taken from the map if given.

See also

Vehicle, Bicycle, Unicycle, Sensor, RangeBearingSensor, LandmarkMap

EKF.char

Convert to string

E.char() is a string representing the state of the EKF
object in human-readable form.

See also

EKF.display

EKF.display

Display status of EKF object

E.display() displays the state of the EKF object in
human-readable form.

Notes

This method is invoked implicitly at the command line when the result
of an expression is a EKF object and the command has no trailing
semicolon.

See also

EKF.char

EKF.get_map

Get landmarks

p = E.get_map() is the estimated landmark coordinates (2xN) one per
column.  If the landmark was not estimated the corresponding column
contains NaNs.

See also

EKF.plot_map, EKF.plot_ellipse

EKF.get_P

Get


         Oidb0x6d7.ReqBody.serializer(),
//                Oidb0x6d7.ReqBody(
//                    moveFolderReq = Oidb0x6d7.MoveFolderReqBody(
//                        groupCode = groupCode,
//                        appId = 3,
//                        folderId = folderId,
//                        parentFolderId = parentFolderId,
//                        destFolderId = newParentFolderId,
//                    )
//                )
//            )
//        }
//
//        override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): CommonOidbResponse<Oidb0x6d7.MoveFolderRspBody> {
//            return readOidbRespCommon(Oidb0x6d7.RspBody.serializer()) { it.moveFolderRsp!! }
//        }
//    }

    object DeleteFolder : OutgoingPacketFactory<CommonOidbResponse<Oidb0x6d7.DeleteFolderRspBody>>("OidbSvc.0x6d7_1") {
        operator fun invoke(
            client: QQAndroidClient,
            groupCode: Long,
            folderId: String,
        ) = buildOutgoingUniPacket(client) {
            writeOidb(
                command = 1751,
                serviceType = 1,
                Oidb0x6d7.ReqBody.serializer(),
                Oidb0x6d7.ReqBody(
                    deleteFolderReq = Oidb0x6d7.DeleteFolderReqBody(
                        groupCode = groupCode,
                        appId = 3,
                        folderId = folderId,
                    )
                )
            )
        }

        override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): CommonOidbResponse<Oidb0x6d7.DeleteFolderRspBody> {
            return readOidbRespCommon(Oidb0x6d7.RspBody.serializer()) { it.deleteFolderRsp!! }
        }
    }

    object CreateFolder : OutgoingPacketFactory<CommonOidbResponse<Oidb0x6d7.CreateFolderRspBody>>("OidbSvc.0x6d7_0") {
        operator fun invoke(
            client: QQAndroidClient,
            groupCode: Long,
            parentFolderId: String,
            name: String
        ) = buildOutgoingUniPacket(client) {
            writeOidb(
                command = 1751,
                serviceType = 0,
                Oidb0x6d7.ReqBody.serializer(),
                Oidb0x6d7.ReqBody(
                    createFolderReq = Oidb0x6d7.CreateFolderReqBody(
                        groupCode = groupCode,
                        appId = 3,
                        parentFolderId = parentFolderId,
                        folderName = name,
                    )
                )
            )
        }

        override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): CommonOidbResponse<Oidb0x6d7.CreateFolderRspBody> {
            return readOidbRespCommon(Oidb0x6d7.RspBody.serializer()) { it.createFolderRsp!! }
        }
    }
}/*
 * Copyright 2019-2022 Mamoe Technologies and contributors.
 *
 * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
 * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
 *
 * https://github.com/mamoe/mirai/blob/dev/LICENSE
 */

@file:Suppress("unused", "SpellCheckingInspection")

package net.mamoe.mirai.internal.network.protocol.data.proto

import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import net.mamoe.mirai.internal.utils.io.ProtoBuf
import net.mamoe.mirai.utils.EMPTY_BYTE_ARRAY
import kotlin.jvm.JvmField

@Serializable
internal class Oidb0xeac : ProtoBuf {
    @Serializable


port init_model_and_transform

model_name = "phi35V"
base_model_path="DeepGlint-AI/UniME-Phi3.5-V-4.2B"

if model_name == "phi35V":
    img_prompt = '<|user|>\n<|image_1|>\nSummary above image in one word: <|end|>\n<|assistant|>\n'
    text_prompt = '<|user|>\n<sent>\nSummary above sentence in one word: <|end|>\n<|assistant|>\n'
elif model_name == "llava_16":
    img_prompt = "[INST] <image>\nSummary above image in one word: [/INST]"
    text_prompt = "[INST] <sent>\nSummary above sentence in one word: [/INST]"

text = "A man is crossing the street with a red car parked nearby."
image_path = "figures/demo.png"
input_texts = text_prompt.replace('<sent>', text)
input_image_prompt = img_prompt
input_image = [Image.open(image_path)]

model, transform = init_model_and_transform(model_name, base_model_path)
inputs_text = transform(text=input_texts,
                    images=None,
                    return_tensors="pt",
                    padding=True)
for key in inputs_text: inputs_text[key] = inputs_text[key].to("cuda")
inputs_image = transform(text=input_image_prompt,
                    images=input_image,
                    return_tensors="pt",
                    padding=True).to("cuda")

with torch.no_grad():
  emb_text = model(**inputs_text, output_hidden_states=True, return_dict=True).hidden_states[-1][:, -1, :]
  emb_image = model(**inputs_image, output_hidden_states=True, return_dict=True).hidden_states[-1][:, -1, :]
  emb_text = F.normalize(emb_text, dim=-1)
  emb_image = F.normalize(emb_image, dim=-1)
  Score = emb_image @ emb_text.T
print("Score: ", Score) # Score: 0.59
```

其中：

```python
def init_model_and_transform(model_name, base_model_path):
    if model_name == 'phi35V':
        transform = AutoProcessor.from_pretrained("microsoft/Phi-3.5-vision-instruct",
        trust_remote_code=True)
        model = AutoModelForCausalLM.from_pretrained(base_model_path,
                            device_map="cuda", trust_remote_code=True,
                            torch_dtype=tor


te.speciality_course_id,
                    year=taught_course_create.year,
                    uow=uow,
                )
            )

            if old_taught_course is not None:
                raise ExceptionNotAcceptable406(
                    detail=ErrorCode.TAUGHT_COURSE_ALREADY_EXISTS
                )

            await self._add_taugth_course(
                taught_course_data=taught_course_create.model_dump(),
                uow=uow,
            )
            return None

        except Exception as exception:
            raise exception

    async def edit_taught_course(
        self,
        taught_course_update: TaughtCourseUpdate,
        taught_course_id: uuid.UUID,
        lecturer_id: uuid.UUID,
        uow: IUnitOfWork,
    ) -> TaughtCourseUpdate:
        try:
            course_lecturer: CourseLecturerInDB | None = (
                await self._get_course_lecturer_by_lecturer(
                    lecturer_id=lecturer_id,
                    taught_course_id=taught_course_id,
                    uow=uow,
                )
            )
            if course_lecturer is None:
                raise ExceptionMethodNotAllowed405(
                    detail=ErrorCode.LECTURER_NOT_TEACHING_COURSE
                )

            await self._edit_taught_course_by_id(
                taught_course_data=taught_course_update.model_dump(
                    exclude_unset=True,
                    exclude_none=True,
                    exclude_defaults=True,
                ),
                id=taught_course_id,
                uow=uow,
            )
            return taught_course_update

        except Exception as exception:
            raise exception