_[::openmldb::common::kMemory]);
    ::openmldb::base::SplitString(FLAGS_recycle_bin_ssd_root_path, ",",
                                  mode_recycle_root_paths_[::openmldb::common::kSSD]);
    ::openmldb::base::SplitString(FLAGS_recycle_bin_hdd_root_path, ",",
                                  mode_recycle_root_paths_[::openmldb::common::kHDD]);
    // if want /brpc_metrics, prefix should be g_server_info_prefix+<port>(when no server_info_name), means
    // rpc_server_<port> if standalone, diy
    deploy_collector_ = std::make_unique<::openmldb::statistics::DeploymentMetricCollector>(
        "rpc_server_" + endpoint.substr(endpoint.find(":") + 1));

    if (!zk_cluster.empty()) {
        zk_client_ = new ZkClient(zk_cluster, real_endpoint, FLAGS_zk_session_timeout, endpoint, zk_path,
                                  FLAGS_zk_auth_schema, FLAGS_zk_cert);
        bool ok = zk_client_->Init();
        if (!ok) {
            PDLOG(ERROR, "fail to init zookeeper with cluster %s", zk_cluster.c_str());
            return false;
        }
        startup_mode_ = ::openmldb::type::StartupMode::kCluster;
    } else {
        PDLOG(INFO, "start with standalone mode");
        startup_mode_ = ::openmldb::type::StartupMode::kStandalone;
    }

    ::hybridse::vm::EngineOptions options;
    if (IsClusterMode()) {
        options.SetClusterOptimized(FLAGS_enable_distsql);
    } else {
        options.SetClusterOptimized(false);
    }
    engine_ = std::make_unique<::hybridse::vm::Engine>(catalog_, options);
    catalog_->SetLocalTablet(std::make_shared<::hybridse::vm::LocalTablet>(engine_.get(), sp_cache_));
    std::set<std::string> snapshot_compression_set{"off", "zlib", "snappy"};
    if (snapshot_compression_set.find(FLAGS_snapshot_compression) == snapshot_compression_set.end()) {
        LOG(ERROR) << "wrong snapshot_compression: " << FLAGS_snapshot_compression;
        return false;
    }
    std::set<std::string> file_compression_set{"off", "zlib", "lz4"};
    if (file_compression_set.find(FLAGS_file_compression) == file_compression_set.end()) {
        LOG(ERROR) << "wrong FLAGS_file_compression: " << FLAGS_file_compression;
        return false;
    }
    if (FLAGS_make_snapshot_time < 0 || FLAGS_make_snapshot_time > 23) {
        PDLOG(ERROR, "make_snapshot_time[%d] is illegal.", FLAGS_make_snapshot_time);
        return false;
    }

    if (FLAGS_db_root_path != "") {
        if (!CreateMultiDir(mode_root_paths_[::openmldb::common::kMemory])) {
            PDLOG(ERROR, "fail to create db root path %s", FLAGS_db_root_path.c_str());
            return false;
        }
    } else {
        PDLOG(ERROR, "db_root_path is required");
        return false;
    }

    if (FLAGS_ssd_root_path != "") {
        if (!CreateMultiDir(mode_root_paths_[::openmldb::common::kSSD])) {
            PDLOG(ERROR, "fail to create ssd root path %s", FLAGS_ssd_root_path.c_str());
            return false;
        }
    } else {
        PDLOG(WARNING, "ssd_root_path is not set");
    }

    if (FLAGS_hdd_root_path != "") {
        if (!CreateMultiDir(mode_root_paths_[::openmldb::common::kHDD])


	}
		}
	)";

	NEW_ENCODER(
		compileAndRun(sourceCode, 0, "C");
		bytes encoded = encodeArgs(
			u256(7), 0x40,
			8, 9, 0x80, 10,
			3,
			11, 0,
			12, 0,
			0, 13
		);
		BOOST_CHECK(callContractFunction("f()") == encoded);
		REQUIRE_LOG_DATA(encoded);
		BOOST_CHECK_EQUAL(logTopic(0, 0), keccak256(std::string("e(uint16,(uint16,uint16,(uint64[2])[],uint16))")));
	)
}

BOOST_AUTO_TEST_CASE(structs2)
{
	std::string sourceCode = R"(
		contract C {
			enum E {A, B, C}
			struct T { uint x; E e; uint8 y; }
			struct S { C c; T[] t;}
			function f() public returns (uint a, S[2] memory s1, S[] memory s2, uint b) {
				a = 7;
				b = 8;
				s1[0].c = this;
				s1[0].t = new T[](1);
				s1[0].t[0].x = 0x11;
				s1[0].t[0].e = E.B;
				s1[0].t[0].y = 0x12;
				s2 = new S[](2);
				s2[1].c = C(address(0x1234));
				s2[1].t = new T[](3);
				s2[1].t[1].x = 0x21;
				s2[1].t[1].e = E.C;
				s2[1].t[1].y = 0x22;
			}
		}
	)";

	NEW_ENCODER(
		compileAndRun(sourceCode, 0, "C");
		ABI_CHECK(callContractFunction("f()"), encodeArgs(
			7, 0x80, 0x1e0, 8,
			// S[2] s1
			0x40,
			0x100,
			// S s1[0]
			m_contractAddress,
			0x40,
			// T s1[0].t
			1, // length
			// s1[0].t[0]
			0x11, 1, 0x12,
			// S s1[1]
			0, 0x40,
			// T s1[1].t
			0,
			// S[] s2 (0x1e0)
			2, // length
			0x40, 0xa0,
			// S s2[0]
			0, 0x40, 0,
			// S s2[1]
			0x1234, 0x40,
			// s2[1].t
			3, // length
			0, 0, 0,
			0x21, 2, 0x22,
			0, 0, 0
		));
	)
}

BOOST_AUTO_TEST_CASE(bool_arrays)
{
	std::string sourceCode = R"(
		contract C {
			bool[] x;
			bool[4] y;
			event E(bool[], bool[4]);
			function f() public returns (bool[] memory, bool[4] memory) {
				x.push(true);
				x.push(false);
				x.push(true);
				x.push(false);
				y[0] = true;
				y[1] = false;
				y[2] = true;
				y[3] = false;
				emit E(x, y);
				return (x, y); // this copies to memory first
			}
		}
	)";

	BOTH_ENCODERS(
		compileAndRun(sourceCode, 0, "C");
		bytes encoded = encodeArgs(
			0xa0, 1, 0, 1, 0,
			4, 1, 0, 1, 0
		);
		ABI_CHECK(callContractFunction("f()"), encoded);
		REQUIRE_LOG_DATA(encoded);
	)
}

BOOST_AUTO_TEST_CASE(bool_arrays_split)
{
	std::string sourceCode = R"(
		contract C {
			bool[] x;
			bool[4] y;
			event E(bool[], bool[4]);
			function store() public {
				x.push(true);
				x.push(false);
				x.push(true);
				x.push(false);
				y[0] = true;
				y[1] =


;
    pub(crate) mod stream;

    pub(in crate::sys) fn socket_addr(path: &Path) -> io::Result<(libc::sockaddr_un, libc::socklen_t)> {
        let sockaddr = mem::MaybeUninit::<libc::sockaddr_un>::zeroed();

        // This is safe to assume because a `libc::sockaddr_un` filled with `0`
        // bytes is properly initialized.
        //
        // `0` is a valid value for `sockaddr_un::sun_family`; it is
        // `libc::AF_UNSPEC`.
        //
        // `[0; 108]` is a valid value for `sockaddr_un::sun_path`; it begins an
        // abstract path.
        let mut sockaddr = unsafe { sockaddr.assume_init() };

        sockaddr.sun_family = libc::AF_UNIX as libc::sa_family_t;

        let bytes = path.as_os_str().as_bytes();
        match (bytes.get(0), bytes.len().cmp(&sockaddr.sun_path.len())) {
            // Abstract paths don't need a null terminator
            (Some(&0), Ordering::Greater) => {
                return Err(io::Error::new(
                    io::ErrorKind::InvalidInput,
                    "path must be no longer than libc::sockaddr_un.sun_path",
                ));
            }
            (_, Ordering::Greater) | (_, Ordering::Equal) => {
                return Err(io::Error::new(
                    io::ErrorKind::InvalidInput,
                    "path must be shorter than libc::sockaddr_un.sun_path",
                ));
            }
            _ => {}
        }

        for (dst, src) in sockaddr.sun_path.iter_mut().zip(bytes.iter()) {
            *dst = *src as libc::c_char;
        }

        let offset = path_offset(&sockaddr);
        let mut socklen = offset + bytes.len();

        match bytes.get(0) {
            // The struct has already been zeroes so the null byte for pathname
            // addresses is already there.
            Some(&0) | None => {}
            Some(_) => socklen += 1,
        }

        Ok((sockaddr, socklen as libc::socklen_t))
    }

    fn pair<T>(flags: libc::c_int) -> io::Result<(T, T)>
        where T: FromRawFd,
    {
        #[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "solaris")))]
        let flags = flags | libc::SOCK_NONBLOCK | libc::SOCK_CLOEXEC;

        let mut fds = [-1; 2];
        syscall!(socketpair(libc::AF_UNIX, flags, 0, fds.as_mut_ptr()))?;
        let pair = unsafe { (T::from_raw_fd(fds[0]), T::from_raw_fd(fds[1])) };

        // Darwin and Solaris do not have SOCK_NONBLOCK or SOCK_CLOEXEC.
        //
        // In order to set those flags, additional `fcntl` sys calls must be
        // performed. If a `fnctl` fails after the sockets have been created,
        // the file descriptors will leak. Creating `pair` above ensures that if
        // there is an error, the file descriptors are closed.
        #[cfg(any(target_os = "ios", target_os = "macos", target_os = "solaris"))]
        {
            syscall!(fcntl(fds[0], libc::F_SETFL, libc::O_NONBLOCK))?;
            syscall!(fcntl(fds[0], libc::F_SETFD, libc::FD_CLOEXEC))?;
            syscall!(fcntl(fds[1], libc::F_SETFL, libc::O_NONBLOCK))?;
            syscall!(fcntl(fds[1], libc::F_SETFD, libc::FD_CLOEXEC))?;
        }
        Ok(pair)
    }

    // The following function


piece_impl(
        const struct llama_vocab & vocab,
                     llama_token   token,
                            char * buf,
                         int32_t   length,
                         int32_t   lstrip,
                            bool   special);

int32_t llama_detokenize_impl(
        const struct llama_vocab & vocab,
               const llama_token * tokens,
                         int32_t   n_tokens,
                            char * text,
                         int32_t   text_len_max,
                            bool   remove_special,
                            bool   unparse_special);


  static boolean[] jj_mask_110 = new boolean[116];
  static {
    jj_mask_110[RUNSIGNEDSHIFT] = true;
  }
  static boolean[] jj_mask_111 = new boolean[116];
  static {
    jj_mask_111[RSIGNEDSHIFT] = true;
  }
  static boolean[] jj_mask_112 = new boolean[116];
  static {
    jj_mask_112[LSHIFT] = true;
  }

  final public void AdditiveExpression() throws ParseError {
    MultiplicativeExpression();
    label_27:
    while (true) {
      if (jj_mask_113[getToken(1).kind]) {
        ;
      } else {
        jj_expLA1[113] = jj_gen;
        break label_27;
      }
      if (jj_mask_115[getToken(1).kind]) {
        jj_consume_token(PLUS);
      } else {
        jj_expLA1[115] = jj_gen;
        if (jj_mask_114[getToken(1).kind]) {
          jj_consume_token(MINUS);
        } else {
          jj_expLA1[114] = jj_gen;
          jj_consume_token(-1);
          throw new ParseError();
        }
      }
      MultiplicativeExpression();
    }
  }

  static boolean[] jj_mask_113 = new boolean[116];
  static {
    jj_mask_113[PLUS] =
    jj_mask_113[MINUS] = true;
  }
  static boolean[] jj_mask_114 = new boolean[116];
  static {
    jj_mask_114[MINUS] = true;
  }
  static boolean[] jj_mask_115 = new boolean[116];
  static {
    jj_mask_115[PLUS] = true;
  }

  final public void MultiplicativeExpression() throws ParseError {
    UnaryExpression();
    label_28:
    while (true) {
      if (jj_mask_116[getToken(1).kind]) {
        ;
      } else {
        jj_expLA1[116] = jj_gen;
        break label_28;
      }
      if (jj_mask_119[getToken(1).kind]) {
        jj_consume_token(STAR);
      } else {
        jj_expLA1[119] = jj_gen;
        if (jj_mask_118[getToken(1).kind]) {
          jj_consume_token(SLASH);
        } else {
          jj_expLA1[118] = jj_gen;
          if (jj_mask_117[getToken(1).kind]) {
            jj_consume_token(REM);
          } else {
            jj_expLA1[117] = jj_gen;
            jj_consume_token(-1);
            throw new ParseError();
          }
        }
      }
      UnaryExpression();
    }
  }

  static boolean[] jj_mask_116 = new boolean[116];
  static {
    jj_mask_116[STAR] =
    jj_mask_116[SLASH] =
    jj_mask_116[REM] = true;
  }
  static boolean[] jj_mask_117 = new boolean[116];
  static {
    jj_mask_117[REM] = true;
  }
  static boolean[] jj_mask_118 = new boolean[116];
  static {
    jj_mask_118[SLASH] = true;
  }
  static boolean[] jj_mask_119 = new boolean[116];
  static {
    jj_mask_119[STAR] = true;
  }

  final public void UnaryExpression() throws ParseError {
    if (jj_mask_125[getToken(1).kind]) {
      if (jj_mask_124[getToken(1).kind]) {
        jj_consume_token(PLUS);
      } else {
        jj_expLA1[124] = jj_gen;


#include "resource.h"
#include <windows.h>
#include <vector>
#include <shlwapi.h>
#pragma comment (lib, "shlwapi.lib")

#define TE_METHOD		0x60010000
#define TE_METHOD_MAX	0x6001ffff
#define TE_METHOD_MASK	0x0000ffff
#define TE_PROPERTY		0x40010000

// C/Migemo functions
typedef void* (WINAPI* LPFNmigemo_open)(const char* dict);
typedef void (WINAPI* LPFNmigemo_close)(void* object);
typedef unsigned char* (WINAPI* LPFNmigemo_query)(void* object, const unsigned char* query);
typedef void (WINAPI* LPFNmigemo_release)(void* object, unsigned char* string);
typedef int (WINAPI* LPFNmigemo_load)(void* obj, int dict_id, const char* dict_file);
typedef int (WINAPI* LPFNmigemo_is_enable)(void* obj);

// Migemo Wrapper Object
class CteMigemo : public IDispatch
{
public:
	STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject);
	STDMETHODIMP_(ULONG) AddRef();
	STDMETHODIMP_(ULONG) Release();
	//IDispatch
	STDMETHODIMP GetTypeInfoCount(UINT *pctinfo);
	STDMETHODIMP GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
	STDMETHODIMP GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
	STDMETHODIMP Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);

	CteMigemo();
	~CteMigemo();

	VOID Close();

	HMODULE		m_hMigemo;
private:
	LPFNmigemo_open migemo_open;
	LPFNmigemo_close migemo_close;
	LPFNmigemo_query migemo_query;
	LPFNmigemo_release migemo_release;
	LPFNmigemo_load migemo_load;
	LPFNmigemo_is_enable migemo_is_enable;

	void		*m_pMigemo;
	LONG		m_cRef;
	int			m_CP;
};

class CteClassFactory : public IClassFactory
{
public:
	STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject);
	STDMETHODIMP_(ULONG) AddRef();
	STDMETHODIMP_(ULONG) Release();

	STDMETHODIMP CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject);
	STDMETHODIMP LockServer(BOOL fLock);
};

//CteDispatch
class CteDispatch : public IDispatch
{
public:
	STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject);
	STDMETHODIMP_(ULONG) AddRef();
	STDMETHODIMP_(ULONG) Release();
	//IDispatch
	STDMETHODIMP GetTypeInfoCount(UINT *pctinfo);
	STDMETHODIMP GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
	STDMETHODIMP GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
	STDMETHODIMP Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);

	CteDispatch(IDispatch *pDispatch, int nMode, DISPID dispId);
	~CteDispatch();

	VOID Clear();
public:
	DISPID		m_dispIdMember;
private:
	IDispatch	*m_pDispatch;
	LONG		m_cRef;
};


nts.gstatic.com/s/notosansjp/v40/-F6pfjtqLzI2JPCgQBnw7HFQQi8q1xVxjfp_dakBof6Bs-tb3ab2FNISVac.0.woff2) format('woff2');
  unicode-range: U+25ee8, U+25f23, U+25f5c, U+25fd4, U+25fe0, U+25ffb, U+2600c, U+26017, U+26060, U+260ed, U+26222, U+2626a, U+26270, U+26286, U+2634c, U+26402, U+2667e, U+266b0, U+2671d, U+268dd, U+268ea, U+26951, U+2696f, U+26999, U+269dd, U+26a1e, U+26a58, U+26a8c, U+26ab7, U+26aff, U+26c29, U+26c73, U+26c9e, U+26cdd, U+26e40, U+26e65, U+26f94, U+26ff6-26ff8, U+270f4, U+2710d, U+27139, U+273da-273db, U+273fe, U+27410, U+27449, U+27614-27615, U+27631, U+27684, U+27693, U+2770e, U+27723, U+27752, U+278b2, U+27985, U+279b4, U+27a84, U+27bb3, U+27bbe, U+27bc7, U+27c3c, U+27cb8, U+27d73, U+27da0, U+27e10, U+27eaf, U+27fb7, U+2808a, U+280bb, U+28277, U+28282, U+282f3, U+283cd, U+2840c, U+28455, U+284dc, U+2856b, U+285c8-285c9, U+286d7, U+286fa, U+28946, U+28949, U+2896b, U+28987-28988, U+289ba-289bb, U+28a1e, U+28a29, U+28a43, U+28a71, U+28a99, U+28acd, U+28add, U+28ae4, U+28bc1, U+28bef, U+28cdd, U+28d10, U+28d71, U+28dfb, U+28e0f, U+28e17, U+28e1f, U+28e36, U+28e89, U+28eeb, U+28ef6, U+28f32, U+28ff8, U+292a0, U+292b1, U+29490, U+295cf, U+2967f, U+296f0, U+29719, U+29750, U+29810, U+298c6, U+29a72, U+29d4b, U+29ddb, U+29e15, U+29e3d, U+29e49, U+29e8a, U+29ec4, U+29edb, U+29ee9, U+29fce, U+29fd7, U+2a01a, U+2a02f, U+2a082, U+2a0f9, U+2a190, U+2a2b2, U+2a38c, U+2a437, U+2a5f1, U+2a602, U+2a61a, U+2a6b2, U+2a9e6, U+2b746, U+2b751, U+2b753, U+2b75a, U+2b75c, U+2b765, U+2b776-2b777, U+2b77c, U+2b782, U+2b789, U+2b78b, U+2b78e, U+2b794, U+2b7ac, U+2b7af, U+2b7bd, U+


    RouteSettings? routeSettings,
    Offset? anchorPoint,
    VoidCallback? onBarrier,
    Alignment alignment = Alignment.center,
  }) =>
      showGeneralDialog(
        context: context,
        barrierDismissible: barrierDismissible,
        barrierLabel: barrierLabel,
        barrierColor: barrierColor,
        transitionDuration: transitionDuration,
        transitionBuilder: transitionBuilder,
        useRootNavigator: useRootNavigator,
        routeSettings: routeSettings,
        pageBuilder: (context, animation, secondaryAnimation) {
          return Material(
            color: barrierColor,
            child: InkWell(
              onTap: onBarrier,
              child: Align(
                alignment: alignment,
                child: this,
              ),
            ),
          );
        },
      );

  ///正面弹窗
  toShowDialog({
    required BuildContext context,
    bool barrierDismissible = true,
    Color? barrierColor = Colors.black54,
    String? barrierLabel,
    bool useSafeArea = true,
    bool useRootNavigator = true,
    RouteSettings? routeSettings,
  }) =>
      showDialog(
        context: context,
        builder: (context) => this,
        barrierColor: barrierColor,
        barrierDismissible: barrierDismissible,
        barrierLabel: barrierLabel,
        useSafeArea: useSafeArea,
        routeSettings: routeSettings,
      );

  ///底部弹窗
  toShowModalBottomSheet({
    required BuildContext context,
    Color? backgroundColor,
    double? elevation,
    ShapeBorder? shape,
    Clip? clipBehavior,
    Color? barrierColor,
    bool isScrollControlled = false,
    bool useRootNavigator = false,
    bool isDismissible = true,
    bool enableDrag = true,
    RouteSettings? routeSettings,
    AnimationController? transitionAnimationController,
  }) =>
      showModalBottomSheet(
        context: context,
        builder: (context) => this,
        backgroundColor: backgroundColor,
        elevation: elevation,
        shape: shape,
        clipBehavior: clipBehavior,
        barrierColor: barrierColor,
        isScrollControlled: isScrollControlled,
        useRootNavigator: useRootNavigator,
        isDismissible: isDismissible,
        enableDrag: enableDrag,
        routeSettings: routeSettings,
        transitionAnimationController: transitionAnimationController,
      );

  /// 加拟物风格
  toNeumorphism({
    double borderRadius = 10.0,
    Offset offset = const Offset(5, 5),
    double blurRadius = 10,
    Color topShadowColor = Colors.white60,
    Color bottomShadowColor = const Color(0x26234395),
  }) {
    return Container(
      decoration: BoxDecoration(
        borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
        boxShadow: [
          BoxShadow(
            offset: offset,
            blurRadius: blurRadius,
            color: bottomShadowColor,
          ),
          BoxShadow(
            offset: Offset(-offset.dx, -offset.dy),
            blurRadius: blurRadius,
            color: topShadowColor,
          ),
        ],
      ),
      child: this,
    );
  }

  /// 转为 SliverToBoxAdapter
  SliverToBoxAdapter toSliverToBoxAdapter({
    Key? key,
  }) =>
      SliverToBoxAdapter(
        key: key,
        child: this,
      );

  /// 转为 SliverFillRemaining
  SliverFillRemaining toSliverFillRemaining({
    Key? key,
    bool hasScrollBody = true,
    bool fillOverscroll = false,
  }) =>
      SliverFillRemaining(
        key: key,
        hasScrollBody: hasScrollBody,
        fillOverscroll: fillOverscroll,
        child: this,
      );

  /// 转为 ValueListenableBuilder
  ///
  /// - valueListenable ValueListenable<bool>
  ///
  /// - placehold


2_ModalOverlay, .t_light .t_dark .t_yellow_alt2_SheetOverlay, .t_light .t_dark .t_yellow_DialogOverlay, .t_light .t_dark .t_yellow_ModalOverlay, .t_light .t_dark .t_yellow_SheetOverlay, .t_ModalOverlay, .t_orange_active_DialogOverlay, .t_orange_active_ModalOverlay, .t_orange_active_SheetOverlay, .t_orange_alt1_DialogOverlay, .t_orange_alt1_ModalOverlay, .t_orange_alt1_SheetOverlay, .t_orange_alt2_DialogOverlay, .t_orange_alt2_ModalOverlay, .t_orange_alt2_SheetOverlay, .t_orange_DialogOverlay, .t_orange_ModalOverlay, .t_orange_SheetOverlay, .t_pink_active_DialogOverlay, .t_pink_active_ModalOverlay, .t_pink_active_SheetOverlay, .t_pink_alt1_DialogOverlay, .t_pink_alt1_ModalOverlay, .t_pink_alt1_SheetOverlay, .t_pink_alt2_DialogOverlay, .t_pink_alt2_ModalOverlay, .t_pink_alt2_SheetOverlay, .t_pink_DialogOverlay, .t_pink_ModalOverlay, .t_pink_SheetOverlay, .t_purple_active_DialogOverlay, .t_purple_active_ModalOverlay, .t_purple_active_SheetOverlay, .t_purple_alt1_DialogOverlay, .t_purple_alt1_ModalOverlay, .t_purple_alt1_SheetOverlay, .t_purple_alt2_DialogOverlay, .t_purple_alt2_ModalOverlay, .t_purple_alt2_SheetOverlay, .t_purple_DialogOverlay, .t_purple_ModalOverlay, .t_purple_SheetOverlay, .t_red_active_DialogOverlay, .t_red_active_ModalOverlay, .t_red_active_SheetOverlay, .t_red_alt1_DialogOverlay, .t_red_alt1_ModalOverlay, .t_red_alt1_SheetOverlay, .t_red_alt2_DialogOverlay, .t_red_alt2_ModalOverlay, .t_red_alt2_SheetOverlay, .t_red_DialogOverlay, .t_red_ModalOverlay, .t_red_SheetOverlay, .t_SheetOverlay, .t_yellow_active_DialogOverlay, .t_yellow_active_ModalOverlay, .t_yellow_active_SheetOverlay, .t_yellow_alt1_DialogOverlay, .t_yellow_alt1_ModalOverlay, .t_yellow_alt1_SheetOverlay, .t_yellow_alt2_DialogOverlay, .t_yellow_alt2_ModalOverlay, .t_yellow_alt2_SheetOverlay, .t_yellow_DialogOverlay, .t_yellow_ModalOverlay, .t_yellow_SheetOverlay {--background:rgba(0,0,0,0.9);}
  }
:root.t_dark .t_light .t_dark .t_ListItem, :root.t_dark .t_ListItem, :root.t_light .t_dark .t_light .t_dark .t_ListItem, :root.t_light .t_dark .t_ListItem {--background:#151515;--backgroundHover:#191919;--backgroundPress:#232323;--backgroundFocus:#282828;--backgroundStrong:#050505;--backgroundTransparent:rgba(10,10,10,0);--color:#fff;--colorHover:#a5a5a5;--colorPress:#fff;--colorFocus:#a5a5a5;--colorTransparent:rgba(255,255,255,0);--borderColor:#282828;--border


 use common::SecurityRequestResult as SecurityRequestResult;
pub use common::SecurityRequestType as SecurityRequestType;
pub use common::SettlCurrFxRateCalc as SettlCurrFxRateCalc;
pub use common::SolicitedFlag as SolicitedFlag;
pub use common::SubscriptionRequestType as SubscriptionRequestType;
pub use common::TaxAdvantageType as TaxAdvantageType;
pub use common::TestMessageIndicator as TestMessageIndicator;
pub use common::TickDirection as TickDirection;
pub use common::TradSesMethod as TradSesMethod;
pub use common::TradSesMode as TradSesMode;
pub use common::TradeRequestType as TradeRequestType;
pub use common::TradeType as TradeType;
pub use common::TradedFlatSwitch as TradedFlatSwitch;
pub use common::UnsolicitedIndicator as UnsolicitedIndicator;
pub use common::Urgency as Urgency;
pub use common::WorkingIndicator as WorkingIndicator;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AllocRejCode {
    UnknownAccount = b'0' as isize,
    UnknownListid = b'6' as isize,
    UnknownExecutingBrokerMnemonic = b'3' as isize,
    UnknownOrderid = b'5' as isize,
    Other = b'7' as isize,
    CommissionDifference = b'4' as isize,
    IncorrectQuantity = b'1' as isize,
    IncorrectAveragePrice = b'2' as isize,
}

impl FIXValue for AllocRejCode {
    fn from_bytes(bytes: &[u8]) -> Option<AllocRejCode> {
        match bytes {
            b"0" => Some(AllocRejCode::UnknownAccount),
            b"6" => Some(AllocRejCode::UnknownListid),
            b"3" => Some(AllocRejCode::UnknownExecutingBrokerMnemonic),
            b"5" => Some(AllocRejCode::UnknownOrderid),
            b"7" => Some(AllocRejCode::Other),
            b"4" => Some(AllocRejCode::CommissionDifference),
            b"1" => Some(AllocRejCode::IncorrectQuantity),
            b"2" => Some(AllocRejCode::IncorrectAveragePrice),
            _ => None
        }
    }

    fn to_bytes(&self, mut v: &mut Vec<u8>) {
        v.push(*self as u8);
    }
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AllocStatus {
    Rejected = b'1' as isize,
    PartialAccept = b'2' as isize,
    Received = b'3' as isize,
    Accepted = b'0' as isize,
}

impl FIXValue for AllocStatus {
    fn from_bytes(bytes: &[u8]) -> Option<AllocStatus> {
        match bytes {
            b"1" => Some(AllocStatus::Rejected),
            b"2" => Some(AllocStatus::PartialAccept),
            b"3" => Some(AllocStatus::Received),
            b"0" => Some(AllocStatus::Accepted),
            _ => None
        }
    }

    fn to_bytes(&self, mut v: &mut Vec<u8>) {
        v.push(*self as u8);
    }
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AllocTransType {
    CalculatedWithoutPreliminary = b'5' as isize,
    Calculated = b'4' as isize,
    Preliminary = b'3' as isize,
    Cancel = b'2' as isize,
    Replace = b'1' as isize,
    New = b'0' as isize,
}

impl FIXValue for AllocTransType {
    fn from_bytes(bytes: &[u8]) -> Op


 {
		Rectangle r = roi.getBounds();
		if (r.width>60000||r.height>60000||r.x>60000||r.y>60000)
			roi.enableSubPixelResolution();
		int roiType = roi.getType();
		int type = rect;
		int options = 0;
		if (roi.getScaleStrokeWidth())
			options |= RoiDecoder.SCALE_STROKE_WIDTH;
		roiName = roi.getName();
		if (roiName!=null)
			roiNameSize = roiName.length()*2;
		else
			roiNameSize = 0;

		roiProps = roi.getProperties();
		if (roiProps!=null)
			roiPropsSize = roiProps.length()*2;
		else
			roiPropsSize = 0;

		switch (roiType) {
			case Roi.POLYGON: type=polygon; break;
			case Roi.FREEROI: type=freehand; break;
			case Roi.TRACED_ROI: type=traced; break;
			case Roi.OVAL: type=oval; break;
			case Roi.LINE: type=line; break;
			case Roi.POLYLINE: type=polyline; break;
			case Roi.FREELINE: type=freeline; break;
			case Roi.ANGLE: type=angle; break;
			case Roi.COMPOSITE: type=rect; break; // shape array size (36-39) will be >0 to indicate composite type
			case Roi.POINT: type=point; break;
			default: type = rect; break;
		}

		if (roiType==Roi.COMPOSITE) {
			saveShapeRoi(roi, type, f, options);
			return;
		}

		int n=0;
		int[] x=null, y=null;
		float[] xf=null, yf=null;
		int floatSize = 0;
		if (roi instanceof PolygonRoi) {
			PolygonRoi proi = (PolygonRoi)roi;
			Polygon p = proi.getNonSplineCoordinates();
			n = p.npoints;
			x = p.xpoints;
			y = p.ypoints;
			if (roi.subPixelResolution()) {
				FloatPolygon fp = null;
				if (proi.isSplineFit())
					fp = proi.getNonSplineFloatPolygon();
				else
					fp = roi.getFloatPolygon();
				if (n==fp.npoints) {
					options |= RoiDecoder.SUB_PIXEL_RESOLUTION;
					if (roi.getDrawOffset())
						options |= RoiDecoder.DRAW_OFFSET;
					xf = fp.xpoints;
					yf = fp.ypoints;
					floatSize = n*8;
				}
			}
		}

		countersSize = 0;
		if (roi instanceof PointRoi) {
			counters = ((PointRoi)roi).getCounters();
			if (counters!=null && counters.length>=n)
				countersSize = n*4;
		}

		data = new byte[HEADER_SIZE+HEADER2_SIZE+n*4+floatSize+roiNameSize+roiPropsSize+countersSize];
		data[0]=73; data[1]=111; data[2]=117; data[3]=116; // "Iout"
		putShort(RoiDecoder.VERSION_OFFSET, VERSION);
		data[RoiDecoder.TYPE] = (byte)type;
		putShort(RoiDecoder.TOP, r.y);
		putShort(RoiDecoder.LEFT, r.x);
		putShort(RoiDecoder.BOTTOM, r.y+r.height);
		putShort(RoiDecoder.RIGHT, r.x+r.width);
		if (roi.subPixelResolution() && (type==rect||type==oval)) {
			FloatPolygon p = null;
			if (roi instanceof OvalRoi)
				p = ((O


uLesson>? lessons;

  DaoduTodayRecommendsResp(this.comments, this.lessons);

  factory DaoduTodayRecommendsResp.fromJson(Map<String, dynamic> srcJson) =>
      _$DaoduTodayRecommendsRespFromJson(srcJson);

  Map<String, dynamic> toJson() => _$DaoduTodayRecommendsRespToJson(this);
}

@JsonSerializable(explicitToJson: true)
class DaoduComment {
  @JsonKey(name: 'id')
  String? id;

  // 评论的详情
  @JsonKey(name: 'content')
  String? content;

  // 评论的详情(繁体中文)
  @JsonKey(name: 'content_tr_zh_hant')
  String? contentTrZhHant;

  @JsonKey(name: 'user')
  DaoduUser? user;

  @JsonKey(name: 'status')
  int? status;

  @JsonKey(name: 'like_count')
  int? likeCount;

  @JsonKey(name: 'sub_comment_count')
  int? subCommentCount;

  @JsonKey(name: 'reply_to')
  DaoduCommentReplyTo? replyTo;

  @JsonKey(name: 'lesson_id')
  String? lessonId;

  @JsonKey(name: 'my_like')
  bool? myLike;

  @JsonKey(name: 'updated_at')
  int? updatedAt;

  @JsonKey(name: 'created_at')
  int? createdAt;

  DaoduComment({
    this.id,
    this.content,
    this.contentTrZhHant,
    this.user,
    this.status,
    this.likeCount,
    this.subCommentCount,
    this.replyTo,
    this.lessonId,
    this.myLike,
    this.updatedAt,
    this.createdAt,
  });

  factory DaoduComment.fromJson(Map<String, dynamic> srcJson) =>
      _$DaoduCommentFromJson(srcJson);

  Map<String, dynamic> toJson() => _$DaoduCommentToJson(this);
}

// user 栏位 id nickname avatar
// author 栏位 id name
@JsonSerializable(explicitToJson: true)
class DaoduUser {
  @JsonKey(name: 'id')
  String? id;

  @JsonKey(name: 'nickname')
  String? nickname;

  @JsonKey(name: 'avatar')
  String? avatar;

  DaoduUser({this.id, this.nickname, this.avatar});

  factory DaoduUser.fromJson(Map<String, dynamic> srcJson) =>
      _$DaoduUserFromJson(srcJson);

  Map<String, dynamic> toJson() => _$DaoduUserToJson(this);
}

@JsonSerializable(explicitToJson: true)
class DaoduCommentReplyTo {
  @JsonKey(name: 'id')
  String? id;

  @JsonKey(name: 'user_id')
  String? userId;

  @JsonKey(name: 'user_nickname')
  String? userNickname;

  @JsonKey(name: 'user_avatar')
  String? userAvatar;

  DaoduCommentReplyTo({
    this.id,
    this.userId,
    this.userNickname,
    this.userAvatar,
  });

  factory DaoduCommentReplyTo.fromJson(Map<String, dynamic> srcJson) =>
      _$DaoduCommentReplyToFromJson(srcJson);

  Map<String, dynamic> toJson() => _$DaoduCommentReplyToToJson(this);
}

///
/// 用户详情API：https://apis.netstart.c


from pyspark.sql import SparkSession
from pyspark.sql.functions import *
import datetime
import signal

# Kafka topic name
kafka_topic_name = "streams"

# Kafka bootstrap servers
kafka_bootstrap_servers = 'localhost:9092'

# Initialize Spark session
spark = SparkSession.builder \
    .appName("Stream Processing") \
    .config("spark.jars.packages", "org.apache.spark:spark-sql-kafka-0-10_2.12:3.2.0") \
    .getOrCreate()

# Set the log level to ERROR to avoid excessive output
spark.sparkContext.setLogLevel("ERROR")

# Define the streaming DataFrame using Kafka as the source
streams_df = spark \
    .readStream \
    .format("kafka") \
    .option("kafka.bootstrap.servers", kafka_bootstrap_servers) \
    .option("subscribe", kafka_topic_name) \
    .option("startingOffsets", "latest") \
    .load()

# Cast the value column from binary to string and extract the stream count
streams_df = streams_df \
    .withColumn("value", col("value").cast("string")) \
    .selectExpr("CAST(value AS STRING) AS streams")

# Define a UDF to increment the count variable based on the stream count
@udf
def update_count(count, stream_count):
    if stream_count > 100000000:
        return count + 1
    else:
        return count

# Initial count value
count_value = 0
# Define a function to calculate and print the time taken for processing each batch
def process_batch(df, epoch_id):
    current_time = datetime.datetime.now()
    time_difference = current_time - start_time
    print("Batch ID:", epoch_id, "Time Taken:", time_difference.total_seconds(), "seconds")
    # You can perform additional processing or write to an external sink here
    df.show()

start_time = datetime.datetime.now()  # Start time for the overall processing

# Define a streaming query to process the incoming streams
query = streams_df \
    .withColumn("stream_count", col("streams").cast("long")) \
    .withColumn("count", lit(count_value)) \
    .withColumn("updated_count", update_count(col("count"), col("stream_count"))) \
    .groupBy() \
    .agg(sum("updated_count").alias("total_count")) \
    .writeStream \
    .outputMode("complete") \
    .foreachBatch(process_batch) \
    .start()

# # Wait for the query to terminate
# query.awaitTermination()

# end_time = time.time()

# # Calculate and display execution time
# execution_time = end_time - start_time
# print(f"Execution time: {execution_time} seconds")

# Wait for the query to terminate
query.awaitTermination()


Quantity,
      },
    },
  ]);
}
$(() => {
  const employeesStore = new DevExpress.data.ArrayStore({
    key: 'ID',
    data: employees,
  });

  const dataGrid = $('#gridContainer').dxDataGrid({
    dataSource: employeesStore,
    showBorders: true,
    paging: {
      enabled: false,
    },
    editing: {
      mode: 'cell',
      allowUpdating: true,
      allowAdding: true,
      allowDeleting: true,
    },
    selection: {
      mode: 'multiple',
    },
    columns: [
      {
        dataField: 'Prefix',
        caption: 'Title',
        width: 55,
      },
      'FirstName',
      'LastName', {
        dataField: 'Position',
        width: 170,
      }, {
        dataField: 'StateID',
        caption: 'State',
        width: 125,
        lookup: {
          dataSource: states,
          displayExpr: 'Name',
          valueExpr: 'ID',
        },
      }, {
        dataField: 'BirthDate',
        dataType: 'date',
      },
    ],
    toolbar: {
      items: [
        {
          name: 'addRowButton',
          showText: 'always',
        }, {
          location: 'after',
          widget: 'dxButton',
          options: {
            text: 'Delete Selected Records',
            icon: 'trash',
            disabled: true,
            onClick() {
              dataGrid.getSelectedRowKeys().forEach((key) => {
                employeesStore.remove(key);
              });
              dataGrid.refresh();
            },
          },
        },
      ],
    },
    onSelectionChanged(data) {
      dataGrid.option('toolbar.items[1].options.disabled', !data.selectedRowsData.length);
    },
  }).dxDataGrid('instance');
});
const employees = [{
  ID: 1,
  FirstName: 'John',
  LastName: 'Heart',
  Prefix: 'Mr.',
  Position: 'CEO',
  BirthDate: '1964/03/16',
  HireDate: '1995/01/15',
  Notes: 'John has been in the Audio/Video industry since 1990. He has led DevAv as its CEO since 2003.\r\n\r\nWhen not working hard as the CEO, John loves to golf and bowl. He once bowled a perfect game of 300.',
  Address: '351 S Hill St.',
  StateID: 5,
}, {
  ID: 2,
  FirstName: 'Olivia',
  LastName: 'Peyton',
  Prefix: 'Mrs.',
  Position: 'Sales Assistant',
  BirthDate: '1981/06/03',
  HireDate: '2012/05/14',
  Notes: 'Olivia loves to sell. She has been selling DevAV products since 2012. \r\n\r\nOlivia was homecoming queen in high school. She is expecting her first child in 6 months. Good Luck Olivia.',
  Address: '807 W Paseo Del Mar',
  StateID: 5,
}, {
  ID: 3,
  FirstName: 'Robert',
  LastName: 'Reagan',
  Prefix: 'Mr.',
  Position: 'CMO',
  BirthDate: '1974/09/07',
  HireDate: '2002/11/08',
  Notes: 'Robert was recently voted the CMO of the year by CMO Magazine. He is a proud member of the DevAV Management Team.\r\n\r\nRobert is a championship BBQ chef, so when you get the chance ask him for his secret recipe.',
  Address: '4 Westmoreland Pl.',
  StateID: 4,
}, {
  ID: 4,
  FirstName: 'Greta',
  LastName: 'Sims',
  Prefix: 'Ms.',
  Position: 'HR Manager',
  BirthDate: '1977/11/22',
  HireDate:


      totalSize += file.getFileDataSize();
      totalSize += file.getMetadataJSONSize();
    }

    return totalSize;
  }
}
import 'package:ardrive/misc/resources.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';

void preCacheLoginAssets(BuildContext context) {
  List<String> assetPaths = [
    Resources.images.login.whatIsAKeyfile,
    Resources.images.login.aboutSecurity,
    Resources.images.login.bentoBox.profile2,
    Resources.images.login.bentoBox.profile3,
    Resources.images.login.bentoBox.profile4,
    Resources.images.login.bentoBox.profile5,
    Resources.images.login.bentoBox.profile6,
    Resources.images.login.bentoBox.dots,
  ];

  List<String> svgAssets = [
    Resources.images.login.bentoBox.bentoBox2DarkMode,
    Resources.images.login.bentoBox.bentoBox2LightMode,
    Resources.images.login.bentoBox.noSubscription,
    Resources.images.login.bentoBox.decentralized,
    Resources.images.login.bentoBox.permanentAccessibleData,
    Resources.images.login.bentoBox.priceCalculator,
    Resources.images.login.bentoBox.dataStorage,
  ];

  for (String assetPath in assetPaths) {
    precacheImage(
      AssetImage(assetPath),
      context,
    );
  }

  if (kIsWeb) {
    for (String svgAsset in svgAssets) {
      final loader = SvgAssetLoader(svgAsset);
      svg.cache
          .putIfAbsent(loader.cacheKey(null), () => loader.loadBytes(null));
    }
  }
}

void preCacheOnBoardingAssets(BuildContext context) {
  List<String> assetPaths = [
    Resources.images.login.ardriveLogoOnboarding,
    Resources.images.login.arrowRed,
    Resources.images.login.confetti,
    Resources.images.login.confettiLeft,
    Resources.images.login.confettiRight,
  ];

  for (String assetPath in assetPaths) {
    precacheImage(
      AssetImage(assetPath),
      context,
    );
  }
}
import 'dart:math';

/// A method returns a human readable string representing a file _size
String filesize(dynamic sizeToParse, [int round = 2]) {
  /**
   * [size] in bytes, can be passed as number or as string
   *
   * the optional parameter [round] specifies the number
   * of digits after comma/point (default is 2)
   */
  final divider = pow(2, 10);
  int size;
  try {
    size = int.parse(sizeToParse.toString());
  } catch (e) {
    throw ArgumentError('Can not parse the size parameter: $e');
  }

  if (size < divider) {
    return '$size B';
  }

  if (size < pow(divider, 2) && size % divider == 0) {
    return '${(size / divider).toStringAsFixed(0)} KiB';
  }

  if (size < pow(divider, 2)) {
    return '${(size / divider).toStringAsFixed(round)} KiB';
  }

  if (size < pow(divider, 3) && size % pow(divider, 2) == 0) {
    return '${(size / pow(divider, 2)).toStringAsFixed(0)} MiB';
  }

  if (size < pow(divider, 3)) {
    return '${(size / pow(divider, 2)).toStringAsFixed(round)} MiB';
  }

  if (size < pow(divider, 4) && size % pow(divider, 3) == 0) {
    return '${(size / pow(divider, 3)).toStringAsFixed(0)} GiB';
  }

  if (size < pow(divider, 4)) {
    return '${(size / pow(divider, 3)).toStringAsFixed(


orType::get(Type::getHalfTy(II->getContext()), RetWidth);
      auto VectorHalfs =
          Builder.CreateBitCast(VectorHalfAsShorts, VectorHalfType);
      auto VectorFloats = Builder.CreateFPExt(VectorHalfs, RetType);
      return replaceInstUsesWith(*II, VectorFloats);
    }

    // We only use the lowest lanes of the argument.
    if (Value *V = SimplifyDemandedVectorEltsLow(Arg, ArgWidth, RetWidth)) {
      II->setArgOperand(0, V);
      return II;
    }
    break;
  }

  case Intrinsic::x86_sse_cvtss2si:
  case Intrinsic::x86_sse_cvtss2si64:
  case Intrinsic::x86_sse_cvttss2si:
  case Intrinsic::x86_sse_cvttss2si64:
  case Intrinsic::x86_sse2_cvtsd2si:
  case Intrinsic::x86_sse2_cvtsd2si64:
  case Intrinsic::x86_sse2_cvttsd2si:
  case Intrinsic::x86_sse2_cvttsd2si64:
  case Intrinsic::x86_avx512_vcvtss2si32:
  case Intrinsic::x86_avx512_vcvtss2si64:
  case Intrinsic::x86_avx512_vcvtss2usi32:
  case Intrinsic::x86_avx512_vcvtss2usi64:
  case Intrinsic::x86_avx512_vcvtsd2si32:
  case Intrinsic::x86_avx512_vcvtsd2si64:
  case Intrinsic::x86_avx512_vcvtsd2usi32:
  case Intrinsic::x86_avx512_vcvtsd2usi64:
  case Intrinsic::x86_avx512_cvttss2si:
  case Intrinsic::x86_avx512_cvttss2si64:
  case Intrinsic::x86_avx512_cvttss2usi:
  case Intrinsic::x86_avx512_cvttss2usi64:
  case Intrinsic::x86_avx512_cvttsd2si:
  case Intrinsic::x86_avx512_cvttsd2si64:
  case Intrinsic::x86_avx512_cvttsd2usi:
  case Intrinsic::x86_avx512_cvttsd2usi64: {
    // These intrinsics only demand the 0th element of their input vectors. If
    // we can simplify the input based on that, do so now.
    Value *Arg = II->getArgOperand(0);
    unsigned VWidth = Arg->getType()->getVectorNumElements();
    if (Value *V = SimplifyDemandedVectorEltsLow(Arg, VWidth, 1)) {
      II->setArgOperand(0, V);
      return II;
    }
    break;
  }

  case Intrinsic::x86_mmx_pmovmskb:
  case Intrinsic::x86_sse_movmsk_ps:
  case Intrinsic::x86_sse2_movmsk_pd:
  case Intrinsic::x86_sse2_pmovmskb_128:
  case Intrinsic::x86_avx_movmsk_pd_256:
  case Intrinsic::x86_avx_movmsk_ps_256:
  case Intrinsic::x86_avx2_pmovmskb:
    if (Value *V = simplifyX86movmsk(*II, Builder))
      return replaceInstUsesWith(*II, V);
    break;

  case Intrinsic::x86_sse_comieq_ss:
  case Intrinsic::x86_sse_comige_ss:
  case Intrinsic::x86_sse_comigt_ss:
  case Intrinsic::x86_sse_comile_ss:
  case Intrinsic::x86_sse_comilt_ss:
  case Intrinsic::x86_sse_comineq_ss:
  case Intrinsic::x86_sse_ucomieq_ss:
  case Intrinsic::x86_sse_ucomige_ss:
  case Intrinsic::x86_sse_ucomigt_ss:
  case Intrinsic::x86_sse_ucomile_ss:
  case Intrinsic::x86_sse_ucomilt_ss:
  case Intrinsic::x86_sse_ucomineq_ss:
  case Intrinsic::x86_sse2_comieq_sd:
  case Intrinsic::x86_sse2_comige_sd:


/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.
 */

#pragma once

#include <arrow-glib/arrow-glib.h>

#include <gandiva-glib/node.h>

G_BEGIN_DECLS

#define GGANDIVA_TYPE_EXPRESSION (ggandiva_expression_get_type())
GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(
  GGandivaExpression, ggandiva_expression, GGANDIVA, EXPRESSION, GObject)

struct _GGandivaExpressionClass
{
  GObjectClass parent_class;
};

GGANDIVA_AVAILABLE_IN_0_12
GGandivaExpression *
ggandiva_expression_new(GGandivaNode *root_node, GArrowField *result_field);

GGANDIVA_AVAILABLE_IN_0_12
gchar *
ggandiva_expression_to_string(GGandivaExpression *expression);

#define GGANDIVA_TYPE_CONDITION (ggandiva_condition_get_type())
GGANDIVA_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(
  GGandivaCondition, ggandiva_condition, GGANDIVA, CONDITION, GGandivaExpression)

struct _GGandivaConditionClass
{
  GGandivaExpressionClass parent_class;
};

GGANDIVA_AVAILABLE_IN_4_0
GGandivaCondition *
ggandiva_condition_new(GGandivaNode *root_node);

G_END_DECLS


    fn from(value: i64) -> Self {
        Switch::from(value as u8)
    }
}
impl Serialize for Switch {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        serializer.serialize_str(&self.to_string())
    }
}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord, Hash)]
pub enum Sport {
    Generic,
    Running,
    Cycling,
    /// Mulitsport transition
    Transition,
    FitnessEquipment,
    Swimming,
    Basketball,
    Soccer,
    Tennis,
    AmericanFootball,
    Training,
    Walking,
    CrossCountrySkiing,
    AlpineSkiing,
    Snowboarding,
    Rowing,
    Mountaineering,
    Hiking,
    Multisport,
    Paddling,
    Flying,
    EBiking,
    Motorcycling,
    Boating,
    Driving,
    Golf,
    HangGliding,
    HorsebackRiding,
    Hunting,
    Fishing,
    InlineSkating,
    RockClimbing,
    Sailing,
    IceSkating,
    SkyDiving,
    Snowshoeing,
    Snowmobiling,
    StandUpPaddleboarding,
    Surfing,
    Wakeboarding,
    WaterSkiing,
    Kayaking,
    Rafting,
    Windsurfing,
    Kitesurfing,
    Tactical,
    Jumpmaster,
    Boxing,
    FloorClimbing,
    Diving,
    /// All is for goals only to include all sports.
    All,
    UnknownVariant(u8),
}
impl Sport {
    pub fn as_u8(self) -> u8 {
        match self {
            Sport::Generic => 0,
            Sport::Running => 1,
            Sport::Cycling => 2,
            Sport::Transition => 3,
            Sport::FitnessEquipment => 4,
            Sport::Swimming => 5,
            Sport::Basketball => 6,
            Sport::Soccer => 7,
            Sport::Tennis => 8,
            Sport::AmericanFootball => 9,
            Sport::Training => 10,
            Sport::Walking => 11,
            Sport::CrossCountrySkiing => 12,
            Sport::AlpineSkiing => 13,
            Sport::Snowboarding => 14,
            Sport::Rowing => 15,
            Sport::Mountaineering => 16,
            Sport::Hiking => 17,
            Sport::Multisport => 18,
            Sport::Paddling => 19,
            Sport::Flying => 20,
            Sport::EBiking => 21,
            Sport::Motorcycling => 22,
            Sport::Boating => 23,
            Sport::Driving => 24,
            Sport::Golf => 25,
            Sport::HangGliding => 26,
            Sport::HorsebackRiding => 27,
            Sport::Hunting => 28,
            Sport::Fishing => 29,
            Sport::InlineSkating => 30,
            Sport::RockClimbing => 31,
            Sport::Sailing => 32,
            Sport::IceSkating => 33,
            Sport::SkyDiving => 34,
            Sport::Snowshoeing => 35,
            Sport::Snowmobiling => 36,
            Sport::StandUpPaddleboarding => 37,
            Sport::Surfing => 38,
            Sport::Wakeboarding => 39,
            Sport::WaterSkiing => 40,
            Sport::Kayaking => 41,
            Sport::Rafting => 42,
            Sport::Windsurfing => 43,
            Sport::Kitesurfing => 44,
            Sport::Tactical => 45,
            Sport::Jumpmaster => 46,
            Sport::Boxing => 47,
            Sport::FloorClimbing => 48,
            Sport::Diving => 53,
            Sport::All => 254,
            Sport::UnknownVariant(value) => value,
        }
    }
    pub fn as_i64(self) -> i64 {
        self.as_u8() as i64
    }
}
impl fmt::Display for Sport {
    fn fmt


--orbit-progress) - var(--circle-delay))
      infinite var(--circular-ease);
    position: absolute;
    left: calc(50% + var(--astronomical-unit));
    top: 0;
    opacity: 0;
    translate: -50% calc(-50% - (50% * sin(var(--pov))));
    width: var(--size);
    height: var(--size);
    background: radial-gradient(
      circle at center,
      var(--color-1, darkgray),
      var(--color-2, #333) 60%
    );
    background-size: 300%;
    background-position: center;
    border-radius: 50%;
    animation:
      var(--anim-body-reveal),
      var(--anim-body-index),
      var(--anim-body-shine),
      var(--anim-body-move-x),
      var(--anim-body-move-y);
  }

  :nth-child(1 of :is(.body, .body-container)) { --i: 0; }
  :nth-child(2 of :is(.body, .body-container)) { --i: 1; }
  :nth-child(3 of :is(.body, .body-container)) { --i: 2; }
  :nth-child(4 of :is(.body, .body-container)) { --i: 3; }
  :nth-child(5 of :is(.body, .body-container)) { --i: 4; }
  :nth-child(6 of :is(.body, .body-container)) { --i: 5; }
  :nth-child(7 of :is(.body, .body-container)) { --i: 6; }
  :nth-child(8 of :is(.body, .body-container)) { --i: 7; }
  :nth-child(9 of :is(.body, .body-container)) { --i: 8; }
  :nth-child(10 of :is(.body, .body-container)) { --i: 9; }

  @keyframes body-reveal {
    to {
      top: calc(50% + var(--astronomical-unit) * cos(var(--pov)));
      opacity: 1;
    }
  }

  @keyframes body-index {
    from, 49% {
      z-index: var(--inverse-index);
    }
    50%, to {
      z-index: 0;
    }
  }

  @keyframes body-shine {
    to {
      background-position-x: -100%;
    }
  }

  @keyframes body-move-x {
    50% {
      left: calc(50% - var(--astronomical-unit));
    }
  }

  @keyframes body-move-y {
    50% {
      top: calc(50% - var(--astronomical-unit) * cos(var(--pov)));
    }
  }

  .body-container.earth {
    --size: 4dvmin;
    --color-1: #67aecb;
    --color-2: mediumblue;
    --astronomical-unit: 0%;
    --orbit-progress: calc(-1 * var(--circle-delay));
    animation:
      var(--anim-body-reveal),
      var(--anim-body-index),
      var(--anim-body-shine),
      earth-night
        var(--day)
        var(--shine-delay)
        linear infinite;
  }

  @keyframes earth-night {
    50% {
      box-shadow: inset 0 0 var(--size) calc(var(--size) / 5) #000b;
    }
  }

  .body-container.earth .human-lights {
    --color: #fd08;
    --px: .7em;
    --light: 0 var(--px) var(--color);
    --this-mad-city: 0 var(--px) palevioletred;
    font-size: calc(var(


HashMap<usize, usize>>)> {
    let chunks = split_into_chunks(words, num_chunks);

    let mut threads: Vec<(JoinHandle<()>, Receiver<HashMap<usize, usize>>)> = vec![];

    for chunk in chunks {
        let (tx, rx) = mpsc::channel();

        let handle = thread::spawn(move || {
            let map = word_length_mapper(&chunk);
            tx.send(map).unwrap();
        });

        let thread = (handle, rx);
        threads.push(thread);
    }

    threads
}

/// @param `words` - a `Vec` of `String`s. You can assume that all `String`s
///                  have been formatted and stripped of whitespace,
///                  punctutation, etc.
///
/// @param `num_chunks` - an unsigned integer indicating the number nodes
///                       that will be working in parallel to map the given
///                       dataset. You can assume that this parameter will
///                       be non-zero.
///
/// @param `func` - a function pointer to a function that takes in a
///                 borrowed `Vec` of `String`s and returns a `HashMap` with
///                 generic keys and values of type `usize`. Refer to the
///                 description above for more information on generics.
///
/// @return a `Vec` of tuples. Each tuple will contain the `JoinHandle` of
///         each thread spawned and the `mpsc::Receiver` created by the
///         corresponding thread.
pub fn multi_threaded_mapper_generic<KeyType: 'static + Eq + Hash + Send>(
            words: &Vec<String>,
            num_chunks: usize,
            func: fn(&Vec<String>) -> HashMap<KeyType, usize>)
        -> Vec<(JoinHandle<()>, Receiver<HashMap<KeyType, usize>>)> {
            let chunks = split_into_chunks(words, num_chunks);

            let mut threads: Vec<(JoinHandle<()>, Receiver<HashMap<KeyType, usize>>)> = vec![];

            for chunk in chunks {
                let (tx, rx) = mpsc::channel();

                let handle = thread::spawn(move || {
                    let map = func(&chunk);
                    tx.send(map).unwrap();
                });

                let thread = (handle, rx);
                threads.push(thread);
            }

            threads
}
use std::vec::Vec;

extern crate hashbrown;
use hashbrown::{HashMap, HashSet};

use rand::{thread_rng, Rng};

pub fn is_unique(s: &str) -> bool {
    let set: HashSet<char> = s.chars().collect();
    set.len() == s.len()
}

pub fn letter_combos(words: &[String]) -> HashMap<Vec<char>, Vec<&String>> {
    let mut combos = HashMap::new();
    for word in words {
        let mut chars: Vec<char> = word.chars().collect();
        chars.sort();
        combos.entry(chars).or_insert(Vec::new()).push(word);
    }
    combos
}

pub fn gen_guess<'a>(combos: &HashMap<Vec<char>, Vec<&'a String>>) -> &'a String {
    let mut rng = thread_rng();

    let size = combos.len();
    let select = rng.gen_range(0, size);
    let words = combos.iter().nth(select).unwrap().1;
    words[rng.gen_range(0, words.len())]
}

fn num_matches(first: &[char], second: &[char]) ->


g, Object>{
        // We only listen `once` because this event only triggers once when the
        // DPR changes from `_currentDpr`. Once that happens, we need a new
        // `_dprMediaQuery` that is watching the new `_currentDpr`.
        //
        // By using `once`, we don't need to worry about detaching the event
        // listener from the old mediaQuery after we're done with it.
        'once': true,
        'passive': true,
      }.toJSAnyDeep,
    );
  }

  // Handler of the _dprMediaQuery 'change' event.
  //
  // This calls subscribe again because events are listened to with `once: true`.
  void _onDprMediaQueryChange(DomEvent _) {
    _currentDpr = _display.devicePixelRatio;
    _dprStreamController.add(_currentDpr);
    // Re-subscribe...
    _subscribeToMediaQuery();
  }

  /// A stream that emits the latest value of [EngineFlutterDisplay.instance.devicePixelRatio].
  Stream<double> get dprChanged => _dprStreamController.stream;

  // The overrides object that is used for testing.
  final DebugDisplayDprStreamOverrides? _debugOverrides;
}

@visibleForTesting
class DebugDisplayDprStreamOverrides {
  DebugDisplayDprStreamOverrides({this.getMediaQuery});
  final DomEventTarget Function(double currentValue)? getMediaQuery;
}
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:ui/src/engine.dart';

/// Encapsulates view objects, and their optional metadata indexed by `viewId`.
class FlutterViewManager {
  FlutterViewManager(this._dispatcher);

  final EnginePlatformDispatcher _dispatcher;

  // A map of EngineFlutterViews indexed by their viewId.
  final Map<int, EngineFlutterView> _viewData = <int, EngineFlutterView>{};

  // A map of (optional) JsFlutterViewOptions, indexed by their viewId.
  final Map<int, JsFlutterViewOptions> _jsViewOptions = <int, JsFlutterViewOptions>{};

  // The controller of the [onViewCreated] stream.
  final StreamController<int> _onViewCreatedController = StreamController<int>.broadcast(
    sync: true,
  );

  // The controller of the [onViewDisposed] stream.
  final StreamController<int> _onViewDisposedController = StreamController<int>.broadcast(
    sync: true,
  );

  /// A stream of viewIds that will fire when a view is created.
  Stream<int> get onViewCreated => _onViewCreatedController.stream;

  /// A stream of viewIds that will fire when a view is disposed.
  Stream<int> get onViewDisposed => _onViewDisposedController.stream;

  /// Exposes all the [EngineFlutterView]s registered so far.
  Iterable<EngineFlutterView> get views => _viewData.values;

  /// Retrieves an [EngineFlutterView] by its `viewId`.
  EngineFlutterView? operator [](int viewId) {
    return _viewData[viewId];
  }

  EngineFlutterView createAndRegisterView(JsFlutterViewOptions jsViewOptions) {
    final EngineFlutterView view = EngineFlutterView(
      _dispatcher,
      jsViewOptions.hostElement,
      viewConstraints: jsViewOptions.viewConstraints,
    );
    registerView(view, jsViewOptions: jsViewOptions);
    return view;
  }

  /// Stores a [view] and its (optional) [jsViewOptions], indexed by `viewId`.
  ///
  /// Returns the registered [view].
  EngineFlutterView registerView(EngineFlutterView view, {JsFlutterViewOptions? jsViewOptions}) {
    final int viewId = view.viewId;
    assert(!_viewData.containsKey(viewId)); // Adding the same view twice?

    // Store the view, and the


 * 100).toInt())}%'),
            ],
          ),
        ],
      ],
    );
  }

  Widget _buildBgChild() {
    return _backgroundPath == null
        ? Center(
            child: Icon(Icons.add_photo_alternate,
                size: 32.sp, color: Colors.grey))
        : Stack(
            fit: StackFit.expand,
            children: [
              ClipRRect(
                borderRadius: BorderRadius.circular(8.sp),
                child: Opacity(
                  opacity: _backgroundOpacity,
                  child: buildCusImage(_backgroundPath!, fit: BoxFit.cover),
                ),
              ),
              Center(
                child: Container(
                  padding: EdgeInsets.all(8.sp),
                  // 用户的字体颜色和AI响应的字体颜色不一样
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.center,
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Text(
                        '透明度: ${(_backgroundOpacity * 100).toInt()}%',
                        style: TextStyle(color: Colors.black),
                      ),
                      Text(
                        '透明度: ${(_backgroundOpacity * 100).toInt()}%',
                        style: TextStyle(color: Colors.blue),
                      ),
                    ],
                  ),
                ),
              ),
            ],
          );
  }

  // 显示头像或背景选项
  void _showAvatarOrBgOptions(String type) {
    showModalBottomSheet(
      context: context,
      builder: (context) => Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          ListTile(
            leading: const Icon(Icons.photo_library),
            title: const Text('相册'),
            onTap: () {
              Navigator.pop(context);
              _pickImageFromGallery(type);
            },
          ),
          ListTile(
            leading: const Icon(Icons.camera_alt),
            title: const Text('拍照'),
            onTap: () {
              Navigator.pop(context);
              _pickImageFromCamera(type);
            },
          ),
          ListTile(
            leading: const Icon(Icons.link),
            title: const Text('网络图片地址'),
            onTap: () {
              Navigator.pop(context);
              _inputNetworkImageUrl(type);
            },
          ),
          ListTile(
            leading: const Icon(Icons.image),
            title: const Text('选择预设图片'),
            onTap: () {
              Navigator.pop(context);
              _showPresetAvatars(type);
            },
          ),
        ],
      ),
    );
  }

  // 从相册选择图片
  // type: avatar 头像, bg 背景
  Future<void> _pickImageFromGallery(String type) async {
    final picker = ImagePicker();
    final pickedFile = await picker.pickImage(source: ImageSource.gallery);

    if (pickedFile != null) {
      // 复制图片到应用目录
      final appDir = await getApplicationDocumentsDirectory();
      final fileName =
          '${type == 'avatar' ? 'character_avatar' : 'character_bg'}_${DateTime.now().millisecondsSinceEpoch}.jpg';
      final savedImage =
          await File(pickedFile.path).copy('${appDir.path}/$fileName');

      setState(() {
        if (type == 'avatar') {
          _avatarPath = savedImage.path;
        } else {
          _backgroundPath = savedImage.path;
        }
      });
    }
  }

  // 使用相机拍照
  Future<void> _p


iseconds': ms}).format('HH:mm');
      }
    }
    return tiempo;
  }

  /**
   * Compara 2 horas
   * @param string inicio  Primera hora a comparar
   * @param string termino Segunda hora a comparar
   *
   * @returns int (1) el 1er. es mayor que el 2do; (-1) el 1er. es menor que el 2do; (0) son iguales
   */
  public tiempoComparar(inicio: string, termino: string) {
    if (inicio === null || termino === null) {
      return 0;
    }
    if (inicio.indexOf(':') === -1 || termino.indexOf(':') === -1) {
      return 0;
    }
    const ini = inicio.split(':');
    const fin = termino.split(':');
    const ini_h = parseInt(ini[0], 10);
    const ini_m = parseInt(ini[1], 10);
    const fin_h = parseInt(fin[0], 10);
    const fin_m = parseInt(fin[1], 10);
    if (ini_h > fin_h) {
      return 1;
    } else if (ini_h < fin_h) {
      return -1;
    } else {
      if (ini_m > fin_m) {
        return 1;
      } else if (ini_m < fin_m) {
        return -1;
      } else {
        return 0;
      }
    }

  }

  public tiempoSumar(primero: string, segundo: string) {
    return this._tiempoOperar(primero, segundo, 'sumar');
  }

  public tiempoRestar(primero: string, segundo: string) {
    return this._tiempoOperar(primero, segundo, 'restar');
  }

  public tiempoAcumular(primero: string, segundo: string) {
    const h = parseInt(primero.split(':')[0], 10);
    const m = parseInt(primero.split(':')[1], 10);

    const a = parseInt(segundo.split(':')[0], 10);
    const b = parseInt(segundo.split(':')[1], 10);

    let minutos = m + b;
    let horas = h + a;
    if (minutos >= 60) {
      const hrs = Math.trunc(minutos / 60);
      const min_res = minutos - (hrs * 60);
      horas += hrs;
      minutos = min_res;
    }
    return horas.padZero(2) + ':' + minutos.padZero(2);
  }

  private _tiempoOperar(primero: string, segundo: string, accion: string) {
    const h = parseInt(primero.split(':')[0], 10);
    const m = parseInt(primero.split(':')[1], 10);
    const a = parseInt(segundo.split(':')[0], 10);
    const b = parseInt(segundo.split(':')[1], 10);
    const tiempo = moment().set({'hour': h, 'minute': m});
    switch (accion) {
      case 'sumar':
          tiempo.add(a, 'hours');
          tiempo.add(b, 'minute');
      break;
      case 'restar':
          tiempo.subtract(a, 'hours');
          tiempo.subtract(b, 'minute');
      break;
    }

    return tiempo.format('HH:mm');
  }

  public meses() {
    return ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'];
  }

  public getDatesBetween(startDate, stopDate) {
      const dateArray = [];
      const currentDate = moment(startDate);
      while (currentDate.format('YYYY-MM-DD') <= moment(stopDate).format('YYYY-MM-DD')) {
          dateArray.


mily:ui-sans-serif,-apple-system,system-ui,Segoe UI,Helvetica;color:#333;}#mermaid-m6khgo66ecr .cluster-label text{fill:#444;}#mermaid-m6khgo66ecr .cluster-label span{color:#444;}#mermaid-m6khgo66ecr .cluster-label span p{background-color:transparent;}#mermaid-m6khgo66ecr .label text,#mermaid-m6khgo66ecr span{fill:#333;color:#333;}#mermaid-m6khgo66ecr .node rect,#mermaid-m6khgo66ecr .node circle,#mermaid-m6khgo66ecr .node ellipse,#mermaid-m6khgo66ecr .node polygon,#mermaid-m6khgo66ecr .node path{fill:#ffffff;stroke:#dddddd;stroke-width:1px;}#mermaid-m6khgo66ecr .rough-node .label text,#mermaid-m6khgo66ecr .node .label text,#mermaid-m6khgo66ecr .image-shape .label,#mermaid-m6khgo66ecr .icon-shape .label{text-anchor:middle;}#mermaid-m6khgo66ecr .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-m6khgo66ecr .rough-node .label,#mermaid-m6khgo66ecr .node .label,#mermaid-m6khgo66ecr .image-shape .label,#mermaid-m6khgo66ecr .icon-shape .label{text-align:center;}#mermaid-m6khgo66ecr .node.clickable{cursor:pointer;}#mermaid-m6khgo66ecr .root .anchor path{fill:#999!important;stroke-width:0;stroke:#999;}#mermaid-m6khgo66ecr .arrowheadPath{fill:#0b0b0b;}#mermaid-m6khgo66ecr .edgePath .path{stroke:#999;stroke-width:2.0px;}#mermaid-m6khgo66ecr .flowchart-link{stroke:#999;fill:none;}#mermaid-m6khgo66ecr .edgeLabel{background-color:#ffffff;text-align:center;}#mermaid-m6khgo66ecr .edgeLabel p{background-color:#ffffff;}#mermaid-m6khgo66ecr .edgeLabel rect{opacity:0.5;background-color:#ffffff;fill:#ffffff;}#mermaid-m6khgo66ecr .labelBkg{background-color:rgba(255, 255, 255, 0.5);}#mermaid-m6khgo66ecr .cluster rect{fill:#f8f8f8;stroke:#dddddd;stroke-width:1px;}#mermaid-m6khgo66ecr .cluster text{fill:#444;}#mermaid-m6khgo66ecr .cluster span{color:#444;}#mermaid-m6khgo66ecr div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:ui-sans-serif,-apple-system,system-ui,Segoe UI,Helvetica;font-size:12px;background:#dddddd;border:1px solid hsl(0, 0%, 76.6666666667%);border-radius:2px;pointer-events:none;z-index:100;}#mermaid-m6khgo66ecr .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-m6khgo66ecr rect.text{fill:none;stroke-width:0;}#mermaid-m6khgo66ecr .icon-shape,#mermaid-m6khgo66ecr .image-shape{background-color:#ffffff;text-align:center;}#mermaid-m6khgo66ecr .icon-shape p,#mermaid-m6khgo66ecr .image-shape p{background-color:#ffffff;padding:2px;}#mermaid-m6


> {
            let args = {
                let mut cut = cmd_line[1..].splitn(2, |&c| c == QUOTE);
                if let Some(exe) = cut.next() {
                    ret_val.push(S::from_wide(exe));
                }
                cut.next()
            };
            if let Some(args) = args {
                args
            } else {
                return ret_val;
            }
        }
        // Implement quirk: when they say whitespace here,
        // they include the entire ASCII control plane:
        // "However, if lpCmdLine starts with any amount of whitespace, CommandLineToArgvW
        // will consider the first argument to be an empty string. Excess whitespace at the
        // end of lpCmdLine is ignored."
        0..=SPACE => {
            ret_val.push(S::from_str(""));
            &cmd_line[1..]
        },
        // The executable name ends at the next whitespace,
        // no matter what.
        _ => {
            let args = {
                let mut cut = cmd_line.splitn(2, |&c| c > 0 && c <= SPACE);
                if let Some(exe) = cut.next() {
                    ret_val.push(S::from_wide(exe));
                }
                cut.next()
            };
            if let Some(args) = args {
                args
            } else {
                return ret_val;
            }
        }
    };
    let mut cur = Vec::new();
    let mut in_quotes = false;
    let mut was_in_quotes = false;
    let mut backslash_count: usize = 0;
    for &c in cmd_line {
        match c {
            // backslash
            BACKSLASH => {
                backslash_count += 1;
                was_in_quotes = false;
            },
            QUOTE if backslash_count % 2 == 0 => {
                cur.extend(iter::repeat(b'\\' as u16).take(backslash_count / 2));
                backslash_count = 0;
                if was_in_quotes {
                    cur.push('"' as u16);
                    was_in_quotes = false;
                } else {
                    was_in_quotes = in_quotes;
                    in_quotes = !in_quotes;
                }
            }
            QUOTE if backslash_count % 2 != 0 => {
                cur.extend(iter::repeat(b'\\' as u16).take(backslash_count / 2));
                backslash_count = 0;
                was_in_quotes = false;
                cur.push(b'"' as u16);
            }
            SPACE | TAB if !in_quotes => {
                cur.extend(iter::repeat(b'\\' as u16).take(backslash_count));
                if !cur.is_empty() || was_in_quotes {
                    ret_val.push(S::from_wide(&cur[..]));
                    cur.truncate(0);
                }
                backslash_count = 0;
                was_in_quotes = false;
            }
            _ => {
                cur.extend(iter::repeat(b'\\' as u16).take(backslash_count));
                backslash_count = 0;
                was_in_quotes = false;
                cur.push(c);
            }
        }
    }
    cur.extend(iter::repeat(b'\\' as u16).take(backslash_count));
    // include empty quoted strings at the end of the arguments list
    if !cur.is_empty() || was_in_quotes || in_quotes {
        ret_val.push(S::from_wide(&cur[..]));
    }
    ret_val
}

pub


 {"supercategory": "appliance", "id": 73, "name": "refrigerator"},
        {"supercategory": "indoor", "id": 74, "name": "book"},
        {"supercategory": "indoor", "id": 75, "name": "clock"},
        {"supercategory": "indoor", "id": 76, "name": "vase"},
        {"supercategory": "indoor", "id": 77, "name": "scissors"},
        {"supercategory": "indoor", "id": 78, "name": "teddy bear"},
        {"supercategory": "indoor", "id": 79, "name": "hair drier"},
        {"supercategory": "indoor", "id": 80, "name": "toothbrush"}]

    json_dict_val = {'info': {'year': 2020},
                     'licenses': licenses,
                     'categories': categories,
                     'images': images_list,
                     'annotations': annotations_list}

    val_file_name = os.path.join(output_dir, 'val_coco_format.json')
    with open(val_file_name, 'w') as outfile:
        json.dump(json_dict_val, outfile)

if __name__ == "__main__":
    # Create arg parser
    parser = argparse.ArgumentParser()

    parser.add_argument(
        "--dataset-dir",
        required=False,
        type=str,
        default='/nobackup-slow/dataset/my_xfdu/OpenImages/oe_classes/',
        help='bdd100k dataset directory')

    parser.add_argument(
        "--output-dir",
        required=False,
        type=str,
        help='converted dataset write directory')

    args = parser.parse_args()
    main(args)


	m["/moab-2/"] = "b10e7f48-6b71-573a-8123-a7a997f595ac"
	m["/bra-less/"] = "ca62f7f8-1cbd-54c9-9499-49c8c96d002f"
	m["/treat-night/"] = "724fb5d0-556e-5913-8070-402762d7d769"
	m["/happy-guests-happy-boss-lily-delice/"] = "ba8b4180-0a05-5ab4-b31d-3f69a7255581"
	m["/teen-game-kateri-in-the-shower/"] = "43a80bea-2d42-518e-81e5-5726a31707d4"
	m["/jayla-de-angelis-and-mary-rock-live-show-part-3/"] = "b36c645a-8255-5c4d-ac1f-352824d95111"
	m["/olivia-hart-wet-wild-non-pov-soaked-action/"] = "15943a74-7e57-54de-9b14-7a9a294e22f2"
	m["/vr-porn-is-cheating/"] = "7b43d4e6-6949-5db1-a6fa-3ea3344da8fc"
	m["/little-caprice-you-and-the-colombian-housekeeper-lets-ride-your-cock-part-3/"] = "9960a169-ad11-51f4-b69b-d3fc4d765ae5"
	m["/rouge-rendezvous/"] = "b6efa4fe-f2fb-57ce-8035-35f6ad4991cc"
	m["/rhinestone-cowgirl-digitally-remastered/"] = "059c3a48-337c-5896-a4a9-399c52a387eb"
	m["/new-teen-brunette-tifa-quinn-interview/"] = "b26faf1e-8c2d-5f1a-af22-9b177907af5c"
	m["/tekken-lucky-chloe-cowgirl-6k-90fps-with-sound/"] = "53abe37e-f24c-5817-be75-8336130cd17d"
	m["/jenny-james-black-widow-with-leggings-riding-crop-8k-vr/"] = "a9e638b5-c53f-5c90-a8a1-0563fc20867d"
	m["/spring-break-with-blonde-stepsister/"] = "93fe683a-30e1-5658-927d-0c7505423a53"
	m["/suzuna-shiraishi-fucks-her-pussy-like-a-princess/"] = "f4c9837c-5d8d-5e9b-a2fb-bd203c5aa3a4"
	m["/naomi-bennet-purple-friend/"] = "1b928343-8ccf-577f-9a51-d0464986b35c"
	m["/ukrainian-hottie-marsianna-amoon-cums-from-anal-masturbation/"] = "32c3da3d-ebff-5b1f-a2ac-a11ef17bcdfb"
	m["/brook-logan-black-peaked-cap-mistress-demands-you-worship-satisfy-her-pussy-8k-vr/"] = "682bd3b6-6018-54ac-baf6-32b4f03eb4cb"
	m["/super-sexual-relaxation-with-mitzi


#!/usr/bin/env python3
"""
WebSocket服务器 - 用于抖音直播消息监听
支持WebSocket协议，可以与前端或其他WebSocket客户端通信
"""

import asyncio
import json
import websockets
from datetime import datetime
from core.cliptemplate.coze.auto_live_reply import config_manager, SocketServer
import random

class WebSocketServer:
    def __init__(self, host='0.0.0.0', port=8888):
        # 验证IP地址是否可用（复用SocketServer的逻辑）
        if host not in ['0.0.0.0', '127.0.0.1', 'localhost']:
            import socket as sock
            import subprocess
            import re

            try:
                # 尝试获取系统所有IP地址
                hostname = sock.gethostname()
                all_ips = sock.gethostbyname_ex(hostname)[2]

                # 添加一些常见的本地IP获取方式
                try:
                    result = subprocess.run(['ifconfig'], capture_output=True, text=True)
                    ips_from_ifconfig = re.findall(r'inet\s+(\d+\.\d+\.\d+\.\d+)', result.stdout)
                    all_ips.extend(ips_from_ifconfig)
                except:
                    pass

                all_ips = list(set(all_ips))  # 去重

                if host not in all_ips:
                    print(f"⚠ 警告: IP地址 {host} 不在系统网络接口中")
                    print(f"📋 可用的IP地址: {all_ips}")
                    print(f"🔄 将使用 0.0.0.0 来监听所有接口")
                    host = '0.0.0.0'
            except Exception as e:
                print(f"❌ 检查IP地址时出错: {e}")
                print(f"🔄 将使用 0.0.0.0 来监听所有接口")
                host = '0.0.0.0'

        self.host = host
        self.port = port
        self.clients = set()
        # 使用SocketServer的逻辑来生成回复
        self.socket_server = SocketServer(host, port)
        print(f"🚀 WebSocket服务器初始化 - {self.host}:{self.port}")

    async def register(self, websocket):
        self.clients.add(websocket)
        print(f"✅ 新客户端连接: {websocket.remote_address}")

        # 发送欢迎消息
        await websocket.send(json.dumps({
            "type": "welcome",
            "message": "连接成功！欢迎使用抖音直播助手",
            "timestamp": datetime.now().isoformat(),
            "product_info": config_manager.product_info
        }, ensure_ascii=False))

    async def unregister(self, websocket):
        self.clients.remove(websocket)
        print(f"👋 客户端断开连接: {websocket.remote_address}")

    async def handle_message(self, websocket, message):
        """处理接收到的消息"""
        try:
            # 尝试解析JSON
            try:
                data = json.loads(message)
                msg_type = data.get('type', 'chat')
                content = data.get('content', message)
            except:
                # 如果不是JSON，当作普通文本处理
                msg_type = 'chat'
                content = message

            print(f"📨 收到消息 [{msg_type}]: {content}")

            # 根据消息类型处理
            if msg_type == 'live_config':
                # 配置更新
                response = await self.handle_config_update(data)
            elif msg_type == 'status':
                # 状态查询
                response = {
                    "type": "status",
                    "server": "running",
                    "clients": len(self.clients),
                    "product": config_manager.product_info['product_name'],
                    "voice": config_manager.voice_config['voice']
                }
            else:
                # 普通聊天消息，使用SocketServer的方法生成回复
                reply = self.socket_server.process_message(content)
                response = {
                    "type": "reply",
                    "question": content,
                    "answer": reply,
                    "timestamp": datetime.now().isoformat()
                }

            # 发送响应
            await websocket.send(json.dumps(response, ensure_ascii=False))

            # 广播给其他客户端（可选）
            if msg_type == 'chat' and len(self.clients) > 1:
                broadcast_msg = {
                    "type": "broadcast",
                    "from": str(websocket.remote_address),
                    "content": content,
                    "reply": response['answer']
                }
                await self.broadcast(json.dumps(broadcast_msg, ensure_ascii=False), websocket)

        except Exception as e:
            error_response = {
                "type": "error",
                "message": f"处理消息时出错: {str(e)}"
            }
            await websocket.send(json.dumps(error_response, ensur


bscribe((res)=>{
      this.products = res['products'];
      this.categories = res['products'].map((p) => p.productLine)
      .filter((p, ind, arr)=> arr.indexOf(p) === ind).sort();
      this.vendors = res['products'].map((p) => p.productVendor)
      .filter((p, ind, arr)=> arr.indexOf(p) === ind).sort();
      this.scales = res['products'].map((p) => p.productScale)
      .filter((p, ind, arr)=> arr.indexOf(p) === ind).sort();
    });
   };

   getCategories(): string[]{
     return this.categories;
   }

   getVendors(): string[]{
     return this.vendors;
   }

   getScales(): string[]{
    return this.scales;
  }

   getProducts(category:string = null, vendor:string = null, scale:string = null): Product[]{
     return this.products.filter((Product, i, a) => category === null || Product.productLine === category)
     .filter((Product, i, a) => vendor === null || Product.productVendor === vendor)
     .filter((Product, i, a) => scale === null || Product.productScale === scale);
   }

   getProduct(productCode: string): Product{
     return this.products.find((product) => productCode == product.productCode);
   }
}
import { ESourceType, Options, RequestBody, S3Settings, Storage } from '../models';

/** Check request parameters and data. */
export const checkRequestData = (
  type: ESourceType,
  store: boolean | undefined,
  storage: Partial<Storage>,
  options: Partial<Options>
) => {
  const { s3 = ({} as S3Settings) } = storage;
  const { viewPortHeight, viewPortWidth } = options;

  if ((viewPortHeight && !viewPortWidth) || (viewPortWidth && !viewPortHeight)) {
    throw new Error('Incorrect viewPort parameters. If one parameter defined, another can\'t be undefined.');
  }

  const availableSources = Object.values(ESourceType);
  if (!availableSources.includes(type)) {
    throw new Error(`Incorrect \'type\' parameter. Must be one of: ${availableSources}.`);
  }

  if (store && (!s3.bucket || !s3.path)) {
    throw new Error(`Missed or incorrect \'s3\' option. Must contain: bucket, path.`);
  }
};
/*
 * Copyright 2020 Spotify AB
 *
 * 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.
 */

import ApiTestRegistry from './ApiTestRegistry';
import ApiRef from './ApiRef';

describe('ApiTestRegistry', () => {
  const aRef = new ApiRef<number>({ id: 'a', description: '' });
  const bRef = new ApiRef<string>({ id: 'b', description: '' });
  const cRef = new ApiRef<string>({ id: 'c', description: '' });

  it('should be created', () => {
    const registry = new ApiTestRegistry();
    expect(registry.get(aRef)).toBe(undefined);
    expect(registry.get(bRef)).toBe(undefined);
    expect(registry.get(cRef)).toBe(undefined);
  });

  it('should register a factory', () => {
    const registry = new ApiTestRegistry();
    registry.register(aRef, () => 3);
    expect(registry.get(aRef)).toBe(3);
    expect(registry.get(bRef)).toBe(undefined);
    expect(registry.get(cRef)).toBe(undefined);


                .mceFooterSection .mceText, .mceFooterSection .mceText p{font-size: 16px !important; line-height: 140% !important;}
                .mceText, .mceText p{font-size: 16px !important; line-height: 140% !important;}
                h1{font-size: 30px !important; line-height: 120% !important;}
                h2{font-size: 26px !important; line-height: 120% !important;}
                h3{font-size: 20px !important; line-height: 125% !important;}
                h4{font-size: 18px !important; line-height: 125% !important;}
            }
            @media only screen and (max-width: 640px){
                .mceClusterLayout td{padding: 4px !important;}
            }
            div[contenteditable="true"] {outline: 0;}
            .ProseMirror .empty-node, .ProseMirror:empty {position: relative;}
            .ProseMirror .empty-node::before, .ProseMirror:empty::before {
                position: absolute;
                left: 0;
                right: 0;
                color: rgba(0,0,0,0.2);
                cursor: text;
            }
            .ProseMirror .empty-node:hover::before, .ProseMirror:empty:hover::before {
                color: rgba(0,0,0,0.3);
            }
            .ProseMirror h1.empty-node:only-child::before,
            .ProseMirror h2.empty-node:only-child::before,
            .ProseMirror h3.empty-node:only-child::before,
            .ProseMirror h4.empty-node:only-child::before {
                content: 'Heading';
            }
            .ProseMirror p.empty-node:only-child::before, .ProseMirror:empty::before {
                content: 'Start typing...';
            }
            a .ProseMirror p.empty-node::before, a .ProseMirror:empty::before {
                content: '';
            }
            .mceText, .ProseMirror {
                white-space: pre-wrap;
            }
body, #bodyTable { background-color: rgb(244, 244, 244); }.mceText, .mceLabel { font-family: "Helvetica Neue", Helvetica, Arial, Verdana, sans-serif; }.mceText, .mceLabel { color: rgb(0, 0, 0); }.mceText h1 { margin-bottom: 0px; }.mceText p { margin-bottom: 0px; }.mceText label { margin-bottom: 0px; }.mceText input { margin-bottom: 0px; }.mceSpacing-24 .mceInput + .mceErrorMessage { margin-top: -12px; }.mceText h1 { margin-bottom: 0px; }.mceText p { margin-bottom: 0px; }.mceText label { margin-bottom: 0px; }.mceText input { margin-bottom: 0px; }.mceSpacing-12 .mceInput + .mceErrorMessage { margin-top: -6px; }.mceText h1 { margin-bottom: 0px; }.mceText p { margin-bottom: 0px; }.mceText label { margin-bottom: 0px; }.mceText input { margin-bottom: 0px; }.mceSpacing-48 .mceInput + .mceErrorMessage { margin-top: -24px; }.mceInput { background-color: transparent; border: 2px solid rgb(208, 208, 208); width: 60%; color


)
        btnSource2 = findViewById(R.id.btnSource2)
        rbAspectRatio_16_9 = findViewById(R.id.rbAspectRatio_16_9)
        rbAspectRatio_4_3 = findViewById(R.id.rbAspectRatio_4_3)
        tvVideoSize = findViewById(R.id.tvVideoSize)
        tvCurrentTime = findViewById(R.id.tvCurrentTime)
        tvCurrentNetworkSpeed = findViewById(R.id.tvCurrentNetworkSpeed)

        btnSource1?.setOnClickListener { onChannelSourceSelected?.invoke(0) }
        btnSource2?.setOnClickListener { onChannelSourceSelected?.invoke(1) }
        rbAspectRatio_16_9.setOnClickListener { onAspectRatioSelected?.invoke(true) }
        rbAspectRatio_4_3.setOnClickListener { onAspectRatioSelected?.invoke(false) }

        updateAction = Runnable {
            val time = measureTimeMillis {
                updateNetworkSpeed()
                tvCurrentTime.text = sdf.format(System.currentTimeMillis())
                onGetVideoSize?.invoke()?.let {
                    tvVideoSize.text =
                        if (it.x == 0 || it.y == 0) context.getString(R.string.unknown)
                        else "${it.x}x${it.y}"
                }
            }
            postDelayed(updateAction, UPDATE_PERIOD - time)
        }
        setSelectedAspectRatio(true)
    }

    private fun updateNetworkSpeed() {
        val trafficBytes = getTrafficBytes()
        if (lastTrafficBytes != 0L) {
            val duration = (SystemClock.uptimeMillis() - lastTrafficBytesUpdateTime) / 1000f
            var speed = (trafficBytes - lastTrafficBytes) / duration / 1024
            if (speed >= 1000F) {
                speed /= 1024
                var speedString = "%.1f".format(speed)
                if (speedString.endsWith(".0")) {
                    speedString = speedString.substring(0, speedString.length - 2)
                }
                tvCurrentNetworkSpeed.text = "$speedString MB/s"
            } else {
                tvCurrentNetworkSpeed.text = "%d KB/s".format(speed.toInt())
            }
        }
        lastTrafficBytes = trafficBytes
        lastTrafficBytesUpdateTime = SystemClock.uptimeMillis()
    }

    fun setSelectedAspectRatio(is_16_9: Boolean) {
        rbAspectRatio_16_9.isSelected = is_16_9
        rbAspectRatio_4_3.isSelected = !is_16_9
    }

    fun setSelectedChannelSource(sourceIndex: Int, sourceSize: Int) {
        btnSource1.isSelected = sourceIndex == 0
        btnSource2.isSelected = sourceIndex == 1
        btnSource2.isVisible = sourceSize >= 2
        tvSource.isVisible = sourceSize >= 2
        llSource.isVisible = sourceSize >= 2
    }

    override fun setVisibility(visibility: Int) {
        super.setVisibility(visibility)
        if (visibility == VISIBLE) {
            post(updateAction)
            post { (if (rbAspectRatio_16_9.isSelected) rbAspectRatio_16_9 else rbAspectRatio_4_3).requestFocus() }
        } else {
            removeCallbacks(updateAction)
        }
    }

    override fun dispatchKeyEvent(event: KeyEvent): Boolean {
        if (event.keyCode == KeyEvent.KEYCODE_MENU && event.action == KeyEvent.ACTION_UP) {
            onAspectRatioSelected?.invoke(rbAspectRatio_16_9.isSelected)
        }
        return super.dispatchKeyEvent(event)
    }

}package org.hyacinthbots.lilybot.database

import com.mongodb.ConnectionString
import com.mongodb.MongoClientSettings
import org.bson.UuidRepresentation
import org.hyacinthbots.lilybot.database.migration


�軍月布長手套",
[31622] = "總元帥月布風帽",
[31623] = "總元帥月布腿甲",
[31624] = "總元帥月布肩墊",
[31625] = "總元帥月布法衣",
[31626] = "高階督軍月布風帽",
[31627] = "高階督軍月布腿甲",
[31628] = "高階督軍月布肩墊",
[31629] = "高階督軍月布法衣",
[31630] = "總元帥裝飾胸鎧",
[31631] = "總元帥裝飾手套",
[31632] = "總元帥裝飾護盔",
[31633] = "總元帥裝飾護腿",
[31634] = "總元帥裝飾肩甲",
[31635] = "高階督軍裝飾胸鎧",
[31636] = "高階督軍裝飾手套",
[31637] = "高階督軍裝飾護盔",
[31638] = "高階督軍裝飾護腿",
[31639] = "高階督軍裝飾肩甲",
[31640] = "總元帥環甲護胸",
[31641] = "總元帥環甲手套",
[31642] = "總元帥環甲首盔",
[31643] = "總元帥環甲腿甲",
[31644] = "總元帥環甲護肩",
[31646] = "高階督軍環甲護胸",
[31647] = "高階督軍環甲手套",
[31648] = "高階督軍環甲首盔",
[31649] = "高階督軍環甲腿甲",
[31650] = "高階督軍環甲肩墊",
[31651] = "劍刃氏族圖騰",
[31652] = "附魔幽藤水晶",
[31653] = "濃縮的虛空氣體",
[31654] = "Monster - Dragonmaw, Shadowmoon - 1H Mace",
[31655] = "邪惡的空中牢獄鑰匙",
[31656] = "次級虛空龍靈魂",
[31657] = "重生寬衣",
[31658] = "斥候兜帽",
[31659] = "研究員披肩",
[31660] = "菲拉芬躲藏者腰帶",
[31661] = "里薩歐腕環",
[31662] = "里拉克的書信",
[31663] = "召靈圖騰",
[31664] = "祖魯希德的鑰匙",
[31665] = "玩具蒸汽坦克",
[31666] = "破損的蒸汽坦克遙控器",
[31667] = "千謊言之刀",
[31668] = "寶珠招集圖騰


DATE_LATENCY_TOLERANCE_LATENCY_SENSITIVE" : The update will
  /// propagate to clients within several minutes on average and up to a few
  /// hours in rare cases. Throughput is limited to 7,200 updates per app per
  /// hour.
  /// - "PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT" : The update will
  /// propagate to clients within 24 hours. Supports high throughput of up to
  /// 720,000 updates per app per hour using batch modification methods.
  core.String? latencyTolerance;

  /// The offer ID of the offer to cancel.
  ///
  /// Required.
  core.String? offerId;

  /// The parent app (package name) of the offer to cancel.
  ///
  /// Required.
  core.String? packageName;

  /// The parent one-time product (ID) of the offer to cancel.
  ///
  /// Required.
  core.String? productId;

  /// The parent purchase option (ID) of the offer to cancel.
  ///
  /// Required.
  core.String? purchaseOptionId;

  CancelOneTimeProductOfferRequest({
    this.latencyTolerance,
    this.offerId,
    this.packageName,
    this.productId,
    this.purchaseOptionId,
  });

  CancelOneTimeProductOfferRequest.fromJson(core.Map json_)
    : this(
        latencyTolerance: json_['latencyTolerance'] as core.String?,
        offerId: json_['offerId'] as core.String?,
        packageName: json_['packageName'] as core.String?,
        productId: json_['productId'] as core.String?,
        purchaseOptionId: json_['purchaseOptionId'] as core.String?,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (latencyTolerance != null) 'latencyTolerance': latencyTolerance!,
    if (offerId != null) 'offerId': offerId!,
    if (packageName != null) 'packageName': packageName!,
    if (productId != null) 'productId': productId!,
    if (purchaseOptionId != null) 'purchaseOptionId': purchaseOptionId!,
  };
}

/// Request for the purchases.subscriptionsv2.cancel API.
class CancelSubscriptionPurchaseRequest {
  /// Additional details around the subscription revocation.
  ///
  /// Required.
  CancellationContext? cancellationContext;

  CancelSubscriptionPurchaseRequest({this.cancellationContext});

  CancelSubscriptionPurchaseRequest.fromJson(core.Map json_)
    : this(
        cancellationContext:
            json_.containsKey('cancellationContext')
                ? CancellationContext.fromJson(
                  json_['cancellationContext']
                      as core.Map<core.String, core.dynamic>,
                )
                : null,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (cancellationContext != null)
      'cancellationContext': cancellationContext!,
  };
}

/// Response for the purchases.subscriptionsv2.cancel API.
typedef CancelSubscriptionPurchaseResponse = $Empty;

/// Result of the cancel survey when the subscription was canceled by the user.
class CancelSurveyResult {
  /// The reason the user selected in the cancel survey.
  /// Possible string values are:
  /// - "CANCEL_SURVEY_REASON_UNSPECIFIED" : Unspecified cancel survey reason.
  /// - "CANCEL_SURVEY_REASON_NOT_ENOUGH_USAGE" : Not enough usage of the
  /// subscription.
  /// - "CANCEL_SURVEY_REASON_TECHNICAL_ISSUES" : Technical issues while using
  /// the app.
  /// - "CANCEL_SURVEY_REASON_COST_RELATED" : Cost related issues.
  /// - "CANCEL_SURVEY_REASON_FOUND_BETTER_APP" : The


_os] offset:4096 ; load i_k:2 into local buffer 0, repeat 0
    v_mfma_f32_32x32x8f16 v[a_c+48:a_c+63], v[v_a+2:v_a+3], v[v_b+2:v_b+3], v[a_c+48:a_c+63]     ; repeat:1x1, step:0x0, num_a_c:16
    v_cmpx_le_u32 vcc, 1, v[v_in_flag]
    buffer_load_dwordx4 v[v_gld_a:v_gld_a+3], v[v_in_os], s[s_p_in:s_p_in+3], s[s_in_offset] offen offset:0
    s_mov_b64 exec, -1
    ds_read_b64 v[v_b+2:v_b+2+1], v[v_sld_b_os] offset:5120 ; load i_k:2 into local buffer 0, repeat 1
    s_waitcnt lgkmcnt(5)
    v_mfma_f32_32x32x8f16 v[a_c+0:a_c+15], v[v_a+4:v_a+5], v[v_b+4:v_b+5], v[a_c+0:a_c+15]     ; repeat:0x0, step:0x0, num_a_c:16
    v_cmpx_le_u32 vcc, 1, v[v_in_flag+1]
    buffer_load_dwordx4 v[v_gld_a+4:v_gld_a+4+3], v[v_in_os+1], s[s_p_in:s_p_in+3], s[s_in_offset] offen offset:0
    s_mov_b64 exec, -1
    ds_read_b64 v[v_a+2:v_a+2+1], v[v_sld_a_os] offset:5120 ; load i_k:2 into local buffer 0, repeat 1
    s_waitcnt lgkmcnt(5)
    v_mfma_f32_32x32x8f16 v[a_c+16:a_c+31], v[v_a+4:v_a+5], v[v_b+6:v_b+7], v[a_c+16:a_c+31]     ; repeat:0x1, step:0x0, num_a_c:16
    s_add_u32 s[s_in_offset],  s[s_move_slice_k_stride_c], s[s_in_offset]
    ds_read_b64 v[v_a+4:v_a+4+1], v[v_sld_a_os] offset:6144 ; load i_k:3 into local buffer 1, repeat 0
    s_waitcnt lgkmcnt(5)
    v_mfma_f32_32x32x8f16 v[a_c+32:a_c+47], v[v_a+6:v_a+7], v[v_b+4:v_b+5], v[a_c+32:a_c+47]     ; repeat:1x0, step:0x0, num_a_c:16
    v_add_u32 v[v_wei_os], s[s_move_slice_k_stride_c], v[v_wei_os]
    ds_read_b64 v[v_b+4:v_b+4+1], v[v_sld_b_os] offset:6144 ; load i_k:3 into local buffer 1, repeat 0
    v_mfma_f32_32x32x8f16 v[a_c+48:a_c+63], v[v_a+6:v_a+7], v[


_390_PC32DBL
	jghe	bar@PLT

#CHECK: jgnl	bar@PLT                 # encoding: [0xc0,0xb4,A,A,A,A]
#CHECK:  fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL
	jgnl	bar@PLT

#CHECK: jgle	bar@PLT                 # encoding: [0xc0,0xc4,A,A,A,A]
#CHECK:  fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL
	jgle	bar@PLT

#CHECK: jgnh	bar@PLT                 # encoding: [0xc0,0xd4,A,A,A,A]
#CHECK:  fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL
	jgnh	bar@PLT

#CHECK: jgno	bar@PLT                 # encoding: [0xc0,0xe4,A,A,A,A]
#CHECK:  fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL
	jgno	bar@PLT

#CHECK: jg	bar@PLT                 # encoding: [0xc0,0xf4,A,A,A,A]
#CHECK:  fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL
	jg	bar@PLT

#CHECK: bct	%r0, 0                  # encoding: [0x46,0x00,0x00,0x00]
#CHECK: bct	%r0, 4095               # encoding: [0x46,0x00,0x0f,0xff]
#CHECK: bct	%r0, 0(%r1)             # encoding: [0x46,0x00,0x10,0x00]
#CHECK: bct	%r0, 0(%r15)            # encoding: [0x46,0x00,0xf0,0x00]
#CHECK: bct	%r0, 4095(%r1,%r15)     # encoding: [0x46,0x01,0xff,0xff]
#CHECK: bct	%r0, 4095(%r15,%r1)     # encoding: [0x46,0x0f,0x1f,0xff]
#CHECK: bct	%r15, 0                 # encoding: [0x46,0xf0,0x00,0x00]

	bct	%r0, 0
	bct	%r0, 4095
	bct	%r0, 0(%r1)
	bct	%r0, 0(%r15)
	bct	%r0, 4095(%r1,%r15)
	bct	%r0, 4095(%r15,%r1)
	bct	%r15, 0

#CHECK: bctr	%r0, %r9                # encoding: [0x06,0x09]
#CHECK: bctr	%r0, %r15               # encoding: [0x06,0x0f]
#CHECK: bctr	%r15, %r0               # encoding: [0x06,0xf0]
#CHECK: bctr	%r15, %r9               # encoding: [0x06,0xf9]

	bctr	%r0,%r9
	bctr	%r0,%r15
	bctr	%r15,%r0
	bctr	%r15,%r9

#CHECK: bctg	%r0, -524288            # encoding: [0xe3,0x00,0x00,0x00,0x80,0x46]
#CHECK: bctg	%r0, -1                 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x46]
#CHECK: bctg	%r0, 0                  # encoding: [0xe3,0x00,0x00,0x00,0x00,0x46]
#CHECK: b


--- === plugins.finalcutpro.fullscreen.stopped ===
---
--- Play Full Screen & Stop

local require           = require

local fcp               = require "cp.apple.finalcutpro"
local just              = require "cp.just"
local tools             = require "cp.tools"

local doUntil           = just.doUntil
local playErrorSound    = tools.playErrorSound

local plugin = {
    id              = "finalcutpro.fullscreen.stopped",
    group           = "finalcutpro",
    dependencies    = {
        ["finalcutpro.commands"]    = "fcpxCmds",
    }
}

function plugin.init(deps)
    --------------------------------------------------------------------------------
    -- Only load plu


0services%20-%20The%20basics-Dateien/hivis-champion-community.jpg" border="0" height="70" width="188">
Nominate IBM Champions: experts who help you build a smarter planet with IBM

Special offers

Trial software offers

Print this page

Share this page

Follow developerWorks

Share this page:

Facebook

LinkedIn

<a class="ibm-twitter-link" href="http://twitter.com/home?status=


	 */
	private fun sumAdjustedHeightOffsets(humanPoseManager: HumanPoseManager): Float {
		var sum = 0f
		SkeletonConfigManager.HEIGHT_OFFSETS.forEach {
			if (!adjustOffsets.contains(it)) return@forEach
			sum += humanPoseManager.getOffset(it)
		}
		return sum
	}

	/**
	 * Sums only the height offsets of the provided offset map
	 */
	private fun sumHeightOffsets(offsets: EnumMap<SkeletonConfigOffsets, Float> = this.offsets): Float {
		var sum = 0f
		SkeletonConfigManager.HEIGHT_OFFSETS.forEach {
			sum += offsets[it] ?: return@forEach
		}
		return sum
	}

	private fun scaleSkeleton(humanPoseManager: HumanPoseManager, targetHeight: Float = 1f, onlyAdjustedHeight: Boolean = false) {
		// Get the scale to apply for the appropriate offsets
		val scale = if (onlyAdjustedHeight) {
			// Only adjusted height offsets
			val adjHeight = sumAdjustedHeightOffsets(humanPoseManager)
			// Remove the constant from the target, leaving only the target for adjusted height offsets
			val adjTarget = targetHeight - (humanPoseManager.userHeightFromConfig - adjHeight)
			// Return only the scale for adjusted offsets
			adjTarget / adjHeight
		} else {
			targetHeight / humanPoseManager.userHeightFromConfig
		}

		val offsets = if (onlyAdjustedHeight) SkeletonConfigManager.HEIGHT_OFFSETS else SkeletonConfigOffsets.values
		for (offset in offsets) {
			if (onlyAdjustedHeight && !adjustOffsets.contains(offset)) continue
			humanPoseManager.setOffset(offset, humanPoseManager.getOffset(offset) * scale)
		}
	}

	private fun scaleOffsets(offsets: EnumMap<SkeletonConfigOffsets, Float> = this.offsets, targetHeight: Float = adjustedHeightNormalized, onlyHeightOffsets: Boolean = false) {
		// Get the scale to apply for the appropriate offsets
		val scale = targetHeight / sumHeightOffsets(offsets)

		for (entry in offsets.entries) {
			if (onlyHeightOffsets && !SkeletonConfigManager.HEIGHT_OFFSETS.contains(entry.key)) continue
			entry.setValue(entry.value * scale)
		}
	}

	@Throws(AutoBoneException::class)
	private fun getErrorDeriv(step: PoseFrameStep<AutoBoneStep>): Float {
		val config = step.config
		var sumError = 0f
		if (config.slideErrorFactor > 0f) {
			sumError += slideError.getStepError(step) * config.slideErrorFactor
		}
		if (config.offsetSlideErrorFactor > 0f) {
			sumError += (
				offsetSlideError.getStepError(step) *
					config.offsetSlideErrorFactor
				)
		}
		if (config.footHeightOffsetErrorFactor > 0f) {
			sumError += (
				footHeightOffsetError.getStepError(step) *
					config.footHeightOffsetErrorFactor
				)
		}
		if (config.bodyProportionErrorFactor > 0f) {
			sumError += (
				bodyProportionError.getStepError(step) *
					config.bodyProportionErrorFactor
				)
		}
		if (config.heightErrorFactor > 0f) {
			sumError += heightError.getStepError(step) * config.heightErrorFactor
		}
		if (config.positionErrorFactor > 0f) {
			sumError += (
				positionError.getStepError(step) *
					config.positionErrorFactor
				)
		}
		if (config.positionOffsetErrorFactor > 0f) {
			sumError += (
				positionOffsetError.getStepError(step) *
					config.positionOffsetErrorFactor
				)
		}
		return sumError
	}

	val lengt


	nomorerecs : "No más registros...",
		scrollPullup: "Arrastrar arriba para cargar más...",
		scrollPulldown : "Arrastrar arriba para refrescar...",
		scrollRefresh : "Soltar para refrescar..."
	},
	search : {
	    caption: "Búsqueda...",
	    Find: "Buscar",
	    Reset: "Limpiar",
	    odata: [{ oper:'eq', text:"igual "},{ oper:'ne', text:"no igual a"},{ oper:'lt', text:"menor que"},{ oper:'le', text:"menor o igual que"},{ oper:'gt', text:"mayor que"},{ oper:'ge', text:"mayor o igual a"},{ oper:'bw', text:"empiece por"},{ oper:'bn', text:"no empiece por"},{ oper:'in', text:"está en"},{ oper:'ni', text:"no está en"},{ oper:'ew', text:"termina por"},{ oper:'en', text:"no termina por"},{ oper:'cn', text:"contiene"},{ oper:'nc', text:"no contiene"},{ oper:'nu', text:'es nulo'},{ oper:'nn', text:'no es nulo'}, {oper:'bt', text:'entre'}],
	    groupOps: [	{ op: "AND", text: "todo" },	{ op: "OR",  text: "cualquier" }	],
		operandTitle : "Clic para seleccionar la operación de búsqueda.",
		resetTitle : "Reiniciar valores de búsqueda",
		addsubgrup : "Agregar subgrupo",
		addrule : "Agregar regla",
		delgroup : "Borrar grupo",
		delrule : "Borrar regla"
	},
	edit : {
	    addCaption: "Agregar registro",
	    editCaption: "Modificar registro",
	    bSubmit: "Guardar",
	    bCancel: "Cancelar",
		bClose: "Cerrar",
		saveData: "Se han modificado los datos, ¿guardar cambios?",
		bYes : "Si",
		bNo : "No",
		bExit : "Cancelar",
	    msg: {
	        required:"Campo obligatorio",
	        number:"Introduzca un número",
	        minValue:"El valor debe ser mayor o igual a ",
	        maxValue:"El valor debe ser menor o igual a ",
	        email: "no es una dirección de correo válida",
	        integer: "Introduzca un valor entero",
		date: "Introduzca una fecha correcta ",
		url: "no es una URL válida. Prefijo requerido ('http://' or 'https://')",
		nodefined : " no está definido.",
		novalue : " valor de retorno es requerido.",
		customarray : "La función personalizada debe devolver un array.",
		customfcheck : "La función personalizada debe estar presente en el caso de validación personalizada."
		}
	},
	view : {
	    caption: "Consultar registro",
	    bClose: "Cerrar"
	},
	del : {
	    caption: "Eliminar",
	    msg: "¿Desea eliminar los registros seleccionados?",
	    bSubmit: "Eliminar",
	    bCancel: "Cancelar"
	},
	nav : {
	    edittext: " ",
	    edittitle: "Modificar fila seleccionada",
	    addtext:" ",
	    addtitle: "Agregar nueva fila",
	    deltext: " ",
	    deltitle: "Eliminar fila seleccionada",
	    searchtext: " ",
	    searchtitle: "Buscar información",
	    refreshtext: "",
	    refreshtitle: "Recargar datos",
	    alertcap: "Aviso",
	    alerttext: "Seleccione un