/*
 * FreeRTOS Kernel V10.0.0
 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software. If you wish to use our Amazon
 * FreeRTOS name, please do so in a fair use way that does not cause confusion.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * http://www.FreeRTOS.org
 * http://aws.amazon.com/freertos
 *
 * 1 tab == 4 spaces!
 */

#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H

/*-----------------------------------------------------------
 * Application specific definitions.
 *
 * These definitions should be adjusted for your particular hardware and
 * application requirements.
 *
 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
 *
 * See http://www.freertos.org/a00110.html.
 *----------------------------------------------------------*/

/* Ensure stdint is only used by the compiler, and not the assembler. */
#if defined( __ICCARM__)||defined( __CC_ARM)||defined( __GNUC__)
	#include <stdint.h>
	extern uint32_t SystemCoreClock;
#endif

#define configUSE_PREEMPTION			1
#define configUSE_IDLE_HOOK				0
#define configUSE_TICK_HOOK				0
#define configCPU_CLOCK_HZ				( SystemCoreClock )
#define configTICK_RATE_HZ				( ( TickType_t ) 1000 )//ϵͳƵʣ1KhzҲ1MSһ
#define configMAX_PRIORITIES			( 5 )//5ȼ
#define configMINIMAL_STACK_SIZE		( ( unsigned short ) 130 )
#define configTOTAL_HEAP_SIZE			( ( size_t ) ( 75 * 1024 ) )//ѣʹFreeRtosڴ䷽Żõ
#define configMAX_TASK_NAME_LEN			( 10 )
#define configUSE_TRACE_FACILITY		1
#define configUSE_16_BIT_TICKS			0
#define configIDLE_SHOULD_YIELD			1
#define configUSE_MUTEXES				1
#define configQUEUE_REGISTRY_SIZE		8
#define configCHECK_FOR_STACK_OVERFLOW	0//2
#define configUSE_RECURSIVE_MUTEXES		1
#define configUSE_MALLOC_FAILED_HOOK	0
#define configUSE_APPLICATION_TASK_TAG	0
#define configUSE_COUNTING_SEMAPHORES	1
#define configGENERATE_RUN_TIME_STATS	0

/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 		0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )

/* Software timer definitions. */
#define configUSE_TIMERS				1
#define configTIMER_TASK_PRIORITY		( 2 )
#define configTIMER_QUEUE_LENGTH		10
#define configTIMER_TASK_STACK_DEPTH	( configMINIMAL_STACK_SIZE * 2 )

/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet		1
#define INCLUDE_uxTaskPriorityGet		1
#define INCLUDE_vTaskDelete				1
#define INCLUDE_vTaskCleanUpResources	1
#define INCLUDE_vTaskSuspend			1
#define INCLUDE_vTaskDelayUntil			1
#define INCLUDE_vTaskDelay				1

/* Cortex-M specific definitions. */
#ifdef __NVIC_PRIO_BITS
	/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
	#define configPRIO_BITS       		__NVIC_PRIO_BITS
#else
	#define configPRIO_BITS       		4        /* 15 priority levels */
#endif

/* The lowest interrupt priority that can be used in a call to a "set priority"
function. */
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY			0xf

/* The highest interrupt priority that can be used by any interrupt service
routine that makes calls to interrupt safe FreeRTOS API functions.  DO NOT CALL
INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
PRIORITY THAN THIS! (higher priorities are lower numeric values. */
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY	5

/* Interrupt priorities used by the kernel port layer itself.  These are generic
to all Cortex-M


exRAM);
}

#elif defined(_sam_)

int flash_program_sector( uintptr_t addr, const void *data, size_t len )
{
	uint32_t ul_rc;

	if (((addr - IFLASH0_ADDR) % LOCK_REGION_SIZE) == 0) {
		/* Unlock page */
		ul_rc = flash_unlock(addr, addr+len-1, 0, 0);
		if (ul_rc != FLASH_RC_OK) {
			return ul_rc;
		}

		/* The EWP command is not supported for non-8KByte sectors in all devices
		 *  SAM4 series, so an erase command is required before the write operation.
		 */
		ul_rc = flash_erase_page(addr, IFLASH_ERASE_PAGES_16);
		if (ul_rc != FLASH_RC_OK) {
			return ul_rc;
		}
	}

	/* Write page */
	ul_rc = flash_write(addr, data, len, 0);
	return ul_rc;
}

#endif


 > durationCases = {

    DurationCase(
      "00h00m00s (1.11e-07 s)",
      nanoseconds( 111 ) ),

    DurationCase(
      "00h00m00s (0.000111 s)",
      microseconds( 111 ) ),

    DurationCase(
      "00h00m00s (0.111 s)",
      milliseconds( 111 ) ),

    DurationCase(
      "00h02m25s (145.016 s)",
      seconds( 145 ) + milliseconds( 16 ) ),

    DurationCase(
      "22h25m45s (80745.016 s)",
      hours( 20 ) + minutes( 145 ) + seconds( 45 ) + milliseconds( 16 ) ),

    DurationCase(
      "20d, 12h02m25s (1771345.016 s)",
      hours( long( 24 * 20.5 ) ) + seconds( 145 ) + milliseconds( 16 ) ),

    DurationCase(
      "20d, 12h02m25s (1771345.016 s)",
      Days( 20 ) + hours( 12 ) + seconds( 145 ) + milliseconds( 16 ) ),

    DurationCase(
      "1y, 0d, 00h00m00s (31556952 s)",
      Years( 1 ) ),

    DurationCase(
      "1y, 0d, 12h00m00s (31600152 s)",
      Years( 1 ) + hours( 12 ) ),

    DurationCase(
      "1y, 20d, 12h02m25s (33328297.016 s)",
      Years( 1 ) + hours( long( 24 * 20.5 ) ) + seconds( 145 ) + milliseconds( 16 ) ),

    DurationCase(
      "1y, 20d, 12h02m25s (33328297.016 s)",
      Years( 1 ) + Days( 20 ) + hours( 12 ) + seconds( 145 ) + milliseconds( 16 ) ),

    DurationCase(
      "12y, 362d, 05h49m12s (409981176 s)",
      Years( 13 ) - Days( 3 ) ),

    DurationCase(
      "13y, 365d, 05h48m12s (441797268 s)",
      Years( 14 ) - minutes( 1 ) ),

    DurationCase(
      "14y, 0d, 00h00m00s (441797328 s)",
      Years( 14 ) ),

    DurationCase(
      "14y, 0d, 12h00m00s (441840528 s)",
      Years( 14 ) + hours( 12 ) ),

    DurationCase(
      "100y, 20d, 12h02m25s (3157466545.016 s)",
      Years( 100 ) + Days( 20 ) + hours( 12 ) + seconds( 145 ) + milliseconds( 16 ) ),

    DurationCase(
      "292y, 20d, 12h02m25s (9216401329.016 s)",
      Years( 292 ) + Days( 20 ) + hours( 12 ) + seconds( 145 ) + milliseconds( 16 ) ),

    DurationCase(
      "5500y, 20d, 12h02m25s (173565007345 s)",
      Years( 5500 ) + Days( 20 ) + hours( 12 ) + seconds( 145 ) ),

    DurationCase(
      "-(00h00m00s) (-1.11e-07 s)",
      -nanoseconds( 111 ) ),

    DurationCase(
      "-(00h00m01s) (-1 s)",
      -seconds( 1 ) ),

    DurationCase(
      "-(00h02m25s) (-145.016 s)",
      -seconds( 145 ) - milliseconds( 16 ) ),

    DurationCase(
      "-(22h25m45s) (-80745.016 s)",
      -hours( 20 ) - minutes( 145 ) - seconds( 45 ) - milliseconds( 16 ) ),

    DurationCase(
      "-(5500y, 20d, 12h02m25s) (-173565007345 s)",
      -Years( 5500 ) - Days( 20 ) - hours( 12 ) - seconds( 145 ) ),

  };

  const SystemClock::duration maxDuration = SystemClock::duration::max();
  const string errorInfo = GEOS_FMT( "(Max possible duration = {} s)",
                                     duration_cast< seconds >( maxDuration ).count() );

  // Duration with more than 292 years are not supported by the SystemClock type.
  double maxSystemTime = duration_cast< seconds, double, std::ratio< 1 > >( SystemClock::duration::max() ).count();

  for( DurationCase const & durationCase : durationCases )
  {
    // testing "double" typed time (which has a limit that is way higher than the tests cases)
    EXPECT_STREQ( durationCase.m_expectedString.c_str(),
                  TimeFormatInfo::fromSeconds( durationCase.m_simD


led_ct_++;
          EXPECT_EQ(2U, got_touch_handle_enabled_ct_);
          EXPECT_EQ(2U, got_touch_handle_size_ct_);
          EXPECT_TRUE(got_quick_menu_);
          EXPECT_TRUE(got_quick_menu_command_);
          EXPECT_TRUE(got_quick_menu_dismissed_);
          EXPECT_FALSE(got_context_menu_);
        }
      }
      if (state.flags & CEF_THS_FLAG_ORIENTATION) {
        EXPECT_EQ(state.enabled, false);
        EXPECT_GE(state.orientation, 0);
        EXPECT_EQ(state.origin.x, 0);
        EXPECT_EQ(state.origin.y, 0);
        EXPECT_EQ(state.alpha, 0);
        touch_handle_flags_ |= CEF_THS_FLAG_ORIENTATION;
      }
      if (state.flags & CEF_THS_FLAG_ORIGIN) {
        EXPECT_EQ(state.enabled, false);
        EXPECT_EQ(state.orientation, 0);
        EXPECT_GT(state.origin.x, 0);
        EXPECT_GT(state.origin.y, 0);
        EXPECT_EQ(state.alpha, 0);
        touch_handle_flags_ |= CEF_THS_FLAG_ORIGIN;
      }
      if (state.flags & CEF_THS_FLAG_ALPHA) {
        EXPECT_EQ(state.enabled, false);
        EXPECT_EQ(state.orientation, 0);
        EXPECT_EQ(state.origin.x, 0);
        EXPECT_EQ(state.origin.y, 0);
        EXPECT_GE(state.alpha, 0);
        touch_handle_flags_ |= CEF_THS_FLAG_ALPHA;
      }
    }
  }

  // OSRTestHandler functions
  void CreateOSRBrowser(const CefString& url) {
    CefWindowInfo windowInfo;
    CefBrowserSettings settings;

    if (test_type_ != OSR_TEST_TRANSPARENCY) {
      // Explicitly set an opaque background color to disable transparency.
      settings.background_color = CefColorSetARGB(255, 255, 255, 255);
    }

#if defined(OS_WIN)
    windowInfo.SetAsWindowless(GetDesktopWindow());
#elif defined(OS_MAC)
    // An actual vies is needed only for the ContextMenu test. The menu runner
    // checks if the view is not nil before showing the context menu.
    if (test_type_ == OSR_TEST_CONTEXT_MENU)
      windowInfo.SetAsWindowless(osr_unittests::GetFakeView());
    else
      windowInfo.SetAsWindowless(kNullWindowHandle);
#elif defined(OS_LINUX)
    windowInfo.SetAsWindowless(kNullWindowHandle);
#else
#error "Unsupported platform"
#endif
    CefBrowserHost::CreateBrowser(windowInfo, this, url, settings, nullptr,
                                  nullptr);
  }

  CefRect GetScaledRect(const CefRect& rect) const {
    return client::LogicalToDevice(rect, scale_factor_);
  }

  int GetScaledInt(int value) const {
    return client::LogicalToDevice(value, scale_factor_);
  }

  CefRect GetElementBounds(const std::string& id) {
    ElementBoundsMap::const_iterator it = element_bounds_.find(id);
    if (it != element_bounds_.end()) {
      return it->second;
    }
    return CefRect();
  }

  static bool IsFullRepaint(const CefRect& rc, int width, int height) {
    return rc.width == width && rc.height == height;
  }

  static bool IsBackgroundInBuffer(const uint32* buffer,
                                   size_t size,
                                   uint32 rgba) {
    for (size_t i = 0; i < size; i++) {
      if (buffer[i] != rgba) {
        return false;
      }
    }


nce to create the corresponding `MultiAsset` value for a
	/// non-fungible asset.
	pub fn into_non_fungible_multiasset(self, instance: AssetInstance) -> MultiAsset {
		match self {
			AssetId::Concrete(class) => MultiAsset::ConcreteNonFungible { class, instance },
			AssetId::Abstract(class) => MultiAsset::AbstractNonFungible { class, instance },
		}
	}
}

/// List of non-wildcard fungible and non-fungible assets.
#[derive(Default, Clone, RuntimeDebug, Eq, PartialEq)]
pub struct Assets {
	/// The fungible assets.
	pub fungible: BTreeMap<AssetId, u128>,

	/// The non-fungible assets.
	// OPTIMIZE: Consider BTreeMap<AssetId, BTreeSet<AssetInstance>>
	//   or even BTreeMap<AssetId, SortedVec<AssetInstance>>
	pub non_fungible: BTreeSet<(AssetId, AssetInstance)>,
}

impl From<Vec<MultiAsset>> for Assets {
	fn from(assets: Vec<MultiAsset>) -> Assets {
		let mut result = Self::default();
		for asset in assets.into_iter() {
			result.saturating_subsume(asset)
		}
		result
	}
}

impl From<Assets> for Vec<MultiAsset> {
	fn from(a: Assets) -> Self {
		a.into_assets_iter().collect()
	}
}

impl From<MultiAsset> for Assets {
	fn from(asset: MultiAsset) -> Assets {
		let mut result = Self::default();
		result.saturating_subsume(asset);
		result
	}
}

impl Assets {
	/// New value, containing no assets.
	pub fn new() -> Self { Self::default() }

	/// An iterator over the fungible assets.
	pub fn fungible_assets_iter<'a>(&'a self) -> impl Iterator<Item=MultiAsset> + 'a {
		self.fungible.iter()
			.map(|(id, &amount)| match id.clone() {
				AssetId::Concrete(id) => MultiAsset::ConcreteFungible { id, amount },
				AssetId::Abstract(id) => MultiAsset::AbstractFungible { id, amount },
			})
	}

	/// An iterator over the non-fungible assets.
	pub fn non_fungible_assets_iter<'a>(&'a self) -> impl Iterator<Item=MultiAsset> + 'a {
		self.non_fungible.iter()
			.map(|&(ref class, ref instance)| match class.clone() {
				AssetId::Concrete(class) => MultiAsset::ConcreteNonFungible { class, instance: instance.clone() },
				AssetId::Abstract(class) => MultiAsset::AbstractNonFungible { class, instance: instance.clone() },
			})
	}

	/// An iterator over all assets.
	pub fn into_assets_iter(self) -> impl Iterator<Item=MultiAsset> {
		let fungible = self.fungible.into_iter()
			.map(|(id, amount)| match id {
				AssetId::Concrete(id) => MultiAsset::ConcreteFungible { id, amount },
				AssetId::Abstract(id) => MultiAsset::AbstractFungible { id, amount },
			});
		let non_fungible = self.non_fungible.into_iter()
			.map(|(id, instance)| match id {
				AssetId::Concrete(class) => MultiAsset::ConcreteNonFungible { class, instance },
				AssetId::Abstract(class) => MultiAsset::AbstractNonFungible { class, instance },
			});
		fungible.chain(non_fungible)
	}

	/// An iterator over all assets.
	pub fn assets_iter<'a>(&'a self) -> impl Iterator<Item=MultiAsset> + 'a {
		let fungible = self.fungible_assets_iter();
		let non_fungible = self.non_fungible_assets_iter();
		fungible.chain(non_fungible)
	}

	/// Mutate `self` to contain all given


-.05.18-.06.3-.02.08-.01.19-.01.19v1.75c0 .65.5 1.18 1.12 1.24l.13.01H12v-.25c0-.64-.49-1.18-1.12-1.24H9.75a.75.75 0 0 1-.1-1.5h1.1a2.75 2.75 0 0 1 2.75 2.58V17.5h1.75c.6 0 1.1-.41 1.22-.98l.02-.12.1-.84.82.2a2.5 2.5 0 0 0 2.48-4.07l-.12-.13-5.41-5.4ZM5 10.5a1.5 1.5 0 0 0-.14 3h.25v-.03l.14-.44.1-.25.1-.24.05-.11.14-.24.08-.14.15-.2.07-.1.11-.14.13-.15.15-.15a1.5 1.5 0 0 0-1.04-.78l-.15-.02L5 10.5Z\"/>") { } }
    public class AnimalTurtle : Icon { public AnimalTurtle() : base("AnimalTurtle", IconVariant.Regular, IconSize.Size24, "<path d=\"M11 6a6.14 6.14 0 0 1 5.8 4.12l.07.24.05.14h2.33a2.75 2.75 0 0 1 2.74 2.58v1.17c0 .92-.7 1.67-1.6 1.74h-1.77l.24.6c.35.84-.01 1.8-.81 2.21l-.14.07c-.16.06-.32.1-.5.12h-1.95c-.63 0-1.2-.33-1.51-.86l-.08-.14-.53-1.14h.05c-1.4.18-2.82.2-4.22.06l-.5-.06L8.14 18c-.3.61-.9 1-1.59 1h-1.8a1.75 1.75 0 0 1-1.62-2.41l.44-1.05A3.24 3.24 0 0 1 2 12.75c0-.38.28-.7.64-.74l.1-.01h1.89l.5-1.64A6.14 6.14 0 0 1 11 6Zm6.77 9.7c-.77.3-1.55.56-2.35.76l-.55.13.36.77c.03.05.07.09.12.11l.05.02h1.84a.25.25 0 0 0 .25-.27l-.02-.07L17 16h-.05l.42-.15.4-.16Zm-13.55 0 .4.14.38.14-.48 1.17a.25.25 0 0 0 .23.34h1.86a.25.25 0 0 0 .17-.14l.36-.76h.04c-1-.2-2-.51-2.96-.9ZM11 7.5a4.64 4.64 0 0 0-4.37 3.08l-.07.21-1.14 3.75.17.06a16.67 16.67 0 0 0 10.41.13l.41-.13.16-.06-1.13-3.75a4.64 4.64 0 0 0-4-3.27l-.23-.02H11ZM4.02 14l.15-.5h-.5l.02.05c.09.17.2.32.33.45Zm13.35-2 .76 2.5h2.12c.11 0 .21-.08.24-.2v-1.05c0-.65-.49-1.18-1.12-1.24h-.12L17.37 12Z\"/>") { } }
    public class AppFolder : Icon { public AppFolder() : base("AppFolder", IconVariant.Regular, IconSize.Size24, "<path d=\"M11


er b=2;

				System.out.println(a==b); // false
				System.out.println(a.equals(b)); // true

		// case 3:
				Integer x=new Integer(3);
				Integer y=x;

				System.out.println(x==y); // true
				System.out.println(x.equals(y)); // true

		// case 4
				Integer p=128;
				Integer q=128;
				System.out.println(p==q); // false
				System.out.println(p.equals(q)); // true

		// case 5 -128 to 127 is in cached memory so they point to same object without creating it instances.
				Integer s=50;
				Integer t=50;
				System.out.println(s==t); // true
				System.out.println(s.equals(t)); // true
    }
```

15. [**Generics in Java.**](https://youtu.be/XMvznsY02Mk)
16. [**isequals and hashcode in java by codingSimplified.**](https://youtu.be/X2AjBFZfFCY)
    - [**isequals and hashcode in java by AnujBhaiya.**](https://youtu.be/HRHMkQ9fWsM)
17. **% operator in JAVA :** **dividend % divisor** - Here two statement is needed to be taken care :-

    - ## **When Divedend < Divisor then answer is dividend.**
    - ## **When Divedend > Divisor then answer lie in between [0 to divisor-1].**

18. **Store 2 numbers in a number. (true only in +ve scenerio)**
    - To Inject B in A we ADD(+) **B\*INF** in A and store it in A, where INF is any number greater than A and B.
    - to extract old number i.e., A from modified A we do (A % INF).
    - to extract new number(Injected number) i.e., B from modified A we do (A / INF).
    ```java
    	int a=5;
    	int b=4;// number to be injected
    	int INF=9999;
    	a=a+(b*INF);
    	System.out.println(a%INF); // 5
    	System.out.println(a/INF); //4
    ```
19. **Comparator** : - ```Collections.sort(al,(a,b)-> scores[b]-scores[a]);```
- ```Arrays.sort(arr,(a,b)-> a.length()-b.length());```
- [Priority Queue](https://devwithus.com/java-priority-queue/#:~:text=What%20is%20Priority%20Queue%20in,represented%20by%20the%20PriorityQueue%20class.)
```java
// this is a PQ of ARRAY of size 2
Comparator<int[]> ShortDisFromOrigin = (int p1[], int p2[]) -> ((p1[0]*p1[0]) + (p1[1]*p1[1])) - ((p2[0]*p2[0]) + (p2[1]*p2[1]));
PriorityQueue<int[]> pq=new PriorityQueue<>(ShortDisFromOrigin);

// OR

PriorityQueue<int[]> pq=new PriorityQueue<>((int p1[], int p2[]) -> ((p1[0]*p1[0]) + (p1[1]*p1[1])) - ((p2[0]*p2[0]) + (p2[1]*p2[1])));
```

```java
Arrays.sort(arr,(x,y)-> (x.c < y.c) ? 1 : -1); // 1 signifies swap -1 says no swap so this DEScending order
```
## whenever u want to swap then pass 1 else -1 according to ur logic.

[See this Q](02.%20%20Algorithms/11.%20greedy%20algo/09.%20Fractional%20Knapsack)

```java
Arrays.sort(arr, new Comparator<Iteminfo>() {

    public int compare(Iteminfo o1, Iteminfo o2)
    {
            if(o2.c > o1.c) return 1;


2);
  }
  if (example.line3 != null) {
    lines.add(example.line3);
  }
  List<String> lastLine = lines.removeLast();
  for (List<String> setup in lines) {
    MockClientConnection mock = await mockCommandLine(setup);
    await mock.done;
    Expect.isNull(mock.recordedError);
    Expect.equals(0, mock.recordedExitCode);
  }
  MockClientConnection mock = await mockCommandLine(lastLine);
  if (kind == DiagnosticKind.socketVmConnectError) {
    await mock.done;
    Options options = Options.parse(lastLine);
    Sentence sentence = parseSentence(options.nonOptionArguments);
    NamedTarget target = sentence.targets.single;
    String message = mock.stderrMessages.single;
    String expectedMessage = new Diagnostic(
        kind, getMessage(kind),
        {DiagnosticParameter.address: target.name,
         DiagnosticParameter.message: '.*'})
        .formatMessage();
    Expect.stringEquals(
        message,
        new RegExp(expectedMessage).stringMatch(message));
  } else {
    Expect.isNotNull(mock.recordedError);
    Expect.equals(kind, mock.recordedError.kind, '${mock.recordedError}');
    // Ensure that the diagnostic can be turned into a formatted error message.
    String message = mock.recordedError.asDiagnostic().formatMessage();
    Expect.isNotNull(message);
  }
  Expect.equals(1, mock.recordedExitCode);
}

Future<MockClientConnection> mockCommandLine(List<String> arguments) async {
  print("Command line: ${arguments.join(' ')}");
  MockClientConnection client = new MockClientConnection();
  List<String> mainArgs =
    [dartinoVersion, '/current/dir', 'detached', '01234', null]
      ..addAll(arguments);
  await handleVerb(mainArgs, client, null, pool);
  return client;
}

class MockClientConnection implements ClientConnection {
  InputError recordedError;

  int recordedExitCode;

  final ClientLogger log = new MockClientLogger();

  final Completer mockCompleter = new Completer();

  final bool debug;

  final List<String> stderrMessages = <String>[];

  List<String> stdoutMessages;

  final StreamController<ClientCommand> controller =
      new StreamController<ClientCommand>();

  final Analytics analytics;

  ClientCommandSender commandSender;

  AnalyzedSentence sentence;

  MockClientConnection({bool shouldPromptForOptIn: false, this.debug: false})
      : analytics = new MockAnalytics(
          shouldPromptForOptInValue: shouldPromptForOptIn) {
    commandSender = new MockClientCommandSender(this);
  }

  get completer => mockCompleter;

  get done => completer.future;

  get commands => controller.stream;

  void sendCommandToWorker(ClientCommand command) {
    controller.add(command);
  }

  sendCommandToClient(ClientCommand command) {
    switch (command.code) {
      case ClientCommandCode.ExitCode:
        exit(command.data);
        break;

      case ClientCommandCode.Stderr:
        printLineOnStderr(mockStripNewline(UTF8.decode(command.data)));
        break;

      case ClientCommandCode.Stdout:
        printLineOnStdout(mockStripNewline(UTF8.decode(command.data)));
        break;

      default:
        throw "Unexpected command: ${command.code}";
    }
  }

  mockStripNewline(String line) {
    if (line.endsWith("\n")) {
      return line.substring(0, line.length - 1);
    } else {
      return line;
    }
  }

  endSession() {
    completer.complete(null);
  }

  mockPrintLine(String line) {
    if (!


});

                        // Create a marker and add it to the map.
                        new mapboxgl.Marker().setLngLat(feature.center).addTo(map);
                    });
            </script>

    <!DOCTYPE html>

        <link rel="stylesheet" href="./resources/style.css">

<!DOCTYPE html>

        <link rel="stylesheet" href="./resources/style.css">

<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SkillSync - Welcome</title>


33-4.188 5.933h8.027Z"/><path fill-rule="evenodd" d="M48 0H0v48h48V0ZM32.14 11.669l-.464.124 2.565-2.759a.995.995 0 011.12.455L40.053 17H42c0 4.418-3.358 8-7.5 8-4.142 0-7.5-3.582-7.5-8h1.474l3.665-5.331ZM13.62 31.218c4.142 0 7.5-3.582 7.5-8h-.935l-4.6-7.108 5.842-1.567A3.01 3.01 0 0023 15.829V38h-3v2h-6v2h20v-2h-6v-2h-3V15.83a3.001 3.001 0 002-2.782l4.672-1.254 2.564-2.758-7.875 2.112A3.006 3.006 0 0025 10.171V6h-2v4.17a3.004 3.004 0 00-1.97 2.409l-7.29 1.955a1 1 0 00-.557.39l-5.855 8.294H6.12c0 4.418 3.358 8 7.5 8Z" clip-rule="evenodd"/></g></svg>';
  static const String justice_outline =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" preserveAspectRatio="xMidYMid meet" viewBox="0 0 48 48"><path fill="currentColor" fill-rule="evenodd" d="M25 10.17c.492.175.925.473 1.262.859l7.99-1.998a1.004 1.004 0 01.83.156c.112.08.207.182.278.302L40.054 17H42v.003c0 .69-.082 1.359-.236 1.997-.833 3.45-3.77 6-7.264 6-3.495 0-6.431-2.55-7.264-6A8.523 8.523 0 0127 17h1.474l3.705-5.389-5.18 1.295L27 13a3.001 3.001 0 01-2 2.83V38h3v2h6v2H14v-2h6v-2h3V15.83a3.01 3.01 0 01-1.567-1.277l-5.846 1.559 4.598 7.106h.935v.003a8.51 8.51 0 01-.236 1.997c-.833 3.45-3.77 6-7.264 6-3.495 0-6.431-2.55-7.264-6a8.52 8.52 0 01-.236-2h1.208l5.855-8.295a1 1 0 01.56-.39l7.285-1.942A3.004 3.004 0 0123 10.171V6h2v4.17ZM37.696 17l-3.236-5.177L30.901 17h6.795Zm-19.893 6.218-3.839-5.933-4.188 5.933h8.027ZM39.69 19c-.77 2.385-2.874 4-5.19 4-2.316 0-4.42-1.615-5.19-4h10.38Zm-20.88 6.218c-.77 2.385-2.874 4-5.19 4-2.316 0-4.42-1.615-5.19-4h10.38ZM24 14a1 1 0 100-2 1 1 0 000 2Z" clip-rule="evenodd"/></svg>';
  static const String k =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" preserveAspectRatio="xMidYMid meet" viewBox="0 0 48 48"><path fill="currentColor" fill-rule="evenodd" d="M18 23.172V12a2 2 0 10-4 0v24a2 2 0


    #[test]
    fn test_assign_ops() {
        for _ in 0..10 {
            let x = udouble { hi: random::<u32>() as umax, lo: random() };
            let y = udouble { hi: random::<u32>() as umax, lo: random() };
            let mut z = x;

            z += y; assert_eq!(z, x + y);
            z -= y; assert_eq!(z, x);
        }
    }
}
use super::Rpc;
use crate::types::{TxPoolContent, TxPoolInspect, TxPoolStatus};

pub fn txpool_status() -> Rpc<TxPoolStatus> {
    Rpc::new("txpool_status")
}

pub fn txpool_content() -> Rpc<TxPoolContent> {
    Rpc::new("txpool_content")
}

pub fn txpool_inspect() -> Rpc<TxPoolInspect> {
    Rpc::new("txpool_inspect")
}
use std::{
    fmt,
    hash::{Hash, Hasher},
    sync::Arc,
};

pub struct ActorPath(Arc<str>);

impl ActorPath {
    pub fn new(path: &str) -> Self {
        ActorPath(Arc::from(path))
    }
}

impl PartialEq for ActorPath {
    fn eq(&self, other: &ActorPath) -> bool {
        self.0 == other.0
    }
}

impl PartialEq<str> for ActorPath {
    fn eq(&self, other: &str) -> bool {
        *self.0 == *other
    }
}

impl Eq for ActorPath {}

impl Hash for ActorPath {
    fn hash<H: Hasher>(&self, state: &mut H) {
        self.0.hash(state);
    }
}

impl fmt::Display for ActorPath {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.0)
    }
}

impl fmt::Debug for ActorPath {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{:?}", self.0)
    }
}

impl Clone for ActorPath {
    fn clone(&self) -> Self {
        ActorPath(self.0.clone())
    }
}

/// An `ActorUri` represents the location of an actor, including the
/// path and actor system host.
///
/// Note: `host` is currently unused but will be utilized when
/// networking and clustering are introduced.
#[derive(Clone)]
pub struct ActorUri {
    pub name: Arc<str>,
    pub path: ActorPath,
    pub host: Arc<str>,
}

impl PartialEq for ActorUri {
    fn eq(&self, other: &ActorUri) -> bool {
        self.path == other.path
    }
}

impl Eq for ActorUri {}

impl Hash for ActorUri {
    fn hash<H: Hasher>(&self, state: &mut H) {
        self.path.hash(state);
    }
}

impl fmt::Display for ActorUri {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.path)
    }
}

impl fmt::Debug for ActorUri {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}://{}", self.host, self.path)
    }
}
<reponame>mbc-git/rust
// rustfmt-wrap_comments: true

fn foo() {
    let s = "this line goes to 100: ͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶͶ�


@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 700;
  src: url('fira-sans/fira-sans-v5-latin-700.eot'); /* IE9 Compat Modes */
  src: local('Fira Sans Bold'), local('FiraSans-Bold'),
       url('fira-sans/fira-sans-v5-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('fira-sans/fira-sans-v5-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
       url('fira-sans/fira-sans-v5-latin-700.woff') format('woff'), /* Modern Browsers */
       url('fira-sans/fira-sans-v5-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
       url('fira-sans/fira-sans-v5-latin-700.svg#FiraSans') format('svg'); /* Legacy iOS */
}
/* fira-sans-700italic - latin */
@font-face {
  font-family: 'Fira Sans';
  font-style: italic;
  font-weight: 700;
  src: url('fira-sans/fira-sans-v5-latin-700italic.eot'); /* IE9 Compat Modes */
  src: local('Fira Sans Bold Italic'), local('FiraSans-BoldItalic'),
       url('fira-sans/fira-sans-v5-latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('fira-sans/fira-sans-v5-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */
       url('fira-sans/fira-sans-v5-latin-700italic.woff') format('woff'), /* Modern Browsers */
       url('fira-sans/fira-sans-v5-latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */
       url('fira-sans/fira-sans-v5-latin-700italic.svg#FiraSans') format('svg'); /* Legacy iOS */
}

/* merriweather-regular - latin */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  src: url('merriweather/merriweather-v8-latin-regular.eot'); /* IE9 Compat Modes */
  src: local('Merriweather'),
       url('merriweather/merriweather-v8-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('merriweather/merriweather-v8-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
       url('merriweather/merriweather-v8-latin-regular.woff') format('woff'), /* Modern Browsers */
       url('merriweather/merriweather-v8-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
       url('merriweather/merriweather-v8-latin-regular.svg#Merriweather') format('svg'); /* Legacy iOS */
}
/* merriweather-italic - latin */
@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 400;
  src: url('merriweather/merriweather-v8-latin-italic.eot'); /* IE9 Compat Modes */
  src: local('Merriweather Italic'), local('Merriweather-Italic'),
       url('merriweather/merriweather-v8-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */


er list or boolean constraints.
  /// If set, `rules` must be empty and `inherit_from_parent` must be set to
  /// false.
  core.bool? reset;

  /// In policies for boolean constraints, the following requirements apply: -
  /// There must be one and only one policy rule where condition is unset.
  ///
  /// - Boolean policy rules with conditions must set `enforced` to the opposite
  /// of the policy rule without a condition. - During policy evaluation, policy
  /// rules with conditions that are true for a target resource take precedence.
  core.List<GoogleCloudOrgpolicyV2PolicySpecPolicyRule>? rules;

  /// The time stamp this was previously updated.
  ///
  /// This represents the last time a call to `CreatePolicy` or `UpdatePolicy`
  /// was made for that policy.
  ///
  /// Output only.
  core.String? updateTime;

  GoogleCloudOrgpolicyV2PolicySpec({
    this.etag,
    this.inheritFromParent,
    this.reset,
    this.rules,
    this.updateTime,
  });

  GoogleCloudOrgpolicyV2PolicySpec.fromJson(core.Map json_)
    : this(
        etag: json_['etag'] as core.String?,
        inheritFromParent: json_['inheritFromParent'] as core.bool?,
        reset: json_['reset'] as core.bool?,
        rules:
            (json_['rules'] as core.List?)
                ?.map(
                  (value) =>
                      GoogleCloudOrgpolicyV2PolicySpecPolicyRule.fromJson(
                        value as core.Map<core.String, core.dynamic>,
                      ),
                )
                .toList(),
        updateTime: json_['updateTime'] as core.String?,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (etag != null) 'etag': etag!,
    if (inheritFromParent != null) 'inheritFromParent': inheritFromParent!,
    if (reset != null) 'reset': reset!,
    if (rules != null) 'rules': rules!,
    if (updateTime != null) 'updateTime': updateTime!,
  };
}

/// A rule used to express this policy.
class GoogleCloudOrgpolicyV2PolicySpecPolicyRule {
  /// Setting this to true means that all values are allowed.
  ///
  /// This field can be set only in policies for list constraints.
  core.bool? allowAll;

  /// A condition which determines whether this rule is used in the evaluation
  /// of the policy.
  ///
  /// When set, the \`expression\` field in the \`Expr' must include from 1 to
  /// 10 subexpressions, joined by the "||" or "&&" operators. Each
  /// subexpression must be of the form "resource.matchTag('/tag_key_short_name,
  /// 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
  /// 'tagValues/value_id')". where key_name and value_name are the resource
  /// names for Label Keys and Values. These names are available from the Tag
  /// Manager Service. An example expression is:
  /// "resource.matchTag('123456789/environment, 'prod')". or
  /// "resource.matchTagId('tagKeys/123', 'tagValues/456')".
  GoogleTypeExpr? condition;

  /// Setting this to true means that all values are denied.
  ///
  /// This field can be set only in policies for list constraints.
  core.bool? denyAll;

  /// If `true`, then the policy is enforced.
  ///
  /// If `false`, then any configuration is acceptable. This field can be set in
  /// policies for boolean constraints, custom constraints and managed
  /// constraints.
  core.bool? enforce;

  /// Required for managed constraints if parameters are defined.
  ///
  /// Passes parameter values when policy enforcement is enabled. Ensure that
  /// parameter value types match those defined in the constraint definition.
  /// For example: ``` { "allowedLocations" : ["us-east1", "us-west1"],
  /// "allowAll" : true } ```
  ///
  /// Optional


menu-bar.vertical menubar > menuitem {
  padding: 8px 0;
}

.mate-panel-menu-bar menubar menu > menuitem {
  min-height: 28px;
  padding: 0 6px;
}

.mate-panel-menu-bar #PanelApplet button {
  -GtkWidget-window-dragging: true;
}

.mate-panel-menu-bar #tasklist-button {
  border-image: radial-gradient(circle closest-corner at center calc(100% - 1px), currentColor 0%, transparent 0%) 0 0 0/0 0 0px;
}

.mate-panel-menu-bar #tasklist-button:checked {
  border-image: radial-gradient(circle closest-corner at center calc(100% - 1px), currentColor 100%, transparent 0%) 0 0 2/0 0 2px;
}

.mate-panel-menu-bar #tasklist-button image:dir(ltr), .mate-panel-menu-bar #tasklist-button label:dir(rtl) {
  padding-left: 4px;
}

.mate-panel-menu-bar #tasklist-button label:dir(ltr), .mate-panel-menu-bar #tasklist-button image:dir(rtl) {
  padding-right: 4px;
}

.mate-panel-menu-bar.vertical #tasklist-button {
  min-height: 32px;
}

.mate-panel-menu-bar.horizontal #showdesktop-button image {
  min-width: 24px;
  padding: 0 4px;
}

.mate-panel-menu-bar.vertical #showdesktop-button image {
  min-height: 24px;
  padding: 4px 0;
}

PanelApplet.wnck-applet .wnck-pager {
  background-color: transparent;
  color: #E0E0E0;
}

PanelApplet.wnck-applet .wnck-pager:hover {
  background-color: alpha(currentColor, 0.08);
}

PanelApplet.wnck-applet .wnck-pager:active {
  background-color: alpha(currentColor, 0.12);
}

PanelApplet.wnck-applet .wnck-pager:selected {
  background-color: #E0E0E0;
}

.mate-panel-menu-bar.horizontal #clock-applet-button label {
  padding: 0 8px;
}

.mate-panel-menu-bar.vertical #clock-applet-button label {
  padding: 8px 0;
}

#MatePanelPopupWindow {
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 7px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
  background-color: #121212;
}

#MatePanelPopupWindow frame > border {
  border-style: none;
}

#MatePanelPopupWindow calendar {
  border-style: none;
}

#MatePanelPopupWindow calendar:not(:selected) {
  background-color: transparent;
}

#MatePanelPopupWindow calendar + box {
  margin-top: -5px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#MatePanelPopupWindow expander > title {
  min-height: 32px;
}

#MatePanelPopupWindow button {
  padding: 4px 16px;
}

#MatePanelPopupWindow > frame > box > box > box > widget {
  color: rgba(255, 255, 255, 0.12);
}

na-tray-applet {
  -NaTrayApplet-icon-padding: 3px;
  -NaTrayApplet-icon-size: 16;
}

.mate-panel-menu-bar {
  -PanelMenuBar-icon-visible:


import pyautogui as gui
gui.displayMousePosition()

x, y = 1219, 409

while True:
    gui.click(x, y)


AB0@ha
/* 80253FA4 0024FC04  7C 85 23 78 */	mr r5, r4
/* 80253FA8 0024FC08  7C 04 03 78 */	mr r4, r0
/* 80253FAC 0024FC0C  38 63 DA B0 */	addi r3, r3, lbl_804FDAB0@l
/* 80253FB0 0024FC10  4B FF FC 4C */	b FETweener_setDoneCallFunc

.global func_80253FB4
func_80253FB4:
/* 80253FB4 0024FC14  39 00 00 01 */	li r8, 1
/* 80253FB8 0024FC18  38 CD A6 28 */	addi r6, r13, lbl_8063F8E8-_SDA_BASE_
/* 80253FBC 0024FC1C  38 E0 00 04 */	li r7, 4
/* 80253FC0 0024FC20  38 00 00 00 */	li r0, 0
/* 80253FC4 0024FC24  3C 60 80 50 */	lis r3, lbl_804FDAB0@ha
/* 80253FC8 0024FC28  3C 80 80 25 */	lis r4, lbl_80253FEC@ha
/* 80253FCC 0024FC2C  3C A0 80 50 */	lis r5, lbl_804FDAA0@ha
/* 80253FD0 0024FC30  99 0D A6 28 */	stb r8, lbl_8063F8E8-_SDA_BASE_(r13)
/* 80253FD4 0024FC34  38 63 DA B0 */	addi r3, r3, lbl_804FDAB0@l
/* 80253FD8 0024FC38  38 84 3F EC */	addi r4, r4, lbl_80253FEC@l
/* 80253FDC 0024FC3C  B0 E6 00 02 */	sth r7, 2(r6)
/* 80253FE0 0024FC40  38 A5 DA A0 */	addi r5, r5, lbl_804FDAA0@l
/* 80253FE4 0024FC44  98 06 00 04 */	stb r0, 4(r6)
/* 80253FE8 0024FC48  4B F7 2C 60 */	b __register_global_object_tmp


import notion.api.v1.model.pages.PageParent
import notion.api.v1.model.pages.PageProperty
import notion.api.v1.request.search.SearchRequest

fun main() {
  NotionClient(token = System.getenv("NOTION_TOKEN")).use { client ->
    // Find the "Test Database" from the list
    val database =
        client
            .search(
                query = "Test Database",
                filter = SearchRequest.SearchFilter("database", property = "object"))
            .results
            .find { it.asDatabase().properties.containsKey("Severity") }
            ?.asDatabase()
            ?: error("Create a database named 'Test Database' and invite this app's user!")
    // Alternatively if you know the UUID of the Database:
    // val database = client.retrieveDatabase("...")

    // All the options for "Severity" property (select type)
    val severityOptions = database.properties["Severity"]!!.select!!.options!!
    // All the options for "Tags" property (multi_select type)
    val tagOptions = database.properties["Tags"]!!.multiSelect!!.options!!
    // A user object for "Assignee" property (people type)
    val assignee = client.listUsers().results.first() // Just picking a random user.

    // Create a new page in the database
    val newPage =
        client.createPage(
            // Use the "Test Database" as this page's parent
            parent = PageParent.database(database.id),
            // Set values to the page's properties
            // (Values of referenced options, people, and relations must be pre-defined before this
            // API call!)
            properties =
                mapOf(
                    "Title" to PageProperty(title = "Fix a bug".asRichText()),
                    "Severity" to
                        PageProperty(select = severityOptions.single { it.name == "High" }),
                    "Tags" to
                        PageProperty(
                            multiSelect =
                                listOf("Tag1", "Tag2").map { tag ->
                                  tagOptions.single { it.name == tag }
                                }),
                    "Due" to
                        PageProperty(
                            date = PageProperty.Date(start = "2021-05-13", end = "2021-12-31")),
                    "Velocity Points" to PageProperty(number = 3),
                    "Assignee" to PageProperty(people = listOf(assignee)),
                    "Done" to PageProperty(checkbox = true),
                    "Link" to PageProperty(url = "https://www.example.com"),
                    "Contact" to PageProperty(email = "foo@example.com"),
                ))

    // Properties can be addressed by their ID too.
    val severityId = newPage.properties["Severity"]!!.id

    // Update properties in the page
    val updatedPage =
        client.updatePage(
            pageId = newPage.id,
            // Update only "Severity" property
            properties =
                mapOf(
                    severityId to
                        PageProperty(select = severityOptions.single { it.name == "Medium" }),
                ))

    // Fetch the latest data of the page
    val retrievedPage = client.retrievePage(newPage.id)
  }
}

private fun String.asRichText(): List<PagePrope


s sent by the client or browser as the origin of the request. It is set through an `Origin` header. *   **Access-Control-Allow-Methods**: This specifies the allowed options for requests from that domain. This will generally be all available methods. *   **Access-Control-Expose-Headers**: This will contain the headers that will be available to requests from the origin domain. *   **Access-Control-Max-Age**: This is the length of time that the access is considered valid. After this expires, a new preflight should be sent. *   **Access-Control-Allow-Credentials**: This will be set to `true`. It basically allows you to send your OAuth token for authentication.  You should not need to be concerned with the details of these headers, because the browser will typically do all of the work for you.

    The version of the OpenAPI document: 2.0
    Contact: api-engineering@digitalocean.com
    Generated by: https://konfigthis.com
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from digital_ocean_python_sdk import schemas  # noqa: F401

class BackwardLinks(
    schemas.ComposedSchema,
):
    """
    This class is auto generated by Konfig (https://konfigthis.com)
    """

    class MetaOapg:

        @classmethod
        @functools.lru_cache()
        def all_of(cls):
            # we need this here to make our import statements work
            # we must store _composed_schemas in here so the code is only run
            # when we invoke this method. If we kept this at the class
            # level we would get an error because the class level
            # code would be run when this module is imported, and these composed
            # classes don't exist yet because their module has not finished
            # loading
            return [
                LinkToFirstPage,
                LinkToPrevPage,
            ]

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
    ) -> 'BackwardLinks':
        return super().__new__(
            cls,
            *args,
            _configuration=_configuration,
            **kwargs,
        )

from digital_ocean_python_sdk.model.link_to_first_page import LinkToFirstPage
from digital_ocean_python_sdk.model.link_to_prev_page import LinkToPrevPage


 for checking integrity: ${checksumSha256}`);
	} else {
		log.warn(`Unable to verify integrity of downloaded node.js binary because no SHA256 checksum was found!`);
	}

	switch (platform) {
		case 'win32':
			return (product.nodejsRepository !== 'https://nodejs.org' ?
				fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `win-${arch}-node.exe`, checksumSha256 }) :
				fetchUrls(`/dist/v${nodeVersion}/win-${arch}/node.exe`, { base: 'https://nodejs.org', checksumSha256 }))
				.pipe(rename('node.exe'));
		case 'darwin':
		case 'linux':
			return (product.nodejsRepository !== 'https://nodejs.org' ?
				fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `node-v${nodeVersion}-${platform}-${arch}.tar.gz`, checksumSha256 }) :
				fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 })
			).pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
				.pipe(filter('**/node'))
				.pipe(util.setExecutableBit('**'))
				.pipe(rename('node'));
		case 'alpine':
			return product.nodejsRepository !== 'https://nodejs.org' ?
				fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `node-v${nodeVersion}-${platform}-${arch}.tar.gz`, checksumSha256 })
					.pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
					.pipe(filter('**/node'))
					.pipe(util.setExecutableBit('**'))
					.pipe(rename('node'))
				: extractAlpinefromDocker(nodeVersion, platform, arch);
	}
}

function packageTask(type, platform, arch, sourceFolderName, destinationFolderName) {
	const destination = path.join(BUILD_ROOT, destinationFolderName);

	return () => {
		const json = require('gulp-json-editor');

		const src = gulp.src(sourceFolderName + '/**', { base: '.' })
			.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
			.pipe(util.setExecutableBit(['**/*.sh']))
			.pipe(filter(['**', '!**/*.js.map']));

		const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
		const isUIExtension = (manifest) => {
			switch (manifest.extensionKind) {
				case 'ui': return true;
				case 'workspace': return false;
				default: {
					if (manifest.main) {
						return false;
					}
					if (manifest.contributes && Object.keys(manifest.contributes).some(key => workspaceExtensionPoints.indexOf(key) !== -1)) {
						return false;
					}
					// Default is UI Extension
					return true;
				}
			}
		};
		const localWorkspaceExtensions = glob.sync('extensions/*/package.json')
			.filter((extensionPath) => {
				if (type === 'reh-web') {
					return true; // web: ship all extensions for now
				}

				// Skip shipping UI extensions because the client side will have them anyways
				// and they'd just increase the download without being used
				const manifest = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, extensionPath)).toString());
				return !isUIExtension(manifest);
			}).map((extensionPath) => path.basename(path.dirname(extensionPath)))
			.filter(name => name !== 'vscode-api-test


egion = genomeLocParser.createGenomeLocOnContig("20", regionStart, regionStart + regionSize);
                final GenomeLoc spanning = genomeLocParser.createGenomeLocOnContig("20", regionStart - 10, region.getStop() + 10);
                final GenomeLoc before_into = genomeLocParser.createGenomeLocOnContig("20", regionStart - 10, regionStart + 1);
                final GenomeLoc middle = genomeLocParser.createGenomeLocOnContig("20", regionStart + 1, regionStart + 2);
                final GenomeLoc middle_past = genomeLocParser.createGenomeLocOnContig("20", region.getStop()-1, region.getStop()+10);

                final List<GenomeLoc> potentials = new LinkedList<GenomeLoc>();
                potentials.add(region);
                if ( spanning != null ) potentials.add(spanning);
                if ( before_into != null ) potentials.add(before_into);
                if ( middle != null ) potentials.add(middle);
                if ( middle_past != null ) potentials.add(middle_past);

                for ( final int n : Arrays.asList(1, 2, 3) ) {
                    for ( final List<GenomeLoc> regions : Utils.makePermutations(potentials, n, false) ) {
                        tests.add(new Object[]{new GenomeLocSortedSet(genomeLocParser, regions), region});
                        tests.add(new Object[]{new GenomeLocSortedSet(genomeLocParser, Utils.append(regions, prev1)), region});
                        tests.add(new Object[]{new GenomeLocSortedSet(genomeLocParser, Utils.append(regions, prev1, prev2)), region});
                        tests.add(new Object[]{new GenomeLocSortedSet(genomeLocParser, Utils.append(regions, post1)), region});
                        tests.add(new Object[]{new GenomeLocSortedSet(genomeLocParser, Utils.append(regions, post1, post2)), region});
                        tests.add(new Object[]{new GenomeLocSortedSet(genomeLocParser, Utils.append(regions, prev1, post1)), region});
                        tests.add(new Object[]{new GenomeLocSortedSet(genomeLocParser, Utils.append(regions, prev1, prev2, post1, post2)), region});
                    }
                }
            }
        }

        return tests.toArray(new Object[][]{});
    }

    @Test(dataProvider = "GetOverlapping")
    public void testGetOverlapping(final GenomeLocSortedSet intervals, final GenomeLoc region) {
        final List<GenomeLoc> expectedOverlapping = intervals.getOverlappingFullSearch(region);
        final List<GenomeLoc> actualOverlapping = intervals.getOverlapping(region);
        Assert.assertEquals(actualOverlapping, expectedOverlapping);
        Assert.assertEquals(intervals.overlaps(region), ! expectedOverlapping.isEmpty(), "GenomeLocSortedSet.overlaps didn't return expected result");
    }
}
/*
* By downloading the PROGRAM you agree to the following terms of use:
*
* BROAD INSTITUTE
* SOFTWARE LICENSE AGREEMENT
* FOR ACADEMIC NON-COMMERCIAL RESEARCH PURPOSES ONLY
*
* This Agreement is made between the Broad Institute, Inc. with a principal address at 415 Main Street, Cambridge, MA 02142 ("BROAD") and the LICENSEE and is effective at the date the downloading is completed ("EFFECTIVE DATE").
*
* WHEREAS, LICENSEE desires to license the PROGRAM, as defined hereinafter, and BROAD wishes to have this PROGRAM utilized in the public interest, subject only to the royalty-free, nonexclusive, nontransferable license rights of the United States Government pursuant to 48 CFR 52.227-14; and
* WHEREAS, LICENSEE desires to license the PROGRAM and BROAD desires to grant a license on the following terms and conditions.
* NOW, THEREFORE, in consideration of the promises and


import os
import json
import zipfile
import io

from configuration import Configuration
from toolchain import Toolchain
import cloud_storage
import error
import output

def load(config: Configuration, toolchain: Toolchain):
    for package_name in config.packages:
        if is_local_package(package_name):
            root_dir = package_name
        else:
            root_dir = os.path.join("packages", package_name)

            if not os.path.exists(root_dir):
                install(package_name)

        config.paths.append(os.path.join(root_dir, "src/"))
        config.library_paths.append(os.path.join(root_dir, "lib", str(toolchain.target)))

        try:
            info_file = open(os.path.join(root_dir, "banjo.json"))
            json_root = json.load(info_file)
            info_file.close()

            if "targets" in json_root:
                if toolchain.target.triple in json_root["targets"]:
                    target_json = json_root["targets"][toolchain.target.triple]

                    if "libraries" in target_json:
                        config.libraries.extend(target_json["libraries"])
                    if "library_paths" in target_json:
                        config.library_paths.extend(
                            target_json["library_paths"])
                    if "macos.frameworks" in target_json:
                        config.macos_frameworks.extend(
                            target_json["macos.frameworks"])
            if "libraries" in json_root:
                config.libraries.extend(json_root["libraries"])
            if "library_paths" in json_root:
                config.library_paths.extend(json_root["library_paths"])
            if "win.resources" in json_root:
                config.linked_win_resources.extend(json_root["win.resources"])
        except json.JSONDecodeError:
            print(f"Failed to load banjo.json in package \"{package_name}\"")

def install(package):
    output.single_line = False
    output.print_step(f"Installing package '{package}'...")
    output.print_step(f"  Downloading {package}.zip...")

    response = cloud_storage.request(f"package/{package}.zip")

    if response.getcode() == 200:
        if not output.quiet:
            output.print_step(f"  Extracting {package}.zip...")

        file_bytes = response.read()
        zip_file = zipfile.ZipFile(io.BytesIO(file_bytes), "r")
        zip_file.extractall(f"packages")
    else:
        error.report_fatal("Failed to download package")

def is_local_package(package) -> bool:
    return "/" in package or os.sep in package


 Error> {
+     let start_time = Instant::now();
+     let end_time = start_time + std::time::Duration::from_secs(duration_seconds);
+
+     println!("Starting queue monitoring for {} seconds", duration_seconds);
+
+     while Instant::now() < end_time {
+         // Get queue attributes
+         let attributes = client.get_queue_attributes()
+             .queue_url(queue_url)
+             .attribute_names(aws_sdk_sqs::model::QueueAttributeName::All)
+             .send()
+             .await?;
+
+         // Extract metrics
+         let messages_available = attributes
+             .attributes()
+             .and_then(|attrs| attrs.get(aws_sdk_sqs::model::QueueAttributeName::ApproximateNumberOfMessages))
+             .and_then(|val| val.parse::<i64>().ok())
+             .unwrap_or(0);
+
+         let messages_in_flight = attributes
+             .attributes()
+             .and_then(|attrs| attrs.get(aws_sdk_sqs::model::QueueAttributeName::ApproximateNumberOfMessagesNotVisible))
+             .and_then(|val| val.parse::<i64>().ok())
+             .unwrap_or(0);
+
+         let messages_delayed = attributes
+             .attributes()
+             .and_then(|attrs| attrs.get(aws_sdk_sqs::model::QueueAttributeName::ApproximateNumberOfMessagesDelayed))
+             .and_then(|val| val.parse::<i64>().ok())
+             .unwrap_or(0);
+
+         // Print metrics
+         println!(
+             "[{}s] Queue metrics - Available: {}, In Flight: {}, Delayed: {}",
+             start_time.elapsed().as_secs(),
+             messages_available,
+             messages_in_flight,
+             messages_delayed
+         );
+
+         // Wait for the next interval
+         sleep(std::time::Duration::from_secs(interval_seconds)).await;
+     }
+
+     println!("Queue monitoring completed");
+     Ok(())
+ }
+
+ // Main function to run the load test
+ #[tokio::main]
+ async fn main() -> Result<(), Box<dyn std::error::Error>> {
+     // Get command line arguments
+     let args: Vec<String> = env::args().collect();
+
+     if args.len() < 2 {
+         println!("Usage: {} <command> [options]", args[0]);
+         println!("Commands:");
+         println!("  run-load-test <queue-url> <num-messages> <concurrency> <portfolio-prefix>");
+         println!("  monitor-queue <queue-url> <interval-seconds> <duration-seconds>");
+         return Ok(());
+     }
+
+     match args[1].as_str() {
+         "run-load-test" => {
+             if args.len() < 6 {
+                 println!("Usage: {} run-load-test <queue-url> <num-messages> <concurrency> <portfolio-prefix>", args[0]);
+                 return Ok(());
+             }
+
+             let queue_url = &args[2];
+             let num_messages = args[3].parse::<usize>().unwrap_or(100);
+             let concurrency = args[4].parse::<usize>().unwrap_or(10);
+             let portfolio_prefix = &args[5];
+
+             run_load_test(queue_url, num_messages, concurrency, portfolio_prefix).await?;
+         },
+         "monitor-queue" => {
+             if arg


dic-accent: #03A9F4;
  --nordic-blue: #2196F3;
  --nordic-blue-dark: #1976D2;
  --nordic-blue-light: #64B5F6;
  --nordic-blue-lighter: #90CAF9;
  --nordic-gradient: linear-gradient(135deg, #2196F3 0%, #64B5F6 100%);
  --nordic-gradient-hero: linear-gradient(180deg, #2196F3 0%, #90CAF9 100%);
  --nordic-gradient-soft: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  --nordic-ice: #F5F9FF;
  --nordic-indigo: #3F51B5;
  --nordic-sky: #E3F2FD;
  --nordic-teal: #00BCD4;
  --orange-100: #FFE0B2;
  --orange-200: #FFCC80;
  --orange-300: #FFB74D;
  --orange-400: #FFA726;
  --orange-500: #FF9800;
  --orange-600: #FB8C00;
  --orange-700: #F57C00;
  --orange-800: #EF6C00;
  --orange-900: #E65100;
  --radius-2xl: 28px;
  --radius-full: 9999px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-xl: 20px;
  --shadow-blue: 0 4px 20px rgba(33, 150, 243, 0.15);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.10);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.12);
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
  --spacing-2xl: 4rem;
  --spacing-lg: 2rem;
  --spacing-md: 1.25rem;
  --spacing-sm: 0.75rem;
  --spacing-xl: 3rem;
  --spacing-xs: 0.5rem;
  --success: #4CAF50;
  --success-light: #E8F5E9;
  --text-light: #C5CAE9;
  --text-muted: #9FA8DA;
  --text-primary: #1A237E;
  --text-secondary: #5C6BC0;
  --warning: #FF9800;
  --warning-light: #FFF3E0;
  /* 橘色系 */
  --orange-50: #FFF3E0;
}

body {
    background: linear-gradient(180deg, #FAFBFD 0%, #FFFFFF 100%);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 頁面標題 */
.page-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 48px 0;
    position: relative;
}

.page-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(33, 150, 243, 0.03) 0%, transparent 70%);
    z-index: -1;
}

.page-title {
    font-size: 2.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;


h    {r3,lr}
	bl      Call_G3X_Reset
	bl      Function_201469c
	cmp     r0, #0x0
	ble     branch_223bf66
	bl      Call_G3X_Reset
	blx     Function_20a73c0
branch_223bf66: @ 223bf66 :thumb

	bl      Function_20146c0
	mov     r0, #0x1
	mov     r1, #0x0
	bl      Function_20241bc
	pop     {r3,pc}
@ 0x223bf74

.thumb
Function_223bf74: @ 223bf74 :thumb
	push    {r3-r7,lr}
	add     sp, #-0x40
	str     r1, [sp, #0x18]
	str     r0, [sp, #0x14]
	ldr     r1, [sp, #0x58]
	mov     r0, r3
	mov     r6, r2
	str     r3, [sp, #0x1c]
	bl      Function_223d45c
	cmp     r0, #0x3
	bhi     branch_223bff2
	add     r0, r0, r0
	add     r0, pc
	ldrh    r0, [r0, #0x6]
	lsl     r0, r0, #16
	asr     r0, r0, #16
	add     pc, r0
@ 0x223bf98

Jumppoints_223bf98:
.hword branch_223bfa0 - Jumppoints_223bf98 - 2
.hword branch_223bfb2 - Jumppoints_223bf98 - 2
.hword branch_223bfc8 - Jumppoints_223bf98 - 2
.hword branch_223bfde - Jumppoints_223bf98 - 2
.thumb
branch_223bfa0: @ 223bfa0 :thumb
	mov     r0, #0x0
	str     r0, [sp, #0x24]
	mov     r0, #0x4
	str     r0, [sp, #0x28]
	mov     r0, #0x1
	mov     r5, #0xd
	mov     r4, #0x6
	str     r0, [sp, #0x2c]
	b       branch_223bff2
@ 0x223bfb2

.thumb
branch_223bfb2: @ 223bfb2 :thumb
	mov     r0, #0x2
	str     r0, [sp, #0x24]
	mov     r0, #0x0
	str     r0, [sp, #0x28]
	mov     r0, #0x4
	str     r0, [sp, #0x2c]
	mov     r0, #0x1
	mov     r5, #0xb
	mov     r4, #0x8
	str     r0, [sp, #0x30]
	b       branch_223bff2
@ 0x223bfc8

.thumb
branch_223bfc8: @ 223bfc8 :thumb
	mov     r0, #0x3
	str     r0, [sp, #0x24]
	mov     r0, #0x0
	str     r0, [sp, #0x28]
	mov     r0, #0x4
	str     r0, [sp, #0x2c]
	mov     r0, #0x1
	mov     r5, #0xb
	mov     r4, #0x8
	str     r0, [sp, #0x30]
	b       branch_223bff2
@ 0x223bfde

.thumb
branch_223bfde: @ 223bfde :thumb
	mov     r0, #0x2
	str     r0, [sp, #0x24]


ntation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

package com.melody.map.tencent_compose.overlay

import androidx.compose.runtime.Composable
import androidx.compose.runtime.ComposeNode
import androidx.compose.runtime.currentComposer
import androidx.compose.ui.geometry.Offset
import com.melody.map.tencent_compose.MapApplier
import com.melody.map.tencent_compose.MapNode
import com.melody.map.tencent_compose.model.TXMapComposable
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor
import com.tencent.tencentmap.mapsdk.maps.model.GroundOverlay
import com.tencent.tencentmap.mapsdk.maps.model.GroundOverlayOptions
import com.tencent.tencentmap.mapsdk.maps.model.LatLng
import com.tencent.tencentmap.mapsdk.maps.model.LatLngBounds

internal class GroundOverlayNode(
    val groundOverlay: GroundOverlay
) : MapNode {
    override fun onRemoved() {
        groundOverlay.remove()
    }
}

/**
 * 通过create创建LatLngBounds或者Position
 * @param latLngBounds 设置图片展示的经纬度范围，与 position(LatLng) 互斥,如果用户同时调用 position(LatLng) 和 latLngBounds(LatLngBounds) ,
 * sdk 会使用 latLngBounds(LatLngBounds) 的值
 * @param location 设置图片的位置，默认锚点为图片中心点
 */
class GroundOverlayPosition private constructor(
    val latLngBounds: LatLngBounds? = null,
    val location: LatLng? = null
) {
    companion object {
        fun create(latLngBounds: LatLngBounds) : GroundOverlayPosition {
            return GroundOverlayPosition(latLngBounds = latLngBounds)
        }

        fun create(location: LatLng) : GroundOverlayPosition {
            return GroundOverlayPosition(location = location)
        }
    }
}

/**
 * 在地图上绘制一个 Ground 覆盖物（一张图片以合适的大小贴在地图上的图片层），它会跟随地图的缩放而缩放。
 *
 * 使用 LatLngBounds 设置放置图片的经纬度区域。
 * 使用 LatLng 设置图片的锚点的经纬度，默认我们把图片的锚点放在图片的中心，即 (0.5, 0.5),
 * 用户可以通过 GroundOverlayOptions.zoom(float zoom)，设置图片原比例展示的地图级别，sdk 默认是 18 级展示原图尺寸
 *
 * @param position 设置图片的位置，默认锚点为图片中心点
 * @param image 覆盖物的贴图
 * @param anchor 设置图片的锚点, 只有 position(LatLng) 设置后才会生效
 * @param transparency  ground 覆盖物的透明度
 * @param zoom 设置图片不缩放展示的地图级别，默认 18 级，只有 position(LatLng) 设置后才会生�


| `P0` |
| `service` | 支持自定义支持 openai 接口协议的大模型接入 | `完整版本` | 100% | `Done` |
| `service` | 支持自定义接口协议的大模型接入 | `MVP` | 0% | `P1` |
| `all` | 支持同时调试多个 MCP Server | `MVP` | 100% | `P0` |
| `all` | 支持通过大模型进行在线验证 | `迭代版本` | 100% | `Done` |
| `all` | 支持对用户对应服务器的调试工作内容进行保存 | `迭代版本` | 100% | `Done` |
| `render` | 高危操作权限确认 | `MVP` | 0% | `P1` |
| `service` | 对于连接的 mcp server 进行热更新 | `MVP` | 0% | `P1` |
| `service` | 系统配置信息云同步 | `MVP` | 0% | `P1` |
| `all` | 系统提示词管理模块 | `迭代版本` | 100% | `Done` |
| `service` | 工具 wise 的日志系统 | `MVP` | 0% | `P1` |
| `service` | 自带 OCR 进行字符识别 | `迭代版本` | 100% | `Done` |

## 项目概念

openmcp 采用分层模块化设计，通过组装不同的模块，可以将它实现成不同平台上的不同模式。

```mermaid
flowchart TD
    subgraph OpenMCP核心组件
        renderer[Renderer]
        openmcpservice[OpenMCPService]
    end

    subgraph OpenMCP_Web["OpenMCP Web"]
        renderer
        openmcpservice
        nginx[Nginx]
    end

    subgraph OpenMCP_插件["OpenMCP 插件"]
        renderer
        openmcpservice
        vscode[VSCode 插件代码]
    end

    subgraph OpenMCP_App["OpenMCP App"]
        renderer
        openmcpservice
        electron[Electron 代码]
    end

    subgraph QQ机器人["基于 OpenMCP 的 QQ 机器人"]
        lagrange[Lagrange.OneBot]
        openmcpservice
    end

    %% 依赖关系
    OpenMCP_Web -->|前端渲染| renderer
    OpenMCP_Web -->|后端服务| openmcpservice
    OpenMCP_Web -->|反向代理| nginx

    OpenMCP_插件 -->|UI 界面| renderer
    OpenMCP_插件 -->|核心逻辑| openmcpservice
    OpenMCP_插件 -->|集成开发| vscode

    OpenMCP_App -->|前端界面| renderer
    OpenMCP_App -->|本地服务| openmcpservice
    OpenMCP_App -->|桌面封装| electron

    QQ机器人 -->|协议适配| lagrange
    QQ机器人 -->|业务逻辑| openmcpservice
```

---

## Dev

- `renderer`: 前端 UI 的定义
- `service`: 测试 `renderer` 的部分，包含一个简易的转发层
- `src`: vscode 插件端定义

### Renderer & Service Dev

```mermaid
flowchart LR
D[renderer] <--> A[Dev Server] <--ws--> B[service]
B <--mcp--> m(MCP Server)
```

配置项目

```bash
npm run setup
```

启动 dev server

```bash
npm run dev
```

> 端口占用： 8282 (renderer) + 8081 (service)

### Extention Dev

```mermaid
flowchart LR
D[renderer] <--> A[extention.ts] <--> B[service]
B <--mcp--> m(MCP Server


lue |= PLLE_SS_CNTL_SSCMAX(0x24);
	writel(value, NV_PA_CLK_RST_BASE + PLLE_SS_CNTL);

	return 0;
}

struct periph_clk_init periph_clk_init_table[] = {
	{ PERIPH_ID_SBC1, CLOCK_ID_PERIPH },
	{ PERIPH_ID_SBC2, CLOCK_ID_PERIPH },
	{ PERIPH_ID_SBC3, CLOCK_ID_PERIPH },
	{ PERIPH_ID_SBC4, CLOCK_ID_PERIPH },
	{ PERIPH_ID_SBC5, CLOCK_ID_PERIPH },
	{ PERIPH_ID_SBC6, CLOCK_ID_PERIPH },
	{ PERIPH_ID_HOST1X, CLOCK_ID_PERIPH },
	{ PERIPH_ID_DISP1, CLOCK_ID_CGENERAL },
	{ PERIPH_ID_NDFLASH, CLOCK_ID_PERIPH },
	{ PERIPH_ID_SDMMC1, CLOCK_ID_PERIPH },
	{ PERIPH_ID_SDMMC2, CLOCK_ID_PERIPH },
	{ PERIPH_ID_SDMMC3, CLOCK_ID_PERIPH },
	{ PERIPH_ID_SDMMC4, CLOCK_ID_PERIPH },
	{ PERIPH_ID_PWM, CLOCK_ID_SFROM32KHZ },
	{ PERIPH_ID_DVC_I2C, CLOCK_ID_PERIPH },
	{ PERIPH_ID_I2C1, CLOCK_ID_PERIPH },
	{ PERIPH_ID_I2C2, CLOCK_ID_PERIPH },
	{ PERIPH_ID_I2C3, CLOCK_ID_PERIPH },
	{ PERIPH_ID_I2C4, CLOCK_ID_PERIPH },
	{ -1, },
};


}

        private async Task<PingReply> SendWithPingUtilityAsync(IPAddress address, byte[] buffer, int timeout, PingOptions? options)
        {
            CancellationToken timeoutOrCancellationToken = _timeoutOrCancellationSource!.Token;

            using Process pingProcess = GetPingProcess(address, buffer, timeout, options);
            pingProcess.Start();

            try
            {
                await pingProcess.WaitForExitAsync(timeoutOrCancellationToken).ConfigureAwait(false);

                string stdout = await pingProcess.StandardOutput.ReadToEndAsync(timeoutOrCancellationToken).ConfigureAwait(false);

                return ParsePingUtilityOutput(address, pingProcess.ExitCode, stdout);
            }
            catch (OperationCanceledException) when (timeoutOrCancellationToken.IsCancellationRequested)
            {
                if (!pingProcess.HasExited)
                {
                    pingProcess.Kill();
                }
                if (_canceled)
                {
                    throw;
                }
                return CreatePingReply(IPStatus.TimedOut);
            }
            catch (Exception e)
            {
                // If the standard output cannot be successfully read/parsed, throw a generic PingException.
                throw new PingException(SR.net_ping, e);
            }
        }

        private static PingReply ParsePingUtilityOutput(IPAddress address, int exitCode, string stdout)
        {
            // Throw timeout for known failure return codes from ping functions.
            if (exitCode == 1 || exitCode == 2)
            {
                // TTL exceeded may have occurred
                if (TryParseTtlExceeded(stdout, out PingReply? reply))
                {
                    return reply!;
                }

                // otherwise assume timeout
                return CreatePingReply(IPStatus.TimedOut);
            }

            // On success, report RTT
            long rtt = UnixCommandLinePing.ParseRoundTripTime(stdout);
            return CreatePingReply(IPStatus.Success, address, rtt);
        }

        private static bool TryParseTtlExceeded(string stdout, out PingReply? reply)
        {
            reply = null;
            if (!stdout.Contains("Time to live exceeded", StringComparison.Ordinal))
            {
                return false;
            }

            // look for address in:
            // - "From 172.21.64.1 icmp_seq=1 Time to live exceeded"
            // - "From 172.21.64.1: icmp_seq=1 Time to live exceeded"
            int addressStart = stdout.IndexOf("From ", StringComparison.Ordinal) + 5;
            int addressLength = stdout.AsSpan(Math.Max(addressStart, 0)).IndexOfAny(' ', ':');
            IPAddress? address;
            if (addressStart < 5 || addressLength <= 0 || !IPAddress.TryParse(stdout.AsSpan(addressStart, addressLength), out address))
            {
                // failed to parse source address (which in case of TTL is different than the original
                // destination address), fallback to all 0
                address = new IPAddress(0);
            }

            reply = CreatePingReply(IPStatus.TimeExceeded, address);
            return true;
        }
    }
}


자 가슴보호대",
[45414] = "용기의 세계파괴자 손장갑",
[45415] = "용기의 세계파괴자 어깨보호대",
[45416] = "용기의 세계파괴자 전쟁킬트",
[45417] = "용기의 죽음인도자 두건",
[45418] = "마예 부인의 사파이어 반지",
[45419] = "용기의 죽음인도자 장갑",
[45420] = "용기의 죽음인도자 다리보호구",
[45421] = "용기의 죽음인도자 로브",
[45422] = "용기의 죽음인도자 어깨보호구",
[45423] = "룬이 어린 손목보호구",
[45424] = "용기의 공성파괴자 흉갑",
[45425] = "용기의 공성파괴자 철갑투구",
[45426] = "용기의 공성파괴자 손보호대",
[45427] = "용기의 공성파괴자 다리보호대",
[45428] = "용기의 공성파괴자 견갑",
[45429] = "용기의 공성파괴자 전투판금 흉갑",
[45430] = "용기의 공성파괴자 건틀릿",
[45431] = "용기의 공성파괴자 투구",
[45432] = "용기의 공성파괴자 다리갑옷",
[45433] = "용기의 공성파괴자 어깨철갑",
[45434] = "바위치유사의 경갑",
[45435] = "절대자의 두건",
[45436] = "결의의 성서",
[45437] = "룬새김 검",
[45438] = "충직한 신하의 반지",
[45439] = "흔들림없는 응시",
[45440] = "강인한 순찰대의 아미스",
[45441] = "고대 수호자의 덧신",
[45442] = "소르탈리스 - 감시자의 망치",
[45443] = "절묘한 때맞춤의 부적",
[45444] = "흔들리지 않는 손길의 장갑",
[45445] = "헌신한 자의 흉갑",
[45446] = "이성의 손목싸개",
[45447] = "�


RLEN_ON_C_STRINGS),
        LintId::of(swap::MANUAL_SWAP),
        LintId::of(temporary_assignment::TEMPORARY_ASSIGNMENT),
        LintId::of(transmute::CROSSPOINTER_TRANSMUTE),
        LintId::of(transmute::TRANSMUTES_EXPRESSIBLE_AS_PTR_CASTS),
        LintId::of(transmute::TRANSMUTE_BYTES_TO_STR),
        LintId::of(transmute::TRANSMUTE_FLOAT_TO_INT),
        LintId::of(transmute::TRANSMUTE_INT_TO_BOOL),
        LintId::of(transmute::TRANSMUTE_INT_TO_CHAR),
        LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
        LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
        LintId::of(types::BORROWED_BOX),
        LintId::of(types::TYPE_COMPLEXITY),
        LintId::of(types::VEC_BOX),
        LintId::of(unit_types::UNIT_ARG),
        LintId::of(unnecessary_sort_by::UNNECESSARY_SORT_BY),
        LintId::of(unwrap::UNNECESSARY_UNWRAP),
        LintId::of(useless_conversion::USELESS_CONVERSION),
        LintId::of(zero_div_zero::ZERO_DIVIDED_BY_ZERO),
    ]);

    store.register_group(true, "clippy::correctness", Some("clippy_correctness"), vec![
        LintId::of(absurd_extreme_comparisons::ABSURD_EXTREME_COMPARISONS),
        LintId::of(approx_const::APPROX_CONSTANT),
        LintId::of(async_yields_async::ASYNC_YIELDS_ASYNC),
        LintId::of(attrs::DEPRECATED_SEMVER),
        LintId::of(attrs::MISMATCHED_TARGET_OS),
        LintId::of(attrs::USELESS_ATTRIBUTE),
        LintId::of(bit_mask::BAD_BIT_MASK),
        LintId::of(bit_mask::INEFFECTIVE_BIT_MASK),
        LintId::of(booleans::LOGIC_BUG),
        LintId::of(casts::CAST_REF_TO_MUT),
        LintId::of(copies::IFS_SAME_COND),
        LintId::of(copies::IF_SAME_THEN_ELSE),
        LintId::of(derive::DERIVE_HASH_XOR_EQ),
        LintId::of(derive::DERIVE_ORD_XOR_PARTIAL_ORD),
        LintId::of(drop_forget_ref::DROP_COPY),
        LintId::of(drop_forget_ref::DROP_REF),
        LintId::of(drop_forget_ref::FORGET_COPY),
        LintId::of(drop_forget_ref::FORGET_REF),
        LintId::of(enum_clike::ENUM_CLIKE_UNPORTABLE_VARIANT),
        LintId::of(eq_op::EQ_OP),
        LintId::of(erasing_op::ERASING_OP),
        LintId::of(formatting::POSSIBLE_MISSING_COMMA),
        LintId::of(functions::NOT_UNSAFE_PTR_ARG_DEREF),
        LintId::of(if_let_mutex::IF_LET_MUTEX),
        LintId::of(indexing_slicing::OUT_OF_BOUNDS_INDEXING),
        LintId::of(infinite_iter::INFINITE_ITER),
        LintId::of(inherent_to_string::INHERENT_TO_STRING_SHADOW_DISPLAY),
        LintId::of(inline_fn_without_body:


MAX;
		pc.pc_namemax = NFS_MAXNAMLEN;
		pc.pc_notrunc = 1;
		pc.pc_chownrestricted = 1;
		pc.pc_caseinsensitive = 0;
		pc.pc_casepreserving = 1;
		error = 0;
	}
	switch (ap->a_name) {
	case _PC_LINK_MAX:
		*ap->a_retval = pc.pc_linkmax;
		break;
	case _PC_NAME_MAX:
		*ap->a_retval = pc.pc_namemax;
		break;
	case _PC_PATH_MAX:
		*ap->a_retval = PATH_MAX;
		break;
	case _PC_PIPE_BUF:
		*ap->a_retval = PIPE_BUF;
		break;
	case _PC_CHOWN_RESTRICTED:
		*ap->a_retval = pc.pc_chownrestricted;
		break;
	case _PC_NO_TRUNC:
		*ap->a_retval = pc.pc_notrunc;
		break;
	case _PC_ACL_EXTENDED:
		*ap->a_retval = 0;
		break;
	case _PC_ACL_NFS4:
		if (NFS_ISV4(vp) && nfsrv_useacl != 0 && attrflag != 0 &&
		    NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL))
			*ap->a_retval = 1;
		else
			*ap->a_retval = 0;
		break;
	case _PC_ACL_PATH_MAX:
		if (NFS_ISV4(vp))
			*ap->a_retval = ACL_MAX_ENTRIES;
		else
			*ap->a_retval = 3;
		break;
	case _PC_MAC_PRESENT:
		*ap->a_retval = 0;
		break;
	case _PC_ASYNC_IO:
		/* _PC_ASYNC_IO should have been handled by upper layers. */
		KASSERT(0, ("_PC_ASYNC_IO should not get here"));
		error = EINVAL;
		break;
	case _PC_PRIO_IO:
		*ap->a_retval = 0;
		break;
	case _PC_SYNC_IO:
		*ap->a_retval = 0;
		break;
	case _PC_ALLOC_SIZE_MIN:
		*ap->a_retval = vp->v_mount->mnt_stat.f_bsize;
		break;
	case _PC_FILESIZEBITS:
		if (NFS_ISV34(vp))
			*ap->a_retval = 64;
		else
			*ap->a_retval = 32;
		break;
	case _PC_REC_INCR_XFER_SIZE:
		*ap->a_retval = vp->v_mount->mnt_stat.f_iosize;
		break;
	case _PC_REC_MAX_XFER_SIZE:
		*ap->a_retval = -1; /* means ``unlimited'' */
		break;
	case _PC_REC_MIN_XFER_SIZE:
		*ap->a_retval = vp->v_mount->mnt_stat.f_iosize;
		break;
	case _PC_REC_XFER_ALIGN:
		*ap->a_retval = PAGE_SIZE;
		break;
	case _PC_SYMLINK_MAX:
		*ap->a_retval = NFS_MAXPATHLEN;
		break;

	default:
		error = EINVAL;
		break;
	}
	return (error);
}


sub-menu > li > a.active {
    color: #22252f;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu {
    color: #22252f;
    display: none;
    position: relative;
    top: 0px;
    padding: 0px 0px;
    border: solid 0px;
    transform: none;
    opacity: 1;
    visibility: visible;
    -webkit-transform: none;
    transform: none;
    -webkit-transition: inherit;
    transition: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.13);
    -webkit-transform-style: flat;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu.halfmenu {
    width: 100%;
    margin: 0px;
    padding: 5px 0px 10px 0px;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu .title {
    color: #22252f;
    font-size: 15px;
    padding: 10px 8px 10px 0px;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu > ul {
    width: 100%;
    margin: 0px;
    padding: 0px;
    font-size: 13px;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu > ul > li > a {
    padding: 9px 14px;
    line-height: normal;
    font-size: 13px;
    background-color: #e7e7e7;
    color: #22252f;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu > ul > li > a:hover {
    background-color: #000;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu ul li.title {
    line-height: 26px;
    color: #22252f;
    margin: 0px;
    font-size: 15px;
    padding: 7px 0px;
    background-color: transparent;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu.halfdiv {
    width: 100%;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu .menu_form {
    padding: 5px 0px 62px 0px;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu .show-grid div {
    margin: 0px;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu .menu_form input[type="button"], .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu .menu_form input[type="submit"] {
    width: 46%;
  }
  .horizontalMenu > .horizontalMenu-list > li > .horizontal-megamenu .menu_form textarea {
    min-height: 100px;
  }
  /* ================== Mobile Mega Menus CSS  ================== */
  /* ================== Mobile Header CSS ================== */
  .horizontal-header {
    width: 100%;
    display: block;
    position: relative;
    top: 0;
    left: 0;
    z-index: 1;
    height: 54px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    -webkit-transition: all 0.25s ease-in-out;
    transition: all 0.25s ease-in-out;
  }
  .active .horizontal-header {
    -webkit-transition: all 0.25s ease-in-out;
    transition: all 0.25s ease-in-out;
  }
  .horizontal-header .smllogo {
    display


crate) use node_set::NodeSet;
pub(crate) use world::{World, WorldHandle};
#![warn(rust_2018_idioms)]
#![allow(dead_code)]

pub mod description;
pub mod direction;
pub mod extmap;
pub mod util;

mod error;
pub(crate) mod lexer;

pub use description::{media::MediaDescription, session::SessionDescription};
pub use error::Error;
extern crate num_bigint;
extern crate num_traits;
extern crate num_iter;
use num_traits::{Zero, One, ToPrimitive};
use num_integer::Integer;
use num_bigint::BigInt;
use super::polynomial;
use super::term_builder;
use super::term_builder::TermBuildable;
use super::division_polynomial;
use crate::bigint;
use crate::bigint::{Power};

type TermBuilder = term_builder::TermBuilder;
type Polynomial = polynomial::Polynomial;

/// Calculate the order of the Elliptic curve y^2 = x^3 + a x + b
/// schoof algorithm
pub fn schoof(a: &BigInt, b: &BigInt, q: i32) -> Vec<bigint::ModResult> {
    let qq = BigInt::from(q);
    let mut mod_result: Vec<bigint::ModResult> = Vec::new();
    // l = 2
    let l: BigInt = 2.into();
    println!("{} l:{}", line!(), l);
    let pol_l2 = TermBuilder::new().xpow(q).build() - TermBuilder::new().xpow(1).build();
    let pol_standard = TermBuilder::new().xpow(3).build() +
                TermBuilder::new().coef(a).xpow(1).build() +
                TermBuilder::new().coef(b).build();
    let j2: BigInt;
    if pol_standard.is_gcd_one(&pol_l2, &qq) {
        // no common root
        j2 = One::one();
    } else {
        // has common root
        j2 = Zero::zero();
    }
    mod_result.push(bigint::ModResult { l: l.clone(), r: j2.clone() });
    println!("a = {} mod 2", j2);

    // l >= 3
    // TODO:
    for l in vec![3i32, 5i32] {
        println!("{} l:{}", line!(), l);
        let ql: i32 = q.mod_floor(&l).to_i32().unwrap();
        if l >= q {
            break;
        }
        println!("q:{} l:{} ql:{}", q, l, ql);
        let jmax: i32 = (l-1) / 2;
        println!("j:[1, {}]", jmax);

        // (b) x'
        let nn1 = division_polynomial::omega(a, b, ql);

        let nn1 = nn1.reduction_modular(a, b, q);

        let nn2 = TermBuilder::new().ypow(q.pow(2)).build()
                * division_polynomial::psi(a, b, ql).power(3);

        let nn2 = nn2.reduction_modular(a, b, q);

        let mut n1 = (nn1 - nn2).power(2);

        n1.modular_assign(&qq);

        let n2 = - (division_polynomial::phi(a, b, ql)
                     + TermBuilder::new().xpow(q.pow(2)).build()
                       * division_polynomial::psi(a, b, ql).power(2));

        let n3 = (division_polynomial::phi(a, b, ql)
                     - TermBuilder::new().xpow(q.pow(2)).build()
                       * division_polynomial::psi(a, b, ql).power(2)).power(2);

        let mut num1 = n1 + n2 * n3;
        num1.modular_assign(


W_AUX_ENT(a,b)

/* 1GB for 64bit, 8MB for 32bit */
#define STACK_RND_MASK (is_32bit_task() ? \
	(0x7ff >> (PAGE_SHIFT - 12)) : \
	(0x3ffff >> (PAGE_SHIFT - 12)))

#ifdef CONFIG_SPU_BASE
/* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */
#define NT_SPU		1

#define ARCH_HAVE_EXTRA_ELF_NOTES

#endif /* CONFIG_SPU_BASE */

#ifdef CONFIG_PPC64

#define get_cache_geometry(level) \
	(ppc64_caches.level.assoc << 16 | ppc64_caches.level.line_size)

#define ARCH_DLINFO_CACHE_GEOMETRY					\
	NEW_AUX_ENT(AT_L1I_CACHESIZE, ppc64_caches.l1i.size);		\
	NEW_AUX_ENT(AT_L1I_CACHEGEOMETRY, get_cache_geometry(l1i));	\
	NEW_AUX_ENT(AT_L1D_CACHESIZE, ppc64_caches.l1d.size);		\
	NEW_AUX_ENT(AT_L1D_CACHEGEOMETRY, get_cache_geometry(l1d));	\
	NEW_AUX_ENT(AT_L2_CACHESIZE, ppc64_caches.l2.size);		\
	NEW_AUX_ENT(AT_L2_CACHEGEOMETRY, get_cache_geometry(l2));	\
	NEW_AUX_ENT(AT_L3_CACHESIZE, ppc64_caches.l3.size);		\
	NEW_AUX_ENT(AT_L3_CACHEGEOMETRY, get_cache_geometry(l3))

#else
#define ARCH_DLINFO_CACHE_GEOMETRY
#endif

/*
 * The requirements here are:
 * - keep the final alignment of sp (sp & 0xf)
 * - make sure the 32-bit value at the first 16 byte aligned position of
 *   AUXV is greater than 16 for glibc compatibility.
 *   AT_IGNOREPPC is used for that.
 * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC,
 *   even if DLINFO_ARCH_ITEMS goes to zero or is undefined.
 * update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes
 */
#define ARCH_DLINFO							\
do {									\
	/* Handle glibc compatibility. */				\
	NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC);			\
	NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC);			\
	/* Cache size items */						\
	NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize);			\
	NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize);			\
	NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize);			\
	VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base);	\
	ARCH_DLINFO_CACHE_GEOMETRY;					\
} while (0)

#endif /* _ASM_POWERPC_ELF_H */


[..])
        }
      }

      impl<'a,'b> Compare<&'b [u8; $N]> for &'a [u8] {
        #[inline(always)]
        fn compare(&self, t: &'b [u8; $N]) -> CompareResult {
          self.compare(&t[..])
        }

        #[inline(always)]
        fn compare_no_case(&self, t: &'b [u8;$N]) -> CompareResult {
          self.compare_no_case(&t[..])
        }
      }
    )+
  };
}

array_impls! {
     0  1  2  3  4  5  6  7  8  9
    10 11 12 13 14 15 16 17 18 19
    20 21 22 23 24 25 26 27 28 29
    30 31 32
}
use embedded_hal_mock::i2c::Transaction as I2cTrans;
use pwm_pca9685::Channel;
use std::convert::TryFrom;

mod common;
use self::common::{assert_invalid_input_data, destroy, new, Register, DEV_ADDR, MODE1_AI};

macro_rules! can_convert_channel {
    ($t:ty, $($value:expr, $channel:ident),*) => {
        $(
            assert_eq!(Channel::$channel, Channel::try_from($value as $t).unwrap());
        )*
    };
}

#[test]
fn can_convert_channel_u8() {
    can_convert_channel!(
        u8, 0, C0, 1, C1, 2, C2, 3, C3, 4, C4, 5, C5, 6, C6, 7, C7, 8, C8, 9, C9, 10, C10, 11, C11,
        12, C12, 13, C13, 14, C14, 15, C15
    );
}

#[test]
fn can_convert_channel_u16() {
    can_convert_channel!(
        u16, 0, C0, 1, C1, 2, C2, 3, C3, 4, C4, 5, C5, 6, C6, 7, C7, 8, C8, 9, C9, 10, C10, 11,
        C11, 12, C12, 13, C13, 14, C14, 15, C15
    );
}

#[test]
fn can_convert_channel_usize() {
    can_convert_channel!(
        usize, 0, C0, 1, C1, 2, C2, 3, C3, 4, C4, 5, C5, 6, C6, 7, C7, 8, C8, 9, C9, 10, C10, 11,
        C11, 12, C12, 13, C13, 14, C14, 15, C15
    );
}

#[test]
fn convert_channel_out_of_bounds() {
    assert_eq!(Err(()), Channel::try_from(16_u8));
    assert_eq!(Err(()), Channel::try_from(16_u16));
    assert_eq!(Err(()), Channel::try_from(16_usize));
}

invalid_test!(
    cannot_set_channel_on_invalid_value,
    set_channel_on,
    Channel::C0,
    4096
);

invalid_test!(
    cannot_set_channel_full_on_invalid_value,
    set_channel_full_on,
    Channel::C0,
    4096
);

invalid_test!(
    cannot_set_channel_off_invalid_value,
    set_channel_off,
    Channel::C0,
    4096
);

invalid_test!(
    cannot_set_channel_on_off_invalid_value_on,
    set_channel_on_off,
    Channel::C0,
    4096,
    0
);

invalid_test!(
    cannot_set_channel_on_off_invalid_value_off,
    set_channel_on_off,
    Channel::C0,
    0,
    4096
);

invalid_test!(
    cannot_set_all_on_off_invalid_


# Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

from odoo import fields, models

class ResCompany(models.Model):
    _inherit = "res.company"

    invoicing_mode_standard_last_execution = fields.Datetime(
        string="Last execution (standard)",
        help="Last execution of standard invoicing.",
        readonly=True,
    )


_matrix, 0,
                                               self.trainer_args.feature_type)
            prob_ood = compute_single_GMM_score(self.net, data_mix,
                                                self.feature_mean,
                                                self.feature_prec,
                                                self.component_weight,
                                                self.transform_matrix, 0,
                                                self.trainer_args.feature_type)
            loss_sae_id = 1 - torch.mean(prob_id)
            loss_sae_ood = torch.mean(prob_ood)

            # loss
            loss = self.trainer_args.loss_weight[0] * loss_clsstd \
                + self.trainer_args.loss_weight[1] * loss_clsmix \
                + self.trainer_args.loss_weight[2] * loss_sae_id \
                + self.trainer_args.loss_weight[3] * loss_sae_ood

            # backward
            self.optimizer.zero_grad()
            loss.backward()
            self.optimizer.step()
            self.scheduler.step()

            # exponential moving average, show smooth values
            with torch.no_grad():
                loss_avg = loss_avg * 0.8 + float(loss) * 0.2

        metrics = {}
        metrics['epoch_idx'] = epoch_idx
        metrics['loss'] = loss_avg

        return self.net, metrics


//
// Created by k2154 on 2025-07-30.
//

#ifndef PCSX2_VIFDEF_H
#define PCSX2_VIFDEF_H

#include "common/Pcsx2Defs.h"
#include "common/StringUtil.h"
#include "MemoryTypes.h"

//
// Bitfield Structure
//
union tVIF_STAT {
    struct {
        u32 VPS : 2; // Vif(0/1) status; 00 - idle, 01 - waiting for data following vifcode, 10 - decoding vifcode, 11 - decompressing/trasferring data follwing vifcode.
        u32 VEW : 1; // E-bit wait (1 - wait, 0 - don't wait)
        u32 VGW : 1; // Status waiting for the end of gif transfer (Vif1 only)
        u32 _reserved : 2;
        u32 MRK : 1; // Mark Detect
        u32 DBF : 1; // Double Buffer Flag
        u32 VSS : 1; // Stopped by STOP
        u32 VFS : 1; // Stopped by ForceBreak
        u32 VIS : 1; // Vif Interrupt Stall
        u32 INT : 1; // Intereupt by the i bit.
        u32 ER0 : 1; // DmaTag Mismatch error.
        u32 ER1 : 1; // VifCode error
        u32 _reserved2 : 9;
        u32 FDR : 1; // VIF/FIFO transfer direction. (false - memory -> Vif, true - Vif -> memory)
        u32 FQC : 5; // Amount of data. Up to 8 qwords on Vif0, 16 on Vif1.
    };
    u32 _u32;

    tVIF_STAT() = default;
    tVIF_STAT(u32 val)			{ _u32 = val; }
    bool test(u32 flags) const	{ return !!(_u32 & flags); }
    void set_flags	(u32 flags)	{ _u32 |=  flags; }
    void clear_flags(u32 flags) { _u32 &= ~flags; }
    void reset()				{ _u32 = 0; }
    std::string desc() const		{ return StringUtil::StdStringFromFormat("Stat: 0x%x", _u32); }
};

union tVIF_ERR {
    struct {
        u32 MII : 1; // Masks Stat INT.
        u32 ME0 : 1; // Masks Stat Err0.
        u32 ME1 : 1; // Masks Stat Err1.
        u32 _reserved : 29;
    };
    u32 _u32;

    tVIF_ERR() = default;
    tVIF_ERR  (u32 val)					{ _u32 = val; }
    void write(u32 val)					{ _u32 = val; }
    bool test		(u32 flags) const	{ return !!(_u32 & flags); }
    void set_flags	(u32 flags)			{ _u32 |=  flags; }
    void clear_flags(u32 flags)			{ _u32 &= ~flags; }
    void reset()						{ _u32 = 0; }
    std::string desc() const				{ return StringUtil::StdStringFromFormat("Err: 0x%x", _u32); }
};

struct vifCycle
{
    u8 cl, wl;
    u8 pad[2];
};

struct VIFregisters {
    tVIF_STAT stat;
    u32 _pad0[3];
    u32 fbrst;
    u32 _pad1[3];
    tVIF_ERR err;
    u32 _pad2[3];
    u32 mark;
    u32 _pad3[3];
    vifCycle cycle; //data write cycle
    u32 _pad4[3];
    u32 mode;
    u32 _pad5[3];
    u32 num;
    u32 _pad6[3];
    u32 mask;
    u32 _pad7[3];
    u32 code;
    u32 _pad8[3];
    u32 itops;
    u32 _pad9[3];
    u32 base;      // Not used in VIF0
    u32 _pad10[3];
    u32 ofst;      // Not used in VIF0
    u32 _pad11[3];
    u32 tops;      // Not used in VIF0
    u32 _pad12[3];
    u32 itop;
    u32 _pad13[3];
    u32 top;       // Not used in VIF0
    u32 _pad14[3];
    u32 mskpath3;
    u32 _pad15[3];
    u32 r0;        // row0 register
    u32 _pad16[3];
    u32 r1;        // row1 register
    u32 _pad17[3];
    u32 r2;        // row2 register
    u32 _pad18[3];
    u32 r3;        // row3 register
    u32 _pad19[3];
    u32 c0;        // col0 register
    u32 _pad20[3];
    u32 c1;        // col1 register
    u32 _pad21[3];
    u32 c2;        // col2 register
    u32 _pad22[3];
    u32 c3;        // col3 register
    u32 _pad23[3];
    u32 offset;    // internal UNPACK offset
    u32 addr;
};

static VIFregisters& vif0Regs = (VIFregisters&)eeHw[0x3800];
static VIFregisters& vif1Regs = (VIFregisters&)eeHw[0x3C00];

#endif //PCSX2_VIFDEF_H


.com/spf13/viper"
)

const (
	onlyLoadCommands = 1 << 0
	onlyObjC         = 1 << 1
	onlySwift        = 1 << 2
	onlySymbols      = 1 << 3
	onlyFuncStarts   = 1 << 4
	onlyStrings      = 1 << 5
	onlyStubs        = 1 << 6
	onlySearch       = 1 << 7
)

func init() {
	DyldCmd.AddCommand(MachoCmd)
	MachoCmd.Flags().BoolP("all", "a", false, "Parse ALL dylibs")
	MachoCmd.Flags().BoolP("loads", "l", false, "Print the load commands")
	MachoCmd.Flags().BoolP("json", "j", false, "Print the TOC as JSON")
	MachoCmd.Flags().BoolP("objc", "o", false, "Print ObjC info")
	MachoCmd.Flags().BoolP("objc-refs", "r", false, "Print ObjC references")
	MachoCmd.Flags().BoolP("swift", "w", false, "Print Swift info")
	MachoCmd.Flags().Bool("swift-all", false, "Print all other Swift sections info")
	MachoCmd.Flags().BoolP("symbols", "n", false, "Print symbols")
	MachoCmd.Flags().Bool("demangle", false, "Demangle symbol names")
	MachoCmd.Flags().BoolP("starts", "f", false, "Print function starts")
	MachoCmd.Flags().BoolP("strings", "s", false, "Print cstrings")
	MachoCmd.Flags().BoolP("stubs", "b", false, "Print stubs")
	MachoCmd.Flags().String("search", "", "Search for byte pattern")

	MachoCmd.Flags().BoolP("extract", "x", false, "🚧 Extract the dylib")
	MachoCmd.Flags().String("output", "", "Directory to extract the dylib(s)")
	MachoCmd.Flags().Bool("force", false, "Overwrite existing extracted dylib(s)")
}

// MachoCmd represents the macho command
var MachoCmd = &cobra.Command{
	Use:     "macho <DSC> <DYLIB>",
	Aliases: []string{"m"},
	Short:   "Parse an incache dylib file",
	Args:    cobra.MinimumNArgs(1),
	ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		if len(args) == 1 {
			return getImages(args[0]), cobra.ShellCompDirectiveDefault
		}
		return getDSCs(toComplete), cobra.ShellCompDirectiveDefault
	},
	SilenceErrors: true,
	RunE: func(cmd *cobra.Command, args []string) error {

		// flags
		verbose := viper.GetBool("verbose")
		showLoadCommands := viper.GetBool("dyld.macho.loads")
		showLoadCommandsAsJSON := viper.GetBool("dyld.macho.json")
		showObjC := viper.GetBool("dyld.macho.objc")
		showObjcRefs := viper.GetBool("dyld.macho.objc-refs")
		showSwift := viper.GetBool("dyld.macho.swift")
		showSwiftAll := viper.GetBool("dyld.macho.swift-all")
		showSymbols := viper.GetBool("dyld.macho.symbols")
		doDemangle := viper.GetBool("dyld.macho.demangle")
		showFuncStarts := viper.GetBool("dyld.macho.starts")
		showStrings := viper.GetBool("dyld.macho.strings")
		showStubs := viper.GetBool("dyld.macho.stubs")
		searchPattern := viper.GetString("dyld.macho.search")
		dumpALL := viper.GetBool("dyld.macho.all")
		extractDylib := viper.GetBool("dyld.macho.extract")
		extractPath := viper.GetString("dyld.macho.ou


:22px;font-size:.875rem;margin-right:5px;display:inline-block}nav.sidebar .container li.tag a.router-link-active.router-link-exact-active[data-v-83f0ed5a]{color:#fff}nav.sidebar .container .children[data-v-83f0ed5a]{padding-left:30px}@-moz-keyframes tada-83f0ed5a{0%{-moz-transform:scale(1)}10%,20%{-moz-transform:scale(.9) rotate(-3deg)}30%,50%,70%,90%{-moz-transform:scale(1.2) rotate(3deg)}40%,60%,80%{-moz-transform:scale(1.2) rotate(-3deg)}to{-moz-transform:scale(1) rotate(0)}}@-webkit-keyframes tada-83f0ed5a{0%{-webkit-transform:scale(1)}10%,20%{-webkit-transform:scale(.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.2) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.2) rotate(-3deg)}to{-webkit-transform:scale(1) rotate(0)}}@keyframes dialogEnter-83f0ed5a{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes dialogLeave-83f0ed5a{0%{transform:scale(1)}to{transform:scale(0)}}.dialog-enter-active[data-v-83f0ed5a]{animation:dialogEnter-83f0ed5a .3s linear forwards}.dialog-leave-active[data-v-83f0ed5a]{animation:dialogLeave-83f0ed5a .3s linear forwards}@keyframes dialogEnter-83f0ed5a{0%{transform:scale(.9)}to{transform:scale(1)}}@keyframes dialogLeave-83f0ed5a{0%{transform:scale(1)}to{transform:scale(.9)}}.dialog1-enter-active[data-v-83f0ed5a]{animation:dialogEnter-83f0ed5a .2s linear forwards}.dialog1-leave-active[data-v-83f0ed5a]{animation:dialogLeave-83f0ed5a .2s linear forwards}@keyframes rotateEnter-83f0ed5a{0%{transform:rotateY(180deg)}10%{transform:rotateY(198deg)}20%{transform:rotateY(216deg)}30%{transform:rotateY(234deg)}40%{transform:rotateY(252deg)}50%{transform:rotateY(270deg)}60%{transform:rotateY(288deg)}70%{transform:rotateY(306deg)}80%{transform:rotateY(324deg)}90%{transform:rotateY(342deg)}to{transform:rotateY(360deg)}}.rotate-enter-active[data-v-83f0ed5a]{animation:rotateEnter-83f0ed5a .7s;position:relative}.rotate-leave-active[data-v-83f0ed5a]{opacity:0;display:none;position:relative;z-index:-999}@keyframes slideOutTop-83f0ed5a{0%{position:fixed;top:100%;left:0;right:0;z-index:9999}to{position:fixed;inset:0;z-index:9999}}@keyframes slideOutBottom-83f0ed5a{0%{position:fixed;top:0;left:0;right:0;z-index:9999}to{position:fixed;top:-100%;left:0;right:0;z-index:9999}}.slide-top-enter-active[data-v-83f0ed5a]{animation:slideOutTop-83f0ed5a .5s linear forwards}.slide-top-leave-active[data-v-83f0ed5a],.slide-bottom-enter-active[data-v-83f0ed5a]{animation:slideOutBottom-83f0ed5a .5s linear forwards


then Enum.AutomaticSize.None else Enum.AutomaticSize.Y,
			BackgroundTransparency = 1,
			Size = if props.FixedSize then UDim2.fromScale(1, 1) else UDim2.fromScale(1, 0),
		}),
		Error = Error,
	})
end

StoryHost = withContext({
	Design = ContextServices.Design or nil,
	Focus = ContextServices.Focus or nil,
	Plugin = ContextServices.Plugin or nil,
})(StoryHost)

return StoryHost


 SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}

SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;

  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "int""'");
  }
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}

SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;