sition: absolute;
  bottom: 10px;
  right: 10px;
}

.logo {
  margin-top: 15px;
}

.error {
  color: #a80000;
}

.info {
  color: #38579b;
}

.success {
  color: #1d741d;
}

/* Posts list ReactCSSTransitionGroup
====================================== */
.example-enter {
    opacity: 0.01;
    transition: opacity .5s ease-in;
}

.example-enter.example-enter-active {
    opacity: 1;
}
.rpd-background {
    fill: white;
}

.rpd-connector {
    stroke-width: 1;
    stroke: black;
    fill: white;
}

.rpd-fresh .rpd-connector {
    fill: red;
    transition: fill .3s;
}

.rpd-link {
    stroke-width: 1;
    stroke: black;
}

.rpd-inlet .rpd-connector:hover,
.rpd-outlet .rpd-connector:hover {
    cursor: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6sFtNl8auFXGMTP34sNwI/JhkgEtmDz14ySfaRcTIBInmKPE32kxyyE2Tv+thKbEVePDfW/byMM1Kmm0XdObS7oGD/MypMXFPXrCwOtoYjyyn7BV29/MZfsVzpLDdRtuIZnbpXzvlf+ev8MvYr/Gqk4H/kV/G3csdazLuyTMPsbFhzd1UabQbjFvDRmcWJxR3zcfHkVw9GfpbJmeev9F08WW8uDkaslwX6avlWGU6NRKz0g/SHtCy9J30o/ca9zX3Kfc19zn3BXQKRO8ud477hLnAfc1/G9mrzGlrfexZ5GLdn6ZZrrEohI2wVHhZywjbhUWEy8icMCGNCUdiBlq3r+xafL549HQ5jH+an+1y+LlYBifuxAvRN/lVVVOlwlCkdVm9NOL5BE4wkQ2SMlDZU97hX86EilU/lUmkQUztTE6mx1EEPh7OmdqBtAvv8HdWpbrJS6tJj3n0CWdM6busNzRV3S9KTYhqvNiqWmuroiKgYhshMjmhTh9ptWhsF7970j/


#!/usr/bin/env python3

# A linter to warn for ASSERT macros which are separated from their argument
# list by a space, which Clang's CPP barfs on

from pathlib import Path
from linter import run_linters, Linter, Warning

from typing import List, Tuple
import re

INCLUDE_RE = re.compile('# *include ([<"][^">]+[>"])')

def get_includes(file: Path) -> List[Tuple[int, str]]:
    txt = file.read_text()
    return [ (line_no+1, m.group(1) )
             for (line_no, line) in enumerate(txt.split('\n'))
             for m in [INCLUDE_RE.match(line)]
             if m is not None
             if m.group(1) != "rts/PosixSource.h"]

def in_rts_dir(path: Path) -> bool:
    return len(path.parts) > 0 and path.parts[0] == 'rts'

class RtsHIncludeOrderLinter(Linter):
    """
    Verify that "PosixSource.h" is always the first #include in source files to
    ensure __USE_MINGW_ANSI_STDIO is defined before system headers are
    #include'd.
    """
    def __init__(self):
        Linter.__init__(self)
        self.add_path_filter(in_rts_dir)
        self.add_path_filter(lambda path: path.suffix == '.c')

    def lint(self, path: Path):
        # We do allow a few small headers to precede Rts.h
        ALLOWED_HEADERS = {
            '"ghcconfig.h"',
            '"ghcplatform.h"',
        }

        includes = get_includes(path)
        headers = [x[1] for x in includes]
        lines = path.read_text().split('\n')

        if '"PosixSource.h"' in headers:
            for line_no, header in includes:
                if header == '"PosixSource.h"':
                    break
                elif header in ALLOWED_HEADERS:
                    continue

                self.add_warning(Warning(
                    path=path,
                    line_no=line_no,
                    line_content=lines[line_no-1],
                    message="PosixSource.h must be first header included in each file"))

class PrivateIncludeLinter(Linter):
    """
    Verify that system headers are not #include'd in <BeginPrivate.h> blocks as this
    can result in very hard-to-diagnose linking errors due to hidden library functions.
    """
    def __init__(self):
        Linter.__init__(self)
        self.add_path_filter(in_rts_dir)
        self.add_path_filter(lambda path: path.suffix == '.h')

    def lint(self, path: Path):
        private = False
        lines = path.read_text().split('\n')
        for line_no, include in get_includes(path):
            if include == '"BeginPrivate.h"':
                private = True
            elif include == '"EndPrivate.h"':
                private = False
            elif private:
                self.add_warning(Warning(
                    path=path,
                    line_no=line_no,
                    line_content=lines[line_no-1],
                    message='System header %s found inside of <BeginPrivate.h> block' % include))

linters = [
    RtsHIncludeOrderLinter(),
    PrivateIncludeLinter(),
]

if __name__ == '__main__':
    run_linters(linters)


n
		bcs :+
			sta min
		:
		iny
		cpy #8
		bcc @min_loop
	; min = OCEAN_FLOOR is interpreted as ocean
	lda min
	cmp #OCEAN_FLOOR
	jeq floor_build_ocean
	; round down to nearest tile above the minimum (max 28 tiles down)
	;lda min
	and #%11111000
	cmp #(28*8)
	bcc :+
		lda #(28*8)
	:
	sta min
	lsr
	lsr
	lsr
	sta mint
	; generate CHR plane
	ldy #0
	@chr_loop:
		ldx min
		lda (src), Y
		sta pass
		.repeat 64, I
			cpx pass
			rol _floor_render + I
			inx
		.endrepeat
		iny
		cpy #8
		jcc @chr_loop
	; calculate first tile to use
	lda _floor_column
	and #15
	ora #$80
	sta tile
	lda _floor_column
	and #16
	asl
	asl
	ora tile
	sta tile
	; generate nametable strip
	lda #0 ; blank until mint
	ldx #0
	:
		cpx mint
		bcs :+
		sta _floor_render+32, X
		inx
		jmp :-
	:
	ldy #4 ; 4 tiles
	lda tile
	:
		sta _floor_render+32, X
		inx
		clc
		adc #16
		dey
		bne :-
	lda #$03 ; filled until bottom
	:
		cpx #32
		bcs :+
		sta _floor_render+32, X
		inx
		jmp :-
	:
	rts
floor_build_ocean:
	; the ocean is just tiles of $03 at the bottom
	lda #0
	tax
	:
		sta _floor_render, X
		inx
		cpx #(32+(OCEAN_FLOOR/8))
		bcc :-
	lda #$03
	:
		sta _floor_render, X
		inx
		cpx #64
		bcc :-
	rts
floor_send_ocean:
	; fills the bottom row of attributes to colour the ocean
	tax
	lda _ocean_attribute
	cmp #255
	bne :+
		rts
	:
	tay ; Y = _ocean_attribute
	lda #8
	sta _ppu_send_count
	lda #<$23F8
	sta _ppu_send_addr+0
	cpx #7
	bcs :+
		lda #>$23F8 ; screen 1
		sta _ppu_send_addr+1
		lda #%10101010 ; base attribute
		jmp :++
	:
		lda #>$27F8 ; screen 2
		sta _ppu_send_addr+1
		tya
		sec
		sbc #8
		and #15
		tay ; shift ocean coordinate by -8 bytes
		lda #%11111111 ; base attribute
	:
	; fill with base attribute
	ldx #0
	:
		sta _ppu_send, X
		inx
		cpx #8
		bcc :-
	; write 6 attribute bytes with ocean colour
	ldx #0
	:
		lda #%00000000 ; ocean attribute
		sta _ppu_send, Y
		iny
		tya
		and #15 ; wrap at 16 bytes (the extra 8 bytes is a dummy for other screen)
		tay
		inx
		cpx #6
		bcc :-
	lda #0 ; horizontal update
	jsr _ppu_direction
	rts
.endproc

_weather_shift:
	; A = value to add to all weather particle X coordinates
	sta tmp1


important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px}@font-face{font-family:laydate-icon;src:url(font/iconfont.eot);src:url(font/iconfont.eot#iefix) format('embedded-opentype'),url(font/iconfont.svg#iconfont) format('svg'),url(font/iconfont.woff) format('woff'),url(font/iconfont.ttf) format('truetype')}.laydate-icon{font-family:laydate-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@charset "UTF-8";/*!Animate.css - http://daneden.me/animateLicensed under the MIT licenseCopyright (c) 2013 Daniel EdenPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/.animated {  -webkit-animation-duration: 1s;  animation-duration: 1s;  -webkit-animation-fill-mode: both;  animation-fill-mode: both;}.animated.infinite {  -webkit-animation-iteration-count: infinite;  animation-iteration-count: infinite;}.animated.hinge {  -webkit-animation-duration: 2s;  animation-duration: 2s;}@-webkit-keyframes bounce {  0%, 20%, 50%, 80%, 100% {    -webkit-transform: translateY(0);    transform: translateY(0);  }  40% {    -webkit-transform: translateY(-30px);    transform: translateY(-30px);  }  60% {    -webkit-transform: translateY(-15px);    transform: translateY(-15px);  }}@keyframes bounce {  0%, 20%, 50%, 80%, 100% {    -webkit-transform: translateY(0);    -ms-transform: translateY(0);    transform: translateY(0);  }  40% {    -webkit-transform: translateY(-30px);    -ms-transform: translateY(-30px);    transform: translateY(-30px);  }  60% {    -webkit-transform: translateY(-15px);    -ms-transform: translateY(-15px);    transform: translateY(-15px);  }}.bounce {  -webkit-animation-name: bounce;  animation-name: bounce;}@-webkit-keyframes flash {  0%, 50%, 100% {    opacity: 1;  }  25%, 75% {    opacity: 0;  }


are stored as 0's and 1's. Jessie was a bit unclear on the concept, so Bessie made her an exercise, shown below.

Write a program that converts an unsigned hexadecimal number to octal (base 8) form.  Hexadecimal number can have at most 100,000 digits and is composed of digits and capital letters from A to F.

Note: a hexadecimal number is a special way of representing numbers in base 16. The digits 0-9 still correspond to 0-9, and then A (capital A!) corresponds to 10, B to 11, etc. (F stands for 15).

For example, the hexadecimal number A10B corresponds to the (decimal) number 10*16^3 + 1*16^2 + 0*16^1 + 11*16^0 = 41227. The corresponding octal (base 8) number would be 120413, since 1*8^5 + 2*8^4 + 0*8^3 + 4*8^2 + 1*8^1 + 3*8^0 = 41227.

Hint: there is an easier way to convert from hexadecimal to octal than by converting hexadecimal -> decimal -> octal. It might help to think about the numbers in binary (base 2).

### 입력

Line 1: A single hexadecimal number. Multidigit numbers will have no leading zeroes (i.e., A1 instead of 00A1). 0 (by itself) is a valid input.

### 출력

Line 1: The octal value with no leading zeros.  If the input is 0, the output should also be 0.

# [Bronze II] ACM 대회 채점 - 11531

[문제 링크](https://www.acmicpc.net/problem/11531)

### 성능 요약

메모리: 32412 KB, 시간: 36 ms

### 분류

자료 구조, 해시를 사용한 집합과 맵, 구현

### 제출 일자

2025년 2월 25일 12:


local surface_SetMaterial = _G.surface.SetMaterial
local surface_SetDrawColor = _G.surface.SetDrawColor
local surface_DrawTexturedRect = _G.surface.DrawTexturedRect

local render_SetScissorRect = _G.render.SetScissorRect
local render_UpdateScreenEffectTexture = _G.render.UpdateScreenEffectTexture

local ScrW, ScrH = _G.ScrW, _G.ScrH

local BLUR_CVAR = GetConVar("easychat_background_blur")
local blur = Material("pp/blurscreen")
local function blur_rect(x, y, w, h, layers, quality)
	if not BLUR_CVAR then
		BLUR_CVAR = GetConVar("easychat_background_blur")
	end

	if not BLUR_CVAR:GetBool() then return end

	surface_SetMaterial(blur)
	surface_SetDrawColor(255, 255, 255)

	render_SetScissorRect(x, y, x + w, y + h, true)
		for i = 1, layers do
			blur:SetFloat("$blur", (i / layers) * quality)
			blur:Recompute()

			rende


1.Type.OCTETSTRING, false,
            asn1.toDer(keySafeContents).getBytes())
        ])
      ]);
    contents.push(keyCI);
  }

  // create AuthenticatedSafe by stringing together the contents
  var safe = asn1.create(
    asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, contents);

  var macData;
  if(options.useMac) {
    // MacData
    var sha1 = forge.md.sha1.create();
    var macSalt = new forge.util.ByteBuffer(
      forge.random.getBytes(options.saltSize));
    var count = options.count;
    // 160-bit key
    var key = p12.generateKey(password, macSalt, 3, count, 20);
    var mac = forge.hmac.create();
    mac.start(sha1, key);
    mac.update(asn1.toDer(safe).getBytes());
    var macValue = mac.getMac();
    macData = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
      // mac DigestInfo
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
        // digestAlgorithm
        asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
          // algorithm = SHA-1
          asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,
            asn1.oidToDer(pki.oids.sha1).getBytes()),
          // parameters = Null
          asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')
        ]),
        // digest
        asn1.create(
          asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING,
          false, macValue.getBytes())
      ]),
      // macSalt OCTET STRING
      asn1.create(
        asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, macSalt.getBytes()),
      // iterations INTEGER (XXX: Only support count < 65536)
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
        asn1.integerToDer(count).getBytes()
      )
    ]);
  }

  // PFX
  return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
    // version (3)
    asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
      asn1.integerToDer(3).getBytes()),
    // PKCS#7 ContentInfo
    asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
      // contentType
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,
        // OID for the content type is 'data'
        asn1.oidToDer(pki.oids.data).getBytes()),
      // content
      asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [
        asn1.create(
          asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,
          asn1.toDer(safe).getBytes())
      ])
    ]),
    macData
  ]);
};

/**
 * Derives a PKCS#12 key.
 *
 * @param password the password to derive the key material from, null or
 *          undefined for none.
 * @param salt the salt, as a ByteBuffer, to use.
 * @param id the PKCS#12 ID byte (1 = key material, 2 = IV, 3 = MAC).
 * @param iter the iteration count.
 * @param n the number of bytes to derive from the password.
 * @param md the message digest t


}

impl Config {
    pub fn new() -> Config {
        Config {
            persistence: true,
            path: get_path(),
        }
    }
}

fn get_path() -> PathBuf {
    env::current_dir().unwrap().join(DATA_DIR)
}
use std::num::FromPrimitive;

use semver;

use pg;
use Model;
use git;
use db::Connection;
use util::{CargoResult};

pub struct Dependency {
    pub id: i32,
    pub version_id: i32,
    pub crate_id: i32,
    pub req: semver::VersionReq,
    pub optional: bool,
    pub default_features: bool,
    pub features: Vec<String>,
    pub target: Option<String>,
    pub kind: Kind,
}

#[derive(RustcEncodable, RustcDecodable)]
pub struct EncodableDependency {
    pub id: i32,
    pub version_id: i32,
    pub crate_id: String,
    pub req: String,
    pub optional: bool,
    pub default_features: bool,
    pub features: String,
    pub target: Option<String>,
    pub kind: Kind,
}

#[derive(FromPrimitive, Copy)]
pub enum Kind {
    Normal,
    Build,
    Dev,
}

impl Dependency {
    pub fn insert(conn: &Connection, version_id: i32, crate_id: i32,
                  req: &semver::VersionReq, kind: Kind,
                  optional: bool, default_features: bool,
                  features: &[String], target: &Option<String>)
                  -> CargoResult<Dependency> {
        let req = req.to_string();
        let features = features.connect(",");
        let stmt = try!(conn.prepare("INSERT INTO dependencies
                                      (version_id, crate_id, req, optional,
                                       default_features, features, target, kind)
                                      VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
                                      RETURNING *"));
        let mut rows = try!(stmt.query(&[&version_id, &crate_id, &req,
                                         &optional, &default_features,
                                         &features, target, &(kind as i32)]));
        Ok(Model::from_row(&rows.next().unwrap()))
    }

    pub fn git_encode(&self, crate_name: &str) -> git::Dependency {
        let Dependency { id: _, version_id: _, crate_id: _, ref req,
                         optional, default_features, ref features,
                         ref target, kind } = *self;
        git::Dependency {
            name: crate_name.to_string(),
            req: req.to_string(),
            features: features.clone(),
            optional: optional,
            default_features: default_features,
            target: target.clone(),
            kind: Some(kind),
        }
    }

    pub fn encodable(self, crate_name: &str) -> EncodableDependency {
        let Dependency { id, version_id, crate_id: _, req, optional,
                         default_features, features, target, kind } = self;
        EncodableDependency {
            id: id,
            version_id: version_id,
            crate_id: crate_name.to_string(),
            req: req.to_string(),
            optional: optional,
            default_features: default_features,
            features: features.as_slice().connect(","),
            target: target,
            kind: kind,
        }
    }
}

impl Model for Dependency {
    fn from_row(row: &pg::Row) -> Dependency {
        let features: String = row.get("features");
        let req: String = row.get("req");
        let kind: Option<i32> = row.get("kind");
        Dependency {
            id: row.get("id"),
            version_id: row.get("version_id"),
            crate_


54: .4byte 0x03000029
_08075A58: .4byte gPseudoRandom
_08075A5C: .4byte 0x00196225
_08075A60: .4byte 0x3C6EF35F
_08075A64: .4byte 0x03000022
_08075A68: .4byte 0xFFFFFC00
_08075A6C:
	movs r0, #0x80
	lsls r0, r0, #3
	mov r2, r8
	str r0, [r2, #8]
_08075A74:
	mov r0, r8
	adds r0, #0x21
	ldrb r0, [r0]
	cmp r0, #1
	bhi _08075A80
	b _08075C0E
_08075A80:
	mov r1, r8
	ldr r0, [r1, #8]
	lsrs r1, r0, #0x1f
	adds r0, r0, r1
	asrs r0, r0, #1
	mov r2, r8
	str r0, [r2, #8]
	b _08075C0E
_08075A90:
	mov r0, r8
	str r3, [sp]
	bl sub_80778D0
	ldr r0, _08075B10 @ =0x03000029
	adds r2, r5, r0
	ldrb r0, [r2]
	subs r0, #1
	strb r0, [r2]
	movs r1, #0xff
	mov ip, r1
	lsls r0, r0, #0x18
	ldr r3, [sp]
	cmp r0, #0
	beq _08075AB0
	b _08075C0E
_08075AB0:
	ldrb r1, [r7]
	movs r7, #1
	adds r0, r7, #0
	ands r0, r1
	cmp r0, #0
	beq _08075B7C
	movs r0, #0xc
	strb r0, [r2]
	ldr r2, _08075B14 @ =0x03000023
	adds r1, r5, r2
	ldrb r0, [r1]
	cmp r0, #0
	beq _08075B28
	movs r0, #0
	strb r0, [r1]
	ldr r1, _08075B18 @ =gUnknown_080D5904
	ldrh r0, [r1, #8]
	strh r0, [r4, #0xc]
	ldrh r0, [r1, #0xa]
	strb r0, [r4, #0x1a]
	ldr r0, _08075B1C @ =0x0000FFFF
	strh r0, [r4, #0x18]
	ldrb r0, [r4, #0x1b]
	mov r1, ip
	orrs r0, r1
	strb r0, [r4, #0x1b]
	ldr r1, _08075B20 @ =gUnknown_080D58F4
	ldrh r0, [r1, #8]
	strh r0, [r6, #0xc]
	ldrh r0, [r1, #0xa]
	strb r0, [r6, #0x1a]
	movs r0, #1
	rsbs r0, r0, #0
	strh r0, [r6, #0x18]
	ldrb r0, [r6, #0x1b]
	mov r2, ip
	orrs r0, r2
	strb r0, [r6, #0x1b]
	ldr r1, _08075B24 @ =gUnknown_080D592C
	ldrh r0, [r1, #8]
	strh r0, [r


, &src_size, O_RDONLY);
  if (src_fd == -1) {
    fprintf(stderr, "Error opening \"%s\" partition.\n", src_name);
    return -errno;
  }

  dst_fd = boot_info_open_partition("boot", &dst_size, O_RDWR);
  if (dst_fd == -1) {
    fprintf(stderr, "Error opening \"boot\" partition.\n");
    close(src_fd);
    return -errno;
  }

  if (src_size != dst_size) {
    fprintf(stderr,
            "src (%" PRIu64 " bytes) and dst (%" PRIu64 " bytes) "
            "have different sizes.\n",
            src_size, dst_size);
    close(src_fd);
    close(dst_fd);
    return -EINVAL;
  }

  if (!copy_data(src_fd, dst_fd, src_size)) {
    close(src_fd);
    close(dst_fd);
    return -errno;
  }

  if (fsync(dst_fd) != 0) {
    fprintf(stderr, "Error calling fsync on destination: %s\n",
            strerror(errno));
    return -errno;
  }

  close(src_fd);
  close(dst_fd);
  return 0;
}

int module_setSlotAsUnbootable(struct boot_control_module *module, unsigned slot)
{
  BrilloBootInfo info;

  if (slot >= 2)
    return -EINVAL;

  if (!boot_info_load(&info)) {
    fprintf(stderr, "WARNING: Error loading boot-info. Resetting.\n");
    boot_info_reset(&info);
  } else {
    if (!boot_info_validate(&info)) {
      fprintf(stderr, "WARNING: boot-info is invalid. Resetting.\n");
      boot_info_reset(&info);
    }
  }

  info.slot_info[slot].bootable = false;

  if (!boot_info_save(&info)) {
    fprintf(stderr, "Error saving boot-info.\n");
    return -errno;
  }

  return 0;
}

int module_isSlotBootable(struct boot_control_module *module, unsigned slot)
{
  BrilloBootInfo info;

  if (slot >= 2)
    return -EINVAL;

  if (!boot_info_load(&info)) {
    fprintf(stderr, "WARNING: Error loading boot-info. Resetting.\n");
    boot_info_reset(&info);
  } else {
    if (!boot_info_validate(&info)) {
      fprintf(stderr, "WARNING: boot-info is invalid. Resetting.\n");
      boot_info_reset(&info);
    }
  }

  return info.slot_info[slot].bootable;
}

const char* module_getSuffix(boot_control_module_t *module, unsigned slot)
{
  static const char* suffix[2] = {"_a", "_b"};
  if (slot >= 2)
    return NULL;
  return suffix[slot];
}

static struct hw_module_methods_t module_methods = {
  .open  = NULL,
};

/* This boot_control HAL implementation emulates A/B by copying the
 * contents of the boot partition of the requested slot to the boot
 * partition. It hence works with bootloaders that are not yet aware
 * of A/B. This code is only intended to be used for development.
 */

boot_control_module_t HAL_MODULE_INFO_SYM = {
  .common = {
    .tag                 = HARDWARE_MODULE_TAG,
    .module_api_version  = BOOT_CONTROL_MODULE_API_VERSION_0_1,
    .hal_api_version     = HARDWARE_HAL_API_VERSION,
    .id                  = BOOT_CONTROL_HARDWARE_MODULE_ID,
    .name                = "Copy Implementation of boot_control HAL",
    .author              = "The Android Open Source Project",
    .methods             = &module_methods,
  },
  .init                 = module_init,
  .getNumberSlots       = module_getNumberSlots,
  .getCurrentSlot       = module_getCurrentSlot,
  .markBootSuccessful   = module_markBootSuccessful,
  .setActiveBootSlot    = module_setActiveBootSlot,
  .setSlotAsUnbootable  = module_setSlotAsUnbootable,
  .isSlotBootable       = module_isSlotBootable,
  .getSuffix            = module_getSuffix,
};


local module = {}

local path = game.ReplicatedFirst.Packages.Chickynoid
local MathUtils = require(path.Shared.Simulation.MathUtils)
local Enums = require(path.Shared.Enums)

--Call this on both the client and server!
function module:ModifySimulation(simulation)

    simulation:RegisterMoveState("Flying", self.ActiveThink, self.AlwaysThink, self.StartState, nil)
	simulation.constants.flyFriction = 0.2
	simulation.state.flyingCooldown = 0
end

--Imagine this is inside Simulation...
function module.AlwaysThink(simulation, cmd)

	if (simulation.state.flyingCooldown > 0) then
		simulation.state.flyingCooldown = math.max(simulation.state.flyingCooldown - cmd.deltaTime, 0)
	end

	if (simulation.state.flyingCooldown == 0 and cmd.flying == 1) then

		if (simulation:GetMoveState().name == "Flying") then
			simulation.state.flyingCooldown = 0.5
			simulation:SetMoveState("Walking")
		else
			simulation.state.flyingCooldown = 0.5
			simulation:SetMoveState("Flying")
		end
    end
end

function module.StartState(simulation, cmd)

    --pop us up when we enter this state
    simulation.state.vel = Vector3.new(0,100,0)
end

--Imagine this is inside Simulation...
function module.ActiveThink(simulation, cmd)

    --Did the player have a movement request?
    local wishDir = nil
    if cmd.x ~= 0 or cmd.y ~= 0 or cmd.z ~= 0 then
        wish


al Government Bonds 10 YR Yield"],hu_HU:["Portugál Államkötvények 10 éves"]},e.exports["#TVC:TR10Y-symbol-description"]={en:["Turkey Government Bonds 10 YR Yield"],hu_HU:["Turkey Government Bonds 10 YR"]},e.exports["#TVC:US02Y-symbol-description"]={en:["US Government Bonds 2 YR Yield"],hu_HU:["US államkötvények 2 éves"]},e.exports["#TVC:US05Y-symbol-description"]={en:["US Government Bonds 5 YR Yield"],hu_HU:["US államkötvények 5 éves"]},e.exports["#TVC:US10Y-symbol-description"]={en:["US Government Bonds 10 YR Yield"],hu_HU:["US államkötvények 10 éves"]},e.exports["#INDEX:TWII-symbol-description"]={en:["Taiwan Weighted Index"],hu_HU:["Taiwan Weighted Index"]},e.exports["#CME:J61!-symbol-description"]={en:["Japanese Yen Futures"],hu_HU:["Japanese Yen Futures"]},
e.exports["#CME_MINI:J71!-symbol-description"]={en:["Japanese Yen E-mini Futures"],hu_HU:["Japanese Yen E-mini Futures"]},e.exports["#CME_MINI:WM1!-symbol-description"]={en:["E-micro Japanese Yen / U.S. Dollar Futures"],hu_HU:["E-micro Japanese Yen / U.S. Dollar Futures"]},e.exports["#CME:M61!-symbol-description"]={en:["Mexican Peso Futures"],hu_HU:["Mexican Peso Futures"]},e.exports["#CME:T61!-symbol-description"]={en:["South African Rand Futures"],hu_HU:["South African Rand Futures"]},e.exports["#CME:SK1!-symbol-description"]={en:["Swedish Krona Futures"],hu_HU:["Swedish Krona Futures"]},e.exports["#CME:QT1!-symbol-description"]={en:["Chinese Renminbi / U.S. Dollar Futures"],hu_HU:["Chinese Renminbi / U.S. Dollar Futures"]},e.exports["#COMEX:AUP1!-symbol-description"]={en:["Aluminum MW U.S. Transaction Premium Platts (25MT) Futures"],hu_HU:["Aluminum MW U.S. Transaction Premium Platts (25MT) Futures"]},e.exports["#CME:L61!-symbol-description"]={en:["Brazilian Real Futures"],hu_HU:["Brazilian Real Futures"]},e.exports["#CME:WP1!-symbol-description"]={en:["Polish Zloty Futures"],hu_HU:["Polish Zloty Futures"]},e.exports["#CME:N61!-symbol-description"]={en:["New Zealand Dollar Futures"],hu_HU:["New Zealand Dollar Futures"]},e.exports["#CME_MINI:MG1!-symbol-description"]={en:["E-micro Australian Dollar / U.S. Dollar Futures"],hu_HU:["E-micro Australian Dollar / U.S. Dollar Futures"]},e.exports["#CME_MINI:WN1!-symbol-description"]={en:["E-micro Swiss Franc / U.S. Dollar Futures"],hu_HU:["E-micro Swiss Franc / U.S. Dollar Futures"]},e.exports["#CME_MINI:MF1!-symbol-description"]={en:["E-micro Euro / U.S. Dollar Futures"],hu_HU:["E-micro Euro / U.S. Dollar Futures"]},e.exports["#CME_MINI:E71!-symbol-description"]={en:["Euro E-mini Futures"],hu_HU:["Euro E-mini Futures"]},e.exports["#CBOT:ZK1!-symbol-description"]={en:["Denatured Fuel


.Current.OnReception(data);
            }

            _receiver.OnReception(data);
        }

        public void OnNormalTermination() {
            if (_monitors != null) {
                ResetEnumerator();
                while (_enumerator.MoveNext())
                    _enumerator.Current.OnNormalTermination();
            }

            _receiver.OnNormalTermination();
        }

        public void OnAbnormalTermination(string message) {
            if (_monitors != null) {
                ResetEnumerator();
                while (_enumerator.MoveNext())
                    _enumerator.Current.OnAbnormalTermination(message);
            }

            _receiver.OnAbnormalTermination(message);
        }

    }

    internal class MonitorableByteOutputStream : MonitorableStreamTemplate<IByteOutputStream>, IByteOutputStream {
        private IByteOutputStream _transmitter;

        public MonitorableByteOutputStream(IByteOutputStream transmitter) {
            _transmitter = transmitter;
        }

        public void Transmit(ByteDataFragment data) {
            if (_monitors != null) {
                ResetEnumerator();
                while (_enumerator.MoveNext())
                    _enumerator.Current.Transmit(data);
            }
            _transmitter.Transmit(data);
        }

        public void Transmit(byte[] buffer, int offset, int length) {
            if (_monitors != null) {
                ResetEnumerator();
                while (_enumerator.MoveNext())
                    _enumerator.Current.Transmit(buffer, offset, length);
            }
            _transmitter.Transmit(buffer, offset, length);
        }

        public void Close() {
            if (_monitors != null) {
                ResetEnumerator();
                while (_enumerator.MoveNext())
                    _enumerator.Current.Close();
            }
            _transmitter.Close();
        }

    }
}


pgRwEXAF_6CnepryRCF1_w)
DATA_WORD(b__MA7naqebvq7OOvaqre11yvaxGbQrnguREXAF_2fcVAF_7VOvaqre14QrnguErpvcvragRRRCiw)
DATA_WORD(b__MA7naqebvq7OOvaqre13hayvaxGbQrnguREXAF_2jcVAF_7VOvaqre14QrnguErpvcvragRRRCiwCF4_)
DATA_WORD(b__MAX7naqebvq7VOvaqre13purpxFhopynffRCXi)
DATA_WORD(b__MA7naqebvq7OOvaqre12nggnpuBowrpgRCXiCiF3_CSiF2_F3_F3_R)
DATA_WORD(b__MAX7naqebvq7OOvaqre10svaqBowrpgRCXi)
DATA_WORD(b__MA7naqebvq7OOvaqre12qrgnpuBowrpgRCXi)
DATA_WORD(b__MA7naqebvq7OOvaqre11ybpnyOvaqreRi)
DATA_WORD(b__MA7naqebvq7VOvaqre12erzbgrOvaqreRi)
DATA_WORD(b__MGua8_A7naqebvq13ZrqvnErpbeqreQ1Ri)
DATA_WORD(b__MGua8_A7naqebvq13ZrqvnErpbeqreQ0Ri)
DATA_WORD(b__MGua8_A7naqebvq21OaZrqvnErpbeqrePyvrag10baGenafnpgRwEXAF_6CnepryRCF1_w)
.space (__SIZEOF_POINTER__ * 7)
DATA_WORD(b__MGi0_a24_A7naqebvq13ZrqvnErpbeqreQ1Ri)
DATA_WORD(b__MGi0_a24_A7naqebvq13ZrqvnErpbeqreQ0Ri)
DATA_WORD(b__MA7naqebvq7ErsOnfr10baSvefgErsRi)
DATA_WORD(b__MA7naqebvq7ErsOnfr15baYnfgFgebatErsRCXi)
DATA_WORD(b__MA7naqebvq7ErsOnfr20baVapFgebatNggrzcgrqRwCXi)
DATA_WORD(b__MA7naqebvq7ErsOnfr13baYnfgJrnxErsRCXi)
.space (__SIZEOF_POINTER__ * 5)
DATA_WORD(b__MGi0_a32_A7naqebvq13ZrqvnErpbeqreQ1Ri)
DATA_WORD(b__MGi0_a32_A7naqebvq13ZrqvnErpbeqreQ0Ri)
DATA_WORD(b__MGi0_a40_A7naqebvq13ZrqvnErpbeqre4qvrqRi)
DATA_WORD(b__MGIA7naqebvq13ZrqvnErpbeqreR)
DATA_WORD(b__MGPA7naqebvq13ZrqvnErpbeqreR0_AF_21OaZrqvnErpbeqrePyvragR)
DATA_WORD(b__MGPA7naqebvq13ZrqvnErpbeqreR0_AF_11OaVagresnprVAF_20VZrqvnErpbeqrePyvragRRR)
DATA_WORD(b__MGPA7naqebvq13ZrqvnErpbeqreR0_AF_20VZrqvnErpbeqrePyvragR)
DATA_WORD(b__MGPA7naqebvq13ZrqvnErpbeqreR0_AF_10VVagresnprR)
DATA_WORD(b__MGPA7naqebvq13ZrqvnErpbeqreR0_AF_10VVagresnprR)


 SqlAuthorizationReadOnlyIntTests.SqlAuthorizationFlsFmTests.class })
public class SqlAuthorizationReadOnlyIntTests {

    static final Pattern HEX_HASH_PATTERN = Pattern.compile("[0-9a-f]{64}");

    static TestIndex index_a1 = TestIndex.name("index_a1").documentCount(100).attr("index_or_ds", "index_a1").seed(2).build();
    static TestIndex index_a2 = TestIndex.name("index_a2").documentCount(100).attr("index_or_ds", "index_a2").seed(3).build();
    static TestIndex index_b1 = TestIndex.name("index_b1").documentCount(100).attr("index_or_ds", "index_b1").seed(4).build();
    static TestIndex index_b2 = TestIndex.name("index_b2").documentCount(100).attr("index_or_ds", "index_b2").seed(5).build();
    static TestAlias alias_a = new TestAlias("alias_a", index_a1, index_a2);
    static TestAlias alias_b = new TestAlias("alias_b", index_b1, index_b2);
    static TestDataStream ds_a = TestDataStream.name("ds_a").documentCount(100).attr("index_or_ds", "ds_a").seed(6).rolloverAfter(10).build();
    static TestDataStream ds_b = TestDataStream.name("ds_b").documentCount(100).attr("index_or_ds", "ds_b").seed(7).rolloverAfter(10).build();

    static TestSgConfig.User USER_INDEX_A1 = new TestSgConfig.User("user_index_a1")
            .description("user with access to index a1")
            .roles(
                    new TestSgConfig.Role("r1")
                            .clusterPermissions("indices:data/read/sql", "indices:data/read/sql/close_cursor", "indices:data/read/close_point_in_time")
                            .indexPermissions("indices:data/read/field_caps", "indices:data/read/open_point_in_time", "indices:data/read/search").on("index_a1")

            )
            .indexMatcher("read", sqlLimitedTo(index_a1));

    static TestSgConfig.User USER_INDEX_A1_WITH_DLS = new TestSgConfig.User("user_index_a1_with_dls")
            .description("user with access to index a1, and dls excluding dept_d")
            .roles(
                    new TestSgConfig.Role("r1")
                            .clusterPermissions("indices:data/read/sql", "indices:data/read/sql/close_cursor", "indices:data/read/close_point_in_time")
                            .indexPermissions("indices:data/read/field_caps", "indices:data/read/open_point_in_time", "indices:data/read/search")
                            .dls("{ \"bool\": { \"must_not\": { \"match\": { \"dept\": \"dept_d\" }}}}")
                            .on("index_a1")

            )
            .indexMatcher("read", sqlLimitedTo(index_a1.filteredBy(doc -> ! doc.getAsString("dept").equals("dept_d"))));

    static TestSgConfig.User USER_INDEX_A2 = new TestSgConfig.User("user_index_a2")
            .description("user with access to index a2")
            .roles(
                    new TestSgConfig.Role("r1")
                            .clusterPermissions("indices:data/read/sql", "indices:data/read/sql/close_cursor", "indices:data/read/close_point_in_time")
                            .indexPermissions("indices:data/read/field_caps", "indices:data/read/open_point_in_time", "indices:data/read/search").on("index_a2")

            )
            .indexMatcher("read", sqlLimitedTo(index_a2));

    static TestSgConfig.User USER_INDEX_B1 = new TestSgConfig.User("us


tion(s.GetContext(), volumeSub.ID, &dto.CancelSubscriptionRequest{
			CancellationType:  types.CancellationTypeImmediate,
			ProrationBehavior: types.ProrationBehaviorNone,
			Reason:            "test_cancellation",
		})
		s.NoError(err)

		// Verify subscription was cancelled
		cancelledSub, err := s.GetStores().SubscriptionRepo.Get(s.GetContext(), volumeSub.ID)
		s.NoError(err)
		s.Equal(types.SubscriptionStatusCancelled, cancelledSub.SubscriptionStatus)
		s.NotNil(cancelledSub.CancelledAt)

		s.T().Logf("✅ Immediate cancellation with volume-based tiered pricing completed successfully")
	})

	s.Run("TestImmediateCancellationComprehensiveScenario", func() {
		// Create the most comprehensive scenario with all types of charges
		comprehensiveSub := &subscription.Subscription{
			ID:                 "sub_comprehensive_cancel",
			CustomerID:         s.testData.customer.ID,
			PlanID:             s.testData.plan.ID,
			SubscriptionStatus: types.SubscriptionStatusActive,
			StartDate:          s.testData.now.Add(-30 * 24 * time.Hour),
			CurrentPeriodStart: s.testData.now.Add(-20 * 24 * time.Hour), // 20 days into period
			CurrentPeriodEnd:   s.testData.now.Add(10 * 24 * time.Hour),
			BillingPeriod:      types.BILLING_PERIOD_MONTHLY,
			BillingPeriodCount: 1,
			Currency:           "usd",
			CommitmentAmount:   lo.ToPtr(decimal.NewFromFloat(30.00)), // $30 commitment
			OverageFactor:      lo.ToPtr(decimal.NewFromFloat(2.0)),   // 2x overage multiplier
			BaseModel:          types.GetDefaultBaseModel(s.GetContext()),
		}

		// Create comprehensive set of prices
		prices := []*price.Price{
			{
				// Fixed fee arrear (should be included)
				ID:                 "price_fixed_arrear_comprehensive",
				Amount:             decimal.NewFromFloat(40.00),
				Currency:           "usd",
				EntityType:         types.PRICE_ENTITY_TYPE_PLAN,
				EntityID:           s.testData.plan.ID,
				Type:               types.PRICE_TYPE_FIXED,
				BillingPeriod:      types.BILLING_PERIOD_MONTHLY,
				BillingPeriodCount: 1,
				BillingModel:       types.BILLING_MODEL_FLAT_FEE,
				BillingCadence:     types.BILLING_CADENCE_RECURRING,
				InvoiceCadence:     types.InvoiceCadenceArrear,
				BaseModel:          types.GetDefaultBaseModel(s.GetContext()),
			},
			{
				// Fixed fee advance (should NOT be included)
				ID:                 "price_fixed_advance_comprehensive",
				Amount:             decimal.NewFromFloat(60.00),
				Currency:           "usd",
				EntityType:         types.PRICE_ENTITY_TYPE_PLAN,
				EntityID:           s.testData.plan.ID,
				Type:               types.PRICE_TYPE_FIXED,
				BillingPeriod:      types.BILLING_PERIOD_MONTHLY,
				BillingPeriodCount: 1,
				BillingModel:       types.BILLING_MODEL_FLAT_FEE,
				BillingCadence:     types.BILLING_CADENCE_RECURRING,
				InvoiceCadence:     types.InvoiceCadenceAdvance,
				BaseModel:          types.GetDefaultBaseModel(s.GetContext()),
			},
			{
				// Usage arrear (should be included)
				ID:                 "price_usage_arrear_comprehensive",


timer.timerSpeed = 1f
    }

    override fun onEnable() {
        ticks = 0
        mc.timer.timerSpeed = 1f
        launchY = mc.thePlayer.posY
    }
}
/*
 * LiquidBounce Hacked Client
 * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
 * https://github.com/CCBlueX/LiquidBounce/
 */
package net.ccbluex.liquidbounce.utils.login

import com.google.gson.JsonParser
import net.ccbluex.liquidbounce.LiquidBounce
import net.ccbluex.liquidbounce.event.SessionEvent
import net.ccbluex.liquidbounce.utils.MinecraftInstance
import net.minecraft.util.Session
import java.util.*

fun me.liuli.elixir.compat.Session.intoMinecraftSession(): Session = Session(username, uuid, token, type)

object LoginUtils : MinecraftInstance() {

    @JvmStatic
    fun loginSessionId(sessionId: String): LoginResult {
        val decodedSessionData = try {
            String(Base64.getDecoder().decode(sessionId.split(".")[1]), Charsets.UTF_8)
        } catch (e: Exception) {
            return LoginResult.FAILED_PARSE_TOKEN
        }

        val sessionObject = try {
            JsonParser().parse(decodedSessionData).asJsonObject
        } catch (e: java.lang.Exception){
            return LoginResult.FAILED_PARSE_TOKEN
        }
        val uuid = sessionObject.get("spr").asString
        val accessToken = sessionObject.get("yggt").asString

        if (!UserUtils.isValidToken(accessToken)) {
            return LoginResult.INVALID_ACCOUNT_DATA
        }

        val username = UserUtils.getUsername(uuid) ?: return LoginResult.INVALID_ACCOUNT_DATA

        mc.session = Session(username, uuid, accessToken, "mojang")
        LiquidBounce.eventManager.callEvent(SessionEvent())

        return LoginResult.LOGGED
    }

    enum class LoginResult {
        INVALID_ACCOUNT_DATA, LOGGED, FAILED_PARSE_TOKEN
    }

}/*
 * LiquidBounce+ Hacked Client
 * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
 * https://github.com/WYSI-Foundation/LiquidBouncePlus/
 *
 * This code was taken from UnlegitMC/FDPClient. Please credit them when using this code in your repository.
 */
package net.ccbluex.liquidbounce.utils.render

import kotlin.math.*

/***
 * Thanks https://github.com/ai/easings.net for this util, converted to Kotlin.
 */
object EaseUtils {
    @JvmStatic
    fun easeInSine(x: Double): Double {
        return 1 - cos((x * PI) / 2)
    }

    @JvmStatic
    fun easeOutSine(x: Double): Double {
        return sin((x * PI) / 2)
    }

    @JvmStatic
    fun easeInOutSine(x: Double): Double {
        return -(cos(PI * x) - 1) / 2
    }

    @JvmStatic
    fun easeInQuad(x: Double): Double {
        return x * x
    }

    @JvmStatic
    fun easeOutQuad(x: Double): Double {


2.868 419.9 8.603C425.6 14.34 428.5 21.6 428.5 30.4C428.5 39.19 425.6 46.46 419.9 52.19L394.6 78L423.9 78C450.3 78.77 471.9 87.75 488.6 104.1H488.6zM449.8 173.8C449.4 164.2 446.1 156.4 439.1 150.3C433.9 144.2 425.1 140.9 416.4 140.5H96.05C86.46 140.9 78.6 144.2 72.47 150.3C66.33 156.4 63.07 164.2 62.69 173.8V368.2C62.69 377.4 65.95 385.2 72.47 391.7C78.99 398.2 86.85 401.5 96.05 401.5H416.4C425.6 401.5 433.4 398.2 439.7 391.7C446 385.2 449.4 377.4 449.8 368.2L449.8 173.8zM185.5 216.5C191.8 222.8 195.2 230.6 195.6 239.7V273C195.2 282.2 191.9 289.9 185.8 296.2C179.6 302.5 171.8 305.7 162.2 305.7C152.6 305.7 144.7 302.5 138.6 296.2C132.5 289.9 129.2 282.2 128.8 273V239.7C129.2 230.6 132.6 222.8 138.9 216.5C145.2 210.2 152.1 206.9 162.2 206.5C171.4 206.9 179.2 210.2 185.5 216.5H185.5zM377 216.5C383.3 222.8 386.7 230.6 387.1 239.7V273C386.7 282.2 383.4 289.9 377.3 296.2C371.2 302.5 363.3 305.7 353.7 305.7C344.1 305.7 336.3 302.5 330.1 296.2C323.1 289.9 320.7 282.2 320.4 273V239.7C320.7 230.6 324.1 222.8 330.4 216.5C336.7 210.2 344.5 206.9 353.7 206.5C362.9 206.9 370.7 210.2 377 216.5H377z"],
    "bimobject": [448, 512, [], "f378", "M416 32H32C14.4 32 0 46.4 0 64v384c0 17.6 14.4 32 32 32h384c17.6 0 32-14.4 32-32V64c0-17.6-14.4-32-32-32zm-64 257.4c0 49.4-11.4 82.6-103.8 82.6h-16.9c-44.1 0-62.4-14.9-70.4-38.8h-.9V368H96V136h64v74.7h1.1c4.6-30.5 39.7-38.8 69.7-38.8h17.3c92.4 0 103.8 33.1 103.8 82.5v35zm-64-28.9v22.9c0 21.7-3.4 33.8-38.4 33.8h-45.3c-28.9 0-44.1-6.5-44.1-35.7v-19c0-29.3 15.2-35.7 44.1-35.7h45.3c35-.2 38.4 12 38.4 33.7z"],
    "bitbucket": [512, 512, [61810], "f171", "M22.2 32A16 16 0 0 0 6 47.8a26.35 26.35 0 0 0 .2 2.8l67.9 412.1a21.77 21.77 0 0 0 21.3 18.2h325.7a16 16 0 0 0 16-13


-espion Thalodien de la Zone 52 veut que vous vous procuriez la Première moitié de la pierre de Socrethar auprès du maître-forge Morug à la base de forge Oubli, et la Seconde moitié de la pierre de Socrethar auprès de Silroth à la base de forge Géhenne.\n\nAccomplir des quêtes pour les Clairvoyants fera baisser votre réputation auprès de l'Aldor."}},
[10509] = {"En route pour la gloire", nil, {"Apportez la Pierre de téléportation de Socrethar à Voren'thal le Voyant sur le Degré des Clairvoyants à Shattrath.\n\nAccomplir des quêtes pour les Clairvoyants fera baisser votre réputation auprès de l'Aldor."}},
[10510] = {"Dans la mine de draenéthyste", nil, {"Ramassez 5 Cristaux de mine de draenéthyste."}},
[10511] = {"Une étrange bière", nil, {"Récupérez 11 Foudroyante-des-brutes de la Masse-sanglante."}},
[10512] = {"Pinter les Flèchelame", nil, {"Utilisez le Tonneau de foudroyante-des-brutes de la Masse-sanglante pour tenter d'enivrer 5 Ogres de Flèchelame."}},
[10513] = {"Oronok Cœur-fendu", nil, {"Partez à la recherche d'Oronok Cœur-fendu sur la Saillie brisée, au nord de la Citerne de Glissentaille."}},
[10514] = {"J'ai tenu bien des rôles...", nil, {"Oronok Cœur-fendu, à la Ferme d'Oronok dans la vallée d'Ombrelune, veut que vous ramassiez 10 Tubercules d'Ombrelune dans les Plaines brisées.\n\nIl vous demande aussi de rapporter le Sifflet à sanglier d'Oronok lorsque vous aurez terminé."}},
[10515] = {"Une leçon bien apprise", nil, {"Oronok Cœur-fendu, à la Ferme d'Oronok dans la vallée d'Ombrelune, veut que vous détruisiez 10 Œufs d'écorcheurs voraces dans les Plaines brisées."}},
[10516] = {"Les atours d'un redresseur de torts", nil, {"Récupérez la Lame du redresseur de torts Vuuleen et le Bouclier du redresseur de torts Vuuleen."}},
[10517] = {"Gorr'niaud, ton heure est venue...", nil, {"Tuez Gorr'niaud, chef des ogres du bastion de Flèchelame."}},
[10518] = {"Planter la bannière", nil, {"Utilisez la Bannière de Flèchelame au sommet de la Tour Nord-sanglante pour attirer Babin Graillebâfre. Récupérez la Bannière du clan Flèchelame et le Heaume de Babin Graillebâfre."}},
[10519] = {"La Formule de damnation - vérité et histoire", nil, {"Oronok Cœur-fendu à la ferme d'Oronok dans la vallée d'Ombrelune veut que vous écoutiez son histoire. Parlez à Oronok pour commencer à écouter son histoire."}},
[10521] = {"Grom'tor, fils d'Oronok", nil, {"Trouvez Grom'tor, fils d'Oronok à la Halte de Glissentaille dans la vallée d'Ombrelune."}},
[10522] = {"La Formule de damnation - la charge de Grom'tor", nil, {"Grom'tor, fils d'Oronok, de la Halte de Glissentaille dans la vallée d'Ombrelune, veut que vous récupériez le


_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == REG_GPIO_6_PD_A::ENABLED
    }
}
impl core::ops::Deref for REG_GPIO_6_PD_R {
    type Target = crate::FieldReader<bool, REG_GPIO_6_PD_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `reg_gpio_6_pd` writer - Pull Down Resistor for GPIO6."]
pub struct REG_GPIO_6_PD_W<'a> {
    w: &'a mut W,
}
impl<'a> REG_GPIO_6_PD_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: REG_GPIO_6_PD_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "`0`"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(REG_GPIO_6_PD_A::DISABLED)
    }
    #[doc = "`1`"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(REG_GPIO_6_PD_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
        self.w
    }
}
#[doc = "Pull Up Resistor for GPIO6.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum REG_GPIO_6_PU_A {
    #[doc = "0: `0`"]
    DISABLED = 0,
    #[doc = "1: `1`"]
    ENABLED = 1,
}
impl From<REG_GPIO_6_PU_A> for bool {
    #[inline(always)]
    fn from(variant: REG_GPIO_6_PU_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `reg_gpio_6_pu` reader - Pull Up Resistor for GPIO6."]
pub struct REG_GPIO_6_PU_R(crate::FieldReader<bool, REG_GPIO_6_PU_A>);
impl REG_GPIO_6_PU_R {
    pub(crate) fn new(bits: bool) -> Self {
        REG_GPIO_6_PU_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> REG_GPIO_6_PU_A {
        match self.bits {
            false => REG_GPIO_6_PU_A::DISABLED,
            true => REG_GPIO_6_PU_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == REG_G


             base::Unretained(&event)));
          event.Wait();
        }
      }

      delete g_client;  // In case we're recreating the network service.
      g_client = new NetworkServiceClient();

      // Call SetClient before creating NetworkServiceClient, as the latter
      // might make requests to NetworkService that depend on initialization.
      (*g_network_service_remote)->SetParams(CreateNetworkServiceParams());
      g_client->OnNetworkServiceInitialized(g_network_service_remote->get());

      g_network_service_is_responding = false;
      g_network_service_remote->QueryVersion(base::BindOnce(
          [](base::Time start_time, uint32_t) {
            g_network_service_is_responding = true;
            base::TimeDelta delta = base::Time::Now() - start_time;
            UMA_HISTOGRAM_MEDIUM_TIMES("NetworkService.TimeToFirstResponse",
                                       delta);
            if (g_last_network_service_crash.is_null()) {
              UMA_HISTOGRAM_MEDIUM_TIMES(
                  "NetworkService.TimeToFirstResponse.OnStartup", delta);
            } else {
              UMA_HISTOGRAM_MEDIUM_TIMES(
                  "NetworkService.TimeToFirstResponse.AfterCrash", delta);
            }
          },
          base::Time::Now()));

      const base::CommandLine* command_line =
          base::CommandLine::ForCurrentProcess();
      if (command_line->HasSwitch(network::switches::kLogNetLog)) {
        base::FilePath log_path =
            command_line->GetSwitchValuePath(network::switches::kLogNetLog);
        if (log_path.empty()) {
          log_path = GetContentClient()->browser()->GetNetLogDefaultDirectory();
          if (!log_path.empty())
            log_path = log_path.Append(FILE_PATH_LITERAL("netlog.json"));
        }

        base::File file = NetworkServiceInstancePrivate::BlockingOpenFile(
            log_path, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
        if (!file.IsValid()) {
          LOG(ERROR) << "Failed opening NetLog: " << log_path.value();
        } else {
          (*g_network_service_remote)
              ->StartNetLog(
                  std::move(file),
                  GetNetCaptureModeFromCommandLine(*command_line),
                  GetContentClient()->browser()->GetNetLogConstants());
        }
      }

      base::FilePath ssl_key_log_path;
      if (command_line->HasSwitch(network::switches::kSSLKeyLogFile)) {
        UMA_HISTOGRAM_ENUMERATION(kSSLKeyLogFileHistogram,
                                  SSLKeyLogFileAction::kSwitchFound);
        ssl_key_log_path =
            command_line->GetSwitchValuePath(network::switches::kSSLKeyLogFile);
        LOG_IF(WARNING, ssl_key_log_path.empty())
            << "ssl-key-log-file argument missing";
      } else {
        std::unique_ptr<base::Environment> env(base::Environment::Create());
        std::string env_str;
        if (env->GetVar("SSLKEYLOGFILE", &env_str)) {
          UMA_HISTOGRAM_ENUMERATION(kSSLKeyLogFileHistogram,
                                    SSLKeyLogFileAction::kEnvVarFound);
#if BUILDFLAG(IS_WIN)
          // base::Environment returns environment variables in UTF-8 on
          // Windows.
          ssl_key_log_path = base::FilePath(base::UTF8ToWide(env_str));
#else
          ssl_key_log_path = base::FilePath(env_str);
#endif
        }
      }

      if (!ssl_key_log_path.empty()) {
        base::File file = NetworkServiceInstancePrivate::BlockingOpenFile(
            ssl_key_log_path,
            base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_APPEND);
        if (!file.IsValid()) {
          LOG(ERROR) << "Failed opening SSL key log file: "
                     << ssl_key_log_path.value();
        } else {
          UMA_HISTO


y.ChannelDetailActivity
import com.cysion.media.ui.iview.ChnView
import com.cysion.other.startActivity_ex
import com.cysion.uibox.toast.toast
import kotlinx.android.synthetic.main.fragment_music_chn.*

class MusicChannelFragment : BaseFragment(), ChnView {

    private val mChannelList = mutableListOf<ChannelInfo>()

    private val adapter by lazy {
        MusicChnAdapter(mChannelList, context as Context)
    }
    private val presenter by lazy {
        ChnPresenter().apply { attach(this@MusicChannelFragment) }
    }

    override fun getLayoutId(): Int = R.layout.fragment_music_chn

    override fun initView() {
        rvChnList.layoutManager = GridLayoutManager(context, 2)
        rvChnList.adapter = adapter
        adapter.setOnTypeClickListener { obj, position, flag ->
            if (flag == ITEM_CLICK) {
                val bundle = Bundle()
                bundle.putString(TITLE, obj.name)
                bundle.putString(CHANNEL_NAME, obj.ch_name)
                context?.startActivity_ex<ChannelDetailActivity>(BUNDLE_KEY, bundle)
            }
        }
    }

    override fun lazyLoad() {
        super.lazyLoad()
        presenter.getChnList()
    }

    override fun visibleAgain() {
        super.visibleAgain()
        if (mChannelList.size == 0) {
            presenter.getChnList()
        }
    }

    override fun setChannels(datalist: MutableList<ChannelInfo>) {
        mChannelList.addAll(datalist)
        adapter.notifyDataSetChanged()
        if (mChannelList.size == 0) {
            multiView.showEmpty()
        }
    }

    override fun loading() {
        multiView.showLoading()
    }

    override fun stopLoad() {
        multiView.showContent()
    }

    override fun error(code: Int, msg: String) {
        context?.toast("$code,$msg")
        if (mChannelList.size == 0) {
            multiView.showEmpty()
            if (code == ErrorStatus.NETWORK_ERROR) {
                multiView.showNoNetwork()
            }
        }
    }

    override fun closeMvp() {
        presenter.detach()
    }
}// Copyright 2023 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

package org.cytrus.cytrus_emu.fragments

import android.app.Dialog
import android.net.Uri
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentActivity
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.cytrus.cytrus_emu.CytrusApplication
import org.cytrus.cytrus_emu.R
import org.cytrus.cytrus_emu.databinding.DialogCopyDirBinding
import org.cy


(directoryPath);
    final res = resDetails._data;
    if (res.isEmpty) {
      isImportingPlaylists.value = false;
      return resDetails;
    }

    final actionIfPlaylistsExist = await NamidaOnTaps.inst.showDuplicatedDialogAction(
      PlaylistAddDuplicateAction.values,
      displayTitle: false,
      initiallySelected: PlaylistAddDuplicateAction.mergeAndSortByAddedDate,
    );
    if (actionIfPlaylistsExist == null) {
      isImportingPlaylists.value = false;
      return null;
    }

    final completer = Completer<void>();
    res.loopAdv((playlist, index) {
      final details = playlist.$1.details;
      final plID = details != null ? PlaylistID(id: details.playlistID) : null;
      final newTracks = <String>[];
      final newTracksDates = <String, int?>{};
      playlist.$2.loop((e) {
        newTracks.add(e.id);
        newTracksDates[e.id] = e.dateAdded?.millisecondsSinceEpoch;
      });
      YoutubePlaylistController.inst
          .addNewPlaylistRaw(
        playlist.$1.name,
        creationDate: details?.timeCreated?.millisecondsSinceEpoch,
        modifiedDate: details?.timeUpdated?.millisecondsSinceEpoch,
        playlistID: plID,
        comment: details?.description ?? '',
        tracks: newTracks,
        convertItem: (id, dateAddedFallback, playlistID) => YoutubeID(
          id: id,
          watchNull: YTWatch(
            dateMSNull: newTracksDates[id] ?? dateAddedFallback,
            isYTMusic: false,
          ),
          playlistID: playlistID,
        ),
        actionIfAlreadyExists: () => actionIfPlaylistsExist,
      )
          .then((value) {
        if (index == res.length - 1) completer.complete();
      });
    });

    await completer.future;
    YoutubePlaylistController.inst.playlistsMap.refresh();
    isImportingPlaylists.value = false;
    return resDetails;
  }

  Future<int> importSubscriptions(String subscriptionsFilePath) async {
    isImportingSubscriptions.value = true;
    final res = await _parseSubscriptions.thready(subscriptionsFilePath);
    res.loop((e) {
      final valInMap = YoutubeSubscriptionsController.inst.availableChannels.value[e.id];
      YoutubeSubscriptionsController.inst.setChannel(
        e.id,
        YoutubeSubscription(
          title: valInMap != null && valInMap.title == '' ? e.title : valInMap?.title ?? e.title,
          channelID: e.id,
          subscribed: true,
          lastFetched: valInMap?.lastFetched,
        ),
      );
    });
    YoutubeSubscriptionsController.inst.sortByLastFetched();
    await YoutubeSubscriptionsController.inst.saveFile();
    isImportingSubscriptions.value = false;
    return res.length;
  }

  static DateTime? parseDate(String dateText) {
    return DateTime.tryParse(dateText) ?? DateTime.tryParse(dateText.replaceFirst(' ', 'T').replaceFirst(' Z', 'Z').replaceFirst(' UTC', 'Z')); // fixes weird date format
  }

  /// there are 2 types of takeouts for playlists as encountered:
  /// - old takeouts: playlist file that contains playlist metadata as header, and the second part is the actual videos
  /// - new takeouts: playlist file that contains the actual videos only. metadata is inside a separate `playlists.csv` file
  ///
  /// both are being handled severally, some playlist data is present in old but not in new, and vice versa.
  /// new behaviour was introduced somewhere between `08/6/2023` & `04/12/2023`
  static List<(_YTPlaylistEntry, List<_VideoEntry>)> _parsePlaylistsFiles(String d


p2997r1.html)
    - C++26でイテレータの共通参照要件を削除
# basic_const_iterator
* iterator[meta header]
* std[meta namespace]
* class template[meta id-type]
* cpp23[meta cpp]

```cpp
namespace std {
  template<input_iterator Iterator>
  class basic_const_iterator;
}
```

## 概要

`basic_const_iterator`は、イテレータをラップし、元の要素を定数（`const`）として参照するイテレータアダプタである。その他の操作は、元のイテレータそのものの動作をする。

## メンバ関数

| 名前 | 説明 | 対応バージョン |
|------------------------------------------------------|-------------|-------|
| [`(constructor)`](basic_const_iterator/op_constructor.md) | コンストラクタ | C++23 |
| [`base`](basic_const_iterator/base.md)                    | 元のイテレータを取得する | C++23 |
| [`operator*`](basic_const_iterator/op_deref.md)           | 間接参照演算子 | C++23 |
| [`operator->`](basic_const_iterator/op_arrow.md)          | メンバアクセス演算子 | C++23 |
| [`operator++`](basic_const_iterator/op_increment.md)      | イテレータをインクリメントする | C++23 |
| [`operator--`](basic_const_iterator/op_decrement.md)      | イテレータをデクリメントする | C++23 |
| [`operator+=`](basic_const_iterator/op_plus_assign.md)    | イテレータ自身を進める | C++23 |
| [`operator-=`](basic_const_iterator/op_minus_assign.md)   | イテレータ自身を逆に進める | C++23 |
| [`operator-`](basic_const_iterator/op_minus.md)          | 2つの`basic_const_iterator`の差を求める | C++23 |
| [`operator[]`](basic_const_iterator/op_at.md)             | 任意の位置にランダムアクセスする | C++23 |
| [`operator==`](basic_const_iterator/op_equal.md)         | 等値比較 | C++23 |
| `operator!=`     | 非等値比較 ([`==`](basic_const_iterator/op_equal.md)により使用可能) | C++23 |
| [`operator<`](basic_const_iterator/op_less.md)           | 左辺が右辺より小さいかの判定を行う | C++23 |
| [`operator<=`](basic_const_iterator/op_less_equal.md)    | 左辺が右辺以下かの判定を行う | C++23 |
| [`operator>`](basic_const_iterator/op_greater.md)        | 左辺が右辺より大きいかの判定を行う | C++23 |
| [`operator>=`](basic_const_iterator/op_greater_equal.md) | 左辺が右辺以上かの判定を行う | C++23 |
| [`operator<=>`](basic_const_iterator/op_compare_3way.md)           | 三方比較を行う | C++23 |

## メンバ型

| 名前 | 説明 | 対応バージョン |
|------------------------------------------------------|-------------|-------|
| `iterator_concept` | `Iterator`がモデルとなる最も強いイテレータコンセプトに対応する[イテレータタグ型](/reference/iterator/iterator_tag.md) | C++23 |
| `iterator_category` | `Iterator`が[`forward_iterator`](/refe


><cn type="integer" id="S4.T3.29.26.3.m1.1.1.2.cmml" xref="S4.T3.29.26.3.m1.1.1.2">56</cn><cn type="integer" id="S4.T3.29.26.3.m1.1.1.3.cmml" xref="S4.T3.29.26.3.m1.1.1.3">83</cn></apply></annotation-xml><annotation encoding="application/x-tex" id="S4.T3.29.26.3.m1.1c">56\pm 83\phantom{0}\phantom{0}</annotation></semantics></math>
<math id="S4.T3.30.27.4.m1.1" class="ltx_Math" alttext="111\ \pm^{236}_{111}" display="inline"><semantics id="S4.T3.30.27.4.m1.1a"><mrow id="S4.T3.30.27.4.m1.1.1" xref="S4.T3.30.27.4.m1.1.1.cmml"><mn id="S4.T3.30.27.4.m1.1.1.2" xref="S4.T3.30.27.4.m1.1.1.2.cmml">111</mn><msubsup id="S4.T3.30.27.4.m1.1.1.3" xref="S4.T3.30.27.4.m1.1.1.3.cmml"><mo lspace="0.722em" id="S4.T3.30.27.4.m1.1.1.3.2.2" xref="S4.T3.30.27.4.m1.1.1.3.2.2.cmml">±</mo><mn id="S4.T3.30.27.4.m1.1.1.3.3" xref="S4.T3.30.27.4.m1.1.1.3.3.cmml">111</mn><mn id="S4.T3.30.27.4.m1.1.1.3.2.3" xref="S4.T3.30.27.4.m1.1.1.3.2.3.cmml">236</mn></msubsup></mrow><annotation-xml encoding="MathML-Content" id="S4.T3.30.27.4.m1.1b"><apply id="S4.T3.30.27.4.m1.1.1.cmml" xref="S4.T3.30.27.4.m1.1.1"><csymbol cd="latexml" id="S4.T3.30.27.4.m1.1.1.1.cmml" xref="S4.T3.30.27.4.m1.1.1">limit-from</csymbol><cn type="integer" id="S4.T3.30.27.4.m1.1.1.2.cmml" xref="S4.T3.30.27.4.m1.1.1.2">111</cn><apply id="S4.T3.30.27.4.m1.1.1.3.cmml" xref="S4.T3.30.27.4.m1.1.1.3"><csymbol cd="ambiguous" id="S4.T3.30.27.4.m1.1.1.3.1.cmml" xref="S4.T3.30.27.4.m1.1.1.3">subscript</csymbol><apply id="S4.T3.30.27.4.m1.1.1.3.2.cmml" xref="S4.T3.30.27.4.m1.1.1.3"><csymbol cd="ambiguous" id="S4.T3.30.27.4.m1.1.1.3.2.1.cmml" xref="


        for _ in 0..NUMBER_OF_THREADS {
            let data = queue.clone();
            let jh = thread::spawn(
                move || {
                    expect!(data.dequeue()).to(be_equal_to(1));
                    data.enqueue(1);
                }
            );
            results.push(jh);
        }

        queue.enqueue(1);

        for jh in results {
            expect!(jh.join()).to(be_ok());
        }

        expect!(queue.dequeue()).to(be_equal_to(1));
    }

    it "should notify threads when offer value to queue" {
        const NUMBER_OF_THREADS: usize = 20;
        let mut results = Vec::with_capacity(NUMBER_OF_THREADS);

        for _ in 0..NUMBER_OF_THREADS {
            let data = queue.clone();
            let jh = thread::spawn(
                move || {
                    expect!(data.dequeue()).to(be_equal_to(1));
                    expect!(data.offer(1)).to(be_true());
                }
            );
            results.push(jh);
        }

        thread::sleep(Duration::from_millis(100));
        expect!(queue.offer(1)).to(be_true());

        for jh in results {
            expect!(jh.join()).to(be_ok());
        }

        expect!(queue.dequeue()).to(be_equal_to(1));
    }

    it "should wait when queue is full" {
        const NUMBER_OF_THREADS: usize = CAPACITY-1;
        for _ in 0..CAPACITY {
            queue.enqueue(1);
        }
        let mut results = Vec::with_capacity(NUMBER_OF_THREADS);

        for _ in 0..NUMBER_OF_THREADS {
            let data = queue.clone();
            let jh = thread::spawn(
                move || {
                    data.enqueue(10);
                    expect!(data.dequeue()).to(be_equal_to(1));
                }
            );
            results.push(jh);
        }

        thread::sleep(Duration::from_millis(100));
        expect!(queue.dequeue()).to(be_equal_to(1));

        for jh in results {
            expect!(jh.join()).to(be_ok());
        }

        expect!(queue.len()).to(be_equal_to(CAPACITY-1));
    }
}

pub fn enqeue_times(times: i32, queue: &BlockingQueue<i32>) {
    for i in 0..times {
        queue.enqueue(i);
    }
}

pub fn dequeue_times(times: i32, queue: &BlockingQueue<i32>) {
    for i in 0..times {
        queue.dequeue();
    }
}
<reponame>danielvschoor/sc2-proxy
//! Proxy WebSocket receiver

use crossbeam::channel::Sender;
use log::debug;
use std::net::ToSocketAddrs;

use websocket::client::sync::Client as GenericClient;
use websocket::server::sync::Server as GenericServer;
use websocket::server::NoTlsAcceptor;
use websocket::stream::sync::TcpStream;

/// Server socket
pub type Server = GenericServer<NoTlsAcceptor>;
/// Client socket
pub type Client = GenericClient<TcpStream>;

/// Accept a new connection
fn get_connection(server: &mut Server) -> Option<Client> {
    Some(server.accept().ok()?.accept().expect("Unable to accept"))
}

/// Run the proxy server
pub fn run<A: ToSocketAddrs>(addr: A, channel_out: Sender<Client>) -> ! {
    let mut server = Server::bind(addr).expect("Unable to bind");

    loop {
        debug!("Waiting for connection");
        if let Some(conn) = get_connection(&mut server) {
            debug!("


 table
		fs.buildCertificates(retVals.CertificateMap)

		// update blacklisted peers in hosts collection
		fs.markBlacklistedPeers(retVals.HostMap)

		// record file+database name hash in metadabase to prevent duplicate content
		fmt.Println("\t[-] Indexing log entries ... ")
		err := fs.metaDB.AddNewFilesToIndex(indexedFileBatch)
		if err != nil {
			fs.log.Error("Could not update the list of parsed files")
		}

	}

	// mark results as imported and analyzed
	fmt.Println("\t[-] Updating metadatabase ... ")
	fs.metaDB.MarkDBAnalyzed(fs.database.GetSelectedDB(), true)

	progTime := time.Now()
	fs.log.WithFields(
		log.Fields{
			"current_time": progTime.Format(util.TimeFormat),
			"total_time":   progTime.Sub(start).String(),
		},
	).Info("Finished upload. Starting indexing")

	progTime = time.Now()
	fs.log.WithFields(
		log.Fields{
			"current_time": progTime.Format(util.TimeFormat),
			"total_time":   progTime.Sub(start).String(),
		},
	).Info("Finished importing log files")

	fmt.Println("\t[-] Done!")
}

// batchFilesBySize takes in an slice of indexedFiles and splits the array into
// subgroups of indexedFiles such that each group has a total size in bytes less than size
func batchFilesBySize(indexedFiles []*files.IndexedFile, size int64) [][]*files.IndexedFile {
	// sort the indexed files so we process them in order
	sort.Slice(indexedFiles, func(i, j int) bool {
		return indexedFiles[i].Path < indexedFiles[j].Path
	})

	//group by target collection
	fileTypeMap := make(map[string][]*files.IndexedFile)
	for _, file := range indexedFiles {
		if _, ok := fileTypeMap[file.TargetCollection]; !ok {
			fileTypeMap[file.TargetCollection] = make([]*files.IndexedFile, 0)
		}
		fileTypeMap[file.TargetCollection] = append(fileTypeMap[file.TargetCollection], file)
	}

	// Take n files in each target collection group until the size limit is exceeded, then start a new batch
	batches := make([][]*files.IndexedFile, 0)
	currBatch := make([]*files.IndexedFile, 0)
	currAggBytes := int64(0)
	iterators := make(map[string]int)
	for fileType := range fileTypeMap {
		iterators[fileType] = 0
	}

	for len(iterators) != 0 { // while there is data to iterate through

		maybeBatch := make([]*files.IndexedFile, 0)
		maybeAggBytes := int64(0)
		for fileType := range fileTypeMap { // grab a file for each target collection.
			if _, ok := iterators[fileType]; ok { // if we haven't ran through all the files for the target collection
				// append the file and aggregate the bytes
				maybeBatch = append(maybeBatch, fileTypeMap[fileType][iterators[fileType]])
				maybeAggBytes += fileTypeMap[fileType][iterators[fileType]].Length
				iterators[fileType]++

				// if we've exhausted the files for the target collection, prevent accessing the map for that target collection
				if iterators[fileType] == len(fileTypeMap[fileType]) {
					delete(iterators, fileType)
				}
			}
		}

		// split off the current batch if adding the next set of files would exceed the target size
		// Guarding against the len(currBatch) == 0 case prevents us from failing when we cannot make
		// small enough batch sizes. We just try our best and process 1 file for each target collection at a time.
		if len(currBatch) != 0 && currAggBytes+maybeAggBytes >= size {


 private void Paint(CurvedCornersLabel view)
        {
            this.Layer.CornerRadius = (float)view.CurvedCornerRadius;
            this.Layer.BackgroundColor = view.CurvedBackgroundColor.ToCGColor();
        }

        protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged(sender, e);

            // re-paint if these properties change at runtime
            if (e.PropertyName == CurvedCornersLabel.BackgroundColorProperty.PropertyName ||
                e.PropertyName == CurvedCornersLabel.CurvedCornerRadiusProperty.PropertyName)
            {
                if (Element != null)
                {
                    Paint((CurvedCornersLabel)Element);
                }
            }
        }
    }
}


                            showNewPatchDialog = false
                        }
                    ) {
                        Text(
                            modifier = Modifier.padding(vertical = 8.dp),
                            text = stringResource(R.string.patch_from_applist),
                            style = MaterialTheme.typography.bodyLarge
                        )
                    }
                }
            }
        )
    }

    FloatingActionButton(
        content = { Icon(Icons.Filled.Add, stringResource(R.string.add)) },
        onClick = {
            val uri = Configs.storageDirectory?.toUri()
            if (uri == null) {
                shouldSelectDirectory = true
            } else {
                runCatching {
                    val takeFlags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION
                    context.contentResolver.takePersistableUriPermission(uri, takeFlags)
                    if (DocumentFile.fromTreeUri(context, uri)?.exists() == false) throw IOException("Storage directory was deleted")
                }.onSuccess {
                    showNewPatchDialog = true
                }.onFailure {
                    Log.w(TAG, "Failed to take persistable permission for saved uri", it)
                    Configs.storageDirectory = null
                    shouldSelectDirectory = true
                }
            }
        }
    )
}
import java.util.Properties

plugins {
    `kotlin-dsl`
//    id("com.github.dcendents.android-maven")
    id("maven-publish")
}

fun File.toProperties(): Properties {
    return Properties().apply { inputStream().use { load(it) } }
}

val properties = File(projectDir.parent, "gradle.properties").toProperties()
group = properties["GROUP_ID"].toString()
version = properties["VERSION"].toString()

repositories {
    maven("https://maven.aliyun.com/repository/google")
    maven("https://maven.aliyun.com/repository/public")
    google()
    mavenLocal()
    maven("https://jitpack.io")
}

gradlePlugin {
    plugins {
        register("android-x2j") {
            id = "android-x2j"
            implementationClass = "androidx2j.X2JPlugin"
        }
    }
}

dependencies {
    implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
    compileOnly(gradleApi())
    implementation(localGroovy())
    implementation("com.android.tools.build:gradle:3.5.1")
    implementation("org.javassist:javassist:3.22.0-GA")
    implementation("commons-io:commons-io:2.5")
}

afterEvaluate {
    val x2jInputFile = file("../x2c-compat/src/main/java/androidx2j/X2J.java")
    val x2jOutputFile = file("src/main/kotlin/androidx2j/X2J.kt")
    if (x2jInputFile.lastModified() > x2jOutputFile.lastModified()) {
        val x2jCode = x2jInputFile.readText()
        x2jOutputFile.writeText("package androidx2j\n\nconst val X2J_CODE = \"\"\"$x2jCode\"\"\"")
    }
}

package androidx2j

import com.android.build.gradle.AppExtension
import com.android.build.gradle.BaseExtension
import com.android.build.gradle.LibraryExtension
import com.android.build.gradle.api.BaseVariant
import org.gradle.api.Plugin
import org.gradle.api.Project
import java.io.File
import java.util.*

@Suppress("UnstableApiUsage", "DefaultLocale")
class X2JPlugin : Plugin<Project> {
    private val layoutFiles = hashMapOf<String, File>()
    private var isAndroidLibrary = false

    override fun apply(project: Project) {
        MyLogger.log("hello, android-x2j")
        try {
            val androidApp = project.extensions.findByType(AppExtension::class.java)
            val androidLib = project.extensions.findByType(LibraryE


сы на китайский юань Жэньминьби / доллар США"],
t.exports["#COMEX:AUP1!-symbol-description"]=["Фьючерсы на Aluminum MW U.S. Transaction Premium Platts (25MT)"],t.exports["#CME:L61!-symbol-description"]=["Фьючерсы на бразильский реал"],t.exports["#CME:WP1!-symbol-description"]=["Фьючерсы на польский злотый"],t.exports["#CME:N61!-symbol-description"]=["Фьючерсы на новозеландский доллар"],t.exports["#CME_MINI:MG1!-symbol-description"]=["Фьючерсы на австралийский доллар / доллар США (E-micro)"],t.exports["#CME_MINI:WN1!-symbol-description"]=["Фьючерсы на швейцарский франк / доллар США (E-micro)"],t.exports["#CME_MINI:MF1!-symbol-description"]=["Фьючерсы на евро / доллар США (E-micro)"],t.exports["#CME_MINI:E71!-symbol-description"]=["Фьючерсы на евро (E-mini)"],t.exports["#CBOT:ZK1!-symbol-description"]=["Фьючерсы на этанол"],t.exports["#CME_MINI:MB1!-symbol-description"]=["Фьючерсы на британский фунт / доллар США (E-micro)"],t.exports["#NYMEX_MINI:QU1!-symbol-description"]=["Фьючерсы на бензин (E-mini)"],t.exports["#NYMEX_MINI:QX1!-symbol-description"]=["Фьючерсы на мазут (E-mini)"],t.exports["#COMEX_MINI:QC1!-symbol-description"]=["Фьючерсы на медь (E-mini)"],t.exports["#NYMEX_MINI:QG1!-symbol-description"]=["Фьючерсы на природный газ (E-mini)"],t.exports["#CME:E41!-symbol-description"]=["Фьючерсы на доллар США / турецкую лиру"],t.exports["#COMEX_MINI:QI1!-symbol-description"]=["Фьючерсы на серебро (мини)"],t.exports["#CME:DL1!-symbol-description"]=["Фьючерсы на молоко класса III"],t.exports["#NYMEX:UX1!-symbol-description"]=["Фьючерсы на уран"],t.exports["#CBOT:BO1!-symbol-description"]=["Фьючерсы на соевое масло"],t.exports["#CME:HE1!-symbol-description"]=["Фьючерсы на свинину"],t.exports["#NYMEX:IAC1!-symbol-description"]=["Фьючерсы на Newcastle Coal"],t.exports["#NYMEX_MINI:QM1!-symbol-description"]=["Фьючерсы на E-mini Light Crude Oil"],t.exports["#NYMEX:JMJ1!-symbol-description"]=["Фьючерсы на Mini Brent Financial"],t.exports["#COMEX:AEP1!-symbol-description"]=["Фьючерсы на Aluminium European Premium"],t.exports["#


": 9254,
  r"""crowned""": 9255,
  r"""cal""": 9256,
  r"""acclaimed""": 9257,
  r"""chuckled""": 9258,
  r"""##ory""": 9259,
  r"""clara""": 9260,
  r"""sends""": 9261,
  r"""mild""": 9262,
  r"""towel""": 9263,
  r"""##fl""": 9264,
  r"""##day""": 9265,
  r"""##а""": 9266,
  r"""wishing""": 9267,
  r"""assuming""": 9268,
  r"""interviewed""": 9269,
  r"""##bal""": 9270,
  r"""##die""": 9271,
  r"""interactions""": 9272,
  r"""eden""": 9273,
  r"""cups""": 9274,
  r"""helena""": 9275,
  r"""##lf""": 9276,
  r"""indie""": 9277,
  r"""beck""": 9278,
  r"""##fire""": 9279,
  r"""batteries""": 9280,
  r"""filipino""": 9281,
  r"""wizard""": 9282,
  r"""parted""": 9283,
  r"""##lam""": 9284,
  r"""traces""": 9285,
  r"""##born""": 9286,
  r"""rows""": 9287,
  r"""idol""": 9288,
  r"""albany""": 9289,
  r"""delegates""": 9290,
  r"""##ees""": 9291,
  r"""##sar""": 9292,
  r"""discussions""": 9293,
  r"""##ex""": 9294,
  r"""notre""": 9295,
  r"""instructed""": 9296,
  r"""belgrade""": 9297,
  r"""highways""": 9298,
  r"""suggestion""": 9299,
  r"""lauren""": 9300,
  r"""possess""": 9301,
  r"""orientation""": 9302,
  r"""alexandria""": 9303,
  r"""abdul""": 9304,
  r"""beats""": 9305,
  r"""salary""": 9306,
  r"""reunion""": 9307,
  r"""ludwig""": 9308,
  r"""alright""": 9309,
  r"""wagner""": 9310,
  r"""intimate""": 9311,
  r"""pockets""": 9312,
  r"""slovenia""": 9313,
  r"""hugged""": 9314,
  r"""brighton""": 9315,
  r"""merchants""": 9316,
  r"""cruel""": 9317,
  r"""stole""": 9318,
  r"""trek""": 9319,
  r"""slopes""": 9320,
  r"""repairs""": 9321,
  r"""enrollment""": 9322,
  r"""politically""": 9323,
  r"""underlying""": 9324,
  r"""promotional""": 9325,
  r"""counting""": 9326,
  r"""boeing""": 9327,
  r"""##bb""": 9328,
  r"""isabella""": 9329,
  r"""naming""": 9330,
  r"""##и""": 9331,
  r"""keen""": 9332,
  r"""bacteria""": 9333,
  r"""listing""": 9334,
  r"""separately""": 9335,
  r"""belfast""": 9336,
  r"""ussr""": 9337,
  r"""450""": 9338,
  r"""lithuanian""": 9339,
  r"""anybody""": 9340,
  r"""ribs""": 9341,
  r"""sphere""": 9342,
  r"""martinez""": 9343,
  r"""cock""


ltip:AddLine(nome_magia, FormatTooltipNumber (_,  spell [2]).." (".._cstr("%.1f", (spell [2]/total_regenerado) * 100).."%)")
		GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
		_detalhes:AddTooltipBackgroundStatusbar (false, spell [2] / energy_tooltips_table [1][2] * 100)
	end

	--players
	reset_tooltips_table()
	i = 1

	for index, actor in ipairs(container._ActorTable) do
		if (actor.powertype == powertype) then

			local on_self = actor.targets [name]
			if (on_self) then
				local t = energy_tooltips_table [i]
				if (not t) then
					energy_tooltips_table [i] = {}
					t = energy_tooltips_table [i]
				end
				t[1], t[2], t[3] = actor.nome, on_self, actor.classe
				i = i + 1
			end

		end
	end

	i = i - 1
	_table_sort (energy_tooltips_table, _detalhes.Sort2)

	_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_PLAYERS"], headerColor, i, [[Interface\HELPFRAME\HelpIcon-HotIssues]], 0.21875, 0.78125, 0.21875, 0.78125)

	local ismaximized = false
	if (keydown == "ctrl" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 4) then
		GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, _detalhes.tooltip_key_size_width, _detalhes.tooltip_key_size_height, 0, 1, 0, 0.640625, _detalhes.tooltip_key_overlay2)
		_detalhes:AddTooltipHeaderStatusbar (r, g, b, 1)
		ismaximized = true
	else
		GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, _detalhes.tooltip_key_size_width, _detalhes.tooltip_key_size_height, 0, 1, 0, 0.640625, _detalhes.tooltip_key_overlay1)
		_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
	end

	max = i
	if (max > 3) then
		max = 3
	end

	if (ismaximized) then
		max = 99
	end

	for o = 1, math.min (i, max) do

		local source = energy_tooltips_table [o]

		if (source [2] < 1) then
			break
		end

		GameCooltip:AddLine(source [1], FormatTooltipNumber (_,  source [2]).." (".._cstr("%.1f", (source [2] / total_regenerado) * 100).."%)")
		_detalhes:AddTooltipBackgroundStatusbar()

		local classe = source [3]
		if (not classe) then
			classe = "UNKNOW"
		end
		if (classe == "UNKNOW") then
			GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, icon_size.W, icon_size.H, .25, .5, 0, 1)
		else
			GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, icon_size.W, icon_size.H, _unpack(_detalhes.class_coords [classe]))
		end

	end

	--player generators
	local allGeneratorSpells = {}
	local allGenerated = 0
	for spellid, spellObject in pairs(self.spells._ActorTable) do
		tinsert


s = []float64{1e-4, 1e-3, 1e-2, 1e-1, 1}

	// sort sizes in buckets with following upper bounds in bytes
	datastoreSizeBuckets = []float64{1 << 6, 1 << 12, 1 << 18, 1 << 24}
)

// New wraps the datastore, providing metrics on the operations. The
// metrics are registered with names starting with prefix and a dot.
func New(prefix string, ds datastore.Datastore) *measure {
	m := &measure{
		backend: ds,

		putNum: metrics.New(prefix+".put_total", "Total number of Datastore.Put calls").Counter(),
		putErr: metrics.New(prefix+".put.errors_total", "Number of errored Datastore.Put calls").Counter(),
		putLatency: metrics.New(prefix+".put.latency_seconds",
			"Latency distribution of Datastore.Put calls").Histogram(datastoreLatencyBuckets),
		putSize: metrics.New(prefix+".put.size_bytes",
			"Size distribution of stored byte slices").Histogram(datastoreSizeBuckets),

		getNum: metrics.New(prefix+".get_total", "Total number of Datastore.Get calls").Counter(),
		getErr: metrics.New(prefix+".get.errors_total", "Number of errored Datastore.Get calls").Counter(),
		getLatency: metrics.New(prefix+".get.latency_seconds",
			"Latency distribution of Datastore.Get calls").Histogram(datastoreLatencyBuckets),
		getSize: metrics.New(prefix+".get.size_bytes",
			"Size distribution of retrieved byte slices").Histogram(datastoreSizeBuckets),

		hasNum: metrics.New(prefix+".has_total", "Total number of Datastore.Has calls").Counter(),
		hasErr: metrics.New(prefix+".has.errors_total", "Number of errored Datastore.Has calls").Counter(),
		hasLatency: metrics.New(prefix+".has.latency_seconds",
			"Latency distribution of Datastore.Has calls").Histogram(datastoreLatencyBuckets),

		deleteNum: metrics.New(prefix+".delete_total", "Total number of Datastore.Delete calls").Counter(),
		deleteErr: metrics.New(prefix+".delete.errors_total", "Number of errored Datastore.Delete calls").Counter(),
		deleteLatency: metrics.New(prefix+".delete.latency_seconds",
			"Latency distribution of Datastore.Delete calls").Histogram(datastoreLatencyBuckets),

		queryNum: metrics.New(prefix+".query_total", "Total number of Datastore.Query calls").Counter(),
		queryErr: metrics.New(prefix+".query.errors_total", "Number of errored Datastore.Query calls").Counter(),
		queryLatency: metrics.New(prefix+".query.latency_seconds",
			"Latency distribution of Datastore.Query calls").Histogram(datastoreLatencyBuckets),

		checkNum: metrics.New(prefix+".check_total", "Total number of Datastore.Check calls").Counter(),
		checkErr: metrics.New(prefix+".check.errors_total", "Number of errored Datastore.Check calls").Counter(),
		checkLatency: metrics.New(prefix+".check.latency_seconds",
			"Latency distribution of Datastore.Check calls").Histogram(datastoreLatencyBuckets


::new(m20220609_000001_alter_users_logins::Migration),
            Box::new(m20220614_000001_create_invitations::Migration),

        ]
    }
}
//! File structs representing file entries inside a pk2 archive.
use std::hash::Hash;
use std::io::{self, Cursor, Read, Seek, SeekFrom, Write};
use std::mem;
use std::path::Path;
use std::time::SystemTime;

use crate::archive::Pk2;
use crate::error::{ChainLookupError, ChainLookupResult};
use crate::raw::block_chain::PackBlockChain;
use crate::raw::entry::{DirectoryEntry, FileEntry, PackEntry};
use crate::raw::{ChainIndex, StreamOffset};

/// A read-only file handle.
pub struct File<'pk2, B = std::fs::File> {
    archive: &'pk2 Pk2<B>,
    // the chain this file resides in
    chain: ChainIndex,
    // the index of this file in the chain
    entry_index: usize,
    seek_pos: u64,
}

impl<'pk2, B> Copy for File<'pk2, B> {}
impl<'pk2, B> Clone for File<'pk2, B> {
    fn clone(&self) -> Self {
        *self
    }
}

impl<'pk2, B> File<'pk2, B> {
    pub(super) fn new(archive: &'pk2 Pk2<B>, chain: ChainIndex, entry_index: usize) -> Self {
        File { archive, chain, entry_index, seek_pos: 0 }
    }

    pub fn modify_time(&self) -> Option<SystemTime> {
        self.entry().modify_time()
    }

    pub fn access_time(&self) -> Option<SystemTime> {
        self.entry().access_time()
    }

    pub fn create_time(&self) -> Option<SystemTime> {
        self.entry().create_time()
    }

    pub fn size(&self) -> u32 {
        self.entry().size
    }

    pub fn name(&self) -> &'pk2 str {
        self.entry().name()
    }

    fn entry(&self) -> &'pk2 FileEntry {
        self.archive
            .get_entry(self.chain, self.entry_index)
            .and_then(PackEntry::as_file)
            .expect("invalid file object")
    }

    fn remaining_len(&self) -> usize {
        (self.entry().size() as u64 - self.seek_pos) as usize
    }
}

impl<B> Seek for File<'_, B> {
    fn seek(&mut self, seek: SeekFrom) -> io::Result<u64> {
        let size = self.entry().size() as u64;
        seek_impl(seek, self.seek_pos, size).map(|new_pos| {
            self.seek_pos = new_pos;
            new_pos
        })
    }
}

impl<B> Read for File<'_, B>
where
    B: Read + Seek,
{
    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
        let pos_data = self.entry().pos_data();
        let rem_len = self.remaining_len();
        let len = buf.len().min(rem_len);
        let n = crate::io::read_at(
            &mut *self.archive.stream.borrow_mut(),
            pos_data + StreamOffset(self.seek_pos),
            &mut buf[..len],
        )?;
        self.seek(SeekFrom::Current(n as i64))?;
        Ok(n)
    }

    fn read_exact(&mut self, buf: &mut [u8]) -> io::Result<()> {
        let pos_data = self.entry().pos_data();
        let rem_len = self.remaining_len();
        if buf.len() < rem_len {
            Err(io::


)

questions <- read_csv("questions.csv.gz")
question_tags <- read_csv("question_tags.csv.gz")

questions

## # A tibble: 15,477,850 x 7
##       Id        CreationDate          ClosedDate        DeletionDate Score
##    <int>              <time>              <time>              <time> <int>
## 1      1 2008-07-31 21:26:37                <NA> 2011-03-28 00:53:47     1
## 2      4 2008-07-31 21:42:52                <NA>                <NA>   405
## 3      6 2008-07-31 22:08:08                <NA>                <NA>   180
## 4      8 2008-07-31 23:33:19 2013-06-03 04:00:25 2015-02-11 08:26:40    42
## 5      9 2008-07-31 23:40:59                <NA>                <NA>  1284
## 6     11 2008-07-31 23:55:37                <NA>                <NA>  1045
## 7     13 2008-08-01 00:42:38                <NA>                <NA>   413
## 8     14 2008-08-01 00:59:11                <NA>                <NA>   263
## 9     16 2008-08-01 04:59:33                <NA>                <NA>    64
## 10    17 2008-08-01 05:09:55                <NA>                <NA>    94
## # ... with 15,477,840 more rows, and 2 more variables: OwnerUserId <int>,
## #   AnswerCount <int>

question_tags

## # A tibble: 45,452,921 x 2
##       Id                 Tag
##    <int>               <chr>
## 1      1                data
## 2      4                  c#
## 3      4            winforms
## 4      4     type-conversion
## 5      4             decimal
## 6      4             opacity
## 7      6                html
## 8      6                 css
## 9      6                css3
## 10     6 internet-explorer-7
## # ... with 45,452,911 more rows

As one example, you could find the most popular tags:

question_tags %>%
  count(Tag,


ength}
          height={boxLength}
          padding={chartPadding}
          transform={`translate(${outerRadius},${outerRadius})`}
        >
          {this.chart(data).map((datum, index) => (
            <Path data={datum} index={index} fill={colorFn(index)} arcFn={pathArc} key={datum.data[dataKey]} />
          ))}
        </Chart>

        <Legend color={colorFn} {...{ data, dataValue, dataLabel, dataKey }} />
      </div>
    );
  }
}

export default DonutChart;
// @flow
import * as React from 'react';
import provideContextBroadcast from 'utils/provideContextBroadcast';

type FormError = {
  _error: string,
  [fieldName: string]: string,
};

type FormValues = { [fieldName: string]: mixed };

type FormState = {
  values: FormValues,
  blurred: { [fieldName: string]: boolean },
};

type FormFieldData = {
  name: string,
  value: mixed,
  initialValue: mixed,
  blurred: boolean,
  error: string,
  onBlur: () => void,
  onChange: (value: mixed) => void,
};

export type FormData = {
  fields: { [fieldName: string]: FormFieldData },
  error: string,
  valid: boolean,
  initializeForm: (newValues: FormValues) => void,
  submitForm: () => void,
};

type FormProps = {
  children: React.Node,
  setBroadcastState: (newState: mixed) => void,
  fields: string[],
  initialValues?: FormValues,
  onSubmit: (values: FormValues) => void,
  onSubmitSuccess: () => void,
  onSubmitFail: () => void,
  onFormDataChange: (formData: FormData) => void,
  validate: (values: FormValues, otherProps: Object) => FormError,
};

/**
 * Form component
 *
 * It renders a <form> element, handles all the form state, and provides
 * information and actions to the children components using context.
 *
 * It takes the following props:
 * - fields (required): Array of field names.
 * - initialValues:     Map of initial values.
 * - onSubmit:          Function to call on successful form submit.
 *                      If not provided, the submit logic can be handled in the
 *                      component.
 * - onSubmitSuccess:   Function to call when submit succeeded.
 * - onSubmitFail:      Function to call when submit failed.
 * - onFormDataChange:  Function to call with the form data when it changes.
 * - validate:          Function to validate the form on every change, if not
 *                      provided the form is always valid.
 *
 * The following props will be passed in a context Broadcast:
 * - fields:            Object with the value, blurred state, and errors for every field.
 *                      It also has function to attach the fields to the form state.
 * - error:             A generic error for the entire form (from the `_error` field returned
 *                      in the validation function).
 * - valid:             True is the form is valid.
 * - submitForm:        When called, the form will be validated and the provided 'onSubmit' function
 *                      will be called.
 * - initializeForm:    Initialize the form with the provided field values.
 *
 * To attach the form state to your form fields, you should use a component which takes form data
 * from the context Broadcast. (check `components/Field`)
 *
 */
export class Form extends React.Component<FormProps> {
  static defaultProps = {
    initialValues: {},
  };

  constructor(props: FormProps) {
    super(props);

    const { initialValues } = props;


").exists() || WorldsDB.newVFile(worldDir, "level.dat_old").exists()) {
			folderName += "_";
			worldDir = EaglerIntegratedServerWorker.saveFormat.getSaveLoader(folderName, false).getWorldDirectory();
		}
		List<char[]> fileNames = new ArrayList<>();
		try(ZipInputStream zis = new ZipInputStream(new EaglerInputStream(archiveContents))) {
			ZipEntry folderNameFile = null;
			while((folderNameFile = zis.getNextEntry()) != null) {
				if (folderNameFile.getName().contains("__MACOSX/")) continue;
				if (folderNameFile.isDirectory()) continue;
				String lowerName = folderNameFile.getName().toLowerCase();
				if (!(lowerName.endsWith(".dat") || lowerName.endsWith(".dat_old") || lowerName.endsWith(".mca") || lowerName.endsWith(".mcr"))) continue;
				fileNames.add(folderNameFile.getName().toCharArray());
			}
		}
		final int[] i = new int[] { 0 };
		while(fileNames.get(0).length > i[0] && fileNames.stream().allMatch(w -> w[i[0]] == fileNames.get(0)[i[0]])) i[0]++;
		int folderPrefixOffset = i[0];
		try(ZipInputStream zis = new ZipInputStream(new EaglerInputStream(archiveContents))) {
			ZipEntry f = null;
			int lastProgUpdate = 0;
			int prog = 0;
			while ((f = zis.getNextEntry()) != null) {
				if (f.getName().contains("__MACOSX/")) continue;
				if (f.isDirectory()) continue;
				String lowerName = f.getName().toLowerCase();
				if (!(lowerName.endsWith(".dat") || lowerName.endsWith(".dat_old") || lowerName.endsWith(".mca") || lowerName.endsWith(".mcr") || lowerName.endsWith(".bmp"))) continue;
				byte[] b;
				int sz = (int)f.getSize();
				if(sz >= 0) {
					b = new byte[sz];
					int j = 0, k;
					while(j < b.length && (k = zis.read(b, j, b.length - j)) != -1) {
						j += k;
					}
				}else {
					b = EaglerInputStream.inputStreamToBytesNoClose(zis);
				}
				String fileName = f.getName().substring(folderPrefixOffset);
				if (fileName.equals("level.dat") || fileName.equals("level.dat_old")) {
					NBTTagCompound worldDatNBT = CompressedStreamTools.readCompressed(new EaglerInputStream(b));

					NBTTagCompound gameRulesNBT = worldDatNBT.getCompoundTag("Data").getCompoundTag("GameRules");
					gameRulesNBT.setString("loadSpawnChunks", (gameRules & 2) != 0 ? "true" : "false");
					String s = (gameRules & 1) != 0 ? "true" : "false";
					gameRulesNBT.setString("bedSpawnPoint", s);
					gameRulesNBT.setString("clickToRide", "false");
					gameRulesNBT.setString("clickToSit", s);
					gameRulesNBT.setString("colorCodes", s);
					gameRulesNBT.setString("doSignEditing", s);
					worldDatNBT.getCompoundTag("Data").setTag("GameRules", gameRulesNBT);
					worldDatNBT.getCompoundTag("Data").setString("LevelName", newName);
					worldDatNBT.getCompoundTag("Data").setLong("LastPlayed", System.currentTimeMillis());
					WorldInfo.initEaglerVersion(worldDatNBT.getCompoundTag("Data"));
					EaglerOutputStream bo = new EaglerOutputStream();
					CompressedStreamTools.writeCompressed(worldDatNBT, bo);
					b = bo.toByteArray();
					VFile2 ff = WorldsDB.newVFile(worldDir, fileName);
					ff.setAllBytes(b);
					prog += b.length;
				} else if ((file


 changes.visibility ?? visibility,
    );
  }

  @override
  Map<String, dynamic> toJson() {
    final json = <String, dynamic>{};

    void addIfPresent(String fieldName, dynamic value) {
      if (value != null) {
        json[fieldName] = value;
      }
    }

    addIfPresent('raster-opacity', rasterOpacity);
    addIfPresent('raster-hue-rotate', rasterHueRotate);
    addIfPresent('raster-brightness-min', rasterBrightnessMin);
    addIfPresent('raster-brightness-max', rasterBrightnessMax);
    addIfPresent('raster-saturation', rasterSaturation);
    addIfPresent('raster-contrast', rasterContrast);
    addIfPresent('raster-resampling', rasterResampling);
    addIfPresent('raster-fade-duration', rasterFadeDuration);
    addIfPresent('visibility', visibility);
    return json;
  }

  factory RasterLayerProperties.fromJson(Map<String, dynamic> json) {
    return RasterLayerProperties(
      rasterOpacity: json['raster-opacity'],
      rasterHueRotate: json['raster-hue-rotate'],
      rasterBrightnessMin: json['raster-brightness-min'],
      rasterBrightnessMax: json['raster-brightness-max'],
      rasterSaturation: json['raster-saturation'],
      rasterContrast: json['raster-contrast'],
      rasterResampling: json['raster-resampling'],
      rasterFadeDuration: json['raster-fade-duration'],
      visibility: json['visibility'],
    );
  }
}

class HillshadeLayerProperties implements LayerProperties {
  // Paint Properties
  /// The direction of the light source used to generate the hillshading
  /// with 0 as the top of the viewport if `hillshade-illumination-anchor`
  /// is set to `viewport` and due north if `hillshade-illumination-anchor`
  /// is set to `map`.
  ///
  /// Type: number
  ///   default: 335
  ///   minimum: 0
  ///   maximum: 359
  ///
  /// Sdk Support:
  ///   basic functionality with js, android, ios, macos
  final dynamic hillshadeIlluminationDirection;

  /// Direction of light source when map is rotated.
  ///
  /// Type: enum
  ///   default: viewport
  /// Options:
  ///   "map"
  ///      The hillshade illumination is relative to the north direction.
  ///   "viewport"
  ///      The hillshade illumination is relative to the top of the
  ///      viewport.
  ///
  /// Sdk Support:
  ///   basic functionality with js, android, ios, macos
  final dynamic hillshadeIlluminationAnchor;

  /// Intensity of the hillshade
  ///
  /// Type: number
  ///   default: 0.5
  ///   minimum: 0
  ///   maximum: 1
  ///
  /// Sdk Support:
  ///   basic functionality with js, android, ios, macos
  final dynamic hillshadeExaggeration;

  /// The shading color of areas that face away from the light source.
  ///
  /// Type: color
  ///   default: #000000
  ///
  /// Sdk Support:
  ///   basic functionality with js, android, ios, macos
  final dynamic hillshadeShadowColor;

  /// The shading color of areas that faces towards the light source.
  ///
  /// Type: color
  ///   default: #FFFFFF
  ///
  /// Sdk Support:
  ///   basic functionality with js, android, ios, macos
  final dynamic hillshadeHighlightColor;

  /// The shading color used to accentuate rugged terrain like sharp cliffs
  /// and gorges.
  ///
  /// Type: color
  ///   default: #000000
  ///
  /// Sdk Support:
  ///   basic functionality with js, android, ios, macos
  final dynamic hillshadeAccentColor;

  // Layout Properties
  /// Whether this layer is displayed.
  ///
  /// T


rable
import net.ccbluex.liquidbounce.utils.kotlin.random
import net.ccbluex.liquidbounce.utils.math.minus
import net.ccbluex.liquidbounce.utils.math.plus
import net.ccbluex.liquidbounce.utils.math.times
import net.minecraft.entity.LivingEntity
import net.minecraft.util.math.Vec3d

@Suppress("MaxLineLength", "MagicNumber")
internal object TargetEntityMovementPrediction : ToggleableConfigurable(ElytraRotationProcessor, "Prediction", true) {
    private val mode by enumChoice("Mode", PredictMode.SIMPLE)
    private val glidingOnly by boolean("GlidingOnly", true)
    private val multiplier by floatRange("Multiplier", 1.8f..2f, 0.5f..3f)

    internal fun predictPosition(
        target: LivingEntity,
        targetPosition: Vec3d
    ) = when {
        !enabled || (glidingOnly && !target.isGliding) -> targetPosition
        else -> mode.predict(target, targetPosition, multiplier.random().toDouble())
    }
}

@Suppress("unused", "MagicNumber")
private enum class PredictMode(
    override val choiceName: String,
    val predict: (target: LivingEntity, targetPosition: Vec3d, multiplier: Double) -> Vec3d
) : NamedChoice {
    SIMPLE("Simple", { target, targetPosition, multiplier ->
        targetPosition + target.velocity * multiplier
    }),
    WITH_GRAVITY("WithGravity", { target, targetPosition, multiplier ->
        SIMPLE.predict(
            target,
            targetPosition,
            multiplier
        ) - Vec3d(
            0.0,
            0.5 * 0.05 * multiplier * multiplier,
            0.0
        )
    })
}
package net.ccbluex.liquidbounce.features.module.modules.combat.autoarmor

import net.ccbluex.liquidbounce.features.module.modules.combat.autoarmor.ModuleAutoArmor.UseHotbar
import net.ccbluex.liquidbounce.config.types.nesting.ToggleableConfigurable
import net.ccbluex.liquidbounce.event.waitTicks
import net.ccbluex.liquidbounce.event.tickHandler
import net.ccbluex.liquidbounce.utils.inventory.HotbarItemSlot
import net.ccbluex.liquidbounce.utils.inventory.Slots
import net.ccbluex.liquidbounce.utils.item.ArmorPiece
import net.ccbluex.liquidbounce.utils.item.durability
import net.ccbluex.liquidbounce.utils.item.isPlayerArmor
import net.minecraft.client.gui.screen.ingame.HandledScreen
import net.minecraft.client.gui.screen.ingame.InventoryScreen
import net.minecraft.entity.EquipmentSlot
import java.util.EnumSet

object AutoArmorSaveArmor : ToggleableConfigurable(ModuleAutoArmor, "SaveArmor", true) {
    val durabilityThreshold by int("DurabilityThreshold", 24, 0..100)
    private val autoOpen by boolean("AutoOpenInventory", true)

    private var hasOpenedInventory = false
    private var prevArmor = 0

    /**
     * Opens the inventory to save armor (as if the player has opened it manually) if the following conditions are met:
     * - The module is told to save armor and there is a replacement :)
     * - The inventory constraints require open inventory
     * (Otherwise, the inventory will be open automatically in a silent way and the armor will be saved)
     * - There is no replacement from the hotbar
     * (If there are some pieces that can be replaced by the pieces from the hotbar,
     * they will be used first, without opening the inventory)
     */
    @Suppress("unused")
    private val armorAutoSaveHandler = tickHandler {
        val conditions = booleanArrayOf(
            // Module checks
            ModuleAutoArm