-- MojoSetup; a portable, flexible installation application.
--
-- Please see the file LICENSE.txt in the source's root directory.
--
--  This file written by Ryan C. Gordon.
--
-- Lines starting with "--" are comments in this file.
--
-- You should add your installer's strings to this file; localization.lua is
--  for strings used internally by MojoSetup itself. Your app can override any
--  individual string in that file, though.
--
-- NOTE: If you care about Unicode or ASCII chars above 127, this file _MUST_
--  be UTF-8 encoded! If you think you're using a certain high-ASCII codepage,
--  you're wrong!
--
-- Most of the MojoSetup table isn't set up when this code is run, so you
--  shouldn't rely on any of it. For most purposes, you should treat this
--  file more like a data description language and less like a turing-complete
--  scripting language.
--
-- The format of an entry looks like this:
--
--  ["Hello"] = {
--    es = "Hola",
--    de = "Hallo",
--    fr = "Bonjour",
--  };
--
-- So you just fill in the translation of the English for your language code.
--  Note that locales work, too:
--
--  ["Color"] = {
--    en_GB = "Colour",
--  };
--
-- Specific locales are favored, falling back to specific languages, eventually
--  ending up on the untranslated version (which is


  ostr.flush();
    EXPECT_EQ(out,
              "---\n"
              "{ str1: This is str1, str2: This is str2, \n"
              "  str3: This is str3 }\n"
              "...\n");
    out.clear();

    yout << Seq;
    ostr.flush();
    EXPECT_EQ(out,
              "---\n"
              "[ This is str1, This is str2, \n"
              "  This is str3 ]\n"
              "...\n");
    out.clear();
  }
  {
    // 0 means no wrapping.
    Output yout(ostr, nullptr, 0);

    yout << Map;
    ostr.flush();
    EXPECT_EQ(out,
              "---\n"
              "{ str1: This is str1, str2: This is str2, str3: This is str3 }\n"
              "...\n");
    out.clear();

    yout << Seq;
    ostr.flush();
    EXPECT_EQ(out,
              "---\n"
              "[ This is str1, This is str2, This is str3 ]\n"
              "...\n");
    out.clear();
  }
}

struct MappingContext {
  int A = 0;
};
struct SimpleMap {
  int B = 0;
  int C = 0;
};

struct NestedMap {
  NestedMap(MappingContext &Context) : Context(Context) {}
  SimpleMap Simple;
  MappingContext &Context;
};

namespace llvm {
namespace yaml {
template <> struct MappingContextTraits<SimpleMap, MappingContext> {
  static void mapping(IO &io, SimpleMap &sm, MappingContext &Context) {
    io.mapRequired("B", sm.B);
    io.mapRequired("C", sm.C);
    ++Context.A;
    io.mapRequired("Context", Context.A);
  }
};

template <> struct MappingTraits<NestedMap> {
  static void mapping(IO &io, NestedMap &nm) {
    io.mapRequired("Simple", nm.Simple, nm.Context);
  }
};
}
}

TEST(YAMLIO, TestMapWithContext) {
  MappingContext Context;
  NestedMap Nested(Context);
  std::string out;
  llvm::raw_string_ostream ostr(out);

  Output yout(ostr, nullptr, 15);

  yout << Nested;
  ostr.flush();
  EXPECT_EQ(1, Context.A);
  EXPECT_EQ("---\n"
            "Simple:\n"
            "  B:               0\n"
            "  C:               0\n"
            "  Context:         1\n"
            "...\n",
            out);

  out.clear();

  Nested.Simple.B = 2;
  Nested.Simple.C = 3;
  yout << Nested;
  ostr.flush();
  EXPECT_EQ(2, Context.A);
  EXPECT_EQ("---\n"
            "Simple:\n"
            "  B:               2\n"
            "  C:               3\n"
            "  Context:         2\n"
            "...\n",
            out);
  out.clear();
}

LLVM_YAML_IS_STRING_MAP(int)

TEST(YAMLIO, TestCustomMapping) {
  std::map<std::string, int> x;

  std::string out;
  llvm::raw_string_ostream ostr(out);
  Output xout(ostr, nullptr, 0);

  xout << x;
  ostr.flush();
  EXPECT_EQ("---\n"
            "{}\n"
            "...\n",
            out);

  x["foo"] = 1;
  x["bar"] = 2;

  out.clear();
  xout << x;
  ostr.flush();
  EXPECT_EQ("---\n"


 "`id` = :id OR `gender` = :gender"
        val paramMap = mapOf("id" to 1, "gender" to 0)
        val (sql, paramMap2) = ConditionSqlBuilder.buildConditionSqlWithParams(
            KOperationType.SELECT,
            wrapper,
            condition,
            mutableMapOf()
        )
        assertEquals(expect, sql)
        assertEquals(paramMap, paramMap2.toMap())
    }

    @Test
    fun test16() {
        val condition = Criteria(
            field = Field("id"),
            type = ConditionType.IN,
            value = listOf(1, 2, 3)
        )

        val expect = "`id` IN (:idList)"
        val paramMap = mapOf("idList" to listOf(1, 2, 3))
        val (sql, paramMap2) = ConditionSqlBuilder.buildConditionSqlWithParams(
            KOperationType.SELECT,
            wrapper,
            condition,
            mutableMapOf()
        )
        assertEquals(expect, sql)
        assertEquals(paramMap, paramMap2.toMap())
    }

    @Test
    fun test17() {
        val condition = Criteria(
            field = Field("id"),
            not = true,
            type = ConditionType.IN,
            value = listOf(1, 2, 3)
        )

        val expect = "`id` NOT IN (:idList)"
        val paramMap = mapOf("idList" to listOf(1, 2, 3))
        val (sql, paramMap2) = ConditionSqlBuilder.buildConditionSqlWithParams(
            KOperationType.SELECT,
            wrapper,
            condition,
            mutableMapOf()
        )
        assertEquals(expect, sql)
        assertEquals(paramMap, paramMap2.toMap())
    }

    @Test
    fun test18() {
        val condition = "id".eq(1) or "id".eq(2)

        val expect = "`id` = :id OR `id` = :id@1"
        val paramMap = mapOf("id" to 1, "id@1" to 2)
        val (sql, paramMap2) = ConditionSqlBuilder.buildConditionSqlWithParams(
            KOperationType.SELECT,
            wrapper,
            condition,
            mutableMapOf()
        )
        assertEquals(expect, sql)
        assertEquals(paramMap, paramMap2.toMap())
    }

}package com.kotlinorm.beans.sample.databases

import com.kotlinorm.annotations.*
import com.kotlinorm.interfaces.KPojo
import com.kotlinorm.enums.KColumnType.TINYINT
import com.kotlinorm.enums.KColumnType.VARCHAR
import com.kotlinorm.enums.Oracle
import java.time.LocalDateTime

@Table(name = "TB_USER") // Oracle通常建议表名大写
@TableIndex("idx_username", ["username"], Oracle.KIndexType.UNIQUE)
@TableIndex(name = "idx_multi", columns = ["id", "username"], type = "BITMAP")
data class OracleUser(
    @PrimaryKey(identity = true)
    var id: Int? = null, // 移除了identity=true，因为Oracle使用序列和触发器实现自增主键
    @ColumnType(VARCHAR, 254)
    var username: String? = null,
    @Column("gender1")
    @ColumnType(TINYINT)
    @Default("0")
    var gender: Int? = null,
    // 注释掉了age字段，如果需要可取消注释并调整类型
    // @ColumnType(INT)
    // var age: Int? = null,
    @CreateTime
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss") // 格式调整为通用格式，具体需根据实际库处理逻辑
    @Necessary
    var createTime: LocalDateTime? = null, // 更改类型为LocalDateTime以匹配Oracle的日期时间处理
    @UpdateTime
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @Necessary
    var updateTime: LocalDateTime? = null,
    @LogicDelete
    @Necessa


 FALSE;
    Pde->Write = 1;

    /* Get PTE of VirtualPtr, make it valid, and map PhysicalPtr there */
    Pte = &PageTable[(VirtualPtr >> 12) & ((1 << PTE_BITS) - 1)];
    Pte->Valid = 1;
    Pte->PageFrameNumber = (PFN_NUMBER)(PhysicalPtr.QuadPart >> PAGE_SHIFT);

    return TRUE;
}

VOID
NTAPI
Ki386ConvertPte(PHARDWARE_PTE Pte)
{
    PVOID VirtualPtr;
    PHYSICAL_ADDRESS PhysicalPtr;

    /* Get virtual and physical addresses */
    VirtualPtr = (PVOID)(Pte->PageFrameNumber << PAGE_SHIFT);
    PhysicalPtr = MmGetPhysicalAddress(VirtualPtr);

    /* Map its physical address in the page table provided by the caller */
    Pte->PageFrameNumber = (PFN_NUMBER)(PhysicalPtr.QuadPart >> PAGE_SHIFT);
}

BOOLEAN
NTAPI
Ki386CreateIdentityMap(PLARGE_IDENTITY_MAP IdentityMap, PVOID StartPtr, ULONG PagesCount)
{
    ULONG_PTR Ptr;
    ULONG PteIndex;
    PHYSICAL_ADDRESS IdentityPtr;

    /* Zero out the IdentityMap contents */
    RtlZeroMemory(IdentityMap, sizeof(LARGE_IDENTITY_MAP));

    /* Get the pointer to the physical address and save it in the struct */
    IdentityPtr = Ki386BuildIdentityBuffer(IdentityMap, StartPtr, PagesCount);
    IdentityMap->StartAddress = IdentityPtr.LowPart;
    if (IdentityMap->StartAddress == 0)
    {
        DPRINT1("Failed to get buffer for large pages identity mapping\n");
        return FALSE;
    }
    DPRINT("IdentityMap->StartAddress %p\n", IdentityMap->StartAddress);

    /* Map all pages */
    for (Ptr = (ULONG_PTR)StartPtr;
         Ptr < (ULONG_PTR)StartPtr + PagesCount * PAGE_SIZE;
         Ptr += PAGE_SIZE, IdentityPtr.QuadPart += PAGE_SIZE)
    {
        /* Map virtual address */
        if (!Ki386MapAddress(IdentityMap, Ptr, IdentityPtr)) return FALSE;

        /* Map physical address */
        if (!Ki386MapAddress(IdentityMap, IdentityPtr.LowPart, IdentityPtr)) return FALSE;
    }

    /* Convert all PTEs in the page directory from virtual to physical,
       because Ki386IdentityMapMakeValid mapped only virtual addresses */
    for (PteIndex = 0; PteIndex < (PAGE_SIZE / sizeof(HARDWARE_PTE)); PteIndex++)
    {
        if (IdentityMap->TopLevelDirectory[PteIndex].Valid != 0)
            Ki386ConvertPte(&IdentityMap->TopLevelDirectory[PteIndex]);
    }

    /* Save the page directory address (allocated by Ki386MapAddress) */
    IdentityMap->Cr3 = MmGetPhysicalAddress(IdentityMap->TopLevelDirectory).LowPart;

    DPRINT("IdentityMap->Cr3 0x%x\n", IdentityMap->Cr3);

    return TRUE;
}

VOID
NTAPI
Ki386FreeIdentityMap(PLARGE_IDENTITY_MAP IdentityMap)
{
    ULONG Page;

    DPRINT("Freeing %lu pages allocated for identity mapping\n", IdentityMap->PagesCount);

    /* Free all allocated pages, if any */
    for (Page = 0; Page < IdentityMap->PagesCount; Page++)
        MmFreeContiguousMemory(IdentityMap->PagesList[Page]);
}


import { getEmployeesErrors } from "./getEmployeesErrors";

export class GetEmployeesUseCase implements IUseCase<GetEmployeesDTO.Request, GetEmployeesDTO.Response> {
    private organizationRepo: IOrganizationRepo;
    public errors: UseCaseError[] = [
        ...getEmployeesErrors
    ];
    constructor(organizationRepo: IOrganizationRepo) {
        this.organizationRepo = organizationRepo;
    }

    public async execute(req: GetEmployeesDTO.Request): Promise<GetEmployeesDTO.Response> {
        if (!Types.ObjectId.isValid(req.organizationId)) {
            return Result.fail(UseCaseError.create('c'));
        }

        const organizationFound = await this.organizationRepo.findById(req.organizationId);
        if (organizationFound.isFailure) {
            return Result.fail(organizationFound.getError()!.code == 500 ? UseCaseError.create('a', 'Error upon finding organization') : UseCaseError.create('l'));
        }

        let organization = await organizationFound.getValue()!.populate('employees').execPopulate();

        return Result.ok({employees: organization.employees as any});
    }
}import { Injectable } from '@angular/core';
import { NumberBlockService } from './number-block.service';

declare let Blockly: any;

@Injectable()
export class ArithmeticOperatorsService {
  public xml: String;
  private numberBlock: NumberBlockService;

  constructor() {
    this.numberBlock = new NumberBlockService();
    this.xml = `<block type="arithmetic_operators">
      <value name="input1">
        ${this.numberBlock.xml}
      </value>
      <value name="input2">
        ${this.numberBlock.xml}
      </value>
    </block>`;

    Blockly.Blocks['arithmetic_operators'] = {
      init: function () {
        this.appendValueInput("input1");
        this.appendDummyInput()
          .appendField(new Blockly.FieldDropdown([
            ["+", "0"],
            ["-", "1"],
            ["*", "2"],
            ["/", "3"]
          ]), "operator");
        this.appendValueInput("input2");
        this.setInputsInline(true);
        this.setOutput(true, "Number");
        this.setColour(190);
        this.setTooltip('');
        this.setHelpUrl('');
      }
    };

    Blockly.JavaScript['arithmetic_operators'] = function (block) {
      const operator = block.getFieldValue('operator');
      const input1 = Blockly.JavaScript.valueToCode(block, 'input1');
      const input2 = Blockly.JavaScript.valueToCode(block, 'input2');
      let json = {
        method: 'getArithmeticResult',
        type: 'input',
        params: {
          input1,
          input2,
          operator
        }
      }
      return [JSON.stringify(json)];
    };

  }

  interpret = interpreter => {
    let operatorArr = ['add', 'sub', 'multiply', 'divide'];
    const wrapper = function ({input1, input2, operator}) {
      let result = null;
      if (isNaN(Number(input1))) {
        input1 = interpreter.executeCommands(input1);
      }
      if (isNaN(Number(input2))) {
        input2 = interpreter.executeCommands(input2);
      }
      input1 = parseFloat(input1);
      input2 = parseFloat(input2);
      switch (operatorArr[operator]) {
        case "add":
          result = input1 + input2;
          break;
        case "sub":
          result = input1 - input2;
          break;
        case "multiply":
          result = input1 * input2;


ndex = docText.indexOf(pattern);
            while (index >= 0) {
                int beginning = index;
                int ending = beginning + pattern.length();
                if (beginning != mention.getStart()) {
                    NamedEntity entity = new NamedEntity(aJCas);
                    entity.setBegin(beginning);
                    entity.setEnd(ending);
                 	entity.setEntityType(mention.getEntityType().getText());
                 	entity.setConfidence(mention.getProbability());
                 	entity.setSource(Constants.CRF);
                 	entity.addToIndexes();
                    System.out.println(mention.getText() + " != " + entity.getCoveredText());
                    //TODO: check position
                }
                index = docText.indexOf(pattern, index + 1);
            }
        }
*/

		long time = System.currentTimeMillis() - start;
		//System.out.println("Tagging " + sentenceCounter + " sentences with CRF took " + time + "ms (" + (time/sentenceCounter) + "ms per sentence)");
		documentCounter++;
	}

	/**
	 * converts each mention into an UIMA annotation
	 */
	private Set<Mention> createAnnotations(JCas aJCas, int offset, banner.types.Sentence bannerSentence) {
        List<Mention> mentions = bannerSentence.getMentions();
		Set<Mention> mentionsToAdd = new HashSet<Mention>();
		//FIXME: when using NBestCRFTagger: sort mentions first!
		Mention lastMention = null;
		for (Mention mention : mentions) {
			if (mention.getProbability() >= threshold) {
				// simple approach to resolve overlapping entities when using NBestCRFTagger
				if (lastMention != null && mention.overlaps(lastMention)) {
					if (mention.getProbability() > lastMention.getProbability()) {
						mentionsToAdd.remove(lastMention);
						mentionsToAdd.add(mention);
						lastMention = mention;
					}
				} else {
					mentionsToAdd.add(mention);
					lastMention = mention;
				}
			}
		}

		for (Mention mention : mentionsToAdd) {
			NamedEntity entity = new NamedEntity(aJCas);
			int startOffset = 0;
			int endOffset = 0;
			startOffset = bannerSentence.getTokens().get(mention.getStart()).getStart();
			endOffset = bannerSentence.getTokens().get(mention.getEnd() - 1).getEnd();

			entity.setBegin(offset + startOffset);
			entity.setEnd(offset + endOffset);
			entity.setEntityType(mention.getEntityType().getText());
			entity.setConfidence(mention.getProbability());
			entity.setSource(Constants.CRF);
			entity.setEntityType(ChemicalType.SYSTEMATIC.toString());
			entity.addToIndexes();

			assert entity.getCoveredText().equals(mention.getText());
		}
        return mentionsToAdd;
	}
}package me.huding.luobo;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;

import javax.sql.DataSource;

import com.jfinal.kit.Kv;
import com.jfinal.kit.PathKit;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.jfinal.plugin.druid.DruidPlugin;
import com.jfinal.template.Engine;

import me.huding.luobo.model.Blog;
import me.huding.luobo.model._MappingKit;
import me.huding.luobo.utils.DateStyle;
import me.huding.luobo.utils.DateUtils;

public class Main {

	public static String genPath(String url){
		return PathKit.getWebRootPath() + url;
	}

	private static Blog findNextBlog(Blog bean){
		String sql = "select


t); err != nil {
				t.Fatalf("Unable to push initial DUT config: %v", err)
			}
			ts.MustAdjacency(t)
		})
	}
}

// TestTraffic has the ATE advertise some routes and verifies that traffic sent to the DUT is routed
// appropriately.
func TestTraffic(t *testing.T) {
	ts := isissession.MustNew(t).WithISIS()
	otg := ts.ATE.OTG()
	targetNetwork := &attrs.Attributes{
		Desc:    "External network (simulated by ATE)",
		IPv4:    "198.51.100.0",
		IPv4Len: 24,
		IPv6:    "2001:db8::198:51:100:0",
		IPv6Len: 112,
	}
	deadNetwork := &attrs.Attributes{
		Desc:    "Unreachable network (traffic to it should blackhole)",
		IPv4:    "203.0.113.0",
		IPv4Len: 24,
		IPv6:    "2001:db8::203:0:113:0",
		IPv6Len: 112,
	}

	ts.ConfigISIS(func(isis *oc.NetworkInstance_Protocol_Isis) {
		// disable global hello padding on the DUT
		global := isis.GetOrCreateGlobal()
		global.HelloPadding = oc.Isis_HelloPaddingType_DISABLE
		// configuring single topology for ISIS global ipv4 AF
		if deviations.ISISSingleTopologyRequired(ts.DUT) {
			afv6 := global.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV6, oc.IsisTypes_SAFI_TYPE_UNICAST)
			afv6.GetOrCreateMultiTopology().SetAfiName(oc.IsisTypes_AFI_TYPE_IPV4)
			afv6.GetOrCreateMultiTopology().SetSafiName(oc.IsisTypes_SAFI_TYPE_UNICAST)
		}
	})
	ts.ATEIntf1.Isis().Advanced().SetEnableHelloPadding(false)

	// We generate traffic entering along port2 and destined for port1
	srcIntf := ts.MustATEInterface(t, "port2")
	dstIntf := ts.MustATEInterface(t, "port1")

	srcIpv4 := srcIntf.Ethernets().Items()[0].Ipv4Addresses().Items()[0]
	// netv4 is a simulated network containing the ipv4 addresses specified by targetNetwork
	netv4 := dstIntf.Isis().V4Routes().Add().SetName("netv4").SetLinkMetric(10).SetOriginType(gosnappi.IsisV4RouteRangeOriginType.EXTERNAL)
	netv4.Addresses().Add().SetAddress(targetNetwork.IPv4).SetPrefix(uint32(targetNetwork.IPv4Len))

	// netv6 is a simulated network containing the ipv6 addresses specified by targetNetwork
	netv6 := dstIntf.Isis().V6Routes().Add().SetName("netv6").SetLinkMetric(10).SetOriginType(gosnappi.IsisV6RouteRangeOriginType.EXTERNAL)
	netv6.Addresses().Add().SetAddress(targetNetwork.IPv6).SetPrefix(uint32(targetNetwork.IPv6Len))

	t.Log("Configuring traffic from ATE through DUT...")

	v4Flow := ts.ATETop.Flows().Add()
	v4Flow.SetName("v4Flow")
	v4Flow.TxRx().Device().SetTxNames([]string{srcIpv4.Name()}).SetRxNames([]string{netv4.Name()})

	v4FlowEth := v4Flow.Packet().Add().Ethernet()
	v4FlowEth.Src().SetValue(isissession.ATETrafficAttrs.MAC)

	v4FlowIp := v4Flow.Packet().Add().Ipv4()


ifies state of the mouse buttons for the event
 */
/*!
 * \brief QPickEvent::buttons
 * \return bitfield to be used to check for mouse buttons that may be accompanying the pick event.
 */
int QPickEvent::buttons() const
{
    Q_D(const QPickEvent);
    return d->m_buttons;
}

/*!
 * \enum Qt3DRender::QPickEvent::Modifiers
 *
 * \value NoModifier
 * \value ShiftModifier
 * \value ControlModifier
 * \value AltModifier
 * \value MetaModifier
 * \value KeypadModifier
 */

/*!
    \qmlproperty int Qt3D.Render::PickEvent::modifiers
    Specifies state of the mouse buttons for the event
*/
/*!
  \property Qt3DRender::QPickEvent::modifiers
    Specifies state of the mouse buttons for the event
 */
/*!
 * \brief QPickEvent::modifiers
 * \return bitfield to be used to check for keyboard modifiers that may be accompanying the pick event.
 */
int QPickEvent::modifiers() const
{
    Q_D(const QPickEvent);
    return d->m_modifiers;
}

/*!
 * \qmlproperty Viewport Qt3D.Render::PickEvent::viewport
 * The viewport in which this event originated. A null value means the event originated from a frame graph branch without a Viewport.
 * If a frame graph branch has a Viewport inside a Viewport the property will contain the leaf viewport.
 *
 * \since 5.14
 */
/*!
 * \property Qt3DRender::QPickEvent::viewport
 * The viewport in which this event originated. A null value means the event originated from a frame graph branch without a QViewport.
 * If a frame graph branch has a Viewport inside a Viewport the property will contain the leaf viewport.
 *
 * \since 5.14
 */
QViewport *QPickEvent::viewport() const
{
    Q_D(const QPickEvent);
    return d->m_viewport;
}

/*!
 * \qmlproperty Entity Qt3D.Render::PickEvent::entity
 * The entity that the picked geometry belongs to.
 *
 * If the object picker is not attached to a leaf node in the scene graph,
 * this is useful to find which child entity was actually picked.
 *
 * \since 5.14
 */
/*!
 * \property Qt3DRender::QPickEvent::entity
 * The entity that the picked geometry belongs to.
 *
 * If the object picker is not attached to a leaf node in the scene graph,
 * this is useful to find which child entity was actually picked.
 *
 * \since 5.14
 */
Qt3DCore::QEntity *QPickEvent::entity() const
{
    Q_D(const QPickEvent);
    return d->m_entityPtr;
}

} // Qt3DRender

QT_END_NAMESPACE

#include "moc_qpickevent.cpp"

// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#include <QtQuickTest/quicktest.h>

#include <private/qguiapplication_p.h>
#include <qpa/qplatformintegration.h>

class tst_qmltest: public QObject
{
    Q_OBJECT
private slots:
    void skiptest() { QSKIP("This test will fail, skipping."); };
};

int main(int argc, char **argv)
{
    if (!qEnvironmentVariableIsEmpty("QEMU_LD_PREFIX")) {
        qWarning("This test would fail due to QEMU emulation shortcomings, so it will be skipped.");
        tst_qmltest skip;
        return QTest::qExec(&skip, argc, argv);
    }
    if (!qEnvironmentVariableIsEmpty("QT_QPA_OFFSCREEN_NO_GLX")) {
        qWarning("This test would fail due to missing GLX, so it will be skipped.");
        tst_qmltest skip;
        ret


 = 1;

    if (r->args.len) {

        if (ngx_http_arg(r, (u_char *) "start", 5, &value) == NGX_OK) {

            start = ngx_atoof(value.data, value.len);

            if (start == NGX_ERROR || start >= len) {
                start = 0;
            }

            if (start) {
                len = sizeof(ngx_flv_header) - 1 + len - start;
                i = 0;
            }
        }
    }

    log->action = "sending flv to client";

    r->headers_out.status = NGX_HTTP_OK;
    r->headers_out.content_length_n = len;
    r->headers_out.last_modified_time = of.mtime;

    if (ngx_http_set_etag(r) != NGX_OK) {
        return NGX_HTTP_INTERNAL_SERVER_ERROR;
    }

    if (ngx_http_set_content_type(r) != NGX_OK) {
        return NGX_HTTP_INTERNAL_SERVER_ERROR;
    }

    if (i == 0) {
        b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t));
        if (b == NULL) {
            return NGX_HTTP_INTERNAL_SERVER_ERROR;
        }

        b->pos = ngx_flv_header;
        b->last = ngx_flv_header + sizeof(ngx_flv_header) - 1;
        b->memory = 1;

        out[0].buf = b;
        out[0].next = &out[1];
    }

    b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t));
    if (b == NULL) {
        return NGX_HTTP_INTERNAL_SERVER_ERROR;
    }

    b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t));
    if (b->file == NULL) {
        return NGX_HTTP_INTERNAL_SERVER_ERROR;
    }

    r->allow_ranges = 1;

    rc = ngx_http_send_header(r);

    if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) {
        return rc;
    }

    b->file_pos = start;
    b->file_last = of.size;

    b->in_file = b->file_last ? 1: 0;
    b->last_buf = (r == r->main) ? 1 : 0;
    b->last_in_chain = 1;

    b->file->fd = of.fd;
    b->file->name = path;
    b->file->log = log;
    b->file->directio = of.is_directio;

    out[1].buf = b;
    out[1].next = NULL;

    return ngx_http_output_filter(r, &out[i]);
}

static char *
ngx_http_flv(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
    ngx_http_core_loc_conf_t  *clcf;

    clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
    clcf->handler = ngx_http_flv_handler;

    return NGX_CONF_OK;
}


NodeRoleControlPlane: "",
						"label-a":                          "value-a",
					},
				},
				Status: corev1.NodeStatus{
					NodeInfo: corev1.NodeSystemInfo{Architecture: "amd64"},
				},
			}}, v1beta1.HyperConvergedConfig{
				NodePlacement: &api.NodePlacement{
					NodeSelector: map[string]string{
						"label-a": "value-a",
					},
				},
			}, Equal([]string{"amd64"})),
			Entry("node selector w/ 2 labels - 1 match, 1 not", []client.Object{&corev1.Node{
				ObjectMeta: metav1.ObjectMeta{
					Name: "worker1",
					Labels: map[string]string{
						"label-a": "value-a",
					},
				},
				Status: corev1.NodeStatus{
					NodeInfo: corev1.NodeSystemInfo{Architecture: "amd64"},
				},
			}}, v1beta1.HyperConvergedConfig{
				NodePlacement: &api.NodePlacement{
					NodeSelector: map[string]string{
						"label-a": "value-a",
						"label-b": "value-b",
					},
				},
			}, BeEmpty()),
			Entry("2 nodes, 2 match", []client.Object{
				&corev1.Node{
					ObjectMeta: metav1.ObjectMeta{
						Name: "node1-amd64",
						Labels: map[string]string{
							"label-a": "value-a",
						},
					},
					Status: corev1.NodeStatus{
						NodeInfo: corev1.NodeSystemInfo{Architecture: "amd64"},
					},
				},
				&corev1.Node{
					ObjectMeta: metav1.ObjectMeta{
						Name: "node2-arm64",
						Labels: map[string]string{
							"label-a": "value-a",
						},
					},
					Status: corev1.NodeStatus{
						NodeInfo: corev1.NodeSystemInfo{Architecture: "arm64"},
					},
				},
			}, v1beta1.HyperConvergedConfig{
				NodePlacement: &api.NodePlacement{
					NodeSelector: map[string]string{
						"label-a": "value-a",
					},
				},
			}, Equal([]string{"amd64", "arm64"})),
			Entry("non-worker, node affinity - not match", []client.Object{&corev1.Node{
				ObjectMeta: metav1.ObjectMeta{
					Name: "worker1",
					Labels: map[string]string{
						"label-a": "value-a",
					},
				},
				Status: corev1.NodeStatus{
					NodeInfo: corev1.NodeSystemInfo{Architecture: "amd64"},
				},
			}}, v1beta1.HyperConvergedConfig{
				NodePlacement: &api.NodePlacement{
					Affinity: &corev1.Affinity{
						NodeAffinity: &corev1.NodeAffinity{
							RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{
								NodeSelectorTerms: []corev1.NodeSelectorTerm{
									{
										MatchExpressions: []corev1.NodeSelectorRequirement{
											{Key: "label-a", Operator: corev1.NodeSelectorOpIn, Values: []string{"value-b", "value-c"}},
										},
									},
								},
							},
						},
					},
				},
			}, BeEmpty()),
			Entry("non-worker, node affinity - match", []client.Object{&corev1.Node{
				ObjectMeta: metav1.ObjectMeta{
					Name: "worker1",
					Labels: map[string]string{
						"label-a": "value-a",
					},
				},
				Status: corev1.NodeStatus{
					NodeInfo: corev1.NodeSystemInfo{Architecture: "amd64"},
				},
			}}, v1beta1.HyperConvergedConfig{
				NodePlacement: &


 'orthographic' ) {
            scale = midToCorner/256; // Needs to scale along with the plot itself.
        }
        sprite.scale.set( scale * width, scale * height, 1 );

        scene.add( sprite );

        return sprite;

    }

    if ( options.axes ) scene.add( new THREE.AxesHelper( Math.min( a[0]*b[1].x, a[1]*b[1].y, a[2]*b[1].z ) ) );

    var camera = createCamera();
    camera.up.set( 0, 0, 1 );
    camera.position.set( a[0]*xMid, a[1]*yMid, a[2]*zMid );

    var offset = new THREE.Vector3( a[0]*xRange, a[1]*yRange, a[2]*zRange );

    if ( options.viewpoint ) {

        var aa = options.viewpoint;
        var axis = new THREE.Vector3( aa[0][0], aa[0][1], aa[0][2] ).normalize();
        var angle = aa[1] * Math.PI / 180;
        var q = new THREE.Quaternion().setFromAxisAngle( axis, angle ).inverse();

        offset.set( 0, 0, offset.length() );
        offset.applyQuaternion( q );

    }

    camera.position.add( offset );

    function createCamera() {

        var aspect = window.innerWidth / window.innerHeight;

        // Scale the near and far clipping planes along with the overall plot size.
        var nearClip = 0.01 * midToCorner;
        var farClip = 100 * midToCorner;

        if ( options.projection === 'orthographic' ) {
            var camera = new THREE.OrthographicCamera( -1, 1, 1, -1, -farClip, farClip );
            updateCameraAspect( camera, aspect );
            return camera;
        }

        return new THREE.PerspectiveCamera( 45, aspect, nearClip, farClip );

    }

    function updateCameraAspect( camera, aspect ) {

        if ( camera.isPerspectiveCamera ) {
            camera.aspect = aspect;
        } else if ( camera.isOrthographicCamera ) {
            // Fit the camera frustum to the bounding box's diagonal so that the entire plot fits
            // within at the default zoom level and camera position.
            if ( aspect > 1 ) { // Wide window
                camera.top = midToCorner;
                camera.right = midToCorner * aspect;
            } else { // Tall or square window
                camera.top = midToCorner / aspect;
                camera.right = midToCorner;
            }
            camera.bottom = -camera.top;
            camera.left = -camera.right;
        }

        camera.updateProjectionMatrix();

    }

    var lights = [{"x":-5, "y":3, "z":0, "color":"#7f7f7f", "parent":"camera"}];
    for ( var i=0 ; i < lights.length ; i++ ) {
        var light = new THREE.DirectionalLight( lights[i].color, 1 );
        light.position.set( a[0]*lights[i].x, a[1]*lights[i].y, a[2]*lights[i].z );
        if ( lights[i].parent === 'camera' ) {
            light.target.position.set( a[0]*xMid, a[1]*yMid, a[2]*zMid );
            scene.add( light.target );
            camera.add( light );
        } else scene.add( light );
    }
    scene.add( camera );

    var ambient = {"color":"#7f7f7f"};
    scene.add( new THREE.AmbientLight( ambient.color, 1 ) );

    var controls = new THREE.OrbitControls( camera, renderer.domElement );
    controls.target.set( a[0]*xMid, a[1]*yMid, a[2]*zMid );
    controls.addEventListener( 'change', function() { if ( !animate ) render(); } );

    window.addEventListener( 'resize', function


/// RIa-type instructions.
///
///   31      23 19      15
///   opcode1 r1 opcode2 i2
///        24 20      16  0
///
fn enc_ri_a(opcode: u16, r1: Reg, i2: u16) -> [u8; 4] {
    let mut enc: [u8; 4] = [0; 4];
    let opcode1 = ((opcode >> 4) & 0xff) as u8;
    let opcode2 = (opcode & 0xf) as u8;
    let r1 = machreg_to_gpr(r1) & 0x0f;

    enc[0] = opcode1;
    enc[1] = r1 << 4 | opcode2;
    enc[2..].copy_from_slice(&i2.to_be_bytes());
    enc
}

/// RIb-type instructions.
///
///   31      23 19      15
///   opcode1 r1 opcode2 ri2
///        24 20      16   0
///
fn enc_ri_b(opcode: u16, r1: Reg, ri2: i32) -> [u8; 4] {
    let mut enc: [u8; 4] = [0; 4];
    let opcode1 = ((opcode >> 4) & 0xff) as u8;
    let opcode2 = (opcode & 0xf) as u8;
    let r1 = machreg_to_gpr(r1) & 0x0f;
    let ri2 = ((ri2 >> 1) & 0xffff) as u16;

    enc[0] = opcode1;
    enc[1] = r1 << 4 | opcode2;
    enc[2..].copy_from_slice(&ri2.to_be_bytes());
    enc
}

/// RIc-type instructions.
///
///   31      23 19      15
///   opcode1 m1 opcode2 ri2
///        24 20      16   0
///
fn enc_ri_c(opcode: u16, m1: u8, ri2: i32) -> [u8; 4] {
    let mut enc: [u8; 4] = [0; 4];
    let opcode1 = ((opcode >> 4) & 0xff) as u8;
    let opcode2 = (opcode & 0xf) as u8;
    let m1 = m1 & 0x0f;
    let ri2 = ((ri2 >> 1) & 0xffff) as u16;

    enc[0] = opcode1;
    enc[1] = m1 << 4 | opcode2;
    enc[2..].copy_from_slice(&ri2.to_be_bytes());
    enc
}

/// RIEa-type instructions.
///
///   47      39 35 31 15 11 7
///   opcode1 r1 -- i2 m3 -- opcode2
///        40 36 32 16 12 8       0
///
fn enc_rie_a(opcode: u16, r1: Reg, i2: u16, m3: u8) -> [u8; 6] {
    let mut enc: [u8; 6] = [0; 6];
    let opcode1 = ((opcode >> 8) & 0xff) as u8;
    let opcode2 = (opcode & 0xff) as u8;
    let r1 = machreg_to_gpr(r1) & 0x0f;
    let m3 = m3 & 0x0f;

    enc[0] = opcode1;
    enc[1] = r1 << 4;
    enc[2..4].copy_from_slice(&i2.to_be_bytes());
    enc[4] = m3 << 4;
    enc[5] = opcode2;
    enc
}

/// RIEd-type instructions.
///
///   47      39 35 31 15 7
///   opcode1 r1 r3 i2 -- opcode2
///        40 36 32 16  8       0
///
fn enc_rie_d(opcode: u16, r1: Reg, r3: Reg, i2: u16) -> [u8; 6] {
    let mut enc: [u8; 6] = [0; 6];
    let opcode1 = ((opcode >> 8) & 0xff) as u8;
    let opcode2 = (opcode & 0xff) as u8;
    let r1 = machreg_to_gpr(r1) & 0x0f;
    let r3 = machreg_to_gpr(r3)


"marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");S(t=y({},N.defaults,t||{}));try{const n=q.lexInline(e,t);return t.walkTokens&&N.walkTokens(n,t.walkTokens),O.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"
An error occurred:

"+o(e.message+"",!0)+"
";throw e}},N.Parser=O,N.parser=O.parse,N.Renderer=L,N.TextRenderer=Z,N.Lexer=q,N.lexer=q.lex,N.Tokenizer=A,N.Slugger=C,N.parse=N;
/*!
   * The reveal.js markdown plugin. Handles parsing of
   * markdown inside of presentations as well as loading
   * of external markdown documents.
   */
const D="__SCRIPT_END__",M=/\[([\s\d,|-]*)\]/,P={"&":"&","<":"<",">":">",'"':""","'":"'"};return()=>{let e;function t(e){var t=(e.querySelector("[data-template]")||e.querySelector("script")||e).textContent,n=(t=t.replace(new RegExp(D,"g"),"<\/script>")).match(/^\n?(\s*)/)[1].length,r=t.match(/^\n?(\t*)/)[1].length;return r>0?t=t.replace(new RegExp("\\n?\\t{"+r+"}(.*)","g"),(function(e,t){return"\n"+t})):n>1&&(t=t.replace(new RegExp("\\n? {"+n+"}(.*)","g"),(function(e,t){return"\n"+t}))),t}function n(e){for(var t=e.attributes,n=[],r=0,s=t.length;r<s;r++){var i=t[r].name,l=t[r].value;/data\-(markdown|separator|vertical|notes)/gi.test(i)||(l?n.push(i+'="'+l+'"'):n.push(i))}return n.join(" ")}function r(e){return(e=e||{}).separator=e.separator||"\r?\n---\r?\n",e.notesSeparator=e.notesSeparator||"notes?:",e.attributes=e.attributes||"",e}function s(e,t){t=r(t);var n=e.split(new RegExp(t.notesSeparator,"mgi"));return 2===n.length&&(e=n[0]+''+N(n[1].trim())+""),'


verObserver = new MutationObserver(Main.onMutateHoverNode);
		Main.hoverObserver.observe(hoverNode,{ attributes : false, childList : true, subtree : true});
	}
};
Main.onMutateHoverNode = function(mutationList,observer) {
	var globalHoverContentElement = window.document.getElementById("global_hover_content");
	var hoverAppNode = null;
	var hoverAppId = "";
	var _g = 0;
	while(_g < mutationList.length) {
		var mutation = mutationList[_g];
		++_g;
		if(mutation != null && mutation.addedNodes != null && mutation.addedNodes.length > 0) {
			var _g2 = 0;
			var _g1 = mutation.addedNodes.length;
			while(_g2 < _g1) {
				var i = _g2++;
				var addedNode = mutation.addedNodes.item(i);
				if(addedNode.nodeType == 1) {
					var element = addedNode;
					var id = element.attributes.getNamedItem("id");
					var idValue = "";
					if(id != null) {
						idValue = id.value;
					}
					if(idValue.indexOf("hover_app_") != -1) {
						hoverAppId = StringTools.replace(idValue,"hover_app_","");
						hoverAppNode = element;
					}
				}
			}
		}
	}
	var boxEntry = null;
	var _g3 = 0;
	var _g11 = Main.boxEntries;
	while(_g3 < _g11.length) {
		var entry = _g11[_g3];
		++_g3;
		if(hoverAppId == entry.appid) {
			boxEntry = entry;
			break;
		}
	}
	if(boxEntry == null) {
		if(Main.focusedEntry != null && hoverAppId == Main.focusedEntry.appid) {
			boxEntry = Main.focusedEntry;
		}
	}
	if(hoverAppNode != null && boxEntry != null) {
		if(Main.hoverObserver != null) {
			Main.hoverObserver.disconnect();
			Main.hoverObserver = null;
		}
		var hoverBody2 = hoverAppNode.getElementsByClassName("hover_body")[1];
		if(hoverBody2 != null) {
			hoverBody2.innerHTML = "";
			hoverBody2.remove();
		}
		var descText = boxEntry.shortDescription;
		var title = boxEntry.title;
		var descriptionBlurb = "
\r\n\t\t\t\t\t" + descText + "\r\n\t\t\t\t
";
		var headerImage = "
\r\n\t\t\t\t\t\r\n\t\t\t\t
";
		var similarText = "";
		var similar = Render.similarBlurb(boxEntry.recommender);
		if(Main.focusedEntry == null || boxEntry.appid != Main.focusedEntry.appid) {
			var similarTitle = similar.title;
			var similarBlurb = similar.blurb;
			similarText = "
\r\n\t\t\t\t\t
" + similarTitle + "
\r\n\t\t\t\t\t" + similarBlurb + "
\r\n\t\t\t\t\t
\r\n\t\t\t\t
";
		}


', `${parsedContent.length} cards loaded`);
        this.cards = parsedContent;
      } else {
        this.logger.warn('CardsManager', 'No card was found, is the file empty?');
      }
    } catch (e) {
      this.logger.error('CardsManager', `Could not load cards from "${path}": ${e.message}`);
      throw e;
    }
  }

  /**
   * Return the card with the given ID if
   * it exists, or throw an error if it doesn't.
   *
   * @param cardId Id of the card
   */
  public getCard(cardId: string): Card {
    const card = this.cards.find(c => c.id === cardId);

    if (!card) {
      throw new Error(`Card "${cardId}" could not be found by the cards manager`);
    }

    return card;
  }

  /**
   * Return a copy of the cards array.
   */
  public getCards(): Card[] {
    return [...this.cards];
  }

  /**
   * Return cards mapped by their ID.
   */
  public getCardsMap(): Map<string, Card> {
    return new Map<string, Card>(
      this.cards.map(c => [c.id, c] as [string, Card])
    );
  }

  /**
   * Check if all the values of a card are okay.
   * This is called for each card loaded by the manager to
   * ensure that the JSON file didn't contain any invalid
   * data.
   *
   * @param card A card
   */
  private checkCardIntegrity(card: Card) {
    if (!card.id) {
      throw new Error(`Card has no ID: ${JSON.stringify(card)}`);
    }

    if (!card.values) {
      throw new Error(`Card "${card.id}" has no value at all`);
    }

    for (const side of ['top', 'left', 'right', 'bottom']) {
      const sideValue = ((card.values as any) as {[key: string]: number})[side];
      if (!sideValue) {
        throw new Error(`Card "${card.id}" has not value for its ${side} side`);
      }

      if (sideValue < 1 || sideValue > 10) {
        // tslint:disable-next-line:max-line-length
        throw new Error(`Card "${card.id}" has an invalid value for its ${side} side: ${sideValue}`);
      }

      const availableElements = Object.keys(CardElement).map(key => (CardElement as any)[key]);
      if (card.element && (availableElements.indexOf(card.element) === -1)) {
        throw new Error(`Card "${card.id}" has an invalid element value: "${card.element}"`);
      }
    }
  }
}
import { CREATE_POST, FETCH_POSTS, PostActionTypes } from "./types/types";

const initialState: any = {
  posts: [],
  fetchedPosts: [],
};

export default function postsReducer(state = initialState, action: PostActionTypes) {
  switch (action.type) {
    case CREATE_POST:
      return { ...state, posts: [...state.posts, action.payload] };
    case FETCH_POSTS:
      return { ...state, fetchedPosts: action.payload };
    default:
      return state;
  }
}
import { Direction } from './Direction';
import { Intent } from './Intent';
import { Entity } from './Entity';
import { UserData } from './UserData';

export class UserInput extends UserData {
  protected intent:Intent;
  protected parameter:Direction|Entity|null;

  get Intent():Intent { return this.intent; };
  get Parameter():Direction|Entity|null { return this.parameter; };

  public constructor(intent:Intent = Intent.WAIT, parameter:Direction|Entity|null = null) {
    super();
    this.intent = intent;
    this.parameter = parameter;
  }
}
import { useState } from


2.5-14.5a.75.75 0 0 1 .866-.612Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6.28 5.22a.75.75 0 0 1 0 1.06L2.56 10l3.72 3.72a.75.75 0 0 1-1.06 1.06L.97 10.53a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Zm7.44 0a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L17.44 10l-3.72-3.72a.75.75 0 0 1 0-1.06Zm-2.343-3.209a.75.75 0 0 1 .612.867l-2.5 14.5a.75.75 0 0 1-1.478-.255l2.5-14.5a.75.75 0 0 1 .866-.612Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .unordered-list:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6 4.75A.75.75 0 0 1 6.75 4h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 4.75ZM6 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 10Zm0 5.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75a.75.75 0 0 1-.75-.75ZM1.99 4.75a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0 10.5a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0-5.25a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1V10Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6 4.75A.75.75 0 0 1 6.75 4h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 4.75ZM6 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 10Zm0 5.25


aken = double(clock() - start) / CLOCK_TICKS_PER_SECOND, i++)
		d.GenerateEphemeralKeyPair(GlobalRNG(), priv, pub);

	OutputResultOperations(name, "Key-Pair Generation", pc, i, timeTaken);

	if (!pc && d.GetMaterial().SupportsPrecomputation())
	{
		d.AccessMaterial().Precompute(16);
		BenchMarkKeyGen(name, d, timeTotal, true);
	}
}

void BenchMarkAgreement(const char *name, SimpleKeyAgreementDomain &d, double timeTotal, bool pc=false)
{
	SecByteBlock priv1(d.PrivateKeyLength()), priv2(d.PrivateKeyLength());
	SecByteBlock pub1(d.PublicKeyLength()), pub2(d.PublicKeyLength());
	d.GenerateKeyPair(GlobalRNG(), priv1, pub1);
	d.GenerateKeyPair(GlobalRNG(), priv2, pub2);
	SecByteBlock val(d.AgreedValueLength());

	clock_t start = clock();
	unsigned int i;
	double timeTaken;
	for (timeTaken=(double)0, i=0; timeTaken < timeTotal; timeTaken = double(clock() - start) / CLOCK_TICKS_PER_SECOND, i+=2)
	{
		d.Agree(val, priv1, pub2);
		d.Agree(val, priv2, pub1);
	}

	OutputResultOperations(name, "Key Agreement", pc, i, timeTaken);
}

void BenchMarkAgreement(const char *name, AuthenticatedKeyAgreementDomain &d, double timeTotal, bool pc=false)
{
	SecByteBlock spriv1(d.StaticPrivateKeyLength()), spriv2(d.StaticPrivateKeyLength());
	SecByteBlock epriv1(d.EphemeralPrivateKeyLength()), epriv2(d.EphemeralPrivateKeyLength());
	SecByteBlock spub1(d.StaticPublicKeyLength()), spub2(d.StaticPublicKeyLength());
	SecByteBlock epub1(d.EphemeralPublicKeyLength()), epub2(d.EphemeralPublicKeyLength());
	d.GenerateStaticKeyPair(GlobalRNG(), spriv1, spub1);
	d.GenerateStaticKeyPair(GlobalRNG(), spriv2, spub2);
	d.GenerateEphemeralKeyPair(GlobalRNG(), epriv1, epub1);
	d.GenerateEphemeralKeyPair(GlobalRNG(), epriv2, epub2);
	SecByteBlock val(d.AgreedValueLength());

	clock_t start = clock();
	unsigned int i;
	double timeTaken;
	for (timeTaken=(double)0, i=0; timeTaken < timeTotal; timeTaken = double(clock() - start) / CLOCK_TICKS_PER_SECOND, i+=2)
	{
		d.Agree(val, spriv1, epriv1, spub2, epub2);
		d.Agree(val, spriv2, epriv2, spub1, epub1);
	}

	OutputResultOperations(name, "Key Agreement", pc, i, timeTaken);
}

//VC60 workaround: compiler bug triggered without the extra dummy parameters
template <class SCHEME>
void BenchMarkCrypto(const char *filename, const char *name, double timeTotal, SCHEME *x=NULL)
{
	FileSource f(filename, true, new HexDecoder());
	typename SCHEME::Decryptor priv(f);
	typename SCHEME::Encryptor pub(priv);
	BenchMarkEncryption(name, pub, timeTotal);
	BenchMarkDecryption(name, priv, pub, timeTotal);
}

//VC60 workaround: compiler bug triggered without the extra dummy parameters
template <class SCHEME>
void BenchMarkSignature(const char *filename, const char *name, double timeTotal, SCHEME *x=NULL)
{
	FileSource f(filename, true, new HexDecoder());
	typename SCHEME::Signer priv(f);
	typename SCHEME::Verifier pub(priv);
	Bench


/code> lub fastboot pozwalają na zaawansowane zarządzanie urządzeniem. Przykładem może być komenda adb reboot-bootloader, która sprawia, że urządzenie zrestartuje się i zatrzyma rozruch systemu na wczesnym etapie, co umożliwi przesłanie obrazu systemu poprzez wpisanie komendy fastboot flash $partition $image.

Pierwszy obraz: boot.img

Zawiera rdzeń Linuxa, odpowiadający za uruchamianie podstawowych programów i wykonywanie skryptów. Zostanie przesłany na partycję "boot" i dostęp do niego będzie możliwy poprzez użycie komendy adb shell. Ponieważ jest najważniejszą częścią systemu, aby go modyfikować, potrzeba uprawnień root.

Możliwe jest również modyfikowanie istniejącego już obrazu boot.img, poprzez przeglądanie, kopiowanie,  ponowne kompilowanie jego elementów. Takie operacje zostały opisane na tej stronie: Alcatel One Touch Fire Hacking (Mini) Guide.

Obrazy boot.img mogą zostać przetestowane przed przesłaniem ich. Gdy urządzenie będzie w trybie bootloadera, wystarczy użyć narzędzia fastboot do uruchomienia obrazu boot.img. Nie trzeba wtedy instalować obrazu na urządzeniu, tak, jak miałoby to miejsce w przypadku komendy fastboot boot /ścieżka/do/boot.img.

Drugi obraz: system.img

Obraz systemu (system.img) zawiera główne elementy systemu Firefox OS:

Gonk: nisko-poziomowy dostęp systemu do komponentów urządzenia.

Gecko: silnik przeglądarki Firefox, przystosowany do obsługi urządzeń mobilnych.

B2G: główny proces systemowy.

Więcej informacji o budowie systemu znajdziesz na stronie Firefox OS platform.

Obraz systemu zostanie przesłany na główną partycję urządzenia (utworzoną przez obraz boot.img), a wszystkie pliki systemowe będą znajdowały się w folderze /system/.

Notatka: Obraz systemu zawiera również plamy binarne (binary blobs), które


6.5 274.9 0 290.5 0 306.7C0 340.6 27.4 368 61.3 368l4.9 0c12 0 23.7-3.3 34-9.4l31.3-18.8c1.8-1.1 3.1-1.2 4.2-1c1.2 .2 2.5 .8 3.6 2s1.8 2.4 2 3.6c.2 1 .1 2.4-1 4.2l-18.8 31.3c-6.2 10.3-9.4 22-9.4 34l0 4.9c0 33.8 27.4 61.3 61.3 61.3c16.2 0 31.8-6.5 43.3-17.9l1.2-1.2c3.4-3.4 9-3.4 12.4 0l1.2 1.2c11.5 11.5 27.1 17.9 43.3 17.9c33.8 0 61.3-27.4 61.3-61.3l0-4.9c0-12-3.3-23.7-9.4-34l-18.8-31.3c-1.1-1.8-1.2-3.1-1-4.2c.2-1.2 .8-2.5 2-3.6s2.4-1.8 3.6-2c1-.2 2.4-.1 4.2 1l31.3 18.8c10.3 6.2 22 9.4 34 9.4l4.9 0c33.8 0 61.3-27.4 61.3-61.3c0-16.2-6.5-31.8-17.9-43.3l-1.2-1.2c-3.4-3.4-3.4-9 0-12.4l1.2-1.2c11.5-11.5 17.9-27.1 17.9-43.3c0-33.8-27.4-61.3-61.3-61.3l-4.9 0c-12 0-23.7 3.3-34 9.4l-31.3 18.8c-1.8 1.1-3.1 1.2-4.2 1c-1.2-.2-2.5-.8-3.6-2s-1.8-2.4-2-3.6c-.2-1-.1-2.4 1-4.2l18.8-31.3c6.2-10.3 9.4-22 9.4-34l0-4.9C336 59.4 308.6 32 274.7 32c-16.2 0-31.8 6.5-43.3 17.9l-1.2 1.2c-3.4 3.4-9 3.4-12.4 0l-1.2-1.2z"]},Mn={prefix:"fas",iconName:"reply",icon:[512,512,[61714,"mail-reply"],"f3e5","M205 34.8c11.5 5.1 19 16.6 19 29.2l0 64 112 0c97.2 0 176 78.8 176 176c0 113.3-81.5 163.9-100.2 174.1c-2.5 1.4-5.3 1.9-8.1 1.9c-10.9 0-19.7-8.9-19.7-19.7c0-7.5 4.3-14.4 9.8-19.5c9.4-8.8 22.2-26.4 22.2-56.7c0-53-43-96-96-96l-96 0 0 64c0 12.6-7.4 24.1-19 29.2s-25 3-34.4-5.4l-160-144C3.9 225.7 0 217.1 0 208s3.9-17.7 10.6-23.8l160-144c9.4-8.5 22.9-10.6 34.4-5.4z"]},Ln=Mn,Cn={prefix:"fas",iconName:"star-and-crescent",icon:[512,512,[9770],"f699","M0 256C0 114.6 114.6 0 256 0c33 0 64.6 6.3 93.6 17.7c7.4 2.9 11.5 10.7 9.8 18.4s-8.


=107.67%, доходность=-1.31%, дюрация=0 мес.

Строка 72 из 2245: Россельхозбанк (АО) БО-13 (RU000A0JUW31): цена=100.5%, доходность=-2.99%, дюрация=0.53 мес.

Строка 73 из 2245: Россельхозбанк (АО) БО-14 (RU000A0JUW72): цена=101.79%, доходность=-22.42%, дюрация=0.63 мес.

Строка 74 из 2245: ТрансФин-М ПАО БО-37 (RU000A0JUZZ7): цена=109.89%, доходность=0.94%, дюрация=0 мес.

Строка 75 из 2245: Альфа-Банк АО обл. БО-15 (RU000A0JV0U1): цена=97.49%, доходность=13.13%, дюрация=8.1 мес.

Поиск оборота. Ссылка: https://iss.moex.com/iss/history/engines/stock/markets/bonds/boards/TQCB/securities/RU000A0JV0U1.json?iss.meta=off&iss.only=history&history.columns=SECID,TRADEDATE,VOLUME,NUMTRADES&limit=20&from=2023-08-28.

Поиск оборота. На 1-й день (2023-08-28) из 11 оборот по бумаге RU000A0JV0U1 меньше чем 1500: 1 шт.

Поиск оборота. На 2-й день (2023-08-29) из 11 оборот по бумаге RU000A0JV0U1 меньше чем 1500: 0 шт.

Поиск оборота. На 3-й день (2023-08-30) из 11 оборот по бумаге RU000A0JV0U1 меньше чем 1500: 0 шт.

Поиск оборота. На 4-й день (2023-08-31) из 11 оборот по бумаге RU000A0JV0U1 меньше чем 1500: 18 шт.

Поиск оборота. На 5-й день (2023-09-01) из 11 оборот по бумаге RU000A0JV0U1 меньше чем 1500: 4 шт.

Поиск оборота. На 6-й день (2023-09-04) из 11 оборот по бумаге RU000A0JV0U1 меньше чем 1500: 0 шт.

Поиск оборота. На 7-й день (2023-09-05) из 11 оборот по бумаге RU000A0JV0U1 меньше чем 1500: 0 шт.

Поиск оборота. На 8-й день (2023-09-06) из 11 оборот по бумаге RU000A0JV0U1 меньше чем 1500: 31 шт.

Поиск оборот


import java.util.*
import java.util.concurrent.ConcurrentHashMap
import kotlin.collections.HashMap

private const val FIELD_VIEW_NAME_PREFIX = "___view_"
private const val DEFAULT_LAYOUT_TYPE = "layout"
private val ANDROID_LAYOUT_QNAME = groovy.xml.QName(Constants.ANDROID_NAME_SPACE_URI, Constants.ATTR_NAME_LAYOUT, Constants.ATTR_PREFIX_ANDROID)

interface CreateGenAndCache: CreateView, CreateClassFile {

    /**
     * 生成gen的内容与结果
     * @param finalGenCacheInfoMap <layoutName, ClassGenInfo>: layout的生成信息
     * @param layoutInfoMap: layout信息
     * @param unGenLayoutNameList: 未处理的layout信息
     * @param genClassCacheInfoList: 已处理的信息
     *
     * @return 未解决的layoutName
     */
     fun createGenContentAndGenInfoResult(isAndroidx: Boolean, finalGenCacheInfoMap: ConcurrentHashMap<String, ClassGenCacheInfo>
                                          , layoutInfoMap: HashMap<String, HashMap<String, LayoutFileInfo>>
                                          , unGenLayoutNameList: List<String>
                                          , genClassCacheInfoList: MutableList<ClassGenCacheInfo>
                                          , waitableExecutor: WaitableExecutor, layoutGenStateMap: ConcurrentHashMap<String, Boolean>
                                          , genClassInfoCacheDir: File, packageName: String, gson: Gson
                                          , finalGenResultMap: ConcurrentHashMap<String, HashMap<String, ViewGenResultInfo>>
                                          , qxmlExtension: QxmlConfigExtension
                                          , transformConfig: TransformConfig
                                          , attrMethodValueMatcher: AttrMethodValueMatcher
                                          , viewGenInfoHolder: ViewGenInfoHolderImpl
                                          , compatViewInfoMap: Map<String, CompatViewInfoModel>
                                          , styleInfoMap: Map<String, Map<String, StyleInfo>>
                                          , layoutTypeInfoMap: Map<String, Map<String, String>>
                                          , idMap: Map<String, Int>
    ): MutableList<String> {

        val includeReferenceLayoutNameMap = ConcurrentHashMap<String, String>()
        val waitToGenLayoutNameList = Collections.synchronizedList(mutableListOf<String>())
        unGenLayoutNameList.forEach xmlLoopContinue@{ layoutName ->
            layoutInfoMap[layoutName]?.let { layoutFileInfoMap ->
                val layoutFileInfoList = mutableListOf<LayoutFileInfo>()
                layoutFileInfoMap.forEach { (_, layoutFileInfo) ->
                    layoutFileInfoList.add(layoutFileInfo)
                }
                layoutFileInfoList.sort()
                val layoutClassCacheDir = genClassInfoCacheDir.resolve(layoutName)

                val cacheFileName = getGenClassCacheFileName("${layoutName}${makeQxmlConfigVerifyKey(qxmlExtension, transformConfig)}")
                val cacheInfoFile = layoutClassCacheDir.resolve(cacheFileName)
                val className = makeGenClassName(layoutName)
                val cacheClassFile = layoutClassCacheDir.resolve(className.replace(".", File.separator) + SdkConstants.DOT_CLASS)

                //waitableExecutor.execute {
                run execute@{
                    val parser = getXmlParser()
                    var viewIndex = 0

                    val getViewFieldNameFun = {
                        "$FIELD_VIEW_NAME_PREFIX${viewIndex++}"
                    }

                    //不能转换成代码的layout版本
                    val failedLayoutTypeGenInfoList = mutableListOf<LayoutTypeGenInfo>()
                    //能够转换成代码的layout版本
                    val successLayoutTypeGenInfoList = mutableListOf<LayoutTypeGenInfo>()
                    val genTypeInfoMap = hashMapOf<String, CodeBlock.Builder>()
                    //已经用到的gen信息
                    val usedGenInfoMap = hashMapOf<String, HashMap<String, AttrFuncInfoModel>>()
                    //已经用到的onEnd信息
                    val usedOnEndInfoMap = hashMapOf<String, HashMap<String, AttrFuncInfoModel>>()
                    //没有对应实现的attr
                    val usedStyleInfoMap = hashMapOf<String, HashMap<String, StyleInfo>>()
                    //没有对应实现的attr
                    val invalidGenInfoMap = hashMapOf<String, HashM


',
    THREE_OF_A_KIND = 'threeOfAKind',
    TWO_PAIR = 'twoPair',
    ONE_PAIR = 'onePair',
    HIGH_CARD = 'highCard',
    NULL = '',
    FOLD = 'fold',
}

/**
 * 牌型描述
 *
 * @export
 * @type {{ [type: string]: string }}
 */
export const CardTypeStr: { [type: string]: string } = {
    [CardType.ROYAL_STRAIGHT_FLUSH]: '로티플',
    [CardType.STRAIGHT_FLUSH]: '스티플',
    [CardType.FOUR_OF_A_KIND]: '포카드',
    [CardType.FULL_HOUSE]: '풀하우스',
    [CardType.FLUSH]: '플러쉬',
    [CardType.STRAIGHT]: '스트레이트',
    [CardType.THREE_OF_A_KIND]: '트리플',
    [CardType.TWO_PAIR]: '투페어',
    [CardType.ONE_PAIR]: '원페어',
    [CardType.HIGH_CARD]: '하이',
    [CardType.NULL]: '',
    [CardType.FOLD]: '폴드',
};

/**
 * 牌型编号
 *
 * @export
 * @type {{ [type: string]: number }}
 */
export const CardTypeNo: { [type: string]: number } = {
    [CardType.ROYAL_STRAIGHT_FLUSH]: 0,
    [CardType.STRAIGHT_FLUSH]: 1,
    [CardType.FOUR_OF_A_KIND]: 2,
    [CardType.FULL_HOUSE]: 3,
    [CardType.FLUSH]: 4,
    [CardType.STRAIGHT]: 5,
    [CardType.THREE_OF_A_KIND]: 6,
    [CardType.TWO_PAIR]: 7,
    [CardType.ONE_PAIR]: 8,
    [CardType.HIGH_CARD]: 9,
    [CardType.NULL]: 10,
    [CardType.FOLD]: 11,
};

/**
 * 阶段
 *
 * @export
 * @enum {string}
 */
export enum TexasRound {
    PRE_FLOP = 'preFlop',
    FLOP = 'flop',
    TURN = 'turn',
    RIVER = 'river',
    SHOW = 'show',
}

/**
 * 特殊手牌牌型
 *
 * @export
 * @type {string[]}
 */
export const SPECIAL_CARD_TYPE: string[] = [
    'AA',
    'KK',
    'AK',
    'QQ',
    'JJ',
    '1010',
    '99',
    '88',
    '77',
    '66',
    '55',
    '44',
    '33',
    '22',
];

/**
 * 消息类型
 *
 * @export
 * @enum {string}
 */
export enum MessageType {
    TEXT = 'text',
    AUDIO = 'audio',
    EMOJI = 'emoji',
    ANIMATION = 'animation',
    SYSTEM = 'system',
}

/**
 * 充值、提现审核状态
 *
 * @export
 * @enum {number}
 */
export enum RechargeReview {
    UNPROCESSED = 0,
    DENY = 1,
    ALLOW = 2,
}

/**
 * 流水环境
 *
 * @export
 * @enum {string}
 */
export enum MoneyLogWhere {
    RECHARGE = 'recharge',
    CASH = 'cash',
    EXCHANGE = 'exchange',
    BUY_DIAMOND = 'buyDiamond',
    USE_DIAMOND = 'useDiamond',
    BUY_IN = 'buyIn',
    SETTLEMENT = 'settlement',
    TABLE_OVER = 'tableOver',
    ADMIN = 'admin',
}

/**
 * 货币类型
 *
 *


erColor"]
  GETIMPORT R5 K156 [Color3.fromRGB]
  LOADN R6 0
  LOADN R7 162
  LOADN R8 255
  CALL R5 3 1
  SETTABLEKS R5 R4 K161 ["buttonSelectedColor"]
  GETIMPORT R5 K156 [Color3.fromRGB]
  LOADN R6 117
  LOADN R7 117
  LOADN R8 117
  CALL R5 3 1
  SETTABLEKS R5 R4 K162 ["buttonDefaultColor"]
  GETUPVAL R6 1
  GETTABLEKS R5 R6 K18 ["MainText"]
  SETTABLEKS R5 R4 K8 ["textColor"]
  GETUPVAL R6 1
  GETTABLEKS R5 R6 K17 ["DimmedText"]
  SETTABLEKS R5 R4 K163 ["dimmedTextColor"]
  GETUPVAL R6 1
  GETTABLEKS R5 R6 K15 ["ErrorText"]
  SETTABLEKS R5 R4 K5 ["errorColor"]
  SETTABLEKS R4 R3 K165 ["versions"]
  DUPTABLE R4 K173 [{"nameMinWidth", "nameTextSize", "placeholderIconColor", "previewBackgroundColor", "previewSize", "warningColor", "validationIconSize", "validationStyles"}]
  LOADN R5 200
  SETTABLEKS R5 R4 K166 ["nameMinWidth"]
  LOADN R5 20
  SETTABLEKS R5 R4 K167 ["nameTextSize"]
  GETUPVAL R6 1
  GETTABLEKS R5 R6 K17 ["DimmedText"]
  SETTABLEKS R5 R4 K168 ["placeholderIconColor"]
  GETUPVAL R6 1
  GETTABLEKS R5 R6 K174 ["SubBackground"]
  SETTABLEKS R5 R4 K169 ["previewBackgroundColor"]
  LOADN R5 60
  SETTABLEKS R5 R4 K170 ["previewSize"]
  GETUPVAL R6 1
  GETTABLEKS R5 R6 K16 ["WarningText"]
  SETTABLEKS R5 R4 K6 ["warningColor"]
  LOADN R5 14
  SETTABLEKS R5 R4 K171 ["validationIconSize"]
  DUPTABLE R5 K177 [{"error", "pending", "success"}]
  DUPTABLE R6 K179 [{"iconColor", "textColor"}]
  GETUPVAL R8 1
  GETTABLEKS R7 R8 K147 ["TextError"]
  SETTABLEKS R7 R6 K178 ["iconColor"]
  GETUPVAL R8 1
  GETTABLEKS R7 R8 K147 ["TextError"]
  SETTABLEKS R7 R6 K8 ["textColor"]
  SETTABLEKS R6 R5 K84 ["error"]
  DUPTABLE R6 K179 [{"iconColor", "textColor"}]
  GETUPVAL R8 1
  GETTABLEKS R7 R8 K17 ["DimmedText"]
  SETTABLEKS R7 R6 K178 ["iconColor"]
  GETUPVAL R8 1
  GETTABLEKS R7 R8 K17 ["DimmedText"]
  SETTABLEKS R7 R6 K8 ["textColor"]
  SETTABLEKS R6 R5 K175 ["pending"]
  DUPTABLE R6 K179 [{"iconColor", "textColor"}]
  GETUPVAL R8 1
  GETTABLEKS R7 R8 K146 ["TextSuccess"]
  SETTABLEKS R7 R6 K178 ["iconColor"]
  GETUPVAL R8 1
  GETTABLEKS R7 R8 K17 ["DimmedText"]
  SETTABLEKS R7 R6 K8 ["textColor"]
  SETTABLEKS R6 R5 K176 ["success"]
  SETTABLEKS R5 R4 K172 ["validationStyles"]
  SETTABLEKS R4 R3 K180 ["ugcBundleValidation"]
  GETUPVAL R5 3
  GETTABLEKS R4 R5 K1 ["Button"]
  GETUPVAL R7 4
  GETTABLEKS R6 R7 K181 ["Dictionary"]
  GETTABLEKS R5 R6 K182 ["join"]
  MOVE R6 R1
  NEWTABLE R7 1 0
  DUPTABLE R8 K184 [{"BackgroundStyle"}]
  GETUPVAL R11 4


="rtn4p"],
div[id^="smi2adblock_"],
div[id^="smi_teaser_"],
div[id^="tizerws_"],
div[id^="traffim-widget"],
div[id^="trafmag_"],
div[id^="vk_ads_"],
div[id^="yandex_rtb"],
div[id^="zcbclk"],
div[style*="am15.net/img/player_skins"],
div[style*="box-shadow: rgb(136, 136, 136) 0px 0px 12px; color: "],
div[style="width: 252px; height: 450px; position: fixed; right: 0px; top: 0px; overflow: hidden; z-index: 10000;"],
iframe[data-src*="fwdcdn.com/frame/partners/"],
iframe[id^="marketgid_"],
iframe[id^="republer"],
iframe[src*="//kwork.ru/api/widget/"],
iframe[src*="//refpakglscpj."],
iframe[src*="//sass.com.ua/"],
iframe[src*="/3647.tech"],
iframe[src*="/adnetpartner.com"],
iframe[src*="/carta.ua/ajax/widget."],
iframe[src*="/mixadv_"],
iframe[src*="/uniontraff.com"],
iframe[src*="://ab.adpro.com.ua/"],
iframe[src*="://goodgame.ru/html/embed-player/dist/index.html?partner="],
iframe[src*="://mark-media.com.ua"],
iframe[src*="://match-center.playmaker24.ru/"],
iframe[src*="://partner-widget.vse-sdal.com/"],
iframe[src*="://partner-widget.vsesdal.com/"],
iframe[src*="://promo-bc.com/"],
iframe[src*="://rstbtmd.com/"],
iframe[src*="://vidroll.ru/"],
iframe[src*="ads.exosrv.com"],
iframe[src*="bongacams.com"],
iframe[src*="directadvert"],
iframe[src*="fwdcdn.com/frame/partners/"],
iframe[src*="giraff.io/"],
iframe[src*="hd.gg33.top/"],
iframe[src*="laim.tv/rotator/"],
iframe[src*="litres.ru/static/widgets"],
iframe[src*="steambets.net/"],
iframe[src*="traffic-media.co"],
iframe[src*="trafic-media.ru"],
iframe[src*="tureckiy-serial.ru/"][src$=".php"],
iframe[src*="utraff.com"],
iframe[src*="zhitomir.info/price"],
iframe[src^="https://a.adtng.com/"],
iframe[title="mixAd"],
iframe[width="240"][height="400"],
img[src*="://cp.beget.com/promo_data/"],
img[width="120"][height="600"],
img[width="160"][height="600"],
img[width="468"][height="60"],
img[width="728"][height="90"],
noindex a[href^="http://www.westmister.eu/collection/"], noindex a[href^="http://www.westmister.eu/collection/"] ~ *,
object[data*="ads.com/clk.swf"],
object[data^="blob"],
thetruestory-widget-top {
    display: none !important;
}
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none}.cke


# Copyright (C) 2018-2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import paddle
import numpy as np
import sys
import os

from save_model import saveModel

if paddle.__version__ >= '2.6.0':
    import paddle.base as fluid
else:
    from paddle import fluid

def create_multi_output_model():
    paddle.enable_static()

    # paddle model creation and inference
    num_splits = 20
    inp_blob_1 = np.random.randn(2, num_splits, 4, 4).astype(np.float32)

    if paddle.__version__ >= '2.0.0':
        x = paddle.static.data(name='x', shape=[2, num_splits, 4, 4], dtype='float32')
        test_layer = paddle.split(x, num_or_sections=num_splits, axis=1)
    else:
        x = fluid.data(name='x', shape=[2, num_splits, 4, 4], dtype='float32')
        test_layer = paddle.split(x, num_or_sections=num_splits, axis=1)

    var = []
    for i in range(num_splits//2):
        if paddle.__version__ >= '2.0.0':
            add = paddle.add(test_layer[2*i], test_layer[2*i+1])
        else:
            add = fluid.layers.elementwise_add(test_layer[2*i], test_layer[2*i+1])
        var.append(add)

    exe = fluid.Executor(fluid.CPUPlace())
    exe.run(fluid.default_startup_program())
    inp_dict = {'x': inp_blob_1}
    res_paddle = exe.run(fluid.default_main_program(), fetch_list=var, feed=inp_dict)

    saveModel("multi_tensor_split", exe, feed_vars=[x], fetchlist=var, inputs=[inp_blob_1], outputs=res_paddle, target_dir=sys.argv[1])

create_multi_output_model()


 NORM_IGNOREWIDTH = 0x00000008,      //Ignore string width.
        NORM_IGNOREKANATYPE = 0x00000040,   //Ignore Kana type.
        NORM_IGNOREKASHIDA = 0x00040000     //Ignore Arabic kashida characters.
    }

    public enum VariantComparisonResults : int
    {
        VARCMP_LT = 0,      //pvarLeft is less than pvarRight.
        VARCMP_EQ = 1,      //The parameters are equal.
        VARCMP_GT = 2,      //pvarLeft is greater than pvarRight.
        VARCMP_NULL = 3     //Either expression is NULL.
    }

    public static class HResult
    {
        internal static bool Succeeded(int hr) => hr >= 0;
        internal static bool Failed(int hr) => hr < 0;
    }

    internal static class VariantNativeMethods
    {
        private const string dllName = "oleaut32.dll";

        // HRESULT VariantChangeType(
        //   VARIANTARG       *pvargDest,
        //   const VARIANTARG *pvarSrc,
        //   USHORT           wFlags,
        //   VARTYPE          vt
        // );
        [DllImport(dllName, EntryPoint = "VariantChangeType", CharSet = CharSet.Auto, SetLastError = true, PreserveSig = true)]
        internal static extern int VariantChangeType(ref object pvargDest, ref object pvarSrc, VariantConversionFlags wFlags, VARENUM vt);

        // HRESULT VariantChangeTypeEx(
        //   VARIANTARG        *pvargDest,
        //   const VARIANTARG  *pvarSrc,
        //   LCID              lcid,
        //   USHORT            wFlags,
        //   VARTYPE           vt
        // );
        [DllImport(dllName, EntryPoint = "VariantChangeTypeEx", CharSet = CharSet.Auto, SetLastError = true, PreserveSig = true)]
        internal static extern int VariantChangeTypeEx(ref object pvargDest, ref object pvarSrc, int lcid, VariantConversionFlags wFlags, VARENUM vt);

        // HRESULT VarCmp(
        //   LPVARIANT pvarLeft,
        //   LPVARIANT pvarRight,
        //   LCID lcid,
        //   ULONG dwFlags
        // );
        [DllImport(dllName, EntryPoint = "VarCmp", CharSet = CharSet.Auto, SetLastError = true, PreserveSig = true)]
        internal static extern int VarCmp(ref object pvarLeft, ref object pvarRight, int lcid, ulong dwFlags);
    }
}


FROM %s.desc", kw)
		_, err = p.ParseOneStmt(src, "", "")
		require.NoErrorf(t, err, "source %s", src)

		src = fmt.Sprintf("SELECT t.%s FROM t", kw)
		_, err = p.ParseOneStmt(src, "", "")
		require.NoErrorf(t, err, "source %s", src)
	}

	// Testcase for unreserved keywords
	unreservedKws := []string{
		"add_columnar_replica_on_demand", "auto_increment", "after", "begin", "bit", "bool", "boolean", "charset", "columns", "commit",
		"date", "datediff", "datetime", "deallocate", "do", "from_days", "end", "engine", "engines", "execute", "extended", "first", "file", "full",
		"local", "names", "offset", "password", "prepare", "quick", "rollback", "savepoint", "session", "signed",
		"start", "global", "tables", "tablespace", "target", "text", "time", "timestamp", "tidb", "transaction", "truncate", "unknown",
		"value", "warnings", "year", "now", "substr", "subpartition", "subpartitions", "substring", "mode", "any", "some", "user", "identified",
		"collation", "comment", "avg_row_length", "checksum", "compression", "connection", "key_block_size",
		"max_rows", "min_rows", "national", "quarter", "escape", "grants", "status", "fields", "triggers", "language",
		"delay_key_write", "isolation", "partitions", "repeatable", "committed", "uncommitted", "only", "serializable", "level",
		"curtime", "variables", "dayname", "version", "btree", "hash", "row_format", "dynamic", "fixed", "compressed",
		"compact", "redundant", "1 sql_no_cache", "1 sql_cache", "action", "round",
		"enable", "disable", "reverse", "space", "privileges", "get_lock", "release_lock", "sleep", "no", "greatest", "least",
		"binlog", "hex", "unhex", "function", "indexes", "from_unixtime", "processlist", "events", "less", "than", "timediff",
		"ln", "log", "log2", "log10", "timestampdiff", "pi", "proxy", "quote", "none", "super", "shared", "exclusive",
		"always", "stats", "stats_meta", "stats_histogram", "stats_buckets", "stats_healthy", "tidb_version", "replication", "slave", "client",
		"max_connections_per_hour", "max_queries_per_hour", "max_updates_per_hour", "max_user_connections", "event", "reload", "routine", "temporary",
		"following", "preceding", "unbounded", "respect", "nulls", "current", "last", "against", "expansion",
		"chain", "error", "general", "nvarchar", "pack_keys", "p", "shard_row_id_bits", "pre_split_regions",
		"constraints", "role", "replicas", "policy", "s3", "strict", "running", "stop", "preserve", "placement", "attributes", "attribute", "resource",
		"burstable", "calibrate", "rollup",
	}
	for _, kw := range unreservedKws {
		src := fmt.Sprintf("SELECT %s FROM tbl;", kw)
		_, err := p.ParseOneStmt(src, "", "")
		require.NoErrorf(t, err, "source %s", src)
	}

	// Testcase for prepared statement
	src := "SELECT id+?, id+? from t;"
	_, err := p.ParseOneStmt(src, "", "")
	require.NoError


= "dvja",
    ["㙬"] = "ejjg",
    ["㝙"] = "wnhb",
    ["㞤"] = "vjr",
    ["㡥"] = "ryuh",
    ["㣧"] = "wiva",
    ["㥯"] = "yubh",
    ["㥼"] = "hfsc",
    ["㦩"] = "htyh",
    ["㧈"] = "ubg",
    ["㧢"] = "urmd",
    ["㪦"] = "wfdh",
    ["㱃"] = "jaye",
    ["㴈"] = "ktfv",
    ["㶏"] = "ktyh",
    ["㸒"] = "ytgs",
    ["㹜"] = "mmq",
    ["㹞"] = "mtj",
    ["㼉"] = "ywpe",
    ["㾙"] = "abnr",
    ["䄄"] = "frmd",
    ["䇙"] = "rbgs",
    ["䌥"] = "iyuh",
    ["䒡"] = "lbgs",
    ["䓄"] = "lmtj",
    ["䕃"] = "ltjp",
    ["䖜"] = "zzor",
    ["䚿"] = "seq",
    ["䡛"] = "yyc",
    ["䤃"] = "yxy",
    ["䤺"] = "zmtj",
    ["䨸"] = "ttyh",
    ["䪩"] = "xjae",
    ["噖"] = "dnna",
    ["噾"] = "dexy",
    ["圁"] = "rsy",
    ["垽"] = "ktgt",
    ["婣"] = "baaf",
    ["崯"] = "vzj",
    ["憖"] = "ejjh",
    ["懚"] = "hyuh",
    ["斦"] = "ttj",
    ["朄"] = "ogxh",
    ["栶"] = "ermd",
    ["檭"] = "ezig",
    ["檼"] = "eyuh",
    ["櫽"] = "tyue",
    ["猌"] = "ejjm",
    ["璌"] = "nwfh",
    ["癊"] = "atjb",
    ["磤"] = "mzrs",
    ["秵"] = "xrmd",
    ["筃"] = "rrmd",
    ["粌"] = "pbgs",
    ["荶"] = "ldja",
    ["蒑"] = "lzrs",
    ["蔩"] = "lwfh",
    ["蘟"] = "ltyh",
    ["訔"] = "vsy",
    ["讔"] = "styh",
    ["赺"] = "pjae",
    ["趛"] = "pzj",
    ["阥"] = "tks",
    ["霠"] = "tija",
    ["靷"] = "tbgs",
    ["鞇"] = "trmd",
    ["鮣"] = "wbfz",
    ["鷣"] = "vonx",
    ["齗"] = "ltj",
    ["𠃊"] = "aee",
    ["𠖟"] = "wvfp",
    ["𠽨"] = "dwxy",
    ["𡇂"] = "rch",
    ["𡈲"] = "rmrm",
    ["𡋪"] = "ymrg",
    ["𡐔"] = "gwfh",
    ["𡓓"] = "pjpg",
    ["𡓿"] = "dddg",
    ["𡖣"] = "llrn",
    ["𡩘"] = "wxy",


 );

	for( i = 0; i < numListedClipModels && numObstacles < MAX_OBSTACLES; i++ )
	{
		clipModel = clipModelList[i];
		obEnt = clipModel->GetEntity();

		if( !clipModel->IsTraceModel() )
		{
			continue;
		}

		if( obEnt->IsType( idActor::Type ) )
		{
			obPhys = obEnt->GetPhysics();
			// ignore myself, my enemy, and dead bodies
			if( ( obPhys == physics ) || ( obEnt == ignore ) || ( obEnt->health <= 0 ) )
			{
				continue;
			}
			// if the actor is moving
			idVec3 v1 = obPhys->GetLinearVelocity();
			if( v1.LengthSqr() > Square( 10.0f ) )
			{
				idVec3 v2 = physics->GetLinearVelocity();
				if( v2.LengthSqr() > Square( 10.0f ) )
				{
					// if moving in about the same direction
					if( v1 * v2 > 0.0f )
					{
						continue;
					}
				}
			}
		}
		else if( obEnt->IsType( idMoveable::Type ) )
		{
			// moveables are considered obstacles
		}
		else
		{
			// ignore everything else
			continue;
		}

		// check if we can step over the object
		clipModel->GetAbsBounds().AxisProjection( -physics->GetGravityNormal(), min, max );
		if( max < stepHeight || min > headHeight )
		{
			// can step over this one
			continue;
		}

		// project a box containing the obstacle onto the floor plane
		box = idBox( clipModel->GetBounds(), clipModel->GetOrigin(), clipModel->GetAxis() );
		numVerts = box.GetParallelProjectionSilhouetteVerts( physics->GetGravityNormal(), silVerts );

		// create a 2D winding for the obstacle;
		obstacle_t& obstacle = obstacles[numObstacles++];
		obstacle.winding.Clear();
		for( j = 0; j < numVerts; j++ )
		{
			obstacle.winding.AddPoint( silVerts[j].ToVec2() );
		}

		if( ai_showObstacleAvoidance.GetBool() )
		{
			for( j = 0; j < numVerts; j++ )
			{
				silVerts[j].z = startPos.z;
			}
			for( j = 0; j < numVerts; j++ )
			{
				gameRenderWorld->DebugArrow( colorWhite, silVerts[j], silVerts[( j + 1 ) % numVerts], 4 );
			}
		}

		// expand the 2D winding for collision with a 2D box
		obstacle.winding.ExpandForAxialBox( expBounds );
		obstacle.winding.GetBounds( obstacle.bounds );
		obstacle.entity = obEnt;
	}

	// if there are no dynamic obstacles the path should be through valid AAS space
	if( numObstacles == 0 )
	{
		return 0;
	}

	// if the current path doesn't intersect any dynamic obstacles the path should be through valid AAS space
	if( PointInsideObstacle( obstacles, numObstacles, startPos.ToVec2() ) == -1 )
	{
		if( !GetFirstBlockingObstacle( obstacles, numObstacles, -1, startPos.ToVec2(), seekDelta.ToVec2(), blockingScale, blockingObstacle, blockingEdgeNum ) )
		{
			return 0;
		}
	}

	// create obstacles for AAS walls
	if( aas )
	{
		float halfBoundsSize = ( expBounds[ 1 ].x - expBounds[ 0 ].x ) * 0.5f;

		numWallEdges = aas->GetWallEdges( areaNum, clipBounds, TFL_WALK, wallEdges,


//////////////////////////////////////////////////////
//
// Projet TFTPD32.  April 2007 Ph.jounin
//                  A free TFTP server for Windows
// File console_action.c: reply to complex GUI request
//      All procedures are handled by console thread
//
// source released under European Union Public License
//
//////////////////////////////////////////////////////

#include "headers.h"
#include "threading.h"
#include <stdlib.h>

static struct S_DirectoryContent Dir;

int SendDirectoryContentCbk (char *sz_line_descr, DWORD dummy)
{
   if (Dir.nb < SizeOfTab (Dir.ent))
   {
        lstrcpyn (Dir.ent[Dir.nb++].file_descr, sz_line_descr, sizeof Dir.ent[Dir.nb++].file_descr - 1);
   }
return TRUE;
} // SendDirectoryContentCbk

// Copy directory content into a S_DirectoryContent Structure
void SendDirectoryContent (void)
{
    memset (&Dir, 0, sizeof Dir);
    ScanDir (SendDirectoryContentCbk, 0, sSettings.szWorkingDirectory);
    SendMsgRequest  ( C_REPLY_DIRECTORY_CONTENT,
                    & Dir,
                      Dir.nb * sizeof Dir.ent[0] + offsetof (struct S_DirectoryContent, ent),
                      FALSE,
                      FALSE );
} // SendDirectoryContent


Indices(i1, i3, i4)
    }

    override fun UiScope.compose() = Box {
        modifier
            .width(Grow.Std)
            .height(sizes.largeGap * 1.25f)
            .margin(start = sizes.gap)
            .padding(2.dp)
            .background(rpmRenderer)
    }
}package de.fabmax.kool.demo.physics.vehicle.ui

import de.fabmax.kool.demo.UiSizes
import de.fabmax.kool.math.MutableVec2f
import de.fabmax.kool.math.Vec2f
import de.fabmax.kool.math.clamp
import de.fabmax.kool.modules.ui2.*
import de.fabmax.kool.util.Color

class GMeter(val dashboard: Dashboard) : Composable {

    private val bgColor = Color.WHITE.withAlpha(0.2f)
    private val gridColor = Color.WHITE.withAlpha(0.1f)

    private val meterRenderer = UiRenderer {
        it.apply {
            val draw = getUiPrimitives()
            val r = innerWidthPx * 0.5f
            val center = Vec2f(widthPx * 0.5f, heightPx * 0.5f)
            val rDot = sizes.smallGap.px * 1.3f
            val rCircle = r - rDot

            // grid
            draw.localRect(center.x - 1.dp.px, center.y - rCircle, 2.dp.px, 2f * rCircle, gridColor)
            draw.localRect(center.x - rCircle, center.y - 1.dp.px, 2f * rCircle, 2.dp.px, gridColor)

            // background
            val rStep = rCircle * 0.333f
            var rSection = rCircle
            for (i in 1..3) {
                draw.localCircle(center.x, center.y, rSection, bgColor)
                rSection -= rStep
            }

            // dot
            val accX = (dashboard.lateralAcceleration.value / 15f).clamp(-1f, 1f)
            val accY = (dashboard.longitudinalAcceleration.value / 15f).clamp(-1f, 1f)
            val a = MutableVec2f(accX, accY)
            if (a.length() > 1f) {
                a.norm()
            }
            a.mul(rCircle).add(center)
            draw.localCircle(a.x, a.y, rDot, colors.primary)
        }
    }

    override fun UiScope.compose() = Box {
        dashboard.lateralAcceleration.use()
        dashboard.longitudinalAcceleration.use()
        modifier
            .height(UiSizes.baseSize * 3f)
            .width(UiSizes.baseSize * 3f)
            .alignY(AlignmentY.Center)
            .margin(start = sizes.largeGap)
            .background(meterRenderer)
    }
}package de.fabmax.kool.math

import kotlin.random.Random
import kotlin.test.Test

class Mat4Test {

    @Test
    fun mulTest() {
        val t1 = Mat4f(
            1f, 2f, 3f, 4f,
            5f, 6f, 7f, 8f,
            9f, 10f, 11f, 12f,
            13f, 14f, 15f, 16f
        )
        val t2 = Mat4f(
            1f, 5f, 9f


#pragma once
#include "CoreMinimal.h"
//CROSS-MODULE INCLUDE V2: -ModuleName=UMG -ObjectName=Widget -FallbackName=Widget
#include "Components/Widget.h"

#include "AkWwiseObjectDetails.h"
#include "OnItemDragDetectedDelegate.h"
#include "OnItemSelectionChangedDelegate.h"
#include "AkWwiseTree.generated.h"

UCLASS(Blueprintable, DefaultConfig, Config=Editor)
class AKAUDIO_API UAkWwiseTree : public UWidget {
    GENERATED_BODY()
public:
    UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
    FOnItemSelectionChanged OnSelectionChanged;

    UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
    FOnItemDragDetected OnItemDragged;

    UAkWwiseTree();

    UFUNCTION(BlueprintCallable, BlueprintCosmetic)
    void SetSearchText(const FString& NewText);

    UFUNCTION(BlueprintCallable, BlueprintCosmetic, BlueprintPure)
    FAkWwiseObjectDetails GetSelectedItem() const;

    UFUNCTION(BlueprintCallable, BlueprintCosmetic, BlueprintPure)
    FString GetSearchText() const;

};


 int order)
    // T __atomic_fetch_xor_N(T *mem, T val, int order)
    case AtomicExpr::AO__atomic_xor_fetch:
      PostOp = llvm::Instruction::Xor;
      LLVM_FALLTHROUGH;
    case AtomicExpr::AO__c11_atomic_fetch_xor:
    case AtomicExpr::AO__opencl_atomic_fetch_xor:
    case AtomicExpr::AO__atomic_fetch_xor:
      LibCallName = "__atomic_fetch_xor";
      AddDirectArgument(*this, Args, UseOptimizedLibcall, Val1.getPointer(),
                        MemTy, E->getExprLoc(), sizeChars);
      break;
    case AtomicExpr::AO__atomic_fetch_min:
    case AtomicExpr::AO__opencl_atomic_fetch_min:
      LibCallName = E->getValueType()->isSignedIntegerType()
                        ? "__atomic_fetch_min"
                        : "__atomic_fetch_umin";
      AddDirectArgument(*this, Args, UseOptimizedLibcall, Val1.getPointer(),
                        LoweredMemTy, E->getExprLoc(), sizeChars);
      break;
    case AtomicExpr::AO__atomic_fetch_max:
    case AtomicExpr::AO__opencl_atomic_fetch_max:
      LibCallName = E->getValueType()->isSignedIntegerType()
                        ? "__atomic_fetch_max"
                        : "__atomic_fetch_umax";
      AddDirectArgument(*this, Args, UseOptimizedLibcall, Val1.getPointer(),
                        LoweredMemTy, E->getExprLoc(), sizeChars);
      break;
    // T __atomic_nand_fetch_N(T *mem, T val, int order)
    // T __atomic_fetch_nand_N(T *mem, T val, int order)
    case AtomicExpr::AO__atomic_nand_fetch:
      PostOp = llvm::Instruction::And; // the NOT is special cased below
      LLVM_FALLTHROUGH;
    case AtomicExpr::AO__atomic_fetch_nand:
      LibCallName = "__atomic_fetch_nand";
      AddDirectArgument(*this, Args, UseOptimizedLibcall, Val1.getPointer(),
                        MemTy, E->getExprLoc(), sizeChars);
      break;
    }

    if (E->isOpenCL()) {
      LibCallName = std::string("__opencl") +
          StringRef(LibCallName).drop_front(1).str();

    }
    // Optimized functions have the size in their name.
    if (UseOptimizedLibcall)
      LibCallName += "_" + llvm::utostr(Size);
    // By default, assume we return a value of the atomic type.
    if (!HaveRetTy) {
      if (UseOptimizedLibcall) {
        // Value is returned directly.
        // The function returns an appropriately sized integer type.
        RetTy = getContext().getIntTypeForBitwidth(
            getContext().toBits(sizeChars), /*Signed=*/false);
      } else {
        // Value is returned through parameter before the order.
        RetTy = getContext().VoidTy;
        Args.add(RValue::get(EmitCastToVoidPtr(Dest.getPointer())),
                 getContext().VoidPtrTy);
      }
    }
    // order is always the last parameter
    Args.add(RValue::get(Order),
             getContext().IntTy);
    if (E->isOpenCL())
      Args.add(RValue::get(Scope), getContext().IntTy);

    // PostOp is only needed for the atomic_*_fetch operations, and
    // thus is only needed for and implemented in the
    // UseOptimizedLibcall codepath.
    assert(UseOptimizedLibcall || !PostOp);

    RValue Res = emitAtomicLibcall(*this, LibCallName, RetTy, Args);
    // The value is returned directly from the libcall.
    if (E->isCmpXChg())
      return Res;

    // The value is retu


目录的路径。相当于$mkdir命令

- rmdir(path)     **删除空的目录**，path为一个字符串，表示想要删除的目录的路径。相当于$rmdir命令

- listdir(path)     返回**目录中所有文件**。相当于$ls命令。

- remove(path)     **删除** path指向的文件。

- rename(src, dst)     **重命名**文件，src和dst为两个路径，分别表示重命名之前和之后的路径。

- chmod(path, mode)     改变path指向的文件的**权限**。相当于$chmod命令。

- chown(path, uid, gid)     改变path所指向文件的**拥有者**和**拥有组**。相当于$chown命令。

- stat(path)     查看path所指向文件的**附加信息**，相当于$ls -l命令。

- symlink(src, dst)     为文件dst创建**软链接**，src为软链接文件的路径。相当于$ln -s命令。

- getcwd()     查询当前工作路径 (cwd, current working directory)，相当于$pwd命令。

比如说我们要新建目录new：

```
import os
os.mkdir('/home/vamei/new')
```

###2、shutil包

- copy(src, dst)     **复制**文件，从src到dst。相当于$cp命令。

- move(src, dst)     **移动**文件，从src到dst。相当于$mv命令。

比如我们想复制文件a.txt:

```
import shutil
shutil.copy('a.txt', 'b.txt')
```

想深入细节，请参照官方文档[os](https://docs.python.org/2/library/os.html), [shutil](https://docs.python.org/2/library/shutil.html)。

结合本章以及之前的内容，我们把Python打造成一个文件管理的利器了。

##五、存储对象 (pickle包，cPickle包)

在之前对Python对象的介绍中，我提到过Python“一切皆对象”的哲学，在Python中，无论是变量还是函数，都是一个对象。当Python运行时，对象存储在内存中，随时等待系统的调用。然而，内存里的数据会随着计算机关机和消失，**如何将对象保存到文件**，并储存在硬盘上呢？

计算机的内存中存储的是二进制的序列 (当然，在Linux眼中，是文本流)。我们可以直接将某个对象所对应位置的数据抓取下来，转换成**文本流** (这个过程叫做serialize)，然后将文本流存入到文件中。由于Python在创建对象时，要**参考对象的类定义**，所以当我们从文本中读取对象时，必须在手边要有该对象的类定义，才能懂得如何去重建这一对象。从文件读取时，对于Python的内建(built-in)对象 (比如说整数、词典、表等等)，由于其类定义已经载入内存，所以不需要我们再在程序中定义类。但对于用户自行定义的对象，就**必须要先定义类**，然后才能从文件中载入对象 (比如面向对象的基本概念中的对象那个summer)。

###1、pickle包

对于上述过程，最常用的工具是Python中的pickle包。

####(1)、将内存中的对象**转换成为文本流**：

```


rpho.app.data

import com.morpho.butterfly.auth.UserRepository
import io.ktor.client.HttpClient
import io.ktor.client.engine.cio.CIO
import io.ktor.client.plugins.HttpTimeout
import io.ktor.client.plugins.cache.HttpCache
import io.ktor.client.plugins.defaultRequest
import io.ktor.client.plugins.logging.DEFAULT
import io.ktor.client.plugins.logging.LogLevel
import io.ktor.client.plugins.logging.Logger
import io.ktor.client.plugins.logging.Logging
import io.ktor.client.request.get
import io.ktor.client.request.parameter
import io.ktor.client.statement.bodyAsText
import io.ktor.http.URLProtocol
import io.ktor.http.isSuccess
import io.ktor.http.path
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.jsonArray
import kotlinx.serialization.json.jsonObject
import kotlinx.serialization.json.jsonPrimitive
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import org.lighthousegames.logging.logging

private const val TAG = "poll.blue"

const val POLL_BLUE_DOMAIN = "poll.blue"
const val POLL_BLUE_API_PATH = "api/poll"
const val POLL_BLUE_VOTE_PATH = "p"
const val POLL_BLUE_VOTE_PARAM = "v"

public typealias PollBlueId = String

@Serializable
public sealed interface PollBlueVote {
    @Serializable
    public data class Voted(val chosen: Int): PollBlueVote
    @Serializable
    public data object NotVoted: PollBlueVote
}

const val POLL_OPTION_CHARACTERS =  "[1⃣2⃣3⃣4⃣🅰🅱🅲🅳]"

fun stripPollOptionCharacters(string: String): String {
    return string.replace(POLL_OPTION_CHARACTERS.toRegex(), "")
}

class PollBlueService: KoinComponent {

    companion object {
        val log = logging()
        val serviceScope = CoroutineScope(SupervisorJob() + Dispatchers.Default)
    }

    val userService: UserRepository by inject()

    val pollBlueCache = mutableMapOf<PollBlueId, PollBlueVote>()
    val pollBlueResultsCache = mutableMapOf<PollBlueId, List<Pair<String, Int>>>()

    val pollBlueClient = HttpClient(CIO) {
        install(Logging) {
            logger = Logger.DEFAULT
            level = LogLevel.INFO
        }

        install(HttpCache) {
            //publicStorage(getPlatformCache())
        }

        defaultRequest {
            url{
                host = POLL_BLUE_DOMAIN
                protocol = URLProtocol.HTTPS
            }
        }

        install(HttpTimeout) {
            requestTimeoutMillis = Long.MAX_VALUE
        }

        expectSuccess = true
    }

    public fun lookupPollBlueVote(pollBlueId: PollBlueId): PollBlueVote {
        return pollBlueCache[pollBlueId] ?: PollBlueVote.NotVoted
    }
    public fun getCachedResults(pollBlueId: PollBlueId): List<Pair<String, Int>>? {
        return pollBlueResultsCache[pollBlueId]
    }

    public suspend fun getPollBlueResults(pollBlueId: PollBlueId): List<Pair<String, Int>> {
        runCatching {
            pollBlueClient.get {
                url {
                    path(POLL_BLUE_API_PATH, pollBlueId)
                }
            }
        }.onSuccess { response ->
            log.i { "Got poll blue results for $pollBlueId: $response" }
            log.i { response.bodyAsText() }
            val jsonResponse = Json.parseToJsonElement(response.bodyAsText())
            val results = jsonResponse


ylBorrowMoneyTicketStatusEnum.CHECKED_DELETED)},
            {value: BylBorrowMoneyTicketStatusEnum.COMFIRMED_DELETED, caption: this.getCaption(BylBorrowMoneyTicketStatusEnum.COMFIRMED_DELETED)}
        ];
    }
    static getSFSelectDataArray(): BylSFRadioData[] {
        return [
            {value: BylBorrowMoneyTicketStatusEnum.UNSUBMITED, label: this.getCaption(BylBorrowMoneyTicketStatusEnum.UNSUBMITED)},
            {value: BylBorrowMoneyTicketStatusEnum.SUBMITED, label: this.getCaption(BylBorrowMoneyTicketStatusEnum.SUBMITED)},
            {value: BylBorrowMoneyTicketStatusEnum.CHECKED, label: this.getCaption(BylBorrowMoneyTicketStatusEnum.CHECKED)},
            {value: BylBorrowMoneyTicketStatusEnum.CONFIRMED, label: this.getCaption(BylBorrowMoneyTicketStatusEnum.CONFIRMED)},
            {value: BylBorrowMoneyTicketStatusEnum.SETTLED, label: this.getCaption(BylBorrowMoneyTicketStatusEnum.SETTLED)},
            {value: BylBorrowMoneyTicketStatusEnum.DELETED, label: this.getCaption(BylBorrowMoneyTicketStatusEnum.DELETED)},
            {value: BylBorrowMoneyTicketStatusEnum.SUBMITED_DELETED, label: this.getCaption(BylBorrowMoneyTicketStatusEnum.SUBMITED_DELETED)},
            {value: BylBorrowMoneyTicketStatusEnum.CHECKED_DELETED, label: this.getCaption(BylBorrowMoneyTicketStatusEnum.CHECKED_DELETED)},
            {value: BylBorrowMoneyTicketStatusEnum.COMFIRMED_DELETED, label: this.getCaption(BylBorrowMoneyTicketStatusEnum.COMFIRMED_DELETED)}
        ];

    }
}
/* eslint-disable no-useless-constructor */
import * as yup from 'yup'

export interface IValidatorProvider {
  // eslint-disable-next-line @typescript-eslint/ban-types
  validate(schema: yup.ObjectSchema, params: object): Promise<object | object[]>
}

export class ValidatorProvider implements IValidatorProvider {
  private static instance: ValidatorProvider
  // eslint-disable-next-line no-useless-constructor
  // eslint-disable-next-line @typescript-eslint/no-empty-function
  private constructor () {}

  static getInstance = ():ValidatorProvider => {
    if (!ValidatorProvider.instance) ValidatorProvider.instance = new ValidatorProvider()
    return ValidatorProvider.instance
  }

  // eslint-disable-next-line @typescript-eslint/ban-types
  validate = async (schema: yup.ObjectSchema, params: object): Promise<object | object[]> => {
    try {
      const validatedParams = await schema.validate(params, {
        abortEarly: false,
        stripUnknown: true
      })
      if (!validatedParams) throw new Error('Invalid object')

      return validatedParams
    } catch ({ errors: errorsSchema }) {
      return errorsSchema
    }
  }
}
type alfanumerico = string | number; //Creando un tipo de variable

// string
let cadena: alfanumerico = "Hola Mundo"; //Permite solo esos dos tipos de datos
cadena = 'Hola';
//number
let num: number = 9;

//boolean
let verdadero: boolean = true;

//any
let cualquiera: any = "Hola";

//array
let lengaujes: Array<string> = ['Java', 'c']

console.log(cadena)import { newDispatcher } from './eventDispatcher';
import { DefinedAquireOptions, LOCK_ALREADY_AQUIRED, LOCK_RELEASED, LOCK_STOLEN_BY_HIGHER_PRIORITY, LOCK_TIMED_OUT


> get(kClass: KClass<T>): FieldValidator<T>? =
            validators[kClass] as FieldValidator<T>?
}

object DefaultStringValidator : FieldValidator<String> {
    override fun validate(input: String) = input.isNotEmpty()
}

object DefaultIntValidator : FieldValidator<Int> {
    override fun validate(input: Int) = input >= 0
}

fun main(args: Array<String>) {
    Validators.registerValidator(String::class, DefaultStringValidator)
    Validators.registerValidator(Int::class, DefaultIntValidator)

    println(Validators[String::class]?.validate("Kotlin"))
    println(Validators[Int::class]?.validate(42))
}/**
* Swagger Petstore
* This is a sample server Petstore server.  You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.server.apis

import com.google.gson.Gson
import io.ktor.application.call
import io.ktor.auth.UserIdPrincipal
import io.ktor.auth.authentication
import io.ktor.auth.authenticate
import io.ktor.auth.OAuthAccessTokenResponse
import io.ktor.auth.OAuthServerSettings
import io.ktor.http.ContentType
import io.ktor.http.HttpStatusCode
import io.ktor.locations.KtorExperimentalLocationsAPI
import io.ktor.locations.delete
import io.ktor.locations.get
import io.ktor.locations.post
import io.ktor.locations.put
import io.ktor.locations.patch
import io.ktor.response.respond
import io.ktor.response.respondText
import io.ktor.routing.Route
import io.ktor.routing.route

import io.swagger.server.Paths
import io.swagger.server.infrastructure.ApiPrincipal

import io.swagger.server.models.Order

@KtorExperimentalLocationsAPI
fun Route.StoreApi() {
    val gson = Gson()
    val empty = mutableMapOf<String, Any?>()
    delete<Paths.deleteOrder> {  _: Paths.deleteOrder ->
        call.respond(HttpStatusCode.NotImplemented)

    }
    get<Paths.getInventory> {  _: Paths.getInventory ->
        val principal = call.authentication.principal<ApiPrincipal>()

if (principal == null) {
    call.respond(HttpStatusCode.Unauthorized)
} else {
    val exampleContentType = "application/json"
    val exampleContentString = """{"empty": false}"""

    when(exampleContentType) {
        "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
        "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
        else -> call.respondText(exampleContentString)
    }
}

    }
    get<Paths.getOrderById> {  _: Paths.getOrderById ->
        val exampleContentType = "application/xml"
val exampleContentString = """<Order>
  <id>123456789</id>
  <petId>123456789</petId>
  <quantity>123</quantity>
  <shipDate>2000-01-23T04:56:07.000Z</shipDate>
  <status>aeiou</status>
  <complete>true</complete>
</Order>"""

when(exampleContentType) {
    "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
    "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
    else -> call.respon


execabs-test")
		if cmd.Err != nil {
			t.Fatalf("Command(%#q).Err = %v; want nil", "execabs-test", cmd.Err)
		}
	})

	t.Run(pathVar+"=$OTHER", func(t *testing.T) {
		// Control case: if the lookup returns ErrDot when PATH is empty, then we
		// know that PATH implicitly includes ".". If it does not, then we don't
		// expect to see ErrDot at all in this test (because the path will be
		// unambiguously absolute).
		wantErrDot := false
		t.Setenv(pathVar, "")
		if found, err := LookPath("execabs-test"); errors.Is(err, ErrDot) {
			wantErrDot = true
		} else if err == nil {
			t.Fatalf(`with PATH='', LookPath(%#q) = %#q; want non-nil error`, "execabs-test", found)
		}

		// Set PATH to include an explicit directory that contains a completely
		// independent executable that happens to have the same name as an
		// executable in ".". If "." is included implicitly, looking up the
		// (unqualified) executable name will return ErrDot; otherwise, the
		// executable in "." should have no effect and the lookup should
		// unambiguously resolve to the directory in PATH.

		dir := t.TempDir()
		executable := "execabs-test"
		if runtime.GOOS == "windows" {
			executable += ".exe"
		}
		if err := os.WriteFile(filepath.Join(dir, executable), []byte{1, 2, 3}, 0777); err != nil {
			t.Fatal(err)
		}
		t.Setenv(pathVar, dir+string(filepath.ListSeparator)+origPath)

		found, err := LookPath("execabs-test")
		if wantErrDot {
			wantFound := filepath.Join(".", executable)
			if found != wantFound || !errors.Is(err, ErrDot) {
				t.Fatalf(`LookPath(%#q) = %#q, %v, want %#q, Is ErrDot`, "execabs-test", found, err, wantFound)
			}
		} else {
			wantFound := filepath.Join(dir, executable)
			if found != wantFound || err != nil {
				t.Fatalf(`LookPath(%#q) = %#q, %v, want %#q, nil`, "execabs-test", found, err, wantFound)
			}
		}
	})

	checker := func(test string) func(t *testing.T) {
		return func(t *testing.T) {
			t.Helper()
			t.Logf("PATH=%s", os.Getenv("PATH"))
			p, err := LookPath(test)
			if err == nil {
				t.Errorf("%q: error expected, got nil", test)
			}
			if p != "" {
				t.Errorf("%q: path returned should be \"\". Got %q", test, p)
			}
		}
	}

	// Reference behavior for the next test
	t.Run(pathVar+"=$OTHER2", func(t *testing.T) {
		t.Run("empty", checker(""))
		t.Run("dot", checker("."))
		t.Run("dotdot1", checker("abc/.."))
		t.Run("dotdot2", checker(".."))
	})

	// Test the behavior when PATH contains an executable file which is not a directory
	t.Run(pathVar+"=exe", func(t *testing.T) {
		// Inject an executable file (not a directory) in PATH.
		// Use our own binary os.Args[0].
		t.Setenv(pathVar, testenv.Executable(t))
		t.Run("empty", checker(""))
		t.Run("dot", checker("."))
		t.Run("dotdot1", checker("abc/.."))
		t.Run("dotdot2", checker(".."))
	})

	// Test the behavior when PATH contains an executable file which is not a directory
	t.Run(pathVar+"=exe/xx", func(t *testing.T) {
		// Inject an executable file (not a directory) in PATH.
		// Use our own binary os.Args[0].
		t.Setenv(pathVar, filepath.Join(testenv.Executable(t), "xx"))
		t.Run("empty", checker(""))
		t.Run("dot", checker("."))
		t.Run("dotdot1", checker("abc/.."))
		t.Run


.75.75 0 014 16V8a.75.75 0 01.75-.75zm8.655-5.53a.75.75 0 010 1.06L12.185 4h4.065A3.75 3.75 0 0120 7.75v8.75a.75.75 0 01-1.5 0V7.75a2.25 2.25 0 00-2.25-2.25h-4.064l1.22 1.22a.75.75 0 01-1.061 1.06l-2.5-2.5a.75.75 0 010-1.06l2.5-2.5a.75.75 0 011.06 0z"/></svg>');mask-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M4.75 3a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 4.75a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zM4.75 17.5a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zm17.75-1.75a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM16 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0z"/><path fill-rule="evenodd" d="M4.75 7.25A.75.75 0 015.5 8v8A.75.75 0 014 16V8a.75.75 0 01.75-.75zm8.655-5.53a.75.75 0 010 1.06L12.185 4h4.065A3.75 3.75 0 0120 7.75v8.75a.75.75 0 01-1.5 0V7.75a2.25 2.25 0 00-2.25-2.25h-4.064l1.22 1.22a.75.75 0 01-1.061 1.06l-2.5-2.5a.75.75 0 010-1.06l2.5-2.5a.75.75 0 011.06 0z"/></svg>')}.md-typeset .magiclink-issue:not(.magiclink-ignore)::before{-webkit-mask-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 7a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm1 9a1 1 0 11-2 0 1 1 0 012 0z"/><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"/></svg>');mask-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 7a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm1 9a1 1 0 11-2 0 1 1 0 012 0z"/><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5


nly":"a. 超人(式)的,超人特有的",
"supermarine":"海上飞机",
"supermarines":"(supermarine 的复数) 海上飞机",
"supermarket":"n. 超级市场\\n[经] 超级市场, 自助售货商店",
"supermarket system":"[计] 超级市场系统",
"supermarketeer":"n. 经营超级市场的人(或公司)",
"supermarketer":"[网络] 超市",
"supermarketing":"n. 在超级市场购物",
"supermarkets":"n. 超级市场( supermarket的复数形式 )",
"supermart":"n. 超级市场",
"supermartingale":"上鞅",
"supermassive":"a. [天]特大质量的",
"supermatic":"高度[完全]自动化的",
"supermature":"[地质]超成熟的",
"supermax":"n. 超最大值；速伯玛公司（经销及出口胶乳手套的公司）",
"supermaxes":"(supermax 的复数) n. 超最大值；速伯玛公司（经销及出口胶乳手套的公司）",
"supermaxilla":"n. [解]上颌骨",
"supermaxillary":"a. supermaxilla的变形",
"supermedial":"[医] 中部上的",
"supermen":"n. 超人（superman的复数）",
"supermendur":"铁钴钒(磁性)合金材料",
"supermethylation":"超甲基化",
"Supermex":"[网络] 邹平首家篮球俱乐部",
"supermicro":"n. 超级微型（电子）计算机, 超级微型电脑",
"supermicro mill":"[化] 超微磨",
"supermicrocomputer":"[计] 超微型计算机",
"supermicrometer":"超级测微仪; 超级显微镜",
"supermicroplanktology":"超微浮游生物学",
"supermicroprocessor":"[计] 超微处理机",
"supermicroscope":"超级[大功率](电子)显微镜",
"supermicroscopic":"超显微镜的",
"supermini":"[电] 超级迷你电脑",
"superminiature":"[计] 超小型的",
"superminiature capacitor":"[计] 超小型电容",
"superminiature disk":"[计] 超小型磁盘",
"superminiaturization":"[计] 超小型化",
"superminicomputer":"[计] 超小型计算机",
"superminifloppy":"[计] 超小型的",
"superminifloppy disk":"[计] 超小型软盘",
"superminis":"超级小型（电子）计算机, 超级小型电脑( supermini的名词复数 )",
"supermiser":"超级节热器",
"supermode laser":"[电] 超模雷射",
"