= virtClient.VirtualMachinePool(testsuite.NamespaceTestDefault).Create(context.Background(), newPool, metav1.CreateOptions{})
		Expect(err.Error()).To(ContainSubstring("admission webhook \"virtualmachinepool-validator.kubevirt.io\" denied the request: spec.virtualMachineTemplate.spec.template.spec.domain.devices.disks[2].Name 'testdisk' not found"))
	})

	It("should remove VMs once they are marked for deletion", func() {
		newPool := newVirtualMachinePool()
		// Create a pool with two replicas
		doScale(newPool.Name, 2)
		// Delete it
		By("Deleting the VirtualMachinePool")
		Expect(virtClient.VirtualMachinePool(newPool.ObjectMeta.Namespace).Delete(context.Background(), newPool.ObjectMeta.Name, metav1.DeleteOptions{})).To(Succeed())
		// Wait until VMs are gone
		By("Waiting until all VMs are gone")
		Eventually(func() int {
			vms, err := virtClient.VirtualMachine(newPool.ObjectMeta.Namespace).List(context.Background(), metav1.ListOptions{
				LabelSelector: labelSelectorToString(newPool.Spec.Selector),
			})
			Expect(err).ToNot(HaveOccurred())
			return len(vms.Items)
		}, 120*time.Second, 1*time.Second).Should(BeZero())
	})

	It("should handle pool with dataVolumeTemplates", func() {
		newPool := newPersistentStorageVirtualMachinePool()
		doScale(newPool.ObjectMeta.Name, 2)

		var (
			err       error
			vms       *v1.VirtualMachineList
			dvs       *cdiv1.DataVolumeList
			dvOrigUID types.UID
		)

		By("Waiting until all VMs are created")
		Eventually(func() int {
			vms, err = virtClient.VirtualMachine(newPool.ObjectMeta.Namespace).List(context.Background(), metav1.ListOptions{
				LabelSelector: labelSelectorToString(newPool.Spec.Selector),
			})
			Expect(err).ToNot(HaveOccurred())
			return len(vms.Items)
		}, 60*time.Second, 1*time.Second).Should(Equal(2))

		By("Waiting until all VMIs are created and online")
		waitForVMIs(newPool.Namespace, newPool.Spec.Selector, 2)

		// Select a VM to delete, and record the VM and DV/PVC UIDs associated with the VM.
		origUID := vms.Items[0].UID
		name := vms.Items[0].Name
		dvName := vms.Items[0].Spec.DataVolumeTemplates[0].ObjectMeta.Name
		dvName1 := vms.Items[1].Spec.DataVolumeTemplates[0].ObjectMeta.Name
		Expect(dvName).ToNot(Equal(dvName1))

		By("Ensure DataVolumes are created")
		dvs, err = virtClient.CdiClient().CdiV1beta1().DataVolumes(newPool.Namespace).List(context.Background(), metav1.ListOptions{
			LabelSelector: labelSelectorToString(labelSelectorFromVMs(vms)),
		})
		Expect(err).ToNot(HaveOccurred())
		Expect(dvs.Items).To(HaveLen(2))
		for _, dv := range dvs.Items {
			if dv.Name == dvName {
				dvOrigUID = dv.UID
			}
		}

		Expect(string(dvOrigUID)).ToNot(Equal(""))

		By("deleting a VM")
		foreGround := metav1.DeletePropagationForeground
		Expect(virtClient.VirtualMachine(newPool.ObjectMeta.Namespace).Delete(context.Background(), name, k8smetav1.DeleteOptions{PropagationPolicy: &foreGround})).To(Succeed())

		By("Waiting for deleted VM to be replaced")
		Eventually(func() error {
			vms, err = virtClient.VirtualMachine(newPool.ObjectMeta.Namespace).List(context.Background(), metav1.ListOptions{
				LabelSelector: labelSelectorToString(newPool.Spec.


革|裌邊溝)',	'(公民調査|沒有房地産就沒有新中國|廢牌根絕改革|裌邊溝)'},
{'55384',	'(?i)(氷s*邦|氷s*棒|bings*bang).0,5(毬|qiu|外s*交|外s*蕉|wais*jiao)',	'(?i)(氷s*邦|氷s*棒|bings*bang).0,5(毬|qiu|外s*交|外s*蕉|wais*jiao)'},
{'55385',	'(?i)(乒s*乓|pings*pang).0,5(冰s*棒|bings*bang|冰s*邦)',	'(?i)(乒s*乓|pings*pang).0,5(冰s*棒|bings*bang|冰s*邦)'},
{'55386',	'(?i)(乒s*乓|pings*pang).0,5(氷s*棒|bings*bang|氷s*邦)',	'(?i)(乒s*乓|pings*pang).0,5(氷s*棒|bings*bang|氷s*邦)'},
{'55387',	'(?i)(蜂s*蜜|维s*尼).0,5(冰s*棒|bings*bang|冰s*邦)',	'(?i)(蜂s*蜜|维s*尼).0,5(冰s*棒|bings*bang|冰s*邦)'},
{'55388',	'(?i)(蜂s*蜜|維s*尼).0,5(氷s*棒|bings*bang|氷s*邦)',	'(?i)(蜂s*蜜|維s*尼).0,5(氷s*棒|bings*bang|氷s*邦)'},
{'55389',	'共s*pP*s*产s*pP*s*党',	'共s*pP*s*产s*pP*s*党'},
{'55390',	'(4.25事件|北高联|王维林)',	'(4.25事件|北高联|王维林)'},
{'55391',	'(4.25事件|北高聯|王維林)',	'(4.25事件|北高聯|王維林)'},
{'55392',	'(民运|大陆当局)',	'(民运|大陆当局)'},
{'55393',	'(民運|大陸噹跼)',	'(民運|大陸噹跼)'},
{'55394',	'(红色通缉令中国密报|西班牙国家法院|中美南海|BVI离岸公司|明镜书刊|中国民阵|贺文|炎黄春秋|301医院)',	'(红色通缉令中国密报|西班牙国家法院|中美南海|BVI离岸公司|明镜书刊|中国民阵|贺文|炎黄春秋|301医院)'},
{'55395',	'民族.0,3(冲突|矛盾


// stop_counter.h
//
// The post counter widget for Rivendell
//
//   (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
//
//   This program is free software; you can redistribute it and/or modify
//   it under the terms of the GNU General Public License version 2 as
//   published by the Free Software Foundation.
//
//   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, write to the Free Software
//   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//

#ifndef STOP_COUNTER_H
#define STOP_COUNTER_H

#include <rdairplay_conf.h>
#include <rdpushbutton.h>

class StopCounter : public RDPushButton
{
 Q_OBJECT
 public:
  StopCounter(QWidget *parent=0);
  QSize sizeHint() const;
  QSizePolicy sizePolicy() const;
  void setState(bool state);

 public slots:
  void setTime(QTime time);
  void tickCounter();

 protected:
  void resizeEvent(QResizeEvent *e);

 private:
  void UpdateTime();
  QTime stop_time;
  bool stop_running;
  bool old_stop_running;
  int old_msecs;
  QString stop_text;
};

#endif  // STOP_COUNTER_H


 a value that contains v.
func QueryContains(k, v string) otelhttp.Filter {
	return func(r *http.Request) bool {
		for _, qv := range r.URL.Query()[k] {
			if strings.Contains(qv, v) {
				return true
			}
		}
		return false
	}
}

// Method returns a Filter that returns true if the request
// method is equal to the provided value.
func Method(m string) otelhttp.Filter {
	return func(r *http.Request) bool {
		return m == r.Method
	}
}
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package otelmacaron // import "go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron"

// Version is the current release version of the macron instrumentation.
func Version() string {
	return "0.36.4"
	// This string is updated by the pre_release.sh script during release
}

// SemVersion is the semantic version to be supplied to tracer/meter creation.
func SemVersion() string {
	return "semver:" + Version()
}
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package otelmacaron // import "go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron"

import (
	"go.opentelemetry.io/otel"
	"go.opentelemetry.io/otel/propagation"
	"go.opentelemetry.io/otel/trace"
)

// config is a group of options for this instrumentation.
type config struct {
	TracerProvider trace.TracerProvider
	Propagators    propagation.TextMapPropagator
}

// Option applies an option value for a config.
type Option interface {
	apply(*config)
}

// newConfig returns a config configured with all the passed Options.
func newConfig(opts []Option) *config {
	c := &config{
		Propagators:    otel.GetTextMapPropagator(),
		TracerProvider: otel.GetTracerProvider(),
	}
	for _, o := range opts {
		o.apply(c)
	}
	return c
}

type propagatorsOption struct{ p propagation.TextMapPropagator }

func (o propagatorsOption) apply(c *config) {
	if o.p != nil {
		c.Propagators = o.p
	}
}

// WithPropagators returns an Option to use the Propagators when extracting
// and injecting trace context from HTTP requests.
func WithPropagators(p propagation.TextMapPropagator) Option {
	return propagatorsOption{p: p}
}

type tracerProviderOption struct{ tp trace.TracerProvider }

func (o tracerProviderOption) apply(c *config) {
	if o.tp != nil {
		c.TracerProvider = o.tp
	}
}

// WithTracerProvider returns an Option to use the TracerProvider when
// creating a Tracer.
func WithTracerProvider(tp trace.TracerProvider) Optio


#ifndef lint
static const char	RCSid[] = "$Id: histo.c,v 1.1 2003/02/22 02:07:20 greg Exp $";
#endif
/*
 * Compute a histogram from input data
 *
 *	9/5/96	Greg Ward
 */

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>

#define MAXCOL		64		/* maximum number of input columns */
#define MAXDIV		1024

#define isint(x)	(floor((x)+1e-6) != floor((x)-1e-6))

char	*progname;

int	cumulative = 0;

long	histo[MAXCOL][MAXDIV];
double	minv, maxv;
int	ndiv;

int	ncols;

main(argc, argv)
int	argc;
char	*argv[];
{
	progname = argv[0];
	if (argc > 1 && !strcmp(argv[1], "-c")) {
		cumulative++;
		argc--; argv++;
	}
	if (argc < 3)
		goto userr;
	minv = atof(argv[1]);
	maxv = atof(argv[2]);
	if (argc == 4)
		ndiv = atoi(argv[3]);
	else {
		if (argc > 4 || !isint(minv) || !isint(maxv))
			goto userr;
		maxv += 0.5;
		minv -= 0.5;
		ndiv = maxv - minv + 0.5;
	}
	if (minv >= maxv | ndiv <= 0)
		goto userr;
	if (ndiv > MAXDIV) {
		fprintf(stderr, "%s: maximum number of divisions: %d\n",
				progname, MAXDIV);
		goto userr;
	}
	readinp();
	if (cumulative)
		printcumul();
	else
		printhisto();
	exit(0);
userr:
	fprintf(stderr, "Usage: %s [-c] min max n\n", progname);
	fprintf(stderr, "   Or: %s [-c] imin imax\n", progname);
	exit(1);
}

readinp()			/* gather statistics on input */
{
	char	buf[16*MAXCOL];
	double	d;
	register int	c;
	register char	*cp;

	while ((cp = fgets(buf, sizeof(buf), stdin)) != NULL) {
		for (c = 0; c < MAXCOL; c++) {
			while (isspace(*cp))
				cp++;
			if (!*cp)
				break;
			d = atof(cp);
			while (*cp && !isspace(*cp))
				cp++;
			if (d >= minv && d < maxv)
				histo[c][(int)(ndiv*(d-minv)/(maxv-minv))]++;
		}
		if (c > ncols)
			ncols = c;
	}
}

printcumul()			/* print cumulative histogram results */
{
	long		ctot[MAXCOL];
	register int	i, c;

	for (c = ncols; c--; )
		ctot[c] = 0L;

	for (i = 0; i < ndiv; i++) {
		printf("%g", minv + (maxv-minv)*(i+1)/ndiv);
		for (c = 0; c < ncols; c++) {
			ctot[c] += histo[c][i];
			printf("\t%ld", ctot[c]);
		}
		putchar('\n');
	}
}

printhisto()			/* print histogram results */
{
	register int	i, c;

	for (i = 0; i < ndiv; i++) {
		printf("%g", minv + (maxv-minv)*(i+.5)/ndiv);
		for (c = 0; c < ncols; c++)
			printf("\t%ld", histo[c][i]);
		putchar('\n');
	}
}


this.moveTo(item, { x: item.left, y: item.top });\n    },\n    moveTo: function moveTo(item, _ref) {\n      var x = _ref.x,\n          y = _ref.y;\n\n      this.$set(item, \'style\', {\n        transform: \'translate3d(\' + item.left + \'px,\' + item.top + \'px,0)\'\n      });\n    },\n    addTask: function addTask(fun) {\n      this.taskQueue.push(fun);\n      if (this.taskQueue.length > 0 && !this.taskIsRunning) {\n        this.taskIsRunning = true;\n        window.requestAnimationFrame(this.runTask);\n      }\n    },\n    runTask: function runTask(time) {\n      if (!this.taskLastTime || time - this.taskLastTime >= this.throttleGap) {\n        var func = this.taskQueue.shift();\n        this.taskLastTime = time;\n        func();\n      }\n\n      if (this.taskQueue.length > 0) {\n        window.requestAnimationFrame(this.runTask);\n      } else {\n        this.taskIsRunning = false;\n      }\n    },\n\n    // ========================= Tools ===========================\n    // 计算中英文的长度\n    strlen: function strlen(str) {\n      var len = 0;\n      for (var i in str) {\n        if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {\n          len += 2;\n        } else {\n          len++;\n        }\n      }\n      return len;\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-f7f9a5ba","hasScoped":false,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/lib/vue-baberrage.vue\nvar vue_baberrage_render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    "div",\n    {\n      directives: [\n        {\n          name: "show",\n          rawName: "v-show",\n          value: _vm.isShow,\n          expression: "isShow"\n        }\n      ],\n      ref: "stage",\n      staticClass: "baberrage-stage"\n    },\n    [\n      _c(\n        "div",\n        { staticClass: "baberrage-top" },\n        _vm._l(_vm.topQueue, function(item) {\n          return _c("VueBaberrageMsg", {\n            key: item.id,\n            staticClass: "baberrage-item",\n            attrs: { item: item }\n          })\n        }),\n        1\n      ),\n      _vm._v(" "),\n      _vm._l(_vm.lanes, function(lane) {\n        return _c(\n          "div",\n          { key: lane.id, staticClass: "baberrage-lane" },\n          _vm._l(lane.laneQueue, function(item) {\n            return _c("VueBaberrageMsg", {\n              key: item.runtimeId,\n              staticClass: "baberrage-item",\n              attrs: { item: item }\n            })\n          }),\n          1\n        )\n      }),\n      _vm._v(" "),\n      _c(\n        "div",\n        { staticClass: "baberrage-bottom" },\n        _vm._l(_vm.bottomQueue, function(item) {\n          return _c("VueBaberrageMsg", {\n            key: item.id,\n            staticClass: "baberrage-item",\n            attrs: { item:


import numpy as np

from ray.rllib.offline.input_reader import InputReader
from ray.rllib.offline.json_reader import JsonReader
from ray.rllib.offline.io_context import IOContext
from ray.rllib.utils.annotations import override, DeveloperAPI
from ray.rllib.utils.typing import SampleBatchType
from typing import Dict

@DeveloperAPI
class MixedInput(InputReader):
    """Mixes input from a number of other input sources.

    Examples:
        >>> MixedInput({
            "sampler": 0.4,
            "/tmp/experiences/*.json": 0.4,
            "s3://bucket/expert.json": 0.2,
        }, ioctx)
    """

    @DeveloperAPI
    def __init__(self, dist: Dict[JsonReader, float], ioctx: IOContext):
        """Initialize a MixedInput.

        Args:
            dist (dict): dict mapping JSONReader paths or "sampler" to
                probabilities. The probabilities must sum to 1.0.
            ioctx (IOContext): current IO context object.
        """
        if sum(dist.values()) != 1.0:
            raise ValueError("Values must sum to 1.0: {}".format(dist))
        self.choices = []
        self.p = []
        for k, v in dist.items():
            if k == "sampler":
                self.choices.append(ioctx.default_sampler_input())
            else:
                self.choices.append(JsonReader(k))
            self.p.append(v)

    @override(InputReader)
    def next(self) -> SampleBatchType:
        source = np.random.choice(self.choices, p=self.p)
        return source.next()


 b: 12 },
    { x: 347, y: 253, r: 121, g: 207, b: 12 },
    { x: 304, y: 254, r: 12, g: 167, b: 223 },
    { x: 239, y: 254, r: 255, g: 255, b: 255 },
    { x: 223, y: 101, r: 54, g: 62, b: 95 },
    { x: 162, y: 262, r: 6, g: 83, b: 111 },
    { x: 251, y: 299, r: 65, g: 38, b: 24 },
    { x: 551, y: 338, r: 18, g: 30, b: 2 },
    { x: 32, y: 69, r: 127, g: 125, b: 117 },
    { x: 219, y: 257, r: 12, g: 167, b: 223 },
    { x: 18, y: 21, r: 109, g: 109, b: 109 },
    { x: 50, y: 19, r: 42, g: 32, b: 18 },
], { x: 398, y: 253 });
var rfpageInMineVentureInProgress = new Rerouter_1.Page('rfpageInMineVentureInProgress', [
    { x: 617, y: 20, r: 255, g: 255, b: 255 },
    { x: 202, y: 335, r: 12, g: 167, b: 223 },
    { x: 234, y: 296, r: 127, g: 228, b: 0 },
    { x: 141, y: 337, r: 12, g: 167, b: 223 },
    { x: 128, y: 301, r: 237, g: 236, b: 231 },
    { x: 127, y: 299, r: 58, g: 58, b: 58 },
    { x: 32, y: 71, r: 252, g: 230, b: 138 },
    { x: 14, y: 16, r: 255, g: 255, b: 255 },
    { x: 16, y: 13, r: 3, g: 2, b: 1 },
    { x: 257, y: 309, r: 20, g: 12, b: 8 },
    { x: 276, y: 291, r: 52, g: 40, b: 24 },
], { x: 617, y: 20 });
var rfpageInOreVeinMining = new Rerouter_1.Page('rfpageInOreVeinMining', [
    { x: 622, y: 18, r: 255, g: 255, b: 255 },
    { x: 526, y: 14, r: 0, g: 192, b: 255 },
    { x: 525, y: 23, r: 6, g: 145, b: 255 },
    { x: 398, y: 17, r: 168, g: 98, b: 63 },
    { x: 235, y: 18, r: 168, g: 98, b: 63 },
    { x: 16, y: 18, r: 23, g: 7, b: 4 },
    { x: 24, y: 18, r: 255, g: 255, b: 255 },
    { x: 148, y: 19, r: 131, g: 108, b: 95 },
    { x: 333, y: 18, r: 142, g: 83, b: 54 },
], { x: 617, y: 20 });
var rfpageOreVeinIntro = new Rerouter_1.Page('rfpageOreVeinIntro', [
    { x: 595, y: 25, r: 255, g: 255, b: 255 },
    { x: 586, y: 25, r: 4, g: 2, b: 2 },
    { x: 526, y: 13, r: 0, g: 93, b: 123 },
    { x: 525, y: 20, r: 2, g: 65, b: 123 },
    { x: 431, y: 21, r: 31, g: 15, b: 3 },
    { x: 402, y: 18, r: 81, g: 48, b: 31 },
    { x: 238, y: 19, r: 81,


?: number; //30

  */
    var client = this.sqs;

    var request: AWS.Sqs.CreateQueueRequest = {
      QueueName: queueName,
      Attributes: options
    };

    client.createQueue(request, function (err: Error, result: AWS.Sqs.CreateQueueResult) {

      if (err != null) {
        callback(err, null);
        return;
      }

      var queue = new easySqs.Queue(result.QueueUrl, client);
      callback(null, queue);

    });
  }

  public createQueueReader(queueUrl: string, batchSize?: number): interfaces.IQueueReader {

    var queue = this.getQueueSync(queueUrl);
    return queue.createQueueReader(batchSize);

  }

  /*
  TODO
  deleteQueue
*/

}
import { AppThunk } from 'src/redux/helpers';
import { fetchDrafts } from 'src/services/Api/contacts';
import { fetchVolunteerDetails } from '../../services/Api/volunteers';

// Action Constants & Shapes
const SET_VOLUNTEERS = 'volunteer/SET_VOLUNTEERS';
const SELECT_VOLUNTEER = 'volunteer/SET_VOLUNTEER';
const LOADING = 'volunteer/LOADING';
const LOADING_DETAILS = 'volunteer/LOADING_DETAILS';
const ERROR = 'volunteer/ERROR';
const SET_DRAFTS = 'volunteer/SET_DRAFTS';
const DELETE_VOLUNTEER = 'volunteer/DELETE_VOLUNTEER';

interface SetVolunteersAction {
  type: typeof SET_VOLUNTEERS;
  payload: Volunteer[];
}

interface LoadingAction {
  type: typeof LOADING;
  payload: null;
}

interface ErrorAction {
  type: typeof ERROR;
  payload: ErrorResponse;
}

interface SelectVolunteerAction {
  type: typeof SELECT_VOLUNTEER;
  payload: Volunteer;
}

interface LoadingDetailsAction {
  type: typeof LOADING_DETAILS;
  payload: null;
}

interface SetDraftsAction {
  type: typeof SET_DRAFTS;
  payload: LetterDraft[];
}

interface DeleteVolunteerAction {
  type: typeof DELETE_VOLUNTEER;
  payload: Volunteer;
}
export type VolunteerActionTypes =
  | SetVolunteersAction
  | SelectVolunteerAction
  | LoadingAction
  | LoadingDetailsAction
  | ErrorAction
  | SetDraftsAction
  | DeleteVolunteerAction;

// Action Creators
export const setVolunteers = (
  volunteers: Volunteer[],
): VolunteerActionTypes => {
  return {
    type: SET_VOLUNTEERS,
    payload: volunteers,
  };
};

export const loading = (): VolunteerActionTypes => {
  return {
    type: LOADING,
    payload: null,
  };
};

export const handleError = (error: ErrorResponse): VolunteerActionTypes => {
  return {
    type: ERROR,
    payload: error,
  };
};

export const setSelectedVolunteer = (
  volunteer: Volunteer,
): VolunteerActionTypes => {
  return {
    type: SELECT_VOLUNTEER,
    payload: volunteer,
  };
};

const loadingDetails = (): VolunteerActionTypes => {
  return {
    type: LOADING_DETAILS,
    payload: null,
  };
};

const setDrafts = (drafts: LetterDraft[]): VolunteerActionTypes => {
  return {
    type: SET_DRAFTS,
    payload: drafts,
  };
};

export const deleteVolunteer = (volunteer: Volunteer): VolunteerActionTypes => {
  return {
    type: DELETE_VOLUNTEER,
    payload: volunteer,
  };
};

// Reducer
const initialState: VolunteerState = {
  all_volunteers: [],
  loading: false,
  error: {} as ErrorResponse,
  loading_details: false,
  selected_volunteer: {} as Volunteer,
  drafts: [] as LetterDraft[],
  page: 1,
};

export function volunteersReducer(


"cmwwHwYDVR0jBBgwFoAUq4BZw2WDbR19E70Zw+wajw1HaqMwDQYJKoZIhvcN"
            + "AQEFBQADggEBAENJf1BD7PX5ivuaawt90q1OGzXpIQL/ClzEeFVmOIxqPc1E"
            + "TFRq92YuxG5b6+R+k+tGkmCwPLcY8ipg6ZcbJ/AirQhohzjlFuT6YAXsTfEj"
            + "CqEZfWM2sS7crK2EYxCMmKE3xDfPclYtrAoz7qZvxfQj0TuxHSstHZv39wu2"
            + "ZiG1BWiEcyDQyTgqTOXBoZmfJtshuAcXmTpgkrYSrS37zNlPTGh+pMYQ0yWD"
            + "c8OQRJR4OY5ZXfdna01mjtJTOmj6/6XPoLPYTq2gQrc2BCeNJ4bEhLb7sFVB"
            + "PbwPrpzTE/HRbQHDrzj0YimDxeOUV/UXctgvYwHNtEkcBLsOm/uytMYwggSh"
            + "MIIDiaADAgECAgQ+HL0oMA0GCSqGSIb3DQEBBQUAMGkxCzAJBgNVBAYTAlVT"
            + "MSMwIQYDVQQKExpBZG9iZSBTeXN0ZW1zIEluY29ycG9yYXRlZDEdMBsGA1UE"
            + "CxMUQWRvYmUgVHJ1c3QgU2VydmljZXMxFjAUBgNVBAMTDUFkb2JlIFJvb3Qg"
            + "Q0EwHhcNMDMwMTA4MjMzNzIzWhcNMjMwMTA5MDAwNzIzWjBpMQswCQYDVQQG"
            + "EwJVUzEjMCEGA1UEChMaQWRvYmUgU3lzdGVtcyBJbmNvcnBvcmF0ZWQxHTAb"
            + "BgNVBAsTFEFkb2JlIFRydXN0IFNlcnZpY2VzMRYwFAYDVQQDEw1BZG9iZSBS"
            + "b290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzE9UhPen"
            + "ouczU38/nBKIayyZR2d+Dx65rRSI+cMQ2B3w8NWfaQovWTWwzGypTJwVoJ/O"
            + "IL+gz1Ti4CBmRT85hjh+nMSOByLGJPYBErA131XqaZCw24U3HuJOB7JCoWoT"
            + "aaBm6oCREVkqmwh5WiBELcm9cziLPC/gQxtdswvwrzUaKf7vppLdgUydPVmO"
            + "rTE8QH6bkTYG/OJcjdGNJtVcRc+vZT+xqtJilvSoOOq6YEL09BxKNRXO+E4i"
            + "Vg+VGMX4lp+f+7C3eCXpgGu91grwxnSUnfMPUNuad85LcIMjjaDKeCBEXDxU"
            + "ZPHqojAZn+pMBk0GeEtekt8i0slns3rSAQIDAQABo4IBTzCCAUswEQYJYIZI"
            + "AYb4QgEBBAQDAgAHMIGOBgNVHR8EgYYwgYMwgYCgfqB8pHoweDELMAkGA


val PROXY_CUBE_MAP = TextureTarget(GL32.GL_PROXY_TEXTURE_CUBE_MAP)
        val BUFFER = TextureTarget(GL32.GL_TEXTURE_BUFFER)
    }
}

@JvmInline
value class Tex2dTarget(val i: Int) {
    companion object {
        val _2D = Tex2dTarget(GL11.GL_TEXTURE_2D)
        val _1D_ARRAY = Tex2dTarget(GL30.GL_TEXTURE_1D_ARRAY)
        val RECTANGLE = Tex2dTarget(GL31.GL_TEXTURE_RECTANGLE)
        val CUBE_MAP_POSITIVE_X = Tex2dTarget(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_X)
        val CUBE_MAP_MEGATIVE_X = Tex2dTarget(GL13.GL_TEXTURE_CUBE_MAP_NEGATIVE_X)
        val CUBE_MAP_POSITIVE_Y = Tex2dTarget(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_Y)
        val CUBE_MAP_MEGATIVE_Y = Tex2dTarget(GL13.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y)
        val CUBE_MAP_POSITIVE_Z = Tex2dTarget(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_Z)
        val CUBE_MAP_MEGATIVE_Z = Tex2dTarget(GL13.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z)
        val PROXY_2D = Tex2dTarget(GL11.GL_PROXY_TEXTURE_2D)
        val PROXY_1D_ARRAY = Tex2dTarget(GL30.GL_PROXY_TEXTURE_1D_ARRAY)
        val PROXY_RECTANGLE = Tex2dTarget(GL31.GL_PROXY_TEXTURE_RECTANGLE)
    }
}

//###############################################################################

@JvmInline
value class TextureWrapMode(val i: Int) {
    companion object {
        val CLAMP = TextureWrapMode(GL11.GL_CLAMP)
        val REPEAT = TextureWrapMode(GL11.GL_REPEAT)
    }
}

//###############################################################################
//
//PixelInternalFormat enum:
//R3_G3_B2					= 0x2A10
//ALPHA4						= 0x803B
//ALPHA8						= 0x803C
//ALPHA12						= 0x803D
//ALPHA16						= 0x803E
//LUMINANCE4					= 0x803F
//LUMINANCE8					= 0x8040
//LUMINANCE12					= 0x8041
//LUMINANCE16					= 0x8042
//LUMINANCE4_ALPHA4				= 0x8043
//LUMINANCE6_ALPHA2				= 0x8044
//LUMINANCE8_ALPHA8				= 0x8045
//LUMINANCE12_ALPHA4				= 0x8046
//LUMINANCE12_ALPHA12				= 0x8047
//LUMINANCE16_ALPHA16				= 0x8048
//INTENSITY					= 0x8049
//INTENSITY4					= 0x804A
//INTENSITY8					= 0x804B
//INTENSITY12					= 0x804C
//INTENSITY16					= 0x804D
//RGB4						= 0x804F
//RGB5						= 0x8050
//RGB8						= 0x8051
//RGB10						= 0x8052
//RGB12						= 0x8053
//RGB16						= 0x8054
//RGBA2						= 0x8055
//RGBA4						= 0x


@Override
  public boolean similar(Operand op) {
    return op instanceof UnknownConstantOperand;
  }

  /**
   * @return a string representation of this operand.
   */
  @Override
  public String toString() {
    return "Unknown operand (will be filled in by later stages of the compiler)";
  }
}
/*
 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
 *
 *  This file is licensed to You under the Eclipse Public License (EPL);
 *  You may not use this file except in compliance with the License. You
 *  may obtain a copy of the License at
 *
 *      http://www.opensource.org/licenses/eclipse-1.0.php
 *
 *  See the COPYRIGHT.txt file distributed with this work for information
 *  regarding copyright ownership.
 */
package org.jikesrvm.compilers.opt.ir.operand;

import org.jikesrvm.VM;
import org.jikesrvm.classloader.RVMMethod;
import org.jikesrvm.classloader.TypeReference;

/**
 * Represents a constant code operand, found for example, from an
 * TIBConstantOperand.

 *
 * NB we don't use an object constant operand
 * because
 *

 *
code doesn't form part of the object literals
 *
we need to support replacement
 *

 *
 * @see Operand
 */
public final class CodeConstantOperand extends ConstantOperand {

  /**
   * The non-{@code null} method for the code represent
   */
  public final RVMMethod value;

  /**
   * Construct a new code constant operand
   *
   * @param v the method of this TIB
   */
  public CodeConstantOperand(RVMMethod v) {
    if (VM.VerifyAssertions) VM._assert(v != null);
    value = v;
  }

  @Override
  public Operand copy() {
    return new CodeConstantOperand(value);
  }

  /**
   * @return {@link TypeReference#CodeArray}
   */
  @Override
  public TypeReference getType() {
    return TypeReference.CodeArray;
  }

  /**
   * @return true
   */
  @Override
  public boolean isRef() {
    return true;
  }

  @Override
  public boolean similar(Operand op) {
    return (op instanceof CodeConstantOperand) && value == ((CodeConstantOperand) op).value;
  }

  /**
   * Returns the string representation of this operand.
   *
   * @return a string representation of this operand.
   */
  @Override
  public String toString() {
    return "code \"" + value + "\"";
  }
}
/*
 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
 *
 *  This file is licensed to You under the Eclipse Public License (EPL);
 *  You may not use this file except in compliance with the License. You
 *  may obtain a copy of the License at
 *
 *      http://www.opensource.org/licenses/eclipse-1.0.php
 *
 *  See the COPYRIGHT.txt file distributed with this work for information
 *  regarding copyright ownership.
 */
package org.jikesrvm.compilers.opt.ir.operand;

import org.jikesrvm.classloader.TypeReference;
import org.jikesrvm.util.Bits;

/**
 * Represents a constant int operand.
 *
 * @see Operand
 */
public final class IntConstantOperand extends ConstantOperand {

  /**
   * Constant 0, can be copied as convenient
   */
  public static final IntConstantOperand zero = new IntConstantOperand(0);

  /**
   * Value of this operand.
   */
  public final int value;

  /**
   * Constructs a new int constant operand with the specified value.
   * Typ


using UnityEngine;
using UnityEngine.AI;
using Simpleton;

namespace Simpleton.Samples.Zombies
{
    public class WalkerWanderState : SimpletonState
    {

        WalkerController _owner;

        public WalkerWanderState ( WalkerController owner )
        {
            _owner = owner;
        }

        public override void OnEnter ( SimpletonState previous , float time )
        {
            // behave
            if( NavMesh.SamplePosition( _owner.transform.position + new Vector3(Random.Range(-10f,10f),0,Random.Range(-10f,10f)) , out var sample , 10f , ~0 ) )
            {
                _owner.navMeshAgent.SetD


 {
		}
		stack_reference(lua_State* L, int i) noexcept : stateless_stack_reference(L, i), luastate(L) {
		}
		stack_reference(lua_State* L, absolute_index i) noexcept : stateless_stack_reference(L, i), luastate(L) {
		}
		stack_reference(lua_State* L, raw_index i) noexcept : stateless_stack_reference(L, i), luastate(L) {
		}
		stack_reference(lua_State* L, ref_index i) noexcept = delete;
		stack_reference(lua_State* L, const reference& r) noexcept = delete;
		stack_reference(lua_State* L, const stack_reference& r) noexcept : luastate(L) {
			if (!r.valid()) {
				m_index = 0;
				return;
			}
			int i = r.stack_index();
			if (detail::xmovable(lua_state(), r.lua_state())) {
#if SOL_IS_ON(SOL_SAFE_STACK_CHECK)
				luaL_checkstack(L, 1, "not enough Lua stack space to push a single reference value");
#endif // make sure stack doesn't overflow
				lua_pushvalue(r.lua_state(), r.stack_index());
				lua_xmove(r.lua_state(), luastate, 1);
				i = absolute_index(luastate, -1);
			}
			m_index = i;
		}
		stack_reference(stack_reference&& o) noexcept = default;
		stack_reference& operator=(stack_reference&&) noexcept = default;
		stack_reference(const stack_reference&) noexcept = default;
		stack_reference& operator=(const stack_reference&) noexcept = default;

		int push() const noexcept {
			return push(lua_state());
		}

		int push(lua_State* L_) const noexcept {
			return stateless_stack_reference::push(L_);
		}

		void pop() const noexcept {
			pop(lua_state());
		}

		void pop(lua_State* L_, int pop_count_ = 1) const noexcept {
			stateless_stack_reference::pop(L_, pop_count_);
		}

		const void* pointer() const noexcept {
			return stateless_stack_reference::pointer(lua_state());
		}

		type get_type() const noexcept {
			return stateless_stack_reference::get_type(lua_state());
		}

		lua_State* lua_state() const noexcept {
			return luastate;
		}

		bool valid() const noexcept {
			return stateless_stack_reference::valid(lua_state());
		}

		void abandon() {
			stateless_stack_reference::abandon(lua_state());
		}
	};

	inline bool operator==(const stack_reference& l, const stack_reference& r) {
		return lua_compare(l.lua_state(), l.stack_index(), r.stack_index(), LUA_OPEQ) == 1;
	}

	inline bool operator!=(const stack_reference& l, const stack_reference& r) {
		return !operator==(l, r);
	}

	inline bool operator==(const stack_reference& lhs, const lua_nil_t&) {
		return !lhs.valid();
	}

	inline bool operator==(const lua_nil_t&, const stack_reference& rhs) {
		return !rhs.valid();
	}

	inline bool operator!=(const stack_reference& lhs, const lua_nil_t&) {
		return lhs.valid();
	}

	inline bool operator!=(const lua_nil_t&, const stack_reference& rhs) {
		return rhs.valid();
	}

	inline bool operator==(const stateless_stack_reference& l, const stateless_stack_reference& r) {
		return l.stack_index() == r.stack_index();
	}

	inline bool operator!=(const stateless_stack_reference& l, const stateless_stack_reference& r) {
		return l.stack_index() != r.stack_index();
	}

	struct stateless_stack_reference_equals {
		using is_transparent


 type conventions:
```rust
const LOG_TYPES = {
    AUTHENTICATION: 1,
    TRANSACTION: 2,
    ERROR: 3,
    AUDIT: 4,
    SYSTEM: 5,
};
```

### Storage Fee Strategy
Consider these factors when setting storage fees:
- **Network costs**: Higher fees on expensive networks
- **Usage patterns**: Lower fees for high-frequency logging
- **Economic model**: Deflationary (fees burned) vs. operational costs

## 🚨 Error Handling

The contract defines several error types:

- `InsufficientBalance`: Payment below required storage fee
- `LogNotFound`: Requested log ID doesn't exist
- `InvalidLogType`: Log type must be greater than 0
- `EmptyLogData`: Log content cannot be empty
- `Unauthorized`: Only contract owner can perform this action

## 🔐 Security Considerations

1. **Immutability**: Logs cannot be deleted - consider data privacy implications
2. **Fee Burning**: Fees are permanently removed from circulation
3. **Access Control**: Only deployer can modify contract parameters
4. **Input Validation**: All inputs are validated before processing
5. **Overflow Protection**: Uses saturating arithmetic to prevent overflows

## 🛠 Development

### Project Structure
```
eternalog/
├── lib.rs          # Main contract code
├── Cargo.toml      # Dependencies and metadata
├── README.md       # This file
└── target/         # Build artifacts
```

### Dependencies
- `ink! 5.1.1`: Smart contract framework
- `scale-info 2.11`: Type information for encoding/decoding

## 🤝 Contributing

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Op


function": "clone"};
  var isA_s = (isArray(s) || s.length);
  if (!isA_s && !isObject(s)) throw {message: "Source of an unsupported type", "function": "clone"};

  function _i(i, s) {
    var sO = isArray(s[i]) ? [] : isObject(s[i]) ? {} : undefined;
    if (sO && lvl > 0) {
      if (isA_d) d.push(clone(sO, s[i], lvl - 1));
      else {
        if (ne && d.hasOwnProperty(i)) return;
        d[i] = clone(sO, s[i], lvl - 1);
      }
    }
    else {
      if (isA_d) d.push(s[i]);
      else {
        if (ne && d.hasOwnProperty(i)) return;
        d[i] = s[i];
      }
    }
  }

  if (isA_s) {
    for (let i: number = 0; i < s.length; i++) { // may use .map(), but this to faster (mb)
      _i(i, s)
    }
  }
  else {
    for (let i in s) {
      if (ne && d.hasOwnProperty(i)) continue;
      if (!s.hasOwnProperty(i)) continue;
      _i(i, s)
    }
  }
  return d
}

/**
 * сравнивает два объекта с учетом вложенностей
 * @param {Array|Object} obj1
 * @param {Array|Object} obj2
 * @param {Boolean} [u=false] строгое соответствие (с приведением типов)
 * @return {Boolean}
false
 if not equals
 * @member window
 */
function equals(obj1, obj2, u?) {
  var excluded = ["$$hashKey"];

  if (obj1 && obj2) {
    if ((obj1.self && obj1.self.$isClass) || (obj2.self && obj2.self.$isClass))
      throw new Error("Функция не предусмотрена для сравнения объектов от классов.");

    var cnt1 = 0, cnt2 = 0;
    for (var io in obj1) {
      if (!obj1.hasOwnProperty(io)) continue;
      if (excluded.indexOf(io) > -1) continue;
      cnt1++
    }
    for (var io in obj2) {
      if (!obj2.hasOwnProperty(io)) continue;
      if (excluded.indexOf(io) > -1) continue;
      cnt2++
    }
    if (cnt1 != cnt2) return false;
  }

  for (var io in obj1) {
    if (!obj1.hasOwnProperty(io)) continue;
    if (excluded.indexOf(io) > -1) continue;
    // console.log('typeof obj1[io] !== typeof obj2[io]',typeof obj1[io] !== typeof obj2[io], io, obj1[io], obj2[io])
    if (typeof obj1[io] !== typeof obj2[io]) return false;
    if (isFunction(obj1[io])) {
      if (obj1[io].toString() != obj2[io].toString()) return false;
    }
    else if (isDate(obj1[io])) {
      if ((new Date(obj1[io])).valueOf() !== (new Date(obj2[io])).valueOf()) return false
    }
    else if (typeof obj1[io] == "object") {
      if (!equals(obj1[io], obj2[io])) return false;
    }
    else if (!(u
        ? (obj1[io] === obj2[io])
        : (obj1[io] == obj2[io]))) {
      // console.log('obj1[io] === obj2[io]',obj1[io] === obj2[io], io)
      return false;
    }
  }
  return true
}
function isCaseInsensitivePalindrome(inputString: string): boolean {
    const originalLowerCase = inputString.toLowerCase();
    const reversedWord = original


_total_balance = Tokens::balance(asset_id, &ALICE);
			let bob_total_balance = Tokens::balance(asset_id, &BOB);
			let strategy_total_balance = Tokens::balance(asset_id, &strategy_account_id);

			prop_assert_epsilon!(alice_total_balance, amount1 + strategy_profits);

			prop_assert_epsilon!(
				alice_total_balance + bob_total_balance + strategy_total_balance,
				amount1 + amount2 + strategy_profits
			);

			Ok(())
		})?;
	}

	#[test]
	fn vault_are_isolated(
		strategy_account_id in strategy_account(),
		(amount1, amount2) in valid_amounts_without_overflow_2()
	) {
		let asset_id = MockCurrencyId::D;
		ExtBuilder::default().build().execute_with(|| {

			// Create two vaults based on the same asset
			let (vault_id1, _) = create_vault(strategy_account_id, asset_id);
			let (vault_id2, _) = create_vault(strategy_account_id, asset_id);

			// Ensure vaults are unique
			prop_assert_ne!(vault_id1, vault_id2);
			prop_assert_ne!(Vaults::account_id(&vault_id1), Vaults::account_id(&vault_id2));

			// Alice deposit an amount in vault 1
			prop_assert_eq!(Tokens::balance(asset_id, &Vaults::account_id(&vault_id1)), 0);
			prop_assert_eq!(Tokens::balance(asset_id, &ALICE), 0);
			prop_assert_ok!(Tokens::mint_into(asset_id, &ALICE, amount1));
			prop_assert_ok!(Vaults::deposit(Origin::signed(ALICE), vault_id1, amount1));

			// Bob deposit an amount in vault 2
			prop_assert_eq!(Tokens::balance(asset_id, &Vaults::account_id(&vault_id2)), 0);
			prop_assert_eq!(Tokens::balance(asset_id, &BOB), 0);
			prop_assert_ok!(Tokens::mint_into(asset_id, &BOB, amount2));
			prop_assert_ok!(Vaults::deposit(Origin::signed(BOB), vault_id2, amount2));

			// The funds should not be shared.
			prop_assert_eq!(Tokens::balance(asset_id, &Vaults::account_id(&vault_id1)), amount1);
			prop_assert_eq!(Tokens::balance(asset_id, &Vaults::account_id(&vault_id2)), amount2);

			Ok(())
		})?;
	}

	#[test]
	fn vault_stock_dilution_rate(
		strategy_account_id in strategy_account(),
		(amount1, amount2, profits) in valid_amounts_without_overflow_3()
	) {
		ExtBuilder::default().build().execute_with(|| {
			let asset_id = MockCurrencyId::A;
			let (vault_id, VaultInfo { lp_token_id, .. }) = create_vault(strategy_account_id, asset_id);

			prop_assert_eq!(Tokens::balance(asset_id, &ALICE), 0);
			prop_assert_ok!(Tokens::mint_into(asset_id, &ALICE, amount1));
			prop_assert_ok!(Vaults::deposit(Origin::signed(ALICE), vault_id, amount1));

			// Rate unchanged
			prop_assert_eq!(Vaults::stock_dilution_rate(&vault_id), Ok(Rate::from(1)));

			prop_assert_eq!(Tokens::balance(asset_id, &BOB), 0);
			prop_assert_ok!(Tokens::mint_into(asset_id, &BOB, amount2));
			prop_assert_ok!(Vaults::deposit(Origin::signed(BOB), vault_id, amount2));

			// Rate unchanged


b	2f
1:	mrs	x0, sctlr_el1
CPU_BE(	orr	x0, x0, #(3 << 24)	)	// Set the EE and E0E bits for EL1
CPU_LE(	bic	x0, x0, #(3 << 24)	)	// Clear the EE and E0E bits for EL1
	msr	sctlr_el1, x0
	mov	w20, #BOOT_CPU_MODE_EL1		// This cpu booted in EL1
	isb
	ret

	/* Hyp configuration. */
2:	mov	x0, #(1 << 31)			// 64-bit EL1
	msr	hcr_el2, x0

	/* Generic timers. */
	mrs	x0, cnthctl_el2
	orr	x0, x0, #3			// Enable EL1 physical timers
	msr	cnthctl_el2, x0
	msr	cntvoff_el2, xzr		// Clear virtual offset

	/* Populate ID registers. */
	mrs	x0, midr_el1
	mrs	x1, mpidr_el1
	msr	vpidr_el2, x0
	msr	vmpidr_el2, x1

	/* sctlr_el1 */
	mov	x0, #0x0800			// Set/clear RES{1,0} bits
CPU_BE(	movk	x0, #0x33d0, lsl #16	)	// Set EE and E0E on BE systems
CPU_LE(	movk	x0, #0x30d0, lsl #16	)	// Clear EE and E0E on LE systems
	msr	sctlr_el1, x0

	/* Coprocessor traps. */
	mov	x0, #0x33ff
	msr	cptr_el2, x0			// Disable copro. traps to EL2

#ifdef CONFIG_COMPAT
	msr	hstr_el2, xzr			// Disable CP15 traps to EL2
#endif

	/* Stage-2 translation */
	msr	vttbr_el2, xzr

	/* Hypervisor stub */
	adr	x0, __hyp_stub_vectors
	msr	vbar_el2, x0

	/* spsr */
	mov	x0, #(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT |\
		      PSR_MODE_EL1h)
	msr	spsr_el2, x0
	msr	elr_el2, lr
	mov	w20, #BOOT_CPU_MODE_EL2		// This CPU booted in EL2
	eret
ENDPROC(el2_setup)

/*
 * Sets the __boot_cpu_mode flag depending on the CPU boot mode passed
 * in x20. See arch/arm64/include/asm/virt.h for more info.
 */
ENTRY(set_cpu_boot_mode_flag)
	ldr	x1, =__boot_cpu_mode		// Compute __boot_cpu_mode
	add	x1, x1, x28
	cmp	w20, #BOOT_CPU_MODE_EL2
	b.ne	1f
	add	x1, x1, #4
1:	dc	cvac, x1			// Clean potentially dirty cache line
	dsb	sy
	str	w20, [x1]			// This CPU has booted in EL1
	dc	civac, x1			// Clean&invalidate potentially stale cache line
	dsb	sy
	ret
ENDPROC(set_cpu_boot_mode_flag)

/*
 * We need to find out the CPU boot mode long after boot, so we need to
 * store it in a writable variable.
 *
 * This is not in .bss, because we set it sufficiently early that the boot-time
 * zeroing of .bss would clobber it.
 */
	.pushsection	.data..cacheline_aligned
ENTRY(__boot_cpu_mode)
	.align	L1_CACHE_SHIFT
	.long	BOOT_CPU_MODE_EL2
	.long	0
	.popsection

	.align	3
2:	.quad	.
	.quad	PAGE_OFFSET


2.3"  ,  "item-3.1"  "item-3.2"  "item-3.3"  ;
$list: "item-1.1" "item-1.2" "item-1.3",
  "item-2.1" "item-2.2" "item-2.3",
  "item-3.1" "item-3.2" "item-3.3";
$list
:
"item-1.1"
"item-1.2"
"item-1.3"
,
"item-2.1"
"item-2.2"
"item-2.3"
,
"item-3.1"
"item-3.2"
"item-3.3"
;
$list

:

"item-1.1"

"item-1.2"

"item-1.3"

,

"item-2.1"

"item-2.2"

"item-2.3"

,

"item-3.1"

"item-3.2"

"item-3.3"

;
$list: (("item-1.1", "item-1.2", "item-1.3"), ("item-2.1", "item-2.2", "item-2.3"), ("item-3.1", "item-3.2", "item-3.3"));
$list:(("item-1.1","item-1.2","item-1.3"),("item-2.1","item-2.2","item-2.3"),("item-3.1","item-3.2","item-3.3"));
$list:  (  (  "item-1.1"  ,  "item-1.2"  ,  "item-1.3"  )  ,  (  "item-2.1"  ,  "item-2.2"  ,  "item-2.3"  )  ,  (  "item-3.1"  ,  "item-3.2"  ,  "item-3.3"  )  )  ;
$list: (
  ("item-1.1", "item-1.2", "item-1.3"),
  ("item-2.1", "item-2.2", "item-2.3"),
  ("item-3.1", "item-3.2", "item-3.3")
);
$list
:
(
(
"item-1.1"
,
"item-1.2"
,
"item-1.3"
)
,
(
"item-2.1"
,
"item-2.2"
,
"item-2.3"
)
,
(
"item-3.1"
,
"item-3.2"
,
"item-3.3"
)
)
;
$list

:

(

(

"item-1.1"

,

"item-1.2"

,

"item-1.3"

)

,

(

"item-2.1"

,

"item-2.2"

,

"item-2.3"

)

,

(

"item-3.1"

,

"item-3.2"

,

"item-3.3"

)

)

;

$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0);
$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") (3.75, "3-75") (4, "4");

$buttonConfig: "save" 50px, 'cancel' 50px, "help" 100PX;

$locale: "en_us";
html


(sid, answerId))+1
    const actionNum = parseInt(this.getSurveyAnswerActionNum(sid, answerId)) // 固定只保存一条
    const historySurveyText = this.getSurveyAnswerTextByLocalStorage(sid, answerId)
    if (JSON.stringify(survey)!==historySurveyText) {
      const storageKey = buildSurveyLocalStorageKey(sid, `${surveyLocalStorageKeyType.AN_HISTORY}${getAnswerId(answerId)}_${actionNum}`)
      saveJsonObj2LocalStorage(storageKey, survey)
      this.saveSurveyAnswerActionNum(sid, answerId, actionNum)
      // console.debug('storageKey', storageKey)
      // 防止历史数据过多进行定量清理
      // if (actionNum>=1) this.deleteAnswerHistoryLtNum(sid, answerId, actionNum-100)
    }
  },
  getSurveyAnswerTextByLocalStorage (sid, answerId, actionNum=null) {
    if (actionNum===undefined || actionNum===null) actionNum = this.getSurveyAnswerActionNum(sid, answerId)
    const storageKey = buildSurveyLocalStorageKey(sid, `${surveyLocalStorageKeyType.AN_HISTORY}${getAnswerId(answerId)}_${actionNum}`)
    // console.debug('storageKey', storageKey)
    const surveyJsonText = getLocalStorageByKey(storageKey)
    // console.debug('surveyJsonText', surveyJsonText)
    return surveyJsonText
  },
  getSurveyAnswerObjByLocalStorage (sid, answerId, actionNum=null) {
    const surveyJsonObj = JSON.parse(this.getSurveyAnswerTextByLocalStorage(sid, answerId, actionNum))
    // console.debug('surveyJsonObj', surveyJsonObj)
    return surveyJsonObj
  },
  saveSurveyAnswerActionNum (sid, answerId, num) {
    const storageKey = buildSurveyLocalStorageKey(sid, `${surveyLocalStorageKeyType.AN_HISTORY_ACTION}${getAnswerId(answerId)}`)
    const dateTime = (new Date()).getTime()
    // return saveJsonObj2LocalStorage(storageKey, {num, dateTime})
    return saveJsonObj2LocalStorage(storageKey, {num: 0, dateTime}) // 固定只保存一条
  },
  getSurveyAnswerActionNum (sid, answerId) {
    const historyAction = this.getSurveyAnswerAction(sid, answerId)
    if (historyAction!==null && historyAction.hasOwnProperty('num')) {
      return historyAction.num
    }
    return 0
  },
  getSurveyAnswerActionTime (survey) {
    if (survey!==null) {
      const sid = survey.sid
      const answerId = getEsId(survey)
      return this.getSurveyAnswerActionTimeBySid(sid, answerId)
    }
    return 0
  },
  getSurveyAnswerActionTimeBySid (sid, answerId) {
    const historyAction = this.getSurveyAnswerAction(sid, answerId)
    if (historyAction!==null && historyAction.hasOwnProperty('dateTime')) {
      return historyAction.dateTime
    }
    return 0
  },
  getSurveyAnswerAction (sid, answerId) {
    const storageKey = buildSurveyLocalStorageKey(sid, `${surveyLocalStorageKeyType.AN_HISTORY_ACTION}${getAnswerId(answerId)}`)
    if (localStorage.hasOwnProperty(storageKey)) {
      const historyActionText = getLocalStorageByKey(storageKey)
      if (historyActionText!==null) {
        return JSON.parse(historyActionText)
      }
    }
    return null
  },
  deleteAnswerHistoryLtNum (sid, answerId, actionNum) {
    for (let i=1; i<actionNum; i++) {
      const storageKey = buildSurveyLocalStorageKey(sid, `${surveyLocalStorageKeyType.AN_HISTORY}${getAnswerId(answerId)}_${i}`)
      localStora


nce: Model, public tycoon: Tycoon) {
		assert(validateCollectorModel(instance), `${instance.GetFullName()} has invalid Collector structure tree`);

		this._realInstance = instance;
	}

	private _updateDebounce(): void {
		const currentColor = this._debounce ? ACTIVE_COLOR : BUSY_COLOR;
		this._realInstance.Giver.Color = currentColor;
	}

	private _setDebounce(bool: boolean): void {
		this._debounce = bool;
		this._updateDebounce();
	}

	private _onTouched(hit: BasePart): void {
		if (!this._debounce) return;

		getPlayerFromCharacter(hit.Parent).Match({
			Some: player => {
				if (!this.tycoon.getOwner().Contains(player)) return;
				this._setDebounce(false);

				this.tycoon
					.collectCollectedCash()
					.then(() => this._update())
					.catch(e => warn(e))
					.finally(() => Promise.delay(DEBOUNCE_TIMEOUT))
					.then(() => this._setDebounce(true));
			},
			None: () => {},
		});
	}

	private _update(): void {
		// easy as it is
		this._realInstance.Screen.SurfaceGui.Amount.Text = TEXT_FORMATTER(this.tycoon.getCollectedCash());
	}

	public init(): void {
		this._update();
		this._updateDebounce();

		this._janitor.Add(this.tycoon.collectedCash.Connect(() => this._update()));
		this._janitor.Add(this._realInstance.Giver.Touched.Connect(hit => this._onTouched(hit)));
	}

	public destroy(): void {}
}

export = Collector;
import { Client, IntentsBitField } from 'discord.js';
import {
    handleGuildMemberUpdateEvent,
    handleGuildUpdateEvent,
    handleMessageUpdateEvent,
    handlePresenceUpdateEvent,
    handleRoleUpdateEvent,
    handleUserUpdateEvent,
    handleVoiceStateUpdateEvent,
    handleChannelUpdateEvent,
    handleThreadChannelUpdateEvent,
} from './handlers';

let eventRegistered = false;

export = async (client: Client, options?: { debug?: boolean }) => {
    if (eventRegistered) return;
    eventRegistered = true;

    const intents = new IntentsBitField(client.options.intents);

    /* HANDLE GUILDS EVENTS */
    if (intents.has(IntentsBitField.Flags.Guilds)) {
        if (options?.debug) console.log('channelUpdate event handler registered.');
        client.on('channelUpdate', (oldChannel, newChannel) => {
            handleChannelUpdateEvent(client, oldChannel, newChannel);
        });
        if (options?.debug) console.log('guildUpdate event handler registered.');
        client.on('guildUpdate', (oldGuild, newGuild) => {
            handleGuildUpdateEvent(client, oldGuild, newGuild);
        });
        if (options?.debug) console.log('roleUpdate event handler registered.');
        client.on('roleUpdate', (oldRole, newRole) => {
            handleRoleUpdateEvent(client, oldRole, newRole);
        });
        if (options?.debug) console.log('threadUpdate event handler registered.');
        client.on('threadUpdate', (oldThread, newThread) => {
            handleThreadChannelUpdateEvent(client, oldThread, newThread);
        });
    } else {
        if (options?.debug)
            console.log(
                'channelUpdate, guildUpdate, roleUpdate and threadUpdate event handlers not registered (missing Guilds intent).',
            );
    }

    /* HANDLE MEMBER EVENTS */
    if (intents.has(IntentsBitField.


一下该技术的应用场景。 |
| 数据可视化 | 数据可视化有哪些常见的图表类型？各有什么优缺点？ |
希望这些问题能够对您有所帮助！
| OpenAI GPT-3.5 | GPT-3.5的技术特点是什么？ |
| 虚拟现实游戏 | 如何评价虚拟现实游戏的体验？ |
| 疫苗接种 | 疫苗接种对于预防什么疾病最有效？ |
| 人工智能道德问题 | 在人工智能发展中，哪些道德问题需要被关注和解决？ |
| 新冠疫情影响 | 新冠疫情对于全球经济的影响有哪些？ |
| 女性就业机会 | 如何提高女性的就业机会和职场竞争力？ |
| 股票投资 | 投资股票时应该关注哪些指标和数据？ |
| 环保减排 | 如何通过科技手段提高环保减排效率？ |
| 电子商务平台 | 电子商务平台如何提升用户的购物体验？ |
| 儿童教育 | 如何设计有效的儿童教育课程？ |
| 股票投资 | 请分析最近一年来阿里巴巴股票的波动情况，并预测未来一个月的走势。|
| 健康管理 | 如何保持健康的身体？请提供三个锻炼技巧和两个饮食建议。|
| 科技趋势 | 2023 年，人工智能技术会有哪些新突破和应用场景？|
| 心理学 | 如何减轻焦虑？请提供三个缓解焦虑的方法或建议。|
| 旅游攻略 | 如果有五天时间在上海旅游，您会推荐去哪些景点游玩？请简要介绍一下每个景点。|
| 美食文化 | 您认为在中国哪个城市有最好的美食？请列举三种必尝的当地特色美食。|
| 金融投资 | 在目前的经济形势下，购买房产还是理财更加合适？请提供两个方面的比较和您的看法。|
| 社交媒体 | Instagram 和 TikTok 目前都非常火爆，请比较这两者的特点并给出您的选择。|
| 教育改革 | 您认为当前中国教育存在哪些问题？请提供三个方面的分析和建议。|
| 文化活动 | 中秋节即将到来，有哪些传统的庆祝方式？请列举三个并解释其含义。|
|天气预报|请问今天


 => {

            const flip = selector.replace(replaceRegExp, (match: string, group: string): string => replaceHash[group]);

            if (
                store.options.autoRename !== Autorename.strict ||
                (store.options.autoRename === Autorename.strict && rulesHash[flip])
            ) {
                return flip;
            }

            return selector;

        });

    });

};import {Injectable, TemplateRef} from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class ToastsService {
  toasts: any[] = [];

  constructor() {
  }

  /*Shows the toast with a provided message.
    You can provide your own classes for the toast through the options parmether.
    Example of options: { classname: 'bg-success text-light' }
  */
  // tslint:disable-next-line:typedef
  toastAdd(textOrTpl: string | TemplateRef<any>, options: any = {}) {
    this.toasts.push({textOrTpl, ...options});
  }

  // tslint:disable-next-line:typedef
  toastAddSuccess(textOrTpl: string | TemplateRef<any>) {
    this.toastAdd(textOrTpl, {classname: 'bg-success text-light'});
  }

  // tslint:disable-next-line:typedef
  toastAddDanger(textOrTpl: string | TemplateRef<any>) {
    this.toastAdd(textOrTpl, {classname: 'bg-danger text-light'});
  }

  // tslint:disable-next-line:typedef
  toastAddWarning(textOrTpl: string | TemplateRef<any>) {
    this.toastAdd(textOrTpl, {classname: 'bg-warning text-light'});
  }

  // tslint:disable-next-line:typedef
  removeToast(toast) {
    this.toasts = this.toasts.filter(t => t !== toast);
  }

  // tslint:disable-next-line:typedef
  removeAll() {
    this.toasts = [];
  }

}
type Environment = {
  endpoint: string
  ws_endpoint: string
}

type Overrides = {
  endpoint?: string
  ws_endpoint?: string
}

const dev: Environment = {
  endpoint: "http://localhost:3100",
  ws_endpoint: "ws://localhost:6666",
}

const prod: Environment = {
  endpoint: "https://api.monument.ax",
  ws_endpoint: "wss://api.monument.ax/ws",
}

let overrides: Overrides = {}
if (process.env.REACT_APP_ENDPOINT === "dev") {
  overrides.endpoint = dev.endpoint
  overrides.ws_endpoint = dev.ws_endpoint
} else if (process.env.REACT_APP_ENDPOINT === "prod") {
  overrides.endpoint = prod.endpoint
  overrides.ws_endpoint = prod.ws_endpoint
}

console.log(process.env)

export default {
  ...(process.env.NODE_ENV === "production" ? prod : dev),
  ...overrides,
}
import * as vscode from 'vscode';
import Web3 from 'web3';
import { Contract } from 'web3-eth-contract';
import { Account } from 'web3-core';
import * as path from 'path';
import * as fs from 'fs';

class Status {
    // God, forgive me for these names, I'm too lazy to refactor at this point
    // May these comments be enough for my forgiveness
    public currentContract: string | undefined; // Current contract json ABI file selected
    public contractAddress: string | undefined; // Current Smart Contract deployed address
    public web3: Web3 = new Web3(); // Web3 instance
    public contract: Contract | undefined; // Current Smart Contract Web3 object
    public account: Account; // Current ethereum account to sign transactions
    constructor() {
        // Default to a random account
        this.account = this.web3.eth.accounts.create();
        this.web3.eth.accounts.wallet.add(this.account);
    }

    // Get the ABI JSON Files' directory from settings
    public get contractsPath() : string {
        const c


 the LiveData
        viewModel.movieDetails.observeForever(observer)

        // When the ViewModel is called
        viewModel.getMovieDetails("2")

        // Then a Failure is emitted
        assert(viewModel.movieDetails.value is Result.Failure)

        // with the correct exception
        assertEquals(Result.Failure<MovieUiModel>(TEST_EXCEPTION), viewModel.movieDetails.value)
    }

    private fun mockRepoSuccess() = runBlockingTest {
        whenever(repo.getMovieDetails("2")) doReturn flow { emitSuccess(TEST_UI_MODEL) }
    }

    private fun mockRepoFailure() = runBlockingTest {
        whenever(repo.getMovieDetails("2")) doReturn flow { emitFailure<MovieDetailsUiModel>(TEST_EXCEPTION) }
    }

    companion object {

        private val TEST_UI_MODEL = MovieDetailsUiModel(
            title = "Hello World",
            description = "A new program written in Kotlin emerges",
            backdropImage = "https://kotlinlang.org/assets/images/open-graph/kotlin_250x250.png",
            posterImage = "https://kotlinlang.org/assets/images/open-graph/kotlin_250x250.png",
            releaseYear = "2019"
        )

        private val TEST_EXCEPTION = NoDataException()
    }
}
package com.calvinnor.movie.details.viewmodel

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.calvinnor.core.dispatchers.Dispatcher
import com.calvinnor.core.domain.Result
import com.calvinnor.core.extensions.collectOn
import com.calvinnor.core.extensions.flowOnBack
import com.calvinnor.core.extensions.isNotIdle
import com.calvinnor.core.extensions.setLoading
import com.calvinnor.core.viewmodel.BaseViewModel
import com.calvinnor.movie.details.di.MovieDetailsModule
import com.calvinnor.movie.details.domain.MovieDetailsC
import com.calvinnor.movie.details.model.MovieDetailsUiModel

class MovieDetailsViewModel(
    private val movieRepo: MovieDetailsC.Repository,
    private val dispatcher: Dispatcher

) : BaseViewModel(dispatcher) {

    private val _movieDetails = MutableLiveData<Result<MovieDetailsUiModel>>()

    /** Exposed LiveData **/
    val movieDetails: LiveData<Result<MovieDetailsUiModel>> = _movieDetails

    fun getMovieDetails(movieId: String) {
        if (movieDetails.isNotIdle()) return

        _movieDetails.setLoading()
        launchOnMain {
            movieRepo.getMovieDetails(movieId = movieId)
                .flowOnBack(dispatcher)
                .collectOn(_movieDetails)
        }
    }

    override fun onCleared() {
        MovieDetailsModule.unload()
        super.onCleared()
    }
}
package com.calvinnor.core.dependencies

import com.calvinnor.core.BuildConfig
import com.calvinnor.core.networking.adapters.DateTimeAdapter
import com.facebook.stetho.okhttp3.StethoInterceptor
import com.jakewharton.retrofit2.adapter.kotlin.coroutines.CoroutineCallAdapterFactory
import com.squareup.moshi.Moshi
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import org.koin.core.qualifier.StringQualifier
import org.koin.dsl.module
import retrofit2.CallAdapter
import retrofit2.Converter
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory

private const val BASE_URL = "baseUrl"
private const val USE_INTERCEPTOR = "useInterceptor"

private const val API_KEY = "api_key"

val networkModule = module {

    /** [kotlinx.coroutines.Deferred] support for Retrofit **/
    single<CallAdapter.Factory> { CoroutineCallAdapterFactory() }

    /** Stetho Interceptor for Network Traffic **/
    single<Interceptor> { StethoInterceptor() }

    /** Base URL for


24 << 6 + _111111
	//	x31     = 2*x30 + 1
	//	x32     = 2*x31 + 1
	//	x63     = x32 << 31 + x31
	//	x126    = x63 << 63 + x63
	//	x252    = x126 << 126 + x126
	//	x255    = x252 << 3 + _111
	//	i397    = ((x255 << 33 + x32) << 94 + x30) << 2
	//	return    1 + i397
	//

	var z = new(P384Element).Set(e)
	var t0 = new(P384Element)
	var t1 = new(P384Element)
	var t2 = new(P384Element)
	var t3 = new(P384Element)

	z.Square(x)
	z.Mul(x, z)
	z.Square(z)
	t1.Mul(x, z)
	z.Square(t1)
	for s := 1; s < 3; s++ {
		z.Square(z)
	}
	z.Mul(t1, z)
	t0.Square(z)
	for s := 1; s < 6; s++ {
		t0.Square(t0)
	}
	t0.Mul(z, t0)
	t2.Square(t0)
	for s := 1; s < 12; s++ {
		t2.Square(t2)
	}
	t0.Mul(t0, t2)
	for s := 0; s < 6; s++ {
		t0.Square(t0)
	}
	z.Mul(z, t0)
	t0.Square(z)
	t2.Mul(x, t0)
	t0.Square(t2)
	t0.Mul(x, t0)
	t3.Square(t0)
	for s := 1; s < 31; s++ {
		t3.Square(t3)
	}
	t2.Mul(t2, t3)
	t3.Square(t2)
	for s := 1; s < 63; s++ {
		t3.Square(t3)
	}
	t2.Mul(t2, t3)
	t3.Square(t2)
	for s := 1; s < 126; s++ {
		t3.Square(t3)
	}
	t2.Mul(t2, t3)
	for s := 0; s < 3; s++ {
		t2.Square(t2)
	}
	t1.Mul(t1, t2)
	for s := 0; s < 33; s++ {
		t1.Square(t1)
	}
	t0.Mul(t0, t1)
	for s := 0; s < 94; s++ {
		t0.Square(t0)
	}
	z.Mul(z, t0)
	for s := 0; s < 2; s++ {
		z.Square(z)
	}
	z.Mul(x, z)

	return e.Set(z)
}
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Code generated by addchain. DO NOT EDIT.

package fiat

// Invert sets e = 1/x, and returns e.
//
// If x == 0, Invert returns e = 0.
func (e *P224Element) Invert(x *P224Element) *P224Element {
	// Inversion is implemented as exponentiation with exponent p − 2.
	// The sequence of 11 multiplications and 223 squarings is derived from the
	// following addition chain generated with github.com/mmcloughlin/addchain v0.4.0.
	//
	//	_10     = 2*1
	//	_11     = 1 + _10
	//	_110    = 2*_11
	//


 DART_SHA256_RISCV64 riscv64-sha
''';
    expect(
      fileSystem.fileSystem.file('beta/trixie/Dockerfile').readAsStringSync(),
      expected,
    );
  });

  test('update succeeds, dockerfile update forced', () async {
    var read = mockRead({
      '/dart-archive/channels/stable/release/latest/VERSION':
          '{"version":"2.12.4"}',
      '/dart-archive/channels/beta/release/latest/VERSION':
          '{"version":"2.13.0-211.14.beta"}',
    });

    var fileSystem = TestFileSystem.build({
      'versions.json': versions,
      'Dockerfile-debian.template': dockerfileTemplate,
      'stable/trixie/Dockerfile': '''
ENV DART_CHANNEL        bugged
ENV DART_VERSION   weird
ENV DART_SHA256    off
''',
      'beta/trixie/Dockerfile': '''
ENV DART_CHANNEL        outdated
ENV DART_VERSION   wrong
ENV DART_SHA256    incorrect
''',
    });

    await update.update(fileSystem.fileSystem, read, true);

    expect(fileSystem.contexts, [
      'versions.json',
      'Dockerfile-debian.template',
      'versions.json',
      'stable/trixie',
      'stable/trixie/Dockerfile',
      'beta/trixie',
      'beta/trixie/Dockerfile',
    ]);
    expect(fileSystem.operations, [
      FileSystemOp.read,
      FileSystemOp.read,
      FileSystemOp.write,
      FileSystemOp.create,
      FileSystemOp.write,
      FileSystemOp.create,
      FileSystemOp.write,
    ]);
    const expectedBeta = '''
ENV DART_CHANNEL        beta
ENV DART_VERSION        2.13.0-211.14.beta
ENV DART_SHA256_X64     jmn
ENV DART_SHA256_ARM     opq
ENV DART_SHA256_ARM64   rst
ENV DART_SHA256_RISCV64 uvw
''';
    expect(
      fileSystem.fileSystem.file('beta/trixie/Dockerfile').readAsStringSync(),
      expectedBeta,
    );

    const expectedStable = '''
ENV DART_CHANNEL        stable
ENV DART_VERSION        2.12.4
ENV DART_SHA256_X64     abc
ENV DART_SHA256_ARM     def
ENV DART_SHA256_ARM64   ghi
ENV DART_SHA256_RISCV64 jkl
''';
    expect(
      fileSystem.fileSystem.file('stable/trixie/Dockerfile').readAsStringSync(),
      expectedStable,
    );
  });
}
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io';

import 'package:scripts/src/versions.dart';

/// Builds a library file for the official images repository based on the passed
/// [commit] and [versions].
String buildLibrary(String commit, DartSdkVersion stable, DartSdkVersion beta) {
  var library = StringBuffer('''
Maintainers: Alexander Thomas <athom@google.com> (@athomas), Ivan Inozemtsev <iinozemtsev@google.com> (@iinozemtsev)
GitRepo: https://github.com/dart-lang/dart-docker.git
GitFetch: refs/heads/main
GitCommit: $commit
''');
  if (stable.version >= beta.version) {
    // stable is ahead of beta, that means stable _is_ beta.
    var tags = stable.tags.followedBy(['beta-sdk', 'beta']);
    library.write(_imageData(tags, 'stable'));
  } else {
    library.write(_imageData(stable.tags, 'stable'));
    library.write(_imageData(beta.tags, 'beta'));
  }
  return library.toString();
}

String


e.of(context).colorScheme.onSurface,
              ),
        ),
        Row(
          children: [
            Expanded(
              child: Text(
                text,
                style: Theme.of(context).textTheme.bodyMedium,
              ),
            ),
            const SizedBox(width: 20.0),
            InkWell(
              onTap: onPressed,
              child: SvgPicture.asset(
                Svgs.copy,
                width: 17.w,
                height: 17.w,
                colorFilter: ColorFilter.mode(
                    Theme.of(context).colorScheme.onSurface, BlendMode.srcIn),
              ),
            ),
          ],
        ),
      ],
    );
  }
}
import 'package:aqua/data/models/database/sideshift_order_model.dart';
import 'package:aqua/features/sideshift/models/sideshift_assets.dart';
import 'package:aqua/features/sideshift/models/sideshift_order.dart';
import 'package:aqua/features/sideshift/models/sideshift_order_status.dart';
import 'package:aqua/features/swaps/models/swap_models.dart';

extension SwapOrderToSideshiftOrderDbModel on SideshiftOrderDbModel {
  static SideshiftOrderDbModel fromSwapOrder(SwapOrder order) {
    return SideshiftOrderDbModel(
      orderId: order.id,
      createdAt: DateTime.now(),
      depositCoin: order.from.ticker,
      settleCoin: order.to.ticker,
      depositNetwork: SideshiftAssetExt.getNetworkString(order.from.id),
      settleNetwork: SideshiftAssetExt.getNetworkString(order.to.id),
      depositAddress: order.depositAddress,
      settleAddress: order.settleAddress,
      depositAmount: order.depositAmount.toString(),
      settleAmount: order.settleAmount?.toString(),
      expiresAt: order.expiresAt,
      status: SideshiftOrderStatusExt.fromSwapOrderStatus(order.status),
      type: SideshiftOrderTypeExt.fromSwapOrderType(order.type),
      depositMin: order.depositAmount.toString(),
      depositMax: null,
      updatedAt: DateTime.now(),
      depositHash: null,
      settleHash: null,
      depositReceivedAt: null,
      rate: null,
      onchainTxHash: null,
    );
  }
}

extension SideshiftOrderTypeExt on SideshiftOrderType {
  static SideshiftOrderType fromSwapOrderType(SwapOrderType type) {
    switch (type) {
      case SwapOrderType.variable:
        return SideshiftOrderType.variable;
      case SwapOrderType.fixed:
        return SideshiftOrderType.fixed;
      default:
        throw ArgumentError('Unknown SwapOrderType: $type');
    }
  }

  SwapOrderType toSwapOrderType() {
    switch (this) {
      case SideshiftOrderType.variable:
        return SwapOrderType.variable;
      case SideshiftOrderType.fixed:
        return SwapOrderType.fixed;
      default:
        throw ArgumentError('Unknown SideshiftOrderType: $this');
    }
  }
}
import 'package:aqua/features/onboarding/restore/providers/mnemonic_word_input_state_provider.dart';
import 'package:aqua/features/onboarding/restore/providers/wallet_restore_suggestions_provider.dart';
import 'package:aqua/features/shared/shared.dart';

final seedQrProvider =
    AsyncNotifierProvider.autoDispose<_SeedQrUtils, void>(() {
  return _SeedQrUtils();
});

class _SeedQrUtils extends AutoDisposeAsyncNotifier {
  static const int _mnemonicIndexLength = 4;
  static final RegExp _regExpForNumbers = RegExp(r'^[0-9]+$');

  @override
  void build() {}

  List<String> get _wordList {
    return ref.read(walletHintWordListProvider).asData?.value ?? [];
  }


ssub.vv v8, v4, v20, v0.t
# CHECK-INST: vssub.vv v8, v4, v20, v0.t
# CHECK-ENCODING: [0x57,0x04,0x4a,0x8c]
# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
# CHECK-UNKNOWN: 8c4a0457 <unknown>

vssub.vv v8, v4, v20
# CHECK-INST: vssub.vv v8, v4, v20
# CHECK-ENCODING: [0x57,0x04,0x4a,0x8e]
# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
# CHECK-UNKNOWN: 8e4a0457 <unknown>

vssub.vx v8, v4, a0, v0.t
# CHECK-INST: vssub.vx v8, v4, a0, v0.t
# CHECK-ENCODING: [0x57,0x44,0x45,0x8c]
# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
# CHECK-UNKNOWN: 8c454457 <unknown>

vssub.vx v8, v4, a0
# CHECK-INST: vssub.vx v8, v4, a0
# CHECK-ENCODING: [0x57,0x44,0x45,0x8e]
# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
# CHECK-UNKNOWN: 8e454457 <unknown>

vasub.vv v8, v4, v20, v0.t
# CHECK-INST: vasub.vv v8, v4, v20, v0.t
# CHECK-ENCODING: [0x57,0x24,0x4a,0x2c]
# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
# CHECK-UNKNOWN: 2c4a2457 <unknown>

vasub.vv v8, v4, v20
# CHECK-INST: vasub.vv v8, v4, v20
# CHECK-ENCODING: [0x57,0x24,0x4a,0x2e]
# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
# CHECK-UNKNOWN: 2e4a2457 <unknown>

vasub.vx v8, v4, a0, v0.t
# CHECK-INST: vasub.vx v8, v4, a0, v0.t
# CHECK-ENCODING: [0x57,0x64,0x45,0x2c]
# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
# CHECK-UNKNOWN: 2c456457 <unknown>

vasub.vx v8, v4, a0
# CHECK-INST: vasub.vx v8, v4, a0
# CHECK-ENCODING: [0x57,0x64,0x45,0x2e]
# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
# CHECK-UNKNOWN: 2e456457 <unknown>

vasubu.vv v8, v4, v20, v0.t
# CHECK-INST: vasubu.vv v8, v4, v20, v0.t
# CHECK-ENCODING: [0


c ctx => {
            const dataWorksheetName = 'Exchange Rates';
            const dataTableName = 'ExchangeRates';

            const currentWorksheet = ctx.workbook.worksheets.getActiveWorksheet();
            const dataWorksheet = ctx.workbook.worksheets.getItem(dataWorksheetName);
            const dataTable = dataWorksheet.tables.getItem(dataTableName);
            const dataRange = dataTable.getDataBodyRange();
            const chart = currentWorksheet.charts.add('ColumnClustered', dataRange, 'Auto');
            chart.setPosition('B15', 'R49');
            chart.title.text = 'Exchange Rates';
            chart.legend.position = 'Bottom';
            chart.legend.format.fill.setSolidColor('white');
            chart.dataLabels.format.font.size = 14;
            chart.dataLabels.format.font.color = 'black';
            chart.series.getItemAt(0).name = 'Value in Euro';
            await ctx.sync();
        }).catch(err => (this.error = err));
    }

    public getCurrentSelection(): Observable<any> {
        return Observable.create(observer => {
            Excel.run(async ctx => {
                const range = ctx.workbook.getSelectedRange();
                range.load('values');
                await ctx.sync().then(
                    () => {
                        observer.next(range.values[0][0]);
                        observer.complete();
                    },
                    err => {
                        observer.error(err);
                    }
                );
            }).catch(err => (this.error = err));
        });
    }

    public setValueBelowSelection(value: string | boolean | number) {
        Excel.run(async ctx => {
            const range = ctx.workbook.getSelectedRange();
            range.load('rowIndex, columnIndex');
            await ctx.sync().then(async () => {
                const target = ctx.workbook.worksheets.getActiveWorksheet().getCell(range.rowIndex + 1, range.columnIndex);
                target.values = [[value]];

                await ctx.sync();
            });
        }).catch(err => (this.error = err));
    }
}
import { Injectable } from '@angular/core';
import { AngularFirestore } from 'angularfire2/firestore';
import { AngularFireStorage, AngularFireUploadTask } from 'angularfire2/storage';
import { storage } from 'firebase';
import { Observable } from 'rxjs';
import { filter, finalize, switchMap, tap } from 'rxjs/operators';

/* Will handle the the actual file upload task.
- Calling storage.upload(path, file) creates a task that will start the upload immediately, no need to subscribe.
- You know an upload is complete when bytesTransferred equal totalBytes.
- You monitor progress by subscribing to percentageChanges or snapshotChanges on the task.
*/

@Injectable({
  providedIn: 'root',
})
export class FileService {

  // Main task
  // Gives access to observable data
  // Allows pause, cancel, resume upload
  task: AngularFireUploadTask;

  // Progress monitoring in %
  percentage: Observable<number>;

  // Even more data can be obtained from the snapshot
  snapshot: Observable<any>;

  // Download URL
  downloadURL: Observable<string>;

  constructor(private angularFireStorage: AngularFireStorage,
              private firestore:          AngularFirestore) { }

  startUpload(event: FileList) {
    // First file of filelist
    const file = event.item(0);

    // Client-side validation example
    // (only upload image files)
    // TODO: Move to image/imagefile service?
    /*
    if (file.type.split('/')[0] !== 'image') {
      console.error('unsupported file type :( ');
      return;
    }*/

    // Storage path
    const path = `test/${new Date().getTime()}_${


import os
import time
import socket
import json

# Check whether a server is active
def check_port(ip, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.settimeout(0.05)

    try:
        result = sock.connect_ex((ip, port))
        if result == 0:
            return True
        else:
            return False

    except Exception as e:
        print(e)
        return False

    finally:
        sock.close()

if __name__ == '__main__':
    BASE_DIR = os.path.dirname(__file__)
    server_root_dir = os.path.join(BASE_DIR, "servers")

    # Update server state continuously
    while True:
        sub_dir_names = []
        for name in os.listdir(server_root_dir):
            if os.path.isdir(os.path.join(server_root_dir, name)):
                sub_dir_names.append(name)

        display_info = "All active servers are listed below:\n\n"

        for dir_name in sub_dir_names:
            sub_server_dir = f"{server_root_dir}/{dir_name}/server_list"
            server_list = os.listdir(sub_server_dir)

            display_info += f"\nIP:PORT\tSTATE\t(Service: {dir_name})\n"

            info_dict = {}
            for ip_port in server_list:
                if ip_port.endswith(".flag"):
                    ip, port = ip_port.split(".flag")[0].split(":")
                    ip_info = f"{sub_server_dir}/{ip_port}"

                    # Remove inaccessible server
                    if not check_port(ip, int(port)):
                        state_str = f"{ip}:{port}\t\033[31minaccessible\033[0m\n"

                    else:
                        with open(ip_info, "r") as r:
                            try:
                                state_dict = json.load(r)
                                state = state_dict.pop("state")

                            except Exception as e:
                                continue

                        if state == "idle":
                            state_str = f"{ip}:{port}\t\033[32m{state}\033[0m\t"
                        else:
                            state_str = f"{ip}:{port}\t\033[31m{state}\033[0m\t"

                        if len(state_dict) == 0:
                            info_dict[""] = info_dict.get("", []) + [state_str]

                        else:
                            # Display the remaining information
                            key_str = "\n"
                            for key, value in state_dict.items():
                                key_str += f"\t- {key}: {value}\n"
                            info_dict[key_str] = info_dict.get(key_str, []) + [state_str]

            for key, value in info_dict.items():
                display_info += "".join(value)
                if key != "":
                    display_info += key

        os.system("clear")
        print(display_info)
        time.sleep(0.1)


ata()
  -- want a custom scale? define it here.
  scale = {0,2,3,5,7,10}

  scale_data = {}

  -- copy the scale over 4 octaves
  for octave=0,3 do
    for scale_note = 1,#scale do
      if scale[scale_note] > 11 then error("Note values must be between 0 and 11 inclusive") end
      table.insert(scale_data, (scale[scale_note]+(octave*12)))
    end
  end
  -- scale_data = {0,2,3,5,7,10,12,14,15,17,19,22,24,26,27,29,31,34,36,38,39,41,43,46}
end

-- create all of the note and probability data on init
function create_sequence_data()
  for i=1, 64 do
    sequence.note_data[i] = scale_data[math.random (1, #scale_data)];
    sequence.prob_data[i] = math.random (1, 100);
  end
end

function create_playloop_metro()
  t = metro.alloc()
  t.count = -1
  t.time = 15/params:get("tempo")

  t.callback = function(stage)
    sequence.pos = sequence.pos + 1
    if sequence.pos > seq_length then sequence.pos = 1 end

    -- does the note playing
    if sequence.prob_data[sequence.pos] <= reveal_level then
      animation_counter = 30;
      engine.hz((55*2^(((transpose * 12)+(sequence.note_data[sequence.pos] % (octave_range*12)))/12)))
    end
  end

  t:start()
end

function create_animation_metro()
  x = metro.alloc()

  x.callback = function(stage)
    if norns.menu.status() == false then draw_screen() end
  end

  x:start(0.0224)
end

function key(n, z)
  if n == 2 and z == 0 then
    create_sequence_data();
  end
end

function enc(n, delta)
  if n == 2 then
    animation_counter = 0
    reveal_level = reveal_level + delta
    if reveal_level > 100 then reveal_level = 100 end
    if reveal_level < 0 then reveal_level = 0 end
    draw_screen()
  end
end

function draw_screen()
  if animation_counter >= 0 then
    screen.clear()
    screen.level(15)
    screen.aa(2)
    screen.move(0,32)

    if animation_flipflop == true then
      pluck_distance = 30-(animation_counter/3)
      animation_flipflop = false
    else
      pluck_distance = 30+(animation_counter/3)
      screen.stroke()
      animation_flipflop = true
    end

    screen.curve(-5,32,60,pluck_distance,130,32)
    screen.stroke()
  end

    screen.font_face(0)
    screen.font_size(8)
    screen.level(15)
    -- draw right aligned text
    screen.move(127,63)
    screen.text_right("reveal " .. reveal_level.."%")
    screen.update()

    animation_counter = animation_counter - 1
end


 0);
		structure.add(STRING, 4, "magic_", null);
		structure.setCategoryPath(new CategoryPath("/vdex"));
		return structure;
	}
}
/* ###
 * IP: GHIDRA
 *
 * 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 ghidra.file.formats.android.dex;

import java.io.IOException;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import org.apache.commons.io.FilenameUtils;
import org.objectweb.asm.*;

import com.googlecode.d2j.dex.ClassVisitorFactory;
import com.googlecode.d2j.dex.ExDex2Asm;
import com.googlecode.d2j.node.DexFileNode;
import com.googlecode.d2j.reader.DexFileReader;
import com.googlecode.d2j.visitors.DexFileVisitor;

import ghidra.app.util.bin.ByteProvider;
import ghidra.file.formats.android.dex.format.DexConstants;
import ghidra.formats.gfilesystem.*;
import ghidra.formats.gfilesystem.annotations.FileSystemInfo;
import ghidra.formats.gfilesystem.factory.GFileSystemBaseFactory;
import ghidra.util.Msg;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import ghidra.util.task.UnknownProgressWrappingTaskMonitor;

/**
 * {@link GFileSystem} that converts a DEX file into a JAR file.
 */
@FileSystemInfo(type = "dex2jar", description = "Android DEX to JAR", factory = GFileSystemBaseFactory.class)
public class DexToJarFileSystem extends GFileSystemBase {

	private GFileImpl jarFile;

	public DexToJarFileSystem(String fileSystemName, ByteProvider provider) {
		super(fileSystemName, provider);
	}

	public GFile getJarFile() {
		return jarFile;
	}

	@Override
	public ByteProvider getByteProvider(GFile file, TaskMonitor monitor)
			throws IOException, CancelledException {
		return file.equals(jarFile) ? getJarFile(jarFile.getFSRL(), monitor) : null;
	}

	@Override
	public List<GFile> getListing(GFile directory) throws IOException {
		return (directory == null || directory.equals(root)) ? Arrays.asList(jarFile)
				: Collections.emptyList();
	}

	@Override
	public boolean isValid(TaskMonitor monitor) throws IOException {
		return DexConstants.isDexFile(provider);
	}

	private ByteProvider getJarFile(FSRL jarFSRL, TaskMonitor monitor)
			throws CancelledException, IOException {
		TaskMonitor upwtm = new UnknownProgressWrappingTaskMonitor(monitor, 1);
		upwtm.setMessage("Converting DEX to JAR...");

		FSRLRoot targetFSRL = getFSRL();
		FSRL containerFSRL = targetFSRL.getContainer();

		ByteProvider jarBP = fsService.getDerivedByteProviderPush(containerFSRL, jarFSRL,
			"dex2jar", -1, (os) -> {
				try (ZipOutputStream outputStream = new ZipOutputStream(os)) {

					DexToJarExceptionHandler exceptionHandler = new DexToJarExceptionHandler();

					byte[] containerFileBytes = provider.readBytes(0, provider.length());
					DexFileReader reader = new DexFileReader(containerFileBytes);

					DexFileNode fileNode = new DexFileNode();
					try {


hAsync(HashId, new[] { "one", "two", "not-exists" });

            Assert.That(hashValues.EquivalentTo(expectedValues), Is.True);
        }
        [Test]
        public async Task Can_hash_set()
        {
            var key = HashId + "key";
            var field = GetBytes("foo");
            var value = GetBytes("value");
            Assert.AreEqual(await NativeAsync.HDelAsync(key, field), 0);
            Assert.AreEqual(await NativeAsync.HSetAsync(key, field, value), 1);
            Assert.AreEqual(await NativeAsync.HDelAsync(key, field), 1);
        }

        [Test]
        public async Task Can_hash_multi_set_and_get()
        {
            const string Key = HashId + "multitest";
            Assert.That(await RedisAsync.GetValueAsync(Key), Is.Null);
            var fields = new Dictionary<string, string> { { "field1", "1" }, { "field2", "2" }, { "field3", "3" } };

            await RedisAsync.SetRangeInHashAsync(Key, fields);
            var members = await RedisAsync.GetAllEntriesFromHashAsync(Key);
            foreach (var member in members)
            {
                Assert.IsTrue(fields.ContainsKey(member.Key));
                Assert.AreEqual(fields[member.Key], member.Value);
            }
        }

        public class HashTest
        {
            public int Id { get; set; }
            public string Name { get; set; }
        }

        [Test]
        public async Task Can_store_as_Hash()
        {
            var dto = new HashTest { Id = 1 };
            await RedisAsync.StoreAsHashAsync(dto);

            var storedHash = await RedisAsync.GetHashKeysAsync(dto.ToUrn());
            Assert.That(storedHash, Is.EquivalentTo(new[] { "Id" }));

            var hold = RedisClient.ConvertToHashFn;
            RedisClient.ConvertToHashFn = o =>
            {
                var map = new Dictionary<string, string>();
                o.ToObjectDictionary().Each(x => map[x.Key] = (x.Value ?? "").ToJsv());
                return map;
            };

            await RedisAsync.StoreAsHashAsync(dto);
            storedHash = await RedisAsync.GetHashKeysAsync(dto.ToUrn());
            Assert.That(storedHash, Is.EquivalentTo(new[] { "Id", "Name" }));

            RedisClient.ConvertToHashFn = hold;
        }
    }

}


 "\r\n" + "RoomCode: 101"
					+ "\r\n" + "RoomType: Deluxe Room" + "\r\n" + "Capacity: 2" + "\r\n" + "RoomState: CheckIn" + "\r\n"
					+ "Price: 240.0" + "\r\n" + "", out.toString());

		}
	}

	@Test(expected = IllegalArgumentException.class)
	public void testHotelExp1() {
		{
			Hotel h1 = new Hotel();
			h1.addRoom("Deluxe Room", 101, 2);
			h1.addRoom("Deluxe Room", 101, 2);
		}
	}

	@Test(expected = IllegalArgumentException.class)
	public void testHotelExp2() {
		{
			Hotel h1 = new Hotel();
			h1.addRoom("Deluxe Room", 101, 2);
			h1.removeRoomFromList(103);
		}
	}

	@Test(expected = IllegalArgumentException.class)
	public void testHotelExp3() {
		{
			Hotel h1 = new Hotel();
			h1.addRoom("Deluxe Room", 101, 2);
			h1.addRoom("Deluxe Room", 102, 2);
			h1.addRoom("Standard Room", 103, 2);
			h1.addRoom("Deluxe Room", 104, 1);

			h1.printAllRoomsInfo();
			h1.removeRoomFromList(102);

			List<Room> lst = h1.getFreeRooms();
			lst.get(0).setState(new CheckInState());
			h1.printAllRoomsInfo();
			List<Room> lst2 = h1.getFreeRooms();

			h1.queryRoom(104);
			h1.queryRoom(103);
			h1.queryRoom(101);
			h1.queryRoom(102);
		}
	}

	@Test
	public void testMg1() {
		{
			Hotel h1 = new Hotel();
			h1.addRoom("Deluxe Room", 101, 2);
			h1.addRoom("Deluxe Room", 102, 2);
			h1.addRoom("Standard Room", 103, 2);
			h1.addRoom("Deluxe Room", 104, 1);
			List<Room> lst = h1.getFreeRooms();
			lst.get(0).setState(new CheckInState());

			Manager m1 = new Manager();
			assertEquals("240.0", "" + m1.checkIn(1, 101));
			assertEquals("756.0", "" + m1.checkIn(7, 103));
			assertEquals("1280.0", "" + m1.checkIn(8, 104));
			assertEquals("X", "" + m1.transferPrice(10.1));
			assertEquals(null, m1.transferPrice(-1));
			assertEquals(null, m1.transferPrice(4000));

		}
	}

	@Test(expected = NullPointerException.class)
	public void testMgExp1() {
		{
			Hotel h1 = new Hotel();
			h1.addRoom("Deluxe Room", 101, 2);
			h1.addRoom("Deluxe Room", 102, 2);
			h1.addRoom("Standard Room", 103, 2);
			h1.addRoom("Deluxe Room", 104, 1);
			List<Room> lst = h1.getFreeRooms();
			lst.get(0).setState(new CheckInState());

			Manager m1 = new Manager();
			m1.checkIn(1, 1010);
		}
	}

	@Test(expected = IllegalArgumentException.class)
	public void testMgExp2() {
		{
			Hotel h1 = new Hotel();
			h1.addRoom("Deluxe Room", 101, 2);
			h1.addRoom("Deluxe Room", 102, 2);
			h1.addRoom("Standard Room", 103, 2);
			h1.addRoom("Deluxe Room", 104, 1);
			List<Room> lst = h1.getFreeRooms();
			lst.get(0).setState


eeCompilerArgs =
        listOf(*kotlinOptions.freeCompilerArgs.toTypedArray(), "-Xjsr305=strict")
}
/*
 * Copyright (c) 2022-2032 buhuiming
 * 不能修改和删除上面的版权声明
 * 此代码属于buhuiming编写，在未经允许的情况下不得传播复制
 */
package com.bhm.demo.ui

import android.widget.ArrayAdapter
import androidx.core.view.WindowCompat
import com.bhm.ble.BleManager
import com.bhm.ble.attribute.BleOptions
import com.bhm.ble.data.BleTaskQueueType
import com.bhm.ble.data.Constants.AUTO_CONNECT
import com.bhm.ble.data.Constants.CONTAIN_SCAN_DEVICE_NAME
import com.bhm.ble.data.Constants.DEFAULT_AUTO_SET_MTU
import com.bhm.ble.data.Constants.DEFAULT_CONNECT_MILLIS_TIMEOUT
import com.bhm.ble.data.Constants.DEFAULT_CONNECT_RETRY_COUNT
import com.bhm.ble.data.Constants.DEFAULT_CONNECT_RETRY_INTERVAL
import com.bhm.ble.data.Constants.DEFAULT_MAX_CONNECT_NUM
import com.bhm.ble.data.Constants.DEFAULT_MTU
import com.bhm.ble.data.Constants.DEFAULT_OPERATE_INTERVAL
import com.bhm.ble.data.Constants.DEFAULT_OPERATE_MILLIS_TIMEOUT
import com.bhm.ble.data.Constants.DEFAULT_SCAN_MILLIS_TIMEOUT
import com.bhm.ble.data.Constants.DEFAULT_SCAN_RETRY_COUNT
import com.bhm.ble.data.Constants.DEFAULT_SCAN_RETRY_INTERVAL
import com.bhm.ble.data.Constants.ENABLE_LOG
import com.bhm.ble.data.Constants.SCAN_NEED_CHECK_GPS
import com.bhm.demo.BaseActivity
import com.bhm.demo.R
import com.bhm.demo.databinding.ActivitySettingBinding
import com.bhm.support.sdk.common.BaseViewModel
import com.bhm.support.sdk.core.AppTheme
import com.bhm.support.sdk.utils.ViewUtil

/**
 * 设置扫描配置项页面
 *
 * @author Buhuiming
 * @date 2023年05月24日 15时38分
 */
class OptionSettingActivity : BaseActivity<BaseViewModel, ActivitySettingBinding>() {

    override fun createViewModel() = BaseViewModel (application)

    override fun initData() {
        super.initData()
        val controller = WindowCompat.getInsetsController(
            window,
            window.decorView
        )
        controller.isAppearanceLightStatusBars = true
        controller.isAppearanceLightNavigationBars = true
        val taskQueueTypes = arrayOf("Default", "Operate", "Independent")
        viewBinding.spTaskQueueType.adapter =
            ArrayAdapter(this, android.R.layout.simple_spinner_item, taskQueueTypes)
        viewBinding.spTaskQueueType.setSelection(0)
        val options = BleManager.get().getOptions()
        options?.let {
            val etScanServiceUuidText = StringBuilder()
            options.scanServiceUuids.forEach { string ->
                if (string.isNotEmpty()) {
                    etScanServiceUuidText.append(string)
                    etScanServiceUuidText.append(",")
                }
            }

            if (etScanServiceUuidText.isNotEmpty()) {
                etScanServiceUuidText.delete(etScanServiceUuidText.length - 1,
                    etScanServiceUuidText.length)
            }
            val etScanDeviceNameText = StringBuilder()
            options.scanDeviceNames.forEach { string ->
                if (string.isNotEmpty()) {
                    etScanDeviceNameText.append(string)
                    etScanDeviceNameText.append(",")
                }
            }
            if (etScanDeviceNameText.isNotEmpty()) {
                etScanDeviceNameText.delete(etScanDeviceNameText.length - 1,
                    etScanDevice


5IYXNoTWFwIG0gPSBuZXcgamF2YS51dGlsLkhhc2hNYXAoKTsKCQltLnB1dCgicyIsIG5ldyBieXRlW117Yn0pOwoJCXJldHVybiBtOwoJfQo=";

		// suo5 u32toBytes 方法
		public static String SUO5_U32_TO_BYTES = "Ynl0ZVtdIHUzMnRvQnl0ZXMoaW50IGkpIHsKCQlieXRlW10gcmVzdWx0ID0gbmV3IGJ5dGVbNF07CgkJcmVzdWx0WzBdID0gKGJ5dGUpIChpID4+IDI0KTsKCQlyZXN1bHRbMV0gPSAoYnl0ZSkgKGkgPj4gMTYpOwoJCXJlc3VsdFsyXSA9IChieXRlKSAoaSA+PiA4KTsKCQlyZXN1bHRbM10gPSAoYnl0ZSkgKGkgLyo+PiAwKi8pOwoJCXJldHVybiByZXN1bHQ7Cgl9";

		// suo5 bytesToU32 方法
		public static String SUO5_BYTES_TO_U32 = "aW50IGJ5dGVzVG9VMzIoYnl0ZVtdIGJ5dGVzKSB7CgkJcmV0dXJuICgoYnl0ZXNbMF0gJiAweEZGKSA8PCAyNCkgfAoJCQkJKChieXRlc1sxXSAmIDB4RkYpIDw8IDE2KSB8CgkJCQkoKGJ5dGVzWzJdICYgMHhGRikgPDwgOCkgfAoJCQkJKChieXRlc1szXSAmIDB4RkYpKTsKCX0=";

		// suo5 marshal 方法，需要 u32toBytes
		public static String SUO5_MARSHAL = "cHJpdmF0ZSBieXRlW10gbWFyc2hhbChqYXZhLnV0aWwuSGFzaE1hcCBtKSB0aHJvd3MgamF2YS5pby5JT0V4Y2VwdGlvbiB7CgkJamF2YS5pby5CeXRlQXJyYXlPdXRwdXRTdHJlYW0gYnVmID0gbmV3IGphdmEuaW8uQnl0ZUFycmF5T3V0cHV0U3RyZWFtKCk7CgkJT2JqZWN0W10ga2V5U2V0ID0gbS5rZXlTZXQoKS50b0FycmF5KCk7CgkJCgkJZm9yIChpbnQgaSA9IDA7IGkgPCBrZXlTZXQubGVuZ3RoOyBpKyspIHsKCQkJU3RyaW5nIGtleSA9IGtleVNldFtpXS50b1N0cmluZygpOwoJCQlieXRlW10gdmFsdWUgPSAoYnl0ZVtdKW0uZ2V0KGtleSk7CgkJCWJ1Zi53cml0ZSgoYnl0ZSkga2V5Lmxlbmd0aCgpKTsKCQkJYnVmLndyaXRlKGtleS5nZXRCeXRlcygpKTsKCQkJYnVmLndyaXRlKHUzMnRvQnl0ZXMoKHZhbHVlKS5sZW5ndGgpKTsKCQkJYnVmLndyaXRlKHZhbHVlKTsKCQl9CgkJCgkJYnl0ZVtdICAgICAgICAgICAgICBkYXRhID0gYnVmLnRvQnl0ZUFycmF5KCk7Cgk


     |                      | required to be       |
/// |                    |                    |                      | either               |
/// |                    |                    |                      | dereferenceable or   |
/// |                    |                    |                      | to be in the         |
/// |                    |                    |                      | domain of `==`.      |
/// +--------------------+--------------------+----------------------+----------------------+
/// | `(void)i++`        |                    | `(void)++i`          |                      |
/// +--------------------+--------------------+----------------------+----------------------+
/// | `*i++`             | convertible to     | `value_type x = *i;` |                      |
/// |                    | `value_type`       | `++i;`               |                      |
/// |                    |                    | `return x;`          |                      |
/// |                    |                    |                      |                      |
/// +--------------------+--------------------+----------------------+----------------------+
///
/// Synopsis
/// --------
///
///     TICK_TRAIT(is_input_iterator,
///         is_iterator<_>,
///         is_equality_comparable<_>
///     )
///     {
///         template<class I>
///         auto require(I&& i) -> valid<
///             decltype(returns<typename iterator_traits<I>::value_type>(*i)),
///             decltype(returns<typename iterator_traits<I>::value_type>(*i++))
///         >;
///     };
///

#include <tick/builder.h>
#include <tick/traits/is_iterator.h>
#include <tick/traits/is_equality_comparable.h>

namespace tick {

TICK_TRAIT(is_input_iterator, is_iterator<_>, is_equality_comparable<_>)
{
    template<class I>
    auto require(I&& i) -> valid<
        TICK_RETURNS(*i, typename iterator_traits<I>::value_type),
        TICK_RETURNS(*i++, typename iterator_traits<I>::value_type)
    >;
};

}

#endif


Changed = t1 != text1 || t2 != text2

        text1 = t1
        if (t2.isNotEmpty()) {
            text2 = " - \"$t2\""
        } else {
            text2 = ""
        }
        if (textChanged) {
            preferredSize = calculateDimension(text1, text2)
            revalidate()
            repaint()
        }
    }

    private fun calculateDimension(t1: String, t2: String): Dimension {
        var w =
            iconGap + icon.iconWidth + iconGap + fontMetrics.stringWidth(t1) + fontMetrics.stringWidth(t2) + textRightPadding
        if (leafWidth > 0) {
            w += leafWidth + iconGap
        }
        return Dimension(w, max(icon.iconHeight, fontMetrics.height))
    }

    override fun paintComponent(g: Graphics) {
        // Включение сглаживания шрифта
        val g2d = g as Graphics2D
        g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON)

        // Дополнительно можно включить другие улучшения рендеринга
        g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY)
        g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON)

        var left = iconGap
        val currentNodeIcon = treeNodeIcon
        if (currentNodeIcon != null) {
            val treeNodeIconTop = (height - currentNodeIcon.iconHeight) / 2
            currentNodeIcon.paintIcon(this, g, left, treeNodeIconTop)
            left += iconGap + currentNodeIcon.iconWidth
        } else if (leafWidth > 0) {
            left += iconGap + leafWidth
        }

        val iconTop = (height - icon.iconHeight) / 2

        g.drawImage(icon.image, left, iconTop, this)
        left += icon.iconWidth + iconGap

        val textHeight = fontMetrics.ascent - fontMetrics.descent - fontMetrics.leading
        val textTop = textHeight + (height - textHeight) / 2

        g.color = foreground1
        g.drawString(text1, left, textTop)
        left += fontMetrics.stringWidth(text1)

        if (text2.isNotEmpty()) {
            g.color = foreground2
            g.drawString(text2, left, textTop)
        }
    }

    override fun updateUI() {
        super.updateUI()
        // To avoid invoking new methods from the constructor, the
        // initiated field is first checked. If initiated is false, the constructor
        // has not run and there is no point in checking the value. As
        // all look and feels have a non-null value for these properties,
        // a null value means the developer has specifically set it to
        // null. As such, if the value is null, this does not reset the
        // value.
        if (!initiated || closedIcon is UIResource) {
            closedIcon = UIManager.getIcon("Tree.closedIcon")
            closedIcon?.let {
                leafWidth = it.iconWidth
            }
        }
        if (!initiated || openIcon is UIManager) {
            openIcon = UIManager.getIcon("Tree.openIcon")
        }
    }
}
package com.github.grishberg.android.layoutinspector.ui.dialogs.bookmarks

import com.github.grishberg.android.layoutinspector.domain.AbstractViewNode
import java.awt.Color

typealias BookmarksChangedListener = () -> Unit

class Bookmarks {
    private val _items = mutableListOf<BookmarkInfo>()
    val listeners = mutableListOf<BookmarksChangedListener>()

    val items: List<BookmarkInfo>
        get() = _items

    fun add(newBookmark: BookmarkInfo) {
        _items.add(newBookmar


Suppress("DEPRECATION")

package com.sunyuan.click.debounce.utils

import com.sunyuan.click.debounce.config.Const
import com.sunyuan.click.debounce.entity.MethodEntity
import com.sunyuan.click.debounce.entity.MethodMapperEntity
import com.sunyuan.click.debounce.entity.ProxyClassEntity
import com.sunyuan.click.debounce.entity.ProxyMethodEntity
import org.objectweb.asm.Label
import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type
import org.objectweb.asm.tree.*

/**
 * @author sy007
 * @date 2022/09/24
 * @description
 */
object ClickMethodModifyUtil {
    var fieldName = "$\$clickProxy"
    var staticFieldName = "$\$sClickProxy"
    var fieldDesc = ""

    fun modify(classNode: ClassNode, proxyClassEntity: ProxyClassEntity) {
        val collectMethods = Const.sModifyOfMethods[classNode.name]
        if (collectMethods.isNullOrEmpty()) {
            return
        }
        fieldDesc = "L${proxyClassEntity.owner};"

        if (classNode.fields.find { (it.name == fieldName || it.name == staticFieldName) } != null) {
            LogUtil.warn("${classNode.name} has been modified by debounce-plugin")
            return
        }

        if (isVisitInvokeSpecialField(collectMethods)) {
            //为当前类创建实例属性
            classNode.fields.add(
                FieldNode(
                    Opcodes.ACC_PRIVATE,
                    fieldName, fieldDesc, null, null
                )
            )
        }
        if (isVisitInvokeStaticField(collectMethods)) {
            //为当前类创建静态属性
            classNode.fields.add(
                FieldNode(
                    Opcodes.ACC_PRIVATE or Opcodes.ACC_STATIC,
                    staticFieldName, fieldDesc, null, null
                )
            )
        }
        classNode.methods.filter {
            collectMethods.contains(it.name + it.desc)
        }.forEach {
            val mapper = collectMethods[it.name + it.desc]!!
            val insnList = when (mapper.methodEntity.access) {
                Opcodes.H_INVOKESTATIC -> {
                    modifyStaticClickMethod(
                        classNode.name,
                        proxyClassEntity.owner,
                        mapper
                    )
                }
                else -> {
                    modifyClickMethod(
                        classNode.name,
                        proxyClassEntity.owner,
                        mapper
                    )
                }
            }
            it.instructions.insert(insnList)
        }
    }

    /**
     * 在字节码跳转位置后插入FrameNode解决D8 warning [Expected stack map table for method with non-linear control flow]
     */
    private fun modifyStaticClickMethod(
        owner: String,
        proxyOwner: String,
        mapper: MethodMapperEntity
    ): InsnList {
        val insnList = InsnList()
        insnList.add(
            FieldInsnNode(
                Opcodes.GETSTATIC,
                owner,
                staticFieldName,
                fieldDesc
            )
        )
        val label = Label()
        insnList.add(JumpInsnNode(Opcodes.IFNONNULL, LabelNode(label)))
        newProxyClass(insnList, proxyOwner)
        insnList.add(
            FieldInsnNode(
                Opcodes.PUTSTATIC,
                owner,
                staticFieldName,
                fieldDesc
            )
        )
        insnList.add(LabelNode(label))
        insnList.add(FrameNode(Opcodes.F_SAME, 0, null, 0, null))
        val localIndex =
            insnList.createMethodHookParam(owner, mapper.methodEntity, mapper.samMethodEntity, true)
        insnList.add(Field