.871l2.844-4.856a1.123 1.123 0 00-.399-1.539zm-.664.609c.145-.04.301.015.395.136a.38.38 0 01.023.415l-.191.324-.645-.38.188-.323a.367.367 0 01.23-.172zm-5.648 10.906l-.649-.379 4.93-8.414.648.379zm-.258-19.094l1.344 1.344h-1.344zm4.918 9.653l.191-.32.645.378-.188.32zM18 2.625V12.75c0 .023.004.047.008.074l-.758 1.29V3.75a.379.379 0 00-.11-.266l-.859-.859zM3.75 1.5h10.125v2.25c0 .207.168.375.375.375h2.25v11.27L14.973 18H3.75v-1.922c.527-.137.941-.55 1.078-1.078a.375.375 0 00-.727-.188.736.736 0 01-.351.461v-2.57c.527-.137.941-.55 1.078-1.078a.375.375 0 00-.727-.188.736.736 0 01-.351.461V8.953c.527-.137.941-.55 1.078-1.078a.375.375 0 00-.727-.188.736.736 0 01-.351.461V5.203c.527-.137.941-.55 1.078-1.078a.375.375 0 00-.727-.188.736.736 0 01-.351.461zM2.625 3.75c0-.27.145-.516.375-.648v1.296a.748.748 0 01-.375-.648zm0 3.75c0-.27.145-.516.375-.648v1.296a.748.748 0 01-.375-.648zm0 3.75c0-.27.145-.516.375-.648v1.296a.748.748 0 01-.375-.648zm0 3.375c0-.27.145-.516.375-.648v1.296a.748.748 0 01-.375-.648zM4.5 19.5v-.75h10.035l-.441.75zm9.508 1.98l.34.2-.418.324zM18 19.5h-1.297L18 17.285zm0 0" />
    </Icon>
  );
}
import Icon from "../icon.jsx";

export default function MicrosoftOutlook(props) {
  return (
    <Icon {...props}>
      <path d="M14.9434 5.1811v4.632l1.6203 1.019a.4124.4124 0 0 0 .1776 0l6.9669-4.697a.9929.9929 0 0 0-.811-.954h-7.9538Z" />
      <path d="m14.9432 11.5409 1.4775 1.0148a.4406.4406 0 0 0 .4592 0c-.2537.1531 6.8273-4.5481 6.8273-4.5481v8.5128a1.1915 1.1915 0 0 1-.7518 1.2363 1.1902 1.1902 0 0 1-.5083.0788h-7.5047l.0008-6.2946ZM7.2947 9.4053a1.3608 1.3608 0 0 0-1.2009.7087 3.4938 3.4938 0 0 0-.4


, event: Event) => void;
        private onblocked: (event: Event) => void;
        oncreated: (transaction: IVersionChangeTransaction, event: IDBVersionChangeEvent) => void = function(transaction, event){};
        private migrationManager: MigrationManager;

        constructor(db: Database, opener: IDBOpenDBRequest){
            this.source = db;
            this.target = opener;
            this.migrationManager = new MigrationManager(this, this.source.objectStores, this.source.customMigration);

            opener.onsuccess = (event: Event) => {
                this.source.target = <IDBDatabase>(<IDBOpenDBRequest>event.target).result;
                this.onsuccess(event);
            };
            opener.onerror = (event: Event) => {
                var error = opener.error;
                this.onerror(error, event);
            };
            opener.onblocked = (event: Event) => {
                this.onblocked(event);
            };
            opener.onupgradeneeded = (event: IDBVersionChangeEvent) => {
                var req = <IDBOpenDBRequest>event.target;
                this.source.target = <IDBDatabase>req.result;
                var transaction: IVersionChangeTransaction = new VersionChangeTransaction<IVersionChangeTransaction>(this.source, req.transaction);
                this.migrationManager.execute(transaction, event);
            };
        }
        onSuccess(callback: (event: Event) => void): OpenDBRequest{
            this.onsuccess = callback;
            return this;
        }
        onError(callback: (error: DOMError, event: Event) => void): OpenDBRequest{
            this.onerror = callback;
            return this;
        }
        onBlocked(callback: (event: Event) => void): OpenDBRequest{
            this.onblocked = callback;
            return this;
        }
        onCreated(callback: (transaction: IVersionChangeTransaction, event: IDBVersionChangeEvent) => void): OpenDBRequest{
            this.oncreated = callback;
            return this;
        }
    }

    export interface IMigration{
        /**
         * 現在のバージョンにおけるマイグレーションを完了し、次のバージョンへのマイグレーションに移行します
         *
         * ※このメソッドを呼び出した後にデータの操作を行うとデータの不整合が発生する恐れがあります
         */
        next(): void;
    }

    class Migration implements IMigration{
        private source: MigrationManager;
        private continued: boolean = false;
        private executed: boolean = false;
        version: number;
        createdObjectStores: IObjectStoreParams[] = [];
        createdIndexes: {storeName: string; index: IIndexParams}[] = [];
        droppedObjectStores: IObjectStoreParams[] = [];
        droppedIndexes: {storeName: string; index: IIndexParams}[] = [];
        customOperation: (transaction: IVersionChangeTransaction, migration: IMigration) => void;

        constructor(manager: MigrationManager, version: number){
            this.source = manager;
            this.version = version;
        }

        /**
         * 現在のバージョンにおけるマイグレーションを完了し、次のバージョンへのマイグレーションに移行します
         *
         * ※このメソッドを呼び出した後にデータの操作を行うとデータの不整合が発生する恐れがあります
         */
        next(): void{
            if(this.continued){
                console.error("Already called.");
                return;
            }
            this.continued = true;
            this.source.next();
        }


-clusters)

X-Means algorithm.

Input:

data - sequence of samples

max-clusters - number of clusters

See more in SMILE doc

Examples

Expect 2 clusters, gaussian distribution.

((juxt :clusters :sizes :representatives)
 (x-means (repeatedly 10000
                      (fn* [] (r/randval (r/grand) (r/grand 5 1.0))))
          4))
;;=> [2 (4906 5094) ((-6.044219999840173E-4) (4.972183058432598))]

view source

<!DOCTYPE html PUBLIC ""
    "">
<meta charset="UTF-8" /><title>fastmath.transform documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="highlight/solarized-light.css" />

Generated by Codox with RDash UI theme

Fastmath 1.5.3-SNAPSHOT

Project

Index

Namespaces

fastmath

classification

clustering

complex

core

<div class="inner


───────────┤
		//                          │   │              |
		// ┌──────────────────────┐ │ ┬ ┴              |                ├───────────┼───────────┤
		// │                      │ │ │                |           ├────┤      label width
		// ├─────edge─center──────┤ ┴ ┼stroke width    |        label padding
		// │                      │   │                |       ├─┼─┤
		// └──────────────────────┘   ┴                |    stroke width
		//
		// TODO: get actual edge stroke width on edge
		offsetX := strokeWidth/2 + float64(PADDING) + width/2
		offsetY := strokeWidth/2 + float64(PADDING) + height/2

		return geo.NewPoint(basePoint.X+normalX*offsetX, basePoint.Y+normalY*offsetY)
	}

	var labelCenter *geo.Point
	switch labelPosition {
	case InsideMiddleLeft:
		labelCenter, index = route.GetPointAtDistance(leftPosition)
	case InsideMiddleCenter:
		labelCenter, index = route.GetPointAtDistance(centerPosition)
	case InsideMiddleRight:
		labelCenter, index = route.GetPointAtDistance(rightPosition)

	case OutsideTopLeft:
		basePoint, index := route.GetPointAtDistance(leftPosition)
		labelCenter = getOffsetLabelPosition(basePoint, route[index], route[index+1], true)
	case OutsideTopCenter:
		basePoint, index := route.GetPointAtDistance(centerPosition)
		labelCenter = getOffsetLabelPosition(basePoint, route[index], route[index+1], true)
	case OutsideTopRight:
		basePoint, index := route.GetPointAtDistance(rightPosition)
		labelCenter = getOffsetLabelPosition(basePoint, route[index], route[index+1], true)

	case OutsideBottomLeft:
		basePoint, index := route.GetPointAtDistance(leftPosition)
		labelCenter = getOffsetLabelPosition(basePoint, route[index], route[index+1], false)
	case OutsideBottomCenter:
		basePoint, index := route.GetPointAtDistance(centerPosition)
		labelCenter = getOffsetLabelPosition(basePoint, route[index], route[index+1], false)
	case OutsideBottomRight:
		basePoint, index := route.GetPointAtDistance(rightPosition)
		labelCenter = getOffsetLabelPosition(basePoint, route[index], route[index+1], false)

	case UnlockedTop:
		basePoint, index := route.GetPointAtDistance(unlockedPosition)
		labelCenter = getOffsetLabelPosition(basePoint, route[index], route[index+1], true)
	case UnlockedMiddle:
		labelCenter, index = route.GetPointAtDistance(unlockedPosition)
	case UnlockedBottom:
		basePoint, index := route.GetPointAtDistance(unlockedPosition)
		labelCenter = getOffsetLabelPosition(basePoint, route[index], route[index+1], false)
	default:
		return nil, -1
	}
	// convert from center to top left
	labelCenter.X = chopPrecision(labelCenter.X - width/2)
	labelCenter.Y = chopPrecision(labelCenter.Y - height/2)
	return labelCenter, index
}

// TODO probably use math.Big
func chopPrecision(f float64) float64 {
	// bring down to float32 precision before rounding for consistency across architectures
	result := math.Round(float64(float32(f*10000)) / 10000)
	// Ensure negative zero becomes positive zero
	if result == 0 {
		return 0
	}
	return result
}
package textmeasure

import (
	"bytes"
	"fmt"
	"math"
	"strings"

	"github.com/PuerkitoBio/goquery"
	"github.com/yuin/goldmark"
	"github.com/yuin/goldmark/extension"


  client.withConnection { c ->
                c.callTool(CallToolRequest("kotlin-sdk-tool"))
            }
        } catch (e: Exception) {
            // Expected exception
        }

        serverPort = TestMcpServer.startServer(serverPort)
        delay(3000)

        val result = client.withConnection { c ->
            c.callTool(CallToolRequest("kotlin-sdk-tool"))
        }

        assertNotNull(result, "Tool call after reconnection should succeed")
        assertEquals("Hello, world!", (result.content.first() as TextContent).text)
    }

    @Test
    fun `client should handle server restart and reconnect automatically`() = runBlocking {
        val initialConnected = client.connect()
        assertTrue(initialConnected, "Initial connection should succeed")
        assertEquals(ConnectionState.CONNECTED, client.connectionState.value)

        val initialResult = client.withConnection { c ->
            c.callTool(CallToolRequest("kotlin-sdk-tool"))
        }
        assertNotNull(initialResult, "Initial tool call should succeed")
        assertEquals("Hello, world!", (initialResult.content.first() as TextContent).text)

        TestMcpServer.stopServer()
        delay(1000)

        serverPort = TestMcpServer.startServer(serverPort)
        delay(3000)

        val result = client.withConnection { c ->
            c.callTool(CallToolRequest("kotlin-sdk-tool"))
        }

        assertNotNull(result, "Tool call after reconnection should succeed")
        assertEquals("Hello, world!", (result.content.first() as TextContent).text)
    }

    @Test
    fun `client should automatically reconnect if disconnected`() = runBlocking {
        client.connect()

        TestUtils.setConnectionState(client, ConnectionState.DISCONNECTED)

        assertEquals(ConnectionState.DISCONNECTED, client.connectionState.value)

        val result = client.withConnection { c ->
            c.callTool(CallToolRequest("kotlin-sdk-tool"))
        }

        assertNotNull(result, "Tool call after forced disconnect should succeed")
        assertEquals("Hello, world!", (result.content.first() as TextContent).text)
        assertEquals(ConnectionState.CONNECTED, client.connectionState.value)
    }
}package net.portswigger.mcp.config

import org.junit.jupiter.api.Assertions.assertFalse
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test

class TargetValidationTest {

    private fun isValidTarget(target: String): Boolean {
        return TargetValidation.isValidTarget(target)
    }

    @Test
    fun `isValidTarget should accept valid formats`() {
        // Basic hostnames
        assertTrue(isValidTarget("example.com"))
        assertTrue(isValidTarget("test.org"))
        assertTrue(isValidTarget("sub.domain.co.uk"))
        assertTrue(isValidTarget("localhost"))
        assertTrue(isValidTarget("127.0.0.1"))

        // With ports
        assertTrue(isValidTarget("example.com:80"))
        assertTrue(isValidTarget("example.com:8080"))
        assertTrue(isValidTarget("localhost:3000"))
        assertTrue(isValidTarget("127.0.0.1:9876"))

        // Wildcards
        assertTrue(isValidTarget("*.example.com"))
        assertTrue(isValidTarget("*.api.test.org"))
        assertTrue(isValidTarget("*.co.uk"))

        // IPv6 formats
        assertTrue(isValidTarget("::1"))
        assertTrue(isValidTarget("[::1]:8080"))

        // Edge cases with permissive validation
        assertTrue(isValidTarget("256.0.0.1")) // Invalid IPv4 but allowed
        assertTrue(isValidTarget("


currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg>

Type: Stat

Overrides IInputSelectOptionSetter.Type

Defined in json_out/assets/IInputSelectOption.ts:36

Value<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg>

Value: Stat

Overrides IInputSelectOptionSetter.Value

Defined in json_out/assets/IInputSelectOption.ts:37

Modules

Json.<wbr/>Assets

Json.<wbr/>Common

Json.<wbr/>Cyclopedia
<li


ng": False},
            "text": "Operational",
        },
        "temperature": {"tool1": {"actual": 18.83136, "target": None}},
    }
    job = {
        "job": {},
        "progress": {"completion": 50, "printTime": 600, "printTimeLeft": 6000},
        "state": "Paused",
    }
    freezer.move_to(datetime(2020, 2, 20, 9, 10, 0))
    await init_integration(hass, "sensor", printer=printer, job=job)

    entity_registry = er.async_get(hass)

    state = hass.states.get("sensor.octoprint_start_time")
    assert state is not None
    assert state.state == "unknown"
    assert state.name == "OctoPrint Start Time"
    entry = entity_registry.async_get("sensor.octoprint_start_time")
    assert entry.unique_id == "Start Time-uuid"

    state = hass.states.get("sensor.octoprint_estimated_finish_time")
    assert state is not None
    assert state.state == "unknown"
    assert state.name == "OctoPrint Estimated Finish Time"
    entry = entity_registry.async_get("sensor.octoprint_estimated_finish_time")
    assert entry.unique_id == "Estimated Finish Time-uuid"

async def test_sensors_printer_disconnected(
    hass: HomeAssistant, freezer: FrozenDateTimeFactory
) -> None:
    """Test the underlying sensors."""
    job = {
        "job": {},
        "progress": {"completion": 50, "printTime": 600, "printTimeLeft": 6000},
        "state": "Paused",
    }
    freezer.move_to(datetime(2020, 2, 20, 9, 10, 0))
    await init_integration(hass, "sensor", printer=None, job=job)

    entity_registry = er.async_get(hass)

    state = hass.states.get("sensor.octoprint_job_percentage")
    assert state is not None
    assert state.state == "50"
    assert state.name == "OctoPrint Job Percentage"
    entry = entity_registry.async_get("sensor.octoprint_job_percentage")
    assert entry.unique_id == "Job Percentage-uuid"

    state = hass.states.get("sensor.octoprint_current_state")
    assert state is not None
    assert state.state == "unavailable"
    assert state.name == "OctoPrint Current State"
    entry = entity_registry.async_get("sensor.octoprint_current_state")
    assert entry.unique_id == "Current State-uuid"

    state = hass.states.get("sensor.octoprint_start_time")
    assert state is not None
    assert state.state == "unknown"
    assert state.name == "OctoPrint Start Time"
    entry = entity_registry.async_get("sensor.octoprint_start_time")
    assert entry.unique_id == "Start Time-uuid"

    state = hass.states.get("sensor.octoprint_estimated_finish_time")
    assert state is not None
    assert state.state == "unknown"
    assert state.name == "OctoPrint Estimated Finish Time"
    entry = entity_registry.async_get("sensor.octoprint_estimated_finish_time")
    assert entry.unique_id == "Estimated Finish Time-uuid"


saW5rOmhyZWY9JyNnNzctMTIxJy8+Cjx1c2UgeD0nMjk3LjgyNDY5NicgeT0nNDU4LjI1MzU4JyB4bGluazpocmVmPScjZzc3LTk3Jy8+Cjx1c2UgeD0nMzAyLjY4MjY0NycgeT0nNDU4LjI1MzU4JyB4bGluazpocmVmPScjZzc3LTExNScvPgo8dXNlIHg9JzMxMi4zOTg1NDEnIHk9JzQ1OC4yNTM1OCcgeGxpbms6aHJlZj0nI2c3Ny0xMDQnLz4KPHVzZSB4PSczMTcuMjU2NDkzJyB5PSc0NTguMjUzNTgnIHhsaW5rOmhyZWY9JyNnNzctMTAxJy8+Cjx1c2UgeD0nMjAuOTIxNTU5JyB5PSc0NzEuNDA0MjE2JyB4bGluazpocmVmPScjZzc3LTEwOCcvPgo8dXNlIHg9JzI1Ljc3OTUxMScgeT0nNDcxLjQwNDIxNicgeGxpbms6aHJlZj0nI2c3Ny0xMTEnLz4KPHVzZSB4PSczMC42Mzc0NjInIHk9JzQ3MS40MDQyMTYnIHhsaW5rOmhyZWY9JyNnNzctMTExJy8+Cjx1c2UgeD0nMzUuNDk1NDE0JyB5PSc0NzEuNDA0MjE2JyB4bGluazpocmVmPScjZzc3LTEwNycvPgo8dXNlIHg9JzQwLjM1MzM2NicgeT0nNDcxLjQwNDIxNicgeGxpbms6aHJlZj0nI2c3Ny0xMDEnLz4KPHVzZSB4PSc0NS4yMTEzMTcnIHk9JzQ3MS40MDQyMTYnIHhsaW5rOmhyZWY9JyNnNzctMTAwJy8+Cjx1c2UgeD0nNTAuMDY5MjY5JyB5PSc0NzEuNDA0MjE2JyB4bGluazpocmVmPScjZzc3LTQ2Jy8+CjwvZz4KPC9zdmc+" alt="image">

There are newline characters at the end of each line, save for the
last. You can cut and paste or type this into a text file to try these
examples out. Here, it is saved as gregor.txt.

We will just count lines first. To this, we will write a function
channel_statistics to gather the statistics by reading an
input channel and printing them. Then we will have a function to open a
named file, call our first function, and close it again.

<img role="img" aria-label="image" src="data:image/svg+xml;base64,PD94bWwgdmVyc2l


行处理
  close(chain.doneReprocessingMsgInFlight)
}
```

1.3 主动更新本通道的最近重新提交排序的配置交易消息初始偏移量lastResubmitted

存在其他`Orderer`节点重新提交了配置消息，但是本地`Orderer`节点没有重新提交该消息。因此这里需要更新本通道的最近重新提交排序的配置交易消息初始偏移量lastResubmitted。

```go
if chain.lastResubmittedConfigOffset < regularMessage.OriginalOffset {
				chain.lastResubmittedConfigOffset = regularMessage.OriginalOffset
			}
```

②：regularMessage.OriginalOffset为 0

说明是第一次提交通道配置交易消息，而不是重新验证和重新排序的。

2.1 如果消息中的配置序号regularMessage.ConfigSeq小于当前通道的最新配置序号seq

则说明已经更新了通道配置（配置序号较高），然后再处理当前配置交易消息（配置序号较低）。将会调用`ProcessConfigMsg`重新过滤和处理该消息。

接着通过`configure`重新提交该配置消息进行排序，重置消息初始偏移量。然后再更新最近重新提交消息的偏移量。

```go
if regularMessage.ConfigSeq < seq {
  ...
	configEnv, configSeq, err := chain.ProcessConfigMsg(env)
  if err := chain.configure(configEnv, configSeq, receivedOffset); err != nil {...}

  // 阻塞接收消息处理，更新最近重新提交消息的偏移量
  chain.lastResubmittedConfigOffset = receivedOffset
  //创建通道阻塞Broadcast服务接收处理消息
  chain.doneReprocessingMsgInFlight = make(chan struct{})
}
```

③：提交配置交易消息执行通道管理操作

经过上面的①和②过滤掉不符合条件的情况，接下来就提交配置交易消息执行通道管理操作，核心函数：`commitConfigMsg(env, offset)`

3.1 将当前缓存交易消息切割成批量交易集合

```go
batch := chain.BlockCutter().Cut()
```

3.2 创建新区块block

```go
block := chain.CreateNextBlock(batch)
```

3.3 构造Kafka元数据

```go
metadata := utils.MarshalOrPanic(&ab.KafkaMetadata{ //构造Kafka元数据
				LastOffsetPersisted:         receivedOffset - 1, // 偏移量减1
				LastOriginalOffsetProcessed: chain.lastOriginalOffsetProcessed,
				LastResubmittedConfigOffset: chain.lastResubmittedConfigOffset,
			})
```

3.4 写入区块

通过区块写组件提交新区块到账本，更新当前通道的最新区块号chain.lastCutBlockNumber增1

```go
chain.WriteBlock(block, metadata)
chain.lastCutBlockNumber++
```

接着更新本链的lastOriginal- OffsetProcessed为newOffset参数，然后做和上面差不多的事情：

```go
chain.lastOriginalOffsetProcessed = newOffset
		block := chain.CreateNextBlock([]*cb.Envelope{message}) // 构造新区块
		metadata := utils.MarshalOrPanic(&ab.KafkaMetadata{     /


(o,r,1Q,Y,1J){P(B s=o.1b;s;s=s.2e)7(s.24==1){B 1M=U;7(1Q==".")1M=s.19&&1J.1n(s.19);J 7(1Q=="#")1M=s.36("2J")==Y;7(1M)r.1g(s);7(1Q=="#"&&r.I)3O;7(s.1b)6.4x(s,r,1Q,Y,1J)}v r},4z:u(D){B 4A=[];B Q=D.11;22(Q&&Q!=17){4A.1g(Q);Q=Q.11}v 4A},2a:u(Q,1i,3Z,D){1i=1i||1;B 1T=0;P(;Q;Q=Q[3Z]){7(Q.24==1)1T++;7(1T==1i||1i=="5R"&&1T%2==0&&1T>1&&Q==D||1i=="5S"&&1T%2==1&&Q==D)v Q}},2B:u(n,D){B r=[];P(;n;n=n.2e){7(n.24==1&&(!D||n!=D))r.1g(n)}v r}});6.G={1M:u(S,C,1o,F){7(6.W.1j&&S.3L!=T)S=1w;7(F)1o.F=F;7(!1o.2A)1o.2A=q.2A++;7(!S.$1H)S.$1H={};B 38=S.$1H[C];7(!38){38=S.$1H[C]={};7(S["39"+C])38[0]=S["39"+C]}38[1o.2A]=1o;S["39"+C]=q.5Y;7(!q.1k[C])q.1k[C]=[];q.1k[C].1g(S)},2A:1,1k:{},2f:u(S,C,1o){7(S.$1H){B i,j,k;7(C&&C.C){1o=C.1o;C=C.C}7(C&&S.$1H[C])7(1o)5U S.$1H[C][1o.2A];J P(i 1x S.$1H[C])5U S.$1H[C][i];J P(j 1x S.$1H)q.2f(S,j);P(k 1x S.$1H[C])7(k){k=U;3O}7(!k)S["39"+C]=16}},1S:u(C,F,S){F=6.3M(F||[]);7(!S)6.K(q.1k[C]||[],u(){6.G.1S(C,F,q)});J{B 1o=S["39"+C],1a,E=6.1t(S[C]);7(1o){F.61(q.2j({C:C,1O:S}));7((1a=1o.14(S,F))!==12)q.4F=U}7(E&&1a!==12)S[C]();q.4F=12}},5Y:u(G){7(1C 6=="T"||6.G.4F)v;G=6.G.2j(G||1w.G||{});B 3R;B c=q.$1H[G.C];B 1E=[].3N.3n(1A,1);1E.61(G);P(B j 1x c){1E[0].1o=c[j];1E[0].F=c[j].F;7(c[j].14(q,1E)===12){G.2n();G.2H();3R=12}}7(6.W.1j)G.1O=G.2n=G


f len(args) == 4 {
				fileType = base.FileTypeFromName(args[3])
			}

			vals := toUInt64(args[:min(3, len(args))]...)
			return remoteobjcat.RemoteObjectMetadata{
				FileNum:        base.DiskFileNum(vals[0]),
				FileType:       fileType,
				CreatorID:      objstorage.CreatorID(vals[1]),
				CreatorFileNum: base.DiskFileNum(vals[2]),
			}
		}

		parseDel := func(args []string) base.DiskFileNum {
			t.Helper()
			if len(args) != 1 {
				td.Fatalf(t, "delete <file-num>")
			}
			return base.DiskFileNum(toUInt64(args[0])[0])
		}

		memLog.Reset()
		switch td.Cmd {
		case "open":
			if len(td.CmdArgs) != 1 {
				td.Fatalf(t, "open <dir>")
			}
			dirname := td.CmdArgs[0].String()
			err := mem.MkdirAll(dirname, 0755)
			if err != nil {
				td.Fatalf(t, "%v", err)
			}
			var contents remoteobjcat.CatalogContents
			cat, contents, err = remoteobjcat.Open(vfs.WithLogging(mem, memLog.Infof), dirname)
			if err != nil {
				return err.Error()
			}
			var buf strings.Builder
			if contents.CreatorID.IsSet() {
				fmt.Fprintf(&buf, "creator-id: %s\n", contents.CreatorID)
			}
			for _, meta := range contents.Objects {
				fmt.Fprintf(&buf, "%s: %d/%s\n", meta.FileNum, meta.CreatorID, meta.CreatorFileNum)
			}

			return buf.String()

		case "set-creator-id":
			if len(td.CmdArgs) != 1 {
				td.Fatalf(t, "set-creator-id <id>")
			}
			id := objstorage.CreatorID(toUInt64(td.CmdArgs[0].String())[0])
			if err := base.CatchErrorPanic(func() error {
				return cat.SetCreatorID(id)
			}); err != nil {
				return fmt.Sprintf("error setting creator ID: %v", err)
			}
			return memLog.String()

		case "batch":
			var b remoteobjcat.Batch
			for _, cmd := range strings.Split(td.Input, "\n") {
				tokens := strings.Split(cmd, " ")
				if len(tokens) == 0 {
					td.Fatalf(t, "empty batch line")
				}
				switch tokens[0] {
				case "add":
					b.AddObject(parseAdd(tokens[1:]))
				case "delete":
					b.DeleteObject(parseDel(tokens[1:]))
				default:
					td.Fatalf(t, "unknown batch command: %s", tokens[0])
				}
			}
			if err := base.CatchErrorPanic(func() error {
				return cat.ApplyBatch(b)
			}); err != nil {
				return fmt.Sprintf("error applying batch: %v", err)
			}
			b.Reset()
			return memLog.String()

		case "random-batches":
			n := 1
			size := 1000
			for _, arg := range td.CmdArgs {
				if len(arg.Vals) != 1 {
					td.Fatalf(t, "random-batches n=<val> size=<val>")
				}
				val := toUInt64(arg.Vals[0])[0]
				switch arg.Key {
				case "n":
					n = int(val)
				case "size":
					size = int(val)
				default:
					td.Fatalf(t, "random-batches n=<val> size=<val>")
				}
			}
			var b remoteobjcat.Batch
			for batchIdx := 0; batchIdx < n; batchIdx++ {
				for i := 0; i < size; i++ {

					b.AddObject(remoteobjcat.RemoteObjectMetadata{
						FileNum:        base.DiskFileNum(rand.Uint64()),
						FileType:       supportedFileTypes[rand.


this.mode3d = window.lab.mode3d;
        this.nogrid = window.lab.nogrid;
        if(this.nogrid == 0){
            if(window.lab.darkmode == 1 && window.lab.mode3d == 1) backgroundcss += 'dark3d';
            if(window.lab.darkmode == 1 && window.lab.mode3d == 0) backgroundcss += 'dark2d';
            if(window.lab.darkmode == 0 && window.lab.mode3d == 1) backgroundcss += 'light3d';
            if(window.lab.darkmode == 0 && window.lab.mode3d == 0) backgroundcss += 'light2d';
        }else{
            if(window.lab.darkmode == 1 ) backgroundcss += 'dark';
            if(window.lab.darkmode == 0 ) backgroundcss += 'light';
        }

        this.labviewport.removeClass();
        this.labviewport.addClass(backgroundcss);
    }

    render(){return <>
        {this.state.hideLabel
            ?
            :''
        }
    </>}

    componentDidMount(){
        global.setDarkMode = (e)=>{
            this.darkmode = e.target.checked? 1 : 0;
            this.updateBackground();
        }
        global.set3dMode = (e)=>{
            this.mode3d = e.target.checked ? 1: 0;
            this.updateBackground();
        }
        global.setNoGrid = (e)=>{
            this.nogrid = e.target.checked ? 1: 0;
            this.updateBackground();
        }
        global.editInterfaceLabel = (e)=>{
            window.hideLabel = e.target.checked;
            this.setState({hideLabel: e.target.checked});
        }

        App.onReadyRegister.push(()=>this.applyLabBackground());
    }

}
export default LabBackground
import React, { Component } from 'react'
import Loading from '../../common/Loading';
import Status from '../../admin/status/StatusLabView';

class StatusModal extends Component {

    constructor(props) {
        super(props);
        this.id = makeId();

        this.state = {
            link: null,
            node: null,
            port: null,
            newtab: false,
        }

    }

    modal(cmd = 'show') {
        if (cmd == 'hide') {
            $("#" + this.id).modal('hide');
            this.status.stopUpdateInfo();

        } else {
            $("#" + this.id).modal();
            this.status.initialInfo();
            this.status.startUpdateInfo();
        }
    }

    componentDidMount(){
        var modalView = $(`#${this.id}`);
        modalView.on('hidden.bs.modal', (e)=>{
            this.status.stopUpdateInfo();
            e.preventDefault();
            e.stopPropagation();
        })

        $(document).on('click', '.action-systemstatus', ()=>{
            this.modal();
        })

    }

    render() {

        return

                             {lang("System status")}

                         { this.modal('hide') }} aria-hidden="true">×
                        <i title={lang("


hift(tempManually);
    // 如果下一个队列的首个拦截器是手动拦截器
    // 则说明上一个队列的所有元素被写入到了
    // 这个手动拦截器的 queue 参数中
    // 故此处直接返回下一个队列
    return nextQueue;
  }

  return prevQueueCopy.concat(nextQueue);
}
import Volume from "./Volume"

describe("Volume", () => {
  describe("toGain", () => {
    it("should return a gain of 1 when input is 0", () => {
      expect(Volume.toGain(0.0)).toBeCloseTo(1.0, 2)
    })

    it("should return a gain of 0.5 when input is -6", () => {
      expect(Volume.toGain(-6.0)).toBeCloseTo(0.5, 2)
    })

    it("should return a gain of 0.25 when input is -12", () => {
      expect(Volume.toGain(-12.0)).toBeCloseTo(0.25, 2)
    })

    it("should return a gain of 0.125 when input is -18", () => {
      expect(Volume.toGain(-18.0)).toBeCloseTo(0.125, 2)
    })

    it("should return a gain of 0.0 when input is -70+", () => {
      expect(Volume.toGain(-70.0)).toEqual(0)
      expect(Volume.toGain(-100.0)).toEqual(0)
    })
  })

  describe("toDB", () => {
    it("should return ~0 when the input gain is 1", () => {
      expect(Volume.toDB(1.0)).toBeCloseTo(0, 1)
    })

    it("should return ~-6 when th e input gain is 0.5", () => {
      expect(Volume.toDB(0.5)).toBeCloseTo(-6, 1)
    })

    it("should return ~-12 when th e input gain is 0.25", () => {
      expect(Volume.toDB(0.25)).toBeCloseTo(-12, 1)
    })

    it("should return ~-18 when th e input gain is 0.125", () => {
      expect(Volume.toDB(0.125)).toBeCloseTo(-18, 0)
    })

    it("should return -100 when the input gain is 0", () => {
      expect(Volume.toDB(0)).toBe(-100)
    })
  })

  describe("toDBString", () => {
    it("should return 0dB when the input gain is 1", () => {
      expect(Volume.toDB(1.0)).toBeCloseTo(0, 1)
    })

    it("should return ~-6dB when th e input gain is 0.5", () => {
      expect(Volume.toDB(0.5)).toBeCloseTo(-6, 1)
    })

    it("should return -12dB when th e input gain is 0.25", () => {
      expect(Volume.toDB(0.25)).toBeCloseTo(-12, 1)
    })

    it("should return -18dB when th e input gain is 0.125", () => {
      expect(Volume.toDB(0.125)).toBeCloseTo(-18, 0)
    })

    it("should return -∞ when the input gain is 0", () => {
      expect(Volume.toDB(0)).toBe(-100)
    })
  })
})
import { IfIocContainer, Maybe, isDefined, getMethodParamName, ClassPrototype } from 'bind-di';
import {
  IParamDecorator,
  AsyncValidator,
  AsyncParamValidator,
  AsyncContextParamValidator,
  ParamValidator,
} from '../../types';
import { IBindRestContext, IControllerParamMeta } from '../../interfaces';
import { SYM_


2).promise;

  expect(dispatch.mock.calls[3][0]).toStrictEqual({
    type: ActionTypes.COMPLETED_COMPARISON_LIST_LOAD,
    payload: {
      endReason: "Tried 2017, 2016"
    },
    meta: {
      stationId: testStationId,
      dataId: TemperatureDataIds.TODAY_IN_PRIOR_YEARS
    }
  });
});

function makeNocks2() {
  nock(DEFAULTS.NOAA_API_HOSTNAME)
    .get(DEFAULTS.TEMPERATURE_DATA_PATH + testStationId + "&begin_date=20190305&range=24")
    .reply(200, { data: [{ t: "2019-03-05 15:30", v: "33.6" }] });

  nock(DEFAULTS.NOAA_API_HOSTNAME)
    .get(DEFAULTS.TEMPERATURE_DATA_PATH + testStationId + "&begin_date=20180305&range=24")
    .reply(200, {
      error: { message: "No data was found. This product may not be offered at this station at the requested time." }
    });

  nock(DEFAULTS.NOAA_API_HOSTNAME)
    .get(DEFAULTS.TEMPERATURE_DATA_PATH + testStationId + "&begin_date=20170305&range=24")
    .reply(200, { data: [{ t: "2017-03-05 15:30", v: "33.6" }] });

  nock(DEFAULTS.NOAA_API_HOSTNAME)
    .get(DEFAULTS.TEMPERATURE_DATA_PATH + testStationId + "&begin_date=20160305&range=24")
    .reply(200, {
      error: { message: "No data was found. This product may not be offered at this station at the requested time." }
    });

  nock(DEFAULTS.NOAA_API_HOSTNAME)
    .get(DEFAULTS.TEMPERATURE_DATA_PATH + testStationId + "&begin_date=20150305&range=24")
    .reply(200, {
      error: { message: "No data was found. This product may not be offered at this station at the requested time." }
    });
}

it("handles gaps", async () => {
  const dispatch = jest.fn();
  makeNocks2();

  await loadTodayInPriorYears(dispatch, testStationId, latestStationTime, 2).promise;

  expect(dispatch.mock.calls[2][0]).toStrictEqual({
    type: ActionTypes.PARTIAL_COMPARISON_LIST_LOAD,
    payload: {
      data: {
        regarding: "2018"
      }
    },
    meta: {
      stationId: testStationId,
      dataId: TemperatureDataIds.TODAY_IN_PRIOR_YEARS
    }
  } as PartialComparisonListLoadAction);

  expect(dispatch.mock.calls[4][0]).toStrictEqual({
    type: ActionTypes.COMPLETED_COMPARISON_LIST_LOAD,
    payload: {
      endReason: "Tried 2016, 2015"
    },
    meta: {
      stationId: testStationId,
      dataId: TemperatureDataIds.TODAY_IN_PRIOR_YEARS
    }
  });
});
import * as ivanchuk from "ivanchuk/dist/chess";
import * as chess from "./chess";

export class Game implements chess.Game {
  private game: ivanchuk.Game;

  constructor() {
    this.game = ivanchuk.Game.startingPosition();
  }

  isCheck(): boolean | chess.Colour {
    return false;
  }

  turn(): chess.Colour {
    return this.game.getNextToMove() === ivanchuk.Piece.Colour.WHITE ? "white" : "black";
  }

  dests(): Map<chess.Square, chess.Square[]> {
    const dests = new Map();
    this.game.allValidDestinations().forEach((ds, s) => {
      dests.set(s.toString().to


/*
 *    Copyright (C) 2016-2025 Grok Image Compression Inc.
 *
 *    This source code is free software: you can redistribute it and/or  modify
 *    it under the terms of the GNU Affero General Public License, version 3,
 *    as published by the Free Software Foundation.
 *
 *    This source code is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#pragma once
#include <vector>

namespace grk
{

/**
 * @struct PacketProgressionState
 *
 * @brief Stores the maximum number of layers read corresponding to
 * packet data that has been read, for each resolution
 */
struct PacketProgressionState
{
  /**
   * @brief Constructs a PacketProgressionState
   */
  PacketProgressionState() : PacketProgressionState(0) {}
  /**
   * @brief Constructs a PacketProgressionState
   * @param totalResolutions total number of resolutions in code stream
   */
  explicit PacketProgressionState(uint8_t totalResolutions)
      : totalResolutions_(totalResolutions), resLayers_(totalResolutions, 0)
  {}

  /**
   * @brief Calculates maximum number of resolutions read, by packet
   * @return maximum number of resolutions
   */
  uint8_t numResolutionsRead(void) const
  {
    // Start by assuming no non-zero element is found
    int maxIndex = -1;

    // Iterate over the vector to find the last non-zero element's index
    for(uint8_t i = 0; i < resLayers_.size(); ++i)
    {
      if(resLayers_[i] != 0U)
        maxIndex = i; // Update maxIndex with the current non-zero element's index
    }

    // If no non-zero element was found, return 0. Otherwise, return maxIndex + 1
    return (maxIndex != -1) ? static_cast<uint8_t>(maxIndex + 1) : 0;
  }

  /**
   * @brief total number of resolutions in code stream
   */
  uint8_t totalResolutions_;
  /**
   * @brief maximum layers read, by packet, for each resolution.
   */
  std::vector<uint16_t> resLayers_;
};

} // namespace grk


Panel graph, layout ls ) {
        this.graph = graph;
        layout = ls;
    }

    /**
    ** add a node via label text.
    **
    ** @param      lbl             the label
    ** @return     the index of the node in array nodes[]
    **
    **/

    public int addNode(String lbl) {
        Node n = new Node();
        if (nodesN > 0) {
            n.x = nodes[nodesN-1].x + 30;
            n.y = nodes[nodesN-1].y + 30;
        }
        n.lbl = lbl;

        nodes[nodesN] = n;
        return nodesN++;
    }

    /**
    ** add a node via label text.
    **
    ** @param      lbl             the label
    ** @return     the index of the node in array nodes[]
    **
    **/

    public void addNodes(String lb1, String lb2, String lb3) {
        addNode(lb1);
        addNode(lb2);
        addNode(lb3);
    }

    /**
    ** layout the nodes on the panel. the layout is used
    **
    **
    **/
    public synchronized void formatNodes( ) {

        // format nodes
        FontMetrics fm = getFontMetrics(getFont());
        Dimension d = getSize();

        Node[] ns = new Node[ nodesN ];
        System.arraycopy(nodes, 0, ns, 0, nodesN);
        layout.formatNodes( ns, d, fm );

    }

}
/*
 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 * @key stress gc
 *
 * @summary converted from VM Testbase gc/gctests/StringInternSync2.
 * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
 * VM Testbase readme:
 * The test verifies that String.intern is correctly synchronized.
 * Test interns same strings in different threads and verifies that all interned equal
 * strings are same objects.
 * This test interns a lot of small strings.
 *
 * @library /vmTestbase
 *          /test/lib
 * @run driver jdk.test.lib.FileInstaller . .
 * @run main/othervm gc.gctests.StringInternSync.StringInternSync -ms high
 */

/*
 * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You


"#0000FF">说明：

线条连接处样式，可以是以下值：

值	含义

LINEJOIN_MITER	尖角（默认）

LINEJOIN_BEVEL	斜角

LINEJOIN_ROUND	圆角

声明：

line_join_type getlinejoin(
    PIMAGE pimg = NULL
);

void getlinejoin(
    line_join_type* linejoin,    // 线条连接处样式
    float*          miterLimit,  // 尖角长度上限
    PIMAGE          pimg = NULL
);

参数：

linejoin
line_join_type 型变量地址，用于返回所设置的线条连接处样式。

miterLimit
float 型变量地址，用于返回设置的尖角长度上限。

pimg
目标图像，默认为 NULL (窗口)

返回值：
所设置的线条连接处样式

示例：

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>ege_fillclosedcurve</title>
    <link rel="stylesheet" type="text/css" href="../../css/index-table.css"/>

主页 / 库函数目录 / 图形绘制 / ege_fillclosedcurve

功能：

绘制填充的闭合基数样条曲线。填充颜色由 setfillcolor() 指定

声明：

void ege_fillclosedcurve(
    int numpoints,
    ege_point* polypoints,
    PIMAGE pimg = NULL
);
<font color=#0000FF


][mid % col] == target) {
                return true;
            }
            if (matrix[mid / col][mid % col] > target) {
                end = mid - 1;
            } else {
                start = mid + 1;
            }
        }
        return false;

    }
}
package leetcode.erfen;

/**
 * 假设按照升序排序的数组在预先未知的某个点上进行了旋转。

 ( 例如，数组 [0,1,2,4,5,6,7] 可能变为 [4,5,6,7,0,1,2] )。

 请找出其中最小的元素。

 注意数组中可能存在重复的元素。

 示例 1：

 输入: [1,3,5]
 输出: 1

 示例 2：

 输入: [2,2,2,0,1]
 输出: 0

 说明：

 这道题是 寻找旋转排序数组中的最小值 的延伸题目。
 允许重复会影响算法的时间复杂度吗？会如何影响，为什么？

 来源：力扣（LeetCode）
 链接：https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-ii
 著作权归领扣网络所有。商业转载请联系官方授权，非商业转载请注明出处。
 */
public class N154findMin {

    public static void main(String[] args) {
        int[] nums = {2,2,2,0,1,2};
        System.out.println(new N154findMin().findMin1(nums));
    }
    public int findMin1(int[] nums) {

        if(nums.length == 1){
            return nums[0];
        }

        return process(nums,0,nums.length-1);
    }

    private int process(int[] nums, int start, int end){
        int mid = 0;
        while (start < end){
            mid = start + (end -start) /2;
            if(nums[mid] == nums[end]){
                end--;
                continue;

            }
            //前半部分有序，一定在后半部分
            if(nums[mid] > nums[end]){
                start = mid + 1;
            }else {
                end = mid;
            }
        }
        return nums[start];
    }

}
package leetcode.erfen;

/**
 * 假设按照升序排序的数组在预先未知的某个点上进行了旋转。
 *

 * ( 例如，数组 [0,0,1,2,2,5,6] 可能变为 [2,5,6,0,0,1,2] )。
 *

 * 编写一个函数来判断给定的目标值是否存在于数组中。若存在返回 true，否则返回 false。
 *

 * 示例 1:
 *

 * 输入: nums = [2,5,6,0,0,1,2], target = 0
 * 输出: true
 *

 * 示例 2:
 *

 * 输入: nums = [2,5,6,0,0,1,2], target = 3
 * 输出: false
 *

 * 进阶:
 *

 * 这是 搜索旋转排序数组 的延伸题目，本题中的 nums  可能包含重复元素。
 * 这会影响到程序的时间复杂度吗？会有


 goes here
  }

  internal void InternalMethod()
  {
    // Code for the internal method goes here
  }

  public int PublicProperty { get; set; }

  private string PrivateProperty { get; set; }

  public static bool StaticProperty { get; set; }

  internal double InternalProperty { get; set; }
}


spec.isBidRequestValid(invalidBid)).to.equal(false);
    });
  });

  describe('buildRequests', function () {
    const bidRequests = [
      {
        bidder: 'audiencerun',
        bidId: '51ef8751f9aead',
        params: {
          zoneId: '12345abcde',
        },
        adUnitCode: 'div-gpt-ad-1460505748561-0',
        transactionId: 'd7b773de-ceaa-484d-89ca-d9f51b8d61ec',
        mediaTypes: {
          banner: {
            sizes: [
              [320, 50],
              [300, 250],
              [300, 600],
            ],
          },
        },
        bidderRequestId: '418b37f85e772c',
        auctionId: '18fd8b8b0bd757',
        bidRequestsCount: 1,
      },
    ];
    const bidRequest = bidRequests[0];

    it('sends a valid bid request to ENDPOINT via POST', function () {
      const request = spec.buildRequests(bidRequests, {
        gdprConsent: {
          consentString:
            'BOZcQl_ObPFjWAeABAESCD-AAAAjx7_______9______9uz_Ov_v_f__33e8__9v_l_7_-___u_-33d4-_1vf99yfm1-7ftr3tp_87ues2_Xur__59__3z3_NohBgA',
          gdprApplies: true,
        },
        refererInfo: {
          canonicalUrl: undefined,
          page: 'https://example.com',
          topmostLocation: 'https://example.com',
          numIframes: 0,
          reachedTop: true,
        },
      });

      expect(request.url).to.equal(ENDPOINT);
      expect(request.method).to.equal('POST');

      const payload = JSON.parse(request.data);
      expect(payload.gdpr).to.exist;

      expect(payload.bids)
        .to.exist.and.to.be.an('array')
        .and.to.have.lengthOf(1);
      expect(payload.referer).to.exist;

      const bid = payload.bids[0];
      expect(bid).to.exist;
      expect(bid).to.have.property('bidId');
      expect(bid).to.have.property('zoneId');
      expect(bid).to.have.property('sizes');
      expect(bid.sizes[0].w).to.be.a('number');
      expect(bid.sizes[0].h).to.be.a('number');
    });

    it('should send GDPR to endpoint and honor gdprApplies value', function () {
      const consentString = 'bogusConsent';
      const bidderRequest = {
        gdprConsent: {
          consentString: consentString,
          gdprApplies: true,
        },
      };

      const request = spec.buildRequests(bidRequests, bidderRequest);
      const payload = JSON.parse(request.data);
      expect(payload.gdpr).to.exist;
      expect(payload.gdpr.consent).to.equal(consentString);
      expect(payload.gdpr.applies).to.equal(true);

      const bidderRequest2 = {
        gdprConsent: {
          consentString: consentString,
          gdprApplies: false,
        },
      };

      const request2 = spec.buildRequests(bidRequests, bidderRequest2);
      const payload2 = JSON.parse(request2.data);

      expect(payload2.gdpr).to.exist;
      expect(payload2.gdpr.consent).to.equal(consentString);
      expect(payload2.gdpr.applies).to.equal(false);
    });

    it('should use the auctionUrl passed from bid params', function () {


ne;
}

.products-grid--max-6-col > li:nth-child(3n+1) {
  clear: none;
}

.products-grid--max-6-col > li:nth-child(even),
.products-grid--max-6-col > li:nth-child(3n) {
  margin-right: 2.22222%;
}

/* Set column config */
.products-grid--max-6-col > li {
  margin-right: 2.22222%;
}

.products-grid--max-6-col > li {
  width: 14.81481%;
  margin-right: 2.22222%;
}

.products-grid--max-6-col > li:nth-child(6n+1) {
  clear: left;
}

.products-grid--max-6-col > li:nth-child(6n) {
  margin-right: 0;
}

/* ============================================ *
 * Product List
 * ============================================ */
.products-list {
  margin-top: 20px;
  margin-bottom: 20px;
}
.products-list > li {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #ededed;
}
.products-list > li:after {
  content: '';
  display: table;
  clear: both;
}
.products-list > li .product-image {
  float: left;
  width: 33.33333%;
}
.products-list > li .product-image img {
  width: 100%;
  max-width: 100%;
}
.products-list > li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.products-list .product-shop {
  float: right;
  width: 66.66667%;
  padding-left: 20px;
}
.products-list .product-shop .product-name {
  margin-bottom: 0;
}
.products-list .product-shop .ratings {
  margin: 0;
}
.products-list .product-shop .ratings .rating-box,
.products-list .product-shop .ratings .rating-links {
  float: left;
  margin-right: 7px;
}
.products-list .product-shop .ratings .rating-links {
  margin-top: 4px;
}
.products-list .product-shop .price-box {
  margin-top: 0;
}
.products-list .product-shop .price-box .price {
  font-size: 18px;
}
.products-list .product-shop .action {
  margin: 7px 0;
}
.products-list .product-shop .desc {
  margin-top: 7px;
}
.products-list .product-shop .product-primary,
.products-list .product-shop .desc {
  float: left;
  width: 65%;
  overflow: hidden;
}
.products-list .product-shop .product-secondary {
  float: right;
  width: 35%;
  text-align: right;
  clear: right;
}

.products-list .product-name a {
  font-size: 18px;
}

.products-list .product-shop .product-primary,
.products-list .product-shop .desc {
  float: left;
  width: 60%;
  padding-right: 20px;
}
.products-list .product-shop .product-secondary {
  float: right;
  width: 40%;
}

/* ============================================ *
 * Mini Product List
 * ============================================ */
.mini-products-list .product-image {
  float: left;
  min-width: 50px;
}
.mini-products-list .product-details {
  margin-left: 60px;


eaeae,inset -1px 0 0 0 #ababab;
  -moz-box-shadow: inset 0 1px 0 0 #bbb,inset 0 -1px 0 0 #747474,inset 1px 0 0 0 #aeaeae,inset -1px 0 0 0 #ababab;
  box-shadow: inset 0 1px 0 0 #bbb,inset 0 -1px 0 0 #747474,inset 1px 0 0 0 #aeaeae,inset -1px 0 0 0 #ababab;
}
.dx-switch-on, .dx-switch-off
{
  color: #fff;
  text-align: center;
  font-size: .8em;
  line-height: 19px;
}
.dx-switch-on
{
  display: none;
  background: #28a2cb;
  -webkit-box-shadow: inset 0 1px 0 0 #82c3d9,inset 0 -1px 0 0 #1a6883,inset 1px 0 0 0 #399fc2,inset -1px 0 0 0 #279ac1;
  -moz-box-shadow: inset 0 1px 0 0 #82c3d9,inset 0 -1px 0 0 #1a6883,inset 1px 0 0 0 #399fc2,inset -1px 0 0 0 #279ac1;
  box-shadow: inset 0 1px 0 0 #82c3d9,inset 0 -1px 0 0 #1a6883,inset 1px 0 0 0 #399fc2,inset -1px 0 0 0 #279ac1;
}
.dx-switch-off
{
  background: #b5b5b5;
  -webkit-box-shadow: inset 0 1px 0 0 #bbb,inset 0 -1px 0 0 #747474,inset 1px 0 0 0 #aeaeae,inset -1px 0 0 0 #ababab;
  -moz-box-shadow: inset 0 1px 0 0 #bbb,inset 0 -1px 0 0 #747474,inset 1px 0 0 0 #aeaeae,inset -1px 0 0 0 #ababab;
  box-shadow: inset 0 1px 0 0 #bbb,inset 0 -1px 0 0 #747474,inset 1px 0 0 0 #aeaeae,inset -1px 0 0 0 #ababab;
}
.dx-state-disabled.dx-switch .dx-switch-on, .dx-state-disabled .dx-switch .dx-switch-on, .dx-state-disabled.dx-switch .dx-switch-off, .dx-state-disabled .dx-switch .dx-switch-off
{
  background: #353535;
  color: #b2b2b2;
  -webkit-box-shadow: inset 0 0 0 1px #353535;
  -moz-box-shadow: inset 0 0 0 1px #353535;
  box-shadow: inset 0 0 0 1px #353535;
}
.dx-state-disabled.dx-switch .dx-switch-on-value .dx-switch-on, .dx-state-disabled .dx-switch .dx-switch-on-value .dx-switch-on
{
  color: #b2b2b2;
}
.dx-state-active .dx-switch-on, .dx-state-active .dx-switch-off
{
  background: #9c9c9c;
  -webkit-box-shadow: inset 0 1px 0 0 #bbb,inset 0 -1px 0 0 #747474,inset 1px 0 0 0 #aeaeae,inset -1px 0 0 0 #ababab;


		},
		{
			"name":         "allowed_http_versions",
			"valueEncoded": strings.Join(data.WafAllowedHttpVersions, " "),
		},
	}

	// AllowedRequestContentTypes
	{
		allowedRequestContentTypeStr := ""
		for _, item := range data.WafAllowedRequestContentTypes {
			allowedRequestContentTypeStr += fmt.Sprintf("|%s| ", item)
		}

		// removes trailing space
		allowedRequestContentTypeStr = allowedRequestContentTypeStr[0 : len(allowedRequestContentTypeStr)-1]

		result = append(result, map[string]string{
			"name":         "allowed_request_content_type",
			"valueEncoded": allowedRequestContentTypeStr,
		})
	}

	return result, nil
}
// Copyright (c) BunnyWay d.o.o.
// SPDX-License-Identifier: MPL-2.0

package provider

import (
	"fmt"
	"github.com/hashicorp/terraform-plugin-testing/terraform"
	"testing"

	"github.com/hashicorp/terraform-plugin-testing/helper/resource"
)

const configStorageZoneTest = `
resource "bunnynet_storage_zone" "test" {
  name = "test-acceptance-%s"
  region = "DE"
  zone_tier = "Standard"
}
`

func TestAccStorageZoneResource(t *testing.T) {
	resourceName := "bunnynet_storage_zone.test"
	testKey := generateRandomString(12)
	config := fmt.Sprintf(configStorageZoneTest, testKey)

	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t) },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			{
				Config: config,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttr(resourceName, "name", fmt.Sprintf("test-acceptance-%s", testKey)),
					resource.TestCheckResourceAttr(resourceName, "region", "DE"),
				),
			},
			{
				ResourceName:      resourceName,
				ImportState:       true,
				ImportStateIdFunc: testAccStorageZoneImportStateIdFunc(resourceName),
				ImportStateVerify: true,
			},
		},
	})
}

func testAccStorageZoneImportStateIdFunc(resourceName string) resource.ImportStateIdFunc {
	return func(s *terraform.State) (string, error) {
		rs, ok := s.RootModule().Resources[resourceName]
		if !ok {
			return "", fmt.Errorf("Not found: %s", resourceName)
		}

		return rs.Primary.ID, nil
	}
}
// Copyright (c) BunnyWay d.o.o.
// SPDX-License-Identifier: MPL-2.0

package provider

import (
	"context"
	"fmt"
	"github.com/bunnyway/terraform-provider-bunnynet/internal/api"
	"github.com/bunnyway/terraform-provider-bunnynet/internal/utils"
	"github.com/hashicorp/terraform-plugin-framework-validators/int64validator"
	"github.com/hashicorp/terraform-plugin-framework-validators/objectvalidator"
	"github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
	"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
	"github.com/hashicorp/terraform-plugin-framework/attr"
	"github.com/hashicorp/terraform-plugin-framework/dia


4.4,
      4.8,
      4.7,
      4.7,
      4.8,
      4.6,
      5,
      4.7,
      4.7,
      5
    ],
    "wind_direction_10m": [
      148,
      180,
      170,
      146,
      156,
      165,
      188,
      198,
      191,
      191,
      194,
      222,
      207,
      212,
      189,
      167,
      176,
      184,
      193,
      198,
      210,
      184,
      189,
      201
    ],
    "is_day": [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  }
};
const List<String> time = [
  "2025-02-04T00:00",
  "2025-02-04T01:00",
  "2025-02-04T02:00",
  "2025-02-04T03:00",
  "2025-02-04T04:00",
  "2025-02-04T05:00",
  "2025-02-04T06:00",
  "2025-02-04T07:00",
  "2025-02-04T08:00",
  "2025-02-04T09:00",
  "2025-02-04T10:00",
  "2025-02-04T11:00",
  "2025-02-04T12:00",
  "2025-02-04T13:00",
  "2025-02-04T14:00",
  "2025-02-04T15:00",
  "2025-02-04T16:00",
  "2025-02-04T17:00",
  "2025-02-04T18:00",
  "2025-02-04T19:00",
  "2025-02-04T20:00",
  "2025-02-04T21:00",
  "2025-02-04T22:00",
  "2025-02-04T23:00"
];
const List<double> temperature_2m = [
  -1.9,
  -2.1,
  -2.3,
  -2.8,
  -3.1,
  -3.3,
  -3.5,
  -3.9,
  -3.7,
  -1.8,
  -0.4,
  1,
  3.2,
  4.1,
  4.2,
  4.7,
  3,
  1.9,
  1.3,
  0.8,
  0.3,
  -0.3,
  -0.7,
  -1.1
];
const List<int> relativeHumidity2m = [
  86,
  88,
  92,
  92,
  93,
  94,
  97,
  100,
  100,
  87,
  80,
  74,
  70,
  66,
  67,
  64,
  74,
  78,
  79,
  79,
  80,
  82,
  83,
  84
];

const List<double> apparentTemperature = [
  -5.2,
  -5.2,
  -5.5,
  -6,
  -6.4,
  -6.7,
  -6.9,
  -7.4,
  -7.1,
  -5.2,
  -3.8,
  -2.3,
  0.2,
  0.9,
  1.3,
  1.7,
  0.1,
  -1.1,
  -1.8,
  -2.3,
  -2.9,
  -3.5,
  -4,
  -4.4
];
const List<int> precipitationProbability = [


 of my words in this adulterous and sinful generation; of him also shall the [[#^note-38b|Son of man]] be ashamed, when he cometh in the glory of his Father with the holy [[#^note-38c|angels]]. ^verse-38

---
[[New Testament/Mark/Mark 7|Previous Entry]]  ||  [[New Testament/Mark/Mark 9|Next Entry]]

**Footnotes**

3a. GR some. ^note-3a

11a. [[Doctrine and Covenants/Doctrine and Covenants/Doctrine and Covenants 46#^verse-9|D&C 46:9]]; [[Doctrine and Covenants/Doctrine and Covenants/Doctrine and Covenants 63#^verse-7|63:7 (7-11)]] ^note-11a

12a. [[New Testament/Matthew/Matthew 16#^verse-4|Matt. 16:4 (1-12)]] ^note-12a

17a. GR do you still have hardened hearts? ^note-17a

17b. [[Study Helps/Topical Guide/Hardheartedness, Harden, Hardness|TG Hardheartedness]] ^note-17b

23a. [[Study Helps/Topical Guide/Administrations to the Sick|TG Administrations to the Sick]]; [[Study Helps/Topical Guide/Hands, Laying on of|Hands, Laying on of]] ^note-23a

23b. OR anything. ^note-23b

25a. OR everything. ^note-25a

29a. [[Study Helps/Topical Guide/Jesus Christ, Messiah|TG Jesus Christ, Messiah]] ^note-29a

30a. [[New Testament/Luke/Luke 9#^verse-21|Luke 9:21]] ^note-30a

31a. [[Study Helps/Topical Guide/Jesus Christ, Teaching Mode of|TG Jesus Christ, Teaching Mode of]] ^note-31a

33a. [[Book of Mormon/Alma/Alma 12#^verse-5|Alma 12:5 (5-6, 34)]] ^note-33a

33b. GR you do not consider, cherish. ^note-33b

34a. [[Study Helps/Topical Guide/Self-Mastery|TG Self-Mastery]] ^note-34a

34b. [[Study Helps/Topical Guide/Jesus Christ, Exemplar|TG Jesus Christ, Exemplar]] ^note-34b

35a. [[Study Helps/Joseph Smith Translation Appendix/JST, Mark/JST, Mark 8#^verse-37|JST Mark 8:37-38 (Appendix)]]; JST Mark 8:37-38 (Appendix). ^note-35a

35b. [[New Testament/Luke/Luke 9#^verse-24|Luke 9:24]]; [[Study Helps/Joseph Smith Translation Appendix/JST, Luke/JST, Luke 9#^verse-24|JST Luke 9:24-25 (Appendix)]] ^note-35b

35c. [[New Testament/Hebrews/Hebrews 11#^verse-35|Heb. 11:35]]; [[New Testament/Hebrews/Hebrews 11|JST Heb. 11:35 (Heb. 11:35 note b)]]; [[Doctrine and Covenants/Doctrine and Covenants/Doctrine and Covenants 103#^verse-28|D&C 103:28 (27-28)]]; [[Study Helps/Topical Guide/Martyrdom|TG Martyrdom]] ^note-35c

36a. [[Old Testament/Jeremiah/Jeremiah 45#^verse-5|Jer. 45:5]] ^note-36a

37a. JST Mark 8:39-40 ... soul? Therefore deny yourselves of these, and be not ashamed of me. ^note-37a

38a. [[Book of Mormon/1 Nephi/1 Nephi 8#^verse-28|1 Ne. 8:28 (24-28)]]; [[Study Helps/Topical Guide/Shame|TG Shame]] ^note-38a

38b. [[Study Helps/Topical Guide/Jesus Christ, Son of Man|TG Jesus Christ, Son of Man]] ^note-38b

38c. [[Study Helps/Joseph Smith Translation Appendix/JST, Mark/JST, Mark 8#^verse-42|JST Mark 8:42-43 (Appendix)]]; JST Mark 8:42-43 (Appendix). ^note-38c### Chapter 7

[[New Testament/Mark/Mark 6|Previous Entry]]  ||  [[New Testament/Mark/Mark 8|Next


	return s.final();
}

bool USBDemodGUI::deserialize(const QByteArray& data)
{
	SimpleDeserializer d(data);

	if(!d.isValid()) {
		resetToDefaults();
		return false;
	}

	if(d.getVersion() == 1) {
		QByteArray bytetmp;
		quint32 u32tmp;
		qint32 tmp;
		d.readS32(1, &tmp, 0);
		m_channelMarker->setCenterFrequency(tmp);
		d.readS32(2, &tmp, 3);
		ui->BW->setValue(tmp);
		d.readS32(3, &tmp, 20);
		ui->volume->setValue(tmp);
		d.readBlob(4, &bytetmp);
		ui->spectrumGUI->deserialize(bytetmp);
		if(d.readU32(5, &u32tmp))
			m_channelMarker->setColor(u32tmp);
		applySettings();
		return true;
	} else {
		resetToDefaults();
		return false;
	}
}

bool USBDemodGUI::handleMessage(Message* message)
{
	return false;
}

void USBDemodGUI::viewChanged()
{
	applySettings();
}

void USBDemodGUI::on_BW_valueChanged(int value)
{
	ui->BWText->setText(QString("%1 kHz").arg(value));
	m_channelMarker->setBandwidth(value * 1000);
	m_channelMarker->setCenterFrequency(value * 500);
	applySettings();
}

void USBDemodGUI::on_volume_valueChanged(int value)
{
	ui->volumeText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
	applySettings();
}

void USBDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
{
	/*
	if((widget == ui->spectrumContainer) && (m_usbDemod != NULL))
		m_usbDemod->setSpectrum(m_threadedSampleSink->getMessageQueue(), rollDown);
	*/
}

void USBDemodGUI::onMenuDoubleClicked()
{
	if(!m_basicSettingsShown) {
		m_basicSettingsShown = true;
		BasicChannelSettingsWidget* bcsw = new BasicChannelSettingsWidget(m_channelMarker, this);
		bcsw->show();
	}
}

USBDemodGUI::USBDemodGUI(PluginAPI* pluginAPI, QWidget* parent) :
	RollupWidget(parent),
	ui(new Ui::USBDemodGUI),
	m_pluginAPI(pluginAPI),
	m_basicSettingsShown(false)
{
	ui->setupUi(this);
	setAttribute(Qt::WA_DeleteOnClose, true);
	connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
	connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));

	m_audioFifo = new AudioFifo(4, 48000 / 4);
	m_spectrumVis = new SpectrumVis(ui->glSpectrum);
	m_usbDemod = new USBDemod(m_audioFifo, m_spectrumVis);
	m_channelizer = new Channelizer(m_usbDemod);
	m_threadedSampleSink = new ThreadedSampleSink(m_channelizer);
	m_pluginAPI->addAudioSource(m_audioFifo);
	m_pluginAPI->addSampleSink(m_threadedSampleSink);

	ui->glSpectrum->setCenterFrequency(3000);
	ui->glSpectrum->setSampleRate(6000);
	ui->glSpectrum->setDisplayWaterfall(true);
	ui->glSpectrum->setDisplayMaxHold(true);

	m_channelMarker = new ChannelMarker(this);
	m_channelMarker->setColor(Qt::blue);
	m_channelMarker->setBandwidth(5000);
	m_channelMarker->setCenterFrequency(2500);
	m_channelMarker->setVisible(true);
	conn


BI know many of his spells, and can help concoct a potion to counter them.  Take this scroll back to Apothecary Renferrel.  It has the incantations needed for the potion.",
    ["O"] = "Bring Bethor\'s Scroll to Apothecary Renferrel at the Silverpine Sepulcher.",
    ["T"] = "Thule Ravenclaw",
  },
  [447] = {
    ["D"] = "Arthas\'s numbers are overwhelming. But with a New Plague we could eradicate both the Scourge Army and the Human infestation once and for all.$b$bMy studies have proven that spider blood combined with a toxin derived from a grizzled bear heart results in a deadly elixir. Collect samples from the spiders in the Skittering Dark to the northwest and from the bears wandering throughout Silverpine Forest. Deliver the reagents to Master Apothecary Faranell of the Royal Apothecary Society in the Undercity.",
    ["O"] = "Collect 6 Grizzled Bear Hearts and 6 samples of Skittering Blood and deliver them to Master Apothecary Faranell in the Undercity.",
    ["T"] = "A Recipe For Death",
  },
  [448] = {
    ["D"] = "Before you launch an assault on Fenris Isle, report to High Executor Hadrec.  He may have additional information or equipment you\'ll need.",
    ["O"] = "Report to High Executor Hadrec at the Sepulcher.",
    ["T"] = "Report to Hadrec",
  },
  [449] = {
    ["D"] = "Although Quinn\'s wounds are mending, I want to get our report to High Executor Hadrec as quickly as possible.  It has information that is vital to the Forsaken\'s occupation of Silverpine.",
    ["O"] = "Bring the Deathstalker Report to High Executor Hadrec at the Sepulcher.",
    ["T"] = "The Deathstalkers\' Report",
  },
  [450] = {
    ["D"] = "You can be of further service to the Royal Apothecary Society, $N.$b$bWhen Arugal cast his wretched magic on the forest, he cursed one of our most promising members, Apothecary Berard.  Now a mindless servant of Arugal, Berard is useless to us.  But his findings might prove to be of worth.  He was studying an ancient plague that killed off all the aquatic life in Lake Lordamere ages ago.$b$bRetrieve Berard\'s Journal from his study in the Pyrewood Village Inn and take it to Apothecary Renferrel.",
    ["O"] = "Retrieve Apothecary Berard\'s journal from Pyrewood Village and take it to Apothecary Renferrel at the Sepulcher.",
    ["T"] = "A Recipe For Death",
  },
  [451] = {
    ["D"] = "According to Berard\'s Journal the moss from Lake Skulkers and Creepers might prove useful for our quest to brew a new plague.  Those beasts dwell on the islands in Lake Lordamere to the east.$b$bHe also mentions a very rare Hardened Tumor that he discovered on a Vile Fin murloc.  Apparently the tumor is so rare Berard was only able to obtain one.$b$bCollect samples of the moss as well as the rare hardened tumor and take them to Master Apothecary Faranell in the Undercity.",
    ["O"] = "Bring 6 samples of Lake Creeper Moss, 6 samples of Lake Skulker Moss and a Hardened Tumor to Master Apothecary Faranell in the Undercity.",
    ["T"] = "A Recipe For Death",
  },
  [452] = {
    ["D"] = "You got here just in the nick of time, $N!$b$bThe Pyrewood Council will be returning any moment.  Arugal has other matters to tend to in the keep.  He uses the Council as mere puppets to keep the mindless minions of Pyrewood under his control.  But I believe that without the guidance of the Pyrewood Council, the sons of Arugal will turn against their master.$b$bI cannot handle them all by myself.  I need you to help me.


s) {
        if (out.comment) { w.line(`/// ${out.comment}.`); }
        const outMode = out.guessModeType();
        let args = outMode ? "" : `, mode: ${modeType.rustInName}`;
        let modeValue = outMode ? `${outMode}` : modeType.unwrap(`mode`);

        w.indent(`pub fn ${out.new_proj_fnName}(self${args}) -> Proj {`);
        w.line(`Proj::new(unsafe { bindings::new_r_Proj(self.0, ${modeValue}, ${out.idx}) })`);
        w.unindent(`}`);
        w.line();
    }

    // projection reverse function
    for (const out of node.outs) {
        if (out.comment) { w.line(`/// ${out.comment}.`); }

        w.indent(`pub fn ${out.out_proj_fnName}(self) -> Option<Proj> {`);
        w.indent(`let mut res = self.out_nodes().filter_map(|out_node| match out_node {`);
        w.indent(`Node::Proj(proj, ProjKind::${out.projKind_variantCtor("_")}) => Some(proj),`);
        w.line(`    _ => None,`);
        w.unindent(`});`);
        w.line(`let ret = res.next();`);
        w.line(`debug_assert!(res.count() == 0, "expect at most one of ProjKind::${out.projKind_variantCtor("_")}");`);
        w.line(`ret`);
        w.unindent(`}`);
        w.line();
    }

    w.unindent(`}`);
    w.line();
}

function generateNodeInto(node: NodeImpl) {
    w.indent(`impl From<${node.structName}> for Node {`);
    w.indent(`fn from(node: ${node.structName}) -> Node {`);
    w.line(`Node::${node.variantName}(node${node.isProj ? ", node.kind()" : ""})`);
    w.unindent(`}`);
    w.unindent("}");
    w.line();
}

function generateNodeTraitImpl(node: NodeImpl) {
    w.indent(`impl NodeTrait for ${node.structName} {`);
    w.indent(`fn ${internal_ir_node}(&self) -> ${ir_node_type} {`);
    w.line(`self.0`);
    w.unindent(`}`);
    w.unindent("}");
    w.line();
}

function generateNodeDebugImpl(node: NodeImpl) {
    if (["Address", "Call", "Const", "Load", "Store", "Member", "Proj"].indexOf(node.name) === -1) {
        w.indent(`impl NodeDebug for ${node.structName} {`);
        w.indent(`fn fmt(&self, f: &mut fmt::Formatter, _opts: NodeDebugOpts) -> fmt::Result {`);
        w.line(`write!(f, "${node.name} {}", self.node_id())`);
        w.unindent(`}`);
        w.unindent(`}`);
    }

    w.indent(`impl fmt::Debug for ${node.structName} {`);
    w.indent(`fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {`);
    w.line(`fmt::Display::fmt(&self.debug_fmt(), f)`);
    w.unindent(`}`);
    w.unindent(`}`);
}

function generateGraphImpl() {
    w.indent(`impl Graph {`);
    {
        for (const node of nodes) {
            generateConstructionFunction(node, "graph");
        }
    }
    w.unindent("}");
    w.line();
}

function generateBlockImpl() {
    w.indent(`impl Block {`);
    {
        for (const node of nodes) {
            generateConstructionFunction(node, "block");
        }
    }
    w.unindent(


tRequest("GET", "/templates");
        private final StandardServletAsyncWebRequest nativeWebRequest =
                new StandardServletAsyncWebRequest(httpServletRequest, new MockHttpServletResponse());
        private final Member member = MemberFixture.getFirstMember();

        @Nested
        @DisplayName("required 값이 false 일 경우")
        class RequiredFalseTest {
            Method notRequiredMethod = ReflectionSupport.findMethod(ResolveTestController.class,
                            "notRequiredMethod", Member.class)
                    .orElseThrow();

            @Test
            @DisplayName("성공: credential 정보가 없을 때 null 이 반환된다.")
            void noCredentialTest() {
                //when
                Member member = resolveArgument(notRequiredMethod, nativeWebRequest);

                //then
                assertThat(member).isNull();
            }

            @Test
            @DisplayName("성공: credential 정보가 존재하면 Member 가 반환된다.")
            void existCredentialTest() {
                //given
                setCredentialCookie(httpServletRequest, member);

                //when
                Member resolvedArgument = resolveArgument(notRequiredMethod, nativeWebRequest);

                //then
                assertThat(resolvedArgument).isEqualTo(member);
            }
        }

        @Nested
        @DisplayName("required 값이 true  일 경우")
        class RequiredTrueTest {
            Method requiredMethod = ReflectionSupport.findMethod(ResolveTestController.class,
                            "requiredMethod", Member.class)
                    .orElseThrow();

            @Test
            @DisplayName("실패: credential 정보가 없을때 예외가 발생한다.")
            void noCredentialTest() {
                //given

                //when & then
                assertThatThrownBy(() -> resolveArgument(requiredMethod, nativeWebRequest))
                        .isInstanceOf(CodeZapException.class)
                        .hasMessage("인증 정보가 없습니다. 다시 로그인해 주세요.");
            }

            @Test
            @DisplayName("성공: credential 정보가 존재하면 Member 가 반환된다.")
            void existCredentialTest() {
                //given
                setCredentialCookie(httpServletRequest, member);

                //when
                Member resolvedArgument = resolveArgument(requiredMethod, nativeWebRequest);

                //then
                assertThat(resolvedArgument).isEqualTo(member);
            }
        }

        private Member resolveArgument(Method method, NativeWebRequest webRequest) {
            return authArgumentResolver.resolveArgument(
                    new MethodParameter(method, 0),
                    new ModelAndViewContainer(),
                    webRequest,
                    (request, target, objectName) -> null);
        }

        private void setCredentialCookie(MockHttpServletRequest request, Member member) {
            MockHttpServletResponse mockResponse = new MockHttpServletResponse();
            Credential credential = credentialProvider.createCredential(LoginMember.from(member));
            credentialManagers.forEach(cm -> cm.setCredential(mockResponse, credential));
            request.setCookies(mockResponse.getCookies());
        }
    }
}
package corea.matchresult.dto;

import corea.matchresult.domain.MatchResult;
import corea.member.domain.Member;
import io.swagger.v3.oas.annotations.media.Schema;

@Schema(description = "매칭 결과 응답")
public record MatchResultResponse(@Schema(description = "사용자 아이디", example = "1")
                                  long userId,

                                  @Schema(description = "사용자 이름", example = "hjk0761")


:
        f = open(dbname, 'r+b')
    except IOError:
        fd = os.open(dbname, os.O_RDWR | os.O_CREAT)
        f = os.fdopen(fd, 'r+b')
    return DBDB(f)
```

```python
# dbdb/interface.py
class DBDB(object):

    def __init__(self, f):
        self._storage = Storage(f)
        self._tree = BinaryTree(self._storage)
```

从上面的代码中，我们可以看到`DBDB`的实例中包含了一个对`Storage`实例的引用，它还把这个引用分享给了 `self._tree`。为什么要这样呢？`self._tree`不可以有自己单独的对存储的访问吗？

关于哪个对象应该“拥有”一个资源的问题，在设计中通常是一个重要的问题，因为它影响到了程序的安全性。我们稍后会解释这个问题。

当我们获得`DBDB`的实例后，获取一个键的值就会通过`dict`的查找功能完成(Python的解释器会调用`DBDB.__getitem__()`)。

```python
# dbdb/interface.py
class DBDB(object):
# ...
    def __getitem__(self, key):
        self._assert_not_closed()
        return self._tree.get(key)

    def _assert_not_closed(self):
        if self._storage.closed:
            raise ValueError('Database closed.')
```

`__getitem__()` 通过调用 `_assert_not_closed` 确保数据库仍处于打开状态。啊哈！这里我们看到了一个`DBDB`需要直接访问 `Storage`实例的原因：因此它可以强制执行前提条件。(你同意这个设计吗？你能想出一个不同的方式吗？)

然后DBDB通过调用`_tree.get()`函数(由`LogicalBase`提供)来查找`key`所对应的值：

```python
# dbdb/logical.py
class LogicalBase(object):
# ...
    def get(self, key):
        if not self._storage.locked:
            self._refresh_tree_ref()
        return self._get(self._follow(self._tree_ref), key)
```

`get()` 先检查了储存是否被锁。目前，我们并不明白为什么在这里可能会有一个锁，但是我们可以猜到它是用来管理数据写入权限的。如果存储没有锁定会发生什么呢？

```python
# dbdb/logical.py
class LogicalBase(object):
# ...
def _refresh_tree_ref(self):
        self._tree_ref = self.node_ref_class(
            address=self._storage.get_root_address())
```

`_refresh_tree_ref` 将磁盘上数据树的“视图”更新了，这使我们能够读取最新的数据。

如果我们读取数据的时候，数据被锁了呢？这说明其他的进程或许正在更新这部分数据；我们读取的数据不太可能是最新的。 这通常被称为“脏读”(dirty read)。这种模式允许许多读者访问数据，而不用担心阻塞，相对的缺点就是数据可能不是最新的。

现在，一起来看看是怎么具体拿取数据的。

```python
# dbdb/binary_tree.py
class BinaryTree(LogicalBase):
# ...
    def _get(self, node, key):
        while node is not None:
            if key < node.key:
                no


B2595,0xBFBDA4AE
	.dc.l	0x3FFF0000,0xD2A81D91,0xF12AE45A,0x3FBC9124
	.dc.l	0x3FFF0000,0xD4F35AAB,0xCFEDFA1F,0x3FBEB243
	.dc.l	0x3FFF0000,0xD744FCCA,0xD69D6AF4,0x3FBDE69A
	.dc.l	0x3FFF0000,0xD99D15C2,0x78AFD7B6,0xBFB8BC61
	.dc.l	0x3FFF0000,0xDBFBB797,0xDAF23755,0x3FBDF610
	.dc.l	0x3FFF0000,0xDE60F482,0x5E0E9124,0xBFBD8BE1
	.dc.l	0x3FFF0000,0xE0CCDEEC,0x2A94E111,0x3FBACB12
	.dc.l	0x3FFF0000,0xE33F8972,0xBE8A5A51,0x3FBB9BFE
	.dc.l	0x3FFF0000,0xE5B906E7,0x7C8348A8,0x3FBCF2F4
	.dc.l	0x3FFF0000,0xE8396A50,0x3C4BDC68,0x3FBEF22F
	.dc.l	0x3FFF0000,0xEAC0C6E7,0xDD24392F,0xBFBDBF4A
	.dc.l	0x3FFF0000,0xED4F301E,0xD9942B84,0x3FBEC01A
	.dc.l	0x3FFF0000,0xEFE4B99B,0xDCDAF5CB,0x3FBE8CAC
	.dc.l	0x3FFF0000,0xF281773C,0x59FFB13A,0xBFBCBB3F
	.dc.l	0x3FFF0000,0xF5257D15,0x2486CC2C,0x3FBEF73A
	.dc.l	0x3FFF0000,0xF7D0DF73,0x0AD13BB9,0xBFB8B795
	.dc.l	0x3FFF0000,0xFA83B2DB,0x722A033A,0x3FBEF84B
	.dc.l	0x3FFF0000,0xFD3E0C0C,0xF486C175,0xBFBEF581

	N = L_SCR1

	X = FP_SCR1
	XDCARE = X+2
	XFRAC = X+4

	ADJFACT = FP_SCR2

	FACT1 = FP_SCR3
	FACT1HI = FACT1+4
	FACT1LOW = FACT1+8

	FACT2 = FP_SCR4
	FACT2HI = FACT2+4
	FACT2LOW = FACT2+8

	.xref	t_unfl
	.xref	t_ovfl
	.xref	t_frcinx

	.text

	.globl	stwotoxd
stwotoxd:
/*
 * --ENTRY POINT FOR 2**(X) FOR DENORMALIZED ARGUMENT
 */
	fmove.l		d1,fpcr		/* ...set user's rounding mode/precision */
	.IFNE GAS
	fmove.s		#0x3F800000,fp0  /* ...RETURN 1 + X */
	.ELSE
	fmove.s		#1.0,fp0  /* ...RETURN 1 + X */
	.ENDC
	move.l		(a0),d0
	ori.l		#0x00800001,d0
	fadd


-flex uni-row form-item-right",class:1==t.spread.type?"green":"red"},[n("v-uni-view",{staticClass:"flex-item text uni-flex center"},[1==t.spread.type?n("v-uni-text",[t._v("+")]):n("v-uni-text",[t._v("-")])],1),n("v-uni-view",{staticClass:"flex-item text uni-flex center dollar"},[n("v-uni-text",[t._v("$")])],1),n("v-uni-view",{staticClass:"flex-item text uni-flex center price"},[n("v-uni-text",[t._v(t._s(t.spread.value))])],1)],1)],1),n("v-uni-view",{staticClass:"flex-item uni-flex uni-row center form-item"},[n("v-uni-view",{staticClass:"uni-flex uni-row center icon"},[n("v-uni-image",{attrs:{src:i("ed93"),mode:"aspectFit"}})],1),n("v-uni-view",{staticClass:"title"},[n("v-uni-text",{staticClass:"uni-form-item__title"},[t._v(t._s(t.i18n.withdrawalFromAccount))])],1),n("v-uni-view",{staticClass:"uni-flex uni-row form-item-right",class:1==t.cashTotal.type?"green":"red"},[n("v-uni-view",{staticClass:"flex-item text uni-flex center"},[1==t.cashTotal.type?n("v-uni-text",[t._v("+")]):n("v-uni-text",[t._v("-")])],1),n("v-uni-view",{staticClass:"flex-item text uni-flex center dollar"},[n("v-uni-text",[t._v("$")])],1),n("v-uni-view",{staticClass:"flex-item text uni-flex center price"},[n("v-uni-text",[t._v(t._s(t.cashTotal.value))])],1)],1)],1),n("v-uni-view",{staticClass:"flex-item uni-flex uni-row center form-item"},[n("v-uni-view",{staticClass:"title",staticStyle:{"text-align":"center"}},[n("v-uni-text",{staticClass:"uni-form-item__title",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.logout()}}},[t._v(t._s(t.i18n.logOut))])],1)],1)],1)],1)],1)],1)],1)},A=[]},f1b8:function(t,e,i){t.exports=i.p+"static/img/banner@2x.ce6f6a75.png"}}]);(function(e){function n(n){for(var i,r,c=n[0],s=n[1],l=n[2],u=0,f=[];u<c.length;u++)r=c[u],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&f.push(o[r][0]),o[r]=0;for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i]);d&&d(n);while(f.length)f.shift()();return a.push.apply(a,l||[]),t()}function t(){for(var e,n=0;n<a.length;n++){for(var t=a[n],i=!0,r=1;r<t.length;r++){var s=t[r];0!==o[s]&&(i=!1)}i&&(a.splice(n--,1),e=c(c.s=t[0]))}return e}var i={},o={index:0},a=[];function r(e){return c.p+"static/js/"+({"pages-bank-index~pages-contract-details~pages-index-index~pages-index-red~pages-my-recharge~pages-pr~3066dc56":"pages-bank-index~pages-contract-details~pages-index-index~pa


6.32.32 0 01.314.177c.02.038.03.08.034.123v.011c.123 1.325.373 2.635.748 3.911a.6.6 0 001.173.068c.232-.526.424-.897.497-1.038l.02-.04a.4.4 0 01.54-.158.446.446 0 01.16.594l-.007.012a19.36 19.36 0 00-.8 1.794l-.002.004a7.67 7.67 0 00-.449 1.846l-.018.14c-.053.415-.093.725-.23 1.087a2.53 2.53 0 01-.168.338Zm.731-6.73a1.401 1.401 0 00-.638.602l-.005.009-.005.01c0-.002 0-.002-.002.003l-.047.09c-.014.03-.032.064-.052.103a18.65 18.65 0 01-.188-.875l.04-.956c.402.222.721.58.897 1.013Zm-1.905-2.99a1.324 1.324 0 00-.21-.087h.194l.016.088Zm-1.007-.087a1.335 1.335 0 00-.531.322 1.318 1.318 0 00-.296-.322h.827Z"/></g></svg>';
  static const String woman_factory_worker =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><g fill="currentColor"><path d="M12.4 9.19c.258 0 .494.08.703.207.452.174.791.567.887 1.053a.23.23 0 01-.23.28h-.09c.03-.08.04-.16.04-.24 0-.51-.41-.92-.92-.92a.918.918 0 00-.89 1.16h-.43c-.19 0-.32-.17-.28-.35.012-.045.025-.09.041-.132l-.031-.028a.429.429 0 01.03-.67c.33-.23.76-.36 1.17-.36Zm5.38 0c-.253 0-.488.076-.695.2-.46.17-.808.568-.905 1.06-.03.15.08.28.23.28h.09a.986.986 0 01-.03-.24c-.01-.51.4-.92.91-.92a.918.918 0 01.89 1.16h.43c.19 0 .32-.17.28-.35a1.465 1.465 0 00-.038-.125l.038-.035c.21-.18.19-.51-.03-.67-.33-.23-.76-.36-1.17-.36Z"/><path d="M12.8 9.97c.29 0 .52.23.52.52 0 .08-.02.17-.05.24h-.93a.522.522 0 01.011-.505.16.16 0 10.239-.212.525.525 0 01.21-.043Zm4.58 0a.527.527 0 00-.204.04.16.16 0 11-.24.207.522.522 0 00-.076.273c0 .08.02.17.05.24h.93a.516.516 0 00-.46-.76Zm-2.31 3.61c-.53 0-1.03-.13-1.46-.35-.14-.08-.3.09-.21.22a1.988 1.988 0 003.34 0c.09-.14-.06-.3-.21-.22-.42.22-.92.35-1.46.35Zm-.9-1.64.52-1.68c.12-.38.64-.38.75 0l.52 1.68c.11.34-.15.69-.51.69h-.77c-.36 0-.62-.34-.51-.69Z"/


b=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=776&q=80'
    ),
    Item(
      name: 'Enchiladas',
      description:
          '''Soft tortillas filled with sautéed vegetables, smothered in red enchilada sauce and melted cheese.''',
      price: 12.99,
      imageUrl: 'https://images.unsplash.com/photo-1534352956036-cd81e27dd615?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=802&q=80'
    ),
    Item(
      name: 'Guacamole & Chips',
      description: 'Freshly made guacamole served with crispy tortilla chips.',
      price: 6.99,
      imageUrl: 'https://images.unsplash.com/photo-1585688964721-e30447e290d7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80'
    ),
    Item(
      name: 'Classic Margarita',
      description:
          '''A refreshing blend of tequila, lime juice, triple sec, served on the rocks with a salted rim.''',
      price: 8.99,
      imageUrl: 'https://images.unsplash.com/photo-1634003311194-152e30e732f7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80'
    ),
    Item(
      name: 'Churros with Chocolate Sauce',
      description:
          '''Crispy golden churros dusted with cinnamon sugar, served with a side of rich chocolate dipping sauce.''',
      price: 7.99,
      imageUrl: 'https://images.unsplash.com/photo-1624371414361-e670edf4898d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80'
    ),
  ]),
  Restaurant(
    '6',
    'Sushi Delight',
    '810 Main St, San Jose, NY 19113',
    'Japanese, Sushi, Seafood',
    'assets/restaurants/OldKyotoSushi.jpg',
    'https://images.unsplash.com/photo-1564489563601-c53cfc451e93?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80',
    4.2,
    4.6, [
      Item(
        name: 'Salmon Nigiri',
        description:
        '''Fresh, raw salmon slices served atop hand-pressed vinegar-seasoned rice.''',
        price: 13.99,
        imageUrl: 'https://images.unsplash.com/photo-1648146298796-2d4ab2f380d2?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1


$arch-$osSuffix"
}

fun buildUrl(binName: String, version: String): String {
    return "https://github.com/huggingface/llm-ls/releases/download/$version/$binName.gz"
}

fun downloadAndUnzip(url: String, binDir: File, binName: String, fullPath: String) {
    val path = File(binDir, binName).absolutePath
    val downloadCommand = "curl -L -o $path.gz $url"
    val unzipCommand = "gunzip $path.gz"
    val renameCommand = "mv $path $fullPath"
    val chmodCommand = "chmod +x $fullPath"
    val cleanZipCommand = "rm $path.gz"

    runCommand(downloadCommand)
    runCommand(unzipCommand)
    runCommand(renameCommand)
    runCommand(chmodCommand)
    runCommand(cleanZipCommand)
}

fun runCommand(command: String) {
    val process = Runtime.getRuntime().exec(command)

    process.waitFor()
}

fun downloadLlmLs(logger: Logger, binaryPath: String?, version: String): String? {
    if (binaryPath != null && binaryPath.endsWith(version) && File(binaryPath).exists()) {
        return binaryPath
    }

    val binDir = File(System.getProperty("user.home"), ".cache/llm_intellij/bin")
    binDir.mkdirs()

    val binName = buildBinaryName(logger) ?: return null

    val fullPath = File(binDir, "$binName-$version")

    if (!fullPath.exists()) {
        val url = buildUrl(binName, version)
        downloadAndUnzip(url, binDir, binName, fullPath.absolutePath)
        logger.info("Successfully downloaded llm-ls")
    }

    return fullPath.absolutePath
}
//
// This file is a part of the Chunk Stories Implementation codebase
// Check out README.md for more information
// Website: http://chunkstories.xyz
//
package xyz.chunkstories.server.commands

import org.fusesource.jansi.Ansi
import xyz.chunkstories.api.plugin.commands.CommandEmitter
import xyz.chunkstories.api.util.convertToAnsi
import xyz.chunkstories.server.DedicatedServer
import xyz.chunkstories.util.VersionInfo
import java.io.BufferedReader
import java.io.IOException
import java.io.InputStreamReader

class DedicatedServerConsole(val server: DedicatedServer) : CommandEmitter, Runnable {
    override val name: String
        get() = "[SERVER CONSOLE]"

    override fun sendMessage(message: String) {
        println(convertToAnsi("#FF00FF$message"))
    }

    // Console has ALL permissions
    override fun hasPermission(permissionNode: String): Boolean {
        return true
    }

    override fun run() {
        val br = BufferedReader(InputStreamReader(System.`in`))
        print("> ")
        while (server.keepRunning.get()) {
            try {
                // wait until we have data to complete a readLine()
                while (!br.ready() && server.keepRunning.get()) {
                    printTopScreenDebug()

                    Thread.sleep(1000L)
                }
                if (!server.keepRunning.get())
                    break
                val unparsedCommandText = br.readLine() ?: continue
                try {
                    // Parse and fire
                    var cmdName = unparsedCommandText.toLowerCase()
                    var args = arrayOf<String>()
                    if (unparsedCommandText.contains(" ")) {
                        cmdName = unparsedCommandText.substring(0, unparsedCommandText.indexOf(" "))
                        args = unparsedCommandText
                                .substring(unparsedCommandText.indexOf(" ") + 1, unparsedCommandText.length)
                                .split(" ".toRegex()).dropLastWhile { it.isEmpty() }.toTyp


to be `{}`, not `{}`'.format(
        Instance.XML_HASH_LENGTH, sha256().digest_size))

class InstanceHistory(models.Model):
    class Meta:
        app_label = 'logger'

    xform_instance = models.ForeignKey(
        Instance, related_name='submission_history', on_delete=models.CASCADE)
    xml = models.TextField()
    # old instance id
    uuid = models.CharField(max_length=249, default='')

    date_created = models.DateTimeField(auto_now_add=True)
    date_modified = models.DateTimeField(auto_now=True)


        match: 2,
        map: 'sample map',
        maxKill: 10,
        teams: [
          {
            id: 1,
            placement: 1,
            kill: 20,
          },
          {
            id: 2,
            placement: '-',
            kill: '-',
          },
        ],
      },
    ],
  },
];

const testTeamData: TeamInputData[] = [
  {
    id: 1,
    tag: 'tt1',
    name: 'testTeam1',
  },
  {
    id: 2,
    tag: 'tt2',
    name: 'testTeam2',
  },
];

it('計算結果のテスト', () => {
  const formatted = formatResultData(testInputData, testTeamData);

  expect(formatted).toEqual([
    {
      day: 'n日目 (m月d日)',
      teams: [
        {
          noCapped: {
            id: 1,
            tag: 'tt1',
            name: 'testTeam1',
            results: [
              {
                match: 1,
                placement: 1,
                placementPoint: 12,
                kill: 5,
                killPoint: 5,
                point: 17,
              },
              {
                match: 2,
                placement: 1,
                placementPoint: 12,
                kill: 20,
                killPoint: 20,
                point: 32,
              },
            ],
          },
          capped: {
            id: 1,
            tag: 'tt1',
            name: 'testTeam1',
            results: [
              {
                match: 1,
                placement: 1,
                placementPoint: 12,
                kill: 5,
                killPoint: 3,
                point: 15,
              },
              {
                match: 2,
                placement: 1,
                placementPoint: 12,
                kill: 20,
                killPoint: 10,
                point: 22,
              },
            ],
          },
        },
        {
          noCapped: {
            id: 2,
            tag: 'tt2',
            name: 'testTeam2',
            results: [
              {
                match: 1,
                placement: 2,
                placementPoint: 9,
                kill: 0,
                killPoint: 0,
                point: 9,
              },
              {
                match: 2,
                placement: '-',
                placementPoint: 0,
                kill: '-',
                killPoint: 0,
                point: 0,
              },
            ],
          },
          capped: {
            id: 2,
            tag: 'tt2',
            name: 'testTeam2',
            results: [
              {
                match: 1,
                placement: 2,
                placementPoint: 9,
                kill: 0,
                killPoint: 0,
                point: 9,
              },
              {
                match: 2,
                placement: '-',
                placementPoint: 0,
                kill: '-',
                killPoint: 0,
                point: 0,
              },
            ],
          },
        },
      ],
    },
  ]);
});
// SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all)
// SPDX-FileCopyrightText: 2022 dv4all
//
// SPDX-License-Identifier: Apache-2.0

/**
 * Returns items not found in the reference list. This function
 * is used to determine which items should be deleted after editing.
 * @param param0
 * @returns items not in reference list
 */
export function itemsNotInReferenceList<T>({list, referenceList, key}:
  {list: T[], referenceList: T[], key: keyof T}) {
  if (list.length > 0) {
    // items not present in refrence list should be removed from db
    const itemsNotInReferenceList = list.filter(item => {
      con


 c_void)?;
    debug_assert_eq!(read(pid, aligned_addr as *mut c_void)?.to_ne_bytes(), buf,
                     "Read value is not equal to the written value");
    Ok(())
}

fn tracee_write(pid: Pid, mut addr: usize, contents: &[u8])
                -> Result<(), Box<dyn Error>> {
    let to_write_size = contents.len();
    let mut written_bytes = 0;
    while written_bytes < to_write_size {
        let aligned_addr = addr / size_of::<usize>() * size_of::<usize>();
        debug_assert_eq!(aligned_addr + addr % size_of::<usize>(), addr,
                         "Address alignment computed incorrectly");
        let mut buf_offset = addr - aligned_addr;
        let read_word = read(pid, aligned_addr as *mut c_void)? as usize;
        let mut buf = unsafe { transmute::<_, [u8; size_of::<usize>()]>(read_word) };
        while buf_offset < size_of::<usize>() && written_bytes < to_write_size {
            buf[buf_offset] = contents[written_bytes];
            buf_offset += 1;
            written_bytes += 1;
        }
        let write_word = unsafe { transmute::<_, usize>(buf) };
        trace!("Overwriting word at address {:#x}: {:#018x} (LE) with {:#018x} (LE)",
               aligned_addr, read_word, write_word);
        // This is tricky - although ptrace's signature says "void *data"
        // POKEDATA accepts the word to write by value
        write(pid, aligned_addr as *mut c_void, write_word as *mut c_void)?;
        debug_assert_eq!(
            unsafe { transmute::<_, [u8; size_of::<usize>()]>(read(pid, aligned_addr as *mut c_void)?) },
            buf, "Read value is not equal to the written value");
        addr += size_of::<usize>() - (addr - aligned_addr);
    }
    Ok(())
}

// TODO remove this when nix/libc starts supporting setregs/getregs for musl targets
#[repr(C)]
struct Registers {
    pub r15: u64,
    pub r14: u64,
    pub r13: u64,
    pub r12: u64,
    pub rbp: u64,
    pub rbx: u64,
    pub r11: u64,
    pub r10: u64,
    pub r9: u64,
    pub r8: u64,
    pub rax: u64,
    pub rcx: u64,
    pub rdx: u64,
    pub rsi: u64,
    pub rdi: u64,
    pub orig_rax: u64,
    pub rip: u64,
    pub cs: u64,
    pub eflags: u64,
    pub rsp: u64,
    pub ss: u64,
    pub fs_base: u64,
    pub gs_base: u64,
    pub ds: u64,
    pub es: u64,
    pub fs: u64,
    pub gs: u64,
}

fn tracee_set_registers(pid: Pid, regs: &Registers) -> Result<(), Box<dyn Error>> {
    trace!("Writing tracee {}'s registers", pid);
    let res = unsafe {
        libc::ptrace(
            Request::PTRACE_SETREGS as RequestType,
            libc::pid_t::from(pid),
            null_mut::<c_void>(),
            regs as *const _ as *const c_void,
        )
    };
    Errno::result(res)
        .map(drop)
        .map_err(|x| Box::new(x) as Box<dyn Error>)
}

fn tracee_get_registers(pid: Pid) -> Result<Registers, Box<dyn Error>> {
    trace!("Reading tracee {}'s registers", pid);
    // TODO use MaybeUninit when it works for structs


 &&
            (identical(other.optional, optional) ||
                other.optional == optional));
  }

  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  int get hashCode => Object.hash(runtimeType, optional);

  /// Create a copy of Response
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$ResponseImplCopyWith<_$ResponseImpl> get copyWith =>
      __$$ResponseImplCopyWithImpl<_$ResponseImpl>(this, _$identity);

  @override
  Map<String, dynamic> toJson() {
    return _$$ResponseImplToJson(
      this,
    );
  }
}

abstract class _Response implements Response {
  const factory _Response({required final bool optional}) = _$ResponseImpl;

  factory _Response.fromJson(Map<String, dynamic> json) =
      _$ResponseImpl.fromJson;

  @override
  bool get optional;

  /// Create a copy of Response
  /// with the given fields replaced by the non-null parameter values.
  @override
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$ResponseImplCopyWith<_$ResponseImpl> get copyWith =>
      throw _privateConstructorUsedError;
}
// Copyright (c) 2023 Sendbird, Inc. All rights reserved.

part of 'base_channel.dart';

/// BaseChannelMessageMetaArray
extension BaseChannelMessageMetaArray on BaseChannel {
  /// Creates message meta array keys.
  Future<BaseMessage> createMessageMetaArrayKeys(
    BaseMessage message,
    List<String> keys,
  ) async {
    sbLog.i(StackTrace.current, 'keys: $keys');
    checkUnsupportedAction();

    if (message.channelUrl != channelUrl) {
      throw InvalidParameterException();
    }

    if (keys.isEmpty) {
      throw InvalidParameterException();
    }

    final metaArrays =
        keys.map((e) => MessageMetaArray(key: e, value: [])).toList();
    final cmd = Command.buildUpdateMessageMetaArray(
        message, metaArrays, MetaArrayUpdateMode.add, true);

    var result = await chat.commandManager.sendCommand(cmd);
    if (result != null) {
      return RootMessage.getMessageFromJsonWithChat(chat, result.payload,
          commandType: result.cmd) as BaseMessage;
    } else {
      throw WebSocketFailedException();
    }
  }

  /// Deletes message meta array keys.
  Future<BaseMessage> deleteMessageMetaArrayKeys(
    BaseMessage message,
    List<String> keys,
  ) async {
    sbLog.i(StackTrace.current, 'keys: $keys');
    checkUnsupportedAction();

    if (message.channelUrl != channelUrl) {
      throw InvalidParameterException();
    }

    if (keys.isEmpty) {
      throw InvalidParameterException();
    }

    final metaArrays =
        keys.map((e) => MessageMetaArray(key: e, value: [])).toList();
    final cmd = Command.buildUpdateMessageMetaArray(
        message, metaArrays, MetaArrayUpdateMode.remove, true);

    var result = await chat.commandManager.sendCommand(cmd);
    if (result != null) {
      return RootMessage.getMessageFromJsonWithChat(chat, result.payload,
          commandType: result.cmd) as BaseMessage;
    } else {
      throw WebSocketFailedException();
    }
  }

  /// Adds message meta array values.
  Future<BaseMessage> addMessageMetaArrayValues(
    BaseMessage message,
    List<MessageMetaArray> metaArrays,
  ) async {
    sbLog.i(StackTrace.current, 'metaArrays: $metaArrays');
    checkUnsupportedAction();

    if (message.channelUrl != channelUrl) {
      throw InvalidParameterException();


�寧：洛昭言如果施展邪法，你們人再多，也是送死。

趙亮：這……

洛昭言：閒卿，拜託你。

眾人：妖怪！妖怪啊！

綺裡小媛：還有更厲害的妖怪呢！

路人乙：這……這就是葬風原的怪物啊！

洛昭言：把他們趕出城去！

路人乙：別殺我！救命！救命啊！

趙亮：……對了！正武盟！

越祈：謝謝你。

綺裡小媛：就知道你們不行，這麼點小事都做不好。

越祈：呵呵。

明繡：嬴旭危和禺族怎會允許你插手此事？

綺裡小媛：我問過了，大哥沒說讓我來，但也沒不讓我來啊。

洛昭言：……藏鋒？

藏鋒：家主，保重。

洛昭言：等等！

洛昭言：當日……是你將受傷的臨淵帶到霧魂處的吧？

洛昭言：原來在我一無所知之時，你還一直在為我奔走，多謝。

藏鋒：我只是遵從主人的命令。

洛昭言：……

洛昭言：多謝你，一直照顧埋名。

藏鋒：家主或許早已忘記，當年老爺曾帶回幾名年歲相近的孤兒，讓您和主人挑選幾名做貼身護衛。

藏鋒：您認為自己不需要保護，拒絕了；而主人選擇了我，他說……“我喜歡你的眼神”。

洛昭言：……

藏鋒：其實，他又何嘗需要我的保護呢……

藏鋒：後會無期。

洛寧：你們兄妹兩果然是一樣。

洛昭言：小寧……

洛昭言：小寧，保重……

越祈：好安靜啊……都想不到白天時，這裡還那麼熱鬧。

明繡：蟲鳴聲倒似乎比往日歡悅了許多。

閒卿：空城沒有人聲


Prevents a crash in older GNU GSSAPI libs on e.g. CentOS 5.x.

Changes in 2.1.1
----------------

* UPD: fallback to a temporary in memory tdb CNID database if the volume
       database can't be opened now works with the default backend "dbd" too.
* FIX: afpd: afp_ldap.conf was missing from tarball. This only effected
       [Open]Solaris.
* FIX: afpd: Check if options->server is set in set_signature, preventing
       SIGSEGV.
* FIX: afpd: server signature wasn't initialized in some cases
* FIX: DESTDIR support: DESTDIR was expanded twice
* FIX: Fix for compilation error if header files of an older Netatalk
       version are installed.

Changes in 2.1-release
----------------------

* NEW: afpd: new volume option "volsizelimit" for limitting reported volume
       size. Useful for limitting TM backup size.
* UPD: dbd: -c option for rebuilding volumes which prevents the creation
       of .AppleDouble stuff, only removes orphaned files.

Changes in 2.1-beta2
--------------------

* NEW: afpd: static generated AFP signature stored in afp_signature.conf,
       cf man 5 afp_signature.conf
* NEW: afpd: clustering support: new per volume option "cnidserver".
* UPD: afpd: set volume defaults options "upriv" and "usedots" in the
       volume config file AppleVolumes.default. This will only affect
       new installations, but not upgrades.
* FIX: afpd: prevent security attack guessing valid server accounts. afpd
       now returns error -5023 for unknown users, as does AppleFileServer.

Changes in 2.1-beta1
--------------------

* NEW: afpd: AFP 3.2 support
* NEW: afpd: Extended Attributes support using native attributes or
       using files inside .AppleDouble directories.
* NEW: afpd: ACL support with ZFS
* NEW: cnid_metad: options -l and -f to configure logging
* NEW: IPv6 support
* NEW: AppleDouble compatible UNIX files utility suite 'ad ...'.
       With 2.1 only 'ad ls'.
* NEW: CNID database maintanance utility dbd
* NEW: support BerkeleyDB upgrade. Starting with the next release
       after 2.1 in case of BerkeleyDB library updates, Netatalk
       will be able to upgrade the CNID databases.
* NEW: afpd: store and read CNIDs to/from AppleDouble files by default.
       This is used as a cache and as a backup in case the database
       is deleted or corrupted. It can be disabled with a new volume
       option "nocnidcache".
* NEW: afpd: sending SIGINT to a child afpd process enables debug logging
       to /tmp/afpd.PID.XXXXXX.
* NEW: configure args to download and install a "private" Webmin instance
       including only basic Webmin modules plus our netatalk.wbm.
* NEW: fallback to a temporary in memory tdb CNID database if the volume
       database can't be opened.
* NEW: support for Unicode characters in the range above U+010000 using
       internal surrogate pairs
* NEW: apple_dump: utility to dump AppleSingle and AppleDouble files
* NEW: afpldaptest: utility to check afp_ldap.conf.
* UPD: atalkd and papd are now disabled by default. AppleTalk is legacy.
* UPD: slp advertisement is now disabled by default. server option -slp
       SRVLOC is legacy.
* UPD: cdb/dbd CNID backend requires BerkeleyDB >= 4.6
* UPD: afpd: default CNID backend is "dbd"
* UPD: afpd: try to install PAM config that pulls in system|common auth
* UPD: afpd: symlink handling: never followed server side, client resolves
       them, so it's safe to use them now.
* UPD: afpd: Comment out all exten


ov r1, #1
	bl AddTextPrinterParameterized
	str r0, [r5, #0x30]
	cmp r4, #0
	bne _021E769C
	mov r0, #0xff
	str r0, [r5, #0x30]
_021E769C:
	add sp, #0xc
	pop {r4, r5, r6, r7, pc}
	thumb_func_end ov37_021E762C

	thumb_func_start ov37_021E76A0
ov37_021E76A0: ; 0x021E76A0
	push {r3, lr}
	cmp r0, #0xff
	bne _021E76AA
	mov r0, #1
	pop {r3, pc}
_021E76AA:
	lsl r0, r0, #0x18
	lsr r0, r0, #0x18
	bl TextPrinterCheckActive
	cmp r0, #0
	bne _021E76BA
	mov r0, #1
	pop {r3, pc}
_021E76BA:
	mov r0, #0
	pop {r3, pc}
	.balign 4, 0
	thumb_func_end ov37_021E76A0

	thumb_func_start ov37_021E76C0
ov37_021E76C0: ; 0x021E76C0
	mov r1, #0xb6
	lsl r1, r1, #2
	add r0, r0, r1
	ldr r3, _021E76CC ; =ClearFrameAndWindow2
	mov r1, #0
	bx r3
	.balign 4, 0
_021E76CC: .word ClearFrameAndWindow2
	thumb_func_end ov37_021E76C0

	thumb_func_start ov37_021E76D0
ov37_021E76D0: ; 0x021E76D0
	push {r4, lr}
	add r4, r1, #0
	bl sub_0203769C
	cmp r0, #0
	bne _021E76EC
	bl sub_02037454
	add r0, r4, r0
	cmp r0, #5
	ble _021E76E8
	mov r0, #5
_021E76E8:
	bl sub_02038C1C
_021E76EC:
	pop {r4, pc}
	.balign 4, 0
	thumb_func_end ov37_021E76D0

	thumb_func_start ov37_021E76F0
ov37_021E76F0: ; 0x021E76F0
	push {r3, r4, r5, lr}
	add r4, r0, #0
	bl ov37_021E75C4
	add r5, r0, #0
	cmp r5, #5
	bhi _021E778E
	add r0, r5, r5
	add r0, pc
	ldrh r0, [r0, #6]
	lsl r0, r0, #0x10
	asr r0, r0, #0x10
	add pc, r0
_021E770A: ; jump table
	.short _021E778E - _021E770A - 2 ; case 0
	.short _021E7716 - _021E770A - 2 ; case 1
	.short _021E775C - _021E770A - 2 ; case 2
	.short _021E775C - _021E770A - 2 ; case 3
	.short _021E775C - _021E770A - 2 ; case 4
	.short _021E7788 - _021E770A - 2 ; case 5
_021E7716:
	mov r0, #0xc1
	l