::MULTITOUCH_START) {
    // this is by definition the first event in this block. If it's the first
    // touch, then we enter a slop state.
    mInSlop = (aInput.mTouches.Length() == 1);
    if (mInSlop) {
      mSlopOrigin = aInput.mTouches[0].mScreenPoint;
      TBS_LOG("%p entering slop with origin %s\n", this, Stringify(mSlopOrigin).c_str());
    }
    return false;
  }
  if (mInSlop) {
    ScreenCoord threshold = aApzcCanConsumeEvents
        ? AsyncPanZoomController::GetTouchStartTolerance()
        : ScreenCoord(gfxPrefs::APZTouchMoveTolerance() * APZCTreeManager::GetDPI());
    bool stayInSlop = (aInput.mType == MultiTouchInput::MULTITOUCH_MOVE) &&
        (aInput.mTouches.Length() == 1) &&
        ((aInput.mTouches[0].mScreenPoint - mSlopOrigin).Length() < threshold);
    if (!stayInSlop) {
      // we're out of the slop zone, and will stay out for the remainder of
      // this block
      TBS_LOG("%p exiting slop\n", this);
      mInSlop = false;
    }
  }
  return mInSlop;
}

uint32_t
TouchBlockState::GetActiveTouchCount() const
{
  return mTouchCounter.GetActiveTouchCount();
}

} // namespace layers
} // namespace mozilla
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "OverscrollHandoffState.h"

#include <algorithm>              // for std::stable_sort
#include "mozilla/Assertions.h"
#include "AsyncPanZoomController.h"

namespace mozilla {
namespace layers {

OverscrollHandoffChain::~OverscrollHandoffChain() {}

void
OverscrollHandoffChain::Add(AsyncPanZoomController* aApzc)
{
  mChain.push_back(aApzc);
}

struct CompareByScrollPriority
{
  bool operator()(const RefPtr<AsyncPanZoomController>& a,
                  const RefPtr<AsyncPanZoomController>& b) const
  {
    return a->HasScrollgrab() && !b->HasScrollgrab();
  }
};

void
OverscrollHandoffChain::SortByScrollPriority()
{
  // The sorting being stable ensures that the relative order between
  // non-scrollgrabbing APZCs remains child -> parent.
  // (The relative order between scrollgrabbing APZCs will also remain
  // child -> parent, though that's just an artefact of the implementation
  // and users of 'scrollgrab' should not rely on this.)
  std::stable_sort(mChain.begin(), mChain.end(), CompareByScrollPriority());
}

const RefPtr<AsyncPanZoomController>&
OverscrollHandoffChain::GetApzcAtIndex(uint32_t aIndex) const
{
  MOZ_ASSERT(aIndex < Length());
  return mChain[aIndex];
}

uint32_t
OverscrollHandoffChain::IndexOf(const AsyncPanZoomController* aApzc) const
{
  uint32_t i;
  for (i = 0; i < Length(); ++i) {
    if (mChain[i] == aApzc) {
      break;
    }
  }
  return i;
}

void
OverscrollHandoffChain::ForEachApzc(APZCMethod aMethod) const
{
  for (ui


m *QueryThoughtsStatsRequest) XXX_Size() int {
	return m.Size()
}

func (m *QueryThoughtsStatsRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryThoughtsStatsRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryThoughtsStatsRequest proto.InternalMessageInfo

type QueryThoughtsStatsResponse struct {
	ThoughtsStats ThoughtsStats `protobuf:"bytes,1,rep,name=thoughts_stats,json=thoughtsStats,proto3,castrepeated=ThoughtsStats" json:"thoughts_stats"`
}

func (m *QueryThoughtsStatsResponse) Reset()         { *m = QueryThoughtsStatsResponse{} }
func (m *QueryThoughtsStatsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryThoughtsStatsResponse) ProtoMessage()    {}
func (*QueryThoughtsStatsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_55109069a1b1f260, []int{8}
}

func (m *QueryThoughtsStatsResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}

func (m *QueryThoughtsStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryThoughtsStatsResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}

func (m *QueryThoughtsStatsResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryThoughtsStatsResponse.Merge(m, src)
}

func (m *QueryThoughtsStatsResponse) XXX_Size() int {
	return m.Size()
}

func (m *QueryThoughtsStatsResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryThoughtsStatsResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryThoughtsStatsResponse proto.InternalMessageInfo

func (m *QueryThoughtsStatsResponse) GetThoughtsStats() ThoughtsStats {
	if m != nil {
		return m.ThoughtsStats
	}
	return nil
}

type QueryThoughtsFeesRequest struct{}

func (m *QueryThoughtsFeesRequest) Reset()         { *m = QueryThoughtsFeesRequest{} }
func (m *QueryThoughtsFeesRequest) String() string { return proto.CompactTextString(m) }
func (*QueryThoughtsFeesRequest) ProtoMessage()    {}
func (*QueryThoughtsFeesRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_55109069a1b1f260, []int{9}
}

func (m *QueryThoughtsFeesRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}

func (m *QueryThoughtsFeesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryThoughtsFeesRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}

func (m *QueryThoughtsFeesRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryThoughtsFeesRequest.Merge(m, src)
}

func (m *QueryThoughtsFeesRequest) XXX_Size() int {
	return m.Size()
}

func (m *QueryThoughtsFeesRequest) XXX_DiscardUnknow


 auto *mainType = cast<types::FuncType>(main->getType());
  ASSERT_TRUE(mainType);
  ASSERT_TRUE(util::match(mainType->getReturnType(), module->getVoidType()));
  ASSERT_EQ(0, std::distance(mainType->begin(), mainType->end()));
  ASSERT_FALSE(main->isReplaceable());

  auto *argVar = module->getArgVar();
  ASSERT_TRUE(argVar);
  ASSERT_TRUE(util::match(argVar->getType(),
                          module->unsafeGetArrayType(module->getStringType())));
  ASSERT_FALSE(argVar->isReplaceable());
}

TEST_F(HIRCoreTest, ModuleTypeGetAndLookup) {
  auto TYPE_NAME = "**test_type**";
  auto *newType = module->unsafeGetMemberedType(TYPE_NAME);
  ASSERT_TRUE(isA<types::RecordType>(newType));
  ASSERT_EQ(newType, module->getType(TYPE_NAME));
  module->remove(newType);

  newType = module->unsafeGetMemberedType(TYPE_NAME, true);
  ASSERT_TRUE(isA<types::RefType>(newType));
  ASSERT_EQ(newType, module->getType(TYPE_NAME));
}
#include "test.h"

#include <hercules/hir/util/matching.h>

using namespace hercules::ir;

TEST_F(HIRCoreTest, MatchingEquivalentVar) {
  auto *first = module->Nr<Var>(module->getIntType());
  auto *second = module->Nr<Var>(module->getIntType());
  auto *third = module->Nr<Var>(module->getFloatType());
  ASSERT_TRUE(util::match(first, second));
  ASSERT_FALSE(util::match(first, third));
}

TEST_F(HIRCoreTest, MatchingNonEquivalentVar) {
  auto *first = module->Nr<Var>(module->getIntType());
  auto *second = module->Nr<Var>(module->getFloatType());
  ASSERT_FALSE(util::match(first, second));
}

TEST_F(HIRCoreTest, MatchingEquivalentFunc) {
  {
    auto *first = module->Nr<BodiedFunc>();
    first->realize(module->unsafeGetDummyFuncType(), {});
    auto *second = module->Nr<BodiedFunc>();
    second->realize(module->unsafeGetDummyFuncType(), {});

    first->setJIT();
    second->setJIT();

    ASSERT_TRUE(util::match(first, second));
  }
  {
    auto *first = module->Nr<ExternalFunc>();
    first->realize(module->unsafeGetDummyFuncType(), {});
    auto *second = module->Nr<ExternalFunc>();
    second->realize(module->unsafeGetDummyFuncType(), {});

    first->setUnmangledName("baz");
    second->setUnmangledName("baz");

    ASSERT_TRUE(util::match(first, second));
  }
  {
    auto *first = module->Nr<LLVMFunc>();
    first->realize(module->unsafeGetDummyFuncType(), {});
    auto *second = module->Nr<LLVMFunc>();
    second->realize(module->unsafeGetDummyFuncType(), {});

    ASSERT_TRUE(util::match(first, second));
  }
}

TEST_F(HIRCoreTest, MatchingNonEquivalentFunc) {
  {
    auto *first = module->Nr<BodiedFunc>();
    first->realize(module->unsafeGetDummyFuncType(), {});
    auto *second = module->Nr<BodiedFunc>();
    second->realize(module->unsafeGetDummyFuncType(), {});

    first->setJIT();

    ASSERT_FALSE(util::match(first, second));
  }
  {
    auto *first = module->Nr<ExternalFunc>();
    first->realize(module->unsafe


 = { pos: arrowFunction.getStart(), end: arrowFunction.getEnd() }
  const edits = project.getLanguageService().compilerObject.getEditsForRefactor(arrowFunction.getSourceFile().getFilePath(), {}, range, 'Add or remove braces in an arrow function', 'Add braces to arrow function', {})
  return applyRefactorEditInfo(project, edits)
}

export function removeBracesFromArrowFunction(project: Project, arrowFunction: ArrowFunction) {
  const range = { pos: arrowFunction.getStart(), end: arrowFunction.getEnd() }
  const edits = project.getLanguageService().compilerObject.getEditsForRefactor(arrowFunction.getSourceFile().getFilePath(), {}, range, 'Add or remove braces in an arrow function', 'Remove braces from arrow function', {})
  return applyRefactorEditInfo(project, edits)
}

export function moveToNewFile(project: Project, node: Node, removeEmpty: boolean=false): ApplyFileTextChangesResult {
  const range = { pos: node.getStart(), end: node.getEnd() }
  const edits = project.getLanguageService().compilerObject.getEditsForRefactor(node.getSourceFile().getFilePath(), {}, range, 'Move to a new file', 'Move to a new file', {})
  return applyRefactorEditInfo(project, edits, removeEmpty)
}

export function convertToEs6Module(project: Project, node: Node){
  return applyAllSuggestedCodeFixes(project, node, [80001, 80005])
}

export function removeAllUnused(project: Project, node: Node) {
  return applyAllSuggestedCodeFixes(project, node, [
    6133, // variable is declared but is never read
    7028,
    6199,
    6192 // All imports in import declaration are unused.
  ])
}

export function  convertNamespaceImportToNamedImports(project: Project, node: Node) {

  const range = { pos: node.getStart(), end: node.getEnd() }
  const edits = project.getLanguageService().compilerObject.getEditsForRefactor(node.getSourceFile().getFilePath(), {}, range, 'Convert import', 'Convert namespace import to named imports', {})
  return applyRefactorEditInfo(project, edits)

}
export function convertNamedImportsToNamespaceImport(project: Project, node: Node) {
  const range = { pos: node.getStart(), end: node.getEnd() }
  const edits = project.getLanguageService().compilerObject.getEditsForRefactor(node.getSourceFile().getFilePath(), {}, range, 'Convert import', 'Convert named imports to namespace import', {})
  return applyRefactorEditInfo(project, edits)
}export enum ProductCategory {
    Notebook = 'Notebook',
    Phone = 'Phone'
}

export enum ProductColor {
    Red = 'Red',
    Black = 'Black',
    White = 'White'
}

export class Product {
    name = '';
    description = '';
    price = 0;
    isAvailable = false;
    category: ProductCategory = ProductCategory.Phone;
    color: ProductColor[] = [];
}
import axios from 'axios';
import { API_BASE_URL, API_KEY } from '../../config';

export class RestaurantsRestService {
    private http: any;

    constructor() {
        this.http = axios.create({
            baseURL: API_BASE_URL,
            headers: { 'user-key': API_KEY }
        });
    }

    public getRestaurants(params: any = {}): Promise<any> {
        const defaultParams = {
            start: 0,
            sort: 'cost',
            order: 'desc'
        };
        const payload: any = {
            ...defaultParams,
            ...params
        };
        const queryParams = Object.keys(payload).map(key => key + '=' + payload[key]).join('&');

        return new Promise((resolve, reject) => {
            thi


              z: acc.z + (cur.x - next.x) * (cur.y + next.y),
            },
        )
        .normalize()
}
/// Generates a tri
/// a--d
/// |  |
/// b--c
pub fn tri(a: Vec3, b: Vec3, c: Vec3) -> [Vertex; 3] {
    // Calculate normal using newell method
    //let norm = &vec3(0.0, 0.0, 0.0) - ((&c - a).cross(&b - a));
    let norm = newell(vec![a, b, c]);

    [vertex(a, norm), vertex(b, norm), vertex(c, norm)]
}
// Helper functions
/// Converts quad to tris
/// a--d
/// |  |
/// b--c
pub fn quad(a: Vec3, b: Vec3, c: Vec3, d: Vec3) -> [Vertex; 6] {
    // Calculate normal using newell method
    let norm = newell(vec![a, b, c, d]);

    //let norm = &vec3(0.0, 0.0, 0.0) - ((&d - a).cross(&b - a));

    [
        vertex(a, norm),
        vertex(b, norm),
        vertex(c, norm),
        vertex(c, norm),
        vertex(d, norm),
        vertex(a, norm),
    ]
}

pub fn polygon(vertices: &[Vec3]) -> Vec<Vertex> {
    vertices
        .windows(3)
        .flat_map(|vertices| {
            let norm = newell(vec![vertices[0], vertices[1], vertices[2]]);
            vec![
                vertex(vertices[0], norm),
                vertex(vertices[1], norm),
                vertex(vertices[2], norm),
            ]
        })
        .collect()
}

pub fn star(num_points: u16, in_radius: f32, out_radius: f32) -> Vec<Vec3> {
    let theta = PI / f32::from(num_points);

    (0..=num_points)
        .flat_map(|i| {
            let i = f32::from(i);
            vec![
                vec3(
                    in_radius * (i * theta * 2.0).cos(),
                    0.0,
                    in_radius * (i * theta * 2.0).sin(),
                ),
                vec3(
                    out_radius * (i * theta * 2.0 + 1.0).cos(),
                    0.0,
                    out_radius * (i * theta * 2.0 + 1.0).sin(),
                ),
                vec3(0.0, 0.0, 0.0),
            ]
        })
        .collect()
}
/// Generates a rectangular_prism, cen
pub fn rectangular_prism(center: Vec3, width: f32, height: f32, depth: f32) -> Vec<Vertex> {
    // Easy access to self elements
    // Start by creating the table top
    // FRONT
    // (view from front)
    // ftl--ftr
    // |      |
    // fbl--fbr
    let ftl = vec3(-width / 2.0, depth / 2.0, -height / 2.0);
    let fbl = vec3(-width / 2.0, -depth / 2.0, -height / 2.0);
    let fbr = vec3(width / 2.0, -depth / 2.0, -height / 2.0);
    let ftr = vec3(width / 2.0, depth / 2.0, -height / 2.0);
    // BACK
    // (view from front)
    // btl--btr
    // |      |
    // bbl--bbr
    let btl = vec3(-width / 2.0, depth / 2.0, height / 2.0);
    let bbl = vec3(-width / 2.0, -depth / 2.0, height / 2.0);
    let bbr = vec3(width / 2.0, -depth / 2.0, height / 2.0);
    let btr = vec3(width / 2.0, depth / 2.0, height / 2.0);
    // Allocate vector for each quad
    let mut vertices: Vec<Vertex> = Vec::with_capacity(36);
    // Front
    vertices


"
	"github.com/openservicemesh/osm/pkg/identity"
	"github.com/openservicemesh/osm/pkg/messaging"
	"github.com/openservicemesh/osm/pkg/models"
)

type fakeConfig string

type fakeGenerator struct {
	mu        sync.Mutex
	callCount map[string]int
}

func (g *fakeGenerator) getCallCount(uuid string) int {
	g.mu.Lock()
	defer g.mu.Unlock()
	return g.callCount[uuid]
}

func (g *fakeGenerator) GenerateConfig(ctx context.Context, proxy *models.Proxy) (fakeConfig, error) {
	g.mu.Lock()
	defer g.mu.Unlock()
	g.callCount[proxy.UUID.String()]++
	return fakeConfig(fmt.Sprintf("%s: %d", proxy.UUID, g.callCount[proxy.UUID.String()])), nil
}

type fakeServer struct {
	mu             sync.Mutex
	proxyConfigMap map[string]fakeConfig

	callCount map[string]int
}

func (s *fakeServer) getConfig(uuid string) fakeConfig {
	s.mu.Lock()
	defer s.mu.Unlock()
	return s.proxyConfigMap[uuid]
}

func (s *fakeServer) getCallCount(uuid string) int {
	s.mu.Lock()
	defer s.mu.Unlock()
	return s.callCount[uuid]
}

func (s *fakeServer) UpdateProxy(ctx context.Context, proxy *models.Proxy, config fakeConfig) error {
	s.mu.Lock()
	defer s.mu.Unlock()
	s.callCount[proxy.UUID.String()]++
	s.proxyConfigMap[proxy.UUID.String()] = config

	return nil
}

func TestControlLoop(t *testing.T) {
	tassert := assert.New(t)
	mockCtrl := gomock.NewController(t)
	defer mockCtrl.Finish()

	server := &fakeServer{
		proxyConfigMap: make(map[string]fakeConfig),
		callCount:      make(map[string]int),
	}
	g := &fakeGenerator{
		callCount: make(map[string]int),
	}
	certManager := tresorFake.NewFake(1 * time.Hour)
	stop := make(chan struct{})

	provider := compute.NewMockInterface(mockCtrl)

	provider.EXPECT().GetMeshConfig().AnyTimes()
	provider.EXPECT().VerifyProxy(gomock.Any()).AnyTimes()

	meshCatalog := catalog.NewMeshCatalog(
		provider,
		tresorFake.NewFake(time.Hour),
		stop,
		messaging.NewBroker(stop),
	)

	cp := NewControlPlane[fakeConfig](server, g, meshCatalog, registry.NewProxyRegistry(), certManager, messaging.NewBroker(stop))

	// With no proxies registered, should be empty
	time.Sleep(time.Second)
	tassert.Empty(server.proxyConfigMap)
	tassert.Empty(server.callCount)
	tassert.Empty(g.callCount)

	uuid1 := uuid.New()
	id1 := identity.New("p2", "ns2")
	cert1, err := certManager.IssueCertificate(certificate.ForCommonNamePrefix(models.NewXDSCertCNPrefix(uuid1, models.KindSidecar, id1)))
	tassert.NoError(err)

	uuid2 := uuid.New()
	id2 := identity.New("p2", "ns2")
	cert2, err := certManager.IssueCertificate(certificate.ForCommonNamePrefix(models.NewXDSCertCNPrefix(uuid2, models.KindSidecar, id2)))
	tassert.NoError(err)

	x509Cert1, err := certificate.DecodePEMCertificate(cert1.GetCertificateChain())
	tassert.NoError(err)

	x509Cert2, err := c


 opt;
    };
    jQuery.style = function (elem, name, value, extra) {

        // Don't set styles on text and comment nodes
        if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
            return;
        }

        // Make sure that we're working with the right name
        var ret, type, origName = jQuery.camelCase(name),
			style = elem.style, hooks = jQuery.cssHooks[origName];

        name = jQuery.cssProps[origName] || origName;

        // Check if we're setting a value
        if (value !== undefined) {
            type = typeof value;

            // convert relative number strings (+= or -=) to relative numbers. #7345
            if (type === "string" && (ret = rrelNum.exec(value))) {
                value = (+(ret[1] + 1) * +ret[2]) + parseFloat(jQuery.css(elem, name));
                // Fixes bug #9237
                type = "number";
            }

            // Make sure that NaN and null values aren't set. See: #7116
            if (value == null || type === "number" && isNaN(value)) {
                return;
            }

            // If a number was passed in, add 'px' to the (except for certain CSS properties)
            if (type === "number" && !jQuery.cssNumber[origName]) {
                value += "px";
            }

            // If a hook was provided, use that value, otherwise just set the specified value
            if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value)) !== undefined) {
                // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
                // Fixes bug #5509
                try {
                    style[name] = value;
                } catch (e) { }
            }

        } else {
            // If a hook was provided get the non-computed value from there
            if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {
                return ret;
            }

            // Otherwise just get the value from the style object
            return style[name];
        }
    };
    jQuery.sub = function () {
        /// <summary>
        ///     Creates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object.
        /// </summary>
        /// <returns type="jQuery" />

        function jQuerySub(selector, context) {
            return new jQuerySub.fn.init(selector, context);
        }
        jQuery.extend(true, jQuerySub, this);
        jQuerySub.superclass = this;
        jQuerySub.fn = jQuerySub.prototype = this();
        jQuerySub.fn.constructor = jQuerySub;
        jQuerySub.sub = this.sub;
        jQuerySub.fn.init = function init(selector, context) {
            if (context && context instanceof jQuery && !(context instanceof jQuerySub)) {
                context = jQuerySub(context);
            }

            return jQuery.fn.init.call(this, selector, context, rootjQuerySub);
        };
        jQuerySub.fn.init.prototype = jQuerySub.fn;
        var rootjQuerySub = jQuerySub(document);
        return jQuerySub;
    };
    jQuery.support = {
        "leadingWhitespace": true,
        "tbody": true,
        "htmlSerialize": true,
        "style": true,
        "hrefNormalized": true,
        "opacity": true,
        "cssFloat": true,
        "checkOn": true,
        "optSelected": false,
        "getSetAttribute": true,
        "enctype": true,
        "html5Clone": true,
        "submitBubbles": true,
        "changeBubbles": true,
        "focusinBubbles": true,
        "deleteExpando": true,
        "noCloneEvent": true,
        "inlineBlockNeedsLayout": false,
        "shrinkWrapBlocks": false,
        "reliableMarginRight": true,
        "pixelMargin": true,
        "boxModel": true,
        "noCloneChecked": false,
        "optDisabled": true,
        "radioValue": false,
        "checkClone": true,
        "append


apRewards = {} end
    --   if not GapRewards[msg['Bet-Id']] then GapRewards[msg['Bet-Id']] = {} end
    --   table.insert(GapRewards[msg['Bet-Id']],{msg["Mint-Time"],minted.total,msg.Id})

    --   -- update state
    --   utils.update(State,{
    --     minting = msg.Data.minting
    --   })
    --   utils.increase(State.minting_plus,{minted.total,1})

    --   -- update the bet
    --   local index = tonumber(msg['Bet-Index']) or BetsIndexer[msg['Bet-Id']]
    --   if minted then
    --     if not Bets[index].mint.plus then
    --       Bets[index].mint.plus = {0,0} -- {total, counts}
    --     end
    --     utils.increase(Bets[index].mint.plus,{minted.total,1})
    --     print("Minting plus for bet "..msg['Bet-Id'].." - at "..msg.Timestamp)
    --   end
    -- end)
  end
end

Handlers.add("pause",{
  From = AGENT,
  Action = "Pause"
},function(msg)
  assert(State.run == 1,"the pool is already paused")
  State.run = 0
  MINTING_PLUS_LOCKER = true
  State.latest_pause = msg.Timestamp or os.time()
  State.total_pause = (State.total_pause or 0) + 1
  print("The pool has been paused")
end)

Handlers.add("resume",{
  From = AGENT,
  Action = "Resume"
},function(msg)
  assert(State.run == 0,"the pool is already running")
  local diff = msg.Timestamp - (State.latest_pause or msg.Timestamp)
  State.ts_latest_draw = State.ts_latest_draw + diff
  State.latest_minting_plus = State.latest_minting_plus + diff
  State.run = 1
  MINTING_PLUS_LOCKER = false
  State.latest_pause = nil
  print("The pool has been resumed")
end)


ll.
		// If a user specified a non-Null, empty list for Entitlements, and the deserialized field value is Null,
		// set the resulting resource state to the empty list to match the planned value.
		to.Entitlements = from.Entitlements
	}
	if !from.Groups.IsNull() && !from.Groups.IsUnknown() && to.Groups.IsNull() && len(from.Groups.Elements()) == 0 {
		// The default representation of an empty list for TF autogenerated resources in the resource state is Null.
		// If a user specified a non-Null, empty list for Groups, and the deserialized field value is Null,
		// set the resulting resource state to the empty list to match the planned value.
		to.Groups = from.Groups
	}
	if !from.Name.IsNull() && !from.Name.IsUnknown() {
		if toName, ok := to.GetName(ctx); ok {
			if fromName, ok := from.GetName(ctx); ok {
				toName.SyncFieldsDuringRead(ctx, fromName)
				to.SetName(ctx, toName)
			}
		}
	}
	if !from.Roles.IsNull() && !from.Roles.IsUnknown() && to.Roles.IsNull() && len(from.Roles.Elements()) == 0 {
		// The default representation of an empty list for TF autogenerated resources in the resource state is Null.
		// If a user specified a non-Null, empty list for Roles, and the deserialized field value is Null,
		// set the resulting resource state to the empty list to match the planned value.
		to.Roles = from.Roles
	}
	if !from.Schemas.IsNull() && !from.Schemas.IsUnknown() && to.Schemas.IsNull() && len(from.Schemas.Elements()) == 0 {
		// The default representation of an empty list for TF autogenerated resources in the resource state is Null.
		// If a user specified a non-Null, empty list for Schemas, and the deserialized field value is Null,
		// set the resulting resource state to the empty list to match the planned value.
		to.Schemas = from.Schemas
	}
}

func (c User_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder {
	attrs["active"] = attrs["active"].SetOptional()
	attrs["display_name"] = attrs["display_name"].SetOptional()
	attrs["emails"] = attrs["emails"].SetOptional()
	attrs["entitlements"] = attrs["entitlements"].SetOptional()
	attrs["external_id"] = attrs["external_id"].SetOptional()
	attrs["groups"] = attrs["groups"].SetOptional()
	attrs["id"] = attrs["id"].SetOptional()
	attrs["name"] = attrs["name"].SetOptional()
	attrs["name"] = attrs["name"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder)
	attrs["roles"] = attrs["roles"].SetOptional()
	attrs["schemas"] = attrs["schemas"].SetOptional()
	attrs["user_name"] = attrs["user_name"].SetOptional()

	return attrs
}

// GetComplexFieldTypes returns a map of the types of elements in complex fields in User.
// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry
// the type information of their elements in the Go type system. This function provides a way to
// retrieve the type information of the elements in complex fields at runtime. The values of the map
// are the reflected types of the contained elements. They must be either primitive values from the
// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF
// SDK values.
func (a User_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type {
	return map[string]reflect.Type{
		"emails":       reflect


_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h07bf5801f126fb76E
	.quad	_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h07bf5801f126fb76E
	.size	.L__unnamed_1, 48

	.type	.L__unnamed_2,@object
	.section	.rodata..L__unnamed_2,"a",@progbits
	.p2align	3
.L__unnamed_2:
	.size	.L__unnamed_2, 0

	.type	.L__unnamed_5,@object
	.section	.rodata.cst4,"aM",@progbits,4
.L__unnamed_5:
	.ascii	"bar\n"
	.size	.L__unnamed_5, 4

	.type	.L__unnamed_3,@object
	.section	.data.rel.ro..L__unnam


,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gnomehazardlightred11 = 193650,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gnomehazardlightred15 = 193660,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gunshopmortarshell06 = 193667,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_battlefieldbannerhorde_static_wall02 = 193691,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gnometable05 = 193633,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_vr_bm_wood_02 = 193678,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gnometable08 = 193671,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_g_hologrambasetanaris02 = 193674,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_battlefieldbanneralliancestatusbar2min02 = 193675,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_thronerailing10 = 193676,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_stormwindcrate06 = 193646,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_stormwindcrate08 = 193648,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gnomestructuralspotlight06 = 193649,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gunshopbomb18 = 193636,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gunshopbomb25 = 193664,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gunshopbomb26 = 193665,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_orcshield01 = 193679,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_crate03 = 193637,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gunshopbomb19 = 193642,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_gunshopbomb20 = 193643,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_g_gnometerminal02 = 193668,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_thronerailing08 = 193669,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_thronerailing09 = 193670,
		/// <summary>
		/// Type: Generic
		/// </summary>
		Doodad_crate04 = 193641,
		/// <summary>
		/// Type: Button
		/// Trap: Neutral Banner Aura (ID: 180102, 180102)
		/// Lock: Unlocked
		/// </summary>
		HordeBanner_101 = 195145,
		/// <summary>
		/// Type: Generic
		/// </summary>
		IronforgeBanner_3 = 194277,
		/// <summary>
		/// Type: Generic
		/// </summary>
		FrozenBones = 193961,
		/// <summary>
		/// Type: Mailbox
		/// </summary>
		Mailbox_199 = 195219,
		/// <summary>
		/// Type: Transport
		///


弦上。看看你周围的朋友和家人，问问你自己，如果战争真的爆发，你会为此做些什么，你周围的人会一定会尽其所能地努力生存下来。","现在，我在这里收集符文布绷带。你愿意捐赠一些吗？"}, {"把20卷符文布绷带交给铁炉堡军事区的守护者莫沙·月影。"}},
[8523] = {"联盟需要更多符文布绷带！", {"现在是我们再次讨论重要事宜的时候了，<class>。我要对你上次的努力表示感谢；不是所有人都愿意如此无私而慷慨的。但是我们还有更多的工作需要完成。","<name>，你是否愿意收集更多的符文布绷带给我呢？"}, {"把20卷符文布绷带交给丹莫罗飞机场的守护者莫沙·月影。"}},
[8524] = {"联盟需要彩鳍鱼！", {"你好，朋友！你不认为士兵也和别人一样需要吃饭吗？你当然会赞同这一点。我110%%地同意你的看法！很高兴我们达成了一致。现在我要你做的就是去钓很多很多新鲜的彩鳍鱼，然后把它们烧好，带到我这里来。嗯，我仿佛已经可以尝到它们了……"}, {"把20条彩鳍鱼交给铁炉堡军事区的美食家斯里克。"}},
[8525] = {"联盟需要更多彩鳍鱼！", {"什么！又是你？你还没尝够……你是来帮忙的？好吧，我不能说我在责怪你。你难道不喜欢这些食物的味道吗？<流口水>","闲话说够了！快点去弄来更多的彩鳍鱼给我！"}, {"把20条彩鳍鱼交给丹莫罗飞机场的美食家斯里克。"}},
[8526] = {"联盟需要烤迅猛龙肉！", {"嘿，最近过得怎么样啊，<class>？我看你好像有兴趣帮即将开始的安其拉战争收集食品物资。我爸爸觉得我来这里帮忙是一个学习的好方法。这可是个大错误，我根本不喜欢吃肉。","不管怎么样，如果你愿意的话，请带给我大量的烤迅猛龙肉。显然这是所有士兵都想要的美食。"}, {"把20块烤迅猛龙肉交给铁炉堡军事区的萨拉·塞维斯。"}},
[8527] = {"联盟需要更多烤迅猛龙肉！", {"你好，<class>。我看得出，你对


TD>byte_write_width_a=70
    byte_write_width_b=70
    clocking_mode=0
    core_container=NA

    ecc_mode=0
    iptotal=20
    max_num_char=0
    memory_optimization=true

    memory_primitive=1
    memory_size=2240
    memory_type=1
    message_control=0

    num_char_loc=0
    p_ecc_mode=no_ecc
    p_enable_byte_write_a=0
    p_enable_byte_write_b=0

    p_max_depth_data=32
    p_memory_opt=yes
    p_memory_primitive=distributed
    p_min_width_data=70

    p_min_width_data_a=70
    p_min_width_data_b=70
    p_min_width_data_ecc=70
    p_min_width_data_ldw=4

    p_min_width_data_shft=70
    p_num_cols_write_a=1
    p_num_cols_write_b=1
    p_num_rows_read_a=1

    p_num_rows_read_b=1
    p_num_rows_write_a=1
    p_num_rows_write_b=1
    p_sdp_write_mode=yes

    p_width_addr_lsb_read_a=0
    p_width_addr_lsb_read_b=0
    p_width_addr_lsb_write_a=0
    p_width_addr_lsb_write_b=0

    p_width_addr_read_a=5
    p_width_addr_read_b=5
    p_width_addr_write_a=5
    p_width_addr_write_b=5

    p_width_col_write_a=70
    p_width_col_write_b=70
    read_data_width_a=70
    read_data_width_b=70

    read_latency_a=2
    read_latency_b=0
    read_reset_value_a=0
    read_reset_value_b=0

    use_embedded_constraint=0
    use_mem_init=0
    version=0
    wakeup_time=0

    write_data_wid


n request(`${controller}/${clinets}`, {
        method: 'DELETE',
    });
}

/**
 * 修改菜单
 * @param params 搜索参数
 */
export async function update(params: { [key: string]: any }) {
    return request(`${controller}`, {
        method: 'PUT',
        data: {
            ...params
        },
    });
}

/**
 * 获取分页 Data
 * @param params 搜索参数
 */
export async function pageQuery(params: { [key: string]: any }) {
    return request(`${controller}/pageQuery`, {
        method: 'GET',
        data: {
            ...params
        },
    });
}

/**
 * 获取指定终端信息
 * @param params 搜索参数
 */
export async function getByClientId(clinet: number) {
    return request(`${controller}/${clinet}`, {
        method: 'GET'
    });
}class Zadanie {
    tresc: string;
    odpowiedzA: string;
    odpowiedzB: string;
    odpowiedzC: string;
    odpowiedzD: string;
    prawidlowa: number;
    karaZaZla: number;
    czyRozwiazane: boolean;
    czyPoprawnie: boolean;
    czasPoswiecony: number;

    constructor(tresc: string, odpowiedzA: string, odpowiedzB: string, odpowiedzC: string,
        odpowiedzD: string, prawidlowa: number, karaZaZla: number) {
        this.tresc = tresc;
        this.odpowiedzA = odpowiedzA;
        this.odpowiedzB = odpowiedzB;
        this.odpowiedzC = odpowiedzC;
        this.odpowiedzD = odpowiedzD;
        this.prawidlowa = prawidlowa;
        this.karaZaZla = karaZaZla;
        this.czyRozwiazane = false;
        this.czasPoswiecony = 0;
    }

    rozwiaz() {
        this.czyRozwiazane = true;
    }
}

class Quiz {
    zadania: Zadanie[];
    obecnyCzas: number;
    obecneZadanie: number;
    liczbaRozwiazanych: number;
    czyRozwiazny: boolean;
    wstep: string;
    ID: number;

    constructor(zadania: Zadanie[], wstep: string, ID: number) {
        this.zadania = zadania;
        this.obecneZadanie = 1;
        this.obecnyCzas = 0;
        this.czyRozwiazny = false;
        this.liczbaRozwiazanych = 0;
        this.wstep = wstep;
        this.ID = ID;
    }
}

class ZadanieDoStat {
    numerZad: number;
    CzyPrawidlowa: boolean;
    kara: number;
    czasNaZadanie: number;

    constructor(numerZad: number, CzyPrawidlowa: boolean, kara: number, czasNaZadanie: number){
        this.numerZad = numerZad;
        this.CzyPrawidlowa = CzyPrawidlowa;
        this.kara = kara;
        this.czasNaZadanie = czasNaZadanie;
    }
}

class StatyQuizu {
    ID: number;
    wynik: number;
    czas: number;
    zadania: ZadanieDoStat[];

    constructor(ID: number, wynik: number, czas: number, zadania: ZadanieDoStat[]){
        this.ID = ID;
        this.wynik = wynik;
        this.czas = czas;
        this.zadania = zadania;
    }
}

function Zapisz(stat: StatyQuizu, punkty: number) {
    let wyniki: [number, string, StatyQuizu][];

    var oso


st()`\](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list)
  /// method or from the space URL. For example, if the space URL is
  /// `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID is
  /// `AAAAAAAAA`.
  core.String? name;

  /// Space permission settings for existing spaces.
  ///
  /// Input for updating exact space permission settings, where existing
  /// permission settings are replaced. Output lists current permission
  /// settings. Reading and updating permission settings supports: -
  /// [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  /// with
  /// [administrator approval](https://support.google.com/a?p=chat-app-auth)
  /// with the `chat.app.spaces` scope. Only populated and settable when the
  /// Chat app created the space. -
  /// [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
  ///
  /// Optional.
  PermissionSettings? permissionSettings;

  /// Input only.
  ///
  /// Predefined space permission settings, input only when creating a space. If
  /// the field is not set, a collaboration space is created. After you create
  /// the space, settings are populated in the `PermissionSettings` field.
  /// Setting predefined permission settings supports: -
  /// [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  /// with
  /// [administrator approval](https://support.google.com/a?p=chat-app-auth)
  /// with the `chat.app.spaces` or `chat.app.spaces.create` scopes. -
  /// [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
  ///
  /// Optional.
  /// Possible string values are:
  /// - "PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED" : Unspecified. Don't use.
  /// - "COLLABORATION_SPACE" : Setting to make the space a collaboration space
  /// where all members can post messages.
  /// - "ANNOUNCEMENT_SPACE" : Setting to make the space an announcement space
  /// where only space managers can post messages.
  core.String? predefinedPermissionSettings;

  /// Whether the space is a DM between a Chat app and a single human.
  ///
  /// Optional.
  core.bool? singleUserBotDm;

  /// Details about the space including description and rules.
  ///
  /// Optional.
  SpaceDetails? spaceDetails;

  /// The message history state for messages and threads in this space.
  ///
  /// Optional.
  /// Possible string values are:
  /// - "HISTORY_STATE_UNSPECIFIED" : Default value. Do not use.
  /// - "HISTORY_OFF" : History off.
  /// [Messages and threads are kept for 24 hours](https://support.google.com/chat/answer/7664687).
  /// - "HISTORY_ON" : History on. The organization's
  /// [Vault retention rules](https://support.google.com/vault/answer/7657597)
  /// specify for how long messages and threads are kept.
  core.String? spaceHistoryState;

  /// The threading state in the Chat space.
  ///
  /// Output only.
  /// Possible string values are:
  /// - "SPACE_THREADING_STATE_UNSPECIFIED" : Reserved.
  /// - "THREADED_MESSAGES" : Named spaces that support message threads. When
  /// users respond to a message, they can reply in-thread, which keeps their
  /// response in the context of the original message.
  /// - "GROUPED_MESSAGES" : Named spaces where the conversation is organized by
  /// topic. Topics and their replies are grouped together.
  /// - "UNTHREADED_MESSAGES" : Direct messages (DMs) between two people and
  /// group conversations between 3 or more people.
  core.String? spaceThreadingState;

  /// The type of space.


ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 768px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
		z-index: 1;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}
@font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e


import os
import torch
import logging

# Set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

BASE_DIR = os.path.dirname(os.path.abspath(__file__))
INDEX_DIR = os.path.join(BASE_DIR, "indices")
DATA_DIR = os.path.join(BASE_DIR, "data")
OUTPUT_DIR = os.path.join(BASE_DIR, "output")  # Directory for generated videos

os.makedirs(INDEX_DIR, exist_ok=True)
os.makedirs(os.path.join(DATA_DIR, "videos"), exist_ok=True)
os.makedirs(os.path.join(DATA_DIR, "images"), exist_ok=True)
os.makedirs(os.path.join(DATA_DIR, "texts"), exist_ok=True)
os.makedirs(os.path.join(DATA_DIR, "audio"), exist_ok=True)
os.makedirs(OUTPUT_DIR, exist_ok=True)  # Create output directory

logger.info(f"Base directory: {BASE_DIR}")
logger.info(f"Index directory: {INDEX_DIR}")
logger.info(f"Data directory: {DATA_DIR}")
logger.info(f"Output directory: {OUTPUT_DIR}")

# Fixed index paths
FAISS_INDEX_PATH = os.path.join(INDEX_DIR, "faiss_index.bin")
METADATA_PATH = os.path.join(INDEX_DIR, "metadata.pkl")
CHUNK_SIZE = 512
MODEL_NAME = "openai/clip-vit-large-patch14"

AUDIO_MODEL = "openai/whisper-small"
AUDIO_DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

# Video processing parameters
VIDEO_FRAME_INTERVAL = 10  # Process video in 10-second intervals
VIDEO_SIMILARITY_THRESHOLD = 0.85  # Reduced from 0.95 to allow more frames
VIDEO_AUDIO_PADDING = 5  # 5 seconds padding on each side to match 10-second frame interval
VIDEO_MAX_FRAMES = 1000  # Maximum number of frames to process per video
VIDEO_FRAME_SIZE = (640, 360)  # Target frame size for processing
VIDEO_BATCH_SIZE = 10  # Number of frames to process in each batch

# Video output settings
VIDEO_WIDTH = 1920
VIDEO_HEIGHT = 1080
VIDEO_FPS = 30
VIDEO_CODEC = 'libx264'
VIDEO_PRESET = 'medium'
VIDEO_CRF = 23  # Constant Rate Factor (18-28 is good, lower is better quality)

# Subtitle settings
SUBTITLE_FONT = 'Arial'
SUBTITLE_FONT_SIZE = 48
SUBTITLE_COLOR = 'white'
SUBTITLE_OUTLINE_COLOR = 'black'
SUBTITLE_OUTLINE_WIDTH = 2
SUBTITLE_PADDING = 20  # Padding from bottom of video
SUBTITLE_MAX_CHARS_PER_LINE = 42  # Maximum characters per line for subtitles


73.12,26.08
step
talk Gorina##3358
|tip Inside the building.
buy Mining Pick##2901 |goto Orgrimmar 73.31,26.60
|tip You must have a Mining Pick in your bags to be able to gather ore.
step
map Durotar
path	follow smart;	loop on;	ants curved;	dist 30
path	50.96,17.00	52.99,18.09	54.60,19.05	55.40,21.06	55.71,23.38
path	56.28,25.33	55.89,27.78	54.64,27.62	55.10,30.09	58.12,29.94
path	55.62,32.75	55.97,36.63	55.71,40.53	57.32,42.00	59.26,41.50
path	57.59,43.98	55.27,48.14	50.81,48.20	48.51,43.33	47.83,39.78
path	46.87,34.69	45.55,32.24	45.61,27.19	46.52,23.35	48.07,21.59
path	49.70,21.37	49.54,18.59
Reach Skill 65 in Mining |skill Mining,65
|tip Click ore as you follow the path around this area.
|tip Track them on your minimap with "Find Minerals".
|tip You can smelt Copper Ore from skill level 1-47 for additional points.
step
Reach Level 10 |ding 10
|tip You must be at least level 10 to train Journeyman professions.
|tip Use the leveling guides to accomplish this.
step
Enter the building |goto Orgrimmar 72.94,27.48 < 7 |walk
talk Makaru##3357
|tip Inside the building.
Train Journeyman Miner |skillmax Mining,150 |goto Orgrimmar 73.12,26.08
step
map The Barrens
path	follow smart;	loop on;	ants curved;	dist 30
path	59.10,40.30	60.19,40.99	61.84,40.54	62.14,43.04	62.65,46.75
path	61.30,50.02	60.46,50.11	58.76,50.43	56.82,51.16	55.42,52.22
path	53.50,52.61	53.16,56.18	51.94,57.54	50.38,58.57	49.34,61.86
path	47.74,65.34	49.23,69.53	48.13,71.47	48.25,74.69	49.98,75.97
path	49.97,78.84	48.59,80.24	48.26,82.33	46.66,83.76	46.10,86.08
path	44.27,84.64	42.70,82.63	41.20,79.51	44.09,78.36	43.80,75.03
path	43.88,73.08	42.35,72.24	41.90,68.97	43.39,69.35	45.54,68.99
path	45.03,65.70	43.83,62.98	43.15,60.77	43.09,56.64	43.61,52.80
path	41.37,48.89	42.58,47.61	41.37,44.96	43.42,44.79	43.15,42.53
path	43.28,39.61	42.28,38.89	41.58,37.21	42.55,35.50	42.04,33.21
path	45.13,32.85	46.58,30.52	46.71,28.37	48.20,28.72	49.48,31.40
path	50.44,34.37	52.43,34.60	56.90,37.50	58.56,39.33
Reach Skill 125 in Mining |skill Mining,125
|tip Click ore as you follow the path around this area.
|tip Track them on your min


ect(find.text("Receive 10,0111 FIRO"), findsOneWidget);
//     expect(find.text("for \"Some kind of Message\""), findsOneWidget);
//     expect(find.text("OK"), findsOneWidget);
//     expect(find.byType(ModalPopupDialog), findsOneWidget);
//
//     await tester.tap(find.byKey(Key("receiveViewGeneratedQrPopupOkButtonKey")));
//     await tester.pumpAndSettle();
//
//     expect(find.byType(ModalPopupDialog), findsNothing);
//
//     verify(manager.addListener(any)).called(1);
//     verify(manager.coinTicker).called(2);
//     verify(manager.currentReceivingAddress).called(5);
//
//     verifyNoMoreInteractions(manager);
//   });
}
// import 'package:flutter/material.dart';
// import 'package:flutter_test/flutter_test.dart';
// import 'package:stackwallet/pages/onboarding_view/onboarding_view.dart';
// import 'package:stackwallet/pages/onboarding_view/terms_and_conditions_view.dart';
// import 'package:stackwallet/widgets/custom_buttons/gradient_button.dart';
// import 'package:stackwallet/widgets/custom_buttons/simple_button.dart';

void main() {
//   testWidgets("onboarding view screen test", (tester) async {
//     await tester.pumpWidget(
//       MaterialApp(
//         home: OnboardingView(),
//       ),
//     );
//
//     final imageFinder = find.byType(Image);
//     expect(imageFinder, findsOneWidget);
//
//     final imageSource =
//         ((imageFinder.evaluate().single.widget as Image).image as AssetImage)
//             .assetName;
//     expect(imageSource, "assets/images/splash.png");
//
//     expect(find.text("Pay the world with Firo."), findsOneWidget);
//
//     expect(find.byType(GradientButton), findsOneWidget);
//     expect(find.text("CREATE NEW WALLET"), findsOneWidget);
//
//     expect(find.byType(SimpleButton), findsOneWidget);
//     expect(find.text("RESTORE WALLET"), findsOneWidget);
//   });
//
//   testWidgets("tap create new wallet", (tester) async {
//     await tester.pumpWidget(
//       MaterialApp(
//         home: OnboardingView(),
//       ),
//     );
//
//     await tester.tap(find.byType(GradientButton));
//     await tester.pumpAndSettle();
//
//     expect(find.byType(TermsAndConditionsView), findsOneWidget);
//   });
//
//   testWidgets("tap restore wallet", (tester) async {
//     await tester.pumpWidget(
//       MaterialApp(
//         home: OnboardingView(),
//       ),
//     );
//
//     await tester.tap(find.byType(SimpleButton));
//     await tester.pumpAndSettle();
//
//     expect(find.byType(TermsAndConditionsView), findsOneWidget);
//   });
}
// import 'package:flutter/material.dart';
// import 'package:flutter_test/flutter_test.dart';
// import 'package:mockingjay/mockingjay.dart' as mockingjay;
// import 'package:stackwallet/pages/onboarding_view/helpers/create_wallet_type.dart';
// import 'package:stackwallet/pages/onboarding_view/terms_and_conditions_view.dart';
// import 'package:stackwallet/widgets/custom_buttons/gradient_button.dart';
//
void main() {
//   testWidgets("terms and conditions screen builds correctly", (tester) async {
//     await tester.pumpWidget(
//       MaterialApp(


we don't actually have to track anything so we just return\n        // the searchParams directly. However if dynamic data access should error then we\n        // still want to track access. This covers the case in Dev where all renders are dynamic\n        // but we still want to error if you use a dynamic data source because it will fail the build\n        // or revalidate if you do.\n        return searchParams;\n    } else {\n        // We need to track dynamic access with a Proxy. We implement get, has, and ownKeys because\n        // these can all be used to exfiltrate information about searchParams.\n        return new Proxy({}, {\n            get (target, prop, receiver) {\n                if (typeof prop === \"string\") {\n                    (0, _dynamicrendering.trackDynamicDataAccessed)(store, \"searchParams.\" + prop);\n                }\n                return _reflect.ReflectAdapter.get(target, prop, receiver);\n            },\n            has (target, prop) {\n                if (typeof prop === \"string\") {\n                    (0, _dynamicrendering.trackDynamicDataAccessed)(store, \"searchParams.\" + prop);\n                }\n                return Reflect.has(target, prop);\n            },\n            ownKeys (target) {\n                (0, _dynamicrendering.trackDynamicDataAccessed)(store, \"searchParams\");\n                return Reflect.ownKeys(target);\n            }\n        });\n    }\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n    Object.defineProperty(exports.default, \"__esModule\", {\n        value: true\n    });\n    Object.assign(exports.default, exports);\n    module.exports = exports.default;\n} //# sourceMappingURL=search-params.js.map\n\n\n;\n    // Wrapped in an IIFE to avoid polluting the global scope\n    ;\n    (function () {\n        var _a, _b;\n        // Legacy CSS implementations will `eval` browser code in a Node.js context\n        // to extract CSS. For backwards compatibility, we need to check we're in a\n        // browser context before continuing.\n        if (typeof self !== 'undefined' &&\n            // AMP / No-JS mode does not inject these helpers:\n            '$RefreshHelpers$' in self) {\n            // @ts-ignore __webpack_module__ is global\n            var currentExports = module.exports;\n            // @ts-ignore __webpack_module__ is global\n            var prevSignature = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevSignature) !== null && _b !== void 0 ? _b : null;\n            // This cannot happen in MainTemplate because the exports mismatch between\n            // templating and execution.\n            self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n            // A module can be accepted automatically based on its exports, e.g. when\n            // it is a Refresh Boundary.\n            if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n                // Save the previous exports signature on update so we can compare the boundary\n                // signatures. We avoid saving exports themselves since it causes memory leaks (https://github.com/verce


            println!(" brute force computing {:?} \n ", cpu_time);
            for i in 0..brute_neighbours.len() {
                let p = brute_neighbours[i].point_id;
                println!(" {:?} {:?} ", p, brute_neighbours[i].dist_to_ref);
            }
        }
        //
        hns.set_searching_mode(true);
        start = ProcessTime::now();
        let knn_neighbours = hns.search(&r_vec, knbn, ef);
        cpu_time = start.elapsed();
        search_times.push(cpu_time.as_micros() as f32);
        if nbtest <= 100 {
            println!("\n\n hnsw searching  {:?} \n", cpu_time);
            println!("\n knn neighbours");
            println!("======================");
            for n in &knn_neighbours {
                println!("  {:?} {:?}  {:?} ", n.d_id, n.p_id, n.distance);
            }
        }
        // compute recall
        let knn_neighbours_dist : Vec<f32> = knn_neighbours.iter().map(|p| p.distance).collect();
        let max_dist = brute_neighbours[knbn-1].dist_to_ref;
        let recall = knn_neighbours_dist.iter().filter(|d| *d <= &max_dist).count();
        if nbtest <= 100 {
           println!("recall   {:?}", (recall as f32)/ (knbn as f32));
        }
        recalls.push(recall);
        nb_returned.push(knn_neighbours.len());
   }  // end on nbtest
    //
    // compute recall
    //

    let mean_recall = (recalls.iter().sum::<usize>() as f32)/((knbn * recalls.len()) as f32);
    let mean_search_time = (search_times.iter().sum::<f32>() as f32)/(search_times.len() as f32);
    println!("\n mean fraction (of knbn) returned by search {:?} ", (nb_returned.iter().sum::<usize>() as f32)/ ((nb_returned.len() * knbn) as f32));
    println!("\n nb element {:?} nb search : {:?} recall rate  is {:?} search time inverse {:?} ",  nb_elem, nbtest, mean_recall, 1.0e+6_f32/mean_search_time);

} // end test1

#[test]
fn test_parallel() {
    //
    let nb_elem = 1000;
    let dim = 25;
    let knbn = 10;
    let ef_c = 800;
    let max_nb_connection = 48;
    let ef = 20;
    //
    //
    let mut data = gen_random_matrix_f32(dim, nb_elem);
    for i in 0..data.len() {
        l2_normalize(&mut data[i]);
    }
    let data_with_id = data.iter().zip(0..data.len()).collect();
    let nb_layer = 16.min((nb_elem as f32).ln().trunc() as usize);
    let mut hns = Hnsw::<f32, dist::DistDot>::new(max_nb_connection, nb_elem, nb_layer, ef_c, dist::DistDot{});
    // !
 //   hns.set_extend_candidates(true);
    let mut start = ProcessTime::now();
    let now = std::time::SystemTime::now();
    // parallel insertion
    hns.parallel_insert(&data_with_id);
    let mut cpu_time: Duration = start.elapsed();
    println!("\n hnsw data parallel insertion cpu time {:?} , system time {:?}", cpu_time, now.elapsed());
    // one serial more to check
    let mut v = gen_random_vector_f32(dim);
    l2_normalize(&mut v);
    hns.insert((&v, hns.get_nb_point() +1));
    //
    hns.


-coupon .le-poster__content .le-poster-coupon .le-conetent-name[data-v-51bffc65]{line-height:40px;font-size:30px;font-family:PingFang SC;font-weight:500;margin-top:13px}.le-promote #poster-coupon .le-poster__content .le-poster-coupon .le-content-date[data-v-51bffc65]{font-size:20px;font-family:PingFang SC;font-weight:400;line-height:32px}.le-promote #poster-coupon .le-poster__content .le-qrcode-conent[data-v-51bffc65]{margin-top:64px;height:329px;border-top:1px solid #d7d7d7}.le-promote #poster-coupon .le-poster__content .le-qrcode-conent img[data-v-51bffc65]{width:180px;height:180px;margin-bottom:8px}.le-promote #poster-coupon .le-poster__content .le-qrcode-conent .le-text[data-v-51bffc65]{font-size:22px;font-family:PingFang SC;font-weight:500;color:#999;margin-top:8px}.le-promote .le-edit .le-title[data-v-51bffc65]{font-size:14px;font-family:Microsoft YaHei;font-weight:400;color:rgba(0,0,0,.65);margin:13px 0}.le-promote .le-edit .le-url[data-v-51bffc65]{width:100%;margin-bottom:16px}.le-promote .le-edit .le-url[data-v-51bffc65] .el-input-group__append{width:59px;height:34px;padding:0;background:#623ceb;text-align:center;font-size:14px;font-family:PingFang SC;font-weight:500;color:#fff;position:relative;top:-1px}.le-promote .le-edit .le-url[data-v-51bffc65] .el-input-group__append .el-button--default{padding:0}.le-promote .le-edit .le-url[data-v-51bffc65] .el-input__inner{background-color:#f3f5f7;padding-right:0}.le-promote .le-edit .le-btn[data-v-51bffc65]{border:1px solid #623ceb;background:#fff;border-radius:4px;font-weight:400;color:#623ceb;font-family:Microsoft YaHei;font-size:12px;height:32px}.le-promote .le-edit .le-btn[data-v-51bffc65]:first-child{width:96px}.le-promote .le-edit .le-btn[data-v-51bffc65]:last-child{width:128px}.le-promote .le-not-config[data-v-51bffc65]{width:556px;height:262px;margin-left:32px;padding-top:53px}.le-promote .le-not-config .le-title[data-v-51bffc65]{font-size:18px;font-family:Microsoft YaHei;font-weight:400;color:#262626;line-height:22px}.le-promote .le-not-config .le-content[data-v-51bffc65]{font-size:12px;font-family:Microsoft YaHei;font-weight:400;color:#8c8c8c;line-height:22px;margin:21px 0 32px 0}.le-promote .le-not-config .le-icon-zhushi[data-v-51bffc65]{color:#ff8226;margin-right:15px}.le-promote[data-v-bc724c9e]{padding:0 0 20px 0}.le-prom


 = "camelCase")]
#[allow(missing_docs)]
#[non_exhaustive]
pub struct ConsumerStat {
    // Common to all RtpStreams.
    // `type` field is present in worker, but ignored here
    pub timestamp: u64,
    pub ssrc: u32,
    pub rtx_ssrc: Option<u32>,
    pub kind: MediaKind,
    pub mime_type: MimeType,
    pub packets_lost: u32,
    pub fraction_lost: u8,
    pub packets_discarded: usize,
    pub packets_retransmitted: usize,
    pub packets_repaired: usize,
    pub nack_count: usize,
    pub nack_packet_count: usize,
    pub pli_count: usize,
    pub fir_count: usize,
    pub score: u8,
    pub packet_count: usize,
    pub byte_count: usize,
    pub bitrate: u32,
    pub round_trip_time: Option<f32>,
}

/// RTC statistics of the consumer, may or may not include producer statistics.
#[allow(clippy::large_enum_variant)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(untagged)]
pub enum ConsumerStats {
    /// RTC statistics without producer
    JustConsumer((ConsumerStat,)),
    /// RTC statistics with producer
    WithProducer((ConsumerStat, ProducerStat)),
}

impl ConsumerStats {
    /// RTC statistics of the consumer
    pub fn consumer_stats(&self) -> &ConsumerStat {
        match self {
            ConsumerStats::JustConsumer((consumer_stat,)) => consumer_stat,
            ConsumerStats::WithProducer((consumer_stat, _)) => consumer_stat,
        }
    }
}

/// 'trace' event data.
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(tag = "type", rename_all = "lowercase")]
pub enum ConsumerTraceEventData {
    /// RTP packet.
    Rtp {
        /// Event timestamp.
        timestamp: u64,
        /// Event direction.
        direction: TraceEventDirection,
        /// RTP packet info.
        info: RtpPacketTraceInfo,
    },
    /// RTP video keyframe packet.
    KeyFrame {
        /// Event timestamp.
        timestamp: u64,
        /// Event direction.
        direction: TraceEventDirection,
        /// RTP packet info.
        info: RtpPacketTraceInfo,
    },
    /// RTCP NACK packet.
    Nack {
        /// Event timestamp.
        timestamp: u64,
        /// Event direction.
        direction: TraceEventDirection,
    },
    /// RTCP PLI packet.
    Pli {
        /// Event timestamp.
        timestamp: u64,
        /// Event direction.
        direction: TraceEventDirection,
        /// SSRC info.
        info: SsrcTraceInfo,
    },
    /// RTCP FIR packet.
    Fir {
        /// Event timestamp.
        timestamp: u64,
        /// Event direction.
        direction: TraceEventDirection,
        /// SSRC info.
        info: SsrcTraceInfo,
    },
}

/// Types of consumer trace events.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Deserialize, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum ConsumerTraceEventType {
    /// RTP packet.
    Rtp,
    /// RTP video keyframe packet.
    KeyFrame,
    /// RTCP NACK packet.
    Nack,
    /// RTCP PLI packet.
    Pli,
    /// RTCP FIR packet.
    Fir,
}

#[derive(Debug, Deserialize)]
#[serde(tag = "event", rename_all = "lowercase", content = "data")]
enum Notification {
    ProducerClose


using EcsR3.Entities;
using EcsR3.Entities.Accessors;
using R3;

namespace EcsR3.Systems.Reactive
{
    /// <summary>
    /// React To Entity systems react as and when the entity needs to be processed,
    /// this means rather than batching all updates at once, it instead allows you
    /// to react on each entity individually, i.e when the entity has less than 50%
    /// hp.
    /// </summary>
    /// <remarks>
    /// If you do not need to react to each entity individually it is recommended you
    /// use a React To LookupGroup system as they have less overhead as there is only one
    /// subscription required rather than 1 per entity.
    /// </remarks>
    public interface I


width: 24px;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    font-family: ByteNumber-center;
    color: #999;
    text-align: center
}

.ttp-hot-board .news-index.num-1 {
    color: #a82e2e
}

.ttp-hot-board .news-index.num-2 {
    color: #f04142
}

.ttp-hot-board .news-index.num-3 {
    color: #ff9a03
}

.ttp-hot-board .news-title {
    overflow: hidden;
    white-space: nowrap;
    font-size: 16px;
    line-height: 20px;
    color: #222;
    text-overflow: ellipsis
}

.ttp-hot-board .news-title:hover {
    color: #f04142
}

.ttp-hot-board .news-icon {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    background-size: contain
}

.ttp-hot-board .news-icon.hot {
    background-image: url(https://lf3-static.bytednsdoc.com/obj/eden-cn/pipieh7nupabozups/toutiao_web_pc/hotboard/hot.png)
}

.ttp-hot-board .news-icon.new {
    background-image: url(https://lf3-static.bytednsdoc.com/obj/eden-cn/pipieh7nupabozups/toutiao_web_pc/hotboard/new.png)
}

.ttp-hot-board .news-icon.boom {
    background-image: url(https://lf3-static.bytednsdoc.com/obj/eden-cn/pipieh7nupabozups/toutiao_web_pc/hotboard/boom.png)
}

.ttp-hot-board .news-icon.commercial {
    background-image: url(https://lf3-static.bytednsdoc.com/obj/eden-cn/pipieh7nupabozups/toutiao_web_pc/hotboard/commercial.png)
}

.ttp-hot-board .news-icon.participant {
    width: 38px;
    background-image: url(https://lf3-static.bytednsdoc.com/obj/eden-cn/pipieh7nupabozups/toutiao_web_pc/hotboard/participant.png)
}

.ttp-hot-board .news-icon.live {
    width: 50px;
    background-image: url(https://lf3-static.bytednsdoc.com/obj/eden-cn/pipieh7nupabozups/toutiao_web_pc/hotboard/live.webp)
}

.ttp-hot-board .news-icon.amos {
    width: 27px;
    background-image: url(https://lf3-static.bytednsdoc.com/obj/eden-cn/pipieh7nupabozups/toutiao_web_pc/hotboard/amos.png)
}

.ttp-hot-board .news-icon.onSite {
    width: 27px;
    background-image: url(https://lf3-static.bytednsdoc.com/obj/eden-cn/pipieh7nupabozups/toutiao_web_pc/hotboard/onsite.png)
}

.ttp-hot-board .news-icon.


{
						Quantity: quantityMustParse("1Gi"),
					},
				},
				{
					Signal:   evictionapi.SignalMemoryAvailable,
					Operator: evictionapi.OpLessThan,
					Value: evictionapi.ThresholdValue{
						Quantity: quantityMustParse("200Mi"),
					},
					GracePeriod: 0,
					MinReclaim: &evictionapi.ThresholdValue{
						Quantity: quantityMustParse("1Gi"),
					},
				},
			},
		},
	}
	for testName, testCase := range testCases {
		t.Run(testName, func(t *testing.T) {
			if !thresholdsEqual(testCase.expected, addAllocatableThresholds(testCase.thresholds)) {
				t.Errorf("Err not as expected, test: %v, Unexpected data: %s", testName, cmp.Diff(testCase.expected, addAllocatableThresholds(testCase.thresholds)))
			}
		})
	}
}

func TestFallbackResourcesUsage(t *testing.T) {
	for _, test := range []struct {
		description   string
		usageFuncName string
		usageFunc     func() int64
	}{
		{
			description:   "disk usage, fallback value",
			usageFuncName: "diskUsage",
			usageFunc: func() int64 {
				return diskUsage(&statsapi.FsStats{}).Value()
			},
		},
		{
			description:   "inode usage, fallback value",
			usageFuncName: "inodeUsage",
			usageFunc: func() int64 {
				return inodeUsage(&statsapi.FsStats{}).Value()
			},
		},
		{
			description:   "memory usage, fallback value",
			usageFuncName: "memoryUsage",
			usageFunc: func() int64 {
				return memoryUsage(&statsapi.MemoryStats{}).Value()
			},
		},
		{
			description:   "process usage, fallback value",
			usageFuncName: "processUsage",
			usageFunc: func() int64 {
				return int64(processUsage(&statsapi.ProcessStats{}))
			},
		},
	} {
		t.Run(test.description, func(t *testing.T) {
			assert.NotEqualf(t, 0, test.usageFunc(), "%s: unexpected fallback value", test.usageFuncName)
		})
	}
}

func thresholdsEqual(expected []evictionapi.Threshold, actual []evictionapi.Threshold) bool {
	if len(expected) != len(actual) {
		return false
	}
	for _, aThreshold := range expected {
		equal := false
		for _, bThreshold := range actual {
			if thresholdEqual(aThreshold, bThreshold) {
				equal = true
			}
		}
		if !equal {
			return false
		}
	}
	for _, aThreshold := range actual {
		equal := false
		for _, bThreshold := range expected {
			if thresholdEqual(aThreshold, bThreshold) {
				equal = true
			}
		}
		if !equal {
			return false
		}
	}
	return true
}

func thresholdEqual(a evictionapi.Threshold, b evictionapi.Threshold) bool {
	return a.GracePeriod == b.GracePeriod &&
		a.Operator == b.Operator &&
		a.Signal == b.Signal &&
		compareThresholdValue(*a.MinReclaim, *b.MinReclaim) &&
		compareThresholdValue(a.Value, b.Value)
}

func TestOrderedByExceedsRequestMemory(t *testing.T) {
	below := newPod("below-requests", -1, []v1.Container{
		newContainer("below-requests", newResourceList("", "200Mi", ""), newResourceList("", "", "")),
	}, nil)
	exceeds := newPod("exceeds-requests", 1, []v1.Container{
		newContainer("exceed


import (
	. "github.com/energye/lcl/api"
	"github.com/energye/lcl/api/imports"
	. "github.com/energye/lcl/types"
)

// IVTFixedAreaConstraints Parent: IPersistent
type IVTFixedAreaConstraints interface {
	IPersistent
	MaxHeightPercent() TVTConstraintPercent          // property
	SetMaxHeightPercent(AValue TVTConstraintPercent) // property
	MaxWidthPercent() TVTConstraintPercent           // property
	SetMaxWidthPercent(AValue TVTConstraintPercent)  // property
	MinHeightPercent() TVTConstraintPercent          // property
	SetMinHeightPercent(AValue TVTConstraintPercent) // property
	MinWidthPercent() TVTConstraintPercent           // property
	SetMinWidthPercent(AValue TVTConstraintPercent)  // property
	SetOnChange(fn TNotifyEvent)                     // property event
}

// TVTFixedAreaConstraints Parent: TPersistent
type TVTFixedAreaConstraints struct {
	TPersistent
	changePtr uintptr
}

func NewVTFixedAreaConstraints(AOwner IVTHeader) IVTFixedAreaConstraints {
	r1 := vTFixedAreaConstraintsImportAPI().SysCallN(1, GetObjectUintptr(AOwner))
	return AsVTFixedAreaConstraints(r1)
}

func (m *TVTFixedAreaConstraints) MaxHeightPercent() TVTConstraintPercent {
	r1 := vTFixedAreaConstraintsImportAPI().SysCallN(2, 0, m.Instance(), 0)
	return TVTConstraintPercent(r1)
}

func (m *TVTFixedAreaConstraints) SetMaxHeightPercent(AValue TVTConstraintPercent) {
	vTFixedAreaConstraintsImportAPI().SysCallN(2, 1, m.Instance(), uintptr(AValue))
}

func (m *TVTFixedAreaConstraints) MaxWidthPercent() TVTConstraintPercent {
	r1 := vTFixedAreaConstraintsImportAPI().SysCallN(3, 0, m.Instance(), 0)
	return TVTConstraintPercent(r1)
}

func (m *TVTFixedAreaConstraints) SetMaxWidthPercent(AValue TVTConstraintPercent) {
	vTFixedAreaConstraintsImportAPI().SysCallN(3, 1, m.Instance(), uintptr(AValue))
}

func (m *TVTFixedAreaConstraints) MinHeightPercent() TVTConstraintPercent {
	r1 := vTFixedAreaConstraintsImportAPI().SysCallN(4, 0, m.Instance(), 0)
	return TVTConstraintPercent(r1)
}

func (m *TVTFixedAreaConstraints) SetMinHeightPercent(AValue TVTConstraintPercent) {
	vTFixedAreaConstraintsImportAPI().SysCallN(4, 1, m.Instance(), uintptr(AValue))
}

func (m *TVTFixedAreaConstraints) MinWidthPercent() TVTConstraintPercent {
	r1 := vTFixedAreaConstraintsImportAPI().SysCallN(5, 0, m.Instance(), 0)
	return TVTConstraintPercent(r1)
}

func (m *TVTFixedAreaConstraints) SetMinWidthPercent(AValue TVTConstraintPercent) {
	vTFixedAreaConstraintsImportAPI().SysCallN(5, 1, m.Instance(), uintptr(AValue))
}

func VTFixedAreaConstraintsClass() TClass {
	ret := vTFixedAreaConstraintsImportAPI().SysCallN(0)
	return TClass(ret)
}

func (m *TVTFixedAreaConstraints) SetOnChange(fn TNotifyEvent) {
	if m.changePtr != 0 {
		RemoveEventElement(m.changePtr)
	}
	m.changePtr = MakeEventDataPtr(fn)
	vTFixedAreaConstraintsImportAPI().SysCallN(6, m.Instance(), m.changePtr)
}

var (
	vTFixedAreaConstraintsImport       *imports.Imports = nil
	vTFixedAreaConstraintsImportTables                  = []*imports.Table{
		/*0*/ imports.NewTable("VTFixedAreaConstraints_Class", 0),
		/*1*/ imports.NewTable("VTFixedAreaConstraints_Create", 0),
		/*2*/ imports.NewTable("VTFixedAreaConstraints_MaxHeightPercent", 0


�务，将A基金转换成B基金，而根据该公司的规定，一年内的前两次基金转换是免费的。 c:47

### 第二章 优胜劣汰--选择基金的技巧

仅仅把注意力集中在基金以往业绩的好坏是不够的，投资者还应该对基金风险收益情况有所了解。面对市场和规模潜在的波动可能，提前设想好应对方案也是必要的。 c:36

### 第一节 基金业绩评价

国内一些专业报刊和基金网站往往会定期公布一些常见的经过风险调整的基金业绩评价指标，投资者可以根据这些指标对基金业绩进行综合评价。 c:36

投资者应该选择规模大、信誉好、尊重投资者的基金公司，要摒弃贪图便宜、“买跌不买涨”的心理，选择那些过往业绩好（要看长期，排名持续在业内前1/3的水平）的基金，长期持有。 c:268

净资产总值=总资产-总负债 c:136

投资者在关注基金排名时，可采用“4433法则”来挑选基金。关注长期指标时，第一个“4”是指选择一年期业绩排名在同类产品前1/4的基金；第二个“4”代表选择两年、三年、五年以及今年以来业绩排名在同类产品前1/4的基金；关注短期指标时，第一个“3”是指选择近六个月业绩排名在同类产品前1/3的基金；第二个“3”代表选择近三个月业绩排名在同类产品前1/3的基金。 c:413

### 第二节 选择基金公司的技巧

在挑选基金的四部曲——选公司、选团队、选产品、选时机中，对基金公司的选择排在首位。 c:189

挑选基金公司的原则是看它是否具有成熟的投资理念、专业化的研究方法、良好的治理结构、严格的内部风险控制制度以及外部监管和信息披露制度 c:116

投资者在挑选基金时应关注基金公司的持仓结构是否较好地把握了政策红利和市场整体趋势， c:125

[插图] c:28

对于开放式基金而言，基金公司的市场形象主要通过营销网络分布、收费标准、申购与赎回情况、对投资者的宣传等体现出来。 c:35

第三部分是最为重要的基金投资方向


	false,
			"SELECT DISTINCT `demo1`.* FROM `demo1` LEFT JOIN json_each(CASE WHEN iif(json_valid([[demo1.select_one]]), json_type([[demo1.select_one]])='array', FALSE) THEN [[demo1.select_one]] ELSE json_array([[demo1.select_one]]) END) `demo1_select_one_je` LEFT JOIN json_each(CASE WHEN iif(json_valid([[demo1.select_many]]), json_type([[demo1.select_many]])='array', FALSE) THEN [[demo1.select_many]] ELSE json_array([[demo1.select_many]]) END) `demo1_select_many_je` LEFT JOIN json_each(CASE WHEN iif(json_valid([[demo1.file_one]]), json_type([[demo1.file_one]])='array', FALSE) THEN [[demo1.file_one]] ELSE json_array([[demo1.file_one]]) END) `demo1_file_one_je` LEFT JOIN json_each(CASE WHEN iif(json_valid([[demo1.file_many]]), json_type([[demo1.file_many]])='array', FALSE) THEN [[demo1.file_many]] ELSE json_array([[demo1.file_many]]) END) `demo1_file_many_je` LEFT JOIN json_each(CASE WHEN iif(json_valid([[demo1.rel_one]]), json_type([[demo1.rel_one]])='array', FALSE) THEN [[demo1.rel_one]] ELSE json_array([[demo1.rel_one]]) END) `demo1_rel_one_je` LEFT JOIN json_each(CASE WHEN iif(json_valid([[demo1.rel_many]]), json_type([[demo1.rel_many]])='array', FALSE) THEN [[demo1.rel_many]] ELSE json_array([[demo1.rel_many]]) END) `demo1_rel_many_je` WHERE ([[demo1_select_one_je.value]] > 1 AND [[demo1_select_one_je.value]] < 1 AND (([[demo1_select_many_je.value]] > 1) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo1_select_many_je.value]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN iif(json_valid([[__mm_demo1.select_many]]), json_type([[__mm_demo1.select_many]])='array', FALSE) THEN [[__mm_demo1.select_many]] ELSE json_array([[__mm_demo1.select_many]]) END) `__mm_demo1_select_many_je` WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__smTEST}} WHERE NOT ([[__smTEST.multiMatchValue]] > 1)))) AND [[demo1_select_many_je.value]] < 1 AND [[demo1_file_one_je.value]] > 1 AND [[demo1_file_one_je.value]] < 1 AND (([[demo1_file_many_je.value]] > 1) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo1_file_many_je.value]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN iif(json_valid([[__mm_demo1.file_many]]), json_type([[__mm_demo1.file_many]])='array', FALSE) THEN [[__mm_demo1.file_many]] ELSE json_array([[__mm_demo1.file_many]]) END) `__mm_demo1_file_many_je` WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__smTEST}} WHERE NOT ([[__smTEST.multiMatchValue]] > 1)))) AND [[demo1_file_many_je.value]] < 1 AND [[demo1_rel_one_je.value]] > 1 AND [[demo1_rel_one_je.value]] < 1 AND (([[demo1_rel_many_je.value]] > 1) AND (NOT E


tr>

driver

This field is exclusively used by FT_Open_Face; it simply specifies the font driver to use for opening the face. If set to NULL, FreeType tries to load the face with each one of the drivers in its list.

num_params

The number of extra parameters.

params

Extra parameters passed to the font driver when opening a new face.

note

The stream type is determined by the contents of flags:

If the FT_OPEN_MEMORY bit is set, assume that this is a memory file of memory_size bytes, located at memory_address. The data are not copied, and the client is responsible for releasing and destroying them after the corresponding call to FT_Done_Face.

Otherwise, if the FT_OPEN_STREAM bit is set, assume that a custom input stream stream is used.

Otherwise, if the FT_OPEN_PATHNAME bit is set, assume that this is a normal file and use pathname to open it.

If none of the above bits are set or if multiple are set at the same time, the flags are invalid and FT_Open_Face fails.

If the FT_OPEN_DRIVER bit is set, FT_Open_Face only tries to open the file with the driver whose handler is in driver.

If the FT_OPEN_PARAMS bit is set, the parameters given by num_params and params is used. They are ignored otherwise.

Ideally, both the pathname and params fields should be tagged as ‘const’; this is missing for API backward compatibility. In other words, applications should treat them as read-only.

FT_OPEN_XXX¶

Defined in FT_FREETYPE_H (freetype/freetype.h).

#define FT_OPEN_MEMORY    0x1
#define <a href="ft2-face_creation.html#ft_


RT_TypeDef *UARTLOG);
_LONG_CALL_ void LOGUART_Relay_RxCmd(LOGUART_TypeDef *UARTLOG, u32 NewState);

_LONG_CALL_ void LOGUART_MonitorParaConfig(LOGUART_TypeDef *UARTLOG, u32 BitNumThres, u32 OscPerbitUpdCtrl);
_LONG_CALL_ void LOGUART_LPBaudSet(LOGUART_TypeDef *UARTLOG, u32 BaudRate, u32 IPClockHz);
_LONG_CALL_ void LOGUART_Relay_LPSetBaud(LOGUART_TypeDef *UARTLOG, u32 RPBaudRate, u32 IPClockHz);
_LONG_CALL_ void LOGUART_RxMonitorCmd(LOGUART_TypeDef *UARTLOG, u32 NewState);
_LONG_CALL_ u32 LOGUART_RxMonBaudCtrlRegGet(LOGUART_TypeDef *UARTLOG);
_LONG_CALL_ u32 LOGUART_RxMonitorSatusGet(LOGUART_TypeDef *UARTLOG);

#define DiagPutChar		LOGUART_PutChar
#define DiagGetChar		LOGUART_GetChar

/* MANUAL_GEN_END */

#endif


vision_criterion {
            SubdivisionCriterion::MaxParticleCount(count) => count,
            SubdivisionCriterion::MaxParticleCountAuto => {
                ChunkSize::new(&ParallelPolicy::default(), num_particles)
                    .with_log("particles", "octree generation")
                    .chunk_size
            }
        };

        info!(
            "Building octree with at most {} particles per leaf",
            particles_per_cell
        );

        (
            MaxNonGhostParticleLeafSplitCriterion::new(particles_per_cell),
            MinimumExtentSplitCriterion::new(if enable_stitching {
                I::one() + I::one() + I::one()
            } else {
                I::one()
            }),
        )
    }
}

mod octant_helper {
    use bitflags::bitflags;
    use nalgebra::Vector3;

    use crate::topology::{Axis, Direction};
    use crate::uniform_grid::{PointIndex, UniformGrid};
    use crate::{Index, Real};

    /// All octants of a 3D cartesian coordinate system
    #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
    #[repr(u8)]
    pub enum Octant {
        NegNegNeg = 0,
        PosNegNeg = 1,
        NegPosNeg = 2,
        PosPosNeg = 3,
        NegNegPos = 4,
        PosNegPos = 5,
        NegPosPos = 6,
        PosPosPos = 7,
    }

    /// Representation of a cartesian coordinate system octant using a direction along each coordinate axis
    #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
    pub struct OctantAxisDirections {
        pub x_axis: Direction,
        pub y_axis: Direction,
        pub z_axis: Direction,
    }

    bitflags! {
        pub struct HalfspaceFlags: u8 {
            const X_NEG = 0b00000001;
            const X_POS = 0b00000010;
            const Y_NEG = 0b00000100;
            const Y_POS = 0b00001000;
            const Z_NEG = 0b00010000;
            const Z_POS = 0b00100000;

            const NEG_NEG_NEG = Self::X_NEG.bits | Self::Y_NEG.bits | Self::Z_NEG.bits;
            const POS_NEG_NEG = Self::X_POS.bits | Self::Y_NEG.bits | Self::Z_NEG.bits;
            const NEG_POS_NEG = Self::X_NEG.bits | Self::Y_POS.bits | Self::Z_NEG.bits;
            const POS_POS_NEG = Self::X_POS.bits | Self::Y_POS.bits | Self::Z_NEG.bits;
            const NEG_NEG_POS = Self::X_NEG.bits | Self::Y_NEG.bits | Self::Z_POS.bits;
            const POS_NEG_POS = Self::X_POS.bits | Self::Y_NEG.bits | Self::Z_POS.bits;
            const NEG_POS_POS = Self::X_NEG.bits | Self::Y_POS.bits | Self::Z_POS.bits;
            const POS_POS_POS = Self::X_POS.bits | Self::Y_POS.bits | Self::Z_POS.bits;
        }
    }

    impl HalfspaceFlags {
        #[inline(always)]
        pub const fn all_unique_octants() -> &'static [HalfspaceFlags] {
            &ALL_UNIQUE_OCTANT_DIRECTION_FLAGS
        }

        /// Classifies a point relative to zero into all halfspaces it belongs including a margin around the halfspace boundary
        #[inline(always)]
        pub fn classify_with_margin<R: Real>(point: &Vector3<R>, margin: R) -> Self {
            let mut flags = HalfspaceFlags::empty();
            flags.set(HalfspaceFlags::X_NEG, point.x < margin);
            flags.set(HalfspaceFlags::X_POS, point.x > -margin);
            flags.set(Half


import _plotly_utils.basevalidators

class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
    def __init__(
        self,
        plotly_name="textcase",
        parent_name="layout.legend.grouptitlefont",
        **kwargs,
    ):
        super(TextcaseValidator, self).__init__(
            plotly_name=plotly_name,
            parent_name=parent_name,
            edit_type=kwargs.pop("edit_type", "legend"),
            values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]),
            **kwargs,
        )


(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'
<input type="checkbox">

',compile:function(e,t){var n=e.find("input");f({name:t.name,"ng-value":t.ngValue,"ng-model":t.ngModel,"ng-checked":t.ngChecked,"ng-disabled":t.ngDisabled,"ng-true-value":t.ngTrueValue,"ng-false-value":t.ngFalseValue,"ng-change":t.ngChange},function(e,t){p(e)&&n.attr(t,e)})}}});var B="Cannot create a collection-repeat within a scrollView that is scrollable on both x and y axis.  Choose either x direction or y direction.",V="collection-repeat expected attribute collection-item-height to be a an expression that returns a number (in pixels) or percentage.",E="collection-repeat expected attribute collection-item-width to be a an expression that returns a number (in pixels) or percentage.",_="collection-repeat expected expression in form of '_item_ in _collection_[ track by _id_]' but got '%'";d.directive({ngSrc:o("ngSrc","src"),ngSrcset:o("ngSrcset","srcset"),ngHref:o("ngHref","href")}).directive("collectionRepeat",["$collectionRepeatManager","$collectionDataSource","$parse",function(e,t,n){return{priority:1e3,transclude:"element",terminal:!0,$$tlb:!0,require:"^$ionicScroll",controller:[function(){}],link:function(i,o,r,a,s){function c(e){u.resize(),y.setData(e),S.resize()}function l(){c(i.$eval(b))}var u=a.scrollView;if(u.options.scrollingX&&u.options.scrollingY)throw new Error(B);var d=!!u.options.scrollingY;if(d&&!r.collectionItemHeight)throw new Error(V);if(!d&&!r.collectionItemWidth)throw new Error(E);var h=n(r.collectionItemHeight||'"100%"'),f=n(r.collectionItemWidth||'"100%"'),p=function(e,t){var n=h(e,t);return v(n)&&n.indexOf("%")>-1?Math.floor(parseInt(n,10)/100*u.__clientHeight):n},g=function(e,t){var n=f(e,t);return v(n)&&n.indexOf("%")>-1?Math.floor(parseInt(n,10)/100*u.__clientWidth):n},m=r.collectionRepeat.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!m)throw new Error(_.replace("%",r.collectionRepeat));var $=m[1],b=m[2],w=m[3],y=new t({scope:i,transcludeFn:s,transcludeParent:o.parent(),keyExpr:$,listExpr:b,trackByExpr:w,heightGetter:p,widthGetter:g}),S=new e({dataSource:y,element:a.$element,scrollView:a.scrollView});i.$watchCollection(b,function(e){if(e&&!angular.isArray(e))throw new Error("collection-repeat expects an array to repeat over, but instead got '"+typeof e+"'.");c(e)}),ionic.on("resize",l,window),i.$on("$destroy",function(){S.destroy(),y.destroy(),ionic.off("resize",l,window)})}}}]),d.directive("ionContent",["$timeout","$controller","


игнатурах и типах, то мы получим нечто вроде:

```ts
// 1. Получить данные из реального мира:
type GetInputData = () => ExchangeRates & QuoteCurrencyCode & BaseValue;

// 2. Определить курс:
type LookupRate = (r: ExchangeRates, q: QuoteCurrencyCode) => ExchangeRate;

// 3. Рассчитать значение:
type CalculateQuote = (b: BaseValue, r: ExchangeRate) => QuoteValue;
```

Пока что у нас нет функций для общения с реальным миром, поэтому первый шаг мы смоделировать не можем, но остальные шаги процесса мы выразили в типах успешно.

<aside>

Сейчас мы считаем, что входные данные нам предоставляет _какая-то_ функция `GetInputData`, которая
общается с внешним миром. В общем случае мы могли бы описать её тип подробнее, чтобы учесть
источник данных, но для краткости я решил оставить это за рамками серии. Однако, если вам
интересно, как это можно сделать, то советую прочесть [«Доменное моделирование в функциональном
стиле»](/blog/domain-modelling-made-functional/) Скотта Влашина.

</aside>

Таким же образом мы можем проверить и другие пользовательские сценарии. Если созданных типов нам хватает, дополнительных вопросов по ходу дела не возникло, мы можем приступить к реализации модели в функциях.

## Функциональная реализация модели

Когда мы выразили часть домена в типах и проверили модель на непротиворечивость, мы можем приступить к реализации. Отметим, что реализация — это не «следующий шаг», а _часть проектирования_. Это значит, что если во время реализации у нас возникают вопросы о работе домена, нам стоит остановиться и задать вопросы продукт-оунеру, чтобы уточнить модель.

<aside>

Проектирование и разработка — это в целом [итеративный
процесс](https://evilmartians.com/chronicles/design-first-then-build-lets-bury-this-myth-forevermore).
Это нормально возвращаться иногда на шаг-два назад, чтобы улучшить модель и добавить свежую
информацию. В будущем я перестану обращать на это внимание, но условимся, что часто вносить
изменения — это обычное дело.

</aside>

Мы воспользуемся фактом, что TypeScript мультипарадигменный и напишем реализацию модели в около-функциональном стиле. Наш код не будет чисто функцион


                        margin: 0 4px 24px 4px i;
                    }
                }
            }
        }

        /* Remove unloaded videos */
        .ghost-grid.ytd-ghost-grid-renderer {
            display: none;
        }

        /* Display unloaded videos per row when refresh the homepage */
        #home-page-skeleton .rich-shelf-videos .rich-grid-media-skeleton.mini-mode,
        #home-page-skeleton #home-container-media .rich-grid-media-skeleton.mini-mode {
            margin: 0 4px;
            flex-basis: calc(100%/var(--video-per-row-homepage) - 16px - 0.01px);
            min-width: calc(100%/var(--video-per-row-homepage) - 16px - 0.01px);
            max-width: calc(100%/var(--video-per-row-homepage) - 16px - 0.01px);
        }

        [page-subtype="home"] {
            #contents > ytd-rich-item-renderer {
                margin: 0 4px 24px 4px;

                /* Remove the blank video thumbnail is an advertisement video that was deleted by an AdBlock extension, such as uBlock Origin, AdBlock, Adblock Plus, and others */
                &:has(#content > ytd-ad-slot-renderer) {
                    display: none;
                }
            }

            #contents.ytd-rich-grid-renderer {
                margin-top: 6px i;
            }
        }

        /* 🏠 Restore Old Homepage */
        if (displayProfile) {

            /* Remove unloaded channel profile  when refresh a page */
            #home-page-skeleton .channel-avatar {
                display: none;
            }

            /* Remove channel profile from homepage */
            [page-subtype="home"] ytd-rich-grid-media a#avatar-link {
                display: none;
            }
        }
    }

    /* ⚒ Custom Channel Page */
    if (customCP=="Enabled") {
        /* 🏠 Number Of Videos Per Row */
        [page-subtype="channels"] {
            ytd-rich-grid-renderer {
                --ytd-rich-grid-items-per-row: var(--video-per-row-channelpage) i;
                /* Set to be treated as if they were the children of their parent element */
                #contents {
                    ytd-rich-grid-row,
                    ytd-rich-grid-row #contents {
                        display: contents;
                    }

                    #contents > ytd-rich-item-renderer {
                        margin: 0 4px 24px 4px i;
                    }
                }
            }
        }

        /* 🔃 Sort by Oldest (Beta) */
        if (sortByOldest) {


 h1.date,.vmm-timeline h2.date,.vmm-timeline h3.date,.vmm-timeline h4.date,.vmm-timeline h5.date,.vmm-timeline h6.date{font-weight:bold;}
.vmm-timeline h2.start{font-size:36px;line-height:38px;margin-bottom:15px;}
.vmm-timeline h1{margin-bottom:15px;font-size:32px;line-height:34px;}.vmm-timeline h1 small{font-size:18px;}
.vmm-timeline h2{margin-bottom:15px;font-size:28px;line-height:30px;}.vmm-timeline h2 small{font-size:14px;line-height:16px;}
.vmm-timeline h2.date{font-size:16px;line-height:18px;margin-bottom:3.75px;color:#999999;}
.vmm-timeline h3,.vmm-timeline h4,.vmm-timeline h5,.vmm-timeline h6{line-height:40px;}.vmm-timeline h3 .active,.vmm-timeline h4 .active,.vmm-timeline h5 .active,.vmm-timeline h6 .active{color:#0bd4e3;}
.vmm-timeline h3{font-size:28px;line-height:30px;}.vmm-timeline h3 small{font-size:14px;}
.vmm-timeline h4{font-size:20px;line-height:22px;}.vmm-timeline h4 small{font-size:12px;}
.vmm-timeline h5{font-size:16px;line-height:18px;}
.vmm-timeline h6{font-size:13px;line-height:14px;text-transform:uppercase;}
.vmm-timeline strong{font-weight:bold;}
.vmm-timeline Q{quotes:'„' '“';font-style:italic;}
.vmm-timeline blockquote,.vmm-timeline blockquote p{font-size:28px;line-height:36px;text-align:left;margin-bottom:6px;padding-top:10px;background-color:#1a1a1a;color:#ffffff;}
.vmm-timeline .credit{color:#999999;text-align:right;font-size:10px;line-height:10px;display:block;margin:0 auto;clear:both;}
.vmm-timeline .caption{text-align:left;margin-top:5px;color:#aaaaaa;font-size:11px;line-height:14px;clear:both;}
.tooltip{position:absolute;z-index:205;display:block;visibility:visible;padding:5px;opacity:0;filter:alpha(opacity=0);font-size:15px;font-weight:bold;line-height:20px;font-size:12px;line-height:12px;}
.tooltip.in{opacity:0.8;filter:alpha(opacity=80);}
.tooltip.top{margin-top:-2px;}
.tooltip.right{margin-left:2px;}
.tooltip.bottom{margin-top:2px;}
.tooltip.left{margin-left:-2px;}
.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;


] = YAML.safeLoad(datajp);

    const characters = charactersgl.concat(charactersjp);

    characters.forEach(char => {
      const parenName = ` (${char.name}) [${char.cat}]`;

      t.truthy(char.name, 'name');
      t.falsy(characterNames[parenName], 'name is not duplicated by any other character' + parenName);

      characterNames[parenName] = true;

      t.falsy(char.type, 'type should not be set' + parenName);
      t.true(char.cat === 'jp' || char.cat === 'gl', 'cat must be jp or gl' + parenName);
      t.truthy(char.picture, 'must have a picture url' + parenName);
      t.truthy(weaponHash[char.weapon], `char must have a valid weapon type (${char.weapon} is invalid)` + parenName);
      t.true(char.star >= 3 && char.star <= 5, 'star level must be between 3 and 5' + parenName);
      t.true(_.isNumber(char.stats.atk), 'stats.atk must be a number' + parenName);
      t.true(_.isNumber(char.stats.int), 'stats.int must be a number' + parenName);
      t.true(_.isNumber(char.stats.def), 'stats.def must be a number' + parenName);
      t.true(_.isNumber(char.stats.hit), 'stats.hit must be a number' + parenName);
      t.true(_.isNumber(char.stats.grd), 'stats.grd must be a number' + parenName);
      t.true(_.isNumber(char.stats.hp), 'stats.hp must be a number' + parenName);

      t.true(fs.existsSync(`src/assets/characters/${char.picture}.png`), 'character must reference a valid image' + parenName);

      if(char.awakened) {
        t.true(char.awakened === true || char.awakened === 9, 'awakened must be either true or 9');
        t.true(char.name.includes('(Awakened)'), 'name should include (Awakened)' + parenName);
      }

      const charPicInfo = imageSize(`src/assets/characters/${char.picture}.png`);
      t.is(charPicInfo.type, 'png', 'char image must be a png' + parenName);

      char.talents.forEach(talent => {
        t.truthy(talent.name, 'talents must have a name' + parenName);

        talent.effects.forEach(eff => {
          t.truthy(eff.desc, 'talent.effect must have a desc' + parenName);
          if(eff.duration) {
            t.true(_.isNumber(eff.duration), 'talent.effect.duration must be a number' + parenName);
          }

          validateMeta(t, eff.meta, parenName);
        });
      });

      char.skills.forEach(skill => {
        t.truthy(skill.name, 'skill.name must exist' + parenName);
        if(skill.maxHits) { t.truthy(skill.power, 'skill.power must exist if it skill.maxHits exists' + parenName); }
        t.truthy(skill.ap, 'skill.ap must exist' + parenName);

        if(skill.element) {
          t.true(_.includes(['Dark', 'Earth', 'Fire', 'Ice', 'Light', 'Lightning', 'Wind'], skill.element), 'skill element must be a valid element' + parenName);
        }

        t.true(fs.existsSync(`src/assets/skills/${skill.picture}.png`), 'skill ' + skill.name + ' must reference a valid image' + parenName);

        const skillPicInfo = imageSize(`src/assets/skills/${skill.picture}.


 0.9375, 0}}
	benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
}

func BenchmarkDrotmOffDiaMediumBothUnitary(b *testing.B) {
	n := MEDIUM_SLICE
	incX := 1
	x := randomSlice(n, incX)
	incY := 1
	y := randomSlice(n, incY)
	p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
	benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
}

func BenchmarkDrotmOffDiaMediumIncUni(b *testing.B) {
	n := MEDIUM_SLICE
	incX := posInc1
	x := randomSlice(n, incX)
	incY := 1
	y := randomSlice(n, incY)
	p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
	benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
}

func BenchmarkDrotmOffDiaMediumUniInc(b *testing.B) {
	n := MEDIUM_SLICE
	incX := 1
	x := randomSlice(n, incX)
	incY := negInc1
	y := randomSlice(n, incY)
	p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
	benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
}

func BenchmarkDrotmOffDiaMediumBothInc(b *testing.B) {
	n := MEDIUM_SLICE
	incX := posInc1
	x := randomSlice(n, incX)
	incY := negInc1
	y := randomSlice(n, incY)
	p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
	benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
}

func BenchmarkDrotmOffDiaLargeBothUnitary(b *testing.B) {
	n := LARGE_SLICE
	incX := 1
	x := randomSlice(n, incX)
	incY := 1
	y := randomSlice(n, incY)
	p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
	benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
}

func BenchmarkDrotmOffDiaLargeIncUni(b *testing.B) {
	n := LARGE_SLICE
	incX := posInc1
	x := randomSlice(n, incX)
	incY := 1
	y := randomSlice(n, incY)
	p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
	benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
}

func BenchmarkDrotmOffDiaLargeUniInc(b *testing.B) {
	n := LARGE_SLICE
	incX := 1
	x := randomSlice(n, incX)
	incY := negInc1
	y := randomSlice(n, incY)
	p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375,


/**
 * Simple utility for writing to registers in the devkit user register space
 */
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <exanic/exanic.h>
#include <exanic/util.h>
#include <exanic/register.h>

int main(int argc, char *argv[])
{
    exanic_t *exanic;
    char *device;
    int reg;
    char *p;
    uint32_t value;
    volatile uint32_t *application_registers;

    if (argc != 4)
        goto usage_error;

    device = argv[1];
    reg = strtol(argv[2], &p, 0);
    if (*p != '\0')
        goto usage_error;
    value = strtol(argv[3], &p, 0);
    if (*p != '\0')
        goto usage_error;

    exanic = exanic_acquire_handle(device);
    if (exanic == NULL)
    {
        fprintf(stderr, "%s: %s\n", device, exanic_get_last_error());
        return 1;
    }

    if ((application_registers = exanic_get_devkit_registers(exanic)) == NULL)
    {
        fprintf(stderr, "%s: %s\n", argv[1], exanic_get_last_error());
        return -1;
    }

    application_registers[reg] = value;

    printf("0x%03x: wrote 0x%08x (%d)\n", reg, value, value);

    exanic_release_handle(exanic);
    return 0;

usage_error:
    fprintf(stderr, "Usage: %s <exanic> <reg> <value>\n", argv[0]);
    return 1;
}


 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package au.id.micolous.metrodroid.transit.seq_go

import au.id.micolous.metrodroid.multi.FormattedString
import au.id.micolous.metrodroid.multi.Parcelize
import au.id.micolous.metrodroid.transit.nextfare.NextfareTrip
import au.id.micolous.metrodroid.transit.nextfare.NextfareTripCapsule
import au.id.micolous.metrodroid.transit.seq_go.SeqGoData.AIRPORT_STATIONS

/**
 * Represents trip events on Go Card.
 */
@Parcelize
class SeqGoTrip (override val capsule: NextfareTripCapsule): NextfareTrip() {
    override val currency
        get() = SeqGoTransitData.CURRENCY

    override val str: String?
        get() = SeqGoData.SEQ_GO_STR

    override fun getAgencyName(isShort: Boolean) =
        if (capsule.mModeInt == SeqGoData.VEHICLE_RAIL && (
                AIRPORT_STATIONS.contains(capsule.mStartStation) ||
                    AIRPORT_STATIONS.contains(capsule.mEndStation))) {
            FormattedString.language("Airtrain", "en-AU")
        } else {
            super.getAgencyName(isShort)
        }

    override val routeName: FormattedString? get() = when (capsule.mModeInt) {
        // TODO: Use MdST (operator name is not prominent on G:link signage)
        SeqGoData.VEHICLE_GLINK ->
            FormattedString.language("G:link", "en-AU")
        else -> super.routeName
    }
}
/*
 * OpusTrip.kt
 *
 * Copyright 2018 Google
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package au.id.micolous.metrodroid.transit.opus

import au.id.micolous.metrodroid.multi.Parcelize
import au.id.micolous.metrodroid.transit.en1545.*
import au.id.micolous.metrodroid.util.ImmutableByteArray

@Parcelize
internal data class OpusTransaction(override val parsed: En1545Parsed) : En1545Transaction() {
    override val lookup: En1545Lookup
        get() = OpusLookup

    constructor(data: ImmutableByteArray) : this(parsed = En1545Parser.parse(data, tripFields))

    companion object {
        private val tripFields = En1545Container(
                En1545FixedInteger.date(EVENT),
                En1545FixedInteger.timeLocal(EVENT),
                En1545FixedInteger("UnknownX", 19), // Possibly part of following bitmap
                En1545Bitmap(
                        En1545FixedInteger(EVENT_UNKNOWN_A, 8),
                        En1545FixedInteger(EVENT_UNKNOWN_B, 8),


 as u128));
    let x2: u64 = ((x1 & (0xffffffffffffffff as u128)) as u64);
    let x3: fiat_p224r1_u1 = ((x1 >> 64) as fiat_p224r1_u1);
    *out1 = x2;
    *out2 = x3;
}

/// The function fiat_p224r1_subborrowx_u64 is a subtraction with borrow.
/// Postconditions:
///   out1 = (-arg1 + arg2 + -arg3) mod 2^64
///   out2 = -⌊(-arg1 + arg2 + -arg3) / 2^64⌋
///
/// Input Bounds:
///   arg1: [0x0 ~> 0x1]
///   arg2: [0x0 ~> 0xffffffffffffffff]
///   arg3: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
///   out1: [0x0 ~> 0xffffffffffffffff]
///   out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_p224r1_subborrowx_u64(
    out1: &mut u64,
    out2: &mut fiat_p224r1_u1,
    arg1: fiat_p224r1_u1,
    arg2: u64,
    arg3: u64,
) -> () {
    let x1: i128 = (((arg2 as i128) - (arg1 as i128)) - (arg3 as i128));
    let x2: fiat_p224r1_i1 = ((x1 >> 64) as fiat_p224r1_i1);
    let x3: u64 = ((x1 & (0xffffffffffffffff as i128)) as u64);
    *out1 = x3;
    *out2 = (((0x0 as fiat_p224r1_i2) - (x2 as fiat_p224r1_i2)) as fiat_p224r1_u1);
}

/// The function fiat_p224r1_mulx_u64 is a multiplication, returning the full double-width result.
/// Postconditions:
///   out1 = (arg1 * arg2) mod 2^64
///   out2 = ⌊arg1 * arg2 / 2^64⌋
///
/// Input Bounds:
///   arg1: [0x0 ~> 0xffffffffffffffff]
///   arg2: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
///   out1: [0x0 ~> 0xffffffffffffffff]
///   out2: [0x0 ~> 0xffffffffffffffff]
#[inline]
pub fn fiat_p224r1_mulx_u64(out1: &mut u64, out2: &mut u64, arg1: u64, arg2: u64) -> () {
    let x1: u128 = ((arg1 as u128) * (arg2 as u128));
    let x2: u64 = ((x1 & (0xffffffffffffffff as u128)) as u64);
    let x3: u64 = ((x1 >> 64) as u64);
    *out1 = x2;
    *out2 = x3;
}

/// The function fiat_p224r1_cmovznz_u64 is a single-word conditional move.
/// Postconditions:
///   out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
///   arg1: [0x0 ~> 0x1]
///   arg2: [0x0 ~> 0xffffffffffffffff]
///   arg3: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
///   out1: [0x0 ~> 0xffffffffffffffff]
#[inline]
pub fn fiat_p224r1_cmovznz_u64(out1: &mut u64, arg1: fiat_p224r1_u1, arg2: u64, arg3: u64) -> () {
    let x1: fiat_p224r1_u1 = (!(!