.reloadCursor()
	if err != nil {
		t.Errorf("reloadCursor error")
		return
	}
	if cursor.BlockHeight != 3 || cursor.TxIndex != 0 || cursor.EventIndex != 0 {
		t.Errorf("doAsyncTasks block cursor error")
	}

	// 模拟中断存储cursor
	cursor = &asyncWorkerCursor{
		BlockHeight: 5,
		TxIndex:     int64(1),
		EventIndex:  int64(0),
	}
	cursorBuf, _ := json.Marshal(cursor)
	_ = aw.finishTable.Put([]byte(testBcName), cursorBuf)
	if err := aw.doAsyncTasks(newTxs(), 5, cursor); err != nil {
		t.Fatal(err)
	}
	if cursor.BlockHeight != 5 || cursor.TxIndex != 1 || cursor.EventIndex != 0 {
		t.Errorf("doAsyncTasks block break cursor error")
	}
}

func TestStartAsyncTask(t *testing.T) {
	aw := newAsyncWorker()
	th, err := NewTestHelper()
	if err != nil {
		t.Errorf("NewTestHelper error")
	}
	defer th.close()
	aw.finishTable = th.db
	aw.log = th.log
	aw.RegisterHandler("$parachain", "CreateBlockChain", handleCreateChain)
	// TODO: deal with error
	_ = aw.Start()
	aw.Stop()
}

type TestHelper struct {
	basedir string
	db      kvdb.Database
	log     logs.Logger
}

func NewTestHelper() (*TestHelper, error) {
	basedir, err := os.MkdirTemp("", "asyncworker-test")
	if err != nil {
		return nil, err
	}

	dir := utils.GetCurFileDir()
	lcfg, err := lconf.LoadLedgerConf(filepath.Join(dir, ledgerPath))
	if err != nil {
		return nil, err
	}
	// 目前仅使用默认设置
	kvParam := &kvdb.KVParameter{
		DBPath:                basedir,
		KVEngineType:          lcfg.KVEngineType,
		MemCacheSize:          ledger.MemCacheSize,
		FileHandlersCacheSize: ledger.FileHandlersCacheSize,
		OtherPaths:            lcfg.OtherPaths,
		StorageType:           lcfg.StorageType,
	}
	baseDB, err := kvdb.CreateKVInstance(kvParam)
	if err != nil {
		return nil, err
	}
	tmpFinishTable := kvdb.NewTable(baseDB, FinishTablePrefix)

	// log实例
	econf, err := mock.NewEnvConfForTest()
	if err != nil {
		return nil, err
	}
	logPath := filepath.Join(basedir, "/log")
	logs.InitLog(econf.GenConfFilePath(econf.LogConf), logPath)
	log, _ := logs.NewLogger("", "asyncworker")

	th := &TestHelper{
		basedir: basedir,
		db:      tmpFinishTable,
		log:     log,
	}
	return th, nil
}

func (th *TestHelper) close() {
	th.db.Close()
	os.RemoveAll(th.basedir)
}
package xtoken

import (
	"encoding/json"
	"fmt"
	"math/big"
	"strings"
	"testing"
)

var (
	contractIns *Contract
	newTokenCtx *FakeKContext
)

func TestNewToken(t *testing.T) {
	if contractIns != nil {
		return
	}
	token := XToken{
		Name:                  "test",
		TotalSupply:           big.NewInt(1000),
		AddSupplyEnabled:      true,
		BurnEnabled:           true,
		Decimal:               8,
		InitialAllocation:     map[string]*big.Int{},
		ConvertibleProportion: big.NewInt(1000),
		GenesisProposal: &GenesisProposal{


//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_REMAINDER_H
#define _LIBCPP___MATH_REMAINDER_H

#include <__config>
#include <__type_traits/enable_if.h>
#include <__type_traits/is_arithmetic.h>
#include <__type_traits/is_same.h>
#include <__type_traits/promote.h>
#include <limits>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#  pragma GCC system_header
#endif

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// remainder

inline _LIBCPP_HIDE_FROM_ABI float remainder(float __x, float __y) _NOEXCEPT { return __builtin_remainderf(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double remainder(double __x, double __y) _NOEXCEPT {
  return __builtin_remainder(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double remainder(long double __x, long double __y) _NOEXCEPT {
  return __builtin_remainderl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type remainder(_A1 __x, _A2 __y) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
  return __math::remainder((__result_type)__x, (__result_type)__y);
}

// remquo

inline _LIBCPP_HIDE_FROM_ABI float remquo(float __x, float __y, int* __z) _NOEXCEPT {
  return __builtin_remquof(__x, __y, __z);
}

template <class = int>
_LIBCPP_HIDE_FROM_ABI double remquo(double __x, double __y, int* __z) _NOEXCEPT {
  return __builtin_remquo(__x, __y, __z);
}

inline _LIBCPP_HIDE_FROM_ABI long double remquo(long double __x, long double __y, int* __z) _NOEXCEPT {
  return __builtin_remquol(__x, __y, __z);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type remquo(_A1 __x, _A2 __y, int* __z) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
  return __math::remquo((__result_type)__x, (__result_type)__y, __z);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_REMAINDER_H


AA510 000A7450  28 00 00 00 */	cmplwi r0, 0
/* 800AA514 000A7454  40 82 00 20 */	bne .L_800AA534
/* 800AA518 000A7458  80 0D 8B 20 */	lwz r0, sBlockSize__13JASAramStream@sda21(r13)
/* 800AA51C 000A745C  3C 60 38 E4 */	lis r3, 0x38E38E39@ha
/* 800AA520 000A7460  38 63 8E 39 */	addi r3, r3, 0x38E38E39@l
/* 800AA524 000A7464  54 00 20 36 */	slwi r0, r0, 4
/* 800AA528 000A7468  7C 03 00 16 */	mulhwu r0, r3, r0
/* 800AA52C 000A746C  54 00 F8 7E */	srwi r0, r0, 1
/* 800AA530 000A7470  48 00 00 0C */	b .L_800AA53C
.L_800AA534:
/* 800AA534 000A7474  80 0D 8B 20 */	lwz r0, sBlockSize__13JASAramStream@sda21(r13)
/* 800AA538 000A7478  54 00 F8 7E */	srwi r0, r0, 1
.L_800AA53C:
/* 800AA53C 000A747C  7C 84 01 D6 */	mullw r4, r4, r0
/* 800AA540 000A7480  38 60 00 00 */	li r3, 0
/* 800AA544 000A7484  38 02 8B 68 */	addi r0, r2, one$870@sda21
/* 800AA548 000A7488  90 98 00 18 */	stw r4, 0x18(r24)
/* 800AA54C 000A748C  80 98 00 18 */	lwz r4, 0x18(r24)
/* 800AA550 000A7490  90 98 00 1C */	stw r4, 0x1c(r24)
/* 800AA554 000A7494  B0 78 00 20 */	sth r3, 0x20(r24)
/* 800AA558 000A7498  B0 78 00 22 */	sth r3, 0x22(r24)
/* 800AA55C 000A749C  90 18 00 24 */	stw r0, 0x24(r24)
/* 800AA560 000A74A0  80 0D 8A 24 */	lwz r0, "sInstance__123JASSingletonHolder<62JASMemPool<10JASChannel,Q217JASThreadingModel14SingleThreaded>,Q217JASCreationPolicy15NewFromRootHeap>"@sda21(r13)
/* 800AA564 000A74A4  28 00 00 00 */	cmplwi r0, 0
/* 800AA568 000A74A8  40 82 00 40 */	bne .L_800AA5A8
/* 800AA56C 000A74AC  48 04 46 CD */	bl OSDisableInterrupts
/* 800AA570 000A74B0  80 0D 8A 24 */	lwz r0, "sInstance__123JASSingletonHolder<62JASMemPool<10JASChannel,Q217JASThreadingModel14SingleThreaded>,Q217JASCreationPolicy15NewFromRootHeap>"@sda21(r13)
/* 800AA574 000A74B4  90 61 00 08 */	stw r3, 8(r1)
/* 800AA578 000A74B8  28 00 00 00 */	cmplwi r0, 0
/* 800AA57C 000A74BC  40 82 00 24 */	bne .L_800AA5A0
/* 800AA580 000A74C0  80 8D 8A B8 */	lwz r4, JASDram@sda21(r13)
/* 800AA584 000A74C4  38 60 00 0C */	li r3, 0xc
/* 800AA588 000A74C8  38 A0


8000 元；
* 通过会员订阅，每月几十到几百名付费听众，每人每月 20–50 元会员费，轻松破万；
* 付费课程或讲座，一次活动课程 50 人参与，每人 200 元，额外收入显著。

随着品牌和影响力提升，收益可实现持续且增长。

#### 06. 延伸发展与升级路径

* 发展多平台分发，覆盖更多听众，提升品牌影响力；
* 与嘉宾合作，互相导流，扩大听众群体；
* 开设线下沙龙或主题活动，增强粉丝粘性并实现增收；
* 制作视频播客，入驻视频平台获得更多变现机会；
* 打造专业团队，形成内容制作和运营的规模效应。

#### 写在最后

录制播客对话节目兼具趣味和成长，适合有沟通热情的人士尝试。入门门槛低、灵活自由，同时可通过多样化变现途径打造稳定收入。只要坚持优质内容制作，积极与听众互动，播客完全有可能成为你实现个人品牌和经济回报的有效载体。通过开一家外贸货运公司赚钱，是利用全球贸易增长和跨境物流需求，提供专业运输和物流解决方案，从而实现盈利的商业模式。以下是详细的赚钱路径介绍。

### 目标客户与市场定位
外贸货运公司主要服务于进出口企业、贸易代理及电商卖家，客户群体包括：
* **中小型出口企业**：需要可靠、经济的货物运输服务；
* **跨境电商卖家**：对时效性和成本敏感，需求多样化的物流方案；
* **贸易公司和采购商**：定期大量货物的集运和分拨；
* **制造商和供应链管理者**：全链条物流管理及跟踪服务。
定位于为客户提供专业、高效、定制化的货运服务，突出可靠性和灵活性，满足多样化国际运输需求。

### 服务设计与运营管理
外贸货运公司核心服务包括海运、空运、陆运及多式联运，重点在于：
* 制定合理的运输路线，降低物流成本与时间；
* 提供清关、报关、仓储及配送等一站式增值服务；


} from 'react';
import Link from 'next/link';

import posts from '../../data/posts';
import PostInfo from '../../components/PostInfo';
import { ASSETS_SUB_PATH } from '../../config';

const SimplePost = ({ post }) => {
  useEffect(() => {
    window.scrollTo(0, 0);
  }, []);

  return (

          <Link href='/'>
            Back to list
          </Link>

        <img src={`/static${ASSETS_SUB_PATH}/images/${post.id}.jpg`} />

          <PostInfo post={post} />

{post.text}

  );
};

SimplePost.getInitialProps = ({ query }) => {
  const post = posts.find(post => post.id === parseInt(query.index));
  return {post};
};

export default SimplePost;
/*
 * Copyright 2019 Google LLC
 *
 * 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
 *
 *     https://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.
 */

// MEMO: tweak
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import VideoJS from 'react-video-wrapper';

import Photos from './Photos';
import './Video.css';
import styles from './styles';
import play from '../../assets/images/play.webp';

const Video = ({ media, gif, autoPlay }) => {
  const externalSaveData = media[0].additional_media_info.saveData;
  const [internalSaveData, setInternalSaveData] = useState(externalSaveData);

  let videoSrc = '';
  media[0].video_info.variants.forEach(variant => {
    if (variant.url.includes('.mp4')) {
      videoSrc = variant.url;
    }
  });

  let VideoPlayer = (
    <video src={videoSrc} controls={!gif} autoPlay={gif || autoPlay} loop={gif} className='video' style={styles.video}>
      Your browser does not support the video element.
    </video>
  );

  if (typeof videojs !== 'undefined') {
    VideoPlayer = (
      <VideoJS src={videoSrc} controls={!gif} autoPlay={gif || autoPlay} loop={gif} className='video' style={styles.video}>
        Your browser does not support the video element.
      </VideoJS>
    );
  }

  const playHandler = () => {
    internalSaveData && setInternalSaveData(false);
  };

  const playButton = (
    <button className='play-button' onClick={playHandler}>

    </button>
  );

  return (
    <>
      { !internalSaveData


"
	"github.com/ethereum/go-ethereum/crypto"
	"github.com/ethereum/go-ethereum/eth"
	"github.com/ethereum/go-ethereum/eth/ethconfig"
	"github.com/ethereum/go-ethereum/eth/filters"
	"github.com/ethereum/go-ethereum/node"
	"github.com/ethereum/go-ethereum/params"

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

func TestBuildSchema(t *testing.T) {
	ddir := t.TempDir()
	// Copy config
	conf := node.DefaultConfig
	conf.DataDir = ddir
	stack, err := node.New(&conf)
	if err != nil {
		t.Fatalf("could not create new node: %v", err)
	}
	defer stack.Close()
	// Make sure the schema can be parsed and matched up to the object model.
	if _, err := newHandler(stack, nil, nil, []string{}, []string{}); err != nil {
		t.Errorf("Could not construct GraphQL handler: %v", err)
	}
}

// Tests that a graphQL request is successfully handled when graphql is enabled on the specified endpoint
func TestGraphQLBlockSerialization(t *testing.T) {
	stack := createNode(t)
	defer stack.Close()
	genesis := &core.Genesis{
		Config:     params.AllEthashProtocolChanges,
		GasLimit:   11500000,
		Difficulty: big.NewInt(1048576),
	}
	newGQLService(t, stack, false, genesis, 10, func(i int, gen *core.BlockGen) {})
	// start node
	if err := stack.Start(); err != nil {
		t.Fatalf("could not start node: %v", err)
	}

	for i, tt := range []struct {
		body string
		want string
		code int
	}{
		{ // Should return latest block
			body: `{"query": "{block{number}}","variables": null}`,
			want: `{"data":{"block":{"number":"0xa"}}}`,
			code: 200,
		},
		{ // Should return info about latest block
			body: `{"query": "{block{number,gasUsed,gasLimit}}","variables": null}`,
			want: `{"data":{"block":{"number":"0xa","gasUsed":"0x0","gasLimit":"0xaf79e0"}}}`,
			code: 200,
		},
		{
			body: `{"query": "{block(number:0){number,gasUsed,gasLimit}}","variables": null}`,
			want: `{"data":{"block":{"number":"0x0","gasUsed":"0x0","gasLimit":"0xaf79e0"}}}`,
			code: 200,
		},
		{
			body: `{"query": "{block(number:-1){number,gasUsed,gasLimit}}","variables": null}`,
			want: `{"data":{"block":null}}`,
			code: 200,
		},
		{
			body: `{"query": "{block(number:-500){number,gasUsed,gasLimit}}","variables": null}`,
			want: `{"data":{"block":null}}`,
			code: 200,
		},
		{
			body: `{"query": "{block(number:\"0\"){number,gasUsed,gasLimit}}","variables": null}`,
			want: `{"data":{"block":{"number":"0x0","gasUsed":"0x0","gasLimit":"0xaf79e0"}}}`,
			code: 200,
		},
		{
			body: `{"query": "{block(number:\"-33\"){number,gasUsed,gasLimit}}","variables": null}`,
			want: `{"data":{"block":null}}`,
			code: 200,
		},
		{
			body: `{"query": "{block(number:\"1337\"){number,gasUsed,gasLimit}}","variables": null}`,
			want: `{"data":{"block":null}}`,
			code: 200,
		},
		{
			body: `{"query": "{block(number:\"0x0\"){number,gasUsed,gasLimit}}","variables": null}`,


 /* 品牌色-5*/
    --ti-base-color-brand-4: #96ADFA; /* 品牌色-4*/
    --ti-base-color-brand-3: #BECCFA; /* 品牌色-3*/
    --ti-base-color-brand-2: #E9EDFA; /* 品牌色-2*/
    --ti-base-color-brand-1: #F2F5FC; /* 品牌色-1*/

    /* 1.2中立色*/
    /* 公用灰色系，用于文本、图标、线条、背景色*/
    --ti-base-color-common-9: #181818; /* 中立色-9*/
    --ti-base-color-common-8: #282B33; /* 中立色-8*/
    --ti-base-color-common-7: #252B3A; /* 中立色-7*/
    --ti-base-color-common-6: #464C59; /* 中立色-6*/
    --ti-base-color-common-5: #575D6C; /* 中立色-5*/
    --ti-base-color-common-4: #5C6173; /* 中立色-4*/
    --ti-base-color-common-3: #8A8E99; /* 中立色-3*/
    --ti-base-color-common-2: #ADB0B8; /* 中立色-2*/
    --ti-base-color-common-1: #DFE1E6; /* 中立色-1*/

    /* 1.3背景色*/
    --ti-base-color-bg-9: #B12220; /* 背景-9*/
    --ti-base-color-bg-8: #C7000B; /* 背景-8*/
    --ti-base-color-bg-7: #D64A52; /* 背景-7*/
    --ti-base-color-bg-6: #EEF0F5; /* 背景-6*/
    --ti-base-color-bg-5: #F5F5F6; /* 背景-5*/
    --ti-base-color-bg-4: #FAFAFA; /* 背景-4*/
    --ti-base-color-bg-3: #FFFFFF; /* 背景-3*/
    --ti-base-color-bg-2: #FFFFFF; /* 背景-2*/
    --ti-base-color-bg-1: #FFFFFF; /* 背景-1*/

    /* 1.4功能色*/
    --ti-base-color-error-4: #DE504E; /* 错误-4*/
    --ti-base-color-error-3: #F66F6A; /* 错误-3*/
    --ti-base-color-error-2: #FFBCBA; /* 错误-2*/
    --ti-base-color-error-1:#FFEEED; /* 错误-1*/

    --ti-base-color-success-4: #3AC295; /* 成功-4*/
    --ti-base-color-success-3: #50D4AB; /* 成功-3*/
    --ti-base-color-success-2:#ACF2DC; /* 成功-2*/
    --ti-base-color-success-1:#EDFFF9; /* 成功-1*/

    --ti-base-color-warn-5: #E37D29; /* 告警-5*/
    --ti-base-color-warn-4: #FA9841; /* 告警-4*/
    --ti-base-color-warn-3:#FAC20A; /* 告警-3*/
    --ti-base-color-warn-2: #FFD0A6; /*  告警-2*/
    --ti-base-color-warn-1:#FFF3E8; /* 告


Type     string            `json:"type" url:"type,key"`
		}{
			Endpoint: d.Get("endpoint").(string),
			Type:     d.Get("exporter_type").(string),
		},
	}

	// Convert headers
	if v, ok := d.GetOk("headers"); ok {
		opts.Exporter.Headers = convertHeaders(v.(map[string]interface{}))
	}

	// Convert signals
	opts.Signals = convertSignals(d.Get("signals").(*schema.Set))

	log.Printf("[DEBUG] Creating telemetry drain: %#v", opts)

	drain, err := client.TelemetryDrainCreate(context.TODO(), opts)
	if err != nil {
		return fmt.Errorf("error creating telemetry drain: %s", err)
	}

	d.SetId(drain.ID)
	log.Printf("[INFO] Created telemetry drain ID: %s", drain.ID)

	return resourceHerokuTelemetryDrainRead(d, meta)
}

func resourceHerokuTelemetryDrainRead(d *schema.ResourceData, meta interface{}) error {
	client := meta.(*Config).Api

	drain, err := client.TelemetryDrainInfo(context.TODO(), d.Id())
	if err != nil {
		return fmt.Errorf("error retrieving telemetry drain: %s", err)
	}

	// Set computed fields
	d.Set("created_at", drain.CreatedAt.String())
	d.Set("updated_at", drain.UpdatedAt.String())

	// Set configuration from API response
	d.Set("owner_id", drain.Owner.ID)
	d.Set("owner_type", drain.Owner.Type)
	d.Set("endpoint", drain.Exporter.Endpoint)
	d.Set("exporter_type", drain.Exporter.Type)
	d.Set("headers", drain.Exporter.Headers)
	d.Set("signals", drain.Signals)

	return nil
}

func resourceHerokuTelemetryDrainUpdate(d *schema.ResourceData, meta interface{}) error {
	client := meta.(*Config).Api

	opts := heroku.TelemetryDrainUpdateOpts{}

	// Build exporter update if any exporter fields changed
	if d.HasChange("endpoint") || d.HasChange("exporter_type") || d.HasChange("headers") {
		exporter := &struct {
			Endpoint string            `json:"endpoint" url:"endpoint,key"`
			Headers  map[string]string `json:"headers,omitempty" url:"headers,omitempty,key"`
			Type     string            `json:"type" url:"type,key"`
		}{
			Endpoint: d.Get("endpoint").(string),
			Type:     d.Get("exporter_type").(string),
		}

		// Convert headers
		if v, ok := d.GetOk("headers"); ok {
			exporter.Headers = convertHeaders(v.(map[string]interface{}))
		}

		opts.Exporter = exporter
	}

	// Update signals if changed
	if d.HasChange("signals") {
		opts.Signals = convertSignalsForUpdate(d.Get("signals").(*schema.Set))
	}

	log.Printf("[DEBUG] Updating telemetry drain: %#v", opts)

	_, err := client.TelemetryDrainUpdate(context.TODO(), d.Id(), opts)
	if err != nil {
		return fmt.Errorf("error updating telemetry drain: %s", err)
	}

	return resourceHerokuTelemetryDrainRead(d, meta)
}

func resourceHerokuTelemetryDrainDelete(d *schema.ResourceData, meta interface{}) error {
	client := meta.(*Config).Api

	log.Printf("[INFO] Deleting telemetry drain: %s", d.Id())

	_, err := client.TelemetryDrainDelete(context.TODO(), d.Id())
	if err != nil {
		return fmt.Errorf("error deleting tel


href="./东方求闻史纪-伊吹萃香.md" title="东方求闻史纪/伊吹萃香">伊吹萃香

个体未得到确认的种族： 龙 • 河童 • 天人 • 仙人 • 八百万之神 • 神灵

死神

小野塚小町

阎魔

四季映姬·夜摩仙那度

外来人

-

英雄传

<a href="./东方求闻


>? toJson() {
    Map<String, dynamic> json = {};
    if (id != null) {
      json['id'] = id;
    }
    if (name != null) {
      json['name'] = name;
    }
    if (code != null) {
      json['code'] = code;
    }
    return json;
  }

  @override
  List<Object?> get props => [id, name, code];

  @override
  bool get stringify => true;
}
import 'package:dart_json_mapper/dart_json_mapper.dart';
import 'package:flutter_bloc_advance/configuration/app_logger.dart';
import 'package:flutter_bloc_advance/data/app_api_exception.dart';

import '../http_utils.dart';
import '../models/user.dart';

/// user repository
///
/// This class is responsible for all the user related operations
/// list, create, update, delete etc.
class UserRepository {
  static final _log = AppLogger.getLogger("UserRepository");
  static const String _resource = "users";
  static const String userIdRequired = "User id is required";

  /// Retrieve user method that retrieves a user by id
  ///
  /// @param id the user id
  Future<User?> retrieve(String id) async {
    _log.debug("BEGIN:getUser repository start - id: {}", [id]);
    if (id.isEmpty) {
      throw BadRequestException(userIdRequired);
    }
    final pathParams = id;
    final httpResponse = await HttpUtils.getRequest("/admin/$_resource", pathParams: pathParams);
    final response = User.fromJsonString(httpResponse.body)!;
    _log.debug("END:getUser successful - response.body: {}", [response.toString()]);
    return response;
  }

  /// Retrieve user method that retrieves a user by username
  ///
  /// @param login the username
  Future<User?> retrieveByLogin(String login) async {
    _log.debug("BEGIN:getUserByLogin repository start - login: {}", [login]);
    if (login.isEmpty) {
      throw BadRequestException("User login is required");
    }
    final pathParams = login;
    final httpResponse = await HttpUtils.getRequest("/admin/$_resource", pathParams: pathParams);
    final response = User.fromJsonString(httpResponse.body)!;
    _log.debug("END:getUserByLogin successful - response.body: {}", [response.toString()]);
    return response;
  }

  /// Create user method that creates a new user
  ///
  /// @param user the user object
  Future<User?> create(User user) async {
    _log.debug("BEGIN:createUser repository start : {}", [user.toString()]);
    if (user.login == null || user.login!.isEmpty) {
      throw BadRequestException("User login is required");
    }
    if (user.email == null || user.email!.isEmpty) {
      throw BadRequestException("User email is required");
    }
    final httpResponse = await HttpUtils.postRequest<User>("/admin/$_resource", user);
    final response = User.fromJsonString(httpResponse.body);
    _log.debug("END:createUser successful");
    return response;
  }

  /// Edit user method that editUser a user
  Future<User?> update(User user) async {
    _log.debug("BEGIN:updateUser repository start : {}", [user.toString()]);
    if (user.id == null || user.id!.isEmpty) {
      throw BadRequestException(userIdRequired);
    }
    final httpResponse = await HttpUtils.putRequest<User>("/admin/$_resource", user);
    final response = User.fromJsonString(httpResponse.body);
    _log.debug("END:updateUser successful");
    return response;
  }

  /// Retrieve all users method that retrieves all the users
  Future<List<User>> list({int page = 0, int size = 10, List<String> sort = const ["id,desc"]}) async {
    _log.d


SRLX_I	srlx	%r23, 0x0001, %r29
	.word 0xff3c4000  ! 2033: STDF_R	std	%f31, [%r0, %r17]
	ta	T_CHANGE_HPRIV
	.word 0x81983ec3  ! 2034: WRHPR_HPSTATE_I	wrhpr	%r0, 0x1ec3, %hpstate
	.word 0xbc358000  ! 2035: ORN_R	orn 	%r22, %r0, %r30
	.word 0xf0256043  ! 2041: STW_I	stw	%r24, [%r21 + 0x0043]
	setx	0x20102, %g1, %o0
	ta	T_SEND_THRD_INTR
	setx	0x3022b, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xfd3da07e  ! 2050: STDF_I	std	%f30, [0x007e, %r22]
	.word 0x8194610a  ! 2052: WRPR_TPC_I	wrpr	%r17, 0x010a, %tpc
	.word 0xb2c5a18a  ! 2053: ADDCcc_I	addccc 	%r22, 0x018a, %r25
	setx	data_start_7, %g1, %r16
	.word 0xfc35c000  ! 2056: STH_R	sth	%r30, [%r23 + %r0]
	mov	2, %r12
	.word 0x8f932000  ! 2057: WRPR_TL_I	wrpr	%r12, 0x0000, %tl
	.word 0xbd500000  ! 2058: RDPR_TPC	rdpr	%tpc, %r30
	ta	T_CHANGE_HPRIV
	mov	0, %g1
	stxa	%g0, [%g1] 0x60
	flush
	ta	T_CHANGE_NONHPRIV
	.word 0xfc2420ad  ! 2063: STW_I	stw	%r30, [%r16 + 0x00ad]
	.word 0xbf355000  ! 2064: SRLX_R	srlx	%r21, %r0, %r31
	.word 0xb9480000  ! 2066: RDHPR_HPSTATE	rdhpr	%hpstate, %r28
	.word 0xfd3c216b  ! 2069: STDF_I	std	%f30, [0x016b, %r16]
	.word 0xbd3cb001  ! 2070: SRAX_I	srax	%r18, 0x0001, %r30
	setx	0x20101, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0x8d94a1a5  ! 2073: WRPR_PSTATE_I	wrpr	%r18, 0x01a5, %pstate
	.word 0xf824a1dd  ! 2075: STW_I	stw	%r28, [%r18 + 0x01dd]
	.word 0xbf50c000  ! 2077: RDPR_TT	rdpr	%tt, %r31
	.word 0xf424c000  ! 2078: STW_R	stw	%r26, [%r19 + %r0]
	.word 0xb1480000  ! 2081: RDHPR_HPSTATE	rdhpr	%hpstate, %r24
	.word 0xff3c8000  ! 2084: STDF_R	std	%f31, [%r0, %r18]
	setx	0x10221, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xf2748000  ! 2089: STX_R


am.
        /// </summary>
        ulong PacketByteOffset { get; }

        /// <summary>
        /// Determines if the <see cref="Start"/> and <see cref="End"/> Timestamp properties are valid.
        /// </summary>
        bool PacketTimestampsAreValid { get; }

        /// <summary>
        /// The start timestamp for the packet.
        /// </summary>
        CtfTimestamp Start { get; }

        /// <summary>
        /// The end timestamp for the packet.
        /// </summary>
        CtfTimestamp End { get; }

        /// <summary>
        /// The event within the packet currently read.
        /// </summary>
        ICtfEvent CurrentEvent { get; }

        /// <summary>
        /// The stream id associated with the packet.
        /// </summary>
        uint StreamId { get; }

        /// <summary>
        /// The trace.packet.header value in the packet.
        /// </summary>
        CtfStructValue TracePacketHeader { get; }

        /// <summary>
        /// The stream.packet.context value in the packet.
        /// </summary>
        CtfStructValue StreamPacketContext { get; }

        /// <summary>
        /// Reads metadata at the beginning of the packet.
        /// </summary>
        /// <returns>True if success</returns>
        bool ReadPacketMetadata();

        /// <summary>
        /// Reads in the next event
        /// </summary>
        /// <returns>True if success</returns>
        bool MoveToNextEvent();
    }
}


N1Integer(s))
                close()
                toByteArray()
            }
        }
    }

    override fun publicKey(): PubKey {
        val privKey = if (priv.bitLength() > CURVE.n.bitLength()) priv.mod(CURVE.n) else priv
        val publicPoint = FixedPointCombMultiplier().multiply(CURVE.g, privKey)
        return Secp256k1PublicKey(ECPublicKeyParameters(publicPoint, CURVE))
    }

    override fun hashCode(): Int = priv.hashCode()
}

/**
 * @param pub the public key backing this instance.
 */
class Secp256k1PublicKey(private val pub: ECPublicKeyParameters) : PubKey(Crypto.KeyType.Secp256k1) {

    override fun raw(): ByteArray = pub.q.getEncoded(true)

    override fun verify(data: ByteArray, signature: ByteArray): Boolean {
        val signer = ECDSASigner().also {
            it.init(false, pub)
        }

        val asn1: ASN1Primitive =
            ByteArrayInputStream(signature)
                .use { inStream ->
                    ASN1InputStream(inStream)
                        .use { asnInputStream ->
                            asnInputStream.readObject()
                        }
                }

        val asn1Encodables = (asn1 as ASN1Sequence).toArray().also {
            if (it.size != 2) {
                throw Libp2pException("Invalid signature: expected 2 values for 'r' and 's' but got ${it.size}")
            }
        }

        val r = (asn1Encodables[0].toASN1Primitive() as ASN1Integer).value
        val s = (asn1Encodables[1].toASN1Primitive() as ASN1Integer).value
        return signer.verifySignature(data, r.abs(), s.abs())
    }

    override fun hashCode(): Int = pub.hashCode()
}

/**
 * Generates a new SECP256K1 private and public key.
 * @return a pair of the private and public keys.
 */
fun generateSecp256k1KeyPair(): Pair<PrivKey, PubKey> = with(ECKeyPairGenerator()) {
    val domain = SECNamedCurves.getByName(SECP_256K1_ALGORITHM).let {
        ECDomainParameters(it.curve, it.g, it.n, it.h)
    }
    init(ECKeyGenerationParameters(domain, SecureRandom()))
    val keypair = generateKeyPair()

    val privateKey = keypair.private as ECPrivateKeyParameters
    return Pair(Secp256k1PrivateKey(privateKey), Secp256k1PublicKey(keypair.public as ECPublicKeyParameters))
}

/**
 * Unmarshals the given key bytes into a SECP256K1 private key instance.
 * @param keyBytes the key bytes.
 * @return a private key instance.
 */
fun unmarshalSecp256k1PrivateKey(data: ByteArray): PrivKey =
    Secp256k1PrivateKey(ECPrivateKeyParameters(BigInteger(1, data), CURVE))

/**
 * Unmarshals the given key bytes into a SECP256K1 public key instance.
 * @param keyBytes the key bytes.
 * @return a public key instance.
 */
fun unmarshalSecp256k1PublicKey(data: ByteArray): PubKey =
    Secp256k1PublicKey(ECPublicKeyParameters(CURVE.curve.decodePoint(data), CURVE))
/*
 * Copyright 2019 BLK Technologies Limited (web3labs.com).
 *
 * 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 un


tion-oci-get-account", response, response.Code())
	}
}

// NewCloudSecurityRegistrationOciGetAccountOK creates a CloudSecurityRegistrationOciGetAccountOK with default headers values
func NewCloudSecurityRegistrationOciGetAccountOK() *CloudSecurityRegistrationOciGetAccountOK {
	return &CloudSecurityRegistrationOciGetAccountOK{}
}

/*
CloudSecurityRegistrationOciGetAccountOK describes a response with status code 200, with default header values.

OK
*/
type CloudSecurityRegistrationOciGetAccountOK struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	Payload *models.DomainOCITenancyResponseExtV1
}

// IsSuccess returns true when this cloud security registration oci get account o k response has a 2xx status code
func (o *CloudSecurityRegistrationOciGetAccountOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this cloud security registration oci get account o k response has a 3xx status code
func (o *CloudSecurityRegistrationOciGetAccountOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this cloud security registration oci get account o k response has a 4xx status code
func (o *CloudSecurityRegistrationOciGetAccountOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this cloud security registration oci get account o k response has a 5xx status code
func (o *CloudSecurityRegistrationOciGetAccountOK) IsServerError() bool {
	return false
}

// IsCode returns true when this cloud security registration oci get account o k response a status code equal to that given
func (o *CloudSecurityRegistrationOciGetAccountOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the cloud security registration oci get account o k response
func (o *CloudSecurityRegistrationOciGetAccountOK) Code() int {
	return 200
}

func (o *CloudSecurityRegistrationOciGetAccountOK) Error() string {
	return fmt.Sprintf("[GET /cloud-security-registration-oci/combined/accounts/v1][%d] cloudSecurityRegistrationOciGetAccountOK  %+v", 200, o.Payload)
}

func (o *CloudSecurityRegistrationOciGetAccountOK) String() string {
	return fmt.Sprintf("[GET /cloud-security-registration-oci/combined/accounts/v1][%d] cloudSecurityRegistrationOciGetAccountOK  %+v", 200, o.Payload)
}

func (o *CloudSecurityRegistrationOciGetAccountOK) GetPayload() *models.DomainOCITenancyResponseExtV1 {
	return o.Payload
}

func (o *CloudSecurityRegistrationOciGetAccountOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	// hydrates response header X-CS-TRACEID
	hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID")

	if hdrXCSTRACEID != "" {
		o.XCSTRACEID = hdrXCSTRACEID
	}

	// hydrates response header X-RateLimit-Limit
	hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit")

	if hdrXRateLimitLimit != "" {
		valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit)
		if err != nil {
			return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit)
		}
		o.XRateLimitLimit = valxRateLimitLimit
	}

	// hydrates response header X-RateLimit-Remaining
	hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining")

	if hdrXRateLimitRemaining != "" {
		valxRateLimit


.color(Pal.shadow, Pal.shadow.a * unit.shadowAlpha)
            val rot = unit.rotation - 90
            val trnsx1 = Angles.trnsx(rot, value.x, value.y)
            val trnsy1 = Angles.trnsy(rot, value.x, value.y)
            val trnsx2 = Angles.trnsx(rot, -value.x, value.y)
            val trnsy2 = Angles.trnsy(rot, -value.x, value.y)
            val speed = Time.time * value.speed * 6
            val ux = unit.x + trnsx1
            val uy = unit.y + trnsy1
            val nx = unit.x + trnsx2
            val ny = unit.y + trnsy2
            Draw.rect("$name-propeller", ux + shadowTX * e, uy + shadowTY * e, speed)
            if (true) Draw.rect("$name-propeller", nx + shadowTX * e, ny + shadowTY * e, -speed)
            Draw.rect(name, unit.x + shadowTX * e, unit.y + shadowTY * e, unit.rotation - 90)
            Draw.color()
        }
    }.apply {
        constructor = Prov(UnitEntity::create)
        flying = true
        speed = 2f
        hitSize = 40f
        abilities.add(value)
    }

}
/*
bullet = object : LightningLinkerBulletType(2.5f, 250f) {
    init {
        rangeOverride = 480f
        trailWidth = 8f
        trailLength = 40
        lightningColor = lightSkyBack
        lightColor = lightningColor
        trailColor = lightColor
        backColor = trailColor
        frontColor = Color.white
        randomGenerateRange = 280f
        randomLightningNum = 5
        linkRange = 280f
        scaleLife = true
        hitModifier
        size /= 1.5f
        drag = 0.0065f
        fragLifeMin = 0.125f
        fragLifeMax = 0.45f
        fragVelocityMax = 0.75f
        fragVelocityMin = 0.25f
        fragBullets = 13
        fragBullet = BulletType()
        hitSound = Sounds.explosionbig
        drawSize = 40f
        splashDamageRadius = 240f
        splashDamage = 80f
        lifetime = 300f
        despawnEffect = Fx.none
        hitEffect = Effect(50f) { e: EffectContainer ->
            Draw.color(lightSkyBack)
            Fill.circle(e.x, e.y, e.fout() * 44)
            Lines.stroke(e.fout() * 3.2f)
            Lines.circle(e.x, e.y, e.fin() * 80)
            Lines.stroke(e.fout() * 2.5f)
            Lines.circle(e.x, e.y, e.fin() * 50)
            Angles.randLenVectors(e.id.toLong(), 30, 18 + 80 * e.fin()) { x: Float, y: Float ->
                Lines.stroke(e.fout() * 3.2f)
                Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 14 + 5)
            }
            Draw.color(Color.white)
            Fill.circle(e.x, e.y, e.fout() * 30)
        }
        shootEffect = Effect(30f) { e: EffectContainer ->
            Draw.color(lightSkyBack)
            Fill.circle(e.x, e.y, e.fout() * 32)
            Draw.color(Color.white)
            Fill.circle(e.x, e.y, e.fout() * 20)
        }
        smokeEffect = Effect(40f, 100f) { e: EffectContainer ->
            Draw.color(lightSkyBack)
            Lines.stroke(e.fout() * 3.7f)
            Lines.circle(e.x, e.y, e.fin() * 100 + 15)
            Lines.stroke(e.fout() * 2.5f)
            Lines.circle(e.x, e.y, e.fin() * 60 + 15)
            Angles.randLenVectors(e.id.toLong(), 1


接=jiē',
  '掦=tì',
  '控=kòng',
  '推=tuī',
  '掩=yǎn',
  '措=cuò',
  '掫=zōu,zhōu,chōu',
  '掬=jū',
  '掭=tiàn',
  '掮=qián',
  '掯=kèn',
  '掰=bāi',
  '掱=pá',
  '掲=jiē',
  '掳=lǔ',
  '掴=guó',
  '掵=mìng',
  '掶=jié',
  '掷=zhì',
  '掸=dǎn,shàn',
  '掹=mēng',
  '掺=chān,xiān,càn,shǎn',
  '掻=sāo',
  '掼=guàn',
  '掽=pèng',
  '掾=yuàn',
  '掿=nuò',
  '揀=jiǎn',
  '揁=zhēng,kēng',
  '揂=jiū,yóu',
  '揃=jiǎn,jiān',
  '揄=yú',
  '揅=yán',
  '揆=kuí',
  '揇=nǎn',
  '揈=hōng',
  '揉=róu',
  '揊=pì,chè',
  '揋=wēi',
  '揌=sāi',
  '揍=zòu',
  '揎=xuān',
  '描=miáo',
  '提=tí,dī,dǐ',
  '揑=niē',
  '插=chā',
  '揓=shì',
  '揔=zǒng,sōng',
  '揕=zhèn,zhēn',
  '揖=yī',
  '揗=xún',
  '揘=huáng,yóng',
  '揙=biǎn',
  '揚=yáng',
  '換=huàn',
  '揜=yǎn',
  '揝=zǎn,zuàn',
  '揞=ǎn',
  '揟=xū,jū',
  '揠=yà',
  '握=wò',
  '揢=ké,qiā',
  '揣=chuài,chuǎi,chuāi,tuán,zhuī',
  '揤=jí',
  '揥=tì,dì',
  '揦=là,lá',
  '揧=là',
  '揨=chéng',
  '揩=kāi',
  '揪=jiū',
  '揫=jiū',
  '揬=tú',
  '揭=jiē,qì',
  '揮=huī',
  '揯=gèn',
  '揰=chòng,dǒng',
  '揱=xiāo',
  '揲=shé,dié,yè',
  '揳=xiē',
  '援=yuán',
  '揵=qián,jiàn,jiǎn',
  '揶=yé',
  '揷=chā',
  '揸=zhā',
  '揹=bēi',
  '揺=yáo',
  '揻=wēi',
  '揼=bèng',
  '揽=lǎn',
  '揾=wèn',
  '揿=qìn',
  '搀=chān',


uuid) for gpu, uuid in zip(self.gpus, self.uuids)
        ]

    def getGPUs(self):
        return self.gpu_list

class GPUTest(unittest.TestCase):
    def setUp(self):
        sys.modules["GPUtil"] = GPUUtilMock([0, 1], ["GPU-aaa", "GPU-bbb"])

    def testGPUWait1(self):
        wait_for_gpu(0, delay_s=0)

    def testGPUWait2(self):
        wait_for_gpu("1", delay_s=0)

    def testGPUWait3(self):
        wait_for_gpu("GPU-aaa", delay_s=0)

    def testGPUWaitFail(self):
        with self.assertRaises(ValueError):
            wait_for_gpu(2, delay_s=0)

        with self.assertRaises(ValueError):
            wait_for_gpu("4", delay_s=0)

        with self.assertRaises(ValueError):
            wait_for_gpu(1.23, delay_s=0)

    @patch("ray.get_gpu_ids", lambda: ["0"])
    def testDefaultGPU(self):
        import sys

        sys.modules["GPUtil"] = GPUUtilMock([0], ["GPU-aaa"])
        wait_for_gpu(delay_s=0)

if __name__ == "__main__":
    sys.exit(pytest.main(["-v", __file__]))


", NULL, "HPROUT"},

	{"DMic Rate 64", NULL, "Mic Bias 2V"},
	{"Mic Bias 2V", NULL, "DMic"},
};

static const char *spk_function[] = {"Off", "On"};
static const char *input_function[] = {"ADC", "Digital Mic"};

static const struct soc_enum rx51_enum[] = {
	SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(spk_function), spk_function),
	SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(input_function), input_function),
};

static const struct snd_kcontrol_new aic34_rx51_controls[] = {
	SOC_ENUM_EXT("Speaker Function", rx51_enum[0],
		     rx51_get_spk, rx51_set_spk),
	SOC_ENUM_EXT("Input Select",  rx51_enum[1],
		     rx51_get_input, rx51_set_input),
};

static int rx51_aic34_init(struct snd_soc_codec *codec)
{
	int err;

	/* Set up NC codec pins */
	snd_soc_dapm_nc_pin(codec, "MIC3L");
	snd_soc_dapm_nc_pin(codec, "MIC3R");
	snd_soc_dapm_nc_pin(codec, "LINE1R");

	/* Add RX-51 specific controls */
	err = snd_soc_add_controls(codec, aic34_rx51_controls,
				   ARRAY_SIZE(aic34_rx51_controls));
	if (err < 0)
		return err;

	/* Add RX-51 specific widgets */
	snd_soc_dapm_new_controls(codec, aic34_dapm_widgets,
				  ARRAY_SIZE(aic34_dapm_widgets));

	/* Set up RX-51 specific audio path audio_map */
	snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

	snd_soc_dapm_sync(codec);

	return 0;
}

/* Digital audio interface glue - connects codec <--> CPU */
static struct snd_soc_dai_link rx51_dai[] = {
	{
		.name = "TLV320AIC34",
		.stream_name = "AIC34",
		.cpu_dai = &omap_mcbsp_dai[0],
		.codec_dai = &aic3x_dai,
		.init = rx51_aic34_init,
		.ops = &rx51_ops,
	},
};

/* Audio private data */
static struct aic3x_setup_data rx51_aic34_setup = {
	.gpio_func[0] = AIC3X_GPIO1_FUNC_DISABLED,
	.gpio_func[1] = AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT,
};

/* Audio card */
static struct snd_soc_card rx51_sound_card = {
	.name = "RX-51",
	.dai_link = rx51_dai,
	.num_links = ARRAY_SIZE(rx51_dai),
	.platform = &omap_soc_platform,
};

/* Audio subsystem */
static struct snd_soc_device rx51_snd_devdata = {
	.card = &rx51_sound_card,
	.codec_dev = &soc_codec_dev_aic3x,
	.codec_data = &rx51_aic34_setup,
};

static struct platform_device *rx51_snd_device;

static int __init rx51_soc_init(void)
{
	int err;

	if (!machine_is_nokia_rx51())
		return -ENODEV;

	rx51_snd_device = platform_device_alloc("soc-audio", -1);
	if (!rx51_snd_device) {
		err = -ENOMEM;
		goto err1;
	}

	platform_set_drvdata(rx51_snd_device, &rx51_snd_devdata);
	rx51_snd_devdata.dev = &rx51_snd_device->dev;
	*(unsigned int *)rx51_dai[0].cpu_dai->private_data = 1; /* McBSP2 */

	err = platform_device_add(rx51_snd_device);
	if (err)
		goto err2;

	return 0;
err2:
	platform_device_put(rx51_snd_device);
err1:

	return err;
}

static void __exit rx51_soc_exit(void)
{
	platform_device_unregister(rx51_snd_device);
}

module_init(rx51_soc_init);
module_exit(rx51_soc_exit);

MODULE_AUTHOR("Nokia Corporation");
MODULE_DESCRIPTION("ALSA SoC Nokia RX-51");
MODULE_LICENSE("GPL");


"返回按钮时");

      // 等待截图完成
      await Future.delayed(const Duration(milliseconds: 200));

      // 退出视频播放时触发自动云同步
      if (_currentVideoPath != null) {
        try {
          await AutoSyncService.instance.syncOnPlaybackEnd();
          debugPrint('退出视频播放时云同步成功');
        } catch (e) {
          debugPrint('退出视频播放时云同步失败: $e');
        }
      }

      return true; // 允许返回
    }
  }

  // 条件性截图方法
  Future<void> _captureConditionalScreenshot(String triggerEvent) async {
    if (_currentVideoPath == null || !hasVideo || _isCapturingFrame) return;

    _isCapturingFrame = true;
    try {
      final newThumbnailPath = await _captureVideoFrameWithoutPausing();
      if (newThumbnailPath != null) {
        _currentThumbnailPath = newThumbnailPath;
        debugPrint('条件截图完成($triggerEvent): $_currentThumbnailPath');

        // 更新观看记录中的缩略图
        await _updateWatchHistoryWithNewThumbnail(newThumbnailPath);

        // 截图后检查解码器状态
        await _decoderManager.checkDecoderAfterScreenshot();
      }
    } catch (e) {
      debugPrint('条件截图失败($triggerEvent): $e');
    } finally {
      _isCapturingFrame = false;
    }
  }

  // 处理流媒体URL的加载错误
  Future<void> _handleStreamUrlLoadingError(String videoPath, Exception e) async {
    debugPrint('流媒体URL加载失败: $videoPath, 错误: $e');

    // 检查是否为流媒体 URL
    if (videoPath.contains('jellyfin') || videoPath.contains('/Videos/')) {
      _setStatus(PlayerStatus.error, message: 'Jellyfin流媒体加载失败，请检查网络连接');
      _error = '无法连接到Jellyfin服务器，请确保网络连接正常';
    } else if (videoPath.contains('emby') || videoPath.contains('/emby/Videos/')) {
      _setStatus(PlayerStatus.error, message: 'Emby流媒体加载失败，请检查网络连接');
      _error = '无法连接到Emby服务器，请确保网络连接正常';
    } else {
      _setStatus(PlayerStatus.error, message: '流媒体加载失败，请检查网络连接');
      _error = '无法加载流媒体，请检查URL和网络连接';
    }

    // 通知监听器
    notifyListeners();
  }

  /// 加载Jellyfin外挂字幕
  Future<void> _loadJellyfinExternalSubtitles(String videoPath) async {
    try {
      // 从jellyfin://协议URL中提取itemId
      final itemId = videoPath.replaceFirst('jellyfin://', '');
      debugPrint('[Jellyfin字幕] 开始加载外挂字幕，itemId: $itemId');

      // 获取字幕轨道信息
      final subtitleTracks = await JellyfinService.instance.getSubtitleTracks(itemId);

      if (subtitleTracks.isEmpty) {
        debugPrint('[Jellyfin字幕] 未找到字幕轨道');


holder: AudioViewHolder, position: Int) {
        val url = mData[position].infor
        val playing = AudioPlayer.INSTANCE.isPlaying(url)
        holder.itemView.setOnClickListener {
            if (playing) {
                mContext.showToast("正在播放该音频", ToastType.TYPE_ERROR)
            } else {
                val intent = Intent(mContext, AudioPlayService::class.java).apply {
                    putExtra("url", url)
                }
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                    mContext.startForegroundService(intent)
                } else {
                    mContext.startService(intent)
                }
                mContext.showToast("后台播放中", ToastType.TYPE_NORMAL)
            }
        }
    }

    private fun setImage(holder: ImageViewHolder, position: Int) {
        holder.nineImageLayout.setNineGridAdapter(NineImageAdapter(mData[position].images))
    }

    private fun setText(holder: TextViewHolder, position: Int) {
        var textData = mData[position].infor

        val modifyMatcher = Pattern.compile("本帖最后由(.*?)于(.*?)编辑").matcher(textData)
        if (modifyMatcher.find()) {
            textData = textData.replace(modifyMatcher.group(), "")
            holder.modifyCard.visibility = View.VISIBLE
            holder.modifyText.text = modifyMatcher.group()
        } else {
            holder.modifyCard.visibility = View.GONE
        }

        if (textData.startsWith(" ")) {
            do {
                textData = textData.replaceFirst(" ", "")
            } while (textData.startsWith(" "))
        }

        if (textData.startsWith("\r\n")) {
            do {
                textData = textData.replaceFirst("\r\n", "")
            } while (textData.startsWith("\r\n"))
        }

        textData = textData.replace("\r\n", "<br>")

        holder.text.setText(textData)
        holder.text.setOnCreateContextMenuListener { menu, v, menuInfo ->
            menu.add("复制全文").setOnMenuItemClickListener {
                ClipBoardUtil.copyToClipBoard(mContext, mWholeText.toString())
                true
            }
            menu.add("自由复制").setOnMenuItemClickListener {
                CopyContentFragment
                    .getInstance(Bundle().apply {
                        putString(Constant.IntentKey.CONTENT, mWholeText.toString())
                    })
                    .show((mContext as FragmentActivity).supportFragmentManager, TimeUtil.getStringMs())
                true
            }
        }
    }

    private fun setAttachment(holder: AttachmentViewHolder, position: Int) {
        holder.name.text = mData[position].infor
        holder.desc.text = mData[position].desc
        holder.itemView.setOnClickListener {
            if (FileUtil.isVideo(mData[position].infor)) {
                VideoPreViewManager
                    .INSTANCE
                    .with(mContext)
                    .setUrl(mData[position].url)
                    .setName(mData[position].infor)
                    .setCookies(RetrofitCookieUtil.getCookies())
                    .start()
            } else {
                DownloadManager
                    .with(mContext)
                    .setName(mData[position].infor)
                    .setUrl(mData[position].url)
                    .setCookies(RetrofitCookieUtil.getCookies())
                    .start()
            }
        }

        if (FileUtil.isVideo(mData[position].infor)) {
            holder.icon.setImageResource(R.drawable.ic_video)
            holder.desc.text = "点击观看[${mData[position].desc}]"
        }
        if (FileUtil.isAudio(mData[position].infor)) holder.icon.setImageResource(


I15
	movt	r1, #1				@ Target is CPU0
	str	r1, [r0, #GICD_SGIR]
	dsb

1:	wfi
	b	1b

.globl	psci_arch_init
psci_arch_init:
	mov	r6, lr

	movw	r4, #(GICD_BASE & 0xffff)
	movt	r4, #(GICD_BASE >> 16)

	ldr	r5, [r4, #GICD_IGROUPRn]
	bic	r5, r5, #(1 << 15) 	@ SGI15 as Group-0
	str	r5, [r4, #GICD_IGROUPRn]

	mov	r5, #0			@ Set SGI15 priority to 0
	strb	r5, [r4, #(GICD_IPRIORITYRn + 15)]

	add	r4, r4, #0x1000		@ GICC address

	mov	r5, #0xff
	str	r5, [r4, #GICC_PMR]	@ Be cool with non-secure

	ldr	r5, [r4, #GICC_CTLR]
	orr	r5, r5, #(1 << 3)	@ Switch FIQEn on
	str	r5, [r4, #GICC_CTLR]

	mrc	p15, 0, r5, c1, c1, 0	@ Read SCR
	orr	r5, r5, #4		@ Enable FIQ in monitor mode
	bic	r5, r5, #1		@ Secure mode
	mcr	p15, 0, r5, c1, c1, 0	@ Write SCR
	isb

	bl	psci_get_cpu_id		@ CPU ID => r0
	bl	psci_get_cpu_stack_top	@ stack top => r0
	mov	sp, r0

	bx	r6

	.globl psci_text_end
psci_text_end:
	.popsection


nal_hlo, &lhs, &rhs, create_sharded_dot, b, module, visitor);
    }
    if (e_config) {
      int64_t loop_partitions = 1;
      if (e_config->windowing_dims.empty()) {
        loop_partitions = num_partitions;
      } else {
        CHECK_EQ(e_config->windowed_op, WindowedEinsumOperand::LHS);
        for (int64_t dim : e_config->windowing_dims) {
          loop_partitions *= lhs_sharding.tile_assignment().dim(dim);
        }
      }

      return EmitWindowedDotGeneral(
          lhs, rhs, output_base_shape, output_sharding, dims_mapping,
          num_partitions, loop_partitions, create_sharded_dot, conv_window,
          module, original_hlo, options, b, windowed_dot_general_loops,
          *e_config, indices_map, lhs_sharding_transposed_to_match_output,
          rhs_sharding_transposed_to_match_output,
          rhs_sharding_transposed_to_match_lhs,
          lhs_sharding_transposed_to_match_rhs,
          output_sharding_transposed_to_match_rhs,
          output_sharding_transposed_to_match_lhs);
    }
  }

  {
    // Try batch-parallel by resharding one operand, and allowing all-reduce.
    TF_ASSIGN_OR_RETURN(
        HloInstruction * partitioned_dot,
        try_emit_output_batch_partitioned_einsum_with_reshard(true));
    if (partitioned_dot) {
      return partitioned_dot;
    }
  }

  // LHS and RHS have the same partitioned contracting dimensions.
  if (lhs_contracting_partitions == rhs_contracting_partitions &&
      lhs_contracting_partitions == num_partitions) {
    if (!may_reshard_if_mismatch && !output_sharding.IsReplicated() &&
        output_sharding.NumTiles() != num_partitions) {
      // The output is not fully sliced; the recursive handling has better
      // pattern matching for reduce scatters in subgroups.
      return nullptr;
    }
    // Pad both sides with zero, since NaN at one side cannot be masked by zero
    // on the other side.
    if (ShapeSizeInBytes(lhs.base_shape()) <
        ShapeSizeInBytes(rhs.base_shape())) {
      lhs = lhs.Reshard(*rhs_sharding_transposed_to_match_lhs);
    } else {
      rhs = rhs.Reshard(*lhs_sharding_transposed_to_match_rhs);
    }

    lhs = lhs.PadWithZero();
    rhs = rhs.PadWithZero();
    TF_ASSIGN_OR_RETURN(auto dot, create_sharded_dot(lhs, rhs, b, conv_window));
    std::vector<int64_t> lhs_contracting_dims;
    lhs_contracting_dims.reserve(dims_mapping.contracting_dims.size());
    for (const auto& cd : dims_mapping.contracting_dims) {
      lhs_contracting_dims.push_back(cd.lhs);
    }
    auto ar = lhs.state().partitioner->AllReduceAlongShardingDims(
        b, dot, lhs.sharding(), lhs.state().next_channel_id,
        lhs_contracting_dims, lhs.state().collective_ops_creator,
        MakeBinaryAdd(output_base_shape.element_type(), module));
    ar->set_sharding(HloSharding::Replicate());
    return PartitionedHlo(ar, output_base_shape, lhs.state())
        .Reshard(output_sharding)
        .hlo();
  }

  // LHS and output have the same partitioned


ll
        // components in the plane is the same, which is probably safe
        let h = format_info.scale_height(plane as u8, self.height());

        unsafe {
            Ok(slice::from_raw_parts(
                self.frame.data[plane as usize] as *const u8,
                (w * h) as usize,
            ))
        }
    }

    pub unsafe fn from_glib_full(frame: gst_video_sys::GstVideoFrame) -> Self {
        let info = ::VideoInfo(ptr::read(&frame.info));
        let buffer = gst::Buffer::from_glib_none(frame.buffer);
        VideoFrame {
            frame,
            buffer: Some(buffer),
            info,
            phantom: PhantomData,
        }
    }

    pub fn as_video_frame_ref(&self) -> VideoFrameRef<&gst::BufferRef> {
        let frame = unsafe { ptr::read(&self.frame) };
        let info = self.info.clone();
        VideoFrameRef {
            frame,
            buffer: Some(self.buffer()),
            info,
            borrowed: true,
        }
    }

    pub fn as_ptr(&self) -> *const gst_video_sys::GstVideoFrame {
        &self.frame
    }
}

impl<T> Drop for VideoFrame<T> {
    fn drop(&mut self) {
        unsafe {
            gst_video_sys::gst_video_frame_unmap(&mut self.frame);
        }
    }
}

impl VideoFrame<Readable> {
    pub fn from_buffer_readable(
        buffer: gst::Buffer,
        info: &::VideoInfo,
    ) -> Result<VideoFrame<Readable>, gst::Buffer> {
        skip_assert_initialized!();

        unsafe {
            let mut frame = mem::MaybeUninit::zeroed();
            let res: bool = from_glib(gst_video_sys::gst_video_frame_map(
                frame.as_mut_ptr(),
                info.to_glib_none().0 as *mut _,
                buffer.to_glib_none().0,
                gst_video_sys::GST_VIDEO_FRAME_MAP_FLAG_NO_REF | gst_sys::GST_MAP_READ,
            ));

            if !res {
                Err(buffer)
            } else {
                let frame = frame.assume_init();
                let info = ::VideoInfo(ptr::read(&frame.info));
                Ok(VideoFrame {
                    frame,
                    buffer: Some(buffer),
                    info,
                    phantom: PhantomData,
                })
            }
        }
    }

    pub fn from_buffer_id_readable(
        buffer: gst::Buffer,
        id: i32,
        info: &::VideoInfo,
    ) -> Result<VideoFrame<Readable>, gst::Buffer> {
        skip_assert_initialized!();

        unsafe {
            let mut frame = mem::MaybeUninit::zeroed();
            let res: bool = from_glib(gst_video_sys::gst_video_frame_map_id(
                frame.as_mut_ptr(),
                info.to_glib_none().0 as *mut _,
                buffer.to_glib_none().0,
                id,
                gst_video_sys::GST_VIDEO_FRAME_MAP_FLAG_NO_REF | gst_sys::GST_MAP_READ,
            ));

            if !res {
                Err(buffer)
            } else {
                let frame = frame.assume_init();
                let info = ::VideoInfo(ptr::read(&frame.info));
                Ok(VideoFrame {
                    frame,
                    buffer: Some(buffer),
                    info,
                    phantom: PhantomData,
                })
            }
        }
    }
}

impl VideoFrame<Writable> {
    pub fn from_buffer_writable(
        buffer:


and information theoretical divergences, etc.

It is highly optimized by taking full advantage of vectorized computation.
For some distances that are difficult to be fully vectorized, like city-block distance,
C-mex implementation is offered.

It is easy to use with simple syntax.

It is sufficiently documented. You can type in "help slmetric_pw" to see the help on its usage.
Examples are available to show how to invoke the function.

Installation

Please make sure that your MATLAB version is 2007a(7.4.0) or above.
The function cannot be used in lower versions.

Extract the zipped package and add the path to MATLAB paths.

The pre-compiled mex files (for win32) have been included in the package.
If necessary, you can re-compile them in your environment by running slmetric_pw_compile.

Now it can be used. If you wish, you can first try the examples in the help.

Background

slmetric_pw.h is an important function in the core module of sltoolbox,
which is a large set of functions for accomplishing many statistical learning tasks.

I am now developing the second version of sltoolbox.
Considering that some of the core functions can be applied to a much wider domain in technical computing,
and that a long time is needed to make a new version of the whole toolbox ready.
I would like to release some of these functions independently so that more fields can benefit from them.

The function has been substantially rewritten based on new features of MATLAB 2007a with enhanced efficiency and stability.

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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta


AppScope::class)
class RealCurrentTimeProvider @Inject constructor() : CurrentTimeProvider {
    override fun elapsedRealtime(): Long = SystemClock.elapsedRealtime()

    override fun currentTimeMillis(): Long = System.currentTimeMillis()

    override fun localDateTimeNow(): LocalDateTime = LocalDateTime.now()
}
/*
 * Copyright (c) 2021 DuckDuckGo
 *
 * 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.
 */

package com.duckduckgo.common.utils.extensions

import android.content.BroadcastReceiver
import android.content.Context
import android.content.IntentFilter
import android.os.PowerManager
import android.provider.Settings
import androidx.core.content.ContextCompat
import logcat.LogPriority.VERBOSE
import logcat.logcat

/**
 * Constants for PrivateDnsMode
 *
 * "off" return when private DNS is off
 * "opportunistic" return when private DNS is set to "automatic" aka opportunistic
 * "hostname" return when private DNS is set to strict mode, aka user set a DNS
 */
private const val PRIVATE_DNS_MODE_OFF = "off"
private const val PRIVATE_DNS_MODE_OPPORTUNISTIC = "opportunistic"
private const val PRIVATE_DNS_MODE_STRICT = "hostname"

fun Context.isPrivateDnsActive(): Boolean {
    var dnsMode = Settings.Global.getString(contentResolver, "private_dns_mode")
    if (dnsMode == null) dnsMode = PRIVATE_DNS_MODE_OFF
    return PRIVATE_DNS_MODE_OFF != dnsMode
}

fun Context.isPrivateDnsAutomatic(): Boolean {
    var dnsMode = Settings.Global.getString(contentResolver, "private_dns_mode")
    return dnsMode == PRIVATE_DNS_MODE_OPPORTUNISTIC
}

fun Context.isPrivateDnsStrict(): Boolean {
    var dnsMode = Settings.Global.getString(contentResolver, "private_dns_mode")
    return dnsMode == PRIVATE_DNS_MODE_STRICT
}

fun Context.getPrivateDnsServerName(): String? {
    val dnsMode = Settings.Global.getString(contentResolver, "private_dns_mode")
    return if (PRIVATE_DNS_MODE_STRICT == dnsMode) Settings.Global.getString(contentResolver, "private_dns_specifier") else null
}

fun Context.isAirplaneModeOn(): Boolean {
    val airplaneMode = Settings.Global.getString(contentResolver, "airplane_mode_on")
    logcat(VERBOSE) { "airplane_mode_on $airplaneMode" }
    return airplaneMode == "1"
}

fun Context.isIgnoringBatteryOptimizations(): Boolean {
    return runCatching {
        packageName?.let {
            val powerManager = getSystemService(Context.POWER_SERVICE) as PowerManager
            powerManager.isIgnoringBatteryOptimizations(packageName)
        } ?: false
    }.getOrDefault(false)
}

fun Context.registerNotExportedReceiver(
    receiver: BroadcastReceiver,
    intentFilter: IntentFilter,
) {
    kotlin.runCatching {
        ContextCompat.registerReceiver(this, receiver, intentFilter, ContextCompat.RECEIVER_NOT_EXPORTED)
    }
}

fun Context.registerExportedReceiver(
    receiver: BroadcastReceiver,
    intentFilter: IntentFilter,
) {
    ContextCompat.registerReceiver(this, receiver, intentFilter, ContextCompat.RECEIVER_EXPORTED)
}

fun Context.isDdgApp(packageName: String): Boolean = packageName == this.applicationContext.packageName


bool Ai_AirScreamer_Init(s_SubCharacter* chara)
{
    #define AIR_SCREAMER_BASE_HEALTH Q12(380.0f)
    #define AIR_SCREAMER_RAND_MAX    100
    #define NIGHT_FLUTTER_RAND_MAX   300

    #define AIR_SCREAMER_RAND_MAX_HEALTH_BONUS_EASY -100
    #define AIR_SCREAMER_RAND_MAX_HEALTH_BONUS_HARD  100

    if (chara->model_0.state_2 != 0)
    {
        return false;
    }

    if (chara->model_0.charaId_0 == Chara_NightFlutter)
    {
        chara->health_B0 = AIR_SCREAMER_BASE_HEALTH + (func_80080514() * NIGHT_FLUTTER_RAND_MAX);
    }
    else
    {
        chara->health_B0 = AIR_SCREAMER_BASE_HEALTH + (func_80080514() * AIR_SCREAMER_RAND_MAX);
    }

    switch (g_SavegamePtr->gameDifficulty_260)
    {
        case GameDifficulty_Easy:
            chara->health_B0 += func_80080514() * AIR_SCREAMER_RAND_MAX_HEALTH_BONUS_EASY;
            break;

        case GameDifficulty_Normal:
            break;

        case GameDifficulty_Hard:
            chara->health_B0 += func_80080514() * AIR_SCREAMER_RAND_MAX_HEALTH_BONUS_HARD;
            break;
    }

    sharedFunc_800D2BF4_0_s01(chara);
    sharedSymbol_800D3B0C_0_s01(chara);
    sharedFunc_800D2390_0_s01(chara);
    sharedFunc_800D2390_0_s01(chara);
    sharedFunc_800D2B00_0_s01(chara);
    sharedFunc_800D2B10_0_s01(chara);
    sharedFunc_800D2B28_0_s01(chara);
    sharedFunc_800D2B4C_0_s01(chara);
    sharedFunc_800D2BB0_0_s01(chara);
    sharedFunc_800D2BE4_0_s01(chara);

    return true;
}


gramAddress = Pubkey.createProgramAddress(
      [Buffer.from("Talking", "utf8"), Buffer.from("Squirrels", "utf8")],
      programId
    );
    expect(
      programAddress.equals(
        new Pubkey("HwRVBufQ4haG5XSgpspwKtNd3PC9GM9m1196uJW36vds")
      )
    ).to.be.true;

    programAddress = Pubkey.createProgramAddress(
      [publicKey.toBytes()],
      programId
    );
    expect(
      programAddress.equals(
        new Pubkey("GUs5qLUfsEHkcMB9T38vjr18ypEhRuNWiePW2LoK4E3K")
      )
    ).to.be.true;

    const programAddress2 = Pubkey.createProgramAddress(
      [Buffer.from("Talking", "utf8")],
      programId
    );
    expect(programAddress.equals(programAddress2)).to.eq(false);

    expect(() => {
      Pubkey.createProgramAddress([Buffer.alloc(MAX_SEED_LEN + 1)], programId);
    }).to.throw();
  });

  it("findProgramAddress", async () => {
    const programId = new Pubkey("BPFLoader1111111111111111111111111111111111");
    let [programAddress, nonce] = Pubkey.findProgramAddress(
      [Buffer.from("", "utf8")],
      programId
    );
    expect(
      programAddress.equals(
        Pubkey.createProgramAddress(
          [Buffer.from("", "utf8"), Buffer.from([nonce])],
          programId
        )
      )
    ).to.be.true;
  });
});
function dontGiveMeFive(start, end)
{
   return Array(end-start+1).fill(null).filter((a,b) => {
        return !`${b + start}`.includes('5')
   }).length
}

console.log(dontGiveMeFive(1,90))// For Toggle
let toggle = document.querySelector('.toggleBars');
let listDiv = document.querySelector('.list');
toggle.addEventListener('click', () => {
    listDiv.classList.toggle('active');
    if(listDiv.classList.contains('active')){
        toggle.textContent='close';
    }
    else{
        toggle.textContent='menu';
    }
});

// This is to scroll Div
let scrollDiv=document.querySelector('.scrollDiv')
let scrollDown=document.querySelector('.scrollDown');
scrollDown.addEventListener('click', ()=>{
  scrollDiv.scrollTo({
    top:scrollDiv.scrollTop + 100,
    behavior:"smooth"
  });
});

const scrollUp = document.querySelector(".scrollUp");

scrollUp.addEventListener("click", () => {
    scrollDiv.scrollTo({
      top: scrollDiv.scrollTop - 100,
      behavior: "smooth"
    });
  });

//   Image array
let imageArray=[
  {name:'Iron Man',
    url:'https://bit.ly/3OpW4sg',
    borderCol:'red',
    heroUrl:'https://bit.ly/3pPtLZV',
    p:`Tony Stark is a billionaire inventor, industrialist, and CEO of Stark Industries, a leading technology company. He uses his intellect and cutting-edge technology to become the armored superhero, Iron Man. Stark is known for his wit, charisma, and arrogance, but also has a deep sense of responsibility and guilt after realizing the harm his


: .word 0x027FFC30
	arm_func_end CTRDGi_GetAgbMakerCodeAtInit

	arm_func_start CTRDG_IsPulledOut
CTRDG_IsPulledOut: ; 0x020E10E8
	stmdb sp!, {r3, lr}
	ldr r2, _020E112C ; =0x027FFC30
	ldr r0, _020E1130 ; =0x0000FFFF
	ldrh r1, [r2]
	cmp r1, r0
	moveq r0, #0
	ldmeqia sp!, {r3, pc}
	ldrb r0, [r2, #5]
	mov r0, r0, lsl #0x1e
	movs r0, r0, lsr #0x1f
	bne _020E1118
	bl CTRDG_IsExisting
_020E1118:
	ldr r0, _020E112C ; =0x027FFC30
	ldrb r0, [r0, #5]
	mov r0, r0, lsl #0x1e
	mov r0, r0, lsr #0x1f
	ldmia sp!, {r3, pc}
	.align 2, 0
_020E112C: .word 0x027FFC30
_020E1130: .word 0x0000FFFF
	arm_func_end CTRDG_IsPulledOut

	arm_func_start CTRDG_IsExisting
CTRDG_IsExisting: ; 0x020E1134
	stmdb sp!, {r4, lr}
	sub sp, sp, #0x10
	ldr r2, _020E1234 ; =0x027FFC30
	mov r4, #1
	ldrh r1, [r2]
	rsb r0, r4, #0x10000
	cmp r1, r0
	addeq sp, sp, #0x10
	moveq r0, #0
	ldmeqia sp!, {r4, pc}
	ldrb r0, [r2, #5]
	mov r0, r0, lsl #0x1e
	mov r0, r0, lsr #0x1f
	cmp r0, #1
	addeq sp, sp, #0x10
	moveq r0, #0
	ldmeqia sp!, {r4, pc}
	ldr r0, _020E1238 ; =_021E4D40
	add r1, sp, #8
	ldrh r0, [r0, #6]
	bl CTRDGi_LockByProcessor
	add r0, sp, #0
	bl CTRDGi_ChangeLatestAccessCycle
	mov r0, #0x8000000
	ldrb r2, [r0, #0xb2]
	cmp r2, #0x96
	bne _020E11B4
	ldr r1, _020E1234 ; =0x027FFC30
	ldrh r0, [r0, #0xbe]
	ldrh r1, [r1]
	cmp r1, r0
	bne _020E11FC
_020E11B4:
	cmp r2, #0x96
	beq _020E11D4
	ldr r1, _020E1234 ; =0x027FFC30
	ldr r0, _020E123C ; =0x0801FFFE
	ldrh r1, [r1]
	ldrh r0, [r0]
	cmp r1, r0
	bne _020E11FC
_020E11D4:
	ldr r2, _020E1234 ; =0x027FFC30
	mov r0, #0x8000000
	ldr r1, [r2, #8]
	ldr r0, [r0, #0xac]
	cmp r1, r0
	beq _020E1210
	ldrb r0, [r2, #5]
	mov r0, r0, lsl #0x1f
	movs r0, r0, lsr #0x1f
	beq _020E1210


# coding: utf-8

import json

import pickle
from sklearn.preprocessing import normalize

from PIL import Image
from io import BytesIO
import requests
import numpy as np

import requests
from time import time, sleep

auth = ('email-here', 'password-here')

print('loading models...')

with open('pca.bin', 'rb') as f:
    pca = pickle.load(f)

with open('et.bin', 'rb') as f:
    et = pickle.load(f)

with open('means_stds.bin', 'rb') as f:
    md, sd = pickle.load(f)

print('loading vgg...')

from keras.applications.vgg16 import VGG16
from keras.preprocessing import image
from keras.applications.vgg16 import preprocess_input

from keras import backend as K

model = VGG16(weights='imagenet')

prev_layer = model.layers[-2]
dense = K.function(model.inputs, [prev_layer.output])

def read_url(pic_url, target_size=None):
    response = requests.get(pic_url)
    img = Image.open(BytesIO(response.content))
    if target_size is not None:
        img = img.resize(target_size)
    return img

def read_vgg_pca_features(pic_url):
    img = read_url(pic_url, target_size=(224, 224))
    x = image.img_to_array(img)
    x = np.expand_dims(x, axis=0)
    x = preprocess_input(x)

    features, = dense([x])
    pca_features = pca.transform(features)
    pca_features = normalize(pca_features)
    return pca_features

live_api_url = 'http://challenges.instagram.unpossib.ly/api/live'

def get_latest_updates():
    resp = requests.get(live_api_url, auth=auth)
    return resp.json()

submission_url = 'http://challenges.instagram.unpossib.ly/api/submissions'

def submit(post_id, likes):
    data = {'post': post_id, 'likes': likes}
    response = requests.post(submission_url, json=data, auth=auth)
    resp_json = response.json()
    print(resp_json)

def process_account_update(acc):
    user = acc['username']
    if len(acc['posts']) > 0:
        print('new posts for user %s' % user)
    else:
        print('no new posts for user %s' % user)

    for post in acc['posts']:
        t0 = time()
        insta = post['instagram']
        post_id = insta['id']
        pic_url = insta['display_src']
        feat = read_vgg_pca_features(pic_url)
        pred, = et.predict(feat)

        likes = int(np.round(pred * sd[user] + md[user]))

        took = time() - t0
        print('predicted %d likes for post_id=%s, took %.3fs' % (likes, post_id, took))
        print('submitting...')
        submit(post_id, likes)
        print()

def process_update(rec):
    for acc in rec['accounts']:
        process_account_update(acc)

print('listening for updates...')

while True:
    try:
        updates = get_latest_updates()
        process_update(updates)
        print('sleeping for 3 minutes...')
        sleep(3 * 60)
    except Exception as e:
        print('got exception', str(e))
        print('ignoring it... and sleeping for 1 minute')
        sleep(1 * 60)


            .leafs()
                        .iter()
                        .map(|l| Some((**l).into()))
                        .collect::<Vec<_>>(),
                );

                // -- commitments
                commitments_vec.push(
                    porep_proof
                        .commitments()
                        .iter()
                        .map(|c| Some((**c).into()))
                        .collect::<Vec<_>>(),
                );
            }

            paths_vec_vec.push(paths_vec);
            challenged_leafs_vec_vec.push(challenged_leafs_vec);
            commitments_vec_vec.push(commitments_vec);
            challenges_vec_vec.push(
                p.challenges
                    .iter()
                    .map(|v| v.iter().map(|&s| Some(s)).collect())
                    .collect(),
            );
            challenged_sectors_vec_vec.push(
                p.challenged_sectors
                    .iter()
                    .map(|v| v.iter().map(|&s| Some(s)).collect())
                    .collect(),
            )
        }

        let mut cs = TestConstraintSystem::<Bls12>::new();

        let mut beacon = Beacon::default();

        let instance = BeaconPoStCircuit::<Bls12, PedersenHasher, vdf_sloth::Sloth> {
            params,
            // beacon_randomness_vec,
            // challenges_vec,
            challenges_vec_vec,
            challenged_sectors_vec_vec,
            challenge_seed: Some(beacon.get::<PedersenDomain>(0).into()),
            vdf_key: Some(pub_params.vdf_post_pub_params.pub_params_vdf.key.into()),
            vdf_xs_vec,
            vdf_ys_vec,
            vdf_sloth_rounds: pub_params.vdf_post_pub_params.pub_params_vdf.rounds,
            challenged_leafs_vec_vec,
            paths_vec_vec,
            root_commitment: Some(compute_root_commitment(&pub_inputs.commitments).into()),
            commitments_vec_vec,
            _h: PhantomData,
            _v: PhantomData,
        };

        instance
            .synthesize(&mut cs)
            .expect("failed to synthesize circuit");

        assert!(cs.is_satisfied(), "constraints not satisfied");

        assert_eq!(cs.num_inputs(), 7, "wrong number of inputs");
        assert_eq!(cs.num_constraints(), 398118, "wrong number of constraints");
        assert_eq!(cs.get_input(0, "ONE"), Fr::one());
    }
}
<filename>src/test/ui/inference/need_type_info/concrete-impl.rs
trait Ambiguous<A> {
    fn method() {}
}

struct One;
struct Two;
struct Struct;

impl Ambiguous<One> for Struct {}
impl Ambiguous<Two> for Struct {}

fn main() {
    <Struct as Ambiguous<_>>::method();
    //~^ ERROR type annotations needed
    //~| ERROR type annotations needed
}
use core::mem::size_of;
use core::num::Wrapping;
use core::{f32, f64};
#[cfg(has_i128)]
use core::{i128, u128};
use core::{i16, i32, i64, i8, isize};
use core::{u16, u32, u64, u8, usize};

use float::FloatCore;

/// A generic trait for converting a value to a number.
pub trait ToPrimitive {
    /// Converts the value of `self` to an `isize`.
    #[inline]
    fn to_isize(&self) -> Option<isize> {
        self.to_i64().as_ref().and_then(ToPrimitive::to_isize)
    }

    /// Converts the value of `self` to an `i8`.
    #[inline]
    fn to_i8(&self) -> Option<i8> {
        self.to_i64().as_ref().and_then(ToPrimitive::to_i8)


;
}

.yui-skin-sam .yui-pv .yui-pv-table {
	padding:0 10px;
	margin:5px 0 10px 0;
}

.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td {
	color:#eeee5c;
	font:12px arial;
}

.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd {
	background:#929292;
}

.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even {
	background:#58637a;
}

.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,
.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc {
	background:#384970;
}

.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,
.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc {
	background:#6F6E6E;
}

.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th {
	background-image:none;
	background:#2E2D2D;
}

.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner {
	background:transparent url(asc.gif) no-repeat scroll right center;
}

.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner {
	background:transparent url(desc.gif) no-repeat scroll right center;
}

.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a {
	color:#fff;
	font:bold 12px arial;
}

.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,
.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc {
	background:#333;
}

.yui-skin-sam .yui-pv-chartcontainer {
	padding:0 10px;
}

.yui-skin-sam .yui-pv-chart {
	height:250px;
	clear:right;
	margin:5px 0 0 0;
	color:#fff;
}

.yui-skin-sam .yui-pv-chartlegend div {
	float:right;
	margin:0 0 0 10px;
	_width:250px;
}

.yui-skin-sam .yui-pv-chartlegend dl {
	border:1px solid #999;
	padding:.2em 0 .2em .5em;
	zoom:1;
	margin:5px 0;
}

.yui-skin-sam .yui-pv-chartlegend dt {
	float:left;
	display:block;
	height:.7em;
	width:.7em;
	padding:0;
}

.yui-skin-sam .yui-pv-chartlegend dd {
	float:left;
	display:block;
	color:#fff;
	margin:0 1em 0 .5em;
	padding:0;
	font:11px arial;
}

.yui-skin-sam .yui-pv-minimized {height:35px;}

.yui-skin-sam .yui-pv-minimized .bd {top:-3000px;}

.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh {display:none;}/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1r2
*/
/* styles for entire widget */
.yui-skin-sam .yui-ac {
    position:relative;font-family:arial;font-size:100%;
}

/* styles for input field */
.yui-skin-sam .


    yield_every: usize,
    counter:     usize,
}

impl RegularYielder {
    pub(super) fn new(yield_every: usize) -> Self {
        assert_ne!(yield_every, 0);
        Self { yield_every, counter: 0 }
    }

    pub(super) fn yield_with<'a, F: Future + 'a>(
        &'a mut self,
        fut: F,
    ) -> impl Future<Output = <F as Future>::Output> + 'a {
        pin_project! {
            struct YielderImpl<'a, F: Future> {
                #[pin]
                fut:    F,
                polled: bool,
                cache:  Option<<F as Future>::Output>,
                parent: &'a mut RegularYielder,
            }
        }

        impl<'a, F: Future + 'a> Future for YielderImpl<'a, F> {
            type Output = <F as Future>::Output;

            fn poll(
                self: Pin<&mut Self>,
                cx: &mut task::Context<'_>,
            ) -> Poll<Self::Output> {
                let this = self.project();

                // Previously polled output cached after a co-op yield.
                if let Some(output) = this.cache.take() {
                    return Poll::Ready(output);
                }

                match this.fut.poll(cx) {
                    // Already polled - yield has previously occurred
                    Poll::Ready(output) if *this.polled => Poll::Ready(output),

                    // First poll - current counter has exceeded the limit. We
                    // need to force a yield to the executor.
                    // The result of the poll is cached and immediately returned
                    // on the next call to poll.
                    Poll::Ready(output)
                        if this.parent.counter >= this.parent.yield_every =>
                    {
                        *this.polled = true;
                        this.parent.counter = 0;
                        *this.cache = Some(output);
                        cx.waker().wake_by_ref();
                        Poll::Pending
                    }

                    // First poll - still within yield budget.
                    Poll::Ready(output) => {
                        this.parent.counter += 1;
                        Poll::Ready(output)
                    }

                    // First poll - counter doesn't need increment as we are
                    // already yielding.
                    Poll::Pending => {
                        *this.polled = true;
                        Poll::Pending
                    }
                }
            }
        }

        YielderImpl { fut, polled: false, cache: None, parent: self }
    }
}
<gh_stars>100-1000
// compile-pass
// aux-build:test-macros.rs

extern crate test_macros;

mod inner {
    use test_macros::Empty;

    #[derive(Empty)]
    struct S;
}

fn main() {}
<gh_stars>1-10
#![feature(nll)]
extern crate actix;
extern crate actix_web;
extern crate bitcask_rs;
extern crate failure;
extern crate futures;
#[macro_use]
extern crate serde_derive;

use actix::prelude::{Actor, Addr, Handler, Message, SyncArbiter, SyncContext};
use actix_web::{App, AsyncResponder, FromRequest, FutureResponse, HttpRequest, HttpResponse, Query, server};
use failure::Error;
use futures::future::{err, Future};

#[derive(Deserialize)]
struct Info {
    key: String,
    value: Option<String>,
}

fn index(req: &HttpRequest<AppState>) -> FutureResponse<HttpResponse> {
    let state = req.state();
    let addr: &Addr<BitcaskActor> = &state.addr;
    addr.send(List).from_err()
        .map(move |ret|


RaygenShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        pMissShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        pHitShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        pCallableShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        indirectDeviceAddress: VkDeviceAddress,
    ),
>;
pub type PFN_vkGetRayTracingShaderGroupStackSizeKHR = ::std::option::Option<
    unsafe extern "C" fn(
        device: VkDevice,
        pipeline: VkPipeline,
        group: u32,
        groupShader: VkShaderGroupShaderKHR,
    ) -> VkDeviceSize,
>;
pub type PFN_vkCmdSetRayTracingPipelineStackSizeKHR = ::std::option::Option<
    unsafe extern "C" fn(commandBuffer: VkCommandBuffer, pipelineStackSize: u32),
>;
extern "C" {
    pub fn vkCmdTraceRaysKHR(
        commandBuffer: VkCommandBuffer,
        pRaygenShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        pMissShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        pHitShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        pCallableShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        width: u32,
        height: u32,
        depth: u32,
    );
}
extern "C" {
    pub fn vkCreateRayTracingPipelinesKHR(
        device: VkDevice,
        deferredOperation: VkDeferredOperationKHR,
        pipelineCache: VkPipelineCache,
        createInfoCount: u32,
        pCreateInfos: *const VkRayTracingPipelineCreateInfoKHR,
        pAllocator: *const VkAllocationCallbacks,
        pPipelines: *mut VkPipeline,
    ) -> VkResult;
}
extern "C" {
    pub fn vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
        device: VkDevice,
        pipeline: VkPipeline,
        firstGroup: u32,
        groupCount: u32,
        dataSize: size_t,
        pData: *mut ::std::os::raw::c_void,
    ) -> VkResult;
}
extern "C" {
    pub fn vkCmdTraceRaysIndirectKHR(
        commandBuffer: VkCommandBuffer,
        pRaygenShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        pMissShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        pHitShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        pCallableShaderBindingTable: *const VkStridedDeviceAddressRegionKHR,
        indirectDeviceAddress: VkDeviceAddress,
    );
}
extern "C" {
    pub fn vkGetRayTracingShaderGroupStackSizeKHR(
        device: VkDevice,
        pipeline: VkPipeline,
        group: u32,
        groupShader: VkShaderGroupShaderKHR,
    ) -> VkDeviceSize;
}
extern "C" {
    pub fn vkCmdSetRayTracingPipelineStackSizeKHR(
        commandBuffer: VkCommandBuffer,
        pipelineStackSize: u32,
    );
}
#[repr(C)]
#[derive(D


 on each
        branch card
    universes: dict

        .. deprecated:: 0.8.0
           Treat this object as the universes dictionary instead
    """

    def __init__(self, filePath, branchID, branchNames, stateData):
        dict.__init__(self)
        self.filePath = filePath
        self.branchID = branchID
        self.stateData = stateData
        self.branchNames = branchNames
        self._orderedUniverses = None

    @property
    def universes(self):
        # For compatibility, remove after 0.9.0
        return self

    def __str__(self):
        return '<BranchContainer for {} from {}>'.format(
            ', '.join(self.branchNames), self.filePath)

    @property
    def orderedUniv(self):
        """Universe keys sorted by ID and by burnup"""
        if not any(self):
            raise SerpentToolsException(
                'No universes stored on branch {}'.format(str(self))
            )
        if self._orderedUniverses is None:
            self._orderedUniverses = tuple(sorted(
                self, key=lambda tpl: (tpl.universe, tpl.step)
            ))
        return self._orderedUniverses

    def __setitem__(self, key, value):
        if not isinstance(value, HomogUniv):
            raise TypeError("{} {}".format(key, type(value)))
        if not isinstance(key, UnivTuple):
            key = UnivTuple(*key)
        super().__setitem__(key, value)

    def update(self, other):
        """Update with contents of another BranchContainer"""
        # Check before making any changes
        temp = {}
        for key, univ in dict(other).items():
            if not isinstance(univ, HomogUniv):
                raise TypeError("{} {}".format(key, type(univ)))
            temp[UnivTuple(*key)] = univ

        super().update(temp)

    def getUniv(self, univID, burnup=None, index=None, days=None):
        """
        Return a specific universe given the ID and time of interest

        Parameters
        ----------
        univID: str
            Unique ID for the desired universe
        burnup: float, optional
            Burnup [MWd/kgU] of the desired universe
        index: int, optional
            Point of interest in the burnup index
        days : float, optional
            Point in time [d] for the desired universe

        Returns
        -------
        :class:`~serpentTools.objects.HomogUniv`
            Requested universe

        Raises
        ------
        KeyError
            If the requested universe could not be found
        :class:`serpentTools.SerpentToolsException`
            If neither burnup nor index are given
        """
        if burnup is None and index is None:
            raise SerpentToolsException('Burnup or index are required inputs')

        searchKey = UnivTuple(univID, burnup, index, days)

        for key, universe in self.items():
            for uItem, sItem in zip(key, searchKey):
                if sItem is None:
                    continue
                if uItem != sItem:
                    break
            else:
                return universe
        raise KeyError(
            "Could not find a universe matching {}".format(searchKey))


    EV0_SELW::AUXIO15 => 15,
            EV0_SELW::AUXIO14 => 14,
            EV0_SELW::AUXIO13 => 13,
            EV0_SELW::AUXIO12 => 12,
            EV0_SELW::AUXIO11 => 11,
            EV0_SELW::AUXIO10 => 10,
            EV0_SELW::AUXIO9 => 9,
            EV0_SELW::AUXIO8 => 8,
            EV0_SELW::AUXIO7 => 7,
            EV0_SELW::AUXIO6 => 6,
            EV0_SELW::AUXIO5 => 5,
            EV0_SELW::AUXIO4 => 4,
            EV0_SELW::AUXIO3 => 3,
            EV0_SELW::AUXIO2 => 2,
            EV0_SELW::AUXIO1 => 1,
            EV0_SELW::AUXIO0 => 0,
        }
    }
}
#[doc = r" Proxy"]
pub struct _EV0_SELW<'a> {
    w: &'a mut W,
}
impl<'a> _EV0_SELW<'a> {
    #[doc = r" Writes `variant` to the field"]
    #[inline]
    pub fn variant(self, variant: EV0_SELW) -> &'a mut W {
        {
            self.bits(variant._bits())
        }
    }
    #[doc = "EVSTAT3.AUX_TIMER2_CLKSWITCH_RDY"]
    #[inline]
    pub fn aux_timer2_clkswitch_rdy(self) -> &'a mut W {
        self.variant(EV0_SELW::AUX_TIMER2_CLKSWITCH_RDY)
    }
    #[doc = "EVSTAT3.AUX_DAC_HOLD_ACTIVE"]
    #[inline]
    pub fn aux_dac_hold_active(self) -> &'a mut W {
        self.variant(EV0_SELW::AUX_DAC_HOLD_ACTIVE)
    }
    #[doc = "EVSTAT3.AUX_SMPH_AUTOTAKE_DONE"]
    #[inline]
    pub fn aux_smph_autotake_done(self) -> &'a mut W {
        self.variant(EV0_SELW::AUX_SMPH_AUTOTAKE_DONE)
    }
    #[doc = "EVSTAT3.AUX_ADC_FIFO_NOT_EMPTY"]
    #[inline]
    pub fn aux_adc_fifo_not_empty(self) -> &'a mut W {
        self.variant(EV0_SELW::AUX_ADC_FIFO_NOT_EMPTY)
    }
    #[doc = "EVSTAT3.AUX_ADC_FIFO_ALMOST_FULL"]
    #[inline]
    pub fn aux_adc_fifo_almost_full(self) -> &'a mut W {
        self.variant(EV0_SELW::AUX_ADC_FIFO_ALMOST_FULL)
    }
    #[doc = "EVSTAT3.AUX_ADC_IRQ"]
    #[inline]
    pub fn aux_adc_irq(self) -> &'a mut W {
        self.variant(EV0_SELW::AUX_ADC_IRQ)
    }
    #[doc = "EVSTAT3.AUX_ADC_DONE"]
    #[inline]
    pub fn aux_adc_done(self) -> &'a mut W {
        self.variant(EV0_SELW::AUX_ADC_DONE)
    }
    #[doc = "EVSTAT3.AUX_ISRC_RESET_N"]
    #[inline]
    pub fn aux_isrc_reset_n(self) -> &'a mut W {
        self.variant(EV0_SELW::AUX_ISRC_RESET_N)
    }
    #[doc = "EVSTAT3.AUX_TDC_DONE"]
    #[inline]
    pub fn aux_tdc_done(self) -> &'a mut W {
        self.variant(EV0_SELW::AUX_TDC_DONE)
    }


"""MIT License

Copyright (c) 2024-2025 gunyu1019

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""

from typing import Optional

from .message import ChatMessage, NoticeMessage
from ..base_model import ChzzkModel

class RecentChat(ChzzkModel):
    message_list: list[ChatMessage]
    user_count: Optional[int]
    notice: Optional[NoticeMessage] = None


() {
  shutdown_checker::AssertNotShutdown();
}

template <>
cef_callback_t*
CefCToCppRefCounted<CefCallbackCToCpp, CefCallback, cef_callback_t>::
    UnwrapDerived(CefWrapperType type, CefCallback* c) {
  NOTREACHED() << "Unexpected class type: " << type;
  return NULL;
}

template <>
CefWrapperType CefCToCppRefCounted<CefCallbackCToCpp,
                                   CefCallback,
                                   cef_callback_t>::kWrapperType = WT_CALLBACK;
// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=db9e1aa05b67bbc704bac6cf2d37122a5ec1d94f$
//

#include "libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"

// VIRTUAL METHODS - Body may be edited by hand.

NO_SANITIZE("cfi-icall")
void CefRunContextMenuCallbackCToCpp::Continue(int command_id,
                                               EventFlags event_flags) {
  shutdown_checker::AssertNotShutdown();

  cef_run_context_menu_callback_t* _struct = GetStruct();
  if (CEF_MEMBER_MISSING(_struct, cont))
    return;

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  _struct->cont(_struct, command_id, event_flags);
}

NO_SANITIZE("cfi-icall") void CefRunContextMenuCallbackCToCpp::Cancel() {
  shutdown_checker::AssertNotShutdown();

  cef_run_context_menu_callback_t* _struct = GetStruct();
  if (CEF_MEMBER_MISSING(_struct, cancel))
    return;

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  _struct->cancel(_struct);
}

// CONSTRUCTOR - Do not edit by hand.

CefRunContextMenuCallbackCToCpp::CefRunContextMenuCallbackCToCpp() {}

// DESTRUCTOR - Do not edit by hand.

CefRunContextMenuCallbackCToCpp::~CefRunContextMenuCallbackCToCpp() {
  shutdown_checker::AssertNotShutdown();
}

template <>
cef_run_context_menu_callback_t* CefCToCppRefCounted<
    CefRunContextMenuCallbackCToCpp,
    CefRunContextMenuCallback,
    cef_run_context_menu_callback_t>::UnwrapDerived(CefWrapperType type,
                                                    CefRunContextMenuCallback*
                                                        c) {
  NOTREACHED() << "Unexpected class type: " << type;
  return NULL;
}

template <>
CefWrapperType
    CefCToCppRefCounted<CefRunContextMenuCallbackCToCpp,
                        CefRunContextMenuCallback,
                        cef_run_context_menu_callback_t>::kWrapperType =
        WT_RUN_CONTEXT_MENU_CALLBACK;
// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-


d override string IconGeometry16 { get; }
        = "M11 6.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-.98 4.227a5.5 5.5 0 1 1 .707-.707l3.127 3.126a.5.5 0 0 1-.708.708l-3.127-3.127Z";

    protected override string IconGeometry20 { get; }
        = "M13.75 8.125a5.625 5.625 0 1 1-11.25 0 5.625 5.625 0 0 1 11.25 0Zm-1.226 5.283a6.875 6.875 0 1 1 .884-.884l3.909 3.91a.625.625 0 1 1-.884.883l-3.909-3.909Z";

    protected override string IconGeometry24 { get; }
        = "M16.5 9.75a6.75 6.75 0 1 1-13.5 0 6.75 6.75 0 0 1 13.5 0Zm-1.47 6.34a8.25 8.25 0 1 1 1.06-1.06l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69Z";

    protected override string IconGeometry32 { get; }
        = "M22 13a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-1.96 8.453A10.956 10.956 0 0 1 13 24C6.925 24 2 19.075 2 13S6.925 2 13 2s11 4.925 11 11c0 2.678-.957 5.132-2.547 7.04l6.254 6.253a1 1 0 0 1-1.414 1.414l-6.254-6.254Z";
}


, 3 );

  	geometry.setAttribute( 'position', positions );

  	LineSegments.call( this, geometry, new LineBasicMaterial( { color: color, linewidth: width } ) );

  	//

  	this.matrixAutoUpdate = false;

  	this.update();

  }

  VertexNormalsHelper.prototype = Object.create( LineSegments.prototype );
  VertexNormalsHelper.prototype.constructor = VertexNormalsHelper;

  VertexNormalsHelper.prototype.update = function () {

  	this.object.updateMatrixWorld( true );

  	_normalMatrix$2.getNormalMatrix( this.object.matrixWorld );

  	var matrixWorld = this.object.matrixWorld;

  	var position = this.geometry.attributes.position;

  	//

  	var objGeometry = this.object.geometry;

  	if ( objGeometry && objGeometry.isGeometry ) {

  		var vertices = objGeometry.vertices;

  		var faces = objGeometry.faces;

  		var idx = 0;

  		for ( var i = 0, l = faces.length; i < l; i ++ ) {

  			var face = faces[ i ];

  			for ( var j = 0, jl = face.vertexNormals.length; j < jl; j ++ ) {

  				var vertex = vertices[ face[ _keys[ j ] ] ];

  				var normal = face.vertexNormals[ j ];

  				_v1$5.copy( vertex ).applyMatrix4( matrixWorld );

  				_v2$3.copy( normal ).applyMatrix3( _normalMatrix$2 ).normalize().multiplyScalar( this.size ).add( _v1$5 );

  				position.setXYZ( idx, _v1$5.x, _v1$5.y, _v1$5.z );

  				idx = idx + 1;

  				position.setXYZ( idx, _v2$3.x, _v2$3.y, _v2$3.z );

  				idx = idx + 1;

  			}

  		}

  	} else if ( objGeometry && objGeometry.isBufferGeometry ) {

  		var objPos = objGeometry.attributes.position;

  		var objNorm = objGeometry.attributes.normal;

  		var idx = 0;

  		// for simplicity, ignore index and drawcalls, and render every normal

  		for ( var j = 0, jl = objPos.count; j < jl; j ++ ) {

  			_v1$5.set( objPos.getX( j ), objPos.getY( j ), objPos.getZ( j ) ).applyMatrix4( matrixWorld );

  			_v2$3.set( objNorm.getX( j ), objNorm.getY( j ), objNorm.getZ( j ) );

  			_v2$3.applyMatrix3( _normalMatrix$2 ).normalize().multiplyScalar( this.size ).add( _v1$5 );

  			position.setXYZ( idx, _v1$5.x, _v1$5.y, _v1$5.z );

  			idx = idx + 1;

  			position.setXYZ( idx, _v2$3.x, _v2$3.y, _v2$3.z );

  			idx = idx + 1;

  		}

  	}

  	position.needsUpdate = true;

  };

  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

  /**
   * @author WestLangley / http://github.com/WestLangley
   */
  var _v1$6 = new Vector3();
  var _v2$4 = new Vector3();

  function VertexTangentsHelper( object, size, hex, linewidth ) {

  	this.object = object;

  	this.size = ( size !== undefined ) ? size : 1;

  	var color = ( hex !== undefined ) ? hex : 0x00ffff;

  	var width = ( linewidth !== undefined ) ? linewidth : 1;

  	//


广义阶乘）和相关函数
x = [1, 5, 10]
print("gamma(x)     =", special.gamma(x))
print("ln|gamma(x)| =", special.gammaln(x))
print("beta(x, 2)   =", special.beta(x, 2))

'''
gamma(x)     = [  1.00000000e+00   2.40000000e+01   3.62880000e+05]
ln|gamma(x)| = [  0.           3.17805383  12.80182748]
beta(x, 2)   = [ 0.5         0.03333333  0.00909091]
'''

# 误差函数（高斯的积分）
# 它的补和逆
x = np.array([0, 0.3, 0.7, 1.0])
print("erf(x)  =", special.erf(x))
print("erfc(x) =", special.erfc(x))
print("erfinv(x) =", special.erfinv(x))

'''
erf(x)  = [ 0.          0.32862676  0.67780119  0.84270079]
erfc(x) = [ 1.          0.67137324  0.32219881  0.15729921]
erfinv(x) = [ 0.          0.27246271  0.73286908         inf]
'''
```

NumPy 和``scipy.special``中有更多可用的`ufunc`。由于这些软件包的文档可在线获取，因此搜索`gamma function python`通常会找到相关信息。

### 高级`ufunc`特性

许多 NumPy 用户在没有学习完整特性的情况下使用`ufunc`。我们将在这里概述`ufunc`的一些专用特性。

#### 指定输出

对于大型计算，指定存储计算结果的数组，有时很有用。它不会创建临时数组，可以用于将计算结果直接写入你希望的内存位置。对于所有`ufunc`，可以使用函数的``out``参数来完成：

```py
x = np.arange(5)
y = np.empty(5)
np.multiply(x, 10, out=y)
print(y)

# [  0.  10.  20.  30.  40.]
```

这甚至可以用于数组视图。例如，我们可以将计算结果写入指定数组的每个其他元素：

```py
y = np.zeros(10)
np.power(2, x, out=y[::2])
print(y)

# [  1.   0.   2.   0.   4.   0.   8.   0.  16.   0.]
```

如果我们改为编写``y [:: 2] = 2 ** x``，这将创建一个临时数组来保存``2 ** x``的结果，然后将这些值复制到``y``数组中。

对于如此小的计算而言，这并没有多大区别，但对于非常大的数组，通过小心使用``out``参数可以节省大量内存。

#### 聚合

对于二元`ufunc`，有一些有趣的聚合可以从对象直接计算。例如，如果我们想要使用特定操作简化数组，我们可以使用任何`ufunc`的``reduce``方法。

`reduce`会重复将给定操作应用于数组元


128) 0%,rgb(113, 206, 126) 100%);--wp--preset--gradient--midnight:linear-gradient(135deg,rgb(2, 3, 129) 0%,rgb(40, 116, 252) 100%);--wp--preset--font-size--small:12px;--wp--preset--font-size--medium:20px;--wp--preset--font-size--large:20px;--wp--preset--font-size--x-large:42px;--wp--preset--font-size--normal:18px;--wp--preset--font-size--larger:24px;--wp--preset--spacing--20:0.44rem;--wp--preset--spacing--30:0.67rem;--wp--preset--spacing--40:1rem;--wp--preset--spacing--50:1.5rem;--wp--preset--spacing--60:2.25rem;--wp--preset--spacing--70:3.38rem;--wp--preset--spacing--80:5.06rem;--wp--preset--shadow--natural:6px 6px 9px rgba(0, 0, 0, .2);--wp--preset--shadow--deep:12px 12px 50px rgba(0, 0, 0, .4);--wp--preset--shadow--sharp:6px 6px 0px rgba(0, 0, 0, .2);--wp--preset--shadow--outlined:6px 6px 0px -3px rgba(255, 255, 255, 1),6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp:6px 6px 0px rgba(0, 0, 0, 1)}:where(.is-layout-flex){gap:.5em}:where(.is-layout-grid){gap:.5em}.has-large-font-size{font-size:var(--wp--preset--font-size--large)!important}:where(.wp-block-post-template.is-layout-flex){gap:1.25em}:where(.wp-block-post-template.is-layout-grid){gap:1.25em}:where(.wp-block-columns.is-layout-flex){gap:2em}:where(.wp-block-columns.is-layout-grid){gap:2em}:root :where(.wp-block-pullquote){font-size:1.5em;line-height:1.6}a.pinit-button.custom,a.pinit-button.old_default{text-indent:-9999em!important}a.pinit-button.custom span,a.pinit-button.old_default span{display:block;background-color:transparent!important;background-repeat:no-repeat!important;background-position:0 0!important}a.pinit-button.old_default span{background-image:url(https://vanillaandbean.com/wp-content/plugins/jquery-pin-it-button-for-images/css/images/pinit-button.png)!important}a.pinit-button.default{display:block;overflow:hidden;text-decoration:none;color:#fff;background-color:#bd081c}a.pinit-button.default:hover{background-color:#a50718}a.pinit-button.default [class*=" jpibfi-icon-"],a.pinit-button.default [class^=jpibfi-icon-]{color:#fff;display:block}a.pinit-button.default [class*=" jpibfi-icon-"]:hover,a.pinit-button.default [class^=jpibfi-icon-]:hover{color:#fff}a.pinit-button.default [class*=" jpibfi-icon-"]:before,a.pinit-button.default [class^=jpibfi-icon-]:before{display:block;position:absolute;top:50%;left:50%}@font-face{font-display:swap;font-family:jpibfi-font;src:url(https://vanillaandbean.com/wp-content/plugins/jquery-pin-it-button-for-images/css/fonts


题。后来又有一个文件，更加发展了、更加完整了，指出要以毛主席三项指示为纲和以“三要三不要”为原则，为识别马列主义者和修正主义者的标准，一共是六条。

   接着是18号文件。军队要整顿，大家都知道了，我们传达了叶副主席、邓副主席的指示。形势的好转是贯彻中央文件的结果。从时间上看，好形势还在持续向前发展。从地域上或基层单位看也正改变不平衡的状态。我们想如果科学院很好贯彻上述中央文件的精神，我们也一定会发展科学院大好形势。

   但在大好形势下，我们还要看到存在着天灾人祸的威胁。天灾：比如旱、涝、风、虫等。过去虫来了不得了，现在有农药，影响小一些。人祸，就是世界上还有两霸，美帝、苏修两个大怪物，天天扩军备战，还搞什么气象武器等等，他们又争夺，又勾结，到处捣乱。棺材铺老板希望死人，他们的军火商唯恐天下不乱。有美、苏争霸，就有战争威胁。世界大战迟早免不了发生。所以毛主席提出“要备战、备荒、为人民”。邓副主席号召要争取三、五年的时间把工作搞好。

   关于天灾，今年河南发生了暴雨。1963年河北七天下一千毫米，天津附近只剩京浦一线，周围一片汪洋，出了个“战洪图”的戏，反映当时抗洪斗争的情况。今年河南三天就下了一千毫米，在确山有两个水库出了问题，咱们确山干校的同志爬上了山，与解放军同吃同住，没遇到危险。这次在河南，是四百年没有遇到的暴雨，人民生命财产损失比较大。所以在三至四年内要大力加固水库。如第二汽车厂，他们事先作了部分山洪暴涨的准备，把周围的一、二十个水库都加固了。厂房基本没损失。总之，我们要争取时间，好好把工作做好，这样，无论天灾或人祸到来，我们都可以立于不败之地。

   中央负责同志讲：抓


司的财务状况？ | 如果你是一家初创公司的CEO，你会选择哪种类型的融资方式？ |
| 人工智能对于医疗保健行业有哪些潜在应用？ | 你认为人工智能是否能够完全替代医生的角色？ |
| 电商网站常见的欺诈手段有哪些？ | 如果你发现自己被电商欺诈了，你该如何维护自己的权益？ |
| 如何提高团队的工作效率？ | 你认为管理者应该如何有效地激励员工？ |
| 在设计一个产品时，用户体验应该考虑哪些方面？ | 请描述一下你最喜欢的产品的优点和缺点。 |
| 如何选取适合自己的运动鞋？ | 运动鞋的价格与品质是否成正比？ |
| 什么是区块链技术？它有哪些应用场景？ | 区块链技术是否能够协助政府打击网络犯罪？ |
| 如何合理规划个人财务？ | 你认为投资房产是否是一个好主意？ |
| 安全性                | 如何确保我在网上银行交易时的安全性？                                                                                |
| 环保                  | 我们应该如何减少塑料污染？                                                                                |
| 新闻编辑              | 如果你是一名新闻编辑，你会如何选择要报道的故事？                                                                                |
| 医学研究              | 有哪些最近的医学研究值得关注？                                                                                |
| 电子商务            | 如果我想在电子商务平台上开设一个成功的商店，我需要注意哪些方面？                                                                                |
| 外语学习             | 学习外语的最佳方法是什么？                                                                                |
| 社交媒体          | 社交媒体对我们的日常生活有什么影响？


"../lib" }
	links   { "CppSharedLib" }

	configuration "Debug"
		targetdir "../bin/debug (x64)"
		links { "CppStaticLib" }

	configuration "Release"
		targetdir "../bin/release (x64)"