edia = document.select("[src]");

		for (Element srcElement : media) {
			if (srcElement.tagName().equals("img")) {
				matches.add(srcElement.attr("abs:src"));
			}
		}

		if (imageQuantity != ALL)
			matches = matches.subList(0, imageQuantity);

		return matches;
	}

	/** Transforms from html to normal string */
	private String htmlDecode(String content) {
		return Jsoup.parse(content).text();
	}

	/** Crawls the code looking for relevant information */
	private String crawlCode(String content) {
		String result = "";
		String resultSpan = "";
		String resultParagraph = "";
		String resultDiv = "";

		resultSpan = getTagContent("span", content);
		resultParagraph = getTagContent("p", content);
		resultDiv = getTagContent("div", content);

		result = resultSpan;

		if (resultParagraph.length() > resultSpan.length()
				&& resultParagraph.length() >= resultDiv.length())
			result = resultParagraph;
		else if (resultParagraph.length() > resultSpan.length()
				&& resultParagraph.length() < resultDiv.length())
			result = resultDiv;
		else
			result = resultParagraph;

		return htmlDecode(result);
	}

	/** Returns the cannoncial url */
	private String cannonicalPage(String url) {

		String cannonical = "";
		if (url.startsWith(HTTP_PROTOCOL)) {
			url = url.substring(HTTP_PROTOCOL.length());
		} else if (url.startsWith(HTTPS_PROTOCOL)) {
			url = url.substring(HTTPS_PROTOCOL.length());
		}

		int urlLength = url.length();
		for (int i = 0; i < urlLength; i++) {
			if (url.charAt(i) != '/')
				cannonical += url.charAt(i);
			else
				break;
		}

		return cannonical;

	}

	/** Strips the tags from an element */
	private String stripTags(String content) {
		return Jsoup.parse(content).text();
	}

	/** Verifies if the url is an image */
	private boolean isImage(String url) {
		return url.matches(Regex.IMAGE_PATTERN);
	}

	/**
	 * Returns meta tags from html code
	 */
	private HashMap<String, String> getMetaTags(String content) {

		HashMap<String, String> metaTags = new HashMap<String, String>();
		metaTags.put("url", "");
		metaTags.put("title", "");
		metaTags.put("description", "");
		metaTags.put("image", "");

		List<String> matches = Regex.pregMatchAll(content,
				Regex.METATAG_PATTERN, 1);

		for (String match : matches) {
			if (match.toLowerCase().contains("property=\"og:url\"")
					|| match.toLowerCase().contains("property='og:url'")
					|| match.toLowerCase().contains("name=\"url\"")
					|| match.toLowerCase().contains("name='url'"))
				metaTags.put("url", separeMetaTagsContent(match));
			else if (match.toLowerCase().contains("property=\"og:title\"")
					|| match.toLowerCase().contains("property='og:title'")
					|| match.toLowerCase().contains("name=\"title\"")
					|| match.toLowerCase().contains("name='title'"))
				metaTags.put("title", separeMetaTagsContent(match));
			else if (match.toLowerCase()
					.contains("property=\"og:description\"")
					|| match.toLowerCase()
					.contains("property='og:description'")
					|| match.toLowerCase().contains("name=\"description\"")
					|| match.toLowerCase().contains("name='description'"))
				metaTags.put("description", separeMetaTagsContent(match));
			else if (match.toLowerCase().contains("property=\"og:image\"")
					|| match.toLowerCase().contains("property='og:image'")
					|| match.toLowerCase().contains("name=\"image\"")


 #[inline(always)]
    pub(crate) fn new(bits: u8) -> Self {
        RD_INST_CONFIG_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for RD_INST_CONFIG_R {
    type Target = crate::FieldReader<u8, u8>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `RD_VOL_LEVEL_HP_INV` reader - This field stores the voltage level for CPU to run at 240 MHz, or for flash/PSRAM to run at 80 MHz.0x0: level 7; 0x1: level 6; 0x2: level 5; 0x3: level 4. (RO)"]
pub struct RD_VOL_LEVEL_HP_INV_R(crate::FieldReader<u8, u8>);
impl RD_VOL_LEVEL_HP_INV_R {
    #[inline(always)]
    pub(crate) fn new(bits: u8) -> Self {
        RD_VOL_LEVEL_HP_INV_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for RD_VOL_LEVEL_HP_INV_R {
    type Target = crate::FieldReader<u8, u8>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `RD_DIG_VOL_L6` reader - "]
pub struct RD_DIG_VOL_L6_R(crate::FieldReader<u8, u8>);
impl RD_DIG_VOL_L6_R {
    #[inline(always)]
    pub(crate) fn new(bits: u8) -> Self {
        RD_DIG_VOL_L6_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for RD_DIG_VOL_L6_R {
    type Target = crate::FieldReader<u8, u8>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `RD_FLASH_CRYPT_CONFIG` reader - read for flash_crypt_config"]
pub struct RD_FLASH_CRYPT_CONFIG_R(crate::FieldReader<u8, u8>);
impl RD_FLASH_CRYPT_CONFIG_R {
    #[inline(always)]
    pub(crate) fn new(bits: u8) -> Self {
        RD_FLASH_CRYPT_CONFIG_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for RD_FLASH_CRYPT_CONFIG_R {
    type Target = crate::FieldReader<u8, u8>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bits 0:4 - read for SPI_pad_config_clk"]
    #[inline(always)]
    pub fn rd_spi_pad_config_clk(&self) -> RD_SPI_PAD_CONFIG_CLK_R {
        RD_SPI_PAD_CONFIG_CLK_R::new((self.bits & 0x1f) as u8)
    }
    #[doc = "Bits 5:9 - read for SPI_pad_config_q"]
    #[inline(always)]
    pub fn rd_spi_pad_config_q(&self) -> RD_SPI_PAD_CONFIG_Q_R {
        RD_SPI_PAD_CONFIG_Q_R::new(((self.bits >> 5) & 0x1f) as u8)
    }
    #[doc = "Bits 10:14 - read for SPI_pad_config_d"]
    #[inline(always)]
    pub fn rd_spi_pad_config_d(&self) -> RD_SPI_PAD_CONFIG_D_R {
        RD_SPI_PAD_CONFIG_D_R


 run_singlethreaded(&self) {
        let (tx, rx) = oneshot::channel();
        *self.quit_tx.lock() = Some(tx);
        self.executor.lock().run_singlethreaded(async move { rx.await }).unwrap();
    }

    fn quit(&self) {
        self.quit_tx.lock().take().unwrap().send(()).unwrap();
    }

    fn now(&self) -> zx_time_t {
        let dur = fasync::Time::now() - self.start;
        #[cfg(target_os = "fuchsia")]
        let r = dur.into_nanos();
        #[cfg(not(target_os = "fuchsia"))]
        let r = dur.as_nanos() as zx_time_t;
        r
    }
}

/// Duplicated from //zircon/system/ulib/async/include/lib/async/dispatcher.h
#[repr(C)]
struct async_state_t {
    _reserved: [usize; 2],
}

/// Duplicated from //zircon/system/ulib/async/include/lib/async/wait.h
#[repr(C)]
struct async_wait_t {
    _state: async_state_t,
    _handler: extern "C" fn(
        *mut std::ffi::c_void,
        *mut async_wait_t,
        zx_status_t,
        *const zx_packet_signal_t,
    ),
    _object: zx_handle_t,
    _trigger: zx_signals_t,
    _options: u32,
}

/// Duplicated from //zircon/system/ulib/async/include/lib/async/task.h
#[repr(C)]
struct async_task_t {
    _state: async_state_t,
    handler: extern "C" fn(*mut std::ffi::c_void, *mut async_task_t, zx_status_t),
    deadline: zx_time_t,
}

struct TaskPtr(*mut async_task_t);
unsafe impl Send for TaskPtr {}
unsafe impl Sync for TaskPtr {}
impl TaskPtr {
    unsafe fn as_ref(&self) -> &async_task_t {
        self.0.as_ref().unwrap()
    }
}

#[no_mangle]
pub extern "C" fn fasync_executor_create(cb_executor: *mut std::ffi::c_void) -> *mut Executor {
    Box::into_raw(Executor::new(cb_executor))
}

#[no_mangle]
pub unsafe extern "C" fn fasync_executor_run_singlethreaded(executor: *mut Executor) {
    EPtr(executor).as_ref().run_singlethreaded()
}

#[no_mangle]
pub unsafe extern "C" fn fasync_executor_quit(executor: *mut Executor) {
    EPtr(executor).as_ref().quit()
}

#[no_mangle]
pub unsafe extern "C" fn fasync_executor_destroy(executor: *mut Executor) {
    drop(Box::from_raw(executor))
}

#[no_mangle]
unsafe extern "C" fn fasync_executor_now(executor: *mut Executor) -> zx_time_t {
    EPtr(executor).as_ref().now()
}

#[no_mangle]
unsafe extern "C" fn fasync_executor_begin_wait(
    _executor: *mut Executor,
    _wait: *mut async_wait_t,
) -> zx_status_t {
    ZX_ERR_NOT_SUPPORTED
}

#[no_mangle]
unsafe extern "C" fn fasync_executor_cancel_wait(
    _executor: *mut Executor,
    _wait: *mut async_wait_t,
) -> zx_status_t {
    ZX_ERR_NOT_SUPPORTED
}

#[no_mangle]
unsafe extern "C" fn fasync_executor_post_task(
    executor: *mut Executor,
    task: *mut async_task_t,
) -> zx_status_t {
    let executor = EPtr(executor);
    let task = TaskPtr(task


ties.in_document_content(obj)
        if self._script.utilities.is_clickable_element(obj) or self._script.utilities.is_link(obj):
            args["role"] = Atspi.Role.LINK
        elif self._script.utilities.is_custom_image(obj):
            args["role"] = Atspi.Role.IMAGE
        elif self._script.utilities.is_anchor(obj):
            args["role"] = Atspi.Role.STATIC
        elif self._script.utilities.treat_as_div(obj, offset=args.get("startOffset")):
            args["role"] = Atspi.Role.SECTION

        if AXUtilities.is_menu_item(obj):
            combo_box = AXObject.find_ancestor(obj, AXUtilities.is_combo_box)
            if combo_box and not AXUtilities.is_expanded(combo_box):
                obj = combo_box
        result.extend(super().generate_braille(obj, **args))
        del args["includeContext"]
        return result

    def generate_contents(  # type: ignore[override]
        self,
        contents: list[tuple[Atspi.Accessible, int, int, str]],
        **args
    ) -> tuple[list[list[Any]], Atspi.Accessible | None]:
        if not contents:
            return [], None

        result = []
        contents = self._script.utilities.filter_contents_for_presentation(contents, True)

        document = args.get("documentFrame")
        obj, offset = self._script.utilities.get_caret_context(document=document)
        index = self._script.utilities.find_object_in_contents(obj, offset, contents)

        last_region = None
        focused_region = None
        for i, content in enumerate(contents):
            acc, start, end, string = content
            regions, f_region = self.generate_braille(
                acc, startOffset=start, endOffset=end, caretOffset=offset, string=string,
                index=i, total=len(contents))
            if not regions:
                continue

            if i == index:
                focused_region = f_region

            if last_region and regions:
                last_char = next_char = ""
                if last_region.string:
                    last_char = last_region.string[-1]
                if regions[0].string:
                    next_char = regions[0].string[0]
                if self._needs_separator(last_char, next_char):
                    regions.insert(0, braille.Region(" "))

            last_region = regions[-1]
            result.append(regions)

        return result, focused_region


(m_loState);
  }

  D3D11_BLEND_DESC1 D3D11BlendState::PromoteDesc(const D3D11_BLEND_DESC* pSrcDesc) {
    D3D11_BLEND_DESC1 dstDesc;
    dstDesc.AlphaToCoverageEnable  = pSrcDesc->AlphaToCoverageEnable;
    dstDesc.IndependentBlendEnable = pSrcDesc->IndependentBlendEnable;

    for (uint32_t i = 0; i < 8; i++) {
      dstDesc.RenderTarget[i].BlendEnable           = pSrcDesc->RenderTarget[i].BlendEnable;
      dstDesc.RenderTarget[i].LogicOpEnable         = FALSE;
      dstDesc.RenderTarget[i].SrcBlend              = pSrcDesc->RenderTarget[i].SrcBlend;
      dstDesc.RenderTarget[i].DestBlend             = pSrcDesc->RenderTarget[i].DestBlend;
      dstDesc.RenderTarget[i].BlendOp               = pSrcDesc->RenderTarget[i].BlendOp;
      dstDesc.RenderTarget[i].SrcBlendAlpha         = pSrcDesc->RenderTarget[i].SrcBlendAlpha;
      dstDesc.RenderTarget[i].DestBlendAlpha        = pSrcDesc->RenderTarget[i].DestBlendAlpha;
      dstDesc.RenderTarget[i].BlendOpAlpha          = pSrcDesc->RenderTarget[i].BlendOpAlpha;
      dstDesc.RenderTarget[i].LogicOp               = D3D11_LOGIC_OP_NOOP;
      dstDesc.RenderTarget[i].RenderTargetWriteMask = pSrcDesc->RenderTarget[i].RenderTargetWriteMask;
    }

    return dstDesc;
  }

  HRESULT D3D11BlendState::NormalizeDesc(D3D11_BLEND_DESC1* pDesc) {
    if (pDesc->AlphaToCoverageEnable)
      pDesc->AlphaToCoverageEnable = TRUE;

    if (pDesc->IndependentBlendEnable)
      pDesc->IndependentBlendEnable = TRUE;

    const uint32_t numRenderTargets = pDesc->IndependentBlendEnable ? 8 : 1;

    for (uint32_t i = 0; i < numRenderTargets; i++) {
      D3D11_RENDER_TARGET_BLEND_DESC1* rt = &pDesc->RenderTarget[i];

      if (rt->BlendEnable) {
        rt->BlendEnable = TRUE;

        if (rt->LogicOpEnable)
          return E_INVALIDARG;

        if (!ValidateBlendOperations(
         rt->SrcBlend, rt->SrcBlendAlpha,
         rt->DestBlend, rt->DestBlendAlpha,
         rt->BlendOp, rt->BlendOpAlpha))
          return E_INVALIDARG;
      } else {
        rt->SrcBlend       = D3D11_BLEND_ONE;
        rt->DestBlend      = D3D11_BLEND_ZERO;
        rt->BlendOp        = D3D11_BLEND_OP_ADD;
        rt->SrcBlendAlpha  = D3D11_BLEND_ONE;
        rt->DestBlendAlpha = D3D11_BLEND_ZERO;
        rt->BlendOpAlpha   = D3D11_BLEND_OP_ADD;
      }

      if (rt->LogicOpEnable) {
        rt->LogicOpEnable = TRUE;

        // Blending must be disabled
        // if the logic op is enabled
        if (rt->BlendEnable
         || pDesc->IndependentBlendEnable
         || !ValidateLogicOp(rt->LogicOp))
          return E_INVALIDARG;
      } else {
        rt->LogicOp = D3D


;;	//poor attempt at encrypting text

	CString Temp2= "URrbgis8ered";

	CString Temp3= "Sync5ister+d";

	CString Temp4= "VnrQ7isoered";

	CString UnReg;

	CString Reg = "0123456789";

	div_t DivResult;

	RegFlag[1]=69;

	RegFlag[2]=96;

	RegFlag[3]=99;

	UpdateData(TRUE);		//Update m_name with whats in box

	SetupCheck();

	UnReg = Temp1;			// Set up 'UnRegistered'

	UnReg.SetAt(1,Temp4.GetAt(1));

	UnReg.SetAt(4,Temp2.GetAt(4));

	UnReg.SetAt(7,Temp3.GetAt(7));

	UnReg.SetAt(10,Temp4.GetAt(10));

	Reg.SetAt(0, Temp2.GetAt(1));	// Set up 'Registered'

	for (i=1 ; i<=9 ; i++) { Reg.SetAt(i, UnReg.GetAt(i+2)); } if (lstrlen(m_name)>= 3)		// Name must be 3 chars long

	{

		i=Clean( toascii(  m_name.GetAt(1) ));  //2nd char cleaned on line 1

		if (!check[(i-65)*10+2])

		{

			RegFlag[1] =14;

		}

		else

		{

			testchk[(i-65)*10+2] = TRUE;

		}

		i=Clean( toascii( m_name.GetAt(0))+toascii( m_name.GetAt(1))+toascii( m_name.GetAt(2)) );

		if (!check[(i-65)*10+3])		//(1st+2nd+3rd) cleaned on line 2

		{

			RegFlag[2] =35;

		}

		else

		{

			testchk[(i-65)*10+3] = TRUE;

		}

		if (!check[164])			// "Q" on line 3 hard coded

		{

			RegFlag[3] = 48;

		}

		else

		{

			testchk[164] = TRUE;

		}

		i=Clean( toascii( m_name.GetAt(0) )); // 1st cleaned on line 4

		if (!check[(i-65)*10+5])

		{

			RegFlag[1] = 19;

		}

		else

		{

			testchk[(i-65)*10+5] = TRUE;

		}

		i=Clean( toascii( m_name.GetAt(1) )); // 2nd cleaned on line 4

		if (!check[(i-65)*10+5])

		{

			RegFlag[2] = 18;

		}

		else

		{

			testchk[(i-65)*10+5] = TRUE;

		}

		i=Clean( toascii( m_name.GetAt(2) ));  // 3rd cleaned on line 4

		if (!check[(i-65)*10+5])

		{

			RegFlag[3] = 17;

		}

			else

		{

			testchk[(i-65)*10+5] = TRUE;

		}

		NameSum =0;		// remainder of sum of all chars /69 cleaned on line 5

		for (i=1; i <= m_name.GetLength(); i++ ) { NameSum +="m_name.GetAt(i-1);" } DivResult="div(NameSum," 69); i="Clean(DivResult.rem);" if (!check[(i-65)*10+6]) { RegFlag[1]="68;" } else { testchk[(i-65)*10+6]="TRUE;" } i="Clean(" toascii(m_name.GetAt(2))*6 ); // (6 * 3rd) cleaned on line 6 if (!check[(i-65)*10+7]) { RegFlag[2]="27;" } else { testchk[(i-65)*10+7]="TRUE;" } i="Clean(" toascii(m_name.GetAt(0))*toascii(m_name.GetAt(2)) ); if (!check[(i-65)*10+8]) // (1st * 3rd) cleaned on line 7 { RegFlag[3]="61;" } else { testchk[(i-65)*10+8]="TRUE;" } i="Clean(toascii(m_name.GetAt(0))-4);" //1st 4 cleaned on line 8 if (!check[(i-65)*10+9]) { Re


7 3.3C8.5 2.5 10.2 2 12 2C13.8 2 15.5 2.5 17 3.3ZM17.8 12L14.9 17L17 20.7C20 19 22 15.7 22 12H17.8ZM6.2 12H2C2 15.7 4 18.9 7 20.7L9.10001 17L6.2 12Z" fill="#035A4B" />
                </svg>

                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                  <path d="M22 12C22 12.2 22 12.5 22 12.7L19.5 10.2L16.9 12.8C16.9 12.5 17 12.3 17 12C17 9.5 15.2 7.50001 12.8 7.10001L10.2 4.5L12.7 2C17.9 2.4 22 6.7 22 12ZM11.2 16.9C8.80001 16.5 7 14.5 7 12C7 11.7 7.00001 11.5 7.10001 11.2L4.5 13.8L2 11.3C2 11.5 2 11.8 2 12C2 17.3 6.09999 21.6 11.3 22L13.8 19.5L11.2 16.9Z" fill="#035A4B" />
                  <path opacity="0.3" d="M22 12.7C21.6 17.9 17.3 22 12 22C11.8 22 11.5 22 11.3 22L13.8 19.5L11.2 16.9C11.5 16.9 11.7 17 12 17C14.5 17 16.5 15.2 16.9 12.8L19.5 10.2L22 12.7ZM10.2 4.5L12.7 2C12.5 2 12.2 2 12 2C6.7 2 2.4 6.1 2 11.3L4.5 13.8L7.10001 11.2C7.50001 8.8 9.5 7 12 7C12.3 7 12.5 7.00001 12.8 7.10001L10.2 4.5Z" fill="#035A4B" />
                </svg>

                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                  <path opacity="0.3" d="M2.10001 10C3.00001 5.6 6.69998 2.3 11.2 2L8.79999 4.39999L11.1 7C9.60001 7.3 8.30001 8.19999 7.60001 9.59999L4.5 12.4L2.10001 10ZM19.3 11.5L16.4 14C15.7 15.5 14.4 16.6 12.7 16.9L15 19.5L12.6 21.9C17.1 21.6 20.8 18.2 21.7 13.9L19.3 11.5Z" fill="#035A4B" />
                  <path d="M13.8 2.09998C18.2 2.99998 21.5 6.69998 21.8 11.2L19.4 8.79997L16.8 11C16.5 9.39998 15.5 8.09998 14 7.39998L11.4 4.39998L13.8 2.09998ZM12.3 19.4L9.69998 16.4C8.29998 15.7 7.3 14.4 7 12.8L4.39999 15.1L2 12.7C2.3 17.2


n(BuildContext context) {
    var children = [_imageToUse(context)];
    if (message != null) {
      children
        ..add(const SizedBox(height: 7.0))
        ..add(Text(
          message!,
          style: CuckooTextStyles.body(),
          textAlign: TextAlign.center,
        ));
    }
    if (buttons != null) {
      children.add(const SizedBox(height: 14.0));
      for (final button in buttons!) {
        children
          ..add(const SizedBox(height: 12.0))
          ..add(button);
      }
    }
    if (bottomOffset != null) {
      children.add(SizedBox(height: bottomOffset));
    }
    return children;
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      mainAxisAlignment: MainAxisAlignment.center,
      children: _buildColumnChildren(context),
    );
  }
}
import 'package:cuckoo/src/app.dart';
import 'package:cuckoo/src/common/extensions/extensions.dart';
import 'package:cuckoo/src/common/ui/ui.dart';
import 'package:flutter/material.dart';

class CuckooFullScreenIndicator {
  CuckooFullScreenIndicator() : context = navigatorKey.currentContext!;

  late final BuildContext context;

  /// Start fullscreen loading indicator.
  Future<void> startLoading({String? message}) async {
    var children = <Widget>[
      const CircularProgressIndicator(
        color: CuckooColors.primary,
      ),
    ];
    if (message != null) {
      children
        ..add(const SizedBox(height: 23.0))
        ..add(Text(message, style: CuckooTextStyles.body(size: 13)));
    }

    return await showDialog<void>(
      context: context,
      barrierDismissible: false,
      builder: (BuildContext context) {
        return SimpleDialog(
          elevation: 0.0,
          contentPadding: const EdgeInsets.fromLTRB(0, 45, 0, 40),
          backgroundColor: context.theme.popUpBackground,
          children: <Widget>[
            Center(
              child: Column(
                children: children,
              ),
            )
          ],
        );
      },
    );
  }

  /// Stop fullscreen loading indicator.
  Future<void> stopLoading() async {
    Navigator.of(context, rootNavigator: true).pop();
  }
}
import 'package:cuckoo/src/common/extensions/extensions.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

/// A panel with an iOS-style date picker.
class TimePickerPanel extends StatelessWidget {
  const TimePickerPanel({
    super.key,
    this.mode = CupertinoDatePickerMode.time,
    this.onChanged,
    this.initialDateTime,
    this.minimumDate,
  });

  /// Mode of the time picker
  final CupertinoDatePickerMode mode;

  /// On change callback.
  final ValueChanged<DateTime>? onChanged;

  /// Initial date time chosen.
  final DateTime? initialDateTime;

  /// Minimum date time that can be chosen.
  final DateTime? minimumDate;

  /// Show the date picker panel on current screen.
  void show(BuildContext context) {
    showModalBottomSheet<void>(
      context: context,
      backgroundColor: context.theme.popUpBackground,
      useRootNavigator: true,
      useSafeArea: true,
      shape: const RoundedRectangleBorder(
          borderRadius: BorderRadius.vertical(top: Radius.circular(30.0))),
      builder: (context) => this,
    );
  }

  @override
  Widget build(BuildContext context) {
    return SafeArea(
        top: false,
        child: Container(
          height: 216,
          padding: const EdgeInsets.all(20.0),
          child: CupertinoDatePicker


ion,
			task: &persistence.SyncActivityTask{
				WorkflowIdentifier: workflowIdentifier,
				TaskData: persistence.TaskData{
					Version:             19,
					TaskID:              19,
					VisibilityTimestamp: time.Unix(19, 19),
				},
				ScheduledID: 19,
			},
		},
		{
			category: persistence.HistoryTaskCategoryReplication,
			task: &persistence.FailoverMarkerTask{
				DomainID: "4be8a310-7d20-483e-a5d2-48659dc47608",
				TaskData: persistence.TaskData{
					Version:             20,
					TaskID:              20,
					VisibilityTimestamp: time.Unix(20, 20),
				},
			},
		},
	}

	for _, tc := range testCases {
		blob, err := taskSerializer.SerializeTask(tc.category, tc.task)
		assert.NoError(t, err)
		task, err := taskSerializer.DeserializeTask(tc.category, &blob)
		assert.NoError(t, err)
		task.SetTaskID(tc.task.GetTaskID())
		if tc.category.Type() == persistence.HistoryTaskCategoryTypeScheduled {
			task.SetVisibilityTimestamp(tc.task.GetVisibilityTimestamp())
		}
		assert.Equal(t, tc.task, task)
	}
}
// The MIT License (MIT)
//
// Copyright (c) 2017-2020 Uber Technologies Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

package serialization

import (
	"fmt"

	"github.com/uber/cadence/common/constants"
	"github.com/uber/cadence/common/persistence"
)

type (
	parser struct {
		dc       *persistence.DynamicConfiguration
		encoders map[constants.EncodingType]encoder
		decoders map[constants.EncodingType]decoder
	}
)

var allBlobEncodings = []constants.EncodingType{
	constants.EncodingTypeThriftRW,
	constants.EncodingTypeThriftRWSnappy,
}

// NewParser constructs a new parser using encoder as specified by encodingType and using decoders specified by decodingTypes
func NewParser(dc *persistence.DynamicConfiguration) (Parser, error) {
	encoders := make(map[constants.EncodingType]encoder)
	decoders := make(map[constants.EncodingType]decoder)

	for _, dt := range allBlobEncodings {
		decoder, err := getDecoder(dt)
		if err != nil {
			return nil, err
		}
		decoders[dt] = decoder

		encoder, err := getEncoder(dt)
		if err != nil {
			return nil, err
		}
		encoders[dt] = encoder
	}
	return &parser{
		dc:       dc,
		encoders: encoders,
		decoders: decoders,
	}, nil
}

func (p *parser) ShardInfoToBlob(info *ShardInfo) (persistence.DataBlob, error) {
	db := persistence.DataBlob{}
	encoding := p.dc.SerializationEncoding()


- 效果：鲁棒性提升，准确率提高|

### 对抗攻击 (Adversarial Attack)

|状态|英文标题|中文标题|作者|PDF链接|代码/贡献|
|---|---|---|---|---|---|
|📝 更新|SCA: Highly Efficient Semantic-Consistent Unrestricted Adversarial Attack|SCA：高效语义一致的无限制对抗攻击|Zihao Pan, Weibin Wu, Yuhang Cao, Zibin Zheng|<http://arxiv.org/pdf/2410.02240v5>|- 问题：对抗攻击，语义扰动，效率低
- 方法：SCA框架，MLLM语义指导，DDPM降噪
- 效果：高效，SCAE，速度提升|
|🆕 发布|Token-Level Constraint Boundary Search for Jailbreaking Text-to-Image Models|基于令牌级约束的越狱文本到图像模型边界搜索|Jiangtao Liu, Zhaoxin Wang, Handing Wang, Cong Tian, Yaochu Jin|<http://arxiv.org/pdf/2504.11106v1>|- 问题：T2I模型安全性，对抗攻击，防御机制
- 方法：TCBS-Attack，边界搜索，迭代优化
- 效果：ASR-4 45%，ASR-1 21%，超越基线|
|📝 更新|Reinforcement Learning Platform for Adversarial Black-box Attacks with Custom Distortion Filters|对抗黑盒攻击的定制扭曲滤波器强化学习平台|Soumyendu Sarkar, Ashwin Ramesh Babu, Sajad Mousavi, Vineet Gundecha, Sahand Ghorbanpour, Avisek Naug, Ricardo Luna Gutierrez, Antonio Guillen|<http://arxiv.org/pdf/2501.14122v2>|- 问题：黑盒攻击，对抗样本，鲁棒性
- 方法：强化学习，双行动作，自定义扭曲
- 效果：高效攻击，模型鲁棒性提升|
|🆕 发布|CDUPatch: Color-Driven Universal Adversarial Patch Attack for Dual-Modal Visible-Infrared Detectors|CDUPatch：针对双模可见光-红外探测器的基于颜色的通用对抗性补丁攻击|Jiahuan Long, Wen Yao, Tingsong Jiang, Chao Ma|<http://arxiv.org/pdf/2504.10888v1>|- 问题：双模态检测器，对抗性攻击，效果有限
- 方法：颜色驱动，跨模态适配器，多尺度策略
- 效果：攻击有效，泛化能力强|
|🆕 发布|The Sword of Damocles in ViTs: Computational Redundancy Amplifies Adversarial Transferability|达摩克利斯之剑在ViTs中：计算冗余加剧对抗性迁移|Jiani Liu, Zhiyuan Wang, Zeliang Zhang, Chao Huang, Susan Liang, Yunlong Tang, Chenliang Xu|<http://arxiv.org/pdf/2504.10


arent 100%); */
  -webkit-mask-composite: source-in, xor;
  mask-composite: intersect;
}
// Mixins
// --------------------------

@mixin fa-icon {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  line-height: 1;
}

@mixin fa-icon-rotate($degrees, $rotation) {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})";
  transform: rotate($degrees);
}

@mixin fa-icon-flip($horiz, $vert, $rotation) {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)";
  transform: scale($horiz, $vert);
}

// Only display content to screen readers. A la Bootstrap 4.
//
// See: http://a11yproject.com/posts/how-to-hide-content/

@mixin sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

// Use in conjunction with .sr-only to only display content when it's focused.
//
// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
//
// Credit: HTML5 Boilerplate

@mixin sr-only-focusable {
  &:active,
  &:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
  }
}
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */

.#{$fa-css-prefix}-500px:before { content: fa-content($fa-var-500px); }
.#{$fa-css-prefix}-accessible-icon:before { content: fa-content($fa-var-accessible-icon); }
.#{$fa-css-prefix}-accusoft:before { content: fa-content($fa-var-accusoft); }
.#{$fa-css-prefix}-acquisitions-incorporated:before { content: fa-content($fa-var-acquisitions-incorporated); }
.#{$fa-css-prefix}-ad:before { content: fa-content($fa-var-ad); }
.#{$fa-css-prefix}-address-book:before { content: fa-content($fa-var-address-book); }
.#{$fa-css-prefix}-address-card:before { content: fa-content($fa-var-address-card); }
.#{$fa-css-prefix}-adjust:before { content: fa-content($fa-var-adjust); }
.#{$fa-css-prefix}-adn:before { content: fa-content($fa-var-adn); }
.#{$fa-css-prefix}-adobe:before { content: fa-content($fa-var-adobe); }
.#{$fa-css-prefix}-adversal:before { content: fa-content($fa-var-adversal); }
.#{$fa-css-prefix}-affiliatetheme:before { content: fa-content($fa-var-affiliatetheme); }
.#{$fa-css-prefix}-air-freshener:before { content: fa-content($fa-var-air-freshener); }
.#{$fa-css-prefix}-airbnb:before { content: fa-content($fa-var-airbnb); }
.#{$fa-css-prefix}-algolia:before { content: fa-content($fa-


oveEventFunc(CheckRefuse)
  ChoiceTaken()
end

function CheckNeedGirder()
  if stage == loseStage then
    return false
  end
  return denseDead == false and GetX(dense) > 1640 and StoppedGear(dense)
end

function DoNeedGirder()
  if stage == loseStage then
    return
  end
  local ctrl = loc("Hint: To place a girder, select it,|then use [Left] and [Right] to select angle and length,|then choose a location for the girder.")
  if INTERFACE == "touch" then
    ctrl = ctrl .. "|" .. loc("Choose location: Tap the [Target] button, then tap on the spot you want to choose")
  else
    ctrl = ctrl .. "|" .. loc("Choose location: Left click")
  end
  ShowMission(loc("The Shadow Falls"), loc("Under Construction"), loc("Return to Leaks A Lot!") .. "|" .. ctrl, 1, 6000)
end

function CheckNeedWeapons()
  if stage == loseStage then
    return false
  end
  return denseDead == false and GetX(dense) > 2522 and StoppedGear(dense)
end

function DoNeedWeapons()
  if stage == loseStage then
    return
  end
  grenadeCrate = SpawnSupplyCrate(2550, 800, amGrenade)
  shotgunCrate = SpawnSupplyCrate(2610, 850, amShotgun)
  AddCaption(loc("A little gift from the cyborgs"))
end

function CheckReadyForStronglings()
  if stage == loseStage then
    return false
  end
  if not IsHogAlive(dense) then
    return false
  end
  return (shotgunTaken and grenadeTaken) or GetX(dense) > 2700
end

function DoReadyForStronglings()
  if stage == loseStage then
    return
  end

  ShowMission(loc("The Shadow Falls"), loc("The guardian"), loc("Defeat the cannibals!") .."|".. loc("Leaks A Lot must survive!"), 1, 12000)
  AddAmmo(dense, amSkip, 100)
  AddAmmo(dense, amSwitch, 100)
  AddAmmo(leaks, amSkip, 100)
  AddAmmo(leaks, amSwitch, 100)
  stage = duoStage
  RemoveEventFunc(CheckNeedGirder)
  RemoveEventFunc(CheckNeedWeapons)
  RemoveEventFunc(CheckDenseDead)
  AddEvent(CheckStronglingsDead, {}, DoStronglingsDead, {}, 0)
  AddAmmo(cannibals[6], amGrenade, 2)
  AddAmmo(cannibals[6], amShotgun, 2)
  AddAmmo(cannibals[7], amGrenade, 2)
  AddAmmo(cannibals[7], amShotgun, 2)
  AddAmmo(cannibals[8], amGrenade, 2)
  AddAmmo(cannibals[8], amShotgun, 2)
  AddAmmo(cannibals[9], amGrenade, 2)
  AddAmmo(cannibals[9], amShotgun, 2)
  SetGearMessage(leaks, 0)
  SetGearMessage(dense, 0)
  SetTurnTimeLeft(TurnTime)
end

function DoStronglingsDead()
  if stage == loseStage then
    return
  end
  if not IsHogAlive(leaks) then
    return
  end
  SetGearMessage(CurrentHedgehog, 0)
  if denseDead == true then
    AddAnim(acceptedDiedFinalAnim)
    SaveCampaignVar("M2DenseDead", "1")
  else
    SetupAcceptedSurvivedFinalAnim()
    AddAnim(acceptedSurvivedFinalAnim)
    SaveCampaignVar("M2DenseDead", "0")
  end
  SaveCampaignVar("M2RamonDead", "0")
  SaveCampaignVar("M2SpikyDead", "0")
  AddFunction({func = KillCyborg, args = {}})
  if progress and progress<2 then
    SaveCampaignVar("Progress", "2")
  end
  SaveCampaignVar("M


1e, 0x1e, 0x1f
/* 8001A1D4 00016FD4  48 00 01 4C */	b lbl_8001A320
lbl_8001A1D8:
/* 8001A1D8 00016FD8  3C C0 00 08 */	lis r6, 0x00080002@ha
/* 8001A1DC 00016FDC  7C E5 42 78 */	xor r5, r7, r8
/* 8001A1E0 00016FE0  38 C6 00 02 */	addi r6, r6, 0x00080002@l
/* 8001A1E4 00016FE4  7F 46 30 38 */	and r6, r26, r6
/* 8001A1E8 00016FE8  7C C6 42 78 */	xor r6, r6, r8
/* 8001A1EC 00016FEC  7C C5 2B 79 */	or. r5, r6, r5
/* 8001A1F0 00016FF0  41 82 01 30 */	beq lbl_8001A320
/* 8001A1F4 00016FF4  3C A0 80 49 */	lis r5, lbl_804965C4@ha
/* 8001A1F8 00016FF8  88 DF 00 0C */	lbz r6, 0xc(r31)
/* 8001A1FC 00016FFC  38 A5 65 C4 */	addi r5, r5, lbl_804965C4@l
/* 8001A200 00017000  7C 65 1A 14 */	add r3, r5, r3
/* 8001A204 00017004  54 C5 F7 BE */	rlwinm r5, r6, 0x1e, 0x1e, 0x1f
/* 8001A208 00017008  7C 03 00 AE */	lbzx r0, r3, r0
/* 8001A20C 0001700C  7C 03 07 74 */	extsb r3, r0
/* 8001A210 00017010  38 03 FF FF */	addi r0, r3, -1
/* 8001A214 00017014  7C 05 00 00 */	cmpw r5, r0
/* 8001A218 00017018  40 80 01 08 */	bge lbl_8001A320
/* 8001A21C 0001701C  38 05 00 01 */	addi r0, r5, 1
/* 8001A220 00017020  7C BE 2B 78 */	mr r30, r5
/* 8001A224 00017024  50 06 17 3A */	rlwimi r6, r0, 2, 0x1c, 0x1d
/* 8001A228 00017028  38 80 00 01 */	li r4, 1
/* 8001A22C 0001702C  98 DF 00 0C */	stb r6, 0xc(r31)
/* 8001A230 00017030  88 1F 00 0C */	lbz r0, 0xc(r31)
/* 8001A234 00017034  54 19 F7 BE */	rlwinm r25, r0, 0x1e, 0x1e, 0x1f
/* 8001A238 00017038  48 00 00 E8 */	b lbl_8001A320
/* 8001A23C 0001703C  3C A0 00 04 */	lis r5, 0x00040001@ha
/* 8001A240 00017040  39 00 00 00 */	li r8, 0
/* 8001A244 00017044  38 A5 00 01 */	addi r5, r5, 0x00040001@l
/* 8001A248 00017048  7F 45 28 38 */	and r5, r26, r5
/* 8001A24C 0001704C  7F 67 40 38 */	and r7, r27, r8
/* 8001A250 00017050  7C A6 42 78 */	xor r6, r5, r8
/* 8001A254 00017


build = { PhotoNetwork.loadWallpaperBannerList() }) {
        if ("0" == it.errno) Result.success(it.data)
        else Result.failure(ServiceException(it.errmsg))
    }

    fun postComment(momentComment: Map<String, Any?>, isReply: Boolean) = launchAndGetData {
        if (isReply) FishNetwork.replyComment(momentComment)
        else FishNetwork.postComment(momentComment)
    }

    fun dynamicLikes(momentId: String) = launchAndGetMsg { FishNetwork.dynamicLikes(momentId) }

    fun loadTopicList() = launchAndGetData { FishNetwork.loadTopicList() }

    fun getRichList() = launchAndGetData { UserNetwork.getRichList() }

    fun readQaMsg(msgId: String) = launchAndGetMsg { MsgNetwork.readQaMsg(msgId) }

    fun readAtMeMsg(msgId: String) = launchAndGetMsg { MsgNetwork.readAtMeMsg(msgId) }

    fun readMomentMsg(msgId: String) = launchAndGetMsg { MsgNetwork.readMomentMsg(msgId) }

    /**
     * 更新文章消息为：已回复
     */
    fun replyArticleMsg(msgId: String) = launchAndGetMsg { MsgNetwork.readArticleMsg(msgId, 2) }

    /**
     * 更新文章消息为：已读
     */
    fun readArticleMsg(msgId: String) = launchAndGetMsg { MsgNetwork.readArticleMsg(msgId, 1) }

    /**
     * 一键已读所有消息
     */
    fun readAllMsg() = launchAndGetMsg { MsgNetwork.readAllMsg() }

    /**
     * 获取未读消息数量
     */
    fun getUnReadMsgCount(): Flow<UnReadMsgCount> {
        return flow {
            val result = MsgNetwork.getUnReadMsgCount()
            val responseData = result.getData()
            takeUnless { result.isSuccess() }?.let { result.toErrorResult<UnReadMsgCount, UnReadMsgCount>().getOrThrow() }
            emit(responseData)
        }.flowOn(Dispatchers.IO)
    }

    fun searchPlaces(query: String) = liveData(build = { WeatherNetwork.searchPlace(query) }) { placeResponse ->
        Timber.d("searchPlaces：===> query status is ${placeResponse.status}|${placeResponse.places[0].name}")
        if (placeResponse.status == "ok") Result.success(placeResponse.places)
        else Result.failure(RuntimeException("response status is ${placeResponse.status}"))
    }

    /**
     * 刷新天气
     */
    fun refreshWeather(lng: String, lat: String): LiveData<Result<Weather>> = liveData(build = {
        Timber.d("refreshWeather：===> lng is $lng lat is $lat")
        Pair(withContext(Dispatchers.IO) { WeatherNetwork.getRealtimeWeather(lng, lat) },
            withContext(Dispatchers.IO) { WeatherNetwork.getDailyWeather(lng, lat) })
    }) { (realtimeResponse, dailyResponse) ->
        if (realtimeResponse.status == "ok" && dailyResponse.status == "ok") {
            Result.success(Weather(realtimeResponse.result.realtime, dailyResponse.result.daily))
        } else {
            val errorMsg = """
                    "realtimeWeather status is ${realtimeResponse.status}
                    dailyWeather status is ${dailyResponse.status}"
                """.trimIndent()
            Result.failure(RuntimeException(errorMsg))
        }
    }

    /**
     * 保存地点
     */
    fun savePlace(place: Place) = PlaceDao.savePlace(place)

    /**
     * 获取保存的地点
     */
    fun getSavedPlace() = PlaceDao.getSavedPlace()

    /**
     * 是否保存了地点
     */
    fun isSaved() = PlaceDao.isSaved()

    private inline fun <R, T> liveDat


llback = k_iSteamUtilsCallbacks + 1 };
};

//-----------------------------------------------------------------------------
// Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute
//-----------------------------------------------------------------------------
struct LowBatteryPower_t
{
	enum { k_iCallback = k_iSteamUtilsCallbacks + 2 };
	uint8 m_nMinutesBatteryLeft;
};

//-----------------------------------------------------------------------------
// Purpose: called when a SteamAsyncCall_t has completed (or failed)
//-----------------------------------------------------------------------------
struct SteamAPICallCompleted_t
{
	enum { k_iCallback = k_iSteamUtilsCallbacks + 3 };
	SteamAPICall_t m_hAsyncCall;
	int m_iCallback;
	uint32 m_cubParam;
};

//-----------------------------------------------------------------------------
// called when Steam wants to shutdown
//-----------------------------------------------------------------------------
struct SteamShutdown_t
{
	enum { k_iCallback = k_iSteamUtilsCallbacks + 4 };
};

//-----------------------------------------------------------------------------
// results for CheckFileSignature
//-----------------------------------------------------------------------------
enum ECheckFileSignature
{
	k_ECheckFileSignatureInvalidSignature = 0,
	k_ECheckFileSignatureValidSignature = 1,
	k_ECheckFileSignatureFileNotFound = 2,
	k_ECheckFileSignatureNoSignaturesFoundForThisApp = 3,
	k_ECheckFileSignatureNoSignaturesFoundForThisFile = 4,
};

//-----------------------------------------------------------------------------
// callback for CheckFileSignature
//-----------------------------------------------------------------------------
struct CheckFileSignature_t
{
	enum { k_iCallback = k_iSteamUtilsCallbacks + 5 };
	ECheckFileSignature m_eCheckFileSignature;
};

// k_iSteamUtilsCallbacks + 13 is taken

//-----------------------------------------------------------------------------
// Full Screen gamepad text input has been closed
//-----------------------------------------------------------------------------
struct GamepadTextInputDismissed_t
{
	enum { k_iCallback = k_iSteamUtilsCallbacks + 14 };
	bool m_bSubmitted;										// true if user entered & accepted text (Call ISteamUtils::GetEnteredGamepadTextInput() for text), false if canceled input
	uint32 m_unSubmittedText;
	AppId_t m_unAppID;
};

// k_iSteamUtilsCallbacks + 15 through 35 are taken

STEAM_CALLBACK_BEGIN( AppResumingFromSuspend_t, k_iSteamUtilsCallbacks + 36 )
STEAM_CALLBACK_END(0)

// k_iSteamUtilsCallbacks + 37 is taken

//-----------------------------------------------------------------------------
// The floating on-screen keyboard has been closed
//-----------------------------------------------------------------------------
struct FloatingGamepadTextInputDismissed_t
{
	enum { k_iCallback = k_iSteamUtilsCallbacks + 38 };
};

//-----------------------------------------------------------------------------
// The text filtering dictionary has changed
//-----------------------------------------------------------------------------
struct FilterTextDictionaryChanged_t
{
	enum { k_iCallback = k_iSteamUtilsCallbacks + 39 };
	int m_eLanguage;	// One of ELanguage, or k_LegallyRequiredFiltering
};

#pragma pack( pop )

#endif // ISTEAMUTILS_H


from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _

class SyndicationConfig(AppConfig):
    name = "django.contrib.syndication"
    verbose_name = _("Syndication")


 x21, LSL #2\n"
      "add x9, x10, x21, LSL #2\n"
      "149:"  // Height 5: input setup done
      "cmp x14, #0x4\n"
      "blt 152f\n"
      "ldr q0, [x13, #0x0]\n"
      "cmp x14, #0x8\n"
      "ldr q1, [x12, #0x0]\n"
      "ldr q2, [x11, #0x0]\n"
      "ldr q3, [x10, #0x0]\n"
      "ldr q4, [x9, #0x0]\n"
      "ldr q6, [x17, #0x0]\n"
      "ldr q7, [x17, #0x10]\n"
      "blt 151f\n"
      "150:"  // Height 5: Multiply loop: Main loop head
      "fmla v8.4s, v6.4s, v0.s[0]\n"
      "ldr x21, [x17, #0x28]\n"
      "fmla v12.4s, v6.4s, v1.s[0]\n"
      "ldr x20, [x17, #0x38]\n"
      "fmla v16.4s, v6.4s, v2.s[0]\n"
      "add x13, x13, #0x10\n"
      "fmla v20.4s, v6.4s, v3.s[0]\n"
      "add x12, x12, #0x10\n"
      "fmla v24.4s, v6.4s, v4.s[0]\n"
      "ldr d29, [x17, #0x20]\n"
      "fmla v9.4s, v7.4s, v0.s[0]\n"
      "add x11, x11, #0x10\n"
      "fmla v13.4s, v7.4s, v1.s[0]\n"
      "add x10, x10, #0x10\n"
      "fmla v17.4s, v7.4s, v2.s[0]\n"
      "mov v29.d[1], x21\n"
      "fmla v21.4s, v7.4s, v3.s[0]\n"
      "ldr x21, [x17, #0x48]\n"
      "fmla v25.4s, v7.4s, v4.s[0]\n"
      "ldr d28, [x17, #0x30]\n"
      "fmla v10.4s, v29.4s, v0.s[0]\n"
      "add x9, x9, #0x10\n"
      "fmla v14.4s, v29.4s, v1.s[0]\n"
      "ldr x26, [x13, #0x8]\n"
      "mov v28.d[1], x20\n"
      "fmla v18.4s, v29.4s, v2.s[0]\n"
      "fmla v22.4s, v29.4s, v3.s[0]\n"
      "ldr x20, [x17, #0x58]\n"
      "fmla v26.4s, v29.4s, v4.s[0]\n"
      "ldr d29, [x17, #0x40]\n"
      "fmla v11.4s, v28.4s, v0.s[0]\n"
      "ldr x25, [x12, #0x8]\n"
      "fmla v15.4s, v28.4s, v1.s[0]\n"
      "ldr x24, [x11, #0x8]\n"
      "fmla v19.4s, v28.4s, v2.s[0]\n"
      "mov v29.d[1], x21\n"
      "fmla v23.4s, v


});
					}
					pageHelper.showSuccToast('删除成功', 1500, callback);
				});
			} catch (err) {
				console.log(err);
			}
		}

		pageHelper.showConfirm('确认删除?', cb);
	},

	_getSearchMenu: function () {

		let sortItem1 = [

		];

		let sortMenus = [
			{ label: '全部', type: 'all', value: '' },
			{ label: '最早ˇ', type: 'sort', value: 'COMMENT_ADD_TIME|asc' },
			{ label: '点赞数ˇ', type: 'like', value: '' },
			{ label: '我的评论', type: 'mycomment', value: '' },
			{ label: '我的点赞', type: 'mylike', value: '' },
		];

		if (this.data.isAdmin) {
			sortMenus = [
				{ label: '全部', type: 'all', value: '' },
				{ label: '最早ˇ', type: 'sort', value: 'COMMENT_ADD_TIME|asc' },
				{ label: '点赞数ˇ', type: 'like', value: '' }
			];
		}

		this.setData({
			isLoad: true,
			sortItems: [],
			sortMenus
		})

	},
})/* 参考文档: https://github.com/IceApriler/miniprogram-picker */
/*
[{
	label:'ddd' // 展示数据的字段名称
	val:'v1',
},
{
	label:'cccc',
	val:'v2'
}]
*/
const dataHelper = require('../../../helper/data_helper.js');

function isExist(field) {
	return field !== null && field !== undefined
}

Component({
	externalClasses: ['outside-picker-multi-class'],
	/**
	 * 组件的属性列表
	 */
	properties: {
		// 特定类型 time
		mode: { // minute
			type: String,
			value: ''
		},

		// time特定类型 对应的分钟步长
		timeModeStep: {
			type: Number,
			value: 1
		},

		// 初始化时，是否需要自动返回结果给开发者
		autoSelect: {
			type: Boolean,
			value: false
		},
		// 源数组，sourceData有几维，Picker就可以有几阶
		sourceData: {
			type: Array,
			value: [],
			observer: 'sourceDataChange'
		},
		// 阶数
		steps: {
			type: Number,
			value: 1
		},

		// 选择了第n列后，是否将大于n的列的选择值自动初始化为0
		initColumnSelectedIndex: {
			type: Boolean,
			value: false,
		},
		// 默认选中项的下标数组
		itemIndex: {
			type: Array,
			value: []
		},
		// 默认选中项的值数组
		itemMulti: {
			type: Array,
			value: [],
			observer: function (newVal, oldVal) {
				if (JSON.stringify(newVal) != JSON.stringify(oldVal)) {
					this.sourceDataChange(this.data.sourceData);
				}
			}
		},
		// 是否禁用
		disabled: {
			type: Boolean,
			value: false,
		},
		isSlot: { //是否开启slot
			type: Boolean,
			value: true,
		},
	},

	/**
	 * 组件的初始数据
	 */
	data: {

		// Picker当前所选择的索引数组 => 比如:[0, 0, 2]，表示第一列选择第0项，第二列选择第0项，第三列选择第2项。
		multiIndex: {
			type


823269f, 340.473755f, -212.804214f, -5.368430f);

            AddZoneArea("Southwest Tunnel", "", "", false, "wind_lp2", "wind_lp2");
            AddZoneAreaBox("Southwest Tunnel", 473.453552f, 358.147095f, 24.729561f, 336.825073f, 256.194977f, -27.863100f);
            AddZoneAreaBox("Southwest Tunnel", 454.195770f, -214.330215f, 44.012981f, 316.785950f, -288.690063f, -27.863100f);

            AddZoneArea("Central Tunnel", "", "", false, "wind_lp4", "wind_lp4");
            AddZoneAreaBox("Central Tunnel", 562.377991f, 182.709274f, 32.009251f, 392.926910f, -35.701130f, -35.316898f);

            AddZoneArea("Northwest Tunnel", "", "", false, "wind_lp4", "wind_lp4");
            AddZoneAreaBox("Northwest Tunnel", 715.138184f, 313.482269f, 102.215286f, 626.388977f, -8.161750f, -38.159229f);
            AddZoneAreaBox("Northwest Tunnel", 715.138184f, 177.230865f, 102.215286f, 557.901489f, -8.161750f, -38.159229f);
            AddZoneAreaBox("Northwest Tunnel", 646.349792f, -178.952515f, 73.669640f, 471.682922f, -286.248322f, -9.044160f);

            AddZoneLineBox("kaladima", 306.093964f, 231.490326f, 0.020500f, ZoneLineOrientationType.South, 394.649292f, 346.066956f, -1.531000f, 397.138519f, 312.694366f, -24.499941f);
            AddZoneLineBox("kaladima", 393.919128f, -263.472565f, 0.000040f, ZoneLineOrientationType.South, 384.053192f, -259.715820f, 22.414330f, 373.654907f, -272.101318f, -0.499970f);
            AddLiquidPlaneZLevel(ZoneLiquidType.Water, "t50_agua1", 789.445374f, 379.175079f, 736.143677f, 226.058517f, -75.968742f, 50f); // NW Rail Pool
            AddLiquidPlaneZLevel(ZoneLiquidType.Water, "t50_agua1", 1203.536499f, 188.962967f, 1120.689331f, 76.613777f, 22.000019f, 50f); // Outside north temple area
            AddLiquidPlaneZLevel(ZoneLiquidType.Water, "t50_agua1", 628.413330f, -26.542490f, 443.050323f, -200.405060f, -3.999960f, 50f); // Large dock area, north
            AddLiquidPlaneZLevel(ZoneLiquidType.Water, "t50_agua1", 460.282043f, -42.519150f, 330.709229f, -153.390045f, -3.999960f, 50f); // Large dock area, south
        }
    }
}


angle(3, 4, rand);
        DMatrixRMaj B = RandomMatrices_DDRM.rectangle(3, 4, rand);
        BMatrixRMaj expected = new BMatrixRMaj(3, 4);
        BMatrixRMaj found = new BMatrixRMaj(3, 4);

        A.data[6] = B.data[6];

        for (int i = 0; i < A.getNumElements(); i++) {
            expected.data[i] = A.data[i] < B.data[i];
        }

        CommonOps_DDRM.elementLessThan(A, B, found);
        assertTrue(MatrixFeatures_DDRM.isEquals(expected, found));
    }

    @Test void elementLessThanOrEqual_matrix() {
        DMatrixRMaj A = RandomMatrices_DDRM.rectangle(3, 4, rand);
        DMatrixRMaj B = RandomMatrices_DDRM.rectangle(3, 4, rand);
        BMatrixRMaj expected = new BMatrixRMaj(3, 4);
        BMatrixRMaj found = new BMatrixRMaj(3, 4);

        A.data[6] = B.data[6];

        for (int i = 0; i < A.getNumElements(); i++) {
            expected.data[i] = A.data[i] <= B.data[i];
        }

        CommonOps_DDRM.elementLessThanOrEqual(A, B, found);
        assertTrue(MatrixFeatures_DDRM.isEquals(expected, found));
    }

    @Test void elements() {
        DMatrixRMaj A = RandomMatrices_DDRM.rectangle(3, 4, rand);

        BMatrixRMaj B = RandomMatrices_DDRM.randomBinary(3, 4, rand);

        DMatrixRMaj found = CommonOps_DDRM.elements(A, B, null);

        int index = 0;

        for (int i = 0; i < B.getNumElements(); i++) {
            if (B.get(i)) {
                assertEquals(found.get(index++), A.get(i), UtilEjml.TEST_F64);
            }
        }

        assertEquals(index, found.getNumRows());
        assertEquals(1, found.getNumCols());
    }

    @Test void countTrue() {
        BMatrixRMaj B = RandomMatrices_DDRM.randomBinary(4, 5, rand);

        int index = 0;

        for (int i = 0; i < B.getNumElements(); i++) {
            if (B.get(i)) {
                index++;
            }
        }

        assertTrue(index > 5);
        assertEquals(index, CommonOps_DDRM.countTrue(B));
    }

    @Test void concatColumns() {
        DMatrixRMaj A = RandomMatrices_DDRM.rectangle(3, 4, rand);
        DMatrixRMaj B = RandomMatrices_DDRM.rectangle(5, 6, rand);

        DMatrixRMaj out = new DMatrixRMaj(1, 1);
        CommonOps_DDRM.concatColumns(A, B, out);
        assertEquals(5, out.numRows);
        assertEquals(10, out.numCols);
        checkEquals(out, 0, 0, A);
        checkEquals(out, 0, 4, B);
    }

    @Test void concatColumnsMulti() {
        DMatrixRMaj a = CommonOps_DDRM.concatColumnsMulti();
        assertEquals(0, a.numRows);
        assertEquals(0, a.numCols);

        DMatrixRMaj A = RandomMatrices_DDRM.rectangle(3, 4, rand);
        DMatrixRMaj B = RandomMatrices_DDRM.rectangle(5, 6, rand);

        a = CommonOps_DDRM.concatColumnsMulti(A, B);
        assertEquals(5, a.numRows);
        assertEquals(10, a.numCols);
        checkEqual


"""
Feature: 4.3.10 Dict Merge (Python 3.9+)
Category: Data Structures
Complexity: Low
Status: not_implemented
"""

import pytest

PYTHON_SOURCE = """
merged = d1 | d2
"""

EXPECTED_RUST = """
// TODO: Add Rust equivalent
"""

@pytest.mark.complexity("low")
@pytest.mark.status("not_implemented")
def test_4310_dict_merge_python_39():
    """Test translation of 4.3.10 Dict Merge (Python 3.9+)."""
    pytest.skip("Feature not yet implemented")


0) / 1000.0
}

func main() {
	fmt.Println("🍔 Zomato Container Resource Optimizer")
	fmt.Println("Production-ready resource optimization for food delivery")
	fmt.Println("=" * 60)

	// Initialize optimizer
	optimizer := NewZomatoResourceOptimizer()

	// Start HTTP server for API and metrics
	go func() {
		optimizer.HTTPHandler()
		log.Println("🌐 HTTP API server starting on :8080")
		log.Println("   - Recommendations: http://localhost:8080/recommendations")
		log.Println("   - Metrics: http://localhost:8080/metrics")
		log.Println("   - Prometheus: http://localhost:8080/prometheus")

		if err := http.ListenAndServe(":8080", nil); err != nil {
			log.Fatalf("HTTP server failed: %v", err)
		}
	}()

	// Run initial analysis
	optimizer.CollectMetrics()
	optimizer.AnalyzeAndOptimize()
	optimizer.printOptimizationSummary()

	// Start continuous optimization (this would run indefinitely in production)
	log.Println("🔄 Starting optimization loop...")
	log.Println("Press Ctrl+C to stop")

	// For demo, run for limited time
	for i := 0; i < 3; i++ {
		time.Sleep(30 * time.Second)
		optimizer.CollectMetrics()
		optimizer.AnalyzeAndOptimize()
		optimizer.printOptimizationSummary()
	}

	fmt.Println("\n✅ Zomato resource optimization demo completed!")
	fmt.Println("In production, this would:")
	fmt.Println("  - Integrate with Kubernetes APIs for actual scaling")
	fmt.Println("  - Connect to real Prometheus for metrics")
	fmt.Println("  - Send recommendations to cost management systems")
	fmt.Println("  - Provide detailed financial reporting")
}

/*
Production Deployment:

# Build the Go application:
go mod init zomato-optimizer
go mod tidy
go build -o zomato-optimizer

# Docker container:
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY . .
RUN go build -o zomato-optimizer

FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/zomato-optimizer .
CMD ["./zomato-optimizer"]

# Kubernetes deployment:
kubectl apply -f zomato-optimizer-deployment.yaml

# Monitor resource optimization:
curl http://localhost:8080/recommendations | jq .

# Prometheus integration:
curl http://localhost:8080/prometheus
*/package main

/*
Flux Payment Controller
Indian Payment Systems के लिए custom Flux controller

यह controller payment systems के लिए specialized GitOps operations handle करता है:
- RBI compliance checks
- Payment gateway health monitoring
- Automatic rollbacks on transaction failures
- Festival traffic management

Author: Payment Engineering Team - Razorpay/PhonePe
*/

import (
	"context"
	"fmt"
	"log"
	"strconv"
	"time"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/client-go/kubernetes"
	ctrl "sigs.k8s.io/controller-runtime"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sigs.k8s.io/controller-runtime/pkg/log/zap"

	fluxv2 "github.com/fluxcd/flux2/api/v1beta2"
)

// PaymentGitOpsConfig represents payment system GitOps configuration
// Payment system के लिए specialized configuration
type PaymentGitOpsConfig struct {
	metav1.TypeMeta   `json


 N_NOR],
            ]),
            2 => faces.push(&[
                [i % N_POS, (i + 15) % N_UV, (i * 24) % N_NOR],
                [(i + 1) % N_POS, (i + 16) % N_UV, (i * 24 + 1) % N_NOR],
                [(i + 2) % N_POS, (i + 17) % N_UV, (i * 24 + 2) % N_NOR],
                [(i + 3) % N_POS, (i + 18) % N_UV, (i * 24 + 3) % N_NOR],
                [(i + 4) % N_POS, (i + 19) % N_UV, (i * 24 + 4) % N_NOR],
            ]),
            3 => faces.push(&[
                [i % N_POS, (i + 15) % N_UV, (i * 24) % N_NOR],
                [(i + 1) % N_POS, (i + 16) % N_UV, (i * 24 + 1) % N_NOR],
                [(i + 2) % N_POS, (i + 17) % N_UV, (i * 24 + 2) % N_NOR],
                [(i + 3) % N_POS, (i + 18) % N_UV, (i * 24 + 3) % N_NOR],
                [(i + 4) % N_POS, (i + 19) % N_UV, (i * 24 + 4) % N_NOR],
                [(i + 5) % N_POS, (i + 20) % N_UV, (i * 24 + 5) % N_NOR],
            ]),
            _ => {}
        }
    }
    let mut mesh = PolygonMesh::new(
        StandardAttributes {
            positions,
            uv_coords,
            normals,
        },
        faces,
    );
    let attrs: Vec<_> = mesh
        .faces()
        .face_iter()
        .flatten()
        .map(|v| {
            (
                mesh.positions()[v.pos],
                mesh.uv_coords()[v.uv.unwrap()],
                mesh.normals()[v.nor.unwrap()],
            )
        })
        .collect();

    mesh.put_together_same_attrs();
    mesh.faces()
        .face_iter()
        .flatten()
        .zip(&attrs)
        .for_each(|(v, attr)| {
            assert!(mesh.positions()[v.pos].near(&attr.0));
            assert!(mesh.uv_coords()[v.uv.unwrap()].near(&attr.1));
            assert!(mesh.normals()[v.nor.unwrap()].near(&attr.2));
        });

    mesh.remove_unused_attrs();
    mesh.faces()
        .face_iter()
        .flatten()
        .zip(&attrs)
        .for_each(|(v, attr)| {
            assert!(mesh.positions()[v.pos].near(&attr.0));
            assert!(mesh.uv_coords()[v.uv.unwrap()].near(&attr.1));
            assert!(mesh.normals()[v.nor.unwrap()].near(&attr.2));
        });
    assert_eq!(mesh.positions().len(), 19);
    assert_eq!(mesh.uv_coords().len(), 18);
    assert_eq!(mesh.normals().len(), 17);
}
<filename>query/tests/it/sessions/session.rs<gh_stars>0
// Copyright 2021 <NAME>.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

use common_base::tokio;
use common_exception::Result;
use common_mem_allocator::malloc_size;
use databend_query::sessions::Session;
use databend_query::s


f.latex?%24%24%7B%5Cgamma%20%5E%7B%28k%29%7D%7D%2C%7B%5Cbeta%20%5E%7B%28k%29%7D%7D%24%24) ，然后令：![$${y^{(k)}} = {\gamma ^{(k)}}{\widehat x^{(k)}} + {\beta ^{(k)}}$$](http://latex.codecogs.com/gif.latex?%24%24%7By%5E%7B%28k%29%7D%7D%20%3D%20%7B%5Cgamma%20%5E%7B%28k%29%7D%7D%7B%5Cwidehat%20x%5E%7B%28k%29%7D%7D%20+%20%7B%5Cbeta%20%5E%7B%28k%29%7D%7D%24%24)
 - 从式子来看就是对标准化的数据进行**缩放和平移**，不至于使数据落在线性区域内，增加数据的表达能力（式子中如果：![$${\gamma ^{(k)}} = \sqrt {Var[{{\rm{x}}^{(k)}}]} $$](http://latex.codecogs.com/gif.latex?%24%24%7B%5Cgamma%20%5E%7B%28k%29%7D%7D%20%3D%20%5Csqrt%20%7BVar%5B%7B%7B%5Crm%7Bx%7D%7D%5E%7B%28k%29%7D%7D%5D%7D%20%24%24)，![$${\beta ^{(k)}} = E[{x^{(k)}}]$$](http://latex.codecogs.com/gif.latex?%24%24%7B%5Cbeta%20%5E%7B%28k%29%7D%7D%20%3D%20E%5B%7Bx%5E%7B%28k%29%7D%7D%5D%24%24) ，就会使**恢复到原来的值**了）
 - 但是这里还是使用的**全部的数据集**，但是如果使用**随机梯度下降**，可以选取一个**batch**进行训练
- 简化2
 - 第二种简化就是使用`mini-batch`进行`随机梯度下降`
 - 注意这里使用`mini-batch`也是标准化**每一个维度**上的特征，而不是所有的特征一起，因为若果`mini-batch`中的数据量小于特征的维度时，会产生**奇异协方差矩阵**， 对应的**行列式**的值为0，非满秩
 - 假设mini-batch 大小为`m`的`B`
 - ![$$B = \{ {x_{1 \ldots m}}\} $$](http://latex.codecogs.com/gif.latex?%24%24B%20%3D%20%5C%7B%20%7Bx_%7B1%20%5Cldots%20m%7D%7D%5C%7D%20%24%24)，对应的变换操作为：![$$B{N_{\gamma ,\beta }}:{x_{1 \ldots m}} \to {y_{1 \ldots m}}$$](http://latex.codecogs.com/gif.latex?%24%24B%7BN_%7B%5Cgamma%20%2C%5Cbeta%20%7D%7D%3A%7Bx_%7B1%20%5Cldots%20m%7D%


bmd9IFJldHVybnMgdGhlIGB0b1N0cmluZ1RhZ2AuXG4gKi9cbmZ1bmN0aW9uIGJhc2VHZXRUYWcodmFsdWUpIHtcbiAgaWYgKHZhbHVlID09IG51bGwpIHtcbiAgICByZXR1cm4gdmFsdWUgPT09IHVuZGVmaW5lZCA/IHVuZGVmaW5lZFRhZyA6IG51bGxUYWc7XG4gIH1cbiAgcmV0dXJuIChzeW1Ub1N0cmluZ1RhZyAmJiBzeW1Ub1N0cmluZ1RhZyBpbiBPYmplY3QodmFsdWUpKVxuICAgID8gZ2V0UmF3VGFnKHZhbHVlKVxuICAgIDogb2JqZWN0VG9TdHJpbmcodmFsdWUpO1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGJhc2VHZXRUYWc7XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lodash/_baseGetTag.js\n");

/***/ }),

/***/ "./node_modules/lodash/_baseIsNative.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_baseIsNative.js ***!
  \**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

eval("var isFunction = __webpack_require__(/*! ./isFunction */ \"./node_modules/lodash/isFunction.js\"),\n    isMasked = __webpack_require__(/*! ./_isMasked */ \"./node_modules/lodash/_isMasked.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    toSource = __webpack_require__(/*! ./_toSource */ \"./node_modules/lodash/_toSource.js\");\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnP


(Appears on:
RequestHashPolicy)

HeaderHashOptions contains options to configure a HTTP request header hash
policy, used in request attribute hash based load balancing.

Field
Description

headerName

string

HeaderName is the name of the HTTP request header that will be used to
calculate the hash key. If the header specified is not present on a
request, no hash will be produced.

HeaderMatchCondition

(Appears on:
MatchCondition,
RequestHeaderValueMatchDescriptor)

HeaderMatchCondition specifies how to conditionally match against HTTP
headers. The Name field is required, only one of Present, NotPresent,
Contains, NotContains, Exact, NotExact and Regex can be set.
For negative matching rules only (e.g. NotContains or NotExact) you can set
TreatMissingAsEmpty.
IgnoreCase has no effect for Regex.

Field
Description

name

string

Name is the name of the header to match against. Name is required.
Header names are case insensitive.

present

bool

(Optional)

Present specifies that condition is true when the named header
is present, regardless of its value. Note that setting Present
to false does not make the condition true if the named header
is absent.

notpresent

bool

(Optional)

NotPresent specifies that condition is true when the named header
is not present. Note that setting NotPresent to false does not
make the condition true if the named header is present.

contains

string

(Optional)

Contains specifies a substring that must be present in
the header value.

notcontains

string

(Optional)

NotContains specifies a substring that must not be present
in the header value.

ignoreCase

bool


("../../lib/activities/activity");
const activitystore = require("../../lib/activities/activitystore");

describe("Calendar Service", () => {
  const start = fieldHelpers.parseToDateTimeUsingDefaultTimezone("01.04.2013");
  const end = fieldHelpers.parseToDateTimeUsingDefaultTimezone("01.05.2013");
  const activity = new Activity({
    title: "Title",
    startDate: fieldHelpers.parseToDateTimeUsingDefaultTimezone("04.04.2013").toJSDate(),
    endDate: fieldHelpers.parseToDateTimeUsingDefaultTimezone("05.04.2013").toJSDate(),
    url: "myURL",
  });

  before(() => {
    sinon.stub(activitystore, "allActivitiesByDateRangeInAscendingOrder").returns([activity]);
  });

  it("loads and converts a wellformed Activity to a calendar display event without colors given", () => {
    const events = calendarService.eventsBetween(start.toMillis(), end.toMillis(), null);
    expect(events).to.have.length(1);
    const event = events[0];
    expect("Title").to.equal(event.title);
    expect("2013-04-04T00:00:00.000+02:00").to.equal(event.start); // includes timezone offset!
    expect(event.url).to.match("/activities/myURL$");
    expect("#353535").to.equal(event.color);
  });
});
"use strict";

require("../../testutil/configureForTest");

const sinon = require("sinon").createSandbox();
const expect = require("must-dist");

const activitiesService = require("../../lib/activities/activitiesService");
const activitystore = require("../../lib/activities/activitystore");
const groupsService = require("../../lib/groups/groupsService");
const groupstore = require("../../lib/groups/groupstore");
const memberstore = require("../../lib/members/memberstore");
const membersService = require("../../lib/members/membersService");

const Activity = require("../../lib/activities/activity");
const Member = require("../../lib/members/member");
const Group = require("../../lib/groups/group");
const notifications = require("../../lib/notifications");

const dummyActivity = new Activity({
  title: "Title of the Activity",
  description: "description",
  assignedGroup: "assignedGroup",
  location: "location",
  direction: "direction",
  startDate: "01.01.2013",
  url: "urlOfTheActivity",
  color: "aus Gruppe",
});

const group = new Group({ id: "groupname", longName: "Buxtehude" });

function waitinglistMembersOf(activity) {
  /* eslint no-underscore-dangle: 0 */
  return activity
    .allWaitinglistEntries()
    .map((entry) => entry.state)
    .map((state) => state._memberId);
}

function activityWithEinzelzimmer(ressource) {
  const state = { resources: { Veranstaltung: ressource } };
  const activity = new Activity(state);
  sinon.stub(activitystore, "saveActivity");
  sinon.stub(activitystore, "getActivity").returns(activity);
  sinon.stub(activitystore, "getActivityForId").returns(activity);
  return activity;
}

describe("Activities Service", () => {
  beforeEach(() => {
    sinon.stub(activitystore, "allActivities").returns([dummyActivity]);

    sinon.stub(groupstore, "allGroups").returns([{ id: "assignedGroup", longName: "The name of the assigned Group" }]);
    sinon.stub(groupsService, "allGroupColors").returns({ assignedGroup: "#123456" });
  });

  afterEach(() => {
    sinon.restore();
  });

  it("returns the queried activities and enhances them with their color and group name", () => {
    const activities = activitiesService


2];
  }

  matrix[0] = cosValue;
  matrix[1] = sinValue;
  matrix[2] = -sinValue;
  matrix[3] = cosValue;
  matrix[4] = x - (cosValue * x - sinValue * y);
  matrix[5] = y - (sinValue * x + cosValue * y);
}
import { IOrder } from './IOrder';

/**
 * Defines a sort order for a specific piece of criteria.
 */
export class Order implements IOrder {
  /**
   * The criteria to order by.
   */
  public criteria: string;

  /**
   * Whether to sort in ascending order or not.
   */
  public ascending: boolean;

  /**
   * Creates an Order.
   * @param criteria The criteria to order by.
   * @param ascending The direction to sort.
   */
  public constructor(criteria: string, ascending: boolean = true) {
    this.criteria = criteria;
    this.ascending = ascending;
  }

  /**
   * Outputs the OData parameter string.
   * @returns {string} The resulting parameter string.
   */
  public toString() {
    // If the criteria is an empty string, we want to output that without desc.
    return this.ascending || !this.criteria ? this.criteria : `${this.criteria} desc`;
  }
}
// @ts-nocheck

/**
 * @name      wrapInner
 * @namespace            js.dom.manipulate
 * @type      Function
 * @platform          js
 * @status        beta
 *
 * Wrap the content of the passed `$parent` inside a the passed HTMLElement `$wrapper`
 *
 * @param    {HTMLElement}    $parent    The parent to wrap inner
 * @param    {HTMLElement}    $wrapper    The wrapper element
 * @return    {HTMLElement}             Return the parent element
 *
 * @snippet         __wrapInner($1, $2)
 *
 * @todo      interface
 * @todo      doc
 * @todo      tests
 *
 * @example    js
 * import { __wrapInner } from '@coffeekraken/sugar/dom'
 * const $myWrapper = document.createElement('div')
 * // assuming
 * //

 * //   Hello World
 * //

 * __wrapInner(document.querySelector('.container'), $myWrapper)
 * // return
 * //

 * //

 * //     Hello World
 * //

 * //

 *
 * @since           2.0.0
 * @author    Olivier Bossel <olivier.bossel@gmail.com> (https://olivierbossel@gmail.com)
 */
export default function __wrapInner(
    $parent: HTMLElement,
    $wrapper: HTMLElement,
): HTMLElement {
    if (typeof $wrapper === 'string') {
        $wrapper = document.createElement($wrapper);
    }
    $parent.appendChild($wrapper);
    while ($parent.firstChild !== $wrapper) {
        $wrapper.appendChild($parent.firstChild);
    }
    return $parent;
}
import { Integer } from '../types'

const BASE62 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
// const BASE64 = BASE62 + '+/'
const BASE64URL = BASE62 + '-_'

/**
 * Returns hashCode as hex (radix 16).
 *
 * All hash functions here are optimized for:
 *
 * 1. Performance
 * 2. For non-cryptographic use (where accidental collision is not the end-of-the-world)
 * 3. Compact size (32 bits max, versus 128 in md5; presented in less string json-safe characters)
 *
 * Basically, these functions are as simple as they can be, but still "random enough" for
 * normal non-cryp


isClockwise = circularArc3D.Normal.IsEqualTo(region.Normal.Negate());
                                            double angle = isClockwise ?
                                                -circularArc3D.ReferenceVector.Convert2d(plane).Angle :
                                                circularArc3D.ReferenceVector.Convert2d(plane).Angle;
                                            edgePtrCollection.Add(
                                                new CircularArc2d(
                                                    circularArc3D.Center.Convert2d(plane),
                                                    circularArc3D.Radius,
                                                    Standardise(circularArc3D.StartAngle + angle),
                                                    Standardise(circularArc3D.EndAngle + angle),
                                                    Vector2d.XAxis,
                                                    isClockwise));
                                        }
                                        edgeTypeCollection.Add(2);
                                        break;
                                    case EllipticalArc3d ellipticalArc3D:
                                        edgePtrCollection.Add(
                                            new EllipticalArc2d(
                                                ellipticalArc3D.Center.Convert2d(plane),
                                                ellipticalArc3D.MajorAxis.Convert2d(plane),
                                                ellipticalArc3D.MinorAxis.Convert2d(plane),
                                                ellipticalArc3D.MajorRadius,
                                                ellipticalArc3D.MinorRadius,
                                                ellipticalArc3D.StartAngle,
                                                ellipticalArc3D.EndAngle));
                                        edgeTypeCollection.Add(3);
                                        break;
                                    case NurbCurve3d nurbCurve3D:
                                        var ctrlPts = new Point2dCollection();
                                        for (int i = 0; i < nurbCurve3D.NumberOfControlPoints; i++)
                                        {


 ||
            (i18nLanguage == defaultLanguage && !bkInterfaceI18nAnnotation.responseDataCacheFlag)
        ) {
            context.proceed()
            return
        }
        val keyPrefixNames = bkInterfaceI18nAnnotation.keyPrefixNames
        // 2、获取实体对象里需要进行国际化翻译的字段集合
        val entity = context.entity
        val bkI18nFieldMap = MessageUtil.getBkI18nFieldMap(entity)
        val keyPrefixMap = mutableMapOf<String, String>()
        // 3、从实体对象中获取非数组类前缀名称的值
        keyPrefixNames.filter { !it.contains(ARRAY_WILDCARD_TEMPLATE) }.forEach { keyPrefixName ->
            val keyPrefixValue = getKeyPrefixValue(keyPrefixName, entity)
            keyPrefixValue?.let { keyPrefixMap[keyPrefixName] = it }
        }
        val propertyI18nKeyMap = mutableMapOf<String, String>()
        val dbI18nKeyMap = mutableMapOf<String, String>()
        // 4、获取需要进行国际化翻译的字段的国际化key值
        bkI18nFieldMap.forEach nextBkI18nField@{ fieldPath, i18nFieldInfo ->
            val i18nKeySb = StringBuilder()
            // 获取字段的key值
            val fieldKey = getFieldKey(fieldPath, i18nFieldInfo)
            // 判断字段是否需要复用接口定义的公共前缀
            if (i18nFieldInfo.reusePrefixFlag) {
                handleInterfaceKeyPrefixNames(
                    keyPrefixNames = keyPrefixNames,
                    fieldPath = fieldPath,
                    entity = entity,
                    i18nKeySb = i18nKeySb,
                    keyPrefixMap = keyPrefixMap
                )
            }
            i18nKeySb.append(fieldKey)
            val i18nKey = i18nKeySb.toString()
            // 根据国际化信息来源把字段信息分别放入不同的集合以便进行后续处理
            if (i18nFieldInfo.source == I18nSourceEnum.PROPERTIES) {
                propertyI18nKeyMap[fieldPath] = i18nKey
            } else {
                dbI18nKeyMap[fieldPath] = i18nKey
            }
        }
        // 5、为字段设置国际化信息
        setI18nFieldValue(dbI18nKeyMap, bkI18nFieldMap, propertyI18nKeyMap)
        context.proceed()
    }

    private fun setI18nFieldValue(
        dbI18nKeyMap: MutableMap<String, String>,
        bkI18nFieldMap: MutableMap<String, I18nFieldInfo>,
        propertyI18nKeyMap: MutableMap<String, String>
    ) {
        if (dbI18nKeyMap.isNotEmpty()) {
            setDbI18nFieldValue(dbI18nKeyMap, bkI18nFieldMap)
        }
        if (propertyI18nKeyMap.isNotEmpty()) {
            setPropertyI18nFieldValue(propertyI18nKeyMap, bkI18nFieldMap)
        }
    }

    /**
     * 获取字段国际化key
     * @param fieldPath 字段路径
     * @param i18nFieldInfo 国际化字段信息
     * @return 字段国际化key
     */
    private fun getFieldKey(
        fieldPath: String,
        i18nFieldInfo: I18nFieldInfo
    ): String {
        val fieldPathTemplateLastIndex = fieldPath.lastIndexOf(".")
        // 获取字段路径最


    else
        cv::bilateralFilter( src, dst, param1, param3, param4, cv::BORDER_REPLICATE );

    if( dst.data != dst0.data )
        CV_Error( CV_StsUnmatchedFormats, "The destination image does not have the proper type" );
}

/* End of file. */
/*M///////////////////////////////////////////////////////////////////////////////////////
//
//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
//  By downloading, copying, installing or using the software you agree to this license.
//  If you do not agree to this license, do not download, install,
//  copy or use the software.
//
//
//                           License Agreement
//                For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Copyright (C) 2014-2015, Itseez Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
//   * Redistribution's of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//
//   * Redistribution's in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation
//     and/or other materials provided with the distribution.
//
//   * The name of the copyright holders may not be used to endorse or promote products
//     derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/

#include "precomp.hpp"
#undef CV_FORCE_SIMD128_CPP  // expected AVX implementation only
#include "opencv2/core/hal/intrin.hpp"
#include "corner.hpp"

namespace cv
{

// load three 8-packed float vector and deinterleave
// probably it's better to write down somewhere else
static void load_deinterleave(const float* ptr, __m256& a, __m256& b, __m256& c)
{
    __m256 s0 = _mm256_loadu_ps(ptr);                    // a0, b0, c0, a1, b1, c1, a2, b2,
    __m256 s1 = _mm256_loadu_ps(ptr + 8);                // c2, a3, b3, c3, a4, b4, c4, a5,
    __m256 s2 = _mm256_loadu_ps(ptr + 16);               // b5, c5, a6, b6, c6, a7, b7, c7,
    __m256 s3 = _mm256_permute2f128_ps(s1, s2, 0x21);


\u5176\u4e2d\u4e00\u4e5d\u4e94\u4e94\u5e74\u5e94\u8be5\u902e\u6355520,000\u5de6\u53f3\u3002\u4e00\u4e5d\u4e94\u516d\u3001\u3001\u4e00\u4e5d\u4e94\u4e03\u5e74\u548c\u4e00\u4e5d\u4e94\u516b\u5e74\u6bcf\u5e74\u5e94\u5f53\u902e\u6355400,000\u540d\u5de6\u53f3\u3002", "type": "paragraph"}, {"text": "\u9644\u4e09\uff1a", "type": "appellation"}, {"text": "\u4e00\u4e5d\u4e94\u4e94\u5e74\u5230\u4e00\u4e5d\u4e94\u516b\u5e74\u56db\u5e74\u5185\u5404\u7701\u3001\u5e02\u7684\u6355\u4eba\u8ba1\u5212\u63a7\u5236\u6570\u5b57", "type": "subtitle"}, {"text": "\u5317\u4eac  22,500-25,000", "type": "paragraph"}, {"text": "\u5929\u6d25  25,000", "type": "paragraph"}, {"text": "\u4e0a\u6d77  160,647", "type": "paragraph"}, {"text": "\u8fbd\u5b81  57,000-59,000", "type": "paragraph"}, {"text": "\u5409\u6797  31,056", "type": "paragraph"}, {"text": "\u9ed1\u9f99\u6c5f  22,800-32,00", "type": "paragraph"}, {"text": "\u70ed\u6cb3  12,178-12,378", "type": "paragraph"}, {"text": "\u6cb3\u5317  106,562-111,562", "type": "paragraph"}, {"text": "\u5c71\u897f  57,000", "type": "paragraph"}, {"text": "\u5185\u8499  25,000", "type": "paragraph"}, {"text": "\u6cb3\u5357  130,000-150,000", "type": "paragraph"}, {"text": "\u6e56\u5317  90,000", "type": "paragraph"}, {"text": "\u6e56\u5357  90,000", "type": "paragraph"}, {"text": "\u6c5f\u897f  41,000-44,000", "type": "paragraph"}, {"text": "\u5e7f\u4e1c  150,000\uff08\u4e00\u4e5d\u4e94\u4e94\u5e74\u5230\u4e00\u4e5d\u4e94\u4e5d\u5e74\u8ba1\u5212\u6570\u5b57\uff09", "type": "paragraph"}, {"text": "\u5e7f\u897f  45,000", "type": "paragraph"}, {"text": "\u56db\u5ddd  150,000-200,000", "type": "paragraph"}, {"text": "\u4e91\u5357  70,000", "type": "paragraph"}, {"text": "\u8d35\u5dde  55,000", "type":


 must have pattern
  /// `(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(?:\.(\d+))?(?:(Z)|(\[-+\])(\d\d):(\d\d))`.
  ///
  /// [eventName] - The name of the event being queried by the API. Each
  /// `eventName` is related to a specific Google Workspace service or feature
  /// which the API organizes into types of events. An example is the Google
  /// Calendar events in the Admin console application's reports. The Calendar
  /// Settings `type` structure has all of the Calendar `eventName` activities
  /// reported by the API. When an administrator changes a Calendar setting, the
  /// API reports this activity in the Calendar Settings `type` and `eventName`
  /// parameters. For more information about `eventName` query strings and
  /// parameters, see the list of event names for various applications above in
  /// `applicationName`.
  ///
  /// [filters] - The `filters` query string is a comma-separated list composed
  /// of event parameters manipulated by relational operators. Event parameters
  /// are in the form `{parameter1 name}{relational operator}{parameter1
  /// value},{parameter2 name}{relational operator}{parameter2 value},...` These
  /// event parameters are associated with a specific `eventName`. An empty
  /// report is returned if the request's parameter doesn't belong to the
  /// `eventName`. For more information about the available `eventName` fields
  /// for each application and their associated parameters, go to the
  /// \[ApplicationName\](#applicationname) table, then click through to the
  /// Activity Events page in the Appendix for the application you want. In the
  /// following Drive activity examples, the returned list consists of all
  /// `edit` events where the `doc_id` parameter value matches the conditions
  /// defined by the relational operator. In the first example, the request
  /// returns all edited documents with a `doc_id` value equal to `12345`. In
  /// the second example, the report returns any edited documents where the
  /// `doc_id` value is not equal to `98765`. The `<>` operator is URL-encoded
  /// in the request's query string (`%3C%3E`): ```
  /// GET...&eventName=edit&filters=doc_id==12345
  /// GET...&eventName=edit&filters=doc_id%3C%3E98765 ``` A `filters` query
  /// supports these relational operators: * `==`—'equal to'. * `<>`—'not equal
  /// to'. Must be URL-encoded (%3C%3E). * `<`—'less than'. Must be URL-encoded
  /// (%3C). * `<=`—'less than or equal to'. Must be URL-encoded (%3C=). *
  /// `>`—'greater than'. Must be URL-encoded (%3E). * `>=`—'greater than or
  /// equal to'. Must be URL-encoded (%3E=). **Note:** The API doesn't accept
  /// multiple values of the same parameter. If a parameter is supplied more
  /// than once in the API request, the API only accepts the last value of that
  /// parameter. In addition, if an invalid parameter is supplied in the API
  /// request, the API ignores that parameter and returns the response
  /// corresponding to the remaining valid parameters. If no parameters are
  /// requested, all parameters are returned.
  /// Value must have pattern
  /// `(.+\[\<,\<=,==,\>=,\>,\<\>\].+,)*(.+\[\<,\<=,==,\>=,\>,\<\>\].+)`.
  ///
  /// [groupIdFilter] - Comma separated group ids (obfuscated) on which user
  /// activities are filtered, i.e. the response will contain activities for
  /// only those users that are a part of at least one of the group ids
  /// mentioned here. Format: "id:abc123,id:xyz456" *Important:* To filter by
  /// groups, you must explicitly add the groups to your filtering groups
  /// allowlist. For more information about adding groups to filtering groups
  /// allowlist, see
  /// [Filter results by Google Group](https://support.google.com/a/answer/11482175)
  /// Value must have pattern `(id:\[a-z0-9\]+(,id:\[a-z0-9\]+)*)`.
  ///
  /// [maxResults] - Determines how many activity records are shown on


e['data']}")

await input_stream.close()
```

### From Original DataOperator Connector

The new connector is **fully backward compatible**. Simply replace import statements:

```python
# Old
from pulsar_connector import PulsarInputStream, PulsarOutputStream

# New (same API, 500K+ msg/s performance)
from pulsar_connector import PulsarInputStream, PulsarOutputStream
```

## 🧪 Testing

```bash
# Run basic tests
python -m pytest tests/

# Performance benchmarks
python examples/benchmark_500.py --messages 10000
python examples/ultra_high_performance.py --messages 50000
```

## 📈 Performance Benchmarks

| Scenario | Basic Implementation | Optimized Implementation | Improvement |
|----------|---------------------|-------------------------|------------|
| Simple Read/Write | 5K msg/s | 100K+ msg/s | 20x |
| Batched Processing | 15K msg/s | 300K+ msg/s | 20x |
| High-Throughput | 25K msg/s | 500K+ msg/s | 20x |
| Ultra-Performance | 50K msg/s | 1M+ msg/s | 20x |

### Performance by Optimization

| Optimization | Speedup Factor | Notes |
|-------------|----------------|--------|
| uvloop | 2-3x | Async event loop |
| msgpack serialization | 2-3x | Binary encoding |
| Binary serialization | 2-3x | High-speed I/O |
| Memory optimization | 1.5-2x | GC management |
| Smart batching | 3-5x | Reduced overhead |

## 🛠 Advanced Features

### Binary Serialization
- **msgpack support**: 2-3x faster than JSON
- **Automatic fallback**: Uses JSON if msgpack unavailable
- **Configurable format**: Choose between msgpack and JSON

### Binary Serialization
- **High-speed performance**: msgpack for data processing
- **Automatic optimization**: Binary encoding for hot data paths
- **Fallback support**: Standard Python when optimizations unavailable

### Memory Management
- **GC optimization**: Disabled during critical operations
- **Connection pooling**: Efficient resource reuse
- **Smart buffering**: Optimized memory usage patterns

### Connection Optimization
- **Health checking**: Automatic connection validation
- **Pool management**: Intelligent connection reuse
- **Failover support**: Automatic recovery and retry

## 🔍 Troubleshooting

### High Memory Usage
- Reduce `consumer_receive_queue_size`
- Enable `enable_memory_optimization`
- Tune batch sizes

### Low Throughput
- Install required dependencies (`uvloop`, `msgpack`)
- Increase `max_connections`
- Optimize batch sizes

### Connection Issues
- Check connection pool settings
- Verify Pulsar cluster health
- Monitor connection health metrics

## 📚 API Reference

### PulsarInputStream
- `connect()`: Establish optimized connection
- `read()`: Read message batches with optimizations
- `close()`: Close connection with cleanup
- `get_metrics()`: Get comprehensive performance metrics
- `is_closed()`: Check connection status

### PulsarOutputStream
- `connect()`: Establish optimized connection
- `write(data, properties, partition_key)`: Write single message
- `write_batch(data_list)`: High-performance batch write
- `flush()`: Force flush pending messages
- `close()`: Close connection with cleanup
- `get_metrics()`: Get comprehensive performance metrics

### PulsarDynamicOutputStream
- `connect()`: Establish optimized connections
- `write(data)`: Write with dynamic routing
- `close()`: Close all connections
- `get_metrics()`: Get per-topic metrics

### Performance Utilities
- `fast_serialize(data)`: Binary serialization
- `fast_deserialize(data)`: Binary deserialization
- Binary serialization for high-performance data processing
- `setup_performance_optimizations()`: Initialize optimizations


SelfOnly:
                    OnEvent(handlerSelector, e, false);
                    break;
                default:
                    throw new NotImplementedException();
            }
        }

        /// <summary>Shared code for request handling.</summary>
        /// <param name="handlerSelector">A function which returns the appropriate Handler for a given Thing.</param>
        /// <param name="e">The game event arguments to pass through.</param>
        /// <param name="cascadeEventToChildren">If true, the event should be cascaded to child things as well.</param>
        private void OnRequest(Func<ThingEventing, CancellableGameEventHandler> handlerSelector, CancellableGameEvent e, bool cascadeEventToChildren)
        {
            // Build a request target queue which starts with our owner Thing and visits all it's Children.
            // (This is a queue instead of recursion to help avoid stack overflows and such with very large object trees.)
            Queue<Thing> requestTargetQueue = new();
            requestTargetQueue.Enqueue(owner);

            while (requestTargetQueue.Count > 0)
            {
                // If anything (like one of the thing's Behaviors) is subscribed to this request, send it there.
                Thing currentRequestTarget = requestTargetQueue.Dequeue();
                var handler = handlerSelector(currentRequestTarget.Eventing);
                if (handler != null)
                {
                    handler(currentRequestTarget, e);

                    // If the event has been canceled by the handler, we no longer need to look for further permission.


shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:las


onent_shift = _mm256_permutevar8x32_epi32(exponent_max, exponent_shift_offset_1);
            // Take the max again
            // Results: 0E0F0G0H0E0F0G0H0E0F0G0H0E0F0G0H
            exponent_max = _mm256_max_epu8(exponent_max, exponent_shift);
            // In each 64bits, swap the top and bottom 32b
            // Results: 0G0H0E0F0G0H0E0F0G0H0E0F0G0H0E0F
            exponent_shift = _mm256_permutevar8x32_epi32(exponent_max, exponent_shift_offset_2);
            // Take max again:
            // Results: 0G0H0G0H0G0H0G0H0G0H0G0H0G0H0G0H
            exponent_max = _mm256_max_epu8(exponent_max, exponent_shift);
            // swap the lower 8b of first and second lowest 16bits
            // Results: 00000000000000000000000000000H0G
            exponent_shift = _mm256_shuffle_epi8(exponent_max, exponent_shift_offset_3);
            // Take max again:
            // Results: 0G0H0G0H0G0H0G0H0G0H0G0H0G0H0H0H
            exponent_max = _mm256_max_epu8(exponent_max, exponent_shift);
            // Broadcast the first 8-bits over all 256bits:
            // Results: HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
            __m256i max_exponent_broadcast = _mm256_broadcastb_epi8(_mm256_castsi256_si128(exponent_max));

            /////////////////////////////////////////////////////////
            // Subtract each exponent from maximum exponent
            /////////////////////////////////////////////////////////

            // Subtract max exponent from all exponents and mask the lower 8 bits
            // HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH - 0A0B0C0D0E0F0G0H0102030405060708
            __m256i exponent_diff = _mm256_sub_epi8(max_exponent_broadcast, fp16_in_shifted_exponent);
            exponent_diff = _mm256_and_si256(exponent_diff, lower_8b_mask);

            /////////////////////////////////////////////////////////
            // Extract mantissa bits
            /////////////////////////////////////////////////////////

            __m256i fp16_in_exp_man_mask = _mm256_andnot_si256(sign_bit_mask, fp16_in);
            fp16_in = _mm256_and_si256(fp16_in, mantissa_mask);
            fp16_in = _mm256_srli_epi16(fp16_in, truncate_bfp_mantissa ?  4 : 3);
            // Compare each input value (excluding sign) with zero, (num == zero)? 0xFFFF: 0
            __m256i check_zero = _mm256_cmpeq_epi16(fp16_in_exp_man_mask, zero_compare);
            // bit-wise NOT of check_zero will be: (exp == zero)? 0: 0xFF
            // bit-wise AND check_zero with explicit_mantissa_one_mask. In this case, if exp == 0 --> do not add the explicit one
            __m256i explicit_mantissa_one_mask_with_zero_check = _mm256_andnot_si256(check_zero, explicit_mantissa_one_mask);
            // Always set bit[7] in each fp16[15:0] number such that when bits[6:0] are extracted for mantissa we will have {1, [6:0]}
            __m256i fp16_in_with_explicit_mantissa_one = _mm256_or_si256(fp16_in, explicit_mantissa_one_mask_with_zero_check);
            // // Shift each mantissa bit by 1 to reserve the MSB of each lower 8bits for sign {0-1, [5:0]}
            // fp16_in_with_explicit_mantissa_one = _mm256_srli_epi16(fp16_in_with_


8q7fIQybXTRMu5sbhGkxCafIQZ8K9YRfhOhpNwOrPthPjDic8ib5YIRXAS8Qp1xWwr7xjSYA/640?wx_fmt=png&from=appmsg "")

它会多次在断点处停止。每次停止时，都会查看 r8 指向的结构，看它是否对应于与tapi32.dll相关的请求。

![](https://mmbiz.qpic.cn/sz_mmbiz_png/rWGOWg48tafRrxE48q7fIQybXTRMu5sbVwicycxiaK7yQAbDa358l3fiaorqEFue5piamVvxERltrB2d2iaMfhBh5Jg/640?wx_fmt=png&from=appmsg "")

在其他模块多次停止后，出现对 TCMSETUP.exe 的请求：

![](https://mmbiz.qpic.cn/sz_mmbiz_png/rWGOWg48tafRrxE48q7fIQybXTRMu5sbibHNKQYEk2bwpwXtqu5e3AJ4iaqmfq2ibD6RIJ5hPJuySHxiagUibtlozrg/640?wx_fmt=png&from=appmsg "")

我们在调用堆栈中看到它来自进程创建的那一刻。它被调用来检查激活缓存中是否有TCMSETUP的任何条目。

保持运行直到调用TAPI32.dll。在此之前，将多次调用TCMSETUP。

![](https://mmbiz.qpic.cn/sz_mmbiz_png/rWGOWg48tafRrxE48q7fIQybXTRMu5sbP4jL2zuNW7o9iaagEaPFpC3CMK3HzkkluQbqX7nBykXMZ8Wia8YBVm3w/640?wx_fmt=png&from=appmsg "")

最后，到达的数据包必须与我之前在缓存中插入条目时从我的 DLL 生成的数据包非常相似。但是，现在当TCMSETUP尝试加载TAPI32.dll时，它会停止。

![](https://mmbiz.qpic.cn/sz_mmbiz_png/rWGOWg48tafRrxE48q7fIQybXTRMu5sbHvibkb1ibMD3CdpOM1TzWCGHOy6kZLLjPkj1z8x2ibK8R76Wicvm7s1tAw/640?wx_fmt=png&from=appmsg "")

此时我注意到这个包中的一些重要价值。

![](https://mmbiz.qpic.cn/sz_mmbiz_png/rWGOWg48tafRrxE48q7fIQybXTRMu5sbY4EVWX1GFQd5bA6pmYXVQbmia1icnGZibN20ibzgenAh5NhLc3TaYUib9cw/640?wx_fmt=png&from=appmsg "")

从_BASE_SXS_CREATE_ACTIVATION_CONTEXT_MSG结构开头向上扩展0x40字节，分配TotalMessage结构。请求TAPI32.dll的进程的 PID是TCMSETUP，因为它要加载 DLL。

![](https://mmbiz.qpic.cn/sz_mmbiz_


        QCOMPARE(i, i2--);
        QCOMPARE(i2, h.begin());
        QCOMPARE(--i, i2);
        QCOMPARE(i2 += 3, h.end());
        QCOMPARE(i2 -= 3, h.begin());
        QCOMPARE(i2+0, h.begin());
        QCOMPARE(i2+3, h.end());
        i2 += 3;
        i= i2-0;
        QCOMPARE(i, i2);
        i= i2-3;
        QCOMPARE(i, h.begin());
        QCOMPARE(i2-i, 3);

        //h.begin end tested above

        // QhullHyperplane is const-only
    }
}//t_iterator

void QhullHyperplane_test::
t_const_iterator()
{
    RboxPoints rcube("c");
    {
        Qhull q(rcube,"QR0");  // rotated unit cube
        QhullHyperplane h= q.firstFacet().hyperplane();
        QhullHyperplane::ConstIterator i= h.begin();
        QhullHyperplane::const_iterator i2= h.begin();
        QVERIFY(i==i2);
        QVERIFY(i>=i2);
        QVERIFY(i<=i2);
        i= h.begin();
        QVERIFY(i==i2);
        i2= h.end();
        QVERIFY(i!=i2);
        double d3= *i;
        i2--;
        double d2= *i2;
        QCOMPARE(d3, h[0]);
        QCOMPARE(d2, h[2]);
        QhullHyperplane::ConstIterator i3(i2);
        QCOMPARE(*i2, *i3);

        (i3= i)++;
        QCOMPARE((*i3), h[1]);
        QVERIFY(i==i);
        QVERIFY(i!=i2);
        QVERIFY(i<i2);
        QVERIFY(i<=i2);
        QVERIFY(i2>i);
        QVERIFY(i2>=i);

        // See t_iterator for const_iterator COMP iterator

        i= h.begin();
        i2= h.constBegin();
        QCOMPARE(i, i2++);
        QCOMPARE(*i2, h[1]);
        QCOMPARE(++i, i2);
        QCOMPARE(i, i2--);
        QCOMPARE(i2, h.constBegin());
        QCOMPARE(--i, i2);
        QCOMPARE(i2+=3, h.constEnd());
        QCOMPARE(i2-=3, h.constBegin());
        QCOMPARE(i2+0, h.constBegin());
        QCOMPARE(i2+3, h.constEnd());
        i2 += 3;
        i= i2-0;
        QCOMPARE(i, i2);
        i= i2-3;
        QCOMPARE(i, h.constBegin());
        QCOMPARE(i2-i, 3);

        // QhullHyperplane is const-only
    }
}//t_const_iterator

void QhullHyperplane_test::
t_qhullHyperplane_iterator()
{
    RboxPoints rcube("c");
    Qhull q(rcube,"QR0");  // rotated unit cube
    QhullHyperplane h = q.firstFacet().hyperplane();
    QhullHyperplaneIterator i2(h);
    QCOMPARE(h.dimension(), 3);
    QhullHyperplaneIterator i= h;
    QVERIFY(i2.hasNext());
    QVERIFY(!i2.hasPrevious());
    QVERIFY(i.hasNext());
    QVERIFY(!i.hasPrevious());
    i2.toBack();
    i.toFront();
    QVERIFY(!i2.hasNext());
    QVERIFY(i2.hasPrevious());
    QVERIFY(i.hasNext());
    QVERIFY(!i.hasPrevious());

    // i at front, i2 at end/back, 3 coordinates
    QCOMPARE(i.peekNext(), h[0]);
    QCOMPARE(i2


<typeparamref name="TIExecutable"/> with the subscribers attached to the observable.</returns>
        new TIExecutable WithSubscribe(Action<IObservable<ICommandEvent>> subscriber);

        /// <summary>
        /// Adds a <see cref="CancellationToken"/> (of which there may be many) to the execution context and returns a `new` context instance.
        /// </summary>
        /// <returns>A `new` instance of type <typeparamref name="TIExecutable"/> with the cancellation token attached.</returns>
        new TIExecutable WithCancellationToken(CancellationToken cancellationToken);

        /// <summary>
        /// Adds a wait <see cref="Func{T}"/> (of which there may be many) to the execution context and returns a `new` context instance.
        /// </summary>
        /// <param name="waitFunc">A <see cref="Func{T}"/> which takes an <see cref="ICommandResult"/> and returns a <see cref="Task"/> which will function as wait condition upon the completion of execution.</param>
        /// <returns>A `new` instance of <typeparamref name="TIExecutable"/> with the wait func passed to this call.</returns>
        new TIExecutable WithWait(Func<ICommandResult, Task> waitFunc);
        /// <summary>
        /// Sets the wait timeout on the <see cref="WithWait"/> <see cref="Func{T}"/>.
        /// </summary>
        /// <param name="timeout">The timeout.</param>
        /// <returns>A `new` instance of <typeparamref name="TIExecutable"/> with the wait timeout set to the value passed to this call.</returns>
        new TIExecutable UseWaitTimeout(TimeSpan timeout);

        /// <summar