de.bixilon.minosoft.data.container.InventoryDelegate
import de.bixilon.minosoft.data.container.stack.ItemStack
import de.bixilon.minosoft.data.registries.item.items.DurableItem
import java.util.*

class DurabilityProperty(
    private val stack: ItemStack,
    unbreakable: Boolean = false,
    durability: Int = if (stack.item.item is DurableItem) stack.item.item.maxDurability else -1,
) : Property {
    var _unbreakable = unbreakable
    var unbreakable by InventoryDelegate(stack, this::_unbreakable)
    var _durability = durability
    var durability by InventoryDelegate(stack, this::_durability)

    val damageable: Boolean
        get() {
            try {
                stack.lock.acquire()
                return stack.item.item is DurableItem && stack.item.item.maxDurability > 0 || !_unbreakable
            } finally {
                stack.lock.release()
            }
        }

    val _valid: Boolean
        get() {
            if (_unbreakable) {
                return true
            }
            if (stack.item.item !is DurableItem || stack.item.item.maxDurability <= 1) {
                return true
            }
            if (_durability <= 0) { // ToDo
                return false
            }
            return true
        }

    override fun isDefault(): Boolean {
        return !_unbreakable && (stack.item.item is DurableItem && _durability == stack.item.item.maxDurability)
    }

    fun updateNbt(nbt: MutableJsonObject): Boolean {
        nbt.remove(UNBREAKABLE_TAG)?.toBoolean()?.let { this._unbreakable = it }
        nbt.remove(DAMAGE_TAG)?.toInt()?.let { if (stack.item.item is DurableItem) this._durability = stack.item.item.maxDurability - it }

        return !isDefault()
    }

    override fun hashCode() = Objects.hash(_unbreakable, _durability)

    override fun equals(other: Any?): Boolean {
        if (isDefault() && other == null) return true
        if (other !is DurabilityProperty) return false
        if (other.hashCode() != hashCode()) {
            return false
        }
        return _durability == other._durability && _unbreakable == other._unbreakable
    }

    fun copy(
        stack: ItemStack,
        unbreakable: Boolean = this._unbreakable,
        durability: Int = this._durability,
    ): DurabilityProperty {
        return DurabilityProperty(stack, unbreakable, durability)
    }

    companion object {
        private const val UNBREAKABLE_TAG = "unbreakable"
        private const val DAMAGE_TAG = "Damage"
    }
}
/*
 * Minosoft
 * Copyright (C) 2020-2025 Moritz Zwerger
 *
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
 *
 * This software is not affiliated with Mojang AB, the original developer of Minecraft.
 */

package de.bixilon.minosoft.data.text.events.click

import glm_.vec2.Vec2
import de.bixilon.kutil.json.JsonObject
import de.bixilon.minosoft.gui.rendering.gui.GUIRenderer
import de.bixilon.minosoft.gui.rendering.gui.input.mouse.MouseActions
import de.bixilon.minosoft.gui.rendering.gui.input.mouse.Mouse


  231, 204, 191, 129,  15, 235, 143, 225, 241,  75, 168, 227, 126,  58, 201,  98,
  16, 227,  27, 148, 166,   1,  34, 110,  84, 120,  11, 181, 150, 111, 167, 184,
  49, 244, 231, 192,  44,  59,  41, 122,  58,  12, 185, 180,  54, 122, 106, 201,
  2,  65, 118, 129, 149, 139,  31, 201, 205,  90,  96,  76,  23,  43, 218,  15,
  233, 202, 103,  84,  18, 122,  25, 218,  38, 252, 222, 104, 172,  96,  30,  57,
  205, 130, 106, 183, 189, 230,  67,  63, 162, 142,  46, 199,  45, 244,   3,  26,
  208, 119,  15,  16,  29, 196, 178,  90,  41,  94, 193,  64,  51, 205, 136, 157
};


# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional

from ..._models import BaseModel

__all__ = ["SubscriptionTierBase"]

class SubscriptionTierBase(BaseModel):
    allow_storage_overage: Optional[bool] = None
    """
    A boolean indicating whether the subscription tier supports additional storage
    above what is included in the base plan at an additional cost per GiB used.
    """

    included_bandwidth_bytes: Optional[int] = None
    """
    The amount of outbound data transfer included in the subscription tier in bytes.
    """

    included_repositories: Optional[int] = None
    """The number of repositories included in the subscription tier.

    `0` indicates that the subscription tier includes unlimited repositories.
    """

    included_storage_bytes: Optional[int] = None
    """The amount of storage included in the subscription tier in bytes."""

    monthly_price_in_cents: Optional[int] = None
    """The monthly cost of the subscription tier in cents."""

    name: Optional[str] = None
    """The name of the subscription tier."""

    slug: Optional[str] = None
    """The slug identifier of the subscription tier."""

    storage_overage_price_in_cents: Optional[int] = None
    """
    The price paid in cents per GiB for additional storage beyond what is included
    in the subscription plan.
    """


-strict-mode", Version: "6.24.1", Locations: []types.Location{{StartLine: 3391, EndLine: 3397}}},
		{ID: "babel-plugin-transform-undefined-to-void@6.9.4", Name: "babel-plugin-transform-undefined-to-void", Version: "6.9.4", Locations: []types.Location{{StartLine: 3399, EndLine: 3402}}},
		{ID: "babel-polyfill@6.26.0", Name: "babel-polyfill", Version: "6.26.0", Locations: []types.Location{{StartLine: 3404, EndLine: 3411}}},
		{ID: "babel-preset-env@1.7.0", Name: "babel-preset-env", Version: "1.7.0", Locations: []types.Location{{StartLine: 3413, EndLine: 3447}}},
		{ID: "babel-preset-es2015@6.24.1", Name: "babel-preset-es2015", Version: "6.24.1", Locations: []types.Location{{StartLine: 3449, EndLine: 3477}}},
		{ID: "babel-preset-flow@6.23.0", Name: "babel-preset-flow", Version: "6.23.0", Locations: []types.Location{{StartLine: 3479, EndLine: 3484}}},
		{ID: "babel-preset-jest@23.2.0", Name: "babel-preset-jest", Version: "23.2.0", Locations: []types.Location{{StartLine: 3486, EndLine: 3492}}},
		{ID: "babel-preset-minify@0.5.0", Name: "babel-preset-minify", Version: "0.5.0", Locations: []types.Location{{StartLine: 3494, EndLine: 3521}}},
		{ID: "babel-preset-react-app@6.1.0", Name: "babel-preset-react-app", Version: "6.1.0", Locations: []types.Location{{StartLine: 3523, EndLine: 3546}}},
		{ID: "babel-preset-react@6.24.1", Name: "babel-preset-react", Version: "6.24.1", Locations: []types.Location{{StartLine: 3548, EndLine: 3558}}},
		{ID: "babel-preset-stage-1@6.24.1", Name: "babel-preset-stage-1", Version: "6.24.1", Locations: []types.Location{{StartLine: 3560, EndLine: 3567}}},
		{ID: "babel-preset-stage-2@6.24.1", Name: "babel-preset-stage-2", Version: "6.24.1", Locations: []types.Location{{StartLine: 3569, EndLine: 3577}}},
		{ID: "babel-preset-stage-3@6.24.1", Name: "babel-preset-stage-3", Version: "6.24.1", Locations: []types.Location{{StartLine: 3579, EndLine: 3588}}},
		{ID: "babel-register@6.26.0", Name: "babel-register", Version: "6.26.0", Locations: []types.Location{{StartLine: 3590, EndLine: 3601}}},
		{ID: "babel-runtime@6.26.0", Name: "babel-runtime", Version: "6.26.0", Locations: []types.Location{{StartLine: 3603, EndLine: 3609}}},
		{ID: "babel-standalone@6.26.0", Name: "babel-standalone", Version: "6.26.0", Locations: []types.Location{{StartLine: 3611, EndLine: 3614}}},
		{ID: "babel-template@6.26.0", Name: "babel-template", Version: "6.26.0", Locations: []types.Location{{StartLine: 3616, EndLine: 3625}}},
		{ID: "babel-traverse@6.26


#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#

'''
Transform a operator from four-component picture to two-component picture
'''

from pyscf import lib
from pyscf import gto
from pyscf.x2c import x2c, sfx2c1e

mol = gto.M(
    verbose = 0,
    atom = '''8  0  0.     0
              1  0  -0.757 0.587
              1  0  0.757  0.587''',
    basis = 'ccpvdz',
)

# Transform operator 1/|r-R_O|
x2cobj = x2c.X2C(mol)
with mol.with_rinv_origin((0., 0., 0.)):
    # Pass the integral names to the function picture_change
    even_operator = ('int1e_rinv_spinor', 'int1e_sprinvsp_spinor')
    v = x2cobj.picture_change(even_operator)
    print(v.shape)

# Transform dipole operator r
x2cobj = x2c.X2C(mol)
with mol.with_common_orig((0., 0., 0.)):
    # Function picture_change also supports operators in matrix representation
    c = lib.param.LIGHT_SPEED
    xmol = x2cobj.get_xmol()[0]
    rLL = xmol.intor('int1e_r_spinor')
    rSS = xmol.intor('int1e_sprsp_spinor') * (.5/c)**2
    even_operator = (rLL, rSS)
    v = x2cobj.picture_change(even_operator)
    print(v.shape)

# Transform operator 1/|r-R_O| under spin-free X2c framework
x2cobj = sfx2c1e.SpinFreeX2C(mol)
with mol.with_rinv_origin((0., 0., 0.)):
    v = x2cobj.picture_change(('int1e_rinv', 'int1e_prinvp'))
    print(v.shape)

# Transform the Hamiltonian using the picture_change function
x2cobj = sfx2c1e.SpinFreeX2C(mol)
c = lib.param.LIGHT_SPEED
xmol = x2cobj.get_xmol()[0]
t = xmol.intor_symmetric('int1e_kin')
w = xmol.intor_symmetric('int1e_pnucp')
v = 'int1e_nuc'
h1 = x2cobj.picture_change(even_operator=(v, w*(.5/c)**2-t), odd_operator=t)
print(abs(h1 - x2cobj.get_hcore()).max())


ill(diff)
	flashlightSkill := skills.NewFlashlightSkill(diff)

	for _, o := range diffObjects {
		aimSkill.Process(o)
		speedSkill.Process(o)
		flashlightSkill.Process(o)
	}

	peaks := api.StrainPeaks{
		Aim:        aimSkill.GetCurrentStrainPeaks(),
		Speed:      speedSkill.GetCurrentStrainPeaks(),
		Flashlight: flashlightSkill.GetCurrentStrainPeaks(),
	}

	peaks.Total = make([]float64, len(peaks.Aim))

	for i := 0; i < len(peaks.Aim); i++ {
		stars := diffCalc.getStarsFromRawValues(peaks.Aim[i], peaks.Aim[i], peaks.Speed[i], peaks.Flashlight[i], diff, api.Attributes{})
		peaks.Total[i] = stars.Total
	}

	return peaks
}

func (diffCalc *DifficultyCalculator) GetVersion() int {
	return CurrentVersion
}

func (diffCalc *DifficultyCalculator) GetVersionMessage() string {
	return "2022-09-30: https://osu.ppy.sh/home/news/2022-09-30-changes-to-osu-sr-and-pp"
}
package pp250306

import (
	"github.com/wieku/danser-go/app/beatmap/difficulty"
	"github.com/wieku/danser-go/app/rulesets/osu/performance/api"
	"github.com/wieku/danser-go/app/rulesets/osu/performance/pp250306/skills"
	"github.com/wieku/danser-go/app/rulesets/osu/performance/putils"
	"github.com/wieku/danser-go/framework/math/mutils"
	"math"
)

const (
	PerformanceBaseMultiplier float64 = 1.15
)

/* ------------------------------------------------------------- */
/* pp calc                                                       */

// PPv2 : structure to store ppv2 values
type PPv2 struct {
	attribs api.Attributes

	score api.PerfScore

	diff *difficulty.Difficulty

	effectiveMissCount           float64
	totalHits                    int
	totalSuccessfulHits          int
	totalImperfectHits           int
	countSliderEndsDropped       int
	amountHitObjectsWithAccuracy int

	usingClassicSliderAccuracy bool

	greatHitWindow float64
	okHitWindow    float64
	mehHitWindow   float64

	speedDeviation *float64
}

func NewPPCalculator() api.IPerformanceCalculator {
	return &PPv2{}
}

func (pp *PPv2) Calculate(attribs api.Attributes, score api.PerfScore, diff *difficulty.Difficulty) api.PPv2Results {
	attribs.MaxCombo = max(1, attribs.MaxCombo)

	if score.MaxCombo < 0 {
		score.MaxCombo = attribs.MaxCombo
	}

	if score.CountGreat < 0 {
		score.CountGreat = attribs.ObjectCount - score.CountOk - score.CountMeh - score.CountMiss
	}

	if score.SliderEnd < 0 {
		score.SliderEnd = attribs.Sliders
	}

	pp.usingClassicSliderAccuracy = !diff.CheckModActive(difficulty.Lazer)

	if diff.CheckModActive(difficulty.Lazer) && diff.CheckModActive(difficulty.Classic) {
		if conf, ok := difficulty.GetModConfig[difficulty.ClassicSettings](diff); ok {
			pp.usingClassicSliderAccuracy = conf.NoSliderHeadAccuracy
		}
	}

	pp.attribs = attribs
	pp.diff = diff
	pp.score = score

	pp.countSliderEndsDropped = attribs.Sliders - score


nia universalis":"[医] 全身衰弱",
"asthenic":"a. 虚弱的\\nn. 身体虚弱的人",
"asthenic apoplexy":"[医] 无力性卒中",
"asthenic bulbar paralysis":"[医] 无力性延髓性麻痹, 重症肌无力",
"asthenic diathesis":"[医] 虚弱素质",
"asthenic fever":"[医] 虚热, 无力性发热, 衰弱性发热",
"asthenic habit":"[医] 无力体型, 虚弱体型",
"asthenic orthophoria":"[医] 眼肌衰弱性直视",
"asthenic type":"[医] 无力体型, 衰弱体型",
"asthenicus thorax":"[医] 无力胸, 麻痹胸",
"astheno-bulbospinal paralysis":"[医] 无力性延髓性麻痹, 重症肌无力",
"asthenobiosis":"自毒休眠, 蛰前自毒",
"asthenocora":"阿罗约氏征",
"asthenocoria":"[医] 瞳孔反应迟钝, 阿罗约氏征",
"asthenogenia":"衰弱发生",
"asthenolith":"溶岩浆体",
"asthenometer":"[医] 肌无力测量器",
"asthenope":"n. [医]患弱视症的人",
"asthenophobia":"虚弱恐怖",
"asthenopia":"n. [医]弱视的",
"asthenopia of accommodation":"[医] 调节疲劳",
"asthenopiameter":"[医] 眼疲劳计",
"asthenopic":"a. [医]弱视的",
"asthenospermia":"精子活力不足",
"asthenospher":"[地质]软流圈",
"asthenosphere":"n. 软流圈",
"asthenoxia":"氧化力不足",
"astheny":"n. = asthenia",
"asthetoid":"[医] 手足徐动症样的, 指痉病样的",
"asthma":"n. 哮喘\\n[医] 气喘",
"asthma attack":"哮喘发作\\n哮喘发作（歌曲名，Astham Attack）",
"asthma convulsivum":"[医] 支气管性气喘",
"asthma crystals":"[医] 气喘晶体, 夏-莱二氏晶体",
"asthma dyspepticun":"[医] 消化不良性气喘",
"asthma Elsner's":"[医] 埃耳斯内氏气喘, 心绞痛",
"asthma paper":"[医] 气喘纸, 硝石纸",
"asthma Pott's":"[医] 波特氏气喘, 胸腺性气喘",
"asthma weed":"[医] 北美山梗菜, 祛痰菜",
"asthmagenic":"[医] 气喘原的, 致气喘的",
"asthmatic":"a. 气喘的,


      const response = await getEventInfoResponse(
        calendarID,
        context.googleAPIJWTClient,
        query,
      );
      message.reply(response);
    } catch (err) {
      message.reply(err.message);
      debugLog(err);
    }
  },
  commandDescription: "get detailed info about an event",
};

const eventUpdateLocationCommand: Command = {
  commandCallback: async (context, message: Message, query: string) => {
    try {
      const calendarID = await calendarEventValidation(context, message);
      const event = await getFirstCalendarEvent(
        calendarID,
        context.googleAPIJWTClient,
        query,
      );
      message.reply("What is the new event location?");
      const collector = new MessageCollector(
        message.channel,
        (msg) => msg.author.id === message.author.id,
        { time: 10000 },
      );
      collector.on("collect", async (msg) => {
        const response = await updateEventLocation(
          calendarID,
          context.googleAPIJWTClient,
          event,
          msg.cleanContent,
        );
        msg.reply(response);
        collector.emit("end");
      });
    } catch (err) {
      message.reply(err.message);
      debugLog(err);
    }
  },
  commandDescription: "update an event location",
};

export const calendarEventCommandKeyList: CalendarEventCommandKeyList = {
  ADD_ATTENDEE_TO_EVENT: "~goingTo",
  CREATE_NEW_EVENT: "~createEvent",
  DELETE_EVENT: "~deleteEvent",
  EVENT_INFO: "~event",
  EVENT_UPDATE_LOCATION: "~updateEventLocation",
  LIST_EVENT: "~listEvent",
  REMOVE_ATTENDEE_FROM_EVENT: "~notGoingTo",
};

export default {
  [calendarEventCommandKeyList.LIST_EVENT]: listCalendarEventCommand,
  [calendarEventCommandKeyList.CREATE_NEW_EVENT]: addCalendarEventCommand,
  [calendarEventCommandKeyList.DELETE_EVENT]: deleteCalendarEventCommand,
  [calendarEventCommandKeyList.ADD_ATTENDEE_TO_EVENT]: addAttendeeToEventCommand,
  [calendarEventCommandKeyList.REMOVE_ATTENDEE_FROM_EVENT]: removeAttendeeFromEventCommand,
  [calendarEventCommandKeyList.EVENT_INFO]: getEventInfoCommand,
  [calendarEventCommandKeyList.EVENT_UPDATE_LOCATION]: eventUpdateLocationCommand,
} as CommandList;
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'keyValueUnsorted',
  pure: false   // To reload every new object changes
})
export class KeyValueUnsortedPipe implements PipeTransform {

  // transform(value: unknown, ...args: unknown[]): unknown {
  //   return null;
  // }
  transform(input: any): any {
    let keys = [];
    for (let key in input) {
      if (input.hasOwnProperty(key)) {
        keys.push({ key: key, value: input[key]});
      }
    }
    return keys;
  }
}

export function request(API_URL: string, queryName: string, requestBody: any, onErrorMessage: string, token: string) {
    const headers: any = { 'Content-Type': 'application/json' };
    if (token) { headers.Authorization = token; }
    return fetch(API_URL, {
        method: 'POST',
        body: JSON.stringify(requestBody),
        headers: headers,
    })
        .then(res => {
            if (res.status !== 200) {
                throw new Error(onErrorMessage || 'Failed');
            }
            return res.json();
        })
        .then(resData => {
            if (resData.errors) {
                throw resData.errors[0]; // throw the first error only
            } else if (resData.data && resData.data[queryNam


if ((index >= 0) && (index < (int)o.values().size())) {
		o.onValueSelected(index);
	}
}

void ComboOptionView::onValueEdited(const QString &value) {
	ZLComboOptionEntry &o = (ZLComboOptionEntry&)*myOption;
	if (o.useOnValueEdited()) {
		o.onValueEdited((const char*)value.utf8());
	}
}

void SpinOptionView::_createItem() {
	myLabel = new QLabel(::qtString(ZLOptionView::name()), myHolder.widget());
	mySpinBox = new QSpinBox(
		((ZLSpinOptionEntry&)*myOption).minValue(),
		((ZLSpinOptionEntry&)*myOption).maxValue(),
		((ZLSpinOptionEntry&)*myOption).step(), myHolder.widget()
	);
	mySpinBox->setValue(((ZLSpinOptionEntry&)*myOption).initialValue());
	myHolder.attachWidgets(*this, myLabel, 2, mySpinBox, 1);
}

void SpinOptionView::_show() {
	myLabel->show();
	mySpinBox->show();
}

void SpinOptionView::_hide() {
	myLabel->hide();
	mySpinBox->hide();
}

void SpinOptionView::_onAccept() const {
	((ZLSpinOptionEntry&)*myOption).onAccept(mySpinBox->value());
}

void StringOptionView::_createItem() {
	myLineEdit = new QLineEdit(myHolder.widget());
	connect(myLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(onValueEdited(const QString&)));
	if (!ZLOptionView::name().empty()) {
		myLabel = new QLabel(::qtString(ZLOptionView::name()), myHolder.widget());
		myHolder.attachWidgets(*this, myLabel, 1, myLineEdit, 3);
	} else {
		myLabel = 0;
		myHolder.attachWidget(*this, myLineEdit);
	}
	reset();
}

void StringOptionView::_show() {
	if (myLabel != 0) {
		myLabel->show();
	}
	myLineEdit->show();
}

void StringOptionView::_hide() {
	if (myLabel != 0) {
		myLabel->hide();
	}
	myLineEdit->hide();
}

void StringOptionView::_setActive(bool active) {
	myLineEdit->setReadOnly(!active);
}

void StringOptionView::_onAccept() const {
	((ZLStringOptionEntry&)*myOption).onAccept((const char*)myLineEdit->text().utf8());
}

void StringOptionView::reset() {
	if (myLineEdit == 0) {
		return;
	}

	myLineEdit->setText(::qtString(((ZLStringOptionEntry&)*myOption).initialValue()));
	myLineEdit->cursorLeft(false, myLineEdit->text().length());
}

void StringOptionView::onValueEdited(const QString &value) {
	ZLStringOptionEntry &o = (ZLStringOptionEntry&)*myOption;
	if (o.useOnValueEdited()) {
		o.onValueEdited((const char*)value.utf8());
	}
}

void MultilineOptionView::_createItem() {
	myMultiLineEdit = new QMultiLineEdit(myHolder.widget());
	myMultiLineEdit->setWordWrap(QMultiLineEdit::WidgetWidth);
	myMultiLineEdit->setWrapPolicy(QMultiLineEdit::AtWhiteSpace);
	connect(myMultiLineEdit, SIGNAL(textChanged()), this, SLOT(onValueEdited()));
	myHolder.attachWidget(*this, myMultiLineEdit);
	reset();
}

void MultilineOptionView::_show() {
	myMultiLineEdit->show();
}

void MultilineOptionView::_hide() {
	myMultiLineEdit->hide();
}

void MultilineOptionView::_setActive(bool active) {
	myMultiLineEdit


sed", "Reconciliation is paused for ThanosQuery resource")
		r.updateCondition(ctx, query, metav1.Condition{
			Type:    ConditionPaused,
			Status:  metav1.ConditionTrue,
			Reason:  ReasonPaused,
			Message: "Reconciliation is paused",
		})
		return ctrl.Result{}, nil
	}

	r.metrics.Paused.WithLabelValues("query", query.GetName(), query.GetNamespace()).Set(0)

	err = r.syncResources(ctx, *query)
	if err != nil {
		r.logger.Error(err, "failed to sync resources", "resource", query.GetName(), "namespace", query.GetNamespace())
		r.recorder.Event(query, corev1.EventTypeWarning, "SyncFailed", fmt.Sprintf("Failed to sync resources: %v", err))
		r.updateCondition(ctx, query, metav1.Condition{
			Type:    ConditionReconcileFailed,
			Status:  metav1.ConditionTrue,
			Reason:  ReasonReconcileError,
			Message: err.Error(),
		})
		return ctrl.Result{}, err
	}

	r.updateCondition(ctx, query, metav1.Condition{
		Type:    ConditionReconcileSuccess,
		Status:  metav1.ConditionTrue,
		Reason:  ReasonReconcileComplete,
		Message: "Reconciliation completed successfully",
	})

	return ctrl.Result{}, nil
}

func (r *ThanosQueryReconciler) syncResources(ctx context.Context, query monitoringthanosiov1alpha1.ThanosQuery) error {
	var objs []client.Object

	querier, err := r.buildQuery(ctx, query)
	if err != nil {
		return err
	}

	expectedResources := []string{querier.GetGeneratedResourceName()}
	objs = append(objs, querier.Build()...)

	if query.Spec.QueryFrontend != nil {
		r.recorder.Event(&query, corev1.EventTypeNormal, "BuildingQueryFrontend", "Building Query Frontend resources")
		frontend := r.buildQueryFrontend(query)

		expectedResources = append(expectedResources, frontend.GetGeneratedResourceName())
		objs = append(objs, frontend.Build()...)
	}

	if errCount := r.handler.CreateOrUpdate(ctx, query.GetNamespace(), &query, objs); errCount > 0 {
		return fmt.Errorf("failed to create or update %d resources for the querier and query frontend", errCount)
	}

	if errCount := r.pruneOrphanedResources(ctx, query.GetNamespace(), query.GetName(), expectedResources); errCount > 0 {
		return fmt.Errorf("failed to prune %d orphaned resources for query or query frontend", errCount)
	}

	name := manifestquery.Options{Options: manifests.Options{Owner: query.GetName()}}.GetGeneratedResourceName()
	if errCount := r.handler.DeleteResource(ctx,
		getDisabledFeatureGatedResources(query.Spec.FeatureGates, []string{name}, query.GetNamespace())); errCount > 0 {
		return fmt.Errorf("failed to delete %d feature gated resources for the query", errCount)
	}

	return nil
}

func (r *ThanosQueryReconciler) buildQuery(ctx context.Context, query monitoringthanosiov1alpha1.ThanosQuery) (manifests.Buildable, error) {
	endpoints, err := r.getStoreAPIServiceEndpoints(ctx, query)
	if err != nil {
		return nil, err
	}

	opts := queryV1Alpha1ToOptions(query)
	opts.Endpoints = endpoints

	return opts, nil
}

// getStoreAPIServiceEndpoints returns the list of endpoints for the StoreAPI services that match the ThanosQuery storeLabelSelector.
func (r *ThanosQueryReconciler) getStoreAPIServiceEndpoints(ctx context.Context, query monitoringthanosi


code>a-z,
   * 				0-9, and - (hyphen) and how to specify internationalized
   * 			domain names, see DNS Domain Name
   * 				Format in the Amazon Route 53 Developer Guide.

   *
You can use the asterisk (*) wildcard to replace the leftmost label in a domain name,
   * 			for example, *.example.com. Note the following:

   *

   *

   *
The * must replace the entire label. For example, you can't specify
   * 						*prod.example.com or prod*.example.com.

   *

   *

   *
The * can't replace any of the middle labels, for example,
   * 					marketing.*.example.com.

   *

   *

   *
If you include * in any position other than the leftmost label in a domain
   * 					name, DNS treats it as an * character (ASCII 42), not as a wildcard.

   *                <important>
   *
You can't use the * wildcard for resource records sets that have a type of
   * 						NS.

   *                </important>
   *

   *

   *
You can use the * wildcard as the leftmost label in a domain name, for example,
   * 				*.example.com. You can't use an * for one of the middle labels, for
   * 			example, marketing.*.example.com. In addition, the * must replace the
   * 			entire label; for example, you can't specify prod*.example.com.

   */
  Name: string | undefined;

  /**
   * @public
   *
The DNS record type. For information about different record types and how data is
   * 			encoded for them, see Supported DNS Resource
   * 				Record Types in the Amazon Route 53 Developer
   * 			Guide.

   *
Valid values for basic resource record sets: A | AAAA |
   * 				CAA | CNAME | DS |MX |
   * 				NAPTR | NS | PTR | SOA |
   * 				SPF | SRV | TXT
   *

   *
Values for weighted, latency, geolocation, and failover resource record sets:
   * 				A | AAAA | CAA | CNAME |
   * 				MX | NAPTR | PTR | SPF |
   * 				SRV | TXT. When creating a group of weighted, latency,
   * 			geolocation, or failover resource record sets, specify the same value for all of the
   * 			resource record sets in the group.

   *
Valid values for multivalue answer resource record sets: A |
   * 				AAAA | MX | NAPTR | PTR |
   * 				SPF | SRV | TXT
   *

   *


b.g7){4o(b.bx){1I 1:if((!a||a===(b.pu||b.b4.3F(":").7l()))&&(!c||c===b.hF)){1J aF}b=1c;1J aF;1I 3:if(/^\\s*$/.ds(b.j2)){1J}b=1c;1J aF;1I 4:1I 6:1I 12:1I 10:1I 11:b=1c;1J aF}}1f b||1c},rU:1d(e,f){1a d=1c;if(e){if(e.rU){d=e.rU(f)}1i{aF:4o(e.bx){1I 1:if(e.hF!==1c&&e.j1===f){d=e.hF;1J aF}1a b=e.2U.1g;if(b){1a a;1l(1a c=0;c<b;++c){a=e.2U[c];if(a.j1==="fh"&&a.2c==="fh:"+f){d=a.1E||1c;1J aF}1i{if(a.2c==="fh"&&f===1c){d=a.1E||1c;1J aF}}}}d=V.rU(e.4B,f);1J aF;1I 2:d=V.rU(e.1WU,f);1J aF;1I 9:d=V.rU(e.fT,f);1J aF;1I 6:1I 12:1I 10:1I 11:1J aF;1Q:d=V.rU(e.4B,f);1J aF}}}1f d},1ru:1d(){if(!1b.2k.6t.2j&&!V.gI){if(2j.uH&&2j.uH.16d){1b.2k.6t.2j=2j.uH.16d("","",1c)}1i{if(!V.gI&&2r.nM){V.gI=1h nM("nX.Tv")}}}1f 1b.2k.6t.2j||V.gI},1v:"1b.2k.6t"});1b.2k.6t.K4={1sC:0,1sB:1,1sA:2,1sz:3};1b.2k.6t.rU=1b.3b.4c(1b.2k.6t.1q.rU,1b.2k.6t.1q);1b.2k.6t.2j=1c;1b.2k.6P=1b.1B(1b.2k.6t,{8I:"5a://1sy.1WT.1WS.1WR/1sy",cS:"2g",16c:"ni",8S:"1W",eH:"1G",1sx:"j4",9N:"5a://83.dh.cT/3D",y5:1m,xy:1m,1s:1d(a){V.6y={e9:(/^\\s*|\\s*$/g),y3:(/\\s*/g),gD:(/\\s+/),ps:(/\\s*,\\s*/g)};1b.2k.6t.1q.1s.1r(V,[a])},6q:1d(d){if(2f d==="4R"){d=1b.2k.6t.1q.6q.1r(V,[d])}1a e=V.9o(d.fT,V.9N,V.16c);1a c=[];1l(1a b=0;b<e.1g;b++){1a a=V.uy(e[b]);if(a){c.1y(a)}}1f c},uy:1d(d){1a e=


_direction = B43_OFDMTAB_DIRECTION_READ;
	}
	gphy->ofdmtab_addr = addr;
	ret = b43_phy_read(dev, B43_PHY_OTABLEQ);
	ret <<= 16;
	ret |= b43_phy_read(dev, B43_PHY_OTABLEI);

	return ret;
}

void b43_ofdmtab_write32(struct b43_wldev *dev, u16 table,
			 u16 offset, u32 value)
{
	struct b43_phy_g *gphy = dev->phy.g;
	u16 addr;

	addr = table + offset;
	if ((gphy->ofdmtab_addr_direction != B43_OFDMTAB_DIRECTION_WRITE) ||
	    (addr - 1 != gphy->ofdmtab_addr)) {
		/* The hardware has a different address in memory. Update it. */
		b43_phy_write(dev, B43_PHY_OTABLECTL, addr);
		gphy->ofdmtab_addr_direction = B43_OFDMTAB_DIRECTION_WRITE;
	}
	gphy->ofdmtab_addr = addr;

	b43_phy_write(dev, B43_PHY_OTABLEI, value);
	b43_phy_write(dev, B43_PHY_OTABLEQ, (value >> 16));
}

u16 b43_gtab_read(struct b43_wldev *dev, u16 table, u16 offset)
{
	b43_phy_write(dev, B43_PHY_GTABCTL, table + offset);
	return b43_phy_read(dev, B43_PHY_GTABDATA);
}

void b43_gtab_write(struct b43_wldev *dev, u16 table, u16 offset, u16 value)
{
	b43_phy_write(dev, B43_PHY_GTABCTL, table + offset);
	b43_phy_write(dev, B43_PHY_GTABDATA, value);
}


   - parent: The parent resource name. In the format:
//     `projects/{project_id}/databases/{database_id}/documents`. Document
//     resource names are not supported; only database resource names can be
//     specified.
func (r *ProjectsDatabasesDocumentsService) PartitionQuery(parent string, partitionqueryrequest *PartitionQueryRequest) *ProjectsDatabasesDocumentsPartitionQueryCall {
	c := &ProjectsDatabasesDocumentsPartitionQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.partitionqueryrequest = partitionqueryrequest
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPartitionQueryCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPartitionQueryCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsDatabasesDocumentsPartitionQueryCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.partitionqueryrequest)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:partitionQuery")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "firestore.projects.databases.documents.partitionQuery", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "firestore.projects.databases.documents.partitionQuery" call.
// Any non-2xx status code is an error. Response headers are in either
// *PartitionQueryResponse.ServerResponse.Header or (if a response was returned
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified was
// returned.
func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Do(opts ...googleapi.CallOption) (*PartitionQueryResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &PartitionQueryResponse{
		ServerResponse: googleapi.ServerResponse{
			Heade


EXCLASS.ORD, 'mi', 'normnal'],
];
function getRange(text) {
    var e_1, _a;
    var n = text.codePointAt(0);
    try {
        for (var RANGES_1 = __values(exports.RANGES), RANGES_1_1 = RANGES_1.next(); !RANGES_1_1.done; RANGES_1_1 = RANGES_1.next()) {
            var range = RANGES_1_1.value;
            if (n <= range[1]) {
                if (n >= range[0]) {
                    return range;
                }
                break;
            }
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (RANGES_1_1 && !RANGES_1_1.done && (_a = RANGES_1.return)) _a.call(RANGES_1);
        }
        finally { if (e_1) throw e_1.error; }
    }
    return null;
}
exports.getRange = getRange;
exports.MMLSPACING = [
    [0, 0],
    [1, 2],
    [3, 3],
    [4, 4],
    [0, 0],
    [0, 0],
    [0, 3]
];
exports.OPTABLE = {
    prefix: {
        '(': exports.MO.OPEN,
        '+': exports.MO.BIN01,
        '-': exports.MO.BIN01,
        '[': exports.MO.OPEN,
        '{': exports.MO.OPEN,
        '|': exports.MO.OPEN,
        '||': [0, 0, MmlNode_js_1.TEXCLASS.BIN, { fence: true, stretchy: true, symmetric: true }],
        '|||': [0, 0, MmlNode_js_1.TEXCLASS.ORD, { fence: true, stretchy: true, symmetric: true }],
        '\u00AC': exports.MO.ORD21,
        '\u00B1': exports.MO.BIN01,
        '\u2016': [0, 0, MmlNode_js_1.TEXCLASS.ORD, { fence: true, stretchy: true }],
        '\u2018': [0, 0, MmlNode_js_1.TEXCLASS.OPEN, { fence: true }],
        '\u201C': [0, 0, MmlNode_js_1.TEXCLASS.OPEN, { fence: true }],
        '\u2145': exports.MO.ORD21,
        '\u2146': OPDEF(2, 0, MmlNode_js_1.TEXCLASS.ORD),
        '\u2200': exports.MO.ORD21,
        '\u2202': exports.MO.ORD21,
        '\u2203': exports.MO.ORD21,
        '\u2204': exports.MO.ORD21,
        '\u2207': exports.MO.ORD21,
        '\u220F': exports.MO.OP,
        '\u2210': exports.MO.OP,
        '\u2211': exports.MO.OP,
        '\u2212': exports.MO.BIN01,
        '\u2213': exports.MO.BIN01,
        '\u221A': [1, 1, MmlNode_js_1.TEXCLASS.ORD, { stretchy:


vk.vkGetPhysicalDeviceSparseImageFormatProperties(
                physical_device.handle().to_raw(), format.into(), type_.into(),
                samples.bits(), tiling.into(), usage.bits(), &mut property_count,
                properties.as_mut_ptr() as *mut vks::VkSparseImageFormatProperties);
        }
        properties
    }

    /// Destroys a VkSurfaceKHR object.
    ///
    /// https://manned.org/vkDestroySurfaceKHR/adcec40c
    //
    // *PFN_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface,
    // const VkAllocationCallbacks* pAllocator);
    pub unsafe fn destroy_surface_khr(&self, surface: SurfaceKhrHandle,
            allocator: Option<*const vks::VkAllocationCallbacks>) {
        let allocator = allocator.unwrap_or(ptr::null());
        self.proc_addr_loader().khr_surface.vkDestroySurfaceKHR(self.handle().to_raw(),
            surface.to_raw(), allocator);
    }

    /// Queries if presentation is supported.
    ///
    /// https://manned.org/vkGetPhysicalDeviceSurfaceSupportKHR.3
    //
    // *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice
    // physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface,
    // VkBool32* pSupported);
    pub unsafe fn get_physical_device_surface_support_khr<Pd, Sk>(&self, physical_device: Pd,
            queue_family_index: u32, surface: Sk) -> VdResult<bool>
            where Pd: Handle<Target=PhysicalDeviceHandle>, Sk: Handle<Target=SurfaceKhrHandle> {
        let mut supported: vks::VkBool32 = vks::VK_FALSE;
        let result = self.proc_addr_loader().khr_surface.vkGetPhysicalDeviceSurfaceSupportKHR(
            physical_device.handle().to_raw(), queue_family_index, surface.handle().to_raw(), &mut supported);
        error::check(result, "vkGetPhysicalDeviceSurfaceSupportKHR", supported == vks::VK_TRUE)
    }

    /// Queries surface capabilities.
    ///
    /// https://manned.org/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.3
    //
    // *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice
    // physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR*
    // pSurfaceCapabilities);
    pub unsafe fn get_physical_device_surface_capabilities_khr<Pd, Sk>(&self, physical_device: Pd,
            surface: Sk) -> VdResult<SurfaceCapabilitiesKhr>
            where Pd: Handle<Target=PhysicalDeviceHandle>, Sk: Handle<Target=SurfaceKhrHandle> {
        let mut capabilities = mem::uninitialized();
        let result = self.proc_addr_loader().khr_surface.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
            physical_device.handle().to_raw(), surface.handle().to_raw(), &mut capabilities);
        error::check(result, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR",
            SurfaceCapabilitiesKhr::from_raw(capabilities))
    }

    /// Queries color formats supported by surface.
    ///
    /// https://manned.org/vkGetPhysicalDeviceSurfaceFormatsKHR.3
    //
    // *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice
    // physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount,
    // VkSurfaceFormatKHR* pSurfaceFormats);
    pub unsafe fn get_physical_device_surface_formats_khr<Pd, Sk>(&self, physical_device: Pd,
            surface: Sk) -> VdResult<SmallVec<[SurfaceFormatKhr; 64]>>
            where Pd: Handle<Target=PhysicalDeviceHandle>, Sk: Handle<Target=SurfaceKhrHandle> {
        let mut format_count = 0u32;
        let mut formats: SmallVec<[::SurfaceFormatKhr; 64]> = SmallVec::new();
        let result = self.proc_addr_loader().khr_surface.vkGetPhysicalDeviceSurfaceFormatsKHR(
            physical_


 Student ID : 301143325
// Date : June 18th, 2021

import express, { Request, Response, NextFunction } from 'express';

import Business from "../Models/business";

// Display Functions

//import Util Functions
import { UserDisplayName } from '../Util';

//read in CRUD
export function DisplayBusinessListPage(req: Request, res: Response, next: NextFunction): void
{
    //mongo db - find method to return all the business collection
    Business.find(function(err,businessCollection) {
        if(err)
        {
            return console.error(err);
        }

        // (Read) print out the business list
        // console.log(business);

        //render the business-list content partial page
        res.render('index', {title: 'Business Contact List', page: 'business-list', business: businessCollection, displayName: UserDisplayName(req)})
    }).sort({"name" : 1}).collation( { locale: "en_US", numericOrdering: true }); //alphabetically order by name
}

//Display Edit page
export function DisplayEditPage(req: Request, res: Response, next: NextFunction):void
{
    let id = req.params.id;

    //console.log(id);

    // pass the id to the db

    //db.business.find({"_id": id})
    Business.findById(id,{},{},(err, businessContactToEdit) =>
    {
        if(err)
        {
            console.error(err);
            res.end(err);
        }
        //show the edit view
        res.render('index',{title: 'Edit', page: 'update', business: businessContactToEdit, displayName: UserDisplayName(req)})
    });
}

// Display CREATE page
export function DisplayAddPage(req: Request, res: Response, next: NextFunction): void
{
    // show the edit view
    res.render('index', { title: 'Add', page: 'update', business: '', displayName: UserDisplayName(req) });
}

// Process Functions

// Process EDIT page
export function ProcessEditPage(req: Request, res: Response, next: NextFunction): void
{
    let id = req.params.id;

    // instantiate a new Business Item
    let updatedBusinessContact = new Business
    ({
      "_id": id,
      "name": req.body.name,
      "phone": req.body.phone,
      "email": req.body.email,
    });

    // find the business item via db.business.update({"_id":id}) and then update
    Business.updateOne({_id: id}, updatedBusinessContact, {}, (err) =>{
      if(err)
      {
        console.error(err);
        res.end(err);
      }

      res.redirect('/business-list');
    });
}

// Process CREATE page
export function ProcessAddPage(req: Request, res: Response, next: NextFunction): void
{
  // instantiate a new Business
  let newContact = new Business
  ({
      "name": req.body.name,
      "phone": req.body.phone,
      "email": req.body.email,
  });

  // db.business.insert({})
  Business.create(newContact, (err) => {
    if(err)
    {
      console.error(err);
      res.end(err);
    }

    res.redirect('/business-list');
  });
}

// Process Delete page
export function ProcessDeletePage(req: Request, res: Response, next: NextFunction): void
{
    let id = req.params.id;

  // db.business.remove({"_id: id"})
  Business.remove({_id: id}, (err) => {
    if(err)
    {
      console.error(err);
      res.end(err);
    }

    res.redire


address`.
Refer to the [appendix](#appendix) for full configuration.

#### Standby JobManagers

Usually, it is enough to only start a single JobManager pod, because Kubernetes will restart it once the pod crashes.
If you want to achieve faster recovery, configure the `replicas` in `jobmanager-session-deployment-ha.yaml` or `parallelism` in `jobmanager-application-ha.yaml` to a value greater than `1` to start standby JobManagers.

### Using Standalone Kubernetes with Reactive Mode

[Reactive Mode]({{< ref "docs/deployment/elastic_scaling" >}}#reactive-mode) allows to run Flink in a mode, where the *Application Cluster* is always adjusting the job parallelism to the available resources. In combination with Kubernetes, the replica count of the TaskManager deployment determines the available resources. Increasing the replica count will scale up the job, reducing it will trigger a scale down. This can also be done automatically by using a [Horizontal Pod Autoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/).

To use Reactive Mode on Kubernetes, follow the same steps as for [deploying a job using an Application Cluster](#deploy-application-cluster). But instead of `flink-configuration-configmap.yaml` use this config map: `flink-reactive-mode-configuration-configmap.yaml`. It contains the `scheduler-mode: reactive` setting for Flink.

Once you have deployed the *Application Cluster*, you can scale your job up or down by changing the replica count in the `flink-taskmanager` deployment.

### Enabling Local Recovery Across Pod Restarts

In order to speed up recoveries in case of pod failures, you can leverage Flink's [working directory]({{< ref "docs/deployment/resource-providers/standalone/working_directory" >}}) feature together with local recovery.
If the working directory is configured to reside on a persistent volume that gets remounted to a restarted TaskManager pod, then Flink is able to recover state locally.
With the [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/), Kubernetes gives you the exact tool you need to map a pod to a persistent volume.

Deploying TaskManagers as a StatefulSet, allows you to configure a volume claim template that is used to mount persistent volumes to the TaskManagers.
Additionally, you need to configure a deterministic `taskmanager.resource-id`.
A suitable value is the [pod name](https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/), that you expose using environment variables.
For an example StatefulSet configuration take a look at the [appendix](#local-recovery-enabled-taskmanager-statefulset).

{{< top >}}

## Appendix

### Common cluster resource definitions

`flink-configuration-configmap.yaml`
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: flink-config
  labels:
    app: flink
data:
  config.yaml: |+
    jobmanager.rpc.address: flink-jobmanager
    taskmanager.numberOfTaskSlots: 2
    blob.server.port: 6124
    jobmanager.rpc.port: 6123
    taskmanager.rpc.port: 6122
    jobmanager.memory.process.size: 1600m
    taskmanager.memory.process.size: 1728m
    parallelism.default: 2
  log4j-console.properties: |+
    # This affects logging for both user code and Flink
    rootLogger.level = INFO
    rootLogger.appenderRef.console.ref = ConsoleAppender
    rootLogger.appenderRef.rolling.ref = RollingFileAppender

    # Uncomment this if you want to _only_ change F


 /**
     * Standard Catmull-Rom spline: interpolate between x1 and x2 with
     * previous/following points x1/x4
     */
    fun initCatmullRom(x0: Float, x1: Float, x2: Float, x3: Float, tension: Float) {
        this.init(x1, x2, tension * (x2 - x0), tension * (x3 - x1))
    }

    fun calc(t: Float): Float {
        val t2 = t * t
        val t3 = t2 * t
        return this.c0 + this.c1 * t + this.c2 * t2 + this.c3 * t3
    }

}
package io.github.alexandrepiveteau.echo.core.buffer

import kotlin.test.Test
import kotlin.test.assertContentEquals
import kotlin.test.assertEquals
import kotlin.test.assertFails

class MutableByteGapBufferGetSetTest {

  @Test
  fun empty_outOfBounds() {
    with(mutableByteGapBufferOf()) {
      assertFails { get(-1) }
      assertFails { get(0) }
      assertFails { set(-1, 0) }
      assertFails { set(0, 0) }
    }
  }

  @Test
  fun beforeGap() {
    with(MutableByteGapBuffer(5) { it.toByte() }) {
      assertEquals(5, gap.startIndex)
      for (i in 0 until 5) {
        assertEquals(i.toByte(), get(i))
        set(i, (get(i) * 2).toByte())
      }
      assertContentEquals(ByteArray(5) { (it * 2).toByte() }, toByteArray())
    }
  }

  @Test
  fun afterGap() {
    with(MutableByteGapBuffer(5) { it.toByte() }) {
      gap.shift(-5)
      assertEquals(0, gap.startIndex)
      for (i in 0 until 5) {
        assertEquals(i.toByte(), get(i))
        set(i, (get(i) * 2).toByte())
      }
      assertContentEquals(ByteArray(5) { (it * 2).toByte() }, toByteArray())
    }
  }
}
package io.github.alexandrepiveteau.echo.core.buffer

import kotlin.test.Test
import kotlin.test.assertContentEquals
import kotlin.test.assertFails

class MutableByteGapBufferCopyIntoTest {

  @Test
  fun empty() {
    with(mutableByteGapBufferOf()) { assertContentEquals(byteArrayOf(), copyInto(ByteArray(0))) }
  }

  @Test
  fun outOfBounds() {
    with(MutableByteGapBuffer(3) { it.toByte() }) {
      gap.shift(-1) // just spicing up the tests a bit
      assertFails { copyInto(ByteArray(3), destinationOffset = -1) }
      assertFails { copyInto(ByteArray(3), destinationOffset = 1) }
      assertFails { copyInto(ByteArray(3), destinationOffset = 4) }
      assertFails { copyInto(ByteArray(3), startOffset = 1, endOffset = 4) }
      assertFails { copyInto(ByteArray(2)) }
    }
  }

  @Test
  fun copyAll() {
    with(MutableByteGapBuffer(3) { it.toByte() }) {
      gap.shift(-1)
      assertContentEquals(byteArrayOf(0, 1, 2), copyInto(ByteArray(3)))
      assertContentEquals(byteArrayOf(0, 1, 2, 0), copyInto(ByteArray(4)))
      assertContentEquals(byteArrayOf(0, 0, 1, 2), copyInto(ByteArray(4), 1))
    }
  }

  @Test


tion = $"{mode.Width}x{mode.Height}";
		}

		virtualScreen?.SetSize(mode.Width, mode.Height);
	}

	private bool TryParseResolution(string? resolution, out DisplayMode displayMode)
	{
		displayMode = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode;

		if (string.IsNullOrWhiteSpace(resolution))
			return false;

		string[] parts = resolution.Split('x');

		if (parts.Length != 2)
			return false;

		if (!int.TryParse(parts[0], out int width))
			return false;

		if (!int.TryParse(parts[1], out int height))
			return false;

		var supportedModes = GraphicsAdapter.DefaultAdapter.SupportedDisplayModes
			.Where(x => x.Width == width && x.Height == height).ToArray();

		if (supportedModes.Length == 0)
			return false;

		displayMode = supportedModes.First();
		return true;
	}

	private void ApplyGraphicsSettingsInternal(GraphicsSettings settings, PresentationParameters parameters,
		bool explicitApply)
	{
		var defaultScreenSize = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode;

		// When going into fullscreen mode, we render to a virtual display and blit it.
		if (settings.Fullscreen)
		{
			parameters.BackBufferWidth = defaultScreenSize.Width;
			parameters.BackBufferHeight = defaultScreenSize.Height;
		}
		else
		{
			if (!TryParseResolution(settings.DisplayResolution, out DisplayMode mode))
			{
				Log.Warning("Resolution stored in settings is missing or unsupported, so using default.");
				settings.DisplayResolution = $"{mode.Width}x{mode.Height}";
			}

			parameters.BackBufferWidth = mode.Width;
			parameters.BackBufferHeight = mode.Height;
		}

		parameters.RenderTargetUsage = RenderTargetUsage.PreserveContents;

		if (explicitApply)
		{
			graphicsManager.ApplyChanges();
			ApplyVirtualDisplayMode(settings);
		}
	}

	private void OnGameSettingsChanged(ISettingsManager settings)
	{
		// Not yet.
		if (GraphicsDevice == null)
			return;

		var graphicsSettings = new GraphicsSettings(settings);
		var parameters = GraphicsDevice.PresentationParameters;

		ApplyGraphicsSettingsInternal(graphicsSettings, parameters, true);
	}

	private sealed class UpdateAvailableToolsHook : IHookListener
	{
		private readonly IContentManager contentManager;
		private readonly TabbedToolCollection collection;
		private readonly MainToolGroup? terminal;

		public UpdateAvailableToolsHook(IContentManager contentManager, TabbedToolCollection collection)
		{
			this.contentManager = contentManager;
			this.collection = collection;
		}

		/// <inheritdoc />
		public async Task ReceiveHookAsync(IGameContext game)
		{
			collection.Clear();

			if (terminal != null)
				collection.Add(terminal);

			foreach (ITabbedToolDefinition group in contentManager.GetContentOfType<ITabbedToolDefinition>())
			{
				collection.Add(group);
			}

			await game.ScriptSystem.RunHookAsync(CommonScriptHooks.BeforeUpdateShellTools);
		}
	}
}


box .submitdelete{color:#f00;border-bottom-color:#f00;}.submitbox .submitdelete:hover,#media-items a.delete:hover{color:#fff;background-color:#f00;border-bottom-color:#f00;}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:#f00;border-bottom-color:#f00;}.tablenav .dots{border-color:transparent;}.tablenav .next,.tablenav .prev{border-color:transparent;color:#21759b;}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#d54e21;}div.updated,.login .message{background-color:#ffffe0;border-color:#e6db55;}.update-message{color:#000;}a.page-numbers{border-bottom-color:#B8D3E2;}.commentlist li{border-bottom-color:#ccc;}.widefat td,.widefat th{border-top-color:#fff;border-bottom-color:#dfdfdf;}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0;}.widefat td{color:#555;}.widefat p,.widefat ol,.widefat ul{color:#333;}.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head{color:#333;}th.sortable a:hover,th.sortable a:active,th.sortable a:focus{color:#333;}h3.dashboard-widget-title small a{color:#d7d7d7;}h3.dashboard-widget-title small a:hover{color:#fff;}a,#adminmenu a,#poststuff #edButtonPreview,#poststuff #edButtonHTML,#the-comment-list p.comment-author strong a,#media-upload a.del-link,#media-items a.delete,.plugins a.delete,.ui-tabs-nav a{color:#21759b;}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-khtml-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0;}#plugin-information .action-button{background-color:#d54e21;color:#fff;}#adminmenu li.current a .awaiting-mod,#adminmenu li a.wp-has-current-submenu .update-plugins{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-khtml-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0;}div#media-upload-header,div#plugin-information-header{background-color:#f9f9f9;border-bottom-color:#dfdfdf;}#currenttheme img{border-color:#666;}#dashboard_secondary div.dashboard-widget-content ul li a{background-color:#f9f9f9;}input.readonly,textarea.readonly{background-color:#ddd;}#ed_toolbar input,#ed_reply_toolbar input{background:#fff url("../images/fade-butt.png") repeat-x 0 -2px;}#editable-post-name{background-color:#fffbcc;}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on,.submitted-on{color:#777;}.login #nav a,.login #backtoblog a{color


click)='toggleState()'>My Button</button>
    <ul>
      <li *ngFor="let item of items"
        [@myTrigger]="state"
        (@myTrigger.start)="animStart($event)"
        (@myTrigger.done)="animDone($event)">
          {{ item }}
      </li>
    </ul>
    {{ animDetails }}
  `,
  styles: [
    `
      ul {
        list-style-type: none;
        margin: 30px 30px 0 0;
        padding: 0;
      }

      li {
        padding: 15px;
        width: 100%;
        background: #f1f1f1;
        margin-bottom: 2px;
        font-weight: bold;
      }
    `
  ],
  animations: [
    trigger('myTrigger', [
      state('small', style({
        transform: 'scale(1)'
      })),
      state('large', style({
        transform: 'scale(1.4)'
      })),
      state('extra-large', style({
        transform: 'scale(2)'
      })),
      state('fadeIn', style({
        opacity: '1'
      })),
      transition("void => *", [
        animate(500, keyframes([
          style({
            opactiy: 0,
            transform: 'translateY(-30px)',
            offset: 0
          }),
          style({
            opactiy: 1,
            transform: 'translateY(5px)',
            offset: .3
          }),
          style({
            opacity: 1,
            transform: 'translateY(0)',
            offset: 1
          })
        ]))
      ])
      /*transition('void => *', [
        style({
          opacity: '0',
          transform: 'translateY(50px)'
        }),
        animate('500ms 0s ease-out')
      ]),
      transition('small => large',
        animate('500ms')
      ),
      transition('large => small',
        animate('500ms')
      ),
      transition(
        'small => large, large => small',
        animate('500ms')),
      transition(
        'small <=> large',
        animate('500ms'))
      transition(
        '* => small',
        animate('500ms'))*/
    ]),
    trigger('removeMe', [
      state('out', style({
        transform: 'scale(0)',
        opactity: 0
      })),
      transition('* => out', [
        animate('500ms 0s ease-in', keyframes([
          style({
            opacity: 1,
            transform: 'translateX(-8px)',
            offset: 0
          }),
          style({
            opacity: 1,
            transform: 'translateX(0)',
            offset: 0.3
          }),
          style({
            opacity: 1,
            transform: 'translateX(50px)',
            offset: 1
          })

        ]))
      ])
    ])
  ]
})
export class AppComponent  {
  state: string = 'fadeIn';
  items: Array<string> = new Array();
  animDetails: string = '';
  btnState: string = 'in';

  animStart($event: any) {
    this.animDetails = '';
    console.log($event);
  }

  animDone($event: any) {
    console.log($event);
    this.animDetails = "It took me " + $event.totalTime + 'ms to complete';
  }

  toggleState() {
    this.items.push('another item');
    this.state = "fadeIn";
    this.btnState = 'out';
    //this.state = (this.state === 'small') ? 'large' : 'small';
  }
}
interface Attribute {
  name: string
  value: string
}

type Attributes = Attribute[]

interface VDomOption {
  type: 'element' | 'text'
  el: Node
  children: VOptions


.225585)+t33114437)
    local t84247335=vector2(0.697048-t33114437,1.482726-t33114437)
    local t78384674=t34196728[_G["GetEntityModel"] (t43068463)]
    local t82497378=_G["GetOffsetFromEntityInWorldCoords"] (t43068463,t72046414["x"] +t78384674["x"] ,t72046414["y"] +t78384674["y"] ,(((`cyclone`|`bf400`)~1476376110)/100)+((`asea`~(-1809822328))/100))
    local t13023464=_G["GetOffsetFromEntityInWorldCoords"] (t43068463,t84247335["x"] +t78384674["x"] ,t72046414["y"] +t78384674["y"] ,(((`exemplar`|`neo`)~(-8281))/100)+(((`vacca`|`savestra`)~905895390)/100))
    local t94259286=_G["GetOffsetFromEntityInWorldCoords"] (t43068463,t84247335["x"] +t78384674["x"] ,t84247335["y"] +t78384674["y"] ,((`asea`~(-1809822256))/100)+(((`caracara2`|`issi3`)~(-1080655876))/100))
    local t55464501=_G["GetOffsetFromEntityInWorldCoords"] (t43068463,t72046414["x"] +t78384674["x"] ,t84247335["y"] +t78384674["y"] ,(((`comet3`|`faggio`)~(-1753482058))/100)+((`t20`~1663218587)/100))
    local t37050317={{t82497378,t13023464},{t13023464,t94259286},{t94259286,t55464501},{t55464501,t82497378}}

    Citizen["CreateThread"] (function()
        local t5926077=_G["GetGameTimer"] ()
        while t7697375==t18626986 do
            _G["Wait"] ((`chino`~349605904))_G["DisableAllControlActions"] ((`infernus2`~(-1405937764)))_G["EnableControlAction"] ((`freecrawler`~(-54332285)),((`nemesis`|`prairie`)~(-72822001)),((t53113949==t80180361)==(t45251336==t26023147)))t53815151=_G["GetEntityCoords"] (t78921246["entity"] )_G["SetCamCoord"] (t46528744,t53815151["x"] ,t53815151["y"] ,t53815151["z"] +t8697351)
            local t82472988=(((`windsor`|`prairie`)~(-3409941))/1)
            if _G["IsControlPressed"] (((`dynasty`|`tyrant`)~(-67202601)),t61549719(Config["Keys"] ["AIM_SLOWER"] ["code"] )) or _G["IsDisabledControlPressed"] ((`hustler`~600450546),t61549719(Config["Keys"] ["AIM_SLOWER"] ["code"] )) then
                t82472988=(((`khamelion`|`buccaneer`)~(-142647442))/10)
            end
            if _G["IsControlPressed"] (((`schwarzer`|`manchez`)~(-142902402)),t61549719(Config["Keys"] ["BALL_IN_HAND_LEFT"] ["code"] )) or _G["IsDisabledControlPressed"] ((`sentinel3`~1104234922),t61549719(Config["Keys"] ["BALL_IN_HAND_LEFT"] ["code"] )) then
                local t81790078=vector2(math["cos"] (math["rad"] (t81463867+((`seminole`~1221512807)/1))),math["sin"] (math["rad"] (t81463867+(((`habanero`|`manana`)~(-1242072773))/1))))*t82472988
                local


 ProcessOverviewDto processOverviewDto) {
    final Map<String, Object> params =
        Map.of(
            "owner", ownerId,
            "processDefinitionKey", processDefinitionKey);
    final UpdateRequest.Builder<ProcessOverviewDto, ProcessOverviewDto> requestBuilder =
        new UpdateRequest.Builder<ProcessOverviewDto, ProcessOverviewDto>()
            .index(indexNameService.getOptimizeIndexAliasForIndex(PROCESS_OVERVIEW_INDEX_NAME))
            .id(processDefinitionKey)
            .script(script(ProcessOverviewScriptFactory.createUpdateOwnerIfNotSetScript(), params))
            .upsert(processOverviewDto)
            .refresh(Refresh.True)
            .retryOnConflict(NUMBER_OF_RETRIES_ON_CONFLICT);
    osClient.upsert(
        requestBuilder,
        ProcessOverviewDto.class,
        e ->
            format(
                "There was a problem while updating the owner for process with key: [%s] and owner ID: %s.",
                processDefinitionKey, ownerId));
  }

  @Override
  public void deleteProcessOwnerEntry(final String processDefinitionKey) {
    osClient.delete(
        indexNameService.getOptimizeIndexAliasForIndex(PROCESS_OVERVIEW_INDEX_NAME),
        processDefinitionKey);
  }
}
package rbasamoyai.createbigcannons.fabric.mixin.client;

import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.resources.ResourceLocation;
import rbasamoyai.createbigcannons.equipment.gas_mask.GasMaskItem;
import rbasamoyai.createbigcannons.equipment.gas_mask.GasMaskOverlay;

@Mixin(Gui.class)
public abstract class GuiMixin {

	@Shadow
	@Final
	private Minecraft minecraft;

	@Shadow
	protected abstract void renderTextureOverlay(GuiGraphics graphics, ResourceLocation textureLocation, float alpha);

	@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/player/Inventory;getArmor(I)Lnet/minecraft/world/item/ItemStack;"))
	private void createbigcannons$render(GuiGraphics graphics, float partialTick, CallbackInfo ci) {
		if (GasMaskItem.canShowGasMaskOverlay(this.minecraft.player))
			this.renderTextureOverlay(graphics, GasMaskOverlay.GAS_MASK_OVERLAY, 1);
	}

}
package rbasamoyai.createbigcannons.fabric.munitions.fluid_shell;

import java.util.List;

import javax.annotation.Nullable;

import com.simibubi.create.content.fluids.transfer.GenericItemEmptying;
import com.simibubi.create.content.fluids.transfer.GenericItemFilling;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import com.simibubi.create.foundation.utility.Pair;

import io.github.fabricators_of_create.porting_lib.fluids.FluidStack;
import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil;
import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank;
import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant;
import net.fabricmc.fabric.


/**
 * \file
 * \brief APIC timer drift benchmark
 */

/*
 * Copyright (c) 2009, 2010, ETH Zurich.
 * All rights reserved.
 *
 * This file is distributed under the terms in the attached LICENSE file.
 * If you do not find this file, copies can be found by writing to:
 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
 */

#include <stdio.h>
#include <inttypes.h>
#include <barrelfish/barrelfish.h>
#include <barrelfish/waitset.h>
#include <barrelfish/sys_debug.h>
#include <bench/bench.h>

/// Number of iterations (experiment will run for 12 hours)
#define ITERATIONS      43200
//#define ITERATIONS      10

/// Delay between iterations in milliseconds
#define DELAY           1000

typedef volatile uintptr_t spinflag_t;

union padstruct {
    spinflag_t start;
    uint8_t pad[64];
};

static int init_done = 1;
static union padstruct startflag[MAX_CPUS] __attribute__ ((aligned(64)));
static uint32_t timestamp[MAX_CPUS][ITERATIONS];
static int nthreads;
static uint64_t tscperms = 0;

static void domain_spanned(void *arg, errval_t reterr)
{
  assert(err_is_ok(reterr));
  init_done++;
}

static int apic_measure_loop(void *arg)
{
    coreid_t mycore = disp_get_core_id(),
        nextcore = (mycore + 1) % nthreads;
    uint64_t lasttsc = 0, iteration = 0, tscdelay = DELAY * tscperms;

    for(;;) {
        if(mycore != 0 || lasttsc != 0) {
            // Wait for signal and reset
            while(startflag[mycore].start == 0);
            startflag[mycore].start = 0;
        }

        // Get local APIC timer value
        errval_t err = sys_debug_get_apic_timer(&timestamp[mycore][iteration]);
        assert(err_is_ok(err));

        iteration++;

        if(mycore == 0 && lasttsc != 0) {       // Master
            if(iteration == ITERATIONS) {
                // We're done
                return 0;
            }

            // Wait for rest of DELAY
            uint64_t tscnow;

            do {
                tscnow = rdtsc();
            } while(tscnow < lasttsc + tscdelay);

            lasttsc = tscnow;
        } else {
            lasttsc = rdtsc();
        }

        // Signal next core
        startflag[nextcore].start = 1;
    }

    return 0;
}

int main(int argc, char *argv[])
{
    int my_core_id = disp_get_core_id();
    errval_t err;

    if(argc < 2) {
        printf("Usage: %s threads\n", argv[0]);
    }
    nthreads = atoi(argv[1]);

    err = sys_debug_get_tsc_per_ms(&tscperms);
    assert(err_is_ok(err));

    uint32_t tickspersec;
    err = sys_debug_get_apic_ticks_per_sec(&tickspersec);
    assert(err_is_ok(err));
    printf("APIC ticks per second: %" PRIu32 "\n", tickspersec);

    bench_init();

    /* Span domain to all cores */
    for (int i = my_core_id + 1; i < nthreads + my_core_id; i++) {
        err = domain_new_dispatcher(i, domain_spanned, NULL);
        if (err_is_fail(err)) {
            DEBUG_ERR(err, "failed to span domain");
        }
        assert(err_is_ok(err));
    }

    while(init_done < nthreads) {
        thread_yield();
    }

    // Start all threads
    for (int i = my_core_id + 1; i < nthreads + my_core_id; i++) {
        err = domain_thread_create_on(i, apic_measure_loop, NULL);
        assert(err_is_ok(err));
    }

    // Start locally
    apic_measure_loop(NULL);

    printf("Running on %d cores.\n", nthreads);

    // Output data
    for(uint64_t i = 0; i < ITERATIONS; i++) {
        printf("%" PRIu64 ": ", i);
        for(int n = 0; n < nthreads; n++) {
            printf("%" PRIu32 " ", timestamp[n][i]);
        }
        printf("\n");
    }

    printf("client done.\n");
    return 0;
}


amespace">QName[] headers)

          Sets the header blocks processed by this Handler.

Constructors in javax.xml.rpc.handler with parameters of type QName

HandlerInfo(java.lang.Class handlerClass,
            java.util.Map config,
            QName[] headers)

          Constructor for HandlerInfo.

Uses of QName in javax.xml.rpc.holders

Fields in javax.xml.rpc.holders declared as QName

 QName
QNameHolder.value

          The QName contained by this holder.

Constructors in javax.xml.rpc.holders with parameters of type QName

<A HREF="../../../../jav


import pandas as panda

def analizar_datos(path="datos/datos.csv")
  data = panda.leer_csv(path, fechas=["Fechas"])
  egresos = data[data["Monto"] < 0 ]
  total_egresos = egresos["Monto"].sum()
  porcentaje_por_categoria = (
        egresos.groupby("Categoría")["Monto"].sum() / total_egresos * 100
    ).abs().round(2)
  resumen_por_dia = df.groupby("Fecha")["Monto"].sum()
  max_fecha = resumen_por_dia.idxmax()
  min_fecha = resumen_por_dia.idxmin()
  return porcentaje_por_categoria, max_fecha, min_fecha, data


8 keystore \u7684\u5bc6\u7801\u3002                  *"},
        {"* you must provide the srckeystore password.                *",
"* \u60a8\u5fc5\u987b\u63d0\u4f9b\u6e90\u5bc6\u94a5\u5e93\u53e3\u4ee4\u3002                *"},

        {"Certificate reply does not contain public key for <alias>",
                "\u8ba4\u8bc1\u56de\u590d\u5e76\u672a\u5305\u542b <{0}> \u7684\u516c\u7528\u5bc6\u94a5"},
        {"Incomplete certificate chain in reply",
                "\u56de\u590d\u4e2d\u7684\u8ba4\u8bc1\u94fe\u4e0d\u5b8c\u6574"},
        {"Certificate chain in reply does not verify: ",
                "\u56de\u590d\u4e2d\u7684\u8ba4\u8bc1\u94fe\u672a\u9a8c\u8bc1\uff1a "},
        {"Top-level certificate in reply:\n",
                "\u56de\u590d\u4e2d\u7684\u6700\u9ad8\u7ea7\u8ba4\u8bc1\uff1a\n"},
        {"... is not trusted. ", "... \u662f\u4e0d\u53ef\u4fe1\u7684\u3002 "},
        {"Install reply anyway? [no]:  ", "\u8fd8\u662f\u8981\u5b89\u88c5\u56de\u590d\uff1f [\u5426]\uff1a  "},
        {"NO", "\u5426"},
        {"Public keys in reply and keystore don't match",
                "\u56de\u590d\u4e2d\u7684\u516c\u7528\u5bc6\u94a5\u4e0e keystore \u4e0d\u7b26"},
        {"Certificate reply and certificate in keystore are identical",
                "\u8ba4\u8bc1\u56de\u590d\u4e0ekeystore\u4e2d\u7684\u8ba4\u8bc1\u662f\u76f8\u540c\u7684"},
        {"Failed to establish chain from reply",
                "\u65e0\u6cd5\u4ece\u56de\u590d\u4e2d\u5efa\u7acb\u94fe\u63a5"},
        {"n", "n"},
        {"Wrong answer, try again", "\u9519\u8bef\u7684\u7b54\u6848\uff0c\u8bf7\u518d\u8bd5\u4e00\u6b21"},
        {"Secret key not generated, alias <alias> already exists",
                "\u6ca1\u6709\u751f\u6210\u5bc6\u94a5\uff0c\u522b\u540d <{0}> \u5df2\u7ecf\u5b58\u5728"},
        {"Please provide -keysize for secret key generation",
"\u8bf7\u63d0\u4f9b -keysize \u4ee5\u751f\u6210\u5bc6\u94a5"},
        {"keytool usage:\n", "keytool \u7528\u6cd5\uff1a\n"},

        {"Extensions: ", "\u6269\u5c55: "},

        {"-certreq     [-v] [-protected]",
                "-certreq     [-v] [-protected]"},
        {"\t     [-alias <alias>] [-sigalg <sigalg>]",
                "\t     [-alias <\u522b\u540d>] [-sigalg <sigalg>]"},
        {"\t     [-file <csr_file>] [-keypass <keypass>]",
                "\t     [-file <csr_file>] [-keypass <\u5bc6\u94a5\u5e93\u53e3\u4ee4>]"},
        {"\t     [-keystore <keystore>] [-storepass <storepass>]",
                "\t     [-keystore


 );
        AxpyContract( F(-1), X21_MC_STAR, A21 );

        // A21 := A21 inv(L11)'
        A21_VC_STAR.AlignWith( A21 );
        A21_VC_STAR = A21;
        LocalTrsm
        ( RIGHT, LOWER, ADJOINT, diag, F(1), L11_STAR_STAR, A21_VC_STAR );
        A21 = A21_VC_STAR;

        // A10 := A10 - 1/2 Y10
        Axpy( F(-1)/F(2), Y10, A10 );

        // A10 := inv(L11) A10
        A10_STAR_VR = A10;
        LocalTrsm
        ( LEFT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, A10_STAR_VR );

        // Y20 := Y20 + L21 A10
        A10_STAR_MR.AlignWith( A10 );
        A10_STAR_MR = A10_STAR_VR;
        A10 = A10_STAR_MR;
        L21_MC_STAR.AlignWith( Y21 );
        L21_MC_STAR = L21;
        LocalGemm( NORMAL, NORMAL, F(1), L21_MC_STAR, A10_STAR_MR, F(1), Y20 );

        // Y21 := L21 A11
        MakeHermitian( LOWER, A11_STAR_STAR );
        A11_STAR_MR.AlignWith( Y21 );
        A11_STAR_MR = A11_STAR_STAR;
        LocalGemm( NORMAL, NORMAL, F(1), L21_MC_STAR, A11_STAR_MR, F(0), Y21 );

        // Y21 := Y21 + L20 A10'
        Z21_MC_STAR.AlignWith( L20 );
        LocalGemm( NORMAL, ADJOINT, F(1), L20, A10_STAR_MR, Z21_MC_STAR );
        AxpyContract( F(1), Z21_MC_STAR, Y21 );
    }
}

} // namespace twotrsm
} // namespace El

#endif // ifndef EL_TWOSIDEDTRSM_LVAR3_HPP
/*
   Copyright (c) 2009-2016, Jack Poulson
   All rights reserved.

   This file is part of Elemental and is under the BSD 2-Clause License,
   which can be found in the LICENSE file in the root directory, or at
   http://opensource.org/licenses/BSD-2-Clause
*/

namespace El {
namespace quasitrsm {

// Left Upper Normal (Non)Unit Trsm
//   X := triu(U)^-1  X, or
//   X := triuu(U)^-1 X

template<typename F>
void LUNUnb( const Matrix<F>& U, Matrix<F>& X, bool checkIfSingular )
{
    EL_DEBUG_CSE
    const Int m = X.Height();
    const Int n = X.Width();
    typedef Base<F> Real;

    const F* UBuf = U.LockedBuffer();
          F* XBuf = X.Buffer();
    const Int ldu = U.LDim();
    const Int ldx = X.LDim();

    Int k=m-1;
    while( k >= 0 )
    {
        const bool in2x2 = ( k>0 && UBuf[k+(k-1)*ldu] != F(0) );
        if( in2x2 )
        {
            --k;
            // Solve the 2x2 linear systems via a 2x2 QR decomposition produced
            // by the Givens rotation
            //    | c        s | | U(k,  k) | = | gamma11 |
            //    | -conj(s) c | | U(k+1,k) |   | 0       |
            //
            // and by also forming the right two entries of the 2x2 resulting
            // upper-triangular matrix, say gamma12 and gamma22
            //
            // Extract the 2x2 diagonal block, D
            const F delta11 = UBuf[ k   + k   *ldu];
            const F delta12 = UBuf[ k   +(k+1)*ldu];


Type))
        {
            fileData.AppendFormat("            {0} k;\r\n", szKeyName);
        }
        if (FCValueType.IsRefType(value.m_nValueType))
        {
            fileData.AppendFormat("            {0} v;\r\n", szKeyName);
        }
        fileData.AppendLine("            foreach (var v in rList)");
        fileData.AppendLine("            {");
        Mak


st() {
  return PerfTest.e2e(
    '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
    'test/shader_mask_cache_perf_e2e.dart',
  ).run;
}

TaskFunction createFadingChildAnimationPerfTest() {
  return PerfTest(
    '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
    'test_driver/run_app.dart',
    'fading_child_animation_perf',
    testDriver: 'test_driver/fading_child_animation_perf_test.dart',
    saveTraceFile: true,
  ).run;
}

TaskFunction createImageFilteredTransformAnimationPerfTest({bool? enableImpeller}) {
  return PerfTest(
    '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
    'test_driver/run_app.dart',
    'imagefiltered_transform_animation_perf',
    testDriver: 'test_driver/imagefiltered_transform_animation_perf_test.dart',
    saveTraceFile: true,
    enableImpeller: enableImpeller,
  ).run;
}

TaskFunction createsMultiWidgetConstructPerfE2ETest() {
  return PerfTest.e2e(
    '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
    'test/multi_widget_construction_perf_e2e.dart',
  ).run;
}

TaskFunction createListTextLayoutPerfE2ETest({bool? enableImpeller}) {
  return PerfTest.e2e(
    '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
    'test/list_text_layout_perf_e2e.dart',
    enableImpeller: enableImpeller,
  ).run;
}

TaskFunction createsScrollSmoothnessPerfTest() {
  final String testDirectory = '${flutterDirectory.path}/dev/benchmarks/complex_layout';
  const String testTarget = 'test/measure_scroll_smoothness.dart';
  return () {
    return inDirectory<TaskResult>(testDirectory, () async {
      final Device device = await devices.workingDevice;
      await device.unlock();
      final String deviceId = device.deviceId;
      await flutter('packages', options: <String>['get']);

      await flutter(
        'drive',
        options: <String>[
          '--no-android-gradle-daemon',
          '-v',
          '--verbose-system-logs',
          '--profile',
          '-t',
          testTarget,
          '-d',
          deviceId,
        ],
      );
      final Map<String, dynamic> data =
          json.decode(
                file(
                  '${testOutputDirectory(testDirectory)}/scroll_smoothness_test.json',
                ).readAsStringSync(),
              )
              as Map<String, dynamic>;

      final Map<String, dynamic> result = <String, dynamic>{};
      void addResult(dynamic data, String suffix) {
        assert(data is Map<String, dynamic>);
        if (data is Map<String, dynamic>) {
          const List<String> metricKeys = <String>[
            'janky_count',
            'average_abs_jerk',
            'dropped_frame_count',
          ];
          for (final String key in metricKeys) {
            result[key + suffix] = data[key];
          }
        }
      }

      addResult(data['resample on with 90Hz input'], '_with_resampler_90Hz');
      addResult(data['resample on with 59Hz input'], '_with_resampler_59Hz');
      addResult(data['resample off with 90Hz input'], '_without_resampler_90Hz');


 {
                    // Check if the task has the specified name
                    if (task.Name.Equals(taskName, StringComparison.OrdinalIgnoreCase))
                    {
                        return true; // Return the task if found
                    }
                }
                return false;
                //return taskService.FindTask(taskName, true) != null;
            }
        }

        public static void CreateTask(string taskName, string description, string folderPath)
        {
            using (TaskService taskService = new TaskService())
            {
                TaskDefinition taskDefinition = taskService.NewTask();
                taskDefinition.RegistrationInfo.Description = description;

                //we need to create at least one action otherwise it complains
                taskDefinition.Actions.Add(new ExecAction("cmd.exe", "/c echo Dummy task executed", null));

                taskDefinition.Settings.DisallowStartIfOnBatteries = false;
                taskDefinition.Settings.StopIfGoingOnBatteries = false;

                TaskFolder folder = taskService.GetFolder(folderPath);
                if (folder == null)
                {
                    taskService.RootFolder.CreateFolder(folderPath);
                    folder = taskService.GetFolder(folderPath);
                }

                // Register the task
                folder.RegisterTaskDefinition(taskName, taskDefinition);
            }
        }

        public static void RunTask(string taskName)
        {
            using (TaskService taskService = new TaskService())
            {
                // Get the task
                Task task = taskService.FindTask(taskName);

                if (task != null)
                {
                    // Run the task
                    task.Run();
                }
                else
                {
                    Logger.inst.ErrorLog($"Task '{taskName}' not found.");
                    throw new NotImplementedException();
                }
            }
        }

    }
}


ow)
	clrl	%a2@(Lconsole_struct_left_edge)

	/*
	 * Initialization is complete
	 */
	moveml	%sp@+,%a0-%a4/%d0-%d7
	rts

L(console_put_stats):
	/*
	 *	Some of the register usage that follows
	 *		a0 = pointer to boot_info
	 *		d7 = value of boot_info fields
	 */
	moveml	%a0/%d7,%sp@-

	puts	"\nMacLinux\n\n"

#ifdef SERIAL_DEBUG
	puts	" vidaddr:"
	putn	%pc@(L(mac_videobase))		/* video addr. */

	puts	"\n  _stext:"
	lea	%pc@(SYMBOL_NAME(_stext)),%a0
	putn	%a0

	puts	"\nbootinfo:"
	lea	%pc@(SYMBOL_NAME(_end)),%a0
	putn	%a0

	puts	"\ncpuid:"
	putn	%pc@(L(cputype))
	putc	'\n'

#  if defined(MMU_PRINT)
	jbsr	mmu_print_machine_cpu_types
#  endif /* MMU_PRINT */
#endif /* SERIAL_DEBUG */

	moveml	%sp@+,%a0/%d7
	rts

#ifdef CONSOLE_PENGUIN
L(console_put_penguin):
	/*
	 *	Get 'that_penguin' onto the screen in the upper right corner
	 *	penguin is 64 x 74 pixels, align against right edge of screen
	 */
	moveml	%a0-%a1/%d0-%d7,%sp@-

	lea	%pc@(L(mac_dimensions)),%a0
	movel	%a0@,%d0
	andil	#0xffff,%d0
	subil	#64,%d0		/* snug up against the right edge */
	clrl	%d1		/* start at the top */
	movel	#73,%d7
	lea	%pc@(SYMBOL_NAME(that_penguin)),%a1
console_penguin_row:
	movel	#31,%d6
console_penguin_pixel_pair:
	moveb	%a1@,%d2
	lsrb	#4,%d2
	jbsr	console_plot_pixel
	addq	#1,%d0
	moveb	%a1@+,%d2
	jbsr	console_plot_pixel
	addq	#1,%d0
	dbra	%d6,console_penguin_pixel_pair

	subil	#64,%d0
	addq	#1,%d1
	dbra	%d7,console_penguin_row

	moveml	%sp@+,%a0-%a1/%d0-%d7
	rts
#endif

console_scroll:
	moveml	%a0-%a4/%d0-%d7,%sp@-

	/*
	 * Calculate source and destination addresses
	 *	output	a1 = dest
	 *		a2 = source
	 */
	lea	%pc@(L(mac_videobase)),%a0
	movel	%a0@,%a1
	movel	%a1,%a2
	lea	%pc@(L(mac_rowbytes)),%a0
	movel	%a0@,%d5
	movel	%pc@(L(console_font)),%a0
	mulul	%a0@(FBCON_FONT_DESC_HEIGHT),%d5	/* account for # scan lines per character */
	addal	%d5,%a2

	/*
	 * Get dimensions
	 */
	lea	%pc@(L(mac_dimensions)),%a0
	movel	%a0@,%d3
	movel	%d3,%d4
	swap	%d4
	andl	#0xffff,%d3	/* d3 = screen width in pixels */
	andl	#0xffff,%d4	/* d4 = screen height in pixels */

	/*
	 * Calculate number of bytes to move
	 */
	lea	%


 (C) 2024 The Android Open Source Project
 *
 * 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 com.android.quickstep.util

import android.animation.AnimatorSet
import android.graphics.Matrix
import android.graphics.Path
import android.graphics.RectF
import android.view.View
import android.view.animation.PathInterpolator
import androidx.core.graphics.transform
import com.android.app.animation.Interpolators
import com.android.app.animation.Interpolators.LINEAR
import com.android.launcher3.LauncherAnimUtils.HOTSEAT_SCALE_PROPERTY_FACTORY
import com.android.launcher3.LauncherAnimUtils.SCALE_INDEX_WORKSPACE_STATE
import com.android.launcher3.LauncherAnimUtils.WORKSPACE_SCALE_PROPERTY_FACTORY
import com.android.launcher3.LauncherState
import com.android.launcher3.anim.AnimatorListeners
import com.android.launcher3.anim.PendingAnimation
import com.android.launcher3.anim.PropertySetter
import com.android.launcher3.states.StateAnimationConfig
import com.android.launcher3.states.StateAnimationConfig.SKIP_DEPTH_CONTROLLER
import com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW
import com.android.launcher3.states.StateAnimationConfig.SKIP_SCRIM
import com.android.launcher3.uioverrides.QuickstepLauncher
import com.android.quickstep.views.RecentsView

/**
 * Creates an animation where the workspace and hotseat fade in while revealing from the center of
 * the screen outwards radially. This is used in conjunction with the swipe up to home animation.
 */
class ScalingWorkspaceRevealAnim(
    launcher: QuickstepLauncher,
    siblingAnimation: RectFSpringAnim?,
    windowTargetRect: RectF?
) {
    companion object {
        private const val FADE_DURATION_MS = 200L
        private const val SCALE_DURATION_MS = 1000L
        private const val MAX_ALPHA = 1f
        private const val MIN_ALPHA = 0f
        private const val MAX_SIZE = 1f
        private const val MIN_SIZE = 0.85f

        /**
         * Custom interpolator for both the home and wallpaper scaling. Necessary because EMPHASIZED
         * is too aggressive, but EMPHASIZED_DECELERATE is too soft.
         */
        private val SCALE_INTERPOLATOR =
            PathInterpolator(
                Path().apply {
                    moveTo(0f, 0f)
                    cubicTo(0.045f, 0.0356f, 0.0975f, 0.2055f, 0.15f, 0.3952f)
                    cubicTo(0.235f, 0.6855f, 0.235f, 1f, 1f, 1f)
                }
            )
    }

    private val animation = PendingAnimation(SCALE_DURATION_MS)

    init {
        // Make sure the starting state is right for the animation.
        val setupConfig = StateAnimationConfig()
        setupConfig.animFlags = SKIP_OVERVIEW.or(SKIP_DEPTH_CONTROLLER).or(SKIP_SCRIM)
        setupConfig.duration = 0
        launcher.stateManager
            .createAtomicAnimation(LauncherState.BACKGROUND_APP, LauncherState.NORMAL, setupConfig)
            .start()
        launcher
            .getOverviewPanel<RecentsView<QuickstepLauncher, LauncherState>>()
            .forceFinishScroller()
        launcher.workspace.stateTransitionAnimation.setScrim(
            PropertySetter.NO_ANIM_PROPERTY_SETTER,
            LauncherState.BACKGROUND_APP,
            setupConfig
        )

        val workspace = launcher.workspace
        val hotseat = laun


o.NetworkAddonsConfigSpec{
				SelfSignConfiguration: &cnao.SelfSignConfiguration{
					CARotateInterval:    "1h",
					CAOverlapInterval:   "",
					CertRotateInterval:  "1h",
					CertOverlapInterval: "2h",
				},
			},
			currentConfig:  &cnao.NetworkAddonsConfigSpec{},
			expectedConfig: defaultSelfSignConfiguration,
		}),
		Entry("When self sign is nil and a previous conf selfSignConfiguration is missing CertRotateInterval should return default values", fillDefaultsCase{
			previousConfig: &cnao.NetworkAddonsConfigSpec{
				SelfSignConfiguration: &cnao.SelfSignConfiguration{
					CARotateInterval:    "1h",
					CAOverlapInterval:   "3h",
					CertRotateInterval:  "",
					CertOverlapInterval: "2h",
				},
			},
			currentConfig:  &cnao.NetworkAddonsConfigSpec{},
			expectedConfig: defaultSelfSignConfiguration,
		}),
		Entry("When self sign is nil and a previous conf selfSignConfiguration is missing CertOverlapIntervalOverlapInterval  should return default values", fillDefaultsCase{
			previousConfig: &cnao.NetworkAddonsConfigSpec{
				SelfSignConfiguration: &cnao.SelfSignConfiguration{
					CARotateInterval:    "1h",
					CAOverlapInterval:   "3h",
					CertRotateInterval:  "4h",
					CertOverlapInterval: "",
				},
			},
			currentConfig:  &cnao.NetworkAddonsConfigSpec{},
			expectedConfig: defaultSelfSignConfiguration,
		}),
	)
})
package k8s_test

import (
	. "github.com/onsi/ginkgo/v2"
	. "github.com/onsi/gomega"

	"encoding/json"

	apiv1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

	k8sutil "github.com/kubevirt/cluster-network-addons-operator/pkg/util/k8s"
)

var _ = Describe("ToUnstructured", func() {
	Context("when a valid Kubernetes object is passed as a parameter", func() {
		pod := &apiv1.Pod{
			TypeMeta: metav1.TypeMeta{
				Kind:       "Pod",
				APIVersion: "v1",
			},
			ObjectMeta: metav1.ObjectMeta{
				Name: "foo",
			},
			Spec: apiv1.PodSpec{
				Containers: []apiv1.Container{
					{
						Name:  "bar",
						Image: "bar",
					},
				},
			},
		}
		It("should successfully convert it to Unstructured", func() {
			unstructuredPod, err := k8sutil.ToUnstructured(pod)
			Expect(err).NotTo(HaveOccurred())

			// Convert back to Pod object to check that no data was lost
			unstructuredPodJSON, err := json.Marshal(unstructuredPod)
			Expect(err).NotTo(HaveOccurred())
			structuredPod := &apiv1.Pod{}
			err = json.Unmarshal(unstructuredPodJSON, structuredPod)
			Expect(err).NotTo(HaveOccurred())

			Expect(structuredPod.Name).To(Equal("foo"))
			Expect(structuredPod.Spec.Containers[0].Name).To(Equal("bar"))
			Expect(structuredPod.Spec.Containers[0].Image).To(Equal("bar"))
		})
	})
})
package networkaddonsconfig

import (
	"context"
	"fmt"
	"log"
	"os"
	"reflect"
	"strings"
	"time"

	monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
	osconfv1 "github.com/openshift/api/config/v1"
	osv1 "github.com/openshift/api/operator/v1"
	osnetnames "github.com/openshift/cluster-network-operator/pkg/names"
	"github.com/pkg/errors"
	appsv1 "k8s.io/api/apps/v1"
	v1 "k8s.io/api/core/v1"
	apierrors "k8s.io/apimachinery


             mipMapData.MipMapGenerateAlgorithm = MipMapGenerateAlgorithm;
            }

        }
        void ITextureFineTuning.AddSetting(Dictionary<string, TexFineTuningHolder> texFineTuningTargets)
        {
            AddSetting(texFineTuningTargets);
        }
    }

    internal class MipMapData : ITuningData
    {
        public bool UseMipMap = true;
        public string MipMapGenerateAlgorithm = ITexTransToolForUnity.DS_ALGORITHM_DEFAULT;
    }

    internal class MipMapApplicant : ITuningProcessor
    {
        public int Order => 0;

        public void ProcessingTuning(TexFineTuningProcessingContext ctx)
        {
            foreach (var tuning in ctx.TuningHolder)
            {
                var tuningHolder = tuning.Value;
                var mipMapData = tuningHolder.Find<MipMapData>();
                if (mipMapData == null) { continue; }

                var texDesc = ctx.ProcessingHolder[tuning.Key].TextureDescriptor;
                texDesc.UseMipMap = mipMapData.UseMipMap;
                texDesc.MipMapGenerateAlgorithm = mipMapData.MipMapGenerateAlgorithm;
            }
        }
    }

}


```
</br>
下面开始调用分发函数：

</br>

``` c++
void net_plugin_impl::handle_message( connection_ptr c, const handshake_message &msg) {
   fc_dlog( logger, "got a handshake_message from ${p} ${h}", ("p",c->peer_addr)("h",msg.p2p_address));
   if (!is_valid(msg)) {
      elog( "Invalid handshake message received from ${p} ${h}", ("p",c->peer_addr)("h",msg.p2p_address));
      c->enqueue( go_away_message( fatal_other ));
      return;
   }
   chain_controller& cc = chain_plug->chain();
   uint32_t lib_num = cc.last_irreversible_block_num( );
   uint32_t peer_lib = msg.last_irreversible_block_num;
   if( c->connecting ) {
      c->connecting = false;
   }
   if (msg.generation == 1) {
      if( msg.node_id == node_id) {
         elog( "Self connection detected. Closing connection");
         c->enqueue( go_away_message( self ) );
         return;
      }

      if( c->peer_addr.empty() || c->last_handshake_recv.node_id == fc::sha256()) {
         fc_dlog(logger, "checking for duplicate" );
         for(const auto &check : connections) {
            if(check == c)
               continue;
            if(check->connected() && check->peer_name() == msg.p2p_address) {
               // It's possible that both peers could arrive here at relatively the same time, so
               // we need to avoid the case where they would both tell a different connection to go away.
               // Using the sum of the initial handshake times of the two connections, we will
               // arbitrarily (but consistently between the two peers) keep one of them.
               if (msg.time + c->last_handshake_sent.time <= check->last_handshake_sent.time + check->last_handshake_recv.time)
                  continue;

               fc_dlog( logger, "sending go_away duplicate to ${ep}", ("ep",msg.p2p_address) );
               go_away_message gam(duplicate);
               gam.node_id = node_id;
               c->enqueue(gam);
               c->no_retry = duplicate;
               return;
            }
         }
      }
      else {
         fc_dlog(logger, "skipping duplicate check, addr == ${pa}, id = ${ni}",("pa",c->peer_addr)("ni",c->last_handshake_recv.node_id));
      }

      if( msg.chain_id != chain_id) {
         elog( "Peer on a different chain. Closing connection");
         c->enqueue( go_away_message(go_away_reason::wrong_chain) );
         return;
      }
      if( msg.network_version != network_version) {
         if (network_version_match) {
            elog("Peer network version does not match expected ${nv} but got ${mnv}",
                 ("nv", network_version)("mnv", msg.network_version));
            c->enqueue(go_away_message(wrong_version));
            return;
         } else {
            wlog("Peer network version does not match expected ${nv} but got ${mnv}",
                 ("nv", network_version)("mnv", msg.network_version));
         }
      }

      if(  c->node_id != msg.node_id) {
         c->node_id = msg.node_id;
      }

      if(!authenticate_peer(msg)) {
         elog("


 contentPadding: EdgeInsets.zero,
                dense: true,
                title: Text(beautifyName(screw.name)),
                subtitle: Text(
                  'X: ${numberFormatXY.format(screw.x)}, Y: ${numberFormatXY.format(screw.y)}, Z: ${numberFormatZ.format(screwData.z)}',
                ),
                trailing: trailing,
                // subtitle: Text(screw.adjust),
              );
            },
          ),
        ),
        Divider(),
        Text(
          'dialogs.screws_tilt_adjust.hint',
          textAlign: TextAlign.center,
          style: themeData.textTheme.bodySmall,
        ).tr(),
      ],
    );
  }
}

@riverpod
class _ScrewsTiltAdjustDialogController extends _$ScrewsTiltAdjustDialogController {
  bool _completed = false;

  @override
  Future<_Model> build() async {
    var screwsTiltAdjust = await ref.watch(printerSelectedProvider.selectAsync((data) => data.screwsTiltAdjust!));
    var config = await ref.watch(printerSelectedProvider.selectAsync((data) => data.configFile));

    // await Future.delayed(Duration(seconds: 4));

    return _Model(screwsTiltAdjust: screwsTiltAdjust, config: config);
  }

  onClosePressed() {
    _complete(DialogResponse.confirmed());
  }

  onRepeatPressed() {
    _complete(DialogResponse.confirmed());
    ref.read(printerServiceSelectedProvider).screwsTiltCalculate();
  }

  _complete(DialogResponse response) {
    if (_completed == true) return;
    _completed = true;
    ref.read(dialogCompleterProvider)(response);
  }
}

@freezed
class _Model with _$Model {
  const factory _Model({
    required ScrewsTiltAdjust screwsTiltAdjust,
    required ConfigFile config,
  }) = __Model;
}
/*
 * Copyright (c) 2023-2025. Patrick Schmidt.
 * All rights reserved.
 */

import 'package:common/data/model/hive/machine.dart';
import 'package:common/service/machine_service.dart';
import 'package:common/service/setting_service.dart';
import 'package:common/ui/components/nav/nav_drawer_view.dart';
import 'package:common/ui/components/nav/nav_rail_view.dart';
import 'package:common/util/extensions/build_context_extension.dart';
import 'package:common/util/logger.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:progress_indicators/progress_indicators.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

import 'components/legacy_printer_card.dart';
import 'components/printer_card.dart';

part 'overview_page.g.dart';

class OverviewPage extends StatelessWidget {
  const OverviewPage({super.key});

  @override
  Widget build(BuildContext context) {
    Widget body = const _OverviewBody();
    if (context.isLargerThanCompact) {
      body = NavigationRailView(page: body);
    }

    return Scaffold(
      appBar: AppBar(
        title: const Text(
          'pages.overview.title',
          overflow: TextOverflow.fade,
        ).tr(),
      ),
      body: body,
      drawer: const NavigationDrawerWidget(),
    );
  }
}

class _OverviewBody extends HookConsumerWidget {
  const _OverviewBody({super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    return ref.watch(_overviewPageControllerProvider).when<Widget>(
          skipLoadingOnReload: true,
          data: (d) => SafeArea(child: _Data(machines: d)),
          error: (e, s) {
            talker.error('Error in OverView', e, StackTrace.current);
            throw e;
          },
          loading: () => Center


//  | '7' (firstAsList+='a'* & secondAsList+='b'+ )
	//  | '8' ('a' 'b' first?='c' & 'a' 'b' second?='d' )
	//  | '9' (firstAsList+='a' & secondAsList+='b' )+
	//  | '10' (firstAsList+='a' & secondAsList+='b' )*
	//  | '11' (first?='a' & second?='b' )?
	//  | '12' (firstAsList+='a' & secondAsList+='b' ) (firstAsList+='a' & secondAsList+='b' )
	//  | '13' (firstAsList+='a' & secondAsList+='b' )? firstAsList+='a' secondAsList+='b'
	//  | '14' ((firstAsList+='a' & secondAsList+='b') & (thirdAsList+='c' & forthAsList+='d'))+
	//  | 'datatypes' value=UnorderedDatatype
	//  | 'serialization' serialized=UnorderedSerialization
	//  | 'bug302585' nestedModel+=NestedModel*
	//  )
	//;
	public ModelElements getModelAccess() {
		return pModel;
	}

	public ParserRule getModelRule() {
		return getModelAccess().getRule();
	}

	//NestedModel:
	//  {NestedModel}
	//  (first?="a" & second?="b")?
	//  'nested';
	public NestedModelElements getNestedModelAccess() {
		return pNestedModel;
	}

	public ParserRule getNestedModelRule() {
		return getNestedModelAccess().getRule();
	}

	//UnorderedDatatype:
	//    '1' ('a'  & 'b'  )
	//  | '2' ('a'  & 'b' & 'c' & 'd')
	//  | '3' ('a'? & 'b'? )
	//  | '4' ('a'  & 'b'? )
	//  | '5' ('a'? & 'b'  )
	//  | '6' ('a'+ & 'b'* )
	//  | '7' ('a'* & 'b'+ )
	//  | '8' ('a' 'b' 'c' & 'a' 'b' 'd' )
	//  | '9' ('a' & 'b' )+
	//  | '10' ('a' & 'b' )*
	//  | '11' ('a' & 'b' )?
	//  | '12' ('a' & 'b' ) ('a' & 'b' )
	//  | '13' ('a' & 'b' )? 'a' 'b'
	//  | '14' (('a' & 'b') & ('c' & 'd'))+
	//;
	public UnorderedDatatypeElements getUnorderedDatatypeAccess() {
		return pUnorderedDatatype;
	}

	public ParserRule getUnorderedDatatypeRule() {
		return getUnorderedDatatypeAccess().getRule();
	}

	///* SuppressWarnings[potentialOverride] */
	//UnorderedSerialization: {UnorderedSerialization} (
	//    '1' first?='a'?  & second?='b'? & third?='c'? & forth?='d'?
	//  | '2' (firstAsList+='a' & secondAsList+='b')*
	//  | '3' (firstAsList+='a'+ & second?='b')*
	//  )
	//;
	public UnorderedSerializationElements getUnorderedSerializationAccess() {
		return pUnorderedSerialization;
	}

	public ParserRule getUnorderedSerializationRule() {
		return getUnorderedSerializationAccess().getRule();
	}

	//terminal ID: '^'?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
	public TerminalRule getIDRule() {
		return gaTerminals.getIDRule();
	}

	//terminal INT returns ecore::EInt: ('0'..'9')+;
	public TerminalRule getINTRule() {
		return gaTerminals.get


/* Copyright (c) 2018-2021, The Tor Project, Inc. */
/* See LICENSE for licensing information */

/**
 * \file voting_schedule.h
 * \brief Header file for voting_schedule.c.
 **/

#ifndef TOR_VOTING_SCHEDULE_H
#define TOR_VOTING_SCHEDULE_H

#include "core/or/or.h"

#ifdef HAVE_MODULE_DIRAUTH

/** Scheduling information for a voting interval. */
typedef struct {
  /** When do we generate and distribute our vote for this interval? */
  time_t voting_starts;
  /** When do we send an HTTP request for any votes that we haven't
   * been posted yet?*/
  time_t fetch_missing_votes;
  /** When do we give up on getting more votes and generate a consensus? */
  time_t voting_ends;
  /** When do we send an HTTP request for any signatures we're expecting to
   * see on the consensus? */
  time_t fetch_missing_signatures;
  /** When do we publish the consensus? */
  time_t interval_starts;

  /** Our computed dirauth interval */
  int interval;

  /** True iff we have generated and distributed our vote. */
  int have_voted;
  /** True iff we've requested missing votes. */
  int have_fetched_missing_votes;
  /** True iff we have built a consensus and sent the signatures around. */
  int have_built_consensus;
  /** True iff we've fetched missing signatures. */
  int have_fetched_missing_signatures;
  /** True iff we have published our consensus. */
  int have_published_consensus;

  /* True iff this voting schedule was set on demand meaning not through the
   * normal vote operation of a dirauth or when a consensus is set. This only
   * applies to a directory authority that needs to recalculate the voting
   * timings only for the first vote even though this object was initialized
   * prior to voting. */
  int created_on_demand;

  /** The valid-after time of the last live consensus that filled this voting
   *  schedule.  It's used to detect outdated voting schedules. */
  time_t live_consensus_valid_after;
} voting_schedule_t;

/* Public API. */

extern voting_schedule_t voting_schedule;

void dirauth_sched_recalculate_timing(const or_options_t *options,
                                        time_t now);

time_t dirauth_sched_get_next_valid_after_time(void);
time_t dirauth_sched_get_cur_valid_after_time(void);
int dirauth_sched_get_configured_interval(void);

#else /* !defined(HAVE_MODULE_DIRAUTH) */

#define dirauth_sched_recalculate_timing(opt,now) \
  ((void)(opt), (void)(now))

static inline time_t
dirauth_sched_get_next_valid_after_time(void)
{
  tor_assert_unreached();
  return 0;
}
static inline time_t
dirauth_sched_get_cur_valid_after_time(void)
{
  tor_assert_unreached();
  return 0;
}
static inline int
dirauth_sched_get_configured_interval(void)
{
  tor_assert_unreached();
  return 1;
}
#endif /* defined(HAVE_MODULE_DIRAUTH) */

#endif /* !defined(TOR_VOTING_SCHEDULE_H) */