ExpressionSet{
					"attr-1": newMatchExpression(nfdv1alpha1.MatchIn, "val-1"),
				},
			},
		},
	}
	m, err = Execute(r3, f, true)
	assert.Nilf(t, err, "unexpected error: %v", err)
	assert.Nil(t, m.Labels, "instances should not have matched")

	(*r3.MatchFeatures[0].MatchExpressions)["key-1"] = newMatchExpression(nfdv1alpha1.MatchIn, "val-1")
	m, err = Execute(r3, f, true)
	assert.Nilf(t, err, "unexpected error: %v", err)
	assert.Equal(t, r3.Labels, m.Labels, "instances should have matched")

	// Test MatchAny
	r3.MatchAny = []nfdv1alpha1.MatchAnyElem{
		{
			MatchFeatures: nfdv1alpha1.FeatureMatcher{
				nfdv1alpha1.FeatureMatcherTerm{
					Feature: "domain-1.kf-1",
					MatchExpressions: &nfdv1alpha1.MatchExpressionSet{
						"key-na": newMatchExpression(nfdv1alpha1.MatchExists),
					},
				},
			},
		},
	}
	m, err = Execute(r3, f, true)
	assert.Nilf(t, err, "unexpected error: %v", err)
	assert.Nil(t, m.Labels, "instances should not have matched")

	r3.MatchAny = append(r3.MatchAny,
		nfdv1alpha1.MatchAnyElem{
			MatchFeatures: nfdv1alpha1.FeatureMatcher{
				nfdv1alpha1.FeatureMatcherTerm{
					Feature: "domain-1.kf-1",
					MatchExpressions: &nfdv1alpha1.MatchExpressionSet{
						"key-1": newMatchExpression(nfdv1alpha1.MatchExists),
					},
				},
			},
		})
	(*r3.MatchFeatures[0].MatchExpressions)["key-1"] = newMatchExpression(nfdv1alpha1.MatchIn, "val-1")
	m, err = Execute(r3, f, true)
	assert.Nilf(t, err, "unexpected error: %v", err)
	assert.Equal(t, r3.Labels, m.Labels, "instances should have matched")
}

func TestTemplating(t *testing.T) {
	f := &nfdv1alpha1.Features{
		Flags: map[string]nfdv1alpha1.FlagFeatureSet{
			"domain_1.kf_1": {
				Elements: map[string]nfdv1alpha1.Nil{
					"key-a": {},
					"key-b": {},
					"key-c": {},
				},
			},
			"domain.mf": {
				Elements: map[string]nfdv1alpha1.Nil{
					"key-a": {},
					"key-b": {},
					"key-c": {},
				},
			},
		},
		Attributes: map[string]nfdv1alpha1.AttributeFeatureSet{
			"domain_1.vf_1": {
				Elements: map[string]string{
					"key-1": "val-1",
					"keu-2": "val-2",
					"key-3": "val-3",
					"key-4": "val-4",
				},
			},
			"domain.mf": {
				Elements: map[string]string{
					"key-d": "val-d",
					"key-e": "val-e",
				},
			},
		},
		Instances: map[string]nfdv1alpha1.InstanceFeatureSet{
			"domain_1.if_1": {
				Elements: []nfdv1alpha1.InstanceFeature{
					{
						Attributes: map[string]string{
							"attr-1": "1",
							"attr-2": "val-2",
						},
					},
					{


  if (orient === "bottom" || orient === "top") {
    vg.extend(title.properties.update, {
      x: {value: mid},
      y: {value: sign*offset},
      angle: {value: 0}
    });
  } else {
    vg.extend(title.properties.update, {
      x: {value: sign*offset},
      y: {value: mid},
      angle: {value: -90}
    });
  }
}

function vg_axisDomainExtend(orient, domain, range, size) {
  var path;
  if (orient === "top" || orient === "left") {
    size = -1 * size;
  }
  if (orient === "bottom" || orient === "top") {
    path = "M" + range[0] + "," + size + "V0H" + range[1] + "V" + size;
  } else {
    path = "M" + size + "," + range[0] + "H0V" + range[1] + "H" + size;
  }
  domain.properties.update.path = {value: path};
}

function vg_axisUpdate(item, group, trans) {
  var o = trans ? {} : item,
      offset = item.mark.def.offset,
      orient = item.mark.def.orient,
      width  = group.width,
      height = group.height; // TODO fallback to global w,h?

    if (vg.isArray(offset)) {
      var ofx = offset[0],
          ofy = offset[1];

      switch (orient) {
        case "left":   { o.x = -ofx; o.y = ofy; break; }
        case "right":  { o.x = width + ofx; o.y = ofy; break; }
        case "bottom": { o.x = ofx; o.y = height + ofy; break; }
        case "top":    { o.x = ofx; o.y = -ofy; break; }
        default:       { o.x = ofx; o.y = ofy; }
      }
    } else {
      if (vg.isObject(offset)) {
        offset = -group.scales[offset.scale](offset.value);
      }

      switch (orient) {
        case "left":   { o.x = -offset; o.y = 0; break; }
        case "right":  { o.x = width + offset; o.y = 0; break; }
        case "bottom": { o.x = 0; o.y = height + offset; break; }
        case "top":    { o.x = 0; o.y = -offset; break; }
        default:       { o.x = 0; o.y = 0; }
      }
    }

  if (trans) trans.interpolate(item, o);
}

function vg_axisTicks() {
  return {
    type: "rule",
    interactive: false,
    key: "data",
    properties: {
      enter: {
        stroke: {value: vg.config.axis.tickColor},
        strokeWidth: {value: vg.config.axis.tickWidth},
        opacity: {value: 1e-6}
      },
      exit: { opacity: {value: 1e-6} },
      update: { opacity: {value: 1} }
    }
  };
}

function vg_axisTickLabels() {
  return {
    type: "text",
    interactive: true,
    key: "data",
    properties: {
      enter: {
        fill: {value: vg.config.axis.tickLabelColor},
        font: {value: vg.config.axis.tickLabelFont},
        fontSize: {value: vg.config.axis.tickLabelFontSize},
        opacity: {value: 1e-6},
        text: {field: "label"}
      },
      exit: { opacity: {value: 1e-6} },
      update: { opacity: {value: 1} }
    }
  };
}

function vg_axisTitle() {
  return {
    type: "text",
    interactive: true,
    properties: {
      enter: {
        font: {value: vg.config.axis.titleFont},
        fontSize: {value:


,44,32,77,105,107,101,32,72,97,109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105,118,101,114,115,105,116,121,41,0
.align	2
.size	_vpaes_consts,.-_vpaes_consts
.align	6
@@
@@  _aes_preheat
@@
@@  Fills q9-q15 as specified below.
@@
.type	_vpaes_preheat,%function
.align	4
_vpaes_preheat:
	adr	r10, .Lk_inv
	vmov.i8	q9, #0x0f		@ .Lk_s0F
	vld1.64	{q10,q11}, [r10]!	@ .Lk_inv
	add	r10, r10, #64		@ Skip .Lk_ipt, .Lk_sbo
	vld1.64	{q12,q13}, [r10]!	@ .Lk_sb1
	vld1.64	{q14,q15}, [r10]	@ .Lk_sb2
	bx	lr

@@
@@  _aes_encrypt_core
@@
@@  AES-encrypt q0.
@@
@@  Inputs:
@@     q0 = input
@@     q9-q15 as in _vpaes_preheat
@@    [r2] = scheduled keys
@@
@@  Output in q0
@@  Clobbers  q1-q5, r8-r11
@@  Preserves q6-q8 so you get some local vectors
@@
@@
.type	_vpaes_encrypt_core,%function
.align	4
_vpaes_encrypt_core:
	mov	r9, r2
	ldr	r8, [r2,#240]		@ pull rounds
	adr	r11, .Lk_ipt
	@ vmovdqa	.Lk_ipt(%rip),	%xmm2	# iptlo
	@ vmovdqa	.Lk_ipt+16(%rip), %xmm3	# ipthi
	vld1.64	{q2, q3}, [r11]
	adr	r11, .Lk_mc_forward+16
	vld1.64	{q5}, [r9]!		@ vmovdqu	(%r9),	%xmm5		# round0 key
	vand	q1, q0, q9		@ vpand	%xmm9,	%xmm0,	%xmm1
	vshr.u8	q0, q0, #4		@ vpsrlb	$4,	%xmm0,	%xmm0
	vtbl.8	d2, {q2}, d2	@ vpshufb	%xmm1,	%xmm2,	%xmm1
	vtbl.8	d3, {q2}, d3
	vtbl.8	d4, {q3}, d0	@ vpshufb	%xmm0,	%xmm3,	%xmm2
	vtbl.8	d5, {q3}, d1
	veor	q0, q1, q5		@ vpxor	%xmm5,	%xmm1,	%xmm0
	veor	q0, q0, q2		@ vpxor	%xmm2,	%xmm0,	%xmm0

	@ .Lenc_entry ends with a bnz instruction which is normally paired with
	@ subs in .Lenc_loop.
	tst	r8, r8
	b	.Lenc_entry

.align	4
.Lenc_loop:
	@ middle of middle round
	add	r10, r11, #0x40
	vtbl.8	d8, {q13}, d4	@ vpshufb	%xmm2,	%xmm13,	%xmm4	# 4 = sb1u
	vtbl.8	d9, {q13}, d5
	vld1.64	{q1}, [r11]!		@ vmovdqa	-0x40(%r11,%r


, text_hudstatusalign, 0, 3)
		AddHudIconToAll(hudstatusicontobase, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign )
	end

	RemoveHudItemFromAll( "Zone_Team"..attackers )
	RemoveHudItemFromAll( "Zone_Team"..defenders )
	RemoveHudItemFromAll( "Zone_Phase"..attackers )
	RemoveHudItemFromAll( "Zone_Phase"..defenders )

	od_hudstatusiconx = -28
	od_hudstatusicony = 38
	od_hudstatusiconw = 24
	od_hudstatusiconh = 24
	od_hudstatusiconalign = 3

	RemoveHudItemFromAll("cap_timer")
	RemoveHudItemFromAll("cap_timer_text")
	if cap_timeleft > 0 then
		AddHudTextToAll("cap_timer_text", "Time left", 40, od_hudstatusicony, 2, 0, 2)
		AddHudTimerToAll("cap_timer", cap_timeleft,


/*
Copyright 2011-19 Jun WAKO <wakojun@gmail.com>

This software is licensed with a Modified BSD License.
All of this is supposed to be Free Software, Open Source, DFSG-free,
GPL-compatible, and OK to use in both free and proprietary applications.
Additions and corrections to this file are welcome.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in
  the documentation and/or other materials provided with the
  distribution.

* Neither the name of the copyright holders nor the names of
  contributors may be used to endorse or promote products derived
  from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/

#pragma once

#include <stdint.h>
#include <stdbool.h>

#if !(defined(ADB_PORT) && defined(ADB_PIN) && defined(ADB_DDR) && defined(ADB_DATA_BIT))
#    error "ADB port setting is required in config.h"
#endif

#define ADB_POWER 0x7F
#define ADB_CAPS 0x39

/* ADB commands */
// Default Address
#define ADB_ADDR_0 0
#define ADB_ADDR_DONGLE 1
#define ADB_ADDR_KEYBOARD 2
#define ADB_ADDR_MOUSE 3
#define ADB_ADDR_TABLET 4
#define ADB_ADDR_APPLIANCE 7
#define ADB_ADDR_8 8
#define ADB_ADDR_9 9
#define ADB_ADDR_10 10
#define ADB_ADDR_11 11
#define ADB_ADDR_12 12
#define ADB_ADDR_13 13
#define ADB_ADDR_14 14
#define ADB_ADDR_15 15
// for temporary purpose, do not use for polling
#define ADB_ADDR_TMP 15
#define ADB_ADDR_MOUSE_POLL 10
// Command Type
#define ADB_CMD_RESET 0
#define ADB_CMD_FLUSH 1
#define ADB_CMD_LISTEN 8
#define ADB_CMD_TALK 12
// Register
#define ADB_REG_0 0
#define ADB_REG_1 1
#define ADB_REG_2 2
#define ADB_REG_3 3

/* ADB keyboard handler id */
#define ADB_HANDLER_STD 0x01        /* IIGS, M0116 */
#define ADB_HANDLER_AEK 0x02        /* M0115, M3501 */
#define ADB_HANDLER_AEK_RMOD 0x03   /* M0115, M3501, alternate mode enableing right modifiers */
#define ADB_HANDLER_STD_ISO 0x04    /* M0118, ISO swapping keys */
#define ADB_HANDLER_AEK_ISO 0x05    /* M0115, M3501, ISO swapping keys */
#define ADB_HANDLER_M1242_ANSI 0x10 /* Adjustable keyboard */
#define ADB_HANDLER_CLASSIC1_MOUSE 0x01
#define ADB_HANDLER_CLASSIC2_MOUSE 0x02
#define ADB_HANDLER_EXTENDED_MOUSE 0x04
#define ADB_HANDLER_TURBO_MOUSE 0x32

// ADB host
void     adb_host_init(void);
bool     adb_host_psw(void);
uint16_t adb_host_talk(uint8_t addr, uint8_t reg);
uint8_t  adb_host_talk_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len);
void     adb_host_listen(uint8_t addr, uint8_t reg, uint8_t data_h, uint8_t data_l);
void     adb_host_listen_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len);
void     adb_host_flush(uint8_t addr);
void     adb_host_kbd_led(uint8_t led);
uint16_t adb_host_kbd_recv(void);
uint16_t adb_host_mouse_recv(void);

// ADB Mouse
void adb_mouse_task(void);
void adb_mouse_init(void);


and: Ternary): E {
            visit(operand.cond)
            visit(operand.otrue)
            visit(operand.ofalse)
            return default
        }

		open fun visit(operand: Swizzle): E {
			visit(operand.left)
			return default
		}

		open fun visit(operand: ArrayAccess): E {
			visit(operand.left)
			visit(operand.index)
			return default
		}

		open fun visit(operand: Vector): E {
			for (op in operand.ops) visit(op)
			return default
		}

		open fun visit(operand: IntLiteral): E = default
		open fun visit(operand: FloatLiteral): E = default
		open fun visit(operand: BoolLiteral): E = default
	}
}

data class Shader(val type: ShaderType, val stm: Program.Stm, val functions: List<FuncDecl>, val name: String? = null) {
    private val stmHashCode = stm.hashCode()
    private val functionsHashCode = functions.hashCode()
    private val cachedHashCode = (type.hashCode() * 17) + stmHashCode + (functionsHashCode * 53)

    val isRaw get() = stm is Program.Stm.Raw

    val globals = GlobalsProgramVisitor().also { it.visit(stm) }

	val uniforms = globals.uniforms
    val typedUniforms = globals.typedUniforms
    val attributes = globals.attributes
    val samplers = globals.samplers

    override fun equals(other: Any?): Boolean = (this === other) || (other is Shader && (this.type == other.type) && (this.cachedHashCode == other.cachedHashCode) && (this.stm == other.stm) && (this.functions == other.functions))
    override fun hashCode(): Int = cachedHashCode
}

typealias VertexShader = Shader
typealias FragmentShader = Shader

fun VertexShader(stm: Program.Stm, funcs: List<FuncDecl> = listOf()): Shader = Shader(ShaderType.VERTEX, stm, funcs)
fun VertexShader(info: Pair<Program.Stm, List<FuncDecl>>): Shader = VertexShader(info.first, info.second)

fun FragmentShader(stm: Program.Stm, funcs: List<FuncDecl> = listOf()): Shader = Shader(ShaderType.FRAGMENT, stm, funcs)
fun FragmentShader(info: Pair<Program.Stm, List<FuncDecl>>): Shader = FragmentShader(info.first, info.second)

@KoragExperimental
fun VertexShader(rawStrings: Map<String, String>, stm: Program.Stm? = null) = VertexShader(Program.Stm.Raw(rawStrings, stm))
@KoragExperimental
fun FragmentShader(rawStrings: Map<String, String>, stm: Program.Stm? = null) = FragmentShader(Program.Stm.Raw(rawStrings, stm))

private const val NAME_GLSL = "GLSL"

@KoragExperimental
@Deprecated("Use VertexShaderRawGlSl instead")
fun VertexShader(stm: Program.Stm, glsl: String) = VertexShader(mapOf(NAME_GLSL to glsl), stm)
@KoragExperimental
@Deprecated("Use FragmentShaderRawGlSl instead")
fun FragmentShader(stm: Program.Stm, glsl: String) = FragmentShader(mapOf(NAME_GLSL to glsl), stm)

inline fun VertexShader(callback: ProgramBuilderDefault.() -> Unit): VertexShader {
	val builder = ProgramBuilderDefault()
	builder.callback()
	return VertexShader(builder._buildFuncs())
}

inline fun FragmentShader(callback: ProgramBuilderDefault.() -> Unit): FragmentShader {
	val builder = ProgramBuilderDefault()
	builder.callback()
	return FragmentShader(builder._buildFuncs())
}

typealias VertexLayout = ProgramLayout


(Writer out, long instant, Chronology chrono,
                 int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException;

    //-----------------------------------------------------------------------
    /**
     * Prints a ReadablePartial.
     *
     * @param buf  formatted partial is appended to this buffer, not null
     * @param partial  partial to format, not null
     * @param locale  the locale to use, null means default locale
     */
    void printTo(StringBuffer buf, ReadablePartial partial, Locale locale);

    /**
     * Prints a ReadablePartial.
     *
     * @param out  formatted partial is written out, not null
     * @param partial  partial to format, not null
     * @param locale  the locale to use, null means default locale
     */
    void printTo(Writer out, ReadablePartial partial, Locale locale) throws IOException;

}
/*
 *  Copyright 2001-2005 Stephen Colebourne
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.joda.time.tz;

import org.joda.time.DateTimeZone;

/**
 * Improves the performance of requesting time zone offsets and name keys by
 * caching the results. Time zones that have simple rules or are fixed should
 * not be cached, as it is unlikely to improve performance.
 * <p>
 * CachedDateTimeZone is thread-safe and immutable.
 *
 * @author Brian S O'Neill
 * @since 1.0
 */
public class CachedDateTimeZone extends DateTimeZone {

    private static final long serialVersionUID = 5472298452022250685L;

    private static final int cInfoCacheMask;

    static {
        Integer i;
        try {
            i = Integer.getInteger("org.joda.time.tz.CachedDateTimeZone.size");
        } catch (SecurityException e) {
            i = null;
        }

        int cacheSize;
        if (i == null) {
            // With a cache size of 512, dates that lie within any 69.7 year
            // period have no cache collisions.
            cacheSize = 512; // (1 << 9)
        } else {
            cacheSize = i.intValue();
            // Ensure cache size is even power of 2.
            cacheSize--;
            int shift = 0;
            while (cacheSize > 0) {
                shift++;
                cacheSize >>= 1;
            }
            cacheSize = 1 << shift;
        }

        cInfoCacheMask = cacheSize - 1;
    }

    /**
     * Returns a new CachedDateTimeZone unless given zone is already cached.
     */
    public static CachedDateTimeZone forZone(DateTimeZone zone) {
        if (zone instanceof CachedDateTimeZone) {
            return (CachedDateTimeZone)zone;
        }
        return new CachedDateTimeZone(zone);
    }

    /*
     * Caching is performed by breaking timeline down into periods of 2^32
     * milliseconds, or about 49.7 days. A year has about 7.3 periods, usually
     * with only 2 time zone offset periods. Most of the 49.7 day periods will
     * have no transition, about one quarter have one transition, and very rare
     * cases have multiple transitions.
     */

    private final DateTimeZone iZone;

    private transient Info[] iInfoCache;

    private CachedDateTimeZone(DateTimeZone zone) {
        super(zone.getID());
        iZone = zone;
        iInfoCache = new Info[cInfoCacheMask + 1];
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, ClassNotFoundException


-overview].")
	runCmd.PersistentFlags().
		BoolVar(&validateArgs, "validate", true, "Validate arguments against script definition in plan and exit with 1 on unknown or missing arguments")
	runCmd.PersistentFlags().
		BoolVar(&interactiveArg, "interactive", shuttleInteractiveDefault, "sets whether to enable ui for getting missing values via. prompt instead of failing immediadly, default is set by [SHUTTLE_INTERACTIVE=true/false]")
	return runCmd, nil
}

func newRunSubCommand(
	uii *ui.UI,
	context config.ShuttleProjectContext,
	script string,
	value config.ShuttlePlanScript,
	executorRegistry *executors.Registry,
	interactiveArg *bool,
	validateArgs *bool,
) *cobra.Command {
	// Args are best suited as kebab-case on the command line
	argName := func(input string) string {
		return strcase.ToKebab(input)
	}

	parseKeyValuePair := func(arg string) (string, string, bool) {
		before, after, found := strings.Cut(arg, "=")
		if found {
			return before, after, true
		}

		return "", "", false
	}

	// Legacy key=value pairs into standard args that cobra can understand
	applyLegacyArgs := func(args []string, inputArgs map[string]*string) {
		for _, inputArg := range args {
			key, value, ok := parseKeyValuePair(inputArg)
			if ok {
				inputArgs[key] = &value
			}
		}
	}

	// In case interactive is turned on and arg is missing, we ask for missing values
	createPrompt := func(inputArgs map[string]*string, arg config.ShuttleScriptArgs) (string, error) {
		prompt := []*survey.Question{
			{
				Name: argName(arg.Name),
				Prompt: &survey.Input{
					Message: argName(arg.Name),
					Default: *inputArgs[arg.Name],
					Help:    arg.Description,
				},
			},
		}
		if arg.Required {
			prompt[0].Validate = survey.Required
		}
		var output string
		err := survey.Ask(prompt, &output)
		if err != nil {
			return "", err
		}

		return output, nil
	}

	// Decide whether to fall back on prompt or give a hard error
	validateInputArgs := func(value config.ShuttlePlanScript, inputArgs map[string]*string) error {
		for _, arg := range value.Args {
			if !arg.Required {
				continue
			}

			arg := arg

			if *inputArgs[arg.Name] == "" && *interactiveArg {
				output, err := createPrompt(inputArgs, arg)
				if err != nil {
					return err
				}
				if output != "" {
					inputArgs[arg.Name] = &output
				}

			} else if *inputArgs[arg.Name] == "" && arg.Required && *validateArgs {
				return fmt.Errorf("required flag(s) \"%s\" not set", argName(arg.Name))
			}
		}

		return nil
	}

	// Produce a stable list of arguments
	sort.Slice(value.Args, func(i, j int) bool {
		return value.Args[i].Name < value.Args[j].Name
	})

	// Initialize a collection of variables for use in args set pr command
	inputArgs := make(map[string]*string, 0)
	for _, arg := range value.Args {
		arg := arg
		inputArgs[arg.Name] = new(string)
	}

	cmd := &cobra.Command{
		Use:          script,
		Short:        value.Description,
		Long:         value.Description,
		SilenceUsage: true,
		RunE: func(cmd *cobra.Command, args []string) error {
			if *interactiveArg {
				uii.Verboseln("Running using interactive mode!")
			}

			ctx := cmd.Context()
			ctx, _, traceError, traceEnd := trace(ctx, script, args)
			defer traceEnd()

			applyLegacyArg


-- ص
function networkCallback(pScutScene, lpExternalData)
	local actionId = ZyReader:getActionID();
	 local userData = ZyRequestParam:getParamData(lpExternalData)
	if actionId == 1006 then
  		if ZyReader:getResult() == eScutNetSuccess then
			accountInfo.saveConfig("sys/account.ini", "Account", "PassportID" , isNoAccout(accountInfo.read_PassportID()))
			accountInfo.saveConfig("sys/account.ini", "Account", "pw" , isNoAccout(password))
			accountInfo.UserType=0
			PersonalInfo.getPersonalInfo()._UserType=0
			accountInfo.UserType=0
			if m_per


ul class="blockList">

addressBluetoothDevice

public static java.lang.String addressBluetoothDevice

gollumUsbManagerCallbacks

public GollumUsbManagerCallbacks gollumUsbManagerCallbacks

USB Event interceptor before calling application callbacks
 These callbacks are called by bleListener and in turn call application callbacks

Constructor Detail

GollumDongle

public GollumDongle(android.content.Context context)

Constructor for interfacing with a PandwaRF. Must be singleton.
 Use @link #getInstance(Activity) or @link #getInstance(Context)

Parameters:

context -

Method Detail

getInstance

public static GollumDongle getInstance(android.app.Activity parentActivity)

Parameters:

parentActivity -

Returns:

a single instance of GollumDongle

getInstance

public static GollumDongle getInstance(android.content.Context context)

Parameters:

context -

Returns:

a single instance of GollumDongle


		log.Warnw("Failed to get application namespace", dazl.String("AppID", appID), dazl.Error(err))
		return nil, err
	}

	excludeLabelSelector := fmt.Sprintf("%s!=%s", LabelKeyForVirtHandler, "virt-launcher")
	pods, err := k8sClient.CoreV1().Pods(appNamespace).List(ctx, metav1.ListOptions{
		LabelSelector: excludeLabelSelector,
	})
	if err != nil {
		log.Warnw("Failed to get list of pods", dazl.String("AppID", appID), dazl.Error(err))
		return nil, k8serrors.K8sToTypedError(err)
	}

	var appPodList []corev1.Pod
	for _, pod := range pods.Items {
		isOwned, err := checkOwnerAnnotations(ctx, k8sClient, dynK8sClient, &pod.ObjectMeta, pod.Namespace, appID)
		if err != nil {
			log.Warnw("Failed to check owner reference", dazl.String("PodName", pod.Name), dazl.Error(err))
			return nil, err
		}
		if isOwned {
			appPodList = append(appPodList, pod)
		}
	}

	for _, pod := range appPodList {
		podWorkLoad := &resourceapiv2.AppWorkload{
			Type:       resourceapiv2.AppWorkload_TYPE_POD,
			Id:         string(pod.ObjectMeta.UID),
			Name:       pod.Name,
			Namespace:  pod.Namespace,
			CreateTime: timestamppb.New(pod.ObjectMeta.CreationTimestamp.Time),
		}

		containers := pod.Spec.Containers
		podResource := &resourceapiv2.AppWorkload_Pod{
			Pod: &resourceapiv2.Pod{
				Status: convertPodPhase(pod.Status.Phase),
			},
		}
		for _, condition := range pod.Status.Conditions {
			if condition.Type == corev1.PodReady && condition.Status == corev1.ConditionTrue {
				podWorkLoad.WorkloadReady = true
			} else if condition.Type == corev1.PodReady && condition.Status == corev1.ConditionFalse {
				podWorkLoad.WorkloadReady = false
			}
		}

		for index, container := range containers {
			containerResource := &resourceapiv2.Container{
				Name:      container.Name,
				ImageName: container.Image,
			}
			if index < len(pod.Status.ContainerStatuses) {
				containerStatus := pod.Status.ContainerStatuses[index]
				containerResource.RestartCount = containerStatus.RestartCount
				containerResource.Status = convertContainerStatus(containerStatus.State)
			} else {
				log.Warnw("Container status not found for container", dazl.String("ContainerName", container.Name))
			}
			podResource.Pod.Containers = append(podResource.Pod.Containers, containerResource)
		}
		podWorkLoad.Workload = podResource
		podWorkloads = append(podWorkloads, podWorkLoad)
	}

	return podWorkloads, nil

}

func (m *manager) GetAppEndpointsV2(ctx context.Context, appID string, clusterID string) ([]*resourceapiv2.AppEndpoint, error) {
	k8sClient, err := getK8sClient(ctx, clusterID, m.admClient, m.configPath)
	if err != nil {
		log.Warnw("Failed to create a k8s client", dazl.String("ClusterID", clusterID), dazl.Error(err))
		return nil, err
	}
	appEndpoints := make([]*resourceapiv2.AppEndpoint, 0)
	appNamespace, err := m.admClient.GetAppNamespace(ctx, appID)
	if err != nil {
		log.Warnw("Failed to get application namespace", dazl.String("AppID", appID), dazl.Error(err))
		return nil, err
	}

	activeProjectID, err := opa.GetActiveProjectID(ctx)
	if err != nil {
		// todo: return error after IA


ms cubic-bezier(0.2, 0, 0.38, 0.9) hide-feedback;animation:110ms cubic-bezier(0.2, 0, 0.38, 0.9) hide-feedback}.bx--snippet--inline.bx--copy-btn--animating.bx--copy-btn--fade-in::before,.bx--snippet--inline.bx--copy-btn--animating.bx--copy-btn--fade-in .bx--copy-btn__feedback{-webkit-animation:110ms cubic-bezier(0.2, 0, 0.38, 0.9) show-feedback;animation:110ms cubic-bezier(0.2, 0, 0.38, 0.9) show-feedback}.bx--snippet--inline code{padding:0 .5rem}.bx--snippet--inline.bx--snippet--no-copy{display:inline-block}.bx--snippet--inline.bx--snippet--no-copy:hover{background-color:#fff;cursor:auto}.bx--snippet--light.bx--snippet--inline.bx--snippet--no-copy:hover{background-color:#f4f4f4;cursor:auto}.bx--snippet--single{font-family:'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace;font-size:.75rem;font-weight:400;line-height:1.33333;letter-spacing:.32px;position:relative;width:100%;max-width:48rem;background-color:#fff;display:flex;height:2.5rem;align-items:center;padding-right:2.5rem}.bx--snippet--single.bx--snippet--no-copy{padding:0}.bx--snippet--single.bx--snippet--no-copy::after{right:1rem}.bx--snippet--single .bx--snippet-container{position:relative;display:flex;height:100%;align-items:center;padding-left:1rem;overflow-x:auto}.bx--snippet--single .bx--snippet-container:focus{outline:2px solid #0f62fe;outline-offset:-2px}@media screen and (prefers-contrast){.bx--snippet--single .bx--snippet-container:focus{outline-style:dotted}}.bx--snippet--single pre{font-family:'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace;font-size:.75rem;font-weight:400;line-height:1.33333;letter-spacing:.32px;padding-right:.5rem}.bx--snippet--single pre,.bx--snippet--inline code{white-space:pre}.bx--snippet--multi{font-family:'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace;font-size:.75rem;font-weight:400;line-height:1.33333;letter-spacing:.32px;position:relative;width:100%;max-width:48rem;background-color:#fff;display:flex;padding:1rem}.bx--snippet--multi .bx--snippet-container{position:relative;min-height:100%;max-height:100%;order:1;overflow-y:auto;transition:max-height 150ms cubic-bezier(0.2, 0, 0.38, 0.9)}.bx--snippet--multi .bx--snippet-container:focus{outline:2px solid #0f62fe;outline-offset:-2px;outline-offset:0}@media screen and (prefers-contrast){.bx--snippet--multi .bx--snippet-container:focus{outline-style:dotted}}.bx--snippet--multi.bx--snippet--expand .bx--snippet-container{padding-bottom:1rem;transition:max-height 150ms cubic-bezier(0.2, 0, 0.38, 0.9)}.bx--snippet--multi.bx--snippet--wraptext pre{white-space:pre-wrap;word-wrap:break-word}.bx--snippet--multi .bx--snippet-container pre{


Requests = broker.Spec.RelistRequests + 1

				_, err = sdk.ServiceCatalog().ServiceBrokers(namespace).Update(context.Background(), broker, v1.UpdateOptions{})
				if err == nil {
					success = true
				}
				if err != nil && !apierrors.IsConflict(err) {
					return fmt.Errorf("could not sync service broker (%s)", err)
				}
			}
		}

		if scopeOpts.Scope.Matches(ClusterScope) {
			var broker *v1beta1.ClusterServiceBroker
			broker, err = sdk.retrieveBroker(name)
			if err == nil {
				broker.Spec.RelistRequests = broker.Spec.RelistRequests + 1

				_, err = sdk.ServiceCatalog().ClusterServiceBrokers().Update(context.Background(), broker, v1.UpdateOptions{})
				if err == nil {
					success = true
				}
				if err != nil && !apierrors.IsConflict(err) {
					return fmt.Errorf("could not sync service broker (%s)", err)
				}
			}
		}
		// success to update, no need to retry again
		if success {
			break
		}
	}

	if !success {
		return fmt.Errorf("could not sync service broker %s (%s)", name, err)
	}

	return nil
}

// WaitForBroker waits for the specified broker to be Ready or Failed
func (sdk *SDK) WaitForBroker(name string, opts *ScopeOptions, interval time.Duration, timeout *time.Duration) (broker Broker, err error) {
	if timeout == nil {
		notimeout := time.Duration(math.MaxInt64)
		timeout = &notimeout
	}
	err = wait.PollImmediate(interval, *timeout,
		func() (bool, error) {
			broker, err = sdk.RetrieveBrokerByID(name, *opts)
			if err != nil {
				if apierrors.IsNotFound(errors.Cause(err)) {
					err = nil
				}
				return false, err
			}

			isDone := sdk.IsBrokerReady(broker) || sdk.IsBrokerFailed(broker)
			return isDone, nil
		})
	return broker, err
}

// IsBrokerReady returns if the broker is in the Ready status.
func (sdk *SDK) IsBrokerReady(broker Broker) bool {
	return sdk.BrokerHasStatus(broker, v1beta1.ServiceBrokerConditionReady)
}

// IsBrokerFailed returns if the broker is in the Failed status.
func (sdk *SDK) IsBrokerFailed(broker Broker) bool {
	return sdk.BrokerHasStatus(broker, v1beta1.ServiceBrokerConditionFailed)
}

// BrokerHasStatus returns if the broker is in the specified status.
func (sdk *SDK) BrokerHasStatus(broker Broker, status v1beta1.ServiceBrokerConditionType) bool {
	for _, cond := range broker.GetStatus().Conditions {
		if cond.Type == status &&
			cond.Status == v1beta1.ConditionTrue {
			return true
		}
	}

	return false
}
/*
Copyright 2018 The Kubernetes Authors.

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

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

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

package servicecatalog

import (
	"context"
	"errors"
	"fmt"

	"k8s.io/apimachinery/pkg/labels"

	"github.com/kubernetes-sigs/service-catalog/pkg/apis/servicecatalog/v1beta1"
	"github.com/kubernetes-sigs/service-catalog/pkg/util"
	apierrors "k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/ap


00  ! 1686: ORNcc_R	orncc 	%r22, %r0, %r28
	.word 0xfe258000  ! 1693: STW_R	stw	%r31, [%r22 + %r0]
	.word 0xf874a16f  ! 1694: STX_I	stx	%r28, [%r18 + 0x016f]
	.word 0xfe74e12d  ! 1695: STX_I	stx	%r31, [%r19 + 0x012d]
	mov	0, %r14
	.word 0xa1938000  ! 1696: WRPR_GL_R	wrpr	%r14, %r0, %-
	.word 0xbb520000  ! 1698: RDPR_PIL	rdpr	%pil, %r29
	setx	data_start_1, %g1, %r18
	ta	T_CHANGE_HPRIV
	mov	0x38, %g1
	stxa	%r21, [%g1] 0x58
	ta	T_CHANGE_NONHPRIV
	.word 0xf22d8000  ! 1703: STB_R	stb	%r25, [%r22 + %r0]
	.word 0x8795e1f8  ! 1705: WRPR_TT_I	wrpr	%r23, 0x01f8, %tt
	.word 0xb3520000  ! 1706: RDPR_PIL	rdpr	%pil, %r25
	ta	T_CHANGE_HPRIV
	mov	0x80, %g1
	mov	0x1c0, %g2
	stxa	%g2, [%g1] 0x40
	ta	T_CHANGE_NONHPRIV
	.word 0xbb540000  ! 1709: RDPR_GL	<illegal instruction>
	.word 0xf225c000  ! 1711: STW_R	stw	%r25, [%r23 + %r0]
	mov	2, %r14
	.word 0xa193a000  ! 1715: WRPR_GL_I	wrpr	%r14, 0x0000, %-
	mov	1, %r14
	.word 0xa193a000  ! 1719: WRPR_GL_I	wrpr	%r14, 0x0000, %-
	.word 0xb7510000  ! 1720: RDPR_TICK	rdpr	%tick, %r27
	.word 0xb3341000  ! 1721: SRLX_R	srlx	%r16, %r0, %r25
	.word 0xfa344000  ! 1724: STH_R	sth	%r29, [%r17 + %r0]
	ta	T_CHANGE_HPRIV
	mov	8, %g1
	stxa	%g0, [%g1] 0x60
	flush
	ta	T_CHANGE_NONHPRIV
	flush
	.word 0xb5641800  ! 1728: MOVcc_R	<illegal instruction>
	.word 0xf82de1f9  ! 1729: STB_I	stb	%r28, [%r23 + 0x01f9]
	.word 0xf82cc000  ! 1731: STB_R	stb	%r28, [%r19 + %r0]
	.word 0xb2b4a158  ! 1733: SUBCcc_I	orncc 	%r18, 0x0158, %r25
	.word 0x8795a1f2  ! 1737: WRPR_TT_I	wrpr	%r22, 0x01f2, %tt
	.word 0xf4258000  ! 1738: STW_R	stw	%r26, [%r22 + %r0]
	.word 0xfc2cc000  ! 1739: STB_R	stb	%r30, [%r19 + %r0]
	.word 0xf07461df  !


m0 3h-5V9h5v2z"],compass:["M15 10c0 .14-.03.28-.09.4l-3.99 8.98-.01.02a.991.991 0 01-1.82 0l-.01-.02-3.99-8.98c-.06-.12-.09-.26-.09-.4s.03-.28.09-.4L9.08.62 9.09.6a.991.991 0 011.82 0l.01.02 3.99 8.98c.06.12.09.26.09.4zm-5-6.54L7.09 10h5.81L10 3.46z"],compressed:["M19.89 6.56l-2.99-6h-.01C16.72.23 16.39 0 16 0H4c-.39 0-.72.23-.89.56H3.1l-3 6h.01C.05 6.69 0 6.84 0 7v12c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V7c0-.16-.05-.31-.11-.44zM11 2h4.38l2 4H11V2zM4.62 2H9v4H2.62l2-4zM18 18H2V8h7v4.59L6.71 10.3A.965.965 0 006 10a1.003 1.003 0 00-.71 1.71l4 4c.18.18.43.29.71.29s.53-.11.71-.29l4-4a1.003 1.003 0 00-1.42-1.42L11 12.59V8h7v10z"],confirm:["M9.71 5.29a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l7-7a1.003 1.003 0 00-1.42-1.42L12 7.59l-2.29-2.3zm7.93 2.32c.23.75.36 1.56.36 2.39 0 4.42-3.58 8-8 8s-8-3.58-8-8a7.998 7.998 0 0111.8-7.04l1.46-1.46C13.73.56 11.93 0 10 0 4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10c0-1.4-.29-2.73-.81-3.95l-1.55 1.56z"],console:["M19 19H1c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1h18c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1zM18 6H2v11h16V6zM4 8c.28 0 .53.11.71.29l2 2c.18.18.29.43.29.71s-.11.53-.29.71l-2 2a1.003 1.003 0 01-1.42-1.42L4.59 11l-1.3-1.29A1.003 1.003 0 014 8zm5 4h3c.55 0 1 .45 1 1s-.45 1-1 1H9c-.55 0-1-.45-1-1s.45-1 1-1z"],contrast:["M19 8h-1.26c-.19-.73-.48-1.42-.85-2.06l.94-.94a.996.996 0 000-1.41l-1.41-1.41a.996.996 0 00-1.41 0l-.94.94c-.65-.38-1.34-.67-2.07-.86V1c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v1.26c-.76.2-1.47.5-2.13.89L5 2.28a.972.972 0 00-1.


linear")
end

function element_0(shader, t_base, t_second, t_detail)
	shader:begin("stub_notransform", "copy")
		:fog(false)
		:zb(false, false)
	shader:dx10texture("s_base", t_base)
	shader:dx10sampler("smp_base")
	shader:dx10sampler("smp_nofilter")
end

function element_1(shader, t_base, t_second, t_detail)
	elements(shader, t_base, t_second, t_detail, "accum_spot_unshadowed", false)
end

function element_2(shader, t_base, t_second, t_detail)
	elements(shader, t_base, t_second, t_detail, "accum_spot_normal", true)
end

function element_3(shader, t_base, t_second, t_detail)
	elements(shader, t_base, t_second, t_detail, "accum_spot_fullsize", true)
end


/* **********************************************************
 * Copyright (c) 2015 Google, Inc.  All rights reserved.
 * Copyright (c) 2008 VMware, Inc.  All rights reserved.
 * **********************************************************/

/*
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright notice,
 *   this list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * * Neither the name of VMware, Inc. nor the names of its contributors may be
 *   used to endorse or promote products derived from this software without
 *   specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 */

#include "dr_api.h"
#ifdef MACOS
#    include <sys/syscall.h>
#else
#    include <syscall.h>
#endif

/* Tests removing a system call. */

#define MINSERT instrlist_meta_preinsert

#ifdef AARCH64
#    define SYSCALL_ARG_REG DR_REG_X8
#    define SYSCALL_RES_REG DR_REG_X0
#else
#    define SYSCALL_ARG_REG REG_EAX
#    define SYSCALL_RES_REG REG_EAX
#endif

static dr_emit_flags_t
bb_event(void *drcontext, void *tag, instrlist_t *bb, bool for_trace, bool translating)
{
    instr_t *instr;
    instr_t *next_instr;
    ptr_int_t value;
    reg_t in_reg = -1;

    for (instr = instrlist_first(bb); instr != NULL; instr = next_instr) {
        next_instr = instr_get_next(instr);
        if (instr_is_mov_constant(instr, &value) &&
            opnd_is_reg(instr_get_dst(instr, 0)) &&
            opnd_get_reg(instr_get_dst(instr, 0)) == SYSCALL_ARG_REG &&
            opnd_is_immed_int(instr_get_src(instr, 0)))
            in_reg = opnd_get_immed_int(instr_get_src(instr, 0));
        if (instr_is_syscall(instr) && in_reg == SYS_getpid) {
            instr_t *myval = XINST_CREATE_load_int(
                drcontext, opnd_create_reg(SYSCALL_RES_REG), OPND_CREATE_INT32(-7));
            instr_set_translation(myval, instr_get_app_pc(instr));
            instrlist_preinsert(bb, instr, myval);
            instrlist_remove(bb, instr);
            instr_destroy(drcontext, instr);
        }
    }
    return DR_EMIT_DEFAULT;
}

DR_EXPORT
void
dr_init(client_id_t id)
{
    dr_register_bb_event(bb_event);
}


R BitString by binary string
\\n     * @name setByBinaryString\\n     * @memberOf KJUR.asn1.DERBitString#\\n     * @function\\n     * @param {String} binaryString binary value string (i.e. \'10111\')\\n     * @description\\n     * Its unused bits will be calculated automatically by length of\\n     * \'binaryValue\'.
\\n     * NOTE: Trailing zeros \'0\' will be ignored.\\n     * @example\\n     * o = new KJUR.asn1.DERBitString();\\n     * o.setByBooleanArray(\\"01011\\");\\n     */\\n    this.setByBinaryString = function (binaryString) {\\n        binaryString = binaryString.replace(/0+$/, \'\');\\n        var unusedBits = 8 - binaryString.length % 8;\\n        if (unusedBits == 8)\\n            unusedBits = 0;\\n        for (var i = 0; i <= unusedBits; i++) {\\n            binaryString += \'0\';\\n        }\\n        var h = \'\';\\n        for (var i = 0; i < binaryString.length - 1; i += 8) {\\n            var b = binaryString.substr(i, 8);\\n            var x = parseInt(b, 2).toString(16);\\n            if (x.length == 1)\\n                x = \'0\' + x;\\n            h += x;\\n        }\\n        this.hTLV = null;\\n        this.isModified = true;\\n        this.hV = \'0\' + unusedBits + h;\\n    };\\n    /**\\n     * set ASN.1 TLV value(V) by an array of boolean
\\n     * @name setByBooleanArray\\n     * @memberOf KJUR.asn1.DERBitString#\\n     * @function\\n     * @param {array} booleanArray array of boolean (ex. [true, false, true])\\n     * @description\\n     * NOTE: Trailing falses will be ignored in the ASN.1 DER Object.\\n     * @example\\n     * o = new KJUR.asn1.DERBitString();\\n     * o.setByBooleanArray([false, true, false, true, true]);\\n     */\\n    this.setByBooleanArray = function (booleanArray) {\\n        var s = \'\';\\n        for (var i = 0; i < booleanArray.length; i++) {\\n            if (booleanArray[i] == true) {\\n                s += \'1\';\\n            }\\n            else {\\n                s += \'0\';\\n            }\\n        }\\n        this.setByBinaryString(s);\\n    };\\n    /**\\n     * generate an array of falses with specified length
\\n     * @name newFalseArray\\n     * @memberOf KJUR.asn1.DERBitString\\n     * @function\\n     * @param {Integer} nLength length of array to generate\\n     * @return {array} array of boolean falses\\n     * @description\\n     * This static method may be useful to initialize boolean array.\\n     * @example\\n     * o = new KJUR.asn1.DERBitString();\\n     * o.newFalseArray(3) → [false, false, false]\\n     */\\n    this.newFalseArray = function (nLength) {\\n        var a = new Array(nLength);\\n        for (var i = 0; i < nLength; i++) {\\n            a[i] = false;\\n        }\\n        return a;\\n    };\\n    this.getFreshValueHex = function () {\\n        return this.hV;\\n    };\\n    if (typeof params != \\"undefined\\") {\\n        if (typeof params == \\"string\\" && params.toLowerCase().match(/^[0-9a-f


;
  qRR[ID] = qLB[ID];

  // pressure
  // ISOTHERMAL
  real_t cIso = ::gParams.cIso;
  if (cIso > 0) {
    qLL[IP] = qLL[ID]*cIso*cIso;
    qRL[IP] = qRL[ID]*cIso*cIso;
    qLR[IP] = qLR[ID]*cIso*cIso;
    qRR[IP] = qRR[ID]*cIso*cIso;
  } else {
    qLL[IP] = qRT[IP];
    qRL[IP] = qLT[IP];
    qLR[IP] = qRB[IP];
    qRR[IP] = qLB[IP];
  }

  // iu, iv : parallel velocity indexes
  // iw     : orthogonal velocity index
  // ia, ib, ic : idem for magnetic field
  int iu, iv, iw, ia, ib, ic;
  if (emfDir == EMFZ) {
    iu = IU; iv = IV; iw = IW;
    ia = IA; ib = IB, ic = IC;
  } else if (emfDir == EMFY) {
    iu = IW; iv = IU; iw = IV;
    ia = IC; ib = IA, ic = IB;
  } else { // emfDir == EMFX
    iu = IV; iv = IW; iw = IU;
    ia = IB; ib = IC, ic = IA;
  }

  // First parallel velocity
  qLL[IU] = qRT[iu];
  qRL[IU] = qLT[iu];
  qLR[IU] = qRB[iu];
  qRR[IU] = qLB[iu];

  // Second parallel velocity
  qLL[IV] = qRT[iv];
  qRL[IV] = qLT[iv];
  qLR[IV] = qRB[iv];
  qRR[IV] = qLB[iv];

  // First parallel magnetic field (enforce continuity)
  qLL[IA] = HALF_F * ( qRT[ia] + qLT[ia] );
  qRL[IA] = HALF_F * ( qRT[ia] + qLT[ia] );
  qLR[IA] = HALF_F * ( qRB[ia] + qLB[ia] );
  qRR[IA] = HALF_F * ( qRB[ia] + qLB[ia] );

  // Second parallel magnetic field (enforce continuity)
  qLL[IB] = HALF_F * ( qRT[ib] + qRB[ib] );
  qRL[IB] = HALF_F * ( qLT[ib] + qLB[ib] );
  qLR[IB] = HALF_F * ( qRT[ib] + qRB[ib] );
  qRR[IB] = HALF_F * ( qLT[ib] + qLB[ib] );

  // Orthogonal velocity
  qLL[IW] = qRT[iw];
  qRL[IW] = qLT[iw];
  qLR[IW] = qRB[iw];
  qRR[IW] = qLB[iw];

  // Orthogonal magnetic Field
  qLL[IC] = qRT[ic];
  qRL[IC] = qLT[ic];
  qLR[IC] = qRB[ic];
  qRR[IC] = qLB[ic];

  // Compute final fluxes

  // vx*by - vy*bx at the four edge centers
  real_t eLLRR[4];
  real_t &ELL = eLLRR[ILL];
  real_t &ERL = eLLRR[IRL];
  real_t &ELR = eLLRR[ILR];
  real_t &ERR = eLLRR[IRR];

  ELL = qLL[IU]*qLL[IB] - qLL[IV]*qLL[IA];
  ERL = qRL[IU]*qRL[IB] - qRL[IV]*qRL[IA];
  ELR = qLR[IU]*qLR[IB] - qLR[IV]*qLR[IA];
  ERR = qRR[IU]*qRR[IB] - qRR[IV]*qRR[IA];

  real_t emf=0;
  // mag_riemann2d<>
  if (gParams.magRiemannSolver == MAG_HLLD) {
    emf = mag_riemann2d_hlld(qLLRR, eLLRR);
  } else if (gParams.magRiemannSolver == MAG_HLLA) {
    emf = mag_riemann2d_hlla(qLLRR, eLLRR);
  } else if (gParams.magRiemannSolver == MAG_HLLF) {
    emf = mag_riemann2d_hllf(qLLRR, eLLRR);
  } else if (gParams.magRiemannSolver == MAG_LLF) {
    emf = mag_riemann2d_llf(qLLRR, eLLRR);
  }

  /* upwind solver in case of the shearing box */
  if ( /* cartesian */ (::gParams.Omega0>0) /* and not fargo */ ) {
    if (emfDir==EMFX) {
      real_t shear = -1.5 * ::gParams.Omega0 * xPos;
      if (shear>0) {
	emf += shear * qLL[IB];
      } else {
	emf += shear * qRR[IB];
      }
    }
    if (emfDir==EMFZ) {
      real_t shear = -1.5 * ::gParams.Omega0 * (xPos - ::gParams.dx/2);
      if (shear>0) {
	emf -= shear * qLL[IA];
      } else {
	emf -= shear * qRR[IA];
      }
    }
  }

  return emf;

} // compute_emf

#endif // RIEMANN_MHD_H_


是这一道墙的一部分基础。

   这里我不想谈什么宗派主义，我只想谈一谈关于党群关系的认识问题。我个人觉得：党群之间不应该有一道墙，但是还应该有一条线。否则党员和非党人士就没有分别了。这一条线的保留，并不妨害党群的团结，问题在于如何了解这一条线。

   据我个人粗浅的了解，党是一个政治集团，它有它的党章，党员们承担党章所规定的义务，享受党章所规定的权利，这是非党人士所不能干预的。除此之外，我看不出党员和非党人士之间有什么必然的分别。因此，目前党员和非党人士之间的远距离完全是人为的，是可以改变的。我们也知道，党群关系只能逐渐改善，不能希望党群之间完全没有矛盾，而且这种矛盾还会继续下去，直到政党本身消灭为止。但是，应该指出，目前的党群关系还是不健康的，不正常的。如果不肯承认党员和非党人士能有共同语言，这种矛盾不但不能调和，而且还会扩大的。

   （三）党委领导和教授治校问题

   我看这个问题很简单：在高等学校内，党委会和校长的关系等于党中央和国务院的关系，党委会和校务委员会的关系等于党中央和全国人民代表大会的关系。

   必须肯定党能领导科学。社会主义的科学需要，唯有高瞻远瞩的党知道得最清楚。如果说只有党中央能领导，高等学校里的党委会不能领导，那也是说不通的，因为党委会正是受上级党的领导的。从来没有人主张过党委干涉到图书仪器的设备，干涉到教学内容和教学方法；如果有那样的情事，那自然是错误的。但是，如果党根据社会主义的科学需要，从原则上向学校行政方面提出若干建议，象党中央向全国人民代表大会提出五年计划草案一样，那应该是合理的。

   目前许多人所反对的不是党委会的领导，而是以党代政。党政不分无论如何是不好的。为了补救这个缺点，我认为应该扩大校务委员会的职权。但是我不赞成“


// <auto-generated>
//  automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>

namespace WWParser.Defs
{

using global::System;
using global::System.Collections.Generic;
using global::Google.FlatBuffers;

public struct LanguageDefine : IFlatbufferObject
{
  private Table __p;
  public ByteBuffer ByteBuffer { get { return __p.bb; } }
  public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
  public static LanguageDefine GetRootAsLanguageDefine(ByteBuffer _bb) { return GetRootAsLanguageDefine(_bb, new LanguageDefine()); }
  public static LanguageDefine GetRootAsLanguageDefine(ByteBuffer _bb, LanguageDefine obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
  public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
  public LanguageDefine __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public int LanguageType { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
  public string LanguageCode { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetLanguageCodeBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
  public ArraySegment<byte>? GetLanguageCodeBytes() { return __p.__vector_as_arraysegment(6); }
#endif
  public byte[] GetLanguageCodeArray() { return __p.__vector_as_array<byte>(6); }
  public bool IsShow { get { int o = __p.__offset(8); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
  public int QuestionnaireId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
  public string AudioCode { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetAudioCodeBytes() { return __p.__vector_as_span<byte>(12, 1); }
#else
  public ArraySegment<byte>? GetAudioCodeBytes() { return __p.__vector_as_arraysegment(12); }
#endif
  public byte[] GetAudioCodeArray() { return __p.__vector_as_array<byte>(12); }
  public int SortId { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }

  public static Offset<WWParser.Defs.LanguageDefine> CreateLanguageDefine(FlatBufferBuilder builder,
      int language_type = 0,
      StringOffset language_codeOffset = default(StringOffset),
      bool is_show = false,
      int questionnaire_id = 0,
      StringOffset audio_codeOffset = default(StringOffset),
      int sort_id = 0) {
    builder.StartTable(6);
    LanguageDefine.AddSortId(builder, sort_id);
    LanguageDefine.AddAudioCode(builder, audio_codeOffset);
    LanguageDefine.AddQuestionnaireId(builder, questionnaire_id);
    LanguageDefine.AddLanguageCode(builder, language_codeOffset);
    LanguageDefine.AddLanguageType(builder, language_type);
    LanguageDefine.AddIsShow(builder, is_show);
    return LanguageDefine.EndLanguageDefine(builder);
  }

  public static void StartLanguageDefine(FlatBufferBuilder builder) { builder.StartTable(6); }
  public static void AddLanguageType(FlatBufferBuilder builder, int languageT


ounding box of the curve in world coordinates
    var bbox = curve.GetBoundingBox(true);
    if (!bbox.IsValid)
      return Rhino.Commands.Result.Failure;

    // Print the min and max box coordinates in world coordinates
    Rhino.RhinoApp.WriteLine("World min: {0}", bbox.Min);
    Rhino.RhinoApp.WriteLine("World max: {0}", bbox.Max);

    // Compute the tight bounding box of the curve based on the
    // active view's construction plane
    bbox = curve.GetBoundingBox(plane);

    // Print the min and max box coordinates in cplane coordinates
    Rhino.RhinoApp.WriteLine("CPlane min: {0}", bbox.Min);
    Rhino.RhinoApp.WriteLine("CPlane max: {0}", bbox.Max);
    return Rhino.Commands.Result.Success;
  }
}


n\n    vec2 dimensionToggle = vec2(x, 1.0 - x);\n\n    vec2 scatterToggle = vec2(scatter, 1.0 - scatter);\n\n    float y = dot(yy, dimensionToggle);\n    mat2 xy = mat2(viewBoxSize * yy + dimensionToggle, viewBoxSize * vec2(x, y));\n\n    vec2 viewBoxXY = viewBoxPosition + xy * scatterToggle;\n\n    float depthOrHide = depth + 2.0 * (1.0 - show);\n\n    gl_Position = vec4(\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\n        depthOrHide,\n        1.0\n    );\n\n    // visible coloring\n    float clampedColorIndex = clamp((prominence - colorClamp[0]) / (colorClamp[1] - colorClamp[0]), 0.0, 1.0);\n    fragColor = texture2D(palette, vec2((clampedColorIndex * 255.0 + 0.5) / 256.0, 0.5));\n}\n",frag:"precision lowp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n    gl_FragColor = fragColor;\n}\n",primitive:"lines",lineWidth:1,attributes:O,uniforms:{resolution:F.prop("resolution"),viewBoxPosition:F.prop("viewBoxPosition"),viewBoxSize:F.prop("viewBoxSize"),dim1A:F.prop("dim1A"),dim2A:F.prop("dim2A"),dim1B:F.prop("dim1B"),dim2B:F.prop("dim2B"),dim1C:F.prop("dim1C"),dim2C:F.prop("dim2C"),dim1D:F.prop("dim1D"),dim2D:F.prop("dim2D"),loA:F.prop("loA"),hiA:F.prop("hiA"),loB:F.prop("loB"),hiB:F.prop("hiB"),loC:F.prop("loC"),hiC:F.prop("hiC"),loD:F.prop("loD"),hiD:F.prop("hiD"),palette:R,colorClamp:F.prop("colorClamp"),scatter:F.prop("scatter")},offset:F.prop("offset"),count:F.prop("count")}),j=[0,1],B=[];return{setColorDomain:function(t){j[0]=t[0],j[1]=t[1]},render:function(t,e,a){var o,s,l,c=1/0,f=-1/0;for(o=0;o<I;o++)t[o].dim2.canvasX>f&&(f=t[o].dim2.canvasX,l=o),t[o].dim1.canvasX<c&&(c=t[o].dim1.canvasX,s=o);for(0===I&&n(F,0,0,y,x),o=0;o<I;o++){var h=t[o],d=h.dim1,p=d.crossfilterDimensionIndex,m=h.canvasX,g=h.canvasY,b=h.dim2.crossfilterDimensionIndex,_=h.panelSizeX,w=h.panelSizeY,M=m+_;if(e||!B[p]||B[p][0]!==m||B[p][1]!==M){B[p]=[m,M];var k=u(p,b,m,g,_,w,d.crossfilterDimensionIndex,r||d.scatter?1:0,o,s,l);A.clearOnly=a,i(F,N,A,e?v.blockLineCount:E,E,k)}}},readPixel:function(t,e){return F.read({x:t,y:e,width:1,height:1,data:g}),g},readPixels:function(t,e,r,n){var i=new Uint8Arra


{
	br := bridged[Hash, Number]{
		inner: initial,
		waker: newWaker(),
	}
	return &br, &br
}
// Copyright 2023 ChainSafe Systems (ON)
// SPDX-License-Identifier: LGPL-3.0-only

package grandpa

import (
	"github.com/tidwall/btree"
	"golang.org/x/exp/constraints"
	"golang.org/x/exp/slices"
)

// IDVoterInfo is tuple for ID and VoterInfo
type IDVoterInfo[ID constraints.Ordered] struct {
	ID ID
	VoterInfo
}

// VoterSet is a (non-empty) set of voters and associated weights.
//
// A `VoterSet` identifies all voters that are permitted to vote in a round
// of the protocol and their associated weights. A `VoterSet` is furthermore
// equipped with a total order, given by the ordering of the voter's IDs.
type VoterSet[ID constraints.Ordered] struct {
	voters      []IDVoterInfo[ID]
	threshold   VoterWeight
	totalWeight VoterWeight
}

// IDWeight is tuple for ID and Weight
type IDWeight[ID constraints.Ordered] struct {
	ID     ID
	Weight uint64
}

// NewVoterSet creates a voter set from a weight distribution produced by the given iterator.
//
// If the distribution contains multiple weights for the same voter ID, they are
// understood to be partial weights and are accumulated. As a result, the
// order in which the iterator produces the weights is irrelevant.
//
// Returns `nil` if the iterator does not yield a valid voter set, which is
// the case if it either produced no non-zero weights or, i.e. the voter set
// would be empty, or if the total voter weight exceeds max `uint64`.
func NewVoterSet[ID constraints.Ordered](weights []IDWeight[ID]) *VoterSet[ID] {
	var totalWeight VoterWeight
	var voters = btree.NewMap[ID, VoterInfo](2)
	for _, iw := range weights {

		if iw.Weight != 0 {
			err := totalWeight.checkedAdd(VoterWeight(iw.Weight))
			if err != nil {
				return nil
			}
			vi, has := voters.Get(iw.ID)
			if !has {
				voters.Set(iw.ID, VoterInfo{
					position: 0, // The total order is determined afterwards.
					weight:   VoterWeight(iw.Weight),
				})
			} else {
				vi.weight = VoterWeight(iw.Weight)
				voters.Set(iw.ID, vi)
			}
		}
	}

	if voters.Len() == 0 {
		return nil
	}

	var orderedVoters = make([]IDVoterInfo[ID], voters.Len())
	var i uint
	voters.Scan(func(id ID, info VoterInfo) bool {
		info.position = i
		orderedVoters[i] = IDVoterInfo[ID]{id, info}
		i++
		return true
	})

	if totalWeight == 0 {
		panic("weight can not be zero")
	}

	return &VoterSet[ID]{
		voters:      orderedVoters,
		totalWeight: totalWeight,
		threshold:   threshold(totalWeight),
	}
}

// Get the voter info for the voter with the given ID, if any.
func (vs VoterSet[ID]) Get(id ID) *VoterInfo {
	idx, ok := slices.BinarySearchFunc(vs.voters, IDVoterInfo[ID]{ID: id}, func(a, b IDVoterInfo[ID]) int {
		switch {
		case a.ID == b.ID:
			return 0
		case a.ID > b.ID:
			return 1
		case b.ID > a.ID:
			return -1
		default:
			panic("unreachable")


0\uac00": 6, "\uc801\uc6a9\ub41c\ub2e4": 6, "\uadf8\ub8f9\ubcc4\ub85c": [6, 9], "\ub2e4\ub974\ub2e4\uace0": 6, "\ud310\ub2e8\ud574\uc11c": 6, "\ud68c\uadc0\ubd84\uc11d\uc744": [6, 10], "\uc9c4\ud589\ud558\uace0": 6, "\uc2f6\ub2e4\uba74": 6, "\ud3ec\ud654\ubaa8\ub378\uc744": 6, "_bucket": 6, "\ub098\ub204\uace0": [6, 12], "\uac83\uacfc": 6, "\ud3ec\ud654\ubaa8\ub378\uc740": 6, "\ub354\ubbf8\ubcc0\uc218\uc640": [6, 12], "\uc0c1\ud638\uc791\uc6a9": [6, 9, 10], "\ud56d\uc5d0\uc11c": 6, "\ub354\ubbf8\ubcc0\uc218\uc5d0": 6, "\ud574\ub2f9\ud558\ub294": [6, 10], "\uc74c\uc758": 6, "\uadf8\ub798\ud504\uc640": 6, "\uadf8\ub798\ud504\uac00": 6, "\ub098\ud0c0\ub098\ub294\ub370": 6, "\ud45c\ub97c": 6, "\ubcf4\uba74": [6, 10, 13], "\uad70\uc744": 6, "\ub098\ub220\uc11c": 6, "\ud45c\ubcf8": [6, 9, 10, 12], "\uc791\uc544\uc84c\uace0": 6, "\uac83\uc73c\ub85c": 6, "\uacb0\ud569\ud560": 6, "\uadf8\ub8f9\uc5d0\uc11c": 6, "\ube44\ub840\ud558\ub294": 6, "\uc608\uc2dc\ub294": [6, 14], "\uad50\uc7ac": 6, "biggl": 6, "bigg": 6, "partial": 6, "group_i": 6, "\ud68c\uadc0\ubd84\uc11d\uc5d0\uc11c\ub294": 6, "propto": 6, "\ud68c\uadc0\ubd84\uc11d\uc5d0\uc11c": [6, 12], "\uace0\ub824\ud574\uc57c": [6, 12], "\uc720\ud615\uc758": 6, "\ud1b5\uc81c\ubcc0\uc218\uac00": 6, "\uc77c\ubd80": 6, "\ubb34\ud574\ud574": 6, "\ubcf4\uc774\uc9c0\ub9cc": 6, "\ud574\ub85c\uc6b8": 6, "\ud1b5\uc81c\ubcc0\uc218\ub4e4\uc774\ub2e4": 6, "\ud1b5\uc81c\ubcc0\uc218\ub294": 6, "\ucd94\uc815\uc5d0\uc11c": 6, "\uc54a\ub294\ub2e4\ub294": 6, "\uc810\uc5d0\uc11c": 6, "\uc911\ub9bd\uc801\uc774\ub77c\uace0": 6, "\ubd84\uc0b0\uc5d0\ub294": 6, "\uc2ec\uac01\ud55c": 6, "\uc904": [6, 9], "_score2": 6, "\ud3ec\ud568\ud558\uba74": 6, "_limit": 6, "\uac10\uc18c\ud588\ub2


),
                      })
                    );
                  }
                }
              });
          })
      );
    });
  });
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import {Observable} from 'rxjs/Observable';

@Injectable()
export class ShiftValueService {
  private shiftSource = new BehaviorSubject<number>(null);
  currentShiftValue = this.shiftSource.asObservable() as Observable<number>;
  constructor() {}

  changeShiftValue(shift: number) {
    this.shiftSource.next(shift);
  }
}
import {Predicate} from './types';

import handleCurry from './utils/handleCurry';
import isUndefined from './undefined';
import isFunction from './function';
import {getDescription, setDescription} from './utils/description';
import {getPredicateForType} from './typeToPredicate';

/**
 * Checks whether a value is undefined or satisfies given predicate
 * Very useful to check optional arguments of function.
 *
 * @example
 * const isUndefinedOrString = is.undefinedOr(is.string);
 *
 * isUndefinedOrString(undefined); // true
 * isUndefinedOrString('test'); // true
 *
 * // same as
 * is.undefinedOr(is.string, undefined); // true
 * is.undefinedOr(is.string, 'test'); // true
 *
 * isUndefinedOrString({}); // false
 *
 * // simpler for common types
 * is.undefinedOr(String)(undefined); // true
 * is.undefinedOr(String)('test'); // true
 *
 * @throws {TypeError} if provided predicate is not a function
 */
function isUndefinedOr<T = any>(predicate: Predicate | Function): Predicate<undefined | T>;
function isUndefinedOr<T = any>(predicate: Predicate | Function, value: any): boolean;
function isUndefinedOr<T = any>(predicate: Predicate | Function, value?: any): boolean | Predicate<undefined | T> {
    if (!isFunction(predicate)) {
        throw new TypeError('Predicate must be a function');
    }

    predicate = getPredicateForType(predicate) || predicate;

    return handleCurry.call(this, arguments,
        setDescription(
            function (value: any) {
                return isUndefined(value) || predicate.apply(this, arguments);
            },
            'undefined or ' + getDescription(<Predicate>predicate)
        )
    );
}

export default isUndefinedOr;
/*----------------------------app.component.html---------------------------------*/

Develop a Angular project that uses template reference variable for text box, text area and select drop down control

        <select #select [(ngModel)]="selectedcity" (change)="log(select.value)">
            <option *ngFor="let city of cities" [value]="city.id">{{city.name}}</option>
        </select>

        <button (click)="Str=''">Clear</button>

    {{Str}}

/*----------------------------app.component.ts-----------------------------------*/
import { stringify } from '@angular/compiler/src/util';
import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'angularAssignment1';
  selectedcity:number=0;

  public cities:any=[
    {
      id:1,
      name:'Chennai',
      state:'TN'
    },
    {
      id:2,
      name:'Hyderabad',
      state:'TS'
    },
    {
      id:3,
      name:'V


// Include the base styles for Angular Material core. We include this here so that you only
// have to load a single css file for Angular Material in your app.
@include mat.core();

// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue.
$rxjs-primary: mat.define-palette(mat.$pink-palette, 700, 600, 800);
$rxjs-accent:  mat.define-palette(mat.$red-palette, 700, 600, 800);

// The warn palette is optional (defaults to red).
$rxjs-warn:    mat.define-palette(mat.$red-palette);

// Create the theme object (a Sass map containing all of the palettes).
$rxjs-theme: mat.define-light-theme($rxjs-primary, $rxjs-accent, $rxjs-warn);

// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include mat.all-component-themes($rxjs-theme);
@use '@angular/material' as mat;

@mixin docs-site-typography-theme($theme) {
  $primary: map-get($theme, primary);
  $accent: map-get($theme, accent);
  $warn: map-get($theme, warn);
  $background: map-get($theme, background);
  $foreground: map-get($theme, foreground);

  .docs-component-viewer-tabbed-content,
  .docs-guide-content {
      h1 {
        color: mat.get-color-from-palette($primary, 800);
        background: rgba(mat.get-color-from-palette($foreground, secondary-text), .03);
      }

      h3, h2, h4, h5, p, ol, li {
        color: mat.get-color-from-palette($foreground, secondary-text);
      }

      a {
        color: mat.get-color-from-palette($primary);
      }

      .nav-link:visited {
        text-decoration: none;
      }

      table {
        box-shadow: 0 2px 2px rgba(0,0,0,0.24), 0 0 2px rgba(0,0,0,0.12);
      }

      table > tbody > tr > th {
        border: 1px solid rgba(mat.get-color-from-palette($foreground, secondary-text), .03);
      }

      td {
        color: mat.get-color-from-palette($foreground, secondary-text);
        border: 1px solid rgba(mat.get-color-from-palette($foreground, secondary-text), .03);
      }

      th {
        color: mat.get-color-from-palette($foreground, secondary-text);
        background: rgba(mat.get-color-from-palette($foreground, secondary-text), .03);
      }
  }
}
body {
  font-family: $main-font;
  margin: 0;
  color: $darkgray;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  display: inline-block;
  font-size: 24px;
  font-weight: 500;
  margin: 8px 0px;


using FF1Lib.Procgen;
using FF1Lib.Sanity;
using RomUtilities;
using System.IO.Compression;
using static FF1Lib.FF1Rom;

namespace FF1Lib
{
	public partial class StandardMaps
	{
		public void ProcgenDungeons(MT19337 rng)
		{
			if ((bool)flags.ProcgenEarth)
			{
				LoadPregenDungeon(rng, teleporters, "earthcaves.zip");

				// Here's the code to generate from scratch, but it takes too long in the browser.
				// So we get one from the pregen pack above.
				//
				// var newmaps = await NewDungeon.GenerateNewDungeon(rng, this, MapIndex.EarthCaveB1, maps, npcdata, this.Progress);
				// foreach (var newmap in newmaps) {
				//   this.ImportCustomMap(maps, teleporters, overworldMap, npcdata, newmap);
				//  }
			}

			//ProcgenWaterfall((bool)flags.EFGWaterfall, teleporters, mapObjects[(int)MapIndex.Waterfall], rng);
			FlipMaps(flags, rng);
		}
		public void Update(ZoneFormations formations, MT19337 rng)
		{
			// Towns
			EnableLefeinShops((bool)flags.LefeinShops);
			EnableMelmondClinic((bool)flags.MelmondClinic);
			RandomVampireAttack((bool)flags.RandomVampAttack, (bool)flags.LefeinShops, (bool)flags.RandomVampAttackIncludesConeria, rng);
			ShufflePravoka((bool)flags.ShufflePravokaShops, AttackedTown == MapIndex.Pravoka, rng);
			EnableLefeinShortcut((bool)flags.LefeinShortcut);
			EnableGaiaShortcut((bool)flags.GaiaShortcut);
			MoveGaiaItemShop((bool)flags.MoveGaiaItemShop && (bool)flags.GaiaShortcut, rng);
			EnableLefeinSuperStore((bool)flags.LefeinSuperStore && (flags.ShopKillMode_White == ShopKillMode.None && flags.ShopKillMode_Black == ShopKillMode.None), flags.NoOverworld);
			ConfusedOldMen((bool)flags.ConfusedOldMen, rng);

			// Dungeons, disable if dd is enabled
			if (flags.GameMode != GameModes.DeepDungeon)
			{
				MoveToFBats((bool)flags.MoveToFBats);
				EnableTitansTrove((bool)flags.TitansTrove);
				ShuffleOrdeals((bool)flags.OrdealsPillars, rng, teleporters);
				SkyCastle4FMode(flags.SkyCastle4FMazeMode, rng);
				BahamutB1Encounters((bool)flags.MapHallOfDragons, formations);
				DragonsHoard((bool)flags.MapDragonsHoard);
				MermaidPrison((bool)flags.MermaidPrison);
			}
		}

		private void MoveToFBats(bool movebats)
		{
			if (!movebats)
			{
				return;
			}
			mapObjects[(int)MapIndex.TempleOfFiends].MoveNpc(2, 0x0C, 0x0D, false, false);
			mapObjects[(int)MapIndex.TempleOfFiends].MoveNpc(3, 0x1D, 0x0B, false, false);
			mapObjects[(int)MapIndex.TempleOfFiends].MoveNpc(4, 0x1A, 0x19, false, false);
			mapObjects[(int)MapIndex.Temple


', 'Mean-souree', 'Jerrey-souree', 'Luanistyn', 'Mean-fouyir',
    'Jerrey-fouyir', 'Mee Houney', 'Mee ny Nollick'],
  SHORTMONTHS: ['J-guer', 'T-arree', 'Mayrnt', 'Avrril', 'Boaldyn', 'M-souree',
    'J-souree', 'Luanistyn', 'M-fouyir', 'J-fouyir', 'M.Houney', 'M.Nollick'],
  STANDALONESHORTMONTHS: ['J-guer', 'T-arree', 'Mayrnt', 'Avrril', 'Boaldyn',
    'M-souree', 'J-souree', 'Luanistyn', 'M-fouyir', 'J-fouyir', 'M.Houney',
    'M.Nollick'],
  WEEKDAYS: ['Jedoonee', 'Jelhein', 'Jemayrt', 'Jercean', 'Jerdein', 'Jeheiney',
    'Jesarn'],
  STANDALONEWEEKDAYS: ['Jedoonee', 'Jelhein', 'Jemayrt', 'Jercean', 'Jerdein',
    'Jeheiney', 'Jesarn'],
  SHORTWEEKDAYS: ['Jed', 'Jel', 'Jem', 'Jerc', 'Jerd', 'Jeh', 'Jes'],
  STANDALONESHORTWEEKDAYS: ['Jed', 'Jel', 'Jem', 'Jerc', 'Jerd', 'Jeh', 'Jes'],
  NARROWWEEKDAYS: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
  STANDALONENARROWWEEKDAYS: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
  SHORTQUARTERS: ['Q1', 'Q2', 'Q3', 'Q4'],
  QUARTERS: ['Q1', 'Q2', 'Q3', 'Q4'],
  AMPMS: ['a.m.', 'p.m.'],
  DATEFORMATS: ['EEEE dd MMMM y', 'dd MMMM y', 'MMM dd, y', 'dd/MM/yy'],
  TIMEFORMATS: ['HH:mm:ss zzzz', 'HH:mm:ss z', 'HH:mm:ss', 'HH:mm'],
  DATETIMEFORMATS: ['{1} {0}', '{1} {0}', '{1} {0}', '{1} {0}'],
  FIRSTDAYOFWEEK: 0,
  WEEKENDRANGE: [5, 6],
  FIRSTWEEKCUTOFFDAY: 6
};

/**
 * Date/time formatting symbols for locale gv_IM.
 */
goog.i18n.DateTimeSymbols_gv_IM = goog.i18n.DateTimeSymbols_gv;

/**
 * Date/time formatting symbols for locale ha.
 */
goog.i18n.DateTimeSymbols_ha = {
  ERAS: ['KHAI', 'BHAI'],
  ERANAMES: ['Kafin haihuwar annab', 'Bayan haihuwar annab'],
  NARROWMONTHS: ['J', 'F', 'M', 'A', 'M', 'Y', 'Y', 'A', 'S', 'O', 'N', 'D'],
  STANDALONENARROWMONTHS: ['J', 'F', 'M', 'A', 'M', 'Y', 'Y', 'A', 'S', 'O',
    'N', 'D'],
  MONTHS: ['Janairu', 'Faburairu', 'Maris', 'Afirilu', 'Mayu', 'Yuni', 'Yuli',
    'Agusta', 'Satumba', 'Oktoba', 'Nuwamba', 'Disamba'],
  STANDALONEMONTHS: ['Janairu', 'Faburairu', 'Maris', 'Afirilu', 'Mayu', 'Yuni',
    'Yuli', 'Agusta', 'Satumba', 'Oktoba', 'Nuwamba', 'Disamba'],
  SHOR


:expect/expect.dart';

class C {}

main() {
  var classDeclarations = reflectClass(C).declarations;
  Expect.isTrue(classDeclarations is Map<Symbol, DeclarationMirror>);
  Expect.isTrue(classDeclarations.values is Iterable<DeclarationMirror>);
  Expect.isTrue(
    classDeclarations.values.where((x) => true) is Iterable<DeclarationMirror>,
  );
  Expect.isFalse(classDeclarations is Map<Symbol, MethodMirror>);
  Expect.isFalse(classDeclarations.values is Iterable<MethodMirror>);
  Expect.isFalse(
    classDeclarations.values.where((x) => true) is Iterable<MethodMirror>,
  );

  var libraryDeclarations =
      (reflectClass(C).owner as LibraryMirror).declarations;
  Expect.isTrue(libraryDeclarations is Map<Symbol, DeclarationMirror>);
  Expect.isTrue(libraryDeclarations.values is Iterable<DeclarationMirror>);
  Expect.isTrue(
    libraryDeclarations.values.where((x) => true)
        is Iterable<DeclarationMirror>,
  );
  Expect.isFalse(libraryDeclarations is Map<Symbol, ClassMirror>);
  Expect.isFalse(libraryDeclarations.values is Iterable<ClassMirror>);
  Expect.isFalse(
    libraryDeclarations.values.where((x) => true) is Iterable<ClassMirror>,
  );
}
// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

library test.abstract_class_test;

import 'dart:mirrors';
import 'package:expect/expect.dart';

void main() {
  testSimple();
  testFunctionType();
  testFakeFunction();
  testGeneric();
  testAnonMixinApplication();
  testNamedMixinApplication();
}

abstract class Foo {
  foo();
}

class Bar extends Foo {
  foo() {}
}

testSimple() {
  Expect.isTrue(reflectClass(Foo).isAbstract);
  Expect.isFalse(reflectClass(Bar).isAbstract);
  Expect.isTrue(reflect(new Bar()).type.superclass!.isAbstract);
  Expect.isFalse(reflect(new Bar()).type.isAbstract);
}

void baz() {}

testFunctionType() {
  Expect.isFalse(reflect(baz).type.isAbstract);
}

abstract class FunctionFoo implements Function {
  call();
}

class FunctionBar extends FunctionFoo {
  call() {}
}

testFakeFunction() {
  Expect.isTrue(reflectClass(FunctionFoo).isAbstract);
  Expect.isFalse(reflectClass(FunctionBar).isAbstract);
  Expect.isTrue(reflect(new FunctionBar()).type.superclass!.isAbstract);
  Expect.isFalse(reflect(new FunctionBar()).type.isAbstract);
}

abstract class GenericFoo<T> {
  T genericFoo(T t);
}

class GenericBar<T> extends GenericFoo<T> {
  T genericFoo(T t) => t;
}

testGeneric() {
  // Unbound.
  Expect.isTrue(reflectClass(GenericFoo).isAbstract);
  Expect.isFalse(reflectClass(GenericBar).isAbstract);
  // Bound.
  Expect.isTrue(reflect(new GenericBar<int>()).type.superclass!.isAbstract);
  Expect.isFalse(reflect(new GenericBar<int>()).type.isAbstract);
}

class S {}

abstract class M {
  mixinFoo();
}

abstract class MA extends S with M {}

class SubMA extends MA {
  mixinFoo() {}
}

class ConcreteMA extends S wit


 ActiveStack {
    Usp,
    Isp,
    Msp,
}

#[derive(Debug)]
pub enum OperationSize {
    Byte,
    Word,
    Long,
}

#[derive(Debug)]
pub enum Destination {
    EA,
    Dn,
}

#[derive(Debug)]
pub enum ShiftDirection {
    Left,
    Right,
}

impl std::fmt::Display for ShiftDirection {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let display = match self {
            ShiftDirection::Left => "l",
            ShiftDirection::Right => "r",
        };
        write!(f, "{}", display)
    }
}

#[derive(Debug)]
pub enum AddressingMode {
    DataRegister(u8),
    AddressRegister(u8),
    Address(u8),
    AddressWithPostincrement(u8),
    AddressWithPredecrement(u8),
    AddressWithDisplacement(u8),
    AddressWithIndex(u8),
    ProgramCounterWithDisplacement,
    ProgramCounterWithIndex,
    AbsoluteShort,
    AbsoluteLong,
    Immediate,
}

impl AddressingMode {
    fn parse(mode: u8, reg: u8) -> AddressingMode {
        match (mode, reg) {
            (0b000, 0..=7) => AddressingMode::DataRegister(reg),
            (0b001, 0..=7) => AddressingMode::AddressRegister(reg),
            (0b010, 0..=7) => AddressingMode::Address(reg),
            (0b011, 0..=7) => AddressingMode::AddressWithPostincrement(reg),
            (0b100, 0..=7) => AddressingMode::AddressWithPredecrement(reg),
            (0b101, 0..=7) => AddressingMode::AddressWithDisplacement(reg),
            (0b110, 0..=7) => AddressingMode::AddressWithIndex(reg),
            (0b111, 0b010) => AddressingMode::ProgramCounterWithDisplacement,
            (0b111, 0b011) => AddressingMode::ProgramCounterWithIndex,
            (0b111, 0b000) => AddressingMode::AbsoluteShort,
            (0b111, 0b001) => AddressingMode::AbsoluteLong,
            (0b111, 0b100) => AddressingMode::Immediate,
            _ => panic!("Invalid Addressing Mode: {} {}", mode, reg),
        }
    }
}

impl std::fmt::Display for OperationSize {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let display = match self {
            OperationSize::Byte => "b",
            OperationSize::Word => "w",
            OperationSize::Long => "l",
        };
        write!(f, "{}", display)
    }
}

impl OperationSize {
    fn from_u16(element: u16) -> OperationSize {
        match element {
            0xFF => OperationSize::Long,
            0x00 => OperationSize::Word,
            _other => OperationSize::Byte,
        }
    }
}

#[derive(FromPrimitive, ToPrimitive)]
pub enum Condition {
    T = 0b0000,
    F = 0b0001,
    HI = 0b0010,
    LS = 0b0011,
    CC = 0b0100,
    CS = 0b0101,
    NE = 0b0110,
    EQ = 0b0111,
    VC = 0b1000,
    VS = 0b1001,
    PL = 0b1010,
    MI = 0b1011,
    GE = 0b1100,
    LT = 0b1101,
    GT = 0b1110,
    LE = 0b1111,
}

impl fmt::Display for Condition {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let text = match self {
            Condition::T => "t",
            Condition::F => "f",
            Condition::HI => "hi",


_INSTRUCTIONS_COMMENTS)
            {
                psContext->AddIndentation();
                bcatcstr(glsl, "//ATOMIC_AND\n");
            }
            func = "And";
            dest = &psInst->asOperands[0];
            destAddr = &psInst->asOperands[1];
            src = &psInst->asOperands[2];
            break;
        }
        case OPCODE_IMM_ATOMIC_OR:
        {
            if (psContext->flags & HLSLCC_FLAG_INCLUDE_INSTRUCTIONS_COMMENTS)
            {
                psContext->AddIndentation();
                bcatcstr(glsl, "//IMM_ATOMIC_OR\n");
            }
            func = "Or";
            previousValue = &psInst->asOperands[0];
            dest = &psInst->asOperands[1];
            destAddr = &psInst->asOperands[2];
            src = &psInst->asOperands[3];
            break;
        }
        case OPCODE_ATOMIC_OR:
        {
            if (psContext->flags & HLSLCC_FLAG_INCLUDE_INSTRUCTIONS_COMMENTS)
            {
                psContext->AddIndentation();
                bcatcstr(glsl, "//ATOMIC_OR\n");
            }
            func = "Or";
            dest = &psInst->asOperands[0];
            destAddr = &psInst->asOperands[1];
            src = &psInst->asOperands[2];
            break;
        }
        case OPCODE_IMM_ATOMIC_XOR:
        {
            if (psContext->flags & HLSLCC_FLAG_INCLUDE_INSTRUCTIONS_COMMENTS)
            {
                psContext->AddIndentation();
                bcatcstr(glsl, "//IMM_ATOMIC_XOR\n");
            }
            func = "Xor";
            previousValue = &psInst->asOperands[0];
            dest = &psInst->asOperands[1];
            destAddr = &psInst->asOperands[2];
            src = &psInst->asOperands[3];
            break;
        }
        case OPCODE_ATOMIC_XOR:
        {
            if (psContext->flags & HLSLCC_FLAG_INCLUDE_INSTRUCTIONS_COMMENTS)
            {
                psContext->AddIndentation();
                bcatcstr(glsl, "//ATOMIC_XOR\n");
            }
            func = "Xor";
            dest = &psInst->asOperands[0];
            destAddr = &psInst->asOperands[1];
            src = &psInst->asOperands[2];
            break;
        }

        case OPCODE_IMM_ATOMIC_EXCH:
        {
            if (psContext->flags & HLSLCC_FLAG_INCLUDE_INSTRUCTIONS_COMMENTS)
            {
                psContext->AddIndentation();
                bcatcstr(glsl, "//IMM_ATOMIC_EXCH\n");
            }
            func = "Exchange";
            previousValue = &psInst->asOperands[0];
            dest = &psInst->asOperands[1];
            destAddr = &psInst->asOperands[2];
            src = &psInst->asOperands[3];
            break;
        }
        case OPCODE_IMM_ATOMIC_CMP_EXCH:
        {
            if (psContext->flags & HLSLCC_FLAG_INCLUDE_INSTRUCTIONS_COMMENTS)
            {
                psContext->AddIndentation();
                bcatcstr(glsl, "//IMM_ATOMIC_CMP_EXC\n");
            }
            func = "CompSwap";
            previousValue = &psInst->asOperands[0];
            dest = &psInst->asOperands[1];
            destAddr = &psInst->asOperands[2];
            compare = &psInst->asOperands[3];


name);
                match status.value.clone().to_lowercase().as_ref() {
                    "on" => {
                        Some(Sample::new(metric_name, 0))
                    },
                    "off" => {
                        Some(Sample::new(metric_name, 1))
                    },
                    value => {
                        error! ("Failed to parse 'wsrep_ready', because '{}' is an unexpected value.", value);
                        None
                    }
                }
            },
            x => {
                warn! ("Galera collector found new wsrep status '{}'.", x);
                None
            }
        }
    }
}

fn query_wsrep_status(pool: &my::Pool) -> Result<Vec<WsrepStatus>, Error> {
    let res = pool.prep_exec("SHOW GLOBAL STATUS LIKE 'wsrep_%'", ());
    match res {
        Ok(result) => {
            let wsrep_states = result.map(|x| x.unwrap())
                .map(|row| {
                    let (name, value): (String, String) = my::from_row(row);
                    WsrepStatus::new(name, value)
                })
                .collect();
            Ok(wsrep_states)
        },
        Err(error) => {
            warn!("Failed to query Galera status, because {}", &error);
            Err(Error::CollectionError(format!("{}", error)))
        }
    }
}

trait ConvertToMetric {
    fn convert_to_metric(self) -> Vec<Sample>;
}

impl ConvertToMetric for Vec<WsrepStatus> {
    fn convert_to_metric(self) -> Vec<Sample> {
        self.into_iter()
            .flat_map(|x| Option::<Sample>::from(x))
            .collect()
    }
}

#[cfg(test)]
mod tests {
    use super::{WsrepStatus, ConvertToMetric};
    use crate::bosun::Sample;

    impl PartialEq for Sample {
        fn eq(&self, other: &Sample) -> bool {
            if self.metric == other.metric &&
                self.value == other.value {
                return true
            }
            false
        }
    }

    #[test]
    fn convert_correct_test_data() -> () {
        let test_data = generate_test_data();

        let metric_data = test_data.convert_to_metric();

        assert_eq!(metric_data, vec ! [
            Sample::new( "galera.wsrep.local.state.uuid", 223231124026558f64 ),
            Sample::new( "galera.wsrep.protocol.version", 7 ),
            Sample::new( "galera.wsrep.last.committed", 15156 ),
            Sample::new( "galera.wsrep.replicated", 27 ),
            Sample::new( "galera.wsrep.replicated.bytes", 12308 ),
            Sample::new( "galera.wsrep.repl.keys", 172 ),
            Sample::new( "galera.wsrep.repl.keys.bytes", 1997 ),
            Sample::new( "galera.wsrep.repl.data.bytes", 8583 ),
            Sample::new( "galera.wsrep.repl.other.bytes", 0 ),
            Sample::new( "galera.wsrep.received", 14 ),
            Sample::new( "galera.wsrep.received.bytes", 4893 ),
            Sample::new( "galera.wsrep.local.commits", 25 ),
            Sample::new( "galera.wsrep.local.cert.failures", 0 ),
            Sample::new( "galera.wsrep.local.replays", 0 ),
            Sample::new( "galera.wsrep.local.send.queue", 0 ),
            Sample::new(


));
				end
				assert.are.equal(q:pop(), 1001);
				assert.are.equal(q:count(), 0);
			end

			do
				-- Test queues that purge old items when pushing to a full queue
				local q = queue.new(10, true);

				for i = 1, 10 do
					q:push(i);
				end

				assert.are.equal(q:count(), 10);

				assert.is_true(q:push(11));
				assert.are.equal(q:count(), 10);
				assert.are.equal(q:pop(), 2); -- First item should have been purged
				assert.are.equal(q:peek(), 3);

				for i = 12, 32 do
					assert.is_true(q:push(i));
				end

				assert.are.equal(q:count(), 10);
				assert.are.equal(q:pop(), 23);
			end

			do
				-- Test iterator
				local q = queue.new(10, true);

				for i = 1, 10 do
					q:push(i);
				end

				local i = 0;
				for item in q:items() do
					i = i + 1;
					assert.are.equal(item, i, "unexpected item returned by iterator")
				end
			end

		end);
	end);
	describe("consume()", function ()
		it("should work", function ()
			local q = queue.new(10);
			for i = 1, 5 do
				q:push(i);
			end
			local c = 0;
			for i in q:consume() do
				assert(i == c + 1);
				assert(q:count() == (5-i));
				c = i;
			end
		end);

		it("should work even if items are pushed in the loop", function ()
			local q = queue.new(10);
			for i = 1, 5 do
				q:push(i);
			end
			local c = 0;
			for i in q:consume() do
				assert(i == c + 1);
				if c < 3 then
					assert(q:count() == (5-i));
				else
					assert(q:count() == (6-i));
				end

				c = i;

				if c == 3 then
					q:push(6);
				end
			end
			assert.equal(c, 6);
		end);
	end);
	describe("replace()", function ()
		it("should work", function ()
			local q = queue.new(10);
			for i = 1, 5 do
				q:push(i);
			end
			q:replace(6);
			local c = 0;
			for i in q:consume() do
				c = c + 1;
				if c > 1 then
					assert.is_equal(c, i);
				elseif c == 1 then
					assert.is_equal(6, i);
				end
			end
			assert.is_equal(5, c);
		end);
	end);
end);


-- Pull in the wezterm API
local wezterm = require("wezterm")
local act = wezterm.action

wezterm.on("update-right-status", function(window, pane)
	-- "Wed Mar 3 08:14"
	local date = "[ " .. wezterm.strftime("%a %b %-d %H:%M") .. " ]"

	local bat = ""
	for _, b in ipairs(wezterm.battery_info()) do
		bat = "[ Power " .. string.format("%.0f%%", b.state_of_charge * 100) .. " ]"
	end

	-- local leader = ""
	-- if window:leader_is_active() then
	-- 	leader = "LEADER"
	-- end
	-- local dead = ""
	-- if window:dead_key_is_active() then
	-- 	dead = "DEAD"
	-- end
	-- window:set_right_status(leader .. " " .. dead)

	window:set_right_status(wezterm.format({
		{ Text = bat .. " - " .. date },
	}))
end)

-- -- This will hold the configuration.
local config = wezterm.config_builder()

config.leader = { key = "a", mods = "CTRL" }

--
-- -- This is where you actually apply your config choices
-- -- Spawn a fish shell in login mode
-- config.default_prog = { "/usr/bin/fish", "-l" }
-- config.default_prog = { "/usr/bin/bash", "fish -l" }
--
-- -- For example, changing the color scheme:
-- config.color_scheme = "AdventureTime"
-- config.color_scheme = "Catppuccin Mocha"
-- config.color_scheme = "Neon"
-- config.color_scheme = "Mono (terminal.sexy)"
-- config.color_scheme = "Mono Theme (terminal.sexy)"
-- config.color_scheme = "Mono Cyan (Gogh)"
-- config.color_scheme = "Mono White (Gogh)"
-- config.color_scheme = "City Streets (terminal.sexy)"
-- config.color_scheme = "Dark Violet (base16)"
config.color_scheme = "Dracula (base16)"

config.colors = {
	background = "black",
	tab_bar = {
		background = "none",

		active_tab = {
			-- The color of the background area for the tab
			bg_color = "none",
			-- The color of the text for the tab
			fg_color = "#ffffff",

			-- Specify whether you want "Half", "Normal" or "Bold" intensity for the
			-- label shown for this tab.
			-- The default is "Normal"
			intensity = "Bold",

			-- Specify whether you want "None", "Single" or "Double" underline for
			-- label shown for this tab.
			-- The default is "None"
			underline = "None",

			-- Specify whether you want the text to be italic (true) or not (false)
			-- for


a6.col
        iterator(60.pct) shouldBe 0x99a6ad.col
        iterator(75.pct) shouldBe 0xbfb0b8.col
        iterator(100.pct) shouldBe Colors.Web.pink
        iterator(200.pct) shouldBe Colors.Web.pink
    }

    @Test
    fun linearRGBInterpolationWhiteToBlue() {
        val iterator = rgbLinearInterpolator(Colors.Web.white, Colors.Web.blue)
        iterator(-100.pct) shouldBe Colors.Web.white
        iterator(0.pct) shouldBe Colors.Web.white
        iterator(13.pct) shouldBe 0xeeeeff.col
        iterator(25.pct) shouldBe 0xddddff.col
        iterator(50.pct) shouldBe 0xb4b4ff.col
        iterator(60.pct) shouldBe 0xa1a1ff.col
        iterator(75.pct) shouldBe 0x8080ff.col
        iterator(100.pct) shouldBe Colors.Web.blue
        iterator(200.pct) shouldBe Colors.Web.blue
    }

    @Test
    fun linearRGBInterpolationTeal2Pink() {
        val iterator = rgbLinearInterpolator(Colors.Web.teal, Colors.Web.pink)
        iterator(-100.pct) shouldBe Colors.Web.teal
        iterator(0.pct) shouldBe Colors.Web.teal
        iterator(13.pct) shouldBe 0x5c8a8c.col
        iterator(25.pct) shouldBe 0x809396.col
        iterator(50.pct) shouldBe 0xb4a3aa.col
        iterator(60.pct) shouldBe 0xc6a9b1.col
        iterator(75.pct) shouldBe 0xddb2bb.col
        iterator(100.pct) shouldBe Colors.Web.pink
        iterator(200.pct) shouldBe Colors.Web.pink
    }

    @Test
    fun RGBSinebowInterpolation() {
        val iterator = rgbSineBowInterpolator()
        iterator(-100.pct) shouldBe "#FF4040".col

        // cyclical (very small differences with 25% and 75% due to rounding)
        iterator(-25.pct) shouldBe 0x8011ee.col
        iterator(125.pct) shouldBe 0x80ee11.col

        iterator(0.pct) shouldBe "#FF4040".col
        iterator(25.pct) shouldBe 0x7fee11.col
        iterator(50.pct) shouldBe 0x00bfbf.col
        iterator(75.pct) shouldBe 0x7f11ee.col
        iterator(100.pct) shouldBe "#FF4040".col
        iterator(200.pct) shouldBe "#FF4040".col
    }
}
/*
 * Copyright (c) 2018-2021. data2viz sàrl.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package io.data2viz.format

import io.data2viz.test.TestBase
import kotlin.test.Ignore
import kotlin.test.Test

class FormatTypeDecimalOrExponentTests : TestBase() {

    @Test
    fun format_g_


test(r)){m=r;if(r==";")return"punctuation";return null}else{return null}}function v(e){return function(t,r){if(t.eat("\\")){var n=t.next();if(n=="x")t.match(/^[a-f0-9]{2}/i);else if((n=="u"||n=="U")&&t.eat("{")&&t.skipTo("}"))t.next();else if(n=="u")t.match(/^[a-f0-9]{4}/i);else if(n=="U")t.match(/^[a-f0-9]{8}/i);else if(/[0-7]/.test(n))t.match(/^[0-7]{1,2}/);return"string.special"}else{var i;while((i=t.next())!=null){if(i==e){r.tokenize=d;break}if(i=="\\"){t.backUp(1);break}}return"string"}}}var k=1,x=2,b=4;function h(e,t,r){e.ctx={type:t,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function g(e,t){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|t,column:r.column,prev:r.prev}}function y(e){e.indent=e.ctx.indent;e.ctx=e.ctx.prev}const _={name:"r",startState:function(e){return{tokenize:d,ctx:{type:"top",indent:-e,flags:x},indent:0,afterIdent:false}},token:function(e,t){if(e.sol()){if((t.ctx.flags&3)==0)t.ctx.flags|=x;if(t.ctx.flags&b)y(t);t.indent=e.indentation()}if(e.eatSpace())return null;var r=t.tokenize(e,t);if(r!="comment"&&(t.ctx.flags&x)==0)g(t,k);if((m==";"||m=="{"||m=="}")&&t.ctx.type=="block")y(t);if(m=="{")h(t,"}",e);else if(m=="("){h(t,")",e);if(t.afterIdent)t.ctx.argList=true}else if(m=="[")h(t,"]",e);else if(m=="block")h(t,"block",e);else if(m==t.ctx.type)y(t);else if(t.ctx.type=="block"&&r!="comment")g(t,b);t.afterIdent=r=="variable"||r=="keyword";return r},indent:function(e,t,r){if(e.tokenize!=d)return 0;var n=t&&t.charAt(0),i=e.ctx,a=n==i.type;if(i.flags&b)i=i.prev;if(i.type=="block")return i.indent+(n=="{"?0:r.unit);else if(i.flags&k)return i.column+(a?0:1);else return i.indent+(a?0:r.unit)},languageData:{wordChars:".",commentTokens:{line:"#"},autocomplete:i.concat(a,l)}}}}]);"use strict";(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[9400],{42519:function(t,e,r){var o=this&&this.__extends||function(){var t=function(e,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]};return t(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();var n=this&&this.__values||function(t)


#pragma once

#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include "CPlayButtonGroupWidget.h"
#include "CTimeSlider.h"

class CPlayCtrlBar : public QWidget
{
	Q_OBJECT

public:
	CPlayCtrlBar(QWidget *parent = Q_NULLPTR);
	~CPlayCtrlBar();

	void showTimeLabel(bool isShow);
	void setCurPlayTime(const QString& curPlaytime);

	void setTimeSliderRange(qint64 value);
	void setSliderValue(qint64 value);
	void showSlider(bool flag);

	void SetPlayButtonIcon(bool isPlay);

private:
	void InitUI();
	void RestoreUI();

private slots:
	void onSliderMoved(int position);

signals:
	void sig_play();
	void sig_stop();
	void sig_fullScreen();
	void sig_playRate(double rate);
	void sig_SliderMove(int value);

private:
	void resizeEvent(QResizeEvent* event) override;
	bool eventFilter(QObject* watched, QEvent* event) override;

private:
	CTimeSlider* m_pTimeSlider = nullptr;
	QLabel* m_pCurPlayTimeLabel = nullptr;
	CPlayButtonGroupWidget* m_pPlayButtonGroupWidget = nullptr;
	QPushButton* m_pSpeedButton = nullptr;
	QPushButton* m_pFullscreenButton = nullptr;
};


autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-wp8-horizontal{touch-action:pan-y}.swiper-wp8-vertical{touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background:no-repeat 50%}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M0 22L22 0l2.1 2.1L4.2 22l19.9 19.9L22 44 0 22z' fill='%23007aff'/%3E%3C/svg%3E");left:10px;right:auto}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M0 22L22 0l2.1 2.1L4.2 22l19.9 19.9L22 44 0 22z'/%3E%3C/svg%3E")}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M0 22L22 0l2.1 2.1L4.2 22l19.9 19.9L22 44 0 22z' fill='%23fff'/%3E%3C/svg%3E")}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M27 22L5 44l-2.1-2.1L22.8 22 2.9 2.1 5 0l22 22z' fill='%23007aff'/%3E%3C/svg%3E");right:10px;left:auto}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M27 22L5 44l-2.1-2.1L22.8 22 2.9 2.1 5 0l22 22z'/%3E%3C/svg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M27 22L5 44l-2.1-2.1L22.8 22 2.9 2.1 5 0l22 22z' fill='%23fff'/%3E%3C/svg%3E")}.swiper-pagination{position:absolute;text-align:center;transition:.3s;transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-cont


/*
 *  Copyright 2018 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */
#ifndef TEST_SCENARIO_AUDIO_STREAM_H_
#define TEST_SCENARIO_AUDIO_STREAM_H_
#include <memory>
#include <string>
#include <vector>

#include "rtc_base/constructor_magic.h"
#include "test/scenario/call_client.h"
#include "test/scenario/column_printer.h"
#include "test/scenario/network_node.h"
#include "test/scenario/scenario_config.h"

namespace webrtc {
namespace test {

// SendAudioStream represents sending of audio. It can be used for starting the
// stream if neccessary.
class SendAudioStream {
 public:
  RTC_DISALLOW_COPY_AND_ASSIGN(SendAudioStream);
  ~SendAudioStream();
  void Start();
  void Stop();
  void SetMuted(bool mute);
  ColumnPrinter StatsPrinter();

 private:
  friend class Scenario;
  friend class AudioStreamPair;
  friend class ReceiveAudioStream;
  SendAudioStream(CallClient* sender,
                  AudioStreamConfig config,
                  rtc::scoped_refptr<AudioEncoderFactory> encoder_factory,
                  Transport* send_transport);
  AudioSendStream* send_stream_ = nullptr;
  CallClient* const sender_;
  const AudioStreamConfig config_;
  uint32_t ssrc_;
};

// ReceiveAudioStream represents an audio receiver. It can't be used directly.
class ReceiveAudioStream {
 public:
  RTC_DISALLOW_COPY_AND_ASSIGN(ReceiveAudioStream);
  ~ReceiveAudioStream();
  void Start();
  void Stop();
  AudioReceiveStream::Stats GetStats() const;

 private:
  friend class Scenario;
  friend class AudioStreamPair;
  ReceiveAudioStream(CallClient* receiver,
                     AudioStreamConfig config,
                     SendAudioStream* send_stream,
                     rtc::scoped_refptr<AudioDecoderFactory> decoder_factory,
                     Transport* feedback_transport);
  AudioReceiveStream* receive_stream_ = nullptr;
  CallClient* const receiver_;
  const AudioStreamConfig config_;
};

// AudioStreamPair represents an audio streaming session. It can be used to
// access underlying send and receive classes. It can also be used in calls to
// the Scenario class.
class AudioStreamPair {
 public:
  RTC_DISALLOW_COPY_AND_ASSIGN(AudioStreamPair);
  ~AudioStreamPair();
  SendAudioStream* send() { return &send_stream_; }
  ReceiveAudioStream* receive() { return &receive_stream_; }

 private:
  friend class Scenario;
  AudioStreamPair(CallClient* sender,
                  rtc::scoped_refptr<AudioEncoderFactory> encoder_factory,
                  CallClient* receiver,
                  rtc::scoped_refptr<AudioDecoderFactory> decoder_factory,
                  AudioStreamConfig config);

 private:
  const AudioStreamConfig config_;
  SendAudioStream send_stream_;
  ReceiveAudioStream receive_stream_;
};
}  // namespace test
}  // namespace webrtc

#endif  // TEST_SCENARIO_AUDIO_STREAM_H_


port-units-css2-001.html (live test) (source)

5.2.
Absolute Lengths: the cm, mm, Q, in, pt, pc, px units

The <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="absolute length" data-noexport id="absolute-length">absolute length units</dfn> are fixed in relation to each other
	and anchored to some physical measurement.
	They are mainly useful when the output environment is known.
	The absolute units consist of
	the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="physical-units">physical units</dfn> (in, cm, mm, pt, pc, Q)
	and the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="visual angle unit | pixel unit" id="visual-angle-unit">visual angle unit (pixel unit)</dfn> (px):

      unit

      name

      <th


RT depth map rendered from the light viewpoint
		*/
		ShadowMapRenderer(const sibr::InputCamera& depthMapCam, std::shared_ptr<sibr::RenderTargetLum32F> depthMap_RT)  ;

		/// Destructor.
		~ShadowMapRenderer();

		/**
		Render soft sun shadows on the mesh, using the precomputed depth map.
		\param w the target width
		\param h the target height
		\param cam the viewpoint to use
		\param mesh the mesh to render
		\param bias shadow acne bias
		*/
		void render(int w, int h,const sibr::InputCamera &cam, const Mesh& mesh, float bias= 0.0005f);

		std::shared_ptr<sibr::RenderTargetLum> _shadowMap_RT; ///< Result containing the soft shadows.

		std::shared_ptr<sibr::RenderTargetLum32F> _depthMap_RT; ///< Depth map rendered from the light viewpoint.

	private:

		sibr::GLShader				_shadowMapShader; ///< Shadow rendering.
		sibr::GLParameter			_shadowMapShader_MVP; ///< Final MVP uniform.
		sibr::GLParameter			_depthMap_MVP; ///< Light MVP uniform.
		sibr::GLParameter			_depthMap_MVPinv; ///< Light inverse MVP uniform.
		sibr::GLParameter			_depthMap_radius; ///< Depth map radius.
		sibr::GLParameter			_lightDir; ///< Light direction uniform.
		sibr::GLParameter			_bias_control; ///< Bias uniform.
		sibr::GLParameter			_sun_app_radius; ///< Sun radius (for soft shadows).
		std::shared_ptr<sibr::Texture2DLum32F> _textureDepthMap; ///< Shadow map target (unused).

	};

} // namespace

/*
 * Copyright (C) 2020, Inria
 * GRAPHDECO research group, https://team.inria.fr/graphdeco
 * All rights reserved.
 *
 * This software is free for non-commercial, research and evaluation use
 * under the terms of the LICENSE.md file.
 *
 * For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
 */

#pragma once

# include <core/graphics/Shader.hpp>
# include <core/graphics/Texture.hpp>
# include <core/graphics/Camera.hpp>

# include <core/renderer/Config.hpp>

namespace sibr {

	/** Composite two rendered scenes while generating local cast shadows from the top one to the bottom one.
	\ingroup sibr_renderer
	*/
	class SIBR_EXP_RENDERER_EXPORT AddShadowRenderer
	{
	public:
		typedef std::shared_ptr<AddShadowRenderer>	Ptr;

	public:

		/// Constructor.
		AddShadowRenderer( void );

		/** Composite the two textures, they sjould contain color+depth information in the alpha channel.
		\param backgroundTextureID handle of the background image
		\param foregroundTextureID handle of the foreground image
		\param textureSize the texture size (should be the same)
		\param camera the viewpoint used
		\param dst the destination rendertarget
		*/
		void	process(
			/*input*/	uint backgroundTextureID,
						uint foregroundTextureID,
						const Vector2f& textureSize,
						const Camera& camera,
			/*output*/	IRenderTarget& dst );

	private:

		GLShader			_shader; ///< Composite shader.
		GLParameter			_paramInvProj; ///< Inverse proj matrix uniform.
		GLParameter			_paramImgSize; ///< Image size