// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Adapted from binary-trees C# .NET Core #6 program
// Best-scoring C# .NET Core version as of 2020-08-12

// The Computer Language Benchmarks Game
// https://salsa.debian.org/benchmarksgame-team/benchmarksgame/
//
// contributed by Marek Safar
// concurrency added by Peperud
// fixed long-lived tree by Anthony Lloyd
// ported from F# version by Anthony Lloyd

using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Xunit;
//using BenchmarkDotNet.Attributes;
//using MicroBenchmarks;

namespace BenchmarksGame
{
    //[MaxIterationCount(40)] // the default 20 is not enough, the benchmark has multimodal distribution and needs more runs
    //[BenchmarkCategory(Categories.Runtime, Categories.BenchmarksGame, Categories.JIT, Categories.NoWASM)]
    public class BinaryTrees_6
    {
        const int MinDepth = 4;
        const int NoTasks = 4;

        // 16 is about 80ms
        // 18 is about 500ms
        // 20 is about 3.9s
        // 21 is used in official numbers; about 7.8s
        const int N = 18;

        [Fact]
        public static int TestEntryPoint()
        {
            return Test(null);
        }

        [MethodImpl(MethodImplOptions.NoInlining)]
        public static int Test(int? arg)
        {
            var n = arg ?? 0;
            int check = Bench(n, true);

            const int expected = 4398;

            // Return 100 on success, anything else on failure.
            return check - expected + 100;
        }

        //[Benchmark(Description = nameof(BinaryTrees_6))]
        //public int RunBench() => Bench(N, verbose: false);

        static int Bench(int param, bool verbose)
        {
            int maxDepth = Math.Max(MinDepth + 2, param);

            var stretchTreeCheck = Task.Run(() =>
            {
                int stretchDepth = maxDepth + 1;
                return "stretch tree of depth " + stretchDepth + "\t check: " +
                            TreeNode.Create(stretchDepth).Check();
            });

            var longLivedTree = TreeNode.Create(maxDepth);
            var longLivedText = Task.Run(() =>
            {
                return "long lived tree of depth " + maxDepth +
                            "\t check: " + longLivedTree.Check();


 menu_h = 26

    ctx2 = m_libgui.newGUI()
    local flights_count = getFlightCount()

    local p = Fields.num_flights

    ctx2.label(menu_x, 60, 0, menu_h, "original flights count:", m_utils.FONT_8)
    label_org_time = ctx2.label(p.x, 60, 0, menu_h, flights_count, m_utils.FONT_8)

    ctx2.label(menu_x,  p.y, 0, menu_h, "new flights count:", m_utils.FONT_8)
    p.gui_obj = ctx2.number(p.x, p.y, p.w, menu_h, flights_count, nil, m_utils.FONT_8, p.min, p.max)

    ctx2.label(menu_x, 250, 0, menu_h, "Setting flight count to this model", m_utils.FONT_8)
    return nil
end

function M.draw_page(event, touchState)

    local num_flights = Fields.num_flights.gui_obj.value

    ctx2.run(event, touchState)
    return m_utils.PRESET_RC.OK_CONTINUE
end

function M.do_update_model()
    log("preset::num_flights()")

    local new_flight_count = Fields.num_flights.gui_obj.value

    model.setGlobalVariable(8, 0, new_flight_count)
    log("num_flights updated: " .. new_flight_count)

    return m_utils.PRESET_RC.OK_CONTINUE
end

return M


s
	stb	my_id_reg, [my_id_reg]			! store my ID there
	ba	getlock
	nop

th_main_1:
        add     my_id_reg, 0x24, my_id_reg
	stb	my_id_reg, [my_id_reg]
	ba	getlock
	nop

th_main_2:
        add     my_id_reg, 0x28, my_id_reg
	stb	my_id_reg, [my_id_reg]
	ba	getlock
	nop

th_main_3:
        add     my_id_reg, 0x2c, my_id_reg
	stb	my_id_reg, [my_id_reg]
	ba	getlock
	nop

th_main_4:
        add     my_id_reg, 0x30, my_id_reg
	stb	my_id_reg, [my_id_reg]
	ba	getlock
	nop

th_main_5:
        add     my_id_reg, 0x34, my_id_reg
	stb	my_id_reg, [my_id_reg]
	ba	getlock
	nop

th_main_6:
        add     my_id_reg, 0x38, my_id_reg
	stb	my_id_reg, [my_id_reg]
	ba	getlock
	nop

th_main_7:
        add     my_id_reg, 0x3c, my_id_reg
	stb	my_id_reg, [my_id_reg]
	ba	getlock
	nop

getlock:
        deccc   to_reg          			! dec timeout count
        be      bad_end                 		! branch if no timeout
        nop
        or      %g0, my_id_reg, test_reg
        casx    [spinlock_addr_reg], %g0, test_reg	! try to acquire lock
        tst     test_reg                       		! did we get it?
        bne     getlock
        nop

gotlock:						! do something
        set     TIMEOUT, to_reg         		! set to count again
	setx    protected_area,	%l0, data_base_reg	! the data area

	set 	10, %l0
loop1:
	ld 	[my_id_reg], %f16			! read the ID
	st 	%f16, [data_base_reg]  			! store my ID in there
	add	data_base_reg, 8, data_base_reg 	! increment the address
	deccc	%l0
	bne 	loop1					! repeat
	nop

	set 	10, %l0
loop2:
	sub	data_base_reg, 8, data_base_reg
	ld 	[my_id_reg], %f16			! read the ID
	ld 	[data_base_reg], %f0			! read the data area
	fcmps 	%fcc0, %f0, %f16 			! should be my ID
	fbne	%fcc0, bad_end
	nop
	deccc	%l0					! repeat
	bne 	loop2
	nop

clearlock:
        stx        %g0, [spinlock_addr_reg]		! unlock

check_done:						! finish or iterate
	deccc	global_cnt_reg
        be	good_end
	nop
	ba	getlock
	nop

good_end:
        ta      T_GOOD_TRAP
bad_end:
        ta      T_BAD_TRAP

!==========================
	.data

user_data_start:

spinlock_address:
	.word	0x0
	.skip 0x1000
protected_area:
	.word	0xbeef
	.skip 0x1000
	.word	0xbeef

__PERL__

use strict;

system("vlog > vlog.log");

open (F, "critsec.p -startcs=20000130 -endcs=20000190 | ") or die "cannot open critsec.p...\n";

while(<F>){
  print;
  if(/Everything OK/){
    exit 0;
  }
}

print "ERROR, something went wrong in perl postprocessing\n";
exit 1;


e.CHRISTMAS_STYLE.until(1556)))
                .with(EraPreference.hispanicUntil(ad1383)));
        tmp.put(
            "PT", // source: http://www.newadvent.org/cathen/03738a.htm#beginning
            ChronoHistory.ofFirstGregorianReform()
                .with(
                    NewYearRule.BEGIN_OF_JANUARY.until(1422)
                        .and(NewYearRule.CHRISTMAS_STYLE.until(1556)))
                .with(EraPreference.hispanicUntil(ad1422)));
        tmp.put(
            "FR",
            ChronoHistory.ofGregorianReform(PlainDate.of(1582, 12, 20))
                .with(NewYearRule.EASTER_STYLE.until(1567))); // edict of Roussillon in 1564 took effect 3 years later
        tmp.put(
            "DE", // Holy Roman Empire
            ChronoHistory.ofFirstGregorianReform()
                .with(NewYearRule.CHRISTMAS_STYLE.until(1544)));
        tmp.put(
            "DE-BAYERN",
            ChronoHistory.ofGregorianReform(PlainDate.of(1583, 10, 16))
                .with(NewYearRule.CHRISTMAS_STYLE.until(1544)));
        tmp.put(
            "DE-PREUSSEN",
            ChronoHistory.ofGregorianReform(PlainDate.of(1610, 9, 2))
                .with(NewYearRule.CHRISTMAS_STYLE.until(1559)));
        tmp.put(
            "DE-PROTESTANT",
            ChronoHistory.ofGregorianReform(PlainDate.of(1700, 3, 1))
                .with(NewYearRule.CHRISTMAS_STYLE.until(1559)));
        tmp.put(
            "NL",
            ChronoHistory.ofGregorianReform(PlainDate.of(1583, 1, 1)));
        tmp.put(
            "AT",
            ChronoHistory.ofGregorianReform(PlainDate.of(1584, 1, 17)));
        tmp.put(
            "CH",
            ChronoHistory.ofGregorianReform(PlainDate.of(1584, 1, 22)));
        tmp.put(
            "HU",
            ChronoHistory.ofGregorianReform(PlainDate.of(1587, 11, 1)));
        tmp.put(
            "DK",
            ChronoHistory.ofGregorianReform(PlainDate.of(1700, 3, 1))
                .with(NewYearRule.MARIA_ANUNCIATA.until(1623)));
        tmp.put(
            "NO",
            ChronoHistory.ofGregorianReform(PlainDate.of(1700, 3, 1))
                .with(NewYearRule.MARIA_ANUNCIATA.until(1623)));
        tmp.put(
            "IT",
            ChronoHistory.ofFirstGregorianReform()
                .with(NewYearRule.CHRISTMAS_STYLE.until(1583)));
        tmp.put(
            "IT-FLORENCE",
            ChronoHistory.ofFirstGregorianReform()
                .with(NewYearRule.MARIA_ANUNCIATA.until(1749)));
        tmp.put(
            "IT-PISA",
            ChronoHistory.ofFirstGregorianReform()
                .with(NewYearRule.CALCULUS_PISANUS.until(1749)));
        tmp.put(
            "IT-VENICE",
            ChronoHistory.ofFirstGregorianReform()
                .with(NewYearRule.BEGIN_OF_MARCH.until(1798)));
        tmp.put(
            "GB", // source: http://www.newadvent.org/cathen/03738a.htm#beginning
            ChronoHistory.ofGregorianReform(PlainDate.of(1752, 9, 14))
                .with(
                    NewYearRule.CHRISTMAS_STYLE.until(1087) // we don't exactly know when it started


Rdb_key_def::unpack_float(
    Rdb_field_packing *const fpi, Field *const field MY_ATTRIBUTE((__unused__)),
    uchar *const field_ptr, Rdb_string_reader *const reader,
    Rdb_string_reader *const unp_reader MY_ATTRIBUTE((__unused__))) {
  static float zero_val = 0.0;
  static const uchar zero_pattern[4] = {128, 0, 0, 0};

  return unpack_floating_point(field_ptr, reader, sizeof(float), FLT_EXP_DIG,
                               zero_pattern, (const uchar *)&zero_val,
                               rdb_swap_float_bytes);
}

/*
  Function of type rdb_index_field_unpack_t used to
  Unpack by doing the reverse action to Field_newdate::make_sort_key.
*/

int Rdb_key_def::unpack_newdate(
    Rdb_field_packing *const fpi, Field *const field MY_ATTRIBUTE((__unused__)),
    uchar *const field_ptr, Rdb_string_reader *const reader,
    Rdb_string_reader *const unp_reader MY_ATTRIBUTE((__unused__))) {
  const char *from;
  DBUG_ASSERT(fpi->m_max_image_len == 3);

  if (!(from = reader->read(3))) {
    /* Mem-comparable image doesn't have enough bytes */
    return UNPACK_FAILURE;
  }

  field_ptr[0] = from[2];
  field_ptr[1] = from[1];
  field_ptr[2] = from[0];
  return UNPACK_SUCCESS;
}

/*
  Function of type rdb_index_field_unpack_t, used to
  Unpack the string by copying it over.
  This is for BINARY(n) where the value occupies the whole length.
*/

int Rdb_key_def::unpack_binary_str(
    Rdb_field_packing *const fpi, Field *const field, uchar *const to,
    Rdb_string_reader *const reader,
    Rdb_string_reader *const unp_reader MY_ATTRIBUTE((__unused__))) {
  const char *from;
  if (!(from = reader->read(fpi->m_max_image_len))) {
    /* Mem-comparable image doesn't have enough bytes */
    return UNPACK_FAILURE;
  }

  memcpy(to, from, fpi->m_max_image_len);
  return UNPACK_SUCCESS;
}

/*
  Function of type rdb_index_field_unpack_t.
  For UTF-8, we need to convert 2-byte wide-character entities back into
  UTF8 sequences.
*/

int Rdb_key_def::unpack_utf8_str(
    Rdb_field_packing *const fpi, Field *const field, uchar *dst,
    Rdb_string_reader *const reader,
    Rdb_string_reader *const unp_reader MY_ATTRIBUTE((__unused__))) {
  my_core::CHARSET_INFO *const cset = (my_core::CHARSET_INFO *)field->charset();
  const uchar *src;
  if (!(src = (const uchar *)reader->read(fpi->m_max_image_len))) {
    /* Mem-comparable image doesn't have enough bytes */
    return UNPACK_FAILURE;
  }

  const uchar *const src_end = src + fpi->m_max_image_len;
  uchar *const dst_end = dst + field->pack_length();

  while (src < src_end) {
    my_wc_t wc = (src[0] << 8) | src[1];
    src += 2;
    int res = cset->wc_mb(wc, dst, dst_end);
    DBUG_ASSERT(res > 0 && res <= 3);
    if (res < 0) return UNPACK_FAILURE;
    dst += res;
  }

  cset->fill(reinterpret_cast<char *>(dst), dst_end - dst,
             cset->pad_char);
  return UN


				policydsl.SignedBy(0),
				policydsl.SignedBy(1),
			),
			policydsl.NOutOf(1,
				[]*cb.SignaturePolicy{policydsl.SignedBy(1)},
			),
		),
		Identities: []*mb.MSPPrincipal{
			{
				PrincipalClassification: mb.MSPPrincipal_ROLE,
				Principal: protoutil.MarshalOrPanic(
					&mb.MSPRole{
						Role:          mb.MSPRole_MEMBER,
						MspIdentifier: "A",
					},
				),
			},
			{
				PrincipalClassification: mb.MSPPrincipal_ROLE,
				Principal: protoutil.MarshalOrPanic(
					&mb.MSPRole{
						Role:          mb.MSPRole_MEMBER,
						MspIdentifier: "B",
					},
				),
			},
		},
	}, spe)
}

func TestImplicitMetaPolicy_Convert2(t *testing.T) {

	// Scenario: we attempt the conversion of a metapolicy requiring
	// ALL of 2 sub-policies, where the first one is an OR of an AND
	// of 2 and an OR of 1 and the second one is an AND of 2, with
	// principal deduplication required

	pfs := &cauthdsl.EnvelopeBasedPolicyProvider{}

	p1, err := pfs.NewPolicy(&cb.SignaturePolicyEnvelope{
		Version: 0,
		Rule: policydsl.NOutOf(1,
			[]*cb.SignaturePolicy{
				policydsl.NOutOf(2,
					[]*cb.SignaturePolicy{
						policydsl.SignedBy(0),
						policydsl.SignedBy(1),
					},
				),
				policydsl.NOutOf(1,
					[]*cb.SignaturePolicy{
						policydsl.SignedBy(2),
					},
				),
			},
		),
		Identities: []*mb.MSPPrincipal{
			{
				PrincipalClassification: mb.MSPPrincipal_ROLE,
				Principal: protoutil.MarshalOrPanic(
					&mb.MSPRole{
						Role:          mb.MSPRole_MEMBER,
						MspIdentifier: "B",
					},
				),
			},
			{
				PrincipalClassification: mb.MSPPrincipal_ROLE,
				Principal: protoutil.MarshalOrPanic(
					&mb.MSPRole{
						Role:          mb.MSPRole_MEMBER,
						MspIdentifier: "C",
					},
				),
			},
			{
				PrincipalClassification: mb.MSPPrincipal_ROLE,
				Principal: protoutil.MarshalOrPanic(
					&mb.MSPRole{
						Role:          mb.MSPRole_MEMBER,
						MspIdentifier: "D",
					},
				),
			},
		},
	})
	assert.NotNil(t, p1)
	assert.NoError(t, err)

	p2, err := pfs.NewPolicy(&cb.SignaturePolicyEnvelope{
		Version: 0,
		Rule: policydsl.NOutOf(2,
			[]*cb.SignaturePolicy{
				policydsl.SignedBy(0),
				policydsl.SignedBy(1),
			},
		),
		Identities: []*mb.MSPPrincipal{
			{
				PrincipalClassification: mb.MSPPrincipal_ROLE,
				Principal: protoutil.MarshalOrPanic(
					&mb.MSPRole{
						Role:          mb.MSPRole_MEMBER,
						MspIdentifier: "A",
					},
				),
			},
			{
				PrincipalClassification: mb.MSPPrincipal_ROLE,
				Principal: protoutil.MarshalOrPanic(
					&mb.MSPRole{
						Role:          mb.MSPRole_MEMBER,
						MspIdentifier: "B",
					},


atrix operator*(rv1, matrix rv2)
	return { rv1 * rv2[1], rv1 * rv2[2], rv1 * rv2[3],
			 rv1 * rv2[4], rv1 * rv2[5], rv1 * rv2[6],
			 rv1 * rv2[7], rv1 * rv2[8], rv1 * rv2[9] }
end

e2function matrix operator*(matrix rv1, rv2)
	return { rv1[1] * rv2, rv1[2] * rv2, rv1[3] * rv2,
			 rv1[4] * rv2, rv1[5] * rv2, rv1[6] * rv2,
			 rv1[7] * rv2, rv1[8] * rv2, rv1[9] * rv2 }
end

e2function vector operator*(matrix rv1, vector rv2)
	return Vector( rv1[1] * rv2[1] + rv1[2] * rv2[2] + rv1[3] * rv2[3],
			 rv1[4] * rv2[1] + rv1[5] * rv2[2] + rv1[6] * rv2[3],
			 rv1[7] * rv2[1] + rv1[8] * rv2[2] + rv1[9] * rv2[3] )
end

e2function matrix operator*(matrix rv1, matrix rv2)
	return { rv1[1] * rv2[1] + rv1[2] * rv2[4] + rv1[3] * rv2[7],
			 rv1[1] * rv2[2] + rv1[2] * rv2[5] + rv1[3] * rv2[8],
			 rv1[1] * rv2[3] + rv1[2] * rv2[6] + rv1[3] * rv2[9],
			 rv1[4] * rv2[1] + rv1[5] * rv2[4] + rv1[6] * rv2[7],
			 rv1[4] * rv2[2] + rv1[5] * rv2[5] + rv1[6] * rv2[8],
			 rv1[4] * rv2[3] + rv1[5] * rv2[6] + rv1[6] * rv2[9],
			 rv1[7] * rv2[1] + rv1[8] * rv2[4] + rv1[9] * rv2[7],
			 rv1[7] * rv2[2] + rv1[8] * rv2[5] + rv1[9] * rv2[8],
			 rv1[7] * rv2[3] + rv1[8] * rv2[6] + rv1[9] * rv2[9] }
end

e2function matrix operator/(matrix rv1, rv2)
	return { rv1[1] / rv2, rv1[2] / rv2, rv1[3] / rv2,
			 rv1[4] / rv2, rv1[5] / rv2, rv1[6] / rv2,
			 rv1[7] / rv2, rv1[8] / rv2, rv1[9] / rv2 }
end

e2function matrix operator^(matrix rv1, rv2)

	if rv2 == -1 then return ( inverse3(rv1) )

	elseif rv2 == 0 then return { 1, 0, 0,
								  0, 1, 0,
								  0, 0, 1 }

	elseif rv2 == 1 then return rv1

	elseif rv2 == 2 then
		return { rv1[1] * rv1[1] + rv1[2] * rv1[4] + rv1[3] * rv1[7],
				 rv1[1] * rv1[2] + rv1[2] * rv1[5] + rv1[3] * rv1[8],
				 rv1[1] * rv1[3] + rv1[2] * rv1[6] + rv1[3] * rv1[9],
				 rv1[4] * rv1[1] + rv1[5] * rv1[4] + rv1[6] * rv1[7],
				 rv1[4] * rv1[2] + rv1[5] * rv1[5] + rv1[6] * rv1[8],
				 rv1[4] * rv1[3] + rv1[5]


/* Software floating-point emulation.
   Truncate IEEE double into IEEE single
   Copyright (C) 1997-2016 Free Software Foundation, Inc.
   This file is part of the GNU C Library.
   Contributed by Richard Henderson (rth@cygnus.com) and
		  Jakub Jelinek (jj@ultra.linux.cz).

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   In addition to the permissions in the GNU Lesser General Public
   License, the Free Software Foundation gives you unlimited
   permission to link the compiled version of this file into
   combinations with other programs, and to distribute those
   combinations without any restriction coming from the use of this
   file.  (The Lesser General Public License restrictions do apply in
   other respects; for example, they cover modification of the file,
   and distribution when not linked into a combine executable.)

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <http://www.gnu.org/licenses/>.  */

#include "soft-fp.h"
#include "single.h"
#include "double.h"

SFtype
__truncdfsf2 (DFtype a)
{
  FP_DECL_EX;
  FP_DECL_D (A);
  FP_DECL_S (R);
  SFtype r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_SEMIRAW_D (A, a);
#if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
  FP_TRUNC (S, D, 1, 2, R, A);
#else
  FP_TRUNC (S, D, 1, 1, R, A);
#endif
  FP_PACK_SEMIRAW_S (r, R);
  FP_HANDLE_EXCEPTIONS;

  return r;
}


bb1->succs->bb == bb1->next)
		{
			lasti->prev->next = lasti->next;
			lasti->next->prev = lasti->prev;
			bb1->ninst--;
			( (BBlock) (lasti->opds[0]))->ref--;
			return bb1;
		}
	}

	return bb2;
}

void ExamineJump(BBlock bb)
{
	IRInst lasti;
	CFGEdge succ;
	BBlock bb1, bb2;

	lasti = bb->insth.prev;
	/**
		 OPCODE(JZ, 	 "",					 Branch)
		 OPCODE(JNZ,	 "!",					 Branch)
		 OPCODE(JE, 	 "==",					 Branch)
		 OPCODE(JNE,	 "!=",					 Branch)
		 OPCODE(JG, 	 ">",					 Branch)
		 OPCODE(JL, 	 "<",					 Branch)
		 OPCODE(JGE,	 ">=",					 Branch)
		 OPCODE(JLE,	 "<=",					 Branch)
		 OPCODE(JMP,	 "jmp", 				 Jump)
	 */
	if (! (lasti->opcode >= JZ && lasti->opcode <= JMP))
		return;

	/**
	 * jump to jump             conditional jump to jump
	 *
	 * jmp bb1                  if a < b jmp bb1
	 * ...                      ...
	 * bb1: jmp bb2             bb1: jmp bb2
	 *
	 */

	succ = bb->succs;
	do
	{
		if (succ->bb == (BBlock)lasti->opds[0])
			break;
		succ = succ->next;
	} while (succ != NULL);

	bb1 = succ->bb;
	if (bb1->ninst == 1 && bb1->insth.prev->opcode == JMP)
	{
		bb2 = bb1->succs->bb;
		succ->bb = bb2;
		RemovePredecessor(bb1, bb);
		AddPredecessor(bb2, bb);
		bb1->ref--;
		bb2->ref++;
		lasti->opds[0] = (Symbol)bb2;
	}
}


 new CorsRule();
    entity.setBucketUuid(bucketUuid);
    entity.setRuleId(rule.getId());
    entity.setSequence(rule.getSequence());
    entity.setMaxAgeSeconds(rule.getMaxAgeSeconds());

    entity.setAllowedMethodsJSON(convertCorsListToJSON(rule.getAllowedMethods()));
    entity.setAllowedOriginsJSON(convertCorsListToJSON(rule.getAllowedOrigins()));
    entity.setAllowedHeadersJSON(convertCorsListToJSON(rule.getAllowedHeaders()));
    entity.setExposeHeadersJSON(convertCorsListToJSON(rule.getExposeHeaders()));

    return entity;
  }

  private String convertCorsListToJSON(List<String> corsArray) {
    JSONArray corsJSON = new JSONArray();
    corsJSON.addAll(corsArray);
    return corsJSON.toString();
  }

  private com.eucalyptus.storage.msgs.s3.CorsRule convertCorsRule(CorsRule entity) {

    com.eucalyptus.storage.msgs.s3.CorsRule ruleResponse = new com.eucalyptus.storage.msgs.s3.CorsRule();
    ruleResponse.setId(entity.getRuleId());
    ruleResponse.setSequence(entity.getSequence());
    ruleResponse.setMaxAgeSeconds(entity.getMaxAgeSeconds());

    ruleResponse.setAllowedMethods(convertCorsJSONToList(entity.getAllowedMethodsJSON()));
    ruleResponse.setAllowedOrigins(convertCorsJSONToList(entity.getAllowedOriginsJSON()));
    ruleResponse.setAllowedHeaders(convertCorsJSONToList(entity.getAllowedHeadersJSON()));
    ruleResponse.setExposeHeaders(convertCorsJSONToList(entity.getExposeHeadersJSON()));

    return ruleResponse;
  }

  private List<String> convertCorsJSONToList(String corsJSONString) {
    JSONArray corsJSON = JSONArray.fromObject(corsJSONString);
    List<String> corsList = new ArrayList<String>();
    corsList = (List<String>) corsJSON.toCollection(corsJSON, String.class);
    return corsList;
  }

}/*************************************************************************
 * Copyright 2009-2014 Ent. Services Development Corporation LP
 *
 * Redistribution and use of this software in source and binary forms,
 * with or without modification, are permitted provided that the
 * following conditions are met:
 *
 *   Redistributions of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 *
 *   Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer
 *   in the documentation and/or other materials provided with the
 *   distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 ************************************************************************/

package com.eucalyptus.objectstorage.asynctask;

import java.util.List;

import org.apache.log4j.Logger;

import com.eucalyptus.entities.TransactionException;
import com.eucalyptus.entities.Transactions;
import com.eucalyptus.objectstorage.MpuPartMetadataMan


fk regression issues ([#1178](https://github.com/ory/hydra/issues/1178)) ([11924bf](https://github.com/ory/hydra/commit/11924bf5f72fb830aed55dd57c879bb69e0013d7)), closes [#1177](https://github.com/ory/hydra/issues/1177)
* Resolve issues with secret migration ([#1129](https://github.com/ory/hydra/issues/1129)) ([c8104f4](https://github.com/ory/hydra/commit/c8104f4a43ec1578c2c4b7a4455ddf78a6ea1d8b)), closes [#1026](https://github.com/ory/hydra/issues/1026):

    This patch resolves an issue which made it impossible to rotate secrets because an un-hashed version was used.

* Resolve panic in migration handler ([#1151](https://github.com/ory/hydra/issues/1151)) ([94dae22](https://github.com/ory/hydra/commit/94dae2293c31ff6890b4739e3249e434a6e54a4d)), closes [#1137](https://github.com/ory/hydra/issues/1137)
* Resolve printf warnings ([#1039](https://github.com/ory/hydra/issues/1039)) ([145f89c](https://github.com/ory/hydra/commit/145f89c65099c1e1906d75cd4cdcc04cf638fec5))
* Resolve refresh flow issues with audience, scope ([#1156](https://github.com/ory/hydra/issues/1156)) ([ccc34de](https://github.com/ory/hydra/commit/ccc34dea62f83a180d9a99cf13db6b837ebf2f03)), closes [#1153](https://github.com/ory/hydra/issues/1153)
* Resolves [#1067](https://github.com/ory/hydra/issues/1067) by adding indices to: ([f6653d8](https://github.com/ory/hydra/commit/f6653d80ecbbdeafeb37fa22dedb2fca264623ba)):

    • `request_id` column in the hydra_oauth2_access & hydra_oauth2_refresh tables
    • `requested_at` column in the hydra_oauth2_access table

* Set fetch order to descending ([#1126](https://github.com/ory/hydra/issues/1126)) ([d291349](https://github.com/ory/hydra/commit/d2913495770dae502ed095fd04fe42348435f2bb))
* Update all consumers of client store to pass in a context ([093762a](https://github.com/ory/hydra/commit/093762a9068f8559fde04f03379cac0d76436715))
* Update consent manager method signatures to take in a context and update all consumers ([ceb9592](https://github.com/ory/hydra/commit/ceb959293f1f012b1133c0a490a1e8a3262bbbe0))
* Update fosite to 0.27.3 ([#1164](https://github.com/ory/hydra/issues/1164)) ([e0143b2](https://github.com/ory/hydra/commit/e0143b2edd033243f55155394a2c53613a1d5cf8))
* Update interface to take in context ([4a8a383](https://github.com/ory/hydra/commit/4a8a383dec7f3fea0fa3c685138b801342cdc528))
* Update manager to take in context and update all consumers ([404bdd7](https://github.com/ory/hydra/commit/404bdd711f695b168e36ab5fbea117627626681c))
* Update RS256JWTStrategy to


 cert the certificate.
 *
 * @return the asn1 TBSCertificate.
 */
pki.getTBSCertificate = function(cert) {
  // TBSCertificate
  var tbs = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
    // version
    asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [
      // integer
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
        asn1.integerToDer(cert.version).getBytes())
    ]),
    // serialNumber
    asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
      forge.util.hexToBytes(cert.serialNumber)),
    // signature
    asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
      // algorithm
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,
        asn1.oidToDer(cert.siginfo.algorithmOid).getBytes()),
      // parameters
      _signatureParametersToAsn1(
        cert.siginfo.algorithmOid, cert.siginfo.parameters)
    ]),
    // issuer
    _dnToAsn1(cert.issuer),
    // validity
    asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
      // notBefore
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.UTCTIME, false,
        asn1.dateToUtcTime(cert.validity.notBefore)),
      // notAfter
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.UTCTIME, false,
        asn1.dateToUtcTime(cert.validity.notAfter))
    ]),
    // subject
    _dnToAsn1(cert.subject),
    // SubjectPublicKeyInfo
    pki.publicKeyToAsn1(cert.publicKey)
  ]);

  if(cert.issuer.uniqueId) {
    // issuerUniqueID (optional)
    tbs.value.push(
      asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, [
        asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false,
          String.fromCharCode(0x00) +
          cert.issuer.uniqueId
        )
      ])
    );
  }
  if(cert.subject.uniqueId) {
    // subjectUniqueID (optional)
    tbs.value.push(
      asn1.create(asn1.Class.CONTEXT_SPECIFIC, 2, true, [
        asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false,
          String.fromCharCode(0x00) +
          cert.subject.uniqueId
        )
      ])
    );
  }

  if(cert.extensions.length > 0) {
    // extensions (optional)
    tbs.value.push(pki.certificateExtensionsToAsn1(cert.extensions));
  }

  return tbs;
};

/**
 * Gets the ASN.1 CertificationRequestInfo part of a
 * PKCS#10 CertificationRequest.
 *
 * @param csr the certification request.
 *
 * @return the asn1 CertificationRequestInfo.
 */
pki.getCertificationRequestInfo = function(csr) {
  // CertificationRequestInfo
  var cri = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
    // version
    asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
      asn1.integerToDer(csr.version).getBytes()),
    // subject
    _dnToAsn1(csr.subject),
    /


 this.math.$sqrt('3', Rounding.Down)).to.be.bignumber.equal('1');
      expect(await this.math.$sqrt('4', Rounding.Down)).to.be.bignumber.equal('2');
      expect(await this.math.$sqrt('144', Rounding.Down)).to.be.bignumber.equal('12');
      expect(await this.math.$sqrt('999999', Rounding.Down)).to.be.bignumber.equal('999');
      expect(await this.math.$sqrt('1000000', Rounding.Down)).to.be.bignumber.equal('1000');
      expect(await this.math.$sqrt('1000001', Rounding.Down)).to.be.bignumber.equal('1000');
      expect(await this.math.$sqrt('1002000', Rounding.Down)).to.be.bignumber.equal('1000');
      expect(await this.math.$sqrt('1002001', Rounding.Down)).to.be.bignumber.equal('1001');
      expect(await this.math.$sqrt(MAX_UINT256, Rounding.Down)).to.be.bignumber.equal(
        '340282366920938463463374607431768211455',
      );
    });

    it('rounds up', async function () {
      expect(await this.math.$sqrt('0', Rounding.Up)).to.be.bignumber.equal('0');
      expect(await this.math.$sqrt('1', Rounding.Up)).to.be.bignumber.equal('1');
      expect(await this.math.$sqrt('2', Rounding.Up)).to.be.bignumber.equal('2');
      expect(await this.math.$sqrt('3', Rounding.Up)).to.be.bignumber.equal('2');
      expect(await this.math.$sqrt('4', Rounding.Up)).to.be.bignumber.equal('2');
      expect(await this.math.$sqrt('144', Rounding.Up)).to.be.bignumber.equal('12');
      expect(await this.math.$sqrt('999999', Rounding.Up)).to.be.bignumber.equal('1000');
      expect(await this.math.$sqrt('1000000', Rounding.Up)).to.be.bignumber.equal('1000');
      expect(await this.math.$sqrt('1000001', Rounding.Up)).to.be.bignumber.equal('1001');
      expect(await this.math.$sqrt('1002000', Rounding.Up)).to.be.bignumber.equal('1001');
      expect(await this.math.$sqrt('1002001', Rounding.Up)).to.be.bignumber.equal('1001');
      expect(await this.math.$sqrt(MAX_UINT256, Rounding.Up)).to.be.bignumber.equal(
        '340282366920938463463374607431768211456',
      );
    });
  });

  describe('log', function () {
    describe('log2', function () {
      it('rounds down', async function () {
        // For some reason calling .$log2() directly fails
        expect(await this.math.methods['$log2(uint256,uint8)']('0', Rounding.Down)).to.be.bignumber.equal('0');
        expect(await this.math.methods['$log2(uint256,uint8)']('1', Rounding.Down)).to.be.bignumber.equal('0');
        expect(await this.math.methods['$log2(uint256,uint8)']('2', Rounding.Down)).to.be.bignumber.equal('1');
        expect(await this.math.methods['$log2(uint256,uint8)']('3', Rounding.Down)).to.be.bignumber.equal('1');
        expect(await this.math.methods['$log2(uint256,uint8)']('4', Rounding.Down)).to.be.bignumber.equal('2');


h, VisualElement parent);
        void VisitAtPath(InspectorVisitor visitor, PropertyPath path, VisualElement parent);
        void SetAtPath<TValue>(TValue value, PropertyPath path);
        bool TrySetAtPath<TValue>(TValue value, PropertyPath path);
        TValue GetAtPath<TValue>(PropertyPath path);
        bool TryGetAtPath<TValueType>(PropertyPath path, out TValueType value);
        bool TryGetProperty(PropertyPath path, out IProperty property);
        void GenerateHierarchy();
        void Release();
    }

    interface IBindingTarget<out TTarget> : IBindingTarget
    {
        TTarget Target { get; }
    }
}


 42697
IERlbGF5 42698
IGZhY2lsaXRhdGVz 42699
IENFUw== 42700
IGpld2Vscw== 42701
IGJvb2tsZXQ= 42702
b25kaW5n 42703
IHBvbGFyaXphdGlvbg== 42704
IE1vcmFu 42705
IFNhbGFk 42706
IFNPUw== 42707
IEFkdmljZQ== 42708
UEhPVE9T 42709
SUNBTg== 42710
aWF0dXJlcw== 42711
ZXhwcmVzcw== 42712
IFdvbmRlcmxhbmQ= 42713
IENPREU= 42714
IENMQVNT 42715
OTc1 42716
IGdyZXA= 42717
IERpZXNlbA== 42718
IEdsYWM= 42719
IT8i 42720
IHJt 42721
b2luZQ== 42722
ZGlzY3JpbWluYXRpb24= 42723
IE51cnNl 42724
bWFsbG93 42725
IHZvcnRleA== 42726
IENvbnNvcnRpdW0= 42727
IGxhcmdlRG93bmxvYWQ= 42728
c3RyYWlnaHQ= 42729
YXVnaGxpbg== 42730
R3JhZA== 42731
IHB1YmxpY2l6ZWQ= 42732
IFdhdmVz 42733
IFJlZGQ= 42734
IGZlc3Rpdml0aWVz 42735
IE1hbmU= 42736
YXJvdg== 42737
IGZsZWV0aW5n 42738
IERydW5r 42739
dWdlbg== 42740
Q2VsZQ== 42741
IGNocm9tb3NvbWVz 42742
IERPVA== 42743
LSstKy0rLSs= 42744
IGJ1c2llc3Q= 42745
IEJlYXZlcg== 42746
U3lyaWFu 42747
IEt5cg== 42748
a2Fz 42749
IENyb3NzUmVm 42750
MTk1MA== 42751
NzYwMQ== 42752
IHJlcGVhbGluZw== 42753
IFdpbm5lcnM= 42754
IE1hY3Jv 42755
IERPRA== 42756
YmxhbmNl 42757
U29ydA== 42758
NjQx 42759
IG1ldHJl 42760
IERpcms= 42761
IGdvZ2dsZXM= 42762
IGRyYXdiYWNrcw== 42763
IGNvbXBsYWluYW50 42764
IGF1dGhvcml6aW5n 42765
IGFudGl0cnVzdA== 42766
b3BlcmF0ZWQ= 42767
IG1haA== 42768
IGV4YWdnZXJhdGlvbg== 42769
QW1hemluZw== 42770
IFNlcmFwaA== 42771
IGhhemU= 42772
d293 42773
IGV4dGluZ3Vpc2hlZA== 42774
IGNhbnlvbg== 42775
IEJvc2g= 42776
IHZlbnRz 42777
IHNjcmFwZQ== 42778
Q29ycmVjdA== 42779
NDI2 42780
IGF2Zw== 42781
RGVtYW5k 42782
IOKIvA== 42783
IG1pY3JvYmlvdGE= 42784
In1dLCI= 42785
IFN0ZXY= 42786
Qmlv 42787
IFBsYW5lcw== 42788
IHN1Z2dlc3RpdmU= 42789
IGRlY2lwaGVy 42790
IFJlZnVnZWU= 42791
IEtlanJpd2Fs 42792
IEdyZWVucGVhY2U= 42793
IGRlY2xhc3M= 42794


procedure_map.iter() {
                procedures.push(procedure.into())
            }
            procedures
        }

        /// The proxy function forwards the transaction to the procedure to
        /// which the sender belongs.
        fn proxy(&mut self, payload: Vec<u8>) {
            let sender = pwasm_ethereum::origin();
            let group_id = self.get_account_group(sender).as_u32() as u8;
            let procecedure_map: cap9_std::StorageEnumerableMap<u8,cap9_std::SysCallProcedureKey>
                = cap9_std::StorageEnumerableMap::from(1).unwrap();
            let procedure_key = procecedure_map.get(group_id).unwrap();
            // Here the cap is hard coded. This procedure expects its first
            // procedure call capability to give it all the necessary
            // permissions.
            cap9_std::call(0_u8, procedure_key, payload).unwrap();
            pwasm_ethereum::ret(&cap9_std::result());
        }

    }
}
// Declares the dispatch and dispatch_ctor methods
use pwasm_abi::eth::EndpointInterface;

#[no_mangle]
pub fn call() {
    let mut endpoint = ACL::ACLEntryEndpoint::new(ACL::ACLContract {});
    // Read http://solidity.readthedocs.io/en/develop/abi-spec.html#formal-specification-of-the-encoding for details
    pwasm_ethereum::ret(&endpoint.dispatch(&pwasm_ethereum::input()));
}

#[no_mangle]
pub fn deploy() {
    let mut endpoint = ACL::ACLEntryEndpoint::new(ACL::ACLContract {});
    endpoint.dispatch_ctor(&pwasm_ethereum::input());
}
<filename>src/share/mod.rs
//! Define the traits used to distinguish the various
//! kind of shares internally used by the library.
//! These traits are currently not exposed, but this might
//! change in the future.

use errors::*;

pub(crate) mod validation;

/// All types of share should implement this trait.
pub(crate) trait IsShare: Sized {
    /// Returns the identifier of the share.
    /// Varies between 1 and n where n is the total number of generated shares.
    fn get_id(&self) -> u8;

    /// Returns the share data itself
    fn get_data(&self) -> &[u8];

    /// Returns the number of shares necessary to recover the secret, aka the threshold
    fn get_threshold(&self) -> u8;

    /// Returns the total number of shares that have been dealt
    fn get_shares_count(&self) -> Option<u8>;
}

/// This trait must be implemented by shares' types wich can be signed.
pub(crate) trait IsSignedShare: IsShare {
    /// The type of shares' sigature.
    type Signature;

    /// Returns whether this share is signed or not.
    fn is_signed(&self) -> bool;

    /// Return the signature itself.
    fn get_signature(&self) -> &Self::Signature;

    /// Verify the signatures of the given batch of shares.
    /// Returns `Ok(())` if validation succeeds, and an `Err` otherwise.
    fn verify_signatures(shares: &[Self]) -> Result<()>;
}
use std::error::Error;
use std::fmt;
use std::io::{self, Read, Seek};
use std::mem::MaybeUninit;

use libc::{c_int, c_long, c_void};
use ogg_sys::ogg_int64_t;

const EIO: errno::Errno = errno::Errno(5);

/// https://xiph.org/vorbis/doc/vorbisfile/reference.html
pub struct File<R>
where
    R: Read + Seek,
{
    // https://xiph.org/vorbis/doc/vorbisfile/OggVorbis_File.html
    ov_struct: vorbisfile_sys::OggVorbis_File,
    #[allow(dead_code)]
    reader: Box<R>, // A Box is used to


�种动物？                                                                                |
| 自然语言生成（对话）              | 和机器人聊天，谈一下你今天发生的事情。                                                                                |
| 聚类                                  | 把这些不同颜色的石头按照颜色分组。                                                                                || 标题                     | 问题                                                         |
| ------------------------| -------------------------------------------------------------|
| 开放生成                | 给我写一个关于夏季旅游的短篇小说。                             |
| 数据分类                | 将电影数据集按类型分成不同的文件。                             |
| 数据处理与清洗         | 如何将含有缺失值的数据集进行处理和清洗？                      |
| 文本编辑                | 编辑以下句子，使其更加简明易懂：“在目前的时间点上，我们还没有得到足够的信息来做出决定。”  |
| 图像处理                | 如何使用Python将一张彩色图片转换为黑白图片？                   |
| 模型训练                | 如何使用TensorFlow训练一个图像分类器？                         |
| 自然语言处理            | 如何使用spaCy库对英文文本进行词性标注和命名实体识别？           |
| 时间序列预测            | 如何使用ARIMA模型对未来一年的股票价格走势进行预测？             |
| 声音信号处理            | 如何使


3617%;
}

.row-fluid .offset3:first-child {
  margin-left: 25.53191489361702%;
  *margin-left: 25.425531914893618%;
}

.row-fluid .offset2 {
  margin-left: 19.148936170212764%;
  *margin-left: 19.04255319148936%;
}

.row-fluid .offset2:first-child {
  margin-left: 17.02127659574468%;
  *margin-left: 16.914893617021278%;
}

.row-fluid .offset1 {
  margin-left: 10.638297872340425%;
  *margin-left: 10.53191489361702%;
}

.row-fluid .offset1:first-child {
  margin-left: 8.51063829787234%;
  *margin-left: 8.404255319148938%;
}

[class*="span"].hide,
.row-fluid [class*="span"].hide {
  display: none;
}

[class*="span"].pull-right,
.row-fluid [class*="span"].pull-right {
  float: right;
}

.container {
  margin-right: auto;
  margin-left: auto;
  *zoom: 1;
}

.container:before,
.container:after {
  display: table;
  line-height: 0;
  content: "";
}

.container:after {
  clear: both;
}

.container-fluid {
  padding-right: 20px;
  padding-left: 20px;
  *zoom: 1;
}

.container-fluid:before,
.container-fluid:after {
  display: table;
  line-height: 0;
  content: "";
}

.container-fluid:after {
  clear: both;
}

p {
  margin: 0 0 10px;
}

.lead {
  margin-bottom: 20px;
  font-size: 21px;
  font-weight: 200;
  line-height: 30px;
}

small {
  font-size: 85%;
}

strong {
  font-weight: bold;
}

em {
  font-style: italic;
}

cite {
  font-style: normal;
}

.muted {
  color: #999999;
}

.text-warning {
  color: #c09853;
}

a.text-warning:hover {
  color: #a47e3c;
}

.text-error {
  color: #b94a48;
}

a.text-error:hover {
  color: #953b39;
}

.text-info {
  color: #3a87ad;
}

a.text-info:hover {
  color: #2d6987;
}

.text-success {
  color: #468847;
}

a.text-success:hover {
  color: #356635;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 10px 0;
  font-family: inherit;
  font-weight: bold;
  line-height: 20px;
  color: inherit;
  text-rendering: optimizelegibility;
}

h1 small,
h2 small,
h3 small,
h4 small,
h5 small,
h6 small {
  font-weight: normal;
  line-height: 1;
  color: #999999;
}

h1,
h2,
h3 {
  line-height: 40px;
}

h1 {
  font-size: 38.5px;
}

h2 {
  font-size: 31.5px;
}

h3 {
  font-size: 24.5px;
}

h4 {
  font-size: 17.5px;
}

h5 {
  font-size: 14px;
}

h6 {
  font-size: 11.9px;
}

h1 small {
  font-size: 24.5px;
}

h2 small {
  fo


json/) / https://lists.apache.org/thread.html/rc998b18880df98bafaade071346690c2bc1444adaa1a1ea464b93f0a%40%3Ccvs.httpd.apache.org%3E ([httpd-cvs] 20210330 svn commit: r1073140 [4/4] - in /websites/staging/httpd/trunk/content: ./ security/cvejsontohtml.py security/vulnerabilities_13.html security/vulnerabilities_20.html security/vulnerabilities_22.html security/vulnerabilities_24.html) / https://lists.apache.org/thread.html/rdf3e5d0a5f5c3d90d6013bccc6c4d5af59cf1f8c8dea5d9a283d13ce%40%3Ccvs.httpd.apache.org%3E ([httpd-cvs] 20210330 svn commit: r1073139 [13/13] - in /websites/staging/httpd/trunk/content: ./ security/json/) / https://lists.apache.org/thread.html/r9f93cf6dde308d42a9c807784e8102600d0397f5f834890708bf6920%40%3Ccvs.httpd.apache.org%3E ([httpd-cvs] 20210330 svn commit: r1073149 [1/13] - in /websites/staging/httpd/trunk/content: ./ security/ security/json/) / https://lists.apache.org/thread.html/r3c5c3104813c1c5508b55564b66546933079250a46ce50eee90b2e36%40%3Ccvs.httpd.apache.org%3E ([httpd-cvs] 20210330 svn commit: r1073149 [13/13] - in /websites/staging/httpd/trunk/content: ./ security/ security/json/) / https://lists.apache.org/thread.html/r731d43caece41d78d8c6304641a02a369fd78300e7ffaf566b06bc59%40%3Ccvs.httpd.apache.org%3E ([httpd-cvs] 20210330 svn commit: r1073158 - in /websites/staging/httpd/trunk/content: ./ security/json/CVE-2020-1927.json security/vulnerabilities_24.html) / https://lists.apache.org/thread.html/r6a4146bf3d1645af2880f8b7a4fd8afd696d5fd4a3ae272f49f5dc84%40%3Ccvs.httpd.apache.org%3E ([httpd-cvs] 20210330 svn commit: r1888215 - /httpd/site/trunk/content/security/json/CVE-2020-1927.json) / https://lists.apache.org/thread.html/r76142b8c5119df2178be7c2dba88fde552eedeec37ea993dfce68d1d%40%3Ccvs.httpd.apache.org%3E ([httpd-cvs] 20210606 svn commit: r1075470 [4/4] - in /websites/staging/httpd/trunk/content: ./ security/json/CVE-2020-13938.json security/vulnerabilities_13.html security/vulnerabilities_20.html security/vulnerabilities_22.html security/vulnerabilities_24.html) / https://www.oracle.com/security-alerts/cpuApr2021.html / https://lists.debian.org/debian-lts-announce/2021/07/msg00006.html ([debian-lts-announce] 20210709 [SECURITY] [DLA 2706-1] apache2 security update) / https://www.oracle.com/security-alerts/cpujul2022.html |


2E2ED8  EC 22 08 BA */	fmadds f1, f2, f2, f1
/* 802E5F9C 002E2EDC  FC 01 00 40 */	fcmpo cr0, f1, f0
/* 802E5FA0 002E2EE0  40 80 00 2C */	bge .L_802E5FCC
/* 802E5FA4 002E2EE4  C0 02 EB 38 */	lfs f0, lbl_8051CE98@sda21(r2)
/* 802E5FA8 002E2EE8  FC 40 E2 10 */	fabs f2, f28
/* 802E5FAC 002E2EEC  C0 22 EB 34 */	lfs f1, lbl_8051CE94@sda21(r2)
/* 802E5FB0 002E2EF0  EC 00 07 B2 */	fmuls f0, f0, f30
/* 802E5FB4 002E2EF4  FC 40 10 18 */	frsp f2, f2
/* 802E5FB8 002E2EF8  EC 01 00 32 */	fmuls f0, f1, f0
/* 802E5FBC 002E2EFC  FC 02 00 40 */	fcmpo cr0, f2, f0
/* 802E5FC0 002E2F00  4C 40 13 82 */	cror 2, 0, 2
/* 802E5FC4 002E2F04  40 82 00 08 */	bne .L_802E5FCC
/* 802E5FC8 002E2F08  3B E0 00 01 */	li r31, 1
.L_802E5FCC:
/* 802E5FCC 002E2F0C  57 E0 06 3F */	clrlwi. r0, r31, 0x18
/* 802E5FD0 002E2F10  41 82 00 28 */	beq .L_802E5FF8
/* 802E5FD4 002E2F14  7F 83 E3 78 */	mr r3, r28
/* 802E5FD8 002E2F18  7F C4 F3 78 */	mr r4, r30
/* 802E5FDC 002E2F1C  81 9C 00 00 */	lwz r12, 0(r28)
/* 802E5FE0 002E2F20  38 A0 00 03 */	li r5, 3
/* 802E5FE4 002E2F24  38 C0 00 00 */	li r6, 0
/* 802E5FE8 002E2F28  81 8C 00 1C */	lwz r12, 0x1c(r12)
/* 802E5FEC 002E2F2C  7D 89 03 A6 */	mtctr r12
/* 802E5FF0 002E2F30  4E 80 04 21 */	bctrl
/* 802E5FF4 002E2F34  48 00 00 EC */	b .L_802E60E0
.L_802E5FF8:
/* 802E5FF8 002E2F38  7F 83 E3 78 */	mr r3, r28
/* 802E5FFC 002E2F3C  7F C4 F3 78 */	mr r4, r30
/* 802E6000 002E2F40  81 9C 00 00 */	lwz r12, 0(r28)
/* 802E6004 002E2F44  38 A0 00 05 */	li r5, 5
/* 802E6008 002E2F48  38 C0 00 00 */	li r6, 0
/* 802E600C 002E2F4C  81 8C 00 1C */	lwz r12, 0x1c(r12)
/* 802E6010 002E2F50  7D 89 03 A6 */	mtctr r12
/* 802E6014 002E2F54  4E 80 04 21 */	bctrl
/* 802E6018 002E2F58  48 00 00 C8 */


atformat:2 }}{% else %}-{% endif %}
          {% if row.sum_loanprocessingfee_amount %}{{ row.sum_loanprocessingfee_amount|floatformat:2 }}
          {% else %}-{% endif %}
          {% if row.sum_savingsdeposit_thrift_amount %}{{ row.sum_savingsdeposit_thrift_amount|floatformat:2 }}
          {% else %}-{% endif %}
          {% if row.sum_fixeddeposit_amount %}{{ row.sum_fixeddeposit_amount|floatformat:2}}{% else %}-{% endif %}
          {% if row.sum_recurringdeposit_amount %}{{ row.sum_recurringdeposit_amount|floatformat:2}}{% else %}-{% endif %}

          {% if row.sum_loanprinciple_amount %}{{ row.sum_loanprinciple_amount|floatformat:2}}{% else %}-{% endif %}
          {% if row.sum_loaninterest_amount %}{{ row.sum_loaninterest_amount|floatformat:2 }}{% else %}-{% endif %}
          {% if row.sum_insurance_amount %}{{ row.sum_insurance_amount|floatformat:2 }}{% else %}-{% endif %}
          {% if row.total_sum %}{{ row.total_sum|floatformat:2 }}{% else %}-{% endif %}

        {% endfor %}

{% extends 'frontend/base.html' %}
{% load recurse %}
{% load loans_tags %}
{% block menu %}
{% get_menus as menu_list %}

	{% recurse menu.active_children with menu_list as menu %}
	{% loop %}

{{menu.title}}

	  {% child %}

	{% endloop %}

	{% endrecurse %}

{% endblock %}
{% block meta-description %}
  <meta property="og:title"  content="{{ page.title|capfirst }}"/>

  <meta property="og:description" content="{{ page.meta_description }} - MicroFinance." />

  <meta name="description" content="{{ page.meta_description }} - MicroFinance." />

  <meta name="keywords" content="{{ page.keywords }}" />

{% endblock %}
{% block stage %}

     {{ page.content | safe }}

{% endblock %}
{% load compress %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>MicroFinance</title>
    {% block meta-description %}
    {% endblock %}
    <link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family


IAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] ZERO WIDTH JOINER (ZWJ_O_ZWJ_CM) ÷ [0.3]
× AC00 ÷ 00A7 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) ÷ [999.0] SECTION SIGN (AI_AL) ÷ [0.3]
× AC00 × 0020 ÷ 00A7 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [7.01] SPACE (SP) ÷ [18.0] SECTION SIGN (AI_AL) ÷ [0.3]
× AC00 × 0308 ÷ 00A7 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [9.0] COMBINING DIAERESIS (CM1_CM) ÷ [999.0] SECTION SIGN (AI_AL) ÷ [0.3]
× AC00 × 0308 × 0020 ÷ 00A7 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] SECTION SIGN (AI_AL) ÷ [0.3]
× AC00 ÷ 50005 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) ÷ [999.0] <reserved-50005> (XX_AL) ÷ [0.3]
× AC00 × 0020 ÷ 50005 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [7.01] SPACE (SP) ÷ [18.0] <reserved-50005> (XX_AL) ÷ [0.3]
× AC00 × 0308 ÷ 50005 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [9.0] COMBINING DIAERESIS (CM1_CM) ÷ [999.0] <reserved-50005> (XX_AL) ÷ [0.3]
× AC00 × 0308 × 0020 ÷ 50005 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] <reserved-50005> (XX_AL) ÷ [0.3]
× AC00 ÷ 0E01 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) ÷ [999.0] THAI CHARACTER KO KAI (SA_AL) ÷ [0.3]
× AC00 × 0020 ÷ 0E01 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [7.01] SPACE (SP) ÷ [18.0] THAI CHARACTER KO KAI (SA_AL) ÷ [0.3]
× AC00 × 0308 ÷ 0E01 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [9.0] COMBINING DIAERESIS (CM1_CM) ÷ [999.0] THAI CHARACTER KO KAI (SA_AL) ÷ [0.3]
× AC00 × 0308 × 0020 ÷ 0E01 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] THAI CHARACTER KO KAI (SA_AL) ÷ [0.3]
× AC00 × 3041 ÷	#  × [0.3] HANGUL SYLLABLE GA (H2) × [21.03] HIRAGANA LETTER SMALL A (CJ_NS) ÷ [0.3]
× AC00 ×


EBGameControl:setGameState(g_EightBallData.gameState.none)
    EightBallGameManager:syncHitResult(m_MainLayer, true)
    m_MainLayer.whiteBall:setPosition(cc.p(GetPreciseDecimal(event.Balls[1].fPositionX), GetPreciseDecimal(event.Balls[1].fPositionY)))
    m_MainLayer.whiteBall:setRotationOwn(event.WhiteBallRotation)
    BilliardsAniMgr:setDeskTempAni(m_MainLayer, false)
    if m_MainLayer.whiteBall:getIsInHole() then
        EBGameControl:dealWhiteBallInHole()
    end
    m_MainLayer.cue:setRotationOwn(0,m_MainLayer)
    EightBallGameManager:setCanRefreshBallAni(true)  --设置可以刷新球3D特效

    --定时器条
    local progressTimer1 = player:getPlayerUserID() == event.CurrentUserID and m_MainLayer.profressTimer1 or m_MainLayer.profressTimer2
    local progressTimer2 = player:getPlayerUserID() == event.CurrentUserID and m_MainLayer.profressTimer2 or m_MainLayer.profressTimer1
    local timerCallBack = function()
        BilliardsAniMgr:setGameTips(m_MainLayer,-2)
    end
    BilliardsAniMgr:setHeadTimerAni(progressTimer1,event.LeftTime,timerCallBack)
    BilliardsAniMgr:setHeadTimerAni(progressTimer2,0,nil)

    BilliardsAniMgr:createUserFrameAni(m_MainLayer)
end

--球落袋了
function EBGameControl:ballInHole(nTag, nNode)
    print(nTag .. " num ball is in hole",m_MainLayer.desk:getChildByTag(0):getBallState())
    EightBallGameManager:dealInHoleToServer(nTag)
    local ball = m_MainLayer.desk:getChildByTag(nTag)
    if ball and nNode then
        ball:setBallState(g_EightBallData.ballState.inHole,m_MainLayer)
        -- 球进洞(设置一下ballState)
        local ballPosX, ballPosY = ball:getPosition()
        local nodePosX, nodePosY = nNode:getPosition()
        ball:getPhysicsBody():resetForces()
        ball:getPhysicsBody():setVelocity(cc.p(0, 0))
        ball:getPhysicsBody():setAngularVelocity(0)
        local sprite3d = ball:getChildByTag(g_EightBallData.g_Border_Tag.texture3D)
        -- if sprite3d and sprite3d:getPhysicsObj() then
        --     sprite3d:getPhysicsObj():setAngularVelocity(cc.vec3(0.0, 0.0, 0.0))
        -- end
        -- 取消碰撞
        ball:getPhysicsBody():setCategoryBitmask(0x04)
        ball:getPhysicsBody():setContactTestBitmask(0x04)
        ball:getPhysicsBody():setCollisionBitmask(0x04)

        ball:runAction(cc.Spawn:create(cc.MoveTo:create(0.5, cc.p(nodePosX, nodePosY)), cc.ScaleTo:create(0.5, 0.8), cc.CallFunc:create( function()
            if sprite3d and sprite3d:getPhysicsObj() then
                sprite3d:getPhysicsObj():setAngularVelocity(cc.vec3((ballPosY - nodePosY )/5,(nodePosX - ballPosX)/5 , 0.0))
            end
        end )))

        ball:runAction(cc.Sequence:create(cc.DelayTime:create(0.5), cc.CallFunc:create( function()
            if ball and not tolua.isnull(ball) then
                ball:resetBallState()
                ball:setPosition(cc.p(1500, 1500))
                --ball:setBallState(g_EightBallData.ballState.inHole)


state.debouncedUpdateLayout()},D=ke=>C.value.includes(ke),P=()=>{b.value=!1,C.value.length&&(C.value=[],t.emit("selection-change",[]))},K=()=>{let ke;if(o.value){ke=[];const ce=fl(C.value,o.value),G=fl(r.value,o.value);for(const ne in ce)yt(ce,ne)&&!G[ne]&&ke.push(ce[ne].row)}else ke=C.value.filter(ce=>!r.value.includes(ce));if(ke.length){const ce=C.value.filter(G=>!ke.includes(G));C.value=ce,t.emit("selection-change",ce.slice())}},ee=()=>(C.value||[]).slice(),z=(ke,ce=void 0,G=!0)=>{if(va(C.value,ke,ce)){const Ce=(C.value||[]).slice();G&&t.emit("select",Ce,ke),t.emit("selection-change",Ce)}},te=()=>{var ke,ce;const G=_.value?!b.value:!(b.value||C.value.length);b.value=G;let ne=!1,Ce=0;const Ie=(ce=(ke=t==null?void 0:t.store)==null?void 0:ke.states)==null?void 0:ce.rowKey.value;r.value.forEach((rt,ye)=>{const Le=ye+Ce;N.value?N.value.call(null,rt,Le)&&va(C.value,rt,G)&&(ne=!0):va(C.value,rt,G)&&(ne=!0),Ce+=ie(pn(rt,Ie))}),ne&&t.emit("selection-change",C.value?C.value.slice():[]),t.emit("select-all",C.value)},de=()=>{const ke=fl(C.value,o.value);r.value.forEach(ce=>{const G=pn(ce,o.value),ne=ke[G];ne&&(C.value[ne.index]=ce)})},we=()=>{var ke,ce,G;if(((ke=r.value)==null?void 0:ke.length)===0){b.value=!1;return}let ne;o.value&&(ne=fl(C.value,o.value));const Ce=function(Le){return ne?!!ne[pn(Le,o.value)]:C.value.includes(Le)};let Ie=!0,rt=0,ye=0;for(let Le=0,ot=(r.value||[]).length;Le<ot;Le++){const pt=(G=(ce=t==null?void 0:t.store)==null?void 0:ce.states)==null?void 0:G.rowKey.value,gt=Le+ye,$t=r.value[Le],nn=N.value&&N.value.call(null,$t,gt);if(Ce($t))rt++;else if(!N.value||nn){Ie=!1;break}ye+=ie(pn($t,pt))}rt===0&&(Ie=!1),b.value=Ie},ie=ke=>{var ce;if(!t||!t.store)return 0;const{treeData:G}=t.store.states;let ne=0;const Ce=(ce=G.value[ke])==null?void 0:ce.children;return Ce&&(ne+=Ce.length,Ce.forEach(Ie=>{ne+=ie(Ie)})),ne},X=(ke,ce)=>{Array.isArray(ke)||(ke=[ke]);const G={};return ke.forEach(ne=>{O.value[ne.id]=ce,G[ne.columnKey||ne.id]=ce}),G},q=(ke,ce,G)=>{R.value&&R.value!==ke&&(R.value.order=null),R.value=ke,L.value=ce,x.value=G},J=()=>{let ke=i(l);Object.keys(O.value).forEach(ce=>{const


ionRequired, R.attr.singleSelection};

    /* renamed from: OooOO0o  reason: collision with root package name */
    public static final int[] f1797OooOO0o = {16843277, R.attr.backgroundTint, R.attr.dayInvalidStyle, R.attr.daySelectedStyle, R.attr.dayStyle, R.attr.dayTodayStyle, R.attr.nestedScrollable, R.attr.rangeFillColor, R.attr.yearSelectedStyle, R.attr.yearStyle, R.attr.yearTodayStyle};
    public static final int[] OooOOO0 = {16843191, 16843192, 16843193, 16843194, R.attr.itemFillColor, R.attr.itemShapeAppearance, R.attr.itemShapeAppearanceOverlay, R.attr.itemStrokeColor, R.attr.itemStrokeWidth, R.attr.itemTextColor};

    /* renamed from: OooOOO  reason: collision with root package name */
    public static final int[] f1798OooOOO = {16843015, R.attr.buttonCompat, R.attr.buttonIcon, R.attr.buttonIconTint, R.attr.buttonIconTintMode, R.attr.buttonTint, R.attr.centerIfNoTextEnabled, R.attr.checkedState, R.attr.errorAccessibilityLabel, R.attr.errorShown, R.attr.useMaterialThemeColors};

    /* renamed from: OooOOOO  reason: collision with root package name */
    public static final int[] f1799OooOOOO = {R.attr.buttonTint, R.attr.useMaterialThemeColors};

    /* renamed from: OooOOOo  reason: collision with root package name */
    public static final int[] f1800OooOOOo = {R.attr.shapeAppearance, R.attr.shapeAppearanceOverlay};

    /* renamed from: OooOOo0  reason: collision with root package name */
    public static final int[] f1802OooOOo0 = {16843958, 16844159, R.attr.lineHeight};

    /* renamed from: OooOOo  reason: collision with root package name */
    public static final int[] f1801OooOOo = {16842804, 16844159, R.attr.lineHeight};

    /* renamed from: OooOOoo  reason: collision with root package name */
    public static final int[] f1803OooOOoo = {R.attr.logoAdjustViewBounds, R.attr.logoScaleType, R.attr.navigationIconTint, R.attr.subtitleCentered, R.attr.titleCentered};

    /* renamed from: OooOo00  reason: collision with root package name */
    public static final int[] f1806OooOo00 = {R.attr.materialCircleRadius};

    /* renamed from: OooOo0  reason: collision with root package name */
    public static final int[] f1805OooOo0 = {R.attr.behavior_overlapTop};

    /* renamed from: OooOo0O  reason: collision with root package name */
    public static final int[] f1807OooOo0O = {R.attr.cornerFamily, R.attr.cornerFamilyBottomLeft, R.attr.cornerFamilyBottomRight, R.attr.cornerFamilyTopLeft, R.attr.cornerFamilyTopRight, R.attr.cornerSize, R.attr.cornerSizeBottomLeft, R.attr.cornerSizeBottomRight, R.attr.cornerSizeTopLeft, R.attr.cornerSizeTopRight};

    /* renamed from: OooOo0o  reason: collision with root package name */
    public static final int[] f1808OooOo0o = {16843039, 16843040, 16843840, R.attr.backgroundTint, R.attr.behavior_draggable, R.attr.coplanarSiblingViewId, R.attr.shapeAppearance, R.attr.shapeAppearanceOverlay};

    /* renamed from: OooOo  reason: collision with root package name */
    public static final int[] f1804OooOo = {168430


，采取的行动。\n本身可以当做一个非实时性的文字直播，意义在于：\n成长：用1000天，让账号长大，让育儿博主长大，让家里的宝子长大，育儿育己。\n陪伴：用1000天，如果能够影响很多像我一样想要做（知乎）账号，做育儿博主的人，鼓励、陪伴他们也走下去，或者将来也想要走这条路的人，看了我的故事，能少走点弯路，这就行了。

|名称|作者|读者数量|内容数量|更新时间|
|---|---|---|---|---|
|[一个育儿博主的1000天](https://xiaobot.net/p/hxsyuer?refer=0b133df9-27dc-423b-8101-639049001c13)|育儿博主好先生|1人|12篇|2023-07-22|

## 最近更新
### 23/7/22 (day012/1000)

#我在知乎当育儿博主 23/7/22 (day012/1000)

✅ 知乎VS小红书

都说小红是自媒体人的后花园，难怪群里越来越多的人开始做小红书了，多平台已成趋势，不得......

### 23/7/21 (day011/1000)

#我在知乎当育儿博主 23/7/21 (day011/1000)

✅ 看不见的运营

小红真是个宝，说是羊毛也行。为了找一些资料，加了某个博主的微信，好么，接......

### 23/7/20 (day010/1000)

#在知乎当育儿博主 23/7/20 (day010/1000)

✅ 今天干了件蠢事

家里的洗衣机出水管坏掉了，我在网上买了一条，想要自己换上。

心里是这么想的......

### 23/7/19 (day009/1000)

#在知乎当育儿博主 23/7/19 (day009/1000)

✅ 赶稿人

终于体会了一把赶稿人的忙碌，虽然感觉上没怎么接稿，但还是有几篇还是被催稿了。

可能......

### 23/7/18 (day008/1000)

#我在知乎当育儿博主 23/7/18 (day008/1000)

✅ 奇妙的缘分

毫无疑问最近一直在想该怎么写育儿方面的专栏，断断续续有些思考。平时基本上不看朋友圈，但昨......

### 23/7/17 (day007/1000)

#我在知乎当育儿博主 23/7/17 (day007/1000)

✅ 变化

上周的前几天，粉丝涨得很快，就觉得按这个速度涨下去，周末就能达到3k。

谁知道打脸......

### None


-- mod-version:3
local core = require "core"
local common = require "core.common"
local command = require "core.command"
local config = require "core.config"
local keymap = require "core.keymap"
local style = require "core.style"
local View = require "core.view"
local ContextMenu = require "core.contextmenu"
local RootView = require "core.rootview"
local CommandView = require "core.commandview"
local DocView = require "core.docview"
local DirWatch = require "core.dirwatch"

---Configuration options for `treeview` plugin.
---@class config.plugins.treeview
---Default treeview width.
---@field size number
---Selects the file you are editing on the treeview.
---@field highlight_focused_file boolean
---Automatically expands directories to select focused file.
---@field expand_dirs_to_focused_file boolean
---Automatically scrolls the treeview to focused file.
---@field scroll_to_focused_file boolean
---Smoothly scroll to focused file.
---@field animate_scroll_to_focused_file boolean
---Show hidden files and directories.
---@field show_hidden boolean
---Show ignored files and directories.
---@field show_ignored boolean
config.plugins.treeview = common.merge({
  -- Default treeview width
  size = 200 * SCALE,
  highlight_focused_file = true,
  expand_dirs_to_focused_file = false,
  scroll_to_focused_file = false,
  animate_scroll_to_focused_file = true,
  show_hidden = false,
  show_ignored = false
}, config.plugins.treeview)

local tooltip_offset = style.font:get_height()
local tooltip_border = 1
local tooltip_delay = 0.5
local tooltip_alpha = 255
local tooltip_alpha_rate = 1

local function get_depth(filename)
  if filename == "" then return 0 end
  local n = 1
  for sep in filename:gmatch("\\*" .. PATHSEP) do
    if #sep % 2 == 1 then
      n = n + 1
    end
  end
  return n
end

local function replace_alpha(color, alpha)
  local r, g, b = table.unpack(color)
  return { r, g, b, alpha }
end

---@class plugins.treeview
local TreeView = View:extend()

function TreeView:__tostring() return "TreeView" end

function TreeView:new()
  TreeView.super.new(self)
  self.scrollable = true
  self.visible = true
  self.init_size = true
  self.scroll_width = 0
  self.target_size = config.plugins.treeview.size
  self.show_hidden = config.plugins.treeview.show_hidden
  self.show_ignored = config.plugins.treeview.show_ignored
  self.cache = {}
  self.expanded = {}
  self.tooltip = { x = 0, y = 0, begin = 0, alpha = 0 }
  self.last_scroll_y = 0

  self.item_icon_width = 0
  self.item_text_spacing = 0
  self.watches = { }
end

function TreeView:set_target_size(axis, value)
  if axis == "x" then
    self.target_size = value
    return true
  end
end

function TreeView:on_scale_change(new_scale, prev_scale)
  self.target_size = self.target_size / prev_scale
  self.target_size = self.target_size * new_scale
end

function TreeView:get_cached(project, path)
  local t = self.cache[path]
  if not t then
    if not self.watches[project] then self.watches[project] = DirWatch() end
    local truncated = p


= min(buff.len(), RAM_DISK_SIZE - i);
			ramdisk.write(i as _, &mut buff[0..size]).unwrap();
		}

		for i in (0..RAM_DISK_SIZE).step_by(buff.len()) {
			let size = min(buff.len(), RAM_DISK_SIZE - i);
			ramdisk.read(i as _, &mut buff[0..size]).unwrap();

			for j in 0..size {
				assert_eq!(buff[j], 1);
			}
		}
	}

	#[test_case]
	fn ramdisk3() {
		let mut ramdisk = RAMDiskHandle::new();
		let mut buff: [u8; 100] = [0; 100];
		for i in 0..buff.len() {
			buff[i] = 1;
		}

		ramdisk.write(0, &mut buff).unwrap();

		for i in (0..RAM_DISK_SIZE).step_by(buff.len()) {
			let size = min(buff.len(), RAM_DISK_SIZE - i);
			ramdisk.read(i as _, &mut buff[0..size]).unwrap();

			for j in 0..size {
				let val = {
					if i == 0 {
						1
					} else {
						0
					}
				};

				assert_eq!(buff[j], val);
			}
		}
	}

	#[test_case]
	fn ramdisk4() {
		let mut ramdisk = RAMDiskHandle::new();
		let mut buff: [u8; 512] = [0; 512];
		for i in 0..buff.len() {
			buff[i] = 1;
		}

		ramdisk.write(42, &mut buff).unwrap();

		for i in (0..RAM_DISK_SIZE).step_by(buff.len()) {
			let size = min(buff.len(), RAM_DISK_SIZE - i);
			ramdisk.read(i as _, &mut buff[0..size]).unwrap();

			for j in 0..size {
				let val = {
					let abs_index = i + j;
					if abs_index >= 42 && abs_index < 42 + buff.len() {
						1
					} else {
						0
					}
				};

				assert_eq!(buff[j], val);
			}
		}
	}
}*/
use std::fmt::Display;

use crate::error::Result;

/// An ID implementation by chrono::DateTime<Utc>.
pub mod datetime;
/// An ID implementation by integer numbers.
pub mod num;
/// An ID Wrapper for pagination.
pub mod paginated;

/// An abstraction for IDs. This trait must be implemented if you want to create a downloader
/// with a new ID management.
pub trait DownloaderID<T: Display> {
    /// Returns current ID.
    fn current(&self) -> &T;
    /// Updates current ID with a given ID.
    fn update(&mut self, c: T) -> Result<()>;
}
<filename>src/server/commands/noop.rs
//! The RFC 959 No Operation (`NOOP`) command
//
// This command does not affect any parameters or previously
// entered commands. It specifies no action other than that the
// server send an OK reply.

use crate::server::commands::Cmd;
use crate::server::error::FTPError;
use crate::server::reply::{Reply, ReplyCode};
use crate::server::CommandArgs;
use crate::storage;

pub struct Noop;

impl<S, U> Cmd<S, U> for Noop
where
    U: Send + Sync + 'static,
    S: 'static + storage::StorageBackend<U> + Sync + Send,
    S::File: tokio_io::AsyncRead + Send,
    S::Metadata: storage::Metadata,
{
    fn execute(&self, _args: &Command


{
    private static final int BYTE_LENGTH = 64;

    /*
     * S-Boxes.
     */
    private static final long[] t1 = {
        0x02AAB17CF7E90C5EL   /*    0 */,    0xAC424B03E243A8ECL   /*    1 */,
        0x72CD5BE30DD5FCD3L   /*    2 */,    0x6D019B93F6F97F3AL   /*    3 */,
        0xCD9978FFD21F9193L   /*    4 */,    0x7573A1C9708029E2L   /*    5 */,
        0xB164326B922A83C3L   /*    6 */,    0x46883EEE04915870L   /*    7 */,
        0xEAACE3057103ECE6L   /*    8 */,    0xC54169B808A3535CL   /*    9 */,
        0x4CE754918DDEC47CL   /*   10 */,    0x0AA2F4DFDC0DF40CL   /*   11 */,
        0x10B76F18A74DBEFAL   /*   12 */,    0xC6CCB6235AD1AB6AL   /*   13 */,
        0x13726121572FE2FFL   /*   14 */,    0x1A488C6F199D921EL   /*   15 */,
        0x4BC9F9F4DA0007CAL   /*   16 */,    0x26F5E6F6E85241C7L   /*   17 */,
        0x859079DBEA5947B6L   /*   18 */,    0x4F1885C5C99E8C92L   /*   19 */,
        0xD78E761EA96F864BL   /*   20 */,    0x8E36428C52B5C17DL   /*   21 */,
        0x69CF6827373063C1L   /*   22 */,    0xB607C93D9BB4C56EL   /*   23 */,
        0x7D820E760E76B5EAL   /*   24 */,    0x645C9CC6F07FDC42L   /*   25 */,
        0xBF38A078243342E0L   /*   26 */,    0x5F6B343C9D2E7D04L   /*   27 */,
        0xF2C28AEB600B0EC6L   /*   28 */,    0x6C0ED85F7254BCACL   /*   29 */,
        0x71592281A4DB4FE5L   /*   30 */,    0x1967FA69CE0FED9FL   /*   31 */,
        0xFD5293F8B96545DBL   /*   32 */,    0xC879E9D7F2A7600BL   /*   33 */,
        0x860248920193194EL   /*   34 */,    0xA4F9533B2D9CC0B3L   /*   35 */,
        0x9053836C15957613L   /*   36 */,    0xDB6DCF8AFC357BF1L   /*   37 */,
        0x18BEEA7A7A370F57L   /*   38 */,    0x037117CA50B99066L   /*   39 */,
        0x6AB30A9774424A35L   /*   40 */,    0xF4E92F02E325249BL   /*   41 */,
        0x7739DB07061CCAE1L   /*   42 */,    0xD8F3B49CECA42A05L   /*   43 */,
        0xBD56BE3F51382F73L   /*   44 */,    0x45FAED5843B0BB28L   /*   45 */,
        0x1C813D5C11BF1F83L   /*   46 */,    0x8AF0E4B6D75FA169L   /*   47 */,
        0x33EE18A487AD9999L   /*   48 */,    0x3C26E8EAB1C94410L   /*   49 */,
        0xB510102BC0A822F9L   /*


t = psbtObject.inputs[inputIndex];
      for (DerivationPath derivationPath in psbtInput.tapBip32Derivation!) {
        for (KeyStore keyStore in keyStoreList) {
          if (keyStore.hasSeed &&
              derivationPath.masterFingerprint == keyStore.masterFingerprint) {
            keyStore.hasPublicKeyInPsbt(psbt);
            keyStore.addMuSig2PublicNonceToPsbtInput(
                psbtInput, derivationPath.path, sigHash);
          }
        }
      }
    }
    return psbtObject.serialize();
  }

  /// Get Json string of the multisignature vault.
  String toJson() {
    return jsonEncode({
      "keyStores": keyStoreList.map((e) => e.toJson()).toList(),
      "requiredSignature": requiredSignature,
      "addressTypeName": addressType.name,
      "derivationPath": derivationPath
    });
  }

  /// Create a multisignature vault from a json string.
  factory MultisignatureVault.fromJson(String jsonStr) {
    Map<String, dynamic> json = jsonDecode(jsonStr);
    List<KeyStore> keyStores = [];
    for (var keyStoreJson in json['keyStores']) {
      keyStores.add(KeyStore.fromJson(keyStoreJson));
    }
    return MultisignatureVault.fromKeyStoreList(
        keyStores, json['requiredSignature'],
        addressType:
            AddressType.getAddressTypeFromName(json['addressTypeName']),
        accountIndex: 0);
  }
}
part of '../../coconut_lib.dart';

/// Represents a common member of multisignature wallet and vault.
abstract class MultisignatureWalletBase extends WalletBase {
  final int _requiredSignature;
  final List<KeyStore> _keyStoreList;

  /// Get the total number of public key.
  int get totalSigner => _keyStoreList.length;

  /// Get the required number of signature.
  int get requiredSignature => _requiredSignature;

  /// Get the list of keyStores.
  List<KeyStore> get keyStoreList => _keyStoreList;

  /// @nodoc
  MultisignatureWalletBase(this._requiredSignature, AddressType _addressType,
      String derivationPath, this._keyStoreList)
      : super(_addressType, derivationPath) {
    if (!_addressType.isMultisignature) {
      throw Exception('Use Vault or Wallet class for multisignature.');
    }

    if (_keyStoreList.length < requiredSignature) {
      throw Exception(
          'Required signature is greater than the number of keyStores.');
    }

    if (_addressType == AddressType.p2trMuSig2 &&
        _keyStoreList.length != _requiredSignature) {
      throw Exception(
          'The number of keyStores must be equal to the required signature in MuSig2.');
    }

    final segments = derivationPath.split('/');
    if (segments.length < 3 || segments[0] != 'm') {
      throw Exception('Invalid derivation path.');
    }
    final coinTypeSegment = segments[2];

    final coinType =
        int.tryParse(coinTypeSegment.replaceAll(RegExp(r"[h']"), ""));

    if (coinType == 1 && !NetworkType.currentNetworkType.isTestnet) {
      throw Exception('Invalid derivation path.');
    } else if (coinType == 0 && NetworkType.currentNetworkType.isTestnet) {
      throw Exception('Invalid derivation path.');
    }

    if (_addressType == AddressType.p2trMuSig2) {
      _keyStoreList
          .sort((a, b) => a.masterFingerprint.compareTo(b.masterFingerprint));
    }

    for (KeyStore keyStore in _keyStoreList) {
      if (NetworkType.currentNetworkType.isTestnet


< path.length; i++) {
			if (mode == "preview") path[i].style.backgroundColor = "#ff5745";
			else if (mode == "move") path[i].style.backgroundColor = "gray";
		}

		return path;
	}

	fillPathForward(startCords: number[], endCords: number[]) {
		let currentNumber: number = 0;
		let currentNumberAllCords = [];
		let foundEnd = false;

		while (foundEnd == false) {
			currentNumberAllCords = [];

			if (currentNumber == 0) {
				currentNumberAllCords = [startCords];
			} else {
				for (let i = 0; i < BoardManager.boardSize; i++) {
					for (let j = 0; j < BoardManager.boardSize; j++) {
						if (this.cells[i][j].getAttribute("data-state") == currentNumber.toString()) {
							//pint
							currentNumberAllCords.push([i, j]);
						}
					}
				}
			}

			let allCurrentNumbersNeighbors = this.getNeighbors(currentNumberAllCords);
			let validNeighbors = [];

			for (let i = 0; i < allCurrentNumbersNeighbors.length; i++) {
				if (
					allCurrentNumbersNeighbors[i][0] <= BoardManager.boardSize - 1 &&
					allCurrentNumbersNeighbors[i][0] >= 0 &&
					allCurrentNumbersNeighbors[i][1] <= BoardManager.boardSize - 1 &&
					allCurrentNumbersNeighbors[i][1] >= 0
				) {
					if (this.cells[allCurrentNumbersNeighbors[i][0]][allCurrentNumbersNeighbors[i][1]].getAttribute("data-state") == "blank") {
						validNeighbors.push(allCurrentNumbersNeighbors[i]);
					} else if (this.cells[allCurrentNumbersNeighbors[i][0]][allCurrentNumbersNeighbors[i][1]].getAttribute("data-state") == "end") {
						foundEnd = true;
					}
				}
			}

			for (let i = 0; i < validNeighbors.length; i++) {
				this.cells[validNeighbors[i][0]][validNeighbors[i][1]].setAttribute("data-state", (currentNumber + 1).toString());
			}

			if (validNeighbors.length == 0) {
				foundEnd = true; // but path dont exist
			}

			currentNumber++;
		}
	}

	getPathBackwards(endCords: number[]) {
		let foundEnd = false;
		let consecutivePathElements = [this.cells[endCords[0]][endCords[1]]];
		let consecutivePathElementsCords = [endCords];
		let iter = 0;

		while (!foundEnd) {
			let allNeighbors = this.getNeighbors([consecutivePathElementsCords[consecutivePathElementsCords.length - 1]]);
			let validNeighbors = [];

			for (let i = 0; i < allNeighbors.length; i++) {
				if (
					allNeighbors[i][0] <= BoardManager.boardSize - 1 &&
					allNeighbors[i][0] >= 0 &&
					allNeighbors[i][1] <= BoardManager.boardSize - 1 &&
					allNeighbors[i][1] >= 0
				) {
					validNeighbors.push(allNeighbors[i]);
				}
			}

			if (validNeighbors.length == 0) {
				foundEnd = true;
				return consecutivePathElements;
			}

			let nextPathElement = this.cells[validNeighbors[0][0]][validNeighbors[0][1]];
			let nextPathElementCords = [validNeighbors[0][0], validNeighbors[0][1]];

			for (let i = 0; i < validNeighbors.length; i++) {
				if (
					this.cells[validNeighbors[i


PROTO_0:
  LOADK R3 K0 ["%%UNIVERSE_ID%%"]
  GETIMPORT R6 K2 [game]
  GETTABLEKS R5 R6 K3 ["GameId"]
  FASTCALL1 TOSTRING R5 [+2]
  GETIMPORT R4 K5 [tostring]
  CALL R4 1 1
  NAMECALL R1 R0 K6 ["gsub"]
  CALL R1 3 1
  MOVE R0 R1
  FASTCALL1 STRING_LEN R0 [+3]
  MOVE R2 R0
  GETIMPORT R1 K9 [string.len]
  CALL R1 1 1
  JUMPIFNOTEQKN R1 K10 [0] [+3]
  LOADK R1 K11 ["https://www.roblox.com"]
  RETURN R1 1
  RETURN R0 1

PROTO_1:
  JUMPIFNOT R1 [+44]
  DUPTABLE R4 K3 [{"subText", "linkText", "linkUrl"}]
  LOADK R7 K4 ["Monetization"]
  LOADK R8 K5 ["RewardedAdsSubtext"]
  NAMECALL R5 R0 K6 ["getText"]
  CALL R5 3 1
  SETTABLEKS R5 R4 K0 ["subText"]
  LOADK R7 K4 ["Monetization"]
  LOADK R8 K7 ["RewardedAdsSubtextLink"]
  NAMECALL R5 R0 K6 ["getText"]
  CALL R5 3 1
  SETTABLEKS R5 R4 K1 ["linkText"]
  GETUPVAL R7 0
  GETTABLEKS R6 R7 K8 ["eligible"]
  LOADK R9 K9 ["%%UNIVERSE_ID%%"]
  GETIMPORT R12 K11 [game]
  GETTABLEKS R11 R12 K12 ["GameId"]
  FASTCALL1 TOSTRING R11 [+2]
  GETIMPORT R10 K14 [tostring]
  CALL R10 1 1
  NAMECALL R7 R6 K15 ["gsub"]
  CALL R7 3 1
  MOVE R6 R7
  FASTCALL1 STRING_LEN R6 [+3]
  MOVE R8 R6
  GETIMPORT R7 K18 [string.len]
  CALL R7 1 1
  JUMPIFNOTEQKN R7 K19 [0] [+3]
  LOADK R5 K20 ["https://www.roblox.com"]
  JUMP [+1]
  MOVE R5 R6
  SETTABLEKS R5 R4 K2 ["linkUrl"]
  RETURN R4 1
  JUMPIFNOT R2 [+44]
  DUPTABLE R4 K3 [{"subText", "linkText", "linkUrl"}]
  LOADK R7 K4 ["Monetization"]
  LOADK R8 K21 ["RewardedAdsSuspendedSubtext"]
  NAMECALL R5 R0 K6 ["getText"]
  CALL R5 3 1
  SETTABLEKS R5 R4 K0 ["subText"]
  LOADK R7 K4 ["Monetization"]
  LOADK R8 K22 ["RewardedAdsSuspendedSubtextLink"]
  NAMECALL R5 R0 K6 ["getText"]
  CALL R5 3 1
  SETTABLEKS R5 R4 K1 ["linkText"]
  GETUPVAL R7 0
  GETTABLEKS R6 R7 K23 ["appeal"]
  LOADK R9 K9 ["%%UNIVERSE_ID%%"]
  GETIMPORT R12 K11 [game]
  GETTABLEKS R11 R12 K12 ["GameId"]
  FASTCALL1 TOSTRING R11 [+2]
  GETIMPORT R10 K14 [tostring]
  CALL R10 1 1
  NAMECALL R7 R6 K15 ["gsub"]
  CALL R7 3 1
  MOVE R6 R7
  FASTCALL1 STRING_LEN R6 [+3]
  MOVE R8 R6
  GETIMPORT R7 K18 [string.len]
  CALL R7 1 1
  JUMPIFNOTEQKN R7 K19 [0] [+3]
  LOADK R5 K20 ["https://www.robl


);\n        return ptr;\n    }\n\n    free() {\n        const ptr = this.__destroy_into_raw();\n        wasm.__wbg_timestamp_free(ptr, 0);\n    }\n    /**\n     * Get UNIX timestamp (seconds)\n     * @returns {Timestamp}\n     */\n    static now() {\n        const ret = wasm.timestamp_now();\n        return Timestamp.__wrap(ret);\n    }\n    /**\n     * @param {number} secs\n     * @returns {Timestamp}\n     */\n    static fromSecs(secs) {\n        const ret = wasm.timestamp_fromSecs(secs);\n        return Timestamp.__wrap(ret);\n    }\n    /**\n     * Get timestamp as seconds\n     * @returns {number}\n     */\n    asSecs() {\n        const ret = wasm.timestamp_asSecs(this.__wbg_ptr);\n        return ret;\n    }\n    /**\n     * Convert `Timestamp` to human datetime\n     * @returns {string}\n     */\n    toHumanDatetime() {\n        let deferred1_0;\n        let deferred1_1;\n        try {\n            const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n            wasm.timestamp_toHumanDatetime(retptr, this.__wbg_ptr);\n            var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n            var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n            deferred1_0 = r0;\n            deferred1_1 = r1;\n            return getStringFromWasm0(r0, r1);\n        } finally {\n            wasm.__wbindgen_add_to_stack_pointer(16);\n            wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);\n        }\n    }\n}\nmodule.exports.Timestamp = Timestamp;\n\nconst UnsignedEventFinalization = (typeof FinalizationRegistry === 'undefined')\n    ? { register: () => {}, unregister: () => {} }\n    : new FinalizationRegistry(ptr => wasm.__wbg_unsignedevent_free(ptr >>> 0, 1));\n\nclass UnsignedEvent {\n\n    static __wrap(ptr) {\n        ptr = ptr >>> 0;\n        const obj = Object.create(UnsignedEvent.prototype);\n        obj.__wbg_ptr = ptr;\n        UnsignedEventFinalization.register(obj, obj.__wbg_ptr, obj);\n        return obj;\n    }\n\n    __destroy_into_raw() {\n        const ptr = this.__wbg_ptr;\n        this.__wbg_ptr = 0;\n        UnsignedEventFinalization.unregister(this);\n        return ptr;\n    }\n\n    free() {\n        const ptr = this.__destroy_into_raw();\n        wasm.__wbg_unsignedevent_free(ptr, 0);\n    }\n    /**\n     * @returns {EventId | undefined}\n     */\n    get id() {\n        const ret = wasm.unsignedevent_id(this.__wbg_ptr);\n        return ret === 0 ? undefined : EventId.__wrap(ret);\n    }\n    /**\n     * @returns {PublicKey}\n     */\n    get pubkey() {\n        const ret = wasm.unsignedevent_pubkey(this.__wbg_ptr);\n        return PublicKey.__wrap(ret);\n    }\n    /**\n     * @returns {Timestamp}\n     */\n    get createdAt() {\n        const ret = wasm.unsignedevent_createdAt(this.__wbg_ptr);\n        return Timestamp.__wrap(ret);\n    }\n    /**\n     * @returns {Kind}\n     */\n    get kind() {\n        const ret = wasm.unsignedevent_kind(this.__wbg_ptr);\n        return Kind.__wrap(ret);\n    }\n    /**\n     * @returns {Tag[]}\n     */\


er: 1px solid #ccc;
    min-height: 100vh;

}

label {
    /* Definindo a cor do texto */
    color: #000; /* Cor pode ser ajustada para sua preferência */
    /* Definindo o tamanho da fonte */
    font-size: 12px; /* Tamanho da fonte pode ser ajustado */
    /* Definindo margem inferior para espaçamento */
    margin-bottom: 2px; /* Ajuste conforme necessário */
    /* Outros estilos opcionais */
    font-weight: bold; /* Pode ser 'normal' ou 'bold' */
    /* Centralizando o texto horizontalmente */
    text-align: left; /* Centraliza o texto dentro do label */
    /* Centralizando o texto verticalmente */
    line-height: 1.5; /* Ajusta a altura da linha para centralizar verticalmente */
    font-weight: 500;
}

.input-group {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0% !important;

}

.input-group button {
    background-color: #4CAF50; /* Cor de fundo do botão */
    color: white; /* Cor do texto */
    font-size: 10px; /* Tamanho da fonte para o símbolo */
    border: none; /* Remove a borda padrão */
    border-radius: 50%; /* Forma redonda */
    width: 15px; /* Largura e altura iguais para botões redondos */
    height: 15px;
    display: flex; /* Flexbox para centralizar conteúdo */
    align-items: center; /* Centraliza verticalmente */
    justify-content: center; /* Centraliza horizontalmente */
    cursor: pointer; /* Muda o cursor ao passar por cima */
    transition: background-color 0.3s, box-shadow 0.3s; /* Animação de hover */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Sombra suave */
}
/* Efeito ao passar o mouse sobre o botão */
.input-group button:hover {
    background-color: #45a049; /* Cor de fundo ao passar o mouse */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Aumenta a sombra ao hover */
}

/* Efeito de clique no botão */
.input-group button:active {
    transform: translateY(2px); /* Efeito de pressão */
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Reduz a sombra ao clicar */
}

/* Ajuste para telas pequenas */
@media (max-width: 768px) {
    .input-group button {
        width: 10px; /* Reduz o tamanho para dispositivos móveis */
        height: 10px;
        font-size: 1.2rem;
    }
    #cabecalho_font_size{
    width: 80%;

}
#agencia_bg_width, #agencia_bg_height{
    width: 50% !important;

}
}
@media (max-width: 500px) {
    .input-group button {
        width: 10px; /* Reduz o tamanho para dispositivos móveis */
        height: 10px;
        font-size: 1.2rem;
    }
    #cabecalho_font_size{
    width: 80%;

}
#agencia_bg_width, #agencia_bg_height{
    width: 50% !important;

}
#avatar {
    width: 100%;
}

}

#cabecalho_font_size, #agencia_bg_width, #agencia_bg_height, #apresentacao_font_size{


--- Utils
-- Helper module for misc operations

local Utils = {}

function Utils.error(level, str, ...)
    error(string.format(str, ...), level + 1)
end

--- Does a shallow copy of a table and appends it to a target table.
-- @param orig Table to copy
-- @param target Table to append to
function Utils.shallowCopy(orig, target)
   for key, value in pairs(orig) do
      target[key] = value
   end

   return target
end

--- Requires files and puts them in a table.
-- Accepts a table of paths to Lua files: {"path/to/file_1", "path/to/another/file_2", "etc"}
-- Accepts a path to a directory with Lua files: "my_files/here"
-- @param pathOrFiles The table of paths or a path to a directory.
-- @param namespace A table that will hold the required files
-- @treturn table The namespace table
function Utils.loadNamespace(pathOrFiles, namespace)
   if type(pathOrFiles) ~= "string" and type(pathOrFiles) ~= "table" then
       Utils.error(2, "bad argument #1 to 'loadNamespace' (string/table of strings expected, got %s)", type(pathOrFiles))
   end

   if type(pathOrFiles) == "string" then
       local info = love.filesystem.getInfo(pathOrFiles) -- luacheck: ignore
       if info == nil or info.type ~= "directory" then
            Utils.error(2, "bad argument #1 to 'loadNamespace' (path


or Arc<T> {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        Display::fmt(self.as_ref(), f)
    }
}

impl<T: Hash + ?Sized> Hash for Arc<T> {
    fn hash<H: Hasher>(&self, state: &mut H) {
        Hash::hash(self.as_ref(), state)
    }
}

impl<T: PartialEq + ?Sized> PartialEq for Arc<T> {
    fn eq(&self, other: &Self) -> bool {
        self.as_ref().eq(other.as_ref())
    }
}

impl<T: PartialEq + Eq + ?Sized> Eq for Arc<T> {}

impl<T: PartialOrd + ?Sized> PartialOrd for Arc<T> {
    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
        self.as_ref().partial_cmp(other.as_ref())
    }
}

impl<T: PartialOrd + Ord + ?Sized> Ord for Arc<T> {
    fn cmp(&self, other: &Self) -> Ordering {
        self.as_ref().cmp(other.as_ref())
    }
}

impl<T: ?Sized> Pointer for Arc<T> {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        Pointer::fmt(unsafe { &self.data.into_mut() }, f)
    }
}

impl<T: ?Sized> From<std::sync::Arc<T>> for Arc<T> {
    fn from(ptr: std::sync::Arc<T>) -> Self {
        Self {
            data: unsafe { NonNullConst::new_unchecked(std::sync::Arc::into_raw(ptr)) },
            vtable: NonNullConst::from(&<std::sync::Arc<T>>::VTABLE),
            phantom: PhantomData {},
        }
    }
}

/// Trait for creating an `Arc<T>` vtable.
pub trait ArcVTableProvider<T: ?Sized> {
    /// VTable of the `Arc<T>`.
    const VTABLE: ArcVTable<T> = ArcVTable {
        cleanup_fn: TypeWrapper(Self::cleanup),
        clone_fn: TypeWrapper(Self::clone),
        downgrade_fn: TypeWrapper(Self::downgrade),
    };

    /// Implementation of the `Drop` trait.
    ///
    /// Drops the value and deallocates the memory.
    ///
    /// # Safety
    ///
    /// This function requires that `ptr` originates from an `Arc<T>` that matches the function.
    unsafe extern "C-unwind" fn cleanup(ptr: NonNullConst<T>);

    /// Implementation of the `Clone` trait.
    ///
    /// Increases the internal reference count.
    ///
    /// # Safety
    ///
    /// This function requires that `ptr` originates from an `Arc<T>` that matches the function.
    unsafe extern "C-unwind" fn clone(ptr: NonNullConst<T>) -> Arc<T>;

    /// Creates a `Weak<T>` for the pointer.
    ///
    /// # Safety
    ///
    /// This function requires that `ptr` originates from an `Arc<T>` that matches the function.
    unsafe extern "C-unwind" fn downgrade(ptr: NonNullConst<T>) -> Weak<T>;
}

impl<T: ?Sized> ArcVTableProvider<T> for std::sync::Arc<T> {
    unsafe extern "C-unwind" fn cleanup(ptr: NonNullConst<T>) {
        drop(std::sync::Arc::from_raw(ptr.as_ptr()))
    }

    unsafe extern "C-unwind" fn clone(ptr: NonNullConst<T>) -> Arc<T> {
        let original = std::sync::Arc::from_raw(ptr.as_ptr());
        let clone = original.clone();
        forget(original);
        clone.


	// const minDate = dates.reduce(function (a, b) { return a < b ? a : b })
	// const maxDate = dates.reduce(function (a, b) { return a > b ? a : b })

	// console.log(`minDate: ${minDate}`)
	// console.log(`maxDate: ${maxDate}`)

	const groups = new Map<number, any[]>()
	for (const item of items) {
		const dateString = item[dateKey]
		if (dateString) {
			const date = new Date(item[dateKey])
			const key = new Date(date.getFullYear(), date.getMonth()).getTime()
			const group = groups.get(key)
			if (group) {
				group.push(item)
			} else {
				groups.set(key, [item])
			}
		}
	}

	const keys = [...groups.keys()].sort((a, b) => a - b)
	// for (const key of keys) {
	//     const count = grouped.get(key)
	//     console.log(`${new Date(key).toDateString()}: ${count}`)
	// }

	const canvas = document.getElementById('mainCanvas') as HTMLCanvasElement
	canvas.style.width = '800px'
	canvas.style.height = '500px'
	const ctx = canvas.getContext('2d')!

	const chartData: Chart.ChartData = {
		labels: keys.map((o) => new Date(o).toDateString()),
		datasets: [{
			backgroundColor: '#505090',
			// borderColor: '#505090',
			borderWidth: 1,
			barPercentage: 1.0,
			categoryPercentage: 1.0,
			data: keys.map((o) => groups.get(o)!.length),
		}],
	}

	const onClick = (event?: MouseEvent, activeElements?: any[]) => {
		console.log(`onClick ${activeElements?.length}`)
		if (activeElements && activeElements.length > 0) {
			const chartElement = activeElements[0]
			const index: number = Number(chartElement._index)
			const key = keys[index]
			const group = groups.get(key)
			if (group) {
				const date = new Date(key)
				const title = date.toDateString()
				showGroup(group, title)
			}
		}
	}

	const config: Chart.ChartConfiguration = {
		type: 'bar',
		data: chartData,
		options: {
			responsive: true,
			animation: {
				duration: 0, // general animation time
			},
			scales: {
				xAxes: [{
					stacked: true,
				}],
				yAxes: [{
					stacked: true,
				}],
			},
			legend: {
				position: 'top',
				display: false,
			},
			title: {
				display: true,
				text: title,
			},
			onClick,
		},
	}

	if (chart) {
		chart.destroy()
		chart = new Chart(ctx, config)
		// chart.data.datasets!.forEach((dataset) => {
		// 	dataset.data!.pop()
		// })
		// config.data!.datasets!.forEach((dataset) => {
		// 	chart.data!.datasets!.push(dataset)
		// })

		// chart.update({duration: 0})
	} else {
		chart = new Chart(ctx, config)
	}
}

function showGroup(group: any[], title: string) {
	console.log(`showGroup ${group.length}`)
	console.log(group)

	clearLog()
	log(`${title}, ${group.length} items:\n`)
	for (const item of group) {
		log(`${JSON.stringify(item)},\n`)
	}
}

function clearLog() {
	const panel = document.getElementById('log') as HTMLDivElement
	panel.innerText = ''
}

function log(msg: string) {
	const panel = document.getElementById('log') as HTMLDivElement
	panel.innerText = `${panel.innerText + msg}\n`
}

function renderMap(items: Row[]) {
	const canvas = document.getElementById('mapCanvas') as HTMLCanvasElement
	const renderer = new MapRenderer(canvas, items)
	renderer.dr


r can be parsed.
 * Will not parse a number preceeded by a '+' or '-'. */
template<typename int_type, typename charT>
inline
int_type
var_string_to_int(std::istreambuf_iterator<charT>& itr,
                  const std::istreambuf_iterator<charT>& stream_end,
                  unsigned int max_length)
{
  typedef std::basic_string<charT>  string_type;
  unsigned int j = 0;
  string_type s;
  while (itr != stream_end && (j < max_length) && std::isdigit(*itr)) {
    s += (*itr);
    ++itr;
    ++j;
  }
  int_type i = static_cast<int_type>(-1);
  if(!s.empty()) {
    i = boost::lexical_cast<int_type>(s);
  }
  return i;
}

//! Class with generic date parsing using a format string
/*! The following is the set of recognized format specifiers
 -  %a - Short weekday name
 -  %A - Long weekday name
 -  %b - Abbreviated month name
 -  %B - Full month name
 -  %d - Day of the month as decimal 01 to 31
 -  %j - Day of year as decimal from 001 to 366
 -  %m - Month name as a decimal 01 to 12
 -  %U - Week number 00 to 53 with first Sunday as the first day of week 1?
 -  %w - Weekday as decimal number 0 to 6 where Sunday == 0
 -  %W - Week number 00 to 53 where Monday is first day of week 1
 -  %x - facet default date representation
 -  %y - Year without the century - eg: 04 for 2004
 -  %Y - Year with century

 The weekday specifiers (%a and %A) do not add to the date construction,
 but they provide a way to skip over the weekday names for formats that
 provide them.

 todo -- Another interesting feature that this approach could provide is
         an option to fill in any missing fields with the current values
         from the clock.  So if you have %m-%d the parser would detect
         the missing year value and fill it in using the clock.

 todo -- What to do with the %x.  %x in the classic facet is just bad...

 */
template<class date_type, typename charT>
class format_date_parser
{
 public:
  typedef std::basic_string<charT>        string_type;
  typedef std::basic_istringstream<charT>  stringstream_type;
  typedef std::istreambuf_iterator<charT> stream_itr_type;
  typedef typename string_type::const_iterator const_itr;
  typedef typename date_type::year_type  year_type;
  typedef typename date_type::month_type month_type;
  typedef typename date_type::day_type day_type;
  typedef typename date_type::duration_type duration_type;
  typedef typename date_type::day_of_week_type day_of_week_type;
  typedef typename date_type::day_of_year_type day_of_year_type;
  typedef string_parse_tree<charT> parse_tree_type;
  typedef typename parse_tree_type::parse_match_result_type match_results;
  typedef std::vector<std::basic_string<charT> > input_collection_type;

  // TODO sv_parser uses its default constructor - write the others

  format_date_parser(const string_type& format_str,
                     const input_collection_type& month_short_names,
                     const input_collection_type& month_long_names,
                     const input_collection_type& weekday_short_names,
                     const input_collection_type& weekday_long_names) :
    m_format(format_str),
    m_month_short_names(month_short_names, 1),
    m_month_long_names(month_long_names, 1),
    m_weekday_short_names(weekday_short


## Graceful Shutdown

의외로 중요한 것이었는데, 모델 서버측이 인지하지 못한 이슈가 있었는데요, ~~1패 적립~~ 바로 **Graceful Shutdown** 입니다.

이는 k8s 등의 경량 container 환경에서 자주 사용하는 용어인데요, 간단하게 설명하면 **Container 를 종료하려 할 때 바로 제거하지 않고, 일정 시간의 대기/특정 작업 수행 완료 대기 후 제거** 하는 것을 의미합니다. 경량 Container (k8s에서는 pod 라고 부릅니다.) 를 사용하는 k8s 환경에서는 상황에 따라 유동적으로 pod의 수가 조정될 수 있는데, 이 과정에서 축출되는 pod는 상황에 따라 처리중인 요청을 모두 수행한 후 안전하게 제거해 줘야 합니다. 그럴 때 사용하는 전략이 바로 **Graceful Shutdown** 입니다.

해당 프로젝트에서 GPU는 pod와 유사하게 동작합니다. 물론 경량화 같은 느낌은 절대 아니고, GPU의 추가 및 제거 또한 관리자가 직접 해줘야 하지만, 변동되는 점은 pod와 유사하기 때문에, 이 축출 과정 또한 pod와 유사하게 동작해야 하지 않을까? 라는 생각이 들었습니다.

Inference 하나에 드는 시간이 10분 내외인 만큼, 원래는 "적당한 시간만큼 기다린 후에 제거되도록 할까?" 라고 생각을 했지만, GPU의 성능 차이로 인해 그런 생각은 금방 접게 되었고, 위에서 사용한 Inference-Flow 를 활용하여, 제거 대상의 Pod가 waiting state가 되거나, 할당 받은 Job을 마쳤을 때 제거하도록 로직을 구성했습니다. 특별하게


ting is None:
        _mouse_is_swapped_setting = False # TODO - for now, we can't detect this setting
    return _mouse_is_swapped_setting

def _multiClick(x, y, button, num, interval=0.0):
    btn    = None
    down   = None
    up     = None

    if button == LEFT:
        btn  = Quartz.kCGMouseButtonLeft
        down = Quartz.kCGEventLeftMouseDown
        up   = Quartz.kCGEventLeftMouseUp
    elif button == MIDDLE:
        btn  = Quartz.kCGMouseButtonCenter
        down = Quartz.kCGEventOtherMouseDown
        up   = Quartz.kCGEventOtherMouseUp
    elif button == RIGHT:
        btn  = Quartz.kCGMouseButtonRight
        down = Quartz.kCGEventRightMouseDown
        up   = Quartz.kCGEventRightMouseUp
    else:
        assert False, "button argument not in ('left', 'middle', 'right')"
        return

    for i in range(num):
        _click(x, y, button)
        time.sleep(interval)

def _sendMouseEvent(ev, x, y, button):
    mouseEvent = Quartz.CGEventCreateMouseEvent(None, ev, (x, y), button)
    Quartz.CGEventPost(Quartz.kCGHIDEventTap, mouseEvent)

def _dragTo(x, y, button):
    if button == LEFT:
        _sendMouseEvent(Quartz.kCGEventLeftMouseDragged , x, y, Quartz.kCGMouseButtonLeft)
    elif button == MIDDLE:
        _sendMouseEvent(Quartz.kCGEventOtherMouseDragged , x, y, Quartz.kCGMouseButtonCenter)
    elif button == RIGHT:
        _sendMouseEvent(Quartz.kCGEventRightMouseDragged , x, y, Quartz.kCGMouseButtonRight)
    else:
        assert False, "button argument not in ('left', 'middle', 'right')"
    time.sleep(pyautogui.DARWIN_CATCH_UP_TIME) # needed to allow OS time to catch up.

def _moveTo(x, y):
    _sendMouseEvent(Quartz.kCGEventMouseMoved, x, y, 0)
    time.sleep(pyautogui.DARWIN_CATCH_UP_TIME) # needed to allow OS time to catch up.


s = newUniformValue as FloatArray
                    ShaderHelper.glUniform4f(uniformID, values[0], values[1], values[2], values[3])
                }

                //#if MC > 1.21
                //$$ UniformType.MAT4 -> {
                //$$     val matrix = newUniformValue as Matrix4f
                //$$     ShaderHelper.glUniformMatrix4f(uniformID, false, matrix)
                //$$ }
                //#endif

                UniformType.BOOL -> ShaderHelper.glUniform1f(uniformID, if (newUniformValue as Boolean) 1f else 0f)
                UniformType.INT -> ShaderHelper.glUniform1i(uniformID, (newUniformValue as Int))
            }
            previousUniformValue = newUniformValue
        }
    }
}
package at.hannibal2.skyhanni.utils.tracker

import at.hannibal2.skyhanni.features.skillprogress.SkillType
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat
import at.hannibal2.skyhanni.utils.collection.CollectionUtils.sumAllValues
import at.hannibal2.skyhanni.utils.renderables.Renderable
import at.hannibal2.skyhanni.utils.renderables.Searchable
import at.hannibal2.skyhanni.utils.renderables.toSearchable

object TrackerUtils {

    fun MutableList<Searchable>.addSkillXpInfo(
        skillXpGained: Map<SkillType, Long>
    ) = skillXpGained.sumAllValues().takeIf { it > 0 }?.let { sumXpGained ->
        val applicableSkills = skillXpGained.filter { it.value > 0 }
        val skillHoverTips = applicableSkills.map { (skill, xp) ->
            "§7${xp.addSeparators()} §3${skill.displayName} XP"
        }.toMutableList()
        if (applicableSkills.size > 1) {
            skillHoverTips.add("§7You gained §e${sumXpGained.addSeparators()} §7total skill XP.")
        }
        this.add(
            Renderable.hoverTips(
                "§7${sumXpGained.shortFormat()} §3Skill XP",
                skillHoverTips,
            ).toSearchable("Skill XP"),
        )
    }

}
package at.hannibal2.skyhanni.utils.tracker

import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.features.misc.TrackerConfig.TextPart
import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage
import at.hannibal2.skyhanni.data.ItemAddManager
import at.hannibal2.skyhanni.data.TrackerManager
import at.hannibal2.skyhanni.events.ItemAddEvent
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ItemPriceUtils.formatCoin
import at.hannibal2.skyhanni.utils.ItemPriceUtils.getPriceName
import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.ItemUtils.readableInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.repoItemName
import at.hannibal2.skyhanni.utils.ItemUtils.repoItemNameCompact
import at.hannibal2.skyhanni.utils.KeyboardManager
import at.hannibal2.skyhanni.utils.NeuInternalName
import at.hannibal2.skyhanni.utils.NeuInternalName.Companion.SKYBLOCK_COIN
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat
import at.hannibal2.skyhanni.utils.SkyBlockUtils
import at.hannibal2.skyhanni.utils.StringUtils.pluralize
import at.hannibal2.skyhanni


়ে RAG গুণমান মূল্যায়ন করুন
- প্রসঙ্গ প্রাসঙ্গিকতা, উত্তর প্রাসঙ্গিকতা, বিশ্বাসযোগ্যতা পরিমাপ করুন
- RAGAS ফ্রেমওয়ার্ক ব্যবহার করে পদ্ধতিগত মূল্যায়ন করুন
- RAG গুণমান সমস্যাগুলো চিহ্নিত এবং ঠিক করুন
- আপনার ডোমেইনের জন্য মূল্যায়ন ডেটাসেট তৈরি করুন

**মূল ধারণা**: RAG মূল্যায়ন, RAGAS মেট্রিক, গুণমান পরিমাপ, পদ্ধতিগত পরীক্ষা

**আপনি যা তৈরি করবেন**: RAG গুণমান মূল্যায়ন ফ্রেমওয়ার্ক

---

### 📙 সেশন ০৩: OSS মডেল বেঞ্চমার্ক
**ফাইল**: `session03_benchmark_oss_models.ipynb`
**সময়কাল**: ৩০-৪৫ মিনিট
**প্রয়োজনীয়তা**: সেশন ০১
**কঠিনতা**: ⭐⭐ ইন্টারমিডিয়েট

**আপনি যা শিখবেন**:
- একাধিক মডেল পদ্ধতিগতভাবে বেঞ্চমার্ক করুন
- লেটেন্সি, থ্রুপুট, ফার্স্ট-টোকেন টাইম পরিমাপ করুন
- মডেল ব্যর্থতার জন্য গ্রেসফুল ডিগ্রেডেশন বাস্তবায়ন করুন
- মডেল পরিবারের মধ্যে পারফরম্যান্স তুলনা করুন
- বেঞ্চমার্ক ফলাফল ভিজ্যুয়ালাইজ এবং বিশ্লেষণ করুন

**মূল ধারণা**: পারফরম্যান্স বেঞ্চমার্


职位描述

1、实施落地蚂蚁全球化战略，为全球用户、商家带去普惠金融服务，业务覆盖全球；

2、负责全球跨境资金通路打通、优化以及全球资金渠道和机构的接入的研发，结合AI、区块链等先进技术，建设全球T0资金清结算网络，支持支付业务在全球展业，并提供有核心竞争力的资金处理优势

3、挑战全球化部署、跨洲容灾、全球3秒支付、海量数据批处理等世界级难题，应用AI、区块链等先进技术创造业务价值。

职位要求

1、扎实的java编程基础。对各种开源框架（Spring、Mybatis等）有深入的运用、了解。精通DDD、SOA等理念；

2、丰富的数据库（oracle，mysql等）使用经验，具备索引、SQL优化能力，有分布式事务、海量数据处理经验（Redis，rabbitmq，Kafka 等）者优先考虑；

3、精通各类互联网常用中间件，能融会贯通，有架构思维；

4、研发质量意识好，对系统质量有高要求；

5、具备良好的识别和设计通用框架及模块的能力，有3年以上大规模高并发系统设计和开发经验者优先考虑；

6、创新且严谨的思维能力，抗压且乐观的工作态度，有责任心和目标感；

7、较强的表达、沟通、协调能力，有多人大项目的协同经验；

8、有专业的支付、清算、汇兑、财富等金融领域知识者优先考虑；

9、具有大型电子商务网站，银行业核心系统，互联网金融系统设计与研发经验背景者优先考虑。

10、英语基础好，英语流利可对外沟通优先考虑。

---

#### [蚂蚁集团-大模型应用工程师（风管）-杭州](https://talent.antgroup.com/off-campus-position?positionId=25042404511678)

📍 杭州 | ⌛ 3年

职位描述

1. 大模型多智能体信贷风控系统建设

- 构建基于大模型的多智能体(Multi-Age


2)
Address offset: 0x08
Reset value: 0x0000 0000

Bit 6
 AWDIE
:
Analog watchdog interrupt enable
This bit is set and cleared by software to enable/disable the analog watchdog interrupt.
0: Analog watchdog interrupt disabled
1: Analog watchdog interrupt enabled
Bit 5
 EOCIE:
 Interrupt enable for EOC
This bit is set and cleared by software to enable/disable the End of Conversion interrupt.
0: EOC interrupt disabled
1: EOC interrupt enabled. An interrupt is generated when the EOC bit is set.
<span font="Arial" bbox="(116.45883178710938, 204.3104248046875, 146.4320068359375, 214.365112304