euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )

        return (
            n41 * (
                + n14 * n23 * n32
                - n13 * n24 * n32
                - n14 * n22 * n33
                + n12 * n24 * n33
                + n13 * n22 * n34
                - n12 * n23 * n34
            ) +
            n42 * (
                + n11 * n23 * n34
                - n11 * n24 * n33
                + n14 * n21 * n33
                - n13 * n21 * n34
                + n13 * n24 * n31
                - n14 * n23 * n31
            ) +
            n43 * (
                + n11 * n24 * n32
                - n11 * n22 * n34
                - n14 * n21 * n32
                + n12 * n21 * n34
                + n14 * n22 * n31
                - n12 * n24 * n31
            ) +
            n44 * (
                - n13 * n22 * n31
                - n11 * n23 * n32
                + n11 * n22 * n33
                + n13 * n21 * n32
                - n12 * n21 * n33
                + n12 * n23 * n31
            )

        );
    }

    /**
     * 转置当前矩阵
     */
    public transpose ():Matrix4
    {
        let te:Float32Array = this.elements;
        let tmp;

        tmp = te[ 1 ]; te[ 1 ] = te[ 4 ]; te[ 4 ] = tmp;
        tmp = te[ 2 ]; te[ 2 ] = te[ 8 ]; te[ 8 ] = tmp;
        tmp = te[ 6 ]; te[ 6 ] = te[ 9 ]; te[ 9 ] = tmp;

        tmp = te[ 3 ]; te[ 3 ] = te[ 12 ]; te[ 12 ] = tmp;
        tmp = te[ 7 ]; te[ 7 ] = te[ 13 ]; te[ 13 ] = tmp;
        tmp = te[ 11 ]; te[ 11 ] = te[ 14 ]; te[ 14 ] = tmp;

        return this;
    }

    /**
     * 向当前矩阵中注入位置信息
     * @param v
     */
    public setPosition ( v:Vector3 ):Matrix4
    {
        let te:Float32Array= this.elements;
        te[ 12 ] = v.x;
        te[ 13 ] = v.y;
        te[ 14 ] = v.z;

        return this;
    }

    /**
     * 转换当前矩阵为它的逆矩阵。当行列式为0时，它是投影矩阵，没有逆矩阵，会抛出错误。
     * @param m
     * @param throwOnDegenerate
     */
    public getInverse( m:Matrix4, throwOnDegenerate:boolean ):Matrix4
    {
        // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm
        let te:Float32Array = this.elements,
            me = m.elements,

            n11 = me[ 0 ], n21 = me[ 1 ], n31 = me[ 2 ], n41 = me[ 3 ],
            n12 = me[ 4 ], n22 = me[ 5 ], n32 = me[ 6 ], n42 = me[ 7 ],
            n13 = me[ 8 ], n23 = me[ 9 ], n33 = me[ 10 ], n43 = me[ 11 ],
            n14 = me[ 12 ], n24 = me[ 13 ], n34 = me[ 14 ], n44 = me[ 15 ],

            t11 = n23 * n34 * n42 - n24 * n33 *


: action.payload.deleting },
            };
        }
        case RESET_DELETING_IDS: {
            return {
                ...state,
                deletingMode: { ...state.deletingMode, deleteIds: [] },
            };
        }
        case ADD_DELETE_ID: {
            return {
                ...state,
                deletingMode: {
                    ...state.deletingMode,
                    deleteIds: [...state.deletingMode.deleteIds, action.payload.id],
                },
            };
        }
        case REMOVE_DELETE_ID: {
            return {
                ...state,
                deletingMode: {
                    ...state.deletingMode,
                    deleteIds: [
                        ...state.deletingMode.deleteIds.filter((id) => action.payload.id !== id),
                    ],
                },
            };
        }
        default:
            return state;
    }
}
import Chart from './Chart'
import Stencil from './Stencil'
import { Inspectable, Prop, PropTypes } from 'vue-chartlib/dist/support'
import { ChartFactory } from 'vue-chartlib'

/**
 * 不同行为和内容的控件
 */
export enum ControlTypes {
  /**
   * 图表控件
   */
  CHART = 'Chart',
  /**
   * 通用控件
   */
  PLAIN = 'Plain',
  /**
   * 多页控件
   */
  TABS = 'Tabs',
  /**
   * 轮播控件
   */
  SWIPE = 'Swipe',
  /**
   * 没有内容的控件
   */
  EMPTY = 'Empty',
}

/**
 * 画布上可以拖动的控件
 */
export default class Control {
  uuid: string = ''
  /**
   * Components (chart or non-chart thing) in the control
   */
  component: Chart | Stencil | undefined

  /**
   * 数据组数(X轴刻度数)
   */
  groups: number = 0

  /**
   * 控件类型
   */
  type: ControlTypes = ControlTypes.EMPTY

  fixed: boolean = false

  @Inspectable({
    label: '位置',
    readonly: true,
    type: PropTypes.Position,
  })
  public position: {} | undefined

  @Inspectable({
    label: '尺寸',
    readonly: true,
    type: PropTypes.Dimension,
  })
  public dimension: {} | undefined

  constructor () {
    // this.title = 'Untitled'
  }

  applyProps (props: any[]) {
    props.forEach(prop => {
      this.props.forEach(x => {
        if (prop.name === x.name) {
          Reflect.set(this, x.name, prop.value)
        }
      })
    })
  }

  repaint () {
    (this.component as any).repaint()
  }

  /**
   * 从输入参数构建控件
   * @param input 输入参数
   */
  static create (input: {
    uuid?: string,
    title: string,
    type?: ControlTypes,
    props?: any,
    position: {
      x: number,
      y: number,
      z: number,
    },
    dimension: {
      width: number | string,
      height: number | string,
    },
    component?: {
      uuid?: string,
      name: string,
      props: any,
      layers?: any[],
    },
    fixed?: boolean,
  }): Control {
    let control = new Control()
    Object.assign(control, input)
    if (input.component) {
      let chart = ChartFactory.make({
        uuid: input.component.uuid,
        name: input.component.name,
        props: input.component.props,
        layers: input.component.layers,
      })
      console.log('Control.ts_______________________create', chart)
      control.component = chart
    }
    return control


	v.AddArg(cond)
		return true
	}
	// match: (CondSelect <t> x y (SETB cond))
	// cond: (is64BitInt(t) || isPtr(t))
	// result: (CMOVQCS y x cond)
	for {
		t := v.Type
		_ = v.Args[2]
		x := v.Args[0]
		y := v.Args[1]
		v_2 := v.Args[2]
		if v_2.Op != OpAMD64SETB {
			break
		}
		cond := v_2.Args[0]
		if !(is64BitInt(t) || isPtr(t)) {
			break
		}
		v.reset(OpAMD64CMOVQCS)
		v.AddArg(y)
		v.AddArg(x)
		v.AddArg(cond)
		return true
	}
	// match: (CondSelect <t> x y (SETAE cond))
	// cond: (is64BitInt(t) || isPtr(t))
	// result: (CMOVQCC y x cond)
	for {
		t := v.Type
		_ = v.Args[2]
		x := v.Args[0]
		y := v.Args[1]
		v_2 := v.Args[2]
		if v_2.Op != OpAMD64SETAE {
			break
		}
		cond := v_2.Args[0]
		if !(is64BitInt(t) || isPtr(t)) {
			break
		}
		v.reset(OpAMD64CMOVQCC)
		v.AddArg(y)
		v.AddArg(x)
		v.AddArg(cond)
		return true
	}
	// match: (CondSelect <t> x y (SETBE cond))
	// cond: (is64BitInt(t) || isPtr(t))
	// result: (CMOVQLS y x cond)
	for {
		t := v.Type
		_ = v.Args[2]
		x := v.Args[0]
		y := v.Args[1]
		v_2 := v.Args[2]
		if v_2.Op != OpAMD64SETBE {
			break
		}
		cond := v_2.Args[0]
		if !(is64BitInt(t) || isPtr(t)) {
			break
		}
		v.reset(OpAMD64CMOVQLS)
		v.AddArg(y)
		v.AddArg(x)
		v.AddArg(cond)
		return true
	}
	return false
}
func rewriteValueAMD64_OpCondSelect_10(v *Value) bool {
	// match: (CondSelect <t> x y (SETEQF cond))
	// cond: (is64BitInt(t) || isPtr(t))
	// result: (CMOVQEQF y x cond)
	for {
		t := v.Type
		_ = v.Args[2]
		x := v.Args[0]
		y := v.Args[1]
		v_2 := v.Args[2]
		if v_2.Op != OpAMD64SETEQF {
			break
		}
		cond := v_2.Args[0]
		if !(is64BitInt(t) || isPtr(t)) {
			break
		}
		v.reset(OpAMD64CMOVQEQF)
		v.AddArg(y)
		v.AddArg(x)
		v.AddArg(cond)
		return true
	}
	// match: (CondSelect <t> x y (SETNEF cond))
	// cond: (is64BitInt(t) || isPtr(t))
	// result: (CMOVQNEF y x cond)
	for {
		t := v.Type
		_ = v.Args[2]
		x := v.Args[0]
		y := v.Args[1]
		v_2 := v.Args[2]
		if


/**
   * An edge of the crop window will snap to the corresponding edge of a specified bounding box when
   * the crop window edge is less than or equal to this distance away from the bounding
   * box edge.
   */
  @JvmField @Px var snapRadius: Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 3f, Resources.getSystem().displayMetrics),
  /** The radius of the touchable area around the handle. */
  @JvmField @Px var touchRadius: Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 24f, Resources.getSystem().displayMetrics),
  @JvmField var guidelines: Guidelines = Guidelines.ON,
  @JvmField var scaleType: CropImageView.ScaleType = CropImageView.ScaleType.FIT_CENTER,
  @JvmField var showCropOverlay: Boolean = true,
  @JvmField var showCropLabel: Boolean = false,
  @JvmField var showProgressBar: Boolean = true,
  @JvmField @ColorInt var progressBarColor: Int = Color.rgb(153, 51, 153),
  @JvmField var autoZoomEnabled: Boolean = true,
  /** Multitouch allows to resize and drag the cropping window at the same time. */
  @JvmField var multiTouchEnabled: Boolean = false,
  /** If the crop window can be moved by dragging the crop window in the center. */
  @JvmField var centerMoveEnabled: Boolean = true,
  /** If you are allowed to change the crop window by resizing it. */
  @JvmField var canChangeCropWindow: Boolean = true,
  @JvmField var maxZoom: Int = 4,
  /** In percentage. 0.1 means 10% on both sides. */
  @JvmField var initialCropWindowPaddingRatio: Float = 0.0f,
  @JvmField var fixAspectRatio: Boolean = false,
  @JvmField var aspectRatioX: Int = 1,
  @JvmField var aspectRatioY: Int = 1,
  @JvmField @Px var borderLineThickness: Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 3f, Resources.getSystem().displayMetrics),
  @JvmField @ColorInt var borderLineColor: Int = Color.argb(170, 255, 255, 255),
  @JvmField @Px var borderCornerThickness: Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2f, Resources.getSystem().displayMetrics),
  @JvmField @Px var borderCornerOffset: Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5f, Resources.getSystem().displayMetrics),
  @JvmField @Px var borderCornerLength: Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 14f, Resources.getSystem().displayMetrics),
  @JvmField @ColorInt var borderCornerColor: Int = Color.WHITE,
  @JvmField @ColorInt var circleCornerFillColorHexValue: Int = Color.WHITE,
  @JvmField @Px var guidelinesThickness: Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1f, Resources.getSystem().displayMetrics),
  @JvmField @ColorInt var guidelinesColor: Int = Color.argb(170, 255, 255, 255),
  @JvmField @ColorInt var backgroundColor: Int = Color.argb(119, 0, 0, 0),
  @JvmField @Px var minCropWindowWidth: Int = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 42f, Resources.getSystem().displayMetrics).toInt(),
  @JvmField @Px var minCropWindowHeight: Int = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 42f, Resources.getSystem().displayMetrics).toInt(),
  @JvmField @Px var minCropResultWidth: Int = 40,
  @JvmField @Px var minCropResultHeight: Int = 40,
  @JvmField @Px var maxCropResultWidth: Int =


getSelection();
	}

	public boolean mustConnect() {
		return connectButton.getSelection();
	}

}
/*****************************************************************************
 * Copyright (c) 2015 CEA LIST.
 *
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *		Dirk Fauth <dirk.fauth@googlemail.com> - Initial API and implementation
 *
 *****************************************************************************/
package org.eclipse.nebula.widgets.richtext.painter;

import javax.xml.stream.events.EntityReference;

/**
 * Default implementation of {@link EntityReplacer} that knows about the most common HTML entities.
 */
public class DefaultEntityReplacer implements EntityReplacer {

	@Override
	public String getEntityReferenceValue(EntityReference reference) {
		String entity = reference.getName();
		String value = null;
		switch (entity) {
			case "quot":
				value = "\\u0022";
				break;
			case "amp":
				value = "\u0026";
				break;
			case "apos":
				value = "\u0027";
				break;
			case "lt":
				value = "\u003c";
				break;
			case "gt":
				value = "\u003e";
				break;
			case "nbsp":
				value = "\u00a0";
				break;
			case "iexcl":
				value = "\u00a1";
				break;
			case "cent":
				value = "\u00a2";
				break;
			case "pound":
				value = "\u00a3";
				break;
			case "curren":
				value = "\u00a4";
				break;
			case "yen":
				value = "\u00a5";
				break;
			case "brvbar":
				value = "\u00a6";
				break;
			case "sect":
				value = "\u00a7";
				break;
			case "uml":
				value = "\u00a8";
				break;
			case "copy":
				value = "\u00a9";
				break;
			case "ordf":
				value = "\u00aa";
				break;
			case "laquo":
				value = "\u00ab";
				break;
			case "not":
				value = "\u00ac";
				break;
			case "shy":
				value = "\u00ad";
				break;
			case "reg":
				value = "\u00ae";
				break;
			case "macr":
				value = "\u00af";
				break;
			case "deg":
				value = "\u00b0";
				break;
			case "plusmn":
				value = "\u00b1";
				break;
			case "sup2":
				value = "\u00b2";
				break;
			case "sup3":
				value = "\u00b3";
				break;
			case "acute":
				value = "\u00b4";
				break;
			case "micro":
				value = "\u00b5";
				break;
			case "para":
				value = "\u00b6";
				break;
			case "middot":
				value = "\u00b7";
				break;
			case "cedil":
				value = "\u00b8";
				break;
			case "sup1":
				value = "\u00b9";
				break;
			case "ordm":
				value = "\u00b


  def test_update(self, st):
        # SQL storage stores all uids as string
        id = str(uuid.uuid4())
        policy = Policy(id)
        st.add(policy)
        assert id == st.get(id).uid
        assert None is st.get(id).description
        assert [] == st.get(id).actions
        policy.description = 'foo'
        policy.actions = ['a', 'b', 'c']
        st.update(policy)
        assert id == st.get(id).uid
        assert 'foo' == st.get(id).description
        assert ['a', 'b', 'c'] == st.get(id).actions
        p = Policy('2', actions=[Any()], subjects=[Eq('max'), Eq('bob')])
        st.add(p)
        assert '2' == st.get('2').uid
        p.actions = [Eq('get')]
        st.update(p)
        assert 1 == len(st.get('2').actions)
        assert 'get' == st.get('2').actions[0].val

    def test_update_non_existing_does_not_create_anything(self, st):
        id = str(uuid.uuid4())
        st.update(Policy(id, actions=['get'], description='bar'))
        assert st.get(id) is None

    def test_delete(self, st):
        policy = Policy('1')
        st.add(policy)
        assert '1' == st.get('1').uid
        st.delete('1')
        assert None is st.get('1')

    def test_delete_nonexistent(self, st):
        uid = str('non-existent-id')
        st.delete(uid)
        assert None is st.get(uid)

    @pytest.mark.parametrize('effect', [
        ALLOW_ACCESS,
        DENY_ACCESS,
    ])
    def test_effect_boolean_conversion(self, st, effect):
        policy = Policy('1', effect=effect)
        st.add(policy)
        policy_back = st.get('1')
        assert effect == policy_back.effect
        policy.effect = 'foo'
        st.update(policy)
        policy.effect = effect
        st.update(policy)
        policy_back = st.get('1')
        assert effect == policy_back.effect


ault: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeUInt32(FieldNames.avatarId, avatarId);
      }
      output.endObject();
    }

    @Override
    public RelicRecommendCsReq mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 1787287636:
          case -428636735: {
            if (input.isAtField(FieldNames.avatarId)) {
              if (!input.trySkipNullValue()) {
                avatarId = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

    @Override
    public RelicRecommendCsReq clone() {
      return new RelicRecommendCsReq().copyFrom(this);
    }

    @Override
    public boolean isEmpty() {
      return ((bitField0_) == 0);
    }

    public static RelicRecommendCsReq parseFrom(final byte[] data) throws
        InvalidProtocolBufferException {
      return ProtoMessage.mergeFrom(new RelicRecommendCsReq(), data).checkInitialized();
    }

    public static RelicRecommendCsReq parseFrom(final ProtoSource input) throws IOException {
      return ProtoMessage.mergeFrom(new RelicRecommendCsReq(), input).checkInitialized();
    }

    public static RelicRecommendCsReq parseFrom(final JsonSource input) throws IOException {
      return ProtoMessage.mergeFrom(new RelicRecommendCsReq(), input).checkInitialized();
    }

    /**
     * @return factory for creating RelicRecommendCsReq messages
     */
    public static MessageFactory<RelicRecommendCsReq> getFactory() {
      return RelicRecommendCsReqFactory.INSTANCE;
    }

    private enum RelicRecommendCsReqFactory implements MessageFactory<RelicRecommendCsReq> {
      INSTANCE;

      @Override
      public RelicRecommendCsReq create() {
        return RelicRecommendCsReq.newInstance();
      }
    }

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
      static final FieldName avatarId = FieldName.forField("avatarId", "avatar_id");
    }
  }
}
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;

import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;

public final class ChessRogueReRollDiceCsReqOuterClass {
  /**
   * Protobuf type {@code ChessRogueReRollDiceCsReq}
   */
  public static final class ChessRogueReRollDiceCsReq extends ProtoMessage<ChessRogueReRollDiceCsReq> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>


Manifest.xml 文件下的 application 标签增加以下属性。
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
    <application android:networkSecurityConfig="@xml/network_security_config"
                    ... >
        ...
    </application>
</manifest>
```

3. 确保 Android 目录下的 `build.gradle` 使用了mavenCenter，能够成功下载到依赖

```groovy
repositories {
  mavenCentral()
}
```

4. 配置安卓最小SDK版本，由于flutter默认配置的安卓最小版本过低，需要手动更改为至少19,如果需要使用画中画能力，compileSdkVersion和targetSdkVersion则需要修改为至少31

```groovy
compileSdkVersion 31
defaultConfig {
    applicationId "com.tencent.liteav.demo"
    minSdkVersion 19
    targetSdkVersion 31
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}
```

5. `AndroidManifest.xml`根节点manifest标签内增加如下配置`xmlns:tools="http://schemas.android.com/tools"`,示例如下：
```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.player">

    <!-- your config...... -->
</manifest>
```

application节点下增加`tools:replace="android:label"`,示例如下

```xml
<application
    android:label="super_player_example"
    android:icon="@mipmap/ic_launcher"
    android:requestLegacyExternalStorage="true"
    tools:replace="android:label">
<!-- your config...... -->
</application>
```

6. 如果需要更新原生SDK依赖版本，可手动删除 Android 目录下的 `build` 文件夹，也可以使用如下命令强制刷新

```shell
./gradlew build
```

#### iOS 端配置

注意：**iOS端目前暂不支持模拟器运行调试，建议在真机下进行开发调试**。

1. 在 iOS 的`Info.plist`中增加如下配置：
```xml
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>
```
2. iOS 原生采用`pod`方式进行依赖，编辑`podfile`文件，指定你的播放器 SDK 版本，默认集成的是 Player 版SDK。
```xml
pod 'TXLiteAVSDK_Player'	        //Player版
```
 Professional 版 SDK 集成：

```
pod 'TXLiteAVSDK_Professional' 	//Professional版
```

如果不指定版本，默认会安装最新的`TXLiteAVSDK_Player`最新版本。

3. 部分情况下（如：发布了新版本），需要强制更新iOS播放器依赖，可以在iOS目录下使用如下命令进行更新：

```shell
r


', ur'无锡市灵山景区', ur'无锡灵山', ur'灵山', ur'灵山自然风景区', ur'无锡灵山大佛景区', ur'上饶灵山风景名胜区', ur'信阳灵山风景名胜区'],
    [ur'下关区', ur'下关穴', ur'下关乡', ur'下关'],
    [ur'下午', ur'p.m.'],
    [ur'下诺夫哥罗德市', ur'下诺夫哥罗德州', ur'卡米洛·高尔基', ur'玛克西姆·高尔基', ur'高尔基', ur'下诺夫哥罗德', ur'马克西姆·高尔基', ur'斯克列比茨基', ur'阿列克赛·马克西莫维奇·彼什科夫', ur'阿列克塞·马克西莫维奇·彼什科夫', ur'gorkymaksim', ur'高尔基·马克西姆', ur'gorky'],
    [ur'不丹王国', ur'不丹概况', ur'The Kingdom of Bhutan', ur'kingdom of bhutan', ur'不丹', ur'不丹国', ur'bhutan'],
    [ur'世博', ur'世界博览会', ur'worldexpo', ur'国际博览会', ur'World Exhibition or Exposition', ur'World Expo', ur'世界博览', ur'EXPO', ur'世博会', ur'会展', ur'expo'],
    [ur'世贸大厦', ur'双子大楼', ur'世贸中心', ur'美国纽约世界贸易中心', ur'纽约世界贸易中心', ur'美国世贸大厦', ur'世界贸易中心', ur'《世贸中心》'],
    [ur'丘脑下部', ur'下丘脑'],
    [ur'丙纶', ur'聚丙烯', ur'PP塑料', ur'PP材料', ur'Polypropylene', ur'PP料', ur'pp塑料'],
    [ur'东亚病夫', ur'Sick man of Asia', ur'东方病夫'],
    [ur'东加王国', ur'胖子之国', ur'the kingdom of tonga', ur'汤加', ur'汤加王国'],
    [ur'东巴文', ur'东巴文字', ur'东巴象形文字'],
    [ur'东方明珠', ur'上海东方明珠', ur'东方明珠电视塔', ur'东方明珠塔'],
    [ur'东方的威尼斯', ur'suzhou', ur'江苏苏州', ur'江苏省苏州市', ur'苏州', ur'江苏省苏州', ur'苏州市', ur'jiangsu苏州'],
    [ur'东方红', ur'东方红史诗', ur'东方红卫星', ur'《东方红》'],
    [ur'东汉末年', ur'后汉末年'],
    [ur'东盟成员国', ur'亚细安', ur'Association of Southeast Asian Nations', ur'东盟', ur'ASEAN', ur'东盟十国', ur'the Association of Southeast Asian nations', ur'东南亚国家联盟', ur'asean'],
    [ur'东都', ur'东都洛阳'],
    [ur'两栖类动物', ur'两栖动物'],
    [ur'中华人民共和国东北', ur'东北', ur'china东北', ur'中国东北地区', ur'中国东北', ur'东北地区'],
    [ur'中华人民共和国公安部', ur'中国公安部', ur'公安部'],
    [ur'中华人民共和国国庆日', ur'国庆日', ur'十一国庆节', ur'nationalday', ur'National Day', ur'国庆节', ur'国庆'],
    [ur'中国上海金茂大厦', ur'金茂大厦', ur'上海金茂大厦', ur'金茂大厦(jinmaotower)', ur'金贸大厦', ur'上海市金茂大厦'],
    [ur'中国人民政治协商会议', ur'CPPCC', ur'Chinese People\'s Political Consultative Conference', ur'政协', ur'cppcc', ur'政协会议', ur'中国政协', ur'人民政治协商会议', ur'政治协商会议', ur'ChinesePeople’sPoliticalConsultativeConference', ur'人民政协'],
    [ur'中国人民英雄纪念碑', ur'中华人民英雄纪念碑', ur'人民英雄纪念碑', ur'首都人民英雄纪念碑'],
    [ur'中国人民银行', ur'People\'s Bank of China', ur'THE PEOPLE\'S BANK OF CHINA', ur'人民银行', ur'中国中央银行', ur'人行', ur'中国央行'],
    [ur'中国南方航空', ur'南昌航空工业学院', ur'Nanchang Hangkong University', ur'南昌航空大学', ur'nuaa', ur'南京航空学院', ur'南航大学', ur'Nanchang Hang kong University', ur'中国南方航空公司', ur'南昌航大', ur'昌航', ur'南航', ur'南京航天航空大学', ur'Nanjing University of Aeronautics and Astronautics', ur'中国南方航空股份有限公司', ur'南方航空股份有限公司', ur'南昌航空学院', ur'南方航空', ur'南京航空航天大学', ur'中国南方航空集团公司'],
    [ur'中国古代天文仪器日晷', ur'日晷'],
    [ur'中国古典文学名著丛书：警世通言', ur'警世通言', ur'《警世通言》'],
    [ur'中国国歌', ur'义勇军进行曲', ur'《义勇军进行曲》', ur'中华人民共和国国歌'],
    [ur'中国导弹之父', ur'火箭之王', ur'钱学森'],
    [ur'中国少先队队歌', ur'我们是共产主义接班人', ur'中国少年儿童队队歌', ur'中国少年先锋队队歌', ur'少先队队歌', ur'中国少年先锋队歌', ur'中国先锋队队歌'],
    [ur'中国工农红军长征', ur'长征', ur'红25军长征'],
    [ur'中国工商银行股份有限公司', ur'Industrial & Commercial Bank of China', ur'工商银行', ur'中国工商银行', ur'ICBC', ur'Industrial and Commercial Bank of China', ur'您身边的银行，可信赖的银行', ur'工行', ur'icbc'],
    [ur'中国建筑工程鲁班奖', ur'鲁班奖'],
    [ur'中国瓷都', ur'景德镇市', ur'德化县', ur'瓷都', ur'瓷都景德镇', ur'景德镇', ur'江西省景德镇市', ur'德化'],
    [ur'中国电信集团公司', ur'中国电信', ur'中电信', ur'电信', ur'China Telecommunications Corporation', ur'CHINA TELECOM'],
    [ur'中国电影百花奖', ur'《大众电影》百花奖', ur'大众电影百花奖', ur'百花奖'],
    [ur'中国郑州', ur'zhengzhou', ur'郑州市', ur'郑州', ur'郑州市辖区'],
    [ur'中国黑龙江', ur'Heilongjiang Porovince', ur'黑', ur'李舜生', ur'黑龙江省', ur'黑龙江', ur'阿穆尔河'],
    [ur'中途岛海空战', ur'中途岛之战Midway(1976)', ur'中途岛之战', ur'中途岛大海战', ur'海空大战中途岛', ur'中途岛大转折', ur'中途岛战役', ur'中途岛海战', ur'中途岛战伇'],
    [ur'丰田IQ', ur'智商', ur'iq', ur'智力', ur'Intelligence', ur'智力商数', ur'intelligence'],
    [ur'串联电路', ur'串联'],
    [ur'临潼骊山', ur'骊山', ur'西安骊山'],
    [ur'丹尼斯-罗德曼', ur'丹尼斯罗德曼', ur'罗德曼', ur'Dennis Rodman', ur'丹尼斯·罗德曼'],
    [ur'丹布朗', ur'丹・布朗', ur'丹·布朗', ur'丹.布朗', ur'dan brown', ur'丹-布朗', ur'丹•布朗'],
    [ur'丹麦', ur'丹麦王国', ur'denmark', ur'the kingdom of denmark'],
    [ur'义不容情', ur'《义不容情》'],
    [ur'乌塞恩·博尔特', ur'乌塞恩-博尔特', ur'Usain Bolt', ur'博尔特', ur'乌塞恩•博尔特', ur'尤塞恩博尔特', ur'尤塞恩·博尔特', ur'尤塞安·圣莱奥·博尔特', ur'尤塞因·博尔特', ur'尤塞恩-博尔特'],
    [ur'乌托邦', ur'《乌托邦》'],
    [ur'乌拉圭东岸共和国', ur'乌拉圭', ur'The Oriental Republic of Uruguay', ur'uruguay', ur'oriental republic of uruguay'],
    [ur'乌贼', ur'墨鱼', ur'乌贼鱼', ur'墨斗鱼', ur'花枝'],
    [ur'乌鲁木齐', ur'乌市'],
    [ur'乌鸦', ur'Corvus Linnaeus', ur'乌鸦TheCrow(1994)', ur'鸦属'],
    [ur'乐曲', ur'音乐'],
    [ur'乔治•S•巴顿', ur'简森巴顿', ur'乔治·史密斯·巴顿', ur'乔伊-巴顿', ur'巴顿(1885. 11.11～1945.12.21)', ur'简森-巴顿', ur'Jenson Button', ur'巴顿（1885. 11.11～1945.12.21）',


split = split
            .downcast::<ZippedPartitionsSplit>()
            .or(Err(Error::DowncastFailure("ZippedPartitionsSplit")))?;

        let fst_iter = self.first.iterator(current_split.fst_split.clone())?;
        let sec_iter = self.second.iterator(current_split.sec_split.clone())?;
        Ok(Box::new(fst_iter.zip(sec_iter)))
    }

    fn iterator(&self, split: Box<dyn Split>) -> Result<Box<dyn Iterator<Item = Self::Item>>> {
        self.compute(split.clone())
    }
}

impl<F: Data, S: Data> ZippedPartitionsRdd<F, S> {
    pub fn new(first: Arc<dyn Rdd<Item = F>>, second: Arc<dyn Rdd<Item = S>>) -> Self {
        let mut vals = RddVals::new(first.get_context());
        vals.dependencies
            .push(Dependency::NarrowDependency(Arc::new(
                OneToOneDependency::new(first.get_rdd_base()),
            )));
        let vals = Arc::new(vals);

        ZippedPartitionsRdd {
            first,
            second,
            vals,
            _marker_t: PhantomData,
        }
    }
}
pub mod column_base_function;
pub mod percentile;
<gh_stars>10-100
fn main() {
	// dereferencing a raw pointer:
    let p_raw: *const u32 = &10;
    // error: dereference of unsafe pointer requires unsafe function or block [E0133]
    // let n = *p_raw;

    unsafe {
    	// dereferencing a raw pointer must be done inside unsafe block:
    	let n = *p_raw;
    	println!("{}", n); // 10
    }

    // converting between references and raw pointers:
    let gr: f32 = 1.618;
    let p_imm: *const f32 = &gr as *const f32; // explicit cast
    let mut m: f32 = 3.14;
    let p_mut: *mut f32 = &mut m; // implicit coercion

    unsafe {
        let ref_imm: &f32 = &*p_imm;
        let ref_mut: &mut f32 = &mut *p_mut;
    }
}#[doc = "Register `DMAADDR1` reader"]
pub struct R(crate::R<DMAADDR1_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<DMAADDR1_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<DMAADDR1_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<DMAADDR1_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `DMAADDR1` writer"]
pub struct W(crate::W<DMAADDR1_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<DMAADDR1_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<DMAADDR1_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<DMAADDR1_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `DMAAddr1` reader - DMA Starting Address, It is representing AHB Byte Address bit \\[15:8\\]."]
pub struct DMAADDR1_R(crate::FieldReader<u8, u8>);
impl


is tricky as both requestAnimationFrame and queueMicrotask
      // callbacks run on the same queue and can be interleaved. There is no way
      // to flush particular queue in Jest and the only control over mocked timers
      // is by using jest.advanceTimersByTime() method which advances all types
      // of timers including immediate and animation callbacks. Ideally we'd like
      // to have some way here to schedule work along with React updates, but
      // that's not possible, and hence in Jest environment instead of using scheduling
      // mechanism we just schedule the work ommiting the queue. This is ok for the
      // uses that we currently have but may not be ok for future tests that we write.
      NativeReanimatedModule.scheduleOnUI(
        makeShareableCloneRecursive(() => {
          'worklet';
          worklet(...args);
        })
      );
      return;
    }
    if (__DEV__) {
      // in DEV mode we call shareable conversion here because in case the object
      // can't be converted, we will get a meaningful stack-trace as opposed to the
      // situation when conversion is only done via microtask queue. This does not
      // make the app particularily less efficient as converted objects are cached
      // and for a given worklet the conversion only happens once.
      makeShareableCloneRecursive(worklet);
      makeShareableCloneRecursive(args);
    }
    _runOnUIQueue.push([worklet, args]);
    if (_runOnUIQueue.length === 1) {
      queueMicrotask(() => {
        const queue = _runOnUIQueue;
        _runOnUIQueue = [];
        NativeReanimatedModule.scheduleOnUI(
          makeShareableCloneRecursive(() => {
            'worklet';
            queue.forEach(([worklet, args]) => {
              worklet(...args);
            });
            callMicrotasks();
          })
        );
      });
    }
  };
}

/**
 * Schedule a worklet to execute on the UI runtime skipping batching mechanism.
 */
export function runOnUIImmediately<A extends any[], R>(
  worklet: ComplexWorkletFunction<A, R>
): (...args: A) => void {
  'worklet';
  if (__DEV__ && IS_NATIVE && _WORKLET) {
    throw new Error(
      '[Reanimated] `runOnUIImmediately` cannot be called on the UI runtime. Please call the function synchronously or use `queueMicrotask` or `requestAnimationFrame` instead.'
    );
  }
  if (__DEV__ && IS_NATIVE && worklet.__workletHash === undefined) {
    throw new Error(
      '[Reanimated] `runOnUIImmediately` can only be used on worklets.'
    );
  }
  return (...args) => {
    NativeReanimatedModule.scheduleOnUI(
      makeShareableCloneRecursive(() => {
        'worklet';
        worklet(...args);
      })
    );
  };
}

if (__DEV__ && IS_NATIVE) {
  const f = () => {
    'worklet';
  };
  // @ts-ignore plugin
  if (f.__workletHash === undefined) {
    throw new Error(
      `[Reanimated] Failed to create a worklet. See \`https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#failed-to-create-a-worklet\` for more details.`
    );
  }
}

function runWorkletOnJS<A extends any[], R>(
  worklet: ComplexWorkletFunction<A, R>,
  ...args: A
): void {
  // remote function that calls a worklet synchronously on the JS runtime
  worklet(...args);
}

export function runOnJS<A extends any[], R>(
  fun: ComplexWorkletFunction<A, R>
): (...args: A) => void {
  'worklet';
  if (!IS_NATIVE || !_WORKLET) {
    // if we are already on


stem.Data.Entity.Migrations;

    /// <summary>
    ///
    /// </summary>
    public partial class UpdateGroupTypeRoleModel : Rock.Migrations.RockMigration
    {
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            AddColumn( "dbo.GroupTypeRole", "CanTakeAttendance", c => c.Boolean( nullable: false ) );
        }

        /// <summary>
        /// Operations to be performed during the downgrade process.
        /// </summary>
        public override void Down()
        {
            DropColumn( "dbo.GroupTypeRole", "CanTakeAttendance" );
        }
    }
}


��의 정복 가슴보호대",
[48367] = "스랄의 정복 손장갑",
[48368] = "스랄의 정복 면갑",
[48369] = "스랄의 정복 전쟁킬트",
[48370] = "스랄의 정복 어깨보호대",
[48371] = "린의 정복 보호모",
[48372] = "린의 정복 전투판금 흉갑",
[48373] = "린의 정복 다리갑옷",
[48374] = "린의 정복 어깨철갑",
[48375] = "린의 정복 건틀릿",
[48376] = "린의 승전 전투판금 흉갑",
[48377] = "린의 승전 건틀릿",
[48378] = "린의 승전 보호모",
[48379] = "린의 승전 다리갑옷",
[48380] = "린의 승전 어깨철갑",
[48381] = "린의 승전 어깨철갑",
[48382] = "린의 승전 다리갑옷",
[48383] = "린의 승전 보호모",
[48384] = "린의 승전 건틀릿",
[48385] = "린의 승전 전투판금 흉갑",
[48386] = "헬스크림의 정복 전투판금 흉갑",
[48387] = "헬스크림의 정복 건틀릿",
[48388] = "헬스크림의 정복 보호모",
[48389] = "헬스크림의 정복 다리갑옷",
[48390] = "헬스크림의 정복 어깨철갑",
[48391] = "헬스크림의 승전 전투판금 흉갑",
[48392] = "헬스크림의 승전 건틀릿",
[48393] = "헬스크림의 승전 보호모",
[48394] = "헬스크림의 승전 다리갑옷",
[48395] = "헬스크림의 승전 어깨철갑",
[48396] = "헬스크림의 승전 전투판금 흉갑",
[48397] = "헬스크림의 승전 건틀릿",
[48398] = "헬스크림의 승전 보호모",
[48399] = "헬스크림의 승전 다리갑옷",
[484


//
//  CLRetractableSectionController.h
//  CLRetractableSection
//
//  Created by Emil Wojtaszek on 11-05-11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CLRetractableSectionHeaderView.h"
#import "CLRetractableSectionItem.h"

@class CLRetractableSectionHeaderView;

@interface CLRetractableSectionController : NSObject <SectionHeaderViewDelegate> {

    NSInteger _openSectionIndex;

    UITableView* _tableView;
    NSMutableArray* _sectionList;

    UITableViewRowAnimation _insertAnimation;
    UITableViewRowAnimation _deleteAnimation;

}

@property (nonatomic, assign, readonly) NSInteger openSectionIndex;

@property (nonatomic, assign) UITableViewRowAnimation insertAnimation;
@property (nonatomic, assign) UITableViewRowAnimation deleteAnimation;

- (id) initWithTableView:(UITableView*)tableView;
- (NSUInteger) numberOfRows:(NSUInteger)rows inSection:(NSUInteger)section;

- (void) reloadSectionsList:(NSUInteger)sectionsCount;

- (CLRetractableSectionItem*) sectionItemAtIndex:(NSUInteger)section;

//- (CLRetractableSectionHeaderView*) addHeaderViewToSection:(NSUInteger)section;
//- (CLRetractableSectionHeaderView*) headerView:(CLRetractableSectionHeaderView*)headerView forSection:(NSUInteger)section;

@end


#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.

# pyre-unsafe

import reagent.core.types as rlt
import torch
from reagent.gym.types import GaussianSamplerScore, Sampler

class GaussianSampler(Sampler):
    def __init__(self, actor_network) -> None:
        self.actor_network = actor_network

    def _sample_action(self, loc: torch.Tensor, scale_log: torch.Tensor):
        r = torch.randn_like(scale_log, device=scale_log.device)
        action = torch.tanh(loc + r * scale_log.exp())
        # Since each dim are independent, log-prob is simply sum
        log_prob = self.actor_network._log_prob(r, scale_log)
        squash_correction = self.actor_network._squash_correction(action)
        log_prob = torch.sum(log_prob - squash_correction, dim=1)
        return action, log_prob

    @torch.no_grad()
    def sample_action(self, scores: GaussianSamplerScore) -> rlt.ActorOutput:
        self.actor_network.eval()
        unscaled_actions, log_prob = self._sample_action(scores.loc, scores.scale_log)
        self.actor_network.train()

        return rlt.ActorOutput(action=unscaled_actions, log_prob=log_prob)

    def _log_prob(
        self, loc: torch.Tensor, scale_log: torch.Tensor, squashed_action: torch.Tensor
    ):
        # This is not getting exported; we can use it
        n = torch.distributions.Normal(loc, scale_log.exp())
        raw_action = self.actor_network._atanh(squashed_action)
        log_prob = n.log_prob(raw_action)
        squash_correction = self.actor_network._squash_correction(squashed_action)
        log_prob = torch.sum(log_prob - squash_correction, dim=1)
        return log_prob

    @torch.no_grad()
    # pyre-fixme[14]: `log_prob` overrides method defined in `Sampler` inconsistently.
    def log_prob(
        self, scores: GaussianSamplerScore, squashed_action: torch.Tensor
    ) -> torch.Tensor:
        self.actor_network.eval()
        # pyre-fixme[20]: Argument `squashed_action` expected.
        log_prob = self._log_prob(scores.loc, scores.scale_log)
        self.actor_network.train()
        return log_prob


08025 */  move  $s0, $zero
/* B20484 800A92E4 2402005A */  li    $v0, 90
/* B20488 800A92E8 15200002 */  bnez  $t1, .L800A92F4
/* B2048C 800A92EC 24190045 */   li    $t9, 69
/* B20490 800A92F0 AE800008 */  sw    $zero, 8($s4)
.L800A92F4:
/* B20494 800A92F4 862A4A38 */  lh    $t2, 0x4a38($s1)
/* B20498 800A92F8 0290C021 */  addu  $t8, $s4, $s0
/* B2049C 800A92FC 000A58C0 */  sll   $t3, $t2, 3
/* B204A0 800A9300 02AB6021 */  addu  $t4, $s5, $t3
/* B204A4 800A9304 01906821 */  addu  $t5, $t4, $s0
/* B204A8 800A9308 26100001 */  addiu $s0, $s0, 1
/* B204AC 800A930C 01B67021 */  addu  $t6, $t5, $s6
/* B204B0 800A9310 91CF49FC */  lbu   $t7, 0x49fc($t6)
/* B204B4 800A9314 3210FFFF */  andi  $s0, $s0, 0xffff
/* B204B8 800A9318 2A010008 */  slti  $at, $s0, 8
/* B204BC 800A931C 1420FFF5 */  bnez  $at, .L800A92F4
/* B204C0 800A9320 A30F0024 */   sb    $t7, 0x24($t8)
/* B204C4 800A9324 2408004C */  li    $t0, 76
/* B204C8 800A9328 24090044 */  li    $t1, 68
/* B204CC 800A932C 240A0041 */  li    $t2, 65
/* B204D0 800A9330 A282001C */  sb    $v0, 0x1c($s4)
/* B204D4 800A9334 A299001D */  sb    $t9, 0x1d($s4)
/* B204D8 800A9338 A288001E */  sb    $t0, 0x1e($s4)
/* B204DC 800A933C A289001F */  sb    $t1, 0x1f($s4)
/* B204E0 800A9340 A28A0020 */  sb    $t2, 0x20($s4)
/* B204E4 800A9344 A2820021 */  sb    $v0, 0x21($s4)
/* B204E8 800A9348 922B49F4 */  lbu   $t3, 0x49f4($s1)
/* B204EC 800A934C 3C048014 */  lui   $a0, %hi(D_80140CDC) # $a0, 0x8014
/* B204F0 800A9350 24840CDC */  addiu $a0, %lo(D_80140CDC) # addiu $a0, $a0, 0xcdc
/* B204F4 800A9354 A68B002C */  sh    $t3, 0x2c($s4)
/* B204F8 800A9358 0C00084C */  jal   osSyncPrintf
/* B204FC 800A935C 922549F4 */   lbu   $a1, 0x49f4($s1)
/* B20500 800A9360 928C001F */  lbu   $t4, 0x1f($s4)
/* B20504 800A9364 928D0020 */  lbu   $t5, 0x20($s4)
/* B20508 800A9368 928E0021 */  lbu   $t6, 0x21($s4)
/* B2050C 800A936C 3C048014 */  lui


 (err == null)
      throw IllegalArgumentException(name + " is not a valid name");
    return err;
  }

}
import 'dart:collection';
import 'dart:math';

import 'package:dartsv/dartsv.dart';
import 'package:dartsv/src/encoding/utils.dart';
import 'package:dartsv/src/transaction/default_builder.dart';
import 'package:dartsv/src/transaction/transaction_input.dart';
import 'package:dartsv/src/transaction/transaction_output.dart';
import 'package:hex/hex.dart';
import 'package:pointycastle/digests/sha256.dart';
import 'package:pointycastle/ecc/api.dart';
import 'package:pointycastle/macs/hmac.dart';
import 'package:pointycastle/pointycastle.dart';
import 'package:pointycastle/signers/ecdsa_signer.dart';
import 'dart:typed_data';
import 'package:buffer/buffer.dart';

import 'locking_script_builder.dart';

/// When serializing the transaction to hexadecimal it is possible
/// to selectively disable some checks. See [Transaction.serialize()]
enum TransactionOption {
  ///  Disables all checks
  DISABLE_ALL,

  ///  Disables checking if the transaction spends more bitcoins than the sum of the input amounts
  DISABLE_MORE_OUTPUT_THAN_INPUT,

  ///  Disables checking for fees that are too large
  DISABLE_LARGE_FEES,

  ///  Disables checking if there are no outputs that are dust amounts
  DISABLE_DUST_OUTPUTS,

  ///  Disables checking if all inputs are fully signed
  DISABLE_FULLY_SIGNED
}

/// Transactions are at the heart of this library. It is the primary means by which we
/// interact with the Bitcoin network.
///
/// A [Transaction] will have one or more [TransactionInput]s that it is spending from
/// and one or more [TransactionOutput]s which represent either the sending of coins
/// to a recipient or the creation of 'data'-only output.
///
///
/// The raw hex transaction has the following layout:
///
/// `4 bytes`  - Transaction version number; currently version 1 or 2.
/// Programs creating transactions using er consensus rules may use higher version numbers.
/// Version 2 means that BIP 68 applies.
///
/// `compactSize uint` - Number of inputs in this transaction.
///
/// `VarByteArray` - Transaction inputs.
///
/// `compactSize uint` - Number of outputs in this transaction.
///
/// `VarByteArray` - Transaction outputs.
///
/// `4 bytes` - A time (Unix epoch time) or block number. See the [nLockTime] parsing rules.
///
class Transaction {
  int _version = 2;
  int _nLockTime = 0;
  final List<TransactionInput> _txnInputs = []; //this transaction's inputs
  final List<TransactionOutput> _txnOutputs = []; //this transaction's outputs
  final List<TransactionOutput> _utxos = []; //the UTXOs from spent Transaction
  Address? _changeAddress;
  LockingScriptBuilder? _changeScriptBuilder;
  final Set<TransactionOption> _transactionOptions = Set<TransactionOption>();

  List<int>? _txHash;
  String? _txId;

  static final SHA256Digest _sha256Digest = SHA256Digest();
  final ECDSASigner _dsaSigner = ECDSASigner(null, HMac(_sha256Digest, 64));
  final ECDomainParameters _domainParams = ECDomainParameters('secp256k1');

  bool _changeScriptFlag = false;

  var CURRENT_VERSION = 1;


stlevels = call_trustlevels
        self.pattern_based_registration = pattern_based_registration
        self.shared_registration = shared_registration
        self.call_timeout = call_timeout
        self.call_canceling = call_canceling
        self.progressive_call_results = progressive_call_results
        self.registration_revocation = registration_revocation
        self.payload_transparency = payload_transparency
        self.payload_encryption_cryptobox = payload_encryption_cryptobox
        self._check_all_bool()

# map of role names to role class
ROLE_NAME_TO_CLASS = {
    u'broker': RoleBrokerFeatures,
    u'subscriber': RoleSubscriberFeatures,
    u'publisher': RolePublisherFeatures,
    u'dealer': RoleDealerFeatures,
    u'caller': RoleCallerFeatures,
    u'callee': RoleCalleeFeatures,
}

# default role features for client roles supported
DEFAULT_CLIENT_ROLES = {
    u'subscriber': RoleSubscriberFeatures(
        publisher_identification=True,
        pattern_based_subscription=True,
        subscription_revocation=True,
        payload_transparency=True,
        payload_encryption_cryptobox=True,
    ),
    u'publisher': RolePublisherFeatures(
        publisher_identification=True,
        subscriber_blackwhite_listing=True,
        publisher_exclusion=True,
        payload_transparency=True,
        x_acknowledged_event_delivery=True,
        payload_encryption_cryptobox=True,
    ),
    u'caller': RoleCallerFeatures(
        caller_identification=True,
        progressive_call_results=True,
        payload_transparency=True,
        payload_encryption_cryptobox=True,
        call_canceling=True,
    ),
    u'callee': RoleCalleeFeatures(
        caller_identification=True,
        pattern_based_registration=True,
        shared_registration=True,
        progressive_call_results=True,
        registration_revocation=True,
        payload_transparency=True,
        payload_encryption_cryptobox=True,
        call_canceling=True,
    ),
}


alue: widget.value,
                groupValue: widget.groupValue,
                materialTapTargetSize: MaterialTapTargetSize.padded,
                onChanged: (T? selected) {
                  setState(() {
                    _longPressing = false;
                    if (selected != null) {
                      widget.setGroupValue(selected);
                    }
                  });
                },
              ),
            ),
            title: widget.title,
            subtitle: widget.subtitle,
            dense: true,
          ),
          onTapDown: (details) {
            setState(() {
              _longPressing = true;
            });
          },
          onTap: () {
            setState(() {
              _longPressing = false;
              widget.setGroupValue(widget.value);
            });
          },
          onLongPress: () {
            setState(() {
              _longPressing = false;
              widget.onLongPress();
            });
          },
        ),
      ),
    );
  }
}
// This source code is a part of Project Violet.
// Copyright (C) 2021. violet-team. Licensed under the Apache-2.0 License.

import 'dart:convert';

import 'package:http/http.dart' as http;
import 'package:violet/log/log.dart';
import 'package:violet/server/community/session.dart';
import 'package:violet/server/violet.dart';
import 'package:violet/server/wsalt.dart';

class VioletCommunityArticle {
  static Future<dynamic> _getV(String api, String params) async {
    var vToken = DateTime.now().toUtc().millisecondsSinceEpoch;
    var vValid = getValid(vToken.toString());
    var gg = await http.get(
      Uri.parse('${VioletServer.api}$api?$params'),
      headers: {
        'v-token': vToken.toString(),
        'v-valid': vValid,
        'Content-Type': 'application/json',
      },
    );

    if (gg.statusCode != 200) {
      return gg.statusCode;
    }

    return jsonDecode(gg.body);
  }

  static Future<dynamic> _postV(String api, Object body) async {
    var vToken = DateTime.now().toUtc().millisecondsSinceEpoch;
    var vValid = getValid(vToken.toString());

    try {
      var res = await http.post(
        Uri.parse(VioletServer.api + api),
        headers: {
          'v-token': vToken.toString(),
          'v-valid': vValid,
          'Content-Type': 'application/json',
        },
        body: jsonEncode(body),
      );
      return res;
    } catch (e, st) {
      Logger.error(
        '[API-postv] E: $e\n'
        '$st',
      );
    }
    return null;
  }

  /* Id, ShortName, Name, Description */
  static Future<dynamic> getBoards() async {
    return await _getV('/community/board/list', '');
  }

  /* Id, TimeStamp, User, NickName, Comments, Title, View, UpVote, DownVote */
  static Future<dynamic> getArticleByPage(int board, int page) async {
    return await _getV('/community/board/page', 'board=$board&p=$page');
  }

  /* Body, Etc */
  static Future<dynamic> readArticle(int no) async {
    return await _getV('/community/article/read', 'no=$no');
  }

  /* */
  static Future<dynamic> writeArticle(
    VioletCommunitySession session,
    int board,
    String title,
    String body,
    String etc,
  ) async {
    return await _postV('/community/article/write', {
      'Session': session.session,
      'Board': board,
      'Title': title,
      'Body': body,
      'Etc': etc,
    });
  }

  /* Already Vote, etc */
  static Future<dynamic> voteArticle


" через слайдер ютуба (#535)
- Исправлена ошибка из-за которой слайдер ютуба не обновлялся, если изменялось значение громкости перевода в меню с включенной функцией "связать громкость перевода и видео"
- Исправлена ошибка из-за которой не менялось значение слайдера громкости оригинала, если видео мутилось через кнопку или хоткей
- Немного оптимизирована работа с syncVolumeObserver. Теперь, он проверяет изменения, только, если включен перевод видео и включена функция "связать громкость перевода и видео"
- Добавлена двухсторонняя синхронизация слайдера громкости в меню со слайдером громкости плеера. Поддерживаемые плееры: Стандартный, VK, Vimeo, YouTube (уже была поддержка), Trovo, YandexDisk, возможно, какие-то другие - не указанные в этом списке
- Включена возможность использования функции "связать громкость перевода и видео" для всех поддерживаемых сайтов
- Убрана обводка слайдеров при нажатие на слайдер в Vimeo
- Убрана жирность текста в меню на Rutube
- Исправлено отображение субтитров в ОК (#561)
- Добавлен `peertube.su` в список доступных доменов для Peertube (#442)
- Добавлена возможность перемещения кнопки перевода по аналогии с Яндекс Браузером (#483). Работает, только, если видео более 550 пикселей
- Добавлено перемещение меню в зависимости от позиции кнопки. Работает, только, если видео более 550 пикселей. Тестировалось только на YouTube, Vimeo, Rutube, VK и прямых ссылках на видео файлы
- Большинство важных fetch заменено на GM_fetch, благодаря чему, должно уменьшиться число ошибок из-за CSP

# 1.5.1.5

Большинство изменений внесены @SashaXser в #576 и #581

- Исправлено определение языка на главной странице ютуба
- Исправлен двойной вызов перевода на /embed/
- Исправлено двойное определение videoID (иногда не определялась длительность видео)
- Исправлена невидимая кнопка на /embed/
- Исправлен сброс перевода при смене качества видео
- Улучшена очистка описания на YouTube
- Добавлен полифил для GM_addStyle (#571)
- Другие мелкие правки в коде

#


of(dialogContext).pop();
                    ScaffoldMessenger.of(context).showSnackBar(
                      SnackBar(content: Text('创建或添加歌曲失败: $e')),
                    );
                  }
                }
              },
            ),
          ],
        );
      },
    ).then((_) => playlistNameController.dispose());
  }

  @override
  Widget build(BuildContext context) {
    Widget? leadingWidget;
    if (_isSelectionMode) {
      leadingWidget = IconButton(
        icon: const Icon(Icons.close),
        onPressed: _toggleSelectionMode,
      );
    } else {
      leadingWidget = Consumer<MusicProvider>(
        builder: (context, musicProvider, child) {
          return Padding(
            padding: const EdgeInsets.only(left: 8.0),
            child: ElevatedButton.icon(
              onPressed: musicProvider.songs.isEmpty
                  ? null
                  : () {
                      musicProvider.playAllSongs();
                      ScaffoldMessenger.of(context).showSnackBar(
                        SnackBar(content: Text('已将 ${musicProvider.songs.length} 首歌曲添加到播放队列')),
                      );
                    },
              icon: const Icon(Icons.play_arrow, size: 18),
              label: const Text('播放全部'),
              style: ElevatedButton.styleFrom(
                padding: const EdgeInsets.symmetric(horizontal: 8), // Adjust padding if needed
              ),
            ),
          );
        },
      );
    }

    Widget titleWidget = _isSelectionMode ? Text('已选择 ${_selectedSongs.length} 首') : const Text('音乐库');

    List<Widget> actionsWidgets = [];
    if (_isSelectionMode) {
      if (_selectedSongs.isEmpty) {
        actionsWidgets.add(Consumer<MusicProvider>(
          builder: (context, musicProvider, child) {
            return IconButton(
              icon: const Icon(Icons.select_all),
              onPressed: () => _selectAll(musicProvider.songs),
              tooltip: '全选',
            );
          },
        ));
      } else {
        actionsWidgets.add(IconButton(
          icon: const Icon(Icons.deselect),
          onPressed: _deselectAll,
          tooltip: '取消全选',
        ));
        actionsWidgets.add(IconButton(
          icon: const Icon(Icons.queue_music),
          onPressed: () {
            final musicProvider = context.read<MusicProvider>();
            final selectedSongs = musicProvider.songs.where((s) => _selectedSongs.contains(s.id)).toList();
            if (selectedSongs.isNotEmpty) {
              musicProvider.addMultipleToPlayQueue(selectedSongs);
              ScaffoldMessenger.of(context).showSnackBar(
                SnackBar(
                  content: Text('已将 ${selectedSongs.length} 首歌曲添加到播放队列'),
                  backgroundColor: Theme.of(context).colorScheme.primary,
                ),
              );
              _toggleSelectionMode();
            }
          },
          tooltip: '添加到播放队列',
        ));
        actionsWidgets.add(IconButton(
          icon: const Icon(Icons.playlist_add),
          onPressed: () {
            final musicProvider = context.read<MusicProvider>();
            final selectedSongs = musicProvider.songs.where((s) => _selectedSongs.contains(s.id)).toList();
            if (selectedSongs.isNotEmpty) {
              _showPlaylistSelectionDialogForMultiple(context, selectedSongs);
            }
          },
          tooltip: '添加到歌单',
        ));
      }
      actionsWidgets.add(IconButton(
        icon: const Icon(Icons.delete_outline),
        onPressed: _selectedSongs.isNotEmpty ? _deleteSelectedSongs : null,
        tooltip: '删除选中',
      ));
    } else {
      actionsWidgets.add(Padding(
        padding: const EdgeInsets.only(right: 8.0),
        child: ElevatedButton.icon(
          onPressed: () {
            context.read<MusicProvider>().importMusic();


me when released.
      this.setState(2);
    }
    else {
      if (this._onUpFrameName != null || this._onUpFrameID != null) {
        this.setState(4);
      }
      else {
        if (isOver) {
          this.setState(1);
        }
        else {
          this.setState(2);
        }
      }
    }

  }

  /**
   * Internal function that handles Button state changes.
   *
   * @protected
   * @method Phaser.Button.prototype.setState
   * @param {number} newState - The new State of the Button.
   */

  setState(int newState) {

    if (newState == 1) {
      //  Over
      if (this._onOverFrameName != null) {
        this.frameName = this._onOverFrameName;
      }
      else if (this._onOverFrameID != null) {
        this.frame = this._onOverFrameID;
      }
    }
    else if (newState == 2) {
      //  Out
      if (this._onOutFrameName != null) {
        this.frameName = this._onOutFrameName;
      }
      else if (this._onOutFrameID != null) {
        this.frame = this._onOutFrameID;
      }
    }
    else if (newState == 3) {
        //  Down
        if (this._onDownFrameName != null) {
          this.frameName = this._onDownFrameName;
        }
        else if (this._onDownFrameID != null) {
          this.frame = this._onDownFrameID;
        }
      }
      else if (newState == 4) {
          //  Up
          if (this._onUpFrameName != null) {
            this.frameName = this._onUpFrameName;
          }
          else if (this._onUpFrameID != null) {
            this.frame = this._onUpFrameID;
          }
        }

  }

}
part of Phaser;

class AtLimit {
  bool x = false;
  bool y = false;
}

class Camera {
  Game game;
  World world;
  int id;
  Rectangle view;
  Rectangle screenView;
  Rectangle bounds;
  Rectangle deadzone;

  /// If a Camera has roundPx set to `true` it will call `view.floor` as part of its update loop, keeping its boundary to integer values. Set this to `false` to disable this from happening.
  bool roundPx;

  bool visible;
  AtLimit atLimit;
  Sprite target;

  num _edge;

  /// Current position of the camera in world.
  Point _position;

  Point _targetPosition;

  PIXI.DisplayObject displayObject;

  Point scale;

  /**
   * The Cameras position. This value is automatically clamped if it falls outside of the World bounds.
   * @name Phaser.Camera#position
   * @property {Phaser.Point} position - Gets or sets the cameras xy position using Phaser.Point object.
   */
  //Object.defineProperty(Phaser.Camera.prototype, "position", {

  Point get position {
    this._position.set(this.view.centerX, this.view.centerY);
    return this._position;
  }

  set position(Point value) {

    if (value.x != null) {
      this.view.x = value.x;
    }
    if (value.y != null) {
      this.view.y = value.y;
    }

    if (this.bounds != null) {
      this.checkBounds();
    }
  }

  //});

  Camera(this.game, id, x, y, width, height) {

    world = game.world;

    /**
     * @property {number} id - Reserved for future multiple camera set-ups.
     * @default
     */
    this.id = 0;

    /**
     * Camera view.
     * The view into the world we wish to render (by default the game dimensions).
     * The x/y values are in


oRun(new TestToRun[] { ns }); }, match);
        }

        public void addNewEntries(List<RunInfo> list, Func<RunInfo, List<TestToRun>> getItems, Action<RunInfo, TestToRun> addItem, Func<RunInfo, RunInfo, bool> match)
        {
            list.Where(x => exists(x, match)).ToList().ForEach(x => getItems.Invoke(x).ForEach(t => addIfNew(x, t, getItems, addItem, match)));
        }

        private void addIfNew(RunInfo x, TestToRun t, Func<RunInfo, List<TestToRun>> getItems, Action<RunInfo, TestToRun> addItem, Func<RunInfo, RunInfo, bool> match)
        {
            var current = _list.Where(y => match(y, x)).First();
            if (!testExists(t, getItems, current))
                addItem(current, t);
        }

        private static bool testExists(TestToRun t, Func<RunInfo, List<TestToRun>> getItems, RunInfo current)
        {
            return getItems(current).Exists(test => compareTests(t, test));
        }

        private static bool compareTests(TestToRun a, TestToRun b)
        {
            return a.Runner.Equals(b.Runner) && a.Test.Equals(b.Test);
        }

        private void addUnexisting(List<RunInfo> list, Func<RunInfo, RunInfo, bool> match)
        {
            list.Where(x => !exists(x, match)).ToList()
                .ForEach(x => _list.Add(x));
        }

        private bool exists(RunInfo x, Func<RunInfo, RunInfo, bool> match)
        {
            return _list.Exists(y => match(y, x));
        }
    }
}


/*
 * Copyright (C) 2008 The Android Open Source Project
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 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.
 */

#include <machine/cpu-features.h>
#include <private/bionic_asm.h>
#include <private/libc_events.h>

/*
 * This code assumes it is running on a processor that supports all arm v7
 * instructions, that supports neon instructions, and that supports
 * unaligned neon instruction accesses to memory.
 */

    .fpu    neon

ENTRY(__memset_chk)


#!/usr/bin/env python3
"""
Startup script for Medical AI Logistic Regression Backend
Initializes database, generates sample data, and starts the server
"""

import os
import sys
import subprocess
import time
from pathlib import Path

def check_dependencies():
    """Check if required dependencies are installed"""
    required_packages = [
        'flask',
        'flask_sqlalchemy',
        'flask_cors',
        'numpy',
        'pandas',
        'sklearn',
        'matplotlib'
    ]

    missing_packages = []

    for package in required_packages:
        try:
            __import__(package.replace('-', '_'))
        except ImportError:
            missing_packages.append(package)

    if missing_packages:
        print("❌ Missing required packages:")
        for package in missing_packages:
            print(f"   - {package}")
        print("\n📦 Installing missing packages...")

        try:
            subprocess.check_call([
                sys.executable, '-m', 'pip', 'install', '-r', 'requirements_backend.txt'
            ])
            print("✅ Dependencies installed successfully!")
        except subprocess.CalledProcessError:
            print("❌ Failed to install dependencies. Please install manually:")
            print("   pip install -r requirements_backend.txt")
            return False

    return True

def initialize_database():
    """Initialize the database and create tables"""
    print("\n🗄  Initializing database...")

    try:
        from app import app, db

        with app.app_context():
            db.create_all()
            print("✅ Database tables created successfully!")
            return True
    except Exception as e:
        print(f"❌ Error initializing database: {e}")
        return False

def generate_sample_data():
    """Generate sample data for testing"""
    print("\n📊 Generating sample data...")

    try:
        from data_generator import MedicalDataGenerator

        generator = MedicalDataGenerator()
        generator.run_full_generation(100)  # Generate 100 sample patients

        print("✅ Sample data generated successfully!")
        return True
    except Exception as e:
        print(f"❌ Error generating sample data: {e}")
        return False

def train_model():
    """Train the logistic regression model"""
    print("\n🤖 Training medical AI model...")

    try:
        from app import app, medical_model

        with app.app_context():
            metrics = medical_model.train_model()

            if metrics:
                print("✅ Model trained successfully!")
                print(f"   Accuracy: {metrics['accuracy']:.3f}")
                print(f"   Precision: {metrics['precision']:.3f}")
                print(f"   Recall: {metrics['recall']:.3f}")
                print(f"   AUC: {metrics['auc_score']:.3f}")
                return True
            else:
                print("❌ Failed to train model")
                return False
    except Exception as e:
        print(f"❌ Error training model: {e}")
        return False

def start_server():
    """Start the Flask development server"""
    print("\n🚀 Starting Flask development server...")
    print("   Server will be available at: http://localhost:5000")
    print("   API documentation: http://localhost:5000/api/health")
    print("   Press Ctrl+C to stop the server")
    print("-" * 50)

    try:
        from app import app
        app.run(debug=True, host='0.0.0.0', port=5000)
    except KeyboardInterrupt:
        print("\n🛑 Server stopped by user")
    except Exception as e:
        print(f"❌ Error starting server: {e}")

def show_api_endpoints():
    """Display available API endpoints"""
    print("\n📋 Available API Endpoints:")
    print("-" * 40)
    endpoints = [
        ("GET  /api/health", "Health check"),
        ("POST /api/train-model", "Train the model"),
        ("POST /api/predict", "Predict diabetes risk"),
        ("GET  /api/patients", "Get all patients"),
        ("GET  /api/patients/<id>", "Get specific patient"),
        ("GET  /api/model/coefficients", "Get model coefficients"),
        ("GET  /api/model/performance", "Get model performance"),
        ("GET  /api/statistics", "Get database statistics")
    ]

    for endpoint, description in endpoints:
        print(f"   {endpoint:<25} - {description}")

def main():
    """Main startup function"""
    print("🧬 Medical AI Logistic Regression Backend")


r14
addq %r15, %rbx
movq %rbx, %r15
adcq $0, %rcx
addq %rax, %r13
adcq %rdx, %rsi
shlq $20, %rcx
shrq $44, %r15
orq %r15, %rcx
addq %rcx, %r13
movq $0xfffffffffff, %rcx
movq %r13, %rdx
adcq $0, %rsi
andq %rcx, %r11
shlq $22, %rsi
andq %rcx, %rbx
shrq $42, %rdx
orq %rdx, %rsi
lea (%rsi,%rsi,4), %rsi
addq %rsi, %r11
movq %rcx, %rsi
andq %r11, %rsi
shrq $44, %r11
addq %r11, %rbx
movq $0x3ffffffffff, %r11
andq %rbx, %rcx
andq %r11, %r13
shrq $44, %rbx
movq %rsi, %r11
movq %rcx, %rdx
addq %r13, %rbx
shrq $26, %r11
movq %rbx, %r15
shlq $18, %rdx
movq %rcx, %r14
orq %rdx, %r11
movq %rcx, %rdx
shrq $34, %rdx
movl %esi, %r13d
shlq $10, %r15
andl $67108863, %r13d
orq %r15, %rdx
andl $67108863, %r11d
shrq $8, %r14
andl $67108863, %edx
movl %edx, 112(%r10)
movq %rbx, %rdx
shrq $16, %rdx
andl $67108863, %r14d
movl %r13d, 100(%r10)
movl %r11d, 104(%r10)
movl %r14d, 108(%r10)
movl %edx, 116(%r10)
cmpq $48, %r12
jbe poly1305_init_ext_avx2_4
poly1305_init_ext_avx2_3:
movq %rsi, %rax
lea (%rbx,%rbx,4), %r15
mulq %rsi
shlq $2, %r15
movq %rax, %r13
movq %rdx, %r12
lea (%rcx,%rcx), %rax
mulq %r15
addq %rax, %r13
lea (%rsi,%rsi), %rax
movq %r15, -16(%rsp)
adcq %rdx, %r12
mulq %rcx
movq %rax, %r14
movq %rbx, %rax
movq %rdx, %r11
mulq %r15
addq %rax, %r14
movq %rcx, %rax
movq %r13, %r15
adcq %rdx, %r11
mulq %rcx
shlq $20, %r12
shrq $44, %r15
orq %r15, %r12
movq %rax, %r15
addq %r12, %r14
movq %rdx, %r12
movq %rsi, %rax
lea (%rbx,%rbx), %rdx
adcq $0, %r11
mulq %rdx
addq %rax, %r15
adcq %rdx, %r12
movq %r14, %rdx
shlq $20, %r11
shrq $44, %rdx
orq %rdx, %r11
addq %r11, %r15
movq $0xfffffffffff, %r11
movq %r15, %rdx
adcq $0, %r12
andq %r11,


());
    }
    if let Some(var_1661) = &input.initial_variant_weight {
        object.key("InitialVariantWeight").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::Float((*var_1661).into()),
        );
    }
    if let Some(var_1662) = &input.accelerator_type {
        object.key("AcceleratorType").string(var_1662.as_str());
    }
    if let Some(var_1663) = &input.core_dump_config {
        let mut object_1664 = object.key("CoreDumpConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_production_variant_core_dump_config(
            &mut object_1664,
            var_1663,
        )?;
        object_1664.finish();
    }
    if let Some(var_1665) = &input.serverless_config {
        let mut object_1666 = object.key("ServerlessConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_production_variant_serverless_config(
            &mut object_1666,
            var_1665,
        )?;
        object_1666.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_data_capture_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DataCaptureConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if input.enable_capture {
        object.key("EnableCapture").boolean(input.enable_capture);
    }
    if let Some(var_1667) = &input.initial_sampling_percentage {
        object.key("InitialSamplingPercentage").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1667).into()),
        );
    }
    if let Some(var_1668) = &input.destination_s3_uri {
        object.key("DestinationS3Uri").string(var_1668);
    }
    if let Some(var_1669) = &input.kms_key_id {
        object.key("KmsKeyId").string(var_1669);
    }
    if let Some(var_1670) = &input.capture_options {
        let mut array_1671 = object.key("CaptureOptions").start_array();
        for item_1672 in var_1670 {
            {
                let mut object_1673 = array_1671.value().start_object();
                crate::json_ser::serialize_structure_crate_model_capture_option(
                    &mut object_1673,
                    item_1672,
                )?;
                object_1673.finish();
            }
        }
        array_1671.finish();
    }
    if let Some(var_1674) = &input.capture_content_type_header {
        let mut object_1675 = object.key("CaptureContentTypeHeader").start_object();
        crate::json_ser::serialize_structure_crate_model_capture_content_type_header(
            &mut object_1675,
            var_1674,
        )?;
        object_1675.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_async_inference_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::AsyncInferenceConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_1676) = &input.client_config {
        let mut object_1677 = object.key("ClientConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_asy


          # encoding: [0xc0,0xf8,0x00,0x00,0x00,0x00]

	iihf	%r0, 0
	iihf	%r0, 0xffffffff
	iihf	%r15, 0

#CHECK: iihh	%r0, 0                  # encoding: [0xa5,0x00,0x00,0x00]
#CHECK: iihh	%r0, 32768              # encoding: [0xa5,0x00,0x80,0x00]
#CHECK: iihh	%r0, 65535              # encoding: [0xa5,0x00,0xff,0xff]
#CHECK: iihh	%r15, 0                 # encoding: [0xa5,0xf0,0x00,0x00]

	iihh	%r0, 0
	iihh	%r0, 0x8000
	iihh	%r0, 0xffff
	iihh	%r15, 0

#CHECK: iihl	%r0, 0                  # encoding: [0xa5,0x01,0x00,0x00]
#CHECK: iihl	%r0, 32768              # encoding: [0xa5,0x01,0x80,0x00]
#CHECK: iihl	%r0, 65535              # encoding: [0xa5,0x01,0xff,0xff]
#CHECK: iihl	%r15, 0                 # encoding: [0xa5,0xf1,0x00,0x00]

	iihl	%r0, 0
	iihl	%r0, 0x8000
	iihl	%r0, 0xffff
	iihl	%r15, 0

#CHECK: iilf	%r0, 0                  # encoding: [0xc0,0x09,0x00,0x00,0x00,0x00]
#CHECK: iilf	%r0, 4294967295         # encoding: [0xc0,0x09,0xff,0xff,0xff,0xff]
#CHECK: iilf	%r15, 0                 # encoding: [0xc0,0xf9,0x00,0x00,0x00,0x00]

	iilf	%r0, 0
	iilf	%r0, 0xffffffff
	iilf	%r15, 0

#CHECK: iilh	%r0, 0                  # encoding: [0xa5,0x02,0x00,0x00]
#CHECK: iilh	%r0, 32768              # encoding: [0xa5,0x02,0x80,0x00]
#CHECK: iilh	%r0, 65535              # encoding: [0xa5,0x02,0xff,0xff]
#CHECK: iilh	%r15, 0                 # encoding: [0xa5,0xf2,0x00,0x00]

	iilh	%r0, 0
	iilh	%r0, 0x8000
	iilh	%r0, 0xffff
	iilh	%r15, 0

#CHECK: iill	%r0, 0                  # encoding: [0xa5,0x03,0x00,0x00]
#CHECK: iill	%r0, 32768              # encoding: [0xa5,0x03,0x80,0x00]
#CHECK: iill	%r0, 65535              # encoding: [0xa5,0x03,0xff,0xff]
#CHECK: iill	%r15, 0                 # encoding: [0xa5,0xf3,0x00,0x00]

	iill	%r0, 0
	iill	%r0, 0x8000
	iill	%r0, 0xffff
	iill	%r15, 0

#CHECK: ipm	%r0                     # encoding: [0xb2,0


ownloadingNormalPieces.addIfNotExist(normalPieces[newWindowEnd])
            currentWindowEndIndex = newWindowEnd
        } else {
            // 如果找不到了, 那说明 currentWidowEnd 到最后的 normal piece 已经下载完了
            // 此时有两种情况
            //   1) 所有的 normal piece 都下载完了
            //   2) 前面没下完，seek 到后面, 后面的下完了
            // 从 initialPieceIndex 开始寻找下一个没 finish 的, 返回 -1 了, 那就是全都下完了

            val nextFromStart = findNextDownloadingNormalPiece(0)
            if (nextFromStart == -1) {
                // 标记全下完了, 不再尝试 fill window
                allNormalPieceDownloaded = true
            } else {
                // 继续填充前面没下完的 normal piece
                fillNormalPieceWindow(nextFromStart) // 不用 coerceIn, findNextDownloadingNormalPiece 保证
            }
        }

        priorities.downloadOnly(highPieces, downloadingNormalPieces)
    }

    /**
     * seek 到 pieceIndex 不一定会重构从 pieceIndex 开始的 window, 因为这个 piece 可能已经下载完成了
     * 要从 pieceIndex 开始找接下来 window 大小个未完成的 piece 构成 window.
     *
     * 此函数会重置 window 边界.
     */
    private fun fillNormalPieceWindow(listIndex: Int) {
        // 如果 pieceIndex 以后的 piece 都完成了, 那就没有 piece 要填充到 window 了
        val nextIndex = findNextDownloadingNormalPiece(listIndex)
        if (nextIndex == -1) return

        currentWindowStartIndex = nextIndex
        currentWindowEndIndex = nextIndex

        downloadingNormalPieces.addIfNotExist(normalPieces[currentWindowStartIndex])
        // windowSize - downloadingNormalPieces.size 是为了保证 window 内的 piece 数量总为 windowSize
        for (i in 0..<(windowSize - downloadingNormalPieces.size)) {
            val next = findNextDownloadingNormalPiece(currentWindowEndIndex + 1)
            if (next != -1) {
                downloadingNormalPieces.addIfNotExist(normalPieces[next])
                currentWindowEndIndex = next
            } else {
                // findNext 没找到, 说明所有的 piece 都下完了
                break
            }
        }
    }

    private fun PieceList.parseMetadataPieceCount(): MetadataPieceCount {
        // 如果 piece 总大小比 header 和 footer 小, 那所有 piece 都判定为 normal piece
        if (headerSize >= totalPieceSize || footerSize >= totalPieceSize) return MetadataPieceCount.Zero
        // 如果总 piece 数量只有 1, 那也是所有 piece 判定为 normal piece
        if (totalPieceCount == 1) return MetadataPieceCount.Zero
        // 如果总 piece 数量有 2, 那 header 和 footer 各一个
        if (totalPieceCount == 2) return MetadataPieceCount(1, 1)

        val headerCount: Int
        val footerCount: Int

        // 第一个在 header size 外的 piece
        val firstPieceIndexAfterHeader = pieceIndexOfFirst { it.dataStartOffset >= pieceOffsetStart + headerSize }
        if (firstPieceIndexAfterHeader == -1) {
            // 如果没找到, 那说明所有 piece 都是 header piece
            // 因此所有 piece 都判定为 normal piece 也没问题
            return MetadataPieceCount.Zero
        } else {
            headerCount = firstPieceIndexAfterHeader - initialPieceIndex
        }

        // 第一个在 footer size 之


86_64-pc-windows-msvc" => {
            println!("cargo:rustc-link-lib=discord_game_sdk");
            println!(
                "cargo:rustc-link-search={}",
                sdk_path.join("lib/x86_64").to_str().unwrap()
            );
        }

        "i686-pc-windows-gnu" | "i686-pc-windows-msvc" => {
            println!("cargo:rustc-link-lib=discord_game_sdk");
            println!(
                "cargo:rustc-link-search={}",
                sdk_path.join("lib/x86").to_str().unwrap()
            );
        }

        _ => {}
    }
}

#[derive(Debug)]
struct Callbacks;

impl bindgen::callbacks::ParseCallbacks for Callbacks {
    fn int_macro(&self, name: &str, _value: i64) -> Option<bindgen::callbacks::IntKind> {
        // Must match sys::DiscordVersion
        if name.ends_with("_VERSION") {
            Some(bindgen::callbacks::IntKind::I32)
        } else {
            None
        }
    }
}

const MISSING_SDK_PATH: &str = r#"

discord_game_sdk_sys: Hello,

You are trying to generate the bindings for the Discord Game SDK.
You will have to download the SDK yourself.
Here are the links to get it:

https://discordapp.com/developers/docs/game-sdk/sdk-starter-guide
https://dl-game-sdk.discordapp.net/latest/discord_game_sdk.zip

Once you have downloaded it, extract the contents to a folder
and set the environment variable `DISCORD_GAME_SDK_PATH` to its path.

Example:

$ export DISCORD_GAME_SDK_PATH=$HOME/Downloads/discord_game_sdk

Please report any issues you have at:
https://github.com/ldesgoui/discord_game_sdk

Thanks, and apologies for the inconvenience

"#;

const MISSING_SETUP: &str = r#"

discord_game_sdk_sys: Hello,

You are trying to link to the Discord Game SDK.
Some additional set-up is required, namely some files need to be copied for the linker:

# Linux: prepend with `lib` and add to library search path
$ cp $DISCORD_GAME_SDK_PATH/lib/x86_64/{,lib}discord_game_sdk.so
$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}$DISCORD_GAME_SDK_PATH/lib/x86_64

# Mac OS: prepend with `lib` and add to library search path
$ cp $DISCORD_GAME_SDK_PATH/lib/x86_64/{,lib}discord_game_sdk.dylib
$ export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}$DISCORD_GAME_SDK_PATH/lib/x86_64

# Windows: copy `*.dll.lib` to `*.lib` (won't affect library search)
$ cp $DISCORD_GAME_SDK_PATH/lib/x86_64/discord_game_sdk.{dll.lib,lib}
$ cp $DISCORD_GAME_SDK_PATH/lib/x86/discord_game_sdk.{dll.lib,lib}

After all this, `cargo build` and `cargo run` should function as expected.

Please report any issues you have at:
https://github.com/ldesgoui/discord_game_sdk

Thanks, and apologies for the inconvenience

"#;

const INCOMPATIBLE_PLATFORM: &str = r#"

discord_game_sdk_sys: Hello,

You are trying to link to the Discord Game SDK.
Unfortunately, the platform you are trying to target is not supported.

Please report any issues you have at:
https://github.com/ldesgoui/discord_game_sdk

Thanks, and apologies for the inconv


CAgICAgICAgICAgICAgYXV0aG9yLAogICAgICAgICAgICAgICAgY291bnRJZigoZmlsZV9leHRlbnNpb24gSU4gKCdoJywgJ2NwcCcsICdzcWwnLCAnc2gnLCAncHknLCAnZXhwZWN0JykpIEFORCAocGF0aCBMSUtFICcldGVzdHMlJykpIEFTIHRlc3QsCiAgICAgICAgICAgICAgICBjb3VudElmKChmaWxlX2V4dGVuc2lvbiBJTiAoJ2gnLCAnY3BwJywgJ3NxbCcpKSBBTkQgKE5PVCAocGF0aCBMSUtFICcldGVzdHMlJykpKSBBUyBjb2RlLAogICAgICAgICAgICAgICAgY29kZSAvIChjb2RlICsgdGVzdCkgQVMgcmF0aW9fY29kZQogICAgICAgICAgICBGUk9NIGdpdF9jbGlja2hvdXNlLmZpbGVfY2hhbmdlcwogICAgICAgICAgICBHUk9VUCBCWSBhdXRob3IKICAgICAgICAgICAgSEFWSU5HIGNvZGUgPiAyMAogICAgICAgICAgICBPUkRFUiBCWSBjb2RlIERFU0MKICAgICAgICAgICAgTElNSVQgMjAKICAgICAgICApCiAgICApIEFTIGhpc3QKU0VMRUNUCiAgICBhcnJheUpvaW4oaGlzdCkuMSBBUyBsb3dlciwKICAgIGFycmF5Sm9pbihoaXN0KS4yIEFTIHVwcGVyLAogICAgYmFyKGFycmF5Sm9pbihoaXN0KS4zLCAwLCAxMDAsIDUwMCkgQVMgYmFy)

```sql
WITH (
        SELECT histogram(10)(ratio_code) AS hist
        FROM
        (
            SELECT
                author,
                countIf((file_extension IN ('h', 'cpp', 'sql', 'sh', 'py', 'expect')) AND (path LIKE '%tests%')) AS test,
                countIf((file_extension IN ('h', 'cpp', 'sql')) AND (NOT (path LIKE '%tests%'))) AS code,
                code / (code + test) AS ratio_code
            FROM git.file_changes
            GROUP BY author
            HAVING code > 20
            ORDER BY code DESC
            LIMIT 20
        )
    ) AS hist
SELECT
    arrayJoin(hist).1 AS lower,
    arrayJoin(hist).2 AS upper,
    bar(arrayJoin(hist).3, 0, 100, 500) AS bar

┌──────────────lower─┬──────────────upper─┬─bar───────────────────────────┐
│ 0.6187853312074214 │ 0.6410053888179964 │ █████                         │
│ 0.6410053888179964 │ 0.6764177968945693 │ █████                         │
│ 0.6764177968945693 │ 0.7237343804750673 │ █████                         │
│ 0.7237343804750673 │ 0.7740802855073157 │ █████▋                        │
│ 0.7740802855073157 │  0.807297655565091 │ ████████▋                     │
│  0.807297655565091 │ 0.8338381996094653 │ ██████▎                       │
│ 0.8338381996094653 │ 0.8533566747727687 │ ████████▋                     │
│ 0.8533566747727687 │  0.871392376017531 │ █████████▍                    │
│  0.871392376017531 │  0.904916108899021 │ █████████████████████████


 new string[] { "OpenVR", "Oculus" });
        BuildPipeline.BuildPlayer(GetScenes(), "build\\win\\" + GetProjectName() + ".exe", BuildTarget.StandaloneWindows64, BuildOptions.None);

        //BuildPipeline.BuildPlayer(GetScenes(), "build\\win", BuildTarget.StandaloneWindows64, BuildOptions.Development);
     }

	static void BuildBeta()
    {
  	 EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows64);
	   RTBuildTools.AddDefine(BuildTargetGroup.Standalone, "RT_BETA");
             BuildPipeline.BuildPlayer(GetScenes(), "build\\win\\"+ GetProjectName() + ".exe", BuildTarget.StandaloneWindows64, BuildOptions.None);
   	 RTBuildTools.RemoveDefine(BuildTargetGroup.Standalone, "RT_BETA");
     }

	static void BuildRelease()
    {
  	    EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows64);
        RTBuildTools.AddDefine(BuildTargetGroup.Standalone, "RT_RELEASE");
     	BuildPipeline.BuildPlayer(GetScenes(), "build\\win\\"+ GetProjectName() + ".exe", BuildTarget.StandaloneWindows64, BuildOptions.None);
		RTBuildTools.RemoveDefine(BuildTargetGroup.Standalone, "RT_RELEASE");
     }
 }


ed[0].str)) {
        sorted.sort(order);
        invalid.clear();
      }
      const {str, saving, missing, words: ws, chains} = sorted.shift()!;
      // figure out if it's worth adding...
      if (saving <= 0) break;
      // make the abbreviation
      tableLength += str.length + 3;
      const l = abbr.length;
      const mids = new Set<string>();
      for (const w of ws) {
        const word = words[w];
        for (const mid of [word.mid, ...(alias.get(word.mid) || [])]) {
          mids.add(mid);
        }
      }
      abbr.push({
        bytes: l < 0x80 ? [l + 0x80] : [5, l - 0x80],
        mids,
        // messages: new Set([...ws].map(w => words[w].mid)),
        str,
      });

      // Blast radius: all other suffixes related to all touched words save less
      for (const i of ws) {
        for (let k = 0; k <= chains; k++) {
          const word = words[i + k];
          const used = word.bytes - (!k ? missing : 0);
          for (const suffix of word.suffixes) {
            suffix.saving -= (used - word.used);
            invalid.add(suffix.str);
          }
          word.used = used; // typically increases...
        }
      }

      // If this takes us over 0x80 then all suffixes get us one less byte of savings per use
      if (abbr.length === 0x80) {
        for (const data of suffixes.values()) {
          data.saving -= data.words.size;
        }
        sorted.sort(order);
        invalid.clear();
      }
    }
    return abbr;
  }

  async write(writer: Writer): Promise<void> {
    const uses = this.uses();
    const table = this.buildAbbreviationTable(uses);
    // plan: analyze all the msesages, finding common suffixes.
    // eligible suffixes must be followed by either space, punctuation, or eol
    // todo - reformat/flow messages based on current substitution lengths

    // build up a suffix trie based on the abbreviations.
    // const trie = new SuffixTrie<number[]>();
    // for (let i = 0, len = table.length; i < len; i++) {
    //   trie.set(table[i].str, i < 0x80 ? [i + 0x80] : [5, i - 0x80]);
    // }

    // write the abbreviation tables (all, rewriting hardcoded coderefs)
    function updateCoderef(loc: number, addr: number) {
      writeLittleEndian(writer.rom, loc, addr - 0x20000);
      // second ref is always 5 bytes later
      writeLittleEndian(writer.rom, loc + 5, addr + 1 - 0x20000);
    }

    // start at 288a5, go to 29400
    let a = 0x288a5;
    let d = a + 2 * (table.length + this.rom.items.length + this.extraWords[6].count);
    updateCoderef(0x28704, a);
    for (let i = 0, len = table.length; i < len; i++) {
      if (i === 0x80) updateCoderef(0x2868a, a);
      writeLittleEndian(writer.rom, a, d);
      a += 2;
      writeString(writer.rom, d, table[i].str);
      d += table[i].str.length;
      writer.rom[d++] = 0;
    }
    if (table.length < 0x80) updateCoderef(0x2868a, a);
    // move on to people
    updateCoderef(0x286d5, a);
    const names = this.extraWords[6];
    for (const name of names) {
      writeLittleEndian(writer.rom, a, d);
      a += 2;
      writeString(writer.rom, d, name);
      d += name.length;
      writer.rom[d++] = 0;
    }
    // finally update item names
    updateCoderef(0x286e9, a);
    updateCoderef


\s*)\s*";
        private const string mSimpleValueRE = @"(?<simplevalue>(([^\*\(\)\\])|(\\[a-fA-F0-9][a-fA-F0-9]))+?)\s*";
        private const string mSubstrAttrRE = @"(?<substrattr>(([0-2](\.[0-9]+)+)|([a-zA-Z]+([a-zA-Z0-9]|[-])*))(;([a-zA-Z0-9]|[-])+)*)\s*";
        private const string mSubstrRE = @"(?<substr>(?<substrattr>(([0-2](\.[0-9]+)+)|([a-zA-Z]+([a-zA-Z0-9]|[-])*))(;([a-zA-Z0-9]|[-])+)*)\s*\=\s*\s*(?<initialvalue>(([^\*\(\)\\])|(\\[a-fA-F0-9][a-fA-F0-9]))+?){0,1}\s*(\*\s*((?<anyvalue>(([^\*\(\)\\])|(\\[a-fA-F0-9][a-fA-F0-9]))+?)\*\s*)*)\s*(?<finalvalue>(([^\*\(\)\\])|(\\[a-fA-F0-9][a-fA-F0-9]))+?){0,1}\s*)\s*";
        private const string mValueRE = @"(([^\*\(\)\\])|(\\[a-fA-F0-9][a-fA-F0-9]))+?";

        public static ADFilter ParseFilterString(string filter)
        {
            Match match = mFilter.Match(filter);
            if (match.Success)
            {
                ADFilter filter2 = new ADFilter();
                if (match.Groups["item"].ToString().Length == 0)
                {
                    int num;
                    ArrayList list = new ArrayList();
                    for (string str = match.Groups["filterlist"].ToString().Trim(); str.Length > 0; str = str.Substring(num).TrimStart(new char[0]))
                    {
                        if (str[0] != '(')
                        {
                            return null;
                        }
                        num = 1;
                        int num2 = 1;
                        bool flag = false;
                        while ((num < str.Length) && !flag)
                        {
                            if (str[num] == '(')
                            {
                                num2++;
                            }
                            if (str[num] == ')')
                            {
                                if (num2 < 1)
                                {
                                    return null;
                                }
                                if (num2 == 1)
                                {
                                    flag = true;
                                }
                                else
                                {
                                    num2--;
                                }


 Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.fasterxml.jackson.jaxrs.yaml

Class JacksonJaxbYAMLProvider

java.lang.Object

com.fasterxml.jackson.jaxrs.base.ProviderBase<JacksonYAMLProvider,com.fasterxml.jackson.dataformat.yaml.YAMLMapper,YAMLEndpointConfig,YAMLMapperConfigurator>

com.fasterxml.jackson.jaxrs.yaml.JacksonYAMLProvider

com.fasterxml.jackson.jaxrs.yaml.JacksonJaxbYAMLProvider

All Implemented Interfaces:

com.fasterxml.jackson.core.Versioned, javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=


 invoice being generated contains a value. Any payment
	 * received for the returned [`PaymentHash`] will be required to be at least `min_value_msat`
	 * before a [`PaymentClaimable`] event will be generated, ensuring that we do not provide the
	 * sender \"proof-of-payment\" unless they have paid the required amount.
	 *
	 * `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
	 * in excess of the current time. This should roughly match the expiry time set in the invoice.
	 * After this many seconds, we will remove the inbound payment, resulting in any attempts to
	 * pay the invoice failing. The BOLT spec suggests 3,600 secs as a default validity time for
	 * invoices when no timeout is set.
	 *
	 * Note that we use block header time to time-out pending inbound payments (with some margin
	 * to compensate for the inaccuracy of block header timestamps). Thus, in practice we will
	 * accept a payment and generate a [`PaymentClaimable`] event for some time after the expiry.
	 * If you need exact expiry semantics, you should enforce them upon receipt of
	 * [`PaymentClaimable`].
	 *
	 * Note that invoices generated for inbound payments should have their `min_final_cltv_expiry_delta`
	 * set to at least [`MIN_FINAL_CLTV_EXPIRY_DELTA`].
	 *
	 * Note that a malicious eavesdropper can intuit whether an inbound payment was created by
	 * `create_inbound_payment` or `create_inbound_payment_for_hash` based on runtime.
	 *
	 * # Note
	 *
	 * If you register an inbound payment with this method, then serialize the `ChannelManager`, then
	 * deserialize it with a node running 0.0.103 and earlier, the payment will fail to be received.
	 *
	 * Errors if `min_value_msat` is greater than total bitcoin supply.
	 *
	 * If `min_final_cltv_expiry_delta` is set to some value, then the payment will not be receivable
	 * on versions of LDK prior to 0.0.114.
	 *
	 * [`create_inbound_payment`]: Self::create_inbound_payment
	 * [`PaymentClaimable`]: events::Event::PaymentClaimable
	 */
	public Result_ThirtyTwoBytesNoneZ create_inbound_payment_for_hash(byte[] payment_hash, org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry) {
		long ret = bindings.ChannelManager_create_inbound_payment_for_hash(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), min_value_msat.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry.ptr);
		Reference.reachabilityFence(this);
		Reference.reachabilityFence(payment_hash);
		Reference.reachabilityFence(min_value_msat);
		Reference.reachabilityFence(invoice_expiry_delta_secs);
		Reference.reachabilityFence(min_final_cltv_expiry);
		if (ret >= 0 && ret <= 4096) { return null; }
		Result_ThirtyTwoBytesNoneZ ret_hu_conv = Result_ThirtyTwoBytesNoneZ.constr_from_ptr(ret);
		return ret_hu_conv;
	}

	/**
	 * Gets an LDK-generated payment preimage from a payment hash and payment secret that were
	 * previously returned from [`create_inbound_payment`].
	 *
	 * [`create_inbound_payment`]: Self::create_inbound_payment
	 */
	public Result_ThirtyTwoBytesAPIErrorZ get_payment_preimage(byte[] payment_hash, byte[] payment_secret) {
		long ret = bindings.ChannelManager_get_payment_preimage(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), InternalUtils.check_arr_len(payment_se


_classification.encodeSymbol(context.m_classification, ccc, 256, classification);

    final int last_flags = (lastPoint.isEdgeOfFlightLine() ? 1 : 0) << 5
      | (lastPoint.isScanDirectionFlag() ? 1 : 0) << 4 | lastPoint.getClassificationFlags() & 0xF;
    final int flags = (point.isEdgeOfFlightLine() ? 1 : 0) << 5
      | (point.isScanDirectionFlag() ? 1 : 0) << 4 | point.getClassificationFlags() & 0xF;

    if (flags != last_flags) {
      this.changed_flags = true;
    }

    this.enc_flags.encodeSymbol(context.m_flags, last_flags, 64, flags);

    final int intensity = point.getIntensity();
    final int lastIntensity = lastPoint.getIntensity();
    if (intensity != lastIntensity) {
      this.changed_intensity = true;
    }
    context.ic_intensity.compress(context.last_intensity[cpr << 1 | gpsTimeChangeFlag], intensity,
      cpr);
    context.last_intensity[cpr << 1 | gpsTimeChangeFlag] = intensity;

    if (scan_angle_change) {
      this.changed_scan_angle = true;
      context.ic_scan_angle.compress(lastScanAngle, scanAngle, gpsTimeChangeFlag);
    }

    final short lastUserData = lastPoint.getUserData();
    final short userData = point.getUserData();
    if (userData != lastUserData) {
      this.changed_user_data = true;
    }
    this.enc_user_data.encodeSymbol(context.m_user_data, lastUserData / 4, 256, userData);

    if (point_source_change) {
      this.changed_point_source = true;
      context.ic_point_source_ID.compress(lasPointSourceID, pointSourceID);
    }

    if (gps_time_change) {
      this.changed_gps_time = true;
      writeGpsTime(gpsTime);
    }

    context.lastPoint = point;
    context.gps_time_change = gps_time_change;

    return contextIndex;

  }

  @Override
  public void writeChunkBytes() {
    final ChannelWriter writer = this.enc.getWriter();

    this.enc_channel_returns_XY.writeBytes(writer);

    this.enc_Z.writeBytes(writer);

    this.enc_classification.writeBytes(writer, this.changed_classification);

    this.enc_flags.writeBytes(writer, this.changed_flags);

    this.enc_intensity.writeBytes(writer, this.changed_intensity);

    this.enc_scan_angle.writeBytes(writer, this.changed_scan_angle);

    this.enc_user_data.writeBytes(writer, this.changed_user_data);

    this.enc_point_source.writeBytes(writer, this.changed_point_source);

    this.enc_gps_time.writeBytes(writer, this.changed_gps_time);
  }

  @Override
  public void writeChunkSizes() {
    final ChannelWriter writer = this.enc.getWriter();

    this.enc_channel_returns_XY.writeSize(writer, true);

    this.enc_Z.writeSize(writer, true);

    this.enc_classification.writeSize(writer, this.changed_classification);

    this.enc_flags.writeSize(writer, this.changed_flags);

    this.enc_intensity.writeSize(writer, this.changed_intensity);

    this.enc_scan_angle.writeSize(writer, this.changed_scan_angle);

    this.enc_user_data.writeSize(writer, this.changed_user_data);

    this.enc_point_source.writeSize(writer, this.changed_point_source);

    t


 of QTYPE

		question.QNAME = qname

		question.QTYPE = binary.BigEndian.Uint16(data[currentByte : currentByte+2])

		currentByte += 2 // Increment to start of QCLASS

		question.QCLASS = binary.BigEndian.Uint16(data[currentByte : currentByte+2])

		currentByte += 2 // Final increment to byte after current question

		questions = append(questions, question)
	}

	return questions, uint16(currentByte)
}

func parseRecords(data []byte, numAnswers uint16, currentByte uint16) ([]ResourceRecord, uint16) {
	var records []ResourceRecord

	for range numAnswers {
		var record ResourceRecord
		name, start := parseDomainName(data, currentByte)

		record.Name = name

		currentByte = uint16(start + 1) // Increment to start of TYPE

		record.Type = binary.BigEndian.Uint16(data[currentByte : currentByte+2])
		currentByte += 2 // Increment to start of CLASS

		record.Class = binary.BigEndian.Uint16(data[currentByte : currentByte+2])
		currentByte += 2 // Increment to start of TTL

		record.TTL = binary.BigEndian.Uint32(data[currentByte : currentByte+4])
		currentByte += 4 // Increment to start of RDLENGTH

		record.RDLENGTH = binary.BigEndian.Uint16(data[currentByte : currentByte+2])
		currentByte += 2 // Increment to start of RDATA

		record.RDATA = data[currentByte : currentByte+record.RDLENGTH]
		currentByte += record.RDLENGTH // Increment to byte after current record

		records = append(records, record)
	}

	return records, currentByte
}

func parseDomainName(data []byte, startIdx uint16) ([]byte, int) {
	result := []byte{}
	byteIsContent := false
	for {
		var labelLen byte

		if !byteIsContent {
			if (data[startIdx] & 0b1100_0000) == 0b1100_0000 {
				pointer := (binary.BigEndian.Uint16([]byte{data[startIdx], data[startIdx+1]}) & 0b0011_1111_1111_1111)
				offset := byte(pointer) - 12 // Since we sliced off the header data, we need to adjust the pointerOffset so that it is pointing to the correct data
				decompressedData, _ := parseDomainName(data, uint16(offset))
				result = append(result, decompressedData...)
				startIdx++ // Increment to the 2nd (last) byte of the pointer
				break
			}

			labelLen = data[startIdx]

			result = append(result, labelLen)

			if labelLen == 0 { // Null termination byte
				break
			} else {
				startIdx++
			}
		}

		nextNonContentByte := startIdx + uint16(labelLen)
		for idx := startIdx; idx < nextNonContentByte; idx++ {
			result = append(result, data[idx])
			startIdx++
		}

		byteIsContent = false
	}

	return result, int(startIdx)
}
package main

// Ray represents a ray with an origin and direction vector.
type Ray struct {
	Orig Point3
	Dir  Vec3
}

// NewRay creates a new ray with the given origin and direction.
func NewRay(origin Point3, direction Vec3) Ray {
	return Ray{
		Orig: origin,
		Dir:  direction,
	}
}

// Origin returns the ray's origin point.
func (r Ray) Origin


ndrev.utils.identifier
import net.minecraft.entity.player.PlayerEntity
import net.minecraft.entity.player.PlayerInventory
import net.minecraft.screen.ScreenHandlerContext

class PulverizerFactoryScreenHandler(
    syncId: Int,
    playerInventory: PlayerInventory,
    ctx: ScreenHandlerContext
) :
    IRGuiScreenHandler(
        PULVERIZER_FACTORY_HANDLER,
        syncId,
        playerInventory,
        ctx
    ) {
    init {
        val root = WGridPanel()
        setRootPanel(root)
        configure("block.indrev.pulverizer_factory", ctx, playerInventory, blockInventory, widgetPos = 0.15)
        withBlockEntity<PulverizerFactoryBlockEntity> { blockEntity ->
            val slotsAmount = 5
            val offset = 2.2

            for ((index, slot) in blockEntity.inventoryComponent!!.inventory.inputSlots.withIndex()) {
                val inputSlot = WItemSlot.of(blockInventory, slot)
                root.add(inputSlot, offset + (index * 1.4), 0.6)
            }

            for (i in 0 until slotsAmount) {
                val processWidget = upProcessBar(blockEntity, PulverizerFactoryBlockEntity.CRAFTING_COMPONENT_START_ID + i)
                root.add(processWidget, offset + (i * 1.4), 1.7)
            }

            for ((index, slot) in blockEntity.inventoryComponent!!.inventory.outputSlots.withIndex()) {
                val outputSlot = WItemSlot.of(blockInventory, slot)
                root.add(outputSlot, offset + (index * 1.4), 2.9)
                outputSlot.addChangeListener { _, _, _, _ ->
                    val player = playerInventory.player
                    if (!player.world.isClient) {
                        blockEntity.dropExperience(player)
                    }
                }
                outputSlot.isInsertingAllowed = false
            }
        }
        root.validate(this)
    }

    override fun canUse(player: PlayerEntity?): Boolean = true

    companion object {
        val SCREEN_ID = identifier("pulverizer_factory_screen")
    }
}package me.steven.indrev.gui.screenhandlers.machines

import io.github.cottonmc.cotton.gui.widget.WGridPanel
import io.github.cottonmc.cotton.gui.widget.WItemSlot
import me.steven.indrev.blockentities.crafters.CondenserBlockEntity
import me.steven.indrev.gui.screenhandlers.CONDENSER_HANDLER
import me.steven.indrev.gui.screenhandlers.IRGuiScreenHandler
import me.steven.indrev.gui.widgets.machines.fluidTank
import me.steven.indrev.gui.widgets.machines.processBar
import me.steven.indrev.utils.add
import me.steven.indrev.utils.configure
import me.steven.indrev.utils.identifier
import net.minecraft.entity.player.PlayerEntity
import net.minecraft.entity.player.PlayerInventory
import net.minecraft.screen.ScreenHandlerContext

class CondenserScreenHandler(syncId: Int, playerInventory: PlayerInventory, ctx: ScreenHandlerContext) :
    IRGuiScreenHandler(
        CONDENSER_HANDLER,
        syncId,
        playerInventory,
        ctx
    ) {
    init {
        val root = WGridPanel()
        setRootPanel(root)
        configure("block.indrev.condenser", ctx, playerInventory, blockInventory)

        withBlockEntity<CondenserBlockEntity> { be ->
            val fluid = fluidTank(be, CondenserBlockEntity.INPUT_TANK_ID)
            root.add(fluid, 2.8, 1.0)

            val processWidget = processBar(be, CondenserBlockEntity.CRAFTING_COMPONENT_ID)
            root.add(processWidget