compares: ["like", "="],
    values: ["nameLike", "name"],
  },
  {
    label: <Translation>{(t) => t("Description")}</Translation>,
    compares: ["like", "="],
    values: ["descriptionLike", "Description"],
  },
  {
    label: <Translation>{(t) => t("Priority")}</Translation>,
    compares: ["="],
    values: ["priority"],
  },
  {
    label: <Translation>{(t) => t("Due Date")}</Translation>,
    compares: ["before", "after"],
    values: ["due"],
  },
  {
    label: <Translation>{(t) => t("Follow up Date")}</Translation>,
    compares: ["before", "after"],
    values: ["followUp"],
  },
  {
    label: <Translation>{(t) => t("Created")}</Translation>,
    compares: ["before", "after"],
    values: ["Created"],
  },
];

export const Filter_Search_Types = {
  VARIABLES: "variables",
  STRING: "string",
  DATE: "date",
  NORMAL: "normal",
};

export const FILTER_OPERATOR_TYPES = {
  EQUAL: "=",
  LIKE: "like",
  BEFORE: "before",
  AFTER: "after",
};

//TODO update to further constants
export const FILTER_COMPARE_OPTIONS = {
  [Filter_Search_Types.VARIABLES]: [
    ">",
    ">=",
    FILTER_OPERATOR_TYPES.EQUAL,
    "!=",
    "<",
    "<=",
    FILTER_OPERATOR_TYPES.LIKE,
  ],
  [Filter_Search_Types.DATE]: [
    FILTER_OPERATOR_TYPES.BEFORE,
    FILTER_OPERATOR_TYPES.AFTER,
  ],
  [Filter_Search_Types.STRING]: [
    FILTER_OPERATOR_TYPES.EQUAL,
    FILTER_OPERATOR_TYPES.LIKE,
  ],
  [Filter_Search_Types.NORMAL]: [FILTER_OPERATOR_TYPES.EQUAL],
};

export const taskFilters = [
  {
    label: <Translation>{(t) => t("Process Variables")}</Translation>,
    key: "processVariables",
    operator: FILTER_OPERATOR_TYPES.EQUAL,
    type: Filter_Search_Types.VARIABLES,
    value: "",
    name: "",
  },
  {
    label: <Translation>{(t) => t("Task Variables")}</Translation>,
    key: "taskVariables",
    operator: FILTER_OPERATOR_TYPES.EQUAL,
    type: Filter_Search_Types.VARIABLES,
    value: "",
    name: "",
  },
  {
    label: <Translation>{(t) => t("Process Definition Name")}</Translation>,
    key: "processDefinitionName",
    operator: FILTER_OPERATOR_TYPES.LIKE,
    type: Filter_Search_Types.STRING,
    value: "",
  },
  {
    label: <Translation>{(t) => t("Assignee")}</Translation>,
    key: "assignee",
    operator: FILTER_OPERATOR_TYPES.LIKE,
    type: Filter_Search_Types.STRING,
    value: "",
  },
  {
    label: <Translation>{(t) => t("Candidate Group")}</Translation>,
    key: "candidateGroup",
    operator: FILTER_OPERATOR_TYPES.EQUAL,
    type: Filter_Search_Types.NORMAL,
    value: "",
  },
  {
    label: <Translation>{(t) => t("Candidate User")}</Translation>,
    key: "candidateUser",
    operator: FILTER_OPERATOR_TYPES.EQUAL,
    type: Filter_Search_Types.NORMAL,
    value: "",
  },
  {
    label: <Translation>{(t) => t("Name")}</Translation>,
    key: "name",
    operator: FILTER_OPERATOR_TYPES.LIKE,
    type: Filter_Search_Types.STRING,
    value: "",
  },
  {
    label: <Translation>{(t) => t("Description")}</Translation>,
    key: "Description",
    operator: FILTER_OPERATOR_TYPES.LIKE,
    type: Filter_Search_Types.STRING,
    value: "",
  },
  {


t(new Cigar('Malboro', 10))
    sale.addProduct(new Beer('Itaipava', 5))
    sale.addProduct(new Water('Crystal', 2))
    expect(sale.getTotal(new Date('2021-02-01T00:00:00'))).toBe(19)
  })
})
import Motor from '../..';
import Component from '../components/Component';
import { Entity } from '../Entity';
export declare const HIGH_PRIORITY = -10;
export declare const NORMAL_PRIORITY = 0;
export declare const LOW_PRIORITY = 10;
export default abstract class System {
    motor: Motor;
    entities: Array<Entity>;
    priority: number;
    constructor(motor: Motor);
    update(): void;
    add(entity: Entity): void;
    remove(entity: Entity): void;
    updateEntity(entity: Entity): void;
    addEntity(entity: Entity): void;
    removeEntity(entity: Entity): void;
    getEntityComponent(entity: Entity, name: string): Component;
    entityHasComponent(entity: Entity, name: string): boolean;
    entityHasComponents(entity: Entity, names: Array<string>): boolean;
    abstract isMatch(entity: Entity): boolean;
}
import axios, { AxiosInstance } from "axios";
import {ChangeEvent, useCallback, useEffect, useMemo, useState} from "react";
import {FormInputData, RequestType} from "./generalType";

export const useFormInput  = <T>(initData : T): FormInputData<T> => {
    const [value,setValue] = useState<T>(initData)
    const onChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {
        setValue(e.target.value as unknown as T);
    },[setValue])
    return useMemo(() => {
      return {
          value,
          onChange
      }
    },[value,onChange])
}

export function useFetch({ api, method, url, data = null,config = null }  : {
    api:AxiosInstance,
    method:RequestType,
    config:any|null,
    url:string,
    data:any|null,
    headers:object|null}
) : {response:any,error:string,isLoading:boolean} {
    const [response, setResponse] = useState(null);
    const [error, setError] = useState("");
    const [isLoading, setIsLoading] = useState(true);

    useEffect(() => {
        const fetchData = async () => {
            try {
                api[method](url, JSON.parse(config), JSON.parse(data))
                    .then((res) => {
                        setResponse(res.data);
                    })
                    .finally(() => {
                        setIsLoading(false);
                    });
            } catch (err) {
                setError(err);
            }
        };

        fetchData();
    }, [api, method, url, data, config]);

    return { response, error, isLoading };
}

export const api = axios.create({
    baseURL: "",
})
import type { ClientType, CommandRunMethod, Mutable, CommandOperationHandler } from 'src/types';

import { Command } from 'discord.js-commando';
import { Role } from 'discord.js';
import { error } from 'src/logging';
import { getModels } from 'src/models';
import { handleError } from 'src/discord-utils';
import { parseDelay } from 'src/utils';

const LIST_OPERATIONS = ['list', 'ls'] as const;
const ADD_OPERATIONS = ['add'] as const;
const CLEAR_OPERATIONS = ['clear'] as const;
const OPERATIONS = [
  ...LIST_OPERATIONS,
  ...ADD_OPERATIONS,
  ...CLEAR_OPERATIONS,
] as const;

const model = getModels().base_roles;

interface Args {
  operation: typeof OPERATIONS[


   *
   * @param image New {@link mxImage} to be used for the background.
   */
  setBackgroundImage(image: mxImage): void;

  /**
   * Returns the {@link mxImage} used to display the collapsed state of
   * the specified cell state. This returns null for all edges.
   */
  getFoldingImage(state: mxCellState): mxImage;

  /**
   * Returns the textual representation for the given cell. This
   * implementation returns the nodename or string-representation of the user
   * object.
   *
   *
   * The following returns the label attribute from the cells user
   * object if it is an XML node.
   *
   * @example
   * ```javascript
   * graph.convertValueToString = function(cell)
   * {
   * 	return cell.getAttribute('label');
   * }
   * ```
   *
   * See also: {@link cellLabelChanged}.
   *
   * @param cell {@link mxCell} whose textual representation should be returned.
   */
  convertValueToString(cell: mxCell): string;

  /**
   * Returns a string or DOM node that represents the label for the given
   * cell. This implementation uses {@link convertValueToString} if {@link labelsVisible}
   * is true. Otherwise it returns an empty string.
   *
   * To truncate a label to match the size of the cell, the following code
   * can be used.
   *
   * ```javascript
   * graph.getLabel = function(cell)
   * {
   *   var label = getLabel.apply(this, arguments);
   *
   *   if (label != null && this.model.isVertex(cell))
   *   {
   *     var geo = this.getCellGeometry(cell);
   *
   *     if (geo != null)
   *     {
   *       var max = parseInt(geo.width / 8);
   *
   *       if (label.length > max)
   *       {
   *         label = label.substring(0, max)+'...';
   *       }
   *     }
   *   }
   *   return mxUtils.htmlEntities(label);
   * }
   * ```
   *
   * A resize listener is needed in the graph to force a repaint of the label
   * after a resize.
   *
   * ```javascript
   * graph.addListener(mxEvent.RESIZE_CELLS, function(sender, evt)
   * {
   *   var cells = evt.getProperty('cells');
   *
   *   for (var i = 0; i < cells.length; i++)
   *   {
   *     this.view.removeState(cells[i]);
   *   }
   * });
   * ```
   *
   * @param cell {@link mxCell} whose label should be returned.
   */
  getLabel(cell: mxCell): string | Node;

  /**
   * Returns true if the label must be rendered as HTML markup. The default
   * implementation returns {@link htmlLabels}.
   *
   * @param cell {@link mxCell} whose label should be displayed as HTML markup.
   */
  isHtmlLabel(cell: mxCell): boolean;

  /**
   * Returns {@link htmlLabels}.
   */
  isHtmlLabels(): boolean;

  /**
   * Sets {@link htmlLabels}.
   */
  setHtmlLabels(value: boolean): void;

  /**
   * This enables wrapping for HTML labels.
   *
   * Returns true if no white-space CSS style directive should be used for
   * displaying the given cells label. This implementation returns true if
   * {@link mxConstants.STYLE_WHITE_SPACE} in the style of the given cell is 'wrap'.
   *
   * This is used as a workaround for IE ignoring the white-space directive
   * of child elements if the directive appears in a parent element. It
   * should be overridden to return true if a white-space directive is used
   * in the HTML markup that represents the given cells label. In order for
   * HTML markup to work in labels, {@link isHtmlLabel} must also return true


     };

            return await Get<GetTracksRequest, GetTracksResponse>(request, cancellationToken);
        }

        public async Task<GetTracksResponse> GetTracks(LastfmUser user, CancellationToken cancellationToken, int page = 0, int limit = 200)
        {
            var request = new GetTracksRequest
            {
                User = user.Username,
                ApiKey = Strings.Keys.LastfmApiKey,
                Method = Strings.Methods.GetTracks,
                Limit = limit,
                Page = page,
                Secure = true

            };

            return await Get<GetTracksRequest, GetTracksResponse>(request, cancellationToken);
        }
    }
}


) {
        utext_close(str_text);
        str_text = NULL;
    }

    STRI__UNPROTECT_ALL
    return ret;
    STRI__ERROR_HANDLER_END({
        if (str_text) {
            utext_close(str_text);
            str_text = NULL;
        }
    })
}
/* This file is part of the 'stringi' project.
 * Copyright (c) 2013-2025, Marek Gagolewski <https://www.gagolewski.com/>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "stri_stringi.h"
#include "stri_container_utf8.h"
#include "stri_container_integer.h"
#include "stri_string8buf.h"
#include <cstring>
#include <vector>

/**
 * Pad a string
 *
 * vectorized over str, length and pad
 * if str or pad or length is NA the result will be NA
 *
 * @param str character vector
 * @param min_length integer vector
 * @param side [internal int]
 * @param pad character vector
 * @param use_length single logical value
 * @return character vector
 *
 * @version 0.1-?? (Bartlomiej Tartanus)
 *
 * @version 0.2-2 (Marek Gagolewski, 2014-04-20)
 *          use stri_error_handler, pad should be a single code point, not byte
 *
 * @version 0.3-1 (Marek Gagolewski, 2014-11-04)
 *    Issue #112: str_prepare_arg* retvals were not PROTECTed from gc
 *
 * @version 0.5-1 (Marek Gagolewski, 2015-04-22)
 *    `use_length` arg added,
 *    second argument renamed `width`
*/
SEXP stri_pad(SEXP str, SEXP width, SEXP side, SEXP pad, SEXP use_length)
{
    // this is an internal arg, check manually, error() allowed here
    if (!Rf_isInteger(side) || LENGTH(side) != 1)
        Rf_error(MSG__INCORRECT_INTERNAL_ARG);
    int _side = INTEGER(side)[0];
    if (_side < 0 || _side > 2)
        Rf


监听中")
                }

                actionCallback = onAction
                isListening.set(true)

                Log.d(TAG, "开始Root权限级别的UI操作监听")

                // 启动底层系统事件监控
                startRootLevelMonitoring()

                return@withContext ActionListener.ListeningResult.success("Root UI操作监听已启动")
            } catch (e: Exception) {
                Log.e(TAG, "启动Root UI操作监听失败", e)
                isListening.set(false)
                return@withContext ActionListener.ListeningResult.failure("启动失败: ${e.message}")
            }
        }

    override suspend fun stopListening(): Boolean = withContext(Dispatchers.IO) {
        try {
            if (!isListening.get()) {
                return@withContext true
            }

            isListening.set(false)
            actionCallback = null

            // 停止监控任务
            monitoringJob?.cancel()
            monitoringJob = null

            stopRootLevelMonitoring()

            Log.d(TAG, "Root UI操作监听已停止")
            return@withContext true
        } catch (e: Exception) {
            Log.e(TAG, "停止Root UI操作监听失败", e)
            return@withContext false
        }
    }

    /**
     * 开始Root级别的系统监控
     * 可以监听最底层的输入设备事件、内核事件等
     */
    private fun startRootLevelMonitoring() {
        Log.d(TAG, "开始Root级别系统监控 - 直接监听内核输入设备和系统事件")

        monitoringJob = CoroutineScope(Dispatchers.IO).launch {
            try {
                process = shellExecutor.startProcess("getevent -l")

                process?.stdout?.onEach { line ->
                    parseTouchEvent(line)
                }?.launchIn(this)

                process?.stderr?.onEach { line ->
                    Log.w(TAG, "getevent stderr: $line")
                }?.launchIn(this)

                val exitCode = process?.waitFor()
                Log.d(TAG, "getevent process exited with code $exitCode")

            } catch (e: Exception) {
                Log.e(TAG, "Root级别监控任务出错", e)
            } finally {
                if (isActive) {
                    Log.d(TAG, "Restarting root monitoring process...")
                    startRootLevelMonitoring()
                }
            }
        }
    }

    /**
     * 停止Root级别的系统监控
     */
    private fun stopRootLevelMonitoring() {
        Log.d(TAG, "停止Root级别系统监控")
        monitoringJob?.cancel()
        process?.destroy()
        process = null
    }

    private fun parseTouchEvent(line: String) {
        // A simple parser for `getevent -l` output.
        // This is a placeholder and needs to be implemented properly.
        Log.v(TAG, "Input event: $line")
        if (line.contains("ABS_MT_POSITION_X")) {
            // Handle X coordinate
        } else if (line.contains("ABS_MT_POSITION_Y")) {
            // Handle Y coordinate
        } else


NC00eiIvPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTYiIHI9IjEiIHN0eWxlPSJmaWxsOmdyYXkiLz48L3N2Zz4='>
  static const update_urgent = IconData(
    0xe125,
    fontFamily: iconFontFamily,
    fontPackage: iconFontPackage,
  );

  /// Font icon named "__update available filled__"
  ///
  /// <image width='32px' src='data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI0IiB3aWR0aD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIgOS4yNjIgNC40ODMgNS41NyA0LjM0MSA1LjA3IDhsLTIuOTIgMi4yNjYgMS45NyAzLjEyNS0uNzgyIDMuNjE0IDMuNTE4IDEuMTI5IDEuNzIzIDMuMjdMMTIgMjAuMDA2bDMuNDIgMS4zOTYgMS43MjQtMy4yNjggMy41MTgtMS4xMy0uNzgxLTMuNjEzIDEuOTY5LTMuMTI1LTIuOTItMi4yNjMtLjUtMy42NjEtMy42OTMuMTQyem0uMDMxIDQuNjAxYzEuNzUgMi42MzMgMi4zODIgNS4xNTQgMi45NyA2LjQwMmgtMnY0SDExdi00SDljLjU4Ny0xLjI0OCAxLjI4LTMuNzY5IDMuMDMxLTYuNDAyeiIgc3R5bGU9ImZpbGw6Z3JheSIvPjwvc3ZnPg=='>
  static const update_available_filled = IconData(
    0xe126,
    fontFamily: iconFontFamily,
    fontPackage: iconFontPackage,
  );

  /// Font icon named "__update available__"
  ///
  /// <image width='32px' src='data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI0IiB3aWR0aD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjY2MyAyLjEyOSA5LjIyIDQuMzVsLTMuMzA0LS4xM2EuNS41IDAgMCAwLS41MTUuNDNsLS40NDggMy4yNzMtMi42MDkgMi4wMjNhLjUuNSAwIDAgMC0uMTE4LjY2M2wxLjc2MiAyLjc5Mi0uNjk4IDMuMjNhLjUuNSAwIDAgMCAuMzM2LjU4MmwzLjE0NCAxLjAwOSAxLjU0IDIuOTIyYS41LjUgMCAwIDAgLjYzMy4yM0wxMiAyMC4xMjRsMy4wNiAxLjI1YS41LjUgMCAwIDAgLjYzLS4yMjlsMS41MzgtMi45MjIgMy4xNDQtMS4wMTFhLjUuNSAwIDAgMCAuMzM3LS41ODFsLS42OTctMy4yMjggMS43NTgtMi43OTNhLjUuNSAwIDAgMC0uMTE1LS42NjNsLTIuNjEtMi4wMjMtLj


5C  7C 08 02 A6 */	mflr r0
/* 80415720 00410C60  90 01 00 24 */	stw r0, 0x24(r1)
/* 80415724 00410C64  39 61 00 20 */	addi r11, r1, 0x20
/* 80415728 00410C68  48 10 1E 11 */	bl func_80517538
/* 8041572C 00410C6C  80 A4 00 04 */	lwz r5, 4(r4)
/* 80415730 00410C70  7C 7D 1B 78 */	mr r29, r3
/* 80415734 00410C74  7C 9E 23 78 */	mr r30, r4
/* 80415738 00410C78  7C A0 00 34 */	cntlzw r0, r5
/* 8041573C 00410C7C  54 1F D9 7F */	rlwinm. r31, r0, 0x1b, 5, 0x1f
/* 80415740 00410C80  40 82 00 10 */	bne lbl_80415750
/* 80415744 00410C84  7C A3 2B 78 */	mr r3, r5
/* 80415748 00410C88  48 00 01 39 */	bl func_80415880
/* 8041574C 00410C8C  7C 7F 1B 78 */	mr r31, r3
lbl_80415750:
/* 80415750 00410C90  2C 1F 00 00 */	cmpwi r31, 0
/* 80415754 00410C94  41 82 00 4C */	beq lbl_804157A0
/* 80415758 00410C98  80 1D 00 08 */	lwz r0, 8(r29)
/* 8041575C 00410C9C  2C 00 00 00 */	cmpwi r0, 0
/* 80415760 00410CA0  40 82 00 14 */	bne lbl_80415774
/* 80415764 00410CA4  7F A3 EB 78 */	mr r3, r29
/* 80415768 00410CA8  7F C4 F3 78 */	mr r4, r30
/* 8041576C 00410CAC  4B FF FE E5 */	bl func_80415650
/* 80415770 00410CB0  48 00 00 30 */	b lbl_804157A0
lbl_80415774:
/* 80415774 00410CB4  38 00 00 00 */	li r0, 0
/* 80415778 00410CB8  93 BE 00 04 */	stw r29, 4(r30)
/* 8041577C 00410CBC  90 1E 00 08 */	stw r0, 8(r30)
/* 80415780 00410CC0  80 1D 00 00 */	lwz r0, 0(r29)
/* 80415784 00410CC4  90 1E 00 0C */	stw r0, 0xc(r30)
/* 80415788 00410CC8  80 7D 00 00 */	lwz r3, 0(r29)
/* 8041578C 00410CCC  93 C3 00 08 */	stw r30, 8(r3)
/* 80415790 00410CD0  80 7D 00 08 */	lwz r3, 8(r29)
/* 80415794 00410CD4  93 DD 00 00 */	stw r30, 0(r29)
/* 80415798 00410CD8  38 03 00 01 */	addi r0, r3, 1
/* 8041579C 00410CDC  90 1D 00 08 */	stw r0, 8(r29)
lbl_804157A0:
/* 804157A0 00410CE0  39 61 00 20 */	addi r11, r1, 0x20
/* 804157A4 00410CE4  7F E3 FB 78 */	mr r3, r31
/* 80415


_i">18 M. D. Dayhoff, Atlas of Protein Sequence and Structure (National Biomedical Research Foundation, Silver Spring, Maryland: 1972) Vol. 5, Matrix 1, p. D-8.

19 Murray Eden, "Inadequacies of Neo-Darwinian Evolution as a Scientific Theory," Mathematical Challenges to the Neo-Darwinian Interpretation of Evolution, (Wistar Institute Press, Philadelphia: 1967) pp. 8-10.

20 Julian Huxley, Evolution in Action (Harper and Brothers, New York: 1953) p. 48.

21 Op. Cit., Dawkins, p. 317.

22 E.g., where a chicken hatches from a rattlesnake egg.

23 If Scan doesn't fit this prescription, I guarantee you I could write a scanner that did.

24 In general they won't be. Typically, to get a more accurate (and less favorable) answer, you need something like a Feynman path integral.

25 Specifically, the 21st chromosome. Op. Cit., Gould, pp. 160-168.

26 H. B. D. Ketterwell, "Darwin's Missing Evidence" L. F. Laporte, Ed., Evolution and the Fossil Record (W. H. Freeman, San Fransisco:1978) pp. 28-33. Or see the Scientific American, March, 1959.

27 The simplification is simply that there are probably a number of different genes and fitness factors involved in the real world. The information being injected into the system changes the combination of these genes rather than just one.

28 Note that the origin of these genes is an entirely different matter. Although Ketterwell speaks as if the genes mutated into existence in part of his article, he acknowledge that they had already existed for thousands of years in another part, perhaps evolving as part of a much more complex set of conditions. Certainly, one would expect a much greater information input in order to actually bring such genes into existence if evolution is reactive.

29 Certainly the environment will couple a little bit of information into the system by accident, but not nearly enough. It would be more like the 1 bit required by the peppered moth, than the  or so needed.

In the Beginning...

Now that we have discussed evolution a little, let's return to the question of the beginning of


c-6e5f, U+6e61-6e63, U+6e65-6e67, U+6e6a-6e6b, U+6e6d-6e70, U+6e72-6e74, U+6e76-6e78, U+6e7c, U+6e80-6e82, U+6e86-6e87, U+6e89, U+6e8d, U+6e8f, U+6e96, U+6e98, U+6e9d-6e9f, U+6ea1, U+6ea5-6ea7, U+6eab, U+6eb1-6eb2, U+6eb4, U+6eb7, U+6ebb-6ebd, U+6ebf-6ec6, U+6ec8-6ec9, U+6ecc, U+6ecf-6ed0, U+6ed3-6ed4, U+6ed7;
}
/* [60] */
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Noto Sans SC Medium'), local('NotoSansSC-Medium'), url(https://fonts.gstatic.com/s/notosanssc/v11/k3kIo84MPvpLmixcA63oeALZ3aGt9CX8-qzYBR2czuUKGJi6mhkslBoPRyOEMbc0fwtw3D1FuxsCDw.60.woff2) format('woff2');
  unicode-range: U+6cb2, U+6cb4-6cb5, U+6cb7, U+6cba, U+6cbc-6cbd, U+6cc1-6cc3, U+6cc5-6cc7, U+6cd0-6cd4, U+6cd6-6cd7, U+6cd9-6cda, U+6cde-6ce0, U+6ce4, U+6ce6, U+6ce9, U+6ceb-6cef, U+6cf1-6cf2, U+6cf6-6cf7, U+6cfa, U+6cfe, U+6d03-6d05, U+6d07-6d08, U+6d0a, U+6d0c, U+6d0e-6d11, U+6d13-6d14, U+6d16, U+6d18-6d1a, U+6d1c, U+6d1f, U+6d22-6d23, U+6d26-6d29, U+6d2b, U+6d2e-6d30, U+6d33, U+6d35-6d36, U+6d38-6d3a, U+6d3c, U+6d3f, U+6d42-6d44, U+6d48-6d49, U+6d4d, U+6d50, U+6d52, U+6d54, U+6d56-6d58, U+6d5a-6d5c, U+6d5e, U+6d60-6d61, U+6d63-6d65, U+6d67, U+6d6c-6d6d, U+6d6f, U+6d75, U+6d7b-6d7d, U+6d87, U+6d8a, U+6d8e, U+6d90-6d9a, U+6d9c-6da0, U+6da2-6da3, U+6da7, U+6daa-6dac, U+6dae, U+6db3-6db4, U+6db6, U+6db8, U+6dbc, U+6dbf, U+6dc2;
}
/* [61] */
@font-face {


ender_num);

        // note:  serious optimization opportunity here,
        //  by sorting the triangles the following "continue"
        //  could have been made into a "break" statement.
        if (p0 == p1 || p1 == p2 || p2 == p0)
        {
            continue;
        }

        newTris[newI++] = labelledTri(p0, p1, p2, 0);
    }
    newTris.setSize(newI);

    // Convert vert into pointField.
    pointField newPoints(vert.num);

    for (int i=0; i<vert.num; i++)
    {
        const ::Vector & v = vert[i];

        newPoints[i] = point(v.x, v.y, v.z);
    }

    triSurface surf2(newTris, newPoints);

    triSurface outSurf
    (
        surf2.localFaces(),
        surf2.patches(),
        surf2.localPoints()
    );

    Info<< "Coarsened surface:" << endl;
    surf2.writeStats(Info);
    Info<< endl;

    Info<< "Writing to file " << outFileName << endl << endl;

    surf2.write(outFileName);

    Info<< "End\n" << endl;

    return 0;
}

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


ITE_CLOUDS =
  {
     12, 13, 14, 15, 16, 17, 18,
     19, 20, 21, 22, 23, 24, 25,
     26, 27, 28, 30, 32
  }

  SKY_CLOUDS =
  {
    200, 199, 198, 197
  }

  PURPLE_CLOUDS =
  {
    171, 172, 173, 174, 175, 174, 173, 172, 171
  }

  RAINBOW_CLOUDS =
  {
    145, 150, 154, 158,
    144, 143, 140, 137,
    187, 192, 196, 199,
    219, 215, 213, 211
  }

  -- hill colors --

  BLACK_HILLS =
  {
    0, 0, 0
  }

  BROWN_HILLS =
  {
    0, 3, 3, 4,
    96,97,98,99,100,76,77,78,
    79,80,81,82,83,84,123,122
  }

  TAN_HILLS =
  {
    96, 97, 98,
    99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110
  }

  GREEN_HILLS =
  {
    0, 1,
    210, 211, 212, 213, 214, 215, 216,
    217, 218, 219, 220, 221, 222, 223, 224
  }

  DARKGREEN_HILLS =
  {
    0, 1, 210, 211, 212, 213
  }

  HELL_HILLS =
  {
    0, 2, 145, 146, 147, 148, 149, 150, 151, 152,
    153
  }

  DARKBROWN_HILLS =
  {
    1, 2, 3, 4, 95, 96, 97, 98
  }

  GREENISH_HILLS =
  {
    0, 1, 225, 226, 227, 228, 96, 97, 98,
    232, 233, 234, 235, 236, 237
  }

  ICE_HILLS =
  {
    0, 185,
    193, 194, 195, 196, 197, 198, 199,
    200, 201, 202
  }
}

SKY_GEN_HERETIC.themes =
{
  psycho =
  {
    clouds =
    {
      PURPLE_CLOUDS  = 90
      YELLOW_CLOUDS  = 70
      HELLISH_CLOUDS = 20
      RAINBOW_CLOUDS = 10

      GREEN_CLOUDS = 70
      BLUE_CLOUDS  = 70
      WHITE_CLOUDS = 30
      GREY_CLOUDS  = 30
    }

    hills =
    {
      BLUE_CLOUDS = 50
      GREEN_HILLS = 50
      RAINBOW_CLOUDS = 50
      PURPLE_CLOUDS = 30
      YELLOW_CLOUDS = 30
      ORANGE_CLOUDS = 30
      WHITE_CLOUDS = 30
      HELLISH_CLOUDS = 20
    }

    -- no dark_hills
  }

  castle =
    -- at the moment a 1:1 copy of the Doom generator urban theme values
  {
    clouds =
    {
      SKY_CLOUDS = 130
      BLUE_CLOUDS = 80
      WHITE_CLOUDS = 80
      GREY_CLOUDS = 100
      DARK_CLOUDS = 100

      BROWN_CLOUDS = 60
      BROWNISH_CLOUDS = 40
      PEACH_CLOUDS = 40
      YELLOW_CLOUDS = 40
      ORANGE_CLOUDS = 40
      GREEN_CLOUDS = 25
      JADE_CLOUDS = 25
    }

    hills =
    {
      TAN_HILLS = 30
      BROWN_HILLS = 50
      DARKBROWN_HILLS = 50
      GREENISH_HILLS = 30
      ICE_HILLS = 12
      BLACK_HILLS = 5
    }

    dark_hills =
    {
      DARKGREEN_HILLS = 50
      DARKBROWN_HILLS = 50
      ICE_HILLS = 25
    }
  }

}

function SKY_GEN_HERETIC.setup(self)
  for name,opt in pairs(self.options) do
    local value = self.options[name].value
    PARAM[name] = value
  end

  PARAM.episode_sky_color


inesStack/sidecar/envoy"
	"github.com/NinesStack/sidecar/haproxy"
	"github.com/NinesStack/sidecar/healthy"
	"github.com/NinesStack/sidecar/service"
	"github.com/NinesStack/sidecar/sidecarhttp"
	"github.com/armon/go-metrics"
	"github.com/relistan/go-director"
	log "github.com/sirupsen/logrus"
	"gopkg.in/relistan/rubberneck.v1"
)

func announceMembers(list *memberlist.Memberlist, state *catalog.ServicesState) {
	for {
		// Ask for members of the cluster
		for _, member := range list.Members() {
			log.Debugf("Member: %s %s", member.Name, member.Addr)
			log.Debugf("Meta: %s", string(member.Meta))
		}

		state.RLock()
		log.Debug(state.Format(list))
		state.RUnlock()

		time.Sleep(2 * time.Second)
	}
}

// configureOverrides takes CLI opts and applies them over the top of settings
// taken from the environment variables and stored in config.
func configureOverrides(config *config.Config, opts *CliOpts) {
	if len(*opts.AdvertiseIP) > 0 {
		config.Sidecar.AdvertiseIP = *opts.AdvertiseIP
	}
	if len(*opts.ClusterIPs) > 0 {
		config.Sidecar.Seeds = *opts.ClusterIPs
	}
	if len(*opts.ClusterName) > 0 {
		config.Sidecar.ClusterName = *opts.ClusterName
	}
	if len(*opts.Discover) > 0 {
		config.Sidecar.Discovery = *opts.Discover
	}
	if len(*opts.LoggingLevel) > 0 {
		config.Sidecar.LoggingLevel = *opts.LoggingLevel
	}
}

func configureHAproxy(config *config.Config) *haproxy.HAproxy {
	proxy := haproxy.New(config.HAproxy.ConfigFile, config.HAproxy.PidFile)

	if len(config.HAproxy.BindIP) > 0 {
		proxy.BindIP = config.HAproxy.BindIP
	}

	if len(config.HAproxy.ReloadCmd) > 0 {
		proxy.ReloadCmd = config.HAproxy.ReloadCmd
	}

	if len(config.HAproxy.VerifyCmd) > 0 {
		proxy.VerifyCmd = config.HAproxy.VerifyCmd
	}

	if len(config.HAproxy.TemplateFile) > 0 {
		proxy.Template = config.HAproxy.TemplateFile
	}

	if len(config.HAproxy.User) > 0 {
		proxy.User = config.HAproxy.User
	}

	if len(config.HAproxy.Group) > 0 {
		proxy.Group = config.HAproxy.Group
	}

	proxy.UseHostnames = config.HAproxy.UseHostnames

	return proxy
}

func configureDiscovery(config *config.Config, publishedIP string, localNode *memberlist.Node) discovery.Discoverer {
	disco := new(discovery.MultiDiscovery)

	var svcNamer discovery.ServiceNamer
	var usingDocker bool
	var err error

	if len(config.Sidecar.Discovery) < 1 {
		log.Warn("No discovery method configured! Sidecar running in passive mode")
	}

	for _, method := range config.Sidecar.Discovery {
		if method == "docker" {
			usingDocker = true
		}
	}

	switch config.Services.ServiceNamer {
	case "docker_label":
		svcNamer = &discovery.DockerLabelNamer{
			Label: config.Services.NameLabel,
		}
	case "regex":
		svcNamer, err = discovery.NewRegexpNamer(config.Services.NameMatch)
		if err != nil {
			log.Fatalf("Unable to use RegexpNamer: %s", err)
		}
	default:
		if usingDocker {
			log.Fatalf("Unable to configu


    local collapse = doc.meta['collapse-callout']
    if not collapse then
     return nil
    end

    if collapse.all == false then
      return doc:walk(collapse_callout(callouts_all,'false'))
    elseif collapse.all == true then
      return doc:walk(collapse_callout(callouts_all, 'true'))
    else
      filtered_doc = doc
      for k, v in pairs{"caution", "important", "tip", "note", "warning"} do
        if collapse[v] == true then
          filtered_doc = filtered_doc:walk(
            collapse_callout({callouts_all[v]}, 'true')
          )
        elseif collapse[v] == false then
          filtered_doc = filtered_doc:walk(
            collapse_callout({callouts_all[v]}, 'false')
          )
        end
      end
      return filtered_doc
    end
    return nil
  end
end


rlen( "max" ) ) == 0 ){
		value = SCRIPT_INT_MIN;
		func = i64max;
	}else{
		ShowError( "buildin_%s: Unknown call case for min/max!\n", functionname );
		st->state = END;
		return SCRIPT_CMD_FAILURE;
	}

	// As long as we have data on our script stack
	while( script_hasdata(st,i) ){
		struct script_data *data;

		// Get the next piece of data from the script stack
		data = script_getdata( st, i );

		// Is the current parameter a single integer?
		if( data_isint( data ) ){
			value = func( value, script_getnum( st, i ) );
		// Is the current parameter an array variable?
		}else if( data_isreference( data ) ){
			const char *name;
			map_session_data* sd;
			uint32 start, end;

			// Get the name of the variable
			name = reference_getname(data);

			// Check if it's a string variable
			if( is_string_variable( name ) ){
				ShowError( "buildin_%s: illegal type, need integer!\n", functionname );
				script_reportdata( data );
				st->state = END;
				return SCRIPT_CMD_FAILURE;
			}

			// Get the session data, if a player is attached
			sd = st->rid ? map_id2sd(st->rid) : nullptr;

			if (not_server_variable(*name) && !script_rid2sd(sd)) {
				ShowError("buildin_%s: Cannot use a player variable '%s' if no player is attached.\n", functionname, name);
				return SCRIPT_CMD_FAILURE;
			}

			// Try to find the array's source pointer
			if( !script_array_src( st, sd, name, reference_getref( data ) ) ){
				ShowError( "buildin_%s: not a array!\n", functionname );
				script_reportdata( data );
				st->state = END;
				return SCRIPT_CMD_FAILURE;
			}

			// Get the start and end indices of the array
			start = reference_getindex( data );
			end = script_array_highest_key( st, sd, name, reference_getref( data ) );

			// Skip empty arrays
			if( start < end ){
				int32 id;

				// For getting the values we need the id of the array
				id = reference_getid( data );

				// Loop through each value stored in the array
				for( ; start < end; start++ ){
					value = func( value, get_val2_num( st, reference_uid( id, start ), reference_getref( data ) ) );
				}
			}
			else {
				value = func( value, 0 );
			}
		}else{
			ShowError( "buildin_%s: not a supported data type!\n", functionname );
			script_reportdata( data );
			st->state = END;
			return SCRIPT_CMD_FAILURE;
		}

		// Continue with the next stack entry
		i++;
	}

	script_pushint( st, value );

	return SCRIPT_CMD_SUCCESS;
}

BUILDIN_FUNC(cap_value)
{
	script_pushint64(st, cap_value(script_getnum64(st, 2), script_getnum64(st, 3), script_getnum64(st, 4)));
	return SCRIPT_CMD_SUCCESS;
}

/**
 * Safety Base/Job EXP addition than using `set BaseExp,n;` or `set JobExp,n;`
 * Unlike `getexp` that affected by some adjustments.
 * getexp2 <base_exp>,<job_exp>{,<char_id>};
 * @author [C


, callback, foundMatch =>
                {
                    ParticipantResults results = foundMatch.Results();

                    foreach (string participantId in outcome.ParticipantIds)
                    {
                        Types.MatchResult matchResult =
                            ResultToMatchResult(outcome.GetResultFor(participantId));
                        uint placing = outcome.GetPlacementFor(participantId);

                        if (results.HasResultsForParticipant(participantId))
                        {
                            // If the match already has results for this participant, make sure that they're
                            // consistent with what's already there.
                            var existingResults = results.ResultsForParticipant(participantId);
                            var existingPlacing = results.PlacingForParticipant(participantId);

                            if (matchResult != existingResults || placing != existingPlacing)
                            {
                                Logger.e(string.Format("Attempted to override existing results for " +
                                        "participant {0}: Placing {1}, Result {2}",
                                        participantId, existingPlacing, existingResults));
                                callback(false);
                                return;
                            }
                        }
                        else
                        {
                            // Otherwise, get updated results and dispose of the old ones.
                            var oldResults = results;
                            results = oldResults.WithResult(participantId, placing, matchResult);
                            oldResults.Dispose();
                        }
                    }

                    mTurnBasedManager.FinishMatchDuringMyTurn(foundMatch, data, results,
                        response => callback(response.RequestSucceeded()));
                });
        }

        private static Types.MatchResult ResultToMatchResult(MatchOutcome.ParticipantResult result)
        {
            switch (result)
            {
                case MatchOutcome.ParticipantResult.Loss:
                    return Types.MatchResult.LOSS;
                case MatchOutcome.ParticipantResult.None:
                    return Types.MatchResult.NONE;
                case MatchOutcome.ParticipantResult.Tie:
                    return Types.MatchResult.TIE;
                case MatchOutcome.ParticipantResult.Win:
                    return Types.MatchResult.WIN;
                default:
                    Logger.


 {
            assignments[i].col(r) = VectorXi::Map(&std_assignments[i][0] + r * num_tracks, num_tracks);
        }
    }
    return assignments;
}//
// Created by linh on 2023-02-02.
// Reference: https://github.com/aditya1601/kmeans-clustering-cpp
//

#ifndef MSADAPTIVEBIRTH_VISION_KMEAN_H
#define MSADAPTIVEBIRTH_VISION_KMEAN_H

#include <omp.h>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <vector>
#include <Eigen/Core>
#include <Eigen/LU>
#include <random>        /*uniform distribution*/

using namespace std;
using namespace Eigen;

class PointK {
private:
    int pointId, clusterId;
    int dimensions;
    vector<double> values;

public:
    PointK(int id, double x, double y) {
        pointId = id;
        values.emplace_back(x);
        values.emplace_back(y);
        dimensions = values.size();
        clusterId = 0; // Initially not assigned to any cluster
    }

    int getDimensions() { return dimensions; }

    int getCluster() { return clusterId; }

    int getID() { return pointId; }

    void setCluster(int val) { clusterId = val; }

    double getVal(int pos) { return values[pos]; }
};

class ClusterK {
private:
    int clusterId;
    vector<double> centroid;
    vector<PointK> points;

public:
    ClusterK(int clusterId, PointK centroid) {
        this->clusterId = clusterId;
        for (int i = 0; i < centroid.getDimensions(); i++) {
            this->centroid.push_back(centroid.getVal(i));
        }
        this->addPoint(centroid);
    }

    void addPoint(PointK p) {
        p.setCluster(this->clusterId);
        points.push_back(p);
    }

    bool removePoint(int pointId) {
        int size = points.size();
        for (int i = 0; i < size; i++) {
            if (points[i].getID() == pointId) {
                points.erase(points.begin() + i);
                return true;
            }
        }
        return false;
    }

    void removeAllPoints() { points.clear(); }

    int getId() { return clusterId; }

    PointK getPoint(int pos) { return points[pos]; }

    int getSize() { return points.size(); }

    double getCentroidByPos(int pos) { return centroid[pos]; }

    void setCentroidByPos(int pos, double val) { this->centroid[pos] = val; }
};

class KMeans {
private:
    int K, iters, dimensions, total_points;
    vector<ClusterK> clusters;
    std::random_device rand_dev;
    std::mt19937 generator;

    void clearClusters() {
        for (int i = 0; i < K; i++) {
            clusters[i].removeAllPoints();
        }
    }

    int getNearestClusterId(PointK point) {
        double sum = 0.0, min_dist;
        int NearestClusterId;
        if (dimensions == 1) {
            min_dist = abs(clusters[0].getCentroidByPos(0) - point.getVal(0));
        } else {
            for (int i = 0; i < dimensions; i++) {
                sum += pow(clusters[0].getCentroidByPos(i) - point.getVal(i), 2.0);
                // sum += abs(clusters[0].getCentroidByPos(i) - point.getVal(i));
            }
            min_dist = sqrt(sum);
        }
        NearestClusterId = clusters[0].getId();


A== 188596
IOCqruCrguCqlQ== 188597
IGvDqg== 188598
44GV44KM44Gf 188599
LlJP 188600
IGF1ZGl0ZWQ= 188601
IExhbWlu 188602
4YOQ4YOj4YOg4YOY 188603
YmV05L2T6IKy 188604
IHLDpWRn 188605
IG9kc3RyYW4= 188606
INeh15HXmdeR 188607
IOCmquCmsOCmv+CmleCmsuCnjeCmqg== 188608
aWVrcw== 188609
IGl6dmFq 188610
15zXmdeq 188611
IGltdQ== 188612
2rPZiA== 188613
ZMOtYQ== 188614
LVN0ZXA= 188615
Q2xvc2Vy 188616
INmI2KPZg9ir2LE= 188617
IGZpam8= 188618
ZmZhYQ== 188619
IGJ1cmdlb25pbmc= 188620
aW1oc2U= 188621
4K+B4K6u4K6+4K6w4K+N 188622
IOCupOCvgeCuow== 188623
IFdpa2lww6lkaWE= 188624
IHByZWRpY2F0ZXM= 188625
IHVuZGVyZXN0aW1hdGVk 188626
IG1hdHJpbW9uaWFs 188627
Q2hlY2tsaXN0 188628
IHTDoXJz 188629
IGVuZG9jcmluZQ== 188630
X2Zvcm11bGE= 188631
IOC0teC0v+C0leC0uA== 188632
5oKo5aW9 188633
4Kao4KeA4Kak4Ka/ 188634
5a6i5qeY 188635
IOCmquCngeCmsuCmv+CmtuCnh+CmsA== 188636
IGFkYXB0YWJpbGl0eQ== 188637
0p/QsNK10LDRgNCw 188638
IHVwc2V0dGluZw== 188639
IHppdg== 188640
IEdBTg== 188641
cnLDvMWI 188642
IGF0cmHDp8O1ZXM= 188643
ZXh0cmFjb21tZW50 188644
QnVlbm9z 188645
LmV0aGVyZXVt 188646
INio2KfZhNiu 188647
IGxpbGxh 188648
INin2YTYtdmG2KfYudip 188649
IGVuaGFuY2Vy 188650
INCR0LDRgg== 188651
INqv24zYsQ== 188652
em9hbHM= 188653
IFNUSQ== 188654
ICV7 188655
LnF0 188656
PSov 188657
IGxhdGloYW4= 188658
IOi/kA== 188659
Lk1hc2s= 188660
IG9rdXQ= 188661
IOCksuCkv+CkqA== 188662
L19f 188663
IGluZHVj 188664
eXB0ZXI= 188665
INCe0LrRgg== 188666
IG1pZHBvaW50 188667
IM+DzrE= 188668
CWV2 188669
IGZlaXRl 188670
SHVuZw== 188671
IEhlbW9z 188672
IEV4cGVk 188673
INee15DWt9eg 188674
IHRhemE= 188675
IHdpZmUncw== 188676
IGdlc3R1dXJk 188677
5aSE572a 188678
INmI2YTYsNmE2YM= 188679
IHNjaGxhZmVu 188680
IGR1bnlh 188681
IFJhdHM= 188682
IHZvbGM= 188683
IHN1YnJlZGRpdA== 188684
IGthyrs= 188685
5bCx5piv


ed.sidebar-pane-separator .folder-frame > scrolledwindow:dir(ltr) {
  border: none;
}

.sidebar.vertical > paned.geary-sidebar-pane-separator .geary-folder-frame > scrolledwindow:dir(rtl), .sidebar.vertical > paned.sidebar-pane-separator .folder-frame > scrolledwindow:dir(rtl) {
  border: none;
}

.solid-csd .geary-titlebar-right, .solid-csd .geary-titlebar-left {
  border-radius: 0;
  box-shadow: none;
}

.geary-titlebar-right separator,
.geary-titlebar-left separator {
  opacity: 0;
}

stack#conversation_viewer scrolledwindow.geary-conversation-scroller > viewport.frame {
  border: none;
}

popover.background list.geary-folder-popover-list row.activatable.geary-folder-popover-list-row label {
  color: rgba(255, 255, 255, 0.8);
}

popover.background list.geary-folder-popover-list row.activatable.geary-folder-popover-list-row label:disabled {
  color: rgba(255, 255, 255, 0.3);
}

/************
 * Inkscape *
 ************/
#ToolboxCommon > #AuxToolbox #StyleSwatch {
  font-size: smaller;
}

#ToolboxCommon > #AuxToolbox #Kludge {
  padding: 0;
}

#ToolboxCommon > #AuxToolbox spinbutton,
#ToolboxCommon > #AuxToolbox entry {
  min-height: 32px;
}

#ToolboxCommon > #AuxToolbox button:not(.up):not(.down) {
  min-height: 24px;
  min-width: 16px;
  padding: 4px 8px;
  border-radius: 7px;
  -gtk-outline-radius: 7px;
}

#ToolboxCommon > #AuxToolbox spinbutton button {
  border-width: 4px;
}

#ToolboxCommon > toolbar.vertical {
  margin-top: -4px;
}

#ToolboxCommon > toolbar.vertical button {
  min-height: 24px;
  min-width: 24px;
  padding: 4px;
  border-radius: 7px;
  -gtk-outline-radius: 7px;
}

#CanvasTable button {
  min-height: 16px;
  min-width: 16px;
  padding: 0;
}

#CanvasTable #HorizontalScrollbar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#CanvasTable #VerticalScrollbar:dir(ltr) {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

#CanvasTable #VerticalScrollbar:dir(rtl) {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#Canvas_and_Dock frame > border {
  border: none;
}

#Canvas_and_Dock widget > widget > button.flat {
  min-height: 16px;
  min-width: 16px;
  padding: 4px;
}

#Canvas_and_Dock widget > widget > box.horizontal image {
  padding: 4px;
}

#Canvas_and_Dock box.horizontal > box.vertical > button.flat {
  min-height: 16px;
  min-width: 24px;
  padding: 8px 4px;
}

/***********
 * Synapse *
 ***********/
box.vertical > widget > widget:selected {
  background-color: #5657f5;
}

/***********
 *  xfce4  *
 ***********/
.xfce4-panel button, .xfce4-panel button.flat {
  color: rgba(255, 255, 255, 0.


block_number: T::BlockNumber) {
            debug::info!("Entering off-chain worker");
        }
    }
}

impl<T: Config> Module<T> {
    /// Append a new number to the tail of the list, removing an element from the head if reaching
    ///   the bounded length.
    fn append_or_replace_number(number: u64) {
        Numbers::mutate(|numbers| {
            if numbers.len() == NUM_VEC_LEN {
                let _ = numbers.pop_front();
            }
            numbers.push_back(number);
            debug::info!("Number vector: {:?}", numbers);
        });
    }

    fn offchain_unsigned_tx(_block_number: T::BlockNumber) -> Result<(), Error<T>> {
        // let number: u64 = block_number.try_into().unwrap_or(0) as u64;

        let number: u64 = 0 as u64;
        let call = Call::submit_number_unsigned(number);

        // `submit_unsigned_transaction` returns a type of `Result<(), ()>`
        //   ref: https://substrate.dev/rustdocs/v2.0.0/frame_system/offchain/struct.SubmitTransaction.html#method.submit_unsigned_transaction
        SubmitTransaction::<T, Call<T>>::submit_unsigned_transaction(call.into()).map_err(|_| {
            debug::error!("Failed in offchain_unsigned_tx");
            <Error<T>>::OffchainUnsignedTxError
        })
    }

    fn offchain_unsigned_tx_signed_payload(_block_number: T::BlockNumber) -> Result<(), Error<T>> {
        // Retrieve the signer to sign the payload
        let signer = Signer::<T, T::AuthorityId>::any_account();

        // let number: u64 = block_number.try_into().unwrap_or(0) as u64;
        let number: u64 = 0 as u64;

        // `send_unsigned_transaction` is returning a type of `Option<(Account<T>, Result<(), ()>)>`.
        //   Similar to `send_signed_transaction`, they account for:
        //   - `None`: no account is available for sending transaction
        //   - `Some((account, Ok(())))`: transaction is successfully sent
        //   - `Some((account, Err(())))`: error occured when sending the transaction
        if let Some((_, res)) = signer.send_unsigned_transaction(
            |acct| Payload {
                number,
                public: acct.public.clone(),
            },
            Call::submit_number_unsigned_with_signed_payload,
        ) {
            return res.map_err(|_| {
                debug::error!("Failed in offchain_unsigned_tx_signed_payload");
                <Error<T>>::OffchainUnsignedTxSignedPayloadError
            });
        }

        // The case of `None`: no account is available for sending
        debug::error!("No local account available");
        Err(<Error<T>>::NoLocalAcctForSigning)
    }
}

impl<T: Config> frame_support::unsigned::ValidateUnsigned for Module<T> {
    type Call = Call<T>;

    fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity {
        let valid_tx = |provide| {
            ValidTransaction::with_tag_prefix("ocw-demo")
                .priority(UNSIGNED_TXS_PRIORITY)
                .and_provides([&provide])
                .longevity(3)
                .propagate(true)
                .build()
        };

        match call {
            Call::submit_number_unsigned(_number) => valid_tx(b"submit_number_unsigned".to_vec()),
            Call::submit_number_unsigned_with_signed_payload(ref payload, ref signature) => {
                if !SignedPayload::<T>::verify::<T::AuthorityId>(payload, signature.clone()) {
                    return InvalidTransaction::BadProof.into();


/** \file
 * \brief list of all created dialogs
 *
 * See Copyright Notice in "iup.h"
 */

#include <stdlib.h>

#include "iup.h"

#include "iup_dlglist.h"
#include "iup_object.h"
#include "iup_assert.h"

typedef struct Idiallst_
{
  Ihandle *ih;
  struct Idiallst_ *next;
} Idiallst;

static Idiallst *idlglist = NULL;  /* list of all created dialogs */
static int idlg_count = 0;

void iupDlgListAdd(Ihandle *ih)
{
  if (ih)
  {
    Idiallst *p=(Idiallst *)malloc(sizeof(Idiallst));
    if (!p)
      return;
    p->ih = ih;
    p->next = idlglist;
    idlglist = p;
    idlg_count++;
  }
}

void iupDlgListRemove(Ihandle *ih)
{
  if (!idlglist || !ih)
    return;

  if (idlglist->ih == ih)    /* ih is header */
  {
    Idiallst *p = idlglist->next;
    free(idlglist);
    idlglist = p;
    idlg_count--;
  }
  else
  {
    Idiallst *p;    /* current pointer */
    Idiallst *b;    /* before pointer */
    for (b = idlglist, p = idlglist->next; p; b = p, p = p->next)
    {
      if (p->ih == ih)
      {
        b->next = p->next;
        free (p);
        idlg_count--;
        return;
      }
    }
  }
}

static Idiallst *idlg_first = NULL;

int iupDlgListCount(void)
{
  return idlg_count;
}

Ihandle *iupDlgListFirst (void)
{
  idlg_first = idlglist;
  return iupDlgListNext();
}

Ihandle *iupDlgListNext (void)
{
  Ihandle *ih = NULL;
  if (idlg_first)
  {
    ih = idlg_first->ih;
    idlg_first = idlg_first->next;
  }
  return ih;
}

static int idlg_nvisiblewin = 0;

void iupDlgListVisibleInc(void)
{
  iupASSERT(idlg_nvisiblewin < idlg_count);
  if (idlg_nvisiblewin == idlg_count)
    return;
  idlg_nvisiblewin++;
}

void iupDlgListVisibleDec(void)
{
  iupASSERT(idlg_nvisiblewin > 0);
  idlg_nvisiblewin--;
}

int iupDlgListVisibleCount(void)
{
  return idlg_nvisiblewin;
}

void iupDlgListDestroyAll(void)
{
  int i = 0, count;
  Ihandle** ih_array = (Ihandle**)malloc(idlg_count * sizeof(Ihandle*));
  Idiallst *list;
  for (list = idlglist; list; list = list->next)
  {
    if (iupObjectCheck(list->ih))
    {
      ih_array[i] = list->ih;
      i++;
    }
  }

  count = i;
  for (i = 0; i < count; i++)
  {
    if (iupObjectCheck(ih_array[i]))
      IupDestroy(ih_array[i]);   /* this will also destroy the list */
  }

  free(ih_array);
}


te();

        if (into == null) {
            palette = new PreLoaded();
        }

        palette.setEnable(true);

        /*
         * get the data
         */

        int field = 1;
        String[][] name = ((ScilabString) data.get(field)).getData();

        field++;
        String[][] blockNames = ((ScilabString) data.get(field)).getData();

        field++;
        String[][] icons = ((ScilabString) data.get(field)).getData();

        /*
         * Configure the current palette instance
         */

        palette.setName(name[0][0]);

        final List<PaletteBlock> paletteBlocks = palette.getBlock();
        for (int i = 0; i < blockNames.length; i++) {
            for (int j = 0; j < blockNames[i].length; j++) {
                PaletteBlock current = new PaletteBlock();
                current.setName(blockNames[i][j]);

                VariablePath iconPath = new VariablePath();
                iconPath.setVariable(null);
                File icon = new File(icons[i][j]);
                if (!icon.exists()) {
                    /*
                     * Invoke scilab to create a new palette icon later (eg. not
                     * on this thread)
                     */
                    final StringBuilder str = new StringBuilder();
                    str.append(ScilabInterpreterManagement.buildCall(ScilabDirectHandler.BLK + "=" + blockNames[i][j], "define"));
                    str.append("; ");
                    str.append(ScilabInterpreterManagement.buildCall("xcosPalGenerateIcon", ScilabDirectHandler.BLK.toCharArray(), icons[i][j]));
                    str.append("; ");
                    ScilabInterpreterManagement.putCommandInScilabQueue(str.toString());
                }
                iconPath.setPath(icons[i][j]);
                current.setIcon(iconPath);

                paletteBlocks.add(current);
            }
        }

        return palette;
    }

    /**
     * Validate the current data.
     *
     * This method doesn't pass the metrics because it perform many test.
     * Therefore all these tests are trivial and the conditioned action only
     * throw an exception.
     *
     * @throws ScicosFormatException
     *             when there is a validation error.
     */
    // CSOFF: CyclomaticComplexity
    // CSOFF: NPathComplexity
    private void validate() throws ScicosFormatException {
        if (!canDecode(data)) {
            throw new WrongElementException();
        }

        int field = 0;

        // we test if the structure as enough field
        if (data.size() != DATA_FIELD_NAMES.size()) {
            throw new WrongStructureException(DATA_FIELD_NAMES);
        }

        /*
         * Checking the TList header
         */

        // Check the first field
        if (!(data.get(field) instanceof ScilabString)) {
            throw new WrongTypeException(DATA_FIELD_NAMES, field);
        }
        final String[] header = ((ScilabString) data.get(field)).getData()[0];

        // Checking for the field names
        if (header.length != DATA_FIELD_NAMES.size()) {
            throw new WrongStructureException(DATA_FIELD_NAMES);
        }
        for (int i = 0; i < header.length; i++) {
            if (!header[i].equals(DATA_FIELD_NAMES.get(i))) {
                throw new WrongStructureException(DATA_FIELD_NAMES);
            }
        }

        /*
         * Checking the data
         */

        // the second field must contain the palette name.
        field++;
        if


),
    FILTER_AFTERTCH_FREQUENCY_DEPTH(49, null, 13, Boundaries.CENTRIC_127),
    FILTER_BREATH_FREQUENCY_DEPTH(50, null, 14, Boundaries.CENTRIC_127),
    FILTER_MODWHEEL_LFO2_FREQUENCY_DEPTH(53, null, 15, Boundaries.CENTRIC_127),
    FILTER_AFTERTCH_LFO2_FREQUENCY_DEPTH(54, null, 16, Boundaries.CENTRIC_127),
    FILTER_BREATH_LFO2_FREQUENCY_DEPTH(55, null, 17, Boundaries.CENTRIC_127),
    ////
    // Mixer
    ////
    MIXER_OSC1(37, 72, null),
    MIXER_OSC2(38, 73, null),
    MIXER_OSC3(39, 74, null),
    MIXER_NOISE(40, 75, null),
    MIXER_RING_MOD(41, 76, null),
    MIXER_EXTERNAL(42, 77, null),
    ////
    // ARP
    ////
    ARP_ON_OFF(Convertors.Packed.PACKED7, Boundaries.BOOLEAN),
    ARP_OCTAVES(Convertors.Packed.PACKED7, Boundaries.ARP_OCTAVES),
    ARP_KEY_SYNC(Convertors.Packed.PACKED7, Boundaries.BOOLEAN),
    ARP_LATCH(Convertors.Packed.PACKED7, Boundaries.BOOLEAN),
    ARP_NOTE_DESTINATION(Convertors.Packed.PACKED7, Boundaries.ARP_NOTE_DESTINATION),
    ARP_RATE_NON_SYNC(84, 9, null, Boundaries.ARP_NON_SYNC_RATES),
    ARP_RATE_SYNC(85, 87, null, Boundaries.ARP_SYNC_RATES),
    ARP_GATE_TIME(86, 88, null),
    ARP_PATTERN(87, 3, null, Boundaries.ARP_PATTERN),
    // TODO not sure what this is, ARP latch by sustain pedal perhaps ?
    // ARP_LATCH_ON_MOMENTARY(null, 64, null),
    ////
    // Effects - equalizer
    ////
    EQUALIZER_LEVEL(92, 33, null, Boundaries.EQUALIZER_LEVEL),
    EQUALIZER_FREQUENCY(93, 34, null),
    EQUALIZER_RATE_NON_SYNC(94, 35, null),
    EQUALIZER_RATE_SYNC(95, 36, null, Boundaries.SYNC_RATES),
    EQUALIZER_MOD_DEPTH(96, 37, null),
    EQUALIZER_GLOBAL_SYNC(Convertors.Packed.PACKED9, Boundaries.EQUALIZER_GLOBAL_SYNC),
    ////
    // Effects - delay
    ////
    DELAY_SEND_LEVEL(100, 92, null),
    DELAY_SEND_MODWHEEL(101, 18, null, Boundaries.CENTRIC_127),
    DELAY_TIME_NON_SYNC(102, 19, null),
    DELAY_TIME_SYNC(103, 20, null, Boundaries.DELAY_SYNC_RATES),
    DELAY_FEEDBACK(104, 21, null),
    DELAY_STEREO_WIDTH(105, 22, null),
    DELAY_RATIO(106, 23, null, Boundaries.DELAY_RATIO),
    ////
    // Effects - chorus/flanger
    ////
    CHORUS_SEND_LEVEL(110, 93, null),
    CHORUS_TYPE(Convertors.Packed.PACKED8, Boundaries.CHORUS_TYPES),
    CHORUS_SEND_MODWHEEL(111, 26, null, Boundaries.CENTRIC_127),
    CHORUS_RATE_NON_SYNC(112, 27, null),
    CHORUS_RATE_


GFX10: encoding: [0xfa,0x04,0x0a,0x06,0x01,0x6f,0x01,0x00]

v_sub_f32_e32 v5, v1, v2
// GFX10: encoding: [0x01,0x05,0x0a,0x08]

v_sub_f32_e32 v255, v1, v2
// GFX10: encoding: [0x01,0x05,0xfe,0x09]

v_sub_f32_e32 v5, v255, v2
// GFX10: encoding: [0xff,0x05,0x0a,0x08]

v_sub_f32_e32 v5, s1, v2
// GFX10: encoding: [0x01,0x04,0x0a,0x08]

v_sub_f32_e32 v5, s101, v2
// GFX10: encoding: [0x65,0x04,0x0a,0x08]

v_sub_f32_e32 v5, vcc_lo, v2
// GFX10: encoding: [0x6a,0x04,0x0a,0x08]

v_sub_f32_e32 v5, vcc_hi, v2
// GFX10: encoding: [0x6b,0x04,0x0a,0x08]

v_sub_f32_e32 v5, m0, v2
// GFX10: encoding: [0x7c,0x04,0x0a,0x08]

v_sub_f32_e32 v5, exec_lo, v2
// GFX10: encoding: [0x7e,0x04,0x0a,0x08]

v_sub_f32_e32 v5, exec_hi, v2
// GFX10: encoding: [0x7f,0x04,0x0a,0x08]

v_sub_f32_e32 v5, 0, v2
// GFX10: encoding: [0x80,0x04,0x0a,0x08]

v_sub_f32_e32 v5, -1, v2
// GFX10: encoding: [0xc1,0x04,0x0a,0x08]

v_sub_f32_e32 v5, 0.5, v2
// GFX10: encoding: [0xf0,0x04,0x0a,0x08]

v_sub_f32_e32 v5, -4.0, v2
// GFX10: encoding: [0xf7,0x04,0x0a,0x08]

v_sub_f32_e32 v5, 0xaf123456, v2
// GFX10: encoding: [0xff,0x04,0x0a,0x08,0x56,0x34,0x12,0xaf]

v_sub_f32_e32 v5, 0x3f717273, v2
// GFX10: encoding: [0xff,0x04,0x0a,0x08,0x73,0x72,0x71,0x3f]

v_sub_f32_e32 v5, v1, v255
// GFX10: encoding: [0x01,0xff,0x0b,0x08]

v_sub_f32_e64 v5, v1, v2
// GFX10: encoding: [0x05,0x00,0x04,0xd5,0x01,0x05,0x02,0x00]

v_sub_f32_e64 v255, v1, v2
// GFX10: encoding: [0xff,0x00,0x04,0xd5,0x01,0x05,0x02,0x00]

v_sub_f32_e64 v5, v255, v2
// GFX10: encoding: [0x05,0x00,0x04,0


();
        leftTop = MathUtil.applyMatrix(leftTop, matrix);
        rightBottom = MathUtil.applyMatrix(rightBottom, matrix);
        parent = parent.getParent();
      }
      const matrix = parent.getMatrix();
      leftTop = MathUtil.applyMatrix(leftTop, matrix);
      rightBottom = MathUtil.applyMatrix(rightBottom, matrix);
    } else {
      leftTop = MathUtil.applyMatrix(leftTop, root);
      rightBottom = MathUtil.applyMatrix(rightBottom, root);
    }
    return {
      minX: leftTop.x,
      minY: leftTop.y,
      maxX: rightBottom.x,
      maxY: rightBottom.y
    };
  },
  /**
   * element to back
   * @param  {object} element g shape or group
   */
  toBack(element: G.Shape | G.Group) {
    element.toBack();
  },
  /**
   * element to front
   * @param  {object} element g shape or group
   */
  toFront(element: G.Shape | G.Group) {
    element.toFront();
  }
};

export = GraphicUtil;

import G from '@antv/g/lib';

type GraphicUtil = typeof GraphicUtil;
import tail from './tail';

/**
 * Removes first character.
 * @param x a string
 */
function shift(x: string): string {
  return tail(x);
}
export default shift;
/**
 * 判断节点是不是一个list
 * @param {*} node 节点
 */
export default function isList(node) {
  const { data } = node;
  return !!data.get('list');
}
import { _intersectionSwapTs } from "../internal/_intersectionSwapTs";
import { intersectionResultAlloc } from "../intersectionResultFunctions/intersectionResultAlloc";
import { rayIntersectSegment } from "../rayFunctions/rayIntersectSegment";
import { Ray, Segment } from "../types";

/**
 * Computes the intersection point between the ray and the segment, if it exists.
 *
 * Finds the location at which the ray and segment meet. If the ray "misses" the segment,
 * this function returns no intersection. For edge cases where the ray completely overlaps the segment,
 * or starts within the segment, this function returns the _first_ point that the intersection occurs,
 * according to the segment's parameterization.
 *
 * The returned value is an {@link IIntersectionResult} object which will have have the
 * `exists` flag set to `true` iff an intersection was found. It additionally
 * has the following fields, if the intersection exists:
 *
 * - `x` – the x-coordinate of the point of intersection
 * - `y` – the y-coordinate of the point of intersection
 * - `t0` – where along the segment's geometry the intersection was found,
 *      according to the segment's parameterization
 * - `t1` – where along the ray's geometry the intersection was found,
 *      according to the ray's parameterization
 *
 * Almost equivalent to {@link rayIntersectSegment}, except the _t0_ and _t1_ values are reversed.
 *
 * @param segment the segment to intersect
 * @param ray the ray to find intersection with
 * @param out
 */
export function segmentIntersectRay(segment: Segment, ray: Ray, out = intersectionResultAlloc()) {
  return _intersectionSwapTs(rayIntersectSegment(ray, segment, out));
}
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

import objectPath from 'object-path';
import { URL } from 'url';

// Configuration Assumptions:
// In URL syntax, we define a custom scheme of "env://" which resolves
// an environment variable in the object, directly overwriting the
// original value.
//
// For example:
//   "env://HOSTNAME" will resolve on a Windows machine to its hostname
//
// Note that this use of a custom scheme called "env" is not an officially
// recommended or supported thing, but it has worked great for us!

const envProtocol = 'env:';

export interface I


-shadow:0px 0px 5px 0px rgba(0,0,0,0.2);color:#3c763d}.ax5-ui-menu.success .ax-menu-heading{font-weight:600;padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:4px;border-top-left-radius:4px;color:#3c763d;background-color:#dff0d8;background-image:-webkit-linear-gradient(bottom, #dff0d8);background-image:linear-gradient(to top,#dff0d8)}.ax5-ui-menu.success .ax-menu-heading .badge{font-size:0.8em;color:#dff0d8;background-color:#3c763d;background-image:-webkit-linear-gradient(bottom, #3c763d);background-image:linear-gradient(to top,#3c763d)}.ax5-ui-menu.success .ax-menu-body{padding:5px 0px;text-align:center;position:relative;overflow:hidden}.ax5-ui-menu.success .ax-menu-body .ax-menu-item{padding:4px 0px;text-align:left;background:#eee;color:#79DBD7;cursor:pointer;font-size:13px;display:table;position:relative;border-collapse:separate;box-sizing:border-box;overflow:hidden;width:100%;height:18px}.ax5-ui-menu.success .ax-menu-body .ax-menu-item .ax-menu-item-cell{box-sizing:border-box;display:table-cell;vertical-align:middle;white-space:nowrap;font-size:13px;line-height:18px;padding:0px 0px 0px 0px;user-select:none}.ax5-ui-menu.success .ax-menu-body .ax-menu-item .ax-menu-item-cell.ax-menu-item-checkbox{overflow:hidden;width:18px;text-align:center}.ax5-ui-menu.success .ax-menu-body .ax-menu-item .ax-menu-item-cell.ax-menu-item-checkbox .item-checkbox-wrap{position:relative;display:block;width:18px;height:18px}.ax5-ui-menu.success .ax-menu-body .ax-menu-item .ax-menu-item-cell.ax-menu-item-checkbox .item-checkbox-wrap.useCheckBox:after{content:'';width:10px;height:5px;position:absolute;top:4px;left:4px;border:2px solid #79DBD7;border-top:none;border-right:none;background:transparent;opacity:0.1;-webkit-transform:rotate(-50deg);-moz-transform:rotate(-50deg);-ms-transform:rotate(-50deg);-o-transform:rotate(-50deg);transform:rotate(-50deg)}.ax5-ui-menu.success .ax-menu-body .ax-menu-item .ax-menu-item-cell.ax-menu-item-checkbox .item-checkbox-wrap.useCheckBox[data-item-checked="true"]:after{opacity:1}.ax5-ui-menu.success .ax-menu-body .ax-menu-item .ax-menu-item-cell.ax-menu-item-icon{text-align:left}.ax5-ui-menu.success .ax-menu-body .ax-menu-item .ax-menu-item-cell.ax-menu-item-label{padding-right:10px}.ax5-ui-menu.success .ax-menu-body .ax-menu-item .ax-menu-item-cell.ax-menu-item-accelerator{text-align:right;padding:0px 7px 0px 0px}.ax5-ui-menu.success .ax-menu-body .ax-menu-item .ax-menu-item-cell.ax-menu-item-accelerator .item-wrap{width:100%;vertical-align:middle;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;display:block}.ax5-ui-menu.succ


preference() {
        assert!(!Operator::Add.gt_preference(Operator::Sub) && Operator::Sub != Operator::Add);
        assert!(!Operator::Not.gt_preference(Operator::Not));
        assert!(!Operator::Add.gt_preference(Operator::Not));
        assert!(Operator::Not.gt_preference(Operator::Add));
    }
}
<filename>crates/tor-cell/src/chancell.rs
//! Messages sent over Tor channels
//!
//! A 'channel' is a direct connection between a tor client and a
//! relay, or between two relays.  Current channels all use TLS.
//!
//! This module implements the [ChanCell] type, which is the encoding for
//! data sent over a channel.  It also encodes and decodes various
//! channel messages, which are the types of data conveyed over a
//! channel.
pub mod codec;
pub mod msg;
use caret::caret_int;

/// The amount of data sent in a fixed-length cell.
///
/// Historically, this was set at 509 bytes so that cells would be
/// 512 bytes long once commands and circuit IDs were added.  But now
/// circuit IDs are longer, so cells are 514 bytes.
pub const CELL_DATA_LEN: usize = 509;

/// A cell body considered as a raw array of bytes
pub type RawCellBody = [u8; CELL_DATA_LEN];

/// Channel-local identifier for a circuit.
///
/// A circuit ID can be 2 or 4 bytes long; on modern versions of the Tor
/// protocol, it's 4 bytes long.
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
pub struct CircId(u32);

impl From<u32> for CircId {
    fn from(item: u32) -> Self {
        Self(item)
    }
}
impl From<CircId> for u32 {
    fn from(id: CircId) -> u32 {
        id.0
    }
}
impl std::fmt::Display for CircId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
        self.0.fmt(f)
    }
}
impl CircId {
    /// Return true if this is the zero CircId.
    ///
    /// A zero-valid circuit ID denotes a cell that is not related to
    /// any particular circuit, but which applies to the channel as a whole.
    pub fn is_zero(&self) -> bool {
        self.0 == 0
    }
}

caret_int! {
    /// A ChanCmd is the type of a channel cell.  The value of the ChanCmd
    /// indicates the meaning of the cell, and (possibly) its length.
    pub struct ChanCmd(u8) {
        /// A fixed-length cell that will be dropped.
        PADDING = 0,
        /// Create a new circuit (obsolete format)
        CREATE = 1,
        /// Finish circuit-creation handshake (obsolete format)
        CREATED = 2,
        /// Relay cell, transmitted over a circuit.
        RELAY = 3,
        /// Destroy a circuit
        DESTROY = 4,
        /// Create a new circuit (no public-key)
        CREATE_FAST = 5,
        /// Finish a circuit-creation handshake (no public-key)
        CREATED_FAST = 6,
        // note gap in numbering: 7 is grouped with the variable-length cells
        /// Finish a channel handshake with time and address information
        NETINFO = 8,
        /// Relay cell, transmitted over a circuit.  Limited.
        RELAY_EARLY = 9,
        /// Create a new circuit (current format)
        CREATE2 = 10,
        /// Finish a circuit-creation handshake (current format)
        CREATED2 = 11,
        /// Adjust channel-padding settings
        PADDING_NEGOTIATE = 12,

        /// Variable-length cell, despite its number: negotiate versions
        VERSIONS = 7,
        /// Variable-length channel-padding cell
        VPADDING = 128,
        /// Provide additional certific


endsOn(devMavenRepositories)
        task.systemProperty.internalProperty(
            "devMavenRepositories",
            devMavenRepositories.elements.map { paths ->
                paths.joinToString(",") { it.asFile.canonicalFile.invariantSeparatorsPath }
            }
        )
    }

    companion object {
        const val DEV_MAVEN_PUBLISH_EXTENSION_NAME = "devMavenPublish"
    }
}
/*
 * Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration

plugins {
    kotlin("jvm") version "2.2.0"
    id("org.jetbrains.dokka") version "2.0.0"
}

buildscript {
    dependencies {
        classpath("org.jetbrains.dokka:dokka-base:2.0.0")
    }
}

repositories {
    mavenCentral()
}

tasks.dokkaHtml {
    pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
        // Dokka's stylesheets and assets with conflicting names will be overriden.
        // In this particular case, logo-styles.css will be overriden and ktor-logo.png will
        // be added as an additional image asset
        customStyleSheets = listOf(file("logo-styles.css"))
        customAssets = listOf(file("ktor-logo.png"))

        // Text used in the footer
        footerMessage = "(c) Custom Format Dokka example"
    }
}

dependencies {
    testImplementation(kotlin("test-junit"))
}
/*
 * Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */
package demo.dokka.plugin

import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.transformers.documentables.SuppressedByConditionDocumentableFilterTransformer
import org.jetbrains.dokka.model.Annotations
import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.model.properties.WithExtraProperties
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.DokkaPlugin
import org.jetbrains.dokka.plugability.DokkaPluginApiPreview
import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement

@Suppress("unused")
class HideInternalApiPlugin : DokkaPlugin() {
    val myFilterExtension by extending {
        plugin<DokkaBase>().preMergeDocumentableTransformer providing ::HideInternalApiTransformer
    }

    @DokkaPluginApiPreview
    override fun pluginApiPreviewAcknowledgement() = PluginApiPreviewAcknowledgement

    companion object {
        const val FQN = "demo.dokka.plugin.HideInternalApiPlugin"
    }
}

/**
 * Configuration for [HideInternalApiPlugin].
 */
@Serializable
data class HideInternalApiConfig(
    val annotatedWith: String,
)

class HideInternalApiTransformer(context: DokkaContext) : SuppressedByConditionDocumentableFilterTransformer(context) {

    /**
     * Decode [HideInternalApiPlugin] from the [DokkaContext].
     */
    private val configuration: HideInternalApiConfig by lazy {
        val pluginConfig = context.configuration.pluginsConfiguration
            .firstOrNull { it.fqPluginName == HideInternalApiPlugin.FQN }

        requireNotNull(pluginConfig) {
            "HideInternalApiPlugin configuration is required, but found none."
        }

        require(pluginConfig.serializationFormat == DokkaConfiguration.SerializationFormat.JSON) {
            "HideInternalApiPlugin conf


		time.Sleep(time.Second * 2)
		c1 <- "result 1"
	}()

	// 여기 timeout을 구현하는 select문이 있다.
	// res:= <-c1 은 값을 기다리고, <-Time.After 는 1초후에 값이 전송되기를 기다린다.
	// select 가 첫번째 receive와 함께 진행되기 때문에,
	// 프로그램이 허용된 1초를 넘을 경우 우리는 timeoutcase를 실행할 수 있다.
	// (역주 : 기다리기도하면서 타임아웃도 잰다는 뜻같다)
	select {
	case res := <-c1:
		fmt.Println(res)
	case <-time.After(time.Second * 1):
		fmt.Println("timeout 1")
	}

	//만약 우리가 더 긴시간인 3초의 타임아웃을 허용할 경우는 c2로부터 값을 받는 것은 성공할 것이고.
	//그 결과를 출력할 것이다.
	c2 := make(chan string, 1)
	go func() {
		time.Sleep(time.Second * 2)
		c2 <- "result 2"
	}()
	select {
	case res := <-c2:
		fmt.Println(res)
	case <-time.After(time.Second * 3):
		fmt.Println("timeout 2")
	}
}

// todo: cancellation?
/*
    author twitter : @mmcgrana
    https://gobyexample.com/epoch
	Go by Example: epoch

	프로그램에서 보통 요구사항은 초,밀리세컨, 나노세컨의 개수(the numbers)를 얻는 것이다.
	[Unix epoch](http://en.wikipedia.org/wiki/Unix_time) 때문이다.
	(역주: 역주는 epoch가 익숙하지가 않다)
	여기 Go에서 어떻게 하는지 예제가 있다.
*/

package main

import "fmt"
import "time"

func main() {

	// time.Now를 Unix나 UnixNano와 같이 사용하여서 경과시간을 얻을 수 있다.
	// Unix Epoch 가 초나 나노초에 각각 있기 때문이다?
	// since the Unix epoch in seconds or nanoseconds, respectively.
	now := time.Now()
	secs := now.Unix()
	nanos := now.UnixNano()
	fmt.Println(now)

	// `UnixMillis`가 없다는 것을 명심하자. 그러니 밀리세컨초를 얻자. since 이어서...
	//(죄송합니다;)밤인데 졸리네요; 이것만 하면 오늘 끝인지라^^.. 역주..
	// since epoch you'll need to manually divide from nanoseconds.
	millis := nanos / 1000000
	fmt.Println(secs)
	fmt.Println(millis)
	fmt.Println(nanos)


53L1_ULP_SensorInit(VL53L1_DEV Dev)
{
	struct stmvl53l1_data *data = container_of(Dev,
						   struct stmvl53l1_data,
						   stdev);
	VL53L1_Error status = VL53L1_ULP_ERROR_NONE;
	uint8_t addr, tmp;
	uint16_t i = 0;

	while (i < 1000) {
		status |= VL53L1_RdByte(Dev,
					VL53L1_ULP_FIRMWARE__SYSTEM_STATUS,
					&tmp);
		if (tmp == 0x3)    /* Sensor booted */
			break;
		i++;
		VL53L1_WaitMs(Dev, 1);
	}
	if (i == 1000)
		return status | VL53L1_ULP_ERROR_TIMEOUT;

	/* Load default configuration */
	for (addr = 0x2D; addr <= 0x87; addr++) {
		status |= VL53L1_WrByte(Dev, addr,
					VL53L1_ULP_DEFAULT_CONFIGURATION[
					addr - 0x2D]);
	}

	if (status != VL53L1_ULP_ERROR_NONE)
		return status;

	/* Start VHV */
	status |= VL53L1_ULP_StartRanging(Dev);
	if (status != VL53L1_ULP_ERROR_NONE)
		return status;

	i  = 0;
	while (i < 1000) {
		status |= VL53L1_ULP_CheckForDataReady(Dev, &tmp);
		if (tmp == 1)     /* Data ready */
			break;
		i++;
		VL53L1_WaitMs(Dev, 1);
	}
	if (i == 1000)
		return status | VL53L1_ULP_ERROR_TIMEOUT;

	status |= VL53L1_ULP_ClearInterrupt(Dev);
	status |= VL53L1_ULP_StopRanging(Dev);
	if (status != VL53L1_ULP_ERROR_NONE)
		return status;

	status |= VL53L1_WrByte(Dev,
			VL53L1_ULP_VHV_CONFIG__TIMEOUT_MACROP_LOOP_BOUND,
			0x09);
	status |= VL53L1_WrByte(Dev, 0x0B, 0);
	status |= VL53L1_WrWord(Dev, 0x0024, 0x500);
	status |= VL53L1_WrByte(Dev, 0x81, 0b10001010);
	status |= VL53L1_WrByte(Dev, 0x004B, 0x03);
	status |= VL53L1_ULP_SetMacroTiming(Dev, data->macro_timing);
	status |= VL53L1_ULP_SetInterMeasurement(Dev, data->inter_measurement);
	status |= VL53L1_ULP_SetSigmaThreshold(Dev, data->sigma_threshold);
	status |= VL53L1_ULP_SetSignalThreshold(Dev, data->signal_threshold);

	return status;
}

VL53L1_Error VL53L1_ULP_Interrupt(VL53L1_DEV Dev)
{
	VL53L1_Error status = VL53L1_ULP_ERROR_NONE;
	status |= VL53L1_ULP_DumpDebugData(Dev);
	status |= VL53L1_ULP_ClearInterrupt(Dev);

	return status;
}

static inline void st_gettimeofday(struct timespec64 *tv)
{
	struct timespec64 now;
	ktime_get_real_ts64(&now);
	tv->tv_sec = now.tv_sec;
	tv->tv_nsec = now.tv_nsec;
}

VL53L1_Error VL53L1_ULP_DumpDebugData(VL53L1_DEV Dev)
{
	struct stmvl53l1_data *data = container_of(Dev,
						   struct stmvl53l1_data,
						   stdev);
	VL53L1_Error status = VL53L1_ULP_ERROR_NONE;
	uint8_t  measurement_status;
	uint16_t estimated_distance_mm;
	uint16_t sigma_mm;
	uint16_t signal_kcps;
	uint16_t ambient_kcps;
	static const uint8_t status_rtn[24] = { 255, 255, 255, 5, 2, 4, 1, 7, 3,
		0, 255, 255, 9, 13, 255, 255, 255, 255, 10, 6, 255, 255, 11, 12
	};
	long ts_msec;
	struct VL53L1_MultiRangingData_t *pmrange =
						&data->meas.multi_range_data;

	st_gettimeofday(&data->meas.comp_tv);
	ts_msec = stmvl53l1_tv_dif(&data->start_tv,
				   &data->meas.comp_tv) / 1000;
	status |= VL53L1_RdByte(Dev, 0x0089, &measurement_status);
	status |= VL53L1_RdWord(Dev, 0x0096, &estimated_distance_mm);
	status |= VL53L1_RdWord(Dev, 0x0092, &sigma_mm);
	status |= VL53L1_RdWord(Dev, 0x008E, &signal_kcps);
	status |= VL53L1_RdWord(Dev, 0x0090, &ambient_kcps);
	signal_kcps *= 8;
	sigma_mm /= 4;
	ambient_kcps *= 8;
	measurement_status = measurement_status & 0x1F;
	if (measurement_status < 24)
		measurement_status = status_rtn[(measurement_status)];

	memset(pmrange, 0xFF, sizeof(struct VL53L1_MultiRangingData_t));
	pmrange->TimeStamp = ts_msec;
	pmrange->NumberOfObjectsFound = 1;
	pmrange->RangeData[0].RangeStatus = measurement_status;
	pmrange->RangeData[0].RangeMilliMeter = estimated_distance_mm;
	pmrange->RangeData[0].SigmaMilliMeter = sigma_mm;
	pmrange->RangeData[0].SignalRateRtnMegaCps = signal_kcps;
	pmrange->RangeData[0].AmbientRateRtnMegaCps = ambient_kcps;
	pmrange->RangeData[0].IsUlpRangeData = true;

	return status;
}


erm":"http://schemas.google.com/g/2005#event"}],"title":{"$t":"App Engine Chat Time","type":"text"},"content":{"$t":"Every first and third Wednesday of the month, the App Engine team hosts IRC Chat Time, an opportunity for you to get answers to your App Engine-related questions in real-time.\n\nThese chat sessions take place on the #appengine channel on\nirc.freenode.net. For a list of IRC clients, see http://en.wikipedia.org/wiki/List_of_IRC_clients.\n\nWe welcome all App Engine-related questions and we will try to answer\nas many as we can in the hour session.","type":"text"},"link":[{"rel":"alternate","type":"text/html","href":"http://www.google.com/calendar/event?eid\u003dcWRjMmxobTd2NGZsaTY0aDE4ZnNkOGpydTBfMjAxNzA1MTdUMTYwMDAwWiBkZXZlbG9wZXItY2FsZW5kYXJAZ29vZ2xlLmNvbQ","title":"alternate"},{"rel":"self","type":"application/atom+xml","href":"http://www.google.com/calendar/feeds/developer-calendar%40google.com/public/full/qdc2lhm7v4fli64h18fsd8jru0_20170517T160000Z"}],"author":[{"name":{"$t":"developer-calendar@google.com"},"email":{"$t":"developer-calendar@google.com"}}],"gd$comments":{"gd$feedLink":{"href":"http://www.google.com/calendar/feeds/developer-calendar%40google.com/public/full/qdc2lhm7v4fli64h18fsd8jru0_20170517T160000Z/comments"}},"gd$eventStatus":{"value":"http://schemas.google.com/g/2005#event.confirmed"},"gd$where":[{"valueString":"irc://irc.freenode.net/#appengine"}],"gd$originalEvent":{"href":"http://www.google.com/calendar/feeds/developer-calendar%40google.com/public/full/qdc2lhm7v4fli64h18fsd8jru0","id":"qdc2lhm7v4fli64h18fsd8jru0","gd$when":{"startTime":"2017-05-17T09:00:00.000-07:00"}},"gd$who":[{"email":"developer-calendar@google.com","rel":"http://schemas.google.com/g/2005#event.organizer","valueString":"Google Developer Calendar"}],"gd$when":[{"endTime":"2017-05-17T10:00:00.000-07:00","startTime":"2017-05-17T09:00:00.000-07:00"}],"gd$transparency":{"value":"http://schemas.google.com/g/2005#event.opaque"},"gCal$anyoneCanAddSelf":{"value":"false"},"gCal$guestsCanInviteOthers":{"value":"true"},"gCal$guestsCanModify":{"value":"false"},"gCal$guestsCanSeeGuests":{"value":"true"},"gCal$sequence":{"value":0},"gCal$uid":{"value":"qdc2lhm7v4fli64h18fsd8jru0@google.com"}},{"id":{"$t":"http://www.google.com/calendar/feeds/developer-calendar%40google.com/public/full/us34qg9722ghhjh7htvkquoetg_20170518T060000Z"},"published":{"$t":"2010-01-05T00:32:19.000Z"},"updated":{"$t":"2010-01-05T00:32:19.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://schemas.google.com/g/2005#event"}],"title":{"$t":"Google Wave API Office Hours","type":"text"},"content":{"$t":"Members of the Google Wave API engineering team will be available in the


/tr>

Dereferences the value.

impl<T: Complete> DerefMut for AutoFinishUnchecked<T>

[src]

fn deref_mut(&mut self) -> &mut Self::Target

[src]

Mutably dereferences the value.

impl<T: Complete + Write> Write for AutoFinishUnchecked<T>

[src]

fn <a href='https://doc.rust-lang.


"specular": three.Color.fromHex32(0x222222)
    });

    final torusKnot = three.Mesh(geometry, material);
    torusKnot.scale.scale(1 / 18);
    torusKnot.position.y = 3;
    torusKnot.castShadow = true;
    torusKnot.receiveShadow = true;
    threeJs.scene.add(torusKnot);

    final geometry2 = three.BoxGeometry(3, 3, 3);
    final cube = three.Mesh(geometry2, material);
    cube.position.setValues(8, 3, 8);
    cube.castShadow = true;
    cube.receiveShadow = true;
    threeJs.scene.add(cube);

    final geometry3 = three.BoxGeometry(10, 0.15, 10);
    material = three.MeshPhongMaterial.fromMap({"color": 0xa0adaf, "shininess": 150, "specular": three.Color.fromHex32(0x111111)});

    final ground = three.Mesh(geometry3, material);
    ground.scale.scale(3);
    ground.castShadow = false;
    ground.receiveShadow = true;
    threeJs.scene.add(ground);

    threeJs.addAnimationEvent((dt){
      torusKnot.rotation.x += 0.025;
      torusKnot.rotation.y += 0.2;
      torusKnot.rotation.z += 0.1;

      cube.rotation.x += 0.025;
      cube.rotation.y += 0.2;
      cube.rotation.z += 0.1;
    });
  }
}
import 'dart:async';
import 'dart:math' as math;
import 'package:example/src/statistics.dart';
import 'package:flutter/material.dart';
import 'package:three_js/three_js.dart' as three;

class WebglUboArrays extends StatefulWidget {
  const WebglUboArrays({super.key});
  @override
  createState() => _State();
}

class _State extends State<WebglUboArrays> {
  List<int> data = List.filled(60, 0, growable: true);
  late Timer timer;
  late three.ThreeJS threeJs;
  late three.OrbitControls controls;

  @override
  void initState() {
    timer = Timer.periodic(const Duration(seconds: 1), (t){
      setState(() {
        data.removeAt(0);
        data.add(threeJs.clock.fps);
      });
    });
    threeJs = three.ThreeJS(
      onSetupComplete: (){setState(() {});},
      setup: setup,      settings: three.Settings(
        useSourceTexture: true,

      ),
      windowResizeUpdate: (newSize){
				threeJs.camera.aspect = threeJs.width / threeJs.height;
				threeJs.camera.updateProjectionMatrix();
      }
    );
    super.initState();
  }
  @override
  void dispose() {
    controls.dispose();
    timer.cancel();
    threeJs.dispose();
    three.loading.clear();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        children: [
          threeJs.build(),
          Statistics(data: data)
        ],
      )
    );
  }

  late three.UniformsGroup lightingUniformsGroup;
  List<three.Vector2> lightCenters = [];
  final pointLightsMax = 300;

  Future<void> setup() async {
    threeJs.camera = three.PerspectiveCamera( 45, threeJs.width / threeJs.height, 0.1, 100 );
    threeJs.camera.position.setValues( 0, 50, 50 );

    threeJs.scene = three.Scene();
    threeJs.camera.lookAt( threeJs.scene.position );

    // geometry

    final geometry = three.SphereGeometry();

    // uniforms groups

    lightingUniformsGroup = three.UniformsGroup();
    lightingUniformsGroup.setName( 'LightingData' );

    fi


xtext.example.domainmodel.web\\src-js\\org\\eclipse\\xtext\\example\\domainmodel\\web\\parser\\Domainmodel.g:97:2: name= ID type= rule_TypeRef
            root_0 = this.adaptor.nil();

            name=this.match(this.input,ID,DomainmodelParser.FOLLOW_ID_in_rule_Parameter331);
            name_tree = this.adaptor.create(name);
            this.adaptor.addChild(root_0, name_tree);

            this.pushFollow(DomainmodelParser.FOLLOW_rule_TypeRef_in_rule_Parameter335);
            type=this.rule_TypeRef();

            this.state._fsp--;

            this.adaptor.addChild(root_0, type.getTree());

            retval.stop = this.input.LT(-1);

            retval.tree = this.adaptor.rulePostProcessing(root_0);
            this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (re) {
            if (re instanceof org.antlr.runtime.RecognitionException) {
                this.reportError(re);
                this.recover(this.input,re);
                retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
            } else {
                throw re;
            }
        }
        finally {
        }
        return retval;
    },

    // inline static return class
    rule_TypeRef_return: (function() {
        DomainmodelParser.rule_TypeRef_return = function(){};
        org.antlr.lang.extend(DomainmodelParser.rule_TypeRef_return,
                          org.antlr.runtime.ParserRuleReturnScope,
        {
            getTree: function() { return this.tree; }
        });
        return;
    })(),

    // D:\\git\\dslforge\\examples\\org.eclipse.xtext.example.domainmodel.web\\src-js\\org\\eclipse\\xtext\\example\\domainmodel\\web\\parser\\Domainmodel.g:102:1: rule_TypeRef : referenced= ID (multi= '*' )? ;
    // $ANTLR start "rule_TypeRef"
    rule_TypeRef: function() {
        var retval = new DomainmodelParser.rule_TypeRef_return();
        retval.start = this.input.LT(1);

        var root_0 = null;

        var referenced = null;
        var multi = null;

        var referenced_tree=null;
        var multi_tree=null;

        try {
            // D:\\git\\dslforge\\examples\\org.eclipse.xtext.example.domainmodel.web\\src-js\\org\\eclipse\\xtext\\example\\domainmodel\\web\\parser\\Domainmodel.g:102:13: (referenced= ID (multi= '*' )? )
            // D:\\git\\dslforge\\examples\\org.eclipse.xtext.example.domainmodel.web\\src-js\\org\\eclipse\\xtext\\example\\domainmodel\\web\\parser\\Domainmodel.g:103:2: referenced= ID (multi= '*' )?
            root_0 = this.adaptor.nil();

            referenced=this.match(this.input,ID,DomainmodelParser.FOLLOW_ID_in_rule_TypeRef348);
            referenced_tree = this.adaptor.create(referenced);
            this.adaptor.addChild(root_0, referenced_tree);

            // D:\\git\\dslforge\\examples\\org.eclipse.xtext.example.domainmodel.web\\src-js\\org\\eclipse\\xtext\\example\\domainmodel\\web\\parser\\Domainmodel.g:103:21: (multi= '*' )?
            var alt13=2;
            var LA13_0 = this.input.LA(1);

            if ( (LA13_0==23) ) {
                alt13=1;
            }
            switch (alt13) {
                case 1 :
                    // D:\\git\\dslforge\\examples\\org.eclipse.xtext.example.domainmodel.web\\src-js\\org\\e


irror.com/pace-js/1.2.4/files/themes/blue/pace-theme-flash.css"><script src="https://registry.npmmirror.com/pace-js/1.2.4/files/pace.min.js" integrity="sha256-gqd7YTjg/BtfqWSwsJOvndl0Bxc8gFImLEkXQT8+qj0=" crossorigin="anonymous" defer></script><script class="next-config" data-name="main" type="application/json">{"hostname":"gal.saop.cc","root":"/","images":"/images","scheme":"Gemini","darkmode":true,"version":"8.25.0","exturl":true,"sidebar":{"position":"left","width_expanded":320,"width_dual_column":240,"display":"post","padding":18,"offset":12},"hljswrap":true,"codeblock":{"theme":{"light":"default","dark":"stackoverflow-dark"},"prism":{"light":"prism","dark":"prism-dark"},"copy_button":{"enable":true,"style":"mac"},"fold":{"enable":true,"height":500},"language":true},"bookmark":{"enable":false,"color":"#222","save":"manual"},"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":true,"nav":null},"stickytabs":false,"motion":{"enable":false,"async":true,"duration":20,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.json","localsearch":{"enable":true,"top_n_per_article":3,"unescape":true,"preload":false}}</script><script src="/js/config.js" defer></script><meta name="description" content="LINK START!"><meta property="og:type" content="website"><meta property="og:title" content="GGS"><meta property="og:url" content="https://gal.saop.cc/tags/%E6%89%B6%E5%A5%B9/"><meta property="og:site_name" content="GGS"><meta property="og:description" content="LINK START!"><meta property="og:locale" content="zh_CN"><meta property="article:author" content="Asuna"><meta property="article:tag" content="galgame, 旮旯, 美少女游戏, 视觉小说, 恋爱, 轻小说, 文字冒险, 恋爱养成, 工口, Visual Novel"><meta name="twitter:card" content="summary"><link rel="canonical" href="https://gal.saop.cc/tags/%E6%89%B6%E5%A5%B9/"><script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":false,"lang":"zh-CN","comments":"","permalink":"","path":"tags/扶她/index.html","title":""}</script><script class="next-config" data-name="calendar" type="application/json">""</script><title>标签: 扶她 | GGS</title><script src="https://registry.npmmirror.com/animejs/3.2.1/files/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous" defer></script><script src="https://registry.npmmirror.com/@next-theme/pjax/0.6.0/files/pjax.min.js" integri


Desc),
		Version:            &wrappers.StringValue{Value: in.Version},
		HardInfo:           in.HardInfo,
		SoftInfo:           in.SoftInfo,
		Position:           ToDmPoint(&in.Position),
		Address:            &wrappers.StringValue{Value: in.Address},
		Rssi:               &wrappers.Int64Value{Value: in.Rssi},
		Tags:               in.Tags,
		SchemaAlias:        in.SchemaAlias,
		IsOnline:           in.IsOnline,
		IsEnable:           in.IsEnable,
		FirstLogin:         utils.GetNullTime(in.FirstLogin),
		FirstBind:          utils.GetNullTime(in.FirstBind),
		LastBind:           utils.GetNullTime(in.LastBind),
		LastLogin:          utils.GetNullTime(in.LastLogin),
		ExpTime:            utils.TimeToNullInt(in.ExpTime),
		File:               in.File,
		DeviceImg:          in.DeviceImg,
		LastOffline:        utils.GetNullTime(in.LastOffline),
		LastLocalIp:        in.LastLocalIp,
		LogLevel:           in.LogLevel,
		CreatedTime:        in.CreatedTime.Unix(),
		ProtocolConf:       in.ProtocolConf,
		SubProtocolConf:    in.SubProtocolConf,
		Status:             in.Status,
		ProductName:        productName,
		DeviceType:         deviceType,
		RatedPower:         in.RatedPower,
		NetType:            netType,
		Distributor:        utils.Copy[dm.IDPathWithUpdate](&in.Distributor),
		NeedConfirmVersion: in.NeedConfirmVersion,
		NeedConfirmJobID:   in.NeedConfirmJobID,
		ProductImg:         ProductImg,
		UserID:             in.UserID,
		Sort:               in.Sort,
		CategoryID:         CategoryID,
		BelongGroup:        utils.CopyMap2[dm.IDsInfo](in.BelongGroup),
	}
}

func BindToDeviceCoreDos(in []*dm.DeviceGatewayBindDevice) (ret []*devices.Core) {
	for _, v := range in {
		ret = append(ret, &devices.Core{
			ProductID:  v.ProductID,
			DeviceName: v.DeviceName,
		})
	}
	return
}

func ToDeviceCoreDos(in []*dm.DeviceCore) (ret []*devices.Core) {
	for _, v := range in {
		ret = append(ret, &devices.Core{
			ProductID:  v.ProductID,
			DeviceName: v.DeviceName,
		})
	}
	return
}

func ToDeviceCoreEvents(in []*dm.DeviceCore) (ret []*events.DeviceCore) {
	for _, v := range in {
		ret = append(ret, &events.DeviceCore{
			ProductID:  v.ProductID,
			DeviceName: v.DeviceName,
		})
	}
	return
}

func ToDeviceCoreDo(core *dm.DeviceCore) *devices.Core {
	if core == nil {
		return nil
	}
	return &devices.Core{
		ProductID:  core.ProductID,
		DeviceName: core.DeviceName,
	}
}
func BindToDeviceCoreEvents(in []*dm.DeviceGatewayBindDevice) (ret []*events.DeviceCore) {
	for _, v := range in {
		ret = append(ret, &events.DeviceCore{
			ProductID:  v.ProductID,
			DeviceName: v.DeviceName,
		})
	}
	return
}

func ToGatewayDevice(gateway *devices.Core, subDevice []*devices.Core) (ret []*relationDB.DmGatewayDevice) {
	for _, v := range subDevice {
		ret = append(ret


*/	stfs f3, 0x54(r1)
/* 801E02C8 001DBF28  FC 01 00 40 */	fcmpo cr0, f1, f0
/* 801E02CC 001DBF2C  D0 41 00 58 */	stfs f2, 0x58(r1)
/* 801E02D0 001DBF30  4C 41 13 82 */	cror 2, 1, 2
/* 801E02D4 001DBF34  7C 00 00 26 */	mfcr r0
/* 801E02D8 001DBF38  54 00 1F FE */	rlwinm r0, r0, 3, 0x1f, 0x1f
/* 801E02DC 001DBF3C  7C 19 00 00 */	cmpw r25, r0
/* 801E02E0 001DBF40  40 82 00 0C */	bne lbl_801E02EC
/* 801E02E4 001DBF44  7F A0 00 34 */	cntlzw r0, r29
/* 801E02E8 001DBF48  54 1D D9 7E */	srwi r29, r0, 5
lbl_801E02EC:
/* 801E02EC 001DBF4C  37 DE FF FF */	addic. r30, r30, -1
/* 801E02F0 001DBF50  7F E4 FB 78 */	mr r4, r31
/* 801E02F4 001DBF54  7F 25 CB 78 */	mr r5, r25
/* 801E02F8 001DBF58  3B FF 00 02 */	addi r31, r31, 2
/* 801E02FC 001DBF5C  40 82 FF 38 */	bne lbl_801E0234
/* 801E0300 001DBF60  48 00 00 E8 */	b lbl_801E03E8
lbl_801E0304:
/* 801E0304 001DBF64  C0 25 00 08 */	lfs f1, 8(r5)
/* 801E0308 001DBF68  C0 03 00 08 */	lfs f0, 8(r3)
/* 801E030C 001DBF6C  FC 01 00 40 */	fcmpo cr0, f1, f0
/* 801E0310 001DBF70  4C 41 13 82 */	cror 2, 1, 2
/* 801E0314 001DBF74  7C A0 00 26 */	mfcr r5
/* 801E0318 001DBF78  54 A5 1F FE */	rlwinm r5, r5, 3, 0x1f, 0x1f
lbl_801E031C:
/* 801E031C 001DBF7C  A0 1F 00 00 */	lhz r0, 0(r31)
/* 801E0320 001DBF80  A0 64 00 00 */	lhz r3, 0(r4)
/* 801E0324 001DBF84  1C 00 00 0C */	mulli r0, r0, 0xc
/* 801E0328 001DBF88  80 9B 01 3C */	lwz r4, 0x13c(r27)
/* 801E032C 001DBF8C  C0 3C 00 08 */	lfs f1, 8(r28)
/* 801E0330 001DBF90  7F 44 02 14 */	add r26, r4, r0
/* 801E0334 001DBF94  C0 1A 00 08 */	lfs f0, 8(r26)
/* 801E0338 001DBF98  1C 03 00 0C */	mulli r0, r3, 0xc
/* 801E033C 001DBF9C  FC 01 00 40 */	fcmpo cr0, f1, f0
/* 801E0340 001DBFA0  7C 64 02 14 */	add r3, r4, r0
/* 801E0344 001DBFA4  4C 41 13 82 */	cror 2, 1, 2
/* 801E0348 001DBFA8  7F 20 00 26 */	mfcr r25


import 'dart:io';

import 'package:ed25519_edwards/ed25519_edwards.dart';
import 'package:http/http.dart';

import 'artifacts_provider.dart';
import 'cargo.dart';
import 'crate_hash.dart';
import 'options.dart';
import 'precompile_binaries.dart';
import 'target.dart';

class VerifyBinaries {
  VerifyBinaries({
    required this.manifestDir,
  });

  final String manifestDir;

  Future<void> run() async {
    final crateInfo = CrateInfo.load(manifestDir);

    final config = CargokitCrateOptions.load(manifestDir: manifestDir);
    final precompiledBinaries = config.precompiledBinaries;
    if (precompiledBinaries == null) {
      stdout.writeln('Crate does not support precompiled binaries.');
    } else {
      final crateHash = CrateHash.compute(manifestDir);
      stdout.writeln('Crate hash: $crateHash');

      for (final target in Target.all) {
        final message = 'Checking ${target.rust}...';
        stdout.write(message.padRight(40));
        stdout.flush();

        final artifacts = getArtifactNames(
          target: target,
          libraryName: crateInfo.packageName,
          remote: true,
        );

        final prefix = precompiledBinaries.uriPrefix;

        bool ok = true;

        for (final artifact in artifacts) {
          final fileName = PrecompileBinaries.fileName(target, artifact);
          final signatureFileName =
              PrecompileBinaries.signatureFileName(target, artifact);

          final url = Uri.parse('$prefix$crateHash/$fileName');
          final signatureUrl =
              Uri.parse('$prefix$crateHash/$signatureFileName');

          final signature = await get(signatureUrl);
          if (signature.statusCode != 200) {
            stdout.writeln('MISSING');
            ok = false;
            break;
          }
          final asset = await get(url);
          if (asset.statusCode != 200) {
            stdout.writeln('MISSING');
            ok = false;
            break;
          }

          if (!verify(precompiledBinaries.publicKey, asset.bodyBytes,
              signature.bodyBytes)) {
            stdout.writeln('INVALID SIGNATURE');
            ok = false;
          }
        }

        if (ok) {
          stdout.writeln('OK');
        }
      }
    }
  }
}
import 'dart:io';

import 'package:args/command_runner.dart';
import 'package:ed25519_edwards/ed25519_edwards.dart';
import 'package:github/github.dart';
import 'package:hex/hex.dart';
import 'package:logging/logging.dart';

import 'android_environment.dart';
import 'build_cmake.dart';
import 'build_gradle.dart';
import 'build_pod.dart';
import 'logging.dart';
import 'options.dart';
import 'precompile_binaries.dart';
import 'target.dart';
import 'util.dart';
import 'verify_binaries.dart';

final log = Logger('build_tool');

abstract class BuildCommand extends Command {
  Future<void> runBuildCommand(CargokitUserOptions options);

  @override
  Future<void> run() async {
    final options = CargokitUserOptions.load();

    if (options.verboseLogging ||
        Platform.environment['CARGOKIT_VERBOSE'] == '1') {
      enableVerboseLogging();
    }

    await runBuildCommand(options);
  }
}

class BuildPodCommand extends BuildCommand {
  @override
  final name = 'build-pod';

  @override
  final description = 'Build cocoa pod library';

  @override
  Future<void> runBuildCommand(CargokitUserOptions options) async {
    final build = BuildPod(userOptions: options);
    await build.build();
  }
}

class BuildGradleCommand extends BuildCom


-- Log
-- auto export by engine_api.lua do NOT modify!

-- 异步日志
local Log = {}

-- 停止日志线程，并把未写入文件的日志全部写入
function Log:stop()
end

-- 启动日志线程
-- @param usec 可选参数，每隔多少微秒写入一次文件
function Log:start(usec)
end

-- 写入日志到指定文件
-- @param path 日志文件路径
-- @param ctx 日志内容
-- @param time 日志时间，不传则为当前主循环时间
function Log:append_log_file(path, ctx, time)
end

-- 写入字符串到指定文件，不加日志前缀，不自动换行
-- @param path 文件路径
-- @param ctx 内容
function Log:append_file(path, ctx)
end

-- stdout、文件双向输出日志打印函数
-- @param ctx 日志内容
function


LE_ID_4 = ProfileId.newBuilder().setInternalId(4).build()
    private val PROFILE_ID_6 = ProfileId.newBuilder().setInternalId(6).build()

    private const val DEFAULT_PIN = "12345"
    private const val DEFAULT_ALLOW_DOWNLOAD_ACCESS = true
    private const val DEFAULT_ALLOW_IN_LESSON_QUICK_LANGUAGE_SWITCHING = false
    private const val DEFAULT_AVATAR_COLOR_RGB = -10710042
    private const val DEFAULT_SURVEY_LAST_SHOWN_TIMESTAMP_MILLIS = 0L
    private const val CURRENT_TIMESTAMP = 1556094120000
  }

  @After
  fun tearDown() {
    TestPlatformParameterModule.reset()
  }

  @Test
  fun testAddProfile_addProfile_checkProfileIsAdded() {
    setUpTestApplicationComponent()
    val dataProvider = addAdminProfile(name = "James", pin = "123")

    monitorFactory.waitForNextSuccessfulResult(dataProvider)

    val profileDatabase = readProfileDatabase()
    val profile = profileDatabase.profilesMap[0]!!
    assertThat(profile.name).isEqualTo("James")
    assertThat(profile.pin).isEqualTo("123")
    assertThat(profile.allowDownloadAccess).isEqualTo(true)
    assertThat(profile.id.internalId).isEqualTo(0)
    assertThat(profile.readingTextSize).isEqualTo(MEDIUM_TEXT_SIZE)
    assertThat(profile.numberOfLogins).isEqualTo(0)
    assertThat(profile.isContinueButtonAnimationSeen).isEqualTo(false)
    assertThat(File(getAbsoluteDirPath("0")).isDirectory).isTrue()
    assertThat(profile.surveyLastShownTimestampMs).isEqualTo(0L)
    assertThat(profile.lastSelectedClassroomId).isEmpty()
  }

  @Test
  fun testAddProfile_addSoleLearnerProfile_onboardingV2Enabled_checkProfileIsAdded() {
    setUpTestWithOnboardingV2Enabled(true)
    val dataProvider = addAdminProfile(name = "James", pin = "")

    monitorFactory.waitForNextSuccessfulResult(dataProvider)

    val profileDatabase = readProfileDatabase()
    val profile = profileDatabase.profilesMap[0]!!
    assertThat(profile.name).isEqualTo("James")
    assertThat(profile.pin).isEqualTo("")
    assertThat(profile.allowDownloadAccess).isEqualTo(true)
    assertThat(profile.id.internalId).isEqualTo(0)
    assertThat(profile.readingTextSize).isEqualTo(MEDIUM_TEXT_SIZE)
    assertThat(profile.numberOfLogins).isEqualTo(0)
    assertThat(profile.isContinueButtonAnimationSeen).isEqualTo(false)
    assertThat(File(getAbsoluteDirPath("0")).isDirectory).isTrue()
    assertThat(profile.surveyLastShownTimestampMs).isEqualTo(0L)
  }

  @Test
  fun testAddProfile_addSupervisorProfile_withPin_onboardingV2Enabled_checkProfileIsAdded() {
    setUpTestWithOnboardingV2Enabled(true)
    val dataProvider = addAdminProfile(name = "James")

    monitorFactory.waitForNextSuccessfulResult(dataProvider)

    val profileDatabase = readProfileDatabase()
    val profile = profileDatabase.profilesMap[0]!!
    assertThat(profile.name).isEqualTo("James")
    assertThat(profile.pin).isEqualTo("12345")
    assertThat(profile.allowDownloadAccess).isEqualTo(true)
    assertThat(profile.id.internalId).isEqualTo(0)
    assertThat(profile.readingTextSize).isEqualTo(MEDIUM_TEXT_SIZE)
    assertThat(profile.numberOfLogins).isEqualTo(0)
    assertThat(profile.isContinueButtonAnimationSeen).isEqualTo(false)
    assertThat(File(getAbsoluteDirPath("0")).isDirectory).isTrue()
    assertThat(profile.surveyLastShownTimestampMs).isEqualTo(0L)
  }

  @Test
  fun testAddProfile_addAdditionalLearnerProfile_withPin_onboardingV2Enabled_checkProfileIsAdded() {