import com.pgyersdk.crash.PgyCrashManager
import com.scwang.smart.refresh.footer.BallPulseFooter
import com.scwang.smart.refresh.footer.ClassicsFooter
import com.scwang.smart.refresh.header.MaterialHeader
import com.scwang.smart.refresh.layout.SmartRefreshLayout
import com.scwang.smart.refresh.layout.constant.SpinnerStyle
import com.tencent.mmkv.MMKV
import es.dmoral.toasty.Toasty
import io.reactivex.plugins.RxJavaPlugins
import me.jessyan.autosize.AutoSizeConfig
import me.yokeyword.fragmentation.Fragmentation
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.core.context.startKoin
import org.litepal.LitePal

/**
 * @author Alwyn
 * @Date 2020/7/20
 * @Description
 */
open class MyApplication : Application() {

    override fun onCreate() {
        super.onCreate()
        if (BuildConfig.DEBUG) {
            ARouter.openLog()
            ARouter.openDebug()
            //        DoraemonKit.apply {
//            setDebug(BuildConfig.DEBUG)
//            setAwaysShowMainIcon(BuildConfig.DEBUG)
//            install(this@MyApplication)
//        }
        }
        ARouter.init(this)
        setApplication(this)
        PgyCrashManager.register()
        LitePal.initialize(this)
        MMKV.initialize(this)
        // 初始化Fragmentation
        Fragmentation.builder()
            .stackViewMode(Fragmentation.NONE)
            .debug(BuildConfig.DEBUG)
            .install()
        // 屏幕适配
        AutoSizeConfig.getInstance().setCustomFragment(true).setBaseOnWidth(false)
            .setExcludeFontScale(true).designHeightInDp = 720
        //是否开启日志打印
        LogUtils.getConfig().setLogSwitch(BuildConfig.DEBUG).setConsoleSwitch(BuildConfig.DEBUG)
        startKoin {
            androidLogger()
            androidContext(this@MyApplication)
            modules(allModule)
        }
        RxJavaPlugins.setErrorHandler {
            ToastHelper.showErrorToast("系统错误")
            it.printStackTrace()
            PgyCrashManager.reportCaughtException(Exception(it))
        }
        // 设置吐司不以队列循环展示
        Toasty.Config.getInstance().allowQueue(false).apply()
        XPopup.setPrimaryColor(ContextCompat.getColor(this, R.color.md_theme_red))
        // 切换情景模式
        initNightMode()
        LogUtils.i("currentApp=${packageName}")
    }

    private fun initNightMode() {
        if (SpHelper.decodeBoolean(AppConstants.SpKey.SYS_UI_MODE))
            AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
        else
            AppCompatDelegate.setDefaultNightMode(
                if (SpHelper.decodeBoolean(AppConstants.SpKey.USER_UI_MODE)) AppCompatDelegate.MODE_NIGHT_YES
                else AppCompatDelegate.MODE_NIGHT_NO
            )
    }

    companion object {
        init {
            ClassicsFooter.REFRESH_FOOTER_FINISH = ""
            ClassicsFooter.REFRESH_FOOTER_LOADING = "加载中"
            SmartRefreshLayout.setDefaultRefreshInitializer { _, layout ->
                layout.apply {
                    setEnableOverScrollDrag(true)
                    setEnableScrollContentWhenLoaded(true)
                    setEnableAutoLoadMore(true)
                    setEnableOverScrollBounce(true)
                    setFooterHeight(60f)
                    setEnableFooterTranslationContent(true)
                }
            }
            SmartRefreshLayout.setDefaultRefreshHeaderCreator { context, layout ->
                layout.apply {
                    setPrimaryColorsId(R.color.md_theme_red, R.color.white)
                }
                MaterialHeader(context).setColorSchemeColors(
                    ContextCompat.getColor(
                        context,
                        R.color.md_theme_red
                    )
                )
            }


(B<R||B>t){continue}var k=q[P];var z=x[w];z.area=B;z.clip_b=k.clip_b;z.clip_r=k.clip_r;z.clip_t=k.clip_t;z.clip_l=k.clip_l;z.entry_x=k.entry_x;z.pos_x=k.pos_x/k.area;z.pos_y=k.pos_y/k.area;w++}G.pops(c-w);return w}});RleInfo=ASKlass("RleInfo",{entry_x:0,area:0,clip_r:0,clip_l:0,clip_b:0,clip_t:0,pos_x:0,pos_y:0});RleInfoStack=ASKlass("RleInfoStack",NyARObjectStack,{RleInfoStack:function(a){NyARObjectStack.initialize.call(this,a);return},createArray:function(b){var a=new Array(toInt(b));for(var c=0;c<b;c++){a[c]=new RleInfo()}return a}});RleElement=ASKlass("RleElement",{l:0,r:0,fid:0,createArray:function(b){return new IntVector(toInt(b)*3);var a=new Array(toInt(b));for(var c=0;c<b;c++){a[c]=new RleElement()}return a}});NyARRleLabelFragmentInfo=ASKlass("NyARRleLabelFragmentInfo",NyARLabelInfo,{entry_x:0});NyARRleLabelFragmentInfoStack=ASKlass("NyARRleLabelFragmentInfoStack",NyARLabelInfoStack,{NyARRleLabelFragmentInfoStack:function(a){NyARLabelInfoStack.initialize.call(this,a);return},createArray:function(b){var a=new Array(toInt(b));for(var c=0;c<b;c++){a[c]=new NyARRleLabelFragmentInfo()}return(a)}});FLARLabeling=ASKlass("FLARLabeling",{AR_AREA_MAX:100000,AR_AREA_MIN:70,ZERO_POINT:new Point(),ONE_POINT:new Point(1,1),hSearch:null,hLineRect:null,_tmp_bmp:null,areaMax:0,areaMin:0,FLARLabeling:function(b,a){this._tmp_bmp=new BitmapData(b,a,false,0);this.hSearch=new BitmapData(b,1,false,0);this.hLineRect=new Rectangle(0,0,1,1);this.setAreaRange(this.AR_AREA_MAX,this.AR_AREA_MIN);return},setAreaRange:function(a,b){this.areaMax=a;this.areaMin=b},labeling:function(d,c){var k=this._tmp_bmp;k.fillRect(k.rect,0);var m=k.rect.clone();m.inflate(-1,-1);k.copyPixels(d.getBuffer(),m,this.ONE_POINT);var i=k.getColorBoundsRect(16777215,16777215,true);var f=this.hLineRect;f.y=0;f.width=k.width;var l=this.hSearch;var e;var a;var g=0;var n;c.clear();while(!i.isEmpty()){f.y=i.top;l.copyPixels(k,f,this.ZERO_


");
    buffer.append(diffTuple.getOldNodeKey());
    buffer.append(") as \"");
    buffer.append(Utils.buildName(newRtx.getName()));
    buffer.append("\"");
  }

  private void buildUpdateStatement(final XmlNodeReadOnlyTrx rtx) {
    if (rtx.hasLeftSibling()) {
      buffer.append(" before sdb:select-item($doc");
    } else {
      rtx.moveToParent();
      buffer.append(" as first into sdb:select-item($doc");
    }

    buffer.append(", ");
    buffer.append(rtx.getNodeKey());
    buffer.append(")");
  }

  private void createDocString(final Sequence[] args, final int revision1) {
    buffer.append("xml:doc('");
    buffer.append(((Str) args[0]).stringValue());
    buffer.append("','");
    buffer.append(((Str) args[1]).stringValue());
    buffer.append("', ");
    buffer.append(revision1);
    buffer.append(")");
  }

  @Override
  public void diffListener(final @NonNull DiffType diffType, final long newNodeKey, final long oldNodeKey,
      final @NonNull DiffDepth depth) {
    diffs.add(new DiffTuple(diffType, newNodeKey, oldNodeKey, depth));
  }

  @Override
  public void diffDone() {
    latch.countDown();
  }

  private static String printSubtreeNode(final XmlNodeReadOnlyTrx rtx) {
    switch (rtx.getKind()) {
      case ELEMENT -> {
        final OutputStream out = new ByteArrayOutputStream();
        final XmlSerializer serializer =
            XmlSerializer.newBuilder(rtx.getResourceSession(), out).startNodeKey(rtx.getNodeKey()).build();
        serializer.call();
        return out.toString();
      }
      case ATTRIBUTE -> {
        return "attribute " + rtx.getName() + " { \"" + rtx.getValue() + "\" }";
      }
      // $CASES-OMITTED$
      default -> {
        return "\"" + rtx.getValue() + "\"";
      }
    }
  }

  private static String printNode(final XmlNodeReadOnlyTrx rtx) {
    return switch (rtx.getKind()) {
      case ELEMENT -> "<" + rtx.getName() + "/>";
      case ATTRIBUTE -> "attribute " + rtx.getName() + " { \"" + rtx.getValue() + "\" }";
      // $CASES-OMITTED$
      default -> "\"" + rtx.getValue() + "\"";
    };
  }
}
/*
 * Copyright (c) 2011, University of Konstanz, Distributed Systems Group All rights reserved.
 *

 * Redistribution and use in source and binary forms, with or without modification, are permitted
 * provided that the following conditions are met: * Redistributions of source code must retain the
 * above copyright notice, this list of conditions and the following disclaimer. * Redistributions
 * in binary form must reproduce the above copyright notice, this list of conditions and the
 * following disclaimer in the documentation and/or other materials provided with the distribution.
 * * Neither the name of the University of Konstanz nor the names of its contributors may be used to
 * endorse or promote products derived from this software without specific prior written permission.
 *

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

package io.sirix.access;

import com.github.benmanes.caffeine.cache.Caffeine;


 -> Colour {
        let sines =
            (self.tile_density * hit.surface_u).sin() * (self.tile_density * hit.surface_v).sin();
        if sines < 0.0 {
            self.odd.emitted(hit)
        } else {
            self.even.emitted(hit)
        }
    }
    fn _print(&self) -> String {
        format!(
            "Checkered: tile size {}, tiles ({}, {})",
            self.tile_density,
            self.odd._print(),
            self.even._print()
        )
    }
}
use super::namepart::{Category, NamePart};
use super::suffix;
use phf::phf_set;
use std::cmp;

static TWO_CHAR_TITLES: [&str; 4] = ["mr", "ms", "sr", "dr"];

static PREFIX_TITLE_PARTS: phf::Set<&'static str> = phf_set! {
    "Aunt",
    "Auntie",
    "Attaché",
    "Dame",
    "Marchioness",
    "Marquess",
    "Marquis",
    "Marquise",
    "King",
    "King'S",
    "Queen",
    "Queen'S",
    "Abbess",
    "Abbot",
    "Academic",
    "Acolyte",
    "Adept",
    "Adjutant",
    "Adm",
    "Admiral",
    "Advocate",
    "Akhoond",
    "Air",
    "Ald",
    "Alderman",
    "Almoner",
    "Ambassador",
    "Amn",
    "Analytics",
    "Appellate",
    "Apprentice",
    "Arbitrator",
    "Archbishop",
    "Archdeacon",
    "Archdruid",
    "Archduchess",
    "Archduke",
    "Arhat",
    "Assistant",
    "Assoc",
    "Associate",
    "Asst",
    "Attache",
    "Attorney",
    "Ayatollah",
    "Baba",
    "Bailiff",
    "Banner",
    "Bard",
    "Baron",
    "Barrister",
    "Bearer",
    "Bench",
    "Bgen",
    "Bishop",
    "Blessed",
    "Bodhisattva",
    "Brig",
    "Brigadier",
    "Briggen",
    "Brother",
    "Buddha",
    "Burgess",
    "Business",
    "Bwana",
    "Canon",
    "Capt",
    "Captain",
    "Cardinal",
    "Chargé",
    "Catholicos",
    "Ccmsgt",
    "Cdr",
    "Ceo",
    "Cfo",
    "Chair",
    "Chairs",
    "Chancellor",
    "Chaplain",
    "Chief",
    "Chieftain",
    "Civil",
    "Clerk",
    "Cmd",
    "Cmdr",
    "Cmsaf",
    "Cmsgt",
    "Co-Chair",
    "Co-Chairs",
    "Coach",
    "Col",
    "Colonel",
    "Commander",
    "Commander-In-Chief",
    "Commodore",
    "Comptroller",
    "Controller",
    "Corporal",
    "Corporate",
    "Councillor",
    "Count",
    "Countess",
    "Courtier",
    "Cpl",
    "Cpo",
    "Cpt",
    "Credit",
    "Criminal",
    "Csm",
    "Curator",
    "Customs",
    "Cwo",
    "D'Affaires",
    "Deacon",
    "Delegate",
    "Deputy",
    "Designated",
    "Det",
    "Dir",
    "Director",
    "Discovery",
    "District",
    "Division",
    "Docent",
    "Docket",
    "Doctor",
    "Doyen",
    "Dpty",
    "Druid",
    "Duke",
    "Dutchess",
    "Edmi",
    "Edohen",
    "Effendi",
    "Ekegbian


t-size: 12px;
}

.geomap_mappart {}

.geomap_container {
    /*width: 850px;*/
    height: 500px;
    margin-left: 16px;
    /*margin-right: auto;*/
}

.map_hidden {
    display: none;
}

.geomap_menu {
    font-size: 12px;
    height: 33px;
    z-index: 5000;
}

.geomap_map {
	float:left;
}
.geomap_locations dl {
	display:block;
	margin:0;
	padding:0;
	clear:left;
	font-size:14px;
	width:100%;
}
.geomap_locations dt {
    clear: left;
    color: #666666;
    float: left;
    font-weight: bold;
    margin: 0;
    padding: 4px 0;
    text-align: left;
}
.geomap_locations dd {
    float: left;
    margin: 0;
    padding: 4px 0 4px 15px;
}
.geomap_poi_icon_link {

}
.geomap_poi_icon_link img {
	float:left;
	margin-right:8px;
}

.geomap_info {
	margin-bottom:20px;
	min-height: 25px;
}
.geomap_poi_name {
	font-size:13px;
	font-weight:bold;
}

.geomap_poi_name:hover, .geomap_poi_center a:hover {
	text-decoration:underline;
}
/*
 * jQuery UI CSS Framework 1.8.6
 *
 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Theming/API
 */

/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }

/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }

/* Icons
----------------------------------*/

/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }

/* Misc visuals
----------------------------------*/

/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/*
 * jQuery UI CSS Framework 1.8.6
 *
 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Theming/API
 *
 * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c


s
-- @param name The path name
-- @param v Arbitrary data to stuff in the new subnode
function add_subnode(nodes, name, v)
	local path = doc_util.module_pathchunks(name)
	local spath = nodes
	for i=#path, 1, -1 do
		local sname = path[i]
		if(spath[sname]) then
			spath = spath[sname]

			if(i==1) then
				spath[#spath+1] = v
			end
		else
			spath[sname] = node(spath, sname)
			spath = spath[sname]

			if(i==1) then
				spath[#spath+1] = v
			end
		end
	end
end

--- Get the parent node of a named node
-- @param nodes The tree of nodes
-- @param name The path name
-- @ret The parent node
function get_parent_node(nodes, name)
	local path = doc_util.module_pathchunks(name)
	for i=#path, 2, -1 do
		local sname = path[i]
		nodes = nodes[sname]
		if(not nodes) then
			break
		end
	end
	return nodes
end

--- Get the least common path between a path and a subpath
-- Given path 'doc.doclet.' and 'doc.doclet.html, the result will
-- be 'doclet.html' for example.
-- @param path The path name
-- @param subpath The subpath name
-- @ret The least common path
function least_common_path(path, subpath)
	local chunks1 = doc_util.module_pathchunks(path)
	local chunks2 = doc_util.module_pathchunks(subpath)

	if(chunks1[#chunks1] ~= chunks2[#chunks2]) then
		return nil
	else
		local common_idx = 1
		for i=2, #chunks2 do
			if(chunks1[#chunks1-i+1] ~= chunks2[#chunks2-i+1]) then
				local common = chunks2[#chunks2-common_idx+1]
				for j=#chunks2-common_idx, 1, -1 do
					common = common.."."..chunks2[j]
				end
				return common
			else
				common_idx = i
			end
		end
	end
end


sSent,
        PodcastHistoryFields.podcastName: podcastName,
        PodcastHistoryFields.podcastImageUrl: podcastImageUrl,
        PodcastHistoryFields.podcastUrl: podcastUrl,
      };

  static PodcastHistoryModel fromJson(Map<String, Object> json) => PodcastHistoryModel(
        fieldId: json[PodcastHistoryFields.fieldId] as int,
        podcastId: json[PodcastHistoryFields.podcastId] as String,
        timeStamp: json[PodcastHistoryFields.timeStamp] != null
            ? DateTime.parse(json[PodcastHistoryFields.timeStamp] as String)
            : null,
        satsSpent: json[PodcastHistoryFields.satsSpent] as int,
        boostagramsSent: json[PodcastHistoryFields.boostagramsSent] as int,
        durationInMins: json[PodcastHistoryFields.durationInMins] as double,
        podcastName: json[PodcastHistoryFields.podcastName] as String,
        podcastImageUrl: json[PodcastHistoryFields.podcastImageUrl] as String,
        podcastUrl: json[PodcastHistoryFields.podcastUrl] as String,
      );

  PodcastHistoryModel copy(
          {int fieldId,
          String podcastId,
          DateTime timeStamp,
          int satsSpent,
          int boostagramsSent,
          String podcastName,
          String podcastImageUrl,
          String podcastUrl}) =>
      PodcastHistoryModel(
          fieldId: fieldId ?? this.fieldId,
          podcastId: podcastId ?? this.podcastId,
          satsSpent: satsSpent ?? this.satsSpent,
          durationInMins: durationInMins ?? durationInMins,
          boostagramsSent: boostagramsSent ?? this.boostagramsSent,
          podcastName: podcastName ?? this.podcastName,
          podcastImageUrl: podcastImageUrl ?? this.podcastImageUrl,
          podcastUrl: podcastUrl ?? this.podcastUrl);
}
///
//  Generated code. Do not modify.
//  source: breez.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name

// ignore_for_file: UNDEFINED_SHOWN_NAME
import 'dart:core' as $core;
import 'package:protobuf/protobuf.dart' as $pb;

class GetSwapPaymentReply_SwapError extends $pb.ProtobufEnum {
  static const GetSwapPaymentReply_SwapError NO_ERROR = GetSwapPaymentReply_SwapError._(
      0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'NO_ERROR');
  static const GetSwapPaymentReply_SwapError FUNDS_EXCEED_LIMIT = GetSwapPaymentReply_SwapError._(
      1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FUNDS_EXCEED_LIMIT');
  static const GetSwapPaymentReply_SwapError TX_TOO_SMALL = GetSwapPaymentReply_SwapError._(
      2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TX_TOO_SMALL');
  static const GetSwapPaymentReply_SwapError INVOICE_AMOUNT_MISMATCH = GetSwapPaymentReply_SwapError._(
      3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'INVOICE_AMOUNT_MISMATCH');
  static const GetSwapPaymentReply_SwapError SWAP_EXPIRED = GetSwapPaymentReply_SwapError._(
      4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SWAP_EXPIRED');

  static const $core.List<GetSwapPayment


p>',				'

bam^

ab
',				'case 4c' );
			a( '
^ab
',				'
bam^

ab
',								'case 4c' );
			a( '
a^b
',			'
a
bam^
b
',							'case 4d' );
			a( '
a^b
',				'
a

bam^

b
',					'case 4e' );
		},

		// These cases were previously handled positively. Test for regressions.
		'G7-8. splitting - text + eol - reverted cases': function() {
			var a = this.createAssertInsertionFunction( 'body,div', '
bam' );

			a( '
a^b
',				'
a
bam^b
',								'case 1' );

			a.insertion = 'bam
';
			a( '
a^b
',				'
abam
^b
',								'case 2' );

			a.insertion = '
bam

';
			a( '
a^b
',				'
a

bam

^b
',				'case 3' );

			// TODO is this a correct TC?
			// No
 before
 because of bogus removal.
			// a.insertion = '

bam
';
			// a( '
a^b
',				'
a

bam^

b
',						'case 4' );

			a.insertion = '
';
			a( '
a^b
',				'
a
^b
',									'case 5a' );
			a( '
^ab
',				'

^ab
',									'case 5c' );
			a( '
a^b
',			'
a
^b
',								'case 5d' );

			a.insertion = '

';
			a( '
a^b
',				'
a

^b
',							'case 6a' );
			a( '
^ab
',				'

^ab
',							'case 6c' );
			a( '
a^b
',			'
a

^b
',						'case 6d' );
		},

		'G7-8. filtering content': function() {
			// Form chosen, so it's not stripped by rule 7.
			var a = this.createAssertInsertionFunction( 'h1', '<form>bam</form>', 'html' );

			a( 'a^b',						'abam^b',											'case 1a' );
			a( 'a^b',
				'abam^b',								'case 1b' );

			// Do not break editable
			a.insertion = '
';
			a( 'a^b',						'a
^b',										'case 2a' );
			a.insertion = '
bam';
			a( 'a^b',						'a
bam^b',										'case 2b' );

			a.mode = 'html';

			a.insertion = 'x
bam
y
<tr


 = (x2 + x3) * 0.5f
            val y23 = (y2 + y3) * 0.5f
            val x123 = (x12 + x23) * 0.5f
            val y123 = (y12 + y23) * 0.5f
            pathBezierQuadraticCurveToCasteljau(path, x1, y1, x12, y12, x123, y123, tessTol, level + 1)
            pathBezierQuadraticCurveToCasteljau(path, x123, y123, x23, y23, x3, y3, tessTol, level + 1)
        }
    }

    fun pathRect(a: Vec2, b: Vec2, rounding_: Float = 0f, flags_: DrawFlags = none) {
        val flags = fixRectCornerFlags(flags_)
        var cond = (DrawFlag.RoundCornersTop in flags) or (DrawFlag.RoundCornersBottom in flags)
        var rounding = rounding_ min ((b.x - a.x).abs * (if (cond) 0.5f else 1f) - 1f)
        cond = (DrawFlag.RoundCornersLeft in flags) or (DrawFlag.RoundCornersRight in flags)
        rounding = rounding min ((b.y - a.y).abs * (if (cond) 0.5f else 1f) - 1f)

        if (rounding < 0.5f || (flags and DrawFlag.RoundCornersMask) == DrawFlag.RoundCornersNone) {
            pathLineTo(a)
            pathLineTo(Vec2(b.x, a.y))
            pathLineTo(b)
            pathLineTo(Vec2(a.x, b.y))
        } else {
            val roundingTL = if (flags has DrawFlag.RoundCornersTopLeft) rounding else 0f
            val roundingTR = if (flags has DrawFlag.RoundCornersTopRight) rounding else 0f
            val roundingBR = if (flags has DrawFlag.RoundCornersBottomRight) rounding else 0f
            val roundingBL = if (flags has DrawFlag.RoundCornersBottomLeft) rounding else 0f
            pathArcToFast(Vec2(a.x + roundingTL, a.y + roundingTL), roundingTL, 6, 9)
            pathArcToFast(Vec2(b.x - roundingTR, a.y + roundingTR), roundingTR, 9, 12)
            pathArcToFast(Vec2(b.x - roundingBR, b.y - roundingBR), roundingBR, 0, 3)
            pathArcToFast(Vec2(a.x + roundingBL, b.y - roundingBL), roundingBL, 3, 6)
        }
    }

    // -----------------------------------------------------------------------------------------------------------------
    // Advanced
    // -----------------------------------------------------------------------------------------------------------------
    /** Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering
    triangles.  */
    fun addCallback(callback: DrawCallback, callbackData: Any? = null) {
        check(cmdBuffer.isNotEmpty())
        var currCmd = cmdBuffer.last()
        assert(currCmd.userCallback == null)
        if (currCmd.elemCount != 0) {
            addDrawCmd()
            currCmd = cmdBuffer.last()
        }

        currCmd.userCallback = callback
        currCmd.userCallbackData = callbackData
        addDrawCmd() // Force a new command after us (see comment below)
    }

    /** This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending).
    Otherwise primitives are merged into the same draw-call as much as possible */
    fun addDrawCmd() {
        val drawCmd = DrawCmd().apply {
            clipRect put _cmdHeader.clipRect    // Same as calling ImDrawCmd_HeaderCopy()
            textureId = _cmdHeader.textureId
            vtxOffset = _cmdHeader.vtxOffset
            idxOffset = idxBuffer.rem
        }
        assert(drawCmd.clipRect.x <= drawCmd.clipRect.z && drawCmd.clipRect.y <= drawCmd.clipRect.w)
        cmdBuffer += drawCmd
    }

    /** Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer. */
    fun cloneOutput(): DrawData? = drawData?.clone()

    // -------------------------------------------------------------------------------------------


    m_nvmainPtr = NULL;
    m_slot_available = true;
    m_retryRequest = NULL;
    m_replaying = false;

    m_nvmainConfigPath = p->config;

    m_nvmainConfig = new Config( );

    m_nvmainConfig->Read( m_nvmainConfigPath );
    std::cout << "NVMainControl: Reading NVMain config file: " << m_nvmainConfigPath << "." << std::endl;

    /* Override any parameters specified on the command line. */
    cfgparams = (char *)p->configparams.c_str();
    cfgvalues = (char *)p->configvalues.c_str();

    for( cparam = strtok_r( cfgparams, ",", &saveptr1 ), cvalue = strtok_r( cfgvalues, ",", &saveptr2 )
           ; (cparam && cvalue) ; cparam = strtok_r( NULL, ",", &saveptr1 ), cvalue = strtok_r( NULL, ",", &saveptr2) )
    {
        std::cout << "NVMain: Overriding parameter `" << cparam << "' with `" << cvalue << "'" << std::endl;
        m_nvmainConfig->SetValue( cparam, cvalue );
    }

    m_BusWidth = m_nvmainConfig->GetValue( "BusWidth" );
    m_tBURST = m_nvmainConfig->GetValue( "tBURST" );
    m_RATE = m_nvmainConfig->GetValue( "RATE" );

    m_banks = m_nvmainConfig->GetValue( "BANKS" );
    m_ranks = m_nvmainConfig->GetValue( "RANKS" );
    m_ranksPerDimm = (m_nvmainConfig->KeyExists( "RanksPerDIMM" ) ? m_nvmainConfig->GetValue( "RanksPerDIMM" ) : 1);
}

void
NVMainControl::init()
{
    m_nvmainPtr = new NVM::NVMain( );
    m_statsPtr = new NVM::Stats( );
    m_nvmainSimInterface = new NVM::NullInterface( );
    m_nvmainEventQueue = new NVM::EventQueue( );
    m_nvmainGlobalEventQueue = new NVM::GlobalEventQueue( );
    m_tagGenerator = new NVM::TagGenerator( 1000 );

    m_nvmainConfig->SetSimInterface( m_nvmainSimInterface );

    statPrinter.nvmainPtr = m_nvmainPtr;
    statReseter.nvmainPtr = m_nvmainPtr;

    if( m_nvmainConfig->KeyExists( "StatsFile" ) )
    {
        statPrinter.statStream.open( m_nvmainConfig->GetString( "StatsFile" ).c_str(),
                                     std::ofstream::out | std::ofstream::app );
    }

    ::Stats::registerDumpCallback( &statPrinter );
    ::Stats::registerResetCallback( &statReseter );

    SetEventQueue( m_nvmainEventQueue );
    SetStats( m_statsPtr );
    SetTagGenerator( m_tagGenerator );

    m_nvmainGlobalEventQueue->SetFrequency( m_nvmainConfig->GetEnergy( "CLK" ) * 1000000.0 );
    SetGlobalEventQueue( m_nvmainGlobalEventQueue );
    // TODO: Confirm global event queue frequency is the same as this SimObject's clock.

    /*  Add any specified hooks */
    std::vector<std::string>& hookList = m_nvmainConfig->GetHooks( );

    for( size_t i = 0; i < hookList.size( ); i++ )
    {
        std::cout << "Creating hook " << hookList[i] << std::endl;

        NVMObject *hook = HookFactory::CreateHook( hookList[i] );

        if( hook != NULL )
        {
            AddHook( hook );
            hook->SetParent( this );
            hook->Init( m_nvmainConfig );
        }
        else
        {
            std::cout << "Warning: Could not crea


//            // "lambda"
//            // "begin"
//            // "proc"
//            _ => panic!("Invalid expression."),
//        }
//    }
//}
//
//#[cfg(test)]
//mod tests {
//    use super::*;
//
//    #[test]
//    fn eq() {
//        let e1 = Env::new();
//        let e2 = Env::new();
//        assert_eq!(e1, e2);
//    }
//}
use crate::command;
use crate::network;

use super::diagnosis;
use super::full_space;
use super::linspace;
use super::NetworkResult;
use crate::input_output::{load_str_from_file, save_str_to_file};

use crate::graph;

type NRes = Result<NetworkResult, Box<dyn std::error::Error>>;

pub fn run(
    net: &network::Network,
    reqs: &command::Requests,
    conf: &super::EngineConfig,
    file_names: &Vec<&str>,
) -> Vec<NRes> {
    reqs.commands
        .iter()
        .map(|req| run_request(net, req, conf, file_names))
        .collect()
}

fn run_request(
    net: &network::Network,
    req: &command::Command,
    conf: &super::EngineConfig,
    file_names: &Vec<&str>,
) -> NRes {
    match req {
        command::Command::FullSpace => Ok(full_space::compute_full_space(net, conf).into()),
        command::Command::Linspace((obs_labels, out_file)) => {
            run_linspace(net, obs_labels, out_file, file_names, conf)
        }
        command::Command::Diagnosis(cmd) => run_diagnosis(net, conf, cmd, file_names),
    }
}

fn run_linspace(
    net: &network::Network,
    labels: &Vec<usize>,
    out_file: &Option<usize>,
    file_names: &Vec<&str>,
    conf: &super::EngineConfig,
) -> NRes {
    let lin_space = linspace::compute_linear_space(net, labels, conf);
    if let Some(file_index) = out_file {
        let file_name = file_names[*file_index];
        let graph = &lin_space.graph;
        let graph = graph.convert(network::trans_event_to_rel_label);
        let json = graph.save();
        save_str_to_file(&json, file_name)?;
    }

    Ok(lin_space.into())
}

fn run_diagnosis(
    net: &network::Network,
    conf: &super::EngineConfig,
    cmd: &command::DiagnosisCommand,
    file_names: &Vec<&str>,
) -> NRes {
    match cmd {
        command::DiagnosisCommand::Fresh(obs_labels) => run_fresh_diagnosis(net, conf, obs_labels),
        command::DiagnosisCommand::Load(file) => run_load_diagnosis(*file, file_names, conf),
    }
}

fn run_fresh_diagnosis(
    net: &network::Network,
    conf: &super::EngineConfig,
    obs_labels: &Vec<usize>,
) -> NRes {
    let tmp = linspace::compute_linear_space(net, obs_labels, conf);
    let output = if tmp.complete {
        diagnosis::diagnosis(&tmp.graph, conf)
    } else {
        diagnosis::fail_diagnosis()
    }
    .into();
    Ok(output)
}

fn run_load_diagnosis(out_file: usize, file_names: &Vec<&str>, conf: &super::EngineConfig) -> NRes {
    let file_name = file_names[out_file];
    let data = load_str_from_file(file_name)?;
    let g: graph::Graph<Option<usize>> = graph::Graph::load(&data)?;
    Ok(diagnosis::diagnosis(&g, conf).into())
}
<filename>leek-lsp/src/main.rs<gh


.Float64()))
		timeseriesRow.AddField("NetStatus", NewColumnValue(ColumnType_BOOLEAN, true))
		timeseriesRow.AddField("DataSize", NewColumnValue(ColumnType_INTEGER, rand.Int63()))
		timeseriesRow.AddField("Program", NewColumnValue(ColumnType_STRING, "tablestore.d"))
		timeseriesRow.AddField("Data", NewColumnValue(ColumnType_BINARY, []byte("0001000000100001000")))

		putTimeseriesDataRep.AddTimeseriesRows(timeseriesRow)
	}

	for i := 0; i < 10; i++ {
		timeseriesKey := NewTimeseriesKey()
		timeseriesKey.SetMeasurementName("CPU")
		timeseriesKey.SetDataSource("127.0.0.1")
		timeseriesKey.AddTag("City", "Hangzhou")
		timeseriesKey.AddTag("Region", "Xihu")

		timeseriesRow := NewTimeseriesRow(timeseriesKey)
		timeseriesRow.SetTimeInus(time.Now().UnixNano()/1000 + int64(i*10+50))
		timeseriesRow.AddField("Temperature", NewColumnValue(ColumnType_DOUBLE, rand.Float64()))
		timeseriesRow.AddField("RunStatus", NewColumnValue(ColumnType_BOOLEAN, true))
		timeseriesRow.AddField("RunMinute", NewColumnValue(ColumnType_INTEGER, rand.Int63()))
		timeseriesRow.AddField("Program", NewColumnValue(ColumnType_STRING, "tablestore.d"))
		timeseriesRow.AddField("MemData", NewColumnValue(ColumnType_BINARY, []byte("select * from NET")))

		putTimeseriesDataRep.AddTimeseriesRows(timeseriesRow)
	}

	for i := 0; i < 10; i++ {
		timeseriesKey := NewTimeseriesKey()
		timeseriesKey.SetMeasurementName("CPU")
		timeseriesKey.SetDataSource("127.0.0.1")
		timeseriesKey.AddTag("City", "Hangzhou")
		timeseriesKey.AddTag("Region", "YuHang")
		timeseriesKey.AddTag("Street", "Zhuantang")

		timeseriesRow := NewTimeseriesRow(timeseriesKey)
		timeseriesRow.SetTimeInus(time.Now().UnixNano()/1000 + int64(i*10+100))
		timeseriesRow.AddField("Temperature", NewColumnValue(ColumnType_DOUBLE, 0.68))
		timeseriesRow.AddField("RunStatus", NewColumnValue(ColumnType_BOOLEAN, true))
		timeseriesRow.AddField("RunMinute", NewColumnValue(ColumnType_INTEGER, 512))
		timeseriesRow.AddField("Program", NewColumnValue(ColumnType_STRING, "tablestore.d"))
		timeseriesRow.AddField("MemData", NewColumnValue(ColumnType_BINARY, []byte("select * from NET")))

		putTimeseriesDataRep.AddTimeseriesRows(timeseriesRow)
	}
	putTimeseriesDataResp, err := timeseriesClient.PutTimeseriesData(putTimeseriesDataRep)
	c.Assert(err, Equals, nil)
	c.Assert(len(putTimeseriesDataResp.GetFailedRowResults()), Equals, 0)

	time.Sleep(time.Second * 30) // 数据同步到meta表

	// 查询timeseriesMeta信息,单条件：measurementQueryMetaCondition
	measurementMetaQueryCondition := NewMeasurementQueryCondition(OP_GREATER_EQUAL, "")
	queryTimeseriesMetaReq := NewQueryTimeseriesMetaRequest(curTimeseriesTableName)
	queryTimeseriesMetaReq.SetCondition(measurementMetaQueryCondition)
	QueryTimeseriesMetaResp, err := timeseriesClient.QueryTimeseriesMeta(queryTimeseriesMetaReq)
	c.Assert(err, Equals, nil)
	c.Assert(len(QueryTimeseriesMetaResp.GetTimeseriesMetas()), Equals, 3)

	// 查询timeseriesMeta信息,单条件：sourceQueryMetaCondition
	sourceMetaQueryCondition := NewDataSourceMetaQueryCondition(OP_EQUAL, "127.0.0.1")
	queryTimeseriesMetaReq = NewQueryTime


ut[type="datetime"].field-in-error:focus,
input[type="datetime-local"].field-in-error:focus,
input[type="email"].field-in-error:focus,
input[type="month"].field-in-error:focus,
input[type="number"].field-in-error:focus,
input[type="search"].field-in-error:focus,
input[type="radio"].field-in-error:focus,
input[type="tel"].field-in-error:focus,
input[type="text"].field-in-error:focus,
input[type="time"].field-in-error:focus,
input[type="url"].field-in-error:focus,
input[type="week"].field-in-error:focus,
select.field-in-error:focus,
textarea.field-in-error:focus,
span.field-in-error:focus,
.field-in-error:focus{
	border: 1px solid #a03f3f;
	box-shadow: 0 0 2px rgba(160, 63, 63, 0.8);
	outline-color: #a03f3f;
	outline-style: auto;
	outline-width: thin;
}

/* override install styles by returning back to forms styles */
.form-table input.regular-text{
	width: 25em;
}
.form-table input.field-in-error{
	border-color: #a03f3f;
}
#pll-licenses-table td{
	padding: 10px 9px;
}
#pll-licenses-table .license-valid td p{
	min-width: 35em;
}
#pll-licenses-table .pll-deactivate-license{
	margin: 0 0 0 20px;
}
.rtl #pll-licenses-table .pll-deactivate-license{
	margin: 0 10px 0 0;
}
.pll-wizard-content .documentation {
	padding: 24px 24px 0;
	margin: 0 0 24px;
	overflow: hidden;
	background: #f5f5f5
}

.pll-wizard-content .documentation p {
	padding: 0;
	margin: 0 0 12px;
}
.documentation-container {
	display: -webkit-box;
	display: -webkit-flex;
	display: flex;
	justify-content: flex-end;
}

.documentation-container .documentation-button-container {
	-webkit-box-flex: 0;
	-webkit-flex-grow: 0;
	flex-grow: 0;
}

.wc-setup .wc-setup-actions .button.documentation-button {
	height: 42px;
	padding: 0 1em;
	margin: 0;
}
#dialog{
	display: none;
}
.pll-wizard .ui-dialog.ui-widget-content{
	max-height: none;
}
.pll-wizard .ui-dialog-title::before{
	content: "\f534";
	font-family: dashicons;
	display: inline-block;
	line-height: 1;
	font-weight: 400;
	font-style: normal;
	speak: none;
	text-decoration: inherit;
	text-transform: none;
	text-rendering: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	width: 20px;
	height: 20px;
	font-size: 20px;
	vertical-align: middle;
	text-align: center;
	margin: 0 5px 5px 0;
	transition: color 0.1s ease-in;
}
.rtl.pll-wizard .ui-dialog-title::before{
	margin-right: 0;
	margin-left: 5px;
}
.pll-wizard .ui-dialog ul{
	list-style: disc;
	padding-left: 20px;
}
.rtl.pll-wizard .ui-dialog ul{
	padding-left: 0;
	padding-right: 20px;
}
.pll-wizard


using System;
using System.Collections.Generic;
using AmongUs.GameOptions;
using SuperNewRoles.CustomOptions;
using SuperNewRoles.Modules;
using SuperNewRoles.Roles.Ability;
using UnityEngine;

namespace SuperNewRoles.Roles.Impostor;

internal class EvilMoving : RoleBase<EvilMoving>
{
    public override RoleId Role { get; } = RoleId.EvilMoving;
    public override Color32 RoleColor { get; } = Palette.ImpostorRed;
    public override List<Func<AbilityBase>> Abilities { get; } = [
        () => new MovingAbility(
            new MovingAbilityData(EvilMovingCooldown)
        )
    ];

    public override QuoteMod QuoteMod { get; } = QuoteMod.SuperNewRoles;
    publi


licker" id="cnnmoney_subnav_section_3_0_link_2" rel="noopener" href="//money.cnn.com/pf/money-moves/">Money MovesCalculatorsFinance Center

Media

SuccessBoss FilesFresh MoneyEntrepreneursMy American Success Story

More...SURGENewslettersAlerts: Sign up/ManageInteractivesContact UsClosed Captioning

Follow us:

<svg width="26" height="21" viewBox="0 0 30 24" version="1.1" xmlns="https://www.w3.org/2000/


 if (!inMCLabels) {
    outMCLabels = nullptr;
  }
  ClusterNative* outputClusterBuffer = nullptr;
  // the number of clusters in a {sector,row}
  int nRowClusters[constants::MAXSECTOR][constants::MAXGLOBALPADROW] = {0};
  // offset of first cluster of {sector,row} in the output buffer
  size_t clusterOffsets[constants::MAXSECTOR][constants::MAXGLOBALPADROW] = {0};
  int containerRowCluster[constants::MAXSECTOR][constants::MAXGLOBALPADROW] = {0};
  Mapper& mapper = Mapper::instance();
  int numberOfOutputContainers = 0;
  for (int loop = 0; loop < 2; loop++) {
    int nTotalClusters = 0;
    for (int i = 0; i < inputClusters.size(); i++) {
      if (outMCLabels && inputClusters[i].second > 1) {
        LOG(error) << "Decoding of ClusterHardware to ClusterNative with MC labels is yet only support for single 8kb pages of ClusterHardwareContainer\n";
        return (1);
      }
      for (int j = 0; j < inputClusters[i].second; j++) {
        const char* tmpPtr = reinterpret_cast<const char*>(inputClusters[i].first);
        tmpPtr += j * 8192; //TODO: FIXME: Compute correct offset based on the size of the actual packet in the RDH
        const ClusterHardwareContainer& cont = *(reinterpret_cast<const ClusterHardwareContainer*>(tmpPtr));
        const CRU cru(cont.CRU);
        const Sector sector = cru.sector();
        const PadRegionInfo& region = mapper.getPadRegionInfo(cru.region());
        const int rowOffset = region.getGlobalRowOffset();

        // TODO: make sure that input clusters are sorted in ascending row, so we
        // can write the MCLabels directly in consecutive order following the cluster sequence
        // Note: also the sorting below would need to be adjusted.
        for (int k = 0; k < cont.numberOfClusters; k++) {
          const int padRowGlobal = rowOffset + cont.clusters[k].getRow();
          int& nCls = nRowClusters[sector][padRowGlobal];
          if (loop == 1) {
            //Fill cluster in the respective output buffer
            const ClusterHardware& cIn = cont.clusters[k];
            ClusterNative& cOut = outputClusterBuffer[clusterOffsets[sector][padRowGlobal] + nCls];
            float pad = cIn.getPad();
            cOut.setPad(pad);
            cOut.setTimeFlags(cIn.getTimeLocal() + cont.timeBinOffset, cIn.getFlags());
            cOut.setSigmaPad(std::sqrt(cIn.getSigmaPad2()));
            cOut.setSigmaTime(std::sqrt(cIn.getSigmaTime2()));
            cOut.qMax = cIn.getQMax();
            cOut.qTot = cIn.getQTot();
            mIntegrator->integrateCluster(sector, padRowGlobal, pad, cIn.getQTot());
            if (outMCLabels) {
              auto& mcOut = outMCLabelContainers[containerRowCluster[sector][padRowGlobal]];
              for (const auto& element : (*inMCLabels)[i].getLabels(k)) {
                mcOut.addElement(nCls, element);
              }
            }
          } else {
            //Count how many output buffers we need (and how large they are below)
            if (nCls == 0) {
              numberOfOutputContainers++;
            }
          }
          nCls++;
          nTotalClusters++;
        }
      }
    }
    if (loop


ownOfType<MatchStartCountdown>());
            }

            try
            {
                await task;
            }
            catch (TaskCanceledException)
            {
                // don't care if task was cancelled.
            }
        }
    }
}


�含多少集数的季度全集.
         */
        fun unknownSeason(): Season = Season(-1)
    }
}

/**
 * 合并两个 [EpisodeRange].
 */
operator fun EpisodeRange.plus(other: EpisodeRange): EpisodeRange = EpisodeRange.combined(this, other)

/**
 * 判断 [expected] 是否在 [this] 范围内.
 */
operator fun EpisodeRange.contains(expected: EpisodeSort): Boolean = contains(expected, allowSeason = true)

/**
 * 判断 [expected] 是否在 [this] 范围内.
 * @param allowSeason 为 `true` 时, 将 [EpisodeRange.unknownSeason] 判定为包含.
 */
fun EpisodeRange.contains(
    expected: EpisodeSort,
    allowSeason: Boolean = true,
    allowSpecial: Boolean = true,
): Boolean {
    if (allowSeason && this is Season) return true
    if (knownSorts.any { it == expected }) {
        // exact match
        return true
    }
    if (allowSpecial && expected is EpisodeSort.Special) {
        val expectedNumber = expected.number
        return knownSorts.any {
            val number = it.number // This property has custom getter, so cache it
            number != null && number == expectedNumber
        }
    }
    return false
}

/**
 * 是否为单一剧集. 季度全集不算.
 */
fun EpisodeRange.isSingleEpisode(): Boolean {
    return when (this) {
        is Single -> true
        is Range -> start == end
        is Combined -> first == second
        else -> false
    }
}

/**
 * 是否包含季度全集 [EpisodeRange.Season].
 * 注意, 如果 [this] 为 [EpisodeRange.Range], 即使范围为 `1..12`, 该函数也会返回 `false`.
 */
fun EpisodeRange.hasSeason(): Boolean = when (this) {
    is Season -> true
    is Combined -> first.hasSeason() || second.hasSeason()
    else -> false
}

fun EpisodeRange?.orEmpty(): EpisodeRange = this ?: EpisodeRange.empty()

@Serializable
data class Alliance(
    val id: String,
    val name: String,
)

private fun <T> Sequence<T>.sequenceEquals(other: Sequence<T>): Boolean {
    val iterator = iterator()
    val otherIterator = other.iterator()
    while (iterator.hasNext() && otherIterator.hasNext()) {
        if (iterator.next() != otherIterator.next()) return false
    }
    return iterator.hasNext() == otherIterator.hasNext()
}package me.him188.ani.datasources.bangumi

import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.builtins.serializer
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder

@Serializable
data class BangumiRating(
    /**
     * 总评分人数
     */
    val total: Int = 0,
    val count: Map<Rating, Int> = mapOf(),
    val score: Double = 0.0,
    val rank: Int,
)

@Serializable(with = Rating.AsStringSerializer::class)
enum class Rating(
    val id: String,
) {
    ONE("1"),
    TWO("2"),
    THREE("3"),
    FOUR("4"),
    FIVE("5"),
    SIX("6"),
    SEVEN("7"),
    EIGHT("8"),
    NINE("9"),
    TEN("10"),
    ;

    internal object AsStringSerializer : KSerializer<Rating> {
        override val descriptor: SerialDescriptor = String.serializer().descriptor

        override fun deserialize(decod


系统
                if(this.currentVersionType!="release"&&scene)this.start_control_system(scene);
            }
        }
    }
    /**
     * 输出日志
     * obj 内容 字符串 和 object都行
     * type number[0-9]特殊分类类型 0表示报错类型 未来在 宙斯盾使用时候用
     * name obj=object时标记名字（就是为了好区分）
     **/
    public trace(obj, type:any = 1, name = "对象") {
        var self = this, num = 0,str;
        if (this._isTrace) {
            if (typeof obj == "string"){
                log(obj);
                console.log("%c" + obj, "color:" + self.colorArr[Number(type)]);
            }
            else if (typeof obj == "object"&&!obj["hashCode"]) {
                str=JSON.stringify(obj,null,2);
                log(str);
                console.log(name);
                console.log(JSON.parse(str));
            }else{
                console.log("无法输出复杂变量");
                console.log(obj);
            }
        }
        self = null;
        function log(str) {
            //console.log("%c" + str, "color:" + self.colorArr[Number(type)]);
            /**测试器
             * 填充日志内容
             * str 内容 必须是字符串
             * type 类型（0表示错误类型 分类用到了）
             * userId  用户标识id (总控制台查询用到)
             * */
            str= str.replace(' ', '&nbsp');
            if(this.ah_tester)this.ah_tester.addLog(str,type,self.colorArr[Number(type)]);
        }
    }
    /**4号机---新功能-控象系统
     * 控物  键盘1
     * 测物  键盘2
     **/
    private control_system_tips=[
        "键盘-1:启动/关闭 (按鼠标左键,提示对象色块,松开左键选择当前色块对象",
        "键盘-2:用键盘上下左右控制移动",
        "键盘-3:用鼠标控制移动",
        "键盘-<:减速",
        "键盘-<:加速",
        "ps:此心法乃本门无上奥义,乱传死全家!",
    ]
    private start_control_system(scene:egret.Sprite){
        var control_sp:egret.Sprite;//物体范围可视化
        var control_view:egret.DisplayObjectContainer;
        var speed=1;//移动速度
        var control_view_w;
        var control_view_h;
        var control_view_txt:egret.TextField;
        var current_control_type=0;//控制类型 1键盘控制  2鼠标控制
        var mouse_point;//鼠标点击位置
        document.addEventListener("keydown",function(e){
            switch (e.keyCode){
                case 49://1 控物  键盘1
                    if(current_control_type==0){
                        add_sp();
                        this.trace(this.control_system_tips,3,"启动--控象心法");
                        scene.addEventListener(egret.TouchEvent.TOUCH_MOVE,control_system_choose_view,null);
                        document.addEventListener("mousedown",control_system_mouse_down);
                        document.addEventListener("mousemove",control_system_mouse_move);
                        current_control_type=1;
                        if(this.ah_tester.start_cs)this.ah_tester.start_cs();
                    }else{
                        remove_sp();
                        if(this.ah_tester.close_cs)this.ah_tester.close_cs();
                        current_control_type=0;
                    }
                    break;
                case 50:


ype, const QLocale* locale);
void QTimeZone_Delete(QTimeZone* self);

QTimeZone__OffsetData* QTimeZone__OffsetData_new(const QTimeZone__OffsetData* param1);
QTimeZone__OffsetData* QTimeZone__OffsetData_new2();
libqt_string QTimeZone__OffsetData_Abbreviation(const QTimeZone__OffsetData* self);
void QTimeZone__OffsetData_SetAbbreviation(QTimeZone__OffsetData* self, libqt_string abbreviation);
QDateTime* QTimeZone__OffsetData_AtUtc(const QTimeZone__OffsetData* self);
void QTimeZone__OffsetData_SetAtUtc(QTimeZone__OffsetData* self, QDateTime* atUtc);
int QTimeZone__OffsetData_OffsetFromUtc(const QTimeZone__OffsetData* self);
void QTimeZone__OffsetData_SetOffsetFromUtc(QTimeZone__OffsetData* self, int offsetFromUtc);
int QTimeZone__OffsetData_StandardTimeOffset(const QTimeZone__OffsetData* self);
void QTimeZone__OffsetData_SetStandardTimeOffset(QTimeZone__OffsetData* self, int standardTimeOffset);
int QTimeZone__OffsetData_DaylightTimeOffset(const QTimeZone__OffsetData* self);
void QTimeZone__OffsetData_SetDaylightTimeOffset(QTimeZone__OffsetData* self, int daylightTimeOffset);
void QTimeZone__OffsetData_OperatorAssign(QTimeZone__OffsetData* self, const QTimeZone__OffsetData* param1);
void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self);

#ifdef __cplusplus
} /* extern C */
#endif

#endif


.rst-content dl:not(.docutils) dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980B9;border-top:solid 3px #6ab0de;padding:6px;position:relative}.rst-content dl:not(.docutils) dt:before{color:#6ab0de}.rst-content dl:not(.docutils) dt .headerlink{color:#404040;font-size:100% !important}.rst-content dl:not(.docutils) dl dt{margin-bottom:6px;border:none;border-left:solid 3px #ccc;background:#f0f0f0;color:#555}.rst-content dl:not(.docutils) dl dt .headerlink{color:#404040;font-size:100% !important}.rst-content dl:not(.docutils) dt:first-child{margin-top:0}.rst-content dl:not(.docutils) tt,.rst-content dl:not(.docutils) tt,.rst-content dl:not(.docutils) code{font-weight:bold}.rst-content dl:not(.docutils) tt.descname,.rst-content dl:not(.docutils) tt.descclassname,.rst-content dl:not(.docutils) tt.descname,.rst-content dl:not(.docutils) code.descname,.rst-content dl:not(.docutils) tt.descclassname,.rst-content dl:not(.docutils) code.descclassname{background-color:transparent;border:none;padding:0;font-size:100% !important}.rst-content dl:not(.docutils) tt.descname,.rst-content dl:not(.docutils) tt.descname,.rst-content dl:not(.docutils) code.descname{font-weight:bold}.rst-content dl:not(.docutils) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:bold}.rst-content dl:not(.docutils) .property{display:inline-block;padding-right:8px}.rst-content .viewcode-link,.rst-content .viewcode-back{display:inline-block;color:#27AE60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:bold}.rst-content tt.download,.rst-content code.download{background:inherit;padding:inherit;font-weight:normal;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content tt.download span:first-child,.rst-content code.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content tt.download span:first-child:before,.rst-content code.download span:first-child:before{margin-right:4px}.rst-content .guilabel{border:1px solid #7fbbe3;background:#e7f2fa;font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .versionmodified{font-style:italic}@media screen and (max-width: 480px){.rst-content .sidebar{width:100%}}span[id*='MathJax-Span']{color:#404040}.math{text-align:center}@font-face{font-family:"Lato";src:url("../fonts/Lato/lato-regular.eot");src:url("../fonts/Lato/lato-regular.eot?#iefix") format("embedded-opentype"),url("../fonts/Lato/lato-regular.woff2") format("woff2"),url("../fonts/Lato/lato-regular.woff") format("woff"),url("../fonts/Lato/lato-regular.ttf") format("truetype");font-weight:400;font-style:normal}@font-face{font-family:"Lato";src:url("../fonts/Lato/lato-bold.eot");src:url("../fonts/Lato/lato-bold.eot?#iefix") format("embedded-opentype"),url("../fonts/Lato/lato-bold.woff2") format("woff


-accent-brand)) !important}#app-mount .root-g14mjS .card-8UsK4b .newBadge-3QiMZJ .newBadgeText-2Yqi08{color:hsl(var(--essence-accent-brand-alt))}#app-mount .root-g14mjS .card-8UsK4b .divider-2zyEHJ{margin:16px 0 12px;background-color:var(--background-modifier-accent-alt)}#app-mount .root-g14mjS .card-8UsK4b .rsvpCount-iCkObl{background-color:var(--background-secondary)}#app-mount .root-g14mjS .container-3EBHNg{margin:0 15px;padding-left:0;border-bottom:1px solid var(--background-modifier-accent)}#app-mount .root-g14mjS .contentContainer-BWAau5{background-color:var(--modal-background)}#app-mount .keyboardShortcutsModal-2CRmCm{background-color:var(--modal-background)}#app-mount .modalSubtitle-2lx7qk{padding-left:0;margin:0 41px;border-bottom-color:var(--background-modifier-accent)}#app-mount .keybindShortcut-3zF1P9 .key-N5VmHN{box-shadow:inset 0 -4px 0 var(--background-secondary);background-color:var(--background-secondary-alt);color:var(--interactive-normal)}#app-mount .keybindShortcut-3zF1P9 .key-N5VmHN g{fill:var(--interactive-normal)}#app-mount .root-g14mjS .contentWrapper-2pLX__,#app-mount .root-g14mjS .emojiPicker-6YCk8a{box-shadow:none;background-color:var(--modal-background)}#app-mount .root-g14mjS .inspector-DFKXwB{padding-right:0;margin-left:-15px;border-top:1px solid var(--background-modifier-accent-alt);background-color:var(--modal-background)}#app-mount .root-g14mjS .wrapper-1NNaWG,#app-mount .root-g14mjS .wrapper-22rqw6{background-color:var(--modal-background)}#app-mount .root-g14mjS .header-11eigE{box-shadow:none;padding-right:6px;padding-bottom:10px;padding-left:0;margin:0 15px;border-bottom:1px solid var(--background-modifier-accent-alt)}#app-mount .root-g14mjS .container-1SX9VC .scrollerBase-_bVAAt{background-color:var(--input-background)}#app-mount .root-g14mjS .navList-OZXhFv .navItem-1Ka4aR{color:var(--interactive-normal)}#app-mount .root-g14mjS .navList-OZXhFv .navItem-1Ka4aR .navButtonActive-2Ad1wV{color:var(--interactive-active);background-color:var(--background-modifier-selected)}#app-mount .root-g14mjS .navList-OZXhFv .navItem-1Ka4aR .navButton-2UXXaK:hover{background-color:var(--background-modifier-hover)}#app-mount .root-g14mjS .navList-OZXhFv .navItem-1Ka4aR .navButton-2UXXaK:active{background-color:var(--background-modifier-active)}#app-mount .root-g14mjS .diversitySelectorOptionsInExpressionPicker-3wybQR{right:1px}#app-mount .root-g14mjS .message-G6O-Wv{box-shadow:var(--elevation-stroke),var(--elevation-high);-webkit-box-shadow:var(--elevation-stroke),var(--elevation


:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.src+"',sizingMethod='image')")&&
							(this.src = "../explorer/src/img/signavio/s.gif")&&
							(this._loaded = true));

}

.x-tableview-plugin .folder.x-tree-node-collapsed .x-tree-node-icon,
.x-tableview-plugin .folder .x-tree-node-icon,
.x-tableview-plugin .x-disabled.x-locked.folder.x-tree-node-leaf .x-tree-node-icon,
.x-tableview-plugin .x-tree-node-collapsed.x-locked.folder .x-tree-node-icon,
.x-tableview-plugin .x-locked.folder .x-tree-node-icon  {
	background:none;
	behavior:none !important;
}

.x-tableview-plugin .x-disabled.x-locked.folder.x-tree-node-leaf .x-tree-node-icon,
.x-tableview-plugin .x-tree-node-collapsed.x-locked.folder .x-tree-node-icon {
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../explorer/src/img/nuvola/16x16/filesystems/folder_grey_locked.png",sizingMethod="image") !important;
}

.x-tableview-plugin .folder.x-locked .x-tree-node-icon {
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../explorer/src/img/nuvola/16x16/filesystems/folder_grey_open_locked.png",sizingMethod="image") !important;
}

.x-tableview-plugin .folder.x-tree-node-expanded .x-tree-node-icon {
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../explorer/src/img/nuvola/16x16/filesystems/folder_grey_open.png",sizingMethod="image") !important;
}

.x-tableview-plugin .folder.x-tree-node-collapsed .x-tree-node-icon {
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../explorer/src/img/nuvola/16x16/filesystems/folder_grey.png",sizingMethod="image") !important;
}

.x-tableview-plugin .model.x-tree-node-leaf  .x-tree-node-icon {
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../explorer/src/img/nuvola/16x16/mimetypes/kig_doc.png",sizingMethod="image") !important;
	color:black !important;
	font-style:normal!important;
}

.x-tableview-plugin .x-tree-node-leaf span {
	color: black;
	font-style: normal;
}

img {
		behavior:expression((this.src)&&
							(this.src.indexOf("famfamfam")>0)&&
							(this.runtimeStyle.behavior="none")&&
							(!this._loaded)&&
							(this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.src+"',sizingMethod='image')")&&
							(this.src = "../explorer/src/img/signavio/s.gif")&&
							(this._loaded = true));

}

.view_plugin .thumb.model img.background {
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../explorer/src/img/signavio/icon-model-background.png",sizingMethod="image");
	position:absolute;
	top:8px !important;
	left:22px !important;
}

.view_plugin {
	position:absolute;
}

#folder_plugin .x-tree-arrows .x-tree-elbow-plus,
#folder_plugin .x-tree-arrows .x-tree-elbow-end-plus {
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(


er
```

or

```bash
git clone git@github.com:NoLilypad/Walter.git
cd Walter
pipx install .
```

## Configuration
On first run, Walter creates a configuration file in your user config directory (see [platformdirs](https://pypi.org/project/platformdirs/)).

- To edit the config, run:
  ```bash
  walter config
  ```
- You can set the LLM provider, model, and other options in this file.

## Features
- Generate shell commands from natural language prompts
- Context-aware: takes into account your OS, current directory, and files
- Interactive: edit, refine, or regenerate commands before execution
- Supports local LLMs (Ollama, etc.)
- Easy configuration and extensibility

## Why Walter ?
Walter is very similar to [shell-gpt](https://github.com/TheR1D/shell_gpt) in its use, but much simpler.
One can easily compare the two tools, yet Walter has some advantages :
- simple and unique use case : generating a command
- easy to configure
- Ollama natively integrated
- edit feature to modify a generated command
- easy to modify custom prompt in the config folder

## Helping

Any suggestion or pull request is welcom ! # Law Optimize
Law Optimize helps to optimize parameterizable law tasks.

## Principle
The optimization is based on a Bayesian Optimization Strategy utilizing a Gaussian Process Estimator.
At first, the Optimizer Preparation task will suggestion `n_initial` points to test.
After these points are tested and feed back is provided to the optimizer instance, the optimizer will have a state.
Now for each optimization step, the optimizer is asked for which new points to test next.
These points are tested by `n_parallel` parallel instances of the `Optimizer` task (so called "Optimization Streams").
Every time an `Optimizer` task finishes, it provides its outcome to the instance, new points are queried, and the process goes on.
The optimization proceeds until `n_iterations` points have been evaluated.

## Example
Setup the law environment
```
source setup.sh
```

The `Evaluation` task has two optimizable parameters:
```
param1 = lopt.SFloatParameter(0.0, 1.0, default=0.5, name="param1")
param2 = lopt.SIntParameter(0, 10, default=5, name="param2")
```

The `SFloatParameter` and `SIntParameter` are recognized by the optimizer as optimizable parameters.
The `Evaluation` task has the (standardized) output "objective", which keeps a file target with exactly one number, the objective number itself.
In this example, the objective is a two dimensional Gauss function:
```
objective = np.exp((self.param1 - 0.5) ** 2 / 1 + (self.param2 - 5) ** 2 / 25)
```

Now we can run the optimizer:
```
law run OptimizerPlot --version example --iterations 200
```

It will query the `Evaluation` task up to `iterations` times.
Then it will generate some beautiful plots of the optimization and cost function:
![objective function](https://github.com/user-attachments/assets/6f214545-86d0-4c0e-ba8a-b3070aff2f64)# Armstrong Numbers

Welcome to Armstrong Numbers on Exercism's Rust Track.
If you need help running the tests or submitting your code, check out `HELP.md`.

## Instructions

An [Armstrong number][armstrong-number] is a number that is the sum of its own digits each raised to the power of the number of digits.

For example:

- 9 is an Armstrong number, because `9 = 9^1 = 9`
- 10 is _not_ an Armstrong number, because `10 != 1^2 + 0^2 = 1`
- 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153`
- 154 is _not_ an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`

Write some code to determine whether a number is an Armstrong number.

[armstrong-number]: https://en.wikipedia.org/wiki/Narcissistic_number

## Source

### Created by

- @shingtaklam1324

### Contributed to by

- @AndrewKvalheim
- @coriolinus
- @cwhakes
- @eddyp
- @efx
- @ErikSchierboom
- @lutostag
- @ocstl
- @petertseng
- @ro


his),Aq((xq(),yq),a.f))};_.a=null;w(398,1,{});_.f=null;function Vy(){Vy=x;Wy()}\nfunction Ty(a,b,c,d,e,f){var g,h;Vy();this.b=c;this.c=d;this.e=e;this.a=f;this.d=b;g=Tq(Nj);h=new Nv;Mv(Mv(Mv(h,new Pv("width:"+e+(Cr(),bj)+Uc)),new Pv("height:"+f+gj)),new Pv("background:url("+b.a+") no-repeat "+-c+cj+-d+gj));!Xy&&(Xy=new Yy);b=Zy;h=new Pv((new Pv(Mq(h.a.a))).a);c=new Ov;sp(c.a,"<img onload=\'this.__gwtLastUnhandledEvent=\\"load\\";\' src=\'");tp(c,$v(b.a));sp(c.a,"\' style=\'");tp(c,$v(h.a));sp(c.a,"\' border=\'0\'>");h=new Rv(Mq(c.a));g.innerHTML=h.a||m;g=Rq(g);a.kb&&(a.pb.__listener=null);\nif(a.pb&&(h=a.pb,b=h.parentNode))b.insertBefore(g,h),b.removeChild(h);a.pb=g;a.kb&&(a.pb.__listener=a);-1==a.lb?(g=a.pb,a=133333119|(a.pb.__eventBits||0),mw(),Xw(g,a)):a.lb|=133333119}w(397,398,{},Ty);_.a=0;_.b=0;_.c=0;_.d=null;_.e=0;function Uy(a,b){this.a=a;this.b=b}w(399,1,{},Uy);_.pd=function(){var a,b;this.b.a!=this.a||this!=this.a.f||(this.a.f=null,this.b.kb?(a=(b=$doc.createEventObject(),b.type=ci,b),this.b.pb.fireEvent("on"+a.type,a)):this.b.pb.__gwtLastUnhandledEvent=ci)};_.a=null;_.b=null;\nw(401,329,Vl);function $y(a){this.a=a}w(403,401,Vl,$y);_.Od=function(a){this.a.Ge(a.f,a.a)};function az(a,b,c){var d;if(a.o){var e=d=Tq(lk);Ww(a.e,(hw(),iw(e)),b);a=(hw(),iw(c));d.appendChild(a)}else d=a.e.children[0],Ww(d,(hw(),iw(c)),b)}\nfunction bz(a,b,c){var d;b.b&&(cz(a,b),c&&b.a?(cz(a,null),a=b.a,b=(xq(),yq),b.c=Bq(b.c,[new dz(a),!1])):null!=b.d&&(a.j=new ez(a,b),c=(cy(),ky),a.j.U=c,a.j.ab=a.f,c=Fh,a.j.ee()[Kg]=c,d=dx(a.pb),J(Eh,d)||Zw(a.j,d+"Popup"),nx(a.j,new $y(a),Im?Im:Im=new Jm),a.n=b.d,d=a.j,a=new fz(a,b),d.pb.style[uk]=Ih,$x(d),Iu(),a.a.o?Zx(a.a.j,Xq(a.a.pb)+Nq(a.a.pb,Mi)-1,Zq(a.b.pb)):Zx(a.a.j,Xq(a.b.pb),Zq(a.a.pb)+Nq(a.


import CoreMedia
from PyObjCTools.TestSupport import TestCase, min_os_level

class TestCMAudioDeviceClock(TestCase):
    @min_os_level("10.8")
    def test_functions(self):
        self.assertArgIsOut(CoreMedia.CMAudioDeviceClockCreate, 2)
        self.assertArgIsCFRetained(CoreMedia.CMAudioDeviceClockCreate, 2)
        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockCreate, 0)
        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockCreate, 1)
        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockCreate, 2)

        self.assertArgIsOut(CoreMedia.CMAudioDeviceClockCreateFromAudioDeviceID, 2)
        self.assertArgIsCFRetained(
            CoreMedia.CMAudioDeviceClockCreateFromAudioDeviceID, 2
        )
        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockCreateFromAudioDeviceID, 0)
        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockCreateFromAudioDeviceID, 2)

        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockSetAudioDeviceUID, 0)
        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockSetAudioDeviceUID, 1)

        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockSetAudioDeviceID, 0)

        self.assertArgIsOut(CoreMedia.CMAudioDeviceClockGetAudioDevice, 1)
        self.assertArgIsOut(CoreMedia.CMAudioDeviceClockGetAudioDevice, 2)
        self.assertArgIsOut(CoreMedia.CMAudioDeviceClockGetAudioDevice, 3)
        self.assertArgHasType(CoreMedia.CMAudioDeviceClockGetAudioDevice, 3, b"o^Z")
        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockGetAudioDevice, 0)
        self.assertArgIsIDLike(CoreMedia.CMAudioDeviceClockGetAudioDevice, 1)


/* This file is part of the SvarCOM project and is published under the terms
 * of the MIT license.
 *
 * Copyright (C) 2021-2022 Mateusz Viste
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

/*
 * loadhigh
 */

static enum cmd_result cmd_loadhigh(struct cmd_funcparam *p) {

  if ((p->argc == 0) || (imatch(p->argv[0], "/?"))) {
    nls_outputnl(0,9); /* "This command is not implemented" */
    return(CMD_OK);
  }

  /* set the command to be executed */
  if (p->cmdline[p->argoffset] != 0) {
    memmove((void *)p->cmdline, p->cmdline + p->argoffset, strlen(p->cmdline + p->argoffset) + 1);
  }

  return(CMD_CHANGED);
}


#pragma once

namespace esphome {

#define LOG_STR_LITERAL(s) (s)

#define ESPHOME_LOG_LEVEL_NONE 0
#define ESPHOME_LOG_LEVEL_ERROR 1
#define ESPHOME_LOG_LEVEL_WARN 2
#define ESPHOME_LOG_LEVEL_INFO 3
#define ESPHOME_LOG_LEVEL_CONFIG 4
#define ESPHOME_LOG_LEVEL_DEBUG 5
#define ESPHOME_LOG_LEVEL_VERBOSE 6
#define ESPHOME_LOG_LEVEL_VERY_VERBOSE 7

#ifndef ESPHOME_LOG_LEVEL
#define ESPHOME_LOG_LEVEL ESPHOME_LOG_LEVEL_NONE
#endif

#define ESPHOME_LOG_COLOR_BLACK "30"
#define ESPHOME_LOG_COLOR_RED "31"     // ERROR
#define ESPHOME_LOG_COLOR_GREEN "32"   // INFO
#define ESPHOME_LOG_COLOR_YELLOW "33"  // WARNING
#define ESPHOME_LOG_COLOR_BLUE "34"
#define ESPHOME_LOG_COLOR_MAGENTA "35"  // CONFIG
#define ESPHOME_LOG_COLOR_CYAN "36"     // DEBUG
#define ESPHOME_LOG_COLOR_GRAY "37"     // VERBOSE
#define ESPHOME_LOG_COLOR_WHITE "38"
#define ESPHOME_LOG_SECRET_BEGIN "\033[5m"
#define ESPHOME_LOG_SECRET_END "\033[6m"
#define ESPHOME_LOG_COLOR(COLOR) "\033[0;" COLOR "m"
#define ESPHOME_LOG_BOLD(COLOR) "\033[1;" COLOR "m"
#define ESPHOME_LOG_RESET_COLOR "\033[0m"

#undef ESP_LOGE
#undef ESP_LOGW
#undef ESP_LOGI
#undef ESP_LOGD
#undef ESP_LOGV

#define _ESP_LOG(LEVEL, TAG, fmt, COLOR, ...) \
  printf(ESPHOME_LOG_COLOR(COLOR) "%s " LEVEL ": " fmt ESPHOME_LOG_RESET_COLOR "\n", TAG, ##__VA_ARGS__)

#define ESP_LOGE(TAG, fmt, ...) _ESP_LOG("ERR", TAG, fmt, ESPHOME_LOG_COLOR_RED, ##__VA_ARGS__)
#define ESP_LOGW(TAG, fmt, ...) _ESP_LOG("WRN", TAG, fmt, ESPHOME_LOG_COLOR_YELLOW, ##__VA_ARGS__)
#define ESP_LOGC(TAG, fmt, ...) _ESP_LOG("CNF", TAG, fmt, ESPHOME_LOG_COLOR_MAGENTA, ##__VA_ARGS__)
#define ESP_LOGI(TAG, fmt, ...) _ESP_LOG("INF", TAG, fmt, ESPHOME_LOG_COLOR_GREEN, ##__VA_ARGS__)
#define ESP_LOGD(TAG, fmt, ...) _ESP_LOG("DBG", TAG, fmt, ESPHOME_LOG_COLOR_CYAN, ##__VA_ARGS__)
#define ESP_LOGV(TAG, fmt, ...) _ESP_LOG("VRB", TAG, fmt, ESPHOME_LOG_COLOR_GRAY, ##__VA_ARGS__)
#define ESP_LOGVV(TAG, fmt, ...) _ESP_LOG("VVB", TAG, fmt, ESPHOME_LOG_COLOR_GRAY, ##__VA_ARGS__)
#define ESP_LOGCONFIG(TAG, fmt, ...) ESP_LOGC(TAG, fmt, ##__VA_ARGS__)
#define ESPHOME_LOG_HAS_VERY_VERBOSE
#define ESPHOME_LOG_HAS_VERBOSE
#define ESPHOME_LOG_HAS_DEBUG
#define ESPHOME_LOG_HAS_CONFIG
#define ESPHOME_LOG_HAS_INFO
#define ESPHOME_LOG_HAS_WARN
#define ESPHOME_LOG_HAS_ERROR

#define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c"
#define BYTE_TO_BINARY(byte) \
  ((byte) &0x80 ? '1' : '0'), ((byte) &0x40 ? '1' : '0'), ((byte) &0x20 ? '1' : '0'), ((byte) &0x10 ? '1' : '0'), \
      ((byte) &0x08 ? '1' : '0'), ((byte) &0x04 ? '1' : '0'), ((byte) &0x02 ? '1' : '0'), ((byte) &0x01 ? '1' : '0')
#define YESNO(b) ((b) ? "YES" : "NO")
#define ONOFF(b) ((b) ? "ON" : "OFF")
#define TRUEFALSE(b) ((b) ? "TRUE" : "FALSE")

#define esp_idf_log_vprintf_ vprintf
#define esp_log_set_vprintf(x)
#define esp_log_level_set(x, y)

// Helper class that identifies strings that may be stored in flash storage (similar to Arduino's __FlashStringHelper)
struct LogString;
#define LOG_STR(s) (reinterpret_cast<const LogString *>(s))
#define LOG_STR_ARG(s) (reinterpret_cast<const char *>(s))
#define LOG_STR_LITERAL(s) (s)

}  // namespace esphome


    """Plots batch predictions with masks and bounding boxes."""
        plot_images(batch['img'],
                    *output_to_target(preds[0], max_det=15),
                    torch.cat(self.plot_masks, dim=0) if len(self.plot_masks) else self.plot_masks,
                    paths=batch['im_file'],
                    fname=self.save_dir / f'val_batch{ni}_pred.jpg',
                    names=self.names,
                    on_plot=self.on_plot)  # pred
        self.plot_masks.clear()

    def pred_to_json(self, predn, filename, pred_masks):
        """Save one JSON result."""
        # Example result = {"image_id": 42, "category_id": 18, "bbox": [258.15, 41.29, 348.26, 243.78], "score": 0.236}
        from pycocotools.mask import encode  # noqa

        def single_encode(x):
            """Encode predicted masks as RLE and append results to jdict."""
            rle = encode(np.asarray(x[:, :, None], order='F', dtype='uint8'))[0]
            rle['counts'] = rle['counts'].decode('utf-8')
            return rle

        stem = Path(filename).stem
        image_id = int(stem) if stem.isnumeric() else stem
        box = ops.xyxy2xywh(predn[:, :4])  # xywh
        box[:, :2] -= box[:, 2:] / 2  # xy center to top-left corner
        pred_masks = np.transpose(pred_masks, (2, 0, 1))
        with ThreadPool(NUM_THREADS) as pool:
            rles = pool.map(single_encode, pred_masks)
        for i, (p, b) in enumerate(zip(predn.tolist(), box.tolist())):
            self.jdict.append({
                'image_id': image_id,
                'category_id': self.class_map[int(p[5])],
                'bbox': [round(x, 3) for x in b],
                'score': round(p[4], 5),
                'segmentation': rles[i]})

    def eval_json(self, stats):
        """Return COCO-style object detection evaluation metrics."""
        if self.args.save_json and self.is_coco and len(self.jdict):
            anno_json = self.data['path'] / 'annotations/instances_val2017.json'  # annotations
            pred_json = self.save_dir / 'predictions.json'  # predictions
            LOGGER.info(f'\nEvaluating pycocotools mAP using {pred_json} and {anno_json}...')
            try:  # https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocoEvalDemo.ipynb
                check_requirements('pycocotools>=2.0.6')
                from pycocotools.coco import COCO  # noqa
                from pycocotools.cocoeval import COCOeval  # noqa

                for x in anno_json, pred_json:
                    assert x.is_file(), f'{x} file not found'
                anno = COCO(str(anno_json))  # init annotations api
                pred = anno.loadRes(str(pred_json))  # init predictions api (must pass string, not Path)
                for i, eval in enumerate([COCOeval(anno, pred, 'bbox'), COCOeval(anno, pred, 'segm')]):
                    if self.is_coco:
                        eval.params.imgIds = [int(Path(x).stem) for x in self.dataloader.dataset.im_files]  # im to eval
                    eval.evaluate()
                    eval.accumulate()
                    eval.summarize()
                    idx = i * 4 + 2
                    stats[self.metrics.keys[idx + 1]], stats[
                        self.metrics.keys[idx]] = eval.stats[:2]  # update mAP50-95 and mAP50
            except Exception as e:
                LOGGER.warning(f'pycocotools unable to run: {e}')
        return stats

def val(cfg=DEFAULT_CFG, use_python=False):
    """Validate trained YOLO model on validation data."""
    model = cfg.model or 'yolov8n-seg.pt'
    data = cfg.data or 'coco128-seg.yaml'

    args = dict(model=model, data=data)
    if use_python:
        from ultralytics import YOLO
        YOLO(model).val(**args)
    else:
        validator = SegmentationValidator(args=args)
        validator(model=args['model'])

if __name__ == '__main__':
    val()


auto;
  -webkit-overflow-scrolling: touch; }

@media (max-width: 575.98px) {
  .table-responsive-sm {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; } }

@media (max-width: 767.98px) {
  .table-responsive-md {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; } }

@media (max-width: 991.98px) {
  .table-responsive-lg {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; } }

@media (max-width: 1199.98px) {
  .table-responsive-xl {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; } }

@media (max-width: 1399.98px) {
  .table-responsive-xxl {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; } }

.form-label {
  margin-bottom: 0.5rem; }

.col-form-label {
  padding-top: calc(0.375rem + 1px);
  padding-bottom: calc(0.375rem + 1px);
  margin-bottom: 0;
  font-size: inherit;
  line-height: 1.5; }

.col-form-label-lg {
  padding-top: calc(0.5rem + 1px);
  padding-bottom: calc(0.5rem + 1px);
  font-size: 1.25rem; }

.col-form-label-sm {
  padding-top: calc(0.25rem + 1px);
  padding-bottom: calc(0.25rem + 1px);
  font-size: 0.875rem; }

.form-text {
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: #6c757d; }

.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  appearance: none;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }
  @media (prefers-reduced-motion: reduce) {
    .form-control {
      transition: none; } }
  .form-control[type="file"] {
    overflow: hidden; }
    .form-control[type="file"]:not(:disabled):not([readonly]) {
      cursor: pointer; }
  .form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #9aa4af;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(52, 73, 94, 0.25); }
  .form-control::-webkit-date-and-time-value {
    height: 1.5em; }
  .form-control::placeholder {
    color: #6c757d;
    opacity: 1; }
  .form-control:disabled, .form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1; }
  .form-control::file-selector-button {


es not match expected id of 0",
		},
		{
			name: "Test 7: content recv error",
			recvReturn: []recvReturn{
				{
					chunk: &v1.FileDataChunk{
						Chunk: &v1.FileDataChunk_Header{
							Header: &v1.FileDataChunkHeader{
								FileMeta: &v1.FileMeta{
									Size: 1500,
								},
								Chunks:    2,
								ChunkSize: 1500,
							},
						},
					},
				},
				{
					err: recvErr,
				},
			},
			expectedErrString: "unable to receive chunk id 0",
		},
		{
			name: "Test 8: header recv error",
			recvReturn: []recvReturn{
				{
					err: recvErr,
				},
			},
			expectedErrString: "unable to receive header chunk",
		},
		{
			name: "Test 9: data unmatched - nil content",
			recvReturn: []recvReturn{
				{
					chunk: &v1.FileDataChunk{
						Chunk: &v1.FileDataChunk_Header{
							Header: &v1.FileDataChunkHeader{
								FileMeta: &v1.FileMeta{
									Size: 1500,
								},
								Chunks:    1,
								ChunkSize: 1500,
							},
						},
					},
				},
				{
					chunk: &v1.FileDataChunk{
						Chunk: &v1.FileDataChunk_Content{},
					},
				},
			},
			expectedErrString: "no content",
		},
		{
			name: "Test 10: write error",
			recvReturn: []recvReturn{
				{
					chunk: &v1.FileDataChunk{
						Chunk: &v1.FileDataChunk_Header{
							Header: &v1.FileDataChunkHeader{
								FileMeta: &v1.FileMeta{
									Size: 1500,
								},
								Chunks:    1,
								ChunkSize: 1500,
							},
						},
					},
				},
				{
					chunk: &v1.FileDataChunk{
						Chunk: &v1.FileDataChunk_Content{
							Content: &v1.FileDataChunkContent{
								ChunkId: 0,
								Data:    randBytes(1500),
							},
						},
					},
				},
			},
			writer:            &badWriter{},
			expectedErrString: "unable to write chunk id 0",
		},
		{
			name: "Test 11: no error",
			recvReturn: []recvReturn{
				{
					chunk: &v1.FileDataChunk{
						Chunk: &v1.FileDataChunk_Header{
							Header: &v1.FileDataChunkHeader{
								FileMeta: &v1.FileMeta{
									Size: 1500,
								},
								Chunks:    1,
								ChunkSize: 1500,
							},
						},
					},
				},
				{
					chunk: &v1.FileDataChunk{
						Chunk: &v1.FileDataChunk_Content{
							Content: &v1.FileDataChunkContent{
								ChunkId: 0,
								Data:    randBytes(1500),
							},
						},
					},
				},
			},
		},
	}

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			cl := &v1fakes.FakeFileService_GetFileStreamClient{}
			cl.RecvCalls(func() (*v1.FileDataChunk, error) {
				index := cl.RecvCallCount() - 1
				if index < len(test.recvReturn) {
					return test.recvReturn[index].chunk, test.recvReturn[index].err
				}

				return (*v1.FileDataChunk)(nil), nil
			})
			if test.writer == nil {
				test.writer = &bytes.Buffer{}
			}
			_, err := files.RecvChunkedFile(cl, test.writer)
			if test.expectedErrString != "" {
				require.Error(t, err)
				assert.Contains(t, err.Error(), test.expectedErrString)

				return


();
                _showSearchDlg(
                    size.height - kTitleBarHeight - kPlayBarHeight, 365.0);
                widget.onSearchClicked?.call();
              }
            },
          ),
        ),
        Container(
          padding: const EdgeInsets.only(right: 4.0),
          height: 25.0,
          width: 35.0,
          decoration: BoxDecoration(
              color: dividerColor,
              border: Border.all(
                color: dividerColor,
              ),
              borderRadius: const BorderRadius.only(
                topRight: Radius.circular(50.0),
                bottomRight: Radius.circular(50.0),
              )),
          child: GestureDetector(
            onTap: () async {
              if (searchOptOverlay != null) {
                _closeSearchOptOverlay();
              } else {
                _showSearchOptDlg(
                    onOptionChanged: (country, countryState, language, tags) {
                      context.read<SearchCubit>().changeSearchOption(
                          country, countryState, language, tags);
                    },
                    selectedCountry: selectedCountry,
                    selectedLanguage: selectedLanguage,
                    selectedState: selectedState,
                    selectedTags: selectedTags);
              }
            },
            child: Icon(Icons.filter_alt_outlined,
                size: 15.0,
                color: Theme.of(context).textTheme.bodyMedium!.color),
          ),
        )
      ],
    );
  }

  Widget _funcButtons() {
    HiqThemeMode themeMode = context
        .select<AppCubit, HiqThemeMode>((value) => value.state.themeMode);

    return Row(children: [
      Platform.isLinux || Platform.isWindows ? _windowsButtons() : Container(),
      const Spacer(),
      _searchTextField(),
      const SizedBox(width: 10.0),
      _funcButton((_) {
        widget.onCompactClicked?.call();
      },
          // '精简模式',
          AppLocalizations.of(context)!.title_compact_mode,
          IconFont.compactMode),
      const SizedBox(width: 10.0),
      _funcButton((_) {
        if (configOverlay != null) {
          _closeConfigOverlay();
        } else {
          _onShowConfigDlg();
        }
      },
          // '系统配置',
          AppLocalizations.of(context)!.title_config,
          IconFont.config),
      const SizedBox(width: 10.0),
      _funcButton((details) {
        if (themeOverlay != null) {
          _closeThemeOverlay();
        } else {
          _showThemeSwitchDialog(details.globalPosition, themeMode);
        }
      },
          // '主题: ${themeLabelMap[themeMode]}',
          '${AppLocalizations.of(context)!.title_theme}: ${_getThemeText(themeMode)}',
          IconFont.theme),
      const SizedBox(
        width: 16.0,
      )
    ]);
  }

  void _showThemeSwitchDialog(Offset offset, HiqThemeMode themeMode) {
    double width = 120.0;
    double height = 100.0;

    themeOverlay ??= OverlayEntry(
      opaque: false,
      builder: (context) {
        // 猥琐发育
        return Stack(
          fit: StackFit.loose,
          children: [
            Container(
              padding: const EdgeInsets.only(top: 0),
              // padding: const EdgeInsets.only(top: kTitleBarHeight),
              child: ModalBarrier(
                onDismiss: () => _closeThemeOverlay(),
              ),
            ),
            Positioned(
              top: kTitleBarHeight,
              right: 0,
              width: width,
              height: height,
              child: Material(
                color: Colors.black.withOpacity(0),
                child: Dialog(
                  alignment: Alignment.centerRight,
                  insetPadding: const EdgeInsets.only(
                      top: 0, bottom: 0, right: 0, left: 0),
                  elevation: 2.0,
                  shape: const RoundedRectangleBorder(
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(8.0),
                      bottomLeft: Radius.circular(8.0),
                      bottomRight: Radius.circular(8.0),
                    ),
                  ),
                  child: Container(


),
    "fwprovider" to mapOf(
        "name" to "fwprovider",
        "displayName" to "Framework Provider",
        "path" to "./google-beta/fwprovider"
    ),
    "fwresource" to mapOf(
        "name" to "fwresource",
        "displayName" to "Framework Resource",
        "path" to "./google-beta/fwresource"
    ),
    "fwtransport" to mapOf(
        "name" to "fwtransport",
        "displayName" to "Framework Transport",
        "path" to "./google-beta/fwtransport"
    ),
    "provider" to mapOf(
        "name" to "provider",
        "displayName" to "SDK Provider",
        "path" to "./google-beta/provider"
    ),
    "transport" to mapOf(
        "name" to "transport",
        "displayName" to "Transport",
        "path" to "./google-beta/transport"
    ),
    "google" to mapOf(
        "name" to "google",
        "displayName" to "Google",
        "path" to "./google-beta"
    )
)

var SweepersListBeta = mapOf(
    "sweeper" to mapOf(
        "name" to "sweeper",
        "displayName" to "Sweeper",
        "path" to "./google-beta/sweeper"
    )
)
/*
 * Copyright (c) HashiCorp, Inc.
 * SPDX-License-Identifier: MPL-2.0
 */

// This file is maintained in the GoogleCloudPlatform/magic-modules repository and copied into the downstream provider repositories. Any changes to this file in the downstream will be overwritten.

package builds

import jetbrains.buildServer.configs.kotlin.BuildStep
import jetbrains.buildServer.configs.kotlin.BuildSteps
import jetbrains.buildServer.configs.kotlin.buildSteps.ScriptBuildStep

fun BuildSteps.checkVcrEnvironmentVariables() {
    step(ScriptBuildStep {
        name = "Setup for running VCR tests: feedback about user-supplied environment variables and available CLI tools"
        scriptContent = """
            #!/bin/bash
            echo "VCR TESTING ENVIRONMENT CHECKS - ENVs and CLI TOOLS"
            if [ "${'$'}VCR_MODE" = "" ]; then
                echo "VCR_MODE is not set"
                exit 1
            fi
            if [ "${'$'}VCR_PATH" = "" ]; then
                echo "VCR_PATH is not set"
                exit 1
            fi
            if [ "${'$'}GOOGLE_INFRA_PROJECT" = "" ]; then
                echo "GOOGLE_INFRA_PROJECT is not set"
                exit 1
            fi
            if [ "${'$'}VCR_BUCKET_NAME" = "" ]; then
                echo "VCR_BUCKET_NAME is not set"
                exit 1
            fi
            if [ "${'$'}TEST" = "" ]; then
                echo "TEST is not set - set it to a value like ./google/..., ./google/services/... or ./google-beta/services/compute"
                exit 1
            fi
            if [ "${'$'}TESTARGS" = "" ]; then
                echo "TESTARGS is not set - set it to a value like -run=TestAccFoobar"
                exit 1
            fi

            if ! command -v gcloud &> /dev/null
            then
                echo "gcloud CLI not found"
                exit 1
            fi

            if ! command -v gsutil &> /dev/null
            then
                echo "gsutil CLI not found"
                exit 1
            fi
        """.trimIndent()
        // ${'$'} is required to allow creating a script in TeamCity that contains
        // parts like ${GIT_HASH_SHORT} without having Kotlin syntax issues. For more info see:
        // https://youtrack.jetbrains.com/issue/KT-2425/Provide-a-way-for-escaping-the-dollar-sign-symbol-in-multiline-strings-and


,998,јмн

Q[17]105,880,ног

Q[18]114,2376,осв

Q[19]118,13566,вое

Q[20]122,7750,ени

Q[21]129,5824,гла

Q[22]137,2137,ови

Q[23]144,739,ќе

Q[24]149,5203,доб

Q[25]153,10063,бие

Q[26]160,201,евр

Q[27]172,2198,на

Q[28]177,3244,сме

Q[29]185,25788,кат

Q[30]194,2198,на

Q[31]199,15947,коа

Q[32]203,2171,али

Q[33]211,3204,ија

Q[34]215,40415,ата

Q[35]222,2886,за

Q[36]227,739,мак

Q[37]231,739,кед

Q[38]235,1307,дон

Q[39]239,23141,ниј

Linear[)
DumpLinearBuffer[46)

[0]1,Q=00000400,гла

[1]1,Q=170a0714,гла

[2]9,Q=04080a08,ови

[3]13,Q=07000a36,ите

[4]20,Q=11080aa4,коа

[5]24,Q=17000a08,али

[6]28,Q=17000a22,ици

[7]32,Q=17000a2a,ија

[8]36,Q=07000a35,ата

[9]43,D=00001706,на

[10]43,Q=17070a13,на

[11]48,Q=00000a15,вмр

[12]57,Q=00000a15,дпм

[13]61,Q=17080aaf,мне

[14]68,D=00001706,как

[15]68,Q=17000a2b,как

[16]77,L=00000a1c,пар

[17]85,Q=17000a35,ија

[18]92,Q=04000a33,со

[19]97,Q=17000a1a,нај

[20]101,Q=00000a0f,јмн

[21]105,Q=00000a15,ног

[22]114,Q=070a1708,осв

[23]118,Q=11040aa4,вое

[24]122,Q=17070a0d,ени

[25]129,Q=170a0714,гла

[26]137,Q=08170aa9,ови

[27]144,Q=00000a2d,ќе

[28]149,Q=0a001723,доб

[29]153,Q=07040aec,бие

[30]160,Q=00000a1c,евр

[31]172,D=00001706,на

[32]172,Q=17070a13,на

[33]177,Q=07000a22,сме

[34]185,Q=07000a2c,кат

[35]194,Q=17070a13,на

[36]199,Q=11080aa4,коа

[37]203,Q=07040a09,али

[38]211,Q=17000a2a


# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -timeline -timeline-max-iterations=2 < %s | FileCheck %s

  vmulps  %zmm0, %zmm1, %zmm2
  vaddps  %ymm1, %ymm1, %ymm2
  vmulps  %zmm2, %zmm3, %zmm4
  vaddps  %xmm4, %xmm5, %xmm6
  vmulps  %xmm6, %xmm3, %xmm4
  vaddps  %xmm4, %xmm5, %xmm0

# CHECK:      Iterations:        100
# CHECK-NEXT: Instructions:      600
# CHECK-NEXT: Total Cycles:      318
# CHECK-NEXT: Total uOps:        600

# CHECK:      Dispatch Width:    4
# CHECK-NEXT: uOps Per Cycle:    1.89
# CHECK-NEXT: IPC:               1.89
# CHECK-NEXT: Block RThroughput: 3.0

# CHECK:      Instruction Info:
# CHECK-NEXT: [1]: #uOps
# CHECK-NEXT: [2]: Latency
# CHECK-NEXT: [3]: RThroughput
# CHECK-NEXT: [4]: MayLoad
# CHECK-NEXT: [5]: MayStore
# CHECK-NEXT: [6]: HasSideEffects (U)

# CHECK:      [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
# CHECK-NEXT:  1      5     1.00                        vmulps	%zmm0, %zmm1, %zmm2
# CHECK-NEXT:  1      3     1.00                        vaddps	%ymm1, %ymm1, %ymm2
# CHECK-NEXT:  1      5     1.00                        vmulps	%zmm2, %zmm3, %zmm4
# CHECK-NEXT:  1      3     1.00                        vaddps	%xmm4, %xmm5, %xmm6
# CHECK-NEXT:  1      5     1.00                        vmulps	%xmm6, %xmm3, %xmm4
# CHECK-NEXT:  1      3     1.00                        vaddps	%xmm4, %xmm5, %xmm0

# CHECK:      Resources:
# CHECK-NEXT: [0]   - SBDivider
# CHECK-NEXT: [1]   - SBFPDivider
# CHECK-NEXT: [2]   - SBPort0
# CHECK-NEXT: [3]   - SBPort1
# CHECK-NEXT: [4]   - SBPort4
# CHECK-NEXT: [5]   - SBPort5
# CHECK-NEXT: [6.0] - SBPort23
# CHECK-NEXT: [6.1] - SBPort23

# CHECK:      Resource pressure per iteration:
# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]
# CHECK-NEXT:  -      -     3.00   3.00    -      -      -      -

# CHECK:      Resource pressure by instruction:
# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]  Instructions:
# CHECK-NEXT:  -      -     1.00    -      -      -      -      -     vmulps	%zmm0, %zmm1, %zmm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     vaddps	%ymm1, %ymm1, %ymm2
# CHECK-NEXT:  -      -     1.00    -


vmCloudServerStatusMetering.getOnTime())) {
                offTime = vmCloudServerStatusMetering.getOnTime();
            }
            Duration stoppedTime = Duration.between(Objects.nonNull(offTime) ? offTime : operateTime, operateTime);
            vmCloudServerStatusMetering.setShutdownDuration(stoppedTime.getSeconds() + (Objects.isNull(vmCloudServerStatusMetering.getShutdownDuration()) ? 0 : vmCloudServerStatusMetering.getShutdownDuration()));
            vmCloudServerStatusMetering.setOnTime(operateTime);
            vmCloudServerStatusMetering.setOffTime(null);
            updateInstance(vmCloudServerStatusMetering);
        }
        // 关机计算开机时长
        if (isStopped && Objects.nonNull(vmCloudServerStatusMetering.getId())) {
            LocalDateTime onTime = vmCloudServerStatusMetering.getOnTime();
            // 关机操作时，如果开机时间为空那么认为是，当前云主机在其他环境更改了状态，这里取之前记录的关机时间为开机时间
            if (Objects.isNull(onTime) && Objects.nonNull(vmCloudServerStatusMetering.getOffTime())) {
                onTime = vmCloudServerStatusMetering.getOffTime();
            }
            Duration runningTime = Duration.between(Objects.nonNull(onTime) ? onTime : operateTime, operateTime);
            vmCloudServerStatusMetering.setRunningDuration(runningTime.getSeconds() + (Objects.isNull(vmCloudServerStatusMetering.getRunningDuration()) ? 0 : vmCloudServerStatusMetering.getRunningDuration()));
            vmCloudServerStatusMetering.setOffTime(operateTime);
            vmCloudServerStatusMetering.setOnTime(null);
            updateInstance(vmCloudServerStatusMetering);
        }
        // 开机未记录，插入新数据
        boolean insertRunning = isRunning && Objects.isNull(vmCloudServerStatusMetering.getId());
        // 关机未记录，插入新数据
        boolean insertStopped = isStopped && Objects.isNull(vmCloudServerStatusMetering.getId());
        if (insertRunning || insertStopped) {
            vmCloudServerStatusMetering.setOnTime(isRunning ? operateTime : null);
            vmCloudServerStatusMetering.setOffTime(isStopped ? operateTime : null);
            insertInstance(vmCloudServerStatusMetering);
        }
    }

    private void updateInstance(VmCloudServerStatusTiming vmCloudServerStatusMetering) {
        vmCloudServerStatusTimingMapper.updateById(vmCloudServerStatusMetering);
    }

    private void insertInstance(VmCloudServerStatusTiming vmCloudServerStatusMetering) {
        vmCloudServerStatusTimingMapper.insert(vmCloudServerStatusMetering);
    }
}
package com.fit2cloud.provider.impl.proxmox.entity.request;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fit2cloud.common.form.annotaion.Form;
import com.fit2cloud.common.form.annotaion.FormConfirmInfo;
import com.fit2cloud.common.form.annotaion.FormGroupInfo;
import com.fit2cloud.common.form.annotaion.FormStepInfo;
import com.fit2cloud.common.form.constants.InputType;
import com.fit2cloud.provider.impl.proxmox.ProxmoxCloudProvider;
import com.fit2cloud.provider.impl.proxmox.entity.DiskConfig;
import com.fit2cloud.vm.ICre


r);
                thread.setName("JavaDebug-NettyServer-Boss-Worker-" + threadNoCnt.incrementAndGet());
                return thread;
            }
        });

        workGroup = new NioEventLoopGroup(2, new ThreadFactory() {
            @Override
            public Thread newThread(Runnable r) {
                Thread thread = new Thread(r);
                thread.setName("JavaDebug-NettyServer-EventLoop-Worker-" + threadNoCnt.incrementAndGet());
                return thread;
            }
        });

        ((NioEventLoopGroup)workGroup).setIoRatio(70);

        ServerBootstrap serverBootstrap = new ServerBootstrap().group(bossGroup, workGroup)
                .channel(NioServerSocketChannel.class)
                .option(ChannelOption.SO_BACKLOG, 4)
                .option(ChannelOption.SO_REUSEADDR, true)
                .childOption(ChannelOption.TCP_NODELAY, true)
                .childOption(ChannelOption.SO_KEEPALIVE, true)
                /// 高低水位，用于保护客户端
                /// 当输出缓冲区中缓存数据大于高水位后，Channel变得不可写，当不可写之后，缓存区的数据大小
                /// 低于低水位之后，Channel再次变得可写,每次写的时候请判断Channel是否可以
                .childOption(ChannelOption.WRITE_BUFFER_WATER_MARK,
                        new WriteBufferWaterMark(4 * 1024, 8 * 1024))
                .option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT)
                .childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT);

        /// 空转handler
        ServerIdleHandler serverIdleHandler = new ServerIdleHandler();

        // command handler
        commandHandler = new CommandHandler(ins, this);

        // set up handle
        serverBootstrap.childHandler(new ChannelInitializer<SocketChannel>() {
            /**
             * This method will be called once the {@link Channel} was registered. After the method returns this instance
             * will be removed from the {@link ChannelPipeline} of the {@link Channel}.
             *
             * @param channel the {@link Channel} which was registered.
             * @throws Exception is thrown if an error occurs. In that case it will be handled by
             *                   {@link #exceptionCaught(ChannelHandlerContext, Throwable)} which will by default close
             *                   the {@link Channel}.
             */
            @Override
            protected void initChannel(SocketChannel channel) throws Exception {

                if (!setup) {
                    PSLogger.error("服务端暂未启动或者不再接受新连接");
                    channel.writeAndFlush("服务端暂未启动或者不再接受新连接").addListener(new GenericFutureListener<Future<? super Void>>() {
                        @Override
                        public void operationComplete(Future<? super Void> future) throws Exception {
                            if (!future.isSuccess()) {
                                /// 拿到异常
                                future.get();
                            }
                        }
                    });
                    return;
                }

                ChannelPipeline pipeline = channel.pipeline();

                // codec
                pipeline.addLast("commandDecoder", CommandCodec.getDecodeHandler());
                pipeline.addLast("commandEncoder", CommandCodec.getEncodeHandler());

                // idle handler
                /// 空闲时间超过阈值服务器主动关闭链接~
                if (allowIdleHandler) {
                    pipeline.addLast("idleStateHandler", new IdleStateHandler(0, 0, 10, TimeUnit.MINUTES));
                    pipeline.addLast("serverIdleStateHandler", serverIdleHandler);
                }

                // comm


found in config")
		return
	}

	elNames := []string{"geth", "nethermind", "reth", "erigon", "besu"}

	// Execute corresponding tests based on configuration variables
	switch testMode {
	case "multi":
		// Multi-node testing
		fmt.Println("=== D2PFuzz Multi-Node Testing Tool ===")
		fmt.Println("🚀 Starting multi-node testing...")
		multiNodesTesting(elNames, config, multiNodeNonceInitialValues, multiNodeBatchSize)

	case "single":
		// Single node testing
		fmt.Println("=== D2PFuzz Single-Node Testing Tool ===")
		if singleNodeIndex < 0 || singleNodeIndex >= len(elNames) {
			fmt.Printf("Invalid node index: %d. Valid range: 0-%d\n", singleNodeIndex, len(elNames)-1)
			return
		}
		fmt.Printf("🎯 Starting single node testing for %s (Node %d)...\n", elNames[singleNodeIndex], singleNodeIndex)
		singleNodeTesting(elNames, config, singleNodeIndex, &singleNodeNonce, singleNodeBatchSize)
	case "oneTransaction":
		// Single node testing, send only one transaction
		fmt.Println("=== D2PFuzz Single-Transaction Testing Tool ===")

		sendTransaction(config)
	case "largeTransactions":
		// Single node testing, send only one transaction
		fmt.Println("=== D2PFuzz Large-Transaction Testing Tool ===")
		sendLargeTransactions(config)
	case "interactive":
		// Interactive selection mode
		fmt.Println("=== D2PFuzz Multi-Node Testing Tool ===")
		fmt.Println("Available test modes:")
		fmt.Println("1. Multi-node testing (all nodes)")
		fmt.Println("2. Single node testing (specific node)")
		fmt.Print("Please select test mode (1 or 2): ")

		var choice int
		fmt.Scanln(&choice)

		switch choice {
		case 1:
			fmt.Println("\n🚀 Starting multi-node testing...")
			multiNodesTesting(elNames, config, multiNodeNonceInitialValues, multiNodeBatchSize)
		case 2:
			runSingleNodeTestingWithUI(elNames, config)
		default:
			fmt.Println("Invalid choice. Please select 1 or 2.")
		}

	default:
		fmt.Printf("Invalid test mode: %s. Valid modes: multi, single, interactive\n", testMode)
	}
}

func singleNodeTesting(elNames []string, config *Config, elIndex int, customNonce *uint64, batchSize int) {
	if elIndex < 0 || elIndex >= len(elNames) {
		fmt.Printf("❌ Invalid node index: %d. Valid range: 0-%d\n", elIndex, len(elNames)-1)
		return
	}

	fmt.Printf("\n=== Single Node Testing ===\n")
	fmt.Printf("●Execution Client: %v (Node %d)\n", elNames[elIndex], elIndex)

	// Set nonce initial value
	nodeNonceInitialValues := []uint64{0, 0, 0, 0, 0}
	if customNonce != nil {
		if elIndex < len(nodeNonceInitialValues) {
			nodeNonceInitialValues[elIndex] = *customNonce
		}
	}

	// Create node account manager, allocate accounts only for current node
	nodeAccountManager := NewNodeAccountManagerWithNonces(PredefinedAccounts, len(elNames), nodeNonceInitialValues)

	// parse node info
	enodeStr := config.P2P.BootstrapNodes[elIndex]
	node, err := enode.Parse(enode.ValidSchemes, enodeStr)
	if err != nil {
		fmt.Printf("❌ Failed to parse enode: %v\n", err)
		return
	}

	fmt.Printf("🔗 Connecting to %s node:\n", elNames[elIndex])
	fmt.Printf("📍 IP: %s, Port: %d\n", node.IP(), node.TCP())

	// Read JWTSecret
	jwtSecret