sInteger,
            target,
            propertyKey,
            validatorFn: value => isValid(value),
            opts
        });
    };
}
import stringify from 'json-stable-stringify';

import { Exporter, ConflictError } from './commons';

/**
 * JSONv3 values can be any valid value for JSON file.
 *
 * See i18next's "returnObjects" option.
 */
type JsonV3Value =
  | string
  | number
  | null
  | JsonV3Value[]
  | { [k: string]: JsonV3Value };

/**
 * Content of a JSON v3 file.
 */
interface JsonV3File {
  whitespacesBefore: string;
  whitespacesAfter: string;
  content: { [k: string]: JsonV3Value };
}

/**
 * Check whether a JsonV3Value is a plain object.
 */
function jsonV3ValueIsObject(
  val: JsonV3Value,
): val is { [k: string]: JsonV3Value } {
  return typeof val === 'object' && val !== null && !Array.isArray(val);
}

/**
 * Add a key recursively to a JSONv3 file.
 *
 * @param fileContent JSONv3 file content
 * @param keyPath keyPath of the key to add
 * @param cleanKey key without path
 * @param value Value to set for the key.
 */
function recursiveAddKey(
  fileContent: JsonV3File['content'],
  keyPath: string[],
  cleanKey: string,
  value: JsonV3Value,
): JsonV3File['content'] {
  if (keyPath.length === 0) {
    return {
      ...fileContent,
      [cleanKey]: value,
    };
  }

  const currentKeyPath = keyPath[0];
  let current = fileContent[currentKeyPath];
  if (current === undefined) {
    current = {};
  } else if (!jsonV3ValueIsObject(current)) {
    throw new ConflictError();
  }

  return {
    ...fileContent,
    [currentKeyPath]: recursiveAddKey(
      current,
      keyPath.slice(1),
      cleanKey,
      value,
    ),
  };
}

const jsonv3Exporter: Exporter<JsonV3File, JsonV3Value> = {
  init: () => {
    return {
      whitespacesBefore: '',
      whitespacesAfter: '\n',
      content: {},
    };
  },
  parse: ({ content }) => {
    const whitespacesBeforeMatch = content.match(/^(\s*)/);
    const whitespacesAfterMatch = content.match(/(\s*)$/);
    return {
      whitespacesBefore:
        whitespacesBeforeMatch === null ? '' : whitespacesBeforeMatch[0],
      whitespacesAfter:
        whitespacesAfterMatch === null ? '' : whitespacesAfterMatch[0],
      content: JSON.parse(content),
    };
  },
  stringify: ({ config, file }) => {
    return (
      file.whitespacesBefore +
      stringify(file.content, { space: config.jsonSpace }) +
      file.whitespacesAfter
    );
  },
  getKey: ({ file, keyPath, cleanKey }) => {
    let current = file.content;
    for (const p of keyPath) {
      const val = current[p];
      if (val === undefined) {
        return undefined;
      } else if (!jsonV3ValueIsObject(val)) {
        throw new ConflictError();
      }
      current = val;
    }
    return current[cleanKey];
  },
  addKey: (params) => {
    const { key, file, value } = params;
    return {
      ...file,
      content: recursiveAddKey(file.content, key.keyPath, key.cleanKey, value),
    };
  },
};

export default jsonv3Exporter;
import { Wish } from '../utils/db/models/Wish'
import { Gain } from '../utils/db/models/Gain'
import { Temp } from '../utils/db/models/Temp';
const Sequelize = require('sequelize');
const Uuid = require("uuid");

//获得某个校区的愿望,按发


mport kotlin.test.Test

public interface BaseUsernameAccountLoginTests {
    public val quark: Quark
    public val vpnUsers: User.Users

    public fun verifySuccessfulLogin()

    @BeforeTest
    public fun prepare() {
        quark.jailUnban()
    }

    @Test
    public fun loginWithFreeInternalAccount() {
        val user = quark.userCreate().first
        AddAccountRobot()
            .signIn()
            .loginUser<CoreRobot>(user)
        verifySuccessfulLogin()
    }

    @Test
    public fun loginWithVpnUsernameAccount() {
        val user = vpnUsers.getUser()
        AddAccountRobot()
            .signIn()
            .loginUser<CoreRobot>(user)
        verifySuccessfulLogin()
    }
}
/*
 * Copyright (c) 2024 Proton AG
 * This file is part of Proton AG and ProtonCore.
 *
 * ProtonCore 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.
 *
 * ProtonCore 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 ProtonCore.  If not, see <https://www.gnu.org/licenses/>.
 */

package me.proton.core.auth.test

import androidx.test.platform.app.InstrumentationRegistry
import kotlinx.coroutines.runBlocking
import me.proton.core.auth.test.robot.AddAccountRobot
import me.proton.core.auth.test.robot.signup.SetPasswordRobot
import me.proton.core.auth.test.robot.signup.SignupInternal
import me.proton.core.humanverification.test.robot.HvCodeRobot
import me.proton.core.paymentiap.test.robot.GPBottomSheetSubscribeErrorRobot
import me.proton.core.paymentiap.test.robot.GPBottomSheetSubscribeRobot
import me.proton.core.plan.test.BillingPlan
import me.proton.core.plan.test.SubscriptionHelper
import me.proton.core.plan.test.robot.SubscriptionRobot
import me.proton.core.test.rule.annotation.EnvironmentConfig
import me.proton.core.util.kotlin.random
import me.proton.test.fusion.Fusion.byObject
import me.proton.test.fusion.FusionConfig
import org.junit.Before
import org.junit.Test
import kotlin.time.Duration.Companion.seconds

/**
 * Minimal abstract Payments tests for new user registration using external email (External).
 * Clients tests should extend it in order to run payments tests from their repositories.
 * Should be run on payments test environment with PlayStore licensed test accounts.
 * When running on Android emulator it should support PlayStore API.
 * This test is parametrized and uses [BillingPlan]s as parameters.
 * Client plans should be created in advance and maintained in clients repository.
 *
 * Usage (below code should be added on client side):
 *
 * @RunWith(Parameterized::class)
 * open class ExternalRegistrationWithSubscriptionFlowTest(plan: Plan) :
 *     MinimalExternalRegistrationWithSubscriptionTest(plan) {
 *
 *     override fun afterSubscriptionSteps() {
 *         CongratsRobot.uiElementsDisplayed()
 *     }
 *
 *     companion object {
 *         @JvmStatic
 *         @Parameterized.Parameters(name = "{0}")
 *         fun data(): List<Plan> {
 *             return listOf(
 *                 DrivePlans.drivePlusMonthly,
 *                 DrivePlans.drivePlusYearly,
 *                 DrivePlans.driveProtonUnlimitedMonthly,
 *                 DrivePlans


totpSetupDetails!!.sharedSecret.toByteArray(),
            System.currentTimeMillis()
        )
        synchronousAuth.confirmSignIn(otp)
        val currentUser = synchronousAuth.currentUser
        Assert.assertEquals(userName.lowercase(), currentUser.username)
    }

    /*
     * This test signs up a new user, enter incorrect MFA code during verification and
     * then enter correct OTP code to successfully set TOTP MFA.
     * */
    @Test
    fun mfasetup_with_incorrect_otp() {
        val result = synchronousAuth.signIn(userName, password)
        Assert.assertEquals(AuthSignInStep.CONTINUE_SIGN_IN_WITH_TOTP_SETUP, result.nextStep.signInStep)
        try {
            synchronousAuth.confirmSignIn("123456")
        } catch (e: Exception) {
            Assert.assertEquals("Code mismatch", e.cause?.message)
            val otp = TotpGenerator().generateCode(
                result.nextStep.totpSetupDetails!!.sharedSecret.toByteArray(),
                System.currentTimeMillis()
            )
            synchronousAuth.confirmSignIn(otp)
            val currentUser = synchronousAuth.currentUser
            Assert.assertEquals(userName.lowercase(), currentUser.username)
        }
    }

    /*
     * This test signs up a new user, successfully setup MFA, sign-out and then goes thru sign-in with TOTP.
     * */
    @Test
    fun signIn_with_totp_after_mfa_setup() {
        val result = synchronousAuth.signIn(userName, password)
        Assert.assertEquals(AuthSignInStep.CONTINUE_SIGN_IN_WITH_TOTP_SETUP, result.nextStep.signInStep)
        val otp = TotpGenerator().generateCode(
            result.nextStep.totpSetupDetails!!.sharedSecret.toByteArray()
        )
        synchronousAuth.confirmSignIn(otp)
        synchronousAuth.signOut()

        val signInResult = synchronousAuth.signIn(userName, password)
        Assert.assertEquals(AuthSignInStep.CONFIRM_SIGN_IN_WITH_TOTP_CODE, signInResult.nextStep.signInStep)
        val otpCode = TotpGenerator().generateCode(
            result.nextStep.totpSetupDetails!!.sharedSecret.toByteArray(),
            System.currentTimeMillis() + 30 * 1000 // 30 sec is added to generate new OTP code
        )
        synchronousAuth.confirmSignIn(otpCode)
        val currentUser = synchronousAuth.currentUser
        Assert.assertEquals(userName.lowercase(), currentUser.username)
    }

    /*
     * This test signs up a new user, successfully setup MFA, update user attribute to add phone number,
     * sign-out the user, goes thru MFA selection flow during sign-in, select TOTP MFA type,
     * successfully sign-in using TOTP
     * */
    @Test
    fun select_mfa_type() {
        val result = synchronousAuth.signIn(userName, password)
        Assert.assertEquals(AuthSignInStep.CONTINUE_SIGN_IN_WITH_TOTP_SETUP, result.nextStep.signInStep)
        val otp = TotpGenerator().generateCode(
            result.nextStep.totpSetupDetails!!.sharedSecret.toByteArray()
        )
        synchronousAuth.confirmSignIn(otp)
        synchronousAuth.updateUserAttribute(AuthUserAttribute(AuthUserAttributeKey.phoneNumber(), "+19876543210"))
        updateMFAPreference(MFAPreference.ENABLED, MFAPreference.ENABLED, MFAPreference.ENABLED)
        synchronousAuth.signOut()
        val signInResult = synchronousAuth.signIn(userName, password)
        Assert.assertEquals(AuthSignInStep.CONTINUE_SIGN_IN_WITH_MFA_SELECTION, signInResult.nextStep.signInStep)
        val totpSignInResult = synchronousAuth.confirmSignIn(MFAType.TOTP.value)
        Assert.assertEquals(AuthSignInStep.CONFIRM_SIGN


ashes, configuration, queryService);
            if (!groupedQueryResults.ContainsMatches)
            {
                return QueryResult.Empty(hashes,  queryStopwatch.ElapsedMilliseconds);
            }

            var resultEntries = queryMath.GetBestCandidates(groupedQueryResults, configuration.MaxTracksToReturn, queryService, configuration);
            int totalTracksAnalyzed = groupedQueryResults.TracksCount;
            int totalSubFingerprintsAnalyzed = groupedQueryResults.SubFingerprintsCount;
            return QueryResult.NonEmptyResult(resultEntries, hashes, totalTracksAnalyzed, totalSubFingerprintsAnalyzed,  queryStopwatch.ElapsedMilliseconds);
        }

        private static GroupedQueryResults GetSimilarities(Hashes queryHashes, QueryConfiguration configuration, IQueryService queryService)
        {
            var candidates = queryService.QueryEfficiently(queryHashes, configuration);
            var groupedResults = new GroupedQueryResults(queryHashes.DurationInSeconds, queryHashes.RelativeTo);
            foreach (KeyValuePair<IModelReference, List<MatchedWith>> kv in candidates.GetMatches())
            {
                foreach (var match in kv.Value)
                {
                    groupedResults.Add(match.QuerySequenceNumber, kv.Key, match);
                }
            }

            return groupedResults;
        }
    }
}


 !default;
$spreadsheet-cpicker-font-color-font-size: 13px !default;
$spreadsheet-cpicker-fill-color-font-size: 14px !default;
$aggregate-list-font-size: 16px !default;
$bigger-spreadsheet-tbar-btn-icon-font-size: 18px !default;
$define-name-input-height: 23px !default;
$define-name-input-padding: 0 0 0 8px !default;
$define-name-input-padding-rtl: 0 8px 0 0 !default;

//selection
$selection-bg-color: rgba($brand-primary, .12) !default;
$selection-border-color: $brand-primary !default;
$selection-border-width: 1px !default;
$hdr-selection-bg-color: $selection-bg-color !default;
$hdr-selection-border: 1px solid !default;
$spreadsheet-hdr-selection-border-color: $grey-cc !default;
$hdr-selection-color: $gray !default;
$hdr-hover-bg-color: rgba($brand-primary, .18) !default;
$copy-indicator-t-b: 'data:image/gif;base64,R0lGODlhBgAEAJECAP///zF6uf///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjlFMTA1Q0MyRDA5RTExRTlBRTg3OD


}
	first := len(f.Comments)
	last := -1
	for i, g := range f.Comments {
		if g.End() >= end {
			break
		}
		// g.End() < end
		if beg <= g.Pos() {
			// comment is within the range [beg, end[ of import declarations
			if i < first {
				first = i
			}
			if i > last {
				last = i
			}
		}
	}

	var comments []*CommentGroup
	if last >= 0 {
		comments = f.Comments[first : last+1]
	}

	// Assign each comment to the import spec on the same line.
	importComments := map[*ImportSpec][]cgPos{}
	specIndex := 0
	for _, g := range comments {
		for specIndex+1 < len(specs) && pos[specIndex+1].Start <= g.Pos() {
			specIndex++
		}
		var left bool
		// A block comment can appear before the first import spec.
		if specIndex == 0 && pos[specIndex].Start > g.Pos() {
			left = true
		} else if specIndex+1 < len(specs) && // Or it can appear on the left of an import spec.
			lineAt(fset, pos[specIndex].Start)+1 == lineAt(fset, g.Pos()) {
			specIndex++
			left = true
		}
		s := specs[specIndex].(*ImportSpec)
		importComments[s] = append(importComments[s], cgPos{left: left, cg: g})
	}

	// Sort the import specs by import path.
	// Remove duplicates, when possible without data loss.
	// Reassign the import paths to have the same position sequence.
	// Reassign each comment to the spec on the same line.
	// Sort the comments by new position.
	slices.SortFunc(specs, func(a, b Spec) int {
		ipath := importPath(a)
		jpath := importPath(b)
		r := cmp.Compare(ipath, jpath)
		if r != 0 {
			return r
		}
		iname := importName(a)
		jname := importName(b)
		r = cmp.Compare(iname, jname)
		if r != 0 {
			return r
		}
		return cmp.Compare(importComment(a), importComment(b))
	})

	// Dedup. Thanks to our sorting, we can just consider
	// adjacent pairs of imports.
	deduped := specs[:0]
	for i, s := range specs {
		if i == len(specs)-1 || !collapse(s, specs[i+1]) {
			deduped = append(deduped, s)
		} else {
			p := s.Pos()
			// This function is exited early when len(specs) <= 1,
			// so d.Rparen must be populated (d.Rparen.IsValid() == true).
			if l := lineAt(fset, p); l != lineAt(fset, d.Rparen) {
				fset.File(p).MergeLine(l)
			}
		}
	}
	specs = deduped

	// Fix up comment positions
	for i, s := range specs {
		s := s.(*ImportSpec)
		if s.Name != nil {
			s.Name.NamePos = pos[i].Start
		}
		s.Path.ValuePos = pos[i].Start
		s.EndPos = pos[i].End
		for _, g := range importComments[s] {
			for _, c := range g.cg.List {
				if g.left {
					c.Slash = pos[i].Start - 1
				} else {
					// An import spec can have both block comment and a line comment
					// to its right. In that case, both of them will have the same pos.
					// But while formatting the AST, the line comment gets moved to
					// after the block comment.
					c.Slash = pos[i].End
				}
			}
		}
	}

	slices.SortFunc(comments, func(a, b *CommentGroup) int {
		return cmp.Compare(a.Pos(), b.Pos())
	})

	return specs
}
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENS


ldl.zx %s34, 28(,%s34)
	ldl.zx %s44, 28(,%s50)
	pvfmad %v21,%v21,%s48,%v19
	pvfmad %v21,%v21,%s49,%v20
	muls.l %s34, %s37, %s34
	muls.l %s44, %s37, %s44
	ldl.zx %s45, 28(,%s51)
	ldl.zx %s46, 28(,%s52)
	ldl.zx %s47, 28(,%s53)
	ldl.zx %s48, 28(,%s54)
	muls.l %s45, %s37, %s45
	muls.l %s46, %s37, %s46
	muls.l %s47, %s37, %s47
	muls.l %s37, %s37, %s48
	pvfmad %v0,%v0,%s34,%v15
	pvfmad %v0,%v0,%s44,%v16
	pvfmad %v0,%v0,%s45,%v17
	pvfmad %v0,%v0,%s46,%v18
	pvfmad %v0,%v0,%s47,%v19
	pvfmad %v0,%v0,%s37,%v20
	pvfadd %v1,%v7,%v1
	pvfadd %v2,%v8,%v2
	pvfadd %v3,%v9,%v3
	pvfadd %v4,%v10,%v4
	pvfadd %v5,%v11,%v5
	pvfadd %v6,%v12,%v6
	pvfadd %v7,%v13,%v21
	pvfadd %v0,%v14,%v0
	vst %v1,8,%s35
	vst %v2,8,%s36
	vst %v3,8,%s38
	vst %v4,8,%s39
	vst %v5,8,%s40
	vst %v6,8,%s41
	vst %v7,8,%s42
	vst %v0,8,%s43
	or %s11, 0, %s9
	ld %s16, 32(,%s11)
	ld %s15, 24(,%s11)
	ld %s10, 8(,%s11)
	ld %s9, (,%s11)
	b.l (,%lr)
.Lfunc_end7:
	.size	w2v_kernel_N6_HU512_2X_W08, .Lfunc_end7-w2v_kernel_N6_HU512_2X_W08

	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2
.LCPI8_0:
	.4byte	1065353216
.LCPI8_1:
	.4byte	0
.LCPI8_2:
	.4byte	3212836864
.LCPI8_3:
	.4byte	1086324736
.LCPI8_4:
	.4byte	3233808384
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3
.LCPI8_5:
	.8byte	0
	.text
	.globl	w2v_kernel_N6_HU512_2X_W09
	.p2align	4
	.type	w2v_kernel_N6_HU512_2X_W09,@function
w2v_kernel_N6_HU512_2X_W09:
	st %s9, (,%s11)
	st %s10, 8(,%s11)
	st %s15, 24(,%s11)
	st %s16, 32(,%s11)
	or %s9


reate_request.gcc_blocks;
        gcc_blocks.core.version = config.version;
        if let Some(ref mut early_capability_flags) = gcc_blocks.core.optional_data.early_capability_flags {
            let mut filtered_capability_flags = config.client_early_capability_flags;
            if !early_capability_flags.contains(gcc::ClientEarlyCapabilityFlags::SUPPORT_DYN_VC_GFX_PROTOCOL) {
                filtered_capability_flags.remove(gcc::ClientEarlyCapabilityFlags::SUPPORT_DYN_VC_GFX_PROTOCOL);
            }
            *early_capability_flags = filtered_capability_flags;
        }
        if let Some(ref mut server_selected_protocol) = gcc_blocks.core.optional_data.server_selected_protocol {
            *server_selected_protocol = config.server_response_protocol;
        }
        gcc_blocks.security.encryption_methods = config.encryption_methods;
        gcc_blocks.cluster = None;
        gcc_blocks.monitor = None;
        gcc_blocks.monitor_extended = None;
        gcc_blocks.message_channel = None;
        gcc_blocks.multi_transport_channel = None;
    }
}

impl Filter for ConnectResponse {
    fn filter(&mut self, config: &FilterConfig) {
        let mut gcc_blocks = &mut self.conference_create_response.gcc_blocks;
        gcc_blocks.core.version = config.version;
        if let Some(ref mut early_capability_flags) = gcc_blocks.core.optional_data.early_capability_flags {
            *early_capability_flags = config.server_early_capability_flags;
        }
        gcc_blocks.multi_transport_channel = None;
        gcc_blocks.message_channel = None;
    }
}

impl Filter for ClientInfoPdu {
    fn filter(&mut self, config: &FilterConfig) {
        self.client_info.credentials = config.target_credentials.clone();
        self.client_info
            .flags
            .remove(ClientInfoFlags::AUTOLOGON | ClientInfoFlags::LOGON_NOTIFY);
    }
}

impl Filter for DemandActive {
    fn filter(&mut self, _config: &FilterConfig) {
        self.capability_sets.retain(|capability_set| {
            !matches!(
                capability_set,
                CapabilitySet::BitmapCacheHostSupport(_)
                    | CapabilitySet::Control(_)
                    | CapabilitySet::WindowActivation(_)
                    | CapabilitySet::Share(_)
                    | CapabilitySet::Font(_)
                    | CapabilitySet::LargePointer(_)
                    | CapabilitySet::DesktopComposition(_)
            )
        });

        if let Some(CapabilitySet::VirtualChannel(capset)) = self
            .capability_sets
            .iter_mut()
            .find(|c| matches!(c, CapabilitySet::VirtualChannel(_)))
        {
            capset.flags = capability_sets::VirtualChannelFlags::NO_COMPRESSION;
        }
    }
}
<gh_stars>0
use crate::packet::{DeliveryGuarantee, OrderingGuarantee};
use std::net::SocketAddr;

#[derive(Clone, PartialEq, Eq, Debug)]
/// This is a user friendly packet containing the payload, endpoint, and reliability guarantees.
/// A packet could have reliability guarantees to specify how it should be delivered and processed.
///
/// | Reliability Type             | Packet Drop     | Packet Duplication | Packet Order     | Packet Fragmentation |Packet Delivery|
/// | :-------------:              | :-------------: | :


自相残杀要简单地多。只要像个人偶一样听我摆布就行了。然后——”

“等一下！”

欧鲁巴不禁喊道。在说话含糊不清的费德姆面前，他焦躁地甩着头，说道，

“给我戴上面具的罪魁，到现在居然说什么要把我的面具摘下来？还说要把我从剑奴的身份里解放出来，但要我对你言听计从？你在开什么玩笑。现在摘掉我面具的理由究竟是什么。确切地说，一开始给我戴上面具的理由又是什么。你们这些家伙，总是喜欢随意摆布自己觉得没有价值的人们的命运，究竟你们能从中获得多少乐趣？”

言辞本身虽然显得很平静，但或许是感受到了话语中所包含着的他那整整两年间的痛苦吧，费德姆吓得向后缩去，而士兵像是要保护主人似的，挡在他的面前。目光从面具的内侧炯炯有神地射出，欧鲁巴越过士兵的肩头狠狠盯着费德姆。

“把面具取下，从奴隶的身份中解放出来，然后买下我，你究竟打算干些什么。难道说想把我训练成你饲养的暗杀者不成？”

“等，等一下。你稍微等一下啦。”

这次轮到费德姆制止他。他躲在士兵的背后，擦着额头上渗出的汗水，

“你不明白吗。不过我也没有那么多时间解释了。难道要我说，假如你不服从的话，我就把你杀了这种话，你还会比较能接受吗？”

“这样说还比较干脆明了。另外还有关于我需要做的事。”

士兵的喉结上下滑动，面前站着的明明是个手无寸铁的人，但总觉得像是被一头有着黄金色眼瞳的食肉猛兽盯着似的。

贵族和奴隶。原本不被允许平起平坐的这两者间，却让整个室内充满了立场相反、使人焦躁的威压感。

“好了，稍安勿躁。”

插嘴的是那个带着书生风的青年。他向前跨了一步，站在了欧鲁巴和费德姆中间。


      mockEventId: 'mock-event-id-37',
      mockSenderId: '@emily:acter.global',
      mockOriginServerTs: 1743491766000, // April 1, 2025
      mockMsgContent: MockMsgContent(
        mockBody: 'New features deployed. Monitor for issues.',
      ),
    ),
  ],
);

final groupDmWithEmmaKumarpalsinhBenRoom10 = createMockChatItem(
  roomId: 'mock-room-10',
  displayName: 'Emma, Kumarpalsinh & Ben',
  activeMembersIds: [
    '@emma:acter.global',
    '@kumarpalsinh:acter.global',
    '@ben:acter.global',
  ],
  isDm: true,
  timelineEventItems: [
    MockTimelineEventItem(
      mockEventId: 'mock-event-id-38',
      mockSenderId: '@emma:acter.global',
      mockOriginServerTs: 1743405366000, // March 31, 2025
      mockMsgContent: MockMsgContent(
        mockBody:
            'Let me know when you\'re free to discuss the design system updates.',
      ),
    ),
  ],
);

final alexDmRoom11 = createMockChatItem(
  roomId: 'mock-room-11',
  displayName: 'Alex Thompson',
  activeMembersIds: ['@alex:acter.global', '@kumarpalsinh:acter.global'],
  isDm: true,
  timelineEventItems: [
    MockTimelineEventItem(
      mockEventId: 'mock-event-id-39',
      mockSenderId: '@alex:acter.global',
      mockOriginServerTs: 1743318966000, // March 30, 2025
      mockMsgContent: MockMsgContent(
        mockBody: 'See you at the team meeting tomorrow at 10 AM.',
      ),
    ),
  ],
);

final marketingTeamRoom12 = createMockChatItem(
  roomId: 'mock-room-12',
  displayName: 'Marketing Team',
  activeMembersIds: [
    '@christopher:acter.global',
    '@daniel:acter.global',
    '@james:acter.global',
    '@patricia:acter.global',
  ],
  timelineEventItems: [
    MockTimelineEventItem(
      mockEventId: 'mock-event-id-40',
      mockSenderId: '@christopher:acter.global',
      mockOriginServerTs: 1743232566000, // March 29, 2025
      mockMsgContent: MockMsgContent(
        mockBody: 'Campaign approved. Launch next week.',
      ),
    ),
  ],
);

final lisaDmRoom13 = createMockChatItem(
  roomId: 'mock-room-13',
  displayName: 'Lisa Park',
  activeMembersIds: ['@lisa:acter.global', '@kumarpalsinh:acter.global'],
  isDm: true,
  timelineEventItems: [
    MockTimelineEventItem(
      mockEventId: 'mock-event-id-41',
      mockSenderId: '@lisa:acter.global',
      mockOriginServerTs: 1743146166000, // March 28, 2025
      mockMsgContent: MockMsgContent(
        mockBody: 'Document reviewed and approved. Ready for implementation.',
      ),
    ),
  ],
);

final productFeedbackGroupRoom14 = createMockChatItem(
  roomId: 'mock-product-feedbackroom-14',
  displayName: 'Product Feedback',
  activeMembersIds: [
    '@daniel:acter.global',
    '@james:acter.global',
    '@patricia:acter.global',
    '@david:acter.global',
  ],
  timelineEventItems: [
    MockTimelineEventItem(
      mockEventId: 'mock-event-id-42',
      mockSenderId: '@daniel:acter.global',
      mockOriginServerTs: 1743059766000, // March 27, 2025
      mockMsgContent: MockMsgContent(mockBody: 'Feature requests prioritized.'),
    ),
  ],
  mockMessagesStream: Stream.periodic(
    const Duration(seconds: 1),
    (cou


lfs f1, 0xc0(r28)
/* 8045DE64 004593A4  C0 5C 00 C4 */	lfs f2, 0xc4(r28)
/* 8045DE68 004593A8  C0 7C 00 C8 */	lfs f3, 0xc8(r28)
/* 8045DE6C 004593AC  C0 9C 00 CC */	lfs f4, 0xcc(r28)
/* 8045DE70 004593B0  C0 BC 00 D0 */	lfs f5, 0xd0(r28)
/* 8045DE74 004593B4  80 7C 00 D4 */	lwz r3, 0xd4(r28)
/* 8045DE78 004593B8  48 00 01 B9 */	bl func_8045E030
/* 8045DE7C 004593BC  80 1B 00 04 */	lwz r0, 4(r27)
/* 8045DE80 004593C0  54 03 4F 7E */	rlwinm r3, r0, 9, 0x1d, 0x1f
/* 8045DE84 004593C4  54 04 36 BE */	srwi r4, r0, 0x1a
/* 8045DE88 004593C8  4B FF F1 61 */	bl func_8045CFE8
/* 8045DE8C 004593CC  38 7C 00 20 */	addi r3, r28, 0x20
/* 8045DE90 004593D0  38 80 00 00 */	li r4, 0
/* 8045DE94 004593D4  48 05 E5 79 */	bl func_804BC40C
/* 8045DE98 004593D8  C0 3C 00 00 */	lfs f1, 0(r28)
/* 8045DE9C 004593DC  C0 5C 00 04 */	lfs f2, 4(r28)
/* 8045DEA0 004593E0  C0 7C 00 08 */	lfs f3, 8(r28)
/* 8045DEA4 004593E4  C0 9C 00 0C */	lfs f4, 0xc(r28)
/* 8045DEA8 004593E8  C0 BC 00 10 */	lfs f5, 0x10(r28)
/* 8045DEAC 004593EC  80 7C 00 14 */	lwz r3, 0x14(r28)
/* 8045DEB0 004593F0  48 00 01 81 */	bl func_8045E030
/* 8045DEB4 004593F4  38 7C 00 60 */	addi r3, r28, 0x60
/* 8045DEB8 004593F8  38 80 00 00 */	li r4, 0
/* 8045DEBC 004593FC  48 05 E5 51 */	bl func_804BC40C
/* 8045DEC0 00459400  C0 3C 00 40 */	lfs f1, 0x40(r28)
/* 8045DEC4 00459404  C0 5C 00 44 */	lfs f2, 0x44(r28)
/* 8045DEC8 00459408  C0 7C 00 48 */	lfs f3, 0x48(r28)
/* 8045DECC 0045940C  C0 9C 00 4C */	lfs f4, 0x4c(r28)
/* 8045DED0 00459410  C0 BC 00 50 */	lfs f5, 0x50(r28)
/* 8045DED4 00459414  80 7C 00 54 */	lwz r3, 0x54(r28)
/* 8045DED8 00459418  48 00 01 59 */	bl func_8045E030
/* 8045DEDC 0045941C  38 60 00 01 */	li r3, 1
/* 8045DEE0 00459420  48 05 F8 45 */	bl func_804BD724
/* 8045DEE4 00459424  38 60 00 00 */	li r3, 0
/* 8045DEE8 00459428  38 80 00 00 */	li r4, 0
/* 8045DEEC 0045942C  38 A0 00 00 */	li r5, 0
/* 8045DEF0 00459430  48 05 F5


: {}", data).into())
                    }
                    xml::reader::XmlEvent::Comment(_) => (),
                    xml::reader::XmlEvent::Characters(chars) => {
                        return Err(format!("Unexpected characters outside tags: {}", chars).into())
                    }
                    xml::reader::XmlEvent::Whitespace(_) => (),
                    xml::reader::XmlEvent::EndDocument => unreachable!(),
                },
                Err(err) => {
                    yuki_error!("XML error: {}", err);
                    break;
                }
            }
        }
    };
}
<gh_stars>0
use std::io::Read;
use std::fs::File;

use std::collections::HashSet;

fn main() {
    let mut f = File::open("../input.txt").unwrap();
    let mut s = String::new();
    f.read_to_string(&mut s).ok();
    let s = s;

    let mut houses = HashSet::new();
    houses.insert((0, 0));
    s.chars().fold((0, 0), |pos, x| {
        let new_pos = match x {
            '^' => (pos.0, pos.1 + 1),
            'v' => (pos.0, pos.1 - 1),
            '<' => (pos.0 - 1, pos.1),
            '>' => (pos.0 + 1, pos.1),
            _ => unreachable!()
        };
        houses.insert(new_pos);
        new_pos
    });

    println!("{} house(s) received at least one present! :D", houses.len());
}
<reponame>Centril/proptest-arbitrary<gh_stars>1-10
use std::marker::PhantomData;

coarbitrary!([T: ?Sized] PhantomData<T>; self, _var => {});use crate::c_void;

use bridge_abi::{self, PrimitiveMetacallProtocolTypes};

#[no_mangle]
pub extern "C" fn rs_loader_impl_initialize(
    loader_impl: *mut c_void,
    _config: *mut c_void,
) -> *mut c_void {
    let boxed_loader_lifecycle_state = Box::new(bridge_abi::LoaderLifecycleState::new(Vec::new()));

    bridge_abi::define_type(
        loader_impl,
        "i8",
        PrimitiveMetacallProtocolTypes::Char,
        0,
        0,
    );
    bridge_abi::define_type(
        loader_impl,
        "i16",
        PrimitiveMetacallProtocolTypes::Short,
        0,
        0,
    );
    bridge_abi::define_type(
        loader_impl,
        "i32",
        PrimitiveMetacallProtocolTypes::Int,
        0,
        0,
    );
    bridge_abi::define_type(
        loader_impl,
        "i64",
        PrimitiveMetacallProtocolTypes::Long,
        0,
        0,
    );

    Box::into_raw(boxed_loader_lifecycle_state) as *mut c_void
}
<filename>backend/lib-messaging/src/sendgrid/mod.rs
use reqwest::blocking::Client;
use reqwest::header::{AUTHORIZATION, CONTENT_TYPE};
use serde::Serialize;

pub mod digests;
pub mod pending_subscriptions;
pub mod welcome;

pub struct NEVec<T> {
    head: T,
    tail: Vec<T>,
}

impl<T> NEVec<T> {
    pub fn from_vec(mut vs: Vec<T>) -> Option<NEVec<T>> {
        if vs.is_empty() {
            None
        } else {
            Some(NEVec {
                head: vs.remove(0),
                tail: vs,
            })
        }
    }
}

impl<T> Into<Vec<T>> for NEVec<T> {
    fn into(mut self) -> Vec<T> {
        let mut tmp = Vec::with_capacity(self.tail.len() + 1);
        tmp.push(self.head);
        tmp.append(&mut self.tail);
        tmp
    }
}

pub struct SendgridCredentia


work
		return "concurrent-value", nil
	})

	// Concurrently invoke the service
	const numGoroutines = 20
	var wg sync.WaitGroup
	results := make([]string, numGoroutines)
	errors := make([]error, numGoroutines)

	for i := 0; i < numGoroutines; i++ {
		wg.Add(1)
		go func(index int) {
			defer wg.Done()
			result, err := do.InvokeNamed[string](root, "concurrent-service")
			results[index] = result
			errors[index] = err
		}(i)
	}

	wg.Wait()

	// All invocations should succeed with the same result
	for i := 0; i < numGoroutines; i++ {
		is.NoError(errors[i])
		is.Equal("concurrent-value", results[i])
	}
}

// TestConcurrentScopeCreation tests concurrent scope creation
func TestConcurrentScopeCreation(t *testing.T) {
	testWithTimeout(t, 300*time.Millisecond)
	is := assert.New(t)

	root := do.New()

	// Concurrently create scopes
	const numScopes = 50
	var wg sync.WaitGroup
	scopes := make([]do.Injector, numScopes)

	for i := 0; i < numScopes; i++ {
		wg.Add(1)
		go func(index int) {
			defer wg.Done()
			scopeName := fmt.Sprintf("scope-%d", index)
			scopes[index] = root.Scope(scopeName)
		}(i)
	}

	wg.Wait()

	// Verify all scopes were created correctly
	for i := 0; i < numScopes; i++ {
		is.NotNil(scopes[i])
		is.Equal(fmt.Sprintf("scope-%d", i), scopes[i].Name())
	}
}

// TestConcurrentHealthChecks tests concurrent health checks
func TestConcurrentHealthChecks(t *testing.T) {
	testWithTimeout(t, 300*time.Millisecond)
	is := assert.New(t)

	root := do.New()

	// Create services with health checks
	do.ProvideNamed(root, "healthy-service", func(i do.Injector) (*testHealthchecker, error) {
		return &testHealthchecker{name: "healthy", healthy: true}, nil
	})

	do.ProvideNamed(root, "unhealthy-service", func(i do.Injector) (*testHealthchecker, error) {
		return &testHealthchecker{name: "unhealthy", healthy: false}, nil
	})

	// Invoke services to ensure they are initialized
	_, err := do.InvokeNamed[*testHealthchecker](root, "healthy-service")
	is.NoError(err)
	_, err = do.InvokeNamed[*testHealthchecker](root, "unhealthy-service")
	is.NoError(err)

	// Concurrently perform health checks
	const numGoroutines = 10
	var wg sync.WaitGroup
	results := make([]map[string]error, numGoroutines)

	for i := 0; i < numGoroutines; i++ {
		wg.Add(1)
		go func(index int) {
			defer wg.Done()
			results[index] = root.HealthCheck()
		}(i)
	}

	wg.Wait()

	// All health checks should return consistent results
	for i := 0; i < numGoroutines; i++ {
		is.NotNil(results[i])
		is.Contains(results[i], "healthy-service")
		is.NoError(results[i]["healthy-service"])
		is.Contains(results[i], "unhealthy-service")
		is.Error(results[i]["unhealthy-service"])
	}
}

// TestConcurrentShutdown tests concurrent shutdown operations
func TestConcurrentShutdown(t *testing.T) {
	testWithTimeout(t, 300*time.Millisecond)
	is := assert.New(t)

	root := do.New()

	// Create services with shutdown tracking
	shutdownOrder := make([]string, 0


/*
 * Copyright (C) 2013 Frederic Vecoven
 *
 * This file is part of trs_hard
 *
 * trs_hard 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.
 *
 * trs_hard 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/>.
 */

#ifndef _SERIAL_H_
#define _SERIAL_H_

#include "stdint.h"

void usart_init(void);
uint8_t usart_ok_to_send(void);
void usart_send(uint8_t data);
uint8_t usart_get(uint8_t *data);
void usart_flush(void);

/* debug utils */
void usart_puts(const rom char *str);
void usart_puts2(const rom char *str);
void usart_puts_r(const char *str);
void usart_puts2_r(const char *str);
void usart_put_hex(char c);
void usart_put_short(short c);
void usart_put_long(long c);

/* interrupt handlers */
void serial_rx_int(void);
void serial_tx_int(void);

#endif /* _SERIAL_H_ */


using System;
using Robust.Shared.Maths;
using Robust.Shared.Physics.Components;

namespace Robust.Shared.Physics.Collision.Shapes
{
    public enum ShapeType : sbyte
    {
        Unknown = -1,
        Circle = 0,
        Edge = 1,
        Polygon = 2,
        Chain = 3,
        TypeCount = 4, // Obviously increment this if you add something
    }

    /// <summary>
    /// A primitive physical shape that is used by a <see cref="PhysicsComponent"/>.
    /// </summary>
    public interface IPhysShape : IEquatable<IPhysShape>
    {
        /// <summary>
        ///     Get the number of child primitives. Only relevant for cha


 start {
                e = INVALID_INDEX;
                break;
            }
        }
        //eprintln!("returning from find_visible_edge...");
        (e, e == start)
    }
}

fn calculate_bbox_center<C: Coord + Vector<C>>(points: &[C]) -> (C, f64) {
    let mut max = Point {
        x: f64::NEG_INFINITY,
        y: f64::NEG_INFINITY,
    };
    let mut min = Point {
        x: f64::INFINITY,
        y: f64::INFINITY,
    };

    for point in points {
        min.x = min.x.min(point.x());
        min.y = min.y.min(point.y());
        max.x = max.x.max(point.x());
        max.y = max.y.max(point.y());
    }

    let width = max.x - min.x;
    let height = max.y - min.y;
    let span = width * width + height * height;

    (
        C::from_xy((min.x + max.x) / 2.0, (min.y + max.y) / 2.0),
        span,
    )
}

fn find_closest_point<C: Coord + Vector<C>>(points: &[C], p: &C) -> usize {
    let mut min_dist = f64::MAX;
    let mut k = INVALID_INDEX;

    for (i, q) in points.iter().enumerate() {
        if i != k {
            let d = C::dist2(&p, &q);

            if d < min_dist && d > 0.0 {
                k = i;
                min_dist = d;
            }
        }
    }

    k
}

fn find_seed_triangle<C: Coord + Vector<C>>(center: &C, points: &[C]) -> Option<(usize, usize, usize)> {
    let i0 = find_closest_point(points, center);
    let p0 = &points[i0];

    let mut i1 = find_closest_point(points, &p0);
    let p1 = &points[i1];

    // find the third point which forms the smallest circumcircle
    // with the first two
    let mut min_radius = f64::MAX;
    let mut i2 = INVALID_INDEX;
    for (i, p) in points.iter().enumerate() {
        if i != i0 && i != i1 {
            let r = circumradius(p0, p1, p);

            if r < min_radius {
                i2 = i;
                min_radius = r;
            }
        }
    }

    if min_radius == f64::MAX {
        None
    } else {
        let p2 = &points[i2];

        if counter_clockwise(p0, p1, p2) {
            std::mem::swap(&mut i1, &mut i2)
        }

        Some((i0, i1, i2))
    }
}

fn to_points<C: Coord + Vector<C>>(coords: &[f64]) -> Vec<C> {
    coords
        .chunks(2)
        .map(|tuple| C::from_xy(tuple[0], tuple[1]))
        .collect()
}

/// Calculates the Delaunay triangulation, if it exists, for a given set of 2D
/// points.
///
/// Points are passed a flat array of `f64` of size `2n`, where n is the
/// number of points and for each point `i`, `{x = 2i, y = 2i + 1}` and
/// converted internally to `delaunator::Point`. It returns both the triangulation
/// and the vector of `delaunator::Point` to be used, if desired.
///
/// # Arguments
///
/// * `coords` - A vector of `f64` of size `2n`, where for each point `i`, `x = 2i`
/// and y = `2i + 1`.
pub fn triangulate_from_arr<C: Coord + Vector<C>>(coords: &[


 _localNotifications.initialize(
      initializationSettings,
      onDidReceiveNotificationResponse: selectNotification,
    );

    // Loading pending notifications an rebuild timers
    final pendingNotificationRequests =
        await _localNotifications.pendingNotificationRequests();
    for (final element in pendingNotificationRequests) {
      if (element.payload != null) {
        final data = jsonDecode(element.payload!) as Map<String, dynamic>;
        final timer = Timer.fromJson(data)..id = element.id;
        TimerList()._timers.add(timer);
        if (timer.id! > curId) {
          curId = timer.id!;
        }
      }
    }
  }

  Future<void> start(Timer timer) async {
    timer.id = curId;

    await _localNotifications.zonedSchedule(
      curId++,
      timer.title,
      timer.body,
      tz.TZDateTime.from(timer.done, tz.local),
      platformChannelSpecifics,
      payload: jsonEncode(timer.toJson()),
      androidAllowWhileIdle: true,
      uiLocalNotificationDateInterpretation:
          UILocalNotificationDateInterpretation.wallClockTime,
    );
  }

  Future<void> cancel(Timer timer) async {
    assert(
      timer.id != null,
      "The timer should have an ID. If not it probably wasn't started",
    );
    await _localNotifications.cancel(timer.id!);
  }

  Future<void> cancelAll() async {
    await _localNotifications.cancelAll();
  }
}
import 'package:date_format/date_format.dart';

main() {
  print(formatDate(DateTime(1989, 2, 21), [dd, '/', mm, '/', yyyy]));
  print(formatDate(DateTime(1989, 2, 21), [yyyy, '-', mm, '-', dd]));
  print(formatDate(DateTime(1989, 2, 21), [yy, '-', m, '-', dd]));
  print(formatDate(DateTime(1989, 2, 1), [yy, '-', m, '-', d]));

  print(formatDate(DateTime(1989, 2, 1), [yy, '-', MM, '-', d]));
  print(formatDate(DateTime(1989, 2, 21), [yy, '-', M, '-', d]));

  print(formatDate(DateTime(1989, 2, 1), [yy, '-', M, '-', d]));

  print(formatDate(DateTime(2018, 1, 14), [yy, '-', M, '-', DD]));
  print(formatDate(DateTime(2018, 1, 14), [yy, '-', M, '-', D]));

  print(formatDate(DateTime(1989, 02, 1, 15, 40, 10), [HH, ':', nn, ':', ss]));

  print(formatDate(
      DateTime(1989, 02, 1, 15, 40, 10), [hh, ':', nn, ':', ss, ' ', am]));

  print(formatDate(
      DateTime(1989, 02, 1, 15, 40, 10), [hh, ':', nn, ':', ss, ' ', am]));

  print(formatDate(DateTime(1989, 02, 1, 15, 40, 10), [hh]));
  print(formatDate(DateTime(1989, 02, 1, 15, 40, 10), [h]));

  print(formatDate(DateTime(1989, 02, 1, 5), [am]));
  print(formatDate(DateTime(1989, 02, 1, 15), [am]));

  print(
      formatDate(DateTime(1989, 02, 1, 15, 40, 10), [HH, ':', nn, ':', ss, z]));

  print(formatDate(
      DateTime(1989, 02, 1, 15, 40, 10), [HH, ':', nn, ':', ss, ' ', Z]));

  print(formatDate(DateTime(1989, 02, 21), [yy, ' ', w]));
  print(formatDate(DateTime(1989, 02, 21), [yy, ' ', W]));

  print(formatDate(DateTime(1989, 12, 31), [yy, '-W', W]));
  print(formatDate(DateTime(1989, 1, 1), [yy, '-', mm, '-w', W]));

  print(formatDate(
      DateTime(1989, 02, 1, 15, 40, 10), [HH, ':', nn, ':', ss, ' ', Z]));

  print(formatDate(DateTime(2020, 04, 18, 21, 14), [H, '\\h', n]));
}
import 'pack


在找寻一份市场营销岗位的工作，请问应该如何准备面试？|
|文学创作|写一段描写秋天森林的文字，让人感受到深秋森林的气息。|
|音乐推荐|你能推荐一首优美动听的古典音乐作品吗？|
|体育赛事回顾|请简述昨晚刚结束的NBA比赛中，湖人队和勇士队的比分和比赛重点。|
|健身指南|请教如何进行正确的卧推动作？|
|科技趋势|请分析未来5年内人工智能技术的发展趋势和应用场景。|
|计算机视觉|如何使用Python和OpenCV进行图像模糊处理？|
|自然语言处理|什么是BERT模型，它在文本分类中的表现如何？|
|数据科学|如何在Python中实现决策树算法？|
|机器学习|如何使用Keras库训练一个图像分类的卷积神经网络？|
|人工智能伦理|目前有哪些关于人工智能伦理方面的主要争议议题？|
|深度学习|深度学习与浅层学习有何区别？请举例说明。|
|数据可视化|如何用R语言制作交互式地图？|
|推荐系统|如何在用户行为预测中使用矩阵分解算法？|
|自动驾驶技术|自动驾驶汽车采用了哪些传感器来获取周围环境信息？|
|物联网安全|物联网设备面临哪些安全威胁？如何保障其安全性？|
| 商品推荐                        | 给我推荐一些适合春季穿着的女式上衣                                                                                |
| 新闻分类                        | 如何将英文新闻按照其来源进行分类？                                                                                |
| 文章生成                        | 根据以下关键词，生成一篇有关环境保护的文章：气候变化、全球变暖、碳排放、可再生能源                                                                                |
| 图片编辑                        | 如何使用Photoshop将图片背景转为透明？                                                                                |
| 菜谱推荐                        | 我想学做日式料理，请问可以推荐一份不错的菜谱吗？                                                                                |
| 电影评论                        | 在IMDB上评价最高的电影是哪部？                                                                                |
| 智能写作                        | 给我写一封推销信，内容要包括你们公司的优势以及产品的特点                                                                                |
| 翻译任务                        | 将以下句子翻译成英文：中国的春节是一个非常重要的传统节日，人们通常会和家人团聚，在这个节日里，人们会一起吃饭、聊天、玩游戏等活动。                                                                                |
| 机器人控制                      | 如何编写代码来控制机器人在指定区域内行走？


row_mask:0x0 bank_mask:0x0
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_dot4_i32_i8 v0, v1, v2, v3
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_dot4_u32_u8 v0, v1, v2, v3
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_dot4c_i32_i8 v0, v1, v2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_dot4c_i32_i8_dpp v255, v1, v2  quad_perm:[0,1,2,3] row_mask:0x0 bank_mask:0x0
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_dot4c_i32_i8_e32 v255, v1, v2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_dot8_i32_i4 v0, v1, v2, v3
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_dot8_u32_u4 v0, v1, v2, v3
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_dot8c_i32_i4 v0, v1, v2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_dot8c_i32_i4_dpp v255, v1, v2 quad_perm:[0,1,2,3] row_mask:0x0 bank_mask:0x0
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_exp_f16 v1, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_1
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_exp_f16_dpp v255, v1 quad_perm:[0,1,2,3] row_mask:0x0 bank_mask:0x0
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_exp_f16_e32 v255, v1
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_exp_f16_e64 v255, v1
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_exp_f16_sdwa v255, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_floor_f16 v1, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_1
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_floor_f16_dpp v255, v1 quad_perm:[0,1,2,3] row_mask:0x0 bank_mask:0x0
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_floor_f16_e32 v255, v1
// CHECK: :[[@LINE-1]]:{{[0-9]


refresh', const Duration(seconds: 2), () {
              _queryTeams(offset, refresh: true);
            });
          },
          style: kTextButtonDenseStyle,
          child: Text(S.current.refresh),
        ),
      ];
    }

    return PreferredSize(
      preferredSize: const Size.fromHeight(48),
      child: SizedBox(
        height: 48,
        child: ListView(
          reverse: true,
          shrinkWrap: true,
          scrollDirection: Axis.horizontal,
          padding: const EdgeInsetsDirectional.fromSTEB(0, 8, 0, 12),
          children: [for (final child in buttons.reversed) Center(child: child)],
        ),
      ),
    );
  }

  @override
  Widget listItemBuilder(UserBattleData record) {
    final index = queryResult.data.indexOf(record);
    final shareData = record.decoded;
    final shownIndex = offset + index + 1;

    Widget child = Column(
      children: [
        const SizedBox(height: 6),
        buildHeader(shownIndex, record),
        buildExtraInfo(record),
        if (widget.mode == TeamQueryMode.user || widget.mode == TeamQueryMode.id) buildQuest(record),
        if (shareData != null)
          FormationCard(
            formation: shareData.formation,
            fadeOutMysticCode: shareData.actions.isNotEmpty && !shareData.hasUsedMCSkills(),
          ),
        buildTeamActions(record),
        const SizedBox(height: 6),
      ],
    );
    return Material(
      color: shownList.indexOf(record).isOdd ? Theme.of(context).hoverColor : null,
      child: Center(
        child: ConstrainedBox(
          constraints: const BoxConstraints(maxWidth: 80 * 8),
          child: child,
        ),
      ),
    );
  }

  Widget buildHeader(int index, UserBattleData record) {
    final themeData = Theme.of(context);
    final style = themeData.textTheme.bodySmall;
    Future<void> onVote(bool isUpVote) async {
      if (!secrets.isLoggedIn) return;
      if (record.userId == secrets.user?.id) {
        EasyLoading.showInfo("Do not vote your own team.");
        return;
      }
      record.tempVotes ??= record.votes.copy();
      record.tempVotes!.updateMyVote(isUpVote);
      if (mounted) setState(() {});
      EasyDebounce.debounce('team_vote_${record.id}', const Duration(seconds: 1), () async {
        final result = await ChaldeaWorkerApi.teamVote(
          teamId: record.id,
          voteValue: (record.tempVotes ?? record.votes).mine,
        );
        record.tempVotes = null;
        if (result != null) {
          record.votes = result;
          ChaldeaWorkerApi.clearTeamCache();
        }
        if (mounted) setState(() {});
      });
    }

    final votes = record.tempVotes ?? record.votes;
    final username = record.username ?? "User ${record.userId}";
    return Row(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        const SizedBox(width: 16),
        Expanded(
          child: Text.rich(
            TextSpan(
              children: [
                TextSpan(text: '${S.current.team} $index - '),
                mode == TeamQueryMode.user
                    ? TextSpan(text: username)
                    : SharedBuilder.textButtonSpan(
                        context: context,
                        text: username,
                        onTap: () {
                          router.push(
                            url: Routes.laplaceManageTeam,
                            child: TeamsQueryPage(
                              mode: TeamQueryMode.user,
                              userId: record.userId,
                              username: re


 values (adding +1, naturally).
 */

String encryptKenny(String input, List<String> replaceCharacters, bool caseSensitive) {
  if (input.isEmpty) return '';

  if (replaceCharacters.length < 3) return '';

  Map<String, String> substitutions = {};
  for (int i = 0; i <= 2; i++) {
    substitutions.putIfAbsent(i.toString(), () => replaceCharacters[i]);
  }

  input = normalizeUmlauts(input);

  var output = '';
  RegExp regExp = RegExp(r'[A-Za-z]');
  input.split('').forEach((letter) {
    if (!letter.startsWith(regExp)) {
      output += letter;
      return;
    }
    var value = convertBase((alphabet_AZ[letter.toUpperCase()]! - 1).toString(), 10, 3).padLeft(3, '0');
    value = substitution(value, substitutions);
    if (caseSensitive) {
      if (isUpperCase(letter)) {
        value = value[0].toUpperCase() + value.substring(1).toLowerCase();
      } else {
        value = value.toLowerCase();
      }
    }
    output += value;
  });
  return output;
}

/*
 * For decoding, the method searches for valid letter triples. mmam wouldn't be valid, for example,
 * these letter will be ignored.
 * If theres a valid triple found, it will be converted in the way decribed above.
 *
 * The main problem is, that the Kenny key mustn't be m, p and f, but can be any string you like.
 *
 * First problem: What if key is mpf, but you get this input: mmm1ppp2:
 * This won't be recognized as 000 1 111 2, but as valid triples 000 111 12, which in fact is wrong.
 * For this reason, the key string will not be substituted with 012 but with non-writeable characters
 * in the first step - to be able to differ the "wrong" characters in input. The final substitution
 * comes later, when all chunks (triples) are identified.
 *
 * Second problem: What if the key is ma, ab, xy? This mustn't be a huge problem at the first glance,
 * since these strings would be substituted the same way as the single letters. But now think about
 * the case sensitivity: Input MaMaMa could be case sensitive. What about mAmAmA? Or MAMAMA. What if
 * the key itself would be Ma instead of ma. Or mA? It becomes even more complex if the key gets more
 * characters...
 * For this single - and, to be honest, absolutely rare case - the function grows that nasty size. So:
 * TODO: Find more readable algorithm
 */
String decryptKenny(String input, List<String>? replaceCharacters, bool caseSensitive) {
  if (input.isEmpty) return '';

  if (replaceCharacters == null || replaceCharacters.length < 3) return '';

  var replaceToCharacters = ['\u0000', '\u0001', '\u0002'];

  List<String> specialHandling = [
    'ß', // \u+00DF
    'ﬀ', // \u+FB00
    'ﬁ', // \u+FB01
    'ﬂ', // \u+FB02
    'ﬃ', // \u+FB03
    'ﬄ', // \u+FB04
    'ﬅ', // \u+FB05
    'ﬆ', // \u+FB06
  ];
  Map<String, String> specialMapping = {
    'ß' : '\u0003' + '\u0001',
    'ﬀ' : '\u0003' + '\u0002',
    'ﬁ' : '\u0003' + '\u0003',
    'ﬂ' : '\u0003' + '\u0004',
    'ﬃ' : '\u0003' + '\u0005',
    'ﬄ' : '\u0003' + '\u0006',
    'ﬅ' : '\u0003' + '\u0007',
    'ﬆ' : '\u0003' + '\u0008',
  };

  Map<String, String> substitutions = {};
  Map<String, String> substitutionsSwitched = {};
  Map<String, String> integerSubstitutions = {};

  // build substitutions:
  // 1. the key characters/string (default: m, p, f) to non-writeable characters
  // 2. non-writeab


BORDERCOLOR="#000000" SRC="http://oascentral.looksmart.com/RealMedia/ads/adstream_sx.ads/www.findarticles.com/p/articles/tn_ref/mi_m0FKX/@Middle">');
}
// -->
</SCRIPT>

  O'Grady's work could be used in the unionist case that the Irish had not created a state until the British imposed one that only unionists were competent to maintain, and that nationalist political incompetence nullified numerical superiority. In April 1889, when Ireland was convulsed by the Plan of Campaign, O'Grady wrote in the English Historical Review on "the Last Kings of Ireland," offering a similar interpretation of Irish dynastic conflicts in the eleventh and twelfth centuries. The Weekly Mail commented that the last High King, Roderick O'Connor, subdued Connacht "in a perfectly Balfourian manner," resembling the law enforcement activities of the contemporary RIC in the same province "while hot water and pitchforks are freely allowed to the defenders of 'humble homes'." The editorialist noted how after the Battle of Clontarf Brian Boru's army was ambushed by

Previous -
 1 -
 2 -
 3 -
 4 -
 5 -
 6 -
 7 -
 8 -
 9 -
 10 -
 11 -
 12 -
 13 -
 14 -
 15 -
 <a href="/


 net.FlagUp,
								MTU:   9001,
							},
							PeerName: "eni8ea2c11fe35",
						},
					},
				},
				linkSetupCalls: []linkSetupCall{
					{
						link: hostVethWithIndex9,
					},
					{
						link: contVethWithIndex1,
					},
				},
				routeReplaceCalls: []routeReplaceCall{
					{
						route: &netlink.Route{
							LinkIndex: contVethWithIndex1.Attrs().Index,
							Scope:     netlink.SCOPE_LINK,
							Table:     254,
							Dst: &net.IPNet{
								IP:   net.IPv4(169, 254, 1, 1),
								Mask: net.CIDRMask(32, 32),
							},
						},
					},
				},
				routeAddCalls: []routeAddCall{
					{
						route: &netlink.Route{
							LinkIndex: contVethWithIndex1.Attrs().Index,
							Scope:     netlink.SCOPE_UNIVERSE,
							Table:     254,
							Dst: &net.IPNet{
								IP:   net.IPv4zero,
								Mask: net.CIDRMask(0, 32),
							},
							Gw: net.IPv4(169, 254, 1, 1),
						},
					},
				},
				addrAddCalls: []addrAddCall{
					{
						link: contVethWithIndex1,
						addr: &netlink.Addr{
							IPNet: &net.IPNet{
								IP:   net.ParseIP("192.168.120.1"),
								Mask: net.CIDRMask(32, 32),
							},
						},
					},
				},
				neighAddCalls: []neighAddCall{
					{
						neigh: &netlink.Neigh{
							LinkIndex:    contVethWithIndex1.Attrs().Index,
							State:        netlink.NUD_PERMANENT,
							IP:           net.IPv4(169, 254, 1, 1),
							HardwareAddr: hostVethWithIndex9.Attrs().HardwareAddr,
						},
					},
				},
				linkSetNsFdCalls: []linkSetNsFdCall{
					{
						link: hostVethWithIndex9,
						fd:   3,
					},
				},
				procSysSetCalls: []procSysSetCall{},
				nsFDCalls: []nsFDCall{
					{
						fd: uintptr(3),
					},
				},
			},
			args: args{
				contVethName: "eth0",
				hostVethName: "eni8ea2c11fe35",
				ipAddr: &net.IPNet{
					IP:   net.ParseIP("192.168.120.1"),
					Mask: net.CIDRMask(32, 32),
				},
				mtu: 9001,
			},
			index: 0,
		},
		{
			name: "successfully created vethPair for ipv4 pods with mNicIf1",
			fields: fields{
				linkByNameCalls: []linkByNameCall{
					{
						linkName: "eni8ea2c11fe35",
						link:     hostVethWithIndex9,
					},
					{
						linkName: "mNicIf1",
						link:     contVethWithIndex2,
					},
				},
				linkAddCalls: []linkAddCall{
					{
						link: &netlink.Veth{
							LinkAttrs: netlink.LinkAttrs{
								Name:  "mNicIf1",
								Flags: net.FlagUp,
								MTU:   9001,
							},
							PeerName: "eni8ea2c11fe35",
						},
					},
				},
				linkSetupCalls: []linkSetupCall{
					{
						link: hostVethWithIndex9,
					},
					{
						link: contVethWithIndex2,
					},
				},
				routeReplaceCalls: []routeReplace


 x++)
				{
					if (((int)this.dots[y, x] & 1) != 0)
						sb.Append("██");
					else
						sb.Append("  ");
				}

				sb.AppendLine("        ");
			}

			for (y = 0; y < 4; y++)
				sb.AppendLine(s);

			return sb.ToString();
		}

		/// <summary>
		/// Generates a text string representing the QR code using
		/// half block characters and spaces.
		/// Must be displayed in a font with fixed character sizes,
		/// preferrably where each character is twice as high as wide.
		/// </summary>
		/// <returns>QR Code.</returns>
		public string ToHalfBlockText()
		{
			StringBuilder sb = new StringBuilder();

			string s = new string(' ', 8 + this.size);
			int x, y, y2;
			int i;

			for (y = 0; y < 4; y++)
				sb.AppendLine(s);

			for (y = 0; y < this.size; y += 2)
			{
				y2 = y + 1;

				sb.Append("    ");

				for (x = 0; x < this.size; x++)
				{
					i = (int)this.dots[y, x] & 1;

					if (y2 < this.size && ((int)this.dots[y2, x] & 1) != 0)
						i |= 2;

					sb.Append(halfBlocks[i]);
				}

				sb.AppendLine("    ");
			}

			for (y = 0; y < 4; y++)
				sb.AppendLine(s);

			return sb.ToString();
		}

		/// <summary>
		/// Generates a text string representing the QR code using
		/// quarter block characters and spaces.
		/// Must be displayed in a font with fixed character sizes,
		/// preferrably where each character are square.
		/// </summary>
		/// <returns>QR Code.</returns>
		public string ToQuarterBlockText()
		{
			StringBuilder sb = new StringBuilder();

			string s = new string(' ', 4 + (this.size + 1) >> 1);
			int x, y, x2, y2;
			int i;

			sb.AppendLine(s);
			sb.AppendLine(s);

			for (y = 0; y < this.size; y += 2)
			{
				y2 = y + 1;

				sb.Append("  ");

				for (x = 0; x < this.size; x++)
				{
					x2 = x + 1;

					i = (int)this.dots[y, x] & 1;

					if (x2 < this.size && ((int)this.dots[y, x2] & 1) != 0)
						i |= 2;

					if (y2 < this.size && ((int)this.dots[y2, x] & 1) != 0)
						i |= 4;

					if (x2 < this.size && y2 < this.size && ((int)this.dots[y2, x2] & 1) != 0)
						i |= 8;

					sb.Append(quarterBlocks[i]);
				}

				sb.AppendLine("  ");
			}

			sb.AppendLine(s);
			sb.AppendLine(s);

			return sb.ToString();
		}

		/// <summary>
		/// Calculates a penalty score based on horizontal bands of dots of the same color.
		/// </summary>
		/// <returns>Penalty score</returns>
		public int PenaltyHorizontalBands()
		{
			int x, y, c;
			int Result = 0;
			bool? Prev;
			bool b;

			for (y = 0; y < this.size; y++)
			{
				Prev = null;
				c = 0;

				for (x = 0; x < this.size; x++)
				{
					if (Prev.HasValue)
					{
						if (Prev == (b = ((int)this.dots[y, x] & 1) != 0))
						{
							c++;
							if (c == 5)
								Result += 3;
							else if (c > 5)
								Result++;
						}
						else
						{


(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.ZOOM.getValue(), pointActionReq, kmlParams));
            } else if (ObjectUtil.isNotNull(pointActionReq.getTakePhotoType()) && ObjectUtil.equals(pointActionReq.getTakePhotoType(), 1)) {
                kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.PANO_SHOT.getValue(), pointActionReq, kmlParams));
            } else if (ObjectUtil.isNotNull(pointActionReq.getStartRecord()) && pointActionReq.getStartRecord()) {
                kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.START_RECORD.getValue(), pointActionReq, kmlParams));
            } else if (ObjectUtil.isNotNull(pointActionReq.getStopRecord()) && pointActionReq.getStopRecord()) {
                kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.STOP_RECORD.getValue(), pointActionReq, kmlParams));
            }
        }
        return kmlActionList;
    }

    /**
     * 构造坐标系参数信息
     *
     * @param templateType 航线模板类型
     * @param heightMode   高度模式
     * @param height       高度
     * @return 坐标系参数信息
     */
    public static KmlWayLineCoordinateSysParam buildKmlWayLineCoordinateSysParam(String templateType, String heightMode, String height) {
        KmlWayLineCoordinateSysParam kmlWayLineCoordinateSysParam = new KmlWayLineCoordinateSysParam();
        kmlWayLineCoordinateSysParam.setCoordinateMode("WGS84");
        kmlWayLineCoordinateSysParam.setHeightMode(heightMode);
        kmlWayLineCoordinateSysParam.setPositioningType(PositioningTypeEnums.GPS.getValue());
        if (StringUtils.equals(templateType, TemplateTypeEnums.MAPPING2D.getValue()) ||
                StringUtils.equals(templateType, TemplateTypeEnums.MAPPING3D.getValue()) ||
                StringUtils.equals(templateType, TemplateTypeEnums.MAPPING_STRIP.getValue())) {
            kmlWayLineCoordinateSysParam.setGlobalShootHeight(height);
            kmlWayLineCoordinateSysParam.setSurfaceFollowModeEnable("1");
            kmlWayLineCoordinateSysParam.setSurfaceRelativeHeight(height);
        }
        return kmlWayLineCoordinateSysParam;
    }

    public static KmlPayloadParam buildKmlPayloadParam(KmlParams kmlParams) {
        KmlPayloadParam kmlPayloadParam = new KmlPayloadParam();
        kmlPayloadParam.setPayloadPositionIndex(String.valueOf(kmlParams.getPayloadPosition()));
        kmlPayloadParam.setFocusMode(FocusModeEnums.FIRST_POINT.getValue());
        kmlPayloadParam.setMeteringMode(MeteringModeEnums.AVERAGE.getValue());
        // 0：不开启 1：开启
        kmlPayloadParam.setDewarpingEnable("1");
        kmlPayloadParam.setReturnMode(ReturnModeEnums.SINGLE_RETURN_STRONGEST.getValue());
        // 60000、80000、120000、160000、180000、240000
        kmlPayloadParam.setSamplingRate("240000");
        kmlPayloadParam.setScanningMode(ScanningModeEnums.REPETITIVE.getValue());
        // 0: 不上色 1: 真彩上色
        kmlPayloadParam.setModelColoringEnable("1");
        kmlPayloadParam.setImageFormat(kmlParams.getImageFormat());

        return kmlPayloadParam;
    }

    public static KmlGlobalWaypointHeadingParam buildKmlGlobalWaypointHeadingParam(String waypointHeadingMode, Double waypointHeadingAngle, String waypointP


re stack
8:	add	sp,#16

	// pop registers R4-R6 and return
	pop	{r4-r6}
	bx	lr

#endif

#if DISPHSTX_USE_FORMAT_2_PAL
// ----------------------------------------------------------------------------
//                   2 bits per pixel, paletted colors
// ----------------------------------------------------------------------------
// INPUT: R0 = pointer to slot descriptor
//	  R1 = current graphics line
//	  R2 = pointer to command buffer entry with pointer to render buffer
// ----------------------------------------------------------------------------
// void DispHstxDviRender_2_PAL(sDispHstxVSlot* slot, int line, u32* cmd);

// macro - store 2-bit pixel
//   dst ... destination index 0..31
//   bit ... source 2-bit index 0..30
// R0 = temporary register
// R1 = palette mapping address
// R2 = source sample with 16 pixels
// R5 = destination buffer
.macro store2 dst bit
	ubfx	r0,r2,#\bit,#2		// R0 <- extract bits from the sample
	ldrh	r0,[r1,r0,lsl #1]	// R0 <- mapping[bit << 1]
	strh	r0,[r5,#\dst*2]		// store pixel
.endm

.align 4,,		// align address to 16-byte boundary (cache line)
	nop.w		// alignment optimisation
	nop.w
	nop.w

.thumb_func
.global DispHstxDviRender_2_PAL
DispHstxDviRender_2_PAL:

	// push registers R4-R5
	push	{r4,r5}

	// prepare source address -> IP
	ldrh	r3,[r0,#DISPHSTXSLOT_PITCH]	// R3 <- load pitch of the line
	ldr	r4,[r0,#DISPHSTXSLOT_BUF]	// R4 <- load buffer base address
	mla	ip,r1,r3,r4			// IP <- line*pitch+base

	// prepare destination address -> R5
	ldr	r5,[r2,#0]			// R5 <- destination address of render buffer

	// prepare width of the slot -> R3
	ldrh	r3,[r0,#DISPHSTXSLOT_W]		// R3 <- width of slot in graphics pixels

	// prepare palette mapping address -> R1
	ldr	r1,[r0,#DISPHSTXSLOT_PAL]	// R1 <- pointer to palettes in RGB565 format

// ---- big loop (by 16 pixels)

	// prepare counter of big loop (by 16 pixels) -> R4
	lsrs	r4,r3,#4			// R4 <- width / 16
	beq	5f				// skip if width/16 is 0

	// load next source word -> R2
2:	ldr	r2,[ip],#4			// R2 <- [IP], increment IP + 4

// Here is:
//  R0 = temporary register
//  R1 = palette mapping
//  R2 = sample with 16 pixels
//  R3 = width of the slot
//  R4 = loop counter
//  R5 = destination buffer
//  IP = source buffer

// byte 0, destination index 0..3, source bits 7..0

	store2	0,6
	store2	1,4
	store2	2,2

	// process pixel 3, bits 0+1
	and	r0,r2,#3		// R0 <- extract bits 0+1 from the sample
	ldrh	r0,[r1,r0,lsl #1]	// R0 <- mapping[bit << 1]
	strh	r0,[r5,#3*2]		// store pixel

// byte 1, destination index 4..


	}

	if r.ix.version == 1 {
		r.trigram, r.count, r.offset = r.ix.postIndexEntry(r.triNum)
	} else {
		b := r.block
		if b == nil || len(b) < 3 || b[0] == 0 && b[1] == 0 && b[2] == 0 {
			r.block = r.ix.slice(r.ix.postIndex+r.nextBlock, postBlockSize)
			r.nextBlock += postBlockSize
			b = r.block
			r.offset = 0
		}
		r.trigram = uint32(b[0])<<16 | uint32(b[1])<<8 | uint32(b[2])
		b = b[3:]
		n1, l := binary.Uvarint(b)
		if l <= 0 {
			r.ix.corrupt()
		}
		b = b[l:]
		n2, l := binary.Uvarint(b)
		if l <= 0 {
			r.ix.corrupt()
		}
		b = b[l:]
		r.count = int(n1)
		r.offset += int(n2)
		r.block = b
	}
	if r.count == 0 {
		r.fileid = -1
		return
	}
	r.delta.init(r.ix, r.ix.slice(r.ix.postData+r.offset+3, -1))
	r.oldid = -1
	r.i = 0
}

func (r *postMapReader) nextId() bool {
	for r.count > 0 {
		r.count--
		delta := r.delta.next()
		if delta <= 0 {
			r.ix.corrupt()
		}
		r.oldid += delta
		for r.i < len(r.idmap) && r.idmap[r.i].hi <= r.oldid {
			r.i++
		}
		if r.i >= len(r.idmap) {
			r.count = 0
			break
		}
		if r.oldid < r.idmap[r.i].lo {
			continue
		}
		r.fileid = r.idmap[r.i].new + r.oldid - r.idmap[r.i].lo
		return true
	}

	r.fileid = -1
	return false
}
// Copyright 2011 The Go Authors.  All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package regexp implements regular expression search tuned for
// use in grep-like programs.
package regexp

import "regexp/syntax"

func bug() {
	panic("codesearch/regexp: internal error")
}

// Regexp is the representation of a compiled regular expression.
// A Regexp is NOT SAFE for concurrent use by multiple goroutines.
type Regexp struct {
	Syntax *syntax.Regexp
	expr   string // original expression
	m      matcher
}

// String returns the source text used to compile the regular expression.
func (re *Regexp) String() string {
	return re.expr
}

// Compile parses a regular expression and returns, if successful,
// a Regexp object that can be used to match against lines of text.
func Compile(expr string) (*Regexp, error) {
	re, err := syntax.Parse(expr, syntax.Perl)
	if err != nil {
		return nil, err
	}
	sre := re.Simplify()
	prog, err := syntax.Compile(sre)
	if err != nil {
		return nil, err
	}
	if err := toByteProg(prog); err != nil {
		return nil, err
	}
	r := &Regexp{
		Syntax: re,
		expr:   expr,
	}
	if err := r.m.init(prog); err != nil {
		return nil, err
	}
	return r, nil
}

func (r *Regexp) Match(b []byte, beginText, endText bool) (end int) {
	return r.m.match(b, beginText, endText)
}

func (r *Regexp) MatchString(s string, beginT


end_mode: sdl2::render::BlendMode,
    ) -> Result<(), Box<dyn Error>> {
        unsafe {
            let const_ptr = source_surface as *const sdl2::surface::Surface<'static>;
            let mut_ptr = const_ptr as *mut sdl2::surface::Surface<'static>;
            let surface = &mut *mut_ptr;
            surface.set_blend_mode(blend_mode)?;
            source_surface.blit(src_rect, dest_surface, dest_rect)?;
            surface.set_blend_mode(sdl2::render::BlendMode::Blend)?;
        }
        Ok(())
    }

    fn blend_sdl2_surface_opencv(
        dest_surface: &mut sdl2::surface::Surface<'static>,
        source_surface: &sdl2::surface::Surface<'static>,
        dest_rect: &Rect,
        src_rect: &Rect,
        blend_mode: BlendMode,
    ) -> Result<(), Box<dyn Error>> {
        unsafe {
            match blend_mode {
                BlendMode::MultiplyRGBA => {
                    let mut dest_mat = Sdl2Surface::sdl2_surface_range_to_opencv_mat(dest_surface, dest_rect)?;
                    let src_mat = Sdl2Surface::sdl2_surface_range_to_opencv_mat(source_surface, src_rect)?;
                    core::multiply(&dest_mat.clone(), &src_mat, &mut dest_mat, 1.0 / 255.0, -1)?;
                }
                _ => Err("not yet implemented")?,
            }
        }
        Ok(())
    }
}

impl Surface for Sdl2Surface {
    fn as_any<'a>(&'a self) -> &'a dyn Any {
        self
    }

    fn clone(&self) -> Result<Box<dyn Surface>, Box<dyn Error>> {
        let mut surface_copy =
            sdl2::surface::Surface::new(self.surface.width(), self.surface.height(), sdl2::pixels::PixelFormatEnum::ABGR8888)?;
        self.surface.blit(Option::None, &mut surface_copy, Option::None)?;
        Ok(Box::new(Sdl2Surface { surface: surface_copy }))
    }

    fn modulate_surface_and_color(&self, color: &dyn Color) -> Result<Box<dyn Surface>, Box<dyn Error>> {
        let mut color_surface = Sdl2Surface {
            surface: sdl2::surface::Surface::new(self.surface.width(), self.surface.height(), sdl2::pixels::PixelFormatEnum::ABGR8888)?,
        };
        color_surface.fill(color)?;
        //let mut final_surface = self.clone()?;
        //final_surface.blit(&color_surface, (0, 0), BlendMode::Multiply)?;
        //Ok(final_surface)
        color_surface.blit(self, (0, 0), BlendMode::MultiplyRGBA).unwrap();
        Ok(Box::new(color_surface))
    }

    fn get_width(&self) -> u32 {
        self.surface.width()
    }

    fn get_height(&self) -> u32 {
        self.surface.height()
    }

    fn get_size(&self) -> (u32, u32) {
        (self.surface.width(), self.surface.height())
    }

    fn get_rect(&self) -> Rect {
        Rect::new(0, 0, self.surface.width() as i32, self.surface.height() as i32)
    }

    fn raw(&self) -> Result<&[u8], Box<dyn Error>> {
        match self.surface.without_lock() {
            Some(data) => Ok(data),
            _ => Err("cannot retrieve raw data")?,
        }
    }


{
			m_qmarks = QuotationMarksList.NewList();
			m_qmarks.EnsureLevelExists(2);
			m_qmarks.QMarksList[0].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[0].Closing = "\u201D"; // Right double quotation mark
			m_qmarks.QMarksList[1].Opening = "\u2018"; // Left single quotation mark
			m_qmarks.QMarksList[1].Closing = "\u2019"; // Right single quotation mark
			m_source.SetParameterValue("QuotationMarkInfo", m_qmarks.XmlString);
		}

		void SetupEnglish3() // TO DO: Is there a way to limit it?
		{
			m_qmarks = QuotationMarksList.NewList();
			m_qmarks.EnsureLevelExists(3);
			m_qmarks.QMarksList[0].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[0].Closing = "\u201D"; // Right double quotation mark
			m_qmarks.QMarksList[1].Opening = "\u2018"; // Left single quotation mark
			m_qmarks.QMarksList[1].Closing = "\u2019"; // Right single quotation mark
			m_qmarks.QMarksList[2].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[2].Closing = "\u201D"; // Right double quotation mark
			m_source.SetParameterValue("QuotationMarkInfo", m_qmarks.XmlString);
		}

		void SetupEnglish4()
		{
			m_qmarks = QuotationMarksList.NewList();
			m_qmarks.EnsureLevelExists(4);
			m_qmarks.QMarksList[0].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[0].Closing = "\u201D"; // Right double quotation mark
			m_qmarks.QMarksList[1].Opening = "\u2018"; // Left single quotation mark
			m_qmarks.QMarksList[1].Closing = "\u2019"; // Right single quotation mark
			m_qmarks.QMarksList[2].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[2].Closing = "\u201D"; // Right double quotation mark
			m_qmarks.QMarksList[3].Opening = "\u2018"; // Left single quotation mark
			m_qmarks.QMarksList[3].Closing = "\u2019"; // Right single quotation mark
			m_qmarks.ContinuationType = ParagraphContinuationType.None;
			m_qmarks.ContinuationMark = ParagraphContinuationMark.None;
			m_source.SetParameterValue("QuotationMarkInfo", m_qmarks.XmlString);
		}

		void SetupEuropean1()
		{
			m_qmarks.RemoveLastLevel();
			m_qmarks.QMarksList[0].Opening = "«"; // Left-pointing double angle quotation mark
			m_qmarks.QMarksList[0].Closing = "»"; // Right-pointing double angle quotation mark
			m_qmarks.ContinuationType = ParagraphContinuationType.None;
			m_qmarks.ContinuationMark = ParagraphContinuationMark.None;
			m_source.SetParameterValue("QuotationMarkInfo", m_qmarks.XmlString);
		}

		void SetupPortuguese2()
		{
			m_qmarks.EnsureLevelExists(2);
			m_qmarks.QMarksList[0].Opening = "«"; // Left-pointing double angle quotation mark
			m_qmarks.QMarksList[0].Closing = "»"; // Right-pointing double angle quotation mark
			m_qmarks.QMarksList[1].Opening = "«"; // Left-pointing double angle quotation mark
			m_qmarks.QMarksList[1].Closing = "»"; // Right-pointing double angle quotation mark
			m_source.Se


6;
import 'package:mockito/mockito.dart' as _i1;

// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_setters_without_getters
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class

class _FakeArticleRepository_0 extends _i1.SmartFake
    implements _i2.ArticleRepository {
  _FakeArticleRepository_0(
    Object parent,
    Invocation parentInvocation,
  ) : super(
          parent,
          parentInvocation,
        );
}

class _FakeEither_1<L, R> extends _i1.SmartFake implements _i3.Either<L, R> {
  _FakeEither_1(
    Object parent,
    Invocation parentInvocation,
  ) : super(
          parent,
          parentInvocation,
        );
}

/// A class which mocks [GetBookmarkStatus].
///
/// See the documentation for Mockito's code generation for more information.
class MockGetBookmarkStatus extends _i1.Mock implements _i4.GetBookmarkStatus {
  MockGetBookmarkStatus() {
    _i1.throwOnMissingStub(this);
  }

  @override
  _i2.ArticleRepository get repository => (super.noSuchMethod(
        Invocation.getter(#repository),
        returnValue: _FakeArticleRepository_0(
          this,
          Invocation.getter(#repository),
        ),
      ) as _i2.ArticleRepository);

  @override
  _i5.Future<bool> execute(String? url) => (super.noSuchMethod(
        Invocation.method(
          #execute,
          [url],
        ),
        returnValue: _i5.Future<bool>.value(false),
      ) as _i5.Future<bool>);
}

/// A class which mocks [SaveBookmarkArticle].
///
/// See the documentation for Mockito's code generation for more information.
class MockSaveBookmarkArticle extends _i1.Mock
    implements _i6.SaveBookmarkArticle {
  MockSaveBookmarkArticle() {
    _i1.throwOnMissingStub(this);
  }

  @override
  _i2.ArticleRepository get repository => (super.noSuchMethod(
        Invocation.getter(#repository),
        returnValue: _FakeArticleRepository_0(
          this,
          Invocation.getter(#repository),
        ),
      ) as _i2.ArticleRepository);

  @override
  _i5.Future<_i3.Either<_i7.Failure, String>> execute(_i8.Article? article) =>
      (super.noSuchMethod(
        Invocation.method(
          #execute,
          [article],
        ),
        returnValue: _i5.Future<_i3.Either<_i7.Failure, String>>.value(
            _FakeEither_1<_i7.Failure, String>(
          this,
          Invocation.method(
            #execute,
            [article],
          ),
        )),
      ) as _i5.Future<_i3.Either<_i7.Failure, String>>);
}

/// A class which mocks [RemoveBookmarkArticle].
///
/// See the documentation for Mockito's code generation for more information.
class MockRemoveBookmarkArticle extends _i1.Mock
    implements _i9.RemoveBookmarkArticle {
  MockRemoveBookmarkArticle() {
    _i1.throwOnMissingStub(this);
  }

  @override
  _i2.ArticleRepository get repository => (super.no


self) -> i8 {
        self.state_idx
    }

    /// Update the number of elements in the list
    fn update_count(&mut self, item_count: i8) {
        self.item_count = item_count;
    }
}use crate::jwk::alg::ec::EcCurve;
use crate::jwk::alg::ecx::EcxCurve;
use crate::jwk::alg::ed::EdCurve;
use crate::jwk::Jwk;
use crate::util;
use crate::util::der::{DerClass, DerError, DerReader, DerType};
use crate::util::oid::{
    OID_ED25519, OID_ED448, OID_ID_EC_PUBLIC_KEY, OID_MGF1, OID_PRIME256V1, OID_RSASSA_PSS,
    OID_RSA_ENCRYPTION, OID_SECP256K1, OID_SECP384R1, OID_SECP521R1, OID_SHA1, OID_SHA256,
    OID_SHA384, OID_SHA512, OID_X25519, OID_X448,
};
use crate::util::HashAlgorithm;

#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum KeyAlg {
    Rsa,
    RsaPss {
        hash: Option<HashAlgorithm>,
        mgf1_hash: Option<HashAlgorithm>,
        salt_len: Option<u8>,
    },
    Ec {
        curve: Option<EcCurve>,
    },
    Ed {
        curve: Option<EdCurve>,
    },
    Ecx {
        curve: Option<EcxCurve>,
    },
}

#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum KeyFormat {
    Der { raw: bool },
    Pem { traditional: bool },
    Jwk,
}

#[derive(Debug, Clone, Eq, PartialEq)]
pub struct KeyInfo {
    format: KeyFormat,
    alg: Option<KeyAlg>,
    is_public_key: bool,
}

impl KeyInfo {
    pub fn format(&self) -> KeyFormat {
        self.format
    }

    pub fn alg(&self) -> Option<KeyAlg> {
        self.alg
    }

    pub fn is_public_key(&self) -> bool {
        self.is_public_key
    }

    pub fn detect(input: &impl AsRef<[u8]>) -> Option<KeyInfo> {
        let input = input.as_ref();
        if input.len() == 0 {
            return None;
        }

        let key_info = match input[0] {
            // DER
            b'\x30' => Self::detect_from_der(input)?,
            // PEM
            b'-' => {
                let (alg, data) = util::parse_pem(input.as_ref()).ok()?;
                match alg.as_str() {
                    "PRIVATE KEY" => {
                        let key_info = Self::detect_from_der(&data)?;
                        if key_info.is_public_key() {
                            return None;
                        }

                        KeyInfo {
                            format: KeyFormat::Pem { traditional: false },
                            alg: key_info.alg(),
                            is_public_key: key_info.is_public_key(),
                        }
                    }
                    "RSA PRIVATE KEY" => {
                        let key_info = Self::detect_from_der(&data)?;
                        if key_info.is_public_key() || !matches!(key_info.alg(), Some(KeyAlg::Rsa))
                        {
                            return None;
                        }

                        KeyInfo {
                            format: KeyFormat::Pem { traditional: true },
                            alg: key_info.alg(),
                            is_public_key: key_info.is_public_key(),
                        }
                    }
                    "RSA-PSS PRIVATE KEY" => {
                        let key_info = Self::detect_from_der(&data)?;
                        if key_info.is_public_key()
                            || !matches!(
                                key_info.alg(),
                                Some(KeyAlg::RsaPss {
                                    hash: _,
                                    mgf1_hash: _,
                                    salt_len: _,
                                })
                            )
                        {
                            return None;
                        }

                        KeyInfo {
                            format: KeyFormat::Pem { traditional: true },
                            alg: key_info.alg(),
                            is_public_key: key_info.is_public_key(),
                        }
                    }
                    "EC PRIVATE KEY" => {
                        let key_info = Self::detect_from_der(&data)?;
                        if ke


}

    console.log("Most relevant question:", mostRelevantQuestion);
  }

  const history = [
    { role: "user", parts: [{ text: "Hi my name is Bob" }] },
    { role: "model", parts: [{ text: "Hi Bob!" }] },
  ];

  await countChatTokens(history);

  const chat = ai.chats.create({
    model: "gemini-2.0-flash",
    history: history,
  });

  const chatResponse = await chat.sendMessage({
    message: "In one sentence, explain how a computer works to a young child.",
  });
  console.log("Chat response:", chatResponse.usageMetadata);

  const extraMessage = {
    role: "user",
    parts: [{ text: "What is the meaning of life?" }],
  };
  const combinedHistory = chat.getHistory();
  combinedHistory.push(extraMessage);

  await countChatTokens(combinedHistory);
}

main().catch(console.error);

// import {GoogleGenAI} from '@google/genai';
// import "dotenv/config";
// const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
// const prompt = "The quick brown fox jumps over the lazy dog.";
// const countTokensResponse = await ai.models.countTokens({
//   model: "gemini-2.0-flash",
//   contents: prompt,
// });
// console.log(countTokensResponse.totalTokens);

// const generateResponse = await ai.models.generateContent({
//   model: "gemini-2.0-flash",
//   contents: prompt,
// });
// console.log(generateResponse.usageMetadata);

import { vi, expect, test } from "vitest";
vi.mock("ai", () => ({
  generateText: vi.fn(),
}));

import { generateText } from "ai";
import stringComparison from 'string-comparison'

function semanticSimilarity(text1, text2) {
  let cos = stringComparison.cosine
  return cos.similarity(text1, text2);
}

test("generated text is semantically similar to expected output", async () => {
  generateText.mockResolvedValue(
    "AI greatly influences modern life in many ways."
  );

  const expected = "AI has a significant impact on modern society.";
  const generated = await generateText(
    "Describe the role of AI in today's world."
  );

  const similarity = semanticSimilarity(expected, generated);
  expect(similarity).toBeGreaterThan(0.7);
});

function validateConstraints(text, minWords, maxWords, requiredWords) {
  const words = text.split(/\s+/);
  return (
    words.length >= minWords &&
    words.length <= maxWords &&
    requiredWords.every((word) =>
      text.toLowerCase().includes(word.toLowerCase())
    )
  );
}

test("generated text meets constraints", async () => {
 generateText.mockResolvedValue({
  text: "Regular exercise significantly improves health and fitness by boosting energy, enhancing mood, and reducing the risk of many chronic diseases."
});

  const { text } = await generateText({
    model: "fakeModel",
    prompt:
      "Summarize the benefits of exercise in 20-30 words. Include 'health' and 'fitness'.",
  });

  console.log("Word count:", text.split(/\s+/).length);
  expect(validateConstraints(text, 20, 30, ["health", "fitness"])).toBe(true);
});
/** @type {import('tailwindcss').Config} */
module.exports = {
  darkMode: ['class'],
  content: ['./pages/**/*.{js,jsx}', './components/**/*.{js,jsx}', './app/**/*.{js,jsx}', './src/**/*.{js,jsx}'],
  prefix: '',
  theme: {
    container: {
      center: true,
      padding: '2rem',
      screens: {
        '2xl': '1400px',
      },
    },
    extend:


one .preview .success-mark,
.dropzone-previews .preview .success-mark {
  display: block;
  opacity: 0;
  filter: alpha(opacity=0);
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  -webkit-transition: opacity 0.4s ease-in-out;
  -moz-transition: opacity 0.4s ease-in-out;
  -o-transition: opacity 0.4s ease-in-out;
  -ms-transition: opacity 0.4s ease-in-out;
  transition: opacity 0.4s ease-in-out;
  background-image: url("../images/spritemap.png");
  background-repeat: no-repeat;
}
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
  .dropzone .preview .error-mark,
  .dropzone-previews .preview .error-mark,
  .dropzone .preview .success-mark,
  .dropzone-previews .preview .success-mark {
    background-image: url("../images/spritemap@2x.png");
    -webkit-background-size: 428px 406px;
    -moz-background-size: 428px 406px;
    background-size: 428px 406px;
  }
}
.dropzone .preview .error-mark span,
.dropzone-previews .preview .error-mark span,
.dropzone .preview .success-mark span,
.dropzone-previews .preview .success-mark span {
  display: none;
}
.dropzone .preview .error-mark,
.dropzone-previews .preview .error-mark {
  background-position: -268px -123px;
}
.dropzone .preview .success-mark,
.dropzone-previews .preview .success-mark {
  background-position: -268px -163px;
}
.dropzone .preview .progress .upload,
.dropzone-previews .preview .progress .upload {
  -webkit-animation: loading 0.4s linear infinite;
  -moz-animation: loading 0.4s linear infinite;
  -o-animation: loading 0.4s linear infinite;
  -ms-animation: loading 0.4s linear infinite;
  animation: loading 0.4s linear infinite;
  -webkit-transition: width 0.3s ease-in-out;
  -moz-transition: width 0.3s ease-in-out;
  -o-transition: width 0.3s ease-in-out;
  -ms-transition: width 0.3s ease-in-out;
  transition: width 0.3s ease-in-out;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-image: url("../images/spritemap.png");
  background-repeat: repeat-x;
  background-position: 0px -400px;
}
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
  .dropzone .preview .progress .upload,
  .dropzone-previews .preview .progress .upload {
    background-image: url("../images/spritemap@2x.png");
    -webkit-background-size: 428px 406px;
    -moz-background-size: 428px 406px;
    background-size: 428px 406px;
  }
}
.dropzone .preview.success .progress,
.dropzone-previews .preview.success .progress {
  display: block;
  opacity: 0;
  filter: alpha(opacity=0);
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  -webkit-transition: opacity 0.4s ease-in-out;
  -moz-transition: opacity 0.4s ease-in


      protected override void UnsubscribeEvents()
        {
            foreach (CoroutineHandle handle in coroutines)
                Timing.KillCoroutines(handle);
            base.UnsubscribeEvents();
        }

        private void ActivateMist(Player ply)
        {
            foreach (Player player in Player.List)
            {
                if (player.Role.Side == ply.Role.Side && player != ply)
                    coroutines.Add(Timing.RunCoroutine(DoMist(ply, player)));
            }
        }

        private IEnumerator<float> DoMist(Player activator, Player player)
        {
            for (int i = 0; i < Duration; i++)
            {
                if (player.Health + HealAmount >= player.MaxHealth ||
                    (player.Position - activator.Position).sqrMagnitude > 144f)
                    continue;

                player.Health += HealAmount;

                yield return Timing.WaitForSeconds(0.75f);
            }

            if ((activator.Position - player.Position).sqrMagnitude < 144f)
                player.ArtificialHealth += ProtectionAmount;
        }
    }
}


n");

  // Matches line containing method name and optimization id.
  final compilationRe = new RegExp(r'name "([^"]*)"\n\s+method "([^"]*)"');

  // Matches line containing the name field.
  final nameRe = new RegExp(r'name "([^"]*)"');

  // Current method and the list of all methods.
  var method, methods = [];

  // Start position of the current record.
  var start;

  // Find all tags in the string.
  for (var match in tagRe.allMatches(str)) {
    final tag = match.group(0);

    if (tag.startsWith("begin_")) {
      start = match.end;  // Just remember the start and wait for the end tag.
    } else if (tag == "end_compilation\n") {
      // This is the compilation record for the method.
      // Extract the name from the record.
      final substr = str.substring(start, match.start);
      parsing.match(substr, compilationRe, (name, methodName) {
        // Create the method and make it current.
        final m = new RegExp(r':(\d+)$').firstMatch(methodName);
        var optId;
        if (m != null) optId = m.group(1);
        method = new IR.Method(name_parser.parse(name),
                               optimizationId: optId);
        methods.add(method);
      });
    } else if (tag == "end_cfg\n") {
      // This is the cfg record containing blocks. No need to create substring
      // right away: its content will be needed only when this phase is
      // displayed.
      final substr = _deferSubstring(str, start, match.start);

      // Extract phase's name from the first line of the cfg record.
      final firstLine = str.substring(start, str.indexOf("\n", start));
      final name = nameRe.firstMatch(firstLine).group(1);

      method.phases.add(new IR.Phase(method, name, ir: substr));
    }
  }

  return methods;
}

/** Create a substring thunk. */
_deferSubstring(str, start, end) =>
  () => str.substring(start, end);

/** Parse given phase IR stored in the deferred substring thunk. */
Map parse(IR.Method method, Function ir, statusObject) {
  final stopwatch = new Stopwatch()..start();
  final parser = new CfgParser(method, ir())..parse();

  for (var deopt in method.deopts) {
    if (deopt.id == null) {
      continue;
    }

    final lirId = parser.bailouts[deopt.id];
    deopt.lir = parser.id2lir[lirId];

    final hirId = parser.lir2hir[lirId];
    deopt.hir = parser.id2hir[hirId];

    deopt.srcPos = parser.hir2pos[hirId];
  }

  final blocks = parser.builder.blocks;

  for (var block in blocks.values) {
    if (block.lir != null && block.hir != null) {
      for (var lirIns in block.lir) {
        final hirId = parser.lir2hir[lirIns.id];
        if (hirId != null) {
          final hirIns = parser.id2hir[hirId];
          if (hirIns.code == null) {
            hirIns.code = [];
          }
          hirIns.code.add(lirIns);
        }
      }
    }
  }

  isDead(block) =>
    block.predecessors.every((pred) => pred.marks.contains("dead") ||
                                       pred.marks.contains("deoptimizes"));

  final worklist = parser.deoptimizing;
  while (!worklist.isEmpty) {
    final block = worklist.removeLast();
    if (!block.marks


legend:"Нажмите ${link}"},{name:"Свернуть панель инструментов",legend:"Нажмите ${toolbarCollapse}"},{name:"Команды доступа к предыдущему фокусному пространству",legend:'Нажмите ${accessPreviousSpace}, чтобы обратиться к ближайшему недостижимому фокусному пространству перед символом "^", например: два смежных HR элемента. Повторите комбинацию клавиш, чтобы достичь отдаленных фокусных пространств.'},
{name:"Команды доступа к следующему фокусному пространству",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:"Справка по горячим клавишам",legend:"Нажмите ${a11yHelp}"}]}],backspace:"Backspace",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pause",capslock:"Caps Lock",escape:"Esc",pageUp:"Page Up",pageDown:"Page Down",end:"End",
home:"Home",leftArrow:"Стрелка влево",upArrow:"Стрелка вверх",rightArrow:"Стрелка вправо",downArrow:"Стрелка вниз",insert:"Insert","delete":"Delete",leftWindowKey:"Левая клавиша Windows",rightWindowKey:"Правая клавиша Windows",selectKey:"Выбрать",numpad0:"Цифра 0",numpad1:"Цифра 1",numpad2:"Цифра 2",numpad3:"Цифра 3",numpad4:"Цифра 4",numpad5:"Цифра 5",numpad6:"Цифра 6",numpad7:"Цифра 7",numpad8:"Цифра 8",numpad9:"Цифра 9",multiply:"Умножить",add:"Плюс",subtract:"Вычесть",decimalPoint:"Десятичная точка",
divide:"Делить",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"Точка с запятой",equalSign:"Равно",comma:"Запятая",dash:"Тире",period:"Точка",forwardSlash:"Наклонная черта",graveAccent:"Апостроф",openBracket:"Открыть скобку",backSlash:"Обратная наклонная черта",closeBracket:"Закрыть скобку",singleQuote:"Одинарная кавычка"});/*
 Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","th",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"ทั่วไป",items:[{name:"แถบเครื่อง


nes de correo, alias de correo, bases de datos y otras configuraciones asociadas con el dominio original se duplicarán, siempre que sea posible. Sin embargo, el contenido web no se cambiará de ninguna manera, por lo que si el servidor virtual contiene una aplicación web que se ha configurado para usar las bases de datos o el directorio de inicio del servidor anterior, será necesario reconfigurarlo manualmente después de la clonación.
 Al duplicar un servidor virtual de nivel superior, también debe ingresar un nuevo nombre de usuario y contraseña para poseer el nuevo dominio. Si el servidor tiene una dirección IP privada, se asignará automáticamente una nueva IP para el clon.
 El proceso de clonación copiará cualquier base de datos asociada con el dominio original con nuevos nombres y duplicará su contenido. Sin embargo, es posible que no actualice todas las aplicaciones web instaladas en el dominio original que estén configuradas para utilizar las bases de datos originales. Esto debe hacerse manualmente.

Štýl názvu domény v používateľských menách Táto možnosť určuje, či názov domény použitý v používateľských menách, ktoré obsahujú doménu, bude úplný názov domény, tj "virtualmin.com", iba prvá časť, tj "virtualmin", alebo názov používateľa/skupiny pre doménu. V predvolenom nastavení sa názov skupiny používa pre nové servery najvyššej úrovne a prvá časť domény sa používa pre podservery.
 V niektorých prostrediach môže byť pre používateľov jednoduchšie porozumieť používateľskému menu ako „joeuser@virtualmin.com“ pre svoje prihlasovacie meno POP/IMAP alebo FTP ako „joeuser.virtualmin“.
 Toto pole tiež určuje, ako sa vypočíta prefix nového virtuálneho servera. Možnosti sú:

 Úplný názov domény
 Predpona je vždy rovnaká ako názov domény.

 Používateľské meno alebo prvá časť domény
 Predpona je rovnaká ako názov skupiny Unix virtuálneho servera, ak ide o virtuálny server najvyššej úrovne. V opačnom prípade platí nasledujúca možnosť.

 Prvá časť domény
 Predpona je prvou časťou domény, pokiaľ už túto predponu nepoužíva iný virtuálny server. Pre doménu <tt>foo.com.au</tt> by teda predpona bola (v poradí podľa preferencie) <tt>foo</tt> , <tt>foo.com</tt> alebo <tt>foo.com.au</tt> .

 Vlastný vzor regulárneho výrazu
 Predpona sa automaticky vygeneruje na základe vlastného vzoru regulárneho výrazu, ako je <tt>u-[0-9]{4}</tt> alebo <tt>[az]-[0-9]{2}</tt> alebo


	public SVGPathSegCurvetoCubic createSVGPathSegCurvetoCubic(final CubicCurveTo elt) {
		return new SVGPathSegCurvetoCubic(elt.getX(), elt.getY(), elt.getControlX1(), elt.getControlY1(), elt.getControlX2(),
			elt.getControlY2(), !elt.isAbsolute());
	}
}
/*
 * This file is part of LaTeXDraw.
 * Copyright (c) 2005-2020 Arnaud BLOUIN
 * LaTeXDraw 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 2 of the License, or (at your option) any later version.
 * LaTeXDraw is distributed 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.
 */
package net.sf.latexdraw.view.jfx;

import java.util.Optional;
import javafx.scene.shape.CubicCurveTo;
import javafx.scene.shape.LineTo;
import javafx.scene.shape.MoveTo;
import javafx.scene.shape.Path;
import net.sf.latexdraw.model.api.shape.ArrowableSingleShape;
import net.sf.latexdraw.model.api.shape.Point;

/**
 * An implementation of ViewArrowable for path-based views.
 */
class ViewArrowableTraitPath<T extends ArrowableSingleShape> extends ViewArrowableTrait<Path, T> {
	private final PathElementProducer pathProducer;

	ViewArrowableTraitPath(final ViewSingleShape<T, Path> view, final PathElementProducer pathProducer) {
		super(view);
		this.pathProducer = pathProducer;
	}

	@Override
	protected void clipPath(final Path path) {
		final Path clip = pathProducer.clonePath(path);
		clip.setFill(path.getFill());
		clip.setStrokeWidth(path.getStrokeWidth());

		if(!clip.getElements().isEmpty()) { // Defensive programming
			final Optional<Point> pt1 = getArrowReducedPoint(arrows.get(0).arrow);
			final Optional<Point> pt2 = getArrowReducedPoint(arrows.get(arrows.size() - 1).arrow);

			if(pt1.isPresent() && clip.getElements().get(0) instanceof MoveTo) { // Defensive programming
				// Changing the first point to the one at the beginning of the arrow.
				final MoveTo moveTo = (MoveTo) clip.getElements().get(0);
				moveTo.setX(pt1.get().getX());
				moveTo.setY(pt1.get().getY());
			}

			pt2.ifPresent(pt -> {
				if(clip.getElements().get(clip.getElements().size() - 1) instanceof LineTo) {
					final LineTo lineTo = (LineTo) clip.getElements().get(clip.getElements().size() - 1);
					lineTo.setX(pt.getX());
					lineTo.setY(pt.getY());
				}else if(clip.getElements().get(clip.getElements().size() - 1) instanceof CubicCurveTo) {
					final CubicCurveTo ccTo = (CubicCurveTo) clip.getElements().get(clip.getElements().size() - 1);
					ccTo.setX(pt.getX());
					ccTo.setY(pt.getY());
				}
			});
		}

		clip.setStrokeWidth(path.getStrokeWidth());
		clip.setStrokeLineCap(path.getStrokeLineCap());
		path.setClip(clip);
	}
}
/*
 * This file is part of LaTeXDraw.
 * Copyright (c) 2005-2020 Arnaud BL