#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }


           return batch_loss

    # TODO: find out how to get the batch here
    # TODO: check gradients after backward
    # def backward(self, loss, *args, **kwargs):
    #     with self.exception_catcher(batch):
    #         super().backward(loss, *args, **kwargs)

    def training_step(self, batch: Any, *_, **__):
        batch_x, batch_y = self.prepare_batch(batch)
        with self.exception_catcher(batch):
            batch_y_hat = self.model(batch_x)
        self.check_tensor(batch, batch_y_hat)
        batch_loss = self.compute_loss(batch, batch_y_hat, batch_y)
        if batch_loss is None:
            return
        self.log(
            "tr_loss",
            batch_loss,
            on_step=False,
            on_epoch=True,
            prog_bar=True,
            sync_dist=True,
        )
        return {"loss": batch_loss, "batch_y_hat": batch_y_hat}

    def validation_step(self, batch: Any, *_, **__):
        batch_x, batch_y = self.prepare_batch(batch)
        with self.exception_catcher(batch):
            batch_y_hat = self.model(batch_x)
        self.check_tensor(batch, batch_y_hat)
        batch_loss = self.compute_loss(batch, batch_y_hat, batch_y)
        if batch_loss is None:
            return
        self.log(
            "va_loss",
            batch_loss,
            on_step=False,
            on_epoch=True,
            prog_bar=True,
            sync_dist=True,
        )
        return {"loss": batch_loss, "batch_y_hat": batch_y_hat}

    def get_progress_bar_dict(self):
        items = super().get_progress_bar_dict()
        # remove version number
        items.pop("v_num", None)
        return items


 dvbiUrl,
        releaseDate,
        parentalGuidanceText,
        recordingFlag,
        seriesInfo,
        categoryList,
        castList,
        externalIDList,
      )
    }
  }
}
/*
 *
 *    Copyright (c) 2023 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package matter.controller.cluster.structs

import matter.controller.cluster.*
import matter.tlv.ContextSpecificTag
import matter.tlv.Tag
import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class CommodityTariffClusterCurrencyStruct(val currency: UShort, val decimalPoints: UByte) {
  override fun toString(): String = buildString {
    append("CommodityTariffClusterCurrencyStruct {\n")
    append("\tcurrency : $currency\n")
    append("\tdecimalPoints : $decimalPoints\n")
    append("}\n")
  }

  fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
    tlvWriter.apply {
      startStructure(tlvTag)
      put(ContextSpecificTag(TAG_CURRENCY), currency)
      put(ContextSpecificTag(TAG_DECIMAL_POINTS), decimalPoints)
      endStructure()
    }
  }

  companion object {
    private const val TAG_CURRENCY = 0
    private const val TAG_DECIMAL_POINTS = 1

    fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterCurrencyStruct {
      tlvReader.enterStructure(tlvTag)
      val currency = tlvReader.getUShort(ContextSpecificTag(TAG_CURRENCY))
      val decimalPoints = tlvReader.getUByte(ContextSpecificTag(TAG_DECIMAL_POINTS))

      tlvReader.exitContainer()

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

import matter.controller.cluster.*
import matter.tlv.AnonymousTag
import matter.tlv.ContextSpecificTag
import matter.tlv.Tag
import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class JointFabricDatastoreClusterDatastoreAccessControlEntryStruct(
  val privilege: UByte,
  val authMode: UByte,
  val subjects: List<ULong>?,
  val targets: List<JointFabricDatastoreClusterDatastoreAccessControlTargetStruct>?,
) {
  override fun toString(): String = buildString {
    append("JointFabricDatastoreClusterDatastoreAccessControlEntryStruct {\n")
    append("\tprivilege : $privilege\n")
    append("\tauthMode : $authMode\n")
    append("\tsubjects : $subjects\n")
    append("\ttargets : $targets\n")
    append("}\n")
  }

  fun toTlv(tl


None])
    def test_set_flags(self, allows_duplicate_labels, frame_or_series):
        obj = DataFrame({"A": [1, 2]})
        key = (0, 0)
        if frame_or_series is Series:
            obj = obj["A"]
            key = 0

        result = obj.set_flags(allows_duplicate_labels=allows_duplicate_labels)

        if allows_duplicate_labels is None:
            # We don't update when it's not provided
            assert result.flags.allows_duplicate_labels is True
        else:
            assert result.flags.allows_duplicate_labels is allows_duplicate_labels

        # We made a copy
        assert obj is not result

        # We didn't mutate obj
        assert obj.flags.allows_duplicate_labels is True

        # But we didn't copy data
        result.iloc[key] = 0
        assert obj.iloc[key] == 0

        # Now we do copy.
        result = obj.set_flags(
            copy=True, allows_duplicate_labels=allows_duplicate_labels
        )
        result.iloc[key] = 10
        assert obj.iloc[key] == 0

    def test_constructor_expanddim(self):
        # GH#33628 accessing _constructor_expanddim should not raise NotImplementedError
        # GH38782 pandas has no container higher than DataFrame (two-dim), so
        # DataFrame._constructor_expand_dim, doesn't make sense, so is removed.
        df = DataFrame()

        msg = "'DataFrame' object has no attribute '_constructor_expanddim'"
        with pytest.raises(AttributeError, match=msg):
            df._constructor_expanddim(np.arange(27).reshape(3, 3, 3))

    @skip_if_no("jinja2")
    def test_inspect_getmembers(self):
        # GH38740
        df = DataFrame()
        with tm.assert_produces_warning(None):
            inspect.getmembers(df)


3
s=A.aH(B.c.aX(255*A.a(r.ch.y,"_value")),s.gn(s)>>>16&255,s.gn(s)>>>8&255,s.gn(s)&255)
q.geK().sEd(s)
q=r.a.cx&&A.a(r.ch.y,"_value")>0
r.f.sn(0,q)},
a59(a){var s,r,q=this,p=!q.e
q.e=p
s=p?1:0
p=q.a.bs
r=q.ch
if(p){r.Q=B.al
r.jW(s,B.eA,null)}else r.sn(0,s)
if(q.ry>0)q.ag(new A.a3v(q))},
a5b(a){var s=this.d
if(s!=null)s.ay(0)
this.d=A.r6(B.cJ,this.gKM())},
wF(){var s=this
s.x2=!0
if(!s.fx)return
s.e=!0
s.ch.sn(0,1)
if(s.a.bs)s.d=A.r6(B.cH,s.ga5a())
else s.d=A.r6(B.cJ,s.gKM())},
Db(a){var s,r=this
r.x2=!1
s=r.d
if(s!=null)s.ay(0)
r.d=null
r.e=!1
r.ch.sn(0,0)
if(a)r.ry=0
if(r.a.bs){r.ch.ft(0)
r.ch.sn(0,0)}},
aeX(){return this.Db(!0)},
OB(){var s,r=this
if(r.d==null)if(r.a.d.gcv()){s=r.a.c.a.b
s=s.a===s.b}else s=!1
else s=!1
if(s)r.wF()
else{if(r.x2)if(r.a.d.gcv()){s=r.a.c.a.b
s=s.a!==s.b}else s=!0
else s=!1
if(s)r.aeX()}},
a5B(){var s=this
s.Dz()
s.OB()
s.Pr()
s.ag(new A.a3w())
s.gJE().X7()},
a61(){var s,r,q=this
if(q.a.d.gcv()&&q.a.d.ahT())q.CH()
else if(!q.a.d.gcv()){q.Kp()
s=q.a.c
s.qv(0,s.a.QQ(B.bh))}q.OB()
q.Pr()
s=q.a.d.gcv()
r=$.K
if(s){r.by$.push(q)
$.K.toString
q.rx=$.ba().e.d
if(!q.a.y)q.wz()
if(!q.a.c.a.b.gc8())q.vH(A.r2(B.m,q.a.c.a.a.length),null)}else{B.d.w(r.by$,q)
q.ag(new A.a3y(q))}q.pX()},
Pz(){var s,r,q,p,o=this
if(o.ghX()){s=o.r
r=$.K.F$.Q.h(0,s).gL()
r.toString
q=t.E
r=q.a(r).rx
r.toString
s=$.K.F$.Q.h(0,s).gL()
s.toString
p=q.a(s).dE(0,null)
s=o.y
if(!r.k(0,s.a)||!


    progressEle.id = id
  }
  return progressEle
}

const getElement = () => document.getElementById(config.id!)

const removeElement = (ele: HTMLElement) => {
  ele?.parentNode?.removeChild(ele)
}

const getScrollPercent = () => {
  const scrollHeight = getScrollHeight()
  const { innerHeight, pageYOffset } = window
  const scrollDistance = scrollHeight - innerHeight - config.offset!
  return Math.min(1.0, pageYOffset / scrollDistance) * 100
}

const onScroll = () => {
  const progressEle = getElement()
  if (!progressEle) {
    return
  }
  const percent = getScrollPercent()
  const { debounce } = config
  if (debounce) {
    window.clearTimeout(id)
    id = window.setTimeout(() => {
      progressEle!.style.width = `${percent}%`
    }, 50)
  } else {
    // throttled update
    // https://github.com/devjmetivier/gatsby-plugin-page-progress/blob/master/src/gatsby-browser.js#L118
    if (!scrolling) {
      window.requestAnimationFrame(() => {
        progressEle!.style.width = `${percent}%`
        scrolling = false
      })
      scrolling = true
    }
  }
}

const show = () => {
  const progressEle = initialElement()
  document.body.append(progressEle)
  const percent = getScrollPercent()
  progressEle.style.width = `${percent}%`
  window.addEventListener('scroll', onScroll)
}

const hide = () => {
  const progressEle = getElement()
  if (progressEle) {
    removeElement(progressEle)
  }
  window.removeEventListener('scroll', onScroll)
}

const setConfig = (cfg: ScrollProgressConfig) => {
  Object.assign(config, cfg)
}

const progressBar = {
  show,
  hide,
  setConfig,
}

export default progressBar
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'tut-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.scss']
})
export class HeaderComponent implements OnInit {

  constructor() {

    console.log ("Component Header Creandose!!!")

   }

   ngOnInit() {
    console.log ("Component Header ya Creado!!!")
  }

 nombre = "Tu salud, lo primero"
 contador=0
arr= [1, 2, 3, 4 ,5 ,6, 7, 8, 9, 10 ]

 cambiarNombre(){
   this.nombre +=" Fujitsu"
 }
 suma(){
   this.contador ++
 }

  add(){
    this.arr.push(Math.random())
  }

}
import { v4 as generateUUID } from 'uuid';
import XLSX from 'xlsx';
import { LabelAttribute, LabelAttributeFormat, LabelData } from './model';

const tagSkip = '[label:skip]'; // including this in column headers tells us not to print these columns
const tagScoreOutOf5 = '[label:5_stars]';
const tagScoreOutOf10 = '[label:10_stars]';

type SheetRow = {[column: string]: string | undefined;};
type ColumnMetadata = {displayName: string; format: LabelAttributeFormat | 'skip';};

// extract format tags from column names
function extractColumnMetadata(colName: string): ColumnMetadata {
  let format: LabelAttributeFormat | 'skip' = 'text';
  if (colName.includes(tagScoreOutOf5)) {
    format = 'scoreOutOf5';
  }
  if (colName.includes(tagScoreOutOf10)) {
    format = 'scoreOutOf10';
  }
  if (colName.includes(tagSkip)) {
    format = 'skip';
  }

  let trimmedName = colName;
  for (const tag of [tagSkip, tagScoreOutOf5, tagScoreOutOf10]) {
    trimmedName = trimmedName.replace(tag


old",
		BLUEPRINT =
		{
            COMMON = "Paper for stuff making",
            RARE = "Ohhhh... Looks important",
        },
        SKETCH = "Pretty picture",
		COOKINGRECIPECARD =
		{
			GENERIC = "Hmmm. No good",
		},
		BLUE_CAP = "Hurts head. Ow!",
		BLUE_CAP_COOKED = "Helps head. Ahhh...",
		BLUE_MUSHROOM =
		{
			GENERIC = "Little blue friend!",
			INGROUND = "He's shy",
			PICKED = "All gone",
		},
		BOARDS = "Fallen friends",
		BONESHARD = "Sharp. Ouch!",
		BONESTEW = "Pot of lots of meat",
		BUGNET = "Bzzt Catcher",
		BUSHHAT = "Friend costume",
		BUTTER = "Where are wings?",
		BUTTERFLY =
		{
			GENERIC = "A friend for friends",
			HELD = "Flappy",
		},
		BUTTERFLYMUFFIN = "Yummm...",
		BUTTERFLYWINGS = "Can fly with it? No",
		BUZZARD = "Meat Tweeter",

		SHADOWDIGGER = "Dark Floaty Digger",
        SHADOWDANCER = "Hehe",

		CACTUS =
		{
			GENERIC = "Ouch Friend",
			PICKED = "Grow, Ouch Friend! Grow!",
		},
		CACTUS_MEAT_COOKED = "Will eat it",
		CACTUS_MEAT = "Mmm... belly stuff",
		CACTUS_FLOWER = "Yum",

		COLDFIRE =
		{
			EMBERS = "Almost gone",
			GENERIC = "Chilly",
			HIGH = "Really big!",
			LOW = "Cool",
			NORMAL = "Cooling",
			OUT = "Needs food",
		},
		CAMPFIRE =
		{
			EMBERS = "Dying",
			GENERIC = "Not too close",
			HIGH = "Too high!",
			LOW = "Stay back",
			NORMAL = "Not too close",
			OUT = "Whew!",
		},
		CANE = "Friend for walking",
		CATCOON = "Hello, Kitty!",
		CATCOONDEN =
		{
			GENERIC = "Anyone home?",
			EMPTY = "No more Kitties",
		},
		CATCOONHAT = "Kitty thing for head",
		COONTAIL = "Poor little Kitty",
		CARROT = "Thanks, dirt!",
		CARROT_COOKED = "Tiny circles for belly",
		CARROT_PLANTED = "Nice growing! Keep going!",
		CARROT_SEEDS = "Makes the orange belly stuff",
		CARTOGRAPHYDESK =
		{
			GENERIC = "Needs Findy Paper",
			BURNING = "No! Fire! Fire!",
			BURNT = "Oh. Oh no",
		},
		WATERMELON_SEEDS = "Makes Water Fruit!",
		CAVE_FERN = "How you doing?",
		CHARCOAL = "Burnt rock",
        CHESSPIECE_PAWN = "Nice head thing!",
        CHESSPIECE_ROOK =
        {
            GENERIC = "Home? Not home",
            STRUGGLE = "Alive?",
        },
        CHESSPIECE_KNIGHT =
        {
            GENERIC = "Stone Neigher!",
            STRUGGLE = "What's happening?",
        },
        CHESSPIECE_BISHOP =
        {
            GENERIC = "Like Pointy Head thing",
            STRUGGLE = "Strange things happening!",
        },
        CHESSPIECE_MUSE = "Pretty Stone",
        CHESSP


                    case CONNECT   -> connectCount.incrementAndGet();
                    case HOLEPUNCH -> holepunchCount.incrementAndGet();
                    default        -> LOGGER.warn("未知来源：{}", source);
                }
            });
        });
        final ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList(
            new PieChart.Data("DHT",       dhtCount.get()),
            new PieChart.Data("PEX",       pexCount.get()),
            new PieChart.Data("LSD",       lsdCount.get()),
            new PieChart.Data("Tracker",   trackerCount.get()),
            new PieChart.Data("Connect",   connectCount.get()),
            new PieChart.Data("Holepunch", holepunchCount.get())
        );
        final String   title    = String.format("总量：%d 可用数量：%d", peers.size(), availableCount.get());
        final PieChart pieChart = this.buildPieChart(title, pieChartData);
        // 添加节点
        this.statisticsBoxClear().add(pieChart);
    }

    /**
     * 连接统计
     */
    private void buildSelectConnectStatistics() {
        final String infoHashHex = this.selectInfoHashHex();
        if(infoHashHex == null) {
            return;
        }
        final List<PeerSession> peers = PeerContext.getInstance().listPeerSession(infoHashHex);
        // 分类：上传、下载
        final List<String> categoriesPeer = new ArrayList<>();
        final AtomicInteger utpCount      = new AtomicInteger(0);
        final AtomicInteger tcpCount      = new AtomicInteger(0);
        final AtomicInteger uploadCount   = new AtomicInteger(0);
        final AtomicInteger downloadCount = new AtomicInteger(0);
        // 上传流量
        final List<XYChart.Data<String, Number>> uploadPeer   = new ArrayList<>();
        // 下载流量
        final List<XYChart.Data<String, Number>> downloadPeer = new ArrayList<>();
        peers.forEach(peer -> {
            // 统计下载中和上传中的Peer
            boolean active = false;
            if(peer.uploading()) {
                active = true;
                uploadCount.incrementAndGet();
            }
            if(peer.downloading()) {
                active = true;
                downloadCount.incrementAndGet();
            }
            if(active) {
                final IPeerConnect.ConnectType connectType = peer.connectType();
                if(connectType == IPeerConnect.ConnectType.TCP) {
                    tcpCount.incrementAndGet();
                } else if(connectType == IPeerConnect.ConnectType.UTP) {
                    utpCount.incrementAndGet();
                } else {
                    LOGGER.info("未知连接类型：{}", connectType);
                }
                int index = 0;
                String name = peer.host();
                while(categoriesPeer.contains(name)) {
                    // 如果已经存在重新命名：由于双向连接可能出现重复
                    index++;
                    name = String.format("%s-%d", name, index);
                }
                categoriesPeer.add(name);
                final double uploadSize   = FileUtils.formatSizeMB(peer.getStatistics().getUploadSize());
                final double downloadSize = FileUtils.formatSizeMB(peer.getStatistics().getDownloadSize());
                final XYChart.Data<String, Number> uploadData   = new XYChart.Data<>(name, uploadSize);
                final XYChart.Data<String, Number> downloadData = new XYChart.Data<>(name, downloadSize);
                uploadPeer.add(uploadData);
                downloadPeer.add(downloadData);
            }
        });
        // X轴


navegador de arquivos
5. Escolha um caminho de saída e clique em **Select Folder**
6. Pressione **Generate**

Os arquivos de saída do Tkinter Designer serão colocados no diretório escolhido, dentro de uma nova pasta chamada **build**. Parabéns, você agora criou sua GUI do Tkinter usando o Tkinter Designer!

# Solução de problemas [[Top](#table-of-contents)]

- Elementos não visíveis? Extraviado?
  - Certifique-se de que seu arquivo Figma tenha seus elementos nomeados corretamente. * Consulte [Formatando o design do Figma, §1](#formatting-1)

- O botão tem um fundo cinza não intencional?
  - Certifique-se de ter adicionado um retângulo atrás do elemento do botão e que sua cor de preenchimento seja a mesma do plano de fundo

- Elementos incorretos?
  - Certifique-se de ter nomeado seus elementos corretamente no Figma
    - Consulte [Formatando o design do Figma, §1](#formatting-1)

- A janela é maior que a tela?
  - Reduza o tamanho de seus elementos no Figma

- Arquivos não estão gerando?
  - Reinicie o Tkinter Designer
  - Verifique novamente o token e o URL
  - Certifique-se de que seu design tenha um quadro

- Algo mais?
  - [Relatar problemas não listados aqui no GitHub](https://github.com/ParthJadhav/Tkinter-Designer/issues/new)
___

## Оглавление

1. [**Начало работы**](#getting-started-1)
    1. [Установить Python](#getting-started-1)
    2. [Установить Tkinter Designer](#getting-started-2)
    3. [Создать учетную запись Figma](#getting-started-3)

2. [**Форматирование дизайна Figma**](#formatting-1)
    1. [Референс](#formatting-1)
    2. [Руководство по элементам](#formatting-2)

3. [**Использование Tkinter Designer**](#Using-Tkinter-Designer)
    1. [Токен личного доступа](#using-1)
    2. [Получение URL-адреса вашего файла](#using-2)
    3. [Использование CLI](#using-cli)
    4. [Использование графического интерфейса](#using-gui)

4. [**Устранение неполадок**](#Troubleshooting)

# Начало работы [[Наверх](#Оглавление)]

## 1. Установите Python

Перед использованием Tkinter Designer вам необходимо установить Python.
- [Вот ссылка на страницу загрузки Python.](https://www.python.org/downloads)
- [Вот полезное руководство по установке Python в различных операционных системах.](https://wiki.python.org/moin/BeginnersGuide/Download)

*Далее в


            MyMutex::MyLock lock(impl_->mutex_);

            // create a new job and append to queue
            DEBUG("saving job %s", dir_entry.c_str());
            impl_->jobs_.push_back(Impl::Job(dir_id, dir_entry, l));
        }

        // queue a run request
        DEBUG("adding run request %s", dir_entry.c_str());
        rtengine::ThreadPool::add_task(rtengine::ThreadPool::Priority::LOWEST, sigc::mem_fun(*impl_, &PreviewLoader::Impl::processNextJob));
    }
}

void PreviewLoader::removeAllJobs()
{
    MyMutex::MyLock lock(impl_->mutex_);
    impl_->jobs_.clear();
}
/*
   Copyright (C) 2019 Arto Hyvättinen

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

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

   You should have received a copy of the GNU General Public License
   along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QtTest>

// add necessary includes here

#include "kieli/monikielinen.h"
#include "kieli/kielet.h"

class MonikielinenTest : public QObject
{
    Q_OBJECT

public:
    MonikielinenTest();
    ~MonikielinenTest();

private slots:
    void test_mapista();
    void test_jsonista();
    void test_oletus();
    void test_kielet();

};

MonikielinenTest::MonikielinenTest()
{
    Kielet::alustaKielet(":/testidata/tulkki.json");
}

MonikielinenTest::~MonikielinenTest()
{

}

void MonikielinenTest::test_mapista()
{
    QVariantMap map;
    map.insert("fi","Suomeksi");
    map.insert("sv", "Ruotsiksi");
    Monikielinen m(map);
    QCOMPARE(m.teksti("sv"), QString("Ruotsiksi"));
    QCOMPARE(m.teksti("fi"), QString("Suomeksi"));
}

void MonikielinenTest::test_jsonista()
{
    Monikielinen m(QString(R"({"fi":"Suomeksi","sv":"Ruotsiksi"})"));
    QCOMPARE(m.teksti("fi"), QString("Suomeksi"));
    QCOMPARE(m.teksti("sv"), QString("Ruotsiksi"));
    QCOMPARE(m.teksti("en"), QString("Suomeksi"));
    QCOMPARE(m.kaannos("en"), QString());
    QCOMPARE(m.kaannos("fi"), QString("Suomeksi"));
}

void MonikielinenTest::test_oletus()
{
    Kielet::instanssi()->asetaKielet(QString(R"({"fi":"Suomeksi","sv":"Ruotsiksi"})"));
    Monikielinen m(QString(R"({"fi":"Suomeksi","sv":"Ruotsiksi"})"));
    Kielet::instanssi()->valitseKieli("sv");
    QCOMPARE(m.teksti(), QString("Ruotsiksi"));
}

void MonikielinenTest::test_kielet()
{
    Kielet::instanssi()->asetaKielet(QString(R"({"fi":{"fi":"suomi","sv":"finska"},"sv":{"fi":"ruotsi","sv":"svenska"}})"));
    QCOMPARE( Kielet::instanssi()->kielet().count(), 2);
    Kielet::instanssi()->valitseKieli("fi");
    QCOMPARE( Kielet::instanssi()->kielet().value(1).nimi(), "ruotsi");
}

QTEST_APPLESS_MAIN(MonikielinenTest)

#include "tst_monikielinen.moc"
/*
 *  This file is part of RawTherapee.
 *
 *


 don't creep into the plane due to floating-point rounding
            const float intoPlane = moveDirection.Dot(fowardCollisionPlane.N) - COLLISION_BOUNCE;
            const OVR::Vector3f slideDirection =
                (moveDirection - fowardCollisionPlane.N * intoPlane);

            // Try to finish the move by sliding along the collision plane.
            float slideDistance = moveDistance;
            collisionModel.TestRay(
                eyePos - UpVector * RailHeight, slideDirection, slideDistance, NULL);

            eyePos += slideDirection * slideDistance;
        }
    }

    if (static_cast<int>(groundCollisionModel.Polytopes.size()) != 0) {
        // Check for collisions at foot level, which allows following terrain.
        float downDistance = 10.0f;
        groundCollisionModel.TestRay(eyePos, -UpVector, downDistance, NULL);

        // Maintain the minimum camera height.
        if (eyeHeight - downDistance < 1.0f) {
            eyePos += UpVector * (eyeHeight - downDistance);
        }
    }

    return eyePos - UpVector * eyeHeight;
}

} // namespace OVRFW
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 * All rights reserved.
 *
 * Licensed under the Oculus SDK License Agreement (the "License");
 * you may not use the Oculus SDK except in compliance with the License,
 * which is provided at the time of installation or download, or which
 * otherwise accompanies this software in either electronic or hard copy form.
 *
 * You may obtain a copy of the License at
 * https://developer.oculus.com/licenses/oculussdk/
 *
 * Unless required by applicable law or agreed to in writing, the Oculus SDK
 * 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.
 */
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

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

Filename    :   OVR_Locale.cpp
Content     :   Implementation of string localization for strings loaded at run-time.
Created     :   April 6, 2015
Authors     :   Jonathan E. Wright

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

#include "OVR_Locale.h"

#include <sys/stat.h>

#include <vector>
#include <unordered_map>

#include "Misc/Log.h"

#include "tinyxml2.h"
#include "OVR_JSON.h"
#include "OVR_FileSys.h"
#include "OVR_UTF8Util.h"

namespace OVRFW {

char const* ovrLocale::LOCALIZED_KEY_PREFIX = "@string/";
size_t const ovrLocale::LOCALIZED_KEY_PREFIX_LEN = OVR::OVR_strlen(LOCALIZED_KEY_PREFIX);

//==============================================================
// ovrLocaleInternal
class ovrLocaleInternal : public ovrLocale {
   public:
    static char const* LOCALIZED_KEY_PREFIX;
    static OVR::UPInt LOCALIZED_KEY_PREFIX_LEN;

#if defined(OVR_OS_ANDROID)
    ovrLocaleInternal(JNIEnv& jni_, jobject activity_, char const* name, char const* languageCode);
#else
    ovrLocaleInternal(char const* name, char const* languageCode);
#endif
    virtual ~ovrLocaleInternal();

    // returns the language code for this locale object
    virtual char const* GetName() const {
        return Name.c


poralFilter(filters.get(0), startDate, endDate);
  }

  @Test
  public void testContextualTemporalFilter() {
    String searchTerm = "cat";
    String selector = null;

    OpenSearchQuery query = new OpenSearchQuery(0, 10, "relevance", "desc", 30000, FILTER_BUILDER);
    query.addContextualFilter(searchTerm, selector);

    String startDate = "2011-10-4T05:48:27.891-07:00";
    String endDate = "2011-10-4T06:18:27.581-07:00";

    query.addStartEndTemporalFilter(startDate, endDate);
    Filter filter = query.getFilter();

    // String filterXml = getFilterAsXml( filter );

    VerificationVisitor verificationVisitor = new VerificationVisitor();
    filter.accept(verificationVisitor, null);
    HashMap<String, FilterStatus> map =
        (HashMap<String, FilterStatus>) verificationVisitor.getMap();

    List<Filter> andFilters = getFilters(map, AndImpl.class.getName());
    assertEquals(1, andFilters.size());

    AndImpl andFilter = (AndImpl) andFilters.get(0);
    List<Filter> childFilters = andFilter.getChildren();
    assertTrue(childFilters.size() == 2);

    verifyContextualFilter(childFilters.get(0), "anyText", searchTerm);
    verifyTemporalFilter(childFilters.get(1), startDate, endDate);
  }

  @Test
  public void testPolygonSpatialFilterWktConversion() {
    // WKT is lon/lat, polygon is lat/lon
    String expectedGeometryWkt = "POLYGON((10 0,30 0,30 20,10 20,10 0))";

    String latLon = "0,10,0,30,20,30,20,10,0,10";
    PolygonSpatialFilter term = new PolygonSpatialFilter(latLon);
    String geometryWkt = term.getGeometryWkt();
    LOGGER.debug("geometryWkt = {}", geometryWkt);

    assertEquals(expectedGeometryWkt, geometryWkt);
  }

  @Test
  public void testBboxSpatialFilterWktConversion() {
    // NOTE: BBoxSpatialFilter converts bbox corners to doubles, hence the double values
    // in this expected WKT string
    String expectedGeometryWkt = "POLYGON((0.0 10.0,0.0 30.0,20.0 30.0,20.0 10.0,0.0 10.0))";

    String bboxCorners = "0,10,20,30";
    BBoxSpatialFilter term = new BBoxSpatialFilter(bboxCorners);
    String geometryWkt = term.getGeometryWkt();
    LOGGER.debug("geometryWkt = {}", geometryWkt);

    assertEquals(expectedGeometryWkt, geometryWkt);
  }

  @Test
  public void testBboxSpatialFilter() {
    String bboxCorners = "0,10,20,30";

    OpenSearchQuery query = new OpenSearchQuery(0, 10, "relevance", "desc", 30000, FILTER_BUILDER);
    query.addBBoxSpatialFilter(bboxCorners);

    Filter filter = query.getFilter();

    // String filterXml = getFilterAsXml( filter );

    VerificationVisitor verificationVisitor = new VerificationVisitor();
    filter.accept(verificationVisitor, null);
    HashMap<String, FilterStatus> map =
        (HashMap<String, FilterStatus>) verificationVisitor.getMap();

    printFilterStatusMap(map);

    // List<Filter> filters = getFilters( map, ContainsImpl.class.getName() );
    List<Filter> filters = getFilters(map, IntersectsImpl.class.getName());
    assertEquals(1, filters.size());

    // ContainsImpl containsFilter = (ContainsImpl) filters.get( 0 );
    IntersectsImpl containsFilter = (IntersectsImpl) filters.get(0);

    // The geometric point is wrapped in a <Literal> element, so have to
    // get geometry expression as literal and then evaluate it to get the
    // geometry.
    Literal literalWrapper = (Literal) containsFilter.getExpression


#pragma once
#include "ofMain.h"

class boid {

public:
    void setup(int x, int y);

    void update();

    void applyForce(const ofPoint & force);

    // We accumulate a new acceleration each time based on three rules
    void flock(vector<boid> boids);

    ofPoint separate (vector<boid> boids);

    // Alignment
    // For every nearby boid in the system, calculate the average velocity
    ofPoint align (vector<boid> boids);

    // Cohesion
    // For the average location (i.e. center) of all nearby boids, calculate steering vector towards that location
    ofPoint cohesion (vector<boid> boids);

    // Wraparound
    void borders();

    // A method that calculates a steering force towards a target
    // STEER = DESIRED MINUS VELOCITY
    ofPoint seek(const ofPoint & target);

    void draw();

    const ofPoint& getLocation() const{
        return location;
    }

    const ofPoint& getVelocity() const{
        return velocity;
    }

private:
    ofPoint location;
    ofPoint velocity;
    ofPoint acceleration;
    float r;
    float maxForce;
    float topSpeed;

};


        pub metadata: Metadata,
    }
}
<reponame>EVaillant/lockfree-object-pool<gh_stars>10-100
use std::ops::{Deref, DerefMut};

#[allow(unused_imports)]
use crate::none_object_pool::NoneObjectPool;

/// Wrapper over T used by [`NoneObjectPool`].
///
/// Access is allowed with [`std::ops::Deref`] or [`std::ops::DerefMut`]
/// # Example
/// ```rust
///  use lockfree_object_pool::NoneObjectPool;
///
///  let pool = NoneObjectPool::<u32>::new(|| Default::default());
///  let mut item = pool.pull();
///
///  *item = 5;
///  let work = *item * 5;
/// ```
pub struct NoneReusable<T> {
    data: T,
}

impl<T> NoneReusable<T> {
    /// Create new element
    ///
    /// # Arguments
    /// * `data` element to wrappe
    #[inline]
    pub fn new(data: T) -> Self {
        Self { data }
    }
}

impl<T> DerefMut for NoneReusable<T> {
    #[inline]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.data
    }
}

impl<T> Deref for NoneReusable<T> {
    type Target = T;

    #[inline]
    fn deref(&self) -> &Self::Target {
        &self.data
    }
}
#![windows_subsystem = "windows"]

use std::io::Write;

use anyhow::Context;
use gui::rickroll;
use log::*;

mod gui;
mod interop;
mod keylog;
mod window_target;

fn main() -> anyhow::Result<()> {
    pretty_env_logger::init();

    let video_bytes = include_bytes!("../rick.mkv");

    let video_path = std::env::current_dir()
        .map(|dir| dir.join("rick.mkv"))
        .context("could not canonicalize rick.mkv")?;

    {
        let mut rick_file =
            std::fs::File::create(&video_path).context("could not create rick file")?;

        rick_file
            .write(video_bytes)
            .context("failed to write rick bytes")?;

        rick_file.flush()?;
    }

    let terminate_tx = keylog::init_keylogger();

    let mut keystroke_rx =
        keylog::listen_keylogger().context("could not get keystroke receiver")?;

    for keystroke in keystroke_rx.iter() {
        trace!("received key: {:?}", keystroke);

        // R key
        if keystroke.vk_code == 0x52 {
            break;
        }
    }

    let _ = terminate_tx.send(());

    rickroll(&video_path);

    std::fs::remove_file(video_path);

    Ok(())
}
/*
 *
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Position {
    #[serde(rename = "TOP")]
    TOP,
    #[serde(rename = "MIDDLE")]
    MIDDLE,
    #[serde(rename = "BOTTOM")]
    BOTTOM,
    #[serde(rename = "JUNGLE")]
    JUNGLE,
    #[serde(rename = "UTILITY")]
    UTILITY,
    #[serde(rename = "FILL")]
    FILL,
    #[serde(rename = "UNSELECTED")]
    UNSELECTED,

}

// Vicfred
// https://atcoder.jp/contests/abc15


Fu()),yue=P,xue=(0,mue.default)((0,yue.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"}),"Brightness7");BG=HM.default=xue;const Si={DARK:"dark",LIGHT:"light"},$G=localStorage.theme===Si.DARK||!("theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?Si.DARK:Si.LIGHT,Zs=rM,Sue=yV;function Kl(e){const t=Sue();return O.useCallback(r=>{t(e(r))},[e,t])}const bue={isDarkMode:!1},FG=ci({name:"theme",initialState:bue,reducers:{setIsDarkMode:(e,{payload:t})=>{e.isDarkMode=t}}}),_ue=FG.actions,VG=FG.reducer;function GG(){const e=Zs(({theme:{isDarkMode:n}})=>n),t=Kl(_ue.setIsDarkMode);O.useEffect(()=>{t($G===Si.DARK)},[]);const r=()=>{localStorage.theme=e?Si.LIGHT:Si.DARK,t(!e)};return P.jsx(Cv,{color:"inherit",onClick:r,children:e?P.jsx(BG,{}):P.jsx(zG,{})})}const WM=e=>kM({palette:{mode:e,primary:{main:"#15803d"},success:{main:"#00C853"}},components:{MuiCssBaseline:{styleOverrides:{":root":{"--footer-height":"40px"}}}}});function wue({authProviders:e,error:t,usernamePasswordCallback:r}){const n=rM(({theme:a})=>a.isDarkMode),i=O.useMemo(()=>WM(n?Si.DARK:Si.LIGHT),[n]);return P.jsxs(IM,{theme:i,children:[P.jsx(BM,{}),P.jsx(Qe,{sx:{position:"absolute",top:4,right:4},children:P.jsx(GG,{})}),P.jsxs(Qe,{component:"main",sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"flex",flexDirection:"column",rowGap:4,boxShadow:24,borderRadius:4,border:"3px solid black",p:4},children:[P.jsxs(Qe,{sx:{display:"flex",justifyContent:"center",columnGap:2},children:[P.jsx("img",{height:"52",src:"./assets/logo.png",width:"52"}),P.jsx(We,{component:"h1",noWrap:!0,sx:{fontWeight:700,display:"flex",alignItems:"center"},variant:"h3",children:"Locust"})]}),r&&P.jsx("form",{action:r,children:P.jsxs(Qe,{sx:{display:"flex",flexDirection:"column",rowGap:2},children:[P.jsx(wa,{label:"Username",name:"username"}),P.jsx(wa,{label:"Password",name:"password",type:"password"}),t&&P.jsx(Kre,{severity:"error",children:t}),P.jsx(qa,{size:"large",type:"submit",variant:"contained",children:"Login"})]})}),e&&P.jsx(Qe,{sx:{display:"flex",flexDirection:"column",rowGap:1},children:e.map(({label:a,callbackUrl:o,iconUrl:s},l)=>P.jsxs(Cv,{href:o,sx:{display:"flex",justifyContent:"center",alignItems:"center",columnGap:2,borderRa


 program; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street,
 * Boston, MA 02110-1301, USA.
 */

#include "ui_font_fixed_8x16.hpp"

#include <cstdint>

namespace ui {
namespace font {
ui::Font* fixed_8x16_font = nullptr;

ui::Font& fixed_8x16() {
    if (fixed_8x16_font == nullptr) {
        fixed_8x16_font = new ui::Font{
            8,
            16,
            _api->fixed_8x16_glyph_data,
            0x20,
            223,
        };
    }

    return *fixed_8x16_font;
}

} /* namespace font */
} /* namespace ui */
/*
 * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
 * Copyright (C) 2016 Furrtek
 *
 * This file is part of PortaPack.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __UI_WIDGET_H__
#define __UI_WIDGET_H__

#include "ui.hpp"
#include "ui_text.hpp"
#include "ui_painter.hpp"
#include "ui_focus.hpp"
#include "theme.hpp"
// #include "rtc_time.hpp"
//  #include "radio.hpp"

// #include "portapack.hpp"
#include "utility.hpp"

// #include "ui/ui_font_fixed_5x8.hpp"

#include <functional>
#include <memory>
#include <string>
#include <string_view>
#include <vector>

namespace rf {

using Frequency = int64_t;
}

namespace ui {

void dirty_set();
void dirty_clear();
bool is_dirty();

class Context {
   public:
    FocusManager& focus_manager() {
        return focus_manager_;
    }

   private:
    FocusManager focus_manager_{};
};

class Widget {
   public:
    Widget()
        : _parent_rect{} {
    }

    Widget(
        Rect parent_rect)
        : _parent_rect{parent_rect} {
    }

    Widget(const Widget&) = delete;
    Widget(Widget&&) = delete;
    Widget& operator=(const Widget&) = delete;
    Widget& operator=(Widget&&) = delete;

    virtual ~Widget() = default;

    Point screen_pos();
    Size size() const;
    Rect screen_rect() const;
    Rect parent_rect() const;
    virtual void set_parent_rect(const Rect new_parent_rect);

    Widget* parent() const;
    void set_parent(Widget* const widget);

    bool hidden() const { return flags.hidden; }
    void hidden(bool hide);

    virtual void focus();
    virtual void on_focus();
    virtual void blur();
    virtual void on_blur();
    bool focusable() const;
    void set_focusable(const bool value);
    bool has_focus();

    virtual void paint(Painter& painter) = 0;

    virtual void on_show() {};
    virtual void on_hide() {};

    virtual bool on_key(const KeyEvent event);
    virtual bool on_encoder(const EncoderEvent event);
    virtual bool on_touch(const TouchEvent event);
    virtual bool on_keyboard(const KeyboardEvent event);
    virtual const std::vector<Widget*>& children() const;

    virtual Context& context() const;


    export class Class_QuadTree extends Class_View3D {

        private view1: View3D;
        private cameraCtl: LookAtController;
        constructor() {
            super();

            var view1: View3D = new View3D(0, 0, window.innerWidth, window.innerHeight);
            view1.camera3D.lookAt(new Vector3D(0, 1000, -1000), new Vector3D(0, 0, 0));
            view1.backColor = 0xff7f7f00;

            this._egret3DCanvas.addView3D(view1);
            this.view1 = view1;

            this.cameraCtl = new LookAtController(view1.camera3D, new Object3D());
            this.cameraCtl.distance = 1000;
            this.cameraCtl.rotationX = 60;

            var cubeVer = [
                -20, 20, -20, 1.0, 0.0, 0.0, 1.0,       // 0
                20, 20, -20, 0.0, 1.0, 0.0, 1.0,        // 1
                -20, -20, -20, 0.0, 0.0, 1.0, 1.0,      // 2
                20, -20, -20, 1.0, 0.0, 0.0, 1.0,       // 3

                -20, 20, 20, 0.0, 1.0, 0.0, 1.0,        // 4
                20, 20, 20, 0.0, 0.0, 1.0, 1.0,         // 5
                -20, -20, 20, 1.0, 0.0, 0.0, 1.0,       // 6
                20, -20, 20, 0.0, 1.0, 0.0, 1.0,        // 7
            ];

            var cubeLineInx = [
                0, 1, 1, 3,    // 前
                0, 2, 2, 3,

                4, 6, 6, 7,    // 后
                4, 5, 5, 7,

                0, 4, 0, 1,    // 上
                4, 5, 1, 5,

                2, 3, 3, 7,    // 下
                6, 7, 2, 6,

                0, 4, 4, 6,    // 左
                0, 2, 6, 2,

                3, 7, 1, 3,    // 右
                1, 5, 5, 7
            ];

            var geom: Geometry = new Geometry();
            geom.vertexFormat = VertexFormat.VF_POSITION | VertexFormat.VF_COLOR;
            geom.verticesData = cubeVer;
            geom.indexData = cubeLineInx;

            var position: Vector3D = new Vector3D();

            var wireframe: Wireframe;

            for (var i: number = 0; i < 100; i++) {
                wireframe = new Wireframe(geom);
                position.setTo((Math.random() - 0.5) * 2000, 0, (Math.random() - 0.5) * 2000);
                wireframe.position = position;
                this.view1.addChild3D(wireframe);
            }

            this._egret3DCanvas.start();
            this._egret3DCanvas.addEventListener(Event3D.ENTER_FRAME, this.update, this);

            this.view1.scene.createQuadTree();

        }

        public update(e: Event3D) {
            this.cameraCtl.update();

        }
    }
}import axios from 'axios';

// for now only one api is used
const api = axios.create({
  baseURL: 'https://opentdb.com/api.php',
});

export enum ResponseCode {
  Success = 0,
  NoResults = 1,
  InvalidParameter = 2,
  InvalidToken = 3,
  TokenEmpty = 4,
}

export enum Difficulty {
  Hard = 'hard',
  Medium = 'medium',
  Easy = 'easy',
}

export default api;
import {
  IBundle,
  IPatient,
  IQuestionnaire,
  IQuestionnaireResponse,
  IQuestionnaireResponse_Item,
} from '@ahryman40k/ts-fhir-types/lib/R4';
import Client from 'fhirclient/lib/Client';

// TODO:
// It is currently a problem that setSaved


           ++it;
                    }
                }
                if (mapAskedRecently[nHash].size() >= nPeersPerHashMax)
                    continue;
            }

            if (objPair.second.nObjectType == GOVERNANCE_OBJECT_TRIGGER) {
                vTriggerObjHashes.push_back(nHash);
            } else {
                vOtherObjHashes.push_back(nHash);
            }
        }
    }

    LogPrint("gobject", "CGovernanceManager::RequestGovernanceObjectVotes -- start: vTriggerObjHashes %d vOtherObjHashes %d mapAskedRecently %d\n",
        vTriggerObjHashes.size(), vOtherObjHashes.size(), mapAskedRecently.size());

    FastRandomContext insecure_rand;
    std::random_shuffle(vTriggerObjHashes.begin(), vTriggerObjHashes.end(), insecure_rand);
    std::random_shuffle(vOtherObjHashes.begin(), vOtherObjHashes.end(), insecure_rand);

    for (int i = 0; i < nMaxObjRequestsPerNode; ++i) {
        uint256 nHashGovobj;

        // ask for triggers first
        if (vTriggerObjHashes.size()) {
            nHashGovobj = vTriggerObjHashes.back();
        } else {
            if (vOtherObjHashes.empty())
                break;
            nHashGovobj = vOtherObjHashes.back();
        }
        bool fAsked = false;
        for (const auto& pnode : vNodesCopy) {
            // Only use regular peers, don't try to ask from outbound "dynode" connections -
            // they stay connected for a short period of time and it's possible that we won't get everything we should.
            // Only use outbound connections - inbound connection could be a "dynode" connection
            // initiated from another node, so skip it too.
            if (pnode->fDynode || (fDynodeMode && pnode->fInbound))
                continue;
            // only use up to date peers
            if (pnode->nVersion < MIN_GOVERNANCE_PEER_PROTO_VERSION)
                continue;
            // stop early to prevent setAskFor overflow
            size_t nProjectedSize = pnode->setAskFor.size() + nProjectedVotes;
            if (nProjectedSize > SETASKFOR_MAX_SZ / 2)
                continue;
            // to early to ask the same node
            if (mapAskedRecently[nHashGovobj].count(pnode->addr))
                continue;

            RequestGovernanceObject(pnode, nHashGovobj, connman, true);
            mapAskedRecently[nHashGovobj][pnode->addr] = nNow + nTimeout;
            fAsked = true;
            // stop loop if max number of peers per obj was asked
            if (mapAskedRecently[nHashGovobj].size() >= nPeersPerHashMax)
                break;
        }
        // NOTE: this should match `if` above (the one before `while`)
        if (vTriggerObjHashes.size()) {
            vTriggerObjHashes.pop_back();
        } else {
            vOtherObjHashes.pop_back();
        }
        if (!fAsked)
            i--;
    }
    LogPrint("gobject", "CGovernanceManager::RequestGovernanceObjectVotes -- end: vTriggerObjHashes %d vOtherObjHashes %d mapAskedRecently %d\n",
        vTriggerObjHashes.size(), vOtherObjHashes.size(), mapAskedRecently.size());

    return int(vTriggerObjHashes.size() + vOtherObjHashes.size());
}

bool CGovernanceManager::AcceptObjectMessage(const uint256& nHash)
{
    LOCK(cs);
    return AcceptMessage(nHash, setRequestedObjects);
}

bool CGovernanceManager


.b, enc, sv)
			}
		case reflect.Interface:
			op = func(i *encInstr, state *encoderState, iv reflect.Value) {
				if !state.sendZero && (!iv.IsValid() || iv.IsNil()) {
					return
				}
				state.update(i)
				state.enc.encodeInterface(state.b, iv)
			}
		}
	}
	if op == nil {
		errorf("can't happen: encode type %s", rt)
	}
	return &op, indir
}

// gobEncodeOpFor returns the op for a type that is known to implement GobEncoder.
func gobEncodeOpFor(ut *userTypeInfo) (*encOp, int) {
	rt := ut.user
	if ut.encIndir == -1 {
		rt = reflect.PointerTo(rt)
	} else if ut.encIndir > 0 {
		for i := int8(0); i < ut.encIndir; i++ {
			rt = rt.Elem()
		}
	}
	var op encOp
	op = func(i *encInstr, state *encoderState, v reflect.Value) {
		if ut.encIndir == -1 {
			// Need to climb up one level to turn value into pointer.
			if !v.CanAddr() {
				errorf("unaddressable value of type %s", rt)
			}
			v = v.Addr()
		}
		if !state.sendZero && isZero(v) {
			return
		}
		state.update(i)
		state.enc.encodeGobEncoder(state.b, ut, v)
	}
	return &op, int(ut.encIndir) // encIndir: op will get called with p == address of receiver.
}

// compileEnc returns the engine to compile the type.
func compileEnc(ut *userTypeInfo, building map[*typeInfo]bool) *encEngine {
	srt := ut.base
	engine := new(encEngine)
	seen := make(map[reflect.Type]*encOp)
	rt := ut.base
	if ut.externalEnc != 0 {
		rt = ut.user
	}
	if ut.externalEnc == 0 && srt.Kind() == reflect.Struct {
		for fieldNum, wireFieldNum := 0, 0; fieldNum < srt.NumField(); fieldNum++ {
			f := srt.Field(fieldNum)
			if !isSent(&f) {
				continue
			}
			op, indir := encOpFor(f.Type, seen, building)
			engine.instr = append(engine.instr, encInstr{*op, wireFieldNum, f.Index, indir})
			wireFieldNum++
		}
		if srt.NumField() > 0 && len(engine.instr) == 0 {
			errorf("type %s has no exported fields", rt)
		}
		engine.instr = append(engine.instr, encInstr{encStructTerminator, 0, nil, 0})
	} else {
		engine.instr = make([]encInstr, 1)
		op, indir := encOpFor(rt, seen, building)
		engine.instr[0] = encInstr{*op, singletonField, nil, indir}
	}
	return engine
}

// getEncEngine returns the engine to compile the type.
func getEncEngine(ut *userTypeInfo, building map[*typeInfo]bool) *encEngine {
	info, err := getTypeInfo(ut)
	if err != nil {
		error_(err)
	}
	enc, ok := info.encoder.Load().(*encEngine)
	if !ok {
		enc = buildEncEngine(info, ut, building)
	}
	return enc
}

func buildEncEngine(info *typeInfo, ut *userTypeInfo, building map[*typeInfo]bool) *encEngine {
	// Check for recursive types.
	if building != nil &


-jest/utils";
import Tournaments from "../Schemas/Tournaments";
import tournamentCommand from "../src/tournament";
import * as faker from "faker";
import { TournamentBuilder } from "./Builders";
import { MessageEmbed } from "discord.js";
import { ICommandParameters } from "../src/Commands";

jest.mock("../Schemas/Tournaments");

beforeEach(() => {
  jest.clearAllMocks();
});

async function runTournamentCommand(args: string[]): Promise<MessageEmbed> {
  return await tournamentCommand({ args } as ICommandParameters);
}

const generateFakeDateString = () => {
  const date = `${faker.random.number({ max: 12, min: 1 })}/${faker.random.number({
    max: 30,
    min: 1,
  })}/${faker.random.number({ max: 2030, min: 2021 })}`;
  const time = `${faker.random.number({ max: 12, min: 1 })}:${faker.random.number({
    max: 59,
    min: 0,
  })}${faker.random.arrayElement(["am", "pm"])}`;
  return date + "-" + time;
};

describe("tournament tests", () => {
  it("returns error message with no team name", async () => {
    const reponse = await runTournamentCommand(["", generateFakeDateString()]);
    expect(reponse).toHaveProperty("title", "Tournament Not Created");
    expect(reponse).toHaveProperty("description", "You must provide a name for your tournament.");
  });

  it("returns error message dupe team name", async () => {
    mocked(Tournaments.getOne).mockResolvedValueOnce(TournamentBuilder.single());
    const mockName = faker.random.words();
    const reponse = await runTournamentCommand([mockName, generateFakeDateString()]);
    expect(reponse).toHaveProperty("title", "Tournament Not Created");
    expect(reponse).toHaveProperty(
      "description",
      `You must provide a unique name for your tournament. There is already a tournament named ${mockName}.`
    );
  });

  it("returns error message on invalid date string", async () => {
    mocked(Tournaments.getOne).mockResolvedValueOnce(null);
    const reponse = await runTournamentCommand([...faker.random.words().split(" "), faker.lorem.word()]);
    expect(reponse).toHaveProperty("title", "Invalid Date Format");
  });

  it.each([
    ["10/10/2030-8:30pm", new Date(2030, 9, 10, 20, 30, 0, 0).toLocaleString()],
    ["10/10/2030-8:30am", new Date(2030, 9, 10, 8, 30, 0, 0).toLocaleString()],
  ])("creates new tournament correctly", async (dateString, expectedFormattedDateString) => {
    mocked(Tournaments.getOne).mockResolvedValueOnce(null);
    const mockAddTournament = mocked(Tournaments.insert).mockResolvedValue(null);
    const mockName = faker.random.words();
    const reponse = await runTournamentCommand([...mockName.split(" "), dateString]);
    expect(reponse).toHaveProperty("title", `${mockName} Created`);
    expect(reponse).toHaveProperty(
      "description",
      `Tournament created with a start date of: ${expectedFormattedDateString}.`
    );
    expect(mockAddTournament).toHaveBeenCalledWith(expect.objectContaining({ name: mockName }));
  });

  it("lists all tournaments", async () => {
    const mockTournaments = TournamentBuilder.many(3);
    mocked(Tournaments.get).mockResolvedValueOnce(mockTournaments);
    const response = await runTournamentCommand([]);
    expect(response.fields).toHaveLength(3);
    response.fields.forEach((field, index) => {
      expect(field).toHaveProperty("name", mockTournaments[index].name);
      expect(field).toHaveProperty("value", mock


           .is_none());

        assert_eq!(
            SocketAddrUnix::new_abstract_name(b"test")
                .unwrap()
                .abstract_name()
                .unwrap(),
            b"test"
        );
        assert_eq!(
            SocketAddrUnix::new_abstract_name(b"")
                .unwrap()
                .abstract_name()
                .unwrap(),
            b""
        );
        assert_eq!(
            SocketAddrUnix::new_abstract_name(b"this\0that")
                .unwrap()
                .abstract_name()
                .unwrap(),
            b"this\0that"
        );
        SocketAddrUnix::new_abstract_name(&[b'a'; 500]).unwrap_err();
        assert!(SocketAddrUnix::new_abstract_name(b"test")
            .unwrap()
            .path()
            .is_none());
    }
}
<filename>server/src/vtubers.rs
#![allow(clippy::unreadable_literal)]
#![allow(dead_code)]

#[derive(Debug)]
pub struct VTuber {
    pub id: &'static str,
    pub youtube: Option<&'static str>,
    pub bilibili: Option<&'static str>,
}

impl VTuber {
    pub fn find_by_youtube_channel_id(channel_id: &str) -> Option<&VTuber> {
        VTUBERS.iter().find(|v| v.youtube == Some(channel_id))
    }
}

macro_rules! vtubers {
    ($( $(#[doc = $_:expr])? $id:ident, $youtube:expr, $bilibili:expr, )*) => {
        pub const VTUBERS: &[VTuber] = &[
            $(
                VTuber {
                    id: stringify!($id),
                    youtube: $youtube,
                    bilibili: $bilibili
                }
            ),*
        ];
    };
}

vtubers! {
    amamiyayume    , Some("U<KEY>"), None,
    aoi            , Some("UCLZyaaUwBw2ZvwLt6uY3_bQ"), None,
    asa            , Some("<KEY>"), None,
    choco          , Some("UC<KEY>"), None,
    fengxu         , Some("UCYPSP_gJ-BcREmsDzBIaRvw"), None,
    fifteen        , Some("UC_UqaRNrLcaL4fp2IAPV0OQ"), None,
    fujinokuma     , Some("UC<KEY>"), None,
    haruka         , Some("UCl1RVJbkPnpNbO9-CsDqPmQ"), None,
    himemiyayuka   , Some("UC1d1dmxkh_yanq1U1gli7jw"), None,
    hoonie         , Some("UC6s0wLR0TZauzTVoGGw2r6g"), None,
    ikusen         , Some("UCKazkVudNQs8ZhwfXj_RNPw"), None,
    kaina          , Some("UCN7sEdAjj4Q--al9pDsCPOg"), None,
    kurita         , Some("UCsvSrfDReAqYM32_VW8t09w"), None,
    kwakon         , Some("UCyZZMKRn-mUEkPzaqa9b6bg"), None,
    lapis          , Some("UCb_9R8SZy_HSJi53zxVh7kg"), None,
    lumina         , Some("UCc5cZPorgyc23wKN-Ng1R6w"), None,
    miru           , Some("UCFahBR2wixu0xOex84bXFvg"), None,
    nyoro          , Some("UC4J0GZLM55qrFh2L-ZAb2LA"), None,
    pedko          , Some("UC2yG-9ekUwTs8Q0yMSycMxA"), None,
    queenie        , Some("UCtWuTDvZeZ09COJ2SjfESzQ"), None,
    rana           , Some("UCFEd5V7V


i]);
    } else {
      usesCodeMirror = true;
      i = fence.index;
      result.push(...fence.content);
    }
  }
  return [usesCodeMirror, result.join('\n')];
}

const run = async (dir, sidebar) => {
  for await (const x of walk(dir)) {
    if (x.endsWith('.png') || x.endsWith('.jpeg') || x.endsWith('.jpg')) {
      fs.copy(x, path.resolve('./src/build/assets', path.basename(x)));
    } else if (x.endsWith('.md')) {
      fs.readFile(x, 'utf8', (err, file) => {
        const graymatter = matter(file);
        const frontmatter = graymatter.data;
        if (!frontmatter || !frontmatter.permalink) {
          // console.warn('Skipping ' + x + ': no frontmatter permalink.');
        } else {
          try {
            const [usesCodeMirror, content] = upgradeCodeFences(
              graymatter.content
            );

            let permalink = frontmatter.permalink.slice(1);
            if (permalink.length === 0) permalink = 'index';
            const dest = path.resolve('./src/build/', permalink);
            fs.mkdirSync(path.parse(dest).dir, { recursive: true });

            if (!frontmatter.head) {
              frontmatter.head = {};
            }
            if (!frontmatter.layout) {
              frontmatter.layout = 'sdk-documentation-layout';
            }
            if (sidebar) {
              if (!frontmatter.sidebar) {
                frontmatter.sidebar = [];
              }
              frontmatter.sidebar.push({ nav: sidebar });
            }

            if (usesCodeMirror) {
              frontmatter.head.stylesheets = [
                ...(frontmatter.stylesheets ?? []),
                `https://cdnjs.cloudflare.com/ajax/libs/codemirror/${CODE_MIRROR_VERSION}/codemirror.min.css`,
              ];
              frontmatter.head.scripts = [
                ...(frontmatter.scripts ?? []),
                `https://cdnjs.cloudflare.com/ajax/libs/codemirror/${CODE_MIRROR_VERSION}/codemirror.min.js`,
                `https://cdnjs.cloudflare.com/ajax/libs/codemirror/${CODE_MIRROR_VERSION}/mode/javascript/javascript.min.js`,
                `https://cdnjs.cloudflare.com/ajax/libs/codemirror/${CODE_MIRROR_VERSION}/mode/xml/xml.min.js`,
              ];
            }
            // frontmatter.head.modules = [
            //   ...(frontmatter.modules ?? []),
            //   '/assets/js/code-playground.min.js',
            // ];
            fs.writeFile(dest + '.md', matter.stringify(content, frontmatter));
          } catch (e) {
            console.error('Error parsing', x, e);
          }
        }
      });
    }
  }
};

run(process.argv[2], process.argv[3]);
import React from "react";
import clsx from "clsx";
import { ThemeClassNames } from "@docusaurus/theme-common";
import {useDoc} from '@docusaurus/plugin-content-docs/client';
import LastUpdated from "@theme/LastUpdated";
import EditThisPage from "@theme/EditThisPage";
import TagsListInline from "@theme/TagsListInline";
import styles from


docs.jax.dev/en/latest/)**
## 使用方法

本模块的核心功能是一个函数，它接收两个电场张量作为输入，并返回对应的包络场幅值张量。

假设您的有限元模型有 $N$ 个体素，每个体素的电场是一个三维矢量 $(E_x, E_y, E_z)$。对于两种频率的电流，您会得到两个电场张量 $E_1$ 和 $E_2$。

输入格式要求：
*   `E_1`: 第一个频率产生的电场张量，形状为 `(N, 3)` 的 NumPy 或 JAX 数组。
*   `E_2`: 第二个频率产生的电场张量，形状为 `(N, 3)` 的 NumPy 或 JAX 数组。

函数调用示例：
```python
import jax
import jax.numpy as jnp
import numpy as np
from env_jax import envelop_jax

N = 10
key = jax.random.PRNGKey(0)
E1_np = np.random.rand(N, 3) * 0.1  # Example NumPy array
E2_np = np.random.rand(N, 3) * 0.1

# Convert NumPy arrays to JAX arrays to enable JAX acceleration
E1_jax = jnp.array(E1_np)
E2_jax = jnp.array(E2_np)

# Solve for the interference envelope
envelope = envelop_jax(E1_jax, E2_jax)

print("E1 shape:", E1_jax.shape)
print("E2 shape:", E2_jax.shape)
print("Envelope shape:", envelope.shape) # Output shape should be (N,)
```
## 代码结构

```
.
├── env_jax.py                    # 求解包络场的核心函数文件
├── Benchmark_cpu.py              # 在CPU上JAX和Numpy的性能对比脚本
├── Benchmark_cpu.py              # 在GPU上JAX和PyTorch的性能对比脚本
├── README.md                     # 本文件
├── test.py                       # 测试代码
├── numpy_jax_comparison.pdf      # CPU上的性能差异可视化图
├── jax_pytorch_comparison.pdf    # GPU上的性能差异可视化图
├── numpy_jax_comparison.png      # CPU上的性能差异可视化图
├── jax_pytorch_comparison.png    # GPU上的性能差异可视化图
└── LICENSE
```

## 性能

本模块实现的 JAX 加速求解器在 CPU 和 GPU 上均比基于 NumPy 或 PyTorch 的实现展现出显著的性能优势，计算速度提升接近一个数量级，尤其适用于大规模体素计算。

### CPU加速性能

![CPU加速性能](numpy_jax_comparison.png "CPU加速性能")

### GPU加速性能

![GPU加速性能](jax_pytorch_comparison.png "GPU加速性能")

## 贡献

欢迎对本项目做出贡献！如果您发现 Bug、有改进建议或想添加新功能，请随时提交 Pull Request。

## 许可

本项目使用MIT许


 )
}

data class MessageDialogUiState(
    val title: @Composable (() -> String)? = null,
    val text: @Composable (() -> String)? = null,
    val icon: @Composable (() -> Unit)? = null,
    val confirmButtonText: @Composable () -> String? = { stringResource(android.R.string.ok) },
    val dismissButtonText: @Composable () -> String? = { stringResource(android.R.string.cancel) },
    override val onConfirm: ((Unit) -> Unit)? = {},
    override val onDismiss: (() -> Unit)? = null,
    override val onDismissRequest: () -> Unit = {},
) : DialogUiState<Unit>

@PreviewDefault
@Composable
private fun PreviewMessageDialog() {
    MaterialTheme {
        MessageDialog(
            title = "Title",
            text = "This is the content that goes in the text",
            onDismissRequest = { },
            onConfirmButtonClick = { },
            onDismissButtonClick = { }
        )
    }
}

@PreviewDefault
@Composable
private fun PreviewMessageDialogWithIcon() {
    MaterialTheme {
        MessageDialog(
            title = "Title",
            text = "This is the content that goes in the text",
            icon = { Icon(imageVector = Icons.Default.CheckCircle, contentDescription = null) },
            onDismissRequest = { },
            onConfirmButtonClick = { },
            onDismissButtonClick = { }
        )
    }
}
package org.jdc.template.ui.compose.icons.google.outlined

/*
 * Copyright 2022 The Android Open Source Project
 *
 * 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 androidx.compose.material.icons.Icons
import androidx.compose.material.icons.materialIcon
import androidx.compose.material.icons.materialPath
import androidx.compose.ui.graphics.vector.ImageVector

public val Icons.Outlined.People: ImageVector
    get() {
        if (_people != null) {
            return _people!!
        }
        _people = materialIcon(name = "Outlined.People") {
            materialPath {
                moveTo(9.0f, 13.75f)
                curveToRelative(-2.34f, 0.0f, -7.0f, 1.17f, -7.0f, 3.5f)
                lineTo(2.0f, 19.0f)
                horizontalLineToRelative(14.0f)
                verticalLineToRelative(-1.75f)
                curveToRelative(0.0f, -2.33f, -4.66f, -3.5f, -7.0f, -3.5f)
                close()
                moveTo(4.34f, 17.0f)
                curveToRelative(0.84f, -0.58f, 2.87f, -1.25f, 4.66f, -1.25f)
                reflectiveCurveToRelative(3.82f, 0.67f, 4.66f, 1.25f)
                lineTo(4.34f, 17.0f)
                close()
                moveTo(9.0f, 12.0f)
                curveToRelative(1.93f, 0.0f, 3.5f, -1.57f, 3.5f, -3.5f)
                reflectiveCurveTo(10.93f, 5.0f, 9.0f, 5.0f)
                reflectiveCurveTo(5.5f, 6.57f, 5.5f, 8.5f)
                reflectiveCurveTo(7.07f, 12.0f, 9.0f, 12.0f)
                close()
                moveTo(9.0f, 7.0f)
                curveToRelative(0.83f, 0.0f, 1.5f, 0.67f, 1.5f, 1.5f)
                reflectiveCurve


7}"`), among
others. Below is what we do support (`A` denotes a literal character, period
(`.`), or a single `\\ ` escape sequence; `x` and `y` denote regular
expressions.):

Expression | Meaning
---------- | --------------------------------------------------------------
`c`        | matches any literal character `c`
`\\d`      | matches any decimal digit
`\\D`      | matches any character that's not a decimal digit
`\\f`      | matches `\f`
`\\n`      | matches `\n`
`\\r`      | matches `\r`
`\\s`      | matches any ASCII whitespace, including `\n`
`\\S`      | matches any character that's not a whitespace
`\\t`      | matches `\t`
`\\v`      | matches `\v`
`\\w`      | matches any letter, `_`, or decimal digit
`\\W`      | matches any character that `\\w` doesn't match
`\\c`      | matches any literal character `c`, which must be a punctuation
`.`        | matches any single character except `\n`
`A?`       | matches 0 or 1 occurrences of `A`
`A*`       | matches 0 or many occurrences of `A`
`A+`       | matches 1 or many occurrences of `A`
`^`        | matches the beginning of a string (not that of each line)
`$`        | matches the end of a string (not that of each line)
`xy`       | matches `x` followed by `y`

To help you determine which capability is available on your system, googletest
defines macros to govern which regular expression it is using. The macros are:
<!--absl:google3-begin(google3-only)-->`GTEST_USES_PCRE=1`, or
<!--absl:google3-end--> `GTEST_USES_SIMPLE_RE=1` or `GTEST_USES_POSIX_RE=1`. If
you want your death tests to work in all cases, you can either `#if` on these
macros or use the more limited syntax only.

### How It Works

Under the hood, `ASSERT_EXIT()` spawns a new process and executes the death test
statement in that process. The details of how precisely that happens depend on
the platform and the variable ::testing::GTEST_FLAG(death_test_style) (which is
initialized from the command-line flag `--gtest_death_test_style`).

*   On POSIX systems, `fork()` (or `clone()` on Linux) is used to spawn the
    child, after which:
    *   If the variable's value is `"fast"`, the death test statement is
        immediately executed.
    *   If the variable's value is `"threadsafe"`, the child process re-executes
        the unit test binary just as it was originally invoked, but with some
        extra flags to cause just the single death test under consideration to
        be run.
*   On Windows, the child is spawned using the `CreateProcess()` API, and
    re-executes the binary to cause just the single death test under
    consideration to be run - much like the `threadsafe` mode on POSIX.

Other values for the variable are illegal and will cause the death test to fail.
Currently, the flag's default value is
"fast". However, we reserve
the right to change it in the future. Therefore, your tests should not depend on
this. In either case, the parent process waits for the child process to
complete, and checks that

1.  the child's exit status satisfies the predicate, and
2.  the child's stderr matches the regular expression.

If the death test statement runs to completion without dying, the child process
will nonetheless terminate, and the assertion fails.

### Death Tests And Threads

The reason for the two death test styles has to do with thread safety. Due to
well-known problems with forking in the presence of threads, death tests should
be run in a single-threaded context. Sometimes, however, it isn't feasible to
arrange that kind of environment. For example, statically-initialized modules
may start threads before main is ever reached. Once threads have been created,
it may be difficult or impossible to clean them up.

googletest has three features intended to


ublic class TexCoord4f extends Tuple4f implements java.io.Serializable {

    /** The Constant serialVersionUID. */
    // Combatible with 1.1
    static final long serialVersionUID = -3517736544731446513L;

    /**
     * Constructs and initializes a TexCoord4f from the specified xyzw
     * coordinates.
     * @param x the x coordinate
     * @param y the y coordinate
     * @param z the z coordinate
     * @param w the w coordinate
     */
    public TexCoord4f(float x, float y, float z, float w)
    {
        super(x,y,z,w);
    }

    /**
     * Constructs and initializes a TexCoord4f from the array of length 4.
     * @param v the array of length w containing xyzw in order
     */
    public TexCoord4f(float[] v)
    {
       super(v);
    }

    /**
     * Constructs and initializes a TexCoord4f from the specified TexCoord4f.
     * @param v1 the TexCoord4f containing the initialization x y z w data
     */
    public TexCoord4f(TexCoord4f v1)
    {
       super(v1);
    }

    /**
     * Constructs and initializes a TexCoord4f from the specified Tuple4f.
     * @param t1 the Tuple4f containing the initialization x y z w data
     */
    public TexCoord4f(Tuple4f t1)
    {
       super(t1);
    }

    /**
     * Constructs and initializes a TexCoord4f from the specified Tuple4d.
     * @param t1 the Tuple4d containing the initialization x y z w data
     */
    public TexCoord4f(Tuple4d t1)
    {
       super(t1);
    }

    /**
     * Constructs and initializes a TexCoord4f to (0,0,0,0).
     */
    public TexCoord4f()
    {
        super();
    }

}
/*******************************************************************************************************
 *
 * Tuple4d.java, in simtools.gaml.extensions.physics, is part of the source code of the
 * GAMA modeling and simulation platform (v.1.9.3).
 *
 * (c) 2007-2023 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
 *
 * Visit https://github.com/gama-platform/gama for license information and contacts.
 *
 ********************************************************************************************************/

package javax.vecmath;

/**
 * A 4 element tuple represented by double precision floating point
 * x,y,z,w coordinates.
 *
 */
public abstract class Tuple4d implements java.io.Serializable, Cloneable {

    /** The Constant serialVersionUID. */
    static final long serialVersionUID = -4748953690425311052L;

    /**
     * The x coordinate.
     */
    public	double	x;

    /**
     * The y coordinate.
     */
    public	double	y;

    /**
     * The z coordinate.
     */
    public	double	z;

    /**
     * The w coordinate.
     */
    public	double	w;

    /**
     * Constructs and initializes a Tuple4d from the specified xyzw coordinates.
     * @param x the x coordinate
     * @param y the y coordinate
     * @param z the z coordinate
     * @param w the w coordinate
     */
    public Tuple4d(double x, double y, double z, double w)
    {
	this.x = x;
	this.y = y;
	this.z = z;
	this.w = w;
    }

    /**
     * Constructs and initializes a Tuple4d from the coordinates contained
     * in the array.
     * @param t the array of length 4 containing xyzw in order
     */
    public Tuple4d(double[] t)
    {
	this.x = t[0];
	this.y = t[1];
	this.z = t[2];
	this.w = t[3];
    }

    /**
     * Constructs and initial


n res.status(200).json({ user });
  } catch (error) {
    return next(error);
  }
}

export async function getAllUsers(
  req: Request,
  res: Response,
  next: NextFunction
) {
  try {
    const users = await db.User.find();
    console.log(users);

    return res.status(200).json(users);
  } catch (error) {
    return next(error);
  }
}
/* tslint:disable */
import { Serializer, Deserializer } from "../src";
import Long from "long";
export class Util {
    public decode(deserializer: Deserializer): DataContainer {
        const id = deserializer.readUInt32();
        if(id === 0x9139fedd) {
            return comment.Comment.decode(deserializer, true);
        }
        if(id === 0x4fb6501a) {
            return Post.decode(deserializer, true);
        }
        if(id === 0xc8c23916) {
            return UsersResult.decode(deserializer, true);
        }
        if(id === 0x449fd2ff) {
            return User.decode(deserializer, true);
        }
        if(id === 0xd3c81697) {
            return Msg.decode(deserializer, true);
        }
        if(id === 0xab01d5d4) {
            return geo.URL.decode(deserializer, true);
        }
        if(id === 0x9432f5e) {
            return geo.URLComplex.decode(deserializer, true);
        }
        if(id === 0x6c2f09a) {
            return geo.data.Address.decode(deserializer, true);
        }
        if(id === 0xa65445ed) {
            return geo.data.AddressEmpty.decode(deserializer, true);
        }
        throw new Error(`No container found with id ${id}`);
    }
}
export abstract class DataContainer {
    public getContainerName = () => this.__name;
    public getContainerId = () => this.__id;
    public abstract encode(serializer: Serializer): void;
    constructor(private __id: number, private __name: string) {}
}
export namespace comment {
    export abstract class TComment extends DataContainer {
        public abstract encode(serializer: Serializer, ignoreHeader?: boolean): void;
        public static decode(deserializer: Deserializer): TComment {
            const id = deserializer.readUInt32();
            if(id === 0x9139fedd) {
                return Comment.decode(deserializer, true);
            }
            throw new Error(`Expected one of 2436497117 ids but got ${id} instead`);
        }
    }
    interface ICommentParams {
        text: string;
    }
    export class Comment extends TComment implements ICommentParams {
        public readonly text: string;
        constructor(params: ICommentParams)
        {
            super(2436497117, "comment.comment");
            this.text = params.text;
        }
        public static decode(deserializer: Deserializer, ignoreHeader = false): Comment {
            if(!ignoreHeader) {
                const id = deserializer.readUInt32();
                if(2436497117 !== id) {
                    throw new Error(
                        `Invalid container id: Expected 2436497117 but received ${id} instead.`
                    );
                }
            }
            let v_3638045649 /* text */: string = '';
            v_3638045649 /* text */ = deserializer.readBuffer(deserializer.readUInt32()).toString('utf8');
            return new Comment({
                "text": v_3638045649 /* text */
            });
        }
        public encode(serializer: Serializer, ignoreHeader = false): void {
            if(ignoreHeader != true) serializer.writeUInt32(2436497117);
            serializer.writeString(this.text);
        }
        public copy(params: Partial<ICommentParams>): Comment {
            let changed = false;
            if(!changed && this.text !== params.text) changed = true;
            if(changed)


opt	c+, at+, e+, n-
	section overlay.text

	xdef s19b_jlamp2_800D6504
s19b_jlamp2_800D6504:
	dw 0x27BDFFD0 ; 800D6504
	dw 0xAFB1001C ; 800D6508
	dw 0x00808821 ; 800D650C
	dw 0xAFB30024 ; 800D6510
	dw 0x00A09821 ; 800D6514
	dw 0x24040412 ; 800D6518
	dw 0x24050002 ; 800D651C
	dw 0xAFB20020 ; 800D6520
	dw 0x3C12800B ; 800D6524
	dw 0x00003021 ; 800D6528
	dw 0x3C07800C ; 800D652C
	dw 0x8E42B9B0 ; 800D6530
	dw 0x24E73A6C ; 800D6534
	dw 0xAFBF0028 ; 800D6538
	dw 0xAFB00018 ; 800D653C
	dw 0xAE330024 ; 800D6540
	dw 0xAE220020 ; 800D6544
	dw 0x3C02800C ; 800D6548
	dw 0x24423A64 ; 800D654C
	dw 0x0C006EAF ; 800D6550
	dw 0xAFA20010 ; 800D6554
	dw 0x00408021 ; 800D6558
	dw 0x12000006 ; 800D655C
	dw 0x00000000 ; 800D6560
	dw 0x0C00609D ; 800D6564
	dw 0x02002021 ; 800D6568
	dw 0x8E42B9B0 ; 800D656C
	dw 0x00000000 ; 800D6570
	dw 0xA6020028 ; 8


izeof addrret;
	    netb.buf = addrret;
	    if (t_getname (fd, &netb, LOCALNAME) == -1)
		t_error ("t_getname");
	    /*
	     * XXX - assumes that the return data
	     * are in a struct sockaddr_in, and that
	     * the data structure is layed out in
	     * the normal fashion.  This WILL NOT WORK
	     * on a non 32-bit machine (same in Xstreams.c)
	     */
	    for (i = 4; i < 8; i++)
		xdmcp_data[j++] = netb.buf[i];
	    for (i = 2; i < 4; i++)
		xdmcp_data[j++] = netb.buf[i];
	}
#else
	{
	    unsigned long	addr;
	    unsigned short	port;
#ifdef TCPCONN
	    int	    addrlen;
	    struct sockaddr_in	in_addr;

	    addrlen = sizeof (in_addr);
	    if (getsockname (fd,
			     (struct sockaddr *) &in_addr,
			     &addrlen) != -1 &&
		addrlen >= sizeof in_addr &&
		in_addr.sin_family == AF_INET)
	    {
		addr = ntohl (in_addr.sin_addr.s_addr);
		port = ntohs (in_addr.sin_port);
	    }
	    else
#endif
	    {
		static unsigned long	unix_addr = 0xFFFFFFFF;
		addr = unix_addr--;
		port = getpid ();
	    }
	    xdmcp_data[j++] = (addr >> 24) & 0xFF;
	    xdmcp_data[j++] = (addr >> 16) & 0xFF;
	    xdmcp_data[j++] = (addr >>  8) & 0xFF;
	    xdmcp_data[j++] = (addr >>  0) & 0xFF;
	    xdmcp_data[j++] = (port >>  8) & 0xFF;
	    xdmcp_data[j++] = (port >>  0) & 0xFF;
	}
#endif
	time (&now);
	xdmcp_data[j++] = (now >> 24) & 0xFF;
	xdmcp_data[j++] = (now >> 16) & 0xFF;
	xdmcp_data[j++] = (now >>  8) & 0xFF;
	xdmcp_data[j++] = (now >>  0) & 0xFF;
	while (j < 192 / 8)
	    xdmcp_data[j++] = 0;
	XdmcpWrap (xdmcp_data, auth_data + 8,
		      xdmcp_data, j);
	auth_data = xdmcp_data;
	auth_datalen = j;
    }
#endif /* HASXDMAUTH */
#ifdef SECURE_RPC
    /*
     * The SUN-DES-1 authorization protocol uses the
     * "secure RPC" mechanism in SunOS 4.0+.
     */
    if (auth_namelen == 9 && !strncmp(auth_name, "SUN-DES-1", 9)) {
	char servernetname[MAXNETNAMELEN + 1];

	/*
	 * Copy over the server's netname from the authorization
	 * data field filled in by XauGetAuthByAddr().
	 */
	if (auth_datalen > MAXNETNAMELEN) {
	    auth_datalen = 0;
	    auth_data = NULL;
	} else {
	    bcopy(auth_data, servernetname, auth_datalen);
	    servernetname[auth_datalen] = '\0';

	    auth_datalen = sizeof (rpc_cred);
	    if (auth_ezencode(servernetname, 100, rpc_cred,
			      &auth_datalen))
		auth_data = rpc_cred;
	    else
		auth_data = NULL;
	}
    }
#endif
    if (saddr) Xfree (saddr);
    if (*auth_namelenp = auth_namelen)
    {
	if (*auth_namep = Xmalloc(auth_namelen))
	    bcopy(auth_name, *auth_namep, auth_namelen);
	else
	    *auth_namelenp = 0;
    }
    else
	*auth_namep = NULL;
    if (*auth_datalenp = auth_datalen)
    {
	if (*auth_datap = Xmalloc(auth_datalen))
	    bcopy(auth_data, *auth_datap, auth_datalen);
	else
	    *auth_datalenp = 0;
    }
    else
	*auth_datap = NULL;
    if (authptr) XauDisposeAuth (authptr);
}


us, W, A
        comf    Sminus, W, A
        andwf   Trw, F, A
        return

; Print restart reason
RQ:
        call    CR
RQ_DIVZERO:
        btfss   BANKMASK(reset2), 0, A
        bra     RQ_STKFUL
        rcall   XSQUOTE
        db      1,'M'
        rcall   TYPE
RQ_STKFUL:
        btfss   BANKMASK(reset0), 7, A
        bra     RQ_STKUNF
        rcall   XSQUOTE
        db      1,"O"
        rcall   TYPE
RQ_STKUNF:
        btfss   BANKMASK(reset0), 6, A
        bra     RQ_BOR
        rcall   XSQUOTE
        db      1,"U"
        rcall   TYPE
RQ_BOR:
        btfsc   BANKMASK(reset1), 0, A       ; BOR
        bra     RQ_POR
        rcall   XSQUOTE
        db      1,"B"
        rcall   TYPE
RQ_POR:
        btfsc   BANKMASK(reset1), 1, A       ; POR
        bra     RQ_TO
        rcall   XSQUOTE
        db      1,"P"
        rcall   TYPE
RQ_TO:
#ifndef K42
        btfsc   BANKMASK(reset1), 3, A
#else
        btfsc   BANKMASK(reset1), 4, A         ; RWDT
#endif
        bra     RQ_RI
        rcall   XSQUOTE
        db      1,"W"
        rcall   TYPE
RQ_RI:
        btfsc   BANKMASK(reset1), 2, A         ; RI
        bra     RQ_END
        rcall   XSQUOTE
        db      1,"S"
        rcall   TYPE
RQ_END:
        return

; : mtst ( mask addr -- flag )
;   c@ and
; ;
        dw      L_MCLR
L_MTST:
        NF 4,mtst
MTST:
        rcall   CFETCH
        goto    AND_

;;; Fcy returns the cpu clock Fcy in KHz. Unsigned value.
        dw      L_MTST
L_CPUCLK:
        NF 3,Fcy
        rcall   LIT
        dw      clock / 4000
        return

        dw      L_CPUCLK
L_OPERATOR:
        NF 8,operator
OPERATOR:
        LIT8    OPERATOR_AREA
        return
OPERATOR_AREA:
        dw      u0+PRAM         ; User pointer
        dw      UADDSIZE, RETURN_STACK_SAVE_SIZE
        dw      ussize, utibsize

; I,   x --             append cell to Flash
;   IHERE ! 1 CELLS IALLOT ;
        dw      L_OPERATOR
L_ICOMMA:
        NF2     2,i
        db      ','
        align   2
ICOMMA:
        rcall   IHERE_P
        rcall   STORE
        rcall   CELL
        goto    IALLOT

;   IHERE ! 1 CHARS IALLOT ;
        dw      L_ICOMMA
L_ICCOMMA:
        NF2     3,ic
        db      ','
        align   2
ICCOMMA:
        rcall   IHERE_P
        rcall   CSTORE
        rcall   ONE
        goto    IALLOT

;   LSHIFT      x1 u -- x2
        dw      L_ICCOMMA
L_LSHIFT:
        NF 6,lshift
LSHIFT:
        swapf   Sminus, W, A
        movf    Sminus, W, A
        bz      LSHIFT2
        movwf   Tp, A
        swapf   Sminus, W, A
LSHIFT1:
        bcf     CARRY
        rlcf    Splus, F, A
        rlcf    Sminus, F, A

        decfsz  Tp, F, A
        bra     LSHIFT1
        swapf   plusS, W, A
LSHIFT2:
        return

;


ISTORY, this)
			.join("LEFT JOIN manga ON history.manga_id = manga.manga_id")
			.where("history.deleted_at = 0")
			.filters(filterOptions)
			.orderBy(
				orderBy = when (order) {
					ListSortOrder.LAST_READ -> "history.updated_at DESC"
					ListSortOrder.LONG_AGO_READ -> "history.updated_at ASC"
					ListSortOrder.NEWEST -> "history.created_at DESC"
					ListSortOrder.OLDEST -> "history.created_at ASC"
					ListSortOrder.PROGRESS -> "history.percent DESC"
					ListSortOrder.UNREAD -> "history.percent ASC"
					ListSortOrder.ALPHABETIC -> "manga.title"
					ListSortOrder.ALPHABETIC_REVERSE -> "manga.title DESC"
					ListSortOrder.NEW_CHAPTERS -> "IFNULL((SELECT chapters_new FROM tracks WHERE tracks.manga_id = manga.manga_id), 0) DESC"
					ListSortOrder.UPDATED -> "IFNULL((SELECT last_chapter_date FROM tracks WHERE tracks.manga_id = manga.manga_id), 0) DESC"
					else -> throw IllegalArgumentException("Sort order $order is not supported")
				},
			)
			.groupBy("history.manga_id")
			.limit(limit)
			.build(),
	)

	@Query("SELECT manga_id FROM history WHERE deleted_at = 0")
	abstract suspend fun findAllIds(): LongArray

	@Query(
		"""SELECT tags.* FROM tags
		LEFT JOIN manga_tags ON tags.tag_id = manga_tags.tag_id
		INNER JOIN history ON history.manga_id = manga_tags.manga_id
		WHERE history.deleted_at = 0
		GROUP BY manga_tags.tag_id
		ORDER BY COUNT(manga_tags.manga_id) DESC
		LIMIT :limit""",
	)
	abstract suspend fun findPopularTags(limit: Int): List<TagEntity>

	@Query("SELECT manga.source AS count FROM history LEFT JOIN manga ON manga.manga_id = history.manga_id GROUP BY manga.source ORDER BY COUNT(manga.source) DESC LIMIT :limit")
	abstract suspend fun findPopularSources(limit: Int): List<String>

	@Query("SELECT * FROM history WHERE manga_id = :id AND deleted_at = 0")
	abstract suspend fun find(id: Long): HistoryEntity?

	@Query("SELECT * FROM history WHERE manga_id = :id AND deleted_at = 0")
	abstract fun observe(id: Long): Flow<HistoryEntity?>

	@Query("SELECT COUNT(*) FROM history WHERE deleted_at = 0")
	abstract fun observeCount(): Flow<Int>

	@Query("SELECT COUNT(*) FROM history WHERE deleted_at = 0")
	abstract suspend fun getCount(): Int

	@Query("SELECT percent FROM history WHERE manga_id = :id AND deleted_at = 0")
	abstract suspend fun findProgress(id: Long): Float?

	fun dump(): Flow<HistoryWithManga> = flow {
		val window = 10
		var offset = 0
		while (currentCoroutineContext().isActive) {
			val list = findAll(offset, window)
			if (list.isEmpty()) {
				break
			}
			offset += window
			list.forEach { emit(it) }
		}
	}

	@Insert(onConflict = OnConflictStrategy.IGNORE)
	abstract suspend fun insert(entity: HistoryEntity): Long

	@Query(
		"UPDATE history SET page = :page, chapter_id = :chapterId, scroll = :scroll, percent = :percent, updated_at = :updatedAt, chapters = :chapters, deleted_at = 0 WHERE manga_id = :mangaId",
	)
	abstract suspend fun update(
		mangaId: Long,
		page: Int,
		chapterId: Long,
		scroll: Float,
		percent: Float,
		chapters: Int,
		updatedAt: Long,
	): Int

	suspend fun delete(mangaId: Long) = setDeletedAt(manga


get_x(simd4f_dot3(lhs, rhs));
}

vectorial_inline simd4f simd4f_cross3(simd4f lhs, simd4f rhs) {

    const simd4f lyzx = _mm_shuffle_ps(lhs, lhs, _MM_SHUFFLE(3,0,2,1));
    const simd4f lzxy = _mm_shuffle_ps(lhs, lhs, _MM_SHUFFLE(3,1,0,2));

    const simd4f ryzx = _mm_shuffle_ps(rhs, rhs, _MM_SHUFFLE(3,0,2,1));
    const simd4f rzxy = _mm_shuffle_ps(rhs, rhs, _MM_SHUFFLE(3,1,0,2));

    return _mm_sub_ps(_mm_mul_ps(lyzx, rzxy), _mm_mul_ps(lzxy, ryzx));

}

vectorial_inline simd4f simd4f_shuffle_wxyz(simd4f s) { return _mm_shuffle_ps(s,s, _MM_SHUFFLE(2,1,0,3) ); }
vectorial_inline simd4f simd4f_shuffle_zwxy(simd4f s) { return _mm_shuffle_ps(s,s, _MM_SHUFFLE(1,0,3,2) ); }
vectorial_inline simd4f simd4f_shuffle_yzwx(simd4f s) { return _mm_shuffle_ps(s,s, _MM_SHUFFLE(0,3,2,1) ); }

vectorial_inline simd4f simd4f_zero_w(simd4f s) {
    simd4f r = _mm_unpackhi_ps(s, _mm_setzero_ps());
    return _mm_movelh_ps(s, r);
}

vectorial_inline simd4f simd4f_zero_zw(simd4f s) {
    return _mm_movelh_ps(s, _mm_setzero_ps());
}

vectorial_inline simd4f simd4f_merge_high(simd4f xyzw, simd4f abcd) {
    return _mm_movehl_ps(abcd, xyzw);
}

typedef simd4f_aligned16 union {
    unsigned int ui[4];
    float f[4];
} _simd4f_uif;

vectorial_inline simd4f simd4f_flip_sign_0101(simd4f s) {
    const _simd4f_uif upnpn = { { 0x00000000, 0x80000000, 0x00000000, 0x80000000 } };
    return _mm_xor_ps( s, _mm_load_ps(upnpn.f) );
}

vectorial_inline simd4f simd4f_flip_sign_1010(simd4f s) {
    const _simd4f_uif unpnp = { { 0x80000000, 0x00000000, 0x80000000, 0x00000000 } };
    return _mm_xor_ps( s, _mm_load_ps(unpnp.f) );
}

vectorial_inline simd4f simd4f_min(simd4f a, simd4f b) {
    return _mm_min_ps( a, b );
}

vectorial_inline simd4f simd4f_max(simd4f a, simd4f b) {
    return _mm_max_ps( a, b );
}

#ifdef __cplusplus
}
#endif

#endif


   Type::Signed(_) |
            Type::Unsigned(_) => MatchKind::Number,
            Type::Boolean => MatchKind::Boolean,
            Type::String | Type::Bytes => MatchKind::String,
            Type::Any => MatchKind::Any,
            Type::Custom(_) | Type::Map(_, _) => MatchKind::Object,
            Type::Array(_) => MatchKind::Array,
        }
    }

    pub fn push(&mut self, member: Token<MatchMember>) -> Result<()> {
        match member.condition.inner {
            MatchCondition::Type(ref variable) => {
                let match_kind = self.identify_match_kind(variable);

                {
                    // conflicting when type matches
                    let result =
                        self.by_type.iter().find(|e| e.0 == match_kind || e.0 == MatchKind::Any);

                    if let Some(&(_, ref existing_value)) = result {
                        let err = ErrorKind::MatchConflict(member.condition.pos.clone(),
                                                           existing_value.condition.pos.clone());
                        return Err(err.into());
                    }
                }

                self.by_type.push((match_kind, member.clone()));
            }
            MatchCondition::Value(ref value) => {
                {
                    // conflicting when value matches
                    let result = self.by_value.iter().find(|e| e.0.inner == value.inner);

                    if let Some(&(_, ref existing_value)) = result {
                        let err = ErrorKind::MatchConflict(member.condition.pos.clone(),
                                                           existing_value.condition.pos.clone());
                        return Err(err.into());
                    }
                }

                self.by_value.push((value.clone(), member.clone()));
            }
        }

        Ok(())
    }
}
use crate::co;
use crate::comctl::decl::{NMMOUSE, NMTREEVIEW, NMTVCUSTOMDRAW};
use crate::gui::base::Base;
use crate::gui::events::base_events_proxy::BaseEventsProxy;
use crate::kernel::decl::ErrResult;

/// Exposes tree view control
/// [notifications](https://docs.microsoft.com/en-us/windows/win32/controls/bumper-tree-view-control-reference-notifications).
///
/// These event methods are just proxies to the
/// [`WindowEvents`](crate::gui::events::WindowEvents) of the parent window, who
/// is the real responsible for the child event handling.
///
/// You cannot directly instantiate this object, it is created internally by the
/// control.
#[cfg_attr(docsrs, doc(cfg(feature = "gui")))]
pub struct TreeViewEvents(BaseEventsProxy);

impl TreeViewEvents {
	pub(in crate::gui) fn new(parent_base: &Base, ctrl_id: u16) -> Self {
		Self(BaseEventsProxy::new(parent_base, ctrl_id))
	}

	pub_fn_nfy_withparm_noret! { tvn_delete_item, co::TVN::DELETEITEM, NMTREEVIEW,
		/// [`TVN_DELETEITEM`](https://docs.microsoft.com/en-us/windows/win32/controls/tvn-deleteitem)
		/// notification.
	}

	pub_fn_nfy_withparm_noret! { tvn_item_changed, co::TVN::ITEMCHANGED, NMTREEVIEW,
		/// [`TVN_ITEMCHANGED`](https://docs.microsoft.com/en-us/windows/win32/controls/tvn-itemchanged)
		/// notification.
	}

	pub_fn_nfy_withparm_boolret! { tvn_item_changing, co::TVN::ITEMCHANGING, NMTREEVIEW,


}
  const placeholder = getLocaleDatePlaceholder(locale);
  if (!placeholder) {
    return undefined;
  }

  // The placeholder without any non-digit characters on the end
  const strippedPlaceholder = placeholder.replace(/[^ymd]+$/g, '');

  const keyToSegment: { [id: string]: DateSegment } = {
    d: 'day',
    m: 'month',
    y: 'year',
  };

  const firstSegment: DateSegment = keyToSegment[strippedPlaceholder[0]];
  const lastSegment: DateSegment =
    keyToSegment[strippedPlaceholder[strippedPlaceholder.length - 1]];
  const allPossibleSegments: DateSegment[] = ['day', 'month', 'year'];
  const middleSegment: DateSegment = allPossibleSegments.filter(
    (s) => s !== firstSegment && s !== lastSegment,
  )[0];

  if (isCursorInFirstDateSegment(position, date)) {
    return firstSegment;
  }
  if (isCursorInLastDateSegment(position, date)) {
    return lastSegment;
  }
  return middleSegment;
}

/**
 * Generate a placeholder date string for a given locale
 * eg: locale 'hu-HU' -> 'yyyy. mm. dd.'
 * @param locale A locale string supported by Intl.DateTimeFormat
 * @returns A placeholder string. d=1 or 2 digit day, dd=zero padded
 * day, same for month but letter m, yyyy=year
 */
export function getLocaleDatePlaceholder(locale: string): string | undefined {
  const uniqueDateType: DateType = {
    day: 7,
    month: 1,
    year: 1992,
  };

  const localisedDateString = formatDateType(uniqueDateType, locale);

  const shortDateFormat = localisedDateString.replace(
    /\d+/g,
    (str: string): string => {
      if (!str) {
        return '';
      }
      var num = parseInt(str);
      switch (num % 100) {
        case 92:
          return str.replace(/.{1}/g, 'y');
        case 1:
          return str.length === 1 ? 'm' : 'mm';
        case 7:
          return str.length === 1 ? 'd' : 'dd';
      }
      return '';
    },
  );
  return shortDateFormat;
}

/**
 * Adjust date segment up or down. Eg. If day is the active segment and adjustment is -1,
 * reduce the day by one.
 * @param date Valid datetype
 * @param activeSegment which part of the date is selected/being adjusted
 * @param adjustment how many units the segment is being adjusted (can be pos or neg, usually 1 or -1)
 */
export function adjustDate(
  date: DateType,
  activeSegment: DateSegment,
  adjustment: number,
): DateType {
  const originalDate: Date = dateTypeToDate(date);

  const newDate: Date =
    activeSegment === 'day'
      ? addDays(originalDate, adjustment)
      : activeSegment === 'month'
      ? addMonths(originalDate, adjustment)
      : addYears(originalDate, adjustment);

  return dateToDateType(newDate);
}

export function isToday(date: DateType | undefined) {
  const today = new Date();
  return (
    date !== undefined &&
    today.getDate() === date.day &&
    date.month === today.getMonth() + 1 &&
    date.year === today.getFullYear()
  );
}

// 用户
export const


sig3s4e
sig3sp
sig5sto
si4k3ab
si4kad
si4k3ae
si4k3a4g
si4k3ak
si4kalb
si4kana
si4k5ans
si6kanth
si4kanw
si4k3ar
sik5asp
sik5ass
si2k3ä
si4k3el
si4k5ens
si6k5erei
sik5erfo
si6k5erke
si4k5er4z
si2k3i2
sikin3
si2k3l
sik5le
si2k3n
siko3n
siko3s
si2kö
si2k3r
sik3s
sikt2
si2ku
si2kü
s2il
3silb
silber5e
sil4br
sil3c
3sili
2s3ill
si4mag
2s3imb
2s3imm
4s3impf
sim4st
3s4imu
si3n2a
si5nau
s3ind
4sindu
sines4
4s3infe
4s5infor
4s3infr
sin4gae
sin4g5an
sin5g6le.
sin4glo
sin4g3r
sings4
sing5sa
sing5sc
sing5so
2s3inh
sini5er.
4s3i4n3it
3sinn.
s5innenm
s5inner4
sin6nerf
3sinnl
4s3inno
3sinns
2s3inq
2s3ins
3s4ins.
sin4th
s4into
2s3inv
2s3inz
si4onm
sion4s
si3os
3sip
s2ir
2s3irr
si4sam
3sisc
si4scha
si4schl
si4schn
si4schu
si4schw
si2s3e2
sisen3
sis3i
si4sin
si4sis
sismu4
si2so
sis3or
siss2
3s4ist
si2su
3s2it
si4tal
si4tau
si4tra
si4t3re
sit3s
sit4zel
sit6z5erm
siv3a
si4val
si4van
sive3
si4v5er4f
si4vin
siv3o2
si4vor
si2vr
1sí
2sj
s3jo
s1k2
2sk.
2skab
2skae
ska3la
2skam
5skanda
2skap
2s3kar
2s3kas
4skata
ska4te.
4skateg
s4kater
ska4tes
ska4to
ska4t3r
2skau
2skä
2skb
ske4l3i
2ske2n
sken3e
3s2kep
ske3ra
s4ketc
s3kh
3s2ki.
s2kia
3s2kif
s2kig
3s2kik
2skin
s2kip
2skir
3s4kire
s4kis.
3skiv
3skiz
s3klam
4sklas
s4klav
5sklave
2sklu
2skn
4skoe
sko3ef
2skoh
2skol
4s3kom
4s3kon
3skop.
s4kopa
sko4par
s4kope
s4ko4pr
2skow
2skö
2s3kra
skraf4
2s3kre
s4krib
4skris
4skrit
2s3kro
2skru
2sk3s
sk3t
skto4
s3kue
3skulp
2s3kun
skun6dei
s3kur
2s3k


-05~~ | 中国农业科学院 | [2025年中国农业科学院油料作物研究所2025年优秀大学生夏令营活动通知](http://www.oilcrops.com.cn/ggxx/0f30ab00c109447db5ef7fe52dad0951.htm) |
| ~~2025-08-01~~ | 东南大学 | [2025年东南大学医学院2025年全国优秀大学生夏令营活动报名通知](https://med.seu.edu.cn/2025/0701/c8756a534744/page.htm) |
| ~~2025-08-01~~ | 中国科学院大学 | [2025年中国科学院上海药物研究所“新药梦”优秀大学生夏令营营员招募通知](https://simm.cas.cn/web/yjsjy/zsgz/xdly/202504/t20250424_7611069.html) |
| ~~2025-07-31~~ | 复旦大学 | [2025年复旦大学基础医学院2025年全国优秀大学生夏令营报名通知](https://basicmed.fudan.edu.cn/43/f3/c30927a738291/page.htm) |
| ~~2025-07-31~~ | 中山大学 | [2025年中山大学附属第六医院关于举办2025年全国优秀大学生夏令营活动的通知](https://www.zs6y.com/page/web/pc/index.html#/teachingProject/145?researchProjectId=2002) |
| ~~2025-07-31~~ | 东南大学 | [2025年东南大学公共卫生学院2025年全国优秀大学生夏令营活动报名通知](https://gw.seu.edu.cn/2025/0626/c15732a534463/page.htm) |
| ~~2025-07-31~~ | 南京中医药大学 | [2025年南京中医药大学药学院2025年优秀大学生暑期开放日通知](https://yxy.njucm.edu.cn/2025/0724/c2989a158973/pagem.htm) |
| ~~2025-07-31~~ | 安徽医科大学 | [2025年安徽医科大学口腔医学院2025年全国优秀大学生暑期夏令营招生通知](https://mp.weixin.qq.com/s/xZVeeGgmWyZcv5_lWvszpw) |
| ~~2025-07-30~~ | 电子科技大学 | [2025年电子科技大学附属肿瘤医院四川省肿瘤医院2025年优秀大学生暑期开放日活动](https://mp.weixin.qq.com/s/hECimOhaqRx22cwMejOcuQ) |
| ~~2025-07-30~~ | 河南医药大学 | [2025年


	.align		32
	.globl		__flush_tlb_kernel_range
__flush_tlb_kernel_range:	/* %o0=start, %o1=end */
	cmp		%o0, %o1
	be,pn		%xcc, 2f
	 sethi		%hi(PAGE_SIZE), %o4
	sub		%o1, %o0, %o3
	sub		%o3, %o4, %o3
	or		%o0, 0x20, %o0		! Nucleus
1:	stxa		%g0, [%o0 + %o3] ASI_DMMU_DEMAP
	stxa		%g0, [%o0 + %o3] ASI_IMMU_DEMAP
	membar		#Sync
	brnz,pt		%o3, 1b
	 sub		%o3, %o4, %o3
2:	retl
	 flush		%g6

__spitfire_flush_tlb_mm_slow:
	rdpr		%pstate, %g1
	wrpr		%g1, PSTATE_IE, %pstate
	stxa		%o0, [%o1] ASI_DMMU
	stxa		%g0, [%g3] ASI_DMMU_DEMAP
	stxa		%g0, [%g3] ASI_IMMU_DEMAP
	flush		%g6
	stxa		%g2, [%o1] ASI_DMMU
	flush		%g6
	retl
	 wrpr		%g1, 0, %pstate

/*
 * The following code flushes one page_size worth.
 */
#if (PAGE_SHIFT == 13)
#define ITAG_MASK 0xfe
#elif (PAGE_SHIFT == 16)
#define ITAG_MASK 0x7fe
#else
#error unsupported PAGE_SIZE
#endif
	.align		32
	.globl		__flush_icache_page
__flush_icache_page:	/* %o0 = phys_page */
	sethi		%hi(1 << 13), %o2	! IC_set bit
	mov		1, %g1
	srlx		%o0, 5, %o0
	clr		%o1			! IC_addr
	sllx		%g1, 36, %g1
	ldda		[%o1] ASI_IC_TAG, %o4
	sub		%g1, 1, %g2
	or		%o0, %g1, %o0		! VALID+phys-addr comparitor

	sllx		%g2, 1, %g2
	andn		%g2, ITAG_MASK, %g2	! IC_tag mask
	nop
	nop
	nop
	nop
	nop
	nop

1:	addx		%g0, %g0, %g0
	ldda		[%o1 + %o2] ASI_IC_TAG, %g4
	addx		%g0, %g0, %g0
	and		%o5, %g2, %g3
	cmp		%g3, %o0
	add		%o1, 0x20, %o1
	ldda		[%o1] ASI_IC_TAG, %o4
	be,pn		%xcc, iflush1

2:	 nop
	and		%g5, %g2, %g5
	cmp		%g5, %o0
	be,pn		%xcc, iflush2
3:	 cmp		%o1, %o2
	bne,pt		%xcc, 1b
	 addx		%g0, %g0, %g0
	nop

	retl
	 ldx		[%g6 + TI_TASK], %g4

iflush1:sub		%o1, 0x20, %g3
	stxa		%g0, [%g3] ASI_IC_TAG
	flush		%g6
	ba,a,pt		%xcc, 2b
iflush2:sub		%o1, 0x20, %g3
	stxa		%g0, [%o1 + %o2] ASI_IC_TAG
	flush		%g6
	ba,a,pt