e);s.attr("y",n);const r=(0,i.Nm)(a);s.attr("xlink:href",`#${r}`)};const h=()=>{const t={x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0};return t};const d=()=>{const t={x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:true};return t}}}]);"use strict";(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[406],{20406:(t,e,r)=>{r.r(e);r.d(e,{diagram:()=>lt});var n=r(23787);var i=r(67058);var a=r(34596);var s=r(96001);const o=[];for(let ht=0;ht<256;++ht){o.push((ht+256).toString(16).slice(1))}function c(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}function l(t,e=0){const r=c(t,e);if(!validate(r)){throw TypeError("Stringified UUID is invalid")}return r}const h=null&&l;const d=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function u(t){return typeof t==="string"&&d.test(t)}const y=u;function f(t){if(!y(t)){throw TypeError("Invalid UUID")}let e;const r=new Uint8Array(16);r[0]=(e=parseInt(t.slice(0,8),16))>>>24;r[1]=e>>>16&255;r[2]=e>>>8&255;r[3]=e&255;r[4]=(e=parseInt(t.slice(9,13),16))>>>8;r[5]=e&255;r[6]=(e=parseInt(t.slice(14,18),16))>>>8;r[7]=e&255;r[8]=(e=parseInt(t.slice(19,23),16))>>>8;r[9]=e&255;r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255;r[11]=e/4294967296&255;r[12]=e>>>24&255;r[13]=e>>>16&255;r[14]=e>>>8&255;r[15]=e&255;return r}const p=f;function _(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r){e.push(t.charCodeAt(r))}return e}const E="6ba7b810-9dad-11d1-80b4-00c04fd430c8";const m="6ba7b


the network.
    /// See [`NetEvent`] to know about the different network events.
    Network(StoredNetEvent),

    /// The `StoredNodeEvent` is a signal.
    /// A signal is an event produced by the own node to itself.
    /// You can send signals with timers or priority.
    /// See [`EventSender`] to know about how to send signals.
    Signal(S),
}

impl<S: std::fmt::Debug> std::fmt::Debug for StoredNodeEvent<S> {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            StoredNodeEvent::Network(net_event) => write!(f, "NodeEvent::Network({:?})", net_event),
            StoredNodeEvent::Signal(signal) => write!(f, "NodeEvent::Signal({:?})", signal),
        }
    }
}

impl<S> StoredNodeEvent<S> {
    /// Assume the event is a [`StoredNodeEvent::Network`], panics if not.
    pub fn network(self) -> StoredNetEvent {
        match self {
            StoredNodeEvent::Network(net_event) => net_event,
            StoredNodeEvent::Signal(..) => panic!("NodeEvent must be a NetEvent"),
        }
    }

    /// Assume the event is a [`StoredNodeEvent::Signal`], panics if not.
    pub fn signal(self) -> S {
        match self {
            StoredNodeEvent::Network(..) => panic!("NodeEvent must be a Signal"),
            StoredNodeEvent::Signal(signal) => signal,
        }
    }
}

impl<S> From<NodeEvent<'_, S>> for StoredNodeEvent<S> {
    fn from(node_event: NodeEvent<'_, S>) -> Self {
        match node_event {
            NodeEvent::Network(net_event) => StoredNodeEvent::Network(net_event.into()),
            NodeEvent::Signal(signal) => StoredNodeEvent::Signal(signal),
        }
    }
}

/// Analogous to [`NetEvent`] but without reference the data.
/// This kind of event is dispatched by `NodeListener::to_event_queue()`.
#[derive(Debug, Clone)]
pub enum StoredNetEvent {
    Connected(Endpoint, ResourceId),
    Message(Endpoint, Vec<u8>),
    Disconnected(Endpoint),
}

impl From<NetEvent<'_>> for StoredNetEvent {
    fn from(net_event: NetEvent<'_>) -> Self {
        match net_event {
            NetEvent::Connected(endpoint, id) => Self::Connected(endpoint, id),
            NetEvent::Message(endpoint, data) => Self::Message(endpoint, Vec::from(data)),
            NetEvent::Disconnected(endpoint) => Self::Disconnected(endpoint),
        }
    }
}

impl StoredNetEvent {
    /// Use this `StoredNetEvent` as a `NetEvent` referencing its data.
    fn borrow(&self) -> NetEvent<'_> {
        match self {
            Self::Connected(endpoint, id) => NetEvent::Connected(*endpoint, *id),
            Self::Message(endpoint, data) => NetEvent::Message(*endpoint, &data),
            Self::Disconnected(endpoint) => NetEvent::Disconnected(*endpoint),
        }
    }
}

/// Creates a node already working.
/// This function offers two instances: a [`NodeHandler`] to perform network and signals actions
/// and a [`NodeListener`] to receive the events the node receives.
///
/// Note that [`NodeListener`] is already listen for events from its creation.
/// In order to get the listened events you can call [`NodeListener::for_each()`]
/// Any event happened before `for_each


iteUint8Buffer(uint8Array[pointer++]);
        }

        return bricksBuffer;
    }

    /**
     * 将url通过sha1算法解析
     * 返回sha1之后的url
     */
    export function _sha1FromUrl(url) {
        var bufSha = BK.Misc.sha1(url);
        var sha1 = "";
        for (var i = 0; i < bufSha.length; i++) {
            var charCode = bufSha.readUint8Buffer();
            sha1 += charCode.toString(16);
        }
        return sha1;
    }
}class Stack {

    private s : number[];

    constructor() {
        this.s = [];
    }

    push(i : number) {
        this.s.push(i);
    }

    pop() {
        let i : number = this.s[0];
        this.s.pop();
        return i;
    }

    isEmpty() {
        if (this.s.length == 0) {
            return true;
        }
        else {
            return false;
        }
    }

    indexOf(e : number) {
        return this.s.indexOf(e);
    }

    size() {
        return this.s.length;
    }
}

export default Stack;import { wait, ReadyStatusEnum } from './wait';

describe('wait()', () => {
    it('resolves with no value set', () => {
        const { setReady, afterReady } = wait();
        setReady();
        return expect(afterReady()).resolves.toBeUndefined();
    });

    it('resolves with value set', () => {
        const { setReady, afterReady, getResultValue } = wait<number>();
        const value = 1;
        setReady(value);
        expect(getResultValue()).toBe(value);
        return expect(afterReady()).resolves.toBe(value);
    });

    it('rejects with no reason set', () => {
        const { setFailed, afterReady } = wait();
        setFailed();
        return expect(afterReady()).rejects.toBeUndefined();
    });

    it('rejects with reason set', () => {
        const { setFailed, afterReady, getFailReason } = wait<string>();
        const reason = new Error('unknown error');
        setFailed(reason);
        expect(getFailReason()).toBe(reason);
        return expect(afterReady()).rejects.toBe(reason);
    });

    it('resolves after wait', () => {
        const { setReady, afterReady } = wait();
        const testStep = expect(afterReady()).resolves.toBeUndefined();
        setReady();
        return testStep;
    });

    it('rejects after wait', () => {
        const { setFailed, afterReady } = wait();
        const testStep = expect(afterReady()).rejects.toBeUndefined();
        setFailed();
        return testStep;
    });

    it('status should turn to ready after setReady', () => {
        const { setReady, getStatus } = wait();
        expect(getStatus()).toBe(ReadyStatusEnum.Pending);
        setReady();
        expect(getStatus()).toBe(ReadyStatusEnum.Ready);
    });

    it('status should turn to failed after setFailed', () => {
        const { setFailed, getStatus } = wait();
        expect(getStatus()).toBe(ReadyStatusEnum.Pending);
        setFailed();
        expect(getStatus()).toBe(ReadyStatusEnum.Failed);
    });

    it('cannot change result after set ready once', () => {
        const { setReady, afterReady } = wait();
        setReady();
        setReady('another call');
        return expect(afterReady()).resolves.toBeUndefined();
    });

    it('can reset to pending status', () => {
        const { setReady, getStatus, reset } = wait();
        expect(getStatus()).toBe(ReadyStatusEnum.Pending);
        setReady();
        expect(getStatus()).toBe(ReadyStatus


 _, _ = env.step(action2, 3)
                    # P1(x,y),P2(x,y),
                    # 复原最佳的框，对速度没什么影响，但是不在主进程获取ROI
                    Best_ROI = (int((min_x_best + shape_x / 2) - (mediator_dict["width"] / 2)),
                                int(mediator_dict["height"]),
                                int(mediator_dict["width"]),
                                int(mediator_dict["low"] - mediator_dict["height"]))
                    # print(action2, 'better action')
                    share_var['Best'] = action
                    share_var['Better'] = action2
                    share_var['Best_ROI'] = Best_ROI
                except Exception:
                    print("No other situation")
        share_var['Reflect_img'] = env.map

def KFC_Thursday(stack, share_var):
    global tracker
    track_target_last = None
    update_counter = 0
    # 留下一个Track_flag,与下位机做交流
    Track_flag = True
    while True:
        Best_ROI_now = share_var["Best_ROI"]
        track_target_now = share_var["Best_target"]
        track_flag = share_var["Track_flag"]
        if len(stack) != 0:
            print(update_counter)
            Frame = stack.pop()
            if track_flag:
                update_counter += 1
                if track_target_now != track_target_last and update_counter < 50 and track_target_now:
                    track_target_last = track_target_now
                    tracker = cv2.TrackerKCF.create()
                    tracker.init(Frame, Best_ROI_now)
                    update_counter = 0
                    # 避免同时更新和初始化
                elif update_counter > 50 and track_target_last:
                    # 当锁定目标后，即只会更新KCF的瞄框，而不会更新KCF的状态
                    update_counter = 50
                    status, coord = tracker.update(Frame)
                    if status:
                        print("successfully locking")
                        mid_pos = (int(coord[0] + coord[2] / 2), int(coord[1] + coord[3] / 2))
                        p1 = (int(coord[0]), int(coord[1]))
                        p2 = (int(coord[0] + coord[2]), int(coord[1] + coord[3]))
                        share_var["Track_data"] = [mid_pos, p1, p2]
                elif update_counter > 100:
                    update_counter = 0
                    print("long time no see")
            else:
                print("No target")
                track_target_last = None
                update_counter = 0
                share_var["Track_data"] = [(0, 0), None, None]

def cap_capture(stack, stack2, source, top, top2) -> None:
    """
    :param top2: 缓冲栈容量
    :param stack2: Manager.list对象,作为第二通道的视频流
    :param source: 摄像头参数
    :param stack: Manager.list对象,作为第一通道的视频流
    :param top: 缓冲栈容量
    :return: None
    """
    global cap
    if len(source) < 2:
        for i in range(10):
            try:
                cap = cv2.VideoCapture(int(source))
            except Exception:
                pass
            if cap.isOpened():
                break
    else:
        cap = cv2.VideoCapture(source)
    while True:
        ret, Frame = cap.read()
        if ret:
            stack.append(Frame)
            stack2.append(Frame)
            if len(stack) >= top:
                del stack[:]
            if len(stack2) >= top2:
                del stack2[:]

class Track(object):
    # 继承plot的类,传入一个共享变量在并行处理的时候可以读取到BucketTime的各种信息
    def __init__(self):
        # todo 设立一个中介字典，存储并转换球，之后用一个聚类算法，将x作为聚类分为5簇，y则直接排序，并且当col到一定量的时候才会更新这个字典
        self.share_data = dict
        self.mediator_dict = {"col": deque(), "ball_deque_coord": deque(), "width": int(), "height": int(),
                              "low": int()}

    # 修改图像的对比度,coefficent>0, <1降低对比度,>1提升对比度 建议0-2
    def change_contrast(self, img, coefficent):
        imggray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
        m = cv2.mean(img)[0]
        graynew = m + coefficent * (imggray - m)
        img1 = np.zeros(img.shape, np.float32)
        k = np.divide(graynew, imggray, out=np.zeros_like(graynew), where=imggray != 0)
        img1[:, :, 0] = img[:, :, 0] * k
        img1[:, :, 1] = img[:, :, 1] * k
        img1[:, :, 2] = img[:, :, 2] * k
        img1[img1 > 255] = 255
        img1[img1 < 0] = 0
        return img1.astype(np.uint8)

    # 修改图像的亮度，brightness取值0～2 <1表示变暗 >1表示变亮
    def change_brightness(self, img, brightness):
        [averB, averG, averR] = np.array(cv2.mean(img))[:-1] / 3
        k = np.ones(img.shape)
        k[:, :, 0] *= averB
        k[:, :, 1] *= averG
        k[


Entropy_DifferentTimestamp_Inc1", []uint64{122, 123}, ulid.Monotonic(crand.Reader, 1)},
		{"WithoutEntropy", []uint64{123}, nil},
	} {
		tc := tc
		b.Run(tc.name, func(b *testing.B) {
			b.StopTimer()
			b.ResetTimer()
			b.StartTimer()
			for i := 0; i < b.N; i++ {
				f(tc.timestamps[i%len(tc.timestamps)], tc.entropy)
			}
		})
	}
}

func BenchmarkParse(b *testing.B) {
	const s = "0000XSNJG0MQJHBF4QX1EFD6Y3"
	b.SetBytes(int64(len(s)))
	for i := 0; i < b.N; i++ {
		_, _ = ulid.Parse(s)
	}
}

func BenchmarkParseStrict(b *testing.B) {
	const s = "0000XSNJG0MQJHBF4QX1EFD6Y3"
	b.SetBytes(int64(len(s)))
	for i := 0; i < b.N; i++ {
		_, _ = ulid.ParseStrict(s)
	}
}

func BenchmarkMustParse(b *testing.B) {
	const s = "0000XSNJG0MQJHBF4QX1EFD6Y3"
	b.SetBytes(int64(len(s)))
	for i := 0; i < b.N; i++ {
		_ = ulid.MustParse(s)
	}
}

func BenchmarkString(b *testing.B) {
	entropy := rand.New(rand.NewSource(timeutil.Now().UnixNano()))
	id := ulid.MustNew(123456, entropy)
	b.SetBytes(int64(len(id)))
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		_ = id.String()
	}
}

func BenchmarkMarshal(b *testing.B) {
	entropy := rand.New(rand.NewSource(timeutil.Now().UnixNano()))
	buf := make([]byte, ulid.EncodedSize)
	id := ulid.MustNew(123456, entropy)

	b.Run("Text", func(b *testing.B) {
		b.SetBytes(int64(len(id)))
		b.ResetTimer()
		for i := 0; i < b.N; i++ {
			_, _ = id.MarshalText()
		}
	})

	b.Run("TextTo", func(b *testing.B) {
		b.SetBytes(int64(len(id)))
		b.ResetTimer()
		for i := 0; i < b.N; i++ {
			_ = id.MarshalTextTo(buf)
		}
	})

	b.Run("Binary", func(b *testing.B) {
		b.SetBytes(int64(len(id)))
		b.ResetTimer()
		for i := 0; i < b.N; i++ {
			_, _ = id.MarshalBinary()
		}
	})

	b.Run("BinaryTo", func(b *testing.B) {
		b.SetBytes(int64(len(id)))
		b.ResetTimer()
		for i := 0; i < b.N; i++ {
			_ = id.MarshalBinaryTo(buf)
		}
	})
}

func BenchmarkUnmarshal(b *testing.B) {
	var id ulid.ULID
	s := "0000XSNJG0MQJHBF4QX1EFD6Y3"
	txt := []byte(s)
	bin, _ := ulid.MustParse(s).MarshalBinary()

	b.Run("Text", func(b *testing.B) {
		b.SetBytes(int64(len(txt)))
		b.ResetTimer()
		for i := 0; i < b.N; i++ {
			_ = id.UnmarshalText(txt)
		}
	})

	b.Run("Binary", func(b *testing.B) {
		b.Set


ngDetector.AssertXmlEncoded(input),
                Throws.ArgumentException);
        }

        [Test]
        public void AssertXmlEncoded_ValidInput_NoExceptionThrown()
        {
            // Arrange
            var input = "MSH.1>MSH.2>";

            // Arrange / Act / Assert
            Assert.That(
                () => EncodingDetector.AssertXmlEncoded(input),
                Throws.Nothing);
        }

        [TestCase("asd")]
        [TestCase("DoesNotStartWithMsh")]
        public void IsEr7Encoded_InvalidInput_ReturnsFalse(string input)
        {
            // Arrange / Act / Assert
            Assert.That(EncodingDetector.IsEr7Encoded(input), Is.False);
        }

        [Test]
        public void IsEr7Encoded_InvalidInput_ReturnsTrue()
        {
            // Arrange
            var input = "MSH|^~\\&|LABGL1||DMCRES||19951002185200||ADT^A01|LABGL1199510021852632|P|2.2\r"
                        + "PID|||T12345||TEST^PATIENT^P||19601002|M||||||||||123456\r"
                        + "PV1|||NER|||||||GSU||||||||E||||||||||||||||||||||||||19951002174900|19951006\r";

            // Act / Assert
            Assert.That(EncodingDetector.IsEr7Encoded(input), Is.True);
        }

        [TestCase("asd")]
        [TestCase("Anything")]
        [TestCase("asdsadsdasadasdasd")]
        [TestCase("MSH")]
        [TestCase("MSH|")]
        public void IsXmlEncoded_InvalidInput_ReturnsFalse(string input)
        {
            // Arrange / Act / Assert
            Assert.That(EncodingDetector.IsXmlEncoded(input), Is.False);
        }

        [Test]
        public void IsXmlEncoded_ValidInput_ReturnsTrue()
        {
            // Arrange
            var input = "MSH.1>MSH.2>";

            // Act / Assert
            Assert.That(EncodingDetector.IsXmlEncoded(input), Is.True);
        }
    }
}


import pandas as pd
import numpy as np
import pickle
import os

# load data and relevant features
all_df = pd.read_csv(csv_data_path)

input_cols = ['GENDER', 'Age at Tx', 'Type Limited Categories', 'SUM OF MM', 'Number of Tx', 'Mode of Dialysis',
				'Class I - AAMM', 'Class II - AAMM', 'Induction', 'CIT', 'ANY Pre Tx', 'Pre Spec C1', 'Pre Spec C2']

label = ['De Novo Ab']

df = all_df[input_cols + label]

# tidy data

# if no test done, assume no Ab present.
df['Pre Spec C1'].replace(np.nan, 0, inplace=True)
df['Pre Spec C2'].replace(np.nan, 0, inplace=True)

df.rename(columns={"GENDER": "Gender",
					"Type Limited Categories": "Donor Type",
					"SUM OF MM": "HLA MM",
					"Class I - AAMM": "AA MM - Class I",
					"Class II - AAMM": "AA MM - Class II",
				   	"PRE TX C1": "ANY PRE TX C1",
				   	"PRE TX C2": "ANY PRE TX C2",
				   	"Pre Spec C1": "Pre Spec C1 - count",
				   	"Pre Spec C2": "Pre Spec C2 - count"}, inplace=True)

no_pre_spec_df = df[df['ANY Pre Tx']==0]  # only get those with no pre spec

# drop Any pre tx, only used to get no pre spec dataset
df.drop(columns=["ANY Pre Tx"], inplace=True)
no_pre_spec_df.drop(columns=["ANY Pre Tx"], inplace=True)

# pickle
with open(os.path.join("data", "cleaned_df_with_missing.pickle"), 'wb') as handle:
	pickle.dump(df, handle, protocol=pickle.HIGHEST_PROTOCOL)

with open(os.path.join("data", "cleaned_df_with_missing_no_pre_spec.pickle"), 'wb') as handle:
	pickle.dump(no_pre_spec_df, handle, protocol=pickle.HIGHEST_PROTOCOL)


const val STARTER_BEAN_NAME_PREFIX = "honokaStarter"
    }

    @ConditionalOnProperty(
        prefix = "${MainProperties.PREFIX}.cors",
        name = ["enabled"],
        havingValue = "true"
    )
    @Bean
    fun corsFilter(): CorsFilter {
        val config = CorsConfiguration().apply {
            allowCredentials = true
            mainProperties.cors.run {
                addAllowedHeader(header)
                addAllowedMethod(method)
                origins.run {
                    if(isEmpty()) {
                        addAllowedOriginPattern("*")
                    } else {
                        forEach {
                            //必须以域名结尾，包含带端口和不带端口两种情况
                            addAllowedOriginPattern("*://*$it")
                            addAllowedOriginPattern("*://*$it:*")
                        }
                    }
                }
            }
        }
        val source = UrlBasedCorsConfigurationSource().apply {
            registerCorsConfiguration("/**", config)
        }
        return CorsFilter(source)
    }
}

@ConfigurationProperties(MainProperties.PREFIX)
class MainProperties(

    var cors: Cors = Cors()
) {

    companion object {

        const val PREFIX = "honoka.starter"
    }

    data class Cors(

        var enabled: Boolean = false,

        var origins: List<String> = listOf(),

        var header: String = "*",

        var method: String = "*"
    )
}
package de.honoka.sdk.util.android.database

import cn.hutool.core.util.ObjectUtil
import com.j256.ormlite.dao.Dao
import com.j256.ormlite.field.DatabaseField
import com.j256.ormlite.stmt.PreparedQuery
import com.j256.ormlite.stmt.QueryBuilder
import com.j256.ormlite.table.DatabaseTable
import de.honoka.sdk.util.kotlin.text.singleLine
import java.util.concurrent.ConcurrentHashMap
import kotlin.reflect.KClass
import kotlin.reflect.KMutableProperty1
import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.full.findAnnotation

@Suppress("MemberVisibilityCanBePrivate")
abstract class BaseDao<T : Any>(internal val entityClass: KClass<T>) {

    private val databaseHelper: DatabaseHelper

    val rawDao: Dao<T, Any>

    private val entityCache = ConcurrentHashMap<Any, T>()

    private val idProp: KMutableProperty1<T, *> = entityClass.run {
        declaredMemberProperties.first {
            it.findAnnotation<DatabaseField>()?.id ?: false
        } as KMutableProperty1<T, *>
    }

    init {
        databaseHelper = initDatabaseHelper()
        rawDao = databaseHelper.getDao(entityClass.java)
    }

    private fun initDatabaseHelper(): DatabaseHelper {
        val ormLiteTableAnnotation = entityClass.findAnnotation<DatabaseTable>()
        val tableAnnotation = entityClass.findAnnotation<Table>()
        if(ObjectUtil.hasNull(ormLiteTableAnnotation, tableAnnotation)) {
            val msg = """
                Class ${entityClass.qualifiedName} has no @DatabaseTable or @Table. |
                Both of them are required.
            """.singleLine()
            error(msg)
        }
        fun newHelper(): DatabaseHelper = DatabaseHelper(
            this, "${ormLiteTableAnnotation!!.tableName}.db",
            tableAnnotation!!.version
        )
        //先创建一个DatabaseHelper，然后手动触发数据库的初始化（创建数据库文件以及数据表）、升级或降级


       public override void Dispose()
            {
                _redisSocket.Dispose();
            }

            public override void Refersh(IRedisSocket redisSocket)
            {
            }
            public override IRedisSocket GetRedisSocket(CommandPacket cmd)
            {
                return DefaultRedisSocket.CreateTempProxy(_redisSocket, null);
            }
            public override TValue AdapterCall<TValue>(CommandPacket cmd, Func<RedisResult, TValue> parse)
            {
                return TopOwner.LogCall(cmd, () =>
                {
                    _redisSocket.Write(cmd);
                    var rt = _redisSocket.Read(cmd);
                    if (cmd._command == "QUIT") _redisSocket.ReleaseSocket();
                    return parse(rt);
                });
            }
#if isasync
            public override Task<TValue> AdapterCallAsync<TValue>(CommandPacket cmd, Func<RedisResult, TValue> parse)
            {
                return TopOwner.LogCallAsync(cmd, async () =>
                {
                    await _redisSocket.WriteAsync(cmd);
                    var rt = await _redisSocket.ReadAsync(cmd);
                    if (cmd._command == "QUIT") _redisSocket.ReleaseSocket();
                    return parse(rt);
                });
            }
#endif

        }
    }
}


= Double.parseDouble(duration);
                return Math.round(timestamp * 1000);
            } catch (NumberFormatException e) {
                // Ignore
            }
        }

        return -1;
    }

    @JsonIgnore
    private static long parseDurationTimestamp(String timeBase, Long durationTs) {
        if (notNullOrEmpty(timeBase) && durationTs != null) {
            try {
                String[] parts = timeBase.split("/");
                int numerator = Integer.parseInt(parts[0]);
                int denominator = Integer.parseInt(parts[1]);

                double seconds = (double)durationTs * numerator / denominator;
                long milliseconds = Math.round(seconds * 1000);

                return milliseconds;
            } catch (NumberFormatException e) {
                // Ignore
            }
        }

        return -1;
    }

    @JsonIgnore
    private static long parseFrameCount(String numberOfFrames) {
        if (notNullOrEmpty(numberOfFrames)) {
            try {
                return Long.parseLong(numberOfFrames);
            } catch (NumberFormatException e) {
                // Ignore
            }
        }

        return -1;
    }

}
/*
 * Copyright (C) 2025 hstr0100
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package net.brlns.gdownloader.updater;

import jakarta.annotation.PostConstruct;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.brlns.gdownloader.GDownloader;
import net.brlns.gdownloader.downloader.DownloadManager;
import net.brlns.gdownloader.event.EventDispatcher;
import net.brlns.gdownloader.event.impl.PerformUpdateCheckEvent;
import net.brlns.gdownloader.system.NetworkConnectivityListener;
import net.brlns.gdownloader.ui.message.Message;
import net.brlns.gdownloader.ui.message.MessageTypeEnum;
import net.brlns.gdownloader.ui.message.PopupMessenger;
import net.brlns.gdownloader.updater.git.*;
import net.brlns.gdownloader.util.NoFallbackAvailableException;

import static net.brlns.gdownloader.GDownloader.GLOBAL_THREAD_POOL;
import static net.brlns.gdownloader.GDownloader.handleException;

/**
 * @author Gabriel / hstr0100 / vertx010
 */
@Slf4j
public final class UpdateManager {

    @Getter
    private final List<IUpdater> updaters = new CopyOnWriteArrayList<>();

    private final GDownloader main;

    public UpdateManager(GDownloader mainIn) {
        main = mainIn;

        init();
    }

    @PostConstruct
    private void init() {
        registerUpdater(new SelfUpdater(main));
        registerUpdater(new SelfAppImageUpdater(main));
        registerUpdater(new SelfJarUpdater(main));

        registerUpdater(new YtDlpUpdater(main));
        registerUpdater(new GalleryDlUpdater(main));
        registerUpdater(new SpotDLUpdater(main));
        registerUpdater(new FFMpegUpdater(main));
    }

    public void registerUpdater(IUpdater updater) {
        updaters.add(updater);


<u8>
	// impl<T> [T]
	fn sort(&mut self)
	fn sort_by<F>(&mut self, compare: F)
	fn sort_by_key<K, F>(&mut self, f: F)
	fn sort_by_cached_key<K, F>(&mut self, f: F)
	fn to_vec(&self) -> Vec<T>
	fn into_vec(self: Box<[T]>) -> Vec<T>
	fn concat<Item>(&self) -> <[T] as Concat<Item>>::Output
	fn join<Separator>(&self, sep: Separator) -> <[T] as Join<Separator>>::Output

	// Module
	struct Chunks<'a, T>;
	struct ChunksExact<'a, T> {
		fn remainder(&self) -> &'a [T]
	}
	struct ChunksExactMut<'a, T> {
		fn into_remainder(self) -> &'a mut [T]
	}
	struct ChunksMut<'a, T>;
	struct Iter<'a, T> {
		fn as_slice(&self) -> &'a [T]
	}
	struct IterMut<'a, T> {
		fn into_slice(self) -> &'a mut [T]
	}
	struct RChunks<'a, T>;
	struct RChunksExact<'a, T> {
		fn remainder(&self) -> &'a [T]
	}
	struct RChunksExactMut<'a, T> {
		fn into_remainder(self) -> &'a mut [T]
	}
	struct RChunksMut<'a, T>;
	struct RSplit<'a, T, P>;
	struct RSplitMut<'a, T, P>;
	struct RSplitN<'a, T, P>;
	struct RSplitNMut<'a, T, P>;
	struct Split<'a, T, P>;
	struct SplitMut<'a, T, P>;
	struct SplitN<'a, T, P>;
	struct SplitNMut<'a, T, P>;
	struct Windows<'a, T>;
	trait SliceIndex<T>: Sealed {
		type Output: ?Sized
	}
	fn from_mut<T>(s: &mut T) -> &mut [T]
	unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T]
	unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a mut [T]
	fn from_ref<T>(s: &T) -> &[T]
}

mod std::str {
	// Primitive Type
	fn len(&self) -> usize
	fn is_empty(&self) -> bool
	fn is_char_boundary(&self, index: usize) -> bool
	fn as_bytes(&self) -> &[u8]
	unsafe fn as_bytes_mut(&mut self) -> &mut [u8]
	const fn as_ptr(&self) -> *const u8
	fn as_mut_ptr(&mut self) -> *mut u8
	fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<str>>::Output>
	fn get_mut<I>(&mut self, i: I) -> Option<&mut <I as SliceIndex<str>>::Output>
	unsafe fn get_unchecked<I>(&self, i: I) -> &<I as SliceIndex<str>>::Output
	unsafe fn get_unchecked_mut<I>(&mut self, i: I) -> &mut <I as SliceIndex<str>>::Output
	fn split_at(&self, mid: usize) -> (&str, &str)
	fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str)
	fn chars(&self) -> Chars
	fn char_indices(&self) -> CharIndices
	fn bytes(&self) -> Bytes
	fn split_whitespace(&self) -> SplitWhitespace


000000001000L, 0x8000000000000000L);
        actual = uuid.toString();
        assertEquals("00000000-0000-1000-8000-000000000000", actual);
    }

    /**
     * @tests serialization/deserialization.
     */
    public void testSerializationSelf() throws Exception {
        SerializationTest.verifySelf(new UUID(0xf81d4fae7dec11d0L,
                0xa76500a0c91e6bf6L));
    }

    /**
     * @tests serialization/deserialization compatibility with RI.
     */
    public void testSerializationCompatibility() throws Exception {
        SerializationTest.verifyGolden(this, new UUID(0xf81d4fae7dec11d0L,
                0xa76500a0c91e6bf6L));
    }

    /**
     * @see UUID#randomUUID()
     */
    public void test_randomUUID() {
        UUID uuid = UUID.randomUUID();
        assertEquals(2, uuid.variant());
        assertEquals(4, uuid.version());
    }

    /**
     * @see UUID#nameUUIDFromBytes(byte[])
     */
    public void test_nameUUIDFromBytes() throws Exception {
        byte[] name = { (byte) 0x6b, (byte) 0xa7, (byte) 0xb8, (byte) 0x11,
                (byte) 0x9d, (byte) 0xad, (byte) 0x11, (byte) 0xd1,
                (byte) 0x80, (byte) 0xb4, (byte) 0x00, (byte) 0xc0,
                (byte) 0x4f, (byte) 0xd4, (byte) 0x30, (byte) 0xc8 };

        UUID uuid = UUID.nameUUIDFromBytes(name);

        assertEquals(2, uuid.variant());
        assertEquals(3, uuid.version());

        assertEquals(0xaff565bc2f771745L, uuid.getLeastSignificantBits());
        assertEquals(0x14cdb9b4de013faaL, uuid.getMostSignificantBits());

        uuid = UUID.nameUUIDFromBytes(new byte[0]);
        assertEquals(2, uuid.variant());
        assertEquals(3, uuid.version());

        assertEquals(0xa9800998ecf8427eL, uuid.getLeastSignificantBits());
        assertEquals(0xd41d8cd98f003204L, uuid.getMostSignificantBits());

        try {
            UUID.nameUUIDFromBytes(null);
            fail("No NPE");
        } catch (NullPointerException e) {}
    }

    /**
     * @see UUID#fromString(String)
     */
    public void test_fromString() {
        UUID actual = UUID.fromString("f81d4fae-7dec-11d0-a765-00a0c91e6bf6");
        UUID expected = new UUID(0xf81d4fae7dec11d0L, 0xa76500a0c91e6bf6L);
        assertEquals(expected, actual);

        assertEquals(2, actual.variant());
        assertEquals(1, actual.version());
        assertEquals(130742845922168750L, actual.timestamp());
        assertEquals(10085, actual.clockSequence());
        assertEquals(690568981494L, actual.node());

        actual = UUID.fromString("00000000-0000-1000-8000-000000000000");
        expected = new UUID(0x0000000000001000L, 0x8000000000000000L);
        assertEquals(expected, actual);

        assertEquals(2, actual.variant());
        assertEquals(1, actual.version());
        assertEquals(0L, actual.timestamp());
        assertEquals(0, actual.clockSequence());
        assertEquals(0L, actual.node());

        try {
            UUID.fromString(null);
            fail("No NPE");
        } catch (NullPointerException e) {}

        try {
            UUID


ass_name: &str,
    property_name: &str,
    value: &UnresolvedRbxValue,
) -> Result<RbxValue, ValueResolveError> {
    match value {
        UnresolvedRbxValue::Concrete(concrete_value) => {
            // For now, we assume that concretely-specified values are of the
            // right type. Extra validation might be more appropriate for
            // another pass.

            Ok(concrete_value.clone())
        }
        UnresolvedRbxValue::Ambiguous(inferable_value) => {
            // If we don't have reflection information for this value, we'll
            // only accept a fully-qualified property.

            let property_type = find_property_type(class_name, property_name).ok_or_else(|| {
                let fully_qualified_name = format!("{}.{}", class_name, property_name);

                ValueResolveError::UnknownProperty(fully_qualified_name)
            })?;

            match inferable_value {
                AmbiguousRbxValue::String(string_value) => {
                    try_resolve_string(class_name, property_name, property_type, string_value)
                }
                AmbiguousRbxValue::Float1(x) => try_resolve_one_float(property_type, *x),
                AmbiguousRbxValue::Float2(x, y) => try_resolve_two_floats(property_type, (*x, *y)),
                AmbiguousRbxValue::Float3(x, y, z) => {
                    try_resolve_three_floats(property_type, (*x, *y, *z))
                }
            }
        }
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn find_inherited_property_types() {
        assert_eq!(
            find_property_type("Instance", "Name"),
            Some(RbxPropertyType::Data(RbxValueType::String))
        );
        assert_eq!(
            find_property_type("Part", "Name"),
            find_property_type("Instance", "Name")
        );
        assert_eq!(
            find_property_type("Part", "Position"),
            Some(RbxPropertyType::Data(RbxValueType::Vector3))
        );
    }

    #[test]
    fn resolve_concrete_known_property() {
        let concrete_value = RbxValue::String {
            value: String::from("Hey! Listen!"),
        };

        let untagged_value = UnresolvedRbxValue::Concrete(concrete_value.clone());

        assert_eq!(
            try_resolve_value("Instance", "Name", &untagged_value),
            Ok(concrete_value)
        );
    }

    #[test]
    fn resolve_concrete_unknown_class() {
        // Makes sure that a concretely-specified value works even if the class
        // name is unknown.

        let concrete_value = RbxValue::String {
            value: String::from("Hey! Listen!"),
        };

        let untagged_value = UnresolvedRbxValue::Concrete(concrete_value.clone());

        assert_eq!(
            try_resolve_value("Bogus Instance Name", "Blah", &untagged_value),
            Ok(concrete_value)
        );
    }

    #[test]
    fn resolve_concrete_unknown_property() {
        // Ensures that concretely-specified values resolve correctly even if
        // the property name is unknown.

        let concrete_value = RbxValue::String {
            value: String::from("Hey! Listen!"),
        };

        let untagged_value = UnresolvedRbxValue::Concrete(concrete_value.clone());

        assert_eq!(
            try_resolve_value("Instance", "Bogus Property Name", &untagged_value),
            Ok(concrete_value)


import pandas as pd
from src.constant import *

columns = ['Clinician_ID', 'INSTITUTION_LEVEL', 'GENDER', 'AGE', 'DEPARTMENT', 'YEARS_WORKED', 'CLASS_OF_POSITION',  'AREA_OF_EXPERTISE']

if __name__ == '__main__':

    df_doctor = pd.read_csv(root + 'data\\doctor\\doctor_info.csv',encoding='gbk')

    df = pd.DataFrame(columns=columns, dtype='object')
    for index,row in df_doctor.iterrows():
        log_id = row['doctor_logid']
        unit = row['institution_level']
        gender = row['gender']
        age = row['age']
        year = row['years_worked']
        depart = row['department']
        position = row['class_of_position']
        area = row['area_of_expertise']

        row_data = []
        row_data.append(log_id)
        row_data.append(unit)
        row_data.append(gender)
        row_data.append(age)
        row_data.append(depart)
        row_data.append(year)
        row_data.append(position)
        row_data.append(area)
        df.loc[len(df)] = row_data

    df.to_csv(root + '\\datasets\\Clinician_Info.csv', encoding='gbk', index=False)


ottom\"\u003E\u003Cspan style=\"color:#000000;font-family:'Times New Roman',sans-serif;font-size:10pt;font-weight:400;line-height:100%\"\u003E1,558\u00a0\u003C/span\u003E\u003C/td\u003E\u003Ctd style=\"background-color:#b6b6b6;border-bottom:1pt solid #000;border-top:1pt solid #000000;padding:2px 1pt 2px 0;text-align:right;vertical-align:bottom\"\u003E\u003C/td\u003E\u003C/tr\u003E\u003C/table\u003E"
  },
  "id3VybDovL2RvY3MudjEvZG9jOjJhM2VjODljNjUyMjQxYTE4MTVjZjdjODA0YzQzMzZmL3NlYzoyYTNlYzg5YzY1MjI0MWExODE1Y2Y3YzgwNGM0MzM2Zl83MC9mcmFnOjdhODg5ZWU5YzU2YzRlOWY5MDcxODQzNzE0YzMxMTQ0L3RhYmxlOjg2OGU0NjQ2M2E0MDQ0MmJhNDUyYTMxNmE5ZTZmODllL3RhYmxlcmFuZ2U6ODY4ZTQ2NDYzYTQwNDQyYmE0NTJhMzE2YTllNmY4OWVfMi0xLTEtMS02MDkxOA_b5d4464f-c987-4674-84dd-f86485709681": {
   "a": {
    "c": "us-gaap:Goodwill",
    "e": "e:0000021076",
    "u": "iso4217:USD",
    "us-gaap:StatementBusinessSegmentsAxis": "clx:HealthAndWellnessMember",
    "p": "2020-07-01"
   },
   "v": "857000000",
   "d": -6
  },
  "id3VybDovL2RvY3MudjEvZG9jOjJhM2VjODljNjUyMjQxYTE4MTVjZjdjODA0YzQzMzZmL3NlYzoyYTNlYzg5YzY1MjI0MWExODE1Y2Y3YzgwNGM0MzM2Zl83MC9mcmFnOjdhODg5ZWU5YzU2YzRlOWY5MDcxODQzNzE0YzMxMTQ0L3RhYmxlOjg2OGU0NjQ2M2E0MDQ0MmJhNDUyYTMxNmE5ZTZmODllL3RhYmxlcmFuZ2U6ODY4ZTQ2NDYzYTQwNDQyYmE0NTJhMzE2YTllNmY4OWVfMi0zLTEtMS02MDkxOA_de911294-1922-40a1-a187-eefa513385cb": {
   "a": {
    "c": "us-gaap:Goodwill",
    "e": "e:0000021076",
    "u": "iso4217:USD",
    "us-gaap:StatementBusinessSegmentsAxis": "clx:HouseholdMember",
    "p": "2020-07-01"
   },
   "v": "85000000",
   "d": -6
  },
  "id3VybDovL2RvY3MudjEvZG9jOjJhM2VjODljNjUyMjQxYTE4MTVjZjdjODA0YzQzMzZmL3NlYzoyYTNlYzg5YzY1MjI0MWExODE1Y2Y3YzgwNGM0MzM2Zl83MC9mcmFnOjdhODg5ZWU5YzU2YzRlOWY5MDcxODQzNzE0YzMxMTQ0L3RhYmxlOjg2OGU0NjQ2M2E0MDQ0MmJhNDUyYTMxNmE5ZTZmODllL3RhYmxlcmFuZ2U6ODY4ZTQ2NDYzYTQwNDQyYmE0NTJhMzE2YTllNmY4OWVfMi01LTEtMS02MDkxOA_2d647a4f-6689-4e0f-b40b-966d8fc22891": {
   "a": {
    "c": "us


    Bot.getInstance(s.toLong())
 *     }
 * }
 * ```
 *
 * Java 实现:
 * ```java
 * CommandArgumentContext context =
 *     new CommandArgumentContextBuilder()
 *         .add(clazz1, parser1)
 *         .add(String.class, new CommandArgumentParser<String>() {
 *              public String parse(String raw, CommandSender sender) {
 *                  // ...
 *              }
 *         })
 *         // 更多 add
 *         .build()
 * ```
 *
 * @see CommandArgumentContextBuilder
 * @see buildCommandArgumentContext
 */
@JvmSynthetic
public fun buildCommandArgumentContext(block: CommandArgumentContextBuilder.() -> Unit): CommandArgumentContext {
    contract {
        callsInPlace(block, EXACTLY_ONCE)
    }
    return CommandArgumentContextBuilder().apply(block).build()
}

/**
 * 参考 [buildCommandArgumentContext]
 */
public class CommandArgumentContextBuilder : MutableList<ParserPair<*>> by mutableListOf() {
    /**
     * 添加一个指令解析器.
     */
    @JvmName("add")
    public infix fun <T : Any> Class<T>.with(parser: CommandValueArgumentParser<T>): CommandArgumentContextBuilder =
        this.kotlin with parser

    /**
     * 添加一个指令解析器
     */
    @JvmName("add")
    public inline infix fun <T : Any> KClass<T>.with(parser: CommandValueArgumentParser<T>): CommandArgumentContextBuilder {
        add(ParserPair(this, parser))
        return this@CommandArgumentContextBuilder
    }

    /**
     * 添加一个指令解析器
     */
    @JvmSynthetic
    @LowPriorityInOverloadResolution
    public inline infix fun <T : Any> KClass<T>.with(
        crossinline parser: CommandValueArgumentParser<T>.(s: String, sender: CommandSender) -> T,
    ): CommandArgumentContextBuilder {
        add(ParserPair(this, object : CommandValueArgumentParser<T> {
            override fun parse(raw: String, sender: CommandSender): T = parser(raw, sender)
        }))
        return this@CommandArgumentContextBuilder
    }

    /**
     * 添加一个指令解析器
     */
    @JvmSynthetic
    public inline infix fun <T : Any> KClass<T>.with(
        crossinline parser: CommandValueArgumentParser<T>.(s: String) -> T,
    ): CommandArgumentContextBuilder {
        add(ParserPair(this, object : CommandValueArgumentParser<T> {
            override fun parse(raw: String, sender: CommandSender): T = parser(raw)
        }))
        return this@CommandArgumentContextBuilder
    }

    @JvmSynthetic
    public inline fun <reified T : Any> add(parser: CommandValueArgumentParser<T>): CommandArgumentContextBuilder {
        add(ParserPair(T::class, parser))
        return this@CommandArgumentContextBuilder
    }

    /**
     * 添加一个指令解析器
     */
    @ConsoleExperimentalApi
    @JvmSynthetic
    public inline infix fun <reified T : Any> add(
        crossinline parser: CommandValueArgumentParser<*>.(s: String) -> T,
    ): CommandArgumentContextBuilder = T::class with object : CommandValueArgumentParser<T> {
        override fun parse(raw: String, sender: CommandSender): T = parser(raw)
    }

    /**
     * 添加一个指令解析器
     */
    @ConsoleExperimentalApi
    @JvmSynthetic
    @LowPriorityInOverloadResolution
    public inline infix fun <reified T : Any> add(
        crossinline parser: CommandValueArgumentParser<*>.(s: String, sender: CommandSender) -> T,
    ): CommandArgumentContextBuilder = T::class with object : CommandValueArgumentParser<T> {
        override fun parse(raw: String, sender: CommandSender): T = parser(raw, sender)
    }

    /**
     * 完成构建, 得到 [CommandArgumentContext]


 1];
    dst_a[4] = src[4 * src_stride + 0];
    dst_b[4] = src[4 * src_stride + 1];
    dst_a[5] = src[5 * src_stride + 0];
    dst_b[5] = src[5 * src_stride + 1];
    dst_a[6] = src[6 * src_stride + 0];
    dst_b[6] = src[6 * src_stride + 1];
    dst_a[7] = src[7 * src_stride + 0];
    dst_b[7] = src[7 * src_stride + 1];
    src += 2;
    dst_a += dst_stride_a;
    dst_b += dst_stride_b;
  }
}

void TransposeWxH_C(const uint8* src, int src_stride,
                    uint8* dst, int dst_stride,
                    int width, int height) {
  int i;
  for (i = 0; i < width; ++i) {
    int j;
    for (j = 0; j < height; ++j) {
      dst[i * dst_stride + j] = src[j * src_stride + i];
    }
  }
}

void TransposeUVWxH_C(const uint8* src, int src_stride,
                      uint8* dst_a, int dst_stride_a,
                      uint8* dst_b, int dst_stride_b,
                      int width, int height) {
  int i;
  for (i = 0; i < width * 2; i += 2) {
    int j;
    for (j = 0; j < height; ++j) {
      dst_a[j + ((i >> 1) * dst_stride_a)] = src[i + (j * src_stride)];
      dst_b[j + ((i >> 1) * dst_stride_b)] = src[i + (j * src_stride) + 1];
    }
  }
}

#ifdef __cplusplus
}  // extern "C"
}  // namespace libyuv
#endif
#include "sand_simulation.h"
#include "elements/element.h"
#include "elements/all_elements.h"

#include <godot_cpp/variant/utility_functions.hpp>

using namespace godot;

// Faster versions of math functions for graphics

inline int fast_floor(double x) noexcept {
    return (int) x - (x < (int) x);
}

template<typename T>
inline T fast_cos(T x) noexcept {
    constexpr T tp = 1./(2.0 * 3.14159265);
    x *= tp;
    x -= T(.25) + fast_floor(x + T(.25));
    x *= T(16.) * (std::abs(x) - T(.5));
    return x;
}

SandSimulation::SandSimulation() {
    AllElements::fill_elements(&elements);
    for (int i = 0; i <= 4096; i++) {
        if (i > 167 && i < 2048) {
            continue;
        }
        elements[i]->my_sim = this;
        elements[i]->custom_id = i;
    }

    draw_data = PackedByteArray();
    draw_data.resize(width * height * 3);

    visited.resize(width * height);
    cells.resize(width * height);
    chunks.resize(chunk_width * chunk_height);
}

SandSimulation::~SandSimulation() {}

// Run the simulation `iterations` times
void SandSimulation::step(int iterations) {
    time += 0.001;
    for (int i = 0; i < iterations; i++) {
        for (int chunk = chunks.size() - 1; chunk >= 0; chunk--) {
            if (chunks[chunk] == 0) {
                continue;
            }
            for (int row = chunk_size - 1; row >= 0; row--) {
                for (int col = 0; col < chunk_size; col++) {
                    int r_row = (chunk / chunk_width) * chunk_size + row;
                    int r_col = (chunk % chunk_width) * chunk_size + col;
                    if (r_row >= height || r_col


 . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . f . . . . .
. . . . . . . . . f f . . . . .
. . . . . . . . . f 5 . . . . .
. . . . . . . . 5 5 5 . . . . .
. . . . . . . 5 5 5 5 . . . . .
. . . . . . 5 5 5 5 5 . . . . .
. . . . . 5 5 5 5 5 . . . . . .
. . . 5 5 5 5 5 5 5 . . . . . .
. . 5 5 5 5 5 5 5 . . . . . . .
. . . 5 5 5 5 . . . . . . . . .
. . . . . . . . . . . . . . . .
`, hero, 0, -100)
    projectile.setKind(SpriteKind.ball)
}
let projectile: Sprite = null
let projectile3: Sprite = null
let projectile2: Sprite = null
let hero: Sprite = null
hero2()
info.player2.setLife(40)
game.onUpdateInterval(400, function () {
    raindrop()
})
game.onUpdate(function () {
    if (game.runtime() == 60000) {
        game.over(true, effects.confetti)
    }
})
game.onUpdateInterval(1000, function () {
    score()
})
game.onUpdateInterval(2500, function () {
    cloud()
})
import * as setAliases from '@config/setAliases';
import * as sinon from 'sinon';

const { getPathByType, getTypeByEnv } = setAliases;
const sandbox = sinon.createSandbox();

beforeEach(async () => {
  sandbox.restore();
});

describe('Tests for setAliases functions', () => {
  describe('getTypeByEnv()', () => {
    describe('When env === "local"', () => {
      test('Should return "ts"', async () => {
        expect(getTypeByEnv('local')).toBe('ts');
      });
    });

    describe('When env !== "local"', () => {
      test('Should return "js"', async () => {
        expect(getTypeByEnv('develop')).toBe('js');
        expect(getTypeByEnv('homolog')).toBe('js');
        expect(getTypeByEnv('beta')).toBe('js');
        expect(getTypeByEnv('production')).toBe('js');
        expect(getTypeByEnv('')).toBe('js');
      });
    });
  });

  describe('getPathByType()', () => {
    describe('When type === "ts"', () => {
      test('Should return "src"', async () => {
        expect(getPathByType('ts')).toBe('src');
      });
    });

    describe('When type !== "js"', () => {
      test('Should return dist', async () => {
        expect(getPathByType('js')).toBe('dist');
      });
    });
  });

  describe('setAliases()', () => {
    test('Should call getPathByType()', async () => {
      const spy = jest.spyOn(setAliases, 'getPathByType');

      setAliases.setAliases();

      expect(spy).toHaveBeenCalledTimes(1);
    });

    test('Should call getTypeByEnv()', async () => {
      const spy = jest.spyOn(setAliases, 'getTypeByEnv');

      setAliases.setAliases();

      expect(spy).toHaveBeenCalledTimes(1);
    });
    test('Should call getTypeByEnv() with "process.env.NODE_ENV', async () => {
      const spy = jest.spyOn(setAliases, 'getTypeByEnv');

      sandbox.stub(process.env, 'NODE_ENV').value('develop');

      setAliases.setAliases();

      expect(spy).toHaveBeenCalledTimes(1);
      expect(spy).toHaveBe


85037/85039/7218846.html" target="_blank" rel="nofollow">这里”，为了避免五毛来抬杠，俺特意引用了中共喉舌“人民网”的链接）
　　后来的尼克松访华，也是基辛格促成的——当时他先在1971年秘密访华，为尼克松打前站。

★NSC-68 号文件——从“有限遏制”到“全面遏制”

　　NSC68 是以“国家安全委员会”（NSC）的名义发布的一份【综合战略报告】，负责起草该报告的是保罗·尼兹（Paul Nitze）。在马歇尔退休之后，新任国务卿艾奇逊任命此人接替乔治·凯南担任国务院 PPS（政策计划署）的主任。
　　该文件的出台标志着美国战略的一次调整（从“有限遏制”转向“全面遏制”）。

◇出台 NSC-68 的背景

　　导致该报告出台的因素有很多，但俺认为最要的因素是如下两个：
　　1. 1949年8月，苏联试验原子弹成功
　　这不但打破了美国的【核垄断】，而且对美国决策层造成很大刺激。在苏联试爆原子弹之前，美国情报界认为苏联至少要到50年代中期才能够搞出原子弹。苏联在核武方面进展如此神速，首先就极大刺激了美国军方。
　　2. 1949年，中国大陆沦陷
　　当时麦卡锡主义盛行，身为共和党的麦卡锡指责民主党的杜鲁门总统反共不力（麦卡锡甚至怀疑杜鲁门政府内部就有亲共的赤色分子）。所以杜鲁门急需发布一份立场强硬的、反共反苏的综合战略报告。

◇NSC-68 的要点

　　整个报告很长，限于篇幅，俺无法详述，只能简单聊聊其中的要点。
　　该报告把“美/苏”的对立上升到【意识形态】的高度，强调苏联的威胁是【全方位】的。报告认为：在掌握核武之后，苏联有可能【率先】发动对自由世界的军事打击。因此，美国对苏联的遏制必须提升为【全方位遏制】。
　　为了达到全面遏制，报告提出了如下几个目标：
1. 在自由世界的国家内部建立起


ID */
    public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";

	/**
	 * Set ContractLine UUID.
	 *
	 *
Type: String
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	public void setContractLine_UUID (java.lang.String ContractLine_UUID);

	/**
	 * Get ContractLine UUID.
	 *
	 *
Type: String
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	public java.lang.String getContractLine_UUID();

    /** Column definition for ContractLine_UUID */
    public static final org.adempiere.model.ModelColumn<I_PMM_QtyReport_Event, Object> COLUMN_ContractLine_UUID = new org.adempiere.model.ModelColumn<>(I_PMM_QtyReport_Event.class, "ContractLine_UUID", null);
    /** Column name ContractLine_UUID */
    public static final String COLUMNNAME_ContractLine_UUID = "ContractLine_UUID";

	/**
	 * Get Erstellt.
	 * Datum, an dem dieser Eintrag erstellt wurde
	 *
	 *
Type: DateTime
	 *
Mandatory: true
	 *
Virtual Column: false
	 */
	public java.sql.Timestamp getCreated();

    /** Column definition for Created */
    public static final org.adempiere.model.ModelColumn<I_PMM_QtyReport_Event, Object> COLUMN_Created = new org.adempiere.model.ModelColumn<>(I_PMM_QtyReport_Event.class, "Created", null);
    /** Column name Created */
    public static final String COLUMNNAME_Created = "Created";

	/**
	 * Get Erstellt durch.
	 * Nutzer, der diesen Eintrag erstellt hat
	 *
	 *
Type: Table
	 *
Mandatory: true
	 *
Virtual Column: false
	 */
	public int getCreatedBy();

    /** Column definition for CreatedBy */
    public static final org.adempiere.model.ModelColumn<I_PMM_QtyReport_Event, org.compiere.model.I_AD_User> COLUMN_CreatedBy = new org.adempiere.model.ModelColumn<>(I_PMM_QtyReport_Event.class, "CreatedBy", org.compiere.model.I_AD_User.class);
    /** Column name CreatedBy */
    public static final String COLUMNNAME_CreatedBy = "CreatedBy";

	/**
	 * Set Zugesagter Termin.
	 * Zugesagter Termin für diesen Auftrag
	 *
	 *
Type: Date
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	public void setDatePromised (java.sql.Timestamp DatePromised);

	/**
	 * Get Zugesagter Termin.
	 * Zugesagter Termin für diesen Auftrag
	 *
	 *
Type: Date
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	public java.sql.Timestamp getDatePromised();

    /** Column definition for DatePromised */
    public static final org.adempiere.model.ModelColumn<I_PMM_QtyReport_Event, Object> COLUMN_DatePromised = new org.adempiere.model.ModelColumn<>(I_PMM_QtyReport_Event.class, "DatePromised", null);
    /** Column name DatePromised */
    public static final String COLUMNNAME_DatePromised = "DatePromised";

	/**
	 * Set Fehlermeldung.
	 *
	 *
Type: Text
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	public void setErrorMsg (java.lang.String ErrorMsg);

	/**
	 * Get Fehlermeldung.
	 *
	 *
Type: Text
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	public java.lang.


USING_STD_MAX() ((void)0)
namespace boost { using std::min; using std::max; }
#endif

//  C++0x headers not yet implemented
//
#  define BOOST_NO_CXX11_HDR_ARRAY
#  define BOOST_NO_CXX11_HDR_CHRONO
#  define BOOST_NO_CXX11_HDR_CODECVT
#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
#  define BOOST_NO_CXX11_HDR_FUTURE
#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#  define BOOST_NO_CXX11_HDR_MUTEX
#  define BOOST_NO_CXX11_HDR_RANDOM
#  define BOOST_NO_CXX11_HDR_RATIO
#  define BOOST_NO_CXX11_HDR_REGEX
#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
#  define BOOST_NO_CXX11_HDR_THREAD
#  define BOOST_NO_CXX11_HDR_TUPLE
#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
#  define BOOST_NO_CXX11_HDR_TYPEINDEX
#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
#  define BOOST_NO_CXX11_NUMERIC_LIMITS
#  define BOOST_NO_CXX11_ALLOCATOR
#  define BOOST_NO_CXX11_POINTER_TRAITS
#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
#  define BOOST_NO_CXX11_SMART_PTR
#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
#  define BOOST_NO_CXX11_HDR_ATOMIC
#  define BOOST_NO_CXX11_STD_ALIGN
#  define BOOST_NO_CXX11_ADDRESSOF
#  define BOOST_NO_CXX11_HDR_EXCEPTION

#if defined(__has_include)
#if !__has_include(<shared_mutex>)
#  define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#elif __cplusplus < 201402
#  define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
#else
#  define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif

// C++14 features
#  define BOOST_NO_CXX14_STD_EXCHANGE

// C++17 features
#  define BOOST_NO_CXX17_STD_APPLY
#  define BOOST_NO_CXX17_STD_INVOKE
#  define BOOST_NO_CXX17_ITERATOR_TRAITS

#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef BOOST_CONTAINER_PMR_STABLE_VECTOR_HPP
#define BOOST_CONTAINER_PMR_STABLE_VECTOR_HPP

#if defined (_MSC_VER)
#  pragma once
#endif

#include <boost/container/stable_vector.hpp>
#include <boost/container/pmr/polymorphic_allocator.hpp>

namespace boost {
namespace container {
namespace pmr {

#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)

template <class T>
using stable_vector = boost::container::stable_vector<T, polymorphic_allocator<T>>;

#endif

//! A portable metafunction to obtain a stable_vector
//! that uses a polymorphic allocator
template<class T>
struct stable_vector_of
{


eykare](../resources/Bijankhan%20et%20al.%20-%202011%20-%20Lessons%20from%20building%20a%20Persian%20written%20corpus%20Pe.pdf)
## Language Modeling (LM)
- [Chain of Thought Prompting Elicits Reasoning in Large Language Models](../resources/Chain%20of%20Thought%20Prompting%20Elicits%20Reasoning%20in%20Large%20Language%20Models.pdf)
- [naab: A ready-to-use plug-and-play corpus for Farsi](../resources/naab%20A%20ready-to-use%20plug-and-play%20corpus%20for%20Farsi.pdf)
- [Diffusion-LM Improves Controllable Text Generation](../resources/Diffusion-LM%20Improves%20Controllable%20Text%20Generation.pdf)
- [Dont Stop Pretraining Adapt Language Models to Domains and Tasks](../resources/Dont%20Stop%20Pretraining%20Adapt%20Language%20Models%20to%20Domains%20and%20Tasks.pdf)
- [From English to Foreign Languages Transferring Pretrained Language Models](https://arxiv.org/pdf/2002.07306.pdf)
- [The Illustrated GPT-2 (Visualizing Transformer Language Models)](http://jalammar.github.io/illustrated-gpt2/)
- [How to generate text: using different decoding methods for language generation with Transformers](https://huggingface.co/blog/how-to-generate)

- [So retrieval is what we needed?](https://towardsai.net/p/l/so-retrieval-is-what-we-needed)
- [Improving language models by retrieving from trillions of tokens](../resources/Improving%20language%20models%20by%20retrieving%20from%20trillions%20of%20tokens.pdf)

- [GPT4all technical report](../resources/2023_GPT4All_Technical_Report.pdf)

- [Building LLM applications for production](https://huyenchip.com/2023/04/11/llm-engineering.html)
## Text To Speech (TTS)
- [طراحی و ضبط پایگاه دادگان گفتاری برای سیستم های تبدیل متن به گفتار فارسی](../resources/%D8%B7%D8%B1%D8%A7%D8%AD%DB%8C%20%D9%88%20%D8%B6%D8%A8%D8%B7%20%D9%BE%D8%A7%DB%8C%DA%AF%D8%A7%D9%87%20%D8%AF%D8%A7%D8%AF%DA%AF%D8%A7%D9%86%20%DA%AF%D9%81%D8%AA%D8%A7%D8%B1%DB%8C%20%D8%A8%D8%B1%D8%A7%DB%8C%20%D8%B3%DB%8C%D8%B3%D8%AA%D9%85%20%D9%87%D8%A7%DB%8C%20%D8%AA%D8%A8%D8%AF%DB%8C%D9%84%20%D9%85%D8%AA%D9%86%20%D8%A8%D9%87%20%DA%AF%D9%81%D8%AA%D8%A7%D8%B1%20%D9%81%D8%A7%D8%B1%D8%B3%DB%8C.pdf)
- [Guided-TTS A Diffusion Model for Text-to-Speech via Classifier Guidance](../resources/Guided-TTS%20A%20Diffusion%20Model%20for%20Text-to-Speech%20via%20Classifier%20Guidance.pdf)
- [A Survey on Neural Speech Synthesis](../resources/A%20Survey%20on%20Neural%20Speech%20Synthesis.pdf)
## Grapheme To Phoneme (G2P)
- [Multi-Module G2P Converter for Persian Focusing on Relations between Words](../resources/Multi-Module%20G2P%20Converter%20for%20Persian%20Focusing%20on%20Relations.pdf)
## Speech Recognition (ASR | STT)
- [Whisper Robust Speech Recognition via Large-Scale Weak Supervision](../resources/Wh


(Extend_FE) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\u0308\u003A", new String[] {});

    // ÷ 005F ÷ 002C ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\u002C", new String[] {});

    // ÷ 005F × 0308 ÷ 002C ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) × [4.0] COMBINING DIAERESIS
    // (Extend_FE) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\u0308\u002C", new String[] {});

    // ÷ 005F ÷ 002E ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] FULL STOP (MidNumLet) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\u002E", new String[] {});

    // ÷ 005F × 0308 ÷ 002E ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) × [4.0] COMBINING DIAERESIS
    // (Extend_FE) ÷ [999.0] FULL STOP (MidNumLet) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\u0308\u002E", new String[] {});

    // ÷ 005F × 0030 ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] DIGIT ZERO (Numeric) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\u0030", new String[] {"\u005F\u0030"});

    // ÷ 005F × 0308 × 0030 ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) × [4.0] COMBINING DIAERESIS
    // (Extend_FE) × [13.2] DIGIT ZERO (Numeric) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\u0308\u0030", new String[] {"\u005F\u0308\u0030"});

    // ÷ 005F × 005F ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) × [13.1] LOW LINE (ExtendNumLet) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\u005F", new String[] {});

    // ÷ 005F × 0308 × 005F ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) × [4.0] COMBINING DIAERESIS
    // (Extend_FE) × [13.1] LOW LINE (ExtendNumLet) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\u0308\u005F", new String[] {});

    // ÷ 005F ÷ 1F1E6 ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] REGIONAL INDICATOR SYMBOL
    // LETTER A (RI) ÷ [0.3]
    assertAnalyzesTo(analyzer, "\u005F\uD83C\uDDE6", new String[] {});

    // ÷ 005F × 0308 ÷ 1F1E6 ÷  #  ÷ [0.2] LOW LINE (ExtendNumLet) × [4.0] COMBINING DIAERESIS
    // (Extend_FE) ÷ [999.0] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3


	public void execute(Workbook workbook) {
        //Load template file from resource
        InputStream templateFile = this.getResourceStream("xlsx/Template_ImageTemplate.xlsx");
        workbook.open(templateFile);

        //#region Define custom classes
        //public class BikeInfo
        //{
        //    public String bikeType;
        //    public List<BikeSeries> bikeSeries;
        //}

        //public class BikeSeries
        //{
        //    public String name;
        //    public String description;
        //    public byte[] bikeImage;
        //    public List<Bike> items;
        //}

        //public class Bike
        //{
        //    public String productNo;
        //    public String productName;
        //    public String color;
        //    public int size;
        //    public double weight;
        //    public double dealer;
        //    public double listPrice;
        //}
        //#endregion

        ///#region Init Data
        byte[] image1 = null;
        byte[] image2 = null;
        byte[] image3 = null;
        byte[] image4 = null;
        byte[] image5 = null;
        byte[] image6 = null;
        byte[] image7 = null;
        byte[] image8 = null;
        byte[] image9 = null;
        try {
        	InputStream image1Stream = this.getResourceStream("image/Mountain-100.jpg");
        	image1 = IOUtils.toByteArray(image1Stream);
        	InputStream image2Stream = this.getResourceStream("image/Mountain-200.jpg");
        	image2 = IOUtils.toByteArray(image2Stream);
        	InputStream image3Stream = this.getResourceStream("image/Mountain-300.jpg");
        	image3 = IOUtils.toByteArray(image3Stream);
        	InputStream image4Stream = this.getResourceStream("image/Mountain-400-W.jpg");
        	image4 = IOUtils.toByteArray(image4Stream);
        	InputStream image5Stream = this.getResourceStream("image/Mountain-500.jpg");
        	image5 = IOUtils.toByteArray(image5Stream);
        	InputStream image6Stream = this.getResourceStream("image/Road-150.jpg");
        	image6 = IOUtils.toByteArray(image6Stream);
        	InputStream image7Stream = this.getResourceStream("image/Road-350-W.jpg");
        	image7 = IOUtils.toByteArray(image7Stream);
        	InputStream image8Stream = this.getResourceStream("image/Touring-1000.jpg");
        	image8 = IOUtils.toByteArray(image8Stream);
        	InputStream image9Stream = this.getResourceStream("image/Touring-2000.jpg");
        	image9 = IOUtils.toByteArray(image9Stream);
        }
        catch (IOException e) {
        	e.printStackTrace();
        }

        List<BikeInfo> datasource = new ArrayList<BikeInfo>();

        BikeInfo bike1 = new BikeInfo();
        datasource.add(bike1);
        bike1.bikeType = "Mountain Bikes";
        bike1.bikeSeries = new ArrayList<BikeSeries>();

        BikeSeries bs1 = new BikeSeries();
        bike1.bikeSeries.add(bs1);
        bs1.name = "Mountain-100";
        bs1.bikeImage = image1;
        bs1.description = "Top-of-the-line competition mountain bike. Performance-enhancing options include the innovative HL Frame, super-smooth front suspension, and traction for all terrain.";
        bs1.


A = base / "a"
    val fileB = base / "b"
    val fileC = base / "c"
    val fileD = base / "d"

    // Create files in a different order than the sorted order, so a file system that returns files
    // in creation-order or reverse-creation order won't pass by accident.
    fileD.writeUtf8("fileD")
    fileB.writeUtf8("fileB")
    fileC.writeUtf8("fileC")
    fileA.writeUtf8("fileA")

    val entries = fileSystem.list(base)
    assertEquals(entries, listOf(fileA, fileB, fileC, fileD))
  }

  @Test
  fun listNoSuchDirectory() {
    assertFailsWith<FileNotFoundException> {
      fileSystem.list(base / "no-such-directory")
    }
  }

  @Test
  fun listFile() {
    val target = base / "list"
    target.writeUtf8("hello, world!")
    val exception = assertFailsWith<IOException> {
      fileSystem.list(target)
    }
    assertTrue(exception !is FileNotFoundException)
  }

  @Test
  fun listOrNull() {
    val target = base / "list"
    target.writeUtf8("hello, world!")
    val entries = fileSystem.listOrNull(base)!!
    assertTrue(entries.toString()) { target in entries }
  }

  @Test
  fun listOrNullOnRelativePathReturnsRelativePaths() {
    // Make sure there's always at least one file so our assertion is useful.
    if (fileSystem.isFakeFileSystem) {
      val workingDirectory = "/directory".toPath()
      fileSystem.createDirectory(workingDirectory)
      fileSystem.workingDirectory = workingDirectory
      fileSystem.write("a.txt".toPath()) {
        writeUtf8("hello, world!")
      }
    } else if (isWrappingJimFileSystem) {
      fileSystem.write("a.txt".toPath()) {
        writeUtf8("hello, world!")
      }
    }

    val entries = fileSystem.listOrNull(".".toPath())
    assertTrue(entries.toString()) { entries!!.isNotEmpty() && entries.all { it.isRelative } }
  }

  @Test
  fun listOrNullResultsAreSorted() {
    val fileA = base / "a"
    val fileB = base / "b"
    val fileC = base / "c"
    val fileD = base / "d"

    // Create files in a different order than the sorted order, so a file system that returns files
    // in creation-order or reverse-creation order won't pass by accident.
    fileD.writeUtf8("fileD")
    fileB.writeUtf8("fileB")
    fileC.writeUtf8("fileC")
    fileA.writeUtf8("fileA")

    val entries = fileSystem.listOrNull(base)
    assertEquals(entries, listOf(fileA, fileB, fileC, fileD))
  }

  @Test
  fun listOrNullNoSuchDirectory() {
    assertNull(fileSystem.listOrNull(base / "no-such-directory"))
  }

  @Test
  fun listOrNullFile() {
    val target = base / "list"
    target.writeUtf8("hello, world!")
    assertNull(fileSystem.listOrNull(target))
  }

  @Test
  fun listRecursivelyReturnsEmpty() {
    val entries = fileSystem.listRecursively(base)
    assertEquals(entries.toList(), listOf())
  }

  @Test
  fun listRecursivelyReturnsSingleFile() {
    val baseA = base / "a"
    baseA.writeUtf8("a")
    val entries = fileSystem.listRecursively(base)
    assertEquals(entries.toList(), listOf(baseA))
  }

  @Test
  fun listRecursivelyRecurse


    expect( DC_map_in["E"]).to.equal( 3 );
    expect( DC_map_out["E"] ).to.equal( 0 );
    expect( DC_map_und["E"] ).to.equal( 2 );
    expect( DC_map_dir["E"] ).to.equal( 3 + 0 );
    expect( DC_map_all["E"] ).to.equal( 3 + 0 + 2 );
  });

  it('Single degree test on node F', () => {
    expect( DC_map_in["F"]).to.equal( 1 );
    expect( DC_map_out["F"] ).to.equal( 2 );
    expect( DC_map_und["F"] ).to.equal( 0 );
    expect( DC_map_dir["F"] ).to.equal( 1 + 2 );
    expect( DC_map_all["F"] ).to.equal( 1 + 2 + 0 );
  });

  it('Test default configuration',()=>{
    expect(DC_map_all).to.deep.equal(DC.getCentralityMap(graph,false,$DC.DegreeMode.all));
  });

});export const getFileFromCanvasBlob = ({
  canvas,
  name,
  type = "image/jpeg",
}: {
  canvas: HTMLCanvasElement;
  name: string;
  type?: string;
}) =>
  new Promise<File>((resolve) => {
    canvas.toBlob((blob) => {
      const file = new File([blob!], name, { type });
      resolve(file);
    }, type);
  });
import { AddBuffProcessing } from './../../tasks/add-buff';
import {
    Skill,
    Buff,
    EventCodes,
    EventRange,
    Battle,
    RealEventData,
    Reasons,
    EffectTypes,
    BattleProperties,
    Attack,
    Healing,
} from '../../';
import {SkillTarget} from "../../skill";
function buildKyoki(s: number, t: number): Buff {
    return Buff.build(s, t)
        .name('狂气', 4)
        .buff() // 增益
        .end()
}

export const shutendoji_skill1: Skill = {
    no: 1,
    name: '鬼葫芦',
    cost: 0,
    target:  SkillTarget.ENEMY,
    use: (battle: Battle, sourceId: number, selectedId: number) => {
        const buffs = battle.filterBuffByName(sourceId, '狂气');
        const selected = battle.getEntity(selectedId);

        for (let i = 0; i < (1 + buffs.length /* 增加鬼葫芦次数的普攻 */); i++) {
            battle.actionAttack(Attack.build(selectedId, sourceId).rate(1.25).shouldComputeCri().normalAttack().end());
        }
    }
}

export const shutendoji_skill2: Skill = {
    no: 2,
    name: '狂气',
    cost: 0,
    passive: true,
    handlers: [
        // 回合结束 50% 获得狂气
        {
            handle: (battle: Battle, data: any, step: number) => {
                if (data.skillOwnerId) {
                    const buffs = battle.filterBuffByName(data.skillOwnerId, '狂气');
                    if (buffs.length >= 4) return; // 写了不覆盖
                    const isHit = battle.testHit(0.5);
                    if (isHit) {
                        battle.actionAddBuff(buildKyoki(data.skillOwnerId, data.skillOwnerId), Reasons.SKILL)
                    }

                }
            }, // 执行
            code: EventCodes.TURN_END, // 触发事件
            range: EventRange.SELF, // 事件范围
            priority: 0, // 优先


umber()].cpuc_dtrace_illval = (uintptr_t)uaddr;
		return (0);
	}
	return (dtrace_fuword16_nocheck(uaddr));
}

uint32_t
dtrace_fuword32(void *uaddr)
{
	if ((uintptr_t)uaddr >= kernelbase) {
		DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
		cpu_core[cpu_number()].cpuc_dtrace_illval = (uintptr_t)uaddr;
		return (0);
	}
	return (dtrace_fuword32_nocheck(uaddr));
}

uint64_t
dtrace_fuword64(void *uaddr)
{
	if ((uintptr_t)uaddr >= kernelbase) {
		DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
		cpu_core[cpu_number()].cpuc_dtrace_illval = (uintptr_t)uaddr;
		return (0);
	}
	return (dtrace_fuword64_nocheck(uaddr));
}


02-.015-.031.159-.187.31-.38.477-.56 1.27-1.374 2.82-2.243 4.66-2.57 1.85-.325 3.612-.054 5.286.8a7.657 7.657 0 011.84 1.297c1.217 1.165 2.042 2.558 2.418 4.208a8.318 8.318 0 01-.105 4.127c-.019.074-.046.105-.131.105-2.516-.003-5.033-.004-7.552-.004-.027 0-.054 0-.105-.004 1.395-2.457 2.779-4.9 4.173-7.36h-.143c-1.003 0-2.01 0-3.014-.004a.146.146 0 00-.151.089c-.86 1.52-1.72 3.04-2.585 4.558-.987 1.732-1.972 3.466-2.956 5.202-.023.038-.047.085-.078.143zm12.643 1.898-1.441-1.468c2.642-3.269 2.534-7.822-.027-10.9.488-.494.98-.987 1.484-1.495 1.615 1.96 2.48 4.177 2.541 6.7.078 3.063-1.162 5.614-2.557 7.163z"/></svg>';
  static const String zec =
      '<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"><path fill="currentColor" fill-rule="evenodd" d="M16 32C7.163 32 0 24.837 0 16S7.163 0 16 0s16 7.163 16 16-7.163 16-16 16zm-.904-12.154a37.083 37.083 0 001.518-1.778 462.138 462.138 0 003.714-4.58c.387-.48.968-.958 1.065-1.505.194-1.026.065-2.12.065-3.248H17.55V6h-3.132v2.803h-3.585v3.35h6.039c-.55.65-1.033 1.197-1.518 1.779a462.137 462.137 0 00-3.714 4.58c-.355.48-.936.958-1.033 1.505-.194 1.026-.065 2.12-.065 3.214h3.876V26h3.261c-.064-.957-.097-1.846-.161-2.803h3.875v-3.35h-6.297z"/></svg>';
  static const String zel =
      '<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"><path fill="currentColor" d="M16 32C7.163 32 0 24.837 0 16S7.163 0 16 0s16 7.163 16 16-7.163 16-16 16zM5 15.615v4.847L9.495 23l4.494-2.538v-4.847l-4.494-2.538L5 15.615zm13.01 0v4.847L22.506 23 27 20.462v-4.847l-4.495-2.538-4.494 2.538zm-.472 4.21v-4.594l4.021-2.271v-1.73L15.961 8l-5.599 3.23v1.685l4.1 2.316v4.638l1.499.823 1.577-.866z"/></svg>';
  static const String zen =
      '<svg xmlns="http://www.w3.org/2000/


(auto&&) & {} };
struct B { void operator()(auto&&) && {} };

TTS_CASE("Check for_each SFINAE compliance")
{
  A a;
  B b;
  auto t = kumi::make_tuple(1,2);

  TTS_EXPECT_COMPILES(a, t, { kumi::for_each(a, t); } );
  TTS_EXPECT_NOT_COMPILES(b, t, { kumi::for_each(b, t); } );
};

TTS_CASE("Check for_each behavior")
{
  auto t = kumi::tuple {1, 2., 3.4f, '5'};
  kumi::for_each([](auto &m) { m++; }, t);

  TTS_EQUAL(get<0>(t), 2);
  TTS_EQUAL(get<1>(t), 3.);
  TTS_EQUAL(get<2>(t), 4.4f);
  TTS_EQUAL(get<3>(t), '6');

  kumi::for_each([](auto &m, auto n) { m *= n; }, t, t);

  TTS_EQUAL(get<0>(t), 4);
  TTS_EQUAL(get<1>(t), 9.);
  TTS_EQUAL(get<2>(t), 19.36f);
  TTS_EQUAL(get<3>(t), 'd');

  bool was_run = false;
  kumi::for_each([&]() { was_run = true; }, kumi::tuple{});
  TTS_EXPECT_NOT(was_run);
};

TTS_CASE("Check for_each constexpr behavior")
{
  constexpr auto t = []() {
    auto it = kumi::tuple {1, 2., 3.4f, '5'};
    kumi::for_each([](auto &m) { m++; }, it);
    return it;
  }();

  TTS_CONSTEXPR_EQUAL(get<0>(t), 2);
  TTS_CONSTEXPR_EQUAL(get<1>(t), 3.);
  TTS_CONSTEXPR_EQUAL(get<2>(t), 4.4f);
  TTS_CONSTEXPR_EQUAL(get<3>(t), '6');

  constexpr auto t2 = []() {
    auto it = kumi::tuple {1, 2., 3.4f, char(8)};
    kumi::for_each([](auto &m, auto n) { m *= n; }, it, it);
    return it;
  }();

  TTS_CONSTEXPR_EQUAL(get<0>(t2), 1);
  TTS_CONSTEXPR_EQUAL(get<1>(t2), 4.);
  TTS_CONSTEXPR_EQUAL(get<2>(t2), 11.56f);
  TTS_CONSTEXPR_EQUAL(get<3>(t2), '@');
};

TTS_CASE("Check for_each_index behavior")
{
  auto t = kumi::tuple {1, 2., 3.4f, '5'};
  kumi::for_each_index(
      [](auto i, auto &m) {
        if constexpr( i % 2 == 0 )
          m++;
        else
          m--;
      },
      t);

  TTS_EQUAL(get<0>(t), 2);
  TTS_EQUAL(get<1>(t), 1.);
  TTS_EQUAL(get<2>(t), 4.4f);
  TTS_EQUAL(get<3>(t), '4');

  kumi::for_each_index(
      [](auto i, auto &m, auto n) {
        if constexpr( i % 2 == 0 )
          m *= n;
        else
          m += n;
      },
      t, t);

  TTS_EQUAL(get<0>(t), 4);
  TTS_EQUAL(get<1>(t), 2.);
  TTS_EQUAL(get<2>(t), 19.36f);
  TTS_EQUAL(get<3>(t), 'h');
};

TTS_CASE("Check for_each_index constexpr behavior")
{
  constexpr auto t = []() {
    auto it = kumi::tuple {1, 2., 3.4f, '5'};
    kumi::for_each_index(
        [](auto i, auto &m) {
          if constexpr( i % 2 == 0 )
            m++;
          else
            m--;
        },
        it);
    return it;


                TPortioInspekulo.getText(), TSondage.getText(), TPortioDalam.getText(),
                            TBentuk.getText(), TCavumUteri.getText(), cmbMobilitas.getSelectedItem().toString(),
                            TUkuran.getText(), cmbNyeriTekan.getSelectedItem().toString(),
                            TAdnexaKanan.getText(), TAdnexaKiri.getText(), TCavumDouglas.getText()
                        })==true){
                            tabModeGinekologi.addRow(new Object[] {
                                false,TNoRw.getText(),TNoRM.getText(),TPasien.getText(),Valid.SetTgl(DTPTgl.getSelectedItem()+""),cmbJam.getSelectedItem()+":"+cmbMnt.getSelectedItem()+":"+cmbDtk.getSelectedItem(),
                                TInspeksi.getText(),TInspeksiVulva.getText(),TInspekuloGine.getText(),cmbFluxusGine.getSelectedItem().toString(),cmbFluorGine.getSelectedItem().toString(),TVulvaInspekulo.getText(),
                                TPortioInspekulo.getText(),TSondage.getText(),TPortioDalam.getText(),TBentuk.getText(),TCavumUteri.getText(),cmbMobilitas.getSelectedItem().toString(),TUkuran.getText(),
                                cmbNyeriTekan.getSelectedItem().toString(),TAdnexaKanan.getText(),TAdnexaKiri.getText(),TCavumDouglas.getText()
                            });
                            TInspeksi.setText("");TInspeksiVulva.setText("");TInspekuloGine.setText("");
                            cmbFluxusGine.setSelectedIndex(0);cmbFluorGine.setSelectedIndex(0); TVulvaInspekulo.setText("");
                            TPortioInspekulo.setText(""); TSondage.setText(""); TPortioDalam.setText("");
                            TBentuk.setText(""); TCavumUteri.setText(""); cmbMobilitas.setSelectedIndex(0);
                            TUkuran.setText(""); cmbNyeriTekan.setSelectedIndex(0);
                            TAdnexaKanan.setText(""); TAdnexaKiri.setText(""); TCavumDouglas.getText();
                            LCount.setText(""+tabModeGinekologi.getRowCount());
                    }
                } break;
            default:
                break;
        }
    }

    private void gantitindakandokter() {
        if(Sequel.cariRegistrasi(tbRawatDr.getValueAt(tbRawatDr.getSelectedRow(),1).toString())>0){
            JOptionPane.showMessageDialog(rootPane,"Data billing sudah terverifikasi, data tidak boleh diubah.\nSilahkan hubungi bagian kasir/keuangan ..!!");
            TCari.requestFocus();
        }else{
            Sequel.AutoComitFalse();
            sukses=true;
            if(Sequel.mengedittf("rawat_inap_dr","no_rawat='"+tbRawatDr.getValueAt(tbRawatDr.getSelectedRow(),1)+
                    "' and kd_jenis_prw='"+tbRawatDr.getValueAt(tbRawatDr.getSelectedRow(),10)+
                    "' and kd_dokter='"+tbRawatDr.getValueAt(tbRawatDr.getSelectedRow(),5)+
                    "' and tgl_perawatan='"+tbRawatDr.getValueAt(tbRawatDr.getSelectedRow(),7)+
                    "' and jam_rawat='"+tbRawatDr.getValueAt(tbRawatDr.getSelectedRow(),8)+"'",
                    "no_rawat='"+TNoRw.getText()+"',kd_jenis_prw='"+TKdPrw.getText()+
                    "',kd_dokter='"+KdDok.getText()+"',material='"+BagianRS.getText()+
                    "',bhp='"+Bhp.getText()+"',tarif_tindakandr='"+JmDokter.getText()+"',bi


paration-time,
  .node--type-recipe.node--view-mode-full .layout--oneplusfourgrid-section .field--name-field-cooking-time {
    margin-top: 0.96em;
  }

  .node--type-recipe.node--view-mode-full .layout--oneplusfourgrid-section .field--name-field-preparation-time .field__label,
  .node--type-recipe.node--view-mode-full .layout--oneplusfourgrid-section .field--name-field-cooking-time .field__label,
  .node--type-recipe.node--view-mode-full .layout--oneplusfourgrid-section .field--name-field-number-of-servings .field__label,
  .node--type-recipe.node--view-mode-full .layout--oneplusfourgrid-section .field--name-field-difficulty .field__label,
  .node--type-recipe.node--view-mode-full .layout--oneplusfourgrid-section .field--name-field-preparation-time .field__item,
  .node--type-recipe.node--view-mode-full .layout--oneplusfourgrid-section .field--name-field-cooking-time .field__item,
  .node--type-recipe.node--view-mode-full .layout--oneplusfourgrid-section .field--name-field-number-of-servings .field__item,
  .node--type-recipe.node--view-mode-full .layout--oneplusfourgrid-section .field--name-field-difficulty .field__item {
    width: 100%;
    padding-right: 0;
  }
}

.node--type-recipe.node--view-mode-full .field--name-field-preparation-time {
  background-image: url(../../../../images/svg/knife.svg);
}
.node--type-recipe.node--view-mode-full .field--name-field-cooking-time {
  background-image: url(../../../../images/svg/timer.svg);
}
.node--type-recipe.node--view-mode-full .field--name-field-number-of-servings {
  background-image: url(../../../../images/svg/serves.svg);
}
.node--type-recipe.node--view-mode-full .field--name-field-difficulty {
  background-image: url(../../../../images/svg/difficulty.svg);
}
/**
 * @file
 * Admin styles for the Database Logging module.
 */
.dblog-filter-form .form-item-type,
.dblog-filter-form .form-item-severity {
  display: inline-block;
  max-width: 30%;
  margin: 0.1em 0.9em 0.1em 0.1em; /* LTR */
}
[dir="rtl"] .dblog-filter-form .form-item-type,
[dir="rtl"] .dblog-filter-form .form-item-severity {
  margin: 0.1em 0.1em 0.1em 0.9em;
}
.dblog-filter-form .form-actions {
  display: inline-block;
  padding: 3ex 0 0;
  vertical-align: top;
}
.admin-dblog .icon,
.admin-dblog .dblog-warning .icon,
.admin-dblog .dblog-error .icon,
.admin-dblog .dblog-critical .icon,
.admin-dblog .dblog-alert .icon,
.admin-dblog .dblo


   paramsInfo = listOf(
        FilterParam(
            title = R.string.threshold,
            valueRange = 1f..255f,
            roundTo = 0
        ),
        FilterParam(
            title = R.string.gray_scale,
            valueRange = 0f..0f,
            roundTo = 0
        )
    )
), Filter.JarvisJudiceNinkeDithering/*
 * ImageToolbox is an image editor for android
 * Copyright (c) 2024 T8RIN (Malik Mukhametzyanov)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * You should have received a copy of the Apache License
 * along with this program.  If not, see <http://www.apache.org/licenses/LICENSE-2.0>.
 */

package com.t8rin.imagetoolbox.core.filters.presentation.model

import com.t8rin.imagetoolbox.core.domain.model.ImageModel
import com.t8rin.imagetoolbox.core.filters.domain.model.Filter
import com.t8rin.imagetoolbox.core.filters.domain.model.FilterParam
import com.t8rin.imagetoolbox.core.resources.R

class UiLUT512x512Filter(
    override val value: Pair<Float, ImageModel> = 1f to ImageModel(R.drawable.lookup)
) : UiFilter<Pair<Float, ImageModel>>(
    title = R.string.lut512x512,
    value = value,
    paramsInfo = listOf(
        FilterParam(
            title = R.string.strength,
            valueRange = 0f..1f,
            roundTo = 2
        ),
        FilterParam(
            title = R.string.target_lut_image,
            valueRange = 0f..0f,
            roundTo = 0
        )
    )
), Filter.LUT512x512/*
 * ImageToolbox is an image editor for android
 * Copyright (c) 2024 T8RIN (Malik Mukhametzyanov)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * You should have received a copy of the Apache License
 * along with this program.  If not, see <http://www.apache.org/licenses/LICENSE-2.0>.
 */

package com.t8rin.imagetoolbox.core.filters.presentation.model

import com.t8rin.imagetoolbox.core.filters.domain.model.Filter
import com.t8rin.imagetoolbox.core.filters.domain.model.FilterParam
import com.t8rin.imagetoolbox.core.filters.domain.model.params.ClaheParams
import com.t8rin.imagetoolbox.core.resources.R

class UiClaheJzazbzFilter(
    override val value: ClaheParams = ClaheParams.Default
) : UiFilter<ClaheParams>(
    title = R.string.clahe_jzazbz,
    paramsInfo = listOf(
        FilterParam(R.string.threshold, -10f..10f, 2),
        FilterParam(R.string.grid_size_x, 1f..100f, 0),
        FilterParam(R.string.grid_size_y, 1f..100f, 0),
        FilterParam(R.string.bins_count,


oudsilk.io/aff.php?aff=706

二、项目相关

--->合作咨询请联系作者<---

〔X-Panel面板〕项目地址

            <template #tab>

              其他资源
            </template>

一、常见的代理软件/工具

Windows系统v2rayN: https://github.com/2dust/v2rayN

安卓手机版【v2rayNG】: https://github.com/2dust/v2rayNG

苹果手机IOS【小火箭】: https://apple02.com/

苹果MacOS电脑【Clash Verge】: https://github.com/clash-verge-rev/clash-verge-rev/releases

二、“接码”网站

https://sms-activate.org/cn直接注册账号购买，可用于注册各种在线服务。

三、常用网站和群组

NodeSeek 论坛： https://www.nodeseek.com/

V2EX 论坛：： https://www.v2ex.com/

搬瓦工 TG 群：： https://t.me/BWHOfficial

Xray 官方群：： https://t.me/projectXray

Dmit 交流群：： https://t.me/DmitChat

白丝云用户群：： https://t.me/+VHZLKELTQyzPNgOV

Na


)$/g, '')
        .split('-')
    let keys = arr.reduce((acc, value) => {
        if (value) acc.push(value)
        return acc
    }, [])
    let value
    switch (keys.length) {
        case 2:
            value = CSS[keys[0]][keys[1]]
            break
        case 3:
            value = CSS[keys[0]][keys[1]][keys[2]]
            break
        case 4:
            value = CSS[keys[0]][keys[1]][keys[2]][keys[3]]
            break
        default:
            throw Error('Not implemented')
    }
    if (!value) throw Error('Value was not found')
    return value
}
import {
    hierarchy as d3Hierarchy,
    pack as d3Pack,
    range as d3Range,
    scaleOrdinal as d3ScaleOrdinal,
    select as d3Select,
} from "d3";
import { HierarchyCircularNode } from "d3-hierarchy";
import Logger from "@shared/Logger"
import { getRandomNumberBetween, isBlank } from "@shared/util/StringUtil";
import { InsightWord } from "@shared/api/InsightLanguageTypes";

const logger = new Logger("wordBubbles");

export interface WordBubbleConfig {
    maxDiameter: number;
    colorRange: string[];
    selectable: boolean,
    selectedFillColor: string,
    hoverFillColor?: string | undefined,
    numFillerBubbles: number,
    wordClicked?: (word: InsightWord, selected: boolean,) => void,
}

export const DEFAULT_WORD_BUBBLE_CONFIG = (): WordBubbleConfig => {
    return {
        maxDiameter: 375,
        selectable: false,
        selectedFillColor: "#33CCAB",
        numFillerBubbles: 11,
        // hoverFillColor: "#00cee5",
        colorRange: [
            "#47445E",
            "#5E5A7C",
            "#9490B0",
            "#D3D1E3",
            "#D3D1E3",
        ],
    };
}

/**
 *
 * @param {number} count - number of bubbles to create
 * @param {number} [min=0.1] - minimum value to use for generating a random frequency/salience (both will be random)
 * @param {number} [max=0.5] - maximum value to use for generating a random frequency/salience (both will be random)
 * @return {InsightWord[]}
 */
const createExtraBubbles = (count: number, min: number = 0.1, max: number = 1): InsightWord[] => {
    const words: InsightWord[] = []
    for (let i = 0; i < count; i++) {
        const frequency = getRandomNumberBetween(min, max, 1);
        // const salience = getRandomNumberBetween(min, max, 1);
        words.push({ word: "", frequency });
    }
    return words;
}

interface BubbleData extends InsightWord {
    selected?: boolean;
    originalValue: number;
}

type Datum = { children: BubbleData[] };
type BubbleNode = Datum | BubbleData;

function isBubbleData(d: BubbleNode): d is BubbleData {
    return !(d as Datum).children && (d as BubbleData).word !== undefined
}

export function drawWordBubbleChart(parentSelector: string, words: InsightWord[], options?: Partial<WordBubbleConfig>) {
    const config: WordBubbleConfig = Object.assign(DEFAULT_WORD_BUBBLE_CONFIG(), options);
    const { maxDiameter, colorRange, selectable } = config;
    const color = d3ScaleOrdinal<number, string>().range(colorRange.reverse()).domain(d3Range(0, colorRange.length));

    const bubble = d3Pack()
    .size([maxDiameter, maxDiameter]) //[width, height]
    .padding(20);

    const parent = d3Select(parentSelector);
    //reset any existing graphics
    parent.select("svg").remove().remove();

    const svg = d3Select(".bubble-chart")
    .append("svg")
    .attr("width", "100%")
    .attr("height", "100%")
    .attr("preserveAspectRatio", "xMinYMid")
    .attr("viewBox", "0 0 375 375")
    .style("display", "block");

    const extras = createExtraBubbles(config.numFillerBub


=lint
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'get_project_events_body.dart';

// **************************************************************************
// BuiltValueGenerator
// **************************************************************************

class _$GetProjectEventsBody extends GetProjectEventsBody {
  @override
  final String? eventName;
  @override
  final BuiltList<AttributeFilter>? filters;
  @override
  final DateTime from;
  @override
  final int? pageSize;
  @override
  final String? pageToken;
  @override
  final DateTime to;

  factory _$GetProjectEventsBody(
          [void Function(GetProjectEventsBodyBuilder)? updates]) =>
      (new GetProjectEventsBodyBuilder()..update(updates))._build();

  _$GetProjectEventsBody._(
      {this.eventName,
      this.filters,
      required this.from,
      this.pageSize,
      this.pageToken,
      required this.to})
      : super._() {
    BuiltValueNullFieldError.checkNotNull(
        from, r'GetProjectEventsBody', 'from');
    BuiltValueNullFieldError.checkNotNull(to, r'GetProjectEventsBody', 'to');
  }

  @override
  GetProjectEventsBody rebuild(
          void Function(GetProjectEventsBodyBuilder) updates) =>
      (toBuilder()..update(updates)).build();

  @override
  GetProjectEventsBodyBuilder toBuilder() =>
      new GetProjectEventsBodyBuilder()..replace(this);

  @override
  bool operator ==(Object other) {
    if (identical(other, this)) return true;
    return other is GetProjectEventsBody &&
        eventName == other.eventName &&
        filters == other.filters &&
        from == other.from &&
        pageSize == other.pageSize &&
        pageToken == other.pageToken &&
        to == other.to;
  }

  @override
  int get hashCode {
    var _$hash = 0;
    _$hash = $jc(_$hash, eventName.hashCode);
    _$hash = $jc(_$hash, filters.hashCode);
    _$hash = $jc(_$hash, from.hashCode);
    _$hash = $jc(_$hash, pageSize.hashCode);
    _$hash = $jc(_$hash, pageToken.hashCode);
    _$hash = $jc(_$hash, to.hashCode);
    _$hash = $jf(_$hash);
    return _$hash;
  }

  @override
  String toString() {
    return (newBuiltValueToStringHelper(r'GetProjectEventsBody')
          ..add('eventName', eventName)
          ..add('filters', filters)
          ..add('from', from)
          ..add('pageSize', pageSize)
          ..add('pageToken', pageToken)
          ..add('to', to))
        .toString();
  }
}

class GetProjectEventsBodyBuilder
    implements Builder<GetProjectEventsBody, GetProjectEventsBodyBuilder> {
  _$GetProjectEventsBody? _$v;

  String? _eventName;
  String? get eventName => _$this._eventName;
  set eventName(String? eventName) => _$this._eventName = eventName;

  ListBuilder<AttributeFilter>? _filters;
  ListBuilder<AttributeFilter> get filters =>
      _$this._filters ??= new ListBuilder<AttributeFilter>();
  set filters(ListBuilder<AttributeFilter>? filters) =>
      _$this._filters = filters;

  DateTime? _from;
  DateTime? get from => _$this._from;
  set from(DateTime? from) => _$this._from = from;

  int? _pageSize;
  int? get pageSize => _$this._pageSize;
  set pageSize(int? pageSize) => _$this._pageSize = pageSize;

  String? _pageToken;
  String? get pageToken => _$this._pageToken;
  set pageToken(String? pageToken) => _$this._pageToken = pageToken;

  DateTime? _to;
  DateTime? get to => _$this._to;
  set to(DateTime? to) => _$this._to = to;

  GetProjectEventsBodyBuilder() {
    G


gAAAAASUVORK5CYII=)}select[multiple],select.form-control[multiple]{background:none}.custom-control{min-height:1.5rem}.custom-control-label::before{top:0;border:2px solid #ced4da}.custom-control-label::after{top:0}.custom-control-input:checked ~ .custom-control-label::before{border-color:#2196F3}.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after{-webkit-transform:scale(1.5);transform:scale(1.5)}.custom-radio .custom-control-input:checked ~ .custom-control-label::before{background:#fff}.custom-radio .custom-control-input:checked ~ .custom-control-label::after{-webkit-transform:scale(1.125);transform:scale(1.125);-webkit-transition:240ms;transition:240ms}.custom-radio .custom-control-input ~ .custom-control-label::after{-webkit-transform:scale(0.75);transform:scale(0.75)}.custom-switch .custom-control-label::before{top:0.125rem;height:0.875rem;background:#bbb;border:none}.custom-switch .custom-control-input:disabled ~ .custom-control-label{opacity:0.7}.custom-switch .custom-control-input:disabled ~ .custom-control-label::before{background:#bbb}.custom-switch .custom-control-label::after{background-color:#fff;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.3);box-shadow:0 1px 4px rgba(0,0,0,0.3)}.custom-switch .custom-control-input:checked ~ .custom-control-label::before{opacity:0.38}.custom-switch .custom-control-input:checked ~ .custom-control-label::after{background-color:#2196F3}.custom-switch .custom-control-input:hover:not(:disabled) ~ .custom-control-label::after{-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(0,0,0,0.05);box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(0,0,0,0.05)}.custom-switch .custom-control-input:focus:not(:disabled) ~ .custom-control-label::after{-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(0,0,0,0.09);box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(0,0,0,0.09)}.custom-switch .custom-control-input:active:not(:disabled) ~ .custom-control-label::after{-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(0,0,0,0.16);box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(0,0,0,0.16)}.custom-switch .custom-control-input:hover:checked:not(:disabled) ~ .custom-control-label::after{-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(33,150,243,0.05);box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(33,150,243,0.05)}.custom-switch .custom-control-input:focus:checked:not(:disabled) ~ .custom-control-label::after{-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(33,150,243,0.09);box-shadow:0 1px 4px rgba(0,0,0,0.3),0 0 0 9px rgba(33,150,243,0.09)}.custom-switch .custom-control-input:active:checked:not(:disabled) ~ .custom-control-label::after{-webkit-box-shadow:0 1px 4px


 be used as an account storage. */
interface Storage {
  /** Sets the account password.*/
  setPassword: (encryptionKey: Uint8Array) => Promise<void>;

  /** Write any unsaved changes to disk.*/
  flushChanges: () => Promise<void>;

  /** Creates a new keypair at the specified `location`,
   * and returns its public key as a base58 string.*/
  keyNew: (did: DID, keyLocation: KeyLocation) => Promise<string>;

  /** Inserts a private key, encoded as a base58 string, at the specified `location`,
   * and returns its public key as a base58 string.*/
  keyInsert: (did: DID, keyLocation: KeyLocation, privateKey: string) => Promise<string>;

  /** Returns `true` if a keypair exists at the specified `location`.*/
  keyExists: (did: DID, keyLocation: KeyLocation) => Promise<boolean>;

  /** Retrieves the public key, encoded as a base58 string, from the specified `location`.*/
  keyGet: (did: DID, keyLocation: KeyLocation) => Promise<string>;

  /** Deletes the keypair specified by the given `location`. Nothing happens if the key is not found.*/
  keyDel: (did: DID, keyLocation: KeyLocation) => Promise<void>;

  /** Signs `data` with the private key at the specified `location`.*/
  keySign: (did: DID, keyLocation: KeyLocation, data: Uint8Array) => Promise<Signature>;

  /** Returns the chain state of the identity specified by `did`.*/
  chainState: (did: DID) => Promise<ChainState | undefined | null>;

  /** Set the chain state of the identity specified by `did`.*/
  setChainState: (did: DID, chainState: ChainState) => Promise<void>;

  /** Returns the state of the identity specified by `did`.*/
  state: (did: DID) => Promise<IdentityState | undefined | null>;

  /** Sets a new state for the identity specified by `did`.*/
  setState: (did: DID, identityState: IdentityState) => Promise<void>;

  /** Removes the keys and any state for the identity specified by `did`.*/
  purge: (did: DID) => Promise<void>;
}"#;

// from https://github.com/rustwasm/wasm-bindgen/issues/2231#issuecomment-656293288
#[allow(dead_code)]
pub fn downcast_js_value<T: FromWasmAbi<Abi = u32>>(js_value: JsValue, classname: &str) -> Result<T, AccountError> {
  let constructor_name: js_sys::JsString = Object::get_prototype_of(&js_value).constructor().name();
  if constructor_name == classname {
    let ptr: JsValue = Reflect::get(&js_value, &JsValue::from_str("ptr"))
      .map_err(|_| AccountError::JsError("unable to retrieve `ptr` property".to_string()))?;
    let ptr_u32: u32 = ptr
      .as_f64()
      .ok_or_else(|| AccountError::JsError("unable to read `ptr` property of `JsValue` as f64".to_string()))?
      as u32;
    unsafe { Ok(T::from_abi(ptr_u32)) }
  } else {
    Err(AccountError::SerializationError(format!(
      "Expected: {} - Found: {}",
      classname, constructor_name
    )))
  }
}
use crate::format::Formatter;
use crate::ml_decl::MLDecl;
use crate::ml_node::MLNode;
use std::fmt;
use std::fmt::Write;

#[derive(Debug, Eq, PartialEq, Clone)]
pub struct MLFile {
    pub name: String,
    pub body: Vec<MLDecl>,
}

impl ToString for MLFile {
    fn to_string(&self) -> String {
        let mut buf = String::new();
        let mut formatter = Formatter::new(&mut buf);
        let _ = self.fmt(&mut for


nd:transparent url("../../../../../index.php?entryPoint=getImage&imageName=layout_sprite.png") no-repeat 0 -5px}.yui-layout-unit .yui-resize-handle-t .yui-layout-resize-knob,.yui-layout-unit .yui-resize-handle-b .yui-layout-resize-knob{position:absolute;height:6px;width:16px;left:45%;background:transparent url("../../../../../index.php?entryPoint=getImage&imageName=layout_sprite.png") no-repeat -20px 0}.yui-log{font-family:monospace;font-size:77%;background-color:#D9EDF7;color:#31708F;padding:1em;border:1px solid #bce8f1;text-align:left;width:31em;z-index:9000}.yui-log-container{position:absolute;top:1em;right:1em}.yui-log input{font-family:"Lato", Lato, Arial, sans-serif;font-size:100%;font-weight:normal;padding:0;margin:0}.yui-log .yui-log-btns{position:relative;bottom:0.25em;float:right}.yui-log .yui-log-hd{background-color:#575757;padding:0.5em;margin-top:1em}.yui-log .yui-log-hd h4{font-size:108%;font-weight:bold;color:#31708F;padding:0;margin:0}.yui-log .yui-log-bd{background-color:#D9EDF7;border:1px solid #bce8f1;overflow:auto;width:100%;height:20em}.yui-log p{padding:0.1em;margin:1px}.yui-log pre{padding:0;margin:0}.yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.yui-log .yui-log-ft{margin-top:0.5em}.yui-log .yui-log-ft .yui-log-sourcefilters{padding-top:0.75em;margin-top:0.75em;border-top:1px solid #575757;width:100%}.yui-log .yui-log-filtergrp{margin-right:0.5em}.yui-log .info{background-color:#76C1B7}.yui-log .warn{background-color:#E6D5A5}.yui-log .error{background-color:#378CBE}.yui-log .time{background-color:#3C763D}.yui-log .window{background-color:#FFFFFF}.yuimenu{top:-999em;left:-999em}.yuimenubar{position:static}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute}.yuimenubar li,.yuimenu li{list-style-type:none}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;background-color:#FFFFFF}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap}.yuimenubar ul{zoom:1}.yuimenubar .yuimenu ul{zoom:normal}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;line-height:0;height:0;visibility:hidden}.yuimenubaritem{float:left}.yuimenubaritemlabel,.yuimenuitemlabel{display:block}.yuimenuitemlabel .helptext{display:block;font-style:normal;margin:-1em 0 0 10em}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1}.yui-menu-shadow-visible{top:2px;bottom:-3px;left:-3px;right:-3px;visibility:visible}.hide-scrollbars *{overflow:hidden}.hide-scrollbars select{display:none}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible}.