GONE
    }

    private fun hideProgress()
    {
        this.progressBar.visibility = View.GONE
        this.recyclerView.visibility = View.VISIBLE
    }

    private fun showSearchResult(result : List<String>)
    {
        this.adapter.dataList = if(result.isEmpty()) listOf("No Result!") else result
    }

    private fun createButtonObservable() = Observable.create<String>{
        this.buttonSearch.setOnClickListener{ _ ->
            this.hideKeyboard()
            it.onNext(this.textSearch.text.toString())
        }
        it.setCancellable {
            this.buttonSearch.setOnClickListener(null)
        }
    }

    private fun createTextWatchObservable(minLength: Int = 2, delayTime: Long = 1000) = Observable.create<String> {
        val textWatcher = object: TextWatcher {
            override fun afterTextChanged(s: Editable?) = Unit
            override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) = Unit
            override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int)
            {
                s?.toString()?.run { it.onNext(this) }
            }
        }
        this.textSearch.addTextChangedListener(textWatcher)
        it.setCancellable { this.textSearch.removeTextChangedListener(textWatcher) }
    }.filter{ it.length >= minLength }.debounce(delayTime, TimeUnit.MILLISECONDS)

    override fun onStop()
    {
        if (this.disposable?.isDisposed == false)
        {
            this.disposable?.isDisposed
        }
        super.onStop()
    }
}

class ItemViewHolder(itemView: View): RecyclerView.ViewHolder(itemView)
{
    fun bind(text: String)
    {
        (this.itemView as TextView).text = text
    }
}

class ListAdapter : RecyclerView.Adapter<ItemViewHolder>()
{
    var dataList = emptyList<String>()
        set(value)
        {
            field = value
            this.notifyDataSetChanged()
        }

    override fun getItemCount() = this.dataList.size
    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ItemViewHolder(TextView(parent.context).apply {
        this.textSize = 24.0f
        this.topPadding = 8
        this.bottomPadding = 8
    })

    override fun onBindViewHolder(holder: ItemViewHolder, position: Int) = holder.bind(this.dataList[position])
}
package me.liuqingwen.android.projectandroidtest

import io.mockk.*
import me.liuqingwen.android.projectandroidtest.data.InMemoryNotesRepository
import me.liuqingwen.android.projectandroidtest.data.InMemoryNotesServiceApi
import me.liuqingwen.android.projectandroidtest.data.Note
import org.junit.Before
import org.junit.Ignore
import org.junit.Test

/**
 * Created by Qingwen on 2018-6-18, project: ProjectAndroidTest.
 *
 * @Author: Qingwen
 * @DateTime: 2018-6-18
 * @Package: me.liuqingwen.android.projectandroidtest in project: ProjectAndroidTest
 *
 * Notice: If you are using this class or file, check it and do some modification.
 */

class InMemoryNotesRepositoryTest
{
    private lateinit var repository : InMemoryNotesRepository

    private val service = mockk<InMemoryNotesServiceApi>()

    private val loadCallback = slot<(List<Note>) -> Unit>()
    private val noteCallback = slot<(Note?) -> Unit>()
    private val saveCallback = slot<(Boolean) -> Unit>()

    @Before
    fun setupRepository()
    {
        this.repository = InMemoryNotesRepository(this.service)
    }

    @Test
    fun test_get_all_notes()


ree-view-item[data-selected="true"] {
	background: var(--color-selected-bg);
	color: var(--color-selected-text);
}

.tree-view:focus-within .tree-view-item[data-selected="true"] :global(.hoc-item) {
	background: var(--color-hoc-selected-bg);
	color: var(--color-hoc-selected-text);
}

.tree-view:focus-within .tree-view-item[data-selected="true"]::after {
	background: var(--color-selected-bg);
}

.tree-view .tree-view-item[data-selected="true"]::after {
	background: var(--color-selected-inactive-bg);
}

.tree-view-item[data-selected="true"] {
	background: var(--color-selected-inactive-bg);
	color: var(--color-selected-inactive-text);
}

.tree-view-item:not([data-selected="true"]):hover {
	background: var(--color-hover);
}

.tree-view-item:not([data-selected="true"]):hover::after {
	background: var(--color-hover);
}

.tree-view-item-header {
	display: inline-flex;
	align-items: center;
	height: 100%;
	cursor: default;
	padding: 0 0.25rem;
}

.tree-view-collapse {
	width: 1.25rem;
	height: 1.25rem;
	background: none;
	border: none;
	outline: none;
	color: var(--color-toggle);
	z-index: 100;
	display: inline-flex;
	justify-content: center;
	align-content: center;
	padding: 0.2em 0.13em;
	transform: rotate(0);
	transition: transform 0.3s;
}

.tree-view-item[data-selected="true"] .tree-view-collapse {
	color: var(--color-toggle-selected);
}

[data-collapsed="true"].tree-view-collapse svg {
	transform: rotate(-90deg);
}

.tree-view-no-collapse {
	width: 1.25rem;
	height: 1.25rem;
}

.tree-view-name {
	font-size: var(--font-xsmall);
}

.tree-view-dimmer {
	background: var(--color-dim-bg);
	position: absolute;
	left: 0;
	right: 0;
	pointer-events: none;
	opacity: 0.5;
	z-index: -1;
}

.tree-view:focus-within .tree-view-dimmer {
	background: var(--color-dim-active-bg);
}

.tree-view-key-label {
	color: var(--color-key-label);
}

.tree-view:not(:focus-within) [data-selected="true"] .tree-view-key-label {
	color: var(--color-key-label-selected-no-focus);
}
.tree-view:focus-within [data-selected="true"] .tree-view-key-label {
	color: var(--color-key-label-selected);
}

.tree-view-key {
	color: var(--color-key-value);
}

.tree-view:not(:focus-within) [data-selected="true"] .tree-view-key {
	color: var(--color-key-value-selected);
}
.tree-view:focus-within [data-selected="true"] .tree-view-key {
	color: var(--color-key-value-selected-focus);
}

/* Marker */
.mark {
	background: var(--color-marker);
}
.mark[data-marked="true"] {
	background:


LA'
  },
  {
    '_id': '70517',
    'city': 'HENDERSON',
    'loc': [-91.90589900000001, 30.274955],
    'pop': 9596,
    'state': 'LA'
  },
  {
    '_id': '70518',
    'city': 'BROUSSARD',
    'loc': [-91.950171, 30.12189],
    'pop': 8159,
    'state': 'LA'
  },
  {
    '_id': '70520',
    'city': 'CARENCRO',
    'loc': [-92.042265, 30.324433],
    'pop': 12256,
    'state': 'LA'
  },
  {
    '_id': '70525',
    'city': 'CHURCH POINT',
    'loc': [-92.22395400000001, 30.401287],
    'pop': 11108,
    'state': 'LA'
  },
  {
    '_id': '70526',
    'city': 'CROWLEY',
    'loc': [-92.377709, 30.214753],
    'pop': 17975,
    'state': 'LA'
  },
  {
    '_id': '70528',
    'city': 'DELCAMBRE',
    'loc': [-91.988938, 29.947414],
    'pop': 2769,
    'state': 'LA'
  },
  {
    '_id': '70529',
    'city': 'DUSON',
    'loc': [-92.152455, 30.191216],
    'pop': 7160,
    'state': 'LA'
  },
  {
    '_id': '70531',
    'city': 'EGAN',
    'loc': [-92.500226, 30.250966],
    'pop': 359,
    'state': 'LA'
  },
  {
    '_id': '70532',
    'city': 'ELTON',
    'loc': [-92.699614, 30.471496],
    'pop': 1973,
    'state': 'LA'
  },
  {
    '_id': '70533',
    'city': 'ERATH',
    'loc': [-92.034266, 29.952237],
    'pop': 7280,
    'state': 'LA'
  },
  {
    '_id': '70535',
    'city': 'EUNICE',
    'loc': [-92.39847399999999, 30.51158],
    'pop': 21409,
    'state': 'LA'
  },
  {
    '_id': '70537',
    'city': 'EVANGELINE',
    'loc': [-92.55324400000001, 30.26829],
    'pop': 475,
    'state': 'LA'
  },
  {
    '_id': '70538',
    'city': 'FRANKLIN',
    'loc': [-91.50264300000001, 29.785656],
    'pop': 15334,
    'state': 'LA'
  },
  {
    '_id': '70542',
    'city': 'GUEYDAN',
    'loc': [-92.533779, 30.025541],
    'pop': 3839,
    'state': 'LA'
  },
  {
    '_id': '70543',
    'city': 'IOTA',
    'loc': [-92.532201, 30.300081],
    'pop': 5338,
    'state': 'LA'
  },
  {
    '_id': '70544',
    'city': 'JEANERETTE',
    'loc': [-91.654397, 29.90324],
    'pop': 14068,
    'state': 'LA'
  },
  {
    '_id': '70546',
    'city': 'JENNINGS',
    'loc': [-92.657405, 30.22011],


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

#include <nvif/push906f.h>

/*XXX: Fixup class to be compatible with NVIDIA's, which will allow sharing
 *     code with KeplerDmaCopyA.
 */

int
nvc0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
		  struct ttm_resource *old_reg, struct ttm_resource *new_reg)
{
	struct nouveau_mem *mem = nouveau_mem(old_reg);
	struct nvif_push *push = chan->chan.push;
	u64 src_offset = mem->vma[0].addr;
	u64 dst_offset = mem->vma[1].addr;
	u32 page_count = new_reg->num_pages;
	int ret;

	page_count = new_reg->num_pages;
	while (page_count) {
		int line_count = (page_count > 8191) ? 8191 : page_count;

		ret = PUSH_WAIT(push, 10);
		if (ret)
			return ret;

		PUSH_NVSQ(push, NV90B5, 0x030c, upper_32_bits(src_offset),
					0x0310, lower_32_bits(src_offset),
					0x0314, upper_32_bits(dst_offset),
					0x0318, lower_32_bits(dst_offset),
					0x031c, PAGE_SIZE,
					0x0320, PAGE_SIZE,
					0x0324, PAGE_SIZE,
					0x0328, line_count);
		PUSH_NVIM(push, NV90B5, 0x0300, 0x0110);

		page_count -= line_count;
		src_offset += (PAGE_SIZE * line_count);
		dst_offset += (PAGE_SIZE * line_count);
	}

	return 0;
}


דד עם ילדים אשר חווים בעיות התפתחות, תקשורת והסתגלות קשות. (שיטה זו מתבצעת רק ע"י יועץ מוסמך בשיטת טומטיס)"'},
    ]

  },
  { "id": 23,
    pictures:"img/serv/service24.jpg",
    "title":"קשיי למידה",
    "paraqraph":"",
    paragraph2:[
      {list:'"מזרז את התפתחות הילד."'},
      {list:'"מפחית בעיות של אי יכולת למידה"'},
      {list:'"משפר את השמיעה הפונטית."'},
      {list:'"עוזר ברכישת שפה זרה ויכולת לדבר ללא מבטא."'},
      {list:'"מזרז הסתגלות בסביבה חדשה."'},
      {list:'"עוזר לפתח שמיעה מוזיקאלית ויכולת שירה."'},
      {list:'"משפר את הריכוז והזיכרון."'},
      {list:'"עוזר לפתח מיומנויות תקשורת ויצירתיות."'},
      {list:'"מסייע בהתמודדות במצבי לחץ ודיכאון."'},
    ]

  },
  { "id": 24,
    pictures:"img/serv/service25.jpg",
    "title":"חוסר ריכוז",
    "paraqraph": " ",
    paragraph2:[
      {list:'"עוזר לפתח מיומנויות תקשורת ויצירתיות."'},
      {list:'"מאפשר השפעה לא תרופתית על קשרים עצביים."'},
      {list:'"משפר את הריכוז והזיכרון."'},
      {list:'"משפר את יכולת ההקשבה וכתוצאה מכך ההבנה."'},

    ]

  },
  { "id": 25,
    pictures:"img/serv/service26.jpg",
    "title":"חוסר קואורדינציה",
    "paraqraph": " בעזרת השפעה ישירה על שריר האיזון, שיטת טומטיס משפיעה על:",
    paragraph2:[
      {list:'"רגולציית שריר הטונוס"'},
      {list:'"איזון"'},
      {list:'"תפעול הקואורדינציה"'},
      {list:'"תפעול החוש הקיצבי "'},

    ]
  },
  { "id": 26,
    pictures:"img/serv/service27.jpg",
    "title":"תסמונת �


r/testify/mock"

	es "github.com/jaegertracing/jaeger/pkg/es"
)

// IndexService is an autogenerated mock type for the IndexService type
type IndexService struct {
	mock.Mock
}

// Add provides a mock function with given fields:
func (_m *IndexService) Add() {
	_m.Called()
}

// BodyJson provides a mock function with given fields: body
func (_m *IndexService) BodyJson(body interface{}) es.IndexService {
	ret := _m.Called(body)

	var r0 es.IndexService
	if rf, ok := ret.Get(0).(func(interface{}) es.IndexService); ok {
		r0 = rf(body)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(es.IndexService)
		}
	}

	return r0
}

// Id provides a mock function with given fields: id
func (_m *IndexService) Id(id string) es.IndexService {
	ret := _m.Called(id)

	var r0 es.IndexService
	if rf, ok := ret.Get(0).(func(string) es.IndexService); ok {
		r0 = rf(id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(es.IndexService)
		}
	}

	return r0
}

// Index provides a mock function with given fields: index
func (_m *IndexService) Index(index string) es.IndexService {
	ret := _m.Called(index)

	var r0 es.IndexService
	if rf, ok := ret.Get(0).(func(string) es.IndexService); ok {
		r0 = rf(index)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(es.IndexService)
		}
	}

	return r0
}

// Type provides a mock function with given fields: typ
func (_m *IndexService) Type(typ string) es.IndexService {
	ret := _m.Called(typ)

	var r0 es.IndexService
	if rf, ok := ret.Get(0).(func(string) es.IndexService); ok {
		r0 = rf(typ)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(es.IndexService)
		}
	}

	return r0
}
// Copyright (c) 2019 The Jaeger 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 tlscfg

import (
	"flag"

	"github.com/spf13/viper"
)

const (
	tlsPrefix         = ".tls"
	tlsEnabledOld     = tlsPrefix
	tlsEnabled        = tlsPrefix + ".enabled"
	tlsCA             = tlsPrefix + ".ca"
	tlsCert           = tlsPrefix + ".cert"
	tlsKey            = tlsPrefix + ".key"
	tlsServerName     = tlsPrefix + ".server-name"
	tlsClientCA       = tlsPrefix + ".client-ca"
	tlsClientCAOld    = tlsPrefix + ".client.ca"
	tlsSkipHostVerify = tlsPrefix + ".skip-host-verify"
)

// ClientFlagsConfig describes which CLI flags for TLS client should be generated.
type ClientFlagsConfig struct {
	Prefix         string
	ShowEnabled    bool
	ShowServerName bool
}

// ServerFlagsConfig describes which CLI flags for TLS server should be generated.
type ServerFlags


null | null | null | null'
		'PROPERTY_NAME=#BED6FF | null | null | null | null | null'
		'PROPERTY_VALUE=#FFC600 | null | null | null | null | null'
		'PSEUDO=#FFFFFF | null | null | null | null | null'
		'SELECTOR=#FFFFFF | null | null | null | null | null'
		'SEMI_COLON=#D8D8D8 | null | null | null | null | null'
		'STRING=#FFC600 | null | null | null | null | null'
		'UNIVERSAL=#FFFFFF | null | null | null | null | null'
		'URI=#FFC600 | null | null | null | null | null'
}
IEclipsePreferences#org-eclipse-wst-dtd-ui {
	preferences:
		'dtdKeyword=#8DCBE2 | null | null | null | null | null'
		'dtdTag=#BED6FF | null | null | null | null | null'
		'dtdString=#FFC600 | null | null | null | null | null'
		'dtdTagName=#BED6FF | null | null | null | null | null'
		'dtdDefault=#D8D8D8 | null | null | null | null | null'
		'dtdData=#D8D8D8 | null | null | null | null | null'
		'dtdSymbol=#BED6FF | null | null | null | null | null'
		'dtdComment=#C7DD0C | null | null | false | null | null'
}
IEclipsePreferences#org-eclipse-wst-html-ui {
	preferences:
		'commentBorder=#C7DD0C | null | null | false | null | null'
		'commentText=#C7DD0C | null | null | false | null | null'
		'declBoder=#FFFFFF | null | null | null | null | null'
		'doctypeExternalId=#FFFFFF | null | null | null | null | null'
		'doctypeExternalPubref=#FFFFFF | null | null | null | null | null'
		'doctypeExtrenalSysref=#FFFFFF | null | null | null | null | null'
		'doctypeName=#FFFFFF | null | null | null | null | null'
		'entityReference=#8DCBE2 | null | null | null | null | null'
		'tagAttributeEquals=#D8D8D8 | null | null | null | null | null'
		'tagAttributeName=#BED6FF | null | null | null | null | null'
		'tagAttributeValue=#FFC600 | null | null | null | null | null'
		'tagBorder=#79ABFF | null | null | null | null | null'
		'tagName=#BED6FF | null | null | null | null | null'
		'xmlContent=#D8D8D8 | null | null | null | null | null'
}
IEclipsePreferences#org-eclipse-wst-jsdt-ui {
	preferences:
		'CONTENT_ASSIST_BACKGROUND_COLOR=46,52,56'
		'CONTENT_ASSIST_FOREGROUND_COLOR=233,235,237'
		'content_assist_parameters_background=46,52,56'
		'content_assist_parameters_foreground=233,235,237'
		'content_assist_proposals_background=46,52,56'
		'content_assist_proposals_foreground=233,235,237'
		'java_bracket=216,216,216'
		'java_comment_task_tag=204,223,50'
		'java_default=216,216,216'
		'java_doc_default=204,223,50'
		'java_doc_keyword=217,229,119'
		'java_doc_link=217,229,119'
		'java_doc_tag=217,229,119'
		'java_keyword


size(); i++)
    {
        ui->comboBox_Audio_Device->addItem(vis_ptr->audio_devices[i]);
    }
    ui->comboBox_Audio_Device->setCurrentIndex(vis_ptr->audio_device_idx);
    ui->comboBox_Audio_Device->blockSignals(false);

    ui->checkBox_Reactive_Background->setChecked(vis_ptr->reactive_bkgd);
    ui->checkBox_Silent_Background->setChecked(vis_ptr->silent_bkgd);

    timer = new QTimer(this);
    connect(timer, SIGNAL(timeout()), this, SLOT(update()));
    timer->start(15);

    image = new QImage(256, 64, QImage::Format_RGB32);
    scene = new QGraphicsScene(this);
    ui->graphicsView_Visualization_Preview->setScene(scene);
}

void KeyboardVisDlg::StartMinimized(boolean startmin)
{
    startminimized = startmin;
}

void KeyboardVisDlg::on_lineEdit_Amplitude_textChanged(const QString &arg1)
{
    vis_ptr->amplitude = arg1.toInt();
    vis_ptr->OnSettingsChanged();
}

void KeyboardVisDlg::on_lineEdit_Background_Brightness_textChanged(const QString &arg1)
{
    vis_ptr->bkgd_bright = arg1.toInt();
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_lineEdit_Average_Size_textChanged(const QString &arg1)
{
    vis_ptr->avg_size = arg1.toInt();
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_lineEdit_Decay_textChanged(const QString &arg1)
{
    vis_ptr->decay = arg1.toInt();
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_lineEdit_Delay_textChanged(const QString &arg1)
{
    vis_ptr->delay = arg1.toInt();
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_lineEdit_Normalization_Offset_textChanged(const QString &arg1)
{
    vis_ptr->nrml_ofst = arg1.toFloat();
    vis_ptr->SetNormalization(vis_ptr->nrml_ofst, vis_ptr->nrml_scl);
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_lineEdit_Normalization_Scale_textChanged(const QString &arg1)
{
    vis_ptr->nrml_scl = arg1.toFloat();
    vis_ptr->SetNormalization(vis_ptr->nrml_ofst, vis_ptr->nrml_scl);
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_lineEdit_Animation_Speed_textChanged(const QString &arg1)
{
    vis_ptr->anim_speed = arg1.toFloat();
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_comboBox_FFT_Window_Mode_currentIndexChanged(int index)
{
    vis_ptr->window_mode = index;
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_comboBox_Background_Mode_currentIndexChanged(int index)
{
    vis_ptr->bkgd_mode = index;
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_comboBox_Foreground_Mode_currentIndexChanged(int index)
{
    vis_ptr->frgd_mode = index;
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_comboBox_Single_Color_Mode_currentIndexChanged(int index)
{
    vis_ptr->single_color_mode = index;
    vis_ptr->OnSettingsChanged();
}

void Ui::KeyboardVisDlg::on_comboBox_Average_Mode_currentIndexChanged(int index)
{
    vis_ptr->avg_mode = index;
    vis_ptr->OnSettingsChanged();
}

void Ui::Ke


.position = add(self.camera.position, [0., -self.camera.camera_speed]),
            Some(Button::Keyboard(Key::Down)) => self.camera.position = add(self.camera.position, [0., self.camera.camera_speed]),
            Some(Button::Keyboard(Key::PageDown)) => self.camera.zoom /= self.camera.zoom_factor,
            Some(Button::Keyboard(Key::PageUp)) => self.camera.zoom *= self.camera.zoom_factor,
            Some(Button::Mouse(MouseButton::Left)) => {
                let v = self.camera.view_to_world_position(self.cursor);
                self.galaxy.planets.push(
                    Planet::default(v[0], v[1], self.settings.planet_radius, self.galaxy.planets.len())
                );
            },
            _ => ()
        }
    }
}
<reponame>okey/ox
extern crate peg;

fn main() {
    peg::cargo_build("src/nwscript.rustpeg");
}
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "0x00 - Master Configuration Register"]
    pub matrix_mcfg: [crate::Reg<matrix_mcfg::MATRIX_MCFG_SPEC>; 12],
    _reserved1: [u8; 16usize],
    #[doc = "0x40 - Slave Configuration Register"]
    pub matrix_scfg: [crate::Reg<matrix_scfg::MATRIX_SCFG_SPEC>; 9],
    _reserved2: [u8; 28usize],
    #[doc = "0x80 - Priority Register A for Slave 0"]
    pub matrix_pras0: crate::Reg<matrix_pras0::MATRIX_PRAS0_SPEC>,
    #[doc = "0x84 - Priority Register B for Slave 0"]
    pub matrix_prbs0: crate::Reg<matrix_prbs0::MATRIX_PRBS0_SPEC>,
    #[doc = "0x88 - Priority Register A for Slave 1"]
    pub matrix_pras1: crate::Reg<matrix_pras1::MATRIX_PRAS1_SPEC>,
    #[doc = "0x8c - Priority Register B for Slave 1"]
    pub matrix_prbs1: crate::Reg<matrix_prbs1::MATRIX_PRBS1_SPEC>,
    #[doc = "0x90 - Priority Register A for Slave 2"]
    pub matrix_pras2: crate::Reg<matrix_pras2::MATRIX_PRAS2_SPEC>,
    #[doc = "0x94 - Priority Register B for Slave 2"]
    pub matrix_prbs2: crate::Reg<matrix_prbs2::MATRIX_PRBS2_SPEC>,
    #[doc = "0x98 - Priority Register A for Slave 3"]
    pub matrix_pras3: crate::Reg<matrix_pras3::MATRIX_PRAS3_SPEC>,
    #[doc = "0x9c - Priority Register B for Slave 3"]
    pub matrix_prbs3: crate::Reg<matrix_prbs3::MATRIX_PRBS3_SPEC>,
    #[doc = "0xa0 - Priority Register A for Slave 4"]
    pub matrix_pras4: crate::Reg<matrix_pras4::MATRIX_PRAS4_SPEC>,
    #[doc = "0xa4 - Priority Register B for Slave 4"]
    pub matrix_prbs4: crate::Reg<matrix_prbs4::MATRIX_PRBS4_SPEC>,
    #[doc = "0xa8 - Priority Register A for Slave 5"]
    pub matrix_pras5: crate::Reg<matrix_pras5::MATRIX_PRAS5_SPEC>,
    #[doc = "0xac - Priority Register B for Slave 5"]
    pub matrix_p


 angularLower)
	{
		for (int i = 0; i < 3; i++)
			angularLower[i] = m_angularLimits[i].m_loLimit;
	}

	void setAngularUpperLimit(const b3Vector3& angularUpper)
	{
		for (int i = 0; i < 3; i++)
			m_angularLimits[i].m_hiLimit = b3NormalizeAngle(angularUpper[i]);
	}

	void getAngularUpperLimit(b3Vector3 & angularUpper)
	{
		for (int i = 0; i < 3; i++)
			angularUpper[i] = m_angularLimits[i].m_hiLimit;
	}

	//! Retrieves the angular limit informacion
	b3RotationalLimitMotor* getRotationalLimitMotor(int index)
	{
		return &m_angularLimits[index];
	}

	//! Retrieves the  limit informacion
	b3TranslationalLimitMotor* getTranslationalLimitMotor()
	{
		return &m_linearLimits;
	}

	//first 3 are linear, next 3 are angular
	void setLimit(int axis, b3Scalar lo, b3Scalar hi)
	{
		if (axis < 3)
		{
			m_linearLimits.m_lowerLimit[axis] = lo;
			m_linearLimits.m_upperLimit[axis] = hi;
		}
		else
		{
			lo = b3NormalizeAngle(lo);
			hi = b3NormalizeAngle(hi);
			m_angularLimits[axis - 3].m_loLimit = lo;
			m_angularLimits[axis - 3].m_hiLimit = hi;
		}
	}

	//! Test limit
	/*!
    - free means upper < lower,
    - locked means upper == lower
    - limited means upper > lower
    - limitIndex: first 3 are linear, next 3 are angular
    */
	bool isLimited(int limitIndex)
	{
		if (limitIndex < 3)
		{
			return m_linearLimits.isLimited(limitIndex);
		}
		return m_angularLimits[limitIndex - 3].isLimited();
	}

	virtual void calcAnchorPos(const b3RigidBodyData* bodies);  // overridable

	int get_limit_motor_info2(b3RotationalLimitMotor * limot,
							  const b3Transform& transA, const b3Transform& transB, const b3Vector3& linVelA, const b3Vector3& linVelB, const b3Vector3& angVelA, const b3Vector3& angVelB,
							  b3ConstraintInfo2* info, int row, b3Vector3& ax1, int rotational, int rotAllowed = false);

	// access for UseFrameOffset
	bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; }
	void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstraintFrame = frameOffsetOnOff; }

	///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
	///If no axis is provided, it uses the default axis for this constraint.
	virtual void setParam(int num, b3Scalar value, int axis = -1);
	///return the local value of parameter
	virtual b3Scalar getParam(int num, int axis = -1) const;

	void setAxis(const b3Vector3& axis1, const b3Vector3& axis2, const b3RigidBodyData* bodies);
};

#endif  //B3_GENERIC_6DOF_CONSTRAINT_H


-asm.h"

#define PARMS	LINKAGE+16	/* space for 4 saved regs */
#define RES	PARMS
#define S1	RES+PTR_SIZE
#define SIZE	S1+PTR_SIZE
#define S2LIMB	SIZE+4

#define res_ptr edi
#define s1_ptr esi
#define size ecx
#define s2_limb ebx

	.text
ENTRY (BP_SYM (__mpn_addmul_1))
	ENTER

	pushl	%edi
	pushl	%esi
	pushl	%ebp
	pushl	%ebx

	movl	RES(%esp), %res_ptr
	movl	S1(%esp), %s1_ptr
	movl	SIZE(%esp), %size
	movl	S2LIMB(%esp), %s2_limb
#if __BOUNDED_POINTERS__
	shll	$2, %size	/* convert limbs to bytes */
	CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %size)
	CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %size)
	shrl	$2, %size
#endif
	leal	(%res_ptr,%size,4), %res_ptr
	leal	(%s1_ptr,%size,4), %s1_ptr
	negl	%size
	xorl	%ebp, %ebp
	ALIGN (3)

L(oop):	adcl	$0, %ebp
	movl	(%s1_ptr,%size,4), %eax

	mull	%s2_limb

	addl	%ebp, %eax
	movl	(%res_ptr,%size,4), %ebp

	adcl	$0, %edx
	addl	%eax, %ebp

	movl	%ebp, (%res_ptr,%size,4)
	incl	%size

	movl	%edx, %ebp
	jnz	L(oop)

	adcl	$0, %ebp
	movl	%ebp, %eax
	popl	%ebx
	popl	%ebp
	popl	%esi
	popl	%edi

	LEAVE
	ret
#undef size
END (BP_SYM (__mpn_addmul_1))


::GetLongId(MCExecContext& ctxt, uint32_t p_part_id, MCStringRef& r_long_id)
{
	MCAutoValueRef t_long_id;
	if (getnameproperty(P_LONG_ID, p_part_id, &t_long_id))
		if (ctxt.ConvertToString(*t_long_id, r_long_id))
			return;

	ctxt . Throw();
}

void MCObject::GetName(MCExecContext& ctxt, MCStringRef& r_name)
{
	MCAutoValueRef t_name;
	if (names(P_NAME, &t_name))
		if (ctxt.ConvertToString(*t_name, r_name))
			return;

	ctxt . Throw();
}

void MCObject::SetName(MCExecContext& ctxt, MCStringRef p_name)
{
	bool t_success;
	t_success = true;

	// Cannot have return characters in object names.
	MCAutoStringRef t_new_string;
	if (t_success)
		t_success = MCStringMutableCopy(p_name, &t_new_string);
	if (t_success)
		t_success = MCStringFindAndReplaceChar(*t_new_string, '\n', '_', kMCStringOptionCompareExact);

	MCNewAutoNameRef t_new_name;
	if (t_success)
		t_success = MCNameCreate(*t_new_string, &t_new_name);

	// MW-2012-09-12; [[ Bug ]] Make sure we compare literally, otherwise can't
	//   change case of names of objects.
	if (t_success && getname() != *t_new_name)
	{
		MCNewAutoNameRef t_old_name = getname();
		setname(*t_new_name);
		message_with_valueref_args(MCM_name_changed, *t_old_name, getname());
	}

	if (t_success)
	{
		Redraw();
		return;
	}

	ctxt . Throw();
}

void MCObject::GetAbbrevName(MCExecContext& ctxt, MCStringRef& r_abbrev_name)
{
	MCAutoValueRef t_abbrev_name;
	if (names(P_ABBREV_NAME, &t_abbrev_name))
		if (ctxt.ConvertToString(*t_abbrev_name, r_abbrev_name))
			return;

	ctxt . Throw();
}

void MCObject::GetShortName(MCExecContext& ctxt, MCStringRef& r_short_name)
{
	MCAutoValueRef t_short_name;
	if (names(P_SHORT_NAME, &t_short_name))
		if (ctxt.ConvertToString(*t_short_name, r_short_name))
			return;

	ctxt . Throw();
}

void MCObject::GetAltId(MCExecContext& ctxt, uint32_t& r_alt_id)
{
	r_alt_id = altid;
}

void MCObject::SetAltId(MCExecContext& ctxt, uint32_t p_new_alt_id)
{
	altid = p_new_alt_id;
}

////////////////////////////////////////////////////////////////////////////////

void MCObject::GetLayer(MCExecContext& ctxt, uint32_t part, MCInterfaceLayer& r_layer)
{
	// OK-2009-03-12: [[Bug 8049]] - Fix relayering of grouped objects broken by
	// previous fix for crash when attempting to get the layer of an object outside
	// the group being edited in edit group mode.

	uint2 num = 0;
	if (parent)
	{
		MCCard *t_card;
		t_card = getcard(part);

		if(part != 0 && t_card == NULL)
			t_card = getstack() -> findcardbyid(part);

		if (t_card == NULL)
		{
			// This shouldn't happen, but rather than a crash, throw a random execution error..
			ctxt . LegacyThrow(EE_CHUNK_NOCARD);


//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:3.0.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace ZigBeeNet.Hardware.Ember.Ezsp.Command
{
    using ZigBeeNet.Hardware.Ember.Internal.Serializer;

    /// <summary>
    /// Class to implement the Ember EZSP command " mfglibSendPacket ".
    /// Sends a single packet consisting of the following bytes: packetLength,
    /// packetContents[0], ... , packetContents[pack-etLength - 3], CRC[0], CRC[1]. The total
    /// number of bytes sent is packetLength + 1. The radio replaces the last two bytes of
    /// packetContents[]with the 16-bit CRC for the packet.
    /// This class provides methods for processing EZSP commands.
    /// </summary>
    public class EzspMfglibSendPacketRequest : EzspFrameRequest
    {

        public const int FRAME_ID = 137;

        /// <summary>
        ///  The packet to send. The last two bytes will be replacedwith the 16-bit CRC.
        /// </summary>
        private int[] _packetContents;

        private EzspSerializer _serializer;

        public EzspMfglibSendPacketRequest()
        {
            _frameId = FRAME_ID;
            _serializer = new EzspSerializer();
        }

        /// <summary>
        /// The packetContents to set as <see cref="uint8_t[]"/> </summary


::codepointIsDelimiter(_document[_pos], _delimListLanguage))) {
            ++_pos;
        }
        const size_t len = _pos - start;

        // Skip the delimiters before the next token.
        _skipDelimiters();

        // Stop words are case-sensitive and diacritic sensitive, so we need them to be lower cased
        // but with diacritics not removed to check against the stop word list.
        _word = _document.toLowerToBuf(&_wordBuf, _caseFoldMode, start, len);

        if ((_options & kFilterStopWords) && _stopWords->isStopWord(_word)) {
            continue;
        }

        if (_options & kGenerateCaseSensitiveTokens) {
            _word = _document.substrToBuf(&_wordBuf, start, len);
        }

        // The stemmer is diacritic sensitive, so stem the word before removing diacritics.
        _word = _stemmer.stem(_word);

        if (!(_options & kGenerateDiacriticSensitiveTokens)) {
            // Can't use _wordbuf for output here because our input _word may point into it.
            _word = unicode::String::caseFoldAndStripDiacritics(
                &_finalBuf, _word, unicode::String::kCaseSensitive, _caseFoldMode);
        }

        return true;
    }
}

StringData UnicodeFTSTokenizer::get() const {
    return _word;
}

void UnicodeFTSTokenizer::_skipDelimiters() {
    while (_pos < _document.size() &&
           unicode::codepointIsDelimiter(_document[_pos], _delimListLanguage)) {
        ++_pos;
    }
}

}  // namespace fts
}  // namespace mongo
// fts_matcher_test.cpp

/**
*    Copyright (C) 2012 10gen Inc.
*
*    This program is free software: you can redistribute it and/or  modify
*    it under the terms of the GNU Affero General Public License, version 3,
*    as published by the Free Software Foundation.
*
*    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 Affero General Public License for more details.
*
*    You should have received a copy of the GNU Affero General Public License
*    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
*    As a special exception, the copyright holders give permission to link the
*    code of portions of this program with the OpenSSL library under certain
*    conditions as described in each individual source file and distribute
*    linked combinations including the program with the OpenSSL library. You
*    must comply with the GNU Affero General Public License in all respects for
*    all of the code used other than as permitted herein. If you modify file(s)
*    with this exception, you may extend this exception to your version of the
*    file(s), but you are not obligated to do so. If you do not wish to do so,
*    delete this exception statement from your version. If you delete this
*    exception statement from all source files in the program, then also delete
*    it in the license file.
*/

#include "mongo/platform/basic.h"

#include "mongo/db/fts/fts_matcher.h"
#include "mongo/unittest/unittest.h"

namespace mongo {
namespace fts {

using unittest::assertGet;

TEST(FTSMatcher, NegWild1) {
    FTSQueryImpl q;
    q.setQuery("foo -bar");
    q.setLanguage("english");
    q.setCaseSensitive(false);
    q.setDiacriticSensitive(false);
    ASSERT(q.parse(TEXT_INDEX_VERSION_3).isOK());
    FTSMatcher m(q,
                 FTSSpec(assertGet(FTSSpec::fix


const d = new [|D|]("d");
////const e = new E();

verify.noErrors();
const [aCtrDef, aCtr, cCtrDef, cCtr, cSuper, aNew, bNew, cNew, dNew] = test.ranges();
verify.referenceGroups(aCtr, [
    { definition: "class A", ranges: [aCtr, aNew] },
    { definition: "class B", ranges: [cSuper, bNew]},
    { definition: "class D", ranges: [dNew]}]);
verify.referenceGroups(cCtr, [{ definition: "class C", ranges: [cCtr, cNew]}]);// Improtaciones y Exportaciones.
import { Product, calISV } from "./07-destructuring-arguments";

const carShopping: Product[] = [
    {
        desc: 'Tel 1',
        price: 100
    },
    {
        desc: 'Tel 2',
        price: 150
    }
];

// Desestructuramos el arreglo.
const [ total, isv ] = calISV(carShopping);
console.log('Total: ', total );
console.log('ISV: ', isv);import "@ndn/packet/test-fixture/expect";

import { Data, Interest } from "@ndn/packet";
import { DataStore } from "@ndn/repo";
import memdown from "memdown";

import { DataStoreBuffer, Endpoint, Producer, ProducerHandler } from "..";

afterEach(() => Endpoint.deleteDefaultForwarder());

function makeEndpointBuffered(ttl?: number, autoBuffer?: boolean): [Endpoint, DataStoreBuffer] {
  const dataStoreBuffer = new DataStoreBuffer(new DataStore(memdown()), ttl);
  const ep = new Endpoint({ dataBuffer: dataStoreBuffer, autoBuffer });
  return [ep, dataStoreBuffer];
}

test("Data non-match", async () => {
  const ep = new Endpoint();
  const handler = jest.fn(async (interest: Interest) => {
    return new Data("/A/0");
  });
  ep.produce("/A", handler);

  await expect(ep.consume(new Interest("/A/9", Interest.Lifetime(100)))).rejects.toThrow();
  expect(handler).toHaveBeenCalledTimes(1);
});

test("fill buffer in handler", async () => {
  const [ep, dataStoreBuffer] = makeEndpointBuffered();
  const handler = jest.fn<ReturnType<ProducerHandler>, Parameters<ProducerHandler>>(
    async (interest: Interest, { dataBuffer }: Producer) => {
      expect(dataBuffer).toBe(dataStoreBuffer);
      if (!interest.name.equals("/A")) { return false; }
      await dataBuffer!.insert(new Data("/A/0"), new Data("/A/1"), new Data("/A/2"));
      return false;
    });
  ep.produce("/A", handler);

  await expect(ep.consume(new Interest("/A", Interest.CanBePrefix))).resolves.toHaveName("/A/0");
  expect(handler).toHaveBeenCalledTimes(1);

  await expect(ep.consume(new Interest("/A", Interest.CanBePrefix))).resolves.toHaveName("/A/0");
  expect(handler).toHaveBeenCalledTimes(1);

  await expect(ep.consume(new Interest("/A/1"))).resolves.toHaveName("/A/1");
  await expect(ep.consume(new Interest("/A/2"))).resolves.toHaveName("/A/2");
  expect(handler).toHaveBeenCalledTimes(1);
});

test("prefill buffer", async () => {
  const [ep, dataStoreBuffer] = makeEndpointBuffered();
  const handler = jest.fn(async (interest: Interest) => {
    return new Data(interest.name);
  });
  ep.produce("/A", handler);

  await dataStoreBuffer.insert(new Data("/A/0"), new Data("/A/1"));
  await


const{

  117        return m_parameters;

  118    }

  119    virtual void setParameterVector(RealVector const& newParameters){

  120        SIZE_CHECK(numberOfParameters() == newParameters.size());

  121        m_parameters=newParameters;

  122    }

  123    virtual std::size_t numberOfParameters()const{

  124        return <a class="code hl_variable" href="classshark_1_1_c_m_a_c_map.html#a57c34792fcd21c26783d0542e260d47c" title="The parameter


hecker func(string) bool, kindChecker func(int) bool) int {
	state := iterateAstState{
		"",
		kindChecker,
		predictTrue,
		func(ast interface{}) bool {
			if nameMap, ok := ast.(map[string]interface{}); ok {
				if name, ok := nameMap["name"]; ok {
					if nameStr, ok := name.(string); ok {
						return nameChecker(nameStr)
					}
				}
			}
			return false
		}}

	return state.Iterate(ast)
}

func (ast ast) GetWordsAndCallable() (words, bool) {
	result := false
	vector := make([]string, 0)
	checkNameAndKind(ast.root, func(s string) bool {
		vector = append(vector, s)
		return true
	}, func(k int) bool {
		if k == 269 || k == 265 || k == 515 || k == 768 || k == 769 {
			result = true
		}
		return true
	})

	return words{vector}, result
}
package server

import (
	"net/http"
	"sort"

	"github.com/chaitin/koalaqa/intercept"
	"github.com/chaitin/koalaqa/pkg/config"
	"github.com/chaitin/koalaqa/pkg/context"
	"github.com/gin-gonic/gin"
	"go.uber.org/fx"
)

// @title KoalaQA API
// @version 2.0
// @description KoalaQA API swagger document.

// @BasePath /api
type Router interface {
	Route(Handler)
}

type routerGroup struct {
	rg *gin.RouterGroup
}

func (rg *routerGroup) Handle(httpMethod, relativePath string, handlers ...HandlerFunc) {
	rg.rg.Handle(httpMethod, relativePath, wrapHandlers(handlers...)...)
}

func (rg *routerGroup) GET(relativePath string, handlers ...HandlerFunc) {
	rg.Handle(http.MethodGet, relativePath, handlers...)
}

func (rg *routerGroup) PUT(relativePath string, handlers ...HandlerFunc) {
	rg.Handle(http.MethodPut, relativePath, handlers...)
}

func (rg *routerGroup) DELETE(relativePath string, handlers ...HandlerFunc) {
	rg.Handle(http.MethodDelete, relativePath, handlers...)
}

func (rg *routerGroup) POST(relativePath string, handlers ...HandlerFunc) {
	rg.Handle(http.MethodPost, relativePath, handlers...)
}

func (rg *routerGroup) Group(relativePath string, handlers ...HandlerFunc) Handler {
	return &routerGroup{
		rg: rg.rg.Group(relativePath, wrapHandlers(handlers...)...),
	}
}

func (rg *routerGroup) GroupInterceptors(relativePath string, interceptors ...intercept.Interceptor) Handler {
	return rg.Group(relativePath, interceptorToHandler(interceptors)...)
}

type In struct {
	fx.In

	Config       config.Config
	Interceptors []intercept.Interceptor `group:"global_interceptors"`
	Routes       []Router                `group:"global_routers"`
}

type Engine struct {
	in In

	e *gin.Engine
}

func New(in In) *Engine {
	e := &Engine{in: in}
	if in.Config.API.DEV {
		gin.SetMode(gin.DebugMode)
		e.e = gin.Default()
	} else {
		gin.SetMode(gin.ReleaseMode)
		e.e = gin.New()
		e.e.Use(gin.Recovery())
	}

	e.e.ContextWithFallback = true

	return e
}

func (e *Engine) Handle(httpMethod, relativePath string, handlers ...HandlerFunc) {
	e.e.Handle(httpMethod, relativePath, wrapHandlers(handlers


githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)right -240px top -144px
}

.\@f09f91b7f09f8fbf {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)-240px -160px
}

[dir=rtl] .\@f09f91b7f09f8fbf {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)right -240px top -160px
}

.\@f09f91b7e2808de29982,
.\@f09f91b7e2808de29982efb88f {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)-240px -176px
}

[dir=rtl] .\@f09f91b7e2808de29982,
[dir=rtl] .\@f09f91b7e2808de29982efb88f {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)right -240px top -176px
}

.\@f09f91b7f09f8fbbe2808de29982,
.\@f09f91b7f09f8fbbe2808de29982efb88f {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)-240px -192px
}

[dir=rtl] .\@f09f91b7f09f8fbbe2808de29982,
[dir=rtl] .\@f09f91b7f09f8fbbe2808de29982efb88f {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)right -240px top -192px
}

.\@f09f91b7f09f8fbce2808de29982,
.\@f09f91b7f09f8fbce2808de29982efb88f {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)-240px -208px
}

[dir=rtl] .\@f09f91b7f09f8fbce2808de29982,
[dir=rtl] .\@f09f91b7f09f8fbce2808de29982efb88f {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)right -240px top -208px
}

.\@f09f91b7f09f8fbde2808de29982,
.\@f09f91b7f09f8fbde2808de29982efb88f {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)-240px -224px
}

[dir=rtl] .\@f09f91b7f09f8fbde2808de29982,
[dir=rtl] .\@f09f91b7f09f8fbde2808de29982efb88f {
	background: url(https://raw.githubusercontent.com/koke228666/VKify/refs/heads/main/emojis/sprite_4.png)right -240px top -224px
}

.\@


.

package arp_test

import (
	"testing"
	"time"

	"github.com/brewlin/net-protocol/pkg/buffer"
	tcpip "github.com/brewlin/net-protocol/protocol"
	"github.com/brewlin/net-protocol/protocol/header"
	"github.com/brewlin/net-protocol/protocol/link/channel"
	"github.com/brewlin/net-protocol/protocol/link/sniffer"
	"github.com/brewlin/net-protocol/protocol/network/arp"
	"github.com/brewlin/net-protocol/protocol/network/ipv4"
	"github.com/brewlin/net-protocol/protocol/transport/ping"
	"github.com/brewlin/net-protocol/stack"
)

const (
	stackLinkAddr = tcpip.LinkAddress("\x0a\x0a\x0b\x0b\x0c\x0c")
	stackAddr1    = tcpip.Address("\x0a\x00\x00\x01")
	stackAddr2    = tcpip.Address("\x0a\x00\x00\x02")
	stackAddrBad  = tcpip.Address("\x0a\x00\x00\x03")
)

type testContext struct {
	t      *testing.T
	linkEP *channel.Endpoint
	s      *stack.Stack
}

func newTestContext(t *testing.T) *testContext {
	s := stack.New([]string{ipv4.ProtocolName, arp.ProtocolName}, []string{ping.ProtocolName4}, stack.Options{})

	const defaultMTU = 65536
	id, linkEP := channel.New(256, defaultMTU, stackLinkAddr)
	if testing.Verbose() {
		id = sniffer.New(id)
	}
	if err := s.CreateNIC(1, id); err != nil {
		t.Fatalf("CreateNIC failed: %v", err)
	}

	if err := s.AddAddress(1, ipv4.ProtocolNumber, stackAddr1); err != nil {
		t.Fatalf("AddAddress for ipv4 failed: %v", err)
	}
	if err := s.AddAddress(1, ipv4.ProtocolNumber, stackAddr2); err != nil {
		t.Fatalf("AddAddress for ipv4 failed: %v", err)
	}
	if err := s.AddAddress(1, arp.ProtocolNumber, arp.ProtocolAddress); err != nil {
		t.Fatalf("AddAddress for arp failed: %v", err)
	}

	s.SetRouteTable([]tcpip.Route{{
		Destination: "\x00\x00\x00\x00",
		Mask:        "\x00\x00\x00\x00",
		Gateway:     "",
		NIC:         1,
	}})

	return &testContext{
		t:      t,
		s:      s,
		linkEP: linkEP,
	}
}

func (c *testContext) cleanup() {
	close(c.linkEP.C)
}

func TestDirectRequest(t *testing.T) {
	c := newTestContext(t)
	defer c.cleanup()

	const senderMAC = "\x01\x02\x03\x04\x05\x06"
	const senderIPv4 = "\x0a\x00\x00\x02"

	v := make(buffer.View, header.ARPSize)
	h := header.ARP(v)
	h.SetIPv4OverEthernet()
	h.SetOp(header.ARPRequest)
	copy(h.HardwareAddressSender(), senderMAC)
	copy(h.ProtocolAddressSender(), senderIPv4)

	inject := func(addr tcpip.Address) {
		copy(h.ProtocolAddressTarget(), addr)
		c.linkEP.Inject(arp.ProtocolNumber, v.ToVectorisedView())
	}

	inject(stackAddr1)
	{
		pkt := <-c.linkEP.C
		if pkt.Proto != arp.ProtocolNumber {
			t.Fatalf("stackAddr1: expected ARP response, got network protocol number %v", pkt.Proto)
		}
		rep := header.ARP(pkt.Header)
		if !rep.IsValid() {
			t.Fatalf("stackAddr1: invalid AR


subpd		%ymm15, %ymm14, %ymm15

	cmpl	$ 3, %r10d
	jle		2f // clean-up loop

	// main loop
	.p2align 3
1: // main loop

	vmovupd		0(%r11), %ymm0
	vmovapd		%ymm0, 0(%r13)
	vmaskmovpd	32(%r11), %ymm15, %ymm0
	vmovapd		%ymm0, 0(%r13, %r14)
	addq	%r12, %r11

	vmovupd		0(%r11), %ymm0
	vmovapd		%ymm0, 32(%r13)
	vmaskmovpd	32(%r11), %ymm15, %ymm0
	vmovapd		%ymm0, 32(%r13, %r14)
	addq	%r12, %r11

	vmovupd		0(%r11), %ymm0
	vmovapd		%ymm0, 64(%r13)
	vmaskmovpd	32(%r11), %ymm15, %ymm0
	vmovapd		%ymm0, 64(%r13, %r14)
	addq	%r12, %r11

	vmovupd		0(%r11), %ymm0
	vmovapd		%ymm0, 96(%r13)
	vmaskmovpd	32(%r11), %ymm15, %ymm0
	vmovapd		%ymm0, 96(%r13, %r14)
	addq	%r12, %r11

	subl	$ 4, %r10d
	addq	$ 128, %r13

	cmpl	$ 3, %r10d
	jg		1b

	cmpl	$ 0, %r10d
	jle		0f // return

2: // clean-up loop

	vmovupd		0(%r11), %ymm0
	vmovapd		%ymm0, 0(%r13)
	vmaskmovpd	32(%r11), %ymm15, %ymm0
	vmovapd		%ymm0, 0(%r13, %r14)
	addq	%r12, %r11

	subl	$ 1, %r10d
	addq	$ 32, %r13

	cmpl	$ 0, %r10d
	jg		2b

0: // return

	EPILOGUE

	ret

	FUN_END(kernel_dpack_nn_8_vs_lib4)

//                             1         2          3        4
// void kernel_dpack_nn_4_lib4(int kmax, double *A, int lda, double *C)

	.p2align 4,,15
	GLOB_FUN_START(kernel_dpack_nn_4_lib4)

	PROLOGUE

	movq	ARG1, %r10 // kmax
	movq	ARG2, %r11 // A
	movq	ARG3, %r12 // lda
	sall	$ 3, %r12d
	movq	ARG4, %r13 // C

	cmpl	$ 0, %r10d
	jle		0f // return

	cmpl	$ 3, %r10d
	jle		2f // clean-up loop

	// main loop
	.p2align 3
1: // main loop

	vmovupd		0(%r11), %ymm0
	prefetcht0	0(%r11, %r12, 4)
	vmovapd		%ymm0, 0(%r13)
	addq	%r12, %r11

	vmovupd		0(%r11), %ymm0
	prefetcht0	0(%r11, %r12, 4)
	vmovapd		%ymm0, 32(%r13)
	addq	%r12, %r11

	vmovupd		0(%r11), %ymm


�数器字典
 */
function __updateLiangFeng(SELF: MahjongLiangFengGroupComp, oCounterMap: {[nKey: number]: number, }): void {
    if (null == SELF ||
        null == oCounterMap) {
        return;
    }

    let nIndex = 0;

    for (let strKey in oCounterMap) {
        // 获取数量
        let nCount = oCounterMap[strKey];

        if (nCount <= 0) {
            continue;
        }

        if (null == cc.find(`Layout/MahjongTile_${nIndex}_`, SELF.node)) {
            continue;
        }

        // 设置图片
        cc.find(`Layout/MahjongTile_${nIndex}_`, SELF.node).active = true;
        cc.find(`Layout/MahjongTile_${nIndex}_/Val`, SELF.node)
            .getComponent(cc.Sprite)
            .spriteFrame = AllMahjongValImg.getSpriteFrame(Number.parseInt(strKey));

        // 设置数量
        cc.find(`Layout/MahjongTile_${nIndex}_/Num`, SELF.node).active = nCount > 1;
        cc.find(`Layout/MahjongTile_${nIndex}_/Num`, SELF.node)
            .getComponent(cc.Label)
            .string = nCount.toString();

        ++nIndex;
    }
}

/**
 * 更新乱锚
 *
 * @param SELF this 指针
 * @param oCounterMap 计数器字典
 */
function __updateLuanMao(SELF: MahjongLiangFengGroupComp, oCounterMap: {[nKey: number]: number, }): void {
    if (null == SELF ||
        null == oCounterMap) {
        return;
    }

    // 关键字数组
    const oKeyArray = [
        MahjongTileDef.DONG_FENG,
        MahjongTileDef.NAN_FENG,
        MahjongTileDef.XI_FENG,
        MahjongTileDef.BEI_FENG,
        MahjongTileDef.HONG_ZHONG,
        MahjongTileDef.FA_CAI,
        MahjongTileDef.BAI_BAN,
    ];

    for (let nIndex in oKeyArray) {
        // 获取数量
        let nCount = oCounterMap[oKeyArray[nIndex]];

        if (nCount <= 0) {
            continue;
        }

        cc.find(`Layout/MahjongTile_${nIndex}_/NumBG`, SELF.node).active = true;
        cc.find(`Layout/MahjongTile_${nIndex}_/Num`, SELF.node).active = true;
        cc.find(`Layout/MahjongTile_${nIndex}_/Num`, SELF.node)
            .getComponent(cc.Label)
            .string = nCount.toString();
    }
}
///<reference path="./QuestEntitySpell.ts"/>
///<reference path="../classes/Pos.ts"/>
///<reference path="../enums/FireballTargetType.ts"/>
///<reference path="../classes/QuestEntity.ts"/>
///<reference path="../classes/CollisionBoxCollection.ts"/>
///<reference path="../classes/QuestEntityDamageReason.ts"/>
///<reference path="../classes/Color.ts"/>
///<reference path="../classes/QuestEntitySpellColor.ts"/>
///<reference path="../classes/CollisionBox.ts"/>
///<reference path="../classes/QuestEntityMovement.ts"/>

class Fireball extends QuestEntitySpell{
    // Our size
    private size: Pos;

    // Target stuff
    private targetType: FireballTargetType = FireballTargetType.NO_TARGET;
        // If FireballTargetType.TARGET_ENTITY or FireballTargetType.TARGET_POSITION
        private speed;
        // If FireballTargetType.TARGET_ENTITY or FireballTargetType.TARGET_STICK_ON_ENTITY
        private fireballTargetEntity: QuestEntity;
        // If FireballTargetType.TARGET_ENTITY
        private specialTargetDamage: number; // Special damage inflicted to the target
        // If FireballTargetType.TARGET_STICK_ON_ENTITY
        private specialTargetPosition: Pos; // Special position of the fireball relatively to the target
        // If FireballTargetType.TARGET_POSITION


+= s.charAt(i);
        }
        return result;
    }
}package ch_22;

import java.util.*;

/**
 * **22.11 (Geometry: Graham’s algorithm for finding a convex hull) Section  22.10.2
 * introduced Graham’s algorithm for finding a convex hull for a set of points.
 * Assume that the Java’s coordinate system is used for the points.
 * Implement the algorithm using the following method:
 *

 *
 * /** Return the points that form a convex hull *\/

 * public static ArrayList<MyPoint> getConvexHull(double[][]s)

 * // MyPoint is a static inner class defined as follows:

 * private static class MyPoint implements Comparable<MyPoint> {

 * double x, y;

 * MyPoint rightMostLowestPoint;

 * MyPoint(double x, double y) {

 * this.x = x;

 * this.y = y;

 * }

 * public void setRightMostLowestPoint(MyPoint p) {

 * rightMostLowestPoint = p;

 * }

 * \ @Override public int compareTo(MyPoint o) {

 * // Implement it to compare this point with point o

 * // angularly along the x-axis with rightMostLowestPoint

 * // as the center, as shown in Figure 22.10b. By implementing

 * // the Comparable interface, you can use the Array.sort

 * // method to sort the points to simplify coding.

 * }

 * }

 *
 *

 * Write a test program that prompts the user to enter the set size and the points
 * and displays the points that form a convex hull.Here is a sample run:
 * How many points are in the set? 6
 * Enter 6 points: 1 2.4 2.5 2 1.5 34.5 5.5 6 6 2.4 5.5 9
 * The convex hull is
 * (1.5,34.5)(5.5,9.0)(6.0,2.4)(2.5,2.0)(1.0,2.4)
 *
 *

 * Helpful resources:
 * Grahams Algorithm with animations
 *

 */
public class Exercise22_11 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("How many points are in the set? ");
        int numPoints = scanner.nextInt();
        if (numPoints < 3) {
            throw new RuntimeException("Graham's Algorithm for ConvexHull requires at least 3 points...");
        }

        double[][] points = new double[numPoints][2];
        System.out.print("Enter " + numPoints + " points: ");

        for (int i = 0; i < points.length; i++) {
            for (int j = 0; j < 2; j++) {
                points[i][j] = scanner.nextDouble();
            }
        }
        List<MyPoint> result = getConvexHull(points);
        System.out.println("The convex hull is: ");
        System.out.println(Arrays.toString(result.toArray()));
    }

    public static ArrayList<MyPoint> getConvexHull(double[][] s) {
        /* Find Lowest and Rightest Point */
        double yMin = s[0][1];
        int minPos = 0;
        // Find the bottom most point
        for (int i = 1; i < s.length; i++) {
            double y = s[i][1];
            // Pick the bottom-most or chose the right
            // most point in case of tie
            if ((y < yMin) || (yMin == y && s[i][0] > s[minPos][0])) {
                yMin = s[i][1];
                minPos = i;

            }
        }
        // Swamp the bottom-most point for first position
        double[] temp = s[0];
        s[0] = s[minPos];
        s[minPos] = temp;
        MyPoint rightMostLowestPoint = new MyPoint(s[0][0], s[0][1]);
        ArrayList<MyPoint> rawPoints = new ArrayList<>();
        raw


: 6, 'd': 6, 'e': 5, 'f': 4, 'g': 6, 'h': 6, 'i': 3, 'j': 3, 'k': 5, 'l': 4, 'm': 7, 'n': 6, 'o': 6, 'p': 4, 'q': 6, 'r': 5, 's': 4, 't': 5, 'u': 6, 'v': 5, 'w': 8, 'x': 5, 'y': 5, 'z': 5, 'A': 5, 'B': 5, 'C': 6, 'D': 6, 'E': 5, 'F': 4, 'G': 6, 'H': 6, 'I': 3, 'J': 3, 'K': 5, 'L': 4, 'M': 7, 'N': 6, 'O': 6, 'P': 4, 'Q': 6, 'R': 5, 'S': 4, 'T': 5, 'U': 6, 'V': 5, 'W': 8, 'X': 5, 'Y': 5, 'Z': 5, ' ': 2, '!': 2, '"': 3, '#': 4, '$': 4, '%': 7, '&': 7, "'": 2, '(': 3, ')': 3, '*': 3, '+': 4, ',': 2, '-': 3, '.': 2, '/': 3, ':': 2, ';': 2, '<': 4, '=': 4, '>': 4, '?': 3, '@': 4, '[': 3, '\\': 4, ']': 3, '^': 4, '_': 4, '`': 3, '{': 3, '|': 4, '}': 3, '~': 4},
9: {'0': 5, '1': 5, '2': 5, '3': 5, '4': 5, '5': 5, '6': 5, '7': 5, '8': 5, '9': 5, 'a': 5, 'b': 5, 'c': 6, 'd': 7, 'e': 5, 'f': 5, 'g': 7, 'h': 7, 'i': 3, 'j': 3, 'k': 6, 'l': 5, 'm': 8, 'n': 7, 'o': 7, 'p': 5, 'q': 7, 'r': 6, 's': 4, 't': 6, 'u': 7, 'v': 6, 'w': 9, 'x': 6, 'y': 5, 'z': 6, 'A': 5, 'B': 5, 'C': 6, 'D': 7, 'E': 5, 'F': 5, 'G': 7, 'H': 7, 'I': 3, 'J': 3, 'K': 6, 'L': 5, 'M': 8, 'N': 7, 'O': 7, 'P': 5, 'Q': 7, 'R': 6, 'S': 4, 'T': 6, 'U': 7, 'V': 6, 'W': 9, 'X': 6, 'Y': 5, 'Z': 6, ' ': 2, '!': 2, '"': 3, '#': 5, '$': 5, '%': 8, '&': 7, "'": 2, '(': 3, ')': 3, '*': 4, '+': 5, ',': 2, '-': 3, '.': 2, '/': 3, ':': 2, ';': 2, '<': 5, '=': 5, '>': 5, '?': 3, '@': 5, '[': 3, '\\': 5, ']': 3, '^': 5, '_': 5, '`': 3, '{': 3, '|': 5, '}': 3, '~': 5},
10: {'0': 5, '1': 5, '2': 5, '3': 5, '4': 5, '5': 5, '6': 5, '7': 5, '8': 5, '9': 5, 'a': 6, 'b': 6, 'c': 7, 'd': 8, 'e': 6, 'f': 5, 'g': 7, 'h': 8, 'i': 3, 'j': 3, 'k': 7, 'l': 6, 'm': 9, 'n': 8, 'o': 8, 'p': 6, 'q': 8, 'r': 6, 's': 5, 't': 7, 'u': 8, 'v': 7, 'w': 10, 'x': 6, 'y': 6, 'z': 6, 'A': 6, 'B': 6, 'C': 7, 'D': 8, 'E': 6, 'F': 5, 'G': 7, 'H': 8, 'I': 3, 'J': 3, 'K': 7, 'L': 6, 'M': 9, 'N': 8, 'O': 8, 'P': 6, 'Q': 8, 'R': 6, 'S': 5, 'T': 7, 'U': 8, 'V': 7, 'W': 10, 'X': 6, 'Y': 6, 'Z': 6, ' ': 3, '!': 2, '"': 4, '#': 5, '$': 5, '%': 8, '&': 8, "'": 2, '(': 3, ')': 3, '*': 4, '+': 5, ',': 3, '-': 3, '.': 3, '/': 3, ':': 3, ';': 3, '<': 5, '=': 5, '>': 5, '?': 3, '@': 5, '[': 3, '\\': 5, ']': 3, '^': 5, '_': 5, '`': 4, '{': 3, '|': 5, '}': 3, '~': 5},
12: {'0': 6, '1': 6, '2': 6, '3': 6, '4': 6, '5': 6, '6': 6, '7': 6, '8': 6, '9': 6, 'a': 7, 'b': 7, 'c': 8, 'd': 9, 'e': 7, 'f': 6, 'g': 9, 'h': 10, 'i': 4, 'j': 4, 'k': 8, 'l': 7, 'm': 11, 'n': 9, 'o': 10, 'p': 7, 'q': 10, 'r': 8, 's': 6, 't': 8, 'u': 9, 'v': 8, 'w': 11, 'x': 8, 'y': 7, 'z': 8, 'A': 7, 'B': 7, 'C': 8, 'D': 9, 'E': 7, 'F': 6, 'G': 9, 'H': 10, 'I': 4, 'J': 4, 'K': 8, 'L': 7, 'M': 11, 'N': 9, 'O': 10, 'P': 7, 'Q': 10, 'R': 8, 'S': 6, 'T': 8, 'U': 9, 'V': 8, 'W': 11, 'X': 8, 'Y': 7, 'Z': 8, ' ': 3, '!': 3, '"': 4, '#': 6, '$': 6, '%': 10, '&': 10, "'": 2, '(': 4, ')': 4, '*': 5, '+': 6, ',': 3, '-': 4, '.': 3, '/': 4, ':': 3, ';': 3, '<': 6, '=': 6, '>': 6, '?': 4, '@': 6, '[': 4, '\\': 6, ']': 4, '^': 6, '_': 6, '`': 4, '{': 4, '|': 6, '}': 4, '~': 6},
14: {'0': 7, '1': 7, '2': 7, '3': 7, '4': 7, '5': 7, '6': 7, '7': 7, '8': 7, '9': 7, 'a': 9, 'b': 8, 'c': 10, 'd': 11, 'e': 8, 'f': 7, 'g': 10, 'h': 11, 'i': 5, 'j': 5, 'k': 9, 'l': 8, 'm': 13, 'n': 11, 'o': 11, 'p': 8, 'q': 11, 'r': 9, 's': 7, 't': 9, 'u': 11, 'v': 9, 'w': 13, 'x': 9, 'y': 8, 'z': 9, 'A': 9, 'B': 8, 'C': 10, 'D': 11, 'E': 8, 'F': 7, 'G': 10, 'H': 11, 'I': 5, 'J': 5, 'K': 9, 'L': 8, 'M': 13, 'N': 11, 'O': 11, 'P': 8, 'Q': 11, 'R': 9, 'S': 7, 'T': 9, 'U': 11, 'V': 9, 'W': 13, 'X': 9, 'Y': 8, 'Z': 9, ' ': 4, '!': 3, '"': 5, '#': 7, '$': 7, '%': 12, '&': 11, "'": 3, '(': 4, ')': 4, '*': 6, '+': 7, ',': 4, '-': 4, '.': 4, '/': 5, ':': 4, ';': 4, '<': 7, '=': 7, '>': 7, '?': 5, '@': 7, '[': 4, '\\': 7, ']': 4, '^': 7, '_': 7, '`': 5, '{': 4, '|': 7, '}': 4, '~': 7},
16: {'0': 8, '1': 8, '2': 8, '3': 8, '4': 8, '5': 8, '6': 8, '7': 8, '8': 8, '9': 8, 'a': 10, 'b': 9, 'c': 11, 'd': 13, 'e': 9, 'f': 9, 'g': 12, 'h': 13, 'i': 6, 'j': 6, 'k': 11, 'l': 9, 'm': 15, 'n': 13, 'o': 13, 'p': 9, 'q': 13, 'r': 10, 's': 8, 't': 11, 'u': 12, 'v': 11, 'w': 15, 'x': 10, 'y': 9, 'z': 10, 'A': 10, 'B': 9, 'C': 11, 'D': 13, 'E': 9, 'F': 9, 'G': 12, 'H': 13, 'I': 6, 'J': 6, 'K': 11, 'L': 9, 'M': 15, 'N': 13, 'O': 13, 'P': 9, 'Q': 13, 'R': 10, 'S': 8, 'T': 11, 'U': 12, 'V': 11, 'W': 15, 'X': 10, 'Y': 9, 'Z': 10, ' ': 4, '!': 3, '"': 6, '#': 8, '$': 8, '%': 14, '&': 13, "'": 3, '(': 5, ')': 5, '*': 6, '+': 8, ',': 4, '-': 5, '.': 4, '/': 5, ':': 4, ';': 4, '<': 8, '=': 8, '>': 8, '?': 5, '@': 8, '[': 5, '\\':


{ Measurable.HvacPressure, -1 },
      { Measurable.HvacVelocity, +1 },
      { Measurable.AirFlow, +3 },
      { Measurable.DuctSize, +1 },
      { Measurable.CrossSection, +2 },
      { Measurable.HvacRoughness, +1 },
      { Measurable.HvacViscosity, -1 },
      { Measurable.AirFlowDensity, +3 -2 },
      { Measurable.CoolingLoadDividedByArea, -2 },
      { Measurable.HeatingLoadDividedByArea, -2 },
      { Measurable.CoolingLoadDividedByVolume, -3 },
      { Measurable.HeatingLoadDividedByVolume, -3 },
      { Measurable.AirFlowDividedByVolume, +3 -3 },
      { Measurable.AirFlowDividedByCoolingLoad, +3 },
      { Measurable.AreaDividedByCoolingLoad, +2 },
      { Measurable.AreaDividedByHeatingLoad, +2 },
      { Measurable.DuctInsulationThickness, +1 },
      { Measurable.DuctLiningThickness, +1 },
      #endregion

      #region Electrical
      { Measurable.Luminance, -2 },
      { Measurable.ElectricalPowerDensity, -2 },
      { Measurable.ElectricalResistivity, +1 },
      { Measurable.WireDiameter, +1 },
      { Measurable.CableTraySize, +1 },
      { Measurable.ConduitSize, +1 },
      #endregion

      #region Piping
      { Measurable.PipingDensity, -3 },
      { Measurable.Flow, +3 },
      { Measurable.PipingFriction, -1 +1 },
      { Measurable.PipingPressure, -1 },
      { Measurable.PipingVelocity, +1 },
      { Measurable.PipingViscosity, -1 },
      { Measurable.PipeSize, +1 },
      { Measurable.PipingRoughness, +1 },
      { Measurable.PipingVolume, +3 },
      { Measurable.PipeInsulationThickness, +1 },
      { Measurable.PipeDimension, +1 },
      { Measurable.PipingMass, 0 },
      { Measurable.PipeMassPerUnitLength, -1 },
      #endregion

      #region Energy
      { Measurable.HeatTransferCoefficient, -2 },
      { Measurable.ThermalResistance, +2 },
      { Measurable.ThermalMass, +2 },
      { Measurable.Ther


_rcnn_r50_fpn_32x2_cas_1x_openimages_challenge.py) | [model](https://download.openmmlab.com/mmdetection/v2.0/openimages/faster_rcnn_r50_fpn_32x2_cas_1x_openimages_challenge/faster_rcnn_r50_fpn_32x2_cas_1x_openimages_challenge_20220221_192021-34c402d9.pth) \| [log](https://download.openmmlab.com/mmdetection/v2.0/openimages/faster_rcnn_r50_fpn_32x2_cas_1x_openimages_challenge/faster_rcnn_r50_fpn_32x2_cas_1x_openimages_challenge_20220221_192021.log.json) |
|           Retinanet           |   R-50   | pytorch |   1x    |    Group Sampler    |   6.6    |       -        |  61.5  |         [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/openimages/retinanet_r50_fpn_32x2_1x_openimages.py)         |                                 [model](https://download.openmmlab.com/mmdetection/v2.0/openimages/retinanet_r50_fpn_32x2_1x_openimages/retinanet_r50_fpn_32x2_1x_openimages_20211223_071954-d2ae5462.pth) \| [log](https://download.openmmlab.com/mmdetection/v2.0/openimages/retinanet_r50_fpn_32x2_1x_openimages/retinanet_r50_fpn_32x2_1x_openimages_20211223_071954.log.json)                                 |
|              SSD              |  VGG16   | pytorch |   36e   |    Group Sampler    |   10.8   |       -        |  35.4  |              [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/openimages/ssd300_32x8_36e_openimages.py)              |                                                     [model](https://download.openmmlab.com/mmdetection/v2.0/openimages/ssd300_32x8_36e_openimages/ssd300_32x8_36e_openimages_20211224_000232-dce93846.pth) \| [log](https://download.openmmlab.com/mmdetection/v2.0/openimages/ssd300_32x8_36e_openimages/ssd300_32x8_36e_openimages_20211224_000232.log.json)                                                     |

**Notes:**

- 'cas' is short for 'Class Aware Sampler'

### Results of consider image level labels

|           Architecture            |       Sampler       | Consider Image Level Labels | box AP |
| :-------------------------------: | :-----------------: | :-------------------------: | :----: |
| Faster R-CNN r50 (Challenge 2019) |    Group Sampler    |             w/o             | 62.19  |
| Faster R-CNN r50 (Challenge 2019) |    Group Sampler    |             w/              | 54.87  |
| Faster R-CNN r50 (Challenge 2019) | Class Aware Sampler |             w/o             | 71.77  |
| Faster R-CNN r50 (Challenge 2019) | Class Aware Sampler |             w/              | 64.98  |
# NAS-FCOS

> [NAS-FCOS: Fast Neural Architecture Search for Object Detection](https://arxiv.org/abs/1906.04423)

<!-- [ALGORITHM] -->

## Abstract

The success of deep neural networks relies on significant architecture engineering. Recently neural architecture search (NAS) has emerged as a promise to greatly reduce manual effort in network design by automatically searching for optimal architectures, although typically such algorithms need an excessive amount of computational resources, e.g., a few thousand GPU-days. To date, on challenging vision tasks such as object detection, NAS, especially fast versions of NAS, is less studied. Here we propose to search for the decoder structure of object detectors with search efficiency being taken into consideration. To be more specific, we aim to eff


got, 0)
			}
			if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().CorruptedLsps().State()); got != 0 {
				t.Errorf("FAIL- Not expecting any corrupted lsps, got %d, want %d", got, 0)
			}
			if !deviations.IsisDatabaseOverloadsUnsupported(ts.DUT) {
				if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().DatabaseOverloads().State()); got != 0 {
					t.Errorf("FAIL- Not expecting non zero database_overloads, got %d, want %d", got, 0)
				}
			}
			if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().ExceedMaxSeqNums().State()); got != 0 {
				t.Errorf("FAIL- Not expecting non zero max_seqnum counter, got %d, want %d", got, 0)
			}
			if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().IdLenMismatch().State()); got != 0 {
				t.Errorf("FAIL- Not expecting non zero IdLen_Mismatch counter, got %d, want %d", got, 0)
			}
			if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().LspErrors().State()); got != 0 {
				t.Errorf("FAIL- Not expecting any lsp errors, got %d, want %d", got, 0)
			}
			if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().MaxAreaAddressMismatches().State()); got != 0 {
				t.Errorf("FAIL- Not expecting non zero MaxAreaAddressMismatches counter, got %d, want %d", got, 0)
			}
			if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().OwnLspPurges().State()); got != 0 {
				t.Errorf("FAIL- Not expecting non zero OwnLspPurges counter, got %d, want %d", got, 0)
			}
			if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().SeqNumSkips().State()); got != 0 {
				t.Errorf("FAIL- Not expecting non zero SeqNumber skips, got %d, want %d", got, 0)
			}
			if !deviations.ISISCounterManualAddressDropFromAreasUnsupported(ts.DUT) {
				if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().ManualAddressDropFromAreas().State()); got != 0 {
					t.Errorf("FAIL- Not expecting non zero ManualAddressDropFromAreas counter, got %d, want %d", got, 0)
				}
			}
			if !deviations.ISISCounterPartChangesUnsupported(ts.DUT) {
				if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().PartChanges().State()); got != 0 {
					t.Errorf("FAIL- Not expecting partition changes, got %d, want %d", got, 0)
				}
			}
			if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().SpfRuns().State()); got == 0 {
				t.Errorf("FAIL- Not expecting spf runs counter to be 0, got %d, want non zero", got)
			}
		})
		t.Run("Route checks", func(t *testing.T) {
			if got := gnmi.Get(t, ts.DUT, statePath.Level(2).Lsp(ateLspID).Tlv(oc.IsisLsdbTypes_ISIS_TLV_TYPE_EXTENDED_IPV4_REACHABILITY).ExtendedIpv4Reachability().Prefix(v4Route).Prefix().State()); got !=


asx [%l7], %l6, %o2
! move %o2(upper) -> %o2(upper)
! move %o2(lower) -> %o2(lower)
add  %l4, 1, %l4

P6858: !ST [2] (maybe <- 0x3000191) (Int)
stw   %l4, [%i0 + 12 ]
add   %l4, 1, %l4

P6859: !ST [1] (maybe <- 0x42800014) (FP)
! 0 th moved, current_fp_src=20
fmovs  %f16, %f20
fadds  %f16, %f17, %f16
st   %f20, [%i0 + 4 ]

P6860: !ST [6] (maybe <- 0x3000192) (Int)
stw   %l4, [%i1 + 80 ]
add   %l4, 1, %l4

P6861: !PREFETCH [2] (Int)
prefetch [%i0 + 12], 1

P6862: !ST [0] (maybe <- 0x3000193) (Int)
stw   %l4, [%i0 + 0 ]
add   %l4, 1, %l4

P6863: !ST [3] (maybe <- 0x3000194) (Int) (LE)
wr %g0, 0x88, %asi
! Change single-word-level endianess (big endian <-> little endian)
sethi %hi(0xff00ff00), %l7
or %l7, %lo(0xff00ff00), %l7
and %l4, %l7, %o5
srl %o5, 8, %o5
sll %l4, 8, %l6
and %l6, %l7, %l6
or %l6, %o5, %l6
srl %l6, 16, %o5
sll %l6, 16, %l6
srl %l6, 0, %l6
or %l6, %o5, %l6
stwa   %l6, [%i0 + 32] %asi
add   %l4, 1, %l4

P6864: !ST [3] (maybe <- 0x3000195) (Int)
stw   %l4, [%i0 + 32 ]
add   %l4, 1, %l4

P6865: !ST [0] (maybe <- 0x3000196) (Int)
stw   %l4, [%i0 + 0 ]
add   %l4, 1, %l4

P6866: !PREFETCH [9] (Int)
prefetch [%i1 + 512], 1

P6867: !PREFETCH [1] (Int)
prefetch [%i0 + 4], 1

P6868: !PREFETCH [12] (Int)
prefetch [%i3 + 0], 1

P6869: !REPLACEMENT [12] (Int)
sethi %hi(0x0), %l7
or %l7, %lo(0x0),  %l7
sethi %hi(0x10000), %o5
or %o5, %lo(0x10000),  %o5
add %i3, %l7, %l7
add %l7, %o5, %l7
ld [%l7], %l3
st %l3, [%l7]
add %l7, %o5, %l7
ld [%l7], %l3
st %l3, [%l7]
add %l7, %o5, %l7
ld [%l7], %l3
st %l3, [%l7]
add %l7, %o5, %l7
ld [%l7], %l3
st %l3, [%l7]
add %l7, %o5, %l7
ld [%l7], %l3
st %l3, [%l7]
add %l7, %o5, %l7
ld [%l7], %l3
st %


as being "in locale X". That does not
    imply that a locale is a collection of data; it is
    simply shorthand for "the set of data associated with the
    locale id X". Each individual piece of data is called a
    resource or field, and a tag indicating the key
    of the resource is called a resource tag.

 3 Unicode Language
    and Locale Identifiers

Unicode LDML uses stable identifiers based on [BCP47] for distinguishing among languages,
    locales, regions, currencies, time zones, transforms, and so
    on. There are many systems for identifiers for these entities.
    The Unicode LDML identifiers may not match the identifiers used
    on a particular target system. If so, some process of
    identifier translation may be required when using LDML
    data.

The BCP 47 extensions (-u- and -t-) are described in
    Section 3.6 Unicode BCP 47 U
    Extension and Section 3.7 Unicode BCP 47 T Extension.

3.1 Unicode Language
    Identifier

A Unicode language identifier has the following
		structure (provided in EBNF (Perl-based)). The following table defines
    syntactically well-formed identifiers: they are not necessarily
    valid identifiers. For additional validity criteria, see the
    links on the right.

            EBNF

            Validity / Comments

        unicode_language_id
        = "root"

        | (unicode_language_subtag

            (sep unicode_script_subtag)?

          | unicode_script_subtag)

          (sep unicode_region_subtag)?

          (sep unicode_variant_subtag)* ;
        "root" is treated as a special
        unicode_language_subtag

        unicode_language_subtag
        = alpha{2,3} | alpha{5,8};
        validity

        latest-data</td


 {
      rl = readline.createInterface({
        input: process.stdin,
        output: process.stdout,
        completer: (line: string) => {
          return this.scene.completer(line);
        }
      });
    }
    let r = rl as readline.Interface;

    logger.trace("waiting for registration from bancho");
    console.log("Connecting to Osu Bancho ...");
    this.client.once("registered", () => {
      console.log("Connected :D");
      console.log("\n=== Welcome to osu-ahr ===");
      console.log(mainMenuCommandsMessage);
      r.setPrompt(this.prompt);
      r.prompt();
    });

    r.on("line", line => {
      logger.trace("scene:%s, line:%s", this.scene.name, line);
      this.scene.action(line).then(() => {
        if (!this.exited) {
          r.setPrompt(this.prompt);
          r.prompt();
        } else {
          logger.trace("closing interface");
          r.close();
        }
      });
    });
    r.on("close", () => {
      if (this.client != null) {
        logger.info("readline closed");
        if (this.client.conn != null && !this.client.conn.requestedDisconnect) {
          this.client.disconnect("goodby", () => {
            logger.info("ircClient disconnected");
            process.exit(0);
          });
        } else {
          logger.info("exit");
          process.exit(0);
        }
      }
    });
  }

  transitionToLobbyMenu() {
    this.scene = this.scenes.lobbyMenu;
    this.scene.prompt = (this.lobby.channel || "") + " > ";
    console.log(lobbyMenuCommandsMessage);
  }
}import Component, { tracked } from "@glimmer/component";

const ENTER_KEY = 13;
const ESCAPE_KEY = 27

export default class TodoItem extends Component {
  @tracked editing = false;
  @tracked newTitle;

  beginEdit() {
    this.editing = true;
    this.newTitle = this.args.todo.title;
  }

  commitEdit() {
    this.editing = false;
    this.args.onEdit(this.args.todo, this.newTitle);
  }

  abortEdit() {
    this.editing = false;
    this.newTitle = null;
  }

  handleEditKeyDown(event) {
    if (event.which === ENTER_KEY) {
      event.target.blur();
    } else if (event.which === ESCAPE_KEY) {
      this.abortEdit();
    }
  }
}
import createKDTree from "static-kdtree";

import { pokemon, Pokemon } from "../pokemon";

const pokemonPoint = (pokemon: Pokemon): number[] => [
  pokemon.hp,
  pokemon.attack,
  pokemon.defense,
  pokemon.special_attack,
  pokemon.special_defense,
  pokemon.speed,
];

const tree = createKDTree(pokemon.map((p) => pokemonPoint(p)));

export const getRecommendations = (p: Pokemon): Pokemon[] =>
  tree
    .knn(pokemonPoint(p), 21)
    .map((index) => pokemon[index])
    .filter((reccomenedPokemon) => reccomenedPokemon.id !== p.id);
//应用类型字符串
// 基本类型字符串：由单引号或者双引号括起来的一串字符串。
let zhang:string

// 引用类型字符串：用new 实例化的 String类型。import { Guard, Result } from 'shared/core';
import { Entity, UniqueEntityID } from 'shared/domain';

import { UserId } from './user-id';
import { RoleName } from './role-name';
import { ContextType } from './context-type';

export interface RoleProps {
  name: RoleName;
  contextType: ContextType;
  permissions: string[];
}

export class Role extends Entity<RoleProps> {
  get roleId() {
    return UserId.create(this._id).getValue();
  }

  get name() {
    return this.props.name;
  }

  get contextType() {
    return this.props.contextType;
  }

  get permissions(


/** @file i2c_bus_core.h
 *
 *  I2C bus detection and inspection
 */
// Copyright (C) 2014-2025 Sanford Rockowitz <rockowitz@minsoft.com>
// SPDX-License-Identifier: GPL-2.0-or-later

#ifndef I2C_BUS_CORE_H_
#define I2C_BUS_CORE_H_

/** \cond */
#include <glib-2.0/glib.h>
#include <stdbool.h>
#include <stdio.h>
/** \endcond */

#include "util/data_structures.h"
#include "util/edid.h"
#include "util/error_info.h"

#include "base/core.h"
#include "base/displays.h"
#include "base/execution_stats.h"
#include "base/i2c_bus_base.h"
#include "base/parms.h"
#include "base/status_code_mgt.h"

#include "sysfs/sysfs_sys_drm_connector.h"

/** \def I2C_SLAVE_ADDR_MAX Addresses on an I2C bus are 7 bits in size */
#define I2C_SLAVE_ADDR_MAX 128

extern bool i2c_force_bus;
extern bool all_video_adapters_implement_drm;
extern bool use_drm_connector_states;
extern bool try_get_edid_from_sysfs_first;
extern int  i2c_businfo_async_threshold;
extern bool cross_instance_locks_enabled;

Byte_Value_Array get_i2c_devices_by_existence_test(bool include_ignorable_devices);

// Lifecycle
I2C_Bus_Info *   remove_i2c_bus_info();

// Bus open and close
void             add_open_failures_reported(Bit_Set_256 failures);
void             include_open_failures_reported(int busno);
Error_Info *     open_bus_basic(const char * filename,  Byte callopts, int* fd_loc);
Error_Info *     i2c_open_bus_basic(const char * filename,  Byte callopts, int* fd_loc);
Error_Info *     i2c_open_bus(int busno, Byte callopts, int * fd_loc);
#ifdef ALT_LOCK_REC
Error_Info *     i2c_open_bus(int busno, Display_Lock_Record lockrec, Byte callopts, int * fd_loc);
#endif
Status_Errno     i2c_close_bus(int busno, int fd, Call_Options callopts);

// Bus inspection
I2C_Bus_Info *   i2c_get_and_check_bus_info(int busno);
bool             i2c_edid_exists(int busno);
Error_Info *     i2c_check_bus(I2C_Bus_Info * businfo);
Error_Info *     i2c_check_open_bus_alive(Display_Handle * dh);

// Bus inventory - detect and probe buses

Byte_Value_Array                // one byte for each I2C bus number
get_i2c_device_numbers_using_udev(bool include_ignorable_devices);

Bit_Set_256      buses_bitset_from_businfo_array(GPtrArray * buses, bool only_connected);   // buses: array of I2C_Bus_Info
GPtrArray *      i2c_detect_buses0();
int              i2c_detect_buses();            // creates internal array of Bus_Info for I2C buses
I2C_Bus_Info *   i2c_detect_single_bus(int busno);
Byte_Value_Array i2c_detect_attached_buses();
Bit_Set_256      i2c_detect_attached_buses_as_bitset();
Bit_Set_256      i2c_filter_buses_w_edid_as_bitset(BS256 bs_all_buses) ;
Bit_Set_256      i2c_buses_w_edid_as_bitset();

// Reports
void             i2c_report_active_bus(I2C_Bus_Info * businfo, int depth);

// Initialization
void             subinit_i2c_bus_core();
void             init_i2c_bus_core();

#endif /* I2C_BUS_CORE_H_ */


  const CommentWidget({
    super.key,
    this.comments,
    this.size,
    this.position,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      width: size ?? context.iconSizeLarge,
      height: (size ?? context.iconSizeLarge),
      //padding: const EdgeInsets.all(Margins.quarter),
      decoration: const BoxDecoration(
          //borderRadius: BRadius.standard,
          // color: context.surfaceColor,
          //border: Border.all(color: context.secondaryColor, width: 1),
          ),
      child: Stack(
        alignment: Alignment.center,
        children: [
          Icon(
            FontAwesomeIcons.handFist,
            size: size ?? context.iconSizeLarge,
            color: position?.color.withOpacity(0.25) ??
                context.primaryColorWithOpacity,
          ),
          Text(
            (comments ?? 0) > 999
                ? "${(comments ?? 0) ~/ 1000}K+"
                : (comments ?? 0).toString(),
            style: (size ?? 0) > IconSize.large
                // we dont use oncolor since opacity is used
                ? context.h3.copyWith(color: context.primaryColor)
                : context.l.copyWith(color: context.primaryColor),
          ),
        ],
      ),
    );
  }
}
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:political_think/common/components/branding.dart';
import 'package:political_think/common/components/logo.dart';
import 'package:political_think/common/components/zback_button.dart';
import 'package:political_think/common/constants.dart';
import 'package:political_think/common/extensions.dart';

class ZAppBar extends ConsumerStatefulWidget implements PreferredSizeWidget {
  ZAppBar({
    super.key,
    this.leading = const [],
    this.actions = const [],
    this.center,
    this.showBackButton = false,
    this.showLogo = false,
    this.showAppName = false,
  }) : assert(
            !showBackButton && !showAppName && leading.isEmpty ||
                !showBackButton && showAppName && leading.isEmpty ||
                !showBackButton && leading.isNotEmpty && !showAppName ||
                showBackButton && !showAppName && leading.isEmpty,
            "Can only have one or none of backbutton, appname, leading");
  final bool showBackButton;
  final bool showLogo;
  final bool showAppName;
  final List<Widget> actions;
  final List<Widget> leading;
  final Widget? center;

  @override
  ConsumerState<ConsumerStatefulWidget> createState() => _ZAppBarState();

  final PreferredSizeWidget appBar = AppBar();

  @override
  Size get preferredSize => appBar.preferredSize;
}

class _ZAppBarState extends ConsumerState<ZAppBar> {
  @override
  Widget build(BuildContext context) {
    return Stack(
      alignment: Alignment.center,
      children: [
        Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            widget.showBackButton
                ? const ZBackButton()
                : widget.showAppName
                    // TODO: Padding because IconButton ZBackButton is padded
                    ? const Padding(
                        padding: EdgeInsets.symmetric(horizontal: Margins.half),
                        child: LogoName(),
                      )
                    // TODO: Padding because IconButton in ZBackButton is padded
                    : const SizedBox.shrink(),
            if (widget.leading.isNotEmpty) ...widget.leading,
            if (widget.leading.isEmpty && context.isIosBrowser)
              const DownloapApp(),
            co


Analogy between biological and artificial neural networks:

![](https://i.imgur.com/ktSEFVJ.png)

### The neuron as a simple computing element:

![](https://i.imgur.com/bajThRP.png)

The neuron computes the weighted sum of the input signals and compares the result with a threshold value, q. If the net input is less than the threshold, the neuron output is -1. But if the net input is greater than or equal to the threshold, the neuron becomes activated and its output attains a value +1.

The neuron uses the following transfer or activation function:

![](https://i.imgur.com/MjVULkr.png)

This type of activation function is called a sign function.

### Activation functions of a neuron:

![](https://i.imgur.com/ISl3VDB.png)

### Can a single neuron learn a task?

In 1958, Frank Rosenblatt introduced a training algorithm that provided the first procedure for training a simple ANN: a perceptron.

The perceptron is the simplest form of a neural network. It consists of a single neuron with adjustable synaptic weights and a hard limiter.

### Single-layer two-input perceptron:

![](https://i.imgur.com/otnz3KT.png)

### The Perceptron:

The operation of Rosenblatt’s perceptron is based on the McCulloch and Pitts neuron model. The model consists of a linear combiner followed by a hard limiter.

The weighted sum of the inputs is applied to the hard limiter, which produces an output equal to +1 if its input is positive and −1 if it is negative.

The aim of the perceptron is to classify inputs, x1, x2, . . ., xn, into one of two classes, say A1 and A2.

In the case of an elementary perceptron, the n-dimensional space is divided by a hyperplane into two decision regions. The hyperplane is defined by the linearly separable function:

![](https://i.imgur.com/sRGFTpn.png)

### Linear separability in the perceptrons:

![](https://i.imgur.com/9DMnUoY.png)

### How does the perceptron learn its classification tasks?

This is done by making small adjustments in the weights to reduce the difference between the actual and desired outputs of the perceptron. The initial weights are randomly assigned, usually in the range [−0.5, 0.5], and then updated to obtain the output consistent with the training examples.

If at iteration p, the actual output is Y(p) and the
desired output is Yd (p), then the error is given by:

![](https://i.imgur.com/kJuOMK2.png)

### The perceptron learning rule:

![](https://i.imgur.com/5PpG9Oz.png)

where p = 1, 2, 3, . . .

α is the learning rate, a positive constant less than unity.

The perceptron learning rule was first proposed by Rosenblatt in 1960. Using this rule we can derive the perceptron training algorithm for classification tasks.

### Perceptron's training algorithm:

Step 1: Initialisation</mark


view.copy(timeSpent = duration2)
        )
        val sessionEndedMetric = stubSessionEndedMetric()

        // When
        sessionEndedMetric.onViewTracked(currentSessionViewEvent)
        sessionEndedMetric.onViewTracked(differentSessionViewEvent)

        // Then
        val attributes = sessionEndedMetric.toMetricAttributes(fakeNtpOffsetAtEnd)
        val rse = attributes[SessionEndedMetric.RSE_KEY] as Map<*, *>
        val viewCounts = rse[SessionEndedMetric.VIEW_COUNTS_KEY] as Map<*, *>
        assertThat(viewCounts[SessionEndedMetric.VIEW_COUNTS_TOTAL_KEY]).isEqualTo(1)
    }

    @Test
    fun `M calculate total view counts W onViewTracked`(@Forgery events: List<ViewEvent>) {
        // Given
        val sessionEndedMetric = stubSessionEndedMetric()

        // When
        events.map {
            it.copy(session = it.session.copy(id = fakeSessionId))
        }.forEach {
            sessionEndedMetric.onViewTracked(it)
        }

        // Then
        val attributes = sessionEndedMetric.toMetricAttributes(fakeNtpOffsetAtEnd)
        val rse = attributes[SessionEndedMetric.RSE_KEY] as Map<*, *>
        val viewCounts = rse[SessionEndedMetric.VIEW_COUNTS_KEY] as Map<*, *>
        assertThat(viewCounts[SessionEndedMetric.VIEW_COUNTS_TOTAL_KEY]).isEqualTo(events.count())
    }

    @Test
    fun `M calculate has replay count W onViewTracked()`(@Forgery events: List<ViewEvent>) {
        // Given
        val sessionEndedMetric = stubSessionEndedMetric()

        // When
        events.map {
            it.copy(session = it.session.copy(id = fakeSessionId))
        }.forEach {
            sessionEndedMetric.onViewTracked(it)
        }

        // Then
        val attributes = sessionEndedMetric.toMetricAttributes(fakeNtpOffsetAtEnd)
        val rse = attributes[SessionEndedMetric.RSE_KEY] as Map<*, *>
        val viewCounts = rse[SessionEndedMetric.VIEW_COUNTS_KEY] as Map<*, *>
        assertThat(viewCounts[SessionEndedMetric.VIEW_COUNT_WITH_HAS_REPLAY]).isEqualTo(
            events.count {
                it.session.hasReplay == true
            }
        )
    }

    @Test
    fun `M count correct number of background views W track views`(
        @Forgery events: List<ViewEvent>,
        forge: Forge
    ) {
        // Given
        val sessionEndedMetric = stubSessionEndedMetric()
        val backgroundViewCount = forge.anInt(min = 1, max = events.size + 1)

        // When
        events.mapIndexed { index, viewEvent ->
            val url = if (index in 0 until backgroundViewCount) {
                RumViewManagerScope.RUM_BACKGROUND_VIEW_URL
            } else {
                viewEvent.view.url
            }
            viewEvent.copy(
                session = viewEvent.session.copy(id = fakeSessionId),
                view = viewEvent.view.copy(url = url)
            )
        }.forEach {
            sessionEndedMetric.onViewTracked(it)
        }

        // Then
        val attributes = sessionEndedMetric.toMetricAttributes(fakeNtpOffsetAtEnd)
        val rse = attributes[SessionEndedMetric.RSE_KEY] as Map<*, *>
        val viewCounts = rse[SessionEndedMetric.VIEW_COUNTS_KEY] as Map<*, *>
        assertThat(viewCounts[SessionEndedMetric.VIEW_COUNTS_BG_KEY]).isEqualTo(backgroundViewCount)
    }

    @Test
    fun `M view counts app launch correct W track views`(
        @Forgery events: List<ViewEvent>,
        forge: Forge
    ) {


ect(":catalogs:catalog-common")) {
    exclude("*")
  }
  implementation(project(":catalogs:hadoop-common")) {
    exclude("*")
  }

  implementation(libs.aliyun.credentials.sdk)
  implementation(libs.commons.collections3)

  // oss needs StringUtils from commons-lang3 or the following error will occur in 3.3.0
  // java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
  // org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystemStore.initialize(AliyunOSSFileSystemStore.java:111)
  // org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem.initialize(AliyunOSSFileSystem.java:323)
  // org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3611)
  implementation(libs.commons.lang3)
  implementation(libs.guava)

  implementation(libs.httpclient)
  implementation(libs.jackson.databind)
  implementation(libs.jackson.annotations)
  implementation(libs.jackson.datatype.jdk8)
  implementation(libs.jackson.datatype.jsr310)

  // Aliyun oss SDK depends on this package, and JDK >= 9 requires manual add
  // https://www.alibabacloud.com/help/en/oss/developer-reference/java-installation?spm=a2c63.p38356.0.i1
  implementation(libs.sun.activation)

  testImplementation(project(":api"))
  testImplementation(project(":core"))
  testImplementation(project(":common"))
  testImplementation(libs.junit.jupiter.api)
  testImplementation(libs.junit.jupiter.params)
  testRuntimeOnly(libs.junit.jupiter.engine)
}

tasks.withType(ShadowJar::class.java) {
  isZip64 = true
  configurations = listOf(project.configurations.runtimeClasspath.get())
  archiveClassifier.set("")
  mergeServiceFiles()

  dependencies {
    exclude(dependency("org.slf4j:slf4j-api"))
  }

  // Relocate dependencies to avoid conflicts
  relocate("com.aliyun", "org.apache.gravitino.aliyun.shaded.com.aliyun")
  relocate("com.fasterxml.jackson", "org.apache.gravitino.aliyun.shaded.com.fasterxml.jackson")
  relocate("com.google", "org.apache.gravitino.aliyun.shaded.com.google.common")
  relocate("com.sun.activation", "org.apache.gravitino.aliyun.shaded.com.sun.activation")
  relocate("com.sun.istack", "org.apache.gravitino.aliyun.shaded.com.sun.istack")
  relocate("com.sun.xml", "org.apache.gravitino.aliyun.shaded.com.sun.xml")
  relocate("okhttp3", "org.apache.gravitino.aliyun.shaded.okhttp3")
  relocate("okio", "org.apache.gravitino.aliyun.shaded.okio")
  relocate("org.apache.commons", "org.apache.gravitino.aliyun.shaded.org.apache.commons")
  relocate("org.apache.http", "org.apache.gravitino.aliyun.shaded.org.apache.http")
  relocate("org.checkerframework", "org.apache.gravitino.aliyun.shaded.org.checkerframework")
  relocate("org.jacoco.agent.rt", "org.apache.gravitino.aliyun.shaded.org.jacoco.agent.rt")

  mergeServiceFiles()
}

tasks.jar {
  dependsOn(tasks.named("shadowJar"))
  archiveClassifier.set("empty")
}

tasks.compileJava {
  dependsOn(":catalogs:catalog-fileset:runtimeJars")
}
package org.acme.kotlin.schooltimetabling.domain

import org.optaplanner.core.api.domain.solution.PlanningEntityCollectionProperty
import org.optaplanner.core.api


terceptorNames = '
        '<String,List<RouteInterceptor>>{${interceptorsString.toString()}};',
      );
      constantsSb.write('\n');
      imports.add(
        'import \'package:ff_annotation_route_library/ff_annotation_route_library.dart\';',
      );
    }

    if (constantsSb.isEmpty) {
      constantsSb.write(fileHeader);
    }
    final className = Args().className;
    constantsSb.write(
      '/// The routes auto generated by '
      'https://github.com/fluttercandies/ff_annotation_route\n',
    );
    constantsSb.write('class $className {\n');
    constantsSb.write('const $className._();\n');

    final bool enableSuperArguments = Args().enableSuperArguments;
    for (final RouteInfoBase it in routes!) {
      if (constIgnore != null && constIgnore.hasMatch(it.ffRoute.name)) {
        continue;
      }
      it.getRouteConst(enableSuperArguments, constantsSb);
    }
    constantsSb.write('}');

    if (enableSuperArguments) {
      for (final RouteInfoBase it in routes!) {
        if (it.argumentsClass != null) {
          if (constIgnore != null && constIgnore.hasMatch(it.ffRoute.name)) {
            continue;
          }
          constantsSb.write(it.argumentsClass);
          if (!Args().enableNullSafety &&
              it.argumentsClass!.contains('@required')) {
            imports.add(_required);
          }
          if (it.argumentsClass!.contains('Key')) {
            imports.add(_required);
          }
          if (it.ffRoute.argumentImports != null &&
              it.ffRoute.argumentImports!.isNotEmpty) {
            imports.addAll(it.ffRoute.argumentImports!);
          }
        }
      }
      imports.addAll(DartTypeAutoImportHelper().imports);
      imports.addAll(FileInfo.imports);
    }

    String? constants;

    if (constantsSb.isNotEmpty) {
      constants = constantsSb.toString();

      if (imports.isNotEmpty) {
        final StringBuffer sb = StringBuffer();
        writeImports(imports, sb);
        constants = sb.toString() + constants;
      }
      constants = fileHeader + constants;
    }

    if (constants != null) {
      file.createSync(recursive: true);
      file.writeAsStringSync(
        formatDart(content: constants, directory: lib.path),
      );
      print('Generate : ${p.relative(file.path, from: lib.parent.path)}');
    }
  }

  static io.File deleteFile({
    required String packageName,
    required io.Directory lib,
  }) {
    final String? routesFileOutputPath = Args().routesFileOutputPath;
    String g = '';
    if (Args().gSuffix.value == true) {
      g = '.g';
    }
    final String name = '${packageName}_routes$g.dart';
    String routePath;

    if (routesFileOutputPath != null) {
      routePath = p.join(lib.path, routesFileOutputPath, name);
    } else {
      routePath = p.join(lib.path, name);
    }

    final file = io.File(routePath);
    if (file.existsSync()) {
      file.deleteSync();
    }
    return file;
  }
}
import 'arg_parser.dart';

abstract class Argument<T> {
  Argument() {
    if (false is T) {
      parser.addFlag(
        name,
        abbr: abbr,
        help: help,
        defaultsTo: defaultsTo as bool?,
      );
    } else if ('' is T) {
      parser.addOption(
        name,
        abbr: abbr,
        help: help,
        defaultsTo: defaultsTo as String?,
      );
    } else if (<String>[] is T) {
      parser.


using Application.Interfaces.Extensions;
using FluentAssertions;
using JetBrains.Annotations;
using Xunit;

namespace Application.Interfaces.UnitTests.Extensions;

[Trait("Category", "Unit")]
public class GetOptionsExtensionsSpec
{
    [Fact]
    public void WhenShouldExpandEmbeddedResourceAndNullOptions_ThenReturnsTrue()
    {
        var result = ((GetOptions)null!).ShouldExpandEmbeddedResource<TestResource>(x => x.AProperty1);

        result.Should().BeTrue();
    }

    [Fact]
    public void WhenShouldExpandEmbeddedResourceAndExpandIsAll_ThenReturnsTrue()
    {
        var result = new GetOptions(ExpandOptions.All).ShouldExpandEmbeddedResource<TestResource>(x => x.AProperty1);

        result.Should().BeTrue();
    }

    [Fact]
    public void WhenShouldExpandEmbeddedResourceAndExpandIsNone_ThenReturnsFalse()
    {
        var result = new GetOptions(ExpandOptions.None).ShouldExpandEmbeddedResource<TestResource>(x => x.AProperty1);

        result.Should().BeFalse();
    }

    [Fact]
    public void WhenShouldExpandEmbeddedResourceAndExpandIsCustomAndNoChildResources_ThenRetu


nfig(
        num_environments=args.num_environments,
        num_iterations=args.num_iterations,
        batch_size=args.batch_size,
        device=args.device,
        model_save_dir=args.output_dir
    )

    # Create trainer
    trainer = ZeroShotMetaTrainer(config)

    # Train
    metrics = trainer.train()

    # Print final results
    if metrics['zero_shot_success_rates'] and metrics['few_shot_success_rates']:
        final_zero_shot = metrics['zero_shot_success_rates'][-1]
        final_few_shot = metrics['few_shot_success_rates'][-1]

        print(f"\nTraining completed!")
        print(f"Final zero-shot success rate: {final_zero_shot:.4f}")
        print(f"Final few-shot success rate: {final_few_shot:.4f}")
        print(f"Target zero-shot success rate: {config.zero_shot_success_target:.4f}")
        print(f"Target few-shot success rate: {config.few_shot_success_target:.4f}")

        if final_zero_shot >= config.zero_shot_success_target:
            print("✓ Zero-shot target achieved!")
        else:
            print("✗ Zero-shot target not achieved")

        if final_few_shot >= config.few_shot_success_target:
            print("✓ Few-shot target achieved!")
        else:
            print("✗ Few-shot target not achieved")

if __name__ == "__main__":
    import sys
    import traceback

    try:
        main()
    except Exception as e:
        logger.error(f"Error in zero-shot meta-training: {e}")
        logger.error(traceback.format_exc())
        sys.exit(1)


v1beta3.Mutation.insert:type_name -> google.datastore.v1beta3.Entity
	28, // 19: google.datastore.v1beta3.Mutation.update:type_name -> google.datastore.v1beta3.Entity
	28, // 20: google.datastore.v1beta3.Mutation.upsert:type_name -> google.datastore.v1beta3.Entity
	22, // 21: google.datastore.v1beta3.Mutation.delete:type_name -> google.datastore.v1beta3.Key
	22, // 22: google.datastore.v1beta3.MutationResult.key:type_name -> google.datastore.v1beta3.Key
	1,  // 23: google.datastore.v1beta3.ReadOptions.read_consistency:type_name -> google.datastore.v1beta3.ReadOptions.ReadConsistency
	20, // 24: google.datastore.v1beta3.TransactionOptions.read_write:type_name -> google.datastore.v1beta3.TransactionOptions.ReadWrite
	21, // 25: google.datastore.v1beta3.TransactionOptions.read_only:type_name -> google.datastore.v1beta3.TransactionOptions.ReadOnly
	2,  // 26: google.datastore.v1beta3.Datastore.Lookup:input_type -> google.datastore.v1beta3.LookupRequest
	4,  // 27: google.datastore.v1beta3.Datastore.RunQuery:input_type -> google.datastore.v1beta3.RunQueryRequest
	6,  // 28: google.datastore.v1beta3.Datastore.BeginTransaction:input_type -> google.datastore.v1beta3.BeginTransactionRequest
	10, // 29: google.datastore.v1beta3.Datastore.Commit:input_type -> google.datastore.v1beta3.CommitRequest
	8,  // 30: google.datastore.v1beta3.Datastore.Rollback:input_type -> google.datastore.v1beta3.RollbackRequest
	12, // 31: google.datastore.v1beta3.Datastore.AllocateIds:input_type -> google.datastore.v1beta3.AllocateIdsRequest
	14, // 32: google.datastore.v1beta3.Datastore.ReserveIds:input_type -> google.datastore.v1beta3.ReserveIdsRequest
	3,  // 33: google.datastore.v1beta3.Datastore.Lookup:output_type -> google.datastore.v1beta3.LookupResponse
	5,  // 34: google.datastore.v1beta3.Datastore.RunQuery:output_type -> google.datastore.v1beta3.RunQueryResponse
	7,  // 35: google.datastore.v1beta3.Datastore.BeginTransaction:output_type -> google.datastore.v1beta3.BeginTransactionResponse
	11, // 36: google.datastore.v1beta3.Datastore.Commit:output_type -> google.datastore.v1beta3.CommitResponse
	9,  // 37: google.datastore.v1beta3.Datastore.Rollback:output_type -> google.datastore.v1beta3.RollbackResponse
	13, // 38: google.datastore.v1beta3.Datastore.AllocateIds:output_type -> google.datastore.v1beta3.AllocateIdsResponse
	15, // 39: google.datastore.v1beta3.Datastore.ReserveIds:output_type -> google.datastore.v1beta3.ReserveIdsResponse
	33, // [33:40] is the sub-list for method output_type
	26, // [26:33] is the sub-list for method input_type
	26, // [26:26] is the sub-list for extension type_name
	26, // [26:26] is the sub-list for extension extendee
	0,  //