ak;
        case 'Z':
          path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y));
          break;
      }
      return path;
    },

    fixArc = function(pp, i) {
      if (pp[i].length > 7) {
        pp[i].shift();
        var pi = pp[i];
        while (pi.length) {
          pcoms1[i] = 'A';
          if (p2) { pcoms2[i] = 'A'; }
          pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6)));
        }
        pp.splice(i, 1);
        ii = Math.max(p.length, p2 && p2.length || 0);
      }
    },

    fixM = function(path1, path2, a1, a2, i) {
      if (path1 && path2 && path1[i][0] === 'M' && path2[i][0] !== 'M') {
        path2.splice(i, 0, ['M', a2.x, a2.y]);
        a1.bx = 0;
        a1.by = 0;
        a1.x = path1[i][1];
        a1.y = path1[i][2];
        ii = Math.max(p.length, p2 && p2.length || 0);
      }
    },

    pcoms1 = [], // path commands of original path p
    pcoms2 = [], // path commands of original path p2
    pfirst = '', // temporary holder for original path command
    pcom = ''; // holder for previous path command of original path

  for (var i = 0, ii = Math.max(p.length, p2 && p2.length || 0); i < ii; i++) {
    if (p[i]) { pfirst = p[i][0]; } // save current path command

    if (pfirst !== 'C') {
      pcoms1[i] = pfirst; // Save current path command
      if (i) { pcom = pcoms1[i - 1]; } // Get previous path command pcom
    }
    p[i] = processPath(p[i], attrs, pcom);

    if (pcoms1[i] !== 'A' && pfirst === 'C') { pcoms1[i] = 'C'; }

    fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1

    if (p2) { // the same procedures is done to p2
      if (p2[i]) { pfirst = p2[i][0]; }
      if (pfirst !== 'C') {
        pcoms2[i] = pfirst;
        if (i) { pcom = pcoms2[i - 1]; }
      }
      p2[i] = processPath(p2[i], attrs2, pcom);

      if (pcoms2[i] !== 'A' && pfirst === 'C') { pcoms2[i] = 'C'; }

      fixArc(p2, i);
    }
    fixM(p, p2, attrs, attrs2, i);
    fixM(p2, p, attrs2, attrs, i);
    var seg = p[i], seg2 = p2 && p2[i], seglen = seg.length,
      seg2len = p2 && seg2.length;
    attrs.x = seg[seglen - 2];
    attrs.y = seg[seglen - 1];
    attrs.bx = parseFloat(seg[seglen - 4]) || attrs.x;
    attrs.by = parseFloat(seg[seglen - 3]) || attrs.y;
    attrs2.bx = p2 && (parseFloat(seg2[seg2len - 4]) || attrs2.x);
    attrs2.by = p2 && (parseFloat(seg2[seg2len - 3]) || attrs2.y);
    attrs2.x = p2 && seg2[seg2len -


BeaconStateComputeExitEpochAndUpdateChurnCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockBeaconStateComputeExitEpochAndUpdateChurnCall) DoAndReturn(f func(uint64) uint64) *MockBeaconStateComputeExitEpochAndUpdateChurnCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// ComputeNextSyncCommittee mocks base method.
func (m *MockBeaconState) ComputeNextSyncCommittee() (*solid.SyncCommittee, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ComputeNextSyncCommittee")
	ret0, _ := ret[0].(*solid.SyncCommittee)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ComputeNextSyncCommittee indicates an expected call of ComputeNextSyncCommittee.
func (mr *MockBeaconStateMockRecorder) ComputeNextSyncCommittee() *MockBeaconStateComputeNextSyncCommitteeCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ComputeNextSyncCommittee", reflect.TypeOf((*MockBeaconState)(nil).ComputeNextSyncCommittee))
	return &MockBeaconStateComputeNextSyncCommitteeCall{Call: call}
}

// MockBeaconStateComputeNextSyncCommitteeCall wrap *gomock.Call
type MockBeaconStateComputeNextSyncCommitteeCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockBeaconStateComputeNextSyncCommitteeCall) Return(arg0 *solid.SyncCommittee, arg1 error) *MockBeaconStateComputeNextSyncCommitteeCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockBeaconStateComputeNextSyncCommitteeCall) Do(f func() (*solid.SyncCommittee, error)) *MockBeaconStateComputeNextSyncCommitteeCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockBeaconStateComputeNextSyncCommitteeCall) DoAndReturn(f func() (*solid.SyncCommittee, error)) *MockBeaconStateComputeNextSyncCommitteeCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// CurrentEpochAttestations mocks base method.
func (m *MockBeaconState) CurrentEpochAttestations() *solid.ListSSZ[*solid.PendingAttestation] {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CurrentEpochAttestations")
	ret0, _ := ret[0].(*solid.ListSSZ[*solid.PendingAttestation])
	return ret0
}

// CurrentEpochAttestations indicates an expected call of CurrentEpochAttestations.
func (mr *MockBeaconStateMockRecorder) CurrentEpochAttestations() *MockBeaconStateCurrentEpochAttestationsCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentEpochAttestations", reflect.TypeOf((*MockBeaconState)(nil).CurrentEpochAttestations))
	return &MockBeaconStateCurrentEpochAttestationsCall{Call: call}
}

// MockBeaconStateCurrentEpochAttestationsCall wrap *gomock.Call
type MockBeaconStateCurrentEpochAttestationsCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockBeaconStateCurrentEpochAttestationsCall) Return(arg0 *solid.ListSSZ[*solid.PendingAttestation]) *MockBeaconStateCurrentEpochAttestationsCall {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do


 playNote(C4, 119);
  await delay(99);
  await playNote(Fs4, 903);
})().catch(console.error);
/**
 * Crop an image to a specified size by providing the start location of the crop and the dimensions that the product should have.
 *
 * @param {string} path The path to the image to crop.
 * @param {number} x The horizontal location in the original image to begin the crop.
 * @param {number} y The vertical location in the original image to being the crop.
 * @param {number} width The width of the final cropped image.
 * @param {number} height The height of of the final cropped image.
 * @param {Object} [options]
 * @param {boolean} [options.autoDownload=false] Indicates whether the image should download after the cropping is complete or not.
 * @param {string} [options.crossOrigin=null] Sets the cross-origin property of images originating from external sources.
 *
 * @returns {Promize<HTMLImageElement>} Returns the newly cropped image as an image element.
 */
export declare function crop(path: string, x: number, y: number, width: number, height: number, options?: Object): Promise<HTMLImageElement | Error>;
import {A} from "../app.component";
import {Node} from "../entidades/Node";
import {Edge} from "../entidades/Edge";

//Tentei fazer isso funcionar corretamente, colocando allowJs no tsconfig: https://stackoverflow.com/questions/42867688/requiring-a-javascript-node-js-module-in-typescript-allowjs-is-not-set
//import * as jsLPsolver from './../../assets/jsLPsolver.js'; // Mas deu Unreachable code detected.

//Essa tecnica que sempre uso ate funciona, o problema tava sendo so no carregamento do .js, pq esqueci alguns arquivos...
//declare var Solver: any;

//Mas acheia essa mais interessante, e acho que so carrega os arquivos quando necessario... EDIT: Nao consegui ver pelo network do chrome, talvez esteja indo junto de um bundle...
//https://stackoverflow.com/questions/27417107/how-use-an-external-non-typescript-library-from-typescript-without-d-ts
declare var require:(moduleId:string) => any;

export class Solver_PT
{

  //Problema exemplo da monografia:
  solver_pt_exemplo() {

    var SOLVER = require("./../../assets/jsLPsolver/solver");
    var results, model = [
        //Funcao Objetivo
        "min: 5 S1D1 4 S1D2 7 S1D3 2 S2D1 1 S2D2 3 S2D3",
        //Restrições
        "1 S1D1 1 S1D2 1 S1D3 <= 700",
        "1 S2D1 1 S2D2 1 S2D3 <= 2000",
        "1 S1D1 1 S2D1 = 900",
        "1 S1D2 1 S2D2 = 700",
        "1 S1D3 1 S2D3 = 1100"
      ];
    model = SOLVER.ReformatLP(model); // Reformat to JSON model
    results = SOLVER.Solve(model); // Solve the model

    console.log(results);

    //Declaração Variaveis - PARECE QUE NAO PRECISA


会创建新的 m 来运行 g。出系统调用的时候，如果已经有 GOMAXPROCS 个 m 在干活了，则这个出系统调用的 m 会被挂起，它的 g 也会被挂到待运行的 goroutine 队列中。

在 Go 语言中 m 是 machine 的缩写，也就是机器的抽象。它被设计成了可以运行所有的 G。比如说一个 g 开始在某个 m 上运行，经过几次进出系统调用之后，可能运行它的 m 挂起了，其它的 m 会将它从队列中取出并继续运行。

每次调度都会涉及对 g 和 m 等队列的操作，这些全局的数据在多线程情况下使用就会涉及到大量的锁操作。在频繁的系统调用中这将是一个很大的开销。为了减少系统调用开销，Go1.0 在这里做了一些优化的。1.0 版中，在它的 Sched 结构体中有一个 atomic 字段，类型是一个 volatile 的无符 32 位整型。

    // sched中的原子字段是一个原子的uint32，存放下列域
    // 15位 mcpu  --正在占用cpu运行的m数量 (进入syscall的m是不占用cpu的)
    // 15位 mcpumax  --最大允许这么多个m同时使用cpu
    // 1位  waitstop  --有g等待结束
    // 1位  gwaiting  --等待队列不为空，有g处于waiting状态
    //	[15 bits] mcpu		number of m's executing on cpu
    //	[15 bits] mcpumax	max number of m's allowed on cpu
    //	[1 bit] waitstop	some g is waiting on stopped
    //	[1 bit] gwaiting	gwait != 0

这些信息是进行系统调用和出系统调用时需要用到的，它会决定是否需要进入到调度器层面。直接用 CAS 操作 Sched 的 atomic 字段判断，将它们打包成一个字节使得可以通过一次原子读写获取它们而不用加锁。这将极大的减少那些大量使用系统调用或者 cgo 的多线程程序的 contention。

除了进出系统调用以外，操作这些域只会发生于持有调度器锁的时候，因此 goroutines 不用担心其它 goroutine 会对这些字段进行操作。特别是，进出系统调用只会读 mcpumax，waitstop 和 gwaiting。决不会写他们。因此，(持有调度器锁)写这些域时完全不用担心会发生写冲突。

总体上看，Go1.0 调度设计结构比较简单，代码也比较清晰。但是也存在一些问题。这样的调度器设计限制了 Go 程序的并发度。测试发现有 14%是的时间浪费


oSans10)
                    .Prop(Label.StylePropertyFontColor, Color.FromHex("#333d3b")),

                // Fancy Tree
                Element<ContainerButton>().Identifier(TreeItem.StyleIdentifierTreeButton)
                    .Class(TreeItem.StyleClassEvenRow)
                    .Prop(ContainerButton.StylePropertyStyleBox, new StyleBoxFlat
                    {
                        BackgroundColor = FancyTreeEvenRowColor,
                    }),

                Element<ContainerButton>().Identifier(TreeItem.StyleIdentifierTreeButton)
                    .Class(TreeItem.StyleClassOddRow)
                    .Prop(ContainerButton.StylePropertyStyleBox, new StyleBoxFlat
                    {
                        BackgroundColor = FancyTreeOddRowColor,
                    }),

                Element<ContainerButton>().Identifier(TreeItem.StyleIdentifierTreeButton)
                    .Class(TreeItem.StyleClassSelected)
                    .Prop(ContainerButton.StylePropertyStyleBox, new StyleBoxFlat
                    {
                        BackgroundColor = FancyTreeSelectedRowColor,
                    }),

                Element<ContainerButton>().Identifier(TreeItem.StyleIdentifierTreeButton)
                    .Pseudo(ContainerButton.StylePseudoClassHover)
                    .Prop(ContainerButton.StylePropertyStyleBox, new StyleBoxFlat
                    {
                        BackgroundColor = FancyTreeSelectedRowColor,
                    }),

                // Silicon law edit ui
                Element<Label>().Class(SiliconLawContainer.StyleClassSiliconLawPositionLabel)
                    .Prop(Label.StylePropertyFontColor, NanoGold),
                // Pinned button style
                new StyleRule(
                    new SelectorElement(typeof(TextureButton), new[] { StyleClassPinButtonPinned }, null, null),
                    new[]
                    {
                        new StyleProperty(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Bwoink/pinned.png"))
                    }),

                // Unpinned button style
                new StyleRule(
                    new SelectorElement(typeof(TextureButton), new[] { StyleClassPinButtonUnpinned }, null, null),
                    new[]
                    {
                        new StyleProperty(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Bwoink/un_pinned.png"))
                    }),

                Element<PanelContainer>()
                    .Class(StyleClassInset)
                    .Prop(PanelContainer.StylePropertyPanel, insetBack),
            }).ToList());
        }
    }
}


)
            {
               png_byte save = *rp;
               *rp = *(rp + 4);
               *(rp + 4) = save;
               save = *(rp + 1);
               *(rp + 1) = *(rp + 5);
               *(rp + 5) = save;
            }
         }
         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
         {
            png_bytep rp;
            png_uint_32 i;

            for (i = 0, rp = row; i < row_width; i++, rp += 8)
            {
               png_byte save = *rp;
               *rp = *(rp + 4);
               *(rp + 4) = save;
               save = *(rp + 1);
               *(rp + 1) = *(rp + 5);
               *(rp + 5) = save;
            }
         }
      }
   }
}
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */

#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
    defined(PNG_LEGACY_SUPPORTED)
void PNGAPI
png_set_user_transform_info(png_structp png_ptr, png_voidp
   user_transform_ptr, int user_transform_depth, int user_transform_channels)
{
   png_debug(1, "in png_set_user_transform_info\n");
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
   png_ptr->user_transform_ptr = user_transform_ptr;
   png_ptr->user_transform_depth = (png_byte)user_transform_depth;
   png_ptr->user_transform_channels = (png_byte)user_transform_channels;
#else
   if(user_transform_ptr || user_transform_depth || user_transform_channels)
      png_warning(png_ptr,
        "This version of libpng does not support user transform info");
#endif
}
#endif

/* This function returns a pointer to the user_transform_ptr associated with
 * the user transform functions.  The application should free any memory
 * associated with this pointer before png_write_destroy and png_read_destroy
 * are called.
 */
png_voidp PNGAPI
png_get_user_transform_ptr(png_structp png_ptr)
{
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
   return ((png_voidp)png_ptr->user_transform_ptr);
#else
   if(png_ptr)
     return (NULL);
   return (NULL);
#endif
}


/*
 * MIT License
 *
 * Copyright (c) 2017 Twitter
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#pragma once

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waddress"
#pragma GCC diagnostic ignored "-Wsign-compare"

#include <stdlib.h>
#include "imagecore/imagecore.h"
#include "safe_iop/safe_iop.h"

#define ASSERT_NO_INTEGER_OVERFLOW(x) { if( !x ) { ImageCoreAssert(IMAGECORE_INTEGER_OVERFLOW, #x, __FILE__, __LINE__); exit(IMAGECORE_INTEGER_OVERFLOW); } }

inline uint32_t SafeUMul(uint32_t a, uint32_t b)
{
	uint32_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_umul(&r, a, b));
	return r;
}

inline uint64_t SafeUMul(uint64_t a, uint64_t b)
{
	uint64_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_umul(&r, a, b));
	return r;
}

inline uint32_t SafeUMul3(uint32_t a, uint32_t b, uint32_t c)
{
	uint32_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_umul(&r, a, b));
	ASSERT_NO_INTEGER_OVERFLOW(safe_umul(&r, r, c));
	return r;
}

inline uint64_t SafeUMul3(uint64_t a, uint64_t b, uint64_t c)
{
	uint64_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_umul(&r, a, b));
	ASSERT_NO_INTEGER_OVERFLOW(safe_umul(&r, r, c));
	return r;
}

inline uint32_t SafeUAdd(uint32_t a, uint32_t b)
{
	uint32_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_uadd(&r, a, b));
	return r;
}

inline uint64_t SafeUAdd(uint64_t a, uint64_t b)
{
	uint64_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_uadd(&r, a, b));
	return r;
}

inline uint64_t SafeUAdd(uint64_t a, int64_t b)
{
	uint64_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_uadd(&r, a, b));
	return r;
}

inline uint32_t SafeUSub(uint32_t a, uint32_t b)
{
	uint32_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_usub(&r, a, b));
	return r;
}

inline uint64_t SafeUSub(uint64_t a, uint64_t b)
{
	uint64_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_usub(&r, a, b));
	return r;
}

inline uint64_t SafeUSub(uint64_t a, int64_t b)
{
	uint64_t r;
	ASSERT_NO_INTEGER_OVERFLOW(safe_usub(&r, a, b));
	return r;
}

#pragma GCC diagnostic pop


)(nil), "elys.parameter.MsgUpdateTotalBlocksPerYear")
	proto.RegisterType((*MsgUpdateTotalBlocksPerYearResponse)(nil), "elys.parameter.MsgUpdateTotalBlocksPerYearResponse")
	proto.RegisterType((*MsgUpdateRewardsDataLifetime)(nil), "elys.parameter.MsgUpdateRewardsDataLifetime")
	proto.RegisterType((*MsgUpdateRewardsDataLifetimeResponse)(nil), "elys.parameter.MsgUpdateRewardsDataLifetimeResponse")
	proto.RegisterType((*MsgUpdateTakerFees)(nil), "elys.parameter.MsgUpdateTakerFees")
	proto.RegisterType((*MsgUpdateTakerFeesResponse)(nil), "elys.parameter.MsgUpdateTakerFeesResponse")
}

func init() { proto.RegisterFile("elys/parameter/tx.proto", fileDescriptor_9d997b2afb1f3cab) }

var fileDescriptor_9d997b2afb1f3cab = []byte{
	// 822 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4d, 0x6f, 0xe3, 0x54,
	0x14, 0x8d, 0xe7, 0x03, 0x98, 0x27, 0x51, 0x18, 0xb7, 0x21, 0x19, 0x4f, 0x49, 0x33, 0xa6, 0x53,
	0x46, 0x19, 0x62, 0x2b, 0x19, 0x60, 0xa4, 0xec, 0xda, 0x46, 0x48, 0x15, 0xad, 0x54, 0xa5, 0x80,
	0x80, 0x2e, 0xac, 0x17, 0xe7, 0xc6, 0xb5, 0x62, 0xfb, 0x59, 0xef, 0x3d, 0xf2, 0x21, 0x21, 0x81,
	0x58, 0xb2, 0xe2, 0xa7, 0x74, 0xd1, 0x25, 0x12, 0xdb, 0x8a, 0x55, 0xd5, 0x15, 0xb0, 0xa8, 0x50,
	0x8b, 0xd4, 0xbf, 0x81, 0xfc, 0xf5, 0xf2, 0x65, 0x77, 0xda, 0x6c, 0xda, 0xd8, 0xe7, 0xbc, 0x73,
	0xef, 0x39, 0xba, 0xbe, 0x36, 0x2a, 0x80, 0x33, 0x62, 0xba, 0x8f, 0x29, 0x76, 0x81, 0x03, 0xd5,
	0xf9, 0x50, 0xf3, 0x29, 0xe1, 0x44, 0x5e, 0x0a, 0x00, 0x4d, 0x00, 0xca, 0x8a, 0x45, 0x2c, 0x12,
	0x42, 0x7a, 0xf0, 0x2b, 0x62, 0x29, 0x05, 0x93, 0x30, 0x9


MARK)
                assertThat("marking a card twice disables the mark", !isDisplayingMark)
            }
        }

    @Test
    @Flaky(OS.ALL) // had a flake on Windows due to flipOrAnswerCard, let's not block the release
    fun `changing deck refreshes card`() =
        runReviewer(cards = listOf("One", "Two")) {
            val nonDefaultDeck = addDeck("Hello")
            assertThat("first card is shown", this.cardContent, containsString("One"))
            flipOrAnswerCard(Rating.GOOD)
            // answer good, 'Rating.GOOD' should now be < 10m
            assertThat("initial time is 10m", this.getCardDataForJsApi().nextTime3, equalTo("<\u206810\u2069m"))
            flipOrAnswerCard(Rating.GOOD)
            assertThat("next card is shown", this.cardContent, containsString("Two"))

            undoableOp { col.setDeck(listOf(currentCard!!.id), nonDefaultDeck) }

            flipOrAnswerCard(Rating.GOOD)
            assertThat("buttons should be updated", this.getCardDataForJsApi().nextTime3, equalTo("\u20681\u2069d"))
            assertThat("content should be updated", this.cardContent, containsString("One"))
        }

    private fun toggleWhiteboard(reviewer: ReviewerForMenuItems) {
        reviewer.toggleWhiteboard()

        assumeTrue("Whiteboard should now be enabled", reviewer.prefWhiteboard)

        advanceRobolectricLooper()
    }

    private fun disableAllReviewerAppBarButtons() {
        val keys = PreferenceTestUtils.getAllCustomButtonKeys(targetContext)

        val preferences = targetContext.sharedPrefs()

        preferences.edit {
            for (k in keys) {
                putString(k, ActionButtonStatus.MENU_DISABLED.toString())
            }
        }
    }

    private fun assertCurrentOrdIsNot(
        r: Reviewer,
        @Suppress("SameParameterValue") i: Int,
    ) {
        advanceRobolectricLooper()
        val ord = r.currentCard!!.ord

        assertThat("Unexpected card ord", ord + 1, not(equalTo(i)))
    }

    private fun undo(reviewer: Reviewer) {
        reviewer.undo()
    }

    @Suppress("SameParameterValue")
    private fun assertCounts(
        r: Reviewer,
        newCount: Int,
        stepCount: Int,
        revCount: Int,
    ) = runTest {
        val jsApi = r.jsApi
        val countList =
            listOf(
                getDataFromRequest("newCardCount", jsApi),
                getDataFromRequest("lrnCardCount", jsApi),
                getDataFromRequest("revCardCount", jsApi),
            )
        val expected =
            listOf(
                formatApiResult(newCount),
                formatApiResult(stepCount),
                formatApiResult(revCount),
            )
        assertThat(
            countList.toString(),
            equalTo(expected.toString()),
        ) // We use toString as hamcrest does not print the whole array and stops at [0].
    }

    private fun answerCardOrdinalAsGood(
        r: Reviewer,
        i: Int,
    ) {
        assertCurrentOrdIs(r, i)

        r.answerCard(Rating.GOOD)

        advanceRobolectricLooper()
    }

    private fun assertCurrentOrdIs(
        r: Reviewer,
        i: Int,
    ) {
        advanceRobolectricLooper()
        val ord = r.currentCard!!.ord

        assertThat("Unexpected card ord", ord + 1, equalTo(i))
    }

    @Throws(ConfirmModSchemaException::class)
    @KotlinCleanup("use a assertNotNull which returns rather than !!")
    private fun addNoteWithThreeCards() {
        var notetype = col.notetypes.copy(col.notetypes.current())
        notetype.name = "Three"
        col.notetypes.add(notetype)
        notetype = col.notetypes.byName("Three")!!

        cloneTemplate(col.notetypes, notetype, "1")


/*
  WCSCAT: wchar_t *wcscat (wchar_t *ws1, const wchar_t *ws2);
*/

#define TST_FUNCTION wcscat

#include "tsp_common.c"
#include "dat_wcscat.c"

int
tst_wcscat (FILE * fp, int debug_flg)
{
  TST_DECL_VARS (wchar_t *);
  wchar_t *ws1, *ws2, *ws_ex;
  int i, err;

  TST_DO_TEST (wcscat)
  {
    TST_HEAD_LOCALE (wcscat, S_WCSCAT);
    TST_DO_REC (wcscat)
    {
      TST_GET_ERRET (wcscat);
      ws1 = TST_INPUT (wcscat).ws1;	/* external value: size WCSSIZE */
      ws2 = TST_INPUT (wcscat).ws2;

      TST_CLEAR_ERRNO;
      ret = wcscat (ws1, ws2);
      TST_SAVE_ERRNO;

      TST_IF_RETURN (S_WCSCAT)
      {
	if (ret == ws1)
	  {
	    Result (C_SUCCESS, S_WCSCAT, CASE_3, MS_PASSED);
	  }
	else
	  {
	    err_count++;
	    Result (C_FAILURE, S_WCSCAT, CASE_3,
		    "the return address may not be correct");
	  }
      }

      /* function specific test cases here */

      if (ret == ws1)
	{
	  ws_ex = TST_EXPECT (wcscat).ws;
	  for (err = 0, i = 0;
	       (ws1[i] != 0L || ws_ex[i] != 0L) && i < WCSSIZE; i++)
	    {
	      if (debug_flg)
		{
		  fprintf (stdout, "tst_wcscat() : ws1[%d] = 0x%lx\n", i,
			   (unsigned long int) ws1[i]);
		}

	      if (ws1[i] != ws_ex[i])
		{
		  err++;
		  err_count++;
		  Result (C_FAILURE, S_WCSCAT, CASE_4,
			  "concatinated string is different from an "
			  "expected string");
		  break;
		}
	    }

	  if (!err)
	    {
	      Result (C_SUCCESS, S_WCSCAT, CASE_4, MS_PASSED);
	    }
	}
    }
  }

  return err_count;
}


ExpessionEl.getValue().trim();
			if (StringHelper.containsNonWhitespace(scoreExp)) {

				CourseEditorEnv cev = euce.getCourseEditorEnv();
				ConditionExpression ce = new ConditionExpression("score",scoreExp);
				ConditionErrorMessage[] cerrmsgs = cev.validateConditionExpression(ce);

				if (cerrmsgs != null && cerrmsgs.length>0) {
					setError(ureq, scoreExpessionEl, cerrmsgs);
					allOk &= false;
				}
			}
		}

		passedNodesEl.clearError();
		if (passedNodesEl.isVisible()) {
			if (passedTypeEl.getSelectedKey().equals(ScoreCalculator.PASSED_TYPE_INHERIT)) {
				if (passedNodesEl.getSelectedKeys().isEmpty()) {
					passedNodesEl.setErrorKey("scform.passedNodeIndents.error");
					allOk &= false;
				} else if (passedNodesEl.getSelectedKeys().contains(DELETED_NODE_IDENTIFYER)) {
					passedNodesEl.setErrorKey("scform.deletedNode.error");
					allOk &= false;
				}
			} else if (passedTypeEl.getSelectedKey().equals(ScoreCalculator.PASSED_TYPE_CUTVALUE)) {
				if (!configEl.isKeySelected(KEY_SCORE_ENABLED)) {
					passedTypeEl.setErrorKey("scform.passedType.error");
					allOk &= false;
				}
			}
		}

		passedExpressionEl.clearError();
		passedExpressionEl.setExampleKey("rules.example", EXAMPLE_PASSED);
		if (passedExpressionEl.isVisible()) {
			String passedExp = passedExpressionEl.getValue().trim();
			if (StringHelper.containsNonWhitespace(passedExp)) {

				CourseEditorEnv cev = euce.getCourseEditorEnv();
				ConditionExpression ce = new ConditionExpression("passed",passedExp);
				ConditionErrorMessage[] cerrmsgs = cev.validateConditionExpression(ce);

				if (cerrmsgs != null && cerrmsgs.length>0) {
					setError(ureq, passedExpressionEl,  cerrmsgs);
					allOk &= false;
				}
			}
		}

		numberOfNodesToPassEl.clearError();
		if(numberOfNodesToPassEl.isVisible()) {
			int numOfNodes = passedNodesEl.getSelectedKeys().size();
			if(StringHelper.containsNonWhitespace(numberOfNodesToPassEl.getValue())) {
				try {
					int numOfNodesToPass = Integer.parseInt(numberOfNodesToPassEl.getValue());
					if(numOfNodesToPass <= 0) {
						numberOfNodesToPassEl.setErrorKey("form.error.positive.integer");
						allOk &= false;
					} else if(numOfNodesToPass > numOfNodes) {
						numberOfNodesToPassEl.setErrorKey("scform.number.nodes.to.pass.error");
						allOk &= false;
					}
				} catch(Exception e) {
					numberOfNodesToPassEl.setErrorKey("form.error.positive.integer");
					allOk &= false;
				}
			} else {
				numberOfNodesToPassEl.setErrorKey("form.legende.mandatory");
				allOk &= false;
			}
		}

		return allOk;
	}

	private void setError(UserRequest ureq, FormItem fi, ConditionErrorMessage[] cem) {
		Translator conditionTranslator = Util.createPackageTranslator(Condition.class, ureq.getLocale());

		//Set the generic error message...
		fi.setErrorKey("rules.error", conditionTranslator.translate(cem[0].getErrorKey(), cem[0].getErrorKeyParams()));
		if (cem[0].getSolutionMsgKey() != null && !"".equals(cem[0].getSolutionMsgKey())) {
			// ...and a hint or example to clarify the error message
			fi.setExampleKey("rules.error", new String[] {
					conditionTranslator.


const float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n  float x = lnglat.x;\n  float y = clamp(lnglat.y, -89.9, 89.9);\n  return vec2(\n    radians(x) + PI,\n    PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n  ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n  xy /= WORLD_SCALE;\n  return degrees(vec2(\n    xy.x - PI,\n    atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n  ));\n}\n/* End projection utils */\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n  float luminance = (color.r + color.g + color.b) * 0.333333333;\n  return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n  return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n  if (transparentColor.a == 0.0) {\n    return vec4(color, alpha);\n  }\n  float blendedAlpha = alpha + transparentColor.a * (1.0 - alpha);\n  float highLightRatio = alpha / blendedAlpha;\n  vec3 blendedRGB = mix(transparentColor.rgb, color, highLightRatio);\n  return vec4(blendedRGB, blendedAlpha);\n}\n\nvec2 getUV(vec2 pos) {\n  return vec2(\n    (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n    (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n  );\n}\n\n".concat("\nvec3 packUVsIntoRGB(vec2 uv) {\n  // Extract the top 8 bits. We want values to be truncated down so we can add a fraction\n  vec2 uv8bit = floor(uv * 256.);\n\n  // Calculate the normalized remainders of u and v parts that do not fit into 8 bits\n  // Scale and clamp to 0-1 range\n  vec2 uvFraction = fract(uv * 256.);\n  vec2 uvFraction4bit = floor(uvFraction * 16.);\n\n  // Remainder can be encoded in blue channel, encode as 4 bits for pixel coordinates\n  float fractions = uvFraction4bit.x + uvFraction4bit.y * 16.;\n\n  return vec3(uv8bit, fractions) / 255.;\n}\n","\n\nvoid main(void) {\n  vec2 uv = vTexCoord;\n  if (coordinateConversion < -0.5) {\n    vec2 lnglat = mercator_to_lnglat(vTexPos);\n    uv = getUV(lnglat);\n  } else if (coordinateConversion > 0.5) {\n    vec2 commonPos = lnglat_to_mercator(vTexPos);\n    uv = getUV(commonPos);\n  }\n  vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n  gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n  geometry.uv = uv;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n  if (picking_uActive) {\n    // Since instance information is not used, we can use picking color for pixel index\n    gl_FragColor.rgb = packUVsIntoRGB(uv);\n  }\n}\n");function R(t,e){var n=Object.keys(t);if(Object.getOwnPrope


 When the convex hulls overlap, we don't know anything.
  XLS_ASSERT_OK(engine.ReplaceGiven(
      x.node(), BitsLTT(x.node(), {
                                      Interval(UBits(100, 20), UBits(200, 20)),
                                      Interval(UBits(550, 20), UBits(600, 20)),
                                      Interval(UBits(850, 20), UBits(900, 20)),
                                  })));
  XLS_ASSERT_OK(engine.ReplaceGiven(
      y.node(), BitsLTT(y.node(), {Interval(UBits(400, 20), UBits(500, 20)),
                                   Interval(UBits(700, 20), UBits(800, 20))})));
  EXPECT_EQ("0bX", engine.ToString(expr.node()));
}

TEST_F(PartialInfoQueryEngineTest, SMul) {
  auto p = CreatePackage();
  FunctionBuilder fb(TestName(), p.get());

  BValue x = fb.Param("x", p->GetBitsType(8));
  BValue y = fb.Param("y", p->GetBitsType(8));
  BValue expr = fb.SMul(x, y, 8);

  XLS_ASSERT_OK_AND_ASSIGN(Function * f, fb.Build());
  PartialInfoQueryEngine engine;
  XLS_ASSERT_OK(engine.Populate(f));
  XLS_ASSERT_OK(engine.ReplaceGiven(
      x.node(), BitsLTT(x.node(), {Interval(SBits(-2, 8), SBits(-1, 8)),
                                   Interval(UBits(0, 8), UBits(2, 8))})));
  XLS_ASSERT_OK(engine.ReplaceGiven(
      y.node(), BitsLTT(y.node(), {Interval(UBits(10, 8), UBits(20, 8))})));

  // Unsigned multiplication is monotone-monotone.
  EXPECT_EQ(engine.GetIntervals(expr.node()).Get({}),
            CreateIntervalSet(8, {{-40, -10}, {0, 0}, {10, 40}}));
}

TEST_F(PartialInfoQueryEngineTest, UMul) {
  auto p = CreatePackage();
  FunctionBuilder fb(TestName(), p.get());

  BValue x = fb.Param("x", p->GetBitsType(7));
  BValue y = fb.Param("y", p->GetBitsType(7));
  BValue expr = fb.UMul(x, y, 14);
  BValue overflow = fb.UMul(x, y, 12);
  BValue overflow2 = fb.UMul(x, y, 8);

  XLS_ASSERT_OK_AND_ASSIGN(Function * f, fb.Build());
  PartialInfoQueryEngine engine;
  XLS_ASSERT_OK(engine.Populate(f));
  XLS_ASSERT_OK(engine.ReplaceGiven(
      x.node(), BitsLTT(x.node(), {Interval(UBits(50, 7), UBits(100, 7))})));
  XLS_ASSERT_OK(engine.ReplaceGiven(
      y.node(), BitsLTT(y.node(), {Interval(UBits(10, 7), UBits(20, 7))})));

  // Unsigned multiplication is monotone-monotone.
  EXPECT_EQ(engine.GetIntervals(expr.node()).Get({}),
            CreateIntervalSet(14, {{500, 2000}}));

  XLS_ASSERT_OK(engine.ReplaceGiven(
      x.node(), BitsLTT(x.node(), {Interval(UBits(62, 7), UBits(67, 7))})));
  XLS_ASSERT_OK(engine.ReplaceGiven(
      y.node(), BitsLTT(y.node(), {Interval(UBits(61, 7), UBits(70, 7))})));

  // If the multiplication can overflow without covering the whole range.
  // 62 * 61 == 3782, 67 * 70 == 4690, 1 << 12 == 4096
  // Overflows top once but not bottom so range can be split
  EXPECT_EQ(engine


n",subLanguageMode:"continuous"},e.CLCM,e.CBCM,{cN:"class",bK:"class interface",e:"{",eE:!0,c:[{bK:"extends implements"},e.UTM]},e.CNM,{cN:"annotation",b:"@[A-Za-z]+"},{b:"=>"}]}});! function(e) {
	"use strict";

	function t(t) {
		t ? e(".right-sidebar-mini").addClass("right-sidebar") : e(".right-sidebar-mini").removeClass("right-sidebar")
		t ? e("body").addClass("right-sidebar-close") : e("body").removeClass("right-sidebar-close")
	}
	e(document).ready(function() {
		var a = !1;
		t(a), e(document).on("click", ".right-sidebar-toggle", function() {
			t(a = !a)
		})
	})
}(jQuery);
var options = {
	chart: {
		height: 80,
		type: "area",
		sparkline: {
			enabled: !0
		},
		group: "sparklines"
	},
	dataLabels: {
		enabled: !1
	},
	stroke: {
		width: 3,
		curve: "smooth"
	},
	fill: {
		type: "gradient",
		gradient: {
			shadeIntensity: 1,
			opacityFrom: .5,
			opacityTo: 0
		}
	},
	series: [{
		name: "series1",
		data: [60, 15, 50, 30, 70]
	}],
	colors: ["#827af3"],
	xaxis: {
		type: "datetime",
		categories: ["2018-08-19T00:00:00", "2018-09-19T01:30:00", "2018-10-19T02:30:00", "2018-11-19T01:30:00", "2018-12-19T01:30:00"]
	},
	tooltip: {
		x: {
			format: "dd/MM/yy HH:mm"
		}
	}
};
jQuery("#chart-1").length && (chart = new ApexCharts(document.querySelector("#chart-1"), options)).render();
options = {
	chart: {
		height: 80,
		type: "area",
		sparkline: {
			enabled: !0
		},
		group: "sparklines"
	},
	dataLabels: {
		enabled: !1
	},
	stroke: {
		width: 3,
		curve: "smooth"
	},
	fill: {
		type: "gradient",
		gradient: {
			shadeIntensity: 1,
			opacityFrom: .5,
			opacityTo: 0
		}
	},
	series: [{
		name: "series1",
		data: [70, 40, 60, 30, 60]
	}],
	colors: ["#b47af3"],
	xaxis: {
		type: "datetime",
		categories: ["2018-08-19T00:00:00", "2018-09-19T01:30:00", "2018-10-19T02:30:00", "2018-11-19T01:30:00", "2018-12-19T01:30:00"]
	},
	tooltip: {
		x: {
			format: "dd/MM/yy HH:mm"
		}
	}
};
jQuery("#chart-2").length && (chart = new ApexCharts(document.querySelector("#chart-2"), options)).render();
options = {
	chart: {
		height: 80,
		type: "area",
		sparkline: {
			enabled: !0
		},
		group: "sparklines"
	},
	dataLabels: {
		enabled: !1
	},
	stroke: {
		width: 3,
		curve: "smooth"
	},
	fill: {
		type: "gradient",
		gradient: {
			shadeIntensity: 1,
			opacityFrom: .5,
			opacityTo: 0
		}
	},
	series: [{
		name: "series1",
		data: [60, 40, 60, 40, 70]
	}],
	colors:


"""
XA example for the KST201 controllers
Date of Creation(YYYY-MM-DD): 2025-08-15
Date of Last Modification on Github: 2025-08-20
Python Version Used: python 3.13.3
XA software version: 1.2.7
"""

import time

from xa_sdk.native_sdks.xa_sdk import XASDK
from xa_sdk.shared.tlmc_type_structures import *
from xa_sdk.shared.xa_error_factory import XADeviceException
from xa_sdk.products.kst201 import KST201

def main():
    try:
        # Create XASDK object and startup XA system.
        XASDK.try_load_library(__file__)
        XASDK.startup("")

        # Create device object and enable channel.
        device = KST201("26250194", "", TLMC_OperatingModes.Default)
        device.set_enable_state(TLMC_ChannelEnableStates.ChannelEnabled)

        # Get Connected controller part number and available methods.
        print("Device part number is:", device.get_hardware_info(TLMC_Wait.TLMC_InfiniteWait).part_number)
        device.get_method_list()

        # Get list of available stages/actuators and set the apropriate motor profile.
        print("Compatible products:\n", device.get_connected_products_supported())
        device.set_connected_product("ZFS13")

        # Convert unit methods used to work in real world units.
        new_val = device.convert_from_physical_to_device(TLMC_ScaleType.TLMC_ScaleType_Distance, TLMC_Unit.TLMC_Unit_Millimetres, 13)
        new_val = device.convert_from_device_units_to_physical(TLMC_ScaleType.TLMC_ScaleType_Distance, 54613333)
        print("New converted value is:", new_val.converted_value, "Unit:", new_val.unit)

        device.home(TLMC_Wait.TLMC_InfiniteWait)
        time.sleep(1)
        device.set_move_relative_params(new_val)
        device.move_relative(TLMC_MoveModes.MoveMode_RelativeByProgrammedDistance, TLMC_Wait.TLMC_Unused ,TLMC_Wait.TLMC_InfiniteWait)
        print("New current position is", device.get_position_counter(TLMC_Wait.TLMC_InfiniteWait))

        # Close device and shutdown XA system.
        device.disconnect()
        device.close()
        XASDK.shutdown()

    except XADeviceException as e:
        device.close()
        print(e.error_code)
        XASDK.shutdown()

main()


 {
            var offer = this.doc.offerList.firstOrNull { it.offerType == Common.Offer.TYPE.TYPE_1_VALUE }
            if (offer == null) {
                offer = Common.Offer.getDefaultInstance()
            }
            return offer!!
        }

    val purchaseOffer: Common.Offer?
        get() = this.doc.annotations?.purchaseHistoryDetails?.offer

    val purchaseTimestampMillis: Long?
        get() = this.doc.annotations?.purchaseHistoryDetails?.purchaseTimestampMillis

    val purchaseStatus: String?
        get() = this.doc.annotations?.purchaseHistoryDetails?.purchaseStatus

    val iconUrl: String?
        get() {
            val images = this.imageTypeMap.get(4) ?: return null
            return if (images.isNotEmpty()) {
                images[0].imageUrl
            } else null
        }

    private val imageTypeMap: SparseArray<MutableList<Common.Image>> by lazy {
        val typeMap = SparseArray<MutableList<Common.Image>>()
        for (image2 in this.doc.imageList) {
            val imageType = image2.imageType
            if (typeMap.get(imageType) == null) {
                typeMap.put(imageType, mutableListOf())
            }
            typeMap.get(imageType).add(image2)
        }
        typeMap
    }
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    // Define versions in a single place
    extra.apply {
        // https://developer.android.com/jetpack/androidx/releases/wear-compose
        set("wear_compose_version", "1.4.1")
        // https://developer.android.com/jetpack/androidx/releases/compose
        set("compose_version", "1.8.3")
        set("compose_compiler_version", "1.5.15")
        // https://developer.android.com/jetpack/androidx/releases/activity
        set("compose_activity_version", "1.10.1")
        // https://developer.android.com/jetpack/androidx/releases/compose-material3
        set("compose_material_version", "1.3.2")
        // https://developer.android.com/jetpack/androidx/releases/wear-tiles
        set("wear_tiles_version", "1.5.0")
    }
    repositories {
        google()
        mavenCentral()
        maven {
            setUrl("https://jitpack.io")
        }
    }
    dependencies {
        classpath("com.android.tools.build:gradle:8.11.1")
        classpath(kotlin("gradle-plugin", version = "2.2.0"))

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { setUrl("https://jitpack.io") }
    }
}

tasks.register("clean", Delete::class) {
    delete(layout.buildDirectory)
}package host.stjin.anonaddy_shared.managers

import android.app.ActivityManager
import android.content.Context
import android.content.SharedPreferences
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import androidx.preference.PreferenceManager
import androidx.security.crypto.EncryptedSharedPreferences
import androidx.security.crypto.MasterKey
import androidx.


"While loading qualifier preset file ({presetFn})");
            }
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            // fill listbox
            ListBoxPresets.Items.Clear();
            foreach (var p in thePresets)
                ListBoxPresets.Items.Add("" + p.name);
        }

        //
        // Outer
        //

        public void ControlStart()
        {
        }

        public void ControlPreviewKeyDown(KeyEventArgs e)
        {
        }

        public void LambdaActionAvailable(AnyUiLambdaActionBase la)
        {
        }

        //
        // Mechanics
        //

        private bool PrepareResult()
        {
            var i = ListBoxPresets.SelectedIndex;
            if (thePresets != null && i >= 0 && i < thePresets.Count)
            {
                DiaData.ResultQualifier = thePresets[i].qualifier;
                return true;
            }

            // uups
            return false;
        }

        private void ButtonSelect_Click(object sender, RoutedEventArgs e)
        {
            if (PrepareResult())
            {
                DiaData.Result = true;
                ControlClosed?.Invoke();
            }
        }

        private void ButtonClose_Click(object sender, RoutedEventArgs e)
        {
            DiaData.Result = false;
            DiaData.ResultQualifier = null;
            ControlClosed?.Invoke();
        }

        private void ListBoxPresets_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (PrepareResult())
            {
                DiaData.Result = true;
                ControlClosed?.Invoke();
            }
        }
    }
}


verflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# ä¸‹è½½å®‰è£…è„šæœ¬\ncurl -O https://raw.githubusercontent.com/mcp2everything/mcp2mqtt/main/install_ubuntu.py\n\n# è¿è¡Œå®‰è£…ï¿½ï¿½ï¿½æœ¬\npython3 install_ubuntu.py\"\u003e\u003cpre\u003e\u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e ä¸‹è½½å®‰è£…è„šæœ¬\u003c/span\u003e\ncurl -O https://raw.githubusercontent.com/mcp2everything/mcp2mqtt/main/install_ubuntu.py\n\n\u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e è¿è¡Œå®‰è£…è„šæœ¬\u003c/span\u003e\npython3 install_ubuntu.py\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eå®‰è£…è„šæœ¬ä¼šè‡ªåŠ¨å®Œæˆä»¥ä¸‹æ“ä½œï¼š\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eæ£€æŸ¥ç³»ç»ŸçŽ¯å¢ƒ\u003c/li\u003e\n\u003cli\u003eå®‰è£…å¿…è¦çš„ä¾èµ–\u003c/li\u003e\n\u003cli\u003eåˆ›å»ºé»˜è®¤é…ç½®æ–‡ä»¶\u003c/li\u003e\n\u003cli\u003eé…ç½®Claudeæ¡Œé¢ç‰ˆï¼ˆå¦‚æžœå·²å®‰è£…ï¼‰\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eæ‰‹åŠ¨åˆ†æ¥å®‰è£…ä¾èµ–\u003c/h3\u003e\u003ca id=\"user-content-æ‰‹åŠ¨åˆ†æ¥å®‰è£…ä¾èµ–\" class=\"anchor\" aria-label=\"Permalink: æ‰‹åŠ¨åˆ†æ¥å®‰è£…ä¾èµ–\" href=\"#æ‰‹åŠ¨åˆ†æ¥å®‰è£…ä¾èµ–\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.


     var boundaries = Array.Empty<string>();

            IEnumerable<string> specifiedBoundaries;
            CompositionContract unwrapped;
            if (exportFactoryContract.TryUnwrapMetadataConstraint(Constants.SharingBoundaryImportMetadataConstraintName, out specifiedBoundaries, out unwrapped))
            {
                productContract = unwrapped.ChangeType(typeof(TProduct));
                boundaries = (specifiedBoundaries ?? Array.Empty<string>()).ToArray();
            }

            var metadataProvider = MetadataViewProvider.GetMetadataViewProvider<TMetadata>();

            return definitionAccessor.ResolveDependencies("product", productContract, false)
                .Select(d => new ExportDescriptorPromise(
                    exportFactoryContract,
                    typeof(ExportFactory<TProduct, TMetadata>).Name,
                    false,
                    () => new[] { d },
                    _ =>
                    {
                        var dsc = d.Target.GetDescriptor();
                        return ExportDescriptor.Create((c, o) =>
                        {
                            return new ExportFactory<TProduct, TMetadata>(() =>
                            {
                                var lifetimeContext = new LifetimeContext(c, boundaries);
                                return Tuple.Create<TProduct, Action>((TProduct)CompositionOperation.Run(lifetimeContext, dsc.Activator), lifetimeContext.Dispose);
                            },
                            metadataProvider(dsc.Metadata));
                        },
                        dsc.Metadata);
                    }))
                .ToArray();
        }
    }
}


 45.526554],
 *   [-122.669906, 45.507309],
 *   [-122.723464, 45.446643],
 *   [-122.532577, 45.408574],
 *   [-122.487258, 45.477466],
 *   [-122.520217, 45.535693]
 * ]]);
 *
 * var intersection = turf.intersect(poly1, poly2);
 *
 * //addToMap
 * var addToMap = [poly1, poly2, intersection];
 */
export default function intersect<P = Properties>(poly1: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon, poly2: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon, options?: {
    properties?: P;
}): Feature<Polygon | MultiPolygon, P> | null;
import {Response} from 'express-serve-static-core';

export class HttpResponse implements IHttpResponse {
  statusCode: number;
  body: any;
  headers: any;

  constructor(body: any, statusCode: number) {
    this.headers = {
      'Content-Type': 'application/json',
    };
    this.body = body;
    this.statusCode = statusCode;
  }

  send(r: Response) {
    r
      .set(this.headers)
      .status(this.statusCode)
      .send(this.body);
  }

}

interface IHttpResponse {
  body: any;
  headers: any;
  statusCode: number;
}
import * as Canvas from 'canvas';
import Key from './key';
import fs = require('fs');
import mkdirp = require('mkdirp');

/**
 * @file 切割文件
 * @TODO: cluster 多进程改造, remode 异步化改造
 */

const noop = function() {};

/**
 * 存储文件 (async)
 * @param {Image} img 瓦片图
 * @param {string} name 图片名
 */
function saveImg(img, name) {
    const base64 = img.replace(/^data:image\/\w+;base64,/, '');
    const buffer = new Buffer(base64, 'base64');

    fs.writeFile(name, buffer, noop);
}

/**
 * 瓦片化 (async)
 * @param {Image} img 当前位面图
 * @param {number} rect 瓦片尺寸
 * @param {number} x 起始 x 位置
 * @param {number} y 起始 y 位置
 * @param {number} width 裁剪尺寸
 * @param {number} quality 图片质量
 * @param {string} name 图片名
 */
function drawImg(img, rect, x, y, width, quality, name) {
    const canvas = new Canvas(rect, rect);
    const ctx = canvas.getContext('2d');

    ctx.drawImage(img, x, y, width, width, 0, 0, rect, rect);
    canvas.toDataURL('image/jpeg', quality, function (err, img) {
        !err && saveImg(img, name);
    });
}

function calcOpts(level) {
    return {size: 1600, limit: 1, rect: level == 1 ? 800 : 400};
}

/**
 * 重新构建图片
 * @param path 路径
 * @param key 六面体编号
 * @param opts 选项
 * @param level 级别
 */
function remodeImg(path, key, opts, level) {
    const size = opts.size;
    const rect = opts.rect;
    const buffer = fs.readFileSync(`${path}/${key}.jpg`);
    const img = new Canvas.Image();
    img.src = buffer;

    // level 0: only compress quality
    if (level == 0) {
        const canvas = new Canvas(size, size);


t_book: Option<Book>,
    current_entry: Option<Entry>,
    content: String,
    books: Vec<Book>,
}

impl Reader {
    pub fn new() -> Reader {
        Reader {
            current_book: None,
            current_entry: None,
            content: String::new(),
            books: Vec::<Book>::new(),
        }
    }

    pub fn read(&mut self, file: &mut File) -> Vec<Book> {
        file.seek(SeekFrom::Start(0)).unwrap();

        let reader = BufReader::new(file);

        let book_regex = Regex::new("^== (.+) == (.+) ==$").unwrap();
        let entry_regex = Regex::new("^== (.+) ==$").unwrap();

        for line in reader.lines() {
            let line = line.unwrap();

            match book_regex.captures(&line) {
                Some(caps) => {
                    self.end_book();

                    let title = caps.at(1).unwrap_or("unknown");
                    let category = caps.at(2).unwrap_or("unknown");
                    self.current_book = Some(Book::new(title, category));

                    continue;
                },
                None => {},
            }

            match entry_regex.captures(&line) {
                Some(caps) => {
                    self.end_entry();
                    self.content.clear();
                    self.current_entry = Some(Entry::new());
                    continue;
                },
                None => {},
            }

            self.content.push_str(&line);
            self.content.push('\n');
        }

        self.end_book();

        self.books.drain(..).collect()
    }

    fn end_book(&mut self) {
        self.end_entry();
        match self.current_book.take() {
            Some(book) => {
                self.books.push(book);
            },
            None => {},
        }
    }

    fn end_entry(&mut self) {
        match self.current_entry.take() {
            Some(mut entry) => {
                entry.set_content(&self.content);

                match self.current_book.as_mut() {
                    Some(book) => {
                        book.add_entry(entry);
                    },
                    None => panic!("Entry not within a book"),
                }
            },
            None => {},
        }
    }
}
use std::collections::BTreeMap;

struct Node<T> {
	val: Option<T>,
	children: Children<T>,
}
type Children<T> = BTreeMap<u8, Node<T>>;

impl<T> Node<T> {
	fn new(val: Option<T>) -> Self {
		Self {
			val,
			children: BTreeMap::new(),
		}
	}
}

pub struct TrieST<T> {
	root: BTreeMap<u8, Node<T>>,
	n: usize,
}
impl<T> Default for TrieST<T> {
	fn default() -> Self {
		Self {
			root: BTreeMap::new(),
			n: 0,
		}
	}
}
impl<T> TrieST<T> {
	pub fn new() -> Self {
		Default::default()
	}
	pub fn size(&self) -> usize {
		self.n
	}
	pub fn is_empty(&self) -> bool {
		self.size() == 0
	}

	pub fn get(&self, key: &[u8]) -> Option<&T> {
		if key.is_empty() {
			return None;
		}
		Self::get_node(&self.root, key, 0).and_then(|node| node.val.as_ref())
	}
	pub fn put(&mut self, key: &[u8], val: T) {
		let mut d = 0;
		let mut p = &mut self.root;
		while d < key.len() {
			if p.get(&key[d]).is_none


 [🖥 Interfaz de Usuario](#-interfaz-de-usuario)
5. [📊 Funcionalidades del Dashboard](#-funcionalidades-del-dashboard)
6. [🔧 Análisis Avanzados](#-análisis-avanzados)
7. [📁 Gestión de Datos](#-gestión-de-datos)
8. [🐛 Solución de Problemas](#-solución-de-problemas)
9. [🔒 Seguridad y Respaldos](#-seguridad-y-respaldos)
10. [📞 Soporte y Contacto](#-soporte-y-contacto)

---

## 🏁 Inicio Rápido

### ⚡ Ejecución en 3 Pasos

```bash
# 1. Clonar el repositorio
git clone https://github.com/usuario/big-data-proyecto.git
cd big-data-proyecto

# 2. Preparar los datos (colocar archivos CSV en la carpeta data/)
cp /ruta/a/tus/datos/*.csv ./data/

# 3. Ejecutar la plataforma
docker-compose up --build
```

### 🌐 Accesos Directos

Una vez iniciado, accede a los siguientes servicios:

| Servicio | URL | Descripción |
|----------|-----|-------------|
| **Dashboard Principal** | [http://localhost:5001](http://localhost:5001) | Interfaz principal de análisis |
| **Jupyter Lab** | [http://localhost:8888](http://localhost:8888) | Notebooks interactivos |
| **Spark UI** | [http://localhost:8080](http://localhost:8080) | Monitoreo de tareas Spark |
| **Base de Datos** | `localhost:5432` | PostgreSQL (admin/password123) |

---

## 📋 Prerrequisitos

### 🖥 Requisitos del Sistema

#### Hardware Mínimo
- **RAM**: 8 GB (recomendado: 16 GB)
- **CPU**: 4 núcleos (recomendado: 8 núcleos)
- **Almacenamiento**: 20 GB libres
- **Red**: Conexión a internet para descargar imágenes Docker

#### Hardware Recomendado
- **RAM**: 16-32 GB
- **CPU**: 8+ núcleos con hyperthreading
- **Almacenamiento**: SSD con 50+ GB libres
- **GPU**: No requerida, pero útil para análisis futuros

### 🛠 Software Requerido

#### Obligatorio
```bash
# Docker Engine 20.10+
docker --version
# Docker Compose 2.0+
docker-compose --version
```

#### Opcional (para desarrollo)
```bash
# Python 3.9+ (para desarrollo local)
python --version
# Git (para control de versiones)
git --version
# IDE recomendado: VS Code, PyCharm, o Jupyter Lab
```

### 📊 Datos Requeridos

La aplicación requiere dos archivos CSV principales:

#### 1. Datos de Contaminación Atmosférica
```yaml
Archivo: data/2009_2022_contaminacion_CDMX.csv
Formato esperado:
  - Fecha: YYYY-MM-DD
  - station: Código de estación
  - elemento: PM25, PM10, O3, NO2, SO2, CO
  - PromedioDia: Concentración promedio diaria (μg/m³)
  - latitude, longitude: Coordenadas geográficas
```

#### 2. Datos de Defunciones
```yaml
Archivo: data/defunciones_inegi_1990_2021.csv
Formato esperado:
  - anio_ocur, mes_ocur, dia_ocur: Fecha de ocurrencia
  - edad: Edad del fallecido
  - sexo: 1=Hombre, 2=Mujer
  - ent_ocurr: Entidad de


from abc import ABCMeta, abstractmethod

class BaseEmbedding(metaclass=ABCMeta):
    """
    Base Embedding interface.
    """

    @abstractmethod
    def to_embeddings(self, data, **kwargs):
        pass

    @property
    @abstractmethod
    def dimension(self) -> int:
        return 0


s file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<title>PKCS12_create</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />

NAME

SYNOPSIS

NOTES

RETURN VALUES

CONFORMING TO

SEE ALSO

HISTORY

COPYRIGHT

NAME

PKCS12_create, PKCS12_create_ex, PKCS12_create_cb, PKCS12_create_ex2 - create a PKCS#12 structure

SYNOPSIS

 #include <openssl/pkcs12.h>

 PKCS12 *PKCS12_create(const char *pass, const char *name, EVP_PKEY *pkey,
                       X509 *cert, STACK_OF(X509) *ca,
                       int nid_key, int nid_cert, int iter, int mac_iter, int keytype);
 PKCS12 *PKCS12_create_ex(const char *pass, const char *name, EVP_PKEY *pkey,
                          X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
                          int iter, int mac_iter, int keytype,
                          OSSL_LIB_CTX *ctx, const char *propq);

 typedef int PKCS12_create_cb(PKCS12_SAFEBAG *bag, void *cbarg);

 PKCS12 *PKCS12_create_ex2(const char *pass, const char *name, EVP_PKEY *pkey,
                           X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
                           int iter, int mac_iter, int keytype,
                           OSSL_LIB_CTX *ctx, const char *propq,
                           PKCS12_create_cb *cb, void *cbarg);
=head1 DESCRIPTION

PKCS12_create() creates a PKCS#12 structure.

pass is the passphrase to use. name is the friendlyName to use for the supplied certificate and key. pkey is the private key to include in the structure and cert its corresponding certificates. ca, if not NULL is an optional set of certificates to also include in the structure.

nid_key and nid_cert are the encryption algorithms that should be used for the key and certificate


4(&self, multiaddr: &Ipv4Addr, interface: &Ipv4Addr) -> io::Result<()> {
        let multiaddr = to_s_addr(multiaddr);
        let interface = to_s_addr(interface);
        let mreq = libc::ip_mreq {
            imr_multiaddr: libc::in_addr { s_addr: multiaddr },
            imr_interface: libc::in_addr { s_addr: interface },
        };
        unsafe { self.setsockopt(libc::IPPROTO_IP, libc::IP_DROP_MEMBERSHIP, mreq) }
    }

    pub fn leave_multicast_v6(&self, multiaddr: &Ipv6Addr, interface: u32) -> io::Result<()> {
        let multiaddr = to_in6_addr(multiaddr);
        let mreq = libc::ipv6_mreq {
            ipv6mr_multiaddr: multiaddr,
            ipv6mr_interface: to_ipv6mr_interface(interface),
        };
        unsafe { self.setsockopt(libc::IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, mreq) }
    }

    pub fn linger(&self) -> io::Result<Option<Duration>> {
        unsafe {
            Ok(linger2dur(self.getsockopt(
                libc::SOL_SOCKET,
                libc::SO_LINGER,
            )?))
        }
    }

    pub fn set_linger(&self, dur: Option<Duration>) -> io::Result<()> {
        unsafe { self.setsockopt(libc::SOL_SOCKET, libc::SO_LINGER, dur2linger(dur)) }
    }

    pub fn set_reuse_address(&self, reuse: bool) -> io::Result<()> {
        unsafe { self.setsockopt(libc::SOL_SOCKET, libc::SO_REUSEADDR, reuse as c_int) }
    }

    pub fn reuse_address(&self) -> io::Result<bool> {
        unsafe {
            let raw: c_int = self.getsockopt(libc::SOL_SOCKET, libc::SO_REUSEADDR)?;
            Ok(raw != 0)
        }
    }

    pub fn recv_buffer_size(&self) -> io::Result<usize> {
        unsafe {
            let raw: c_int = self.getsockopt(libc::SOL_SOCKET, libc::SO_RCVBUF)?;
            Ok(raw as usize)
        }
    }

    pub fn set_recv_buffer_size(&self, size: usize) -> io::Result<()> {
        unsafe {
            // TODO: casting usize to a c_int should be a checked cast
            self.setsockopt(libc::SOL_SOCKET, libc::SO_RCVBUF, size as c_int)
        }
    }

    pub fn send_buffer_size(&self) -> io::Result<usize> {
        unsafe {
            let raw: c_int = self.getsockopt(libc::SOL_SOCKET, libc::SO_SNDBUF)?;
            Ok(raw as usize)
        }
    }

    pub fn set_send_buffer_size(&self, size: usize) -> io::Result<()> {
        unsafe {
            // TODO: casting usize to a c_int should be a checked cast
            self.setsockopt(libc::SOL_SOCKET, libc::SO_SNDBUF, size as c_int)
        }
    }

    pub fn keepalive(&self) -> io::Result<Option<Duration>> {
        unsafe {
            let raw: c_int = self.getsockopt(libc::SOL_SOCKET, libc::SO_KEEPALIVE)?;
            if raw == 0 {
                return Ok(None);
            }
            let secs: c_int = self.getsockopt(libc::IPPROTO_TCP, KEEPALIVE_OPTION)?;
            Ok(Some(Duration::new(secs as u64, 0)))
        }
    }

    pub fn set_keepalive(&self, keepalive: Option<Duration>)


" data-url="aHR0cHM6Ly85OTYuaWN1Lw==" title="https://996.icu/">996.ICU - 工作 996，生病 ICU。

How To Cook - 程序员做饭指南

萌 ICP 备 20235239 号

<link itemprop="mainEntityOfPage" href="https://gal.saop.cc/p/26575/"><meta itemprop="image" content="/img/avatar.webp"><meta itemprop="name" content="Asuna"><meta itemprop="name" content="GGS"><meta itemprop="description" content="LINK START!"><meta itemprop="name" content=" | GGS"><meta itemprop="description" content="">
与小萝莉相思相爱／相思相愛ロリータ／Mutual Love Lolita／相思相爱洛丽塔

 发表于 <time title="创建时间：2024-10-25 03:38:40" itemprop="dateCreated datePublished" datetime="2024-10-25T03:38:40+08:00">2024-10-25</time>  分类于 Windows ， KRKR

<img data-src="https://static.30hb.cn/vndb/img/lol.webp


(Key Codes)
        0x19.toByte(), 0xe0.toByte(),                         //     Usage Minimum (224)
        0x29.toByte(), 0xe7.toByte(),                         //     Usage Maximum (231)
        0x15.toByte(), 0x00.toByte(),                         //     Logical Minimum (0)
        0x25.toByte(), 0x01.toByte(),                         //     Logical Maximum (1)
        0x75.toByte(), 0x01.toByte(),                         //     Report Size (1)
        0x95.toByte(), 0x08.toByte(),                         //     Report Count (8)
        0x81.toByte(), 0x02.toByte(),                         //     Input (Data, Variable, Absolute)

        0x05.toByte(), 0x08.toByte(),						  //      Usage Page (LEDs)
        0x19.toByte(), 0x01.toByte(),						  //      Usage Minimum (Num Lock)
        0x29.toByte(), 0x08.toByte(),						  //      Usage Maximum (Kana + 3 custom)
        0x95.toByte(), 0x08.toByte(),						  //      Report Count (8)
        0x75.toByte(), 0x01.toByte(),						  //      Report Size (1)
        0x91.toByte(), 0x02.toByte(),						  //      Output (Data, Variable, Absolute)

        0x95.toByte(), 0x01.toByte(),                         //     Report Count (1)
        0x75.toByte(), 0x08.toByte(),                         //     Report Size (8)
        0x81.toByte(), 0x01.toByte(),                         //     Input (Constant) reserved byte(1)

        0x95.toByte(), 0x01.toByte(),                         //     Report Count (1)
        0x75.toByte(), 0x08.toByte(),                         //     Report Size (8)
        0x15.toByte(), 0x00.toByte(),                         //     Logical Minimum (0)
        0x25.toByte(), 0x65.toByte(),                         //     Logical Maximum (101)
        0x05.toByte(), 0x07.toByte(),                         //     Usage Page (Key codes)
        0x19.toByte(), 0x00.toByte(),                         //     Usage Minimum (0)
        0x29.toByte(), 0x65.toByte(),                         //     Usage Maximum (101)
        0x81.toByte(), 0x00.toByte(),                         //     Input (Data, Array) Key array(6 bytes)
        0xc0.toByte()                                         // End Collection (Application)
    )

    val SDP_RECORD = BluetoothHidDeviceAppSdpSettings(
        "Keyboard Input",
        "HID Device",
        "Android",
        BluetoothHidDevice.SUBCLASS1_KEYBOARD,
        KEYBOARD
    )

    val QOS_OUT = BluetoothHidDeviceAppQosSettings(
        BluetoothHidDeviceAppQosSettings.SERVICE_BEST_EFFORT,
        800,
        9,
        0,
        11250,
        BluetoothHidDeviceAppQosSettings.MAX
    )
}
/* Telegram_Backup
 * Copyright (C) 2016 Fabian Schlenz
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>. */

package de.fabianonline.telegram_backup

import de.fabianonline.telegram_backup.CommandLineController
import de.fabianonline.telegram_backup.Utils
import de.fabianonline.telegram_backup.Version
import java.util.concurrent.TimeUnit
import org.slf4j.LoggerFactory
import ch.


StaticPos + 1] != c2 ||
		//     ...)
		// {
		//     goto doneLabel;
		// }
		c.write("if ")
		if emitLengthCheck {
			c.write(spanLengthCheck(rm, iterations, nil))
			c.writeLine(" ||")
		}
		c.emitExecuteSingleChar(rm, node, false, nil, true)
		for i := 1; i < iterations; i++ {
			c.writeLine(" ||")
			c.emitExecuteSingleChar(rm, node, false, nil, true)
		}
		c.writeLine(" {")
		c.emitExecuteGoto(rm, rm.doneLabel)
		c.writeLine("}")
	} else {
		// if ((uint)(sliceStaticPos + iterations - 1) >= (uint)slice.Length) goto doneLabel;
		if emitLengthCheck {
			c.emitSpanLengthCheck(rm, iterations, nil)
			c.writeLine("")
		}

		// If we're able to vectorize the search, do so. Otherwise, fall back to a loop.
		// For the loop, we're validating that each char matches the target node.
		// For IndexOf, we're looking for the first thing that _doesn't_ match the target node,
		// and thus similarly validating that everything does.
		sliceName := fmt.Sprintf("%s[%v:%v]", rm.sliceSpan, rm.sliceStaticPos, rm.sliceStaticPos+iterations)
		var indexOfExpr string
		if c.tryEmitExecuteIndexOf(rm, node, sliceName, false, true, new(int), &indexOfExpr) {
			c.writeLineFmt("if %s >= 0 {", indexOfExpr)
			c.emitExecuteGoto(rm, rm.doneLabel)
			c.writeLine("}")
		} else {
			repeaterSpan := "repeaterSlice" // As this repeater doesn't wrap arbitrary node emits, this shouldn't conflict with anything
			c.writeLineFmt(`%s := %s
						 for i:=0; i < len(%[1]s); i++ {`, repeaterSpan, sliceName)
			tmpTextSpanLocal, tmpSliceStaticPos := rm.sliceSpan, rm.sliceStaticPos
			rm.sliceSpan = repeaterSpan
			rm.sliceStaticPos = 0
			i := "i"
			c.emitExecuteSingleChar(rm, node, false, &i, false)
			rm.sliceSpan = tmpTextSpanLocal
			rm.sliceStaticPos = tmpSliceStaticPos
		}

		rm.sliceStaticPos += iterations
	}
}

// Emits the code to handle a non-backtracking optional zero-or-one loop.
func (c *converter) emitExecuteAtomicSingleCharZeroOrOne(rm *regexpData, node *syntax.RegexNode) {
	rtl := (node.Options & syntax.RightToLeft) != 0
	if rtl {
		c.transferSliceStaticPosToPos(rm, false) // we don't use static pos for rtl
	}

	expr := fmt.Sprintf("%s[%v]", rm.sliceSpan, rm.sliceStaticPos)
	if rtl {
		expr = "r.Runtext[pos-1]"
	}

	if node.IsSetFamily() {
		expr = c.emitMatchCharacterClass(rm, node.Set, false, expr)
	} else {
		op := "!="
		if node.IsOneFamily() {
			op = "=="
		}
		expr = fmt.Sprintf("%s %s %q", expr, op, node.Ch)
	}

	var spaceAvailable string
	if rtl {
		spaceAvailable = "pos > 0"
	} else if rm.sliceStaticPos != 0 {
		spaceAvailable = fmt.Sprintf("len(%s) > %v", rm.sliceSpan, rm.sliceStaticPos)
	} else {
		spaceAvailable = fmt.Sprintf("len(%s) > 0", rm.sliceSpan)
	}

	c.writeLineFmt("if %s && %s {", spaceAvailable, expr)
	if !rtl {
		c.w


-than-successful attempts at weight-loss consulting.
        PARIKE_PORANKE_16       = 8981, -- To show you my gratitude, let me try out this new spell I thought up yesterday while I was taking a nap!
        NO_KEY                  = 9903, -- You do not have a usable key in your possession.
        RETRIEVE_DIALOG_ID


<T> = func(argument);
            Ok(PlugInterface::new(plugin))
        })
        .map(SharedLibPlugin)
    }
}

impl<T: ?Sized> Deref for SharedLibPlugin<T> {
    type Target = T;

    fn deref(&self) -> &T {
        self.0.deref()
    }
}

impl<T: ?Sized> DerefMut for SharedLibPlugin<T> {
    fn deref_mut(&mut self) -> &mut T {
        self.0.deref_mut()
    }
}
<filename>src/procs.rs<gh_stars>0
use std::error::Error;
use std::path::Path;
use std::{fs, io, str};

#[derive(Debug)]
pub struct Process {
    pub window: xcb::Window,
    pub cmdline: String,
}

/// Find all processes with a `WINDOWID` variable.
///
/// `/bin/bash` processes are ignored.
pub fn find() -> Result<Vec<Process>, Box<dyn Error>> {
    let mut procs = Vec::new();

    for entry in fs::read_dir("/proc")?.flat_map(|e| e.ok()) {
        let base = entry.path();
        let environ = base.join("environ");
        if let Ok(environ) = fs::read(environ) {
            let mut last = 0;
            for index in memchr::memchr_iter(0, &environ) {
                if let Some(window) = extract_windowid(&environ[last..index]) {
                    if let Ok(cmdline) = get_cmdline(&base) {
                        if cmdline != "/bin/bash" {
                            procs.push(Process { window, cmdline });
                        }

                        break;
                    }
                }

                last = index + 1;
            }
        }
    }

    Ok(procs)
}

/// Extract the value of the WINDOWID variable.
fn extract_windowid(line: &[u8]) -> Option<u32> {
    if let Some(value) = line.strip_prefix(b"WINDOWID=") {
        match str::from_utf8(value).map(str::parse) {
            Ok(Ok(window)) => Some(window),
            _ => None,
        }
    } else {
        None
    }
}

/// Read the command line of a process.
fn get_cmdline<P: AsRef<Path>>(path: P) -> io::Result<String> {
    let cmdline = path.as_ref().join("cmdline");
    let mut content = fs::read(cmdline)?;

    // Replace NUL with spaces.
    for byte in &mut content[..] {
        if *byte < b' ' {
            *byte = b' ';
        }
    }

    Ok(String::from_utf8_lossy(&content).trim_end().into())
}
use crate::dnsimple::{Client, DNSimpleEmptyResponse, DNSimpleResponse, Endpoint, RequestOptions};
use serde::{Deserialize, Serialize};

#[derive(Debug, Deserialize, Serialize)]
pub struct Contact {
    /// The contact ID in DNSimple.
    pub id: u64,
    /// The associated account ID.
    pub account_id: u64,
    /// The label to represent the contact.
    pub label: String,
    /// The contact first name.
    pub first_name: String,
    /// The contact last name.
    pub last_name: String,
    /// The contact's job title.
    pub job_title: String,
    /// The name of the organization in which the contact works.
    pub organization_name: String,
    /// The contact email address.
    pub email: String,
    /// The contact phone number.
    pub phone: String,
    /// The contact fax number.
    pub fax: String,
    ///  The contact street address.
    pub address1: String,
    /// Apartment or suite number.
    pub address2: String,
    /// The city name.
    pub city: String,
    /// The state or province name.
    pub state_province: String,
    /// The contact postal code.
    pub postal_code: String,
    ///  The contact cou


td>
光符「因陀罗的金刚杵」 • 超人「圣白莲」 • 超人「大追踪！Buddhist Rider」

东方凭依华

对战符卡

天符「三千大千世界之主」 • 天符「大日如来的光辉」 • 天符「释迦牟尼的五行山」 • ＊以100迈驰骋天际！＊

故事符卡

光击符「引导着你的王道的金刚杵射击」 • 击拳符「韦驮天的怪云拳」 • 击光符「韦驮天的王道威光」 • 蹴斩符「迦楼罗的圣德斩」 • 光仙符「日出之国的僧侣和道士」 • <a href="./因


izeSize(benchmark::State& state) {
  BatchedBenchmark<T>(
      state,
      /* prepare_vec = */
      [](InlVec<T>* vec, size_t) {
        vec->clear();
        vec->resize(FromSize);
      },
      /* test_vec = */
      [](InlVec<T>* vec, size_t) { vec->resize(ToSize); });
}
ABSL_INTERNAL_BENCHMARK_TWO_SIZE(BM_ResizeSize, TrivialType);
ABSL_INTERNAL_BENCHMARK_TWO_SIZE(BM_ResizeSize, NontrivialType);

template <typename T, size_t FromSize, size_t ToSize>
void BM_ResizeSizeRef(benchmark::State& state) {
  auto t = T();
  BatchedBenchmark<T>(
      state,
      /* prepare_vec = */
      [](InlVec<T>* vec, size_t) {
        vec->clear();
        vec->resize(FromSize);
      },
      /* test_vec = */
      [&](InlVec<T>* vec, size_t) {
        benchmark::DoNotOptimize(t);
        vec->resize(ToSize, t);
      });
}
ABSL_INTERNAL_BENCHMARK_TWO_SIZE(BM_ResizeSizeRef, TrivialType);
ABSL_INTERNAL_BENCHMARK_TWO_SIZE(BM_ResizeSizeRef, NontrivialType);

template <typename T, size_t FromSize, size_t ToSize>
void BM_InsertSizeRef(benchmark::State& state) {
  auto t = T();
  BatchedBenchmark<T>(
      state,
      /* prepare_vec = */
      [](InlVec<T>* vec, size_t) {
        vec->clear();
        vec->resize(FromSize);
      },
      /* test_vec = */
      [&](InlVec<T>* vec, size_t) {
        benchmark::DoNotOptimize(t);
        auto* pos = vec->data() + (vec->size() / 2);
        vec->insert(pos, t);
      });
}
ABSL_INTERNAL_BENCHMARK_TWO_SIZE(BM_InsertSizeRef, TrivialType);
ABSL_INTERNAL_BENCHMARK_TWO_SIZE(BM_InsertSizeRef, NontrivialType);

template <typename T, size_t FromSize, size_t ToSize>
void BM_InsertRange(benchmark::State& state) {
  InlVec<T> other_vec(ToSize);
  BatchedBenchmark<T>(
      state,
      /* prepare_vec = */
      [](InlVec<T>* vec, size_t) {
        vec->clear();
        vec->resize(FromSize);
      },
      /* test_vec = */
      [&](InlVec<T>* vec, size_t) {
        benchmark::DoNotOptimize(other_vec);
        auto* pos = vec->data() + (vec->size() / 2);
        vec->insert(pos, other_vec.begin(), other_vec.end());
      });
}
ABSL_INTERNAL_BENCHMARK_TWO_SIZE(BM_InsertRange, TrivialType);
ABSL_INTERNAL_BENCHMARK_TWO_SIZE(BM_InsertRange, NontrivialType);

template <typename T, size_t FromSize>
void BM_EmplaceBack(benchmark::State& state) {
  BatchedBenchmark<T>(
      state,
      /* prepare_vec = */
      [](InlVec<T>* vec, size_t) {
        vec->clear();
        vec->resize(FromSize);
      },
      /* test_vec = */
      [](InlVec<T>* vec, size_t) { vec->emplace_back(); });
}
ABSL_INTERNAL_BENCHMARK_ONE_SIZE(BM_EmplaceBack, TrivialType)


ly-out condition with portals left to check,
		if (itres == -1 || (mapxstep | mapystep) == 0)
			break;

		switch (((xs_FloorToInt(yintercept) == mapy) << 1) | (xs_FloorToInt(xintercept) == mapx))
		{
		case 0:		// neither xintercept nor yintercept match!
sightcounts[5]++;
			// Continuing won't make things any better, so we might as well stop right here
			return false;

		case 1:		// xintercept matches
			xintercept += xstep;
			mapy += mapystep;
			if (mapy == mapey)
				mapystep = 0;
			break;

		case 2:		// yintercept matches
			yintercept += ystep;
			mapx += mapxstep;
			if (mapx == mapex)
				mapxstep = 0;
			break;

		case 3:		// xintercept and yintercept both match
			sightcounts[4]++;
			// The trace is exiting a block through its corner. Not only does the block
			// being entered need to be checked (which will happen when this loop
			// continues), but the other two blocks adjacent to the corner also need to
			// be checked.
			if (!P_SightBlockLinesIterator (mapx + mapxstep, mapy) ||
				!P_SightBlockLinesIterator (mapx, mapy + mapystep))
			{
sightcounts[1]++;
				return false;
			}
			xintercept += xstep;
			yintercept += ystep;
			mapx += mapxstep;
			mapy += mapystep;
			if (mapx == mapex)
				mapxstep = 0;
			if (mapy == mapey)
				mapystep = 0;
			break;
		}
	}

//
// couldn't early out, so go through the sorted list
//
sightcounts[2]++;

	bool traverseres = P_SightTraverseIntercepts ( );
	if (itres == -1) return false;	// if the iterator had an early out there was no line of sight. The traverser was only called to collect more portals.
	if (seeingthing->Sector->PortalGroup != portalgroup) return false;	// We are in a different group than the seeingthing, so this trace cannot determine visibility alone.
	return traverseres;
}

/*
=====================
=
= P_CheckSight
=
= Returns true if a straight line between t1 and t2 is unobstructed
= look from eyes of t1 to any part of t2
=
= killough 4/20/98: cleaned up, made to use new LOS struct
=
=====================
*/

int P_CheckSight (AActor *t1, AActor *t2, int flags)
{
	SightCycles.Clock();

	bool res;

	if (t1 == nullptr || t2 == nullptr)
	{
		return false;
	}

	auto s1 = t1->Sector;
	auto s2 = t2->Sector;
	//
	// check for trivial rejection
	//
	if (!t1->Level->CheckReject(s1, s2))
	{
sightcounts[0]++;
		res = false;			// can't possibly be connected
		goto done;
	}

//
// check precisely
//
	// [RH] Andy Baker's stealth monsters:
	// Cannot see an invisible object
	if ((flags & SF_IGNOREVISIBILITY) == 0 && ((t2->renderflags & RF_INVISIBLE) || !t2->RenderStyle.IsVisible(t2->Alpha)))
	{ // small chance of


---------------------------------------------------------
//
// Indexer
//
// ------------------------------------------------------------
impl Index<usize> for Vec3 {
    type Output = f32;
    fn index<'a>(&'a self, i: usize) -> &'a f32 {
        match i {
            0 => &self.x,
            1 => &self.y,
            2 => &self.z,
            _ => panic!("Vec3: Index out of range")
        }
    }
}

impl IndexMut<usize> for Vec3 {
    fn index_mut<'a>(&'a mut self, i: usize) -> &'a mut f32 {
        match i {
            0 => &mut self.x,
            1 => &mut self.y,
            2 => &mut self.z,
            _ => panic!("Vec3: Index out of range")
        }

    }
}

// ------------------------------------------------------------
//
// Display
//
// ------------------------------------------------------------
impl Display for Vec3 {
    fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
        write!(
            f,
            "Vec3 {{ x: {}, y: {}, z: {} }}",
            self.x, self.y, self.z,
        )
    }
}
use alloc::borrow::Cow;
use alloc::borrow::ToOwned;
use alloc::collections::BTreeMap;
use alloc::vec::Vec;
use anyhow::Error;
use cell::Lazy;
use core::cell::RefCell;
use diem_types::account_config;
use diem_types::account_config::{ACCOUNT_MODULE_IDENTIFIER, CORE_CODE_ADDRESS};
use diem_types::resources::currency_info::CurrencyInfoResource;
use hashbrown::HashMap;
use move_binary_format::errors::{Location, PartialVMResult, VMResult};
use move_core_types::account_address::AccountAddress;
use move_core_types::effects::ChangeSet;
use move_core_types::ident_str;
use move_core_types::identifier::{IdentStr, Identifier};
use move_core_types::language_storage::{StructTag, TypeTag};
use move_core_types::vm_status::StatusCode;
use move_vm_runtime::data_cache::MoveStorage;
use move_vm_types::natives::function::PartialVMError;
use serde::{Deserialize, Serialize};

use crate::io::traits::{Balance, BalanceAccess, CurrencyAccessPath};
use move_core_types::vm_status::known_locations::DIEM_MODULE_IDENTIFIER;

pub const DIEM_COIN_IDENTIFIER: &IdentStr = ident_str!("Balance");
pub const CURRENCY_INFO: &str = "CurrencyInfo";

pub static BALANCE_TEMPLATE: Lazy<StructTag> = Lazy::new(|| StructTag {
    address: CORE_CODE_ADDRESS,
    module: ACCOUNT_MODULE_IDENTIFIER.to_owned(),
    name: DIEM_COIN_IDENTIFIER.to_owned(),
    type_params: vec![TypeTag::U8],
});

pub struct MasterOfCoin<B: BalanceAccess> {
    access: B,
    native_mapper: RefCell<HashMap<StructTag, Option<Vec<u8>>>>,
}

impl<B: BalanceAccess> MasterOfCoin<B> {
    pub fn new(access: B) -> MasterOfCoin<B> {
        MasterOfCoin {
            access,
            native_mapper: Default::default(),
        }
    }

    pub fn session<'b, 'r, R: MoveStorage>(
        &'b self,
        remote: &'r R,
    ) -> MasterOfCoinSession<'b, 'r, B,


9Li-8cwVCdCD2IYiB {
  background: unset;
}
.BasicUI ._3lh8aaHNMcFvupuNhQDfFt {
  display: none;
}
._3lh8aaHNMcFvupuNhQDfFt ._1GfHtX6GRZ_5BukahmkQp4 {
  font-size: 14px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: .16s;
  transition-timing-function: ease-in-out;
  transform: scale(0.5);
  background-color: #d2d2d2;
  border-radius: 2px;
  cursor: pointer;
}
.BasicUI ._3lh8aaHNMcFvupuNhQDfFt ._1GfHtX6GRZ_5BukahmkQp4 {
  opacity: 1;
  transform: scale(1);
}
._3lh8aaHNMcFvupuNhQDfFt ._1GfHtX6GRZ_5BukahmkQp4 .NlL1tQGqhUyRhv6p9zwTZ {
  border-radius: 2px;
  padding: 0px 10px;
  color: #6a6d73;
  margin-left: -4px;
}
._3lh8aaHNMcFvupuNhQDfFt ._1GfHtX6GRZ_5BukahmkQp4 .Mj5HqvDXedpotuga04XmY {
  border-radius: 2px;
  width: 26px;
  height: 26px;
}
._3QS6OBHpvI5bXsSQA2zQuW:hover
  ._3lh8aaHNMcFvupuNhQDfFt
  ._1GfHtX6GRZ_5BukahmkQp4 {
  opacity: 1;
  transform: scale(1);
}
.CwZqp0ZwInfY8H9jUO4Xy {
  box-sizing: border-box;
  padding: 4px;
  border-radius: 2px;
  width: 28px;
  height: 28px;
  position: absolute;
  right: 10px;
  top: 10px;
  cursor: pointer;
  opacity: 0;
  transition-property: background-color, opacity, transform;
  transition-duration: .21s;
  transition-timing-function: ease-in-out;
  background-color: rgba(0, 0, 0, 0.5);
}
.CwZqp0ZwInfY8H9jUO4Xy:hover {
  background-color: rgba(95, 95, 95, 0.85);
}
.CwZqp0ZwInfY8H9jUO4Xy:hover svg {
  fill: #fff;
  color: #fff;
}
.CwZqp0ZwInfY8H9jUO4Xy svg {
  fill: rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.5);
  transition-property: fill, color;
  transition-duration: .21s;


r ASveraenderung = (AS2018 - AS2008);
var ASveraenderungprozent = (ASveraenderung / AS2008) * 100;

document.querySelector(".asia").addEventListener("click", clickAS);
    function clickAS() {

        document.getElementById("h1").innerHTML = "Carbon Dioxide Emissions in Asia";
        document.getElementById("emission2018").innerHTML = asien.toString() + "Kg CO2";
        document.getElementById("Welt").innerHTML = ASWelt.toFixed(2) + "%";
        document.getElementById("prozent").innerHTML = ASveraenderungprozent.toFixed(2) + "%";
        document.getElementById("veraenderung").innerHTML = ASveraenderung.toFixed(2) + "CO2";
        document.querySelector('.chart').setAttribute('style', 'height:' + ASWelt + 'px');
console.log('Die Emission von Asien ist:' + asien + 'kg CO2 ');
console.log('Relativ zur Gesamtemission der Welt verursacht Asien damit:' + ASWelt + '% ');
console.log('Für Asien hat sich 2018 im Vergleich zu 2008 die Emission um:' + ASveraenderungprozent + '% verändert');
console.log('2018 im Vergleich zu 2008 sind das:' + ASveraenderung + 'kg CO2 ');
    }

    //Berechnung Südamerika
var SAWelt = (suedamerika / welt) * 100;
var SA2008 = 1132.6;
var SA2018 = 1261.5;
var SAveraenderung = (SA2018 - SA2008);
var SAveraenderungprozent = (SAveraenderung / SA2008) * 100;

document.querySelector(".southamerica").addEventListener("click", clickSA);
    function clickSA() {

        document.getElementById("h1").innerHTML = "Carbon Dioxide Emissions in Southamerica";
        document.getElementById("emission2018").innerHTML = suedamerika.toString() + "Kg CO2";
        document.getElementById("Welt").innerHTML = SAWelt.toFixed(2) + "%";
        document.getElementById("prozent").innerHTML = SAveraenderungprozent.toFixed(2) + "%";
        document.getElementById("veraenderung").innerHTML = SAveraenderung.toFixed(2) + "CO2";
        document.querySelector('.chart').setAttribute('style', 'height:' + SAWelt + 'px');
console.log('Die Emission von Südamerika ist:' + suedamerika + 'kg CO2 ');
console.log('Relativ zur Gesamtemission der Welt verursacht Südamerika damit:' + SAWelt + '% ');
console.log('Für Südamerika hat sich 2018 im Vergleich zu 2008 die Emission um:' + SAveraenderungprozent + '% verändert');
console.log('2018 im Vergleich zu 2008 sind das:' + SAveraenderung + 'kg CO2 ');
    }

    //Berechnung Australien
var AUWelt = (australien / welt) * 100;
var AU2008 = 1993;
var AU2018 = 2100.5;
var AUveraenderung = (AU2018 - AU2008);
var AUveraenderungprozent = (AUveraenderung / AU2008) * 100;

document.querySelector(".australia").addEventListener("click", clickAU);
    function clickAU() {

        document.getElementById("h1").innerHTML = "Carbon Dioxide Emissions in Australia";
        document.getElementById("emission2018").innerHTML = australien.toString() + "Kg CO2";
        document.getElementById("Welt").innerHTML = AUWelt.toFixed(2) + "%";
        document.getElementById("prozent").innerHTML = AUveraenderungprozent.toFixed(2) + "%";
        document.getElementById("veraenderung").innerHTML = AUveraenderung.toFixed(2) + "CO2";
        document.querySelector('.chart').setAttribute('style', 'height:' + AU


>>**[Download the Overpass Channels White Paper (ePrint)](https://eprint.iacr.org/2024/1526)** ====> **Section 15: Wallet-Managed Channel Grouping**

# Part 2: Off-Chain Processing and Privacy

1. Off-Chain Intermediate Contracts
     - Role: Managing off-chain transactions and state updates
     - Key features:
       - Transaction processing
       - State aggregation
       - Cross-channel communication
     - Module: `src/contracts/off_chain_intermediate_contract.rs`

     >>**[Download the Overpass Channels White Paper (ePrint)](https://eprint.iacr.org/2024/1526)** ====> **Section 2.1 Horizontal Scalability without Validators**

2. zk-SNARKs and Privacy
     - Concept explanation: Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge
     - Implementation in Overpass Channels:
       - Transaction validation
       - State transition proofs
       - Balance consistency checks
     - Modules:
       - `src/circuits/mod.rs`
       - `src/circuits/intermediate_rebalancing_circuit.rs`
       - `src/circuits/signature_circuit.rs`

     >>**[Download the Overpass Channels White Paper (ePrint)](https://eprint.iacr.org/2024/1526)** ====> **Section 3.1: zk-SNARKs**

3. Sparse Merkle Trees
     - Usage: Efficient state management and proof generation
     - Implementation details:
       - Tree structure
       - Proof generation
       - Verification
     - Module: `src/utils/merkle_tree.rs`
     >>**[Download the Overpass Channels White Paper (ePrint)](https://eprint.iacr.org/2024/1526)** **====> Section 12.1:** *Sparse Merkle Trees*

4. Privacy Analysis
     - Transaction privacy guarantees
     - Merkle proof confidentiality
     - zk-SNARK proof properties
     >>**[Download the Overpass Channels White Paper (ePrint)](https://eprint.iacr.org/2024/1526)** **====> Section 18. Privacy Analysis**

5. Poseidon Hash Function
     - Purpose: Cryptographic hash function optimized for zk-SNARKs
     - Implementation details
     - Usage in Merkle trees and proof generation
     - Module: `src/crypto/poseidon2.rs`
     >>**[Download the Overpass Channels White Paper (ePrint)](https://eprint.iacr.org/2024/1526)** **====> Section 3.8 Practicality of zk-SNARKs**

6. Off-Chain State Management
     - State representation
     - Update mechanisms
     - Synchronization with on-chain state
     - Module: `src/contracts/off_chain_state.rs`
     >>**[Download the Overpass Channels White Paper (ePrint)](https://eprint.iacr.org/2024/1526)** ====> **Section 10:** *Storage Nodes and Data Management*

# Part 3: Dynamic Rebalancing and Liquidity Management

1. Dynamic Rebalancing
     - Concept and importance
       - Rebalancing for liquidity optimization
       - Improving transaction success rates
     - Implementation overview:
       - Rebalancing algorithm
       - Trigger conditions
       - Cross-channel balance adjustments
     - Module: `src/circuits/intermediate_rebalancing_circuit.rs`
     >>**[Download the Overpass Channels White Paper (ePrint)](https://eprint.iacr.org/2024/1526)** **====> Section 2.5 Dynamic Rebalancing Analysis**

2. Rebalancing Circuit
     - Circuit structure and components
     - Input and output definitions
     - Constraint system:
       - Inputs: Channel balances, rebalancing parameters
       - Outputs: Rebalancing instructions
       - Constraints: Balance consistency, rebalancing logic
     - Implementation details:
       - `RebalancingCircuitImpl` struct
       - `configure`, `setup`, and `apply_constraints` methods
     >>**[Download the Overpass Channels White Paper (ePrint)](https://eprint.iacr.org/2024/1526)** **====> Section 2.5 D


Params(params, "fetchFundingRateHistory", "paginate");
            paginate = GetValue(paginateparamsVariable,0);
            params = GetValue(paginateparamsVariable,1)
            var maxEntriesPerRequest interface{} = nil
            maxEntriesPerRequestparamsVariable := this.HandleOptionAndParams(params, "fetchFundingRateHistory", "maxEntriesPerRequest", 100);
            maxEntriesPerRequest = GetValue(maxEntriesPerRequestparamsVariable,0);
            params = GetValue(maxEntriesPerRequestparamsVariable,1)
            var pageKey interface{} = "ccxtPageKey"
            if IsTrue(paginate) {

                    retRes52919 :=  (<-this.FetchPaginatedCallIncremental("fetchFundingRateHistory", symbol, since, limit, params, pageKey, maxEntriesPerRequest))
                    PanicOnError(retRes52919)
                    ch <- retRes52919
                    return nil
            }
            var market interface{} = this.Market(symbol)
            var page interface{} = Subtract(this.SafeInteger(params, pageKey, 1), 1)
            var request interface{} = map[string]interface{} {
                "instrument": GetValue(market, "id"),
                "result_offset": this.SafeInteger2(params, "offset", "result_offset", Multiply(page, maxEntriesPerRequest)),
            }
            if IsTrue(!IsEqual(limit, nil)) {
                AddElementToObject(request, "result_limit", limit)
            }

            response:= (<-this.V1PublicGetInstrumentsInstrumentFunding(this.Extend(request, params)))
            PanicOnError(response)
            //
            //    {
            //        "pagination":{
            //           "result_limit":"25",
            //           "result_offset":"0"
            //        },
            //        "results":[
            //           {
            //              "instrument_id":"149264167780483072",
            //              "funding_rate":"0.000011",
            //              "mark_price":"47388.1",
            //              "event_time":"2024-02-10T16:00:00Z"
            //           },
            //           ...
            //        ]
            //    }
            //
            var rawRates interface{} = this.SafeList(response, "results", []interface{}{})

            ch <- this.ParseFundingRateHistories(rawRates, market, since, limit)
            return nil

            }()
            return ch
        }
func  (this *CoinbaseinternationalCore) ParseFundingRateHistory(info interface{}, optionalArgs ...interface{}) interface{}  {
    market := GetArg(optionalArgs, 0, nil)
    _ = market
    return this.ParseFundingRate(info, market)
}
func  (this *CoinbaseinternationalCore) ParseFundingRate(contract interface{}, optionalArgs ...interface{}) interface{}  {
    //
    //    {
    //       "instrument_id":"149264167780483072",
    //       "funding_rate":"0.000011",
    //       "mark_price":"47388.1",
    //       "event_time":"2024-02-10T16:00:00Z"
    //    }
    //
    market := GetArg(optionalArgs, 0, nil)
    _ = market
    var fundingDatetime interface{} = this.SafeString2(contract, "event_time", "time")
    return map[string]interface{} {
        "info": contract,
        "symbol": this.SafeSymbol(nil, market),
        "markPrice": this.SafeNumber(contract, "mark_price"),
        "indexPrice": nil,
        "interestRate": nil,
        "estimatedSettlePrice": nil,
        "timestamp": this.Parse8601(fundingDatetime),
        "datetime": fundingDatetime,
        "fundingRate": this.SafeNumber(contract, "funding_rate"),
        "fundingTimestamp": this.Parse8601(fundingDatetime),
        "fundingDatetime": fundingDateti


nc msgLogAppend(m msg) {
	msgLogMutex.Lock()
	defer msgLogMutex.Unlock()
	msgLog = append(msgLog, m)
}

func updateMessageStats() {
	ADSBTowerMutex.Lock()
	defer ADSBTowerMutex.Unlock()

	msgLogMutex.Lock()
	defer msgLogMutex.Unlock()

	m := len(msgLog)
	t := make([]msg, 0)
	UAT_messages_last_minute := uint(0)
	ES_messages_last_minute := uint(0)
	OGN_messages_last_minute := uint(0)
	AIS_messages_last_minute := uint(0)

	// Clear out ADSBTowers stats.
	for t, tinf := range ADSBTowers {
		tinf.Messages_last_minute = 0
		tinf.Energy_last_minute = 0
		ADSBTowers[t] = tinf
	}

	for i := 0; i < m; i++ {
		if stratuxClock.Since(msgLog[i].TimeReceived).Minutes() < 1 {
			t = append(t, msgLog[i])
			if msgLog[i].MessageClass == MSGCLASS_UAT {
				UAT_messages_last_minute++
				if len(msgLog[i].ADSBTowerID) > 0 { // Update tower stats.
					tid := msgLog[i].ADSBTowerID

					if _, ok := ADSBTowers[tid]; !ok { // First time we've seen the tower? Start tracking.
						var newTower ADSBTower
						newTower.Lat = msgLog[i].uatMsg.Lat
						newTower.Lng = msgLog[i].uatMsg.Lon
						newTower.Signal_strength_max = -999 // dBmax = 0, so this needs to initialize below scale ( << -48 dB)
						ADSBTowers[tid] = newTower
					}

					twr := ADSBTowers[tid]
					twr.Signal_strength_now = msgLog[i].Signal_strength

					twr.Energy_last_minute += uint64((msgLog[i].Signal_amplitude) * (msgLog[i].Signal_amplitude))
					twr.Messages_last_minute++
					if msgLog[i].Signal_strength > twr.Signal_strength_max { // Update alltime max signal strength.
						twr.Signal_strength_max = msgLog[i].Signal_strength
					}
					ADSBTowers[tid] = twr
				}
			} else if msgLog[i].MessageClass == MSGCLASS_ES {
				ES_messages_last_minute++
			} else if msgLog[i].MessageClass == MSGCLASS_OGN {
				OGN_messages_last_minute++
			} else if msgLog[i].MessageClass == MSGCLASS_AIS {
				AIS_messages_last_minute++
			}
		}
	}
	msgLog = t
	globalStatus.UAT_messages_last_minute = UAT_messages_last_minute
	globalStatus.ES_messages_last_minute = ES_messages_last_minute
	globalStatus.OGN_messages_last_minute = OGN_messages_last_minute
	globalStatus.AIS_messages_last_minute = AIS_messages_last_minute

	// Update "max messages/min" counters.
	if globalStatus.UAT_messages_max < UAT_messages_last_minute {
		globalStatus.UAT_messages_max = UAT_messages_last_minute
	}
	if globalStatus.ES_messages_max < ES_messages_last_minute {
		globalStatus.ES_messages_max = ES_messages_last_minute
	}
	if globalStatus.OGN_messages_max < OGN_messages_last_minute {
		globalStatus.OGN_messages_max = OGN_messages_last_minute
	}
	if globalStatus.AIS_messages_max < AIS_messages_last_minute {
		globalStatus.AIS_messages_max = AIS_messages_last_minute
	}

	// Update average signal strength over last minute for all ADSB towers.
	for t


 0b00_000_100, 0xa1], "vgatherqps ymm0, qword [ecx + ymm12 * 4], ymm0");
    test_avx2(&[0xc4, 0b110_00010, 0b1_1111_001, 0x93, 0b00_000_100, 0xa1], "vgatherqpd xmm0, dword [ecx + xmm12 * 4], xmm0");
    test_avx2(&[0xc4, 0b110_00010, 0b1_1111_101, 0x93, 0b00_000_100, 0xa1], "vgatherqpd ymm0, qword [ecx + ymm12 * 4], ymm0");
    */

    test_instr_vex_aesni(&[0xc4, 0b110_00010, 0b0_1111_001, 0xdb, 0b11_001_010], "vaesimc xmm1, xmm2");
    test_invalid(&[0xc4, 0b110_00010, 0b0_0111_101, 0xdb, 0b11_001_010]);
    test_invalid(&[0xc4, 0b110_00010, 0b1_0111_101, 0xdb, 0b11_001_010]);
    test_instr_vex_aesni(&[0xc4, 0b110_00010, 0b1_0111_001, 0xdc, 0b11_001_010], "vaesenc xmm1, xmm0, xmm2");
    test_instr_vex_aesni(&[0xc4, 0b110_00010, 0b1_0111_101, 0xdc, 0b11_001_010], "vaesenc ymm1, ymm0, ymm2");
    test_instr_vex_aesni(&[0xc4, 0b110_00010, 0b1_0111_001, 0xdd, 0b11_001_010], "vaesenclast xmm1, xmm0, xmm2");
    test_instr_vex_aesni(&[0xc4, 0b110_00010, 0b1_0111_101, 0xdd, 0b11_001_010], "vaesenclast ymm1, ymm0, ymm2");
    test_instr_vex_aesni(&[0xc4, 0b110_00010, 0b1_0111_001, 0xde, 0b11_001_010], "vaesdec xmm1, xmm0, xmm2");
    test_instr_vex_aesni(&[0xc4, 0b110_00010, 0b1_0111_101, 0xde, 0b11_001_010], "vaesdec ymm1, ymm0, ymm2");
    test_instr_vex_aesni(&[0xc4, 0b110_00010, 0b1_0111_001, 0xdf, 0b11_001_010], "vaesdeclast xmm1, xmm0, xmm2");
    test_instr_vex_aesni(&[0xc4, 0b110_00010, 0b1_0111_101, 0xdf, 0b11_001_010], "vaesdeclast ymm1, ymm0, ymm2");

    // prefix 01
    test_instr(&[0xc4, 0b110_00001, 0b1_1111_011, 0x10, 0b00_001_010], "vmovsd xmm1, qword [edx]");
    test_instr(&[0xc4, 0b110_00001, 0b1_1111_111, 0x10, 0b00_001_010], "vmovsd xmm1, qword [edx]");
    test_invalid(&[0xc4, 0b110_00001, 0b1_0111_011, 0x10, 0b00_001_010]);
    test_invalid(&[0xc4, 0b110_00001, 0b1_0111_111, 0x10, 0b00_001_010]);
    test_instr(&[0xc


/*
 * Hard disc boot block. Loaded at 0x7C00, relocates to 0x0600:
 *	8a mbr.s; 8l -o mbr -l -H3 -T0x0600 mbr.8
 */
#include "x16.h"

/*#define FLOPPY	1		/* test on a floppy */
#define TRACE(C)	PUSHA;\
			CLR(rBX);\
			MOVB $C, AL;\
			LBI(0x0E, rAH);\
			BIOSCALL(0x10);\
			POPA

/*
 * We keep data on the stack, indexed by BP.
 */
#define Xdap		0x00		/* disc address packet */
#define Xtable		0x10		/* partition table entry */
#define Xdrive		0x12		/* starting disc */
#define Xtotal		0x14		/* sum of allocated data above */

/*
 * Start: loaded at 0000:7C00, relocate to 0000:0600.
 * Boot drive is in rDL.
 */
TEXT _start(SB), $0
	CLI
	CLR(rAX)
	MTSR(rAX, rSS)			/* 0000 -> rSS */
	LWI((0x7C00-Xtotal), rSP)	/* 7Bxx -> rSP */
	MW(rSP, rBP)			/* set the indexed-data pointer */

	MTSR(rAX, rDS)			/* 0000 -> rDS, source segment */
	LWI(0x7C00, rSI)		/* 7C00 -> rSI, source offset */
	MTSR(rAX, rES)			/* 0000 -> rES, destination segment */
	LWI(0x600, rDI)			/* 0600 -> rDI, destination offset */
	LWI(0x100, rCX)			/* 0100 -> rCX, loop count (words) */

	CLD
	REP; MOVSL			/* MOV DS:[(E)SI] -> ES:[(E)DI] */

	FARJUMP16(0x0000, _start0600(SB))

TEXT _start0600(SB), $0
#ifdef FLOPPY
	LBI(0x80, rDL)
#else
	CLRB(rAL)			/* some systems pass 0 */
	CMPBR(rAL, rDL)
	JNE _save
	LBI(0x80, rDL)
#endif /* FLOPPY */
_save:
	SXB(rDL, Xdrive, xBP)		/* save disc */

	LWI(confidence(SB), rSI)	/* for that warm, fuzzy feeling */
	CALL16(BIOSputs(SB))

	LWI(_start+0x01BE(SB), rSI)	/* address of partition table */
	LWI(0x04, rCX)			/* 4 entries in table */
	LBI(0x80, rAH)			/* active entry value */
	CLRB(rAL)			/* inactive entry value */

_activeloop0:
	LXB(0x00, xSI, rBL)		/* get active entry from table */
	CMPBR(rBL, rAH)			/* is this an active entry? */
	JEQ _active

	CMPBR(rBL, rAL)			/* if not active it should be 0 */
	JNE _invalidMBR

	ADDI(0x10, rSI)			/* next table entry */
	DEC(rCX)
	JNE _activeloop0

	LWI(noentry(SB), rSI)
	CALL16(buggery(SB))

_active:
	MW(rSI, rDI)			/* save table address */

_activeloop1:
	ADDI(0x10, rSI)			/* next table entry */
	DEC(rCX)
	JEQ _readsector

	LXB(0x00, xSI, rBL)


= 0.0;
    style.WindowMinSize = ImVec2::zero();
    style.Colors[ImGuiCol_Text as usize] = fg;
    style.Colors[ImGuiCol_Border as usize] = base;
    style.Colors[ImGuiCol_WindowBg as usize] = bg;
    style.Colors[ImGuiCol_PopupBg as usize] = bg;
    style.Colors[ImGuiCol_ScrollbarBg as usize] = bg;
    style.Colors[ImGuiCol_ScrollbarGrab as usize] = base;
    style.Colors[ImGuiCol_ScrollbarGrabHovered as usize] = hovered;
    style.Colors[ImGuiCol_ScrollbarGrabActive as usize] = active;
    style.Colors[ImGuiCol_Button as usize] = base;
    style.Colors[ImGuiCol_ButtonHovered as usize] = hovered;
    style.Colors[ImGuiCol_ButtonActive as usize] = active;
    style.Colors[ImGuiCol_FrameBg as usize] = base;
    style.Colors[ImGuiCol_FrameBgHovered as usize] = hovered;
    style.Colors[ImGuiCol_FrameBgActive as usize] = active;
    style.Colors[ImGuiCol_CheckMark as usize] = fg;
}
<gh_stars>1-10
//! Display options.
use std::convert::From;

use clap::{App, Arg, ArgMatches};
use reqwest::RequestBuilder;

/// Output format
pub struct SharingSpace {
    pub sharing_id: String,
}

impl SharingSpace {
    /// Inject the parameters of the cli in the http request
    pub fn build_req(&self, req: RequestBuilder) -> RequestBuilder {
        if self.sharing_id.len() > 0 {
            req.query(&[("sharing_id", self.sharing_id.as_str())])
        } else {
            req
        }
    }
}

/// Retrieve the format from the clap subcommand arguments
impl<'a> From<&'a ArgMatches<'a>> for SharingSpace {
    fn from(params: &ArgMatches<'a>) -> Self {
        SharingSpace {
            sharing_id: params.value_of("SHARING_ID").unwrap().to_string(),
        }
    }
}

/// Create the clap subcommand with its arguments.
pub fn add_subcommand_options<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b> {
    app.arg(
        Arg::with_name("SHARING_ID")
            .short("s")
            .long("sharing-id")
            .default_value("")
            .takes_value(true)
            .help("The Organization ID"),
    )
}
<filename>core_compat/src/entity/sprite_type.rs

#[derive(Debug, Copy, Clone)]
pub enum SpriteType {
    Bullet,
    Icon,
    Character,
    Object,
    Tile,
    Interface,
}
<gh_stars>1-10
use std::io::{BufRead, Write};
use std::path::PathBuf;
use std::sync::mpsc;

use structopt::StructOpt;

use core::{Chip8, Error, Key};

#[derive(Debug, StructOpt)]
#[structopt(name = "c8db", about = "c8db program options.")]
struct Option {
    rom: PathBuf,
}

fn prompt() {
    print!("> ");
    std::io::stdout().flush().unwrap();
}

fn main() -> Result<(), Error> {
    let opts = Option::from_args();
    env_logger::init();