ext.arc(leftCenter.x, leftCenter.y, touchGamepadSize/2, 0, 9);
    context.fill();
    context.stroke();

    // draw right face buttons
    const rightCenter = vec3(mainCanvasSize.x-touchGamepadSize, mainCanvasSize.y-touchGamepadSize);
    for (let i=2; i--;)
    {
        const pos = rightCenter.add(vec3(0,(i?1:-1)*touchGamepadSize/2));
        context.fillStyle = touchGamepadButtons[i] ? '#fff' : '#000';
        context.beginPath();
        context.arc(pos.x, pos.y, touchGamepadSize/3, 0, 9);
        context.fill();
        context.stroke();
    }

    // set canvas back to normal
    context.restore();
}'use strict';

///////////////////////////////////////////////////////////////////////////////
// Math Stuff

const PI = Math.PI;
const abs = (value) => Math.abs(value);
const min = (valueA, valueB) => Math.min(valueA, valueB);
const max = (valueA, valueB) => Math.max(valueA, valueB);
const sign = (value) => value < 0 ? -1 : 1;
const mod = (dividend, divisor=1) => ((dividend % divisor) + divisor) % divisor;
const clamp = (value, min=0, max=1) => value < min ? min : value > max ? max : value;
const clampAngle = (value) => ((value+PI) % (2*PI) + 2*PI) % (2*PI) - PI;
const percent = (value, valueA, valueB) => (valueB-=valueA) ? clamp((value-valueA)/valueB) : 0;
const lerp = (percent, valueA, valueB) => valueA + clamp(percent) * (valueB-valueA);
const rand = (valueA=1, valueB=0) => lerp(Math.random(), valueA, valueB);
const randInt = (valueA, valueB=0) => rand(valueA, valueB)|0;
const smoothStep = (p) => p * p * (3 - 2 * p);
const isOverlapping = (posA, sizeA, posB, sizeB=vec3()) =>
    abs(posA.x - posB.x)*2 < sizeA.x + sizeB.x && abs(posA.y - posB.y)*2 < sizeA.y + sizeB.y;
function buildMatrix(pos, rot, scale)
{
    const R2D = 180/PI;
    let m = new DOMMatrix;
    pos && m.translateSelf(pos.x, pos.y, pos.z);
    rot && m.rotateSelf(rot.x*R2D, rot.y*R2D, rot.z*R2D);
    scale && m.scaleSelf(scale.x, scale.y, scale.z);
    return m;
}
function shuffle(array)
{
    for(let currentIndex = array.length; currentIndex;)
    {
        const randomIndex = random.int(currentIndex--);
        [array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
    }
    return array;
}
function formatTimeString(t)
{
    const timeS = t%60|0;
    const timeM = t/60|0;
    const timeMS = t%1*1e3|0;
    return `${timeM}:${timeS<10?'0'+timeS:timeS}.${(timeMS<10?'00':timeMS<100?'0':'')+timeMS}`;
}

function noise1D(x)
{
    const hash = x=>(new Random(x)).float(-1,1);
    return lerp(smoothStep(mod(x,1)), hash(x), hash(x+1));
}

///////////////////////////////////////////////////////////////////////////////
// Vector3

const vec3 = (x, y, z)=> y == undefined && z == undefined ? new Vector3(x, x, x) : new Vector3(x, y, z);
const isVector3 = (v) => v instanceof Vector3;
const isNumber = (value) => typeof value === 'number';
const ASSERT_VEC3 = (v) => ASSERT(isVector3(v));

class Vector3
{
    constructor(x=0, y=0, z=0)
    {
        ASSERT(isNumber(x) && isNumber(y) && isNumber(z));
        this.x=x; this.y=y; this


#include "gadgets.h"
#include "math.h"

#define REP_LIST once,rep,repnz

.gadget cld
    ldr w8, [_cpu, CPU_eflags]
    bic w8, w8, DF_FLAG
    str w8, [_cpu, CPU_eflags]
    gret

.gadget std
    ldr w8, [_cpu, CPU_eflags]
    orr w8, w8, DF_FLAG
    str w8, [_cpu, CPU_eflags]
    gret

# FIXME non 32 bit
.macro do_strop op, size, rep, s=
    # repnz is only a thing for cmps and scas
    .ifc \rep,repnz
        .ifnc \op,cmps N .ifnc \op,scas
            .exitm
        .endif N .endif
    .endif

    .gadget \op\size\()_\rep
        .ifnc \rep,once
            cbz ecx, 2f
        .endif
        # df_offset = w12
        mov w12, (\size/8)
        ldr w8, [_cpu, CPU_eflags]
        tst w8, DF_FLAG
        cneg w12, w12, ne
    1:

        .ifc \op,lods
            mov _addr, esi
            read_prep \size, \op\size\()_\rep
            ldrs eax, [_xaddr], \s

        .else N .ifc \op,stos
            mov _addr, edi
            write_prep \size, \op\size\()_\rep
            str\s eax, [_xaddr]
            write_done \size, \op\size\()_\rep

        .else N .ifc \op,movs
            mov _addr, esi
            read_prep \size, \op\size\()_\rep
            ldr\s _tmp, [_xaddr]
            mov _addr, edi
            write_prep \size, \op\size\()_\rep\()2
            str\s _tmp, [_xaddr]
            write_done \size, \op\size\()_\rep\()2

        .else N .ifc \op, scas
            mov _addr, edi
            read_prep \size, \op\size\()_\rep
            ldr\s w8, [_xaddr]
            mov _tmp, eax
            setf_a src=w8, dst=_tmp
            do_add sub, _tmp, w8, \s
            setf_zsp \s

        .else N .ifc \op, cmps


ByMeasurementBasisAxis": "us-gaap:CarryingReportedAmountFairValueDisclosureMember",
    "p": "2021-07-01"
   },
   "v": "2784000000",
   "f": "ixt:num-dot-decimal",
   "d": -6
  },
  "id3VybDovL2RvY3MudjEvZG9jOjJhM2VjODljNjUyMjQxYTE4MTVjZjdjODA0YzQzMzZmL3NlYzoyYTNlYzg5YzY1MjI0MWExODE1Y2Y3YzgwNGM0MzM2Zl84Mi9mcmFnOjNlMDBiOTU2ZWI4YjQ1NDM5Y2E1ZWFiYmE2ZThlZjUzL3RhYmxlOjRhNGJjZTBkZTBhODRjZGQ4M2Q2YTIyNTQ2OTY2MjliL3RhYmxlcmFuZ2U6NGE0YmNlMGRlMGE4NGNkZDgzZDZhMjI1NDY5NjYyOWJfMTAtMTEtMS0xLTYwOTE4_87a6592e-5d0b-440a-83be-6206325ac25d": {
   "a": {
    "c": "us-gaap:FinancialLiabilitiesFairValueDisclosure",
    "e": "e:0000021076",
    "u": "iso4217:USD",
    "us-gaap:FairValueByMeasurementBasisAxis": "us-gaap:EstimateOfFairValueFairValueDisclosureMember",
    "p": "2021-07-01"
   },
   "v": "2963000000",
   "f": "ixt:num-dot-decimal",
   "d": -6
  },
  "id3VybDovL2RvY3MudjEvZG9jOjJhM2VjODljNjUyMjQxYTE4MTVjZjdjODA0YzQzMzZmL3NlYzoyYTNlYzg5YzY1MjI0MWExODE1Y2Y3YzgwNGM0MzM2Zl84Mi9mcmFnOjNlMDBiOTU2ZWI4YjQ1NDM5Y2E1ZWFiYmE2ZThlZjUzL3RleHRyZWdpb246M2UwMGI5NTZlYjhiNDU0MzljYTVlYWJiYTZlOGVmNTNfODcxNg_42f13943-0454-481d-b59f-1aac0dea51aa": {
   "a": {
    "c": "us-gaap:AssetImpairmentCharges",
    "e": "e:0000021076",
    "u": "iso4217:USD",
    "us-gaap:StatementBusinessSegmentsAxis": "clx:HealthAndWellnessMember",
    "p": "2020-07-01/2021-07-01"
   },
   "v": "343000000",
   "d": -6
  },
  "id3VybDovL2RvY3MudjEvZG9jOjJhM2VjODljNjUyMjQxYTE4MTVjZjdjODA0YzQzMzZmL3NlYzoyYTNlYzg5YzY1MjI0MWExODE1Y2Y3YzgwNGM0MzM2Zl84Mi9mcmFnOjNlMDBiOTU2ZWI4YjQ1NDM5Y2E1ZWFiYmE2ZThlZjUzL3RleHRyZWdpb246M2UwMGI5NTZlYjhi


all this if you want to save and read the passcode and timers to and from somewhere else rather than the Keychain.
 @attention         All the protocol methods will fall back to the Keychain if not implemented, even if calling this method with @c NO. This allows for flexibility over what and where you save.
 @param useKeychain Set to @c NO if you want to save and read the passcode and timers to and from somewhere else rather than the Keychain. Default is @c YES.
 */
+ (void)useKeychain:(BOOL)useKeychain;
/**
 @brief  Returns the shared instance of the passcode view controller.
 */
+ (instancetype)sharedUser;

@end


接收并校验参数
      ctx.validate(vUser, ctx.request.body);
      // 判断用户名是否重复
      const users = await ctx.service.user.checkUserName(ctx.request.body);
      if (users[0]) {
        this.render(users, '用户名已存在', '400');
        return;
      }
      await ctx.service.user.Register(ctx.request.body);
      this.render(true, '注册成功');
    } catch (e) {
      console.log(e, '----error');
      this.fail('500', (e as { name: string }).name);
    }
  }

  // 用户登陆
  async login() {
    const { ctx } = this;
    // 接收并校验参数
    ctx.validate(vUser, ctx.request.body);
    const data = await ctx.service.user.Login(ctx.request.body);
    if (!data) {
      ctx.status = 200;
      this.fail('400', '用户名或密码错误');
      return;
    }
    this.render(data.token, '登陆成功');
  }

  async update() {
    const { ctx } = this;
    ctx.body = '';
  }
}

export default UserController;
/*
    Aqui estan definidas las funciones para el crud de mi tabla Tax
*/
import { Request, Response } from 'express';
const Tax = require('../models/tax.model');

//Esta funcion busca un Tax por ID
export async function findById(req: Request, res: Response) {
	const tax = req.body;
	let { ID } = tax;
	await Tax.findOne({ where: { ID: ID } })
		.then((tax: any) => res.json(tax))
		.catch((err: Error) => console.log('Tax error: ' + err));
}

//Esta funcion busca todos los Tax
export async function find(req: Request, res: Response) {
	await Tax.findAll()
		.then((tax: any) => res.json(tax))
		.catch((err: Error) => console.log('Tax error: ' + err));
}

//Esta funcion crea un Tax
export async function saveTax(req: Request, res: Response) {
	const new_tax = req.body;
	let { Name, Value } = new_tax;
	await Tax.create({
		Name,
		Value,
	})
		.then(() => res.json({ message: 'Tax Created' }))
		.catch((err: Error) => console.log('Tax Error: ' + err));
}

//Esta funcion actualiza un Tax
export async function updateTax(req: Request, res: Response) {
	const new_tax = req.body;
	let { ID } = new_tax;
	await Tax.update(new_tax, { where: { ID: ID } })
		.then(() => res.json({ message: 'Tax Updated' }))
		.catch((err: Error) => console.log('Tax Error: ' + err));
}

//Esta funcion elimina un Tax
export async function deleteTax(req: Request, res: Response) {
	const new_tax = req.body;
	let { ID } = new_tax;
	await Tax.destroy({ where: { ID: ID } })
		.then(() => res.json({ message: 'Tax Deleted' }))
		.catch((err: Error) => console.log('Tax Error: ' + err));
}
 //get and set local storage values and get nav paramas using NavParams Obj.
 import { Injectable } from '@angular/core';

 abstract class AbstractBehaviourStrategy {
   abstract storageOrNavParams(names:string[], behaviourObj:any, typeOfBehaviour:string, actionType:any);
}

@Injectable()
export class ConcreteBehaviourStrategy implements AbstractBehaviourStrategy {
  async  storageOrNavParams(names:string[], behaviourObj:any, typeOfBehaviour:any,actionType:any) {
    let returnValues = [];
       switch(typeOfBehaviour){
           case BehaviourTypes.navParams:

           for(let i=0;i<names.length;i++){
               returnValues.push(behaviourObj.get(names[i]))
           }
          return returnValues;
          case BehaviourTypes.l


, transparent 70%, rgba(255,0,0,0.7) 100%)', // 红色
  CLOCK: 'radial-gradient(ellipse at center, transparent 70%, rgba(0,120,255,0.7) 100%)', // 蓝色
  SHEID: 'radial-gradient(ellipse at center, transparent 70%, rgba(255,255,0,0.7) 100%)', // 黄色
  ZONGZI: 'radial-gradient(ellipse at center, transparent 70%, rgba(0,255,0,0.7) 100%)', // 绿色
}

// 道具图标映射
const ITEM_ICONS = {
  shoe: '/image/shoe.png',
  clock: '/image/clock.png',
  sheid: '/image/sheid.png',
  zongzi: '/image/zongzi.png',
  // 可扩展更多道具
}

const FLASH_TIME = 800 // ms，快结束时闪烁

// ===== 道具效果遮罩 =====

/**
 * 显示道具效果遮罩
 * @param {string} type 道具类型（SHOE/CLOCK/SHEID）
 * @param {number} duration 遮罩持续时间（毫秒）
 */
export function showItemEffectMask(type, duration) {
  const mask = document.getElementById('item-effect-mask')
  if (!mask)
    return

  // 设置椭圆渐变背景
  mask.style.background = ITEM_TYPE_GRADIENTS[type.toUpperCase()] || ITEM_TYPE_GRADIENTS.SHOE
  mask.style.display = 'block'
  mask.classList.remove('opacity-0')
  mask.classList.add('opacity-100')
  mask.classList.remove('animate-pulse', 'flash') // 移除旧动画

  // 清除旧定时器
  clearTimeout(mask._hideTimer)
  clearTimeout(mask._flashTimer)

  // 快结束时闪烁
  mask._flashTimer = setTimeout(() => {
    mask.classList.add('animate-pulse')
    mask.classList.add('flash') // 添加自定义闪烁效果
  }, duration - FLASH_TIME)

  // 遮罩结束时隐藏
  mask._hideTimer = setTimeout(() => {
    mask.classList.remove('animate-pulse', 'flash')
    mask.classList.remove('opacity-100')
    mask.classList.add('opacity-0')
    setTimeout(() => {
      mask.style.display = 'none'
    }, 300)
  }, duration)
}

// ===== 道具状态指示器 =====

// 存储激活的道具效果
const activeEffects = {}

/**
 * 获取或创建道具状态容器
 */
function getContainer() {
  let container = document.getElementById('item-effect-indicator')
  if (!container) {
    container = document.createElement('div')
    container.id = 'item-effect-indicator'
    document.body.appendChild(container)
  }
  // 响应式定位，PC右中，移动端右下
  container.className = `
    fixed right-6 top-1/2 -translate-y-1/2
    flex flex-col gap-4 z-[9999] transform
    select-none
    sm:right-6 sm:top-1/2 sm:-translate-y-1/2
    right-2 top-[60%] -translate-y-[60%]
  `.replace(/\s+/g, ' ')
  return container
}

/**
 * 渲染道具状态指示器
 */
function render() {
  const container = getContainer()
  container.innerHTML = ''
  Object.entries(activeEffects).forEach(([type, effect]) => {
    const item = document.createElement('div')
    item.className = `
      flex items-center justify-center bg-black/70 rounded-xl px-4 p


from config import config, ConfigSelection, ConfigSubsection, ConfigOnOff, ConfigText
from Components.Timezones import timezones
from Components.Language import language
from Components.Keyboard import keyboard

def InitSetupDevices():

	def timezoneNotifier(configElement):
		timezones.activateTimezone(configElement.index)

	config.timezone = ConfigSubsection();
	config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList())
	config.timezone.val.addNotifier(timezoneNotifier)

	def keyboardNotifier(configElement):
		keyboard.activateKeyboardMap(configElement.index)

	config.keyboard = ConfigSubsection();
	config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist())
	config.keyboard.keymap.addNotifier(keyboardNotifier)

	def languageNotifier(configElement):
		language.activateLanguage(configElement.value)

	config.osd = ConfigSubsection()
	config.osd.language = ConfigText(default = "en_EN");
	config.osd.language.addNotifier(languageNotifier)

	config.parental = ConfigSubsection();
	config.parental.lock = ConfigOnOff(default = False)
	config.parental.setuplock = ConfigOnOff(default = False)

	config.expert = ConfigSubsection();
	config.expert.satpos = ConfigOnOff(default = True)
	config.expert.fastzap = ConfigOnOff(default = True)
	config.expert.skipconfirm = ConfigOnOff(default = False)
	config.expert.hideerrors = ConfigOnOff(default = False)
	config.expert.autoinfo = ConfigOnOff(default = True)


namespace StoicGoose.Core.Sound
{
	/* Channel 1, no additional features */
	public sealed class SoundChannel1
	{
		const int counterReload = 2048;

		ushort counter;
		byte pointer;

		public byte OutputLeft { get; set; }
		public byte OutputRight { get; set; }

		readonly WaveTableReadDelegate waveTableReadDelegate;

		/* REG_SND_CH1_PITCH */
		public ushort Pitch { get; set; }
		/* REG_SND_CH1_VOL */
		public byte VolumeLeft { get; set; }
		public byte VolumeRight { get; set; }
		/* REG_SND_CTRL */
		public bool IsEnabled { get; set; }

		public SoundChannel1(WaveTableReadDelegate waveT


+build !ignore_autogenerated

// Copyright 2020 Google LLC
//
// 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.

// *** DISCLAIMER ***
// Config Connector's go-client for CRDs is currently in ALPHA, which means
// that future versions of the go-client may include breaking changes.
// Please try it out and give us feedback!

// Code generated by deepcopy-gen. DO NOT EDIT.

package v1beta1

import (
	v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1"
	runtime "k8s.io/apimachinery/pkg/runtime"
)

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApigeeEnvironment) DeepCopyInto(out *ApigeeEnvironment) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
	in.Spec.DeepCopyInto(&out.Spec)
	in.Status.DeepCopyInto(&out.Status)
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApigeeEnvironment.
func (in *ApigeeEnvironment) DeepCopy() *ApigeeEnvironment {
	if in == nil {
		return nil
	}
	out := new(ApigeeEnvironment)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ApigeeEnvironment) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApigeeEnvironmentList) DeepCopyInto(out *ApigeeEnvironmentList) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	in.ListMeta.DeepCopyInto(&out.ListMeta)
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]ApigeeEnvironment, len(*in))
		for i := range *in {
			(*in)[i].DeepCopyInto(&(*out)[i])
		}
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApigeeEnvironmentList.
func (in *ApigeeEnvironmentList) DeepCopy() *ApigeeEnvironmentList {
	if in == nil {
		return nil
	}
	out := new(ApigeeEnvironmentList)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ApigeeEnvironmentList) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApigeeEnvironmentSpec) DeepCopyInto(out *ApigeeEnvironmentSpec) {
	*out = *in
	out.ApigeeOrganizationRef = in.ApigeeOrganizationRef
	if in.Description != nil {
		in, out := &in.Description, &out.Description
		*out = new(string)
		**out = **in
	}
	if in.DisplayName != nil {
		in, out := &in.DisplayName, &out.DisplayName
		*out = new(string)


 (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
                struct.lString = new ArrayList<String>(_list3.size);
                for (int _i4 = 0; _i4 < _list3.size; ++_i4)
                {
                  String _elem5; // required
                  _elem5 = iprot.readString();
                  struct.lString.add(_elem5);
                }
                iprot.readListEnd();
              }
              struct.setLStringIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // LINT_STRING
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
                struct.lintString = new ArrayList<IntString>(_list6.size);
                for (int _i7 = 0; _i7 < _list6.size; ++_i7)
                {
                  IntString _elem8; // required
                  _elem8 = new IntString();
                  _elem8.read(iprot);
                  struct.lintString.add(_elem8);
                }
                iprot.readListEnd();
              }
              struct.setLintStringIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // M_STRING_STRING
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map9 = iprot.readMapBegin();
                struct.mStringString = new HashMap<String,String>(2*_map9.size);
                for (int _i10 = 0; _i10 < _map9.size; ++_i10)
                {
                  String _key11; // required
                  String _val12; // required
                  _key11 = iprot.readString();
                  _val12 = iprot.readString();
                  struct.mStringString.put(_key11, _val12);
                }
                iprot.readMapEnd();
              }
              struct.setMStringStringIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, Complex struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(AINT_FIELD_DESC);
      oprot.writeI32(struct.aint);
      oprot.writeFieldEnd();
      if (struct.aString != null) {
        oprot.writeFieldBegin(A_STRING_FIELD_DESC);
        oprot.writeString(struct.aString);
        oprot.writeFieldEnd();
      }
      if (struct.lint != null) {
        oprot.writeFieldBegin(LINT_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.lint.size()));
          for (int _iter13 : struct.lint)
          {
            oprot.writeI32(_iter13);
          }
          opro


# %%
import numpy as np
import re
# %%
with open("input.txt","r") as f:
    out =f.read().splitlines()
data = np.array([list(x) for x in out])
data2 = np.fliplr(data)
n = data.shape[0]
# %%
def find_xmas(s):
    return len(re.findall(pattern="XMAS",string =s)) + len(re.findall(pattern="SAMX",string =s))

def ez_find(m):
    return find_xmas("".join(m))
# %%
n_xmas = 0
for i in range(n):
    col = data[:,i]
    line = data[i,:]
    lower_diag = np.diagonal(data, offset = i)
    lower_diag_f = np.diagonal(data2, offset = i)
    if i != 0:
        upper_diag = np.diagonal(data, offset = -i)
        upper_diag_f = np.diagonal(data2, offset = -i)
        n_xmas += ez_find(upper_diag)
        n_xmas += ez_find(upper_diag_f)

    n_xmas += ez_find(col)
    n_xmas += ez_find(line)
    n_xmas += ez_find(lower_diag)
    n_xmas += ez_find(lower_diag_f)
n_xmas
# %%
def find_mas(m):
    return bool(re.match("MAS|SAM","".join(m)))
# %%
#part 2
n_mas = 0
for i in range(n-2):
    for j in range(n-2):
        current_x = data[i:(i+3),j:(j+3)]
        diag = np.diagonal(current_x)
        other_diag = np.diagonal(np.fliplr(current_x))
        if find_mas(diag) and find_mas(other_diag):
            n_mas += 1
n_mas


#define MINMAXANDHISTOGRAM()				\
  {							\
    for(int j=0; j<nY*nZ; j++)				\
      {							\
	int val = ptr[j];				\
	m_rawMin = qMin(m_rawMin, (float)val);		\
	m_rawMax = qMax(m_rawMax, (float)val);		\
							\
	int idx = val-rMin;				\
	m_histogram[idx]++;				\
      }							\
  }

void
RawPlugin::findMinMaxandGenerateHistogram()
{
  float rSize;
  float rMin;
  m_histogram.clear();
  if (m_voxelType == _UChar ||
      m_voxelType == _Char)
    {
      if (m_voxelType == _UChar) rMin = 0;
      if (m_voxelType == _Char) rMin = -127;
      rSize = 255;
      for(int i=0; i<256; i++)
	m_histogram.append(0);
    }
  else if (m_voxelType == _UShort ||
      m_voxelType == _Short)
    {
      if (m_voxelType == _UShort) rMin = 0;
      if (m_voxelType == _Short) rMin = -32767;
      rSize = 65535;
      for(int i=0; i<65536; i++)
	m_histogram.append(0);
    }
  else
    {
      QMessageBox::information(0, "Error", "Why am i here ???");
      return;
    }

  //==================
  // do not calculate histogram
  QString yn = "no";
  if (!m_skipRawDialog)
    {
      QStringList items;
      items << "yes" << "no";
      yn = QInputDialog::getItem(0, "Histogram",
				 "Want to generate histogram ?",
				 items,
				 0,
				 false);
    }

  if (yn != "yes")
    {
      if (m_voxelType == _UChar)
	{
	  m_rawMin = 0;
	  m_rawMax = 255;
	  return;
	}
      else if (m_voxelType == _Char)
	{
	  m_rawMin = -127;
	  m_rawMax = 128;
	  return;
	}
      else if (m_voxelType == _UShort)
	{
	  m_rawMin = 0;
	  m_rawMax = 65535;
	  return;
	}
      else if (m_voxelType == _Short)
	{
	  m_rawMin = -32767;
	  m_rawMax = 32768;
	  return;
	}
    }
  //==================

  QProgressDialog progress("Generating Histogram",
			   QString(),
			   0, 100,
			   0);
  progress.setMinimumDuration(0);

  int nX, nY, nZ;
  nX = m_depth;
  nY = m_width;
  nZ = m_height;

  int nbytes = nY*nZ*m_bytesPerVoxel;
  uchar *tmp = new uchar[nbytes];

  QFile fin(m_fileName[0]);
  fin.open(QFile::ReadOnly);
  fin.seek(m_skipBytes);

  m_rawMin = 10000000;
  m_rawMax = -10000000;
  for(int i=0; i<nX; i++)
    {
      progress.setValue((int)(100.0*(float)i/(float)nX));
      qApp->processEvents();

      fin.read((char*)tmp, nbytes);

      if (m_voxelType == _UChar)
	{
	  uchar *ptr = tmp;
	  MINMAXANDHISTOGRAM();
	}


动增量值。这样的语句在锁定模式0、1和2下的行为不同。例如，假定c1是表t1的`AUTO_INCREMENT`列，并且最近自动生成的序列号是100。

```sql
mysql> CREATE TABLE t1 (
    -> c1 INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    -> c2 CHAR(1)
    -> ) ENGINE = INNODB;
```

现在，考虑以下**mixed lock mode**语句：

```sql
mysql> INSERT INTO t1 (c1,c2) VALUES (1,'a'), (NULL,'b'), (5,'c'), (NULL,'d');
```

在将`innodb_autoinc_lock_mode`设置为0（**传统**）的情况下，四个新行分别是：

```	sql
mysql> SELECT c1, c2 FROM t1 ORDER BY c2;
+-----+------+
| c1  | c2   |
+-----+------+
|   1 | a    |
| 101 | b    |
|   5 | c    |
| 102 | d    |
+-----+------+
```

下一个可用的自动递增值是103，因为自动递增值一次分配一次，而不是在语句执行开始时一次分配一次。 无论是否同时执行**INSERT-like**语句（任何类型），此结果都是正确的。

在将·innodb_autoinc_lock_mode·设置为1（**consecutive**）的情况下，四个新行也是：

```sql
mysql> SELECT c1, c2 FROM t1 ORDER BY c2;
+-----+------+
| c1  | c2   |
+-----+------+
|   1 | a    |
| 101 | b    |
|   5 | c    |
| 102 | d    |
+-----+------+
```

但是，在这种情况下，下一个可用的自动递增值是105，而不是103，因为在处理语句时分配了四个自动递增值，但只使用了两个。 无论是否同时执行`INSERT-like`语句（任何类型），此结果都是正确的。

在将innodb_autoinc_lock_mode设置为模式2（**traditional**）的情况下，四个新行是：

```sql
mysql> SELECT c1, c2 FROM t1 ORDER BY c2;
+-----+------+
| c1  | c2   |
+-----+------+
|   1 | a    |
|   x | b    |
|   5 | c    |
|   y | d    |
+-----+------+
```

x和y的值是唯一的，并且比以前生成的任何行大。 但是，x和y的特定值取决于同时执行语句生成的自动增量值的数量。

最后，考虑以下语句，该语句是在最近生成的序列号为100时发出的：

```sql
mysql> INSERT INTO t1 (c1,c2


NOR` (normal), `HNO` (hybrid normal), `CBN` (call-by-name), and `HSP` (head
/// spine) reduction `Order`s.
///
/// # Example
/// ```
/// use lambda_calculus::combinators::T;
/// use lambda_calculus::*;
///
/// fn dummy() -> Term { abs(Var(2)) } // a dummy term that won't easily reduce
///
/// assert_eq!(
///     beta(app(T(), dummy()), NOR, 0),
///     beta(app(dummy(), app(T(), dummy())), NOR, 0)
/// );
/// ```
pub fn T() -> Term {
    app(
        abs!(2, app(Var(1), app!(Var(2), Var(2), Var(1)))),
        abs!(2, app(Var(1), app!(Var(2), Var(2), Var(1)))),
    )
}
<filename>owr/src/examples.rs
use std::io;
use std::io::Write;
use std::sync::Arc;
use crate::{log_print, hittable};
use crate::vec3::Vec3;
use crate::hittable::{Hittable, HittableList};
use crate::sphere::{Sphere, MovingSphere};
use crate::utils;
use crate::sampling::{render_image};
use crate::material;
use crate::types::*;
use crate::camera;
use crate::texture;
use crate::bvh;

extern crate image;

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

pub fn run_and_print_ppm(params: &RaytracerParams, camera: &camera::Camera, world: &Arc<dyn Hittable>) {
    log_print!("P3\n{0} {1}\n255\n", params.image_width, params.image_height);

    let results = render_image(true, true, &params, &camera, world).unwrap().into_raw();
    let mut count = 0;
    for &color in &results {
        count = count + 1;
        if (count % 4) == 0 {
            log_print!("\n");
        } else {
            log_print!("{0} ", color);
        }
    }

    io::stdout().flush().unwrap();
}

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

pub fn scene_select(scene_num : u32, image_width: u32, image_height: u32, samples_per_pixel: u32, max_depth: u32, image: image::RgbaImage) -> (RaytracerParams, camera::Camera, HittableList) {
    match scene_num {
        0 => { first_weekend_example(image_width, image_height, samples_per_pixel, max_depth) }
        1 => { second_weekend_example_4dot4(image_width, image_height, samples_per_pixel, max_depth) }
        2 => { second_weekend_example_5dot1(image_width, image_height, samples_per_pixel, max_depth) }
        3 => { second_weekend_example_6dot2(image_width, image_height, samples_per_pixel, max_depth, image) }
        4 => { second_weekend_example_7dot4(image_width, image_height, samples_per_pixel, max_depth) }
        5 => { second_weekend_example_7dot6(image_width, image_height, samples_per_pixel, max_depth) }
        6 => { second_weekend_example_8dot0(image_width, image_height, samples_per_pixel, max_depth) }
        7 => { second_weekend_example_8dot2(image_width, image_height, samples_per_pixel, max_depth) }
        8 => { second_weekend_example_9dot1(image_width, image_height, samples_per_pixel, max_depth) }
        9 => { second_weekend_final_scene(image_width, image_height, samples_per_pixel, max_depth, image) }
        _ => { first_weekend_example(image_width, image_height, samples_per_pixel, max_depth) }
    }
}

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


C738;C738;110B 1172 11BF;C738;110B 1172 11BF; # (윸; 윸; 윸; 윸; 윸; ) HANGUL SYLLABLE YUK
C739;C739;110B 1172 11C0;C739;110B 1172 11C0; # (윹; 윹; 윹; 윹; 윹; ) HANGUL SYLLABLE YUT
C73A;C73A;110B 1172 11C1;C73A;110B 1172 11C1; # (윺; 윺; 윺; 윺; 윺; ) HANGUL SYLLABLE YUP
C73B;C73B;110B 1172 11C2;C73B;110B 1172 11C2; # (윻; 윻; 윻; 윻; 윻; ) HANGUL SYLLABLE YUH
C73C;C73C;110B 1173;C73C;110B 1173; # (으; 으; 으; 으; 으; ) HANGUL SYLLABLE EU
C73D;C73D;110B 1173 11A8;C73D;110B 1173 11A8; # (윽; 윽; 윽; 윽; 윽; ) HANGUL SYLLABLE EUG
C73E;C73E;110B 1173 11A9;C73E;110B 1173 11A9; # (윾; 윾; 윾; 윾; 윾; ) HANGUL SYLLABLE EUGG
C73F;C73F;110B 1173 11AA;C73F;110B 1173 11AA; # (윿; 윿; 윿; 윿; 윿; ) HANGUL SYLLABLE EUGS
C740;C740;110B 1173 11AB;C740;110B 1173 11AB; # (은; 은; 은; 은; 은; ) HANGUL SYLLABLE EUN
C741;C741;110B 1173 11AC;C741;110B 1173 11AC; # (읁; 읁; 읁; 읁; 읁; ) HANGUL SYLLABLE EUNJ
C742;C742;110B 1173 11AD;C742;110B 1173 11AD; # (읂; 읂; 읂; 읂; 읂; ) HANGUL SYLLABLE EUNH
C743;C743;110B 1173 11AE;C743;110B 1173 11AE; # (읃; 읃; 읃; 읃; 읃; ) HANGUL SYLLABLE EUD
C744;C744;110B 1173 11AF;C744;110B 1173 11AF; # (을; 을; 을; 을; 을; ) HANGUL SYLLABLE EUL
C745;C745;110B 1173 11B0;C745;110B 1173 11B0; # (읅; 읅; 읅; 읅; 읅; ) HANGUL SYLLABLE EULG
C746;C746;110B 1173 11B1;C746;110B 1173 11B1; # (읆; 읆; 읆; 읆; 읆; ) HANGUL SYLLABLE EULM
C747;C747;110B 1173 11B2;C747;110B 1173 11B2; # (읇; 읇; 읇; 읇; 읇; ) HANGUL SYLLABLE EULB
C748;C748;110B 1173 11B3;C748;110B 1173 11B3; # (읈; 읈; 읈; 읈; 읈; ) HANGUL SYLLABLE EULS
C749;C749;110B 1173 11B4;C749;110B 1173 11B4; # (읉; 읉; 읉; 읉; 읉; ) HANGUL SYLLABLE EULT
C74A;C74A;110B 1173 11B5;C74A;110B 1173 11B5;


ON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}

/*
Contabo API

# Introduction  Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples.  Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. [CLI Download and  Installation instructions.](https://github.com/contabo/cntb)  ## Product documentation  If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the [Contabo Product Documentation](https://docs.contabo.com/).  ## Getting Started  In order to use the Contabo API you will need the following credentials which are available from the [Customer Control Panel](https://my.contabo.com/api/details): 1. ClientId 2. ClientSecret 3. API User (your email address to login to the [Customer Control Panel](https://my.contabo.com/api/details)) 4. API Password (this is a new password which you'll set or change in the [Customer Control Panel](https://my.contabo.com/api/details))  You can either use the API directly or by using the `cntb` CLI (Command Line Interface) tool.  ### Using the API directly  #### Via `curl` for Linux/Unix like systems  This requires `curl` and `jq` in your shell (e.g. `bash`, `zsh`). Please replace the first four placeholders with actual values.  ```sh CLIENT_ID=<ClientId from Customer Control Panel> CLIENT_SECRET=<ClientSecret from Customer Control Panel> API_USER=<API User from Customer Control Panel> API_PASSWORD='<API Password from Customer Control Panel>' ACCESS_TOKEN=$(curl -d \"client_id=$CLIENT_ID\" -d \"client_secret=$CLIENT_SECRET\" --data-urlencode \"username=$API_USER\" --data-urlencode \"password=$API_PASSWORD\" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token') # get list of your instances curl -X GET -H \"Authorization: Bearer $ACCESS_TOKEN\" -H \"x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406\" \"https://api.contabo.com/v1/compute/instances\" | jq ```  #### Via `PowerShell` for Windows  Please open `PowerShell` and execute the following code after replacing the first four placeholders with actual values.  ```powershell $client_id='<ClientId from Customer Control Panel>' $client_secret='<ClientSecret from Customer Control Panel>' $api_user='<API User from Customer Control Panel>' $api_password='<API Password from Customer Control Panel>' $body = @{grant_type='password' client_id=$client_id client_secret=$client_secret username=$api_user password=$api_password} $response = Invoke-WebRequest -Uri 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' -Method 'POST' -Body $body $access_token = (ConvertFrom-Json $([String]::new($response.Content))).access_token # get list of your instances $headers = @{} $headers.Add(\"Authorization\",\"Bearer $access_token\") $headers.Add(\"x-request-id\",\"51A87ECD-754E-4104-9C54-D01AD0F83406\") Invoke-WebRequest -Uri 'https://api.contabo.com/v1/compute/instances' -Method 'GET' -Headers $headers ```  ### Using the Contabo API via the `cntb` CLI tool  1. Download `cntb` for your operating system (MacOS, Windows and Linux supported) [here](https://github


4
	movaps	%xmm4, -0x40(%rdi)

	movaps	-0x53(%rsi), %xmm6
	palignr	$3, %xmm6, %xmm5
	movaps	%xmm5, -0x50(%rdi)

	movaps	-0x63(%rsi), %xmm7
	palignr	$3, %xmm7, %xmm6
	movaps	%xmm6, -0x60(%rdi)

	movaps	-0x73(%rsi), %xmm8
	palignr	$3, %xmm8, %xmm7
	movaps	%xmm7, -0x70(%rdi)

	movaps	-0x83(%rsi), %xmm9
	palignr	$3, %xmm9, %xmm8
	movaps	%xmm8, -0x80(%rdi)

	sub	$0x80, %rdx
	lea	-0x80(%rdi), %rdi
	lea	-0x80(%rsi), %rsi
	jae	L(shl_3_bwd)
	movdqu	%xmm0, (%r8)
	add	$0x80, %rdx
	sub	%rdx, %rdi
	sub	%rdx, %rsi
	BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)

	.p2align 4
L(shl_4):
	sub	$0x80, %rdx
	movaps	-0x04(%rsi), %xmm1
	movaps	0x0c(%rsi), %xmm2
	movaps	0x1c(%rsi), %xmm3
	movaps	0x2c(%rsi), %xmm4
	movaps	0x3c(%rsi), %xmm5
	movaps	0x4c(%rsi), %xmm6
	movaps	0x5c(%rsi), %xmm7
	movaps	0x6c(%rsi), %xmm8
	movaps	0x7c(%rsi), %xmm9
	lea	0x80(%rsi), %rsi
	palignr	$4, %xmm8, %xmm9
	movaps	%xmm9, 0x70(%rdi)
	palignr	$4, %xmm7, %xmm8
	movaps	%xmm8, 0x60(%rdi)
	palignr	$4, %xmm6, %xmm7
	movaps	%xmm7, 0x50(%rdi)
	palignr	$4, %xmm5, %xmm6
	movaps	%xmm6, 0x40(%rdi)
	palignr	$4, %xmm4, %xmm5
	movaps	%xmm5, 0x30(%rdi)
	palignr	$4, %xmm3, %xmm4
	movaps	%xmm4, 0x20(%rdi)
	palignr	$4, %xmm2, %xmm3
	movaps	%xmm3, 0x10(%rdi)
	palignr	$4, %xmm1, %xmm2
	movaps	%xmm2, (%rdi)
	lea	0x80(%rdi), %rdi
	jae	L(shl_4)
	movdqu	%xmm0, (%r8)
	add	$0x80, %rdx
	add	%rdx, %rdi
	add	%rdx, %rsi
	BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)

	.p2align 4
L(shl_4_bwd):
	movaps	-0x04(%rsi), %xmm1

	movaps	-0x14(%rsi), %xmm2
	palignr	$4, %xmm2, %xmm1
	movaps	%xmm1, -0x10(%rdi)

	movaps	-0x24(%rsi), %xmm3
	pa


加上生成的修正的信息
            addGeneratedModifiersForDefinition(element, definitionInfo)

            //加上修正分类和作用域信息（如果支持）
            addModifierScopeForDefinition(element, definitionInfo)

            //加上作用域上下文信息（如果支持）
            addScopeContextForDefinition(element, definitionInfo)

            //加上参数信息（如果支持且存在）
            addParametersForDefinition(element, definitionInfo)

            //加上事件类型信息（对于on_action）
            addEventTypeForOnAction(element, definitionInfo)
        }
    }

    private fun DocumentationBuilder.addDefinitionInfo(definition: ParadoxScriptDefinitionElement, definitionInfo: ParadoxDefinitionInfo, usePrefix: String? = null) {
        val gameType = definitionInfo.gameType
        val categories = ReferenceLinkType.CwtConfig.Categories
        val prefix = usePrefix ?: PlsStringConstants.definitionPrefix
        append(prefix).append(" ")
        val name = definitionInfo.name
        if (usePrefix == null) {
            append("<b>").append(name.escapeXml().or.anonymous()).append("</b>")
        } else {
            val link = ReferenceLinkType.Definition.createLink(name, definitionInfo.type, gameType)
            appendPsiLinkOrUnresolved(link.escapeXml(), name.escapeXml().or.anonymous(), context = definition)
        }
        append(": ")
        val typeConfig = definitionInfo.typeConfig
        val typeLink = ReferenceLinkType.CwtConfig.createLink(categories.types, typeConfig.name, gameType)
        appendPsiLinkOrUnresolved(typeLink.escapeXml(), typeConfig.name.escapeXml())
        val subtypeConfigs = definitionInfo.subtypeConfigs
        if (subtypeConfigs.isNotEmpty()) {
            for (subtypeConfig in subtypeConfigs) {
                val subtypeLink = ReferenceLinkType.CwtConfig.createLink(categories.types, "${typeConfig.name}/${subtypeConfig.name}", gameType)
                append(", ").appendPsiLinkOrUnresolved(subtypeLink.escapeXml(), subtypeConfig.name.escapeXml())
            }
        }
    }

    private fun DocumentationBuilder.addSuperDefinitionInfo(definition: ParadoxScriptDefinitionElement, definitionInfo: ParadoxDefinitionInfo) {
        val gameType = definitionInfo.gameType
        val categories = ReferenceLinkType.CwtConfig.Categories
        appendIndent().append(PlsBundle.message("inherits")).append(" ")
        val name = definitionInfo.name
        val link = ReferenceLinkType.Definition.createLink(name, definitionInfo.type, gameType)
        appendPsiLinkOrUnresolved(link.escapeXml(), name.escapeXml().or.anonymous(), context = definition)
        append(": ")
        val typeConfig = definitionInfo.typeConfig
        val typeLink = ReferenceLinkType.CwtConfig.createLink(categories.types, typeConfig.name, gameType)
        appendPsiLinkOrUnresolved(typeLink.escapeXml(), typeConfig.name.escapeXml())
        val subtypeConfigs = definitionInfo.subtypeConfigs
        if (subtypeConfigs.isNotEmpty()) {
            for (subtypeConfig in subtypeConfigs) {
                val subtypeLink = ReferenceLinkType.CwtConfig.createLink(categories.types, "${typeConfig.name}/${subtypeConfig.name}", gameType)
                append(", ").appendPsiLinkOrUnresolved(subtypeLink.escapeXml(), subtypeConfig.name.escapeXml())
            }
        }
    }

    private fun DocumentationBuilder.addRelatedLocalisationsForDefinition(element: ParadoxScriptProperty, definitionInfo: ParadoxDefinitionInfo) {
        val localisationInfos = definitionInfo.localisations
        if (localisationInfos.isEmpty()) return
        val usedLocale = ParadoxLocaleManager.getResolvedLocaleConfigInDocumentation(element)
        val map = mutableMapOf<String, String>()
        val sections = getSections(SECTIONS_LOC)
        val sectionKeys = mutableSetOf<String>()
        for ((key, locationExpression, required) in localisationInfos) {
            if (sectionKeys.contains(key)) continue
            val resolveResult = CwtLocationExpressionManager.resolve(locationExpression, element, definitionInfo) { preferLocale(usedLocale) } ?: continue //发生意外，直接跳过
            if (resolveResult.message != null) {


from pydxdiag.schema.sz.szPreferredMFT import *
from typing import *
from datetime import datetime
from bs4 import BeautifulSoup
from bs4.element import Tag

def GetszPreferedMFTs(
    dxXML:BeautifulSoup
) -> List[szPreferredMFT]:
    """
    Function to get all preferred MFTs from a dxdiag XML file.\n
    :param dxXML: The root of the dxdiag XML tree
    :type dxXML: BeautifulSoup\n
    :return: A list of all preferred MFTs in the dxdiag XML file
    :rtype: List[szPreferredMFT]
    """
    szPreferedMFTs:List[szPreferredMFT] = []
    szPreferedMFTsString:List[str] = dxXML.find("DxDiag").find("MediaFoundation").find("szPreferredMFTs").text.split("\n")
    for mft in szPreferedMFTsString:
        if mft == "":
            continue
        szPreferedMFTs.append(
            szPreferredMFT(
                EngineID = mft.split(",")[0].replace("{", "").replace("}", "").strip(),
                Name = mft.split(",")[1].strip(),
                EngineType = mft.split(",")[2].strip()
            )
        )
    return szPreferedMFTs

def GetszDiasbledMFTs(
    dxXML:BeautifulSoup
) -> Optional[str]:
    """
    Function to get all disabled MFTs from a dxdiag XML file.\n
    :param dxXML: The root of the dxdiag XML tree
    :type dxXML: BeautifulSoup\n
    :return: result in string format
    :rtype: Optional[str]
    """
    return dxXML.find("DxDiag").find("MediaFoundation").find("szDisabledMFTs").text

def GetszDisabledMediaSources(
    dxXML:BeautifulSoup
) -> Optional[str]:
    """
    Function to get all disabled media sources from a dxdiag XML file.\n
    :param dxXML: The root of the dxdiag XML tree
    :type dxXML: BeautifulSoup\n
    :return: result in string format
    :rtype: Optional[str]
    """
    return dxXML.find("DxDiag").find("MediaFoundation").find("szDisabledMediaSources").text


--[[
  Generates random notes and chord progressions using a pascal triangle as pattern.

  Based on an idea and initial implementation from: https://forum.renoise.com/u/jonas
--]]

-- Define the Pascal's Triangle pattern
local pascals_triangle = {
  { 1 },
  { 1, 1 },
  { 1, 2, 1 },
  { 1, 3, 3,  1 },
  { 1, 4, 6,  4,  1 },
  { 1, 5, 10, 10, 5,  1 },
  { 1, 6, 15, 20, 15, 6,  1 },
  { 1, 7, 21, 35, 35, 21, 7, 1 }
}

-- Define the scale we pick notes from (16 notes from a C pentatonic scale)
local relaxing_scale = pulse.new(16, scale("c5", "pentatonic major"):notes_iter())

-- Function to generate chord progressions from Pascal's Triangle values
local function generate_chord_progressions(triangle)
  local chord_progressions = {}
  for _, row in ipairs(triangle) do
    local progression = {}
    for _, value in ipairs(row) do
      local degree = math.imod(value, #relaxing_scale)
      table.insert(progression, relaxing_scale[degree] - 12) -- Transpose an octave down
    end
    table.insert(chord_progressions, progression)
  end
  return chord_progressions
end

-- Random seed for reproducibility
math.randomseed(2323)

-- Generate chord progressions
local chord_progressions = generate_cho


 are not going
	// to handle it as a statement, so save the history.
	c.addHistory(c.lastInputLine)

	if c.sqlCtx.DemoCluster != nil {
		c.lastInputLine = c.sqlCtx.DemoCluster.ExpandShortDemoURLs(c.lastInputLine)
	}

	// As a convenience to the user, we strip the final semicolon, if
	// any, in all cases.
	line := strings.TrimRight(c.lastInputLine, "; ")

	cmd, err := scanLocalCmdArgs(line)
	if err != nil {
		return c.cliError(cliStartLine, err)
	}
	if cmd[0] == `\z` {
		// psql compatibility.
		cmd[0] = `\dp`
	}
	if cmd[0] == `\sf` || cmd[0] == `\sf+` ||
		cmd[0] == `\sv` || cmd[0] == `\sv+` ||
		cmd[0] == `\l` || cmd[0] == `\l+` ||
		(strings.HasPrefix(cmd[0], `\d`) && cmd[0] != `\demo`) {
		return c.handleDescribe(cmd, loopState, errState)
	}

	switch cmd[0] {
	case `\q`, `\quit`, `\exit`:
		// When explicitly exiting, clear exitErr.
		c.exitErr = nil
		return cliStop

	case `\`, `\?`, `\help`:
		c.printCliHelp()

	case `\echo`:
		fmt.Fprintln(c.iCtx.stdout, strings.Join(cmd[1:], " "))

	case `\qecho`:
		fmt.Fprintln(c.iCtx.queryOutput, strings.Join(cmd[1:], " "))
		c.maybeFlushOutput()

	case `\set`:
		return c.handleSet(line, cmd[1:], loopState, errState)

	case `\unset`:
		return c.handleUnset(cmd[1:], loopState, errState)

	case `\!`:
		return c.runSyscmd(c.lastInputLine, loopState, errState)

	case `\i`:
		return c.runInclude(cmd[1:], loopState, errState, false /* relative */)

	case `\ir`:
		return c.runInclude(cmd[1:], loopState, errState, true /* relative */)

	case `\o`:
		return c.runOpen(cmd[1:], loopState, errState)

	case `\p`:
		if c.ins.multilineEdit() {
			fmt.Fprintln(c.iCtx.stderr, `warning: \p is ineffective with this editor`)
			break
		}
		// This is analogous to \show but does not need a special case.
		// Implemented for compatibility with psql.
		fmt.Fprintln(c.iCtx.stdout, strings.Join(c.partialLines, "\n"))

	case `\r`:
		if c.ins.multilineEdit() {
			fmt.Fprintln(c.iCtx.stderr, `warning: \r is ineffective with this editor`)
			break
		}
		// Reset the input buffer so far. This is useful when e.g. a user
		// got confused with string delimiters and multi-line input.
		return cliStartLine

	case `\s`:
		c.printCommandHistory()

	case `\show`:
		if c.ins.multilineEdit() {
			fmt.Fprintln(c.iCtx.stderr, `warning: \show is ineffective with this editor`)
			break
		}
		fmt.Fprintln(c.iCtx.stderr, `warning: \show is deprecated. Use \p.`)
		if len(c.partialLines) == 0 {
			fmt.Fprintf(c.iCtx.stderr, "No input so far. Did you mean SHOW?\n")
		} else {
			for _, s := range c.partialLines {
				fmt.Fprintln(c.iCtx.stdout, s)
			}
		}

	case `\password`:
		return c.handlePassword(cmd[1:], cliRunStatement, errState)

	case `\|`:
		return c.pipeSyscmd(c.lastInputLi


7.4C234 64 215.7 69.6 200 80l-35.5 23.7L38.8 5.1zM413.6 421.9L128 196.8V352h28.2l91.4 83.4c19.6 17.9 49.9 16.5 67.8-3.1c5.5-6.1 9.2-13.2 11.1-20.6l17 15.6c19.5 17.9 49.9 16.6 67.8-2.9c.8-.8 1.5-1.7 2.2-2.6zM96 171.6L40.6 128H16c-8.8 0-16 7.2-16 16V352c0 17.7 14.3 32 32 32H64c17.7 0 32-14.3 32-32V171.6zM48 320a16 16 0 1 1 0 32 16 16 0 1 1 0-32zM544 128V352c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32V144c0-8.8-7.2-16-16-16H544zm32 208a16 16 0 1 1 32 0 16 16 0 1 1 -32 0z';

exports.definition = {
  prefix: prefix,
  iconName: iconName,
  icon: [
    width,
    height,
    aliases,
    unicode,
    svgPathData
  ]};

exports.faHandshakeSlash = exports.definition;
exports.prefix = prefix;
exports.iconName = iconName;
exports.width = width;
exports.height = height;
exports.ligatures = aliases;
exports.unicode = unicode;
exports.svgPathData = svgPathData;
exports.aliases = aliases;'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'fas';
var iconName = 'passport';
var width = 448;
var height = 512;
var aliases = [];
var unicode = 'f5ab';
var svgPathData = 'M0 64C0 28.7 28.7 0 64 0H384c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM183 278.8c-27.9-13.2-48.4-39.4-53.7-70.8h39.1c1.6 30.4 7.7 53.8 14.6 70.8zm41.3 9.2l-.3 0-.3 0c-2.4-3.5-5.7-8.9-9.1-16.5c-6-13.6-12.4-34.3-14.2-63.5h47.1c-1.8 29.2-8.1 49.9-14.2 63.5c-3.4 7.6-6.7 13-9.1 16.5zm40.7-9.2c6.8-17.1 12.9-40.4 14.6-70.8h39.1c-5.3 31.4-25.8 57.6-53.7 70.8zM279.6 176c-1.6-30.4-7.7-53.8-14.6-70.8c27.9 13.2 48.4 39.4 53.7 70.8H279.6zM223.7 96l.3 0 .3 0c2.4 3.5 5.7 8.9 9.1 16.5c6 13.6 12.4 34.3 14.2 63.5H200.5c1.8-29.2 8.1-49.9 14.2-63.5c3.4-7.6 6.7-13 9.1-16.5zM183 105.2c-6.8 17.1-12.9 40.4-14.6 70.8H129.3c5.3-31.4 25.8-57.6 53.7-70.8zM352 192A128 128 0 1 0 96 192a128 128 0 1 0 256 0zM112 384c-8.8 0-


,1,1) but not (1,1,1).
			byte aPoint = 0x06;
			double aScore = xins;
			byte bPoint = 0x05;
			double bScore = yins;
			if (aScore <= bScore && zins < bScore) {
				bScore = zins;
				bPoint = 0x03;
			} else if (aScore > bScore && zins < aScore) {
				aScore = zins;
				aPoint = 0x03;
			}

			//Now we determine the two lattice points not part of the tetrahedron that may contribute.
			//This depends on the closest two tetrahedral vertices, including (1,1,1)
			double wins = 3 - inSum;
			if (wins < aScore || wins < bScore) { //(1,1,1) is one of the closest two tetrahedral vertices.
				byte c = (bScore < aScore ? bPoint : aPoint); //Our other closest vertex is the closest out of a and b.

				if ((c & 0x01) != 0) {
					xsv_ext0 = xsb + 2;
					xsv_ext1 = xsb + 1;
					dx_ext0 = dx0 - 2 - 3 * SQUISH_CONSTANT_3D;
					dx_ext1 = dx0 - 1 - 3 * SQUISH_CONSTANT_3D;
				} else {
					xsv_ext0 = xsv_ext1 = xsb;
					dx_ext0 = dx_ext1 = dx0 - 3 * SQUISH_CONSTANT_3D;
				}

				if ((c & 0x02) != 0) {
					ysv_ext0 = ysv_ext1 = ysb + 1;
					dy_ext0 = dy_ext1 = dy0 - 1 - 3 * SQUISH_CONSTANT_3D;
					if ((c & 0x01) != 0) {
						ysv_ext1 += 1;
						dy_ext1 -= 1;
					} else {
						ysv_ext0 += 1;
						dy_ext0 -= 1;
					}
				} else {
					ysv_ext0 = ysv_ext1 = ysb;
					dy_ext0 = dy_ext1 = dy0 - 3 * SQUISH_CONSTANT_3D;
				}

				if ((c & 0x04) != 0) {
					zsv_ext0 = zsb + 1;
					zsv_ext1 = zsb + 2;
					dz_ext0 = dz0 - 1 - 3 * SQUISH_CONSTANT_3D;
					dz_ext1 = dz0 - 2 - 3 * SQUISH_CONSTANT_3D;
				} else {
					zsv_ext0 = zsv_ext1 = zsb;
					dz_ext0 = dz_ext1 = dz0 - 3 * SQUISH_CONSTANT_3D;
				}
			} else { //(1,1,1) is not one of the closest two tetrahedral vertices.
				byte c = (byte)(aPoint & bPoint); //Our two extra vertices are determined by the closest two.

				if ((c & 0x01) != 0) {
					xsv_ext0 = xsb + 1;
					xsv_ext1 = xsb + 2;
					dx_ext0 = dx0 - 1 - SQUISH_CONSTANT_3D;
					dx_ext1 = dx0 - 2 - 2 * SQUISH_CONSTANT_3D;
				} else {
					xsv_ext0 = xsv_ext1 = xsb;
					dx_ext0 = dx0 - SQUISH_CONSTANT_3D;
					dx_ext1 = dx0 - 2 * SQUISH_CONSTANT_3D;
				}

				if ((c & 0x02) != 0) {
					ysv_ext0 = ysb + 1;
					ysv_ext1 = ysb + 2;
					dy_ext0 = dy0 - 1 - SQUISH_CONSTANT_3D;


" xlink:href="#OBSERVED/MORX-27/1.A_E_B" /></svg>
    <svg version="1.1" viewBox="0 -200 1326 1200"><symbol id="OBSERVED/MORX-27/2.A_E_C" overflow="visible"><path d="M875,357 Q875,221 937,145 Q1000,69 1121,69 Q1198,69 1292,97 L1292,19 Q1252,4 1209,-3 Q1166,-10 1108,-10 Q1001,-10 927,35 L927,0 L449,0 L449,221 L199,221 L92,0 L-1,0 L338,714 L927,714 L927,672 Q1009,724 1123,724 Q1178,724 1228,713 Q1279,702 1320,682 L1284,606 Q1198,645 1122,645 Q1007,645 941,568 Q875,491 875,357 Z M539,79 L871,79 Q780,174 780,358 Q780,444 806,515 Q832,586 881,635 L539,635 L539,412 L732,412 L732,334 L539,334 Z M449,634 L391,634 L234,301 L449,301 Z" /></symbol><use x="0" y="0" xlink:href="#OBSERVED/MORX-27/2.A_E_C" /></svg>
    <svg version="1.1" viewBox="0 -200 1394 1200"><symbol id="OBSERVED/MORX-27/3.A_E_D" overflow="visible"><path d="M338,714 L1037,714 Q1201,714 1295,623 Q1389,533 1389,364 Q1389,185 1291,92 Q1194,0 1016,0 L449,0 L449,221 L199,221 L92,0 L-1,0 Z M1004,77 Q1149,77 1221,148 Q1294,220 1294,361 Q1294,501 1225,569 Q1156,637 1024,637 L907,637 L907,77 Z M817,79 L817,635 L539,635 L539,412 L762,412 L762,334 L539,334 L539,79 Z M449,301 L449,634 L391,634 L234,301 Z" /></symbol><use x="0" y="0" xlink:href="#OBSERVED/MORX-27/3.A_E_D" /></svg>

    Conformance
    ✓
    ✓
    ✓

MORX-28: Ligature Substitution with Unmarked Glyphs

  The font for this
  test case has
  an AAT Extended Glyph Metamorphosis Table with a
  single Ligature Subtable to substitute AED by a ligature.
  The glyphs x and y do not change the current
  state of the finite-state machine, and their transitions also
  do not carry the SetMark flag. If your implementation
  is correct, it shou


unicode_text_1 = "शांत निळ्या आकाशाखाली, एकाकी वृक्षाच्या सान्निध्यात, तिला एका गहन आणि अवर्णनीय आंतरिक शांततेचा अनुभव आला, जो शब्दांच्या पलीकडील होता."
shreelipi_text_1 = "em§V {Zù`m AmH$memImbr, EH$mH$r d¥jmÀ`m gm{ÞÜ`mV, {Vbm EH$m JhZ Am{U AdU©Zr` Am§V{aH$ em§VVoMm AZw^d Ambm, Omo eãXm§À`m nbrH$S>rb hmoVm."

unicode_text_2 = "पुराणकालीन कथांमधील गूढ रहस्यांप्रमाणे, ह्या घटनेच्या मुळाशी दडलेले सत्य अजूनही एका जाड धुक्याच्या पडद्याआड लपलेले आहे."
shreelipi_text_2 = "nwamUH$mbrZ H$Wm§_Yrb JyT> ahñ`m§à_mUo, øm KQ>ZoÀ`m _wimer XS>bobo gË` AOyZhr EH$m OmS> YwŠ`mÀ`m nS>ÚmAmS> bnbobo Amho."

unicode_text_3 = "जटिल परिस्थितीतून मार्ग काढताना, तिने आपल्या अंतर्मनातील दृढ निश्चयाचा आणि अनुभवांच्या समृद्ध ज्ञानाचा कुशलतापूर्वक उपयोग केला."
shreelipi_text_3 = "O{Q>b n{apñWVrVyZ _mJ© H$mT>VmZm, {VZo Amnë`m A§V_©ZmVrb ÑT> {Zü`mMm Am{U AZw^dm§À`m g_¥Õ kmZmMm Hw$ebVmnyd©H$ Cn`moJ Ho$bm."

unicode_text_4 = "दूर डोंगरावरच्या घनदाट अरण्यात, वन्य जीवांच्या अनाकलनीय आवाजांनी आणि प्राचीन वृक्षांच्या सावल्यांनी एका रहस्यमय वातावरणाची निर्मिती केली होती."
shreelipi_text_4 = "Xya S>mo§JamdaÀ`m KZXmQ> AaÊ`mV, dÝ` Ordm§À`m AZmH$bZr` AmdmOm§Zr Am{U àmMrZ d¥jm§À`m gmdë`m§Zr EH$m ahñ`_` dmVmdaUmMr {Z{_©Vr Ho$br hmoVr."

unicode_text_5 = "सामाजिक बदलांच्या वादळात, काही मूल्ये आणि परंपरा काळाच्या कसोटीवर टिकून राहतात, तर काही नविन विचारांच्या प्रवाहामध्ये विलीन होऊन जातात."
shreelipi_text_5 = "gm_m{OH$ ~Xbm§À`m dmXimV, H$mhr _yë`o Am{U na§nam H$mimÀ`m H$gmoQ>rda {Q>Hy$Z amhVmV, Va H$mhr Z{dZ {dMmam§À`m àdmhm_Ü`o {dbrZ hmoD$Z OmVmV."

unicode_text_6 = "अनेक वर्षांच्या कठोर परिश्रमानंतर, त्याला जीवनाच्या गुंतागुंतीचा अर्थ हळू हळू उलगडत गेला, आणि त्याने शांती आणि समाधानाचा मार्ग शोधला."
shreelipi_text_6 = "AZoH$ dfmªÀ`m H$R>moa n{al_mZ§Va, Ë`mbm OrdZmÀ`m Jw§VmJw§VrMm AW© hiy hiy CbJS>V Jobm, Am{U Ë`mZo em§Vr Am{U g_mYmZmMm _mJ© emoYbm."

unicode_text_7 = "राजकीय डावपेचांच्या चक्रव्यूहात, सामान्य माणसाचे हित आणि कल्याण अनेकदा दुर्लक्षित होऊन सत्तेच्या खेळात हरवून जाते."
shreelipi_text_7 = "amOH$r` S>mdnoMm§À`m MH«$ì`yhmV, gm_mÝ` _mUgmMo {hV Am{U H$ë`mU AZoH$Xm Xwb©{jV hmoD$Z gÎmoÀ`m IoimV hadyZ OmVo."

unicode_text_8 = "कला आणि साहित्याच्या माध्यमातून, मानवी संस्कृती आपल्या भूतकाळातील अनुभवांना जपते आणि भविष्याच्या दिशेने एक अर्थपूर्ण आणि समृद्ध वाटचाल करते."
shreelipi_text_8 = "H$bm Am{U gm{hË`mÀ`m _mÜ`_mVyZ, _mZdr g§ñH¥$Vr Amnë`m ^yVH$mimVrb AZw^dm§Zm OnVo Am{U ^{dî`mÀ`m {XeoZo EH$ AW©nyU© Am{U g_¥Õ dmQ>Mmb H$aVo."

unicode_text_9 = "आजच्या गतिमान जगात, तंत्रज्ञानाच्या अद्भुत प्रगतीमुळे जग जवळ आले असले तरी, व्यक्तींमधील खरा संवाद आणि समजूतदारपणा कमी होत चालला आहे."
shreelipi_text_9 = "AmOÀ`m J{V_mZ OJmV, V§ÌkmZmÀ`m AØwV àJVr_wio OJ Odi Ambo Agbo Var, ì`º$t_Yrb Iam g§dmX Am{U g_OyVXmanUm H$_r hmoV Mmbbm Amho."

unicode_text_10 = "दैनंदिन जीवनातील धकाधकीत, अनेकदा आपल्या आत दडलेल्या कलागुणांना वाव मिळणे कठीण होते, आणि त्यामुळे एका विशिष्ट प्रकारची आंतरिक खिन्नता मनात घर करते."
shreelipi_text_10 = "X¡Z§{XZ OrdZmVrb YH$mYH$rV, AZoH$Xm Amnë`m AmV XS>boë`m H$bmJwUm§Zm dmd {_iUo H$R>rU hmoVo, Am{U Ë`m_wio EH$m {d{eï àH$maMr Am§V{aH$ {IÞVm _ZmV Ka H$aVo."

testcases = {
    unicode_text_1: shreelipi_text_1,
    unicode_text_2: shreelipi_text_2,
    unicode_text_3: shreelipi_text_3,
    unicode_text_4: shreelipi_text_4,
    unicode_text_5: shreelipi_text_5,
    unicode_text_6: shreelipi_text_6,
    unicode_text_7: shreelipi_text_7,
    unicode_text_8: shreelipi_text_8,
    unicode_text_9: shreelipi_text_9,
    unicode_text_10: shreelipi_text_10,
}


 {
        var attempt = 0
        var allCount: Int? = null

        for (minutes in generateSequence(2) { it * it }) {
            attempt++

            val dt = DateTime.now().minusMinutes(minutes)

            val all = Kweets.slice(Kweets.id)
                .select { Kweets.date.greater(dt) }
                .orderBy(Kweets.date, SortOrder.DESC)
                .limit(count)
                .map { it[Kweets.id] }

            if (all.size >= count) {
                return@transaction all
            }
            if (attempt > 10 && allCount == null) {
                allCount = Kweets.slice(Kweets.id.count()).selectAll().count().toInt()
                if (allCount <= count) {
                    return@transaction Kweets.slice(Kweets.id).selectAll().map { it[Kweets.id] }
                }
            }
        }

        emptyList()
    }

    override fun close() {
    }
}
package com.ihorkucherenko.inmemorystorage

import android.content.Context
import android.graphics.Color
import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4

import com.ihorkucherenko.storage.Store

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*
import java.util.*

/**
 * Instrumentation test, which will execute on an Android device.

 * @see [Testing documentation](http://d.android.com/tools/testing)
 */
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {

    val store = Store()

    @Test
    fun storeObject() {
        val calendar = Calendar.getInstance()
        val key = "object"
        store.setObject(key, calendar)
        assertSame(calendar, store.getObject(key))
    }

    @Test
    fun storeFloatEquals() {
        val float = 3f
        val key = "float"
        store.setFloat(key, float)
        assertEquals(float, store.getFloat(key))
    }

    @Test
    fun storeIntegerEquals() {
        val int = 3
        val key = "int"
        store.setInteger(key, int)
        assertEquals(int, store.getInteger(key))
    }

    @Test
    fun storeFloatNotTheSame() {
        val float = 3f
        val key = "float"
        store.setFloat(key, float)
        assertNotSame(float, store.getFloat(key))
    }

    @Test
    fun storeIntegerTheSame() {
        val int = 3
        val key = "int"
        store.setInteger(key, int)
        assertSame(int, store.getInteger(key))
    }

    @Test
    fun storeIntegerNotTheSame() {
        val int = 128
        val key = "int"
        store.setInteger(key, int)
        assertNotSame(int, store.getInteger(key))
    }

    @Test
    fun storeStringNotTheSame() {
        val string = "string"
        val key = "string"
        store.setString(key, string)
        assertNotSame(string, store.getString(key))
    }

    @Test
    fun storeStringEquals() {
        val string = "string"
        val key = "string"
        store.setString(key, string)
        assertEquals(string, store.getString(key))
    }

    @Test
    fun storeBooleanTheSame() {
        val boolean = true
        val key = "boolean"
        store.setBoolean(key, boolean)
        assertSame(boolean, store.getBoolean(key))
    }

    @Test
    fun storeShortNotTheSame() {
        val short: Short = 128
        val key = "short"


00 C8 */	b lbl_80486B94
lbl_80486AD0:
/* 80486AD0 004838D0  38 00 00 00 */	li r0, 0
/* 80486AD4 004838D4  90 01 00 18 */	stw r0, 0x18(r1)
/* 80486AD8 004838D8  38 00 00 01 */	li r0, 1
/* 80486ADC 004838DC  38 77 00 00 */	addi r3, r23, 0
/* 80486AE0 004838E0  90 01 00 14 */	stw r0, 0x14(r1)
/* 80486AE4 004838E4  38 9F FF FF */	addi r4, r31, -1
/* 80486AE8 004838E8  38 C1 00 14 */	addi r6, r1, 0x14
/* 80486AEC 004838EC  38 A0 00 80 */	li r5, 0x80
/* 80486AF0 004838F0  38 E0 00 08 */	li r7, 8
/* 80486AF4 004838F4  4B FF 6E B1 */	bl func_8047D9A4
/* 80486AF8 004838F8  7E E3 BB 78 */	mr r3, r23
/* 80486AFC 004838FC  4B FF 58 BD */	bl func_8047C3B8
/* 80486B00 00483900  38 00 FF FF */	li r0, -1
/* 80486B04 00483904  90 1B 00 00 */	stw r0, 0(r27)
/* 80486B08 00483908  80 01 02 64 */	lwz r0, 0x264(r1)
/* 80486B0C 0048390C  2C 00 FF FF */	cmpwi r0, -1
/* 80486B10 00483910  40 82 00 84 */	bne lbl_80486B94
/* 80486B14 00483914  92 C1 02 64 */	stw r22, 0x264(r1)
/* 80486B18 00483918  48 00 00 7C */	b lbl_80486B94
lbl_80486B1C:
/* 80486B1C 0048391C  38 00 00 00 */	li r0, 0
/* 80486B20 00483920  90 18 02 18 */	stw r0, 0x218(r24)
/* 80486B24 00483924  38 00 00 01 */	li r0, 1
/* 80486B28 00483928  B0 1B 00 04 */	sth r0, 4(r27)
/* 80486B2C 0048392C  48 00 00 68 */	b lbl_80486B94
lbl_80486B30:
/* 80486B30 00483930  54 60 06 B5 */	rlwinm. r0, r3, 0, 0x1a, 0x1a
/* 80486B34 00483934  41 82 00 60 */	beq lbl_80486B94
/* 80486B38 00483938  80 18 02 00 */	lwz r0, 0x200(r24)
/* 80486B3C 0048393C  38 77 00 00 */	addi r3, r23, 0
/* 80486B40 00483940  7C 98 02 14 */	add r4, r24, r0
/* 80486B44 00483944  20 A0 02 00 */	subfic r5, r0, 0x200
/* 80486B48 00483948  4B FF 62 9D */	bl func_8047CDE4
/* 80486B4C 0048394C  38 00 00 00 */	li r0, 0
/* 80486B50 00483950  90 01 00 10 */	stw r0, 0x10(r1)
/* 80486B54 00483954  38 00 00 01 */	li r0, 1
/* 8


def lowercase_and_remove_accent(text):
    """
    Lowercase and strips accents from a piece of text based on
    https://github.com/facebookresearch/XLM/blob/master/tools/lowercase_and_remove_accent.py
    """
    text = ' '.join(text)
    text = text.lower()
    text = unicodedata.normalize('NFD', text)
    output = []
    for char in text:
        cat = unicodedata.category(char)
        if cat == 'Mn':
            continue
        output.append(char)
    return ''.join(output).lower().split(' ')


ject_hilo.cg");
      } else {
        skybox_fprog     = pipeline.loadFragmentProgram(gl, shaderRoot + "cg/skybox.cg");
        object_fprog     = pipeline.loadFragmentProgram(gl, shaderRoot + "cg/object.cg");
      }

      shrink_fprog     = pipeline.loadFragmentProgram(gl, shaderRoot + "cg/shrink.cg");

      object_vprog     = pipeline.loadVertexProgram(gl, shaderRoot + "cg/object_vp.cg");
      modelViewProj_param = pipeline.getNamedParameter(object_vprog, "modelViewProj");
      model_param         = pipeline.getNamedParameter(object_vprog, "model");
      eyePos_param        = pipeline.getNamedParameter(object_vprog, "eyePos");
    } catch (IOException e) {
      throw new RuntimeException("Error loading shaders", e);
    }
  }

  private void initARBFP(GL2 gl, int texmode) {
    pipeline = new ARBFPPipeline(texmode);
    pipeline.init();

    try {
      // NOTE that the program parameters are hard-coded; in the
      // future we can use GLSL but for this demo we desire good
      // backward compatibility
      tonemap_fprog    = pipeline.loadFragmentProgram(gl, shaderRoot + "arbfp1/tonemap.arbfp1");
      blurAmount_param = 1;
      windowSize_param = -1; // Not used
      exposure_param   = 2;

      if (hilo) {
        skybox_fprog     = pipeline.loadFragmentProgram(gl, shaderRoot + "arbfp1/skybox_hilo.arbfp1");
        object_fprog     = pipeline.loadFragmentProgram(gl, shaderRoot + "arbfp1/object_hilo.arbfp1");
      } else {
        skybox_fprog     = pipeline.loadFragmentProgram(gl, shaderRoot + "arbfp1/skybox.arbfp1");
        object_fprog     = pipeline.loadFragmentProgram(gl, shaderRoot + "arbfp1/object.arbfp1");
      }

      shrink_fprog     = pipeline.loadFragmentProgram(gl, shaderRoot + "arbfp1/shrink.arbfp1");

      object_vprog     = pipeline.loadVertexProgram(gl, shaderRoot + "arbfp1/object_vp.arbvp1");
      modelViewProj_param = 0;
      model_param         = 4;
      eyePos_param        = 8;
    } catch (IOException e) {
      throw new RuntimeException("Error loading shaders", e);
    }
  }

  private void initBlurCode(GL2 gl, int blurWidth) {
    // generate blur code
    String blurCode = generateBlurCodeFP2(blurWidth, false);
    blurh_fprog = loadProgram(gl, GL2.GL_FRAGMENT_PROGRAM_ARB, blurCode);
    //  printf("%s\n", blurCode);

    blurCode = generateBlurCodeFP2(blurWidth, true);
    blurv_fprog = loadProgram(gl, GL2.GL_FRAGMENT_PROGRAM_ARB, blurCode);
    //  printf("%s\n", blurCode);
  }

  private int loadProgram(GL2 gl, int target, String code) {
    int prog_id;
    int[] tmp = new int[1];
    gl.glGenProgramsARB(1, tmp, 0);
    prog_id = tmp[0];
    gl.glBindProgramARB(target, prog_id);
    // int size = code.length();
    gl.glProgramStringARB(target, GL2.GL_PROGRAM_FORMAT_ASCII_ARB, code.length(), code);
    int[] errPos = new int[1];
    gl.glGetIntegerv(GL2.GL_PROGRAM_ERROR_POSITION_ARB, errPos, 0);
    if (err


        hitPadlle({
              ...s ,
              ball: bounce(moveObj(s.ball)),
              time: s.time+1
            }))))
    : ultStat(
      gameEnd(
        score(
          hitPadlle({
            ...s ,
            ball: bounce(moveObj(s.ball)),
            comp: followBall(s.ball) (s.comp),
            time: s.time+1
          }
    ))));

    //the function that deals with the graphics
    function updateView(s: State) {
      const
        svg = document.getElementById("canvas")!,
        paddle = document.getElementById("rect1")!,
        ball = document.getElementById("ball")!,
        comp = document.getElementById("rect2")!,

        attr = (e:Element,o:Object) =>
          { for(const k in o) e.setAttribute(k,String(o[k])) }

      attr(paddle,{transform:`translate(${s.paddle.pos.x},${s.paddle.pos.y})`});
      attr(ball, {transform:`translate(${s.ball.pos.x},${s.ball.pos.y})`})
      attr(comp,{transform:`translate(${s.comp.pos.x},${s.comp.pos.y})`})

      const v = document.getElementById("scrPyr")!;
      const l = document.getElementById("scrCmp")!;
      v.innerHTML = s.scrPyr.toString();
      l.innerHTML = s.scrCmp.toString();

      const k = document.getElementById("ultStat1")!;
      const j = document.getElementById("ultStat2")!;
      s.paddle.ult_stat?k.innerHTML = "Ready":k.innerHTML = "Ready in " + Math.floor((2000 - (s.time - s.paddle.createTime))/100).toString() + "s"
      twoPyr?s.comp.ult_stat? j.innerHTML ="Ready": j.innerHTML = "Ready in " + Math.floor((2000 - (s.time - s.comp.createTime))/100).toString() + "s": j.innerHTML = "Not Ready"

      if (s.gameOver){
        subcription.unsubscribe()
        const v = document.createElementNS(svg.namespaceURI, "text")!;
        attr(v,{x:CanvasSizeX/3,y:CanvasSizeY/2,class:"gameover"});
        twoPyr?s.scrPyr==maxScore?v.innerHTML = "P1 Wins":v.innerHTML = "P2 Wins":s.scrPyr==maxScore? v.innerHTML = "You Win" : v.innerHTML = "You Lose"
        svg.appendChild(v);
      }
    }

    //main stream
    const subcription = interval(10).pipe(
      map(elapsed=>new Tick(elapsed)),
      merge(startGoUp, startGoDown, stopGoDown, stopGoUp),
      merge(GoDown, GoUp, stoGoDown,startGoUp),
      merge(ult1,ult2),
      scan(reduceState, initialState)
      ).subscribe(updateView);

  }

  // the following simply runs your pong function on window load.  Make sure to leave it in place.
  if (typeof window != 'undefined')
    window.onload = ()=>{
      const onePLayerButton = document.getElementById("OnePlayer");
      onePLayerButton.onclick = function(){
        pong(false);
      }
      const twoPlayerButton = document.getElementById("TwoPlayer");
      twoPlayerButton.onclick= function(){
        pong(true)
      }
      const resetButton = document.getElementById("Reset");
      resetButton.onclick = () =>window.location.reload();
    }

/**
 * 等级成就进度信息


tmp0
	and	#124,reg_tmp0
	sub	reg_tmp0,reg_mlen

	mov.l	L_cksum128_tail_p,reg_tmp3
	sub	reg_tmp0,reg_tmp3
	jmp	@reg_tmp3
	clrt

	.align	2
L_cksum128_tail_p:
	.long	cksum128_tail

	.align	2
cksum128:
	mov	#64,reg_tmp0
	add	reg_tmp0,reg_tmp0	/* reg_tmp0 = 128 */
	sub	reg_tmp0,reg_mlen
	clrt

cksum


-- Add, remove, or edit the preferences of a unit
-- Not to be confused with "pref_adjust" and "prefchange"
--@ module = true

local help = [====[

modtools/pref-edit
==================
Add, remove, or edit the preferences of a unit.
Requires a modifier, a unit argument, and filters.

- ``-unit <UNIT ID>``:
    The given unit will be affected.
    If not found/provided, the script will try defaulting to the currently selected unit.

Valid modifiers:

- ``-add``:
    Add a new preference to the unit. Filters describe the preference's variables.
- ``-remove``:
    Remove a preference from the unit. Filters describe what preference to remove.
- ``-has``:
    Checks if the unit has a preference matching the filters. Prints a message in the console.
- ``-removeall``:
    Remove all preferences from the unit. Doesn't require any filters.

Valid filters:

- ``-id <VALUE>``:
    This is the ID used for all preferences that require an ID.
    Represents item_type, creature_id, color_id, shape_id, plant_id, poetic_form_id, musical_form_id, and dance_form_id.
    Text IDs (e.g. "TOAD", "AMBER") can be used for all but poetic, musical, and dance.
- ``-item``, ``-creature``, ``-color``, ``-shape``, ``-plant``, ``-poetic``, ``-musical``, ``-dance``:
    Include one of these to describe what the id argument represents.
- ``-type <PREFERENCE TYPE>``:
    This describes the type of the preference. Can be entered either using the numerical ID or text id.
    Run ``lua @df.unitpref_type`` for a full list of valid values.
- ``-subtype <ID>``:
    The value for an item's subtype
- ``-material <ID>``:
    The id of the material. For example "MUSHROOM_HELMET_PLUMP:DRINK" or "INORGANIC:IRON".
- ``-state <STATE ID>``:
    The state of the material. Values can be the numerical or text ID.
    Run ``lua @df.matter_state`` for a full list of valid values.
- ``-active <TRUE/FALSE>``:
    Whether the preference is active or not (?)

Other arguments:

- ``-help``:
    Shows this help page.

Example usage:

- Like drinking dwarf blood::

    modtools/pref-edit -add -item -id DRINK -material DWARF:BLOOD -type LikeFood
]====]

local utils = require 'utils'

local validArgs = utils.invert({
    'help',
    "unit",
    "add",
    "remove",
    "has",
    "id",
    "item",
    "type",
    "creature",
    "color",
    "shape",
    "plant",
    "poetic",
    "musical",
    "dance",
    "subtype",
    "material",
    "state",
    "active",
    "removeall"
})

-- Check if unit has a preference matching all the criteria
-- Note: This may give some false positives if filters aren't as precise as they should be
-- Returns the preference's index if found, otherwise returns false
function hasPreference(unit, details)
  for index, preference in ipairs(unit.status.current_soul.preferences) do
    local valid = true
    for variable, value in pairs(details) do
      if preference[variable] ~= value then
        valid = false
        break
      end
    end

    if valid then
      return index
    end
  end

  -- If we get here, we didn't find it
  return false
end

-- Creates and adds a new preference to the unit's list.
-- Won't add a new preference if an existing one already matches the given details.
function addPreference(unit, d


 */
		if((g_adb.g_kbd_read_no_update++ > 5) && (g_adb.g_kbd_chars_buffered > 1)) {
			/* read 5 times, keys pending, let's move it along */
			printf("Read %02x %d times, tossing\n", g_adb.g_kbd_buf[0],
					g_adb.g_kbd_read_no_update);
			adb_access_c010();
		}
	} else {
		vbl_count = g_sim65816.g_vbl_count;
		if(g_config_control_panel) {
			vbl_count = g_cfg_vbl_count;
		}
		if(g_adb.g_key_down && vbl_count >= g_adb.g_adb_repeat_vbl) {
			/* repeat the g_adb.g_key_down */
			g_adb.g_c025_val |= 0x8;
			adb_key_event(g_adb.g_a2code_down, 0);
			g_adb.g_adb_repeat_vbl = vbl_count + g_adb.g_adb_repeat_rate;
		}
	}

	return g_adb.g_kbd_buf[0];
}

word32
adb_access_c010()
{
	int	tmp;
	int	i;

	g_adb.g_kbd_read_no_update = 0;

	tmp = g_adb.g_kbd_buf[0] & 0x7f;
	g_adb.g_kbd_buf[0] = tmp;

	tmp = tmp | (g_adb.g_hard_key_down << 7);
	if(g_adb.g_kbd_chars_buffered) {
	//	printf("c010 removing %X ",g_adb.g_kbd_buf[0]);
		for(i = 1; i < g_adb.g_kbd_chars_buffered; i++) {
			g_adb.g_kbd_buf[i - 1] = g_adb.g_kbd_buf[i];
		}
		g_adb.g_kbd_chars_buffered--;
	//	printf(" @%d\n",g_adb.g_kbd_chars_buffered);
	}

	g_adb.g_c025_val = g_adb.g_c025_val & (~ (0x08));

	return tmp;
}

word32
adb_read_c025()
{

	return	g_adb.g_c025_val;
}

int
adb_is_cmd_key_down()
{
	return	CMD_DOWN;
}

int
adb_is_option_key_down()
{
	return	OPTION_DOWN;
}

void
adb_increment_speed()
{
	// TODO
	/*
	const char *str;

	g_sim65816.g_limit_speed++;
	if(g_sim65816.g_limit_speed > 3) {
		g_sim65816.g_limit_speed = 0;
	}

	str = "";
	switch(g_sim65816.g_limit_speed) {
	case 0:
		str = "...as fast as possible!";
		break;
	case 1:
		str = "...1.024MHz!";
		break;
	case 2:
		str = "...2.8MHz!";
		break;
	case 3:
		str = "...8.0MHz!";
		break;
	}
	printf("Toggling g_sim65816.g_limit_speed to %d%s\n", g_sim65816.g_limit_speed, str);
	*/
}

void
adb_physical_key_update(int a2code, int is_up)
{
	int	autopoll;
	int	special;
	int	ascii_and_type;
	int	ascii;

	/* this routine called by xdriver to pass raw codes--handle */
	/*  ucontroller and ADB bus protocol issues here */
	/* if autopoll on, pass it on through to c025,c000 regs */
	/*  e


aj mitzuhelfen. Ich achte darauf, dass das Leder vernünftig gegerbt wird. Was danach daraus gemacht wird, weiß ich nicht. Wir brauchen jedoch Eure Hilfe.","Da ich wegen meiner Arbeit hier bleiben muss, brauche ich Euch, um die Häute zu beschaffen und sie anschließend zu mir zu bringen. Was meint Ihr <Junge/Mädel>, seid Ihr dabei?"}, {"Bringt 10 Einheiten leichtes Leder zu Bonnie Stoneflayer im Militärviertel in Ironforge."}},
[8512] = {"Die Allianz braucht mehr leichtes Leder!", {"Schön Euch wieder zu sehen, <Name>. Es scheint, als würden wir noch mehr leichtes Leder für die Herstellung verschiedenster Kriegsmaterialien benötigen. Es wäre großartig, wenn ihr mir noch einmal einen Stapel mit zehn Stücken bringen könntet."}, {"Bringt 10 Einheiten leichtes Leder zu Bonnie Stoneflayer beim Landeplatz in Dun Morogh."}},
[8513] = {"Die Allianz braucht mittleres Leder!", {"Ja <mein Herr/meine Dame>, ich wurde mit der Sammlung und Aufbewahrung des mittleren Leders für die Kriegsvorbereitungen beauftragt. Solltet Ihr über die Mittel verfügen, um mittleres Leder besorgen zu können, woher auch immer, dann bringt es bitte zu mir. Ich könnte mit Sicherheit etwas Unterstützung gebrauchen, wenn Ihr Zeit habt."}, {"Bringt 10 Einheiten mittleres Leder zu dem Gefreiten Porter im Militärviertel in Ironforge."}},
[8514] = {"Die Allianz braucht mehr mittleres Leder!", {"Ja <mein Herr/meine Dame>, es sieht aus als hätten wir bis zum heutigen Tag $2063w Stücke mittleren Leders gesammelt. Ich weiß es ist viel verlangt, aber wenn Ihr noch immer gewillt seid, dann könnte ich Eure Hilfe beim Zusammentragen des restlichen Leders noch einmal gebrauchen."}, {"Bringt 10 Einheiten mittleres Leder zu dem Gefreiten Porter beim Landeplatz in Dun Morogh."}},
[8515] = {"Die Allianz braucht dickes Leder!", {"Junge, Junge, das wird großartig! <Klasse>, die Vorbereitungen für den Krieg in Ahn'Qiraj sind in vollem Gange und man hat mich damit beauftragt sämtliche Ladungen an dickem Leder zu überwachen, die hier abgeliefert werden. Wir fertigen zahlreiche Dinge daraus an, aber zuallererst brauchen wir eine große Menge davon. Eine gewaltige Menge! Jetzt zu Euch.","Glaubt Ihr, dass Ihr losziehen und mir einen fetten Stapel dickes Leder beschaffen könntet? Ja, wirklich?!"}, {"Bringt 10 Einheiten dickes Leder zu Marta Finespindle im Militärviertel in Ironforge."}},
[8516] = {"Die Allianz braucht mehr dickes Leder!", {"Tja, der Stapel ist noch nicht hoch genug. <Name>, wir haben noch immer nicht unsere Anforderung von $2071w Einheiten dicken Leders erreicht. Denkt nur an all die Dinge, die wir aus dem benötigten Leder noch herstellen können! Allerlei Rüstungen und Waffen. Sachen für das Innere der Dampfpanzer und Zubehör für Gewehre! Ingenieursbrillen und am Ende, wenn wir tatsächlich zu viel gesammelt haben, dient es auch noch als Material für die Zeppeline der Horde!","Bringt Ihr mir noch mehr dickes


ook": F6E1,
    "hook-off": F6E2,
    "hops": F2DF,
    "hospital": F2E0,
    "hospital-building": F2E1,
    "hospital-marker": F2E2,
    "hot-tub": F827,
    "hotel": F2E3,
    "houzz": F2E4,
    "houzz-box": F2E5,
    "hulu": F828,
    "human": F2E6,
    "human-child": F2E7,
    "human-female": F649,
    "human-greeting": F64A,
    "human-handsdown": F64B,
    "human-handsup": F64C,
    "human-male": F64D,
    "human-male-female": F2E8,
    "human-pregnant": F5CF,
    "humble-bundle": F743,
    "ice-cream": F829,
    "image": F2E9,
    "image-album": F2EA,
    "image-area": F2EB,
    "image-area-close": F2EC,
    "image-broken": F2ED,
    "image-broken-variant": F2EE,
    "image-filter": F2EF,
    "image-filter-black-white": F2F0,
    "image-filter-center-focus": F2F1,
    "image-filter-center-focus-weak": F2F2,
    "image-filter-drama": F2F3,
    "image-filter-frames": F2F4,
    "image-filter-hdr": F2F5,
    "image-filter-none": F2F6,
    "image-filter-tilt-shift": F2F7,
    "image-filter-vintage": F2F8,
    "image-multiple": F2F9,
    "image-off": F82A,
    "import": F2FA,
    "inbox": F686,
    "inbox-arrow-down": F2FB,
    "inbox-arrow-up": F3D1,
    "incognito": F5F9,
    "infinity": F6E3,
    "information": F2FC,
    "information-outline": F2FD,
    "information-variant": F64E,
    "instagram": F2FE,
    "instapaper": F2FF,
    "internet-explorer": F300,
    "invert-colors": F301,
    "itunes": F676,
    "jeepney": F302,
    "jira": F303,
    "jsfiddle": F304,
    "json": F626,
    "karate": F82B,
    "keg": F305,
    "kettle": F5FA,
    "key": F306,
    "key-change": F307,
    "key-minus": F308,
    "key-plus": F309,
    "key-remove": F30A,
    "key-variant": F30B,
    "keyboard": F30C,
    "keyboard-backspace": F30D,
    "keyboard-caps": F30E,
    "keyboard-close": F30F,
    "keyboard-off": F310,
    "keyboard-return": F311,
    "keyboard-tab": F312,
    "keyboard-variant": F313,
    "kickstarter": F744,
    "kodi": F314,
    "label": F315,
    "label-outline": F316,
    "ladybug": F82C,
    "lambda": F627,
    "lamp": F6B4,
    "lan": F317,
    "lan-connect": F318,
    "lan-disconnect": F319,
    "lan-pending": F31A,
    "language-c": F671,
    "language-cpp": F672,
    "language-


راه و ثابت توسط مشتری، به منزله مورد تایید بودن صحت آنها است و در صورتی که موارد فوق به صورت صحیح یا کامل درج نشده
                                                    باشد، دیجی‌کالا جهت اطمینان از صحت و قطعیت ثبت سفارش می‌تواند از مشتری، اطلاعات تکمیلی و بیشتری درخواست کند.
 مشتریان می‌توانند نام، آدرس و تلفن شخص دیگری را برای تحویل گرفتن سفارش
                                                    وارد کنند و دیجی‌کالا تنها برای ارسال همان سفارش، از این اطلاعات استفاده خواهد کرد.
 همچنین دیجی‌کالا ممکن است برای ارتباط با مشتریان، بهینه‌سازی محتوای وب‌سایت و تحقیقات بازاریابی
                                                    از برخی اطلاعات استفاده کند و برای اطلاع‌رسانی رویدادها و اخبار، خدمات و سرویس‌های ویژه یا پروموشن‌ها، برای اعضای وب‌سایت ایمیل یا پیامک ارسال نماید. در صورتی که کاربران تمایل به
                                                    دریافت اینگونه ایمیل‌ها و پیامک‌ها نداشته باشند، می‌توانند عضویت دریافت خبرنامه دیجی‌کالا را در پروفایل خود لغو کنند. عدم اقدام جهت لغو، به منزله ی موافقت ضمنی با دریافت ایمیل‌ها
                                                    و پیام‌ها و سلب حق اعتراض می‌باشد.

توجه داشته باشید که 300061930000 و 100061930000 شماره‌هایی است که دیجی‌کالا از طریق آن برای کاربران و مشتریان خود پیامک (اس‌ام‌اس) ارسال می‌کند. همچنین این شماره‌ها، سامانه
                                                    ارسال پیامک است که وضعیت پردازش سفارش یا رویدادها، خدمات و سرویس‌های ویژه دیجی‌کالا را به اطلاع کاربران می‌رساند و روشن است که امکان دریافت پیام&zwn


 override_height: u32) -> Result<Fractal, Box<Error>> {

    let file = File::open(filename)?;

    let mut fractal_file : FractalFile = serde_json::from_reader(file)?;

    if override_width !=0 && override_height != 0{
        fractal_file.width = override_width as i32;
        fractal_file.height = override_height as i32;
    }

    let mut fractal = Fractal::new(fractal_file.width, fractal_file.height);

    for range in fractal_file.ranges {
        fractal.add_range(range.range_end, range.color);
    }

    for zoom in fractal_file.zooms {
        fractal.add_zoom(zoom);
    }
    Ok(fractal)
}

#[test]
fn test_fractal_file() {
    let mut fractal_file = FractalFile::new();

    fractal_file.width = 800;
    fractal_file.height = 600;
    fractal_file.ranges.push(RangeColor::new(0.0, RGB::new(0.0, 0.0, 0.0)));
    fractal_file.ranges.push(RangeColor::new(0.3, RGB::new(255.0, 0.0, 0.0)));
    fractal_file.ranges.push(RangeColor::new(0.5, RGB::new(255.0, 255.0, 0.0)));
    fractal_file.ranges.push(RangeColor::new(1.0, RGB::new(255.0, 255.0, 255.0)));

    fractal_file.zooms.push(Zoom::new(295, 202, 0.1));
    fractal_file.zooms.push(Zoom::new(312, 304, 0.1));

    let json = serde_json::to_string(&fractal_file).unwrap();

    let ref_json = "{\"width\":800,\"height\":600,\"ranges\":[{\"range_end\":0.0,\"color\":{\"r\":0.0,\"g\":0.0,\"b\":0.0}},{\"range_end\":0.3,\"color\":{\"r\":255.0,\"g\":0.0,\"b\":0.0}},{\"range_end\":0.5,\"color\":{\"r\":255.0,\"g\":255.0,\"b\":0.0}},{\"range_end\":1.0,\"color\":{\"r\":255.0,\"g\":255.0,\"b\":255.0}}],\"zooms\":[{\"x\":295,\"y\":202,\"scale\":0.1},{\"x\":312,\"y\":304,\"scale\":0.1}]}";
    assert_eq!(json, String::from(ref_json));

    let fractal_parse_file : FractalFile = serde_json::from_str(ref_json).unwrap();
    assert_eq!(fractal_parse_file, fractal_file);
}<filename>src/lib.rs<gh_stars>1-10
//! A wrapper around `rayon::join` that accepts more than 2 and up to 8 closures to be run in parallel.
//!
//! # Examples
//!
//! ```
//! # #[macro_use] extern crate rayon_join_macro;
//! # fn main() {
//! use rayon_join_macro::ConsTuple;
//!
//! fn factorial(n: usize) -> usize {
//!     if n == 0 { 1 } else { n * factorial(n - 1) }
//! }
//!
//! let (a, b, c): (u16, String, usize) = join!(
//!     || (1..=50).sum(),
//!     || "abc".repeat(3),
//!     || factorial(8)
//! );
//! assert_eq!(a, 1275);
//! assert_eq!(b, "abcabcabc");
//! assert_eq!(c, 40320);
//! # }
//! ```

#![allow(clippy::needless_doctest_main)]
#![allo


-- Tests for bogosort.lua
local bogosort = require 'bogosort'

local total, pass = 0, 0

local function dec(str, len)
	return #str < len
	   and str .. (('.'):rep(len-#str))
		  or str:sub(1,len)
end

local function run(message, f)
	total = total + 1
	local ok, err = pcall(f)
	if ok then pass = pass + 1 end
	local status = ok and 'PASSED' or 'FAILED'
	print(('%02d. %68s: %s'):format(total, dec(message,68), status))
end

-- Wrap for Lua's table sort so that it returns
-- the passed-in table
local function sort(t, comp)
	table.sort(t, comp)
	return t
end

-- Returns a copy of a an array
local function clone(t)
	local _t = {}
	for k,v in ipairs(t) do _t[k] = v end
	return _t
end

-- Checks if t1 and t2 arrays are the same
local function same(t1, t2)
	for k,v in ipairs(t1) do
		if t2[k] ~= v then return false end
	end
	return true
end

math.randomseed(os.time())

-- Note: Due to the nature of Bogosort, we will use
-- short tables to perform tests. For higher values


tems[i] == null) continue;
                GameScene.Bind(GuestItems[i]);
            }

            Redraw();
        }

        public void TradeReset()
        {
            for (int i = 0; i < GuestItems.Length; i++)
                GuestItems[i] = null;

            GuestName = string.Empty;
            GuestGold = 0;

            Hide();
        }
    }
}


60)
	arguments {
		Ped "ped",

		Ped "fleeTarget",

		float "distance",

		Any "fleeTime",

		BOOL "p4",

		BOOL "p5",
	}
	returns	"void"

native "TASK_REACT_AND_FLEE_PED"
	hash "0x72C896464915D1B1"
	jhash (0x8A632BD8)
	arguments {
		Ped "ped",

		Ped "fleeTarget",
	}
	returns	"void"

native "TASK_SHOCKING_EVENT_REACT"
	hash "0x452419CBD838065B"
	jhash (0x9BD00ACF)
	arguments {
		Ped "ped",

		Any "event",
	}
	returns	"void"

native "TASK_WANDER_IN_AREA"
	hash "0xE054346CA3A0F315"
	jhash (0xC6981FB9)
	arguments {
		Ped "ped",

		float "x",

		float "y",

		float "z",

		float "radius",

		float "minimalLenght",

		float "timeBetweenWalks",
	}
	returns	"void"

--[[!
<summary>
	Makes PED walk around the area.
</summary>
]]--
native "TASK_WANDER_STANDARD"
	hash "0xBB9CE077274F6A1B"
	jhash (0xAF59151A)
	arguments {
		Ped "ped",

		float "p1",

		int "p2",
	}
	returns	"void"

--[[!
<summary>
	Modes:
	0 - ignore heading
	1 - park forward
	2 - park backwards

	Depending on the angle of approach, the vehicle can park at the specified heading or at its exact opposite (-180) angle.

	Radius seems to define how close the vehicle has to be -after parking- to the position for this task considered completed. If the value is too small, the vehicle will try to park again until it's exactly where it should be. 20.0 Works well but lower values don't, like the radius is measured in centimeters or something.
</summary>
]]--
native "TASK_VEHICLE_PARK"
	hash "0x0F3E34E968EA374E"
	jhash (0x5C85FF90)
	arguments {
		Ped "ped",

		Vehicle "vehicle",

		float "x",

		float "y",

		float "z",

		float "heading",

		int "mode",

		float "radius",

		BOOL "keepEngineOn",
	}
	returns	"void"

--[[!
<summary>
	known "killTypes" are: "AR_stealth_kill_knife" and "AR_stealth_kill_a".
</summary>
]]--
native "TASK_STEALTH_KILL"
	hash "0xAA5DC05579D60BD9"
	jhash (0x0D64C2FA)
	arguments {
		Ped "killer",

		Ped "target",

		Hash "killType",

		float "p3",

		BOOL "p4",
	}
	returns	"Any"

--[[!
<summary>
	p0 should be 0?
</summary>
]]--
native "TASK_PLANT_BOMB"
	hash "0x965FEC691D55E9BF"
	jhash (0x33457535)
	arguments {
		int "p0",

		float "x",

		float "y",

		float "z",

		float "degreeAngle",
	}
	returns	"Any"

--[[!
<summary>
	The last three should all be 0.
	If no timeout, set timeout to -1.
	All parameters are taken from the ScriptHookV Dot Net wrapper.
</summary>
]]--
native "TASK_FOLLOW_NAV_MESH_TO_COORD"
	hash "0x15D3A79D4E44B913"
	jhash (0xFE4A10D9)
	arguments {
		Ped "ped",

		float "x",


 #2f3136;
    color: #bfbfbb;
    padding: 0.4em 1.8em;
    border-radius: 3px;
	border-left: solid #20c20e 5px;
    font-weight: 100;
}

table{
	border-collapse: collapse;
}

label{
	line-height: 38px;
}

p{
	margin: 0.5em 0;
}

.left {
	float: left;
}
.right {
	float: right;
}
.bold {
	font-weight: bold;
}
.red{
	color: #F04747;
}
.green{
	color:#43B581;
}
.clear {
	clear: both;
}
.centered{
	text-align: center;
}
.select{
	width: 98px !important;
	padding: 0 !important;
}
.selected{
	background: #4974a9;
}
.status{
	width: 120px;
	padding-left: 8px;
}
.labelFix {
	line-height: 44px;
}
.clickable{
	cursor: pointer;
}
.settingName{
	text-transform: uppercase;
	font-weight: bold;
	text-decoration: underline;
}

#status {
	text-align: center;
	text-transform: capitalize;
	padding: 5px;
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 99;
}

#closeError{
	float: right;
	color: #fff;
	padding: 0px 10px;
	cursor: pointer;
}

footer {
	font-size: .95em;
	text-align: center;
	margin-top: 3em;
	margin-bottom: 3em;
}

/* ===== CHECKBOX ===== */
/* Customize the label (the container) */
.checkBoxContainer {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  height: 32px;
}

/* Hide the browser's default checkbox */
.checkBoxContainer input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 8px;
  left: 0;
  height: 28px;
  width: 28px;
  background-color: #2F3136;
  border-radius: 4px;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
.checkBoxContainer input:checked ~ .checkmark:after {
  display: block;
}

.checkBoxContainer .checkmark:after {
  left: 10px;
  top: 7px;
  width: 4px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

/* ERROR */
.hide {
	display: none;
}

.show {
	display: block !important;
	animation-name: fadeIn;
	animation-duration: 1s;
}

@keyframes fadeIn {
	0%   {opacity: 0;}
	100% {opacity: 1;}
}

hr {
	background: #3e4146;
}

a {
	color: #5281bb;
    text-decoration: none;
}

a:hover {
	color: #95b8


のコンストラクタ
   *
   * 対象のuidと作成する日の基準日を指定
   * @param uid
   * @param targetDate
   */
  constructor(uid: string, targetDate: Date) {
    this.uid_ = uid
    // 時間は0:00にしておく
    targetDate.setHours(0, 0, 0, 0)
    this.targetDate_ = targetDate
  }

  /**
   * 指定日数分のリピートタスクをリピートタスクのマスタを元に作成する
   *
   * 指定されたカウント分のリピートタスクが完了したらPromiseで応答するので、呼び出し元は待ちたければそれを使って待つ
   * 当日予定分は待って同期的に次の処理が必要だが、未来の分は通常は待つ必要はないはず
   * @param count 何日先までリピートタスクを作成するかの指定
   */
  public async creaetRepeat(count: number): Promise<void> {
    // 全処理完了確認用
    const promises: Array<Promise<void>> = []

    // リピートタスク一覧を読む
    const repeats: Repeat[] = await this.readRepeat(this.targetDate_)

    // 日付毎に処理
    for (let index = 0; index < count; index++) {
      // 日付を進める
      const targetDate: Date = new Date(this.targetDate_)
      targetDate.setDate(this.targetDate_.getDate() + index)

      // 日付毎の処理を非同期で実施
      promises.push(this.createRepeatSub(repeats, targetDate))
    }

    // すべてのPromise完了を待つ
    await Promise.all(promises)
    return
  }

  /**
   * リピートタスクのメイン処理
   * 日付毎に非同期で処理する。指定された日にリピートタスクがあるか確認してなければ作成するまでやる
   * @param repeats リピートタスク一覧が入った配列
   * @param targetDate
   */
  public async createRepeatSub(repeats: Repeat[], targetDate: Date): Promise<void> {
    // 全処理完了確認用
    const promises: Array<Promise<void>> = []
    const tc: TaskController = await FirestoreUtil.loadTasksIncluedDeleted(this.uid_, targetDate)

    for (const repeat of repeats) {
      if (this.isMakeRepeat(repeat, targetDate)) {
        // 既にリピートタスクがあるかを判断
        if (!this.isExsistRepeat(repeat, tc.tasks)) {
          // なければ作成
          promises.push(this.createTask(repeat, targetDate))
        }
      }
      // 次のリピートタスク
    }

    // 一日分のリピート全部が終わるまで待つ
    await Promise.all(promises)
    return
  }

  /**
   * リピートタスクを作る
   * @param repeat
   * @param targetDate
   */
  private async createTask(repeat: Repeat, targetDate: Date): Promise<void> {
    const task = new Task(DateUtil.calcTaskDate(targetDate, repeat.section), repeat.title)
    task.repeatId = repeat.id
    task.isDoing = false
    task.startTime = undefined
    task.endTime = undefined
    task.estimateTime = repeat.estimateTime
    task.estimateSeparateStart = repeat.estimateSeparateStart
    task.estimateSeparateEnd = repeat.estimateSeparateEnd
    task.note = repeat.note
    await FirestoreUtil.setTask(this.uid_, task)
    return
  }

  /**
   * Task配列の中に既にリピートタスクが存在するか
   * @param repeat 確認したいリピートタスク(idでもいい


);
    rightAvailableFeatures1.add(new Feature("ft2", "fg2", fgRight1));

    // join on different pks
    List<Feature> leftOn1 = Collections.singletonList(new Feature("pk1", "fg0", fgLeft));
    List<Feature> rightOn1 = Collections.singletonList(new Feature("pk1", "fg2", fgRight1));

    List<SqlCondition> joinOperator = Arrays.asList(SqlCondition.EQUALS, SqlCondition.EQUALS);
    List<SqlCondition> joinOperator1 = Collections.singletonList(SqlCondition.EQUALS);

    Query query = new Query("fs", "project", fgLeft, "fg0", leftFeaturesSelected, leftFeaturesAvailable, false, null);
    Query right = new Query("fs", "project", fgRight, "fg1", new ArrayList<>(), rightAvailableFeatures, false, null);
    Query right1 = new Query("fs", "project", fgRight1, "fg2", new ArrayList<>(), rightAvailableFeatures1, false, null);

    Join join = new Join(query, right, leftOn, rightOn, JoinType.INNER, null, joinOperator);
    Join join1 = new Join(query, right1, leftOn1, rightOn1, JoinType.INNER, null, joinOperator1);

    query.setJoins(Arrays.asList(join, join1));

    String result =
      pitJoinController.generateSQL(query, true).toSqlString(new SparkSqlDialect(SqlDialect.EMPTY_CONTEXT)).getSql();
    String expected = "WITH right_fg0 AS (SELECT *\n" +
                                        "FROM (SELECT `fg0`.`label` `label`, `fg1`.`ft1` `ft1`, `fg0`.`pk1` `join_pk_pk1`, `fg0`.`ts` `join_evt_ts`, " +
                                                      "RANK() OVER (PARTITION BY `fg0`.`pk1`, `fg0`.`pk2`, `fg0`.`ts` ORDER BY `fg1`.`ts` DESC) pit_rank_hopsworks\n" +
                                                "FROM `fs`.`fg0_1` `fg0`\n" +
                                          "INNER JOIN `fs`.`fg1_1` `fg1` ON `fg0`.`pk1` = `fg1`.`pk1` AND `fg0`.`pk2` = `fg1`.`pk2` AND `fg0`.`ts` >= `fg1`.`ts`) NA\n" +
                                       "WHERE `pit_rank_hopsworks` = 1), " +
                           "right_fg1 AS (SELECT *\n" +
                                        "FROM (SELECT `fg0`.`label` `label`, `fg2`.`ft2` `ft2`, `fg0`.`pk1` `join_pk_pk1`, `fg0`.`ts` `join_evt_ts`, " +
                                                      "RANK() OVER (PARTITION BY `fg0`.`pk1`, `fg0`.`ts` ORDER BY `fg2`.`ts` DESC) pit_rank_hopsworks\n" +
                                                "FROM `fs`.`fg0_1` `fg0`\n" +
                                          "INNER JOIN `fs`.`fg2_1` `fg2` ON `fg0`.`pk1` = `fg2`.`pk1` AND `fg0`.`ts` >= `fg2`.`ts`) NA\n" +
                                       "WHERE `pit_rank_hopsworks` = 1) (" +
                        "SELECT `right_fg0`.`label` `label`, `right_fg0`.`ft1` `ft1`, `right_fg1`.`ft2` `ft2`\n" +
                          "FROM right_fg0\n" +
                    "INNER JOIN right_fg1 ON `right_fg0`.`join_pk_pk1` = `right_fg1`.`join_pk_pk1` AND `right_fg0`.`join_evt_ts` = `


.RegisterOutputType(DedicatedHostGroupOutput{})
	pulumi.RegisterOutputType(DedicatedHostGroupArrayOutput{})
	pulumi.RegisterOutputType(DedicatedHostGroupMapOutput{})
}
// 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 nas

import (
	"context"
	"reflect"

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

// Provides a File Storage (NAS) Access Point resource.
//
// For information about NAS Access Point and how to use it, see [What is Access Point](https://www.alibabacloud.com/help/zh/nas/developer-reference/api-nas-2017-06-26-createaccesspoint).
//
// > **NOTE:** Available since v1.224.0.
//
// ## Example Usage
//
// # Basic Usage
//
// ```go
// package main
//
// import (
//
//	"fmt"
//
//	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
//	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nas"
//	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
//	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
//	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
//
// )
//
//	func main() {
//		pulumi.Run(func(ctx *pulumi.Context) error {
//			cfg := config.New(ctx, "")
//			name := "terraform-example"
//			if param := cfg.Get("name"); param != "" {
//				name = param
//			}
//			azone := "cn-hangzhou-g"
//			if param := cfg.Get("azone"); param != "" {
//				azone = param
//			}
//			_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
//				AvailableResourceCreation: pulumi.StringRef("VSwitch"),
//			}, nil)
//			if err != nil {
//				return err
//			}
//			defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
//				Min: 10000,
//				Max: 99999,
//			})
//			if err != nil {
//				return err
//			}
//			defaultkyVC70, err := vpc.NewNetwork(ctx, "defaultkyVC70", &vpc.NetworkArgs{
//				CidrBlock:   pulumi.String("172.16.0.0/12"),
//				Description: pulumi.String("接入点测试noRootDirectory"),
//			})
//			if err != nil {
//				return err
//			}
//			defaultoZAPmO, err := vpc.NewSwitch(ctx, "defaultoZAPmO", &vpc.SwitchArgs{
//				VpcId:     defaultkyVC70.ID(),
//				ZoneId:    pulumi.String(_default.Zones[0].Id),
//				CidrBlock: pulumi.String("172.16.0.0/24"),
//			})
//			if err != nil {
//				return err
//			}
//			defaultBbc7ev, err := nas.NewAccessGroup(ctx, "defaultBbc7ev", &nas.AccessGroupArgs{
//				AccessGroupType: pulumi.String("Vpc"),
//				AccessGroupName: pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
//				FileSystemType:  pulumi.String("standard"),
//			})
//			if err != nil {
//				return err
//			}
//			defaultVtUpDh, err := nas.NewFileSystem


ndLink")],1)]),t._v(" "),s("h4",{attrs:{id:"remarks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#remarks"}},[t._v("#")]),t._v(" Remarks")]),t._v(" "),s("p",[t._v("The properties "),s("code",[t._v("object-fit")]),t._v(" and "),s("code",[t._v("object-position")]),t._v(" are not supported by Internet Explorer.")])])}),[],!1,null,null,null);e.default=r.exports}}]);(window.webpackJsonp=window.webpackJsonp||[]).push([[568],{976:function(t,s,a){"use strict";a.r(s);var n=a(31),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"function-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#function-parameters"}},[t._v("#")]),t._v(" Function Parameters")]),t._v(" "),a("h2",{attrs:{id:"parameters-are-passed-by-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-are-passed-by-value"}},[t._v("#")]),t._v(" Parameters are passed by value")]),t._v(" "),a("p",[t._v("In C, all function parameters are passed by value, so modifying what is passed in callee functions won't affect caller functions' local variables.")]),t._v(" "),a("div",{staticClass:"language-c extra-class"},[a("pre",{pre:!0,attrs:{class:"language-c"}},[a("code",[a("span",{pre:!0,attrs:{class:"token macro property"}},[a("span",{pre:!0,attrs:{class:"token directive-hash"}},[t._v("#")]),a("span",{pre:!0,attrs:{class:"token directive keyword"}},[t._v("include")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("<stdio.h>")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("modify")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" v"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("printf")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"modify 1: %d\\n"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" v"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/* 0 is printed */")]),