5 25.5v-14a11 11 0 0122 0v14a11 11 0 01-22 0zm2-14v14a9 9 0 1018 0v-14a9 9 0 10-18 0zm8 3.5v-4a1.5 1.5 0 113 0v4a1.5 1.5 0 11-3 0z" /></svg>'}})},previewOptions:{dragMeta:{positionRefine:{x:24,y:15},color:"#000"},fill:"#AAAAAA",size:{width:{value:84,unit:"px"},height:{value:84,unit:"px"}},iconSize:{width:{value:23,unit:"px"},height:{value:37,unit:"px"}}}},{id:(0,mt.x0)(),type:"symbol",payload:{elementData:Py()(rL,{size:{default:{width:{value:57,unit:"px"},height:{value:57,unit:"px"}}},styles:{svg:{default:{fill:"#000"}}},options:{content:'<svg width="13px" height="27px" viewBox="0 0 15 27"><path d="M6.568 26.878L6.445 27 .437 20.99a1.5 1.5 0 012.119-2.12l2.512 2.511V1.5a1.5 1.5 0 113 0v19.881l2.512-2.513a1.5 1.5 0 012.119 2.12l-6.01 6.01z" /></svg>'}})},previewOptions:{dragMeta:{positionRefine:{x:24,y:15},color:"#000"},fill:"#AAAAAA",size:{width:{value:84,unit:"px"},height:{value:84,unit:"px"}},iconSize:{width:{value:13,unit:"px"},height:{value:27,unit:"px"}}}},{id:(0,mt.x0)(),type:"symbol",payload:{elementData:Py()(rL,{size:{default:{width:{value:59,unit:"px"},height:{value:59,unit:"px"}}},styles:{svg:{default:{fill:"#000"}}},options:{content:'<svg width="22px" height="54px" viewBox="0 0 21 54"><path d="M11.281 54.078a1 1 0 01-.83-.286l-4.24-4.241a.994.994 0 010-1.412l.709-.708a.994.994 0 011.412 0l1.449 1.45v-6.88a1.5 1.5 0 113 0v6.876l1.449-1.448a.994.994 0 011.412 0l.709.708a1 1 0 010 1.412l-4.246 4.241a.985.985 0 01-.7.294 1.041 1.041 0 01-.124-.006zm-1.5-17.077a1.5 1.5 0 111.5 1.5 1.5 1.5 0 01-1.5-1.5zm-9.281-16v-10a10.5 10.5 0 0121 0v10a10.5 10.5 0 01-21 0zm2-10v10a8.5 8.5 0 1017 0v-10a8.5 8.5 0 10-17 0zm7 0v-3a1.5 1.5 0 013 0v3a1.5 1.5 0 01-3 0z" /></svg>'}})},previewOptions:{dragMeta:{positionRefine:{x:24,y:15},color:"#000"},fill:"#AAAAAA",size:{width:{value:84,unit:"px"},height:{value:84,unit:"px"}},iconSize:{width:{value:22,unit:"px"},height:{value:54,unit:"px"}}}},{id:(0,mt.x0)(),type:"symbol",payload:{elementData:Py()(rL,{size:{default:{width:{value:52,unit:"px"},height:{value:52,unit:"px"}}},styles:{svg:{default:{fill:"#000"}}},options:{content:'<svg width="22px" height="16px" viewBox="0 0 22 15"><path d="M11.316 14.849h0L.709 4.244 4.246.707l7.072 7.071L18.39.707l3.537 3.537L11.322 14.85z" /></svg>'}})},previewOptions:{dragMeta:{positionRefine:{x:24,y:15},color:"#000"},fill:"#AAAAAA",size:{width:{value:84,


leTemplates.flamer_implosion
	local optional_owner_unit = template_context.is_server and template_context.owner_unit or nil

	Attack.execute(unit, damage_template, "power_level", 400, "damage_type", "burning", "attacking_unit", optional_owner_unit)
end

local function _play_flinch_anim(data, context)
	local unit = context.unit
	local flinch_anim
	local random_anim_event = math.random(1, #FLINCH_ANIMS)

	flinch_anim = FLINCH_ANIMS[random_anim_event].name

	if Unit.has_animation_event(unit, flinch_anim) then
		local animation_extension = ScriptUnit.extension(unit, "animation_system")

		animation_extension:anim_event(flinch_anim)
	end

	return FLINCH_ANIMS[random_anim_event].duration
end

templates.flamer_backpack_counter = {
	class_name = "proc_buff",
	predicted = false,
	proc_events = {
		[proc_events.on_minion_damage_taken] = 1,
	},
	start_func = function (template_data, template_context)
		template_data.blackboard = BLACKBOARDS[template_context.unit]
		template_data.current_step = 1

		local breed_name = template_context.breed.name

		template_data.buff_name = breed_name .. "_backpack_damaged"
	end,
	proc_func = function (params, template_data, template_context)
		if not template_context.is_server then
			return
		end

		if params.hit_zone_name_or_nil == "backpack" and params.attack_type ~= "melee" then
			local unit = template_context.unit
			local t = FixedFrame.get_latest_fixed_time()
			local buff_extension = ScriptUnit.extension(unit, "buff_system")
			local health_extension = ScriptUnit.extension(template_context.unit, "health_system")
			local buff_name = template_data.buff_name
			local current_health_percent = health_extension:current_health_percent()
			local health_step_value = 0

			for i = 1, #HEALTH_STEPS do
				local health_step_data = HEALTH_STEPS[i]

				if current_health_percent <= health_step_data.health_threshold then
					health_step_value = health_step_data.health_step
				else
					break
				end
			end

			local current_stacks_or_nil = buff_extension:current_stacks(buff_name)
			local times_to_apply_stack = health_step_value - current_stacks_or_nil

			for i = 1, times_to_apply_stack do
				local statistics_component = Blackboard.write_component(template_data.blackboard, "statistics")

				statistics_component.flamer_backpack_impacts = statistics_component.flamer_backpack_impacts + 1

				buff_extension:add_internally_controlled_buff(buff_name, t)
				buff_extension:_update_stat_buffs_and_keywords(t)
			end
		end
	end,
}
templates.renegade_flamer_backpack_damaged = {
	class_name = "buff",
	max_stacks = 4,
	predicted = false,
	start_func = function (template_data, template_context)
		template_data.is_triggered


//
//   Generated by https://github.com/blacktop/ipsw (Version: , BuildCommit: )
//
//    - LC_BUILD_VERSION:  Platform: macOS, MinOS: 14.4, SDK: 14.4, Tools: [ld (902.8), ld (854.1), ld (951.9)]
//    - LC_BUILD_VERSION:  Platform: macCatalyst, MinOS: 17.4, SDK: 17.4, Tools: [ld (902.8), ld (854.1), ld (951.9)]
//    - LC_SOURCE_VERSION: 7.4.38.1.3
//
#ifndef _AMSServerDataCacheService_h
#define _AMSServerDataCacheService_h

@import Foundation;

@protocol OS_dispatch_queue;

@interface AMSServerDataCacheService : NSObject

@property (retain) NSXPCConnection *connection;
@property (retain) NSObject<OS_dispatch_queue> *queue;

/* class methods */
+ (signed char)_serverDataCacheFeatureEnabled;

/* instance methods */
- (void)dealloc;
- (id)init;
- (id)proxyWithErrorHandler:(id /* block */)handler;
- (id)_newRemoteConnection;
- (id)_makeRemoteConnectionInterface;
- (void)_removeRemoteConnection;
- (id)dataForAccountDSID:(id)dsid cacheTypeID:(id)id networkPolicy:(long long)policy;
- (id)granularNotificationSettingsForAccountDSID:(id)dsid bundleID:(id)id networkPolicy:(long long)policy;
- (id)reminderEventsForAccount:(id)account service:(id)service eventType:(id)type networkPolicy:(long long)policy;
- (id)setUpCacheForAccount:(id)account;
- (id)setUpCacheForAccountDSID:(id)dsid;
- (id)tearDownCacheForAccountDSID:(id)dsid;
- (id)updateCacheForAccountDSID:(id)dsid withCachePayload:(id)payload;
- (id)updateCacheForAccountDSID:(id)dsid withCacheTypeIDs:(id)ids;

@end

#endif /* _AMSServerDataCacheService_h */


, %r28
	.word 0xbc820009  ! 376: ADDcc_R	addcc 	%r8, %r9, %r30
	.word 0x98c22a44  ! 376: ADDCcc_I	addccc 	%r8, 0x0a44, %r12
	.word 0x8cba2448  ! 376: XNORcc_I	xnorcc 	%r8, 0x0448, %r6
	.word 0x88b224f0  ! 376: SUBCcc_I	orncc 	%r8, 0x04f0, %r4
	.word 0x34800001  ! 378: BG	bg,a	<label_0x1>
	.word 0xab6a2190  ! 378: SDIVX_I	sdivx	%r8, 0x0190, %r21
	.word 0xbd3a1009  ! 379: SRAX_R	srax	%r8, %r9, %r30
	.word 0xa2b20009  ! 379: SUBCcc_R	orncc 	%r8, %r9, %r17
	.word 0x8ac20009  ! 379: ADDCcc_R	addccc 	%r8, %r9, %r5
	.word 0x88822400  ! 379: ADDcc_I	addcc 	%r8, 0x0400, %r4
	.word 0x8c2a2640  ! 379: ANDN_I	andn 	%r8, 0x0640, %r6
	.word 0x8d2a1009  ! 379: SLLX_R	sllx	%r8, %r9, %r6
	.word 0x888a2564  ! 379: ANDcc_I	andcc 	%r8, 0x0564, %r4
	.word 0x9e0a2f84  ! 379: AND_I	and 	%r8, 0x0f84, %r15
	.word 0xa22a0009  ! 379: ANDN_R	andn 	%r8, %r9, %r17
	.word 0x861a270c  ! 379: XOR_I	xor 	%r8, 0x070c, %r3
	.word 0x84aa0009  ! 379: ANDNcc_R	andncc 	%r8, %r9, %r2
	.word 0x8c4226ac  ! 379: ADDC_I	addc 	%r8, 0x06ac, %r6
	.word 0x8aba0009  ! 379: XNORcc_R	xnorcc 	%r8, %r9, %r5
	.word 0x8d641809  ! 379: MOVcc_R	<illegal instruction>
	.word 0x16800001  ! 384: BGE	bge  	<label_0x1>
	.word 0x88720009  ! 384: UDIV_R	udiv 	%r8, %r9, %r4
	.word 0xc7220009  ! 388: STF_R	st	%f3, [%r9, %r8]
	.word 0xc44a0009  ! 388: LDSB_R	ldsb	[%r8 + %r9], %r2
	.word 0xbc7a2198  ! 388: SDIV_I	sdiv 	%r8, 0x0198, %r30
	.word 0x846a29c0  ! 388: UDIVX_I	udivx 	%r8, 0x09c0, %r2
	.word 0x2e800001  ! 391: BVS	bvs,a	<label_0x1>
	.word 0x827a2ba4  ! 391: SDIV_I	sdiv 	%r8, 0x0ba4, %r1
	.word 0xbc020009  ! 398: ADD_R	add 	%r8, %r


;
      newBackground[choice] = 'white';
      return newBackground;
    });
    setButtonClicked(true);
  };

  const startGame = () => {
    if (selectedButton) {
      setShowGameContent(true);
      setButtonBackground({ 'X': 'transparent', 'O': 'transparent' });
    } else {
      console.error('Please select a player (X or O) before starting the game.');
    }
  };

  const handleGameResult = (result) => {
    setGameResult(result);

    if (result === 'win') {
      setUserWins((prev) => {
        const newUserWins = prev + 1;
        localStorage.setItem('userWins', newUserWins.toString());
        return newUserWins;
      });
    } else if (result === 'lose') {
      setComputerWins((prev) => {
        const newComputerWins = prev + 1;
        localStorage.setItem('computerWins', newComputerWins.toString());
        setUnselectedButton(selectedButton === 'X' ? 'O' : 'X');
        return newComputerWins;
      });
    } else if (result === 'tie') {
      setTies((prev) => {
        const newTies = prev + 1;
        localStorage.setItem('ties', newTies.toString());
        return newTies;
      });
    }
  };

  const handleGameComplete = () => {
    setUserChoice(null);
    setGameResult(null);
  };

  const resetGame = () => {
    localStorage.removeItem('ticTacToeGame');
    // Reset scores to zero when resetting the game
    resetScores();

    setUserChoice(null);
    setShowGameContent(false);
    setGameResult(null);
    setWinner(null);
    setSelectedButton(null);
  };

  const renewGame = () => {
    setUserChoice(null);
    setGameResult(null);
    setWinner(null);
    setButtonBackground({ 'X': 'transparent', 'O': 'transparent' });
    setShowGameContent(false);

    // Increment the key to force re-render of App2 component
    setApp2Key((prevKey) => prevKey + 1);
    setShowGameContent(true);

  };

  const replayGame = () => {
    localStorage.removeItem('ticTacToeGame');
    resetScores();
    setUserChoice(null);
    setShowGameContent(false);
    setApp2Key((prevKey) => prevKey + 1);
    setShowGameContent(true);
    setGameResult(null);
    setWinner(null);
    setButtonBackground({ 'X': 'transparent', 'O': 'transparent' });

  };

  const handleInviteFriend = () => {
    setShowInvitationCode(true);

    setTimeout(() => {
      setShowInvitationCode(false);
    }, 5000);
  };

  return (

      {!showGameContent && (

 Quote #1

 "{{advice}}"

      )}

      {!showGameContent && (

 X

O

PICK PLAYER

              <button style={{ backgroundColor: buttonBackground['X'], color: buttonTextColor['X'] }} className={styles.xbutton} onClick={() => changePage('X')}>X</button>
              <button style={{ backgroundColor: buttonBackground['O'], color: buttonTextColor['O'] }} className={


: Point): void;
  abstract add(point: Point): void;
  abstract remove(index: number): void;
  abstract interpolate(x: number): number;
}
/// <reference path="localForage.d.ts" />

declare var localForage: lf.ILocalForage<string>;
declare var callback: lf.ICallback<string>;
declare var iterateCallback: lf.IIterateCallback<string>;
declare var errorCallback: lf.IErrorCallback;
declare var keyCallback: lf.IKeyCallback;
declare var keysCallback: lf.IKeysCallback;
declare var numberCallback: lf.INumberCallback;
declare var promise: lf.IPromise<string>;

() => {
    localForage.clear((err: any) => {
        var newError: any = err;
    });

    localForage.iterate((str: string, key: string, num: number) => {
        var newStr: string = str;
        var newKey: string = key;
        var newNum: number = num;
    });

    localForage.length((err: any, num: number) => {
        var newError: any = err;
        var newNumber: number = num;
    });

    localForage.key(0,(err: any, value: string) => {
        var newError: any = err;
        var newValue: string = value;
    });

    localForage.keys((err: any, keys: Array<string>) => {
        var newError: any = err;
        var newArray: Array<string> = keys;
    });

    localForage.getItem("key",(err: any, str: string) => {
        var newError: any = err;
        var newStr: string = str
    });

    localForage.getItem("key").then((err: any, str: string) => {
        var newError: any = err;
        var newStr: string = str
    });

    localForage.setItem("key", "value",(err: any, str: string) => {
        var newError: any = err;
        var newStr: string = str
    });

    localForage.setItem("key", "value").then((err: any, str: string) => {
        var newError: any = err;
        var newStr: string = str;
    });

    localForage.removeItem("key",(err: any) => {
        var newError: any = err;
    });

    localForage.removeItem("key").then((err: any, str: string) => {
        var newError: any = err;
        var newStr: string = str
    });

    promise.then(callback);
}
import {
  SET_LOCALE,
} from '../actions/i18n'

const initialState = {
  ready: false,
  locale: '',
}

const appReducer = (state: AppState = initialState, action: ReduxAction) => {
  switch (action.type) {
    case SET_LOCALE:
      return {
        ...state,
        locale: action.payload.locale,
      }
    default:
      return state
  }
}

export default appReducer
import 'jasmine';
import { mockRequest } from 'mock-req-res';

import { JwtBearer, jwtBearer } from '../../../src';
import { BaseUser } from '../../../src/models';

/**
 * JWT
 * pointyapi/
 */
describe('[JWT]', () => {
	it('can sign a token', () => {
		expect(jwtBearer.sign(new BaseUser())).toEqual(jasmine.any(String));
	});

	it('can sign a token', () => {
		const jwt = new JwtBearer('test-key');
		expect(jwt.sign(new BaseUser())).toEqual(jasmine.any(String));
		expect(jwt.key).toBe('test-key');
	});

	it('can sign a token with a payload', () => {
		const user = new BaseUser();
		user.id = 1;

		const jwtString = jwtBearer.sign(user, false, { hasPayload: true });
		const result = jwtBearer.dryVerify(jwtString);

		expect('hasPayload' in result).toBeTruthy();
		expect(result.hasPayload).toBeTruthy();


       a4,
            &a5,
            &a6,
            &a7,
            a8,
            a9,
            a10,
            a11,
            a12,
            a13,
            a14,
            a15,
            a16,
            a17,
            a18,
            a19,
            count,
            size) == OE_OK);

    OE_TEST(retval.s0.x == 1);
    OE_TEST(retval.y == 1);

    // a2 is in parameter and should not be modified.
    for (size_t i = 0; i < 5; ++i)
    {
        OE_TEST(a2[i].s0.x == (int)i);
        OE_TEST(a2[i].y == (int)i);
    }

    // a3 is in-out parameter that is expected to be set to 3.
    for (size_t i = 0; i < 5; ++i)
    {
        for (size_t j = 0; j < 5; ++j)
        {
            OE_TEST(a3[i][j].s0.x == 3);
            OE_TEST(a3[i][j].y == 3);
        }
    }

    // a4 is out parameter that is expected to be set to 4.
    OE_TEST(a4[0][0][0].s0.x == 4);
    OE_TEST(a4[0][0][0].y == 4);

    // a5 is 1 element in pointer. Must not be modified.
    OE_TEST(a5.s0.x == 5 && a5.y == 5);

    // a6 is 1 element in-out pointer that is expected to be set to 6.
    OE_TEST(a6.s0.x == 6 && a6.y == 6);

    // a7 is 1 element out pointer that is expected to be set to 7.
    OE_TEST(a7.s0.x == 7 && a7.y == 7);

    for (size_t i = 0; i < 5; ++i)
    {
        // a8 is 5 count in pointer that must not be modified.
        OE_TEST(a8[i].s0.x == 8 && a8[i].y == 8);

        // a9 is 5 count in-out pointer that is expected to be set to 9.
        OE_TEST(a9[i].s0.x == 9 && a9[i].y == 9);

        // a10 is 5 count out pointer that is expected to be set to 10.
        OE_TEST(a10[i].s0.x == 10 && a10[i].y == 10);
    }

    for (size_t i = 0; i < 5; ++i)
    {
        // a11 is 40 size in pointer that must not be modified.
        OE_TEST(a11[i].s0.x == 11 && a11[i].y == 11);

        // a12 is 40 size in-out pointer that is expected to be set to 12.
        OE_TEST(a12[i].s0.x == 12 && a12[i].y == 12);

        // a13 is 40 size out pointer that is expected to be set to 13.
        OE_TEST(a13[i].s0.x == 13 && a13[i].y == 13);
    }

    for (size_t i = 0; i < count; ++i)
    {
        // a14 is in pointer with attribute 'count' = count.
        // Must not be modified.
        OE_TEST(a14[i].s0.x == 14 && a14[i].y == 14);

        // a15 is in-out pointer with attribute 'count' = count.
        // Must be set to 15.
        OE_TEST(a15[i].s0.x == 15 && a15[i].y == 15);

        // a16 is out pointer with attribute 'count


生成树。

![](pics/20210415111646947_390811149.png)

**注意：** 一次切分产生的多个横切边中，权重最小的边不一定是所有横切边中唯一属于图的最小生成树的边。

### 1.9.3. 贪心算法

[原视频 p170](https://www.bilibili.com/video/BV1Cz411B7qd?p=170&spm_id_from=pageDriver)

贪心算法是计算图的最小生成树的基础算法。它的基本原理就是切分定理，**使用切分定理找到最小生成树的一条边，不断的重复直到找到最小生成树的所有边**。

**如果图有 V 个顶点，那么需要找到 V-1 条最小横切边，就可以表示该图的最小生成树。**

![](pics/20210415112831159_260166303.png)

上图为初始图。

![](pics/20210415112902342_338349229.png)

上图中，将顶点切分为两棵树，一棵用灰色标识，一棵用白色标识。两棵树的横切边用黑色和红色标识，其中，红色表示最小横切边。

![](pics/20210415113043133_98794547.png)

上图中，继续切分，又找到一条最小横切边。

![](pics/20210415113127104_435092298.png)

上图中，再次切分，找到了第三条最小横切边。

![](pics/20210415113215337_414434451.png)

上图中，切分，并找到第四条最小横切边。

![](pics/20210415113329786_1110350736.png)

![](pics/20210415113407371_31927522.png)

![](pics/20210415113506633_1882434151.png)

![](pics/20210415113553685_1341688253.png)

**计算图的最小生成树的算法有很多中，但这些算法都可以看做是贪心算法的一种特殊情况。这些算法的不同之处在于保存切分和判断权重最小的横切边的方式。**

### 1.9.4. Prim 算法

[原视频 P171](https://www.bilibili.com/video/BV1Cz411B7qd?p=171&spm_id_from=pageDriver)

Prim 算法的每一步都会为一棵生成中的树添加一条边。开始时这棵树仅有一个顶点，然后会向他添


edTasks ?? (executedTasks = new List<string>())).Add("other-non-default")));

            "And a default task which depends on both non-default tasks"
                .f(() => builder
                    .Task("default").DependsOn("non-default", "other-non-default")
                        .Do(() => executedTasks.Add("default")));

            "When I run the builder"
                .f(() => builder.Run());

            "Then four tasks are executed"
                .f(() => executedTasks.Count.Should().Be(4));

            "And the other non-default task is executed first"
                .f(() => executedTasks[0].Should().Be("other-non-default"));

            "And the non-default task is executed second"
                .f(() => executedTasks[1].Should().Be("non-default"));

            "And the other non-default task is executed third for the second time"
                .f(() => executedTasks[2].Should().Be("other-non-default"));

            "And the default task is executed fourth"
                .f(() => executedTasks[3].Should().Be("default"));
        }
    }
}


�維爾海姆需要你帶給他2個冰凍符文，2個水之精華 ，2顆藍寶石，還有30金。"}},
[9233] = {"歐瑪利安之手冊", nil, {"把歐瑪利安之手冊交給工匠維爾海姆，他就在東瘟疫之地聖光之願禮拜堂。"}},
[9234] = {"冰剋護手", nil, {"東瘟疫之地聖光之願禮拜堂的工匠維爾海姆需要你帶給他5個冰凍符文，12個瑟銀錠，2個奧金錠，2個水之精華，還有200金。"}},
[9235] = {"冰剋護腕", nil, {"東瘟疫之地聖光之願禮拜堂的工匠維爾海姆需要你帶給他4個冰凍符文，12個瑟銀錠，2個奧金錠，2個水之精華，還有200金。"}},
[9236] = {"冰剋胸甲", nil, {"東瘟疫之地聖光之願禮拜堂的工匠維爾海姆需要你帶給他8個冰凍符文，16個瑟銀錠，2個奧金錠，4個水之精華，還有300金。同時你必須在銀色黎明達到崇拜聲望值，才能完成這項任務。"}},
[9237] = {"冰川披風", nil, {"東瘟疫之地聖光之願禮拜堂的工匠維爾海姆需要你帶給他5個冰凍符文，4份符文布卷，2個水之精華，4份鐵網蛛絲，還有200金。同時你必須在銀色黎明達到崇拜聲望值，才能完成這項任務。"}},
[9238] = {"冰川腕帶", nil, {"東瘟疫之地聖光之願禮拜堂的工匠維爾海姆需要你帶給他4個冰凍符文，2份符文布卷，2個水之精華，2份鐵網蛛絲，還有200金。"}},
[9239] = {"冰川手套", nil, {"東瘟疫之地聖光之願禮拜堂的工匠維爾海姆需要5個冰凍符文，4份符文布卷，4個水之精華，2份鐵網蛛絲，還有200金。"}},
[9240] = {"冰川外衣", nil, {"東瘟疫之地聖光之願禮拜堂的工匠維爾海姆需要你帶給他8個冰凍符文，8份符文布卷，6個水之精華，4份鐵網蛛絲，還有300金。同時你必須在銀色黎明達到崇拜聲望值，才能完成這項任務。"}},
[9


 }
.tree-image li span ins { background-position:-16px 0; }
#jstree-dragged.tree-image ins { background:url("icons.png") -16px -32px no-repeat; }
#jstree-dragged.tree-image ins.forbidden { background:url("icons.png") -16px -16px no-repeat; }
*/

/* CONTEXT MENU */
/*
.tree-image-context a ins { background-image:url("icons.png"); background-repeat:no-repeat; background-position:-64px -64px; }
.tree-image-context a ins.create { background-position:0 -16px; }
.tree-image-context a ins.rename { background-position:-16px 0px; }
.tree-image-context a ins.remove { background-position:-32px -16px; }
*//*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz


/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestMain(m *testing.M) {
	logutil.SetupMOLogger(&logutil.LogConfig{
		Level:  "debug",
		Format: "console",
	})

	runtime.SetupServiceBasedRuntime("", runtime.NewRuntime(metadata.ServiceType_LOG, "test", logutil.GetGlobalLogger()))
	m.Run()
}

var (
	testIOTimeout = 5 * time.Second
)

func TestNodeHostConfig(t *testing.T) {
	cfg := DefaultConfig()
	cfg.DeploymentID = 1234
	cfg.DataDir = "lalala"
	nhConfig := getNodeHostConfig(cfg, nil)
	assert.Equal(t, cfg.DeploymentID, nhConfig.DeploymentID)
	assert.Equal(t, cfg.DataDir, nhConfig.NodeHostDir)
	assert.True(t, nhConfig.AddressByNodeHostID)
}

func TestRaftConfig(t *testing.T) {
	cfg := getRaftConfig(1, 1)
	assert.True(t, cfg.CheckQuorum)
	assert.True(t, cfg.OrderedConfigChange)
}

func getStoreTestConfig() Config {
	cfg := DefaultConfig()
	cfg.UUID = uuid.New().String()
	cfg.RTTMillisecond = 10
	cfg.RaftAddress = getTestRaftAddress()
	cfg.GossipPort = getTestGossipPort()
	testGossipAddress := getTestGossipAddress(cfg.GossipPort)
	dummyGossipSeedAddress := getDummyGossipSeedAddress()
	cfg.GossipSeedAddresses = []string{testGossipAddress, dummyGossipSeedAddress}
	cfg.LogServicePort = getTestServicePort()
	cfg.DeploymentID = 1
	cfg.FS = vfs.NewStrictMem()
	cfg.UseTeeLogDB = false

	runtime.RunTest(
		"",
		func(rt runtime.Runtime) {
			runtime.SetupServiceBasedRuntime(cfg.UUID, rt)
		},
	)
	return cfg
}

func TestStoreCanBeCreatedAndClosed(t *testing.T) {
	defer leaktest.AfterTest(t)()
	var cfg Config
	genCfg := func() Config {
		cfg = getStoreTestConfig()
		return cfg
	}
	defer vfs.ReportLeakedFD(cfg.FS, t)
	store, err := newLogStoreWithRetry(
		genCfg,
		nil,
		nil,
		runtime.DefaultRuntime(),
		nil,
	)
	assert.NoError(t, err)
	runtime.DefaultRuntime().Logger().Info("1")
	defer func() {
		assert.NoError(t, store.close())
	}()
	runtime.DefaultRuntime().Logger().Info("2")
}

func TestNewStoreRetry(t *testing.T) {
	defer leaktest.AfterTest(t)()
	cfg0 := getStoreTestConfig()
	genCfg0 := func() Config {
		return cfg0
	}
	defer vfs.ReportLeakedFD(cfg0.FS, t)
	store0, err := newLogStoreWithRetry(
		genCfg0,
		nil,
		nil,
		runtime.DefaultRuntime(),
		nil,
	)
	assert.NoError(t, err)
	defer func() {
		assert.NoError(t, store0.close())
	}()

	var cfg Config
	first := true
	genCfg := func() Config {
		if first {
			first = false
			return cfg0
		} else {
			cfg = getStoreTestConfig()
			return cfg
		}
	}
	defer vfs.ReportLeakedFD(cfg.FS, t)
	store1, err := newLogStoreWithRetry(
		genCfg,
		nil,
		nil,
		runtime.DefaultRuntime(),
		nil,


lt)
        return ReceivedImpl(context, value)
    }

    override suspend fun await(result: (Received<C, T>) -> R): Received<C, T> {
        val (context, value, continuation) = receive()
        val received = ReceivedImpl(context, value)
        try {
            continuation.resume(result(received))
        } catch (e: Throwable) {
            continuation.resumeWithException(SessionAwaitOnFailureException(e.message, e))
            throw e
        }
        return received
    }

    override suspend fun await(): SessionContinuation<C, T, R> {
        val (context, value, continuation) = receive()
        val handle =
            job.invokeOnCompletion { cause ->
                continuation.resumeWithException(
                    SessionCompletedWithoutResumeException(
                        cause
                    )
                )
            }

        return createSimpleSessionContinuation(context, value, continuation, handle)
    }
}

/*
 *     Copyright (c) 2022-2024. ForteScarlet.
 *
 *     Project    https://github.com/simple-robot/simpler-robot
 *     Email      ForteScarlet@163.com
 *
 *     This file is part of the Simple Robot Library (Alias: simple-robot, simbot, etc.).
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU Lesser General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     Lesser GNU General Public License for more details.
 *
 *     You should have received a copy of the Lesser GNU General Public License
 *     along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 */

package love.forte.simbot.logger.slf4j2

import love.forte.simbot.logger.Logger
import love.forte.simbot.logger.slf4j2.DEBUG.debug
import love.forte.simbot.logger.slf4j2.dispatcher.LogDispatcher
import org.slf4j.ILoggerFactory
import java.util.concurrent.ConcurrentHashMap
import kotlin.concurrent.thread

/**
 * `simbot-logger` 的 slf4j 日志工厂。
 *
 * @property processors 对日志的处理器链。会按照顺序处理每一次的日志请求。
 */
public class SimbotLoggerFactory(
    private val processors: List<SimbotLoggerProcessor>,
    configuration: SimbotLoggerConfiguration
) : ILoggerFactory {

    private val dispatcher: LogDispatcher

    init {
        val mode = configuration.dispatcherMode ?: DispatchMode.DISRUPTOR
        configuration.debug("SimbotLoggerFactory") { "Dispatch mode: $mode" }

        this.dispatcher = mode.factory.create(processors, configuration)
        configuration.debug("SimbotLoggerFactory") { "dispatcher: $dispatcher" }

        Runtime.getRuntime().addShutdownHook(
            thread(
                start = false,
                name = "SimbotLoggerDispatcherShutdownHook"
            ) {
                runCatching {
                    dispatcher.close()
                }.onFailure { e ->
                    System.err.println("Logger dispatcher $dispatcher close failed: ${e.localizedMessage}")
                    e.printStackTrace(System.err)
                }
            }
        )
    }

    /**
     * Return an appropriate [Logger] instance as specified by the
     * `name` parameter.
     */
    override fun getLogger(name: String?): Logger {
        return loggerCache.computeIfAbsent(name.toString()) { loggerName ->
            SimbotLogger(loggerName, processors, dispatcher::onLog)
        }
    }

    public companion object {
        private val loggerCache = ConcurrentHashMap<String, Logger>(32)
    }
}

/*
 *     Copyright (c) 2023-2024. ForteScarlet.
 *
 *     Project    https://github.com/simple-robot/simpler-robot
 *     Email      ForteScarlet@163.com
 *
 *     This file is part of the Simple Robot Library (Alias: simple-ro


, -1, "couldn't find work per cycle\n");
    }

    int64_t commFreq = params.find<int64_t>("commFreq", 0, found);
    if ( !found ) {
        getSimulationOutput().fatal(CALL_INFO, -1, "couldn't find communication frequency\n");
    }

    int64_t commSize = params.find<int64_t>("commSize", 16);

    std::string clockFrequency = params.find<std::string>("clockFrequency", "1GHz");

    ext_ = loadComponentExtension<coreTestComponentExt>(commFreq, clockFrequency, workPerCycle, commSize);

    // init randomness

    // tell the simulator not to end without us
    registerAsPrimaryComponent();
    primaryComponentDoNotEndSim();
}

coreTestComponentExtMain::~coreTestComponentExtMain() {}

void
coreTestComponentExtMain::serialize_order(SST::Core::Serialization::serializer& ser)
{
    SST::Component::serialize_order(ser);
    SST_SER(ext_);
}

// Element Library / Serialization stuff
// Copyright 2009-2025 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2025, NTESS
// All rights reserved.
//
// This file is part of the SST software package. For license
// information, see the LICENSE file in the top level directory of the
// distribution.

#include "sst_config.h"

#include "sst/core/testElements/coreTest_OverheadMeasure.h"

#include "sst/core/event.h"

using namespace SST;
using namespace SST::CoreTestOverhead;

OverheadMeasure::OverheadMeasure(ComponentId_t id, Params& params) :
    Component(id)
{
    id_ = params.find<int>("id");

    // configure out links
    bool done = false;
    ports_    = 0;
    while ( !done ) {
        std::string port_name("left_");
        port_name     = port_name + std::to_string(ports_);
        auto* handler = new Event::Handler2<OverheadMeasure, &OverheadMeasure::handleEvent, int>(this, ports_);
        Link* link    = configureLink(port_name, "1ns", handler);
        ++ports_;
        if ( !link ) {
            delete handler;
            done = true;
        }
    }

    while ( !done ) {
        std::string port_name("right_");
        port_name     = port_name + std::to_string(ports_);
        auto* handler = new Event::Handler2<OverheadMeasure, &OverheadMeasure::handleEvent, int>(this, ports_);
        Link* link    = configureLink(port_name, "1ns", handler);
        ++ports_;
        if ( !link ) {
            delete handler;
            done = true;
        }
    }

    // set our clock
    registerClock("100 MHz", new Clock::Handler2<OverheadMeasure, &OverheadMeasure::clockTic>(this));

    registerAsPrimaryComponent();
    primaryComponentDoNotEndSim();
}

// incoming events are scanned and deleted
void
OverheadMeasure::handleEvent(Event* UNUSED(ev), int UNUSED(port))
{
    // Does not send events.  Just needed to measure overhead
}

bool
OverheadMeasure::clockTic(Cycle_t UNUSED(cycle))
{
    // Just end simulation
    primaryComponentOKToEndSim();

    // Take myself off the clock list
    return true;
}
// Copyright 2009-2025 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2025, NTESS
// All rights reserved.
//
// This file is part of the SST software package. For license
// information, see the LICENSE file in the top level directory of the
// distribution.

#include "sst_co


'''
Exceptions generated within redux.
'''

class ArgumentError(Exception):
	pass

class PipeInitError(Exception):
	def __init_(self, message, pipe):
		Exception.__init__(self, message)
		self.pipe = pipe
		self.message = message

	def detail(self):
		detail = 'Pipe init error:\n  Pipe class: %s\n  Message: %s' % (self.pipe_class, self.message)
		return detail

class PipeMissingArgs(PipeInitError):
	'''pipe init failed because some args given, but not all required args given'''
	def __init__(self, message, pipe, missing_args):
		PipeInitError.__init__(self, message, pipe)
		self.missing_args = missing_args

	def detail(self):
		detail = PipeInitError.detail(self)
		detail = detail + '\n  Missing args: %s' % (self.missing_args,)
		return detail

class PipeArgsValueError(PipeInitError):
	'''pipe init failed because some args have bad values'''
	def __init__(self, message, pipe, arg_name):
		PipeInitError.__init__(self, message, pipe)
		self.arg_name = arg_name
		self.arg_value = pipe.kwargs[arg_name]

	def detail(self):
		detail = PipeInitError.detail(self)
		detail = detail + '\n  Argument Name:  %s\n  Argument Value:  %s' % (self.arg_name, self.arg_value)
		return detail

class PipeDisabled(PipeInitError):
	pass

class PipeSwitchedOff(PipeDisabled):
	'''pipe disabled because of switch argument'''
	pass

class PipeNoArgs(PipeDisabled):
	'''pipe disabled because no args were present'''
	pass


[dir="ltr"] .wide-nav-expand__icon > span:nth-child(2) {
  left: 0;
}

[dir="rtl"] .wide-nav-expand__icon > span:nth-child(2) {
  right: 0;
}

.wide-nav-expand__icon > span:nth-child(2) {
  position: absolute;
  top: 0.5625rem;
  width: 100%;
  height: 0;
  transition: opacity 0.2s;
  background-color: currentColor;
}

[dir="ltr"] .wide-nav-expand__icon > span:nth-child(3) {
  left: 0;
}

[dir="rtl"] .wide-nav-expand__icon > span:nth-child(3) {
  right: 0;
}

.wide-nav-expand__icon > span:nth-child(3) {
  position: absolute;
  top: auto;
  bottom: 0;
  width: 100%;
  height: 0;
  transition: transform 0.2s;
  background-color: currentColor;
}

.is-fixed .wide-nav-expand__icon {
  opacity: 1;
}

[aria-expanded="true"] .wide-nav-expand__icon > span:nth-child(1) {
  top: 0.5625rem;
  transform: rotate(-45deg);
}

[aria-expanded="true"] .wide-nav-expand__icon > span:nth-child(2) {
  opacity: 0;
}

[aria-expanded="true"] .wide-nav-expand__icon > span:nth-child(3) {
  top: 0.5625rem;
  transform: rotate(45deg);
}
/**
 * @file
 * Styles for administration pages.
 */

/**
 * Node add/edit form layout
 */

/* Narrow screens */
.layout-region {
  box-sizing: border-box;
}

/* Wide screens */
@media
  screen and (min-width: 780px),
  (orientation: landscape) and (min-device-height: 780px) {

  .layout-region-node-main,
  .layout-region-node-footer {
    float: left; /* LTR */
    box-sizing: border-box;
    width: 65%;
    padding-right: 2em; /* LTR */
  }

  [dir="rtl"] .layout-region-node-main,
  [dir="rtl"] .layout-region-node-footer {
    float: right;
    padding-right: 0;
    padding-left: 2em;
  }

  .layout-region-node-secondary {
    float: right; /* LTR */
    width: 35%;
  }

  [dir="rtl"] .layout-region-node-secondary {
    float: left;
  }

  /* @todo File an issue to add a standard class to all text-like inputs */
  .layout-region-node-secondary .form-autocomplete,
  .layout-region-node-secondary .form-text,
  .layout-region-node-secondary .form-tel,
  .layout-region-node-secondary .form-email,
  .layout-region-node-secondary .form-url,
  .layout-region-node-secondary .form-search,
  .layout-region-node-secondary .form-number,
  .layout-region-node-secondary .form-color,
  .layout-region-node-secondary textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
}

/**
 * The vertical toolbar mode gets triggered for narrow screens, which throws off
 * the intent of media queries written for the viewport width. When the vertical
 * toolbar is on, we need to suppress layout for the original media width + the
 * toolbar width (240px). In this case, 240px + 780px.
 */
@media
  screen and (max-width: 1020px) {

  .


(TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי לבחור את האלמנט בעורך."}]},{name:"פקודות",items:[{name:" ביטול צעד אחרון",legend:"לחץ ${undo}"},{name:" חזרה על צעד אחרון",legend:"לחץ ${redo}"},{name:" הדגשה",legend:"לחץ ${bold}"},{name:" הטייה",legend:"לחץ ${italic}"},{name:" הוספת קו תחתון",legend:"לחץ ${underline}"},{name:" הוספת לינק",
legend:"לחץ ${link}"},{name:" כיווץ סרגל הכלים",legend:"לחץ ${toolbarCollapse}"},{name:"גישה למיקום המיקוד הקודם",legend:"לחץ ${accessPreviousSpace} כדי לגשת למיקום המיקוד הלא-נגיש הקרוב לפני הסמן, למשל בין שני אלמנטים סמוכים מסוג HR. חזור על צירוף מקשים זה כדי להגיע למקומות מיקוד רחוקים יותר."},{name:"גישה למיקום המיקוד הבא",legend:"לחץ ${accessNextSpace} כדי לגשת למיקום המיקוד הלא-נגיש הקרוב אחרי הסמן, למשל בין שני אלמנטים סמוכים מסוג HR. חזור על צירוף מקשים זה כדי להגיע למקומות מיקוד רחוקים יותר."},
{name:" הוראות נגישות",legend:"לחץ ${a11yHelp}"}]}],tab:"Tab",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",leftArrow:"חץ שמאלה",upArrow:"חץ למעלה",rightArrow:"חץ ימינה",downArrow:"חץ למטה",insert:"הכנס",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"בחר מקש",numpad0:"Numpad 0",numpad1:"Numpad 1",numpad2:"Numpad 2",numpad3:"Numpad 3",numpad4:"Numpad 4",numpad5:"Numpad 5",numpad6:"Numpad 6",numpad7:"Numpad 7",numpad8:"Numpad 8",
numpad9:"Numpad 9",multiply:"Multiply",add:"הוסף",subtract:"Subtract",decimalPoint:"Decimal Point",divide:"Divide",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"Semicolon",equalSign:"Equal Sign",comma:"Comma",dash:"Dash",period:"Period",forwardSlash:"סלאש",graveAccent:"Grave Accent",openBracket:"Open Bracket",backSlash:"סלאש הפוך",closeBracket:"Close Bracket",singleQuote:"ציטוט יחיד"});/*
 Copyright (c) 2003-2017


264CBR
, IMPEncoderAttrH264Smart
, IMPEncoderAttrH264VBR
, IMPEncoderAttrH265CBR
, IMPEncoderAttrH265Smart
, IMPEncoderAttrH265VBR

frmRateDen
: IMPDecoderAttr
, IMPEncoderFrmRate

frmRateNum
: IMPDecoderAttr
, IMPEncoderFrmRate

frmUsedMode
: IMPEncoderAttrFrmUsed

frmUsedTimes
: IMPEncoderAttrFrmUsed

<address class="footer">
生成于 2020年 五月 7日 星期四 18:03:04 , 为 ISVP-SDK使用

 1.8.8
</address>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>ISVP-SDK: IMPEncoderDataType联合体 参考</title>
<link


s.add(sample);
                }
                case 11: { // IPv4 Port
                    final JsonObject sample = new JsonObject();
                    sample.addProperty("name", "IPv4 Port: " + splitData[10]);
                    sample.addProperty("id", NULL_UUID);
                    samples.add(sample);
                }
                case 10: { // Nintendo limited
                    final JsonObject sample = new JsonObject();
                    sample.addProperty("name", "Nintendo limited: " + !"1".equalsIgnoreCase(splitData[9]));
                    sample.addProperty("id", NULL_UUID);
                    samples.add(sample);
                }
                case 9: { // GameType
                    final JsonObject sample = new JsonObject();
                    sample.addProperty("name", "GameType: " + splitData[8]);
                    sample.addProperty("id", NULL_UUID);
                    samples.add(sample);
                }
                case 8: // Sub MOTD
                case 7: // Server id
                case 6: // Max players
                    try {
                        players.addProperty("max", Integer.parseInt(splitData[5]));
                    } catch (NumberFormatException ignored) {
                    }
                case 5: // Online players
                    try {
                        players.addProperty("online", Integer.parseInt(splitData[4]));
                    } catch (NumberFormatException ignored) {
                    }
                case 4: // Version
                case 3: { // Protocol version
                    final JsonObject sample = new JsonObject();
                    sample.addProperty("name", "Protocol: " + splitData[2]);
                    sample.addProperty("id", NULL_UUID);
                    samples.add(sample);
                }
                case 2: // MOTD
                    statusResponse.addProperty("description", splitData[1] + (splitData.length >= 8 ? ("\n§r" + splitData[7]) : ""));
                case 1: { // Edition
                    final String versionName = splitData[0] + (splitData.length >= 4 ? (" " + splitData[3]) : "");
                    version.addProperty("name", versionName);

                    final JsonObject sample = new JsonObject();
                    sample.addProperty("name", "Version: " + versionName);
                    sample.addProperty("id", NULL_UUID);
                    samples.add(sample);
                }
                case 0:
                    break;
            }

            wrapper.write(Types.STRING, statusResponse.toString()); // status json
        });

        protocol.registerServerbound(State.STATUS, ServerboundStatusPackets.STATUS_REQUEST.getId(), 1 /* UNCONNECTED_PING */, wrapper -> {
            wrapper.write(Types.LONG, System.nanoTime() / 1_000_000); // timestamp (system uptime)
        });
        protocol.registerServerbound(State.STATUS, ServerboundStatusPackets.PING_REQUEST.getId(), -1, wrapper -> {
            wrapper.cancel(); // Ping is added as a part of the player sample instead
            final PacketWrapper pongResponse = PacketWrapper.create(ClientboundStatusPackets.PONG_RESPONSE, wrapper.user());
            pongResponse.write(Types.LONG, wrapper.read(Types.LONG)); // timestamp
            pongResponse.send(BedrockProtocol.class);
        });
    }

}
/*
 * This file is part of ViaBedrock - https://github.com/RaphiMC/ViaBedrock
 * Copyright (C) 2023-2025 RK_01/RaphiMC and contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *


�真实姓名已被使用！", null);
        }
        userService.addUser(user);
        return new ResultBean(201, "后台用户["+ user.getUserRealname() +"]添加成功！", null);
    }

    /**
     * 通过id删除
     *
     * @param userId
     * @return
     */
    @DeleteMapping("delUserById")
    public ResultBean<Void> delUserById(@RequestParam("userId") Long userId) {
        try {
            String realName = userService.findUserById(userId).getUserRealname();
            userService.delUserById(userId);
            return new ResultBean(204, "后台用户["+ realName +"]删除成功！", null);
        } catch (Exception e) {
            e.printStackTrace();
            return new ResultBean(600, "删除失败，该用户可能被其它因素引用到！", null);
        }
    }

    /**
     * 更新
     *
     * @param user
     * @return
     */
    @PutMapping("updateUser")
    public ResultBean<Void> updateUser(@RequestBody User user) {
        userService.updateUser(user);
        return new ResultBean(201, "后台用户["+ user.getUserRealname() +"]修改成功！", null);
    }

    /**
     * 通过id查询
     *
     * @param userId
     * @return
     */
    @GetMapping("findUserById")
    public ResultBean<User> findUserById(@RequestParam("userId") Long userId) {
        User user = userService.findUserById(userId);
        if (user == null) {
            return new ResultBean(600, "用户不存在！", null);
        }
        return new ResultBean(200, "查询成功！", user);
    }

    /**
     * 查询所有
     *
     * @return
     */
    @GetMapping("findUsers")
    public ResultBean<List<User>> findUsers() {
        List<User> list = userService.findAll();
        return new ResultBean(200, "查询成功！", list);
    }

    /**
     * 分页查询
     * @param page
     * @param rows
     * @param userAccount
     * @param userRealname
     * @param fkUserRoleId
     * @return
     */
    @GetMapping("findUsersByPage")
    public ResultBean<PageResult<User>> findUsersByPage(
            @RequestParam(value = "page", defaultValue = "1") Integer page,
            @RequestParam(value = "rows", defaultValue = "5") Integer rows,
            @RequestParam(value = "userAccount", required = false) String userAccount,
            @RequestParam(value = "userRealname", required = false) String userRealname,
            @RequestParam(value = "fkUserRoleId", required = false) Integer fkUserRoleId) {
        PageResult<User> usersByPage = userService.findUsersByPage(page, rows, userAccount, userRealname, fkUserRoleId);
        return new ResultBean(200, "查询成功！", usersByPage);
    }

    /**
     * 通过登录账户查询列表
     *
     * @param userAccount
     * @return
     */
    @GetMapping("findUsersByuserAccount")
    public ResultBean<List<User>> findUsersByUserName(@RequestParam("userAccount") String userAccount) {
        return new ResultBean(200, "查询成功！", userService.findUsersByUserAccount(userAccount));
    }

    /**
     * 通过真实姓名查询列表
     *
     * @param userRealname
     * @return
     */
    @GetMapping("findUsersByUserRealname")
    public ResultBean<List<User>> findUsersByUserRealname(@RequestParam("userRealname") String userRealname) {
        return new Result


n8n's built-in methods and variables [\#](https://docs.n8n.io/code/cookbook/builtin/\#examples-using-n8ns-built-in-methods-and-variables "Permanent link")

n8n provides built-in methods and variables for working with data and accessing n8n data. This section provides usage examples.

- [execution](https://docs.n8n.io/code/cookbook/builtin/execution/)
- [getWorkflowStaticData](https://docs.n8n.io/code/cookbook/builtin/get-workflow-static-data/)
- [Retrieve linked items from earlier in the workflow](https://docs.n8n.io/code/cookbook/builtin/itemmatching/)
- [(node-name).all](https://docs.n8n.io/code/cookbook/builtin/all/)
- [vars](https://docs.n8n.io/code/cookbook/builtin/vars/)

## Related resources [\#](https://docs.n8n.io/code/cookbook/builtin/\#related-resources "Permanent link")

- [Built-in methods and variables reference](https://docs.n8n.io/code/builtin/overview/)
- [Expressions](https://docs.n8n.io/code/expressions/)
- [Code node](https://docs.n8n.io/code/code-node/)

---

### (node-name).all | n8n Docs
Original URL: https://docs.n8n.io/code/cookbook/builtin/all/

# `("<node-name>").all(branchIndex?: number, runIndex?: number)` [\#](https://docs.n8n.io/code/cookbook/builtin/all/\#node-nameallbranchindex-number-runindex-number "Permanent link")

This gives access to all the items of the current or parent nodes. If you don't supply any parameters, it returns all the items of the current node.

## Getting items [\#](https://docs.n8n.io/code/cookbook/builtin/all/\#getting-items "Permanent link")

[JavaScript](https://docs.n8n.io/code/cookbook/builtin/all/#__tabbed_1_1)[Python](https://docs.n8n.io/code/cookbook/builtin/all/#__tabbed_1_2)

|     |     |
| --- | --- |
| ```<br> 1<br> 2<br> 3<br> 4<br> 5<br> 6<br> 7<br> 8<br> 9<br>10<br>11<br>``` | ```<br>// Returns all the items of the given node and current run<br>let allItems = $("<node-name>").all();<br>// Returns all items the node "IF" outputs (index: 0 which is Output "true" of its most recent run)<br>let allItems = $("IF").all();<br>// Returns all items the node "IF" outputs (index: 0 which is Output "true" of the same run as current node)<br>let allItems = $("IF").all(0, $runIndex);<br>// Returns all items the node "IF" outputs (index: 1 which is Output "false" of run 0 which is the first run)<br>let allItems = $("IF").all(1, 0);<br>``` |

|     |     |
| --- | --- |
| ```<br> 1<br> 2<br> 3<br> 4<br> 5<br> 6<br> 7<br> 8<br> 9<br>10<br>11<br>``` | ```
# Returns all the items of the given node and current run
allItems = _("<node-name>").all();
# Returns all items the node "IF" outputs (index: 0 which is Output "true" of its most recent run)
allItems = _("IF").all();<b


,0
bfc5c874:	24160000 	li	s6,0
bfc5c878:	14550091 	bne	v0,s5,bfc5cac0 <inst_error>
bfc5c87c:	00000000 	nop
bfc5c880:	1476008f 	bne	v1,s6,bfc5cac0 <inst_error>
bfc5c884:	00000000 	nop
/home/ghj/Desktop/func/inst/n39_blez.S:206
bfc5c888:	24020000 	li	v0,0
bfc5c88c:	24030000 	li	v1,0
bfc5c890:	10000008 	b	bfc5c8b4 <n39_blez_test+0x52a4>
bfc5c894:	00000000 	nop
bfc5c898:	3c02ea86 	lui	v0,0xea86
bfc5c89c:	34427f00 	ori	v0,v0,0x7f00
bfc5c8a0:	1900000b 	blez	t0,bfc5c8d0 <n39_blez_test+0x52c0>
bfc5c8a4:	00000000 	nop
bfc5c8a8:	1000000b 	b	bfc5c8d8 <n39_blez_test+0x52c8>
bfc5c8ac:	00000000 	nop
bfc5c8b0:	00000000 	nop
bfc5c8b4:	3c08dab5 	lui	t0,0xdab5
bfc5c8b8:	350862ac 	ori	t0,t0,0x62ac
bfc5c8bc:	1900fff6 	blez	t0,bfc5c898 <n39_blez_test+0x5288>
bfc5c8c0:	00000000 	nop
bfc5c8c4:	10000004 	b	bfc5c8d8 <n39_blez_test+0x52c8>
bfc5c8c8:	00000000 	nop
bfc5c8cc:	00000000 	nop
bfc5c8d0:	3c036d76 	lui	v1,0x6d76
bfc5c8d4:	346350e5 	ori	v1,v1,0x50e5
bfc5c8d8:	3c15ea86 	lui	s5,0xea86
bfc5c8dc:	36b57f00 	ori	s5,s5,0x7f00
bfc5c8e0:	3c166d76 	lui	s6,0x6d76
bfc5c8e4:	36d650e5 	ori	s6,s6,0x50e5
bfc5c8e8:	14550075 	bne	v0,s5,bfc5cac0 <inst_error>
bfc5c8ec:	00000000 	nop
bfc5c8f0:	14760073 	bne	v1,s6,bfc5cac0 <inst_error>
bfc5c8f4:	00000000 	nop
/home/ghj/Desktop/func/inst/n39_blez.S:207
bfc5c8f8:	24020000 	li	v0,0
bfc5c8fc:	24030000 	li	v1,0
bfc5c900:	10000008 	b	bfc5c924 <n39_blez_test+0x5314>
bfc5c904:	00000000 	nop
bfc5c908:	3c02d052 	lui	v0,0xd052
bfc5c90c:	34422db0 	ori	v0,v0,0x2db0
bfc5c910:	190


if (v > 0) {
              error("Erreur interne de calcul, il reste " + v + " PP \xE0 d\xE9penser ??", bourse);
              return;
            }
            if (bourse.pc != pc)
              setTokenAttr(perso, 'bourse_pc', bourse.pc, evt, {
                charAttr: true
              });
            if (bourse.pa != pa)
              setTokenAttr(perso, 'bourse_pa', bourse.pa, evt, {
                charAttr: true
              });
            if (bourse.po != po)
              setTokenAttr(perso, 'bourse_po', bourse.po, evt, {
                charAttr: true
              });
            if (bourse.pp != pp)
              setTokenAttr(perso, 'bourse_pp', bourse.pp, evt, {
                charAttr: true
              });
            addEvent(evt);
            afficherRichesse(perso);
            return;
          case 'fixer':
            addEvent(evt);
            setTokenAttr(perso, 'bourse_' + unite, montant, evt, {
              charAttr: true
            });
            afficherRichesse(perso);
            return;
          default:
            if (selected.length > 1) {
              afficherRichesse(perso, msg);
              return;
            }
            let optionsDisplay = {
              chuchote: true,
              image: 'https://www.on6rm.be/wp-content/uploads/2015/08/vignette_2_bourse-argent.png'
            };
            let titre = "Bourse de " + nomPerso(perso);
            let display = startFramedDisplay(playerId, titre, perso, optionsDisplay);
            ajouteLignePieces(perso, display, 'pp', 'Platine', "de platine");
            ajouteLignePieces(perso, display, 'po', 'Or', "d'or");
            ajouteLignePieces(perso, display, 'pa', 'Argent', "d'argent");
            ajouteLignePieces(perso, display, 'pc', 'Cuivre', "de cuivre");
            sendFramedDisplay(display);
        }
      });
    });
  }

  //!cof-mot-de-pouvoir-immobilise --lanceur toid
  function motDePouvoirImmobilise(msg) {
    let options = parseOptions(msg);
    let pageId = options.pageId;
    let evt = {
      type: 'Mot de pouvoir'
    };
    addEvent(evt);
    if (options.lanceur) {
      sendPerso(options.lanceur, "prononce un mot avec la Voix d'une puissance sup\xE9rieure. Tous ses ennemis sont immobilis\xE9s et ses alli\xE9s sont galvanis\xE9s.");
      let allies = alliesParPerso[options.lanceur.charId];
      if (allies) {
        let tokens = findObjs({
          _type: 'graphic',
          _subtype: 'token',
          _pageid: pageId,
          layer: 'objects'
        });
        tokens.forEach(function(tok) {
          let ci = tok.get('represents');
          if (ci === '') return;
          if (!allies.has(ci)) return;
          let perso = {
            charId: ci,
            token: tok
          };
          setAttrDuree(perso, 'bonusAttaqueTemp', 1, evt);
        });
      }
    }
    getSelected(msg, function(selected, playerId) {
      iterSelected(selected, function(perso) {
        if (predicateAsBool(perso, 'liberteDAction') ||
          predicateAsBool(perso, 'actionLibre') ||
          (predicateAsInt(perso, 'voieDeLArchange', 1) > 1 && attributeAsBool(perso, 'formeDAnge'))
        )


utation.SetStatus(s)
	return vuo
}

// SetNillableStatus sets the "status" field if the given value is not nil.
func (vuo *V2AgentsUpdateOne) SetNillableStatus(s *string) *V2AgentsUpdateOne {
	if s != nil {
		vuo.SetStatus(*s)
	}
	return vuo
}

// SetLastHeartbeatAt sets the "last_heartbeat_at" field.
func (vuo *V2AgentsUpdateOne) SetLastHeartbeatAt(t time.Time) *V2AgentsUpdateOne {
	vuo.mutation.SetLastHeartbeatAt(t)
	return vuo
}

// ClearLastHeartbeatAt clears the value of the "last_heartbeat_at" field.
func (vuo *V2AgentsUpdateOne) ClearLastHeartbeatAt() *V2AgentsUpdateOne {
	vuo.mutation.ClearLastHeartbeatAt()
	return vuo
}

// SetUpdatedAt sets the "updated_at" field.
func (vuo *V2AgentsUpdateOne) SetUpdatedAt(t time.Time) *V2AgentsUpdateOne {
	vuo.mutation.SetUpdatedAt(t)
	return vuo
}

// Mutation returns the V2AgentsMutation object of the builder.
func (vuo *V2AgentsUpdateOne) Mutation() *V2AgentsMutation {
	return vuo.mutation
}

// Where appends a list predicates to the V2AgentsUpdate builder.
func (vuo *V2AgentsUpdateOne) Where(ps ...predicate.V2Agents) *V2AgentsUpdateOne {
	vuo.mutation.Where(ps...)
	return vuo
}

// Select allows selecting one or more fields (columns) of the returned entity.
// The default is selecting all fields defined in the entity schema.
func (vuo *V2AgentsUpdateOne) Select(field string, fields ...string) *V2AgentsUpdateOne {
	vuo.fields = append([]string{field}, fields...)
	return vuo
}

// Save executes the query and returns the updated V2Agents entity.
func (vuo *V2AgentsUpdateOne) Save(ctx context.Context) (*V2Agents, error) {
	vuo.defaults()
	return withHooks(ctx, vuo.sqlSave, vuo.mutation, vuo.hooks)
}

// SaveX is like Save, but panics if an error occurs.
func (vuo *V2AgentsUpdateOne) SaveX(ctx context.Context) *V2Agents {
	node, err := vuo.Save(ctx)
	if err != nil {
		panic(err)
	}
	return node
}

// Exec executes the query on the entity.
func (vuo *V2AgentsUpdateOne) Exec(ctx context.Context) error {
	_, err := vuo.Save(ctx)
	return err
}

// ExecX is like Exec, but panics if an error occurs.
func (vuo *V2AgentsUpdateOne) ExecX(ctx context.Context) {
	if err := vuo.Exec(ctx); err != nil {
		panic(err)
	}
}

// defaults sets the default values of the builder before save.
func (vuo *V2AgentsUpdateOne) defaults() {
	if _, ok := vuo.mutation.LastHeartbeatAt(); !ok && !vuo.mutation.LastHeartbeatAtCleared() {
		v := v2agents.UpdateDefaultLastHeartbeatAt()
		vuo.mutation.SetLastHeartbeatAt(v)
	}
	if _, ok := vuo.mutation.UpdatedAt(); !ok {
		v := v2agents.UpdateDefaultUpdatedAt()
		vuo.mutation.SetUpdatedAt(v)
	}
}

// check runs all checks and user-defined validators on the builder.
func (vuo *V2AgentsUpdateOne) check() error {
	if v, ok := vuo.mutation.Status(); ok {
		if err


" d="M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zm192 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32v-67.2c12.3-2.5 24.1-6.4 35.1-11.5-2.1-10.8-3.1-21.9-3.1-33.3 0-80.3 53.8-148 127.3-169.2.5-2.2.7-4.5.7-6.8 0-17.7-14.3-32-32-32H32zm400 352c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-48c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-192c8.8 0 16 7.2 16 16v80c0 8.8-7.2 16-16 16s-16-7.2-16-16v-80c0-8.8 7.2-16 16-16z"/></svg>';
  static const String plug_circle_minus =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="576" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 576 512"><path fill="currentColor" d="M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zm192 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32v-67.2c12.3-2.5 24.1-6.4 35.1-11.5-2.1-10.8-3.1-21.9-3.1-33.3 0-80.3 53.8-148 127.3-169.2.5-2.2.7-4.5.7-6.8 0-17.7-14.3-32-32-32H32zm544 208c0-79.5-64.5-144-144-144s-144 64.5-144 144 64.5 144 144 144 144-64.5 144-144zm-64 0c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16h128c8.8 0 16 7.2 16 16z"/></svg>';
  static const String plug_circle_plus =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="576" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 576 512"><path fill="currentColor" d="M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zm192 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-


import cadquery as cq
from cadquery import Assembly, Color, Location as Loc, Vector as Vec
from numpy import linspace,diff

Ws = 1200
Hs = 600

W = 770
H = 460
d = 5
N = 7
h = 50

vpts = [(0,-3*H/8), (0,-H/4),(0,-H/8), (0,0), (0,H/8),(0,H/4),(0,3*H/8)]

pts = linspace(-(W-d)/2,(W-d)/2,N+2)
delta = diff(pts)[0]

def make_base():

    return (
        cq.Workplane()
        .rect(W,H)
        .extrude(d)
        .pushPoints(
            [(pt,0) for pt in pts] +
            [(0,H/2-d/2),(0,-H/2+d/2)])
        .rect(d,d)
        .cutThruAll()
        )

def make_side():

    return cq.Workplane().rect(d,H-2*d).extrude(h)

def make_front():

    return (
        cq.Workplane()
        .rect(W,d).extrude(h-d)
        .faces('<Z').workplane()
        .rect(d,d).extrude(d)
        .faces('<Y').workplane()
        .pushPoints([(pt,(h-d)/2) for pt in pts])
        .rect(d,d).cutThruAll()
        )

def make_divider():

    return (
        cq.Workplane()
        .rect(d,H-2*d)
        .extrude(h-2*d)
        .faces('>Z').workplane()
        .pushPoints(vpts)
        .rect(d,d)
        .cutBlind(-d)
        .faces('<Z').workplane()
        .rect(d,d).extrude(d)
        .pushPoints([(0,-H/2+d-d/2,-(h-d)/2),(0,+H/2-d+d/2,-(h-d)/2)])
        .box(d,d,d)
        )

def make_spacer():

    return (
        cq.Workplane("XZ")
        .rect(delta-d,h-d)
        .pushPoints([(-(delta-d)/2,h/2-d-d/2),((delta-d)/2,h/2-d-d/2)])
        .rect(d,2*d)
        .extrude(d)
        )

base = make_base()
side_l = make_divider()
side_r = make_divider()
front_f = make_front()
front_b = make_front()

assy = (
    cq.Assembly(base,name='base',color=cq.Color(1,1,.4,0.5))
    .add(side_l,name='side_l',loc=Loc(Vec(-(W-d)/2,0,d)))
    .add(side_l,name='side_r',loc=Loc(Vec(+(W-d)/2,0,d)))
    .add(front_f,name='front_f',loc=Loc(Vec(0,-(H-d)/2,d)))
    .add(front_b,name='front_b',loc=Loc(Vec(0,(H-d)/2,d)))
    )

for i,p in enumerate(pts[1:-1]):

    assy = assy.add(make_divider(),name=f'div{i}',loc=Loc(Vec(p,0,d)))

for i,p in enumerate(pts[1:]):

    assy = assy.add(make_spacer(),name=f'div2{i}',loc=Loc(Vec(p-delta/2,d/2,d+(h)/2-d/2)))

show_object(assy)

# export to dxf
from path import Path
from cadquery import exporters as exp

with Path('tray').mkdir_p():
    exp.exportDXF(cq.Workplane().rect(Ws,Hs).extrude(1).section(),'sheet.dxf')
    exp.exportDXF(base.section(),'base.dxf')
    exp.exportDXF(front_f.section(),'front.dxf')
    exp.exportDXF(make_divider().faces('>X').workplane().section(), 'divider.dxf')
    exp.exportDXF(make_spacer().section(), 'spacer.dxf')


r.Start("pre-start ", serviceName)
			err := preService.PreStart()
			monitor.Finish()
			if err != nil {
				return E.Cause(err, "pre-start ", serviceName)
			}
		}
	}
	err = s.router.PreStart()
	if err != nil {
		return E.Cause(err, "pre-start router")
	}
	err = s.startOutbounds()
	if err != nil {
		return err
	}
	return s.router.Start()
}

func (s *Box) start() error {
	err := s.preStart()
	if err != nil {
		return err
	}
	for serviceName, service := range s.preServices1 {
		err = service.Start()
		if err != nil {
			return E.Cause(err, "start ", serviceName)
		}
	}
	for serviceName, service := range s.preServices2 {
		err = service.Start()
		if err != nil {
			return E.Cause(err, "start ", serviceName)
		}
	}
	for i, in := range s.inbounds {
		var tag string
		if in.Tag() == "" {
			tag = F.ToString(i)
		} else {
			tag = in.Tag()
		}
		err = in.Start()
		if err != nil {
			return E.Cause(err, "initialize inbound/", in.Type(), "[", tag, "]")
		}
	}
	return s.postStart()
}

func (s *Box) postStart() error {
	for serviceName, service := range s.postServices {
		err := service.Start()
		if err != nil {
			return E.Cause(err, "start ", serviceName)
		}
	}
	for _, outbound := range s.outbounds {
		if lateOutbound, isLateOutbound := outbound.(adapter.PostStarter); isLateOutbound {
			err := lateOutbound.PostStart()
			if err != nil {
				return E.Cause(err, "post-start outbound/", outbound.Tag())
			}
		}
	}

	return s.router.PostStart()
}

func (s *Box) Close() error {
	select {
	case <-s.done:
		return os.ErrClosed
	default:
		close(s.done)
	}
	monitor := taskmonitor.New(s.logger, C.DefaultStopTimeout)
	var errors error
	for serviceName, service := range s.postServices {
		monitor.Start("close ", serviceName)
		errors = E.Append(errors, service.Close(), func(err error) error {
			return E.Cause(err, "close ", serviceName)
		})
		monitor.Finish()
	}
	for i, in := range s.inbounds {
		monitor.Start("close inbound/", in.Type(), "[", i, "]")
		errors = E.Append(errors, in.Close(), func(err error) error {
			return E.Cause(err, "close inbound/", in.Type(), "[", i, "]")
		})
		monitor.Finish()
	}
	for i, out := range s.outbounds {
		monitor.Start("close outbound/", out.Type(), "[", i, "]")
		errors = E.Append(errors, common.Close(out), func(err error) error {
			return E.Cause(err, "close outbound/", out.Type(), "[", i, "]")
		})
		monitor.Finish()
	}
	monitor.Start("close router")
	if err := common.Close(s.router); err != nil {
		errors = E.Append(errors, err, func(err error) error {
			return E.Cause(err, "close router")
		})
	}
	monitor.Finish()
	for serviceName, service := range s.preServices1 {
		monitor.Start("close ", serviceName)
		errors = E.Append(errors, service.Close(), func(err error) error {
			return E.Cause(err, "close ", serviceName)
		})
		monitor.Finish()
	}
	for serviceName, service := range


h.zeros((h, w), dtype=torch.long, device=m_id.device)
                else:
                    m_id = m_id.argmax(-1).view(h, w)

                if dedup:
                    # Merge the masks corresponding to the same stuff class
                    for equiv in stuff_equiv_classes.values():
                        if len(equiv) > 1:
                            for eq_id in equiv:
                                m_id.masked_fill_(m_id.eq(eq_id), equiv[0])

                final_h, final_w = to_tuple(target_size)

                seg_img = Image.fromarray(id2rgb(m_id.view(h, w).cpu().numpy()))
                seg_img = seg_img.resize(size=(final_w, final_h), resample=Image.NEAREST)

                np_seg_img = (
                    torch.ByteTensor(torch.ByteStorage.from_buffer(seg_img.tobytes())).view(final_h, final_w, 3).numpy()
                )
                m_id = torch.from_numpy(rgb2id(np_seg_img))

                area = []
                for i in range(len(scores)):
                    area.append(m_id.eq(i).sum().item())
                return area, seg_img

            area, seg_img = get_ids_area(cur_masks, cur_scores, dedup=True)
            if cur_classes.numel() > 0:
                # We know filter empty masks as long as we find some
                while True:
                    filtered_small = torch.as_tensor(
                        [area[i] <= 4 for i, c in enumerate(cur_classes)], dtype=torch.bool, device=keep.device
                    )
                    if filtered_small.any().item():
                        cur_scores = cur_scores[~filtered_small]
                        cur_classes = cur_classes[~filtered_small]
                        cur_masks = cur_masks[~filtered_small]
                        area, seg_img = get_ids_area(cur_masks, cur_scores)
                    else:
                        break

            else:
                cur_classes = torch.ones(1, dtype=torch.long, device=cur_classes.device)

            segments_info = []
            for i, a in enumerate(area):
                cat = cur_classes[i].item()
                segments_info.append({"id": i, "isthing": self.is_thing_map[cat], "category_id": cat, "area": a})
            del cur_classes

            with io.BytesIO() as out:
                seg_img.save(out, format="PNG")
                predictions = {"png_string": out.getvalue(), "segments_info": segments_info}
            preds.append(predictions)
        return preds


inspace > 0.0989) then
        if (axisThrottle > 0) then
            local maxAtmoForceForward = maxKPAlongAxis[1]
            forceCorrespondingToThrottle = axisThrottle * maxAtmoForceForward
        else
            local maxAtmoForceBackward = maxKPAlongAxis[2]
            forceCorrespondingToThrottle = -axisThrottle * maxAtmoForceBackward
        end
    elseif (inspace > 0) then
        if (axisThrottle > 0) then
            local maxSpaceForceForward = maxKPAlongAxis[3]
            if maxKPAlongAxis[1] and maxKPAlongAxis[1] > maxSpaceForceForward then maxSpaceForceForward = maxKPAlongAxis[1] end
            forceCorrespondingToThrottle = axisThrottle * maxSpaceForceForward
        else
            local maxSpaceForceBackward = maxKPAlongAxis[4]
            if maxKPAlongAxis[2] and maxKPAlongAxis[2] > maxKPAlongAxis[4] then maxSpaceForceBackward = maxKPAlongAxis[2] end
            forceCorrespondingToThrottle = -axisThrottle * maxSpaceForceBackward
        end
    else
        if (axisThrottle > 0) then
            local maxSpaceForceForward = maxKPAlongAxis[3]
            forceCorrespondingToThrottle = axisThrottle * maxSpaceForceForward
        else
            local maxSpaceForceBackward = maxKPAlongAxis[4]
            forceCorrespondingToThrottle = -axisThrottle * maxSpaceForceBackward
        end
    end

    local accelerationCommand = forceCorrespondingToThrottle / self.mass

    local finalAcceleration = accelerationCommand * axisWorldDirection + additionalAcceleration

    self.system.addMeasure("dynamic", "acceleration", "command", accelerationCommand)
    self.system.addMeasure("dynamic", "acceleration", "intensity", finalAcceleration:len())

    return finalAcceleration
end


load home space, loading fallback...";
                UnityMainThreadTaskScheduler.Default.Enqueue(TaskRunner.Track(() => scene.events.OnLoadUrl.Invoke(BanterScene.ORIGINAL_HOME_SPACE), $"{nameof(BanterStarterUpper)}.{nameof(CancelLoading)}.Failed"));
            }
            else
            {
                // Allow cancelling and going back to lobby, only if loading
                if (scene.loading)
                {
                    scene.LoadingStatus = "Loading canceled, falling back to lobby";
                    LogLine.Do("Taking you to your home...");
                    scene.Cancel("User cancelled loading", true);
                    UnityMainThreadTaskScheduler.Default.Enqueue(TaskRunner.Track(() => scene.events.OnLoadUrl.Invoke(BanterScene.ORIGINAL_HOME_SPACE), $"{nameof(BanterStarterUpper)}.{nameof(CancelLoading)}.LoadingCanceled"));
                }

                // The below allows canceling from outside loading screen
                // if (!(scene.loading && scene.CurrentUrl == BanterScene.CUSTOM_HOME_SPACE))
                // {
                //     scene.LoadingStatus = "Taking you to your home...";
                //     LogLine.Do("Taking you to your home...");
                //     scene.Cancel("User cancelled loading", true);
                //     UnityMainThreadTaskScheduler.Default.QueueAction(() => scene.events.OnLoadUrl.Invoke(BanterScene.CUSTOM_HOME_SPACE));
                // }
            }
        }

        public static void ToggleDevTools()
        {
#if UNITY_EDITOR
            var devToolsEnabled = UnityEditor.EditorPrefs.GetBool(BANTER_DEVTOOLS_ENABLED, false);
            devToolsEnabled = !devToolsEnabled;
            UnityEditor.EditorPrefs.SetBool(BANTER_DEVTOOLS_ENABLED, devToolsEnabled);

            LogLine.Do($"Banter DevTools " + (devToolsEnabled ? "enabled." : "disabled."));
#endif
            if (Application.isPlaying)
            {
                BanterScene.Instance().link.ToggleDevTools();
            }
        }

        private void StartBrowser()
        {
            Kill();
#if !BANTER_EDITOR
            var isProd = false;
#else
            var isProd = true;
#endif

            string[] args = System.Environment.GetCommandLineArgs();
            string extraArgs = openBrowser ? " --openbrowser true" : "";
            for (int i = 0; i < args.Length; i++)
            {
                if (args[i] == "-openbrowser" && (i + 1) < args.Length)
                {
                        extraArgs = " --openbrowser true";
                }
            }

#if UNITY_EDITOR
            var injectFile = "\"" + Path.GetFullPath("Packages\\com.sidequest.banter\\Editor\\banter-link\\inject.txt") + "\"";
            var Eargs = (isProd ? "--prod true " : "") + "--bebug" + (UnityEditor.EditorPrefs.GetBool(BANTER_DEVTOOLS_ENABLED, false) ? " --devtools" : "") + " --pipename " + BanterLink.pipeName + " --inject " + injectFile + " --root " + "\"" + Path.Join(Application.dataPath, WEB_ROOT) + "\"" + extraArgs;
            processId = StartProcess.Do(LogLine.browserColor, Path.GetFullPath("Packages\\com.sidequest.banter\\Editor\\banter-link"),
                Path.GetFullPath("Packages\\com.sidequest.banter\\Editor\\banter-link\\banter-link.exe"),
                Eargs,
                LogTag.BanterBrowser);
#else
            var injectFile = "\"" + Path.Combine(Directory.GetCurrentDirectory(), "banter-link", "inject.txt") + "\"";
            processId = StartProcess.Do(LogLine.bro


#ifndef USE_EXTERNAL_ZSTD
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 * All rights reserved.
 *
 * This source code is licensed under both the BSD-style license (found in the
 * LICENSE file in the root directory of this source tree) and the GPLv2 (found
 * in the COPYING file in the root directory of this source tree).
 * You may select, at your option, one of the above-listed licenses.
 */

#ifndef ZSTD_DEC_BLOCK_H
#define ZSTD_DEC_BLOCK_H

/*-*******************************************************
 *  Dependencies
 *********************************************************/
#include "zstd_deps.h"   /* size_t */
#include "zstd.h"    /* DCtx, and some public functions */
#include "zstd_internal.h"  /* blockProperties_t, and some public functions */
#include "zstd_decompress_internal.h"  /* ZSTD_seqSymbol */

/* ===   Prototypes   === */

/* note: prototypes already published within `zstd.h` :
 * ZSTD_decompressBlock()
 */

/* note: prototypes already published within `zstd_internal.h` :
 * ZSTD_getcBlockSize()
 * ZSTD_decodeSeqHeaders()
 */

 /* Streaming state is used to inform allocation of the literal buffer */
typedef enum {
    not_streaming = 0,
    is_streaming = 1
} streaming_operation;

/* ZSTD_decompressBlock_internal() :
 * decompress block, starting at `src`,
 * into destination buffer `dst`.
 * @return : decompressed block size,
 *           or an error code (which can be tested using ZSTD_isError())
 */
size_t ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx,
                               void* dst, size_t dstCapacity,
                         const void* src, size_t srcSize, const streaming_operation streaming);

/* ZSTD_buildFSETable() :
 * generate FSE decoding table for one symbol (ll, ml or off)
 * this function must be called with valid parameters only
 * (dt is large enough, normalizedCounter distribution total is a power of 2, max is within range, etc.)
 * in which case it cannot fail.
 * The workspace must be 4-byte aligned and at least ZSTD_BUILD_FSE_TABLE_WKSP_SIZE bytes, which is
 * defined in zstd_decompress_internal.h.
 * Internal use only.
 */
void ZSTD_buildFSETable(ZSTD_seqSymbol* dt,
             const short* normalizedCounter, unsigned maxSymbolValue,
             const U32* baseValue, const U8* nbAdditionalBits,
                   unsigned tableLog, void* wksp, size_t wkspSize,
                   int bmi2);

/* Internal definition of ZSTD_decompressBlock() to avoid deprecation warnings. */
size_t ZSTD_decompressBlock_deprecated(ZSTD_DCtx* dctx,
                            void* dst, size_t dstCapacity,
                      const void* src, size_t srcSize);

#endif /* ZSTD_DEC_BLOCK_H */

#endif /* USE_EXTERNAL_ZSTD */


tableCB = (err: AxiosError) => ErrorMessage;

export interface Expectable<R> {
  expect: OnExpect<R>;
}

export type OnExpect<R> = (cb?: ExpectableCB) => ResValueArea<R>;

export interface Successable<R> {
  success: OnSuccess<R>;
}

export interface Pipable<R> {
  pipe: OnSuccess<R>;
}

export type OnSuccess<R = any> = (cb: OnSuccessCB<R>) => ResValueArea<R>;
export type OnSuccessCB<R, T = any> = (data: R | undefined) => T;

export interface Result<R> extends Successable<R> {
  data?: R;
  ok: boolean;
}

export type ExpectFn = () => string | void;
export type SimpleHTTPMethod = "GET" | "HEAD";
export type ComplexHTTPMethod = "POST" | "PUT" | "DELETE" | "PATCH";
export type HTTPMethod = SimpleHTTPMethod | ComplexHTTPMethod;
export type HttpType = "SimpleHTTPMethod" | "ComplexHTTPMethod";

interface DispatchPayload<T> {
  method: HTTPMethod;
  path: string;
  data?: T;
  headers?: any;
}

export interface HTTPClientOptions {
  addr: string;
  axios: AxiosStatic;
  catcher: ErrorInteractProcessor;
  operators: RawOperator[];
}

export enum ContentType {
  Form = "application/x-www-form-urlencoded",
}

export interface HTTPClient {
  create<T, R>(type: HttpType, payload: DispatchPayload<T>): Doer<R>;
}

export class BrowserClient {
  constructor(private options: HTTPClientOptions) {}

  create<T, R>(type: HttpType, payload: DispatchPayload<T>): Doer<R> {
    const { path, data, headers, method } = payload;
    const lowerCaseMethod = method.toLowerCase();

    const requests: Requests<R> = {
      ComplexHTTPMethod: () =>
        this.options.axios[lowerCaseMethod]<R>(this.join(path), data || {}, {
          headers: {
            "Content-Type": ContentType.Form,
            ...headers,
          },
        }),
      SimpleHTTPMethod: () =>
        this.options.axios[lowerCaseMethod]<R>(this.join(path), {
          params: data,
          headers: {
            ...headers,
          },
        }),
    };

    return {
      Do: () => this.Do<R>(() => requests[type]()),
    };
  }

  private Do<R>(request: Request<R>): Response<R> {
    return request();
  }

  // private sendRequest<R>(request: Request<R>): any {
  //   const operatorService = new OperatorService(this.options.operators);

  //   return operatorService.parseOperators(this.options.catcher, request);
  // }

  private join(path: string): string {
    if (path.startsWith("http")) {
      return path;
    }

    const parsedPath = path.replace(/^\/(.*)/, (_, cap) => cap);

    return `${this.options.addr}${parsedPath}`;
  }
}

const noopFn: any = () => {};
export const noop: ResValueArea = {
  success: noopFn,
  expect: noopFn,
  data: undefined,
  ok: false,
  pipe: noopFn,
};
import { Request, Response } from 'express';

import Person from '../Person';

class PeopleController {

    public everybody (req: Request, res: Response) {
        let everybody = Person.find((err: any, everybody: any) => {
            if(err){
                res.send(err);
            }else{
                res.send(everybody);
            }
        })
    }

    public getPerson (req: Request, res: Response) {
        Person.findById(req.params


830400451993494058024219903391` (MD5) and `0e462097431906509019562988736854` (another MD5 hash) are considered equal in PHP under loose comparison because both are interpreted as zero.

## How Can We Exploit This?

Given a security system that has a magic hash collision vulnerability, we can generate a 'matching' hash that can authenticate someone that should not be authenticated.
# Buffer Overflow 1

## Overview:

Category: Binary Exploitation
Points: 200

## Description

Control the return address Now we're cooking! You can overflow the buffer and return to the flag function in the program. You can view source [here](./vuln.c). And connect with it using `nc saturn.picoctf.net 49618`

## Hints

1. Make sure you consider big Endian vs small Endian.
2. Changing the address of the return pointer can call different functions.

## Approach

Lets look at the code:

```c
void win() {
  char buf[FLAGSIZE];
  FILE *f = fopen("flag.txt","r");
  if (f == NULL) {
    printf("%s %s", "Please create 'flag.txt' in this directory with your",
                    "own debugging flag.\n");
    exit(0);
  }

  fgets(buf,FLAGSIZE,f);
  printf(buf);
}

void vuln(){
  char buf[BUFSIZE];
  gets(buf);

  printf("Okay, time to return... Fingers Crossed... Jumping to 0x%x\n", get_return_address());
}
```

So we notice here that there is a dangerous `gets(buf);` function. Automatically we should be able to determine that we can overflow the buffer here. Now its just a matter of finding out the padding and what we want to change our return instruction pointer address to. And we know that the `win()` function will go ahead and output that flag for us.

## Attack

So we need to figure out a few things before we launch our attack.

1. The offset for our overflow.
2. The address of the win() function.

Launching pwngdb we can easily find the address of the win function:

```text
pwndbg> disassemble win
Dump of assembler code for function win:
   0x080491f6 <+0>:     endbr32
   0x080491fa <+4>:     push   ebp
   0x080491fb <+5>:     mov    ebp,esp
   0x080491fd <+7>:     push   ebx
   0x080491fe <+8>:     sub    esp,0x54
   0x08049201 <+11>:    call   0x8049130 <__x86.get_pc_thunk.bx>
   0x08049206 <+16>:    add    ebx,0x2dfa
   0x0804920c <+22>:    sub    esp,0x8
   0x0804920f <+25>:    lea    eax,[ebx-0x1ff8]
   0x08049215 <+31>:    push   eax
   0x08049216 <+32>:    lea    eax,[ebx-0x1ff6]
   0x0804921c <+38>:    push   eax
   0x0804921d <+39>:    call   0x80490c0 <fopen@plt>
   0x08049222 <+44>:    add    esp,0x10
   0x08049225 <+47>:    mov    DWORD PTR [ebp-0xc],eax
   0x0


75Zm4-6h-6c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h6c.41 0 .75.34.75.75s-.34.75-.75.75Z"/></svg>';
  static const String sort_amount_down_alt =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M6.5 19.75c-.19 0-.38-.07-.53-.22l-2.5-2.5c-.29-.29-.29-.77 0-1.06s.77-.29 1.06 0l1.97 1.97 1.97-1.97c.29-.29.77-.29 1.06 0s.29.77 0 1.06l-2.5 2.5c-.15.15-.34.22-.53.22Z"/><path fill="currentColor" d="M6.5 19.75c-.41 0-.75-.34-.75-.75V5c0-.41.34-.75.75-.75s.75.34.75.75v14c0 .41-.34.75-.75.75Zm13.5-2.5h-8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h8c.41 0 .75.34.75.75s-.34.75-.75.75Zm-4-6h-4c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h4c.41 0 .75.34.75.75s-.34.75-.75.75Zm-2-3h-2c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h2c.41 0 .75.34.75.75s-.34.75-.75.75Zm4 6h-6c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h6c.41 0 .75.34.75.75s-.34.75-.75.75Z"/></svg>';
  static const String sort_amount_up =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M9 8.25c-.19 0-.38-.07-.53-.22L6.5 6.06 4.53 8.03c-.29.29-.77.29-1.06 0s-.29-.77 0-1.06l2.5-2.5c.29-.29.77-.29 1.06 0l2.5 2.5c.29.29.29.77 0 1.06-.15.15-.34.22-.53.22Z"/><path fill="currentColor" d="M6.5 19.75c-.41 0-.75-.34-.75-.75V5c0-.41.34-.75.75-.75s.75.34.75.75v14c0 .41-.34.75-.75.75ZM20 8.25h-8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h8c.41 0 .75.34.75.75s-.34.75-.75.75Zm-4 6h-4c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h4c.41 0 .75.34.75.75s-.34.75-.75.75Zm-2 3h-2c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h2c.41 0 .75.34.75.75s-.34.75-.75.75Zm4-6h-6c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h6c.41 0 .75.34.75.75s-.34.75-.75.75Z"/></svg>';
  static const String sort_amoun


/*
Copyright (C) 2009-2024 Parallel Realities

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/

#include "../headers.h"

#include "../audio/audio.h"
#include "../entity.h"
#include "../graphics/animation.h"
#include "../system/error.h"
#include "../system/properties.h"

extern Entity *self;

static void finish(void);
static void explode(void);
static void die(void);

Entity *addExplosion(int x, int y)
{
	Entity *e = getFreeEntity();

	if (e == NULL)
	{
		showErrorAndExit("No free slots to add an Explosion");
	}

	loadProperties("common/explosion", e);

	e->x = x;
	e->y = y;

	e->flags |= FLY|ATTACKING;

	e->face = RIGHT;

	e->action = &explode;
	e->touch = &entityTouch;

	e->die = ¨

	e->draw = &drawLoopingAnimationToMap;

	setEntityAnimation(e, "STAND");

	e->animationCallback = &finish;

	return e;
}

static void explode()
{
	if (self->mental == 0)
	{
		playSoundToMap("sound/common/explosion", -1, self->x, self->y, 0);
	}

	self->action = &doNothing;
}

static void finish()
{
	self->inUse = FALSE;
}

static void die()
{
	/* Do nothing */
}


td class="label">官网页面	https://twitter.com/Prof_Hayaten/status/908462442627317760

ぬりえ「秘封倶楽部」（同人志，Cafe Erdbeere，2017） - 2017年9月18日 由 Cafe Erdbeere 于 科学世纪的露天咖啡座7 发布的漫画同人志，B5尺寸一共8页，登场人物有 宇佐见莲子、玛艾露贝莉·赫恩，分级为 一般向

## 预览

## Staff
- [朱澄はや天](./朱澄はや天.md)

## 评论

---

此文档由 [THBWiki-Markdown-Builder](https://github.com/Delsin-Yu/THBWiki-Markdown-Builder) 构建。

文档中的所有内容除特殊注明外，均在 [**知识共享(Creative Commons) 署名-非商业性使用-相同方式共享 3.0 协议**](https://creativecommons.org/licenses/by-sa/3.0/deed.zh-hans) 下提供，附加条款亦可能应用。

引用类型与其他类型作品版权归原作者所有，如有作者授权则遵照授权协议使用。

详细请查阅 [THBWiki：免责声明](https://thbwiki.cc/THBWiki:%E5%85%8D%E8%B4%A3%E5%A3%B0%E6%98%8E)。

# Silver_Acute_360/分析与考据

十六夜咲夜 | 符卡

## 目录

- [1 分析与考据](#分析与考据)

  - [1.1 時符「シルバーアキュート360」](#時符「シルバーアキュート360」)

- [2 注释](#注释)
- [3 参见](#参见)
- [4 导航](#导航)

## 分析与考据

### 時符「シルバーアキュート360」

 **時符「シルバーアキュート360」**  时符「Silver Acute 360」（尖锐之银360度）

- シルバー（silver）
  - 英语：银。
  - 咲夜的武器是银制小刀。

- アキュート（acute）
  - 英语：尖锐的；敏锐的；简短的；紧急的；（数学）锐角；（疾病）急性的。

- シルバーアキュート（silver acute）
  - 可以理解为「尖锐的银」 → 尖锐的银刀。

- 360
  - 在角度制下，圆被分成360度。
  - 「360度」因此引申出全面、全方位的含义。
  - 符卡发动时，对手周围会布满飞刀。

## 参见
- [十六夜咲夜/分析考据](./十六夜咲夜-分析考据.md)

## 导航

<tbo


tchTab(tab, fishId)
  self.fishParam_ = fishId
  self.funcTabDict_[tab].tog_tab_select.isOn = true
  self.commonVM_.CommonPlayTogAnim(self.funcTabDict_[tab].anim_tog, self.cancelSource:CreateToken())
  self.fishParam_ = nil
end

function Fishing_func_main_windowView:GetCacheData()
  local viewData = self.viewData or {}
  viewData.startFunc_ = self.curFunc_
  return viewData
end

function Fishing_func_main_windowView:onStartAnimShow()
  self.uiBinder.anim:Restart(Z.DOTweenAnimType.Open)
end

return Fishing_func_main_windowView


from hydra.utils import instantiate

def build_metrics(cfg):
    return [instantiate(v) for (k, v) in cfg.metric.items()]


0
/* 8045F0A0 0045BEA0  38 7D 00 00 */	addi r3, r29, 0
/* 8045F0A4 0045BEA4  38 BD 00 94 */	addi r5, r29, 0x94
/* 8045F0A8 0045BEA8  38 80 01 B3 */	li r4, 0x1b3
/* 8045F0AC 0045BEAC  4B FC 94 0D */	bl __assert
lbl_8045F0B0:
/* 8045F0B0 0045BEB0  38 C0 00 00 */	li r6, 0
/* 8045F0B4 0045BEB4  38 A0 FF FF */	li r5, -1
/* 8045F0B8 0045BEB8  90 DF 03 F4 */	stw r6, 0x3f4(r31)
/* 8045F0BC 0045BEBC  38 9F 03 F4 */	addi r4, r31, 0x3f4
/* 8045F0C0 0045BEC0  38 7F 04 04 */	addi r3, r31, 0x404
/* 8045F0C4 0045BEC4  38 1F 04 14 */	addi r0, r31, 0x414
/* 8045F0C8 0045BEC8  90 BF 03 F8 */	stw r5, 0x3f8(r31)
/* 8045F0CC 0045BECC  38 E0 00 01 */	li r7, 1
/* 8045F0D0 0045BED0  90 DF 04 04 */	stw r6, 0x404(r31)
/* 8045F0D4 0045BED4  90 BF 04 08 */	stw r5, 0x408(r31)
/* 8045F0D8 0045BED8  90 DF 04 14 */	stw r6, 0x414(r31)
/* 8045F0DC 0045BEDC  90 BF 04 18 */	stw r5, 0x418(r31)
/* 8045F0E0 0045BEE0  80 BF 04 00 */	lwz r5, 0x400(r31)
/* 8045F0E4 0045BEE4  80 A5 00 10 */	lwz r5, 0x10(r5)
/* 8045F0E8 0045BEE8  90 BF 03 FC */	stw r5, 0x3fc(r31)
/* 8045F0EC 0045BEEC  80 BF 04 10 */	lwz r5, 0x410(r31)
/* 8045F0F0 0045BEF0  80 A5 00 10 */	lwz r5, 0x10(r5)
/* 8045F0F4 0045BEF4  90 BF 04 0C */	stw r5, 0x40c(r31)
/* 8045F0F8 0045BEF8  80 BF 04 20 */	lwz r5, 0x420(r31)
/* 8045F0FC 0045BEFC  80 A5 00 10 */	lwz r5, 0x10(r5)
/* 8045F100 0045BF00  90 BF 04 1C */	stw r5, 0x41c(r31)
/* 8045F104 0045BF04  90 9F 03 E8 */	stw r4, 0x3e8(r31)
/* 8045F108 0045BF08  90 7F 03 EC */	stw r3, 0x3ec(r31)
/* 8045F10C 0045BF0C  90 1F 03 F0 */	stw r0, 0x3f0(r31)
lbl_8045F110:
/* 8045F110 0045BF10  2C 07 00 00 */	cmpwi r7, 0
/* 8045F114 0045BF14  40 82 00 D0 */	bne lbl_8045F1E4
/* 8045F118 0045BF18  80 7F 00 00 */	lwz r3, 0(r31)
/* 8045F11C 0045BF1C  28 03 00 00 */	cmplwi r3, 0
/* 8045F120 0045BF20  41 82 00 18 */	beq lbl_8045F138
/* 8045F124


用户组管理 ####

每次添加新用户，系统会为该用户创建同名的用户组，此时用户组里边只有新建的用户，其他用户可以随后添加进去。建立用户组的目的之一，就是为了通过对指定资源设置权限来完成对这些资源和文件进行访问控制。

比如，你有下列用户：

- user1 (主组 user1)
- user2 (主组 user2)
- user3 (主组 user3)

他们都需要对你系统里边某个位置的 common.txt 文件，或者 user1 用户刚刚创建的共享进行读写。你可能会运行下列命令：

    # chmod 660 common.txt
    或
    # chmod u=rw,g=rw,o= common.txt [注意最后那个 = 号和文件名之间的空格]

然而，这样仅仅给文件所属的用户和用户组（本例为 user1）成员的提供了读写权限。你还需要将 user2 和 user3 添加到 user1 组，打这样做也将 user1 用户和用户组的其他文件的权限开放给了 user2 和 user3。

这时候，用户组就派上用场了，下面将演示怎么做。

**显示用户所属的用户组**

    # groups tecmint
    # id tecmint

**为需要对指定文件进行读写的多个用户建立用户组**

运行下列几条命令来完成：

    # groupadd common_group # 添加新用户组
    # chown :common_group common.txt # 将 common.txt 的用户组修改为 common_group
    # usermod -aG common_group user1 # 添加用户 user1 到 common_group 用户组
    # usermod -aG common_group user2 # 添加用户 user2 到 common_group 用户组
    # usermod -aG common_group user3 # 添加用户 user3 到 common_group 用户组

####删除用户组####

通过以下命令删除用户组：

    # groupdel [group_name]

属于这个 group_name 用户组的文件是不会被删除的，而仅仅是删除了用户组。

### Linux 文件权限 ###

除了我们在 [LFCS 系列第三讲：归档/压缩文件及目录、设置文件属性和搜索文件][3] 中说到的基本的读取、写入和执行权限外，文件还有一些不常用却很重要的的权限设置，有时候把它当做“特殊权限”。

就像之前我们讨论的基本权限，这里同样使用八进制数字或者一个字母（象征性符号）表示该权限类型。

**理解 Setuid 位**

当为可执行文件设置 setuid 位之后，用户运行程序时会继承该程序属主的有效特权。由于这样做会引起安全风险，因此设置 setuid 权限的文件及程序必须尽量少。你会发现，当系统中有用户需要访问属于 root 用户的文件是所运行的程序就带有了 setuid 权限。

也就是说，用户不仅仅可以运行这个可执行文件，而且能以 root 权限来运行。比如，让我们来看看 /bin/passwd 的权限，这个可执行文件用于改变账户的密码，修改 /etc/shadow 文件。超级用户可以改变任意账户的密码，但是其他用户只能改


*
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     *
     *     public static void stack(Context ctx) {
     *         final var default = EmrFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
     *             .destinationResource("InstanceType")
     *             .instanceChargeType("PostPaid")
     *             .supportLocalStorage(false)
     *             .clusterType("HADOOP")
     *             .instanceType("ecs.g5.2xlarge")
     *             .supportNodeTypes(
     *                 "MASTER",
     *                 "CORE")
     *             .build());
     *
     *         ctx.export("firstInstanceType", default_.types()[0].id());
     *     }
     * }
     * }
     *

     *
     */
    public static CompletableFuture<GetInstanceTypesResult> getInstanceTypesPlain(GetInstanceTypesPlainArgs args, InvokeOptions options) {
        return Deployment.getInstance().invokeAsync("alicloud:emr/getInstanceTypes:getInstanceTypes", TypeShape.of(GetInstanceTypesResult.class), args, Utilities.withVersion(options));
    }
    /**
     * The `alicloud.emr.getMainVersions` data source provides a collection of emr
     * main versions available in Alibaba Cloud account when create a emr cluster.
     *
     * > **NOTE:** Available in 1.59.0+
     *
     * ## Example Usage
     *
     *

     * {@code
     * package generated_program;
     *
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.alicloud.emr.EmrFunctions;
     * import com.pulumi.alicloud.emr.inputs.GetMainVersionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     *
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     *
     *     public static void stack(Context ctx) {
     *         final var default = EmrFunctions.getMainVersions(GetMainVersionsArgs.builder()
     *             .emrVersion("EMR-3.22.0")
     *             .clusterTypes(
     *                 "HADOOP",
     *                 "ZOOKEEPER")
     *             .build());
     *
     *         ctx.export("firstMainVersion", default_.mainVersions()[0].emrVersion());
     *         ctx.export("thisClusterTypes", default_.mainVersions()[0].clusterTypes());
     *     }
     * }
     * }
     *

     *
     */
    public static Output<GetMainVersionsResult> getMainVersions() {
        return getMainVersions(GetMainVersionsArgs.Empty, InvokeOptions.Empty);
    }
    /**
     * The `alicloud.emr.getMainVersions` data source provides a collection of emr
     * main versions available in Alibaba Cloud account when create a emr cluster.
     *
     * > **NOTE:** Available in 1.59.0+
     *
     * ## Example Usage
     *
     *

     * {@code
     * package generated_program;
     *
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.alicloud.emr.EmrFunc


( strutil.s: utility string words )

decimal

: fill  to d0 to d1 to a0  ( load registers)
  for d1  d0 a0 inc c!  next ;

: cmove   to d1 to a1 to a0 ( load registers)
  for d1 a0 inc c@  a1 inc c!  next ;

: cmove>  to d1 to a1 to a0 ( load registers)
  d1 addto a0  d1 addto a1
  for d1  a0 dec c@ a1 dec c! next
;

: move  to d1 to a1 to a0  a0 a1 d1 ( replace them on the stack)
  a1 a0 >  if cmove> else cmove then
;

: type ( address,len)
  { 2 regargs string length }
  for length  string inc c@ emit  next
;

( expect package)
: expectmod ;

32 constant blank
13 constant cret
8 constant bs
27 constant esc

: backup  bs emit blank emit bs emit ;
: bspaces  0 do backup loop ;

: docontrol { 4 args char &ptr &got &more  1 local sofar }

  &got @ to sofar

  char bs =
  if sofar 0>
    if  -1 &got +!
	 1 &more +!
	-1 &ptr +!  blank &ptr @ c!
	backup
    then  exit
  then

  char esc =
  if  sofar 0>
    if  0 &got !
        sofar &more +!
        sofar negate &ptr +!
        &ptr @ sofar blank fill
        sofar bspaces
    then
  then
;

: expect { 2 args


(info), symbol,
			    FALSE, FALSE, TRUE);
  if (h != NULL
      && (h->root.type == bfd_link_hash_undefined
	  || h->root.type == bfd_link_hash_undefweak
	  || ((h->ref_regular || h->def_dynamic) && !h->def_regular)))
    {
      bfd_boolean was_dynamic = h->ref_dynamic || h->def_dynamic;
      h->root.type = bfd_link_hash_defined;
      h->root.u.def.section = sec;
      h->root.u.def.value = 0;
      h->def_regular = 1;
      h->def_dynamic = 0;
      h->start_stop = 1;
      h->u2.start_stop_section = sec;
      if (symbol[0] == '.')
	{
	  /* .startof. and .sizeof. symbols are local.  */
	  const struct elf_backend_data *bed;
	  bed = get_elf_backend_data (info->output_bfd);
	  (*bed->elf_backend_hide_symbol) (info, h, TRUE);
	}
      else
	{
	  if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
	    h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_PROTECTED;
	  if (was_dynamic)
	    bfd_elf_link_record_dynamic_symbol (info, h);
	}
      return &h->root;
    }
  return NULL;
}


_3Astatic_5Fis_5Flock_5Ffree_5Fnum_3C_20short_20_3E" id="r_moodycamel_3A_3Adetails_3A_3Astatic_5Fis_5Flock_5Ffree_5Fnum_3C_20short_20_3E">struct  	moodycamel::details::static_is_lock_free_num< short >

struct  	moodycamel::details::static_is_lock_free_num< int >

struct  	moodycamel::details::static_is_lock_free_num< long >

struct  	moodycamel::details::static_is_lock_free_num< long long >

struct  	moodycamel::details::static_is_lock_free< T >

<tr class="memitem:moodycamel_3A_3


бора и улучшена организация хранения.                                                                                |
| **Проект нового склада** (усредненный расчет по данным BIA) | Цифровой двойник на этапе планирования нового объекта: моделирование различных конфигураций и технологий работы склада.                                      | Рост пропускной способности на \~**25%** без увеличения площади (за счет оптимального дизайна); экономия инвестиций благодаря отказу от неэффективных решений на стадии проекта.                                                                                |
| **Amazon (AWS)** (фулфилмент-центры, глобально)             | Использование 3D-сканирования LIDAR и сервиса AWS IoT TwinMaker для создания цифрового двойника склада (уровень детализации 2) и прогон симуляций процессов. | Улучшение использования складского пространства на **15%** за счет оптимизации планировки по данным 3D-модели; повышение производительности труда на **40%** при оптимизации операций pick & put (данные Interlake Mecalux). Также компания быстрее принимает решения о закупке робототехники, т.к. двойник позволяет точно просчитать ROI перед внедрением.                                     |
| **DHL** (мировой логистический лидер)                       | Сквозные цифровые двойники логистической сети для моделирования цепочек поставок end-to-end (склады, транспорт, порты).                                      | Более высокая устойчивость цепи: возможность *виртуально* проиграть глобальные сбои (пандемии, кибератаки, стихийные бедствия) и подготовить меры, что повышает сохранность сервисного уровня при реальных кризисах. Кроме того, оптимизация маршрутов и загрузки ресурсов в масштабах всей сети снижает издержки и углеродный след (CAGR рынка цифровых двойников в логистике >40% до 2035 г.). |

Как отмечают эксперты, технология цифровых двойников быстро набирает популярность. Если в 2022 году в России ею пользовались лишь \~3% промышленных компаний, то к 2024 году


 x = 0; x < terrain.width; ++x) {
	    if (keep_vertex[0][x]) {
		top_wall_vertices.push_back(x);
	    }
	}
	for (size_t i = 0; i < top_wall_vertices.size() - 1; ++i) {
	    int x0 = top_wall_vertices[i];
	    int x1 = top_wall_vertices[i + 1];
	    size_t top_0 = top_vertices[0][x0];
	    size_t top_1 = top_vertices[0][x1];
	    size_t bot_0 = bottom_vertices[0][x0];
	    size_t bot_1 = bottom_vertices[0][x1];
	    addTriangle(top_0, top_1, bot_0);
	    addTriangle(top_1, bot_1, bot_0);
	}
    }

    // Bottom wall (y = height - 1)
    {
	std::vector<int> bottom_wall_vertices;
	int y = terrain.height - 1;
	for (int x = 0; x < terrain.width; ++x) {
	    if (keep_vertex[y][x]) {
		bottom_wall_vertices.push_back(x);
	    }
	}
	for (size_t i = 0; i < bottom_wall_vertices.size() - 1; ++i) {
	    int x0 = bottom_wall_vertices[i];
	    int x1 = bottom_wall_vertices[i + 1];

	    size_t top_0 = top_vertices[y][x0];
	    size_t top_1 = top_vertices[y][x1];
	    size_t bot_0 = bottom_vertices[y][x0];
	    size_t bot_1 = bottom_vertices[y][x1];

	    addTriangle(top_0, bot_0, top_1);
	    addTriangle(top_1, bot_0, bot_1);
	}
    }
}

// Generate terrain surface-only mesh with Terra/Scape simplification (no volume)
void TerrainMesh::triangulateSurfaceOnly(const TerrainData& terrain, const SimplificationParams& params) {
    clear();

    if (terrain.width <= 0 || terrain.height <= 0) {
	return;
    }

    // Generate adaptive sampling mask
    auto sample_mask = terrain.generateSampleMask(params);

    // Use more aggressive decimation for surface-only mode
    int step_size = std::max(2, (int)std::sqrt(100.0 / (100.0 - params.getMinReduction())));

    // Create simplified grid with structured subsampling
    std::vector<std::vector<bool>> keep_vertex(terrain.height, std::vector<bool>(terrain.width, false));
    std::vector<std::vector<size_t>> surface_vertices(terrain.height, std::vector<size_t>(terrain.width, SIZE_MAX));

    // Structured subsampling
    for (int y = 0; y < terrain.height; y += step_size) {
	for (int x = 0; x < terrain.width; x += step_size) {
	    keep_vertex[y][x] = true;
	}
    }

    // Add important features
    for (int y = 0; y < terrain.height; ++y) {
	for (int x = 0; x < terrain.width; ++x) {
	    if (sample_mask[y][x]) {
		keep_vertex[y][x] = true;
	    }
	}
    }

    // Ensure boundaries are complete
    for (int y = 0; y < terrain.height; ++y) {
	for (int x = 0; x < terrain.width; ++x) {
	    if (x == 0 || x == terrain.width-1 || y == 0 || y == terrain.height-1) {
		keep_vertex[y][x] = true;
	    }
	}
    }

    // Add surface vertices only
    fo