blic void TestAnyPolicyTest14()
		{
			string[] certList = new string[] { "anyPolicyCACert", "AnyPolicyTest14EE" };
			string[] crlList = new string[] { TRUST_ANCHOR_ROOT_CRL, "anyPolicyCACRL" };

			DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy1);
			DoExceptionTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy2,
				-1,
				"Path processing failed on policy.");
		}

		[Test]
		public void TestUserNoticeQualifierTest15()
		{
			string[] certList = new string[] { "UserNoticeQualifierTest15EE" };
			string[] crlList = new string[] { TRUST_ANCHOR_ROOT_CRL };

			DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList);
			DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy1);
			DoExceptionTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy2,
				-1,
				"Path processing failed on policy.");
		}

		[Test]
		public void TestUserNoticeQualifierTest16()
		{
			string[] certList = new string[] { GOOD_CA_CERT, "UserNoticeQualifierTest16EE" };
			string[] crlList = new string[] { TRUST_ANCHOR_ROOT_CRL, GOOD_CA_CRL };

			PkixCertPathValidatorResult result = DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList);

			result = DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy1);

			DoExceptionTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy2,
				-1,
				"Path processing failed on policy.");
		}

		[Test]
		public void TestUserNoticeQualifierTest17()
		{
			string[] certList = new string[] { GOOD_CA_CERT, "UserNoticeQualifierTest17EE" };
			string[] crlList = new string[] { TRUST_ANCHOR_ROOT_CRL, GOOD_CA_CRL };

			DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList);
			DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy1);
			DoExceptionTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy2,
				-1,
				"Path processing failed on policy.");
		}

		[Test]
		public void TestUserNoticeQualifierTest18()
		{
			string[] certList = new string[] { "PoliciesP12CACert", "UserNoticeQualifierTest18EE" };
			string[] crlList = new string[] { TRUST_ANCHOR_ROOT_CRL, "PoliciesP12CACRL" };

			DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy1);
			DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy2);
		}

		[Test]
		public void TestUserNoticeQualifierTest19()
		{
			string[] certList = new string[] { "UserNoticeQualifierTest19EE" };
			string[] crlList = new string[] { TRUST_ANCHOR_ROOT_CRL };

			DoTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList, nistTestPolicy1);
			DoExceptionTest(TRUST_ANCHOR_ROOT_CERTIFICATE, certList, crlList


W_PIGMENT] = {0, 0.33, 0.34, 0.33},
      [MILL_ITEMS.MISTY_PIGMENT] = {0.47, 0.012, 0.012},
  },
}


    let case = i.case.ok_or(format_err!("Case in invocation cannot be null"))?;
                    let name = case.name.ok_or(format_err!("Name in case cannot be null"))?;
                    test_names.push(name);
                }
                adapter
                    .run_tests(
                        test_names,
                        run_listener.into_proxy().context("Can't convert listener into proxy")?,
                    )
                    .await?;
            }
        }
    }
    Ok(())
}
/*
This tool is part of the WhiteboxTools geospatial analysis library.
Authors: Dr. <NAME>
Created: 15/03/2018
Last Modified: 13/10/2018
License: MIT
*/

use whitebox_raster::*;
use whitebox_common::rendering::html::*;
use whitebox_common::rendering::LineGraph;
use crate::tools::*;
use whitebox_vector::{ShapeType, Shapefile};
use std::env;
use std::f64;
use std::fs::File;
use std::io::prelude::*;
use std::io::BufWriter;
use std::io::{Error, ErrorKind};
use std::path;
use std::process::Command;

/// This tool can be used to plot an image stack profile (i.e. a signature) for a set of points (`--points`) and
/// a multispectral image stack (`--inputs`). The tool outputs an interactive SVG line graph embedded in an
/// HTML document (`--output`). If the input points vector contains multiple points, each input point will
/// be associated with a single line in the output plot. The order of vertices in each signature line is
/// determined by the order of images specified in the `--inputs` parameter. At least two input images are
/// required to run this operation. Note that this tool does not require multispectral images as
/// inputs; other types of data may also be used as the image stack. Also note that the input images should be
/// single-band, continuous greytone rasters. RGB colour images are not good candidates for this tool.
///
/// If you require the raster values to be saved in the vector points file's attribute table, or if you need
/// the raster values to be output as text, you may use the `ExtractRasterValuesAtPoints` tool instead.
///
/// # See Also
/// `ExtractRasterValuesAtPoints`
pub struct ImageStackProfile {
    name: String,
    description: String,
    toolbox: String,
    parameters: Vec<ToolParameter>,
    example_usage: String,
}

impl ImageStackProfile {
    pub fn new() -> ImageStackProfile {
        // public constructor
        let name = "ImageStackProfile".to_string();
        let toolbox = "Image Processing Tools".to_string();
        let description = "Plots an image stack profile (i.e. signature) for a set of points and multispectral images.".to_string();

        let mut parameters = vec![];
        parameters.push(ToolParameter {
            name: "Input Files".to_owned(),
            flags: vec!["-i".to_owned(), "--inputs".to_owned()],
            description: "Input multispectral image files.".to_owned(),
            parameter_type: ParameterType::FileList(ParameterFileType::Raster),
            default_value: None,
            optional: false,
        });

        parameters.push(ToolParameter {
            name: "Input Vector Points File".to_owned(),
            flags: vec!["--points".to_owned()],
            description: "Input vector points file.".to_owned(),
            parameter_type: ParameterType::ExistingFile(ParameterFileType::Vector(
                VectorGeometryType::Point,


Time);
	savefile->WriteInt(restStartTime);
	savefile->WriteBool(isLoaded);
	savefile->WriteBool(isActive);
	savefile->WriteStaticObject(physicsObj);
}

/*
================
idAF::Restore
================
*/
void idAF::Restore(idRestoreGame *savefile)
{
	savefile->ReadObject(reinterpret_cast<idClass * &>(self));
	savefile->ReadString(name);
	savefile->ReadBool(hasBindConstraints);
	savefile->ReadVec3(baseOrigin);
	savefile->ReadMat3(baseAxis);
	savefile->ReadInt(poseTime);
	savefile->ReadInt(restStartTime);
	savefile->ReadBool(isLoaded);
	savefile->ReadBool(isActive);

	animator = NULL;
	modifiedAnim = 0;

	if (self) {
		SetAnimator(self->GetAnimator());
		Load(self, name);

		if (hasBindConstraints) {
			AddBindConstraints();
		}
	}

	savefile->ReadStaticObject(physicsObj);

	if (self) {
		if (isActive) {
			// clear all animations
			animator->ClearAllAnims(gameLocal.time, 0);
			animator->ClearAllJoints();

			// switch to articulated figure physics
			self->RestorePhysics(&physicsObj);
			physicsObj.EnableClip();
		}

		UpdateAnimation();
	}
}

/*
================
idAF::UpdateAnimation
================
*/
bool idAF::UpdateAnimation(void)
{
	int i;
	idVec3 origin, renderOrigin, bodyOrigin;
	idMat3 axis, renderAxis, bodyAxis;
	renderEntity_t *renderEntity;

	if (!IsLoaded()) {
		return false;
	}

	if (!IsActive()) {
		return false;
	}

	renderEntity = self->GetRenderEntity();

	if (!renderEntity) {
		return false;
	}

	if (physicsObj.IsAtRest()) {
		if (restStartTime == physicsObj.GetRestStartTime()) {
			return false;
		}

		restStartTime = physicsObj.GetRestStartTime();
	}

	// get the render position
	origin = physicsObj.GetOrigin(0);
	axis = physicsObj.GetAxis(0);
	renderAxis = baseAxis.Transpose() * axis;
	renderOrigin = origin - baseOrigin * renderAxis;

	// create an animation frame which reflects the current pose of the articulated figure
	animator->InitAFPose();

	for (i = 0; i < jointMods.Num(); i++) {
		// check for the origin joint
		if (jointMods[i].jointHandle == 0) {
			continue;
		}

		bodyOrigin = physicsObj.GetOrigin(jointMods[i].bodyId);
		bodyAxis = physicsObj.GetAxis(jointMods[i].bodyId);
		axis = jointMods[i].jointBodyAxis.Transpose() * (bodyAxis * renderAxis.Transpose());
		origin = (bodyOrigin - jointMods[i].jointBodyOrigin * axis - renderOrigin) * renderAxis.Transpose();
		animator->SetAFPoseJointMod(jointMods[i].jointHandle, jointMods[i].jointMod, axis, origin);
	}

	animator->FinishAFPose(modifiedAnim, GetBounds().Expand(POSE_BOUNDS_EXPANSION), gameLocal.time);
	animator->SetAFPoseBlendWeight(1.0f);

	return true;
}

/*
================
idAF::GetBounds

  returns bounds for the current pose
================
*/
idBounds idAF::GetBounds(void) const
{
	int i;
	idAFBody *body;
	idVec3 origin, entityOrigin;
	idMat3 axis, entityAxis;
	idBounds bounds, b;

	bounds.Clear();

	// get model base transform
	origin = physicsObj.GetOrigin(0);
	axis = physicsObj.GetAxis(0);

	entityAxis = baseAxis.Transpose() * axis;
	ent


 3 === 0) {
                num += ' ';
            }
            num += integer[i];
        }
        return num.trim() + ',' + decimal + ' PLN';
    }
}
import replaceTemplateStrings from '../replace-template-strings';

describe('utils/replaceTemplateStrings', () => {
  test('it is a function ', () => {
    expect(typeof replaceTemplateStrings).toBe('function');
  });

  test('it runs without crashing', () => {
    expect(replaceTemplateStrings('', '')).toBe('');
  });

  const testCases = [
    ['some camelCase', 'some replacedWord'],
    ['some PascalCase', 'some ReplacedWord'],
    ['some kebab-case', 'some replaced-word'],
    ['some KEBAB-CASE', 'some REPLACED-WORD'],
    ['some snake_case', 'some replaced_word'],
    ['some SNAKE_CASE', 'some REPLACED_WORD'],
  ];

  testCases.forEach(([string, expected]) => {
    test(`it replaces the input string ${string} with the expected output ${expected}`, () => {
      expect(replaceTemplateStrings(string, 'replaced-word')).toBe(expected);
    });
  });

  test('it replaces complicated strings correctly', () => {
    const string =
      'The kebab-case thing is camelCase with a PascalCase one that SNAKE_CASE is nice';

    const word = 'some-kebab';

    const expected =
      'The some-kebab thing is someKebab with a SomeKebab one that SOME_KEBAB is nice';

    expect(replaceTemplateStrings(string, word)).toBe(expected);
  });
});
import { AbstractControl, FormGroup } from '@angular/forms';

// @dynamic
export class NgEzValidators {
  static equals(c1: string | string[], c2: string | string[]) {
    return (control: FormGroup) => {
      const { value } = control;

      if (!value || !(control instanceof FormGroup)) return null;

      const formControl1 = control.get(c1);
      const formControl2 = control.get(c2);

      if (!formControl1 || !formControl2) return null;

      return formControl1.value == formControl2.value
        ? null
        : {
            equals: true
          };
    };
  }

  static url(control: AbstractControl) {
    if (!control.value) return null;

    const urlRegex = new RegExp(
      "^" +
        // protocol identifier (optional)
        // short syntax // still required
        "(?:(?:(?:https?|ftp):)?\\/\\/)" +
        // user:pass BasicAuth (optional)
        "(?:\\S+(?::\\S*)?@)?" +
        "(?:" +
        // IP address exclusion
        // private & local networks
        "(?!(?:10|127)(?:\\.\\d{1,3}){3})" +
        "(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})" +
        "(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})" +
        // IP address dotted notation octets
        // excludes loopback network 0.0.0.0
        // excludes reserved space >= 224.0.0.0
        // excludes network & broacast addresses
        // (first & last IP address of each class)
        "(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])" +
        "(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}" +
        "(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))" +
        "|" +
        // host & domain names, may end with dot
        // can be replaced by a shortest alternative
        // (?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.)+
        "(?:" +
        "(?:" +
        "[a-z


      v27.4s,  v24.4h,  v0.h[\i]
        smlal2          v28.4s,  v24.8h,  v0.h[\i]
.endr
.else   // 8tap
        smull           v25.4s,  v4.4h,   v0.h[0]
        smull2          v26.4s,  v4.8h,   v0.h[0]
        smull           v27.4s,  v6.4h,   v0.h[0]
        smull2          v28.4s,  v6.8h,   v0.h[0]
.irpc i, 1234567
        ext             v23.16b, v4.16b,  v5.16b,  #(2*\i)
        ext             v24.16b, v6.16b,  v7.16b,  #(2*\i)
        smlal           v25.4s,  v23.4h,  v0.h[\i]
        smlal2          v26.4s,  v23.8h,  v0.h[\i]
        smlal           v27.4s,  v24.4h,  v0.h[\i]
        smlal2          v28.4s,  v24.8h,  v0.h[\i]
.endr
.endif
        srshl           v25.4s,  v25.4s,  v30.4s // -(6-intermediate_bits)
        srshl           v26.4s,  v26.4s,  v30.4s // -(6-intermediate_bits)
        srshl           v27.4s,  v27.4s,  v30.4s // -(6-intermediate_bits)
        srshl           v28.4s,  v28.4s,  v30.4s // -(6-intermediate_bits)
        uzp1            v23.8h,  v25.8h,  v26.8h // Same as xtn, xtn2
        uzp1            v24.8h,  v27.8h,  v28.8h // Ditto
        ret
endfunc

jumptable \type\()_\taps\()_hv_tbl
        .word 1280b - \type\()_\taps\()_hv_tbl
        .word 640b  - \type\()_\taps\()_hv_tbl
        .word 320b  - \type\()_\taps\()_hv_tbl
        .word 160b  - \type\()_\taps\()_hv_tbl
        .word 80b   - \type\()_\taps\()_hv_tbl
        .word 40b   - \type\()_\taps\()_hv_tbl
        .word 20b   - \type\()_\taps\()_hv_tbl
endjumptable
.endm

.macro filter_bilin_fn type, dst, d_strd, src, s_strd, w, h, mx, xmx, my, xmy, bdmax, ds2, sr2
function \type\()_bilin_16bpc_neon, export=1
.ifc \bdmax, w8
        ldr             w8,  [sp]
.endif
        dup             v1.8h,   \mx
        dup             v3.8h,   \my
        mov             w10, #16
        sub             w9,  w10, \mx
        sub             w10, w10, \my
        dup             v0.8h,   w9
        dup             v2.8h,   w10
.ifc \type, prep
        uxtw            \d_strd, \w
        lsl             \d_strd, \d_strd, #1
.endif

        clz             \bdmax,   \bdmax       // bitdepth_max
        clz             w9,  \w
        sub             \bdmax,   \bdmax,  #18 // intermediate


of CKEDITOR.ui.dialog.checkbox,
			attributeValue = isCheckbox ? checkboxValues[ this.id ][ value ] : value,
			isRemove = value === '' || ( attributeName === 'tabindex' && value === false );

		if ( isRemove ) {
			iframeNode.removeAttribute( attributeName );
		} else {
			iframeNode.setAttribute( attributeName, attributeValue );
		}
	}

	CKEDITOR.dialog.add( 'iframe', function( editor ) {
		var iframeLang = editor.lang.iframe,
			commonLang = editor.lang.common,
			dialogadvtab = editor.plugins.dialogadvtab;
		return {
			title: iframeLang.title,
			minWidth: 350,
			minHeight: 260,
			getModel: function( editor ) {
				var element = editor.getSelection().getSelectedElement();

				if ( element && element.data( 'cke-real-element-type' ) === 'iframe' ) {
					return element;
				}

				return null;
			},
			onShow: function() {
				// Clear previously saved elements.
				this.fakeImage = this.iframeNode = null;

				var fakeImage = this.getSelectedElement();
				if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'iframe' ) {
					this.fakeImage = fakeImage;

					var iframeNode = editor.restoreRealElement( fakeImage );
					this.iframeNode = iframeNode;

					this.setupContent( iframeNode );
				}
			},
			onOk: function() {
				var iframeNode;
				if ( !this.fakeImage )
					iframeNode = new CKEDITOR.dom.element( 'iframe' );
				else
					iframeNode = this.iframeNode;

				// A subset of the specified attributes/styles
				// should also be applied on the fake element to
				// have better visual effect. (https://dev.ckeditor.com/ticket/5240)
				var extraStyles = {},
					extraAttributes = {};
				this.commitContent( iframeNode, extraStyles, extraAttributes );

				// Refresh the fake image.
				var newFakeImage = editor.createFakeElement( iframeNode, 'cke_iframe', 'iframe', true );
				newFakeImage.setAttributes( extraAttributes );
				newFakeImage.setStyles( extraStyles );
				if ( this.fakeImage ) {
					newFakeImage.replace( this.fakeImage );
					editor.getSelection().selectElement( newFakeImage );
				} else {
					editor.insertElement( newFakeImage );
				}
			},
			contents: [ {
				id: 'info',
				label: commonLang.generalTab,
				accessKey: 'I',
				elements: [ {
					type: 'vbox',
					padding: 0,
					children: [ {
						id: 'src',
						type: 'text',
						label: commonLang.url,
						required: true,
						validate: CKEDITOR.dialog.validate.notEmpty( iframeLang.noUrl ),
						setup: loadValue,
						commit: commitValue
					} ]
				},
				{
					type: 'hbox',
					children: [ {
						id: 'width',
						type: 'text',
						requiredContent: 'iframe[width]',
						style: 'width:100%',
						labelLayout: 'vertical',
						label: common


      isMoreThanHalf = false,
            isPositiveArc = true,
            dx1 = -0.23f,
            dy1 = 0.17f,
        )
        arcTo(
            horizontalEllipseRadius = 1.6f,
            verticalEllipseRadius = 1.6f,
            theta = 0.0f,
            isMoreThanHalf = false,
            isPositiveArc = true,
            x1 = 14.8f,
            y1 = 0.4f,
        )
        curveToRelative(
            dx1 = 0.17f,
            dy1 = -0.5f,
            dx2 = 0.68f,
            dy2 = -0.52f,
            dx3 = 1.62f,
            dy3 = -0.07f,
        )
        arcToRelative(
            a = 3.0f,
            b = 3.0f,
            theta = 0.0f,
            isMoreThanHalf = false,
            isPositiveArc = false,
            dx1 = 0.84f,
            dy1 = 0.28f,
        )
        curveToRelative(
            dx1 = 1.22f,
            dy1 = 0.18f,
            dx2 = 1.34f,
            dy2 = 0.26f,
            dx3 = 1.33f,
            dy3 = 0.9f,
        )
        curveToRelative(
            dx1 = 0.0f,
            dy1 = 0.7f,
            dx2 = -0.43f,
            dy2 = 1.05f,
            dx3 = -0.64f,
            dy3 = 0.52f,
        )
    }
}

val Icons.Rounded.Climbing
    get() = _Climbing

private val _Cube = materialIcon("Icons.Rounded.Cube") {
    materialPath {
        moveTo(11f, 19.425f)
        verticalLineToRelative(-6.85f)
        lineTo(5f, 9.1f)
        verticalLineToRelative(6.85f)
        close()
        moveToRelative(2f, 0f)
        lineToRelative(6f, -3.475f)
        verticalLineTo(9.1f)
        lineToRelative(-6f, 3.475f)
        close()
        moveTo(12f, 10.85f)
        lineTo(17.925f, 7.425f)
        lineTo(12f, 4f)
        lineTo(6.075f, 7.425f)
        close()
        moveTo(4f, 17.7f)
        quadTo(3.525f, 17.425f, 3.2625f, 16.975f)
        quadTo(3f, 16.525f, 3f, 15.975f)
        verticalLineToRelative(-7.95f)
        quadToRelative(0f, -0.55f, 0.2625f, -1f)
        quadTo(3.525f, 6.575f, 4f, 6.3f)
        lineTo(11f, 2.275f)
        quadTo(11.475f, 2f, 12f, 2f)
        quadTo(12.525f, 2f, 13f, 2.275f)
        lineTo(20f, 6.3f)
        quadTo(20.475f, 6.575f, 20.7375f, 7.025f)
        quadTo(21f, 7.475f, 21f, 8.025f)
        verticalLineToRelative(7.95f)
        quadToRelative(0f, 0.55f, -0.2625f, 1f)
        quadTo(20.475f, 17.425f, 20f, 17.7f)
        lineToRelative(-7f, 4.025f)
        quadTo(12.525f, 22f, 12f, 22f)
        quadTo(11.475f, 22f, 11f, 21.725f)
        close()
        moveTo(12f, 12f)
        close()
    }
}

val Icons.Rounded.Cube
    get() = _Cubepackage com.dergoogler.mmrl.ui.component


le: scale,
          ));
          break;
        }
      }
    }
    return list;
  }

  String? getMonster() {
    for (var item in getIt<GameState>().currentList) {
      if (item is Monster) {
        if (item.id == data.name) {
          return item.id;
        }
      }
    }
    return null;
  }

  Widget buildInternal(double scale, double width, Color color) {
    String imagePath = "assets/images/tombstone.png";
    if (data.type == MonsterType.summon) {
      imagePath = "assets/images/summon/${data.gfx}.png";
    } else {
      if (data.roundSummoned != -1) {
        imagePath = "assets/images/summon/green.png";
      }
    }
    String standeeNr = "";
    if (data.standeeNr > 0) {
      standeeNr = data.standeeNr.toString();
    }
    Color? borderColor = color;
    if (data.type == MonsterType.summon) {
      borderColor = Colors.blue;
    }
    BlendMode blendMode = BlendMode.hue;
    if (color == Colors.red) {
      blendMode = BlendMode.modulate;
    }
    if (color == Colors.yellow) {
      borderColor = null;
    }

    var shadow = Shadow(
      offset: Offset(0.4 * scale, 0.4 * scale),
      color: Colors.black87,
      blurRadius: 1 * scale,
    );

    bool ownerIsCurrent = true;
    for (var item in getIt<GameState>().currentList) {
      if (item.id == ownerId) {
        if (item.turnState.value == TurnsState.done) {
          ownerIsCurrent = false;
        }
        break;
      }
    }

    final health = data.health.value;

    return ColorFiltered(
        //gray out if summoned this turn and it's still the character's/monster's turn
        colorFilter: (data.roundSummoned == getIt<GameState>().round.value &&
                ownerIsCurrent)
            ? ColorFilter.matrix(grayScale)
            : ColorFilter.matrix(identity),
        child: Container(
            padding: EdgeInsets.zero,
            height: 30 * scale,
            width: width,
            decoration: BoxDecoration(
              color: Color(int.parse("7A000000", radix: 16)),
              boxShadow: [
                BoxShadow(
                  color: Colors.black45,
                  blurRadius: 4 * scale,
                  offset: Offset(2 * scale, 4 * scale), // Shadow position
                ),
              ],
            ),
            child: Stack(alignment: Alignment.centerLeft, children: [
              Image(
                height: 30 * scale,
                width: 47 * scale,
                fit: BoxFit.fill,
                color: borderColor,
                colorBlendMode: blendMode,
                // (works but not great),// BlendMode.modulate/color (good for boss), //BlendMode.saturation,(not good for bosss)
                //scale up disregarding aspect ratio
                image: const AssetImage("assets/images/psd/monster-box.png"),
              ),
              Container(
                margin: EdgeInsets.only(
                    left: 3 * scale, top: 3 * scale, bottom: 2 * scale),
                child: Image(
                  height: 100 * scale,
                  width: 17 * scale,
                  fit: BoxFit.cover,
                  filterQuality: FilterQuality.medium,
                  image: AssetImage(imagePath),
                ),
              ),
              Positioned(
                width: 22 * scale,
                //baked in edge insets to line up with picture
                top: 1 * scale,
                child


turn (T)Activator.CreateInstance(type, true);
        }

        void ICloner.FillClone(Type type, ref object clone, object original, CloningContext context)
        {
            var _instance = (T)clone;
            FillClone(type, ref _instance, (T)original, context);
            clone = _instance;
        }

        public virtual void FillClone(Type type, ref T clone, T original, CloningContext context) { }

        void ICloner.AfterClone(Type type, object clone)
        {
            AfterClone(type, (T)clone);
        }

        public virtual void AfterClone(Type type, T clone) { }
    }
}


	if unit then
			local unitTarget = unit.."target"
			targetName = self:UnitName(unitTarget)
			destGUID = self:UnitGUID(unitTarget)
		end
		if destGUID and targetName then
			self:TargetMessage(args.spellId, "purple", targetName, msg)
			if self:Me(destGUID) then
				self:PlaySound(args.spellId, "warning", nil, targetName) -- Defensive
			end
		elseif self:Tank() then
			self:Message(args.spellId, "purple", msg)
		end
	end
end

do
	local prev = 0
	function mod:GroundDamage(args)
		if self:Me(args.destGUID) and args.time - prev > 2 then
			prev = args.time
			self:PersonalMessage(args.spellId, "underyou")
			self:PlaySound(args.spellId, "underyou")
		end
	end
end


r\r\n\n")
        str = str.take(1) + "\r\r\n\n" + str.substring(1)
        pieceTable.insert(7, "\r\r\r\r")
        str = str.take(7) + "\r\r\r\r" + str.substring(7)

        assertEquals(pieceTable.getLinesRawContent(), str)
        testLineStarts(str, pieceTable)
        assertTreeInvariants(pieceTable)
    }

    @Test
    fun `random chunk bug 2`() {
        val pieceTable = createPieceTree(listOf("\n\r\n\n\n\r\n\r\n\r\r\n\n\n\r\r\n\r\n"), false)
        var str = "\n\r\n\n\n\r\n\r\n\r\r\n\n\n\r\r\n\r\n"
        pieceTable.insert(16, "\r\n\r\r")
        str = str.take(16) + "\r\n\r\r" + str.substring(16)
        pieceTable.insert(13, "\n\n\r\r")
        str = str.take(13) + "\n\n\r\r" + str.substring(13)
        pieceTable.insert(19, "\n\n\r\n")
        str = str.take(19) + "\n\n\r\n" + str.substring(19)
        pieceTable.delete(5, 0)
        str = str.take(5) + str.substring(5 + 0)
        pieceTable.delete(11, 2)
        str = str.take(11) + str.substring(11 + 2)

        assertEquals(pieceTable.getLinesRawContent(), str)
        testLineStarts(str, pieceTable)
        assertTreeInvariants(pieceTable)
    }

    @Test
    fun `random chunk bug 3`() {
        val pieceTable = createPieceTree(listOf("\r\n\n\n\n\n\n\r\n"), false)
        var str = "\r\n\n\n\n\n\n\r\n"
        pieceTable.insert(4, "\n\n\r\n\r\r\n\n\r")
        str = str.take(4) + "\n\n\r\n\r\r\n\n\r" + str.substring(4)
        pieceTable.delete(4, 4)
        str = str.take(4) + str.substring(4 + 4)
        pieceTable.insert(11, "\r\n\r\n\n\r\r\n\n")
        str = str.take(11) + "\r\n\r\n\n\r\r\n\n" + str.substring(11)
        pieceTable.delete(1, 2)
        str = str.take(1) + str.substring(1 + 2)

        assertEquals(pieceTable.getLinesRawContent(), str)
        testLineStarts(str, pieceTable)
        assertTreeInvariants(pieceTable)
    }

    @Test
    fun `random chunk bug 4`() {
        val pieceTable = createPieceTree(listOf("\n\r\n\r"), false)
        var str = "\n\r\n\r"
        pieceTable.insert(4, "\n\n\r\n")
        str = str.take(4) + "\n\n\r\n" + str.substring(4)
        pieceTable.insert(3, "\r\n\n\n")
        str = str.take(3) + "\r\n\n\n" + str.substring(3)

        assertEquals(pieceTable.getLinesRawContent(), str)
        testLineStarts(str, pieceTable)
        assertTreeInvariants(pieceTable)
    }

    // random is unsupervised
    @Test
    fun `splitting large change buffer`() {
        val pieceTable = createPieceTree(listOf(""), false)
        var str = ""

        pieceTable.insert(0, "WUZ\nXVZY\n


5), MT.Al   .liquid(U* 2, T), MT.Fe   .liquid(U* 2, F), OM.dust(MT.Al2O3 ,U*5));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.Nb2O5                 , U* 7), MT.Al   .liquid(U3*10,T), MT.Al2O3.liquid(U3*25,F), OM.dust(MT.Nb   , U*2));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.K2TaF7                , U*10), MT.Na   .liquid(U* 5, T), NF, OP.gem.mat(MT.Ta, 1), OM.dust(MT.NaF   ,U*10), OM.dust(MT.KF    , U*4));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.NaCl                  , U *4), MT.CaCO3.liquid(U* 5, T), NF, OM.dust(MT.CaCl2, U*3), OM.dust(MT.Na2CO3, U*3), OM.dust(MT.Na2CO3, U*3));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.NaCl                  , U *4), MT.MgCO3.liquid(U* 5, T), NF, OM.dust(MT.MgCl2, U*3), OM.dust(MT.Na2CO3, U*3), OM.dust(MT.Na2CO3, U*3));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.OREMATS.Scheelite     , U *6), MT.HCl   .fluid(U* 4, T), NF, OM.dust(MT.CaCl2, U*3), OM.dust(MT.H2WO4 , U*4), OM.dust(MT.H2WO4 , U*3));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.OREMATS.Wolframite    , U *6), MT.HCl   .fluid(U* 4, T), NF, OM.dust(MT.MgCl2, U*3), OM.dust(MT.H2WO4 , U*4), OM.dust(MT.H2WO4 , U*3));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.OREMATS.Ferberite     , U *6), MT.HCl   .fluid(U* 4, T), NF, OM.dust(MT.FeCl2, U*3), OM.dust(MT.H2WO4 , U*4), OM.dust(MT.H2WO4 , U*3));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.OREMATS.Huebnerite    , U *6), MT.HCl   .fluid(U* 4, T), NF, OM.dust(MT.MnCl2, U*3), OM.dust(MT.H2WO4 , U*4), OM.dust(MT.H2WO4 , U*3));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.OREMATS.Tungstate     , U *7), MT.HCl   .fluid(U* 4, T), NF, OM.dust(MT.LiCl , U*4), OM.dust(MT.H2WO4 , U*7));
		RM.Bath         .addRecipe1(T, 0,   512, ST.make(Blocks.sand              , 1, 1), MT.HCl   .fluid(U*12, T), MT.H2O.liquid(U*9, F), OM.dust(MT.FeCl3, U*2), OM.dust(MT.FeCl3, U*2), OM.dust(MT.FeCl3, U*2), OM.dust(MT.FeCl3, U*2));
		RM.Bath         .addRecipe1(T, 0,   512, OM.dust(MT.RedSand               , U *9), MT.HCl   .fluid(U*12, T), MT.H2O.liquid(U*9, F), OM.dust(MT.FeCl3, U


_SAR_CTRL, (CY_GET_REG32(CYREG_SAR_CTRL) & ~(0x000000F0Lu)) | (0x00000040Lu) | (0x01Lu << 7));
    CyDelayUs(100);

    /* Switch the reference back to VDDA/2 for measuring the REF voltage */
    CY_SET_REG32(CYREG_SAR_CTRL, CY_GET_REG32(CYREG_SAR_CTRL) & ~(0x01 << 7));
    CY_SET_REG32(CYREG_SAR_CTRL, (CY_GET_REG32(CYREG_SAR_CTRL) & ~(0x00000070Lu)) | (0x00000060Lu));

    /* Enable channel 1 of the ADC, disable channel 0 */
    ADC_SetChanMask(0x02);

    /* Clear ADC interrupt triggered flag and start a new conversion */
    canMeasureBattery = false;
    ADC_StartConvert();
    while(true != canMeasureBattery);

    /* Since our ADC reference is VDDA/2, we get full scale (11-bit) at VDDA/2.
     * We can calculate VDDA by the formula:
     * VDDA = (VREF * (Full scale ADC out) * 2) / (ADC out for VREF)
     */
    adcCountsVref = ADC_GetResult16(1);
    if(adcCountsVref != 0)
    {
        vddaVoltageMv = ((uint32)VREF_VOLTAGE_MV * ADC_FULL_SCALE_OUT * 2) / (uint32)adcCountsVref;
    }

    /* Battery level is implemented as a linear plot from 2.0V to 3.0V
     * Battery % level = (0.1 x VDDA in mV) - 200
     */
    batteryLevel = ((uint32)(vddaVoltageMv / 10)) - 200;
    if((batteryLevel > 100) && (batteryLevel < 230))
    {
        batteryLevel = 100;
    }
    else if(batteryLevel >= 230)
    {
        batteryLevel = 0;
    }

    /* Enable channel 0 again, disable channel 1 */
    ADC_SetChanMask(0x01);

    /* Enable bypass cap for the VDDA/2 reference */
    CY_SET_REG32(CYREG_SAR_CTRL, CY_GET_REG32(CYREG_SAR_CTRL) | (0x01 << 7));
}

/* [] END OF FILE */


atter;
                }
                return this.hrefFormer + '_' + n + this.hrefLatter;
            }
        },
            true);
 */
export declare let kkpagerNews: {
    pagerid: string;
    mode: string;
    pno: number;
    total: number;
    totalRecords: number;
    isShowFirstPageBtn: boolean;
    isShowLastPageBtn: boolean;
    isShowPrePageBtn: boolean;
    isShowNextPageBtn: boolean;
    isShowTotalPage: boolean;
    isShowCurrPage: boolean;
    isShowTotalRecords: boolean;
    isGoPage: boolean;
    isWrapedPageBtns: boolean;
    isWrapedInfoTextAndGoPageBtn: boolean;
    isEllipsisLink: boolean;
    isShowLastPage: boolean;
    hrefFormer: string;
    hrefLatter: string;
    gopageWrapId: string;
    gopageButtonId: string;
    gopageTextboxId: string;
    lang: {
        firstPageText: string;
        firstPageTipText: string;
        lastPageText: string;
        lastPageTipText: string;
        prePageText: string;
        prePageTipText: string;
        nextPageText: string;
        nextPageTipText: string;
        totalPageBeforeText: string;
        totalPageAfterText: string;
        currPageBeforeText: string;
        currPageAfterText: string;
        totalInfoSplitStr: string;
        totalRecordsBeforeText: string;
        totalRecordsAfterText: string;
        gopageBeforeText: string;
        gopageButtonOkText: string;
        gopageAfterText: string;
        buttonTipBeforeText: string;
        buttonTipAfterText: string;
    };
    getLink: (n: number) => any;
    click: (n: number) => boolean;
    getHref: (n: number) => string;
    focus_gopage: () => void;
    blur_gopage: () => void;
    keypress_gopage: () => boolean;
    gopage: () => void;
    selectPage: (n: number, config: any) => void;
    generPageHtml: (config: any) => void;
    init: (config: any) => void;
    _getHandlerStr: (n: number) => string;
    _clickHandler: (n: number, config: any) => boolean;
    deepCopy: () => any;
    _deepCopy: (kkpager: any) => any;
    initialize: (data: any) => void;
};
export declare const kkpager: any;
import { useQuery } from 'react-query';
import { fetchClusters, fetchGates, fetchKeyspaces, fetchSchemas, fetchTablets } from '../api/http';
import { vtadmin as pb } from '../proto/vtadmin';

export const useClusters = () => useQuery<pb.Cluster[], Error>(['clusters'], fetchClusters);
export const useGates = () => useQuery<pb.VTGate[], Error>(['gates'], fetchGates);
export const useKeyspaces = () => useQuery<pb.Keyspace[], Error>(['keyspaces'], fetchKeyspaces);
export const useSchemas = () => useQuery<pb.Schema[], Error>(['schemas'], fetchSchemas);
export const useTablets = () => useQuery<pb.Tablet[], Error>(['tablets'], fetchTablets);

export interface TableDefinition {
    cluster?: pb.Schema['cluster'];
    keyspace?: pb.Schema['keyspace'];
    // The [0] index is a typescript quirk to infer the type of
    // an entry in an array, and therefore the type of ALL entries
    // in the array (not just the first one).
    tableDefinition?: pb.Schema['table_definitions'][0];
}

// useTableDefinitions is a helper hook for when a flattened list
// of table definitions (across all keyspaces and clusters) is required,
// instead of the default vtadmin-api/Vitess grouping of schemas by keyspace.
//
// Under the hood, this calls the u


<title>Page Title</title>

	<meta name="viewport" content="width=device-width, initial-scale=1">

	<link rel="stylesheet" href="//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.css" />

Bars - data-icon="bars"

			My button
            Edit - data-icon="edit"

			My button
            Left arrow - data-icon="arrow-l"

			My button

Right arrow - data-icon="arrow-r"

			My button

Up arrow - data-icon="arrow-u"

			My button

Down arrow - data-icon="arrow-d"

			My button

Delete - data-icon="delete"

			My button

Plus - data-icon="plus"

			My button

Minus - data-icon="minus"

			My button

Check - data-icon="check"

			My button

Gear - data-icon="gear"

			My button

Refresh - data-icon="refresh"

			My button

Forward - data-icon="forward"

			My button

Back - data-icon="back"

			My butto


c:{4}:'.format(ith + 1, rdr.render(node.concept),
                                                              type(self.quality_func).name, node.quality,
                                                              node.heuristic))
        print('######## Search Tree ###########\n')

    def update_min_max_horiz_exp(self, node: OENode):
        he = node.h_exp
        # update maximum value
        self.max_he = max(self.max_he, he)

        if self.min_he == he - 1:
            threshold_score = node.heuristic + 1 - node.quality

            for n in reversed(self.heuristic_queue):
                if n == node:
                    continue
                if n.h_exp == self.min_he:
                    """ we can stop instantly when another node with min. """
                    return
                if n.heuristic < threshold_score:
                    """ we can stop traversing nodes when their score is too low. """
                    break
            # inc. minimum since we found no other node which also has min. horiz. exp.
            self.min_he += 1

            # print("minimum horizontal expansion is now %d", self.min_he)

    def clean(self):
        self.heuristic_queue.clear()
        self.best_descriptions.clean()
        self.search_tree.clear()
        self._seen_norm_concepts.clear()
        self.max_he = 0
        self.min_he = 1
        self._learning_problem = None
        self._max_runtime = None
        super().clean()


                                          \
  (LLVM_EXTENSION offsetof(RegisterContextDarwin_x86_64::EXC, reg) +           \
   sizeof(RegisterContextDarwin_x86_64::GPR) +                                 \
   sizeof(RegisterContextDarwin_x86_64::FPU))

// These macros will auto define the register name, alt name, register size,
// register offset, encoding, format and native register. This ensures that the
// register state structures are defined correctly and have the correct sizes
// and offsets.
#define DEFINE_GPR(reg, alt)                                                   \
  #reg, alt, sizeof(((RegisterContextDarwin_x86_64::GPR *) NULL)->reg),        \
                    GPR_OFFSET(reg), eEncodingUint, eFormatHex
#define DEFINE_FPU_UINT(reg)                                                   \
  #reg, NULL, sizeof(((RegisterContextDarwin_x86_64::FPU *) NULL)->reg),       \
                     FPU_OFFSET(reg), eEncodingUint, eFormatHex
#define DEFINE_FPU_VECT(reg, i)                                                \
  #reg #i, NULL,                                                               \
      sizeof(((RegisterContextDarwin_x86_64::FPU *) NULL)->reg[i].bytes),      \
              FPU_OFFSET(reg[i]), eEncodingVector, eFormatVectorOfUInt8,       \
                         {ehframe_dwarf_fpu_##reg##i,                          \
                          ehframe_dwarf_fpu_##reg##i, LLDB_INVALID_REGNUM,     \
                          LLDB_INVALID_REGNUM, fpu_##reg##i },                 \
                          nullptr, nullptr, nullptr, 0
#define DEFINE_EXC(reg)                                                        \
  #reg, NULL, sizeof(((RegisterContextDarwin_x86_64::EXC *) NULL)->reg),       \
                     EXC_OFFSET(reg), eEncodingUint, eFormatHex

#define REG_CONTEXT_SIZE                                                       \
  (sizeof(RegisterContextDarwin_x86_64::GPR) +                                 \
   sizeof(RegisterContextDarwin_x86_64::FPU) +                                 \
   sizeof(RegisterContextDarwin_x86_64::EXC))

// General purpose registers for 64 bit
static RegisterInfo g_register_infos[] = {
    //  Macro auto defines most stuff   EH_FRAME                    DWARF
    //  GENERIC                    PROCESS PLUGIN       LLDB
    //  =============================== ======================
    //  ===================      ========================== ====================
    //  ===================
    {DEFINE_GPR(rax, nullptr),
     {ehframe_dwarf_gpr_rax, ehframe


�，就先放着不理，可是我希望能在某天解开这个谜。\n\n    今天就先专心帮妖精小姐提升等级吧。我这么想，朝做好出发准备的玛莉伸手。\n\n    「那我们走吧，玛莉。你要抓好喔。」\n\n    「好，麻烦你了。能够跳过两个国家的移动技能还真少见呢。只要有心，应该能赚不少钱吧？」\n\n    「没有，我才不想在梦里工作呢。那么……『旅途引路人<Train>』。」\n\n    我发动一天仅能使用一次的技能，景色瞬间变得模糊不清。刚才的草原一晃变成半透明，脚底的地面也倏地消失。\n\n    「呀——……！」\n\n    玛莉又细又长的尖叫传进耳中，我们掉进下一层世界。\n\n    周围仿佛淡出一般变成一片漆黑，横向抱着玛莉的我不久之后降落到坚硬的地面上。或许是因为突然坠落害她吓了一跳，少女紧紧抓住我。她的颤抖自手中传来，我只好拍拍她的肩膀说已经没事了。\n\n    玛莉战战兢兢地抬起头，周围的光景似乎让她有些吃惊。\n\n    四周漆黑一片，看似巨大的洞窟，到处都有洞穴，从中能看到花草树木。仰望那一小块蓝天时，周围缓缓向前加速。前方的光芒朝后方流逝，玛莉跟着看了过去。\n\n    轰隆……！\n\n    在一片漆黑的空间中以猛烈的速度前进，感觉就像是在搭地下铁。话虽如此，从玛莉的头发微微飘动的模样看来，能够看出风与加速并不快。\n\n    她好像终于习惯了，战战兢兢地松开紧紧抓住我的手。\n\n    「哇啊……好厉害……明明一片漆黑，却像是在高速移动。每个商人都看过这种风景吗？」\n\n    「应该有一部分人看过吧。在学到之前要花不少时间，可能要从小就决定当旅行商人才行。」\n\n    我边说边把刚才摘的花收进怀里。抵达石碑后，一定要献上出发地的花，我私下也蛮喜欢这个习俗的。\n\n    如同刚才所说，若是天生的旅行商人，就有可能学会这个


", 39, 3443, 80, 4, 0.33333, "Radar", "RIO Radar Azimuth Scan")
F_14:definePotentiometer("RIO_RADAR_ELE_CENTER", 39, 3446, 81, { -1, 1 }, "Radar", "RIO Radar Elevation Center")
F_14:definePotentiometer("RIO_RADAR_AZI_CENTER", 39, 3447, 82, { -1, 1 }, "Radar", "RIO Radar Azimuth Center")
F_14:defineToggleSwitch("RIO_RADAR_STABI", 39, 3449, 83, "Radar", "RIO Radar Stabilize")
F_14:define3PosTumb("RIO_RADAR_VSL", 39, 3448, 84, "Radar", "RIO Radar VSL Switch")

-- RIO TCS Controls
F_14:define3PosTumb("RIO_TCS_ACQ", devices.TCS, 3495, 87, "TCS", "RIO TCS Acquisition")
F_14:defineToggleSwitch("RIO_TCS_FOV", devices.TCS, 3494, 88, "TCS", "RIO TCS FOV")
F_14:define3PosTumb("RIO_TCS_SLAVE", devices.TCS, 3496, 89, "TCS", "RIO TCS Slave")
F_14:define3PosTumb("RIO_RECORD_PW", devices.TCS, 3617, 90, "TCS", "RIO Record Power")
F_14:defineMultipositionSwitch("RIO_RECORD_MODE", devices.TCS, 3618, 91, 5, 1.0 / 4.0, "TCS", "RIO Record Mode")
F_14:definePotentiometer("RIO_RECORD_RESET", devices.TCS, 3622, 16016, { 0, 1 }, "Radar", "RIO Record Reset")

-- RIO Armament Panel
F_14:defineMultipositionSwitch("RIO_WEAPON_TYPE", 55, 3146, 59, 44, 1.0 / 43.0, "Armament Panel", "RIO Weapon Type Wheel")
F_14:defineTumb("RIO_WEAPON_INTER_10", 55, 3148, 9960, 0.111, { 0, 1 }, nil, false, "Armament Panel", "RIO Weapon Interval x10ms")
F_14:defineTumb("RIO_WEAPON_INTER_100", 55, 3147, 9961, 0.111, { 0, 1 }, nil, false, "Armament Panel", "RIO Weapon Interval x100ms")
F_14:defineTumb("RIO_WEAPON_QUANT_10", 55, 3149, 9962, 0.111, { 0, 1 }, nil, false, "Armament Panel", "RIO Weapon Quantity 10s")
F_14:defineTumb("RIO_WEAPON_QUANTR_1", 55, 3150, 9963, 0.111, { 0, 1 }, nil, false, "Armament Panel", "RIO Weapon Quantity 1s")
F_14:defineMultipositionSwitch("RIO_WEAPON_ATTK_MODE", 55, 3151, 2022, 5, 0.25, "Armament Panel", "RIO Weapon Attack Mode")
F_14:defineMultipositionSwitch("RIO_WEAPON_ELEC_FUSE", 55, 3152, 58, 5, 0.25, "Armament Panel", "RIO Weapon Elec Fuse")
F_14:defineMultipositionSwitch("RIO_WEAPON_MSL_SPD", 55, 3153, 72, 6, 0.2, "Armament Panel", "RIO Weapon Missile Speed Gate")
F_14:define3PosTumb("RIO_WEAPON_SEL_JETT", 55, 3154, 78, "Armament Panel", "RIO Weapon Selective Jettison")
F_14:defineToggleSwitch("RIO_WEAPON_SEL_JET


lean isNewRecord_;
    /**
     * bool is_new_record = 15;
     * @return The isNewRecord.
     */
    @java.lang.Override
    public boolean getIsNewRecord() {
      return isNewRecord_;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (time_ != 0) {
        output.writeUInt32(1, time_);
      }
      if (isSingleMode_ != false) {
        output.writeBool(2, isSingleMode_);
      }
      if (levelId_ != 0) {
        output.writeUInt32(3, levelId_);
      }
      if (isDungeon_ != false) {
        output.writeBool(4, isDungeon_);
      }
      if (reason_ != emu.grasscutter.net.proto.BrickBreakerSettleNotifyOuterClass.BrickBreakerSettleNotify.SettleReason.SETTLE_REASON_TIME_OUT.getNumber()) {
        output.writeEnum(5, reason_);
      }
      if (score_ != 0) {
        output.writeUInt32(10, score_);
      }
      for (int i = 0; i < updateSkillList_.size(); i++) {
        output.writeMessage(12, updateSkillList_.get(i));
      }
      if (galleryId_ != 0) {
        output.writeUInt32(13, galleryId_);
      }
      if (combo_ != 0) {
        output.writeUInt32(14, combo_);
      }
      if (isNewRecord_ != false) {
        output.writeBool(15, isNewRecord_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (time_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, time_);
      }
      if (isSingleMode_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(2, isSingleMode_);
      }
      if (levelId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(3, levelId_);
      }
      if (isDungeon_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(4, isDungeon_);
      }
      if (reason_ != emu.grasscutter.net.proto.BrickBreakerSettleNotifyOuterClass.BrickBreakerSettleNotify.SettleReason.SETTLE_REASON_TIME_OUT.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(5, reason_);
      }
      if (score_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(10, score_);
      }
      for (int i = 0; i < updateSkillList_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(12, updateSkillList_.get(i));
      }
      if (galleryId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(13, galleryId_);
      }
      if (combo_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .compute


www.acouplecooks.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.0' id='jquery-core-js'>
    </script>
    <script src='https://www.acouplecooks.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.3.2'
        id='jquery-migrate-js'></script>
    <link rel="https://api.w.org/" href="https://www.acouplecooks.com/wp-json/" />
    <link rel="alternate" type="application/json" href="https://www.acouplecooks.com/wp-json/wp/v2/posts/144758" />
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://www.acouplecooks.com/xmlrpc.php?rsd" />
    <link rel="wlwmanifest" type="application/wlwmanifest+xml"
        href="https://www.acouplecooks.com/wp-includes/wlwmanifest.xml" />
    <meta name="generator" content="WordPress 5.8.7" />
    <link rel='shortlink' href='https://www.acouplecooks.com/?p=144758' />
    <link rel="alternate" type="application/json+oembed"
        href="https://www.acouplecooks.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.acouplecooks.com%2Foatmeal-recipe%2F" />
    <link rel="alternate" type="text/xml+oembed"
        href="https://www.acouplecooks.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.acouplecooks.com%2Foatmeal-recipe%2F&format=xml" />
    <style>
        :root {
            --mv-create-radius: 3px;
        }
    </style>
    <link rel="manifest" href="https://www.acouplecooks.com/wp-json/wp/v2/web-app-manifest">
    <meta name="theme-color" content="#fff">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">

    <link rel="apple-touch-startup-image"
        href="https://www.acouplecooks.com/wp-content/uploads/2021/06/cropped-favicon-192x192.png">

    <meta name="apple-mobile-web-app-title" content="ACoupleCooks">
    <meta name="application-name" content="ACoupleCooks">
    <style type="text/css">
        .tasty-recipes-rating-solid.tasty-recipes-clip-10 {
            -webkit-clip-path: polygon(0 0, 10% 0, 10% 100%, 0 100%);
            clip-path: polygon(0 0, 10% 0, 10% 100%, 0 100%)
        }

        .tasty-recipes-rating-solid.tasty-recipes-clip-20 {
            -webkit-clip-path: polygon(0 0, 20% 0, 20% 100%, 0 100%);
            clip-path: polygon(0 0, 20% 0, 20% 100%, 0 100%)
        }

        .tasty-recipes-rating-solid.tasty-recipes-clip-30 {
            -webkit-clip-path: polygon(0 0, 30% 0, 30% 100%, 0 100%);
            clip-path: polygon(0 0, 30% 0, 30% 100%, 0 100%)
        }

        .tasty-recipes-rating-solid.tasty-recipes-clip-40 {
            -webkit-clip-path: polygon(0 0, 40% 0, 40% 100%, 0 100%);
            clip-path: polygon(0 0, 40% 0, 40% 100%, 0 100%)
        }

        .tasty-recipes-rating-solid.tasty-recipes-clip-50 {


nu - item:dashboard:user" aria-label="Dashboard" href="https://github.com/dashboard">
        Dashboard

        Pull requests

      Issues

          Marketplace

      Explore

      Mogge

    <form action="/logout" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="


ts a direction in the Unicode bidirectional
	 * algorithm.
	 *
	 * Not every value in this enumeration makes sense for every usage of
	 * `PangoDirection`; for example, the return value of [func#unichar_direction]
	 * and [func#find_base_dir] cannot be %PANGO_DIRECTION_WEAK_LTR or
	 * %PANGO_DIRECTION_WEAK_RTL, since every character is either neutral
	 * or has a strong direction; on the other hand %PANGO_DIRECTION_NEUTRAL
	 * doesn't make sense to pass to [func#itemize_with_base_dir].
	 *
	 * The %PANGO_DIRECTION_TTB_LTR, %PANGO_DIRECTION_TTB_RTL values come from
	 * an earlier interpretation of this enumeration as the writing direction
	 * of a block of text and are no longer used; See `PangoGravity` for how
	 * vertical text is handled in Pango.
	 *
	 * If you are interested in text direction, you should really use fribidi
	 * directly. `PangoDirection` is only retained because it is used in some
	 * public apis.
	 */
	enum Direction {
		/**
		 * A strong left-to-right direction
		 */
		LTR = 0,
		/**
		 * A strong right-to-left direction
		 */
		RTL = 1,
		/**
		 * Deprecated value; treated the
		 *   same as %PANGO_DIRECTION_RTL.
		 */
		TTB_LTR = 2,
		/**
		 * Deprecated value; treated the
		 *   same as %PANGO_DIRECTION_LTR
		 */
		TTB_RTL = 3,
		/**
		 * A weak left-to-right direction
		 */
		WEAK_LTR = 4,
		/**
		 * A weak right-to-left direction
		 */
		WEAK_RTL = 5,
		/**
		 * No direction specified
		 */
		NEUTRAL = 6
	}

	/**
	 * `PangoEllipsizeMode` describes what sort of ellipsization
	 * should be applied to text.
	 *
	 * In the ellipsization process characters are removed from the
	 * text in order to make it fit to a given width and replaced
	 * with an ellipsis.
	 */
	enum EllipsizeMode {
		/**
		 * No ellipsization
		 */
		NONE = 0,
		/**
		 * Omit characters at the start of the text
		 */
		START = 1,
		/**
		 * Omit characters in the middle of the text
		 */
		MIDDLE = 2,
		/**
		 * Omit characters at the end of the text
		 */
		END = 3
	}

	/**
	 * `PangoGravity` represents the orientation of glyphs in a segment
	 * of text.
	 *
	 * This is useful when rendering vertical text layouts. In those situations,
	 * the layout is rotated using a non-identity [struct#Pango.Matrix], and then
	 * glyph orientation is controlled using `PangoGravity`.
	 *
	 * Not every value in this enumeration makes sense for every usage of
	 * `PangoGravity`; for example, %PANGO_GRAVITY_AUTO only can be passed to
	 * [method#Pango.Context.set_base_gravity] and can only be returned by
	 * [method#Pango.Context.get_base_gravity].
	 *
	 * See also: [enum#Pango.GravityHint]
	 */
	enum Gravity {
		/**
		 * Glyphs stand upright (default)
		 */
		SOUTH = 0,
		/**
		 * Glyphs are rotated 90 degrees clockwise
		 */
		EAST = 1,
		/**
		 * Glyphs are upside-down
		 */
		NORTH = 2,
		/**
		 * Glyphs are rotated 90 degrees counter-clockwise
		 */
		WEST = 3,
		/**
		 * Gravity is resolved from the context matrix
		 */
		AUTO = 4
	}

	/**
	 * `PangoGravityHint` defines how horizontal scripts should behave in a
	 * vertical context.
	 *


 {
  it('should create an instance', () => {
    expect(new RequiredValidator('Something')).toBeTruthy();
  });
});

describe('PatternValidator', () => {
  it('should create an instance', () => {
    expect(new PatternValidator('^([0-9]*)$', 'Something')).toBeTruthy();
  });
});

describe('MinLengthValidator', () => {
  it('should create an instance', () => {
    expect(new MinLengthValidator(5, 'Something')).toBeTruthy();
  });
});

describe('MaxLengthValidator', () => {
  it('should create an instance', () => {
    expect(new MaxLengthValidator(5, 'Something')).toBeTruthy();
  });
});
import chalk from 'chalk';

export namespace log {
    export function header(message: string) {
        console.log();
        console.log(prefix() + '  ' + chalk.green.bold.underline(message));
    }

    export function info(...message: any[]) {
        console.log(prefix() + chalk.bgBlue.black.bold('i') + chalk.white(), ...message);
    }

    export function err(...message: any[]) {
        console.log(prefix() + chalk.bgRed.black.bold('!') + chalk.red(), ...message);
    }

    export function warn(...message: any[]) {
        console.log(prefix() + chalk.bgYellow.black.bold('!') + chalk.yellow(), ...message);
    }

    function prefix(): string {
        return chalk.grey('[') + chalk.white(new Date().formatClock(true)) + chalk.grey('] ') + chalk.reset();
    }
}
import { TicTacToe } from "../src/main/tictactoe";

describe("TicTacToe test", () => {

  it("Should returns the position 1,1 in matrix for Player X", () => {
    let tictactoe: TicTacToe = new TicTacToe();
    const position = { posX: 1, posY: 1 }
    const matrix = tictactoe.play('X', position)
    expect(matrix[1][1]).toBe('X')
  })

  it("Should returns the position 2,2 in matrix for Player O", () => {
    let tictactoe: TicTacToe = new TicTacToe();
    const position = { posX: 2, posY: 2 }
    const matrix = tictactoe.play('O', position)
    expect(matrix[2][2]).toBe('O')
  })

  it("Should returns the position 2,2 in matrix for Player X", () => {
    let tictactoe: TicTacToe = new TicTacToe();
    let position = { posX: 2, posY: 2 }
    const matrix = tictactoe.play('O', position)
    expect(tictactoe.play('O', position)).toBe('Position played')
  })

  it("should determine the winner, when we have 3 X's in a row", ()=>{
    let tictactoe: TicTacToe = new TicTacToe();
    tictactoe.play('X', {posX: 0, posY: 0 })
    tictactoe.play('O', {posX: 1, posY: 0 })
    tictactoe.play('X', {posX: 0, posY: 1 })
    tictactoe.play('O', {posX: 1, posY: 1 })
    tictactoe.play('X', {posX: 0, posY: 2 })

    expect(tictactoe.hasAnyBodyWon()).toBe(true)
  })

  it("should determine if nobody won", ()=>{
    let tictactoe: TicTacToe = new TicTacToe();
    tictactoe.play('O', {posX: 0, posY: 0 })
    tictactoe.play('X', {posX: 0, posY: 1 })
    tictactoe.play('O', {posX: 0, posY: 2 })

    tictactoe.play('O', {posX: 1, posY: 0 })
    tictactoe.play('X', {posX: 1


rtEquals(1, new Short((short) 1).shortValue());
    }

    /**
     * java.lang.Short#reverseBytes(short)
     */
    public void test_reverseBytesS() {
        assertEquals((short) 0xABCD, Short.reverseBytes((short) 0xCDAB));
        assertEquals((short) 0x1234, Short.reverseBytes((short) 0x3412));
        assertEquals((short) 0x0011, Short.reverseBytes((short) 0x1100));
        assertEquals((short) 0x2002, Short.reverseBytes((short) 0x0220));
    }

}
/* Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.harmony.tests.java.lang;

import java.util.Arrays;

import junit.framework.TestCase;

public class CharacterTest extends TestCase {

    public void test_isValidCodePointI() {
        assertFalse(Character.isValidCodePoint(-1));
        assertTrue(Character.isValidCodePoint(0));
        assertTrue(Character.isValidCodePoint(1));
        assertFalse(Character.isValidCodePoint(Integer.MAX_VALUE));

        for (int c = '\u0000'; c <= 0x10FFFF; c++) {
            assertTrue(Character.isValidCodePoint(c));
        }

        assertFalse(Character.isValidCodePoint(0x10FFFF + 1));
    }

    public void test_isSupplementaryCodePointI() {
        assertFalse(Character.isSupplementaryCodePoint(-1));

        for (int c = '\u0000'; c <= '\uFFFF'; c++) {
            assertFalse(Character.isSupplementaryCodePoint(c));
        }

        for (int c = 0xFFFF + 1; c <= 0x10FFFF; c++) {
            assertTrue(Character.isSupplementaryCodePoint(c));
        }

        assertFalse(Character.isSupplementaryCodePoint(0x10FFFF + 1));
    }

    public void test_isHighSurrogateC() {
        // (\uD800-\uDBFF)
        assertFalse(Character.isHighSurrogate((char) ('\uD800' - 1)));
        for (int c = '\uD800'; c <= '\uDBFF'; c++) {
            assertTrue(Character.isHighSurrogate((char) c));
        }
        assertFalse(Character.isHighSurrogate((char) ('\uDBFF' + 1)));
        assertFalse(Character.isHighSurrogate('\uFFFF'));
    }

    public void test_isLowSurrogateC() {
        // (\uDC00-\uDFFF)
        assertFalse(Character.isLowSurrogate((char) ('\uDC00' - 1)));
        for (int c = '\uDC00'; c <= '\uDFFF'; c++) {
            assertTrue(Character.isLowSurrogate((char) c));
        }
        assertFalse(Character.isLowSurrogate((char) ('\uDFFF' + 1)));
    }

    public void test_isSurrogatePairCC() {
        assertFalse(Character.isSurrogatePair('\u0000', '\u0000'));
        assertFalse(Character.isSurrogatePair('\u0000', '\uDC00'));

        assertTrue(Character.isSurrogatePair('\uD800', '\uDC00'));
        assertTrue(Character.isSurrogatePair('\uD800', '\uDFFF'));
        assertTrue(Character.isSurrogatePair('\uDBFF', '\uDFFF'));

        assertFalse(Character.isSurrogatePair('\uDBFF', '\uF000'));
    }

    public void test_charCountI() {
        for (int


cute {
        contract_addr: state.anchor_aust_contract.to_string(),
        msg: to_binary(&cw20::Cw20ExecuteMsg::Send {
            contract: state.anchor_market_contract.to_string(),
            amount: aust_balance,
            msg: to_binary(&moneymarket::market::Cw20HookMsg::RedeemStable {})?,
        })?,
        funds: vec![],
    }))
}

pub fn confirm_delivery(
    deps: DepsMut,
    info: MessageInfo,
    env: Env,
) -> Result<Response, ContractError> {
    let state = STATE.load(deps.storage)?;

    // an escrow which has been delivered is not usable
    if matches!(state.escrow_status, EscrowStatus::Delivered) {
        return Err(ContractError::AlreadyDelivered {});
    }

    // only allow buyer to call this
    if info.sender != state.buyer {
        return Err(ContractError::Unauthorized {});
    }

    let mut msgs: Vec<BankMsg> = vec![];

    let total_balance = deps.querier.query_balance(
        env.contract.address.to_string(),
        state.payment_denom.clone(),
    )?;
    // assert if there is enough ust in the system.
    // if there are any losses from anchor we need to pump in the money to make up
    // for the losses as the contract needs to fulfilled
    if total_balance.amount.ne(&state.buyer_payment.amount) {
        return Err(ContractError::FundsNotReceivedFromAnchor {});
    }
    // the remaining accrued interest will be sent back to the buyer.
    let accrued_interest: Uint128 = total_balance
        .amount
        .checked_sub(state.buyer_payment.amount)
        .unwrap_or(Uint128::zero());

    let taxed_buyer_payment = get_taxed_coin(
        deps.as_ref(),
        state.payment_denom.clone(),
        &state.buyer_payment,
    )?;
    msgs.push(BankMsg::Send {
        to_address: state.seller.to_string(),
        amount: vec![taxed_buyer_payment],
    });

    let taxed_interest_payment = get_taxed_coin(
        deps.as_ref(),
        state.payment_denom.clone(),
        &Coin::new(accrued_interest.u128(), state.payment_denom),
    )?;
    msgs.push(BankMsg::Send {
        to_address: state.buyer.to_string(),
        amount: vec![taxed_interest_payment],
    });

    // change the escrow state to delivered
    STATE.update(deps.storage, |mut state| -> Result<_, ContractError> {
        state.escrow_status = EscrowStatus::Delivered;
        Ok(state)
    })?;

    Ok(Response::new().add_messages(msgs))
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult<Binary> {
    match msg {
        QueryMsg::GetState {} => to_binary(&query_state(deps)?),
        QueryMsg::GetPaymentValue {} => to_binary(&query_payment_value(deps, env)?),
    }
}

fn query_payment_value(deps: Deps, env: Env) -> StdResult<PaymentValueResponse> {
    let state = STATE.load(deps.storage)?;
    let aust_amount = get_aust_balance(deps.querier, &env, &state.anchor_aust_contract)?;
    let ust_amount = get_ust_deposited(
        deps.querier,
        &env,
        &state.anchor_aust_contract,
        &state.anchor_market_contract,
    )?;

    Ok(PaymentValueResponse {
        payment_value_res: Some(PaymentValueQueryResponse {
            aust_amount,


, 0, 1, 2, 0, 4, 0, 0, 0, 8, 16, 32, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 1,
                ],
                c: [
                    0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 1, 1, 1,
                ],
                r: [
                    199, 123, 129, 187, 98, 220, 200, 84, 69, 52, 169, 69, 239, 116, 129, 54, 19,
                    231, 107, 167, 4, 33, 71, 87, 236, 240, 0, 113, 70, 120, 168, 0,
                ],
            },
        ];

        for (i, iv) in ivs.iter().enumerate() {
            let out = muladd(
                &Scalar::from_bytes(&iv.a),
                &Scalar::from_bytes(&iv.b),
                &Scalar::from_bytes(&iv.c),
            );
            assert_eq!(iv.r, out.to_bytes(), "IV test {} failed", i);
        }
    }
}
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;

use actix::clock::{delay_for, Duration};
use actix::prelude::*;
use futures_util::future::FutureExt;

struct MyActor {
    timeout: Arc<AtomicBool>,
}

impl Actor for MyActor {
    type Context = actix::Context<Self>;

    fn started(&mut self, ctx: &mut Self::Context) {
        delay_for(Duration::new(0, 5_000_000))
            .then(|_| async {
                System::current().stop();
            })
            .into_actor(self)
            .timeout(Duration::new(0, 100))
            .map(|e, act, _| {
                if e == Err(()) {
                    act.timeout.store(true, Ordering::Relaxed);
                    System::current().stop();
                }
            })
            .wait(ctx);
    }
}

#[test]
fn test_fut_timeout() {
    let timeout = Arc::new(AtomicBool::new(false));
    let timeout2 = Arc::clone(&timeout);

    System::run(move || {
        let _addr = MyActor { timeout: timeout2 }.start();
    })
    .unwrap();

    assert!(timeout.load(Ordering::Relaxed), "Not timeout");
}

struct MyStreamActor {
    timeout: Arc<AtomicBool>,
}

impl Actor for MyStreamActor {
    type Context = actix::Context<Self>;

    fn started(&mut self, ctx: &mut Self::Context) {
        let mut s = futures_util::stream::FuturesOrdered::new();
        s.push(delay_for(Duration::new(0, 5_000_000)));
        s.push(delay_for(Duration::new(0, 5_000_000)));

        s.into_actor(self)
            .timeout(Duration::new(0, 1000))
            .map(|e, act, _| {
                if let Err(()) = e {
                    act.timeout.store(true, Ordering::Relaxed);
                    System::current().stop();
                }
            })
            .finish()
            .wait(ctx)
    }
}

#[test]
fn test_stream_timeout() {
    let timeout = Arc::new(AtomicBool::new(false));
    let timeout2 = Arc::clone(&timeout);

    System::run(|| {
        let _addr = MyStreamActor { timeout: timeout2 }.start();
    })
    .unwrap();

    assert!(timeout.load(Ordering::Relaxed), "Not timeout");
}
// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0.

use std::sync::Arc;

use futures_channel::mpsc;
use futures_executor::block_on;
use futures_timer::Delay;
use futures_util::{join, stream};
use futures_util::{


per.
    const yinBufferLength = bufferSize / 2;
    const yinBuffer = new Float32Array(yinBufferLength);

    let probability = 0,
      tau;

    // Compute the difference function as described in step 2 of the YIN paper.
    for (let t = 0; t < yinBufferLength; t++) {
      yinBuffer[t] = 0;
    }
    for (let t = 1; t < yinBufferLength; t++) {
      for (let i = 0; i < yinBufferLength; i++) {
        const delta = float32AudioBuffer[i] - float32AudioBuffer[i + t];
        yinBuffer[t] += delta * delta;
      }
    }

    // Compute the cumulative mean normalized difference as described in step 3 of the paper.
    yinBuffer[0] = 1;
    yinBuffer[1] = 1;
    let runningSum = 0;
    for (let t = 1; t < yinBufferLength; t++) {
      runningSum += yinBuffer[t];
      yinBuffer[t] *= t / runningSum;
    }

    // Compute the absolute threshold as described in step 4 of the paper.
    // Since the first two positions in the array are 1,
    // we can start at the third position.
    for (tau = 2; tau < yinBufferLength; tau++) {
      if (yinBuffer[tau] < threshold) {
        while (tau + 1 < yinBufferLength && yinBuffer[tau + 1] < yinBuffer[tau]) {
          tau++;
        }
        // found tau, exit loop and return
        // store the probability
        // From the YIN paper: The threshold determines the list of
        // candidates admitted to the set, and can be interpreted as the
        // proportion of aperiodic power tolerated
        // within a periodic signal.
        //
        // Since we want the periodicity and and not aperiodicity:
        // periodicity = 1 - aperiodicity
        probability = 1 - yinBuffer[tau];
        break;
      }
    }

    // if no pitch found, return null.
    if (tau === yinBufferLength || yinBuffer[tau] >= threshold) {
      return null;
    }

    // If probability too low, return -1.
    if (probability < probabilityThreshold) {
      return null;
    }

    /**
     * Implements step 5 of the AUBIO_YIN paper. It refines the estimated tau
     * value using parabolic interpolation. This is needed to detect higher
     * frequencies more precisely. See http://fizyka.umk.pl/nrbook/c10-2.pdf and
     * for more background
     * http://fedc.wiwi.hu-berlin.de/xplore/tutorials/xegbohtmlnode62.html
     */
    let betterTau, x0, x2;
    if (tau < 1) {
      x0 = tau;
    } else {
      x0 = tau - 1;
    }
    if (tau + 1 < yinBufferLength) {
      x2 = tau + 1;
    } else {
      x2 = tau;
    }
    if (x0 === tau) {
      if (yinBuffer[tau] <= yinBuffer[x2]) {
        betterTau = tau;
      } else {
        betterTau = x2;
      }
    } else if (x2 === tau) {
      if (yinBuffer[tau] <= yinBuffer[x0]) {
        betterTau = tau;
      } else {
        betterTau = x0;
      }
    } else {
      const s0 = yinBuffer[x0];
      const s1 = yinBuffer[tau];
      const s2 = yinBuffer[x2];
      // fixed AUBIO implementation, thanks to Karl Helgason:
      // (2.0f * s1 - s2 - s0) was incorrectly multiplied with -1
      betterTau = tau + (s2 - s0) / (2 * (2 * s1 - s2 - s0));
    }

    return sampleRate / betterTau;
  };
}

const {ccclass, property, executionOrder} = cc._decorator;

@ccclass
class Base


self) -> usize {
            self.size
        }
    }
}

#[cfg(all(not(miri), unix))]
pub use _unix::*;
#[cfg(all(not(miri), windows))]
pub use _win::*;

impl Mmap {
    pub fn dontneed_and_zero(&self, page: *mut u8, size: usize) {
        #[cfg(not(miri))]
        {
            if !cfg!(linux) {
                unsafe {
                    memx::memset(std::slice::from_raw_parts_mut(page, size), 0);
                }
            }
        }
        #[cfg(miri)]
        {
            unsafe {
                std::ptr::write_bytes(page, 0, size);
            }
        }
        self.dontneed(page, size);
    }
}

#[cfg(miri)]
pub use _miri::*;
// Copyright 2021 Ferris Project Authors. License user Apache License.

// Modules
// By default, the items in a module have private visibility, but this can be overridden with the
// pub modifier. Only the public items of a module can be accessed from outside the module scope.

mod my {
    pub struct OpenBox<T> {
        pub contents: T,
    }

    #[allow(dead_code)]
    pub struct ClosedBox<T> {
        content: T,
    }

    impl<T> ClosedBox<T> {
        // A public constructor method
        pub fn new(contents: T) -> ClosedBox<T> {
            ClosedBox {
                content: contents,
            }
        }
    }
}

pub fn module() {
    // Public structs with public fields can be constructed as usual
    let open_box = my::OpenBox { contents: "public information" };

    // and their fields can be normally accessed.
    println!("The open box contents: {}", open_box.contents);

    // However, structs with private fields can be created using public constructors.
    let _closed_box = my::ClosedBox::new("classified information");

    // and the private fields of a public struct cannot be accessed.
    // error: aborting due to previous error
    // println!("The closed box contains: {}", _closed_box.contents);
    // TODO ^ Try uncommenting this line

}//! Memory layout of matrices
//!
//! Different from ndarray format which consists of shape and strides,
//! matrix format in LAPACK consists of row or column size and leading dimension.
//!
//! ndarray format and stride
//! --------------------------
//!
//! Let us consider 3-dimensional array for explaining ndarray structure.
//! The address of `(x,y,z)`-element in ndarray satisfies following relation:
//!
//! ```text
//! shape = [Nx, Ny, Nz]
//!     where Nx > 0, Ny > 0, Nz > 0
//! stride = [Sx, Sy, Sz]
//!
//! &data[(x, y, z)] = &data[(0, 0, 0)] + Sx*x + Sy*y + Sz*z
//!     for x < Nx, y < Ny, z < Nz
//! ```
//!
//! The array is called
//!
//! - C-continuous if `[Sx, Sy, Sz] = [Nz*Ny, Nz, 1]`
//! - F(Fortran)-continuous if `[Sx, Sy, Sz] = [1, Nx, Nx*Ny]`
//!
//! Strides of ndarray `[Sx, Sy, Sz]` take arbitrary value,
//! e.g. it can be non-ordered `Sy > Sx > Sz`, or can be negative `Sx < 0`.
//! If the minimum of `[Sx, Sy, Sz]` equals to `1`,
//! the value of elements fills `data` memory region and called "continuous".
//! Non-continuous ndarray is useful to get sub-array without copying data.
//!
//! Matrix layout for LAPACK
//! -----------


2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2M10 4h4v2h-4zm5 11h-2v2c0 .55-.45 1-1 1s-1-.45-1-1v-2H9c-.55 0-1-.45-1-1s.45-1 1-1h2v-2c0-.55.45-1 1-1s1 .45 1 1v2h2c.55 0 1 .45 1 1s-.45 1-1 1"}),"MedicalServicesRounded"),PO1=h(c.jsx("path",{d:"M16 6V2H8v4H2v16h20V6zm-6-2h4v2h-4zm6 11h-3v3h-2v-3H8v-2h3v-3h2v3h3z"}),"MedicalServicesSharp"),BO1=h([c.jsx("path",{d:"M4 20h16V8H4zm4-7h3v-3h2v3h3v2h-3v3h-2v-3H8z",opacity:".3"},"0"),c.jsx("path",{d:"M20 6h-4V4c0-1.1-.9-2-2-2h-4c-1.1 0-2 .9-2 2v2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2M10 4h4v2h-4zm10 16H4V8h16z"},"1"),c.jsx("path",{d:"M11 18h2v-3h3v-2h-3v-3h-2v3H8v2h3z"},"2")],"MedicalServicesTwoTone"),bO1=h(c.jsx("path",{d:"M6 3h12v2H6zm11 3H7c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-1 9h-2.5v2.5h-3V15H8v-3h2.5V9.5h3V12H16z"}),"Medication"),DO1=h(c.jsx("path",{d:"M3 3h12v2H3zm11 3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-1 9h-2.5v2.5h-3V15H5v-3h2.5V9.5h3V12H13zm7-9c-1.68 0-3 1.76-3 4 0 1.77.83 3.22 2 3.76V20c0 .55.45 1 1 1s1-.45 1-1v-6.24c1.17-.54 2-1.99 2-3.76 0-2.24-1.32-4-3-4"}),"MedicationLiquid"),kO1=h(c.jsx("path",{d:"M3 3h12v2H3zM2 21h14V6H2zm3-9h2.5V9.5h3V12H13v3h-2.5v2.5h-3V15H5zm15-6c-1.68 0-3 1.76-3 4 0 1.77.83 3.22 2 3.76V21h2v-7.24c1.17-.54 2-1.99 2-3.76 0-2.24-1.32-4-3-4"}),"MedicationLiquidOutlined"),WO1=h(c.jsx("path",{d:"M4 5h10c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1


  color: #fff;
}
.gsl-scope .gsl-alert {
  position: relative;
  margin-bottom: 20px;
  padding: 15px 29px 15px 15px;
  background: #f8f8f8;
  color: #666;
}
.gsl-scope * + .gsl-alert {
  margin-top: 20px;
}
.gsl-scope .gsl-alert > :last-child {
  margin-bottom: 0;
}
.gsl-scope .gsl-alert-close {
  position: absolute;
  top: 20px;
  right: 15px;
}
.gsl-scope .gsl-alert-close:first-child + * {
  margin-top: 0;
}
.gsl-scope .gsl-alert-primary {
  background: #d8eafc;
  color: #1e87f0;
}
.gsl-scope .gsl-alert-success {
  background: #edfbf6;
  color: #32d296;
}
.gsl-scope .gsl-alert-warning {
  background: #fff6ee;
  color: #faa05a;
}
.gsl-scope .gsl-alert-danger {
  background: #fef4f6;
  color: #f0506e;
}
.gsl-scope .gsl-placeholder {
  margin-bottom: 20px;
  padding: 30px 30px;
  background: #f8f8f8;
}
.gsl-scope * + .gsl-placeholder {
  margin-top: 20px;
}
.gsl-scope .gsl-placeholder > :last-child {
  margin-bottom: 0;
}
.gsl-scope .gsl-badge {
  box-sizing: border-box;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 500px;
  vertical-align: middle;
  background: #1e87f0;
  color: #fff !important;
  font-size: 11px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  line-height: 0;
}
.gsl-scope .gsl-badge:hover {
  text-decoration: none;
}
.gsl-scope .gsl-label {
  display: inline-block;
  padding: 0 10px;
  background: #1e87f0;
  line-height: 1.5;
  font-size: 0.875rem;
  color: #fff;
  vertical-align: middle;
  white-space: nowrap;
}
.gsl-scope .gsl-label-success {
  background-color: #32d296;
  color: #fff;
}
.gsl-scope .gsl-label-warning {
  background-color: #faa05a;
  color: #fff;
}
.gsl-scope .gsl-label-danger {
  background-color: #f0506e;
  color: #fff;
}
.gsl-scope .gsl-overlay {
  padding: 30px 30px;
}
.gsl-scope .gsl-overlay > :last-child {
  margin-bottom: 0;
}
.gsl-scope .gsl-overlay-default {
  background: rgba(255, 255, 255, 0.8);
}
.gsl-scope .gsl-overlay-primary {
  background: rgba(34, 34, 34, 0.8);
}
.gsl-scope .gsl-article {
  display: flow-root;
}
.gsl-scope .gsl-article > :last-child {
  margin-bottom: 0;
}
.gsl-scope .gsl-article + .gsl-article {
  margin-top: 70px;
}
.gsl-scope .gsl-article-title {
  font-size: 2.23125rem;
  line-height:


file_modal_proto_api_proto_msgTypes[209]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

func (x *GenericPayloadType) GetBaseType() ParameterType {
	if x != nil {
		return x.xxx_hidden_BaseType
	}
	return ParameterType_PARAM_TYPE_UNSPECIFIED
}

func (x *GenericPayloadType) GetSubTypes() []*GenericPayloadType {
	if x != nil {
		if x.xxx_hidden_SubTypes != nil {
			return *x.xxx_hidden_SubTypes
		}
	}
	return nil
}

func (x *GenericPayloadType) SetBaseType(v ParameterType) {
	x.xxx_hidden_BaseType = v
}

func (x *GenericPayloadType) SetSubTypes(v []*GenericPayloadType) {
	x.xxx_hidden_SubTypes = &v
}

type GenericPayloadType_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

	BaseType ParameterType
	SubTypes []*GenericPayloadType
}

func (b0 GenericPayloadType_builder) Build() *GenericPayloadType {
	m0 := &GenericPayloadType{}
	b, x := &b0, m0
	_, _ = b, x
	x.xxx_hidden_BaseType = b.BaseType
	x.xxx_hidden_SubTypes = &b.SubTypes
	return m0
}

type GenericResult struct {
	state                        protoimpl.MessageState      `protogen:"opaque.v1"`
	xxx_hidden_Status            GenericResult_GenericStatus `protobuf:"varint,1,opt,name=status,proto3,enum=modal.client.GenericResult_GenericStatus"`
	xxx_hidden_Exception         string                      `protobuf:"bytes,2,opt,name=exception,proto3"`
	xxx_hidden_Exitcode          int32                       `protobuf:"varint,3,opt,name=exitcode,proto3"`
	xxx_hidden_Traceback         string                      `protobuf:"bytes,4,opt,name=traceback,proto3"`
	xxx_hidden_SerializedTb      []byte                      `protobuf:"bytes,11,opt,name=serialized_tb,json=serializedTb,proto3"`
	xxx_hidden_TbLineCache       []byte                      `protobuf:"bytes,12,opt,name=tb_line_cache,json=tbLineCache,proto3"`
	xxx_hidden_DataOneof         isGenericResult_DataOneof   `protobuf_oneof:"data_oneof"`
	xxx_hidden_PropagationReason string                      `protobuf:"bytes,13,opt,name=propagation_reason,json=propagationReason,proto3"`
	unknownFields                protoimpl.UnknownFields
	sizeCache                    protoimpl.SizeCache
}

func (x *GenericResult) Reset() {
	*x = GenericResult{}
	mi := &file_modal_proto_api_proto_msgTypes[210]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GenericResult) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GenericResult) ProtoMessage() {}

func (x *GenericResult) ProtoReflect() protoreflect.Message {
	mi := &file_modal_proto_api_proto_msgTypes[210]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(


rs)) {
      return;
    }
    List<Peer> tmpPeers = List.empty(growable: true);
    if (!await _getPeers(tmpPeers)) {
      return;
    }
    // me first
    var index = tmpUsers
        .indexWhere((user) => user.name == gFFI.userModel.userName.value);
    if (index != -1) {
      var user = tmpUsers.removeAt(index);
      tmpUsers.insert(0, user);
    }
    users.value = tmpUsers;
    if (!users.any((u) => u.name == selectedUser.value)) {
      selectedUser.value = '';
    }
    // recover online
    final oldOnlineIDs = peers.where((e) => e.online).map((e) => e.id).toList();
    peers.value = tmpPeers;
    peers
        .where((e) => oldOnlineIDs.contains(e.id))
        .map((e) => e.online = true)
        .toList();
    groupLoadError.value = '';
  }

  Future<bool> _getUsers(List<UserPayload> tmpUsers) async {
    final api = "${await bind.mainGetApiServer()}/api/users";
    try {
      var uri0 = Uri.parse(api);
      final pageSize = 100;
      var total = 0;
      int current = 0;
      do {
        current += 1;
        var uri = Uri(
            scheme: uri0.scheme,
            host: uri0.host,
            path: uri0.path,
            port: uri0.port,
            queryParameters: {
              'current': current.toString(),
              'pageSize': pageSize.toString(),
              'accessible': '',
              'status': '1',
            });
        final resp = await http.get(uri, headers: getHttpHeaders());
        _statusCode = resp.statusCode;
        Map<String, dynamic> json =
            _jsonDecodeResp(utf8.decode(resp.bodyBytes), resp.statusCode);
        if (json.containsKey('error')) {
          if (json['error'] == 'Admin required!' ||
              json['error']
                  .toString()
                  .contains('ambiguous column name: status')) {
            throw translate('upgrade_rustdesk_server_pro_to_{1.1.10}_tip');
          } else {
            throw json['error'];
          }
        }
        if (resp.statusCode != 200) {
          throw 'HTTP ${resp.statusCode}';
        }
        if (json.containsKey('total')) {
          if (total == 0) total = json['total'];
          if (json.containsKey('data')) {
            final data = json['data'];
            if (data is List) {
              for (final user in data) {
                final u = UserPayload.fromJson(user);
                int index = tmpUsers.indexWhere((e) => e.name == u.name);
                if (index < 0) {
                  tmpUsers.add(u);
                } else {
                  tmpUsers[index] = u;
                }
              }
            }
          }
        }
      } while (current * pageSize < total);
      return true;
    } catch (err) {
      debugPrint('get accessible users: $err');
      groupLoadError.value =
          '${translate('pull_group_failed_tip')}: ${translate(err.toString())}';
    }
    return false;
  }

  Future<bool> _getPeers(List<Peer> tmpPeers) async {
    try {
      final api = "${await bind.mainGetApiServer()}/api/peers";
      var uri0 = Uri.parse(api);
      final pageSize = 100;
      var total = 0;
      int current = 0;
      do {
        current += 1;
        var queryParameters = {
          'current': current.toString(),
          'pageSize


{
		newmaxplayers	= defaultmaxplayers;
	}

	newmaxplayers = clamp( newmaxplayers, minmaxplayers, m_nMaxClientsLimit );

	if ( ( CL_IsHL2Demo() || CL_IsPortalDemo() ) && !IsDedicated() )
	{
		newmaxplayers = 1;
		m_nMaxClientsLimit = 1;
	}

	SetMaxClients( newmaxplayers );
}

//-----------------------------------------------------------------------------
// Purpose: Changes the maximum # of players allowed on the server.
//  Server cannot be running when command is issued.
//-----------------------------------------------------------------------------
CON_COMMAND( maxplayers, "Change the maximum number of players allowed on this server." )
{
	if ( args.ArgC () != 2 )
	{
		ConMsg ("\"maxplayers\" is \"%u\"\n", sv.GetMaxClients() );
		return;
	}

	if ( sv.IsActive() )
	{
		ConMsg( "Cannot change maxplayers while the server is running\n");
		return;
	}

	sv.SetMaxClients( Q_atoi( args[ 1 ] ) );
}

int SV_BuildSendTablesArray( ServerClass *pClasses, SendTable **pTables, int nMaxTables )
{
        int nTables = 0;

        for( ServerClass *pCur=pClasses; pCur; pCur=pCur->m_pNext )
        {
                ErrorIfNot( nTables < nMaxTables, ("SV_BuildSendTablesArray: too many SendTables!") );
                pTables[nTables] = pCur->m_pTable;
                ++nTables;
        }

        return nTables;
}

// Builds an alternate copy of the datatable for any classes that have datatables with props excluded.
void SV_InitSendTables( ServerClass *pClasses )
{
	SendTable *pTables[MAX_DATATABLES];
	int nTables = SV_BuildSendTablesArray( pClasses, pTables, ARRAYSIZE( pTables ) );

	SendTable_Init( pTables, nTables );
}

void SV_TermSendTables( ServerClass *pClasses )
{
	SendTable_Term();
}

//-----------------------------------------------------------------------------
// Purpose: returns which games/mods we're allowed to play
//-----------------------------------------------------------------------------
struct ModDirPermissions_t
{
	int m_iAppID;
	const char *m_pchGameDir;
};

static ModDirPermissions_t g_ModDirPermissions[] =
{
	{ GetAppSteamAppId( k_App_CSS ),        GetAppModName( k_App_CSS ) },
	{ GetAppSteamAppId( k_App_DODS ),       GetAppModName( k_App_DODS ) },
	{ GetAppSteamAppId( k_App_HL2MP ),      GetAppModName( k_App_HL2MP ) },
	{ GetAppSteamAppId( k_App_LOST_COAST ), GetAppModName( k_App_LOST_COAST ) },
	{ GetAppSteamAppId( k_App_HL1DM ),      GetAppModName( k_App_HL1DM ) },
	{ GetAppSteamAppId( k_App_PORTAL ),     GetAppModName( k_App_PORTAL ) },
	{ GetAppSteamAppId( k_App_HL2 ),        GetAppModName( k_App_HL2 ) },
	{ GetAppSteamAppId( k_App_HL2_EP1 ),    GetAppModName( k_App_HL2_EP1 ) },
	{ GetAppSteamAppId( k_App_HL2_EP2 ),    GetAppModName( k_App_HL2_EP2 ) },
	{ GetAppSteamAppId( k_App_TF2 ),        GetAppModName( k_App_TF2 ) },
};

bool ServerDLL_Load()
{
	// Load in the game .dll
	LoadEntityDLLs( GetBaseDirectory() );
	return true;
}

void ServerDLL_Unload


 model models.Strategy, securityCode string, priceType PriceType, price float64, volume int) (int, error) {
	strategyName := models.QmtStrategyName(model)
	orderRemark := models.QmtOrderRemark(model)
	return DirectOrder(direction, strategyName, orderRemark, securityCode, priceType, price, volume)
}

// 直接下单(透传)
func DirectOrder(direction Direction, strategyName, orderRemark, securityCode string, priceType PriceType, price float64, volume int) (int, error) {
	_, mflag, symbol := exchange.DetectMarket(securityCode)
	params := urlpkg.Values{
		"direction":  {direction.String()},
		"code":       {fmt.Sprintf("%s.%s", symbol, strings.ToUpper(mflag))},
		"price_type": {fmt.Sprintf("%d", priceType)},
		"price":      {fmt.Sprintf("%f", price)},
		"volume":     {fmt.Sprintf("%d", volume)},
		"strategy":   {strategyName},
		"remark":     {orderRemark},
	}
	body := params.Encode()
	logger.Infof("trader-order: %s", body)
	data, err := http.Post(urlPlaceOrder, body)
	if err != nil {
		logger.Errorf("trader-order: 下单操作异常: %+v", err)
		return -1, err
	}
	var detail OrderResult
	err = json.Unmarshal(data, &detail)
	if err != nil {
		logger.Errorf("trader-order: 解析json异常: %+v", err)
		return -1, err
	}
	logger.Infof("trade-order: %s, response: order_id=%d", body, detail.OrderId)
	return detail.OrderId, nil
}

// 计算策略标的的可用资金
func CalculateFundForStrategy(model models.Strategy) float64 {
	strategyCode := model.Code()
	rule := config.GetStrategyParameterByCode(strategyCode)
	if rule == nil {
		return InvalidFee
	}
	fund := CalculateAvailableFund(rule)
	return fund
}
package services

import (
	"fmt"
	"os"
	"path/filepath"
	"time"

	"gitee.com/quant1x/engine/cache"
	"gitee.com/quant1x/exchange"
	"gitee.com/quant1x/gox/api"
)

const (
	// 状态文件时间格式
	timeLayoutOfState = "150405"
)

func stateFilename(date, timestamp string) string {
	date = exchange.FixTradeDate(date)
	t, _ := time.ParseInLocation(exchange.CN_SERVERTIME_FORMAT, timestamp, time.Local)
	timestamp = t.Format(timeLayoutOfState)
	tm := date + "T" + timestamp
	filename := fmt.Sprintf("%s/update.%s", cache.GetVariablePath(), tm)
	return filename
}

// 状态文件不存在则可更新, 反之不可更新
func checkUpdateState(date, timestamp string) bool {
	filename := stateFilename(date, timestamp)
	return !api.FileExist(filename)
}

// 确定完成当期更新状态
func doneUpdate(date, timestamp string) {
	filename := stateFilename(date, timestamp)
	file, err := os.Create(filename)
	if err != nil {
		return
	}


if err != nil {
		w.Write([]byte(err.Error()))
		w.WriteHeader(500)
		return
	}

	switch r.Header.Get("output-format") {
	case "table":
		w.Header().Set("Content-Type", "text/html")
	default:
		w.Header().Set("Content-Type", "application/json")
	}

	w.Write([]byte(output))
}

func nodeListHandler(w http.ResponseWriter, r *http.Request) {
	fieldsInput := helpers.DeleteEmpty(strings.Split(r.URL.Path, "/"))
	if len(fieldsInput) == 0 {
		w.Header().Set("Location", "/node/list/name/status/SchedulingEligibility/drain/class?"+r.URL.RawQuery)
		w.WriteHeader(302)
		return
	}

	output, err := node.ListWeb(log.New(), r)
	if err != nil {
		w.Write([]byte(err.Error()))
		w.WriteHeader(500)
		return
	}

	switch r.Header.Get("output-format") {
	case "table":
		w.Header().Set("Content-Type", "text/html")
	default:
		w.Header().Set("Content-Type", "application/json")
	}

	w.Write([]byte(output))
}

func nodeDiscoverHandler(w http.ResponseWriter, r *http.Request) {
	output, err := node.DiscoverWeb(log.New(), r)
	if err != nil {
		w.Write([]byte(err.Error()))
		w.WriteHeader(500)
		return
	}

	switch r.Header.Get("output-format") {
	case "table":
		w.Header().Set("Content-Type", "text/html")
	default:
		w.Header().Set("Content-Type", "application/json")
	}

	w.Write([]byte(output))
}

// Copied from https://github.com/buildkite/terminal-to-html/blob/master/assets/terminal.css
const htmlStylesheet = `
body {
  background: #171717;
  color: white;
  word-break: break-word;
  overflow-wrap: break-word;
  font-family: "SFMono-Regular", Monaco, Menlo, Consolas, "Liberation Mono", Courier, monospace;
  font-size: 14px;
  line-height: 20px;
  padding: 14px 18px;
  white-space: pre-wrap;
}

img { max-width: 100%; }

a { color: inherit; text-decoration: underline; text-decoration-style: dashed; }
a:hover { color: #2882F9 }

@keyframes blink-animation {
  to {
    visibility: hidden;
  }
}

.term-fg1 { } /* don't bold beccause it looks weird */
.term-fg2 { color: #838887; } /* faint (decreased intensity) - same as gray really */
.term-fg3 { font-style: italic; } /* italic */
.term-fg4 { text-decoration: underline; } /* underline */
.term-fg5 { animation: blink-animation 1s steps(3, start) infinite; } /* blink */
.term-fg9 { text-decoration: line-through; } /* crossed-out */

.term-fg30 { color: #666666; } /* black (but we can't use black, so a diff color) */
.term-f


unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (State != global::Google.Cloud.Translate.V3.BatchTranslateDocumentMetadata.Types.State.Unspecified) {
        output.WriteRawTag(8);
        output.WriteEnum((int) State);
      }
      if (TotalPages != 0L) {
        output.WriteRawTag(16);
        output.WriteInt64(TotalPages);
      }
      if (TranslatedPages != 0L) {
        output.WriteRawTag(24);
        output.WriteInt64(TranslatedPages);
      }
      if (FailedPages != 0L) {
        output.WriteRawTag(32);
        output.WriteInt64(FailedPages);
      }
      if (TotalBillablePages != 0L) {
        output.WriteRawTag(40);
        output.WriteInt64(TotalBillablePages);
      }
      if (TotalCharacters != 0L) {
        output.WriteRawTag(48);
        output.WriteInt64(TotalCharacters);
      }
      if (TranslatedCharacters != 0L) {
        output.WriteRawTag(56);
        output.WriteInt64(TranslatedCharacters);
      }
      if (FailedCharacters != 0L) {
        output.WriteRawTag(64);
        output.WriteInt64(FailedCharacters);
      }
      if (TotalBillableCharacters != 0L) {
        output.WriteRawTag(72);
        output.WriteInt64(TotalBillableCharacters);
      }
      if (submitTime_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(SubmitTime);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (State != global::Google.Cloud.Translate.V3.BatchTranslateDocumentMetadata.Types.State.Unspecified) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State);
      }
      if (TotalPages != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(TotalPages);
      }
      if (TranslatedPages != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(TranslatedPages);
      }
      if (FailedPages != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(FailedPages);
      }
      if (TotalBillablePages != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(TotalBillablePages);
      }
      if (TotalCharacters != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(TotalCharacters);
      }
      if (TranslatedCharacters != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(TranslatedCharacters);
      }
      if (FailedCharacters != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(FailedCharacters);
      }
      if (TotalBillableCharacters != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(TotalBillableCharacters);
      }
      if (submitTime_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(SubmitTime);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.Debugger


     stp     x10, x11, [y_3+32]
        stp     x12, x13, [z_3]
        stp     x14, x15, [z_3+16]
        stp     x16, x17, [z_3+32]

// Restore stack and registers

        CFI_INC_SP(NSPACE)

        CFI_POP2(x25,x26)
        CFI_POP2(x23,x24)
        CFI_POP2(x21,x22)
        CFI_POP2(x19,x20)

        CFI_RET

S2N_BN_SIZE_DIRECTIVE(p384_montjmixadd)

#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack, "", %progbits
#endif


C
_02000310:
	.byte 0xD6, 0x4B, 0x9C, 0x7C, 0x54, 0x0F, 0xE4, 0xC2, 0x67, 0xCC, 0x4F, 0x99, 0xE1, 0x18, 0x00, 0x7D
	.byte 0xAE, 0x29, 0x19, 0xDC, 0x8E, 0x19, 0xF7, 0x4A, 0x2C, 0xA7, 0xA4, 0xB2, 0xD9, 0xA8, 0xC1, 0xE9
	.byte 0xDB, 0x94, 0x9C, 0x71, 0x15, 0xD3, 0x0F, 0x08, 0x13, 0xBE, 0x76, 0x3B, 0xAD, 0xFB, 0x83, 0x54
	.byte 0x91, 0x30, 0x8B, 0x4C, 0x1C, 0x03, 0x94, 0x78, 0x4A, 0xD0, 0x8E, 0xE3, 0xAD, 0x25, 0x18, 0x6A
	.byte 0xD5, 0xB5, 0x5D, 0x19, 0x75, 0xC7, 0x25, 0x21, 0x42, 0x81, 0xF7, 0xD1, 0x0E, 0x85, 0x68, 0x17
	.byte 0x1D, 0x16, 0xAC, 0x1D, 0xCB, 0x87, 0xA1, 0x67, 0x06, 0xF9, 0xFB, 0x79, 0x34, 0x2F, 0xE3, 0xB6
	.byte 0x76, 0x9A, 0x36, 0xDB, 0x3C, 0xBE, 0xD2, 0x76

	thumb_func_start sub_02000378
sub_02000378: ; 0x02000378
	swi 0x10
	bx lr
	thumb_func_end sub_02000378
_0200037C:
	.byte 0x4E, 0x1C, 0xEA, 0xFF
	.byte 0xD4, 0xA8, 0x68, 0x8E, 0x6C, 0xE7, 0x8E, 0x88, 0xC7, 0x1B, 0x6A, 0x83, 0x79, 0xBE, 0x0E, 0x39
	.byte 0xB1, 0xE4, 0xEE, 0xC9, 0xBA, 0x8A, 0x65, 0x1B, 0x14, 0x01, 0x4A, 0x3F, 0x8A, 0x15, 0xCD, 0x0F
	.byte 0x99, 0xBC, 0xD3, 0x1A, 0x80, 0xFA, 0xDB, 0x81, 0x61, 0x47, 0xEE, 0x90, 0x3E, 0x5D, 0x70, 0xF7
	.byte 0xCC, 0x7A, 0x63, 0xE3, 0xBE, 0xC3, 0x8B, 0x53, 0x24, 0x50, 0xE5, 0xBF, 0xA9, 0x0D, 0x06, 0xD5
	.byte 0xF8, 0xA5, 0x98, 0x6D, 0x30, 0x8F, 0x49, 0x27, 0xFD, 0xCF, 0xE3, 0xE7, 0xED, 0x70, 0x9E, 0x18
	.byte 0xA7, 0x77, 0xC4, 0x3C, 0xBB, 0x6A, 0xBE, 0x8D, 0x2D, 0x96, 0x42, 0xD9, 0x1A, 0x79, 0x51, 0x43
	.byte 0x8A, 0x15, 0x4E, 0x9B, 0xE3, 0x2C, 0xC9, 0xD0, 0xA3, 0x80, 0


34 6.13401 11 10 11C13.866 11 17 14.134 17 18H3Z" fill="#4A5568"/>
</svg>

<svg   viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">

<path d="M9 6C9 7.65685 7.65685 9 6 9C4.34315 9 3 7.65685 3 6C3 4.34315 4.34315 3 6 3C7.65685 3 9 4.34315 9 6Z" fill="#4A5568"/>
<path d="M17 6C17 7.65685 15.6569 9 14 9C12.3431 9 11 7.65685 11 6C11 4.34315 12.3431 3 14 3C15.6569 3 17 4.34315 17 6Z" fill="#4A5568"/>
<path d="M12.9291 17C12.9758 16.6734 13 16.3395 13 16C13 14.3648 12.4393 12.8606 11.4998 11.6691C12.2352 11.2435 13.0892 11 14 11C16.7614 11 19 13.2386 19 16V17H12.9291Z" fill="#4A5568"/>
<path d="M6 11C8.76142 11 11 13.2386 11 16V17H1V16C1 13.2386 3.23858 11 6 11Z" fill="#4A5568"/>
</svg>

<svg   viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.6485 3.08366C5.15459 3.30478 5.3856 3.89429 5.16448 4.40038C4.41582 6.11389 4 8.00707 4 10C4 11.9929 4.41582 13.8861 5.16448 15.5996C5.3856 16.1057 5.15459 16.6952 4.6485 16.9164C4.14242 17.1375 3.5529 16.9065 3.33178 16.4004C2.47486 14.4391 2 12.2737 2 10C2 7.72632 2.47486 5.56091 3.33178 3.59964C3.5529 3.09355 4.14242 2.86254 4.6485 3.08366ZM12.9613 7C12.0499 7 11.188 7.41427 10.6186 8.12592L10.2911 8.53528L10.1799 8.25722C9.87619 7.4979 9.14078 7 8.32297 7H8C7.44772 7 7 7.44772 7 8C7 8.55228 7.44772 9 8 9H8.32297L8.8551 10.3303L7.81962 11.6247C7.62985 11.8619 7.34253 12 7.03875 12H7C6.44772 12 6 12.4477 6 13C6 13.5523 6.44772 14 7 14H7.03875C7.9501 14 8.81204 13.5857 9.38136 12.8741L9.70885 12.4647L9.82008 12.7428C10.1238 13.5021 10.8592 14 11.677 14H12C12.5523 14 13 13.5523 13 13C13 12.4477 12.5523 12 12 12H11.677L11.1449 10.6697L12.1804 9.37531C12.3702 9.13809 12.6575 9 12.9613 9H13C13.5523 9 14 8.55228 14 8C14 7.44772 13.5523 7 13 7H12.9613ZM14.8355 4.40038C14.6144 3.89429 14.8454 3.30478 15.3515 3.08366C15.8576 2.86254 16.4471 3.09355 16.6682 3.59964C17.5251 5.56091 18 7.72632 18 10C18 12.27


n_count = k;
  }

  END_CODE();
}

template<>
void InvMINRES(const LinearOperatorArray<LatticeFermion>& A,
	       const multi1d<LatticeFermion>& chi,
	       multi1d<LatticeFermion>& psi,
	       const Real& RsdCG,
	       int MaxCG,
	       int& n_count)
{
  InvMINRES_a(A, chi, psi, RsdCG, MaxCG, n_count);
}

}  // end namespace Chroma
/*! \file
 *  \brief Solve a MdagM*psi=chi linear system by CG2
 */

#include "actions/ferm/invert/syssolver_mdagm_factory.h"
#include "actions/ferm/invert/syssolver_mdagm_aggregate.h"
#include "actions/ferm/invert/syssolver_richardson_clover_params.h"
#include "actions/ferm/invert/syssolver_mdagm_cg_lf_clover.h"

namespace Chroma
{

  //! CG2 system solver namespace
  namespace MdagMSysSolverCGLFCloverEnv
  {
    //! Anonymous namespace
    namespace
    {
      //! Name to be used
      const std::string name("SINGLE_PREC_CG_CLOVER_INVERTER");

      //! Local registration flag
      bool registered = false;
    }

    //! Callback function
    MdagMSystemSolver<LatticeFermion>* createFerm(XMLReader& xml_in,
						  const std::string& path,
						  Handle< FermState< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > > state,

						  Handle< LinearOperator<LatticeFermion> > A)
    {
      return new MdagMSysSolverCGLFClover(A, state,SysSolverCGCloverParams(xml_in, path));
    }

    //! Register all the factories
    bool registerAll()
    {
      bool success = true;
      if (! registered)
      {
	success &= Chroma::TheMdagMFermSystemSolverFactory::Instance().registerObject(name, createFerm);
	registered = true;
      }
      return success;
    }
  }
}
/*! \file
 *  \brief Solve a M*psi=chi linear system by MR
 */

#include "actions/ferm/invert/syssolver_linop_factory.h"
#include "actions/ferm/invert/syssolver_linop_aggregate.h"

#include "actions/ferm/invert/syssolver_linop_ibicgstab.h"

namespace Chroma
{

  //! MR system solver namespace
  namespace LinOpSysSolverIBiCGStabEnv
  {
    //! Callback function
    LinOpSystemSolver<LatticeFermion>* createFerm(XMLReader& xml_in,
						  const std::string& path,
						  Handle< FermState< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > > state,
						  Handle< LinearOperator<LatticeFermion> > A)
    {
      return new LinOpSysSolverIBiCGStab<LatticeFermion>(A, SysSolverBiCGStabParams(xml_in, path));
    }

    //! Callback function
    LinOpSystemSolver<LatticeFermionF>* createFermF(XMLReader& xml_in,
						  const std::string& path,


d out that it had learned Only Yesterday by itself (Missing Time in the translation) - this gave the whales a call that they could locate each other by.

In Peter Milligan's metaphysical comic Animal Man, Schrödinger's Cat is explained using a theory of pizza delivery mix-ups, resulting in both pepperoni and plain pizzas occupying the unopened box.

Television[edit]

The character Quinn in the series Sliders has a pet cat named Schrödinger. In the pilot episode (1995), Quinn cannot bear the idea of sending his cat into a machine he invented because he's afraid that something bad might happen and decides it is better to go inside himself.

In the Stargate SG-1 episode, "Enigma" (1998), Samantha Carter gives a pet cat named Schrödinger to Narim. After explaining the name Schrödinger, Narim comments that his society calls that concept Kulivrian physics. Narim's response to Carter's inquiry about whether or not he has studied it is: "Yes, I've studied it...among other misconceptions of elementary science."[4]

In the Futurama episode, "Mars University" (1999), Professor Farnsworth is lecturing on the effects of quantum neutrino fields and the blackboard behind him displays an explanation of "Superdupersymmetric String Theory" and a diagram explaining "Witten's Dog". Witten's Dog, named after Ed Witten, is a parody of the classic Schrödinger's cat paradox. Astrophysicist David Schiminovich created both the equations and the diagram, based on "an equation that constrains the mass density of neutrinos in the universe".[5] Also the episode, "Law and Oracle" (2011), features an extended car chase scene in which Police Officer Fry apprehends Erwin Schrödinger, who is transporting a box containing "a cat, some poison and a cesium atom." When asked if the cat is alive or dead, Schrödinger responds that "it is a superposition of both states, until you open it and collapse the wave