when the driver must be specifically instructed to display each video frame passed to it rather than playing a sequence of video frames.

## -see-also

Video Compression Macros

Video Compression Manager---
UID: NC:vfw.CAPWAVECALLBACK
title: CAPWAVECALLBACK (vfw.h)
description: The capWaveStreamCallback function is the callback function used with streaming capture to optionally process buffers of audio data. The name capWaveStreamCallback is a placeholder for the application-supplied function name.
helpviewer_keywords: ["CAPWAVECALLBACK","_win32_capWaveStreamCallback","capWaveStreamCallback","capWaveStreamCallback callback","capWaveStreamCallback callback function [Windows Multimedia]","multimedia.capwavestreamcallback","vfw/capWaveStreamCallback"]
old-location: multimedia\capwavestreamcallback.htm
tech.root: Multimedia
ms.assetid: e7047d3d-9393-4611-a034-d36d6e92ee01
ms.date: 12/05/2018
ms.keywords: CAPWAVECALLBACK, _win32_capWaveStreamCallback, capWaveStreamCallback, capWaveStreamCallback callback, capWaveStreamCallback callback function [Windows Multimedia], multimedia.capwavestreamcallback, vfw/capWaveStreamCallback
req.header: vfw.h
req.include-header:
req.target-type: Windows
req.target-min-winverclnt: Windows 2000 Professional [desktop apps only]
req.target-min-winversvr: Windows 2000 Server [desktop apps only]
req.kmdf-ver:
req.umdf-ver:
req.ddi-compliance:
req.unicode-ansi:
req.idl:
req.max-support:
req.namespace:
req.assembly:
req.type-library:
req.lib:
req.dll:
req.irql:
targetos: Windows
req.typenames:
req.redist:
ms.custom: 19H1
f1_keywords:
 - CAPWAVECALLBACK
 - vfw/CAPWAVECALLBACK
dev_langs:
 - c++
topic_type:
 - APIRef
 - kbSyntax
api_type:
 - UserDefined
api_location:
 - Vfw.h
api_name:
 - capWaveStreamCallback
---

# CAPWAVECALLBACK callback function

## -description

The capWaveStreamCallback function is the callback function used with streaming capture to optionally process buffers of audio data. The name capWaveStreamCallback is a placeholder for the application-supplied function name.

To set the callback, send the WM_CAP_SET_CALLBACK_WAVESTREAM message to the capture window or call the capSetCallbackOnWaveStream macro.

## -parameters

### -param hWnd

Handle to the capture window associated with the callback function.

### -param lpWHdr

Pointer to a WAVEHDR structure containing information about the captured audio data.

## -remarks

The capture window calls a wave stream callback function when an audio buffer is marked done by the waveform-audio driver. When capturing to disk, this will precede the disk write operation.

## -see-also

Video Capture

Vide


By(getHasName(ingotItem), condition) to ntm("${getItemName(plate)}_from_pressing_${getItemName(ingotItem)}")
            }
            addRule { tagGroup ->
                val wire = tagGroup.materialGroup.wire() ?: return@addRule null
                val (ingotTag, ingotItem) = tagGroup.ingotTagAndItem()
                val (ingredient, condition) = ingredientAndConditionOf(ingotTag, ingotItem) ?: return@addRule null
                PressRecipeBuilder(wire, PressingRecipe.StampType.WIRE, .2F, 8).requires(ingredient).group(getItemName(wire)).unlockedBy(getHasName(ingotItem), condition) to ntm("${getItemName(wire)}_from_pressing_${getItemName(ingotItem)}")
            }
        }.build(consumer)

        flatPressRecipe(NTechTags.Items.BIOMASS, NTechItems.compressedBiomass.get(), "biomass", .1F, consumer)
        flatPressRecipe(NTechTags.Items.DUSTS_COAL, Items.COAL, "coal_powder", .2F, consumer)
        flatPressRecipe(NTechTags.Items.DUSTS_LAPIS, Items.LAPIS_LAZULI, "lapis_powder", .2F, consumer)
        flatPressRecipe(NTechTags.Items.DUSTS_DIAMOND, Items.DIAMOND, "diamond_powder", .2F, consumer)
        flatPressRecipe(NTechTags.Items.DUSTS_EMERALD, Items.EMERALD, "emerald_powder", .2F, consumer)
        flatPressRecipe(NTechTags.Items.DUSTS_QUARTZ, Items.QUARTZ, "quartz_powder", .2F, consumer)
        flatPressRecipe(NTechTags.Items.DUSTS_LIGNITE, NTechItems.ligniteBriquette.get(), "lignite_powder", .1F, consumer)
        flatPressRecipe(NTechItems.denseCoalCluster.get(), Items.DIAMOND, 2F, consumer)

        pressRecipe(NTechItems.basicCircuitAssembly.get(), PressingRecipe.StampType.CIRCUIT, NTechItems.basicCircuit.get(), 1, .75F, consumer)
    }

    private fun blasting(actualConsumer: Consumer<FinishedRecipe>) {
        val consumer = SubDirectories.BLASTING.createPipe(actualConsumer)

        blastingRecipe(Tags.Items.INGOTS_IRON, Items.COAL, NTechItems.steelIngot.get(), .25F, 2, "iron_ingot", consumer)
        blastingRecipe(Tags.Items.INGOTS_COPPER, Tags.Items.DUSTS_REDSTONE, NTechItems.redCopperIngot.get(), .25F, 2, "copper_ingot", "redstone", consumer)
        blastingRecipe(NTechTags.Items.INGOTS_RED_COPPER, NTechTags.Items.INGOTS_STEEL, NTechItems.advancedAlloyIngot.get(), .5F, 2, "red_copper_ingot", "steel_ingot",consumer)
        blastingRecipe(NTechTags.Items.INGOTS_TUNGSTEN, Items.COAL, NTechItems.neutronReflector.get(), .5F, 2, "tungsten_ingot", consumer)
        blastingRecipe(NTechTags.Items.INGOTS_LEAD, Tags.Items.INGOTS_COPPER, NTechItems.neutronReflector.get(), .25F, 4, "lead_ingot", "copper_ingot", consumer)
        blastingRecipe(NTechTags.Items.PLATES_LEAD, NTechTags.Items.PLATES_COPPER, NTechItems.neutronReflector.get(), .5F, 1, "lead_plate", "copper_plate", consumer)
        blastingRecipe(NTechTags.Items.INGOTS_STEEL, NTechTags.Items.INGOTS_TUNGSTEN, NTechItems.highSpeedSteelIngot.get(), .5F, 2, "steel_ingot", "tung


022 The Matrix.org Foundation C.I.C.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#}

{% set cnt = counter() %}

{% macro new_id() -%}
  form-{{- cnt.next() -}}
{%- endmacro %}

{% macro attributes(field, default_value=None) -%}
  {%- set value = field.value | default(default_value) -%}
  name="{{ field.name }}" id="{{ field.id }}"
  {%- if field.errors is not empty %} data-invalid{% endif %}
  {%- if value %} value="{{ value }}" {% endif %}
{%- endmacro %}

{% macro field(label, name, form_state=false, class="", inline=false) %}
  {% set field_id = new_id() %}
  {% if not form_state %}
    {% set form_state = {"fields": {}} %}
  {% endif %}

  {% set state = form_state.fields[name] | default({"errors": [], "value": ""}) %}
  {% set field = {
    "id": new_id(),
    "name": name,
    "errors": state.errors,
    "value": state.value,
  } %}

    {% if not inline %}
      {{ label }}

      {{ caller(field) }}
    {% else %}

        {{ caller(field) }}

        {{ label }}
    {% endif %}

    {% if field.errors is not empty %}
      {% for error in field.errors %}
        {% if error.kind != "unspecified" %}

            {% if error.kind == "required" %}
              {{ _("mas.errors.field_required") }}
            {% elif error.kind == "exists" and field.name == "username" %}
              {{ _("mas.errors.username_taken") }}
            {% elif error.kind == "policy" %}
              {{ _("mas.errors.denied_policy", policy=error.message) }}
            {% elif error.kind == "password_mismatch" %}
              {{ _("mas.errors.password_mismatch") }}
            {% else %}
              {{ error.kind }}
            {% endif %}

        {% endif %}
      {% endfor %}
    {% endif %}

    {% if inline %}

    {% endif %}

{% endmacro %}

{% macro separator() %}

{{ _("mas.or_separator") }}

{% endmacro %}
{#
Copyright 2021-2023 The Matrix.org Foundation C.I.C.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.


, including those inherited from the provider `defaultTags` configuration block.
func (o KxScalingGroupOutput) TagsAll() pulumi.StringMapOutput {
	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
}

type KxScalingGroupArrayOutput struct{ *pulumi.OutputState }

func (KxScalingGroupArrayOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*[]*KxScalingGroup)(nil)).Elem()
}

func (o KxScalingGroupArrayOutput) ToKxScalingGroupArrayOutput() KxScalingGroupArrayOutput {
	return o
}

func (o KxScalingGroupArrayOutput) ToKxScalingGroupArrayOutputWithContext(ctx context.Context) KxScalingGroupArrayOutput {
	return o
}

func (o KxScalingGroupArrayOutput) Index(i pulumi.IntInput) KxScalingGroupOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *KxScalingGroup {
		return vs[0].([]*KxScalingGroup)[vs[1].(int)]
	}).(KxScalingGroupOutput)
}

type KxScalingGroupMapOutput struct{ *pulumi.OutputState }

func (KxScalingGroupMapOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*map[string]*KxScalingGroup)(nil)).Elem()
}

func (o KxScalingGroupMapOutput) ToKxScalingGroupMapOutput() KxScalingGroupMapOutput {
	return o
}

func (o KxScalingGroupMapOutput) ToKxScalingGroupMapOutputWithContext(ctx context.Context) KxScalingGroupMapOutput {
	return o
}

func (o KxScalingGroupMapOutput) MapIndex(k pulumi.StringInput) KxScalingGroupOutput {
	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *KxScalingGroup {
		return vs[0].(map[string]*KxScalingGroup)[vs[1].(string)]
	}).(KxScalingGroupOutput)
}

func init() {
	pulumi.RegisterInputType(reflect.TypeOf((*KxScalingGroupInput)(nil)).Elem(), &KxScalingGroup{})
	pulumi.RegisterInputType(reflect.TypeOf((*KxScalingGroupArrayInput)(nil)).Elem(), KxScalingGroupArray{})
	pulumi.RegisterInputType(reflect.TypeOf((*KxScalingGroupMapInput)(nil)).Elem(), KxScalingGroupMap{})
	pulumi.RegisterOutputType(KxScalingGroupOutput{})
	pulumi.RegisterOutputType(KxScalingGroupArrayOutput{})
	pulumi.RegisterOutputType(KxScalingGroupMapOutput{})
}
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***

package finspace

import (
	"context"
	"reflect"

	"errors"
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/internal"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

// Resource for managing an AWS FinSpace Kx Volume.
//
// ## Example Usage
//
// ### Basic Usage
//
// ```go
// package main
//
// import (
//
//	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/finspace"
//	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
//	func main() {
//		pulumi.Run(func(ctx *pulumi.Context) error {
//			_, err := finspace.NewKxVolume(ctx, "example", &finspace.KxVolumeArgs{
//				Name:          pulumi.String("my-tf-kx-volume"),
//				EnvironmentId: pulumi.Any(exampleAwsFinspaceKxEnvironment.Id),
//				AvailabilityZones: pulumi.StringArray{
//					pulumi.String("use1-az2"),
//				},
//				AzMode: pulumi.Stri


import pyperclip  # Clipboard module
import re  # Regular expression module

# Get the text from the clipboard
text = str(pyperclip.paste())

# Empty list to store matches
matches = []

def PhoneNumCheck():
    # Regular expression for matching phone numbers
    PhnNumregex = re.compile(
        r"""
        (\(?(\+?\d{1,3})\)?  # area code
        [\s_.-]?)             # separator or space
        (\d{3})                # first three digits
        [\s_.-]?               # separator or space
        (\d{3})                # second three digits
        [\s_.-]?               # separator or space
        (\d{4,5})              # last four/five digits
    """,
        re.VERBOSE,
    )  # VERBOSE is used to ignore whitespace and comments inside the regex string

    # Loop through the phone numbers found in the text
    for num in PhnNumregex.findall(text):
        if num[1] != "":
            PhoneNum = "(" + num[1] + ")"  # Add area code in brackets
        else:
            PhoneNum = ""
        PhoneNum += "-".join([num[2], num[3], num[4]])  # Join the digits with dashes
        matches.append(PhoneNum)

def EmailCheck():
    # Regular expression for matching email addresses
    emailCheck = re.compile(
        r"""
        ([a-zA-Z0-9._%-]+        # username
        @                        # @ character
        [a-zA-Z0-9_-]+           # domain name
        \.                       # .(dot)
        [a-zA-Z]{2,3}            # domain type
        (\.[a-zA-Z]{2,3})?)      # second domain type like co.in
    """,
        re.VERBOSE,
    )

    # Loop through the email addresses found in the text
    for emails in emailCheck.findall(text):
        matches.append(emails[0])

# Print the output from matches list
def PrintMatches():
    if len(matches) > 0:
        print("Found matches: " + str(len(matches)))
        for i in range(0, len(matches)):
            print(matches[i])
    else:
        print("***No Phone Number or Email Address found.***")

def main():
    # Call functions to check for phone numbers and email addresses
    PhoneNumCheck()
    EmailCheck()

    # Print the matches
    PrintMatches()

if __name__ == "__main__":
    main()


Angles)
textY    <- textRad * sin(csAngles)
text(x=textX, y=textY, labels=dTabFreq)
```

![plot of chunk rerDiagCategorical06](../content/assets/figure/rerDiagCategorical06-1.png)

### 3-D pie-chart

```r
library(plotrix)
pie3D(dTab, theta=pi/4, explode=0.1, labels=names(dTab))
```

![plot of chunk rerDiagCategorical07](../content/assets/figure/rerDiagCategorical07-1.png)

Conditional density plot
-------------------------

```r
N    <- 100
X    <- rnorm(N, 175, 7)
Y    <- 0.5*X + rnorm(N, 0, 6)
Yfac <- cut(Y, breaks=c(-Inf, median(Y), Inf), labels=c("lo", "hi"))
myDf <- data.frame(X, Yfac)
```

```r
cdplot(Yfac ~ X, data=myDf)
```

![plot of chunk rerDiagCategorical08](../content/assets/figure/rerDiagCategorical08-1.png)

Useful packages
-------------------------

More plot types for categorical data are available in packages [`vcd`](http://cran.r-project.org/package=vcd) and [`vcdExtra`](http://cran.r-project.org/package=vcdExtra).

Detach (automatically) loaded packages (if possible)
-------------------------

```r
try(detach(package:plotrix))
```

Get the article source from GitHub
----------------------------------------------

[R markdown](https://github.com/dwoll/RExRepos/raw/master/Rmd/diagCategorical.Rmd) - [markdown](https://github.com/dwoll/RExRepos/raw/master/md/diagCategorical.md) - [R code](https://github.com/dwoll/RExRepos/raw/master/R/diagCategorical.R) - [all posts](https://github.com/dwoll/RExRepos/)
---
license: Creative Commons BY-SA
author: Daniel Wollschlaeger
title: "t-tests"
categories: [Univariate]
rerCat: Univariate
tags: [tTests]
---

TODO
-------------------------

 - link to resamplingPerm

One-sample $t$-test
-------------------------

### Test

```r
set.seed(123)
N    <- 100
DV   <- rnorm(N, 5, 20)
muH0 <- 0
t.test(DV, alternative="two.sided", mu=muH0)
```

```

	One Sample t-test

data:  DV
t = 3.7292, df = 99, p-value = 0.0003203
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
  3.185669 10.430568
sample estimates:
mean of x
 6.808118
```

### Effect size estimate (Cohen's $d$)

```r
(d <- (mean(DV) - muH0) / sd(DV))
```

```
[1] 0.3729185
```

Two-sample $t$-test for independent samples
-------------------------

### $t$-Test

```r
Nj     <- c(18, 21)
DVm    <- rnorm(Nj[1], 180, 10)
DVf    <- rnorm(Nj[2], 175, 6)
tIndDf <- data.frame(DV=c(DVm, DVf),
                     IV=factor(rep(c("f", "m"), Nj)))
```

```r
t.test(DVf, DVm, alternative="less", var.equal=TRUE)
```

```r
t.test(DV ~ IV, alternative="greater", var.equal=TRUE, data=tIndDf)
```

```

	Two Sample t-test

data:  DV by IV
t = 1.1137, df = 37, p-value = 0.1363
alternative hypothesis: t


ogether with option '-q'")
      assert.has_error(function()
         parser:parse{"-v", "--quiet"}
      end, "option '--quiet' can not be used together with option '-v'")
   end)

   it("raises an error if mutex with an argument is broken", function()
      local parser = Parser()
      parser:mutex(
         parser:flag "-q" "--quiet"
            :description "Supress output.",
         parser:argument "log"
            :args "?"
            :description "Log file"
      )

      assert.has_error(function()
         parser:parse{"-q", "log.txt"}
      end, "argument 'log' can not be used together with option '-q'")
      assert.has_error(function()
         parser:parse{"log.txt", "--quiet"}
      end, "option '--quiet' can not be used together with argument 'log'")
   end)

   it("handles multiple mutexes", function()
      local parser = Parser()
      parser:mutex(
         parser:flag "-q" "--quiet",
         parser:flag "-v" "--verbose"
      )
      parser:mutex(
         parser:flag "-l" "--local",
         parser:option "-f" "--from"
      )

      local args = parser:parse{"-qq", "-fTHERE"}
      assert.same({quiet = true, from = "THERE"}, args)
      args = parser:parse{"-vl"}
      assert.same({verbose = true, ["local"] = true}, args)
   end)

   it("handles mutexes in commands", function()
      local parser = Parser()
      parser:mutex(
         parser:flag "-q" "--quiet",
         parser:flag "-v" "--verbose"
      )
      local install = parser:command "install"
      install:mutex(
         install:flag "-l" "--local",
         install:option "-f" "--from"
      )

      local args = parser:parse{"install", "-l"}
      assert.same({install = true, ["local"] = true}, args)
      assert.has_error(function()
         parser:parse{"install", "-qlv"}
      end, "option '-v' can not be used together with option '-q'")
   end)
end)


p", MatchData::regexp, sys::mrb_args_none());
    match_data
        .borrow_mut()
        .add_method("size", MatchData::length, sys::mrb_args_none());
    match_data
        .borrow_mut()
        .add_method("string", MatchData::string, sys::mrb_args_none());
    match_data
        .borrow_mut()
        .add_method("to_a", MatchData::to_a, sys::mrb_args_none());
    match_data
        .borrow_mut()
        .add_method("to_s", MatchData::to_s, sys::mrb_args_none());
    match_data
        .borrow_mut()
        .add_method("end", MatchData::end, sys::mrb_args_req(1));
    match_data.borrow().define(&interp)?;
    Ok(())
}

#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub struct Region {
    start: usize,
    end: usize,
}

#[derive(Debug, Clone)]
pub struct MatchData {
    string: Vec<u8>,
    regexp: Regexp,
    region: Region,
}

impl RustBackedValue for MatchData {
    fn ruby_type_name() -> &'static str {
        "MatchData"
    }
}

impl MatchData {
    pub fn new(string: Vec<u8>, regexp: Regexp, start: usize, end: usize) -> Self {
        let region = Region { start, end };
        Self {
            string,
            regexp,
            region,
        }
    }

    pub fn set_region(&mut self, start: usize, end: usize) {
        self.region = Region { start, end };
    }

    unsafe extern "C" fn begin(mrb: *mut sys::mrb_state, slf: sys::mrb_value) -> sys::mrb_value {
        let begin = mrb_get_args!(mrb, required = 1);
        let interp = unwrap_interpreter!(mrb);
        let value = Value::new(&interp, slf);
        let result = begin::Args::extract(&interp, Value::new(&interp, begin))
            .and_then(|args| begin::method(&interp, args, &value));
        match result {
            Ok(result) => result.inner(),
            Err(exception) => exception::raise(interp, exception),
        }
    }

    unsafe extern "C" fn captures(mrb: *mut sys::mrb_state, slf: sys::mrb_value) -> sys::mrb_value {
        mrb_get_args!(mrb, none);
        let interp = unwrap_interpreter!(mrb);
        let value = Value::new(&interp, slf);
        let result = captures::method(&interp, &value);
        match result {
            Ok(result) => result.inner(),
            Err(exception) => exception::raise(interp, exception),
        }
    }

    unsafe extern "C" fn element_reference(
        mrb: *mut sys::mrb_state,
        slf: sys::mrb_value,
    ) -> sys::mrb_value {
        let (elem, len) = mrb_get_args!(mrb, required = 1, optional = 1);
        let interp = unwrap_interpreter!(mrb);
        let value = Value::new(&interp, slf);
        let result = element_reference::Args::num_captures(&interp, &value)
            .and_then(|num_captures| {
                element_reference::Args::extract(
                    &interp,
                    Value::new(&interp, elem),
                    len.map(|len| Value::new(&interp, len)),
                    num_captures,
                )
            })
            .and_then(|args| element_reference::method(&interp, args, &value));
        match result {
            Ok(result) => result.inner(),


函数--监听页面隐藏
	 */
	onHide: function () {

	},

	/**
	 * 生命周期函数--监听页面卸载
	 */
	onUnload: function () {

	},

	bindScanTap: function (e) {
		let meetId = this.data.meetId;
		wx.scanCode({
			async success(res) {
				console.log(res)
				if (!res ||
					!res.result ||
					!res.result.includes('meet=') ||
					res.result.length != 20) {
					pageHelper.showModal('错误的预约码，请重新扫码');
					return;
				}

				let code = res.result.replace('meet=', '');
				let params = {
					meetId,
					code
				};
				let options = {
					title: '预约码核销中'
				}
				await cloudHelper.callCloudSumbit('admin/join_scan', params, options).then(res => {
					pageHelper.showModal('核销成功');

				}).catch(err => {
					console.log(err);
				});
			},
			fail(err) {
				if (err && err.errMsg == 'scanCode:fail')
					pageHelper.showModal('预约码核销错误，请重新扫码');
			}
		});
	}
})const AdminBiz = require('../../../../biz/admin_biz.js');
const pageHelper = require('../../../../helper/page_helper.js');
const dataHelper = require('../../../../helper/data_helper.js');
const timeHelper = require('../../../../helper/time_helper.js');
const cloudHelper = require('../../../../helper/cloud_helper.js');
const AdminMeetBiz = require('../../../../biz/admin_meet_biz.js');
const setting = require('../../../../setting/setting.js');

Page({

	/**
	 * 页面的初始数据
	 */
	data: {
		daysTimeOptions: AdminMeetBiz.getDaysTimeOptions(),

		multiDoDay: [], //当前选择

		hasDays: [], //超时有数据(simple)
		lastHasDays: [], //超时有数据(full)
		hasJoinDays: [], //未超时有预约

		days: [
			/*{
						day: '2021-12-11',
						dayDesc: '12月11日 (周五)',
						times: [{
							mark: '',
							start: '10:15', //开始
							end: '23:59', // 结束
							limit: 50, //人数限制
							isLimit: false,
						}]
					}, {
						day: '2022-01-11',
						dayDesc: '1月11日 (周日)',
						times: [{
							mark: '',
							start: '00:00', //开始
							end: '23:59', // 结束
							limit: 89, //人数限制
							isLimit: true
						}]
					}*/
		],

		curIdx: -1, // 当前操作的日子索引
		curTimesIdx: -1, // 当前操作的时段索引

		curTimeLimitModalShow: false,
		curTimeIsLimit: false, // 当前操作是否限制人数
		curTimeLimit: 50, // 当前时段人数限制

		saveTempModalShow: false,
		formTempName: '',

		cancelModalShow: false, //删除对话框
		formReason: '', //取消理由
	},

	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad: async function (options) {
		if (!AdminBiz.isAdmin(this)) return;

		let parent = pageH


unction getHeaderTime() {
  console.log(this.getResponseHeader("Last-Modified"));
}

var xhr = new XMLHttpRequest();
xhr.open('HEAD', 'yourpage.html');
xhr.onload = getHeaderTime;
xhr.send();
```

如果有多个字段同名，它们的值会被连接为一个字符串，每个字段之间使用“逗号+空格”分隔。

### XMLHttpRequest.getAllResponseHeaders()

`XMLHttpRequest.getAllResponseHeaders()`方法返回一个字符串，表示服务器发来的所有 HTTP 头信息。格式为字符串，每个头信息之间使用`CRLF`分隔（回车+换行），如果没有收到服务器回应，该属性为`null`。如果发生网络错误，该属性为空字符串。

```javascript
var xhr = new XMLHttpRequest();
xhr.open('GET', 'foo.txt', true);
xhr.send();

xhr.onreadystatechange = function () {
  if (this.readyState === 4) {
    var headers = xhr.getAllResponseHeaders();
  }
}
```

上面代码用于获取服务器返回的所有头信息。它可能是下面这样的字符串。

```http
date: Fri, 08 Dec 2017 21:04:30 GMT\r\n
content-encoding: gzip\r\n
x-content-type-options: nosniff\r\n
server: meinheld/0.6.1\r\n
x-frame-options: DENY\r\n
content-type: text/html; charset=utf-8\r\n
connection: keep-alive\r\n
strict-transport-security: max-age=63072000\r\n
vary: Cookie, Accept-Encoding\r\n
content-length: 6502\r\n
x-xss-protection: 1; mode=block\r\n
```

然后，对这个字符串进行处理。

```javascript
var arr = headers.trim().split(/[\r\n]+/);
var headerMap = {};

arr.forEach(function (line) {
  var parts = line.split(': ');
  var header = parts.shift();
  var value = parts.join(': ');
  headerMap[header] = value;
});

headerMap['content-length'] // "6502"
```

### XMLHttpRequest.abort()

`XMLHttpRequest.abort()`方法用来终止已经发出的 HTTP 请求。调用这个方法以后，`readyState`属性变为`4`，`status`属性变为`0`。

```javascript
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://www.example.com/page.php', true);
setTimeout(function () {
  if (xhr) {
    xhr.abort();
    xhr = null;
  }
}, 5000);
```

上面代码在发出5秒之后，终止一个 AJAX 请求。

## XMLHttpRequest 实例的事件

### readyStateChange 事件

`readyState`属性的值发生改变，就会触发 readyStateChange 事件。

我们可以通过`onReadyStateChange`属性，指定这个事件的监听函数，对不同状态进行不同处理。尤其是当状态变为`4`的时候，表示通信成功，这时回调函数就可以处理服务器传送回来的数据。

### progress 事件

上传文件时


44.8 43.826h-99.851c16.34 17.048 18.346 49.766-6.299 70.944 14.288 22.829 2.147 53.017-16.45 62.315C353.574 425.878 322.654 448 272 448c-2.746 0-13.276-.203-16-.195-61.971.168-76.894-31.065-123.731-38.315C120.596 407.683 112 397.599 112 385.786V214.261l.002-.001c.011-18.366 10.607-35.889 28.464-43.845 28.886-12.994 95.413-49.038 107.534-77.323 7.797-18.194 21.384-29.084 40-29.092 34.222-.014 57.752 35.098 44.119 66.908-3.583 8.359-8.312 16.67-14.153 24.918H467.2c23.45 0 44.8 20.543 44.8 43.826zM96 200v192c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24zM68 368c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z"/></svg>';
  static const String hand_point_up =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="384" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 384 512"><path fill="currentColor" d="M135.652 0c23.625 0 43.826 20.65 43.826 44.8v99.851c17.048-16.34 49.766-18.346 70.944 6.299 22.829-14.288 53.017-2.147 62.315 16.45C361.878 158.426 384 189.346 384 240c0 2.746-.203 13.276-.195 16 .168 61.971-31.065 76.894-38.315 123.731C343.683 391.404 333.599 400 321.786 400H150.261l-.001-.002c-18.366-.011-35.889-10.607-43.845-28.464C93.421 342.648 57.377 276.122 29.092 264 10.897 256.203.008 242.616 0 224c-.014-34.222 35.098-57.752 66.908-44.119 8.359 3.583 16.67 8.312 24.918 14.153V44.8c0-23.45 20.543-44.8 43.826-44.8zM136 416h192c13.255 0 24 10.745 24 24v48c0 13.255-10.745 24-24 24H136c-13.255 0-24-10.745-24-24v-48c0-13.255 10.745-24 24-24zm168 28c-11.046 0-20 8.954-20 20s8.954 20 20 20 20-8.954 20-20-8.954-20-20-20z"/></svg>';
  static const String hand_pointer =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="448" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 448 512"><path fill="currentColor" d="M448 240v96c0 3.084-.356 6.159-1


Org(orgId)
      }
    }

    req.requireRole(AuthRoleConstants.DATAPLANE)
  }

  /**
   * Reads the X-Airbyte-Version if present.
   *
   * This is provided as a helper that leverages the static request context to avoid declaring an
   * optional header parameter that we use mostly for tracking on each API payload.
   */
  private fun readAirbyteVersionHeader(): String? =
    ServerRequestContext.currentRequest<HttpRequest<*>>().map { it.headers[AIRBYTE_VERSION_HEADER] }.orElse(null)
}
/*
 * Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
 */

package io.airbyte.micronaut.runtime

import io.micronaut.context.env.Environment
import io.micronaut.test.extensions.junit5.annotation.MicronautTest
import jakarta.inject.Inject
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

@MicronautTest(environments = [Environment.TEST])
internal class AirbyteInternalApiClientConfigDefaultTest {
  @Inject
  private lateinit var airbyteInternalApiClientConfig: AirbyteInternalApiClientConfig

  @Test
  fun testLoadingValuesFromConfig() {
    assertEquals("", airbyteInternalApiClientConfig.basePath)
    assertEquals(30, airbyteInternalApiClientConfig.connectTimeoutSeconds)
    assertEquals(600, airbyteInternalApiClientConfig.readTimeoutSeconds)
    assertEquals(2, airbyteInternalApiClientConfig.retries.delaySeconds)
    assertEquals(.25, airbyteInternalApiClientConfig.retries.jitterFactor)
    assertEquals(5, airbyteInternalApiClientConfig.retries.max)
    assertEquals("", airbyteInternalApiClientConfig.auth.clientId)
    assertEquals("", airbyteInternalApiClientConfig.auth.clientSecret)
    assertEquals("", airbyteInternalApiClientConfig.auth.token)
    assertEquals("", airbyteInternalApiClientConfig.auth.tokenEndpoint)
    assertEquals(AirbyteInternalApiClientConfig.AuthType.INTERNAL_CLIENT_TOKEN, airbyteInternalApiClientConfig.auth.type)
  }
}

@MicronautTest(propertySources = ["classpath:application-internal-api-dataplane-access-token.yml"])
internal class AirbyteInternalApiClientConfigDataplaneAccessTokenTest {
  @Inject
  private lateinit var airbyteInternalApiClientConfig: AirbyteInternalApiClientConfig

  @Test
  fun testLoadingValuesFromConfig() {
    assertEquals("http://localhost:8001/api", airbyteInternalApiClientConfig.basePath)
    assertEquals(60, airbyteInternalApiClientConfig.connectTimeoutSeconds)
    assertEquals(300, airbyteInternalApiClientConfig.readTimeoutSeconds)
    assertEquals(10, airbyteInternalApiClientConfig.retries.delaySeconds)
    assertEquals(.75, airbyteInternalApiClientConfig.retries.jitterFactor)
    assertEquals(2, airbyteInternalApiClientConfig.retries.max)
    assertEquals("test-client-id", airbyteInternalApiClientConfig.auth.clientId)
    assertEquals("test-client-secret", airbyteInternalApiClientConfig.auth.clientSecret)
    assertEquals("test-token", airbyteInternalApiClientConfig.auth.token)
    assertEquals("test-token-endpoint", airbyteInternalApiClientConfig.auth.tokenEndpoint)
    assertEquals(AirbyteInternalApiClientConfig.AuthType.DATAPLANE_ACCESS_TOKEN, airbyteInternalApiClientConfig.auth.type)
  }
}

@MicronautTest(propertySources = ["classpath:application-internal-api-internal-client-token.yml"])
internal class AirbyteInternalApiClientConfigInternalClientTokenTest {
  @Inject
  private lateinit var airbyteInternalApiClientConfig: AirbyteInternalApiClientConfig

  @Test
  fun testLoadingValuesFromConfig() {
    assertEquals("http://localhost:8001/api", airbyteInternalApiClientConfig.basePath)
    assertEquals


Kun-Lai Summit|QO|1|N|Get them along the way.  why?|S|
C Bloodlines|QID|32192|M|58.2,71|Z|Kun-Lai Summit|QO|1|N|Get the codex from the Korune Spellweaver|
C Ancient Guardians|QID|32191|M|56.15,78.65;59.70,72.90;58.45,75.51|CN|Z|Kun-Lai Summit|QO|1|N|Get them along the way.|US|
C The Korune|QID|32244|M|57.50,75.44;56.70,78.00;58.60,73.08|CN|Z|Kun-Lai Summit|QO|1|N|Get them along the way.|US|
T Ancient Guardians|QID|32191|M|57.07,79.01|Z|Kun-Lai Summit|N|To Fanlyr Silverthorn|
T The Korune|QID|32244|M|57.07,79.01|Z|Kun-Lai Summit|N|To Fanlyr Silverthorn|
T Bloodlines|QID|32192|M|57.07,79.01|Z|Kun-Lai Summit|N|From Lor'themar Theron|

A To the Valley!|QID|32376|M|10.39,53.71|REP|Dominance Offensive;1375;honored;6500|N|From General Nazgrim|
R Kun-Lai Summit|ACTIVE|32376|M|9.90,52.39|N|Talk to Tak-Tak for a ride over.|
T To the Valley!|QID|32376|M|53.83,49.24|Z|Kun-Lai Summit|N|To Lor'themar Theron|
A Legacy of the Korune|QID|32379|PRE|32376|M|53.83,49.24|Z|Kun-Lai Summit|N|From Lor'themar Theron|
A Clearing a Path|QID|32378|PRE|32376|M|53.83,49.24|Z|Kun-Lai Summit|N|From Lor'themar Theron|
C Korune Mogu|QID|32378|M|56.20,46.48;53.71,47.63;56.20,45.20;56.20,47.40;53.40,47.15|CN|Z|Kun-Lai Summit|N|Get those Mogus along the way and back.|S|
C Legacy of the Korune|QID|32379|M|56.93,47.75|Z|Kun-Lai Summit|N|Can be looted while mounted.  Fly there and work your way back.|QO|2|
C Sealed Korune Artifact|QID|32379|N|Chance to drop off of a Korune Sha-weaver.|QO|3|
C Korune Orders|QID|32379|N|Chance to drop off of a Korune Mutilator.|QO|1|
C Korune Mogu|QID|32378|M|56.20,46.48;53.71,47.63;56.20,45.20;56.20,47.40;53.40,47.15|CN|Z|Kun-Lai Summit|N|Get those Mogus along the way and back.|US|
T Legacy of the Korune|QID|32379|M|53.83,49.24|Z|Kun-Lai Summit|N|To Lor'themar Theron|
T Clearing a Path|QID|32378|M|53.83,49.24|Z|Kun-Lai Summit|N|To Lor'themar Theron|
A Trapping the Leader|QID|32384|PRE|32376|M|53.83,49.24|Z|Kun-Lai Summit|N|From Lor'themar Theron|
R Tomb of Shadows|ACTIVE|32384|M|55.87,46.22|Z|Kun-Lai Summit|N|Fly to the tomb and then go in.|
C Shan Kien|QID|32384|M|56.8,44|Z|Kun-Lai Summit|N|If he is not there, just wait a bit.|
T Trapping the Leader|QID|32


		a[k][j] += f * a[k][i];
					}
					for (k = i; k < m; k++)
						a[k][i] *= scale;
				}
			}
			w[i] = (float) (scale * g);
			g = s = scale = 0.0;
			if (i < m && i != (n - 1)) {
				for (k = l; k < n; k++)
					scale += Math.abs(a[i][k]);
				if (scale != 0.0) {
					for (k = l; k < n; k++) {
						a[i][k] /= scale;
						s += a[i][k] * a[i][k];
					}
					f = a[i][l];
					g = -sign(Math.sqrt(s), f);
					h = f * g - s;
					a[i][l] = f - g;
					for (k = l; k < n; k++)
						rv1[k] = a[i][k] / h;
					for (j = l; j < m; j++) {
						for (s = 0.0, k = l; k < n; k++)
							s += a[j][k] * a[i][k];
						for (k = l; k < n; k++)
							a[j][k] += s * rv1[k];
					}
					for (k = l; k < n; k++)
						a[i][k] *= scale;
				}
			}
			anorm = Math.max(anorm, (Math.abs(w[i]) + Math.abs(rv1[i])));
		}
		for (i = n - 1; i >= 0; i--) {
			if (i < n - 1) {
				if (g != 0.0) {
					for (j = l; j < n; j++)
						v[j][i] = (a[i][j] / a[i][l]) / g;
					for (j = l; j < n; j++) {
						for (s = 0.0, k = l; k < n; k++)
							s += a[i][k] * v[k][j];
						for (k = l; k < n; k++)
							v[k][j] += s * v[k][i];
					}
				}
				for (j = l; j < n; j++)
					v[i][j] = v[j][i] = 0.0;
			}
			v[i][i] = 1.0;
			g = rv1[i];
			l = i;
		}
		for (i = (Math.min(m, n) - 1); i >= 0; i--) {
			l = i + 1;
			g = w[i];
			for (j = l; j < n; j++)
				a[i][j] = 0.0;
			if (g != 0.0) {
				g = 1.0 / g;
				for (j = l; j < n; j++) {
					for (s = 0.0, k = l; k < m; k++)
						s += a[k][i] * a[k][j];
					f = (s / a[i][i]) * g;
					for (k = i; k < m; k++)
						a[k][j] += f * a[k][i];
				}
				for (j = i; j < m; j++)
					a[j][i] *= g;
			} else
				for (j = i; j < m; j++)
					a[j][i] = 0.0;
			a[i][i] += 1.0;
		}
		for (k = n - 1; k >= 0; k--) {
			for (its = 1; its <= max_iters; its++) {
				flag = true;
				for (l = k; l >= 0; l--) {
					nm = l - 1;
					/*
					 * NOTE
					 * Next
					 * line
					 * augemented
					 * by
					 * aries.
					 * They
					 * say
					 * in
					 * the
					 * book
					 * that
					 * rv1[1] ==
					 * 0.0,
					 * so I
					 * assume
					 * the
					 * next
					 * line
					 * is
					 * assumed
					 * to
					 * be
					 * true
					 * but
					 * maybe
					 * some
					 * roundoff
					 * creeps
					 * in
					 * and
					 * fucks
					 * us
					 * so I
					 * check
					 * for
					 * the
					 * case
					 * where
					 * nm ==
					 * -1
					 * as
					 * well,
					 * otherwise
					 * we
					 * index
					 * arrays
					 * at
					 * -1
					 * below.


/* Mapping NSS services to action lists.
   Copyright (C) 2020-2024 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

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

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <https://www.gnu.org/licenses/>.  */

#ifndef _NSS_DATABASE_H
#define _NSS_DATABASE_H

#include <file_change_detection.h>

/* Each "line" in nsswitch.conf maps a supported database (example:
   passwd) to one or more name service providers (example: files dns).
   Internally, each name service provider (example: dns) is a
   dynamically loadable module (i.e. libnss_dns.so), managed by
   nss_module.h.  The sequence of providers and rules (example: files
   [SUCCESS=RETURN] dns) is mapped by nss_action.h to a cached entry
   which encodes the sequence of modules and rules.  Keeping track of
   all supported databases and their corresponding actions is done
   here.

   The key entry is __nss_database_get, which provides a set of
   actions which can be used with nss_lookup_function() and
   nss_next().  Callers should assume that these functions are fast,
   and should not cache the result longer than needed.  */

#include "nss_action.h"

/* The enumeration literal in enum nss_database for the database NAME
   (e.g., nss_database_hosts for hosts).  */
#define NSS_DATABASE_LITERAL(name) nss_database_##name

enum nss_database
{
#define DEFINE_DATABASE(name) NSS_DATABASE_LITERAL (name),
#include "databases.def"
#undef DEFINE_DATABASE

  /* Total number of databases.  */
  NSS_DATABASE_COUNT
};

/* Looks up the action list for DB and stores it in *ACTIONS.  Returns
   true on success or false on failure.  Success can mean that
   *ACTIONS is NULL.  */
bool __nss_database_get (enum nss_database db, nss_action_list *actions);
libc_hidden_proto (__nss_database_get)

/* Like __nss_database_get, but does not reload /etc/nsswitch.conf
   from disk.  This assumes that there has been a previous successful
   __nss_database_get call (which may not have returned any data).  */
nss_action_list __nss_database_get_noreload (enum nss_database db)
  attribute_hidden;

/* Internal type.  Exposed only for fork handling purposes.  */
struct nss_database_data
{
  struct file_change_detection nsswitch_conf;
  nss_action_list services[NSS_DATABASE_COUNT];
  int reload_disabled;          /* Actually bool; int for atomic access.  */
  bool initialized;
};

/* Called by fork in the parent process, before forking.  */
void __nss_database_fork_prepare_parent (struct nss_database_data *data)
  attribute_hidden;

/* Called by fork in the new subprocess, after forking.  */
void __nss_database_fork_subprocess (struct nss_database_data *data)
  attribute_hidden;

#endif /* _NSS_DATABASE_H */


          param.with_capacity = with_capacity;
          param.input_share_mode = share_mode;
          params.push_back(param);
        }
      }
    }
    return params;
  }
};

INSTANTIATE_TEST_SUITE_P(WithParam, CordRingSubTest,
                         testing::ValuesIn(CordRingSubTest::CreateTestParams()),
                         TestParamToString);

INSTANTIATE_TEST_SUITE_P(
    WithParam, CordRingCreateTest,
    testing::ValuesIn(CordRingCreateTest::CreateTestParams()),
    TestParamToString);

INSTANTIATE_TEST_SUITE_P(
    WithParam, CordRingCreateFromTreeTest,
    testing::ValuesIn(CordRingCreateFromTreeTest::CreateTestParams()),
    TestParamToString);

INSTANTIATE_TEST_SUITE_P(
    WithParam, CordRingBuildTest,
    testing::ValuesIn(CordRingBuildTest::CreateTestParams()),
    TestParamToString);

INSTANTIATE_TEST_SUITE_P(
    WithParam, CordRingBuildInputTest,
    testing::ValuesIn(CordRingBuildInputTest::CreateTestParams()),
    TestParamToString);

TEST_P(CordRingCreateTest, CreateFromFlat) {
  absl::string_view str1 = "abcdefghijklmnopqrstuvwxyz";
  CordRepRing* result = NeedsUnref(CordRepRing::Create(MakeFlat(str1)));
  ASSERT_THAT(result, IsValidRingBuffer());
  EXPECT_THAT(result->length, Eq(str1.size()));
  EXPECT_THAT(ToFlats(result), ElementsAre(str1));
}

TEST_P(CordRingCreateTest, CreateFromRing) {
  CordRepRing* ring = RefIfShared(FromFlats(kFoxFlats));
  CordRepRing* result = NeedsUnref(CordRepRing::Create(ring));
  ASSERT_THAT(result, IsValidRingBuffer());
  EXPECT_THAT(result, EqIfPrivate(GetParam(), ring));
  EXPECT_THAT(result, NeIfShared(GetParam(), ring));
  EXPECT_THAT(ToFlats(result), ElementsAreArray(kFoxFlats));
}

TEST_P(CordRingCreateFromTreeTest, CreateFromSubstringRing) {
  CordRepRing* ring = RefIfInputSharedIndirect(FromFlats(kFoxFlats));
  CordRep* sub = RefIfInputShared(MakeSubstring(2, 11, ring));
  CordRepRing* result = NeedsUnref(CordRepRing::Create(sub));
  ASSERT_THAT(result, IsValidRingBuffer());
  EXPECT_THAT(result, EqIfInputPrivate(GetParam(), ring));
  EXPECT_THAT(ToString(result), string_view(kFox).substr(2, 11));
}

TEST_F(CordRingTest, CreateWithIllegalExtraCapacity) {
#if defined(ABSL_HAVE_EXCEPTIONS)
  CordRep* flat = NeedsUnref(MakeFlat("Hello world"));
  try {
    CordRepRing::Create(flat, CordRepRing::kMaxCapacity);
    GTEST_FAIL() << "expected std::length_error exception";
  } catch (const std::length_error&) {
  }
#elif defined(GTEST_HAS_DEATH_TEST)
  CordRep* flat = NeedsUnref(MakeFlat("Hello world"));
  EXPECT_DEATH(CordRepRing::Create(flat, CordRepRing::kMaxCapacity), ".*");
#endif
}

TEST_P(CordRingCreateFromTreeTest, CreateFromSubstringOfFlat) {
  absl::string_view str1 = "abcdefghijklmnopqrstuvwxyz";
  auto* flat = RefIfInputShared(MakeFlat(str1));
  auto* child = RefIfInputSharedIndirect(MakeSubstring(4, 20, flat));
  Co


="monokai",
                    word_wrap=True,
                ),
                title="[bold]" + title,
                title_align="left",
                box=box.HORIZONTALS,
            ),
            level=level,
        )

    def log_rule(self, title: str, level: int = LogLevel.INFO) -> None:
        self.log(
            Rule(
                "[bold]" + title,
                characters="━",
                style=YELLOW_HEX,
            ),
            level=LogLevel.INFO,
        )

    def log_task(self, content: str, subtitle: str, title: Optional[str] = None, level: int = LogLevel.INFO) -> None:
        self.log(
            Panel(
                f"\n[bold]{escape_code_brackets(content)}\n",
                title="[bold]New run" + (f" - {title}" if title else ""),
                subtitle=subtitle,
                border_style=YELLOW_HEX,
                subtitle_align="left",
            ),
            level=level,
        )

    def log_messages(self, messages: List) -> None:
        messages_as_string = "\n".join([json.dumps(dict(message), indent=4) for message in messages])
        self.log(
            Syntax(
                messages_as_string,
                lexer="markdown",
                theme="github-dark",
                word_wrap=True,
            )
        )

    def visualize_agent_tree(self, agent):
        def create_tools_section(tools_dict):
            table = Table(show_header=True, header_style="bold")
            table.add_column("Name", style="#1E90FF")
            table.add_column("Description")
            table.add_column("Arguments")

            for name, tool in tools_dict.items():
                args = [
                    f"{arg_name} (`{info.get('type', 'Any')}`{', optional' if info.get('optional') else ''}): {info.get('description', '')}"
                    for arg_name, info in getattr(tool, "inputs", {}).items()
                ]
                table.add_row(name, getattr(tool, "description", str(tool)), "\n".join(args))

            return Group("🛠 [italic #1E90FF]Tools:[/italic #1E90FF]", table)

        def get_agent_headline(agent, name: Optional[str] = None):
            name_headline = f"{name} | " if name else ""
            return f"[bold {YELLOW_HEX}]{name_headline}{agent.__class__.__name__} | {agent.model.model_id}"

        def build_agent_tree(parent_tree, agent_obj):
            """Recursively builds the agent tree."""
            parent_tree.add(create_tools_section(agent_obj.tools))

            if agent_obj.managed_agents:
                agents_branch = parent_tree.add("🤖 [italic #1E90FF]Managed agents:")
                for name, managed_agent in agent_obj.managed_agents.items():
                    agent_tree = agents_branch.add(get_agent_headline(managed_agent, name))
                    if managed_agent.__class__.__name__ == "CodeAgent":
                        agent_tree.add(
                            f"✅ [italic #1E90FF]Authorized imports:[/italic #1E90FF] {managed_agent.additional_authorized_imports}"
                        )
                    agent_tree.add(f"📝 [italic #1E90FF]Description:[/italic #1E90FF] {managed_agent.description}")
                    build_agent_tree(agent_tree, managed_agent)

        main_tree = Tree(get_agent_headline(agent))
        if agent.__class__.__name__ == "CodeAgent":
            main_tree.add(
                f"✅ [italic #1E90FF]Authorized imports:[/italic #1E90FF] {agent.additional_authorized_imports}"
            )
        build_agent_tree(main_tree, agent)
        self.console.print(main_tree)


">

8.23. SHOW COLLATION syntax

SHOW COLLATION

Added in version 2.0.1-beta, this is currently a placeholder
query that does nothing and reports success. That is in order
to keep compatibility with frameworks and connectors that
automatically execute this statement.

mysql> SHOW COLLATION;
Query OK, 0 rows affected (0.00 sec)

8.24. SHOW CHARACTER SET syntax

SHOW CHARACTER SET

Added in version 2.1.1-beta, this is currently a placeholder
query that does nothing and reports that a UTF-8 character set
is available. It was added in order
to keep compatibility with frameworks and connectors that
automatically execute this statement.

mysql> SHOW CHARACTER SET;
+---------+---------------+-------------------+--------+
| Charset | Description   | Default collation | Maxlen |
+---------+---------------+-------------------+--------+
| utf8    | UTF-8 Unicode | utf8_general_ci   | 3      |
+---------+---------------+-------------------+--------+
1 row in set (0.00 sec)

8.25. UPDATE syntax

UPDATE index SET col1 = newval1 [, ...] WHERE where_condition [OPTION opt_name = opt_value [, ...]]

UPDATE statement was added in version 2.0.1-beta. Multiple attributes
and values can be specified in a single statement. Both RT and disk indexes
are supported.

As of version 2.0.2-beta, all attributes types (int, bigint, float, MVA),
except for strings and JSON attributes, can be dynamically updated.
Previously, some of these types were not supported.

where_condition (also added in 2.0.2-beta) has the same syntax
as in the SELECT statement (see Section 8.1, “SELECT syntax” for details).

When assigning the out-of-range values to 32-bit attributes, they
will be trimmed to their lower 32 bits without a prompt. For example,
if you try to update the 32-bit unsigned int with a value of 4294967297,
the value of 1 will actually be stored, because the lower 32 bits of
4294967297 (0x100000001 in hex) amount to 1 (0x00000001 in hex).

MVA values sets for updating (and also for INSERT or REPLACE, refer
to Section 8.6, “INSERT and REPLACE syntax”) must be specified as comma-separated
lists in parentheses. To erase the MVA value, just assign () to it.

Starting from 2.2.1-beta version UPDATE can be used to update integer and float
values in JSON


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DS2DEngine;
using Microsoft.Xna.Framework;
using Tweener;
using Tweener.Ease;
using System.Threading;

namespace RogueCastle
{
    public class CDGSplashScreen : Screen
    {
        private SpriteObj m_logo;
        private TextObj m_loadingText;
        private bool m_levelDataLoaded = false;
        private bool m_fadingOut = false;
        private float m_totalElapsedTime = 0;

        public override void LoadContent()
        {
            m_logo = new SpriteObj("CDGLogo_Sprite");
            m_logo.Position = new Vector2(1320 / 2, 720 / 2);
            m_logo.Rotation = 90;
            m_logo.ForceDraw = true;

            m_loadingText = new TextObj(Game.JunicodeFont);
            m_loadingText.FontSize = 18;
            m_loadingText.Align = Types.TextAlign.Right;
            m_loadingText.Text = LocaleBuilder.getString("LOC_ID_SPLASH_SCREEN_1", m_loadingText);
            m_loadingText.TextureColor = new Color(100, 100, 100);
            m_loadingText.Position = new Vector2(1320 - 40, 720 - 90);
            m_loadingText.ForceDraw = true;
            m_loadingText.Opacity = 0;
            base.LoadContent();
        }

        public override void OnEnter()
        {
            // Level data loading is multithreaded.
            m_levelDataLoaded = false;
            m_fadingOut = false;
            Thread loadingThread = new Thread(LoadLevelData);
            loadingThread.Start();

            m_logo.Opacity = 0;
            Tween.To(m_logo, 1, Linear.EaseNone, "delay", "0.5", "Opacity", "1");
            Tween.RunFunction(0.75f, typeof(SoundManager), "PlaySound", "CDGSplashCreak");
            //Tween.AddEndHandlerToLastTween(typeof(SoundManager), "PlaySound", "CDGSplashCreak");
            base.OnEnter();
        }

        private void LoadLevelData()
        {
            lock (this)
            {
                LevelBuilder2.Initialize();
                LevelParser.ParseRooms("Map_1x1", ScreenManager.Game.Content);
                LevelParser.ParseRooms("Map_1x2", ScreenManager.Game.Content);
                LevelParser.ParseRooms("Map_1x3", ScreenManager.Game.Content);
                LevelParser.ParseRooms("Map_2x1", ScreenManager.Game.Content);
                LevelParser.ParseRooms("Map_2x2", ScreenManager.Game.Content);
                LevelParser.ParseRooms("Map_2x3", ScreenManager.Game.Content);
                LevelParser.ParseRooms("Map_3x1", ScreenManager.Game.Content);
                LevelParser.ParseRooms("Map_3x2", ScreenManager.Game.Content);
                LevelParser.ParseRooms("Map_Special", ScreenManager.Game.Content);
                LevelParser.ParseRooms("Map_DLC1", ScreenManager.Game.Content, true);
                LevelBuilder2.IndexRoomList();
                m_levelDataLoaded = true;
            }
        }

        public void LoadNextScreen()
        {
            if (LevelEV.ENABLE_BLITWORKS_SPLASH == true)
                (ScreenManager as RCScreenManager).DisplayScreen(ScreenType.BlitWorks, true, null);


T ATTRIBUTE*/
			Description: "The length of time in seconds for which SQS can reuse a data key to encrypt or decrypt messages before calling KMS again. The value must be an integer between 60 (1 minute) and 86,400 (24 hours). The default is 300 (5 minutes).\n  A shorter time period provides better security, but results in more calls to KMS, which might incur charges after Free Tier. For more information, see [Encryption at rest](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work) in the *Developer Guide*.",
			Computed:    true,
		}, /*END ATTRIBUTE*/
		// Property: KmsMasterKeyId
		// CloudFormation resource type schema:
		//
		//	{
		//	  "description": "The ID of an AWS Key Management Service (KMS) for SQS, or a custom KMS. To use the AWS managed KMS for SQS, specify a (default) alias ARN, alias name (for example ``alias/aws/sqs``), key ARN, or key ID. For more information, see the following:\n  +   [Encryption at rest](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html) in the *Developer Guide* \n  +   [CreateQueue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html) in the *API Reference* \n  +   [Request Parameters](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) in the *Key Management Service API Reference* \n  +   The Key Management Service (KMS) section of the [Security best practices for Key Management Service](https://docs.aws.amazon.com/kms/latest/developerguide/best-practices.html) in the *Key Management Service Developer Guide*",
		//	  "type": "string"
		//	}
		"kms_master_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/
			Description: "The ID of an AWS Key Management Service (KMS) for SQS, or a custom KMS. To use the AWS managed KMS for SQS, specify a (default) alias ARN, alias name (for example ``alias/aws/sqs``), key ARN, or key ID. For more information, see the following:\n  +   [Encryption at rest](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html) in the *Developer Guide* \n  +   [CreateQueue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html) in the *API Reference* \n  +   [Request Parameters](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) in the *Key Management Service API Reference* \n  +   The Key Management Service (KMS) section of the [Security best practices for Key Management Service](https://docs.aws.amazon.com/kms/latest/developerguide/best-practices.html) in the *Key Management Service Developer Guide*",
			Computed:    true,
		}, /*END ATTRIBUTE*/
		// Property: MaximumMessageSize
		// CloudFormation resource type schema:
		//
		//	{
		//	  "description": "The limit of how many bytes that a message can contain before SQS rejects it. You can specify an integer value from ``1,024`` bytes (1 KiB) to ``262,144`` bytes (256 KiB). The default value is ``262,144`` (256 KiB).",
		//	  "type": "integer"
		//	}
		"maximum_message_size": schema.Int64Attribute{ /*START ATTRIBUTE*/
			Description: "The limit of how many bytes that a message can contain before SQS rejects it. You can specify an integer value from ``1,024`` bytes (1 KiB) to ``262,144`` bytes (256


Idx = prevSlotIdx(currIdx)
	currSlot = &tsaggr.timeslots[currIdx]

	// How far back in history should be look at
	oldestDataTime := tsaggr.getOldestDataTimeForAggrType(resultType, now)

	key := buildKey(hostID, groupTag, metricName)
	minSlots := tsaggr.minSlotsForAggrType(resultType)
	maxSlots := tsaggr.maxSlotsForAggrType(resultType)

	var nSlots int
	var result timeslotData

	for nSlots < maxSlots {

		slotEndTime := currSlot.beginTime + aggregationPeriod
		if slotEndTime <= oldestDataTime {
			break // no more slots in the desired time window
		}

		if d, ok := currSlot.data[key]; ok {
			result.n += d.n
			result.sum += d.sum
			nSlots++
		}

		currIdx = prevSlotIdx(currIdx)
		currSlot = &tsaggr.timeslots[currIdx]
	}

	if nSlots < minSlots {
		return 0, ErrNoData
	}

	if resultType == OneMinSum || resultType == FiveMinSum {
		return result.sum, nil
	}

	if result.n < tsaggr.minDataPointsForAggrType(resultType) {
		return 0, ErrNoData
	}

	return result.sum / result.n, nil
}

// processor is the main loop that processes
// the input stream data
func (tsaggr *TimeslotAggregator) processor() {

	defer tsaggr.stopWG.Done()

	for {
		select {
		case data := <-tsaggr.dataCh:
			tsaggr.add(data)
		case <-tsaggr.sigCh:
			// a signal can be received when the
			// input stream is idle for more than
			// a minute, to advance the timeslot
			tsaggr.advanceTimeslotIfExpired(tsaggr.clock.Now().UnixNano())
		case <-tsaggr.stopCh:
			return
		}
	}
}

// add adds a metric data point to the current timeslot
func (tsaggr *TimeslotAggregator) add(data *metricData) {

	now := tsaggr.clock.Now().UnixNano()
	diff := now - data.timestamp

	if diff > maxClockSkew {
		// drop the sample on floor, the clocks differ too much
		return
	}

	currSlot := tsaggr.advanceTimeslotIfExpired(now)
	if getBeginTime(currSlot) == 0 {
		// beginTime of zero indicates this is the first
		// metric for this time slot, so record the
		// beginTime
		setBeginTime(currSlot, now)
		currSlot.data = make(map[string]*timeslotData)
	}

	key := buildKey(data.hostID, data.groupTag, data.metricName)
	tsdata, ok := currSlot.data[key]
	if !ok {
		tsdata = new(timeslotData)
		currSlot.data[key] = tsdata
	}

	tsdata.n++
	tsdata.sum += data.metricValue
}

func (tsaggr *TimeslotAggregator) advanceTimeslotIfExpired(now int64) *timeslot {

	currIdx := atomic.LoadInt64(&tsaggr.currIdx)
	currSlot := &tsaggr.timeslots[currIdx]

	if tsaggr.isTimeslotExpired(currSlot, now) {
		currIdx = nextSlotIdx(currIdx)
		atomic.StoreInt64(&tsaggr.currIdx, currIdx)
		currSlot = &tsaggr.timeslots[currIdx]
		setBeginTime(currSlot, 0)
	}

	return currSlot
}

// signal wakes up the processor routine
// to advance the timeslot, if needed. Only
// the processor can do this, because its the
// only writer to the data structure
func (tsaggr *TimeslotAggregator) signal() {
	tsaggr.sigCh <- struct{}{}


/*
 * This file is part of OpenTTD.
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 */

/** @file settings_func.h Functions related to setting/changing the settings. */

#ifndef SETTINGS_FUNC_H
#define SETTINGS_FUNC_H

#include "core/smallvec_type.hpp"
#include "company_type.h"
#include "string_type.h"

struct IniFile;

void IConsoleSetSetting(const char *name, const char *value, bool force_newgame = false);
void IConsoleSetSetting(const char *name, int32 value);
void IConsoleGetSetting(const char *name, bool force_newgame = false);
void IConsoleListSettings(const char *prefilter);

void LoadFromConfig(bool minimal = false);
void SaveToConfig();

void IniLoadWindowSettings(IniFile &ini, const char *grpname, void *desc);
void IniSaveWindowSettings(IniFile &ini, const char *grpname, void *desc);

StringList GetGRFPresetList();
struct GRFConfig *LoadGRFPresetFromConfig(const char *config_name);
void SaveGRFPresetToConfig(const char *config_name, struct GRFConfig *config);
void DeleteGRFPresetFromConfig(const char *config_name);

void SetDefaultCompanySettings(CompanyID cid);

void SyncCompanySettings();

#endif /* SETTINGS_FUNC_H */


ild(container.lastChild);
      }
      container.append(createCard(randomCharacter));
    },
  });

  const container = createElement("div", {
    className: "container",
    childs: [randomButton],
  });
  return container;
};
import { ValueObject } from '../ValueObject';

interface TestVoProps {
  name: string;
  email: string;
}

class TestVo extends ValueObject<TestVoProps> {}

describe('Value Object', () => {
  const name = 'vo';
  const email = 'vo@mail.com';
  const testVo = new TestVo({ name, email });

  it('should be created with correct values', () => {
    expect(testVo.props.name).toBe(name);
    expect(testVo.props.email).toBe(email);
  });

  it('should be immutable', () => {
    const expectedError = new TypeError(
      `Cannot assign to read only property 'name' of object '#<Object>'`
    );
    expect(() =>
      Object.assign(testVo.props, {
        name: 'newName',
      })
    ).toThrow(expectedError);
  });

  it('should have equality', () => {
    const testVo2 = new TestVo({ name, email });
    const equaled = testVo.equals(testVo2);
    expect(equaled).toBeTruthy();
  });
});
import Discord = require("discord.js");
import { Command } from "../Command";
const fetch = require("node-fetch");
const { youtubeSearch } = require("../config.json");

module.exports = {
  name: "youtube",
  description: "Search youtube",
  argsRequired: true,
  aliases: ["yt"],

  async execute(message, args, client) {
    const search = args.join(" ");

    const embed = new Discord.MessageEmbed()
      .setColor("RANDOM")
      .addField(
        "search results",
        `[Youtube: ${search}](https://www.youtube.com/result?search_query=${encodeURIComponent(
          search
        )})`
      )
      .setFooter(client.user?.username)
      .setTimestamp(message.createdTimestamp);

    return message.channel.send(embed);
  },
} as Command;
import type {Frequency} from '$lib/audio/helpers';

// This project uses `Midi`, the midi number,
// as the standard musical note identity.
// This comes with drawbacks, the obvious one being that
// midi numbers are meaningless to most people,
// but for our purposes the benefits seem to outweight the downsides.
// `Midi` is unambiguous, efficient,
// and easy to work with both programmatically and mathematically.
export type Midi =
  |   0 |   1 |   2 |   3 |   4 |   5 |   6 |   7 |   8 |   9
  |  10 |  11 |  12 |  13 |  14 |  15 |  16 |  17 |  18 |  19
  |  20 |  21 |  22 |  23 |  24 |  25 |  26 |  27 |  28 |  29
  |  30 |  31 |  32 |  33 |  34 |  35 |  36 |  37 |  38 |  39
  |  40 |  41 |  42 |  43 |  44 |  45 |  46 |  47 |  48 |  49
  |  50 |  51 |  52 |  53 |  54 |  55 |  56 |  57 |  58 |  59
  |  60 |  61 |  62 |  63 |  64 |  65 |  66 |  67 |  68 |  69
  |  70 |  71 |  72 |  73 |  74 |  75 |  76 |  77 |  78 |  79
  |  80 |  81 |  82 |  83 |  84 |  85 |  86 |  87 |  88 |  89
  |  90 |  91 |  92 |  93 |  94 |  95 |  96 |  97 |  98 |  99
  | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109
  | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119


er.getAll();
      expect(tabs.map((t) => t.url)).toEqual([
        "https://example.com/1",
        "https://example.com/3",
      ]);
    });

    it("close a current tab and select left of the closed tab", async () => {
      const tabPresenter = new MockTabPresenter();
      await tabPresenter.create("https://example.com/1", { active: false });
      await tabPresenter.create("https://example.com/2", { active: true });
      await tabPresenter.create("https://example.com/3", { active: false });
      const sut = new CloseTabOperator(tabPresenter, false, true);

      await sut.run();

      const tab = await tabPresenter.getCurrent();
      expect(tab.url).toEqual("https://example.com/1");
    });
  });
});
export class User {
  id: number;
  firstName: string;
  lastName: string;
  email: string;

  constructor(data?: Partial<User>) {
    Object.assign(this, data);
  }
}
import { getSession } from "next-auth/client";

/**
 * Require authentication before accessing the page
 * Place inside getServerSideProps on page that need to be protected
 * @param context getServerSideProps context object
 */
export const restrictPage = async (context) => {
  const session = await getSession(context);
  if (!session) {
    context.res.statusCode = 302;
    context.res.setHeader("Location", "/api/auth/signin/");
  }
};

/**
 * Require authentication on API route to be used as a middleware
 * @param req
 * @param res
 * @param next
 */
export const checkAuth = async (req, res, next) => {
  const session = await getSession({ req });
  if (session) next();
  else res.status(401).send("Unauthorized");
};
import canonicalizeActionName from "./canonicalizeActionName";
import canonicalizeTargets from "./canonicalizeTargets";
import { ActionType, PartialTarget, SelectionType } from "./typings/Types";
import { getPrimitiveTargets } from "./util/targetUtils";

export function canonicalizeAndValidateCommand(
  inputActionName: string,
  inputPartialTargets: PartialTarget[],
  inputExtraArgs: any[]
) {
  const actionName = canonicalizeActionName(inputActionName);
  const partialTargets = canonicalizeTargets(inputPartialTargets);
  const extraArgs = inputExtraArgs;

  validateCommand(actionName, partialTargets, extraArgs);

  return {
    actionName,
    partialTargets,
    extraArgs,
  };
}

export function validateCommand(
  actionName: ActionType,
  partialTargets: PartialTarget[],
  extraArgs: any[]
) {
  if (
    usesSelectionType("notebookCell", partialTargets) &&
    !["editNewLineBefore", "editNewLineAfter"].includes(actionName)
  ) {
    throw new Error(
      "The notebookCell scope type is currently only supported with the actions editNewLineAbove and editNewLineBelow"
    );
  }
}

function usesSelectionType(
  selectionType: SelectionType,
  partialTargets: PartialTarget[]
) {
  return getPrimitiveTargets(partialTargets).some(
    (partialTarget) => partialTarget.selectionT


_key;
    if (ps2_flags & PS2_ESCAPE)
    {
        switch (a) {
            case 0x6B:  a = 0x1E; break;  // left
            case 0x72:  a = 0x1D; break;  // down
            case 0x74:  a = 0x1F; break;  // right
            case 0x75:  a = 0x1C; break;  // up
            default: a = 0;
        }
    }
    else
    {
        if (a < 0x68)
        {
            if (((ps2_flags >> 2) ^ (ps2_flags >> 3)) & 1)
                a += 0x68;
            a = pgm_read_byte(ps2_map + a);
        } else
            a = 0;
    }
    ps2_key = 0;
    ps2_flags &= 0xFC;
    return a;
}

ISR(INT1_vect)
{
    ps2_code = (ps2_code << 1) | ((PIND & 4) >> 2);

    if (ps2_code & 0x800) // 11 bits 0:DATA_LSB:P:1
    {
        uint8_t a,r = ps2_code >> 2;
        uint8_t p = 0;
        uint8_t b = 8;
        while (b--) {
            p += r & 1;
            a = (a << 1) | (r & 1);
            r >>= 1;
        }
        p ^= ps2_code >> 1;  // reverse bits, check parity

        if ((p&1) && ((ps2_code & 0x401) == 1))
        {
            if (a == 0xE0)
                ps2_flags |= PS2_ESCAPE;
            else if (a == 0xF0)
                ps2_flags |= PS2_KEYUP;
            else {
              uint8_t up = ps2_flags & PS2_KEYUP;
              switch (a) {
                case 0x12:  // LSHIFT
                case 0x59:  // RSHIFT
                  if (up)
                      ps2_flags &= ~PS2_SHIFT;
                  else
                      ps2_flags |= PS2_SHIFT;
                  ps2_flags &= 0xFC;
                  break;
                case 0x58:  // CAPS
                    if (!up)
                        ps2_flags ^= PS2_CAPS;
                    ps2_flags &= 0xFC;
                    break;
                default:
                  if (!up)
                    ps2_key = a; // only pass keydowns
                  else
                    ps2_flags &= 0xFC;
              }
            }
        }
        else
        {
            ps2_key = 0;
            ps2_flags &= 0xFC;
        }
        ps2_code = 1;
    }
}

void enable_ps2()
{
    ps2_code = 0x1;
    ps2_key = 0;
    DDRD &= ~_BV(PS2_CLOCK);
    EICRA |= (0 << ISC10) | (1 << ISC11);
    EIFR |= (1 << INTF1);
    EIMSK |= (1 << INT1);
}

void disable_ps2()
{
    EIMSK &= ~(1 << INT1);
    EIFR |= (1 << INTF1);
    DDRD |= _BV(PS2_CLOCK);
    PORTD &= ~_BV(PS2_CLOCK);  // Drive clock low when disabled
}
//
//  main.cpp
//
//  Created by Peter Barrett on 2/17/13.
//  Copyright (c) 2013 Peter Barrett. All rights reserved.
//

#include <iostream>
#include <stdio.h>
#include <SDL.h>
#include <SDL_audio.h>
#include <pthread.h>
#include "math.h"
#include "unistd.h"

__attribute__((weak))
void video_blanking(uint8_t line)


{ x = 0, y = 0.33 },
		{ x = 0.33, y = 0.33 },
		{ x = 0.33, y = 0.66 },
		{ x = 0, y = 0.66 },
	},
	[160] = {
		{ x = 0.33, y = 0.33 },
		{ x = 0.66, y = 0.33 },
		{ x = 0.66, y = 0.66 },
		{ x = 0.33, y = 0.66 },
	}
}

function ENT:DrawSpecialCharacter(c,x,y,w,h,r,g,b)
	surface.SetDrawColor(r,g,b,255)
	surface.SetTexture(0)

	local vertices = specialCharacters[c]
	if vertices then
		local tf = Matrix() tf:SetScale(Vector(w, h, 1)) tf:SetTranslation(Vector(x, y, 0))
		cam.PushModelMatrix(tf, true)
		surface.DrawPoly(vertices)
		cam.PopModelMatrix()
	end
end

local VECTOR_1_1_1 = Vector(1, 1, 1)
function ENT:Draw()
	self:DrawModel()

	local tone = render.GetToneMappingScaleLinear()
	render.SetToneMappingScaleLinear(VECTOR_1_1_1)
	local curtime = CurTime()
	local DeltaTime = curtime - self.PrevTime
	self.PrevTime = curtime
	self.IntTimer = self.IntTimer + DeltaTime
	self.FramesSinceRedraw = self.FramesSinceRedraw + 1

	if self.NeedRefresh == true then
		self.FramesSinceRedraw = 0
		self.NeedRefresh = false
		self.FrameNeedsFlash = false

		if self.Memory1[2046] >= 1 then self.FrameNeedsFlash = true end

		self.GPU:RenderToGPU(function()
			-- Draw terminal here
			-- W/H = 16
			local szx = 1024/31
			local szy = 1024/19

			local ch = self.Memory1[2042]

			local hb = 28*math.fmod(ch,									10)*self.Memory1[2026]*self.Memory1[2025] + self.Memory1[2036]
			local hg = 28*math.fmod(math.floor(ch / 10), 10)*self.Memory1[2027]*self.Memory1[2025] + self.Memory1[2036]
			local hr = 28*math.fmod(math.floor(ch / 100),10)*self.Memory1[2028]*self.Memory1[2025] + self.Memory1[2036]
			surface.SetDrawColor(hr,hg,hb,255)
			surface.DrawRect(0,0,1024,1024)

			for ty = 0, 17 do
				for tx = 0, 29 do
					local a = tx + ty*30
					local c1 = self.Memory1[2*a]
					local c2 = self.Memory1[2*a+1]

					local cback = math.floor(c2 / 1000)
					local cfrnt = c2 - math.floor(c2 / 1000)*1000

					local fb = math.Clamp(28*math.fmod(cfrnt,									10)*self.Memory1[2026]*self.Memory1[2025] + self.Memory1[2036],0,255)
					local fg = math.Clamp(28*math.fmod(math.floor(cfrnt / 10), 10)*self.Memory1[2027]*self.Memory1[2025] + self.Memory1[2036],0,255)
					local fr = math.Clamp(28*math.fmod(math.floor(cfrnt / 100),10)*self.Memory1[2028]*self.Memory1[2025] + self.Memory1[2036],0,255)
					local bb = math.Clamp(28*math.fmod(cback,									10)*self.Memory1[2026]*self.Memory1[2025] + self.Memory1[2036],0,255)
					local bg = math.Clamp(28*math


        CITIES_BACKGROUND_MAP.put(17L, R.drawable.city_hradeckralove);
        CITIES_BACKGROUND_MAP.put(18L, R.drawable.city_hradeckralove);
        CITIES_BACKGROUND_MAP.put(23L, R.drawable.city_karlovyvary);
        CITIES_BACKGROUND_MAP.put(24L, R.drawable.city_karlovyvary);
        CITIES_BACKGROUND_MAP.put(10L, R.drawable.city_liberec);
        CITIES_BACKGROUND_MAP.put(20L, R.drawable.city_olomouc);
        CITIES_BACKGROUND_MAP.put(6L, R.drawable.city_ostrava);
        CITIES_BACKGROUND_MAP.put(7L, R.drawable.city_ostrava);
        CITIES_BACKGROUND_MAP.put(25L, R.drawable.city_ostrava);
        CITIES_BACKGROUND_MAP.put(26L, R.drawable.city_ostrava);
        CITIES_BACKGROUND_MAP.put(21L, R.drawable.city_pardubice);
        CITIES_BACKGROUND_MAP.put(22L, R.drawable.city_pardubice);
        CITIES_BACKGROUND_MAP.put(11L, R.drawable.city_plzen);
        CITIES_BACKGROUND_MAP.put(19L, R.drawable.city_plzen);
        CITIES_BACKGROUND_MAP.put(29L, R.drawable.city_plzen);
        CITIES_BACKGROUND_MAP.put(30L, R.drawable.city_plzen);
        CITIES_BACKGROUND_MAP.put(1L, R.drawable.city_praha);
        CITIES_BACKGROUND_MAP.put(2L, R.drawable.city_praha);
        CITIES_BACKGROUND_MAP.put(3L, R.drawable.city_praha);
        CITIES_BACKGROUND_MAP.put(4L, R.drawable.city_praha);
        CITIES_BACKGROUND_MAP.put(34L, R.drawable.city_zlin);
        CITIES_BACKGROUND_MAP.put(35L, R.drawable.city_zlin);
        CITIES_BACKGROUND_MAP.put(36L, R.drawable.city_zlin);
        CITIES_BACKGROUND_MAP.put(5L, R.drawable.city_ustinadlabem);
        CITIES_BACKGROUND_MAP.put(32L, R.drawable.city_ustinadlabem);
        CITIES_BACKGROUND_MAP.put(33L, R.drawable.city_ustinadlabem);
        CITIES_BACKGROUND_MAP.put(8L, R.drawable.city_ceskebudejovice);
        CITIES_BACKGROUND_MAP.put(9L, R.drawable.city_ceskebudejovice);
    }

    private Constants() {}
}
package com.example.library;

import android.text.TextUtils;
import android.util.Log;

import static com.example.library.BankCardInfo.bankBin;
import static com.example.library.BankCardInfo.bankName;

/**
 * Created by yuyuhang on 2018/1/23.
 */
public class BankCardUtils {

    public static String getNameOfBank(char[] charBin, int offset) {
        long longBin = 0;

        for (int i = 0; i < 6; i++) {
            longBin = (longBin * 10) + (charBin[i + offset] - 48);
        }
        Log.i("BankCardInfo", "bankBin: " + longBin);

        int index = binarySearch(bankBin, longBin);

        if (index == -1) {
            return "";
        }
        return bankName[index];

    }

    //二分查找方法
    public static int binarySearch(long[] srcArray, long des) {
        int low = 0;
        int high = srcArray.length - 1;
        while (low <= high) {
            int middle = (low + high) / 2;
            if (des == srcArray[middle]) {
                return middle;
            } else if (des < srcArray[middle]) {
                high = middle - 1;
            } else {
                low = middle + 1;


r use later.
					//
					// Processing random variable 49.
					//
					// Looking for a path between Sample 53 and consumer Categorical 49.
					//
					// Value of the variable at this index
					//
					// Substituted "cv$valuePos" with its value "1".
					double[] cv$temp$1$var48 = m[1];

					// A check to ensure rounding of floating point values can never result in a negative
					// value.
					//
					// Recorded the probability of reaching sample task 53 with the current configuration.
					//
					// Set an accumulator to record the consumer distributions not seen. Initially set
					// to 1 as seen values will be deducted from this value.
					//
					// Variable declaration of cv$accumulatedConsumerProbabilities moved.
					// Declaration comment was:
					// Set an accumulator to sum the probabilities for each possible configuration of
					// inputs.
					cv$accumulatedProbabilities = ((((0.0 <= st[index$i$2_4]) && (st[index$i$2_4] < cv$temp$1$var48.length))?Math.log(cv$temp$1$var48[st[index$i$2_4]]):Double.NEGATIVE_INFINITY) + cv$accumulatedProbabilities);
				}
			}
		}
		for(int index$i$5_2 = 1; index$i$5_2 < samples; index$i$5_2 += 1) {
			if((i$var43 == (indirection[(index$i$5_2 - 1)][index$i$5_2] / index$i$5_2))) {
				int j = (indirection[(index$i$5_2 - 1)][index$i$5_2] / index$i$5_2);
				if(((0 <= j) && (j < samples)))
					// Processing sample task 80 of consumer random variable null.
					//
					// A check to ensure rounding of floating point values can never result in a negative
					// value.
					//
					// Recorded the probability of reaching sample task 80 with the current configuration.
					//
					// Set an accumulator to record the consumer distributions not seen. Initially set
					// to 1 as seen values will be deducted from this value.
					//
					// Variable declaration of cv$accumulatedConsumerProbabilities moved.
					// Declaration comment was:
					// Set an accumulator to sum the probabilities for each possible configuration of
					// inputs.
					//
					// cv$temp$2$var75's comment
					// Constructing a random variable input for use later.
					//
					// Processing random variable 76.
					//
					// Looking for a path between Sample 53 and consumer Bernoulli 76.
					//
					// Value of the variable at this index
					//
					// Substituted "cv$valuePos" with its value "1".
					cv$accumulatedProbabilities = (DistributionSampling.logProbabilityBernoulli(flips[j], bias[1]) + cv$accumulatedProbabilities);
			}
		}

		// Save the calculated index value into the array of index value probabilities
		//
		// Get a local reference to the scratch space.
		//
		// Record the reached probability density.
		//
		// Initialize a counter to track the reached distributions.
		cv$var50$stateProbabilityGlobal[1] = cv$accumulatedProbabilities;

		// This value is not used before it is set again, so removing the value declaration.
		//
		// The sum of all the probabilities in log space
		double cv$logSum;

		// Sum all the values
		//
		// Initialise the max to the first element.
		//
		// Get a local reference to the scratch space.
		double cv$lseMax = cv$var50$stateProbabilityGlobal[0];

		// Unrolled loop
		//
		// Get a local reference to the scratch space.
		double cv


ala ang \u003cb\u003eArmed Forces of the Philippines\u003c\u002fb\u003e nitong Sabado ...","Armed Forces of the Philippines","ORG"],["...a lalawigan ng \u003cb\u003eRomblon\u003c\u002fb\u003e kung saan inul...","Romblon","ORG"],["...n commander ng \u003cb\u003ePhilippine Coast Guard\u003c\u002fb\u003e sa Maynila nit...","Philippine Coast Guard","ORG"],["... negosasyon sa \u003cb\u003eMNLF\u003c\u002fb\u003e (mas kilala sa...","MNLF","ORG"],["... agreement) at \u003cb\u003eMILF\u003c\u002fb\u003e. Habang sa pan...","MILF","ORG"],["Ayon kay \u003cb\u003eUniOil\u003c\u002fb\u003e spokesman Raym...","UniOil","ORG"],["...ials,\" ayon sa \u003cb\u003eMILF\u003c\u002fb\u003e.","MILF","ORG"],["...sa pangalan ng \u003cb\u003eGFI\u003c\u002fb\u003e at housing age...","GFI","ORG"],["...negotiation sa \u003cb\u003eMILF\u003c\u002fb\u003e. Hindi rin uma...","MILF","ORG"],["...\" posisyon ang \u003cb\u003eGSIS\u003c\u002fb\u003e sa hangarin na...","GSIS","ORG"],["...sa liderato sa \u003cb\u003eMeralco\u003c\u002fb\u003e, pinagbigyan n...","Meralco","ORG"],["...oil companies (\u003cb\u003ePetron\u003c\u002fb\u003e, Shell and Che...","Petron","ORG"],["...anies (Petron, \u003cb\u003eShell\u003c\u002fb\u003e and Chevron) n...","Shell","ORG"],["...ron, Shell and \u003cb\u003eChevron\u003c\u002fb\u003e) na huwag sumu...","Chevron","ORG"],["Sa ulat ng \u003cb\u003ePhilippine Atmospheric Geophysical and Astronomical Services Administration\u003c\u002fb\u003e (Pagasa) niton...","Philippine Atmospheric Geophysical and Astronomical Services Administration","ORG"],["...dministration (\u003cb\u003ePagasa\u003c\u002fb\u003e) nitong Sabado...","Pagasa","ORG"],["... na inihain ng \u003cb\u003eOffice of the Solicitor General\u003c\u002fb\u003e noong Miyerkul...","Office of the Solicitor General","ORG"],["...bit sa kaso ng \u003cb\u003eMeralco\u003c\u002fb\u003e at GSIS.","Meralco","ORG"],["... ng Meralco at \u003cb\u003eGSIS\u003c\u002fb\u003e.","GSIS","ORG"],["...dinagdag pa ng \u003cb\u003ePCGG\u003c\u002fb\u003e na natural lan...","PCGG","ORG"],["...g pinapasok ng \u003cb\u003eMILF\u003c\u002fb\u003e forces ang are...","MILF","ORG"],["...not covered by \u003cb\u003eBJE\u003c\u002fb\u003e. Why? Kasi tak...","BJE","ORG"],["... ko sinasabing \u003cb\u003eKampi\u003c\u002fb\u003e, Lakas. Ikaw k...","Kampi","ORG"],["...asabing Kampi, \u003cb\u003eL


k<S: AsRef<str>>(
    ty: &ast::Ty,
    class_name: S,
    context: &Context,
) -> Result<String, Error> {
    match ty.node {
        ast::TyKind::BareFn(ref bare_fn) => Ok(format!(
            "package {namespace};\n\n\
             public interface {name} {{\n\
             \tpublic void call({types});\n}}\n",
            namespace = context.namespace_model,
            name = class_name.as_ref(),
            types = callback_to_java(bare_fn, ty.span, context)?,
        )),
        // All other types just have a name associated with them.
        _ => Err(Error {
            level: Level::Error,
            span: Some(ty.span),
            message: "Invalid callback type".into(),
        }),
    }
}

/// Transform a Rust FFI callback into Java function signature
fn callback_to_java(
    fn_ty: &ast::BareFnTy,
    fn_span: codemap::Span,
    context: &Context,
) -> Result<String, Error> {
    match fn_ty.abi {
        // If it doesn't have a C ABI it can't be called from C.
        Abi::C | Abi::Cdecl | Abi::Stdcall | Abi::Fastcall | Abi::System => {}
        _ => {
            return Err(Error {
                level: Level::Error,
                span: Some(fn_span),
                message: "callbacks that don't have C ABI are not supported".into(),
            })
        }
    }

    if !fn_ty.lifetimes.is_empty() {
        return Err(Error {
            level: Level::Error,
            span: Some(fn_span),
            message: "can not handle lifetimes".into(),
        });
    }

    let fn_decl: &ast::FnDecl = &*fn_ty.decl;
    let mut args = Vec::new();

    let mut args_iter = fn_decl
        .inputs
        .iter()
        .filter(|arg| !is_user_data_arg(arg))
        .peekable();

    while let Some(arg) = args_iter.next() {
        let arg_name = pprust::pat_to_string(&*arg.pat);
        let mut java_type = rust_to_java(&*arg.ty, context)?;

        if is_array_arg(arg, args_iter.peek().cloned()) {
            // Detect array ptrs: skip the length args and add array to the type sig
            java_type = JavaType::Array(Box::new(java_type));
            args_iter.next();
        }

        let java_type = java_type_to_str(&java_type)?;
        args.push(format!("{} {}", java_type, arg_name.to_camel_case()));
    }

    Ok(args.join(", "))
}

#[cfg(test)]
mod tests {
    use super::*;
    use syntax::ast::{Arg, ItemKind};
    use syntax::codemap::FilePathMapping;
    use syntax::parse::{self, ParseSess};

    #[test]
    fn cb_names() {
        fn get_inputs(source: &str) -> Vec<Arg> {
            let parse_sess = ParseSess::new(FilePathMapping::empty());

            let item = unwrap!(unwrap!(parse::parse_item_from_source_str(
                "dummy.rs".to_owned(),
                source.to_owned(),
                &parse_sess,
            )));

            match item.node {
                ItemKind::Fn(ref fn_decl, _, _, _, _, _) => fn_decl.inputs.clone(),
                _ => panic!("wrong item type"),
            }
        }

        let context = Context {
            type_map: HashMap::new(),
            lib_name: "backend".to_owned(),
            namespace: "net.maidsafe.bindings".to_owned(),
            namespace_model: "


wnTime + 5000 - curTime) / 1000f
			val color = when {
				timeUntilSpawn <= 1 -> "§c"
				timeUntilSpawn <= 3 -> "§e"
				else -> "§a"
			}

			val scale = max(1.0, mc.thePlayer.positionVector.distanceTo(it.pos) / 5.0).toFloat()

			WorldRenderUtils.renderString(
				it.pos, "${color}${String.format("%.2f", timeUntilSpawn)}", false, scale, true
			)
		}
	}

	fun updateDragonDead() {
		if (!(DulkirConfig.dragonKillBox || DulkirConfig.lbWaypoints || DulkirConfig.decoyWaypoints || DulkirConfig.gyroWaypoints)) return
		if (!ScoreBoardUtils.isInM7) return
		if (mc.theWorld == null) return
		if (mc.thePlayer.positionVector.yCoord > 45) return

		val world: World = mc.theWorld

		orangeAlive = !world.isAirBlock(BlockPos(90, 21, 56))
		redAlive = !world.isAirBlock(BlockPos(22, 20	, 59))
		greenAlive = !world.isAirBlock(BlockPos(22, 21, 94))
		purpleAlive = !world.isAirBlock(BlockPos(56, 20, 130))
		blueAlive = !world.isAirBlock(BlockPos(89, 21, 94))
	}

	/**
	 * true = dead
	 */
	private fun isAlive(color: String): Boolean {
		return when (color) {
			"orange" -> orangeAlive
			"red" -> redAlive
			"green" -> greenAlive
			"purple" -> purpleAlive
			"blue" -> blueAlive
			else -> false
		}
	}

	private fun inRangeOf(color: String, pos: Vec3): Boolean {
		val x = pos.xCoord.toInt()
		val y = pos.yCoord.toInt()
		val z = pos.zCoord.toInt()

		return when (color) {
			"orange" -> {
				x in 82..88 && y in 15..22 && z in 53..59
			}

			"red" -> {
				x in 24..30 && y in 15..22 && z in 56..62
			}

			"green" -> {
				x in 23..29 && y in 15..22 && z in 91..97
			}

			"purple" -> {
				x in 53..59 && y in 15..22 && z in 122..128
			}

			"blue" -> {
				x in 82..88 && y in 15..22 && z in 91..97
			}

			else -> {
				false
			}
		}
	}

	private fun renderDragonBoxes() {
		if (!DulkirConfig.dragonKillBox) return
		if (!ScoreBoardUtils.isInM7) return
		if (mc.thePlayer.positionVector.yCoord > 45) return
		// Blue
		if (isAlive("blue"))
			WorldRenderUtils.drawCustomBox(71.5, 25.0, 16.0, 10.0, 82.5, 25.0, Color(0, 170, 170, 255), 3f, phase = false)
		// Purple
		if (isAlive("purple"))
			WorldRenderUtils.drawCustomBox(45.5, 23.0, 13.0, 10.0, 113.5, 23.0, Color(170, 0, 170, 255), 3f, phase = false)
		// Green
		if (isAlive("green"))
			WorldRenderUtils.drawCustomBox(7.0, 30.0, 8.0, 20.0, 80.0, 30.0, Color(85, 255, 85, 255), 3f, phase = false)
		// Red
		if (isAlive("red"))
			WorldRenderUtils.drawCustomBox(14.5, 25.0, 13.0, 15.0, 45.5, 25.0, Color(255, 85, 85, 255), 3f, phase = false)
		// Orange
		if (isAlive("orange"))
			WorldRenderUtils.


# coding: utf-8

# flake8: noqa

"""
    Finances API

    This API is used to retrieve seller payouts and monetary transaction details related to those payouts.  # noqa: E501

    OpenAPI spec version: v1.17.3

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

# import apis into sdk package
from ..sell_finances.api.payout_api import PayoutApi
from ..sell_finances.api.seller_funds_summary_api import SellerFundsSummaryApi
from ..sell_finances.api.transaction_api import TransactionApi
from ..sell_finances.api.transfer_api import TransferApi
# import ApiClient
from ..sell_finances.api_client import ApiClient
from ..sell_finances.configuration import Configuration
# import models into sdk package
from ..sell_finances.models.amount import Amount
from ..sell_finances.models.balance_adjustment import BalanceAdjustment
from ..sell_finances.models.buyer import Buyer
from ..sell_finances.models.charge import Charge
from ..sell_finances.models.error import Error
from ..sell_finances.models.error_parameter import ErrorParameter
from ..sell_finances.models.fee import Fee
from ..sell_finances.models.fee_jurisdiction import FeeJurisdiction
from ..sell_finances.models.funding_source import FundingSource
from ..sell_finances.models.order_line_item import OrderLineItem
from ..sell_finances.models.payout import Payout
from ..sell_finances.models.payout_details import PayoutDetails
from ..sell_finances.models.payout_instrument import PayoutInstrument
from ..sell_finances.models.payout_summary_response import PayoutSummaryResponse
from ..sell_finances.models.payouts import Payouts
from ..sell_finances.models.reference import Reference
from ..sell_finances.models.seller_funds_summary_response import SellerFundsSummaryResponse
from ..sell_finances.models.tax import Tax
from ..sell_finances.models.transaction import Transaction
from ..sell_finances.models.transaction_summary_response import TransactionSummaryResponse
from ..sell_finances.models.transactions import Transactions
from ..sell_finances.models.transfer import Transfer
from ..sell_finances.models.transfer_detail import TransferDetail


 nil, err
		}
	}
	return c, nil
}

// WithMerklizedRoot sets root to value v_2 or index i_2
// Returns ErrSlotOverflow if root value are too big.
func WithMerklizedRoot(r *big.Int, pos MerklizedRootPosition) Option {
	return func(c *Claim) error {
		switch pos {
		case MerklizedRootPositionIndex:
			c.setFlagMerklized(MerklizedRootPositionIndex)
			return setSlotInt(&c.index[2], r, SlotNameIndexA)
		case MerklizedRootPositionValue:
			c.setFlagMerklized(MerklizedRootPositionValue)
			return setSlotInt(&c.value[2], r, SlotNameValueA)
		default:
			return ErrIncorrectMerklizedPosition
		}
	}
}

// HIndex calculates the hash of the Index of the Claim
func (c *Claim) HIndex() (*big.Int, error) {
	return poseidon.Hash(ElemBytesToInts(c.index[:]))
}

// HValue calculates the hash of the Value of the Claim
func (c *Claim) HValue() (*big.Int, error) {
	return poseidon.Hash(ElemBytesToInts(c.value[:]))
}

// HiHv returns the HIndex and HValue of the Claim
func (c *Claim) HiHv() (*big.Int, *big.Int, error) {
	hi, err := c.HIndex()
	if err != nil {
		return nil, nil, err
	}
	hv, err := c.HValue()
	if err != nil {
		return nil, nil, err
	}

	return hi, hv, nil
}

// SetSchemaHash updates claim's schema hash.
func (c *Claim) SetSchemaHash(sh SchemaHash) {
	copy(c.index[0][:schemaHashLn], sh[:])
}

// GetSchemaHash return copy of claim's schema hash.
func (c *Claim) GetSchemaHash() SchemaHash {
	var sh SchemaHash
	copy(sh[:], c.index[0][:schemaHashLn])
	return sh
}

// GetIDPosition returns the position at which the ID is stored.
func (c *Claim) GetIDPosition() (IDPosition, error) {
	switch c.getSubject() {
	case subjectFlagSelf:
		return IDPositionNone, nil
	case subjectFlagOtherIdenIndex:
		return IDPositionIndex, nil
	case subjectFlagOtherIdenValue:
		return IDPositionValue, nil
	default:
		return 0, ErrInvalidSubjectPosition
	}
}

func (c *Claim) setSubject(s subjectFlag) {
	// clean first 3 bits
	c.index[0][flagsByteIdx] &= 0b11111000
	c.index[0][flagsByteIdx] |= byte(s)
}

// setFlagMerklized sets the merklized flag in the claim
func (c *Claim) setFlagMerklized(s MerklizedRootPosition) {
	var f merklizedFlag
	switch s {
	case MerklizedRootPositionIndex:
		f = merklizedFlagIndex
	case MerklizedRootPositionValue:
		f = merklizedFlagValue
	default:
		f = merklizedFlagNone
	}
	// clean last 3 bits
	c.index[0][flagsByteIdx] &= 0b00011111
	c.index[0][flagsByteIdx] |= byte(f)
}

func (c *Claim) getSubject() subjectFlag {
	sbj := c.index[0][flagsByteIdx]
	// clean all except first 3 bits
	sbj &= 0b00000111
	return subjectFlag(sbj)
}

func (c *Claim) getMerklized() merklizedFlag {
	mt := c.index[0][flagsByteIdx]
	// clean all except last 3 bits
	mt &= 0b111


oCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC\");\
}\
.ace-ambiance .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\
}";

var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);

});
"no use strict";
;(function(window) {
if (typeof window.window != "undefined" && window.document)
    return;
if (window.require && window.define)
    return;

window.console = function() {
    var msgs = Array.prototype.slice.call(arguments, 0);
    postMessage({type: "log", data: msgs});
};
window.console.error =
window.console.warn =
window.console.log =
window.console.trace = window.console;

window.window = window;
window.ace = window;

window.onerror = function(message, file, line, col, err) {
    postMessage({type: "error", data: {
        message: message,
        data: err.data,
        file: file,
        line: line,
        col: col,
        stack: err.stack
    }});
};

window.normalizeModule = function(parentId, moduleName) {
    // normalize plugin requires
    if (moduleName.indexOf("!") !== -1) {
        var chunks = moduleName.split("!");
        return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
    }
    // normalize relative requires
    if (moduleName.charAt(0) == ".") {
        var base = parentId.split("/").slice(0, -1).join("/");
        moduleName = (base ? base + "/" : "") + moduleName;

        while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
            var previous = moduleName;
            moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
        }
    }

    return moduleName;
};

window.require = function require(parentId, id) {
    if (!id) {
        id = parentId;
        parentId = null;
    }
    if (!id.charAt)
        throw new Error("worke


-color: transparent;
  }

  .md-datepicker-triangle-button,
  &.md-input-has-value > label,
  &.md-input-has-placeholder > label {
    display: none;
  }
}

// When the position of the floating calendar pane is adjusted to remain inside
// of the viewport, hide the inputput mask, as the text input will no longer be
// directly underneath it.
.md-datepicker-pos-adjusted .md-datepicker-input-mask {
  display: none;
}

// Animate the calendar inside of the floating calendar pane such that it appears to "scroll" into
// view while the pane is opening. This is done as a cue to users that the calendar is scrollable.
.md-datepicker-calendar-pane {
  .md-calendar {
    transform: translateY(-85px);
    transition: transform 0.65s $swift-ease-out-timing-function;
    transition-delay: 0.125s;
  }

  &.md-pane-open .md-calendar {
    transform: translateY(0);
  }
}
md-input-container {

  // The asterisk of the select should always use the warn color.
  md-select.md-THEME_NAME-theme .md-select-value {
    span:first-child:after {
      color: '{{warn-A700}}'
    }
  }

  // When the select is blurred and not invalid then the asterisk should use the foreground color.
  &:not(.md-input-focused):not(.md-input-invalid) {
    md-select.md-THEME_NAME-theme .md-select-value {
      span:first-child:after {
        color: '{{foreground-3}}';
      }
    }
  }

  &.md-input-focused:not(.md-input-has-value) {
    md-select.md-THEME_NAME-theme .md-select-value {
      color: '{{primary-color}}';

      &.md-select-placeholder {
        color: '{{primary-color}}';
      }
    }
  }

  &.md-input-invalid {
    md-select.md-THEME_NAME-theme .md-select-value {
      color: '{{warn-A700}}' !important;
      border-bottom-color: '{{warn-A700}}' !important;
    }

    md-select.md-THEME_NAME-theme.md-no-underline .md-select-value {
      border-bottom-color: transparent !important;
    }
  }

  &:not(.md-input-invalid) {
    &.md-input-focused {
      &.md-accent {
        .md-select-value {
          border-color: '{{accent-color}}';
          span {
            color: '{{accent-color}}';
          }
        }
      }
      &.md-warn {
        .md-select-value {
          border-color: '{{warn-A700}}';
          span {
            color: '{{warn-A700}}';
          }
        }
      }
    }
  }

}

md-select.md-THEME_NAME-theme {
  &[disabled] .md-select-value {
    border-bottom-color: transparent;
    background-image: linear-gradient(to right, '{{foreground-3}}' 0%, '{{foreground-3}}' 33%, transparent 0%);
    background-image: -ms-linear-gradient(left, transparent 0%, '{{foreground-3}}' 100%);
  }

  .md-select-value {
    border-bottom-color: '{{foreground-4}}';

    &.md-select-placeholder {
      color: '{{foreground-3}}';
    }

    span:first-child:after {
      color: '{{warn-A700}}'
    }
  }

  &.md-no-underline .md-select-value {
    border-bottom-color: transparent !important;
  }

  &.ng-invalid.ng-touched {
    .md-select-value {
      color: '{{warn-A700}}' !important;
      border-bottom-color: '{{warn-A700}}' !important;


_handle<VkPipeline>(100022), pipe, nullptr, 0))
		abort();
	density_layered.maxFragmentDensityMapLayers = 2;
	if (!recorder.record_graphics_pipeline(fake_handle<VkPipeline>(100023), pipe, nullptr, 0))
		abort();
}

static void record_raytracing_pipelines(StateRecorder &recorder)
{
	VkRayTracingPipelineCreateInfoKHR pipe = {VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR };

	pipe.maxPipelineRayRecursionDepth = 3;
	pipe.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT;
	pipe.layout = fake_handle<VkPipelineLayout>(10002);

	VkSpecializationInfo spec = {};
	VkSpecializationMapEntry map_entry = {};
	const uint32_t spec_data = 100;
	spec.dataSize = 4;
	spec.mapEntryCount = 1;
	spec.pData = &spec_data;
	map_entry.offset = 0;
	map_entry.size = 4;
	map_entry.constantID = 5;
	spec.pMapEntries = &map_entry;

	VkPipelineShaderStageCreateInfo stages[2] = {};
	pipe.stageCount = 2;
	pipe.pStages = stages;
	stages[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
	stages[0].stage = VK_SHADER_STAGE_RAYGEN_BIT_KHR;
	stages[0].pName = "gen";
	stages[0].module = fake_handle<VkShaderModule>(5000);
	stages[0].pSpecializationInfo = &spec;
	stages[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
	stages[1].stage = VK_SHADER_STAGE_MISS_BIT_KHR;
	stages[1].pName = "miss";
	stages[1].module = fake_handle<VkShaderModule>(5001);
	stages[1].pSpecializationInfo = &spec;

	VkRayTracingShaderGroupCreateInfoKHR groups[2] = {};
	pipe.groupCount = 2;
	pipe.pGroups = groups;
	groups[0].sType = VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR;
	groups[0].type = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR;
	groups[0].closestHitShader = 1;
	groups[0].anyHitShader = 2;
	groups[0].generalShader = 3;
	groups[0].intersectionShader = VK_SHADER_UNUSED_KHR;
	groups[1].sType = VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR;
	groups[1].type = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR;
	groups[1].closestHitShader = 4;
	groups[1].anyHitShader = 5;
	groups[1].generalShader = 6;
	groups[1].intersectionShader = 7;

	if (!recorder.record_raytracing_pipeline(fake_handle<VkPipeline>(40), pipe, nullptr, 0))
		abort();

	pipe.flags = VK_PIPELINE_CREATE_DERIVATIVE_BIT;
	pipe.basePipelineHandle = fake_handle<VkPipeline>(40);
	pipe.basePipelineIndex = -1;
	if (!recorder.record_raytracing_pipeline(fake_handle<VkPipeline>(41), pipe, nullptr, 0))
		abort();

	VkRayTracingPipelineInterfaceCreateInfoKHR iface = { VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR };
	iface.maxPi