     * head of the queue by being re-processed ad nauseam.
     *
     * @param convert The function to call with the locked upload.
     * @param logger The logger instance.
     */
    public async dequeueAndConvert(
        convert: (upload: pgModels.LsifUpload, entityManager: EntityManager) => Promise<void>,
        logger: Logger
    ): Promise<boolean> {
        // First, we select the next oldest upload with a state of `queued` and set
        // its state to `processing`. We do this outside of a transaction so that this
        // state transition is visible to the API. We skip any locked rows as they are
        // being handled by another worker process.
        const lockResult: [{ id: number }[]] = await this.connection.query(`
            UPDATE lsif_uploads u SET state = 'processing', started_at = now() WHERE id = (
                SELECT id FROM lsif_uploads
                WHERE state = 'queued'
                ORDER BY uploaded_at
                FOR UPDATE SKIP LOCKED LIMIT 1
            )
            RETURNING u.id
        `)
        if (lockResult[0].length === 0) {
            return false
        }
        const uploadId = lockResult[0][0].id

        return withInstrumentedTransaction(this.connection, async entityManager => {
            const results: object[] = await entityManager.query(
                'SELECT * FROM lsif_uploads WHERE id = $1 FOR UPDATE LIMIT 1',
                [uploadId]
            )
            if (results.length === 0) {
                // Record was deleted in race, retry
                return this.dequeueAndConvert(convert, logger)
            }

            // Transform locked result into upload entity
            const repo = entityManager.getRepository(pgModels.LsifUpload)
            const meta = repo.manager.connection.getMetadata(pgModels.LsifUpload)
            const transformer = new PlainObjectToDatabaseEntityTransformer(repo.manager)
            const upload = (await transformer.transform(results[0], meta)) as pgModels.LsifUpload

            try {
                await convert(upload, entityManager)
            } catch (error) {
                logger.error('Failed to convert upload', { error })

                await entityManager.query(
                    `
                        UPDATE lsif_uploads
                        SET state = 'errored', finished_at = now(), failure_summary = $2, failure_stacktrace = $3
                        WHERE id = $1
                    `,
                    [uploadId, error?.message, error?.stack]
                )
            }

            return true
        })
    }

    /**
     * Mark an upload as complete and set its finished timestamp.
     *
     * @param upload The upload.
     * @param entityManager The EntityManager to use as part of a transaction.
     */
    public markComplete(
        upload: pgModels.LsifUpload,
        entityManager: EntityManager = this.connection.createEntityManager()
    ): Promise<void> {
        return entityManager.query("UPDATE lsif_uploads SET state = 'completed', finished_at = now() WHERE id = $1", [
            upload.id,
        ])
    }
}
import { ExtendedJSONSchema } from "../jsonschema"
import validateQueryObject from "./validateQueryObject"

const NumberField: ExtendedJSONSchema = {
  title: "myNum",
  type: "number"
}

const DateField: ExtendedJSONSchema = {
  title: "dat",
  type: "string",
  format: "date-time"
}

const NumberFieldNested: ExtendedJSONSchema = {
  title: "my",
  type: "obj


//
//  BmobRole.h
//  BmobSDK
//
//  Created by Bmob on 14-5-9.
//  Copyright (c) 2014年 Bmob. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "BmobObject.h"

@class BmobQuery;
@class BmobACL;

@interface BmobRole : BmobObject
/**
 *  角色名
 */
@property (nonatomic, copy) NSString *name;

/**
 *  查询Role表
 *
 *  @return BmobQuery查询对象
 */
+(BmobQuery *)query;

/**
 *  创建BmobRole对象
 *
 *  @param name 角色名
 *
 *  @return BmobRole对象
 */
-(instancetype)initWithName:(NSString *)name;

/**
 *  创建BmobRole对象
 *
 *  @param name 角色名
 *  @param acl  ACL权限
 *
 *  @return BmobRole对象
 */
-(instancetype)initWithName:(NSString *)name acl:(BmobACL *)acl;

/**
 *  创建BmobRole对象
 *
 *  @param name 角色名
 *
 *  @return BmobRole对象
 */
+(instancetype)roleWithName:(NSString *)name;

/**
 *  创建BmobRole对象
 *
 *  @param name 角色名
 *  @param acl  ACL权限
 *
 *  @return  BmobRole对象
 */
+(instancetype)roleWithName:(NSString *)name acl:(BmobACL *)acl;

/**
 *  角色表里面的users列
 *
 *  @param relation 关联user表的关联对象
 */
-(void)addUsersRelation:(BmobRelation*)relation;

/**
 *  角色表里面的roles列
 *
 *  @param relation 关联roles表的关联对象
 */
-(void)addRolesRelation:(BmobRelation*)relation;
@end


/**
 * \file
 *
 * \brief USB Device Human Interface Device (HID) interface definitions.
 *
 * Copyright (c) 2009-2012 Atmel Corporation. All rights reserved.
 *
 * \asf_license_start
 *
 * \page License
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 * 3. The name of Atmel may not be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * 4. This software may only be redistributed and used in connection with an
 *    Atmel microcontroller product.
 *
 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * \asf_license_stop
 *
 */

#ifndef _UDI_HID_H_
#define _UDI_HID_H_

#include "conf_usb.h"
#include "usb_protocol.h"
#include "usb_protocol_hid.h"
#include "udd.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * \ingroup udi_group
 * \defgroup udi_hid_group USB Device Interface (UDI) for Human Interface Device (HID)
 *
 * Common library for all Human Interface Device (HID) implementation.
 *
 * @{
 */

/**
 * \brief Decode HID setup request
 *
 * \param rate         Pointer on rate of current HID interface
 * \param protocol     Pointer on protocol of current HID interface
 * \param report_desc  Pointer on report descriptor of current HID interface
 * \param set_report   Pointer on set_report callback of current HID interface
 *
 * \return \c 1 if function was successfully done, otherwise \c 0.
 */
bool udi_hid_setup( uint8_t *rate, uint8_t *protocol, uint8_t *report_desc, bool (*set_report)(void) );

//@}

#ifdef __cplusplus
}
#endif
#endif // _UDI_HID_H_


35年前にできたプロトコルであるため、古さを感じさせます。設計の際には、プライバシーやセキュリティはまったく考慮されませんでした。ブラウザー、オペレーティングシステム、アプリ、およびルーターのメーカーとの対話で、1.1.1.1のようなプライバシー優先のサービスでさえも、DNSは元来暗号化されてないため、ネットワーク接続を監視しているだれにでもデータが漏洩するということをほぼ全員が嘆きました。ISPのようなだれかが自らDNSリゾルバーを実行する場合よりも監視が難しくなりますが、それでも安全ではありません。

必要なのは、新しい、最新のプロトコルへの移行です。手法はいくつかあります。1つがDNS Over TLSです。これは、現行のDNSプロトコルを使用し、トランスポート層の暗号化を追加します。もう1つがDNS Over HTTPSです。セキュリティだけでなく、他のトランスポート層（QUICなど）のサポートやサーバーのHTTP/2サーバープッシュの新技術などの、最新のすべての拡張も含まれます。DNS Over TLSとDNS Over HTTPSのどちらもオープンスタンダードです。また、開始時に当社は1.1.1.1が両方をサポートするようにしました。

DNS Over HTTPSは、高速で暗号化されており、解析が容易なため、特に見込みがあると考えています。今までは、Googleが、DNS Over HTTPSをサポートする唯一のスケールプロバイダーでした。しかし、明らかな理由で、Chrome以外のブラウザーとAndroid以外のオペレーティングシステムは、競合他社にデータを送信するサービスの構築に気乗りしていませんでした。現在は独立系のDNS Over HTTPSサービスを利用できるようになったため、このプロトコルをサポートするために、ブラウザー、オペレーティングシステム、ルーター、およびアプリ側の実験が増加することを願っています。

当社がこのようなサービスの唯一の提供者になる必要はありません。More diversity in DNS providers is a Good Thing™（DNSプロバイダーの多様性が広がるのは良いことです）。DNS Over HTTPSを提供するネットワークの堅牢なエコシステムが開発をサポートするようになれば、より良いインターネットの構築をサポートするという当社のミッションが促進され、当社の誇りの1つとなります。

すべてを結びつける

<a href="https://www.dnsperf


ing (js_value);

    g_task_return_pointer (task, retval, (GDestroyNotify)g_free);
  } else {
    g_task_return_error (task, error);
  }

  g_object_unref (task);
}

void
ephy_web_view_get_web_app_manifest_url (EphyWebView         *view,
                                        GCancellable        *cancellable,
                                        GAsyncReadyCallback  callback,
                                        gpointer             user_data)
{
  GTask *task;

  g_assert (EPHY_IS_WEB_VIEW (view));

  task = g_task_new (view, cancellable, callback, user_data);
  webkit_web_view_evaluate_javascript (WEBKIT_WEB_VIEW (view),
                                       "Ephy.getWebAppManifestURL();",
                                       -1,
                                       ephy_embed_shell_get_guid (ephy_embed_shell_get_default ()),
                                       NULL,
                                       cancellable,
                                       (GAsyncReadyCallback)get_web_app_manifest_url_cb,
                                       task);
}

char *
ephy_web_view_get_web_app_manifest_url_finish (EphyWebView   *view,
                                               GAsyncResult  *result,
                                               GError       **error)
{
  g_assert (g_task_is_valid (result, view));

  return g_task_propagate_pointer (G_TASK (result), error);
}

void
ephy_web_view_set_location_entry_position (EphyWebView *self,
                                           int          position)
{
  self->location_entry_position = position;
}

int
ephy_web_view_get_location_entry_position (EphyWebView *self)
{
  return self->location_entry_position;
}

void
ephy_web_view_set_location_entry_has_focus (EphyWebView *self,
                                            gboolean     focus)
{
  self->location_entry_has_focus = focus;
}

gboolean
ephy_web_view_get_location_entry_has_focus (EphyWebView *self)
{
  return self->location_entry_has_focus;
}


ClearEnumIn() {
	protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0)
	x.xxx_hidden_EnumIn = EnumTest_TEST_ENUM_UNSPECIFIED
}

func (x *EnumTest) ClearEnumNotIn() {
	protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1)
	x.xxx_hidden_EnumNotIn = EnumTest_TEST_ENUM_UNSPECIFIED
}

func (x *EnumTest) ClearEnumInAndNotIn() {
	protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 2)
	x.xxx_hidden_EnumInAndNotIn = EnumTest_TEST_ENUM_UNSPECIFIED
}

func (x *EnumTest) ClearEnumConst() {
	protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 3)
	x.xxx_hidden_EnumConst = EnumTest_TEST_ENUM_UNSPECIFIED
}

func (x *EnumTest) ClearEnumRequired() {
	protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 4)
	x.xxx_hidden_EnumRequired = EnumTest_TEST_ENUM_UNSPECIFIED
}

type EnumTest_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

	EnumIn         *EnumTest_TestEnum
	EnumNotIn      *EnumTest_TestEnum
	EnumInAndNotIn *EnumTest_TestEnum
	EnumConst      *EnumTest_TestEnum
	EnumRequired   *EnumTest_TestEnum
}

func (b0 EnumTest_builder) Build() *EnumTest {
	m0 := &EnumTest{}
	b, x := &b0, m0
	_, _ = b, x
	if b.EnumIn != nil {
		protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 5)
		x.xxx_hidden_EnumIn = *b.EnumIn
	}
	if b.EnumNotIn != nil {
		protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 5)
		x.xxx_hidden_EnumNotIn = *b.EnumNotIn
	}
	if b.EnumInAndNotIn != nil {
		protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 2, 5)
		x.xxx_hidden_EnumInAndNotIn = *b.EnumInAndNotIn
	}
	if b.EnumConst != nil {
		protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 3, 5)
		x.xxx_hidden_EnumConst = *b.EnumConst
	}
	if b.EnumRequired != nil {
		protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 4, 5)
		x.xxx_hidden_EnumRequired = *b.EnumRequired
	}
	return m0
}

type RepeatedEnumTest struct {
	state                     protoimpl.MessageState      `protogen:"opaque.v1"`
	xxx_hidden_RepeatedEnumIn []RepeatedEnumTest_TestEnum `protobuf:"varint,1,rep,packed,name=repeated_enum_in,json=repeatedEnumIn,enum=test.v1.RepeatedEnumTest_TestEnum"`
	unknownFields             protoimpl.UnknownFields
	sizeCache                 protoimpl.SizeCache
}

func (x *RepeatedEnumTest) Reset() {
	*x = RepeatedEnumTest{}
	mi := &file_test_v1_test_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*


）集群的客户，需要在集群内外以一致的方式提供服务。

Federated Service 的核心是包含一个 Template（Kubernetes 服务的定义）、一个 Placement（部署到哪个集群）、一个 Override（在特定集群中的可选变化）和一个 ServiceDNSRecord（指定如何发现它的细节）。

注意：联邦服务必须是 LoadBalancer 类型，以便它可以跨集群发现。

### Pod 如何发现联邦服务

默认情况下，Kubernetes 集群预先配置了集群本地 DNS 服务器，以及智能构建的 DNS 搜索路径，它们共同确保了由 pod 内部运行的软件发出的 myservice、`myservice.mynamespace `或 `some-other-service.other-namespace` 等 DNS 查询会自动扩展并正确解析到本地集群中运行的服务的相应 IP。

随着联邦服务和跨集群服务发现的引入，这个概念被扩展到全局覆盖在你的集群联邦中所有集群中运行的 Kubernetes 服务。为了利用这个扩展的范围，我们需要使用一个稍微不同的 DNS 名称（例如 `myservice.mynamespace.myfederation`）来解析联邦服务。使用不同的 DNS 名还可以避免现有的应用意外地穿越区域网络而会产生不必要的网络费用或延迟。

让我们看一个例子，使用一个名为 nginx 的服务。

在 `us-central1-a` 可用区的集群中的一个 pod 需要联系我们的 nginx 服务。它现在可以使用服务的联邦 DNS 名，即 `nginx.mynamespace.myfederation` ，而不是使用服务的传统集群本地 DNS 名（即  `nginx.mynamespace` 自动扩展为 `nginx.mynamespace.svc.cluster.local`）。这将被自动扩展并解析到离我的 nginx 服务最近的健康 shard。如果本地集群中存在一个健康的 shard，那么该服务的集群本地 IP 地址将被返回（通过集群本地 DNS）。这完全等同于非联邦服务解析。

如果服务在本地集群中不存在（或者存在但没有健康的后端 pod），DNS 查询会自动扩展到 `nginx.mynamespace.myfederation.svc.us-central1-a.example.com`。在幕后，这可以找到离我们的可用区最近的一个 shard 的外部 IP。这个扩展是由集群本地 DNS 服务器自动执行的，它返回相关的 CNAME 记录。这就导致了对 DNS 记录的层次结构的遍历，并最终找到附近联邦服务的一个外部 IP。

也可以通过明确指定适当的 DNS 名称，而不是依赖


   midiCC: MidiCCValues.bCC_OverDriveTone,
        midiControllerHandle: MidiControllerHandles.ampMiddle),
    Parameter(
        name: "Treble",
        handle: "treble",
        value: 63,
        formatter: ValueFormatters.percentage,
        devicePresetIndex: PresetDataIndexPlugAir.amptreble,
        midiCC: MidiCCValues.bCC_OverDriveLevel,
        midiControllerHandle: MidiControllerHandles.ampTreble),
    Parameter(
        name: "Mid Freq",
        handle: "mid_freq",
        value: 63,
        formatter: ValueFormatters.percentage,
        devicePresetIndex: PresetDataIndexPlugAir.amptone, //check this
        midiCC: MidiCCValues.bCC_AmpPresence,
        midiControllerHandle: MidiControllerHandles.ampTone),
  ];
  @override
  int? getEquivalentEffect(int version) {
    if (version == PlugAirVersion.PlugAir21.index) return AGLv2().nuxIndex;
    return nuxIndex;
  }
}
// (c) 2020-2021 Dian Iliev (Tuntorius)
// This code is licensed under MIT license (see LICENSE.md for details)

import 'dart:math';

import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/semantics.dart';
import 'package:tinycolor2/tinycolor2.dart';

class SliderRangeValues {
  double start;
  double end;
  SliderRangeValues(this.start, this.end);

  SliderRangeValues operator *(double value) {
    return SliderRangeValues(start * value, end * value);
  }
}

class ThickRangeSlider extends StatefulWidget {
  final Color activeColor;
  final String label;
  final double min, max;
  final SliderRangeValues values;
  final ValueChanged<SliderRangeValues>? onDragStart;
  final Function(SliderRangeValues value, bool skip)? onChanged;
  final ValueChanged<SliderRangeValues>? onDragEnd;
  final String Function(SliderRangeValues) labelFormatter;
  final int skipEmitting;
  final bool enabled;
  final bool handleVerticalDrag;
  final double? maxHeight;

  const ThickRangeSlider(
      {Key? key,
      required this.activeColor,
      required this.label,
      this.min = 0,
      this.max = 1,
      required this.values,
      this.onDragStart,
      this.onChanged,
      this.onDragEnd,
      this.handleVerticalDrag = true,
      required this.labelFormatter,
      this.skipEmitting = 3,
      this.enabled = true,
      this.maxHeight})
      : super(key: key);

  @override
  State createState() => _ThickRangeSliderState();
}

class _ThickRangeSliderState extends State<ThickRangeSlider> {
  SliderRangeValues factor =
      SliderRangeValues(0.2, 0.8); //normalized position in 0-1
  SliderRangeValues pos = SliderRangeValues(0, 1);
  int lastTapDown = 0;
  int emitCounter = 0;
  double scale = 1;

  Offset startDragPos = const Offset(0, 0);
  double width = 0;
  double height = 0;

  int handleIndex = 0;

  // Returns a number between min and max, proportional to value, which must
  // be between 0.0 and 1.0.
  double _lerpSingle(double value) {
    assert(value >= 0.0);
    assert(value <= 1.0);
    return value * (widget.max - widget.min) + widget.min;
  }

  SliderRangeValues _lerp(SliderRangeValues values) {
    return SliderRangeValues(
        _lerpSingle(values.start), _lerpSingle(values.end));
  }

  //same as above, only with custom min and max
  double _lerp2Single(double value


Eigen::Vector3d angMomentum = Eigen::Vector3d::Zero();
  for (auto* bn : skel->getBodyNodes()) {
    angMomentum += dart::math::dAdInvT(
                       bn->getWorldTransform(),
                       bn->getSpatialInertia() * bn->getSpatialVelocity())
                       .head<3>();
  }
  return angMomentum;
}

//==============================================================================
TEST(Issue1193, SingleBody)
{
  WorldPtr world = World::create();
  const double dt = 0.001;
  world->setTimeStep(dt);
  world->setGravity(Vector3d::Zero());
  SkeletonPtr skel = createBox({1, 1, 1});
  world->addSkeleton(skel);
  auto rootBn = skel->getRootBodyNode();

  Eigen::Vector3d initPosition = rootBn->getWorldTransform().translation();
  Vector6d vels = compose({0, 25, 0}, {0, 0, -100});

  rootBn->getParentJoint()->setVelocities(vels);

  rootBn->addExtTorque({0, 50, 0});
  for (int i = 0; i < g_iters; ++i) {
    world->step();
  }
  Eigen::Vector3d positionDiff
      = rootBn->getWorldTransform().translation() - initPosition;
  EXPECT_NEAR(0.0, positionDiff.x(), tol);
  EXPECT_NEAR(0.0, positionDiff.y(), tol);
  EXPECT_NEAR(g_iters * dt * vels[5], positionDiff.z(), tol);
}

//==============================================================================
TEST(Issue1193, SingleBodyWithOffDiagonalMoi)
{
  WorldPtr world = World::create();
  const double dt = 0.001;
  world->setTimeStep(dt);
  world->setGravity(Vector3d::Zero());
  SkeletonPtr skel = createBox({1, 4, 9});
  world->addSkeleton(skel);
  auto rootBn = skel->getRootBodyNode();
  rootBn->setMomentOfInertia(1.1, 1.1, 0.7, 0.1, 0, 0);
  Eigen::Vector3d initPosition = rootBn->getWorldTransform().translation();

  // Setting this to compose({0, 25, 0}, {0, 0, -100}) causes the test to fail.
  Vector6d vels = compose({0, 2.5, 0}, {0, 0, -10.0});

  rootBn->getParentJoint()->setVelocities(vels);

  rootBn->addExtTorque({0, 50, 0});
  //
  for (int i = 0; i < g_iters; ++i) {
    world->step();
  }
  Eigen::Vector3d positionDiff
      = rootBn->getWorldTransform().translation() - initPosition;
  EXPECT_NEAR(0.0, positionDiff.x(), tol);
  EXPECT_NEAR(0.0, positionDiff.y(), tol);
  EXPECT_NEAR(g_iters * dt * vels[5], positionDiff.z(), tol);
}

//==============================================================================
TEST(Issue1193, SingleBodyWithJointOffset)
{
  WorldPtr world = World::create();
  const double dt = 0.001;
  world->setTimeStep(dt);
  world->setGravity(Vector3d::Zero());
  SkeletonPtr skel = createBox({1, 1, 1});
  world->addSkeleton(skel);
  auto rootBn = skel->getRootBodyNode();
  rootBn->setMomentOfInertia(1.1, 1.1, 0.7, 0.1, 0, 0);
  Eigen::Vector3d initPosition = rootBn->getWorldTransform().translation();

  Vector6d vels = compose({0, 2.5, 0}, {0, 0, -10});

  auto* freeJoint = dynamic_cast<FreeJoint*>(rootBn->getParentJoint


arkMessageStore.CHECK_NATURE_OF_TABLE_WITH_CAPTION_MSG,
                HtmlElementStore.TABLE_ELEMENT,
                1);

        //----------------------------------------------------------------------
        //------------------------------3NMI-04--------------------------------
        //----------------------------------------------------------------------
        processResult = processPageTest("Rgaa30.Test.5.4.1-3NMI-04");
        checkResultIsPreQualified(processResult, 2, 1);
        checkRemarkIsPresent(
                processResult,
                TestSolution.NEED_MORE_INFO,
                RemarkMessageStore.CHECK_NATURE_OF_TABLE_WITHOUT_CAPTION_MSG,
                HtmlElementStore.TABLE_ELEMENT,
                1);

        //----------------------------------------------------------------------
        //------------------------------4NA-01----------------------------------
        //----------------------------------------------------------------------
        checkResultIsNotApplicable(processPageTest("Rgaa30.Test.5.4.1-4NA-01"));

        //----------------------------------------------------------------------
        //------------------------------4NA-02----------------------------------
        //----------------------------------------------------------------------
        checkResultIsNotApplicable(processPageTest("Rgaa30.Test.5.4.1-4NA-02"));
    }

}
/*
 * Asqatasun - Automated webpage assessment
 * Copyright (C) 2008-2020  Asqatasun.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact us by mail: asqatasun AT asqatasun DOT org
 */

package org.asqatasun.rules.rgaa30;

import org.asqatasun.ruleimplementation.AbstractPageRuleWithSelectorAndCheckerImplementation;
import org.asqatasun.rules.elementchecker.pertinence.TextPertinenceChecker;
import org.asqatasun.rules.elementselector.SimpleElementSelector;
import static org.asqatasun.rules.keystore.CssLikeQueryStore.LEGEND_WITHIN_FIELDSET_CSS_LIKE_QUERY;
import static org.asqatasun.rules.keystore.HtmlElementStore.TEXT_ELEMENT2;
import static org.asqatasun.rules.keystore.RemarkMessageStore.CHECK_LEGEND_PERTINENCE_MSG;
import static org.asqatasun.rules.keystore.RemarkMessageStore.NOT_PERTINENT_LEGEND_MSG;

/**
 * Implementation of the rule 11.7.1 of the referential Rgaa 3.0.
 *

 * For more details about the implementation, refer to the rule 11.7.1 design page.
 * @see  11.7.1 rule specification
 *
 */
public class Rgaa30Rule110701  extends AbstractPageRuleWithSelectorAndCheckerImplementation {

    public Rgaa30Rule110701 () {
        super (
                 new SimpleElementSelector(LEGEND_WITHIN_FIELDSET_CSS_LIKE_QUERY),
                 new TextPertinenceChecker(
                    // check emptiness
                    true,
                    // no comparison with other attributes
                    null,


if des == nil {
		return nw
	}

	// Lengths are unequal. A diff will occur later, so we shouldn't canonicalize.
	// Return the original array.
	if len(des) != len(nw) {
		return nw
	}

	var items []AttestorUserOwnedDrydockNote
	for i, d := range des {
		n := nw[i]
		items = append(items, *canonicalizeNewAttestorUserOwnedDrydockNote(c, &d, &n))
	}

	return items
}

func canonicalizeAttestorUserOwnedDrydockNotePublicKeys(des, initial *AttestorUserOwnedDrydockNotePublicKeys, opts ...dcl.ApplyOption) *AttestorUserOwnedDrydockNotePublicKeys {
	if des == nil {
		return initial
	}
	if des.empty {
		return des
	}

	if initial == nil {
		return des
	}

	cDes := &AttestorUserOwnedDrydockNotePublicKeys{}

	if dcl.StringCanonicalize(des.Comment, initial.Comment) || dcl.IsZeroValue(des.Comment) {
		cDes.Comment = initial.Comment
	} else {
		cDes.Comment = des.Comment
	}
	if dcl.StringCanonicalize(des.Id, initial.Id) || dcl.IsZeroValue(des.Id) {
		cDes.Id = initial.Id
	} else {
		cDes.Id = des.Id
	}
	if dcl.StringCanonicalize(des.AsciiArmoredPgpPublicKey, initial.AsciiArmoredPgpPublicKey) || dcl.IsZeroValue(des.AsciiArmoredPgpPublicKey) {
		cDes.AsciiArmoredPgpPublicKey = initial.AsciiArmoredPgpPublicKey
	} else {
		cDes.AsciiArmoredPgpPublicKey = des.AsciiArmoredPgpPublicKey
	}
	cDes.PkixPublicKey = canonicalizeAttestorUserOwnedDrydockNotePublicKeysPkixPublicKey(des.PkixPublicKey, initial.PkixPublicKey, opts...)

	return cDes
}

func canonicalizeAttestorUserOwnedDrydockNotePublicKeysSlice(des, initial []AttestorUserOwnedDrydockNotePublicKeys, opts ...dcl.ApplyOption) []AttestorUserOwnedDrydockNotePublicKeys {
	if des == nil {
		return initial
	}

	if len(des) != len(initial) {

		items := make([]AttestorUserOwnedDrydockNotePublicKeys, 0, len(des))
		for _, d := range des {
			cd := canonicalizeAttestorUserOwnedDrydockNotePublicKeys(&d, nil, opts...)
			if cd != nil {
				items = append(items, *cd)
			}
		}
		return items
	}

	items := make([]AttestorUserOwnedDrydockNotePublicKeys, 0, len(des))
	for i, d := range des {
		cd := canonicalizeAttestorUserOwnedDrydockNotePublicKeys(&d, &initial[i], opts...)
		if cd != nil {
			items = append(items, *cd)
		}
	}
	return items

}

func canonicalizeNewAttestorUserOwnedDrydockNotePublicKeys(c *Client, des, nw *AttestorUserOwnedDrydockNotePublicKeys) *AttestorUserOwnedDrydockNotePublicKeys {

	if des == nil {
		return nw
	}

	if nw == nil {
		if dcl.IsEmptyValueIndirect(des) {
			c.Config.Logger.Info("Found explicitly empty value for AttestorUserOwnedDrydockNotePublicKeys while comparing non-nil desired to nil actual.  Returning desired object.")
			return des
		}
		return nil
	}

	if dcl.StringCanonicalize(des.Comment, nw.Comment) {
		nw.Comment = des.Comment
	}
	if dcl.StringCanonicalize(des.Id, nw.Id) {
		nw.Id = des.Id
	}
	if


装uv包管理器**：
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

2. **克隆项目**：
```bash
git clone <repository-url>
cd ODogExample
```

3. **安装Python和依赖**：
```bash
# 使用uv安装Python 3.12
uv python install 3.12

# 同步项目依赖
uv sync
```

4. **运行应用程序**：
```bash
# 使用uv运行
uv run -m ODogExample.gui.app_entry
```

### 一键启动
如果已安装uv，直接在项目根目录运行：
```bash
uv run -m ODogExample.gui.app_entry
```

## 🎯 项目概述

ODogExample 是一个基于 PySide6 + MuJoCo 的 8 自由度四足机器狗 GUI 应用，专注于四足机器人研发过程中的"过程"探索。

### 🚀 当前状态
- **整体完成度**: **95%** (核心功能已完成，动作编辑器基本完成)
- **开发阶段**: 动作编辑器完善和体验优化
- **项目状态**: ✅ **可用状态** - 核心功能完整，可投入使用

### 核心功能
1. ✅ **8自由度关节实时控制** - 完整的关节映射和控制系统
2. ✅ **专业级3D渲染系统** - 通用轨道相机 + MuJoCo物理引擎
3. ✅ **姿态管理系统** - 完整的姿态保存、加载、管理功能
4. ✅ **动作序列编辑器** - Tab页式动作编辑和播放功能

### 技术栈
- **GUI框架**: PySide6 (Qt6)
- **物理引擎**: MuJoCo
- **3D渲染**: OpenGL + MuJoCo Viewer
- **数据格式**: JSON (配置和姿态数据)
- **架构模式**: 模块化设计 + 信号槽通信

## 📁 项目目录结构

```
ODogExample/
├── 📂 core/                  # 核心功能模块
│   ├── __init__.py
│   ├── robot_model.py        # ✅ 机器人模型封装 (MuJoCo集成)
│   ├── joint_mapping.py      # ✅ 8自由度关节定义和映射
│   └── pose_manager.py       # ✅ 姿态管理（保存/加载/管理）
├── 📂 gui/                   # GUI界面模块 (模块化重构完成)
│   ├── __init__.py
│   ├── 📄 核心应用
│   │   ├── app_entry.py      # ✅ 应用程序入口
│   │   ├── app_main.py       # ✅ 主应用程序窗口
│   │   └── app_signals.py    # ✅ 全局信号管理
│   ├── 📄 核心功能组件
│


Map<>(), new NtDynamic("{}")), new Callback<>() {
        @Override
        public void success(WebResponse value) {
          Assert.fail();
        }

        @Override
        public void failure(ErrorCodeException ex) {
          Assert.assertEquals(625676, ex.code);
          latch.countDown();
        }
      });
      service.webGet(KEY, new WebGet(CONTEXT, "/something.js", new TreeMap<>(), new NtDynamic("{}")), new Callback<>() {
        @Override
        public void success(WebResponse value) {
          Assert.assertEquals("function... blah...blah...blah", value.body);
          latch.countDown();
        }

        @Override
        public void failure(ErrorCodeException ex) {
          ex.printStackTrace();
        }
      });
      service.webGet(KEY, new WebGet(CONTEXT, "/something.css", new TreeMap<>(), new NtDynamic("{}")), new Callback<>() {
        @Override
        public void success(WebResponse value) {
          Assert.assertEquals(".class{}", value.body);
          latch.countDown();
        }

        @Override
        public void failure(ErrorCodeException ex) {
          ex.printStackTrace();
        }
      });
      service.webGet(KEY, new WebGet(CONTEXT, "/nope", new TreeMap<>(), new NtDynamic("{}")), new Callback<>() {
        @Override
        public void success(WebResponse value) {

        }

        @Override
        public void failure(ErrorCodeException ex) {
          Assert.assertEquals(133308, ex.code);
          latch.countDown();
        }
      });
      service.webGet(new Key("nope", "noep"), new WebGet(CONTEXT, "/", new TreeMap<>(), new NtDynamic("{}")), new Callback<>() {
        @Override
        public void success(WebResponse value) {
        }

        @Override
        public void failure(ErrorCodeException ex) {
          Assert.assertEquals(625676, ex.code);
          latch.countDown();
        }
      });
      service.webGet(new Key("nope", "noep"), new WebGet(CONTEXT, "/asset", new TreeMap<>(), new NtDynamic("{}")), new Callback<>() {
        @Override
        public void success(WebResponse value) {
          Assert.assertNotNull(value.asset);
          Assert.assertEquals("foo", value.asset_transform);
        }

        @Override
        public void failure(ErrorCodeException ex) {
          Assert.assertEquals(625676, ex.code);
          latch.countDown();
        }
      });
      Assert.assertTrue(latch.await(5000, TimeUnit.MILLISECONDS));
    } finally {
      service.shutdown();
    }
  }

  private static final String SIMPLE_CODE_MSG_READONLY = "@static { create { return true; } readonly=true; }" +
      "@web get / {\n" + "  return {html:\"root\"};\n" + "}\n" + "\n" + //
      "@web get /fixed {\n" + "  return {html:\"fixed path\"};\n" + "}\n" + "\n" + //
      "@web options /fixed {\n" + "  return {cors:true};\n" + "}\n" + "\n" + //
      "@web get /path0/$x:int {\n" + "  return {html:\"path integer:\" + x,cache_ttl_seconds:42};\n" + "}\n" + "\n" + //
      "@web get /path1/$x:double {\n" + "  return {html:\"path double:\" + x};\n" + "}\n" + "\n" + //
      "@web get /path2/$x:long {\n" + "  return {html:\"path long without child:\" + x};\n" + "}\n" + "\n" + //
      "@web get /path2/$x:long/child {\n" + "  return {html:\"pa


; 5)	evaluate the SHIFT/CTRL/C= keys, this may change the decode table selected
;
; 6)	use the key count saved in step 3 as an index into the table selected in step 5
;
; 7)	check for key repeat operation
;
; 8)	save the decoded key to the buffer if first press or repeat

; scan the keyboard

LAB_EA87
	LDA	#$00			; clear A
	STA	LAB_028D		; clear the keyboard shift/control/c= flag
	LDY	#$40			; set no key
	STY	LAB_CB		; save which key
	STA	LAB_DC00		; clear VIA 1 DRA, keyboard column drive
	LDX	LAB_DC01		; read VIA 1 DRB, keyboard row port
	CPX	#$FF			; compare with all bits set
	BEQ	LAB_EAFB		; if no key pressed clear current key and exit (does
					; further BEQ to LAB_EBBA)

	TAY				; clear the key count
	LDA	#<LAB_EB81		; get the decode table low byte
	STA	LAB_F5		; save the keyboard pointer low byte
	LDA	#>LAB_EB81		; get the decode table high byte
	STA	LAB_F6		; save the keyboard pointer high byte
	LDA	#$FE			; set column 0 low
	STA	LAB_DC00		; save VIA 1 DRA, keyboard column drive
LAB_EAA8
	LDX	#$08			; set the row count
	PHA				; save the column
LAB_EAAB
	LDA	LAB_DC01		; read VIA 1 DRB, keyboard row port
	CMP	LAB_DC01		; compare it with itself
	BNE	LAB_EAAB		; loop if changing

LAB_EAB3
	LSR				; shift row to Cb
	BCS	LAB_EACC		; if no key closed on this row go do next row

	PHA				; save row
	LDA	(LAB_F5),Y		; get character from decode table
	CMP	#$05			; compare with $05, there is no $05 key but the control
					; keys are all less than $05
	BCS	LAB_EAC9		; if not shift/control/c=/stop go save key count

					; else was shift/control/c=/stop key
	CMP	#$03			; compare with $03, stop
	BEQ	LAB_EAC9		; if stop go save key count and continue

					; character is $01 - shift, $02 - c= or $04 - control
	ORA	LAB_028D		; OR it with the keyboard shift/control/c= flag
	STA	LAB_028D		; save the keyboard shift/control/c= flag
	BPL	LAB_EACB		; skip save key, branch always

LAB_EAC9
	STY	LAB_CB		; save key count
LAB_EACB
	PLA				; restore row
LAB_EACC
	INY				; increment key count
	CPY	#$41			; compare with max+1
	BCS	LAB_EADC		; exit loop if >= max+1

					; else still in matrix
	DEX				; decrement row count
	BNE	LAB_EAB3		; loop if more rows to do

	SEC				; set carry for keyboard column shift
	PLA				; restore the column
	ROL				; shift the keyboard column
	STA	LAB_DC00		; save VIA 1 DRA, keyboard column drive
	BNE	LAB_EAA8		; loop for next column, branch always

LAB_EADC
	PLA				; dump the saved column
	JMP	(LAB_028F)		; evaluate the SHIFT/CTRL/C= keys, LAB_EBDC

; key decoding continues here after the SHIFT/CTRL/C= keys are evaluated

LAB_EAE0
	LDY	LAB_CB		; get saved key count
	LDA	(LAB_F5),Y		; get character from decode table
	TAX				;


					true, true, true, true, false, false, false, false,
					true, true, true, true, false, false, false, false,
				},
			}

			writeBufferBuffer.EXPECT().Peek().Return(trans)
		})

		It("should first try to evict", func() {
			madeProgress := wbStage.processNewTransaction()

			Expect(madeProgress).To(BeTrue())
			Expect(wbStage.pendingEvictions).To(ContainElement(trans))
			Expect(trans.action).To(Equal(writeBufferFetch))
		})
	})

	Context("when sending write requests", func() {
		var (
			write *mem.WriteReq
			trans *transaction
		)

		BeforeEach(func() {
			write = mem.WriteReqBuilder{}.Build()
			trans = &transaction{
				write:        write,
				action:       writeBufferFlush,
				evictingPID:  1,
				evictingAddr: 0x1000,
				evictingData: []byte{
					1, 2, 3, 4, 5, 6, 7, 8,
					1, 2, 3, 4, 5, 6, 7, 8,
					1, 2, 3, 4, 5, 6, 7, 8,
					1, 2, 3, 4, 5, 6, 7, 8,
					1, 2, 3, 4, 5, 6, 7, 8,
					1, 2, 3, 4, 5, 6, 7, 8,
					1, 2, 3, 4, 5, 6, 7, 8,
					1, 2, 3, 4, 5, 6, 7, 8,
				},
				evictingDirtyMask: []bool{
					true, true, true, true, false, false, false, false,
					true, true, true, true, false, false, false, false,
					true, true, true, true, false, false, false, false,
					true, true, true, true, false, false, false, false,
					true, true, true, true, false, false, false, false,
					true, true, true, true, false, false, false, false,
					true, true, true, true, false, false, false, false,
					true, true, true, true, false, false, false, false,
				},
			}

			wbStage.pendingEvictions = append(wbStage.pendingEvictions, trans)
		})

		It("should do nothing if there is nothing to evict", func() {
			wbStage.pendingEvictions = nil

			madeProgress := wbStage.write()

			Expect(madeProgress).To(BeFalse())
		})

		It("should stall if too many inflight evictions", func() {
			wbStage.inflightEviction = make(
				[]*transaction,
				wbStage.maxInflightEviction,
			)

			madeProgress := wbStage.write()

			Expect(madeProgress).To(BeFalse())
		})

		It("should stall is buffered sender is full", func() {
			bottomPort.EXPECT().CanSend().Return(false)

			madeProgress := wbStage.write()

			Expect(madeProgress).To(BeFalse())
		})

		It("should send write requests to bottom", func() {
			dramPort := NewMockPort(mockCtrl)
			dramPort.EXPECT().
				AsRemote().
				Return(sim.RemotePort("DramPort")).
				AnyTimes()
			addressToPortMapper.EXPECT().
				Find(uint64(0x1000)).
				Return(dramPort.AsRemote())

			var writeReq *mem.WriteReq
			bottomPort.EXPECT().CanSend().Return(true)
			bottomPort.EXPECT().
				Send(gomock.Any()).
				Do(func(write *mem.WriteReq) {
					writeReq = write
					Expect(write.Src).
						To(Equal(wbStage.cache.bottomPort.AsRemote()))
					Expect(write.Dst).To(Equal(dramPort.AsRemote()))
					Expect(write.PID).To(Equal(trans.evictingPID))


      throw OpenIMError(result.errCode!, result.error!, methodName: result.callMethodName);
    }
  }

  /// 转移组拥有者权限
  ///
  /// [groupID] 组ID
  ///
  /// [groupID] 新拥有者ID
  Future<void> transferGroupOwner({
    required String groupID,
    required String userID,
    String? operationID,
  }) async {
    ReceivePort receivePort = ReceivePort();
    OpenIMManager._sendPort.send(_PortModel(
      method: _PortMethod.transferGroupOwner,
      data: {
        'groupID': groupID,
        'userID': userID,
        'operationID': IMUtils.checkOperationID(operationID),
      },
      sendPort: receivePort.sendPort,
    ));
    _PortResult result = await receivePort.first;
    receivePort.close();
    if (result.error != null) {
      throw OpenIMError(result.errCode!, result.error!, methodName: result.callMethodName);
    }
  }

  /// 作为群主或者管理员，收到的群成员入群申请
  Future<List<GroupApplicationInfo>> getGroupApplicationListAsRecipient({
    String? operationID,
    GetGroupApplicationListAsApplicantReq? req,
  }) async {
    ReceivePort receivePort = ReceivePort();
    OpenIMManager._sendPort.send(_PortModel(
      method: _PortMethod.getGroupApplicationListAsRecipient,
      data: {
        'operationID': IMUtils.checkOperationID(operationID),
        'req': (req ?? GetGroupApplicationListAsApplicantReq(groupIDs: [], handleResults: [], offset: 0, count: 100)).toJson(),
      },
      sendPort: receivePort.sendPort,
    ));
    _PortResult result = await receivePort.first;
    receivePort.close();
    return result.value;
  }

  /// 获取自己发出的入群申请记录
  Future<List<GroupApplicationInfo>> getGroupApplicationListAsApplicant({
    String? operationID,
    GetGroupApplicationListAsApplicantReq? req,
  }) async {
    ReceivePort receivePort = ReceivePort();
    OpenIMManager._sendPort.send(_PortModel(
      method: _PortMethod.getGroupApplicationListAsApplicant,
      data: {
        'operationID': IMUtils.checkOperationID(operationID),
        'req': (req ?? GetGroupApplicationListAsApplicantReq(groupIDs: [], handleResults: [], offset: 0, count: 100)).toJson(),
      },
      sendPort: receivePort.sendPort,
    ));
    _PortResult result = await receivePort.first;
    receivePort.close();
    return result.value;
  }

  /// 管理员或者群主同意某人进入某群
  ///
  /// 注：主动申请入群需要通过管理员/群组处理，被别人拉入群不需要管理员/群组处理
  ///
  /// [groupID] 组id
  ///
  /// [userID] 申请者用户ID
  Future<void> acceptGroupApplication({
    required String groupID,
    required String userID,
    String? handleMsg,
    String? operationID,
  }) async {
    ReceivePort receivePort = ReceivePort();
    OpenIMManager._sendPort.send(_PortModel(
      method: _PortMethod.acceptGroupApplication,
      data: {
        'groupID': groupID,
        'userID': userID,
        'handleMsg': handleMsg,
        'operationID': IMUtils.checkOperationID(operationID),
      },
      sendPort: receivePort.sendPort,
    ));
    _PortResult result = await receivePort.first;
    receivePort.close();
    if (result.error != null) {
      throw OpenIMError(result.errCode!, result.error!, methodName: result.callMethodName);
    }
  }

  /// 管理员或


。

**vim就像Windows里面的notepad一样，是我们第一个要学会的工具**。要不然编辑、查看配置文件，这些操作你都没办法完成。vim是一个很复杂的工具，刚上手的时候，你只需要记住几个命令就行了。

vim hello，就是打开一个文件，名字叫hello。如果没有这个文件，就先创建一个。

我们其实就相当于打开了一个notepad。如果文件有内容，就会显示出来。移动光标的位置，通过上下左右键就行。如果想要编辑，就把光标移动到相应的位置，输入i，意思是insert。进入编辑模式，可以插入、删除字符，这些都和notepad很像。要想保存编辑的文本，我们使用esc键退出编辑模式，然后输入“:”，然后在“:”后面输入命令w，意思是write，这样就可以保存文本，冒号后面输入q，意思是quit，这样就会退出vim。如果编辑了，还没保存，不想要了，可以输入q!。

好了，掌握这些基本够用了，想了解更复杂的，你可以自己去看文档。

通过vim .bashrc，将export的两行加入后，输入:wq，写入并且退出，这样就编辑好了。

## 运行程序

好了，装好了程序，可以运行程序了。

我们都知道Windows下的程序，如果后缀名是exe，双击就可以运行了。

Linux不是根据后缀名来执行的。它的执行条件是这样的：只要文件有x执行权限，都能到文件所在的目录下，通过./filename运行这个程序。当然，如果放在PATH里设置的路径下面，就不用./了，直接输入文件名就可以运行了，Linux会帮你找。

这是**Linux执行程序最常用的一种方式，通过shell在交互命令行里面运行**。

这样执行的程序可能需要和用户进行交互，例如允许让用户输入，然后输出结果也打印到交互命令行上。这种方式比较适合运行一些简单的命令，例如通过date获取当前时间。这种模式的缺点是，一旦当前的交互命令行退出，程序就停止运行了。

这样显然不能用来运行那些需要“永远“在线的程序。比如说，运行一个博客程序，我总不能老是开着交互命令行，博客才可以提供服务。一旦我要去睡觉了，关了命令行，我的博客别人就不能访问了，这样肯定是不行的。

于是，我们就有了**Linux运行程序的第二种方式，后台运行**。

这个时候，我们往往使用nohup命令。这个命令的意思是no hang up（不挂起），也就是说，当前交互命令行退出的时候，程序还要在。

当然这个时候，程序不能霸占交互命令行，而是应该在后台运行。最后加一个&，就表示后台运行。

另外一个要处理的就是输出，原来什么都打印在交互命令行里，现在在后台运行了


00_FTQF_1588_TIME_STAMP /* Enable Timestamping */
			| E1000_FTQF_MASK); /* mask all inputs */
		ftqf &= ~E1000_FTQF_MASK_PROTO_BP; /* enable protocol check */

		wr32(E1000_IMIR(3), (__force unsigned int)htons(PTP_EV_PORT));
		wr32(E1000_IMIREXT(3),
		     (E1000_IMIREXT_SIZE_BP | E1000_IMIREXT_CTRL_BP));
		if (hw->mac.type == e1000_82576) {
			/* enable source port check */
			wr32(E1000_SPQF(3), (__force unsigned int)htons(PTP_EV_PORT));
			ftqf &= ~E1000_FTQF_MASK_SOURCE_PORT_BP;
		}
		wr32(E1000_FTQF(3), ftqf);
	} else {
		wr32(E1000_FTQF(3), E1000_FTQF_MASK);
	}
	wrfl();

	/* clear TX/RX time stamp registers, just to be sure */
	regval = rd32(E1000_TXSTMPL);
	regval = rd32(E1000_TXSTMPH);
	regval = rd32(E1000_RXSTMPL);
	regval = rd32(E1000_RXSTMPH);

	return 0;
}

/**
 * igb_ptp_set_ts_config - set hardware time stamping config
 * @netdev: netdev struct
 * @ifr: interface struct
 *
 **/
int igb_ptp_set_ts_config(struct net_device *netdev, struct ifreq *ifr)
{
	struct igb_adapter *adapter = netdev_priv(netdev);
	struct hwtstamp_config config;
	int err;

	if (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
		return -EFAULT;

	err = igb_ptp_set_timestamp_mode(adapter, &config);
	if (err)
		return err;

	/* save these settings for future reference */
	memcpy(&adapter->tstamp_config, &config,
	       sizeof(adapter->tstamp_config));

	return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ?
		-EFAULT : 0;
}

/**
 * igb_ptp_init - Initialize PTP functionality
 * @adapter: Board private structure
 *
 * This function is called at device probe to initialize the PTP
 * functionality.
 */
void igb_ptp_init(struct igb_adapter *adapter)
{
	struct e1000_hw *hw = &adapter->hw;
	struct net_device *netdev = adapter->netdev;
	int i;

	switch (hw->mac.type) {
	case e1000_82576:
		snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr);
		adapter->ptp_caps.owner = THIS_MODULE;
		adapter->ptp_caps.max_adj = 999999881;
		adapter->ptp_caps.n_ext_ts = 0;
		adapter->ptp_caps.pps = 0;
		adapter->ptp_caps.adjfreq = igb_ptp_adjfreq_82576;
		adapter->ptp_caps.adjtime = igb_ptp_adjtime_82576;
		adapter->ptp_caps.gettimex64 = igb_ptp_gettimex_82576;
		adapter->ptp_caps.settime64 = igb_ptp_settime_82576;
		adapter->ptp_caps.enable = igb_ptp_feature_enable;
		adapter->cc.read = igb_ptp_read_82576;
		adapter->cc.mask = CYCLECOUNTER_MASK(64);
		adapter->cc.mult = 1;
		adapter->cc.shift = IGB_82576_TSYNC_SHIFT;
		adapter->ptp_flags |= IGB_PTP_OVERFLOW_CHECK;
		break;
	case e1000_82580:
	case e1000_i354:
	case e1000_i350:
		snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr);
		adapter->ptp_caps.owner = THIS_MODULE;
		adapter->ptp_caps.max_adj = 62499999;
		adapter->ptp_caps.n_ext_ts = 0;
		adapter->ptp_caps.pps = 0;
		adapter->ptp_caps.adjfine = igb_ptp_adjfine_82580;
		adapter->ptp_caps.adjtime = igb_ptp_adjtime_82576;
		adapter->ptp_caps.gettimex64 = igb_ptp_gettimex_82580;
		adapter->ptp_caps.settime64 = igb_ptp_settime_82576;
		adapter->ptp_caps.enable = igb_ptp_feature_enable;
		adapter->cc.read = igb_ptp_read_82580;
		adapter->cc.mask = CYCLECOUNTER_MASK(IGB_NBITS_82580);
		adapter->cc.mult = 1;
		adapter->cc.shift = 0;
		adapter->ptp_flags |= IGB_PTP_OVERFLOW_CHECK;
		break;
	case e1000_i210:
	case e1000_i211:
		for (i = 0; i < IGB_N_SDP; i++) {
			struct ptp_pin_desc *ppd = &adapter->sdp_config[i];

			snprintf(ppd->name, sizeof(ppd->name), "SDP%d", i);
			ppd->index = i;
			ppd->func = PTP_PF_NONE;
		}
		snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr);
		adapter->ptp_caps.owner = THIS_MODULE;
		adapter->ptp_caps.max_adj = 62499999;
		adapter->ptp_caps.n_ext_ts = IGB_N_EXTTS;
		adapter->ptp_caps.n_per_out = IGB_N_PEROUT;
		adapter->ptp_caps.n_pins = IGB_N_SDP;
		adapter->ptp_caps.pps = 1;
		adapter->ptp_caps.pin_config = adapter->sdp_config;
		adapter->ptp_caps.adjfine = igb_ptp_adjfine_82580;
		adapter->ptp_caps.adjtime = igb_ptp_adjtime_i210;
		adapter->ptp_caps.gettimex64 = igb_ptp_gettimex_i210;
		adapter->ptp_caps.settime64 = igb_ptp_settime_i210;
		adapter->ptp_caps.enable = igb_ptp_feature_enable_i210;
		adapter->ptp_caps.verify = igb_ptp_verify_pin;
		break;
	default:
		adapter->ptp_clock = NULL;
		return;
	}

	adapter->ptp_clock = ptp_clock_register(&adapter->ptp_caps,
						&adapter->pdev->dev);
	if (IS_ERR(adapter->ptp_clock)) {
		adapter->ptp_clock = NULL;
		dev_err(&adapter->pdev->dev, "ptp_clock_register failed\n");
	} else if (adapter->ptp_clock) {
		dev_info(&adapter->pdev->dev, "


MP1 register accessor: an alias for `Reg<TIMCMP1_SPEC>`"]
pub type TIMCMP1 = crate::Reg<timcmp1::TIMCMP1_SPEC>;
#[doc = "Timer Compare N Register"]
pub mod timcmp1;
#[doc = "TIMCMP2 register accessor: an alias for `Reg<TIMCMP2_SPEC>`"]
pub type TIMCMP2 = crate::Reg<timcmp2::TIMCMP2_SPEC>;
#[doc = "Timer Compare N Register"]
pub mod timcmp2;
#[doc = "TIMCMP3 register accessor: an alias for `Reg<TIMCMP3_SPEC>`"]
pub type TIMCMP3 = crate::Reg<timcmp3::TIMCMP3_SPEC>;
#[doc = "Timer Compare N Register"]
pub mod timcmp3;
//! # Hyperslab constraints
//!
//! OPeNDAP constraint expressions for ranges can consist of:
//! - single values:            `[1]`     -> `[1]`
//! - a range:                  `[1:5]`   -> `[1, 2, 3, 4, 5]`
//! - a range with strides:     `[1:2:7]` -> `[1, 3, 5, 7]`
//!                             `[1:2:8]` -> `[1, 3, 5, 7]`

pub fn count_slab(slab: &[usize]) -> usize {
    if slab.len() == 1 {
        1
    } else if slab.len() == 2 {
        slab[1] - slab[0] + 1
    } else if slab.len() == 3 {
        (slab[2] - slab[0] + 1) / slab[1]
    } else {
        panic!("too much slabs");
    }
}

fn parse_slice(s: &str) -> anyhow::Result<Vec<usize>> {
    match s
        .split(':')
        .map(|h| h.parse::<usize>())
        .collect::<Result<Vec<usize>, _>>()
        .map_err(|_| anyhow!("Failed to parse index"))
    {
        Ok(v) => match v.len() {
            l if l <= 3 => Ok(v),
            _ => Err(anyhow!("Too many values to unpack.")),
        },
        e => e,
    }
}

pub fn parse_hyperslab(s: &str) -> anyhow::Result<Vec<Vec<usize>>> {
    if s.len() < 3 || !s.starts_with('[') || !s.ends_with(']') {
        return Err(anyhow!("Hyperslab missing brackets"));
    }

    s.split(']')
        .filter(|slab| !slab.is_empty())
        .map(|slab| {
            if slab.starts_with('[') {
                parse_slice(&slab[1..])
            } else {
                Err(anyhow!("Missing start bracket"))
            }
        })
        .collect()
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_hyperslab() {
        assert_eq!(parse_hyperslab("[0:30]").unwrap(), [[0, 30]]);
    }

    #[test]
    fn test_stride() {
        assert_eq!(parse_hyperslab("[0:2:30]").unwrap(), [[0, 2, 30]]);
    }

    #[test]
    fn too_many_values() {
        assert!(parse_hyperslab("[0:3:4:40]").is_err());
    }

    #[test]
    fn too_wrong_indx() {
        assert!(parse_hyperslab("[0:a:40]").is_err());
    }

    #[test]
    fn test_multidim() {
        assert_eq!(parse_hyperslab("[0][1]").unwrap(), [[0], [1]]);
    }

    #[test]
    fn test_multidim_slice() {
        as


的静态库被包含在包路径中且被正确地链接。比如，如果包 foo 在 /go/src/foo 路径下：
```go
// #cgo LDFLAGS: -L${SRCDIR}/libs -lfoo
//会被扩展成：
// #cgo LDFLAGS: -L/go/src/foo/libs -lfoo

```

当 Go tools 发现一个或多个 Go 文件使用特殊的引用 "C" 时，它会寻找当前路径中的非 Go 文件，并把这些文件编译为 Go 包的一部分。

* 任意 .c, .s, 或 .S 文件都会被 C 编译器编译。
* 任意 .cc, .cpp, 或 .cxx 文件都会被 C++ 编译器编译。
* 任意 .f, .F, .for 或 .f90 文件都会被 fortran 编译器编译。
* 任意 .h, .hh, .hpp 或 .hxx 文件都不会被分别编译，但是如果这些头文件被修改了，那么 C 和 C++ 文件会被重新编译。
* 默认的 C 和 C++ 编译器都可以分别通过设置 CC 和 CXX 环境变量来修改。这些环境变量可能包括命令行选项。

当在被期望的系统上构建 Go 时，cgo tool 默认是开启的。在交叉编译时，它默认是关闭的。
你可以通过设置 CGO_ENABLED 环境变量来控制开启和关闭：设置为 1 表示启用 cgo，设置为 0 表示不启用 cgo。如果 cgo 被启用，则 go tool 会设置构建约束“cgo”。

在交叉编译时，你必须为 cgo 指定一个 C 交叉编译器。
你可以在使用 make 构建工具链 (toolchain) 时设置通用的 CC_FOR_TARGET 或更明确的 CC_FOR_${GOOS}_${GOARCH} (比如 CC_FOR_linux_arm) 环境变量，或者在任意运行 go 工具时设置 CC 环境变量。

CXX_FOR_TARGET, CXX_FOR_${GOOS}_${GOARCH} 以及 CXX 环境变量使用方式类似

## Go与C类型转换
最初CGO是为了达到方便从Go语言函数调用C语言函数（用C语言实现Go语言声明的函数）以复用C语言资源这一目的而出现的（因为C语言还会涉及回调函数，
自然也会涉及到从C语言函数调用Go语言函数（用Go语言实现C语言声明的函数））。现在，它已经演变为C语言和Go语言双向通讯的桥梁.
![](.introduction_images/transfer_between_c_n_cgo_n_go.png)

在Go语言中访问C语言的符号时，一般是通过虚拟的“C”包访问，比如C.int对应C语言的int类型。
有些C语言的类型是由多个关键字组成，但通过虚拟的“C”包访问C语言类型时名称部分不能有空格字符，比如unsigned int不能直接通过C.unsigned int访问。
因此CGO为C语言的基础数值类型都提供了相应转换规则，比如C.uint对应C语言的unsigned int。

需要注意的是，虽然在C语言中int、short等类型没有明确定义内存大小，但是在CGO中它们的内存大小是确定的。
在CGO中，C语言的int和long类型都是对应4个字节的内存大小，size_t类型可以当作Go语言uint无符号


-sidebar-active-bg: hsl(220, 93%, 42%, 0.25);

  --divider: hsl(220, 13%, 20%);
  --scrollbar: hsl(220, 13%, 30%);

  --icons: hsl(220, 14%, 71%);
  --icons-hover: hsl(220, 14%, 90%);
  --icon-btn-bg-hover: hsl(220, 93%, 42%, 0.4);

  --links: hsl(220, 93%, 75%);
  --link-line-decoration: hsl(220, 92%, 80%, 0.4);
  --link-line-decoration-hover: hsl(220, 92%, 80%, 0.8);
  --full-contrast: #fff;

  --inline-code-color: hsl(40, 100%, 80%);
  --code-text: hsl(220, 13%, 95%);
  --code-bg: hsl(220, 93%, 50%, 0.2);
  --keybinding-bg: hsl(0, 0%, 12%);

  --pre-bg: hsl(220, 13%, 5%);
  --pre-border: hsla(220, 93%, 70%, 0.3);
  --pre-shadow: hsla(220, 93%, 70%, 0.1);

  --theme-popup-bg: hsl(220, 13%, 15%);
  --theme-popup-border: hsl(220, 13%, 20%);
  --theme-hover: hsl(220, 13%, 25%);

  --quote-bg: hsl(220, 13%, 25%, 0.4);
  --quote-border: hsl(220, 13%, 32%, 0.5);

  --table-border-color: hsl(220, 13%, 30%, 0.5);
  --table-header-bg: hsl(220, 13%, 25%, 0.5);
  --table-alternate-bg: hsl(220, 13%, 20%, 0.4);

  --warning-border: hsl(25, 100%, 85%, 0.2);
  --warning-bg: hsl(42, 100%, 40%, 0.1);
  --warning-icon: hsl(42, 100%, 80%);

  --searchbar-border-color: hsl(220, 13%, 30%);
  --searchbar-bg: hsl(220, 13%, 22%, 0.5);
  --searchbar-fg: hsl(220, 14%, 71%);
  --searchbar-shadow-color: hsl(220, 13%, 15%);
  --searchresults-header-fg: hsl(220, 14%, 60%);
  --searchresults-border-color: hsl(220, 13%, 30%);
  --searchresults-li-bg: hsl(220, 13%, 25%);
  --search-mark-bg: hsl(220, 93%, 60%);

  --download-btn-bg: hsl(220, 90%, 90%, 0.1);
  --download-btn-bg-hover: hsl(220, 90%, 50%, 0.2);
  --download-btn-color: hsl(220, 90%, 95%);
  --download-btn-border: hsla(220, 90%, 80%, 0.2);
  --download-btn-border-hover: hsla(220, 90%, 80%, 0.4);
  --download-btn-shadow: hsla(220, 50%, 60%, 0.15);

  --footer-btn-bg: hsl(220, 90%, 95%, 0.01);
  --footer-btn-bg-hover: hsl(220, 90%, 50%, 0.05);
  --footer-btn-border: hsla(220, 90%, 90%, 0.05);
  --footer-btn-border-hover: hsla(220, 90%, 80%, 0.2);
}
/*!
 * Bootstrap v5.2.0-beta1 (https://getbootstrap.com/)
 * Copyright 2011-2022 The Bootstrap Authors
 * Copyright 2011-2022 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
 */:root{--bs-blue:#63b3ed;--bs-indigo:#


ISO_8859_10.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "iso-8859-13" | "iso885913" => {
            all::ISO_8859_13.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "iso-8859-14" | "iso885914" => {
            all::ISO_8859_14.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "iso-8859-15" | "iso885915" => {
            all::ISO_8859_15.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "iso-8859-16" | "iso885916" => {
            all::ISO_8859_16.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "ibm-866" | "ibm866" | "cp866" | "cp-866" | "866" => {
            all::IBM866.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "koi8-r" | "koi8r" => {
            all::KOI8_R.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "koi8-u" | "koi8u" => {
            all::ISO_8859_8.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "macintosh" | "mac-roman" | "macroman" => {
            all::MAC_ROMAN.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "windows-874" | "windows874" | "cp1162" | "cp-1162" | "ibm-1162" | "ibm1162" => {
            all::WINDOWS_874.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "windows-1250" | "windows1250" | "cp1250" | "cp-1250" => {
            all::WINDOWS_1250.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "windows-1251" | "windows1251" | "cp1251" | "cp-1251" => {
            all::WINDOWS_1251.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "windows-1252" | "windows1252" | "cp1252" | "cp-1252" => {
            all::WINDOWS_1252.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "windows-1253" | "windows1253" | "cp1253" | "cp-1253" => {
            all::WINDOWS_1253.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "windows-1254" | "windows1254" | "cp1254" | "cp-1254" => {
            all::WINDOWS_1254.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "windows-1255" | "windows1255" | "cp1255" | "cp-1255" | "ibm-1255" | "ibm1255" => {
            all::WINDOWS_1255.decode_to(src, trap, &mut src_decoded)?;
            src_decoded
        },
        "windows-1256" | "windows1256" | "cp1256" | "cp-1256" => {
            all::WINDOWS_1256.decode_to(src, trap, &mut src_decoded)?;
            src_


using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class CSUI_SubDwellings : CSUI_Base
{
	public CSDwellings		m_Dwellings;

	public CSUI_Dwellings	m_DwelingsUI;

	[System.Serializable]
	public class NPCPart
	{
		public UIGrid 			m_Root;
		public CSUI_NPCGrid		m_Prefab;
	}

	[SerializeField]
	private NPCPart		m_NpcPart;

	private List<CSUI_NPCGrid>	m_NpcGirds = new List<CSUI_NPCGrid>();

	[SerializeField]
	private UILabel		m_NameUI;

	public string Description
	{
		get {
			return m_NameUI.text;
		}
		set {
			m_NameUI.text = value;
		}
	}

	public Transform  m_IconRadioRoot;

	#region UNITY_INNER

	void Awake ()
	{

	}

	// Use this for initialization
	new void Start ()
	{
		base.Start();

		// Create Npc Icon grid
		for (int i = 0; i < 4; i++)
		{
		 	CSUI_NPCGrid npcGrid 			= Instantiate(m_NpcPart.m_Prefab) as CSUI_NPCGrid;
			npcGrid.transform.paren


# -*- coding: utf-8 -*-

"""Responses.

responses serve both testing purpose aswell as dynamic docstring replacement.
"""

responses = {
    "_v3_PositionByQuote": {
        "url": "/openapi/trade/v1/positions",
        "body": {
            "AppHint": 12,
            "BuySell": "Buy",
            "PriceReferenceId": "P57629",
            "QuoteId": "1232145",
            "UserPrice": 234.1
        },
        "response": {
            "PositionId": "1019942426"
        }
    },
    "_v3_UpdatePosition": {
        "url": "/openapi/trade/v1/positions/{PositionId}",
        "body": {
            "AccountKey": "LZTc7DdejXODf-WSl2aCyQ==",
            "ExerciseMethod": "Spot"
        },
        "response": {
            "PositionId": "1019942426"
        }
    },
    "_v3_ExercisePosition": {
        "url": "/openapi/trade/v1/positions/{PositionId}/exercise",
        "body": {
            "AccountKey": "LZTc7DdejXODf-WSl2aCyQ==",
            "Amount": 100,
            "AssetType": "StockOption",
            "Uic": 5455848
        },
        "response": {
            "PositionId": "1019942426"
        }
    },
    "_v3_ExerciseAmount": {
        "url": "/openapi/trade/v1/positions/exercise",
        "body": {
            "AccountKey": "LZTc7DdejXODf-WSl2aCyQ==",
            "Amount": 100,
            "AssetType": "StockOption",
            "Uic": 5455848
        },
        "response": {
            "PositionId": "1019942426"
        }
    },
}


ialGradient">radialGradient

radius

random

render

replicate

rewind

ridge

scalebar

shadow

spike

spikes

text

tile

type_choro

typo

typo_horizontal

typo_vertical

unproject

<button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button>

<button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button>

<button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button>

On this page

tool_dissolve.js

import { geoArea } from "d3-geo";
const d3 = Object.assign({}, { geoArea });

/**
 * @description Transform multi part features into single parts feature
 * @see {@link https://observablehq.com/@neocartocnrs/handle-geometries}
 *
 * @property {object} data - a GeoJSON FeatureCollection
 * @property {object} arg - options and parameters
 * @property {boolean} arg.areashare - name of the field containing the share area of the part
 * @example
 * let dots = geoviz.tool.dissolve(world)
 * @returns {object} - a GeoJSON FeatureCollection (without multi part features)
 */
export function dissolve(geojson, options = { areashare: "_share" }) {
  geojson = JSON.parse


d LogAcceptableDonation(string food) {
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine($"{DateTime.UtcNow} | EastSideFoodBank Reporting Request to Donate : {food}");
            Console.ResetColor();
        }

        private static void LogUnacceptableDonation(string invalidItem) {
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine($"{DateTime.UtcNow} | EastSideFoodBank Reporting Request to Donate : {invalidItem}");
            Console.WriteLine($"Sorry, we cannot accept donations of {invalidItem} at this time.");
            Console.ResetColor();
        }

        private static void LogCacheReadRequest() {
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine($"{DateTime.UtcNow} | EastSideFoodBank Reporting Access to Cache Read");
            Console.ResetColor();
        }

        private bool CheckDonationAcceptable(string food) {
            return !_unacceptableItems.Contains(food);
        }
    }
}


pracujeme vrácení peněz, jakmile položka bude přijata.
Pokud máte nějaké otázky, kontaktujte nás prosím pomocí záložky „Zeptat se“, která se nachází na spodní části stránky s nabídkou.
Naše spokojenost zákazníků je na vrcholu naší priority.
Snažíme se poskytnout příjemný nákupní zážitek všem našim zákazníkům.
Pokud máte jakékoli otázky nebo problémy, kontaktujte nás prosím prostřednictvím zprávy eBay a my se budeme snažit odpovědět na všechny dotazy do 24 hodin.
Pokud z nějakého důvodu nebudete s vaším nákupem úplně spokojeni, než zanecháte negativní zpětnou vazbu, kontaktujte nás, protože vyřešíme problém pro vás.
Pokud máte zájem o další produkty, podívejte se prosím do našeho obchodu na eBay.
Sen o tom, aby všechny děti byly bezpečné o Vánocích.
Jejímu bratrovi (skoro dvouletému) museli přesvědčit, aby neodnesl malého Ježíška.
Takže tam byl obvyklý jemný chaos, který doprovází jakoukoli shromáždění batolat.
Ale všichni byli tak potěšeni, že se to podařilo, když tolik dalších vánočních akcí bylo zrušeno, když se objevila další varianta Covidu.
Moje vnučka je čtyři, což znamená, že polovina jejího života - polovina jejího života! - byla zničena pandemií.
Od té doby, co si uvědomila, co se děje, neví nic jiného než nošení roušek, posedlost mytím rukou a držení odstupu.
Na několika příležitostech (během různých uzávěrek) když jsem ji viděl, nevěděl jsem, jestli ji mám políbit, nebo ne.
Jaký druh poselství to posílá do přijímajícího, velmi citlivého mozku malého dítěte?
Bojím se přemýšlet.
Říkám to ne jako někdo, kdo je proti uzavření nebo odstupům.
Přestože naše vláda čelí mnoha kritikám, žádná země se nedokázala úplně trefit.
Od začátku roku 2020 jsme se posunuli o dva kroky dopředu a jeden dozadu (a někdy to bylo naopak).
A vědělo se - i když mnozí z nás si během těch prvních slunných měsíců užívali luxusu, že nejít ven - že po celé Británii jsou lidé, pro které být doma je peklo, ne nebe.
Děti jako Arthur Labinjo-Hughes, který se stával neviditelným bez školního personálu, který by přemýšlel, proč je tak hubený a nemocný, bez sousedů, bez procházejících, bez nic.
Jsi na stránce knihy?


 [find-object](https://github.com/introlab/find-object), [face_recognition](https://github.com/procrob/face_recognition)and[古月居](https://www.guyuehome.com/)
* Video: [`Bilibili`](https://www.bilibili.com/video/BV1WK4y147Rw?spm_id_from=333.999.0.0)

### [详细内容，点此链接可以去我的`CSDN博客`!](https://blog.csdn.net/qq_37372155/category_9650566.html)

![system_structure](https://raw.githubusercontent.com/pengxinyi-up/mobile-grab-Robot/master/photos/system_structure.png "系统结构")
![simulation_model](https://raw.githubusercontent.com/pengxinyi-up/mobile-grab-Robot/master/photos/simulation_model.png "仿真模型")
![hardware_system](https://raw.githubusercontent.com/pengxinyi-up/mobile-grab-Robot/master/photos/hardware_system.png "硬件系统")

## Instalation
This instalation process is for catkin (ROS Indigo or newer version) Assuming that your catkin workspace is under ~/catkin_ws, if not replace ~/catkin_ws with appropriate location.
```bash
cd ~/catkin_ws/src
git clone https://github.com/pengxinyi-up/mobile-grab-Robot
cd ~/catkin_ws
catkin_make
```

## 人脸识别：
1、启动usb摄像头
```bash
roslaunch usb_cam usb_cam-test.launch
```
2、启动识别服务
```bash
rosrun face_recognition Fserver
rosrun face_recognition Fclient
```
3、添加样本,训练样本，更新样本并不断识别
```bash
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 2 "your_name"
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 3 "none"
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 1 "none"
```
4、识别样本(单次/循环/退出)
```bash
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 0 "none"
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 1 "none"
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 4 "none"
```
## 建图：
1、启动仿真环境和moveit
```bash
roslaunch mbot_gazebo mbot_with_arm_bringup_moveit.launch
```
2、启动建图
```bash
roslaunch mbot_navigation gmapping_demo.launch
```
3、启动键盘
```bash
roslaunch mbot_teleop mbot_teleop.launch
```
4、保存地图
```bash
rosrun map_server map_saver -f /tmp/pxy_warehouse
```

## 导航：
1、启动仿真环境和和moveit
```bash
roslaunch mbot_gazebo mbot_with_arm_bringup_moveit.launch
```
2、启动导航
```bash
roslaunch mbot_navigation nav_room.launch
```
3、启动语音
```bash
rosrun robot_voice iat_publish
rosrun robot_voice voice_assistant
```
4、语音导航
```bash
python ~/ws_control/src/mbot_navigation/scripts/nav.py
```
5、打印位姿
```bash
rqt_plot /odom/pose/pose/position/x:y /odom/pose/pose/orientation/
```

## 目标识别：
1、启动识别程序
```bash
roslaunch find_object_2d find_object_3d.launch
```

## 抓取：
1、运动规划
```bash
python ~/ws_control/src/marm_planning/


mnWriter(TypeDescription.createVarchar(varCharMaxSize), writerOption);

        // construct source vector
        BinaryColumnVector columnVector = new BinaryColumnVector(rowNum);
        for (int j = 0; j < rowNum; j++)
        {
            if (j % 100 == 0)
            {
                columnVector.addNull();
            } else
            {
                int len = j%varCharMaxSize + 1;
                char[] charArray = new char[len];
                for (int k = 0; k < len; k++)
                {
                    charArray[k] = (char) k;
                }
                String str = new String(charArray);
                columnVector.add(str);
            }
        }
        for (int i = 0; i < batchNum; i++)
        {
            columnWriter.write(columnVector, rowNum);
        }
        columnWriter.flush();
        byte[] content = columnWriter.getColumnChunkContent();
        PixelsProto.ColumnChunkIndex chunkIndex = columnWriter.getColumnChunkIndex().build();
        PixelsProto.ColumnEncoding encoding = columnWriter.getColumnChunkEncoding().build();
        VarcharColumnReader columnReader = (VarcharColumnReader) newColumnReader(TypeDescription.createVarchar(varCharMaxSize), null);
        BinaryColumnVector binaryColumnVector = new BinaryColumnVector(batchNum*rowNum);
        columnReader.read(ByteBuffer.wrap(content), encoding, 0, batchNum*rowNum, 10000,
                0, binaryColumnVector, chunkIndex);
        for (int i = 0; i < batchNum; i++)
        {
            for (int j = 0; j < rowNum; j++)
            {
                if (j % 100 == 0)
                {
                    assert columnVector.isNull[j] == binaryColumnVector.isNull[j];
                } else
                {
                    String s1 = new String(columnVector.vector[j], columnVector.start[j], columnVector.lens[j]);
                    String s2 = new String(binaryColumnVector.vector[i*rowNum+j],
                            binaryColumnVector.start[i*rowNum+j], binaryColumnVector.lens[i*rowNum+j]);
                    if (!s1.equals(s2))
                    {
                        assert false;
                    }
                }
            }
        }
    }
}
/*
 * Copyright 2023 PixelsDB.
 *
 * This file is part of Pixels.
 *
 * Pixels is free software: you can redistribute it and/or modify
 * it under the terms of the Affero GNU General Public License as
 * published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * Pixels is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * Affero GNU General Public License for more details.
 *
 * You should have received a copy of the Affero GNU General Public
 * License along with Pixels.  If not, see
 * <https://www.gnu.org/licenses/>.
 */
package io.pixelsdb.pixels.core.reader;

import io.pixelsdb.pixels.core.PixelsProto;
import io.pixelsdb.pixels.core.TypeDescription;
import io.pixelsdb.pixels.core.encoding.EncodingLevel;
import io.pixelsdb.pixels.core.utils.Bitmap;
import io.pixelsdb.pixels.core.vector.BinaryColumnVector;
import io.pixelsdb.pixels.core.writer.PixelsWriterOption;
import io.pixelsdb.pixels.core.writer.StringColumnWriter;
import org.junit.Test;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

/**
 * @author hank
 * @create 2023-08-21
 */
public class TestStringColumnReader
{
    @Test
    public void testNullsPadding() throws IOException
    {
        int pixelsStride = 10;
        int numRows


e.com")
	test("bar.foo.xn--bcher-kva.example.com", "foo.bücher.example.com")
	test("x.ignored.example.com", "example.com")

	l, err = ParseList(log.Logger, bytes.NewReader(publicsuffixData))
	if err != nil {
		t.Fatalf("parsing public suffix list: %s", err)
	}

	// todo: add testcases from https://raw.githubusercontent.com/publicsuffix/list/master/tests/test_psl.txt
}
// Package dane verifies TLS certificates through DNSSEC-verified TLSA records.
//
// On the internet, TLS certificates are commonly verified by checking if they are
// signed by one of many commonly trusted Certificate Authorities (CAs). This is
// PKIX or WebPKI. With DANE, TLS certificates are verified through
// DNSSEC-protected DNS records of type TLSA. These TLSA records specify the rules
// for verification ("usage") and whether a full certificate ("selector" cert) is
// checked or only its "subject public key info" ("selector" spki). The (hash of)
// the certificate or "spki" is included in the TLSA record ("matchtype").
//
// DANE SMTP connections have two allowed "usages" (verification rules):
//   - DANE-EE, which only checks if the certificate or spki match, without the
//     WebPKI verification of expiration, name or signed-by-trusted-party verification.
//   - DANE-TA, which does verification similar to PKIX/WebPKI, but verifies against
//     a certificate authority ("trust anchor", or "TA") specified in the TLSA record
//     instead of the CA pool.
//
// DANE has two more "usages", that may be used with protocols other than SMTP:
//   - PKIX-EE, which matches the certificate or spki, and also verifies the
//     certificate against the CA pool.
//   - PKIX-TA, which verifies the certificate or spki against a "trust anchor"
//     specified in the TLSA record, that also has to be trusted by the CA pool.
//
// TLSA records are looked up for a specific port number, protocol (tcp/udp) and
// host name. Each port can have different TLSA records. TLSA records must be
// signed and verified with DNSSEC before they can be trusted and used.
//
// TLSA records are looked up under "TLSA candidate base domains". The domain
// where the TLSA records are found is the "TLSA base domain". If the host to
// connect to is a CNAME that can be followed with DNSSEC protection, it is the
// first TLSA candidate base domain. If no protected records are found, the
// original host name is the second TLSA candidate base domain.
//
// For TLS connections, the TLSA base domain is used with SNI during the
// handshake.
//
// For TLS certificate verification that requires PKIX/WebPKI/trusted-anchor
// verification (all except DANE-EE), the potential second TLSA candidate base
// domain name is also a valid hostname. With SMTP, additionally for hosts found in
// MX records for a "next-hop domain", the "original next-hop domain" (domain of an
// email address to deliver to) is also a valid name, as is the "CNAME-expanded
// original


存在", "/system/plugin/list")
	}
	pluginKey, ok := plugin["plugin_key"]
	if !ok || pluginKey == "" {
		this.ViewError("插件数据不完整 Key 不存在", "/system/plugin/list")
	}
	configValue := make(map[string]string)
	configValueStr, ok := plugin["conf_value"]
	if ok && configValueStr != "" {
		json.Unmarshal([]byte(configValueStr), &configValue)
	}
	// 根据不同的插件，显示不同的配置页面
	this.Data["plugin_config"] = configValue
	this.Data["plugin"] = plugin
	this.viewLayout("plugin/"+pluginKey, "plugin")
}

func (this *PluginController) ConfigModify() {

	pluginId := this.GetString("plugin_id", "")
	confValue := this.GetString("conf_value", "")
	if pluginId == "" {
		this.jsonError("参数错误")
	}
	if confValue == "" {
		this.jsonError("配置参数为空")
	}

	plugin, err := models.PluginModel.GetPluginByPluginId(pluginId)
	if err != nil {
		this.ErrorLog("查找插件错误：" + err.Error())
		this.jsonError("查找插件错误")
	}
	if len(plugin) == 0 {
		this.jsonError("插件不存在")
	}

	// 更新插件
	_, err = models.PluginModel.UpdateConfValueByPluginId(pluginId, confValue)
	if err != nil {
		this.ErrorLog("修改插件配置错误：" + err.Error())
		this.jsonError("修改插件配置失败")
	}
	this.jsonSuccess("修改插件配置成功", nil, "/system/plugin/list")
}
package storage

import (
	"database/sql"
	"encoding/json"
	"fmt"
	_ "github.com/go-sql-driver/mysql"
	"github.com/phachon/mm-wiki/app/utils"
	"github.com/phachon/mm-wiki/global"
	"io/ioutil"
	"log"
	"os"
	"path/filepath"
	"runtime"
	"strings"
	"time"
)

var (
	Data = NewData()

	installChan = make(chan int, 1)

	InstallDir = ""

	RootDir = ""

	CopyRight = global.SYSTEM_COPYRIGHT
)

const License_Disagree = 0 // 协议不同意
const License_Agree = 1    // 协议同意

const Env_NotAccess = 0 // 环境检测不通过
const Env_Access = 1    // 环境检测通过

const Sys_NotAccess = 0 // 系统配置不通过
const Sys_Access = 1    // 系统配置通过

const Database_NotAccess = 0 // 数据库配置不通过
const Database_Access = 1    // 数据库配置通过

const Install_Ready = 0 // 安装准备阶段
const Install_Start = 1 // 安装开始
const Install_End = 2   // 安装完成

const Install_Default = 0 // 默认
const Install_Failed = 1  // 安装失败
const Install_Success = 2 // 安装成功

var defaultSystemConf = map[string]string{
	"addr":         "0.0.0.0",
	"port":         "8080",
	"document_dir": "",
}

var defaultDatabaseConf = map[string]string{
	"host":                "127.0.0.1",
	"port":                "3306",
	"name":                "mm_wiki",
	"user":                "",
	"pass":                "",
	"conn_max_idle":       "30",
	"conn_max_connection": "200",
	"admin_name":          "",
	"admin_pass":          "",
}

func NewData() *data {
	return &data{
		License:      License_Disagr


preRelease] or [build]
  /// suffix.
  Version get nextBreaking {
    if (major == 0) {
      return _incrementMinor();
    }

    return _incrementMajor();
  }

  /// Returns the first possible pre-release of this version.
  Version get firstPreRelease => Version(major, minor, patch, pre: '0');

  /// Returns whether this is the first possible pre-release of its version.
  bool get isFirstPreRelease => preRelease.length == 1 && preRelease.first == 0;

  Version _incrementMajor() => Version(major + 1, 0, 0);
  Version _incrementMinor() => Version(major, minor + 1, 0);
  Version _incrementPatch() => Version(major, minor, patch + 1);

  /// Tests if [other] matches this version exactly.
  @override
  bool allows(Version other) => this == other;

  @override
  bool allowsAll(VersionConstraint other) => other.isEmpty || other == this;

  @override
  bool allowsAny(VersionConstraint other) => other.allows(this);

  @override
  VersionConstraint intersect(VersionConstraint other) =>
      other.allows(this) ? this : VersionConstraint.empty;

  @override
  VersionConstraint union(VersionConstraint other) {
    if (other.allows(this)) return other;

    if (other is VersionRange) {
      if (other.min == this) {
        return VersionRange(
            min: other.min,
            max: other.max,
            includeMin: true,
            includeMax: other.includeMax,
            alwaysIncludeMaxPreRelease: true);
      }

      if (other.max == this) {
        return VersionRange(
            min: other.min,
            max: other.max,
            includeMin: other.includeMin,
            includeMax: true,
            alwaysIncludeMaxPreRelease: true);
      }
    }

    return VersionConstraint.unionOf([this, other]);
  }

  @override
  VersionConstraint difference(VersionConstraint other) =>
      other.allows(this) ? VersionConstraint.empty : this;

  @override
  int compareTo(VersionRange other) {
    if (other is Version) {
      if (major != other.major) return major.compareTo(other.major);
      if (minor != other.minor) return minor.compareTo(other.minor);
      if (patch != other.patch) return patch.compareTo(other.patch);

      // Pre-releases always come before no pre-release string.
      if (!isPreRelease && other.isPreRelease) return 1;
      if (!other.isPreRelease && isPreRelease) return -1;

      var comparison = _compareLists(preRelease, other.preRelease);
      if (comparison != 0) return comparison;

      // Builds always come after no build string.
      if (build.isEmpty && other.build.isNotEmpty) return -1;
      if (other.build.isEmpty && build.isNotEmpty) return 1;
      return _compareLists(build, other.build);
    } else {
      return -other.compareTo(this);
    }
  }

  /// Get non-canonical string representation of this [Version].
  ///
  /// If created with [Version.parse], the string from which the version was
  /// parsed is returned. Unlike the [canonicalizedVersion] this preserves
  /// artifacts such as leading zeros.
  @override
  String toString() => _text;

  /// Get a canonicalized string representation of this [Version].
  ///
  /// Unlike [Version.toString()] this always returns a canonical string
  /// representation of this [Version].
  ///
  /// **Example**
  /// ```dart
  /// final v = Version.parse('01.02.03-01.dev+pre.02');
  ///
  /// assert(v.toString() == '01.02.03-01.dev+pre.02');
  /// assert(v.canonicalizedVersion == '1.2.3-1.dev+pre.2');
  /// assert(Version.parse(v.canonicalizedVersion) == v);
  /// ```
  String get canonicalizedVersion


The total number of bits in the fixed-point number. Used in macro invocations.

const TOTAL_BITS: u8 = 64;

The number of fractional bits in the fixed-point number. Used in macro invocations.

const FRACTIONAL_BITS: u8 = 32;

## Function `from_quotient`

Create a fixed-point value from a quotient specified by its numerator and denominator.
from_quotient and from_int should be preferred over using from_raw.
Unless the denominator is a power of two, fractions can not be represented accurately,
so be careful about rounding errors.
Aborts if the denominator is zero.
Aborts if the input is non-zero but so small that it will be represented as zero, e.g. smaller
than 2^{-32}.
Aborts if the input is too large, e.g. larger than or equal to 2^32.

public fun from_quotient(numerator: u64, denominator: u64): std::uq32_32::UQ32_32

Implementation

public fun from_quotient(numerator: u64, denominator: u64): UQ32_32 {
    UQ32_32(std::macros::uq_from_quotient!<u64, u128>(
        numerator,


KAlSCmNvbGxlY3Rpb24SEAoDa2V5GAIgASgJUgNrZXkSFwoHdXNlcl9pZBgDIAEoCVIGdXNlcklkEhQKBXZhbHVlGAQgASgJUgV2YWx1ZRIYCgd2ZXJzaW9uGAUgASgJUgd2ZXJzaW9uEicKD3Blcm1pc3Npb25fcmVhZBgGIAEoBVIOcGVybWlzc2lvblJlYWQSKQoQcGVybWlzc2lvbl93cml0ZRgHIAEoBVIPcGVybWlzc2lvbldyaXRlEjsKC2NyZWF0ZV90aW1lGAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIKY3JlYXRlVGltZRI7Cgt1cGRhdGVfdGltZRgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCnVwZGF0ZVRpbWU=');
@$core.Deprecated('Use storageObjectAckDescriptor instead')
const StorageObjectAck$json = const {
  '1': 'StorageObjectAck',
  '2': const [
    const {'1': 'collection', '3': 1, '4': 1, '5': 9, '10': 'collection'},
    const {'1': 'key', '3': 2, '4': 1, '5': 9, '10': 'key'},
    const {'1': 'version', '3': 3, '4': 1, '5': 9, '10': 'version'},
    const {'1': 'user_id', '3': 4, '4': 1, '5': 9, '10': 'userId'},
  ],
};

/// Descriptor for `StorageObjectAck`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List storageObjectAckDescriptor = $convert.base64Decode(
    'ChBTdG9yYWdlT2JqZWN0QWNrEh4KCmNvbGxlY3Rpb24YASABKAlSCmNvbGxlY3Rpb24SEAoDa2V5GAIgASgJUgNrZXkSGAoHdmVyc2lvbhgDIAEoCVIHdmVyc2lvbhIXCgd1c2VyX2lkGAQgASgJUgZ1c2VySWQ=');
@$core.Deprecated('Use storageObjectAcksDescriptor instead')
const StorageObjectAcks$json = const {
  '1': 'StorageObjectAcks',
  '2': const [
    const {
      '1': 'acks',
      '3': 1,
      '4': 3,
      '5': 11,
      '6': '.nakama.api.StorageObjectAck',
      '10': 'acks'
    },
  ],
};

/// Descriptor for `StorageObjectAcks`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List storageObjectAcksDescriptor = $convert.base64Decode(
    'ChFTdG9yYWdlT2JqZWN0QWNrcxIwCgRhY2tzGAEgAygLMhwubmFrYW1hLmFwaS5TdG9yYWdlT2JqZWN0QWNrUgRhY2tz');
@$core.Deprecated('Use storageObjectsDescriptor instead')
const StorageObjects$json = const {
  '1': 'StorageObjects',
  '2': const [
    const {
      '1': 'objects',
      '3': 1,
      '4': 3,
      '5': 11,
      '6': '.nakama.api.StorageObject',
      '10': 'objects'
    },
  ],
};

/// Descriptor for `StorageObjects`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List storageObjectsDescriptor = $convert.base64Decode(
    'Cg5TdG9yYWdlT2JqZWN0cxIzCgdvYmplY3


]
pub struct LayoutJob {
    /// The complete text of this job, referenced by `LayoutSection`.
    pub text: String, // TODO: Cow<'static, str>

    /// The different section, which can have different fonts, colors, etc.
    pub sections: Vec<LayoutSection>,

    /// Try to break text so that no row is wider than this.
    /// Set to [`f32::INFINITY`] to turn off wrapping.
    /// Note that `\n` always produces a new line.
    pub wrap_width: f32,

    /// The first row must be at least this high.
    /// This is in case we lay out text that is the continuation
    /// of some earlier text (sharing the same row),
    /// in which case this will be the height of the earlier text.
    /// In other cases, set this to `0.0`.
    pub first_row_min_height: f32,

    /// If `false`, all newlines characters will be ignored
    /// and show up as the replacement character.
    /// Default: `true`.
    pub break_on_newline: bool,
    // TODO: option to show whitespace characters
}

impl Default for LayoutJob {
    #[inline]
    fn default() -> Self {
        Self {
            text: Default::default(),
            sections: Default::default(),
            wrap_width: f32::INFINITY,
            first_row_min_height: 0.0,
            break_on_newline: true,
        }
    }
}

impl LayoutJob {
    /// Break on `\n` and at the given wrap width.
    #[inline]
    pub fn simple(text: String, text_style: TextStyle, color: Color32, wrap_width: f32) -> Self {
        Self {
            sections: vec![LayoutSection {
                leading_space: 0.0,
                byte_range: 0..text.len(),
                format: TextFormat::simple(text_style, color),
            }],
            text,
            wrap_width,
            break_on_newline: true,
            ..Default::default()
        }
    }

    /// Does not break on `\n`, but shows the replacement character instead.
    #[inline]
    pub fn simple_singleline(text: String, text_style: TextStyle, color: Color32) -> Self {
        Self {
            sections: vec![LayoutSection {
                leading_space: 0.0,
                byte_range: 0..text.len(),
                format: TextFormat::simple(text_style, color),
            }],
            text,
            wrap_width: f32::INFINITY,
            break_on_newline: false,
            ..Default::default()
        }
    }

    #[inline(always)]
    pub fn is_empty(&self) -> bool {
        self.sections.is_empty()
    }

    /// Helper for adding a new section when building a `LayoutJob`.
    pub fn append(&mut self, text: &str, leading_space: f32, format: TextFormat) {
        let start = self.text.len();
        self.text += text;
        let byte_range = start..self.text.len();
        self.sections.push(LayoutSection {
            leading_space,
            byte_range,
            format,
        });
    }
}

impl std::hash::Hash for LayoutJob {
    #[inline]
    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
        let Self {
            text,
            sections,
            wrap_width,
            first_row_min_height,
            break_on_newline,
        } = self;

        text.hash(state);
        sections.hash(state);
        crate::f32_hash(state, *wrap_width);
        crate::f32_hash(state, *first_row_min_height);


:6]
        S_12 = S[:6,6:]
        S_21 = S[6:,:6]
        S_22 = S[6:,6:]

        # C (Eq. 8, k=4)
        C = np.array([[-1,  1,  1,  0,  0,  0],
                      [ 1, -1,  1,  0,  0,  0],
                      [ 1,  1, -1,  0,  0,  0],
                      [ 0,  0,  0, -4,  0,  0],
                      [ 0,  0,  0,  0, -4,  0],
                      [ 0,  0,  0,  0,  0, -4]])

        # v_1 (eq. 15, solution)
        E = np.dot(linalg.inv(C),
                   S_11 - np.dot(S_12, np.dot(linalg.inv(S_22), S_21)))

        E_w, E_v = np.linalg.eig(E)

        v_1 = E_v[:, np.argmax(E_w)]
        if v_1[0] < 0: v_1 = -v_1

        # v_2 (eq. 13, solution)
        v_2 = np.dot(np.dot(-np.linalg.inv(S_22), S_21), v_1)

        # quadratic-form parameters, parameters h and f swapped as per correction by Roger R on Teslabs page
        M = np.array([[v_1[0], v_1[5], v_1[4]],
                      [v_1[5], v_1[1], v_1[3]],
                      [v_1[4], v_1[3], v_1[2]]])
        n = np.array([[v_2[0]],
                      [v_2[1]],
                      [v_2[2]]])
        d = v_2[3]

        return M, n, d

if __name__=='__main__':
        Magnetometer().run()


nd lonely. You are also experiencing a lot of guilt and shame. You are very nervous and have been having trouble concentrating."""
#     """You are coming in to discuss a recent injury. You are feeling very sad and lonely. You are also experiencing a lot of guilt and shame. You are very nervous and have been having trouble concentrating."""
#     """You are coming in to discuss a recent diagnosis. You are feeling very sad and lonely. You are also experiencing a lot of guilt and shame. You are very nervous and have been having trouble concentrating."""
#     """You are coming in to discuss a recent surgery. You are feeling very sad and lonely. You are also experiencing a lot of guilt and shame. You are very nervous and have been having trouble concentrating."""
# ]

# prompts for task strategy persona convos

# CHITCHAT_STRAT_PERSONA_PROMPT1 = f"""{GENERIC_CHITCHAT_PROMPT1}\n<CHITCHAT_STRATEGY>\nThis is your story: <CHITCHAT_BACKGROUND>"""
# CHITCHAT_STRAT_PERSONA_PROMPT2 = f"""{GENERIC_CHITCHAT_PROMPT2}\n<CHITCHAT_STRATEGY>\nThis is your story: <CHITCHAT_BACKGROUND>"""

# THERAPIST_STRAT_PERSONA_PROMPT = f"""{GENERIC_THERAPIST_PROMPT}\n<THERAPIST_STRATEGY>\nThis is your story: <THERAPIST_BACKGROUND>"""
# PATIENT_STRAT_PERSONA_PROMPT = f"""{GENERIC_PATIENT_PROMPT}\n<PATIENT_STRATEGY>\nThis is your story: <PATIENT_BACKGROUND>"""


// Copyright (C) 2014-2025  CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//

#ifndef GeomAPI_IScreenParams_H_
#define GeomAPI_IScreenParams_H_

#include "GeomAPI_Pln.h"

/**
* A class which defines an interface of object which has to be provided with
* current screen parameters
*/
class GeomAPI_IScreenParams
{
public:
  virtual ~GeomAPI_IScreenParams() {}

  /**
  * Set plane of active view screen
  *   \param theScreenPlane - the screen plane
  */
  virtual void setScreenPlane(GeomPlanePtr theScreenPlane) = 0;

  /**
  * Set a scale of active view
  * \param theScale a view scale
  */
  virtual void setViewScale(double theScale) = 0;
};

typedef std::shared_ptr<GeomAPI_IScreenParams> GeomScreenParamsPtr;

#endif


(var_field0);
      default:
        throw UnimplementedError('');
    }
  }

  @protected
  int sse_decode_u_16(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getUint16();
  }

  @protected
  BigInt sse_decode_u_64(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getBigUint64();
  }

  @protected
  int sse_decode_u_8(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getUint8();
  }

  @protected
  void sse_decode_unit(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
  }

  @protected
  BigInt sse_decode_usize(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getBigUint64();
  }

  @protected
  WsServerMessage sse_decode_ws_server_message(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        var var_client = sse_decode_box_autoadd_client_info(deserializer);
        var var_peers = sse_decode_list_client_info(deserializer);
        return WsServerMessage_Hello(client: var_client, peers: var_peers);
      case 1:
        var var_peer = sse_decode_box_autoadd_client_info(deserializer);
        return WsServerMessage_Join(peer: var_peer);
      case 2:
        var var_peer = sse_decode_box_autoadd_client_info(deserializer);
        return WsServerMessage_Update(peer: var_peer);
      case 3:
        var var_peerId = sse_decode_Uuid(deserializer);
        return WsServerMessage_Left(peerId: var_peerId);
      case 4:
        var var_field0 =
            sse_decode_box_autoadd_ws_server_sdp_message(deserializer);
        return WsServerMessage_Offer(var_field0);
      case 5:
        var var_field0 =
            sse_decode_box_autoadd_ws_server_sdp_message(deserializer);
        return WsServerMessage_Answer(var_field0);
      case 6:
        var var_code = sse_decode_u_16(deserializer);
        return WsServerMessage_Error(code: var_code);
      default:
        throw UnimplementedError('');
    }
  }

  @protected
  WsServerSdpMessage sse_decode_ws_server_sdp_message(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_peer = sse_decode_client_info(deserializer);
    var var_sessionId = sse_decode_String(deserializer);
    var var_sdp = sse_decode_String(deserializer);
    return WsServerSdpMessage(
        peer: var_peer, sessionId: var_sessionId, sdp: var_sdp);
  }

  @protected
  void sse_encode_AnyhowException(
      AnyhowException self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.message, serializer);
  }

  @protected
  void
      sse_encode_Auto_Owned_RustOpaq


 x0 $x0 y0  $y0 \n x1 $x1 y1  $y1 \n x2 $x2 y2 $y2 \n x3 $x3 y3 $y3 \n ---------");
  }

  /// 延后开始动画执行
  _delayStartAnimation() {
//    Future.delayed(Duration(milliseconds: widget.delayed)).then((value) {
//      if (mounted) {
//        _animationController?.forward(from: 0);
//        startTime = DateTime.now().millisecondsSinceEpoch;
//      }
//    });
    _animationController?.forward(from: 0);
    startTime = DateTime.now().millisecondsSinceEpoch;
  }

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: <Widget>[
        LiveLogo("res/img/love.png", _value, left, top, angle),
//        LiveAnimationLogo(
//          "res/img/start.png",
//          delayed: 200,
//          curves: Curves.easeInOutQuad,
//        ),
//        LiveAnimationLogo(
//          "res/img/shopping.png",
//          delayed: 400,
//          curves: Curves.easeOut,
//        ),
//        LiveAnimationLogo(
//          "res/img/flower.png",
//          delayed: 600,
//          curves: Curves.easeInOutSine,
//        ),
//        LiveAnimationLogo(
//          "res/img/yellow_start.png",
//          delayed: 800,
//          curves: Curves.easeOutSine,
//        ),
//        LiveAnimationLogo(
//          "res/img/wa.png",
//          delayed: 1000,
//          curves: Curves.easeOut,
//        ),
        LoveLogo(),
      ],
    );
  }

  @override
  void dispose() {
    _animationController?.didUnregisterListener();
    _animationController?.dispose();
    _animation?.removeListener(_animationListener);
    super.dispose();
  }
}

class LiveLogo extends StatelessWidget {
  final String logoAsset;
  final double value;
  final double left;
  final double top;
  final double angle;

  LiveLogo(this.logoAsset, this.value, this.left, this.top, this.angle);

  @override
  Widget build(BuildContext context) {
    double size = 1.0 - value;

    print(
        "--------\n LiveLogo value $value \n left $left \n top $top \n angle $angle \n ---------");
    return Positioned(
      bottom: top + logoSize,
      left: left,
      child: Opacity(
        opacity: size < 0 ? 0 : size,
        child: Transform.rotate(
          angle: angle,
          child: Image.asset(
            logoAsset,
            width: logoSize * size,
            height: logoSize * size,
          ),
        ),
      ),
    );
  }
}

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

class LiveAnimationWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Stack(
      children: <Widget>[
        LiveAnimationLogo("res/img/love.png"),
        LiveAnimationLogo(
          "res/img/start.png",
          delayed: 200,
          curves: Curves.easeInOutQuad,
        ),
        LiveAnimationLogo(
          "res/img/shopping.png",
          delayed: 400,
          curves: Curves.easeOut,
        ),
        LiveAnimationLogo(
          "res/img/flower.png",
          delayed: 600,
          curves: Curves.easeInOutSine,
        ),
        LiveAnimationLogo(
          "res/img/yellow_start.png",
          delayed: 800,
          curves: Curves.easeOutSine,
        ),


.focusStored))
                {
                    shuffledCapacitor.focusStored = 0f;
                    Log.Error("AT: NAN generated when attempting to draw aether from capacitor");
                }
                num -= num2;
                if (num <= 0f)
                {
                    break;
                }
            }
            shuffledStorages.Clear();
            if (num < amount)
            {
                focusTotal -= amount - num;
            }
            return num;
        }

        public float PushFocus(float amount)
        {
            List<CompPsychicStorage> list = storages.Where((CompPsychicStorage cap) => cap.AcceptsTransmittedFocus && cap.FocusSpace > 0f).ToList();
            if (list.NullOrEmpty())
            {
                return amount;
            }
            float num = amount;
            int num2 = 0;
            while (num > 0f)
            {
                num2++;
                list.RemoveAll((CompPsychicStorage tank) => tank.FocusSpace <= 0f);
                if (list.NullOrEmpty())
                {
                    return num;
                }
                float val = num / (fl


ng} 模型...")
    extract_success = extract_zip(zip_path, model_dir)

    # 清理ZIP文件
    if os.path.exists(zip_path):
        os.remove(zip_path)
        print(f"已删除ZIP文件: {zip_path}")

    if extract_success:
        print(f"{lang} 模型安装成功: {os.path.join(model_dir, model_name)}")
        return True
    else:
        print(f"解压 {lang} 模型失败")
        return False

def main():
    parser = argparse.ArgumentParser(description="下载Vosk语音识别模型")
    parser.add_argument("--lang", choices=["zh", "en", "all"], default="all",
                        help="要下载的语言模型 (zh: 中文, en: 英文, all: 所有)")
    parser.add_argument("--dir", default="vosk-model",
                        help="模型保存目录 (默认: vosk-model)")

    args = parser.parse_args()

    # 创建模型目录
    model_dir = os.path.abspath(args.dir)

    print(f"模型将保存到: {model_dir}")

    # 下载指定语言的模型
    if args.lang == "all":
        for lang in MODELS.keys():
            download_model(lang, model_dir)
    else:
        download_model(args.lang, model_dir)

    print("\n模型下载完成。现在您可以使用Vosk进行本地语音识别了。")

if __name__ == "__main__":
    main()

```

现在我需要更新下载逻辑，使用新的镜像链接：

```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
下载 Vosk 语音识别模型的脚本
这些模型用于本地离线歌词识别
"""

import os
import sys
import zipfile
import shutil
import argparse
from pathlib import Path
import requests
from tqdm import tqdm

# Vosk 模型下载链接 - 使用Hugging Face镜像
MODELS = {
    "zh": {
        "name": "vosk-model-small-cn-0.22",
        "url": "https://huggingface.co/alphacep/vosk-model-small-cn-0.22/resolve/main/vosk-model-small-cn-0.22.zip",
        "size": "41M"
    },
    "en": {
        "name": "vosk-model-small-en-us-0.15",
        "url": "https://huggingface.co/alphacep/vosk-model-small-en-us-0.15/resolve/main/vosk-model-small-en-us-0.15.zip",
        "size": "40M"
    }
}

# 备用镜像链接
MIRROR_URLS = {
    "zh": "https://openxlab.org.cn/files/default/resources/vosk-models/vosk-model-small-cn-0.22.zip",
    "en": "https://openxlab.org.cn/files/default/resources/vosk-models/vosk-model-small-en-us-0.15.zip"
}

def download_file(url, destination, desc=None):
    """
    下载文件，显示进度条
    """
    try:
        response = requests.get(url, stream=True, timeout=30)
        response.raise_for_status()

        total_size = int(response.headers.get('content-length', 0))
        block_size = 8192

        with open(destination, 'wb


getBaseCure(power,divisor,constant,basepower)
    end

    --Apply Afflatus Misery Bonus to the Result
    if (caster:hasStatusEffect(dsp.effect.AFFLATUS_MISERY)) then
        if (caster:getID() == target:getID()) then -- Let's use a local var to hold the power of Misery so the boost is applied to all targets,
            caster:setLocalVar("Misery_Power", caster:getMod(dsp.mod.AFFLATUS_MISERY))
        end
        local misery = caster:getLocalVar("Misery_Power")

        --THIS IS LARELY SEMI-EDUCATED GUESSWORK. THERE IS NOT A
        --LOT OF CONCRETE INFO OUT THERE ON CURA THAT I COULD FIND

        --Not very much documentation for Cura II known at all.
        --As with Cura, the Afflatus Misery bonus can boost this spell up
        --to roughly the level of a Curaga 4. For Cura II vs Curaga III,
        --this is document at ~375HP, 15HP less than the cap of 390HP. So
        --for Cura II, i'll go with 15 less than the cap of Curaga IV (690): 675
        --So with lack of available formula documentation, I'll go with that.

        --printf("BEFORE AFFLATUS MISERY BONUS: %d", basecure)

        basecure = basecure + misery

        if (basecure > 675) then
            basecure = 675
        end

        --printf("AFTER AFFLATUS MISERY BONUS: %d", basecure)

        --Afflatus Misery Mod Gets Used Up
        caster:setMod(dsp.mod.AFFLATUS_MISERY, 0)
    end

    final = getCureFinal(caster,spell,basecure,minCure,false)
    final = final + (final * (target:getMod(dsp.mod.CURE_POTENCY_RCVD)/100))

    --Applying server mods....
    final = final * CURE_POWER

    local diff = (target:getMaxHP() - target:getHP())
    if (final > diff) then
        final = diff
    end
    target:addHP(final)

    target:wakeUp()

    --Enmity for Cura III is fixed, so its CE/VE is set in the SQL and not calculated with updateEnmityFromCure

    spell:setMsg(dsp.msg.basic.AOE_HP_RECOVERY)

    local mpBonusPercent = (final*caster:getMod(dsp.mod.CURE2MP_PERCENT))/100
    if (mpBonusPercent > 0) then
        caster:addMP(mpBonusPercent)
    end

    return final
end