.

Addrses:0x03653160 mshtml!CCommentElement Addrses:0x0364a060 mshtml!CHtmlElement Addrses:0x03721f30 mshtml!CHeadElement Addrses:0x0364d200 mshtml!CScriptElement Addrses:0x0365ee48 mshtml!CBodyElement Addrses:0x001ae618 mshtml!CFormElement

	接着根据 PoC 中 exploit()函数的代码,ie 会依次创建以下这些元素

Address:0x037222c0 mshtml!CDivElement Address:0x03722320 mshtml!CPhraseElement Address:0x0024f0a0 mshtml!CButton Address:0x0372d1b0 mshtml!CBodyElement

	接着向每个结构的 firstChild 或者 parentNode 等字段内保存对应的对象，重新布局，最终结 构如图一。（具体的 Element 的对象结构，与版本相关，以及相应的偏移在之前的分析文档 中已经挖掘的差不多了，这里就不再重复，直接带过。）

	接着执行 PoC 中的代码 e2.innerHTML = “”;

这导致在 mshtml!COmWindowProxy::FireEvent 事件中释放 CButton 对象

	析构完后自然是将Buffer直接Free掉了

	要注意的是，虽然此时CButton的内存空间已经释放，但保存在CDoc中的信息别没有删除，仍然存在，只是指向了一块已经释放的内存。

	接下来在mshtml!CElement::FindDefaultElem()函数中会寻找默认的元素，根据元素的创建顺序以及焦点等相关因素，默认元素应该为我们上面最后创建的Button，保存于CDoc+0x1A8的位置。

FindDefaultElem()函数最终从CDoc中取出DefaultElement，本例中正常时应返回CButton对象地址，但此时指向的内存正是前面释放的。


using Telerik.UI.Xaml.Controls.Chart;

namespace Telerik.UI.Automation.Peers
{
    /// <summary>
    /// AutomationPeer class for <see cref="CandlestickSeries"/>.
    /// </summary>
    public class CandlestickSeriesAutomationPeer : ChartSeriesAutomationPeer
    {
        /// <summary>
        /// Initializes a new instance of the CandlestickSeriesAutomationPeer class.
        /// </summary>
        public CandlestickSeriesAutomationPeer(CandlestickSeries owner)
            : base(owner)
        {
        }


namespace NServiceBus.Core.Tests.AssemblyScanner;

using System.IO;
using System.Linq;
using Hosting.Helpers;
using NUnit.Framework;

[TestFixture]
public class When_scanning_directory_with_nested_directories
{
    [Test]
    public void Should_not_scan_nested_directories_by_default()
    {
        var scanner = new AssemblyScanner(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestDlls", "Nested"))
        {
            ScanAppDomainAssemblies = false
        };

        var result = scanner.GetScannableAssemblies();

        var foundTypeFromNestedAssembly = result.Types.Any(x => x.Name == "NestedClass");
        var foundTypeFromDerivedAssembly = result.Types.Any(x => x.Name == "DerivedClass");

        using (Assert.EnterMultipleScope())
        {
            Assert.That(foundTypeFromNestedAssembly, Is.False, "Was expected not to scan nested assemblies, but 'nested.dll' was scanned.");
            Assert.That(foundTypeFromDerivedAssembly, Is.False, "Was expe


class Conta:
    def __init__(self, numero, titular, saldo=0.0):
        self.numero = numero
        self.__saldo = saldo
        self.titular = titular

    def sacar(self, valor):
        assert type(valor) == int or type(valor) == float, "Valor passado deve ser um número"
        assert valor > 0, "O valor do saque deve ser maior do que 0"
        assert self.__saldo >= valor, "Saldo insuficiente"
        self.__saldo -= valor

    def depositar(self, valor):
        assert type(valor) == int or type(valor) == float, "Valor passado deve ser um número"
        assert valor > 0, "O valor do depósito deve ser maior do que 0"
        self.__saldo += valor

    @property
    def numero(self):
        return self.__numero

    @numero.setter
    def numero(self, n):
        self.__numero = n

    @property
    def saldo(self):
        return self.__saldo

    @property
    def titular(self):
        return self.__titular

    @titular.setter
    def titular(self, t):
        self.__titular = t

    def __str__(self):
        return f"Conta: {self.numero}, Titular: {self.titular}, Saldo: {self.saldo}"

if __name__ == '__main__':
    print("Bem-vindos ao programa de contas bancárias")
    print("Vamos criar a sua conta!")
    numero_conta = input("Digite o número da conta")
    titular = input("Digite o nome do titular")
    c = Conta(numero_conta, titular)

    while True:
        print("Opções disponíveis")
        print("1 - depositar")
        print("2 - sacar")
        print("3 - saldo")
        print("4 - encerrar o programa")

        opcao = 0
        try:
            opcao = int(input("Digite a opção desejada: "))
        except:
            print("Opção inválida")
            continue

        if opcao == 1:
            try:
                valor = float(input("Digite o valor que deseja depositar: "))
                c.depositar(valor)
            except AssertionError as e:
                print(e)
            except ValueError as e:
                print("O valor deve ser do tipo float ou int")
        elif opcao == 2:
            try:
                valor = float(input("Digite o valor que deseja sacar: "))
                c.sacar(valor)
            except AssertionError as e:
                print(e)
            except ValueError as e:
                print("O valor deve ser do tipo float ou int")
        elif opcao == 3:
            print("Saldo da conta = ", c.saldo)
        elif opcao == 4:
            print("Obrigado por usar o nosso programa")
            break
        else:
            print("Opção inválida")


--[[
 * ReaScript Name:
 * Author:
 * Author URI:
 * Licence: GPL v3
 * REAPER: 5.0
 * Version: 1.0
--]]

--[[
 * Changelog:
 * v1.0 (2016-07-21)
	+ Initial Release
--]]

local reaper = reaper

function Main( take )

	retval, notes, ccs, sysex = reaper.MIDI_CountEvts( take )

	-- GET SELECTED NOTES (from 0 index)
	for id = 0, ccs - 1 do

		local retval, sel, muted, startppq, chanmsg, chan, msg2, val = reaper.MIDI_GetCC( take, id )

		if sel then

			-- ACTION HERE
			val = 100 -- 0-127

			reaper.MIDI_SetCC( take, id, sel, muted, startpp


GradientType=0)}.progress-bar-info{background-image:-webkit-gradient(linear,left 0,left 100%,from(#5bc0de),to(#31b0d5));background-image:-webkit-linear-gradient(top,#5bc0de,0%,#31b0d5,100%);background-image:-moz-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff31b0d5',GradientType=0)}.progress-bar-warning{background-image:-webkit-gradient(linear,left 0,left 100%,from(#f0ad4e),to(#ec971f));background-image:-webkit-linear-gradient(top,#f0ad4e,0%,#ec971f,100%);background-image:-moz-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e',endColorstr='#ffec971f',GradientType=0)}.progress-bar-danger{background-image:-webkit-gradient(linear,left 0,left 100%,from(#d9534f),to(#c9302c));background-image:-webkit-linear-gradient(top,#d9534f,0%,#c9302c,100%);background-image:-moz-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f',endColorstr='#ffc9302c',GradientType=0)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-gradient(linear,left 0,left 100%,from(#428bca),to(#3278b3));background-image:-webkit-linear-gradient(top,#428bca,0%,#3278b3,100%);background-image:-moz-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);background-repeat:repeat-x;border-color:#3278b3;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff3278b3',GradientType=0)}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.panel-default>.panel-heading{background-image:-webkit-gradient(linear,left 0,left 100%,from(#f5f5f5),to(#e8e8e8));background-image:-webkit-linear-gradient(top,#f5f5f5,0%,#e8e8e8,100%);background-image:-moz-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#ffe8e8e8',GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-gradient(linear,left 0,left 100%,from(#428bca),to(


                    }

                    State.PAUSED -> Log.warning(
                        "[EmulationFragment] Surface cleared while emulation paused."
                    )

                    else -> Log.warning(
                        "[EmulationFragment] Surface cleared while emulation stopped."
                    )
                }
            }
        }

        private fun runWithValidSurface(programIndex: Int = 0) {
            NativeLibrary.surfaceChanged(surface)
            if (!emulationCanStart.invoke()) {
                return
            }

            when (state) {
                State.STOPPED -> {
                    emulationThread = Thread({
                        Log.debug("[EmulationFragment] Starting emulation thread.")
                        NativeLibrary.run(gamePath, programIndex, true)
                    }, "NativeEmulation")
                    emulationThread.start()
                }

                State.PAUSED -> {
                    Log.debug("[EmulationFragment] Resuming emulation.")
                    NativeLibrary.unpauseEmulation()
                }

                else -> Log.debug("[EmulationFragment] Bug, run called while already running.")
            }
            state = State.RUNNING
        }

        private enum class State {
            STOPPED, RUNNING, PAUSED
        }
    }

    companion object {
        private val perfStatsUpdateHandler = Handler(Looper.myLooper()!!)
        private val thermalStatsUpdateHandler = Handler(Looper.myLooper()!!)
    }

    private fun getBatteryTemperature(context: Context): Float {
        try {
            val batteryIntent = context.registerReceiver(null, IntentFilter(Intent.ACTION_BATTERY_CHANGED))
            // Temperature in tenths of a degree Celsius
            val temperature = batteryIntent?.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, 0) ?: 0
            // Convert to degrees Celsius
            return temperature / 10.0f
        } catch (e: Exception) {
            Log.error("[EmulationFragment] Failed to get battery temperature: ${e.message}")
            return 0.0f
        }
    }
}
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

package org.sumi.sumi_emu.model

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import org.sumi.sumi_emu.R

data class Applet(
    @StringRes val titleId: Int,
    @StringRes val descriptionId: Int,
    @DrawableRes val iconId: Int,
    val appletInfo: AppletInfo,
    val cabinetMode: CabinetMode = CabinetMode.None
)

// Combination of Common::AM::Applets::AppletId enum and the entry id
enum class AppletInfo(val appletId: Int, val entryId: Long = 0) {
    None(0x00),
    Application(0x01),
    OverlayDisplay(0x02),
    QLaunch(0x03),
    Starter(0x04),
    Auth(0x0A),
    Cabinet(0x0B, 0x0100000000001002),
    Controller(0x0C),
    DataErase(0x0D),
    Error(0x0E),
    NetConnect(0x0F),
    ProfileSelect(0x10),
    SoftwareKeyboard(0x11),
    MiiEdit(0x12, 0x0100000000001009),
    Web(0x13),
    Shop(0x14),
    PhotoViewer(0x015, 0x010000000000100D),
    Settings(0x16),
    OfflineWeb(0x17),
    LoginShare(0x18),
    WebAuth(0x19),
    MyPage(0x1A)
}

// Matches enum in Service::NFP::CabinetMode with extra metadata
enum class CabinetMode(
    val id: Int,
    @StringRes val titleId: Int = 0,
    @DrawableRes val iconId: Int = 0
) {
    None(-1),
    StartNi


 // example is the blue channel of the second destination pixel. Memory
        // layout is shown for an ARGB byte order in a color value.

        // src and srcA store 8-bit values interleaved with zeros.
        // src  = (0xFF, 0, sR, 0, sG, 0, sB, 0, 0xFF, 0, sR, 0, sG, 0, sB, 0)
        // mask stores 16-bit values (shown as high and low bytes) interleaved with
        // zeros
        // mask = (m0RGBLo, m0RGBHi, 0, 0, m1RGBLo, m1RGBHi, 0, 0,
        //         m2RGBLo, m2RGBHi, 0, 0, m3RGBLo, m3RGBHi, 0, 0)

        // Get the R,G,B of each 16bit mask pixel, we want all of them in 5 bits.
        // r = (0, m0R, 0, 0, 0, m1R, 0, 0, 0, m2R, 0, 0, 0, m3R, 0, 0)
        __m128i r = _mm_and_si128(SkPackedR16x5ToUnmaskedR32x5_SSE2(mask),
                                  _mm_set1_epi32(0x1F << SK_R32_SHIFT));

        // g = (0, 0, m0G, 0, 0, 0, m1G, 0, 0, 0, m2G, 0, 0, 0, m3G, 0)
        __m128i g = _mm_and_si128(SkPackedG16x5ToUnmaskedG32x5_SSE2(mask),
                                  _mm_set1_epi32(0x1F << SK_G32_SHIFT));

        // b = (0, 0, 0, m0B, 0, 0, 0, m1B, 0, 0, 0, m2B, 0, 0, 0, m3B)
        __m128i b = _mm_and_si128(SkPackedB16x5ToUnmaskedB32x5_SSE2(mask),
                                  _mm_set1_epi32(0x1F << SK_B32_SHIFT));

        // Pack the 4 16bit mask pixels into 4 32bit pixels, (p0, p1, p2, p3)
        // Each component (m0R, m0G, etc.) is then a 5-bit value aligned to an
        // 8-bit position
        // mask = (0, m0R, m0G, m0B, 0, m1R, m1G, m1B,
        //         0, m2R, m2G, m2B, 0, m3R, m3G, m3B)
        mask = _mm_or_si128(_mm_or_si128(r, g), b);

        // Interleave R,G,B into the lower byte of word.
        // i.e. split the sixteen 8-bit values from mask into two sets of eight
        // 16-bit values, padded by zero.
        __m128i maskLo, maskHi;
        // maskLo = (0, 0, m0R, 0, m0G, 0, m0B, 0, 0, 0, m1R, 0, m1G, 0, m1B, 0)
        maskLo = _mm_unpacklo_epi8(mask, _mm_setzero_si128());
        // maskHi = (0, 0, m2R, 0, m2G, 0, m2B, 0, 0, 0, m3R, 0, m3G, 0, m3B, 0)
        maskHi = _mm_unpackhi_epi8(mask, _mm_setzero_si128());

        // Upscale from 0..31 to 0..32
        // (allows to replace division by left-shift further down)
        // Left-shift each component by 4 and add the result back to that component,
        // mapping numbers in the range 0..15 to 0..15, and 16..31 to 17..32
        maskLo = _mm_add_epi16(maskLo, _mm_srli_epi16(maskLo, 4));
        maskHi = _mm_add_epi16(maskHi, _mm_srli_epi16(maskHi, 4));

        // Inter


range(&mut self, pos: usize, end: usize) {
        unsafe {
            let mut hole = Hole::new(&mut self.data, pos);
            let mut child = 2 * pos + 1;
            while child < end {
                let right = child + 1;
                // compare with the greater of the two children
                if right < end && !(hole.get(child) > hole.get(right)) {
                    child = right;
                }
                // if we are already in order, stop.
                if hole.element() >= hole.get(child) {
                    break;
                }
                hole.move_to(child);
                child = 2 * hole.pos() + 1;
            }
        }
    }

    fn sift_down(&mut self, pos: usize) {
        let len = self.len();
        self.sift_down_range(pos, len);
    }

    /// Take an element at `pos` and move it all the way down the heap,
    /// then sift it up to its position.
    ///
    /// Note: This is faster when the element is known to be large / should
    /// be closer to the bottom.
    fn sift_down_to_bottom(&mut self, mut pos: usize) {
        let end = self.len();
        let start = pos;
        unsafe {
            let mut hole = Hole::new(&mut self.data, pos);
            let mut child = 2 * pos + 1;
            while child < end {
                let right = child + 1;
                // compare with the greater of the two children
                if right < end && !(hole.get(child) > hole.get(right)) {
                    child = right;
                }
                hole.move_to(child);
                child = 2 * hole.pos() + 1;
            }
            pos = hole.pos;
        }
        self.sift_up(start, pos);
    }

    fn rebuild(&mut self) {
        let mut n = self.len() / 2;
        while n > 0 {
            n -= 1;
            self.sift_down(n);
        }
    }

    /// Moves all the elements of `other` into `self`, leaving `other` empty.
    ///
    /// # Examples
    ///
    /// Basic usage:
    ///
    /// ```
    /// use std::collections::BinaryHeap;
    ///
    /// let v = vec![-10, 1, 2, 3, 3];
    /// let mut a = BinaryHeap::from(v);
    ///
    /// let v = vec![-20, 5, 43];
    /// let mut b = BinaryHeap::from(v);
    ///
    /// a.append(&mut b);
    ///
    /// assert_eq!(a.into_sorted_vec(), [-20, -10, 1, 2, 3, 3, 5, 43]);
    /// assert!(b.is_empty());
    /// ```
    #[stable(feature = "binary_heap_append", since = "1.11.0")]
    pub fn append(&mut self, other: &mut Self) {
        if self.len() < other.len() {
            swap(self, other);
        }

        if other.is_empty() {
            return;
        }

        #[inline(always)]
        fn log2_fast(x: usize) -> usize {
            8 * size_of::<usize>() - (x.leading_zeros() as usize) - 1
        }

        // `rebuild` takes O(len1 + len2) operations
        // and about 2 * (len1 + len2) comparisons in the worst case
        // while `extend` takes O(len2 * log_2(len1)) operations
        // and about 1 * len2 * log_2(len1) comparisons in the worst case,
        // assuming len1 >= len2.
        #[inline]
        fn better_to_rebuild(len1: usize, len2: usize) -> bool {
            2 * (len1 + len2) < len2 * log


this amount
	 *
	 *
Type: Amount
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	BigDecimal getControlAmt();

	ModelColumn<I_GL_JournalBatch, Object> COLUMN_ControlAmt = new ModelColumn<>(I_GL_JournalBatch.class, "ControlAmt", null);
	String COLUMNNAME_ControlAmt = "ControlAmt";

	/**
	 * Get Created.
	 * Date this record was created
	 *
	 *
Type: DateTime
	 *
Mandatory: true
	 *
Virtual Column: false
	 */
	java.sql.Timestamp getCreated();

	ModelColumn<I_GL_JournalBatch, Object> COLUMN_Created = new ModelColumn<>(I_GL_JournalBatch.class, "Created", null);
	String COLUMNNAME_Created = "Created";

	/**
	 * Get Created By.
	 * User who created this records
	 *
	 *
Type: Table
	 *
Mandatory: true
	 *
Virtual Column: false
	 */
	int getCreatedBy();

	String COLUMNNAME_CreatedBy = "CreatedBy";

	/**
	 * Set Accounting Date.
	 * Accounting Date
	 *
	 *
Type: Date
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	void setDateAcct (@Nullable java.sql.Timestamp DateAcct);

	/**
	 * Get Accounting Date.
	 * Accounting Date
	 *
	 *
Type: Date
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	@Nullable java.sql.Timestamp getDateAcct();

	ModelColumn<I_GL_JournalBatch, Object> COLUMN_DateAcct = new ModelColumn<>(I_GL_JournalBatch.class, "DateAcct", null);
	String COLUMNNAME_DateAcct = "DateAcct";

	/**
	 * Set Document Date.
	 *
	 *
Type: Date
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	void setDateDoc (@Nullable java.sql.Timestamp DateDoc);

	/**
	 * Get Document Date.
	 *
	 *
Type: Date
	 *
Mandatory: false
	 *
Virtual Column: false
	 */
	@Nullable java.sql.Timestamp getDateDoc();

	ModelColumn<I_GL_JournalBatch, Object> COLUMN_DateDoc = new ModelColumn<>(I_GL_JournalBatch.class, "DateDoc", null);
	String COLUMNNAME_DateDoc = "DateDoc";

	/**
	 * Set Description.
	 *
	 *
Type: String
	 *
Mandatory: true
	 *
Virtual Column: false
	 */
	void setDescription (java.lang.String Description);

	/**
	 * Get Description.
	 *
	 *
Type: String
	 *
Mandatory: true
	 *
Virtual Column: false
	 */
	java.lang.String getDescription();

	ModelColumn<I_GL_JournalBatch, Object> COLUMN_Description = new ModelColumn<>(I_GL_JournalBatch.class, "Description", null);
	String COLUMNNAME_Description = "Description";

	/**
	 * Set Process Batch.
	 * Der zukünftige Status des Belegs
	 *
	 *
Type: Button
	 *
Mandatory: true
	 *
Virtual Column: false
	 */
	void setDocAction (java.lang.String DocAction);

	/**
	 * Get Process Batch.
	 * Der zukünftige Status des Belegs
	 *
	 *
Type: Button
	 *
Mandatory: true
	 *
Virtual Column: false
	 */
	java.lang.String getDocAction();

	ModelColumn<I_GL_JournalBatch, Object> COLUMN_DocAction = new ModelColumn<>(I_GL_JournalBatch.class, "DocAction", null);
	String COLUMNNAME_DocAction = "DocAction";

	/**
	 * Set Status.
	 *
	 *
Type: List
	 * <


(a[i*lda+i])
				}
				for j := i + 1; j < n; j++ {
					x[j] += xi * cmplx.Conj(a[i*lda+j])
				}
			}
		} else {
			ix := kx + (n-1)*incX
			for i := n - 1; i >= 0; i-- {
				xi := x[ix]
				if diag == blas.NonUnit {
					x[ix] *= cmplx.Conj(a[i*lda+i])
				}
				jx := ix + incX
				for j := i + 1; j < n; j++ {
					x[jx] += xi * cmplx.Conj(a[i*lda+j])
					jx += incX
				}
				ix -= incX
			}
		}
	} else {
		if incX == 1 {
			for i := 0; i < n; i++ {
				for j := 0; j < i; j++ {
					x[j] += x[i] * cmplx.Conj(a[i*lda+j])
				}
				if diag == blas.NonUnit {
					x[i] *= cmplx.Conj(a[i*lda+i])
				}
			}
		} else {
			ix := kx
			for i := 0; i < n; i++ {
				jx := kx
				for j := 0; j < i; j++ {
					x[jx] += x[ix] * cmplx.Conj(a[i*lda+j])
					jx += incX
				}
				if diag == blas.NonUnit {
					x[ix] *= cmplx.Conj(a[i*lda+i])
				}
				ix += incX
			}
		}
	}
}

// Ztrsv solves one of the systems of equations
//
//	A * x = b   if trans == blas.NoTrans
//	Aᵀ * x = b  if trans == blas.Trans
//	Aᴴ * x = b  if trans == blas.ConjTrans
//
// where b and x are n element vectors and A is an n×n triangular matrix.
//
// On entry, x contains the values of b, and the solution is
// stored in-place into x.
//
// No test for singularity or near-singularity is included in this
// routine. Such tests must be performed before calling this routine.
func (Implementation) Ztrsv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n int, a []complex128, lda int, x []complex128, incX int) {
	switch trans {
	default:
		panic(badTranspose)
	case blas.NoTrans, blas.Trans, blas.ConjTrans:
	}
	switch uplo {
	default:
		panic(badUplo)
	case blas.Upper, blas.Lower:
	}
	switch diag {
	default:
		panic(badDiag)
	case blas.NonUnit, blas.Unit:
	}
	if n < 0 {
		panic(nLT0)
	}
	if lda < max(1, n) {
		panic(badLdA)
	}
	if incX == 0 {
		panic(zeroIncX)
	}

	// Quick return if possible.
	if n == 0 {
		return
	}

	// For zero matrix size the following slice length checks are trivially satisfied.
	if len(a) < lda*(n-1)+n {
		panic(shortA)
	}
	if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1


import os
import glob
from .srdata import SRData
from .common import np2Tensor
import numpy as np
from .lovada_gt import get_patch
class Lovada(SRData):
    def __init__(self, args,name='Lovada', train=True, benchmark=False):
        super(Lovada, self).__init__(
            args, name, train=train, benchmark=benchmark
        )

    def _scan(self):
        if(self.train):
            names_lr = sorted(
                glob.glob(os.path.join(self.dir_lr, '*' + '.png'))
            )
            names_lr2 = sorted(
                glob.glob(os.path.join(self.dir_lr.replace('lama','repaint'), '*' + '.png'))
            )
            #names_lr=names_lr+names_lr2
            names_hr = []
            for f in names_lr:
                filename, _ = os.path.splitext(os.path.basename(f))
                names_hr.append(os.path.join(
                    self.dir_hr, '{}{}'.format(
                        filename, '.png'
                    )
                ))
            names_lr_gt = sorted(
                glob.glob(os.path.join(self.dir_lr_gt, '*' + '.png'))
            )
            names_hr_gt=[]
            for f in names_lr_gt:
                names_hr_gt.append(os.path.join(self.apath, 'gt_mask','gt_mask.png'))
        else:
            names_lr = sorted(
                glob.glob(os.path.join(self.dir_test_lr, '*' + '.png'))
            )
            names_lr2 = sorted(
                glob.glob(os.path.join(self.dir_test_lr.replace('lama','repaint'), '*' + '.png'))
            )
            #names_lr=names_lr+names_lr2
            names_hr = []
            for f in names_lr:
                filename, _ = os.path.splitext(os.path.basename(f))
                names_hr.append(os.path.join(
                    self.dir_test_hr, '{}{}'.format(
                        filename, '.png'
                    )
                ))
            names_lr_gt = sorted(
                glob.glob(os.path.join(self.dir_test_lr_gt, '*' + '.png'))
            )
            names_hr_gt = []
            for f in names_lr_gt:
                names_hr_gt.append(os.path.join(self.apath, 'gt_mask','gt_mask.png'))

        names_hr=names_hr_gt+names_hr
        names_lr=names_lr_gt+names_lr
        return names_hr, names_lr

    def __getitem__(self, idx):
        lr, label, filename = self._load_file(idx)  #whc
        lr,label = np2Tensor(*[lr,label], rgb_range=self.args.rgb_range) #归一化外加转成cwh
        real = not label.min()==0
        if(real):
            real=np.float32(1.0)
        else:
            real=np.float32(0.0)
        return lr, label[0,:,:],real,filename  #cwh

    def _set_filesystem(self, dir_data):
        super(Lovada, self)._set_filesystem(dir_data)
        self.dir_hr = os.path.join(self.apath, 'train/inpainted_mask')
        self.dir_lr = os.path.join(self.apath, 'train/lama/inpainted')
        #self.dir_lr = os.path.join(self.apath, 'train/gt_generated_place')
        self.dir_lr_gt = os.path.join(self.apath, 'train/gt')
        self.dir_test_hr = os.path.join(self.apath, 'test/inpainted_mask')
        self.dir_test_lr = os.path.join(self.apath, 'test/lama/inpainted')
        #self.dir_test_lr = os.path.join(self.apath, 'test/gt_generated_place')
        self.dir_test_lr_gt = os.path.join(self.apath, 'test/gt')


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mynt.Core.Enums;
using Mynt.Core.Indicators;
using Mynt.Core.Interfaces;
using Mynt.Core.Models;

namespace Mynt.Core.Strategies
{
    public class FisherTransform : BaseStrategy
    {
        public override string Name => "Fisher Transform";
        public override int MinimumAmountOfCandles => 40;
        public override Period IdealPeriod => Period.Hour;

        public override List<TradeAdvice> Prepare(List<Candle> candles)
        {
            var result = new List<TradeAdvice>();

            var fishers = candles.Fisher(10);
            var ao = candles.AwesomeOscillator();

            for (int i = 0; i < candles.Count;


family = 'iconfont';

  NEMeetingIconFont._();
  static const IconData icon_fail = IconData(0xe602,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_loading = IconData(0xe601,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_other_file = IconData(0xe61a,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_download = IconData(0xe611,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_unfold = IconData(0xe60e,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_file = IconData(0xe60f,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_image = IconData(0xe610,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_tv_voice_offx = IconData(0xe761,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_tv_voice_onx = IconData(0xe763,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_tv_video_onx = IconData(0xe760,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_tv_video_offx = IconData(0xe762,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_tv_invitex = IconData(0xe764,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_tv_attendeex = IconData(0xe765,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_tv_duankaix = IconData(0xe768,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_switch_camera = IconData(0xe72d,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_pc_successx = IconData(0xe76f,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_returnx = IconData(0xe788,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_input_clearx = IconData(0xe789,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_allowx = IconData(0xe7a5,
      fontPackage: meetingAssetsPackageName, fontFamily: _family);
  static const IconData icon_yx_tv_layout_bx = IconData(0xe7b2,
      font


 {
                log.debug(e) { "Sending progress callback failed" }
            }
        }
    }
}
// SPDX-FileCopyrightText: 2020 Sveriges Television AB
//
// SPDX-License-Identifier: EUPL-1.2

package se.svt.oss.encore.model.profile

import se.svt.oss.encore.config.EncodingProperties
import se.svt.oss.encore.model.EncoreJob
import se.svt.oss.encore.model.input.DEFAULT_AUDIO_LABEL
import se.svt.oss.encore.model.input.analyzedAudio
import se.svt.oss.encore.model.mediafile.toParams
import se.svt.oss.encore.model.output.AudioStreamEncode
import se.svt.oss.encore.model.output.Output

data class SimpleAudioEncode(
    val codec: String = "libfdk_aac",
    val bitrate: String? = null,
    val samplerate: Int? = null,
    val suffix: String = "_$codec",
    val params: LinkedHashMap<String, String> = linkedMapOf(),
    override val optional: Boolean = false,
    val format: String = "mp4",
    val inputLabel: String = DEFAULT_AUDIO_LABEL,
) : AudioEncoder() {
    override fun getOutput(job: EncoreJob, encodingProperties: EncodingProperties): Output? {
        val outputName = "${job.baseName}$suffix.$format"
        job.inputs.analyzedAudio(inputLabel)
            ?: return logOrThrow("Can not generate $outputName! No audio input with label '$inputLabel'.")
        val outParams = linkedMapOf<String, Any>()
        outParams += params
        outParams["c:a"] = codec
        samplerate?.let { outParams["ar"] = it }
        bitrate?.let { outParams["b:a"] = it }

        return Output(
            id = "$suffix.$format",
            video = null,
            audioStreams = listOf(
                AudioStreamEncode(
                    params = outParams.toParams(),
                    inputLabels = listOf(inputLabel),
                    preserveLayout = true,
                ),
            ),
            output = outputName,
        )
    }
}
// SPDX-FileCopyrightText: 2020 Sveriges Television AB
//
// SPDX-License-Identifier: EUPL-1.2

package se.svt.oss.encore.model.profile

import io.github.oshai.kotlinlogging.KotlinLogging
import se.svt.oss.encore.config.EncodingProperties
import se.svt.oss.encore.model.EncoreJob
import se.svt.oss.encore.model.input.DEFAULT_VIDEO_LABEL
import se.svt.oss.encore.model.input.VideoIn
import se.svt.oss.encore.model.input.videoInput
import se.svt.oss.encore.model.mediafile.toParams
import se.svt.oss.encore.model.output.Output
import se.svt.oss.encore.model.output.VideoStreamEncode

private val log = KotlinLogging.logger { }

data class ThumbnailEncode(
    val percentages: List<Int> = listOf(25, 50, 75),
    val thumbnailWidth: Int = -2,
    val thumbnailHeight: Int = 1080,
    val quality: Int = 5,
    val suffix: String = "_thumb",
    val suffixZeroPad: Int = 2,
    val inputLabel: String = DEFAULT_VIDEO_LABEL,
    val optional: Boolean = false,
    val intervalSeconds: Double? = null,
    val decodeOutput: Int? = null,
) : OutputProducer {

    override fun getOutput(job: EncoreJob, encodingProperties: EncodingProperties): Output? {
        if (job.segmentLength != null) {
            return logOrThrow("Thumbnail is not supported in segmented encode!")
        }
        val videoInput = job.inputs.videoInput(inputLabel)
            ?: return logOrThrow("Can not produce thumbnail $suffix. No video input with label $inputLabel!")
        val thumbnailTime = job.thumbnailTime?.let { time ->
            videoInput.seekTo?.let { time - it } ?: time
        }
        v


on","Tab complete will insert the best matching suggestion when pressing tab."),m("tabCompletion.off","Disable tab completions."),m("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:m("tabCompletion","Enables tab completions.")})),tabIndex:ue(new Jt(122,"tabIndex",0,-1,1073741824)),unicodeHighlight:ue(new dee),unusualLineTerminators:ue(new Hi(124,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[m("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),m("unusualLineTerminators.off","Unusual line terminators are ignored."),m("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:m("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:ue(new Dt(125,"useShadowDOM",!0)),useTabStops:ue(new Dt(126,"useTabStops",!0,{description:m("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:ue(new Hi(127,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[m("wordBreak.normal","Use the default line break rule."),m("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:m("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:ue(new mo(128,"wordSeparators",zB,{description:m("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:ue(new Hi(129,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),m({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:m({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:ue(new mo(130,"wordWrapBreakAfterCharacters"," 	})]?|/&.,;¢°′″‰℃、。｡､￠，．：；？！％・･ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ｧｨｩｪｫｬｭｮｯｰ”〉》」』】〕）］｝｣")),wordWrapBreakBeforeCharacters:ue(new mo(131,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔（［｛｢£¥＄￡￥+＋")),wordWrapColumn:ue(new Jt(132,"wordWrapColumn",80,1,1073741824,{markdownDescription:m({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:ue(new Hi(133,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:ue(new Hi(134,"wordWrapOverride


/*
 * ngIRCd -- The Next Generation IRC Daemon
 * Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * Please read the file COPYING, README and AUTHORS for more information.
 */

#define __irc_metadata_c__

#include "portab.h"

/**
 * @file
 * IRC metadata commands
 */

#include <assert.h>
#include <strings.h>
#include <stdio.h>

#include "conn-func.h"
#include "channel.h"
#include "irc-macros.h"
#include "irc-write.h"
#include "log.h"
#include "messages.h"
#include "parse.h"

#include "irc-metadata.h"

/**
 * Handler for the IRC+ "METADATA" command.
 *
 * @param Client The client from which this command has been received.
 * @param Req Request structure with prefix and all parameters.
 * @returns CONNECTED or DISCONNECTED.
 */
GLOBAL bool
IRC_METADATA(CLIENT *Client, REQUEST *Req)
{
	CLIENT *prefix, *target;
	char new_flags[COMMAND_LEN];

	assert(Client != NULL);
	assert(Req != NULL);

	_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)

	prefix = Client_Search(Req->prefix);
	if (!prefix)
		return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
					  Client_ID(Client), Req->prefix);

	target = Client_Search(Req->argv[0]);
	if (!target)
		return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
					  Client_ID(Client), Req->argv[0]);

	LogDebug("Got \"METADATA\" command from \"%s\" for client \"%s\": \"%s=%s\".",
		 Client_ID(prefix), Client_ID(target),
		 Req->argv[1], Req->argv[2]);

	/* Mark client: it has received a METADATA command */
	if (!Client_HasFlag(target, 'M')) {
		snprintf(new_flags, sizeof new_flags, "%sM",
			 Client_Flags(target));
		Client_SetFlags(target, new_flags);
	}

	if (strcasecmp(Req->argv[1], "cloakhost") == 0) {
		/* Set or remove a "cloaked hostname". */
		Client_UpdateCloakedHostname(target, prefix,
					     *Req->argv[2] ? Req->argv[2] : NULL);
		if (Client_Conn(target) > NONE && Client_HasMode(target, 'x'))
			IRC_WriteStrClientPrefix(target, prefix,
					RPL_HOSTHIDDEN_MSG, Client_ID(target),
					Client_HostnameDisplayed(target));
		/* The Client_UpdateCloakedHostname() function already
		 * forwarded the METADATA command, don't do it twice: */
		return CONNECTED;
	}
	else if (*Req->argv[2] && strcasecmp(Req->argv[1], "host") == 0) {
		Client_SetHostname(target, Req->argv[2]);
		if (Client_Conn(target) > NONE && !Client_HasMode(target, 'x'))
			IRC_WriteStrClientPrefix(target, prefix,
						 RPL_HOSTHIDDEN_MSG, Client_ID(target),
						 Client_HostnameDisplayed(target));
	} else if (strcasecmp(Req->argv[1], "info") == 0)
		Client_SetInfo(target, Req->argv[2]);
	else if (*Req->argv[2] && strcasecmp(Req->argv[1], "user") == 0)
		Client_SetUser(target, Req->argv[2], true);
	else if (strcasecmp(Req->argv[1], "accountname") == 0)
		Client_SetAccountName(target, Req->argv[2]);
	else if (*Req->argv[2] && strcasecmp(Req->argv[1], "certfp") == 0)
		Conn_SetCertFp(Client_Conn(target), Req->argv[2]);
	else
		Log(LOG_WARNING,
		    "Ignored metadata update from \"%s\" for client \"%s\": \"%s=%s\" - unknown key!",
		    Client_ID(Client), Client_ID(target),
		    Req->argv[1], Req->argv[2]);

	/* Forward the METADATA command to peers that support it: */
	IRC_WriteStrServersPrefixFlag(Client, prefix, 'M', "METADATA %s %s :%s",
				Client_ID(target), Req->argv[1], Req->argv[2]);
	return CONNECTED;
}


}

/*
  Used for every additional row operation, to update the guesstimate
  of pending bytes to send, and to check if it is now time to flush a batch.
*/

bool
Thd_ndb::add_row_check_if_batch_full(uint size)
{
  if (m_unsent_bytes == 0)
    free_root(&m_batch_mem_root, MY_MARK_BLOCKS_FREE);

  uint unsent= m_unsent_bytes;
  unsent+= size;
  m_unsent_bytes= unsent;
  return unsent >= m_batch_size;
}
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; version 2 of the License.

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

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */

#include "sql_list.h"

list_node end_of_list;

void free_list(I_List <i_string_pair> *list)
{
  i_string_pair *tmp;
  while ((tmp= list->get()))
    delete tmp;
}

void free_list(I_List <i_string> *list)
{
  i_string *tmp;
  while ((tmp= list->get()))
    delete tmp;
}

base_list::base_list(const base_list &rhs, MEM_ROOT *mem_root)
{
  if (rhs.elements)
  {
    /*
      It's okay to allocate an array of nodes at once: we never
      call a destructor for list_node objects anyway.
    */
    first= (list_node*) alloc_root(mem_root,
                                   sizeof(list_node) * rhs.elements);
    if (first)
    {
      elements= rhs.elements;
      list_node *dst= first;
      list_node *src= rhs.first;
      for (; dst < first + elements - 1; dst++, src= src->next)
      {
        dst->info= src->info;
        dst->next= dst + 1;
      }
      /* Copy the last node */
      dst->info= src->info;
      dst->next= &end_of_list;
      /* Setup 'last' member */
      last= &dst->next;
      return;
    }
  }
  elements= 0;
  first= &end_of_list;
  last= &first;
}
/*
   Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; version 2 of the License.

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

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */

#include "sql_binlog.h"

#include "my_global.h"
#include "base64.h"                             // base64_needed_decoded_length
#include "auth_common.h"                        // che


 aligning image */
	line-height: 32px;
	text-align: center;
}

ul.pods-dfv-list li.pods-dfv-list-icon img {
	display: inline-block;
	vertical-align: middle;
	float: none;
	border-radius: 2px;
	margin: 0;
	max-height: 100%;
	width: auto;
}

ul.pods-dfv-list li.pods-dfv-list-icon span.pinkynail {
	font-size: 32px;
	width: 32px;
	height: 32px;
}

ul.pods-dfv-list li.pods-dfv-list-handle {
	width: 25px;
	height: 32px;
	float: left;
	cursor: move;
}

ul.pods-dfv-list li.pods-dfv-list-edit,
ul.pods-dfv-list li.pods-dfv-list-link,
ul.pods-dfv-list li.pods-dfv-list-download,
ul.pods-dfv-list li.pods-dfv-list-remove {
	width: 25px;
	height: 32px;
	float: right;
}

ul.pods-dfv-list li.pods-dfv-list-handle span,
ul.pods-dfv-list li.pods-dfv-list-edit a,
ul.pods-dfv-list li.pods-dfv-list-link a,
ul.pods-dfv-list li.pods-dfv-list-download a,
ul.pods-dfv-list li.pods-dfv-list-remove a {
	display: block;
	width: 25px;
	height: 32px;
	opacity: 0.40;
	text-decoration: none;
	color: #616161;
}

ul.pods-dfv-list li.pods-dfv-list-handle span:hover,
ul.pods-dfv-list li.pods-dfv-list-edit a:hover,
ul.pods-dfv-list li.pods-dfv-list-link a:hover,
ul.pods-dfv-list li.pods-dfv-list-download a:hover,
ul.pods-dfv-list li.pods-dfv-list-remove a:hover {
	opacity: 1;
}

ul.pods-dfv-list li.pods-dfv-list-handle span:focus,
ul.pods-dfv-list li.pods-dfv-list-edit a:focus,
ul.pods-dfv-list li.pods-dfv-list-link a:focus,
ul.pods-dfv-list li.pods-dfv-list-download a:focus,
ul.pods-dfv-list li.pods-dfv-list-remove a:focus {
	-webkit-box-shadow: none;
	box-shadow: none;
}

ul.pods-dfv-list li.pods-dfv-list-handle span:before,
ul.pods-dfv-list li.pods-dfv-list-edit a:before,
ul.pods-dfv-list li.pods-dfv-list-link a:before,
ul.pods-dfv-list li.pods-dfv-list-download a:before,
ul.pods-dfv-list li.pods-dfv-list-remove a:before {
	margin: 0 24px 0 -24px;
	font: 400 20px/1 dashicons;
	line-height: 32px;
}

ul.pods-dfv-list li.pods-dfv-list-handle span:before {
	@include dashicons.Dashicons-Sort;
}

ul.pods-dfv-list li.pods-dfv-list-edit a:before {
	@include dashicons.Dashicons-Edit;
}

ul.pods-dfv-list li.pods-d


 = {};
      sortParams.forEach((ele: string) => {
        let splited = ele.split(":");
        let key = splited[0];
        let value = splited[1];
        if (value === "asc") {
          obj[key] = sortOrder.asc;
        } else if (value === "desc") {
          obj[key] = sortOrder.desc;
        }
      });

      //To check existing student
      const students = await studentModel
        .aggregate([
          // {
          //   $set: {
          //     studentRef: {
          //       $toObjectId: "$studentRef",
          //     },
          //   },
          // },
          {
            $lookup: {
              from: "projects",
              localField: "_id",
              foreignField: "studentRef",
              as: "studentProjectDetails",
            },
          },
        ])
        .sort(obj);

      if (!students) {
        let response = {
          status: "Failure",
          statusCode: 400,
          message: "No students found",
        };
        return response;
      }

      let response = {
        status: "Success",
        statusCode: 200,
        message: students,
      };
      return response;
    } catch (err) {
      console.log(err);
      throw new Error(err);
    }
  }
}

export const studentController = new StudentController();
import View = require('./view');
import Game = require('./game');

class MapView extends View<Game> {
	template = <Function>require('../hbs/map-view.hbs');

	get className() {
		return 'map';
	}

	get events() {
		return {
			'click .territory': 'territoryClick'
		}
	}

	initialize() {
		this.listenTo(this.model, 'change:map', this.updateMapState);
	}

	render() {
		super.render();
		this.updateMapState();
		return this;
	}

	updateMapState() {
		this.model.map.territories.forEach(function(territory) {
			// Set fill colour to match owning player.
			var owner = territory.getOwner();
			var colour = '#FFFFFF';
			var $territory = this.$('.territory[data-territory-id=' + territory.id + ']');

			if (owner) {
				colour = owner.getColour();
			}

			$territory.attr('fill', colour);

			// Show number of armies.
			var armies = territory.getArmies();
			this.$('text[data-territory-id=' + territory.id + '] tspan').text(armies);
		}, this);
	}

	territoryClick(e : MouseEvent) {
		var territoryId = this.$(e.currentTarget).data('territory-id');
		this.trigger('territorySelect', +territoryId);
	}
}

export = MapView;
import { Component } from '@angular/core';

@Component({
  selector: 'ngforexample',
  templateUrl: './ng-for-example.component.html',
  styleUrls: ['./ng-for-example.component.css']
})
export class NgForExampleComponent {

  courses = [
    {id: 1, name: 'course 1'},
    {id: 2, name: 'course 2'},
    {id: 3, name: 'course 3'}
  ]

  AddCourse(){
    this.courses.push({
      id: 4, name: 'course 4'
    });
  }

  RemoveCourse(course){
    let index: number = this.courses.indexOf(course);
    this.courses.splice(index, 1);
  }

  ChangeCourseName(course){
    course.name = "Updated";
  }
}

import * as React from 'react';

import * as bcp47 from './bcp47';
import { bosnian } from './i18n/bs';
import { german } from './i18n/de';
import { english } from './i18n/en';
import { spanish } from './i18n/es';
import { french } from './i18n/fr'


HTTP/1.1 200 OK
content-length: 19
content-type: application/json
date: Fri, 04 Jul 2025 08:33:10 GMT
server: uvicorn
x-trace-id: edc0436a6bc932434f34d3d3ce1be182

{
    "version": "0.2.9"
}
```

_**Note:** The APIs of Llama Stack are fast evolving, but it supports a docs endpoint (in our case, `http://localhost:8321/docs`). You can also use that endpoint to invoke and experiment with the APIs._

## Python runtime for Knative Functions

Once all of the above is running you need to create your [Knative Functions](https://knative.dev/docs/functions/){:target="_blank"} project. We are using the CloudEvent template for the new [functions runtime for Python](https://github.com/knative-extensions/func-python){:target="_blank"}.

```shell
func create -l python -t cloudevents inference-func
```

This gives you project that already works and can be locally tested with `func run`.

### My first AI function

Our generated function code was updated to use the `llama_stack_client` python library. Below is the relevant snippet from the `pyproject.toml` file:

```toml
dependencies = [
  "httpx",
  "cloudevents",
  "pytest",
  "pytest-asyncio",
  "llama-stack-client"
]
```

### Accessing the Llama Stack Server

Inside the `init` function we get access to the URL of the _Llama Stack_ and fetch the available models:

```python
...
self.client = LlamaStackClient(base_url=os.environ.get("LLSD_HOST", "http://localhost:8321"))
models = self.client.models.list()

# Select the first LLM
llm = next(m for m in models if m.model_type == "llm")
self.model_id = llm.identifier
...
```

The `LLSD_HOST` is pointing to the address of the Llama Stack instance. If the environment variable is not set it defaults to `localhost:8321`, which matches our `port-forward` command. For Kubernetes we configure it like:

```
func config envs add --name=LLSD_HOST --value=http://llamastackdistribution-sample-service.default.svc.cluster.local:8321
```

### Inference request with Knative Functions

The main interaction for the actual inference is done in the `handle` function, which is executed on every request:

```python
...
# 1) Extract the CloudEvent from the scope
request = scope["event"]

# 2) Create a new CloudEvent as response
response = CloudEvent({
	"type": "dev.knative.function.response",
	"source": "my/ai/knative/function",
	"id": f"response-{request.get('id', 'unknown')}"
})

chat_response = self.client.inference.chat_completion(
	model_id=self.model_id,
	messages=[
		{"role": "system", "content": "You are a helpful assistant."},
		{"role": "user", "content": request.data["query"]},
	],
)

# 3) Set the response's data field to the request event's data field
response.data = {"chat": chat_response.completion_message.content}

# 4) Send the response CloudEvent
# The 'send' method is already decorated with CloudEvent middleware
await send(response)
...
```

We basically extract a `query` object from the given _JSON_ payload of the incoming CloudEvent, and put that as our `content` to the `chat_completion` function from the Llama Stack inference client. After the `inference request` is executed we are using the given `chat` value in our HTTP CloudEvent response and return it. The `chat` contains the response from the used model.

See the entire code:

```python
# Function
import logging
import os
from cloudevents.http import CloudEvent
from llama_stack_client import LlamaStackC


alStdlibApi::class)
class JsonWebKeyTest : FreeSpec({

    lateinit var curve: ECCurve
    lateinit var x: ByteArray
    lateinit var y: ByteArray
    lateinit var ecKey: JsonWebKey
    lateinit var n: ByteArray
    lateinit var e: ByteArray
    lateinit var rsaKey: JsonWebKey

    beforeTest {
        curve = ECCurve.SECP_256_R_1
        x = Random.nextBytes(32)
        y = Random.nextBytes(32)
        ecKey = JsonWebKey(type = JwkType.EC, curve = curve, x = x, y = y)
        n = Random.nextBytes(1024)
        e = Random.nextBytes(16)
        rsaKey = JsonWebKey(type = JwkType.RSA, n = n, e = e)
    }

    "Thumbprint for minimal EC Key" - {
        val newKey = JsonWebKey(type = JwkType.EC, curve = curve, x = x, y = y)

        newKey.jwkThumbprint shouldBe ecKey.jwkThumbprint
    }

    "Thumbprint for EC Key with additional properties" - {
        val newKey = JsonWebKey(type = JwkType.EC, curve = curve, x = x, y = y, publicKeyUse = "foo")

        newKey.jwkThumbprint shouldBe ecKey.jwkThumbprint
    }

    "Thumbprint for EC Key with keyId" - {
        val newKey = JsonWebKey(type = JwkType.EC, curve = curve, x = x, y = y, keyId = "foo")

        newKey.jwkThumbprint shouldBe ecKey.jwkThumbprint
    }

    "Thumbprint for minimal RSA Key" - {
        val newKey = JsonWebKey(type = JwkType.RSA, n = n, e = e)

        newKey.jwkThumbprint shouldBe rsaKey.jwkThumbprint
    }

    "Thumbprint for RSA Key with additional properties" - {
        val newKey = JsonWebKey(type = JwkType.RSA, n = n, e = e, algorithm = JwsAlgorithm.Signature.RS256)

        newKey.jwkThumbprint shouldBe rsaKey.jwkThumbprint
    }

    "Thumbprint for RSA Key with keyId" - {
        val newKey = JsonWebKey(type = JwkType.RSA, n = n, e = e, keyId = "foo")

        newKey.jwkThumbprint shouldBe rsaKey.jwkThumbprint
    }

    "Thumbprint for fixed Key from RFC 7638" - {
        val parsedN = ("0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2" +
                "aiAFbWhM78LhWx4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCi" +
                "FV4n3oknjhMstn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65Y" +
                "GjQR0_FDW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n" +
                "91CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_x" +
                "BniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw").decodeToByteArray(Base64UrlStrict)
        val parsedE = "AQAB".decodeToByteArray(Base64UrlStrict)
        val key = JsonWebKey(type = JwkType.RSA, n = parsedN, e = parsedE)

        key.jwkThumbprint shouldBe "urn:ietf:params:oauth:jwk-thumbprint:sha256:NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs"
    }

    "RSA Key should properly encode n and e (RFC 7518 sample)" {
        val key = CryptoPublicKey.RSA(
            n = Asn1Integer.fromUnsignedByteArray(("80".repeat(256)).hexToByteArray()),


(
        accessibilityCommentsManager: LiftsAccessibilityCommentsManager(l10n: context.localize, liftResponse: lift),
        backgroundColor: context.colorTheme.whiteSoap,
      ),
      if (lift.imagesIds != null && lift.imagesIds!.isNotEmpty) const SizedBox(height: DigitalGuideConfig.heightMedium),
    ];
    return HorizontalSymmetricSafeAreaScaffold(
      appBar: DetailViewAppBar(actions: [AccessibilityButton()]),
      body: Padding(
        padding: const EdgeInsets.all(DigitalGuideConfig.paddingMedium),
        child: CustomScrollView(
          slivers: [
            SliverList(delegate: SliverChildBuilderDelegate((_, index) => widgets[index], childCount: widgets.length)),
            if (lift.imagesIds != null)
              SliverList(
                delegate: SliverChildBuilderDelegate((context, index) {
                  return Padding(
                    padding: const EdgeInsets.all(DigitalGuideConfig.heightMedium),
                    child: ClipRRect(
                      borderRadius: BorderRadius.circular(DigitalGuideConfig.borderRadiusSmall),
                      child: DigitalGuideImage(id: lift.imagesIds![index]),
                    ),
                  );
                }, childCount: lift.imagesIds!.length),
              ),
          ],
        ),
      ),
    );
  }
}
import "package:auto_route/annotations.dart";
import "package:fast_immutable_collections/fast_immutable_collections.dart";
import "package:flutter/material.dart";
import "package:flutter_riverpod/flutter_riverpod.dart";

import "../../../../../config/ui_config.dart";
import "../../../../../theme/app_theme.dart";
import "../../../../../utils/context_extensions.dart";
import "../../../../../widgets/detail_views/detail_view_app_bar.dart";
import "../../../../../widgets/horizontal_symmetric_safe_area.dart";
import "../../../../../widgets/my_error_widget.dart";
import "../../../presentation/widgets/accessibility_button.dart";
import "../../../presentation/widgets/accessibility_profile_card.dart";
import "../../../presentation/widgets/bullet_list.dart";
import "../../../presentation/widgets/digital_guide_loading_view.dart";
import "../data/model/door.dart";
import "../data/repository/doors_repository.dart";
import "../domain/doors_accessibility_manager.dart";

@RoutePage()
class DoorView extends ConsumerWidget {
  const DoorView({required this.doorsID});

  final int doorsID;

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final asyncDoors = ref.watch(doorsRepositoryProvider(doorsID));

    return asyncDoors.when(
      data: (data) => _DoorsView(door: data),
      error: (error, stackTrace) {
        return HorizontalSymmetricSafeAreaScaffold(
          appBar: DetailViewAppBar(),
          body: MyErrorWidget(error, stackTrace: stackTrace),
        );
      },
      loading: () {
        return const DigitalGuideLoadingView();
      },
    );
  }
}

class _DoorsView extends ConsumerWidget {
  const _DoorsView({required this.door});

  final Door door;

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final l10n = context.localize;

    final IList<String> textStrings = [
      if (door.translations.pl.comment.isNotEmpty) door.translations.pl.comment,
      door.translations.pl.fromTo,
      "${l10n.door_visible_from_outside(door.isGoodDoorVisibleFromOutside.toLowerCase())} ${door.trans


")
	return buffer.String()
}

// DeleteAt deletes the bit at the given index position from
// within the bitset
// All the bits residing on the left of the deleted bit get
// shifted right by 1
// The running time of this operation may potentially be
// relatively slow, O(length)
func (b *BitSet) DeleteAt(i uint) *BitSet {
	// the index of the slice element where we'll delete a bit
	deleteAtElement := i >> log2WordSize

	// generate a mask for the data that needs to be shifted right
	// within that slice element that gets modified
	dataMask := ^((uint64(1) << (i & (wordSize - 1))) - 1)

	// extract the data that we'll shift right from the slice element
	data := b.set[deleteAtElement] & dataMask

	// set the masked area to 0 while leaving the rest as it is
	b.set[deleteAtElement] &= ^dataMask

	// shift the previously extracted data to the right and then
	// set it in the previously masked area
	b.set[deleteAtElement] |= (data >> 1) & dataMask

	// loop over all the consecutive slice elements to copy each
	// lowest bit into the highest position of the previous element,
	// then shift the entire content to the right by 1
	for i := int(deleteAtElement) + 1; i < len(b.set); i++ {
		b.set[i-1] |= (b.set[i] & 1) << 63
		b.set[i] >>= 1
	}

	b.length = b.length - 1

	return b
}

// NextSet returns the next bit set from the specified index,
// including possibly the current index
// along with an error code (true = valid, false = no set bit found)
// for i,e := v.NextSet(0); e; i,e = v.NextSet(i + 1) {...}
//
// Users concerned with performance may want to use NextSetMany to
// retrieve several values at once.
func (b *BitSet) NextSet(i uint) (uint, bool) {
	x := int(i >> log2WordSize)
	if x >= len(b.set) {
		return 0, false
	}
	w := b.set[x]
	w = w >> (i & (wordSize - 1))
	if w != 0 {
		return i + trailingZeroes64(w), true
	}
	x = x + 1
	for x < len(b.set) {
		if b.set[x] != 0 {
			return uint(x)*wordSize + trailingZeroes64(b.set[x]), true
		}
		x = x + 1

	}
	return 0, false
}

// NextSetMany returns many next bit sets from the specified index,
// including possibly the current index and up to cap(buffer).
// If the returned slice has len zero, then no more set bits were found
//
//    buffer := make([]uint, 256) // this should be reused
//    j := uint(0)
//    j, buffer = bitmap.NextSetMany(j, buffer)
//    for ; len(buffer) > 0; j, buffer = bitmap.NextSetMany(j,buffer) {
//     for k := range buffer {
//      do something with buffer[k]
//     }
//     j += 1
//    }
//
//
// It is possible to retrieve all set bits as follow:
//
//    indices := make([]uint, bitmap.Count())
//    bitmap.NextSetMany(0, indices)
//
// However if bitmap.Count() is large, it might be preferable to
// use several calls to NextSetMany, for performance reasons.
func (b *BitSet) NextSetMany(i uint, buffer []uin


	{
		"id": "1124",
		"name": "Gambella",
		"country_id": "69"
	},
	{
		"id": "1125",
		"name": "Harar",
		"country_id": "69"
	},
	{
		"id": "1126",
		"name": "Jigjiga",
		"country_id": "69"
	},
	{
		"id": "1127",
		"name": "Mekele",
		"country_id": "69"
	},
	{
		"id": "1128",
		"name": "Oromia",
		"country_id": "69"
	},
	{
		"id": "1129",
		"name": "Somali",
		"country_id": "69"
	},
	{
		"id": "1130",
		"name": "Southern",
		"country_id": "69"
	},
	{
		"id": "1131",
		"name": "Tigray",
		"country_id": "69"
	},
	{
		"id": "1132",
		"name": "Christmas Island",
		"country_id": "70"
	},
	{
		"id": "1133",
		"name": "Cocos Islands",
		"country_id": "70"
	},
	{
		"id": "1134",
		"name": "Coral Sea Islands",
		"country_id": "70"
	},
	{
		"id": "1135",
		"name": "Falkland Islands",
		"country_id": "71"
	},
	{
		"id": "1136",
		"name": "South Georgia",
		"country_id": "71"
	},
	{
		"id": "1137",
		"name": "Klaksvik",
		"country_id": "72"
	},
	{
		"id": "1138",
		"name": "Nor ara Eysturoy",
		"country_id": "72"
	},
	{
		"id": "1139",
		"name": "Nor oy",
		"country_id": "72"
	},
	{
		"id": "1140",
		"name": "Sandoy",
		"country_id": "72"
	},
	{
		"id": "1141",
		"name": "Streymoy",
		"country_id": "72"
	},
	{
		"id": "1142",
		"name": "Su uroy",
		"country_id": "72"
	},
	{
		"id": "1143",
		"name": "Sy ra Eysturoy",
		"country_id": "72"
	},
	{
		"id": "1144",
		"name": "Torshavn",
		"country_id": "72"
	},
	{
		"id": "1145",
		"name": "Vaga",
		"country_id": "72"
	},
	{
		"id": "1146",
		"name": "Central",
		"country_id": "73"
	},
	{
		"id": "1147",
		"name": "Eastern",
		"country_id": "73"
	},
	{
		"id": "1148",
		"name": "Northern",
		"country_id": "73"
	},
	{
		"id": "1149",
		"name": "South Pacific",
		"country_id": "73"
	},
	{
		"id": "1150",
		"name": "Western",
		"country_id": "73"
	},
	{
		"id": "1151",
		"name": "Ahvenanmaa",
		"country_id": "74"


per.charWidth(c);
		}
		return this.font.charWidth(c);
	}

	/* (non-Javadoc)
	 * @see de.enough.polish.ui.TextEffect#wrap(de.enough.polish.ui.StringItem, java.lang.String, int, javax.microedition.lcdui.Font, int, int, int, java.lang.String, int, de.enough.polish.util.WrappedText)
	 */
	public void wrap(StringItem parent, String text, int textColor, Font meFont,
			int firstLineWidth, int lineWidth, int maxLines,
			String maxLinesAppendix, int maxLinesAppendixPosition,
			WrappedText wrappedText)
	{
		if (this.font == null) {
			super.wrap(parent, text, textColor, meFont, firstLineWidth, lineWidth, maxLines,
					maxLinesAppendix, maxLinesAppendixPosition, wrappedText);
			return;
		}
		this.viewer = this.font.getViewer(text,textColor);
		if (this.viewer == null) {
			super.wrap(parent, text, textColor, meFont, firstLineWidth, lineWidth, maxLines,
					maxLinesAppendix, maxLinesAppendixPosition, wrappedText);
			return;
		}
		int pv = 1;
		int anchor = Graphics.LEFT;
		if (this.style != null) {
			pv = this.style.getPaddingVertical( lineWidth );
			anchor = this.style.getAnchorHorizontal();
		}
		this.viewer.layout(firstLineWidth, lineWidth, pv,  anchor, maxLines, maxLinesAppendix, this.font );
		this.viewer.wrap( text, wrappedText );
//		this.lastText = wrappedText;
	}

	/* (non-Javadoc)
	 * @see de.enough.polish.ui.TextEffect#setStyle(de.enough.polish.ui.Style)
	 */
	public void setStyle(Style style)
	{
		super.setStyle(style);
		//#if polish.css.font-bitmap
			String url = style.getProperty("font-bitmap");
			if (url != null) {
				this.font = BitMapFont.getInstance(url);
			}
		//#endif
	}

	/**
	 * Set the bitmap font used in this text effect
	 * @param font the font
	 */
	public void setFont(BitMapFont font)
	{
		this.font = font;
	}

	/* (non-Javadoc)
	 * @see de.enough.polish.ui.TextEffect#drawStrings(de.enough.polish.util.WrappedText, int, int, int, int, int, int, int, int, javax.microedition.lcdui.Graphics)
	 */
	public void drawStrings(WrappedText textLines, int textColor, int x, int y,
			int leftBorder, int rightBorder, int lineHeight, int maxWidth,
			int layout, Graphics g)
	{
//		if (textLines != this.lastText && this.font != null) {
//			StringBuffer buffer = new StringBuffer();
//			for (int i = 0; i < textLines.length; i++)
//			{
//				buffer.append( textLines[i] );
//				if (i != textLines.length - 1) {
//					buffer.append('\n');
//				}
//			}
//
//			this.viewer = this.font.getViewer(buffer.toString(),textColor);
//			this.lastText = textLines;
//		}
		if (this.viewer == null) {
			super.drawStrings(textLines, textColor, x, y, leftBorder, rightBorder,
				lineHeight, maxWidth, layout, g);
		} else {
			if ( ( layout & Item.LAYOUT_CENTER ) == Item.LAYOUT_CENTER ) {
				x = leftBorder + (rightBorder - leftBorder) / 2;
			} else if ( ( layout & Item.LAYOUT_RIGHT ) == Item.LAYOUT_RIGHT ) {
				x = rightBorder;
			}
			if ((layout & Item.LAYOUT_BOTTOM) == Item.LAYOUT_BOTTOM)


    var collapseClassName = (0, _defineProperty3['default'])({}, prefixCls, true);
    return h(
      'div',
      { 'class': collapseClassName, attrs: { role: accordion ? 'tablist' : null }
      },
      [this.getItems()]
    );
  }
};'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _extends2 = require('babel-runtime/helpers/extends');

var _extends3 = _interopRequireDefault(_extends2);

var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');

var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);

var _shallowequal = require('shallowequal');

var _shallowequal2 = _interopRequireDefault(_shallowequal);

var _merge = require('lodash/merge');

var _merge2 = _interopRequireDefault(_merge);

var _componentClasses = require('component-classes');

var _componentClasses2 = _interopRequireDefault(_componentClasses);

var _vueTypes = require('../../_util/vue-types');

var _vueTypes2 = _interopRequireDefault(_vueTypes);

var _utils = require('./utils');

var _addEventListener = require('../../_util/Dom/addEventListener');

var _addEventListener2 = _interopRequireDefault(_addEventListener);

var _store = require('../../_util/store');

var _ColumnManager = require('./ColumnManager');

var _ColumnManager2 = _interopRequireDefault(_ColumnManager);

var _HeadTable = require('./HeadTable');

var _HeadTable2 = _interopRequireDefault(_HeadTable);

var _BodyTable = require('./BodyTable');

var _BodyTable2 = _interopRequireDefault(_BodyTable);

var _ExpandableTable = require('./ExpandableTable');

var _ExpandableTable2 = _interopRequireDefault(_ExpandableTable);

var _propsUtil = require('../../_util/props-util');

var _BaseMixin = require('../../_util/BaseMixin');

var _BaseMixin2 = _interopRequireDefault(_BaseMixin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

exports['default'] = {
  name: 'Table',
  mixins: [_BaseMixin2['default']],
  props: (0, _propsUtil.initDefaultProps)({
    data: _vueTypes2['default'].array,
    useFixedHeader: _vueTypes2['default'].bool,
    columns: _vueTypes2['default'].array,
    prefixCls: _vueTypes2['default'].string,
    bodyStyle: _vueTypes2['default'].object,
    rowKey: _vueTypes2['default'].oneOfType([_vueTypes2['default'].string, _vueTypes2['default'].func]),
    rowClassName: _vueTypes2['default'].oneOfType([_vueTypes2['default'].string, _vueTypes2['default'].func]),
    customRow: _vueTypes2['default'].func,
    customHeaderRow: _vueTypes2['default'].func,
    // onRowClick: PropTypes.func,
    // onRowDoubleClick: PropTypes.func,
    // onRowContextMenu: PropTypes.func,
    // onRowMouseEnter: PropTypes.func,
    // onRowMouseLeave: PropTypes.func,
    showHeader: _vueTypes2['default'].bool,
    title: _vueTypes2['default'].func,
    id: _vueTypes2['default'].string,
    footer: _vueTypes2['default'].func,
    emptyText: _vueTypes2['default'].any,
    scroll: _vueTypes2['default'].object,
    rowRef: _vueTypes2['default'].func,
    getBodyWrapper: _vueTypes2['default'].func,
    components: _vueTypes2['default'].shape({
      table: _vueTypes2['default'].any,
      header: _vueTypes2['default'].shape({
        wrapper: _vueTypes2['default'].an


Finish(): List<String> = emptyList()

    /**
     * Returns the Java version as an Int in a backward compatible way.
     * There is no straightforward Java version API in Java 8.
     */
    private fun getJavaVersion(): Int {
        var version = System.getProperty("java.specification.version")
        if (version.startsWith("1.")) {
            version = version.substring(2, 3)
        } else {
            val dot = version.indexOf(".")
            if (dot != -1) {
                version = version.substring(0, dot)
            }
        }
        return version.toInt()
    }
}
package com.osacky.doctor.internal

import org.gradle.api.logging.Logger

/**
 * Prints strings inside a nicely fitted pill box.
 */
class PillBoxPrinter(
    private val logger: Logger,
) {
    private val messageLength = 100
    private val title = "Gradle Doctor Prescriptions"

    fun writePrescription(messages: List<String>) {
        if (messages.isNotEmpty()) {
            logger.warn(createTitle(messageLength))
        }

        messages.forEach { item ->
            logger.warn(padMessage(item))
            logger.warn(createEnding(messageLength))
        }
    }

    private fun createTitle(lineLength: Int): String = " $title ".padStart(lineLength / 2 + 10, '=').padEnd(lineLength + 4, '=')

    private fun createEnding(lineLength: Int): String = "".padEnd(lineLength + 4, '=')

    fun padMessage(message: String): String {
        return message
            .split('\n')
            .flatMap { line ->
                val chunked = line.chunked(messageLength)
                if (chunked.isEmpty()) {
                    return@flatMap listOf("| ${"".padEnd(messageLength)} |")
                } else {
                    return@flatMap chunked.map { "| ${it.padEnd(messageLength)} |" }
                }
            }.joinToString("\n")
    }

    fun createPill(message: String): String {
        val lines = padMessage(message)
        val pilledLines = listOf(createTitle(messageLength)) + lines + createEnding(messageLength)
        val builder = StringBuilder()

        for (line in pilledLines) {
            builder.append(line).append('\n')
        }
        return builder.toString()
    }
}
package com.github.datareporting.ui.theme

import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat

private val DarkColorScheme = darkColorScheme(
    primary = Purple80,
    secondary = PurpleGrey80,
    tertiary = Pink80
)

private val LightColorScheme = lightColorScheme(
    primary = Purple40,
    secondary = PurpleGrey40,
    tertiary = Pink40

    /* Other default colors to override
    background = Color(0xFFFFFBFE),
    surf


_INSTRINIL,E_INSTRINIL-I_INSTRINIL     ;instri
  DC.L 133,I_STRCLONENIL,E_STRCLONENIL-I_STRCLONENIL     ;strclone
  DC.L 134,I_LISTCLONENIL,E_LISTCLONENIL-I_LISTCLONENIL     ;listclone
  DC.L 136,I_ASTRINGFNIL,E_ASTRINGFNIL-I_ASTRINGFNIL     ;astringf
  DC.L 137,I_DOMETHODNIL,E_DOMETHODNIL-I_DOMETHODNIL	;domethod
  DC.L 138,I_DOMETHODANIL,E_DOMETHODANIL-I_DOMETHODANIL ;domethoda
  DC.L 139,I_CRCMETHODNIL,E_CRCMETHODNIL-I_CRCMETHODNIL ;coercemethod
  DC.L 140,I_CRCMETHODANIL,E_CRCMETHODANIL-I_CRCMETHODANIL ;coercemethoda
  DC.L 141,I_DOSMETHODNIL,E_DOSMETHODNIL-I_DOSMETHODNIL	;dosupermethod
  DC.L 142,I_DOSMETHODANIL,E_DOSMETHODANIL-I_DOSMETHODANIL	;dosupermethoda
  DC.L 143,I_SETNIL,E_SETNIL-I_SETNIL       ;set
  DC.L 144,I_SETSNIL,E_SETSNIL-I_SETSNIL    ;sets
  DC.L 145,I_GETNIL,E_GETNIL-I_GETNIL       ;get
  DC.L 146,I_GETSNIL,E_GETSNIL-I_GETSNIL      ;gets
  DC.L 156,I_PUTFNIL,E_PUTFNIL-I_PUTFNIL        ;putf
  DC.L 157,I_PUTF37NIL,E_PUTF37NIL-I_PUTF37NIL    ;putf (37 variant)
  DC.L 158,I_WRITEF37NIL,E_WRITEF37NIL-I_WRITEF37NIL  ;writef (37 variant)
  DC.L 159,I_READBNIL,E_READBNIL-I_READBNIL   ;readb
  DC.L 160,I_WRITEBNIL,E_WRITEBNIL-I_WRITEBNIL    ;writeb
  DC.L 164,I_STRADDCHARNIL,E_STRADDCHARNIL-I_STRADDCHARNIL     ;straddchar
  DC.L 167,I_LISTADDITEMNIL,E_LISTADDITEMNIL-I_LISTADDITEMNIL     ;listadditem
  DC.L 168,I_STRINSNIL,E_STRINSNIL-I_STRINSNIL     ;strins
  DC.L 169,I_STRREMNIL,E_STRREMNIL-I_STRREMNIL     ;strrem
  DC.L 172,I_LONG020NIL,E_LONG020NIL-I_LONG020NIL		;long (020 variant)
  DC.L 173,I_INT020NIL,E_INT020NIL-I_INT020NIL		;int (020 variant)
  DC.L 174,I_CHAR020NIL,E_CHAR020NIL-I_CHAR020NIL	;char (020 variant)
  DC.L 176,I_MEMFILLNIL,E_MEMFILLNIL-I_MEMFILLNIL     ;memfill
  DC.L 177,I_ASTRCLONENIL,E_ASTRCLONENIL-I_ASTRCLONENIL     ;astrclone
  DC.L 178,I_LISTINSITEMNIL,E_LISTINSITEMNIL-I_LISTINSITEMNIL     ;listinsitem
  DC.L 179,I_LISTREMITEMNIL,E_LISTREMITEMNIL-I_LISTREMITEMNIL     ;listremitem
  DC.L 180,I_LISTSWAPITEMNIL,E_LISTSWAPITEMNIL-I_L


d(signupLink.getContent());

    formContainer.appendChild(buttonGroup);
    return formContainer;
  }
}

const loginForm = new Login({
  events: {
    submit: (e) => {
      e.preventDefault();
      const target = e.target as HTMLFormElement;
      const formData = new FormData(target);
      loginInput.validate();
      passwordInput.validate();
      formData.forEach((value, key) => {
        console.log(`${key}: ${value}`);
      });
    },
  },
}).getContent();

export default (): Element => new Page({
  classNames: ['container', '_h-auto', '_min-h-100vh', '_flex', '_align-center', '_justify-center'],
  wrapperTag: 'main',
  childNode: loginForm,
}).getContent();
import parseAnchor from './parseAnchor';

describe('parseAnchor()', () => {
    it('returns empty prefix and suffix if there is just an anchor element', () => {
        expect(parseAnchor('text'))
            .toEqual(['', 'text', '']);

        expect(parseAnchor('text'))
            .toEqual(['', 'text', '']);
    });

    it('returns prefix and suffix if anchor is surrounded by text', () => {
        expect(parseAnchor('foo text bar'))
            .toEqual(['foo ', 'text', ' bar']);

        expect(parseAnchor('foo text bar'))
            .toEqual(['foo ', 'text', ' bar']);
    });

    it('returns first anchor if theres more than one', () => {
        expect(parseAnchor('foo text s x bar'))
            .toEqual(['foo ', 'text', ' s x bar']);
    });

    it('returns empty array if no anchor', () => {
        expect(parseAnchor('foo text bar'))
            .toEqual([]);
    });
});
import { Advice } from "./Advice";
import { MethodExecutionJoinPoint } from "../JoinPoints/MethodExecutionJoinPoint";

export class OnErrorThrownInMethodExecutionAdvice extends Advice
{
    public constructor(action: Function)
    {
        super(action);
    }

    public CreateAdvisedMember(target: Object, methodName: string): Function
    {
        let thisAdvice: OnErrorThrownInMethodExecutionAdvice = this;
        let originalMethod: Function = target[methodName];
        let advisedMethod: Function = function(...args: Array<any>)
        {
            let joinPoint = new MethodExecutionJoinPoint(this, methodName, args);
            try
            {
                return originalMethod.apply(this, joinPoint.MethodArguments);
            }
            catch (error)
            {
                thisAdvice.Action(error, joinPoint);
            }
        };
        return advisedMethod;
    }
}import { Injectable } from '@angular/core';
import { Employee } from '../model/employee.model'
@Injectable({
  providedIn: 'root'
})
export class EmployeeService {
  employees: Employee[] = [
    {
      id:1,
      name:"hima",
      email: "hima@gmail.com",
      phone: 9128456378
    },
    {
      id:2,
      name:"swathi",
      email: "swathi@gmail.com",
      phone: 9745632817
    },
    {
      id:3,
      name:"hema",
      email: "hema@gmail.com",
      phone: 9742365812
    }
  ];
  emp: any;
  latestid : number = this.employees.length;

  constructor() { }

  onGet(){
    return this.employees;
  }

  onAdd(employee: Employee){
    this.employees.push(employee);
    this.latestid=employee.id;

  }

  onDelete(id: number){
    let emp = <Employee>this.employees.find(x=>x.id === id);
    let index = this.employees.indexOf(emp,0)
    this.employees.splice(index,


 // 기본 서버 메뉴 visibility

  NodeConnectionStatus get nodeConnectionStatus => _nodeConnectionStatus;
  Map<ElectrumServer, NodeConnectionStatus> get connectionStatusMap => _connectionStatusMap;
  bool get isServerAddressFormatError => _isServerAddressFormatError;
  bool get isPortOutOfRangeError => _isPortOutOfRangeError;
  bool get isDefaultServerMenuVisible => _isDefaultServerMenuVisible;

  ElectrumServerViewModel(this._nodeProvider, this._preferenceProvider) {
    // 현재 설정된 서버 정보 가져오기
    _initialServer = _preferenceProvider.getElectrumServer();

    // 초기 서버 정보 설정
    _setCurrentServer(_initialServer);

    // 초기 상태 확인
    _checkInitialNodeProviderStatus();

    // 모든 ElectrumServer 연결 테스트
    _checkAllElectrumServerConnections();

    // 사용자 서버 정보 불러오기
    _loadUserServers();
  }

  /// 초기 NodeProvider 상태 확인
  void _checkInitialNodeProviderStatus() {
    final currentServer = _preferenceProvider.getElectrumServer();
    _performServerConnectionTest(currentServer);
  }

  /// 모든 기본 일렉트럼 서버 상태 체크
  void _checkAllElectrumServerConnections() {
    final isRegtestFlavor = NetworkType.currentNetworkType == NetworkType.regtest;
    final serverList = isRegtestFlavor
        ? DefaultElectrumServer.regtestServers
        : DefaultElectrumServer.mainnetServers;

    for (final server in serverList) {
      _connectionStatusMap[server] = NodeConnectionStatus.connecting;

      _nodeProvider.checkServerConnection(server).then((result) {
        _connectionStatusMap[server] =
            result.isSuccess ? NodeConnectionStatus.connected : NodeConnectionStatus.failed;
        debugPrint(
            '[서버 상태 체크] ${_connectionStatusMap[server]!.name} - ${result.isSuccess ? 'Connected' : 'Failed'}');
        notifyListeners();
      }).catchError((_) {
        _connectionStatusMap[server] = NodeConnectionStatus.failed;
        notifyListeners();
      });
    }
  }

  /// 사용자 서버 목록 로드
  Future<void> _loadUserServers() async {
    try {
      _userServers = (await _preferenceProvider.getUserServers());
      notifyListeners();
    } catch (e) {
      Logger.error('Failed to load user servers: $e');
    }
  }

  void setNodeConnectionStatus(NodeConnectionStatus status) {
    _nodeConnectionStatus = status;
    notifyListeners();
  }

  void setServerAddressFormatError(bool value) {
    _isServerAddressFormatError = value;
    notifyListeners();
  }

  void setPortOutOfRangeError(bool value) {
    _isPortOutOfRangeError = value;
    notifyListeners();
  }

  void setDefaultServerMenuVisible(bool value) {
    _isDefaultServerMenuVisible = value;


Result?.message) {
          console.log(pc.red(tc?.worstTestStepResult?.message));
        }
        console.log();
      });
    }

    const { testRunFinished } = envelope;

    const bgColor = testRunFinished.success ? 'bgGreen' : 'bgRed';
    const prefixSummary = `${pc.bold(testRunFinished.success ? ' SUCCESS ' : ' FALIURE ')}`;
    console.log();
    console.log(pc[bgColor](` ${prefixSummary} | Total Scenarios: ${pc.bold(this.cases.length)} `));

    if (!this.client) return;

    // @ts-ignore
    this.client.updateRunStatus(testRunFinished.success ? STATUS.PASSED : STATUS.FAILED);
  }
}

function getSteps(tc) {
  const stepIds = Object.keys(tc.stepResults);
  const pickleSteps = getPickleStepMap(tc.pickle);
  return stepIds
    .map(stepId => {
      const ts = tc.testCase.testSteps.find(t => t.id === stepId);
      if (!ts) return;
      if (!ts.pickleStepId) return;
      const result = tc.stepResults[stepId];
      const pickleStep = pickleSteps[ts.pickleStepId];
      const sourceStepId = pickleStep.astNodeIds[0];
      const step = {
        text: pickleStep.text,
        duration: result.duration,
        status: result.status,
      };
      const color = getStatusColor(result.status);
      if (sourceStepId && getGherkinStepMap(tc.gherkinDocument)[sourceStepId]) {
        step.keyword = getGherkinStepMap(tc.gherkinDocument)[sourceStepId].keyword;
      }
      step.toString = function toString() {
        const duration = step.duration.seconds * 1000 + step.duration.nanos / 1000000;
        const durationString = ` ${pc.gray(`(${Number(duration).toFixed(2)}ms)`)}`;
        const stepString = `${pc.bold(this.keyword)}${this.text}`.trim();
        if (color === 'red') return pc.red(stepString) + durationString;
        if (color === 'yellow') return pc.yellow(stepString) + durationString;
        return stepString + durationString;
      };
      return step;
    })
    .filter(s => !!s);
}

function getStatusColor(status) {
  if (status === 'UNDEFINED') return 'yellow';
  if (status === 'SKIPPED') return 'yellow';
  if (status === 'FAILED') return 'red';
  return 'green';
}

function getExample(testCaseAttempt) {
  const nodesMap = getGherkinScenarioLocationMap(testCaseAttempt.gherkinDocument);
  const exampleNodeId = testCaseAttempt.pickle.astNodeIds[1];
  if (!nodesMap[exampleNodeId]) return;
  const featureDoc = fs.readFileSync(testCaseAttempt.gherkinDocument.uri).toString();
  const { line } = nodesMap[exampleNodeId];
  const example = featureDoc.split('\n')[line - 1];
  if (example) {
    return example
      .trim()
      .split('|')
      .filter(r => !!r)
      .map(r => r.trim());
  }
}

export { CucumberReporter };
export default CucumberReporter;
import { expect } from 'chai';
import { describe, it } from 'mocha';
import { extractTags } from '../../src/adapter/playwright.js';

describe('Playwright Tags Extraction', () => {
  describe('extractTags function', () => {
    it('should extract tags from test title with @tag format', () => {
      const testMock = {
        title: 'test case @ui @smoke',
        tags: null,
        parent: null
      };

      const tags = extractTags(testMock);
      expect(tags).to.


// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_I18N_FILE_UTIL_ICU_H_
#define BASE_I18N_FILE_UTIL_ICU_H_

// File utilities that use the ICU library go in this file.

#include "base/files/file_path.h"
#include "base/i18n/base_i18n_export.h"
#include "base/strings/string16.h"

namespace base {
namespace i18n {

// Returns true if file_name does not have any illegal character. The input
// param has the same restriction as that for ReplaceIllegalCharacters.
BASE_I18N_EXPORT bool IsFilenameLegal(const string16& file_name);

// Replaces characters in |file_name| that are illegal for file names with
// |replace_char|. |file_name| must not be a full or relative path, but just the
// file name component (since slashes are considered illegal). Any leading or
// trailing whitespace or periods in |file_name| is also replaced with the
// |replace_char|.
//
// Example:
//   "bad:file*name?.txt" will be turned into "bad_file_name_.txt" when
//   |replace_char| is '_'.
//
// Warning: Do not use this function as the sole means of sanitizing a filename.
//   While the resulting filename itself would be legal, it doesn't necessarily
//   mean that the file will behave safely. On Windows, certain reserved names
//   refer to devices rather than files (E.g. LPT1), and some filenames could be
//   interpreted as shell namespace extensions (E.g. Foo.{<GUID>}).
//
// On Windows, Chrome OS and Mac, the file system encoding is already known and
// parsed as UTF-8 and UTF-16 accordingly.
// On Linux, the file name will be parsed as UTF8.
// TODO(asanka): Move full filename sanitization logic here.
BASE_I18N_EXPORT void ReplaceIllegalCharactersInPath(
    FilePath::StringType* file_name,
    char replace_char);

// Compares two filenames using the current locale information. This can be
// used to sort directory listings. It behaves like "operator<" for use in
// std::sort.
BASE_I18N_EXPORT bool LocaleAwareCompareFilenames(const FilePath& a,
                                                  const FilePath& b);

// Calculates the canonical file-system representation of |file_name| base name.
// Modifies |file_name| in place. No-op if not on ChromeOS.
BASE_I18N_EXPORT void NormalizeFileNameEncoding(FilePath* file_name);

}  // namespace i18n
}  // namespace base

#endif  // BASE_I18N_FILE_UTIL_ICU_H_


#!/usr/bin/python3

# Use the configuration structure method to do a full res capture.

import time

from picamera2 import Picamera2

picam2 = Picamera2()

# We don't really need to change anyhting, but let's mess around just as a test.
picam2.preview_configuration.size = (800, 600)
picam2.preview_configuration.format = "YUV420"
picam2.still_configuration.size = (1600, 1200)
picam2.still_configuration.enable_raw()
picam2.still_configuration.raw.size = picam2.sensor_resolution

picam2.start("preview", show_preview=True)
time.sleep(2)

picam2.switch_mode_and_capture_file("still", "test_full.jpg")


ct(isImageTransparent(folder)).to.equal(true)

				cleanup()
			end)
		end)
	end)

	describe("children", function()
		it("SHOULD render children passed to it", function()
			local BUTTON_NAME = "test:" .. tostring(math.random(0, 999))
			local COLOR = Color3.new(1, 0.5, 0)

			local folder = Instance.new("Folder")
			local element = mockStyleComponent({
				[BUTTON_NAME] = Roact.createElement(IconButton, {}, {
					childFrameElement = Roact.createElement("Frame", {
						Size = UDim2.new(0, 16, 0, 16),
						BackgroundColor3 = COLOR,
					}),
				}),
			})

			local instance = Roact.mount(element, folder)

			local childElement = folder:FindFirstChild("childFrameElement", true)
			expect(childElement).to.be.ok()
			expect(childElement.BackgroundColor3).to.equal(COLOR)

			Roact.unmount(instance)
			folder:Destroy()
		end)
	end)
end


 راستی ما از آنچه در اختیار داشت (و انجام می‌داد) کاملاً آگاه بودیم."
  },
  {
    "surah_number": 18,
    "verse_number": 92,
    "content": "سپس از وسایل و اسباب استفاده کرد."
  },
  {
    "surah_number": 18,
    "verse_number": 93,
    "content":
        "(و به سفر ادامه داد) تا به میان دو کوه رسید، و در کنار آن دو (کوه) مردمی را یافت که هیچ سخنی را نمی‌فهمیدند."
  },
  {
    "surah_number": 18,
    "verse_number": 94,
    "content":
        "(آنان به او) گفتند: «ای ذوالقرنین! یأجوج و مأجوج در این سرزمین فساد می‌کنند، پس آیا هزینه‌ای برای تو قرار دهیم، که میان ما و آن‌ها سدی بسازی؟!»"
  },
  {
    "surah_number": 18,
    "verse_number": 95,
    "content":
        "(ذوالقرنین) گفت: «آنچه پروردگارم در اختیار من قرار داده (از قدرت و ثروت) بهتر است (از آنچه شما پیشنهاد می‌کنید) پس مرا با نیرو یاری کنید، تا میان شما و آن‌ها سدّ محکمی بسازم."
  },
  {
    "surah_number": 18,
    "verse_number": 96,
    "content":
        "قطعات بزرگ آهن برایم بیاورید، (و روی هم بچینید)» تا وقتی‌که کاملاً میان دو کوه را برابر کرد (و پوشانید)، گفت: «(در اطراف آن آتش بیفروزید) و در آن بدمید» (آن‌ها دمیدند) تا وقتی قطعات آهن را سرخ و گداخته کرد. گفت: «(اکنون) مس ذوب شده برایم بیاورید؛ تا بر روی آن بریزم»."
  },
  {
    "surah_number": 18,
    "verse_number": 97,
    "content":
        "(سر انجام سد محکمی ساخت) پس آن‌ها (= یأجوج و مأجوج) اصلاً نتوانستند از آن بالا روند، و نتوانستند سوراخ و نقبی درآن ایجاد کنند."
  },
  {
    "surah_number": 18,
    "verse_number": 98,
    "content":
        "(آنگاه) گفت: «این از رحمت پروردگار من است (و تا الله بخواهد پا برجا می‌ماند) اما هنگامی‌که وعدۀ پرورد


<List>>>>.staticMethod<T<int>>();
  //                        ^^^^^^^^^^^^
  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
  // [cfe] A constructor invocation can't have type arguments after the constructor name.
  // [cfe] Member not found: 'Function.staticMethod'.
}
// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:expect/expect.dart';

enum Enum1 { _ }

enum Enum2 { A }

enum Enum3 { B, C }

// Don't format to preserve the trailing comma.
// dart format off
enum Enum4 { D, E, }
// dart format on

enum Enum5 { F, G, H }

enum _Enum6 { I, _J }

enum _IsNot { IsNot }

enum NamedName { name, address }

// Regression test for https://github.com/dart-lang/sdk/issues/33348
enum JSFunctionPrototype {
  length,
  prototype,
  __proto__,
  arguments,
  caller,
  callee,
  name,
  constructor,
  apply,
  bind,
  call,
}

void expectIs<T>(T t, bool Function(Object?) test) {
  Object? obj = t;
  Expect.isTrue(test(obj), '$obj is $T');
  Expect.isFalse(obj is _IsNot, '$obj is _IsNot');
  // test cast
  t = obj as T;
  Expect.throwsTypeError(() => obj as _IsNot, '$obj as _IsNot');
}

main() {
  expectIs(Enum1._, (e) => e is Enum1);
  expectIs(Enum2.A, (e) => e is Enum2);
  expectIs(Enum3.B, (e) => e is Enum3);
  expectIs(Enum4.E, (e) => e is Enum4);
  expectIs(Enum5.G, (e) => e is Enum5);

  Expect.equals('Enum1._', Enum1._.toString());
  Expect.equals(0, Enum1._.index);
  Expect.listEquals([Enum1._], Enum1.values);
  Enum1.values.forEach(test1);

  Expect.equals('Enum2.A', Enum2.A.toString());
  Expect.equals(0, Enum2.A.index);
  Expect.listEquals([Enum2.A], Enum2.values);
  Expect.identical(const <Enum2>[Enum2.A], Enum2.values);
  Enum2.values.forEach(test2);

  Expect.equals('Enum3.B', Enum3.B.toString());
  Expect.equals('Enum3.C', Enum3.C.toString());
  Expect.equals(0, Enum3.B.index);
  Expect.equals(1, Enum3.C.index);
  Expect.listEquals([Enum3.B, Enum3.C], Enum3.values);
  Enum3.values.forEach(test3);

  Expect.equals('Enum4.D', Enum4.D.toString());
  Expect.equals('Enum4.E', Enum4.E.toString());
  Expect.equals(0, Enum4.D.index);
  Expect.equals(1, Enum4.E.index);
  Expect.listEquals([Enum4.D, Enum4.E], Enum4.values);
  Enum4.values.forEach(test4);

  Expect.equals('Enum5.F', Enum5.F.toString());
  Expect.equals('Enum5.G', Enum5.G.toString());
  Expect.equals('Enum5.H', Enum5.H.toString());
  Expect.equals(0, Enum5.F.index);
  Expect.equals(1, Enum5.G.index);
  Expect.equals(2, Enum5.H.index);
  Expect.listEquals([Enum5.F, Enum5.G, Enum5.H], Enum5.values);
  Enum5.values.forEach(test5);


line_information(f, &self.from_meta_data)?;

        write!(
            f,
            "Name space collision for {} of name '{}' which is also defined as a {} at {}",
            self.from_kind, self.name, self.to_kind, self.to_meta_data
        )
    }
}

impl fmt::Display for CollisionKind {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match &self {
            CollisionKind::Knot => write!(f, "knot"),
            CollisionKind::Stitch => write!(f, "stitch"),
            CollisionKind::Variable => write!(f, "global variable"),
        }
    }
}
<reponame>aheart/feather
mod block_interact;
mod change;
mod interact_entity;

pub use block_interact::{BlockInteractEvent, BlockPlacementEvent};
pub use change::{CreativeFlyingEvent, SneakEvent};
pub use interact_entity::InteractEntityEvent;
<filename>src/bin/main.rs<gh_stars>1-10
#![feature(get_mut_unchecked)]

extern crate mech_core;

use mech_core::{Register, Table, TableId, Database, TableIterator, IndexRepeater, TableIndex, ValueIterator, Value, ValueMethods, Store, IndexIterator, ConstantIterator};
use std::sync::Arc;
use std::cell::RefCell;

extern crate seahash;

fn main() {

  /*let row_iter = unsafe { match row_index {
    TableIndex::Index(ix) => IndexIterator::Constant(ConstantIterator::new(TableIndex::Index(*ix))),
    TableIndex::All => {
      match (*table).rows {
        0 => IndexIterator::None,
        r => IndexIterator::Range(1..=r),
      }
    },
    TableIndex::Table(table_id) => {
      let row_table = match table_id {
        TableId::Global(id) => db.tables.get_mut(&id).unwrap() as *mut Table,
        TableId::Local(id) => self.tables.get_mut(&id).unwrap() as *mut Table,
      };
      IndexIterator::Table(TableIterator::new(row_table))
    }
    TableIndex::Alias(alias) => IndexIterator::Alias(AliasIterator::new(*alias, table_id, db.store.clone())),
    _ => IndexIterator::Range(1..=(*table).rows),
  }};

  let column_iter = unsafe { match column_index {
    TableIndex::Index(ix) => IndexIterator::Constant(ConstantIterator::new(TableIndex::Index(*ix))),
    TableIndex::All => {
      match (*table).columns {
        0 => IndexIterator::None,
        c => IndexIterator::Range(1..=c),
      }
    }
    TableIndex::Table(table_id) => {
      let col_table = match table_id {
        TableId::Global(id) => db.tables.get_mut(&id).unwrap() as *mut Table,
        TableId::Local(id) => self.tables.get_mut(&id).unwrap() as *mut Table,
      };
      IndexIterator::Table(TableIterator::new(col_table))
    }
    TableIndex::Alias(alias) => IndexIterator::Alias(AliasIterator::new(*alias, table_id, self.store.clone())),
    TableIndex::None => IndexIterator::None,
    //_ => IndexIterator::Range(1..=(*table).columns),
  }};*/

  /*let to_hash = format!("{:?}{:?}", hash, register.table_id.unwrap());
  println!("{:?}", &to_hash.clone());
  hash = seahash::hash(to_hash.as_bytes());
  println!("{:0x}


Service.selectOne(queryWrapper);
        if(shiwuzhaolingYuyueEntity==null){
            shiwuzhaolingYuyue.setShiwuzhaolingYuyueYesnoTypes(1);
            shiwuzhaolingYuyue.setInsertTime(new Date());
            shiwuzhaolingYuyue.setCreateTime(new Date());
            shiwuzhaolingYuyueService.insert(shiwuzhaolingYuyue);
            caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"新增",shiwuzhaolingYuyue.toString());
            return R.ok();
        }else {
            if(shiwuzhaolingYuyueEntity.getShiwuzhaolingYuyueYesnoTypes()==1)
                return R.error(511,"有相同的待审核的数据");
            else if(shiwuzhaolingYuyueEntity.getShiwuzhaolingYuyueYesnoTypes()==2)
                return R.error(511,"有相同的审核通过的数据");
            else
                return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody ShiwuzhaolingYuyueEntity shiwuzhaolingYuyue, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
        logger.debug("update方法:,,Controller:{},,shiwuzhaolingYuyue:{}",this.getClass().getName(),shiwuzhaolingYuyue.toString());
        ShiwuzhaolingYuyueEntity oldShiwuzhaolingYuyueEntity = shiwuzhaolingYuyueService.selectById(shiwuzhaolingYuyue.getId());//查询原先数据

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("用户".equals(role))
//            shiwuzhaolingYuyue.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));

            shiwuzhaolingYuyueService.updateById(shiwuzhaolingYuyue);//根据id更新
            List<String> strings = caozuorizhiService.clazzDiff(shiwuzhaolingYuyue, oldShiwuzhaolingYuyueEntity, request,new String[]{"updateTime"});
            caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"修改",strings.toString());
            return R.ok();
    }

    /**
    * 审核
    */
    @RequestMapping("/shenhe")
    public R shenhe(@RequestBody ShiwuzhaolingYuyueEntity shiwuzhaolingYuyueEntity, HttpServletRequest request){
        logger.debug("shenhe方法:,,Controller:{},,shiwuzhaolingYuyueEntity:{}",this.getClass().getName(),shiwuzhaolingYuyueEntity.toString());

        ShiwuzhaolingYuyueEntity oldShiwuzhaolingYuyue = shiwuzhaolingYuyueService.selectById(shiwuzhaolingYuyueEntity.getId());//查询原先数据

        if(shiwuzhaolingYuyueEntity.getShiwuzhaolingYuyueYesnoTypes() == 2){//通过
            ShiwuzhaolingEntity shiwuzhaolingEntity = shiwuzhaolingService.selectById(oldShiwuzhaolingYuyue.getShiwuzhaolingId());
            shiwuzhaolingEntity.setRenlingzhuangtai


      void OnDestroy()
        {
            isDestroyed = true;
        }
    }

    internal class Nameplates : ToggleCheat
    {
        private List<Nameplate> nameplates = new List<Nameplate>();

        public override void Update()
        {
            nameplates.ToList().FindAll(x => x.isDestroyed || !PlayerHandler.instance.playersAlive.Any(p => x.data.playerSteamID == p.GetSteamID().m_SteamID)).ForEach(x => DestroyNameplate(x));

            if (Enabled)
                PlayerHandler.instance.playersAlive.FindAll(p => !HasNameplate(p) && !p.IsLocal).ForEach(p => CreateNameplate(p));
            else nameplates.ToList().ForEach(x => DestroyNameplate(x));
        }

        private void DestroyNameplate(Nameplate np)
        {
            if (!np.isDestroyed)
                Destroy(np.gameObject);

            nameplates.Remove(np);
        }

        private bool HasNameplate(Player p) => nameplates.ToList().Any(x => x.data.playerSteamID == p.GetSteamID().m_SteamID);

        private void CreateNameplate(Player p)
        {
            GameObject go = new GameObject($"SSNP-{p.GetSteamID().m_SteamID}");
            NameplateData data = go.AddComponent<NameplateData>();
            data.player = p;
            data.playerSteamID = p.GetSteamID().m_SteamID;

            nameplates.Add(go.AddComponent<Nameplate>());
        }
    }
}