[] | boolean => {
	const orderInputList = input.split(/; /);

	let invalidOrder = false;

	const orders = orderInputList.map(rawOrder => {
		const reg = new RegExp(getInputRegex());
		const parsedOrder = rawOrder.match(reg);

		if (!parsedOrder) {
			invalidOrder = true;
			return null;
		}

		const [,type,size,number] = parsedOrder;

		const order: Order = {
			type: DishType[type],
			size: DishSize[size],
			number: parseInt(number)
		};

		return order;
	});

	if (invalidOrder) return false;
	kitchenFactory.addOrders(orders);
	return orders;
});

function askInput(question: string): Promise<string> {
	const rl = readline.createInterface({
		input: process.stdin,
		output: process.stdout
	});

	return new Promise<string>(resolve =>
		rl.question(question, res => {
			rl.close();
			res = res ? res : "toto";
			resolve(res);
		})
	);
}

function getInputRegex(): string {
	const dishType = Object.keys(DishType).filter(k => typeof DishType[k as any] === "number").join("|");
	const dishSize = Object.keys(DishSize).filter(k => typeof DishSize[k as any] === "number").join("|");
	return `^(${dishType})\\s(${dishSize})\\sx([1-9][0-9]*)$`;
}import express, { Request, Response, NextFunction, Router } from "express";
import Stores from "../schemas/store";

const storeRouter = express.Router();

//가게 전부 가져오기 (query값 입력하지 않으면 됨)
// 정해진 카테고리에 맞는 가게 전부 가져오기
storeRouter.get("/", async (req, res) => {
  const { category, sort } = req.query;
  try {
    let stores;
    if (sort) {
      stores = await Stores.find({ category: category }).sort(`-${sort}`).exec();
    } else {
      stores = await Stores.find({ category: category }).exec();
    }

    res.status(200).json({
      message: "success",
      stores
    });
  } catch (err) {
    res.status(400).json({
      message: "fail",
      err: err,
    });
  }
});

storeRouter.get("/one/:storeId", async (req, res) => {
  const storeId:String = String(req.params.storeId);

  try {
    const store = await Stores.findOne({ _id: storeId });

    res.json({ message: "success", store });
  } catch (err) {
    res.json({ message: "fail", err });
  }
});

// pagenation
storeRouter.get("/all/:pageNo", async (req, res) => {
  const pageNo = Number(req.params.pageNo);
  const stores = await Stores.find({});
  const stores_page: Array<object> = [];

  if (pageNo * 10 >= stores.length || pageNo < 0) {
    res.json({ message: "fail" });

    return;
  }

  for (let i: number = pageNo * 10; i < pageNo * 10 + 10; i++) {
    stores_page.push(stores[i]);
  }

  res.json({ message: "success", stores: stores_page });
});

// 검색기능
storeRouter.get("/search", async (req, res) => {
  const keyword:String = String(req.query.q);

  try {
    let searchList = [];
    const allStore = await Stores.find({});

    for (let i = 0; i < allStore.length; i++) {
      const storeName = allStore[i].name;

      if (storeName.includes(keyword)) {
        searchList.push(allStore[i]);
      }
    }


00000-11100000-00100000
// CHECK-INST: bfcvtn  z0.h, { z0.s, z1.s }
// CHECK-ENCODING: [0x20,0xe0,0x60,0xc1]
// CHECK-ERROR: instruction requires: sme2
// CHECK-UNKNOWN: c160e020 <unknown>

bfcvtn  z21.h, {z10.s, z11.s}  // 11000001-01100000-11100001-01110101
// CHECK-INST: bfcvtn  z21.h, { z10.s, z11.s }
// CHECK-ENCODING: [0x75,0xe1,0x60,0xc1]
// CHECK-ERROR: instruction requires: sme2
// CHECK-UNKNOWN: c160e175 <unknown>

bfcvtn  z23.h, {z12.s, z13.s}  // 11000001-01100000-11100001-10110111
// CHECK-INST: bfcvtn  z23.h, { z12.s, z13.s }
// CHECK-ENCODING: [0xb7,0xe1,0x60,0xc1]
// CHECK-ERROR: instruction requires: sme2
// CHECK-UNKNOWN: c160e1b7 <unknown>

bfcvtn  z31.h, {z30.s, z31.s}  // 11000001-01100000-11100011-11111111
// CHECK-INST: bfcvtn  z31.h, { z30.s, z31.s }
// CHECK-ENCODING: [0xff,0xe3,0x60,0xc1]
// CHECK-ERROR: instruction requires: sme2
// CHECK-UNKNOWN: c160e3ff <unknown>


rce.AddComposition("albedoDiffuse", compMixin);

            var byteCode = Compiler.Compile(mixinSource, MixinParameters.EffectParameters, MixinParameters);
            Assert.NotEqual(default(TaskOrResult<EffectBytecodeCompilerResult>), byteCode);
        }

        [Fact(Skip = "This test fixture is unmaintained and currently doesn't pass")]
        public void TestRenaming2()
        {
            Init();

            var color1Mixin = new ShaderMixinSource();
            color1Mixin.Mixins.Add(new ShaderClassSource("ComputeColorFixed", "Material.DiffuseColorValue"));
            var color2Mixin = new ShaderMixinSource();
            color2Mixin.Mixins.Add(new ShaderClassSource("ComputeColorFixed", "Material.SpecularColorValue"));

            var compMixin = new ShaderMixinSource();
            compMixin.Mixins.Add(new ShaderClassSource("ComputeColorMultiply"));
            compMixin.AddComposition("color1", color1Mixin);
            compMixin.AddComposition("color2", color2Mixin);

            var mixinSource = new ShaderMixinSource { Name = "TestRenaming2" };
            mixinSource.Mixins.Add(new ShaderClassSource("ShadingBase"));
            mixinSource.Mixins.Add(new ShaderClassSource("AlbedoFlatShading"));
            mixinSource.AddComposition("albedoDiffuse", compMixin);

            var byteCode = Compiler.Compile(mixinSource, MixinParameters.EffectParameters, MixinParameters);
            Assert.NotEqual(default(TaskOrResult<EffectBytecodeCompilerResult>), byteCode);
        }

        [Fact(Skip = "This test fixture is unmaintained and currently doesn't pass")]
        public void TestRenamingBoth()
        {
            Init();

            TestRenaming();
            TestRenaming2();
        }
        [Fact(Skip = "This test fixture is unmaintained and currently doesn't pass")]
        public void TestRenamingBothInverse()
        {
            Init();

            TestRenaming2();
            TestRenaming();
        }

        internal static void Main4()
        {
            var testClass = new TestShaderMixer2();
            testClass.Init();
            testClass.TestRenaming();
            testClass.TestRenaming2();
        }
    }
}


c_bus.acquire_i2c(),
        SlaveAddr::Alternative(false, false, false, true, true, false),
    );
    servos_1.enable().unwrap();
    servos_1.set_prescale(49).unwrap();
    servos_1.set_all_on_off(&[0u16; 16], &[750u16; 16]).unwrap();
    let mut servos_2 = Pca9685::new(
        i2c_bus.acquire_i2c(),
        SlaveAddr::Alternative(false, false, false, true, true, true),
    );
    servos_2.enable().unwrap();
    servos_2.set_prescale(49).unwrap();
    servos_2.set_all_on_off(&[0u16; 16], &[750u16; 16]).unwrap();
    // let mut servos_eye = Pca9685::new(
    //     i2c_bus.acquire(),
    //     SlaveAddr::Alternative(false, false, true, false, false, false),
    // );
    // servos_eye.enable().unwrap();
    // servos_eye.set_prescale(49).unwrap();
    // servos_eye
    //     .set_all_on_off(&[0u16; 16], &[750u16; 16])
    //     .unwrap();

    /**************************************** SCPI ****************************************/

    let translation = RefCell::new(Translation3::<f32>::new(0.0, 0.0, 0.0));
    let points = RefCell::new([Point3::<f32>::new(0.0, 0.0, 0.0); 8]);

    let mut my_device = MyDevice {};

    let tra = &BodyAttTranCommand {
        translation: &translation,
    };

    let servo_pwidth_all = &BodyServoPwidthAllCommand::new(&servos);
    let servo_pwidth_set = &BodyServoPwidthSetCommand::new(&servos);
    let servo_stat_all = &BodyServoStatAllCommand::new(&servos);
    let servo_stat_set = &BodyServoStatSetCommand::new(&servos);

    let tree = scpi_tree![
        // Create default IEEE488 mandated commands
        ieee488_idn!(b"GPA-Robotics", b"ash-carrier", b"0", GIT_VERSION),
        ieee488_cls!(),
        ieee488_ese!(),
        ieee488_esr!(),
        ieee488_opc!(),
        ieee488_rst!(),
        ieee488_sre!(),
        ieee488_stb!(),
        ieee488_tst!(),
        ieee488_wai!(),
        // Create default SCPI mandated STATus subsystem
        scpi_status!(),
        // Create default SCPI mandated SYSTem subsystem
        scpi_system!(),
        //
        scpi_crate_version!(),
        Node {
            name: b"BODY",
            optional: true,
            handler: None,
            sub: &[
                Node {
                    name: b"SERVos",
                    optional: false,
                    handler: None,
                    sub: &[
                        Node {
                            name: b"PWIDth",
                            optional: false,
                            handler: None,
                            sub: &[
                                Node {
                                    name: b"ALL",
                                    optional: true,
                                    handler: Some(servo_pwidth_all),
                                    sub: &[]
                                },
                                Node {
                                    name: b"SET",
                                    optional: false,
                                    handler: Some(servo_pwidth_set),
                                    sub: &[]
                                },
                            ]
                        },
                        Node {
                            name: b"STATe",
                            optional: false,
                            handler: None,
                            sub: &[
                                Node {
                                    name: b"ALL",
                                    optional: true,


    print("Use :LspCapabilities for full capability list")
end

-- Create command
vim.api.nvim_create_user_command('LspInfo', lsp_info, { desc = "Show comprehensive LSP information" })

local function lsp_status_short()
    local bufnr = vim.api.nvim_get_current_buf()
    local clients = vim.lsp.get_clients({ bufnr = bufnr })

    if #clients == 0 then
        return "" -- Return empty string when no LSP
    end

    local names = {}
    for _, client in ipairs(clients) do
        table.insert(names, client.name)
    end

    return "󰒋 " .. table.concat(names, ",")
end

local function git_branch()
    local ok, handle = pcall(io.popen, "git branch --show-current 2>/dev/null")
    if not ok or not handle then
        return ""
    end
    local branch = handle:read("*a")
    handle:close()
    if branch and branch ~= "" then
        branch = branch:gsub("\n", "")
        return " 󰊢 " .. branch
    end
    return ""
end

local function formatter_status()
    local ok, conform = pcall(require, "conform")
    if not ok then
        return ""
    end

    local formatters = conform.list_formatters_to_run(0)
    if #formatters == 0 then
        return ""
    end

    local formatter_names = {}
    for _, formatter in ipairs(formatters) do
        table.insert(formatter_names, formatter.name)
    end

    return "󰉿 " .. table.concat(formatter_names, ",")
end

local function linter_status()
    local ok, lint = pcall(require, "lint")
    if not ok then
        return ""
    end

    local linters = lint.linters_by_ft[vim.bo.filetype] or {}
    if #linters == 0 then
        return ""
    end

    return "󰁨 " .. table.concat(linters, ",")
end
-- Safe wrapper functions for statusline
local function safe_git_branch()
    local ok, result = pcall(git_branch)
    return ok and result or ""
end

local function safe_lsp_status()
    local ok, result = pcall(lsp_status_short)
    return ok and result or ""
end

local function safe_formatter_status()
    local ok, result = pcall(formatter_status)
    return ok and result or ""
end

local function safe_linter_status()
    local ok, result = pcall(linter_status)
    return ok and result or ""
end

_G.git_branch = safe_git_branch
_G.lsp_status = safe_lsp_status
_G.formatter_status = safe_formatter_status
_G.linter_status = safe_linter_status

-- THEN set the statusline
vim.opt.statusline = table.concat({
    "%{v:lua.git_branch()}",       -- Git branch
    "%f",                          -- File name
    "%m",                          -- Modified flag
    "%r",                          -- Readonly flag
    "%=",                          -- Right align
    "%{v:lua.linter_status()}",    -- Linter status
    "%{v:lua.formatter_status()}", -- Formatter status
    "%{v:lua.lsp_status()}",       -- LSP status
    " %l:%c",                      -- Line:Column
    " %p%%"                        -- Percentage through file
}, " ")


 {
		return nil, err
	}

	return &BankAccountRepository{repo}, nil
}

// Get loads the bank account
func (r *BankAccountRepository) Get(ctx context.Context, aggregateID aggregate.ID) (*BankAccount, error) {
	root, err := r.repo.GetAggregateRoot(ctx, aggregateID)
	if err != nil {
		return nil, err
	}

	bankAccount := root.(*BankAccount)

	return bankAccount, nil
}

// Save the bank account
func (r *BankAccountRepository) Save(ctx context.Context, bankAccount *BankAccount) error {
	return r.repo.SaveAggregateRoot(ctx, bankAccount)
}
//go:build unit

package sql_test

import (
	"context"
	"sync"
	"testing"
	"time"

	"github.com/golang/mock/gomock"
	"github.com/stretchr/testify/require"

	"github.com/hellofresh/goengine/v2/driver/sql"
	mocks "github.com/hellofresh/goengine/v2/mocks/driver/sql"
)

func TestStartProcessor(t *testing.T) {
	testCases := []struct {
		title        string
		notification func() *sql.ProjectionNotification
		queueFunc    string
	}{
		{
			"Handle nil notification",
			func() *sql.ProjectionNotification {
				return nil
			},
			"Queue",
		},
		{
			"Handle new notification",
			func() *sql.ProjectionNotification {
				return &sql.ProjectionNotification{
					No:          1,
					AggregateID: "abc",
				}
			},
			"ReQueue",
		},
		{
			"Handle retried notification",
			func() *sql.ProjectionNotification {
				return &sql.ProjectionNotification{
					No:          1,
					AggregateID: "abc",
					ValidAfter:  time.Now().Add(time.Millisecond * 200),
				}
			},
			"ReQueue",
		},
	}

	for _, testCase := range testCases {
		t.Run(testCase.title, func(t *testing.T) {
			ctrl := gomock.NewController(t)
			queueBufferSize := 1
			queueProcessorsCount := 1
			ctx := context.Background()
			notification := testCase.notification()

			notificationQueue := mocks.NewNotificationQueuer(ctrl)
			expect := notificationQueue.EXPECT()

			switch testCase.queueFunc {
			case "Queue":
				expect.Queue(gomock.Eq(ctx), gomock.Eq(notification)).Times(1)
			case "ReQueue":
				expect.ReQueue(gomock.Eq(ctx), gomock.Eq(notification)).Times(1)
			}

			done := make(chan struct{})
			channel := make(chan *sql.ProjectionNotification, queueBufferSize)
			channel <- notification
			called := false

			expect.Open().DoAndReturn(func() func() {
				return func() {
					close(done)
					close(channel)
				}
			}).AnyTimes()

			expect.Next(gomock.Eq(ctx)).DoAndReturn(func(ctx context.Context) (*sql.ProjectionNotification, bool) {
				if called {
					return nil, true
				}
				called = true
				return notification, false
			}).AnyTimes()

			processor, err := sql.NewBackgroundProcessor(queueProcessorsCount, queueBufferSize, nil, nil, notificationQueue)
			require.NoError(t, err)

			var wg sync.WaitGroup
			wg.Add(1)

			handler := func(ctx context.Context, notification *sql.ProjectionNotification, queue sql.ProjectionTrigger) error {
				err := queue(ctx, notification)
				require.NoError(t, err)

				wg.Done()
				return nil
			}

			killer := processor.Start(ctx, handler)

			defer func() {
				wg.Wait()
				killer()
				ctrl.Finish()
			}()
		})
	}
}
package inmemory

import (
	"context"
	"errors"
	"reflect"
	"sync"

	"github.


li>

实时进度追踪和反馈

失败重试机制

            立即下载

                正在启动... 连接至服务器... 配置环境...

                连接成功！开始抢票... 🚀

© 2024 Damaihelper | 版权所有 | Built with 🧡 for ticket hunters.

<!DOCTYPE html>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">

啊嘞？这个页面找不到了

#include<iostream>
int main() {
    std::cout << 404 << std::endl;
}

发生了什么？

该页面可能尚未完成

该页面可能已经删除

可能输入了错误的链接

    您可以尝试回到上一页面或者前�


patchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import java.util.Timer
import java.util.TimerTask

class AutoDingDingFragment : AndroidxBaseFragment<FragmentDayBinding?>(), View.OnClickListener {
    private var amCountDownTimer: CountDownTimer? = null
    private var pmCountDownTimer: CountDownTimer? = null
    private var timer: Timer? = null
    override fun setupTopBarLayout() {}
    override fun initData() {
        timer = Timer()
        timer!!.schedule(object : TimerTask() {
            override fun run() {
                val systemTime = TimeOrDateUtil.timestampToTime(System.currentTimeMillis())
                viewBinding!!.currentTime.post {
                    viewBinding?.currentTime?.text = systemTime
                }
            }
        }, 0, 1000)
        viewBinding!!.startLayoutView.setOnClickListener(this)
        viewBinding!!.endLayoutView.setOnClickListener(this)
        viewBinding!!.endAmDuty.setOnClickListener(this)
        viewBinding!!.endPmDuty.setOnClickListener(this)
        receiveEvent<String> {
            val intent = Intent(context, WelcomeActivity::class.java)
            intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
            context?.startActivity(intent)
            val emailAddress = Utils.readEmailAddress()
            if (emailAddress == "") {
                Log.d("receive event", "邮箱地址为空")
                ToastUtils.showShort("收件邮箱未设置")
            } else {
                if (it.isNotEmpty()){
                    SendMailUtil.send(emailAddress, it)
                }
            }

        }
    }

    override fun initEvent() {}

    override fun onClick(v: View) {
        val id = v.id
        if (id == R.id.startLayoutView) {
            //设置上班时间
            TimePickerDialog.Builder().setThemeColor(Color.BLUE)
                .setWheelItemTextSize(15)
                .setCyclic(false)
                .setMinMillseconds(System.currentTimeMillis())
                .setMaxMillseconds(System.currentTimeMillis() + Constant.ONE_WEEK)
                .setType(Type.ALL)
                .setCallBack { timePickerView: TimePickerDialog?, millSeconds: Long ->
                    viewBinding!!.amTime.text = TimeOrDateUtil.timestampToDate(millSeconds)
                    //计算时间差
                    onDuty(millSeconds)
                }.build().show(childFragmentManager, "year_month_day_hour_minute")
        } else if (id == R.id.endLayoutView) {
            //设置下班时间
            TimePickerDialog.Builder().setThemeColor(Color.BLUE)
                .setWheelItemTextSize(15)
                .setCyclic(false)
                .setMinMillseconds(System.currentTimeMillis())
                .setMaxMillseconds(System.currentTimeMillis() + Constant.ONE_WEEK)
                .setType(Type.ALL)
                .setCallBack { timePickerView: TimePickerDialog?, millSeconds: Long ->
                    viewBinding!!.pmTime.text = TimeOrDateUtil.timestampToDate(millSeconds)
                    //计算时间差
                    offDuty(millSeconds)
                }.build().show(childFragmentManager, "year_month_day_hour_minute")
        } else if (id == R.id.endAmDuty) {
            if (amCountDownTimer != null) {
                amCountDownTimer!!.cancel()
                viewBinding!!.startTimeView.text = "--"
            }
        } else if (id == R.id.endPmDuty) {
            if (pmCountDownTimer != null) {
                pmCountDownTimer!!.cancel()
                viewBinding!!.endTimeView.text = "--"


  DebugDrawCircle(vLoc, 25, 255, 0, 0)
        DebugDrawLine(hUnit:GetLocation(), vLoc, 255, 0, 0)

        bOnce = toboolean(bOnce[1])
        if iType == nil or iType == ABILITY_STANDARD then
            hUnit:Action_AttackUnit(hTarget, bOnce)
        elseif iType == ABILITY_PUSH then
            hUnit:ActionPush_AttackUnit(hTarget, bOnce)
        elseif iType == ABILITY_QUEUE then
            hUnit:ActionQueue_AttackUnit(hTarget, bOnce)
        end
    end
end
-------------------------------------------------

return AttackUnit


   r4, r5, r0
	str     r2, [sp, #0x28]
	mov     r0, r2
	ldr     r1, [sp, #0x1c]
	ldr     r2, [pc, #0x4c] @ 0x2246a7c, (=0xffff)
	mov     r3, #0x0
	blx     _ll_mul
	strh    r1, [r4, #0x1c]
	ldr     r0, [sp, #0x2c]
	ldr     r1, [sp, #0x30]
	ldr     r2, [sp, #0x24]
	ldr     r3, [sp, #0x28]
	blx     _ll_mul
	ldr     r2, [sp, #0x34]
	ldr     r3, [sp, #0x38]
	add     r0, r2, r0
	adc     r3, r1
	str     r0, [sp, #0x24]
	ldr     r1, [sp, #0x20]
	ldr     r2, [pc, #0x2c] @ 0x2246a7c, (=0xffff)
	str     r3, [sp, #0x28]
	mov     r0, r3
	mov     r3, #0x0
	blx     _ll_mul
	mov     r0, #0x4d
	lsl     r0, r0, #2
	strh    r1, [r4, r0]
	ldr     r0, [sp, #0x4]
	.hword  0x1c76 @ add r6, r6, #0x1
	cmp     r6, r0
	bge     branch_2246a6a
	b       branch_2246962
@ 0x2246a6a

.thumb
branch_2246a6a: @ 2246a6a :thumb
	add     sp, #0x3c
	pop     {r4-r7,pc}
@ 0x2246a6e

.align 2

.word 0x2257760 @ 0x2246a70
.word 0xb3b @ 0x2246a74
.word 0x22563e8 @ 0x2246a78
.word 0xffff @ 0x2246a7c
.thumb
Function_2246a80: @ 2246a80 :thumb
	push    {r4,lr}
	add     sp, #-0x10
	mov     r4, r1
	ldr     r0, [r4, #0x0]
	cmp     r0, #0xc
	bls     branch_2246a8e
	b       branch_2246cd6
@ 0x2246a8e

.thumb
branch_2246a8e: @ 2246a8e :thumb
	add     r0, r0, r0
	add     r0, pc
	ldrh    r0, [r0, #0x6]
	lsl     r0, r0, #16
	asr     r0, r0, #16
	add     pc, r0
@ 0x2246a9a

Jumppoints_2246a9a:
.hword branch_2246ab4 - Jumppoints_2246a9a - 2
.hword branch_2246ad0 - Jumppoints_2246a9a - 2
.hword branch_2246b10 - Jumppoints_2246a9a - 2
.hword branch_2246b44 - Jumppoints_2246a9a - 2
.hword branch_2246b84 - Jumppoints_2246a9a - 2
.hword branch_2246bb4 - Jumppoints_2246a9a - 2
.hword branch_2246bca - Jumppoints_2246a9a - 2
.


;
    let ty = &f.ty;

    if inner_type_t("Option", ty).is_some() {
      quote! { #name: #ty }
    } else {
      quote! { #name: std::option::Option<#ty> }
    }
  });

  // Handle `#[builder(each = "...")]`.
  let extend_methods =
    fields.iter().filter_map(|f| {
      match extract_attrs_value(f, "builder", "each") {
        Some(arg) => {
          let name = &f.ident;
          let inner_ty = inner_type_t("Vec", &f.ty);
          Some(quote! {
            fn #arg(&mut self, #arg: #inner_ty) -> &mut Self {
              if let Some(ref mut values) = self.#name {
                values.push(#arg);
              } else {
                self.#name = Some(vec![#arg]);
              }
              self
            }
          })
        }
        None => None,
      }
    });

  // `#bident` builder struct setter methods.
  let setter_methods = fields.iter().map(|f| {
    let name = &f.ident;
    let ty = &f.ty;

    if let Some(inner_ty) = inner_type_t("Option", ty) {
      quote! {
        pub fn #name(&mut self, #name: #inner_ty) -> &mut Self {
          self.#name = Some(#name);
          self
        }
      }
    } else {
      quote! {
        pub fn #name(&mut self, #name: #ty) -> &mut Self {
          self.#name = Some(#name);
          self
        }
      }
    }
  });

  // `#bident::build()` return statement.
  let build_ret = fields.iter().map(|f| {
        let name = &f.ident;

        if inner_type_t("Option", &f.ty).is_some() {
            quote! { #name: self.#name.clone() }
        } else {
            quote! { #name: self.#name.clone().ok_or(concat!(stringify!(#name), " is not set"))? }
        }
    });

  // Initialize fields with None.
  let builder_empty = fields.iter().map(|f| {
    let name = &f.ident;
    quote! { #name: None }
  });

  // Expanded TokenStream.
  let ts = quote! {
    /// The Builder struct has fields identical to the original struct excpet
    /// the field types are wrapped with `std::option::Option` where necessary.
    ///
    /// # Examples:
    ///
    /// ```rust
    /// # use derive_builder::Builder;
    /// #[derive(Builder)]
    /// struct Command {
    ///   executable: String,
    ///   args: Vec<String>,
    ///   env: Vec<String>,
    ///   current_dir: Option<String>,
    /// }
    ///
    /// // The above code will generate a `CommandBuilder` struct with a
    /// // signature similar to:
    /// struct CommandBuilder {
    ///   executable: std::option::Option<String>,
    ///   args: std::option::Option<Vec<String>>,
    ///   env: std::option::Option<Vec<String>>,
    ///   current_dir: Option<String>,
    /// }
    /// ```
    struct #bident {
      #(#optioned_fields,)*
    }

    // impl `CommandBuilder`.
    impl #bident {

      // Methods generated from `#[builder(each = "...")]`.
      #(#extend_methods)*

      // List of setter methods.
      #(#setter_methods)*

      /// `build` method on the builder struct runs the arguments and returns
      /// an object of original struct wrapped with `#[derive(Builder)]`.
      ///
      /// # Examples:
      ///
      /// ```rust
      /// # use derive_builder::Builder;
      /// pub struct Command {
      ///   exec


ltiplier', 0.02}, links = {30, 39}, size = 1}
tree[33] = {x = 126, y = -186, types = {'HP', 'Cycle'}, stats = {'1% Added Chance to Spawn HP on Cycle', 'spawn_hp_on_cycle_chance', 1}, links = {30, 37}, size = 1}
tree[34] = {x = 54, y = -222, types = {'HP'}, stats = {'20% Increased Chance to Spawn HP', 'hp_spawn_chance_multiplier', 0.20}, links = {31, 35}, size = 1}
tree[35] = {x = 54, y = -258, types = {'HP'}, stats = {'10% Increased Chance to Spawn HP', 'hp_spawn_chance_multiplier', 0.10}, links = {34, 41}, size = 1}
tree[37] = {x = 126, y = -222, types = {'HP', 'Cycle'}, stats = {'2% Added Chance to Spawn HP on Cycle', 'spawn_hp_on_cycle_chance', 2}, links = {33, 38}, size = 1}
tree[38] = {x = 126, y = -258, types = {'HP', 'Cycle'}, stats = {'1% Added Chance to Spawn HP on Cycle', 'spawn_hp_on_cycle_chance', 1}, links = {37, 41}, size = 1}
tree[39] = {x = 90, y = -222, types = {'HP'}, stats = {'4% Increased HP', 'hp_multiplier', 0.04}, links = {32, 40}, size = 1}
tree[40] = {x = 90, y = -258, types = {'HP'}, stats = {'2% Increased HP', 'hp_multiplier', 0.02}, links = {39, 41}, size = 1}
tree[41] = {x = 90, y = -294, types = {'HP', 'Cycle'}, stats = {'4% Increased HP', 'hp_multiplier', 0.04, '10% Increased Chance to Spawn HP', 'hp_spawn_chance_multiplier', 0.10,
'2% Added Chance to Spawn HP on Cycle', 'spawn_hp_on_cycle_chance', 2, '2% Added Chance to Regain HP on Cycle', 'regain_hp_on_cycle_chance', 2}, links = {35, 42, 40, 38}, size = 2}
tree[42] = {x = 90, y = -378, types = {'HP'}, stats = {'2% Increased HP', 'hp_multiplier', 2}, links = {41, 43, 64, 65}, size = 1}
tree[43] = {x = 30, y = -438, types = {'ASPD', 'HP'}, stats = {'20% Added Chance to Spawn Haste Area Area on HP Pickup', 'spawn_haste_area_on_hp_pickup_chance', 20}, links = {29, 42, 44}, size = 2}
tree[44] = {x = 54, y = -462, types = {'ASPD'}, stats = {'3% Increased Attack Speed', 'aspd_multiplier', 0.03}, links = {43, 45}, size = 1}
tree[45] = {x = 30, y = -486, types = {'ASPD'}, stats = {'3% Increased Attack Speed', 'aspd_multiplier', 0.03}, links = {44, 77, 350}, size = 1}
tree[46] = {x = -126, y = -126, types = {'Ammo'}, stats = {'4% Increased Ammo', 'ammo_multiplier', 0.04}, links = {16, 47}, size = 1}
tree[47] = {x = -126, y = -210, types = {'Ammo'}, stats = {'4% Increased Ammo', 'ammo_multiplier', 0.04}, links = {46, 48, 56}, size = 1}
tree[48] = {x = -126, y = -294, types = {'Ammo'}, stats = {'4% Increased Ammo', 'ammo_multiplier', 0.04}, links = {47, 49, 53}, size = 1}


Text BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetPluginUnload SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption SubSectionEnd Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both colored current false force hide highest lastused leave listonly none normal notset off on open print show silent silentlog smooth textonly true user "},c:[e.HCM,e.CBCM,{cN:"string",b:'"',e:'"',i:"\\n",c:[{b:"\\$(\\\\(n|r|t)|\\$)"},t,r,i,a]},e.C(";","$",{r:0}),{cN:"function",bK:"Function PageEx Section SectionGroup SubSection",e:"$"},o,r,i,a,n,e.NM,{b:e.IR+"::"+e.IR}]}}),hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import from as",literal:"true false null undefined Na


��일: `submission_bm25_vector_top3_20250820_121132.csv`

### 실험 결과 요약

#### 실험 1: BM25 vs Vector 독립 비교
- 일치율: 70% (객관식), 0% (주관식)
- 프롬프트 엔지니어링이 검색 방법보다 중요

#### 실험 2: BM25+Vector 결합 방식
- 각 3개씩 독립 선택으로 총 6개 문서
- 하이브리드 가중치보다 우수한 성능

#### 실험 3: 전체 테스트셋 검증
- 리더보드 점수 0.55 달성
- 안정적인 처리 성능 확인

## 기술 스택

### 핵심 컴포넌트
- **LLM**: Qwen2.5-7B-Instruct (16-bit)
- **임베더**: KURE-v1 (1024차원)
- **BM25**: rank_bm25 with Kiwi tokenizer
- **Vector DB**: FAISS GPU-accelerated
- **청크 수**: 8,270개

### 성능 메트릭
- **처리 속도**: 2-3 문제/초
- **메모리 사용**: 안정적 (100개마다 GC)
- **GPU 활용**: RTX 4090 24GB 효율적 사용

## 다음 단계

### 단기 (P0)
1. 현재 구성으로 추가 최적화
   - 프롬프트 엔지니어링 개선
   - 문제 유형별 k값 동적 조정

### 중기 (P1)
1. 리랭킹 모델 적용 검토
2. 청크 크기 최적화 실험
3. 앙상블 접근법 연구

### 장기 (P2)
1. 학습 데이터 증강
2. 도메인 특화 임베딩 모델 개발
3. 멀티스테이지 RAG 파이프라인

## 파일 구조

```
C:\Fin_AI_Challenge\
├── packages/rag/
│   ├── retrieval/
│   │   ├── combined_top_retriever.py  # 핵심 retriever
│   │   └── __init__.py               # 업데이트됨
│   └── rag_pipeline.py               # 통합


pdateDB();
      showToast('更新完成');
    }
  }

  @override
  Widget build(BuildContext context) {
    return MultiSliver(children: [
      SliverCupertinoListSection.listInsetGrouped(children: [
        // _handleTagTranslatChanged switch
        EhCupertinoListTile(
          title: const Text('启用标签翻译'),
          subtitle: Text('当前版本:${_ehSettingService.tagTranslatVer.value}'),
          trailing: Obx(() {
            return Row(
              children: [
                CupertinoButton(
                  padding: const EdgeInsets.all(0),
                  onPressed: _forceUpdateTranslate,
                  child: const Icon(CupertinoIcons.refresh),
                ),
                CupertinoSwitch(
                  value: _ehSettingService.isTagTranslate,
                  onChanged: _handleTagTranslatChanged,
                ),
              ],
            );
          }),
        ),

        Obx(() {
          return AnimatedCrossFade(
            alignment: Alignment.center,
            crossFadeState: _ehSettingService.isTagTranslate
                ? CrossFadeState.showSecond
                : CrossFadeState.showFirst,
            firstCurve: Curves.easeIn,
            secondCurve: Curves.easeOut,
            duration: const Duration(milliseconds: 200),
            firstChild: const SizedBox(),
            secondChild: _buildTagIntroImgLvItem(context),
          );
        }),

        // enableTagTranslateCDN switch
        EhCupertinoListTile(
          title: const Text('加速下载数据'),
          subtitle: const Text('使用CDN加速下载数据'),
          trailing: Obx(() {
            return CupertinoSwitch(
              value: _ehSettingService.enableTagTranslateCDN,
              onChanged: _handleTagTranslatCDNChanged,
            );
          }),
        ),

        _buildTagTranslateDataUpdateModeItem(context),
      ]),
    ]);
  }
}

/// 标签介绍图片切换
Widget _buildTagIntroImgLvItem(BuildContext context) {
  const String title = '标签介绍图片';
  final EhSettingService ehSettingService = Get.find();

  final Map<TagIntroImgLv, String> descMap = <TagIntroImgLv, String>{
    TagIntroImgLv.disable: '禁用',
    TagIntroImgLv.nonh: '隐藏H图片',
    TagIntroImgLv.r18: '隐藏引起不适的图片',
    TagIntroImgLv.r18g: '全部显示',
  };

  return Obx(() {
    return SelectorCupertinoListTile<TagIntroImgLv>(
      title: title,
      actionMap: descMap,
      initVal: ehSettingService.tagIntroImgLv.value,
      onValueChanged: (val) => ehSettingService.tagIntroImgLv.value = val,
    );
  });
}

/// 自动更新策略切换
Widget _buildTagTranslateDataUpdateModeItem(BuildContext context) {
  const String title = '自动更新策略';
  final EhSettingService ehSettingService = Get.find();

  final Map<TagTranslateDataUpdateMode, String> modeMap =
      <TagTranslateDataUpdateMode, String>{
    TagTranslateDataUpdateMode.manual: '手动更新',
    TagTranslateDataUpdateMode.everyStartApp: '启动App时更新',
  };

  return Obx(() {
    return SelectorCupertinoListTile<TagTranslateDataUpdateMode>(
      title: title,
      actionMap: modeMap,
      initVal: ehSettingService.tagTranslateData


}

.aljs-home-header .slds-notify_container .slds-notify.show {
    transform: translateY(0);
}

.aljs-home-header .slds-notify_container .slds-notify .slds-button__icon {
    fill: white;
}

.aljs-home-header .slds-notify_container .slds-notify .slds-button--icon-inverse:hover,
.aljs-home-header .slds-notify_container .slds-notify .slds-button--icon-inverse:focus,
.aljs-home-header .slds-notify_container .slds-notify .slds-button--icon-inverse:active {
    background-color: transparent;
    border: none;
}

.aljs-home-header .slds-notify_container .slds-notify .slds-button--icon-inverse:hover .slds-button__icon,
.aljs-home-header .slds-notify_container .slds-notify .slds-button--icon-inverse:focus .slds-button__icon,
.aljs-home-header .slds-notify_container .slds-notify .slds-button--icon-inverse:active .slds-button__icon {
    fill: rgba(255, 255, 255, 0.5);
}

.aljs-home-header .slds-notify_container .slds-notify .strike-link {
    font-weight: bold;
    color: rgb(255, 183, 93);
}

.aljs-header-container {
    padding: 8vw;
    color: white;
}

.aljs-header-container * {
    color: white;
}

.aljs-header-container a:not(.slds-button) {
    text-decoration: underline;
    color: white;
}

.aljs-section-icon {
    display: inline-block;
    max-height: 100%;
    max-width: 60px;
    height: auto;
    width: auto;
    position: absolute;
    left: 20px;
    top: -2px;
}

.aljs-screenshot {
    display: block;
    border: 1px solid #d8dde6;
}

.aljs-section-title {
    display: inline-block;
}

.aljs-section-divider {
    margin: 3rem -3rem 0;
}

.aljs-section-icon+.aljs-section-title {
    position: relative;
    left: 80px;
}

pre {
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    text-align: left;
    word-spacing: normal;
    font-weight: normal;
    white-space: pre-wrap;
    margin-bottom: 0;
    margin-top: 0;
    padding: 1rem;
    white-space: pre;
    padding-top: 50px;
}

.aljs-pre-container {
    position: relative;
    background-color: #eef1f6;
}

.aljs-pre-container[type]:before {
    font-family: 'Salesforce Sans', Arial, sans-serif;
    font-weight: normal;
    font-size: 12px;
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.5rem 1rem;
    background-color: #29586d;
    color: #fff;
    min-width: 100px;
    width: 100%;
}

.aljs-pre-container[type="html"]:before {
    content: 'Code Sample (HTML)';
}

.aljs-pre-container[type="css"]:before {
    content: 'Code Sample (CSS)';
}

.aljs-pre-container[type="js"]:before {


# /*****************************************************************************
# * | File        :   config.py
# * | Author      :   Guillaume Giraudon
# * | Info        :
# *----------------
# * | This version:   V1.0
# * | Date        :   2019-10-18
# * | Info        :
# ******************************************************************************/
import spidev

# Pin definition
RST_PIN = 27
DC_PIN = 25
BL_PIN = 24

Device_SPI = 1
Device_I2C = 0

Device = Device_SPI
spi = spidev.SpiDev(0, 0)


28:
	vzip.8	q4, q2	@ tmp2246, tmp2247
.LBE1228:
.LBE1227:
.LBE1226:
.LBB1229:
.LBB1230:
.LBB1231:
	vzip.8	q12, q4	@, tmp2289
	vstmia	sp, {d24-d25}	@ %sfp,
.LBE1231:
.LBE1230:
.LBE1229:
.LBB1232:
.LBB1233:
.LBB1234:
	vzip.8	q5, q10	@ tmp2197, tmp2198
.LBE1234:
.LBE1233:
.LBE1232:
.LBB1235:
.LBB1236:
.LBB1237:
	.loc 1 267 0
	add	r6, r4, #448	@ D.19130, ivtmp.956,
.LBE1237:
.LBE1236:
.LBE1235:
.LBB1242:
.LBB1243:
.LBB1244:
	.loc 2 7647 0
	vzip.8	q0, q13	@ tmp2211, tmp2212
.LBE1244:
.LBE1243:
.LBE1242:
.LBB1245:
.LBB1246:
.LBB1247:
	vzip.8	q15, q8	@ tmp2225, tmp2226
.LBE1247:
.LBE1246:
.LBE1245:
.LBB1248:
.LBB1249:
.LBB1250:
	vzip.8	q1, q7	@ tmp2260, tmp2261
.LVL138:
.LBE1250:
.LBE1249:
.LBE1248:
.LBB1251:
.LBB1252:
.LBB1253:
	vzip.8	q5, q15	@ tmp2253, tmp2254
.LBE1253:
.LBE1252:
.LBE1251:
.LBB1254:
.LBB1255:
.LBB1256:
	vzip.8	q3, q9	@ tmp2274, tmp2275
.LBE1256:
.LBE1255:
.LBE1254:
.LBB1257:
.LBB1258:
.LBB1259:
	vzip.8	q10, q8	@ tmp2281, tmp2282
.LBE1259:
.LBE1258:
.LBE1257:
.LBB1260:
.LBB1261:
.LBB1262:
	vzip.8	q7, q9	@ tmp2330, tmp2331
.LBE1262:
.LBE1261:
.LBE1260:
.LBB1263:
.LBB1264:
.LBB1265:
	vzip.8	q11, q2	@ tmp2302, tmp2303
.LBE1265:
.LBE1264:
.LBE1263:
.LBB1266:
.LBB1267:
.LBB1268:
	vzip.8	q1, q3	@ tmp2316, tmp2317
.LBE1268:
.LBE1267:
.LBE1266:
.LBB1269:
.LBB1270:
.LBB1271:
	vldr	d12, [sp, #32]	@, %sfp
	vldr	d13, [sp, #40]	@, %sfp
	vzip.8	q6, q14	@ tmp2183, tmp2184
.LVL139:
.LBE1271:
.LBE1270:
.LBE1269:
.LBB1272:
.LBB1273:
.LBB1274:
	vzip.8	q6, q0	@ tmp223


local logger = require("modules.utility.shared.logger")

if not _G.interface then
    logger.info("(modules/interface) _G.interface not found, creating first global instance")

    local interface = {
        store = {
            status = {
                app = {
                    loaded = false,
                },
            },
            visibility = {
                app = false,
            },
            callbacks = {},
        },
    }

    interface.__index = interface

    function interface.new()
        local self = setmetatable({}, interface)

        self:registerInitialCallbacks()

        return self
    end

    ---@param action string The action you wish to target
    ---@param data any The data you wish to send along with this action
    function interface:message(action, data)
        assert(action, "(interface:message) `action` parameter is nil.")

        SendNUIMessage({
            action = action,
            data = data,
        })
    end

    ---@param state? boolean
    function interface:toggle(state, affectInputFocus)
        local newState = not self.store.visibility.app

        if type(state) == "boolean" then
            newState = state
        end

        logger.info("(interface:toggle) newState: ", newState)

        self:message("state::visibility::app::set", newState)
    end

    function interface:registerInitialCallbacks()
        self:on("state::visibility::app::sync", function(state, cb)
            self.store.visibility.app = state
            cb(true)
        end)

        self:on("APP_LOADED", function(_, cb)
            self.store.status.app.loaded = true
            local config = require("config.shared")
            cb(config)
            self:toggle(false) -- Hide HUD by default
        end)
    end

    ---@param event string
    ---@param callback function
    ---@return number? The index of the callback, or nil if failed
    function interface


[21854] = "Robe en tisse-néant",
[21855] = "Tunique en tisse-néant",
[21856] = "Neretzek, le Buveur de sang",
[21858] = "Sac du feu-sorcier",
[21859] = "Pantalon en tisse-néant imprégné",
[21860] = "Bottes en tisse-néant imprégné",
[21861] = "Robe en tisse-néant imprégné",
[21862] = "Tunique en tisse-néant imprégné",
[21863] = "Gants d'âmétoffe",
[21864] = "Epaulières d'âmétoffe",
[21865] = "Gilet d'âmétoffe",
[21866] = "Brassards en tisse-arcane",
[21867] = "Bottes en tisse-arcane",
[21868] = "Robe en tisse-arcane",
[21869] = "Epaulières en tisse-ombre gelé",
[21870] = "Bottes en tisse-ombre gelé",
[21871] = "Robe en tisse-ombre gelé",
[21872] = "Ombresac d'ébène",
[21873] = "Ceinture d'étoffe lunaire primordiale",
[21874] = "Epaulières d'étoffe lunaire primordiale",
[21875] = "Robe d'étoffe lunaire primordiale",
[21876] = "Sac d'étoffe lunaire primordiale",
[21877] = "Etoffe de tisse-néant",
[21878] = "zzDEPRECATED Spellthread",
[21881] = "Soie d'araignée toile-néant",
[21882] = "Essence d'âme",
[21884] = "Feu primordial",
[21885] = "Eau primordiale",
[21886] = "Vie primordiale",
[21887] = "Cuir granuleux",
[21888] = "Gants de l'immortel",
[21889] = "Gants de la prophétie rachetée",
[21890] = "Gants du prophète déchu",
[21891] = "Fragment de l'étoile tombée",
[21892] = "Patron : Rouleau de tisse-néant imprégné",
[21893] = "Patron : Sac en tisse-néant imprégné",
[21894] = "Patron : Rouleau d'âmétoffe",
[21895] = "Patron : Etoffe lunaire primordiale",
[21896] = "Patron : Robe en tisse-néant",
[21897] = "Patron : Tunique en tisse-néant",
[21898] = "Patron : Pantalon en tisse-néant imprégné",
[21899] = "Patron : Bottes en tisse-néant imprégné",
[21900] = "Patron : Robe en tisse-néant imprégné",
[21901] = "Patron : Tunique en tisse-néant imprégné",
[21902] = "Patron : Gants d'âmétoffe",
[21903] = "Patron : Epaulières d'âmétoffe",
[21904] = "Patron : Gilet d'âmétoffe",
[21905] = "Patron : Brassards en tisse-arcane",
[21906] = "Patron : Bottes en tisse-arcane",
[21907] = "Patron : Robe en tisse-arcane",
[21908] = "Patron : Ceinture du feu-sorcier",
[21909] = "Patron : Gants du feu-sorcier",
[21910] = "Patron : Robe du feu-sorcier",
[21911] =


rce: bass.ThunkMountSource{
					Cache: &cache,
				},
				Target: targetPath,
			})

			cmd.mounted[targetPath] = true
		}

		return bass.String(cmd.rel(fsp)).Decode(dest)
	}

	var embedPath *bass.FSPath
	if err := val.Decode(&embedPath); err == nil {
		hash, err := embedPath.Hash()
		if err != nil {
			return err
		}

		target, err := bass.NewDirPath(hash).
			Extend(embedPath.Path.FilesystemPath())
		if err != nil {
			return err
		}

		fsp := target.(bass.FilesystemPath)

		targetPath := fsp.FromSlash()
		if !cmd.mounted[targetPath] {
			cmd.Mounts = append(cmd.Mounts, CommandMount{
				Source: bass.ThunkMountSource{
					FSPath: embedPath,
				},
				Target: targetPath,
			})

			cmd.mounted[targetPath] = true
		}

		return bass.String(cmd.rel(fsp)).Decode(dest)
	}

	var secret bass.Secret
	if err := val.Decode(&secret); err == nil {
		shhhhh := secret.Reveal()
		if shhhhh == nil {
			return fmt.Errorf("missing secret: %s", secret.Name)
		}

		return bass.String(shhhhh).Decode(dest)
	}

	var addr bass.ThunkAddr
	if err := val.Decode(&addr); err == nil {
		result, err := cmd.starter.Start(ctx, addr.Thunk)
		if err != nil {
			return fmt.Errorf("start %s: %w", addr.Thunk, err)
		}

		info, found := result.Ports[addr.Port]
		if !found {
			return fmt.Errorf("no info for port '%s': %+v", addr.Port, result.Ports)
		}

		str, err := addr.Render(info)
		if err != nil {
			return err
		}

		cmd.Services = append(cmd.Services, addr.Thunk)

		return bass.String(str).Decode(dest)
	}

	return val.Decode(dest)
}

func (cmd *Command) rel(workRelPath bass.FilesystemPath) string {
	if cmd.Dir == nil {
		return workRelPath.FromSlash()
	}

	var cwdRelPath = workRelPath.FromSlash()
	for dir := filepath.Dir(*cmd.Dir); dir != "."; dir = filepath.Dir(dir) {
		cwdRelPath = filepath.Join("..", cwdRelPath)
	}

	if workRelPath.IsDir() {
		cwdRelPath += string(os.PathSeparator)
	}

	return cwdRelPath
}

func (cmd *Command) resolveArg(ctx context.Context, vals bass.List, dest any) error {
	var res string
	err := bass.Each(vals, func(v bass.Value) error {
		var val string
		err := cmd.resolveValue(ctx, v, &val)
		if err != nil {
			return err
		}

		res += val

		return nil
	})
	if err != nil {
		return err
	}

	return bass.String(res).Decode(dest)
}
package cli

import (
	"context"
	"fmt"
	"io"
	"regexp"
	"strings"

	"github.com/morikuni/aec"
	perrors "github.com/pkg/errors"
	"github.com/segmentio/textio"
)

type ProgressError struct {
	msg  string
	err  error
	prog *Progress
}

func (err ProgressError) Error() string {
	rootErr := perrors.Cause(err.err)
	return fmt.Sprintf("%s: %s", err.msg, stripUselessPart(rootErr.Error()))
}

func (progErr ProgressError) NiceError(w io.Writer, outer error) error {
	fmt.Fprintln(w, aec.RedF.Apply(outer.Error


(at.lex){ Object.keys(at.lex).forEach(function(k){ tmp[k] = at.lex[k] }, tmp = msg.get = msg.get || {}) }
				if(get['#'] || at.soul){
					get['#'] = get['#'] || at.soul;
					//root.graph[get['#']] = root.graph[get['#']] || {_:{'#':get['#'],'>':{}}};
					msg['#'] || (msg['#'] = text_rand(9)); // A3120 ?
					back = (root.$.get(get['#'])._);
					if(!(get = get['.'])){ // soul
						tmp = back.ask && back.ask['']; // check if we have already asked for the full node
						(back.ask || (back.ask = {}))[''] = back; // add a flag that we are now.
						if(u !== back.put){ // if we already have data,
							back.on('in', back); // send what is cached down the chain
							if(tmp){ return } // and don't ask for it again.
						}
						msg.$ = back.$;
					} else
					if(obj_has(back.put, get)){ // TODO: support #LEX !
						tmp = back.ask && back.ask[get];
						(back.ask || (back.ask = {}))[get] = back.$.get(get)._;
						back.on('in', {get: get, put: {'#': back.soul, '.': get, ':': back.put[get], '>': state_is(root.graph[back.soul], get)}});
						if(tmp){ return }
					}
						/*put = (back.$.get(get)._);
						if(!(tmp = put.ack)){ put.ack = -1 }
						back.on('in', {
							$: back.$,
							put: Gun.state.ify({}, get, Gun.state(back.put, get), back.put[get]),
							get: back.get
						});
						if(tmp){ return }
					} else
					if('string' != typeof get){
						var put = {}, meta = (back.put||{})._;
						Gun.obj.map(back.put, function(v,k){
							if(!Gun.text.match(k, get)){ return }
							put[k] = v;
						})
						if(!Gun.obj.empty(put)){
							put._ = meta;
							back.on('in', {$: back.$, put: put, get: back.get})
						}
						if(tmp = at.lex){
							tmp = (tmp._) || (tmp._ = function(){});
							if(back.ack < tmp.ask){ tmp.ask = back.ack }
							if(tmp.ask){ return }
							tmp.ask = 1;
						}
					}
					*/
					root.ask(ack, msg); // A3120 ?
					return root.on('in', msg);
				}
				//if(root.now){ root.now[at.id] = root.now[at.id] || true; at.pass = {} }
				if(get['.']){
					if(at.get){
						msg = {get: {'.': at.get}, $: at.$};
						(back.ask || (back.ask = {}))[at.get] = msg.$._; // TODO: PERFORMANCE? More elegant way?
						return back.on('out', msg);
					}
					msg = {get: at.lex? msg.get : {}, $: at.$};
					return back.on('out', msg);
				}
				(at.ask || (at.ask = {}))[''] = at;	 //at.ack = at.ack || -1;
				if(at.get){
					get['.'] = at.get;
					(back.ask || (back.ask = {}))[at.get] = msg.$._; // TODO: PERFORMANCE? More elegant way?
					return back.on('out', msg);
				}
			}
			return back.on('out', msg);
		}; Gun.on.out = output;

		function input(msg, cat){ cat = cat || this.as; // TODO: V8 may not be able to optimize functions with different parameter calls, so try to do benchmark to see if there is any actual difference.


 round the output if the returned string
   * is accurate enough to uniquely identify the input-number.
   * For example the most precise representation of the [double] `9e59` equals
   * `"899999999999999918767229449717619953810131273674690656206848"`, but
   * this method returns the shorter (but still uniquely identifying) `"9e59"`.
   *
   */
  String toString();

  /**
   * Parses a string containing a number literal into a number.
   *
   * The method first tries to read the [input] as integer (similar to
   * [int.parse] without a radix).
   * If that fails, it tries to parse the [input] as a double (similar to
   * [double.parse]).
   * If that fails, too, it invokes [onError] with [input], and the result
   * of that invocation becomes the result of calling `parse`.
   *
   * If no [onError] is supplied, it defaults to a function that throws a
   * [FormatException].
   *
   * For any number `n`, this function satisfies
   * `identical(n, num.parse(n.toString()))` (except when `n` is a NaN `double`
   * with a payload).
   */
  static num parse(String input, [num onError(String input)]) {
    String source = input.trim();
    // TODO(lrn): Optimize to detect format and result type in one check.
    num result = int.parse(source, onError: _returnNull);
    if (result != null) return result;
    result = double.parse(source, _returnNull);
    if (result != null) return result;
    if (onError == null) throw new FormatException(input);
    return onError(input);
  }

  /** Helper function for [parse]. */
  static _returnNull(_) => null;
}
// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of dart.core;

/**
 * The annotation `@Deprecated('expires when')` marks a feature as deprecated.
 *
 * The annotation `@deprecated` is a shorthand for deprecating until
 * an unspecified "next release".
 *
 * The intent of the `@Deprecated` annotation is to inform users of a feature
 * that they should change their code, even if it is currently still working
 * correctly.
 *
 * A deprecated feature is scheduled to be removed at a later time, possibly
 * specified as the "expires" field of the annotation.
 * This means that a deprecated feature should not be used, or code using it
 * will break at some point in the future. If there is code using the feature,
 * that code should be rewritten to not use the deprecated feature.
 *
 * A deprecated feature should document how the same effect can be achieved,
 * so the programmer knows how to rewrite the code.
 *
 * The `@Deprecated` annotation applies to libraries, top-level declarations
 * (variables, getters, setters, functions, classes and typedefs),
 * class-level declarations (variables, getters, setters, methods, operators or
 * constructors, whether static or not), named optional arguments and
 * trailing optional positional parameters.
 *
 * Deprecation is transitive:
 *
 *  - If a library is deprecated, so is every member of it.
 *  - If a class is deprecated, so is every member of it.
 *  - If a variable is deprecated, so are its implicit getter and setter.
 *
 *
 * A tool that processes Dart source code may report when:
 *
 * - the code imports a deprecated library.
 * - the code exports a deprecated library, or any deprecated member of
 *   a non-deprecated library.
 * -


#ifndef AABB_H
#define AABB_H

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-braces"

#include <cglm/cglm.h>
#include <cglm/struct.h>

#pragma GCC diagnostic pop

#include "types.h"
#include "fmath.h"

typedef vec3s AABB[2];

#define AABB_COPY(_aabb) { (_aabb)[0], (_aabb)[1] }

// returns the depth of collision of aabb a into aabb b
static inline vec3s glms_aabb_aabb_depth(vec3s a[2], vec3s b[2]) {
    vec3s result, a_c = glms_aabb_center(a), b_c = glms_aabb_center(b);

    for (size_t i = 0; i < 3; i++) {
        if (a_c.raw[i] < b_c.raw[i]) {
            result.raw[i] = a[1].raw[i] - b[0].raw[i];
        } else {
            result.raw[i] = b[1].raw[i] - a[0].raw[i];
        }
    }

    return result;
}

// scales an AABB the specified amounts along each axis
static inline void glms_aabb_scale(AABB box, vec3s scale, AABB dest) {
    vec3s center = glms_aabb_center(box);
    vec3s size = glms_vec3_sub(box[1], box[0]);

    vec3s new_size = glms_vec3_mul(size, scale);
    vec3s half_new_size = glms_vec3_scale(new_size, 0.5f);

    // scaled AABB centered around same center
    dest[0] = glms_vec3_add(glms_vec3_scale(half_new_size, -1.0f), center);
    dest[1] = glms_vec3_add(glms_vec3_sub(new_size, half_new_size), center);
}

#endif


Count(state, playerId) * SHAPE_MISSION_SCORE[shape]

  score += getTokenCount(player, Token.FANCY) * FANCY_TOKEN_SCORE

  score += getTokenCount(player, Token.METRO) * METRO_TOKEN_SCORE

  score += getTokenCount(player, Token.RUINS) * RUINS_TOKEN_SCORE

  if (mostMetro === playerId) {
    score += METRO_CARD_SCORE
  }

  if (lastRuins === playerId) {
    score += RUINS_CARD_SCORE
  }

  if (isEndOfGameScoring) {
    score += getSectorCount(state, playerId) * SECTOR_SCORE
  }

  return score
}
import * as fs from "fs"
import * as path from "path"
import { expect } from "chai"
import miss from "mississippi"
import chunker from "stream-chunker"
import removeBomStream from "../"

const pipe = miss.pipe
const concat = miss.concat

describe("removeBomStream", () => {
  it("ignores UTF8 buffer without a BOM", done => {
    const filepath = path.join(__dirname, "./fixtures/test.txt")

    const expected = fs.readFileSync(filepath)

    function assert(data) {
      expect(data.equals(expected)).to.be.true
    }

    pipe([fs.createReadStream(filepath), removeBomStream(), concat(assert)], done)
  })

  it("removes the BOM from a UTF8 buffer", done => {
    const filepath = path.join(__dirname, "./fixtures/bom-utf8.txt")

    const expected = fs.readFileSync(filepath).slice(3)

    function assert(data) {
      expect(data.equals(expected)).to.be.true
    }

    pipe([fs.createReadStream(filepath), removeBomStream(), concat(assert)], done)
  })

  it("handles small chunks", done => {
    const filepath = path.join(__dirname, "./fixtures/bom-utf8.txt")

    const expected = fs.readFileSync(filepath).slice(3)

    function assert(data) {
      expect(data.equals(expected)).to.be.true
    }

    pipe(
      [fs.createReadStream(filepath), chunker(1), removeBomStream(), concat(assert)],
      done
    )
  })

  it("removes the BOM from a UTF8 buffer that is shorter than 7 chars", done => {
    const filepath = path.join(__dirname, "./fixtures/bom-utf8-short.txt")

    const expected = fs.readFileSync(filepath).slice(3)

    function assert(data) {
      expect(data.length < 7).to.be.true
      expect(expected.length < 7).to.be.true
      expect(data.equals(expected)).to.be.true
    }

    pipe([fs.createReadStream(filepath), removeBomStream(), concat(assert)], done)
  })

  it("does not remove the BOM from a UTF16BE buffer", done => {
    const filepath = path.join(__dirname, "./fixtures/bom-utf16be.txt")

    const expected = fs.readFileSync(filepath)

    function assert(data) {
      expect(data.equals(expected)).to.be.true
    }

    pipe([fs.createReadStream(filepath), removeBomStream(), concat(assert)], done)
  })

  it("does not remove the BOM from a UTF16BE buffer that is shorter than 7 chars", done => {
    const filepath = path.join(__dirname, "./fixtures/bom-utf16be-short.txt")

    const expected = fs.readFileSync(filepath)

    function assert(data) {
      expect(data.equals(expected)).to.be.true
    }

    pipe([fs.createReadStream(filepath), removeBo


ukan pembuatan SEP di jenis pelayanan rawat jalan..!!");
                    NoRujukan.requestFocus();
                }else{
                    insertPasien();
                }
            }else if(JenisPelayanan.getSelectedIndex()==0){
                insertPasien();
            }
        }
    }//GEN-LAST:event_BtnSimpanActionPerformed

    private void BtnSimpanKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_BtnSimpanKeyPressed
        if(evt.getKeyCode()==KeyEvent.VK_SPACE){
            BtnSimpanActionPerformed(null);
        }else{
            Valid.pindah(evt,BtnDokter,NoRujukan);
        }
    }//GEN-LAST:event_BtnSimpanKeyPressed

    private void AsalRujukanKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_AsalRujukanKeyPressed
        Valid.pindah(evt,TNoReg,NoSKDP);
    }//GEN-LAST:event_AsalRujukanKeyPressed

    private void NoSKDPKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_NoSKDPKeyPressed
        Valid.pindah(evt, AsalRujukan,btnPPKRujukan);
    }//GEN-LAST:event_NoSKDPKeyPressed

    private void btnSKDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSKDPActionPerformed
        BPJSSuratKontrol skdp=new BPJSSuratKontrol(null,false);

        skdp.addWindowListener(new WindowListener() {
            @Override
            public void windowOpened(WindowEvent e) {}
            @Override
            public void windowClosing(WindowEvent e) {}
            @Override
            public void windowClosed(WindowEvent e) {
                if(skdp.getTable().getSelectedRow()!= -1){
                    NoSKDP.setText(skdp.getTable().getValueAt(skdp.getTable().getSelectedRow(),9).toString());
                    NoSKDP.requestFocus();
                }
            }
            @Override
            public void windowIconified(WindowEvent e) {}
            @Override
            public void windowDeiconified(WindowEvent e) {}
            @Override
            public void windowActivated(WindowEvent e) {}
            @Override
            public void windowDeactivated(WindowEvent e) {}
        });

        skdp.getTable().addKeyListener(new KeyListener() {
            @Override
            public void keyTyped(KeyEvent e) {}
            @Override
            public void keyPressed(KeyEvent e) {
                if(e.getKeyCode()==KeyEvent.VK_SPACE){
                    skdp.dispose();
                }
            }
            @Override
            public void keyReleased(KeyEvent e) {}
        });

        skdp.setNoRm(TNoPeserta.getText());
        skdp.isCek();
        skdp.setSize(internalFrame1.getWidth()-20,internalFrame1.getHeight()-20);
        skdp.setLocationRelativeTo(internalFrame1);
        skdp.setVisible(true);
    }//GEN-LAST:event_btnSKDPActionPerformed

    private void btnSPRIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSPRIActionPerformed
        skdp2.setNoRm(TNoPeserta.getText());
        skdp2.isCek


t, query, query)
}

func (b *Builder) buildSubquery(inScope *scope, stmt ast.Statement, subQuery string, fullQuery string) (outScope *scope) {
	if inScope == nil {
		inScope = b.newScope()
	}
	switch n := stmt.(type) {
	default:
		b.handleErr(sql.ErrUnsupportedSyntax.New(ast.String(n)))
	case ast.SelectStatement:
		outScope = b.buildSelectStmt(inScope, n)
		if into := n.GetInto(); into != nil {
			b.buildInto(outScope, into)
		}
		return outScope
	case *ast.Analyze:
		return b.buildAnalyze(inScope, n, subQuery)
	case *ast.CreateSpatialRefSys:
		return b.buildCreateSpatialRefSys(inScope, n)
	case *ast.Show:
		return b.buildShow(inScope, n)
	case *ast.DDL:
		return b.buildDDL(inScope, subQuery, fullQuery, n)
	case *ast.AlterTable:
		b.qFlags.Set(sql.QFlagAlterTable)
		return b.buildAlterTable(inScope, subQuery, n)
	case *ast.DBDDL:
		return b.buildDBDDL(inScope, n)
	case *ast.Explain:
		return b.buildExplain(inScope, n)
	case *ast.Insert:
		if n.With != nil {
			cteScope := b.buildWith(inScope, n.With)
			return b.buildInsert(cteScope, n)
		}
		return b.buildInsert(inScope, n)
	case *ast.Delete:
		if n.With != nil {
			cteScope := b.buildWith(inScope, n.With)
			return b.buildDelete(cteScope, n)
		}
		return b.buildDelete(inScope, n)
	case *ast.Update:
		if n.With != nil {
			cteScope := b.buildWith(inScope, n.With)
			return b.buildUpdate(cteScope, n)
		}
		return b.buildUpdate(inScope, n)
	case *ast.Load:
		return b.buildLoad(inScope, n)
	case *ast.Set:
		return b.buildSet(inScope, n)
	case *ast.Use:
		return b.buildUse(inScope, n)
	case *ast.Begin:
		outScope = inScope.push()
		transChar := sql.ReadWrite
		if n.TransactionCharacteristic == ast.TxReadOnly {
			transChar = sql.ReadOnly
		}

		outScope.node = plan.NewStartTransaction(transChar)
	case *ast.Commit:
		outScope = inScope.push()
		outScope.node = plan.NewCommit()
	case *ast.Rollback:
		outScope = inScope.push()
		outScope.node = plan.NewRollback()
	case *ast.Savepoint:
		outScope = inScope.push()
		outScope.node = plan.NewCreateSavepoint(n.Identifier)
	case *ast.RollbackSavepoint:
		outScope = inScope.push()
		outScope.node = plan.NewRollbackSavepoint(n.Identifier)
	case *ast.ReleaseSavepoint:
		outScope = inScope.push()
		outScope.node = plan.NewReleaseSavepoint(n.Identifier)
	case *ast.ChangeReplicationSource:
		return b.buildChangeReplicationSource(inScope, n)
	case *ast.ChangeReplicationFilter:
		return b.buildChangeReplicationFilter(inScope, n)
	case *ast.StartReplica:
		if err := b.cat.AuthorizationHandler().HandleAuth(b.ctx, b.authQueryState, n.Auth); err != nil && b.authEnabled {
			b.handleErr(err)
		}
		outScope = inScope.push()
		startRep := plan.NewStartReplica()
		if binCat, ok := b.cat.(binlogre


ing    | | ✓ |  type可指定三种类型 `fixed` `variable` `waterfall` fixed : item的高度为固定值    variable : item的高度根据内容撑起  waterfall : 瀑布流布局                              |
| remain   | Number \| String    | |  ✓  |  每屏可见的数据条数 |
| size   | Number \| String    |  |   |  size是每一项item的高度。 当type为 `fixed`或 `variable` 时size为必传项。 type为`variable`时 size会被当做每一项的默认高度，当DOM渲染完成后会用真实高度替换此默认高度 |
| screen   | Array    | [ 1 , 1 ]|   |  可视区前后渲染的屏数。 默认值为`[1,1]`,可视区前后各渲染一屏。 例：:screen="[2,3]" 表示可视区前面渲染两屏，可视区后面渲染三屏。 |
| distance   | Number \| String    |50|    |  页面滚动时触发`loadMore`回调的距离,默认为`50` |
| interval   | Number \| String    | 0|   |  `scroll`事件触发间隔,默认为`0` |
| virtualHieght   | String    | 100%|   |  虚拟列表的高度,默认为`100%`。当type为`fixed`时，高度会根据`size`和`remain`属性动态计算出来，不用传入此值。当type为`variable`或 `waterfall`时，若不传入此属性，外部容器必须声明一个高度值。 |
| unit   | String    | px |   |  单位，默认为`px` |
| deleteId   |  Number \| String  |   |  | 动态删除某一项时需要传入当前项目的id值,当type为`fixed`时，不传deleteId,直接`this.data.splice(index,1)`删除也行,此时内部会动态计算高度
| marginBottom   |  Number \| String     |  0 |  |  每项item的间隔距离。 此属性专门为`type='waterfall'`时提供,type为`fixed`或`variable`时此属性无效 |

## Slot

 ```vue
  <lite-virtual-list >
    <!-- 默认slot,可拿到每个item数据 -->
    <template slot="default" slot-scope="{ item }" >
       <div>{{item.id}}</div>
    </template>

    <!-- 底部 -->
    <template slot="bottom">
      <div>加载中...</div>
    </template>
  </lite-virtual-list>
 ```

## Event

### scroll

  页面滚动时触发

  该回调会返回一个对象

  当type为`fixed`或`variable`时,该对象包含以下 property :

- `scrollTop` : 页面滚动的距离

- `renderScrollTop` : 渲染区域距离页面滚动的距离

- `renderData` : 滚动时渲染的数据

当type为`waterfall`时,该对象包含以下 property :

- `scrollTop` : 页面滚动的距离

- `renderLeftScrollTop` : 左列数据渲染区域距离页面滚动的距离

- `renderRightScrollTop` : 右列数据渲染区域距离页面滚动的距离
- `renderLeftData` : 左列滚动被渲染的数据
- `renderLeftData` : 右列滚动时渲染的数据

### domUpdateSuccess

 DOM渲染到页面之后触发

  当type为`fixed`或`variable`时,该回调会返回

  `renderData` : 渲染到页面上的数据

  当type为`variable`时,该回调会返回一个对象,该对象包含


urce">Ann Intern Med. 1999;131:430-3  LinkGoogle Scholar

40.  <contrib-group>
                  Shrestha S </contrib-group>, <contrib-group>
                  Foxman B </contrib-group>, <contrib-group>
                  Weinberger DM </contrib-group>, <contrib-group>et al</contrib-group>. Identifying the interaction between influenza and pneumococcal pneumonia using incidence data. Sci Transl Med. 2013;5:191ra84. [PMID: 23803706] doi:10.1126/scitranslmed.3005982  CrossrefMedlineGoogle Scholar

41.  <contrib-group>
                  Ward CJ </contrib-group>. Influenza vaccination campaigns: is an ounce of prevention worth a pound of cure? Am Econ J Appl Econ. 2014;6:38-72. doi:10.1257/app.6.1.38  <a href="/servlet/linkout?suffix=r41-M193075&dbid=16&


Class) == l, isTrue);
      expect((l as AnonClass2) == l, isTrue);
      expect(anon is AnonClass, isTrue);
      expect(anon is AnonClass2, isTrue);

      // Sanity check that is and as are not broken.
      expect(new Object() is! LazyClass, isTrue);
      expect(new Object() is! AnonClass, isTrue);
      expect(new Object() is! AnonClass2, isTrue);

      expect(<AnonClass>[] is List<AnonClass>, isTrue);
      expect(<AnonClass>[] is List<AnonClass2>, isTrue);
      expect(<int>[] is! List<AnonClass>, isTrue);
      expect(<AnonClass>[] is List<LazyClass>, isTrue);
      expect(<int>[] is! List<LazyClass>, isTrue);
      expect(<LazyClass>[] is List<LazyClass>, isTrue);

      var listLazyClass = <LazyClass?>[];
      Object instanceLazyObject = l;
      expect(() => listLazyClass.add(42 as dynamic), throws); //# 01: ok
      // Regression test for bug where this call failed.
      listLazyClass.add(instanceLazyObject as LazyClass?);
      listLazyClass.add(null);

      dynamic listLazyClassDynamic = listLazyClass;
      expect(() => listLazyClassDynamic.add(42), throws); //# 01: ok
      // Regression test for bug where this call failed.
      listLazyClassDynamic.add(instanceLazyObject);
      listLazyClassDynamic.add(null);

      var genericClass = new ExampleGenericClass<LazyClass?>();
      genericClass.add(instanceLazyObject as LazyClass?);
      expect(() => genericClass.add(42 as dynamic), throws); //# 01: ok
      genericClass.add(null);

      dynamic genericClassDynamic = genericClass;
      genericClassDynamic.add(instanceLazyObject);
      expect(() => genericClassDynamic.add(42), throws); //# 01: ok
      genericClassDynamic.add(null);
    });

    test('mocks', () {
      var mock1 = new Mock1LazyClass();
      expect(mock1 is LazyClass, isTrue);
      expect((mock1 as dynamic) as LazyClass, equals(mock1));
      expect(mock1.a, equals(42));

      var mock2 = new Mock2LazyClass();
      expect(mock2 is LazyClass, isTrue);
      expect((mock2 as dynamic) as LazyClass, equals(mock2));
      expect(mock2.a, equals(42));

      Object other = new Other();
      expect(other is LazyClass, isFalse);
    });
  });

  group('nested lazy class', () {
    test('type literal', () {
      // Fine because we can determine the class literals are equal without
      // having to determine what (non-existent) JS type they correspond to.
      var x = NestedLazyClass;
      var y = NestedLazyClass;
      expect(x == y, isTrue);
    });

    test('reference in type parameter', () {
      var o = new NestedFooImpl();
      expect(o is Foo<NestedLazyClass>, isTrue);
    });

    test('create instance', () {
      var anon = new AnonClass(a: 42);
      // Until NestedLazyClass is defined, fall back to Anon behavior.
      expect(anon is NestedLazyClass, isTrue); //# 01: ok
      expect(new Object() is! NestedLazyClass, isTrue);

      document.body!.append(new ScriptElement()
        ..type = 'text/javascript'
        ..innerHtml = r"""
window.baz = window.baz || {};
window.baz.foo = {};

baz.foo.NestedLazyClass = function NestedLazyClass(a) {
  this.a = a;
};
""");
      var l = new NestedLazyClass(42);
      expect(l.a, equals(42));
      expect(l is NestedLazyClass, isTrue);
      expect(l is AnonClass, isT


版本监控推送插件**

_实时监控游戏版本更新 | 自动推送预下载通知 | 支持多游戏平台_

</div>

---

## ✨ 功能特色

### 🎯 支持游戏

- 🌟 **原神** (Genshin Impact)
- ⭐ **崩坏：星穹铁道** (Honkai: Star Rail)
- 🔥 **绝区零** (Zenless Zone Zero)
- ⚡ **崩坏 3** (Honkai Impact 3rd)
- 🌊 **鸣潮** (Wuthering Waves)

### 🛠 核心功能

- 📱 **版本监控** - 实时检测游戏版本更新
- 🔔 **自动推送** - 版本更新及预下载通知
- ⚙ **灵活配置** - 支持开启/关闭推送功能
- 🕐 **定时任务** - 自动定时检查更新
- 💾 **Redis 存储** - 高效的数据管理
- 🎛 **Guoba、Karin-Web 支持** - 可视化配置界面

---

## 📦 安装指南

### 前置要求

- ✅ [Miao-Yunzai](https://github.com/yoimiya-kokomi/Miao-Yunzai) , [TRSS-Yunzai](https://gitee.com/TimeRainStarSky/Yunzai), [Karin](https://github.com/KarinJS/Karin)
- ✅ [nodejs 22+](https://nodejs.org/zh-cn/download)
- ✅ [Redis 数据库](https://redis.io/)

### 安装步骤

1. **克隆插件**

```bash
# 使用 Miao-Yunzai 和 TRSS-Yunzai
## 使用GitCode
git clone https://gitcode.com/rainbowwarmth/GamePush-Plugin.git ./plugins/GamePush-Plugin
## 使用Gitee
git clone https://gitee.com/rainbowwarmth/GamePush-Plugin.git ./plugins/GamePush-Plugin
## 使用CNB
git clone https://cnb.cool/rainbowwarmth/GamePush-Plugin.git ./plugins/GamePush-Plugin
## 使用GitHub
git clone https://github.com/rainbowwarmth/GamePush-Plugin.git ./plugins/GamePush-Plugin

# 使用 Karin
## 使用GitCode
git clone https://gitcode.com/rainbowwarmth/GamePush-Plugin.git ./plugins/karin-plugin-gamepush
## 使用Gitee
git clone https://gitee.com/rainbowwarmth/GamePush-Plugin.git ./plugins/karin-plugin-gamepush
## 使用CNB
git clone https://cnb.cool/rainbowwarmth/GamePush-Plugin.git ./plugins/karin-plugin-gamepush
## 使用GitHub
git clone https://github.com/r


불완전한 드레니시스트 조각을 사용해 고향으로 돌아갈 수 있을지는 솔직히 모르겠어요. 하지만 드레나이에게는 다른 용도라도 유용하게 쓰일 거예요.","그러니 불완전한 드레니시스트 조각을 찾게 되면 제게 가지고 오세요. 사례를 해드리죠."}, {"굼이샤에게 불완전한 드레니시스트 조각을 가져다주고 각 파편에 대해 보상을 받으십시오."}},
[3502] = {"어느 드레나이의 잡동사니...", {"탐욕스러운 모습을 보면 구역질이 나요.","견딜 수가 없어요. 이제부터 물질에 대한 <race>들의 집착에는 신경 안 쓰겠어요.","불완전한 드레니시스트 조각을 가져올 때마다 제 잡동사니를 드리겠어요. 제 잡동사니 더미는 줄어들고 당신 잡동사니 더미는 늘어나니, 이런 걸 보고 드레노어 속담에 '누이 좋고 매부 좋고'라고 하지요."}, {"굼이샤에게 불완전한 드레니시스트 조각을 가져가십시오. 그 조각은 저주받은 땅에 있는 모든 야수가 지니고 있을 수도 있습니다."}},
[3503] = {"사나스의 스승", nil, nil},
[3504] = {"배신", {"배신자, 도둑! 나는 그녀를 그렇게 부르지. 그 정도밖에 안 되는 여자니까 말이오!","블러드 엘프를 믿은 내 잘못도 크지만 그보다 더한 건 여자를 믿었다는 거겠지!","그녀의 말만 믿은 내가 바보지! 아즈샤라에 엄청난 재물과 귀한 물건들이 있으니 그녀를 보호할 전사 몇을 보내면 그 대가로 보상을 받기로 했었단 말이오. 이런, 그녀가 그 전사들을 모조


 "fù",
    "2A0C2": "liú",
    "2A0C4": "sāi",
    "2A0C5": "xuē",
    "2A0C6": "zòu",
    "2A0C8": "jié",
    "2A0CB": "zhān",
    "2A0CD": "yú",
    "2A0CE": "yú",
    "2A0CF": "méi",
    "2A0D0": "miǎo",
    "2A0D1": "mào",
    "2A0D2": "duó",
    "2A0D3": "fù",
    "2A0DB": "jiàn",
    "2A0E6": "miáo",
    "2A0E8": "āo",
    "2A0ED": "kè",
    "2A0F6": "hóu",
    "2A0FA": "gòu",
    "2A0FC": "xī",
    "2A0FE": "róng",
    "2A0FF": "gē",
    "2A100": "pán",
    "2A101": "yuán",
    "2A102": "xià",
    "2A105": "shā",
    "2A106": "pī",
    "2A108": "qíng",
    "2A109": "yōng",
    "2A10A": "qú",
    "2A10C": "gòng",
    "2A10E": "gé",
    "2A10F": "xiān",
    "2A111": "sù",
    "2A115": "bān",
    "2A116": "qí",
    "2A117": "hòu",
    "2A11B": "xī",
    "2A11D": "wū",
    "2A12D": "qī",
    "2A12E": "hù",
    "2A12F": "guī",
    "2A131": "dí",
    "2A132": "shāng",
    "2A133": "mài",
    "2A134": "mǐn",
    "2A135": "jì",
    "2A136": "xí",
    "2A137": "xiān",
    "2A138": "jí",
    "2A139": "cháng",
    "2A13A": "kòu",
    "2A13B": "chōng",
    "2A142": "zhāng",
    "2A143": "piǎo",
    "2A144": "sù",
    "2A145": "lüè",
    "2A146": "lí",
    "2A147": "mèng",
    "2A148": "chōng",
    "2A149": "tiān",
    "2A14B": "líng",
    "2A14D": "chì",
    "2A156": "chōng",
    "2A159": "chì",
    "2A15D": "niǎo",
    "2A15F": "yóng",
    "2A16E": "mì",
    "2A170": "shū",
    "2A172": "xì",
    "2A174": "è",
    "2A175": "zī",
    "2A178": "jié",
    "2A179": "jī",
    "2A17A": "hōu",
    "2A17B": "shèng",
    "2A17C": "lì",
    "2A17E": "qī",
    "2A180": "zhōu",
    "2A181": "sī",
    "2A182": "qú",


(by=5_c), slice(by=6), slice(by=7_c))), unit);
  TTS_TYPED_EQUAL(get<3>(shp(slice(by=4), slice(by=5_c), slice(by=6), slice(by=7_c))), fixed<unit>);

  TTS_TYPED_EQUAL(get<0>(shp0(slice(by=4), slice(by=5_c), slice(by=6), slice(by=7_c))), zero);
  TTS_TYPED_EQUAL(get<1>(shp0(slice(by=4), slice(by=5_c), slice(by=6), slice(by=7_c))), zero);
  TTS_TYPED_EQUAL(get<2>(shp0(slice(by=4), slice(by=5_c), slice(by=6), slice(by=7_c))), zero);
  TTS_TYPED_EQUAL(get<3>(shp0(slice(by=4), slice(by=5_c), slice(by=6), slice(by=7_c))), fixed<zero>);
};

TTS_CASE("Check slicing for kwk::by")
{
  using namespace kwk::literals;
  using kwk::slice;
  using kwk::by;
  using kwk::fixed;
  using kwk::of_size;

  constexpr int d0 = 17, d1 = 29;
  auto d2 = fixed<23>;
  auto d3 = fixed<97>;

  auto shp = of_size(d0, d1, d2, d3);

  constexpr int v0 = 4, v2 = 6, one = 1;
  auto v1 = fixed<5>;
  auto v3 = fixed<7>;

  auto e0 = slice(by=v0);
  auto e1 = slice(by=v1);
  auto e2 = slice(by=v2);
  auto e3 = slice(by=v3);

  TTS_EQUAL( shp(e0, e1, e2, e3), of_size(d0/v0+1, d1/v1+1,d2/v2+1, d3/v3+1));

  TTS_TYPED_EQUAL(get<0>(shp(e0, e1, e2, e3)), d0/v0+one);
  TTS_TYPED_EQUAL(get<1>(shp(e0, e1, e2, e3)), d1/v1+one);
  TTS_TYPED_EQUAL(get<2>(shp(e0, e1, e2, e3)), d2/v2+one);
  TTS_TYPED_EQUAL(get<3>(shp(e0, e1, e2, e3)), d3/v3+fixed<one>);
};

TTS_CASE("Check exact slicing for kwk::by")
{
  using namespace kwk::literals;
  using kwk::slice;
  using kwk::by;
  using kwk::fixed;
  using kwk::of_size;

  constexpr std::ptrdiff_t d0 = 33, d1 = 99;
  auto d2 = fixed<100>;
  auto d3 = fixed<1000>;

  auto shp = of_size(d0, d1, d2, d3);

  constexpr std::ptrdiff_t v0 = 3, v2 = 10;
  auto v1 = fixed<std::ptrdiff_t{9}>;
  auto v3 = fixed<std::ptrdiff_t{5}>;

  auto e0 = slice(by=v0);
  auto e1 = slice(by=v1);
  auto e2 = slice(by=v2);
  auto e3 = slice(by=v3);

  TTS_EQUAL( shp(e0, e1, e2, e3), of_size(d0/v0, d1/v1, d2/v2, d3/v3));

  TTS_TYPED_EQUAL(get<0>(shp(e0, e1, e2, e3)), d0/v0);
  TTS_TYPED_EQUAL(get<1>(shp(e0, e1, e2, e3)), d1/v1);
  TTS_TYPED_EQUAL(get<


} else {
            mSrcBitmap = null
            mPieces = null
        }
        val pieces = mPieces
        if (pieces != null) {
            for (i in 0 until m) {
                for (j in 0 until n) {
                    mRect.left = 0
                    mRect.top = 0
                    mRect.right = if (i < m - 1) MAX_LENGTH else dw and 0xFFF
                    mRect.bottom = if (j < n - 1) MAX_LENGTH else dh and 0xFFF
                    canvas.save()
                    canvas.translate((i shl 12).toFloat(), (j shl 12).toFloat())
                    val bitmap = pieces[m * i + j]
                    if (bitmap != null) {
                        canvas.drawBitmap(bitmap, null, mRect, null)
                    }
                    canvas.restore()
                }
            }
        } else {
            super.onDraw(canvas)
        }
    }

    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
        if (srcWidth > 0 && srcHeight > 0) {
            val width = MeasureSpec.getSize(widthMeasureSpec)
            val height: Int = if (width > 0) {
                width * srcHeight / srcWidth
            } else {
                MeasureSpec.getSize(heightMeasureSpec)
            }
            setMeasuredDimension(width, height)
        } else {
            super.onMeasure(widthMeasureSpec, heightMeasureSpec)
        }
    }

    companion object {
        private const val MAX_LENGTH = 4096
    }
}
package com.example.doodle.main.test

import android.os.Build
import android.os.Bundle
import android.view.View
import com.example.doodle.R
import com.example.doodle.base.BaseActivity
import com.example.doodle.util.onClick
import kotlinx.android.synthetic.main.activity_example.*

class ExampleActivity : BaseActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_example)

        test_asset_btn.onClick {
            startActivity(TestAssetActivity::class.java)
        }

        test_gif_btn.onClick {
            startActivity(TestGifActivity::class.java)
        }

        test_svg_btn.onClick {
            startActivity(TestSvgActivity::class.java)
        }

        test_pag_btn.onClick {
            startActivity(TestPagActivity::class.java)
        }

        // ImageDecoder available on Android P.
        // ImageDecoder support decoding animated webp image.
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
            test_animated_webp_btn.visibility = View.VISIBLE
            test_animated_webp_btn.onClick {
                startActivity(TestAnimatedWebPActivity::class.java)
            }
        }

        test_http_btn.onClick {
            startActivity(TestHttpActivity::class.java)
        }

        test_rotated_btn.onClick {
            startActivity(TestRotatedActivity::class.java)
        }

        test_transformation_btn.onClick {
            startActivity(TestTransformationActivity::class.java)
        }
    }
}
package server.db

import server.config.ConfigManager
import java.util.concurrent.atomic.AtomicLong

/**
 * ID的构造 服务ID+自增序列
 * 最高16bit保留
 * 服务ID有8bit（255)
 * 递增序列有40bit (一万亿）
 *
 * 开发者可以根据情况具体分配
 */
object IdGenerator {
    private const val SEQ_BIT = 40
    private const val SEQ_MASK = 0xFFFFFFFFFFL
    private val UPPER_SEQ: Long

    private var UDID_SEQ = AtomicLong(0L)

    init {
        // 划分8bit给服务ID，是为了可以分布式生成ID
        // 如果不需要多台服务器，可以把bit都分给递增序列
        val serverId: Long = Config


i. Một việc mà đến cả tưởng tượng ta cũng không thể tưởng tượng ra. Vì ‘vừa phải’ không phải tính cách của Thanh Minh đạo trưởng.”

(..... ....... ... ..... ......  Bản dịch được thực hiện bởi A-H Team, đăng tải độc quyền tại VLOGNOVEL.COM. Hãy đón xem bản dịch sớm nhất tại VLOGNOVEL.COM.)

“...”

Đường Tiểu Tiểu không thể phủ nhận lời này. Nàng ta cũng không thể tưởng tượng đến việc Thanh Minh sẽ ngoan ngoãn ngồi im ngậm miệng trong vài ngày. Chắc chắn Thanh Minh đã làm ra chuyện mà chỉ nghe thôi cũng thấy đau đầu rồi.

“Rõ ràng là Thanh Minh đạo trưởng đang làm ra một việc vô lý nhưng cũng rất hợp lý. Chính vì tò mò điều đó nên ta mới không thể nhẫn nại được.”

“Vậy sao Tiểu Gia Chủ không ở lại đợi tin rồi sau đó hẵng xuất phát?”

“Đạo trưởng cũng biết chúng ta không còn thời gian để làm việc đó mà?”

Đường Tiểu Tiểu cạn lời thở dài.

‘Con người có thay đổi thì cũng thay đổi vừa vừa phải phải thôi chứ.’

Dĩ nhiên là Nam Cung Độ Huy của hiện tại vẫn tốt hơn Nam Cung Độ Huy ngạo mạn và khó ưa của lúc trước. Nhưng Nam Cung Độ Huy lúc này… phải gọi là gì nhỉ… là kiểu người không thể thỏa hiệp được chăng?

“Vậy thì may rồi.”

“Sao lại may?”

“Vì Tiểu Gia Chủ sẽ biết sớm thôi. Nhìn đi, là Hoa Âm kìa.”

&


onfig. If the configuration
is a bit more complicated, it is nice to manually reformat it and
separate it into sections, with a comment before each section. Typical
sections are Architecture, Toolchain options (typically just linux
headers version), Firmware, Bootloader, Kernel, and Filesystem.

Always use fixed versions or commit hashes for the different
components, not the "latest" version. For example, set
BR2_LINUX_KERNEL_CUSTOM_VERSION=y and
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE to the kernel version you tested
with.

It is recommended to use as much as possible upstream versions of the
Linux kernel and bootloaders, and to use as much as possible default
kernel and bootloader configurations. If they are incorrect for your
board, or no default exists, we encourage you to send fixes to the
corresponding upstream projects.

However, in the mean time, you may want to store kernel or bootloader
configuration or patches specific to your target platform. To do so,
create a directory board/<manufacturer> and a subdirectory
board/<manufacturer>/<boardname>. You can then store your patches
and configurations in these directories, and reference them from the main
Buildroot configuration. Refer to Chapter 9, Project-specific customization for more details.

Before submitting patches for new boards it is recommended to test it by
building it using latest gitlab-CI docker container. To do this use
utils/docker-run script and inside it issue these commands:

 $ make +<boardname>_defconfig+
 $ make

Chapter 18. Adding new packages to Buildroot

This section covers how new packages (userspace libraries or
applications) can be integrated into Buildroot. It also shows how
existing packages are integrated, which is needed for fixing issues or
tuning their configuration.

When you add a new package, be sure to test it in various conditions
(see Section 18.25.3, “How to test your package”) and also check it for coding style (see
Section 18.25.2, “How to check the coding style”).

18.1. Package directory

First of all, create a directory under the package directory for
your software, for example libfoo.

Some packages have been grouped by topic in a sub-directory:
x11r7, qt5 and gstreamer. If your package fits in
one of these categories, then create your package directory in these.
New subdirectories are discouraged, however.

<


import pytest
import logging

from tests.common.helpers.gnmi_utils import gnmi_capabilities
from tests.common.plugins.allure_wrapper import allure_step_wrapper as allure
from tests.gnmi_e2e.helper import setup_invalid_client_cert_cname        # noqa: F401

logger = logging.getLogger(__name__)
allure.logger = logger

pytestmark = [
    pytest.mark.topology('any'),
    pytest.mark.disable_loganalyzer
]

def test_gnmi_authorize_passed_with_valid_cname(duthosts,
                                                rand_one_dut_hostname,
                                                localhost):
    '''
    Verify GNMI native write, incremental config for configDB
    GNMI set request with invalid path
    '''
    duthost = duthosts[rand_one_dut_hostname]
    ret, msg = gnmi_capabilities(duthost, localhost)
    logger.debug("test_gnmi_authorize_passed_with_valid_cname: {}".format(msg))

    assert "Unauthenticated" not in msg, (
        "'Unauthenticated' error message found in GNMI response. "
        "- Actual message: '{}'"
    ).format(msg)

def test_gnmi_authorize_failed_with_invalid_cname(duthosts,
                                                  rand_one_dut_hostname,
                                                  localhost,
                                                  setup_invalid_client_cert_cname):    # noqa: F811
    '''
    Verify GNMI native write, incremental config for configDB
    GNMI set request with invalid path
    '''
    duthost = duthosts[rand_one_dut_hostname]
    ret, msg = gnmi_capabilities(duthost, localhost)
    logger.debug("test_gnmi_authorize_failed_with_invalid_cname: {}".format(msg))

    assert "Unauthenticated" in msg, (
        "'Unauthenticated' error message not found in GNMI response. "
        "- Actual message: '{}'"
    ).format(msg)


/*
 * vim:ts=4:sw=4:expandtab
 *
 * i3 - an improved tiling window manager
 * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
 *
 */
#include "libi3.h"

#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>

/*
 * Get the path of the first configuration file found. If override_configpath is
 * specified, that path is returned and saved for further calls. Otherwise,
 * checks the home directory first, then the system directory, always taking
 * into account the XDG Base Directory Specification ($XDG_CONFIG_HOME,
 * $XDG_CONFIG_DIRS).
 *
 */
char *get_config_path(const char *override_configpath, bool use_system_paths) {
    char *xdg_config_home, *xdg_config_dirs, *config_path;

    static const char *saved_configpath = NULL;

    if (override_configpath != NULL) {
        saved_configpath = override_configpath;
        return sstrdup(saved_configpath);
    }

    if (saved_configpath != NULL) {
        return sstrdup(saved_configpath);
    }

    /* 1: check for $XDG_CONFIG_HOME/i3/config */
    if ((xdg_config_home = getenv("XDG_CONFIG_HOME")) == NULL) {
        xdg_config_home = "~/.config";
    }

    xdg_config_home = resolve_tilde(xdg_config_home);
    sasprintf(&config_path, "%s/i3/config", xdg_config_home);
    free(xdg_config_home);

    if (path_exists(config_path)) {
        return config_path;
    }
    free(config_path);

    /* 2: check the traditional path under the home directory */
    config_path = resolve_tilde("~/.i3/config");
    if (path_exists(config_path)) {
        return config_path;
    }
    free(config_path);

    /* The below paths are considered system-level, and can be skipped if the
     * caller only wants user-level configs. */
    if (!use_system_paths) {
        return NULL;
    }

    /* 3: check for $XDG_CONFIG_DIRS/i3/config */
    if ((xdg_config_dirs = getenv("XDG_CONFIG_DIRS")) == NULL) {
        xdg_config_dirs = SYSCONFDIR "/xdg";
    }

    char *buf = sstrdup(xdg_config_dirs);
    char *tok = strtok(buf, ":");
    while (tok != NULL) {
        tok = resolve_tilde(tok);
        sasprintf(&config_path, "%s/i3/config", tok);
        free(tok);
        if (path_exists(config_path)) {
            free(buf);
            return config_path;
        }
        free(config_path);
        tok = strtok(NULL, ":");
    }
    free(buf);

    /* 4: check the traditional path under /etc */
    config_path = SYSCONFDIR "/i3/config";
    if (path_exists(config_path)) {
        return sstrdup(config_path);
    }

    return NULL;
}


bcampaign/(?P<campaign_id>[0-9]+)/$',
                           SubscriberPerCampaignList.as_view(), name="subscriber_campaign"),
                       url(r'^rest-api/subcampaign/(?P<campaign_id>[0-9]+)/(?P<contact_id>[0-9]+)/$',
                           SubscriberPerCampaignList.as_view(), name="subscriber_campaign"),

                       url(r'^rest-api/surveyaggregate/$', SurveyAggregateResultViewSet.as_view(), name="survey_aggregate_result"),
                       url(r'^rest-api/surveyaggregate/(?P<survey_id>[0-9]+)/$',
                           SurveyAggregateResultViewSet.as_view(), name="survey_aggregate_result"),

                       url(r'^rest-api/bulkcontact/$', BulkContactViewSet.as_view(), name="bulk_contact"),

                       # subscriber rest api
                       url(r'^rest-api/subscriber/$', SubscriberViewSet.as_view(), name="subscriber_contact"),

                       url(r'^rest-api/', include(router.urls)),
                       url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
                       )


ple-500:hover {
  color: #8b5cf6;
}

.hover\:text-purple-600:hover {
  color: #7c3aed;
}

.hover\:text-purple-700:hover {
  color: #6d28d9;
}

.hover\:text-purple-800:hover {
  color: #5b21b6;
}

.hover\:text-purple-900:hover {
  color: #4c1d95;
}

.hover\:text-pink-50:hover {
  color: #fdf2f8;
}

.hover\:text-pink-100:hover {
  color: #fce7f3;
}

.hover\:text-pink-200:hover {
  color: #fbcfe8;
}

.hover\:text-pink-300:hover {
  color: #f9a8d4;
}

.hover\:text-pink-400:hover {
  color: #f472b6;
}

.hover\:text-pink-500:hover {
  color: #ec4899;
}

.hover\:text-pink-600:hover {
  color: #db2777;
}

.hover\:text-pink-700:hover {
  color: #be185d;
}

.hover\:text-pink-800:hover {
  color: #9d174d;
}

.hover\:text-pink-900:hover {
  color: #831843;
}

.focus\:text-transparent:focus {
  color: transparent;
}

.focus\:text-current:focus {
  color: currentColor;
}

.focus\:text-black:focus {
  color: #000;
}

.focus\:text-white:focus {
  color: #fff;
}

.focus\:text-gray-50:focus {
  color: #f9fafb;
}

.focus\:text-gray-100:focus {
  color: #f3f4f6;
}

.focus\:text-gray-200:focus {
  color: #e5e7eb;
}

.focus\:text-gray-300:focus {
  color: #d1d5db;
}

.focus\:text-gray-400:focus {
  color: #9ca3af;
}

.focus\:text-gray-500:focus {
  color: #6b7280;
}

.focus\:text-gray-600:focus {
  color: #4b5563;
}

.focus\:text-gray-700:focus {
  color: #374151;
}

.focus\:text-gray-800:focus {
  color: #1f2937;
}

.focus\:text-gray-900:focus {
  color: #111827;
}

.focus\:text-red-50:focus {
  color: #fef2f2;
}

.focus\:text-red-100:focus {
  color: #fee2e2;
}

.focus\:text-red-200:focus {
  color: #fecaca;
}

.focus\:text-red-300:focus {
  color: #fca5a5;
}

.focus\:text-red-400:focus {
  color: #f87171;
}

.focus\:text-red-500:focus {
  color: #ef4444;
}

.focus\:text-red-600:focus {
  color: #dc2626;
}

.focus\:text-red-700:focus {
  color: #b91c1c;
}

.focus\:text-red-800:focus {
  color: #991b1b;
}

.focus\:text-red-900:focus {
  color: #7f1d1d;
}

.focus\:text-


        if(mAuthResponse.has("certificate"))
        {
            error_response["certificate"] = mAuthResponse["certificate"];
        }
        sendProgressEvent("offline", "fail.login", error_response);
    }
    catch (...) {
        LOG_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << LLCoros::getName()
                                          << "('" << uri << "', " << printable_params << ")"));
        throw;
    }
}

void LLLogin::Impl::disconnect()
{
    sendProgressEvent("offline", "disconnect");
}

//*********************
// LLLogin
LLLogin::LLLogin() :
    mImpl(new LLLogin::Impl())
{
}

LLLogin::~LLLogin()
{
}

void LLLogin::connect(const std::string& uri, const LLSD& credentials)
{
    mImpl->connect(uri, credentials);
}

void LLLogin::disconnect()
{
    mImpl->disconnect();
}

LLEventPump& LLLogin::getEventPump()
{
    return mImpl->getEventPump();
}

// The following is the list of important functions that happen in the
// current login process that we want to move to this login module.

// The list associates to event with the original idle_startup() 'STATE'.

// Setup login
// State_LOGIN_AUTH_INIT

// Authenticate
// STATE_LOGIN_AUTHENTICATE
// Connect to the login server, presumably login.cgi, requesting the login
// and a slew of related initial connection information.
// This is an asynch action. The final response, whether success or error
// is handled by STATE_LOGIN_PROCESS_REPONSE.
// There is no immediate error or output from this call.
//
// Input:
//  URI
//  Credentials (first, last, password)
//  Start location
//  Bool Flags:
//    skip optional update
//    accept terms of service
//    accept critical message
//  Last exec event. (crash state of previous session)
//  requested optional data (inventory skel, initial outfit, etc.)
//  local mac address
//  viewer serial no. (md5 checksum?)

//sAuthUriNum = llclamp(sAuthUriNum, 0, (S32)sAuthUris.size()-1);
//LLUserAuth::getInstance()->authenticate(
//  sAuthUris[sAuthUriNum],
//  auth_method,
//  firstname,
//  lastname,
//  password, // web_login_key,
//  start.str(),
//  gSkipOptionalUpdate,
//  gAcceptTOS,
//  gAcceptCriticalMessage,
//  gLastExecEvent,
//  requested_options,
//  hashed_mac_string,
//  LLAppViewer::instance()->getSerialNumber());

//
// Download the Response
// STATE_LOGIN_NO_REPONSE_YET and STATE_LOGIN_DOWNLOADING
// I had assumed that this was default behavior of the message system. However...
// During login, the message system is checked only by these two states in idle_startup().
// I guess this avoids the overhead of checking network messages for those login states
// that don't need to do so, but geez!
// There are two states to do this one function just to update the login
// status text from 'Logging In...' to 'Downloading...'
//

//
// Handle Login Response
// STATE_LOGIN_PROCESS_RESPONSE
//
// This state handle the result of the request to login. There is a metric ton of
// code in this case. This state will transition to:
// STATE_WORLD_INIT, on success.
// STATE_AUTHENTICATE, on failure.
// STATE_UPDATE_CHECK, to handle user during login interaction like TOS display.
//
// Much of the code in this case belongs on the viewer side of the fence and not in login.
// Login should probably return with a couple of events, success and failure.
// Failure conditions can be specified in the events data pacet to allow the viewer
// to re-engauge login as is appropriate. (Or should there


{
				string selectedConfigKey = configKeys[menu.Option];

				if (buttons == MenuButtons.Select)
				{
					ApplySelectedConfig(player, selectedConfigKey);
				}
			}
		}, false, _coreAccessor.GetValue<bool>("Core", "FreezeInMenu") && (GetZenithPlayer(player)?.GetSetting<bool>("FreezeInMenu", "K4-Zenith") ?? true), 5, disableDeveloper: !_coreAccessor.GetValue<bool>("Core", "ShowDevelopers"));
	}

	private void ShowChatTagSelectionMenu(CCSPlayerController player, List<string> configKeys)
	{
		ChatMenu tagMenu = new ChatMenu(Localizer.ForPlayer(player, "customtags.menu.title"));

		foreach (var configKey in configKeys)
		{
			string displayName = configKey;
			if (_predefinedConfigs?.TryGetValue(configKey, out var config) == true)
			{
				displayName = config.Name;
			}
			else if (configKey == "none")
			{
				displayName = Localizer.ForPlayer(player, "customtags.menu.none");
			}
			else if (configKey == "default")
			{
				displayName = Localizer.ForPlayer(player, "customtags.menu.default");
			}

			tagMenu.AddMenuOption($"{ChatColors.Gold}{displayName}", (p, o) =>
			{
				ApplySelectedConfig(p, configKey);
			});
		}

		MenuManager.OpenChatMenu(player, tagMenu);
	}

	private void ApplySelectedConfig(CCSPlayerController player, string selectedConfigKey)
	{
		var zenithPlayer = GetZenithPlayer(player);
		if (zenithPlayer == null)
		{
			Logger.LogError($"Failed to get player services for {player.PlayerName}");
			return;
		}

		if (selectedConfigKey == "default")
		{
			zenithPlayer.SetStorage("ChoosenTag", "Default");
			ApplyTagConfig(player);
			_moduleServices?.PrintForPlayer(player, Localizer.ForPlayer(player, "customtags.applied.default"));
		}
		else if (selectedConfigKey == "none")
		{
			zenithPlayer.SetStorage("ChoosenTag", "None");
			ApplyNullConfig(zenithPlayer);
			_moduleServices?.PrintForPlayer(player, Localizer.ForPlayer(player, "customtags.applied.none"));
		}
		else if (_predefinedConfigs?.TryGetValue(selectedConfigKey, out var selectedPredefinedConfig) == true)
		{
			zenithPlayer.SetStorage("ChoosenTag", selectedConfigKey);
			ApplyConfig(zenithPlayer, selectedPredefinedConfig);
			_moduleServices?.PrintForPlayer(player, Localizer.ForPlayer(player, "customtags.applied.config", selectedPredefinedConfig.Name));
		}
		else
		{
			_moduleServices?.PrintForPlayer(player, $"Invalid tag configuration: {selectedConfigKey}");
		}
	}

	private void EnsureConfigFileExists()
	{
		string configPath = Path.Combine(ModuleDirectory, "tags.json");
		if (!File.Exists(configPath))
		{
			var defaultConfig = new Dictionary<string, TagConfig>
			{
				["all"] = new TagConfig
				{
					ClanTag = "Player | ",
					NameColor = "white",
					NameTag = "{white}[Player] ",
					AvailableConfigs = ["player"]
				},
				["@zenith/root"] = new TagConfig
				{
					ChatColor = "lightred",
					ClanTag = "OWNER | ",
					NameColor = "lightred",
					NameTag = "{lightred}[OWNER] ",
					AvailableConfigs = ["owner"]
				},
				["@css/admin"] = new TagConfig
				{
					ClanTag = "ADMIN | ",
					NameColor = "blue",
					NameTag = "{blue}[ADMIN] ",
					AvailableConfigs = ["admin"]
				},
				["76561198345583467"] = new TagConfig
				{
					ChatColor = "gold",
					ClanTag =


argsSchema);
        if (!runOptions) return;

        // Ensure no other copies of this script are running (they share memory)
        const scriptName = ns.getScriptName();
        const competingDaemons = processList(ns, daemonHost, false /* Important! Don't use the (global shared) cache. */)
            .filter(s => s.filename == scriptName && s.pid != ns.pid);
        if (competingDaemons.length > 0) { // We expect only 1, due to this logic, but just in case, generalize the code below to support multiple.
            const daemonPids = competingDaemons.map(p => p.pid);
            log(ns, `Info: Killing another '${scriptName}' instance running on home (pid: ${daemonPids} args: ` +
                `[${competingDaemons[0].args.join(", ")}]) with new args ([${ns.args.join(", ")}])...`, true)
            const killPid = await killProcessIds(ns, daemonPids);
            await waitForProcessToComplete_Custom(ns, getHomeProcIsAlive(ns), killPid);
            await ns.sleep(loopInterval); // The game can be slow to kill scripts, give it an extra bit of time.
        }

        disableLogs(ns, ['getServerMaxRam', 'getServerUsedRam', 'getServerMoneyAvailable', 'getServerGrowth', 'getServerSecurityLevel', 'exec', 'scan', 'sleep']);
        // Reset global vars on startup since they persist in memory in certain situations (such as on Augmentation)
        // TODO: Can probably get rid of all of this now that the entire script is wrapped in the main function.
        lastUpdate = "";
        lastUpdateTime = Date.now();
        maxTargets = 2;
        lowUtilizationIterations = highUtilizationIterations = 0;
        allHostNames = [], _allServers = [], homeServer = null;
        resetServerSortCache();
        ownedCracks = [];
        psCache = {};
        // XpMode Related Caches
        singleServerLimit = 0, lastCycleTotalRam = 0; // Cache of total ram on the server to check whether we should attempt to lift the above restriction.
        targetsByExp = [], jobHostMappings = {}, farmXpReentryLock = [], nextXpCycleEnd = [];
        loopsHackThreadsByServer = {}, loopsByServer_Grow = {}, loopsByServer_Weaken = {};
        // Stock mode related caches
        serversWithOwnedStock = [], shouldManipulateGrow = [], shouldManipulateHack = [];
        failedStockUpdates = 0;

        // Get information about the player's current stats (also populates a cache)
        const playerInfo = await getPlayerInfo(ns);

        // Try to get "resetInfo", with a fallback for a failed dynamic call (i.e. low-ram conditions)
        let resetInfo;
        try {
            resetInfo = await getNsDataThroughFile(ns, `ns.getResetInfo()`);
        } catch {
            resetInfo = { currentNode: 1, lastAugReset: Date.now() };
        }
        bitNodeN = resetInfo.currentNode;
        dictSourceFiles = await getActiveSourceFiles_Custom(ns, getNsDataThroughFile);
        log(ns, "The following source files are active: " + JSON.stringify(dictSourceFiles));

        // Process configuration
        options = runOptions;
        hackOnly = options.h || options['hack-only'];
        xpOnly = options.x || options['xp-only'];
        stockMode = (options.s || options['stock-manipulation'] || options['stock-manipulation-focus']) && !options['disable-stock-manipulation'];
        stockFocus = options['stock-manipulation-focus'] && !options['disable-stock-manipulation'];
        useHacknetNodes = options.n || options['use-hacknet-nodes'] || options['use-hacknet-servers'];
        verbose = options.v || options['verbose'];
        runOnce = options.o || options['run-once'];
        loopingMode = options['looping-