        ("2019-10-27 01:30:00+00:00", 1),
        (datetime(2019, 10, 27, 1, 30, 0, 0, fold=0), 0),
        (datetime(2019, 10, 27, 1, 30, 0, 0, fold=1), 1),
    ],
)
def test_timestamp_constructor_infer_fold_from_value(tz, ts_input, fold_out):
    # Test for #25057
    # Check that we infer fold correctly based on timestamps since utc
    # or strings
    ts = Timestamp(ts_input, tz=tz)
    result = ts.fold
    expected = fold_out
    assert result == expected

@pytest.mark.parametrize("tz", ["dateutil/Europe/London"])
@pytest.mark.parametrize(
    "ts_input,fold,value_out",
    [
        (datetime(2019, 10, 27, 1, 30, 0, 0), 0, 1572136200000000000),
        (datetime(2019, 10, 27, 1, 30, 0, 0), 1, 1572139800000000000),
    ],
)
def test_timestamp_constructor_adjust_value_for_fold(tz, ts_input, fold, value_out):
    # Test for #25057
    # Check that we adjust value for fold correctly
    # based on timestamps since utc
    ts = Timestamp(ts_input, tz=tz, fold=fold)
    result = ts.value
    expected = value_out
    assert result == expected


 {
    fn generate(
        &self,
        target: &'a Path,
        width: u32,
        height: u32,
        zone_row_i: u32,
        zone_col_i: u32,
    ) -> Result<(), Box<Error>>;
}

pub struct RandomNear<'a> {
    pub near: &'a types::ZoneTile,
    pub tile: &'a types::ZoneTile,
    pub probability: u32,
}

pub struct Overflow {
    pub world_tile: world_types::WorldTile,
    pub default_tile: types::ZoneTile,
    pub depth: u32,
}

pub struct DefaultGenerator<'a> {
    pub world: &'a world::World<'a>,
    pub default_tile: &'a types::ZoneTile,
    pub random: Option<Vec<(f64, &'a types::ZoneTile)>>,
    pub random_near: Option<Vec<RandomNear<'a>>>,
    pub allow_overflow: Option<Vec<Overflow>>,
}

fn is_in_border(
    width: i32,
    height: i32,
    tested_row_i: i32,
    tested_col_i: i32,
    maximum_spacing: i32,
) -> Option<Border> {
    let row_part_len = (width - 1) / 3;
    let col_part_len = (height - 1) / 3;
    let tested_is_out_zone = is_out_zone(width, height, tested_row_i, tested_col_i);

    // Test is on top
    if tested_col_i >= row_part_len
        && tested_col_i < (width - row_part_len)
        && tested_row_i < maximum_spacing
    {
        return Some(Border::Top((tested_row_i + 1) as u32));
    }

    // Test is on top left
    if tested_col_i <= row_part_len
        && tested_row_i <= col_part_len
        && !tested_is_out_zone
        && tested_row_i < col_part_len
    {
        let spacing = tested_col_i - (row_part_len - tested_row_i - 1);
        if spacing <= maximum_spacing {
            return Some(Border::TopLeft(spacing as u32));
        }
    }

    // Test is on top right
    if tested_col_i >= (width - row_part_len) && tested_row_i < col_part_len && !tested_is_out_zone
    {
        let spacing = (width - tested_col_i) - (row_part_len - tested_row_i);
        if spacing <= maximum_spacing {
            return Some(Border::TopRight(spacing as u32));
        }
    }

    // Test is on left
    if tested_row_i >= col_part_len
        && tested_row_i < (height - col_part_len)
        && tested_col_i < maximum_spacing
    {
        return Some(Border::Left((tested_col_i + 1) as u32));
    }

    // Test is on right
    if tested_col_i >= (width - row_part_len)
        && tested_row_i <= (height - col_part_len)
        && !tested_is_out_zone
        && tested_row_i < (height - col_part_len)
        && (width - tested_col_i) <= maximum_spacing
    {
        return Some(Border::Right((width - tested_col_i) as u32));
    }

    // Test is bottom left
    if tested_row_i >= (height - col_part_len) && tested_col_i < row_part_len && !tested_is_out_zone
    {
        let spacing = tested_col_i + 1 - (row_part_len - (height - (tested_row_i + 1)));
        if spacing <= maximum_spacing {
            return Some(Border::BottomLeft(spacing as u32));
        }
    }

    // Test is bottom
    if tes


{
//        printf("level too low\n");
        return SP_NOT_OK;
        // TRACKING FAILURE - LEVEL TOO LOW
    }

    // ----- SUCCESS, UPDATE TRACKED PITCH -----

    float asdf_offset_before = p->asdf_offset;

    if (new_l_min < p->num_offsets_2) {
        // shift ASDF one index higher
        for (int i = 1; i <= p->num_offsets; i++) {
            p->asdf[i] = p->asdf[i - 1];
        }
        p->asdf_offset -= 1;

        // recalculate ASDF(0)
        p->asdf[0] = 0.0f;
        int l = p->asdf_offset - (p->num_offsets_2);
        for (int j = 0; j < l; j++) {
            float *samp;
            float *sampL;
            cb_read_at_index_behind_write(p->buff, -1 * j, &samp);
            cb_read_at_index_behind_write(p->buff, (-1 * j) - l, &sampL);
            p->asdf[0] += powf(*samp - *sampL, 2);
        }
    } else if (new_l_min > p->num_offsets_2) {
        // shift E and H one index lower
        for (int i = 0; i <= p->num_offsets - 1; i++) {
            p->asdf[i] = p->asdf[i + 1];
        }
        p->asdf_offset += 1;
//        printf("inc\n");

        // recalculate ASDF(N)
        p->asdf[p->num_offsets] = 0.0f;
        int l = p->asdf_offset + p->num_offsets - (p->num_offsets_2);
        for (int j = 0; j < l; j++) {
            float *samp;
            float *sampL;
            cb_read_at_index_behind_write(p->buff, -1 * j, &samp);
            cb_read_at_index_behind_write(p->buff, (-1 * j) - l, &sampL);
            p->asdf[p->num_offsets] += powf(*samp - *sampL, 2);
        }
    }

    // ----- INTERPOLATE BEST MIN -----

    int offLeft = new_l_min - 1;
    int offRight = new_l_min + 1;
    float valLeft = p->asdf[offLeft];
    float valRight = p->asdf[offRight];
    float interp_min = 0.0f;
    interpolate_min(offLeft, valLeft, new_l_min, min_diff, offRight, valRight, &interp_min);

    p->cur_period = asdf_offset_before + interp_min - ((float)p->num_offsets_2) - 1;
    *output_pitch = 1.0f / (p->cur_period / (float)sp->sr);
//    printf("%f\n", *output_pitch);

    return SP_OK;
}


onst get = (color: string, hue: string) => `${color}.${hue}`;

export const addOpacity = (color: string, opacity: number) =>
  Color(color)
    .fade(1 - opacity)
    .rgb()
    .string();

export const addWhite = (color: string, opacity: number) => {
  return Color(color).mix(Color('#fff'), opacity).hex();
};

export const addBlack = (color: string, opacity: number) =>
  Color(color).mix(Color('#000'), opacity).hex();

export const isDarkColor = (color: string) => Color(color).isDark();

export const generateAlphaColors = (color: string) => ({
  900: addOpacity(color, 0.92),
  800: addOpacity(color, 0.8),
  700: addOpacity(color, 0.6),
  600: addOpacity(color, 0.48),
  500: addOpacity(color, 0.38),
  400: addOpacity(color, 0.24),
  300: addOpacity(color, 0.16),
  200: addOpacity(color, 0.12),
  100: addOpacity(color, 0.08),
  50: addOpacity(color, 0.04),
});

export type Emphasis = 'high' | 'medium' | 'low' | 'lowest';

export const colorEmphasis = (color: string, emphasis: Emphasis) => {
  switch (emphasis) {
    case 'high':
      return color;
    case 'medium':
      return generateAlphaColors(color)[700];
    case 'low':
      return generateAlphaColors(color)[500];
    case 'lowest':
      return generateAlphaColors(color)[300];
    default:
      return undefined;
  }
};

export const generateStripe = ({ size = '1rem', color = 'rgba(255, 255, 255, 0.15)' }) => css`
  background-image: linear-gradient(
    45deg,
    ${color} 25%,
    transparent 25%,
    transparent 50%,
    ${color} 50%,
    ${color} 75%,
    transparent 75%,
    transparent
  );
  background-size: ${size} ${size};
`;
import { RandomizingStrategies } from "@src/app/Model/Randomizing/RandomizingStrategies";
import { EMail } from "@src/app/Model/User/EMail";
import { Password } from "@src/app/Model/User/Password";
import { User } from "@src/app/Model/User/User";
import { UserPermission } from "@src/app/Model/User/UserPermission";
import { instance, mock } from "ts-mockito";
import { KeyData } from "../../KeyData";
import { ReferenceTuple } from "../../ReferenceTuple";
import { ReferenceTupleMembershipVerifier } from "../../ReferenceTupleMembershipVerifier";
import { ShortDescription } from "../../ShortDescription";
import { StudyPrototype } from "../../StudyPrototype";
import { StudyStatus } from "../../StudyStatus";
import { Section } from "../Section";
import { SectionElement } from "../SectionElement";

const id = 10;
const name = "Name";
const skippable = false;
const resultRelevant = true;
const randomStrategy = RandomizingStrategies.STANDARD;

let mockedReferenceTupleMembershipVerifier = mock(ReferenceTupleMembershipVerifier);
let mockedReferenceTuple = mock(ReferenceTuple);

describe('SectionElement', () => {
    it('createSectionElementWithStudyObjects_givesExpectedStudyObjects', () => {
        const object: SectionElement = new SectionElement(id, name, randomStrategy, []);
        expect(object.studyObjects).toEqual([]);
    });
    it('getSkippable_givesExpectedSkippable', () => {
        const object: SectionElement = createSectionElementDefault();
        expect(object.skippable).to


umb {
	padding: 8px 15px;
	list-style: none;
	background: transparent;
	border-radius: 4px;
	margin-top: -10px;
	margin-bottom: 5px;
	margin-left: 0;
	padding-left: 0;
}

.mg-wrapper .breadcrumb > li {
	display: inline-block;
}

.mg-wrapper .breadcrumb > li a,
.mg-wrapper .breadcrumb > li i {
	color: #98aeb5;
}

.mg-wrapper .breadcrumb > li a:hover, .mg-wrapper .breadcrumb > li a:focus, .mg-wrapper .breadcrumb > li a:active,
.mg-wrapper .breadcrumb > li i:hover,
.mg-wrapper .breadcrumb > li i:focus,
.mg-wrapper .breadcrumb > li i:active {
	text-decoration: underline;
}

.mg-wrapper .breadcrumb > li + li:before {
	padding: 0 5px;
	color: #b5c5cb;
	content: "/\00a0";
}

.mg-wrapper .page-header .top-menu .nav-menu .navbar-nav {
	margin-left: 5px;
}

.mg-wrapper .breadcrumb > .active {
	color: #a7bac0;
}

.mg-wrapper .page-content {
	background: #eff3f8;
	padding: 15px 0 15px;
}

.mg-wrapper .page-prefooter {
	padding: 30px 0;
	clear: both;
}

.mg-wrapper .page-prefooter h2 {
	font-weight: 700;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0 0 12px;
}

.mg-wrapper .page-prefooter .subscribe-form {
	padding-top: 5px;
}

.mg-wrapper .page-prefooter .subscribe-form .form-control {
	font-size: 12px;
	padding: 0 14px;
	height: 36px;
}

.mg-wrapper .page-prefooter .subscribe-form .btn {
	height: 34px;
	text-transform: uppercase;
	padding: 7px 16px;
}

.mg-wrapper .page-prefooter .social-icons {
	padding-top: 9px;
}

.mg-wrapper .page-prefooter .social-icons li {
	opacity: 0.35;
	filter: alpha(opacity=35);
}

.mg-wrapper .page-prefooter .social-icons li:hover {
	opacity: 1;
	filter: alpha(opacity=100);
}

.mg-wrapper .page-prefooter p,
.mg-wrapper .page-prefooter address {
	margin: 0;
}

.mg-wrapper .page-footer {
	font-size: 12px;
	font-weight: 300;
	padding: 17px 0;
}

.mg-wrapper .scroll-to-top {
	padding: 2px;
	text-align: center;
	position: fixed;
	z-index: 10001;
	bottom: 5px;
	display: none;
	right: 20px;
}

.mg-wrapper .scroll-to-top > i {
	display: inline-block;
	font-size: 32px;
	opacity: 0.7;
	filter: alpha(opacity=70);
}

.mg-wrapper .scroll-to-top:hover {
	cursor: pointer;
}

.mg-wrapper .scroll-to-top:hover > i {
	opacity: 1;
	filter: alpha(opacity=100);
}

.mg-wrapper .btn-theme-panel {
	margin-top: 25px;
}

.mg-wrapper .btn-theme-panel .btn {
	opacity: 0.6;
	filter: alpha(opacity=60);
	padding: 0 6px;
}

.mg-wrapper .btn-theme-panel .btn > i {


imation.FadeInCompleted += OnFadeInCompleted;
            uiFadeAnimation.FadeOutCompleted += OnFadeOutCompleted;
        }

        private void Start()
        {
            Show();
        }

        private void OnDestroy()
        {
            uiFadeAnimation.FadeInCompleted -= OnFadeInCompleted;
            uiFadeAnimation.FadeOutCompleted -= OnFadeOutCompleted;
        }

        private void OnFadeInCompleted()
        {
            StartCoroutine(HideAfterSomeTime());
        }

        private void OnFadeOutCompleted()
        {
            Destroy(gameObject);
        }

        private IEnumerator HideAfterSomeTime()
        {
            yield return new WaitForSeconds(seconds);

            Hide();

            TimeUp?.Invoke();
        }
    }
}


erride
  Map<String, dynamic> toJson() =>
      _$ARKitLineToJson(this)..addAll({'dartType': 'ARKitLine'});
}
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'arkit_geometry.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

ARKitUnkownGeometry _$ARKitUnkownGeometryFromJson(Map json) =>
    ARKitUnkownGeometry(
      json['geometryType'] as String?,
    );

Map<String, dynamic> _$ARKitUnkownGeometryToJson(ARKitUnkownGeometry instance) {
  final val = <String, dynamic>{};

  void writeNotNull(String key, dynamic value) {
    if (value != null) {
      val[key] = value;
    }
  }

  writeNotNull('geometryType', instance.geometryType);
  return val;
}
enum ARKitColorMask {
  none,
  red,
  green,
  blue,
  alpha,
  all,
}
enum ARKitCullMode {
  back,
  front,
}
enum ARKitFillMode {
  fill,
  lines,
}

import 'package:arkit_plugin/src/utils/json_converters.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:json_annotation/json_annotation.dart';

part 'arkit_material_property.g.dart';

/// The contents of a ARKitMaterial slot
/// This can be used to specify the various properties of SCNMaterial slots such as diffuse, ambient, etc.
abstract class ARKitMaterialProperty {
  const ARKitMaterialProperty._(this.type);

  /// Specifies the receiver's color.
  static ARKitMaterialColor color(Color color) => ARKitMaterialColor(color);

  /// Specifies the receiver's image.
  /// It might be either a name of an image stored in native iOS project or
  /// a full path to the file in the Flutter folder (/assets/image/img.jpg)
  /// or URL
  /// or base64 string (highly not recommended due to potential performance issues)
  static ARKitMaterialImage image(String image) => ARKitMaterialImage(image);

  /// Floating value between 0 and 1 (NSNumber) for metalness and roughness properties
  static ARKitMaterialValue value(double value) => ARKitMaterialValue(value);

  /// Specifies the receiver's video.
  static ARKitMaterialVideo video({
    required int width,
    required int height,
    String? filename,
    String? url,
    bool? autoplay = true,
  }) =>
      ARKitMaterialVideo(
        filename: filename,
        url: url,
        width: width,
        height: height,
        autoplay: autoplay ?? true,
      );

  final String type;

  static ARKitMaterialProperty fromJson(Map<String, dynamic> json) {
    final type = json['type'].toString();
    switch (type) {
      case 'color':
        return ARKitMaterialColor.fromJson(json);
      case 'image':
        return ARKitMaterialImage.fromJson(json);
      case 'value':
        return ARKitMaterialValue.fromJson(json);
      case 'video':
        return ARKitMaterialVideo.fromJson(json);
    }
    throw Exception('Could not parse material: $json');
  }

  Map<String, dynamic> toJson();
}

/// Specifies the receiver's color.
@JsonSerializable()
class ARKitMaterialColor extends ARKitMaterialProperty {
  const ARKitMaterialColor(this.color) : super._('color');

  @ColorConverter()
  final Color color;

  static ARKitMaterialColor fromJson(Map<String, dynamic> json) =>
      _$ARKitMaterialColorFromJson(json);

  @override
  Map<String, dynamic> toJson() => _$ARKitMaterialColorTo


sageOverrides map[typeutil.TypeName]errortypes.ErrorType

	// Heuristics controls heuristic passes
	Heuristics HeuristicPass

	// Trace controls result output
	Trace *regexp.Regexp
}

// DefaultOptions returns a [Options] struct initialized with default values.
func DefaultOptions() *Options {
	return &Options{ // Default options
		UsageOverrides: nil,
		Heuristics:     HeuristicAll,
		Trace:          nil,
	}
}
// Copyright 2025 Oliver Eikemeier. All Rights Reserved.
//
// 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.
//
// SPDX-License-Identifier: Apache-2.0

package detect

import (
	"go/types"
	"log"

	"fillmore-labs.com/errortype/internal/errortypes"
	"fillmore-labs.com/errortype/internal/typeutil"
)

func (p pass) processOverrides(overrides map[typeutil.TypeName]errortypes.ErrorType) {
	for tn, property := range p.PropertyMap {
		typeName := typeutil.NewTypeName(tn)

		usage, ok := overrides[typeName]
		if !ok {
			continue
		}

		// Check whether the override is valid.
		switch usage {
		case errortypes.PointerType:
			ptrType := types.NewPointer(tn.Type())
			if !typeutil.HasErrorMethod(ptrType) {
				log.Printf("Pointer override \"*%s\" does not implement the error interface", typeName)

				continue
			}
			property |= PointerOverride

		case errortypes.ValueType:
			if !typeutil.HasErrorMethod(tn.Type()) {
				log.Printf("Value override \"%s\" does not implement the error interface", typeName)

				continue
			}
			property |= ValueOverride

		case errortypes.SuppressType:
			property |= SuppressOverride

		default: // should not happen
			continue
		}

		p.PropertyMap[tn] = property
	}
}
// Copyright 2025 Oliver Eikemeier. All Rights Reserved.
//
// 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.
//
// SPDX-License-Identifier: Apache-2.0

package report

import "go/types"

// CheckStyle reports a diagnostic if the target of an errors.As-style function is not an address operation on a variable, suggesting a proper syntax.
func (r ErrorsAs) CheckStyle(tn types.Type) {
	if _, ok := r.varID(); ok {
		return
	}

	fname := r.funName()

	pkg := r.Pkg
	qf := func(other *types.Package) string {
		if other == pkg {
			return ""
		}

		return other.Name()
	}

	tname := types.TypeString(tn, qf)

	r.ReportRangef(r.Expr, `Target is not an address operation on a variable, use "var target %s; ... %s(err, &target)" instead. (et:sty)`,
		tname, fname)
}
// Copyright 2025 Oliver Eikemeier. All Rights


  --border-btn: 1px;
  --tab-border: 1px;
  --p: 0.336799 0 0;
  --s: 0.336799 0 0;
  --a: 0.336799 0 0;
  --b1: 0 0 0;
  --b2: 0.191251 0 0;
  --b3: 0.268618 0 0;
  --bc: 0.876096 0 0;
  --n: 0.336799 0 0;
  --in: 0.452014 0.313214 264.052021;
  --su: 0.519752 0.176858 142.495339;
  --wa: 0.967983 0.211006 109.769232;
  --er: 0.627955 0.257683 29.233885;
  --rounded-box: 0;
  --rounded-btn: 0;
  --rounded-badge: 0;
  --animation-btn: 0;
  --animation-input: 0;
  --btn-focus-scale: 1;
  --tab-radius: 0;
}

[data-theme=luxury] {
  color-scheme: dark;
  --pc: 0.2 0 0;
  --sc: 0.855163 0.012821 261.069149;
  --ac: 0.873349 0.010348 338.82597;
  --inc: 0.158122 0.024356 237.133883;
  --suc: 0.156239 0.038579 132.154381;
  --wac: 0.172255 0.027305 102.89115;
  --erc: 0.143506 0.035271 22.568916;
  --rounded-box: 1rem;
  --rounded-btn: 0.5rem;
  --rounded-badge: 1.9rem;
  --animation-btn: 0.25s;
  --animation-input: .2s;
  --btn-focus-scale: 0.95;
  --border-btn: 1px;
  --tab-border: 1px;
  --tab-radius: 0.5rem;
  --p: 1 0 0;
  --s: 0.275815 0.064106 261.069149;
  --a: 0.366744 0.051741 338.82597;
  --n: 0.2427 0.057015 59.825019;
  --nc: 0.932033 0.089631 90.861683;
  --b1: 0.140765 0.004386 285.822869;
  --b2: 0.202191 0.004211 308.22937;
  --b3: 0.298961 0.003818 308.318612;
  --bc: 0.756879 0.123666 76.890484;
  --in: 0.790612 0.121778 237.133883;
  --su: 0.781197 0.192894 132.154381;
  --wa: 0.861274 0.136524 102.89115;
  --er: 0.717531 0.176357 22.568916;
}

[data-theme=dracula] {
  color-scheme: dark;
  --b2: 0.268053 0.020556 277.508664;
  --b3: 0.247877 0.019009 277.508664;
  --pc: 0.150922 0.036614 346.812432;
  --sc: 0.148405 0.029709 301.883095;
  --ac: 0.166785 0.024826 66.558491;
  --nc: 0.878891 0.006515 275.524078;
  --inc: 0.176526 0.018676 212.846491;
  --suc: 0.174199 0.043903 148.024881;
  --wac: 0.191068 0.026849 112.757109;
  --erc: 0.136441 0.041266 24.430965;
  --


l, "to be contained in the list of expected goroutine IDs", matcher.expectedGoids())
}

// NegatedFailureMessage returns a negated failure message if the actual
// goroutine actually is in the set of goroutines to be ignored.
func (matcher *ignoringGoroutinesMatcher) NegatedFailureMessage(actual any) (message string) {
	return format.Message(actual, "not to be contained in the list of expected goroutine IDs", matcher.expectedGoids())
}

// expectedGoids returns the sorted list of expected goroutine IDs.
func (matcher *ignoringGoroutinesMatcher) expectedGoids() []uint64 {
	ids := make([]uint64, 0, len(matcher.ignoreGoids))
	for id := range matcher.ignoreGoids {
		ids = append(ids, id)
	}
	sort.Sort(Uint64Slice(ids))
	return ids
}
package ghttp_test

import (
	"bytes"
	"io"
	"net/http"
	"net/url"
	"regexp"

	"github.com/onsi/gomega/gbytes"
	"github.com/onsi/gomega/ghttp/protobuf"
	"github.com/onsi/gomega/internal/gutil"
	"google.golang.org/protobuf/proto"

	. "github.com/onsi/ginkgo/v2"
	. "github.com/onsi/gomega"
	. "github.com/onsi/gomega/ghttp"
)

var _ = Describe("TestServer", func() {
	var (
		resp *http.Response
		err  error
		s    *Server
	)

	BeforeEach(func() {
		s = NewServer()
	})

	AfterEach(func() {
		s.Close()
	})

	Describe("Resetting the server", func() {
		BeforeEach(func() {
			s.RouteToHandler("GET", "/", func(w http.ResponseWriter, req *http.Request) {})
			s.AppendHandlers(func(w http.ResponseWriter, req *http.Request) {})
			http.Get(s.URL() + "/")

			Expect(s.ReceivedRequests()).Should(HaveLen(1))
		})

		It("clears all handlers and call counts", func() {
			s.Reset()
			Expect(s.ReceivedRequests()).Should(HaveLen(0))
			Expect(func() { s.GetHandler(0) }).Should(Panic())
		})
	})

	Describe("closing client connections", func() {
		It("closes", func() {
			s.RouteToHandler("GET", "/",
				func(w http.ResponseWriter, req *http.Request) {
					io.WriteString(w, req.RemoteAddr)
				},
			)
			client := http.Client{Transport: &http.Transport{DisableKeepAlives: true}}
			resp, err := client.Get(s.URL())
			Expect(err).ShouldNot(HaveOccurred())
			Expect(resp.StatusCode).Should(Equal(200))

			body, err := gutil.ReadAll(resp.Body)
			resp.Body.Close()
			Expect(err).ShouldNot(HaveOccurred())

			s.CloseClientConnections()

			resp, err = client.Get(s.URL())
			Expect(err).ShouldNot(HaveOccurred())
			Expect(resp.StatusCode).Should(Equal(200))

			body2, err := gutil.ReadAll(resp.Body)
			resp.Body.Close()
			Expect(err).ShouldNot(HaveOccurred())

			Expect(body2).ShouldNot(Equal(body))
		})
	})

	Describe("closing server multiple times", func() {
		It("should not fail", func() {
			s.Close()
			Expect(s.Close).ShouldNot(Panic())
		})
	})

	Describe("allowing unhandled requests", func() {
		It("is not permitted by default", func() {
			Expect(s.GetAllowUnhand


) {
    rminfo.name = room.name;
    rminfo.width = room.width;
    rminfo.height = room.height;
    rminfo.wcell = room.wcell;
  }
  if (contains(what, "settings")) {
    rminfo.name = room.name;
    rminfo.width = room.width;
    rminfo.height = room.height;
    rminfo.wcell = room.wcell;
    rminfo.terrainTilesheets = room.terrainTilesheets;
    rminfo.itemsTilesheet = room.itemsTilesheet;
    rminfo.actorsTilesheet = room.actorsTilesheet;
  }
  if (contains(what, "terrainlayers")) {
    rminfo.terrainlayers = room.terrainlayers;
  }
  if (contains(what, "zones")) {
    rminfo.zones = room.zones;
  }
  if (contains(what, "items")) {
    rminfo.items = room.items;
  }
  if (contains(what, "actors")) {
    rminfo.actors = room.actors;
  }

  return rminfo;
}

function AllRoomIDs(rooms:RoomsMap):string[] {
  let ids:string[] = [];
  for (const id of Object.keys(rooms)) {
    ids.push(id);
  }
  return ids;
}

export {
  Room,
  RoomsMap,
  RoomInfoReq,
  RoomInfo,
  IsRoomInfoReq,
  LoadRoomsData,
  CreateRoomInfo,
  AllRoomIDs,
};

import Hubot, { TextMessage } from "hubot"
import { Robot } from "hubot/es2015"

export type ResponseType = "send" | "reply"

export class TestBotContext {
  public readonly replies: string[] = []
  public readonly sends: string[] = []

  constructor(
    public readonly robot: Hubot.Robot,
    public readonly user: Hubot.User
  ) {
    this.robot.adapter.on("reply", (_, strings) => {
      this.replies.push(strings.join("\n"))
    })

    this.robot.adapter.on("send", (_, strings) => {
      this.sends.push(strings.join("\n"))
    })
  }

  async sendAndWaitForResponse(message: string, responseType: ResponseType = "reply") {
    return new Promise<string>(done => {
      this.robot.adapter.once(responseType, function (_, strings) {
        done(strings[0])
      })

      this.send(message)
    })
  }

  async send(message: string) {
    const id = (Math.random() + 1).toString(36).substring(7)
    const textMessage = new TextMessage(this.user, message, id)
    this.robot.adapter.receive(textMessage)
    await this.wait(1)
  }

  async wait(ms: number) {
    return new Promise<void>(done => {
      setTimeout(() => done(), ms)
    })
  }

  shutdown(): void {
    this.robot.shutdown()
  }
}

export type TestBotSettings = {
  name?: string
  alias?: string
  logLevel?: string
  testUserName?: string
}

export async function createTestBot(settings: TestBotSettings | null = null): Promise<TestBotContext> {
  process.env["HUBOT_LOG_LEVEL"] = settings?.logLevel || "error"

  return new Promise<TestBotContext>(async done => {
    // create new robot, without http, using the mock adapter
    const botName = settings?.name || "hubot"
    const botAlias = settings?.alias || null
    const robot = new Robot("hubot-mock-adapter", false, botName, botAlias)

    await robot.loadAdapter()

    robot.adapter.on("connected", () => {
      // create a user
      const user = robot.brain.userForId("1", {
        name: settings?.testUserName || "mocha",
        room: "#mocha"
      })

      const context =


right { height: 100%; position: relative; overflow: hidden; display: flex !important; }
div.fullscreen_wrapper .viewer_wrapper .right .code_wrapper_fullscreen_resizable { height: 100% !important; max-height: 100% !important; }
div.fullscreen_wrapper .viewer_wrapper .right .action_buttons { position: absolute; bottom: 10px; left: 0px; right: 0px; padding: 0px 10px; z-index: 123; }
div.fullscreen_wrapper .viewer_wrapper .right .output_container_right { border-bottom: 1px solid rgb(210, 210, 214); position: relative; margin: 33px 0px 0px !important; }
div.fullscreen_wrapper .viewer_wrapper .right .output_container_right > span > div { z-index: 123; position: static !important; min-height: 100% !important; }
div.fullscreen_wrapper .viewer_wrapper .right .output_container_right > span > div > .ReactTabs { height: 100%; overflow: hidden; }
div.fullscreen_wrapper .viewer_wrapper .right .output_container_right > span > div > .ReactTabs ul.ReactTabs__TabList { overflow: auto hidden; display: flex; flex-wrap: nowrap; }
div.fullscreen_wrapper .viewer_wrapper .right .output_container_right > span > div > .ReactTabs > .ReactTabs__TabPanel { height: calc(100% - 45px); }
div.fullscreen_wrapper .viewer_wrapper .right .output_container_right::before { content: ""; position: absolute; height: calc(100% - 35px); width: 1px; top: 35px; bottom: 0px; left: 0px; background-color: rgb(160, 160, 168); }
div.fullscreen_wrapper .viewer_wrapper .right .output_container_right::after { content: ""; position: absolute; height: calc(100% - 35px); width: 1px; top: 35px; bottom: 0px; right: 0px; background-color: rgb(160, 160, 168); }
div.fullscreen_wrapper .output_at_right { height: 100% !important; }
div.fullscreen_wrapper .output_at_right > div { height: 100%; }
div.fullscreen_wrapper .output_at_right > div > div { height: 100% !important; }
div.fullscreen_wrapper .code_playground_container { width: 97%; }
.output_icon { width: 20px; height: 20px; display: block; }
.output_icon rect { fill: transparent; }
.output_icon g { fill: rgb(91, 91, 106); }
.output_icon g rect { fill: rgb(91, 91, 106) !important; }
.output_icon path { fill: rgb(91, 91, 106); }
.btn.btn-close { border: none; background: transparent; padding: 0px; display: block; margin-left: auto; margin-right: 5px; color: rgb(0, 0, 0); }
.btn.btn-close svg { transition: all 0.2s ease 0s; cursor: pointer; }
.btn.btn-close svg:hover { stroke: rgb(85, 83, 255); }
.btn.btn-close:active, .btn.btn-close:hover, .btn.btn-close:focus { outline: none; background: transparent; box-shadow: none; }
.btn.btn-close > i { font-size: 20px; }
.fullHeight { height: 100%; }
.cvzEyH { padding: 0px 20px; margin: 2em 0px 0px; position: relative; }
.hacCmV { display: block; }
.hacCmV .widget { z-index: 1; position: relative; }
.ienRZE { margin-top: 40px


\u4e3a\u4e00\u4e2a\u81ea\u89c9\u7684\u3001\u7528\u6bdb\u6cfd\u4e1c\u601d\u60f3\u6b66\u88c5\u8d77\u6765\u7684\u3001\u6c38\u8fdc\u5fe0\u4e8e\u4ee5\u6bdb\u4e3b\u5e2d\u4e3a\u4ee3\u8868\u7684\u65e0\u4ea7\u9636\u7ea7\u9769\u547d\u8def\u7ebf\u7684\u575a\u5f3a\u6218\u58eb\uff0c\u5728\u4fdd\u536b\u65e0\u4ea7\u9636\u7ea7\u6587\u5316\u5927\u9769\u547d\u7684\u4f1f\u5927\u6597\u4e89\u4e2d\uff0c\u4e3a\u4eba\u6c11\u7acb\u65b0\u529f\uff01", "type": "paragraph"}, {"text": "\uff08\u539f\u8f7d\u300a\u89e3\u653e\u519b\u62a5\u300b1967\u5e743\u670814\u65e5\uff09", "type": "appellation"}, {"text": "\u6765\u6e90\uff1a", "type": "source"}, {"text": "\u539f\u8f7d\u300a\u89e3\u653e\u519b\u62a5\u300b1967\u5e743\u670814\u65e5", "type": "paragraph"}]}
  </script>

    [返回索引页面]

   三论提倡一个“公”字

   日期：1967-3-14 作者：《解放军报》编辑部社论

   《解放军报》编辑部社论

   无产阶级文化大革命，是一场触及人们灵魂的、破私立公的思想大革命。毛主席说：“这个运动规模很大，确实把群众发动起来了，对全国人民的思想革命化有


 tc.want {
				t.Errorf("interpolateWeightFor() = %d, %v, want %d, nil", weight, err, tc.want)
			}
		})
	}
}
/*
Copyright 2025 The KubeFleet 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 membercluster

import (
	"k8s.io/apimachinery/pkg/api/meta"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

	fleetv1beta1 "go.goms.io/fleet/apis/placement/v1beta1"
	"go.goms.io/fleet/pkg/utils/condition"
)

// isPlacementFullyScheduled returns whether a placement is fully scheduled.
func isPlacementFullyScheduled(placement fleetv1beta1.PlacementObj) bool {
	// Check the scheduled condition on the placement to determine if it is fully scheduled.
	//
	// Here the controller checks the status rather than listing all the bindings and verify
	// if the count matches with the placement spec as the former approach has less overhead and
	// (more importantly) avoids leaking scheduler-specific logic into this controller. The
	// trade-off is that the controller may consider some fully scheduled placements as not fully
	// scheduled, if the placement-side controller(s) cannot update the placement status in a timely
	// manner.

	var scheduledCondition *metav1.Condition
	if placement.GetNamespace() == "" {
		// Find CRP scheduled condition.
		scheduledCondition = meta.FindStatusCondition(placement.GetPlacementStatus().Conditions, string(fleetv1beta1.ClusterResourcePlacementScheduledConditionType))
	} else {
		// Find RP scheduled condition.
		scheduledCondition = meta.FindStatusCondition(placement.GetPlacementStatus().Conditions, string(fleetv1beta1.ResourcePlacementScheduledConditionType))
	}
	// Check if the placement is fully scheduled, or its scheduled condition is out of date.
	return condition.IsConditionStatusTrue(scheduledCondition, placement.GetGeneration())
}

// classifyPlacements returns a list of placements that are affected by cluster side changes in case 1a) and
// 1b).
func classifyPlacements(placements []fleetv1beta1.PlacementObj) (toProcess []fleetv1beta1.PlacementObj) {
	// Pre-allocate array.
	toProcess = make([]fleetv1beta1.PlacementObj, 0, len(placements))

	for idx := range placements {
		placement := placements[idx]
		switch {
		case placement.GetPlacementSpec().Policy == nil:
			// Placements with no placement policy specified are considered to be of the PickAll placement
			// type and are affected by cluster side changes in case 1a) and 1b).
			toProcess = append(toProcess, placement)
		case placement.GetPlacementSpec().Policy.PlacementType == fleetv1beta1.PickFixedPlacementType:
			if !isPlacementFullyScheduled(placement) {
				// Any Placement with an non-empty list of target cluster names can be affected by cluster
				// side changes in case 1b), if it is not yet fully scheduled.
				toProcess = append(toProcess, placement)
			}
		case placement.GetPlacementSpec().Policy.PlacementType == fleetv1beta1.PickAllPlacementType:
			// Placemen


w number of items.
	query := `
		{
			me(func: uid(0x01)) {
				name
				gender
				friend(first:-1, offset:0) @filter(anyofterms(name, "Andrea") or anyofterms(name, "Glenn Rhee") or anyofterms(name, "Daryl Dixon")) {
					name
				}
			}
		}
	`

	js := processQueryNoErr(t, query)
	require.JSONEq(t,
		`{"data": {"me":[{"friend":[{"name":"Andrea"}],"gender":"female","name":"Michonne"}]}}`,
		js)
}

func TestToFastJSONFilterNot1(t *testing.T) {

	query := `
		{
			me(func: uid(0x01)) {
				name
				gender
				friend @filter(not anyofterms(name, "Andrea rick")) {
					name
				}
			}
		}
	`

	js := processQueryNoErr(t, query)
	require.JSONEq(t,
		`{"data": {"me":[{"gender":"female","name":"Michonne","friend":[{"name":"Glenn Rhee"},{"name":"Daryl Dixon"}]}]}}`, js)
}

func TestToFastJSONFilterNot2(t *testing.T) {

	query := `
		{
			me(func: uid(0x01)) {
				name
				gender
				friend @filter(not anyofterms(name, "Andrea") and anyofterms(name, "Glenn Andrea")) {
					name
				}
			}
		}
	`

	js := processQueryNoErr(t, query)
	require.JSONEq(t,
		`{"data": {"me":[{"gender":"female","name":"Michonne","friend":[{"name":"Glenn Rhee"}]}]}}`, js)
}

func TestToFastJSONFilterNot3(t *testing.T) {

	query := `
		{
			me(func: uid(0x01)) {
				name
				gender
				friend @filter(not (anyofterms(name, "Andrea") or anyofterms(name, "Glenn Rick Andrea"))) {
					name
				}
			}
		}
	`

	js := processQueryNoErr(t, query)
	require.JSONEq(t,
		`{"data": {"me":[{"gender":"female","name":"Michonne","friend":[{"name":"Daryl Dixon"}]}]}}`, js)
}

func TestToFastJSONFilterNot4(t *testing.T) {

	query := `
		{
			me(func: uid(0x01)) {
				name
				gender
				friend (first:2) @filter(not anyofterms(name, "Andrea")
				and not anyofterms(name, "glenn")
				and not anyofterms(name, "rick")
			) {
					name
				}
			}
		}
	`

	js := processQueryNoErr(t, query)
	require.JSONEq(t,
		`{"data": {"me":[{"gender":"female","name":"Michonne","friend":[{"name":"Daryl Dixon"}]}]}}`, js)
}

// TestToFastJSONFilterNot4 was unstable (fails observed locally and on travis).
// Following method repeats the query to make sure that it never fails.
// It's commented out, because it's too slow for everyday testing.
/*
func TestToFastJSONFilterNot4x1000000(t *testing.T) {

	for i := 0; i < 1000000; i++ {
		query := `
		{
			me(func: uid(0x01)) {
				name
				gender
				friend (first:2) @filter(not anyofterms(name, "Andrea")
				and not anyofterms(name, "glenn")
				and not anyofterms(name, "rick")
			) {
				name
			}
		}
	}
	`

		js := processQueryNoErr(t, query)
		require.


orth waking up for!",
    image: "/images/products/full/Jurien-Bay-Jetty-Up.jpg",
    thumb: "/images/products/thumb/Jurien-Bay-Jetty-Up.jpg",
    thumb2x: "/images/products/thumb/Jurien-Bay-Jetty-Up@2x.jpg",
    featured: false,
    dateCreated: "2018-05-22T07:12:39+08:00",
    gps: {
      lat: -30.30223833333333,
      lng: 115.03572666666666,
    },
  },
  {
    title: "Jurien Bay Jetty Down",
    description:
      "Another one of the new Jurien Bay jetty at sunrise. This one of it facing down. It just looks beautiful at this time of the day.",
    image: "/images/products/full/Jurien-Bay-Jetty-Down.jpg",
    thumb: "/images/products/thumb/Jurien-Bay-Jetty-Down.jpg",
    thumb2x: "/images/products/thumb/Jurien-Bay-Jetty-Down@2x.jpg",
    featured: true,
    dateCreated: "2018-05-22T07:13:48+08:00",
    gps: {
      lat: -30.30200333333333,
      lng: 115.03592,
    },
  },
  {
    title: "Old Jurien Bay Jetty Horizontal",
    description:
      "Heres a rather nice shot of the old jetty of Jurien Bay. Again this shot was taken at sunrise leading to stunning lighting on the water and sand.",
    image: "/images/products/full/Old-Jurien-Bay-Jetty-Horizontal.jpg",
    thumb: "/images/products/thumb/Old-Jurien-Bay-Jetty-Horizontal.jpg",
    thumb2x: "/images/products/thumb/Old-Jurien-Bay-Jetty-Horizontal@2x.jpg",
    featured: true,
    dateCreated: "2018-05-22T07:16:04+08:00",
    gps: {
      lat: -30.300678333333334,
      lng: 115.03743666666666,
    },
  },
  {
    title: "Sunrise over Old Jurien Bay Jetty",
    description:
      "A front-on shot of the old jetty at Jurien Bay. I didnt want to disturb that seagull, he looked like he as enjoying the sunrise as much as I was ;)",
    image: "/images/products/full/Sunrise-over-Old-Jurien-Bay-Jetty.jpg",
    thumb: "/images/products/thumb/Sunrise-over-Old-Jurien-Bay-Jetty.jpg",
    thumb2x: "/images/products/thumb/Sunrise-over-Old-Jurien-Bay-Jetty@2x.jpg",
    featured: false,
    dateCreated: "2018-05-22T07:18:10+08:00",
    gps: {
      lat: -30.300631666666668,
      lng: 115.03728333333333,
    },
  },
  {
    title: "Old Jurien Bay Jetty Vertical",
    description:
      "A different perspective on the old Jurien Bay jetty. Im not sure if I prefer this one or the horizontal one. ",
    image: "/images/products/full/Old-Jurien-Bay-Jetty-Vertical.jpg",
    thumb: "/images/products/thumb/Old-Jurien-Bay-Jetty-Vertical.jpg",
    thumb2x: "/images/products/thumb/Old-Jurien-Bay-Jetty-Vertical@2x.jpg",
    featured: true,
    dateCreated: "2018-05-22T07:19:34+08:00",
    gps: {
      lat: -30.300675,
      lng: 115.03743833333333,
    },
  },
  {
    title: "Jurien Bay Dolphin",
    description:
      "It seems like wherever I go droning or fishing in WA theres bound to be dolphins about. Jurien Bay is no exception with this guy splashing in the


t V, node: &ast::If) {
    node.test.accept(visitor);
    for e in &node.body {
        e.accept(visitor);
    }
    for e in &node.orelse {
        e.accept(visitor);
    }
}

pub fn walk_with<V: Visitor>(visitor: &mut V, node: &ast::With) {
    for e in &node.items {
        e.context_expr.accept(visitor);
        if let Some(e) = &e.optional_vars {
            e.accept(visitor);
        }
    }
    for e in &node.body {
        e.accept(visitor);
    }
}

pub fn walk_async_with<V: Visitor>(visitor: &mut V, node: &ast::AsyncWith) {
    walk_with(visitor, node);
}

pub fn walk_raise<V: Visitor>(visitor: &mut V, node: &ast::Raise) {
    if let Some(e) = &node.exc {
        e.accept(visitor);
    }
    if let Some(e) = &node.cause {
        e.accept(visitor);
    }
}

pub fn walk_try<V: Visitor>(visitor: &mut V, node: &ast::Try) {
    for e in &node.body {
        e.accept(visitor);
    }
    for hdl in &node.handlers {
        if let Some(e) = &hdl.typ {
            e.accept(visitor);
        }
        for e in &hdl.body {
            e.accept(visitor);
        }
    }
    for e in &node.orelse {
        e.accept(visitor);
    }
    for e in &node.finalbody {
        e.accept(visitor);
    }
}

pub fn walk_assert<V: Visitor>(visitor: &mut V, node: &ast::Assert) {
    node.test.accept(visitor);
    if let Some(e) = &node.msg {
        e.accept(visitor);
    }
}

pub fn walk_import<V: Visitor>(_visitor: &mut V, _node: &ast::Import) {}

pub fn walk_import_from<V: Visitor>(_visitor: &mut V, _node: &ast::ImportFrom) {}

pub fn walk_global<V: Visitor>(_visitor: &mut V, _node: &ast::Global) {}

pub fn walk_nonlocal<V: Visitor>(_visitor: &mut V, _node: &ast::Nonlocal) {}

pub fn walk_expr<V: Visitor>(visitor: &mut V, node: &ast::Expr) {
    node.value.accept(visitor);
}

pub fn walk_pass<V: Visitor>(_visitor: &mut V, _node: &ast::Pass) {}

pub fn walk_break<V: Visitor>(_visitor: &mut V, _node: &ast::Break) {}

pub fn walk_continue<V: Visitor>(_visitor: &mut V, _node: &ast::Continue) {}

pub fn walk_bool_op<V: Visitor>(visitor: &mut V, node: &ast::BoolOp) {
    node.left.accept(visitor);
    node.right.accept(visitor);
}

pub fn walk_bin_op<V: Visitor>(visitor: &mut V, node: &ast::BinOp) {
    node.left.accept(visitor);
    node.right.accept(visitor);
}

pub fn walk_unary_op<V: Visitor>(visitor: &mut V, node: &ast::UnaryOp) {
    node.operand.accept(visitor);
}

pub fn walk_lambda<V: Visitor>(visitor: &mut V, node: &ast::Lambda) {
    walk_arguments(visitor, &node.args);
    node.body.accept(visitor);
}

pub fn walk_if_exp<V: Visitor>(


final FSTMethod method : role.getClassFragment().getMethods()) {
				methods.add(method);
			}
		}

		setElementLines(content, fields, methods);

		for (final IMarker marker : markers) {
			if (!marker.exists()) {
				continue;
			}

			if (marker.getAttribute(IMarker.MESSAGE, "").startsWith("The import")) {
				propagateUnsupportedMarker(marker, file);
				continue;
			}
			final int markerLine = marker.getAttribute(IMarker.LINE_NUMBER, -1);
			if (markerLine == -1) {
				continue;
			}

			boolean propagated = false;
			for (final FSTField f : fields) {
				if (f.getEndLine() == -1) {
					continue;
				}
				final int composedLine = f.getComposedLine();
				if ((markerLine >= composedLine) && (markerLine <= (composedLine + (f.getEndLine() - f.getLine())))) {
					propagateMarker(marker, f.getFile(), (f.getLine() + markerLine) - composedLine);
					propagated = true;
					break;
				}
			}

			if (propagated) {
				continue;
			}

			for (final FSTMethod m : methods) {
				if (m.getEndLine() == -1) {
					continue;
				}
				final int composedLine = m.getComposedLine();
				if ((markerLine >= composedLine) && (markerLine <= (composedLine + m.getMethodLength()))) {
					propagateMarker(marker, m.getFile(), (m.getLine() + markerLine) - m.getComposedLine());
					propagated = true;
					break;
				}
			}

			if (propagated) {
				continue;
			}

			propagateUnsupportedMarker(marker, file);
		}
	}

	// TODO refactor all occurrences of reading features of configurations
	private LinkedList<String> getSelectedFeatures(IFeatureProject featureProject) {
		if (featureProject == null) {
			return null;
		}

		final LinkedList<String> list = new LinkedList<>();
		final Path file = featureProject.getCurrentConfiguration();

		if ((file == null) || !Files.exists(file)) {
			return null;
		}

		final Collection<String> configurationFeatures = readFeaturesfromConfigurationFile(file);
		if (configurationFeatures == null) {
			return null;
		}

		final Collection<IFeature> features = Functional.toList(featureProject.getFeatureModel().getFeatures());
		for (final String confFeature : configurationFeatures) {
			for (final IFeature feature : features) {
				if (feature.getName().equals(confFeature)) {
					list.add(feature.getName());
				}
			}
		}
		return list;
	}

	private Collection<String> readFeaturesfromConfigurationFile(Path file) {
		final Configuration configuration = ConfigurationIO.getInstance().load(file);
		if (configuration != null) {
			return configuration.getSelectedFeatureNames();
		} else {
			return null;
		}
	}

	/**
	 * Propagates markers outside of methods and fields.
 Needs to be implemented by the Subclass.
	 */
	protected void propagateUnsupportedMarker(IMarker marker, IFile file) {
		FeatureHouseCorePlugin.getDefault().logInfo("Marker not propagated: " + marker.getAttribute(IMarker.MESSAGE, ""));
	}

	/**
	 * Sets the composed lines of the given fields and methods.
 Needs to be implemented by the Subclass.
	 *
	 * @param content The content of the composed file
	 */
	protected abstract void setElementLines(String content, LinkedList<FSTField> fields, LinkedList<FSTMethod> methods);

	/**
	 * Propagates the given marker to the given source line
	 *
	 * @param marker The marker to propagate
	 * @param file The features file
	 * @param line The marker line at the features f


io.InputStream
import java.nio.ByteBuffer

fun ResponseBody.withProgress(progressState: MutableStateFlow<Float>): ResponseBody {
	return ProgressResponseBody(this, progressState)
}

suspend fun Source.cancellable(): Source {
	val job = currentCoroutineContext()[Job]
	return CancellableSource(job, this)
}

suspend fun BufferedSink.writeAllCancellable(source: Source) = withContext(Dispatchers.IO) {
	writeAll(source.cancellable())
}

fun BufferedSource.readByteBuffer(): ByteBuffer {
	val bytes = readByteArray()
	return ByteBuffer.allocateDirect(bytes.size)
		.put(bytes)
		.rewind() as ByteBuffer
}

@Deprecated("")
fun InputStream.toByteBuffer(): ByteBuffer {
	val outStream = ByteArrayOutputStream(available())
	copyTo(outStream)
	val bytes = outStream.toByteArray()
	return ByteBuffer.allocateDirect(bytes.size).put(bytes).position(0) as ByteBuffer
}

fun FileSystem.isDirectory(path: Path) = try {
	metadataOrNull(path)?.isDirectory == true
} catch (_: IOException) {
	false
}

fun FileSystem.isRegularFile(path: Path) = try {
	metadataOrNull(path)?.isRegularFile == true
} catch (_: IOException) {
	false
}

@CheckResult
fun ContentResolver.openSource(uri: Uri): Source = checkNotNull(openInputStream(uri)) {
	"Cannot open input stream from $uri"
}.source()
package org.koitharu.kotatsu.core.util.ext

import android.os.Bundle
import androidx.core.view.MenuProvider
import androidx.core.view.ancestors
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentContainerView
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.coroutineScope

inline fun <T : Fragment> T.withArgs(size: Int, block: Bundle.() -> Unit): T {
	val b = Bundle(size)
	b.block()
	this.arguments = b
	return this
}

val Fragment.viewLifecycleScope
	inline get() = viewLifecycleOwner.lifecycle.coroutineScope

fun Fragment.addMenuProvider(provider: MenuProvider) {
	requireActivity().addMenuProvider(provider, viewLifecycleOwner, Lifecycle.State.RESUMED)
}

@Suppress("UNCHECKED_CAST")
tailrec fun <T> Fragment.findParentCallback(cls: Class<T>): T? {
	val parent = parentFragment
	return when {
		parent == null -> cls.castOrNull(activity)
		cls.isInstance(parent) -> parent as T
		else -> parent.findParentCallback(cls)
	}
}

val Fragment.container: FragmentContainerView?
	get() = view?.ancestors?.firstNotNullOfOrNull {
		it as? FragmentContainerView // TODO check if direct parent
	}
package org.koitharu.kotatsu.core.model.parcelable

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parceler
import kotlinx.parcelize.Parcelize
import org.koitharu.kotatsu.core.model.MangaSource
import org.koitharu.kotatsu.parsers.model.MangaChapter

@Parcelize
data class ParcelableChapter(
	val chapter: MangaChapter,
) : Parcelable {

	companion object : Parceler<ParcelableChapter> {

		override fun create(parcel: Parcel) = ParcelableChapter(
			MangaChapter(
				id = parcel.readLong(),
				title = parcel.readString(),
				number = parcel.readFloat(),
				volume = parcel.read


)
  BandwidthUpgradeNegotiationFrame_ClientIntroductionAck ensureClientIntroductionAck() => $_ensure(3);
}

class KeepAliveFrame extends $pb.GeneratedMessage {
  factory KeepAliveFrame() => create();
  KeepAliveFrame._() : super();
  factory KeepAliveFrame.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory KeepAliveFrame.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'KeepAliveFrame', package: const $pb.PackageName(_omitMessageNames ? '' : 'location.nearby.connections'), createEmptyInstance: create)
    ..aOB(1, _omitFieldNames ? '' : 'ack')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  KeepAliveFrame clone() => KeepAliveFrame()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  KeepAliveFrame copyWith(void Function(KeepAliveFrame) updates) => super.copyWith((message) => updates(message as KeepAliveFrame)) as KeepAliveFrame;

  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static KeepAliveFrame create() => KeepAliveFrame._();
  KeepAliveFrame createEmptyInstance() => create();
  static $pb.PbList<KeepAliveFrame> createRepeated() => $pb.PbList<KeepAliveFrame>();
  @$core.pragma('dart2js:noInline')
  static KeepAliveFrame getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<KeepAliveFrame>(create);
  static KeepAliveFrame? _defaultInstance;

  @$pb.TagNumber(1)
  $core.bool get ack => $_getBF(0);
  @$pb.TagNumber(1)
  set ack($core.bool v) { $_setBool(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasAck() => $_has(0);
  @$pb.TagNumber(1)
  void clearAck() => clearField(1);
}

class DisconnectionFrame extends $pb.GeneratedMessage {
  factory DisconnectionFrame() => create();
  DisconnectionFrame._() : super();
  factory DisconnectionFrame.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory DisconnectionFrame.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DisconnectionFrame', package: const $pb.PackageName(_omitMessageNames ? '' : 'location.nearby.connections'), createEmptyInstance: create)
    ..aOB(1, _omitFieldNames ? '' : 'requestSafeToDisconnect')
    ..aOB(2, _omitFieldNames ? '' : 'ackSafeToDisconnect')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  DisconnectionFrame clone() => DisconnectionFrame()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add


    public virtual void LogError(string data)
        {
            Log(LogLevel.Error, data);
        }

        public virtual void LogInformation(string data)
        {
            Log(LogLevel.Information, data);
        }

        public virtual void LogInformationSummary(string data)
        {
            Log(LogLevel.Information, data);
        }

        public virtual void LogMinimal(string data)
        {
            Log(LogLevel.Minimal, data);
        }

        public virtual void LogVerbose(string data)
        {
            Log(LogLevel.Verbose, data);
        }

        public virtual void LogWarning(string data)
        {
            Log(LogLevel.Warning, data);
        }

        /// <summary>
        /// True if the message meets the verbosity level.
        /// </summary>
        protected virtual bool DisplayMessage(LogLevel messageLevel)
        {
            return (messageLevel >= VerbosityLevel);
        }

        /// <summary>
        /// True if the message is an error or warning.
        /// </summary>
        protected virtual bool CollectMessage(LogLevel messageLevel)
        {
            return (messageLevel >= LogLevel.Warning);
        }
    }
}


ialog":{"clear":"ניקוי","highlight":"סימון","options":"אפשרויות צבע","selected":"בחירה","title":"בחירת צבע"},"colorbutton":{"auto":"אוטומטי","bgColorTitle":"צבע רקע","colors":{"000":"שחור","800000":"סגול כהה","8B4513":"חום בהיר","2F4F4F":"אפור צפחה","008080":"כחול-ירוק","000080":"כחול-סגול","4B0082":"אינדיגו","696969":"אפור מעומעם","B22222":"אדום-חום","A52A2A":"חום","DAA520":"כתום זהב","006400":"ירוק כהה","40E0D0":"טורקיז","0000CD":"כחול בינוני","800080":"סגול","808080":"אפור","F00":"אדום","FF8C00":"כתום כהה","FFD700":"זהב","008000":"ירוק","0FF":"ציאן","00F":"כחול","EE82EE":"סגלגל","A9A9A9":"אפור כהה","FFA07A":"כתום-וורוד","FFA500":"כתום","FFFF00":"צהוב","00FF00":"ליים","AFEEEE":"טורקיז בהיר","ADD8E6":"כחול בהיר","DDA0DD":"שזיף","D3D3D3":"אפור בהיר","FFF0F5":"לבנדר מסמיק","FAEBD7":"לבן עתיק","FFFFE0":"צהוב בהיר","F0FFF0":"טל דבש","F0FFFF":"תכלת","F0F8FF":"כחול טיפת מים","E6E6FA":"לבנדר","FFF":"לבן"},"more":"צבעים נוספים...","panelTitle":"צבעים","textColorTitle":"צבע טקסט"},"clipboard":{"copy":"העתקה","copyError":"הגדרות האבטחה בדפדפן שלך לא מאפשרות לעורך לבצע פעולות העתקה אוטומטיות. יש להשתמש במקלדת לשם כך (Ctrl/Cmd+C).","cut":"גזירה","cutError":"הגדרות האבטחה בדפדפן שלך לא מאפשרות לעורך לבצע פעולות גזירה אוטומטיות. יש להשתמש במקלדת לשם כך (Ctrl/Cmd+X).","paste":"הדבקה","pasteArea":"איזור הדבקה","pasteMsg":"נא להדביק בתוך הקופסה באמצעות (Ctrl/Cmd+V) וללחוץ על אישור.","securityMsg":"עקב הגדרות אבטחה בדפדפן, לא ניתן לגשת אל לוח הגזירים (Clipboard) בצורה ישירה. נא להדביק שוב בחלון זה.","title":"הדבקה"},"button":{"selectedLabel":"1% (סומן)"},"blockquote":{"toolbar":"בלוק ציטוט"},"bidi":{"ltr":"כיוון טקסט משמאל לימין (LTR)","rtl":"כיוון טקסט מימין לשמאל (


using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;

namespace CodingTimeTrackerForSteam
{
    internal static class Program
    {
        private static NotifyIcon _trayIcon;
        private static Process _steamProcess;
        private static System.Threading.Timer _editorCheckTimer;
        private static Process _gameProcess;

        [DllImport("user32.dll", CharSet = CharSet.Auto)]
        private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

        [DllImport("user32.dll")]
        private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);

        [DllImport("user32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        private static extern bool EnumWindows(EnumWindowsProc enumProc, IntPtr lParam);

        [DllImport("user32.dll", CharSet = CharSet.Auto)]
        private static extern int GetWindowTextLength(IntPtr hWnd);

        [DllImport("user32.dll", CharSet = CharSet.Auto)]
        private static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
        private static bool _isReady = false;

        private delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);

        private const int SwHide = 0;
        private const int SwShow = 5;

        private static readonly (string message, string title)[] _localizations =
        {
            ("You need to install Kode Studio from the Steam Store.", "Please install Kode Studio."),
            ("Вам необходимо установить Kode Studio из магазина Steam.", "Пожалуйста, установите Kode Studio."),
            ("Necesitas instalar Kode Studio desde la tienda de Steam.", "Por favor, instala Kode Studio."),
            ("Sie müssen Kode Studio aus dem Steam Store installieren.", "Bitte installieren Sie Kode Studio."),
            ("Vous devez installer Kode Studio depuis la boutique Steam.", "Veuillez installer Kode Studio."),
            ("Devi installare Kode Studio dal negozio Steam.", "Per favore, installa Kode Studio."),
            ("Você precisa instalar o Kode Studio na Loja Steam.", "Por favor, instale o Kode Studio."),
            ("게임 스토어에서 Kode Studio를 설치해야 합니다.", "Kode Studio를 설치하십시오."),
            ("您需要从 Steam 商店安装 Kode Studio。", "请安装 Kode Studio。"),
            ("您需要從 Steam 商店安裝 Kode Studio。", "請安裝 Kode Studio。"),
            ("Kode StudioはSteamストアからインストールする必要があります。", "Kode Studioをインストールしてください。"),
            ("Je moet Kode Studio vanuit de Steam-winkel installeren.", "Installeer Kode Studio alstublieft."),
            ("Du behöver installera Kode Studio från Steam-butiken.", "Vänligen installera Kode Studio."),
            ("Du skal installere Kode Studio fra Steam-butikken.", "Installer venligst Kode Studio."),
            ("Du må installere Kode Studio fra Steam-butikken.", "Venligst installer Kode Studio."),
            ("Sinun on asennettava Kode Studio Steam-kaupasta.", "Asenna Kode Studio."),
            (


github.com/pingcap-incubator/tinykv/scheduler/pkg/mock/mockoption"
	"github.com/pingcap-incubator/tinykv/scheduler/server/core"
	"github.com/pingcap/log"
	"go.uber.org/zap"
)

// Cluster is used to mock clusterInfo for test use.
type Cluster struct {
	*core.BasicCluster
	*mockid.IDAllocator
	*mockoption.ScheduleOptions
	ID uint64
}

// NewCluster creates a new Cluster
func NewCluster(opt *mockoption.ScheduleOptions) *Cluster {
	return &Cluster{
		BasicCluster:    core.NewBasicCluster(),
		IDAllocator:     mockid.NewIDAllocator(),
		ScheduleOptions: opt,
	}
}

func (mc *Cluster) allocID() (uint64, error) {
	return mc.Alloc()
}

// ScanRegions scans region with start key, until number greater than limit.
func (mc *Cluster) ScanRegions(startKey, endKey []byte, limit int) []*core.RegionInfo {
	return mc.Regions.ScanRange(startKey, endKey, limit)
}

// LoadRegion puts region info without leader
func (mc *Cluster) LoadRegion(regionID uint64, followerIds ...uint64) {
	//  regions load from etcd will have no leader
	r := mc.newMockRegionInfo(regionID, 0, followerIds...).Clone(core.WithLeader(nil))
	mc.PutRegion(r)
}

// GetStoreRegionCount gets region count with a given store.
func (mc *Cluster) GetStoreRegionCount(storeID uint64) int {
	return mc.Regions.GetStoreRegionCount(storeID)
}

// GetStore gets a store with a given store ID.
func (mc *Cluster) GetStore(storeID uint64) *core.StoreInfo {
	return mc.Stores.GetStore(storeID)
}

// AllocPeer allocs a new peer on a store.
func (mc *Cluster) AllocPeer(storeID uint64) (*metapb.Peer, error) {
	peerID, err := mc.allocID()
	if err != nil {
		log.Error("failed to alloc peer", zap.Error(err))
		return nil, err
	}
	peer := &metapb.Peer{
		Id:      peerID,
		StoreId: storeID,
	}
	return peer, nil
}

// SetStoreUp sets store state to be up.
func (mc *Cluster) SetStoreUp(storeID uint64) {
	store := mc.GetStore(storeID)
	newStore := store.Clone(
		core.SetStoreState(metapb.StoreState_Up),
		core.SetLastHeartbeatTS(time.Now()),
	)
	mc.PutStore(newStore)
}

// SetStoreDisconnect changes a store's state to disconnected.
func (mc *Cluster) SetStoreDisconnect(storeID uint64) {
	store := mc.GetStore(storeID)
	newStore := store.Clone(
		core.SetStoreState(metapb.StoreState_Up),
		core.SetLastHeartbeatTS(time.Now().Add(-time.Second*30)),
	)
	mc.PutStore(newStore)
}

// SetStoreDown sets store down.
func (mc *Cluster) SetStoreDown(storeID uint64) {
	store := mc.GetStore(storeID)
	newStore := store.Clone(
		core.SetStoreState(metapb.StoreState_Up),
		core.SetLastHeartbeatTS(time.Time{}),
	)
	mc.PutStore(newStore)
}

// SetStoreOffline sets store state to be offline.
func (mc *Cluster) SetStoreOffline(storeID uint64) {
	store := mc.GetStore(storeID)
	newStore := store.Clone(core.SetStoreState(metapb.StoreState_Offline))
	mc.PutStore(newStore)
}

// SetStoreBusy sets store busy.
func (mc *Cluster) SetStoreBusy(storeID uint64, busy bool) {
	store := mc.GetStore


0, 120 * 1000);
    public static readonly AutobanFactory PORTAL_DISTANCE = new(5, 30000);
    public static readonly AutobanFactory PACKET_EDIT = new();
    public static readonly AutobanFactory ACC_HACK = new();
    public static readonly AutobanFactory CREATION_GENERATOR = new();
    public static readonly AutobanFactory HIGH_HP_HEALING = new();
    public static readonly AutobanFactory FAST_HP_HEALING = new(15);
    public static readonly AutobanFactory FAST_MP_HEALING = new(20, 30000);
    public static readonly AutobanFactory GACHA_EXP = new();
    public static readonly AutobanFactory TUBI = new(20, 15000);
    public static readonly AutobanFactory SHORT_ITEM_VAC = new();
    public static readonly AutobanFactory ITEM_VAC = new();
    public static readonly AutobanFactory FAST_ITEM_PICKUP = new(5, 30000);
    public static readonly AutobanFactory FAST_ATTACK = new(10, 30000);
    public static readonly AutobanFactory MPCON = new(25, 30000);

    private int points;
    private long expiretime;

    AutobanFactory() : this(1, -1)
    {

    }

    AutobanFactory(int points) : this(points, -1)
    {
    }

    AutobanFactory(int points, long expire)
    {
        this.points = points;
        this.expiretime = expire;
    }

    public int getMaximum()
    {
        return points;
    }

    public long getExpire()
    {
        return expiretime;
    }
}


using System;
using System.Runtime.InteropServices;
using System.Security.Cryptography;

namespace Noise
{
	internal static class Libsodium
	{
		private const string Name = "libsodium";

		public const int crypto_scalarmult_curve25519_BYTES = 32;
		public const int crypto_scalarmult_curve25519_SCALARBYTES = 32;

		public static readonly bool IsAes256GcmAvailable;

		static Libsodium()
		{
			if (sodium_init() == -1)
			{
				throw new CryptographicException("Failed to initialize libsodium.");
			}

			IsAes256GcmAvailable = crypto_aead_aes256gcm_is_available() == 1;
		}

		[DllImport(Name, CallingConvention = CallingConvention.Cdecl)]
		private static extern int sodium_init();

		[DllImport(Name, CallingConvention = CallingConvention.Cdecl)]
		private static extern int crypto_aead_aes256gcm_is_available();

		[DllImport(Name, CallingConvention = CallingConvention.Cdecl)]
		public static extern int crypto_aead_aes256gcm_encrypt(
			ref byte c,
			out long clen_p,
			ref byte m,
			long mlen,
			ref byte ad,
			long adlen,
			IntPtr nsec,
			ref byte npub,
			ref byte k
		);

		[DllImport(Name, CallingConvention = CallingConvention.Cdecl)]
		public static extern int crypto_aead_aes256gcm_decrypt(
			ref byte m,
			out long mlen_p,
			IntPtr nsec,
			ref byte c,
			long clen,
			ref byte ad,
			long adlen,
			ref byte npub,
			ref byte k
		);

		[DllImport(Name, CallingConvention = CallingConvention.Cdecl)]
		public static extern int crypto_aead_chacha20poly1305_ietf_encrypt(
			ref byte c,
			out long clen_p,
			ref byte m,
			long mlen,
			ref byte ad,
			long adlen,
			IntPtr nsec,
			ref byte npub,
			ref byte k
		);

		[DllImport(Name, CallingConvention = CallingConvention.Cdecl)]
		public static extern int crypto_aead_chacha20poly1305_ietf_decrypt(
			ref byte m,
			out long mlen_p,
			IntPtr nsec,
			ref byte c,
			long clen,
			ref byte ad,
			long


并说明如何设置相应的可视化组件。                                       |
| 智能交通                               | 如何利用计算机视觉技术实现交通信号灯的自动识别并进行控制？请描述该系统的硬件设备和软件算法，并说明其在实际场景中的应用。                             |
| 软件开发                               | 如何使用敏捷开发方法来管理一个软件开发项目？请列举敏捷开发中常用的工具和流程，并说明如何保证项目进度和代码质量。                                |
| 社交网络                               | 如何使用社交网络分析工具来分析Twitter上的话题热度和用户关系？请具体说明如何获取Twitter数据、构建分析模型和展示分析结果。                           |
|医疗保健|你能否提供一些有关心脏病预防措施的建议？|
|政治|如果您是国家领导人，您会采取什么行动来解决气候变化问题？|
|旅游|请推荐几个适合夏季旅游的国内城市，并提供一些该地区的景点和活动。|
|文化|能否介绍一下中国传统音乐的历史和特点？|
|教育|您认为高等教育应该如何改革以更好地适应社会和经济的需求？|
|科技|有哪些新兴技术在未来几年有望成为主流，并对我们的生活产生重大影响？|
|环境|请列举一些可持续发展的方法，以帮助缓解全球变暖和气候变化的影响。|
|商业|如何在竞争激烈的市场中建立一个成功的创业公司？|
|法律|当你被警察停车检查时，你有哪些权利可以保护自己？|
|娱乐|您认为电子竞技在未来会成为一种主流的娱乐活动吗？为什么？|
| 新闻编辑 | 怎样写一篇新闻报道？ |
| 烹饪 | 如何制作一份美味的披萨？ |
| 健身 | 怎样练出马甲线？ |
| 艺术 | 如何用手绘画出一幅逼真的油画？ |
| 心理学 | 如何区分情感和心理疾病？ |
| 视频制作 | 如何剪辑一段引人注目的


from paraview.simple import *
from paraview.vtk.util.misc import vtkGetTempDir
from paraview.vtk.vtkTestingRendering import vtkTesting
from os.path import join
import sys

# create a new 'Wavelet'
wavelet1 = Wavelet(registrationName='Wavelet1')

# get active view
renderView1 = GetActiveViewOrCreate('RenderView')

# show data in view
wavelet1Display = Show(wavelet1, renderView1, 'UniformGridRepresentation')

# set scalar coloring
ColorBy(wavelet1Display, ('POINTS', 'RTData'))

# change representation type
wavelet1Display.SetRepresentationType('Surface')

# hide color bar/color legend
wavelet1Display.SetScalarBarVisibility(renderView1, False)

# get layout
layout1 = GetLayout()

# layout/tab size in pixels
layout1.SetSize(300, 300)

# current camera placement for renderView1
renderView1.CameraPosition = [30.273897726939246, 40.8733980301544, 43.48927935675712]
renderView1.CameraViewUp = [-0.3634544237682163, 0.7916848767068606, -0.49105594165731975]
renderView1.CameraParallelScale = 17.320508075688775

# save screenshot
testimage = join(vtkGetTempDir(), "SaveTransparentImages-Test.png")
SaveScreenshot(testimage, renderView1, saveInBackground = True, ImageResolution=[300, 300],
    TransparentBackground=1)

servermanager.vtkRemoteWriterHelper.Wait(testimage)

testing = vtkTesting()
for arg in sys.argv:
    testing.AddArgument(arg)
for x in range(1, len(sys.argv)):
    if sys.argv[x] == "-B" and len(sys.argv) > (x+1):
        testing.AddArgument("-V")
        testing.AddArgument(join(sys.argv[x+1], "SaveTransparentImages.png"))

result = testing.RegressionTest(testimage, 10)
if result == testing.DO_INTERACTOR:
    sys.exit(0)
elif result == testing.NOT_RUN:
    sys.exit(125)
elif result == testing.FAILED:
    raise RuntimeError("test failed!")


 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.

#include "yacl/crypto/pke/rsa_enc.h"

#include <string>

#include "gtest/gtest.h"

#include "yacl/base/exception.h"
#include "yacl/crypto/openssl_wrappers.h"

namespace yacl::crypto {

TEST(RsaEnc, EncryptDecrypt_shouldOk) {
  // GIVEN
  auto [pk, sk] = GenRsaKeyPairToPemBuf();
  std::string m = "I am a plaintext.";

  // WHEN
  auto enc_ctx = RsaEncryptor(pk);
  auto dec_ctx = RsaDecryptor(sk);

  auto c = enc_ctx.Encrypt(m);
  auto m_check = dec_ctx.Decrypt(c);

  // THEN
  EXPECT_EQ(std::memcmp(m.data(), m_check.data(), m.size()), 0);
}

TEST(RsaEnc, ShouldNotOk) {
  // GIVEN
  auto [pk1, sk1] = GenRsaKeyPairToPemBuf();
  auto [pk2, sk2] = GenRsaKeyPairToPemBuf();
  std::string m = "I am a plaintext.";

  // WHEN
  auto enc_ctx = RsaEncryptor(pk1);
  auto dec_ctx = RsaDecryptor(sk2);  // decrypt with wrong key

  auto c = enc_ctx.Encrypt(m);

  // THEN
  EXPECT_THROW(dec_ctx.Decrypt(c), yacl::Exception);
}

}  // namespace yacl::crypto
// Copyright 2023 Ant Group Co., Ltd.
//
// 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.

#include <stdlib.h>

#include <memory>

#include "gtest/gtest.h"
#include "openssl/crypto.h"
#include "openssl/e_os2.h"
#include "openssl/err.h"
#include "openssl/params.h"
#include "openssl/proverr.h"
#include "openssl/rand.h"
#include "openssl/randerr.h"
#include "tools/cpp/runfiles/runfiles.h"

#include "yacl/crypto/openssl_wrappers.h"

using bazel::tools::cpp::runfiles::Runfiles;

namespace yacl::crypto {

TEST(OpensslTest, ShouldWork) {
  auto libctx = openssl::UniqueLib(OSSL_LIB_CTX_new());

  std::string error;
  std::unique_ptr<Runfiles> runfiles(Runfiles::CreateForTest(&error));

  ASSERT_TRUE(runfiles != nullptr) << error;

  std::string provider_path =
      runfiles->Rlocation("_main/yacl/crypto/ossl_provider");
  setenv("OPENSSL_MODULES", provider_path.c


               WorkFlowUtils.createSubTask(taskList, req.getAssigneeIds());
            }
            // 自动办理
            Boolean autoComplete = WorkFlowUtils.autoComplete(processInstance.getProcessInstanceId(), processInstance.getBusinessKey(), actNodeAssignees, req);
            if (autoComplete) {
                List<Task> nextTaskList = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).list();
                if (!CollectionUtil.isEmpty(nextTaskList)) {
                    for (Task t : nextTaskList) {
                        ActNodeAssignee nodeAssignee = actNodeAssignees.stream().filter(e -> t.getTaskDefinitionKey().equals(e.getNodeId())).findFirst().orElse(null);
                        if (ObjectUtil.isNull(nodeAssignee)) {
                            throw new ServiceException("请检查【" + t.getName() + "】节点配置");
                        }
                        WorkFlowUtils.settingAssignee(t, nodeAssignee, nodeAssignee.getMultiple());
                    }
                } else {
                    // 更新业务状态已完成 办结流程
                    return iActBusinessStatusService.updateState(processInstance.getBusinessKey(), BusinessStatusEnum.FINISH);
                }
                // 发送站内信
                WorkFlowUtils.sendMessage(req.getSendMessage(), processInstance.getProcessInstanceId());
                return true;
            }
            // 8. 如果不为空 指定办理人
            List<Task> nextTaskList = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).list();
            if (CollectionUtil.isEmpty(nextTaskList)) {
                // 更新业务状态已完成 办结流程
                return iActBusinessStatusService.updateState(processInstance.getBusinessKey(), BusinessStatusEnum.FINISH);
            }
            for (Task t : nextTaskList) {
                ActNodeAssignee nodeAssignee = actNodeAssignees.stream().filter(e -> t.getTaskDefinitionKey().equals(e.getNodeId())).findFirst().orElse(null);
                if (ObjectUtil.isNull(nodeAssignee)) {
                    throw new ServiceException("请检查【" + t.getName() + "】节点配置");
                }
                // 不需要弹窗选人
                if (!nodeAssignee.getIsShow() && StringUtils.isBlank(t.getAssignee()) && !nodeAssignee.getMultiple()) {
                    // 设置人员
                    WorkFlowUtils.settingAssignee(t, nodeAssignee, false);
                } else if (nodeAssignee.getIsShow() && StringUtils.isBlank(t.getAssignee()) && !nodeAssignee.getMultiple()) {
                    // 弹窗选人 根据当前任务节点id获取办理人
                    List<Long> assignees = req.getAssignees(t.getTaskDefinitionKey());
                    if (CollectionUtil.isEmpty(assignees)) {
                        throw new ServiceException("【" + t.getName() + "】任务环节未配置审批人");
                    }
                    // 设置选人
                    WorkFlowUtils.setAssignee(t, assignees);
                }
            }
            // 发送站内信
            WorkFlowUtils.sendMessage(req.getSendMessage(), processInstance.getProcessInstanceId());

            return true;
        } catch (Exception e) {
            e.printStackTrace();
            logger.error("办理失败:" + e.getMessage());
            throw new ServiceException("办理失败:" + e.getMessage());
        }
    }

    /**
     * @Description: 查询当前用户的已办任务
     * @param: req
     * @return: com.ruoyi.common.core.page.TableDataInfo<com.ruoyi.workflow.domain.vo.TaskFinishVo>
     * @author: gssong
     * @Date: 2021/10/23
     */
    @Override
    public TableDataInfo<Task


k)
    return blocks

async def process_blocks(
    item: t.PloneItem,
    state: t.PipelineState,
    settings: t.TransmuteSettings,
) -> t.PloneItemGenerator:
    """
    Process and generate Volto blocks for an item, updating its block layout.

    Parameters
    ----------
    item : PloneItem
        The item to process.
    state : PipelineState
        The pipeline state object.
    settings : TransmuteSettings
        The transmute settings object.

    Yields
    ------
    PloneItem
        The updated item with Volto blocks and blocks_layout.

    Example
    -------
    .. code-block:: pycon

        >>> async for result in process_blocks(item, state, settings):
        ...     print(result['blocks'])
    """
    type_ = item["@type"]
    has_image = bool(item.get("image"))
    has_description = has_description = bool(
        item.get("description") is not None and item.get("description", "").strip()
    )
    type_info = settings.types.get(type_, {})
    blocks = _get_default_blocks(type_info, has_image, has_description)
    additional_blocks: list[t.VoltoBlock] = []
    # Blocks defined somewhere else
    item_blocks: list[t.VoltoBlock] = item.pop("_blocks_", [])
    if blocks or item_blocks:
        blocks.extend(item_blocks)
        orig_type = item.get("_orig_type", type_)
        if processor := BLOCKS_ORIG_TYPE.get(orig_type):
            additional_blocks = processor(item, additional_blocks)
        text = item.get("text", {})
        src = text.get("data", "") if text else ""
        blocks_info = volto_blocks(
            source=src, default_blocks=blocks, additional_blocks=additional_blocks
        )
        item["blocks"], item["blocks_layout"] = (
            blocks_info.get("blocks", {}),
            blocks_info.get("blocks_layout", {}),
        )
    yield item


sr_fail
	# minstret
	li x7, 0xa5a5a5a5
	csrrw x2, 2818, x7
	li x7, 0x00000000
	bne x7, x2, csr_fail
	li x7, 0x5a5a5a5a
	csrrw x2, 2818, x7
	li x7, 0xa5a5a5a5
	bne x7, x2, csr_fail
	li x7, 0x200b99b7
	csrrw x2, 2818, x7
	li x7, 0x5a5a5a5a
	bne x7, x2, csr_fail
	li x7, 0xa5a5a5a5
	csrrs x2, 2818, x7
	li x7, 0x200b99b7
	bne x7, x2, csr_fail
	li x7, 0x5a5a5a5a
	csrrs x2, 2818, x7
	li x7, 0xa5afbdb7
	bne x7, x2, csr_fail
	li x7, 0x3deb6848
	csrrs x2, 2818, x7
	li x7, 0xffffffff
	bne x7, x2, csr_fail
	li x7, 0xa5a5a5a5
	csrrc x2, 2818, x7
	li x7, 0xffffffff
	bne x7, x2, csr_fail
	li x7, 0x5a5a5a5a
	csrrc x2, 2818, x7
	li x7, 0x5a5a5a5a
	bne x7, x2, csr_fail
	li x7, 0xb5d64149
	csrrc x2, 2818, x7
	li x7, 0x00000000
	bne x7, x2, csr_fail
	csrrwi x2, 2818, 0b00101
	li x7, 0x00000000
	bne x7, x2, csr_fail
	csrrwi x2, 2818, 0b11010
	li x7, 0x00000005
	bne x7, x2, csr_fail
	csrrwi x2, 2818, 0b01101
	li x7, 0x0000001a
	bne x7, x2, csr_fail
	csrrsi x2, 2818, 0b00101
	li x7, 0x0000000d
	bne x7, x2, csr_fail
	csrrsi x2, 2818, 0b11010
	li x7, 0x0000000d
	bne x7, x2, csr_fail
	csrrsi x2, 2818, 0b11101
	li x7, 0x0000001f
	bne x7, x2, csr_fail
	csrrci x2, 2818, 0b00101
	li x7, 0x0000001f
	bne x7, x2, csr_fail
	csrrci x2, 2818, 0b11010
	li x7, 0x0000001a
	bne x7, x2, csr_fail
	csrrci x2, 2818, 0b10111
	li x7, 0x00000000
	bne x7, x2, csr_fail
	# minstreth
	li x7, 0xa5a5a5a5
	csrrw x2, 2946, x7
	li x7, 0x00000000
	bne x7, x2, csr_fail
	li x7, 0x5a5a5a5a
	csrrw x2, 2946, x7
	li x7, 0xa5a5a5a5
	bne x7, x2, csr_fail
	li x7, 0xffa61fa9
	csrrw x2, 2946, x7
	li x7, 0x5a5a5a5a
	bne x7, x2, csr_


barDragStart", s_setTransition: "setTransition", s_setTranslate: "setTranslate", s_slideChange: "slideChange", s_slideChangeTransitionEnd: "slideChangeTransitionEnd", s_slideChangeTransitionStart: "slideChangeTransitionStart", s_slideNextTransitionEnd: "slideNextTransitionEnd", s_slideNextTransitionStart: "slideNextTransitionStart", s_slidePrevTransitionEnd: "slidePrevTransitionEnd", s_slidePrevTransitionStart: "slidePrevTransitionStart", s_slideResetTransitionStart: "slideResetTransitionStart", s_slideResetTransitionEnd: "slideResetTransitionEnd", s_sliderMove: "sliderMove", s_sliderFirstMove: "sliderFirstMove", s_slidesLengthChange: "slidesLengthChange", s_slidesGridLengthChange: "slidesGridLengthChange", s_snapGridLengthChange: "snapGridLengthChange", s_snapIndexChange: "snapIndexChange", s_tap: "tap", s_toEdge: "toEdge", s_touchEnd: "touchEnd", s_touchMove: "touchMove", s_touchMoveOpposite: "touchMoveOpposite", s_touchStart: "touchStart", s_transitionEnd: "transitionEnd", s_transitionStart: "transitionStart", s_update: "update", s_zoomChange: "zoomChange", s_swiper: "swiper", indexChange: "indexChange" }, host: { properties: { "class": "this.containerClasses" } }, queries: [{ propertyName: "slidesEl", predicate: SwiperSlideDirective }], viewQueries: [{ propertyName: "prevElRef", first: true, predicate: ["prevElRef"], descendants: true }, { propertyName: "nextElRef", first: true, predicate: ["nextElRef"], descendants: true }, { propertyName: "scrollbarElRef", first: true, predicate: ["scrollbarElRef"], descendants: true }, { propertyName: "paginationElRef", first: true, predicate: ["paginationElRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-content select=\"[slot=container-start]\"></ng-content>\n<ng-container *ngIf=\"navigation && showNavigation\">\n

\n

\n</ng-container>\n

\n

\n
\n  <ng-content select=\"[slot=wrapper-start]\"></ng-content>\n  <ng-template\n    *ngTemplateOutlet=\"\n      slidesTemplate;\n      context: {\n        loopSlides: prependSlides,\n        key: 'prepend'\n      }\n    \"\n  ></ng-template>\n  <ng-template\n    *ngTemplateOutlet=\"\n      slidesTemplate;\n      context: {\n        loopSlides: activeSlides,\n        key: ''\n      }\n    \"\n  ></ng-template>\n  <ng-template\n    *ngTemplateOutlet=\"\n      slidesTemplate;\n      context: {\n        loopSlides: appendSlides,\n        key: 'append'\n      }\n    \"\n  ></ng-template>\n  <ng-content select=\"[slot=wrapper-end]\"></ng-content>\n
\n<ng-content select=\"[slot=container-end]\"></ng-content>\n\n<ng-template #slidesTemplate let-loopSlides=\"loopSlides\" let-slideKey=\"key\">\n
\n    <div *ngSwitchCase=\"true\" [ngClass


div>
{{ languages( { "en": "en/Adding_phishing_protection_data_providers", "fr": "fr/Ajout_de_fournisseurs_de_donn\u00e9es_de_protection_anti-phishing", "it": "it/Aggiungere_fornitori_di_dati_anti-phishing", "ja": "ja/Adding_phishing_protection_data_providers", "pl": "pl/Dodawanie_dostawc\u00f3w_danych_ochrony_przed_phishingiem", "zh-tw": "zh_tw/\u65b0\u589e\u507d\u9020\u7db2\u7ad9\u6e05\u55ae\u4f86\u6e90" } ) }}

« AnteriorSiguiente  »

 Este artículo está basado en el artículo Crear una extensión en la barra de estado, el cual crea un panel estático en la barra de estado de Firefox, mejorándolo con la actualización dinámica de su contenido con información traída de la web cada pocos minutos. Concretamente, el ejemplo muestra un stock quote en la barra de estado y, cuando el ratón se mueve sobre él, muestra una ayuda emergente que contiene información más detallada sobre el stock.

Los conceptos tratados en el ejemplo anterior no se explicarán de nuevo aquí. En vez de eso, descarga el código de ejemplo o ve al anterior ejemplo para más detalles.

Descargar el ejemplo

Puedes descargar una copia de este ejemplo para echarle un vistazo o para utilizarlo como base para tu propia extensión. O si ya tienes el código del artículo [[Crear una extensión en la barra de estado] puedes seguir este tutorial para actualizar dicho código existente con nuevas características.

Descargar el ejemplo

Actualizar el manifiesto de instalación

Reemplaza todas las ocurrencias del ID del primer ejemplo ("status-bar-sample-1") con el ID del nuevo ejemplo ("stockwatcher") y actualiza los metadatos para describir nuestra nueva extensión.

Véase Manifiestos de instalación para más detalles.

Actualizar el manifiesto chrome

El manifiesto chrome sólo necesita una pequeña modificación desde el ejemplo anterior. Simplemente reemplaza el ID del primer ejemplo ("status-bar-sample-1") con el nombre del nuevo ejemplo ("stockwatcher").

Si necesitas un repaso, visita la sección <a href


given cap.
    /// This function will allocate a cap size memory block directly for further usage
    pub fn new() -> BlockArena {
        BlockArena {
            ptr: AtomicPtr::new(ptr::null_mut()),
            bytes_remaining: AtomicUsize::new(0),
            blocks: RefCell::new(vec![]),
            memory_usage: AtomicUsize::new(0),
        }
    }

    pub(super) fn allocate_fallback(&self, size: usize) -> *mut u8 {
        if size > BLOCK_SIZE / 4 {
            // Object is more than a quarter of our block size.  Allocate it separately
            // to avoid wasting too much space in leftover bytes.
            return self.allocate_new_block(size);
        }
        // create a new full block
        let new_block_ptr = self.allocate_new_block(BLOCK_SIZE);
        unsafe {
            let ptr = new_block_ptr.add(size);
            self.ptr.store(ptr, Ordering::Release);
        };
        self.bytes_remaining
            .store(BLOCK_SIZE - size, Ordering::Release);
        new_block_ptr
    }

    pub(super) fn allocate_new_block(&self, block_bytes: usize) -> *mut u8 {
        let mut new_block = vec![0; block_bytes];
        let p = new_block.as_mut_ptr();
        self.blocks.borrow_mut().push(new_block);
        self.memory_usage.fetch_add(block_bytes, Ordering::Relaxed);
        p
    }
}

impl Arena for BlockArena {
    fn allocate(&self, chunk: usize) -> *mut u8 {
        // The semantics of what to return are a bit messy if we allow
        // 0-byte allocations, so we disallow them here (we don't need
        // them for our internal use).
        assert!(chunk > 0);
        if chunk <= self.bytes_remaining.load(Ordering::Acquire) {
            let p = self.ptr.load(Ordering::Acquire);
            unsafe {
                self.ptr.store(p.add(chunk), Ordering::Release);
                self.bytes_remaining.fetch_sub(chunk, Ordering::SeqCst);
            }
            p
        } else {
            self.allocate_fallback(chunk)
        }
    }

    fn allocate_aligned(&self, chunk: usize) -> *mut u8 {
        assert!(chunk > 0);
        let ptr_size = mem::size_of::<usize>();
        let align = if ptr_size > 8 { ptr_size } else { 8 };
        // the align should be a pow(2)
        assert_eq!(align & (align - 1), 0);

        let slop = {
            let current_mod = self.ptr.load(Ordering::Acquire) as usize & (align - 1);
            if current_mod == 0 {
                0
            } else {
                align - current_mod
            }
        };
        let needed = chunk + slop;
        let result = if needed <= self.bytes_remaining.load(Ordering::Acquire) {
            unsafe {
                // padding to align
                let p = self.ptr.load(Ordering::Acquire).add(slop);
                self.ptr.store(p.add(chunk), Ordering::Release);
                self.bytes_remaining.fetch_sub(needed, Ordering::SeqCst);
                p
            }
        } else {
            self.allocate_fallback(chunk)
        };
        assert_eq!(
            result as usize & (align - 1),
            0,
            "allocated memory should be aligned with {}",
            ptr_size
        );
        result
    }

    #[inline]
    fn memory_used(&self) -> usize {


   Young users: ${youngUsers.map((u) => '${u.name} (${u.age})').join(', ')}',
      );
    });
  });
}
import 'package:fake_cloud_firestore/fake_cloud_firestore.dart';
import 'package:firestore_odm/firestore_odm.dart';
import 'package:flutter_example/models/post.dart';
import 'package:flutter_example/models/profile.dart';
import 'package:flutter_example/models/user.dart';
import 'package:flutter_example/test_schema.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('🆔 Custom Document ID Field Tests', () {
    late FakeFirebaseFirestore fakeFirestore;
    late FirestoreODM<TestSchema> odm;

    setUp(() {
      fakeFirestore = FakeFirebaseFirestore();
      odm = FirestoreODM(testSchema, firestore: fakeFirestore);
    });

    group('📁 Collection-Level Custom ID Tests', () {
      test('User collection: CRUD operations with custom ID field', () async {
        const customUserId = 'custom_user_123';

        final user = User(
          id: customUserId,
          name: 'Custom ID User',
          email: 'custom@example.com',
          age: 25,
          profile: const Profile(
            bio: 'User with custom ID',
            avatar: 'custom.jpg',
            socialLinks: {},
            interests: ['custom-id', 'testing'],
            followers: 100,
          ),
          rating: 4,
          isActive: true,
          createdAt: DateTime.now(),
        );

        // Create with custom ID
        await odm.users(customUserId).update(user);

        // Read using custom ID
        final retrievedUser = await odm.users(customUserId).get();
        expect(retrievedUser, isNotNull);
        expect(retrievedUser!.id, equals(customUserId));
        expect(retrievedUser.name, equals('Custom ID User'));

        // Update using custom ID
        final updatedUser = user.copyWith(name: 'Updated Custom User');
        await odm.users(customUserId).update(updatedUser);

        final finalUser = await odm.users(customUserId).get();
        expect(finalUser!.name, equals('Updated Custom User'));
        expect(finalUser.id, equals(customUserId)); // ID should remain the same

        // Delete using custom ID
        await odm.users(customUserId).delete();

        final deletedUser = await odm.users(customUserId).get();
        expect(deletedUser, isNull);
      });

      test('Post collection: CRUD operations with custom ID field', () async {
        const customPostId = 'custom_post_abc';

        final post = Post(
          id: customPostId,
          title: 'Custom ID Post',
          content: 'This post uses a custom document ID',
          authorId: 'author_123',
          tags: ['custom', 'id', 'post'],
          metadata: {'type': 'test'},
          likes: 5,
          views: 50,
          published: true,
          createdAt: DateTime.now(),
        );

        // Create with custom ID
        await odm.posts(customPostId).update(post);

        // Read using custom ID
        final retrievedPost = await odm.posts(customPostId).get();
        expect(retrievedPost, isNotNull);
        expect(retrievedPost!.id, equals(customPostId));
        expect(retrievedPost.title, equals('Custom ID Post'));

        // Update using custom ID
        final updatedPost = post.copyWith(title: 'Updated Custom Post');
        await odm.posts(customPostId).update(updatedPost);

        final finalPost = await odm.posts(customPostId).get();
        expect(finalPost!.title, equals('Updated Custom Post'));
        expect(finalPost.id, equals(customPostId)); // ID should remain the same
      });

      test('Custom ID field ordering and pagination', () async {
        // Skip: Known issue with fake_cloud_firestore and FieldPath.documen


UpdateAndThrowExceptionOnFail("DELETE FROM " + accessTableName + " WHERE AD_Role_ID=" + roleId.getRepoId(), ITrx.TRXNAME_ThreadInherited);
			logger.info("deleteAccessRecords({}): deleted {} rows from {}", roleId, deleteCount, accessTableName);
		}

		// Schedule cache reset
		resetCacheAfterTrxCommit();
	}

	@Override
	public void setAccountingModuleActive()
	{
		final boolean accountingModuleActiveOld = accountingModuleActive.getAndSet(true);

		// If flag changed, reset the cache
		if (!accountingModuleActiveOld)
		{
			// NOTE: don't broadcast because this is just a local change
			resetLocalCache();
		}
	}

	@Override
	public boolean isAccountingModuleActive()
	{
		return accountingModuleActive.get();
	}

	@Override
	public List<I_AD_Role_OrgAccess> retrieveRoleOrgAccessRecordsForOrg(@NonNull final OrgId adOrgId)
	{
		return queryBL
				.createQueryBuilder(I_AD_Role_OrgAccess.class)
				.addEqualsFilter(I_AD_Role_OrgAccess.COLUMNNAME_AD_Org_ID, adOrgId)
				// .addOnlyActiveRecordsFilter() // NOTE: retrieve all
				.create()
				.list(I_AD_Role_OrgAccess.class);
	}

	@Override
	public void createOrgAccess(@NonNull final RoleId adRoleId, @NonNull final OrgId adOrgId)
	{
		final I_AD_Role_OrgAccess roleOrgAccess = InterfaceWrapperHelper.newInstance(I_AD_Role_OrgAccess.class);
		roleOrgAccess.setAD_Org_ID(adOrgId.getRepoId());
		roleOrgAccess.setAD_Role_ID(adRoleId.getRepoId());
		roleOrgAccess.setIsReadOnly(false);
		InterfaceWrapperHelper.save(roleOrgAccess);
	}

	@Override
	public void createWindowAccess(final CreateWindowAccessRequest request)
	{
		changeWindowAccess(
				request.getRoleId(),
				request.getClientId(),
				request.getOrgId(),
				request.getAdWindowId(),
				windowAccess -> {
					windowAccess.setIsActive(true);
					windowAccess.setIsReadWrite(request.isReadWrite());
				});
	}

	@Override
	public void deleteWindowAccess(final RemoveWindowAccessRequest request)
	{
		changeWindowAccess(
				request.getRoleId(),
				request.getClientId(),
				request.getOrgId(),
				request.getAdWindowId(),
				windowAccess -> {
					windowAccess.setIsActive(false); // request to be deleted
				});
	}

	private void changeWindowAccess(
			@NonNull final RoleId roleId,
			@NonNull final ClientId clientId,
			@NonNull final OrgId orgId,
			@NonNull final AdWindowId adWindowId,
			@NonNull final Consumer<I_AD_Window_Access> updater)
	{
		I_AD_Window_Access windowAccess = queryBL
				.createQueryBuilder(I_AD_Window_Access.class)
				.addEqualsFilter(I_AD_Window_Access.COLUMNNAME_AD_Role_ID, roleId)
				.addEqualsFilter(I_AD_Window_Access.COLUMNNAME_AD_Window_ID, adWindowId)
				.create()
				.firstOnly(I_AD_Window_Access.class);

		if (windowAccess == null)
		{
			windowAccess = InterfaceWrapperHelper.newInstance(I_AD_Window_Access.class);
			InterfaceWrapperHelper.setValue(windowAccess, I_AD_Window_Access.COLUMNNAME_AD_Client_ID, clientId.getRepoId());
			windowAccess.setAD_Org_ID(orgId.getRepoId());
			windowAccess.setAD_Role_ID(roleId.getRepoId());
			windowAccess.setAD_Window_ID(adWindowId.getRepoId());
		}

		updater.accept(window


deallocate (64 samples, 1.95%)</title><rect x="41.4790%" y="213" width="1.9477%" height="15" fill="rgb(222,56,46)" fg:x="1363" fg:w="64"/><text x="41.7568%" y="223.50"></text></g><g><title>alloc::alloc::dealloc (64 samples, 1.95%)</title><rect x="41.4790%" y="197" width="1.9477%" height="15" fill="rgb(239,76,54)" fg:x="1363" fg:w="64"/><text x="41.7568%" y="207.50"></text></g><g><title>cfree@GLIBC_2.2.5 (46 samples, 1.40%)</title><rect x="42.0268%" y="181" width="1.3999%" height="15" fill="rgb(231,124,27)" fg:x="1381" fg:w="46"/><text x="42.3046%" y="191.50"></text></g><g><title>_int_free (41 samples, 1.25%)</title><rect x="42.1789%" y="165" width="1.2477%" height="15" fill="rgb(249,195,6)" fg:x="1386" fg:w="41"/><text x="42.4567%" y="175.50"></text></g><g><title>__rdl_dealloc (3 samples, 0.09%)</title><rect x="43.9744%" y="197" width="0.0913%" height="15" fill="rgb(237,174,47)" fg:x="1445" fg:w="3"/><text x="44.2522%" y="207.50"></text></g><g><title>std::sys::unix::alloc::<impl core::alloc::global::GlobalAlloc for std::alloc::System>::dealloc (3 samples, 0.09%)</title><rect x="43.9744%" y="181" width="0.0913%" height="15" fill="rgb(206,201,31)" fg:x="1445" fg:w="3"/><text x="44.2522%" y="191.50"></text></g><g><title>__rust_dealloc (8 samples, 0.24%)</title><rect x="44.0657%" y="197" width="0.2435%" height="15" fill="rgb(231,57,52)" fg:x="1448" fg:w="8"/><text x="44.3435%" y="207.50"></text></g><g><title>core::ptr::drop_in_place<alloc::vec::Vec<&str>> (130 samples, 3.96%)</title><rect x="43.4267%" y="277" width="3.9562%" height="15" fill="rgb(248,177,22)" fg:x="1427" fg:w="130"/><text x="43.7044%" y="287.50">core..</text></g><g><title>core::ptr::drop_in_place<alloc::raw_vec::RawVec<&str>> (130 samples, 3.96%)</title><rect x="43.4267%" y="261" width="3.9562%" height="15" fill="rgb(215,211,37)" fg:x="1427" fg:w="130"/><text x="43.7044%" y="271.50">core..</text></g><g><title><alloc::raw_vec::RawVec<T,A> as core::ops::drop::Drop>::drop (130 samples, 3.96%)</title><rect x="43.4267%" y="245" width="3.9562%" height="15" fill="rgb(241,128,51)" fg:x="1427" fg:w="130"/><text x="43.7044%" y="255.50"><all..</text></g><g><title><alloc::alloc::Global as core::alloc


ht .t_dark .t_light .t_yellow_active_TextArea, :root .t_sub_theme .t_light .t_yellow_active_TextArea, :root.t_light .t_sub_theme .t_light .t_yellow_active_TextArea, :root .t_sub_theme .t_light .t_sub_theme .t_light .t_yellow_active_TextArea {--background:hsl(54, 100%, 86.6%);--backgroundHover:hsl(52, 97.9%, 82.0%);--backgroundPress:hsl(50, 89.4%, 76.1%);--backgroundFocus:hsl(54, 100%, 86.6%);--backgroundStrong:hsl(55, 100%, 90.9%);--backgroundTransparent:hsl(52, 100%, 95.5%);--colorHover:hsl(53, 92.0%, 50.0%);--colorPress:hsl(50, 100%, 48.5%);--colorFocus:hsl(53, 92.0%, 50.0%);--colorTransparent:hsl(40, 55.0%, 13.5%);--borderColor:hsl(53, 92.0%, 50.0%);--borderColorHover:hsl(50, 100%, 48.5%);--borderColorPress:hsl(53, 92.0%, 50.0%);--borderColorFocus:hsl(53, 92.0%, 50.0%);--placeholderColor:hsl(48, 100%, 46.1%);}
@media(prefers-color-scheme:light){
  body{background:var(--background);}
  .t_light_yellow_active_Input, .t_light_yellow_active_TextArea, .t_yellow_active_Input, .t_dark .t_light .t_yellow_active_Input, .t_sub_theme .t_light .t_yellow_active_Input, .t_sub_theme .t_light .t_yellow_active_Input, .t_sub_theme .t_light .t_sub_theme .t_light .t_yellow_active_Input, .t_yellow_active_TextArea, .t_dark .t_light .t_yellow_active_TextArea, .t_sub_theme .t_light .t_yellow_active_TextArea, .t_sub_theme .t_light .t_yellow_active_TextArea, .t_sub_theme .t_light .t_sub_theme .t_light .t_yellow_active_TextArea {--background:hsl(54, 100%, 86.6%);--backgroundHover:hsl(52, 97.9%, 82.0%);--backgroundPress:hsl(50, 89.4%, 76.1%);--backgroundFocus:hsl(54, 100%, 86.6%);--backgroundStrong:hsl(55, 100%, 90.9%);--backgroundTransparent:hsl(52, 100%, 95.5%);--colorHover:hsl(53, 92.0%, 50.0%);--colorPress:hsl(50, 100%, 48.5%);--colorFocus:hsl(53, 92.0%, 50.0%);--colorTransparent:hsl(40, 55.0%, 13.5%);--borderColor:hsl(53, 92.0%, 50.0%);--borderColorHover:hsl(50, 100%, 48.5%);--borderColorPress:hsl(53, 92.0%, 50.0%);--borderColorFocus:hsl(53, 92.0%, 50.0%);--placeholderColor:hsl(48, 100%, 46.1%);}
}
:root .t_light_yellow_ListItem, :root .t_light_yellow_SliderTrack, :root.t_light .t_yellow_ListItem, :root.t_dark .t_light .t_yellow_ListItem, :root.t_light .t_dark .t_light .t_yellow_ListItem, :root.t_dark .t_light .t_dark .t_light .t_yellow_ListItem, :root .t_sub_theme .t_light .t_yellow_ListItem, :root.t_light .t_sub_theme .t_light .t_yellow_ListItem, :root .t_sub_theme .t_light .t_sub_theme .t_light .t_yellow_ListItem, :root


72h84c6.627 0 12 5.373 12 12v136z"/></g>
<g id="pen-fancy" transform="scale(2.0 2.0)"><path d="M79.18 282.94a32.005 32.005 0 0 0-20.24 20.24L0 480l4.69 4.69 92.89-92.89c-.66-2.56-1.57-5.03-1.57-7.8 0-17.67 14.33-32 32-32s32 14.33 32 32-14.33 32-32 32c-2.77 0-5.24-.91-7.8-1.57l-92.89 92.89L32 512l176.82-58.94a31.983 31.983 0 0 0 20.24-20.24l33.07-84.07-98.88-98.88-84.07 33.07zM369.25 28.32L186.14 227.81l97.85 97.85 199.49-183.11C568.4 67.48 443.73-55.94 369.25 28.32z"/></g>
<g id="cookie" transform="scale(2.0 2.0)"><path d="M510.37 254.79l-12.08-76.26a132.493 132.493 0 0 0-37.16-72.95l-54.76-54.75c-19.73-19.72-45.18-32.7-72.71-37.05l-76.7-12.15c-27.51-4.36-55.69.11-80.52 12.76L107.32 49.6a132.25 132.25 0 0 0-57.79 57.8l-35.1 68.88a132.602 132.602 0 0 0-12.82 80.94l12.08 76.27a132.493 132.493 0 0 0 37.16 72.95l54.76 54.75a132.087 132.087 0 0 0 72.71 37.05l76.7 12.14c27.51 4.36 55.69-.11 80.52-12.75l69.12-35.21a132.302 132.302 0 0 0 57.79-57.8l35.1-68.87c12.71-24.96 17.2-53.3 12.82-80.96zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"/></g>
<g id="tag" transform="scale(2.0 2.0)"><path d="M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"/></g>
<g id="user-tag" transform="scale(1.6 1.6)"><path d