ndlerType.SMOKER -> 1
                ScreenHandlerType.ANVIL -> 1
                ScreenHandlerType.GRINDSTONE -> 1
                ScreenHandlerType.MERCHANT -> 1
                ScreenHandlerType.CARTOGRAPHY_TABLE -> 1
                ScreenHandlerType.LOOM -> 1
                else -> 9
            }
        }

        /**
         * The height of this screen handler type.
         */
        val ScreenHandlerType<*>.height: Int get() {
            return when (this) {
                ScreenHandlerType.GENERIC_9X6 -> 6
                ScreenHandlerType.CRAFTING -> 6
                ScreenHandlerType.GENERIC_9X5 -> 5
                ScreenHandlerType.GENERIC_9X4 -> 4
                ScreenHandlerType.GENERIC_9X3 -> 3
                ScreenHandlerType.GENERIC_9X2 -> 2
                ScreenHandlerType.ENCHANTMENT -> 2
                ScreenHandlerType.STONECUTTER -> 2
                ScreenHandlerType.GENERIC_9X1 -> 1
                ScreenHandlerType.BEACON -> 1
                ScreenHandlerType.HOPPER -> 1
                ScreenHandlerType.BREWING_STAND -> 1
                ScreenHandlerType.SMITHING -> 1
                else -> 3
            }
        }
    }
}
package com.mccorby.photolabeller.labeller

import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.mccorby.photolabeller.R.layout.label_item
import kotlinx.android.synthetic.main.label_item.view.*
import java.text.DecimalFormat

interface OnLabelSelectedListener {
    fun onLabelSelected(label: String, score: Double)
}

class LabelAdapter(private val labels: Array<String>, private val onLabelSelectedListener: OnLabelSelectedListener) : RecyclerView.Adapter<ViewHolder>() {

    companion object {
        private val df = DecimalFormat("#.00")
    }

    private var labelScores: List<Double>? = null

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
        return ViewHolder(LayoutInflater.from(parent.context)
                .inflate(label_item, parent, false))
    }

    override fun getItemCount() = labels.size

    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
        holder.label.text = labels[position]
        holder.score.text = labelScores?.let { df.format(it[position]) } ?: "0.00"
        holder.itemView.setOnClickListener({
            onLabelSelectedListener.onLabelSelected(labels[position], labelScores?.get(position) ?: 0.0)
        })
    }

    fun setScores(scores: List<Double>) {
        labelScores = scores
    }
}

class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
    var label: TextView = view.label_name
    var score: TextView = view.label_score
}
package com.mccorby.photolabeller.datasource

import com.mccorby.fp.Either
import com.mccorby.photolabeller.datasource.network.FederatedService
import com.mccorby.photolabeller.model.TrainingRound
import com.mccorby.photolabeller.repository.FederatedDataSource
import com.mccorby.photolabeller.repository.LocalDataSource
import kotlinx.coroutines.runBlocking
import java.io.File

class NetworkDataSource(private val service: FederatedService, private val localDataSource: LocalDataSource) : FederatedDataSource {
    override fun updateModel(): Either<Exception, File> = runBlocking {
        try {
            val stream = service.getModel().await().byteStream()
            Either.Right(localDataSource.serializeModel(stream))
        } catch (ex: Exception) {
            print(ex.message)
            Either.Left(ex)
        }


- found zero bit
		add	r2, r2, #8		@ next bit pointer
2:		cmp	r2, r1			@ any more?
		blo	1b
3:		mov	r0, r1			@ no free bits
		ret	lr
ENDPROC(_find_first_bit_be)

ENTRY(_find_next_bit_be)
		teq	r1, #0
		beq	3b
		ands	ip, r2, #7
		beq	1b			@ If new byte, goto old routine
		eor	r3, r2, #0x18		@ big endian byte ordering
 ARM(		ldrb	r3, [r0, r3, lsr #3]	)
 THUMB(		lsr	r3, #3			)
 THUMB(		ldrb	r3, [r0, r3]		)
		movs	r3, r3, lsr ip		@ shift off unused bits
		bne	.L_found
		orr	r2, r2, #7		@ if zero, then no bits here
		a


과 동물들";
UNIT_NAME_NPC = "NPC 이름";
UNIT_NAME_OWN = "플레이어 이름";
UNIT_NAME_PLAYER_TITLE = "칭호";
UNIT_PLUS_LEVEL_TEMPLATE = "%d 레벨 정예";
UNIT_POPUP_RIGHT_CLICK = "<개체창 설정을 보려면 오른쪽 클릭>";
UNIT_PVP_NAME = "%s %s%s";
UNIT_SKINNABLE_BOLTS = "기계공학 필요";
UNIT_SKINNABLE_HERB = "약초채집 필요";
UNIT_SKINNABLE_LEATHER = "무두질 가능";
UNIT_SKINNABLE_ROCK = "채광 필요";
UNIT_TYPE_LETHAL_LEVEL_TEMPLATE = "?? 레벨 %s";
UNIT_TYPE_LEVEL_FACTION_TEMPLATE = "%d 레벨 %s (%s)";
UNIT_TYPE_LEVEL_TEMPLATE = "%d 레벨 %s";
UNIT_TYPE_PLUS_LEVEL_TEMPLATE = "%d 레벨 정예 %s";
UNIT_YOU = "당신";
UNIT_YOU_DEST = "당신";
UNIT_YOU_DEST_POSSESSIVE = "당신";
UNIT_YOU_SOURCE = "당신";
UNIT_YOU_SOURCE_POSSESSIVE = "당신";
UNKNOWN = "알 수 없음";
UNKNOWNOBJECT = "무엇인가";
UNKNOWN_LANG_TTS_MESSAGE = "해석할 수 없는 언어";
UNLEARN = "습득 취소";
UNLEARN_PROFESSION = "%s 습득 취소";
UNLEARN_SKILL = "정말 %s 기술 습득을 취소하시겠습니까? 관련된 제작법도 모두 사라집니다. 추후 이 전문 기술을 다시 배울 때 전문화 지식은 유지됩니다.|n|n확인을 위해 \"습득취소\"를 입력해 주시기 바랍니다.";
UNLEARN_SKILL_CONFIRMATION = "습득취소";
UNLEARN_SKILL_TOOLTIP = "전문 기술 습득 취소";
UNLEARN_SPECIALIZATION_TOOLTIP = "해당 전문화를 습득 취소합니다.";
UNLIMITED = "제한 없음";
UNLIST_ME = "이름 등록 취소";
UNLIST_MY_GROUP = "파티 등록 취소";
UNLOCK = "잠금 해제";
UNLOCKED_AT_HONOR_LEVEL = "명예 %d 레벨에 잠금이 해제됩니다.";
UNLOCKED_AT_LEVEL = "%d 레벨에 잠금이 해제됩니다.";
UNLOCKS_AT_LABEL = "다음에 개방:";
UNLOCKS_AT_LEVEL = "%d 레벨에 잠금 해제됩니다.";
UNLOCK_FOCUS_FRAME = "잠금 해제";
UNLOCK_FRAME = "잠금


-boundry td.sb-creator,
.sb-boundry td.sb-album,
.sb-boundry td.sb-cue-in,
.sb-boundry td.sb-cue-out,
.sb-boundry td.sb-fade-in,
.sb-boundry td.sb-fade-out {
    background-color: rgba(230, 106, 49, 0.5);
}

.sb-over td.sb-image,
.sb-over td.sb-starts,
.sb-over td.sb-ends,
.sb-over td.sb-length,
.sb-over td.sb-title,
.sb-over td.sb-creator,
.sb-over td.sb-album,
.sb-over td.sb-cue-in,
.sb-over td.sb-cue-out,
.sb-over td.sb-fade-in,
.sb-over td.sb-fade-out {
    background-color: rgba(255, 0, 0, 0.5);
}

.sb-now-playing td {
    background-color: rgba(23, 235, 37, 1) !important;
}

.sb-content.padded {
	padding: 8px 8px 8px 16px;
}

table.dataTable tr.sb-past,
table.dataTable tr.sb-header,
table.dataTable tr.sb-footer,
table.dataTable tr.sb-not-allowed {
    cursor: auto;
}

table.dataTable td.sb-image {
	cursor: pointer;
}

table.datatable tr.sb-header.odd td, table.datatable tr.sb-header.even td,
table.datatable tr.sb-header.odd:hover td, table.datatable tr.sb-header.even:hover td{
    background: -moz-linear-gradient(top, #a4a4a4 0, #bcbcbc 100%);
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #a4a4a4), color-stop(100%, #bcbcbc));
	background: linear-gradient(top, #a4a4a4 0, #bcbcbc 100%);
	border-top-color:#6b6a6a !important;
}

.sb-content tr:last-child td {
	border-bottom-width: 1px !important;
    border-bottom-color:#6b6a6a !important;
}

.sb-header div.ui-state-default {
	float: left;
}

.sb-content input.ui-button {
    padding: 3px 1em;
}
.color-box {
	position:absolute;
	top:-5px;
	bottom:-5px;
	left:-5px;
	width:27px;
	background: rgba(140, 2, 140, 1);
}

.show-title, .show-time {
	display:inline-block;
	font-size:13px;
}
.show-title {
	font-weight: bold;
	margin: 0 8px;
}

.show-date {
    font-size:12px;
    color: #363636;
    margin-left: 5px;
}

.show-time {
	font-size:12px;
	color: #363636;
	margin: 0 5px;
}

.push-right {
	float:right;
	margin-right:5px;
}

/*
* keep the dialog css at the bottom so it can override previous rules if needed.
*/

.ui-dialog .wrapper {
    margin: 0;
    padding: 10px 0 0 0;
    overflow: hidden;
}

.ui-dialog .lib_content {
    margin: 0 10px 10px 0;
    overflow: auto;
    min-height: 0;
}

.ui-dialog .sb-content {
    margin: 0 0 10px 0;
    overflow: auto;
}

.ui-dialog .lib_content .padded {
    padding: 5px 10px 5px 8px;
}

.ui-dialog .sb_content .padded {
    padding: 5px 10px 5px 16px;
}/*
   Plupload
---------------


01060C 8000FA0C 02EE9021 */  addu  $s2, $s7, $t6
/* 010610 8000FA10 8E44FFFC */  lw    $a0, -4($s2)
/* 010614 8000FA14 0C002757 */  jal   func_80009D5C
/* 010618 8000FA18 8E250004 */   lw    $a1, 4($s1)
/* 01061C 8000FA1C AE420000 */  sw    $v0, ($s2)
/* 010620 8000FA20 10000006 */  b     .L8000FA3C_ovl0
/* 010624 8000FA24 00408025 */   move  $s0, $v0
.L8000FA28_ovl0:
/* 010628 8000FA28 8FA400A8 */  lw    $a0, 0xa8($sp)
/* 01062C 8000FA2C 0C00270E */  jal   func_80009C38
/* 010630 8000FA30 8E250004 */   lw    $a1, 4($s1)
/* 010634 8000FA34 AFA20054 */  sw    $v0, 0x54($sp)
/* 010638 8000FA38 00408025 */  move  $s0, $v0
.L8000FA3C_ovl0:
/* 01063C 8000FA3C 8E220000 */  lw    $v0, ($s1)
/* 010640 8000FA40 02002025 */  move  $a0, $s0
/* 010644 8000FA44 32C500FF */  andi  $a1, $s6, 0xff
/* 010648 8000FA48 3042F000 */  andi  $v0, $v0, 0xf000
/* 01064C 8000FA4C 10400009 */  beqz  $v0, .L8000FA74_ovl0
/* 010650 8000FA50 328600FF */   andi  $a2, $s4, 0xff
/* 010654 8000FA54 02002025 */  move  $a0, $s0
/* 010658 8000FA58 32C500FF */  andi  $a1, $s6, 0xff
/* 01065C 8000FA5C 328600FF */  andi  $a2, $s4, 0xff
/* 010660 8000FA60 32A700FF */  andi  $a3, $s5, 0xff
/* 010664 8000FA64 0C003DD5 */  jal   func_8000F754
/* 010668 8000FA68 AFA20010 */   sw    $v0, 0x10($sp)
/* 01066C 8000FA6C 10000004 */  b     .L8000FA80_ovl0
/* 010670 8000FA70 8E380008 */   lw    $t8, 8($s1)
.L8000FA74_ovl0:
/* 010674 8000FA74 0C003DBB */  jal   func_8000F6EC
/* 010678 8000FA78 32A700FF */   andi  $a3, $s5, 0xff
/* 01067C 8000FA7C 8E380008 */  lw    $t8, 8($s1)
.L8000FA80_ovl0:
/* 010680 8000FA80 AE18001C */  sw    $t8, 0x1c($s0)
/* 010684 8000FA84 8E2F000C */  lw    $t7, 0xc($s1)
/* 010688 8000FA88 AE0F0020 */  sw    $t7, 0x20($s0)
/* 01068C 8000FA8C 8E380010 */  lw    $t8, 0x10($s1)
/* 010690 8000FA90 AE180024 */  sw    $t8, 0x24($s0)
/* 010694 8000FA94 8E280014 */  lw    $t0, 0x14($s1)
/* 010698 8000FA98 AE080030 */  sw    $t0, 0x


[the official server implemented auth tokens][blog], this method has only
    /// worked for private servers with the [screepsmod-auth] mod.
    ///
    /// Use [`Api::set_token`] instead for the official server.
    ///
    /// [blog]: https://blog.screeps.com/2017/12/auth-tokens/
    /// [screepsmod-auth]: https://github.com/ScreepsMods/screepsmod-auth
    pub fn login<'b, U, V>(
        &self,
        username: U,
        password: V,
    ) -> impl Future<Output = Result<LoggedIn, Error>>
    where
        U: Into<Cow<'b, str>>,
        V: Into<Cow<'b, str>>,
    {
        self.post("auth/signin", LoginArgs::new(username, password))
            .send()
    }

    /// Registers a new account with the given username, password and optional email and returns a
    /// result. Successful results contain no information other than that of success.
    ///
    /// This is primarily for private servers with [screepsmod-auth] installed. Unknown if this
    /// works on the official server.
    ///
    /// [screepsmod-auth]: https://github.com/ScreepsMods/screepsmod-auth
    pub fn register(
        &self,
        details: RegistrationArgs,
    ) -> impl Future<Output = Result<RegistrationSuccess, Error>> {
        self.post("register/submit", details).send()
    }

    /// Gets user information on the user currently logged in, including username and user id.
    pub fn my_info(&self) -> Result<impl Future<Output = Result<MyInfo, Error>>, NoToken> {
        self.get("auth/me").auth().send()
    }

    /// Gets the world shard and room name the server thinks the client should start with viewing.
    pub fn world_start_room(
        &self,
    ) -> Result<impl Future<Output = Result<WorldStartRoom, Error>>, NoToken> {
        self.get("user/world-start-room").auth().send()
    }

    /// Gets the room name the server thinks the client should start with viewing for a particular
    /// shard.
    pub fn shard_start_room<'b, U>(
        &self,
        shard: U,
    ) -> Result<impl Future<Output = Result<WorldStartRoom, Error>>, NoToken>
    where
        U: Into<Cow<'b, str>>,
    {
        self.get("user/world-start-room")
            .params(&[("shard", shard.into().into_owned())])
            .auth()
            .send()
    }

    /// Get information on a number of rooms.
    pub fn map_stats<'a, U, V>(
        &self,
        shard: &'a str,
        rooms: &'a V,
    ) -> Result<impl Future<Output = Result<MapStats, Error>>, NoToken>
    where
        U: AsRef<str>,
        &'a V: IntoIterator<Item = U>,
    {
        // TODO: interpret for different stats.
        let args = MapStatsArgs::new(shard, rooms, MapStatName::RoomOwner);

        self.post("game/map-stats", args).auth().send()
    }

    /// Gets the overview of a room, returning totals for usually 3 intervals, 8, 180 and 1440,
    /// representing data for the past hour, data for the past 24 hours, and data for the past week
    /// respectively.
    ///
    /// All Allowed request_intervals are not known, but at least `8`, `180` and `1440` are allowed.
    /// The returned data, at the time of writing, includes 8 data points of each type, representing
    /// equal portions of the time period requested (hour for `8`, day for `180`, week for `1440`).
    pub fn room_overview<'


or * JpegConstants.DCTSIZE);
        }

        /// <summary>
        /// Verify that the scan script in scan_info[] is valid;
        /// also determine whether it uses progressive JPEG, and set progressive_mode.
        /// </summary>
        private void validate_script()
        {
            if (m_num_scans <= 0)
                ERREXIT(J_MESSAGE_CODE.JERR_BAD_SCAN_SCRIPT, 0);

            /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1;
            * for progressive JPEG, no scan can have this.
            */
            int[][] last_bitpos = new int [JpegConstants.MAX_COMPONENTS][];
            for (int i = 0; i < JpegConstants.MAX_COMPONENTS; i++)
                last_bitpos[i] = new int[JpegConstants.DCTSIZE2];

            bool[] component_sent = new bool [JpegConstants.MAX_COMPONENTS];

            /* -1 until that coefficient has been seen; then last Al for it */
            if (m_scan_info[0].Ss != 0 || m_scan_info[0].Se != JpegConstants.DCTSIZE2 - 1)
            {
                m_progressive_mode = true;
                for (int ci = 0; ci < m_num_components; ci++)
                {
                    for (int coefi = 0; coefi < JpegConstants.DCTSIZE2; coefi++)
                        last_bitpos[ci][coefi] = -1;
                }
            }
            else
            {
                m_progressive_mode = false;
                for (int ci = 0; ci < m_num_components; ci++)
                    component_sent[ci] = false;
            }

            for (int scanno = 1; scanno <= m_num_scans; scanno++)
            {
                jpeg_scan_info scanInfo = m_scan_info[scanno - 1];

                /* Validate component indexes */
                int ncomps = scanInfo.comps_in_scan;
                if (ncomps <= 0 || ncomps > JpegConstants.MAX_COMPS_IN_SCAN)
                    ERREXIT(J_MESSAGE_CODE.JERR_COMPONENT_COUNT, ncomps, JpegConstants.MAX_COMPS_IN_SCAN);

                for (int ci = 0; ci < ncomps; ci++)
                {
                    int thisi = scanInfo.component_index[ci];
                    if (thisi < 0 || thisi >= m_num_components)
                        ERREXIT(J_MESSAGE_CODE.JERR_BAD_SCAN_SCRIPT, scanno);

                    /* Components must appear in SOF order within each scan */
                    if (ci > 0 && thisi <= scanInfo.component_index[ci - 1])
                        ERREXIT(J_MESSAGE_CODE.JERR_BAD_SCAN_SCRIPT, scanno);
                }

                /* Validate progression parameters */
                int Ss = scanInfo.Ss;
                int Se = scanInfo.Se;
                int Ah = scanInfo.Ah;
                int Al = scanInfo.Al;
                if (m_progressive_mode)
                {
                    /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that
                    * seems wrong: the upper bound ought to depend on data precision.
                    * Perhaps they really meant 0..N+1 for N-bit precision.
                    * Here we allow 0..10 for 8-bit data; Al larger than 10 results in
                    * out-of-range reconstructed DC values during the first DC scan,
                    * which might cause problems for some decoders.
                    */
                    const int MAX_AH_AL = 10;
                    if (Ss < 0 || Ss >= JpegConstants.DCTSIZE2 || Se < Ss || Se >= Jpeg


6,"HEBREW LETTER WIDE FINAL MEM"},
{0xFB23,"HEBREW LETTER WIDE HE"},
{0xFB24,"HEBREW LETTER WIDE KAF"},
{0xFB25,"HEBREW LETTER WIDE LAMED"},
{0xFB27,"HEBREW LETTER WIDE RESH"},
{0xFB28,"HEBREW LETTER WIDE TAV"},
{0x05D9,"HEBREW LETTER YOD"},
{0xFB39,"HEBREW LETTER YOD WITH DAGESH"},
{0xFB1D,"HEBREW LETTER YOD WITH HIRIQ"},
{0x05D6,"HEBREW LETTER ZAYIN"},
{0xFB36,"HEBREW LETTER ZAYIN WITH DAGESH"},
{0xFB4F,"HEBREW LIGATURE ALEF LAMED"},
{0x05F0,"HEBREW LIGATURE YIDDISH DOUBLE VAV"},
{0x05F2,"HEBREW LIGATURE YIDDISH DOUBLE YOD"},
{0x05F1,"HEBREW LIGATURE YIDDISH VAV YOD"},
{0xFB1F,"HEBREW LIGATURE YIDDISH YOD YOD PATAH"},
{0x05C5,"HEBREW MARK LOWER DOT"},
{0x05AF,"HEBREW MARK MASORA CIRCLE"},
{0x05C4,"HEBREW MARK UPPER DOT"},
{0x05BC,"HEBREW POINT DAGESH OR MAPIQ"},
{0x05B2,"HEBREW POINT HATAF PATAH"},
{0x05B3,"HEBREW POINT HATAF QAMATS"},
{0x05B1,"HEBREW POINT HATAF SEGOL"},
{0x05B4,"HEBREW POINT HIRIQ"},
{0x05B9,"HEBREW POINT HOLAM"},
{0x05BA,"HEBREW POINT HOLAM HASER FOR VAV"},
{0xFB1E,"HEBREW POINT JUDEO-SPANISH VARIKA"},
{0x05BD,"HEBREW POINT METEG"},
{0x05B7,"HEBREW POINT PATAH"},
{0x05B8,"HEBREW POINT QAMATS"},
{0x05C7,"HEBREW POINT QAMATS QATAN"},
{0x05BB,"HEBREW POINT QUBUTS"},
{0x05BF,"HEBREW POINT RAFE"},
{0x05B6,"HEBREW POINT SEGOL"},
{0x05B0,"HEBREW POINT SHEVA"},
{0x05C1,"HEBREW POINT SHIN DOT"},
{0x05C2,"HEBREW POINT SIN DOT"},
{0x05B5,"HEBREW POINT TSERE"},
{0x05F3,"HEBREW PUNCTUATION GERESH"},
{0x05F4,"HEBREW PUNCTUATION GERSHAYIM"},
{0x05BE,"HEBREW PUNCTUATION MAQAF"},
{0x05C6,"HEBREW PUNCTUATION NUN HAFUKHA"},
{0x05C0,"HEBREW PUNCTUATION PASEQ"},
{0x05C3,"HEBREW PUNCTUATION SOF PASUQ"},
{0x05EF,"HEBREW YOD TRIANGLE"},
{0x1F994,"HEDGEHOG"},
{0x1F681,"HELICOPTER"},
{0x2BFF,"HELLSCHREIBER PAUSE SYMBOL"},
{0x2388,"HELM SYMBOL"},
{0x26D1,"HELMET WITH WHITE CROSS"},
{0x1B002,"HENTAIGANA LETTER A-1"},
{0x1B003,"HENTAIGANA LETTER A-2"},
{0x1B004,"HENTAIGANA LETTER A-3"},
{0x1B005,"HENTAIGANA LETTER A-WO"},
{0x1B00F,"HENTAIGANA LETTER E-2"},
{0x1B010,"HENTAIGANA LETTER E-3"},
{0x1B011,"HENTAIGANA LETTER E-4"},
{0x1B012,"HENTAIGANA LETTER E-5"},
{0x1B013,"HENT


out to 00011111. (00000111 | 00011111)
        result = Bits.pack(result, 2..4, 7)
        assertEquals(31, result)
    }

    @Test
    fun `pack single bit in various positions`() {
        val positions = listOf(0, 1, 15, 31)
        for (pos in positions) {
            assertEquals(1 shl pos, Bits.pack(0, pos..pos, 1))
            assertEquals(0, Bits.pack(1 shl pos, pos..pos, 0))
        }
    }

    @Test
    fun `pack invalid bit range`() {
        assertThrows<BitRangeOutOfBounds> { Bits.pack(0, -1..5, 0) }
        assertThrows<BitRangeOutOfBounds> { Bits.pack(0, 0..32, 0) }
        assertThrows<BitRangeOutOfBounds> { Bits.pack(0, -1..32, 0) }
    }

    @Test
    fun `pack bits on 32-bit range`() {
        val bits = 0..31
        val whole = 0
        assertEquals(-Int.MAX_VALUE, Bits.pack(whole, bits, -Int.MAX_VALUE))
        assertEquals(0, Bits.pack(whole, bits, 0))
        assertEquals(Int.MAX_VALUE, Bits.pack(whole, bits, Int.MAX_VALUE))
    }

    @Test
    fun `check bounds on 32-bit pack`() {
        assertDoesNotThrow { Bits.pack(0, 0 until 32, 0) }
        assertDoesNotThrow { Bits.pack(0, 0 until 32, Int.MAX_VALUE) }
        assertDoesNotThrow { Bits.pack(0, 0 until 32, -Int.MAX_VALUE) }
    }

    @ParameterizedTest
    @ArgumentsSource(BitMaskProvider::class)
    fun `check bounds on pack`(bits: IntRange, maxValue: Int) {
        assertDoesNotThrow { Bits.pack(0, bits, -maxValue) }
        assertDoesNotThrow { Bits.pack(0, bits, 0) }
        assertDoesNotThrow { Bits.pack(0, bits, maxValue) }
        assertThrows<BitValueOutOfBounds> { Bits.pack(0, bits, -(maxValue + 1)) }
        assertThrows<BitValueOutOfBounds> { Bits.pack(0, bits, maxValue + 1) }
    }
}
package org.rsmod.map.square

import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import org.rsmod.map.square.MapSquareGrid.Companion.LEVEL_BIT_MASK
import org.rsmod.map.square.MapSquareGrid.Companion.X_BIT_MASK
import org.rsmod.map.square.MapSquareGrid.Companion.Z_BIT_MASK

class MapSquareGridTest {
    @Test
    fun `construct every map square grid`() {
        for (level in 0..LEVEL_BIT_MASK) {
            for (z in 0..Z_BIT_MASK) {
                for (x in 0..X_BIT_MASK) {
                    val coords = MapSquareGrid(x, z, level)
                    assertEquals(x, coords.x)
                    assertEquals(z, coords.z)
                    assertEquals(level, coords.level)
                }
            }
        }
    }

    @Test
    fun `deconstruct every map square grid`() {
        for (level in 0..LEVEL_BIT_MASK) {
            for (z in 0..Z_BIT_MASK) {
                for (x in 0..X_BIT_MASK) {
                    val coords = MapSquareGrid(x, z, level)
                    val (c1, c2, c3) = coords
                    assertEquals(x, c1)
                    assertEquals(z, c2)
                    assertEquals(level, c3)
                }
            }
        }
    }

    @Test
    fun `fail to construct on out of bound map square grid`


            if (widget.showPrompt)
              Padding(
                padding: const EdgeInsets.only(top: 15.0),
                child: Text(messages.message(UpgraderMessage.prompt) ?? ''),
              ),
            if (notes != null) notes,
          ],
        )));
    final actions = <Widget>[
      if (showIgnore)
        button(
          cupertino: cupertino,
          text: messages.message(UpgraderMessage.buttonTitleIgnore),
          context: context,
          onPressed: () => onUserIgnored(context, true),
          isDefaultAction: false,
        ),
      if (showLater)
        button(
          cupertino: cupertino,
          text: messages.message(UpgraderMessage.buttonTitleLater),
          context: context,
          onPressed: () => onUserLater(context, true),
          isDefaultAction: false,
        ),
      button(
        cupertino: cupertino,
        text: messages.message(UpgraderMessage.buttonTitleUpdate),
        context: context,
        onPressed: () => onUserUpdated(context, !widget.upgrader.blocked()),
        isDefaultAction: true,
      ),
    ];

    return cupertino
        ? CupertinoAlertDialog(
            key: key, title: textTitle, content: content, actions: actions)
        : AlertDialog(
            key: key, title: textTitle, content: content, actions: actions);
  }

  Widget button({
    required bool cupertino,
    String? text,
    required BuildContext context,
    VoidCallback? onPressed,
    bool isDefaultAction = false,
  }) {
    return cupertino
        ? CupertinoDialogAction(
            textStyle: widget.cupertinoButtonTextStyle,
            onPressed: onPressed,
            isDefaultAction: isDefaultAction,
            child: Text(text ?? ''))
        : TextButton(onPressed: onPressed, child: Text(text ?? ''));
  }
}
/*
 * Copyright (c) 2023 Larry Aasen. All rights reserved.
 */

import 'package:flutter/material.dart';
import 'package:upgrader/upgrader.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Only call clearSavedSettings() during testing to reset internal values.
  await Upgrader.clearSavedSettings(); // REMOVE this for release builds

  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    Future.delayed(const Duration()).then((value) {
      setState(() {});
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Upgrader StatefulWidget Example',
      home: UpgradeAlert(
          child: Scaffold(
        appBar: AppBar(title: const Text('Upgrader StatefulWidget Example')),
        body: const Center(child: Text('Checking...')),
      )),
    );
  }
}
// Copyright (c) 2024 Larry Aasen. All rights reserved.

import 'package:uvc/uvc.dart';

Future<void> main() async {
  final uvc = UvcLib(debugLogging: true, debugLoggingLibUsb: false);

  // printUvcDevices(uvc);
  // printUsbDevices(uvc);
  await cameraExample(uvc);

  uvc.dispose();
}

void printUvcDevices(UvcLib uvc) {
  final uvcDevices = uvc.devices.get(onlyUvcDevices: true);
  for (final device in uvcDevices) {
    print('example: UvcDevice: $device');
  }
}

void printUsbDevices(UvcLib uvc) {
  final usbDevices = uvc.devices.get();
  for (final device in usbDevices) {
    print('example: UsbDevice: $device');
  }
}

Future<void> cameraExample(


nsitions] option does not affect
  /// the intervals returned.
  ///
  /// * [interval]: Interval to find zone intervals for. This is allowed to be unbounded (i.e.
  /// infinite in both directions).
  /// * [options]:
  // todo: merge with regular getZoneIntervals as a custom parameter
  Iterable<ZoneInterval> getZoneIntervalsOptions(Interval interval, ZoneEqualityComparerOptions options) {
    if ((options & ~ZoneEqualityComparerOptions.strictestMatch).value != 0) {
      throw ArgumentError('The value $options is not defined within ZoneEqualityComparer.Options');
    }
    var zoneIntervalEqualityComparer = ZoneIntervalEqualityComparer(options, interval);
    var originalIntervals = getZoneIntervals(interval);
    return zoneIntervalEqualityComparer.coalesceIntervals(originalIntervals);
  }
}

// Portions of this work are Copyright 2018 The Time Machine Authors. All rights reserved.
// Portions of this work are Copyright 2018 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0, as found in the LICENSE.txt file.

import 'dart:convert';
import 'dart:math' as math;

import 'package:meta/meta.dart';
import 'package:time_machine/src/time_machine_internal.dart';

/// See [CalendarSystem.badi] for details about the Badíʿ calendar.
@internal
class BadiYearMonthDayCalculator extends YearMonthDayCalculator {
// named constants to avoid use of raw numbers in the code
  static const int _averageDaysPer10Years = 3652; // Ideally 365.2425 per year...
  static const int _daysInAyyamiHaInLeapYear = 5;
  static const int _daysInAyyamiHaInNormalYear = 4;

  static const int daysInMonth = 19;
  static const int firstYearOfStandardizedCalendar = 172;
  static const int gregorianYearOfFirstBadiYear = 1844;

  /// There are 19 months in a year. Between the 18th and 19th month are the 'days of Ha' (Ayyam-i-Ha).
  /// In order to make everything else in Noda Time work appropriately, Ayyam-i-Ha are counted as
  /// extra days at the end of month 18.
  static const int month18 = 18;
  static const int _month19 = 19;
  static const int _monthsInYear = 19;

  static const int _unixEpochDayAtStartOfYear1 = -45941;
  static const int _badiMaxYear = 1000; // current lookup tables are pre-calculated for a thousand years
  static const int _badiMinYear = 1;

  /// This is the base64 representation of information for years 172 to 1000.
  /// NazRuzDate falls on March 19, 20, 21, or 22.
  /// DaysInAyymiHa can be 4,5.
  /// For each year, the value in the array is (NawRuzDate - 19) + 10 * (DaysInAyyamiHa - 4)
  static final List<int> _yearInfoRaw = base64.decode(
      'AgELAgIBCwICAQsCAgEBCwIBAQsCAQELAgEBCwIBAQsCAQELAgEBCwIBAQELAQEBCwEBAQsBAQELAQEB'
          'CwEBAQsBAQELAQEBCwEBAQEKAQEBCgEBAQsCAgILAgICCwICAgsCAgILAgICCwICAgELAgIBCwICAQsC'
          'AgELAgIBCwICAQsCAgELAgIBCwICAQELAgEBCwIBAQsCAQELAgEBCwIBAQsCAQELAgEBCwIBAQELAQEB'
          'CwEBAQsCAgIMAgICDAICAgwCAgIMAgICDAICAgILAgICCwICAgsCAgILAgICCwICAgsCAgILAgICCwIC'
          'AgELAgIBCwICAQsCAgELAgIBCwICAQsCAgELAgIBCwICAQELAgEBCwIBAQsCAgIMAwICDAMCAgwDAgIM'
          'AwICDAMCAgIMAgICDAICAgwCAgIMAgICDAICAgwCAgIMAgICDAICAgILAgICCwICAgsCAgILAgICCwIC'
          'AgsCAgILAgICAQsCAgELAgIBCwICAQsCAgELAgIBCwICAQsCAgELAgIBCwICAQELAgEBCwIBAQsCAQEL'
          'AgEBCwIBAQsCAQELAgEBCwIBAQELAQEBCwEBAQsBAQELAQEBCwEBAQsBAQELAQEBCwEBAQEKAQEBCg


	v0 = pl2[0] * pl1[4] + pl2[4] * pl1[0];
	v1 = pl2[1] * pl1[2] - pl2[2] * pl1[1] + pl2[5] * pl1[3] - pl2[3] * pl1[5];
	v2 = pl2[1] * pl1[5] + pl2[2] * pl1[3] + pl2[5] * pl1[1] + pl2[3] * pl1[2];

	derivative:
	v1 * cos(t) - v2 * sin(t) = 0;

	r = tan(t / 2);
	sin(t) = 2*r/(1+r*r);
	cos(t) = (1-r*r)/(1+r*r);

	-v2 * 2 * r / (1 + r*r) + v1 * (1 - r*r)/(1+r*r);
	-v2 * 2 * r + v1 * (1 - r*r) / (1 + r*r) = 0;
	-v2 * 2 * r + v1 * (1 - r*r) = 0;
	(-v1) * r * r + (-2 * v2) * r + (v1) = 0;

	*/

	tanHalfAngle = 0.0f;

	// transform rotation axis to z-axis
	ct = ( vc - tw->origin ) * tw->matrix;
	dt = ( vd - tw->origin ) * tw->matrix;

	pl2.FromLine( ct, dt );

	v0 = pl2[0] * pl1[4] + pl2[4] * pl1[0];
	v1 = pl2[1] * pl1[2] - pl2[2] * pl1[1] + pl2[5] * pl1[3] - pl2[3] * pl1[5];
	v2 = pl2[1] * pl1[5] + pl2[2] * pl1[3] + pl2[5] * pl1[1] + pl2[3] * pl1[2];

	// get the direction of motion at the initial position
	c = v0 + v2;
	if( tw->angle > 0.0f )
	{
		if( c > 0.0f )
		{
			dir = v1;
		}
		else
		{
			dir = -v1;
		}
	}
	else
	{
		if( c > 0.0f )
		{
			dir = -v1;
		}
		else
		{
			dir = v1;
		}
	}
	// negative direction means the edges move towards each other at the initial position
	if( dir <= 0.0f )
	{
		return true;
	}

	a = -v1;
	b = -v2;
	c = v1;
	if( a == 0.0f )
	{
		if( b == 0.0f )
		{
			return false;
		}
		frac1 = -c / ( 2.0f * b );
		frac2 = 1e10;	// = tan( idMath::HALF_PI )
	}
	else
	{
		d = b * b - c * a;
		if( d <= 0.0f )
		{
			return false;
		}
		sqrtd = sqrt( d );
		if( b > 0.0f )
		{
			q = - b + sqrtd;
		}
		else
		{
			q = - b - sqrtd;
		}
		frac1 = q / a;
		frac2 = c / q;
	}

	if( tw->angle < 0.0f )
	{
		frac1 = -frac1;
		frac2 = -frac2;
	}

	if( frac1 < 0.0f && frac2 < 0.0f )
	{
		return false;
	}

	if( frac1 > frac2 )
	{
		tanHalfAngle = frac1;
	}
	else
	{
		tanHalfAngle = frac2;
	}

	if( tw->angle < 0.0f )
	{
		tanHalfAngle = -tanHalfAngle;
	}

	return true;
}

/*
================
idCollisionModelManagerLocal::RotateTrmEdgeThroughPolygon
================
*/
void idCollisionModelManagerLocal::RotateTrmEdgeThroughPolygon( cm_traceWork_t* tw, cm_polygon_t* poly, cm_trmEdge_t* trmEdge )
{
	int i, j, edgeNum;
	float f1, f2, startTan, dir, tanHalfAngle;
	cm_edge_t* edge;
	cm_vertex


    expect_stdout: "PASS"
}
keep_properties: {
    options = {
        evaluate: true,
        properties: false,
    }
    input: {
        a["foo"] = "bar";
    }
    expect: {
        a["foo"] = "bar";
    }
}

dot_properties: {
    options = {
        evaluate: true,
        properties: true,
    }
    beautify = {
        ie: true,
    }
    input: {
        a["foo"] = "bar";
        a["if"] = "if";
        a["*"] = "asterisk";
        a["\u0EB3"] = "unicode";
        a[""] = "whitespace";
        a["1_1"] = "foo";
    }
    expect: {
        a.foo = "bar";
        a["if"] = "if";
        a["*"] = "asterisk";
        a["\u0EB3"] = "unicode";
        a[""] = "whitespace";
        a["1_1"] = "foo";
    }
}

dot_properties_es5: {
    options = {
        evaluate: true,
        properties: true,
    }
    beautify = {
        ie: false,
    }
    input: {
        a["foo"] = "bar";
        a["if"] = "if";
        a["*"] = "asterisk";
        a["\u0EB3"] = "unicode";
        a[""] = "whitespace";
    }
    expect: {
        a.foo = "bar";
        a.if = "if";
        a["*"] = "asterisk";
        a["\u0EB3"] = "unicode";
        a[""] = "whitespace";
    }
}

sub_properties: {
    options = {
        evaluate: true,
        properties: true,
    }
    input: {
        a[0] = 0;
        a["0"] = 1;
        a[3.14] = 2;
        a["3" + ".14"] = 3;
        a["i" + "f"] = 4;
        a["foo" + " bar"] = 5;
        a[0 / 0] = 6;
        a[null] = 7;
        a[undefined] = 8;
    }
    expect: {
        a[0] = 0;
        a[0] = 1;
        a[3.14] = 2;
        a[3.14] = 3;
        a.if = 4;
        a["foo bar"] = 5;
        a.NaN = 6;
        a.null = 7;
        a[void 0] = 8;
    }
}

evaluate_array_length: {
    options = {
        evaluate: true,
        properties: true,
        unsafe: true,
    }
    input: {
        a = [1, 2, 3].length;
        a = [1, 2, 3].join()["len" + "gth"];
        a = [1, 2, b].length;
        a = [1, 2, 3].join(b).length;
    }
    expect: {
        a = 3;
        a = 5;
        a = [1, 2, b].length;
        a = [1, 2, 3].join(b).length;
    }
}

evaluate_string_length: {
    options = {
        evaluate: true,
        properties: true,
        unsafe: true,
    }
    input: {
        a = "foo".length;
        a = ("foo" + "bar")["len" + "gth"];
        a = b.length;
        a = ("foo" + b).length;
    }
    expect: {
        a = 3;
        a = 6;
        a = b.length;
        a = ("foo" + b).length;
    }
}

mangle_properties_1: {
    mangle = {
        properties: {
            domprops: true,
            keep_quoted: false,
        },
    }
    input: {
        a["foo"] = "bar";
        a.color = "red";
        x = {"bar": 10};
        a.run(x.bar, a.foo);
        a['run']({color: "blue", foo: "baz"}


using Google.Protobuf;
using Google.Protobuf.WellKnownTypes;
using Grpc.Core;
using Grpc.Net.Client;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;
using Xunit;

namespace Dtmgrpc.IntegrationTests
{
    public class GrpcCallInvokerTests
    {
        private static readonly Marshaller<dtmgpb.DtmGidReply> DtmGidReplyMarshaller = Marshallers.Create(r => r.ToByteArray(), data => dtmgpb.DtmGidReply.Parser.ParseFrom(data));
        private static readonly Marshaller<Empty> EmptyMarshaller = Marshallers.Create(r => r.ToByteArray(), data => Empty.Parser.ParseFrom(data));

        [Fact]
        public async Task CallInvokerAsync()
        {
            AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);


高，
或者我们有能力处理更复杂的模型，这使得过去被认为是“有效”的近似模型，
在新的标准下可能变得不再适用，需要被更精细的模型所取代。
例如，牛顿引力在大多数情况下是极好的近似，但在强引力场或需要极高精度的天体动力学计算（如精确预测水星近日点进动）时，就必须使用广义相对论。

因此，“有效近似”是一个动态的、依赖于具体情境的判断。
科学和工程的进步，在某种程度上就是不断追求更好、更精确的近似模型，并清晰界定现有模型适用边界的过程。
批判性思维要求我们不仅要关注模型的预测能力，还要关注其误差范围和失效条件。

#### 4.2.3 科学革命与几何范式的转变

科学发展的历史并非总是平稳的线性积累，而是会经历一些根本性的概念变革和理论重构，
即托马斯·库恩 (Thomas Kuhn) 所称的“**科学革命 (Scientific Revolutions)**”。
在这些革命性的转变中，作为描述物理现实基础框架的几何观念，往往会发生深刻的**范式转变 (Paradigm Shifts)**。
这有力地证明了我们对现实的几何描述是可修正的、可演进的，它随着我们观测能力的增强、理论洞察的深化以及哲学观念的变革而不断发展。

- **从亚里士多德物理学到牛顿物理学 (Aristotelian to Newtonian Physics)**：
  - **亚里士多德的宇宙观**：基于有限的、分层的、以地球为中心的宇宙模型。其空间观念与物体的“天然位置”和“天然运动”相关。
  - **哥白尼革命与开普勒定律**：将宇宙中心从地球移到太阳，并用椭圆轨道取代圆形轨道，这本身就是对宇宙几何模型的重大修正。
  - **伽利略的运动学与牛顿的综合**：伽利略对抛体运动的几何分析（抛物线轨迹）和牛顿建立在无限、均匀、绝对欧氏空间基础上的力学体系，
  彻底取代了亚里士多德的物理学和宇宙观。这标志着一种全新的、数学化的、基于普适几何框架的物理范式的确立。

- **从牛顿经典物理到爱因斯坦相对论 (Newtonian Physics to Einst


# -*- coding: utf-8 -*-
{
    'name': "eCommerce Mondialrelay Delivery",
    'summary': "Let's choose Point Relais® on your ecommerce",

    'description': """
This module allow your customer to choose a Point Relais® and use it as shipping address.
    """,
    'category': 'Website/Website',
    'version': '0.1',
    'depends': ['website_sale', 'delivery_mondialrelay'],
    'data': [
        'views/delivery_carrier_views.xml',
        'views/delivery_form_templates.xml',
        'views/res_config_settings_views.xml',
        'views/templates.xml',
    ],
    'assets': {
        'web.assets_frontend': [
            'website_sale_mondialrelay/static/src/**/*',
        ],
    },
    'license': 'LGPL-3',
    'auto_install': True,
}


strb.w r1, [sb, #0x24]
jump_7502:
    ldr r0, [pc, #0x268] /* data_776c */
    movs r7, #1
    add.w r0, r0, r4, lsl #3
    str r0, [sp]
    ldr r0, [pc, #0x260] /* data_7770 */
    ldr.w fp, [pc, #0x258] /* data_7768 */
    add.w r0, r0, r4, lsl #3
    str r0, [sp, #4]
    ldr r0, [pc, #0x258] /* data_7774 */
    lsls r7, r5
    add.w r0, r0, r4, lsl #3
    mov.w sl, #0
    str r0, [sp, #8]
    cmp.w r8, #0
    beq jump_7628
    ldrb.w r0, [sb, #0x1b]
    mov r8, sb
    cmp r0, #1
    beq jump_753e
    ldrb.w r0, [r8, #0x1c]
    cmp r0, #3
    bne jump_754a
jump_753e:
    bl function_e_84
    strb.w sl, [r8, #0x1b]
    strb.w sl, [r8, #0x1c]
jump_754a:
    ldrb.w r0, [r8, #2]
    mov.w r2, #0x100
    cbz r0, jump_7570
    ldr.w sb, [pc, #0x220] /* data_7778 */
    ldrb.w r1, [sb, r4]
    orrs r1, r7
    strb.w r1, [sb, r4]
    ldrb.w r0, [r8, #0x24]
    cmp r0, #3
    beq jump_75ea
    cmp r0, #0x13
    beq jump_765c
    b jump_7626
jump_7570:
    ldrb.w r0, [r8, #0x24]
    mov r7, r8
    cmp r0, #2
    beq jump_7580
    cmp r0, #0x12
    beq jump_75b0
    b jump_7632
jump_7580:
    add.w r7, r7, #0x18
    ldrb r0, [r7, #0xe]
    add.w r1, r0, r0, lsl #1
    add.w r0, fp, r1, lsl #4
    ldrb r1, [r7]
    add.w r0, r0, r1, lsl #4
    ldr r0, [r0, #-0x8]
    strb.w sl, [r7, #0x1a]
    add.w r1, r0, r6, lsl #8
    mov.w r0, #1
    strb r0, [r7, #3]
    strb r0, [r7, #4]
    strh.w sl, [r7, #0x2a]
    strb r4, [r7, #0x1e]
    b jump_761c
jump_75b0:
    add.w r7, r7, #0x18
    mov.w r2, #2
    ldrb r0, [r7, #0xe]
    add.w r1, r0, r0, lsl #1
    add.w r0, fp, r1, lsl #4
    ldrb r1, [r7]
    add.w r0, r0, r1, lsl #4
    ldr r0, [r0, #-0x8]
    add.w r1, r0, r6, lsl #8
    ldr r0, [pc, #0x1a8] /* dat


VMOVDQU64 Z20, 128(AX)(SI*8)
    VMOVDQU64 Z23, 192(AX)(SI*8)
    ADDQ $32, SI
    CMPQ SI, DI
    JB loop32x64
    VZEROUPPER
loop:
    CMPQ SI, CX
    JE done
    MOVQ $PRIME5+8, R8
    MOVQ (BX)(SI*8), R9

    XORQ R10, R10
    round(R9, R10)
    XORQ R10, R8
    ROLQ $27, R8
    IMULQ prime1, R8
    ADDQ prime4, R8
    avalanche(R9, R8)

    MOVQ R8, (AX)(SI*8)
    INCQ SI
    JMP loop
done:
    RET

// func MultiSum64Uint128(h []uint64, v [][16]byte) int
TEXT ·MultiSum64Uint128(SB), NOSPLIT, $0-54
    MOVQ $PRIME1, prime1
    MOVQ $PRIME2, prime2
    MOVQ $PRIME3, prime3
    MOVQ $PRIME4, prime4

    MOVQ h_base+0(FP), AX
    MOVQ h_len+8(FP), CX
    MOVQ v_base+24(FP), BX
    MOVQ v_len+32(FP), DX

    CMPQ CX, DX
    CMOVQGT DX, CX
    MOVQ CX, ret+48(FP)

    XORQ SI, SI
    CMPQ CX, $16
    JB loop
    CMPB ·hasAVX512(SB), $0
    JE loop

    MOVQ CX, DI
    SHRQ $4, DI
    SHLQ $4, DI

    VMOVDQU64 prime1vec<>(SB), prime1ZMM
    VMOVDQU64 prime2vec<>(SB), prime2ZMM
    VMOVDQU64 prime3vec<>(SB), prime3ZMM
    VMOVDQU64 prime4vec<>(SB), prime4ZMM
    VMOVDQU64 prime5vec16<>(SB), Z6
    VMOVDQU64 vpermi2qeven<>(SB), Z7
    VMOVDQU64 vpermi2qodd<>(SB), Z8
loop16x64:
    // This algorithm is slightly different from the other ones, because it is
    // the only case where the input values are larger than the output (128 bits
    // vs 64 bits).
    //
    // Computing the XXH64 of 128 bits values requires doing two passes over the
    // lower and upper 64 bits. The lower and upper quad/ words are split in
    // separate vectors, the first pass is applied on the vector holding the
    // lower bits of 8 input values, then the second pass is applied with the
    // vector holding the upper bits.
    //
    // Following the model used in the other functions, we unroll


Attr);
        this.context = context;
        init();
        initEvent();
    }

    private void init() {
        panel = new EditorPanelAlpha(context);
        richEditor = new RichEditor(context);
        LayoutParams panelParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM);
        addView(panel, panelParams);
        LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
        params.setMargins(0, DensityUtil.dp2px(context, 50), 0, DensityUtil.dp2px(context, 50));
        richEditor.setLayoutParams(params);
        addView(richEditor);

        paramManager = RichBuilder.getInstance().getManger();
        spanFactory = RichBuilder.getInstance().getFactory();
        panelHelper = RichBuilder.getInstance().getPanelBuilder();
    }

    private void initEvent() {
        richEditor.setOnEditorEvent(onEditorEvent);
        panelHelper.setStateChange(new onPanelStateChange() {
            @Override
            public void onStateChanged() {
                switch (panelHelper.getType()) {
                    case TYPE_FONT:
                        onFontEvent(panelHelper.getFontParam());
                        break;
                    case TYPE_LINK:
                        onLinkEvent(panelHelper.getFontParam());
                        break;
                    case TYPE_PARAGRAPH:
                        onParagraphEvent(panelHelper.getParagraphType());
                        break;
                    case TYPE_PANEL:
                        onPanelEvent(panelHelper.isShow());
                        break;
                    case TYPE_PHOTOPICKER:
                        onPhotoEvent();
                        break;
                }
            }
        });
    }

    private onEditorEvent onEditorEvent = new onEditorEvent() {
        @Override
        public void onLineCountChange(List<RichModel> data) {
            if (callback != null) {
                callback.onLineNumChange(data);
            }
        }
    };

    private void onPhotoEvent() {
        if (callback != null) {
            callback.onPhotoEvent();
        }
    }

    private void onPanelEvent(boolean show) {
        FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) richEditor.getLayoutParams();
        if (show) {
            params.bottomMargin = DensityUtil.dp2px(context, 100);
        } else {
            params.bottomMargin = DensityUtil.dp2px(context, 50);
        }
    }

    private void onLinkEvent(FontParam param) {
        SpanModel linkModel = new SpanModel(param);
        linkModel.code = param.getCharCodes();
        linkModel.mSpans = spanFactory.createSpan(linkModel.code);

        richEditor.insertSpan(param.name, linkModel);
        richEditor.notifyEvent();
        RichBuilder.getInstance().reset();
    }

    /**
     * 段落样式改变事件
     */
    private void onParagraphEvent(int pType) {
        initParagraphSpan(pType);
        richEditor.notifyEvent();
    }

    private void onParagraphEvent(ParagraphChangeEvent state) {
        if (!state.isSelected) {
            richEditor.getCurIndexModel().setNoParagraphSpan();
            richEditor.notifyEvent();
            return;
        }
        initParagraphSpan(state.pType);
        richEditor.notifyEvent();
    }

    private void initParagraphSpan(int pType) {
        if (pType != Const.PARAGRAPH_NONE) {
            SpanModel model = new SpanModel(pType);
            model.code = paramManager.getParamCode(pType);
            model.mSpans = spanFactory.createSpan(model.code);
            richEditor.getCurIndexModel().setParagraphSpan(model);


runanywhereai"
        minSdk = 24
        targetSdk = 36
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

        // Native build disabled for now to focus on Kotlin implementation
        // externalNativeBuild {
        //     cmake {
        //         cppFlags += listOf("-std=c++17", "-O3")
        //         arguments += listOf(
        //             "-DANDROID_STL=c++_shared",
        //             "-DBUILD_SHARED_LIBS=ON"
        //         )
        //     }
        // }

        ndk {
            abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
        }
    }

    buildTypes {
        debug {
            isDebuggable = true
            isMinifyEnabled = false
            isShrinkResources = false
            applicationIdSuffix = ".debug"
            versionNameSuffix = "-debug"

            // Disable optimizations for faster builds
            buildConfigField("boolean", "DEBUG_MODE", "true")
            buildConfigField("String", "BUILD_TYPE", "\"debug\"")
        }

        release {
            isDebuggable = false
            isMinifyEnabled = true
            isShrinkResources = true

            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )

            // Build configuration fields
            buildConfigField("boolean", "DEBUG_MODE", "false")
            buildConfigField("String", "BUILD_TYPE", "\"release\"")

            // Optimization flags
            isJniDebuggable = false

            // Using default debug signing for now
        }

        create("benchmark") {
            initWith(getByName("release"))
            matchingFallbacks += listOf("release")
            isDebuggable = false

            // Additional optimizations for benchmarking
            buildConfigField("boolean", "BENCHMARK_MODE", "true")
            applicationIdSuffix = ".benchmark"
            versionNameSuffix = "-benchmark"
        }
    }

    // Signing configurations
    // Using default debug keystore for now

    // APK splits disabled for now to focus on basic functionality
    // splits {
    //     abi {
    //         isEnable = true
    //         reset()
    //         include("armeabi-v7a", "arm64-v8a")  // Focus on ARM architectures for mobile
    //         isUniversalApk = true  // Also generate a universal APK
    //     }
    //
    //     density {
    //         isEnable = true
    //         reset()
    //         include("ldpi", "mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi")
    //     }
    // }

    // Packaging options
    packaging {
        resources {
            excludes += listOf(
                "/META-INF/{AL2.0,LGPL2.1}",
                "/META-INF/DEPENDENCIES",
                "/META-INF/LICENSE",
                "/META-INF/LICENSE.txt",
                "/META-INF/NOTICE",
                "/META-INF/NOTICE.txt",
                "/META-INF/licenses/**",
                "/META-INF/AL2.0",
                "/META-INF/LGPL2.1",
                "**/kotlin/**",
                "kotlin/**",
                "META-INF/kotlin/**",
                "META-INF/*.kotlin_module"
            )
        }

        jniLibs {
            useLegacyPackaging = false
        }
    }

    // Bundle configuration for Play Store
    bundle {
        language {
            enableSplit = true
        }
        density {
            enableSplit


l	$1, I	# i = (m >> 2)
	jle	.L80
	ALIGN_4

.L71:
#if !defined(TRMMKERNEL) || \
	(defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
	(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))

	movl	B, BO
#else
	movl	KK, %eax
	leal	(, %eax, SIZE), %eax
	leal	(AO, %eax, 2), AO
	leal	(B,  %eax, 1), BO
#endif

	movddup	-16 * SIZE(BO), %xmm0
	pxor	%xmm4, %xmm4
	pxor	%xmm5, %xmm5
	pxor	%xmm6, %xmm6
	pxor	%xmm7, %xmm7

	prefetchw   1 * SIZE(CO)

#ifndef TRMMKERNEL
	movl	K, %eax
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
	movl	K, %eax
	subl	KK, %eax
	movl	%eax, KKK
#else
	movl	KK, %eax
#ifdef LEFT
	addl	$2, %eax
#else
	addl	$1, %eax
#endif
	movl	%eax, KKK
#endif
	sarl	$3, %eax
	je	.L75
	ALIGN_4

.L72:
	PREFETCH (PREFETCHSIZE  + 0) * SIZE(AO)

	mulpd	-16 * SIZE(AO), %xmm0
	addpd	%xmm0, %xmm4
	movddup	-15 * SIZE(BO), %xmm0

	mulpd	-14 * SIZE(AO), %xmm0
	addpd	%xmm0, %xmm4
	movddup	-14 * SIZE(BO), %xmm0

	mulpd	-12 * SIZE(AO), %xmm0
	addpd	%xmm0, %xmm4
	movddup	-13 * SIZE(BO), %xmm0

	mulpd	-10 * SIZE(AO), %xmm0
	addpd	%xmm0, %xmm4
	movddup	-12 * SIZE(BO), %xmm0

	PREFETCH (PREFETCHSIZE  + 8) * SIZE(AO)

	mulpd	 -8 * SIZE(AO), %xmm0
	addpd	%xmm0, %xmm4
	movddup	-11 * SIZE(BO), %xmm0

	mulpd	 -6 * SIZE(AO), %xmm0
	addpd	%xmm0, %xmm4
	movddup	-10 * SIZE(BO), %xmm0

	mulpd	 -4 * SIZE(AO), %xmm0
	addpd	%xmm0, %xmm4
	movddup	 -9 * SIZE(BO), %xmm0

	mulpd	 -2 * SIZE(AO), %xmm0
	addpd	%xmm0, %xmm4
	movddup	 -8 * SIZE(BO), %xmm0

	subl   $-16 * SIZE, AO
	subl   $ -8 * SIZE, BO
	decl   %eax
	jne    .L72
	ALIGN_4

.L75:
	movddup	ALPHA,  %xmm3
#ifndef TRMMKERNEL
	movl	K, %eax
#else
	movl	KKK, %eax
#endif
	andl	$7, %eax		# if (k & 1)
	BRANCH
	je .L78
	ALIGN_3

.L76:
	mulpd	-16 * SIZE(AO), %xmm0
	addpd	%xmm0, %xmm4
	movddup	-15 * SIZE(BO), %xmm0

	addl	$2 * SIZE, AO
	addl	$1 * SIZE, BO
	decl	%eax
	jg	.L76
	ALIGN_4

.L78:
	mulpd


ubebuilder:resource:scope=Cluster,categories={crossplane,managed,azure}
type ReferenceInputMSSQL struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.fullSnapshotQuery) || (has(self.initProvider) && has(self.initProvider.fullSnapshotQuery))",message="spec.forProvider.fullSnapshotQuery is a required parameter"
	// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.passwordSecretRef)",message="spec.forProvider.passwordSecretRef is a required parameter"
	// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.refreshType) || (has(self.initProvider) && has(self.initProvider.refreshType))",message="spec.forProvider.refreshType is a required parameter"
	// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.username) || (has(self.initProvider) && has(self.initProvider.username))",message="spec.forProvider.username is a required parameter"
	Spec   ReferenceInputMSSQLSpec   `json:"spec"`
	Status ReferenceInputMSSQLStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

// ReferenceInputMSSQLList contains a list of ReferenceInputMSSQLs
type ReferenceInputMSSQLList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ReferenceInputMSSQL `json:"items"`
}

// Repository type metadata.
var (
	ReferenceInputMSSQL_Kind             = "ReferenceInputMSSQL"
	ReferenceInputMSSQL_GroupKind        = schema.GroupKind{Group: CRDGroup, Kind: ReferenceInputMSSQL_Kind}.String()
	ReferenceInputMSSQL_KindAPIVersion   = ReferenceInputMSSQL_Kind + "." + CRDGroupVersion.String()
	ReferenceInputMSSQL_GroupVersionKind = CRDGroupVersion.WithKind(ReferenceInputMSSQL_Kind)
)

func init() {
	SchemeBuilder.Register(&ReferenceInputMSSQL{}, &ReferenceInputMSSQLList{})
}
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0

// Code generated by upjet. DO NOT EDIT.

package v1beta1

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"

	v1 "github.com/crossplane/crossplane-runtime/v2/apis/common/v1"
	v2 "github.com/crossplane/crossplane-runtime/v2/apis/common/v2"
)

type QueuePolicyInitParameters struct {

	// JSON policy for the SQS queue. Ensure that Version = "2012-10-17" is set in the policy or AWS may hang in creating the queue.
	Policy *string `json:"policy,omitempty" tf:"policy,omitempty"`

	// URL of the SQS Queue to which to attach the policy.
	// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/namespaced/sqs/v1beta1.Queue
	// +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/namespaced/common.TerraformID()
	QueueURL *string `json:"queueUrl,omitempty" tf:"queue_url,omitempty"`

	// Reference to a Queue in sqs to populate queueUr


OOKUP_PROPERTY(cx, obj, id, &obj2, &prop);
        if (!ok)
            goto error;
#endif

        /*
         * Convert id to a jsval and then to a string.  Decide early whether we
         * prefer get/set or old getter/setter syntax.
         */
        idstr = js_ValueToString(cx, ID_TO_VALUE(id));
        if (!idstr) {
            ok = JS_FALSE;
            OBJ_DROP_PROPERTY(cx, obj2, prop);
            goto error;
        }
        *vp = STRING_TO_JSVAL(idstr);                   /* local root */
        idIsLexicalIdentifier = js_IsIdentifier(idstr);
        needOldStyleGetterSetter =
            !idIsLexicalIdentifier ||
            js_CheckKeyword(JSSTRING_CHARS(idstr),
                            JSSTRING_LENGTH(idstr)) != TOK_EOF;

#if JS_HAS_GETTER_SETTER

        valcnt = 0;
        if (prop) {
            ok = OBJ_GET_ATTRIBUTES(cx, obj2, id, prop, &attrs);
            if (!ok) {
                OBJ_DROP_PROPERTY(cx, obj2, prop);
                goto error;
            }
            if (OBJ_IS_NATIVE(obj2) &&
                (attrs & (JSPROP_GETTER | JSPROP_SETTER))) {
                if (attrs & JSPROP_GETTER) {
                    val[valcnt] = (jsval) ((JSScopeProperty *)prop)->getter;
                    gsopold[valcnt] =
                        ATOM_TO_STRING(cx->runtime->atomState.getterAtom);
                    gsop[valcnt] =
                        ATOM_TO_STRING(cx->runtime->atomState.getAtom);

                    valcnt++;
                }
                if (attrs & JSPROP_SETTER) {
                    val[valcnt] = (jsval) ((JSScopeProperty *)prop)->setter;
                    gsopold[valcnt] =
                        ATOM_TO_STRING(cx->runtime->atomState.setterAtom);
                    gsop[valcnt] =
                        ATOM_TO_STRING(cx->runtime->atomState.setAtom);

                    valcnt++;
                }
            } else {
                valcnt = 1;
                gsop[0] = NULL;
                gsopold[0] = NULL;
                ok = OBJ_GET_PROPERTY(cx, obj, id, &val[0]);
            }
            OBJ_DROP_PROPERTY(cx, obj2, prop);
        }

#else  /* !JS_HAS_GETTER_SETTER */

        /*
         * We simplify the source code at the price of minor dead code bloat in
         * the ECMA version (for testing only, see jsversion.h).  The null
         * default values in gsop[j] suffice to disable non-ECMA getter and
         * setter code.
         */
        valcnt = 1;
        gsop[0] = NULL;
        gsopold[0] = NULL;
        ok = OBJ_GET_PROPERTY(cx, obj, id, &val[0]);

#endif /* !JS_HAS_GETTER_SETTER */

        if (!ok)
            goto error;

        /*
         * If id is a string that's not an identifier, then it needs to be
         * quoted.  Also, negative integer ids must be quoted.
         */
        if (JSID_IS_ATOM(id)
            ? !idIsLexicalIdentifier
            : (!JSID_IS_INT(id) || JSID_TO_INT(id) < 0)) {
            idstr = js_QuoteString(cx, idstr, (jschar)'\'');
            if (!idstr) {
                ok = JS_FALSE;
                goto error;
            }
            *vp = STRING_TO_JSVAL(idstr);               /* local root */
        }
        JSSTRING_CHARS_AND_LENGTH(idstr, idstrchars, idstrlength);

        for (j = 0; j < valcnt; j++) {
            /* Convert val[j] to its canonical source form. */
            valstr = js_ValueToSource(cx, val[j]);
            if (!valstr) {
                ok = JS_FALSE;
                goto error;
            }
            localroot[j] = STRING_TO_JSVAL(valstr);     /* local root */
            JSSTRING_CHARS_AND_LENGT


erQuery {
	mpq.order = append(mpq.order, o...)
	return mpq
}

// QueryModels chains the current query on the "models" edge.
func (mpq *ModelProviderQuery) QueryModels() *ModelProviderModelQuery {
	query := (&ModelProviderModelClient{config: mpq.config}).Query()
	query.path = func(ctx context.Context) (fromU *sql.Selector, err error) {
		if err := mpq.prepareQuery(ctx); err != nil {
			return nil, err
		}
		selector := mpq.sqlQuery(ctx)
		if err := selector.Err(); err != nil {
			return nil, err
		}
		step := sqlgraph.NewStep(
			sqlgraph.From(modelprovider.Table, modelprovider.FieldID, selector),
			sqlgraph.To(modelprovidermodel.Table, modelprovidermodel.FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, modelprovider.ModelsTable, modelprovider.ModelsColumn),
		)
		fromU = sqlgraph.SetNeighbors(mpq.driver.Dialect(), step)
		return fromU, nil
	}
	return query
}

// First returns the first ModelProvider entity from the query.
// Returns a *NotFoundError when no ModelProvider was found.
func (mpq *ModelProviderQuery) First(ctx context.Context) (*ModelProvider, error) {
	nodes, err := mpq.Limit(1).All(setContextOp(ctx, mpq.ctx, ent.OpQueryFirst))
	if err != nil {
		return nil, err
	}
	if len(nodes) == 0 {
		return nil, &NotFoundError{modelprovider.Label}
	}
	return nodes[0], nil
}

// FirstX is like First, but panics if an error occurs.
func (mpq *ModelProviderQuery) FirstX(ctx context.Context) *ModelProvider {
	node, err := mpq.First(ctx)
	if err != nil && !IsNotFound(err) {
		panic(err)
	}
	return node
}

// FirstID returns the first ModelProvider ID from the query.
// Returns a *NotFoundError when no ModelProvider ID was found.
func (mpq *ModelProviderQuery) FirstID(ctx context.Context) (id string, err error) {
	var ids []string
	if ids, err = mpq.Limit(1).IDs(setContextOp(ctx, mpq.ctx, ent.OpQueryFirstID)); err != nil {
		return
	}
	if len(ids) == 0 {
		err = &NotFoundError{modelprovider.Label}
		return
	}
	return ids[0], nil
}

// FirstIDX is like FirstID, but panics if an error occurs.
func (mpq *ModelProviderQuery) FirstIDX(ctx context.Context) string {
	id, err := mpq.FirstID(ctx)
	if err != nil && !IsNotFound(err) {
		panic(err)
	}
	return id
}

// Only returns a single ModelProvider entity found by the query, ensuring it only returns one.
// Returns a *NotSingularError when more than one ModelProvider entity is found.
// Returns a *NotFoundError when no ModelProvider entities are found.
func (mpq *ModelProviderQuery) Only(ctx context.Context) (*ModelProvider, error) {
	nodes, err := mpq.Limit(2).All(setContextOp(ctx, mpq.ctx, ent.OpQueryOnly))
	if err != nil {
		return nil, err
	}
	switch len(nodes) {
	case 1:
		return nodes[0], nil
	case 0:
		return nil, &NotFoundError{modelprovider.Label}
	default:
		return nil, &NotSingularError{modelprovider.Label}
	}
}

// OnlyX is like Only, but panics if an error occurs.
func (mpq *ModelProviderQuery) OnlyX(ctx context.Context) *ModelProvider {
	node, err := mpq.Only(ctx)
	if err != nil {
		panic(err)
	}
	return node
}

// OnlyID is like Only, but returns the only


(FRAME_SIZE+8*(n-32-18))(sp)
#define RESTORE_GPR(n)  ld n,   (FRAME_SIZE+8*(n-32-18))(sp)

// Note that CR and LR are saved/restored in the frame of the *CALLER*
// But based on absence of language similar to
//   "The caller frame {CR Save Word | LR Save Doubleword} may be used as the save location"
// in the description of the TOC save doubleword, I infer that you may NOT
// use the caller's frame for this purpose.
// Examining some C compiler output for V2 of the ABI shows that it
// saves the TOC register in the new frame, not the old.

#define C_FULL_PROLOG \
	mfcr 0 ; stw 0,  8(sp)   /* save CR */ ; \
	mflr 0 ; std 0, 16(sp)   /* save LR */ ; \
	stdu sp, -FRAME_SIZE(sp) /* Update SP and back chain atomically */; \
	std 2, 24(sp)            /* save TOC ptr  */ ; \
	SAVE_FPR(31) ; SAVE_FPR(30) ; SAVE_FPR(29) ; SAVE_FPR(28) ; \
	SAVE_FPR(27) ; SAVE_FPR(26) ; SAVE_FPR(25) ; SAVE_FPR(24) ; \
	SAVE_FPR(23) ; SAVE_FPR(22) ; SAVE_FPR(21) ; SAVE_FPR(20) ; \
	SAVE_FPR(19) ; SAVE_FPR(18) ; SAVE_FPR(17) ; SAVE_FPR(16) ; \
	SAVE_FPR(15) ; SAVE_FPR(14) ; \
	SAVE_GPR(31) ; SAVE_GPR(30) ; SAVE_GPR(29) ; SAVE_GPR(28) ; \
	SAVE_GPR(27) ; SAVE_GPR(26) ; SAVE_GPR(25) ; SAVE_GPR(24) ; \
	SAVE_GPR(23) ; SAVE_GPR(22) ; SAVE_GPR(21) ; SAVE_GPR(20) ; \
	SAVE_GPR(19) ; SAVE_GPR(18) ; SAVE_GPR(17) ; SAVE_GPR(16) ; \
	SAVE_GPR(15) ; SAVE_GPR(14)

#define C_FULL_EPILOG \
	RESTORE_GPR(14) ; RESTORE_GPR(15) ; \
	RESTORE_GPR(16) ; RESTORE_GPR(17) ; RESTORE_GPR(18) ; RESTORE_GPR(19) ; \
	RESTORE_GPR(20) ; RESTORE_GPR(21) ; RESTORE_GPR(22) ; RESTORE_GPR(23) ; \
	RESTORE_GPR(24) ; RESTORE_GPR(25) ; RESTORE_GPR(26) ; RESTORE_GPR(27) ; \
	RESTORE_GPR(28) ; RESTORE_GPR(29) ; RESTORE_GPR(30) ; RESTORE_GPR(31) ; \
	RESTORE_FPR(14) ; RESTORE_FPR(15) ; \
	RESTORE_FPR(16) ; RESTORE_FPR(17) ; RESTORE_FPR(18) ; RESTORE_FPR(19) ; \
	RESTORE_FPR(20) ; RESTORE_FPR(21) ; RESTORE_FPR(22) ; RESTORE_FPR(23) ; \
	RESTORE_FPR(24) ; RESTORE_FPR(25) ; RESTORE_FPR(26) ; RESTORE_FPR(27) ; \
	RESTORE_FPR(28) ; RESTORE_FPR(29) ; RESTORE_FPR(30) ; RESTORE_FPR(31) ; \
	addi sp, sp, FRAME_SIZE     /* Restore SP */ ; \
	ld 0, 16(sp) ; mtlr 0       /* Restore LR  */ ; \
	lwz 0, 8(sp) ; mtcr 0       /* Restore CR */

#define BEGIN_PSEUDO_ATOMIC stb reg_NULL,THREAD_PSEUDO_ATOMIC_BITS_OFFSET(reg_THREAD)
#define END_PSEUDO_ATOMIC \
	stb reg_THREAD, THREAD_PSEUDO_ATOMIC_BITS_OFFSET(reg_THREAD) ; \
	lhz reg_NL3, (2+THREAD_PSEUDO_ATOMIC_BITS_OFFSET)(reg_THREAD) ; \
	twnei reg_NL3, 0

/*
 * Function to transfer control into lisp.  The lisp object to invoke is
 * passed as the first argument, which puts it in NL0
 */

	GFUNCDEF(call_into_lisp)
	C_FULL_PROLOG

	/* NL0 - function


v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z")),t.LinkedinOutline=s("linkedin",i,l(o,"M847.7 112H176.3c-35.5 0-64.3 28.8-64.3 64.3v671.4c0 35.5 28.8 64.3 64.3 64.3h671.4c35.5 0 64.3-28.8 64.3-64.3V176.3c0-35.5-28.8-64.3-64.3-64.3zm0 736c-447.8-.1-671.7-.2-671.7-.3.1-447.8.2-671.7.3-671.7 447.8.1 671.7.2 671.7.3-.1 447.8-.2 671.7-.3 671.7zM230.6 411.9h118.7v381.8H230.6zm59.4-52.2c37.9 0 68.8-30.8 68.8-68.8a68.8 68.8 0 1 0-137.6 0c-.1 38 30.7 68.8 68.8 68.8zm252.3 245.1c0-49.8 9.5-98 71.2-98 60.8 0 61.7 56.9 61.7 101.2v185.7h118.6V584.3c0-102.8-22.2-181.9-142.3-181.9-57.7 0-96.4 31.7-112.3 61.7h-1.6v-52.2H423.7v381.8h118.6V604.8z")),t.MailOutline=s("mail",i,l(o,"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0 0 68.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z")),t.MehOutline=s("meh",i,l(o,"M288 421a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm352 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 0 1 248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 0 1 249 248.9c34.2-34.2 7


  Q_D(const QQuickTextEdit);
    if (d->extra.isAllocated() && d->extra->explicitBottomPadding)
        return d->extra->bottomPadding;
    return d->padding();
}

void QQuickTextEdit::setBottomPadding(qreal padding)
{
    Q_D(QQuickTextEdit);
    d->setBottomPadding(padding);
}

void QQuickTextEdit::resetBottomPadding()
{
    Q_D(QQuickTextEdit);
    d->setBottomPadding(0, true);
}

/*!
    \qmlproperty real QtQuick::TextEdit::tabStopDistance
    \since 5.10

    The default distance, in device units, between tab stops.

    \sa QTextOption::setTabStopDistance()
*/
int QQuickTextEdit::tabStopDistance() const
{
    Q_D(const QQuickTextEdit);
    return d->document->defaultTextOption().tabStopDistance();
}

void QQuickTextEdit::setTabStopDistance(qreal distance)
{
    Q_D(QQuickTextEdit);
    QTextOption textOptions = d->document->defaultTextOption();
    if (textOptions.tabStopDistance() == distance)
        return;

    textOptions.setTabStopDistance(distance);
    d->document->setDefaultTextOption(textOptions);
    emit tabStopDistanceChanged(distance);
}

/*!
    \qmlmethod QtQuick::TextEdit::clear()
    \since 5.7

    Clears the contents of the text edit
    and resets partial text input from an input method.

    Use this method instead of setting the \l text property to an empty string.

    \sa QInputMethod::reset()
*/
void QQuickTextEdit::clear()
{
    Q_D(QQuickTextEdit);
    d->resetInputMethod();
    d->control->clear();
}

#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug debug, const QQuickTextEditPrivate::Node &n)
{
    QDebugStateSaver saver(debug);
    debug.space();
    debug << "Node(startPos:" << n.m_startPos << "dirty:" << n.m_dirty << n.m_node << ')';
    return debug;
}
#endif

#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
void QQuickTextEdit::setOldSelectionDefault()
{
    Q_D(QQuickTextEdit);
    d->selectByMouse = false;
    setKeepMouseGrab(false);
    d->control->setTextInteractionFlags(d->control->textInteractionFlags() & ~Qt::TextSelectableByMouse);
    d->control->setTouchDragSelectionEnabled(true);
    qCDebug(lcTextEdit, "pre-6.4 behavior chosen: selectByMouse defaults false; if enabled, touchscreen acts like a mouse");
}

// TODO in 6.7.0: remove the note about versions prior to 6.4 in selectByMouse() documentation
QQuickPre64TextEdit::QQuickPre64TextEdit(QQuickItem *parent)
    : QQuickTextEdit(parent)
{
    setOldSelectionDefault();
}
#endif

QT_END_NAMESPACE

#include "moc_qquicktextedit_p.cpp"
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "collisionsingleton.h"

/*!
    \class MySingleton2
    \brief A C++ class with QML_SINGLETON to test name collision handling.

    This class has QML_SINGLETON and should be marked as singleton when
    properly linked via \nativetype.
*/

MySingleton2::MySingleton2(QObject *parent)
    : QObject(parent)
{
}

QString MySingleton2::getCollisionMessage() const
{
    return "Message from MySingleton2 with QML_SINGLETON";
}

/*!
    \class TestNamespace::MySingleton2
    \brief


sc->various_value->Visible = PX_FALSE;
	pDesc->EditMode = PX_FALSE;
	pObject->Visible = PX_TRUE;

	PX_ObjectSetFocus(pObject);
}

px_void PX_Object_ModbusVarBoxShowEdit(PX_Object* pObject,const px_char name[],px_dword address,px_int type,px_word value)
{
	PX_Object_ModbusVarBox* pDesc = PX_ObjectGetDesc(PX_Object_ModbusVarBox, pObject);
	if (pObject->Type != PX_OBJECT_TYPE_MODBUSVARBOX)
	{
		PX_ASSERT();
		return;
	}

	PX_Object_VariousSetText(pDesc->various_name, name);
	PX_Object_VariousSetHex(pDesc->various_address, address);
	PX_Object_VariousSetHex(pDesc->various_value, value);
	PX_Object_SelectBarSetCurrentIndex(pDesc->selectbar_type, type);

	pDesc->various_address->Enabled = PX_FALSE;
	pDesc->various_name->Enabled = PX_FALSE;
	pDesc->checkbox_readonly->Enabled = PX_FALSE;
	pDesc->EditMode = PX_TRUE;
	pDesc->various_value->Visible = PX_TRUE;

	pObject->Visible = PX_TRUE;
	PX_ObjectSetFocus(pObject);
}

px_void PX_Object_ModbusVarBoxClose(PX_Object* pObject)
{
	if (pObject->Type != PX_OBJECT_TYPE_MODBUSVARBOX)
	{
		PX_ASSERT();
		return;
	}
	pObject->Visible = PX_FALSE;
	PX_ObjectClearFocus(pObject);
}

px_void PX_Object_ModbusVarBoxHide(PX_Object* pObject)
{
	if (pObject->Type != PX_OBJECT_TYPE_MODBUSVARBOX)
	{
		PX_ASSERT();
		return;
	}
	pObject->Visible = PX_FALSE;
	PX_ObjectClearFocus(pObject);
}


              ir.async_create_issue(
                        self.hass,
                        DOMAIN,
                        "organization_verification_required",
                        is_fixable=False,
                        is_persistent=False,
                        learn_more_url="https://help.openai.com/en/articles/10910291-api-organization-verification",
                        severity=ir.IssueSeverity.WARNING,
                        translation_key="organization_verification_required",
                        translation_placeholders={
                            "platform_settings": "https://platform.openai.com/settings/organization/general"
                        },
                    )

                LOGGER.error("Error talking to OpenAI: %s", err)
                raise HomeAssistantError("Error talking to OpenAI") from err

            if not chat_log.unresponded_tool_results:
                break

async def async_prepare_files_for_prompt(
    hass: HomeAssistant, files: list[tuple[Path, str | None]]
) -> ResponseInputMessageContentListParam:
    """Append files to a prompt.

    Caller needs to ensure that the files are allowed.
    """

    def append_files_to_content() -> ResponseInputMessageContentListParam:
        content: ResponseInputMessageContentListParam = []

        for file_path, mime_type in files:
            if not file_path.exists():
                raise HomeAssistantError(f"`{file_path}` does not exist")

            if mime_type is None:
                mime_type = guess_file_type(file_path)[0]

            if not mime_type or not mime_type.startswith(("image/", "application/pdf")):
                raise HomeAssistantError(
                    "Only images and PDF are supported by the OpenAI API,"
                    f"`{file_path}` is not an image file or PDF"
                )

            base64_file = base64.b64encode(file_path.read_bytes()).decode("utf-8")

            if mime_type.startswith("image/"):
                content.append(
                    ResponseInputImageParam(
                        type="input_image",
                        image_url=f"data:{mime_type};base64,{base64_file}",
                        detail="auto",
                    )
                )
            elif mime_type.startswith("application/pdf"):
                content.append(
                    ResponseInputFileParam(
                        type="input_file",
                        filename=str(file_path),
                        file_data=f"data:{mime_type};base64,{base64_file}",
                    )
                )

        return content

    return await hass.async_add_executor_job(append_files_to_content)


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

#ifndef ALIBABACLOUD_SAS_MODEL_MODIFYREFRESHPROCESSINFOREQUEST_H_
#define ALIBABACLOUD_SAS_MODEL_MODIFYREFRESHPROCESSINFOREQUEST_H_

#include <alibabacloud/sas/SasExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>

namespace AlibabaCloud {
namespace Sas {
namespace Model {
class ALIBABACLOUD_SAS_EXPORT ModifyRefreshProcessInfoRequest : public RpcServiceRequest {
public:
	ModifyRefreshProcessInfoRequest();
	~ModifyRefreshProcessInfoRequest();
	std::string getUuid() const;
	void setUuid(const std::string &uuid);
	std::string getSourceIp() const;
	void setSourceIp(const std::string &sourceIp);

private:
	std::string uuid_;
	std::string sourceIp_;
};
} // namespace Model
} // namespace Sas
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_SAS_MODEL_MODIFYREFRESHPROCESSINFOREQUEST_H_


lder(val binding: VideoScaleItemBinding) : RecyclerView.ViewHolder(binding.root) {

        init {

            itemView.setOnClickListener {
                selectedSize = layoutPosition
                sizeSelectedListener.invoke(MediaPlayer.ScaleType.entries[layoutPosition])
            }
        }

        fun bind(scaleType: MediaPlayer.ScaleType, selected: Boolean) {
            binding.scaleName = when (scaleType){
                MediaPlayer.ScaleType.SURFACE_BEST_FIT -> binding.trackTitle.context.getString(R.string.surface_best_fit)
                MediaPlayer.ScaleType.SURFACE_FIT_SCREEN -> binding.trackTitle.context.getString(R.string.surface_fit_screen)
                MediaPlayer.ScaleType.SURFACE_FILL -> binding.trackTitle.context.getString(R.string.surface_fill)
                MediaPlayer.ScaleType.SURFACE_ORIGINAL -> binding.trackTitle.context.getString(R.string.surface_original)
                MediaPlayer.ScaleType.SURFACE_16_9 -> "16:9"
                MediaPlayer.ScaleType.SURFACE_4_3 -> "4:3"
                MediaPlayer.ScaleType.SURFACE_16_10 -> "16:10"
                MediaPlayer.ScaleType.SURFACE_2_1 -> "2:1"
                MediaPlayer.ScaleType.SURFACE_221_1 -> "2.21:1"
                MediaPlayer.ScaleType.SURFACE_235_1 -> "2.35:1"
                MediaPlayer.ScaleType.SURFACE_239_1 -> "2.39:1"
                MediaPlayer.ScaleType.SURFACE_5_4 -> "5:4"
            }
            binding.selected = selected
            binding.executePendingBindings()
        }
    }
}package org.videolan.vlc.gui.dialogs

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.google.android.material.bottomsheet.BottomSheetBehavior
import androidx.lifecycle.lifecycleScope
import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDED
import kotlinx.coroutines.launch
import org.videolan.vlc.R
import org.videolan.vlc.databinding.DialogVideoControlsSettingsBinding
import org.videolan.vlc.gui.helpers.UiTools.showPinIfNeeded

class VideoControlsSettingsDialog : VLCBottomSheetDialogFragment() {

    override fun getDefaultState(): Int = STATE_EXPANDED

    override fun needToManageOrientation(): Boolean = true

    private lateinit var binding: DialogVideoControlsSettingsBinding

    override fun initialFocusedView() = binding.fragmentContainerView.findViewById<View>(R.id.recycler_view) ?: binding.container

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        lifecycleScope.launch { if (requireActivity().showPinIfNeeded()) dismiss() }
    }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
        binding = DialogVideoControlsSettingsBinding.inflate(layoutInflater, container, false)
        return binding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
         BottomSheetBehavior.from(view.parent as View).skipCollapsed = true
    }
}
/*
 * ************************************************************************
 *  PlaybackBottomSheetDialogFragment.kt
 * *************************************************************************
 * Copyright © 2025 VLC authors and VideoLAN
 * Author: Nicolas POMEPUY
 * 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


e

import android.content.Context
import com.susion.rabbit.base.RabbitLog
import com.susion.rabbit.monitor.RabbitMonitor
import com.susion.rabbit.base.RabbitMonitorProtocol
import com.susion.rabbit.base.common.RabbitUtils
import com.susion.rabbit.base.common.toastInThread
import com.susion.rabbit.base.entities.RabbitExceptionInfo
import com.susion.rabbit.storage.RabbitStorage

/**
 * susionwang at 2019-12-12
 *
 * 1. 通过 [Thread.setDefaultUncaughtExceptionHandler] 捕获Java层异常
 *
 */
internal class RabbitExceptionMonitor(override var isOpen: Boolean = false) :
    RabbitMonitorProtocol {

    override fun open(context: Context) {
        val defaultExceptionHandler = Thread.getDefaultUncaughtExceptionHandler()
        Thread.setDefaultUncaughtExceptionHandler { thread, throwable ->
            saveCrash(throwable, thread, defaultExceptionHandler)
        }
        isOpen = true
    }

    override fun close() {
        isOpen = false
    }

    override fun getMonitorInfo() = RabbitMonitorProtocol.EXCEPTION

    fun saveCrash(
        e: Throwable,
        thread: Thread,
        defaultExceptionHandler: Thread.UncaughtExceptionHandler? = null
    ) {
        if (!isOpen) return
        toastInThread("发生异常! 日志已保存", RabbitMonitor.application)
        Thread.sleep(1000) // 把toast给弹出来
        val exceptionInfo = translateThrowableToExceptionInfo(e, Thread.currentThread().name)
        RabbitStorage.saveSync(exceptionInfo)
        //main thead 下崩溃
        if (RabbitUtils.isMainThread(thread.id)) {
            Thread.sleep(1500)
            defaultExceptionHandler?.uncaughtException(thread, e)
        }
    }

    private fun translateThrowableToExceptionInfo(
        e: Throwable,
        currentThread: String
    ): RabbitExceptionInfo {
        val exceptionInfo = RabbitExceptionInfo()
        exceptionInfo.apply {
            crashTraceStr = RabbitLog.getStackTraceString(e)
            exceptionName = e.javaClass.name
            simpleMessage = e.message ?: ""
            threadName = currentThread
            time = System.currentTimeMillis()
            pageName = RabbitMonitor.getCurrentPage()
        }

        return exceptionInfo
    }

}package com.susion.rabbit.monitor.instance

import android.app.usage.NetworkStats
import android.app.usage.NetworkStatsManager
import android.content.Context
import android.content.pm.PackageManager
import android.net.ConnectivityManager
import android.os.Build
import com.susion.rabbit.base.RabbitLog
import com.susion.rabbit.base.RabbitMonitorProtocol
import com.susion.rabbit.base.ui.utils.RabbitUiUtils

/**
 * susionwang at 2019-12-04
 * 流量监控
 */
internal class RabbitTrafficMonitor(override var isOpen: Boolean = false) :
    RabbitMonitorProtocol {

    override fun open(context: Context) {

        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
            RabbitLog.e("不支持流量监控！")
            return
        }

        val networkStatsManager =
            context.getSystemService(Context.NETWORK_STATS_SERVICE) as NetworkStatsManager
        val trafficStatus = networkStatsManager.querySummary(
            ConnectivityManager.TYPE_WIFI,
            getAppUid(context),
            System.currentTimeMillis() - 100000000,
            System.currentTimeMillis()
        )

        val trafficBucket = NetworkStats.Bucket()
        trafficStatus.getNextBucket(trafficBucket)

        RabbitLog.d("rx : ${RabbitUiUtils.formatFileSize(trafficBucket.rxBytes)}")


citText,
                avgDeficit >= 0 ? Icons.trending_down : Icons.trending_up,
                deficitColor,
              ),
            _buildSummaryItem(
              '最高热量摄入',
              '${maxCalories.toStringAsFixed(0)} 千卡 (${maxDate != null ? DateFormat(formatToMD).format(maxDate) : "无"})',
              Icons.arrow_upward,
              Colors.red,
            ),
            _buildSummaryItem(
              '最低热量摄入',
              '${minCalories.toStringAsFixed(0)} 千卡 (${minDate != null ? DateFormat(formatToMD).format(minDate) : "无"})',
              Icons.arrow_downward,
              Colors.green,
            ),
          ],
        ),
      ),
    );
  }

  Widget _buildNutrientsSummary() {
    if (_nutritionData.isEmpty) {
      return const SizedBox.shrink();
    }

    double totalCarbs = 0;
    double totalProtein = 0;
    double totalFat = 0;

    for (var data in _nutritionData) {
      totalCarbs += (data['totalCarbs'] as num?)?.toDouble() ?? 0;
      totalProtein += (data['totalProtein'] as num?)?.toDouble() ?? 0;
      totalFat += (data['totalFat'] as num?)?.toDouble() ?? 0;
    }

    final double avgCarbs = totalCarbs / _nutritionData.length;
    final double avgProtein = totalProtein / _nutritionData.length;
    final double avgFat = totalFat / _nutritionData.length;

    // 获取用户推荐摄入量
    final recommendedIntake = _userViewModel.dailyRecommendedIntake;
    final targetCarbs = recommendedIntake?.carbs ?? 0.0;
    final targetProtein = recommendedIntake?.protein ?? 0.0;
    final targetFat = recommendedIntake?.fat ?? 0.0;

    return Card(
      child: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const Text(
              '营养素摄入摘要',
              style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
            ),
            const SizedBox(height: 16),
            _buildSummaryItem(
              '平均碳水化合物',
              '${avgCarbs.toStringAsFixed(1)} 克/天 ${targetCarbs > 0 ? "(目标: ${targetCarbs.toStringAsFixed(0)} 克)" : ""}',
              Icons.grain,
              Colors.amber,
            ),
            _buildSummaryItem(
              '平均蛋白质',
              '${avgProtein.toStringAsFixed(1)} 克/天 ${targetProtein > 0 ? "(目标: ${targetProtein.toStringAsFixed(0)} 克)" : ""}',
              Icons.fitness_center,
              Colors.blue,
            ),
            _buildSummaryItem(
              '平均脂肪',
              '${avgFat.toStringAsFixed(1)} 克/天 ${targetFat > 0 ? "(目标: ${targetFat.toStringAsFixed(0)} 克)" : ""}',
              Icons.opacity,
              Colors.red,
            ),
          ],
        ),
      ),
    );
  }

  Widget _buildSummaryItem(
    String title,
    String value,
    IconData icon,
    Color color,
  ) {
    return Padding(
      padding: const EdgeInsets.symmetric(vertical: 8.0),
      child: Row(
        children: [
          Icon(icon, color: color),
          const SizedBox(width: 8),
          Expanded(


from vtkmodules.vtkFiltersCore import vtkContourFilter
from vtkmodules.vtkIOLegacy import vtkUnstructuredGridReader
from vtkmodules.vtkRenderingCore import (
    vtkActor,
    vtkDataSetMapper,
    vtkRenderWindow,
    vtkRenderWindowInteractor,
    vtkRenderer,
)
import vtkmodules.vtkInteractionStyle
import vtkmodules.vtkRenderingFreeType
import vtkmodules.vtkRenderingOpenGL2
from vtkmodules.test import Testing
from vtkmodules.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()

# Contour the quadratic tet type
class contourQuadraticTetra(vtkmodules.test.Testing.vtkTest):

    def testContourQuadraticTetra(self):
        # Create a reader to load the data (quadratic tetrahedra)
        reader = vtkUnstructuredGridReader()
        reader.SetFileName(VTK_DATA_ROOT + "/Data/quadTetEdgeTest.vtk")

        tetContours = vtkContourFilter()
        tetContours.SetInputConnection(reader.GetOutputPort())
        tetContours.SetValue(0, 0.5)
        aTetContourMapper = vtkDataSetMapper()
        aTetContourMapper.SetInputConnection(tetContours.GetOutputPort())
        aTetContourMapper.ScalarVisibilityOff()
        aTetMapper = vtkDataSetMapper()
        aTetMapper.SetInputConnection(reader.GetOutputPort())
        aTetMapper.ScalarVisibilityOff()
        aTetActor = vtkActor()
        aTetActor.SetMapper(aTetMapper)
        aTetActor.GetProperty().SetRepresentationToWireframe()
        aTetActor.GetProperty().SetAmbient(1.0)
        aTetContourActor = vtkActor()
        aTetContourActor.SetMapper(aTetContourMapper)
        aTetContourActor.GetProperty().SetAmbient(1.0)

        # Create the rendering related stuff.
        # Since some of our actors are a single vertex, we need to remove all
        # cullers so the single vertex actors will render
        ren1 = vtkRenderer()
        ren1.GetCullers().RemoveAllItems()
        renWin = vtkRenderWindow()
        renWin.SetMultiSamples(0) # when rendering lines ensure same output since anti-aliasing is not supported on all machines
        renWin.AddRenderer(ren1)
        iren = vtkRenderWindowInteractor()
        iren.SetRenderWindow(renWin)

        ren1.SetBackground(.1, .2, .3)

        renWin.SetSize(400, 250)

        # specify properties
        ren1.AddActor(aTetActor)
        ren1.AddActor(aTetContourActor)

        ren1.ResetCamera()
        ren1.GetActiveCamera().Dolly(1.5)
        ren1.ResetCameraClippingRange()

        renWin.Render()

        img_file = "contourQuadraticTetra.png"
        vtkmodules.test.Testing.compareImage(iren.GetRenderWindow(), vtkmodules.test.Testing.getAbsImagePath(img_file))
        vtkmodules.test.Testing.interact()

if __name__ == "__main__":
     vtkmodules.test.Testing.main([(contourQuadraticTetra, 'test')])


k href="/images/favicon-light.png" rel="icon" media="(prefers-color-scheme: light)">
<link href="/images/favicon-dark.png" rel="icon" media="(prefers-color-scheme: dark)">

Print™

 !

				Print™

<svg id="btnsearchicon" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false"><g><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></g></svg>

				<input type="search" id="appsearch" placeholder="" name="q" autocomplete="off" aria-label="Search through site content">

				<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
				width="24" height="24"
				viewBox="0 0 24 24"><g><path d="M 12 3 C 10.894531 3 10 3.894531 10 5 C 10 6.105469 10.894531 7 12 7 C 13.105469 7 14 6.105469 14 5 C 14 3.894531 13.105469 3 12 3 Z M 12 10 C 10.894531 10 10 10.894531 10 12 C 10 13.105469 10.894531 14 12 14 C 13.105469 14 14 13.105469 14 12 C 14 10.894531 13.105469 10 12 10 Z M 12 17 C 10.894531 17 10 17.894531 10 19 C 10 20.105469 10.894531 21 12 21 C 13.105469 21 14 20.105469 14 19 C 14 17.894531 13.105469 17 12 17 Z "></path></g></svg>

	<input type="checkbox" id="reveal-menu" role="button">

			<svg xmlns="http://www.w3.org


from typing import List
from sqlalchemy.orm import Session

from src.common.repository import CRUDBase
from src.db_models.semantic_links import EntitySemanticLinkDb
from src.models.semantic_links import EntitySemanticLinkCreate

class EntitySemanticLinksRepository(CRUDBase[EntitySemanticLinkDb, EntitySemanticLinkCreate, dict]):
    def list_for_entity(self, db: Session, entity_id: str, entity_type: str) -> List[EntitySemanticLinkDb]:
        return db.query(self.model).filter(
            self.model.entity_id == entity_id,
            self.model.entity_type == entity_type
        ).all()

    def list_for_iri(self, db: Session, iri: str) -> List[EntitySemanticLinkDb]:
        return db.query(self.model).filter(self.model.iri == iri).all()

    def get_by_entity_and_iri(self, db: Session, entity_id: str, entity_type: str, iri: str) -> EntitySemanticLinkDb | None:
        return db.query(self.model).filter(
            self.model.entity_id == entity_id,
            self.model.entity_type == entity_type,
            self.model.iri == iri
        ).first()

    def list_all(self, db: Session) -> List[EntitySemanticLinkDb]:
        return db.query(self.model).all()

entity_semantic_links_repo = EntitySemanticLinksRepository(EntitySemanticLinkDb)


dex_X6 + 5] = index_X4 + 0;

                index_X4 += 4;
                index_X6 += 6;
            }

            // Pre-assign base vertex attributes.
            this.mesh.vertices = this.vertices;
            this.mesh.normals = this.normals;
            this.mesh.tangents = this.tangents;
            this.mesh.triangles = this.triangles;
            this.mesh.bounds = s_DefaultBounds;
            this.material = null;
        }

        /// <summary>
        /// Function to pre-allocate vertex attributes for a mesh of size X.
        /// </summary>
        /// <param name="mesh"></param>
        /// <param name="size"></param>
        /// <param name="isVolumetric"></param>
        public TMP_MeshInfo(Mesh mesh, int size, bool isVolumetric)
        {
            // Reference to the TMP Text Component.
            //this.textComponent = null;

            // Clear existing mesh data
            if (mesh == null)
                mesh = new Mesh();
            else
                mesh.Clear();

            this.mesh = mesh;

            int s0 = !isVolumetric ? 4 : 8;
            int s1 = !isVolumetric ? 6 : 36;

            // Limit the mesh to less than 65535 vertices which is the limit for Unity's Mesh.
            size = Mathf.Min(size, 65532 / s0);

            int size_x_s0 = size * s0;
            int size_x_s1 = size * s1;

            this.vertexCount = 0;

            this.vertices = new Vector3[size_x_s0];
            this.uvs0 = new Vector2[size_x_s0];
            this.uvs2 = new Vector2[size_x_s0];
            //this.uvs4 = new Vector2[sizeX8]; // SDF scale data
            this.colors32 = new Color32[size_x_s0];

            this.normals = new Vector3[size_x_s0];
            this.tangents = new Vector4[size_x_s0];

            this.triangles = new int[size_x_s1];

            int index_x_s0 = 0;
            int index_x_s1 = 0;
            while (index_x_s0 / s0 < size)
            {
                for (int i = 0; i < s0; i++)
                {
                    this.vertices[index_x_s0 + i] = Vector3.zero;
                    this.uvs0[index_x_s0 + i] = Vector2.zero;
                    this.uvs2[index_x_s0 + i] = Vector2.zero;
                    //this.uvs4[index_X4 + i] = Vector2.zero;
                    this.colors32[index_x_s0 + i] = s_DefaultColor;
                    this.normals[index_x_s0 + i] = s_DefaultNormal;
                    this.tangents[index_x_s0 + i] = s_DefaultTangent;
                }

                // Front Face
                this.triangles[index_x_s1 + 0] = index_x_s0 + 0;
                this.triangles[index_x_s1 + 1] = index_x_s0 + 1;
                this.triangles[index_x_s1 + 2] = index_x_s0 + 2;
                this.triangles[index_x_s1 + 3] = index_x_s0 + 2;
                this.triangles[index_x_s1 + 4] = index_x_s0 + 3;
                this.triangles[index_x_s1 + 5] = index_x_s0 + 0;

                if (isVolumetric)
                {
                    // Left Face
                    this.triangles[index_x_s1 + 6] = index_x_s0 + 4;
                    this.triangles[index_x_s1 + 7] = index_x_s0 + 5;
                    this.triangles[index_x_s1 + 8] = index_x_s0 + 1;
                    this.triangles[index_x_s1 + 9] = index_x_s0 + 1;
                    this.tri


cKdRfIu3DuXFzZuZzJEpStFLN2+t+FGbuxteAgA=) format('woff2');
  unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 700;
  src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(data:font/woff2;base64,d09GMgABAAAAABbQABEAAAAAMTgAABZwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGi4bEBwaBmAAYgiBLAmPYBEMCrYYsEALgggAATYCJAOECAQgBYN2B4lBDIIBGyssBdwYedg4APDxjyf7v07ghgyohv6JUBErAkBCJEQC8LZh6ATQ4hhpSavTtHM6WiNM6Gp8/TrhGPnwzn3GE9IyWpsPt3fD9HrVn/y/deIISWZ5iNb4vbmduX/fCZGk1qERKs1CgiraKIlOpgTql45Xld0faJv/Du6O40gFxQSci1LMIqxGwI4/ZkyBs9haFhH+Vbj/WVTYi3L+DP9v/i+nOV8yBuUAKTDKxG6AvQGWYbROFbb13kzSt08KOmV0gbR4uuWr6Oxpr+XDFY8Lp/aaxW0hXxw4Q8xj4H+n5pfkJcnWsiMnTm5OXeKu2+4agBi4BfBeAYpZYQ51oCsrHBOQNQBqAe7otpzvgvtA2AY6ALU+TNhM1VSFs+R9PptmO6vZb+157YtlwCpg+667K7psgCq9PlUxO6O1tFpNJI7nCFf2oY5Q8oEcwA6wIyiaO177AsQdcIVVOqDXX9GlaPLSlynzkK1YG81mNCq7+PBj78p7rBk1iRBZMsAEZgmtf16/ZDoBYEOjJsDc9A0QsCeIOHOJeGiLmM3nI901R7lS9ZiOnCANpS1zgAA90tAbtItU29VWzB8gJO9G2jOomtwcnkXgdAyl0VApQPp19Nt09nK2EjyCJj2CS/4XWrisoOmkgOwCIIswK4CD6JB05hEUNOoAvn2pEHTxHfF98c/ir+Lf0uc2GxI08W7xXfED8S/ib40TjAPvzQCvH7yf9r7j7UN7vttNH/yRRPNnIYiklTWQedfEHvUJFjOAAwqM76pUYxfaL/yBd/i33vZt19u+7FdsX3PrF0GbC0z23gQCyCzodydoMHH4YsEjb/WBUP+viYnPz3OFpHBKxb3dne2tzQ376fXCdYvnc9mMuba6sry0uDA/NzszNTkxPjY6+FQqOcD6jb6OloTW2FBfWxOP/cl3IILLUU3ShOUxzrwC16e8o5yvZ+bMcpF6FEdDKVYo1DPMM8R1U1J6t9gozTyrU90MmxWg0WWyPL3


ster.R2_ARG)

        val offset = (scalars.getAsScalarValue(r2).type() as? SbfType.NumType)?.value?.toLongOrNull() ?:
            throw PointerDomainError("cannot know statically the value of offset (r2)." +
                "\n\t$locInst\n" +
                "\t$this")

        val baseSc = getRegCell(r1, scalars.getAsScalarValue(r1).type(), globals, locInst) ?:
            throw PointerDomainError("CVT_alloc_size: r1 does not point to a node" +
                "\t$locInst\n" +
                "\t$this")

        val baseC = concretizeCell(baseSc, "CVT_alloc_size", locInst)
        val baseN = baseC.getNode()
        val baseOffset = baseC.getOffset()

        if (baseN == getStack()) {
            throw PointerDomainError("The base pointer (r1) is a stack pointer and this is not supported.\n" +
                "\t$locInst\n" +
                "\tbase cell = $baseC\n" +
                "\toffset = $offset\n" +
                "\tPTA graph =$this")
        }
        if (!baseOffset.isZero()) {
            throw PointerDomainError("The offset of the base pointer (r1) should be zero.\n" +
                "\t$locInst\n" +
                "\tbase cell = $baseC\n" +
                "\toffset = $offset\n" +
                "\tPTA graph = $this")
        }

        // We cannot tell for sure whether a node is allocated in a particular region because we keep track of that as may information.
        // If a node might be allocated in more than one region we allocated first in external and then heap.
        if (baseN.flags.isMayExternal) {
            val allocC = externAlloc.allocSolanaAccountSlice(locInst, baseN.flags.accountStart, offset)
            val returnedC = allocC.getNode().createSymCell(allocC.getOffset().add(PTASymOffset(offset)))
            setRegCell(r0, returnedC)
        } else if (baseN.flags.isMayHeap) {
            val allocC = heapAlloc.highLevelAlloc(locInst)
            val returnedC = allocC.getNode().createSymCell(allocC.getOffset().add(PTASymOffset(offset)))
            setRegCell(r0, returnedC)
        } else {
            throw PointerDomainError("The base pointer (r1) is from an unexpected region:\n" +
                "\t$locInst\n" +
                "\tbase cell = $baseC\n" +
                "\toffset = $offset\n" +
                "\tPTA graph = $this")
        }
    }

    /**
     *  Used by dot printing to know in advance which node's offsets should be printed.
     *  From a node, by looking at its successors, we can know which are the read/written offsets of that node.
     *  However, we cannot know if, for instance, a register points to a node's offset.
     *
     *  This will create, for instance, the warning `Warning: node Node13239_2370_PTA_NODE_250, port f40 unrecognized`
     *  when the dot file is converted to svg or similar format.
     */
    private fun pointedByPredecessors(): Map<PTANode<Flags>, Set<PTAOffset>> {
        val references = mutableMapOf<PTANode<Flags>, MutableSet<PTAOffset>>()

        /** Mark that some register or other cell `c'` points to [c] **/
        fun updateRef(c: PTACell<Flags>) {
            val node = c.getNode()
            val offset = c.getOffset()
            val offsets = references.getOrDefault(node, mutableSetOf(offset))
            offsets.add(offset)
            references[node] = offsets
        }

        fun updateRef(c: PTASymCell<Flags>) {
            if (c.isConcrete()) {
                updateRef(c.concretize())
            }
        }

        for (cell in registers) {
            if (cell != null) {
                val visited = mutableSetOf<PTANode<Flags>>()
                val worklist = mutableListOf<PTANode<Flags


# Code generated by Lark OpenAPI.

import lark_oapi as lark
from lark_oapi.api.drive.v1 import *

def main():
    # 创建client
    client = lark.Client.builder() \
        .app_id(lark.APP_ID) \
        .app_secret(lark.APP_SECRET) \
        .log_level(lark.LogLevel.DEBUG) \
        .build()

    # 构造请求对象
    request: BatchCreatePermissionMemberRequest = BatchCreatePermissionMemberRequest.builder() \
        .token("doccnBKgoMyY5OMbUG6FioTXuBe") \
        .type("doc") \
        .need_notification(False) \
        .request_body(BatchCreatePermissionMemberRequestBody.builder()
                      .members([])
                      .build()) \
        .build()

    # 发起请求
    response: BatchCreatePermissionMemberResponse = client.drive.v1.permission_member.batch_create(request)

    # 处理失败返回
    if not response.success():
        lark.logger.error(
            f"client.drive.v1.permission_member.batch_create failed, code: {response.code}, msg: {response.msg}, log_id: {response.get_log_id()}")
        return

    # 处理业务结果
    lark.logger.info(lark.JSON.marshal(response.data, indent=4))

# 异步方式
async def amain():
    # 创建client
    client = lark.Client.builder() \
        .app_id(lark.APP_ID) \
        .app_secret(lark.APP_SECRET) \
        .log_level(lark.LogLevel.DEBUG) \
        .build()

    # 构造请求对象
    request: BatchCreatePermissionMemberRequest = BatchCreatePermissionMemberRequest.builder() \
        .token("doccnBKgoMyY5OMbUG6FioTXuBe") \
        .type("doc") \
        .need_notification(False) \
        .request_body(BatchCreatePermissionMemberRequestBody.builder()
                      .members([])
                      .build()) \
        .build()

    # 发起请求
    response: BatchCreatePermissionMemberResponse = await client.drive.v1.permission_member.abatch_create(request)

    # 处理失败返回
    if not response.success():
        lark.logger.error(
            f"client.drive.v1.permission_member.abatch_create failed, code: {response.code}, msg: {response.msg}, log_id: {response.get_log_id()}")
        return

    # 处理业务结果
    lark.logger.info(lark.JSON.marshal(response.data, indent=4))

if __name__ == "__main__":
    # asyncio.run(amain()) 异步方式
    main()