DAGraphicsLinkItem::OrientationStart)));
	endPointEle.setAttribute("size", getEndPointSize());

	parentElement->appendChild(posEle);
	parentElement->appendChild(lineEle);
	parentElement->appendChild(linePenEle);
	parentElement->appendChild(endPointEle);
	return true;
}

bool DAGraphicsLinkItem::loadFromXml(const QDomElement* parentElement, const QVersionNumber& ver)
{
	DAGraphicsItem::loadFromXml(parentElement, ver);
	QDomElement posEle = parentElement->firstChildElement("pos");
	if (!posEle.isNull()) {
		bool isok = false;
		qreal v   = posEle.attribute("BezierControlScale").toDouble(&isok);
		if (isok) {
			d_ptr->mBezierControlScale = v;
		}
		QDomElement ele = posEle.firstChildElement("startPos");
		if (!ele.isNull()) {
			loadElement(d_ptr->mStartPos, &ele);
		}
		ele = posEle.firstChildElement("endPos");
		if (!ele.isNull()) {
			loadElement(d_ptr->mEndPos, &ele);
		}
		ele = posEle.firstChildElement("boundingRect");
		if (!ele.isNull()) {
			loadElement(d_ptr->mBoundingRect, &ele);
		}
	}
	QDomElement lineEle = parentElement->firstChildElement("linkLine");
	if (!lineEle.isNull()) {
		DAGraphicsLinkItem::LinkLineStyle s =
			DA::stringToEnum(lineEle.attribute("style"), DAGraphicsLinkItem::LinkLineKnuckle);
		setLinkLineStyle(s);
	}
	QDomElement linePenEle = parentElement->firstChildElement("linePen");
	if (!linePenEle.isNull()) {
		QColor pencolor(linePenEle.attribute("color"));
		int width          = linePenEle.attribute("width").toInt();
		Qt::PenStyle style = stringToEnum(linePenEle.attribute("style"), Qt::SolidLine);
		QPen pen(pencolor);
		pen.setWidth(width);
		pen.setStyle(style);
		setLinePen(pen);
	}
	QDomElement endPointEle = parentElement->firstChildElement("endPoint");
	if (!endPointEle.isNull()) {
		DAGraphicsLinkItem::EndPointType etTo =
			DA::stringToEnum(endPointEle.attribute("toType"), DAGraphicsLinkItem::EndPointNone);
		DAGraphicsLinkItem::EndPointType etFrom =
			DA::stringToEnum(endPointEle.attribute("fromType"), DAGraphicsLinkItem::EndPointNone);
		int size = endPointEle.attribute("size").toInt();
		setEndPointType(DAGraphicsLinkItem::OrientationStart, etFrom);
		setEndPointType(DAGraphicsLinkItem::OrientationEnd, etTo);
		if (size > 0) {
			setEndPointSize(size);
		}
	}
	return true;
}

void DAGraphicsLinkItem::setScenePos(const QPointF& p)
{
	setPos(mapToParent(mapFromScene(p)));
}

void DAGraphicsLinkItem::setScenePos(qreal x, qreal y)
{
    setScenePos(QPointF(x, y));
}

/**
 * @brief 生成贝塞尔曲线
 * @param fromPos
 * @param toPos
 * @return
 */
QPainterPath DAGraphicsLinkItem::generateLinkLineBezierPainterPath(const QPointF& fromPos,
                                                                   AspectDirection fromDirect,
                                                                   const QPointF& toPos,


#ifndef ADPLUG_LOAD_HELPER_H
#define ADPLUG_LOAD_HELPER_H

#include <cstring>
#include <stdint.h>

inline uint16_t adplug_byteswap(const uint16_t val)
{
  return
    ((val & 0x00FF) << 8) |
    ((val & 0xFF00) >> 8);
}

inline uint32_t adplug_byteswap(const uint32_t val)
{
  return
    ((val & 0x000000FF) << 24) |
    ((val & 0x0000FF00) <<  8) |
    ((val & 0x00FF0000) >>  8) |
    ((val & 0xFF000000) >> 24);
}

// In many cases, we need to load a uint16_t/uint32_t from a (possibly)
// unaligned byte stream. In order to avoid undefined behavior, we have to use
// memcpy as the only portable way to perform type punning. See:
//   https://blog.regehr.org/archives/959
template <typename T>
static inline T load_unaligned_impl(const unsigned char* src, const bool big_endian)
{
  T result;
  std::memcpy(&result, src, sizeof(T));

#ifdef WORDS_BIGENDIAN
  // big-endian CHOST
  if (!big_endian)
#else
  // little-endian CHOST
  if (big_endian)
#endif
  {
    // have to do a byte-swap
    result = adplug_byteswap(result);
  }

  return result;
}

inline uint16_t u16_unaligned(const unsigned char* src, const bool big_endian = false)
{
  return load_unaligned_impl<uint16_t>(src, big_endian);
}

inline uint32_t u32_unaligned(const unsigned char* src, const bool big_endian = false)
{
  return load_unaligned_impl<uint32_t>(src, big_endian);
}

#endif  // ADPLUG_LOAD_HELPER_H


first returned non-nil error: %v", err)
	}
	// Switch to roundrobin.
	cc.updateResolverState(resolver.State{ServiceConfig: parseCfg(r, `{"loadBalancingPolicy": "round_robin"}`), Addresses: addrs}, nil)
	if err := checkRoundRobin(cc, servers); err != nil {
		t.Fatalf("check roundrobin returned non-nil error: %v", err)
	}
	// Switch to pickfirst.
	cc.updateResolverState(resolver.State{ServiceConfig: parseCfg(r, `{"loadBalancingPolicy": "pick_first"}`), Addresses: addrs}, nil)
	if err := checkPickFirst(cc, servers); err != nil {
		t.Fatalf("check pickfirst returned non-nil error: %v", err)
	}
}

// Test that balancer specified by dial option will not be overridden.
func (s) TestBalancerDialOption(t *testing.T) {
	r := manual.NewBuilderWithScheme("whatever")

	const numServers = 2
	servers, scleanup := startServers(t, numServers, math.MaxInt32)
	defer scleanup()

	cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithResolvers(r), WithCodec(testCodec{}), WithBalancerName(roundrobin.Name))
	if err != nil {
		t.Fatalf("failed to dial: %v", err)
	}
	defer cc.Close()
	addrs := []resolver.Address{{Addr: servers[0].addr}, {Addr: servers[1].addr}}
	r.UpdateState(resolver.State{Addresses: addrs})
	// The init balancer is roundrobin.
	if err := checkRoundRobin(cc, servers); err != nil {
		t.Fatalf("check roundrobin returned non-nil error: %v", err)
	}
	// Switch to pickfirst.
	cc.updateResolverState(resolver.State{ServiceConfig: parseCfg(r, `{"loadBalancingPolicy": "pick_first"}`), Addresses: addrs}, nil)
	// Balancer is still roundrobin.
	if err := checkRoundRobin(cc, servers); err != nil {
		t.Fatalf("check roundrobin returned non-nil error: %v", err)
	}
}

// First addr update contains grpclb.
func (s) TestSwitchBalancerGRPCLBFirst(t *testing.T) {
	r := manual.NewBuilderWithScheme("whatever")

	cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithResolvers(r), WithCodec(testCodec{}))
	if err != nil {
		t.Fatalf("failed to dial: %v", err)
	}
	defer cc.Close()

	// ClientConn will switch balancer to grpclb when receives an address of
	// type GRPCLB.
	r.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: "backend"}, {Addr: "grpclb", Type: resolver.GRPCLB}}})
	var isGRPCLB bool
	for i := 0; i < 5000; i++ {
		cc.mu.Lock()
		isGRPCLB = cc.curBalancerName == "grpclb"
		cc.mu.Unlock()
		if isGRPCLB {
			break
		}
		time.Sleep(time.Millisecond)
	}
	if !isGRPCLB {
		t.Fatalf("after 5 second, cc.balancer is of type %v, not grpclb", cc.curBalancerName)
	}

	// New update containing new backend and new grpclb. Should not switch
	// balancer.
	r.UpdateState(resolver.State{Addresses: []resolver.Addr


submit" name="sa" value="Search"/>
</form>

VX Heaven

Library Collection Sources Engines Constructors Simulators Utilities Links Donate Forum

Interview with Potti Rotti

 The Unforgiven

1
[Back to index] [Comments]

Character presentation:

Pottie Rottie is 21 years old. He's studying computer-science at a university that he wouldn't like to be mentioned. He's the writer of about 10 viruses of varying quality. We decided to met at a university-phest (party), it was a blast. The next morning, both having a huge hang-over we sat down in front his computer and I showed him the basics of viruswriting. If he had enough time, my best guess is that he could've been an alright viruswriter since his mind is insane creative and somehow sick. Two good abilities when it comes to writing perverted programs :-).

				- The Unforgiven.

Give me a short description of who you are?

I am Pottie Rottie :). I'm 21 years old and I'm currently taking some classes on a university not doing too well since I have no real motivation (or time over, perhaps?) to study. I like to drink tea, eat toasts and suck on girl's titties (preferable on the same time, and on my gf's titties :)).

From where did you get you handle, Pottie Rottie?

I really hate thinking up handles since already nearly all good handles are in use, it's not a trivial task to pick one anymore. I inserted the tag Pottie Rottie into a virus for no specific reason and that's pretty much about it.

Does your handle has some specific meaning?

Read above :). No, it has definitly no meaning. It's actually so bad so I don't expect anyone else to take it :). I really hate double-handles. This Dark-this-and-Dark-that is getting a bit annoying if you ask me..

When did you discover the world of computers?

My father bought a C64 (great computer) early in the 80's and when he bought his first PC (8088), I ripped the C64 from him and that's how it all started.

How long have you been active in the scene?

I am not really active in the scene :). I think I called the first BBS in the middle of 1992 or so.

How did you came into the virus business?

I read a few virus oriented virus-magazine's and it seemed to be a cool thing to do.

Why did you start to write viruses?

To see if I could make it. To invent a new kinda weapon for blackmailing? Hehe, probably because the media gave it so much attention I couldn't resist the challenge. When I eventually recieved some source codes from you it proved not to be as hard I thought


(msg, len) then

return msg
end
return
end

function _M.zmq_msg_data(msg, pos)
local ptr = libzmq3.zmq_msg_data(msg)
pos = pos or 0
if pos == 0 then
 return ptr end
ptr = ffi.cast(pchar_t, ptr) +  pos
return ffi.cast(pvoid_t, ptr)
end

function _M.zmq_msg_size(msg)
return libzmq3.zmq_msg_size(msg)
end

function _M.zmq_msg_close(msg)
libzmq3.zmq_msg_close(msg)
end

local function get_msg_copy(copy)
return function (dest, src)
local new = false
if not src then

new, src = true, dest
dest = _M.zmq_msg_init()
if not dest then
 return end
end
local ret = copy(dest, src)
if ret == -1 then

if new then
 _M.zmq_msg_close(dest) end
return
end
return dest
end
end

_M.zmq_msg_move = get_msg_copy(libzmq3.zmq_msg_move)
_M.zmq_msg_copy = get_msg_copy(libzmq3.zmq_msg_copy)

function _M.zmq_msg_set_data(msg, str)
ffi.copy(_M.zmq_msg_data(msg), str)
end

function _M.zmq_msg_get_data(msg)
return ffi.string(_M.zmq_msg_data(msg), _M.zmq_msg_size(msg))
end

function _M.zmq_msg_init_string(str)
local msg = _M.zmq_msg_init_size(#str)
_M.zmq_msg_set_data(msg, str)
return msg
end

function _M.zmq_msg_recv(msg, skt, flags)
return libzmq3.zmq_msg_recv(msg, skt, flags or 0)
end

function _M.zmq_msg_send(msg, skt, flags)
return libzmq3.zmq_msg_send(msg, skt, flags or 0)
end

function _M.zmq_msg_more(msg)
return libzmq3.zmq_msg_more(msg)
end

function _M.zmq_msg_get(msg, option)
return libzmq3.zmq_msg_get(msg, option)
end

function _M.zmq_msg_set(msg, option, optval)
return libzmq3.zmq_msg_set(msg, option, optval)
end

end

-- zmq_z85_encode, zmq_z85_decode
if pget(libzmq3, "zmq_z85_encode") then

-- we alloc buffers for CURVE encoded key size
local TMP_BUF_SIZE = 41

local function alloc_z85_buff(len)
if len <= TMP_BUF_SIZE then

if not tmp_buf then

tmp_buf = ffi.new(vla_char_t, TMP_BUF_SIZE)
end
return tmp_buf
end
return ffi.new(vla_char_t, len)
end

function _M.zmq_z85_encode(data)
local len = math.floor(#data *  1.25 +  1.0001)
local buf = alloc_z85_buff(len)
local ret = libzmq3.zmq_z85_encode(buf, data, #data)
if ret == NULL then
 error("size of the block must be divisible by 4") end
return ffi.string(buf, len - 1)
end

function _M.zmq_z85_decode(data)
local len = math.floor(#data *  0


trks_br = vars_trks_br[i];

    var_trks.resize(fNTrks);
    var_trks_br.resize(fNTrks);

    for (auto j = 0U; j < fNTrks; j++)  // loop over trks index
    {
      const auto& trk = fTrks[j];
      auto& var_trk = var_trks[j];
      auto& var_trk_br = var_trks_br[j];

      // initialize var, branches
      var_trk = 0.;
      var_trk_br = 0;

      //Set var+trk branch
      frtree->SetBranchAddress(var + "_" + trk, &var_trk, &var_trk_br);
    }  // end loop over tracks
  }    // end loop over vars

  // Initialize masks
  IntVec refmask_trks(fNTrks);           // need to know if ref track associated to a given reco track type
  TBrRefVec refmask_trks_br(fNTrks);     // tbranch for each trk
  IntVec iTkMatches_trks(fNTrks);        // want which matched track!
  TBrRefVec iTkMatches_trks_br(fNTrks);  // tbranch for each trk

  // Initialize nhits_trk branches
  IntVec nHits_trks(fNTrks);           // nHits / track
  TBrRefVec nHits_trks_br(fNTrks);     // branch per track
  FltVec fracHits_trks(fNTrks);        // fraction of hits matched (most) / track
  TBrRefVec fracHits_trks_br(fNTrks);  // branch per track
  IntVec score_trks(fNTrks);           // track score
  TBrRefVec score_trks_br(fNTrks);     // branch per track

  // Initialize diff branches
  FltVec nLayers_ref_trks(fNTrks);  // sim/cmssw nUnique layers
  TBrRefVec nLayers_ref_trks_br(fNTrks);
  FltVec pt_ref_trks(fNTrks);  // sim/cmssw pt
  TBrRefVec pt_ref_trks_br(fNTrks);
  FltVec eta_ref_trks(fNTrks);  // cmssw eta
  TBrRefVec eta_ref_trks_br(fNTrks);
  FltVec dphi_trks(fNTrks);  // dphi between reco track and sim/cmssw (computed during matching --> not 100% ideal)
  TBrRefVec dphi_trks_br(fNTrks);

  // Set branches for tracks
  for (auto j = 0U; j < fNTrks; j++)  // loop over trks index
  {
    const auto& trk = fTrks[j];
    auto& refmask_trk = refmask_trks[j];
    auto& refmask_trk_br = refmask_trks_br[j];
    auto& iTkMatches_trk = iTkMatches_trks[j];
    auto& iTkMatches_trk_br = iTkMatches_trks_br[j];
    auto& nHits_trk = nHits_trks[j];
    auto& nHits_trk_br = nHits_trks_br[j];
    auto& fracHits_trk = fracHits_trks[j];
    auto& fracHits_trk_br = fracHits_trks_br[j];
    auto& score_trk = score_trks[j];
    auto& score_trk_br = score_trks_br[j];
    auto& nLayers_ref_trk = nLayers_ref_trks[j];


 In Colab](https://colab.research.google.com/assets/colab-badge.svg)
# Typesense Vector Store¶
#### Download Data¶
In [ ]:
Copied!
```
%pip install llama-index-embeddings-openai
%pip install llama-index-vector-stores-typesense

```

%pip install llama-index-embeddings-openai %pip install llama-index-vector-stores-typesense
In [ ]:
Copied!
```
!mkdir -p 'data/paul_graham/'
!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt' -O 'data/paul_graham/paul_graham_essay.txt'

```

!mkdir -p 'data/paul_graham/' !wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt' -O 'data/paul_graham/paul_graham_essay.txt'
#### Load documents, build the VectorStoreIndex¶
In [ ]:
Copied!
```
# import logging
# import sys

# logging.basicConfig(stream=sys.stdout, level=logging.INFO)
# logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))

from llama_index.core import (
    VectorStoreIndex,
    SimpleDirectoryReader,
    StorageContext,
)
from IPython.display import Markdown, display

```

# import logging # import sys # logging.basicConfig(stream=sys.stdout, level=logging.INFO) # logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout)) from llama_index.core import ( VectorStoreIndex, SimpleDirectoryReader, StorageContext, ) from IPython.display import Markdown, display
In [ ]:
Copied!
```
# load documents
documents = SimpleDirectoryReader("./data/paul_graham/").load_data()

```

# load documents documents = SimpleDirectoryReader("./data/paul_graham/").load_data()
In [ ]:
Copied!
```
from llama_index.vector_stores.typesense import TypesenseVectorStore
from typesense import Client

typesense_client = Client(
    {
        "api_key": "xyz",
        "nodes": [{"host": "localhost", "port": "8108", "protocol": "http"}],
        "connection_timeout_seconds": 2,
    }
)
typesense_vector_store = TypesenseVectorStore(typesense_client)
storage_context = StorageContext.from_defaults(
    vector_store=typesense_vector_store
)

index = VectorStoreIndex.from_documents(
    documents, storage_context=storage_context
)

```

from llama_index.vector_stores.typesense import TypesenseVectorStore from typesense import Client typesense_client = Client( { "api_key": "xyz", "nodes": [{"host": "localhost", "port": "8108", "protocol": "http"}], "connection_timeout_seconds": 2, } ) typesense_vector_store = TypesenseVectorStore(typesense_client) storage_context = StorageContext.from_defaults( vector_store=typesense_vector_store ) index = VectorStoreIndex.from_documents( documents, storage_context=storage_context )
#### Query Index¶
In [ ]:
Copied!
```
from llama_index.core import QueryBundle
from llama_index.embeddings.openai import OpenAIEmbedding

# By default, typesense vector store uses vector search. You need to provide the embedding yourself.
query_str = "What did the author do growing up?"
embed_model = OpenAIEmbedding()
# You can also get the settings from the Settings object
from llama_index.core import Settings

# embed_model = Settings.embed_model
query_embedding = embed_model.get_agg_embedding


为位置参数。
-   **Boolean(string)** 存储True 或False值。只需一个标签文本作为位置参数。
-   **Binary(string)** 存储包括图片在内的二进制数据。只需一个字符串标签位置参数。

这些字段定义包夜了常用的基本参数。注意这些并不是必填，在没填写时Odoo会补充合适的默认值。

> **Odoo 12中的变化**\
> **Date**和**Datetime**字段在 ORM 中以Python日期对象进行处理。此前的版本中按文本字符串处理。因此在进行操作时需显式转化为Python 日期对象，之后还要再转化为文本字符串。

文本字符串，包括**Char**、**Text**和**Html**有一些特有属性：

-   **size** (仅用于**Char**字段)设置最大允许尺寸。无特殊原因建议不要使用，例如可用于具有最大允许长度的社保账号。
-   **translate=True**使得字段内容可翻译，带有针对不同语言的不同值。
-   **trim**默认值为 **True**，在网页客户端中自动去除周围的空格。可通过设置t**rim=false**来取消。

> **Odoo 12中的变化**\
> **trim**字段属性在 Odoo 12中引入。此前版本中文本字段保存前后的空格。

除这些以外，还有在后面会介绍到的关联字段。这在本单后面的**模型间的关联**一节中进行讲解。

不过， 我们还要先在下一小节中了解下有关基础字段类型属性的其它知识。

### 常用字段属性

至此，我们学习了几种基本字段类型的基础位置参数。但还有一些其它属性。

以下是所有字段类型中可以使用的关键字参数：

-   **string**是字段的默认标签，在用户界面中使用。除**Selection**和关联字段外，它都是第一个位置参数，所以大多数情况都以关键字参数使用。如未传入，将由字段名自动生成。
-   **default**设置字段默认值。可以是具体值（如 **active**字段中的**default=True**），或是可调用指针，有名函数指针或**lambda**匿名函数均可。
-   **help**提供 UI 中鼠标悬停字段向用户显示的提示文本。
-   **readonly=True**会使用户界面中的字段默认不可编辑。在 API 层面并没有强制，模型方法中的代码仍然可以向其写入，视图定义要可进行重载。仅针对用户界面设置。
-   **required=True**使得在用户界面中字段默认必填。这通过在数据库层面为字段添加**NOT NULL** 约束来实现。
-   **index=True**为字段添加数据库索引，让搜索更快速，但同时也会部分占用更大的磁盘空间、降低写操作速度。
-   **copy=False**让字段在使用 ORM **copy()** 方法复制记录时忽略该字段。除对多关联字段默认不复制，其它字段值默认会被复制。
-   **deprecated=True**将字段标记为弃用


.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.30)");
		  testUa( false, Browser.MSIE,         "7.0",          Platform.Windows,     "Windows XP",     Engine.MSIE,      "7.0",        "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2)");
		  testUa( false, Browser.MSIE,         "7.0",          Platform.Windows,     "Windows XP",     Engine.MSIE,      "7.0",        "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; MSOffice 12)");
		  testUa( false, Browser.MSIE,         "6.0b",         Platform.Windows,     "Windows XP",     Engine.MSIE,      "6.0b",       "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.1)");
		  testUa( false, Browser.MSIE,         "6.0",          Platform.Windows,     "Windows XP",     Engine.MSIE,      "6.0",        "Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)");
		  testUa( false, Browser.Opera,      "9.99",         Platform.Windows,     "Windows XP",     Engine.Presto,    "9.9.9",      "Opera/9.99 (Windows NT 5.1; U; pl) Presto/9.9.9");
		  testUa( false, Browser.Opera,      "9.70",         Platform.Linux,       "Linux",          Engine.Gecko,     "20061208",   "Mozilla/5.0 (Linux i686 ; U; en; rv:1.8.1) Gecko/20061208 Firefox/2.0.0 Opera 9.70");
		  testUa( false, Browser.Opera,      "9.64",         Platform.Linux,       "Linux",          Engine.Presto,    "2.1.1",      "Opera/9.64 (X11; Linux i686; U; Linux Mint; it) Presto/2.1.1");
		  testUa( false, Browser.Opera,      "9.00",         Platform.Wii,         "Wii",            Engine.Unknown,    null,         "Opera/9.00 (Nintindo Wii; U; ; 103858; Wii Shop Channel/1.0; en)");
		  testUa( false, Browser.Chrome,     "6.0.472.62",   Platform.Mac,   "OS X 10.6",      Engine.Webkit,    "534.3",      "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.62 Safari/534.3");
		  testUa( false, Browser.Chrome,     "6.0.472.63",   Platform.Mac,   "OS X 10.6",      Engine.Webkit,    "534.3",      "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3");
		  testUa( false, Browser.Chrome,     "6.0.472.55",   Platform.Linux,       "Linux",          Engine.Webkit,    "534.3",      "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3");
		  testUa( false, Browser.Chrome,     "5.0.375.127",  Platform


\n
Protože RingCT zapracovává propojovací značku do nejednoznačného podpisu, jsou operace podepisování (a vícepodepisování) výpočetně náročnější a je náročnější vytvořit další funkce související se značkou.\nV Seraphis však lze konstrukci důkazů o členství bezpečně delegovat z vysoce důvěryhodných zařízení (která mohou mít omezený výpočetní výkon, jako například hardwarová peněženka) na méně důvěryhodné zařízení a operace podepisování (a vícepodepisování) jsou mnohem jednodušší pomocí mnohem jednoduššího autorizačního důkazu.
\n\n
Některé stavební bloky požadované Seraphisem již naštěstí existují jinde a není třeba je navrhovat od začátku.\nKonstrukce Bulletproofs i Bulletproofs+ mohou být použity jako nátisky.\nPro autorizační nátisky lze použít modifikace dokazovacích systémů typu Schnorr.\nA účinný provingový systém používaný již jako základ pro Triptych, Lelantus a Spark* může být upraven pro důkazy o členství.
\n\n
* Cypher Stack získává finanční prostředky na vývoj Spark.
';

  @override
  String get knowledge250Sbseraphis250Sb3250Sbtitle => 'Stavební bloky';

  @override
  String get knowledge250Sbseraphis250Sb4250Sbtext => '
Aktuálně používané adresy Monero bohužel nejsou se Seraphis kompatibilní.\nUživatelé by si museli vygenerovat nové adresy ze svých klíčů peněženek, aby mohli přijímat Monero, pokud by byl Seraphis implementován.\nTyto náklady na ekosystém však s sebou nesou řadu výhod.
\n\n
Kromě výše uvedených konstrukčních výhod je konstrukce Seraphis vhodná pro mnoho různých možností konstrukce adres, z nichž každá má své kompromisy.\nZatímco konečná konstrukce adresy, která bude použita v systému Seraphis, je\n stále rozhodována (


/*
 / _____)             _              | |
( (____  _____ ____ _| |_ _____  ____| |__
 \____ \| ___ |    (_   _) ___ |/ ___)  _ \
 _____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
    (C)2013 Semtech

Description: MCU RTC timer and low power modes management

License: Revised BSD License, see LICENSE.TXT file include in the project

Maintainer: Miguel Luis and Gregory Cristian
*/
#ifndef __RTC_BOARD_H__
#define __RTC_BOARD_H__
#include "soc/rtc.h"
#include "timer.h"

#ifdef __cplusplus
extern "C"{
#endif

extern hw_timer_t * timer;
extern uint32_t TimeSwitch;
extern uint64_t preAlarmtimer;
extern uint64_t nextAlarm;
extern TimerEvent_t *TimerListHead;
/*!
 * \brief Timer time variable definition
 */
/*!
 * \brief Start the RTC timer
 *
 * \remark The timer is based on the RTC Alarm running at 32.768KHz
 *
 * \param[IN] timeout Duration of the Timer
 */
void TimerSetTime( uint64_t timeout );

/*!
 * \brief Adjust the value of the timeout to handle wakeup time from Alarm and GPIO irq
 *
 * \param[IN] timeout Duration of the Timer without compensation for wakeup time
 * \retval new value for the Timeout with compensations
 */
TimerTime_t TimerGetAdjustedTimeoutValue( uint32_t timeout );

/*!
 * \brief Get the RTC timer value
 *
 * \retval RTC Timer value
 */
TimerTime_t TimerGetTimerValue( void );

/*!
 * \brief Get the RTC timer elapsed time since the last Alarm was set
 *
 * \retval RTC Elapsed time since the last alarm
 */
TimerTime_t TimerGetElapsedAlarmTime( void );

/*!
 * \brief Compute the timeout time of a future event in time
 *
 * \param[IN] futureEventInTime Value in time
 * \retval time Time between now and the futureEventInTime
 */
TimerTime_t TimerComputeFutureEventTime( TimerTime_t futureEventInTime );

/*!
 * \brief Compute the elapsed time since a fix event in time
 *
 * \param[IN] eventInTime Value in time
 * \retval elapsed Time since the eventInTime
 */
TimerTime_t TimerComputeElapsedTime( TimerTime_t eventInTime );

/*!
 * \brief This function blocks the MCU from going into Low Power mode
 *
 * \param [IN] status [true: Enable, false: Disable
 */
void BlockLowPowerDuringTask ( bool status );

/*!
 * \brief Sets the MCU into low power STOP mode
 */
void RtcEnterLowPowerStopMode( void );

/*!
 * \brief Restore the MCU to its normal operation mode
 */
void RtcRecoverMcuStatus( void );

#ifdef __cplusplus
} // extern "C"
#endif

#endif // __RTC_BOARD_H__


flags.init(F_SEPARATOR, f);
    if (oldsep != flags.is(F_SEPARATOR))
        MODIFY(getrid()).sizeh( get_min_size().y );

    if (flags.is(F_SEPARATOR)) submnu.reset();

    return *this;
}

gui_menu_item_c & gui_menu_item_c::submenu(const menu_c &m)
{
    if (textrect.get_text().is_empty()) textrect.set_text_only( ts::wstr_c(CONSTWSTR("???")), true );
    flags.clear(F_SEPARATOR);
    submnu = m;
    MODIFY(getrid()).sizeh( get_min_size().y );
    getengine().redraw();

    return *this;
}

bool gui_menu_item_c::open_submenu(RID r, GUIPARAM p)
{
    if (submnu_shown) return false;
    submnu_shown = &gui_popup_menu_c::show( getrid().call_get_popup_menu_pos(), submnu, false, getrid() );
    submnu_shown->leech(this);

    gui_popup_menu_c* pm = &HOLD(getparent()).as<gui_popup_menu_c>();
    if (pm)
    {
        submnu_shown->set_close_handler(pm->get_close_handler());
        submnu_shown->set_click_handler(pm->get_click_handler());
    }

    return true;
}

//________________________________________________________________________________________________________________________________ gui_textfield_c

MAKE_CHILD<gui_textfield_c>::~MAKE_CHILD()
{
    if (selector)
    {
        get().selector = &(gui_button_c &)MAKE_CHILD<gui_button_c>(get().getrid());
        get().selector->set_face_getter(selectorface ? selectorface : BUTTON_FACE(selector), selectorface2);
        get().selector->set_handler(handler, param);
        ts::ivec2 minsz = get().selector->get_min_size();
        get().set_margins_rb(ts::ivec2(minsz.x, 0));
        get().height = ts::tmax( minsz.y, get().get_font()->height );
    } else
    {
        get().height = get().get_font()->height;
    }
    if (multiline) get().height = multiline;
    MODIFY(get()).setminsize(get().getrid()).visible( create_visible );
}

bool gui_textfield_c::behav_s::onclick(RID, GUIPARAM mpar)
{
    gui_popup_menu_c::click_data_s *cd = (gui_popup_menu_c::click_data_s *)mpar;

    if (handler)
    {
        gui_dialog_c::behav_s b;
        b.e = gui_dialog_c::behav_s::EVT_ON_CLICK;
        b.menu = &menu;
        b.param = cd->itemparam;
        handler(tfrid, &b);
    }

    gui_textfield_c &tf = HOLD(tfrid).as<gui_textfield_c>();
    if (set_value)
        tf.set_text( ts::from_utf8(cd->itemparam) );
    else
        tf.set_text( cd->itemtext );

    return true;
}

gui_textfield_c::gui_textfield_c(MAKE_CHILD<gui_textfield_c> &data) :gui_textedit_c(data)
{
    check_text_func = data.checker;
    set_chars_limit(data.chars_limit);
    set_multiline(data.multiline != 0);
    set_text(data.text);
}

gui_textfield_c::~gui_textfield_c()
{
}

bool gui_textfield_c::push_selector(RID, GUIPARAM)
{


 const val LANGUAGE_VERSION_ARG: String = "-language-version="
    @JvmStatic
    val K1: LanguageVersion = LanguageVersion(KotlinSupportedLanguageVersion.DEFAULT_K1.value)
    @JvmStatic val K2: LanguageVersion = LanguageVersion(KotlinSupportedLanguageVersion.V2_0.value)
  }
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is dual-licensed under either the MIT license found in the
 * LICENSE-MIT file in the root directory of this source tree or the Apache
 * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
 * of this source tree. You may select, at your option, one of the
 * above-listed licenses.
 */

package com.facebook.buck.jvm.kotlin.ksp

import com.facebook.buck.core.util.log.Logger
import com.google.devtools.ksp.processing.KSPLogger
import com.google.devtools.ksp.symbol.FileLocation
import com.google.devtools.ksp.symbol.KSNode
import com.google.devtools.ksp.symbol.NonExistLocation
import java.io.PrintStream
import java.util.logging.Level

/**
 * A logger for KSP that logs to Buck's logging system. Similar to [KotlincStep]'s
 * [BuckKotlinLogger], and KSP1's [MessageCollectorBasedKSPLogger]
 */
class BuckKsp2Logger(private val stdErr: PrintStream) : KSPLogger {

  override fun logging(message: String, symbol: KSNode?) {
    if (!LOG.isDebugEnabled) return
    LOG.debug(convertMessage(message, symbol))
  }

  override fun info(message: String, symbol: KSNode?) {
    if (!LOG.isLoggable(Level.INFO)) return
    LOG.info(convertMessage(message, symbol))
  }

  override fun warn(message: String, symbol: KSNode?) {
    if (!LOG.isLoggable(Level.WARNING)) return
    stdErr.println(convertMessage(message, symbol))
  }

  override fun error(message: String, symbol: KSNode?) {
    if (!LOG.isLoggable(Level.SEVERE)) return
    stdErr.println(convertMessage(message, symbol))
  }

  override fun exception(e: Throwable) {
    if (!LOG.isLoggable(Level.SEVERE)) return
    stdErr.println("$LOGGING_PREFIX${e.stackTraceToString()}")
  }

  private fun convertMessage(message: String, symbol: KSNode?): String =
      when (val location = symbol?.location) {
        is FileLocation -> "$LOGGING_PREFIX${location.filePath}:${location.lineNumber}: $message"
        is NonExistLocation,
        null -> "$LOGGING_PREFIX$message"
      }

  companion object {
    private val LOG: Logger = Logger.get(BuckKsp2Logger::class.java)
    private const val LOGGING_PREFIX: String = "[ksp2] "
  }
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is dual-licensed under either the MIT license found in the
 * LICENSE-MIT file in the root directory of this source tree or the Apache
 * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
 * of this source tree. You may select, at your option, one of the
 * above-listed licenses.
 */

package com.facebook.buck.jvm.kotlin.buildtools

import com.facebook.buck.core.build.execution.context.IsolatedExecutionContext
import com.facebook.buck.core.exceptions.HumanReadableException
import com.facebook.buck.core.filesystems.AbsPath
import com.facebook.buck.core.filesystems.RelPath
import com.facebook.buck.core.util.log.Logger
import com.facebook.buck.jvm.core.BuildTargetValue
import com.facebook.buck.jvm.kotlin.cd.anal


e.
         * Must have:
         * - first candle: black (white) candle
         * - second candle: bullish (bearish) belt hold with the same open as the prior candle
         * The meaning of "long body" and "very short shadow" of the belt hold is specified with TA_SetCandleSettings
         * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish;
         * the user should consider that separating lines is significant when coming in a trend and the belt hold has
         * the same direction of the trend, while this function does not consider it
         */
        int outIdx = 0;
        do
        {
            outInteger[outIdx++] = GetPatternRecognition(i) ? (int)GetCandleColor(i) * 100 : 0;

            /* add the current range and subtract the first range: this is done after the pattern recognition
             * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle)
             */
            _shadowVeryShortPeriodTotal +=
                GetCandleRange(ShadowVeryShort, i) -
                GetCandleRange(ShadowVeryShort, shadowVeryShortTrailingIdx);

            _bodyLongPeriodTotal +=
                GetCandleRange(BodyLong, i) -
                GetCandleRange(BodyLong, bodyLongTrailingIdx);

            _equalPeriodTotal +=
                GetCandleRange(Equal, i - 1) -
                GetCandleRange(Equal, equalTrailingIdx - 1);

            i++;
            shadowVeryShortTrailingIdx++;
            bodyLongTrailingIdx++;
            equalTrailingIdx++;
        } while (i <= endIdx);

        // All done. Indicate the output limits and return.
        outNBElement = outIdx;
        outBegIdx = startIdx;

        return new CandleIndicatorResult(Success, outBegIdx, outNBElement, outInteger);
    }

    /// <inheritdoc />
    public override bool GetPatternRecognition(int i)
    {
        bool isSeparatingLines =
            // opposite candles
            IsColorOpposite(i - 1, i) &&
            // same open
            Open[i] <= Open[i - 1] + GetCandleAverage(Equal, _equalPeriodTotal, i - 1) &&
            Open[i] >= Open[i - 1] - GetCandleAverage(Equal, _equalPeriodTotal, i - 1) &&
            // belt hold: long body
            GetRealBody(i) > GetCandleAverage(BodyLong, _bodyLongPeriodTotal, i) &&
            (
                (
                    // with no lower shadow if bullish
                    IsColorGreen(i) &&
                    GetLowerShadow(i) < GetCandleAverage(ShadowVeryShort, _shadowVeryShortPeriodTotal, i)
                )
                ||
                (
                    // with no upper shadow if bearish
                    IsColorRed(i) &&
                    GetUpperShadow(i) < GetCandleAverage(ShadowVeryShort, _shadowVeryShortPeriodTotal, i)
                )
            );

        return isSeparatingLines;
    }

    /// <inheritdoc />
    public override int GetLookback()
    {
        return GetCandleMaxAvgPeriod(ShadowVeryShort, BodyLong, Equal) + 1;
    }
}


.presentation.screenLogic.JxlToolsComponent

@Composable
internal fun JxlToolsControls(
    component: JxlToolsComponent,
    onAddImages: () -> Unit
) {
    val isPortrait by isPortraitOrientationAsState()

    when (component.type) {
        is Screen.JxlTools.Type.JxlToImage -> {
            Spacer(modifier = Modifier.height(16.dp))
            ImageFormatSelector(
                value = component.imageFormat,
                onValueChange = component::setImageFormat
            )
            Spacer(modifier = Modifier.height(8.dp))
            QualitySelector(
                imageFormat = component.imageFormat,
                enabled = true,
                quality = component.params.quality,
                onQualityChange = {
                    component.updateParams(
                        component.params.copy(
                            quality = it
                        )
                    )
                }
            )
            Spacer(modifier = Modifier.height(16.dp))
        }

        is Screen.JxlTools.Type.JpegToJxl,
        is Screen.JxlTools.Type.JxlToJpeg -> {
            val uris = when (val type = component.type) {
                is Screen.JxlTools.Type.JpegToJxl -> type.jpegImageUris
                is Screen.JxlTools.Type.JxlToJpeg -> type.jxlImageUris
                is Screen.JxlTools.Type.ImageToJxl -> type.imageUris
                is Screen.JxlTools.Type.JxlToImage -> listOfNotNull(type.jxlUri)
                null -> null
            } ?: emptyList()

            UrisPreview(
                modifier = Modifier
                    .padding(
                        vertical = if (isPortrait) 24.dp else 8.dp
                    ),
                uris = uris,
                isPortrait = true,
                onRemoveUri = component::removeUri,
                onAddUris = onAddImages
            )
        }

        is Screen.JxlTools.Type.ImageToJxl -> {
            AnimatedJxlParamsSelector(
                value = component.params,
                onValueChange = component::updateParams
            )
        }

        else -> Unit
    }
}/*
 * ImageToolbox is an image editor for android
 * Copyright (c) 2024 T8RIN (Malik Mukhametzyanov)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *
 * 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.
 *
 * You should have received a copy of the Apache License
 * along with this program.  If not, see <http://www.apache.org/licenses/LICENSE-2.0>.
 */

@file:Suppress("FunctionName")

package com.t8rin.imagetoolbox.feature.jxl_tools.presentation.screenLogic

import android.graphics.Bitmap
import android.net.Uri
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import com.arkivanov.decompose.ComponentContext
import com.t8rin.imagetoolbox.core.domain.dispatchers.DispatchersHolder
import com.t8rin.imagetoolbox.core.domain.image.ImageCompressor
import com.t8rin.imagetoolbox.core.domain.image.ImageGetter
import com.t8rin.imagetoolbox.core.domai


u32 dest_offset;
	u32 dest_buf_sz;
	u16 pid;

	u32 encoder_id;

	u8 *continuity_counter;

	u16 stream_id;

	bool send_pts;
	u64 pts;

	bool send_dts;
	u64 dts;

	u32 n_pes_h_s_bytes;
	u64 pcr;
};

/**
 * vidtv_pes_write_into - Write a PES packet as MPEG-TS packets into a buffer.
 * @args: The args to use when writing
 *
 * This function translate the ES data for one access unit
 * from an encoder into MPEG TS packets. It does so by first encapsulating it
 * with a PES header and then splitting it into TS packets.
 *
 * The data is then written into the buffer pointed to by 'args.buf'
 *
 * Return: The number of bytes written into the buffer. This is usually NOT
 * equal to the size of the access unit, since we need space for PES headers, TS headers
 * and padding bytes, if any.
 */
u32 vidtv_pes_write_into(struct pes_write_args *args);

#endif // VIDTV_PES_H


), %xmm5
	vfmadd132sd	(%r15,%rcx,8), %xmm5, %xmm0
	vmovsd	%xmm0, (%r14,%rcx,8)
	leal	1(%rax), %ecx
	cmpl	%ebx, %ecx
	jge	.L8
	movslq	%ecx, %rcx
	addl	$2, %eax
	vmovsd	0(%r13,%rcx,8), %xmm0
	vmovsd	(%r12,%rcx,8), %xmm6
	vfmadd132sd	(%r15,%rcx,8), %xmm6, %xmm0
	vmovsd	%xmm0, (%r14,%rcx,8)
	cmpl	%eax, %ebx
	jle	.L8
	cltq
	vmovsd	(%r15,%rax,8), %xmm0
	vmovsd	(%r12,%rax,8), %xmm4
	vfmadd132sd	0(%r13,%rax,8), %xmm4, %xmm0
	vmovsd	%xmm0, (%r14,%rax,8)
.L8:
	addl	$1, %r11d
	cmpl	-84(%rbp), %r11d
	jne	.L12
	leaq	-56(%rbp), %rsi
	leaq	-64(%rbp), %rdi
	movl	%r11d, -84(%rbp)
	movl	%r10d, -88(%rbp)
	vzeroupper
	call	timing
	vmovsd	-64(%rbp), %xmm1
	vsubsd	-72(%rbp), %xmm1, %xmm1
	vmovsd	.LC3(%rip), %xmm2
	movl	-84(%rbp), %r11d
	movl	-88(%rbp), %r10d
	vucomisd	%xmm1, %xmm2
	leal	(%r11,%r11), %eax
	movl	%eax, -84(%rbp)
	ja	.L13
	movl	%eax, %esi
	vxorpd	%xmm6, %xmm6, %xmm6
	vxorpd	%xmm0, %xmm0, %xmm0
	movl	%ebx, %edx
	sarl	%esi
	vcvtsi2sd	%ebx, %xmm0, %xmm0
	movl	$.LC9, %edi
	movl	$5, %eax
	vcvtsi2sd	%esi, %xmm6, %xmm6
	vmulsd	.LC5(%rip), %xmm6, %xmm2
	vmovsd	.LC4(%rip), %xmm5
	vmovsd	.LC6(%rip), %xmm7
	vmulsd	%xmm0, %xmm6, %xmm4
	vmulsd	%xmm0, %xmm2, %xmm2
	vdivsd	%xmm1, %xmm4, %xmm4
	vdivsd	%xmm1, %xmm2, %xmm2
	vdivsd	%xmm5, %xmm4, %xmm4
	vmulsd	%xmm7, %xmm2, %xmm3
	vaddsd	%xmm0, %xmm0, %xmm2
	vmulsd	.LC8(%rip), %xmm0, %xmm0
	vmulsd	%xmm6, %xmm2, %xmm2
	vmulsd	.LC7(%rip), %xmm2, %xmm2
	vmulsd	%xmm7, %xmm3, %xmm3
	vdivsd	%xmm5, %xmm0, %xmm0
	vdivsd	%xmm5, %xmm4, %xmm4
	vdivsd	%xmm1, %xmm2, %xmm2
	call	printf
	movq	%r14, %rdi
	call	free
	movq	%r12, %rdi
	call	free
	movq	%r13, %rdi
	call	free
	addq	$72, %rsp
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r13
	.cf


inst.SpawnRewards = SpawnRewards
	inst.OnDeactivateGame = OnDeactivateGame
	inst.RemoveGameItems = RemoveGameItems
	inst.OnRemoveGame = OnRemoveGame

    inst:SetStateGraph("SGcarnivalgame_puckdrop_station")

	inst:ListenForEvent("onbuilt", OnBuilt)
end

local function station_fn()
	return CARNIVALGAME_COMMON.CarnivalStationFn(station_common_postinit, station_master_postinit)
end

local CARNIVALGAMEPART_TAG = {"carnivalgame_part"}
local deployable_data =
{
	deploymode = DEPLOYMODE.CUSTOM,
	custom_candeploy_fn = function(inst, pt, mouseover, deployer)
		local x, y, z = pt:Get()
		return TheWorld.Map:CanDeployAtPoint(pt, inst, mouseove


height=0&endheight=10000", &wtg)
	if err != nil {
		t.Fatal(err)
	}
	if len(wtg.UnconfirmedTransactions) != 2 {
		t.Fatal("expecting two unconfirmed transactions in sender wallet")
	}

	// Testing GET :id for unconfirmed transactions
	var wutgid WalletTransactionGETid
	err = st.getAPI(fmt.Sprintf("/wallet/transaction/%s", wtg.UnconfirmedTransactions[0].TransactionID), &wutgid)
	if err != nil {
		t.Fatal(err)
	}
	var wutgid2 WalletTransactionGETid
	err = st.getAPI(fmt.Sprintf("/wallet/transaction/%s", wtg.UnconfirmedTransactions[1].TransactionID), &wutgid2)
	if err != nil {
		t.Fatal(err)
	}

	// Check that undocumented API behavior used in Sia-UI still works with
	// current API.
	err = st.getAPI("/wallet/transactions?startheight=0&endheight=-1", &wtg)
	if err != nil {
		t.Fatal(err)
	}
	if len(wtg.UnconfirmedTransactions) != 2 {
		t.Fatal("expecting two unconfirmed transactions in sender wallet")
	}
	// Get the id of the non-change output sent to the receiving wallet.
	expectedOutputID := wtg.UnconfirmedTransactions[1].Outputs[0].ID

	// Check the unconfirmed transactions struct to make sure all fields are
	// filled out correctly in the receiving wallet.
	err = st2.getAPI("/wallet/transactions?startheight=0&endheight=10000", &wtg)
	if err != nil {
		t.Fatal(err)
	}
	// There should be at least one unconfirmed transaction:
	err = build.Retry(50, time.Millisecond*100, func() error {
		if len(wtg.UnconfirmedTransactions) < 1 {
			return errors.New("unconfirmed transaction not found")
		}
		return nil
	})
	// The unconfirmed transaction should have inputs and outputs, and both of
	// those should have value.
	for _, txn := range wtg.UnconfirmedTransactions {
		if len(txn.Inputs) < 1 {
			t.Fatal("transaction should have an input")
		}
		if len(txn.Outputs) < 1 {
			t.Fatal("transactions should have outputs")
		}
		for _, input := range txn.Inputs {
			if input.Value.IsZero() {
				t.Error("input should not have zero value")
			}
		}
		for _, output := range txn.Outputs {
			if output.Value.IsZero() {
				t.Error("output should not have zero value")
			}
		}
		if txn.Outputs[0].ID != expectedOutputID {
			t.Error("transactions should have matching output ids for the same transaction")
		}
	}

	// Restart st2.
	err = st2.server.Close()
	if err != nil {
		t.Fatal(err)
	}
	st2, err = assembleServerTester(st2.walletKey, st2.dir)
	if err != nil {
		t.Fatal(err)
	}
	err = st2.getAPI("/wallet/transactions?startheight=0&endheight=10000", &wtg)
	if err != nil {
		t.Fatal(err)
	}

	// Reconnect st2 and st.
	err = fullyConnectNodes([]*serverTester{st, st2})
	if err != nil && !strings.Contains(err.Error(), "already connected to this peer") {
		t.Fatal(err)
	}

	// Mine a block on st to get the transactions into the blockchain.
	_, err = st.miner.AddBlock()
	if err != nil {
		t.Fatal(err)
	}
	_, err = synchronizationCheck([]*serverTester{st,


rollView'
  /**
   * @ngdoc method
   * @name $ionicScrollDelegate#$getByHandle
   * @param {string} handle
   * @returns `delegateInstance` A delegate instance that controls only the
   * scrollViews with `delegate-handle` matching the given handle.
   *
   * Example: `$ionicScrollDelegate.$getByHandle('my-handle').scrollTop();`
   */
]));

/**
 * @ngdoc service
 * @name $ionicSideMenuDelegate
 * @module ionic
 *
 * @description
 * Delegate for controlling the {@link ionic.directive:ionSideMenus} directive.
 *
 * Methods called directly on the $ionicSideMenuDelegate service will control all side
 * menus.  Use the {@link ionic.service:$ionicSideMenuDelegate#$getByHandle $getByHandle}
 * method to control specific ionSideMenus instances.
 *
 * @usage
 *
 * ```html
 * <body ng-controller="MainCtrl">
 *   <ion-side-menus>
 *     <ion-side-menu-content>
 *       Content!
 *       <button ng-click="toggleLeftSideMenu()">
 *         Toggle Left Side Menu
 *       </button>
 *     </ion-side-menu-content>
 *     <ion-side-menu side="left">
 *       Left Menu!
 *     <ion-side-menu>
 *   </ion-side-menus>
 * </body>
 * ```
 * ```js
 * function MainCtrl($scope, $ionicSideMenuDelegate) {
 *   $scope.toggleLeftSideMenu = function() {
 *     $ionicSideMenuDelegate.toggleLeft();
 *   };
 * }
 * ```
 */
IonicModule
.service('$ionicSideMenuDelegate', ionic.DelegateService([
  /**
   * @ngdoc method
   * @name $ionicSideMenuDelegate#toggleLeft
   * @description Toggle the left side menu (if it exists).
   * @param {boolean=} isOpen Whether to open or close the menu.
   * Default: Toggles the menu.
   */
  'toggleLeft',
  /**
   * @ngdoc method
   * @name $ionicSideMenuDelegate#toggleRight
   * @description Toggle the right side menu (if it exists).
   * @param {boolean=} isOpen Whether to open or close the menu.
   * Default: Toggles the menu.
   */
  'toggleRight',
  /**
   * @ngdoc method
   * @name $ionicSideMenuDelegate#getOpenRatio
   * @description Gets the ratio of open amount over menu width. For example, a
   * menu of width 100 that is opened by 50 pixels is 50% opened, and would return
   * a ratio of 0.5.
   *
   * @returns {float} 0 if nothing is open, between 0 and 1 if left menu is
   * opened/opening, and between 0 and -1 if right menu is opened/opening.
   */
  'getOpenRatio',
  /**
   * @ngdoc method
   * @name $ionicSideMenuDelegate#isOpen
   * @returns {boolean} Whether either the left or right menu is currently opened.
   */
  'isOpen',
  /**
   * @ngdoc method
   * @name $ionicSideMenuDelegate#isOpenLeft
   * @returns {boolean} Whether the left menu is currently opened.
   */
  'isOpenLeft',
  /**
   * @ngdoc method
   * @name $ionicSideMenuDelegate#isOpenRight
   * @returns {boolean} Whether the right menu is currently opened.
   */
  'isOpenRight',
  /**
   * @ngdoc method
   * @name $ionicSideMenuDelegate#canDragContent
   * @param {boolean=} canDrag Set whether the content can or cannot be dragged to open
   * side menus.
   * @returns {boolean} Whether the content can be dragged to open side menus.
   */
  'canDragContent',
  /**
   * @ngdoc method
   * @name $ionicSideMenuDelegate#edgeDragThreshold
   * @param {boolean|number=} value Set whether the content drag can only start if it is below a certain threshold distance from the edge of the screen


lletSmall(back);
					trailChance = 0.4f;
					trailEffect = new StatusHitEffect() {{
						life = 15;
						color = back;
						sizeEnd = 0.8f;
						shapeVariant = 1;
					}};
					trailLengthScale = 0.25f;

					pierceCap = 2;

					status = UAWStatusEffects.cryoBurn;
					statusDuration = 2 * tick;

					ammoMultiplier = 8;
				}},
				Items.surgeAlloy, new BasicBulletType(8, 20) {{
					height = 25;
					width = 8;
					hitEffect = despawnEffect = new MultiEffect(Fx.hitBulletBig, Fx.lightning);
					smokeEffect = new MultiEffect(Fx.shootBigSmoke2, Fx.fireSmoke);
					shootEffect = new MultiEffect(Fx.shootBig, Fx.sparkShoot);
					status = StatusEffects.electrified;
					trailChance = 0.4f;
					trailColor = Color.lightGray;

					lightning = 3;
					lightningAngle = 360;
					lightningDamage = 1.5f;
					lightningLength = 12;
					collidesAir = false;
				}}
			);
			limitRange(2 * tilesize);

			squareSprite = false;
			cooldownTime = 2 * tick;
			drawer = new DrawTurret(modTurretBase) {{
				parts.addAll(
					new RegionPart("-barrel") {{
						heatProgress = PartProgress.heat.add(PartProgress.heat);
						progress = PartProgress.warmup.add(PartProgress.reload.add(-2.5f));
						moveY = 4 * px;
					}},
					new RegionPart("-side") {{
						progress = PartProgress.warmup.blend(PartProgress.heat, 0.3f).curve(Interp.smooth);
						mirror = true;
						moveX = 2f * px;
						moveY = -4 * px;
						moveRot = -22.5f;
					}},
					new RegionPart("-blade") {{
						progress = PartProgress.warmup;
						mirror = true;
						moveX = -4 * px;
						moveY = 8 * px;
					}},
					new RegionPart("-back") {{
						progress = PartProgress.warmup;
						moveY = -2.5f;
					}},
					new RegionPart("-top")
				);
			}};
		}};
		//endregion MG

		//region Sniper
		ashlock = new UAWItemTurret("ashlock") {{
			requirements(Category.turret, with(
				Items.copper, 150,
				Items.graphite, 100,
				Items.titanium, 50
			));
			size = 2;
			scaledHealth = 250;

			reload = 1.75f * tick;
			recoil = 3f;
			ammoPerShot = 3;
			maxAmmo = 30;

			range = 35 * tilesize;
			inaccuracy = 0f;
			rotateSpeed = 5f;
			shake = 3.5f;

			shootSound = Sfx.wp_k_gunShootBig_1;

			ammoUseEffect = Fx.casing3;

			unitSort = UAWUnitSorts.mostHitPoints;

			ammoEjectBack = 9f;
			shootY = 10f;

			ammo(
				Items.graphite, new ArmorPiercingBulletType(8f, 120f) {{
					Color front = UAWPal.graphiteFront, back = UAWPal.graphiteMiddle;
					height = 24f;
					width = 10f;
					hitSize = 6;
					frontColor = front;
					backColor = back;
					shootEffect = new MultiEffect(
						Fx.shootBig2,
						Fx.hitBulletBig
					);
					smokeEffect = new ShootSmokeEffect() {{
						life = 15;
						color = Pal.


    val iter = value.iterator()
      while (remaining.isNotEmpty() && iter.hasNext()) {
         remaining.remove(iter.next())
      }

      val failure =
         { "Sequence should contain all of ${ts.print().value} but was missing ${remaining.print().value}" }
      val negFailure = { "Sequence should not contain all of ${ts.print().value}" }

      return MatcherResult(remaining.isEmpty(), failure, negFailure)
   }
}

fun <T> Sequence<T>.shouldMatchEach(vararg assertions: (T) -> Unit) = toList().shouldMatchEach(assertions.toList())
infix fun <T> Sequence<T>.shouldMatchEach(assertions: List<(T) -> Unit>) = toList().shouldMatchEach(assertions)
fun <T> Sequence<T>.shouldMatchEach(expected: Sequence<T>, asserter: (T, T) -> Unit) =
   toList().shouldMatchEach(expected.toList(), asserter)
@file:Suppress("DEPRECATION") // FIXME remove deprecation suppression when io.kotest.assertions.json.JsonMatchersKt.shouldMatchJson is removed

package io.kotest.assertions.json

import io.kotest.assertions.shouldFail
import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.throwable.shouldHaveMessage
import io.kotest.property.Arb
import io.kotest.property.Exhaustive
import io.kotest.property.arbitrary.Codepoint
import io.kotest.property.arbitrary.az
import io.kotest.property.arbitrary.numericDouble
import io.kotest.property.arbitrary.string
import io.kotest.property.checkAll
import io.kotest.property.exhaustive.boolean

class EqualTest : FunSpec() {
   init {

      test("comparing strings in objects") {

         checkAll(Arb.string(1..10, Codepoint.az())) { string ->
            val a = """ { "a" : "$string" } """
            a shouldEqualJson a
         }

         val a = """ { "a": "foo", "b": "bar" } """
         val b = """ { "a": "foo", "b": "baz" } """
         a shouldEqualJson a
         shouldFail {
            a shouldEqualJson b
         }.shouldHaveMessage(
            """At 'b' expected 'baz' but was 'bar'

expected:
{
  "a": "foo",
  "b": "baz"
}

actual:
{
  "a": "foo",
  "b": "bar"
}"""
         )
      }

      test("comparing boolean in objects") {
         checkAll(Exhaustive.boolean(), Exhaustive.boolean()) { a, b ->
            val json = """ { "a" : $a, "b": $b } """
            json shouldEqualJson json
         }
         val a = """ { "a": true, "b": false } """
         val b = """ { "a": true, "b": true } """
         shouldFail {
            a shouldEqualJson b
         }.shouldHaveMessage(
            """At 'b' expected true but was false

expected:
{
  "a": true,
  "b": true
}

actual:
{
  "a": true,
  "b": false
}"""
         )
      }

      test("comparing long in objects") {

         checkAll<Long> { long ->
            val a = """ { "a" : $long } """
            a shouldEqualJson a
         }

         val a = """ { "a": 123, "b": 354 } """
         val b = """ { "a": 123, "b": 326 } """
         a shouldEqualJson a
         shouldFail {
            a shouldEqualJson b
         }.shouldHaveMessage(
            """At 'b' expected 326 but was 354

expected:
{
  "a": 123,
  "b": 326
}

actual:
{
  "a": 123,
  "b": 354
}"""
         )
      }

      test("comparing doubles in objects") {


][1]["argsT"] = {}
defs["igIsAnyMouseDown"][1]["argsoriginal"] = "()"
defs["igIsAnyMouseDown"][1]["call_args"] = "()"
defs["igIsAnyMouseDown"][1]["cimguiname"] = "igIsAnyMouseDown"
defs["igIsAnyMouseDown"][1]["defaults"] = {}
defs["igIsAnyMouseDown"][1]["funcname"] = "IsAnyMouseDown"
defs["igIsAnyMouseDown"][1]["location"] = "imgui:940"
defs["igIsAnyMouseDown"][1]["namespace"] = "ImGui"
defs["igIsAnyMouseDown"][1]["ov_cimguiname"] = "igIsAnyMouseDown"
defs["igIsAnyMouseDown"][1]["ret"] = "bool"
defs["igIsAnyMouseDown"][1]["signature"] = "()"
defs["igIsAnyMouseDown"][1]["stname"] = ""
defs["igIsAnyMouseDown"]["()"] = defs["igIsAnyMouseDown"][1]
defs["igIsClippedEx"] = {}
defs["igIsClippedEx"][1] = {}
defs["igIsClippedEx"][1]["args"] = "(const ImRect bb,ImGuiID id)"
defs["igIsClippedEx"][1]["argsT"] = {}
defs["igIsClippedEx"][1]["argsT"][1] = {}
defs["igIsClippedEx"][1]["argsT"][1]["name"] = "bb"
defs["igIsClippedEx"][1]["argsT"][1]["type"] = "const ImRect"
defs["igIsClippedEx"][1]["argsT"][2] = {}
defs["igIsClippedEx"][1]["argsT"][2]["name"] = "id"
defs["igIsClippedEx"][1]["argsT"][2]["type"] = "ImGuiID"
defs["igIsClippedEx"][1]["argsoriginal"] = "(const ImRect& bb,ImGuiID id)"
defs["igIsClippedEx"][1]["call_args"] = "(bb,id)"
defs["igIsClippedEx"][1]["cimguiname"] = "igIsClippedEx"
defs["igIsClippedEx"][1]["defaults"] = {}
defs["igIsClippedEx"][1]["funcname"] = "IsClippedEx"
defs["igIsClippedEx"][1]["location"] = "imgui_internal:3055"
defs["igIsClippedEx"][1]["namespace"] = "ImGui"
defs["igIsClippedEx"][1]["ov_cimguiname"] = "igIsClippedEx"
defs["igIsClippedEx"][1]["ret"] = "bool"
defs["igIsClippedEx"][1]["signature"] = "(const ImRect,ImGuiID)"
defs["igIsClippedEx"][1]["stname"] = ""
defs["igIsClippedEx"]["(const ImRect,ImGuiID)"] = defs["igIsClippedEx"][1]
defs["igIsDragDropActive"] = {}
defs["igIsDragDropActive"][1] = {}
defs["igIsDragDropActive"][1]["args"] = "()"
defs["igIsDragDropActive"][1]["argsT"] = {}
defs["igIsDragDropActive"][1]["argsoriginal"] = "()"
defs["igIsDragDropActive"][1]["call_args"] = "()"
defs["igIsDragDropActive"][1]["cimguiname"] = "igIsDragDropActive"
defs["igIsDragDropActive"][1]["defaults"] = {}
defs["igIsDragDropActive"][1]["funcname"] = "IsDragDropActive"
defs["igIsDragDropActive"][1]["location"] = "imgui_internal:3255"
defs["igIsDragDropActive"][1]["namespace"] = "ImGui"
defs["igIsDragDropA


《评新编历史剧〈海瑞罢官〉》。姚文说吴晗煽动“单干风”、“翻案风”，影射吴晗为彭德怀“问题”翻案。

   29日  《解放军报》转载姚文，编者按指出：“《海瑞罢官》是一株大毒草”。同日，《北京日报》转载姚文，编者按指出：“《海瑞罢官》这出戏有不同意见，应该展开讨论。”

   30日  《人民日报》在“学术研究”栏转载姚文，编者按指出：“我们认为对海瑞和《海瑞罢官》的评价，实际上牵涉到如何对待历史人物和历史剧的问题，用什么样的观点来研究历史和怎样用艺术形式来反映历史人物和历史事件的问题。这个问题，在我国思想界中存在种种不同的意见。……我们准备就《海瑞罢官》这出戏和有关问题在报纸上展开一次辩论。”“我们的方针是：既容许批评的自由，也容许反批评的自由；对于错误的意见，我们也采取说理的方法，实事求是，以理服人。”

   12月

   12日  《北京日报》、《前线》发表署名向阳生(即邓拓)的文章，题为《从〈海瑞罢官〉谈到“道德继承论”——与吴晗同志商榷》。

   27日  《北京日报》发表了吴晗《关于〈海瑞罢官〉的自我批评》。

   30、31日  《人民日报》、《文汇报》先后转发了吴晗《关于〈海瑞罢官〉的自我批评》。

   之后，各报纷纷发表文章讨论、批判吴晗的《海瑞罢官》。

   1966年

   2月

   2日    《新建设》杂志编辑部邀请北京部分学术界人士，就“清官”问题举行了座谈会。

   2日至20日  江青受林彪委托，在上海召开部队文艺工作座谈会。

   3日  彭真召集陆定一、康生、吴冷


 buffer usage contains %s the only other allowed "
            "usage is %s.",
            usage, wgpu::BufferUsage::MapRead, wgpu::BufferUsage::CopyDst);
    }

    DAWN_INVALID_IF(descriptor->mappedAtCreation && descriptor->size % 4 != 0,
                    "Buffer is mapped at creation but its size (%u) is not a multiple of 4.",
                    descriptor->size);

    uint64_t maxBufferSize = device->GetLimits().v1.maxBufferSize;
    DAWN_INVALID_IF(descriptor->size > maxBufferSize,
                    "Buffer size (%u) exceeds the max buffer size limit (%u).%s", descriptor->size,
                    maxBufferSize,
                    DAWN_INCREASE_LIMIT_MESSAGE(device->GetAdapter()->GetLimits().v1, maxBufferSize,
                                                descriptor->size));

    return unpacked;
}

// Buffer

BufferBase::BufferBase(DeviceBase* device, const UnpackedPtr<BufferDescriptor>& descriptor)
    : SharedResource(device, descriptor->label),
      mSize(descriptor->size),
      mUsage(descriptor->usage),
      mInternalUsage(ComputeInternalBufferUsages(device, descriptor->usage, descriptor->size)),
      mState(descriptor.Get<BufferHostMappedPointer>() ? BufferState::HostMappedPersistent
                                                       : BufferState::Unmapped) {
    GetObjectTrackingList()->Track(this);
}

BufferBase::BufferBase(DeviceBase* device,
                       const BufferDescriptor* descriptor,
                       ObjectBase::ErrorTag tag)
    : SharedResource(device, tag, descriptor->label),
      mSize(descriptor->size),
      mUsage(descriptor->usage),
      mInternalUsage(descriptor->usage),
      mState(BufferState::Unmapped) {
    // Track the ErrorBuffer for destruction so it can be unmapped on destruction.
    // Don't do this if the device is already destroyed, so that CreateBuffer can still return
    // a mappedAtCreation buffer after device destroy (per spec).
    // TODO(crbug.com/42241190): Calling device.Destroy() *again* still won't unmap this
    // buffer. Need to fix this, OR change the spec to disallow mapping-at-creation after the
    // device is destroyed. (Note it should always be allowed on *non-destroyed* lost devices.)
    if (device->GetState() != DeviceBase::State::Destroyed) {
        GetObjectTrackingList()->Track(this);
    }
}

BufferBase::~BufferBase() {
    DAWN_ASSERT(mState == BufferState::Unmapped || mState == BufferState::Destroyed ||
                // Happens if the buffer was created mappedAtCreation *after* device destroy.
                // TODO(crbug.com/42241190): This shouldn't be needed once the issue above is fixed,
                // because then mState will just be Destroyed.
                (mState == BufferState::MappedAtCreation &&
                 GetDevice()->GetState() == DeviceBase::State::Destroyed));
}

void BufferBase::DestroyImpl() {
    // TODO(crbug.com/dawn/831): DestroyImpl is called from two places.
    // - It may be called if the buffer is explicitly destroyed with APIDestroy.
    //   This case is NOT thread-safe and needs proper synchronization with other
    //   simultaneous uses of the buffer.
    // - It may be called when the last ref to the buffer is dropped and the buffer
    //   is implicitly destroyed. This case is thread-safe because there are no
    //   other threads using the buffer since there are no other live refs.
    if (mState == BufferState::Mapped || mState == BufferState::PendingMap) {
        UnmapInternal(WGPUMapAsyncStatus_Aborted,
                      "Buffer was destroyed before mapping was resolved.");
    } else if (mState == BufferState::MappedAtCreation) {
        if (mStagingBuffer != nullptr) {
            mStagingBuffer = nullptr;


iling_cvss_v3": {
                        "access_complexity": "access_complexity_low",
                        "access_vector": "access_vector_physical",
                        "availability_impact": "availability_impact_high",
                        "confidentiality_impact": "confidentiality_impact_high",
                        "integrity_impact": "integrity_impact_high",
                        "privileges_required": "privileges_required_none",
                        "scope": "scope_changed",
                        "user_interaction": "user_interaction_none"
                    },
                    "confidentiality_requirement": "confidentiality_requirement_high",
                    "id": 27,
                    "integrity_requirement": "integrity_requirement_high",
                    "name": "Actif isolé critique"
                },
                "hostname": "WIN-09PACDLD",
                "id": 1577,
                "last_communication": "2022-12-08T15:26:31.467+01:00",
                "os": {
                    "arch": "AMD64",
                    "eol": "2021-05-11",
                    "key": "windows_10_1809_64",
                    "name": "Windows 10 1809",
                    "short_name": "Windows 10 1809",
                    "type": "Os::Windows"
                },
                "prioritized_cve_announcements_count": 44,
                "reboot_required": false,
                "status": "server_vulnerable",
                "updates_count": 2
            }
        ]
    }
}
```

#### Human Readable Output

>### Cyberwatch Assets
>
>|id|hostname|reboot_required|category|last_communication|os|environment|groups|cve_announcements_count|prioritized_cve_announcements_count|updates_count|compliance_repositories|
>|---|---|---|---|---|---|---|---|---|---|---|---|
>| 1548 | Siemens Rapidlab 1200 | None | industrial_device | 2022-10-19T09:50:02 | Siemens | Actif isolé critique | ***values***: Sante | 2 | 0 | 1 | ***values***:  |
>| 1577 | WIN-09PACDLD | False | desktop | 2022-12-08T14:26:31 | Windows 10 1809 | Actif isolé critique | ***values***:  | 1038 | 44 | 2 | ***values***:  |

#### Command example

```!cyberwatch-list-assets reboot_required=true communication_failed=false page=1 per_page=5```

#### Context Example

```json
{
    "Cyberwatch": {
        "Asset": [
            {
                "addresses": [
                    "ip-192-168-0-39",
                    "127.0.0.1"
                ],
                "analyzed_at": "2019-01-19T08:15:26.000+01:00",
                "category": "server",
                "created_at": "2019-01-19T08:15:24.000+01:00",
                "cve_announcements_count": 1167,
                "environment": {
                    "availability_requirement": "availability_requirement_low",
                    "ceiling_cvss_v3": null,
                    "confidentiality_requirement": "confidentiality_requirement_low",
                    "id": 32,
                    "integrity_requirement": "integrity_requirement_low",
                    "name": "Low"
                },
                "groups": [
                    {
                        "color": "#12AFCB",
                        "description": null,
                        "id": 617,
                        "name": "ENV_PRODUCTION"
                    },
                    {
                        "color": "#ffd166",
                        "description": "Machines L...",
                        "id": 856,
                        "name": "LINUX "
                    }
                ],
                "hostname


 class="dropdown-group-label">{ "Save as" }</span>
            <input
                class={ if self.invalid { "invalid" } else { "" }}
                oninput={ callback }
                ref={ self.input_ref.clone() }
                value={ self.title.to_owned() } />
            <DropDownMenu<ExportFile>
                values={ Rc::new(get_menu_items(&self.title, has_render)) }
                callback={ ctx.props().callback.clone() }>
            </DropDownMenu<ExportFile>>
        }
    }

    fn update(&mut self, _ctx: &Context<Self>, msg: Self::Message) -> bool {
        match msg {
            ExportDropDownMenuMsg::TitleChange => {
                self.title = self
                    .input_ref
                    .cast::<web_sys::HtmlInputElement>()
                    .unwrap()
                    .value();

                self.invalid = self.title.is_empty();
                true
            }
        }
    }

    fn create(ctx: &Context<Self>) -> Self {
        ctx.set_modal_link();
        let _sub = Some(
            ctx.props()
                .renderer
                .plugin_changed
                .add_listener(ctx.link().callback(|_| ExportDropDownMenuMsg::TitleChange)),
        );

        ExportDropDownMenu {
            title: "untitled".to_owned(),
            _sub,
            ..Default::default()
        }
    }
}
#[doc = "Register `ADC12CTL1` reader"]
pub struct R(crate::R<ADC12CTL1_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<ADC12CTL1_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<ADC12CTL1_SPEC>> for R {
    fn from(reader: crate::R<ADC12CTL1_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `ADC12CTL1` writer"]
pub struct W(crate::W<ADC12CTL1_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<ADC12CTL1_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl core::convert::From<crate::W<ADC12CTL1_SPEC>> for W {
    fn from(writer: crate::W<ADC12CTL1_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `ADC12BUSY` reader - ADC12 Busy"]
pub struct ADC12BUSY_R(crate::FieldReader<bool, bool>);
impl ADC12BUSY_R {
    pub(crate) fn new(bits: bool) -> Self {
        ADC12BUSY_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for ADC12BUSY_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `ADC12BUSY` writer - ADC12 Busy"]
pub struct ADC12BUSY_W<'a> {
    w: &'a mut W,
}
impl<'a> ADC12BUSY_W<'a> {
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !0x01) | (value as u16


b _start

.globl _start
_start:
[FRAGMENT:asminject_wait_for_script_state.s:FRAGMENT]
[FRAGMENT:asminject_set_payload_state.s:FRAGMENT]
// OBFUSCATION_ALLOCATED_MEMORY_ON
// Based on the stage 2 code included with dlinject.py
// no relative offsets required, because everything is done using syscalls

// let the script know it can restore the previous data
	ldr r1, [pc]
	b store_state_ready_for_memory_restore

state_ready_for_memory_restore:
	.word [VARIABLE:STATE_READY_FOR_MEMORY_RESTORE:VARIABLE]
	.balign 16

store_state_ready_for_memory_restore:
	mov r0, r11
	bl asminject_set_payload_state

// wait for the script to have restored memory, then proceed
// load the value that indicates memory_restored into r1
	ldr r1, [pc]
	b begin_waiting1

state_memory_restored:
	.word [VARIABLE:STATE_MEMORY_RESTORED:VARIABLE]
	.balign 16

begin_waiting1:
	// r0 = communications address
	// r1 = value to wait for
	mov r0, r11
	bl asminject_wait_for_script_state

execute_inner_payload:

	// save any necessary register values before running the inner payload
	push {r11}
	push {r10}

	[VARIABLE:SHELLCODE_SOURCE:VARIABLE]

cleanup_and_return:

	// restor


Εξώφυλλο άλμπουμ',
    'Deezer is unavailable in your country, ReFreezer might not work properly. Please use a VPN':
        'Το Deezer δεν είναι διαθέσιμο στη χώρα σας και μπορεί να μην λειτουργεί σωστά. Παρακαλούμε χρησιμοποιήστε ένα VPN',
    'Deezer is unavailable': 'Το Deezer δεν είναι διαθέσιμο',
    'Continue': 'Συνέχεια',
    'Email Login': 'Σύνδεση με Email',
    'Email': 'Email',
    'Missing email or password!': 'Λείπει το email ή ο κωδικός πρόσβασης!',
    'Error logging in using email, please check your credentials.\nError:':
        'Σφάλμα κατά τη σύνδεση μέσω email, παρακαλώ ελέγξτε τα διαπιστευτήριά σας.\nΣφάλμα:',
    'Error logging in!': 'Σφάλμα εισόδου!',
    'Change display mode': 'Εναλλαγή λειτουργίας προβολής',
    'Enable high refresh rates': 'Ενεργοποίηση υψηλών ρυθμών ανανέωσης',
    'Display mode': 'Λειτουργία προβολής',
    'Spotify v1': 'Spotify v1',
    'Import Spotify playlists up to 100 tracks without any login.':
        'Εισαγωγή λίστας αναπαραγωγής έως και 100 κομματιών χωρίς καμία σύνδεση.',
    'Download imported tracks': 'Λήψη εισαγόμενων κομματιών',
    'Start import': 'Έναρξη εισαγωγής',
    'Spotify v2': 'Spotify v2',
    'Import any Spotify playlist, import from own Spotify library. Requires free account.':
        'Εισαγωγή οποιασδήποτε λίστας αναπαραγωγής Spotify, εισαγωγή από τη δική σας βιβλιοθήκη Spotify. Απαιτεί δωρεάν λογαριασμό.',
    'Spotify Importer v2': 'Εισαγωγέας Spotify v2',
    'This importer requires Spotify Client ID and Client Secret. To obtain them:':
        'Αυτός ο εισαγωγέας απαιτεί το αναγνωριστικό πελάτη Spotify και το μυστικό πελάτη. Για να τα αποκτήσετε:',
    '1. Go to: developer.spotify.com/dashboard and create an app.':
        '1. Πηγαίνετε στο: developer.spotify.com/dashboard και δημιουργήστε μια εφαρμογή.',
    'Open in Browser': 'Άνοιγμα σε Πρόγραμμα περιήγησης',
    '2. In the app you just created go to settings, and set the Redirect URL to: ':
        '2. Στην εφαρμογή που μόλις δημιουργήσατε πηγαίνετε στις ρυθμίσεις, και ορίστε το URL Ανακατεύθυνσης σε: ',
    'Copy the Redirect URL': 'Αντιγραφή του URL Ανακατεύθυνσης',
    'Client ID': '


graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PaintFlagsDrawFilter;
import android.graphics.RectF;
import android.graphics.SweepGradient;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.WindowManager;

/**
 * colorful arc progress bar
 * Created by shinelw on 12/4/15.
 */
public class ColorArcProgressBar extends View{

    private int mWidth;
    private int mHeight;
    private int diameter = 500;  //直径
    private float centerX;  //圆心X坐标
    private float centerY;  //圆心Y坐标

    private Paint allArcPaint;
    private Paint progressPaint;
    private Paint vTextPaint;
    private Paint hintPaint;
    private Paint degreePaint;
    private Paint curSpeedPaint;

    private RectF bgRect;

    private ValueAnimator progressAnimator;
    private PaintFlagsDrawFilter mDrawFilter;
    private SweepGradient sweepGradient;
    private Matrix rotateMatrix;

    private float startAngle = 135;
    private float sweepAngle = 270;
    private float currentAngle = 0;
    private float lastAngle;
    private int[] colors = new int[]{Color.GREEN, Color.YELLOW, Color.RED, Color.RED};
    private float maxValues = 60;
    private float curValues = 0;
    private float bgArcWidth = dipToPx(2);
    private float progressWidth = dipToPx(10);
    private float textSize = dipToPx(60);
    private float hintSize = dipToPx(15);
    private float curSpeedSize = dipToPx(13);
    private int aniSpeed = 1000;
    private float longdegree = dipToPx(13);
    private float shortdegree = dipToPx(5);
    private final int DEGREE_PROGRESS_DISTANCE = dipToPx(8);

    private String hintColor = "#676767";
    private String longDegreeColor = "#111111";
    private String shortDegreeColor = "#111111";
    private String bgArcColor = "#111111";
    private String titleString;
    private String hintString;

    private boolean isShowCurrentSpeed = true;
    private boolean isNeedTitle;
    private boolean isNeedUnit;
    private boolean isNeedDial;
    private boolean isNeedContent;

    // sweepAngle / maxValues 的值
    private float k;

    public ColorArcProgressBar(Context context) {
        super(context, null);
        initView();
    }

    public ColorArcProgressBar(Context context, AttributeSet attrs) {
        super(context, attrs, 0);
        initCofig(context, attrs);
        initView();
    }

    public ColorArcProgressBar(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initCofig(context, attrs);
        initView();
    }

    /**
     * 初始化布局配置
     * @param context
     * @param attrs
     */
    private void initCofig(Context context, AttributeSet attrs) {
        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ColorArcProgressBar);
        int color1 = a.getColor(R.styleable.ColorArcProgressBar_front_color1, Color.GREEN);
        int color2 = a.getColor(R.styleable.ColorArcProgressBar_front_color2, color1);
        int color3 = a.getColor(R.styleable.ColorArcProgressBar_front_color3, color1);
        colors = new int[]{color1, color2, color3, color3};

        sweepAngle = a.getInteger(R.styleable.ColorArcProgressBar_total_engle, 270);
        bgArcWidth = a.getDimens


AL, Value.ILLEGAL, Value.ILLEGAL, false);
    }

    public AArch64SHA3Op(LIRGeneratorTool tool, AllocatableValue bufValue, AllocatableValue stateValue, AllocatableValue blockSizeValue, AllocatableValue ofsValue,
                    AllocatableValue limitValue, AllocatableValue resultValue, boolean multiBlock) {
        super(TYPE);

        this.bufValue = bufValue;
        this.stateValue = stateValue;
        this.blockSizeValue = blockSizeValue;

        this.ofsValue = ofsValue;
        this.limitValue = limitValue;
        this.resultValue = resultValue;

        this.bufTempValue = tool.newVariable(bufValue.getValueKind());
        this.blockSizeTempValue = tool.newVariable(blockSizeValue.getValueKind());

        this.multiBlock = multiBlock;

        if (multiBlock) {
            this.ofsTempValue = tool.newVariable(ofsValue.getValueKind());
        } else {
            this.ofsTempValue = Value.ILLEGAL;
        }

        this.temps = new Value[]{
                        v0.asValue(),
                        v1.asValue(),
                        v2.asValue(),
                        v3.asValue(),
                        v4.asValue(),
                        v5.asValue(),
                        v6.asValue(),
                        v7.asValue(),
                        v8.asValue(),
                        v9.asValue(),
                        v10.asValue(),
                        v11.asValue(),
                        v12.asValue(),
                        v13.asValue(),
                        v14.asValue(),
                        v15.asValue(),
                        v16.asValue(),
                        v17.asValue(),
                        v18.asValue(),
                        v19.asValue(),
                        v20.asValue(),
                        v21.asValue(),
                        v22.asValue(),
                        v23.asValue(),
                        v24.asValue(),
                        v25.asValue(),
                        v26.asValue(),
                        v27.asValue(),
                        v28.asValue(),
                        v29.asValue(),
                        v30.asValue(),
                        v31.asValue(),
        };
    }

    static ArrayDataPointerConstant roundConsts = new ArrayDataPointerConstant(new long[]{
            // @formatter:off
            0x0000000000000001L, 0x0000000000008082L, 0x800000000000808AL,
            0x8000000080008000L, 0x000000000000808BL, 0x0000000080000001L,
            0x8000000080008081L, 0x8000000000008009L, 0x000000000000008AL,
            0x0000000000000088L, 0x0000000080008009L, 0x000000008000000AL,
            0x000000008000808BL, 0x800000000000008BL, 0x8000000000008089L,
            0x8000000000008003L, 0x8000000000008002L, 0x8000000000000080L,
            0x000000000000800AL, 0x800000008000000AL, 0x8000000080008081L,
            0x8000000000008080L, 0x0000000080000001L, 0x8000000080008008L
            // @formatter:on
    }, 16);

    public static void keccak


XmlBodyVerificationBuilder(Contract contract, Optional<String> lineSuffix) {
		this.contract = contract;
		this.lineSuffix = lineSuffix;
	}

	void addXmlResponseBodyCheck(BlockBuilder blockBuilder, Object responseBody, BodyMatchers bodyMatchers,
			String responseString, boolean shouldCommentOutBDDBlocks) {
		addXmlProcessingLines(blockBuilder, responseString);
		Object processedBody = XmlToXPathsConverter.removeMatchingXPaths(responseBody, bodyMatchers);
		List<BodyMatcher> matchers = new XmlToXPathsConverter().mapToMatchers(processedBody);
		if (bodyMatchers != null && bodyMatchers.hasMatchers()) {
			matchers.addAll(bodyMatchers.matchers());
		}

		addBodyMatchingBlock(matchers, blockBuilder, responseBody, shouldCommentOutBDDBlocks);
	}

	private void addXmlProcessingLines(final BlockBuilder blockBuilder, String responseString) {
		Arrays
			.asList("DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance()",
					"builderFactory.setNamespaceAware(true)",
					"DocumentBuilder documentBuilder = builderFactory.newDocumentBuilder()",
					"Document parsedXml = documentBuilder.parse(new InputSource(new StringReader(" + responseString
							+ ")))")
			.forEach(it -> {
				blockBuilder.addLine(it);
				addColonIfRequired(lineSuffix, blockBuilder);
			});
	}

	@Override
	public void methodForNullCheck(BodyMatcher bodyMatcher, BlockBuilder bb) {
		String quotedAndEscapedPath = quotedAndEscaped(bodyMatcher.path());
		String method = "assertThat(nodeFromXPath(parsedXml, " + quotedAndEscapedPath + ")).isNull()";
		bb.addLine(method.replace("$", "\\$"));
		addColonIfRequired(lineSuffix, bb);
	}

	@Override
	public void methodForEqualityCheck(BodyMatcher bodyMatcher, BlockBuilder bb, Object body) {
		Object retrievedValue = quotedAndEscaped(XmlToXPathsConverter.retrieveValue(bodyMatcher, body));
		String comparisonMethod = bodyMatcher.matchingType().equals(MatchingType.EQUALITY) ? "isEqualTo" : "matches";
		String method = "assertThat(valueFromXPath(parsedXml, " + quotedAndEscaped(bodyMatcher.path()) + "))."
				+ comparisonMethod + "(" + retrievedValue + ")";
		bb.addLine(method.replace("$", "\\$"));
		addColonIfRequired(lineSuffix, bb);
	}

	@Override
	public void methodForCommandExecution(BodyMatcher bodyMatcher, BlockBuilder bb, Object body) {
		Object retrievedValue = quotedAndEscaped(XmlToXPathsConverter.retrieveValueFromBody(bodyMatcher.path(), body));
		ExecutionProperty property = (ExecutionProperty) bodyMatcher.value();
		bb.addLine(property.insertValue(((String) retrievedValue).replace("$", "\\$")));
		addColonIfRequired(lineSuffix, bb);
	}

	@Override
	public void methodForTypeCheck(BodyMatcher bodyMatcher, BlockBuilder bb, Object copiedBody) {
		throw new UnsupportedOperationException(
				"The `getNodeValue()` method in `org.w3c.dom.Node` always returns String.");
	}

}
/*
 * Copyright 2013-present the original author or authors.
 *
 * 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
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.cloud.contract.verifier.builder;

import static org.springframework.cloud.contract.verifier.util.NamesUtil.capitalize;

interface DefaultClassMetadata extends ClassMetaData, DefaultBaseClassProvider {

	@Override
	default ClassMetaData packageDefinition() {
		blockBuilder().addLi


ions.DataProvider
import org.testng.annotations.Test
import java.util.*

@Test
class TokenTransformerTest {
    @DataProvider
    fun envTransformerTestDp() = arrayOf(
            arrayOf("a\$var1 cdef\$var2", "ab cdefg"),
            arrayOf("a\${var1}cdef\${var2}", "abcdefg"),
            arrayOf("a\$var1 cdef\${var2}", "ab cdefg")
    )

    @Test(dataProvider = "envTransformerTestDp")
    fun envTransformerTest(s: String, expected: String) {
        val env = mapOf("var1" to "b", "var2" to "g")
        val result = EnvVariableTransformer(env).transform(listOf(s))
        assertThat(result).isEqualTo(listOf(expected))
    }

    @Test(enabled = false, description = "Need a correct directory")
    fun globTransformerTest() {
        val directoryStack = Stack<String>().apply { push("/users/cedricbeust/kotlin/kosh") }
        val t = GlobTransformer(directoryStack).transform(listOf("*kts"))
        assertThat(t).isEqualTo(listOf("a.kts", "build.gradle.kts"))
    }

}package com.beust.chip8

import java.io.File
import java.util.concurrent.Executors
import java.util.concurrent.ScheduledFuture
import java.util.concurrent.TimeUnit
import javax.sound.sampled.AudioSystem
import javax.sound.sampled.Clip

/**
 * For clients that want to be notified when something happens on the computer.
 */
interface ComputerListener {
    fun onKey(key: Int?)
    fun onPause() {}
    fun onStart() {}
}

class Computer(val display: Display = DisplayGraphics(),
        val keyboard: Keyboard = Keyboard(),
        val frameBuffer: FrameBuffer = FrameBuffer(),
        var cpu: Cpu = Cpu(),
        val sound: Boolean = true)
{
    var paused = true
    var cpuClockHz: Long = 500
        set(v) {
            println("New clock speed: $v")
            field = v
            pause()
            start()
        }

    private val executor = Executors.newSingleThreadScheduledExecutor()
    private var cpuFuture: ScheduledFuture<*>? = null
    private var timerFuture: ScheduledFuture<*>? = null
    private var romFile: File? = null
    private val soundInputStream by lazy {
        AudioSystem.getAudioInputStream(
                this::class.java.classLoader.getResource("sound.wav"))
    }
    private val clip by lazy { AudioSystem.getClip().apply {
        open(soundInputStream)
    }}

    var listener: ComputerListener? = null

    private fun unsigned(b: Byte): Int = if (b < 0) b + 0x10 else b.toInt()

    fun loadRom(romFile: File, launchTimers: Boolean = true) {
        this.romFile = romFile
        resetCpu()
        if (launchTimers) {
            start()
        }
    }

    private fun resetCpu() {
        cpu = Cpu()
        romFile?.let {
            cpu.loadRom(it.readBytes())
        }
    }

    fun stop() {
        pause()
        clip.stop()
        display.clear(frameBuffer.frameBuffer)
        resetCpu()
    }

    fun pause() {
        listener?.onPause()
        paused = true
        cpuFuture?.cancel(true)
        timerFuture?.cancel(true)
    }

    fun start() {
        listener?.onStart()
        paused = false
        launchTimers()
    }

    private fun nextInstruction(pc: Int = cpu.PC) : Instruction {
        fun extract(pc: Int): Pair<Int, Int> {


(`[API-2] BD sincronizada`)

  res.send('OK');
})

app.listen(port, () => {
  console.log("Api 2 (banco) corriendo en http://localhost:"+port)
})// КОНТРОЛЛЕРЫ (РОУТЫ)

import {
  Controller,
  Get,
  Body,
  Post,
  HttpStatus,
  HttpCode,
  // Param,
  // Delete,
  // Put,
  // Redirect,
  // Header,
  // Req,
  // Res,
} from '@nestjs/common';
import { CreateImageDto } from './dto/create-image.dto';
import { ImagesService } from './images.service';
import { Image } from './schemas/image.schema';

// import { Request, Response } from 'express';
// import { UpdateImageDto } from './dto/update-image.dto';

// express
// app.use((req, res, next) => {
//   res.status(201).json('status:201');
// });

// routes
@Controller('images')
export class ImagesController {
  constructor(private imagesService: ImagesService) {}

  // ------------------- РОУТЫ ДЛЯ ТЗ!!!!------------------
  @Post('upload/dog/image')
  @HttpCode(HttpStatus.CREATED)
  createDog(@Body() createImageDto: CreateImageDto): Promise<Image> {
    return this.imagesService.create(createImageDto);
  }

  @Get('list/dog/images')
  @HttpCode(HttpStatus.OK)
  getAll(): Promise<Image[]> {
    return this.imagesService.getAll();
  }

  // ---------------ПРИМЕРЫ----------------
  // one by id
  // @Get(':id')
  // getOne(@Param('id') id: string) {
  //   return this.imagesService.getById(id);
  // }

  // create one (send body create dto)
  // @Post()
  // показать статус (статусы это енамы)
  // @HttpCode(HttpStatus.CREATED)
  // показать хедеры
  // @Header('Cache-Control', 'none')
  // create(@Body() createImageDto: CreateImageDto) {
  //   return this.imagesService.create(createImageDto);
  // }

  // delete one
  // @Delete(':id')
  // remove(@Param('id') id: string): string {
  //   return 'remove' + id;
  // }

  // update one (send body create dto)
  // @Put(':id')
  // update(
  //   @Body() updateImageDto: UpdateImageDto,
  //   @Param('id') id: string,
  // ): string {
  //   return `Title: ${updateImageDto.title} Url: ${updateImageDto.url} ${id}`;
  // }
}
import { Injectable } from '@angular/core';
import { DrawingAreaComponent } from '../../components/drawing-work-place/drawing-area/drawing-area.component';
import { SELECT_DRAWING_TYPE } from '../enum/drawing-type';
import { SELECT_SHAPE_TYPE } from '../enum/shape-type';
import { Coordinate } from '../interfaces/coordinate';
import { Tool } from './tool.service';

const FIRST = 0;
const LAST = 1;
const THIRD_POINT = 3;

@Injectable({
    providedIn: 'root'
})

export class RectangleTool extends Tool {

  constructor() {
    super();
    this.coordinates = [{x: 0, y: 0}, {x: 0, y: 0}];
  }

  onMouseDown(coordinate: Coordinate, drawingArea: DrawingAreaComponent): void {

    if (!this.isDrawing) {
      this.isDrawing = true;

      this.coordinates[FIRST] = coordinate;
      this.coordinates[LAST] = coordinate;

      this.updateCoordinates(drawingArea);
      drawingArea.getShape().shapeType = SELECT_SHAPE_TYPE.RECTANGLE;
      d


308L); }
    static NativeType epsilon() { return static_cast<NativeType>(2.22044604925031308085e-16L); }
};

template <unsigned BitLen_, CastMode CastMode>
class UAVCAN_EXPORT FloatSpec : public IEEE754Limits<BitLen_>
{
    FloatSpec();

public:
    enum { BitLen = BitLen_ };
    enum { MinBitLen = BitLen };
    enum { MaxBitLen = BitLen };
    enum { IsPrimitive = 1 };

    typedef typename NativeFloatSelector<BitLen>::Type StorageType;

#if UAVCAN_CPP_VERSION < UAVCAN_CPP11
    enum { IsExactRepresentation = (sizeof(StorageType) * 8 == BitLen) };
#else
    enum { IsExactRepresentation = (sizeof(StorageType) * 8 == BitLen) && std::numeric_limits<StorageType>::is_iec559 };
#endif

    using IEEE754Limits<BitLen>::max;
    using IEEE754Limits<BitLen>::epsilon;
#if UAVCAN_CPP_VERSION >= UAVCAN_CPP11
    static std::float_round_style roundstyle() { return IEEE754Converter::roundstyle(); }
#endif

    static int encode(StorageType value, ScalarCodec& codec, TailArrayOptimizationMode)
    {
        // cppcheck-suppress duplicateExpression
        if (CastMode == CastModeSaturate)
        {
            saturate(value);
        }
        else
        {
            truncate(value);
        }
        return codec.encode<BitLen>(IEEE754Converter::toIeee<BitLen>(value));
    }

    static int decode(StorageType& out_value, ScalarCodec& codec, TailArrayOptimizationMode)
    {
        typename IntegerSpec<BitLen, SignednessUnsigned, CastModeTruncate>::StorageType ieee = 0;
        const int res = codec.decode<BitLen>(ieee);
        if (res <= 0)
        {
            return res;
        }
        out_value = IEEE754Converter::toNative<BitLen>(ieee);
        return res;
    }

    static void extendDataTypeSignature(DataTypeSignature&) { }

private:
    static inline void saturate(StorageType& value)
    {
        if ((IsExactRepresentation == 0) && isFinite(value))
        {
            if (value > max())
            {
                value = max();
            }
            else if (value < -max())
            {
                value = -max();
            }
            else
            {
                ; // Valid range
            }
        }
    }

    static inline void truncate(StorageType& value)
    {
        if ((IsExactRepresentation == 0) && isFinite(value))
        {
            if (value > max())
            {
                value = NumericTraits<StorageType>::infinity();
            }
            else if (value < -max())
            {
                value = -NumericTraits<StorageType>::infinity();
            }
            else
            {
                ; // Valid range
            }
        }
    }
};

template <unsigned BitLen, CastMode CastMode>
class UAVCAN_EXPORT YamlStreamer<FloatSpec<BitLen, CastMode> >
{
    typedef typename FloatSpec<BitLen, CastMode>::StorageType StorageType;

public:
    template <typename Stream>  // cppcheck-suppress passedByValue
    static void stream(Stream& s, const StorageType value, int)
    {
        s << value;
    }
};

}

#endif // UAVCAN_MARSHAL_FLOAT_SPEC_HPP_INCLUDED
/*
 * Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
 */

#ifndef UAVCAN_NODE_SERVICE_SERVER_HPP_INCLUDED
#define UAVCAN_NODE_SERVICE_SERVER_HPP_INCLUDED

#include <uavcan/build_config.hpp>
#include <uavcan/node/generic_publisher.hpp>
#include <uavcan/node/generic_subscriber.hpp>

#if !defined(UAVCAN_CPP_VERSION) || !defined(UAVCAN_CPP11)
# error UAVCAN_CPP_VERSION
#endif

#if UAVCAN_CPP_VERSION >= UAVCAN_CPP11
# include <functional>
#endif

namespace uavcan
{
/**
 * This type can be used in place of the response type in a service server callback to get more advanced control
 * of service request processing.
 *
 * PLEASE NOTE that since this class i


9),UpperIdent(13:9-13:11),CloseRound(13:11-13:12),Comma(13:12-13:13),
CloseRound(14:3-14:4),OpArrow(14:5-14:7),LowerIdent(14:8-14:9),
EndOfFile(15:1-15:1),
~~~
# PARSE
~~~clojure
(file @1.1-14.9
	(type-module @1.1-1.5)
	(statements
		(s-type-decl @1.1-8.26
			(header @1.1-1.16 (name "Hash")
				(args
					(ty-var @1.6-1.7 (raw "a"))
					(ty-var @1.9-1.15 (raw "hasher"))))
			(ty-var @3.3-3.4 (raw "a")))
		(s-type-decl @10.1-14.9
			(header @10.1-10.10 (name "Decode")
				(args
					(ty-var @10.8-10.9 (raw "a"))))
			(ty-var @10.13-10.14 (raw "a")))))
~~~
# FORMATTED
~~~roc
Hash(a, hasher) # After header
	: # After colon
		a # After var
			where # After where
				module(a).hash : hasher # After method
					-> # After arrow
						hasher, # After first clause
				module(hasher).Hasher

Decode(a) : a
	where
		module(a).decode : List(U8) -> a
~~~
# CANONICALIZE
~~~clojure
(can-ir
	(s-alias-decl @1.1-8.26
		(ty-header @1.1-1.16 (name "Hash")
			(ty-args
				(ty-rigid-var @1.6-1.7 (name "a"))
				(ty-rigid-var @1.9-1.15 (name "hasher"))))
		(ty-rigid-var-lookup (ty-rigid-var @1.6-1.7 (name "a"))))
	(s-alias-decl @10.1-14.9
		(ty-header @10.1-10.10 (name "Decode")
			(ty-args
				(ty-rigid-var @10.8-10.9 (name "a"))))
		(ty-rigid-var-lookup (ty-rigid-var @10.8-10.9 (name "a")))))
~~~
# TYPES
~~~clojure
(inferred-types
	(defs)
	(type_decls
		(alias @1.1-8.26 (type "Hash(a, hasher)")
			(ty-header @1.1-1.16 (name "Hash")
				(ty-args
					(ty-rigid-var @1.6-1.7 (name "a"))
					(ty-rigid-var @1.9-1.15 (name "hasher")))))
		(alias @10.1-14.9 (type "Decode(a)")
			(ty-header @10.1-10.10 (name "Decode")
				(ty-args
					(ty-rigid-var @10.8-10.9 (name "a"))))))
	(expressions))
~~~
# META
~~~ini
description=Three-level nested lambda captures - innermost lambda captures from all outer levels
type=expr
~~~
# SOURCE
~~~roc
(|outer| |middle| |inner| outer + middle + inner)(1)(2)(3)
~~~
# EXPECTED
NIL
# PROBLEMS
NIL
# TOKENS
~~~zig
OpenRound(1:1-1:2),OpBar(1:2-1:3),LowerIdent(1:3-1:8),OpBar(1:8-1:9),OpBar(1:10-1:11),LowerIdent(1


;
      this.stamp = setTimeout(() => {
        card.isFlipped = false;
        this.deck[prevCardId].isFlipped = false;
      }, 1000);
    }
    this.checkIsEndGame();
    this.prevCard = null;
  }

  checkIsEndGame() {
    const countFlipped = this.deck.filter(e => e.isFlipped).length;

    if(countFlipped === 30) {
      setTimeout(() => {
        this.openDialog();
      }, 1000);
    }
  }

  openDialog(): void {
    const dialogRef = this.dialog.open(DialogEndOfTheGameComponent, {
      width: '300px'
    });

    dialogRef.afterClosed().subscribe(result => {
      if(result) {
        this.init();
      }
    });
  }
}

export const getPrimesWithPair = (maxNum = 50) => {
  const primes = findPrimesFaster(maxNum);
  return shuffleArray([...primes, ...primes]);
};

export const shuffleArray = (arr: number[]) => {
  for (let i = arr.length - 1; i > 0; i--) {
    const j = ~~(Math.random() * (i + 1));
    [arr[i], arr[j]] = [arr[j], arr[i]];
  }

  return arr;
};

export const findPrimesFaster = (target) => {
  if (target && Number.isInteger(target) && target > 2) {
    let record = [];
    let primes = [2];
    let max = Math.sqrt(target);

    for (let number = 0; number < target; number++) {
      record.push(1);
    }

    for (let prime = 3; prime <= max; prime += 2) {
      if (record[prime]) {
        for (let multiple = prime * prime; multiple < target; multiple += prime * 2) {
          record[multiple] = 0;
        }
      }
    }

    for (let sievedNumber = 3; sievedNumber < target; sievedNumber += 2) {
      if (record[sievedNumber]) {
        primes.push(sievedNumber);
      }
    }

    return primes;
  }

  return [];
};import { Domain, DomainFunctions, TableDomainEntry } from "./zeidon"
import { ZeidonError, AttributeValueError } from "./zeidon"

export class BaseDomainFunctions implements DomainFunctions {
    domain: Domain;

    constructor( domain: Domain ) { this.domain = domain }

    checkForRequiredValue( value: any, attributeDef: any ) {
        if ( attributeDef.required && ( value === undefined || value === null || value === "" ) )
            throw new AttributeValueError( `Value is required.`, attributeDef );
    }

    convertExternalValue( value: any, attributeDef: any, context?: any ): any {
        this.checkForRequiredValue( value, attributeDef );
        return value;
    }

    convertToJsType( value: any, attributeDef: any, context = undefined ): any {
        return value;
    }
}

/**
 * User-written code to process domains.
 */
export class StringDomainFunctions extends BaseDomainFunctions {
    convertExternalValue( value: any, attributeDef: any, context? : any ): any {
        this.checkForRequiredValue( value, attributeDef );
        if ( value == undefined )
            return undefined;

        let str = value.toString();

        if ( attributeDef.maxLength ) {
            if ( str.length > attributeDef.maxLength )
                throw new AttributeValueError(`Length is longer than max string length: ${value}`, attributeDef );
            else
            if ( str.length > attributeDef.domain.maxLength )
                throw new AttributeValueError(`Length is longer than max string length: ${value}`, attributeDef );
        }

        return str;
    }
}

export class IntegerDomainFunctions extends BaseDomainFunctions {
    convertExternalValue( value: any, attributeDef: any, context? : any ): any {
        this.checkForRequiredValue( value, attributeDef );
        if ( value == undefined )
            return undefined;

        if ( typeof value === 'number' ) {
            // Do nothing atm.
        } else
        if ( typeof value === 'string' ) {
            let v = Number(value);
            if ( isNaN( v ) ) {
                throw new AttributeValueError(`Invalid integer value: ${value}`, attributeDef );


FCTRL>;
#[doc = "Writer for register FCTRL[%s]"]
pub type W = crate::W<u32, super::FCTRL>;
#[doc = "Register FCTRL[%s]
`reset()`'s with value 0"]
impl crate::ResetValue for super::FCTRL {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
#[doc = "Reader of field `FCOUNT`"]
pub type FCOUNT_R = crate::R<u8, u8>;
#[doc = "Reader of field `FWMARK`"]
pub type FWMARK_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `FWMARK`"]
pub struct FWMARK_W<'a> {
    w: &'a mut W,
}
impl<'a> FWMARK_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16);
        self.w
    }
}
impl R {
    #[doc = "Bits 0:4 - Result FIFO counter"]
    #[inline(always)]
    pub fn fcount(&self) -> FCOUNT_R {
        FCOUNT_R::new((self.bits & 0x1f) as u8)
    }
    #[doc = "Bits 16:19 - Watermark level selection"]
    #[inline(always)]
    pub fn fwmark(&self) -> FWMARK_R {
        FWMARK_R::new(((self.bits >> 16) & 0x0f) as u8)
    }
}
impl W {
    #[doc = "Bits 16:19 - Watermark level selection"]
    #[inline(always)]
    pub fn fwmark(&mut self) -> FWMARK_W {
        FWMARK_W { w: self }
    }
}
<filename>tests/gp_test.rs
extern crate blas_src;
extern crate lapack_src;
extern crate opensrdk_kernel_method;
extern crate opensrdk_linear_algebra;
extern crate opensrdk_probability;
extern crate plotters;
extern crate rayon;

use crate::opensrdk_probability::*;
use opensrdk_kernel_method::*;
use opensrdk_probability::nonparametric::*;
use plotters::{coord::Shift, prelude::*};
use rand::prelude::*;
use rand_distr::StandardNormal;
use std::time::Instant;

#[derive(Clone, Copy)]
pub enum Type {
    Exact,
    Sparse,
    KissLove,
}

#[test]
fn test_main() {
    let is_not_ci = false;
    let is_gif = false;
    let tp = Type::Sparse;

    if is_not_ci {
        let start = Instant::now();
        if is_gif {
            draw_gif(tp).unwrap();
        } else {
            draw_png(tp).unwrap();
        }
        let end = start.elapsed();
        println!("{}.{:03}sec", end.as_secs(), end.subsec_nanos() / 1_000_000);
    }
}

fn func(x: f64) -> f64 {
    0.1 * x + x.sin() + 2.0 * (-x.powi(2)).exp()
}

fn samples(size: usize) -> Vec<(f64, f64)> {
    let mut rng = StdRng::from_seed([1; 32]);
    let mut rng2 = StdRng::from_seed([32; 32]);

    (0..size)
        .into_iter()
        .map(|_| {
            let x = rng2.gen_range(-8.0..=8.0);
            let y = func(x) + rng.sample::<f64, _>(StandardNormal);

            (x, y)
        })
        .collect()
}

fn draw(
    tp: Type,
    size: usize,
    root: &DrawingArea<BitMapBackend, Shift>,
) -> Result<(), Box<dyn std::error::Error>> {
    let samples = samples(siz