S.UNSADDLE"] = {
        ["author"] = "lan (该常量值为: true)",
        ["tips"] = "UNKNOWN"
    },
    ["TOOLACTIONS.DIG"] = {
        ["author"] = "lan (该常量值为: true)",
        ["tips"] = "UNKNOWN"
    },
    ["TOOLACTIONS.CHOP"] = {
        ["author"] = "lan (该常量值为: true)",
        ["tips"] = "UNKNOWN"
    },
    ["TOOLACTIONS.HAMMER"] = {
        ["author"] = "lan (该常量值为: true)",
        ["tips"] = "UNKNOWN"
    },
    ["TOOLACTIONS.SCYTHE"] = {
        ["author"] = "lan (该常量值为: true)",
        ["tips"] = "UNKNOWN"
    },
    ["TOOLACTIONS.REACH_HIGH"] = {
        ["author"] = "lan (该常量值为: true)",
        ["tips"] = "UNKNOWN"
    },
    ["TOOLACTIONS.MINE"] = {
        ["author"] = "lan (该常量值为: true)",
        ["tips"] = "UNKNOWN"
    },
    ["TOOLACTIONS.NET"] = {
        ["author"] = "lan (该常量值为: true)",
        ["tips"] = "UNKNOWN"
    },
    ["TOOLACTIONS"] = {
        ["author"] = "lan (该常量值为: 表)",
        ["tips"] = "UNKNOWN"
    },
    ["TOOLACTIONS.PLAY"] = {
        ["author"] = "lan (该常量值为: true)",
        ["tips"] = "UNKNOWN"
    },
    ["DEPLOYMODE.DEFAULT"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 1)"
    },
    ["DEPLOYMODE.ANYWHERE"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 2)"
    },
    ["DEPLOYMODE.NONE"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 0)"
    },
    ["DEPLOYMODE.WATER"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 6)"
    },
    ["DEPLOYMODE.WALL"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 5)"
    },
    ["DEPLOYMODE.CUSTOM"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 7)"
    },
    ["DEPLOYMODE"] = {
        ["tips"] = "this is a net_tinybyte on inventoryitem_classified.deploymode",
        ["author"] = "lan (该常量值为: 表)"
    },
    ["DEPLOYMODE.PLANT"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 4)"
    },
    ["DEPLOYMODE.TURF"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 3)"
    },
    ["DEPLOYMODE.MAST"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 7)"
    },
    ["BUILDMODE.LAND"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 1)"
    },
    ["BUILDMODE.NONE"] = {
        ["tips"] = "UNKNOWN",
        ["author"] = "lan (该常量值为: 0)"
    },
    ["BUILDMODE.WATER"] = {
        ["tips"] = "


dumpLen);
  dumpLen += getFaceIndicesCount() * sizeof(FaceIndex);

  MemorySaveCB gridSave(16 << 20);
  gridSave.setMcdMinMax(2 << 20, 8 << 20);

  size_t pre_grid_padding = 0;
  while ((dumpLen & 15) != 8) // align grid on sizeof(vec4f)+8 to force grid::Node alignment to sizeof(vec4f)
    dumpLen++, pre_grid_padding++;
  serializeDump.grid = (RTHierGrid3<Leaf, 0> *)(dumpLen);
  dump.grid->serialize(gridSave, dump_base);

  dumpLen += gridSave.getSize();

  IGenSave *data_cwr = &cb;
  ZstdSaveCB *zlib_cwr = NULL;

  G_ASSERT(dumpLen < 0x7FFFFFFF);
  int i_dumpLen = (int)dumpLen;
  if (out_dump_sz)
    *out_dump_sz = i_dumpLen;

  cb.writeInt(i_dumpLen);
  if (zcompr)
    data_cwr = zlib_cwr = new ZstdSaveCB(cb, ZSTD_DEFAULT_COMPRESSION_LEVEL);
  data_cwr->write(&serializeDump, sizeof(serializeDump));
  data_cwr->write(&verts(0), getVertsCount() * sizeof(Point3_vec4));
  data_cwr->write(&faces(0), getFacesCount() * sizeof(RTface));
  data_cwr->write(&faceIndices(0), getFaceIndicesCount() * sizeof(FaceIndex));

  write_zeros(*data_cwr, pre_grid_padding);
  gridSave.copyDataTo(*data_cwr);
  G_STATIC_ASSERT((sizeof(Dump) & 15) == 0);

  if (zlib_cwr)
  {
    zlib_cwr->finish();
    delete zlib_cwr;
  }

  // store end mark
  int new_pos = cb.tell();
  int sz = new_pos - pos - 4;
  cb.seekto(pos);
  cb.writeInt(sz);
  cb.seekto(new_pos);

  return true;
}
// Copyright (C) Gaijin Games KFT.  All rights reserved.

#include <scene/dag_physMat.h>
#include <generic/dag_tab.h>
#include <debug/dag_log.h>
#include <ioSys/dag_dataBlock.h>
#include <osApiWrappers/dag_localConv.h>
#include <util/dag_string.h>
#include <debug/dag_debug.h>
#include <generic/dag_tabUtils.h>
#include <EASTL/bitvector.h>

void AssertPhysMatID_Valid(const char *file, int ln, PhysMat::MatID id)
{
  if (!IsPhysMatID_Valid(id))
    _core_fatal(file, ln, "phys mat id=%d is invalid (matnum=%d)", id, PhysMat::physMatCount());
}

inline int stringIndex(const Tab<SimpleString> &tab, const char *s)
{
  if (!s || !*s)
    return -1;
  for (int i = 0; i < tab.size(); i++)
  {
    if (dd_stricmp(s, tab[i]) == 0)
      return i;
  }

  return -1;
}

namespace PhysMat
{
// fx pool
static Tab<FXDesc> fx(midmem_ptr());

inline FXDesc *getFx(const char *name)
{
  if (!name || !*name)
    return NULL;

  for (int i = 0; i < fx.size(); i++)
  {
    if (dd_stricmp(name, fx[i].name) == 0)
      return &fx[i];
  }

  return NULL;
}

inline FXType getFxType(const char *t)
{
  if (!t || !*t)
    return PMFX_INVALID;

  static const char *fxTypes[] = {"Tires", "Dust", "Sparks", "Splash", "Trash"};
  static cons


a GuayanaGuernseyG" +
	"hanaGibraltárGrónskoGambiaGuineaGuadeloupeRovníková GuineaGréckoJužná Georgia a " +
	"Južné Sandwichove ostrovyGuatemalaGuamGuinea-BissauGuayanaHongkong – OAO ČínyHea" +
	"rdov ostrov a McDonaldove ostrovyHondurasChorvátskoHaitiMaďarskoKanárske ostrovy" +
	"IndonéziaÍrskoIzraelOstrov ManIndiaBritské indickooceánske územieIrakIránIslandT" +
	"alianskoJerseyJamajkaJordánskoJaponskoKeňaKirgizskoKambodžaKiribatiKomorySvätý K" +
	"rištof a NevisSeverná KóreaJužná KóreaKuvajtKajmanie ostrovyKazachstanLaosLibano" +
	"nSvätá LuciaLichtenštajnskoSrí LankaLibériaLesothoLitvaLuxemburskoLotyšskoLíbyaM" +
	"arokoMonakoMoldavskoČierna HoraSvätý MartinMadagaskarMarshallove ostrovyMacedóns" +
	"koMaliMjanmarskoMongolskoMacao – OAO ČínySeverné MariányMartinikMauritániaMontse" +
	"rratMaltaMauríciusMaldivyMalawiMexikoMalajziaMozambikNamíbiaNová KaledóniaNigerN" +
	"orfolkNigériaNikaraguaHolandskoNórskoNepálNauruNiueNový ZélandOmánPanamaPeruFran" +
	"cúzska PolynéziaPapua Nová GuineaFilipínyPakistanPoľskoSaint Pierre a MiquelonPi" +
	"tcairnove ostrovyPortorikoPalestínske územiaPortugalskoPalauParaguajKatarostatné" +
	" TichomorieRéunionRumunskoSrbskoRuskoRwandaSaudská ArábiaŠalamúnove ostrovySeych" +
	"elySudánŠvédskoSingapurSvätá HelenaSlovinskoSvalbard a Jan MayenSlovenskoSierra " +
	"LeoneSan MarínoSenegalSomálskoSurinamJužný SudánSvätý Tomáš a Princov ostrovSalv" +
	"ádorSint MaartenSýriaSvazijskoTristan da CunhaTurks a CaicosČadFrancúzske južné " +
	"a antarktické územiaTogoThajskoTadžikistanTokelauVýchodný TimorTurkménskoTunisko" +
	"TongaTureckoTrinidad a TobagoTuvaluTaiwanTanzániaUkrajinaUgandaMenšie odľahlé os" +
	"trovy USASpojené štátyUruguajUzbekistanVatikánSvätý Vincent a GrenadínyVenezuela" +
	"Britské Panenské ostrovyAmerické Panenské ostrovyVietnamVanuatuWallis a FutunaSa" +
	"moaKosovoJemenMayotteJužn


ved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

package stack

import (
	"bufio"
	"bytes"
	"errors"
	"fmt"
	"io"
	"os"
	"os/exec"
	"path"
	"path/filepath"
	"regexp"
	"runtime"
	"strings"
	"testing"

	"github.com/google/go-cmp/cmp"
	"github.com/maruel/panicparse/v2/internal/internaltest"
)

func TestScanSnapshotErr(t *testing.T) {
	t.Parallel()
	data := []*Opts{
		nil,
		{LocalGOROOT: "\\"},
		{LocalGOPATHs: []string{"\\"}},
	}
	for _, opts := range data {
		if _, _, err := ScanSnapshot(&bytes.Buffer{}, io.Discard, opts); err == nil {
			t.Fatal("expected error")
		}
	}
}

func TestScanSnapshotSynthetic(t *testing.T) {
	t.Parallel()
	data := []struct {
		name   string
		in     []string
		prefix string
		suffix string
		err    error
		want   []*Goroutine
	}{
		{
			name: "Nothing",
			err:  io.EOF,
		},
		{
			name:   "NothingEmpty",
			in:     make([]string, 111),
			prefix: strings.Repeat("\n", 110),
			err:    io.EOF,
		},
		{
			name:   "NothingLong",
			in:     []string{strings.Repeat("a", bufio.MaxScanTokenSize+10)},
			prefix: strings.Repeat("a", bufio.MaxScanTokenSize+10),
			err:    io.EOF,
		},

		// One call from main, one from stdlib, one from third party.
		// Create a long first line that will be ignored. It is to guard against
		// https://github.com/maruel/panicparse/issues/17.
		{
			name: "long,main,stdlib,third",
			in: []string{
				strings.Repeat("a", bufio.MaxScanTokenSize+1),
				"panic: reflect.Set: value of type",
				"",
				"goroutine 1 [running]:",
				"github.com/cockroachdb/cockroach/storage/engine._Cfunc_DBIterSeek()",
				" ??:0 +0x6d",
				"gopkg.in/yaml%2ev2.handleErr(0x433b20)",
				"\t/gopath/src/gopkg.in/yaml.v2/yaml.go:153 +0xc6",
				"reflect.Value.assignTo(0x570860, 0x803f3e0, 0x15)",
				"\t/goroot/src/reflect/value.go:2125 +0x368",
				"main.main()",
				"\t/gopath/src/github.com/maruel/panicparse/stack/stack.go:428 +0x27",
				"",
			},
			prefix: strings.Repeat("a", bufio.MaxScanTokenSize+1) + "\npanic: reflect.Set: value of type\n\n",
			err:    io.EOF,
			want: []*Goroutine{
				{
					Signature: Signature{
						State: "running",
						Stack: Stack{
							Calls: []Call{
								newCall(
									"github.com/cockroachdb/cockroach/storage/engine._Cfunc_DBIterSeek",
									Args{}, "??", 0),
								newCall(
									"gop


		// 値を初期化
		applicationId.setValue("");
		description.setValue("");
		facilityId.setValue("");

		Object validFlgValues[][] = { { "", ValidMessage.STRING_VALID, ValidMessage.STRING_INVALID },
				{ "", ValidMessage.STRING_VALID, ValidMessage.STRING_INVALID } };
		validFlg.setSelectValues(validFlgValues);
		validFlg.setValue(ValidMessage.STRING_VALID);

		regUser.setValue("");
		regDate.setValue("");
		regFromDate.setValue("");
		regToDate.setValue("");

		updateUser.setValue("");
		updateDate.setValue("");
		updateFromDate.setValue("");
		updateToDate.setValue("");

		ownerRoleId.setValue("");

		// 変更の可/不可を設定
		manager.setModify(PropertyDefineConstant.MODIFY_OK);
		applicationId.setModify(PropertyDefineConstant.MODIFY_OK);
		description.setModify(PropertyDefineConstant.MODIFY_OK);
		facilityId.setModify(PropertyDefineConstant.MODIFY_OK);
		validFlg.setModify(PropertyDefineConstant.MODIFY_OK);

		regUser.setModify(PropertyDefineConstant.MODIFY_OK);
		regDate.setModify(PropertyDefineConstant.MODIFY_NG);
		regFromDate.setModify(PropertyDefineConstant.MODIFY_OK);
		regToDate.setModify(PropertyDefineConstant.MODIFY_OK);

		updateUser.setModify(PropertyDefineConstant.MODIFY_OK);
		updateDate.setModify(PropertyDefineConstant.MODIFY_NG);
		updateFromDate.setModify(PropertyDefineConstant.MODIFY_OK);
		updateToDate.setModify(PropertyDefineConstant.MODIFY_OK);

		ownerRoleId.setModify(PropertyDefineConstant.MODIFY_OK);

		Property property = new Property(null, null, "");

		// 初期表示ツリーを構成。
		property.removeChildren();
		property.addChildren(manager);
		property.addChildren(applicationId);
		property.addChildren(description);
		property.addChildren(facilityId);
		property.addChildren(validFlg);
		property.addChildren(regUser);
		property.addChildren(regDate);
		property.addChildren(updateUser);
		property.addChildren(updateDate);
		property.addChildren(ownerRoleId);

		// 作成日時
		regDate.removeChildren();
		regDate.addChildren(regFromDate);
		regDate.addChildren(regToDate);

		// 最終変更日時
		updateDate.removeChildren();
		updateDate.addChildren(updateFromDate);
		updateDate.addChildren(updateToDate);

		return property;
	}
}
/*
 * Copyright (c) 2022 NTT DATA INTELLILINK Corporation.
 *
 * Hinemos (http://www.hinemos.info/)
 *
 * See the LICENSE file for licensing information.
 */
package com.clustercontrol.sdml.composite;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.openapitools.client.model.NotifyRelationInfoResponse;
import org.openapitools.client.model.SdmlControlSettingInfoResponse;

import com.clustercontrol.calendar.composite.CalendarIdListComposite;
import com.clustercontrol.notify.composite.NotifyIdListComposite;
import com.clustercontrol.sdml.util.SdmlClientConstant;
import com.clustercontrol.util.Messages;

public class AutoCreatedMonitorSettingComposite extends Composite {
	/** マネージャ */
	private String managerName = null;
	/** オーナーロールID */
	private String ownerRoleId


1] = 0.0;
				target[i + 2] = 0.0;
				i += tangentStride;
			}

			var k:number;
			var lenI:number = _indices.length;
			var index:number;
			var f1:number = 0, f2:number = 1, f3:number = 2;

			i = 0;

			while (i < lenI)
			{
				index = _indices[i++] * tangentStride;
				target[index++] += _faceTangents[f1];
				target[index++] += _faceTangents[f2];
				target[index] += _faceTangents[f3];
				index = _indices[i++] * tangentStride;
				target[index++] += _faceTangents[f1];
				target[index++] += _faceTangents[f2];
				target[index] += _faceTangents[f3];
				index = _indices[i++] * tangentStride;
				target[index++] += _faceTangents[f1];
				target[index++] += _faceTangents[f2];
				target[index] += _faceTangents[f3];
				f1 += 3;
				f2 += 3;
				f3 += 3;
			}

			i = 0;
			while (i < lenV)
			{
				var vx:number = target[i];
				var vy:number = target[i + 1];
				var vz:number = target[i + 2];
				var d:number = 1.0 / Math.sqrt(vx * vx + vy * vy + vz * vz);
				target[i] = vx * d;
				target[i + 1] = vy * d;
				target[i + 2] = vz * d;
				i += tangentStride;
			}

			return target;
		}
	}
}
import { GetSideProjects } from "../../src/useCases/GetSideProjects";
import { GitHubSideProjectRepository } from "../../src/repositories/GitHubSideProjectRepository";
import { SideProjectBuilder } from "../builders/SideProjectBuilder";

describe("GetSideProjects", () => {
  it("returns the side projects from both repositories: static and github", async () => {
    const staticSideProject = new SideProjectBuilder().get();
    const githubSideProject = new SideProjectBuilder().get();
    const staticRepository = {
      getAll: jest.fn(async () => [staticSideProject]),
    };
    const githubRepository = ({
      getAll: jest.fn(async () => [githubSideProject]),
    } as unknown) as GitHubSideProjectRepository;
    const subject = new GetSideProjects(staticRepository, githubRepository);

    const { data: projects } = await subject.perform();

    expect(projects).toEqual(
      expect.arrayContaining([staticSideProject, githubSideProject])
    );
  });

  it("returns only side projects from static if github throws an error", async () => {
    const staticSideProject = new SideProjectBuilder().get();
    const staticRepository = {
      getAll: jest.fn(async () => [staticSideProject]),
    };
    const githubRepository = ({
      getAll: jest.fn(async () => {
        throw new Error("boom");
      }),
    } as unknown) as GitHubSideProjectRepository;
    const subject = new GetSideProjects(staticRepository, githubRepository);

    const { data: projects } = await subject.perform();

    expect(projects).toEqual(expect.arrayContaining([staticSideProject]));
  });
});
/**
 * Represents the position in a text.
 */
export interface IMarker
{
    /**
     *


},
  {"h": "泣", "p": "qì", "sp": "qi", "r": "水", "sc": 8, "l": 5, "f": 2449},
  {"h": "屡", "p": "lǚ", "sp": "lu", "r": "尸", "sc": 12, "l": 5, "f": 2450},
  {"h": "躁", "p": "zào", "sp": "zao", "r": "足", "sc": 20, "l": 5, "f": 2451},
  {"h": "邱", "p": "qiū", "sp": "qiu", "r": "邑", "sc": 7, "l": 5, "f": 2452},
  {
    "h": "凰",
    "p": "huáng",
    "sp": "huang",
    "r": "几",
    "sc": 11,
    "l": 5,
    "f": 2453
  },
  {"h": "溢", "p": "yì", "sp": "yi", "r": "水", "sc": 13, "l": 5, "f": 2454},
  {"h": "椎", "p": "chuí", "sp": "chui", "r": "木", "sc": 12, "l": 5, "f": 2455},
  {"h": "砸", "p": "zá", "sp": "za", "r": "石", "sc": 10, "l": 5, "f": 2456},
  {"h": "趟", "p": "tàng", "sp": "tang", "r": "走", "sc": 15, "l": 5, "f": 2457},
  {"h": "帘", "p": "lián", "sp": "lian", "r": "巾", "sc": 8, "l": 5, "f": 2458},
  {"h": "帆", "p": "fān", "sp": "fan", "r": "巾", "sc": 6, "l": 5, "f": 2459},
  {"h": "栖", "p": "qī", "sp": "qi", "r": "木", "sc": 10, "l": 5, "f": 2460},
  {"h": "窜", "p": "cuàn", "sp": "cuan", "r": "穴", "sc": 12, "l": 5, "f": 2461},
  {"h": "丸", "p": "wán", "sp": "wan", "r": "丶", "sc": 3, "l": 5, "f": 2462},
  {"h": "斩", "p": "zhǎn", "sp": "zhan", "r": "車", "sc": 8, "l": 5, "f": 2463},
  {"h": "堤", "p": "dī", "sp": "di", "r": "土", "sc": 12, "l": 5, "f": 2464},
  {"h": "塌", "p": "tā", "sp": "ta", "r": "土", "sc": 13, "l": 5, "f": 2465},
  {"h": "贩", "p": "fàn", "sp": "fan", "r": "貝", "sc": 8, "l": 5, "f": 2466},
  {
    "h": "厢",
    "p": "xiāng",
    "sp": "xiang",
    "r": "厂",
    "sc": 11,
    "l": 5,
    "f": 2467
  },
  {"h": "掀", "p": "xiān", "sp": "xian", "r": "手", "sc": 11, "l": 5, "f": 2468},
  {"h": "喀", "p": "kā", "sp": "ka", "r": "口", "sc": 12, "l": 5, "f": 2469


SELECT s.social_provider,
       s.social_provider_user_id,
       s.username,
       s.name,
       s.created_at
FROM user_social_profiles s
WHERE (
       $1::BOOLEAN = FALSE
    OR s.social_provider = ANY ($2::SOCIAL_PROVIDER[])
  )
  AND s.deleted_at IS NULL
ORDER BY s.id DESC
LIMIT $3
`

type SocialUserProfilesParams struct {
	SocialProviderFilterExists bool
	SocialProviders            []SocialProvider
	Limit                      int32
}

type SocialUserProfilesRow struct {
	SocialProvider       SocialProvider
	SocialProviderUserID string
	Username             string
	Name                 string
	CreatedAt            time.Time
}

func (q *Queries) SocialUserProfiles(ctx context.Context, arg SocialUserProfilesParams) ([]SocialUserProfilesRow, error) {
	rows, err := q.query(ctx, q.socialUserProfilesStmt, socialUserProfiles, arg.SocialProviderFilterExists, pq.Array(arg.SocialProviders), arg.Limit)
	if err != nil {
		return nil, err
	}
	defer rows.Close()
	var items []SocialUserProfilesRow
	for rows.Next() {
		var i SocialUserProfilesRow
		if err := rows.Scan(
			&i.SocialProvider,
			&i.SocialProviderUserID,
			&i.Username,
			&i.Name,
			&i.CreatedAt,
		); err != nil {
			return nil, err
		}
		items = append(items, i)
	}
	if err := rows.Close(); err != nil {
		return nil, err
	}
	if err := rows.Err(); err != nil {
		return nil, err
	}
	return items, nil
}

const socialUserProfilesByUser = `-- name: SocialUserProfilesByUser :many
SELECT s.social_provider,
       s.social_provider_user_id,
       s.username,
       s.name,
       s.created_at
FROM user_social_profiles s
WHERE s.user_id = $1
  AND s.deleted_at IS NULL
ORDER BY s.id
`

type SocialUserProfilesByUserRow struct {
	SocialProvider       SocialProvider
	SocialProviderUserID string
	Username             string
	Name                 string
	CreatedAt            time.Time
}

func (q *Queries) SocialUserProfilesByUser(ctx context.Context, userID int64) ([]SocialUserProfilesByUserRow, error) {
	rows, err := q.query(ctx, q.socialUserProfilesByUserStmt, socialUserProfilesByUser, userID)
	if err != nil {
		return nil, err
	}
	defer rows.Close()
	var items []SocialUserProfilesByUserRow
	for rows.Next() {
		var i SocialUserProfilesByUserRow
		if err := rows.Scan(
			&i.SocialProvider,
			&i.SocialProviderUserID,
			&i.Username,
			&i.Name,
			&i.CreatedAt,
		); err != nil {
			return nil, err
		}
		items = append(items, i)
	}
	if err := rows.Close(); err != nil {
		return nil, err
	}
	if err := rows.Err(); err != nil {
		return nil, err
	}
	return items, nil
}

const userRegistrationDailyCountStats = `-- name: UserRegistrationDailyCountStats :many
SELECT days.day::DATE                    AS day,
       COALESCE(s.user_count, 0)::BIGINT AS user_count
FROM GENERATE_SERIES(
    $1::DATE,
    $2::DATE,
    '1 DAY'::INTERVAL
) AS days (day)
    LEFT JOIN (
        SELECT DATE_TRUNC('DAY', created_at) AS day,
               COUNT(*)                      AS user_count
        FROM users
        WHERE created_at >= $1::DATE
        GROUP BY day


/ManualJournals

Usage and SDK Samples

Python

# configure api_client for use with xero-python sdk client
api_client = ApiClient(
    Configuration(
        debug=false,
        oauth2_token=OAuth2Token(
            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
        ),
    ),
    pool_threads=1,
)

api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")

def accounting_create_manual_journals():
    api_instance = AccountingApi(api_client)
    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    summarize_errors = 'True'
    idempotency_key = 'KEY_VALUE'
    date_value = dateutil.parser.parse('2020-12-03T00:00:00Z')

    manual_journal_lines = []

    credit = ManualJournalLine(
        line_amount = -100.0,
        account_code = "400",
        description = "Hello there")
    manual_journal_lines.append(credit)

    debit = ManualJournalLine(
        line_amount = 100.0,
        account_code = "120",
        description = "Hello there")
    manual_journal_lines.append(debit)

    manual_journal = ManualJournal(
        narration = "Foobar",
        date = date_value,
        journal_lines = manual_journal_lines)

    manualJournals = ManualJournals(
        manual_journals = [manual_journal])

    try:
        api_response = api_instance.create_manual_journals(xero_tenant_id, manualJournals, summarize_errors, idempotency_key)
        print(api_response)
    except AccountingBadRequestException as e:
        print("Exception when calling AccountingApi->createManualJournals: %s\n" % e)

Scopes

                      accounting.transactions
                      Grant read-write access to bank transactions, credit notes, invoices, repeating invoices

Parameters

Header parameters

                      Name
                      Description

xero-tenant-id*

                    String

Xero identifier for Tenant

                    Required

Id


Email].
class FindRealAccountByEmailProvider extends Provider<RealAccount?> {
  //// Finds a real account by its email
  ///
  /// Copied from [findRealAccountByEmail].
  FindRealAccountByEmailProvider({
    required String email,
  }) : this._internal(
          (ref) => findRealAccountByEmail(
            ref as FindRealAccountByEmailRef,
            email: email,
          ),
          from: findRealAccountByEmailProvider,
          name: r'findRealAccountByEmailProvider',
          debugGetCreateSourceHash:
              const bool.fromEnvironment('dart.vm.product')
                  ? null
                  : _$findRealAccountByEmailHash,
          dependencies: FindRealAccountByEmailFamily._dependencies,
          allTransitiveDependencies:
              FindRealAccountByEmailFamily._allTransitiveDependencies,
          email: email,
        );

  FindRealAccountByEmailProvider._internal(
    super._createNotifier, {
    required super.name,
    required super.dependencies,
    required super.allTransitiveDependencies,
    required super.debugGetCreateSourceHash,
    required super.from,
    required this.email,
  }) : super.internal();

  final String email;

  @override
  Override overrideWith(
    RealAccount? Function(FindRealAccountByEmailRef provider) create,
  ) {
    return ProviderOverride(
      origin: this,
      override: FindRealAccountByEmailProvider._internal(
        (ref) => create(ref as FindRealAccountByEmailRef),
        from: from,
        name: null,
        dependencies: null,
        allTransitiveDependencies: null,
        debugGetCreateSourceHash: null,
        email: email,
      ),
    );
  }

  @override
  ProviderElement<RealAccount?> createElement() {
    return _FindRealAccountByEmailProviderElement(this);
  }

  @override
  bool operator ==(Object other) {
    return other is FindRealAccountByEmailProvider && other.email == email;
  }

  @override
  int get hashCode {
    var hash = _SystemHash.combine(0, runtimeType.hashCode);
    hash = _SystemHash.combine(hash, email.hashCode);

    return _SystemHash.finish(hash);
  }
}

mixin FindRealAccountByEmailRef on ProviderRef<RealAccount?> {
  /// The parameter `email` of this provider.
  String get email;
}

class _FindRealAccountByEmailProviderElement
    extends ProviderElement<RealAccount?> with FindRealAccountByEmailRef {
  _FindRealAccountByEmailProviderElement(super.provider);

  @override
  String get email => (origin as FindRealAccountByEmailProvider).email;
}

String _$hasAccountWithErrorHash() =>
    r'df9f05a11751823686a4b6dc985e5cae0224a07f'; //// Checks if there is at least one real account with a login error
///
/// Copied from [hasAccountWithError].
@ProviderFor(hasAccountWithError)
final hasAccountWithErrorProvider = Provider<bool>.internal(
  hasAccountWithError,
  name: r'hasAccountWithErrorProvider',
  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
      ? null
      : _$hasAccountWithErrorHash,
  dependencies: null,
  allTransitiveDependencies: null,
);

typedef HasAccountWithErrorRef = ProviderRef<bool>;
String _$currentRealAccountHash() =>
    r'dd79b65ff2ea824e117c4f13416c6b6993fa4a86';

/// Provides the current real account
///
/// Copied from [currentRealAccount].
@ProviderFor(currentRealAccount)
final currentRealAccountProvider = AutoDisposeProvider<RealAccount?>.internal(
  currentRealAccount,
  name: r'currentRealAccountProvider',
  debugGetCreateSourceHas


iveStringEncoding.UTF8);
        fixed (ITypeInfo** ppTInfoPtr = &ppTInfo)
        {
            fixed (int* rgMemIdPtr = &rgMemId)
            {
                fixed (ushort* pcFoundPtr = &pcFound)
                {
                    ret = ((delegate* unmanaged[Cdecl]<ITypeLib*, byte*, uint, ITypeInfo**, int*, ushort*, int>)@this->LpVtbl[11])(@this, szNameBufPtr, lHashVal, ppTInfoPtr, rgMemIdPtr, pcFoundPtr);
                }
            }
        }
        SilkMarshal.Free((nint)szNameBufPtr);
        return ret;
    }

    /// To be documented.
    public static unsafe void ReleaseTLibAttr(this ComPtr<ITypeLib> thisVtbl, TLibAttr* pTLibAttr)
    {
        var @this = thisVtbl.Handle;
        ((delegate* unmanaged[Cdecl]<ITypeLib*, TLibAttr*, void>)@this->LpVtbl[12])(@this, pTLibAttr);
    }

    /// To be documented.
    public static void ReleaseTLibAttr(this ComPtr<ITypeLib> thisVtbl, ref TLibAttr pTLibAttr)
    {
        var @this = thisVtbl.Handle;
        fixed (TLibAttr* pTLibAttrPtr = &pTLibAttr)
        {
            ((delegate* unmanaged[Cdecl]<ITypeLib*, TLibAttr*, void>)@this->LpVtbl[12])(@this, pTLibAttrPtr);
        }
    }

    /// To be documented.
    public static int QueryInterface<TI0>(this ComPtr<ITypeLib> thisVtbl, out ComPtr<TI0> ppvObject) where TI0 : unmanaged, IComVtbl<TI0>
    {
        var @this = thisVtbl.Handle;
        // ComPtrOverloader
        ppvObject = default;
        return @this->QueryInterface(SilkMarshal.GuidPtrOf<TI0>(), (void**) ppvObject.GetAddressOf());
    }

    /// To be documented.
    public static unsafe int QueryInterface(this ComPtr<ITypeLib> thisVtbl, Span<Guid> riid, void** ppvObject)
    {
        var @this = thisVtbl.Handle;
        // SpanOverloader
        return @this->QueryInterface(ref riid.GetPinnableReference(), ppvObject);
    }

    /// To be documented.
    public static unsafe int QueryInterface(this ComPtr<ITypeLib> thisVtbl, Span<Guid> riid, ref void* ppvObject)
    {
        var @this = thisVtbl.Handle;
        // SpanOverloader
        return @this->QueryInterface(ref riid.GetPinnableReference(), ref ppvObject);
    }

    /// To be documented.
    public static int GetTypeInfo<TI0>(this ComPtr<ITypeLib> thisVtbl, uint index, ref ComPtr<TI0> ppTInfo) where TI0 : unmanaged, IComVtbl<ITypeInfo>, IComVtbl<TI0>
    {
        var @this = thisVtbl.Handle;
        // ComPtrOverloader
        return @this->GetTypeInfo(index, (ITypeInfo**) ppTInfo.GetAddressOf());
    }

    /// To be documented.
    public static int GetTypeInfoType(this ComPtr<ITypeLib> thisVtbl, uint index, Span<TypeKind> pTKind)
    {
        var @this = thisVtbl.Handle;
        // SpanOverloader
        return @this->GetTypeInfoType(index, ref pTKind.GetPinnableReference());
    }

    /// To be documented.
    public static int GetTypeInfoOfGuid<TI0>(this ComPtr<ITypeLib> thisVtbl, out ComPtr<TI0> ppTinfo) where


 1 weight 1
server  lbb-v8y2j191 192.168.1.38:81 check inter 200 fall 1 rise 1 weight 1 on-marked-down shutdown-sessions
```

来确保当一个后端下线时，与这个后端相关的连接都会直接断掉。

## 参考

[on-marked-down](https://cbonte.github.io/haproxy-dconv/1.6/configuration.html#5.2-on-marked-down)

[Tcp keepalive connection not failover](https://discourse.haproxy.org/t/tcp-keepalive-connection-not-failover/4486/3)
# Nginx错误-502 504 Gateway问题

参考文章

[Nginx 502错误原因和解决方法总结](http://www.server110.com/nginx/201312/4409.html)

在普通的`Linux+Nginx+PHP(php-fpm)+MySQL`的架构中, 未根据服务器自身性能进行优化时, 当网站访问量增加, 系统负载变大时, 很容易出现502/504错误. 大多数与Nginx本身无关.

1. `Nginx 502 Bad Gateway`的含义是请求的`PHP-CGI`已经执行, 但是由于某种原因(一般是读取资源的问题)没有执行完毕而导致PHP-CGI进程终止.

2. `Nginx 504 Gateway Time-out`的含义是所请求的网关没有请求到, 简单来说就是没有请求到可以执行的PHP-CGI.

> 解决这两个问题其实是需要综合思考的, 一般来说`Nginx 502 Bad Gateway`和`php-fpm.conf`的设置有关, 而`Nginx 504 Gateway Time-out`则是与`nginx.conf`的设置有关. 而正确的设置需要考虑服务器自身的性能和访客的数量等多重因素.

## 1. 问题分析

### 1.1 Nginx 502 Bad Gateway

咳, 首先一点, 确定`php-fpm`进程已经启动, 且`proxy_pass/fastcgi_pass`配置正确(这种一般出现在初次配置的时候).

既然是请求已经被执行, 就说明问题存在于**PHP代码执行期间**, 或是**php-fpm将执行结果返回**这两个阶段.

**1. php-fpm执行时间过长**

可能是由于php代码本身有问题(如陷入死循环), 或者数据库读写时间过长(数据库本身也有锁机制), 从而长时间无法得到执行结果.

**2. fastcgi请求, 发送, 读取超时**

可能是系统繁忙, 与FastCGI沟通时间过长

**3. fastcgi响应读取失败或超时**

一般是由于Nginx中的buffer不足, FastCGI的响应被缓冲到磁盘, 减慢了读取速度.

### 1.2 Nginx 504 Gateway Time-out

这个错误的含义是**没有请求到可以使用的CGI**. 那就可能是

**1. php-fpm进程数量不足**

可能是max_children设置值较小, 其


_list_data->has_swapchain_render_target_dirty = false;
    cmd_list_data->has_swapchain_render_target = false;
    return false;
  }

  bool found_swapchain_rtv = false;
  for (const auto& rtv : cmd_list_data->current_render_targets) {
    if (rtv.handle == 0u) continue;
    auto* resource_view_info = resource::GetResourceViewInfo(rtv);
    if (resource_view_info == nullptr) continue;
    if (resource_view_info->resource_info == nullptr) continue;
    if (!resource_view_info->resource_info->is_swap_chain) continue;
    found_swapchain_rtv = true;
    break;
  }

  cmd_list_data->has_swapchain_render_target_dirty = false;
  cmd_list_data->has_swapchain_render_target = found_swapchain_rtv;
  return found_swapchain_rtv;
}

static std::vector<reshade::api::resource_view>& GetRenderTargets(reshade::api::command_list* cmd_list) {
  auto* cmd_list_data = renodx::utils::data::Get<CommandListData>(cmd_list);
  assert(cmd_list_data != nullptr);
  return cmd_list_data->current_render_targets;
};

static reshade::api::resource_view& GetDepthStencil(reshade::api::command_list* cmd_list) {
  auto* cmd_list_data = renodx::utils::data::Get<CommandListData>(cmd_list);
  assert(cmd_list_data != nullptr);
  return cmd_list_data->current_depth_stencil;
};

static bool IsDirectX(reshade::api::swapchain* swapchain) {
  auto* device = swapchain->get_device();
  return device::IsDirectX(device);
}

static bool IsDXGI(reshade::api::swapchain* swapchain) {
  auto* device = swapchain->get_device();
  return device::IsDXGI(device);
}

static std::optional<DXGI_OUTPUT_DESC1> GetDirectXOutputDesc1(reshade::api::swapchain* swapchain) {
  auto* native_swapchain = reinterpret_cast<IDXGISwapChain*>(swapchain->get_native());

  IDXGISwapChain4* swapchain4;

  if (!SUCCEEDED(native_swapchain->QueryInterface(IID_PPV_ARGS(&swapchain4)))) {
    reshade::log::message(reshade::log::level::error, "GetDirectXOutputDesc1(Failed to get native swap chain)");
    return std::nullopt;
  }

  DXGI_COLOR_SPACE_TYPE dx_color_space;

  IDXGIOutput* output;
  HRESULT hr = swapchain4->GetContainingOutput(&output);

  swapchain4->Release();
  swapchain4 = nullptr;

  if (!SUCCEEDED(hr)) {
    reshade::log::message(reshade::log::level::error, "GetDirectXOutputDesc1(Failed to get containing output)");
    return std::nullopt;
  }

  IDXGIOutput6* output6;
  hr = output->QueryInterface(&output6);

  output->Release();
  output = nullptr;

  if (!SUCCEEDED(hr)) {
    reshade::log::message(reshade::log::level::error, "GetDirectXOutputDesc1(Failed to query output6)");
    return std::nullopt;
  }

  // https://learn.microsoft.com/en-us/windows/win32/direct3darticles/high-dynamic-range#idxgioutput6
  DXGI_OUTPUT_DESC1 output_desc;

  hr = output6->GetDesc1(&output_desc);

  output6->Release();
  output6 = nullptr;

  if (!SUCCEEDED(hr)) {
    reshade::log::message(reshade::log


2]
	cmp     r0, #0x0
	bne     branch_224a780
	subs    r8, r8, #0x1
	bmi     branch_224a75c
.arm
branch_224a748: @ 224a748 :arm
	ldr     r0, [r7, #0x10]
	ldr     r0, [r0, r8, lsl #0x2]
	bl      0x21d78b0
	subs    r8, r8, #0x1
	bpl     branch_224a748
.arm
branch_224a75c: @ 224a75c :arm
	ldr     r0, [r7, #0x10]
	bl      0x21d78b0
	mov     r0, r7
	bl      0x21d78b0
	ldr     r0, [sp, #0x14]
	bl      0x21d78b0
	add     sp, sp, #0x18
	mov     r0, #0x0
	ldmfd   sp!, {r4-r8,pc}
@ 0x224a780

.arm
branch_224a780: @ 224a780 :arm
	ldr     r0, [r4, #0x8]
	add     r8, r8, #0x1
	cmp     r8, r0
	blt     branch_224a70c
	b       branch_224aa5c
@ 0x224a794

.arm
branch_224a794: @ 224a794 :arm
	ldr     r0, [r4, #0x4]
	ldr     r7, [sp, #0x8]
	cmp     r0, #0x0
	beq     branch_224a7d0
	bl      0x21ea8ac
	str     r0, [r7, #0x4]
	cmp     r0, #0x0
	bne     branch_224a7d0
	mov     r0, r7
	bl      0x21d78b0
	ldr     r0, [sp, #0x14]
	bl      0x21d78b0
	add     sp, sp, #0x18
	mov     r0, #0x0
	ldmfd   sp!, {r4-r8,pc}
@ 0x224a7d0

.arm
branch_224a7d0: @ 224a7d0 :arm
	ldr     r0, [r4, #0x8]
	cmp     r0, #0x0
	beq     branch_224a808
	bl      0x21ea8ac
	str     r0, [r7, #0x8]
	cmp     r0, #0x0
	bne     branch_224a808
	mov     r0, r7
	bl      0x21d78b0
	ldr     r0, [sp, #0x14]
	bl      0x21d78b0
	add     sp, sp, #0x18
	mov     r0, #0x0
	ldmfd   sp!, {r4-r8,pc}
@ 0x224a808

.arm
branch_224a808: @ 224a808 :arm
	ldr     r0, [r4, #0xc]
	cmp     r0, #0x0
	bge     branch_224a828
	ldr     r0, [pc, #0x270] @ [0x224aa8c] (=0x2259544)
	ldr     r1, [pc, #-0xcc0] @ [0x2249b60] (=0x2259368)
	ldr     r2, [pc, #-0xcc0] @ [0x2249b64] (=0x22592c8)
	mov     r3, #55, 28 @ #0x370
	bl      Function_20d407c
.arm
branch_224a828: @ 224


>Errors

The following error codes should be returned under the conditions
given. Other error codes may be returned for other cases not
mentioned here.

    ENODEV
				The device prefix of filename did
				not exist.

ENOTDIR		A non-final component of filename
				was not a directory.

ENOENT		A non-final component of filename
				did not exist.

ENOENT		The named file does not exist, and O_CREAT
				was not specified.

EEXIST		The named file exists, and O_EXCL was
				specified.

EISDIR		The named object is a directory, and it
				was to be opened for writing.

EMFILE		The process's file table was full, or a
				process-specific limit on open files
				was reached.

ENFILE		The system file table is full, if such a
				thing exists, or a system-wide limit
				on open files was reached.

ENXIO		The named object is a block device with no
				filesystem mounted on it.

ENOSPC		The file was to be created, and the
				filesystem involved is full.

EINVAL		flags contained invalid
				values.

EIO		A hard I/O error occurred.

EFAULT		filename was an invalid
				pointer.


ass="r2">1570	style74	1284

1571	tableheader	1283

1572	bottomcorners	1283

1573	menubottom	1282

1574	bord	1282

1575	xsmall	1282

1576	onecol	1280

1577	bas	1279

1578	logos	1277

1579	menucell	1277

1580	adres	1276

1581	top_break	1276

1582	count	1275

1583	headerleft	1274

1584	toplogo	1274

1585	footertextcell	1274

1586	short	1273

1587	bordertl	1273

1588	courtesy	1273

1589	pagetext	1272

1590	loginbutton	1272

1591	primary-links	1271

1592	box4	1271

1593	printonly	1269

1594	site-name	1269

1595	navigator	1265

1596	mosimage_caption	1265

1597	borderbr	1264

1598	listbox	1262

1599	register	1260

1600	legend	1260

1601	value	1260</td


, 电话, 住址, 邮箱, 密码和身份证号码。
黑客侵入私人邮箱, 盗用他人账号, 窃取信息, 挖人隐私, 带来史无前例的安全危机, 韩因此决定废实名制

不愧是伟光正, 一提网络实名快如闪电, 一提官员财产公示就摸石头。

【网络实名制前, 官媒先实名制】
且不论言论之自由, 近日官媒相继大力提倡实名制, 我们双手赞成。但作为官方媒体该垂先示范, 将评论文章及报道规范起来, 率先施行实名制? 杜绝使用"本报评论员"或笔名发表文章。请在报道中将"有关部门/有关专家/有关领导/广大群众/一小撮人"都实名制!

抓出一个雷政富, 千万个雷政富在紧张。网络你太得罪人! 眼中钉, 肉中刺, 不拔出你, 贪官难道等死?
你要言论自由, 老子就讲法治, 以法治你。起草权, 审订权, 核准权, 解释权, 司法权, 都在我五个指头掌握之间, 你就等着有法可依, 执法如山吧!
谁敢说你言论不自由了, 你尽管吼"奥黑, 下课!" 没人管你丫的。

人民日报日日刊登, 央视新闻天天报道! 如此宣传对网络的紧急立法的直接动因是什么? ——网络反腐

多年来, 官员财产实名制只见楼梯响, 不见人下来—-因为大部分人大代表抵制, 一直无法通过。
现在人大很快就制定了网络实名的决定草案。真是雷厉风行。
这已经充分证明了这样一个问题: 网络是腐败分子的天敌!

杀光天下的公鸡, 就能阻止黎明到来? 真为它们的智商感到担心...

菜刀都实名了, 网络实名怕什么?! 家家都有菜刀, 怕什么?! 当大家都不怕的时候就该它们怕了!!!

连政府部门都经常不能实名（所谓的"有关部门"）的国家却要推行网络实名制, 真是一个笑话!

刚刚通过的加强网络信息保护的决定第五条, 要求监控网络信息, 采取"停止传输", "消除", "上报"。
其适用范围居然是"网络服务提供者", 而不是信息发布平台, 则从QQ、微信到电子邮件, 都属于此列。
这等于把监控摄像头从街头铺到了卧室, 大张旗鼓地强制网站成为秘密警察, 恶法, 这是历史的反动!

开始封老百姓的口了, 网络


.text-sm {
  font-size: 0.875rem !important;
}

.text-xs {
  font-size: 1rem !important;
}

.text-lg {
  font-size: 1.25rem !important;
}

.text-xl {
  font-size: 2rem !important;
}

.text-navy {
  color: #001f3f;
}

.text-olive {
  color: #3d9970;
}

.text-lime {
  color: #01ff70;
}

.text-fuchsia {
  color: #f012be;
}

.text-maroon {
  color: #d81b60;
}

.text-blue {
  color: #007bff;
}

.text-indigo {
  color: #6610f2;
}

.text-purple {
  color: #6f42c1;
}

.text-pink {
  color: #e83e8c;
}

.text-red {
  color: #dc3545;
}

.text-orange {
  color: #fd7e14;
}

.text-yellow {
  color: #ffc107;
}

.text-green {
  color: #28a745;
}

.text-teal {
  color: #20c997;
}

.text-cyan {
  color: #17a2b8;
}

.text-white {
  color: #ffffff;
}

.text-gray {
  color: #6c757d;
}

.text-gray-dark {
  color: #343a40;
}

.elevation-0 {
  box-shadow: none !important;
}

.elevation-1, [class*='sidebar-light-'] .nav-sidebar > .nav-item > .nav-link.active, [class*='sidebar-dark-'] .nav-sidebar > .nav-item > .nav-link.active, .callout {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;
}

.elevation-2 {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23) !important;
}

.elevation-3 {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23) !important;
}

.elevation-4 {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22) !important;
}

.elevation-5 {
  box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22) !important;
}

.bg-primary, .alert-primary {
  background-color: #007bff !important;
}

.bg-primary, .alert-primary,
.bg-primary > a,
.alert-primary > a {
  color: #ffffff !important;
}

.bg-primary.btn:hover, .btn.alert-primary:hover {
  border-color: #0062cc;
  color: #ececec;
}

.bg-primary.btn:active, .btn.alert-primary:active, .bg-primary.btn.active, .btn.active.alert-primary {
  border-color: #005cbf;
  color: #e6e6e6;
}

.bg-secondary {
  background-color: #6c757d !important;
}

.bg-secondary,
.bg-secondary > a {
  color: #ffffff !important;
}

.bg-secondary.btn:hover {
  border-color: #545b62;
  color: #ececec;
}

.bg-secondary.btn:active, .bg-secondary.btn.active {
  border-color: #4e555b;
  color: #e6e6e6;
}

.bg-success, .


ecision: common.StringPtr(PrecisionDay),
		workflowID:      common.StringPtr(testWorkflowID),
	}, nil).AnyTimes()
	visibilityArchiver.queryParser = mockParser
	request := &archiver.QueryVisibilityRequest{
		DomainID: testDomainID,
		PageSize: 2,
		Query:    "parsed by mockParser",
	}
	URI, err := archiver.NewURI(testBucketURI)
	s.NoError(err)
	response, err := visibilityArchiver.Query(context.Background(), URI, request)
	s.NoError(err)
	s.NotNil(response)
	s.NotNil(response.NextPageToken)
	s.Len(response.Executions, 2)
	s.Equal(convertToExecutionInfo(s.visibilityRecords[0]), response.Executions[0])
	s.Equal(convertToExecutionInfo(s.visibilityRecords[1]), response.Executions[1])

	request.NextPageToken = response.NextPageToken
	response, err = visibilityArchiver.Query(context.Background(), URI, request)
	s.NoError(err)
	s.NotNil(response)
	s.Nil(response.NextPageToken)
	s.Len(response.Executions, 1)
	s.Equal(convertToExecutionInfo(s.visibilityRecords[2]), response.Executions[0])
}

type precisionTest struct {
	day       int64
	hour      int64
	minute    int64
	second    int64
	precision string
}

func (s *visibilityArchiverSuite) TestArchiveAndQueryPrecisions() {
	precisionTests := []*precisionTest{
		{
			day:       1,
			hour:      0,
			minute:    0,
			second:    0,
			precision: PrecisionDay,
		},
		{
			day:       1,
			hour:      1,
			minute:    0,
			second:    0,
			precision: PrecisionDay,
		},
		{
			day:       2,
			hour:      1,
			minute:    0,
			second:    0,
			precision: PrecisionHour,
		},
		{
			day:       2,
			hour:      1,
			minute:    30,
			second:    0,
			precision: PrecisionHour,
		},
		{
			day:       3,
			hour:      2,
			minute:    1,
			second:    0,
			precision: PrecisionMinute,
		},
		{
			day:       3,
			hour:      2,
			minute:    1,
			second:    30,
			precision: PrecisionMinute,
		},
		{
			day:       4,
			hour:      3,
			minute:    2,
			second:    1,
			precision: PrecisionSecond,
		},
		{
			day:       4,
			hour:      3,
			minute:    2,
			second:    1,
			precision: PrecisionSecond,
		},
		{
			day:       4,
			hour:      3,
			minute:    2,
			second:    2,
			precision: PrecisionSecond,
		},
		{
			day:       4,
			hour:      3,
			minute:    2,
			second:    2,
			precision: PrecisionSecond,
		},
	}
	visibilityArchiver := s.newTestVisibilityArchiver()
	URI, err := archiver.NewURI(testBucketURI + "/archive-and-query-precision")
	s.NoError(err)

	for i, testData := range precisionTests {
		record := archiver.ArchiveVisibilityRequest{
			DomainID:         testDomainID,
			DomainName:       testDomainName,
			WorkflowID:       testWorkflowID,
			RunID:            fmt.Sprintf("%s-%d", testRunID, i),
			WorkflowTypeName: testWorkflowTypeName,
			StartTimestamp:   testData.day*int64(time.Hour)*24 + testData.hour*int64(time.Hour) + testData.minute*int64(time.Minute) + testData.second*int64(time.Second),
			CloseTimestamp:   (testData.day+30)*int64(time.Hour)*24 + test


   vldx          vr1,    t8,     a2
    vavgr.bu      vr13,   vr23,   vr13
    vavgr.bu      vr14,   vr24,   vr14
    vavgr.bu      vr13,   vr13,   vr0
    vavgr.bu      vr14,   vr14,   vr1
    vst           vr13,   a0,     0
    vstx          vr14,   a0,     a2
    vldx          vr0,    t4,     t2
    alsl.d        t4,     a2,     t4,    2
    vld           vr1,    t4,     0
    QPEL8_V_LSX   vr2, vr3, vr4, vr5, vr6, vr0, vr1
    vldx          vr2,    t8,     t1
    vldx          vr3,    t8,     t2
    vavgr.bu      vr13,   vr25,   vr13
    vavgr.bu      vr14,   vr26,   vr14
    vavgr.bu      vr13,   vr13,   vr2
    vavgr.bu      vr14,   vr14,   vr3
    add.d         t6,     t4,     zero     // t6 = src + 6 * stride
    vstx          vr13,   a0,     t1
    vstx          vr14,   a0,     t2
    alsl.d        a0,     a2,     a0,    2  // dst = dst + 4 * stride
    alsl.d        t8,     a2,     t8,    2
    vldx          vr2,    t4,     a2
    vldx          vr3,    t4,     t1
    QPEL8_V_LSX   vr4, vr5, vr6, vr0, vr1, vr2, vr3
    vld           vr4,    t8,     0
    vldx          vr5,    t8,     a2
    vavgr.bu      vr13,   vr27,   vr13
    vavgr.bu      vr14,   vr28,   vr14
    vavgr.bu      vr13,   vr13,   vr4
    vavgr.bu      vr14,   vr14,   vr5
    vst           vr13,   a0,     0
    vstx          vr14,   a0,     a2
    vldx          vr4,    t4,     t2
    alsl.d        t4,     a2,     t4,    2
    vld           vr5,    t4,     0
    QPEL8_V_LSX   vr6, vr0, vr1, vr2, vr3, vr4, vr5
    vldx          vr6,    t8,     t1
    vldx          vr0,    t8,     t2
    vavgr.bu      vr13,   vr29,   vr13
    vavgr.bu      vr14,   vr30,   vr14
    vavgr.bu      vr13,   vr13,   vr6
    vavgr.bu      vr14,   vr14,   vr0
    vstx          vr13,   a0,     t1
    vstx          vr14,   a0,     t2
    alsl.d        a1,     a2,     t0,    3  // a1 = src + 8 * stride
    addi.d        t5,     a1,     8         // a1 = src + 8 * stride + 8
    VLD_DOUBLE_QPEL8_H_LSX vr12, vr13, vr14, vr15, a1
    alsl.d        a1,     a2,     a1,    2
    VLD_DOUBLE_QPEL8_H_LSX vr16, vr17, vr18, vr19, a1
    VLD_DOUBLE_


ng-dirty+.k-radio-label,.k-radio.ng-invalid.ng-touched+.k-radio-label{color:#dc3545}.k-radio.k-checked,.k-radio:checked{border-color:#0d6efd;color:#fff;background-color:#0d6efd}.k-radio.k-checked.k-focus,.k-radio:checked:focus{border-color:#0d6efd;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.k-ripple-container .k-radio::after{background:#0d6efd;opacity:.25}.k-slider{border:0;box-sizing:border-box;outline:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;line-height:1.5;background:0 0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.k-slider *,.k-slider ::after,.k-slider ::before{box-sizing:border-box}.k-slider .k-label{width:auto;font-size:.92em;line-height:1;white-space:nowrap;position:absolute}.k-slider .k-slider-track,.k-slider .k-tick{cursor:pointer}.k-slider .k-tick{background-color:transparent;background-position:center center;background-repeat:no-repeat;margin:0;padding:0;position:relative}.k-slider.k-disabled .k-draghandle,.k-slider.k-disabled .k-slider-track,.k-slider.k-disabled .k-tick{cursor:default}.k-rtl .k-slider .k-slider-selection,.k-slider.k-rtl .k-slider-selection,.k-slider[dir=rtl] .k-slider-selection,[dir=rtl] .k-slider .k-slider-selection{left:auto;right:0}.k-slider-wrap{width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-flow:inherit;flex-flow:inherit;-ms-flex-align:inherit;align-items:inherit;gap:inherit;position:relative}.k-slider{width:-webkit-min-content;width:min-content;height:-webkit-min-content;height:min-content;gap:7px}.k-slider .k-button{-ms-flex:none;flex:none}.k-slider .k-slider-track-wrap{-ms-flex:1 1 auto;flex:1 1 auto;display:-ms-flexbox;display:flex;-ms-flex-flow:inherit;flex-flow:inherit;position:relative;-ms-touch-action:none;touch-action:none}.k-slider .k-slider-track-wrap .k-slider-items{margin:0;padding:0;list-style:none;-ms-flex:1 1 100%;flex:1 1 100%;display:-ms-flexbox;display:flex;-ms-flex-flow:inherit;flex-flow:inherit;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-ms-user-select:none;user-select:none}.k-slider .k-slider-track-wrap .k-tick{-ms-flex:0 0 1px;flex:0 0 1px}.k-slider .k-slider-track-wrap .k-tick-horizontal{width:1px;min-height:100%}.k-slider .k-slider-track-wrap .k-tick-vertical{width:100%;min-height:1px}.k-slider .k-slider-track-wrap .k-draghandle{position:absolute}.k-slider-horizontal .k-slider-track-wrap{height:26px}.k-slider-horizontal .k-slider-track


 s_waitcnt lgkmcnt(5)
    v_mfma_f32_16x16x1f32 a[a_c+16:a_c+31], v[v_a], v[v_b+1], a[a_c+16:a_c+31]     ; repeat:0x1, step:0x0, num_a_c:16
    v_cndmask_b32 v[v_in_flag], 0, v[v_in_flag], vcc
    ds_read_b32 v[v_a], v[v_sld_a_os] offset:3072 ; load i_k:6 into local buffer 0, repeat 0
    s_waitcnt lgkmcnt(5)
    v_mfma_f32_16x16x1f32 a[a_c+32:a_c+47], v[v_a+1], v[v_b], a[a_c+32:a_c+47]     ; repeat:1x0, step:0x0, num_a_c:16
    v_cmp_gt_u32 vcc, s[s_c], v[v_move_slice_k_ic1]
    ds_read_b32 v[v_b], v[v_sld_b_os] offset:3072 ; load i_k:6 into local buffer 0, repeat 0
    v_mfma_f32_16x16x1f32 a[a_c+48:a_c+63], v[v_a+1], v[v_b+1], a[a_c+48:a_c+63]     ; repeat:1x1, step:0x0, num_a_c:16
    v_cndmask_b32 v[v_in_flag], 0, v[v_in_flag], vcc
    ds_read_b32 v[v_b+1], v[v_sld_b_os] offset:3328 ; load i_k:6 into local buffer 0, repeat 1
    s_waitcnt lgkmcnt(5)
    v_mfma_f32_16x16x1f32 a[a_c+0:a_c+15], v[v_a+2], v[v_b+2], a[a_c+0:a_c+15]     ; repeat:0x0, step:0x0, num_a_c:16
    v_add_u32 v[v_wei_os],  s[s_move_slice_k_c1e], v[v_wei_os]
    ds_read_b32 v[v_a+1], v[v_sld_a_os] offset:3328 ; load i_k:6 into local buffer 0, repeat 1
    s_waitcnt lgkmcnt(5)
    v_mfma_f32_16x16x1f32 a[a_c+16:a_c+31], v[v_a+2], v[v_b+3], a[a_c+16:a_c+31]     ; repeat:0x1, step:0x0, num_a_c:16

    ds_read_b32 v[v_a+2], v[v_sld_a_os] offset:3584 ; load i_k:7 into local buffer 1, repeat 0
    s_waitcnt lgkmcnt(5)
    v_mfma_f32_16x16x1f32 a[a_c+32:a_c+47], v[v_a+3], v[v_b+2], a[a_c+32:a_c+47]     ; repeat:1x0, step:0x0, num_a_c:16

    ds_read_b32 v[v_b+2], v[v_sld_b_os] offset:3584 ; load i_k:7 into local buffer 1, repeat 0
    v_mfma_f32_16x16x1f32 a[a_c+48:a_c+63], v[v_a+3], v[v


 model->RNA_STCK_THETA5_TC;
	F4_THETA_TC[13] = model->RNA_STCK_THETA6_TC;
	F4_THETA_TC[14] = model->STCK_THETAB1_TC;
	F4_THETA_TC[15] = model->STCK_THETAB2_TC;

	F4_THETA_TC[2] = model->RNA_HYDR_THETA1_TC;
	F4_THETA_TC[3] = model->RNA_HYDR_THETA2_TC;
	F4_THETA_TC[4] = model->RNA_HYDR_THETA4_TC;
	F4_THETA_TC[5] = model->RNA_HYDR_THETA7_TC;

	F4_THETA_TC[6] = model->RNA_CRST_THETA1_TC;
	F4_THETA_TC[7] = model->RNA_CRST_THETA2_TC;
	F4_THETA_TC[8] = model->RNA_CRST_THETA4_TC;
	F4_THETA_TC[9] = model->RNA_CRST_THETA7_TC;

	F4_THETA_TC[10] = model->RNA_CXST_THETA1_TC;
	F4_THETA_TC[11] = model->RNA_CXST_THETA4_TC;
	F4_THETA_TC[12] = model->RNA_CXST_THETA5_TC;

	F5_PHI_A[0] = model->RNA_STCK_PHI1_A;
	F5_PHI_A[1] = model->RNA_STCK_PHI2_A;
	F5_PHI_A[2] = model->RNA_CXST_PHI3_A;
	F5_PHI_A[3] = model->RNA_CXST_PHI4_A;

	F5_PHI_B[0] = model->RNA_STCK_PHI1_B;
	F5_PHI_B[1] = model->RNA_STCK_PHI2_B;
	F5_PHI_B[2] = model->RNA_CXST_PHI3_B;
	F5_PHI_B[3] = model->RNA_CXST_PHI3_B;

	F5_PHI_XC[0] = model->RNA_STCK_PHI1_XC;
	F5_PHI_XC[1] = model->RNA_STCK_PHI2_XC;
	F5_PHI_XC[2] = model->RNA_CXST_PHI3_XC;
	F5_PHI_XC[3] = model->RNA_CXST_PHI4_XC;

	F5_PHI_XS[0] = model->RNA_STCK_PHI1_XS;
	F5_PHI_XS[1] = model->RNA_STCK_PHI2_XS;
	F5_PHI_XS[2] = model->RNA_CXST_PHI3_XS;
	F5_PHI_XS[3] = model->RNA_CXST_PHI4_XS;

	MESH_F4_POINTS[RNA_HYDR_F4_THETA1] = HYDR_T1_MESH_POINTS;
	MESH_F4_POINTS[RNA_HYDR_F4_THETA2] = HYDR_T2_MESH_POINTS;
	MESH_F4_POINTS[RNA_HYDR_F4_THETA4] = HYDR_T4_MESH_POINTS;
	MESH_F4_POINTS[RNA_HYDR_F4_THETA7] = HYDR_T7_MESH_POINTS;

	MESH_F4_POINTS[RNA_STCK_F4_THETA4] = STCK_T4_MESH_POINTS;
	MESH_F4_POINTS[RNA_STCK_F4_THETA5] = STCK_T5_MESH_POINTS;

	MESH_F4_POINTS[RNA_CRST_F4_THETA1] = CRST_T1_MESH_POINTS;
	MESH_F4_POINTS[RNA_CRST_F4_THETA2] = CRST_T2_MESH_POINTS;
	MESH_F4_POINTS[RNA_CRST_F4_THETA4] = CRST_T4_MESH_POINTS;
	MESH_F4_POINTS[RNA_CRST_F4_THETA7] = CRST_T7_MESH_P


GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}

{@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}

     *
     * @see Reference Page
     */
    @NativeType("void")
    public static long glGetBufferParameteri64(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) {
        MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
        try {
            LongBuffer params = stack.callocLong(1);
            nglGetBufferParameteri64v(target, pname, memAddress(params));
            return params.get(0);
        } finally {
            stack.setPointer(stackPointer);
        }
    }

    // --- [ glDrawElementsBaseVertex ] ---

    /**
     * Unsafe version of: {@link #glDrawElementsBaseVertex DrawElementsBaseVertex}
     *
     * @param count the number of elements to be rendered
     * @param type  the type of the values in {@code indices}. One of:

{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}	{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}	{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}

     */
    public static native void nglDrawElementsBaseVertex(int mode, int count, int type, long indices, int basevertex);

    /**
     * Renders primitives from array data with a per-element offset.
     *
     * @param mode       the kind of primitives to render. One of:

{@link GL11#GL_POINTS POINTS}	{@link GL11#GL_LINE_STRIP LINE_STRIP}	{@link GL11#GL_LINE_LOOP LINE_LOOP}	{@link GL11#GL_LINES LINES}	{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}	{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}	{@link GL11#GL_TRIANGLES TRIANGLES}

{@link #GL_LINES_ADJACENCY LINES_ADJACENCY}	{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}	{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}	{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}	{@link GL40#GL_PATCHES PATCHES}	{@link GL11#GL_POLYGON POLYGON}	{@link GL11#GL_QUADS QUADS}

{@link GL11#GL_QUAD_STRIP QUAD_STRIP}

     * @param count      the number of elements to be rendered
     * @param type       the type of the values in {@code indices}. One of:

{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}	{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}	{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}

     * @param indices    a pointer to the location where the indices are stored
     * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays


6c\x64\x5f\x64\x69\x76\x5f\x75\x5f\x6d\x75\x6c\x00\x01\x15\x69\x36\x34\x2e\x6e\x6f\x5f\x66\x6f\x6c\x64\x5f\x64\x69\x76\x5f\x73\x5f\x6d\x75\x6c\x00\x02\x15\x69\x36\x34\x2e\x6e\x6f\x5f\x66\x6f\x6c\x64\x5f\x64\x69\x76\x5f\x75\x5f\x6d\x75\x6c\x00\x03\x0a\xbd\x80\x80\x80\x00\x04\x8a\x80\x80\x80\x00\x00\x20\x00\x41\x06\x6d\x41\x06\x6c\x0b\x8a\x80\x80\x80\x00\x00\x20\x00\x41\x06\x6e\x41\x06\x6c\x0b\x8a\x80\x80\x80\x00\x00\x20\x00\x42\x06\x7f\x42\x06\x7e\x0b\x8a\x80\x80\x80\x00\x00\x20\x00\x42\x06\x80\x42\x06\x7e\x0b");

// int_exprs.wast:94
assert_return(() => call($6, "i32.no_fold_div_s_mul", [1]), 0);

// int_exprs.wast:95
assert_return(() => call($6, "i32.no_fold_div_u_mul", [1]), 0);

// int_exprs.wast:96
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7e\x01\x7e\x02\x9c\x80\x80\x80\x00\x01\x02\x24\x36\x15\x69\x36\x34\x2e\x6e\x6f\x5f\x66\x6f\x6c\x64\x5f\x64\x69\x76\x5f\x73\x5f\x6d\x75\x6c\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x02\x40\x42\x01\x10\x00\x01\x42\x00\x01\x51\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$6", $6)),  "run", []));  // assert_return(() => call($6, "i64.no_fold_div_s_mul", [int64("1")]), int64("0"))

// int_exprs.wast:97
run(() => call(instance("\x00\x61\x73\x6


 val errorLogsRepo: ErrorLogsRepo
) {

  companion object : Logging

  /**
   * Processes the hook message.
   *
   * @param message The hook message to be processed.
   */
  suspend fun invoke(message: QueueMessage.HookMessage) {
    val connector = getConnector.invoke(message.hook.action)
    val result = connector.invoke(message.planId, message.hook.action)
    when (result) {
      is ExecutorResult.Success -> logger.info("[HOOK ASYNC] --- hook processed successfully")
      is ExecutorResult.Failure -> if (shouldRetryFailedHook(message, result)) retryHook(message)
    }
  }

  /**
   * Determines if the failed hook should be retried.
   *
   * @param message The hook message containing the hook details.
   * @param result The failed executor result.
   * @return True if the hook should be retried, false otherwise.
   */
  private suspend fun shouldRetryFailedHook(message: QueueMessage.HookMessage, result: ExecutorResult.Failure) =
    (message.hook.maxRetry > 0)
      .also { pushErrorLogs(message, result) }
      .also { logger.info("[RETRY HOOK ASYNC | maxRetry : ${message.hook.maxRetry}] --- result : $result") }

  /**
   * Retries the failed hook by pushing it back to the queue.
   *
   * @param message The hook message to be retried.
   */
  private suspend fun retryHook(message: QueueMessage.HookMessage) {
    val updatedHook = message.hook.copy(maxRetry = message.hook.maxRetry - 1)
    val updatedMessage = message.copy(hook = updatedHook)
    queueClient.push(updatedMessage, QueueType.HOOK)
  }

  /**
   * Pushes error logs to the repository.
   *
   * @param message The hook message containing the hook details.
   * @param result The failed executor result.
   */
  private suspend fun pushErrorLogs(message: QueueMessage.HookMessage, result: ExecutorResult.Failure) = ErrorLog(
    planId = message.planId,
    error = result.reason,
    type = ErrorLogType.HookErrorLog,
    timestamp = result.timestamp
  ).let { errorLogsRepo.push(it) }
}
package karya.core.utils

import karya.core.queues.entities.QueueMessage
import kotlinx.serialization.json.Json

/**
 * Extension function to encode a QueueMessage to a ByteArray using the provided Json instance.
 *
 * @param json The Json instance used for encoding.
 * @return The encoded ByteArray.
 */
fun QueueMessage.encodeToByteArray(json: Json): ByteArray =
  json.encodeToString(QueueMessage.serializer(), this)
    .toByteArray(Charsets.UTF_8)

/**
 * Extension function to encode a QueueMessage to a String using the provided Json instance.
 *
 * @param json The Json instance used for encoding.
 * @return The encoded String.
 */
fun QueueMessage.encodeToString(json: Json): String =
  json.encodeToString(QueueMessage.serializer(), this)

/**
 * Extension function to decode a ByteArray to a QueueMessage using the provided Json instance.
 *
 * @param json The Json instance used for decoding.
 * @return The decoded QueueMessage.
 * @throws IllegalArgumentException if the ByteArray is null.
 */
fun ByteArray?.decodeFromByteArray(json: Json): QueueMessage {
  val messageJson = this?.toString(Charsets.UTF_8)
    ?: throw IllegalArgumentException("Message body is null")
  return json.decodeFromString<QueueMessage>(messageJson)
}

/**
 * Extension function to decode a String to a QueueMessage using the provided Json instance.
 *
 * @param json The Json instance used for decoding.
 * @return The decoded QueueMessage.
 * @throws IllegalArgumentException if the String is null.
 */
fun String?.decodeFromString(json: Json): QueueMessage {
  val


 agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package etcd3

import (
	"context"
	"fmt"
	corev1 "k8s.io/api/core/v1"
	"reflect"
	"sync"
	"testing"
	"time"

	"go.etcd.io/etcd/clientv3"
	"go.etcd.io/etcd/integration"

	apitesting "k8s.io/apimachinery/pkg/api/apitesting"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/fields"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/apimachinery/pkg/util/wait"
	"k8s.io/apimachinery/pkg/watch"
	"k8s.io/apiserver/pkg/apis/example"
	examplev1 "k8s.io/apiserver/pkg/apis/example/v1"
	"k8s.io/apiserver/pkg/storage"
)

func TestWatch(t *testing.T) {
	testWatch(t, false)
}

func TestWatchList(t *testing.T) {
	testWatch(t, true)
}

// It tests that
// - first occurrence of objects should notify Add event
// - update should trigger Modified event
// - update that gets filtered should trigger Deleted event
func testWatch(t *testing.T, recursive bool) {
	ctx, store, cluster := testSetup(t)
	defer cluster.Terminate(t)
	podFoo := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}
	podBar := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}

	tests := []struct {
		key        string
		pred       storage.SelectionPredicate
		watchTests []*testWatchStruct
	}{{ // create a key
		key:        "/somekey-1",
		watchTests: []*testWatchStruct{{podFoo, true, watch.Added}},
		pred:       storage.Everything,
	}, { // create a key but obj gets filtered. Then update it with unfiltered obj
		key:        "/somekey-3",
		watchTests: []*testWatchStruct{{podFoo, false, ""}, {podBar, true, watch.Added}},
		pred: storage.SelectionPredicate{
			Label: labels.Everything(),
			Field: fields.ParseSelectorOrDie("metadata.name=bar"),
			GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) {
				pod := obj.(*example.Pod)
				return nil, fields.Set{"metadata.name": pod.Name}, nil
			},
		},
	}, { // update
		key:        "/somekey-4",
		watchTests: []*testWatchStruct{{podFoo, true, watch.Added}, {podBar, true, watch.Modified}},
		pred:       storage.Everything,
	}, { // delete because of being filtered
		key:        "/somekey-5",
		watchTests: []*testWatchStruct{{podFoo, true, watch.Added}, {podBar, true, watch.Deleted}},
		pred: storage.SelectionPredicate{
			Label: labels.Everything(),
			Field: fields.ParseSelectorOrDie("metadata.name!=bar"),
			GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) {
				pod := obj.(*example.Pod)
				return nil, fields.Set{"metadata.name": pod.Name}, nil
			},
		},
	}}
	for i, tt := range tests {
		w, err


et.rpc, index: itemIndex, owner: wallet.wallet);
    assert(collectionData.state?.ownerAddress == wallet.address);
    assert(
        collectionData.state?.metadata.uri == "/?filename=nft$itemIndex.json");
    assert(collectionData.state?.index == itemIndex);
  }
}
import 'package:blockchain_utils/utils/binary/utils.dart';
import 'package:example/examples/wallet/test_wallet.dart';
import 'package:ton_dart/ton_dart.dart';

void main() async {
  final TestWallet<WalletV3R1> wallet = TestWallet(version: WalletVersion.v3R1);
  final destination = TestWallet(version: WalletVersion.v3R2);
  final destination1 = TestWallet(version: WalletVersion.v4);
  final destination2 = TestWallet(version: WalletVersion.v5R1);
  await wallet.wallet.sendTransfer(
      params: VersionedTransferParams(privateKey: wallet.signer, messages: [
        OutActionSendMsg(
            outMessage: TonHelper.internal(
                destination: destination.address,
                amount: TonHelper.toNano("3.3"))),
        OutActionSendMsg(
            outMessage: TonHelper.internal(
                destination: destination1.address,
                amount: TonHelper.toNano("0.001"))),
        OutActionSendMsg(
            outMessage: TonHelper.internal(
                destination: destination2.address,
                amount: TonHelper.toNano("0.001")))
      ]),
      rpc: wallet.rpc);
  await wallet.wallet.getBalance(wallet.rpc);
  final publicKey = await wallet.wallet.getPublicKey(wallet.rpc);
  assert(publicKey == wallet.signer.toPublicKey().toHex());
  final state = await wallet.wallet.readState(wallet.rpc);
  assert(BytesUtils.bytesEqual(
      state.publicKey.toBytes(), wallet.signer.toPublicKey().toBytes()));
  assert(state.subwallet == wallet.wallet.state!.subwallet);
  await WalletV3R1.fromAddress(address: wallet.address, rpc: wallet.rpc);
}
import 'dart:convert';

import 'package:blockchain_utils/blockchain_utils.dart';
import 'package:on_chain/on_chain.dart';
import 'package:test/expect.dart';
import 'package:test/scaffolding.dart';

void main() {
  test('personal sign 1', () {
    final privateKey = TronPrivateKey(
        '43985273a3d94eb753fe6acfd7003e88254effce1eb53e2e97b8522558a98038');
    final messagae = utf8.encode('message');
    final sign = privateKey.signPersonalMessage(messagae);
    final verify = privateKey.publicKey().verifyPersonalMessage(messagae, sign);
    expect(sign,
        'fde00bc33d78109bc61de314c1c0526a047e22a2aaae473ca84b32d8aa35ed3e03720e05d614087e3d8c6fae63879755b32aa08818a2d4de66fee1a617a971671b');
    expect(verify, true);
    final publicKey = TronPublicKey.fromPersonalSignature(messagae, sign);
    expect(publicKey.toHex(), privateKey.publicKey().toHex());
  });
  test('personal sign 2', () {
    final privateKey = TronPrivateKey(
        '43985273a3d94eb753fe6acfd7003e88254effce1eb53e2e97b8522558a98038');
    final messagae = utf8.encode(
        '43985273a3d94eb753fe6acfd7003e88254effce1eb53e2e97b8522558a98038');
    final sign = privateKey.signPersonalMessage(messagae);
    final verify = privateKey.publicKey().verifyPersonalMessage(messagae, sign);


24v-8h276c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12z"],smile:[512,512,[],"f118","M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-122.526 75.34c11.479-17.755-15.349-35.194-26.873-17.374-53.418 82.627-143.71 82.681-197.164 0-11.502-17.79-38.364-.401-26.873 17.374 66.014 102.107 184.795 102.265 250.91 0zM108 192c0 37.497 30.503 68 68 68s68-30.503 68-68-30.503-68-68-68-68 30.503-68 68zm160.5 0c0 37.221 30.279 67.5 67.5 67.5s67.5-30.279 67.5-67.5-30.279-67.5-67.5-67.5-67.5 30.279-67.5 67.5zm67.5-48a47.789 47.789 0 0 0-22.603 5.647h.015c10.916 0 19.765 8.849 19.765 19.765s-8.849 19.765-19.765 19.765-19.765-8.849-19.765-19.765v-.015A47.789 47.789 0 0 0 288 192c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48zm-160 0a47.789 47.789 0 0 0-22.603 5.647h.015c10.916 0 19.765 8.849 19.765 19.765s-8.849 19.765-19.765 19.765-19.765-8.849-19.765-19.765v-.015A47.789 47.789 0 0 0 128 192c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48z"],snowflake:[448,512,[],"f2dc","M444.816 301.639a24.12 24.12 0 0 0 2.661-16.978c-2.725-12.966-15.339-21.245-28.174-18.492l-87.407 25.046L264 256l67.896-35.215 87.407 25.046c12.835 2.753 25.449-5.526 28.174-18.492 2.725-12.966-5.471-25.708-18.305-28.461l-47.477-7.137 53.077-30.956c11.363-6.627 15.257-21.306 8.696-32.785-6.561-11.479-21.091-15.412-32.454-8.785l-53.077 30.956 17.621-45.104c4.057-12.606-2.768-26.146-15.247-30.245-12.478-4.099-25.883 2.797-29.94 15.402l-22.232 88.99-60.38 35.215V144l65.175-63.945c8.778-9.852 7.987-25.027-1.766-33.894-9.753-8.867-24.775-8.068-33.552 1.784l-29.857 37.967V24c0-13.255-10.637-24-23.758-24s-23.758 10.745-23.758 24v61.912l-29.857-37.967c-8.779-9.852-23.799-10


 r.e.c);
	return o;
}

/* [MS-XLSB] 2.5.153 UncheckedRfX */
var parse_UncheckedRfX = parse_RfX;
var write_UncheckedRfX = write_RfX;

/* [MS-XLSB] 2.5.171 */
/* [MS-XLS] 2.5.342 */
/* TODO: error checking, NaN and Infinity values are not valid Xnum */
function parse_Xnum(data, length) { return data.read_shift(8, 'f'); }
function write_Xnum(data, o) { return (o || new_buf(8)).write_shift(8, data, 'f'); }

/* [MS-XLSB] 2.5.198.2 */
var BErr = {
0x00: "#NULL!",
0x07: "#DIV/0!",
0x0F: "#VALUE!",
0x17: "#REF!",
0x1D: "#NAME?",
0x24: "#NUM!",
0x2A: "#N/A",
0x2B: "#GETTING_DATA",
0xFF: "#WTF?"
};
var RBErr = evert_num(BErr);

/* [MS-XLSB] 2.4.321 BrtColor */
function parse_BrtColor(data, length) {
	var out = {};
	var d = data.read_shift(1);

	var fValidRGB = d & 1;
	var xColorType = d >>> 1;

	var index = data.read_shift(1);
	var nTS = data.read_shift(2, 'i');
	var bR = data.read_shift(1);
	var bG = data.read_shift(1);
	var bB = data.read_shift(1);
	var bAlpha = data.read_shift(1);

	switch(xColorType) {
		case 0: out.auto = 1; break;
		case 1:
			out.index = index;
			var icv = XLSIcv[index];
			/* automatic pseudo index 81 */
			if(icv) out.rgb = icv[0].toString(16) + icv[1].toString(16) + icv[2].toString(16);
			break;
		case 2:
			/* if(!fValidRGB) throw new Error("invalid"); */
			out.rgb = bR.toString(16) + bG.toString(16) + bB.toString(16);
			break;
		case 3: out.theme = index; break;
	}
	if(nTS != 0) out.tint = nTS > 0 ? nTS / 32767 : nTS / 32768;

	return out;
}
function write_BrtColor(color, o) {
	if(!o) o = new_buf(8);
	if(!color||color.auto) { o.write_shift(4, 0); o.write_shift(4, 0); return o; }
	if(color.index) {
		o.write_shift(1, 0x02);
		o.write_shift(1, color.index);
	} else if(color.theme) {
		o.write_shift(1, 0x06);
		o.write_shift(1, color.theme);
	} else {
		o.write_shift(1, 0x05);
		o.write_shift(1, 0);
	}
	var nTS = color.tint || 0;
	if(nTS > 0) nTS *= 32767;
	else if(nTS < 0) nTS *= 32768;
	o.write_shift(2, nTS);
	if(!color.rgb) {
		o.write_shift(2, 0);
		o.write_shift(1, 0);
		o.write_shift(1, 0);
	} else {
		var rgb = (color.rgb || 'FFFFFF');
		o.write_shift(1, parse


Patient = infected_patient
        self.ui:addWindow(UIPatient(self.ui, self.lastCycledPatient))
        break
      end
    end
  end
end

--[[! While cycling through timer event patients (@see
  UIWatch:cycleTimerEventPatient) scrolls the screen to centre on the selected patient
  If a patient dialog is open that does not belong to the timer event, does nothing]]
function UIWatch:scrollToTimerEventPatient()
  self.ui:playSound("camclick.wav")
  local patient = self.lastCycledPatient
  if patient then
    -- Current open dialog
    local current_patient_dialog = self.ui:getWindow(UIPatient)
    if not current_patient_dialog then
      -- Create the dialog but don't add it to the window
      local patient_dialog = UIPatient(self.ui, patient)
      patient_dialog:scrollToPatient()
    elseif patient == current_patient_dialog.patient then
      current_patient_dialog:scrollToPatient()
    end
  end
end


put("\\u21C0", "⇀");
        put("\\u2953", "⥓");
        put("\\u211D", "ℝ");
        put("\\u2970", "⥰");
        put("\\u21DB", "⇛");
        put("\\u211B", "ℛ");
        put("\\u21B1", "↱");
        put("\\u29F4", "⧴");
        put("\\u0429", "Щ");
        put("\\u0428", "Ш");
        put("\\u042C", "Ь");
        put("\\u015A", "Ś");
        put("\\u2ABC", "⪼");
        put("\\u0160", "Š");
        put("\\u015E", "Ş");
        put("\\u015C", "Ŝ");
        put("\\u0421", "С");
        put("\\uD835\\uDD16", "𝔖");
        put("\\u2191", "↑");
        put("\\u03A3", "Σ");
        put("\\u2218", "∘");
        put("\\uD835\\uDD4A", "𝕊");
        put("\\u221A", "√");
        put("\\u25A1", "□");
        put("\\u2293", "⊓");
        put("\\u228F", "⊏");
        put("\\u2291", "⊑");
        put("\\u2290", "⊐");
        put("\\u2292", "⊒");
        put("\\u2294", "⊔");
        put("\\uD835\\uDCAE", "𝒮");
        put("\\u22C6", "⋆");
        put("\\u22D0", "⋐");
        put("\\u2286", "⊆");
        put("\\u227B", "≻");
        put("\\u2AB0", "⪰");
        put("\\u227D", "≽");
        put("\\u227F", "≿");
        put("\\u2211", "∑");
        put("\\u22D1", "⋑");
        put("\\u2283", "⊃");
        put("\\u2287", "⊇");
        put("\\u00DE", "Þ");
        put("\\u2122", "™");
        put("\\u040B", "Ћ");
        put("\\u0426", "Ц");
        put("\\u0009", "	");
        put("\\u03A4", "Τ");
        put("\\u0164", "Ť");
        put("\\u0162", "Ţ");
        put("\\u0422", "Т");
        put("\\uD835\\uDD17", "𝔗");
        put("\\u2234", "∴");
        put("\\u0398", "Θ");
        put("\\u205F\\u200A", "  ");
        put("\\u2009", " ");
        put("\\u223C", "∼");
        put("\\u2243", "≃");
        put("\\u2245", "≅");
        put("\\u2248", "≈");
        put("\\uD835\\uDD4B", "𝕋");
        put("\\u20DB", "⃛");
        put("\\


atus) {
            setTimeout(() => {
                loadReceipts();
            }, 1000);
        }
    } catch (error) {
        console.error('Error approving receipt:', error);
        showToast('Failed to approve receipt', 'error');
    }
    document.querySelectorAll('.modal.active').forEach(m => m.remove());
}

async function modalDeleteReceipt(fileName, btn) {
    btn.disabled = true;
    try {
        const response = await fetch(`/payment/delete-receipt-image/${fileName}`, {
            method: 'GET',
            credentials: 'include'
        });
        if (!response.ok) {
            if (response.status === 401) {
                window.location.href = '/login';
                return;
            }
            throw new Error('Failed to delete receipt');
        }
        const result = await response.json();
        if (result.status) {
            showMessage('Receipt deleted successfully', 'success');
            loadReceipts();
        } else {
            showMessage(result.message || 'Failed to delete receipt', 'error');
        }
    } catch (error) {
        console.error('Error deleting receipt:', error);
        showMessage('Failed to delete receipt', 'error');
    }
    document.querySelectorAll('.modal.active').forEach(m => m.remove());
}

function showToast(message, type) {
    const toast = document.getElementById('toast-message');
    toast.textContent = message;
    toast.style.background = type === 'success' ? '#4caf50' : '#f44336';
    toast.style.display = 'block';
    clearTimeout(window.toastTimeout);
    window.toastTimeout = setTimeout(() => {
        toast.style.display = 'none';
    }, 2500);
}

async function approvePayment(imageName) {
    try {
        const response = await fetch(`/payment/aproval-payment/${imageName}`);
        const data = await response.json();
        showToast(data.message, data.status ? 'success' : 'error');
    } catch (error) {
        showToast('Server error', 'error');
    }
} import { login, logout, authLogin } from '@/api/user'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { resetRouter } from '@/router'
const USER_INFO = 'userInfo'
const PER_KEY = 'primihubPer'
import { options } from '@web-tracing/vue2'

const getDefaultState = () => {
  return {
    permissionList: [],
    cTime: '', // 2022-03-25 09:55:53
    ctime: '', // 2022-03-25 09:55:53
    isEditable: 1,
    isForbid: 0,
    userAccount: '',
    userId: null,
    userName: '',
    userOrganId: '',
    userOrganName: '',
    token: getToken(),
    avatar: '',
    organChange: false,
    showValidation: false,
    registerType: 0
  }
}

const state = getDefaultState()

const setUserInfo = () => {
  localStorage.setItem(USER_INFO, JSON.stringify(state.userInfo))
}

const mutations = {
  SET_USER_INFO: (state, userInfo) => {
    Object.assign(state, userInfo)
    state.userInfo = userInfo
    setUserInfo()
  },
  SET_USER_ORGAN_ID: (state, organId) => {
    state.userOrganId = organId
  },
  SET_USER_NAME: (state, name) => {
    state.userName = name
  },
  SET_USER_ORGAN_NAME: (state, name) => {
    state.userOrganName = name
  },
  SET_PERMISSION(state, list) {
    localStorage.setItem(PER_KEY, JSON.stringify(list))
    state.permissionList = list
  },
  RESET_STATE: (state) => {
    Object.assign(state, getDefaultState())
  },
  SET_TOKEN: (state, token) => {
    state.token = token
  },
  SET_NAME: (state, name) => {
    state.name = name
  },
  SET_AVATAR: (state, avatar) => {
    state.avatar =


省很多时间
```
cat 1.jpeg | grep /bin/bash | cut -d ":" -f1 > user.txt
把账户写入user.txt，当作一个用户名字典

```

![](https://mmbiz.qpic.cn/mmbiz_png/HgEiaULLGWT2gWVicYJxZmogr30cfgdZohnRyuG9ktnPe2YRQyJ3ssz25QYbFuL70XXWshjZTVrclbw0WY4ibuycQ/640?wx_fmt=png&from=appmsg "")
ok，开启hydra，这里我已经受不了了。本来是中午1点左右打的靶场，现在是17：45
```
hydra 192.168.1.10 ssh -L user.txt -p plbkac
这里hydra会以user.txt作为用户名字典，密码就是plbkac

```

小技巧：文件上锁了就没有执行权了，记得给他赋x权力![](https://mmbiz.qpic.cn/mmbiz_png/HgEiaULLGWT2gWVicYJxZmogr30cfgdZohdhM9k9Rjibx8iajSibNibYibfdR711VCxJdv1bicicwqVdXKvibYSQrPR3h3Sg/640?wx_fmt=png&from=appmsg "")

![](https://mmbiz.qpic.cn/mmbiz_png/HgEiaULLGWT2gWVicYJxZmogr30cfgdZohdhM9k9Rjibx8iajSibNibYibfdR711VCxJdv1bicicwqVdXKvibYSQrPR3h3Sg/640?wx_fmt=png&from=appmsg "")
### 7、提权：

我们爆出来了ssh账户密码，接下来就是提权了，查找具有 Setuid 权限的文件的命令 ls -alhR
```
查看所有文件夹下的.bash_history文件内容，这段代码非常好用
cat ./*/.bash_history

```

![](https://mmbiz.qpic.cn/mmbiz_png/HgEiaULLGWT2gWVicYJxZmogr30cfgdZohvCSqsplpwbxg4yhjpUAgYiayJeuUiaic4w3c5SeiaBibK1h9ibYpVia2f7RGA/640?wx_fmt=png&from=appmsg "")
这里爆出了peter的账户密码还有J的登录密码
#### SHELL1：peter

![](https://mmbiz.qpic.cn/mmbiz_png/HgEiaULLGWT2gWVicYJxZmogr30cfgdZohlGq6yHfph2eegpAKO5bxttH6MzZryIq687zGjp7csy8cq6gkAAOWkg/640?wx_fmt=png&from=appmsg "")
#### SHELL2，wordpress插件上传反弹shell

![](https://mmbiz.qpic.cn/mmbiz_png/HgEiaULLGWT2gWVicYJxZmogr30cfgdZohzKaQfv568vpyOzh1mRtkficyC1am10G5vYpYNbdqADTMQeM0X4kwqTA/640?wx_fmt=png&from=appmsg "")
我们把数据库中的密码提取出来然后鉴定一下是什么加密

![](https://mmbiz.qpic.cn/mmbiz_png/HgEiaULLGW


ddii aad fiirisay waxaas oo dhan oo aad weli xoogaa ku wareersan tahay sida Monero uu u awooday inuu u xalliyo dhibaatada wax kala iibsiga lacag celinta, jawaabtu waa mid fudud. Maadaama Monero lafteedu aysan lahayn wax lacag celin ah, akhristuhu waa inuu ogaadaa in Bitcoin (kaas oo leh lacag celin) marka hore la soo diro, oo kaliya ka dib marka la xaqiijiyo inuu ku jiro blockchain ayaa Monero la soo diray. Tani waxay u oggolaanaysaa Monero inay ka faa\'iidaysato awoodda Bitcoin si ay u qorto lacagaha dib u celinta oo ay uga faa\'iideysato iyaga, iyada oo aan loo baahnayn in ay yeelato awoodahan lafteeda.
\n\n
 Isku beddelka atomiga hadda waa dhammaatay, laakiin halkan, Bob waxa uu haystaa dhawr doorasho oo uu dhawaan sheegtay XMR. Wuxuu u isticmaali karaa jeebka Monero sida uu yahay, ama wuxuu u rari karaa XMR boorso kale oo uu hore u lahaa. Bob waxay u badan tahay inuu Monero u wareejin doono boorso kale, sababtoo ah Alice wali waxay haysataa furaha aragtida waxayna ku arki kartaa gudaha.
\n\n
 Quruxda hab-maamuuska ayaa ah in uu wali aad u cusub yahay, waxaana jira meelo badan oo wax lagu hagaajin karo. Waxa kale oo aad u dabacsan qaab-dhismeedkeeda, markaa hirgelinta boorsooyinka kale ama is-weydaarsiga baahsanaanta waa in ay noqdaan kuwo fudud oo ku habboon qaab-dhismeedkooda jira.
';

  @override
  String get knowledge250Sbatomic250Sbdescription => 'Waxyaabo yar ayaa loo jecel yahay booska crypto sida isweydaarsiga atomiga. Dhowaan, cilmi-baarayaashu waxay soo gabagabeeyeen qaab uu XMR ku awoodi karo inuu ku beddelo atomiga BTC.';

  @override
  String get knowledge250Sbatomic250Sbtitle => 'Sida Isku-beddelka Atoomikada uu uga Shaqeeyo Monero';

  @override
  String get knowledge250Sbblocks250Sb0250Sbtext => '
   Xusuusin:  Waxaa si weyn loogu talinayaa in akhristuhu akhriyo maqaalladayada  \"Waa maxay sababta Monero u leedahay qiiqa dabada\" iyo \"Monero Mining: Maxaa ka dhigaya RandomX si gaar ah\". Maqaalkani waxa uu ka dhisayaa fikradaha halkaas lagu soo bandhigay.
\n\n
 Mar kasta oo ashkhaastu ka hadlaan dhibaatooyinka xannibaadda, mid ka mid ah ereyada ugu horreeya ee soo baxa ayaa noqon doona \'qashin\'. Qarsoodi maaha in blockchains aysan si fiican u miisaanayn, laakiin dadka badankiisu ma garanayaan sababta.</p


 '_MediaFinalizerContext(uri: $uri, memory: $memory)';
}
import "package:flutter_test/flutter_test.dart";
import "package:miria/util/server_utils.dart";

void main() {
  group("serverToUri", () {
    test("should preserve http scheme for localhost", () {
      final uri = serverToUri("http://localhost:3000");
      expect(uri.scheme, equals("http"));
      expect(uri.host, equals("localhost"));
      expect(uri.port, equals(3000));
      expect(uri.toString(), equals("http://localhost:3000"));
    });

    test("should preserve https scheme", () {
      final uri = serverToUri("https://example.com");
      expect(uri.scheme, equals("https"));
      expect(uri.host, equals("example.com"));
      expect(uri.toString(), equals("https://example.com"));
    });

    test("should default to https when no scheme provided", () {
      final uri = serverToUri("example.com");
      expect(uri.scheme, equals("https"));
      expect(uri.host, equals("example.com"));
      expect(uri.toString(), equals("https://example.com"));
    });

    test("should handle ports correctly", () {
      final uri = serverToUri("http://localhost:8080");
      expect(uri.scheme, equals("http"));
      expect(uri.host, equals("localhost"));
      expect(uri.port, equals(8080));
    });
  });

  group("normalizeServer", () {
    test("should preserve http scheme", () {
      final normalized = normalizeServer("http://localhost:3000");
      expect(normalized, equals("http://localhost:3000"));
    });

    test("should preserve https scheme", () {
      final normalized = normalizeServer("https://example.com");
      expect(normalized, equals("https://example.com"));
    });

    test("should normalize without scheme", () {
      final normalized = normalizeServer("example.com");
      expect(normalized, equals("example.com"));
    });

    test("should remove trailing slashes", () {
      final normalized = normalizeServer("http://localhost:3000///");
      expect(normalized, equals("http://localhost:3000"));
    });
  });
}
import "dart:io";

import "package:auto_route/auto_route.dart";
import "package:dio/dio.dart";
import "package:file_picker/file_picker.dart";
import "package:flutter_cache_manager/flutter_cache_manager.dart";
import "package:miria/repository/account_repository.dart";
import "package:miria/repository/account_settings_repository.dart";
import "package:miria/repository/chat_room_repository.dart";
import "package:miria/repository/emoji_repository.dart";
import "package:miria/repository/general_settings_repository.dart";
import "package:miria/repository/note_repository.dart";
import "package:miria/repository/tab_settings_repository.dart";
import "package:miria/router/app_router.dart";
import "package:misskey_dart/misskey_dart.dart";
import "package:misskey_dart/src/misskey_chat.dart";
import "package:mockito/annotations.dart";
import "package:mockito/mockito.dart";
import "package:plugin_platform_interface/plugin_platform_interface.dart";
import "package:url_launcher_platform_interface/url_launcher_platform_interface.dart";

@GenerateNiceMocks([
  // レポジトリ
  MockSpec<TabSettingsRepository>(),
  MockSpec<AccountSettingsRepository>(),
  MockSpec<ChatRoomRepository>(),
  MockSpec<


/* 0803579a */ MOVS R0, 0x18 @ Set R0 to 0x18 \n\
/* 0803579c */ BL ticks_to_frames \n\
/* 080357a0 */ ADDS R1, R0, 0x0 @ Set R1 to R0 + 0x0 \n\
/* 080357a2 */ LDR R4, =gCurrentEngineData \n\
/* 080357a4 */ LDR R2, [R4] \n\
/* 080357a6 */ ADDS R2, 0xA @ Add 0xA to R2 \n\
/* 080357a8 */ STR R5, [SP] \n\
/* 080357aa */ MOVS R0, 0x1 @ Set R0 to 0x1 \n\
/* 080357ac */ ADDS R3, R7, 0x0 @ Set R3 to R7 + 0x0 \n\
/* 080357ae */ BL scene_start_integer_interp \n\
/* 080357b2 */ LDR R0, [R4] \n\
/* 080357b4 */ STRB R6, [R0, 0xC] \n\
/* 080357b6 */ ADD SP, 0x4 \n\
/* 080357b8 */ POP {R4-R7} \n\
/* 080357ba */ POP {R0} \n\
/* 080357bc */ BX R0 \n\
\n\
.ltorg \n\
.balign 4, 0 \n\
.syntax divided");


#include <aros/x86_64/asm.h>
#include <aros/config.h>

                .text
                .align  16
                .globl  AROS_SLIB_ENTRY(StackSwap, Exec, 122)
                .type   AROS_SLIB_ENTRY(StackSwap, Exec, 122), @function

AROS_SLIB_ENTRY(StackSwap, Exec, 122):
                /* struct StackSwap is %rdi */
                /* SysBase is %rsi */

                pushq   %rbx

                /* StackSwap -> %rbx */
                movq    %rdi, %rbx

                /* Disable interrupts */
                pushq   %rsi
                movq    %rsi, %rdi	/* Put SysBase into rdi (first argument) */
                call    *Disable(%rsi)
                popq    %rsi

                /* movq    ThisTask(%rsi), %rax */
                xorq    %rdi, %rdi
                pushq   %rsi
                call    *FindTask(%rsi)
                popq    %rsi

                /* Exchange tc_SPLower */
                movq    tc_SPLower(%rax), %rcx
                xchgq   %rcx, stk_Lower(%rbx)
                movq    %rcx, tc_SPLower(%rax)

                /* Exchange tc_SPUpper */
                movq    tc_SPUpper(%rax), %rcx
                xchgq   %rcx, stk_Upper(%rbx)
                movq    %rcx, tc_SPUpper(%rax)

                movb    tc_Flags(%rax), %cl
                test    $TF_STACKCHK,


--================================================================
--
-- 配置
--
--================================================================

-- 怪物
monsters = {
	{ config_id = 6, monster_id = 21010301, pos = { x = 1.4, y = 0.1, z = 0.7 }, rot = { x = 0.0, y = 305.5, z = 0.0 }, level = 1, drop_tag = "丘丘人", disableWander = true },
	{ config_id = 7, monster_id = 21010301, pos = { x = -1.7, y = 0.1, z = -2.1 }, rot = { x = 0.0, y = 356.9, z = 0.0 }, level = 1, drop_tag = "丘丘人", disableWander = true, pose_id = 9010 },
	{ config_id = 8, monster_id = 21010301, pos = { x = 1.1, y = 0.2, z = -1.8 }, rot = { x = 0.0, y = 327.7, z = 0.0 }, level = 1, drop_tag = "丘丘人", disableWander = true }
}

-- NPC
npcs = {
}

-- 装置
gadgets = {
	{ config_id = 2, gadget_id = 70300055, pos = { x = -1.3, y = 1.2, z = 1.0 }, rot = { x = 0.0, y = 323.2, z = 0.0 }, level = 5, route_id = 54, born_type = GadgetBornType.GROUND }
}

-- 区域
regions = {
	{ config_id = 4, shape = RegionShape.SPHERE, radius = 3.48, pos = { x = -1.0, y = 0.1, z = 1.9 } },
	{ config_id = 5, shape = RegionShape.SPHERE, radius = 5, pos = { x = -0.5, y = 0.1, z = 1.7 } }
}

-- 触发器
triggers = {
	{ name = "ANY_MONSTER_DIE_4", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_4", action = "action_EVENT_ANY_MONSTER_DIE_4" },
	{ name = "ANY_GADGET_DIE_5", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_5", action = "action_EVENT_ANY_GADGET_DIE_5" }
}

-- 变量
variables = {
}


1
    v_cvt_f16_f32 v[v_c+81], v[v_c+82]
    v_cvt_f16_f32_sdwa v[v_c+81], v[v_c+83]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+82], v[v_c+84]
    v_cvt_f16_f32_sdwa v[v_c+82], v[v_c+85]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+83], v[v_c+86]
    v_cvt_f16_f32_sdwa v[v_c+83], v[v_c+87]  dst_sel:WORD_1
    ds_write_b128 v[v_co_sst], v[v_c+80:v_c+80+3] offset:40960
    v_cvt_f16_f32 v[v_c+88], v[v_c+88]
    v_cvt_f16_f32_sdwa v[v_c+88], v[v_c+89]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+89], v[v_c+90]
    v_cvt_f16_f32_sdwa v[v_c+89], v[v_c+91]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+90], v[v_c+92]
    v_cvt_f16_f32_sdwa v[v_c+90], v[v_c+93]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+91], v[v_c+94]
    v_cvt_f16_f32_sdwa v[v_c+91], v[v_c+95]  dst_sel:WORD_1
    ds_write_b128 v[v_co_sst], v[v_c+88:v_c+88+3] offset:41984
    v_cvt_f16_f32 v[v_c+96], v[v_c+96]
    v_cvt_f16_f32_sdwa v[v_c+96], v[v_c+97]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+97], v[v_c+98]
    v_cvt_f16_f32_sdwa v[v_c+97], v[v_c+99]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+98], v[v_c+100]
    v_cvt_f16_f32_sdwa v[v_c+98], v[v_c+101]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+99], v[v_c+102]
    v_cvt_f16_f32_sdwa v[v_c+99], v[v_c+103]  dst_sel:WORD_1
    ds_write_b128 v[v_co_sst], v[v_c+96:v_c+96+3] offset:49152
    v_cvt_f16_f32 v[v_c+104], v[v_c+104]
    v_cvt_f16_f32_sdwa v[v_c+104], v[v_c+105]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+105], v[v_c+106]
    v_cvt_f16_f32_sdwa v[v_c+105], v[v_c+107]  dst_sel:WORD_1
    v_cvt_f16_f32 v[v_c+106], v[v_c+108]
    v_cvt_f16_f32_sdwa v[v_c+106], v[v_c+109]  dst_sel:WORD_1
    v_cvt_f16_f32


is set it specifies the relevant namespaces
	// Else error, at least one namespace is required.
	if namespace != "" {
		namespaces = namespace
	}

	if namespaces == "" {
		BadRequest("At least one namespace must be specified via the namespaces query parameter.")
	}

	for _, namespaceName := range strings.Split(namespaces, ",") {
		namespaceName = strings.TrimSpace(namespaceName)
		var earliestCreationTimestamp *time.Time
		var isAmbient bool
		for _, an := range accessibleNamespaces {
			if namespaceName == an.Name {
				if nil == earliestCreationTimestamp || earliestCreationTimestamp.After(an.CreationTimestamp) {
					earliestCreationTimestamp = &an.CreationTimestamp
				}
				isAmbient = an.IsAmbient
			}
		}
		if nil == earliestCreationTimestamp {
			Forbidden(fmt.Sprintf("Requested namespace [%s] is not accessible.", namespaceName))
		} else {
			namespaceMap[namespaceName] = NamespaceInfo{
				Name:      namespaceName,
				Duration:  getSafeNamespaceDuration(r.Context(), namespaceName, *earliestCreationTimestamp, time.Duration(duration), queryTime),
				IsAmbient: isAmbient,
				IsIstio:   businessLayer.Mesh.IsControlPlane(r.Context(), "", namespaceName),
			}
		}
	}

	// Process Rate Options

	rates := RequestedRates{
		Ambient: defaultAmbientTraffic,
		Grpc:    defaultRateGrpc,
		Http:    defaultRateHttp,
		Tcp:     defaultRateTcp,
	}

	if ambientTraffic != "" {
		switch ambientTraffic {
		case AmbientTrafficNone:
			rates.Ambient = AmbientTrafficNone
		case AmbientTrafficTotal:
			rates.Ambient = AmbientTrafficTotal
		case AmbientTrafficWaypoint:
			rates.Ambient = AmbientTrafficWaypoint
		case AmbientTrafficZtunnel:
			rates.Ambient = AmbientTrafficZtunnel
		default:
			BadRequest(fmt.Sprintf("Invalid Ambient Traffic [%s]", rates.Ambient))
		}
	}

	if rateGrpc != "" {
		switch rateGrpc {
		case RateNone:
			rates.Grpc = RateNone
		case RateReceived:
			rates.Grpc = RateReceived
		case RateRequests:
			rates.Grpc = RateRequests
		case RateSent:
			rates.Grpc = RateSent
		case RateTotal:
			rates.Grpc = RateTotal
		default:
			BadRequest(fmt.Sprintf("Invalid gRPC Rate [%s]", rateGrpc))
		}
	}

	if rateHttp != "" {
		switch rateHttp {
		case RateNone:
			rates.Http = RateNone
		case RateRequests:
			rates.Http = RateRequests
		default:
			BadRequest(fmt.Sprintf("Invalid HTTP Rate [%s]", rateHttp))
		}
	}

	if rateTcp != "" {
		switch rateTcp {
		case RateNone:
			rates.Tcp = RateNone
		case RateReceived:
			rates.Tcp = RateReceived
		case RateSent:
			rates.Tcp = RateSent
		case RateTotal:
			rates.Tcp = RateTotal
		default:
			BadRequest(fmt.Sprintf("Invalid TCP Rate [%s]", rateTcp))
		}
	}

	// Service graphs require service injection
	if graphType == GraphTypeService {
		injectServiceNodes = true
	}

	options := Options{
		ConfigVendor:    configVendor,
		TelemetryVendor: telemetryVendor,
		ConfigOptions: ConfigOptions{
			BoxBy: boxBy,
			CommonOptions: CommonOptions{
				Duration:  time.Duration(duration),
				GraphType: graphType,
				Params:    params,
				QueryTime: queryTime,
			},
		},
		TelemetryOptions: TelemetryOptions{
			AccessibleNamespaces: accessibleNamespaces,
			Appenders:            appenders,
			IncludeIdleEdges:     includeIdleEdges,
			InjectServiceNodes:   injectServiceNodes,


550EM_x: u32                                      = IXGBE_EEC;
pub const IXGBE_EEC_X550EM_a: u32                                      = 0x15FF8;

pub fn IXGBE_EEC_BY_MAC(_hw: u32) -> u32 { IXGBE_BY_MAC(_hw, IXGBE_EEC) }

pub const IXGBE_EERD: u32                                              = 0x10014;
pub const IXGBE_EEWR: u32                                              = 0x10018;

pub const IXGBE_FLA: u32                                               = 0x1001C;
pub const IXGBE_FLA_X540: u32                                          = IXGBE_FLA;
pub const IXGBE_FLA_X550: u32                                          = IXGBE_FLA;
pub const IXGBE_FLA_X550EM_x: u32                                      = IXGBE_FLA;
pub const IXGBE_FLA_X550EM_a: u32                                      = 0x15F68;

pub fn IXGBE_FLA_BY_MAC(_hw: u32) -> u32 { IXGBE_BY_MAC(_hw, IXGBE_FLA) }

pub const IXGBE_EEMNGCTL: u32                                          = 0x10110;
pub const IXGBE_EEMNGDATA: u32                                         = 0x10114;
pub const IXGBE_FLMNGCTL: u32                                          = 0x10118;
pub const IXGBE_FLMNGDATA: u32                                         = 0x1011C;
pub const IXGBE_FLMNGCNT: u32                                          = 0x10120;
pub const IXGBE_FLOP: u32                                              = 0x1013C;

pub const IXGBE_GRC: u32                                               = 0x10200;
pub const IXGBE_GRC_X540: u32                                          = IXGBE_GRC;
pub const IXGBE_GRC_X550: u32                                          = IXGBE_GRC;
pub const IXGBE_GRC_X550EM_x: u32                                      = IXGBE_GRC;
pub const IXGBE_GRC_X550EM_a: u32                                      = 0x15F64;

pub fn IXGBE_GRC_BY_MAC(_hw: u32) -> u32 { IXGBE_BY_MAC(_hw, IXGBE_GRC) }

pub const IXGBE_SRAMREL: u32                                           = 0x10210;
pub const IXGBE_SRAMREL_X540: u32                                      = IXGBE_SRAMREL;
pub const IXGBE_SRAMREL_X550: u32                                      = IXGBE_SRAMREL;
pub const IXGBE_SRAMREL_X550EM_x: u32                                  = IXGBE_SRAMREL;
pub const IXGBE_SRAMREL_X550EM_a: u32                                  = 0x15F6C;

pub fn IXGBE_SRAMREL_BY_MAC(_hw: u32) -> u32 { IXGBE_BY_MAC(_hw, IXGBE_SRAMREL) }

pub const IXGBE_PHYDBG: u32                                            = 0x10218;

/* General Receive Control */
pub const IXGBE_GRC_MNG: u32                                           = 0x00000001; /* Manageability Enable */
pub const IXGBE_GRC_APME: u32                                          = 0x00000002; /* APM enabled in EEPROM */

pub const IXGBE_VPDDIAG0: u32


ry.ResourceFactory
import xyz.jpenilla.resourcefactory.ResourceFactoryExtension
import xyz.jpenilla.resourcefactory.util.ConfigurateCustomValueProviderSerializer
import xyz.jpenilla.resourcefactory.util.CustomValueFactory
import xyz.jpenilla.resourcefactory.util.CustomValueProvider
import xyz.jpenilla.resourcefactory.util.Pattern
import xyz.jpenilla.resourcefactory.util.ProjectMetaConventions
import xyz.jpenilla.resourcefactory.util.nullAction
import xyz.jpenilla.resourcefactory.util.nullIfEmpty
import xyz.jpenilla.resourcefactory.util.orNullValidating
import xyz.jpenilla.resourcefactory.util.validate
import javax.inject.Inject

/**
 * Create a [NeoForgeModsToml] and configure it with the given [configure] block.
 *
 * @param configure the block to configure the [NeoForgeModsToml] with
 * @return the created and configured [NeoForgeModsToml]
 */
fun Project.neoForgeModsToml(configure: Action<NeoForgeModsToml> = nullAction()): NeoForgeModsToml {
    val toml = objects.newInstance<NeoForgeModsToml>(this)
    configure.execute(toml)
    return toml
}

/**
 * A `neoforge.mods.toml` configuration.
 *
 * See [the official docs](https://docs.neoforged.net/docs/gettingstarted/modfiles#neoforgemodstoml) for more information.
 *
 * @see [neoForgeModsToml]
 * @see [ResourceFactoryExtension.neoForgeModsToml]
 */
abstract class NeoForgeModsToml @Inject constructor(
    @Transient
    private val objects: ObjectFactory,
    @Transient
    private val project: Project,
) : ConfigurateSingleFileResourceFactory.Simple.ValueProvider, ResourceFactory.Provider, CustomValueFactory() {

    companion object {
        private const val MOD_ID_PATTERN: String = "^[a-z0-9_]{2,64}$"
        private const val NAMESPACE_PATTERN: String = "^[a-z0-9_.-]{2,64}$"
        private const val FILE_NAME: String = "META-INF/neoforge.mods.toml"
    }

    @get:Input
    val modLoader: Property<String> = objects.property<String>().convention("javafml")

    @get:Input
    val loaderVersion: Property<String> = objects.property<String>().convention("[1,)")

    @get:Input
    val license: Property<String> = objects.property()

    fun apache2License() = license.set("Apache-2.0")

    fun mitLicense() = license.set("MIT")

    @get:Input
    @get:Optional
    val showAsResourcePack: Property<Boolean> = objects.property()

    @get:Input
    @get:Optional
    val showAsDataPack: Property<Boolean> = objects.property()

    @get:Input
    @get:Optional
    val services: ListProperty<String> = objects.listProperty()

    @get:Input
    @get:Optional
    val issueTrackerUrl: Property<String> = objects.property()

    @get:Nested
    val mods: NamedDomainObjectContainer<Mod> = objects.domainObjectContainer(Mod::class)

    /**
     * Register or configure a [Mod] with the given [id].
     *
     * @param id the id of the mod
     * @param configure the block to configure the [Mod] with
     */
    @JvmOverloads
    fun mod(id: String, configure: Action<Mod> = nullAction()): NamedDomainObjectProvider<Mod> {
        return if (id in mods.names) {
            mods.named(id, configure)
        } else {
            mods.register(id, configure)
        }
    }

    /**
     * Register or configure the convention [Mod].
     *
     * If the mod id is omitted, it will be derived from the project name, lowercased and with disallowed characters
     * replaced by `_`.
     *
     * [Mod.setConventionsFromProjectMeta


.sNext;g=c+(j<n-1?"":" disabled");break;case "last":e=k.sLast;g=c+(j<n-1?"":" disabled");break;default:e=c+1,g=j===c?"active":""}e&&(i=b("<li>",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("<a>",{href:"#",
"aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('<ul class="pagination"/>').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};return f});
/**
 * Transitionize example.
 *
 * Shows how to change dynamically the transitions of an element.
 *
 * In this case, the `elem` background color and left properties are given different transition duration,
 * according to it's current position. If the circle is in it's initial position, it goes right and
 * changes background color faster. If it's already been moved - gets back left and changes background
 * color slower.
 *
 * In order for this to work, with Browserify(http://browserify.org/) already installed, execute the following command:
 *
 *    browserify examples/browserify.js -o examples/bundle.js
 *
 */

var transitionize = require('../transitionize');

window.onload = function() {
  var elem = document.querySelector('.js-elem')
    , prop = {};

  elem.addEventListener('click', function() {
    var position = parseInt(elem.style.left) || 0;

    if (position == 0) {
      this.style.left = this.parentNode.offsetWidth - this.offsetWidth + 'px';
      this.style.backgroundColor = '#53e7d0';

      prop = {
          'background-color': '0.3s'
        , 'left': '0.3s'
      };
    } else {
      this.style.left = 0;
      this.style.backgroundColor = '#febf04';

      prop = {
          'background-color': '1s'
        , 'left': '1s'
      };
    }

    transitionize(elem, prop);
  });
};/*! DataTables 1.10.12
 * ©2008-2015 SpryMedia Ltd - datatables.net/license
 */

/**
 * @summary     DataTables
 * @description Paginate, search and order HTML tables
 * @version     1.10.12
 * @file        jquery.dataTables.js
 * @author      SpryMedia Ltd (www.sprymedia.co.uk)
 * @contact     www.sprymedia.co.uk/contact
 * @copyright   Copyright 2008-2015 SpryMedia Ltd.
 *
 * This source file is free software, available under the following license:
 *   MIT license - http://datatables.net/license
 *
 * This source file is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
 *
 * For details please refer to: http://www.datatables.net
 */

/*jslint evil: true, undef: true, browser: true */
/*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fn