 with
`Getters`, `Extractor` and `Reporters`. This is simply due to the fact that it is
implementing the methods for those by itself. Under the hood it's using their
functionality, so the methods will work just the same.

## Usage

### simple constant definition

Just like with [Defaults](defaults.md), constants can be used to map a reference
to an existing enum key. When such a constant exists, Enumhancer treats it like any
other case.

````php
enum Suit
{
    use Henzeb\Enumhancer\Concerns\Mappers;

    case Hearts;
    case Clubs;
    case Spades;
    case Diamonds;

    const AceOfClubs = Suit::Clubs;
}

Suit::get('AceOfClubs'); //returns Suit::Clubs

````

Note: constants containing a reference to existing cases can also be set to `private`
to prevent direct reference.

### constant definitions

You can also add a constant definition with an array inside. The name
should be starting with `map`, either lower or uppercase.

````php
enum Suit
{
    use Henzeb\Enumhancer\Concerns\Mappers;

    private const MAP_SUIT = [
        'AceOfSpades' => Suit::Spades
    ];

    case Hearts;
    case Clubs;
    case Spades;
    case Diamonds;
}
Suit::get('AceOfSpades'); //returns Suit::Spades
````

You can also have multiple `mappers` specified that way. Just add another constant.

### The Mapper object

When you plan to use a different mapper for different situations, like languages,
You can create an object that extends `Henzeb\Enumhancer\Contracts\Mapper`.

````php
class SuitMapper extends Henzeb\Enumhancer\Contracts\Mapper
{
    protected function mappable(): array
    {
        return [
            'AceOfHearts' => 'hearts',
            'AceOfClubs' => 'Clubs',
            'AceOfSpades' => 2,
            'AceOfDiamonds' => Suit::Diamonds
        ];
    }
}
````

Just like cases, keys and values don't have to be in the correct case.

#### Using constants

Just like arrays, when a constant has a string that points to an actual
`Mapper`, Enumhancer will transform it into a Mapper object and use this.

````php
enum Suit
{
    use Henzeb\Enumhancer\Concerns\Mappers;

    private const MAP_SUIT = SuitMapper::class;

    case Hearts;
    case Clubs;
    case Spades;
    case Diamonds;
}

Suit::get('AceOfDiamonds'); //returns Suit::Diamonds
````

#### Using a static method

In some cases you might want to apply the mapper through a method.

````php
enum Suit
{
    use Henzeb\Enumhancer\Concerns\Mappers;

    case Hearts;
    case Clubs;
    case Spades;
    case Diamonds;

    protected static function mapper(): Henzeb\Enumhancer\Contracts\Mapper|array|string|null
    {
        return SuitMapper::class;
    }
}

Suit::get('AceOfHearts'); // returns Suit::Hearts
````

#### add as parameter

If you wish, you can add as many mappers as you like to any of the
[Getters](getters.md) methods.

````php
Suit::get('AceOfHearts', SuitMapper::class, SuitMapperFrench::class);
Suit::get('AceOfHearts', SuitMapper::getNewInstance());
Suit::tryGet('AceOfHearts', ['AceOfClubs'=>'AceOfHearts']);
````

#### using Configure

See [Configure](configure.md#configuremapper)

#### Combining the different ways

It's possible to combine the different methods. Mapping values is done waterfall.
This means a mapper can map to a value that does not necessarily ex


from asyncio import QueueEmpty
from pyrogram import Client
from pyrogram import filters
from pyrogram.types import Message

from TamilVc.config import que
from TamilVc.function.admins import set
from TamilVc.helpers.channelmusic import get_chat_id
from TamilVc.helpers.decorators import authorized_users_only
from TamilVc.helpers.decorators import errors
from TamilVc.helpers.filters import command
from TamilVc.helpers.filters import other_filters
from TamilVc.services.callsmusic import callsmusic
from TamilVc.services.queues import queues

@Client.on_message(filters.command("adminreset"))
async def update_admin(client, message: Message):
    chat_id = get_chat_id(message.chat)
    set(
        chat_id,
        [
            member.user
            for member in await message.chat.get_members(filter="administrators")
        ],
    )
    await message.reply_text("✨ 𝐀𝐝𝐦𝐢𝐧 𝐜𝐚𝐜𝐡𝐞 𝐫𝐞𝐟𝐫𝐞𝐬𝐡𝐞𝐝! 😍")

@Client.on_message(command("pause") & other_filters)
@errors
@authorized_users_only
async def pause(_, message: Message):
    chat_id = get_chat_id(message.chat)
    if (chat_id not in callsmusic.active_chats) or (
        callsmusic.active_chats[chat_id] == "paused"
    ):
        await message.reply_text("❗ Nothing is playing!")
    else:
        callsmusic.pause(chat_id)
        await message.reply_text("▶ Paused!")

@Client.on_message(command("resume") & other_filters)
@errors
@authorized_users_only
async def resume(_, message: Message):
    chat_id = get_chat_id(message.chat)
    if (chat_id not in callsmusic.active_chats) or (
        callsmusic.active_chats[chat_id] == "playing"
    ):
        await message.reply_text("❗ 𝐍𝐨𝐭𝐡𝐢𝐧𝐠 𝐢𝐬 𝐩𝐚𝐮𝐬𝐞𝐝! 😕")
    else:
        callsmusic.resume(chat_id)
        await message.reply_text("⏸ 𝐑𝐞𝐬𝐮𝐦𝐞𝐝! 🥰")

@Client.on_message(command("end") & other_filters)
@errors
@authorized_users_only
async def stop(_, message: Message):
    chat_id = get_chat_id(message.chat)
    if chat_id not in callsmusic.active_chats:
        await message.reply_text("❗ 𝐍𝐨𝐭𝐡𝐢𝐧𝐠 𝐢𝐬 𝐒𝐭𝐫𝐞𝐚𝐦𝐢𝐧𝐠! 😬")
    else:
        try:
            queues.clear(chat_id)
        except QueueEmpty:
            pass

        await callsmusic.stop(chat_id)
        await message.reply_text("❌ 𝐒𝐭𝐨𝐩𝐩𝐞𝐝 𝐒𝐭𝐫𝐞𝐚𝐦𝐢𝐧𝐠! 🙄")

@Client.on_message(command("skip") & other_filters)
@errors
@authorized_users_only
async def skip(_, message: Message):
    global que
    chat_id = get_chat_id(message.chat)
    if chat_id not in callsmusic.active_chats:
        await message.reply_text("❗ 𝐍𝐨𝐭𝐡𝐢𝐧𝐠 𝐢𝐬 𝐩𝐥𝐚𝐲𝐢𝐧𝐠 𝐭𝐨 𝐬𝐤𝐢𝐩! 😒")
    else:
        queues.task_done(chat_id)
        if queues.is_empty(chat_id):
            await callsmusic.stop(chat_id)
        else:
            await callsmusic.set_stream(
                chat_id,
                queues.get(chat_id)["file"]
            )

    qeue = que.get(chat_id)
    if qeue:
        skip = qeue.pop(0)
    if not qeue:
        return
    await message.reply_text(f"- 𝐒𝐤𝐢𝐩𝐩𝐞𝐝 🤗 **{skip[0]}**\n- 𝐍𝐨𝐰 𝐏𝐥𝐚𝐲𝐢𝐧𝐠 🥳 **{qeue[0][0]}**")

@Client.on_message(filters.command("admincache"))
@errors
async def admincache(client, message: Message):
    set(
        message.chat.id,
        [
            member.user
            for member in await message.chat.get_members(filter="administrators")
        ],
    )
    await message.reply_text("✨ 𝐀𝐝𝐦𝐢𝐧 𝐜𝐚𝐜𝐡𝐞 𝐫𝐞𝐟𝐫𝐞𝐬𝐡𝐞𝐝! 😍")


, 0xfc, 0x04, 0x8f, 0xec, 0x0c, 0x88, 0x1c, 0x10, 0xc4,
            0xc9, 0x42, 0x8f, 0xca, 0x69, 0xc1, 0x32, 0xa2,
        ])
        .expect("compact signatures are 64 bytes; DER signatures are 68-72 bytes")
    }

    fn get_dummy_txid() -> Txid {
        Txid::default()
    }

    fn get_dummy_spend_tx() -> SpendTransaction {
        // A valid psbt from https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#Encoding
        let psbt_base64 = "cHNidP8BAHUCAAAAASaBcTce3/KF6Tet7qSze3gADAVmy7OtZGQXE8pCFxv2AAAAAAD+////AtPf9QUAAAAAGXapFNDFmQPFusKGh2DpD9UhpGZap2UgiKwA4fUFAAAAABepFDVF5uM7gyxHBQ8k0+65PJwDlIvHh7MuEwAAAQD9pQEBAAAAAAECiaPHHqtNIOA3G7ukzGmPopXJRjr6Ljl/hTPMti+VZ+UBAAAAFxYAFL4Y0VKpsBIDna89p95PUzSe7LmF/////4b4qkOnHf8USIk6UwpyN+9rRgi7st0tAXHmOuxqSJC0AQAAABcWABT+Pp7xp0XpdNkCxDVZQ6vLNL1TU/////8CAMLrCwAAAAAZdqkUhc/xCX/Z4Ai7NK9wnGIZeziXikiIrHL++E4sAAAAF6kUM5cluiHv1irHU6m80GfWx6ajnQWHAkcwRAIgJxK+IuAnDzlPVoMR3HyppolwuAJf3TskAinwf4pfOiQCIAGLONfc0xTnNMkna9b7QPZzMlvEuqFEyADS8vAtsnZcASED0uFWdJQbrUqZY3LLh+GFbTZSYG2YVi/jnF6efkE/IQUCSDBFAiEA0SuFLYXc2WHS9fSrZgZU327tzHlMDDPOXMMJ/7X85Y0CIGczio4OFyXBl/saiK9Z9R5E5CVbIBZ8hoQDHAXR8lkqASECI7cr7vCWXRC+B3jv7NYfysb3mk6haTkzgHNEZPhPKrMAAAAAAAAA";
        serde_json::from_str(&serde_json::to_string(&psbt_base64).unwrap()).unwrap()
    }

    macro_rules! roundtrip {
        ($msg:ident) => {
            let serialized_msg = serde_json::to_string(&$msg).unwrap();
            let deserialized_msg = serde_json::from_str(&serialized_msg).unwrap();
            assert_eq!($msg, deserialized_msg);
        };
    }

    #[test]
    fn serde_watchtower_sig() {
        let pubkey: PublicKey = get_dummy_pubkey();
        let sig: Signature = get_dummy_sig();
        let signatures: HashMap<PublicKey, Signature> = [(pubkey, sig)].iter().cloned().collect();
        let txid: Txid = get_dummy_txid();
        let deposit_outpoint = OutPoint::from_str(
            "3694ef9e8fcd78e9b8165a41e6f5e2b5f10bcd92c6d6e42b3325a850df56cd83:0",
        )
        .unwrap();
        let msg = watchtower::Sig {
            signatures,
            txid,
            deposit_outpoint,
        };
        roundtrip!(msg);
    }

    #[test]
    fn serde_watchtower_sig_ack() {
        let ack = true;
        let txid: Txid = get_dummy_txid();
        let msg = watchtower::SigAck { ack, txid };
        roundtrip!(msg);
    }

    #[test]
    fn serde_watchtower_get_spend_tx() {
        let msg = server::GetSpendTx {
            deposit_outpoint: OutPoint::


    "alphabet",
    "blue-circle",
    "letter",
  ], emoji: "Ⓜ"),
  Emoji(keywords: [
    "money",
    "sales",
    "cash",
    "blue-square",
    "payment",
    "bank",
  ], emoji: "🏧"),
  Emoji(keywords: [
    "japanese",
    "blue-square",
    "katakana",
  ], emoji: "🈂"),
  Emoji(keywords: [
    "custom",
    "blue-square",
  ], emoji: "🛂"),
  Emoji(keywords: [
    "passport",
    "border",
    "blue-square",
  ], emoji: "🛃"),
  Emoji(keywords: [
    "blue-square",
    "airport",
    "transport",
  ], emoji: "🛄"),
  Emoji(keywords: [
    "blue-square",
    "travel",
  ], emoji: "🛅"),
  Emoji(keywords: [
    "blue-square",
    "disabled",
    "a11y",
    "accessibility",
  ], emoji: "♿"),
  Emoji(keywords: [
    "cigarette",
    "blue-square",
    "smell",
    "smoke",
  ], emoji: "🚭"),
  Emoji(keywords: [
    "toilet",
    "restroom",
    "blue-square",
  ], emoji: "🚾"),
  Emoji(keywords: [
    "cars",
    "blue-square",
    "alphabet",
    "letter",
  ], emoji: "🅿"),
  Emoji(keywords: [
    "blue-square",
    "liquid",
    "restroom",
    "cleaning",
    "faucet",
  ], emoji: "🚰"),
  Emoji(keywords: [
    "toilet",
    "restroom",
    "wc",
    "blue-square",
    "gender",
    "male",
  ], emoji: "🚹"),
  Emoji(keywords: [
    "purple-square",
    "woman",
    "female",
    "toilet",
    "loo",
    "restroom",
    "gender",
  ], emoji: "🚺"),
  Emoji(keywords: [
    "orange-square",
    "child",
  ], emoji: "🚼"),
  Emoji(keywords: [
    "blue-square",
    "toilet",
    "refresh",
    "wc",
    "gender",
  ], emoji: "🚻"),
  Emoji(keywords: [
    "blue-square",
    "sign",
    "human",
    "info",
  ], emoji: "🚮"),
  Emoji(keywords: [
    "blue-square",
    "record",
    "film",
    "movie",
    "curtain",
    "stage",
    "theater",
  ], emoji: "🎦"),
  Emoji(keywords: [
    "blue-square",
    "reception",
    "phone",
    "internet",
    "connection",
    "wifi",
    "bluetooth",
    "bars",
  ], emoji: "📶"),
  Emoji(keywords: [
    "blue-square",
    "here",
    "katakana",
    "japanese",
    "destination",
  ], emoji: "🈁"),
  Emoji(keywords: [
    "blue-square",
    "words",
    "shape",
    "icon",
  ], e


)
  $core.bool hasLastUpdatedDate() => $_has(1);
  @$pb.TagNumber(2)
  void clearLastUpdatedDate() => clearField(2);
}

const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
const _omitMessageNames =
    $core.bool.fromEnvironment('protobuf.omit_message_names');
//
//  Generated code. Do not modify.
//  source: model/user/user_relationship.proto
//
// @dart = 2.12

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

import 'dart:convert' as $convert;
import 'dart:core' as $core;
import 'dart:typed_data' as $typed_data;

@$core.Deprecated('Use userRelationshipDescriptor instead')
const UserRelationship$json = {
  '1': 'UserRelationship',
  '2': [
    {
      '1': 'owner_id',
      '3': 1,
      '4': 1,
      '5': 3,
      '9': 0,
      '10': 'ownerId',
      '17': true
    },
    {
      '1': 'related_user_id',
      '3': 2,
      '4': 1,
      '5': 3,
      '9': 1,
      '10': 'relatedUserId',
      '17': true
    },
    {
      '1': 'block_date',
      '3': 3,
      '4': 1,
      '5': 3,
      '9': 2,
      '10': 'blockDate',
      '17': true
    },
    {
      '1': 'group_index',
      '3': 4,
      '4': 1,
      '5': 3,
      '9': 3,
      '10': 'groupIndex',
      '17': true
    },
    {
      '1': 'establishment_date',
      '3': 5,
      '4': 1,
      '5': 3,
      '9': 4,
      '10': 'establishmentDate',
      '17': true
    },
    {'1': 'name', '3': 6, '4': 1, '5': 9, '9': 5, '10': 'name', '17': true},
    {
      '1': 'custom_attributes',
      '3': 15,
      '4': 3,
      '5': 11,
      '6': '.im.turms.proto.Value',
      '10': 'customAttributes'
    },
  ],
  '8': [
    {'1': '_owner_id'},
    {'1': '_related_user_id'},
    {'1': '_block_date'},
    {'1': '_group_index'},
    {'1': '_establishment_date'},
    {'1': '_name'},
  ],
};

/// Descriptor for `UserRelationship`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List userRelationshipDescriptor = $convert.base64Decode(
    'ChBVc2VyUmVsYXRpb25zaGlwEh4KCG93bmVyX2lkGAEgASgDSABSB293bmVySWSIAQESKwoPcm'
    'VsYXRlZF91c2VyX2lkGAIgASgDSAFSDXJlbGF0ZWRVc2VySWSIAQESIgoKYm


_WORLD, "VGUI_button.click" );

	if ( FlashAPIIsValid() )
	{
		WITH_SLOT_LOCKED
		{
			WITH_SFVALUEARRAY( args, 1 )
			{
				g_pScaleformUI->ValueArray_SetElement( args, 0, team );
				g_pScaleformUI->Value_InvokeWithoutReturn( m_FlashAPI, "showPreMatchOverlay", args, 1 );
			}
		}

		m_bPostSelectOverlay = true;
	}
}

void CCSTeamMenuScaleform::HandleForceSelect( void )
{
	if ( !m_bMatchStart )
		return;

	SF_FORCE_SPLITSCREEN_PLAYER_GUARD( m_iSplitScreenSlot );

	C_CSPlayer *pLocalPlayer = C_CSPlayer::GetLocalCSPlayer();

	if ( pLocalPlayer && pLocalPlayer->GetTeamNumber() == TEAM_UNASSIGNED && pLocalPlayer->GetForceTeamTime() != -1.0f )
	{

		int nDelta = static_cast<int>( ceil( pLocalPlayer->GetForceTeamTime() - gpGlobals->curtime ) );

		if ( m_nForceSelectTimeLast == -1.0f )
		{
			m_nForceSelectTimeLast = nDelta + 1;
		}

		if ( nDelta < m_nForceSelectTimeLast )
		{
			// Update on screen timer
			int nMinutes = nDelta / 60;
			int nSeconds = nDelta % 60;

			wchar_t szTime[32];
			szTime[0] = 0;

			V_snwprintf( szTime, ARRAYSIZE( szTime ), L"%d:%.2d", nMinutes, nSeconds );

			if( nDelta <= 3 && m_nForceSelectTimeLast != nDelta )
			{
				if( nDelta > 0 )
				{
					CLocalPlayerFilter filter;
					CBaseEntity::EmitSound( filter, 0, "UI.CounterBeep" );
				}
				else
				{
					CLocalPlayerFilter filter;
					CBaseEntity::EmitSound( filter, 0, "UI.CounterDoneBeep" );

					Hide( true );
				}
			}

			m_nForceSelectTimeLast = nDelta;

			if ( FlashAPIIsValid() && m_pTimerTextGreen && m_pTimerTextRed && m_pTimerTextLabel )
			{
				// Change timer to red when only three seconds remain
				if ( nDelta <= 3 && !m_bRedTimerVisible )
				{
					m_pTimerTextLabel->SetVisible( true );
					m_pTimerTextGreen->SetVisible( false );
					m_pTimerTextRed->SetVisible( true );
					m_bRedTimerVisible = true;
					m_bGreenTimerVisible = false;
				}
				else if ( nDelta > 3 && !m_bGreenTimerVisible)
				{
					m_pTimerTextLabel->SetVisible( true );
					m_pTimerTextGreen->SetVisible( true );
					m_pTimerTextRed->SetVisible( false );
					m_bGreenTimerVisible = true;
				}
				else if ( nDelta < 0 )
				{
					// Ran out of time. Force team selection.
					m_pTimerTextLabel->SetVisible( false );
					m_pTimerTextGreen->SetVisible( false );
					m_pTimerTextRed->SetVisible( false );
				}

				WITH_SLOT_LOCKED
				{
					if ( m_bGreenTimerVisible )
					{
						m_pTimerTextGreen->SetText( szTime );
					}
					else
					{
						m_pTimerTextRed->SetText( szTime );
					}
				}
			}
		}
	}
}

void CCSTeamMenuScaleform::UpdateTeamAvatars( void )
{
	//int nMaxPlayers = MIN


# -*- coding: utf-8 -*-
#############################################################################
#
#    Cybrosys Technologies Pvt. Ltd.
#
#    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
#    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
#    You can modify it under the terms of the GNU LESSER
#    GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
#    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
#    (LGPL v3) along with this program.
#    If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import date
from odoo import fields, models

class DayBookWizard(models.TransientModel):
    _name = 'account.day.book.report'
    _description = 'Account Day Book Report'

    company_id = fields.Many2one('res.company', string='Company',
                                 readonly=True,
                                 default=lambda self: self.env.company)
    journal_ids = fields.Many2many('account.journal', string='Journals',
                                   required=True,
                                   default=lambda self: self.env[
                                       'account.journal'].search([]))
    target_move = fields.Selection([('posted', 'All Posted Entries'),
                                    ('all', 'All Entries')],
                                   string='Target Moves', required=True,
                                   default='posted')
    account_ids = fields.Many2many('account.account',
                                   'account_report_daybook_account_rel',
                                   'report_id', 'account_id',
                                   'Accounts')
    date_from = fields.Date(string='Start Date', default=date.today(),
                            required=True)
    date_to = fields.Date(string='End Date', default=date.today(),
                          required=True)

    def _build_contexts(self, data):
        result = {}
        result['journal_ids'] = 'journal_ids' in data['form'] and data['form'][
            'journal_ids'] or False
        result['state'] = 'target_move' in data['form'] and data['form'][
            'target_move'] or ''
        result['date_from'] = data['form']['date_from'] or False
        result['date_to'] = data['form']['date_to'] or False
        result['strict_range'] = True if result['date_from'] else False
        return result

    def check_report(self):
        self.ensure_one()
        data = {}
        data['ids'] = self.env.context.get('active_ids', [])
        data['model'] = self.env.context.get('active_model', 'ir.ui.menu')
        data['form'] = \
        self.read(['date_from', 'date_to', 'journal_ids', 'target_move',
                   'account_ids'])[0]
        used_context = self._build_contexts(data)
        data['form']['used_context'] = dict(used_context,
                                            lang=self.env.context.get(
                                                'lang') or 'en_US')
        return self.env.ref(
            'base_accounting_kit.day_book_pdf_report').report_action(self,
                                                                     data=data)


td>

			      		联系人QQ
			      		{{entity.linkmanQq}}

			      		联系人手机
			      		{{entity.linkmanMobile}}

			      		联系人E-Mail
			      		{{entity.linkmanEmail}}

				      		营业执照号
				      		{{entity.licenseNumber}}

				      		税务登记证号
				      		{{entity.taxNumber}}

				      		组织机构代码证号
				      		{{entity.orgNumber}}

				      		法定代表人
				      		{{entity.legalPerson}}

				      		法定代表人身份证号
				      		{{entity.legalPersonCardId}}

				      		开户行名称
				      		{{entity.bankUser}}

				      		开户行支行
				      		{{entity.bankUser}}

				      		银行账号
				      		{{entity.bankName}}

			<button class="btn btn-success" data-dismiss="modal" aria-hidden="true" ng-click="updateStatus(entity.sellerId,'1')">审核通过</button>
         	<button class="btn btn-danger"  data-dismiss="modal" aria-hidden="true" ng-click="updateStatus(entity.sellerId,'2')">审核未通过</button>
            <button class="btn btn-danger" data-dismiss="modal" aria-hidden="true" ng-click="updateStatus(entity.sellerId,'3')">关闭商家</button>
			<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>

<!DOCTYPE html>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>商品编辑</title>

<meta
	content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"
	name="viewport">

<link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.min.


/*
 * Copyright (C) 2022 Freie Universität Berlin
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 */

#pragma once

/**
 * @defgroup    net_dns_mock DNS defines
 * @ingroup     net
 * @brief       Generic DNS mock values
 * @{
 *
 * @file
 * @brief   Generic DNS mock values
 *
 * @author  Hendrik van Essen <hendrik.ve@fu-berlin.de>
 */

#ifdef __cplusplus
extern "C" {
#endif

#include "net/ipv4/addr.h"
#include "net/ipv6/addr.h"

/**
 * @brief Hostname used to query.
 */
#define SOCK_DNS_MOCK_EXAMPLE_COM_HOSTNAME "example.com"

/**
 * @brief IPv4 address for @ref SOCK_DNS_MOCK_EXAMPLE_COM_HOSTNAME.
 */
static const ipv4_addr_t sock_dns_mock_example_com_addr_ipv4 =
    IPV4_ADDR_INIT(93, 184, 216, 34);

/**
 * @brief IPv6 address for @ref SOCK_DNS_MOCK_EXAMPLE_COM_HOSTNAME.
 *        Address represents "2606:2800:220:1:248:1893:25c8:1946".
 */
static const ipv6_addr_t sock_dns_mock_example_com_addr_ipv6 = { {
        0x26, 0x06, 0x28, 0x00, 0x02, 0x20, 0x00, 0x01,
        0x02, 0x48, 0x18, 0x93, 0x25, 0xc8, 0x19, 0x46
    }
};

#ifdef __cplusplus
}
#endif

/** @} */


---
-- GIOP Library supporting a very limited subset of operations
--
-- Summary
-- -------
--  The library currently provides functionality to connect and query the
--  CORBA naming service for a list of available objects.
--
--
-- Overview
-- --------
-- The library contains the following classes:
--
--   o Packet.*
--    - The Packet classes contain specific packets and function to serialize
--        them to strings that can be sent over the wire. Each class may also
--        contain a function to parse the servers response.
--
--   o Comm
--    - Implements a number of functions to handle communication over the
--        the socket.
--
--   o Helper
--    - A helper class that provides easy access to the rest of the library
--
--
-- Example
-- -------
-- The following sample code illustrates how scripts can use the Helper class
-- to interface the library:
--
-- <code>
--  helper   = giop.Helper:new(host, port)
--  status, err = helper:Connect()
--  status, ctx = helper:GetNamingContext()
--  status, objs = helper:ListObjects(ctx)
-- </code>
--
-- Additional information
-- ----------------------
-- The implementation is based on packet dumps and the decoding Wireshark
-- provides.
--
-- This implementation is tested and known to work against:
-- x Sun's JAVA orbd
--
-- @copyright Same as Nmap--See https://nmap.org/book/man-legal.html
-- @author Patrik Karlsson <patrik@cqure.net>
--

--
-- Version 0.1
-- Created 08/07/2010 - v0.1 - created by Patrik Karlsson <patrik@cqure.net>
--

local match = require "match"
local nmap = require "nmap"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
_ENV = stdnse.module("giop", stdnse.seeall)

-- A bunch of constants
Constants = {

  SyncScope = {
    WITH_TARGET = 3,
  },

  ServiceContext = {
    CODESETS = 1,
    SENDING_CONTEXT_RUNTIME = 6,
    NEO_FIRST_SERVICE_CONTEXT = 1313165056,
  },

  ReplyStatus = {
    SYSTEM_EXCEPTION = 2,
  },

  VERSION_1_0 = 1,
  VERSION_1_2 = 0x0201,

  NAMESERVICE = "NameService\0",
}

Packet = {}

Packet.GIOP = {

  magic   = "GIOP",
  version = 0x0001,
  byte_order = 0,

  --- Creates a Packet.GIOP
  --
  -- @param msgtype number containing the message type
  -- @param data string containing the message data
  -- @return obj a new Packet.GIOP instance
  new = function( self, msgtype, data )
    local o = {}
    setmetatable(o, self)
    self.__index = self
    o.type = msgtype
    o.data = data
    o.size = data and #data or 0
    return o
  end,

  --- Converts the class to a string suitable to send over the socket
  --
  -- @return string containing the instance data
  __tostring = function( self )
    return self.magic .. string.pack("<I2BB>I4", self.version, self.byte_order, self.type, self.size) .. self.data
  end,

  --- Sets the packet version
  --
  -- @param version number containing the version to use
  setVersion = function( self, version ) self.version = version end,

  --- Receives the packet over the socket
  --
  -- @param socket containing the already connected socket
  -- @return status true on success, false on failure
  -- @return err containing the error message if status is false
  recv = function( self, socket )
    loc


import pytest

import libqtile.config
from libqtile import layout
from libqtile.confreader import Config
from test.layouts.layout_utils import assert_dimensions, assert_focus_path, assert_focused

class ZoomyConfig(Config):
    auto_fullscreen = True
    groups = [
        libqtile.config.Group("a"),
    ]
    layouts = [
        layout.Zoomy(columnwidth=200),
    ]
    floating_layout = libqtile.resources.default_config.floating_layout
    keys = []
    mouse = []
    screens = []

zoomy_config = pytest.mark.parametrize("manager", [ZoomyConfig], indirect=True)

@zoomy_config
def test_zoomy_one(manager):
    manager.test_window("one")
    assert_dimensions(manager, 0, 0, 600, 600)
    manager.test_window("two")
    assert_dimensions(manager, 0, 0, 600, 600)
    manager.test_window("three")
    assert_dimensions(manager, 0, 0, 600, 600)
    assert_focus_path(manager, "two", "one", "three")
    # TODO(pc) find a way to check size of inactive windows

@zoomy_config
def test_zoomy_window_focus_cycle(manager):
    # setup 3 tiled and two floating clients
    manager.test_window("one")
    manager.test_window("two")
    manager.test_window("float1")
    manager.c.window.toggle_floating()
    manager.test_window("float2")
    manager.c.window.toggle_floating()
    manager.test_window("three")

    # test preconditions, Zoomy adds clients at head
    assert manager.c.layout.info()["clients"] == ["three", "two", "one"]
    # last added window has focus
    assert_focused(manager, "three")

    # assert window focus cycle, according to order in layout
    assert_focus_path(manager, "two", "one", "float1", "float2", "three")


&utm_source=Application%3A+nextauth+%28ID%3A+151633%29)
**标语**：您的全方位 𝕏 增长平台
**介绍**：提升内容质量，快速吸引关注，获取更多𝕏粉丝。为品牌和创作者提供全面的工具，助力在X/Twitter上增长受众——无论是否使用AI。功能包括专注模式、自动草稿、发布日程、AI回复、信息流过滤、数据分析、内容策划等，更多实用功能尽在其中。
**产品网站**: [立即访问](https://www.producthunt.com/r/WNCNS4OOFCPKBK?utm_campaign=producthunt-api&utm_medium=api-v2&utm_source=Application%3A+nextauth+%28ID%3A+151633%29)
**Product Hunt**: [查看 Product Hunt 页面](https://www.producthunt.com/posts/snowball-700e3f06-2cd9-469e-a1f3-0bbf51a1136a?utm_campaign=producthunt-api&utm_medium=api-v2&utm_source=Application%3A+nextauth+%28ID%3A+151633%29)

![Snowball](https://ph-files.imgix.net/21717c01-ac66-4237-829c-0ae7852d9e08.png?auto=format&fit=crop&frame=1&h=512&w=1024)

**关键词**：-, 产品名称：Snowball, -, 标语：您的全能增长平台, -, 简述：更好地创作内容，快速互动，获得更多X/Twitter粉丝。提供品牌和创作者所需的所有工具，助力观众增长，支持AI或不依赖AI。专注模式、自动草稿、发布日程、AI回复、内容筛选、数据分析、内容规划等多种功能。, 关键词：内容创作，快速
**票数**: 🔺260
**是否精选**：是
**发布时间**：2025年01月03日 PM04:01 (北京时间)

---

## [5. Pie Menu](https://www.producthunt.com/posts/pie-menu?utm_campaign=producthunt-api&utm_medium=api-v2&utm_source=Application%3A+nextauth+%28ID%3A+151633%29)
**标语**：一个快捷方式可以通过径向菜单控制你所有的Mac应用程序。
**介绍**：Pie Menu 引入了一种革命性的方法，可以在所有 Mac 应用程序中节省时间。只需使用一个快捷键，即可在光标周围打开一个可自定义的径向菜单，专门为您使用的每个应用程序量身定制。
**产品网站**: [立即访问](https://www.producthunt.com/r/6MWYZ4LXR45NNE?utm_campaign=producthunt-api&utm_medium=api-v2&utm_source=Application%3A+nextauth+%28ID%3A+151633%29)
**Product Hunt**: [查看 Pro


censed 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 resolver

import (
	"fmt"

	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/apiserver/pkg/endpoints/openapi"
	"k8s.io/kube-openapi/pkg/common"
	"k8s.io/kube-openapi/pkg/validation/spec"
)

// DefinitionsSchemaResolver resolves the schema of a built-in type
// by looking up the OpenAPI definitions.
type DefinitionsSchemaResolver struct {
	defs     map[string]common.OpenAPIDefinition
	gvkToRef map[schema.GroupVersionKind]string
}

// NewDefinitionsSchemaResolver creates a new DefinitionsSchemaResolver.
// An example working setup:
// getDefinitions = "k8s.io/kubernetes/pkg/generated/openapi".GetOpenAPIDefinitions
// scheme         = "k8s.io/client-go/kubernetes/scheme".Scheme
func NewDefinitionsSchemaResolver(getDefinitions common.GetOpenAPIDefinitions, schemes ...*runtime.Scheme) *DefinitionsSchemaResolver {
	gvkToRef := make(map[schema.GroupVersionKind]string)
	namer := openapi.NewDefinitionNamer(schemes...)
	defs := getDefinitions(func(path string) spec.Ref {
		return spec.MustCreateRef(path)
	})
	for name := range defs {
		_, e := namer.GetDefinitionName(name)
		gvks := extensionsToGVKs(e)
		for _, gvk := range gvks {
			gvkToRef[gvk] = name
		}
	}
	return &DefinitionsSchemaResolver{
		gvkToRef: gvkToRef,
		defs:     defs,
	}
}

func (d *DefinitionsSchemaResolver) ResolveSchema(gvk schema.GroupVersionKind) (*spec.Schema, error) {
	ref, ok := d.gvkToRef[gvk]
	if !ok {
		return nil, fmt.Errorf("cannot resolve %v: %w", gvk, ErrSchemaNotFound)
	}
	s, err := PopulateRefs(func(ref string) (*spec.Schema, bool) {
		// find the schema by the ref string, and return a deep copy
		def, ok := d.defs[ref]
		if !ok {
			return nil, false
		}
		s := def.Schema
		return &s, true
	}, ref)
	if err != nil {
		return nil, err
	}
	return s, nil
}

func extensionsToGVKs(extensions spec.Extensions) []schema.GroupVersionKind {
	gvksAny, ok := extensions[extGVK]
	if !ok {
		return nil
	}
	gvks, ok := gvksAny.([]any)
	if !ok {
		return nil
	}
	result := make([]schema.GroupVersionKind, 0, len(gvks))
	for _, gvkAny := range gvks {
		// type check the map and all fields
		gvkMap, ok := gvkAny.(map[string]any)
		if !ok {
			return nil
		}
		g, ok := gvkMap["group"].(string)
		if !ok {
			return nil
		}
		v, ok := gvkMap["version"].(string)
		if !ok {
			return nil
		}
		k, ok := gvkMap["kind"].(string)
		if !ok {
			return nil
		}
		result = append(result, schema.GroupVersionKind{


ui.form.render('select', 'myForm');
            },
            computed: {
            },
            methods: {
                jump(url) {
                    jump(url)
                }
            }
        })

        layui.use(['layer', 'element', 'carousel', 'http', 'jquery', 'form', 'upload', 'laydate','tinymce'], function() {
            var layer = layui.layer;
            var element = layui.element;
            var carousel = layui.carousel;
            var http = layui.http;
            var jquery = layui.jquery;
            var form = layui.form;
            var upload = layui.upload;
            var laydate = layui.laydate;
            var tinymce = layui.tinymce;
            vue.baseUrl = http.baseurl

            localStorage.setItem("goUtl","./pages/kechengLiuyan/list.html")

            //var kechengId = http.getParam('kechengId');
            let kechengId = localStorage.getItem("kechengId")
            if(kechengId != null && kechengId != ""){
                //单个 课程查询
                initializationKecheng(kechengId);
            }
            //列表 课程查询
            initializationKechengList();
            //var yonghuId = http.getParam('yonghuId');
            let yonghuId = localStorage.getItem("yonghuId")
            if(yonghuId != null && yonghuId != ""){
                //单个 用户查询
                initializationYonghu(yonghuId);
            }
            //列表 用户查询
            initializationYonghuList();
            // 下拉框

           // 上传文件
            // 日期效验规则及格式
            dateTimePick();
            // 表单效验规则
            form.verify({
                // 正整数效验规则
                integer: [
                    /^[1-9][0-9]*$/
                    ,'必须是正整数'
                ]
                // 小数效验规则
                ,double: [
                    /^[1-9][0-9]{0,5}(\.[0-9]{1,2})?$/
                    ,'最大整数位为6为,小数最大两位'
                ]
            });

            // session独取
            let table = localStorage.getItem("userTable");
            http.request(table+"/session", 'get', {}, function (data) {
                // 表单赋值
                //form.val("myForm", data.data);
                // data = data.data;
                for (var key in data) {
                    vue.detail[table+"Id"] = data.id
                }
            });

            //修改
            if(http.getParam('kechengLiuyanId')){
                http.request(`kechengLiuyan/info/${http.getParam('kechengLiuyanId')}`, 'get', {}, function(data) {
                    vue.detail = data.data
                });
            }

            // 提交
            form.on('submit(thisSubmit)', function (data) {
                data = data.field;
                data["yonghuId"]= localStorage.getItem("userid");
                if(http.getParam('kechengLiuyanId')){
                    data["id"]= http.getParam('kechengLiuyanId')
                }
                // 提交数据
                http.requestJson(`kechengLiuyan/${http.getParam("kechengLiuyanId")?"update":"add"}`, 'post', data, function (res) {
                    if(res.code == 0){
                        layer.msg('提交成功', {
                            time: 2000,
                            icon: 6


::iter::traits::IntoIterator">IntoIterator,
    Self::Item: PartialOrd<<I as IntoIterator>::Item>,

1.5.0
[src]

Lexicographically compares the elements of this Iterator with those of another. Read more

fn eq<I>(self, other: I) -> bool where
    I: IntoIterator,
    Self::Item: PartialEq<<I as IntoIterator>::Item>,

1.5.0
<a class='srclink' href='https://doc.rust-lang.org/nightly/sr


场具有持久性，证毕。

**推论 1**: 集体记忆场形成的非局部网络可以解释集体无意识现象。

**推论 2**: 量子记忆场提供了灵魂层面的信息存储机制，与阿卡西记录有相似性。

## [理论复杂度评估]

本理论的复杂度可通过以下指标评估:

1. **实体复杂度**: 意识实体集合 $\mathcal{C}$ 的基数与多样性
2. **记忆状态复杂度**: 记忆状态空间 $\Theta$ 的维度
3. **场算子复杂度**: 量子场算子集 $\Phi$ 的多样性

总体复杂度评估:
$$\mathcal{O}(|\mathcal{C}| \times \dim(\Theta) \times |\Phi|)$$

## [理论演化轨迹分析]

本理论从灵魂分析动力学理论演化而来，通过以下路径:

1. 个体记忆机制 $\to$ 共享记忆结构 $\to$ 集体记忆场
2. 局部记忆存储 $\to$ 非局部记忆检索 $\to$ 量子记忆场
3. 简单记忆状态 $\to$ 复杂记忆网络 $\to$ 集体记忆场动力学

后续理论发展可能探索:
- 跨时空记忆信息传递
- 集体记忆与宇宙信息场的相互作用
- 异维度记忆存储与提取机制

## [实际应用与预测]

本理论可应用于以下领域:

1. 解释荣格集体无意识与原型现象
2. 提供超个体记忆现象的理论基础
3. 为异常心理现象提供量子理论解释
4. 发展基于量子原理的记忆增强技术

关键预测:

1. 共时性事件是集体量子记忆场的局部表现
2. 冥想与特定意识状态可以增强对集体记忆场的访问
3. 存在特定条件下可观测的集体记忆场效应
4. 某些特殊个体(敏感者)具有更强的记忆场访问能力 # SHIFT态序列理论的严格形式化描述 [维度: 1.0] v36.0

**[中文版] | [English Version](formal_theory_shift_state_sequence_en.md)**

**[返回首页](../README.md)**

## 目录

- [1. 核心理论](#1-核心理论)
  - [1.1 基本公理系统](#11-基本公理系统)
  - [1.2 SHIFT态序列的本质](#12-shift态序列的本质)
  - [1.3 序列系统的基本特性](#13-序列系统的基本特性)
  - [1.4 序列演化规则](#14-序列演化规则)
- [2. 直接推论](#2-直接推论)
  - [2.1 序列态的基本性质](#21-序列态的基本性质)
  - [2.2 序列的增长与转变特性](#22-序列的增长与转变特性)
  - [2.3 序列系统的模式与结构](#23-序列系统的模式与结构)
- [3. 扩展理


_STATE_CLOSED and switch2_prev_state ~= switch2_gpio_state) then
    switch2_prev_state = SWITCH_STATE_CLOSED
    --print("debug2 if 1")
    if (relay2_state == RELAY_STATE_OFF) then
      relay2_state = RELAY_STATE_ON
      --print("relay2_state = 1")
      send_to_visu(RELAY2_SID, relay2_gpio_state)
    elseif (relay2_state == RELAY_STATE_ON) then
      relay2_state = RELAY_STATE_OFF
      -- print("relay2_state = 0")
      send_to_visu(RELAY2_SID, relay2_gpio_state)
    end
  elseif (switch2_gpio_state == SWITCH_STATE_OPEN and switch2_prev_state ~= switch2_gpio_state) then
    switch2_prev_state = SWITCH_STATE_OPEN
    --print("debug2 if 2")
    if (relay2_state == RELAY_STATE_OFF) then
      relay2_state = RELAY_STATE_ON
      --print("relay2_state = 1")
      send_to_visu(RELAY2_SID, relay2_gpio_state)
    elseif (relay2_state == RELAY_STATE_ON) then
      relay2_state = RELAY_STATE_OFF
      -- print("relay2_state = 0")
      send_to_visu(RELAY2_SID, relay2_gpio_state)
    end
  end
  -- end switch2

  -- begin switching relays
  if (relay1_state == RELAY_STATE_ON) then
    if(INTERLOCK_ENABLED == true) then
      relay2_state = RELAY_STATE_OFF
    end
    if(DELAY_TIMER_ENABLED == true) then
      tmr.start(TMR_RELAY1_DELAY_ID)
    end
    relay1_switchOn()
    --print("switch relay1 on")
  end
  if (relay1_state == RELAY_STATE_OFF) then
    relay1_switchOff()
    --print("switch relay1 off")
  end

  if (relay2_state == RELAY_STATE_ON) then
    if(INTERLOCK_ENABLED == true) then
      relay1_state = RELAY_STATE_OFF
    end
    if(DELAY_TIMER_ENABLED == true) then
      tmr.start(TMR_RELAY2_DELAY_ID)
    end
    relay2_switchOn()
    --print("switch relay2 on")
  end
  if (relay2_state == RELAY_STATE_OFF) then
    relay2_switchOff()
    --print("switch relay2 off")
  end
  -- end switching relays

end) -- end actuator timer function


public static string gettablev1 = @"(message) => {
            var openrpadebug = false;

            let data = message.data;
            // if data is string, parse it to json
            if (typeof data === 'string') {
                data = JSON.parse(data);
            }

            if (openrpadebug) console.debug('gettablev1', data);
            const domTabe = document.evaluate(message.xPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
            if (domTabe == null) {
                console.error('Failed locating table', message.xPath);
                const test = JSON.parse(JSON.stringify(message));
                return test;
            }
            const GetFirst = (element, xpath, prop) => {
                let value = null;
                const node = document.evaluate(xpath, element, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
                if (node != null) {
                    value = node[prop];
                    if (value == null || value == '') value = '';
                    value = value.split('\r').join('').split('\t').join('').split('\n').join('').trim();
                }
                return value;
            }
            const GetFirstText = (element, xpath) => {
                return GetFirst(element, xpath, 'textContent');
            }

            let rowsxpath = data.rowsxpath && data.rowsxpath != '' ? data.rowsxpath : '';
            let cellsxpath = data.cellsxpath && data.cellsxpath != '' ? data.cellsxpath : '';
            let cellxpath = data.cellxpath && data.cellxpath != '' ? data.cellxpath : '';

            let headerrowsxpath = data.headerrowsxpath && data.headerrowsxpath != '' ? data.headerrowsxpath : '';
            let headerrowxpath = data.headerrowxpath && data.headerrowxpath != '' ? data.headerrowxpath : '';
            let headerrowindex = data.headerrowindex ? data.headerrowindex : 0;
            let skiptypecheck = data.skiptypecheck != null && data.skiptypecheck != '' ? data.skiptypecheck : false;
            let isGoogleSearch = false;

            if (domTabe.nodeName.toLowerCase() == 'table') {
                rowsxpath = rowsxpath != '' ? rowsxpath : '//tr';
                cellsxpath = cellsxpath != '' ? cellsxpath : `//*[local-name()='td' or local-name()='th']`;
                cellxpath = cellxpath != '' ? cellxpath : '';
                headerrowsxpath = headerrowsxpath != '' ? headerrowsxpath : cellsxpath;
                headerrowxpath = headerrowxpath != '' ? headerrowxpath : '';
            } else if (domTabe.nodeName.toLowerCase() == 'div') {
                // @ts-ignore
                if (domTabe.id == 'rso') {
                    isGoogleSearch = true;
                    headerrowindex = -1;
                    rowsxpath = `//div[contains(concat(' ', normalize-space(@class), ' '), ' g ')]`;
                    // rowsxpath = `/div`;
                } else {
                    if (rowsxpath == '' && GetFirstText(domTabe, `.//div[contains(@class, 'row')]`) != null) {
                        rowsxpath = `//div[contains(@class, 'row')]`;
                    } else if (rowsxpath == '' && GetFirstText(domTabe, `.//div[contains(@class, 'tableRow')]`) != null) {
                        rowsxpath = `//div[contains(@class, 'tableRow')]`;
                    } else if (rowsxpath == '' && GetFirstText(domTabe, `//div[contains(translate(@class, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),'row')]`) != null) {
                        r


_3 >= 10
#    define BOOST_PP_ITERATION_3 10
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 9 && BOOST_PP_ITERATION_START_3 >= 9
#    define BOOST_PP_ITERATION_3 9
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 8 && BOOST_PP_ITERATION_START_3 >= 8
#    define BOOST_PP_ITERATION_3 8
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 7 && BOOST_PP_ITERATION_START_3 >= 7
#    define BOOST_PP_ITERATION_3 7
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 6 && BOOST_PP_ITERATION_START_3 >= 6
#    define BOOST_PP_ITERATION_3 6
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 5 && BOOST_PP_ITERATION_START_3 >= 5
#    define BOOST_PP_ITERATION_3 5
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 4 && BOOST_PP_ITERATION_START_3 >= 4
#    define BOOST_PP_ITERATION_3 4
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 3 && BOOST_PP_ITERATION_START_3 >= 3
#    define BOOST_PP_ITERATION_3 3
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 2 && BOOST_PP_ITERATION_START_3 >= 2
#    define BOOST_PP_ITERATION_3 2
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 1 && BOOST_PP_ITERATION_START_3 >= 1
#    define BOOST_PP_ITERATION_3 1
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# if BOOST_PP_ITERATION_FINISH_3 <= 0 && BOOST_PP_ITERATION_START_3 >= 0
#    define BOOST_PP_ITERATION_3 0
#    include BOOST_PP_FILENAME_3
#    undef BOOST_PP_ITERATION_3
# endif
# /* **************************************************************************
#  *                                                                          *
#  *     (C) Copyright Paul Mensonides 2002.
#  *     Distributed under the Boost Software License, Version 1.0. (See
#  *     accompanying file LICENSE_1_0.txt or copy at
#  *     http://www.boost.org/LICENSE_1_0.txt)
#  *                                                                          *
#  ************************************************************************** */
#
# /* See http://www.boost.org for most recent version. */
#
# if defined(BOOST_PP_ITERATION_LIMITS)
#    if !defined(BOOST_PP_FILENAME_1)
#        error BOOST_PP_ERROR:  depth #1 filename is not defined
#    endif
#    define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS)
#    include <boost/preprocessor/iteration/detail/bounds/lower1.hpp>
#    define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS)
#    include <boost/preprocessor/iteration/detail/bo


ius, int time )
{
	CG_ExplosionEffects( origin, intensity, radius, time );
}

//------------------------------------------------------
int SFxHelper::GetOriginAxisFromBolt(const centity_t &cent, int modelNum, int boltNum, vec3_t /*out*/origin, vec3_t /*out*/axis[3])
{
	if ((cg.time-cent.snapShotTime) > 200)
	{ //you were added more than 200ms ago, so I say you are no longer valid/in our snapshot.
		return 0;
	}

	int doesBoltExist;
	mdxaBone_t 	boltMatrix;
	vec3_t	G2Angles = {cent.lerpAngles[0] , cent.lerpAngles[1], cent.lerpAngles[2]};
	if ( cent.currentState.eType == ET_PLAYER )
	{//players use cent.renderAngles
		VectorCopy( cent.renderAngles, G2Angles );

		if ( cent.gent //has a game entity
			&& cent.gent->s.m_iVehicleNum != 0 //in a vehicle
			&& cent.gent->m_pVehicle //have a valid vehicle pointer
			&& cent.gent->m_pVehicle->m_pVehicleInfo->type != VH_FIGHTER //it's not a fighter
			&& cent.gent->m_pVehicle->m_pVehicleInfo->type != VH_SPEEDER //not a speeder
			)
		{
			G2Angles[PITCH]=0;
			G2Angles[ROLL] =0;
		}
	}

	// go away and get me the bolt position for this frame please
	doesBoltExist = gi.G2API_GetBoltMatrix(cent.gent->ghoul2, modelNum,
		boltNum, &boltMatrix, G2Angles,
		cent.lerpOrigin, cg.time, cgs.model_draw,
		cent.currentState.modelScale);
	// set up the axis and origin we need for the actual effect spawning
	origin[0] = boltMatrix.matrix[0][3];
	origin[1] = boltMatrix.matrix[1][3];
	origin[2] = boltMatrix.matrix[2][3];

	axis[1][0] = boltMatrix.matrix[0][0];
	axis[1][1] = boltMatrix.matrix[1][0];
	axis[1][2] = boltMatrix.matrix[2][0];

	axis[0][0] = boltMatrix.matrix[0][1];
	axis[0][1] = boltMatrix.matrix[1][1];
	axis[0][2] = boltMatrix.matrix[2][1];

	axis[2][0] = boltMatrix.matrix[0][2];
	axis[2][1] = boltMatrix.matrix[1][2];
	axis[2][2] = boltMatrix.matrix[2][2];
	return doesBoltExist;
}/*
===========================================================================
Copyright (C) 2000 - 2013, Raven Software, Inc.
Copyright (C) 2001 - 2013, Activision, Inc.
Copyright (C) 2013 - 2015, OpenJK contributors

This file is part of the OpenJK source code.

OpenJK is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>.
===========================================================================
*/

// cg_text.c --

// this line must stay at top so the whole PCH thing works...
#include "cg_headers.h"

#include "cg_media.h"

//int precacheWav_i;	// Current high index of precacheWav array
//precacheWav_t precacheWav[MAX_PRECACHEWAV];

//int precacheText_i;	// Current high index of precacheText array
//precacheText_t precacheText[MAX_PRECACHETEXT];

extern vec4_t textcolor_caption;
extern vec4_t textcolor_center;


import random
from colorama import Fore, Back, Style, init
init(autoreset=True)

print(Fore.CYAN+"Welcome to the Find the Treasure Game")
player = input(Fore.YELLOW + "Please enter your name: ")
player=player.upper()

line1 = ["⬜","⬜","⬜"]
line2 = ["⬜","⬜","⬜"]
line3 = ["⬜","⬜","⬜"]

map=[line1,line2,line3]
print(f"{line1}\n{line2}\n{line3}")

abc=["A","B","C"]
randomletter=random.choice(abc)
randomnumber=random.randint(1,len(abc)-1)

treasure=randomletter+str(randomnumber)
letter=treasure[0]
letter_index=abc.index(letter)
number_index=int(treasure[1])-1

map[number_index][letter_index]="X"
print(Fore.CYAN + "\n-*--*--*--*--*--*--*--*--*--*-\n")

print(Fore.YELLOW + f"Lets find the treasure {player}!")
playerchoice=input(Fore.YELLOW + f"Hey {player} make a choice: (e.g., A1, C3)")
playerchoice=playerchoice.upper()
if playerchoice==randomletter+str(randomnumber):
    print(Fore.CYAN + "\n-*--*--*--*--*--*--*--*--*--*-\n")
    print(Fore.GREEN + f"YOU FIND IT! CONGRATULATIONS {player}!")
    print(f"{line1}\n{line2}\n{line3}")
    print(Fore.MAGENTA + f"Computer choice is: {randomletter + str(randomnumber)}")
else:
    print(Fore.CYAN + "\n-*--*--*--*--*--*--*--*--*--*-\n")
    print(Fore.RED + "TRY AGAIN!")
    print(Fore.YELLOW + f"Your choice is: {playerchoice}")
    print(f"{line1}\n{line2}\n{line3}")
    print(Fore.MAGENTA + f"Computer choice is: {randomletter + str(randomnumber)}")


ick] Next Page\n(" + QString::number(currentPage.last() + 1) + "/" + QString::number(pageCount) + ")";
    }
    painter.setPen(Qt::white);
    painter.drawText(centerCirclePosition, centerCirclePosition, centerCircleSize, centerCircleSize, Qt::AlignCenter, circleText);
}
//
//  sbc_decoder.c
//  sbccodec
//
//  Created by Peter Barrett on 9/9/14.
//  Copyright (c) 2014 Peter Barrett. All rights reserved.
//

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "sbc_decoder.h"

// about 2300 bytes in thumb2 -Os

//===========================================================================
//===========================================================================
// No joint stereo or 4 subband modes, no crc

uint8_t const SBC_BlockMode[] = {4,8,12,16};

// Appendix B, 12.8 Tables
static const int8_t SBC_offset4[4][4] = {
	{ -1, 0, 0, 0 },
	{ -2, 0, 0, 1 },
	{ -2, 0, 0, 1 },
	{ -2, 0, 0, 1 }
};

// Appendix B, 12.8 Tables
static const int8_t SBC_offset8[4][8] = {
	{ -2, 0, 0, 0, 0, 0, 0, 1 },
	{ -3, 0, 0, 0, 0, 0, 1, 2 },
	{ -4, 0, 0, 0, 0, 0, 1, 2 },
	{ -4, 0, 0, 0, 0, 0, 1, 2 }
};

const uint32_t SBC_syn_8[] = {
    0x0000B504,0xFFFF4AFB,0xFFFF4AFB,0x0000B504,0x0000B504,0xFFFF4AFB,0xFFFF4AFB,0x0000B504,
    0x00008E39,0xFFFF04EB,0x000031F1,0x0000D4DB,0xFFFF2B24,0xFFFFCE0E,0x0000FB14,0xFFFF71C6,
    0x000061F7,0xFFFF137C,0x0000EC83,0xFFFF9E08,0xFFFF9E08,0x0000EC83,0xFFFF137C,0x000061F7,
    0x000031F1,0xFFFF71C6,0x0000D4DB,0xFFFF04EB,0x0000FB14,0xFFFF2B24,0x00008E39,0xFFFFCE0E,
    0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
    0xFFFFCE0E,0x00008E39,0xFFFF2B24,0x0000FB14,0xFFFF04EB,0x0000D4DB,0xFFFF71C6,0x000031F1,
    0xFFFF9E08,0x0000EC83,0xFFFF137C,0x000061F7,0x000061F7,0xFFFF137C,0x0000EC83,0xFFFF9E08,
    0xFFFF71C6,0x0000FB14,0xFFFFCE0E,0xFFFF2B24,0x0000D4DB,0x000031F1,0xFFFF04EB,0x00008E39,
    0xFFFF4AFB,0x0000B504,0x0000B504,0xFFFF4AFB,0xFFFF4AFB,0x0000B504,0x0000B504,0xFFFF4AFB,
    0xFFFF2B24,0x000031F1,0x0000FB14,0x00008E39,0xFFFF71C6,0xFFFF04EB,0xFFFFCE0E,0x0000D4DB,
    0xFFFF137C,0xFFFF9E08,0x000061F7,0x0000EC83,0x0000EC83,0x000061F7,0xFFFF9E08,0xFFFF137C,
    0xFFFF04EB,0xFFFF2B24,0xFFFF71C6,0xFFFFCE0E,0x000031F1,0x00008E39,0x0000D4DB,0x0000FB14,
    0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000,
    0xFFFF04EB,0xFFFF2B24,0xFFFF71C6,0xFFFFCE0E,0x000031F1,0x00008E39,0x0000D4DB,0x0000FB14,
    0xFFFF137C,0xFFFF9E08,0x000061F7,0x0000EC83,0x0000EC83,0x000061F7,0xFFFF9E08,0xFFFF


(|tx| tx.calculate_work(&self.config))?;
        Ok(val?)
    }

    #[instrument(level = "debug", skip_all, err(Debug))]
    pub fn sync(&self, f: Option<Box<dyn Fn(SyncProgress)>>) -> Result<(), Error<SyncAllError>> {
        let val = self.db.transaction(|tx| tx.sync(&self.config, f))?;
        Ok(val?)
    }

    #[instrument(level = "debug", skip(self), err(Debug))]
    pub fn get_last_synced(&self) -> Result<i64, UnexpectedError> {
        Ok(self.db.last_synced.get(&OneKey {})?.unwrap_or(0))
    }

    #[instrument(level = "debug", skip(self), err(Debug))]
    pub fn get_last_synced_human_string(&self) -> Result<String, UnexpectedError> {
        let last_synced = self.db.last_synced.get(&OneKey {})?.unwrap_or(0);

        Ok(if last_synced != 0 {
            Duration::milliseconds(clock_service::get_time().0 - last_synced)
                .format_human()
                .to_string()
        } else {
            "never".to_string()
        })
    }

    #[instrument(level = "debug", skip(self), err(Debug))]
    pub fn get_usage(&self) -> Result<UsageMetrics, Error<GetUsageError>> {
        let val = self.db.transaction(|tx| tx.get_usage())?;
        Ok(val?)
    }

    #[instrument(level = "debug", skip(self), err(Debug))]
    pub fn get_uncompressed_usage(&self) -> Result<UsageItemMetric, Error<GetUsageError>> {
        let val = self
            .db
            .transaction(|tx| tx.get_uncompressed_usage(&self.config))?;
        Ok(val?)
    }

    #[instrument(level = "debug", skip(self), err(Debug))]
    pub fn get_drawing(&self, id: Uuid) -> Result<Drawing, Error<GetDrawingError>> {
        let val = self.db.transaction(|tx| tx.get_drawing(&self.config, id))?;
        Ok(val?)
    }

    #[instrument(level = "debug", skip(self, drawing_bytes), err(Debug))]
    pub fn save_drawing(
        &self, id: Uuid, drawing_bytes: &[u8],
    ) -> Result<(), Error<SaveDrawingError>> {
        let val = self
            .db
            .transaction(|tx| tx.save_drawing(&self.config, id, drawing_bytes))?;
        Ok(val?)
    }

    #[instrument(level = "debug", skip(self), err(Debug))]
    pub fn export_drawing(
        &self, id: Uuid, format: SupportedImageFormats,
        render_theme: Option<HashMap<ColorAlias, ColorRGB>>,
    ) -> Result<Vec<u8>, Error<ExportDrawingError>> {
        let val = self
            .db
            .transaction(|tx| tx.export_drawing(&self.config, id, format, render_theme))?;
        Ok(val?)
    }

    #[instrument(level = "debug", skip(self), err(Debug))]
    pub fn export_drawing_to_disk(
        &self, id: Uuid, format: SupportedImageFormats,
        render_theme: Option<HashMap<ColorAlias, ColorRGB>>, location: &str,
    ) -> Result<(), Error<ExportDrawingToDiskError>> {
        let val = self.db.transaction(|tx| {
            tx.export_drawing_to_disk(&self.config, id, format, render_theme, location)
        })?;
        Ok(val?)
    }

    #[instrument(level = "debug", skip(self, update_status), err(Debug))]
    pub fn import_files<F: Fn(Import


swapFactory, err := contracts.NewFactory(common.HexToAddress(address), client)
	if err != nil {
		return nil, err
	}
	return &SwapFactory{
		Address:      address,
		Client:       client,
		SwapContract: swapFactory,
		Farm:         farm,
	}, nil

}

//获取期望兑换的值
func (c *SwapFactory) WishExchange(amountIn *big.Int, fromToken, toToken string) ([]*big.Int, error) {
	return c.SwapContract.GetAmountsOut(&bind.CallOpts{}, amountIn, []common.Address{
		common.HexToAddress(fromToken),
		common.HexToAddress(toToken),
	})
}

func (c *SwapFactory) Calc(amountB *big.Int, slippage float64) *big.Int {
	minAmount := new(big.Float).SetInt(amountB)

	min := new(big.Float).Mul(minAmount, big.NewFloat(1.00-slippage))
	a := big.NewInt(0)
	res, _ := min.Int(a)
	return res
}
func (c *SwapFactory) PairRatio(tokenA, tokenB string) (*big.Float, *big.Float, error) {
	reserveA, reserveB, err := c.GetReserves(tokenA, tokenB)
	if err != nil {
		return nil, nil, err
	}

	amountA := utils.ToWei("100", int(c.Farm.TokenAInfo.Decimals))
	amountB, err := c.SwapContract.Quote(&bind.CallOpts{}, amountA, reserveA, reserveB)
	if err != nil {
		return nil, nil, err
	}
	realAmountA := utils.ToDecimal(amountA, int(c.Farm.TokenAInfo.Decimals))
	realAmountB := utils.ToDecimal(amountB, int(c.Farm.TokenBInfo.Decimals))
	realAmountAFloat, _ := realAmountA.Float64()
	realAmountBFloat, _ := realAmountB.Float64()

	total := new(big.Float).Add(realAmountA.BigFloat(), realAmountB.BigFloat())
	log.Println("realAmountA:" + realAmountA.String())
	log.Println("realAmountB:" + amountB.String())

	log.Println("total:" + total.String())
	reserveAPairRatio := new(big.Float).Quo(big.NewFloat(realAmountAFloat), total)
	reserveBPairRatio := new(big.Float).Quo(big.NewFloat(realAmountBFloat), total)
	return reserveBPairRatio, reserveAPairRatio, nil
}

func (c *SwapFactory) TokenBPairAmount(tokenA, tokenB string, amountA *big.Int) (*big.Int, error) {
	reserveA, reserveB, err := c.GetReserves(tokenA, tokenB)
	if err != nil {
		return nil, err
	}
	minB, err := c.SwapContract.Quote(&bind.CallOpts{}, amountA, reserveA, reserveB)
	if err != nil {
		return nil, nil
	}
	return minB, nil
}

func (c *SwapFactory) TokenAPairAmount(tokenA, tokenB string, amountB *big.Int) (*big.Int, error) {
	reserveA, reserveB, err := c.GetReserves(tokenA, tokenB)
	if err != nil {
		return nil, err
	}

	minB, err := c.SwapContract.Quote(&bind.CallOpts{}, amountB, reserveB, reserveA)
	if err != nil {
		return nil, nil
	}
	return minB, nil
}

func (c *SwapFactory) GetReserves(tokenA, tokenB string) (*big.Int, *big.Int, error) {
	reserves, err := c.SwapContract.GetReserves(&bind.CallOpts{}, common.HexToAddress(tokenA), common.HexToAddress(


="u222" class="ax_default flow_shape">

开始签约

录入详细的房源信息

、租金，提交房东审核

审核房源信息

是否有误


from %7B opacity: 0; %7D 20%25 %7B opacity: 1; %7D to %7B transform: translateY(90px); %7D %7D %3C/style%3E%3C/svg%3E%0A")}@media (prefers-reduced-motion){.s-modal.s-modal__celebration .s-modal--dialog{background-image:url("data:image/svg+xml,%3Csvg width='574' height='60' viewBox='0 0 574 60' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect opacity='0.8' x='27.1224' y='20.0458' width='5' height='13' transform='rotate(-139 27.1224 20.0458)' fill='%23F23B14'/%3E%3Crect opacity='0.8' x='118.478' y='7.00201' width='5' height='13' transform='rotate(-38.8114 118.478 7.00201)' fill='%23FBBA23'/%3E%3Crect opacity='0.8' x='504.616' y='25.4479' width='5' height='13' transform='rotate(-60.2734 504.616 25.4479)' fill='%23F23B14'/%3E%3Crect opacity='0.6' x='538.983' y='45.555' width='5' height='13' transform='rotate(16.7826 538.983 45.555)' fill='%232A2F6A'/%3E%3Crect opacity='0.3' x='470.322' y='2.63625' width='5' height='13' transform='rotate(11.295 470.322 2.63625)' fill='%2333AAFF'/%3E%3Crect opacity='0.3' x='190.295' y='4.58138' width='5' height='13' transform='rotate(27.5954 190.295 4.58138)' fill='%23F23B14'/%3E%3Crect opacity='0.8' x='234.303' y='16.3233' width='5' height='13' transform='rotate(-41.8233 234.303 16.3233)' fill='%2365BB5C'/%3E%3Crect opacity='0.6' x='369.702' y='40.9875' width='5' height='13' transform='rotate(-56.419 369.702 40.9875)' fill='%2333AAFF'/%3E%3Crect opacity='0.3' x='402.121' y='31.0848' width='5' height='13' transform='rotate(-17.9234 402.121 31.0848)' fill='%23F23B14'/%3E%3Crect opacity='0.6' x='200.316' y='31.9328' width='5' height='13' transform='rotate(-15.8896 200.316 31.9328)' fill='%232A2F6A'/%3E%3Crect opacity='0.6' x='69.6745' y='23.4725' width='6' height='10' transform='rotate(70.0266 69.6745 23.4725)' fill='%2365BB5C'/%3E%3Crect opacity='0.6' x='291.945' y='7.16931' width='6' height='10' transform='rotate(30.4258 291.945 7.16931)' fill='%23FBBA23'/%3E%3Crect opacity='0.3' x='33.7754' y='38.2208' width='6' height='10' transform='rotate(38.6056 33.7754 38.2208)' fill='%23FBBA23'/%3E%3Crect opacity='0.8' x='109.752' y='31.1743' width='6' height='10' transform='rotate(28.5296 109.752 31.1743)' fill='%2333AAFF'/%3E%3Crect opacity='0.3' x='278.081' y='37.8695' width='6' height='10' transform='rotate(-26.5651 278.081 37.8695)' fill='%23F23B14'/%3E%3Crect opacity='0.8' x='416.294' y='11.5573' width='6' height='10' transform='rotate(-22.8498 416.294 11.5573)' fill='%23FBBA23'/%3E%3Crect opacity='0.3' x='354.667


ers
        resetHidingRefHint();
        link.removeEventListener("mouseleave", startHidingRefHint);
        link.removeEventListener("mouseenter", resetHidingRefHint);
        link.removeEventListener("blur", startHidingRefHint);
        link.removeEventListener("focus", resetHidingRefHint);
        refHint.removeEventListener("mouseleave", startHidingRefHint);
        refHint.removeEventListener("mouseenter", resetHidingRefHint);
        refHint.removeEventListener("blur", startHidingRefHint);
        refHint.removeEventListener("focus", resetHidingRefHint);
    };
}

function positionRefHint(refHint) {
    const link = refHint.forLink;
    const linkPos = getBounds(link);
    refHint.style.top = linkPos.bottom + "px";
    refHint.style.left = linkPos.left + "px";

    const panelPos = refHint.getBoundingClientRect();
    const panelMargin = 8;
    const maxRight = document.body.parentNode.clientWidth - panelMargin;
    if (panelPos.right > maxRight) {
        const overflowAmount = panelPos.right - maxRight;
        const newLeft = Math.max(panelMargin, linkPos.left - overflowAmount);
        refHint.style.left = newLeft + "px";
    }
}

// TODO: shared util
// Returns the root-level absolute position {left and top} of element.
function getBounds(el, relativeTo=document.body) {
    const relativeRect = relativeTo.getBoundingClientRect();
    const elRect = el.getBoundingClientRect();
    const top = elRect.top - relativeRect.top;
    const left = elRect.left - relativeRect.left;
    return {
        top,
        left,
        bottom: top + elRect.height,
        right: left + elRect.width,
    }
}

function showRefHintListener(e) {
    // If the target isn't in a link (or is a link),
    // just ignore it.
    let link = e.target.closest("a");
    if(!link) return;

    // If the target is in a ref-hint panel
    // (aka a link in the already-open one),
    // also just ignore it.
    if(link.closest(".ref-hint")) return;

    // Otherwise, show the panel for the link.
    showRefHint(link);
}

function hideAllHintsListener(e) {
    // If the click is inside a ref-hint panel, ignore it.
    if(e.target.closest(".ref-hint")) return;
    // Otherwise, close all the current panels.
    hideAllRefHints();
}

document.addEventListener("DOMContentLoaded", () => {
    document.body.addEventListener("mousedown", showRefHintListener);
    document.body.addEventListener("focus", showRefHintListener);

    document.body.addEventListener("click", hideAllHintsListener);
});

window.addEventListener("resize", () => {
    // Hide any open ref hint.
    hideAllRefHints();
});
}
</script><!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <title>Foo</title>
  <link href="http://example.com/foo" rel="canonical">
  <meta content="dark light" name="color-scheme">
<style>/* Boilerplate: style-autolinks */
.css.css, .property.property, .descriptor.descriptor {
    color: var(--a-normal-text);
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */


  auto rack = (SceNgs2Handle_rack*)rh;

  auto freeHandler = rack->parent->alloc.freeHandler;

  int32_t ret = Ok;

  for (auto voice: rack->voices) {
    getPimpl()->handles.erase(&voice.second);
  }

  getPimpl()->handles.erase(rh);
  if (freeHandler != nullptr) {
    SceNgs2ContextBufferInfo cbi = {
        .hostBuffer     = rack,
        .hostBufferSize = sizeof(SceNgs2Handle_rack),
    };
    rack->~SceNgs2Handle_rack();
    ret = freeHandler(&cbi);
  } else
    rack->~SceNgs2Handle_rack();

  return ret;
}

EXPORT SYSV_ABI int32_t sceNgs2SystemDestroy(SceNgs2Handle* sysh, SceNgs2ContextBufferInfo* cbi) {
  if (sysh == nullptr) return Err::Ngs2::INVALID_SYSTEM_HANDLE;
  boost::unique_lock lock(MUTEX_INT);

  auto system = (SceNgs2Handle_system*)sysh;
  getPimpl()->handles.erase(system);

  auto freeHandler = system->alloc.freeHandler;

  int32_t ret = Ok;
  if (freeHandler != nullptr) {
    SceNgs2ContextBufferInfo cbi = {
        .hostBuffer     = system,
        .hostBufferSize = sizeof(SceNgs2Handle_system),
    };
    system->~SceNgs2Handle_system();
    ret = freeHandler(&cbi);
  } else
    system->~SceNgs2Handle_system();

  return ret;
}
}
#include "codes.h"
#include "common.h"
#include "logging.h"
#include "types.h"

LOG_DEFINE_MODULE(libSceSaveDataDialog);

namespace {
static SceCommonDialogStatus g_curStatus = SceCommonDialogStatus::NONE;
} // namespace

extern "C" {

EXPORT const char* MODULE_NAME = "libSceSaveDataDialog";

EXPORT SYSV_ABI int32_t sceSaveDataDialogInitialize() {
  g_curStatus = SceCommonDialogStatus::INITIALIZED;
  return Ok;
}

EXPORT SYSV_ABI int32_t sceSaveDataDialogTerminate(void) {
  g_curStatus = SceCommonDialogStatus::NONE;
  return Ok;
}

EXPORT SYSV_ABI SceCommonDialogStatus sceSaveDataDialogUpdateStatus(void) {
  return g_curStatus;
}

EXPORT SYSV_ABI SceCommonDialogStatus sceSaveDataDialogGetStatus(void) {
  return g_curStatus;
}

EXPORT SYSV_ABI int32_t sceSaveDataDialogGetResult(SceSaveDataDialogResult* result) {
  LOG_USE_MODULE(libSceSaveDataDialog);
  LOG_DEBUG(L"todo %S", __FUNCTION__);
  result->result = Ok;
  return Ok;
}

EXPORT SYSV_ABI int32_t sceSaveDataDialogOpen(const SceSaveDataDialogParam* param) {
  g_curStatus = SceCommonDialogStatus::FINISHED;
  return Ok;
}

EXPORT SYSV_ABI int32_t sceSaveDataDialogClose(const SceSaveDataDialogCloseParam* closeParam) {
  g_curStatus = SceCommonDialogStatus::FINISHED;
  return Ok;
}

EXPORT SYSV_ABI int32_t sceSaveDataDialogProgressBarInc(SceSaveDataDialogProgressBarTarget target, uint32_t delta) {
  LOG_USE_MODULE(libSceSaveDataDialog);
  LOG_


e={},++o}return j3(e)?{}:{obj:e,k:_3(r[o])}},D3=(e,t,n)=>{const{obj:r,k:o}=zr(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],i=t.slice(0,t.length-1),c=zr(e,i,Object);for(;c.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),c=zr(e,i,Object),c!=null&&c.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n},FE=(e,t,n,r)=>{const{obj:o,k:a}=zr(e,t,Object);o[a]=o[a]||[],o[a].push(n)},Wo=(e,t)=>{const{obj:n,k:r}=zr(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},UE=(e,t,n)=>{const r=Wo(e,n);return r!==void 0?r:Wo(t,n)},m8=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?X(e[r])||e[r]instanceof String||X(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):m8(e[r],t[r],n):e[r]=t[r]);return e},P0=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var BE={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const $E=e=>X(e)?e.replace(/[&<>"'\/]/g,t=>BE[t]):e;class GE{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const KE=[" ",",","?","!",";"],WE=new GE(20),qE=(e,t,n)=>{t=t||"",n=n||"";const r=KE.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=WE.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(e);if(!a){const i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a},dc=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,c="";for(let s=a;s<r.length;++s)if(s!==a&&(c+=n),c+=r[s],i=o[c],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&s<r.length-1)continue;a+=s-a+1;break}o=i}return o},qo=e=>e==null?void 0:e.replace("_","-"),YE={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e


.GetAgentPopupCount(ctx, uid, req.GetBotID(), agentPopupType)
		if err != nil {
			return nil, err
		}

		agentPopupCountInfo[agentPopupType] = count
	}

	return &playground.GetBotPopupInfoResponse{
		Data: &playground.BotPopupInfoData{
			BotPopupCountInfo: agentPopupCountInfo,
		},
	}, nil
}

func (s *SingleAgentApplicationService) UpdateAgentPopupInfo(ctx context.Context, req *playground.UpdateBotPopupInfoRequest) (*playground.UpdateBotPopupInfoResponse, error) {
	uid := ctxutil.MustGetUIDFromCtx(ctx)

	err := s.DomainSVC.IncrAgentPopupCount(ctx, uid, req.GetBotID(), req.GetBotPopupType())
	if err != nil {
		return nil, err
	}

	return &playground.UpdateBotPopupInfoResponse{
		Code: 0,
		Msg:  "success",
	}, nil
}

func (s *SingleAgentApplicationService) GetPublishConnectorList(ctx context.Context, req *developer_api.PublishConnectorListRequest) (*developer_api.PublishConnectorListResponse, error) {
	data, err := s.DomainSVC.GetPublishConnectorList(ctx, req.BotID)
	if err != nil {
		return nil, err
	}

	return &developer_api.PublishConnectorListResponse{
		PublishConnectorList: data.PublishConnectorList,
		Code:                 0,
		Msg:                  "success",
	}, nil
}

type publishFn func(ctx context.Context, appContext *ServiceComponents, publishInfo *entity.SingleAgentPublish, agent *entity.SingleAgent) (*entity.SingleAgent, error)

func publishAgentVariables(ctx context.Context, appContext *ServiceComponents, publishInfo *entity.SingleAgentPublish, agent *entity.SingleAgent) (*entity.SingleAgent, error) {
	draftAgent := agent
	if draftAgent.VariablesMetaID == nil || *draftAgent.VariablesMetaID == 0 {
		return draftAgent, nil
	}

	var newVariableMetaID int64
	newVariableMetaID, err := appContext.VariablesDomainSVC.PublishMeta(ctx, *draftAgent.VariablesMetaID, publishInfo.Version)
	if err != nil {
		return nil, err
	}

	draftAgent.VariablesMetaID = ptr.Of(newVariableMetaID)

	return draftAgent, nil
}

func publishAgentPlugins(ctx context.Context, appContext *ServiceComponents, publishInfo *entity.SingleAgentPublish, agent *entity.SingleAgent) (*entity.SingleAgent, error) {
	err := appContext.PluginDomainSVC.PublishAgentTools(ctx, agent.AgentID, publishInfo.Version)
	if err != nil {
		return nil, err
	}

	return agent, nil
}

func publishShortcutCommand(ctx context.Context, appContext *ServiceComponents, publishInfo *entity.SingleAgentPublish, agent *entity.SingleAgent) (*entity.SingleAgent, error) {
	logs.CtxInfof(ctx, "publishShortcutCommand agentID: %d, shortcutCommand: %v", agent.AgentID, agent.ShortcutCommand)
	if agent.ShortcutCommand == nil || len(agent.ShortcutCommand) == 0 {
		return agent, nil
	}
	cmdIDs := slices.Transform(agent.ShortcutCommand, func(a string) int64 {
		return conv.StrToInt64D(a, 0)
	})
	err := appContext.ShortcutCMDDomainSVC.PublishCMDs(ctx, agent.AgentID, cmdIDs)
	if err != nil {
		return nil, err
	}

	return agent, nil
}

func publishDatabase(ctx context.Context, appContext *ServiceComponents, publishInfo *entity.SingleAgentPublish, agent *entity.SingleAgent) (*entity.SingleAgent, error) {


header, trailer)
	local authtag = crypted:sub(#crypted-32+1) -- 32 last bytes
	assert(authtag == hextos [[
		D1 F2 FA 33 05 A3 23 76 E2 3A 61 D1 C9 89 30 3F
		BF BD 93 5A A5 5B 17 E4 E7 25 47 33 C4 73 40 8E
		]])
	local p = assert(norx.aead_decrypt(key, nonce, crypted, header, trailer))
	--print'---plain'; print(stohex(p, 16))
	assert(#crypted == #plain + 32)
	assert(p == plain)
	--
	-- test proper block handling and padding  for various input sizes
	for i = 1, 66 do
		plain = ('p'):rep(i)
		crypted = norx.aead_encrypt(key, nonce, plain)
		assert(#crypted == #plain + 32)
		assert(norx.aead_decrypt(key, nonce, crypted) == plain)
	end
	--
	-- test against AD handling issues
	plain = ('p'):rep(65)
	for i = 1, 9 do
		a = ('A'):rep(i) -- AD prefix
		for j = 1, 9 do
			z = ('Z'):rep(i) -- AD suffix
			crypted = norx.aead_encrypt(key, nonce, plain, a, z)
			assert(#crypted == #plain + 32)
			assert(norx.aead_decrypt(key, nonce, crypted, a, z) == plain)
		end
	end
	--
end --test_norx()

test_norx()

print("test_norx: ok")


: 1;
  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; }

.icon-weibo:before {
  content: "\e900"; }

.icon-mark-github:before {
  content: "\f00a"; }

.icon-pencil:before {
  content: "\f058"; }

.icon-codepen:before {
  content: "\eae4"; }

/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
 * 1. Set default font family to sans-serif.
 * 2. Prevent iOS and IE text size adjust after device orientation change,
 *    without disabling user zoom.
 */
html {
  font-family: sans-serif;
  /* 1 */
  -ms-text-size-adjust: 100%;
  /* 2 */
  -webkit-text-size-adjust: 100%;
  /* 2 */ }

/**
 * Remove default margin.
 */
body {
  margin: 0; }

/* HTML5 display definitions
   ========================================================================== */
/**
 * Correct `block` display not defined for any HTML5 element in IE 8/9.
 * Correct `block` display not defined for `details` or `summary` in IE 10/11
 * and Firefox.
 * Correct `block` display not defined for `main` in IE 11.
 */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
  display: block; }

/**
 * 1. Correct `inline-block` display not defined in IE 8/9.
 * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
 */
audio,
canvas,
progress,
video {
  display: inline-block;
  /* 1 */
  vertical-align: baseline;
  /* 2 */ }

/**
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */
audio:not([controls]) {
  display: none;
  height: 0; }

/**
 * Address `[hidden]` styling not present in IE 8/9/10.
 * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
 */
[hidden],
template {
  display: none; }

/* Links
   ========================================================================== */
/**
 * Remove the gray background color from active links in IE 10.
 */
a {
  background-color: transparent; }

/**
 * Improve readability of focused elements when they are also in an
 * active/hover state.
 */
a:active,
a:hover {
  outline: 0; }

/* Text-level semantics
   ========================================================================== */
/**
 * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
 */
abbr[title] {
  border-bottom: 1px dotted; }

/**
 * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
 */
b,
strong {
  font-weight: bold; }

/**
 * Address styling not present in Safari and Chrome.
 */
dfn {
  font-style: italic; }

/**
 * Address variable `h1` font-size and margin within `section` and `article`
 * contexts in Firefox 4+, Safari, and Chrome.
 */
h1 {
  font-size: 2em;
  margin: 0.67em 0; }

/**
 * Address styling not present in IE 8/9.
 */
mark {
  background: #ff0;
  color: #000; }

/**


, 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.

use algo_support;
use bytes::BytesMut;
use codec::{full_codec, FullCodec};
use crypto::aes::{ctr, KeySize};
use error::SecioError;
use futures::Future;
use futures::future;
use futures::sink::Sink;
use futures::stream::Stream;
use keys_proto::{KeyType as KeyTypeProtobuf, PublicKey as PublicKeyProtobuf};
use protobuf::Message as ProtobufMessage;
use protobuf::core::parse_from_bytes as protobuf_parse_from_bytes;
use ring::{agreement, digest, rand};
use ring::agreement::EphemeralPrivateKey;
use ring::hmac::{SigningContext, SigningKey, VerificationKey};
use ring::rand::SecureRandom;
use ring::signature::{RSAKeyPair, RSASigningState, RSA_PKCS1_2048_8192_SHA256, RSA_PKCS1_SHA256};
use ring::signature::verify as signature_verify;
use std::cmp::{self, Ordering};
use std::io::{Error as IoError, ErrorKind as IoErrorKind};
use std::mem;
use std::sync::Arc;
use structs_proto::{Exchange, Propose};
use tokio_io::{AsyncRead, AsyncWrite};
use tokio_io::codec::length_delimited;
use untrusted::Input as UntrustedInput;

/// Performs a handshake on the given socket.
///
/// This function expects that the remote is identified with `remote_public_key`, and the remote
/// will expect that we are identified with `local_public_key`. Obviously `local_private_key` must
/// be paired with `local_public_key`. Any mismatch somewhere will produce a `SecioError`.
///
/// On success, returns an object that implements the `Sink` and `Stream` trait whose items are
/// buffers of data, plus the public key of the remote.
pub fn handshake<'a, S: 'a>(
    socket: S,
    local_public_key: Vec<u8>,
    local_private_key: Arc<RSAKeyPair>,
) -> Box<Future<Item = (FullCodec<S>, Vec<u8>), Error = SecioError> + 'a>
where
    S: AsyncRead + AsyncWrite,
{
    // TODO: could be rewritten as a coroutine once coroutines land in stable Rust

    // This struct contains the whole context of a handshake, and is filled progressively
    // throughout the various parts of the handshake.
    struct HandshakeContext {
        // Filled with this function's parameters.
        local_public_key: Vec<u8>,
        local_private_key: Arc<RSAKeyPair>,

        rng: rand::SystemRandom,
        // Locally-generated random number. The array size can be changed without any repercussion.
        local_nonce: [u8; 16],

        // Our local proposition's raw bytes.
        local_public_key_in_protobuf_bytes: Vec<u8>,
        local_proposition_bytes: Vec<u8>,

        // The remote proposition's raw bytes.
        remote_proposition_bytes: BytesMut,
        remote_public_key_in_protobuf_bytes: Vec<u8>,
        remote_public_key: Vec<u8>,

        // The remote peer's version of `local_nonce`.
        // If the NONCE size is actually part of the protocol, we can change this to a fixed-size
        // array instead of a `Vec`.
        remote_nonce: Vec<u8>,

        // Set to `ordering(
        //             hash(concat(remote


TestData.accountContext,
              ),
            ),
          ),
        );
        await tester.pumpAndSettle();

        expect(find.text("アカウント情報（リモート）"), findsOneWidget);
        expect(find.text("ノート（リモート）"), findsOneWidget);
      });
    });

    group("アカウント情報", () {
      group("他人のアカウント", () {
        testWidgets("フォローされている場合、フォローされていることが表示されること", (tester) async {
          final mockMisskey = MockMisskey();
          final mockUser = MockMisskeyUsers();
          when(mockMisskey.users).thenReturn(mockUser);
          when(mockUser.show(any)).thenAnswer(
            (_) async => TestData.usersShowResponse2.copyWith(isFollowed: true),
          );

          await tester.pumpWidget(
            ProviderScope(
              overrides: [
                misskeyProvider.overrideWith((ref, account) => mockMisskey),
              ],
              child: DefaultRootWidget(
                initialRoute: UserRoute(
                  userId: TestData.usersShowResponse2.id,
                  accountContext: TestData.accountContext,
                ),
              ),
            ),
          );
          await tester.pumpAndSettle();

          expect(find.text("フォローされています"), findsOneWidget);
        });
        testWidgets("フォローされていない場合、フォローされている表示がされないこと", (tester) async {
          final mockMisskey = MockMisskey();
          final mockUser = MockMisskeyUsers();
          when(mockMisskey.users).thenReturn(mockUser);
          when(mockUser.show(any)).thenAnswer(
            (_) async =>
                TestData.usersShowResponse2.copyWith(isFollowed: false),
          );

          await tester.pumpWidget(
            ProviderScope(
              overrides: [
                misskeyProvider.overrideWith((ref, account) => mockMisskey),
              ],
              child: DefaultRootWidget(
                initialRoute: UserRoute(
                  userId: TestData.usersShowResponse2.id,
                  accountContext: TestData.accountContext,
                ),
              ),
            ),
          );
          await tester.pumpAndSettle();

          expect(find.text("フォローされています"), findsNothing);
        });
        testWidgets("フォローしている場合、フォロー解除のボタンが表示されること", (tester) async {
          final mockMisskey = MockMisskey();
          final mockUser = MockMisskeyUsers();
          when(mockMisskey.users).thenReturn(mockUser);
          when(mockUser.show(any)).thenAnswer(
            (_) async =>
                TestData.usersShowResponse2.copyWith(isFollowing: true),
          );

          await tester.pumpWidget(
            ProviderScope(
              overrides: [
                misskeyProvider.overrideWith((ref, account) => mockMisskey),
              ],
              child: DefaultRootWidget(
                initialRoute: UserRoute(
                  userId: TestData.usersShowResponse2.id,
                  accountContext: TestData.accountContext,
                ),
              ),
            ),
          );
          await tester.pumpAndSettle();

          expect(find.text("フォロー解除"), findsOneWidget);
        });
        testWidgets("フォローしていない場合でフォロー申請が必要ない場合、フォローするのボタンが表示されること", (
          tester,
        ) async {
          final mockMisskey = MockMisskey();
          final mockUser = MockMisskeyUsers();
          when(mockMisskey.users).thenReturn(mockUser);
          when(mockUser.show(any)).thenAnswer(
            (_) async => TestData.usersShowResponse2.copyWith(
              isFollowing: false,


sion.
   * @returns {string} Version.
   */
  getVersion(): string;
  /**
   * Get task Description.
   * @returns {string} Description.
   */
  getDescription(): string;
}

export = ITask;import { Client, Message, TextChannel } from "discord.js";

const help = {
    name: "purge",
    description: "Removes the specified ammount of messages from the current channel. Note: Messages over 14 days cannot be deleted. **Admin only**",
    usage: "[#number(0-100)]",
    moderatorOnly: true,
    adminOnly: false
}

async function run(client: Client, message: Message, args: string[]) {
    if (!message.guild) return;
    if (!message.member?.hasPermission('BAN_MEMBERS')) return;
    if (!args.length) return message.channel.send('Please specify how many messages to delete (Max: 100).').catch(() => undefined);
    let count: number = parseInt(args[0]);
    if (count === NaN) return;
    if (count < 0) return;
    if (count > 100) count = 100;
    try {
        await (message.channel as TextChannel).bulkDelete(count);
        message.channel.send(`Deleted ${count} messages`).catch(() => undefined);
    }
    catch(err) {
        return message.channel.send(`Error deleting messages: ${err.message}`).catch(() => undefined);
    }
}

export { run, help };import {
    BaseEnvironment,
    Observation,
    Reward,
    Action,
    Terminal,
    BaseAgent,
} from "./rl_base";
import { RLGlue } from './rl_glue';
import * as math from 'mathjs';
import { type } from "jquery";
import {Layer, mat_mul, Grads} from './td_nn'
import {BaseOptimizer} from './optimizer'
import * as d3 from 'd3';

function broadcast_add(matrix, vector) {
    return math.matrix(d3.range(matrix.size()[0]).map( i => {
        return (math.add(row(matrix, i), math.flatten(vector)) as math.Matrix).toJSON().data;
    }))
}

function sum_across_col(matrix) {
    return math.matrix(
        [d3.range(matrix.size()[1]).map(i => {
            return math.sum(get_col(matrix, i))
        })])
}

export class ActionValueNetwork {
    state_dim: number
    num_hidden_units: number
    num_actions: number
    layer_sizes: number[]
    weights: Layer[];

    constructor(network_config) {
        this.state_dim = network_config.state_dim;
        this.num_hidden_units = network_config.num_hidden_units;
        this.num_actions = network_config.num_actions;
        this.layer_sizes= [this.state_dim, this.num_hidden_units, this.num_actions]

        this.weights = new Array(this.layer_sizes.length - 1);

        for (let i = 0; i < this.weights.length; i++) {
            let inputs = this.layer_sizes[i];
            let outputs = this.layer_sizes[i + 1]
            let W = this.random_matrix(inputs, outputs);
            let b = math.matrix(math.zeros([1, outputs]));
            this.weights[i] = {
                W: W,
                b: b
            }
        }
    }

    random_matrix(rows, cols){
        return  math.matrix(d3.range(rows).map(function(){
            return d3.range(cols).map(function(){return -1 + Math.random()* 2});
          }));
    }

    get_action_values(s: math.Matrix) {
        let layer0 = this.weights[0];
        let layer1 = this.weights[1];
        let dot_prod = mat_mul(s


for a syntax highlighting token.
 * @author Akash Yadav
 */
data class HighlightToken(var range: Range, var kind: HighlightTokenKind)

enum class HighlightTokenKind {

  // Common
  TEXT_NORMAL,

  // Java and Gradle
  KEYWORD,
  COMMENT,
  OPERATOR,
  LITERAL,
  LOCAL_VARIABLE,
  RESOURCE_VARIABLE,
  PARAMETER,
  EXCEPTION_PARAMETER,
  TYPE_PARAMETER,
  FIELD,
  STATIC_FIELD,
  ENUM,
  TYPE_NAME,
  ENUM_TYPE,
  INTERFACE,
  METHOD_DECLARATION,
  METHOD_INVOCATION,
  CONSTRUCTOR,
  ANNOTATION,
  STATIC_INIT,
  INSTANCE_INIT,
  PACKAGE_NAME,

  // XML
  TAG_NAME,
  NAMESPACE,
  ATTRIBUTE_NAME,
  ATTRIBUTE_VALUE
}
/*
 * Copyright 2020 The Android Open Source Project
 *
 * 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.
 */

package com.example.jetcaster.core.data.database.dao

import androidx.room.Dao
import androidx.room.Query
import androidx.room.Transaction
import com.example.jetcaster.core.data.database.model.Episode
import com.example.jetcaster.core.data.database.model.EpisodeToPodcast
import kotlinx.coroutines.flow.Flow

/**
 * [Room] DAO for [Episode] related operations.
 */
@Dao
abstract class EpisodesDao : BaseDao<Episode> {

    @Query(
        """
        SELECT * FROM episodes WHERE uri = :uri
        """,
    )
    abstract fun episode(uri: String): Flow<Episode>

    @Transaction
    @Query(
        """
        SELECT episodes.* FROM episodes
        INNER JOIN podcasts ON episodes.podcast_uri = podcasts.uri
        WHERE episodes.uri = :episodeUri
        """,
    )
    abstract fun episodeAndPodcast(episodeUri: String): Flow<EpisodeToPodcast>

    @Transaction
    @Query(
        """
        SELECT * FROM episodes WHERE podcast_uri = :podcastUri
        ORDER BY datetime(published) DESC
        LIMIT :limit
        """,
    )
    abstract fun episodesForPodcastUri(podcastUri: String, limit: Int): Flow<List<EpisodeToPodcast>>

    @Transaction
    @Query(
        """
        SELECT episodes.* FROM episodes
        INNER JOIN podcast_category_entries ON episodes.podcast_uri = podcast_category_entries.podcast_uri
        WHERE category_id = :categoryId
        ORDER BY datetime(published) DESC
        LIMIT :limit
        """,
    )
    abstract fun episodesFromPodcastsInCategory(categoryId: Long, limit: Int): Flow<List<EpisodeToPodcast>>

    @Query("SELECT COUNT(*) FROM episodes")
    abstract suspend fun count(): Int

    @Transaction
    @Query(
        """
        SELECT * FROM episodes WHERE podcast_uri IN (:podcastUris)
        ORDER BY datetime(published) DESC
        LIMIT :limit
        """,
    )
    abstract fun episodesForPodcasts(podcastUris: List<String>, limit: Int): Flow<List<EpisodeToPodcast>>
}
/*
 *  This file is part of AndroidIDE.
 *
 *  AndroidIDE is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  AndroidIDE is distributed in the hope that it


"Manoplas do Tratador da Carne",
[30342] = "Cintel do Protetorado",
[30343] = "Medalhão da Horda",
[30344] = "Medalhão da Horda",
[30345] = "Medalhão da Horda",
[30346] = "Medalhão da Horda",
[30347] = "Pedra de Vida Teste",
[30348] = "Medalhão da Aliança",
[30349] = "Medalhão da Aliança",
[30350] = "Medalhão da Aliança",
[30351] = "Medalhão da Aliança",
[30352] = "Braçadeiras do Demolidor",
[30353] = "Barril de Cerveja Banebruto dos Malho Sangrento",
[30354] = "Fulminador Ultradesconsolidador",
[30355] = "Tubérculo Lua Negra Grelhado",
[30356] = "Tubérculo Lua Negra",
[30357] = "Tubérculo de Cura de Oronok",
[30358] = "Tubérculo de Agilidade de Oronok",
[30359] = "Tubérculo de Força de Oronok",
[30360] = "Ovo do Lurky",
[30361] = "Tubérculo de Poder Mágico de Oronok",
[30362] = "Elmo Energizado",
[30363] = "Cota do Escudo Dimensional",
[30364] = "Machado Ressonante",
[30365] = "Sinete do Feitor",
[30366] = "Elo da Tempestade de Mana",
[30367] = "Monster - Sword2H, Blood Elf B02 (Red Glow)",
[30368] = "Sapatilhas da Alta-sacerdotisa",
[30369] = "Brafoneiras Vis Purificadas",
[30370] = "Manoplas do Vindicante Redimido",
[30371] = "Cinturão do Guardião da Luz",
[30372] = "Cinturão de Socrethar",
[30373] = "Brafoneiras Fundidas no Éter",
[30374] = "Grevas do Poder Mágico",
[30375] = "Manoplas do Subjugador",
[30376] = "Monster - Mace, Jeweled Club (Purple Flame)",
[30377] = "Medalhão de Karja",
[30378] = "Patuá de Thalodien",
[30379] = "Colete Leve do Vindicante",
[30380] = "Cinturão do Vindicante Perdido",
[30381] = "Espaldares do Kaylaan",
[30382] = "Braçadeiras Cerimoniais dos Aldor",
[30383] = "Cinto do Sábio",
[30384] = "Braçadeiras do Albafulgis",
[30385] = "QR XXXX Braçadeiras Feitiço Placa",
[30386] = "Grevas da Guarda-de-sangue",
[30387] = "Monster - Mace, Cosmic Infuser",
[30388] = "Monster - Axe, 2H Devastation",
[30389] = "Monster - Dagger, Infinity Blade",
[30390] = "Monster - Bow, Netherstrand Longbow",
[30391] = "Monster - Shield, Phaseshift Bulwark",
[30392] = "Monster - Staff, Staff of Disintegration",
[30393] = "Monster - Sword, Warp Slicer",
[30394] = "Lâmina Solfúria",
[30395] = "Malho do Mestre Dimensional",
[30396] = "Alabarda Adornada",
[30397] = "Besta do Mestre Espião",
[30398] = "Botas do Benéfico",
[30399] = "Munhequeiras do Espreitanoite",
[304


ring name;
        public final List<String> books = new ArrayList<>();
    }

    @Test
    public void test3() {
        Bean3 bean = JSON.parseObject("{\"name\": \"zhangsan\", \"books\" : \"西游记\"}", Bean3.class);
        assertEquals("zhangsan", bean.name);
        assertEquals(1, bean.books.size());
        assertEquals("西游记", bean.books.get(0));
    }

    public static class Bean3 {
        public String name;
        public List<String> books;
    }

    @Test
    public void test4() {
        Bean4 bean = JSON.parseObject("{\"name\": \"zhangsan\", \"books\" : \"西游记\"}", Bean4.class);
        assertEquals("zhangsan", bean.name);
        assertEquals(1, bean.books.size());
        assertEquals("西游记", bean.books.get(0));
    }

    public static class Bean4 {
        private String name;
        private List<String> books;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<String> getBooks() {
            return books;
        }

        public void setBooks(List<String> books) {
            this.books = books;
        }
    }
}
package com.alibaba.fastjson2.issues;

import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import org.junit.jupiter.api.Test;

import java.util.Date;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class Issue392 {
    @Test
    public void test() {
        String date1 = JSONObject.of("date1", 1654053162).toString();
        Date date = JSON.parseObject(date1, Bean.class).getDate1();
        assertEquals(1654053162000L, date.getTime());
    }

    @Data
    static class Bean {
        @JSONField(format = "unixtime")
        private Date date1;
    }

    @Test
    public void test1() {
        String date1 = JSONObject.of("date1", 1654053162).toString();
        Date date = JSON.parseObject(date1, Bean1.class).getDate1();
        assertEquals(1654053162000L, date.getTime());
    }

    public static class Bean1 {
        @JSONField(format = "unixtime")
        private Date date1;

        public Date getDate1() {
            return date1;
        }

        public void setDate1(Date date1) {
            this.date1 = date1;
        }
    }

    @Test
    public void test2() {
        String date1 = JSONObject.of("date1", 1654053162).toString();
        Date date = JSON.parseObject(date1, Bean2.class).date1;
        assertEquals(1654053162000L, date.getTime());
    }

    @Test
    public void test2_str() {
        String date1 = JSONObject.of("date1", "1654053162").toString();
        Date date = JSON.parseObject(date1, Bean2.class).date1;
        assertEquals(1654053162000L, date.getTime());
    }

    @Test
    public void test2_str1() {
        String date1 = JSONObject.of("date1", "165405316").toString();
        Date date = JSON.parseObject(date1, Bean2.class).date1;
        assertEquals(165405316000L, date.getTime());
    }

    @Test
    public void test2_str2() {
        String date1 = JSONObject.of("date1", "16540531").toString();
        Date date = JSON.parseObject(date1, Bean2.class).date1;
        assertEquals(16540531000L, date.getTime());
    }

    @Test
    public void test2_str3() {
        String date1 = JSONObject.of("date1", "16540


    #[inline]
    fn deref(&self) -> &[u8] {
        self.0.as_slice()
    }
}
<gh_stars>0
#![feature(array_windows)]
#![feature(test)]
extern crate test;
use aoc2021::common::*;
use std::collections::HashMap;

const DAY: usize = 4;

#[derive(Debug, Clone)]
struct Board {
    map:   HashMap<u8, u32>,
    state: u32,
}

#[derive(Debug, Clone)]
struct BingoGame {
    called_numbers: Vec<u8>,
    boards:         Vec<Board>,
}

impl BingoGame {
    fn mark_numbers(&mut self, n: u8) {
        self.boards.iter_mut().for_each(|b| b.mark_number(n));
    }

    fn has_won(&self) -> Option<&Board> {
        self.boards.iter().find(|b| b.has_won())
    }

    #[cfg(test)]
    fn len(&self) -> usize {
        self.boards.len()
    }
}

impl Board {
    fn has_won(&self) -> bool {
        let line = |i: u32| -> bool { (i..i + 5).all(|n| (self.state & (1 << n)) != 0) };
        let row = |i: u32| -> bool { (i..).step_by(5).take(5).all(|n| (self.state & (1 << n)) != 0) };

        line(0) || line(5) || line(10) || line(15) || line(20) || row(0) || row(1) || row(2) || row(3) || row(4)
    }

    fn mark_number(&mut self, number: u8) {
        let n = self.map.get(&number);
        if let Some(x) = n {
            self.state = self.state | (1 << x)
        }
    }
}

type Parsed = BingoGame;

fn read_input() -> String {
    read_file(4)
}

fn parse_input(raw: &str) -> Parsed {
    let (number_line, boards) = raw.split_once("\n\n").unwrap();
    let called_numbers = number_line.split(",").filter_map(|c| c.parse().ok()).collect();

    let boards: Vec<Vec<u8>> = boards
        .split("\n\n")
        .map(|b| b.split_ascii_whitespace().map(|n| n.parse().unwrap()).collect())
        .collect();
    let boards: Vec<Board> = boards
        .iter()
        .map(|b| Board {
            map:   b.iter().enumerate().map(|(i, &e)| (e, i as u32)).collect(),
            state: 0,
        })
        .collect();

    BingoGame { called_numbers, boards }
}

fn part1(parsed: &Parsed) -> u32 {
    let mut game = parsed.to_owned();
    for n in game.called_numbers.clone() {
        game.mark_numbers(n);
        if let Some(board) = game.has_won() {
            return board
                .map
                .iter()
                .map(|(&e, i)| if board.state & (1 << i) == 0 { e as u32 } else { 0 })
                .sum::<u32>()
                * n as u32;
        }
    }
    unreachable!("I think someone has to win?")
}

fn part2(par