K-128K)[a3][aka Foot and Mouth].z80"},{"path":"Games/[Z80]/Head Over Heels (1987)(Ocean)(48K-128K)[a4][aka Foot and Mouth].z80"},{"path":"Games/[TAP]/Head Over Heels (1987)(Ocean)(48K-128K)[h Nicolas Rodionov][aka Foot and Mouth].tap"},{"path":"Games/[TAP]/Head Over Heels (1987)(Ocean)(48K-128K)[h Studio Komputerowe D.H.Juventus][aka Foot and Mouth].tap"},{"path":"Games/[TAP]/Head Over Heels (1987)(Ocean)(48K-128K)[aka Foot and Mouth].tap"},{"path":"Games/[TAP]/Head Over Heels (1987)(Ocean)(48K-128K)[a][aka Foot and Mouth].tap"}],"otherPlatform":[],"bundleContent":[],"compilationContents":[],"zxinfoVersion":"1.0.85","themedGroup":[],"unsortedGroup":[],"relatedLinks":[{"siteName":"MobyGames","url":"http://www.mobygames.com/game/head-over-heels"},{"siteName":"RZX Archive","url":"https://www.rzxarchive.co.uk/h.php#head"},{"siteName":"RZX Archive - YouTube","url":"https://youtu.be/zJYhckbQmg4"},{"siteName":"Speccy Screenshot Maps","url":"http://maps.speccy.cz/map.php?id=HeadoverHeels"},{"siteName":"Wikipedia","url":"http://en.wikipedia.org/wiki/Head_Over_Heels_%28video_game%29"}],"reviewAwards":[{"awardName":"C+VG Hit","magazineName":"C&VG (Computer & Video Games)","page":28,"issueId":1518,"dateYear":1987,"dateMonth":5,"volume":null,"number":67},{"awardName":"Crash Smash","magazineName":"Crash","page":20,"issueId":1006,"dateYear":1987,"dateMonth":4,"volume":null,"number":39},{"awardName":"Sinclair User Classic","magazineName":"Sinclair User","page":28,"issueId":62,"dateYear":1987,"dateMonth":5,"volume":null,"number":62},{"awardName":"Your Sinclair Megagame","magazineName":"Your Sinclair","page":68,"issueId":239,"dateYear":1987,"dateMonth":6,"volume":null,"number":18}],"inCompilations":[{"entry_id":12019,"title":"Dixons Premier Collection for Your +2","publishers":[{"name":"Dixons","country":"UK","labelType":null}],"machineType":"ZX-Spectrum 48K","type":"Compilation"},{"entry_id":14204,"title":"Outlet issue 117","publishers":[{"name":"Outlet","country":"UK","labelType":"Company"}],"machineType":"ZX-Spectrum 48K","type":"Electronic Magazine"},{"entry_id":11869,"title":"The Magnificent Seven","publishers":[{"name":"Ocean Software Ltd","country":"UK","labelType":"Company: Publisher/Manager"}],"machineType":"ZX-Spectrum 48K","type":"Compilation"},{"entry_id":23208,"title":"ZX Files Megatape 4","publishers":[{"name":"ZX Files","country":"UK","labelType":"Company"}],"machineType":"ZX-Spectrum 48K","type":"Covertape"}],"releases":[{"releaseSeq":0,"publishers":[{"publisherSeq":1,"name":"Ocean Software Ltd","country":"UK","labelType":"Company: Publisher/Manager"}],"releaseTitles":["Foot and Mouth"],"yearOfRelease":1987,"releasePrice":"£7.95","budgetPrice":null,"microdrivePrice":null,"diskPrice":null,"cartridgePrice":null,"code":null,"barcode":null,"dl":null,"files":[{"path":"/pub/sinclair/games/h/HeadOverHeels.tap.zip","size":37132,"type":"Tape image","format":"Tape (TAP)","origin":null,"encodingScheme":"Undetermined"},{"path":"/pub/sinclair/games/h/HeadOverHeels.tzx.zip","size":38570,"type":"Tape image","format":"Perfect tape (TZX)","origin":"Original release (O)","encodingScheme":"SpeedLock 2"}]},{"


你早就知道了……',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'7031001',	'',	'',	'2',	'',	'玛哈特',	'Maat',	'',	'',	'12',	'',	'',	'',	'',	'',	'',	'',	'',	'1032025',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1032025',	'',	'我不是故意隐瞒的……我害怕你们也会认为我是阿图姆……',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'7031001',	'',	'',	'2',	'',	'玛哈特',	'Maat',	'',	'',	'10',	'',	'',	'',	'',	'',	'',	'',	'',	'1032026',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1032026',	'',	'我能看出你对阿图姆的抗拒，你不愿意承认也很正常。',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'100000',	'',	'1',	'1',	'1',	'%s',	'',	'',	'',	'10',	'',	'',	'',	'',	'',	'',	'',	'',	'1032027',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1032027',	'',	'我一直想听到的，就是有人能肯定我……',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'7031001',	'',	'',	'2',	'',	'玛哈特',	'Maat',	'',	'',	'10',	'',	'',	'',	'',	'',	'',	'',	'',	'1032028',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1032028',	'',	'总队长，你的手好温暖，你能再摸摸我的头吗？……再摸一下就好，我只是觉得被总队长摸头很舒服而已……',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'7031001',	'',	'',	'2',	'',	'玛哈特',	'Maat',	'',	'',	'10',	'',	'',	'',	'',	'',	'',	'',	'',	'1032029',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1032029',	'',	'面对一脸恳切的少女，你愣了愣，然后笑了起来。',	'',	'',	'',	'',	'',	'


= {
				["max"] = 16,
				["min"] = 14,
			},
			["BaseJewel"] = {
				["max"] = 16,
				["min"] = 14,
			},
			["sign"] = "",
			["specialCaseData"] = {
			},
			["tradeMod"] = {
				["id"] = "explicit.stat_2941585404",
				["text"] = "#% increased Trap Damage",
				["type"] = "explicit",
			},
		},
		["1079_TrapDamageMineSupported"] = {
			["Gloves"] = {
				["max"] = 35,
				["min"] = 20,
			},
			["sign"] = "",
			["specialCaseData"] = {
			},
			["tradeMod"] = {
				["id"] = "explicit.stat_2941585404",
				["text"] = "#% increased Trap Damage",
				["type"] = "explicit",
			},
		},
		["1079_TrapDamageOnWeapon"] = {
			["1HAxe"] = {
				["max"] = 54,
				["min"] = 35,
			},
			["1HMace"] = {
				["max"] = 54,
				["min"] = 35,
			},
			["1HSword"] = {
				["max"] = 54,
				["min"] = 35,
			},
			["1HWeapon"] = {
				["max"] = 54,
				["min"] = 35,
			},
			["2HAxe"] = {
				["max"] = 81,
				["min"] = 52,
			},
			["2HMace"] = {
				["max"] = 81,
				["min"] = 52,
			},
			["2HSword"] = {
				["max"] = 81,
				["min"] = 52,
			},
			["2HWeapon"] = {
				["max"] = 81,
				["min"] = 52,
			},
			["Bow"] = {
				["max"] = 81,
				["min"] = 52,
			},
			["Claw"] = {
				["max"] = 54,
				["min"] = 35,
			},
			["Dagger"] = {
				["max"] = 54,
				["min"] = 35,
			},
			["Staff"] = {
				["max"] = 81,
				["min"] = 52,
			},
			["Wand"] = {
				["max"] = 54,
				["min"] = 35,
			},
			["sign"] = "",
			["specialCaseData"] = {
			},
			["tradeMod"] = {
				["id"] = "explicit.stat_2941585404",
				["text"] = "#% increased Trap Damage",
				["type"] = "explicit",
			},
		},
		["1079_TrapDamageSupported"] = {
			["Gloves"] = {
				["max"] = 35,
				["min"] = 20,
			},
			["sign"] = "",
			["specialCaseData"] = {
			},
			["tradeMod"] = {
				["id"] = "explicit.stat_2941585404",
				["text"] = "#% increased Trap Damage",
				["type"] = "explicit",
			},
		},
		["1081_MineDamageForJewel"] = {
			["AnyJewel"] = {
				["max"] = 16,
				["min"] = 14,
			},
			["BaseJewel"] = {
				["max"] = 16,
				["min"] = 14,
			},
			["sign"] = "",
			["specialCaseData"] = {
			},
			["tradeMod"] = {
				["id"] = "explicit.stat_2137912951",
				["text"] = "#% increased Mine Damage",


res = false;
    if ( charsDecoded > 30 ) {
        lString16 s( chbuf, charsDecoded );
        s.lowercase();
        if ( s.pos(L"<html") >=0 && ( s.pos(L"<head") >= 0 || s.pos(L"<body") >=0 ) ) //&& s.pos(L"<FictionBook") >= 0
            res = true;
        lString16 name=m_stream->GetName();
        name.lowercase();
        bool html_ext = name.endsWith(lString16(".htm")) || name.endsWith(lString16(".html"))
                        || name.endsWith(lString16(".hhc"))
                        || name.endsWith(lString16(".xhtml"));
        if ( html_ext && (s.pos(L"<!--")>=0 || s.pos(L"UL")>=0
                           || s.pos(L"<p>")>=0 || s.pos(L"ul")>=0) )
            res = true;
        lString16 enc = htmlCharset( s );
        if ( !enc.empty() )
            SetCharset( enc.c_str() );
        //else if ( s.pos(L"<html xmlns=\"http://www.w3.org/1999/xhtml\"") >= 0 )
        //    res = true;
    }
    delete[] chbuf;
    Reset();
    //CRLog::trace("LVXMLParser::CheckFormat() finished");
    return res;
}

/// constructor
LVHTMLParser::LVHTMLParser( LVStreamRef stream, LVXMLParserCallback * callback )
: LVXMLParser( stream, callback )
{
    m_citags = true;
}

/// destructor
LVHTMLParser::~LVHTMLParser()
{
}

/// parses input stream
bool LVHTMLParser::Parse()
{
    bool res = LVXMLParser::Parse();
    return res;
}

/// read file contents to string
lString16 LVReadTextFile( lString16 filename )
{
	LVStreamRef stream = LVOpenFileStream( filename.c_str(), LVOM_READ );
	return LVReadTextFile( stream );
}

lString16 LVReadTextFile( LVStreamRef stream )
{
	if ( stream.isNull() )
		return lString16();
    lString16 buf;
    LVTextParser reader( stream, NULL, true );
    if ( !reader.AutodetectEncoding() )
        return buf;
    lUInt32 flags;
    while ( !reader.Eof() ) {
        lString16 line = reader.ReadLine( 4096, flags );
        if ( !buf.empty() )
            buf << L'\n';
        if ( !line.empty() ) {
            buf << line;
        }
    }
    return buf;
}

static const char * AC_P[]  = {"p", "p", "hr", NULL};
static const char * AC_COL[] = {"col", NULL};
static const char * AC_LI[] = {"li", "li", "p", NULL};
static const char * AC_UL[] = {"ul", "li", "p", NULL};
static const char * AC_OL[] = {"ol", "li", "p", NULL};
static const char * AC_DD[] = {"dd", "dd", "p", NULL};
static const char * AC_DL[] = {"dl", "dt", "p", NULL};
static const char * AC_DT[] = {"dt", "dt", "dd", "p", NULL};
static const char * AC_BR[] = {"br", NULL};
static const char * AC_HR[] = {"hr", NULL};
static const char * AC_PARAM[] = {"param", "param", NULL};
static const char * AC_IMG[]= {"img", NULL};
static const char * AC_TD[] = {"td", "td", "th", NULL};
static const char * AC_TH[] = {"th", "th", "td", NULL};
static const char * AC_TR[] = {"tr", "tr", "thead", "tfoot", "tbody", NULL};
static const char * AC_DIV[] = {"div", "p", NULL};
static const char *


  CreateMessageError(#[from] requests::create_message::Error),

    #[error(transparent)]
    SerdeError(#[from] serde_json::Error),

    #[error(transparent)]
    RequestError(#[from] reqwest::Error),

    #[error("error reading file, source: {0}")]
    FileError(#[from] std::io::Error),

    #[error("sent data is invalid:\n {request}")]
    BadDataSent { request: String },

    #[error("request was unsuccessful, feedback:\n {response}")]
    UnsuccessfulRequest { response: String },
}
<gh_stars>0
extern crate aoc2017;

use aoc2017::days::day18;

fn main() {
    let input = aoc2017::read_trim("input/day18.txt").unwrap();
    let value1 = day18::part1::parse(&input);
    let value2 = day18::part2::parse(&input);

    println!("Day 18 part 1 value: {}", value1);
    println!("Day 18 part 2 value: {}", value2);
}
<reponame>swerveofshore/ray-tracer<gh_stars>0
//! A ray tracer and some ray tracer helpers.
//!
//! This crate takes most of the pseudocode from <NAME>'s [*Ray Tracer
//! Challenge*](http://raytracerchallenge.com/) and implements it in Rust.
//! Several functions and structures are exposed in case one would like to use
//! them in other projects.
//!
//! This crate also doubles as an executable; after cloning the repository, one
//! can run `cargo run --release` at the project root. A sample scene will be
//! rendered and saved to file `out.ppm`.
//!
//! Some other optimizations are included, such as bounding boxes for shapes,
//! which are mentioned but not implemented in the textbook. The biggest
//! optimization comes from a [suggestion on the Ray Tracer Challenge Forums](https://forum.raytracerchallenge.com/thread/203/performance-tips-clarifications-book-errata)
//! where user "garfieldnate" suggests pushing parent transformations on shape
//! groups to group children.
//!
//! Moreover, in the same thread, "garfieldnate" also suggests cacheing matrix
//! inverses, which prevents the same matrix inverses from being calculated
//! over-and-over at render-time.
//!
//! I also added logic to render scenes in parallel, where each available thread
//! renders one pixel at a time. Most of this logic is taken from the [Rust
//! Programming Language Book](https://doc.rust-lang.org/stable/book/),
//! specifically in Chapter 20, Part 2: "Turning Our Single-Threaded Server into
//! a Multithreaded Server." This logic works well for rendering pixels
//! on-demand, without requiring thread barriers (or similar constructs).
//!
//! # Modules Overview
//!
//! Most of the execution logic occurs in module `parallel`, specifically in
//! function `parallel_render`, which accepts a `World` and a `Camera` from the
//! `world` and `camera` modules respectively. A `Camera` spectates a `World`
//! which contains `Shape`s. The `Camera` provides rays for each desired pixel,
//! in which a color is calculated and written to a `Canvas` (in `canvas`). Once
//! rendering completes, a `Canvas` can be used to store render data to a file
//! (just PPM images for now).
//!
//! Modules `tuple`, `matrix`, `color` and `ray` all provided mathematical
//! constructs for points, vectors, matrices, colors and rays,


_vu_meter(m_divs.vu_left, MixerChannel::VUMeter::min);
	}
	if(m_divs.vu_right) {
		update_vu_meter(m_divs.vu_right, MixerChannel::VUMeter::min);
	}
}

void AudioOSD::update_channel_name()
{
	if(m_channel_id < 0) {
		m_divs.volume_name->SetInnerRML("Master");
		m_divs.volume_name->SetClassNames("master");
	} else {
		switch(m_channel_id) {
			case MixerChannel::Category::AUDIOCARD: {
				m_divs.volume_name->SetInnerRML("Audio cards");
				m_divs.volume_name->SetClassNames("category audiocard");
				break;
			}
			case MixerChannel::Category::SOUNDFX: {
				m_divs.volume_name->SetInnerRML("Sound FX");
				m_divs.volume_name->SetClassNames("category soundfx");
				break;
			}
			case MixerChannel::Category::GUI: {
				m_divs.volume_name->SetInnerRML("GUI");
				m_divs.volume_name->SetClassNames("category gui");
				break;
			}
			default: {
				int id = m_channel_id - MixerChannel::CategoryCount;
				if(id >= int(m_channels.size())) {
					return;
				}
				m_divs.volume_name->SetInnerRML(m_channels[id]->name());
				if(m_channels[id]->category() == MixerChannel::Category::AUDIOCARD) {
					m_divs.volume_name->SetClassNames("audiocard");
				} else {
					m_divs.volume_name->SetClassNames("soundfx");
				}
				break;
			}
		}
	}
}

void AudioOSD::next_channel()
{
	m_channel_id++;
	if(m_channel_id == MixerChannel::Category::GUI) {
		m_channel_id++;
	}
	m_channel_id = std::min(m_channel_id, MixerChannel::CategoryCount + (int(m_channels.size()) - 1));
	update_channel_name();
}

void AudioOSD::prev_channel()
{
	m_channel_id--;
	if(m_channel_id == MixerChannel::Category::GUI) {
		m_channel_id--;
	}
	m_channel_id = std::max(int(MixerChannel::MASTER), m_channel_id);
	update_channel_name();
}

MixerChannel * AudioOSD::current_channel() const
{
	int id = m_channel_id - MixerChannel::CategoryCount;
	if(id < 0 || id >= int(m_channels.size())) {
		return nullptr;
	}
	return m_channels[id].get();
}

void AudioOSD::set_channel(int _id)
{
	m_channel_id = _id;
	if(m_channel_id < 0) {
		m_channel_id = MixerChannel::MASTER;
	} else {
		m_channel_id = std::min(m_channel_id, MixerChannel::CategoryCount + (int(m_channels.size()) - 1));
		m_channel_id = std::max(int(MixerChannel::MASTER), m_channel_id);
	}
	update_channel_name();
}

void AudioOSD::show()
{
	Window::show();
	m_wnd->SetClass("hidden", false);
	m_gui->timers().activate_timer(m_timeout_timer, m_timeout, false);
	m_vu_meter = g_program.config().get_bool_or_default(DIALOGS_SECTION, DIALOGS_VU_METERS);
	m_wnd->SetClass("with_vu_meter", m_vu_meter);
}

void AudioOSD::update()
{
	float mix


eapon trap",
    itemtype = {"component"},
    glyph = glyphs['clubs'],
    glyph_ascii = glyphs['clubs'],
    foreground = colors['white'],
    background = colors['black'],
    stockpile = stockpiles['furniture'].id,
    vox = voxelId("axe_blade")
};

-- Spikes, used for everyone's favorite mincing machines
items["retractable_spike"] = {
    name = "Retractable Trap Spikes",
    description = "A set of retractable spikes designed for integration into a weapon trap",
    itemtype = {"component"},
    glyph = glyphs['three_bar'],
    glyph_ascii = glyphs['three_bar'],
    foreground = colors['white'],
    background = colors['black'],
    stockpile = stockpiles['furniture'].id,
    vox = voxelId("axe_blade")
};


// clang-format off
// SPDX-FileCopyrightText: 2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
// clang-format on
// SPDX-FileContributor: Andrew Hayzen <andrew.hayzen@kdab.com>
// SPDX-FileContributor: Leon Matthes <leon.matthes@kdab.com>
//
// SPDX-License-Identifier: MIT OR Apache-2.0
#pragma once

#include <cstdint>

#include <QtCore/QVariant>

#include <QtCore/QByteArray>
#include <QtCore/QDate>
#include <QtCore/QDateTime>
#include <QtCore/QModelIndex>
#include <QtCore/QPersistentModelIndex>
#include <QtCore/QPoint>
#include <QtCore/QPointF>
#include <QtCore/QRect>
#include <QtCore/QRectF>
#include <QtCore/QSize>
#include <QtCore/QSizeF>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QTime>
#include <QtCore/QUrl>

#ifdef CXX_QT_GUI_FEATURE
#include <QtGui/QColor>
#endif

#include "rust/cxx.h"

// Define namespace otherwise we hit a GCC bug
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
namespace rust {

template<>
struct IsRelocatable<QVariant> : ::std::true_type
{
};

} // namespace rust

namespace rust {
namespace cxxqtlib1 {
namespace qvariant {

template<typename T>
QVariant
qvariantConstruct(const T& value) noexcept
{
  return QVariant::fromValue<T>(value);
}

template<typename T>
T
qvariantValueOrDefault(const QVariant& variant) noexcept
{
  return variant.value<T>();
}

// Need to use a macro here as we can't template because the types
// are always QVariant and bool. So then CXX can't decide which to use.
#define CXX_QT_QVARIANT_CAN_CONVERT(name)                                      \
  bool qvariantCanConvert##name(const QVariant& variant);

CXX_QT_QVARIANT_CAN_CONVERT(Bool)
CXX_QT_QVARIANT_CAN_CONVERT(F32)
CXX_QT_QVARIANT_CAN_CONVERT(F64)
CXX_QT_QVARIANT_CAN_CONVERT(I8)
CXX_QT_QVARIANT_CAN_CONVERT(I16)
CXX_QT_QVARIANT_CAN_CONVERT(I32)
CXX_QT_QVARIANT_CAN_CONVERT(I64)
CXX_QT_QVARIANT_CAN_CONVERT(QByteArray)
#ifdef CXX_QT_GUI_FEATURE
CXX_QT_QVARIANT_CAN_CONVERT(QColor)
#endif
CXX_QT_QVARIANT_CAN_CONVERT(QDate)
CXX_QT_QVARIANT_CAN_CONVERT(QDateTime)
CXX_QT_QVARIANT_CAN_CONVERT(QModelIndex)
CXX_QT_QVARIANT_CAN_CONVERT(QPersistentModelIndex)
CXX_QT_QVARIANT_CAN_CONVERT(QPoint)
CXX_QT_QVARIANT_CAN_CONVERT(QPointF)
CXX_QT_QVARIANT_CAN_CONVERT(QRect)
CXX_QT_QVARIANT_CAN_CONVERT(QRectF)
CXX_QT_QVARIANT_CAN_CONVERT(QSize)
CXX_QT_QVARIANT_CAN_CONVERT(QSizeF)
CXX_QT_QVARIANT_CAN_CONVERT(QString)
CXX_QT_QVARIANT_CAN_CONVERT(QStringList)
CXX_QT_QVARIANT_CAN_CONVERT(QTime)
CXX_QT_QVARIANT_CAN_CONVERT(QUrl)
CXX_QT_QVARIANT_CAN_CONVERT(U8)
CXX_QT_QVARIANT_CAN_CONVERT(U16)
CXX_QT_QVARIANT_CAN_CONVERT(U32)
CXX_QT_QVARIANT_CAN_CONVERT(U64)

}
}
}


s
  /// Product.primary_product_id cannot be empty. If this field is set to an
  /// invalid value other than these, an INVALID_ARGUMENT error is returned. If
  /// this field is `variant` and merchant_center_product_id_field is
  /// `itemGroupId`, an INVALID_ARGUMENT error is returned. See
  /// [Product levels](https://cloud.google.com/retail/docs/catalog#product-levels)
  /// for more details.
  core.String? ingestionProductType;

  /// Which field of \[Merchant Center
  /// Product\](/bigquery-transfer/docs/merchant-center-products-schema) should
  /// be imported as Product.id.
  ///
  /// Acceptable values are: * `offerId` (default): Import `offerId` as the
  /// product ID. * `itemGroupId`: Import `itemGroupId` as the product ID.
  /// Notice that Retail API will choose one item from the ones with the same
  /// `itemGroupId`, and use it to represent the item group. If this field is
  /// set to an invalid value other than these, an INVALID_ARGUMENT error is
  /// returned. If this field is `itemGroupId` and ingestion_product_type is
  /// `variant`, an INVALID_ARGUMENT error is returned. See
  /// [Product levels](https://cloud.google.com/retail/docs/catalog#product-levels)
  /// for more details.
  core.String? merchantCenterProductIdField;

  GoogleCloudRetailV2ProductLevelConfig({
    this.ingestionProductType,
    this.merchantCenterProductIdField,
  });

  GoogleCloudRetailV2ProductLevelConfig.fromJson(core.Map json_)
    : this(
        ingestionProductType: json_['ingestionProductType'] as core.String?,
        merchantCenterProductIdField:
            json_['merchantCenterProductIdField'] as core.String?,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (ingestionProductType != null)
      'ingestionProductType': ingestionProductType!,
    if (merchantCenterProductIdField != null)
      'merchantCenterProductIdField': merchantCenterProductIdField!,
  };
}

/// Promotion specification.
class GoogleCloudRetailV2Promotion {
  /// Promotion identifier, which is the final component of name.
  ///
  /// For example, this field is "free_gift", if name is `projects / *
  /// /locations/global/catalogs/default_catalog/promotions/free_gift`. The
  /// value must be a UTF-8 encoded string with a length limit of 128
  /// characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or
  /// ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned.
  /// Corresponds to Google Merchant Center property
  /// [promotion_id](https://support.google.com/merchants/answer/7050148).
  core.String? promotionId;

  GoogleCloudRetailV2Promotion({this.promotionId});

  GoogleCloudRetailV2Promotion.fromJson(core.Map json_)
    : this(promotionId: json_['promotionId'] as core.String?);

  core.Map<core.String, core.dynamic> toJson() => {
    if (promotionId != null) 'promotionId': promotionId!,
  };
}

/// A transaction represents the entire purchase transaction.
class GoogleCloudRetailV2PurchaseTransaction {
  /// All the costs associated with the products.
  ///
  /// These can be manufacturing costs, shipping expenses not borne by the end
  /// user, or any other costs, such that: * Profit = revenue - tax - cost
  core.double? cost;

  /// Currency code.
  ///
  /// Use three-character ISO-4217 code.
  ///
  /// Required.
  core.String? currencyCode;

  /// The transaction ID with a length limit of 128 characters.
  core.String? id;

  /// Total non-zero revenue or grand total associated with the transaction.
  ///
  /// This value include shipping, tax, or other adjustments to total revenue
  /// that you want to


vaScript to run this app.

<!DOCTYPE html>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="theme-color" content="#000000">

	<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
	<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

	<title>React App</title>

		You need to enable JavaScript to run this app.

{% extends "basic.html" %} {% block title %}Home{% endblock title %}
{% block style %}active{% endblock style %}
{% block body %} {% load static %}

        {% for newprod in newprod %}

{{newprod.Product_Name}}

            Price : Rs. {{newprod.Price}} Rs. {% widthratio newprod.Price 1 3 %}

            Add to Cart
            Checkout

      </


/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (c) 2017 - 2018, Intel Corporation
 * All rights reserved.
 */

/*
 * This test instantiates CONNECTION_COUNT TCTI instances sending a pre-canned
 * TPM command through each. It terminates each connection before receiving
 * the result.
 *
 * This test ensures that a single process is able to instantiate and use
 * multiple connections to the tabrmd.
 *
 * NOTE: this test can't and doesn't use the main.c driver from the
 * integration test harness since we need to instantiate more than a single
 * TCTI context.
 */

#include <errno.h>
#include <glib.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "tss2-tcti-tabrmd.h"
#include "test-options.h"

#define CONNECTION_COUNT 25

TSS2_RC
tcti_tabrmd_init (TSS2_TCTI_CONTEXT **tcti_context,
                  const char         *conf,
                  int                 retries)
{
    TSS2_RC rc;
    size_t size, i;

    rc = Tss2_Tcti_Tabrmd_Init (NULL, &size, NULL);
    if (rc != TSS2_RC_SUCCESS) {
        fprintf (stderr, "Failed to get allocation size for tabrmd TCTI "
                 " context: 0x%" PRIx32 "\n", rc);
        return rc;
    }
    *tcti_context = calloc (1, size);
    if (*tcti_context == NULL) {
        fprintf (stderr, "Allocation for TCTI context failed: %s\n",
                 strerror (errno));
        return rc;
    }
    for (i = 0; i < (size_t) retries; ++i) {
        rc = Tss2_Tcti_Tabrmd_Init (*tcti_context, &size, conf);
        if (rc == TSS2_RC_SUCCESS) {
            break;
        } else {
            g_info ("Failed to initialize tabrmd TCTI context: 0x%" PRIx32
                    " on try %zd", rc, i);
            sleep (1);
        }
    }
    if (rc != TSS2_RC_SUCCESS) {
        fprintf (stderr, "Failed to initialize tabrmd TCTI context: "
                 "0x%" PRIx32 "\n", rc);
        free (*tcti_context);
    }
    return rc;
}

int
main (int   argc,
      char *argv[])
{
    TSS2_RC rc;
    TSS2_TCTI_CONTEXT *tcti_context[CONNECTION_COUNT] = { 0 };
    test_opts_t opts = TEST_OPTS_DEFAULT_INIT;
    /* This is a pre-canned TPM2 command buffer to invoke 'GetCapability' */
    uint8_t cmd_buf[] = {
        0x80, 0x01, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00,
        0x01, 0x7a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
        0x01, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x0a
    };

    g_info ("Executing test: %s", argv[0]);
    if (argc > 1) {
        g_error ("Unexpected argument count %d", argc);
    }
    get_test_opts_from_env (&opts);
    if (sanity_check_test_opts (&opts) != 0) {
        g_error ("option sanity test failed");
    }
    size_t i;
    for (i = 0; i < CONNECTION_COUNT; ++i) {
        rc = tcti_tabrmd_init (&tcti_context [i],
                               opts.tcti_conf,
                               opts.tcti_retries);
        if (tcti_context [i] == NULL || rc != TSS2_RC_SUCCESS) {
            g_error ("failed to connect to TCTI: 0x%" PRIx32, rc);
        }
    }
    for (i = 0; i < CONNECTION_COUNT; ++i) {
        rc = Tss2_Tcti_Transmit (tcti_context [i], sizeof (cmd_buf), cmd_buf);
        if (rc != TSS2_RC_SUCCESS) {
            g_error ("failed to transmit TPM command");
        }
    }
    for (i = 0; i < CONNECTION_COUNT; ++i) {
        Tss2_Tcti_Finalize (tcti_context [i]);
        free (tcti_context [i]);
    }
}


    assert.deepEqual(seq1, seq2);
  });
}

export function valuesInRange(rng_for: (seed: number) => RandomGenerator) {
  return fc.property(fc.integer(), fc.nat(MAX_SIZE), (seed, offset) => {
    const rng = rng_for(seed);
    const value = skipN(rng, offset).next()[0];
    assert.ok(value >= -0x80000000);
    assert.ok(value <= 0x7fffffff);
  });
}

export function noOrderNextJump(rng_for: (seed: number) => RandomGenerator) {
  return fc.property(fc.integer(), fc.nat(MAX_SIZE), (seed, offset) => {
    const rng = rng_for(seed);
    // rngNextFirst = rng.next.next..(offset times)..next.jump
    const rngNextFirst = skipN(rng, offset).jump!();
    // rngJumpFirst = rng.jump.next.next..(offset times)..next
    const rngJumpFirst = skipN(rng.jump!(), offset);
    expect(rngNextFirst.next()[0]).toBe(rngJumpFirst.next()[0]);
  });
}

export function changeSelfWithUnsafeNext(rng_for: (seed: number) => RandomGenerator) {
  return fc.property(fc.integer(), fc.nat(MAX_SIZE), (seed, offset) => {
    // Arrange
    const [expectedValue, expectedNextRng] = skipN(rng_for(seed), offset).next();
    const rng = rng_for(seed);
    unsafeSkipN(rng, offset);
    const rngReprBefore = JSON.stringify(rng);
    const expectedRngReprAfter = JSON.stringify(expectedNextRng);

    // Act
    const value = rng.unsafeNext();
    const rngReprAfter = JSON.stringify(rng);

    // Assert
    expect(value).toBe(expectedValue);
    expect(rngReprAfter).not.toBe(rngReprBefore);
    expect(rngReprAfter).toBe(expectedRngReprAfter);
  });
}

export function changeSelfWithUnsafeJump(rng_for: (seed: number) => RandomGenerator) {
  return fc.property(fc.integer(), fc.nat(MAX_SIZE), (seed, offset) => {
    // Arrange
    const expectedJumpRng = skipN(rng_for(seed), offset).jump!();
    const rng = rng_for(seed);
    unsafeSkipN(rng, offset);
    const rngReprBefore = JSON.stringify(rng);
    const expectedRngReprAfter = JSON.stringify(expectedJumpRng);

    // Act
    rng.unsafeJump!();
    const rngReprAfter = JSON.stringify(rng);

    // Assert
    expect(rngReprAfter).not.toBe(rngReprBefore);
    expect(rngReprAfter).toBe(expectedRngReprAfter);
  });
}

export function noChangeSelfWithNext(rng_for: (seed: number) => RandomGenerator) {
  return fc.property(fc.integer(), fc.nat(MAX_SIZE), (seed, offset) => {
    // Arrange
    const rng = rng_for(seed);
    unsafeSkipN(rng, offset);
    const rngReprBefore = JSON.stringify(rng);

    // Act
    rng.next();
    const rngReprAfter = JSON.stringify(rng);

    // Assert
    expect(rngReprAfter).toBe(rngReprBefore);
  });
}

export function noChangeSelfWithJump(rng_for: (seed: number) => RandomGenerator) {
  return fc.property(fc.integer(), fc.nat(MAX_SIZE), (seed, offset) => {
    // Arrange
    const rng = rng_for(seed);
    unsafeSkipN(rng, offset);
    const rngReprBefore = JSON.stringify(rng);

    // Act
    rng.jump!();
    const rngReprAfter = JSON.stringify(rng);

    // Assert
    expect(rngReprAfter).toBe(rngReprBefore);
  });
}

export function noChangeOnClonedWithUnsafeNext(rng_for: (seed: number) => RandomGenerator) {
  return fc.property(fc.integer(),


href="#URI" id="rfc.xref.URI.41">[URI], Section 4.2>
rfc850-date = day-name-l "," SP date2 SP time-of-day SP GMT

second = 2DIGIT
segment = <segment, see [URI], Section 3.3>
subtype = token
suffix-length = 1*DIGIT
suffix-range = "-" suffix-length

t-codings = "trailers" / ( transfer-coding [ weight ] )
tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
 "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
time-of-day = hour ":" minute ":" second
token = 1*tchar
token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" )
 *"="
transfer-coding = token *( OWS ";" OWS transfer-parameter )
transfer-parameter = token BWS "=" BWS ( token / quoted-string )
type = token

unsatisfied-range = "*/" complete-length
uri-host = <host, see [URI], Section 3.2.2>

weak = %x57.2F ; W/
weight = OWS ";" OWS "q=" qvalue

year = 4DIGIT

Appendix B. Changes from Previous RFCs

B.1. Changes from RFC 2818

None.¶

B.2. Changes from RFC 7230


3 6.79972 7.58884C6.79534 7.07242 6.81286 6.92362 6.89608 6.62602C7.28588 5.28682 8.3633 4.31524 9.74292 4.06578C10.0364 4.00888 10.8685 4.05265 11.1751 4.1358ZM16.6498 10.1491C17.9681 10.5648 18.7696 11.5714 19.1244 13.2564C19.2163 13.7072 19.3302 14.9545 19.2864 15.0682C19.2601 15.1295 19.155 15.1383 18.4893 15.1383C18.0688 15.1383 17.7228 15.1251 17.7228 15.112C17.7228 14.9282 17.5608 14.0792 17.4601 13.7422C17.0265 12.2804 16.0804 11.1776 14.9767 10.8493C14.8716 10.8187 14.7884 10.7749 14.7884 10.7574C14.7884 10.7355 14.9286 10.5605 15.1037 10.3635L15.4191 10.0047L15.8833 10.0309C16.1768 10.044 16.4527 10.0878 16.6498 10.1491ZM9.19107 12.3811L10.321 13.4971L10.724 13.1032C10.9474 12.8888 11.5255 12.3242 12.0073 11.8515L12.8832 10.9894L13.2117 11.0288C14.1183 11.1425 14.9811 11.5364 15.6074 12.1316C16.352 12.8362 16.7768 13.7115 16.9564 14.8976C17.0221 15.3352 17.0484 16.6219 16.9958 16.8845L16.9695 17.0202H10.3167C5.61281 17.0202 3.65944 17.007 3.64192 16.972C3.5806 16.8801 3.56308 15.6722 3.61564 15.1908C3.87404 12.7356 5.20987 11.2695 7.40851 11.0331C7.83335 10.9894 7.6494 10.8537 9.19107 12.3811Z' fill='%23000'/%3E%3C/svg%3E%0A");
}

.wpsms-tab .tab-pro_gravity_forms a::before {
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' %3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg enable-background='new 0 0 512 512' id='Layer_1' version='1.1' viewBox='0 0 512 512' xml:space='preserve' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ccircle cx='256' cy='256' fill='%23000' id='ellipse' r='256'/%3E%3Cg id='logo'%3E%3Cpath d='M125.7,170.8h260.5c16.5,0,29.8,13.3,29.8,29.8V300c0,16.5-13.3,29.8-29.8,29.8h-93.4l12.8,31.4l-56.4-31.4 H125.8c-16.5,0-29.


IN_1701466209242_overlay .PIN_1701466209242_nav.PIN_1701466209242_backward,  span.PIN_1701466209242_embed_pin .PIN_1701466209242_pages .PIN_1701466209242_overlay .PIN_1701466209242_nav.PIN_1701466209242_backward_noop {
  left: 0;
}
 span.PIN_1701466209242_embed_pin .PIN_1701466209242_pages .PIN_1701466209242_overlay .PIN_1701466209242_nav.PIN_1701466209242_forward {
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgd2lkdGg9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGc+PHBhdGggZD0iTTYuNzIgMjRjLjU3IDAgMS4xNC0uMjIgMS41Ny0uNjZMMTkuNSAxMiA4LjI5LjY2Yy0uODYtLjg4LTIuMjctLjg4LTMuMTQgMC0uODcuODgtLjg3IDIuMyAwIDMuMThMMTMuMjEgMTJsLTguMDYgOC4xNmMtLjg3Ljg4LS44NyAyLjMgMCAzLjE4LjQzLjQ0IDEgLjY2IDEuNTcuNjYiIGZpbGw9IiNmZmYiIHN0cm9rZT0iI2FhYSIgc3Ryb2tlLXdpZHRoPSIuNSI+PC9wYXRoPjwvZz48L3N2Zz4=);
  background-position: 100% 50%;
}
 span.PIN_1701466209242_embed_pin .PIN_1701466209242_pages .PIN_1701466209242_overlay .PIN_1701466209242_nav.PIN_1701466209242_backward {
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgd2lkdGg9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGc+PHBhdGggZD0iTTE3LjI4IDI0Yy0uNTcgMC0xLjE0LS4yMi0xLjU4LS42Nkw0LjUgMTIgMTUuNy42NmEyLjIxIDIuMjEgMCAwIDEgMy4xNSAwYy44Ny44OC44NyAyLjMgMCAzLjE4TDEwLjc5IDEybDguMDYgOC4xNmMuODcuODguODcgMi4zIDAgMy4xOC0uNDQuNDQtMSAuNjYtMS41Ny42NiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjYWFhIiBzdHJva2Utd2lkdGg9Ii41Ij48L3BhdGg+PC9nPjwvc3ZnPg==);
  background-position: 0 50%;
}
 span.PIN_1701466209242_embed_pin .PIN_1701466209242_pages .PIN_1701466209242_overlay .PIN_1701466209242_progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 36px;
  width: 100%;
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.2));
  text-align: center;
}
 span.PIN_1701466209242_embed_pin .PIN_1701466209242_pages .PIN_17


using Grand.Core.Mapper;
using Grand.Domain.Messages;
using Grand.Web.Areas.Admin.Models.Messages;

namespace Grand.Web.Areas.Admin.Extensions
{
    public static class InteractiveFormMappingExtensions
    {
        public static InteractiveFormModel ToModel(this InteractiveForm entity)
        {
            return entity.MapTo<InteractiveForm, InteractiveFormModel>();
        }

        public static InteractiveForm ToEntity(this InteractiveFormModel model)
        {
            return model.MapTo<InteractiveFormModel, InteractiveForm>();
        }

        public static InteractiveForm ToEntity(this InteractiveFormModel model, InteractiveForm destination)
        {
            return model.MapTo(destination);
        }

        public static InteractiveFormAttributeModel ToModel(this InteractiveForm.FormAttribute entity)
        {
            return entity.MapTo<InteractiveForm.FormAttribute, InteractiveFormAttributeModel>();
        }

        public static InteractiveForm.FormAttribute ToEntity(this InteractiveFormAttributeModel


augment_limit)
    env->options.rp_augment_limit = default_rp_augment_limit(env);
  if (!env->options.flags.non_auto.prefault_write)
    env->options.prefault_write = default_prefault_write(env);

  env->options.need_dp_limit_adjust = true;
  if (!env->txn)
    env_options_adjust_dp_limit(env);

  const size_t basis = env->geo_in_bytes.now;
  /* TODO: use options? */
  const unsigned factor = 9;
  size_t threshold = (basis < ((size_t)65536 << factor))  ? 65536        /* minimal threshold */
                     : (basis > (MEGABYTE * 4 << factor)) ? MEGABYTE * 4 /* maximal threshold */
                                                          : basis >> factor;
  threshold =
      (threshold < env->geo_in_bytes.shrink || !env->geo_in_bytes.shrink) ? threshold : env->geo_in_bytes.shrink;
  env->madv_threshold = bytes2pgno(env, bytes_align2os_bytes(env, threshold));
}

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

__cold int mdbx_env_set_option(MDBX_env *env, const MDBX_option_t option, uint64_t value) {
  int err = check_env(env, false);
  if (unlikely(err != MDBX_SUCCESS))
    return LOG_IFERR(err);

  const bool lock_needed = ((env->flags & ENV_ACTIVE) && env->basal_txn && !env_owned_wrtxn(env));
  bool should_unlock = false;
  switch (option) {
  case MDBX_opt_sync_bytes:
    if (value == /* default */ UINT64_MAX)
      value = MAX_WRITE;
    if (unlikely(env->flags & MDBX_RDONLY))
      return LOG_IFERR(MDBX_EACCESS);
    if (unlikely(!(env->flags & ENV_ACTIVE)))
      return LOG_IFERR(MDBX_EPERM);
    if (unlikely(value > SIZE_MAX - 65536))
      return LOG_IFERR(MDBX_EINVAL);
    value = bytes2pgno(env, (size_t)value + env->ps - 1);
    if ((uint32_t)value != atomic_load32(&env->lck->autosync_threshold, mo_AcquireRelease) &&
        atomic_store32(&env->lck->autosync_threshold, (uint32_t)value, mo_Relaxed)
        /* Дергаем sync(force=off) только если задано новое не-нулевое значение
         * и мы вне транзакции */
        && lock_needed) {
      err = env_sync(env, false, false);
      if (err == /* нечего сбрасывать на диск */ MDBX_RESULT_TRUE)
        err = MDBX_SUCCESS;
    }
    break;

  case MDBX_opt_sync_period:
    if (value == /* default */ UINT64_MAX)
      value = 2780315 /* 42.42424 секунды */;
    if (unlikely(env->flags & MDBX_RDONLY))
      return LOG_IFERR(MDBX_EACCESS);
    if (unlikely(!(env->flags & ENV_ACTIVE)))
      return LOG_IFERR(MDBX_EPERM);
    if (unlikely(value > UINT32_MAX))
      return LOG_IFERR(MDBX_EINVAL);
    value = osal_16dot16_to_monotime((uint32_t)value);
    if (value != atomic_load64(&env->lck->autosync_period, mo_AcquireRelease) &&
        atomic_store64(&env->lck->autosync_period, value, mo_Relaxed)
        /* Дергаем sync(force=off) только если задано новое не-нулевое значение
         * и мы вне транзакции */
        && lock_needed) {
      err = env_sync(env, false, false);
      if (err == /* нечего сбрасывать на диск */ MDBX_RESULT_TRUE)
        err = MDBX_SUCCESS;
    }
    break;

  case MDBX_opt_max_db:
    if (value == /* default */ UINT64_MAX)
      value = 42;
    if (unlikely(value > MDBX_MAX_DBI))
      return LOG_IFERR(MDBX_EINVAL);
    if (unlikely(env->dxb_mmap.base))
      return LOG_IFERR(MDBX_EPERM);
    env->max_dbi = (unsigned)value + CORE_DBS;
    break;

  case MDBX_opt_max_readers:
    if (value == /* default */ UINT64_MAX)
      value = MDBX_READERS_LIMIT;
    if (unlikely(value < 1 || value > MDBX_READERS_LIMIT))
      return LOG_IFERR(MDBX_EINVAL);
    if (unlikely(env->dxb_mmap.base))
      return LOG_IFERR(MDBX_EPERM);
    env->max_readers = (unsigned)value;
    break;

  case MDBX_opt_dp_reserve_limit:
    if (value == /* default */ UINT64_MAX)
      value = default_dp_reserve_limit(env);
    if (unlikely(value > INT_MAX))
      return LOG_IFERR(MDBX_EINVAL);
    if (env->options.dp_reserve_limit != (unsigned)value) {
      if (lock_needed) {
        err = lck_txn_lock(env, false);
        if (unlikely(err != MDBX_SUCCESS))
          return LOG_IFERR(err);
        should_unlock = true;
      }
      env->options.dp_reserve_limit = (unsigned)value;
      while (env->shadow_reserve_len > env->options.dp_reserve_limit) {
        eASSERT(env, env->shadow_reserve != nullptr);
        page_t *dp = env->shadow_reserve;
        MDBX_ASAN_UNPOISON_MEMORY_REGION(dp, env->ps);
        VALGRIND_MAKE_MEM_DEFINED(&page_next(dp), sizeof(page_t *));
        env->shadow_reserve = page_next(dp);
        void *const pt


方式共享 3.0 协议**](https://creativecommons.org/licenses/by-sa/3.0/deed.zh-hans) 下提供，附加条款亦可能应用。

引用类型与其他类型作品版权归原作者所有，如有作者授权则遵照授权协议使用。

详细请查阅 [THBWiki：免责声明](https://thbwiki.cc/THBWiki:%E5%85%8D%E8%B4%A3%E5%A3%B0%E6%98%8E)。

# 秦こころのすやすやディスク

2017年8月11日 由 アールグレイ 于 Comic Market 92 发布的配音作品同人专辑，曲目主要风格是 其他，分级为 一般向

本页是关于东方Project
 **二次创作同人专辑 (未找到链接)** 的词条

## 专辑信息

基本信息

<img alt="封面图片" src="https://upload.thwiki.cc/thumb/c/c0/%E7%A7%A6%E3%81%93%E3%81%93%E3%82%8D%E3%81%AE%E3%81%99%E3%82%84%E3%81%99%E3%82%84%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E5%B0%81%E9%9D%A2.jpg/280px-%E7%A7%A6%E3%81%93%E3%81%93%E3%82%8D%E3%81%AE%E3%81%99%E3%82%84%E3%81%99%E3%82%84%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E5%B0%81%E9%9D%A2.jpg" decoding="async" loading="lazy" width="280" height="277" srcset="https://upload.thwiki.cc/thumb/c/c0/%E7%A7%A6%E3%81%93%E3%81%93%E3%82%8D%E3%81%AE%E3%81%99%E3%82%84%E3%81%99%E3%82%84%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E5%B0%81%E9%9D%A2.jpg/420px-%E7%A7%A6%E3%81%93%E3%81%93%E3%82%8D%E3%81%AE%E3%81%99%E3%82%84%E3%81%99%E3%82%84%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E5%B0%81%E9%9D%A2.jpg 1.5x, https://upload.thwiki.cc/thumb/c/c0/%E7%A7%A6%E3%81%93%E3%81%93%E3%82%8D%


est")
	caCertFile := filepath.Join(testCADir, "ca.crt")
	require.NoError(t, testCA.WriteCACertificate(caCertFile))

	serverCertFile := filepath.Join(testCADir, "server.crt")
	serverKeyFile := filepath.Join(testCADir, "server.key")
	require.NoError(t, testCA.WriteCertificate(
		&x509.Certificate{
			Subject:     pkix.Name{CommonName: "server"},
			DNSNames:    []string{"localhost", "my-other-name"},
			ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
		},
		serverCertFile,
		serverKeyFile,
	))

	serverNoLocalhostCertFile := filepath.Join(testCADir, "server-no-localhost.crt")
	serverNoLocalhostKeyFile := filepath.Join(testCADir, "server-no-localhost.key")
	require.NoError(t, testCA.WriteCertificate(
		&x509.Certificate{
			Subject:     pkix.Name{CommonName: "server-no-localhost"},
			DNSNames:    []string{"my-other-name"},
			ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
		},
		serverNoLocalhostCertFile,
		serverNoLocalhostKeyFile,
	))

	// create client CAs
	testClientCA1 := newCA("Test Client CA 1")
	testClientCA2 := newCA("Test Client CA 2")

	clientCA1CertFile := filepath.Join(testCADir, "ca-client-1.crt")
	require.NoError(t, testClientCA1.WriteCACertificate(clientCA1CertFile))
	clientCA2CertFile := filepath.Join(testCADir, "ca-client-2.crt")
	require.NoError(t, testClientCA2.WriteCACertificate(clientCA2CertFile))

	// create a ca file with both certs
	clientCABothCertFile := filepath.Join(testCADir, "ca-client-both.crt")
	func() {
		src1, err := os.Open(clientCA1CertFile)
		require.NoError(t, err)
		defer src1.Close()
		src2, err := os.Open(clientCA2CertFile)
		require.NoError(t, err)
		defer src2.Close()

		dst, err := os.Create(clientCABothCertFile)
		require.NoError(t, err)
		defer dst.Close()

		_, err = io.Copy(dst, src1)
		require.NoError(t, err)
		_, err = io.Copy(dst, src2)
		require.NoError(t, err)
	}()

	client1CertFile := filepath.Join(testCADir, "client-1.crt")
	client1KeyFile := filepath.Join(testCADir, "client-1.key")
	require.NoError(t, testClientCA1.WriteCertificate(
		&x509.Certificate{
			Subject:     pkix.Name{CommonName: "client-1"},
			ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
		},
		client1CertFile,
		client1KeyFile,
	))

	client2CertFile := filepath.Join(testCADir, "client-2.crt")
	client2KeyFile := filepath.Join(testCADir, "client-2.key")
	require.NoError(t, testClientCA2.WriteCertificate(
		&x509.Certificate{
			Subject:     pkix.Name{CommonName: "client-2"},
			ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
		},
		client2CertFile,
		client2KeyFile,
	))

	return keyMaterial{
		caCertFile:                caCertFile,
		serverCertFile:            serverCertFile,
		serverKeyFile:             serverKeyFile,
		serverNoLocalhostCertFile: serverNoLocalhostCertFile,
		server


croll": "Перетащите сюда для прокрутки",
    "export_csv": "Экспорт CSV",
    "export_csv_progress": "Создание CSV, пожалуйста, подождите...",
    "export_images": "Экспорт изображений",
    "export_images_progress": "Рендеринг изображений, пожалуйста, подождите...",
    "export_pdf": "Экспорт PDF",
    "export_pdf_progress": "Создание PDF, пожалуйста, подождите...",
    "new_folder": "Новая папка",
    "new_list": "Новый список",
    "no_entries": "Нет записей в этом списке слов",
    "node_hint_text": "Имя",
    "ok": "хорошо",
    "page": "страница",
    "rename": "Переименовать",
    "screensaver_use_as": "Используйте в качестве заставки",
    "search_history": "История поиска",
    "send_to_anki": "Отправить в anki",
    "send_to_anki_progress": "Отправка в Энки, пожалуйста, подождите...",
    "title": "Списки слов",
    "tutorial_begin_text": "Мы покажем вам краткое руководство, чтобы вы могли начать.",
    "tutorial_begin_title": "Добро пожаловать на экран списков слов!",
    "tutorial_create_folder": "Создать новую папку со списком слов можно либо нажатием этой кнопки, либо перетаскиванием списка слов на другую папку. Перетаскивая папки и списки, можно также изменять их порядок.",
    "tutorial_create_list": "С помощью этой кнопки можно создать новый список слов. С помощью меню-кнопки, расположенного справа от этого списка, можно также экспортировать список в различные форматы.",
    "tutorial_folder": "Это папка со списком слов. В ней можно хранить другие папки со списками слов или списки слов.\nЭто также папка со списком слов по умолчанию. Она содержит некоторые списки слов, основанные на JLPT, истории поиска и т.д.",
    "tutorial_list": "Это список слов. Нажав на него, можно увидеть его содержимое."
  },
  "YoutubeScreen": {
    "title": "YouTube",
    "tutorial_begin_text": "Мы покажем вам краткое руководство, чтобы вы могли начать.",
    "tutorial_begin_title": "Добро пожаловать на экран YouTube!"
  }
};
static const Map<String,dynamic> pl = {
  "AboutScreen": {
    "about_text": "\"DaKanji\" pomaga studentom języka japońskiego i osobom, które go używają.\n\"DaKanji\" jest dostępny dla [iOS]({APPSTORE_PAGE}), [Android]({PLAYSTORE_PAGE}), [MacOS]({MACSTORE_PAGE}),


 If anyone would like to add more
organs, I would love for you to contribute.

 To create these
plots, I have added two other objects other_key and other_list.

These are lists within lists, and to plot all the organs from an
organisms use other_key\[\[“organism”\]\] as data, and “organism” as
organism.
 Also, the organ names are so far a mix of UBERON and
plant ids.

``` r
length(other_key)
#> [1] 24
names(other_key)
#>  [1] "anolis_carolinensis"
#>  [2] "arabidopsis_thaliana"
#>  [3] "bos_taurus"
#>  [4] "brachypodium_distachyon.flower_parts"
#>  [5] "brachypodium_distachyon.whole_plant"
#>  [6] "gallus_gallus"
#>  [7] "hordeum_vulgare.flower_parts"
#>  [8] "hordeum_vulgare.whole_plant"
#>  [9] "macaca_mulatta"
#> [10] "monodelphis_domestica"
#> [11] "oryza_sativa.flower_parts"
#> [12] "oryza_sativa.whole_plant"
#> [13] "papio_anubis"
#> [14] "rattus_norvegicus"
#> [15] "solanum_lycopersicum.flower_parts"
#> [16] "solanum_lycopersicum.whole_plant"
#> [17] "sorghum_bicolor.flower_parts"
#> [18] "sorghum_bicolor.whole_plant"
#> [19] "tetraodon_nigroviridis"
#> [20] "triticum_aestivum.flower_parts"
#> [21] "triticum_aestivum.whole_plant"
#> [22] "xenopus_tropicalis"
#> [23] "zea_mays.flower_parts"
#> [24] "zea_mays.whole_plant"
```

To plot bos_taurus use the following command. Unfortunately, I have not
managed to add the correct names yet.

``` r
other_key[["bos_taurus"]]
#>             organ  type  colour     value
#> 2        duodenum other #E41A1C 11.381132
#> 3           brain other #377EB8  2.264810
#> 4          kidney other #4DAF4A  4.131599
#> 5            lung other #984EA3  3.182946
#> 6           colon other #FF7F00  3.114481
#> 7           heart other #FFFF33 13.141334
#> 8           liver other #A65628 17.251310
#> 9  pulmonary vein other #F781BF 13.414659
#> 19 UBERON_0001013 other #999999 12.126515
#> 20 UBERON_0001013 other #66C2A5  1.898023
#> 21 UBERON_0001013 other #FC8D62 19.290389
#> 22 UBERON_0014892 other #8DA0CB 10.994221
#> 23 UBERON_0014892 other #E78AC3 16.761115
#> 24 UBERON_0014892 other #A6D854  2.468627
#> 25 UBERON_0014892 other #FFD92F  1.556285
#> 26 UBERON_0014892 other #E5C494  3.461740
#> 27 UBERON_0014892 other #B3B3B3 18.595027

gganatogram(data=other_key[["bos_taurus"]], outline = T, fillOutline='white',


;
    opacity: 0;
    padding: 10px;
    pointer-events: none;
    position: absolute;
    top: 0;
    -webkit-transform: scale(0.96);
            transform: scale(0.96);
    width: 100%;
    z-index: -1; }
.articleRepWrapper:hover::before {
    -webkit-animation: tapAnimation 0.25s cubic-bezier(0.31, 1, 0.34, 1) forwards;
            animation: tapAnimation 0.25s cubic-bezier(0.31, 1, 0.34, 1) forwards; }
.articleRepWrapper .cover {
    max-height: none;
    min-width: 477px;
    position: relative;
    top: 50%;
    -webkit-transform: translateY(-50%);
            transform: translateY(-50%); }
.articleRepWrapper .profileImage {
    border: 3px solid #fff;
    border-radius: 50%; }
.articleRepWrapper .profileImageWrapper {
    bottom: -8px;
    height: 50px;
    left: 16px;
    position: absolute;
    width: 50px;
    z-index: 3; }
.articleRepWrapper .promotedCurator {
    padding-left: 4px; }
.articleRepWrapper .title {
    max-height: 50px;
    width: 477px; }
@keyframes tapAnimation {
  0% {
    opacity: 1;
    -webkit-transform: scale(0.96);
            transform: scale(0.96); }
  100% {
    opacity: 1;
    -webkit-transform: scale(1);
            transform: scale(1); } }
.exploreBoardContainer {
  height: 330px; }
.exploreBoardContainer div[class^="Mask-rounded"] {
    border-radius: 12px; }
.exploreBoardContainer .imageWash {
    background: rgba(0, 0, 0, 0.05);
    height: 100%;
    width: 100%;
    z-index: 1; }
.exploreBoardContainer::before {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    content: " ";
    height: 100%;
    left: 0;
    margin: -10px;
    opacity: 0;
    padding: 10px;
    pointer-events: none;
    position: absolute;
    top: 0;
    -webkit-transform: scale(0.96);
            transform: scale(0.96);
    width: 100%;
    z-index: -1; }
.exploreBoardContainer:hover::before {
    -webkit-animation: tapAnimation 0.25s cubic-bezier(0.31, 1, 0.34, 1) forwards;
            animation: tapAnimation 0.25s cubic-bezier(0.31, 1, 0.34, 1) forwards; }
.exploreBoardContainer .profileImage {
    border: 3px solid #fff;
    border-radius: 50%; }
.exploreBoardContainer .profileImageWrapper {
    bottom: -8px;
    height: 50px;
    left: 16px;
    position: absolute;
    width: 50px;
    z-index: 1; }
.collageWrapper .moreItem {
  z-index: 1; }
.collageWrapper .menuItem {
  cursor: pointer;
  position: relative; }
.collageWrapper .menuItem:focus, .collageWrapper .menuItem:hover {
    border: 0; }
.collageWrapper .menuItem:focus .caption, .collageWrapper .menuItem:hover .caption {
      color: rgba(0, 0, 0, 0.7); }
.collageWrapper .menuItem:focus svg, .collageWrapper .menuItem:hover svg {
      fill: rgba(0, 0, 0, 0.7); }
.collageWrapper .grid {
  display: none;
  width: 100%; }
.collageWrapper .collage, .collageWrapper .feedHeader {
  max-width: 992px;
  width: 100%; }
.collageWrapper .feedHeader {
  b


格 sku
	Comments []*CommentBase         `orm:"with:object_id=id, where:type=1"`
}

type BaseGoodsColumns struct {
	gmeta.Meta `orm:"table:goods_info"`
	Id         string `json:"id"`
	Name       string `json:"name"`
	Price      int    `json:"price"`
	Brand      string `json:"brand"`
	Tags       string `json:"tags"`
	PicUrl     string `json:"pic_url"`
	DetailInfo string `json:"detail_info"`
}
package model

import (
	"github.com/gogf/gf/v2/frame/g"
	"goframe-shop-v2/api/backend"
)

type AddressBase struct {
	ParentId int    `json:"parentId" description:"父级id"`
	Name     string `json:"name" description:"名称"`
	Status   uint8  `json:"status" description:"状态"`
}

// AddAddressInput 新增地址
type AddAddressInput struct {
	AddressBase
}
type AddAddressOutput struct {
	Id int `json:"id" dc:"id"`
}

// UpdateAddressInput 更新地址
type UpdateAddressInput struct {
	Id int `json:"id" dc:"id"`
	AddressBase
}
type UpdateAddressOutput struct{}

// DeleteAddressInput 删除地址
type DeleteAddressInput struct {
	Id int `json:"id" dc:"id"`
}
type DeleteAddressOutput struct{}

// PageAddressInput 获取地址
type PageAddressInput struct {
	backend.CommonPaginationReq
}
type PageAddressOutput struct {
	backend.CommonPaginationRes
}

// 客户端获取省市县区地址
type CityAddressListOutput struct {
	List []CityAddressListOutputItem `json:"list" description:"列表"`
}

type CityAddressListOutputItem struct {
	g.Meta   `orm:"table:address_info"`
	Id       int                         `json:"id"`
	Name     string                      `json:"name"`
	Pid      int                         `json:"pid"`
	Status   int                         `json:"status" `
	Children []CityAddressListOutputItem `json:"Children" orm:"with:pid=id"`
}
package model

import "github.com/gogf/gf/v2/os/gtime"

// CategoryCreateUpdateBase 创建/修改内容基类
type CategoryCreateUpdateBase struct {
	ParentId uint
	PicUrl   string
	Name     string
	Sort     uint8
	Level    uint8
}

// CategoryCreateInput 创建内容
type CategoryCreateInput struct {
	CategoryCreateUpdateBase
}

// CategoryCreateOutput 创建内容返回结果
type CategoryCreateOutput struct {
	CategoryId int `json:"category_id"`
}

// CategoryUpdateInput 修改内容
type CategoryUpdateInput struct {
	CategoryCreateUpdateBase
	Id uint
}

// CategoryGetListInput 获取内容列表
type CategoryGetListInput struct {
	Page int // 分页号码
	Size int // 分页数量，最大50
	Sort int // 排序类型(0:最新, 默认。1:活跃, 2:热度)
}

// CategoryGetListOutput 查询列表结果
type CategoryGetListOutput struct {
	List  []CategoryGetListOutputItem `json:"list" description:"列表"`
	Page  int                         `json:"page" description:"分页码"`
	Size  int                         `json:"size" description:"分页数量"`
	Total int                         `json:"total" description:"数据总数"`
}

// CategorySearchInput 搜索列表
type CategorySearchInput struct {
	Key        string // 关键字
	Type       string // 内容模型
	CategoryId uint   // 栏目ID


# Copyright (c) 2021 - present / Neuralmagic, Inc. 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.

import os

import pytest

@pytest.mark.skipif(
    os.getenv("NM_ML_SKIP_TENSORFLOW_TESTS", False),
    reason="Skipping tensorflow_v1 tests",
)
def test_tf_compat():
    from sparseml.tensorflow_v1.utils import tf_compat

    assert tf_compat
    assert tf_compat.Graph

@pytest.mark.skipif(
    os.getenv("NM_ML_SKIP_TENSORFLOW_TESTS", False),
    reason="Skipping tensorflow_v1 tests",
)
def test_tf_compat_div():
    from sparseml.tensorflow_v1.utils import tf_compat_div

    assert tf_compat_div


for (Map.Entry<String, ZhanDangVO> entry : map.entrySet()) {
				int countN = entry.getValue().getYLsum() > 25 ? 25 : entry.getValue().getYLsum();
				PeriodAutoOdds periodAutoOdds = autoOddsMap.get("N_" + countN);
				// p==null ==0說明 沒有設置自動將賠 不需要修改賠率
				if ((null == periodAutoOdds || periodAutoOdds.getAutoOdds().compareTo(BigDecimal.ZERO) == 0)) {
					continue;
				} else {
					for (Map.Entry<String, String> entryGD : ConstantType.GD_MAP.entrySet()) {
						String typeCode = "";
						if (option.equals(Constant.GDKLSF_YILOU)) {
							typeCode = "GDKLSF_BALL_" + entryGD.getValue() + "_" + entry.getKey();
						} else if (option.equals(Constant.NC_YILOU)) {
							typeCode = "NC_BALL_" + entryGD.getValue() + "_" + entry.getKey();
						}

						if (StringUtils.isNotEmpty(typeCode)) {
							ShopsPlayOdds shopsPlayOdds = shopPlayOddsMap.get(typeCode);
							if (null != shopsPlayOdds) {
								BigDecimal orginOdds = shopsPlayOdds.getRealOdds();
								BigDecimal changeOdds = orginOdds.subtract(periodAutoOdds.getAutoOdds());
								// 如果更新后的赔率少于0,则更新为0
								changeOdds = (changeOdds.compareTo(BigDecimal.ZERO) == -1) ? BigDecimal.ZERO : changeOdds;
								shopsPlayOdds.setRealOdds(changeOdds);
								shopsPlayOddsList.add(shopsPlayOdds);
								log.info("-------处理商铺(" + pO.getShopCode() + ")" + option + "遗漏------(" + countN + ")typeCode:" + typeCode + "原来赔率:" + orginOdds + "更新后赔率:" + changeOdds);
							}
						}
					}
				}

			}

			log.info("完成" + pO.getType() + "遗漏" + pO.getShopCode() + "赔率初始化操作:" + (System.currentTimeMillis() - startTime) + "MS");

			if (!CollectionUtils.isEmpty(shopsPlayOddsList)) {
				long startTime2 = System.currentTimeMillis();
				shopOddsLogic.updateRealOddsBatchById(shopsPlayOddsList);
				log.info("完成" + pO.getType() + "遗漏" + pO.getShopCode() + "赔率update操作:" + (System.currentTimeMillis() - startTime2) + "MS");
			}
		}
	}

	@Override
	public Map<String, ZhanDangVO> initGDYL() {
		log.info("<--廣東 遺漏自動降賠 設置 start-->");
		Map<String, ZhanDangVO> mapYL = new HashMap<String, ZhanDangVO>();
		mapYL = replenishLogic.notAppearCnt(mapYL);// 统计广东遗漏
		return mapYL;
	}

	@Override
	public Map<String, ZhanDangVO> initNCYL() {
		log.info("<--农场 遺漏自動降賠 設置 start-->");
		Map<String, ZhanDangVO> mapYL = new HashMap<String, ZhanDangVO>();
		mapYL = replenishLogic.notAppearCntForNc(mapYL);// 统计农场遗漏
		return mapYL;
	}

	/**
	 * 判断连出或者连没出,连出为正数,连没出为负数
	 *
	 * @param str
	 * @return
	 */
	private static int getMaxLength(final


, 0, 2f)
	.word 0xbf7ce401  ! 7197: MOVR_I	movre	%r19, 0x1, %r31
	.word 0xb9a5c9c0  ! 7198: FDIVd	fdivd	%f54, %f0, %f28
T2_hwint_945:
!$EV trig_pc_d(2,expr(@VA(.MAIN.T2_hwint_945), 16, 16)) -> intp(2, 0, 2d)
	.word 0xba35c000  ! 7200: ORN_R	orn 	%r23, %r0, %r29
	ta	T_CHANGE_HPRIV
	mov	0x80, %g1
	mov	0x140, %g2
	stxa	%g2, [%g1] 0x40
	wrpr	%g0, 0, %tick
	wr	%g0, 0xbd, %tick_cmpr
	wr	%g0, 0xfd, %sys_tick_cmpr
	wrhpr	%g0, 0xdf, %hsys_tick_cmpr
	.word 0x81983e99  ! 7201: WRHPR_HPSTATE_I	wrhpr	%r0, 0x1e99, %hpstate
	.word 0xb7e46090  ! 7203: SAVE_I	save	%r17, 0x0001, %r27
	.word 0xb57c2401  ! 7204: MOVR_I	movre	%r16, 0x1, %r26
T2_hwint_946:
!$EV trig_pc_d(2,expr(@VA(.MAIN.T2_hwint_946), 16, 16)) -> intp(2, 0, 1e)
	.word 0xbfa509c0  ! 7206: FDIVd	fdivd	%f20, %f0, %f62
	.word 0xb3e5c000  ! 7208: SAVE_R	save	%r23, %r0, %r25
T2_irf_ce_592:
!$EV error(2,expr(@VA(.MAIN.T2_irf_ce_592), 16, 16),1,IRF,ce,36,43, x,x,x, x,x,x)
	.word 0xbab56130  ! 7211: SUBCcc_I	orncc 	%r21, 0x0130, %r29
	.word 0xbc35a0d3  ! 7212: SUBC_I	orn 	%r22, 0x00d3, %r30
T2_irf_ce_593:
!$EV error(2,expr(@VA(.MAIN.T2_irf_ce_593), 16, 16),1,IRF,ce,29,61, x,x,x, x,x,x)
	.word 0xb77c2401  ! 7215: MOVR_I	movre	%r16, 0x1, %r27
	.word 0xb5a9c820  ! 7215: FMOVVS	fmovs	%fcc1, %f0, %f26
T2_irf_ce_594:
!$EV error(2,expr(@VA(.MAIN.T2_irf_ce_594), 16, 16),1,IRF,ce,26,16, x,x,x, x,x,x)
	.word 0xbaade0e2  ! 7220: ANDNcc_I	andncc 	%r23, 0x00e2, %r29
	.word 0xb9a44960  ! 7220: FMULq	dis not found

T2_hwint_947:
!$EV trig_pc_d(2,expr(@VA(.MAIN.T2_hwint_947), 16, 16)) -> intp(2, 0, 21)
	.word 0xb3a589a0  ! 7223: FDIVs	fdivs	%f22, %f0, %f25
	.word 0xbe0c8000  ! 7224: AND_R	and 	%r18, %r0, %r31
	.word 0xba05605d  ! 7225:


c/api.php",
        "item": "",
        "m3u8": "name=\"copy_sel.*>(.*\\$http.*?m3u8)",
        "cover": "<img class=\"lazy\" src=\"(.*?)\" alt"
    },
    {
        "name": "最新",
        "server": "http://www.zuixinzy.net/",
        "title": ".*?target=\"_blank\">(.*?)",
        "link": "(.*\\$http.*?m3u8)",
        "cover": "<img class=\"lazy\" src=\"(.*?)\" alt"
    },
    {
        "name": "卧龙",
        "server": "http://www.apiokzy.com/",
        "title": ".*?target=\"_blank\">(.*?)",
        "link": "(.*\\$http.*?m3u8)",
        "cover": "<img class=\"lazy\" src=\"(.*?)\" alt"
    },
    {
        "name": "麻花",
        "server": "http://www.mahuazy.net/",
        "title": ".*?target=\"_blank\">(.*?)",
        "link": "(.*\\$http.*?m3u8)",
        "cover": "<img class=\"lazy\" src=\"(.*?)\" alt"
    }
]
''';

String MOVIES = '''
[{
        "title": "你的婚礼",
        "desp": "她喜欢他，他爱她，他们最终没能在一起。都说，爱错了是青春，爱对了是爱情。而最后都不及一句，谢谢你，让我认识你，成全了我自己。",
        "cover": "https://img3.doubanio.com/view/photo/l/public/p2528205132.webp",
        "playlist": [{
            "name": "HD高清",
            "m3u8": "http://sohu.com-v-sohu.com/20180927/13039_830bbefc/index.m3u8"
        }]
    },
    {
        "title": "升级",
        "desp": "赛博朋克复古风格、人体生化改造的概念、眩晕急促的动作戏运镜（非常想知道这些镜头是如何实现的）和血腥不留情的复仇故事结合得很酷炫，在有限的成本与格局下也保持住


d Reporting
------------------------------------------------------------------------------------------ '''

''' Stage 5a: Data Drift

Our model is now in production and being used in practice. We need to monitor its stability.
One approach is to monitor the distribution of the input data versus the data the model was
trained with . If the distributions have shifted the model outcomes could be invalidated.
Here we use our function **data_drift_psi** to monitor data drift.

Is it time for us to retrain our model?
'''

# Prepare train and test data for data drift check
train_datadrift = pd.concat([X_train, y_train], axis=1)
test_datadrift = pd.concat([X_test, y_test], axis=1)

# Data drift check...
data_drift_features = GovernanceUtils.data_drift_psi(train_datadrift,test_datadrift,buckettype='bins',buckets=10,axis=1,single_variable=False)
data_drift_target = data_drift_features[-1]

# Print out the CSI values for each feature and the overall target PSI value:
print("Target PSI value is ",data_drift_target, "\n" )

train_datadrift.columns

''' Stage 5b: Challenger Models

Remember that we selected a classifier based on its F1 score performance?
We can use the other models that we trained at that time, to provide another check on our
live model. This is called a **challenger model**.
'''

# Run the challenger ensemble
y_test_hat, ens_mdl = GovernanceUtils.challenger_ensemble_run(all_mdls=all_models,
                        all_mdls_desc=all_models_desc,
                        all_mdls_prec=all_mdls_prec,
                        X_train=X_train,
                        y_train=y_train,
                        X_test=X_test)

# Do we need to retrain the live model?
challenger_check_warning = GovernanceUtils.challenger_review_live(live_mod=max_mdl, challenger_mod=ens_mdl, X_test=X_test, y_test=y_test)

# Now we see if there are any warnings to do with the performance of our live model versus the Challenger model:
# ... '' means ... no warnings
challenger_check_warning

# In this case the **challenger model** is superior to our live model in terms of both recall
# (identifying FNs), and also precision (identifying FP).

# Maybe it is time for us to redevelop our model?

'''AFTERWORD

We have done our best to include the key themes of what we think are the critical stages of model
development in this notebook, but clearly in practice many more checks and details would be added
to each of the 5 model development stages to best ensure stakeholder's KPIs are met and governance
standards would be as high as possible. Hopefully our example and key themes will provide insight
to avoid many of the classic biases in model development.

'''


)$"):lower()
  elseif hl_name:find("^TSString%u") then
    return "@string." .. hl_name:match("^TSString%a-(%u%a+)$"):lower()
  elseif hl_name:find("^TSTag%u") then
    return "@tag." .. hl_name:match("^TSTag(%a+)$"):lower()
  elseif hl_name:find("^TSType%u") then
    return "@type." .. hl_name:match("^TSType(%a+)$"):lower()
  elseif hl_name:find("^TSVariable%u") then
    return "@variable." .. hl_name:match("^TSVariable(%a+)$"):lower()
  end
  -- NOTE: TSModuleInfoGood/Bad are defined for the command :TSModuleInfo of
  -- nvim-treesitter/nvim-treesitter.
  if hl_name:find("^TS%u%l+$") then
    return "@" .. hl_name:match("^TS(%u%l+)$"):lower()
  end
  return hl_name
end)

--- Trim colors_name prefix, e.g., relink GruvboxRed, GruvboxGreen, ..., to
--- Red, Green, ...
M.trim_colors_name_prefix = new_addable_relinker(function(hl_name)
  if hl_name == false then
    return false
  end
  local colors_name = vim.g.colors_name
  if colors_name == nil then
    -- i.e., the "default" colorscheme.
    return hl_name
  end
  if hl_name:lower():find("^" .. colors_name .. "%a") then
    return hl_name:sub(#colors_name + 1)
  end
  return hl_name
end)

M.recommended = new_addable_relinker(
  M.no_typo
    + M.no_superseded
    -- NOTE: It might be undesirable for general users to exclude
    -- lsp-semantic-highlight.
    -- + M.no_lsp_semantic_highlight
    + M.no_TS_prefixed
    + M.trim_colors_name_prefix
)

return mt_utils.new_readonly(M)


arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(i(299));return d(E,h,null,v)},_t.flushSync=function(E){var h=g.T,v=o.p;try{if(g.T=null,o.p=2,E)return E()}finally{g.T=h,o.p=v,o.d.f()}},_t.preconnect=function(E,h){typeof E=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(E,h))},_t.prefetchDNS=function(E){typeof E=="string"&&o.d.D(E)},_t.preinit=function(E,h){if(typeof E=="string"&&h&&typeof h.as=="string"){var v=h.as,S=m(v,h.crossOrigin),R=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(E,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:S,integrity:R,fetchPriority:x}):v==="script"&&o.d.X(E,{crossOrigin:S,integrity:R,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},_t.preinitModule=function(E,h){if(typeof E=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=m(h.as,h.crossOrigin);o.d.M(E,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(E)},_t.preload=function(E,h){if(typeof E=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,S=m(v,h.crossOrigin);o.d.L(E,v,{crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},_t.preloadModule=function(E,h){if(typeof E=="string")if(h){var v=m(h.as,h.crossOrigin);o.d.m(E,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(E)},_t.requestFormReset=function(E){o.d.r(E)},_t.unstable_batchedUpdates=function(E,h){return E(h)},_t.useFormState=function(E,h,v){return g.H.useFormState(E,h,v)},_t.useFormStatus=function(){return g.H.useHostTransitionStatus()},_t.version="19.2.


 7);

    return jwt.sign({
      // _id: this._id,
      email: this.user.email,
      exp: +(expiry.getTime() / 1000)
    }, "MY_SECRET"); // DO NOT KEEP YOUR SECRET IN THE CODE!
  }
}
/**
 * Get the session token from the Authorization header
 */
export function extractToken(req): string | undefined {
  const authHeader = req.get('Authorization');
  const matches = authHeader.match(/JWT\s+(.+)$/i);

  if (matches) {
    return matches[1];
  }
}
import {Injectable} from '@angular/core';
import {Http, Response, Headers} from '@angular/http';
import { Observable } from 'rxjs/Rx';
import {Data} from '../../app/data/data';
import {Size} from '../../app/data/size';

@Injectable()
export class DataService {
    private baseUrl: string = 'http://localhost:8080/rxdecision';
    private data: Data[];
    private size: Size;

    constructor(private http: Http) {}

    getSelected( first:number): Observable<Data[]>{
        let data$ = this.http
            .get(`${this.baseUrl}/selected?first=${first}`, {headers: this.getHeaders()})
            .map(mapData)
            .catch(handleError);
        console.log(' object array:' , data$)
        return data$;
    }

    getAll(): Observable<Data[]>{
        let data$ = this.http
            .get(`${this.baseUrl}/alldata`, {headers: this.getHeaders()})
            .map(mapData)
            .catch(handleError);
        console.log(' object array:' , data$)
        return data$;
    }

    getSize(): Observable<Size>{
        let size$ = this.http
            .get(`${this.baseUrl}/size`, {headers: this.getHeaders()})
            .map(mapSize)
            .catch(handleError);
            return size$;
    }

    private getHeaders(){
        let headers = new Headers();
        headers.append('Accept', 'application/json');
        return headers;
    }
}

function mapSize(response:Response): Size {

    return toSize(response.json());
}

function toSize(r:any): Size{
    let size = <Size> ({size:  r.size});
    console.log('Parsed size:', size);
    return size;
}

function mapData(response:Response): Data[]{
    // uncomment to simulate error:
    // throw new Error('ups! Force choke!');

    // The response of the API has a results
    // property with the actual results
    this.data = response.json().map(toData);
    console.log("value of test");
    console.log(this.data)
    console.log("value of test");
    return this.data;
}

function toData(r:any): Data{
    let data = <Data>({
        s: r.id,
        md5: r.md5,
        md1: r.md1
    });
    console.log('Parsed person:', data);
    return data;
}

function handl


-api-key'],
        },
      });
    });

    it('generates apikey plugin with funny casing', async () => {
      const scheme: OA3SecurityScheme = {
        // @ts-expect-error intentionally invalid -- using strange casing.  Yes, technically speaking the type of OA3SecurityScheme['type'] should be `string`, but we really only support strange casing like this for backwards compat.  We want the types to reflect the API we're aiming for, even though we're technically a bit more permissive.
        type: 'ApIKeY',
        in: 'header',
        name: 'x-api-key',
      };

      const result = generateSecurityPlugin(scheme, [], tags);
      expect(result).toEqual({
        name: 'key-auth',
        tags,
        config: {
          key_names: ['x-api-key'],
        },
      });
    });
  });
});
import { BASE_TIMESTAMP } from '../..';
import { SKIPPED, throttle, THROTTLED } from '../../../src/util/throttle';

jest.useFakeTimers();

describe('Unit | util | throttle', () => {
  it('executes when not hitting the limit', () => {
    const now = BASE_TIMESTAMP;
    jest.setSystemTime(now);

    const callback = jest.fn();
    const fn = throttle(callback, 100, 60);

    fn();
    fn();
    fn();

    expect(callback).toHaveBeenCalledTimes(3);

    jest.advanceTimersByTime(59_000);

    fn();
    fn();

    expect(callback).toHaveBeenCalledTimes(5);

    jest.advanceTimersByTime(1_000);

    fn();

    expect(callback).toHaveBeenCalledTimes(6);

    jest.advanceTimersByTime(1_000);

    fn();

    expect(callback).toHaveBeenCalledTimes(7);
  });

  it('stops executing when hitting the limit', () => {
    const now = BASE_TIMESTAMP;
    jest.setSystemTime(now);
    const callback = jest.fn();
    const fn = throttle(callback, 5, 60);

    fn();
    fn();
    fn();

    expect(callback).toHaveBeenCalledTimes(3);

    jest.advanceTimersByTime(59_000);

    fn();
    fn();

    expect(callback).toHaveBeenCalledTimes(5);

    jest.advanceTimersByTime(1_000);

    fn();
    fn();
    fn();
    fn();

    expect(callback).toHaveBeenCalledTimes(5);

    // Now, the first three will "expire", so we can add three more
    jest.advanceTimersByTime(1_000);

    fn();
    fn();
    fn();
    fn();

    expect(callback).toHaveBeenCalledTimes(8);
  });

  it('has correct return value', () => {
    const now = BASE_TIMESTAMP;
    jest.setSystemTime(now);

    const callback = jest.fn(() => 'foo');
    const fn = throttle(callback, 5, 60);

    expect(fn()).toBe('foo');
    expect(fn()).toBe('foo');
    expect(fn()).toBe('foo');
    expect(fn()).toBe('foo');
    expect(fn()).toBe('foo');
    expect(fn()).toBe(THROTTLED);
    expect(fn()).toBe(SKIPPED);
    expect(fn()).toBe(SKIPPED);

    // After 61s, should be reset
    jest.advanceTimersByTime(61_000);

    expect(fn()).toBe('foo');
    expect(fn()).toBe('foo');
    expect(fn()).toBe('foo');
    expect(fn()).toBe('foo');
    expect(fn()).toBe('foo');
    expect(fn()).toBe(THROTTLED);
    expect(fn()).toBe(SKIPPED);
    expect(fn()).toBe(SKIPPED);
  });

  it('passes args correctly', () => {
    const now = BASE_TIMESTAMP;
    jest.setSystemTime(now);

    const originalFunction = (a: number, b: number) =


.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-primary:hover{color:#3071a9}.text-warning{color:#c09853}.text-warning:hover{color:#a47e3c}.text-danger{color:#b94a48}.text-danger:hover{color:#953b39}.text-success{color:#468847}.text-success:hover{color:#356635}.text-info{color:#3a87ad}.text-info:hover{color:#2d6987}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{margin-top:20px;margin-bottom:10px}h1 small,h2 small,h3 small,h1 .small,h2 .small,h3 .small{font-size:65%}h4,h5,h6{margin-top:10px;margin-bottom:10px}h4 small,h5 small,h6 small,h4 .small,h5 .small,h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}.list-inline>li:first-child{padding-left:0}dl{margin-bottom:20px}dt,dd{line-height:1.428571429}dt{font-weight:bold}dd{margin-left:0}@media(min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}blockquote p:last-ch


us</button>
        1
        <button onclick="changePage(1)">Next</button>

{% extends 'root.html' %}

{% block content %}

{{ TITLE }}

        <button style="font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
         font-size: large;" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        </


aste: {
			styleType: 'overall-border-radius',
		},
	},
	bgPadding: {
		type: 'number',
		default: 20,
		UAGCopyPaste: {
			styleType: 'timeline-bg-padding',
		},
	},
	contentPadding: {
		type: 'number',
		default: 10,
		UAGCopyPaste: {
			styleType: 'desc-padding',
		},
	},
	iconSize: {
		type: 'number',
		default: 15,
		UAGCopyPaste: {
			styleType: 'icon-size',
		},
	},
	ctaColor: {
		type: 'string',
		UAGCopyPaste: {
			styleType: 'btn-color',
		},
	},
	ctaBackground: {
		type: 'string',
		UAGCopyPaste: {
			styleType: 'btn-bg-color',
		},
	},
	stack: {
		type: 'string',
		default: 'tablet',
	},
	linkTarget: {
		type: 'boolean',
		default: false,
	},
	// Exclude Current Post.
	excludeCurrentPost: {
		type: 'boolean',
		default: false,
	},
	leftMargin: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-left-margin',
		},
	},
	rightMargin: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-right-margin',
		},
	},
	topMargin: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-top-margin',
		},
	},
	bottomMargin: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-bottom-margin',
		},
	},
	leftMarginTablet: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-left-margin-tablet',
		},
	},
	rightMarginTablet: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-right-margin-tablet',
		},
	},
	topMarginTablet: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-top-margin-tablet',
		},
	},
	bottomMarginTablet: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-bottom-margin-tablet',
		},
	},
	leftMarginMobile: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-left-margin-mobile',
		},
	},
	rightMarginMobile: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-right-margin-mobile',
		},
	},
	topMarginMobile: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-top-margin-mobile',
		},
	},
	bottomMarginMobile: {
		type: 'number',
		UAGCopyPaste: {
			styleType: 'post-bottom-margin-mobile',
		},
	},
	marginUnit: {
		type: 'string',
		default: 'px',
		UAGCopyPaste: {
			styleType: 'post-margin-unit',
		},
	},
	mobileMarginUnit: {
		type: 'string',
		default: 'px',
		UAGCopyPaste: {
			styleType: 'post-margin-unit-mobile',
		},
	},
	tabletMarginUnit: {
		type: 'string',
		default: 'px',
		UAGCopyPaste: {
			styleType: 'post-margin-unit-tablet',
		},
	},
	marginLink: {
		type: 'boolean',
		default: false,
	},


orHandler")

		webAPIConfig := webapi.ServiceConfig{
			OutgoingRateLimiter: ratelimit.RateLimiterConfig{
				GlobalRPS:      webapi.DefaultGlobalRPS,
				GlobalBurst:    webapi.DefaultGlobalBurst,
				PerSenderRPS:   webapi.DefaultWorkflowRPS,
				PerSenderBurst: webapi.DefaultWorkflowBurst,
			},
			RateLimiter: ratelimit.RateLimiterConfig{
				GlobalRPS:      100.0,
				GlobalBurst:    100,
				PerSenderRPS:   100.0,
				PerSenderBurst: 100,
			},
		}

		och, err := webapi.NewOutgoingConnectorHandler(connector,
			webAPIConfig,
			ghcapabilities.MethodWorkflowSyncer, outgoingConnectorLggr, s.selectorOpts...)
		if err != nil {
			return fmt.Errorf("could not create outgoing connector handler: %w", err)
		}

		s.och = och
		return och.Start(ctx)
	})
}

func (s *FetcherService) Close() error {
	return s.StopOnce("FetcherService", func() error {
		return s.och.Close()
	})
}

func (s *FetcherService) HealthReport() map[string]error {
	return map[string]error{s.Name(): s.Healthy()}
}

func (s *FetcherService) Name() string {
	return s.lggr.Name()
}

// Fetch fetches the given URL and returns the response body.  n is the maximum number of bytes to
// read from the response body.  Set n to zero to use the default size limit specified by the
// configured gateway's http client, if any.
func (s *FetcherService) Fetch(ctx context.Context, messageID string, req ghcapabilities.Request) ([]byte, error) {
	if req.WorkflowID == "" {
		return nil, errors.New("invalid call to fetch, must provide workflow ID")
	}

	resp, err := s.och.HandleSingleNodeRequest(ctx, messageID, req)
	if err != nil {
		return nil, err
	}

	if err = resp.Validate(); err != nil {
		return nil, fmt.Errorf("invalid response from gateway: %w", err)
	}

	s.lggr.Debugw("received gateway response", "donID", resp.Body.DonId, "msgID", resp.Body.MessageId, "receiver", resp.Body.Receiver, "sender", resp.Body.Sender)

	var payload ghcapabilities.Response
	if err = json.Unmarshal(resp.Body.Payload, &payload); err != nil {
		return nil, err
	}

	if err = payload.Validate(); err != nil {
		return nil, fmt.Errorf("invalid payload received from gateway message: %w", err)
	}

	if payload.ExecutionError {
		return nil, fmt.Errorf("execution error from gateway: %s", payload.ErrorMessage)
	}

	if payload.StatusCode < 200 || payload.StatusCode >= 300 {
		// NOTE: redirects are currently not supported
		return payload.Body, fmt.Errorf("request failed with status code: %d", payload.StatusCode)
	}

	return payload.Body, nil
}

// NewFetcher creates a new FetcherFunc based on the provided URL configuration
// The implementation supports both file and HTTP(S) URLs and bypasses the gateway
func NewFetcherFunc(baseURL string, lggr logger.Logger) (types.FetcherFunc, error) {
	if baseURL == "" {
		return nil, errors.New("baseURL cannot be empty")
	}

	u, err := url.Parse(baseURL)
	if err != nil {
		return nil, fmt.Errorf("invalid URL: %w", err)
	}

	switch u.Scheme {
	case "file":
		// Ensure the basePath is absolute
		if !


t>()
		whenever(highLevelSimpleClient.getInsertContext(anyBoolean())).thenReturn(insertContext)
		val clientPutter = mock<ClientPutter>()
		val insertBlockCaptor = forClass(InsertBlock::class.java)
		whenever(highLevelSimpleClient.insert(insertBlockCaptor.capture(), eq(null as String?), eq(false), eq(insertContext), eq(insertToken), anyShort())).thenReturn(clientPutter)
		freenetInterface.insertImage(temporaryImage, image, insertToken)
		assertThat(insertBlockCaptor.value.data.inputStream, delivers(byteArrayOf(1, 2, 3, 4)))
		assertThat(getPrivateField(insertToken, "clientPutter"), equalTo(clientPutter))
		verify(eventBus).post(any(ImageInsertStartedEvent::class.java))
	}

	@Test
	fun `insert exception causes a sone exception`() {
		val temporaryImage = TemporaryImage("image-id")
		temporaryImage.mimeType = "image/png"
		val imageData = byteArrayOf(1, 2, 3, 4)
		temporaryImage.imageData = imageData
		val image = ImageImpl("image-id")
		val insertToken = freenetInterface.InsertToken(image)
		val insertContext = mock<InsertContext>()
		whenever(highLevelSimpleClient.getInsertContext(anyBoolean())).thenReturn(insertContext)
		val insertBlockCaptor = forClass(InsertBlock::class.java)
		whenever(highLevelSimpleClient.insert(insertBlockCaptor.capture(), eq(null as String?), eq(false), eq(insertContext), eq(insertToken), anyShort())).thenThrow(InsertException::class.java)
		expectionException.expect(SoneInsertException::class.java)
		freenetInterface.insertImage(temporaryImage, image, insertToken)
	}

	@Test
	fun `inserting a directory`() {
		val freenetUri = mock<FreenetURI>()
		val manifestEntries = HashMap<String, Any>()
		val defaultFile = "index.html"
		val resultingUri = mock<FreenetURI>()
		whenever(highLevelSimpleClient.insertManifest(eq(freenetUri), eq(manifestEntries), eq(defaultFile))).thenReturn(resultingUri)
		assertThat(freenetInterface.insertDirectory(freenetUri, manifestEntries, defaultFile), equalTo(resultingUri))
	}

	@Test
	fun `insert exception is forwarded as sone exception`() {
		whenever(highLevelSimpleClient.insertManifest(any(), any(), any())).thenThrow(InsertException::class.java)
		expectionException.expect(SoneException::class.java)
		freenetInterface.insertDirectory(null, null, null)
	}

	@Test
	fun `sone with wrong request uri will not be subscribed`() {
		freenetInterface.registerUsk(FreenetURI("KSK@GPLv3.txt"), null)
		verify(uskManager, never()).subscribe(any(USK::class.java), any(USKCallback::class.java), anyBoolean(), any(RequestClient::class.java))
	}

	@Test
	fun `registering a usk`() {
		val freenetUri = createRandom(randomSource, "test-0").uri.uskForSSK()
		val callback = mock<Callback>()
		freenetInterface.registerUsk(freenetUri, callback)
		verify(uskManager).subscribe(any(USK::class.java), any(USKCallback::class.java), anyBoolean(), any(RequestClient::class.java))
	}

	@Test
	fun `registering a non-usk key will not be subscribed`() {
		val freenetUri = FreenetURI("KSK@GPLv3.txt")
		val callback = mock<Callback>()
		freenetInterface.registerUsk(freenetUri, callback)
		verify(uskManager, never()).subscribe(any(USK::class.java), any(US


lg{display:none!important}}.visible-print{display:none!important}tr.visible-print{display:none!important}th.visible-print,td.visible-print{display:none!important}@media print{.visible-print{display:block!important}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}.hidden-print{display:none!important}tr.hidden-print{display:none!important}th.hidden-print,td.hidden-print{display:none!important}}/*!
 * Bootstrap v3.3.5 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-de


harper disable once InconsistentNaming
    // ReSharper disable once PartialTypeWithSinglePart
	public partial interface IfcRotationalStiffnessSelect : IIfcRotationalStiffnessSelect
	{
		#region Custom code for a select
		//## Custom code for a select
		//##
		#endregion
	}
}

namespace Xbim.Ifc4.Interfaces
{
	public partial interface IIfcRotationalStiffnessSelect : IExpressSelectType, IExpressValueType
	{
		#region Custom code for a select interface
		//## Custom code for a select interface
		//##
		#endregion
	}
}


-12.8-12.8-19.2-19.2 0 0 0 0 0-6.4C6.4 787.2 0 780.8 0 768L0 64c0-25.6 19.2-51.2 38.4-57.6C44.8 0 57.6 0 64 0l0 0 512 0 256 0c38.4 0 64 25.6 64 64C896 102.4 870.4 128 832 128z"  ></path></symbol><symbol id="icon-add1" viewBox="0 0 1028 1024"><path d="M515.18323887 933.875c-232.6257106 0-421.875-189.2492894-421.875-421.875 0-232.60653424 189.2492894-421.875 421.875-421.875s421.875 189.26846576 421.875 421.875C937.05823887 744.6257106 747.80894863 933.875 515.18323887 933.875zM515.18323887 126.80894863C302.7883519 126.80894863 129.9921875 299.60511387 129.9921875 512s172.7961644 385.2102269 385.19105137 385.2102269S900.3742894 724.39488613 900.3742894 512 727.578125 126.80894863 515.18323887 126.80894863z"  ></path><path d="M708.2102269 528.10795462c-3.31747175 3.29829538-7.88139212 5.36931848-12.96306848 5.36931848L336.0397731 533.4772731c-10.14417637 0-18.3515625-8.20738613-18.3515625-18.3515625 0-10.125 8.20738613-18.33238613 18.33238615-18.33238614l359.2265625 0c10.1633519-0.01917637 18.37073887 8.1882106 18.35156249 18.33238614C713.6178981 520.20738613 711.546875 524.79048288 708.2102269 528.10795462z"  ></path><path d="M528.14630652 709.03480137c-3.31747175 3.31747175-7.91974402 5.36931848-12.96306848 5.35014211-10.1633519 0.01917637-18.37073887-8.20738613-18.3515625-18.33238614l-0.01917636-368.0859375c0-10.125 8.20738613-18.33238613 18.35156249-18.33238614 10.14417637 0 18.3515625 8.20738613 18.33238614 18.33238614l0 368.0859375C533.49644863 701.11505652 531.46377825 705.73650598 528.14630652 709.03480137z"  ></path></symbol><symbol id="icon-dingbu" viewBox="0 0 1024 1024"><path d="M796.422846 524.478323 537.312727 265.185862c-6.368176-6.39914-14.688778-9.471415-22.976697-9.407768-1.119849-0.096331-2.07972-0.639914-3.19957-0.639914-4.67206 0-9.024163 1.087166-13.023626 2.879613-4.032146 1.536138-7.87163 3.872168-11.136568 7.135385L227.647682 524.27706c-12.512727 12.480043-12.54369 32.735385-0.032684 45.248112 6.239161 6.271845 14.432469 9.40


18565](https://github.com/pingcap/tidb/pull/18565)
    - 修复当开启 new collation 时，若在事务内的更新涉及了 new collation 列，并在该事务内通过唯一索引读取更新数据时，被更新的数据无法被读取到的问题 [#18703](https://github.com/pingcap/tidb/pull/18703)

+ TiKV

    - 修复 merge 期间可能读到过期数据的问题 [#8113](https://github.com/tikv/tikv/pull/8113)
    - 修复聚合函数 `min`/`max` 下推到 TiKV 时，collation 不能正确工作的问题 [#8108](https://github.com/tikv/tikv/pull/8108)

+ PD

    - 修复如果服务器崩溃，创建 TSO 流可能会被阻塞一段时间的问题 [#2648](https://github.com/pingcap/pd/pull/2648)
    - 修复 `getSchedulers` 可能导致数据争用的问题 [#2638](https://github.com/pingcap/pd/pull/2638)
    - 修复删除 `scheduler` 时导致死锁的问题 [#2637](https://github.com/pingcap/pd/pull/2637)
    - 修复 `balance-leader-scheduler` 没有考虑 placement rule 的问题 [#2636](https://github.com/pingcap/pd/pull/2636)
    - 修复有时无法正确设置 `safepoint` 的问题，这可能会使 BR 和 dumpling 失败 [#2635](https://github.com/pingcap/pd/pull/2635)
    - 修复 `hot region scheduler` 中目标 store 选择错误的问题 [#2627](https://github.com/pingcap/pd/pull/2627)
    - 修复 PD Leader 切换时 TSO 请求可能花费太长时间的问题 [#2622](https://github.com/pingcap/pd/pull/2622)
    - 修复 PD Leader 切换后过期 `scheduler` 的问题 [#2608](https://github.com/pingcap/pd/pull/2608)
    - 修复了启用 placement rule 时，有时 Region 的副本可能无法调整到最佳位置的问题 [#2605](https://github.com/pingcap/pd/pull/2605)
    - 修复了存储的部署路径不会随着部署目录移动而更新的问题 [#2600](https://github.com/pingcap/pd/pull/2600)
    - 修复了 `store limit` 可能为零的问题 [#2588](https://github.com/pingcap/pd/pull/2588)

+ TiDB Dashboard

    - 修复 TiDB 扩容时的 TiDB 连接错误 [#689](https://github.com/pingcap-incubator/tidb-dashboard/pull/689)
    - 修复 TiFlash 实例未显示在日志搜索页面的问题 [#680](https://github.com/pingcap-incubator/tidb-dashboard/pull/680)
    - 修复概况页面刷新之后 metrics 会重置的问题 [#663](https://github.co


  System.out
    } else {
        PrintStream(FileOutputStream(output), false, StandardCharsets.UTF_8)
    }

    class CommandLine {
        @Parameter(
            names = ["--input"],
            required = true,
            description = "Path To Input Fie"
        )
        lateinit var input: String

        @Parameter(
            names = ["--output"],
            description = "File to output to (default stdout)"
        )
        var output: String? = null

        @Parameter(
            names = ["--ssm-key-id"],
            required = true,
            description = "Name to look up in SSM to get Key Id"
        )
        lateinit var ssmKeyId: String

        @Parameter(
            names = ["--help"],
            help = true,
            description = "Show help"
        )
        var help = false
    }
}
package uk.nhs.nhsx.keyfederation.upload

import com.amazonaws.services.lambda.runtime.Context
import uk.nhs.nhsx.core.Clock
import uk.nhs.nhsx.core.events.Events
import uk.nhs.nhsx.core.events.InfoEvent
import uk.nhs.nhsx.diagnosiskeydist.Submission
import uk.nhs.nhsx.diagnosiskeydist.SubmissionRepository
import uk.nhs.nhsx.keyfederation.storage.BatchTagService
import uk.nhs.nhsx.keyfederation.DiagnosisKeysUploadIncomplete
import uk.nhs.nhsx.keyfederation.client.InteropClient
import uk.nhs.nhsx.keyfederation.InvalidTemporaryExposureKey
import uk.nhs.nhsx.keyfederation.UploadedDiagnosisKeys
import uk.nhs.nhsx.keyfederation.client.ExposureUpload
import java.time.Duration
import java.time.Instant
import java.util.*
import kotlin.math.max

class DiagnosisKeysUploadService(
    private val clock: Clock,
    private val interopClient: InteropClient,
    private val submissionRepository: SubmissionRepository,
    private val batchTagService: BatchTagService,
    private val exposureUploadFactory: ExposureUploadFactory,
    private val uploadRiskLevelDefaultEnabled: Boolean,
    private val uploadRiskLevelDefault: Int,
    private val initialUploadHistoryDays: Int,
    private val maxUploadBatchSize: Int,
    private val maxSubsequentBatchUploadCount: Int,
    private val context: Context,
    private val events: Events
) {
    private val maxUploadBatchLimit: Int = maxUploadBatchSize - 4 // mobile submissions/sec

    fun loadKeysAndUploadToFederatedServer(): Int {
        var submissionCount = 0
        var iterationDuration = 0L
        var lastUploadedSubmissionTime = getLastUploadedTime()

        for (i in 1..maxSubsequentBatchUploadCount) {
            val startTime = clock().toEpochMilli()
            val result = loadKeysAndUploadOneBatchToFederatedServer(lastUploadedSubmissionTime, i)

            submissionCount += result.submissionCount

            if (maxUploadBatchSize == NO_BATCH_SIZE_LIMIT_LEGACY_BATCH_SIZE
                || lastUploadedSubmissionTime == result.lastUploadedSubmissionTime
                || result.submissionCount < maxUploadBatchLimit
            ) break

            lastUploadedSubmissionTime = result.lastUploadedSubmissionTime
            iterationDuration = max(iterationDuration, clock().toEpochMilli() - startTime)
            val remainingTimeInMillis = context.remainingTimeInMillis
            if (iterationDuration >= remainingTimeInMillis) break
        }

        return submissionCount
    }

    private fun loadKeysAndUploadOneBatchToFederatedServer(
        lastUploadedSubmissionTime: Instant,
        batchNumber: Int
    ): BatchUploadResult {
        events(InfoEvent("Begin: Upload diagnosis keys to the Nearform server - batch $batchNumber"))

        val newSubmissions = submissionRepository.loadAllSubmissions(
            lastUploadedSubmissionTime.toEpochM


= IntakeManifoldPressureCommand().run {
            handleResponse(rawResponse)
        }
        assertEquals("${expected}kPa", obdResponse.formattedValue)
    }
}

@RunWith(Parameterized::class)
class FuelPressureCommandParameterizedTests(private val rawValue: String, private val expected: Int) {
    companion object {
        @JvmStatic
        @Parameterized.Parameters
        fun values() = listOf(
            arrayOf("410A12", 54),
            arrayOf("410A40", 192),
            arrayOf("410A64", 300),
            arrayOf("410A80", 384),
            arrayOf("410A00", 0),
            arrayOf("410AFF", 765),
            arrayOf("410AFFFF", 765)
        )
    }

    @Test
    fun `test valid fuel pressure responses handler`() {
        val rawResponse = ObdRawResponse(value = rawValue, elapsedTime = 0)
        val obdResponse = FuelPressureCommand().run {
            handleResponse(rawResponse)
        }
        assertEquals("${expected}kPa", obdResponse.formattedValue)
    }
}

@RunWith(Parameterized::class)
class FuelRailPressureCommandParameterizedTests(private val rawValue: String, private val expected: Float) {
    companion object {
        @JvmStatic
        @Parameterized.Parameters
        fun values() = listOf(
            arrayOf("41230000", 0.000f),
            arrayOf("410B39", 4.503f),
            arrayOf("410B6464", 2030.300f),
            arrayOf("4123FFFF", 5177.265f)
        )
    }

    @Test
    fun `test valid fuel rail pressure responses handler`() {
        val rawResponse = ObdRawResponse(value = rawValue, elapsedTime = 0)
        val obdResponse = FuelRailPressureCommand().run {
            handleResponse(rawResponse)
        }

        assertEquals("%.3f".format(expected) + "kPa", obdResponse.formattedValue)
    }
}

@RunWith(Parameterized::class)
class FuelRailGaugePressureCommandParameterizedTests(private val rawValue: String, private val expected: Int) {
    companion object {
        @JvmStatic
        @Parameterized.Parameters
        fun values() = listOf(
            arrayOf("41231234", 46_600),
            arrayOf("41234354", 172_360),
            arrayOf("412360ED", 248_130),
            arrayOf("41238080", 328_960),
            arrayOf("41230000", 0),
            arrayOf("4123FFFF", 655_350)
        )
    }

    @Test
    fun `test valid fuel rail gauge pressure responses handler`() {
        val rawResponse = ObdRawResponse(value = rawValue, elapsedTime = 0)
        val obdResponse = FuelRailGaugePressureCommand().run {
            handleResponse(rawResponse)
        }
        assertEquals("${expected}kPa", obdResponse.formattedValue)
    }
}package com.github.eltonvs.obd.command

import com.github.eltonvs.obd.command.RegexPatterns.BUS_INIT_PATTERN
import com.github.eltonvs.obd.command.RegexPatterns.COLON_PATTERN
import com.github.eltonvs.obd.command.RegexPatterns.WHITESPACE_PATTERN

fun <T> T.pipe(vararg functions: (T) -> T): T =
    functions.fold(this) { value, f -> f(value) }

data class ObdRawResponse(
    val value: String,
    val elapsedTime: Long
) {
    private val valueProcessorPipeline by lazy {
        arrayOf<(String) -> String>(
            {
                /*
                 * Imagine the following response 41 0c 00 0d.
                 *
                 * ELM sends strings!! So, ELM puts spaces between each "byte". And pay
                 * attention to the fact that I've put the word byte in quotes, because 41
                 * is actually TWO bytes (two chars) in the socket. So, we must do some more
                 * processing...
                 */
                removeAll(WHITESP