sortButton = foundWordsView.findViewById(R.id.btn_sort);
        sortButton.setIconResource(sorter.getIconResource());
        sortButton.setOnClickListener(v -> sorter.changeSort());

        sortItems();

    }

    protected MaterialButton getSortButton() {
        return sortButton;
    }

    protected List<Item> getItems() {
        return items;
    }

    protected Adapter getAdapter() {
        return adapter;
    }

}
package com.serwylo.lexica.trie.tests;

import com.serwylo.lexica.lang.EnglishGB;
import com.serwylo.lexica.lang.EnglishUS;
import com.serwylo.lexica.lang.French;
import com.serwylo.lexica.lang.Language;
import com.serwylo.lexica.lang.Persian;

import net.healeys.trie.StringTrie;
import net.healeys.trie.Trie;

import org.junit.Assert;
import org.junit.Test;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.assertNotNull;

public class FullTrieTest extends TrieTest {

    @Test
    public void testEnUsDictionary() {
        Language language = new EnglishUS();
        String[] words = readDictionary(language);
        Assert.assertEquals(77517, words.length);

        Trie trie = new StringTrie(language);
        addWords(trie, words);

        assertTrieMatches("After adding entire US dictionary to a new Trie", trie, words, new EnglishUS());
    }

    @Test
    public void testEnGbDictionary() {
        Language language = new EnglishGB();
        String[] words = readDictionary(language);
        Assert.assertEquals(77097, words.length);

        Trie trie = new StringTrie(language);
        addWords(trie, words);

        assertTrieMatches("After adding entire UK dictionary to a new Trie", trie, words, new EnglishGB());
    }

    @Test
    public void testFrenchDictionary() {
        Language language = new French();
        String[] words = readDictionary(language);
        Assert.assertEquals(144582, words.length);

        Trie trie = new StringTrie(language);
        addWords(trie, words);

        assertTrieMatches("After adding entire French dictionary to a new Trie", trie, words, new French());
    }

    @Test
    public void testPersianDictionary() {
        Language language = new Persian();
        String[] words = readDictionary(language);
        Assert.assertEquals(166715, words.length);

        Trie trie = new StringTrie(language);
        addWords(trie, words);

        assertTrieMatches("After adding entire Persian dictionary to a new Trie", trie, words, new Persian());
    }

    public static String[] readDictionary(Language language) {
        try {
            List<String> words = new ArrayList<>(80000);
            InputStream stream = FullTrieTest.class.getClassLoader().getResourceAsStream(language.getDictionaryFileName());
            assertNotNull(stream);
            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
            String line = reader.readLine();
            while (line != null) {
                words.add(line);
                line = reader.readLine();
            }
            String[] wordsArray = new String[words.size()];
            words.toArray(wordsArray);
            return wordsArray;
        } catch (IOException e) {
            Assert.fail();
            throw new RuntimeException(e);
        }
    }

}
package com.serwylo.lexica.lang;

i


vel: the new zoom level
 *
 * Sets the zoom level of @web_view, i.e. the factor by which elements in
 * the page are scaled with respect to their original size.
 * If the "full-content-zoom" property is set to %FALSE (the default)
 * the zoom level changes the text size, or if %TRUE, scales all
 * elements in the page.
 *
 * Since: 1.0.1
 */
void webkit_web_view_set_zoom_level(WebKitWebView* webView, gfloat zoomLevel)
{
    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));

    webkit_web_view_apply_zoom_level(webView, zoomLevel);
    g_object_notify(G_OBJECT(webView), "zoom-level");
}

/**
 * webkit_web_view_zoom_in:
 * @web_view: a #WebKitWebView
 *
 * Increases the zoom level of @web_view. The current zoom
 * level is incremented by the value of the "zoom-step"
 * property of the #WebKitWebSettings associated with @web_view.
 *
 * Since: 1.0.1
 */
void webkit_web_view_zoom_in(WebKitWebView* webView)
{
    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));

    WebKitWebViewPrivate* priv = webView->priv;
    gfloat zoomMultiplierRatio;
    g_object_get(priv->webSettings.get(), "zoom-step", &zoomMultiplierRatio, NULL);

    webkit_web_view_set_zoom_level(webView, webkit_web_view_get_zoom_level(webView) + zoomMultiplierRatio);
}

/**
 * webkit_web_view_zoom_out:
 * @web_view: a #WebKitWebView
 *
 * Decreases the zoom level of @web_view. The current zoom
 * level is decremented by the value of the "zoom-step"
 * property of the #WebKitWebSettings associated with @web_view.
 *
 * Since: 1.0.1
 */
void webkit_web_view_zoom_out(WebKitWebView* webView)
{
    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));

    WebKitWebViewPrivate* priv = webView->priv;
    gfloat zoomMultiplierRatio;
    g_object_get(priv->webSettings.get(), "zoom-step", &zoomMultiplierRatio, NULL);

    webkit_web_view_set_zoom_level(webView, webkit_web_view_get_zoom_level(webView) - zoomMultiplierRatio);
}

/**
 * webkit_web_view_get_full_content_zoom:
 * @web_view: a #WebKitWebView
 *
 * Returns whether the zoom level affects only text or all elements.
 *
 * Return value: %FALSE if only text should be scaled (the default),
 * %TRUE if the full content of the view should be scaled.
 *
 * Since: 1.0.1
 */
gboolean webkit_web_view_get_full_content_zoom(WebKitWebView* webView)
{
    g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), FALSE);

    WebKitWebViewPrivate* priv = webView->priv;
    return priv->zoomFullContent;
}

/**
 * webkit_web_view_set_full_content_zoom:
 * @web_view: a #WebKitWebView
 * @full_content_zoom: %FALSE if only text should be scaled (the default),
 * %TRUE if the full content of the view should be scaled.
 *
 * Sets whether the zoom level affects only text or all elements.
 *
 * Since: 1.0.1
 */
void webkit_web_view_set_full_content_zoom(WebKitWebView* webView, gboolean zoomFullContent)
{
    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));

    WebKitWebViewPrivate* priv = webView->priv;
    if (priv->


sis, and the configured activation date has already passed.
//
// In production networks (mainnet and public testnets), verkle activation
// always occurs after the genesis block, making this function irrelevant in
// those cases.
func (c *ChainConfig) IsVerkleGenesis() bool {
	return c.EnableVerkleAtGenesis
}

// IsEIP4762 returns whether eip 4762 has been activated at given block.
func (c *ChainConfig) IsEIP4762(num *big.Int, time uint64) bool {
	return c.IsVerkle(num, time)
}

// CheckCompatible checks whether scheduled fork transitions have been imported
// with a mismatching chain configuration.
func (c *ChainConfig) CheckCompatible(newcfg *ChainConfig, height uint64, time uint64) *ConfigCompatError {
	var (
		bhead = new(big.Int).SetUint64(height)
		btime = time
	)
	// Iterate checkCompatible to find the lowest conflict.
	var lasterr *ConfigCompatError
	for {
		err := c.checkCompatible(newcfg, bhead, btime)
		if err == nil || (lasterr != nil && err.RewindToBlock == lasterr.RewindToBlock && err.RewindToTime == lasterr.RewindToTime) {
			break
		}
		lasterr = err

		if err.RewindToTime > 0 {
			btime = err.RewindToTime
		} else {
			bhead.SetUint64(err.RewindToBlock)
		}
	}
	return lasterr
}

// CheckConfigForkOrder checks that we don't "skip" any forks, geth isn't pluggable enough
// to guarantee that forks can be implemented in a different order than on official networks
func (c *ChainConfig) CheckConfigForkOrder() error {
	type fork struct {
		name      string
		block     *big.Int // forks up to - and including the merge - were defined with block numbers
		timestamp *uint64  // forks after the merge are scheduled using timestamps
		optional  bool     // if true, the fork may be nil and next fork is still allowed
	}
	var lastFork fork
	for _, cur := range []fork{
		{name: "homesteadBlock", block: c.HomesteadBlock},
		{name: "daoForkBlock", block: c.DAOForkBlock, optional: true},
		{name: "eip150Block", block: c.EIP150Block},
		{name: "eip155Block", block: c.EIP155Block},
		{name: "eip158Block", block: c.EIP158Block},
		{name: "byzantiumBlock", block: c.ByzantiumBlock},
		{name: "constantinopleBlock", block: c.ConstantinopleBlock},
		{name: "petersburgBlock", block: c.PetersburgBlock},
		{name: "istanbulBlock", block: c.IstanbulBlock},
		{name: "muirGlacierBlock", block: c.MuirGlacierBlock, optional: true},
		{name: "berlinBlock", block: c.BerlinBlock},
		{name: "londonBlock", block: c.LondonBlock},
		{name: "arrowGlacierBlock", block: c.ArrowGlacierBlock, optional: true},
		{name: "grayGlacierBlock", block: c.GrayGlacierBlock, optional: true},
		{name: "mergeNetsplitBlock", block: c.MergeNetsplitBlock, optional: true},
		{name: "shanghaiTime", timestamp: c.ShanghaiTime},
		{name: "cancunTime", timestamp: c.CancunTime, optional: true},
		{name: "pragueTime", timestamp: c.PragueTime, optional: true},
		{name: "osakaTime", timestamp: c.OsakaTime, optional: true},
		{name: "verkleTime", timestamp: c.VerkleTime, optional: true},
	} {
		if lastFork.name != "" {
			switch {
			// Non-optional for


Source.expression.ast;
  } else if (bindingSource is ir.StringLiteral) {
    return ast.LiteralPrimitive(bindingSource.value);
  }
  throw ArgumentError.value(
      bindingSource,
      'bindingSource',
      'BindingSource implementation $bindingSource doesn\'t support conversion '
          'to an AST.');
}

List<ir.Binding> _toSortedBindings(Map<String, ir.Binding> attributes) =>
    _toSortedMap(attributes).values.toList();

Map<K, V> _toSortedMap<K, V>(Map<K, V> data) => SplayTreeMap.from(data);

final Map<String, CompileIdentifierMetadata> _tagNameToIdentifier = {
  'a': Identifiers.HTML_ANCHOR_ELEMENT,
  'area': Identifiers.HTML_AREA_ELEMENT,
  'audio': Identifiers.HTML_AUDIO_ELEMENT,
  'button': Identifiers.HTML_BUTTON_ELEMENT,
  'canvas': Identifiers.HTML_CANVAS_ELEMENT,
  'div': Identifiers.HTML_DIV_ELEMENT,
  'form': Identifiers.HTML_FORM_ELEMENT,
  'iframe': Identifiers.HTML_IFRAME_ELEMENT,
  'input': Identifiers.HTML_INPUT_ELEMENT,
  'image': Identifiers.HTML_IMAGE_ELEMENT,
  'media': Identifiers.HTML_MEDIA_ELEMENT,
  'menu': Identifiers.HTML_MENU_ELEMENT,
  'ol': Identifiers.HTML_OLIST_ELEMENT,
  'option': Identifiers.HTML_OPTION_ELEMENT,
  'col': Identifiers.HTML_TABLE_COL_ELEMENT,
  'row': Identifiers.HTML_TABLE_ROW_ELEMENT,
  'select': Identifiers.HTML_SELECT_ELEMENT,
  'table': Identifiers.HTML_TABLE_ELEMENT,
  'textarea': Identifiers.HTML_TEXTAREA_ELEMENT,
  'ul': Identifiers.HTML_ULIST_ELEMENT,
  'svg': Identifiers.SVG_SVG_ELEMENT,
};

/// Returns strongly typed html elements to improve code generation.
CompileIdentifierMetadata identifierFromTagName(String name) =>
    _tagNameToIdentifier[name.toLowerCase()] ??
    (detectHtmlElementFromTagName(name)
        ? Identifiers.HTML_HTML_ELEMENT
        : Identifiers.HTML_ELEMENT);

const _htmlTagNames = <String>{
  'a',
  'abbr',
  'acronym',
  'address',
  'applet',
  'area',
  'article',
  'aside',
  'audio',
  'b',
  'base',
  'basefont',
  'bdi',
  'bdo',
  'bgsound',
  'big',
  'blockquote',
  'body',
  'br',
  'button',
  'canvas',
  'caption',
  'center',
  'cite',
  'code',
  'col',
  'colgroup',
  'command',
  'data',
  'datalist',
  'dd',
  'del',
  'details',
  'dfn',
  'dialog',
  'dir',
  'div',
  'dl',
  'dt',
  'element',
  'em',
  'embed',
  'fieldset',
  'figcaption',
  'figure',
  'font',
  'footer',
  'form',
  'h1',
  'h2',
  'h3',
  'h4',
  'h5',
  'h6',
  'head',
  'header',
  'hr',
  'i',
  'iframe',
  'img',
  'input',
  'ins',
  'kbd',
  'keygen',
  'label',
  'legend',
  'li',
  'link',
  'listing',
  'main',
  'map',
  'mark',
  'menu',
  'menuitem',
  'meta',
  'meter',
  'nav',
  'object',
  'ol',
  'optgroup',
  'option',
  'output',
  'p',
  'param',
  'picture',
  'pre',
  'progress',
  'q',
  'rp',
  'rt',
  'rtc',
  'ruby',
  's',


_info_t			uf_info;
	uec_num_of_threads_e		num_threads_tx;
	uec_num_of_threads_e		num_threads_rx;
	unsigned int			risc_tx;
	unsigned int			risc_rx;
	u16				rx_bd_ring_len;
	u16				tx_bd_ring_len;
	u8				phy_address;
	phy_interface_t			enet_interface_type;
	int				speed;
} uec_info_t;

/* UEC driver initialized info
*/
#define MAX_RXBUF_LEN			1536
#define MAX_FRAME_LEN			1518
#define MIN_FRAME_LEN			64
#define MAX_DMA1_LEN			1520
#define MAX_DMA2_LEN			1520

/* UEC driver private struct
*/
typedef struct uec_private {
	uec_info_t			*uec_info;
	ucc_fast_private_t		*uccf;
	struct eth_device		*dev;
	uec_t				*uec_regs;
	uec_mii_t			*uec_mii_regs;
	/* enet init command parameter */
	uec_init_cmd_pram_t		*p_init_enet_param;
	u32				init_enet_param_offset;
	/* Rx and Tx paramter */
	uec_rx_global_pram_t		*p_rx_glbl_pram;
	u32				rx_glbl_pram_offset;
	uec_tx_global_pram_t		*p_tx_glbl_pram;
	u32				tx_glbl_pram_offset;
	uec_send_queue_mem_region_t	*p_send_q_mem_reg;
	u32				send_q_mem_reg_offset;
	uec_thread_data_tx_t		*p_thread_data_tx;
	u32				thread_dat_tx_offset;
	uec_thread_data_rx_t		*p_thread_data_rx;
	u32				thread_dat_rx_offset;
	uec_rx_bd_queues_entry_t	*p_rx_bd_qs_tbl;
	u32				rx_bd_qs_tbl_offset;
	/* BDs specific */
	u8				*p_tx_bd_ring;
	u32				tx_bd_ring_offset;
	u8				*p_rx_bd_ring;
	u32				rx_bd_ring_offset;
	u8				*p_rx_buf;
	u32				rx_buf_offset;
	volatile qe_bd_t		*txBd;
	volatile qe_bd_t		*rxBd;
	/* Status */
	int				mac_tx_enabled;
	int				mac_rx_enabled;
	int				grace_stopped_tx;
	int				grace_stopped_rx;
	int				the_first_run;
	/* PHY specific */
	struct uec_mii_info		*mii_info;
	int				oldspeed;
	int				oldduplex;
	int				oldlink;
} uec_private_t;

int uec_initialize(bd_t *bis, uec_info_t *uec_info);
int uec_eth_init(bd_t *bis, uec_info_t *uecs, int num);
int uec_standard_init(bd_t *bis);
#endif /* __UEC_H__ */


from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.openai import OpenAIImageGenerationToolSpec

def test_class():
    names_of_base_classes = [b.__name__ for b in OpenAIImageGenerationToolSpec.__mro__]
    assert BaseToolSpec.__name__ in names_of_base_classes


 rowActivity = model->solutionRegion(0);
        //redo basis - first take ALL columns out
        int iColumn;
        double largeValue = model->largeValue();
        for (iColumn = 0; iColumn < numberColumns; iColumn++) {
          if (model->getColumnStatus(iColumn) == ClpSimplex::basic) {
            // take out
            if (!valuesPass) {
              double lower = columnLower[iColumn];
              double upper = columnUpper[iColumn];
              double value = columnActivity[iColumn];
              if (lower > -largeValue || upper < largeValue) {
                if (fabs(value - lower) < fabs(value - upper)) {
                  model->setColumnStatus(iColumn, ClpSimplex::atLowerBound);
                  columnActivity[iColumn] = lower;
                } else {
                  model->setColumnStatus(iColumn, ClpSimplex::atUpperBound);
                  columnActivity[iColumn] = upper;
                }
              } else {
                model->setColumnStatus(iColumn, ClpSimplex::isFree);
              }
            } else {
              model->setColumnStatus(iColumn, ClpSimplex::superBasic);
            }
          }
        }
        int iRow;
        for (iRow = 0; iRow < numberRows; iRow++) {
          int iSequence = pivotVariable[iRow];
          if (iSequence >= 0) {
            // basic
            if (iSequence >= numberColumns) {
              // slack in - leave
              //assert (iSequence-numberColumns==iRow);
            } else {
              assert(model->getRowStatus(iRow) != ClpSimplex::basic);
              // put back structural
              model->setColumnStatus(iSequence, ClpSimplex::basic);
            }
          } else {
            // put in slack
            model->setRowStatus(iRow, ClpSimplex::basic);
          }
        }
        // Put back any key variables for gub
        int dummy;
        matrix->generalExpanded(model, 1, dummy);
        // signal repeat
        coinFactorizationA_->setStatus(-99);
        // set fixed if they are
        for (iRow = 0; iRow < numberRows; iRow++) {
          if (model->getRowStatus(iRow) != ClpSimplex::basic) {
            if (rowLower[iRow] == rowUpper[iRow]) {
              rowActivity[iRow] = rowLower[iRow];
              model->setRowStatus(iRow, ClpSimplex::isFixed);
            }
          }
        }
        for (iColumn = 0; iColumn < numberColumns; iColumn++) {
          if (model->getColumnStatus(iColumn) != ClpSimplex::basic) {
            if (columnLower[iColumn] == columnUpper[iColumn]) {
              columnActivity[iColumn] = columnLower[iColumn];
              model->setColumnStatus(iColumn, ClpSimplex::isFixed);
            }
          }
        }
      }
    }
#ifndef SLIM_CLP
  } else {
    // network - fake factorization - do nothing
    coinFactorizationA_->setStatus(0);
    coinFactorizationA_->setPivots(0);
  }
#endif
#ifndef SLIM_CLP
  if (!coinFactorizationA_->status()) {
    // take out part if quadratic
    if (model->algorithm() == 2) {
      ClpObjective *obj = model->objectiveAsObject();
#ifndef NDEBUG
      ClpQuadraticObjective *quadraticObj = (dynamic_cast< ClpQuadraticObjective * >(obj));
      assert(quadraticObj);
#else
      ClpQuadraticObjective *quadraticObj = (static_cast< ClpQuadraticObjective * >(obj));
#endif
      CoinPackedMatrix *quadratic = quadraticObj->quadraticObjective();
      int numberXColumns = quadratic->getNumCols();


 GPUs or CPUs. This function is designed to support single-card Fusion and multi-card Fusion which is shown below:

| API | Device Type | Note |
| ------ | ---------------------- | ---- |
| localized            | CPU/GPU  | Single-card training or serving is recommended. |
| collective           | GPU | Multi-card training is recommended. |
| parameter_server(WIP)     | - | Currently not supported. |

## Localized training mode

### User API
GroupEmbedding provides two levels of API.The one is `tf.nn.group_embedding_lookup_sparse` 、`tf.nn.group_embedding_lookup` and the other is `tf.feature_column.group_embedding_column_scope` which is based on feature_column API.

**group_embedding_lookup_sparse**

```python
def group_embedding_lookup_sparse(params,
                                  sp_ids,
                                  combiners,
                                  sp_weights=None,
                                  partition_strategy="mod",
                                  is_sequence=False,
                                  params_num_per_group=sys.maxsize,
                                  name=None):
```

- `params` : List, This parameter could receive one or more EmbeddingVariables or native Tensorflow Variable.
- `sp_ids` : List | Tuple , SparseTensor sp_ids is the ID used for EmbeddingLookup, the length must be consistent with params.
- `combiners` : List | Tuple，The pooling method of embedding values.Currently support `mean` and `sum`.
- `sp_weights` : List | Typle the weight of sp_ids values.
- `partition_strategy` : str，Currently not supported.
- `is_sequence` : bool, Op would return Tensor shape of [B, T, D] if True
- `params_num_per_group` : int, This parameter indicates the number of Variables inside each Op. The default setting is the maximum value. The default value is suitable for GPU scenarios; when using the CPU, it is recommended to set the smaller the better.
- `name` : str group name

**group_embedding_lookup**

```python
def group_embedding_lookup(params,
                           ids,
                           partition_strategy="mod",
                           name=None):
```

- `params` : List, This parameter could receive one or more EmbeddingVariables or native Tensorflow Variable.
- `ids` : List | Tuple , Tensor ids is the ID used for EmbeddingLookup, the length must be consistent with params.
- `partition_strategy` : str，Currently not supported.
- `name` : str group name

**group_embedding_column_scope**

```python
def group_embedding_column_scope(name=None):
```
- `name` ： The name of scope.

We need to initialize a context `group_embedding_column_scope`
, and complete the construction of `EmbeddingColumn` in that context. Later, the EmbeddingColumn Lookup would be simultaneously aggregate by `tf.feature_column.input_layer`. It is worth noting that the underlying implementation of this function is designed for `tf.SparseTensor`。

### Example

**Usage of group_embedding_lookup_sparse**

```python
import tensorflow as tf

ev_opt = tf.EmbeddingVariableOption(evict_option=None,
                                    filter_option=None)

with tf.device('/GPU:{}'.format(0)): # place EV on CPU if using CPU GroupEmbedding
    var_0 = tf


(
    `doc "${change.document.uri}" change v${change.document.version}`
  );
  reparse(change.document);

  for (const doc of documents.all()) {
    doc.fan?.checkDoc(connection);
  }
});
// Make the text document manager listen on the connection
// for open, change and close text document events
documents.listen(connection);

// Listen on the connection
connection.listen();
export interface MessageRouteProps {
    /**
     * The network to lookup.
     */
    network: string;

    /**
     * The message to lookup.
     */
    messageId: string;
}
import axios, {
    AxiosResponse,
    AxiosError
} from "../../node_modules/axios/index";

interface ICoins {
    id : number;
    genstand : string;
    bud : number;
    navn : string;
}

//GetAll
 let getAllButton : HTMLButtonElement = <HTMLButtonElement>document.getElementById("getAllButton");
 getAllButton.addEventListener("click", getAllCoins)

 let getAllOutput : HTMLDivElement = <HTMLDivElement>document.getElementById("getAll");

 let url : string = "http://localhost:55534/api/coin/";

//GetOne
let inputGetone : HTMLInputElement = <HTMLInputElement>document.getElementById("getoneInput");
let getoneButton : HTMLButtonElement = <HTMLButtonElement>document.getElementById("getoneButton");
getoneButton.addEventListener("click" , getOneCoin);
let getoneOutput : HTMLDivElement = <HTMLDivElement>document.getElementById("getOne");

//Post
let postButton : HTMLButtonElement = <HTMLInputElement>document.getElementById("addButton");
postButton.addEventListener("click", addCoin)

function getAllCoins(): void{
    axios.get<ICoins[]>(url)
    .then((response: AxiosResponse<ICoins[]>) => {
        let data: ICoins[] = response.data;
        let longHtml: string = "
";
        getAllOutput.innerHTML = JSON.stringify(data);

        data.forEach( (coins : ICoins) => {
            console.log(coins.id, coins.genstand, coins.bud, coins.navn)
            longHtml += "
" + "Id: "+ coins.id + " - " +  "Genstand: "+ coins.genstand + " - " + "Bud: " + coins.bud + " - " + "Navn: " + coins.navn +
            "
";
        });
        longHtml += "
";
        getAllOutput.innerHTML = longHtml;
    })
    .catch((error: AxiosError) => {
        console.log(error);
        getAllOutput.innerHTML = error.message;
    });
}

function getOneCoin() : void {
    let id = inputGetone.value;

       if (id.length > 0)
       {
           axios.get<ICoins>(url + "/" + id)
               .then((response: AxiosResponse<ICoins>) =>{
               let dataOne : ICoins = response.data;
               let longHtml2: string = "
";

               console.log(dataOne);

               getoneOutput.innerHTML = JSON.stringify(dataOne);

               console.log(dataOne.id, dataOne.genstand, dataOne.bud, dataOne.navn);

               longHtml2 += "
" + "Id: " + dataOne.id + " - "+ " Genstand: " + dataOne.genstand + " - " +" Bud: " +  dataOne.bud + " - "+ "Navn: " + dataOne.navn + "
";

               longHtml2 += "
";
               getoneOutput.innerHTML = longHtml2;
           });
       }

   }

function addCoin(): void{

    let idinputElement : HTMLInputElement = <HTMLInputE


moveBefore(forOp);
  builder.setInsertionPointAfter(preBarrier);

  // Insert condbarrier::second_half before starting the loop
  auto i32ty = builder.getIntegerType(32);
  auto workIDX = builder.create<ROCDL::ThreadIdXOp>(loc, i32ty);
  auto constZero = builder.create<arith::ConstantIntOp>(loc, 0, 32);
  auto constWarpSize = builder.create<arith::ConstantIntOp>(loc, 256, 32);
  auto warpIDX = builder.create<arith::DivSIOp>(loc, workIDX, constWarpSize);
  auto warpLow = builder.create<arith::CmpIOp>(loc, arith::CmpIPredicate::eq,
                                               warpIDX, constZero);
  auto warpHigh = builder.create<arith::CmpIOp>(loc, arith::CmpIPredicate::ne,
                                                warpIDX, constZero);
  auto condBarrierHigh =
      builder.create<tt::amdgpu::CondBarrierOp>(loc, warpHigh);

  // Insert condbarrier::first_half after the end of the loop
  builder.setInsertionPointAfter(forOp);
  auto condBarrierLow = builder.create<tt::amdgpu::CondBarrierOp>(loc, warpLow);
}

void Pingponger::getDotPingponged() {
  if (numStages != 2) {
    std::stringstream message;
    message << "All ping pong scheduling requires 2 stages. Found " << numStages
            << " stages";
    LDBG(message.str());
    return;
  }

  OpBuilder builder(forOp);
  MLIRContext *ctx = forOp.getContext();
  Location loc = forOp.getLoc();

  forOp->walk([&](Operation *op) {
    if (auto gLoad = dyn_cast<tt::LoadOp>(op))
      gLoadOps.push_back(gLoad);
    else if (auto lLoad = dyn_cast<ttg::LocalLoadOp>(op)) {
      // This scheduling doesn't help hiding intra-warp latency. So, we only
      // collect local_load ops that are software pipelined, which means their
      // source is from loop carried values
      auto src = lLoad.getSrc();
      if (auto arg = mlir::dyn_cast<BlockArgument>(src))
        if (auto tiedLoopInit = forOp.getTiedLoopInit(arg))
          if (tiedLoopInit->get())
            lLoadOps.push_back(lLoad);
    } else if (auto lStore = dyn_cast<ttg::LocalStoreOp>(op))
      lStoreOps.push_back(lStore);
    else if (auto pingpongDot = dyn_cast<tt::DotOp>(op))
      if (pingpongDot.getType().getRank() == 2)
        dotOps.push_back(pingpongDot);
  });

  // Currently, pingpong scheduling is known as helpful under limited condition.
  // Individual conditions are checked while collecting each operation such as
  // software pipelining and dot rank=2. Also only accept the for-loop with
  // supported combination of operations because this transformation is very
  // tightly scheduling the latencies.
  if (gLoadOps.size() < 2 || lLoadOps.size() < 2 || dotOps.size() != 1) {
    std::stringstream message;
    message << "Unable to match ping pong scheduling pattern. Details: "
            << gLoadOps.size() << " global loads, " << lLoadOps.size()
            << " local loads, " << dotOps.size() << " dot products";
    LDBG(message.str());
    return;
  }

  // Determine if we have a persistent GEMM. This will decide how we interpret
  // any memory operations that we find in conditionals.
  auto assumeNotTaken = isPersistentGemm(dotOps.size());

  // The existing code depends on the loads being targeted being safe to move,
  // which will not hold if we do not properly have a GEMM. As a result, we
  // filter the associated load operations to only those that are associated
  // // with the GEMM.
  DenseSet<tt::LoadOp> dotGlobalLoads;


# Inference code generated from the JSON schema spec in @huggingface/tasks.
#
# See:
#   - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
#   - specs:  https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
from typing import Literal, Optional

from .base import BaseInferenceType, dataclass_with_extra

AudioClassificationOutputTransform = Literal["sigmoid", "softmax", "none"]

@dataclass_with_extra
class AudioClassificationParameters(BaseInferenceType):
    """Additional inference parameters for Audio Classification"""

    function_to_apply: Optional["AudioClassificationOutputTransform"] = None
    """The function to apply to the model outputs in order to retrieve the scores."""
    top_k: Optional[int] = None
    """When specified, limits the output to the top K most probable classes."""

@dataclass_with_extra
class AudioClassificationInput(BaseInferenceType):
    """Inputs for Audio Classification inference"""

    inputs: str
    """The input audio data as a base64-encoded string. If no `parameters` are provided, you can
    also provide the audio data as a raw bytes payload.
    """
    parameters: Optional[AudioClassificationParameters] = None
    """Additional inference parameters for Audio Classification"""

@dataclass_with_extra
class AudioClassificationOutputElement(BaseInferenceType):
    """Outputs for Audio Classification inference"""

    label: str
    """The predicted class label."""
    score: float
    """The corresponding probability."""


5rem;
}

.g-1,
.gy-1 {
  --bs-gutter-y: 0.25rem;
}

.g-2,
.gx-2 {
  --bs-gutter-x: 0.5rem;
}

.g-2,
.gy-2 {
  --bs-gutter-y: 0.5rem;
}

.g-3,
.gx-3 {
  --bs-gutter-x: 1rem;
}

.g-3,
.gy-3 {
  --bs-gutter-y: 1rem;
}

.g-4,
.gx-4 {
  --bs-gutter-x: 1.5rem;
}

.g-4,
.gy-4 {
  --bs-gutter-y: 1.5rem;
}

.g-5,
.gx-5 {
  --bs-gutter-x: 3rem;
}

.g-5,
.gy-5 {
  --bs-gutter-y: 3rem;
}

@media (min-width: 576px) {
  .col-sm-auto {
    flex: 0 0 auto;
    width: auto;
  }

  .col-sm-1 {
    flex: 0 0 auto;
    width: 8.33333333%;
  }

  .col-sm-2 {
    flex: 0 0 auto;
    width: 16.66666667%;
  }

  .col-sm-3 {
    flex: 0 0 auto;
    width: 25%;
  }

  .col-sm-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
  }

  .col-sm-5 {
    flex: 0 0 auto;
    width: 41.66666667%;
  }

  .col-sm-6 {
    flex: 0 0 auto;
    width: 50%;
  }

  .col-sm-7 {
    flex: 0 0 auto;
    width: 58.33333333%;
  }

  .col-sm-8 {
    flex: 0 0 auto;
    width: 66.66666667%;
  }

  .col-sm-9 {
    flex: 0 0 auto;
    width: 75%;
  }

  .col-sm-10 {
    flex: 0 0 auto;
    width: 83.33333333%;
  }

  .col-sm-11 {
    flex: 0 0 auto;
    width: 91.66666667%;
  }

  .col-sm-12 {
    flex: 0 0 auto;
    width: 100%;
  }

  .offset-sm-0 {
    margin-left: 0;
  }

  .offset-sm-1 {
    margin-left: 8.33333333%;
  }

  .offset-sm-2 {
    margin-left: 16.66666667%;
  }

  .offset-sm-3 {
    margin-left: 25%;
  }

  .offset-sm-4 {
    margin-left: 33.33333333%;
  }

  .offset-sm-5 {
    margin-left: 41.66666667%;
  }

  .offset-sm-6 {
    margin-left: 50%;
  }

  .offset-sm-7 {
    margin-left: 58.33333333%;
  }

  .offset-sm-8 {
    margin-left: 66.66666667%;
  }

  .offset-sm-9 {
    margin-left: 75%;
  }

  .offset-sm-10 {
    margin-left: 83.33333333%;
  }

  .offset-sm-11 {
    margin-left: 91.66666667%;
  }

  .g-sm-0,
.gx-sm-0 {
    --bs-gutter-x: 0;
  }

  .g-sm-0,
.gy-sm-0 {
    --bs-gutter-y: 0;
  }

  .g-sm-1,
.gx-sm-1 {
    --bs-gutter-x: 0.25rem;
  }

  .g-sm-1,


///////////////////////////////////////////////////////////////////////////
//
// logkafka - Collect logs and send lines to Apache Kafka v0.8+
//
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
//
// Licensed under the MIT 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://opensource.org/licenses/MIT
//
// 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.
//
///////////////////////////////////////////////////////////////////////////
#ifndef BASE_TOOLS_H_
#define BASE_TOOLS_H_

#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

#include <iostream>
#include <fstream>
#include <string>
#include <vector>

#include <map>
#include <set>
#include <iterator>

#include "base/common.h"

using namespace std;

extern vector<string> explode(const string&, char c);
extern vector<string> searchFiles(const string& pattern);
extern void rtrim(char *str);
extern void ltrim(char *str);
extern void trim(char *str);
extern string int2Str(long long val);
extern bool str2Bool(string str);
extern const char* realDir(const char *filepath, char *realdir);
extern bool isAbsPath(const char* filepath);

// also known as select1st in SGI STL implementation
template<typename T_PAIR>
struct GetKey: public std::unary_function<T_PAIR, typename T_PAIR::first_type>
{/*{{{*/
    const typename T_PAIR::first_type& operator()(const T_PAIR& item) const
    {
        return item.first;
    }
};/*}}}*/

extern set<std::string> diff_set(set<std::string> s1, set<std::string> s2);
extern set<std::string> intersect_set(set<std::string> s1, set<std::string> s2);

extern ino_t getInode(const char *path);
extern ino_t getInode(int fd);
extern ino_t getInode(FILE *fp);
extern off_t getFsize(const char *path);
extern off_t getFsize(int fd);
extern off_t getFsize(FILE *fp);
extern string sig2str(int signum);
extern long long hexstr2num(const char *buf, long long default_num);
void strReplace(std::string& str,
        const std::string& oldStr,
        const std::string& newStr);

int globerr(const char *path, int eerrno);
bool globPath(const string &path_pattern, vector<string> &paths);

#ifndef _GNU_SOURCE
int fdprintf(int fd, size_t bufmax, const char * fmt, ...);
#endif

extern string getHostname();

#endif // BASE_TOOLS_H_


enth = 100;

const loadedHabitStatus = <HabitStatus>[
  HabitStatus.activated,
  HabitStatus.archived,
];

const sortPositionConflictIncreaseStep = 0.000001;
const sortPositionConflictDecimalPlaces = 6;
//#endregion

//#region common
const minTimeOfDayInt = 0;
const maxTimeOfDayInt = 1440;

const appFlavorDev = 'f_dev';
const appFlavorGeneric = 'f_generic';
const appFlaborStore = 'f_store';
//#endregion

//#region components
const double dialogshowTitleMaxHeight = 400.0;

const skipReasonChipTextList = [
  '☕',
  '🛌',
  '🍔',
  '💤',
  '📱',
  '🍹',
  '🏝',
  '😍',
  '😃',
  '😕',
  '😠',
];

const kRecordAutoMarkStatusIcon = Icons.done_outline;
const kRecordUnknownStatusIcon = Icons.question_mark_outlined;
const kRecordSkipStatusIcon = Icons.remove_outlined;
const kRecordDoneStatusIcon = Icons.check_outlined;
const kRecordZeroStatusIcon = Icons.close_sharp;
//#endregion

//#region other
const chinaICPFillingNumber = "浙ICP备2024100574号-2A";
//#endregion
// Copyright 2023 Fries_I23
//
// 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.

import 'package:flutter/material.dart';

import '../common/consts.dart';
import '../l10n/localizations.dart';
import '../logging/helper.dart';
import '../models/app_reminder_config.dart';
import '../reminders/notification_service.dart';
import '../storage/profile/handlers.dart';
import '../storage/profile_provider.dart';
import 'commons.dart';

class AppReminderViewModel extends ChangeNotifier
    with NotificationChannelDataMixin, ProfileHandlerLoadedMixin {
  AppReminderProfileHandler? _rmd;

  AppReminderViewModel();

  @override
  void updateProfile(ProfileViewModel newProfile) {
    super.updateProfile(newProfile);
    _rmd = newProfile.getHandler<AppReminderProfileHandler>();
  }

  AppReminderConfig get reminder => _rmd?.get() ?? defaultAppReminder;

  Future<void> switchOff({L10n? l10n}) async {
    final reminder = this.reminder;
    if (reminder.enabled) {
      appLog.value.info("$runtimeType.switchOff",
          beforeVal: reminder.enabled, afterVal: false, ex: [l10n]);
      await _rmd?.set(reminder.copyWith(enabled: false));
      if (!await _handleChangeReminder(l10n)) notifyListeners();
    }
  }

  Future<void> switchOn({L10n? l10n}) async {
    final reminder = this.reminder;
    if (!reminder.enabled) {
      appLog.value.info("$runtimeType.switchOn",
          beforeVal: reminder.enabled, afterVal: true, ex: [l10n]);
      await _rmd?.set(reminder.copyWith(enabled: true));
      if (!await _handleChangeReminder(l10n)) notifyListeners();
    }
  }

  Future<void> switchToDaily({TimeOfDay? timeOfDay, L10n? l10n}) async {
    final reminder = this.reminder;
    final newReminder = App


14
	be,pn		%icc, 2f
	 stda		%f0, [%o0 + 0x00] %asi
	cmp		%g5, 128
	be,pn		%icc, 2f
	 stda		%f0, [%o0 + 0x40] %asi
	stda		%f0, [%o0 + 0x80] %asi
2:	brz,pn		%o3, 12f
	 add		%o0, %g5, %o0
10:	stda		%f0, [%o0 + 0x00] %asi
	stda		%f0, [%o0 + 0x40] %asi
	stda		%f0, [%o0 + 0x80] %asi
	stda		%f0, [%o0 + 0xc0] %asi
11:	subcc		%o3, 256, %o3
	bne,pt		%xcc, 10b
	 add		%o0, 256, %o0
12:
#ifdef __KERNEL__
	wr		%g2, %g0, %asi
	VISExitHalf
#else
#ifndef REGS_64BIT
	wr		%g0, FPRS_FEF, %fprs
#endif
#endif
	membar		#StoreLoad | #StoreStore
9:	andcc		%o2, 0x78, %g5
	be,pn		%xcc, 13f
	 andcc		%o2, 7, %o2
#ifdef __KERNEL__
14:	srl		%g5, 1, %o3
	sethi		%hi(13f), %g3
	sub		%g3, %o3, %g3
	jmpl		%g3 + %lo(13f), %g0
	 add		%o0, %g5, %o0
#else
14:	rd		%pc, %g3
#ifdef REGS_64BIT
	srl		%g5, 1, %o3
	sub		%g3, %o3, %


px 0px 0px rgba(0,0,0,0.1) inset;padding:8px 12px 6px 12px}.btn:visited{color:#fff}.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:0.4;cursor:not-allowed;box-shadow:none}.btn-disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:0.4;cursor:not-allowed;box-shadow:none}.btn-disabled:hover,.btn-disabled:focus,.btn-disabled:active{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:0.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980B9 !important}.btn-info:hover{background-color:#2e8ece !important}.btn-neutral{background-color:#f3f6f6 !important;color:#404040 !important}.btn-neutral:hover{background-color:#e5ebeb !important;color:#404040}.btn-neutral:visited{color:#404040 !important}.btn-success{background-color:#27AE60 !important}.btn-success:hover{background-color:#295 !important}.btn-danger{background-color:#E74C3C !important}.btn-danger:hover{background-color:#ea6153 !important}.btn-warning{background-color:#E67E22 !important}.btn-warning:hover{background-color:#e98b39 !important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f !important}.btn-link{background-color:transparent !important;color:#2980B9;box-shadow:none;border-color:transparent !important}.btn-link:hover{background-color:transparent !important;color:#409ad5 !important;box-shadow:none}.btn-link:active{background-color:transparent !important;color:#409ad5 !important;box-shadow:none}.btn-link:visited{color:#9B59B6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:before,.wy-btn-group:after{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:solid 1px #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,0.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980B9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:solid 1px #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type="search"]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bot


T):Promise<any>{
        let url=`https://pokeapi.co/api/v2/pokemon/${id}/`;
        return axios.get(url);
    }
    async handle_api_pokemon(quantity_pokemon:number = 10): Promise<object[]> {

        // let quantity_pokemon = 10;
        let save12: Array<object> = [];

        for (let i = 1; i <= quantity_pokemon; i += 1) {
          let { data: test1 } = await this.get<number>(i);
          // console.log(test1);
          save12 = [...save12,{ id: test1.id, name: test1.name, image: test1.sprites.front_shiny }];
        }
        let save1: Array<object> = [...save12, ...save12];
        save1.sort(() => Math.random() - 0.5);
        return save1
        // this.display_pokemon<Array<object>>(save1);

      }
}
export default  new api_product;import { Column, Index, Entity, ObjectID, ObjectIdColumn } from "typeorm";

@Entity()
export class OrderInfoModel {

    @ObjectIdColumn()
    public _id: ObjectID;
    @Column()
    @Index({ unique: true })
    public productId: string;
    @Column()
    public sumQuantity: number;
    @Column()
    public totalOrders: number;

    constructor(productId: string, sumQuantity: number, totalOrders: number, id?: ObjectID) {
        this._id = id == undefined ? null : id;
        this.productId = productId;
        this.sumQuantity = sumQuantity;
        this.totalOrders = totalOrders;
    }
}import { IncomingMessage, OutgoingHttpHeaders } from 'http';
import { get } from 'https';
import { Readable } from 'stream';
import { createBrotliDecompress, createGunzip, createInflate } from 'zlib';
import { DeferredPromise } from '@idlebox/common';

export class HttpError extends Error {
	constructor(public readonly url: string, public readonly code: number, msg: string) {
		super(`Request ${url} - Server responded with ${code}: ${msg}`);
	}

	static is(obj: any): obj is HttpError {
		return obj instanceof HttpError;
	}
}

type IStream = { stream: Readable };
export type INormalizedResponse = Omit<IncomingMessage, keyof Readable> & IStream;

export function downloadFile(url: string, headers?: OutgoingHttpHeaders): Promise<INormalizedResponse> {
	const dfd = new DeferredPromise<IncomingMessage & IStream>();
	_downloadFile(dfd, url, headers || {});
	return dfd.p;
}

function _downloadFile(dfd: DeferredPromise<IncomingMessage & IStream>, url: string, headers: OutgoingHttpHeaders) {
	headers['Accept-Encoding'] = 'br,gzip,deflate';

	const request = get(url, { headers }, (response) => {
		if (response.statusCode === 200) {
			let stream: Readable;
			switch (response.headers['content-encoding']) {
				case 'br':
					stream = response.pipe(createBrotliDecompress());
					break;
				// Or, just use zlib.createUnzip() to handle both of the following cases:
				case 'gzip':
					stream = response.pipe(createGunzip());
					break;
				case 'deflate':
					stream = response.pipe(createInfl


local getLevelTableByPosType = function(posType)
  local tbl
  if posType == Z.GoalPosType.Point then
    tbl = Z.TableMgr.GetTable("ScenePointInfoTableMgr")
  elseif posType == Z.GoalPosType.Npc then
    tbl = Z.TableMgr.GetTable("NpcEntityTableMgr")
  elseif posType == Z.GoalPosType.Monster then
    tbl = Z.TableMgr.GetTable("MonsterEntityTableMgr")
  elseif posType == Z.GoalPosType.Zone then
    tbl = Z.TableMgr.GetTable("ZoneEntityTableMgr")
  elseif posType == Z.GoalPosType.SceneObject then
    tbl = Z.TableMgr.GetTable("SceneObjectEntityTableMgr")
  elseif posType == Z.GoalPosType.Collection then
    tbl = Z.TableMgr.GetTable("CollectionEntityTableMgr")
  end
  return tbl
end
local changeGuideDataBySrcId = function(src, flagData)
  local guideData = Z.DataMgr.Get("goal_guide_data")
  local oldGoalList = guideData:GetGuideGoalsBySource(src) or {}
  for goalIndex, info in ipairs(oldGoalList) do
    if info.Uid == flagData.Uid then
      info.Pos = flagData.Pos
      Z.EventMgr:Dispatch(Z.ConstValue.OnRefreshGuidePos, src, info)
      return
    end
  end
end
local setGuideDataAndNotify = function(src, goalList, sourceGoalList)
  local trackTbl = Z.TableMgr.GetTable("TargetTrackTableMgr")
  local trackRow = trackTbl.GetRow(src)
  if not trackRow then
    return
  end
  local guideData = Z.DataMgr.Get("goal_guide_data")
  local oldGoalList = guideData:GetGuideGoalsBySource(src) or {}
  guideData:SetGuideGoals(src, goalList, sourceGoalList)
  if src == E.GoalGuideSource.Quest then
    if goalList == nil then
      Z.GoalGuideMgr:SetQuestGoalGuide(nil)
    else
      local zList = ZUtil.Pool.Collections.ZList_Panda_ZGame_GoalPosInfo.Rent()
      for _, info in ipairs(goalList) do
        zList:Add(info)
      end
      Z.GoalGuideMgr:SetQuestGoalGuide(zList)
      zList:Recycle()
    end
  end
  lo


}

impl Default for LeaderScheduler {
    fn default() -> Self {
        let config = LeaderSchedulerConfig::default();
        Self::new(&config)
    }
}

// Create entries such the node identified by active_keypair
// will be added to the active set for leader selection:
// 1) Give the node a nonzero number of tokens,
// 2) A vote from the validator
pub fn make_active_set_entries(
    active_keypair: &Arc<Keypair>,
    token_source: &Keypair,
    stake: u64,
    tick_height_to_vote_on: u64,
    last_entry_id: &Hash,
    last_tick_id: &Hash,
    num_ending_ticks: u64,
) -> (Vec<Entry>, VotingKeypair) {
    // 1) Assume the active_keypair node has no tokens staked
    let transfer_tx = SystemTransaction::new_account(
        &token_source,
        active_keypair.pubkey(),
        stake,
        *last_tick_id,
        0,
    );
    let mut last_entry_id = *last_entry_id;
    let transfer_entry = next_entry_mut(&mut last_entry_id, 1, vec![transfer_tx]);

    // 2) Create and register a vote account for active_keypair
    let voting_keypair = VotingKeypair::new_local(active_keypair);
    let vote_account_id = voting_keypair.pubkey();

    let new_vote_account_tx =
        VoteTransaction::new_account(active_keypair, vote_account_id, *last_tick_id, 1, 1);
    let new_vote_account_entry = next_entry_mut(&mut last_entry_id, 1, vec![new_vote_account_tx]);

    // 3) Create vote entry
    let vote_tx =
        VoteTransaction::new_vote(&voting_keypair, tick_height_to_vote_on, *last_tick_id, 0);
    let vote_entry = next_entry_mut(&mut last_entry_id, 1, vec![vote_tx]);

    // 4) Create the ending empty ticks
    let mut txs = vec![transfer_entry, new_vote_account_entry, vote_entry];
    let empty_ticks = create_ticks(num_ending_ticks, last_entry_id);
    txs.extend(empty_ticks);
    (txs, voting_keypair)
}

#[cfg(test)]
pub mod tests {
    use super::*;
    use crate::genesis_block::{GenesisBlock, BOOTSTRAP_LEADER_TOKENS};
    use hashbrown::HashSet;
    use std::hash::Hash as StdHash;
    use std::iter::FromIterator;

    fn to_hashset_owned<T>(slice: &[T]) -> HashSet<T>
    where
        T: Eq + StdHash + Clone,
    {
        HashSet::from_iter(slice.iter().cloned())
    }

    pub fn new_vote_account(
        from_keypair: &Keypair,
        voting_keypair: &VotingKeypair,
        bank: &Bank,
        num_tokens: u64,
        last_id: Hash,
    ) {
        let tx = VoteTransaction::new_account(
            from_keypair,
            voting_keypair.pubkey(),
            last_id,
            num_tokens,
            0,
        );
        bank.process_transaction(&tx).unwrap();
    }

    fn push_vote(voting_keypair: &VotingKeypair, bank: &Bank, tick_height: u64, last_id: Hash) {
        let new_vote_tx = VoteTransaction::new_vote(voting_keypair, tick_height, last_id, 0);
        bank.process_transaction(&new_vote_tx).unwrap();
    }

    fn run_scheduler_test(num_validators: usize, ticks_per_slot: u64, ticks_per_epoch: u64) {
        info!(
            "run_scheduler_test({}, {}, {})",
            num_validators, ticks_per_slot, ticks_per_epoch
        );
        // Allow the validators to be in the active window for the entire test
        let active_window_tick_length = ticks_per_epoch;

        // Set up the LeaderScheduler struct
        let leader_scheduler_config = Leader


ng;
    }

    const post1: Post = {
      title: 'post1',
      content: 'I am post1'
    };

    const post2: Post = {
      title: 'post2',
      content: 'I am post2'
    };

    const post3: Post = {
      title: 'post3',
      content: 'I am post3'
    };

    const cache = new LRUCache<string, Post>(5);
    cache.put('post:1', post1);
    cache.put('post:2', post2);
    cache.put('post:3', post3);

    expect(cache.get('post:1')).to.equal(post1);
    expect(cache.get('post:2')).to.equal(post2);
    expect(cache.get('post:3')).to.equal(post3);
  });
});
import { countBy, Entries, fromEntries, memoize, readInputLines } from "../shared/utils";

type BagColor = string;
type ColorGraph = Record<BagColor, (readonly [BagColor, number])[]>;

const parse = (line: string): Entries<ColorGraph> => {
    const [color, rest] = line.split(' bags contain ');
    const value = rest === 'no other bags.' ? [] : rest.split(', ').map(x => {
        const [num, color1, color2] = x.split(' ');
        return [`${color1} ${color2}`, parseInt(num, 10)] as const;
    });

    return [color, value];
};

const hasPath = memoize(
    (graph: ColorGraph, from: BagColor, to: BagColor): boolean => from !== to
        ? graph[from].some(([color]) => hasPath(graph, color, to))
        : true,
    (_, f, __) => f);

const countBags = memoize(
    (graph: ColorGraph, bag: BagColor): number =>
        1 + graph[bag].reduce((acc, [color, num]) => acc + (num * countBags(graph, color)), 0),
    (_, c) => c);

const day7 = (graph: ColorGraph): [number, number] => {
    const target = 'shiny gold';
    return [
        countBy(Object.keys(graph), color => color !== target && hasPath(graph, color, target)),
        countBags(graph, target) - 1,
    ];
};

(async () => {
    const lines = await readInputLines('day7');
    const graph = fromEntries(lines.map(parse));
    console.log(...day7(graph));
})();/* eslint-disable @typescript-eslint/no-explicit-any */
import * as passport from 'passport';

export namespace Otp {
  export interface VerifyFunction {
    (
      key: string,
      otp: string,
      done: (error: any, user?: any, info?: any) => void,
    ): void;
  }

  export interface StrategyOptions {
    key?: string;
    otp?: string;
  }

  export type VerifyCallback = (
    err?: string | Error | null,
    user?: any,
    info?: any,
  ) => void;


e64949e801d5066689fecd2615a8">furi_hal_usb_is_locked

bool furi_hal_usb_is_locked()

Definition furi_hal_usb.c:205

UsbApiEventType

UsbApiEventType

Definition furi_hal_usb.c:17

UsbApiEventTypeSetConfig

@ UsbApiEventTypeSetConfig

Definition furi_hal_usb.c:18

UsbApiEventTypeLock

@ UsbApiEventTypeLock

Definition furi_hal_usb.c:21

UsbApiEventTypeReinit

@ UsbApiEventTypeReinit

Definition furi_hal_usb.c:26

UsbApiEventTypeDisable

@ UsbApiEventTypeDisable

<


13 CONTINUED:

 Riker looks at the deckplate a moment.

 RIKER

    If that is Lieutenant Uhnari...

    Where's Rocha?

 BEVERLY

    The station's shuttle is gone.

    Maybe he took it.

 RIKER

    Before Uhnari died... or after?

 They consider this mystery for a moment.

 STAR TREK: "Aquiel" - REV. 11/10/92 - ACT ONE 8.

14 WORF AND N.D. (OPTICAL)

 Worf finishes cutting with the phaser. He and the N.D.

    pick up the melted section of deckplate and set it

    aside.

 WORF

    (to Riker)

    We're ready, Commander.

15 RIKER

 nods and moves to Geordi. The dog is sitting at

    Geordi's feet.

 RIKER

    Any luck downloading the station

    logs?

 GEORDI

    Not yet. I can't get past the

    security lock-outs.

    (beat)

    But I think I know why...

 Geordi indicates a monitor.

 GEORDI

    All encrypted subspace messages

    are sent through this channel.

    Look at the signal notation...

 Riker looks for a moment.

 RIKER

    It's out of sequence.

 GEORDI

    (nods)

    I'd say somebody tried to by-pass

    the access protocol and break into

    the coded messages. It caused the

    security lock-outs to freeze up.

 RIKER

    Are there any messages missing?

 GEORDI

    I won't know until I can get into

    the files.

 Geordi moves to pick up his equipment case. The dog

    follows him.

 STAR TREK: "Aquiel" - 11/05/92 - ACT ONE 9.

15 CONTINUED:

 GEORDI

    I'm going to try accessing the

    logs from another console.

 Riker nods, eyes the dog.

 RIKER

    (re: dog)

    Looks like you've made a friend.

 GEORDI

    Yeah...

 Geordi smiles, gives the dog a friendly pat.

 RIKER

    We're going back to the ship. Let

    me know as soon as you have

    something.

 GEORDI

    Aye sir.

 Riker joins Beverly. Worf and the N.D. are holding the

    section of deckplate.

 RIKER

    (taps combadge)

    Riker to Enterprise. Four to beam

    back.

 Geordi turns to the dog.

 GEORDI

    Come on, girl...

 Geordi grabs a couple of tools and walks across the

    room, as we HEAR the dematerialization, toward a set of

    doors still carrying the computer module. He taps a

    button and the doors SLIDE OPEN...

16 INT. RELAY STATION - AQUIEL'S QUARTERS


天线",
"spider-wed coil":"[电] 蛛网形线圈",
"spidered":"n. 【昆虫】；蜘蛛[蜘蛛目(Araneae 或 Araneida)节肢动物]",
"spiderflower":" 醉蝶花",
"spiderish":" 蜘蛛似的",
"spiderlike":"a. 蜘蛛似的",
"spiderling":"n. 小蜘蛛,幼蛛",
"spiderly":"[网络] 蜘蛛侠",
"spiderman":"n. <主英>高空作业的建筑工人",
"spiders":"n. 蜘蛛；网页爬虫；蜘蛛布（spider复数）",
"spiderweb":"n. 蜘蛛网",
"spiderwebbed":"(spiderweb 的过去时) n. 蜘蛛网",
"spiderwebs":"(spiderweb 的复数) n. 蜘蛛网",
"spiderwort":"n. 紫露草",
"spiderwort family":"[网络] 白花紫露草属于鸭跖草科；属于紫鸭跖草科",
"spidery":"a. 蜘蛛一般的, 细长足的, 蜘蛛网一般的",
"spie":"abbr. 国际光学工程学会（Society of Photo-Optical Instrumentation Engineers）；一种数据包记录方法（Source Path Isolation Engine）",
"spied":"v. 看见, 发现（ spy的过去式和过去分词 ）; 当间谍; 从事间谍活动; 搜集情报",
"spiedino":"n. [烹]蘸面烤肉卷(或肉圆)",
"spiegel":"[机] 镜铁",
"spiegel eisen":"[机] 镜铁",
"spiegel iron":"[化] 镜铁",
"Spiegel's line":"[医] 斯皮格耳氏线, 半月线(腹横肌)",
"Spiegel's lobe":"[医] 斯皮格耳氏叶, 尾状叶(肝)",
"spiegelberg":" [地名] [德国] 施皮格尔贝格",
"Spiegelberg's sign":"[医] 施皮格耳伯格氏征(指触恶性病变的子宫颈时,如摩擦浸湿的橡皮样)",
"spiegeleisen":"n. 镜铁",
"spiegelman":" [人名] 施皮格尔曼",
"Spiegileisin":"[机] 镜铁",
"Spiegler's reagent":"[医] 施皮格勒氏试剂(检尿白蛋白)",
"Spiegler's test":"[医] 施皮格勒氏试验(检白蛋白)",
"Spiegler's tumors":"[医] 施皮格勒氏瘤, 番茄样瘤(头皮的多数良性上皮瘤)",
"Spiegler-Fendt sarcoid":"[医] 施-芬二氏肉样瘤(含有网状细胞和淋巴细胞者)",


 the Jurisdiction
 * Dublin.
 * Any redistribution must include the specific provision above.
 */

package dev.kordex.modules.func.tags.data

import dev.kord.common.entity.Snowflake

/**
 * In-memory tags storage, intended for testing. Not optimised, doesn't store the tags when the bot stops. This class
 * uses `startsWith` to match tags based on partial keys and titles.
 *
 * Use your own implementation for your bots.
 */
class MemoryTagsData : TagsData {
	private val tags: MutableList<Tag> = mutableListOf()

	override suspend fun getTagByKey(key: String, guildId: Snowflake?): Tag? =
		tags.firstOrNull {
			it.key == key && (it.guildId == guildId || it.guildId == null)
		}

	override suspend fun getTagsByCategory(category: String, guildId: Snowflake?): List<Tag> =
		tags.filter {
			it.category == category && (it.guildId == guildId || it.guildId == null)
		}

	override suspend fun getTagsByPartialKey(partialKey: String, guildId: Snowflake?): List<Tag> =
		tags.filter {
			it.key.startsWith(partialKey, true) && (it.guildId == guildId || it.guildId == null)
		}

	override suspend fun getTagsByPartialTitle(partialTitle: String, guildId: Snowflake?): List<Tag> =
		tags.filter {
			it.title.startsWith(partialTitle, true) && (it.guildId == guildId || it.guildId == null)
		}

	override suspend fun getAllCategories(guildId: Snowflake?): Set<String> =
		tags.filter { it.guildId == guildId || it.guildId == null }
			.map { it.category }.toSet()

	override suspend fun findTags(category: String?, guildId: Snowflake?, key: String?): List<Tag> =
		tags.filter {
			(category == null || it.category.equals(category, true)) &&
				(guildId == null || it.guildId == guildId) &&
				(key == null || it.key.equals(key, true))
		}

	override suspend fun setTag(tag: Tag) {
		tags.removeIf {
			it.key == tag.key && it.guildId == tag.guildId
		}

		tags.add(tag)
	}

	override suspend fun deleteTagByKey(key: String, guildId: Snowflake?): Tag? {
		val tag = getTagByKey(key, guildId)

		tags.removeIf {
			it.key == key && it.guildId == guildId
		}

		return tag
	}
}
/*
 * Copyrighted (Kord Extensions, 2024). Licensed under the EUPL-1.2
 * with the specific provision (EUPL articles 14 & 15) that the
 * applicable law is the (Republic of) Irish law and the Jurisdiction
 * Dublin.
 * Any redistribution must include the specific provision above.
 */

package dev.kordex.modules.data.mongodb

import dev.kordex.core.builders.ExtensibleBotBuilder
import dev.kordex.modules.data.mongodb.db.Database

/**
 * Configures the bot to use MongoDB as the data storage adapter.
 *
 * This method sets up the [MongoDBDataAdapter] as the data adapter for the bot, allowing it to interact with a
 * MongoDB database for storing and retrieving data provided by storage units.
 *
 * Additionally, this method registers a hook with `beforeKoinSetup`, which checks that the database is reachable,
 * and runs any pending migrations.
 *
 * Usage:
 *
 * ```
 * ExtensibleBotBuilder(...) {
 *     mongoDB()
 * }
 * ```
 */
public suspend fun ExtensibleBotBuilder.mongoDB() {
	dataAdapter(::MongoDBDataAdapter)

	hooks {
		beforeKoinSetup {
			Database.setup()
		}
	}
}
/*
 * Copyrighted (Kord Extensions, 2024). Licensed under the EUPL-1.2
 * with


= self.embedding_model.encode(batch)
            dish_embeddings.append(embeddings)

        dish_embeddings = np.concatenate(dish_embeddings, axis=0)

        # 3. 创建并填充数据库
        db = FAISSDatabase()
        db.add_vectors(dish_embeddings, all_dishes)

        # 4. 保存数据库
        db.save(output_path)
        print(f"菜品向量库已保存到: {output_path}")
        print(f"共处理 {len(all_dishes)} 个菜品")

    def build_user_database(self, jsonl_path: str, output_path: str, batch_size: int = 32):
        """构建用户向量库"""
        print("开始构建用户向量库...")

        # 1. 收集所有用户数据
        all_users = []
        all_dish_lists = []

        with open(jsonl_path, 'r', encoding='utf-8') as f:
            for line in tqdm(f, desc="收集用户数据"):
                user_data = json.loads(line)

                # 收集所有历史菜品
                all_dishes = []
                for order in user_data['order_history']:
                    all_dishes.extend(order['dishes'])

                if not all_dishes:
                    continue  # 如果没有历史菜品，跳过该用户

                # 准备用户元数据（不包含历史订单，因为已经编码到向量中）
                user_metadata = {
                    'id': user_data['id'],
                    'name': user_data['name'],
                    'gender': user_data['gender'],
                    'age_range': user_data['age_range'],
                    'region': user_data['region'],
                    'health_conditions': user_data['health_conditions'],
                    'taste_preferences': user_data['taste_preferences'],
                    'texture_preferences': user_data['texture_preferences'],
                    'query': user_data['query']
                }

                all_users.append(user_metadata)
                all_dish_lists.append(all_dishes)

        # 2. 批量编码所有菜品列表
        print("开始编码用户历史菜品...")
        user_embeddings = []

        for dish_list in tqdm(all_dish_lists, desc="处理用户历史"):
            # 编码用户的所有历史菜品
            embeddings = self.embedding_model.encode(dish_list)
            # 计算平均向量作为用户表征
            avg_embedding = np.mean(embeddings, axis=0).reshape(1, -1)
            user_embeddings.append(avg_embedding)

        user_embeddings = np.concatenate(user_embeddings, axis=0)

        # 3. 创建并填充数据库
        db = FAISSDatabase()
        db.add_vectors(user_embeddings, all_users)

        # 4. 保存数据库
        db.save(output_path)
        print(f"用户向量库已保存到: {output_path}")
        print(f"共处理 {len(all_users)} 个用户")

class DishRecommender:
    def __init__(self, dish_db_path: str, user_db_path: str):
        # 加载菜品数据库
        self.dish_db = FAISSDatabase()
        self.dish_db.load(dish_db_path)

        # 加载用户数据库
        self.user_db = FAISSDatabase()
        self.user_db.load(user_db_path)

    def recommend_dishes(self, user_id: int, dish_names: List[str], top_k: int = 20) -> List[Dict]:
        """
        为指定用户推荐菜品

        参数:
            user_id: 用户ID
            dish_names: 待推荐的菜品名称列表(必须在菜品库中存在)
            top_k: 返回的推荐数量

        返回:
            包含推荐菜品和相似度得分的列表
        """
        # 1. 从用户库中获取用户向量
        try:
            user_vector = self.user_db.get_vector_by_name(str(user_id))
            user_metadata = self.user_db.get_metadata_by_name(str(user_id))
            print(f"User {user_id} metadata: {user_metadata}")
        except ValueError as e:
            raise ValueError(f"无法找到用户: {e}")

        # 2. 从菜品库中获取所有待推荐菜品的向量
        dish_vectors = []
        valid_dish_names = []

        for name in dish_names:
            try:
                vec = self.dish_db.get_vector_by_name(name)
                dish_vectors.append(vec)
                valid_dish_names.append(name)
            except ValueError:
                print(f"警告: 菜品 '{name}' 不在菜品库中，已跳过")

        if not valid_dish_names:
            raise ValueError("没有有效的菜品可供推荐")

        dish_vectors = np.concatenate(dish_vectors, axis=0)

        # 3. 创建临时FAISS索引
        temp_index = faiss.IndexFlatL2(1024)
        temp_index.add(dish_vectors)

        # 4. 搜索与用户向量最相似的菜品
        distances, indices = temp_index.search(user_vector, min(top_k, len(valid_dish_names)))

        # 5. 准备结果
        recommendations = []
        for i in range(len(indices[0])):
            dish_idx = indices[0][i]
            dish_name = valid_dish_names[dish_idx]
            dista


= OpConstant %uint 0",
                        "%image_2d              = OpTypeImage %float Dim2D 0 0 0 1 Unknown",
                        "%sampled_image_2d      = OpTypeSampledImage %image_2d",
                        "%image_array           = OpTypeRuntimeArray %sampled_image_2d",
                        // NOTE(eddyb) `Generic` is used here because it's the placeholder
                        // for storage class inference - both of the two `OpTypePointer`
                        // types below should end up inferring to `UniformConstant`.
                        "%ptr_image_array       = OpTypePointer Generic %image_array",
                        "%image_2d_var          = OpVariable %ptr_image_array UniformConstant",
                        "%ptr_sampled_image_2d  = OpTypePointer Generic %sampled_image_2d",
                        "", // ^^ type preamble
                        "%offset                = OpLoad _ {0}",
                        "%24                    = OpAccessChain %ptr_sampled_image_2d %image_2d_var %offset",
                        "%25                    = OpLoad %sampled_image_2d %24",
                        in(reg) &offset,
                    );
            }
        }
        #[spirv(fragment)]
        pub fn main() {
            add_decorate();
        }"#,
        r#"OpCapability Shader
OpCapability VulkanMemoryModel
OpCapability VariablePointers
OpCapability RuntimeDescriptorArray
OpExtension "SPV_KHR_vulkan_memory_model"
OpExtension "SPV_EXT_descriptor_indexing"
OpMemoryModel Logical Vulkan
OpEntryPoint Fragment %1 "main"
OpExecutionMode %1 OriginUpperLeft
OpName %2 "test_project::add_decorate"
OpName %3 "test_project::main"
OpDecorate %4 ArrayStride 4
OpDecorate %5 DescriptorSet 0
OpDecorate %5 Binding 0
%6 = OpTypeVoid
%7 = OpTypeFunction %6
%8 = OpTypeInt 32 0
%9 = OpConstant %8 1
%10 = OpTypeFloat 32
%11 = OpTypeImage %10 2D 0 0 0 1 Unknown
%12 = OpTypeSampledImage %11
%4 = OpTypeRuntimeArray %12
%13 = OpTypePointer UniformConstant %4
%5 = OpVariable %13 UniformConstant
%14 = OpTypePointer UniformConstant %12"#,
    );
}

#[test]
fn unroll_loops() {
    dis_fn(
        // FIXME(eddyb) use `for _ in 0..10` here when that works.
        r#"
#[spirv(unroll_loops)]
fn java_hash_ten_times(mut x: u32, y: u32) -> u32 {
    let mut i = 0;
    while i < 10 {
        x = 31 * x + y;
        i += 1;
    }
    x
}
#[spirv(fragment)]
pub fn main() {
    java_hash_ten_times(7, 42);
}
"#,
        "java_hash_ten_times",
        // NOTE(eddyb) this is very verbose because of the new structurizer
        // producing messier control-flow than necessary, but the important part
        // being tested is `OpLoopMerge` having `Unroll` as its "Loop Control".
        r#"%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %2
%5 = OpFunctionParameter %2
%6 = OpLabel
OpBranch %7
%7 = OpLabel
OpBranch %8
%8 = OpLabel
%9 = OpPhi %10 %11 %7 %12 %13
%14 = OpPhi %2 %4 %7 %15 %13
%16 = OpPhi %17 %18 %7 %19 %13
OpLoopMerge %20 %13 Unroll
OpBranchConditional %16 %21 %20
%21 = OpLabel
%22 = OpSLessThan %17 %9 %23
OpSelectionMerge %24 None
OpBranchConditional %22 %25 %26
%25 = OpLabel
%27 = OpIMul %2 %28 %14
%15 = OpIAdd %2 %27 %5
%12 = OpIAdd %10 %9 %29
OpBranch %24
%26 = OpLabel
OpReturnValue %14
%24 = OpLabel
%19 = OpPhi %17 %18 %25
OpBranch %13
%13 = OpLabel
OpBranch


          .elementAt(index)
          .replaceAll(RegExp(r'android:icon="[^"]*(\\"[^"]*)*"'), '''
android:icon="@mipmap/$ANDROID_ICON_NAME"
\t\tandroid:roundIcon="@mipmap/$ANDROID_ADAPTIVE_ROUND_XML_FILE_NAME_WITHOUT_EXTENSION"''');

      manifestLines.replaceRange(index, index + 1, [lineUpdated]);
      androidManifestFile.writeAsStringSync(manifestLines.join('\n'));
      CliLogger.success(
        'Created `android:roundIcon` to manifest',
        level: CliLoggerLevel.two,
      );
    }
  }
}

/// Remove android manifest icon launcher round
void _removeAndroidManifestIconLauncherRound() {
  final androidManifestFile = File(ANDROID_MANIFEST_FILE);
  final androidManifestString = androidManifestFile.readAsStringSync();
  final manifestLines = androidManifestString.split('\n');

  final index =
      manifestLines.indexWhere((line) => line.contains('android:roundIcon'));
  if (index != -1) {
    final lineUpdated = manifestLines
        .elementAt(index)
        .replaceAll(RegExp(r'android:roundIcon="[^"]*(\\"[^"]*)*"'), '');
    manifestLines.replaceRange(index, index + 1, [lineUpdated]);
    androidManifestFile.writeAsStringSync(manifestLines.join('\n'));
    CliLogger.success('Removed `android:roundIcon` from manifest',
        level: CliLoggerLevel.two);
  }
}

/// Retrieves the minSdk value
int _minSdk() {
  String? minSdkValue;

  final androidGradleFile = File(ANDROID_GRADLE_FILE);
  final List<String> androidLines =
      androidGradleFile.existsSync() ? androidGradleFile.readAsLinesSync() : [];

  //! First try -> app/build.gradle file
  const androidLineKey = 'minSdkVersion';
  minSdkValue = _getLineValueNumber(androidLines, androidLineKey);

  //! Second try -> app/build.gradle file
  if (minSdkValue == null) {
    const newAndroidLineKey = 'minSdk =';
    minSdkValue = _getLineValueNumber(androidLines, newAndroidLineKey);
  }

  //! Third try -> app/build.gradle.kts file
  if (minSdkValue == null) {
    final androidGradleKtsFile = File(ANDROID_GRADLE_KTS_FILE);
    final List<String> androidKtsLines = androidGradleKtsFile.existsSync()
        ? androidGradleKtsFile.readAsLinesSync()
        : [];
    const androidKotlinLineKey = 'minSdk =';
    minSdkValue = _getLineValueNumber(androidKtsLines, androidKotlinLineKey);
  }

  //! Fourth try -> local.properties
  if (minSdkValue == null) {
    final localLines = File(ANDROID_LOCAL_PROPERTIES).readAsLinesSync();
    const localKey = 'flutter.minSdkVersion=';
    minSdkValue = _getLineValueNumber(localLines, localKey);
  }

  //! Fifth try -> flutter.gradle file (default flutter sdk)
  if (minSdkValue == null) {
    final gradleFile = '${_flutterSdk()}$FLUTTER_SDK_GRADLE_FILE';
    final flutterLines = File(gradleFile).readA


gradeHealthPolicyObject ClusterUpgradeHealthPolicy { get; }

        /// <summary>
        /// Gets defines the application health policy map used to evaluate the health of an application or one of its children
        /// entities.
        /// </summary>
        public ApplicationHealthPolicies ApplicationHealthPolicyMap { get; }

        /// <summary>
        /// Gets duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain
        /// gracefully. This would be effective when the instance is closing during the applicatio


vector.y, min.vector.z);
        let p5 = pos3(max.vector.x, max.vector.y, min.vector.z);
        let p6 = pos3(min.vector.x, max.vector.y, min.vector.z);
        let p7 = pos3(min.vector.x, min.vector.y, min.vector.z);

        let walls = [
            Primitive::quad([p0, p1, p2, p3], BACKWARDS),
            Primitive::quad([p5, p0, p3, p4], RIGHT),
            Primitive::quad([p6, p5, p4, p7], -BACKWARDS),
            Primitive::quad([p1, p6, p7, p2], -RIGHT),
            Primitive::quad([p5, p6, p1, p0], UP),
            Primitive::quad([p3, p2, p7, p4], -UP),
        ];

        Geometry::merge(&walls)
    }
}
<filename>packages/sycamore-reactive/src/effect.rs
//! Side effects.

use std::collections::HashSet;

use crate::*;

thread_local! {
    /// While the [`EffectState`] is inside the Vec, it is owned by [`EFFECTS`].
    /// Because this is a global variable, the lifetime is necessarily `'static`. However, that does not mean
    /// that it can last forever. The `EffectState` should only be used the time it is inside [`EFFECTS`].
    pub(crate) static EFFECTS: RefCell<Vec<*mut EffectState<'static>>> = Default::default();
}

/// The internal state of an effect. The effect callback and the effect
/// dependencies are stored in this struct.
pub(crate) struct EffectState<'a> {
    /// The callback when the effect is re-executed.
    cb: Rc<RefCell<dyn FnMut() + 'a>>,
    /// A list of dependencies that can trigger this effect.
    dependencies: HashSet<EffectDependency>,
}

/// Implements reference equality for [`WeakSignalEmitter`]s.
pub(crate) struct EffectDependency(WeakSignalEmitter);
impl std::cmp::PartialEq for EffectDependency {
    fn eq(&self, other: &Self) -> bool {
        Weak::as_ptr(&self.0 .0) == Weak::as_ptr(&other.0 .0)
    }
}
impl std::cmp::Eq for EffectDependency {}
impl std::hash::Hash for EffectDependency {
    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
        Weak::as_ptr(&self.0 .0).hash(state);
    }
}

impl<'a> EffectState<'a> {
    // Clears the dependencies (both links and backlinks).
    /// Should be called when re-executing an effect to recreate all
    /// dependencies.
    pub fn clear_dependencies(&mut self) {
        for dependency in &self.dependencies {
            if let Some(dep) = dependency.0.upgrade() {
                // SAFETY: We only access the pointer, not the pointed data.
                dep.unsubscribe(unsafe {
                    std::mem::transmute(Rc::as_ptr(&self.cb))
                })
            };
        }
        self.dependencies.clear();
    }

    /// Add a dependency to the effect.
    pub fn add_dependency(&mut self, signal: WeakSignalEmitter) {
        self.dependencies.insert(EffectDependency(signal));
    }
}

impl<'a> Scope<'a> {
    /// Creates an effect on signals used inside the effect closure.
    ///
    /// # Example
    /// ```
    /// # use sycamore_reactive::*;
    /// # create_scope_immediate(|ctx| {
    /// let state = ctx.create_signal(0);
    ///
    /// ctx.create_effect(|| {
    ///     println!("State changed. New state value = {}", state.get());
    /// }); // Prints "State changed. New state value = 0"
    ///
    /// state.set(1); // Prints "State changed. New state value = 1"
    /// # });
    /// ```
    pub fn create_effect(&self, f: impl FnMut() + 'a) {
        self._create_effect(Box::new(f))
    }

    /// Internal implementation for `create_effect`. Use dynamic dispatch to
    /// reduce code-bloat.
    fn _create_effect(&self, mut f: Box<dyn FnMut() + 'a>) {
        let effect = Rc::new(RefCell::new(None::<EffectState<'a>>));
        let cb = Rc::new(RefCell::new({
            let effect = Rc::downgrade(&effect);
            move || {
                EFFECTS.with(|effe


hrow new Exception("Interrupted");
		}
		String folderTarget = PathUtils.combineUnix(target, proposedName == null ? folder.getName() : proposedName);
		targetFs.mkdir(folderTarget);
		List<FileInfoHolder> fileInfoHolders = new ArrayList<>();
		List<FileInfo> list = sourceFs.list(folder.getPath());
		for (FileInfo file : list) {
			if (stopFlag.get()) {
				throw new Exception("Interrupted");
			}
			if (file.getType() == FileType.Directory) {
				fileInfoHolders.addAll(createFileList(file, folderTarget, null));
			} else if (file.getType() == FileType.File) {
				fileInfoHolders.add(new FileInfoHolder(file, folderTarget, null));
				totalSize += file.getSize();
			}
		}
		System.out.println("File list created");
		return fileInfoHolders;
	}

	private synchronized void copyFile(FileInfo file, String targetDirectory, String proposedName,
			InputTransferChannel inc, OutputTransferChannel outc) throws Exception {

		String outPath = PathUtils.combine(targetDirectory, proposedName == null ? file.getName() : proposedName,
				outc.getSeparator());
		String inPath = file.getPath();
		System.out.println("Copying -- " + inPath + " to " + outPath);
		try (InputStream in = inc.getInputStream(inPath); OutputStream out = outc.getOutputStream(outPath)) {
			long len = inc.getSize(inPath);
			System.out.println("Initiate write");

			int bufferCapacity = BUF_SIZE;
			if (in instanceof SSHRemoteFileInputStream && out instanceof SSHRemoteFileOutputStream) {
				bufferCapacity = Math.min(((SSHRemoteFileInputStream) in).getBufferCapacity(),
						((SSHRemoteFileOutputStream) out).getBufferCapacity());
			} else if (in instanceof SSHRemoteFileInputStream) {
				bufferCapacity = ((SSHRemoteFileInputStream) in).getBufferCapacity();
			} else if (out instanceof SSHRemoteFileOutputStream) {
				bufferCapacity = ((SSHRemoteFileOutputStream) out).getBufferCapacity();
			}

			byte buf[] = new byte[bufferCapacity];

			while (len > 0 && !stopFlag.get()) {
				int x = in.read(buf);
				if (x == -1)
					throw new IOException("Unexpected EOF");
				out.write(buf, 0, x);
				len -= x;
				processedBytes += x;
				callback.progress(processedBytes, totalSize, processedFilesCount, totalFiles, this);
				// Thread.sleep(500);
			}
			System.out.println("Copy done before stream closing");
			out.flush();
		}
		System.out.println("Copy done");
	}

	public void stop() {
		stopFlag.set(true);
	}

	@Override
	public void close() {
		stopFlag.set(true);
//		try {
//			this.sourceFs.close();
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//		try {
//			this.targetFs.close();
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
	}

	static class FileInfoHolder {
		FileInfo info;
		String targetPath;
		String proposedName;

		public FileInfoHolder(FileInfo info, String targetPath, String proposedName) {
			this.info = info;
			this.targetPath = targetPath;
			this.proposedName = proposedName;
		}
	}

	public FileInfo[] getFiles() {
		return files;
	}

	public String getTargetFolder() {
		return this.targetFolder;
	}

	private ConflictAction checkForConflict(List<FileInfo> dupList) throws Exception {
		List<FileInfo> fileList = targetFs.list(targetFolder);
		for (FileInfo file : files) {
			for (FileInfo file1 : fileList) {
				if (file.getName().equals


rough]
	sourceVals = sourceVals[len(passthroughValues):]

	// Verify the schema constraints. For consistency with INSERT/UPSERT
	// and compatibility with PostgreSQL, we must do this before
	// processing the CHECK constraints.
	if err := enforceNotNullConstraints(updateValues, r.tu.ru.UpdateCols); err != nil {
		return err
	}

	// Run the CHECK constraints, if any. CheckHelper will either evaluate the
	// constraints itself, or else inspect boolean columns from the input that
	// contain the results of evaluation.
	if !r.checkOrds.Empty() {
		if err := checkMutationInput(
			params.ctx, params.EvalContext(), &params.p.semaCtx, params.p.SessionData(),
			r.tu.tableDesc(), r.checkOrds, sourceVals[:r.checkOrds.Len()],
		); err != nil {
			return err
		}
		sourceVals = sourceVals[r.checkOrds.Len():]
	}

	// Create a set of partial index IDs to not add entries or remove entries
	// from. Put values are followed by del values.
	var pm row.PartialIndexUpdateHelper
	if n := len(r.tu.tableDesc().PartialIndexes()); n > 0 {
		err := pm.Init(sourceVals[:n], sourceVals[n:n*2], r.tu.tableDesc())
		if err != nil {
			return err
		}
		sourceVals = sourceVals[n*2:]
	}

	// Keep track of the vector index partitions to update, as well as the
	// quantized vectors. This information is passed to tableInserter.row below.
	// Order of column values is put partitions, quantized vectors, followed by
	// del partitions
	var vh row.VectorIndexUpdateHelper
	if n := len(r.tu.tableDesc().VectorIndexes()); n > 0 {
		vh.InitForPut(sourceVals[:n], sourceVals[n:n*2], r.tu.tableDesc())
		vh.InitForDel(sourceVals[n*2:n*3], r.tu.tableDesc())
	}

	// Error out the update if the enforce_home_region session setting is on and
	// the row's locality doesn't match the gateway region.
	if err := r.regionLocalInfo.checkHomeRegion(updateValues); err != nil {
		return err
	}

	// Queue the insert in the KV batch.
	newValues, err := r.tu.rowForUpdate(
		params.ctx, oldValues, updateValues, pm, vh, r.originTimestampCPutHelper, r.mustValidateOldPKValues, r.traceKV,
	)
	if err != nil {
		return err
	}
	r.onModifiedRow()
	if !r.rowsNeeded {
		return nil
	}

	// Result rows must be accumulated.
	//
	// The new values can include all columns,  so the values may contain
	// additional columns for every newly added column not yet visible. We do
	// not want them to be available for RETURNING.
	//
	// MakeUpdater guarantees that the first columns of the new values
	// are those specified u.columns.
	largestRetIdx := -1
	for i := range r.rowIdxToRetIdx {
		retIdx := r.rowIdxToRetIdx[i]
		if retIdx >= 0 {
			if retIdx >= largestRetIdx {
				largestRetIdx = retIdx
			}
			r.resultRowBuffer[retIdx] = newValues[i]
		}
	}

	// At this point we've extracted all the RETURNING values that are part
	// of the target table. We must now extract the columns in the RETURNING
	// clause that refer to other tables (from the FROM clause of the update).
	for i := 0; i < r.numPassthrough; i++ {
		largestRetIdx++
		r.resultRowBuffer[largestRetIdx] = passthroughValues[i]
	}

	return r.addRow(params.ctx, r.resultRowBuffer)
}

func (


HostStateInLobby = HostStateInLobby or class(HostStateBase)

function HostStateInLobby:on_join_request_received(data, peer_name, client_preferred_character, dlcs, xuid, peer_level, peer_rank, peer_stinger_index, gameversion, join_attempt_identifier, auth_ticket, sender)
	print("HostStateInLobby:on_join_request_received peer_level", peer_level, join_attempt_identifier, gameversion)

	if SystemInfo:platform() == Idstring("WIN32") then
		peer_name = managers.network.account:username_by_id(sender:ip_at_index(0))
	end

	if self:_has_peer_left_PSN(peer_name) then
		print("this CLIENT has left us from PSN, ignore his request", peer_name)

		return
	end

	local my_user_id = data.local_peer:user_id() or ""

	if self:_is_banned(peer_name, sender) then
		self:_send_request_denied(sender, 9, my_user_id)

		return
	end

	local user = Steam:user(sender:ip_at_index(0))

	if not MenuCallbackHandler:is_modded_client() and not Global.game_settings.allow_modded_players and user and user:rich_presence("is_modded") == "1" then
		self:_send_request_denied(sender, 10, my_user_id)

		return
	end

	if peer_level < Global.game_settings.reputation_permission then
		self:_send_request_denied(sender, 6, my_user_id)

		return
	end

	if gameversion ~= -1 and gameversion ~= managers.network.matchmake.GAMEVERSION then
		self:_send_request_denied(sender, 7, my_user_id)

		return
	end

	if data.wants_to_load_level then
		self:_send_request_denied(sender, 0, my_user_id)

		return
	end

	if not managers.network:session():local_peer() then
		self:_send_request_denied(sender, 0, my_user_id)

		return
	end

	local old_peer = data.session:chk_peer_already_in(sender)

	if old_peer then
		if join_attempt_identifier ~= old_peer:join_attempt_identifier() then
			data.session:remove_peer(old_peer, old_peer:id(), "lost")
			self:_send_request_denied(sender, 0, my_user_id)
		end

		return
	end

	if table.size(data.peers) >= tweak_data.max_players - 1 then
		print("server is full")
		self:_send_request_denied(sender, 5, my_user_id)

		return
	end

	print("[HostStateInLobby:on_join_request_received] new peer accepted", peer_name)

	local character = managers.network:session():check_peer_preferred_character(client_preferred_character)
	local xnaddr = ""

	if SystemInfo:platform() == Idstring("X360") or SystemInfo:platform() == Idstring("XB1") then
		xnaddr = managers.network.matchmake:external_address(sender)
	end

	local new_peer_id, new_peer = nil
	new_peer_id, new_peer = data.session:add_peer(peer_name, nil, true, false, false, nil, character, sender:ip_at_index(0), xuid, xnaddr)

	if not new_peer_id then
		print("there was no clean peer_id")
		self:_send_request_denied(sender, 0, my_user_id)

		return
	end

	new_peer:set_dlcs(dlcs)
	new_peer:set_xuid(xuid)
	new_peer:set_join_attempt_ide


xb7\
n\xb7\x1dvc\xf9i5\xf5\x84lV'\x9f\x08\x8e\
\xbak\xccP\xcc\xea6\x808@d\xba\xb5\xe5t}\
\xab\xa1\xaa\x80p,\xc2\x01\xc2\xd7\xad[\xd9\xbe\xf6\xd5\
{\xc2\xc7\x97\xbe\xb8\xa5\xad\xa0\xedS.\xb9<\x04\xc2\
w\xec|3\xaeQ\xfe\xe0\x8f\x9fj/\xbc\xf2f;\
\x89\x9f\xfa\x0f?dHNB\xfa\x8b@x\xdc\x9aH\
\x83V\xd0\x0e'\x1c\xa3\xddc\x1f\x1e\x07:\x86\x0a\xd4\
u\xa7\x8e\xfa\x01\x8a\xf4\x0e\xf9\xe1=\xa2\x88i\xd6T\
 \xfcZV\xca7\xcc\x9d\xdd\xd6\xaeZ\xd4\xee\xb9m\
m\xbbi\xed\xa2\xb6\x1071\x0eIo\x1f\xc5/\xfe\
\xbe\xfd\xed\x15>P\xea\xc7C\x05\xc1O\xf2\x91WA\
\xf0z\x99\xc0\xf0\x8b,;\x10\x1e\xa0\xc4\xfe\x1e \x1f\
Z\x22shT\xde\xfe\xbc\xdd\x97\x0f\x09P\xc3\xce\xa7\
\xf8\x95/\x02b\xad\x8d5\xf9]\x91\xd2\x0e\xe52\xa3\
\xce\xb3\xe3\x08\x7f\xf0\x22?\xe6\xc7\xbd\xcb\x8aeK\xda\
\xfdw\xdd\xd2\x1e\xbc\xf7\xb6\xf6\x93\xfc\x9a`\x1d\xbf\xbe\
\xe8\xe5Z\xde\x81\xc3|pr\xdb\xae\xf6\x04V\xf8\x7f\
\xf1\xcck\xed5\x5c\xa3\xbc\xf7Y\x80pd>H\x0f\
\x229\x90u\xcaO\xfd\xc39\xf7\xd2\x1b\xd3I\xc3\xc8\
\x90\xb6\xf4-`\xb1\x13,A\xba\xe5W\xdd\x9e\x85e\
\xf7\x06^\x90}\xed.@\xfc\x9b\xd7\xb6\x8d\xd0.(\
\xb1\x139?\xbd\xfb@\xdb\xfa\xf2n>\x92y\xa4\x9d\
x\xef\x83\x00\xf7# \xfc<\x1f\xe1\xe8\xeb 3W\
\xf3\x01\xb4\x89\xcb\xc2\x19}\xf0Y_\x99\x07\xf4\x15\xfc\
\x17\xfc\xe5\x17\x03>\x93Cv\xb0\xa6\x1b\xf9\x08\xc74\
\xe9l\xf7\x11.\xcf\xec\xd0\xcb5\x8a@\xf8`\x11.\
H,O\xeaetp\x18\x95&w\xc3\xb6m\xf2\xd3\
^.&\x22\xb7\x9e^1\x91\xc7\x1d\x81t\xb1\x13\x8b\
E\xb8\xbf\x11fl,\x8bp\xf31\xb5^]\xaeQ\
fj\x0d\xefoZ\xdd\x85\x92wZ \xdc\xfaT\xb7\
Z\x0d#lh\x94\xfe\xc1\x22<\xb4\xdaL\xae\xbc#\
'eaP\xe7\xecC\xe4\x95Ny\xa3\x1e\x01\xff[\
\x97\x03\x84\xdf\x8d\x8f\xf0\xb5?\x22 \xfc\xedC\xed\xb1\
W\xb1\x08\x07\x04\xcf\xc72?\x13\x10\x1e\x96\x22.\xc1\
Ky\x8dk\x14-\xe9\xb3\xbbB\x0e\x1e\xc3.Q\xd0\
{\x04\xa8v`\xd5{A.hP\xdb\xd4\xa3\xb7-\
\xf2\xbe\x8a\x8d\xc4\xf5\xa0\x13\xfa\x0b\xff\xea\x16\xfc0\xae\
\xdb\x120|\xe1\x9cy\x95\xf62\xf9\xfb!\xbb\xf8w\
AJv\x1f\xd8\xdb\xbe\xf7\xf23\xed\xbb/=\xd5\x9e\
x\xe1\xa9\xb6\xef\xf0~\xda\x1c\x86\x08# <\xbbV\
\xf8V\x9f\x08\x1e\x8e)\xdd\x1a\xdc8\xfag\xbfO\xdf\
\xefL\x92\xd6<]P\xfd\xd9 \xe6J\xab\xde{c\
\x88s:$\x88\x5c-Bz\x88#\xf7\xe1:\xe5\x16\
\x1d)\xc7\xf6\xb4\x1f\x10\x0a\x88f\x0d\x14}'\xa3\xf5\
\xf3\xfc\x0c}i\xf4\xb1L\xa9\x82\xc7\xe2\x89\x5c\xae-\
\x86\x17@!\xc7\xf2\x95\xc3P\x8fEd\xda!\xcex\
N\xa2\x02\xc2\x1d/\xa8w\xe0A\xb9]\x10\x08\x87~\
\xc7\xec\xa45\xbd;;Dg\xb7\x0f\xe9\xa9d\xc8\xcf\
\x8e.Ke\xc7\x83\x98EZ?}\xf7<\x1f\xe1\xd4\
?\xf1\xb1\xcc\xf0C^}\x84?x\xff`\x11~\xef\
\xa7\xfb\x08\xff\x88:\xde\xc7\xb1\xf0w^|\xac\xfd\xfa\
\xef\xfc\x8b\xf6\xddW\x9e`\xd6\xe4\x17\x13\xf8\xffV\xfc\
\x128\x06\xc2\xa5\xdd\xfe#\xe1\xc4\xf2\x04o\xba3\xc9\
\x8723\xbe\xcb\xeb\x90\xaf\xcb\xc6t\xceY\x83\x0ck\
\x9ev\x9c!\xe4>e\x90w*\x10n\xf9\x8e\xeb\xd4\
\xafk\x14\xdc\x1e\x9c5|L\xbb\x0a\x90\x91[\x99:\
\xadN\x02\xe1\x93\x1f\xcbt\x093r\x8d\xc2\x90*\xd0\
\x95)T\xf2<lc\xda-/\x95\x19\xef\xfc%\x98\
\xed\xa1\xae|\xc2/l>\x9e\xb4\x08\xa7\xc6\x02\xc2\x93\
-\xf5\xf7\xf6\x97\xaf\x04uU\xb5\x1b\xe2\xf0;y\x8f\
!;S\x85Cw\xbf\xdf\xf3\x96\x88\x8a>\xce?o\
 \xfc\xc8\x89\x83|'\xe0\xd9\x00\xe1\x0f?\xf3\xfb|\
T{[\xf1D\xdd\xbd\xd9\x94E\xe7k\xe8\x12\xdc\xa8\
\xe7\xa3\xfb\xf0\x22(\x190\xdc\xb6\x80\xaf`\x134m\
\xa6]Te: \x5c\xf1\xf72\xad\xaf\xdaS\x193\
]]U:$h\xfa1:\xfe\x01>\x9f\x03\x84S\
\xe6\xa4\x8f\xf0o^&@\xf8a\x80\xf0\x91E84\
\xcaO\x02\xbc+\x03\xbbKx\x84I\xe5#\x8f\x89\xbd\
\xe6<\xd7\xc4\xca\xd4\xf4v{\xedP\x04u\xc37\xe5\
9\xdd\x8f\x80\xf0\xc15\xca\x08\x08\xe7\xb9u\xc45\xca\
`\x11\xaeex@i\xee\xe7\xa0\xec\xb4\x19\x17\x9c\x0e\
\xf2\x1e\xeey\xa3\xdf3\xa6<\x0f\xd3{H\xbbtN\
\x02\xe1\xf9X&\xbc\xa8#\x01\xc1\xa1\xb9[\x84K\xbf\
|D\x06\x83<2U\xd0\x9e\xb6\xa9\xc1\xa13\xf4P\
\x87\xfc\xbb<\xeb@\xf8\x07\xa75B!?\xf7$!\
@*:v\xf55gG\xaeQ\xd4\xb7<\xa4\x9c,\
\xb7\xa8OY\x15\x10^\xe5_\x10\x08'\xaby;\x7f\
\xf2`\x19\xe6\x0f\xa0NY\xca\xa0t\xb1\xe4>\x09\x84\
\x9b.\x16\xe1\xc3\xc72\x7f\xd4\xaeQ:\x10~x\x00\
\xc2\xc3\x8f<\x11\x94\xab!m\xc1\xb5}.|!?\
-\xc2\xe3#\x5c\xddC$\xe9\xaf=\xed \xa3^\xd6\
d\x19\xfd\x91\xf2S\x8f\x8d}\xae\x0e\x0a\x86\x1bzz\
\x9f\xa5\xfd\xd4{\x03\xd7]\xee\xce\x7f\xd2\xa5\xac\xb9\x9d\
\xfbL\xd5\xd3\xfb\x08'\x81:d\xb9\x19\xc3\x8d\xc9\x17\
\x8bp\xda\xe3\xa2@8\xfc]\x03\xbfqq\x02\x0d|\
\xf2f\xf4\xb1L.k\xbc2\xa6<\x0f\xe9QN\xd3\
\x01\xe1\x8bVml\xeb\xbf\xfc\xd7\x02\x84/\xba\xf9\xee\
6k\xfe\xd2\xca\xf4)\x7f;\x10\xaek\x14u\xdf%\
\x80\x80,\xa47\xa6\xb7\xdaYs\xcf\xba\x05n\xaf&\
t\x8b\xf0\xee#\x5c\xf9\x99'\x16\xe1\xc8N \xbc\xbb\
F\xd1mL>:\x89$c\x11N\xb9\xd3Y\x84\xcf\
\x04\xef\xb9\xe2Z0\x99\x8d\xb7\xb6\xdb\xbe\xfes\xed\xa6\
{\x1fhK\xd7ol\xd7\xdfxq\xd7\x17\x9f\xc2\xde\
\xa7>>\xb2gW\


 OF SUCH DAMAGE.
 */
// clang-format off
#pragma once
#ifndef TCOD_TEXT_HPP_
#define TCOD_TEXT_HPP_

#include "color.hpp"
#include "console.hpp"
#include "txtfield.h"

class TCODLIB_API TCODText {
public :
	TCODText(int x, int y, int w, int h, int max_chars);
	TCODText(int w, int h, int max_chars);
	~TCODText();
	void setProperties(int cursor_char, int blink_interval, const char * prompt, int tab_size);
	void setColors(TCODColor fore, TCODColor back, float back_transparency);
	void setPos(int x, int y);
	bool update(TCOD_key_t key);
	void render(TCODConsole * con);
	const char *getText();
	void reset();
protected :
	TCOD_text_t data;
};

#endif // TCOD_TEXT_HPP_
/* BSD 3-Clause License
 *
 * Copyright © 2008-2025, Jice and the libtcod contributors.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived from
 *    this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
#include "lex.hpp"

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>

#include "libtcod_int.h"

TCODLex::TCODLex(
    const char** _symbols,
    const char** _keywords,
    const char* simpleComment,
    const char* commentStart,
    const char* commentStop,
    const char* javadocCommentStart,
    const char* _stringDelim,
    int _flags) {
  data = TCOD_lex_new(
      _symbols, _keywords, simpleComment, commentStart, commentStop, javadocCommentStart, _stringDelim, _flags);
}
TCODLex::TCODLex() { data = TCOD_lex_new_intern(); }
TCODLex::~TCODLex() { TCOD_lex_delete(data); }
char* TCODLex::getLastJavadoc() { return TCOD_lex_get_last_javadoc(data); }
void TCODLex::setDataBuffer(char* dat) { TCOD_lex_set_data_buffer(data, dat); }
bool TCODLex::setDataFile(const char* _filename) { return TCOD_lex_set_data_file(data, _filename) != 0; }
int TCODLex::parse() { return TCOD_lex_parse(data); }
int TCODLex::parseUntil(int tokenType) { return TCOD_lex_parse_until_token_type(data, tokenType); }
int TCODLex::parseUntil(


w, 232, 103, 16, 16);
                            case BLADE -> context.drawTexture(TEXTURE,x + SPRITE_OFFSET_X + SLOT_SCALE*z,y + SPRITE_OFFSET_Y + SLOT_SCALE*w, 232, 119, 16, 16);
                            case AXE -> context.drawTexture(TEXTURE,x + SPRITE_OFFSET_X + SLOT_SCALE*z,y + SPRITE_OFFSET_Y + SLOT_SCALE*w, 232, 135, 16, 16);
                            case PICKAXE -> context.drawTexture(TEXTURE,x + SPRITE_OFFSET_X + SLOT_SCALE*z,y + SPRITE_OFFSET_Y + SLOT_SCALE*w, 232, 151, 16, 16);
                            case SHOVEL -> context.drawTexture(TEXTURE,x + SPRITE_OFFSET_X + SLOT_SCALE*z,y + SPRITE_OFFSET_Y + SLOT_SCALE*w, 232, 167, 16, 16);
                            case HOE -> context.drawTexture(TEXTURE,x + SPRITE_OFFSET_X + SLOT_SCALE*z,y + SPRITE_OFFSET_Y + SLOT_SCALE*w, 232, 183, 16, 16);
                        }
                    }
                }
            }
        }

        this.renderRecipeBackground(context, mouseX, mouseY, l, m, n);
        this.renderRecipeIcons(context, l, m, n);
        InventoryScreen.drawEntity(context, this.x + 206, this.y + 75, 30.0f, field_45497, ARMOR_STAND_ROTATION, null, this.armorStand);
    }

    @Override
    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
        renderBackground(context, mouseX, mouseY, delta);

        super.render(context, mouseX, mouseY, delta);

        for (ArtisanTableTab category : this.categories) {
            category.drawBackground(context, x, y + 3, category == this.selectedCategory);
            category.drawIcon(context, x, y + 3);
        }
        for (ArtisanTableTab tab : this.tabs.get(selectedCategory.getIndex())) {
            tab.drawBackground(context, x + 3, y, tab == this.selectedTab);
            tab.drawIcon(context, x + 3, y);
        }

        for (ArtisanTableTab category : this.categories) {
            if (category.isClickOnTab(x, y + 3, mouseX, mouseY)) continue;
            context.drawTooltip(this.textRenderer, category.getTitle(), mouseX, mouseY);
        }
        for (ArtisanTableTab tab : this.tabs.get(selectedCategory.getIndex())) {
            if (tab.isClickOnTab(x + 3, y, mouseX, mouseY)) continue;
            context.drawTooltip(this.textRenderer, tab.getTitle(), mouseX, mouseY);
        }
        drawMouseoverTooltip(context, mouseX, mouseY);
    }

    protected void drawMouseoverTooltip(DrawContext context, int x, int y) {
        super.drawMouseoverTooltip(context, x, y);
        if (this.canCraft) {
            int i = this.x + 76;
            int j = this.y + 14;
            int k = this.scrollOffset + 12;
            List<RecipeEntry<ArtisanRecipe>> list = (this.handler).getAvailableRecipes();

            for(int l = this.scrollOffset; l < k && l < (this.handler).getAvailableRecipeCount(); ++l) {
                int m = l - this.scrollOffset;
                int n = i + m % 4 * 16;
                int o = j + m / 4 * 18 + 2;
                if (x >= n && x < n + 16 && y >= o && y < o + 18) {
                    context.drawItemTooltip(this.textRenderer, list.get(l).value().getResult(this.client.world.getRegistryManager()), x, y);
                }
            }
        }
    }

    private void renderRecipeBackground(DrawContext context, int mouseX, int mouseY, int x, int y, int scrollOffset) {
        for(int i = this.scrollOff


messageType = exception.getMessageType();

            String message = throwable.getMessage();

            if (messageType != null) {
                if (message == null) {
                    message = messageType.getDefault(command);
                }

                context.sendMessage(messageHolder.getReplacing(messageType, message));
                return true;
            }

            targetException.printStackTrace();

            if (targetException.getMessage() != null) {
                context.sendMessage(messageHolder.getReplacing(MessageType.ERROR, targetException.getMessage()));
            }
        } catch (Exception e) {
            e.printStackTrace();
            context.sendMessage("§cAn internal error occurred, please contact the staff team.");
        }

        return false;
    }

}
/*
 * Copyright 2020 Luiz Carlos Mourão Paes de Carvalho
 *
 *    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 me.saiintbrisson.bungee.command.command;

import me.saiintbrisson.bungee.command.BungeeFrame;
import me.saiintbrisson.minecraft.command.command.CommandHolder;

import java.util.Optional;

/**
 * @author Henry Fábio
 * Github: https://github.com/HenryFabio
 */
public class BungeeChildCommand extends BungeeCommand {
    private final BungeeCommand parentCommand;

    public BungeeChildCommand(BungeeFrame frame, String name, BungeeCommand parentCommand) {
        super(frame, name, parentCommand.getPosition() + 1);
        this.parentCommand = parentCommand;
    }

    @Override
    public String getFancyName() {
        return parentCommand.getFancyName() + " " + getName();
    }

    public Optional<CommandHolder<?, ?>> getParentCommand() {
        return Optional.of(parentCommand);
    }
}
/*
 * Copyright 2020 Luiz Carlos Mourão Paes de Carvalho
 *
 *    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 me.saiintbrisson.bungee.command.command;

import lombok.AllArgsConstructor;
import lombok.Getter;
import me.saiintbrisson.bungee.command.target.BungeeTargetValidator;
import me.saiintbrisson.minecraft.command.CommandFrame;
import me.saiintbrisson.minecraft.command.command.CommandHolder;
import me.saiintbrisson.minecraft.command.command.Context;
import me.saiintbrisson.minecraft.command.exception.CommandException;
import me.saiintbrisson.minecraft.command.message.MessageType;
import me.saiintbrisson.minecraft.command.target.CommandTarget;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.TextComponent;

/**
 * @author Henry Fábio
 * Github: https://github.com/HenryFabio
 */
@Getter
@AllArgsConstructor
public class BungeeContext implements Context<CommandSender> {
    private final CommandSender sender;
    private final CommandTarget target;
    private final String