ider())

        val edgeProvider = NextTokenEdgeProvider()
        val extractedEdges = edgeProvider.provideEdges(codeGraph)
        val correctEdges = listOf(
            Edge(SmallTree.leaf1, SmallTree.leaf2, EdgeType.NextToken),
            Edge(SmallTree.leaf2, SmallTree.leaf3, EdgeType.NextToken),
            Edge(SmallTree.leaf3, SmallTree.interNodeRight, EdgeType.NextToken),
        )

        assertEquals(correctEdges, extractedEdges)
    }
}
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Key
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileManager
import java.io.File

val PATH_KEY = Key<String>("path")
val IS_HIDDEN_KEY = Key<Boolean>("hidden")
val NODE_TYPE_KEY = Key<String>("node type")
val TECHNICAL_TOKEN_KEY = Key<String>("tech token")
val RESOLVED_TYPE_KEY = Key<String>("resolved type")

enum class GranularityLevel {
    File,
    Class,
    Method
}

enum class Dataset(val folderName: String) {
    Train("train"),
    Val("val"),
    Test("test")
}

enum class Language(val extensions: List<String>) {
    Java(listOf("java")),
    Kotlin(listOf("kt", "kts")),
    PHP(listOf("php"))
}

/*
Adapt from
https://github.com/tech-srl/code2seq/blob/master/JavaExtractor/JPredict/src/main/java/JavaExtractor/Visitors/FunctionVisitor.java#L52
 */
fun getCleanCode(code: String): List<String> {
    val cleanCode = code
        .replace("\r\n", "\n")
        .replace("\t", " ")
        .replace("{", "")
        .replace("}", "")
    return cleanCode
        .lines()
        .map { it.trim() }
        .filter { it.isNotEmpty() && !it.startsWith("/") && !it.startsWith("*") }
}

/**
 * Collect all files from project that correspond to given language
 * Search is based on checking extension of each file
 * @param project: project where run search
 * @return: list of all Virtual Files in project that correspond to required language.
 * @see VirtualFile
 */
fun extractProjectFiles(project: Project, language: Language): List<VirtualFile> {
    val virtualFileManager = VirtualFileManager.getInstance()
    return File(project.basePath ?: "")
        .walkTopDown()
        .filter { it.extension in language.extensions }
        .mapNotNull { virtualFileManager.findFileByNioPath(it.toPath()) }
        .toList()
}

class IncorrectPsiTypeException(message: String? = null, cause: Throwable? = null) : Exception(message, cause) {
    constructor(cause: Throwable) : this(null, cause)
}

class IncorrectMiningStateException(message: String? = null, cause: Throwable? = null) : Exception(message, cause) {
    constructor(cause: Throwable) : this(null, cause)
}
package storage

import Dataset
import labelextractor.LabeledTree
import java.io.File
import java.io.PrintWriter

abstract class Storage(val outputDirectory: File) {
    private val datasetFileWriters = mutableMapOf<Dataset?, PrintWriter>()
    private val datasetStatistic = mutableMapOf<Dataset?, Int>()

    init {
        outputDirectory.mkdirs()
    }

    abstract val fileExtension: String
    abstract fun convert(labeledTree: LabeledTree, holdout: Dataset?): String

    fun store(labeledTree: LabeledTree, holdout: Dataset?) {
        val stringRepresentation = convert(labeledTree, holdout)

        datasetStatistic[holdout] = datasetStatistic.getOrPut(holdout) { 0 }.plus(1)
        datasetFileWriters.get


private TargetInfo getLastResortTarget() {
        return new TargetInfo(getLastResort(), spider.transform.up, false);
    }
    private Vector3 getTopFocalPoint() {
        return spider.transform.TransformPoint(rayTopFocalPoint);
    }
    private Vector3 getBottomFocalPoint() {
        return spider.transform.TransformPoint(rayBottomFocalPoint);
    }
    private Vector3 getFrontalStartPosition() {
        return spider.transform.TransformPoint(frontalStartPositionLocal);
    }

    /*
     * This function will perform debug drawing using Gizmos.
     */
    private void drawDebug(bool points = true, bool steppingProcess = true, bool rayCasts = true, bool DOFArc = true) {

        float scale = spider.getScale() * 0.0001f * debugIconScale;
        if (points) {
            // Default Position
            DebugShapes.DrawPoint(getDefault(), Color.magenta, scale);

            // Last Resort Position
            DebugShapes.DrawPoint(getLastResortTarget().position, Color.cyan, scale);

            //Draw the top and bottom ray points
            DebugShapes.DrawPoint(getTopFocalPoint(), Color.green, scale);
            DebugShapes.DrawPoint(getBottomFocalPoint(), Color.green, scale);

            //Target Point
            if (isStepping) DebugShapes.DrawPoint(ikChain.getTarget().position, Color.cyan, scale, 0.2f);
            else DebugShapes.DrawPoint(ikChain.getTarget().position, Color.cyan, scale);
        }

        if (steppingProcess) {
            //Draw the prediction process
            DebugShapes.DrawPoint(lastEndEffectorPos, Color.white, scale);
            DebugShapes.DrawPoint(projPrediction, Color.grey, scale);
            DebugShapes.DrawPoint(overshootPred


shower:before{content:"\f2cc"}  .fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}  .fa-podcast:before{content:"\f2ce"}  .fa-window-maximize:before{content:"\f2d0"}  .fa-window-minimize:before{content:"\f2d1"}  .fa-window-restore:before{content:"\f2d2"}  .fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}  .fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}  .fa-bandcamp:before{content:"\f2d5"}  .fa-grav:before{content:"\f2d6"}  .fa-etsy:before{content:"\f2d7"}  .fa-imdb:before{content:"\f2d8"}  .fa-ravelry:before{content:"\f2d9"}  .fa-eercast:before{content:"\f2da"}  .fa-microchip:before{content:"\f2db"}  .fa-snowflake-o:before{content:"\f2dc"}  .fa-superpowers:before{content:"\f2dd"}  .fa-wpexplorer:before{content:"\f2de"}  .fa-meetup:before{content:"\f2e0"}  .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}  .sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
/* Import the theme */
@import "../../../common/less/themes/@{theme}.less";

/* a LESS mixin (function) to darken color if light and lighten if dark */
.sui-grid-alt-background(@c) when (lightness(@c) >= 50%) {
	background-color: darken(@c, 3%);
}
.sui-grid-alt-background(@c) when (lightness(@c) < 50%) {
	background-color: lighten(@c, 16%);
}

/* Grid styles */
.sui-grid-core {
    border-collapse: collapse;
    border-style: none solid solid;
    border-width: 1px;
    height: auto;
    outline: 0 none;
	font-family: @font-family;
	font-size: @font-size;
}
.sui-grid-core .sui-gridheader {
    background-attachment: scroll;
    background-position: 0 0;
    background-repeat: repeat-x;
	overflow: hidden;
}
.sui-grid-core .sui-table {
    border: 0 none;
    table-layout: fixed;
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
    empty-cells: show;
    .sui-unselectable();
}
.sui-grid-core .sui-selectable,
.sui-grid-core .sui-non-selectable,
.sui-grid-core .sui-expand,
.sui-grid .sui-collapse,
.sui-grid .sui-group-panel {
    .sui-unselectable();
}
.sui-grid-core .sui-table-ie7 {
    border: 0 none;
    table-layout: fixed;
    border-spacing: 0;
    empty-cells: show;
}
.sui-grid-core .sui-hide {
    display: none;
}
.sui-grid-core .sui-gridcontent {
    outline: medium none;
    overflow: hidden;
}
.sui-grid-core .sui-scroller {
    overflow: hidden;
}
.sui-grid-core .sui-scroller .


/*
 * hostapd / Hardware feature query and different modes
 * Copyright 2002-2003, Instant802 Networks, Inc.
 * Copyright 2005-2006, Devicescape Software, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * Alternatively, this software may be distributed under the terms of BSD
 * license.
 *
 * See README and COPYING for more details.
 */

#ifndef HW_FEATURES_H
#define HW_FEATURES_H

#ifdef NEED_AP_MLME
void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
			      size_t num_hw_features);
int hostapd_get_hw_features(struct hostapd_iface *iface);
int hostapd_select_hw_mode(struct hostapd_iface *iface);
const char * hostapd_hw_mode_txt(int mode);
int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
int hostapd_check_ht_capab(struct hostapd_iface *iface);
int hostapd_prepare_rates(struct hostapd_data *hapd,
			  struct hostapd_hw_modes *mode);
#else /* NEED_AP_MLME */
static inline void
hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
			 size_t num_hw_features)
{
}

static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
{
	return -1;
}

static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
{
	return -1;
}

static inline const char * hostapd_hw_mode_txt(int mode)
{
	return NULL;
}

static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
{
	return -1;
}

static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
{
	return 0;
}

static inline int hostapd_prepare_rates(struct hostapd_data *hapd,
					struct hostapd_hw_modes *mode)
{
	return 0;
}

#endif /* NEED_AP_MLME */

#endif /* HW_FEATURES_H */


button was clicked
        /// </summary>
        Yes = 0x0002,

        /// <summary>
        /// "No" button was clicked
        /// </summary>
        No = 0x0004,

        /// <summary>
        /// "Cancel" button was clicked
        /// </summary>
        Cancel = 0x0008,

        /// <summary>
        /// "Retry" button was clicked
        /// </summary>
        Retry = 0x0010,

        /// <summary>
        /// "Close" button was clicked
        /// </summary>
        Close = 0x0020,

        /// <summary>
        /// A custom button was clicked.
        /// </summary>
        CustomButtonClicked = 0x0100,
    }
}


  "settle": settle,
        "settleId": settleId,
        "contractSize": this.SafeNumber(market, "sizeMultiplier"),
        "linear": isLinear,
        "inverse": isInverse,
        "taker": this.SafeNumber(fees, "taker"),
        "maker": this.SafeNumber(fees, "maker"),
        "percentage": this.SafeBool(fees, "percentage"),
        "tierBased": this.SafeBool(fees, "tierBased"),
        "feeSide": this.SafeString(fees, "feeSide"),
        "expiry": nil,
        "expiryDatetime": nil,
        "strike": nil,
        "optionType": nil,
        "precision": map[string]interface{} {
            "amount": this.ParseNumber(amountPrecisionString),
            "price": this.ParseNumber(pricePrecisionString),
        },
        "limits": map[string]interface{} {
            "amount": map[string]interface{} {
                "min": this.SafeNumber(market, "minTradeNum"),
                "max": nil,
            },
            "price": map[string]interface{} {
                "min": nil,
                "max": nil,
            },
            "leverage": map[string]interface{} {
                "min": nil,
                "max": nil,
            },
            "cost": map[string]interface{} {
                "min": nil,
                "max": nil,
            },
        },
        "created": nil,
        "info": market,
    })
}
func  (this *CoincatchCore) ParseSpotMarketId(marketId interface{}) interface{}  {
    var baseId interface{} = nil
    var quoteId interface{} = nil
    var currencyIds interface{} = this.SafeList(this.Options, "currencyIdsListForParseMarket", []interface{}{})
    for i := 0; IsLessThan(i, GetArrayLength(currencyIds)); i++ {
        var currencyId interface{} = GetValue(currencyIds, i)
        var entryIndex interface{} = GetIndexOf(marketId, currencyId)
        if IsTrue(IsGreaterThan(entryIndex, OpNeg(1))) {
            var restId interface{} = Replace(marketId, currencyId, "")
            if IsTrue(IsEqual(entryIndex, 0)) {
                baseId = currencyId
                quoteId = restId
            } else {
                baseId = restId
                quoteId = currencyId
            }
            break
        }
    }
    var result interface{} = map[string]interface{} {
        "baseId": baseId,
        "quoteId": quoteId,
    }
    return result
}
/**
 * @method
 * @name coincatch#fetchTicker
 * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
 * @see https://coincatch.github.io/github.io/en/spot/#get-single-ticker
 * @see https://coincatch.github.io/github.io/en/mix/#get-single-symbol-ticker
 * @param {string} symbol unified symbol of the market to fetch the ticker for
 * @param {object} [params] extra parameters specific to the exchange API endpoint
 * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
 */
func  (this *CoincatchCore) FetchTicker(symbol interface{}, optionalArgs ...interface{}) <- chan interface{} {
            ch := make(chan interface{})
            go func() interface{} {
                defer close(ch)
                defer ReturnPanicError(ch)
                    params := GetArg(optionalArgs, 0, map[string]interface{} {})
            _ = params

            retRes10648 := (<-this.LoadMarkets())
            PanicOnError(retRes10648)
            var market interface{} = this.Market(symbol)
            var request interface{} = map[string]


%v16,0(%r2)		/* Next part of haystack.  */
	jo	.Lloop_vstrs_nonzero_cc_loop
	/* Case: no-match.  */
	clgrjh	%r2,%r0,.Lloop	/* Jump away if haystack has less than 64b.  */
.Lloop64:
	vstrs	%v20,%v16,%v18,%v19,0,0
	jne	.Lloop_vstrs_nonzero_cc0
	vl	%v16,16(%r2)		/* Next part of haystack.  */
	vstrs	%v20,%v16,%v18,%v19,0,0
	jne	.Lloop_vstrs_nonzero_cc16
	vl	%v16,32(%r2)		/* Next part of haystack.  */
	vstrs	%v20,%v16,%v18,%v19,0,0
	jne	.Lloop_vstrs_nonzero_cc32
	vl	%v16,48(%r2)		/* Next part of hay


# calculadora_gastos_v1.7.py
# Autor: Manuel A. García
# Descripción: Calculadora de gastos profesional (añadir, ver, editar, eliminar, etc.)

import json
import os

ARCHIVO = "gastos.json"  # Nombre del archivo para guardar los datos

# ───── FUNCIONES DE ARCHIVO ─────
def cargar_gastos():
    if not os.path.exists(ARCHIVO):
        return []
    try:
        with open(ARCHIVO, "r", encoding="utf-8") as f:
            return json.load(f)
    except (json.JSONDecodeError, FileNotFoundError):
        print("Aviso: no se pudo leer el archivo. Se iniciará vacío.")
        return []

def guardar_gastos(gastos):
    with open(ARCHIVO, "w", encoding="utf-8") as f:
        json.dump(gastos, f, ensure_ascii=False, indent=2)

# ───── FUNCIONES DE OPERACIONES ─────
def pedir_gasto():
    categoria = input("Introduce la categoría: ").strip().lower()
    try:
        importe = float(input("Introduce el importe en euros: "))
        if importe <= 0:
            print("El importe debe ser mayor que 0.")
            return None
    except ValueError:
        print("Error: introduce un número válido.")
        return None
    return {"categoria": categoria, "importe": importe}

def mostrar_gastos(gastos):
    if not gastos:
        print("No hay gastos registrados todavía.")
    else:
        print("\nLista de gastos:")
        for i, gasto in enumerate(gastos, start=1):
            print(f"{i}. {gasto['categoria'].capitalize():12} {gasto['importe']:.2f} €")

def calcular_total(gastos):
    return sum(gasto["importe"] for gasto in gastos)

def calcular_total_por_categoria(gastos):
    totales = {}
    for gasto in gastos:
        cat = gasto["categoria"]
        imp = gasto["importe"]
        totales[cat] = totales.get(cat, 0) + imp
    return totales

def mostrar_totales(gastos):
    total = calcular_total(gastos)
    print(f"\n💰 Total gastado: {total:.2f} €")
    if total > 1000:
        print("¡Cuidado! Has superado los 1000 €.")

def mostrar_totales_por_categoria(gastos):
    tot_cat = calcular_total_por_categoria(gastos)
    if not tot_cat:
        print("No hay gastos por categoría.")
        return
    print("\nGastos por categoría:")
    for cat, imp in tot_cat.items():
        print(f"- {cat.capitalize():12}: {imp:.2f} €")

# ───── FUNCIONES EXTRA ─────
def editar_gasto(gastos):
    mostrar_gastos(gastos)
    try:
        num = int(input("¿Qué gasto quieres editar? (Número): "))
        if 1 <= num <= len(gastos):
            nuevo = pedir_gasto()
            if nuevo:
                gastos[num - 1] = nuevo
                print("✏ Gasto editado correctamente.")
        else:
            print("Número inválido.")
    except ValueError:
        print("Introduce un número válido.")

def eliminar_gasto(gastos):
    mostrar_gastos(gastos)
    try:
        num = int(input("¿Qué gasto quieres eliminar? (Número): "))
        if 1 <= num <= len(gastos):
            eliminado = gastos.pop(num - 1)
            print(f"🗑 Gasto eliminado: {eliminado['categoria'].capitalize()} - {eliminado['importe']} €")
        else:
            print("Número inválido.")
    except ValueError:
        print("Introduce un número válido.")

# ───── MENÚ ─────
def mostrar_menu():
    print("\n==== CALCULADORA DE GASTOS v1.7 ====")
    print("1. Añadir gasto")
    print("2. Ver lista de gastos")
    print("3. Ver total gastado")
    print("4. Ver totales por categoría")
    print("5. Editar gasto")
    print("6. Eliminar gasto")
    print("7. Salir")

def main():
    gastos = cargar_gastos()

    while True:
        mostrar_menu()
        opcion = input("Elige una opción (1-7): ").strip()

        if opcion == "1":
            gasto = pedir_gasto()
            if gasto:
                gastos.append(gasto)
                print("✅ Gasto añadido.")
        elif opcion == "2":
            mostrar_gastos(gastos)
        elif opcion == "3":
            mostrar_totales(gastos)
        elif opcion == "4":
            mostrar_totales_por_categoria(gastos)
        elif opcion == "5":
            editar_gasto(gastos)
        elif opcion == "6":
            eliminar_gasto(gastos)
        elif opcion == "7":
            guardar_gastos(gastos)
            print("💾 Datos guardados. ¡Hasta pronto!")
            break
        else:
            print("Opción no válida. Elige del 1 al 7.")

if __name__ == "__main__":
    main()


.push(i)
					a1__val.push(val)
				}
			}
		}
		return {
			a1__idx,
			a1__val,
		}
	}
}
/**
 * Returns a [ctx__idx](#ctx__idx) of presumably sorted items in `a1__val__` at each index of the new item for each changed item.
 * @param {Array} a1__val__
 * @returns {{ a1__idx, a1__val }}
 */
export const _ctx__compact__a1__thold__entry = _fn__ctx__compact__a1__thold__entry()
/**
 * Returns a function that returns value from [_ctx__compact__a1__thold__exit](#_ctx__compact__a1__thold__exit)
 * @param {function(*, *): _eq} _eq
 * @returns {function(Array): ctx__idx}
 */
export function _fn__ctx__compact__a1__thold__exit(fn__eq = eq) {
	return a1__val__=>{
		const a1__idx = []
		const a1__val = []
		if (a1__val__) {
			const length__a1__val__ = a1__val__.length
			for (let idx = 0; idx < a1__val__.length; idx++) {
				const val = a1__val__[idx]
				const idx__next = idx + 1
				const val__next = a1__val__[idx__next]
				if (
					idx__next === length__a1__val__
					|| (
						fn__eq
						? !fn__eq([val, val__next])
						: val !== val__next
					)
				) {
					a1__idx.push(idx)
					a1__val.push(val)
				}
			}
		}
		return {
			a1__idx,
			a1__val,
		}
	}
}
/**
 * Returns a [ctx__idx](#ctx__idx) of presumably sorted items in `a1__val__` at each index of the old item for each changed item.
 * @param {Array} a1__val__
 * @param {function(*, *): eq} fn__eq
 * @returns {ctx__idx}
 */
export const _ctx__compact__a1__thold__exit = _fn__ctx__compact__a1__thold__exit()
/**
 * Returns an Object the key & value are set from the zipped `a1__0` & `a1__1` Array of `[key, value]` pairs.
 * @param {[[], []]} Array of 2 arrays to zip together
 * @returns {Object} Object of zipped key/value from items in 2d array
 */
export function _hash__zip__key__value([a1__0, a1__1]) {
	const hash__zip__key__value = {}
	const a2__key__value = zip([a1__0, a1__1])
	each(a2__key__value, ([key, value])=>hash__zip__key__value[key] = value)
	return hash__zip__key__value
}
/**
 * Returns Array where items in `a1` are filtered by `fn`.
 * @param {Array} a1
 * @param {function(*, Int)} _is_match
 * @returns {Array|null}
 */
export function filter(a1:falsy|any[], _is_match:_is_match):undefined|any[] {
	if (!a1) return
	const a1__out = []
	for (let i = 0; i < a1.length; i++) {
		const value = a1[i]
		if (_is_match(value, i)) {
			a1__out.push(value)
		}
	}
	return a1__out
}
/**
 * Returns function that returns value from [filter](#filter) with `fn` argument.
 * @param {function(*, Int)} _is_match
 * @returns {function(Array):(Array|null)}
 */
export function _filter(_is_match:_is_match) {
	return a1=>filter(a1, _is_match)
}
export const _fn__filter = _filter


 4.324 2.588 9.068.628 7.352-3.038 4.657-6.484 27.185-22.907 1.987-1.45 2.156-3.67.934-5.031M24.701 42.81c1.234 4.375 9.551 6.745 8.115 13.259-.872 3.961-5.77 4.762-7.461 3.064-4.45-4.466-6.291-12.502-8.191-21.061-2.199-9.904-4.463-20.106-11.129-26.824l31.65-7.23c5.485 4.371 6.664 10.884 7.909 17.765.491 2.715 1.014 5.497 1.804 8.182L24.701 42.81"/></svg>';
  static const String pager =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64" preserveAspectRatio="xMidYMid meet" viewBox="0 0 64 64"><path fill="currentColor" d="M56 11H8c-3.3 0-6 2.7-6 6v30c0 3.3 2.7 6 6 6h48c3.3 0 6-2.7 6-6V17c0-3.3-2.7-6-6-6M15 48c0 .55-.45 1-1 1h-4c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h4c.55 0 1 .45 1 1v4m8 0c0 .55-.45 1-1 1h-4c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h4c.55 0 1 .45 1 1v4m8 0c0 .55-.45 1-1 1h-4c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h4c.55 0 1 .45 1 1v4m26-1c0 1.101-.9 2-2 2H44c-1.1 0-2.703-.562-3.562-1.249l-6.877-5.502C32.703 41.562 31.1 41 30 41H9c-1.1 0-2-.899-2-2V17c0-1.101.9-2 2-2h46c1.1 0 2 .899 2 2v30"/><path fill="currentColor" d="M53 41H37c-1.1 0-1.279.54-.4 1.2l4.801 3.6c.879.66 2.5 1.2 3.6 1.2h8c1.1 0 2-.899 2-2v-2A2.007 2.007 0 0053 41m-4.242 2.414-2.344 2.345a.833.833 0 01-1.173 0 .835.835 0 010-1.173l2.345-2.345c.322-.322.85-.322 1.172 0s.322.851 0 1.173M21 47v-2l-2 1zm6 0 2-1-2-1z"/><circle cx="12" cy="46" r="1" fill="currentColor"/><path fill="currentColor" d="M52 35V23c0-1.654-1.346-3-3-3H15c-1.654 0-3 1.346-3 3v12c0 1.654 1.346 3 3 3h34c1.654 0 3-1.346 3-3m-38 0V23c0-.551.449-1 1-1h34c.552 0 1 .449 1 1v12a1 1 0 01-1 1H15c-.551 0-1-.448-1-1m40-18h-6c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1"/><path fill="currentColor" d="m15.092 28.563-.437.437.437.437h2.836l.436-.437-.436-.437zm5.454 3.492-.437.436.43


# Copyright (C) 2018-2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# not_equal paddle model generator
#
import numpy as np
from save_model import saveModel
import sys

def not_equal(name: str, x, y, data_type, cast_to_fp32=False):
    import paddle
    paddle.enable_static()

    with paddle.static.program_guard(paddle.static.Program(), paddle.static.Program()):
        node_x = paddle.static.data(name='x', shape=x.shape, dtype=data_type)
        node_y = paddle.static.data(name='y', shape=y.shape, dtype=data_type)
        out = paddle.not_equal(node_x, node_y)
        # FuzzyTest framework doesn't support boolean so cast to fp32/int32
        if cast_to_fp32:
                data_type = "float32"

        out = paddle.cast(out, np.float32)
        cpu = paddle.static.cpu_places(1)
        exe = paddle.static.Executor(cpu[0])
        # startup program will call initializer to initialize the parameters.
        exe.run(paddle.static.default_startup_program())

        outs = exe.run(
            feed={'x': x, 'y': y},
            fetch_list=[out])

        saveModel(name, exe, feed_vars=[node_x, node_y], fetchlist=[out],
                inputs=[x, y], outputs=[outs[0]], target_dir=sys.argv[1])

    return outs[0]

def main():
    test_cases = [
        "float32",
        "int32",
        "int64"
    ]

    for test in test_cases:
        data_x = np.array([[[[-1, 0, 1]], [[2, 3, 4]]]]).astype(test)
        data_y = np.array([[[[2, 0, 3]], [[3, 1, 4]]]]).astype(test)

        if ((test == "float64") or (test == "int64")):
            not_equal("not_equal_" + test, data_x, data_y, test, True)
        else:
            not_equal("not_equal_" + test, data_x, data_y, test, False)

if __name__ == "__main__":
    main()


}
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Package status contains logic for the nomos status CLI command.
package status

import (
	"context"
	"errors"
	"fmt"
	"net"
	"sort"
	"strings"
	"sync"

	"github.com/GoogleContainerTools/config-sync/cmd/nomos/flags"
	"github.com/GoogleContainerTools/config-sync/cmd/nomos/util"
	"github.com/GoogleContainerTools/config-sync/pkg/api/configmanagement"
	"github.com/GoogleContainerTools/config-sync/pkg/api/configsync"
	"github.com/GoogleContainerTools/config-sync/pkg/api/configsync/v1beta1"
	kptv1alpha1 "github.com/GoogleContainerTools/config-sync/pkg/api/kpt.dev/v1alpha1"
	"github.com/GoogleContainerTools/config-sync/pkg/client/restconfig"
	"github.com/GoogleContainerTools/config-sync/pkg/core"
	"github.com/GoogleContainerTools/config-sync/pkg/generated/clientset/versioned"
	typedv1 "github.com/GoogleContainerTools/config-sync/pkg/generated/clientset/versioned/typed/configmanagement/v1"
	"github.com/Masterminds/semver"
	"go.uber.org/multierr"
	corev1 "k8s.io/api/core/v1"
	apierrors "k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/rest"
	"k8s.io/klog/v2"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
)

const (
	// ACMOperatorLabelSelector is the label selector for the ACM operator Pod.
	ACMOperatorLabelSelector = "k8s-app=config-management-operator"
	// ACMOperatorDeployment is the name of the ACM operator Deployment.
	syncingConditionSupportedVersion = "v1.10.0-rc.1"
)

var (
	// ErrNoRootSyncsFound is the error returned when no RootSyncs are found on a cluster
	ErrNoRootSyncsFound = errors.New("No RootSync resources found")
	// ErrNoRepoSyncsFound is the error returned when no RepoSyncs are found on a cluster
	ErrNoRepoSyncsFound = errors.New("No RepoSync resources found")
	// ErrMonoRepoFound is the error returned when mono-repo mode is detected on a cluster
	ErrMonoRepoFound = errors.New("This cluster is running in legacy mono-repo mode, which is no longer supported")
)

// ClusterClient is the client that talks to the cluster.
type ClusterClient struct {
	// Client performs CRUD operations on Kubernetes objects.
	Client client.Client
	repos  typedv1.RepoInterface
	// K8sClient contains the clients for groups.
	K8sClient        kubernetes.Interface
	ConfigManagement *util.ConfigManagementC


do `.help`. Got it!");
        return;
    }

    let mut commands = vec![
        (".help", ".h", "this is it chief"),
        (".info", ".i", "I'm pretty sure this will give you some info about the lobby you're in."),
        (".leave", ".l", "We're sorry to see you go..."),
        (".THRUST", ".t", "This will list out your added THRUSTEES and THRUSTERS. (THRUSTERS are THRUSTED into the THRUSTEES's underscores.) Lobbies will combine and use everyone's awesome THRUSTS."),
        (".THRUST \"Some _____ THRUSTEE\" \"Some THRUSTER\"", ".t \"Some _____ THRUSTEE\" \"Some THRUSTER\"", "Add THRUSTS to your wonderful collection. THRUSTS with an underscore will be put into your THRUSTEES otherwise yeah you guessed it they're put into THRUSTERS. Also, remember to encapsulate each THRUST with a quotation."),
        (".UNTHRUST", ".u", "Destroy all your THRUSTS... [*** !!!CAUTION THIS IS IRREVERSIBLE!!! ***]"),
        (".who", ".w", "See who's whacking up this swag lobby with you"),
    ];

    if host {
        commands.append(&mut vec![
            (".chief xxXAzn1994", ".c  xxXAzn1994", "(chief-only) Make xxXAzn1994 the chief of the lobby"),
            (".house", ".ho 69", "(chief-only) Hey, change the number of house cards you're using to 69, split in half for THRUSTEES and THRUSTERS. Do 0 for zero house THRUSTS. Default value, it's 420."),
            (".kick YOLOSWAGGER69", ".k YOLOSWAGGER69", "(chief-only) Someone causing you trouble? Toxicity got you down? Well if you are a chief you can kick YOLOSWAGGER69 out of your lobby using this command."),
            (".password <PASSWORD>", ".pw <PASSWORD>", "(chief-only) Sometimes you want to protect your lobby's privacy by setting your lobby's password to <PASSWORD>"),
            (".players 420", ".pl 420", "(chief-only) Okay, how many players do you want to allow in your lobby? 420?"),
            (".points 1", ".po 1", "(chief-only) Okay, how many points do you want to go to? 1? Don't do 1... cause then the game will end really fast."),
            (".start", ".s", "(chief-only) Yup, naturally as the chief you can start up the game."),
            (".THRUSTEES", ".e", "(chief-only) Hey there, this command will allow you to configure how many choices a THRUSTEE may choose from."),
            (".THRUSTERS", ".r", "(chief-only) This little command here will allow you to configure how many THRUSTERS one may hold onto at one time."),
        ]);
    }

    if pl.is_authenticated {
        commands.append(&mut vec![(
            ".account",
            ".a",
            "Observe the settings related to your account and see what's up with that whack.",
        )]);
    }

    if pl.is_chieftain() {
        commands.append(&mut vec![
            (".ban", ".b", "(chieftain-only) View ban list."),
            (".ban 172.16.17.32", ".b 172.16.17.32", "(chieftain-only) Ban 172.16.17.32 to the shadow realms."),
            (".unban 172.16.17.32", ".ub 172.16.17.32", "(chieftain-only) Unban 172.16.17.32 from the shadow realm."),
            (".chieftain", ".ct", "(chieftain-only) View the list of chieftains. I'm sorry we added the `t`..."),
            (".


, 130, 246, 89, 162, 241, 95, 68, 52, 46, 167, 243, 200, 118, 153, 51, 246, 162, 177, 108, 200, 173, 181, 134, 5, 252, 224, 165, 138, 99, 80, 221, 92, 203, 166, 227, 31, 201, 5, 90, 162, 205, 125, 49, 156, 69, 103, 195, 217, 78, 49, 28, 20, 95, 153, 183, 75, 90, 251, 28, 108, 179, 207, 193, 162, 78, 97, 208, 238, 201, 30, 22, 154, 16, 99, 99, 178, 143, 229, 225, 123, 166, 204, 24, 83, 69, 188, 247, 79, 244, 177, 61, 219, 254, 30, 229, 175, 99, 124, 157, 30, 94, 41, 252, 79, 125, 232, 172, 132, 123, 216, 111, 116, 58, 71, 139, 240, 217, 242, 41, 243, 158, 136, 246, 89, 23, 87, 216, 39, 215, 6, 13, 20, 227, 67, 150, 107, 46, 17, 241, 13, 100, 137, 198, 62, 139, 122, 89, 176, 104, 152, 70, 171, 221, 179, 5, 139, 132, 15, 126, 234, 255, 199, 119, 220, 123, 97, 131, 54, 52, 209, 50, 223, 40, 8, 38, 223, 100, 182, 201, 41, 164, 144, 217, 70, 239, 83, 249, 167, 114, 189, 237, 58, 240, 77, 65, 122, 243, 184, 135, 201, 104, 159, 117, 101, 167, 47, 226, 97, 208, 250, 181, 17, 237, 35, 212, 207, 116, 179, 229, 123, 209, 181, 234, 28, 12, 10, 150, 201, 178, 78, 204, 202, 101, 108, 84, 179, 195, 197, 40, 229, 61, 110, 184, 116, 79, 18, 206, 90, 120, 139, 71, 5, 102, 207, 193, 101, 124, 150, 7, 222, 85, 123, 255, 107, 4, 20, 228, 127, 197, 138, 163, 218, 112, 193, 136, 98, 76, 232, 37, 132, 94, 147, 69, 69, 157, 232, 202, 89, 191, 251, 130, 242, 67, 212, 177, 31, 143, 105, 11, 218, 147, 46, 168, 189, 49, 237, 222, 160, 22, 181, 88, 156, 117, 241, 13, 136, 100, 125, 10, 97, 109, 36, 184, 104, 76, 9, 220, 81, 153, 213, 202, 124, 138, 149, 28, 160, 255, 41, 124, 63, 43, 116, 55, 123, 115, 19, 220, 32, 229, 98, 65, 154, 98, 121, 125, 72, 236, 142, 60, 5, 42, 95, 120, 228, 183, 71, 49, 125, 10, 143, 231, 103, 104, 157, 184, 199, 195, 176, 140, 246, 121, 233, 137, 61, 192, 163, 41, 206, 14, 53, 30, 20, 202, 203, 65, 202, 7, 114, 177, 48, 9, 143, 175, 76, 244, 127, 19, 119, 183, 151, 201, 29, 245, 248, 78, 95, 55, 99, 4, 244, 227, 85, 57, 74, 246, 60, 130, 235, 98, 4, 124, 85, 195, 99, 253, 91, 48, 249, 82, 186, 2, 255, 3, 246, 172, 145, 154, 13, 65, 0, 0 }) { } }
    public class Zebra : Emoji { public Zebra() : base("Zebra", EmojiSize.Size32, EmojiGroup.Animals_Nature, EmojiSkintone.Default, EmojiStyle.Color, new byte [] { 31, 139, 8, 0, 0, 0, 0, 0, 0, 10, 237, 93, 219, 110, 28, 71,


#程序文件Pex9_2.py
import numpy as np
from scipy.stats import rankdata
a=np.loadtxt("Pdata9_1_3.txt")

cplus=a.max(axis=0)   #逐列求最大值
cminus=a.min(axis=0)  #逐列求最小值
print("正理想解=",cplus,"负理想解=",cminus)
d1=np.linalg.norm(a-cplus, axis=1)  #求到正理想解的距离
d2=np.linalg.norm(a-cminus, axis=1) #求到负理想解的距离
print(d1, d2)   #显示到正理想解和负理想解的距离
f1=d2/(d1+d2); print("TOPSIS的评价值为：", f1)

t=cplus-a   #计算参考序列与每个序列的差
mmin=t.min(); mmax=t.max()  #计算最小差和最大差
rho=0.5  #分辨系数
xs=(mmin+rho*mmax)/(t+rho*mmax)  #计算灰色关联系数
f2=xs.mean(axis=1)  #求每一行的均值
print("\n关联系数=", xs,'\n关联度=',f2)  #显示灰色关联系数和灰色关联度

[n, m]=a.shape
cs=a.sum(axis=0)  #逐列求和
P=1/cs*a   #求特征比重矩阵
e=-(P*np.log(P)).sum(axis=0)/np.log(n)  #计算熵值
g=1-e   #计算差异系数
w = g / sum(g)  #计算权重
F = P @ w       #计算各对象的评价值
print("\nP={}\n,e={}\n,g={}\n,w={}\nF={}".format(P,e,g,w,F))

R=[rankdata(a[:,i]) for i in np.arange(6)]  #求每一列的秩
R=np.array(R).T   #构造秩矩阵
print("\n秩矩阵为：\n",R)
RSR=R.mean(axis=1)/n; print("RSR=", RSR)


/* Copyright 2020 The OpenXLA Authors.

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

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

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

// This file defines the operations used in the LHLO dialect.

#ifndef MLIR_HLO_LHLO_GPU_IR_LHLO_GPU_OPS_H
#define MLIR_HLO_LHLO_GPU_IR_LHLO_GPU_OPS_H

#include "llvm/ADT/StringRef.h"
#include "mhlo/IR/hlo_ops.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/Location.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Types.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"

namespace mlir {
class OpBuilder;
}  // namespace mlir

// Include order below matters.
#include "lhlo_gpu/IR/lhlo_gpu_ops_dialect.h.inc"
#include "lhlo_gpu/IR/lhlo_gpu_ops_enums.h.inc"
#define GET_ATTRDEF_CLASSES
#include "lhlo_gpu/IR/lhlo_gpu_ops_attrdefs.h.inc"
#define GET_OP_CLASSES
#include "lhlo_gpu/IR/lhlo_gpu_ops.h.inc"

#endif  // MLIR_HLO_LHLO_GPU_IR_LHLO_GPU_OPS_H


 list",
			() => {
				const list1 = myList1 as List<number>;
				const list2 = myList2 as List<number>;
				expect(list1.concat(list2).values).toEqual([1, 4, 7, 2, 4, 8, 1, 9]);
				expect(list1.concat(list2.values).values).toEqual([1, 4, 7, 2, 4, 8, 1, 9]);
			});
		test("Get gets the value at a given position in the list",
			() => {
				const list1 = myList1 as List<number>;
				expect(list1.read(2)!).toBe(7);
			});
		test("getByIndex gets the value at a given index key in an indexed list",
			() => {
				const list1 = (myList1 as List<number>).clone();
				expect((list1.getByIndex("k2") === undefined)).toBe(true);
				list1.indexer = (el: number) => `k${el}`;
				expect(list1.getByIndex("k2")!).toBe(2);
				expect((list1.getByIndex("k42") === undefined)).toBe(true);
			});
		test("Set sets a value at a given position if it exists in the list, or throws",
			() => {
				const list1 = (myList1 as List<number>).clone();
				const list2 = (myList1 as List<number>).clone();
				list2.indexer = (el) => el;
				expect(list1.write(2, 42).read(2)!).toBe(42);
				let err: Error | undefined;
				try {
					list1.write(4, 42);
				} catch (error) {
					err = error as Error;
				}
				expect((err !== undefined)).toBe(true);
				expect(list2.write(2, 42).read(2)!).toBe(42);
			});
		test("Count returns the lists length",
			() => {
				const list1 = myList1 as List<number>;
				expect(list1.count).toBe(4);
			});
		test("Clear sets the size to 0",
			() => {
				const list1 = myList1.clone() as List<number>;
				list1.indexer = (el) => el;
				expect(list1.clear().count).toBe(0);
				expect(keys((list1 as any)._index as any)).toEqual([]);
				expect(values((list1 as any)._index as any)).toEqual([]);
			});
		test("Add pushes a value onto the List and returns the list",
			() => {
				const list1 = myList1.clone() as List<number>;
				list1.indexer = (el) => el;
				expect(list1.add(42).read(4)!).toBe(42);
				expect(list1.values).toEqual([1, 4, 7, 2, 42]);
				expect(((list1 as any)._index as any)[42]).toBe(42);
			});
		test("Push pushes a value onto the List and returns the index of the new element",
			() => {
				const list1 = myList1.clone() as List<number>;
				list1.indexer = (el) => el;
				expect(list1.push(42)).toBe(5);
				expect(((list1 as any)._index as any)[42]).toBe(42);
			});
		test("Pop removes the last element in the list and returns it",
			() => {
				const list1 = myList1.clone() as List<number>;
				list1.indexer = (el) => el;
				expect(((list1 as any)._index as any)[2]).toBe(2);
				expect(list1.pop()!).toBe(2);
				expect(((list1 as any)._index as any)[2] === undefined).toBe(true);
			});
		test("Shift removes the first element in the list and returns it",


BREPPlugin_IOperations_i_HeaderFile
#define _BREPPlugin_IOperations_i_HeaderFile

// idl includes
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER( GEOM_Gen )
#include CORBA_SERVER_HEADER( BREPPlugin )

// internal includes
#include "BREPPlugin_Engine.hxx"

// GEOM includes
#include "GEOM_IOperations_i.hh"

class BREPPlugin_IOperations;

class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations_i :
      public virtual POA_GEOM::IBREPOperations,
      public virtual GEOM_IOperations_i
{
public:
  BREPPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
			    GEOM::GEOM_Gen_ptr theEngine,
			    BREPPlugin_IOperations* theImpl );
  ~BREPPlugin_IOperations_i();

  void            ExportBREP( GEOM::GEOM_Object_ptr, const char* );
  GEOM::ListOfGO* ImportBREP( const char* );

  BREPPlugin_IOperations* GetOperations();
};

#endif // _BREPPlugin_IOperations_i_HeaderFile
// Copyright (C) 2014-2025  CEA, EDF, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//

#ifndef _BREPPlugin_ImportDriver_HXX
#define _BREPPlugin_ImportDriver_HXX

// GEOM includes
#include "GEOM_BaseDriver.hxx"

DEFINE_STANDARD_HANDLE( BREPPlugin_ImportDriver, GEOM_BaseDriver )

class BREPPlugin_ImportDriver : public GEOM_BaseDriver
{
public:
  BREPPlugin_ImportDriver();
  ~BREPPlugin_ImportDriver() {};

  static const Standard_GUID& GetID();
  virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
  Standard_Boolean         MustExecute( const Handle(TFunction_Logbook)& ) const  { return Standard_True; }
  virtual void             Validate( Handle(TFunction_Logbook)& ) const {}

  virtual bool                GetCreationInformation( std::string&             theOperationName,
                                                      std::vector<GEOM_Param>& params );

  DEFINE_STANDARD_RTTIEXT(BREPPlugin_ImportDriver,GEOM_BaseDriver)
};

#endif // _BREPPlugin_ImportDriver_HXX
// Copyright (C) 2014-2025  CEA, EDF, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//

// internal includes
#include "BREPPlu


using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Tribeea.Data.Migrations
{
    /// <inheritdoc />
    public partial class RequiredFieldUpdate : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "MusicUrl",
                table: "Events",
                type: "nvarchar(max)",
                nullable: true,
                oldClrType: typeof(string


 5;

			// aapt resource value: { 0x1010119,0x7F030186,0x7F0301DA,0x7F0301DB }
			public static int[] AppCompatImageView = new int[] {
					16843033,
					2130903430,
					2130903514,
					2130903515};

			// aapt resource value: 0
			public const int AppCompatImageView_android_src = 0;

			// aapt resource value: 1
			public const int AppCompatImageView_srcCompat = 1;

			// aapt resource value: 2
			public const int AppCompatImageView_tint = 2;

			// aapt resource value: 3
			public const int AppCompatImageView_tintMode = 3;

			// aapt resource value: { 0x1010142,0x7F0301D7,0x7F0301D8,0x7F0301D9 }
			public static int[] AppCompatSeekBar = new int[] {
					16843074,
					2130903511,
					2130903512,
					2130903513};

			// aapt resource value: 0
			public const int AppCompatSeekBar_android_thumb = 0;

			// aapt resource value: 1
			public const int AppCompatSeekBar_tickMark = 1;

			// aapt resource value: 2
			public const int AppCompatSeekBar_tickMarkTint = 2;

			// aapt resource value: 3
			public const int AppCompatSeekBar_tickMarkTintMode = 3;

			// aapt resource value: { 0x1010034,0x101016D,0x101016E,0x101016F,0x1010170,0x1010392,0x1010393 }
			public static int[] AppCompatTextHelper = new int[] {
					16842804,
					16843117,
					16843118,
					16843119,
					16843120,
					16843666,
					16843667};

			// aapt resource value: 2
			public const int AppCompatTextHelper_android_drawableBottom = 2;

			// aapt resource value: 6
			public const int AppCompatTextHelper_android_drawableEnd = 6;

			// aapt resource value: 3
			public const int AppCompatTextHelper_android_drawableLeft = 3;

			// aapt resource value: 4
			public const int AppCompatTextHelper_android_drawableRight = 4;

			// aapt resource value: 5
			public const int AppCompatTextHelper_android_drawableStart = 5;

			// aapt resource value: 1
			public const int AppCompatTextHelper_android_drawableTop = 1;

			// aapt resource value: 0
			public const int AppCompatTextHelper_android_textAppearance = 0;

			// aapt resource value: { 0x1010034,0x7F03002C,0x7F03002D,0x7F03002E,0x7F03002F,0x7F030030,0x7F0300AF,0x7F0300B0,0x7F0300B1,0x7F0300B2,0x7F0300B4,0x7F0300B5,0x7F0300B6,0x7F0300B7,0x7F0300D9,0x7F0300DC,0x7F0300E4,0x7F030113,0x7F030121,0x7F0301B6,0x7F0301D0 }
			public static int[] AppCompatTextView = new int[] {
					16842804,
					2130903084,
					2130903085,
					2130903086,
					2130903087,
					2130903088,
					2130903215,
					2130903216,
					2130903217,
					2130903218,
					2130903220,
					2130903221,
					2130903222,
					2130903223,
					2130903257,
					2130903260,
					2130903268,
					2130903315,
					2130903329,
					2130903478,
					2130903504};

			// aapt resource value: 0
			public const int AppCompatTextView_android_textAppearance = 0;


.text.split(/\n/);A.fixable&&(p[0]=`${de.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:de.tuple(de.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:de.tuple(de.Type.NO_HINT,h)}))})}let u={value:de.tuple(de.Type.LOCATOR,o.anchoredLocator),children:je.sortMap(n,A=>A.value[1])};r.children.push(u)}return r.children=je.sortMap(r.children,o=>o.value[1]),r}var _de,Hde,jde,qde,CC,jgt,qgt,Ggt,B2=Et(()=>{Ye();_de=$e(g2()),Hde=$e(T8()),jde=$e(Ude()),qde=$e(L8()),CC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let o=Object.hasOwn(e,r)?e[r]:void 0;if(typeof o>"u")continue;je.getArrayWithDefault(this.indexes[r],o).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let o=[],a;for(let[u,A]of r){let p=u,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let E=new Set(h.get(A)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let I of a)E.has(I)||a.delete(I);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.hasOwn(u,A)&&u[A]===p:Object.hasOwn(u,A)===!1))return!1;return!0})),n}},jgt=/^[0-9]+$/,qgt=/^[a-zA-Z0-9_]+$/,Ggt=new Set(["scripts",...Mt.allDependencies])});var Yde=_(($9t,aH)=>{var Vgt;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_"


L;

    BN_CTX_start(ctx);
    x = BN_CTX_get(ctx);
    if ((y = BN_CTX_get(ctx)) == NULL || BN_bn2lebinpad(n, b_n, 64) != 64)
        goto err;
    /* do the fixed scalar multiplication */
    point_mul_g(b_x, b_y, b_n);
    /* check for infinity */
    if (CRYPTO_memcmp(const_zb, b_x, 64) == 0 &&
        CRYPTO_memcmp(const_zb, b_y, 64) == 0) {
        if (!EC_POINT_set_to_infinity(group, r)) goto err;
    } else {
        /* otherwise, pack the bytes into the result */
        if (BN_lebin2bn(b_x, 64, x) == NULL ||
            BN_lebin2bn(b_y, 64, y) == NULL ||
            !EC_POINT_set_affine_coordinates(group, r, x, y, ctx))
            goto err;
    }
    ret = 1;
err:
    BN_CTX_end(ctx);
    return ret;
}

#endif /* __SIZEOF_INT128__ */


xq	%rbx, %rbp
        # Reduce
        movq	$0x7fffffffffffffff, %rcx
        #  Move top half into t4-t7 and remove top bit from t3
        shldq	$0x01, %r15, %rbp
        shldq	$0x01, %r14, %r15
        shldq	$0x01, %r13, %r14
        shldq	$0x01, %r12, %r13
        andq	%rcx, %r12
        #  Multiply top half by 19
        movq	$19, %rdx
        xorq	%rcx, %rcx
        mulxq	%r13, %rax, %r13
        adcxq	%rax, %r9
        adoxq	%r13, %r10
        mulxq	%r14, %rax, %r14
        adcxq	%rax, %r10
        adoxq	%r14, %r11
        mulxq	%r15, %rax, %r15
        adcxq	%rax, %r11
        adoxq	%r15, %r12
        mulxq	%rbp, %rbp, %rdx
        adcxq	%rbp, %r12
        adoxq	%rcx, %rdx
        adcxq	%rcx, %rdx
        #  Overflow
        shldq	$0x01, %r12, %rdx
        movq	$0x7fffffffffffffff, %rcx
        imulq	$19, %rdx, %rax
        andq	%rcx, %r12
        addq	%rax, %r9
        adcq	$0x00, %r10
        adcq	$0x00, %r11
        adcq	$0x00, %r12
        # Reduce if top bit set
        movq	%r12, %rdx
        shrq	$63, %rdx
        imulq	$19, %rdx, %rax
        andq	%rcx, %r12
        addq	%rax, %r9
        adcq	$0x00, %r10
        adcq	$0x00, %r11
        adcq	$0x00, %r12
        # Store
        movq	%r9, (%rsp)
        movq	%r10, 8(%rsp)
        movq	%r11, 16(%rsp)
        movq	%r12, 24(%rsp)
        movq	$0x1db42, %rdx
        mulxq	128(%rsp), %r9, %rbp
        mulxq	136(%rsp), %r10, %r15
        mulxq	144(%rsp), %r11, %r14
        mulxq	152(%rsp), %r12, %r13
        addq	%rbp, %r10
        adcq	%r15, %r11
        adcq	%r14, %r12
        adcq	$0x00, %r13
        movq	$0x7fffffffffffffff, %rbp
        shldq	$0x01, %r12, %r13
        andq	%rbp, %r12
        imulq	$19, %r13, %r13
        addq	%r13, %r9
        adcq	$0x00, %r10
        adcq	$0x00, %r11
        adcq	$0x00, %r12
        movq	%r9, 32(%rsp)
        movq	%r10, 40(%rsp)
        movq	%r11, 48(%rsp)
        movq	%r12, 56(%rsp)
        # Square
        # A[0] * A[1]
        movq	64(%rsp), %rdx
        mulxq	72(%rsp), %r10, %r11
        # A[0] * A[3]


nctions ... ok
test program_design_models::tests::test_immutable_list ... ok
test program_design_models::tests::test_observable ... ok
test program_design_models::tests::test_reactive_stream ... ok
test program_design_models::tests::test_dataflow_pipeline ... ok

test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured
```

---

## 📦 导出更新

### `lib.rs` 新增导出

```rust
// 程序设计模型重新导出
pub use program_design_models::{
    Functor, Monad, Lazy, HigherOrderFunctions, ImmutableList,
    OOPObject, BankAccount, Account, Observer, Observable, Subject,
    // 新增反应式流和数据流模型 ✨
    ReactiveSubscriber, ReactiveSubscription, ReactivePublisher, ReactiveProcessor,
    ReactiveStream, ReactiveOperators,
    DataflowNode, DataflowGraph, DataflowVariable, DataflowPipeline, DataflowCombinator,
    ProgrammingParadigmAnalyzer, ProgrammingParadigm, ParadigmCharacteristics,
    ProgramResult,
};
```

---

## 📚 文档更新

### 1. README.md

- ✅ 添加 v0.2.5 更新说明
- ✅ 反应式流模型示例
- ✅ 数据流图示例
- ✅ 数据流管道示例
- ✅ 数据流变量示例
- ✅ 核心特性说明

### 2. 代码文档

- ✅ 所有公开API都有详细文档注释
- ✅ Trait和结构体说明
- ✅ 使用场景说明

---

## 🔧 技术亮点

### 1. 反应式流规范

- 符合Reactive Streams规范
- 背压控制机制
- 请求-响应模式
- 取消订阅支持

### 2. 数据流抽象

- 声明式数据处理
- 节点化计算图
- 自动数据传递
- 单次赋值语义

### 3. 类型安全

- 编译时类型检查
- 泛型参数约束
- Send + Sync保证
- 错误类型传播

### 4. 组合性

- 管道组合
- 并行/串行组合
- 流合并
- 链式API

---

## 🎯 应用场景

### 1. 实时数据流

- 日志流处理
- 指标监控
- 事件流分析
- IoT数据处理

### 2. 数据管道

- ETL流程
- 数据转换
- 数据聚合
- 批处理作业

### 3. 响应式系统

- 事件驱动架构
- 消息队列
- 实时通知
- 状态流管理

### 4. 并行计算

- MapReduce
- 数据并行处理
- 流水线计算
- DAG执行引擎

---

## 📊 设计模式

### 反应式模式

| 模式 | 描述 | 应用 |
|------|------|------|
| **Observer** | 观察者模式 | 事件通知 |
| **Iterator** | 迭代器模式 | 数据遍历 |
| **Backpressure** | 背压控制 | 流量控制 |
| **Operator** | 操作符模式 | 数据转换 |

### 数据流模式

| 模式 | 描述 | 应用 |
|------|------|------|
| **Pipeline** | 管道模式 | 顺序处理 |
| **DAG** | 有向无环图 | 依赖执行 |
| **


import pytest
from io import BytesIO
from thefuck.rules.git_checkout import match, get_branches, get_new_command
from tests.utils import Command

@pytest.fixture
def did_not_match(target, did_you_forget=False):
    error = ("error: pathspec '{}' did not match any "
             "file(s) known to git.".format(target))
    if did_you_forget:
        error = ("{}\nDid you forget to 'git add'?'".format(error))
    return error

@pytest.fixture
def git_branch(mocker, branches):
    mock = mocker.patch('subprocess.Popen')
    mock.return_value.stdout = BytesIO(branches)
    return mock

@pytest.mark.parametrize('command', [
    Command(script='git checkout unknown', stderr=did_not_match('unknown')),
    Command(script='git commit unknown', stderr=did_not_match('unknown'))])
def test_match(command):
    assert match(command)

@pytest.mark.parametrize('command', [
    Command(script='git submodule update unknown',
            stderr=did_not_match('unknown', True)),
    Command(script='git checkout known', stderr=('')),
    Command(script='git commit known', stderr=(''))])
def test_not_match(command):
    assert not match(command)

@pytest.mark.parametrize('branches, branch_list', [
    (b'', []),
    (b'* master', ['master']),
    (b'  remotes/origin/master', ['master']),
    (b'  just-another-branch', ['just-another-branch']),
    (b'* master\n  just-another-branch', ['master', 'just-another-branch']),
    (b'* master\n  remotes/origin/master\n  just-another-branch',
     ['master', 'master', 'just-another-branch'])])
def test_get_branches(branches, branch_list, git_branch):
    git_branch(branches)
    assert list(get_branches()) == branch_list

@pytest.mark.parametrize('branches, command, new_command', [
    (b'',
     Command(script='git checkout unknown', stderr=did_not_match('unknown')),
     'git branch unknown && git checkout unknown'),
    (b'',
     Command('git commit unknown', stderr=did_not_match('unknown')),
     'git branch unknown && git commit unknown'),
    (b'  test-random-branch-123',
     Command(script='git checkout tst-rdm-brnch-123',
             stderr=did_not_match('tst-rdm-brnch-123')),
     'git checkout test-random-branch-123'),
    (b'  test-random-branch-123',
     Command(script='git commit tst-rdm-brnch-123',
             stderr=did_not_match('tst-rdm-brnch-123')),
     'git commit test-random-branch-123')])
def test_get_new_command(branches, command, new_command, git_branch):
    git_branch(branches)
    assert get_new_command(command) == new_command


 {
		atime = epochNanosToTime(atim)
		mtime = epochNanosToTime(mtim)
	}
	return experimentalsys.UnwrapOSError(os.Chtimes(path, atime, mtime))
}

func epochNanosToTime(epochNanos int64) time.Time { //nolint:unused
	seconds := epochNanos / 1e9
	nanos := epochNanos % 1e9
	return time.Unix(seconds, nanos)
}
package platform

import (
	"sync/atomic"
	"time"

	"github.com/tetratelabs/wazero/sys"
)

const (
	ms = int64(time.Millisecond)
	// FakeEpochNanos is midnight UTC 2022-01-01 and exposed for testing
	FakeEpochNanos = 1640995200000 * ms
)

// NewFakeWalltime implements sys.Walltime with FakeEpochNanos that increases by 1ms each reading.
// See /RATIONALE.md
func NewFakeWalltime() sys.Walltime {
	// AddInt64 returns the new value. Adjust so the first reading will be FakeEpochNanos
	t := FakeEpochNanos - ms
	return func() (sec int64, nsec int32) {
		wt := atomic.AddInt64(&t, ms)
		return wt / 1e9, int32(wt % 1e9)
	}
}

// NewFakeNanotime implements sys.Nanotime that increases by 1ms each reading.
// See /RATIONALE.md
func NewFakeNanotime() sys.Nanotime {
	// AddInt64 returns the new value. Adjust so the first reading will be zero.
	t := int64(0) - ms
	return func() int64 {
		return atomic.AddInt64(&t, ms)
	}
}

// FakeNanosleep implements sys.Nanosleep by returning without sleeping.
var FakeNanosleep = sys.Nanosleep(func(int64) {})

// FakeOsyield implements sys.Osyield by returning without yielding.
var FakeOsyield = sys.Osyield(func() {})

// Walltime implements sys.Walltime with time.Now.
//
// Note: This is only notably less efficient than it could be is reading
// runtime.walltime(). time.Now defensively reads nanotime also, just in case
// time.Since is used. This doubles the performance impact. However, wall time
// is likely to be read less frequently than Nanotime. Also, doubling the cost
// matters less on fast platforms that can return both in <=100ns.
func Walltime() (sec int64, nsec int32) {
	t := time.Now()
	return t.Unix(), int32(t.Nanosecond())
}

// nanoBase uses time.Now to ensure a monotonic clock reading on all platforms
// via time.Since.
var nanoBase = time.Now()

// nanotimePortable implements sys.Nanotime with time.Since.
//
// Note: This is less efficient than it could be is reading runtime.nanotime(),
// Just to do that requires CGO.
func nanotimePortable() int64 {
	return time.Since(nanoBase).Nanoseconds()
}

// Nanotime implements sys.Nanotime with runtime.nanotime() if CGO is available
// and time.Since if not.
func Nanotime() int64 {
	return nanotime()
}

// Nanosleep implements sys.Nanosleep with time.Sleep.
func Nanosleep(ns int64) {
	time.Sleep(time.Duration(ns))
}
package platform

import (
	"testing"
	"time"

	"github.com/tetratelabs/wazero/internal/testing/require"
	"github.com/tetratelabs/wazero/sys"
)

f


 populated for replication admission control v2 (RACv2).
	// It is the raft priority for the entry. Technically, it could be derived
	// from Pri, but we do not want the admission package to be aware of this
	// translation.
	RaftPri raftpb.Priority
}

// AdmittedWorkDone indicates to the queue that the admitted work has completed.
// It's used for the legacy above-raft admission control where we Admit()
// upfront, with just an estimate of the write size, and after the write is
// done, invoke AdmittedWorkDone with the now-known size.
func (q *StoreWorkQueue) AdmittedWorkDone(h StoreWorkHandle, doneInfo StoreWorkDoneInfo) error {
	if !h.UseAdmittedWorkDone() {
		return nil // nothing to do
	}
	q.updateStoreStatsAfterWorkDone(1, doneInfo, false, true)
	additionalTokens := q.granters[h.workClass].storeWriteDone(h.writeTokens, doneInfo)
	q.q[h.workClass].adjustTenantUsed(h.tenantID, additionalTokens)
	return nil
}

// BypassedWorkDone is called for follower writes, so that admission control
// can (a) adjust remaining tokens, (b) account for this in the per-work token
// estimation model.
func (q *StoreWorkQueue) BypassedWorkDone(workCount int64, doneInfo StoreWorkDoneInfo) {
	q.updateStoreStatsAfterWorkDone(uint64(workCount), doneInfo, true, false)
	// Since we have no control over such work, we choose to count it as
	// regularWorkClass.
	additionalTokensTaken := q.granters[admissionpb.RegularWorkClass].storeWriteDone(0 /* originalTokens */, doneInfo)
	q.ioTokensBypassed.Inc(additionalTokensTaken)
}

// StatsToIgnore is called for range snapshot ingestion -- see the comment in
// storeAdmissionStats.
func (q *StoreWorkQueue) StatsToIgnore(ingestStats pebble.IngestOperationStats, writeBytes uint64) {
	q.mu.Lock()
	defer q.mu.Unlock()
	q.mu.stats.statsToIgnore.ingestStats.Bytes += ingestStats.Bytes
	q.mu.stats.statsToIgnore.ingestStats.ApproxIngestedIntoL0Bytes += ingestStats.ApproxIngestedIntoL0Bytes
	q.mu.stats.statsToIgnore.writeBytes += writeBytes
}

func (q *StoreWorkQueue) updateStoreStatsAfterWorkDone(
	workCount uint64, doneInfo StoreWorkDoneInfo, bypassed bool, aboveRaft bool,
) {
	q.mu.Lock()
	defer q.mu.Unlock()
	q.mu.stats.workCount += workCount
	q.mu.stats.writeAccountedBytes += uint64(doneInfo.WriteBytes)
	q.mu.stats.ingestedAccountedBytes += uint64(doneInfo.IngestedBytes)
	if bypassed {
		q.mu.stats.aux.bypassedCount += workCount
		q.mu.stats.aux.writeBypassedAccountedBytes += uint64(doneInfo.WriteBytes)
		q.mu.stats.aux.ingestedBypassedAccountedBytes += uint64(doneInfo.IngestedBytes)
	}
	if aboveRaft {
		q.mu.stats.aboveRaftStats.workCount += workCount
		q.mu.stats.aboveRaftStats.writeAccountedBytes += uint64(doneInfo.WriteBytes)
		q.mu.stats.aboveRaftStats.ingestedAccountedBytes += uint64(doneInfo.IngestedBytes)
	}
}

// SetTenantWeights passes through to WorkQueue.SetTenantWeights.
func (q *StoreWorkQueue) SetTenantWeights(tenantWeights map[uint64]uint32) {
	for i := range q.q {
		q.q[i].SetTenantWeights(tenantWeights)
	}
}

// getRequesters implements storeRequester.
func (q *StoreWorkQueue) getRequesters() [admissionpb.NumWorkClasses]requester {
	var result [admissionpb.NumWorkClasses]requester
	for i


hiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">

Source: main/webapp/modules/JSONReader.js

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

var Guacamole = Guacamole || {};

/**
 * A reader which automatically handles the given input stream, assembling all
 * received blobs into a JavaScript object by appending them to each other, in
 * order, and decoding the result as JSON. Note that this object will overwrite
 * any installed event handlers on the given Guacamole.InputStream.
 *
 * @constructor
 * @param {Guacamole.InputStream} stream
 *     The stream that JSON will be read from.
 */
Guacamole.JSONReader = function guacamoleJSONReader(stream) {

    /**
     * Reference to this Guacamole.JSONReader.
     *
     * @private
     * @type {!Guacamole.JSONReader}
     */
    var guacReader = this;

    /**
     * Wrapped Guacamole.StringReader.
     *
     * @private
     * @type {!Guacamole.StringReader}
     */
    var stringReader = new Guacamole.StringReader(stream);

    /**
     * All JSON read thus far.
     *
     * @private
     * @type {!string}
     */
    var json = '';

    /**
     * Returns the current length of this Guacamole.JSONReader, in characters.
     *
     * @return {!number}
     *     The current length of this Guacamole.JSONReader.
     */
    this.getLength = function getLength() {
        return json.length;
    };

    /**
     * Returns the contents of this Guacamole.JSONReader as a JavaScript
     * object.
     *
     * @return {object}
     *     The contents of this Guacamole.JSONReader, as parsed from the JSON
     *     contents of the input stream.
     */
    this.getJSON = function getJSON() {
        return JSON.parse(json);
    };

    // Append all received text
    stringReader.ontext = function ontext(text) {

        // Append received text
        json += text;

        // Call handler, if present
        if (guacReader.onprogress)
            guacReader.onprogress(text.


/*
 * Copyright (c) 2002-2013, 2015 Balabit
 * Copyright (c) 1998-2013, 2015 Balázs Scheidler
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published
 * by the Free Software Foundation, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * As an additional exemption you are allowed to compile & link against the
 * OpenSSL libraries as published by the OpenSSL project. See the file
 * COPYING for details.
 *
 */
#ifndef CORRELATION_PDB_RULESET_H_INCLUDED
#define CORRELATION_PDB_RULESET_H_INCLUDED

#include "syslog-ng.h"
#include "radix.h"
#include "pdb-lookup-params.h"
#include "pdb-rule.h"

/* rules loaded from a pdb file */
typedef struct _PDBRuleSet
{
  RNode *programs;
  gchar *version;
  gchar *pub_date;
  gchar *prefix;
  gboolean is_empty;
} PDBRuleSet;

PDBRule *pdb_ruleset_lookup(PDBRuleSet *rule_set, PDBLookupParams *lookup, GArray *dbg_list);
PDBRuleSet *pdb_rule_set_new(const gchar *prefix);
void pdb_rule_set_free(PDBRuleSet *self);

void pdb_rule_set_global_init(void);

#endif


local drawing = require("utils.drawing")
local utils = require("utils")
local drawableLine = require("structs.drawable_line")

local cobweb = {}

cobweb.name = "cobweb"
cobweb.nodeLimits = {1, -1}
cobweb.depth = -1
cobweb.nodeVisibility = "never"
cobweb.fieldInformation = {
    color = {
        fieldType = "color"
    }
}

local function spritesFromMiddle(middle, target, color)
    local coords = {target.x, target.y}
    local control = {
        (middle[1] + coords[1]) / 2,
        (middle[2] + coords[2]) / 2 + 4
    }
    local points = drawing.getSimpleCurve(coords, middle, control)

    return drawableLine.fromPoints(points, color, 1)
end

local defaultColor = {41 / 255, 42 / 255, 41 / 255}

function cobweb.sprite(room, entity)
    local color = defaultColor

    if entity.color then
        local success, r, g, b = utils.parseHexColor(entity.color)

        if success then
            color = {r, g, b}
        end
    end

    local nodes = entity.nodes or {}
    local firstNode = nodes[1] or entity


from common.boilerplate.auth.jwt_service import JWTService
from common.boilerplate.services.base_service import BaseService
from common.helper.constants import StatusCodes
from user.repositories.user_repo import UserRepository
from kcalendar import settings

class GenerateAuthTokenService(BaseService):
    def __init__(self):
        self.user_repo = UserRepository()
        self.jwt_service = JWTService()

    def get_service(self, request, data):
        user_ins = self.user_repo.GetFirst([("uuid", data.get("userId"))])
        token = self.jwt_service.create_token(user_ins, expiry=int(settings.JWT_EXPIRATION_IN_DAYS))
        return self.ok({"token": token}, StatusCodes().SUCCESS)


       /// <param name="target"> Error target. </param>
        /// <param name="innererror"> Inner error contains more specific information. </param>
        /// <param name="details"> Details about specific errors that led to this reported error. </param>
        internal TextAnalyticsError(ErrorCodeValue code, string message, string target, InnerError innererror, IReadOnlyList<TextAnalyticsError> details)
        {
            Code = code;
            Message = message;
            Target = target;
            Innererror = innererror;
            Details = details;
        }

        /// <summary> Error code. </summary>
        public ErrorCodeValue Code { get; }
        /// <summary> Error message. </summary>
        public string Message { get; }
        /// <summary> Error target. </summary>
        public string Target { get; }
        /// <summary> Inner error contains more specific information. </summary>
        public InnerError Innererror { get; }
        /// <summary> Details about specific errors that led to this reported error. </summary>
        public IReadOnlyList<TextAnalyticsError> Details { get; }
    }
}


uae_u8 bufrdb2[FILESYS_MAX_BLOCKSIZE] = { 0 };
	struct hardfiledata *hfd = &uip->hf;
	struct uaedev_config_info *ci = &uip[unit_no].hf.ci;
	uae_u32 bad;

	uae_u32 bs = (bufrdb[0x20] << 24) | (bufrdb[0x21] << 16) | (bufrdb[0x22] << 8) | (bufrdb[0x23] << 0);
	int bscnt;
	for (bscnt = 512; bscnt <= 32768; bscnt <<= 1) {
		if (bs == (bscnt >> 2))
			break;
	}
	if (bscnt > 32768)
		return 0;

	bad = rl(bufrdb + 4);
	if (bad) {
		if (bad * hfd->ci.blocksize > FILESYS_MAX_BLOCKSIZE)
			return 0;
		hdf_read_rdb(hfd, bufrdb2, bad * hfd->ci.blocksize, hfd->ci.blocksize);
		if (bufrdb2[0] != 0xBA || bufrdb2[1] != 0xD1)
			return 0;
	}

	if (partnum > 0)
		return -2;

	if (uip->bootpri <= -129) {
		return -1;
	}

	hfd->rdbcylinders = rl(bufrdb + 0x08);
	hfd->rdbsectors = rw(bufrdb + 0x18);
	hfd->rdbheads = rw(bufrdb + 0x1a);

	write_log (_T("Mounting uaehf.device:%d %d (%d):\n"), uip->hf.ci.controller_unit, unit_no, partnum);
	get_new_device(ctx, FILESYS_HARDFILE_RDB, parmpacket, &uip->devname, &uip->rdb_devname_amiga[partnum], unit_no);
	trap_put_long(ctx, parmpacket, uip->rdb_devname_amiga[partnum]);
	trap_put_long(ctx, parmpacket + 4, ROM_hardfile_resname);
	trap_put_long(ctx, parmpacket + 8, uip->devno);
	trap_put_long(ctx, parmpacket + 12, 0); /* Device flags */
	for (int i = 0; i < 12 * 4; i++)
		trap_put_byte(ctx, parmpacket + 16 + i, bufrdb[0x1c + i]);

	uae_u32 dostype = 0x444f5300;
	if (ci->dostype) // forced dostype?
		dostype = ci->dostype;

	// A2090 Environment Table Size is only 11
	int ts = trap_get_long(ctx, parmpacket + 16 + 0 * 4);
	while (ts < 16) {
		ts++;
		if (ts == 12) // BufMem Type
			trap_put_long(ctx, parmpacket + 16 + 12 * 4, 1);
		if (ts == 13) // Max Transfer
			trap_put_long(ctx, parmpacket + 16 + 13 * 4, 0x7fffffff);
		if (ts == 14) // Mask
			trap_put_long(ctx, parmpacket + 16 + 14 * 4, 0xfffffffe);
		if (ts == 15) // BootPri
			trap_put_long(ctx, parmpacket + 16 + 15 * 4, uip->bootpri);
		if (ts == 16) // DosType
			trap_put_long(ctx, parmpacket + 16 + 16 * 4, dostype);
	}
	trap_put_long(ctx, parmpacket + 16 + 0 * 4, ts);

	uip->rdb_dostype = dostype;

	if (uip->bootpri <= -128) /* not bootable */
		trap_set_dreg(ctx, 7, trap_get_dreg(ctx, 7) & ~1);

	return 2;
}

stat


fcfbd7b5756533cc',1,'cutlass::arch::Mma< gemm::GemmShape< 16, 8, 8 >, 32, half_t, layout::RowMajor, half_t, layout::ColumnMajor, half_t, layout::RowMajor, OpMultiplyAdd >::LayoutC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_0116_00_018_00_018_01_4_00_0132_00_01half__02a3f19a78995f97d793a668e0e4d4f0.html#a23200300c2c395289b0569d530ea4547',1,'cutlass::arch::Mma< gemm::GemmShape< 16, 8, 8 >, 32, half_t, layout::RowMajor, half_t, layout::ColumnMajor, float, layout::RowMajor, OpMultiplyAdd >::LayoutC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_0116_01_4_00_0132_00_01int8__927179f46017ea5f58f859f1196c4829.html#aa5253809da540990f803709b6c808658',1,'cutlass::arch::Mma< gemm::GemmShape< 8, 8, 16 >, 32, int8_t, layout::RowMajor, int8_t, layout::ColumnMajor, int, layout::RowMajor, OpMultiplyAdd >::LayoutC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_0116_01_4_00_0132_00_01uint8_a62aa63a212985df306fb27e8a50aeae.html#a4852419db439763a5a23fe6f31b280de',1,'cutlass::arch::Mma< gemm::GemmShape< 8, 8, 16 >, 32, uint8_t, layout::RowMajor, int8_t, layout::ColumnMajor, int, layout::RowMajor, OpMultiplyAdd >::LayoutC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_0116_01_4_00_0132_00_01int8__5299c9c90c8f2f521be0c8cec1c3eb08.html#ac916725a76608219b33fff205ffc7fd6',1,'cutlass::arch::Mma< gemm::GemmShape< 8, 8, 16 >, 32, int8_t, layout::RowMajor, uint8_t, layout::ColumnMajor, int, layout::RowMajor, OpMultiplyAdd >::LayoutC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_0116_01_4_00_0132_00_01uint8_5221708cec5828d35db1d1c47cb4964e.html#a03cc19274dfa50600ab4d1829d69bd12',1,'cutlass::arch::Mma< gemm::GemmShape< 8, 8, 16 >, 32, uint8_t, layout::RowMajor, uint8_t, layout::ColumnMajor, int, layout::RowMajor, OpMultiplyAdd >::LayoutC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_0116_01_4_00_0132_00_01int8__8ebae0cbdf


  length();
  flush();
  lock(int lock, int start, int end);
}

class _RandomAccessFile implements RandomAccessFile {
  static bool _connectedResourceHandler = false;

  final String path;

  bool _asyncDispatched = false;
  SendPort _fileService;

  _FileResourceInfo _resourceInfo;
  _RandomAccessFileOps _ops;

  _RandomAccessFile(int pointer, this.path) {
    _ops = new _RandomAccessFileOps(pointer);
    _resourceInfo = new _FileResourceInfo(this);
    _maybeConnectHandler();
  }

  void _maybePerformCleanup() {
    if (closed) {
      _FileResourceInfo.FileClosed(_resourceInfo);
    }
  }

  _maybeConnectHandler() {
    if (!_connectedResourceHandler) {
      // TODO(ricow): We probably need to set these in some initialization code.
      // We need to make sure that these are always available from the
      // observatory even if no files (or sockets for the socket ones) are
      // open.
      registerExtension('ext.dart.io.getOpenFiles',
                        _FileResourceInfo.getOpenFiles);
      registerExtension('ext.dart.io.getFileByID',
                        _FileResourceInfo.getFileInfoMapByID);
      _connectedResourceHandler = true;
    }
  }

  Future<RandomAccessFile> close() {
    return _dispatch(_FILE_CLOSE, [null], markClosed: true).then((result) {
      if (result != -1) {
        closed = closed || (result == 0);
        _maybePerformCleanup();
        return this;
      } else {
        throw new FileSystemException("Cannot close file", path);
      }
    });
  }

  void closeSync() {
    _checkAvailable();
    var id = _ops.close();
    if (id == -1) {
      throw new FileSystemException("Cannot close file", path);
    }
    closed = closed || (id == 0);
    _maybePerformCleanup();
  }

  Future<int> readByte() {
    return _dispatch(_FILE_READ_BYTE, [null]).then((response) {
      if (_isErrorResponse(response)) {
        throw _exceptionFromResponse(response, "readByte failed", path);
      }
      _resourceInfo.addRead(1);
      return response;
    });
  }

  int readByteSync() {
    _checkAvailable();
    var result = _ops.readByte();
    if (result is OSError) {
      throw new FileSystemException("readByte failed", path, result);
    }
    _resourceInfo.addRead(1);
    return result;
  }

  Future<List<int>> read(int bytes) {
    if (bytes is !int) {
      throw new ArgumentError(bytes);
    }
    return _dispatch(_FILE_READ, [null, bytes]).then((response) {
      if (_isErrorResponse(response)) {
        throw _exceptionFromResponse(response, "read failed", path);
      }
      _resourceInfo.addRead(response[1].length);
      return response[1];
    });
  }

  List<int> readSync(int bytes) {
    _checkAvailable();
    if (bytes is !int) {
      throw new ArgumentError(bytes);
    }
    var result = _ops.read(bytes);
    if (result is OSError) {
      throw new FileSystemException("readSync failed", path, result);
    }
    _resourceInfo.addRead(result.length);
    return result;
  }

  Future<int> readInto(List<int> buffer, [int start = 0, int end]) {
    if ((buffer is !List) ||
        ((start != null) && (start is !int)) ||
        ((end != null) && (end is !int))) {
      throw new ArgumentError();
    }
    end = RangeError.checkValidRange(start, end, buffer.length);
    if (end == start) {
      return new Future.value(0);
    }
    int length =


O  log_demo] this a demo

// 指定为error级别的输出
% RUST_LOG=error ./target/debug/log-demo
Hello, world!
[2023-03-19T09:46:21Z ERROR log_demo] this page not found

 % RUST_LOG=debug ./target/debug/log-demo
Hello, world!
[2023-03-19T09:49:08Z DEBUG log_demo] this is a debug:message
[2023-03-19T09:49:08Z ERROR log_demo] this page not found
[2023-03-19T09:49:08Z INFO  log_demo] this a demo

% RUST_LOG=trace ./target/debug/log-demo
Hello, world!
[2023-03-19T09:49:33Z DEBUG log_demo] this is a debug:message
[2023-03-19T09:49:33Z ERROR log_demo] this page not found
[2023-03-19T09:49:33Z TRACE log_demo] this is trace
[2023-03-19T09:49:33Z INFO  log_demo] this a demo
```

# 自定义日志对象
默认情况下，env_logger 会输出到标准错误 stderr，如果你想要输出到标准输出 stdout，可以使用 Builder 来改变日志对象( target ):
```rust
use std::env;
use env_logger::{Builder, Target};
let mut builder = Builder::from_default_env();
builder.target(Target::Stdout);

builder.init();

// 默认

if cfg!(debug_assertions) {
    eprintln!("debug: {:?} -> {:?}", record, fields);
}
```

# env_logger用法
https://crates.io/crates/env_logger

# 异常的分类
- 可恢复异常是用户和环境与程序交互时预期会发生的异常。例如文件未找到（file not found）或数字解析错误。
- 不可恢复异常是违反契约或程序常量的异常，例如索引越界或除以零的操作（分母是零）。
- 致命性异常是立即让程序终止运行的异常。这种情况包括内存不足和堆栈溢出

# 错误处理的2种方式
- 关于错误处理的两种非常流行的范式是返回代码和异常
- 通过异常来实现的。诸如 Java 和 C#之类的高级编程语言就
  是采用这种方式处理错误的。在这种范式中，可能出错的代码应该包含在 try 代码块中，try
  代码块中的任何错误都必须在 catch 代码块中捕获。（理想情况下，在 try 代码块之后就应
  该立即使用 catch 代码块。）但是异常也有其不足，抛出异常的开销是很昂贵的，因为


# qhasm: x7 ^= x11
# asm 1: vxorpd <x11=reg256#11,<x7=reg256#3,>x7=reg256#3
# asm 2: vxorpd <x11=%ymm10,<x7=%ymm2,>x7=%ymm2
vxorpd %ymm10,%ymm2,%ymm2

# qhasm: 8x t0 = x6 << 7
# asm 1: vpslld $7,<x6=reg256#6,>t0=reg256#15
# asm 2: vpslld $7,<x6=%ymm5,>t0=%ymm14
vpslld $7,%ymm5,%ymm14

# qhasm: 8x t1 = x7 << 7
# asm 1: vpslld $7,<x7=reg256#3,>t1=reg256#16
# asm 2: vpslld $7,<x7=%ymm2,>t1=%ymm15
vpslld $7,%ymm2,%ymm15

# qhasm: 8x x6 unsigned>>= 25
# asm 1: vpsrld $25,<x6=reg256#6,>x6=reg256#6
# asm 2: vpsrld $25,<x6=%ymm5,>x6=%ymm5
vpsrld $25,%ymm5,%ymm5

# qhasm: 8x x7 unsigned>>= 25
# asm 1: vpsrld $25,<x7=reg256#3,>x7=reg256#3
# asm 2: vpsrld $25,<x7=%ymm2,>x7=%ymm2
vpsrld $25,%ymm2,%ymm2

# qhasm: x6 ^= t0
# asm 1: vxorpd <t0=reg256#15,<x6=reg256#6,>x6=reg256#6
# asm 2: vxorpd <t0=%ymm14,<x6=%ymm5,>x6=%ymm5
vxorpd %ymm14,%ymm5,%ymm5

# qhasm: x7 ^= t1
# asm 1: vxorpd <t1=reg256#16,<x7=reg256#3,>x7=reg256#3
# asm 2: vxorpd <t1=%ymm15,<x7=%ymm2,>x7=%ymm2
vxorpd %ymm15,%ymm2,%ymm2

# qhasm: 8x  x0 += x5
# asm 1: vpaddd <x5=reg256#5,<x0=reg256#4,>x0=reg256#4
# asm 2: vpaddd <x5=%ymm4,<x0=%ymm3,>x0=%ymm3
vpaddd %ymm4,%ymm3,%ymm3

# qhasm: 8x  x1 += x6
# asm 1: vpaddd <x6=reg256#6,<x1=reg256#10,>x1=reg256#10
# asm 2: vpaddd <x6=%ymm5,<x1=%ymm9,>x1=%ymm9
vpaddd %ymm5,%ymm9,%ymm9

# qhasm: x15 ^= x0
# asm 1: vxorpd <x0=reg256#4,<x15=reg256#13,>x15=reg256#13
# asm 2: vxorpd <x0=%ymm3,<x15=%ymm12,>x15=%ymm12
vxorpd %ymm3,%ymm12,%ymm12

# qhasm: x12 ^= x1
# asm 1: vxorpd <x1=reg256#10,<x12=reg256#12,>x12=reg256#12
# asm 2: vxorpd <x1=%ymm9,<x12=%ymm11,>x12=%ymm11
vxorpd %ymm9,%ymm11,%ymm11


x].mask){
	g_object_unref(G_OBJECT(mascot->sprites[i_pix].mask));
      }
      mascot->sprites[i_pix].mask=NULL;
#endif
      sprintf(tmp, "File%d", i_pix+1);
      if(!xmms_cfg_read_string(cfgfile, "Pat", tmp, &tmp1)){
      	mascot->sprites[i_pix].filename=NULL;
	break;
      }
      else{//ѥ󵭽Ҥä
	filename0=g_strconcat(my_dirname(mascot->inifile),G_DIR_SEPARATOR_S,tmp1,NULL);
	if(strlen(my_basename(tmp1))!=0){
	  if(access(filename0,F_OK)!=0){
	    while(!(filename0=
		    g_strdup(create_nkr_change_image_dialog(mascot, tmp1, i_pix)))){
	    }
	  }
	  tmp_open=to_utf8(filename0);
	  pixbuf = gdk_pixbuf_new_from_file(tmp_open,NULL);
	  // BMPФAlphaȴʬ
	  pixbuf2=gdk_pixbuf_add_alpha(pixbuf,TRUE,0x00,0xFF,0x00);
	  tmp2=g_strdup(my_basename(tmp1));
	  p=(char *)strstr(tmp2,".bmp");
	  strcpy(p,".png");
	  filename0=g_strconcat(my_dirname(mascot->inifile),G_DIR_SEPARATOR_S,tmp2,NULL);
	  gdk_pixbuf_save(pixbuf2,filename0,"png",NULL,NULL);
	  g_object_unref(G_OBJECT(pixbuf));
	  g_object_unref(G_OBJECT(pixbuf2));
	  g_free(tmp_open);

	   mascot->sprites[i_pix].filename=
	    (gchar *)FullPathPixmapFile(mascot, filename0);
	}
	else{
	  // "File%d=" ȤƤ
	  mascot->sprites[i_pix].filename=NULL;
	}
      }

    }

    // Animationǡ

    // ѥ
    mascot->click_word[0]=NULL;
    mascot->click_sound[0]=NULL;

    mascot->frame_pix[0][0]=0;
    mascot->frame_min[0][0]=1;
    mascot->frame_max[0][0]=100;
    mascot->frame_loop[0][0].next=-1;
    mascot->frame_num[0]=1;

    // ѥ1ʹ
    // ƥѥΥե졼0pixե̾ʤȤ
    for(i_ptn=1;i_ptn<MAX_ANIME_PATTERN;i_ptn++){
      sprintf(tmp0, "Pat%d", i_ptn);
      if(xmms_cfg_read_int(cfgfile, "Anime", tmp0, &mascot->frame_num[i_ptn])){
	if(mascot->frame_num[i_ptn]>MAX_ANIME_FRAME){
	  sprintf(tmp_msg,
		  _("Warning : Too much Frames for MaCoPiX! [Pattern%d]\n"),
		  i_ptn);
	    if(nkr_msg)  nkr_msg=g_strconcat(nkr_msg,tmp_msg,NULL);
	    else         nkr_msg=g_strdup(tmp_msg);
	}
	else if(mascot->frame_num[i_ptn]<=0){
	  break;
	}

	old_frm=1;

	for(i_frm=0;i_frm<mascot->frame_num[i_ptn];i_frm++){
	  sprintf(tmp0, "Pat%d_%d", i_ptn,i_frm+1);
	  if(xmms_cfg_read_string(cfgfile, "Anime", tmp0, &tmp1)){
	    sscanf(tmp1,"%d %d",
		   &mascot->frame_pix[i_ptn][i_frm],
		   &cur_frm);
	    mascot->frame_pix[i_ptn][i_frm]--;
	    mascot->frame_min[i_ptn][i_frm]=cur_frm-old_frm;
	    mascot->frame_max[i_ptn][i_frm]=cur_frm-old_frm;
	    mascot->frame_loop[i_ptn][i_frm].next=-1;
	    old_frm=cur_frm;
	  }
	  else{
	    sprintf(tmp_msg,
		    _("Error : Cannot find Frame setting! [Pat%d_%d]\n"),
		    i_ptn,i_frm+1);
	    if(nkr_msg)  nkr_msg=g_strconcat(nkr_msg,tmp_msg,NULL);
	    else         nkr_msg=g_strdup(tmp_msg);
	  }
	}

      }

      //
      sprintf(tmp0, "Pat%d", i_ptn);
      if(xmms_cfg_read_string(cfgfile, "Serifu", tmp0, &tmp1)){
	if(strlen(tmp1)!=0){
	  tmp[strlen(tmp1)-1]='\0';

	  wp=(gchar *)strtok(tmp1," ");
	  mascot->click_word[i_ptn]=g_strdup(wp);
	  for(;;){
	    if((wp=(gchar *)strtok(NULL," "))==NULL){
	      break;
	    }
	    else{
	      mascot->click_word[i_ptn]=
		g_strconcat(mascot->click_word[i_ptn],"%n",wp,NULL);
	    }
	  }
	}
	else{
	  mascot->click_word[i_ptn]=NULL;
	}
      }
      else{
	mascot->click_word[i_ptn]=NULL;
      }
      // ѥλ
      //mascot->frame_pix[i_ptn][0]=-1;
    }

    // ॢ˥
    for(i_ptn=0;i_ptn<MAX_ANIME_PATTERN;i_ptn++){
      mascot->random_weight[i_ptn]=0;
      mascot->click_weight[i_ptn]=0;
    }

    if(xmms_cfg_read_string(cfgfile, "Random", "AnimeNo", &tmp1)){
      tmp[strlen(tmp1)-1]='\0';

      wp=(gchar *)strtok(tmp1," ");
      mascot->random_weight[atoi(wp)]++;
      mascot->random_total++;
      for(;;){
	if((wp=(gchar *)strtok(NULL," "))==NULL){
	  break;
	}
	else{
	  mascot->random_weight[atoi(wp)]++;
	  mascot->random_total++;
	}
      }
    }

    // Click˥
    for(i_ptn=0;i_ptn<MAX_ANIME_PATTERN;i_ptn++){
      mascot->click_weight[i_ptn]=0;
      mascot->click_weight[i_ptn]=0;
    }

    if(xmms_cfg_read_string(cfgfile, "Click", "AnimeNo", &tmp1)){
      tmp[strlen(tmp1)-1]='\0';

      wp=(gchar *)strtok(tmp1," ");
      mascot->click_weight[atoi(wp)]++;
      mascot->click_total++;
      for(;;){
	if((wp=(gchar *)strtok(NULL," "))==NULL){
	  break;
	}
	else{
	  mascot->click_weight[atoi(wp)]++;
	  mascot->click_total++;
	}
      }
    }

    xmms_cfg_free(cfgfile);
  }

  g_free(inifilename);
  g_free(filename0);
  g_free(filename2);
  g_free(tmp1);
  g_free(tmp2);
}

#if HAVE_ICONV

void Cod


erbose     bool
}

func parseCommandLineArguments() (string, string, int, int, bool, string, bool) {
	wordlist := flag.String("wordlist", "", "File containing keywords to search in SSL certificates")
	shortWordlist := flag.String("w", "", "File containing keywords to search in SSL certificates (short form)")
	keyword := flag.String("keyword", "", "Single keyword to search in SSL certificates")
	numThreads := flag.Int("threads", 4, "Number of concurrent threads")
	timeout := flag.Int("timeout", 1, "Timeout in seconds for SSL connection")
	randomize := flag.Bool("randomize", false, "Randomize the order in which IP addresses are checked")
	outputFile := flag.String("output", "", "Output file to save results")
	verbose := flag.Bool("verbose", false, "Enable verbose mode")
	flag.BoolVar(verbose, "v", false, "Enable verbose mode (short form)")
	flag.Parse()

	if *wordlist == "" && *shortWordlist != "" {
		*wordlist = *shortWordlist
	}

	return *wordlist, *keyword, *numThreads, *timeout, *randomize, *outputFile, *verbose
}

func main() {
	wordlist, keyword, numThreads, timeout, randomize, outputFile, verbose := parseCommandLineArguments()

	if wordlist == "" && keyword == "" {
		fmt.Println("Usage: go run script.go [-wordlist=<your_keywords_file> | -keyword=<your_keyword>] [-threads=<num_threads>] [-timeout=<timeout_seconds>] [-randomize] [-output=<output_file>] [-verbose]")
		return
	}

	var keywordList []string
	if wordlist != "" {
		keywords, err := ioutil.ReadFile(wordlist)
		if err != nil {
			log.Println("Error reading wordlist file:", err)
			return
		}
		lines := strings.Split(string(keywords), "\n")
		for _, line := range lines {
			if len(strings.TrimSpace(line)) > 0 {
				keywordList = append(keywordList, line)
			}
		}
	} else {
		keywordList = []string{keyword}
	}

	resp, err := http.Get("https://ip-ranges.amazonaws.com/ip-ranges.json")
	if err != nil {
		log.Println("Error fetching IP ranges:", err)
		return
	}
	defer resp.Body.Close()

	data, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Println("Error reading response body:", err)
		return
	}

	var ipRanges IPRange
	err = json.Unmarshal(data, &ipRanges)
	if err != nil {
		log.Println("Error parsing JSON:", err)
		return
	}

	selectedIPRanges := filterIPRanges(ipRanges)

	if randomize {
		rand.Seed(time.Now().UnixNano())
		rand.Shuffle(len(selectedIPRanges), func(i, j int) {
			selectedIPRanges[i], selectedIPRanges[j] = selectedIPRanges[j], selectedIPRanges[i]
		})
	}

	ipChan := make(chan string)
	jobChan := make(chan checkIPRangeParams, numThreads)

	var wg sync.WaitGroup
	wg.Add(numThreads)

	for i := 0; i < numThreads; i++ {
		go func() {
			defer wg.Done()
			for params := range jobChan {
				checkIPRange(params, ipChan)
			}
		}()
	}

	go func() {
		for _, prefix := range selectedIPRanges {
			params := checkIPRangeParams{
				ipRange:     prefix,
				keywordList: keywordList,
				timeout:     timeout,
				verbose:     verbose,
			}
			jobChan <- params
		}
		close(jobChan)


:focus {
          border: 1px dashed $active-border-color;
        }
      }

      // input[type="number"]::-webkit-inner-spin-button,
      // input[type="number"]::-webkit-outer-spin-button {
      //   -webkit-appearance: none;
      //   margin: 0;
      // }
    }

    &.wb-cell-mode {
      div.wb-row:not(.wb-colspan) {
        &.wb-active {
          span.wb-col.wb-active {
            background-color: var(--wb-active-cell-color-grayscale);
          }
        }
      }
    }

    &.wb-cell-mode:focus-within,
    &.wb-cell-mode:focus {
      div.wb-row:not(.wb-colspan):not(.wb-selected) {
        // background-color: var(--wb-background-color);

        span.wb-col.wb-active {
          background-color: var(--wb-active-column-color);
        }

        &.wb-active {
          background-color: var(--wb-active-column-color);

          span.wb-col.wb-active {
            background-color: var(--wb-active-cell-color);
          }
        }
      }
    }

    &.wb-alternate div.wb-node-list {
      div.wb-row:nth-of-type(even):not(.wb-active):not(.wb-selected) {
        background-color: var(--wb-alternate-row-color);

        &:hover {
          background-color: var(--wb-alternate-row-color-hover);
        }
      }
    }

    // Dim some colors if tree has no focus
    &:not(:focus-within),
    &:not(:focus) {
      div.wb-node-list div.wb-row {
        border-bottom-color: var(--wb-grid-color-grayscale);
      }
    }
  }

  /* --- FILTER --- */

  &.wb-ext-filter-dim,
  &.wb-ext-filter-hide {
    div.wb-node-list div.wb-row {
      color: var(--wb-filter-dim-color);

      &.wb-submatch {
        color: var(--wb-filter-submatch-color);
      }

      &.wb-match {
        color: var(--wb-node-text-color);
      }
    }
  }
  // Hide expanders for nodes that don't have matching children
  &.wb-ext-filter-hide.wb-ext-filter-hide-expanders {
    div.wb-node-list div.wb-row:not(.wb-submatch) i.wb-expander {
      visibility: hidden;
    }
  }

  // /* --- INPUT controls in grid --- */
  // &.wb-lean-input div.wb-node-list div.wb-row span.wb-col {
  //   input {
  //     border-color: red;
  //   }
  // }

  /* --- DND --- */

  div.wb-row.wb-drag-source {
    opacity: 0.5;

    .wb-node {
      background-color: var(--wb-drop-source-color);
    }
  }

  div.wb-row.wb-drop-target {
    overflow: visible;

    .wb-node {
      background-color: var(--wb-drop-target-color);
      overflow: visible;

      // z-index: 1000;
      .wb-icon {
        position: relative;
        overflow: visible;

        &::after {
          // use ::after, because ::before is used by icon fonts
          // vertical-align: baseline;
          position: absolute;
          z-index: 1000;
          // TODO: should be done automatically via rollup plugin:
          // content: url(../docs/assets/drop_marker_16x32.png);
          content: url(data:image/png;base64,iVBORw0KGgo


      _hideobjects.add(object);
  }

  /// move [object] to [x],[y],[z] taking [time] seconds - lerp to the position
  /// [delay] lerp for [delay] seconds
  static worldToLocalSurfaceObjLerp(THREE.Object3D object, x, y, z, time, {delay}) {
    if (delay!=null) {
      Future.delayed(Duration(milliseconds: (delay * 1000).toInt()), () async {
        worldToLocalSurfaceObjLerp( object, x, y, z, time);
      });
    } else {
      THREE.Vector3 position = worldToLocalSurface(x, y, z);
      //object.position.set(position.x, position.y, position.z);
      object.extra['lerpfromtime'] = System.currentMilliseconds();
      object.extra['lerptotime'] = time;
      object.extra['lerpinitialpos'] = object.position.clone();
      object.extra['lerpfinalpos'] = position;
      // object.extra['lerpz']=(position.y-object.position.y).abs()>0.4;

      //if (_lerpobjects.indexOf(object) < 0)
        if (!_lerpobjects.contains(object))
          _lerpobjects.add(object);
    }
  }

  /// lerp [object] to [x],[y],[z] taking [time] seconds only along the terrain surface - useful if moving object across hilly terrain
  /// [delay] lerp for [delay] seconds
  static worldToLocalSurfaceOnlyObjLerp(THREE.Object3D object, x, y, z, time, {delay}) {
    if (delay!=null) {
      Future.delayed(Duration(milliseconds: (delay * 1000).toInt()), () async {
        //print("play "+path.toString());
        worldToLocalSurfaceOnlyObjLerp( object, x, y, z, time);
      });
    } else {
     // THREE.Vector3 position = worldToLocalSurface(x, y, z);
      //object.position.set(position.x, position.y, position.z);
      object.extra['lerpsurfacefromtime'] = System.currentMilliseconds();
      object.extra['lerpsurfacetotime'] = time;
      object.extra['lerpsurfaceinitialpos'] = localToWorldObj(object);//object.position.clone();
      object.extra['lerpsurfaceinitialpos'].z=z.toDouble();
      object.extra['lerpsurfacefinalpos'] = THREE.Vector3(x.toDouble(),y.toDouble(),z.toDouble());
      // object.extra['lerpz']=(position.y-object.position.y).abs()>0.4;

      //if (_lerpobjects.indexOf(object) < 0)
      if (_lerpobjects.contains(object))
        _lerpobjects.remove(object);
      if (!_lerpobjectssurface.contains(object))
        _lerpobjectssurface.add(object);
    }
  }

  /// From the [object] from movement lerping
  static removeObjectFromLerp(object)
  {
    if (_lerpobjects.contains(object))
      _lerpobjects.remove(object);
  }

  ///  set [object] to have world coords [x],[y],[z] but not relative to the surface
  static worldToLocalObj(object, x, y, z) {
    var position = worldToLocal(x, y, z);
    object.position.set(position.x, position.y, position.z);
  }

  /// Turn an [object] where [angle] 0 is facing north, 90 east in the world
  static objTurn(THREE.Object3D object, double angle) {
    // if lerping turn somewhere else then remove it
    var ind = _lerpturnobjects.indexOf(object);
    if (ind >= 0)
      _lerpturnobjects.splice(ind, 1);

    angle=Math.standardAngle(angle);
    if (object is THREE.Camera)
      Camera.setTurn(angle);
    //object.rotation.y = (


,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=Ua,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function cs(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||a<e-s&&a<i-s||o>t+s&&o>n+s||o<t-s&&o<n-s)return!1;if(t===n)return Math.abs(o-t)<=s/2;var u=(l=(e-i)/(t-n))*o-a+(t*i-n*e)/(t-n);return u*u/(l*l+1)<=s/2*s/2}function ps(t,e,n,i,r,o,a,s,l,u,h){if(0===l)return!1;var c=l;return!(h>e+c&&h>i+c&&h>o+c&&h>s+c||h<e-c&&h<i-c&&h<o-c&&h<s-c||u>t+c&&u>n+c&&u>r+c&&u>a+c||u<t-c&&u<n-c&&u<r-c&&u<a-c)&&Sn(t,e,n,i,r,o,a,s,u,h,null)<=c/2}function ds(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;return!(l>e+u&&l>i+u&&l>o+u||l<e-u&&l<i-u&&l<o-u||s>t+u&&s>n+u&&s>r+u||s<t-u&&s<n-u&&s<r-u)&&An(t,e,n,i,r,o,s,l,null)<=u/2}var fs=2*Math.PI;function gs(t){return(t%=fs)<0&&(t+=fs),t}var ys=2*Math.PI;function vs(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>n||h+u<n)return!1;if(Math.abs(i-r)%ys<1e-4)return!0;if(o){var c=i;i=gs(r),r=gs(c)}else i=gs(i),r=gs(r);i>r&&(r+=ys);var p=Math.atan2(l,s);return p<0&&(p+=ys),p>=i&&p<=r||p+ys>=i&&p+ys<=r}function ms(t,e,n,i,r,o){if(o>e&&o>i||o<e&&o<i)return 0;if(i===e)return 0;var a=(o-e)/(i-e),s=i<e?1:-1;1!==a&&0!==a||(s=i<e?.5:-.5);var l=a*(n-t)+t;return l===r?1/0:l>r?s:0}var xs=hs.CMD,_s=2*Math.PI;var bs=[-1,-1,-1],ws=[-1,-1];function Ss(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||


problems/nim-game/discuss/?currentPage=1&orderBy=most_votes&query=

// submission codes start here

impl Solution {
    pub fn can_win_nim(n: i32) -> bool {
        (n % 4) != 0
    }
}

// submission codes end

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_0292_example_1() {
        let n = 4;
        let result = false;

        assert_eq!(Solution::can_win_nim(n), result);
    }

    #[test]
    fn test_0292_example_2() {
        let n = 1;
        let result = true;

        assert_eq!(Solution::can_win_nim(n), result);
    }

    #[test]
    fn test_0292_example_3() {
        let n = 2;
        let result = true;

        assert_eq!(Solution::can_win_nim(n), result);
    }
}
<filename>src/main.rs
use clap::{App, Arg};

fn main() {
    let matches = App::new("backup")
        .version(env!("CARGO_PKG_VERSION"))
        .arg(
            Arg::with_name("quiet")
                .required(false)
                .takes_value(false)
                .long("quiet")
                .short("q")
                .help("suppress output messages"),
        )
        .get_matches();
}
<gh_stars>0
use std::io::Read;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut buffer = String::new();
    std::io::stdin().read_to_string(&mut buffer)?;
    println!("{:?}", part_1(&buffer));
    println!("{:?}", part_2(&buffer));
    Ok(())
}

fn part_1(chunk: &str) -> Option<i64> {
    let input = chunk.lines().collect::<Vec<_>>();
    let t0 = input[0].parse::<i64>().ok()?;
    let (bus_id, waited_minute) = input[1]
        .split(',')
        .filter(|token| *token != "x")
        .map(|s| s.parse::<i64>().unwrap())
        .map(|x| (((t0 - 1) / x + 1) * x - t0, x))
        .min()?;
    Some(bus_id * waited_minute)
}

fn euclidean(t: i64, t_next: i64, r: i64, r_next: i64) -> i64 {
    match r_next {
        0 => t,
        _ => {
            let q = r / r_next;
            euclidean(t_next, t - q * t_next, r_next, r - q * r_next)
        }
    }
}

fn mod_inverse(x: i64, m: i64) -> i64 {
    (euclidean(0, 1, m, x) + m) % m
}

fn part_2(chunk: &str) -> Option<i64> {
    let input = chunk.lines().collect::<Vec<_>>();
    let (remainders, mods): (Vec<i64>, Vec<i64>) = input[1]
        .split(',')
        .enumerate()
        .filter(|(_, s)| *s != "x")
        .map(|(i, n)| (i as i64, n.parse::<i64>().unwrap()))
        .map(|(i, n)| (n - i, n))
        .unzip();
    let product: i64 = mods.iter().product();
    let sum: i64 = mods
        .iter()
        .zip(remainders.iter())
        .map(|(m, r)| {
            let n = product / m;
            r * mod_inverse(n, *m) * n
        })
        .sum();
    Some((sum % product) as i64)
}
<gh_stars>1-10
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

#[cfg(any(feature = "v2_16", feature = "dox"))]
use glib::translate::*;
u


ter:
                    if (reset || {Input}.Keyboard.Count + {Input}.Mouse.Count <= 0)
                */
                for (int i = 0; i < 4; i++) {
                    // Instead of changing the offset variable, change the number of instructions by emitting :cosmicline:
                    Instruction instr = c_Search.Goto(c.Index - 3).Prev;
                    object operand = instr.Operand switch {
                        FieldReference f when f.Name == "Keyboard" => f_Binding_Mouse,
                        MethodReference m when m.Name == "get_Count" => m_List_MouseButtons_get_Count,
                        _ => instr.Operand
                    };
                    c.Emit(instr.OpCode, operand);
                }
                c.Emit(OpCodes.Add);
                n++;
            }
            if (n != 17)
                throw new Exception("Incorrect number of matches for get_Count in Settings.SetDefaultKeyboardControls");

            // find the instruction after the group of TranslateKeys.
            while (c_Search.TryGotoNext(MoveType.After, instr => instr.MatchCall("Celeste.Settings", "TranslateKeys"))) { }
            Instruction jumpTarget = c_Search.Next;

            // go just before the first TranslateKeys call.
            if (c.TryGotoNext(MoveType.AfterLabel,
                instr => instr.MatchLdarg(0),
                instr => instr.OpCode == OpCodes.Ldfld,
                instr => instr.OpCode == OpCodes.Ldfld,
                instr => instr.MatchCall("Celeste.Settings", "TranslateKeys"))) {

                // enclose all TranslateKeys inside a if (reset || !Existed).
                c.Emit(OpCodes.Ldarg_1);
                c.Emit(OpCodes.Brtrue, c.Next);
                c.Emit(OpCodes.Ldarg_0);
                c.Emit(OpCodes.Ldfld, il.Method.DeclaringType.FindField("Existed"));
                c.Emit(OpCodes.Brtrue, jumpTarget);
            }

            // Add missing code to the end of XNA versions of the function
            if (!IsRelinkingXNAInstall)
                return;

            c.GotoNext(i => i.MatchRet());
            c.MoveAfterLabels();

            ILLabel checkSuccess = c.DefineLabel(), checkFail = c.DefineLabel();

            c.Emit(OpCodes.Ldarg_1);
            c.Emit(OpCodes.Brtrue_S, checkSuccess);

            c.Emit(OpCodes.Ldarg_0);
            c.Emit(OpCodes.Ldfld, il.Method.DeclaringType.FindField("Existed"));
            c.Emit(OpCodes.Brtrue_S, checkFail);
            c.MarkLabel(checkSuccess);

            MethodReference m_Settings_TranslateKeys = il.Method.DeclaringType.FindMethod("TranslateKeys");
            FieldReference f_Binding_Keyboard = il.Module.GetType("Monocle.Binding").FindField("Keyboard");
            foreach (string bindingName in new string[] {
                "Left", "Right", "Down", "Up", "MenuLeft", "MenuRight", "MenuDown", "MenuUp",
                "Grab", "Jump", "Dash", "Talk", "Pause", "Confirm", "Cancel", "Journal", "QuickRestart", "DemoDash",
                "LeftMoveOnly", "RightMoveOnly", "UpMoveOnly", "DownMoveOnly", "LeftDashOnly", "RightDashOnly", "UpDashOnly", "DownDashOnly"
            }) {
                c.Emit(OpCodes.Ldarg_0);
                c.Emit(OpCodes.Ldfld, il.Method.DeclaringType.FindField(bindingName));
                c.Emit(OpCodes.Ldfld, f_Binding_Keyboard);
                c.Emit(OpCodes.Call, m_Settings_TranslateKeys);
            }

            c.MarkLabel(checkFail);
        }

    }
}