BaseConfigParsingTest.toml}
    ${ApiConfigParsingTest.toml}
    """.trimIndent()
    val config = CoordinatorConfigFileToml(
      defaults = DefaultsParsingTest.config,
      protocol = ProtocolParsingTest.config,
      conflation = ConflationParsingTest.config,
      prover = ProverParsingTest.config,
      traces = TracesParsingTest.config,
      stateManager = StateManagerParsingTest.config,
      type2StateProofProvider = Type2StateProofProviderParsingTest.config,
      l1FinalizationMonitor = L1FinalizationMonitorParsingTest.config,
      l1Submission = L1SubmissionConfigParsingTest.config,
      messageAnchoring = MessageAnchoringConfigParsingTest.config,
      l2NetworkGasPricing = L2NetWorkingGasPricingConfigParsingTest.config,
      database = DataBaseConfigParsingTest.config,
      api = ApiConfigParsingTest.config,
    )
    assertThat(parseConfig<CoordinatorConfigFileToml>(toml)).isEqualTo(config)
  }

  @Test
  fun `should parse minimal configs`() {
    val toml = """
    ${DefaultsParsingTest.tomlMinimal}
    ${ProtocolParsingTest.tomlMinimal}
    ${ConflationParsingTest.tomlMinimal}
    ${ProverParsingTest.tomlMinimal}
    ${TracesParsingTest.tomlMinimal}
    ${StateManagerParsingTest.tomlMinimal}
    ${Type2StateProofProviderParsingTest.tomlMinimal}
    ${L1FinalizationMonitorParsingTest.tomlMinimal}
    ${L1SubmissionConfigParsingTest.tomlMinimal}
    ${MessageAnchoringConfigParsingTest.tomlMinimal}
    ${L2NetWorkingGasPricingConfigParsingTest.tomlMinimal}
    ${DataBaseConfigParsingTest.tomlMinimal}
    ${ApiConfigParsingTest.tomlMinimal}
    """.trimIndent()
    val config = CoordinatorConfigFileToml(
      defaults = DefaultsParsingTest.configMinimal,
      protocol = ProtocolParsingTest.configMinimal,
      conflation = ConflationParsingTest.configMinimal,
      prover = ProverParsingTest.configMinimal,
      traces = TracesParsingTest.configMinimal,
      stateManager = StateManagerParsingTest.configMinimal,
      type2StateProofProvider = Type2StateProofProviderParsingTest.configMinimal,
      l1FinalizationMonitor = L1FinalizationMonitorParsingTest.configMinimal,
      l1Submission = L1SubmissionConfigParsingTest.configMinimal,
      messageAnchoring = MessageAnchoringConfigParsingTest.configMinimal,
      l2NetworkGasPricing = L2NetWorkingGasPricingConfigParsingTest.configMinimal,
      database = DataBaseConfigParsingTest.configMinimal,
      api = ApiConfigParsingTest.configMinimal,
    )

    assertThat(parseConfig<CoordinatorConfigFileToml>(toml)).isEqualTo(config)
  }
}
package linea.coordinator.config.v2

import linea.coordinator.config.v2.toml.RequestRetriesToml
import linea.coordinator.config.v2.toml.StateManagerToml
import linea.coordinator.config.v2.toml.parseConfig
import linea.kotlin.toURL
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import kotlin.time.Duration.Companion.seconds

class StateManagerParsingTest {
  companion object {
    val toml = """
      [state-manager]
      version = "2.2.0"
      endpoints = ["http://shomei:8888/"]
      request-limit-per-endpoint = 3
      request-timeout = "PT30S"
      [state-manager.request-retries]
      max-retries = 5
      backoff-delay = "PT


s = MessageLookup();

typedef String? MessageIfAbsent(
    String? messageStr, List<Object>? args);

class MessageLookup extends MessageLookupByLibrary {
  @override
  String get localeName => 'gl';

  static m0(days) => "${Intl.plural(days, one: 'Fai un día', other: 'Fai ${days} días')}";

  static m1(hours) => "${Intl.plural(hours, one: 'Fai ${hours} hora', other: 'Fai ${hours} horas')}";

  static m2(minutes) => "Quedan ${minutes} min";

  static m3(minutes) => "${Intl.plural(minutes, one: 'Fai 1 minuto', other: 'Fai ${minutes} minutos')}";

  static m4(seconds) => "Quedan ${seconds} seg";

  static m5(weeks) => "${Intl.plural(weeks, one: 'Fai unha semana', other: 'Fai ${weeks} semanas')}";

  static m6(days) => "${Intl.plural(days, one: 'Fai 1 día', other: 'Fai ${days} días')}";

  static m7(hours) => "${Intl.plural(hours, one: 'fai 1h', other: 'fai${hours}h')}";

  static m8(minutes) => "Quedan ${minutes} min";

  static m9(minutes) => "${Intl.plural(minutes, one: 'Fai 1m', other: 'Fai ${minutes}m')}";

  static m10(seconds) => "Quedan ${seconds} seg";

  static m11(weeks) => "${Intl.plural(weeks, one: 'fai 1 sem', other: 'fai ${weeks} sem')}";

  static m12(minutes) => "${minutes} minutos";

  static m13(minutes) => "${minutes} min";

  static m14(seconds) => "${seconds} seg";

  static m15(minutes) => "${minutes} minutos";

  static m16(seconds) => "${seconds} segundos";

  @override
  final Map<String, dynamic> messages = _notInlinedMessages(_notInlinedMessages);

  static Map<String, dynamic> _notInlinedMessages(_) => {
      'about_label': MessageLookupByLibrary.simpleMessage('Sobre'),
    'add_rss_feed_option': MessageLookupByLibrary.simpleMessage('Engadir canle RSS'),
    'app_title': MessageLookupByLibrary.simpleMessage('Anytime Podcast Player'),
    'app_title_short': MessageLookupByLibrary.simpleMessage('Anytime Player'),
    'audio_effect_trim_silence_label': MessageLookupByLibrary.simpleMessage('Cortar silencios'),
    'audio_effect_volume_boost_label': MessageLookupByLibrary.simpleMessage('Potenciar volume'),
    'audio_settings_playback_speed_label': MessageLookupByLibrary.simpleMessage('Velocidade de reprodución'),
    'auto_scroll_transcript_label': MessageLookupByLibrary.simpleMessage('Transcrición sincronizada'),
    'cancel_button_label': MessageLookupByLibrary.simpleMessage('Desbotar'),
    'cancel_download_button_label': MessageLookupByLibrary.simpleMessage('Cancelar a descarga'),
    'cancel_option_label': MessageLookupByLibrary.simpleMessage('Desbotar'),
    'chapters_label': MessageLookupByLibrary.simpleMessage('Capítulos'),
    'clear_queue_button_label': MessageLookupByLibrary.simpleMessage('LIMPAR LISTA'),
    'clear_search_button_label': MessageLookupByLibrary.simpleMessage('Limpar texto a buscar'),
    'close_button_label': MessageLookupByLibrary.simpleMessage('Fechar'),
    'consent_message': MessageLookupByLibrary.simpleMessage('Esta ligazón de financiamento vaite levar a unha web externa onde podes apoiar ao podcast. As ligazóns proceden do propio podcast e non están baixo control de Anytime.'),
    'continue_button_label': MessageLookupByLibrary.simpleMessage('Continuar'),
    'delete_button_label': MessageLookupByLibrary.simpleMessage('Eliminar'),
    'delete_episode_button_label': MessageLookupByLibrary.simpleMessage('Eliminar episodio descargado'),
    'delete_episode_confirmation': MessageLookupByLibrary.simpleMessage('Tes certeza


class, next_week, school_code)

@router.get('/classlist', responses = {
    200: {"model": ClasslistResponse, "description": "반 리스트 조회 성공"}, 400: {"model": ErrorResponse, "description": "반 리스트 조회 실패"}
})
def classlist(
    school_name: Annotated[str, Query(description="학교 이름\n\n중복되는 학교가 없을 경우 일부만 입력해도 자동으로 선택됩니다.")],
    school_code: Annotated[Optional[int], Query(description="학교 코드")] = None
) -> ClasslistResponse | ErrorResponse:
    return get_classlist(school_name, school_code)

@router.get('/search', responses = {
    200: {"model": SchoolSearchResponse, "description": "학교 검색 성공"}, 400: {"model": ErrorResponse, "description": "학교 검색 실패"}
})
def search(school_name: Annotated[str, Query(description="학교 이름\n\n중복되는 학교가 없을 경우 일부만 입력해도 자동으로 선택됩니다.")]
) -> SchoolSearchResponse | ErrorResponse:
    return search_school(school_name)

@router.get("/homeroom", responses = {
    200: {"model": HomeroomResponse, "description": "담임 선생님 조회 성공"}, 400: {"model": ErrorResponse, "description": "담임 선생님 조회 실패"}
})
def homeroom(
    school_name: Annotated[str, Query(description="학교 이름\n\n중복되는 학교가 없을 경우 일부만 입력해도 자동으로 선택됩니다.")],
    school_grade: Annotated[int, Query(description="학년")],
    school_class: Annotated[int, Query(description="반")],
    school_code: Annotated[Optional[int], Query(description="학교 코드")] = None
) -> HomeroomResponse | ErrorResponse:
    return get_homeroom_teacher(school_name, school_grade, school_class, school_code)


ly::join('/', pathSoFar);
  XLOG(INFO) << "children_.size()=" << children_.size();
  XLOG(INFO) << "partiallyResolvedSubs_.size()="
             << partiallyResolvedSubs_.size();
  if (!children_.empty()) {
    std::vector<std::string> children;
    for (const auto& [child, _] : children_) {
      children.emplace_back(child);
    }
    XLOG(INFO) << "Children: " << folly::join(',', children);
  }
  if (!partiallyResolvedSubs_.empty()) {
    XLOG(INFO) << "Partially Resolved: ";
    for (const auto& partial : partiallyResolvedSubs_) {
      partial.debugPrint();
    }
  }
  for (const auto& [child, childStore] : children_) {
    pathSoFar.emplace_back(child);
    childStore->debugPrint(pathSoFar);
    pathSoFar.pop_back();
  }
}

void PartiallyResolvedExtendedSubscription::debugPrint() const {
  XLOG(INFO) << "\tsubscription=" << subscription.lock().get()
             << ", subKey=" << subKey << ", elemIdx=" << elemIdx
             << ", previouslyResolved=" << folly::join(',', previouslyResolved);
}

} // namespace facebook::fboss::fsdb
// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.

#include "fboss/fsdb/client/FsdbDeltaPublisher.h"
#include "fboss/lib/CommonUtils.h"

#include <folly/coro/AsyncGenerator.h>
#include <folly/coro/AsyncPipe.h>
#include <folly/io/async/ScopedEventBaseThread.h>
#include <folly/logging/xlog.h>
#include <gtest/gtest.h>
#include <algorithm>
#include <atomic>

namespace facebook::fboss::fsdb::test {

namespace {
class TestFsdbStreamPublisher : public FsdbPublisher<OperDelta> {
 public:
  TestFsdbStreamPublisher(
      folly::EventBase* streamEvb,
      folly::EventBase* timerEvb)
      : FsdbPublisher(
            "test_fsdb_client",
            {"agent"},
            streamEvb,
            timerEvb,
            false) {}

  ~TestFsdbStreamPublisher() override {
    cancel();
  }
#if FOLLY_HAS_COROUTINES
  folly::coro::Task<StreamT> setupStream() override {
    co_return StreamT();
  }

  folly::coro::Task<void> serveStream(StreamT&& /* stream */) override {
    auto gen = createGenerator();
    generatorStart_.wait();
    while (auto pubUnit = co_await gen.next()) {
      if (isCancelled()) {
        XLOG(DBG2) << " Detected cancellation";
        break;
      }
    }
    co_return;
  }
#endif
  void markConnecting() {
    setState(State::CONNECTING);
  }
  void startGenerator() {
    generatorStart_.post();
  }

 private:
  folly::Baton<> generatorStart_;
};

} // namespace
class StreamPublisherTest : public ::testing::Test {
 public:
  void SetUp() override {
    streamEvbThread_ = std::make_unique<folly::ScopedEventBaseThread>();
    connRetryEvbThread_ = std::make_unique<folly::ScopedEventBaseThread>();
    streamPublisher_ = std::make_unique<TestFsdbStreamPublisher>(
        streamEvbThread_->getEventBase(), connRetryEvbThread_->getEventBase());
  }
  void TearDown() override {
    streamPublisher_.reset();
    streamEvbThread_.reset();
    connRetryEvbThread_.reset();
  }

 protected:
  std::unique_ptr<folly::ScopedEventBaseThread> streamEvbThread_;
  std::unique_ptr<folly::ScopedEventBaseThread> connRetryEvbThread_;


.552 2 15.002V9.00204C2 8.45304 2.45 8.00204 3 8.00204H6L10.293 3.29604Z"]{d:path(var(--voice-channel-private))}[d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"]{d:path(var(--events));transform-origin:center;transform:scale(.95)}[d="M19.1 4V5.12659L4.85 8.26447V18.1176C4.85 18.5496 5.1464 18.9252 5.5701 19.0315L9.3701 19.9727C9.4461 19.9906 9.524 20 9.6 20C9.89545 20 10.1776 19.8635 10.36 19.6235L12.7065 16.5242L19.1 17.9304V19.0588H21V4H19.1ZM9.2181 17.9944L6.75 17.3826V15.2113L10.6706 16.0753L9.2181 17.9944Z"]{d:path(var(--announcement-channel));transform:scale(.9) translate(0,2px)}#app-mount .layer-86YKbF~.layer-86YKbF .settingsToolbar-wu4yfQ,[d="M3.9 8.26H2V15.2941H3.9V8.26Z"]{display:none!important}[d="M4.85 8.26429L15.84 5.84426V10.5599C15.84 11.6202 16.6996 12.4799 17.76 12.4799H21V19.0586H19.1V17.9302L12.7065 16.524L10.36 19.6233C10.1776 19.8633 9.89545 19.9998 9.6 19.9998C9.524 19.9998 9.4461 19.9904 9.3701 19.9725L5.5701 19.0313C5.1464 18.925 4.85 18.5495 4.85 18.1175V8.26429ZM9.2181 17.9942L6.75 17.3824V15.2111L10.6706 16.0751L9.2181 17.9942Z"]{d:path(var(--announcement-channel-private));transform-origin:center;transform:scale(.9) translate(0,2px)}#app-mount .badge-7R_W3s[user-id],#app-mount .modeUnread-3Cxepe>.unread-36eUEm,#app-mount .wrapper-1VLyxH[style="width: 16px; height: 16px;"] rect,#app-mount [class*=jumpToPresentBar]>button:first-child,.scroller-3X7KbA>[aria-label]~div>.guildSeparator-a4uisj,[d="M11.7237 16.0927L10.9632 16.8531L10.2533 17.5688C10.4978 17.633 10.747 17.6839 11 17.72V22H13V17.72C16.28 17.23 19 14.41 19 11H17.3C17.3 14 14.76 16.1 12 16.1C11.9076 16.1 11.8155 16.0975 11.7237 16.0927Z"],[d="M13.44 12.9599C12.9098 12.9599 12.48 13.3897 12.48 13.9199V20.2212C12.


TYPE_24_TABLE_DATA = 0x20;
  private static final int DATA_TYPE_28_TABLE_DATA = 0x21;
  private static final int DATA_TYPE_48_TABLE_DATA = 0x22;
  private static final int DATA_TYPE_END_LINE = 0xF0;

  // Clut mapping tables, as defined by ETSI EN 300 743 10.4, 10.5, 10.6
  private static final byte[] defaultMap2To4 = {(byte) 0x00, (byte) 0x07, (byte) 0x08, (byte) 0x0F};
  private static final byte[] defaultMap2To8 = {(byte) 0x00, (byte) 0x77, (byte) 0x88, (byte) 0xFF};
  private static final byte[] defaultMap4To8 = {
    (byte) 0x00, (byte) 0x11, (byte) 0x22, (byte) 0x33,
    (byte) 0x44, (byte) 0x55, (byte) 0x66, (byte) 0x77,
    (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB,
    (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF
  };

  private final Paint defaultPaint;
  private final Paint fillRegionPaint;
  private final Canvas canvas;
  private final DisplayDefinition defaultDisplayDefinition;
  private final ClutDefinition defaultClutDefinition;
  private final SubtitleService subtitleService;

  private @MonotonicNonNull Bitmap bitmap;

  /**
   * Construct an instance for the given subtitle and ancillary page ids.
   *
   * @param subtitlePageId The id of the subtitle page carrying the subtitle to be parsed.
   * @param ancillaryPageId The id of the ancillary page containing additional data.
   */
  public DvbParser(int subtitlePageId, int ancillaryPageId) {
    defaultPaint = new Paint();
    defaultPaint.setStyle(Paint.Style.FILL_AND_STROKE);
    defaultPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
    defaultPaint.setPathEffect(null);
    fillRegionPaint = new Paint();
    fillRegionPaint.setStyle(Paint.Style.FILL);
    fillRegionPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OVER));
    fillRegionPaint.setPathEffect(null);
    canvas = new Canvas();
    defaultDisplayDefinition = new DisplayDefinition(719, 575, 0, 719, 0, 575);
    defaultClutDefinition =
        new ClutDefinition(
            0,
            generateDefault2BitClutEntries(),
            generateDefault4BitClutEntries(),
            generateDefault8BitClutEntries());
    subtitleService = new SubtitleService(subtitlePageId, ancillaryPageId);
  }

  /** Resets the parser. */
  public void reset() {
    subtitleService.reset();
  }

  /**
   * Decodes a subtitling packet, returning a list of parsed {@link Cue}s.
   *
   * @param data The subtitling packet data to decode.
   * @param limit The limit in {@code data} at which to stop decoding.
   * @return The parsed {@link Cue}s.
   */
  public List<Cue> decode(byte[] data, int limit) {
    // Parse the input data.
    ParsableBitArray dataBitArray = new ParsableBitArray(data, limit);
    while (dataBitArray.bitsLeft() >= 48 // sync_byte (8) + segment header (40)
        && dataBitArray.readBits(8) == 0x0F) {
      parseSubtitlingSegment(dataBitArray, subtitleService);
    }

    @Nullable PageComposition pageComposition = subtitleService.pageComposition;
    if (pageComposition == null) {
      return Collections.emptyList();
    }

    // Update the canvas bitmap if necessary.
    DisplayDefinition displayDefinition =
        subtitleService.displayDefinition != null
            ? subtitleService.displayDefinition
            : defaultDisplayDefinition;
    if (bitmap == null
        || displayDefinition.width + 1 != bitmap.getWidth()
        || displayDefinition.height + 1 != bitmap.getHeight()) {
      bitmap =
          Bitmap.createBitmap(
              displayDefinition.width + 1, displayDefinition.height + 1, Bitmap.Config.ARGB_8888);
      canvas.setBitmap(bitmap);
    }

    // Build the cues.
    List<C


, 10000, b)
}

func TestStateEntryMap(t *testing.T) {
	entryMap := stateEntryMap([]types.StateEntry{
		{StateKeyTuple: types.StateKeyTuple{EventTypeNID: 1, EventStateKeyNID: 1}, EventNID: 1},
		{StateKeyTuple: types.StateKeyTuple{EventTypeNID: 1, EventStateKeyNID: 3}, EventNID: 2},
		{StateKeyTuple: types.StateKeyTuple{EventTypeNID: 2, EventStateKeyNID: 1}, EventNID: 3},
	})

	testCases := []struct {
		inputTypeNID  types.EventTypeNID
		inputStateKey types.EventStateKeyNID
		wantOK        bool
		wantEventNID  types.EventNID
	}{
		// Check that tuples that in the array are in the map.
		{1, 1, true, 1},
		{1, 3, true, 2},
		{2, 1, true, 3},
		// Check that tuples that aren't in the array aren't in the map.
		{0, 0, false, 0},
		{1, 2, false, 0},
		{3, 1, false, 0},
	}

	for _, testCase := range testCases {
		keyTuple := types.StateKeyTuple{EventTypeNID: testCase.inputTypeNID, EventStateKeyNID: testCase.inputStateKey}
		gotEventNID, gotOK := entryMap.lookup(keyTuple)
		if testCase.wantOK != gotOK {
			t.Fatalf("stateEntryMap lookup(%v): want ok to be %v, got %v", keyTuple, testCase.wantOK, gotOK)
		}
		if testCase.wantEventNID != gotEventNID {
			t.Fatalf("stateEntryMap lookup(%v): want eventNID to be %v, got %v", keyTuple, testCase.wantEventNID, gotEventNID)
		}
	}
}

func TestEventMap(t *testing.T) {
	events := EventMap([]types.Event{
		{EventNID: 1},
		{EventNID: 2},
		{EventNID: 3},
		{EventNID: 5},
		{EventNID: 8},
	})

	testCases := []struct {
		inputEventNID types.EventNID
		wantOK        bool
		wantEvent     *types.Event
	}{
		// Check that the IDs that are in the array are in the map.
		{1, true, &events[0]},
		{2, true, &events[1]},
		{3, true, &events[2]},
		{5, true, &events[3]},
		{8, true, &events[4]},
		// Check that tuples that aren't in the array aren't in the map.
		{0, false, nil},
		{4, false, nil},
		{6, false, nil},
		{7, false, nil},
		{9, false, nil},
	}

	for _, testCase := range testCases {
		gotEvent, gotOK := events.Lookup(testCase.inputEventNID)
		if testCase.wantOK != gotOK {
			t.Fatalf("eventMap lookup(%v): want ok to be %v, got %v", testCase.inputEventNID, testCase.wantOK, gotOK)
		}

		if testCase.wantEvent != gotEvent {
			t.Fatalf("eventMap lookup(%v): want event to be %v, got %v", testCase.inputEventNID, testCase.wantEvent, gotEvent)
		}
	}

}
// Copyright 2022 The Matrix.org Foundation C.I.C.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions a


31 82 */	crclr 6
/* 80471390 0046E2D0  4B BB 92 B1 */	bl panic_f__12JUTExceptionFPCciPCce
.L_80471394:
/* 80471394 0046E2D4  80 1D 00 04 */	lwz r0, 4(r29)
/* 80471398 0046E2D8  28 00 00 00 */	cmplwi r0, 0
/* 8047139C 0046E2DC  40 82 00 18 */	bne .L_804713B4
/* 804713A0 0046E2E0  38 7E 01 EC */	addi r3, r30, 0x1ec
/* 804713A4 0046E2E4  38 BE 01 B8 */	addi r5, r30, 0x1b8
/* 804713A8 0046E2E8  38 80 00 CF */	li r4, 0xcf
/* 804713AC 0046E2EC  4C C6 31 82 */	crclr 6
/* 804713B0 0046E2F0  4B BB 92 91 */	bl panic_f__12JUTExceptionFPCciPCce
.L_804713B4:
/* 804713B4 0046E2F4  80 7D 00 04 */	lwz r3, 4(r29)
/* 804713B8 0046E2F8  83 A3 00 04 */	lwz r29, 4(r3)
/* 804713BC 0046E2FC  28 1D 00 00 */	cmplwi r29, 0
/* 804713C0 0046E300  40 82 00 18 */	bne .L_804713D8
/* 804713C4 0046E304  38 7E 01 EC */	addi r3, r30, 0x1ec
/* 804713C8 0046E308  38 BE 02 20 */	addi r5, r30, 0x220
/* 804713CC 0046E30C  38 80 00 D1 */	li r4, 0xd1
/* 804713D0 0046E310  4C C6 31 82 */	crclr 6
/* 804713D4 0046E314  4B BB 92 6D */	bl panic_f__12JUTExceptionFPCciPCce
.L_804713D8:
/* 804713D8 0046E318  7F A3 EB 78 */	mr r3, r29
/* 804713DC 0046E31C  81 9D 00 00 */	lwz r12, 0(r29)
/* 804713E0 0046E320  81 8C 00 30 */	lwz r12, 0x30(r12)
/* 804713E4 0046E324  7D 89 03 A6 */	mtctr r12
/* 804713E8 0046E328  4E 80 04 21 */	bctrl
/* 804713EC 0046E32C  7F E3 FB 78 */	mr r3, r31
/* 804713F0 0046E330  38 80 00 00 */	li r4, 0
/* 804713F4 0046E334  81 9F 00 10 */	lwz r12, 0x10(r31)
/* 804713F8 0046E338  38 A0 00 02 */	li r5, 2
/* 804713FC 0046E33C  81 8C 00 34 */	lwz r12, 0x34(r12)
/* 80471400 0046E340  7D 89 03 A6 */	mtctr r12
/* 80471404 0046E344  4E 80 04 21 */	bctrl
.L_80471408:
/* 80471408 0046E348  C0 22 2A 34 */	lfs f1, lbl_80520D94@sda21(r2)
/* 8047140C 0046E34C  FC 1E 08 40 */	fcmpo cr0, f30, f1
/* 80471410 0046E350  40 80 00 08 */	bge .L_80471418
/* 80471414 0046E354  48 00


{
}

DirectUI::SwapChainBackgroundPanelGenerated::~SwapChainBackgroundPanelGenerated()
{
}

HRESULT DirectUI::SwapChainBackgroundPanelGenerated::QueryInterfaceImpl(_In_ REFIID iid, _Outptr_ void** ppObject)
{
    if (InlineIsEqualGUID(iid, __uuidof(DirectUI::SwapChainBackgroundPanel)))
    {
        *ppObject = static_cast<DirectUI::SwapChainBackgroundPanel*>(this);
    }
    else if (InlineIsEqualGUID(iid, __uuidof(ABI::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanel)))
    {
        *ppObject = static_cast<ABI::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanel*>(this);
    }
    else
    {
        RRETURN(DirectUI::Grid::QueryInterfaceImpl(iid, ppObject));
    }

    AddRefOuter();
    RRETURN(S_OK);
}

// Properties.

// Events.

// Methods.

HRESULT DirectUI::SwapChainBackgroundPanelFactory::QueryInterfaceImpl(_In_ REFIID iid, _Outptr_ void** ppObject)
{
    if (InlineIsEqualGUID(iid, __uuidof(ABI::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanelFactory)))
    {
        *ppObject = static_cast<ABI::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanelFactory*>(this);
    }
    else
    {
        RRETURN(ctl::BetterAggregableCoreObjectActivationFactory::QueryInterfaceImpl(iid, ppObject));
    }

    AddRefOuter();
    RRETURN(S_OK);
}

// Factory methods.
IFACEMETHODIMP DirectUI::SwapChainBackgroundPanelFactory::CreateInstance(_In_opt_ IInspectable* pOuter, _Outptr_ IInspectable** ppInner, _Outptr_ ABI::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanel** ppInstance)
{

#if DBG
    // We play some games with reinterpret_cast and assuming that the GUID type table is accurate - which is somewhat sketchy, but
    // really good for binary size.  This code is a sanity check that the games we play are ok.
    const GUID uuidofGUID = __uuidof(ABI::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanel);
    const GUID metadataAPIGUID = MetadataAPI::GetClassInfoByIndex(GetTypeIndex())->GetGuid();
    const KnownTypeIndex typeIndex = GetTypeIndex();

    if(uuidofGUID != metadataAPIGUID)
    {
        XAML_FAIL_FAST();
    }
#endif

    // Can't just IFC(_RETURN) this because for some validate calls (those with multiple template parameters), the
    // preprocessor gets confused at the "," in the template type-list before the function's opening parenthesis.
    // So we'll use IFC_RETURN syntax with a local hr variable, kind of weirdly.
    const HRESULT hr = ctl::ValidateFactoryCreateInstanceWithBetterAggregableCoreObjectActivationFactory(pOuter, ppInner, reinterpret_cast<IUnknown**>(ppInstance), GetTypeIndex(), false /*isFreeThreaded*/);
    IFC_RETURN(hr);
    return S_OK;
}

// Dependency properties.

// Attached properties.

// Static properties.

// Static methods.

namespace DirectUI
{
    _Check_return_ IActivationFactory* CreateActivationFactory_SwapChainBackgroundPanel()
    {
        RRETURN(ctl::ActivationFactoryCreator<SwapChainBackgroundPanelFactory>::CreateActivationFactory());
    }
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
//------------------------------------------------------------------------
//
//  Abstract:
//
//      XAML types.
//      NOTE: This file was generated by a tool.
//
//------------------------------------------------------------------------

#include "DropTargetItemThemeAnimation.g.h"
#include "XamlTelemetry.h"

// Constructors/destructors.
DirectU


 func(t *testing.T) {
		licenseTypeSampleUpdated := model.OracleDatabaseLicenseType{
			ID: "doesn't exist",
		}
		err := m.db.UpdateOracleDatabaseLicenseType(licenseTypeSampleUpdated)

		require.Equal(t, utils.ErrOracleDatabaseLicenseTypeIDNotFound, err)
	})
}

func (m *MongodbSuite) TestRemoveOracleDatabaseLicenseType() {
	defer m.db.Client.Database(m.dbname).Collection(oracleDbLicenseTypesCollection).DeleteMany(context.TODO(), bson.M{})

	err := m.db.InsertOracleDatabaseLicenseType(licenseTypeExample)
	require.NoError(m.T(), err)

	err = m.db.RemoveOracleDatabaseLicenseType(licenseTypeExample.ID)
	require.NoError(m.T(), err)

	err = m.db.RemoveOracleDatabaseLicenseType("Test")
	require.Equal(m.T(), utils.ErrOracleDatabaseLicenseTypeIDNotFound, err)
}

func (m *MongodbSuite) TestGetOracleDatabaseLicenseType() {
	defer m.db.Client.Database(m.dbname).Collection(oracleDbLicenseTypesCollection).DeleteMany(context.TODO(), bson.M{})

	err := m.db.InsertOracleDatabaseLicenseType(licenseTypeExample)
	require.NoError(m.T(), err)

	val, err := m.db.GetOracleDatabaseLicenseType(licenseTypeExample.ID)
	require.NoError(m.T(), err)

	assert.Equal(m.T(), &licenseTypeExample, val)
}
// Copyright (c) 2023 Sorint.lab S.p.A.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

package service

import (
	"testing"

	"github.com/ercole-io/ercole/v2/api-service/dto"
	"github.com/ercole-io/ercole/v2/config"
	"github.com/ercole-io/ercole/v2/model"
	"github.com/ercole-io/ercole/v2/utils"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	"go.uber.org/mock/gomock"
)

func TestGetOraclePsqlMigrabilities_Success(t *testing.T) {
	mockCtrl := gomock.NewController(t)
	defer mockCtrl.Finish()
	db := NewMockMongoDatabaseInterface(mockCtrl)
	as := APIService{
		Database: db,
		Config:   config.Configuration{},
		TimeNow:  utils.Btc(utils.P("2019-11-05T14:02:03Z")),
	}

	metric := "test_metric"
	schema := "test_schema"
	objectType := "test_objectType"

	expected := []model.PgsqlMigrability{
		{
			Metric:     &metric,
			Count:      0,
			Schema:     &schema,
			ObjectType: &objectType,
		},
	}

	db.EXPECT().FindPsqlMigrabilities("hostname01", "dbname01").Return(expected


void ImGuiEx::Canvas::LeaveLocalSpace()
{
    IM_ASSERT(m_DrawList->_Splitter._Current == m_ExpectedChannel);

# if IMGUI_EX_CANVAS_DEFERED()
    IM_ASSERT(m_CurrentRange != nullptr);

    m_CurrentRange->EndVertexIndex  = m_DrawList->_VtxCurrentIdx + ImVtxOffsetRef(m_DrawList);
    m_CurrentRange->EndCommandIndex = m_DrawList->CmdBuffer.size();
    if (m_CurrentRange->BeginVertexIndex == m_CurrentRange->EndVertexIndex)
    {
        // Drop empty range
        m_Ranges.resize(m_Ranges.Size - 1);
    }
    m_CurrentRange = nullptr;
# endif

    // Move vertices to screen space.
    auto vertex    = m_DrawList->VtxBuffer.Data + m_DrawListStartVertexIndex;
    auto vertexEnd = m_DrawList->VtxBuffer.Data + m_DrawList->_VtxCurrentIdx + ImVtxOffsetRef(m_DrawList);

    // If canvas view is not scaled take a faster path.
    if (m_View.Scale != 1.0f)
    {
        while (vertex < vertexEnd)
        {
            vertex->pos.x = vertex->pos.x * m_View.Scale + m_ViewTransformPosition.x;
            vertex->pos.y = vertex->pos.y * m_View.Scale + m_ViewTransformPosition.y;
            ++vertex;
        }

        // Move clip rectangles to screen space.
        for (int i = m_DrawListFirstCommandIndex; i < m_DrawList->CmdBuffer.size(); ++i)
        {
            auto& command = m_DrawList->CmdBuffer[i];
            command.ClipRect.x = command.ClipRect.x * m_View.Scale + m_ViewTransformPosition.x;
            command.ClipRect.y = command.ClipRect.y * m_View.Scale + m_ViewTransformPosition.y;
            command.ClipRect.z = command.ClipRect.z * m_View.Scale + m_ViewTransformPosition.x;
            command.ClipRect.w = command.ClipRect.w * m_View.Scale + m_ViewTransformPosition.y;
        }
    }
    else
    {
        while (vertex < vertexEnd)
        {
            vertex->pos.x = vertex->pos.x + m_ViewTransformPosition.x;
            vertex->pos.y = vertex->pos.y + m_ViewTransformPosition.y;
            ++vertex;
        }

        // Move clip rectangles to screen space.
        for (int i = m_DrawListFirstCommandIndex; i < m_DrawList->CmdBuffer.size(); ++i)
        {
            auto& command = m_DrawList->CmdBuffer[i];
            command.ClipRect.x = command.ClipRect.x + m_ViewTransformPosition.x;
            command.ClipRect.y = command.ClipRect.y + m_ViewTransformPosition.y;
            command.ClipRect.z = command.ClipRect.z + m_ViewTransformPosition.x;
            command.ClipRect.w = command.ClipRect.w + m_ViewTransformPosition.y;
        }
    }

    // Remove sentinel draw command if present
    if (m_DrawListCommadBufferSize > 0)
    {
        if (m_DrawList->CmdBuffer.size() > m_DrawListCommadBufferSize && m_DrawList->CmdBuffer[m_DrawListCommadBufferSize].UserCallback == ImDrawCallback_ImCanvas)
            m_DrawList->CmdBuffer.erase(m_DrawLi


.include "../tokens.inc"

	;=======================
	;=======================
	;=======================
	; Cliff Heights
	;=======================
	;=======================
	;=======================

	; This one is complex, should we have multiple verb tables
	;	for when taking quiz?

cliff_heights_verb_table:
	.byte VERB_GET
	.word cliff_heights_get-1
	.byte VERB_TAKE
	.word cliff_heights_get-1
	.byte VERB_STEAL
	.word cliff_heights_get-1
	.byte VERB_CLIMB
	.word cliff_heights_climb-1
	.byte VERB_LOOK
	.word cliff_heights_look-1
	.byte 0

	;================
	; climb
	;================
cliff_heights_climb:

	lda	CURRENT_NOUN

	cmp	#NOUN_CLIFF
	beq	cliff_heights_do_climb
	cmp	#NOUN_NONE
	beq	cliff_heights_do_climb

	jmp	parse_common_unknown

cliff_heights_do_climb:
	ldx	#<cliff_heights_climb_message
	ldy	#>cliff_heights_climb_message
	jmp	finish_parse_message

	;================
	; get
	;================
cliff_heights_get:
cliff_heights_steal:
cliff_heights_take:
	lda	CURRENT_NOUN

	cmp	#NOUN_BONE
	beq	cliff_heights_get_bone
	cmp	#NOUN_SKULL
	beq	cliff_heights_get_bone

	; else "probably


# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

# -- Project information -----------------------------------------------------

project = 'Links'
copyright = '2019, The Links Developers'
author = 'The Links Developers'

# The full version, including alpha/beta/rc tags
release = '0.9 (Burghmuirhouse)'

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Needed for CI
master_doc = 'index'


 may produce a fractional result, which ordinarily we would simply
             * ignore, but if the integer portion is zero and the sign is negative, we should probably treat
             * this value as a sign-extension.
             */
            if (n < 0 && n > -1) n = -1;
            /*
             * Negative values should be twos-complemented to produce a positive value for conversion purposes,
             * but we can only do that if/when we're given the number of bits; Math.pow(base, cch) is equivalent
             * to Math.pow(2, bits), but less precise for bases that aren't a power of two (eg, base 10).
             */
            if (bits) {
                if (n < 0) {
                    n += Math.pow(2, bits);
                }
                if (n >= Math.pow(2, bits)) {
                    cch = Math.ceil(Math.log(n) / Math.log(base));
                }
            }
        }
        let g = nGrouping || -1;
        while (cch--) {
            if (!g) {
                s = ',' + s;
                g = nGrouping;
            }
            if (n == undefined) {
                s = '?' + s;
                if (cch < 0) break;
            } else {
                let d = n % base;
                n = Math.trunc(n / base);
                d += (d >= 0 && d <= 9? 0x30 : 0x41 - 10);
                s = String.fromCharCode(d) + s;
                if (!n && cch < 0) break;
            }
            g--;
        }
        return prefix + s + suffix;
    }

    /**
     * clearBits(num, bits)
     *
     * Function for clearing bits in numbers with more than 32 bits.
     *
     * @this {NumIO}
     * @param {number} num
     * @param {number} bits
     * @returns {number} (num & ~bits)
     */
    clearBits(num, bits)
    {
        let shift = NumIO.TWO_POW32;
        let numHi = (num / shift)|0;
        let bitsHi = (bits / shift)|0;
        return (num & ~bits) + (numHi & ~bitsHi) * shift;
    }

    /**
     * setBits(num, bits)
     *
     * Function for setting bits in numbers with more than 32 bits.
     *
     * @this {NumIO}
     * @param {number} num
     * @param {number} bits
     * @returns {number} (num | bits)
     */
    setBits(num, bits)
    {
        let shift = NumIO.TWO_POW32;
        let numHi = (num / shift)|0;
        let bitsHi = (bits / shift)|0;
        return (num | bits) + (numHi | bitsHi) * shift;
    }

    /**
     * testBits(num, bits)
     *
     * Function for testing bits in numbers with more than 32 bits.
     *
     * @this {NumIO}
     * @param {number} num
     * @param {number} bits
     * @returns {boolean} (true IFF num & bits == bits)
     */
    testBits(num, bits)
    {
        let shift = NumIO.TWO_POW32;
        let numHi = (num / shift)|0;
        let bitsHi = (bits / shift)|0;
        return ((num & bits) == (bits|0) && (numHi & bitsHi) == bitsHi);
    }

    /**
     * compress(aSrc)
     *
     * Compresses an array of numbers.
     *
     * @this {NumIO}
     * @param {Array|Uint8Array} aSrc
     * @returns {Array|Uint8Array} is either the original array (aSrc), or a smaller array of "count, value" pairs (aComp)
     */
    compress(aSrc)
    {
        let iSrc = 0;
        let iComp = 0;
        let aComp = [];
        while (iSrc < aSrc.length) {
            let n = aSrc[iSrc];

            let iCompare =


 int eventId, int eventVersion, uint cbMetadataBlob, byte* metadataBlob, uint cbEventData, byte* eventData, in Guid pActivityId, in Guid pRelatedActivityId, ThreadId eventThread, uint numStackFrames, nint* stackFrames)
    {
        return EventPipeEventDelivered(provider, eventId, eventVersion, cbMetadataBlob, metadataBlob, cbEventData, eventData, in pActivityId, in pRelatedActivityId, eventThread, numStackFrames, stackFrames);
    }

    #endregion

    protected virtual unsafe HResult EventPipeEventDelivered(nint provider, int eventId, int eventVersion, uint cbMetadataBlob, byte* metadataBlob, uint cbEventData, byte* eventData, in Guid pActivityId, in Guid pRelatedActivityId, ThreadId eventThread, uint numStackFrames, nint* stackFrames)
    {
        return HResult.E_NOTIMPL;
    }

    protected virtual HResult EventPipeProviderCreated(nint provider)
    {
        return HResult.E_NOTIMPL;
    }
}


6963c2b06865616465724369706865727465787483a165c501dde31898b61cbcdf296e28a48076ed58977d7134ca7093a8c067a4eb9a82f7aad5399bec78d30a5c38d6369dc48b393246fe137cb54389903d074e55526cfc7e5ff0dbbdf30c03e4b5542f080e0ea2b9c2ca39b113ed1aef5765b41d2bbc681967671ade1b59a0333cc321f46c380f550edfc42979bda6b418d1c74e8ca7e875fcd8dd9f1bc1a73e2c22dd9d031a23921188a498f73930569b987141868d0e9f299abb58f35a53a6d0ff3dddfaa00b7cc8f6b1d358555dfe675fc8416704969ab96aa87aa3ccddbb0c6d342dc7478dfbf4440b4456fc5937c1f247366b9c2aa4659197314012f460ebb44aec4f84ef60bb2d1437967a9bb25c5a0a05bc98c85fcdee14a908d1976133153d1cbc6e96b83d18df0c9b3be78d13cdb2ad7eb01b3fb5e8f5831f98cf76c435b55634459b731058552598c6d8690183355326367e598e7739b595b7c03c5fe0ed86cff70340896a53ceee49c6fc2a5e9f9d78c714374e6147e9b2e76e32fdd07f4ff9c94b816537a8b16d0a5f500bb04f13ca910f15e5726ece786f97e144e358b410371ae1d022ce97ef37d3c21b75500a0467b575bcb1b144c7e4646eb5bd80042c997941faa81c21d5aa38d6b645cdbb0a7b05ae3141e5452d83095f7bee2f2236813f22acd8a9f89fdd30cc1b561065907aa16ec418b99852fbd55705e0c4c2195965f0c3ef21ffa631feae79d7a17601ad6b657947656e65726174696f6e01ac73657276657248656164657283a56374696d65cf0000015a62546d47a96d657373616765494405ac73757065727365646564427900`,
	},
}

func getCannedMessage(t *testing.T, tag string) cannedMessage {
	for _, cm := range cannedMessages {
		if cm.tag == tag {
			return cm
		}
	}
	errStr := fmt.Sprintf("Cannot find canned message: %q", tag)
	t.Fatalf("%s", errStr)
	return cannedMessage{}
}

func (cm cannedMessage) AsBoxed(t *testing.T) (res chat1.MessageBoxed) {
	cm.unhex(t, &res, cm.boxed)
	return res
}

func (cm cannedMessage) EncryptionKey(t *testing.T) *keybase1.CryptKey {
	keyBytes, err := hex.DecodeString(cm.encryptionKey)
	require.NoError(t, err)

	var keyBytes32 keybase1.Bytes32
	copy(keyBytes32[:], keyBytes)
	res := keybase1.CryptKey{
		KeyGeneration: cm.encryptionKeyGeneration,
		Key:           keyBytes32,
	}
	require.NotNil(t, res, "nil canned encryption key")
	require.Equal(t, len(res.Key), 32, "non-32 byte encryption key")
	return &res
}

func (cm cannedMessage) VerifyKey(t *testing.T) []byte {
	keyBytes, err := hex.DecodeString(cm.verifyKey)
	require.NoError(t, err)
	require.NotNil(t, keyBytes)
	return keyBytes
}

func (cm cannedMessage) SenderUID(t *testing.T) gregor1.UID {
	uid, err := hex.DecodeString(cm.senderUID)
	require.NoError(t, err)
	require.NotNil(t, uid)
	return uid
}


static BOOL IS_PED_IN_HIT_REACT(Ped ped) { return invoke<BOOL>(0xF330A5C062B29BED, ped); } // 0xF330A5C062B29BED b1207
	static void TASK_ARREST_PED(Ped ped, Ped target) { invoke<void>(0xF3B9A78A178572B1, ped, target); } // 0xF3B9A78A178572B1 0xBC0F153D b1207
	static BOOL IS_PED_BEING_ARRESTED(Ped ped) { return invoke<BOOL>(0x90A09F3A45FED688, ped); } // 0x90A09F3A45FED688 0x5FF6C2ED b1207
	static BOOL _IS_PED_ARRESTING_ANY_PED(Ped ped) { return invoke<BOOL>(0xA9CC7856D52DBD25, ped); } // 0xA9CC7856D52DBD25 b1207
	static void _CUFF_PED(Ped ped) { invoke<void>(0x7981037A96E7D174, ped); } // 0x7981037A96E7D174 b1207
	static void UNCUFF_PED(Ped ped) { invoke<void>(0x67406F2C8F87FC4F, ped); } // 0x67406F2C8F87FC4F 0xA23A1D61 b1207
	static BOOL IS_PED_CUFFED(Ped ped) { return invoke<BOOL>(0x74E559B3BC910685, ped); } // 0x74E559B3BC910685 0x511CE741 b1207
	static BOOL _IS_PED_DUELLING(Ped ped) { return invoke<BOOL>(0xC8B29D18022EA2B7, ped); } // 0xC8B29D18022EA2B7 b1207
	static void TASK_DUEL(Ped ped, Any p1, float p2, Entity entity, float p4, int p5, float vPosOpponentX, float vPosOpponentY, float vPosOpponentZ, float fOpponentHead, int p10) { invoke<void>(0x5D5B0D5BC3626E5A, ped, p1, p2, entity, p4, p5, vPosOpponentX, vPosOpponentY, vPosOpponentZ, fOpponentHead, p10); } // 0x5D5B0D5BC3626E5A b1207
	static void TASK_DUEL(Ped ped, Any p1, float p2, Entity entity, float p4, int p5, Vector3 vposopponent, float fOpponentHead, int p10) { invoke<void>(0x5D5B0D5BC3626E5A, ped, p1, p2, entity, p4, p5, vposopponent.x, vposopponent.y, vposopponent.z, fOpponentHead, p10); } // 0x5D5B0D5BC3626E5A b1207
	static Any _0x908BB14BCE85C80E(Any p0) { return invoke<Any>(0x908BB14BCE85C80E, p0); } // 0x908BB14BCE85C80E b1207
	static Any _0x1F7A9A9C38C13A56(Any p0) { return invoke<Any>(0x1F7A9A9C38C13A56, p0); } // 0x1F7A9A9C38C13A56 b1207
	static Any _0x3FEB770D8ED9047A(Any p0) { return invoke<Any>(0x3FEB770D8ED9047A, p0); } // 0x3FEB770D8ED9047A b1207
	static Any _0x30146C25686B7836(Any p0, Any p1) { return invoke<Any>(0x30146C25686B7836, p0, p1); } // 0x30146C25686B7836 b1207
	static Any _0x59AE5CA4FFB4E378(Any p0, Any p1)


++ );
		}
		else if( org == "random" )
		{
			m_spawnthing->randorg[ j ] = RANDOM;
			m_spawnthing->origin_offset[j++] = ev->GetFloat( i++ );
		}
		else
		{
			m_spawnthing->randorg[ j ] = NOT_RANDOM;
			m_spawnthing->origin_offset[j++] = atof( org.c_str());
		}
	}
}

// =============
// SetAlpha
// =============
void ClientGameCommandManager::SetAlpha( Event *ev )
{
	m_spawnthing->cgd.alpha = ev->GetFloat( 1 );
}

// =============
// SetDieTouch
// =============
void ClientGameCommandManager::SetDieTouch( Event *ev )
{
	m_spawnthing->cgd.flags |= T_DIETOUCH;
}

// =============
// SetBounceFactor
// =============
void ClientGameCommandManager::SetBounceFactor( Event *ev )
{
	m_spawnthing->cgd.bouncefactor = ev->GetFloat( 1 );
	m_spawnthing->cgd.flags |= T_COLLISION;
	m_spawnthing->cgd.collisionmask = ( CONTENTS_SOLID );
}

// =============
// SetBounceSound
// =============
void ClientGameCommandManager::SetBounceSound( Event *ev )
{
	m_spawnthing->cgd.bouncesound = ev->GetString( 1 );

	if( ev->NumArgs() == 2 )
		m_spawnthing->cgd.bouncesound_delay = ev->GetFloat( 1 ) * 1000;

	m_spawnthing->cgd.flags |= T_BOUNCESOUND;
}

// =============
// SetBounceSoundOnce
// =============
void ClientGameCommandManager::SetBounceSoundOnce( Event *ev )
{
	m_spawnthing->cgd.flags |= T_BOUNCESOUNDONCE;
	SetBounceSound( ev );
}

// =============
// SetScale
// =============
void ClientGameCommandManager::SetScale( Event *ev )
{
	m_spawnthing->cgd.scale = ev->GetFloat( 1 );
}

// =============
// SetScaleUpDown
// =============
void ClientGameCommandManager::SetScaleUpDown( Event *ev )
{
	m_spawnthing->cgd.flags |= T_SCALEUPDOWN;
}

// =============
// SetScaleMin
// =============
void ClientGameCommandManager::SetScaleMin( Event *ev )
{
	m_spawnthing->cgd.flags |= T_RANDSCALE;
	m_spawnthing->cgd.scalemin = ev->GetFloat( 1 );
}

// =============
// SetScaleMax
// =============
void ClientGameCommandManager::SetScaleMax( Event *ev )
{
	m_spawnthing->cgd.flags |= T_RANDSCALE;
	m_spawnthing->cgd.scalemax = ev->GetFloat( 1 );
}

// =============
// SetScaleRate
// =============
void ClientGameCommandManager::SetScaleRate( Event *ev )
{
	m_spawnthing->cgd.scaleRate = ev->GetFloat( 1 );
}

// =============
// SetFade
// =============
void ClientGameCommandManager::SetFade( Event *ev )
{
	m_spawnthing->cgd.flags |= T_FADE;
}

// =============
// SetFadeDelay
// =============
void ClientGameCommandManager::SetFadeDelay( Event *ev )
{
	m_spawnthing->cgd.fadedelay = ev->GetFloat( 1 ) * 1000;
	m_spawnthing->cgd.flags |= T_FADE;
}

// =============
// SetFadeIn
// =============
void ClientGameComma


(b, function (d) {
                e = a._hungarianMap[d];
                if (e !== k && (c || b[e] === k))"o" === e.charAt(0) ? (b[e] || (b[e] = {}), h.extend(!0, b[e], b[d]), H(a[e], b[e], c)) : b[e] = b[d]
            })
        }

        function P(a) {
            var b = m.defaults.oLanguage, c = a.sZeroRecords;
            !a.sEmptyTable && (c && "No data available in table" === b.sEmptyTable) && E(a, a, "sZeroRecords", "sEmptyTable");
            !a.sLoadingRecords && (c && "Loading..." === b.sLoadingRecords) && E(a, a, "sZeroRecords", "sLoadingRecords");
            a.sInfoThousands && (a.sThousands = a.sInfoThousands);
            (a = a.sDecimal) && db(a)
        }

        function eb(a) {
            A(a, "ordering", "bSort");
            A(a, "orderMulti", "bSortMulti");
            A(a, "orderClasses", "bSortClasses");
            A(a, "orderCellsTop", "bSortCellsTop");
            A(a, "order", "aaSorting");
            A(a, "orderFixed", "aaSortingFixed");
            A(a, "paging", "bPaginate");
            A(a, "pagingType", "sPaginationType");
            A(a, "pageLength", "iDisplayLength");
            A(a, "searching", "bFilter");
            if (a = a.aoSearchCols)for (var b = 0, c = a.length; b < c; b++)a[b] && H(m.models.oSearch, a[b])
        }

        function fb(a) {
            A(a, "orderable", "bSortable");
            A(a, "orderData", "aDataSort");
            A(a, "orderSequence", "asSorting");
            A(a, "orderDataType", "sortDataType");
            var b = a.aDataSort;
            b && !h.isArray(b) && (a.aDataSort = [b])
        }

        function gb(a) {
            var a = a.oBrowser, b = h("<div/>").css({
                position: "absolute",
                top: 0,
                left: 0,
                height: 1,
                width: 1,
                overflow: "hidden"
            }).append(h("<div/>").css({
                position: "absolute",
                top: 1, left: 1, width: 100, overflow: "scroll"
            }).append(h('<div class="test"/>').css({width: "100%", height: 10}))).appendTo("body"), c = b.find(".test");
            a.bScrollOversize = 100 === c[0].offsetWidth;
            a.bScrollbarLeft = 1 !== Math.round(c.offset().left);
            b.remove()
        }

        function hb(a, b, c, e, d, f) {
            var g, j = !1;
            c !== k && (g = c, j = !0);
            for (; e !== d;)a.hasOwnProperty(e) && (g = j ? b(g, a[e], e, a) : a[e], j = !0, e += f);
            return g
        }

        function Fa(a, b) {
            var c = m.defaults.column, e = a.aoColumns.length, c = h.extend({}, m.models.oColumn, c, {
                nTh: b ? b : Q.createElement("th"),
                sTitle: c.sTitle ?
                    c.sTitle : b ? b.innerHTML : "",


 /// </summary>
        LuminanceAlphaIccSgix,
        /// <summary>
        /// Original was GL_R5_G6_B5_ICC_SGIX = 0x8466
        /// </summary>
        R5G6B5IccSgix,
        /// <summary>
        /// Original was GL_R5_G6_B5_A8_ICC_SGIX = 0x8467
        /// </summary>
        R5G6B5A8IccSgix,
        /// <summary>
        /// Original was GL_ALPHA16_ICC_SGIX = 0x8468
        /// </summary>
        Alpha16IccSgix,
        /// <summary>
        /// Original was GL_LUMINANCE16_ICC_SGIX = 0x8469
        /// </summary>
        Luminance16IccSgix,
        /// <summary>
        /// Original was GL_INTENSITY16_ICC_SGIX = 0x846A
        /// </summary>
        Intensity16IccSgix,
        /// <summary>
        /// Original was GL_LUMINANCE16_ALPHA8_ICC_SGIX = 0x846B
        /// </summary>
        Luminance16Alpha8IccSgix
    }
}


ProxyProtocolVersion.V2, HAProxyCommand.PROXY, HAProxyProxiedProtocol.TCP4,
                "192.168.0.1", "192.168.0.11", 56324, 443,
                Collections.<HAProxyTLV>singletonList(haProxySSLTLV));
        assertTrue(ch.writeOutbound(message));

        ByteBuf byteBuf = ch.readOutbound();

        assertEquals(byteBuf.getUnsignedShort(14), byteBuf.readableBytes() - V2_HEADER_BYTES_LENGTH);
        ByteBuf tlv = byteBuf.skipBytes(V2_HEADER_BYTES_LENGTH + IPv4_ADDRESS_BYTES_LENGTH);

        // ssl tlv type
        assertEquals(haProxySSLTLV.typeByteValue(), tlv.readByte());

        // length
        int bufLength = tlv.readUnsignedShort();
        assertEquals(bufLength, tlv.readableBytes());

        // client, verify
        assertEquals(0x01, byteBuf.readByte());
        assertEquals(1, byteBuf.readInt());

        // alpn tlv
        assertEquals(alpnTlv.typeByteValue(), tlv.readByte());
        bufLength = tlv.readShort();
        assertEquals(helloWorld.array().length, bufLength);
        assertEquals(helloWorld, tlv.readBytes(bufLength));

        // authority tlv
        assertEquals(authorityTlv.typeByteValue(), tlv.readByte());
        bufLength = tlv.readShort();
        assertEquals(arbitrary.array().length, bufLength);
        assertEquals(arbitrary, tlv.readBytes(bufLength));

        byteBuf.release();
        assertFalse(ch.finish());
    }

    @Test
    public void testEncodeLocalProxyV2() {
        EmbeddedChannel ch = new EmbeddedChannel(INSTANCE);

        HAProxyMessage message = new HAProxyMessage(
                HAProxyProtocolVersion.V2, HAProxyCommand.LOCAL, HAProxyProxiedProtocol.UNKNOWN,
                null, null, 0, 0);
        assertTrue(ch.writeOutbound(message));

        ByteBuf byteBuf = ch.readOutbound();

        // header
        byte[] headerBytes = new byte[12];
        byteBuf.readBytes(headerBytes);
        assertArrayEquals(BINARY_PREFIX, headerBytes);

        // command
        byte commandByte = byteBuf.readByte();
        assertEquals(0x02, (commandByte & 0xf0) >> 4);
        assertEquals(0x00, commandByte & 0x0f);

        // transport protocol, address family
        byte transportByte = byteBuf.readByte();
        assertEquals(0x00, transportByte);

        // source address length
        int sourceAddrLength = byteBuf.readUnsignedShort();
        assertEquals(0, sourceAddrLength);

        assertFalse(byteBuf.isReadable());

        byteBuf.release();
        assertFalse(ch.finish());
    }

    @Test(expected = IllegalArgumentException.class)
    public void testInvalidIpV4Address() {
        String invalidIpv4Address = "192.168.0.1234";
        new HAProxyMessage(
                HAProxyProtocolVersion.V1, HAProxyCommand.PROXY, HAProxyProxiedProtocol.TCP4,
                invalidIpv4Address, "192.168.0.11", 56324, 443);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testInvalidIpV6Address() {
        String invalidIpv6Address = "2001:0db8:85a3:0000:0000:8a2e:0370:73345";
        new HAProxyMessage(
                HAProxyProtocolVersion.V1, HAProxyCommand.PROXY, HAProxyProxiedProtocol.TCP6,
                invalidIpv6Address, "1050:0:0:0:5:600:300c:326b", 56324, 443);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testInvalidUnixAddress() {
        String invalidUnixAddress = new String(new byte[UNIX_ADDRESS_BYTES_LENGTH + 1]);
        new HAProxyMessage(
                HAProxyProtocolVersion.V2, HAProxyCommand.PROXY, HAProxyProxiedProtocol.UNIX_STREAM,
                invalidUnixAddress, "/var/r


> 原文：[`www.yuque.com/for_lazy/thfiu8/owrvagp0q4wuupz6`](https://www.yuque.com/for_lazy/thfiu8/owrvagp0q4wuupz6)

## (135 赞)视频号航海：如何内容变现

作者： 李百万

日期：2023-09-08

大家好，我是李百万
视频号 6 月单月 51w➕，12w 收益。在视频号持续深耕 8 个月也算是取得了理想成绩。也有幸成为视频号航海的教练。

很高兴认识大家，曾经我也是新手，深知新手的痛，没有系统玩法，没有人带迷茫。。。

我来根据自己的实操经验给大家分享我的方法和历程。希望对大家有所帮助。

本文开始前，必须要感谢生财官方的小霸王和肉松小姐姐的指导帮助，还有生财圈友也是好友达达，小刀的支持以及靠谱姐，芷蓝姐，理白哥和比比背后这一路成长的鼓励与帮助。在生财遇到更多的朋友帮助，也在生财经历 0～1，1～10。真心感谢生财。

本期内容为原视频号航海高手分享贴，群内分享的节奏比较快和匆忙感觉阅读感较差，再者有圈友说对视频号感兴趣但未能加入视频号航海，所以也再次分享一下。

话不多说，正文开始：
请移步飞书：[`k4h4dcpi91.feishu.cn/docx/VlR0dRPw1onLDCxevL5cbaWTnph?from=from_copylink`](https://k4h4dcpi91.feishu.cn/docx/VlR0dRPw1onLDCxevL5cbaWTnph?from=from_copylink)

* * *

评论区：

雅俊 : 李千万[呲牙]你好
李百万 : 雅俊哥，早上好🌞
胖大玲 : 李千万，早上好[色]
李百万 : 早[呲牙]
攀子 : 又是一个妥妥的干货教程
小花 : 超干的，感谢分享，想问一下，清晨每日书摘这个账号怎么搜不到。
帅彬 : 高手，群里经常看到，早就想链接了，奈何我是小白[大哭]
黄承德 : 大佬，好奇你是怎么做到，在 5 月底分享小红书 3 个月月入 10 万，现在 9 月份又分享做了 8 个月视频号的[捂脸]

![](img/1c37d505930596d12a88ab23e11aa07a.png)

* *


import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import numpy as np

class CBOWModel(nn.Module):
    def __init__(self, emb_size, emb_dimension, window_size):
        super(CBOWModel, self).__init__()
        self.emb_size = emb_size
        self.emb_dimension = emb_dimension
        self.window_size = window_size
        self.u_embeddings = nn.Embedding(2 * emb_size - 1, emb_dimension, sparse=True)
        # emb_size = 8934, num_embeddings = 2 * emb_size - 1 = 17867
        self.v_embeddings = nn.Embedding(2 * emb_size - 1, emb_dimension, sparse=True)
        self.init_emb()

    def init_emb(self):
        initrange = 0.5 / self.emb_dimension
        # u,v of two embeddings weight
        # question 1: (-0.005, +0.005)  word_embedding  initialization  scope
        self.u_embeddings.weight.data.uniform_(-initrange, initrange)
        self.v_embeddings.weight.data.uniform_(-0, 0)

    def forward(self, pos_u, pos_v, neg_u, neg_v):
        losses = []
        emb_v = []
        for i in range(len(pos_v)):
            emb_v_v = self.u_embeddings(Variable(torch.LongTensor(pos_v[i])))
            emb_v_v_numpy = emb_v_v.data.numpy()
            emb_v_v_numpy = np.sum(emb_v_v_numpy, axis=0)
            emb_v_v_list = emb_v_v_numpy.tolist()
            emb_v.append(emb_v_v_list)
        emb_v = Variable(torch.FloatTensor(emb_v))
        emb_u = self.v_embeddings(Variable(torch.LongTensor(pos_u)))
        score = torch.mul(emb_u, emb_v)
        score = torch.sum(score, dim=1)
        score = F.logsigmoid(score)
        losses.append(sum(score))

        neg_emb_v = []
        for i in range(len(neg_v)):
            neg_emb_v_v = self.u_embeddings(Variable(torch.LongTensor(neg_v[i])))
            neg_emb_v_v_numpy = neg_emb_v_v.data.numpy()
            neg_emb_v_v_numpy = np.sum(neg_emb_v_v_numpy, axis=0)
            neg_emb_v_v_list = neg_emb_v_v_numpy.tolist()
            neg_emb_v.append(neg_emb_v_v_list)
        neg_emb_v = Variable(torch.FloatTensor(neg_emb_v))

        neg_emb_u = self.v_embeddings(Variable(torch.LongTensor(neg_u)))
        neg_score = torch.mul(neg_emb_u, neg_emb_v)
        neg_score = torch.sum(neg_score, dim=1)
        neg_score = F.logsigmoid(-1 * neg_score)
        losses.append(sum(neg_score))
        return -1 * sum(losses)

    def save_embedding(self, id2word, file_name):
        embedding = self.u_embeddings.weight.data.numpy()
        fout = open(file_name, 'w', encoding='utf-8')
        fout.write('%d %d\n' % (len(id2word), self.emb_dimension))
        for wid, w in id2word.items():
            e = embedding[wid]
            e = ' '.join(map(lambda x: str(x), e))
            fout.write('%s %s\n' % (w, e))

def test():
    model = CBOWModel(100, 100, 5)
    id2word = dict()
    for i in range(100):
        id2word[i] = str(i)
    model.save_embedding(id2word, 'xx.txt')

if __name__ == '__main__':
    test()


alvingPollardEnum:
		case CalvingTestEnum:
		case CalvingParameterizationEnum:
		case CalvingCalvingMIPEnum:
			calvingratex_input=this->GetInput(CalvingratexEnum); _assert_(calvingratex_input);
			calvingratey_input=this->GetInput(CalvingrateyEnum); _assert_(calvingratey_input);
			meltingrate_input = this->GetInput(CalvingMeltingrateEnum);     _assert_(meltingrate_input);
			break;
		case CalvingMinthicknessEnum:
		case CalvingHabEnum:
		case CalvingCrevasseDepthEnum:
			meltingrate_input = this->GetInput(CalvingMeltingrateEnum);     _assert_(meltingrate_input);
			break;
		case CalvingDev2Enum:
			this->FindParam(&calvinghaf,CalvingHeightAboveFloatationEnum);
			calvingrate_input = this->GetInput(CalvingCalvingrateEnum);     _assert_(calvingrate_input);
			meltingrate_input = this->GetInput(CalvingMeltingrateEnum);     _assert_(meltingrate_input);
			break;
		default:
			_error_("Calving law "<<EnumToStringx(calvinglaw)<<" not supported yet");
	}

	/* Start looping on the number of vertices: */
	GaussTria gauss;
	for(int iv=0;iv<NUMVERTICES;iv++){
		gauss.GaussVertex(iv);

		/* Advection */
		vx_input->GetInputValue(&v[0],&gauss);
		vy_input->GetInputValue(&v[1],&gauss);
		gr_input->GetInputValue(&groundedice,&gauss);
		lsf_slopex_input->GetInputValue(&dlsf[0],&gauss);
		if(dim==2) lsf_slopey_input->GetInputValue(&dlsf[1],&gauss);

		norm_dlsf=0.;
		for(i=0;i<dim;i++) norm_dlsf+=pow(dlsf[i],2);
		norm_dlsf=sqrt(norm_dlsf);

		/*Get calving speed*/
		switch(calvinglaw){

			/*RATE calving laws*/
			case DefaultCalvingEnum:
			case CalvingVonmisesEnum:
			case CalvingVonmisesADEnum:
			case CalvingTestEnum:
			case CalvingParameterizationEnum:
			case CalvingLevermannEnum:
			case CalvingPollardEnum:
			case CalvingCalvingMIPEnum:
				calvingratex_input->GetInputValue(&c[0],&gauss);
				calvingratey_input->GetInputValue(&c[1],&gauss);
				meltingrate_input->GetInputValue(&meltingrate,&gauss);
				if(groundedice<0) meltingrate = 0.;
				m[0]=meltingrate*dlsf[0]/norm_dlsf;
				m[1]=meltingrate*dlsf[1]/norm_dlsf;

				if(norm_dlsf<1.e-10){
					for(i=0;i<dim;i++){
						c[i]=0.; m[i]=0.;
					}
				}
				break;

			/*Discrete calving laws*/
			case CalvingMinthicknessEnum:
			case CalvingHabEnum:
			case CalvingCrevasseDepthEnum:
				meltingrate_input->GetInputValue(&meltingrate,&gauss);

				if(norm_dlsf>1.e-10)
				 for(i=0;i<dim;i++){
					 c[i]=0.;
					 m[i]=meltingrate*dlsf[i]/norm_dlsf;
				 }
				else
				 for(i=0;i<dim;i++){
					 c[i]=0.;
					 m[i]=0.;
				 }
				break;

			case CalvingDev2Enum:
				  {
					calvingrate_input->GetInputValue(&calvingrate,&gauss);
					meltingrate_input->GetInputValue(&meltingrate,&gauss);
					gr_input->GetInputValue(&groundedice,&gauss);


ر یک کتابخانه/فریمورک قرار دارد، نه در کد برنامه
// توجه: این منطق زمان‌بندی بسیار ساده است و برای استفاده مناسب نیست. کپی/پیست نکنید.
let pending = false;

let w = new Signal.subtle.Watcher(() => {
    if (!pending) {
        pending = true;
        queueMicrotask(() => {
            pending = false;
            for (let s of w.getPending()) s.get();
            w.watch();
        });
    }
});

// یک سیگنال effect که به cb ارزیابی می‌شود و هر زمان که یکی از وابستگی‌هایش ممکن است تغییر کند، یک خوانش از خودش را در صف microtask قرار می‌دهد
export function effect(cb) {
    let destructor;
    let c = new Signal.Computed(() => { destructor?.(); destructor = cb(); });
    w.watch(c);
    c.get();
    return () => { destructor?.(); w.unwatch(c) };
}
```

API سیگنال هیچ تابع داخلی مانند `effect` ندارد. دلیل آن این است که زمان‌بندی effect ظریف است و اغلب با چرخه‌های رندر فریمورک و سایر وضعیت‌ها یا استراتژی‌های ویژه فریمورک در سطح بالا که JS به آن‌ها دسترسی ندارد، ارتباط دارد.

مروری بر عملیات مختلف استفاده شده در اینجا: callback `notify` که به سازنده Watcher داده می‌شود تابعی است که زمانی که سیگنال از حالت "پاک" (که کش مقداردهی اولیه و معتبر است) به حالت "بررسی شده" یا "کثیف" (که کش ممکن است معتبر یا نامعتبر باشد چون حداقل یکی از stateهایی که به طور بازگشتی به آن وابسته است تغییر کرده) می‌رود، فراخوانی می‌شود.

فراخوانی‌های `notify` در نهایت توسط فراخوانی `.set()` روی یک سیگنال state تحریک می‌شوند. این فراخوانی همگام است: قبل از اینکه `.set` بازگردد انجام می‌شود. اما نیازی نیست نگران باشید که این callback گراف سیگنال را در حالتی نیمه‌پردازش شده ببیند، ز


'./processors';

/**
 * @desc
 *  Produces [Serenity BDD](http://serenity-bdd.info/)-standard JSON reports
 *  that [Serenity BDD CLI Reporter](https://github.com/serenity-bdd/serenity-cli)
 *  can parse to produce HTML reports and living documentation.
 *
 * @example
Registering the reporter programmatically

 *  import { ArtifactArchiver, configure } from '@serenity-js/core';
 *  import { SerenityBDDReporter } from '@serenity-js/serenity-bdd';
 *
 *  configure({
 *    crew: [
 *      ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
 *      new SerenityBDDReporter()
 *    ],
 *  });
 *
 * @example
Registering the reporter using Protractor configuration

 *  // protractor.conf.js
 *  const
 *    { ArtifactArchiver }    = require('@serenity-js/core'),
 *    { SerenityBDDReporter } = require('@serenity-js/serenity-bdd');
 *
 *  exports.config = {
 *    framework:     'custom',
 *    frameworkPath: require.resolve('@serenity-js/protractor/adapter'),
 *
 *    serenity: {
 *      crew: [
 *        ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
 *        new SerenityBDDReporter(),
 *      ],
 *      // other Serenity/JS config
 *    },
 *
 *    // other Protractor config
 *  };
 *
 * @public
 * @implements {@serenity-js/core/lib/stage~StageCrewMember}
 */
export class SerenityBDDReporter implements StageCrewMember {
    private readonly eventQueues = new EventQueues();
    private readonly processors = new EventQueueProcessors();

    /**
     * A queue for domain events that took place before the SceneStarts event,
     * for example in Mocha's `before` hook.
     */
    private readonly eventQueue: DomainEvent[] = [];

    /**
     * @param {@serenity-js/core/lib/stage~Stage} [stage=undefined] stage
     */
    constructor(private readonly stage?: Stage) {
    }

    /**
     * @desc
     *  Creates a new instance of this {@link @serenity-js/core/lib/stage~StageCrewMember}
     *  and assigns it to a given {@link @serenity-js/core/lib/stage~Stage}.
     *
     * @see {@link @serenity-js/core/lib/stage~StageCrewMember}
     *
     * @param {@serenity-js/core/lib/stage~Stage} stage
     *  An instance of a {@link @serenity-js/core/lib/stage~Stage} this {@link @serenity-js/core/lib/stage~StageCrewMember} will be assigned to
     *
     * @returns {@serenity-js/core/lib/stage~StageCrewMember}
     *  A new instance of this {@link @serenity-js/core/lib/stage~StageCrewMember}
     */
    assignedTo(stage: Stage): StageCrewMember {
        return new SerenityBDDReporter(stage);
    }

    /**
     * @desc
     *  Handles {@link @serenity-js/core/lib/events~DomainEvent} objects emitted by the {@link @serenity-js/core/lib/stage~StageCrewMember}.
     *
     * @see {@link @serenity-js/core/lib/stage~StageCrewMember}
     *
     * @param {@serenity-js/core/lib/events~DomainEvent} event
     * @returns {void}
     */
    notifyOf (event: DomainEvent): void {

        if (this.isSceneSpecific(event)) {
            this.


さらに、PNGとJPEGを効率的なWebP形式に変換することで、画像配信を向上させています。最後に、Cloudflareのパフォーマンスツールも提供されており、ユーザーはEarly Hintsなどの新しい技術をシームレスに実装することができるようになりました。これらの機能は、Webサイトのスピードと全体的なパフォーマンスの向上に貢献するよう設計されています。

お客様にとって有益と思われる新機能をリリースするたびに、One Click Optimizationsに追加していく予定です。また、タブの全体的なレイアウトを変更し、製品をサブカテゴリに分割して、個々のパフォーマンス製品に簡単にアクセスできるようにしました。

公開中

Observatoryが利用できるようになりました！Google Lighthouseとの統合、RUMデータ、マルチリージョンテストなど、今すぐ利用できるObservatory機能を活用して、組織におけるパフォーマンスの支持者となりましょう。Webサイトのパフォーマンスに関する貴重なインサイトを得ることができ、サイトのパフォーマンスを最適化し向上させるための情報に基づいた意思決定を行うことができるようになります。

今後、レコメンデーションエンジンの拡張を続け、Webサイトのパフォーマンスを継続的に向上させることができる製品を導入していきます。さらに、特定の機能に対するリクエストをシミュレートする機能を提供し、Webサイトに実装する前に現実のパフォーマンス上の利点を包括的に理解できるようにします。

31 分で読了

2022年には、世界中の50億人近い人々がインターネットを利用しており（また、これまでにない数の「ボット」が利用されています）、こ


ible ordeal!
	rts

* The nice text message!

text	dc.b	27,'b1',27,'E ',27,'Y',(32+0),(32+15)
name	dc.b	'AGRABOOT!'
	dc.b	27,'Y',(32+7),(32+6),'Flashes if executable boot.'
	dc.b	27,'Y',(32+9),(32+11),'RED if suspicious.',0

; Reset vector message.

clr	dc.b	27,'EReset vector set! Clear?',0

oldhdv	ds.l   1

; END OF CODE ------------------------------------------


using WowPacketParser.Enums;
using WowPacketParser.Misc;
using WowPacketParser.Parsing;
using CoreParsers = WowPacketParser.Parsing.Parsers;

namespace WowPacketParserModule.V10_0_0_46181.Parsers
{
    public static class MiscellaneousHandler
    {
        [Parser(Opcode.SMSG_SETUP_CURRENCY)]
        public static void HandleSetupCurrency(Packet packet)
        {
            var count = packet.ReadUInt32("SetupCurrencyRecord");

            for (var i = 0; i < count; ++i)
            {
                packet.ReadInt32("Type", i);
                packet.ReadInt32("Quantity", i);

                packet.ResetBitReader();

                var hasWeeklyQuantity = packet.ReadBit();
                var hasMaxWeeklyQuantity = packet.ReadBit();
                var hasTrackedQuantity = packet.ReadBit();
                var hasMaxQuantity = packet.ReadBit();
                var hasTotalEarned = packet.ReadBit();
                var hasHasNextRechargeTime = packet.ReadBit();
                var hasRechargeCycleStartTime = false;
                var hasOverflownCurrencyID = false;
                if (ClientVersion.AddedInVersion(ClientVersionBuild.V10_1_0_49407))
                    hasRechargeCycleStartTime = packet.ReadBit();

                if (ClientVersion.AddedInVersion(ClientVersionBuild.V10_2_0_52038))
                    hasOverflownCurrencyID = packet.ReadBit();

                packet.ReadBits("Flags", 5, i);

                if (hasWeeklyQuantity)
                    packet.ReadUInt32("WeeklyQuantity", i);

                if (hasMaxWeeklyQuantity)
                    packet.ReadUInt32("MaxWeeklyQuantity", i);

                if (hasTrackedQuantity)
                    packet.ReadUInt32("TrackedQuantity", i);

                if (hasMaxQuantity)
                    packet.ReadInt32("MaxQuantity", i);

                if (hasTotalEarned)
                    packet.ReadInt32("TotalEarned", i);

                if (hasHasNextRechargeTime)
                    packet.ReadTime64("NextRechargeTime", i);

                if (hasRechargeCycleStartTime)
                    packet.ReadTime64("RechargeCycleStartTime", i);

                if (hasOverflownCurrencyID)
                    packet.ReadInt32("OverflownCurrencyID", i);
            }
        }

        [Parser(Opcode.SMSG_SET_CURRENCY)]
        public static void HandleSetCurrency(Packet packet)
        {
            packet.ReadInt32("Type");
            packet.ReadInt32("Quantity");
            packet.ReadUInt32("Flags");
            uint toastCount = packet.ReadUInt32("UiEventToastCount");
            for (var i = 0; i < toastCount; i++)
                ItemHandler.ReadUIEventToast(packet, "UiEventToast", i);

            var hasWeeklyQuantity = packet.ReadBit("HasWeeklyQuantity");
            var hasTrackedQuantity = packet.ReadBit("HasTrackedQuantity");
            var hasMaxQuantity = packet.ReadBit("HasMaxQuantity");
            var hasTotalEarned = packet.ReadBit("HasTotalEarned");
            packet.ReadBit("SuppressChatLog");
            var hasQuantityChange = packet.ReadBit("HasQuantityChange");
            var hasQuantityLostSou


fy if it is a valid hex string literal
        // At this point, x' has already been consumed
        return readStringLiteral(start);
    }

    private StringLiteralToken readStringLiteral(int start) {
        int c;
        while ((c = requireChar()) != '\'' || peek() == '\'') {
            if (c == '\'') {
                skip();
            }
        }
        return new StringLiteralToken(start, src, start, pos);
    }

    private StringLiteralToken readQStringLiteral(int start) {
        skip();
        char startToken = requireChar();
        char endToken = computeCloseQuote(startToken);
        for (char c = requireChar(); ; c = requireChar()) {
            if (c == endToken && peek() == '\'') {
                skip();
                break;
            }
        }
        return new StringLiteralToken(start, src, start, pos);
    }

    private char computeCloseQuote(char specialChar) {
        return switch (specialChar) {
            case '[' -> ']';
            case '(' -> ')';
            case '{' -> '}';
            case '<' -> '>';
            default -> specialChar;
        };
    }

    private QuotedIdentifierToken readQuotedIdentifier(int start) {
        int c;
        while ((c = requireChar()) != '"' || peek() == '"') {
            if (c == '"') {
                skip();
            }
        }
        return new QuotedIdentifierToken(start, src, start, pos);
    }

    private Token readOtherToken(int start) {
        int c;
        //noinspection StatementWithEmptyBody
        while (!isNormalTokenBoundary(c = read())) {
            // consume remainder of normal token
        }
        unread(c);
        int end = pos;
        CharSequence tokenText = CharBuffer.wrap(src, start, end);
        if (reservedWords.isReservedWord(tokenText)) {
            return new ReservedToken(start, tokenText);
        }
        return new GenericToken(start, tokenText);
    }

    private <T extends Token> T readTokenByLength(int start, int remainingChars, TokenConstructor<T> tokenConstructor) {
        skip(remainingChars);
        return tokenConstructor.construct(start, src, start, pos);
    }

    @SuppressWarnings("java:S1119")
    private boolean detectToken(char[][] expectedChars) {
        int maxChars = expectedChars.length;
        int[] readChars = new int[maxChars + 1];
        int idx = -1;
        try {
            matchLoop:
            while (++idx < maxChars) {
                int currentChar = readChars[idx] = read();
                for (char expectedChar : expectedChars[idx]) {
                    if (currentChar == expectedChar) {
                        continue matchLoop;
                    }
                }
                // no match
                return false;
            }
            return isNormalTokenBoundary(readChars[idx] = read());
        } finally {
            unread(readChars, idx);
        }
    }

    private static boolean isNormalTokenBoundary(int c) {
        return switch (c) {
            case EOF, '\t', '\n', '\r', ' ', '(', ')', '{', '}', '[', ']', '\'', '"', ':', ';', '.', '+', '-', '/', '*',
                    '=', '>', '<', '~', '^', '!', '?' -> true;
            default -> false;
        };
    }

    private static boolean isWhitespace(int c) {
        return switch (c) {
            case '\t', '\n', '\r', ' ' -> true;
            default -> false;
        };
    }

    private static boolean isEndOfLine(int c) {
        return switch (c) {
            case EOF, '\n', '\r' -> true;
            default -> false;
        };
    }

    private static boolean isDigit(int


","🤺","⚔"],
  'けんこう': ["⚕"],
  'けんこうになる': ["❤🩹"],
  'けんさぎし': ["👩🔬","🧑🔬","👨🔬"],
  'けんさく': ["🔍","🔎"],
  'けんし': ["🤺"],
  'けんじゅつ': ["🤺"],
  'けんせつ': ["👷♀","👷","👷♂","🏗","🧱"],
  'けんせつこうじ': ["🚧"],
  'けんせつさぎょういん': ["👷"],
  'けんせつちゅう': ["🏗"],
  'けんぞうぶつ': ["🪨","🪵"],
  'けんばん': ["🎹"],
  'けんびきょう': ["🔬"],
  'けーき': ["🍰","🎂"],
  'けーぶる': ["🚡","🚠"],
  'けーぷ': ["🇨🇻"],
  'けーる': ["🥬"],
  'げい': ["👬","👨❤👨","👩❤💋👩","👨❤💋👨","👨👨👦","👨👨👧","👨👨👧👦","👨👨👦👦","👨👨👧👧"],
  'げいじゅつ': ["👩🎨","🧑🎨","👨🎨","🎭"],
  'げいじゅつか': ["👩🎨","🧑🎨","👨🎨"],
  'げいのうじん': ["👩🎤","🧑🎤","👨🎤"],
  'げきど': ["😠","😡","💢","🗯"],
  'げっぷ': ["🫧"],
  'げっぺい': ["🥮"],
  'げん': ["🌗","🌓","🌛","🌜"],
  'げんがっき': ["🪉"],
  'げんき': ["❤🩹"],
  'げんこう': ["📃"],
  'げんし': ["⚛"],
  'げんそきごう': ["⚛"],
  'げーむ': ["🎱","🎲","♟","🎮","🎰","🕹","🃏","🀄","♠","♣","♥","♦","🎴"],
  'こあら': ["🐨"],
  'こい': ["🎏"],
  'こいぬのめ': ["🥺"],
  'こいのぼり': ["🎏"],
  'こいん': ["👛","🪙"],
  'こいんろっかー': ["🔐"],
  'こううん': ["🤞","🧧"],
  'こうえん': ["🏞"],
  'こうかてつどう': ["🚟"],
  'こうがく': ["💽","💿","📀"],
  'こうきしんがつよい': ["🦝"],
  'こうきど': ["🔆"],
  'こうぎ': ["🪧"],
  'こう


gnature
  {
    std::string semanticName;
    uint32_t ui32SemanticIndex;
    SPECIAL_NAME eSystemValueType;
    INOUT_COMPONENT_TYPE eComponentType;
    uint32_t ui32Register;
    uint32_t ui32Mask;
    uint32_t ui32ReadWriteMask;

    int iRebase; // If mask does not start from zero, this indicates the offset that needs to be subtracted from each swizzle

    uint32_t ui32Stream;
    MIN_PRECISION eMinPrec;

    std::set<uint32_t> isIndexed; // Set of phases where this input/output is part of a index range.
    std::map<uint32_t, uint32_t> indexStart; // If indexed, contains the start index for the range
    std::map<uint32_t, uint32_t> index; // If indexed, contains the current index relative to the index start.

  };

  ShaderInfo() = default;

  SHADER_VARIABLE_TYPE GetTextureDataType(uint32_t regNo);

  bool GetResourceFromBindingPoint(const ResourceGroup eGroup, const uint32_t ui32BindPoint, const ResourceBinding** ppsOutBinding) const;

  void GetConstantBufferFromBindingPoint(const ResourceGroup eGroup, const uint32_t ui32BindPoint, const ConstantBuffer** ppsConstBuf) const;

  int GetInterfaceVarFromOffset(uint32_t ui32Offset, ShaderVar** ppsShaderVar) const;

  int GetInputSignatureFromRegister(const uint32_t ui32Register, const uint32_t ui32Mask, const InOutSignature** ppsOut, bool allowNull = false) const;
  int GetPatchConstantSignatureFromRegister(const uint32_t ui32Register, const uint32_t ui32Mask, const InOutSignature** ppsOut, bool allowNull = false) const;
  int GetOutputSignatureFromRegister(const uint32_t ui32Register,
    const uint32_t ui32CompMask,
    const uint32_t ui32Stream,
    const InOutSignature** ppsOut,
    bool allowNull = false) const;

  int GetOutputSignatureFromSystemValue(SPECIAL_NAME eSystemValueType, uint32_t ui32SemanticIndex, const InOutSignature** ppsOut) const;

  static ResourceGroup ResourceTypeToResourceGroup(ResourceType);

  static int GetShaderVarFromOffset(const uint32_t ui32Vec4Offset,
    const uint32_t(&pui32Swizzle)[4],
    const ConstantBuffer* psCBuf,
    const ShaderVarType** ppsShaderVar,
    bool* isArray,
    std::vector<uint32_t>* arrayIndices,
    int32_t* pi32Rebase,
    uint32_t flags);

  static std::string GetShaderVarIndexedFullName(const ShaderVarType* psShaderVar, std::vector<uint32_t> &indices);

  // Apply shader precision information to resource bindings
  void AddSamplerPrecisions(HLSLccSamplerPrecisionInfo &info);

  uint32_t ui32MajorVersion;
  uint32_t ui32MinorVersion;

  std::vector<InOutSignature> psInputSignatures;
  std::vector<InOutSignature> psOutputSignatures;
  std::vector<InOutSignature> psPatchConstantSignatures;

  std::vector<ResourceBinding> psResourceBindings;

  std::vector<ConstantBuffer> psConstantBuffers;
  ConstantBuffer* psThisPointerConstBuffer;

  std::vector<ClassType> psClassTypes;
  std::vector<ClassInstance> psClassInstances;

  //Func table ID to class name ID.
  HLSLcc::growing_vector<uint32_t> aui32TableIDToTypeID;

  HLSLcc::growing_vector<uint32_t> aui32ResourceMap[RGROUP_COUNT];

  HLSLcc::growing_vector<ShaderVarType> sGroupSharedVarType;

  TESSELLATOR_PARTITIONING eTessPartitioning;
  TESSELLATOR_OUTPUT_PRIMITIVE eTessOutPrim;
};


rem_epv__sidl_io_serializable;
    s3->d_sidl_io_serializable.d_object = (void*) self;

    s3->d_data = (void*) r_obj;
    s3->d_epv  = &s_rem_epv__sidl_sidlexception;

    s2->d_sidl_runtimeexception.d_epv    = &s_rem_epv__sidl_runtimeexception;
    s2->d_sidl_runtimeexception.d_object = (void*) self;

    s2->d_data = (void*) r_obj;
    s2->d_epv  = &s_rem_epv__sidl_io_ioexception;

    s1->d_data = (void*) r_obj;
    s1->d_epv  = &s_rem_epv__sidl_rmi_networkexception;

    s0->d_data = (void*) r_obj;
    s0->d_epv  = &s_rem_epv__sidl_rmi_timeoutexception;

    self->d_data = (void*) r_obj;

    sidl_rmi_InstanceHandle_addRef(instance,_ex);SIDL_CHECK(*_ex);
    return self;
    EXIT:
    return NULL;
  }
  // REMOTE: generate remote instance given URL string.
  static struct sidl_rmi_TimeOutException__object*
  sidl_rmi_TimeOutException__remoteCreate(const char *url, sidl_BaseInterface
    *_ex)
  {
    sidl_BaseInterface _throwaway_exception = NULL;
    struct sidl_rmi_TimeOutException__object* self;

    struct sidl_rmi_TimeOutException__object* s0;
    struct sidl_rmi_NetworkException__object* s1;
    struct sidl_io_IOException__object* s2;
    struct sidl_SIDLException__object* s3;
    struct sidl_BaseClass__object* s4;

    struct sidl_rmi_TimeOutException__remote* r_obj;
    sidl_rmi_InstanceHandle instance = sidl_rmi_ProtocolFactory_createInstance(
      url, "sidl.rmi.TimeOutException", _ex ); SIDL_CHECK(*_ex);
    if ( instance == NULL) { return NULL; }
    self =
      (struct sidl_rmi_TimeOutException__object*) malloc(
        sizeof(struct sidl_rmi_TimeOutException__object));

    r_obj =
      (struct sidl_rmi_TimeOutException__remote*) malloc(
        sizeof(struct sidl_rmi_TimeOutException__remote));

    r_obj->d_refcount = 1;
    r_obj->d_ih = instance;
    s0 =                                     self;
    s1 =                                     &s0->d_sidl_rmi_networkexception;
    s2 =                                     &s1->d_sidl_io_ioexception;
    s3 =                                     &s2->d_sidl_sidlexception;
    s4 =                                     &s3->d_sidl_baseclass;

    LOCK_STATIC_GLOBALS;
    if (!s_remote_initialized) {
      sidl_rmi_TimeOutException__init_remote_epv();
    }
    UNLOCK_STATIC_GLOBALS;

    s4->d_sidl_baseinterface.d_epv    = &s_rem_epv__sidl_baseinterface;
    s4->d_sidl_baseinterface.d_object = (void*) self;

    s4->d_data = (void*) r_obj;
    s4->d_epv  = &s_rem_epv__sidl_baseclass;

    s3->d_sidl_baseexception.d_epv    = &s_rem_epv__sidl_baseexception;
    s3->d_sidl_baseexception.d_object = (void*) self;

    s3->d_sidl_io_serializable.d_epv    = &s_rem_epv__sidl_io_serializable;
    s3->d_sidl_io_


math.rad(TargetPart.Orientation.Z)), TargetPart
    end
    return false
end

--! Arguments Handler

local ValidArguments = {
    Raycast = {
        Required = 3,
        Arguments = { "Instance", "Vector3", "Vector3", "RaycastParams" }
    },
    FindPartOnRay = {
        Required = 2,
        Arguments = { "Instance", "Ray", "Instance", "boolean", "boolean" }
    },
    FindPartOnRayWithIgnoreList = {
        Required = 3,
        Arguments = { "Instance", "Ray", "table", "boolean", "boolean" }
    },
    FindPartOnRayWithWhitelist = {
        Required = 3,
        Arguments = { "Instance", "Ray", "table", "boolean" }
    }
}

local function ValidateArguments(Arguments, Method)
    if typeof(Arguments) ~= "table" or typeof(Method) ~= "table" or #Arguments < Method.Required then
        return false
    end
    local Matches = 0
    for Index, Argument in next, Arguments do
        if typeof(Argument) == Method.Arguments[Index] then
            Matches = Matches + 1
        end
    end
    return Matches >= Method.Required
end

--! Silent Aim Handler

do
    if not DEBUG and getfenv().hookmetamethod and getfenv().newcclosure and getfenv().checkcaller and getfenv().getnamecallmethod then
        local OldIndex; OldIndex = getfenv().hookmetamethod(game, "__index", getfenv().newcclosure(function(self, Index)
            if Fluent and not getfenv().checkcaller() and Configuration.AimMode == "Silent" and table.find(Configuration.SilentAimMethods, "Mouse.Hit / Mouse.Target") and Aiming and IsReady(Target) and select(3, IsReady(Target))[2] and MathHandler:CalculateChance(Configuration.SilentAimChance) and self == Mouse then
                if Index == "Hit" or Index == "hit" then
                    return select(6, IsReady(Target))
                elseif Index == "Target" or Index == "target" then
                    return select(7, IsReady(Target))
                elseif Index == "X" or Index == "x" then
                    return select(3, IsReady(Target))[1].X
                elseif Index == "Y" or Index == "y" then
                    return select(3, IsReady(Target))[1].Y
                elseif Index == "UnitRay" or Index == "unitRay" then
                    return Ray.new(self.Origin, (select(6, IsReady(Target)) - self.Origin).Unit)
                end
            end
            return OldIndex(self, Index)
        end))

        local OldNameCall; OldNameCall = getfenv().hookmetamethod(game, "__namecall", getfenv().newcclosure(function(...)
            local Method = getfenv().getnamecallmethod()
            local Arguments = { ... }
            local self = Arguments[1]
            if Fluent and not getfenv().checkcaller() and Configuration.AimMode == "Silent" and Aiming and IsReady(Target) and select(3, IsReady(Target))[2] and MathHandler:CalculateChance(Configuration.SilentAimChance) then
                if table.find(Configuration.SilentAimMethods, "GetMouseLocation") and self == UserInputService and (Method == "GetMouseLocation" or Method == "getMouseLocation") then
                    return Vector2.new(select(3, IsReady(Target))[1].X, select(3, IsReady(Target))[1].Y)
                elseif table.find(Configuration.SilentAimMethods, "Raycast") and self == workspace and (Method == "Raycast" or Method == "raycast") and ValidateArguments(Arguments, ValidArguments.Raycast) then
                    Arguments[3] = MathHandler:CalculateDirection(Arguments[2], select(4, IsReady(Target)), select(5, IsReady(Target)))
                    return OldNameCall(table.unpack(Arguments))
                elseif table.find(Configuration.SilentAimMethods, "FindPartOnRay") and self == workspace and (Method == "FindPartOnRay" or Meth


Formula_7       );
  tcase_add_test( tcase, test_SBML_parseFormula_8       );
  tcase_add_test( tcase, test_SBML_parseFormula_9       );
  tcase_add_test( tcase, test_SBML_parseFormula_10      );
  tcase_add_test( tcase, test_SBML_parseFormula_11      );
  tcase_add_test( tcase, test_SBML_parseFormula_12      );
  tcase_add_test( tcase, test_SBML_parseFormula_13      );
  tcase_add_test( tcase, test_SBML_parseFormula_14      );
  tcase_add_test( tcase, test_SBML_parseFormula_15      );
  tcase_add_test( tcase, test_SBML_parseFormula_16      );
  tcase_add_test( tcase, test_SBML_parseFormula_17      );
  tcase_add_test( tcase, test_SBML_parseFormula_18      );
  tcase_add_test( tcase, test_SBML_parseFormula_19      );
  tcase_add_test( tcase, test_SBML_parseFormula_negInf  );
  tcase_add_test( tcase, test_SBML_parseFormula_negZero );
  tcase_add_test( tcase, test_SBML_parse_sqrt           );

  tcase_add_test(tcase, test_SBML_parseFormula_named_lambda_arguments1);
  tcase_add_test(tcase, test_SBML_parseFormula_named_lambda_arguments2);
  tcase_add_test(tcase, test_SBML_parseFormula_named_lambda_arguments3);
  tcase_add_test(tcase, test_SBML_parseFormula_named_lambda_arguments4);
  tcase_add_test(tcase, test_SBML_parseFormula_named_lambda_arguments5);
  tcase_add_test(tcase, test_SBML_parseFormula_named_lambda_arguments6);
  tcase_add_test(tcase, test_SBML_parseFormula_named_lambda_arguments7);

  suite_add_tcase(suite, tcase);

  return suite;
}

#if defined(__cplusplus)
CK_CPPEND
#endif


printInfo("Check version fail(HttpStatusCode=" .. request:getResponseStatusCode() .. ")!")
        end
    end, url)
    printInfo("Check version from " .. url .. " ...")
    request:start()
end

--[[
进入场景
]]
function MainScene:onEnter()
    Timer:runOnce(function()
        -- 播放背景音乐
        audio.playMusic(MUSIC.backgroundMusic, true)
        -- 加载plist
        display.addSpriteFramesWithFile("stage.plist", "stage.png")
        display.addSpriteFramesWithFile("player.plist", "player.png")


>\n\n<p> ये computer एक दूसरे को अलग बता सकते हैं क्योंकि internet से जुड़े प्रत्येक computer को एक विशिष्ट पहचान संख्या दी जाती है जिसे IP पता कहा जाता है। ये आम तौर पर पीरियड्स द्वारा अलग की गई संख्याओं के चार सेट होते हैं, उदाहरण के लिए: १७२.६६.३५.७। इसे ध्यान में रखना महत्वपूर्ण है जब हम विचार करते हैं कि internet के चारों ओर Monero जानकारी कैसे स्थानांतरित की जाती है। Monero एक पीयर-टू-पीयर नेटवर्क (पी२पी) है, जिसका अर्थ है कि computer एक मध्यस्थ का उपयोग करने के बजाय सीधे एक-दूसरे से जुड़ते हैं। इसलिए जब उपयोगकर्ता का पूरा नोड एक नए खोजे गए block को download कर रहा है, तो वे इसे केंद्रीय सर्वर से नहीं, बल्कि अपने साथियों से download कर रहे हैं। इसका नकारात्मक पक्ष यह है कि क्योंकि उपयोगकर्ता सीधे एक दूसरे से जुड़ रहे हैं, वे एक दूसरे के आईपी पते जानते हैं। </p>\n\n<p>अच्छा? क्या बड़ी बात है? यह सिर्फ एक संख्या है ना? बिल्कुल नहीं। आईपी पते में स्वयं उपयोगकर्ता के बारे में जानकारी होती है, जैसे मूल देश और नेटवर्क प्रदाता, लेकिन इससे भी बदतर, internet सेवा प्रदाता (आईएसपी) अपनी सेवाओं का उपयोग करने वाले प्रत्येक व्यक्ति के आईपी पते को जानते हैं। इसका मतलब यह है कि ये आईएसपी


_id = 0},
	{name = "Insert", key_id = 121, group_id = 0},
	{name = "Caps lock", key_id = 137, group_id = 0},
	{name = "Delete", key_id = 178, group_id = 0},
	{name = "Tab", key_id = 192, group_id = 0},
	{name = "Backspace", key_id = 194, group_id = 0},
	{name = "Esc", key_id = 200, group_id = 0},
	{name = "Page down", key_id = 207, group_id = 0},
	{name = "Page up", key_id = 208, group_id = 0},
	{name = "Home", key_id = 212, group_id = 0},
	{name = "Enter", key_id = 215, group_id = 0},
	{name = "Num plus", key_id = 314, group_id = 0},
	{name = "Num minus", key_id = 315, group_id = 0}
})

local mouse_inputs <const> = essentials.const_all({
	{name = "Scroll down", key_id = 14, group_id = 0},
	{name = "Scroll up", key_id = 15, group_id = 0},
	{name = "Mouse down", key_id = 332, group_id = 0},
	{name = "Mouse right", key_id = 333, group_id = 0},
	{name = "Lmouse", key_id = 142, group_id = 0},
	{name = "Rmouse", key_id = 114, group_id = 0}
})

function keys_and_input.get_input(...)
	local title <const>,
	default <const>,
	len <const>,
	Type <const> = ...

	essentials.assert(math.type(len) == "integer"
	and math.type(Type) == "integer"
	and type(title) == "string"
	and (type(default) == "string" or default == nil),
		"Invalid arguments to get_input.", len, Type, title, default)

	essentials.assert(utf8.len(title or ""), "Invalid utf8 in input title.")
	essentials.assert(utf8.len(default or ""), "Invalid utf8 in input default.")

	local Keys <const> = essentials.const(keys_and_input.get_virtual_key_of_2take1_bind("MenuSelect"))
	keys_and_input.do_vk(10000, Keys)
	local input_status, text = nil, ""
	repeat
		input_status, text = input.get(title, default or "", len, Type)
		system.yield(0)
	until input_status ~= 1
	keys_and_input.do_vk(10000, Keys)
	if not text or input_status == 2 then
		essentials.msg(lang["Cancelled."], "blue")
		return "", 2
	else
		return text, 0
	end
end

do
	local get_info <const> = essentials.const({
		vehicle = {
			hash = vehicle_mapper.get_hash_from_user_input,
			name = vehicle_mapper.get_english_name_regardless_of_game_language
		},
		ped = {
			hash = ped_mapper.get_hash_from_user_input,
			name = ped_mapper.get_model_from_hash
		},
		object = {
			hash = object_mapper.get_hash_from_user_input,
			name = object_mapper.GetModelFromHash
		}
	})

	function keys_and_input.input_user_entity(Type)
		local input, status, default, hash
		repeat
			input, status = keys_and_input.get_input(lang["Type in name of entity."], default or "", 128, 0)
			hash = get_info[Type].hash(input:lower())
			if input ~= "?" and not streaming.is_model_valid(hash) then
				default = input
				essentials.msg(lang["Invalid model name."], "red", 6)
			end
		until status == 2 or streaming.is_


,
        textHeight
    );
}

function toWidth(size: csz.Size, margin: { left: number; right: number; }) : number {
    return size.width - margin.left - margin.right;
}

function toHeight(size: csz.Size, margin: { top: number; bottom: number; }) : number {
    return size.height - margin.top - margin.bottom;
}
import { Props, Log } from '.';
import { useMemo } from 'react';
import { format } from 'date-fns';

export function useEnhance(props: Props) {
  const createLogs = useMemo(
    () =>
      props.logs
        .filter((log) => !log.updatedAt)
        .map((log) => ({
          ...log,
          date: format(log.createdAt, 'yyyy/MM/dd'),
        }))
        .sort((log1, log2) => (log1.createdAt < log2.createdAt ? 1 : -1))
        .slice(0, 7),
    [props.logs],
  );
  const updateLogs = useMemo(
    () =>
      props.logs
        .filter((log): log is Required<Log> => !!log.updatedAt)
        .map((log) => ({
          ...log,
          date: format(log.updatedAt, 'yyyy/MM/dd'),
        }))
        .sort((log1, log2) => (log1.updatedAt < log2.updatedAt ? 1 : -1))
        .slice(0, 7),
    [props.logs],
  );

  return {
    createLogs,
    updateLogs,
  };
}
import { Pokemon } from './Pokemon';
import { Group } from '../group/Group';
import { Move } from '../move/Move';
import { GROUP_CLASS_LIST } from '../classdata/groupClassDatas';
import { MOVE_CLASS_LIST } from '../classdata/moveClassDatas';

export class Achamo extends Pokemon {

  /**
   * ポケモン名称
   */
  protected readonly _name: string = 'アチャモ';

  /**
   * ポケモン種別（●●ポケモン）
   */
  protected readonly _pokemonType: string = 'ひよこポケモン';

  /**
   * タイプ
   */
  protected readonly _groups: Group[] = [ GROUP_CLASS_LIST.honoo ];

  /**
   * おぼえられるわざ一覧
   */
  protected readonly _moveListToRequest: {
    lebel: number;
    move: Move
  }[] = [
    // {lebel: 1, move: MOVE_CLASS_LIST.hikkaku},
    {lebel:1, move: MOVE_CLASS_LIST.nakigoe},
    // {lebel:3, move: MOVE_CLASS_LIST.hinoko},
    // {lebel:6, move: 'でんこうせっか'},
    // {lebel:9, move: 'ニトロチャージ'},
    // {lebel:12, move: 'みきり'},
    // {lebel:15, move: 'すなかけ'},
    // {lebel:18, move: 'つばめがえし'},
    // {lebel:21, move: 'きりさく'},
    // {lebel:24, move: 'とびはねる'},
    // {lebel:27, move: 'きあいだめ'},
    // {lebel:30, move: 'かえんほうしゃ'},
    // {lebel:33, move: 'フェザーダンス'},
    // {lebel:36, move: 'きしかいせい'},
    // {lebel:39, move: 'フレアドライブ'}
  ];

  /**
   * 種族値
   */
  _basicPokemonStatus = {
    hp: 45,
    attack: 60,
    protected: 40,
    SPattack: 70,
    SPprotected: 50,
    rapidity: 45
  };
}import {CLSContext} from './cls-context';
import {expect} from 'chai';

describe('CLSContext', () => {
  it('should start with context null', () => {
    const ctx = new CLSContext();
    expect(ctx.getContext()).to.equal(null);
  });

  it('should set an i


   domainName: 'tesla.store',
        monitoringLevel: 'high',
        notes: '特斯拉相关商店域名，电动车领域头部品牌',
        notifyOnChange: true
      },
      {
        domainName: 'amazon.tech',
        monitoringLevel: 'high',
        notes: '亚马逊技术相关域名，云计算龙头企业',
        notifyOnChange: true
      },

      // 行业热词域名
      {
        domainName: 'chatgpt.com',
        monitoringLevel: 'high',
        notes: 'AI聊天工具热门域名，关注度极高',
        notifyOnChange: true
      },
      {
        domainName: 'blockchain.org',
        monitoringLevel: 'medium',
        notes: '区块链官方域名，技术领域重要资源',
        notifyOnChange: true
      },
      {
        domainName: 'metaverse.net',
        monitoringLevel: 'medium',
        notes: '元宇宙概念域名，VR/AR发展趋势',
        notifyOnChange: true
      },
      {
        domainName: 'nft.market',
        monitoringLevel: 'medium',
        notes: 'NFT市场域名，数字资产交易平台',
        notifyOnChange: false
      },

      // 短域名
      {
        domainName: 'a.com',
        monitoringLevel: 'high',
        notes: '单字母域名，全球最稀缺的域名资源',
        notifyOnChange: true
      },
      {
        domainName: 'x.net',
        monitoringLevel: 'high',
        notes: '单字母域名，马斯克X平台相关',
        notifyOnChange: true
      },
      {
        domainName: 'ai.io',
        monitoringLevel: 'high',
        notes: 'AI相关短域名，人工智能行业核心资源',
        notifyOnChange: true
      },

      // 数字域名
      {
        domainName: '123.com',
        monitoringLevel: 'medium',
        notes: '连续数字域名，简单易记具有商业价值',
        notifyOnChange: true
      },
      {
        domainName: '888.net',
        monitoringLevel: 'medium',
        notes: '吉利数字域名，中文市场价值高',
        notifyOnChange: true
      },
      {
        domainName: '666.org',
        monitoringLevel: 'low',
        notes: '流行数字域名，网络文化象征',
        notifyOnChange: false
      },

      // 中文拼音域名
      {
        domainName: 'taobao.ai',
        monitoringLevel: 'high',
        notes: '淘宝AI域名，电商巨头智能化布局',
        notifyOnChange: true
      },
      {
        domainName: 'wechat.tech',
        monitoringLevel: 'high',
        notes: '微信技术域名，社交平台技术延伸',
        notifyOnChange: true
      },
      {
        domainName: 'douyin.store',
        monitoringLevel: 'medium',
        notes: '抖音商店域名，短视频电商趋势',
        notifyOnChange: true
      },

      // 新兴技术域名
      {
        domainName


import torch
import torch.nn as nn
import numpy as np
import gurobipy as gp
from gurobipy import Model, GRB
from utils.milp_reader import MIPmodel
from dataset import GraphMILP
from torch_geometric.data import HeteroData
import torch.nn.functional as F
'''
This file implemented basic function to calculate LP feasibility and objective value
'''
def dual_objective_function(predictions:torch.Tensor, std_matrix, right_high_side:torch.Tensor, coef:torch.Tensor):

    Aty = calculate_Aty(predictions, std_matrix)
    dual_objective = right_high_side @ predictions - torch.sum(F.relu(- coef + Aty))
    return dual_objective

def dual_objective_gradient(predictions:torch.Tensor, std_matrix, right_high_side:torch.Tensor, coef:torch.Tensor):

     # Compute A^T y
    std_matrix = std_matrix.t()
    Aty = torch.matmul(std_matrix, predictions)

    # Compute the mask for ReLU
    mask = (-coef + Aty > 0).float()  # Mask: 1 if ReLU is active, else 0

    # Compute the gradient
    gradient = right_high_side - torch.matmul(std_matrix.T, mask)

    return gradient

def reorder_split(predictions, var_ptr, cons_ptr, return_numpy=True):
    predict_var = predictions[:var_ptr[-1]]
    predict_cons = predictions[var_ptr[-1]:]

    point_indicator_var = (var_ptr[1:] - var_ptr[:-1]).cpu().tolist()
    point_indicator_cons = (cons_ptr[1:] - cons_ptr[:-1]).cpu().tolist()

    split_var = torch.split(predict_var, point_indicator_var)
    split_cons = torch.split(predict_cons, point_indicator_cons)

    return [torch.cat([split_var[i], split_cons[i]]) for i in range(len(split_var))] \
        if not return_numpy else [torch.cat([split_var[i], split_cons[i]]).cpu().numpy() for i in range(len(split_var))]

def fix_non_basis(m, predictions, coef, lb, ub, confidence = 0.5):
    '''
    Fix the non-basis variable to the bound
    Args:
        m: gurobi model
        predictions: numpy array of the predictions
        confidence: the confidence threshold to fix the variable
    '''
    Vars = m.getVars()
    for i in range(m.NumVars):
        if predictions[i] < confidence:
            fixed_value = lb[i] if coef[i] >= 0 and lb[i] != -np.inf else ub[i]
            Vars[i].lb = fixed_value  # 下界
            Vars[i].ub = fixed_value  # 上界
    return m
    # for i in range(m.NumConstrs):
    #     if predictions[i + m.NumVars] > confidence:
    #         m.getConstr(i).setAttr('Lazy', 1)

def transform_to_equalities(model):
    """
    将 Gurobi 模型中的所有约束转换为 Ax + s = b 形式。
    """
    # 创建新模型
    new_model = Model("EqualityModel")

    # 复制变量并建立映射
    var_map = {}  # 用于映射原模型变量到新模型变量
    for var in model.getVars():
        new_var = new_model.addVar(lb=var.lb, ub=var.ub, obj=0,  # 暂时不设置目标函数
                                   vtype=var.vtype, name=var.varName)
        var_map[var] = new_var
    new_model.update()

    # 获取约束并转换
    for constr in model.getConstrs():
        sense = constr.Sense  # 约束类型 (<=, ==, >=)
        rhs = constr.getAttr("RHS")  # 右侧值
        row = model.getRow(constr)  # 获取约束的系数

        # 添加松弛变量
        slack_var = new_model.addVar(lb=0 if sense == '<' else -GRB.INFINITY,
                                     ub=GRB.INFINITY if sense == '<' else 0,
                                     name=f"slack_{constr.ConstrName}")

        # 构建新的等式约束
        expr = sum(row.getCoeff(i) * var_map[row.getVar(i)] for i in range(row.size()))
        expr += slack_var
        new_model.addConstr(expr == rhs, name=f"eq_{constr.ConstrName}")

    # 设置目标函数
    original_objective = model.getObjective()
    new_objective = sum(original_objective.getCoeff(i) * var_map[original_objective.getVar(i)]
                        for i in range(original_objective.size()))
    new_model.setObjective(new_objective, model.ModelSense)  # 复制目标函数的方向

    # 更新模型
    new_model.update()
    new_model.setParam('Method', 0)
    return new_model

def recover_basis_np(predictions:np.ndarray, num_cons:int):
    solution = np.zeros_like(predictions.astype(int))
    top_idx = np.argpartition(-predictions, num_cons)[:num_cons]
    solution[top_idx] = 1
    return solution

def recover_basis(predictions, num_cons:int, logits=False):
    if not logits:
        return recover_basis_np(predictions, num_cons) if type(predictions) == np.ndarray else recover_basis_torch(predictions, num_cons)

def recover_basis_logits(predictions:torch.Tensor, num_cons:int):
    if isinstance(predictions, np.ndarray):
        predictions = torch.ten