4e4}.no-skin .nav-list>li>.submenu li>.submenu>li a{color:#757575}.no-skin .nav-list>li>.submenu li>.submenu>li a:hover{color:#4b88b7;background-color:#f1f5f9}.no-skin .nav-list>li>.submenu li.open>a{color:#4b88b7}.no-skin .nav-list>li>.submenu li>.submenu li.open>a,.no-skin .nav-list>li>.submenu li>.submenu li.active>a{color:#4b88b7}.no-skin .nav-list>li>.submenu:before,.no-skin .nav-list>li>.submenu>li:before{border-color:#9dbdd6}.no-skin .nav-list>li.active>.submenu:before,.no-skin .nav-list>li.active>.submenu>li:before{border-color:#8eb3d0}.no-skin .sidebar-toggle{background-color:#f3f3f3;border-color:#e0e0e0}.no-skin .sidebar-toggle>.ace-icon{border-color:#bbb;color:#aaa;background-color:#fff}.no-skin .sidebar-shortcuts{background-color:#fafafa}.no-skin .sidebar-fixed .sidebar-shortcuts{border-color:#ddd}.no-skin .sidebar-shortcuts-mini{background-color:#fff}.no-skin .nav-list li>.arrow:before{border-right-color:#B8B8B8;-moz-border-right-colors:#B8B8B8;border-width:10px 10px 10px 0;left:-11px}.no-skin .nav-list li>.arrow:after{border-right-color:#fff;-moz-border-right-colors:#fff;border-width:10px 10px 10px 0;left:-10px}.no-skin .nav-list>li.pull_up>.arrow:after{border-right-color:#fff!important;-moz-border-right-colors:#fff!important;border-width:10px 10px 10px 0!important;left:-10px!important}.no-skin .nav-list>li.pull_up>.arrow:before{border-width:10px 10px 10px 0!important;left:-11px!important}.no-skin .nav-list li.active>a:after{border-right-color:#2b7dbc;-moz-border-right-colors:#2b7dbc}.no-skin .nav-list>li.active:after{display:block;content:"";position:absolute;right:-2px;top:-1px;bottom:0;z-index:1;border:2px solid;border-width:0 2px 0 0;border-color:#2b7dbc}.no-skin .sidebar-scroll .nav-list>li.active:after{right:0}@media only screen and (max-width:991px){.no-skin .sidebar.responsive .nav-list>li.active.open>a:after,.no-skin .sidebar.responsive-max .nav-list>li.active.open>a:after{display:block}.no-skin .sidebar.responsive .nav-list li li.active>a:after,.no-skin .sidebar.responsive-max .nav-list li li.active>a:after{display:none}.no-skin .sidebar.responsive .nav-list>li.active:after,.no-skin .sidebar.responsive-max .nav-list>li.active:after{height:41px}}.no-skin .sidebar.menu-min .nav-list>li>a>.menu-text{background-color:#f5f5f5;-webkit-box-shadow:2px 1px 2px 0 rgba(0,0,0,.1);box-shadow:2px 1px 2px 0 rgba(0,0,0,.1);border-color:#ccc}.no-skin .sidebar.menu-min .nav-list>li>a.dropdown-toggle>.menu-text{-webkit-box-shadow:2px 2px


.android.flexbox.FlexboxLayoutManager
import com.google.android.flexbox.JustifyContent
import com.yuyan.imemodule.R
import com.yuyan.imemodule.adapter.CandidatesAdapter
import com.yuyan.imemodule.adapter.PrefixAdapter
import com.yuyan.imemodule.data.theme.ThemeManager
import com.yuyan.imemodule.data.theme.ThemeManager.activeTheme
import com.yuyan.imemodule.database.DataBaseKT
import com.yuyan.imemodule.database.entry.SideSymbol
import com.yuyan.imemodule.entity.keyboard.SoftKey
import com.yuyan.imemodule.manager.InputModeSwitcherManager
import com.yuyan.imemodule.service.DecodingInfo
import com.yuyan.imemodule.singleton.EnvironmentSingleton.Companion.instance
import com.yuyan.imemodule.utils.AppUtil
import com.yuyan.imemodule.utils.DevicesUtils
import com.yuyan.imemodule.utils.DevicesUtils.dip2px
import com.yuyan.imemodule.utils.thread.ThreadPoolUtils
import com.yuyan.imemodule.keyboard.InputView
import com.yuyan.imemodule.keyboard.KeyboardManager
import com.yuyan.imemodule.manager.layout.CustomFlexboxLayoutManager
import com.yuyan.imemodule.libs.recyclerview.SwipeRecyclerView
import splitties.dimensions.dp
import splitties.views.dsl.constraintlayout.bottomOfParent
import splitties.views.dsl.constraintlayout.endOfParent
import splitties.views.dsl.constraintlayout.lParams
import splitties.views.dsl.constraintlayout.leftOfParent
import splitties.views.dsl.constraintlayout.rightOfParent
import splitties.views.dsl.core.add
import splitties.views.dsl.core.margin
import splitties.views.dsl.core.matchParent
import splitties.views.dsl.core.wrapContent

/**
 * 候选词键盘容器
 *
 * 选择候选词界面分两种效果：九宫格（[InputModeSwitcherManager.isChineseT9])情况下显示左侧拼音选择栏；全键、手写等情况下不显示拼音选择栏。
 * @see InputModeSwitcherManager.isChineseT9
 */
@SuppressLint("ViewConstructor")
class CandidatesContainer(context: Context, inputView: InputView) : BaseContainer(context, inputView) {
    private val mSideSymbolsPinyin:List<SideSymbol>
    private lateinit var mRVSymbolsView: SwipeRecyclerView
    private lateinit var mCandidatesAdapter: CandidatesAdapter
    private var mRVLeftPrefix = inflate(getContext(), R.layout.sdk_view_rv_prefix, null) as SwipeRecyclerView
    private var isLoadingMore = false // 正在加载更多
    private val mLlAddSymbol : LinearLayout = LinearLayout(context).apply{
        layoutParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT).apply { margin = (dp(20)) }
        gravity = Gravity.CENTER
    }
    init {
        initView(context)
        val ivAddSymbol = ImageView(context).apply {
            setPadding(dp(5))
            setImageResource(R.drawable.ic_menu_setting)
        }
        ivAddSymbol.setOnClickListener { _:View ->
            val arguments = Bundle()
            arguments.putInt("type", 0)
            AppUtil.launchSettingsToPrefix(context, arguments)
        }
        mLlAddSymbol.addView(ivAddSymbol)
        mSideSymbolsPinyin = DataBaseKT.instance.sideSymbolDao().getAllSideSymbolPinyin()
    }

    private fun initView(context: Context) {
        mRVSymbolsView = SwipeRecyclerView(context)
        mRVSymbolsView.setHasFixedSize(true)
        mRVSymbolsView.setItemAnim


y!(tree),
            "::",
            stringify!(leaf)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tree>())).n as *const _ as usize },
        8usize,
        concat!("Offset of field: ", stringify!(tree), "::", stringify!(n))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tree>())).parent as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(tree),
            "::",
            stringify!(parent)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tree>())).child as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(tree),
            "::",
            stringify!(child)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tree>())).group as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(tree),
            "::",
            stringify!(group)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tree>())).name as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(tree),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tree>())).groups as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(tree),
            "::",
            stringify!(groups)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tree>())).group_size as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(tree),
            "::",
            stringify!(group_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tree>())).group_offset as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(tree),
            "::",
            stringify!(group_offset)
        )
    );
}
pub const ACTIVATION_LOGISTIC: ACTIVATION = 0;
pub const ACTIVATION_RELU: ACTIVATION = 1;
pub const ACTIVATION_RELU6: ACTIVATION = 2;
pub const ACTIVATION_RELIE: ACTIVATION = 3;
pub const ACTIVATION_LINEAR: ACTIVATION = 4;
pub const ACTIVATION_RAMP: ACTIVATION = 5;
pub const ACTIVATION_TANH: ACTIVATION = 6;
pub const ACTIVATION_PLSE: ACTIVATION = 7;
pub const ACTIVATION_LEAKY: ACTIVATION = 8;
pub const ACTIVATION_ELU: ACTIVATION = 9;
pub const ACTIVATION_LOGGY: ACTIVATION = 10;
pub const ACTIVATION_STAIR: ACTIVATION = 11;
pub const ACTIVATION_HARDTAN: ACTIVATION = 12;
pub const ACTIVATION_LHTAN: ACTIVATION = 13;
pub const ACTIVATION_SELU: ACTIVATION = 14;
pub const ACTIVATION_GELU: ACTIVATION = 15;
pub const ACTIVATION_SWISH: ACTIVATION = 16;
pub const ACTIVATION_MISH: ACTIVATION = 17;
pub const ACTIVATION_NORM_CHAN: ACTIVATION = 18;
pub const ACTIV


            Majors
            Associate,Bachelor
            Master , PhD

            Computer Science  (Offering)
            AA and BA
            MS and PhD

            Information Technology (Offering)
            BA
            MS

            Electronics and Telecommunications (Not yet Offering)
            BA
            MS

{% extends 'base.html' %}

{% block title %}

{% endblock %}

{% block content %}

Permission Error, not authorized to view this page.

{% endblock %}{% extends 'base.html' %}

{% block title %}
    Password Manager - Delete Generated Password
{% endblock %}

{% block content %}

   <form action="" method="post" enctype="multipart/form-data" class="container my-4">

ARE YOU SURE YOU WANT TO DELETE GENERATED PASSWORD SAVED FOR
        "{{ password_obj.password_belongs_to }}" ?

        {% csrf_token %}

        <input type="submit" class="btn btn-danger my-3 rounded shadow-sm mx-auto" value="Yes, Delete this password!">
        Nope, take me back
    </form>
{% endblock %}{% extends 'base.html' %}

{% block title %}
    Password Manager - Password Detail
{% endblock %}

{% block content %}

PASSWORD DETAIL

Password is for {{ passwordObj.password_belongs_to }},
                belongs to {{ passwordObj.linked_category.category_name }}

First Password hint :- {{ passwordObj.password_hint_one }}

Second Password hint :- {{ passwordObj.password_hint_two }}

Still cannot figure out our password ?,
                use reveal Password

            Update Hints
            Update Password
            Delete Password

{% endblock %}{% extends 'base.html' %}

{% block title %}
    Password Manager - Dashboard
{% endblock %}

{% block content %}
    {% if messages %}
        {% for message in messages %}


 </summary>
        /// <param name="context">Type descriptor context.</param>
        /// <param name="provider">Service provider.</param>
        /// <param name="value">The current value.</param>
        /// <returns>The updated values.</returns>
        public override Object EditValue(ITypeDescriptorContext context, IServiceProvider provider, Object value)
        {
            Hotkey hotkey = value as Hotkey;
            View.Editors.HotkeyEditor hotkeyEditor = new View.Editors.HotkeyEditor(hotkey) { Owner = Application.Current.MainWindow };

            if (hotkeyEditor.ShowDialog() == true)
            {
                hotkey = hotkeyEditor.HotkeyEditorViewModel.ActiveHotkey.Build(hotkey);

                if (hotkey != null)
                {
                    return hotkey;
                }
                else
                {
                    return null;
                }
            }

            return value;
        }
    }
    //// End class
}
//// End namespace


oloid::Hyperboloid;
use std::sync::Arc;

#[enum_dispatch]
pub trait Shape {
    fn object_bound(&self) -> Bounds3f;
    fn world_bound(&self) -> Bounds3f {
        self.object_to_world().transform_bounds(&self.object_bound())
    }
    fn intersect(
        &self, r: &Ray, t_hit: &mut Float,
        isect: &mut SurfaceInteraction,
        test_aphatexture: bool, s: Option<Arc<Shapes>>) -> bool;

    fn intersect_p(&self, r: &Ray, test_alpha_texture: bool) -> bool {
        let mut t_hit = r.t_max;
        let mut isect = SurfaceInteraction::default();

        self.intersect(r, &mut t_hit, &mut isect, test_alpha_texture, None)
    }

    fn area(&self) -> Float;
    fn sample(&self, u: &Point2f, pdf: &mut Float) -> InteractionData;
    fn sample_interaction(&self, i: &InteractionData, u: &Point2f, pdf: &mut Float) -> InteractionData {
        let intr = self.sample(u, pdf);
        let mut wi = intr.p - i.p;

        if wi.length_squared() == 0.0 {
            *pdf = 0.0;
        } else {
            wi = wi.normalize();
            // Convert from area measure, as returned by the Sample() call
            // above, to solid angle measure.
            *pdf *= i.p.distance_squared(&intr.p) / intr.n.abs_dot_vec(&(-wi));

            if pdf.is_infinite() { *pdf = 0.0 }
        }

        intr
    }
    fn pdf(&self, _i: &InteractionData) -> Float {
        1.0 / self.area()
    }

    fn pdf_wi(&self, re: &InteractionData, wi: &Vector3f) -> Float {
        // Intersect sample ray with area light geometry
        let ray = re.spawn_ray(wi);
        let mut thit = 0.0;
        let mut isect_light = SurfaceInteraction::default();

        // Ignore any alpha textures used for trimming the shape when performing
        // this intersection. Hack for the "San Miguel" scene, where this is used
        // to make an invisible area light.
        if !self.intersect(&ray, &mut thit, &mut isect_light, false, None) { return 0.0 }

        // Convert light sample weight to solid angle measure
        let mut pdf =
            re.p.distance_squared(&isect_light.p) /
            (isect_light.n.dot_vec(&(-*wi)) * self.area());

        if pdf.is_infinite() { pdf = 0.0; }

        pdf
    }

    fn solid_angle(&self, p: &Point3f, nsamples: usize) -> Float {
        let re = InteractionData {
            p: *p,
            time: 0.0,
            wo: Vector3f::new(0.0, 0.0, 1.0),
            medium_interface: Some(Default::default()),
            ..Default::default()
        };

        let mut solid_angle = 0.0f64;

        for i in 0..nsamples {
            let u = Point2f::new(radical_inverse(0, i as u64), radical_inverse(1, i as u64));
            let mut pdf = 0.0;
            let pshape = self.sample_interaction(&re, &u, &mut pdf);

            let r = Ray::new(&p, &(pshape.p - *p), 0.999, 0.0, None, None);
            if pdf > 0.0 &&


# --------------------------------------------------------------------
# Copyright (c) iEXBase. All rights reserved.
# Licensed under the MIT License.
# See License.txt in the project root for license information.
# --------------------------------------------------------------------

class TronError(Exception):
    """Base class for TronAPI exceptions."""

class InvalidTronError(TronError):
    """Raised Tron Error"""

class FallbackNotFound(Exception):
    """
    Raised when fallback function doesn't exist in contract.
    """
    pass

class MismatchedABI(Exception):
    """
    Raised when an ABI does not match with supplied parameters, or when an
    attempt is made to access a function/event that does not exist in the ABI.
    """
    pass

class InvalidAddress(ValueError):
    """
    The supplied address does not have a valid checksum, as defined in EIP-55
    """
    pass

class NoABIFunctionsFound(AttributeError):
    """
    Raised when an ABI doesn't contain any functions.
    """
    pass

class ValidationError(Exception):
    """
    Raised when a supplied value is invalid.
    """
    pass

class TransportError(TronError):
    """Base exception for transport related errors.

    This is mainly for cases where the status code denotes an HTTP error, and
    for cases in which there was a connection error.

    """

    @property
    def status_code(self):
        return self.args[0]

    @property
    def error(self):
        return self.args[1]

    @property
    def info(self):
        return self.args[2]

    @property
    def url(self):
        return self.args[3]

class HttpError(TransportError):
    """Exception for errors occurring when connecting, and/or making a request"""

class BadRequest(TransportError):
    """Exception for HTTP 400 errors."""

class NotFoundError(TransportError):
    """Exception for HTTP 404 errors."""

class ServiceUnavailable(TransportError):
    """Exception for HTTP 503 errors."""

class GatewayTimeout(TransportError):
    """Exception for HTTP 503 errors."""

class TimeExhausted(Exception):
    """
    Raised when a method has not retrieved the desired result within a specified timeout.
    """
    pass

HTTP_EXCEPTIONS = {
    400: BadRequest,
    404: NotFoundError,
    503: ServiceUnavailable,
    504: GatewayTimeout,
}


$ri-play-list-fill: "\f010";
$ri-play-list-line: "\f011";
$ri-play-mini-fill: "\f012";
$ri-play-mini-line: "\f013";
$ri-playstation-fill: "\f014";
$ri-playstation-line: "\f015";
$ri-plug-2-fill: "\f016";
$ri-plug-2-line: "\f017";
$ri-plug-fill: "\f018";
$ri-plug-line: "\f019";
$ri-polaroid-2-fill: "\f01a";
$ri-polaroid-2-line: "\f01b";
$ri-polaroid-fill: "\f01c";
$ri-polaroid-line: "\f01d";
$ri-police-car-fill: "\f01e";
$ri-police-car-line: "\f01f";
$ri-price-tag-2-fill: "\f020";
$ri-price-tag-2-line: "\f021";
$ri-price-tag-3-fill: "\f022";
$ri-price-tag-3-line: "\f023";
$ri-price-tag-fill: "\f024";
$ri-price-tag-line: "\f025";
$ri-printer-cloud-fill: "\f026";
$ri-printer-cloud-line: "\f027";
$ri-printer-fill: "\f028";
$ri-printer-line: "\f029";
$ri-product-hunt-fill: "\f02a";
$ri-product-hunt-line: "\f02b";
$ri-profile-fill: "\f02c";
$ri-profile-line: "\f02d";
$ri-projector-2-fill: "\f02e";
$ri-projector-2-line: "\f02f";
$ri-projector-fill: "\f030";
$ri-projector-line: "\f031";
$ri-psychotherapy-fill: "\f032";
$ri-psychotherapy-line: "\f033";
$ri-pulse-fill: "\f034";
$ri-pulse-line: "\f035";
$ri-pushpin-2-fill: "\f036";
$ri-pushpin-2-line: "\f037";
$ri-pushpin-fill: "\f038";
$ri-pushpin-line: "\f039";
$ri-qq-fill: "\f03a";
$ri-qq-line: "\f03b";
$ri-qr-code-fill: "\f03c";
$ri-qr-code-line: "\f03d";
$ri-qr-scan-2-fill: "\f03e";
$ri-qr-scan-2-line: "\f03f";
$ri-qr-scan-fill: "\f040";
$ri-qr-scan-line: "\f041";
$ri-question-answer-fill: "\f042";
$ri-question-answer-line: "\f043";
$ri-question-fill: "\f044";
$ri-question-line: "\f045";
$ri-question-mark: "\f046";
$ri-questionnaire-fill: "\f047";
$ri-questionnaire-line: "\f048";
$ri-quill-pen-fill: "\f049";
$ri-quill-pen-line: "\f04a";
$ri-radar-fill: "\f04b";
$ri-radar-line: "\f04c";
$ri-radio-2-fill: "\f04d";
$ri-radio-2-line: "\f04e";
$ri-radio-button-fill: "\f04f";
$ri-radio-button-line: "\f050";
$ri-radio-fill: "\f051";
$ri-radio-line: "\f052";
$ri-rainbow-fill: "\f053";
$ri-rainbow-line: "\f054";
$ri-rainy-fill: "\f055";
$ri-rainy-line: "\f056";
$ri-reactjs-fi


		expected bool
	}{
		{"Empty", []byte{}, true},
		{"HTML document #1", []byte(`<HtMl><bOdY>blah blah blah</body></html>`), true},
		{"HTML document #2", []byte(`<HTML></HTML>`), true},
		{"HTML document #3 (leading whitespace)", []byte(`   <!DOCTYPE HTML>...`), true},
		{"HTML document #4 (leading CRLF)", []byte("\r\n<html>..."), true},
		{"Plain text", []byte(`This is not HTML. It has ☃ though.`), true},
		{"XML", []byte("\n<?xml!"), true},
		{"Binary", []byte{1, 2, 3}, false},
		{"BMP image", []byte("BM..."), false},
		{"MP4 video", []byte("\x00\x00\x00\x18ftypmp42\x00\x00\x00\x00mp42isom<\x06t\xbfmdat"), false},
		{"pdf", []byte("%PDF-"), false},
	}
	for _, v := range tests {
		assert.Equal(t, v.expected, IsTextFile(v.data))
	}
}

func TestIsImageFile(t *testing.T) {
	tests := []struct {
		desc     string
		data     []byte
		expected bool
	}{
		{"Windows icon", []byte("\x00\x00\x01\x00"), true},
		{"Windows cursor", []byte("\x00\x00\x02\x00"), true},
		{"BMP image", []byte("BM..."), true},
		{"GIF 87a", []byte(`GIF87a`), true},
		{"GIF 89a", []byte(`GIF89a...`), true},
		{"WEBP image", []byte("RIFF\x00\x00\x00\x00WEBPVP"), true},
		{"PNG image", []byte("\x89PNG\x0D\x0A\x1A\x0A"), true},
		{"JPEG image", []byte("\xFF\xD8\xFF"), true},
		{"Binary", []byte{1, 2, 3}, false},
		{"Empty", []byte{}, false},
		{"MP4 video", []byte("\x00\x00\x00\x18ftypmp42\x00\x00\x00\x00mp42isom<\x06t\xbfmdat"), false},
		{"pdf", []byte("%PDF-"), false},
	}
	for _, v := range tests {
		assert.Equal(t, v.expected, IsImageFile(v.data))
	}
}

func TestIsPDFFile(t *testing.T) {
	tests := []struct {
		desc     string
		data     []byte
		expected bool
	}{
		{"pdf", []byte("%PDF-"), true},
		{"Binary", []byte{1, 2, 3}, false},
		{"Empty", []byte{}, false},
		{"MP4 video", []byte("\x00\x00\x00\x18ftypmp42\x00\x00\x00\x00mp42isom<\x06t\xbfmdat"), false},
		{"WEBP image", []byte("RIFF\x00\x00\x00\x00WEBPVP"), false},
	}
	for _, v := range tests {
		assert.Equal(t, v.expected, IsPDFFile(v.data))
	}
}

func TestIsVideoFile(t *testing.T) {
	tests := []struct {
		desc     string
		data     []byte
		expected bool
	}{
		{"MP4 video", []byte("\x00\x00\x00\x18ftypmp42\x00\x00\x00\x00mp42isom<\x06t\xbfmdat"), true},
		{"AVI video #1", []byte("RIFF,O\n\x00AVI LISTÀ"), true},
		{"AVI video #2", []byte("RIFF,\n\x00\x00AVI LISTÀ"), true},
		{"pdf", []byte("%PDF-"), false},
		{"Binary", []byte{1, 2, 3}, false},
		{"Empty", []byte{}, false},
		{"WEBP image", []byte("RIFF\x00\x00\x00\x00WEBPVP"), false},
	}
	for _, v := range tests {
		assert.Equal(t, v.expected, IsVideoFil


self:getEventDispatcher()
    eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self)

    local s = cc.Director:getInstance():getWinSize()
    self:initDrawBox()

    self:addNewSpriteWithCoords(cc.p(s.width/2, s.height/2))

    cc.MenuItemFont:setFontName("fonts/arial.ttf")
    cc.MenuItemFont:setFontSize(65)

    local decrease =  cc.MenuItemFont:create(" - ")
    decrease:registerScriptTapHandler(function(tag, sender)
        self:delOBBWithCount(10)
    end)
    decrease:setColor(cc.c3b(0, 200, 20))

    local increase =  cc.MenuItemFont:create(" + ")
    increase:registerScriptTapHandler(function(tag, sender)
        self:addOBBWithCount(10)
    end)
    increase:setColor(cc.c3b(0, 200, 20))

    local menu = cc.Menu:create(decrease, increase)
    menu:alignItemsHorizontally()
    menu:setPosition(cc.p(s.width/2, s.height - 90))
    self:addChild(menu, 1)

    local ttfConfig = {}
    ttfConfig.fontFilePath = "fonts/Marker Felt.ttf"
    ttfConfig.fontSize = 30
    self._labelCubeCount = cc.Label:createWithTTF(ttfConfig,"0 cubes")
    self._labelCubeCount:setColor(cc.c3b(0,200,20))
    self._labelCubeCount:setPosition(cc.p(s.width/2, s.height-90))
    self:addChild(self._labelCubeCount)

    self:addOBBWithCount(10)
    self:scheduleUpdateWithPriorityLua(function(dt)
        self._labelCubeCount:setString(string.format("%u cubes", #self._obb))
        if nil ~= self._drawDebug then
            self._drawDebug:clear()
            local mat = self._sprite:getNodeToWorldTransform()

            self._obbt._xAxis = cc.vec3(mat[1], mat[2], mat[3])
            self._obbt._xAxis = cc.vec3normalize(self._obbt._xAxis)

            self._obbt._yAxis = cc.vec3(mat[5], mat[6], mat[7])
            self._obbt._yAxis = cc.vec3normalize(self._obbt._yAxis)

            self._obbt._zAxis = cc.vec3(-mat[9], -mat[10], -mat[11])
            self._obbt._zAxis = cc.vec3normalize(self._obbt._zAxis)

            self._obbt._center = self._sprite:getPosition3D()

            local corners = {}
            for i=1,8 do
                corners[i] = {}
            end
            corners = self._obbt:getCorners(corners)
            self._drawDebug:drawCube(corners, cc.c4f(0, 0, 1, 1))
        end

        if #self._obb > 0 then
            self._drawOBB:clear()

            for i= 1, #self._obb do
                local corners = {}
                for i=1,8 do
                    corners[i] = {}
                end

                corners = self._obb[i]:getCorners(corners)
                if self._obbt:intersects(self._obb[i]) then
                    self._drawOBB:drawCube(corners, cc.c4f(1, 0, 0, 1))
                else
                    self._drawOBB:drawCube(corners, cc.c4f(0, 1, 0, 1))
                end

            end
        end
    end, 0)
end

function Sprite3DWithOBBPerfromanceTest:addOBBWithCount( value )
    for i=1,value


Promise<T10>,
  f10: (v: T10) => T11 | Promise<T11>,
  f11: (v: T11) => T12 | Promise<T12>,
): (v: T1) => Promise<T12>
export function pipeP<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(
  f1: (v: T1) => T2 | Promise<T2>,
  f2: (v: T2) => T3 | Promise<T3>,
  f3: (v: T3) => T4 | Promise<T4>,
  f4: (v: T4) => T5 | Promise<T5>,
  f5: (v: T5) => T6 | Promise<T6>,
  f6: (v: T6) => T7 | Promise<T7>,
  f7: (v: T7) => T8 | Promise<T8>,
  f8: (v: T8) => T9 | Promise<T9>,
  f9: (v: T9) => T10 | Promise<T10>,
  f10: (v: T10) => T11 | Promise<T11>,
  f11: (v: T11) => T12 | Promise<T12>,
  f12: (v: T12) => T13 | Promise<T13>,
): (v: T1) => Promise<T13>
export function pipeP<
  T1,
  T2,
  T3,
  T4,
  T5,
  T6,
  T7,
  T8,
  T9,
  T10,
  T11,
  T12,
  T13,
  T14
>(
  f1: (v: T1) => T2 | Promise<T2>,
  f2: (v: T2) => T3 | Promise<T3>,
  f3: (v: T3) => T4 | Promise<T4>,
  f4: (v: T4) => T5 | Promise<T5>,
  f5: (v: T5) => T6 | Promise<T6>,
  f6: (v: T6) => T7 | Promise<T7>,
  f7: (v: T7) => T8 | Promise<T8>,
  f8: (v: T8) => T9 | Promise<T9>,
  f9: (v: T9) => T10 | Promise<T10>,
  f10: (v: T10) => T11 | Promise<T11>,
  f11: (v: T11) => T12 | Promise<T12>,
  f12: (v: T12) => T13 | Promise<T13>,
  f13: (v: T13) => T14 | Promise<T14>,
): (v: T1) => Promise<T14>
export function pipeP<
  T1,
  T2,
  T3,
  T4,
  T5,
  T6,
  T7,
  T8,
  T9,
  T10,
  T11,
  T12,
  T13,
  T14,
  T15
>(
  f1: (v: T1) => T2 | Promise<T2>,
  f2: (v: T2) => T3 | Promise<T3>,
  f3: (v: T3) => T4 | Promise<T4>,
  f4: (v: T4) => T5 | Promise<T5>,
  f5: (v: T5) => T6 | Promise<T6>,
  f6: (v: T6) => T7 | Promise<T7>,
  f7: (v: T7) => T8 | Promise<T8>,
  f8: (v: T8) => T9 | Promise<T9>,
  f9: (v: T9) => T10 | Promise<T10>,
  f10: (v: T10) => T11 | Promise<T11>,
  f11: (v: T11)


1 << 4));
        f.m_fmt = base_internal_fmt;
        f.m_actual_internal_fmt = actual_internal_fmt;
        f.m_name = get_gl_enums().find_name(base_internal_fmt, "gl");

        GET_INT(f.m_comp_sizes[cTCRed], GL_TEXTURE_RED_SIZE);
        GET_INT(f.m_comp_sizes[cTCGreen], GL_TEXTURE_GREEN_SIZE);
        GET_INT(f.m_comp_sizes[cTCBlue], GL_TEXTURE_BLUE_SIZE);
        GET_INT(f.m_comp_sizes[cTCAlpha], GL_TEXTURE_ALPHA_SIZE);
        GET_INT(f.m_comp_sizes[cTCStencil], GL_TEXTURE_STENCIL_SIZE);
        GET_INT(f.m_comp_sizes[cTCDepth], GL_TEXTURE_DEPTH_SIZE);
        GET_INT(f.m_comp_sizes[cTCIntensity], GL_TEXTURE_INTENSITY_SIZE);
        GET_INT(f.m_comp_sizes[cTCLuminance], GL_TEXTURE_LUMINANCE_SIZE);

        GET_INT(f.m_comp_types[cTCRed], GL_TEXTURE_RED_TYPE);
        GET_INT(f.m_comp_types[cTCGreen], GL_TEXTURE_GREEN_TYPE);
        GET_INT(f.m_comp_types[cTCBlue], GL_TEXTURE_BLUE_TYPE);
        GET_INT(f.m_comp_types[cTCAlpha], GL_TEXTURE_ALPHA_TYPE);
        GET_INT(f.m_comp_types[cTCDepth], GL_TEXTURE_DEPTH_TYPE);
        GET_INT(f.m_comp_types[cTCIntensity], GL_TEXTURE_INTENSITY_TYPE);
        GET_INT(f.m_comp_types[cTCLuminance], GL_TEXTURE_LUMINANCE_TYPE);

        GET_INT(f.m_shared_size, GL_TEXTURE_SHARED_SIZE);
        GET_BOOL(f.m_compressed, GL_TEXTURE_COMPRESSED);

        printf("base_internal_fmt: %s get_fmt: %s get_type: %s, actual_internal_fmt: %s compressed: %u\n",
               get_gl_enums().find_gl_name(base_internal_fmt), get_gl_enums().find_gl_name(get_fmt), get_gl_enums().find_gl_name(get_type),
               get_gl_enums().find_gl_name(actual_internal_fmt),
               f.m_compressed);
#undef GET_INT
#undef GET_BOOL

        //VOGL_ASSERT(!any_gl_errors);

        VOGL_ASSERT(f.m_actual_internal_fmt != GL_NONE);
        VOGL_ASSERT(f.m_optimum_get_image_fmt != GL_NONE);
        VOGL_ASSERT(f.m_optimum_get_image_type != GL_NONE);

        VOGL_ASSERT(!f.m_compressed);
        VOGL_ASSERT(!ktx_is_compressed_ogl_fmt(f.m_fmt) && !ktx_is_compressed_ogl_fmt(f.m_actual_internal_fmt));
        VOGL_ASSERT(ktx_get_ogl_compressed_base_internal_fmt(f.m_fmt) == 0 && ktx_get_ogl_compressed_base_internal_fmt(f.m_actual_internal_fmt) == 0);

        if (!internal_formats.insert(base_internal_fmt, f).second)
        {
            internal_formats.find_value(base_internal_fmt)->m_tex_image_flags |= ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4));
        }

        GL_ENTRYPOINT(glBindTexture)(target, 0);
        VOGL_CHECK_GL_ERROR;

        GL_ENTRYPOINT(glDeleteTextures)(1, &handle);
        VOGL_CHECK_GL_ERROR;
    }

    for (uint32_t t = 0; t < 5; t++)
    {
        GLenum target = GL_NONE;
        switch (t)
        {
            case 0:
            {
                target = GL_TEXTURE_1D;
                break;
            }
            case 1:
            {
                target = GL_TEXTURE_2D;
                break;
            }
            case 2:
            {
                target = GL_TEXTURE_3D;
                break;
            }
            case 3:
            {
                target = GL_TEXTURE_2D_MULTISAMPLE;
                break;
            }
            case 4:
            {
                target = GL_TEXTURE_2D_MULTISAMPLE_ARRAY;
                break;
            }
            default:
            {


czas tworzenia Międzynarodowego Stowarzyszenia Dysforii Płciowej im. Harry'ego Benjamina (HBIGDA), które wypuściło dokument zatytułowany "Standards of Care" (współcześnie tłumaczony jako "Standardy opieki zdrowotnej dla osób transseksualnych, transpłciowych i różnorodnych płciowo"). Ta edycja SoC znana jest jako zasady Harry'ego Benjamina i była niesłynnie ograniczająca w tym, kiedy dysforia płciowa mogła być zdiagnozowana. Pacjenci umieszczani byli na 6-poziomowej skali w zależności od ich stopnia cierpienia i dysfunkcji seksualnej. Jeśli nie udało ci się trafić na poziom 5 lub wyższy, określany jako "prawdziwy transseksualista", zazwyczaj twoje starania o leczenia były odrzucane.

Problem w tym, że poziomy 5 i 6 wymagały, abyś odczuwał_a wyłączny pociąg do płci nadanej ci przy urodzeniu. Tranzycja *musiała* uczynić cię hetero, nie homo, i osoby biseksualne nie były dozwolone. Twoje ciało i genitalia musiały przyprawiać cię o rozpacz, musiałeś_aś także żyć jako swoja prawdziwa płeć jeszcze przed leczeniem. Wiele trans osób obchodziło te ograniczenia ze wsparciem społeczności i poprzez performatywną prezentację, ale w przypadku wielu osób (wliczając mnie) wierzono, że jeśli nie spełniasz wszystkich kryteriów, wówczas nie jesteś wystarczająco trans, aby poddać się tranzycji.

W 2011 roku HBIGDA zreorganizowała się, aby odpowiedzieć na narastającą presję zrozumienia i akceptacji transpłciowości, przyjmując nową nazwę Światowe Stowarzyszenie Specjalistów(-tek) do spraw Zdrowia Osób Transpłciowych (WPATH). We współpracy z transpłciowymi osobami (po raz pierwszy w historii organizacji) WPATH wydało całkowicie nowe "Standardy" (wersja 7, pierwsza od dziesięciu lat), która porzuciła skalę Benjamina, skupiając się na indywidualnych symptomach i oddzielając całkowicie tożsamość płciową od seksualności. Dwa lata później, w 2013 roku, Amerykańskie Towarzystwo Psychiatryczne zmieniło swoje kryteria diagnostyczne w DSM-5 na zgodne ze "Standardami", zastępując zaburzenie tożsamości płciowej dysforią płciową. Wraz z tą zmianą, tranzycja medyczna stała się dostępna dla wszystkich transpłciowych osób w USA.

Z tego powodu widoczność osób trans na świecie nagle eksplodowała w trakcie drugiej dekady XXI w. Łatwiejszy dostęp oznacza większe liczby, większe liczby -- większą widoczność, większa w


evel: LogLevel, ..._: any[]) => void): void {
		this._print = fn;
	}

	private _print(logLevel: LogLevel, ...rest: any[]): void {
		const copy = [LOG_PREFIX, ...rest];

		for (const i in copy) {
			if (copy[i] instanceof Error) {
				copy[i] = "(" + copy[i].name + ") " + copy[i].message;
			}
		}

		if (logLevel >= LogLevel.All) {
			console.log(...copy);
		} else if (logLevel >= LogLevel.Warnings) {
			console.warn("WARNING", ...copy);
		} else if (logLevel >= LogLevel.Errors) {
			console.error("ERROR", ...copy);
		}
	}
}

export default new Logger();
namespace Graphite{

	/**
	 * Defines description of the token.
	 */
    export interface ITokenType {

		/**
		 * Check selected value for matching token type.
		 * @param {string} word - Value for matching.
		 * @returns {boolean} - Is value match token type.
		*/
        is(word: string): boolean;

		/**
		 * If this property is set to true, lexical analizer will remove it from returning token collection.
		*/
        readonly skip: boolean;
	}
}import { newUnibeautify, Beautifier } from "unibeautify";
import beautifier from "../../src";
test(`should successfully beautify JavaScript text with comments indented`, () => {
  const unibeautify = newUnibeautify();
  unibeautify.loadBeautifier(beautifier);
  const text = `function test(n){\n/*this should indent*/return n+1;}`;
  const beautifierResult = `function test(n) { /*this should indent*/\n\treturn n + 1;\n}`;
  return unibeautify
    .beautify({
      languageName: "JavaScript",
      options: {
        JavaScript: {
          indent_comments: true,
          indent_style: "tab",
          indent_size: 1,
        },
      },
      text,
    })
    .then(results => {
      expect(results).toBe(beautifierResult);
    });
});
test(`should successfully beautify JavaScript text with comments not indented`, () => {
  const unibeautify = newUnibeautify();
  unibeautify.loadBeautifier(beautifier);
  const text = `function test(n){\n\t/* this should not indent */\n\treturn n + 1;\n}`;
  const beautifierResult = `function test(n) { /* this should not indent */\n\treturn n + 1;\n}`;
  return unibeautify
    .beautify({
      languageName: "JavaScript",
      options: {
        JavaScript: {
          indent_comments: false,
          indent_style: "tab",
          indent_size: 1,
        },
      },
      text,
    })
    .then(results => {
      expect(results).toBe(beautifierResult);
    });
});
import { mat3, vec2 } from 'gl-matrix';
import { IObjects2DTransformer } from './interfaces';
import { ConstructObjects2DTransformer } from './constructor';
import { IObjects2DTransformerInternal, OBJECTS_2D_TRANSFORMER_PRIVATE } from './privates';
import { IObject2D } from '../object-2d/interfaces';

const TMP_VEC2 = vec2.create();
const TMP_MAT3 = mat3.create();

/** METHODS **/

/* GETTERS/SETTERS */

export function Objects2DTransformerGetObjects<TObjects extends IObject2D>(instance: IObjects2DTransformer<TObjects>): ReadonlyArray<TObjects> {
  return (instance as IObjects2DTransformerInternal<TObjects>)[OBJECTS_2D_TRANSFORMER_


_CD2,
    RSN_VISIT_VRSN_CD2,
    RSN_VISIT_CD3,
    RSN_VISIT_VRSN_CD3,
    NCH_BENE_PTB_DDCTBL_AMT,
    NCH_BENE_PTB_COINSRNC_AMT,
    CLM_OP_PRVDR_PMT_AMT,
    CLM_OP_BENE_PMT_AMT,
    FI_DOC_CLM_CNTL_NUM,
    FI_ORIG_CLM_CNTL_NUM,
    CLM_LINE_NUM,
    REV_CNTR,
    REV_CNTR_DT,
    REV_CNTR_1ST_ANSI_CD,
    REV_CNTR_2ND_ANSI_CD,
    REV_CNTR_3RD_ANSI_CD,
    REV_CNTR_4TH_ANSI_CD,
    REV_CNTR_APC_HIPPS_CD,
    HCPCS_CD,
    HCPCS_1ST_MDFR_CD,
    HCPCS_2ND_MDFR_CD,
    REV_CNTR_PMT_MTHD_IND_CD,
    REV_CNTR_DSCNT_IND_CD,
    REV_CNTR_PACKG_IND_CD,
    REV_CNTR_OTAF_PMT_CD,
    REV_CNTR_IDE_NDC_UPC_NUM,
    REV_CNTR_UNIT_CNT,
    REV_CNTR_RATE_AMT,
    REV_CNTR_BLOOD_DDCTBL_AMT,
    REV_CNTR_CASH_DDCTBL_AMT,
    REV_CNTR_COINSRNC_WGE_ADJSTD_C,
    REV_CNTR_RDCD_COINSRNC_AMT,
    REV_CNTR_1ST_MSP_PD_AMT,
    REV_CNTR_2ND_MSP_PD_AMT,
    REV_CNTR_PRVDR_PMT_AMT,
    REV_CNTR_BENE_PMT_AMT,
    REV_CNTR_PTNT_RSPNSBLTY_PMT,
    REV_CNTR_PMT_AMT_AMT,
    REV_CNTR_TOT_CHRG_AMT,
    REV_CNTR_NCVRD_CHRG_AMT,
    REV_CNTR_STUS_IND_CD,
    REV_CNTR_NDC_QTY,
    REV_CNTR_NDC_QTY_QLFR_CD,
    RNDRNG_PHYSN_UPIN,
    RNDRNG_PHYSN_NPI
  }

  public enum INPATIENT {
    DML_IND,
    BENE_ID,
    CLM_ID,
    CLM_GRP_ID,
    FINAL_ACTION,
    NCH_NEAR_LINE_REC_IDENT_CD,
    NCH_CLM_TYPE_CD,
    CLM_FROM_DT,
    CLM_THRU_DT,
    NCH_WKLY_PROC_DT,
    FI_CLM_PROC_DT,
    CLAIM_QUERY_CODE,
    PRVDR_NUM,
    CLM_FAC_TYPE_CD,
    CLM_SRVC_CLSFCTN_TYPE_CD,
    CLM_FREQ_CD,
    FI_NUM,
    CLM_MDCR_NON_PMT_RSN_CD,
    CLM_PMT_AMT,
    NCH_PRMRY_PYR_CLM_PD_AMT,
    NCH_PRMRY_PYR_CD,
    FI_CLM_ACTN_CD,
    PRVDR_STATE_CD,
    ORG_NPI_NUM,
    AT_PHYSN_UPIN,
    AT_PHYSN_NPI


"""
Implements interquartile_range() function.
"""

from .quantile import quantile

def interquartile_range(x):
    """
    The `interquartile range`_ is the difference between the third
    and first quartiles of a numerical list. It is a measure of
    dispersion, or the spread of a distribution.

    .. _`interquartile range`: https://en.wikipedia.org/wiki/Interquartile_range

    Args:
        x: A list or tuple of numerical objects.

    Returns:
        An int or float of the difference between third and first quartiles.

    Examples:
        >>> interquartile_range([1, 2, 3, 4])
        2
        >>> interquartile_range([1, 3, 5, 7])
        4
        >>> interquartile_range(4)
        Traceback (most recent call last):
            ...
        TypeError: interquartile_range() expects a list or tuple.
    """

    if type(x) not in [list, tuple]:
        raise TypeError('interquartile_range() expects a list or tuple.')

    x.sort()

    q1 = quantile(x, .25)
    q3 = quantile(x, .75)

    return(q3 - q1)


Collider(){
        for(let i =1;i<this.body.length;i++){
            let items = this.body[i] as HTMLElement;
            if(this.X === items.offsetLeft && this.Y === items.offsetTop){
                throw new Error("Snake hit itself, Game over!");
            }

        }
    }

}
export default Snake;import { Action } from '@ngrx/store';

export enum NewsLetterActionTypes {
  CreateHeaderImage = '[Header] Add Image',
  UpdateHeaderImage = '[Header] Update Image',

}

export class CreateHeaderImage implements Action {
  readonly type = NewsLetterActionTypes.CreateHeaderImage;

  constructor(public payload: any) { }
}

export class UpdateHeaderImage implements Action {
  readonly type = NewsLetterActionTypes.UpdateHeaderImage;

  constructor(public payload: any) { }
}

export type NewsLetterActions = CreateHeaderImage
  | UpdateHeaderImage;

import { parseISO } from 'date-fns'
import { CalendarEvent } from '../CalendarEvent'
import { CalendarEventList } from '../CalendarEventList'

const calendarEvent1 = new CalendarEvent(
    parseISO('2019-11-18T04:15:00'),
    parseISO('2019-11-18T08:00:00'),
    'calendar 1',
    'E1',
    'D1',
)

const calendarEvent2 = new CalendarEvent(
    parseISO('2019-11-19T08:15:00'),
    parseISO('2019-11-19T10:00:00'),
    'calendar 1',
    'E2',
    'D1',
)

const eventList = new CalendarEventList([
    calendarEvent1,
    calendarEvent2
])

test('can find event', () => {
    expect(eventList.findEvent(4, parseISO('2019-11-18'))).toBe(calendarEvent1)
})

test('can find another event', () => {
    expect(eventList.findEvent(8, parseISO('2019-11-19'))).toBe(calendarEvent2)
})

test('will not find event on the wrong day', () => {
    expect(eventList.findEvent(4, parseISO('2019-11-19'))).toBe(undefined)
})

test('will not find event with the wrong time', () => {
    expect(eventList.findEvent(8, parseISO('2019-11-18'))).toBe(undefined)
})

test('can find relevant events', () => {
    expect(eventList.earliestEvent(parseISO('2019-11-18'))).toEqual(calendarEvent1)
})

test('can find relevant events ignoring earlier events', () => {
    expect(eventList.earliestEvent(parseISO('2019-11-19'))).toEqual(calendarEvent2)
})

test('wont find too early events', () => {
    expect(eventList.earliestEvent(parseISO('2019-11-20'))).toEqual(undefined)
})

test('wont find too late events', () => {
    expect(eventList.earliestEvent(parseISO('2019-11-10'))).toEqual(undefined)
})

 export interface TodoInterface{
    addTask(add:string):number
    listAllTasks():void
    delteTask(remove:string):number
    list1:string[]
}import { Command } from './command';

export interface ClearCommand extends Command<void> {

  /**
   * See `DataStore.clear(…)`
   *
   * @param {string|string[]} type
   * @returns {Promise<boolean>}
   * @throws {NotFoundError}
   */
  execute(type?: string | string[]): Promise<boolean>;
}
import {play_note} from "../audio.js";
import {Get, Has} from "../components/com_index.js";
import {Entity, Game} from "../game.js";

export function sys_audio(game: Game, delta: number) {
    for (let i = 0; i < game.World.length; i++) {
        if (game.World[i] & Has.AudioSource) {
            update(game, i, delta);
        }
    }
}

function update(game: Game, entity:


/****************************************************************
 *
 *        Copyright 2013, Big Switch Networks, Inc.
 *
 * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/legal/epl-v10.html
 *
 * 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.
 *
 ****************************************************************/

/**
 * @file
 * @brief Weak symbols for optional Forwarding/PortManager interfaces
 */

#include "ofstatemanager_log.h"

#include <OFStateManager/ofstatemanager_config.h>
#include <indigo/indigo.h>
#include <indigo/forwarding.h>
#include <loci/loci.h>

#ifdef __GNUC__
#define WEAK __attribute__ ((weak))
#else
#warn "Weak symbols not supported for this compiler"
#endif

#ifdef WEAK

WEAK void
indigo_fwd_vlan_stats_get(
    uint16_t vlan_vid,
    indigo_fi_vlan_stats_t *vlan_stats)
{
    /* All counters default to -1 */
}

WEAK void
indigo_port_extended_stats_get(
    of_port_no_t port_no,
    indigo_fi_port_stats_t *port_stats)
{
    /* All counters default to -1 */
}

#endif


'true') {
						$('input[name="muilt-tab"]').attr('checked', 'checked')
					} else {
						$('input[name="muilt-tab"]').removeAttr('checked')
					}

					if (localStorage.getItem('auto-head') === 'true') {
						$('input[name="auto-head"]').attr('checked', 'checked')
					} else {
						$('input[name="auto-head"]').removeAttr('checked')
					}

					if (localStorage.getItem('footer') === 'true') {
						$('input[name="footer"]').attr('checked', 'checked')
					} else {
						$('input[name="footer"]').removeAttr('checked')
					}

					form.render('checkbox');
				}
			});
		});

		body.on('click', '[data-select-bgcolor]', function() {
			var theme = $(this).attr('data-select-bgcolor');
			$('[data-select-bgcolor]').removeClass("layui-this");
			$(this).addClass("layui-this");
			localStorage.setItem("theme-menu", theme);
			pearAdmin.menuSkin(theme);
		});

		body.on('click', '[data-select-header]', function() {
			var theme = $(this).attr('data-select-header');
			$('[data-select-header]').removeClass("layui-this");
			$(this).addClass("layui-this");
			localStorage.setItem("theme-header", theme);
			pearAdmin.headerSkin(theme);
		});

		body.on('click', '.select-color-item', function() {
			$(".select-color-item").removeClass("layui-icon").removeClass("layui-icon-ok");
			$(this).addClass("layui-icon").addClass("layui-icon-ok");
			var colorId = $(".select-color-item.layui-icon-ok").attr("color-id");
			var currentColor = getColorById(colorId);
			localStorage.setItem("theme-color", currentColor.id);
			localStorage.setItem("theme-color-color", currentColor.color);
			localStorage.setItem("theme-color-second", currentColor.second);
			pearTheme.changeTheme(window, isAutoHead(config));
		});

		function applyConfig(param) {
			config = param;
			pearAdmin.logoRender(param);
			pearAdmin.menuRender(param);
			pearAdmin.bodyRender(param);
			pearAdmin.themeRender(param);
			pearAdmin.keepLoad(param);
			if (param.header.message != false) {
				pearAdmin.messageRender(param);
			}
		}

		function getColorById(id) {
			var color;
			var flag = false;
			$.each(config.colors, function(i, value) {
				if (value.id === id) {
					color = value;
					flag = true;
				}
			})
			if (flag === false || config.theme.allowCustom === false) {
				$.each(config.colors, function(i, value) {
					if (value.id === config.theme.defaultColor) {
						color = value;
					}
				})
			}
			return color;
		}

		function buildColorHtml() {
			var colors = "";
			$.each(config.colors, function(i, value) {
				colors += "";
			})
			return "

主题配色

" +
				colors + "

"
		}

		function compatible() {
			if ($(window).width() <= 768) {
				collapse()
			}
		}

		function screenFun(num) {
			num = num || 1;
			num = num * 1;
			var docElm =


ctories=no,
    status=no,
    menubar=no,
    copyhistory=no,
    width=${width},
    height=${height},
    top=${top},
    left=${left}
  `;

  return window.open(url, name, features);
}// @ts-nocheck
import { surroundingAgent } from '../engine.mjs';
import {
  Type, JSStringValue, TypeForMethod, Value,
} from '../value.mjs';
import { ToNumeric, ToPrimitive, ToString } from '../abstract-ops/all.mjs';
import { Q } from '../completion.mjs';

export type BinaryOperator = '+' | '-' | '*' | '/' | '%' | '**' | '<<' | '>>' | '>>>' | '&' | '^' | '|';
/** https://tc39.es/ecma262/#sec-applystringornumericbinaryoperator */
export function ApplyStringOrNumericBinaryOperator(lval: Value, opText: BinaryOperator, rval: Value) {
  // 1. If opText is +, then
  if (opText === '+') {
    // a. Let lprim be ? ToPrimitive(lval).
    const lprim = Q(ToPrimitive(lval));
    // b. Let rprim be ? ToPrimitive(rval).
    const rprim = Q(ToPrimitive(rval));
    // c. If Type(lprim) is String or Type(rprim) is String, then
    if (lprim instanceof JSStringValue || rprim instanceof JSStringValue) {
      // i. Let lstr be ? ToString(lprim).
      const lstr = Q(ToString(lprim));
      // ii. Let rstr be ? ToString(rprim).
      const rstr = Q(ToString(rprim));
      // iii. Return the string-concatenation of lstr and rstr.
      return Value(lstr.stringValue() + rstr.stringValue());
    }
    // d. Set lval to lprim.
    lval = lprim;
    // e. Set rval to rprim.
    rval = rprim;
  }
  // 2. NOTE: At this point, it must be a numeric operation.
  // 3. Let lnum be ? ToNumeric(lval).
  const lnum = Q(ToNumeric(lval));
  // 4. Let rnum be ? ToNumeric(rval).
  const rnum = Q(ToNumeric(rval));
  // 5. If Type(lnum) is different from Type(rnum), throw a TypeError exception.
  if (Type(lnum) !== Type(rnum)) {
    return surroundingAgent.Throw('TypeError', 'CannotMixBigInts');
  }
  // 6. Let T be Type(lnum).
  const T = TypeForMethod(lnum);
  // 7. Let operation be the abstract operation associated with opText in the following table:
  const operation = ({
    '**': T.exponentiate,
    '*': T.multiply,
    '/': T.divide,
    '%': T.remainder,
    '+': T.add,
    '-': T.subtract,
    '<<': T.leftShift,
    '>>': T.signedRightShift,
    '>>>': T.unsignedRightShift,
    '&': T.bitwiseAND,
    '^': T.bitwiseXOR,
    '|': T.bitwiseOR,
  } satisfies Record<BinaryOperator, unknown>)[opText];
  // 8. Return ? operation(lnum, rnum).
  return Q(operation(lnum, rnum));
}
/**
 * Sliders data
 */
const slides = [
  {
    year: '15 May',
    type: 'First Event',
    company: 'ABC Company',
    content: 'It will be as simple as occidental in fact it will be Cambridge'
  },
  {
    year: '21 May


# Copyright (c) OpenMMLab. All rights reserved.

# Please refer to https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#a-pure-python-style-configuration-file-beta for more details. # noqa
# mmcv >= 2.0.1
# mmengine >= 0.8.0

from mmengine.config import read_base

with read_base():
    from .rtmdet_s_8xb32_300e_coco import *

from mmcv.transforms.loading import LoadImageFromFile
from mmcv.transforms.processing import RandomResize

from mmdet.datasets.transforms.formatting import PackDetInputs
from mmdet.datasets.transforms.loading import LoadAnnotations
from mmdet.datasets.transforms.transforms import (CachedMixUp, CachedMosaic,
                                                  Pad, RandomCrop, RandomFlip,
                                                  Resize, YOLOXHSVRandomAug)

checkpoint = 'https://download.openmmlab.com/mmdetection/v3.0/rtmdet/cspnext_rsb_pretrain/cspnext-tiny_imagenet_600e.pth'  # noqa

model.update(
    dict(
        backbone=dict(
            deepen_factor=0.167,
            widen_factor=0.375,
            init_cfg=dict(
                type='Pretrained', prefix='backbone.', checkpoint=checkpoint)),
        neck=dict(
            in_channels=[96, 192, 384], out_channels=96, num_csp_blocks=1),
        bbox_head=dict(in_channels=96, feat_channels=96, exp_on_reg=False)))

train_pipeline = [
    dict(type=LoadImageFromFile, backend_args=backend_args),
    dict(type=LoadAnnotations, with_bbox=True),
    dict(
        type=CachedMosaic,
        img_scale=(640, 640),
        pad_val=114.0,
        max_cached_images=20,
        random_pop=False),
    dict(
        type=RandomResize,
        scale=(1280, 1280),
        ratio_range=(0.5, 2.0),
        resize_type=Resize,
        keep_ratio=True),
    dict(type=RandomCrop, crop_size=(640, 640)),
    dict(type=YOLOXHSVRandomAug),
    dict(type=RandomFlip, prob=0.5),
    dict(type=Pad, size=(640, 640), pad_val=dict(img=(114, 114, 114))),
    dict(
        type=CachedMixUp,
        img_scale=(640, 640),
        ratio_range=(1.0, 1.0),
        max_cached_images=10,
        random_pop=False,
        pad_val=(114, 114, 114),
        prob=0.5),
    dict(type=PackDetInputs)
]

train_dataloader.update(dict(dataset=dict(pipeline=train_pipeline)))


e: Int, resultCode: Int, data: Intent?) {
        // 处理 QQ 登录回调
        if (requestCode == Constants.REQUEST_LOGIN || requestCode == Constants.REQUEST_APPBAR) {
            Tencent.onActivityResultData(
                requestCode,
                resultCode,
                data,
                QQLoginManager.getInstance().qqLoginListener
            )
        }

        super.onActivityResult(requestCode, resultCode, data)
    }
}
package com.joker.coolmall.feature.user.viewmodel

import androidx.lifecycle.SavedStateHandle
import androidx.lifecycle.viewModelScope
import com.joker.coolmall.core.common.base.viewmodel.BaseNetWorkViewModel
import com.joker.coolmall.core.data.state.AppState
import com.joker.coolmall.core.data.repository.AddressRepository
import com.joker.coolmall.core.model.entity.Address
import com.joker.coolmall.core.model.response.NetworkResponse
import com.joker.coolmall.feature.user.navigation.AddressDetailRoutes
import com.joker.coolmall.navigation.AppNavigator
import com.joker.coolmall.result.ResultHandler
import com.joker.coolmall.result.asResult
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import javax.inject.Inject

/**
 * 收货地址详情ViewModel
 */
@HiltViewModel
class AddressDetailViewModel @Inject constructor(
    navigator: AppNavigator,
    appState: AppState,
    savedStateHandle: SavedStateHandle,
    private val addressRepository: AddressRepository
) : BaseNetWorkViewModel<Address>(
    navigator = navigator,
    appState = appState,
    savedStateHandle = savedStateHandle,
    idKey = AddressDetailRoutes.ADDRESS_ID_ARG
) {
    // 是否为编辑模式
    val isEditMode: Boolean =
        savedStateHandle.get<Boolean>(AddressDetailRoutes.IS_EDIT_MODE_ARG) ?: false

    // 直接使用父类提供的 id
    val addressId: Long? = if (isEditMode) {
        // 从父类中获取 id
        super.id
    } else null

    /**
     * 联系人
     */
    private val _contactName = MutableStateFlow("")
    val contactName: StateFlow<String> = _contactName

    /**
     * 手机号
     */
    private val _phone = MutableStateFlow("")
    val phone: StateFlow<String> = _phone

    /**
     * 省
     */
    private val _province = MutableStateFlow("")
    val province: StateFlow<String> = _province

    /**
     * 市
     */
    private val _city = MutableStateFlow("")
    val city: StateFlow<String> = _city

    /**
     * 区
     */
    private val _district = MutableStateFlow("")
    val district: StateFlow<String> = _district

    /**
     * 详细地址
     */
    private val _detailAddress = MutableStateFlow("")
    val detailAddress: StateFlow<String> = _detailAddress

    /**
     * 是否默认地址
     */
    private val _isDefaultAddress = MutableStateFlow(false)
    val isDefaultAddress: StateFlow<Boolean> = _isDefaultAddress

    init {
        // 如果是编辑模式且地址ID有效，则执行请求
        if (isEditMode && addressId != null) {
            super.executeRequest()
        } else {
            // 新增模式，设置初始状态为成功
            setSuccessState(Address())
        }
    }

    /**
     * 通过重写来给父类提供API请求的Flow
     *


using System.Linq;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using Conduit.Infrastructure;
using Conduit.Infrastructure.Errors;
using MediatR;
using Microsoft.EntityFrameworkCore;

namespace Conduit.Features.Articles;

public class List
{
    public record Query(
        string Tag,
        string Author,
        string FavoritedUsername,
        int? Limit,
        int? Offset,
        bool IsFeed = false
    ) : IRequest<ArticlesEnvelope>;

    public class QueryHandler(ConduitContext context, ICurrentUserAccessor currentUserAccessor)
        : IRequestHandler<Query, ArticlesEnvelope>
    {
        public async Task<ArticlesEnvelope> Handle(
            Query message,
            CancellationToken cancellationToken
        )
        {
            var queryable = context.Articles.GetAllData();

            if (message.IsFeed && currentUserAccessor.GetCurrentUsername() != null)
            {
                var currentUser = await context
                    .Persons.Include(x => x.Following)
                    .FirstOrDefaultAsync(
                        x => x.Username == currentUserAccessor.GetCurrentUsername(),
                        cancellationToken
                    );

                if (currentUser is null)
                {
                    throw new RestException(
                        HttpStatusCode.NotFound,
                        new { User = Constants.NOT_FOUND }
                    );
                }
                queryable = queryable.Where(x =>
                    currentUser.Following.Select(y => y.TargetId).Contains(x.Author!.PersonId)
                );
            }

            if (!string.IsNullOrWhiteSpace(message.Tag))
            {
                var tag = await context.ArticleTags.FirstOrDefaultAsync(
                    x => x.TagId == message.Tag,
                    cancellationToken


5a5;--vscode-interactive-activeCodeBorder: #1a85ff;--vscode-interactive-inactiveCodeBorder: #e4e6f1;--vscode-gitDecoration-addedResourceForeground: #587c0c;--vscode-gitDecoration-modifiedResourceForeground: #895503;--vscode-gitDecoration-deletedResourceForeground: #ad0707;--vscode-gitDecoration-renamedResourceForeground: #007100;--vscode-gitDecoration-untrackedResourceForeground: #007100;--vscode-gitDecoration-ignoredResourceForeground: #8e8e90;--vscode-gitDecoration-stageModifiedResourceForeground: #895503;--vscode-gitDecoration-stageDeletedResourceForeground: #ad0707;--vscode-gitDecoration-conflictingResourceForeground: #ad0707;--vscode-gitDecoration-submoduleResourceForeground: #1258a7}body.dark-mode{--vscode-font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif;--vscode-font-weight: normal;--vscode-font-size: 13px;--vscode-editor-font-family: "Droid Sans Mono", "monospace", monospace;--vscode-editor-font-weight: normal;--vscode-editor-font-size: 14px;--vscode-foreground: #cccccc;--vscode-disabledForeground: rgba(204, 204, 204, .5);--vscode-errorForeground: #f48771;--vscode-descriptionForeground: rgba(204, 204, 204, .7);--vscode-icon-foreground: #c5c5c5;--vscode-focusBorder: #007fd4;--vscode-textSeparator-foreground: rgba(255, 255, 255, .18);--vscode-textLink-foreground: #3794ff;--vscode-textLink-activeForeground: #3794ff;--vscode-textPreformat-foreground: #d7ba7d;--vscode-textBlockQuote-background: rgba(127, 127, 127, .1);--vscode-textBlockQuote-border: rgba(0, 122, 204, .5);--vscode-textCodeBlock-background: rgba(10, 10, 10, .4);--vscode-widget-shadow: rgba(0, 0, 0, .36);--vscode-input-background: #3c3c3c;--vscode-input-foreground: #cccccc;--vscode-inputOption-activeBorder: #007acc;--vscode-inputOption-hoverBackground: rgba(90, 93, 94, .5);--vscode-inputOption-activeBackground: rgba(0, 127, 212, .4);--vscode-inputOption-activeForeground: #ffffff;--vscode-input-placeholderForeground: #a6a6a6;--vscode-inputValidation-infoBackground: #063b49;--vscode-inputValidation-infoBorder: #007acc;--vscode-inputValidation-warningBackground: #352a05;--vscode-inputValidation-warningBorder: #b89500;--vscode-inputValidation-errorBackground: #5a1d1d;--vscode-inputValidation-errorBorder: #be1100;--vscode-dropdown-background: #3c3c3c;--vscode-dropdown-foreground: #f0f0f0;--vscode-dropdown-border: #3c3c3c;--vscode-checkbox-background: #3c3c3c;--vscode-checkbox-foreground: #f0f0f0;--vscode-checkbox-border: #3c3c3c;--vscode-button-foreground: #ffffff;--vscode-button-separator: rgba(255, 255, 255, .4);--vscode-button-background: #0e639c;--vscode-button-hoverBackground: #1177bb;--vscode-button-sec


ween.evaluate(
        //   AlwaysStoppedAnimation(animation),
        // ),
        child: Transform.scale(
          scale: 1 + (animation * 1.5),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisSize: MainAxisSize.min,
            children: [
              // -- Actual Time
              Text(
                time.timeInString,
                style: const TextStyle(
                  color: Colors.white,
                  fontSize: 32,
                ),
              ),
              const SizedBox(height: 4),

              // -- Time Count
              Row(
                mainAxisSize: MainAxisSize.min,
                children: List.generate(6, (index) {
                  if (index + 1 <= time.timeCount) {
                    return Container(
                      height: 6,
                      width: 10,
                      decoration: const BoxDecoration(
                        shape: BoxShape.circle,
                        color: Colors.white,
                      ),
                    );
                  } else {
                    return Container(
                      height: 6,
                      width: 10,
                      decoration: BoxDecoration(
                        shape: BoxShape.circle,
                        color: Colors.white.withOpacity(0.7),
                      ),
                    );
                  }
                }),
              )
            ],
          ),
        ),
      ),
    );
  }
}
import 'package:html/dom.dart';

import '_parser.dart';

class EpubCfiInterpreter {
  Element? searchLocalPathForHref(
      Element? htmlElement, CfiLocalPath localPathNode) {
    CfiStep nextStepNode;
    Element? currentElement = htmlElement;

    for (int stepNum = 1; stepNum < localPathNode.steps!.length; stepNum++) {
      nextStepNode = localPathNode.steps![stepNum];
      if (nextStepNode.type == 'indexStep') {
        currentElement = interpretIndexStepNode(nextStepNode, currentElement);
      } else if (nextStepNode.type == 'indirectionStep') {
        currentElement =
            interpretIndirectionStepNode(nextStepNode, currentElement);
      }
    }

    return currentElement;
  }

  Element? interpretIndexStepNode(
      CfiStep? indexStepNode, Element? currentElement) {
    if (indexStepNode == null || indexStepNode.type != 'indexStep') {
      throw Exception('$indexStepNode: expected index step node');
    }

    // Index step
    final stepTarget = _getNextNode(indexStepNode.stepLength, currentElement);

    if ((indexStepNode.idAssertion ?? '').isNotEmpty) {
      if (!_targetIdMatchesIdAssertion(
          stepTarget!, indexStepNode.idAssertion)) {
        throw Exception(
            '${indexStepNode.idAssertion}: ${stepTarget.attributes['id']} Id assertion failed');
      }
    }

    return stepTarget;
  }

  Element? interpretIndirectionStepNode(
      CfiStep? indirectionStepNode, Element? currentElement) {
    if (indirectionStepNode == null ||
        indirectionStepNode.type != 'indirectionStep') {
      throw Exception('$indirectionStepNode: expected indirection step node');
    }

    final stepTarget =
        _getNextNode(indirectionStepNode.stepLength, currentElement);

    if (indirectionStepNode.idAssertion != null) {
      if (!_targetIdMatchesIdAssertion(
          stepTarget!, indirectionStepNode.idAssertion)) {
        throw Exception(
            '${i


if vehicle.cp.driver and vehicle.cp.driver.isActive and vehicle.cp.driver:isActive() then return true end

	-- vehicle:getIsControlled() is needed as this one gets synchronized
	if vehicle and vehicle.getIsEntered and (vehicle:getIsEntered() or vehicle:getIsControlled()) then
		self:debugSparse('human player in nearby %s not driven


l)
        onUpdate();
    },
  );

  //===================
  // SHOW/EPISODE
  //===================

  defaultShowEpisodeMenu(Show s, ShowEpisode e, {List<Widget> options = const []}) {
    show([
      shareTile('episode', e.id),
      shareShow(s.id),
      downloadExternalEpisode(e),
      ...options
    ]);
  }

  Widget shareShow(String id) => ListTile(
    title: Text('Share show'.i18n),
    leading: Icon(Icons.share),
    onTap: () async {
      Share.share('https://deezer.com/show/$id');
    },
  );

  //Open direct download link in browser
  Widget downloadExternalEpisode(ShowEpisode e) => ListTile(
    title: Text('Download externally'.i18n),
    leading: Icon(Icons.file_download),
    onTap: () async {
      launch(e.url);
    },
  );

  //===================
  // OTHER
  //===================

  showDownloadStartedToast() {
    Fluttertoast.showToast(
      msg: 'Downloads added!'.i18n,
      gravity: ToastGravity.BOTTOM,
      toastLength: Toast.LENGTH_SHORT
    );
  }

  //Create playlist
  Future createPlaylist() async {
    await showDialog(
      context: context,
      builder: (BuildContext context) {
        return CreatePlaylistDialog();
      }
    );
  }

  Widget shareTile(String type, String id) => ListTile(
    title: Text('Share'.i18n),
    leading: Icon(Icons.share),
    onTap: () async {
      Share.share('https://deezer.com/$type/$id');
    },
  );

  Widget sleepTimer() => ListTile(
    title: Text('Sleep timer'.i18n),
    leading: Icon(Icons.access_time),
    onTap: () async {
      showDialog(
        context: context,
        builder: (context) {
          return SleepTimerDialog();
        }
      );
    },
  );

  Widget wakelock() => ListTile(
    title: Text('Keep the screen on'.i18n),
    leading: Icon(Icons.screen_lock_portrait),
    onTap: () async {
      _close();
      if (cache.wakelock == null)
        cache.wakelock = false;
      //Enable
      if (!cache.wakelock) {
        Wakelock.enable();
        Fluttertoast.showToast(
            msg: 'Wakelock enabled!'.i18n,
            gravity: ToastGravity.BOTTOM
        );
        cache.wakelock = true;
        return;
      }
      //Disable
      Wakelock.disable();
      Fluttertoast.showToast(
          msg: 'Wakelock disabled!'.i18n,
          gravity: ToastGravity.BOTTOM
      );
      cache.wakelock = false;
    },
  );

  void _close() => Navigator.of(context).pop();
}

class SleepTimerDialog extends StatefulWidget {
  @override
  _SleepTimerDialogState createState() => _SleepTimerDialogState();
}

class _SleepTimerDialogState extends State<SleepTimerDialog> {
  int hours = 0;
  int minutes = 30;

  String _endTime() {
    return '${cache.sleepTimerTime.hour.toString().padLeft(2, '0')}:${cache.sleepTimerTime.minute.toString().padLeft(2, '0')}';
  }

  @override
  Widget build(BuildContext context) {
    return AlertDialog(
      title: Text('Sleep timer'.i18n),
      content: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              Column(
                mainAxisSize: MainAxisSize.min


        "837JTC6L9", // Heco-Peg UNI Token
        "841BVC8F8", // 1INCH Token
        "847RPKNJK", // SUKU
        "84G8LN2SF", // THORChain
        "84GBB5KK6", // AFREUM PEN
        "85MP572L7", // Binance Beacon Chain
        "85PSZKCSZ", // FC Barcelona
        "861SQS0JW", // Wrapped BTC
        "86QL75JKD", // Aragon Network Token
        "87XRW9Q88", // Moss Carbon Credit
        "88MWNZ2WZ", // Loom Token
        "88RGZZLMX", // Wrapped MIR Token
        "88TQ3KNMK", // AFREUM SYP
        "898NNTPZJ", // USD Coin
        "89NNGP3K9", // Bonk
        "8B9F6JR10", // USD Coin
        "8BN6F2P0N", // Automata (PoS)
        "8CBTFHPRR", // PYR Token
        "8CLLFWW83", // Wrapped Solana
        "8CMH9Q7QM", // AFREUM LRD
        "8CW8V00F6", // Celsius on xDai
        "8D0FTFRJ7", // Binance
        "8DM439GVJ", // Ondo
        "8DPBWW9LN", // Golem Network Token
        "8DQ0VDB66", // SwarmX/Struct Perp TSLA Sr Unsec
        "8DSRQ9GZ3", // Cube Network
        "8FD96LKB5", // Open Campus
        "8FJT281D2", // Binance Coin
        "8FK68C14J", // Wrapped Ether
        "8FTTNJRPB", // Wrapped Ether
        "8H326R5DX", // Wrapped Flow
        "8HQHS4755", // GreenMetaverseToken
        "8HTL22Z8Q", // Smooth Love Potion
        "8JHVGRP3L", // MDX Token
        "8JLLSWB5P", // DAAG Certificat/Tracker Perp SQ Sub
        "8JTDJ95PK", // Kyber Network Crystal v2
        "8K1B669GJ", // Uniswap
        "8KH1M2RC0", // Frax
        "8KRXNKNK0", // BinaryX
        "8M8P2R03R", // Tether USD
        "8NBGRP39C", // Heco-Peg EOS Token
        "8NCX4LRVX", // Theta Network
        "8NPJ0FJQ2", // XVG ERC-20
        "8NV4HKD0F", // Tether USD on Fuse
        "8P11GW2VS", // Lido DAO Token
        "8P5XG698D", // NEST
        "8PM931M75", // ChainGPT
        "8QNZG8Z00", // AFREUM STABLE WST
        "8RLZB6XB1", // XANA
        "8RSTHL2TT", // IOTA
        "8RWBNLB84", // Frax
        "8RWJHTS9F", // USD Coin
        "8SBB81M2M", // ChainLink Token
        "8SMN09W3M", // Avalanche
        "8ST3W1LMJ", // Universal US Dollar
        "8TC2XSJ24", // Wrapped ICP
        "8TDXC9JTZ", // AFREUM STABLE SHP
        "8TV5N65XS", // Frontier
        "8VX5176BM", // AFREUM STABLE BGN
        "8WH8526LF", // Tether USD
        "8WLZGR6DN", // Sleepless AI Token
        "8WV98TJHC", // AFREUM STABLE AFN
        "8XJF67VBF", // Nebulas
        "8Z61T54VM", // Liquity
        "8Z8D


::sInstance);
    }
    else {
        setNerve(&NrvSuperSpinDriver::SuperSpinDriverNrvAppear::sInstance);
    }
}

void SuperSpinDriver::requestEmptyAppear() {
    MR::invalidateClipping(this);

    if (mSpinDriverCamera->isUseAppearCamera(this)) {
        MR::requestStartDemo(this, "出現", &NrvSuperSpinDriver::SuperSpinDriverNrvEmptyAppear::sInstance, &NrvSuperSpinDriver::SuperSpinDriverNrvTryDemo::sInstance);
    }
    else {
        setNerve(&NrvSuperSpinDriver::SuperSpinDriverNrvEmptyAppear::sInstance);
    }
}

void SuperSpinDriver::requestActive() {
    if (isNerve(&NrvSuperSpinDriver::SuperSpinDriverNrvNonActive::sInstance)) {
        requestAppear();
    }
    else if (isNerve(&NrvSuperSpinDriver::SuperSpinDriverNrvEmptyNonActive::sInstance)) {
        requestEmptyAppear();
    }
}

void SuperSpinDriver::requestHide() {
    if (!MR::isDead(this)) {
        if (_8C != nullptr) {
            endBind();
        }

        makeActorDead();
    }
}

void SuperSpinDriver::requestShow() {
    if (MR::isDead(this)) {
        makeActorAppeared();
    }
}

void SuperSpinDriver::exeEmptyNonActive() {
    if (MR::isFirstStep(this)) {
        MR::validateClipping(this);
    }

    if (isRightToUse()) {
        onUse();
        setNerve(&NrvSuperSpinDriver::SuperSpinDriverNrvNonActive::sInstance);
    }
}

void SuperSpinDriver::exeEmptyAppear() {
    if (MR::isFirstStep(this)) {
        mSpinDriverCamera->startAppearCamera(this, _100, _E8, mPosition);

        if (!_17F) {
            MR::startSystemSE("SE_SY_SPIN_DRIVER_APPEAR", -1, -1);
            MR::startSound(this, "SE_OJ_S_SPIN_DRV_APPEAR", -1, -1);
        }
    }

    if (MR::isBckStopped(this)) {
        s32 frames = mSpinDriverCamera->getAppearCameraFrames();

        if (MR::isGreaterStep(this, frames)) {
            setNerve(&NrvSuperSpinDriver::SuperSpinDriverNrvEmptyWait::sInstance);

            if (mSpinDriverCamera->isUseAppearCamera(this)) {
                mSpinDriverCamera->endAppearCamera(this);
                MR::endDemoWaitCameraInterpolating(this, "出現");
            }
        }
    }
}

void SuperSpinDriver::exeEmptyWait() {
    if (MR::isFirstStep(this)) {
        MR::validateClipping(this);
    }

    if (isRightToUse()) {
        onUse();
        setNerve(&NrvSuperSpinDriver::SuperSpinDriverNrvWait::sInstance);
    }
}

void SuperSpinDriver::exeNonActive() {
    if (MR::isFirstStep(this)) {
        MR::startBck(this, "NonActive", nullptr);
        MR::validateClipping(this);
    }

    addSwingSignRotateY();
}

void SuperSpinDriver::exeAppear() {
    if (MR::isFirstStep(this)) {
        mSpinDriverCamera->startAppearCamera(this, _100, _E8, mPosition);

        if (!_17F) {
            MR::startSystemSE("SE_SY_SPIN_DRIVER_APPEAR", -1, -1);
            MR::startSound(this, "SE_OJ_S_SPIN_DRV_APPEAR", -1, -1);
        }

        MR::startBck(this, "Appear", nullptr);
        _144 = 0.0f;
    }

    if (MR::isBckStopped(this)) {
        s32 frames = mSpinDriverCamera->getAppearCameraFrames();

        if (MR::isGreat


# 模板

索引模板: 就是把已经创建好的某个索引的参数设置(settings)和索引映射(mapping)保存下来作为模板, 在创建新索引时, 指定要使用的模板名, 就可以直接重用已经定义好的模板中的设置和映射.

我们需要在创建索引之前, 先创建好模板.

```
PUT _template/article_template
{
    "order": 0,
    "template": "article_*",
    "mappings": {
        "_doc": {
            "dynamic": false,
            "properties": {
                "title": {
                    "type": "text"
                },
                "author": {
                    "type": "keyword"
                },
                "content": {
                    "type": "text",
                    "analyzer": "ik_max_word"
                },
                "read_count": {
                    "type": "long"
                },
                "create_at": {
                    "type": "text"
                }
            }
        }
    },
    "aliases": {}
}

```

上面的`"template": "article_*"`字段就规定了, 之后创建的所有以`article_`开头的索引, 都会使用`article_template`中的`mappings`配置.
# es选主策略[选举 5.x]

参考文章

1. [Zen Discovery](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/modules-discovery-zen.html)
    - 官方文档
    - `discovery.zen.ping_timeout`默认为`3s`,
2. [discovery.zen.ping_timeout 参数作用的疑惑和探究](https://elasticsearch.cn/question/4199)
    - `discovery.zen.ping_timeout`参数配置越大，选主的过程越长
    - 答主 kennywu76 非常给力👍🏻
3. [ES 的 Master 节点的选举流程源码分析](https://www.bowlbear.com/1506)

- ES版本: 5.5.0
- 集群规格: master * 3 + data * 3

## 1. 第1个含义-节点探测超时时间

按照参考文章1的说法, 在ping操作(节点发现机制, 即discovery)过程中, 会将配置好的master节点加入集群, 同时也会完成主master的选举. 这是一个后台且不断持续的行为, 保证master节点异常脱离后(比如重启, 断网), 还可以再加回来.

但有些master节点可能因为网络拥堵(或单纯就是网速慢)导致响应时间过长, 探测失败, 无法加入集群, 那么就需要调整一下这个超时时间配置`discovery.zen.ping_timeout`.

这个解释其实很好理解, 但是实际上在


        }

        impl $crate::export::Hash for $ident {
            fn hash<__H: $crate::export::Hasher>(&self, _state: &mut __H) {}
        }
    };
}

// Not public API.
#[cfg(not(feature = "extra-traits"))]
#[doc(hidden)]
#[macro_export]
macro_rules! impl_extra_traits_for_custom_punctuation {
    ($ident:ident, $($tt:tt)+) => {};
}

// Not public API.
#[doc(hidden)]
#[macro_export(local_inner_macros)]
macro_rules! custom_punctuation_repr {
    ($($tt:tt)+) => {
        [$crate::export::Span; 0 $(+ custom_punctuation_len!(lenient, $tt))+]
    };
}

// Not public API.
#[doc(hidden)]
#[macro_export(local_inner_macros)]
#[rustfmt::skip]
macro_rules! custom_punctuation_len {
    ($mode:ident, +)     => { 1 };
    ($mode:ident, +=)    => { 2 };
    ($mode:ident, &)     => { 1 };
    ($mode:ident, &&)    => { 2 };
    ($mode:ident, &=)    => { 2 };
    ($mode:ident, @)     => { 1 };
    ($mode:ident, !)     => { 1 };
    ($mode:ident, ^)     => { 1 };
    ($mode:ident, ^=)    => { 2 };
    ($mode:ident, :)     => { 1 };
    ($mode:ident, ::)    => { 2 };
    ($mode:ident, ,)     => { 1 };
    ($mode:ident, /)     => { 1 };
    ($mode:ident, /=)    => { 2 };
    ($mode:ident, .)     => { 1 };
    ($mode:ident, ..)    => { 2 };
    ($mode:ident, ...)   => { 3 };
    ($mode:ident, ..=)   => { 3 };
    ($mode:ident, =)     => { 1 };
    ($mode:ident, ==)    => { 2 };
    ($mode:ident, >=)    => { 2 };
    ($mode:ident, >)     => { 1 };
    ($mode:ident, <=)    => { 2 };
    ($mode:ident, <)     => { 1 };
    ($mode:ident, *=)    => { 2 };
    ($mode:ident, !=)    => { 2 };
    ($mode:ident, |)     => { 1 };
    ($mode:ident, |=)    => { 2 };
    ($mode:ident, ||)    => { 2 };
    ($mode:ident, #)     => { 1 };
    ($mode:ident, ?)     => { 1 };
    ($mode:ident, ->)    => { 2 };
    ($mode:ident, <-)    => { 2 };
    ($mode:ident, %)     => { 1 };
    ($mode:ident, %=)    => { 2 };
    ($mode:ident, =>)    => { 2 };
    ($mode:ident, ;)     => { 1 };
    ($mode:ident, <<)    => { 2 };
    ($mode:ident, <<=)   => { 3 };
    ($mode:ident, >>)    => { 2 };
    ($mode:ident, >>=)   => { 3 };
    ($mode:ident, *)     => { 1 };
    ($mode:ident, -)     => { 1 };
    ($mode:ident, -=)    => { 2 };
    ($mode:ident, ~)     => { 1 };
    (lenient, $tt:tt)    => { 0 };
    (strict, $tt:tt)     => {{ custom_punctuation_unexpected!($tt); 0 }};
}

// Not public API.
#[doc(hidden)]
#[macro_export]
macro_rules! custom_punctuation_unexpected {
    () => {};
}

// Not public API.
#[doc(hidden)]
#[macro_export]
macro_rules! stringify_punct {
    ($($tt:tt)+) => {
        concat!($(stringify!($tt)),+)
    };
}

// Not public API.
// Without this, local_inner_macros breaks when looking for concat!
#


url('fonts/opensans-extrabold-webfont.svg#OpenSans') format('svg');
}

/* =4 Tinymce
---------------------------------------------------------------------------------------------------------------------*/
body div.mce-fullscreen {
	top: 40px;
	z-index: 99999;
}

body.in-dialog div.mce-fullscreen {
	top: 0;
}

body .mce-panel {
	background: #F6F6F6;
	border-color: #BABABA;
}

body .mce-path {
	line-height: 1;
	padding: 4px;
}

body .mce-path-item {
	font-size: 12px;
	line-height: 1;
}

body .mce-btn-group {
	border-left: 1px solid #DDD;
	margin-left: 4px;
	padding-left: 4px;
}

	body .mce-btn-group.mce-first {
		border: none;
		padding-left: 0;
	}

.mce-btn button {
	min-width: 0;
}

body .mce-btn {
	background: none;
	border: none;
	-moz-border-radius: 0;
	-webkit-border-radius: 0;
	border-radius: 0;
	-moz-box-shadow: none;
	-webkit-box-shadow: none;
	box-shadow: none;
}

body .mce-btn-group .mce-btn.mce-disabled,
body .mce-btn-group .mce-btn.mce-disabled:hover {
	background: none;
	-moz-box-shadow: none;
	-webkit-box-shadow: none;
	box-shadow: none;
}

	body .mce-btn-group .mce-btn.mce-disabled button {
		cursor: not-allowed;
	}

body .mce-btn-group .mce-first,
body .mce-btn-group .mce-last {
	border: none;
	-moz-border-radius: 0;
	-webkit-border-radius: 0;
	border-radius: 0;
}

body .mce-btn:hover,
body .mce-btn:focus,
body .mce-btn-group .mce-btn:hover,
body .mce-btn-group .mce-btn:focus {
	background: #D5E1F2;
}

body .mce-btn-group .mce-splitbtn:hover,
body .mce-btn-group .mce-splitbtn:focus {
	background: none;
}

body .mce-splitbtn button {
	border: 1px solid transparent;
	padding: 2px 3px 2px 4px;
}

body .mce-splitbtn .mce-open {
	border: 1px solid transparent;
	padding: 2px 2px 3px;
}

body .mce-splitbtn button:hover {
	background: #D5E1F2;
}

body .mce-splitbtn:hover button,
body .mce-splitbtn:hover .mce-open {
	border-color: #D5E1F2;
}

body .mce-btn.mce-active,
body .mce-btn.mce-active:hover,
body .mce-btn:active,
body .mce-btn-group .mce-btn.mce-active,
body .mce-btn-group .mce-btn.mce-active:hover,
body .mce-btn-group .mce-btn:active {
	background: #C2D5F2;
	border-color: #C2D5F2;
	-moz-box-shadow: none;
	-webkit-box-shadow: none;
	box-shadow: none;
}

body .mce-splitbtn .mce-open.mce-active {
	background: #C2D5F2;
	-moz-box-shadow: none;
	-webkit-box-shadow: none;
	box-shadow: none;
}

body .mce-menu {
	-moz-border-radius: 0;
	-webkit-border-radius: 0;
	border-radius: 0


件就稍显有些麻烦了。对于熟悉 Linux 的朋友来说当然其实无所谓，但对于 Linux 新手而言，这是一个比较麻烦的操作。

传输文件这么麻烦，要是可以像在本地磁盘之间传输文件就好了，诶，你还真别说，还真有个神器可以实现这个操作！

<!-- more -->

## 一、引言

### 1.1 前因后果

通过下面的文章，你将得到像下面的效果图：

![Rclone 挂载目录到本地](./1.png)

/// figure-caption

Rclone 挂载目录到本地

///

图示中 ALCloud 是阿里云 Windows 服务器，JDCloud 是京东云 Linux 服务器（Ubuntu），Lenovo 是我另外一台 Windows 联想笔记本，Xiaomi 是我的小米手机……就问你酷不酷吧？

Xiaomi 我没搞 root 权限，所有很多东西无法访问，但也能凑合用。

前两个，是挂载的广域网中的云服务器，后面两个是局域网中的设备。不过此处的手机挂载方式不在此处详述，因为涉及到另外一个神器 Termux，将在后续文章中讲述。

### 1.2 操作需求

完成后续的操作，你将需要：

- 带有 Windows 操作系统的电脑；（理论上，其他操作系统也可以这样干，操作都差不多）
- 广域网挂载：云服务器（平台不限）；
- 局域网挂载：没有啥特殊要求；

## 二、挂载工具

### 2.1 挂载工具是什么

挂载工具一般是一个比较小的程序，可以实现将各类互联网的“类磁盘资源”作为“本地磁盘”挂载到本地，基本功能效果和本地磁盘一样，比如文件的移动、复制、粘贴、剪切和重命名等等，理论上，只要你的网速和服务器的网速足够快，使用起来就和本地磁盘没有任何区别！

### 2.2 挂载磁盘和网盘的区别

显而易见，网盘少有能够自动同步文件的功能，而且大多限速，挂载磁盘没有程序上的限速，限制的只有网速，而且它会几乎实时地对你的操作进行同步。你对挂载磁盘干了什么，对应的网络磁盘也会进行修改，不就相当于自动同步了吗？而且，挂载磁盘不需要额外再启动一个什么网盘客户端，启动脚本直接使用！

### 2.3 挂载工具有哪些

挂载工具有很多，但正因为其功能强大，大多数收费，比如知名的 RaiDrive 等，而且大多数都只对国外的网盘服务有完全的支持，对国内的只有部分支持（想完全支持就要收费）。国内的也有，比如 CloudDrive 等。国内也有一些免费的工具，但网上的风评都感觉不太好，什么底层会疯狂擦写磁盘来实现对应功能，导致影响磁盘寿命等等。还有一些不开源的工具，要注册账号啥的，感觉不太安全。因此，这里我选择开发时间相对较早，技术比较成熟，完全免费，完全开源的挂载工具神器 Rclone！

## 三、Rclone

### 3


It("can be cancelled and rolls back to the previous app", func() {
			By("Pushing a rolling deployment")
			Expect(cf.Cf("push", appName, "--strategy", "rolling", "--no-wait", "-b", Config.GetStaticFileBuildpackName(), "-p", assets.NewAssets().Staticfile).Wait(Config.CfPushTimeoutDuration())).To(Exit(0))

			Eventually(func(g Gomega) {
				session := cf.Cf("app", appName).Wait()
				g.Expect(session).Should(Say("Active deployment with status DEPLOYING"))
				g.Expect(session).Should(Say(`strategy:\s+rolling`))
				g.Expect(session).Should(Exit(0))
			}).Should(Succeed())

			By("Cancelling the deployment")
			Expect(cf.Cf("cancel-deployment", appName).Wait(Config.CfPushTimeoutDuration())).To(Exit(0))

			By("Verifying the cancel succeeded and we rolled back to old process")
			Eventually(func(g Gomega) {
				session := cf.Cf("app", appName).Wait()
				g.Expect(session).ShouldNot(Say("Active deployment"))
				g.Expect(session).Should(Exit(0))
			}).Should(Succeed())

			checkAppCurlResponse(appName, "Hi, I'm Dora", numberOfAppCurlChecks)
		})

		Context("max-in-flight", func() {
			It("deploys an app with max_in_flight with a rolling deployment", func() {
				By("Pushing a new rolling deployment with max in flight of 2")
				Expect(cf.Cf("push", appName, "--strategy", "rolling", "--max-in-flight", "2", "--no-wait", "-b", Config.GetStaticFileBuildpackName(), "-p", assets.NewAssets().Staticfile).Wait(Config.CfPushTimeoutDuration())).To(Exit(0))

				Eventually(func(g Gomega) {
					session := cf.Cf("app", appName).Wait()
					g.Expect(session).Should(Say("Active deployment with status DEPLOYING"))
					g.Expect(session).Should(Say(`strategy:\s+rolling`))
					g.Expect(session).Should(Say(`max-in-flight:\s+2`))
				}).Should(Succeed())

				By("Verifying the new app has rolled out to all instances")
				Eventually(func(g Gomega) {
					session := cf.Cf("app", appName).Wait()
					g.Expect(session).ShouldNot(Say("Active deployment"))
				}).Should(Succeed())

				checkAppCurlResponse(appName, "Hello from a staticfile", numberOfAppCurlChecks)
			})
		})
	})

	Describe("Canary deployments", func() {
		BeforeEach(func() {
			stopCheckingAppAlive, appCheckerIsDone = checkAppRemainsAlive(appName)
		})

		AfterEach(func() {
			stopCheckingAppAlive <- true
			<-appCheckerIsDone
		})

		It("deploys an app, transitions to pause, is continued and then deploys successfully", func() {
			By("Pushing a canary deployment")
			Expect(cf.Cf("push", appName, "--strategy", "canary", "--no-wait", "-b", Config.GetStaticFileBuildpackName(), "-p", assets.NewAssets().Staticfile).Wait(Config.CfPushTimeoutDuration())).To(Exit(0))

			Eventually(func(g Gomega) {
				session := cf.Cf("app", appName).Wait()
				g.Expect(session).Should(Say("Active deployment with status PAUSED"))
				g.Expect(session).Should(Say("strategy:        canary"))
			}).Should(Succeed())

			By("Checking that both the canary and original


/ converts tile coordinates to key for the tile cache
	_tileCoordsToKey: function (coords) {
		return coords.x + ':' + coords.y + ':' + coords.z;
	},

	// converts tile cache key to coordinates
	_keyToTileCoords: function (key) {
		var k = key.split(':'),
		    coords = new L.Point(+k[0], +k[1]);
		coords.z = +k[2];
		return coords;
	},

	_removeTile: function (key) {
		var tile = this._tiles[key];
		if (!tile) { return; }

		L.DomUtil.remove(tile.el);

		delete this._tiles[key];

		// @event tileunload: TileEvent
		// Fired when a tile is removed (e.g. when a tile goes off the screen).
		this.fire('tileunload', {
			tile: tile.el,
			coords: this._keyToTileCoords(key)
		});
	},

	_initTile: function (tile) {
		L.DomUtil.addClass(tile, 'leaflet-tile');

		var tileSize = this.getTileSize();
		tile.style.width = tileSize.x + 'px';
		tile.style.height = tileSize.y + 'px';

		tile.onselectstart = L.Util.falseFn;
		tile.onmousemove = L.Util.falseFn;

		// update opacity on tiles in IE7-8 because of filter inheritance problems
		if (L.Browser.ielt9 && this.options.opacity < 1) {
			L.DomUtil.setOpacity(tile, this.options.opacity);
		}

		// without this hack, tiles disappear after zoom on Chrome for Android
		// https://github.com/Leaflet/Leaflet/issues/2078
		if (L.Browser.android && !L.Browser.android23) {
			tile.style.WebkitBackfaceVisibility = 'hidden';
		}
	},

	_addTile: function (coords, container) {
		var tilePos = this._getTilePos(coords),
		    key = this._tileCoordsToKey(coords);

		var tile = this.createTile(this._wrapCoords(coords), L.bind(this._tileReady, this, coords));

		this._initTile(tile);

		// if createTile is defined with a second argument ("done" callback),
		// we know that tile is async and will be ready later; otherwise
		if (this.createTile.length < 2) {
			// mark tile as ready, but delay one frame for opacity animation to happen
			L.Util.requestAnimFrame(L.bind(this._tileReady, this, coords, null, tile));
		}

		L.DomUtil.setPosition(tile, tilePos);

		// save tile in cache
		this._tiles[key] = {
			el: tile,
			coords: coords,
			current: true
		};

		container.appendChild(tile);
		// @event tileloadstart: TileEvent
		// Fired when a tile is requested and starts loading.
		this.fire('tileloadstart', {
			tile: tile,
			coords: coords
		});
	},

	_tileReady: function (coords, err, tile) {
		if (!this._map) { return; }

		if (err) {
			// @event tileerror: TileErrorEvent
			// Fired when there is an error loading a tile.
			this.fire('tileerror', {
				error: err,
				tile: tile,
				coords: coords
			});
		}

		var key = this._tileCoordsToKey(coords);

		tile = this._tiles[key];
		if (!tile) { return; }

		tile.loaded = +new Date();
		if (this._map._fadeAnimated) {
			L.DomUtil.setOpacity(tile.el, 0);
			L.Util.cancelAnimFrame(this._fadeFrame);
			this._fadeFrame = L.Util.requestAnimFrame(this._updateOpacity, this);
		} else {
			tile.active = true


E OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.tencent.devops.repository.service.oauth2

import com.tencent.devops.common.api.enums.ScmType
import com.tencent.devops.common.api.util.timestampmilli
import com.tencent.devops.common.security.util.BkCryptoUtil
import com.tencent.devops.repository.dao.TGitTokenDao
import com.tencent.devops.repository.pojo.oauth.GitToken
import com.tencent.devops.repository.pojo.oauth.OauthTokenInfo
import org.jooq.DSLContext
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Service

/**
 * 内部工蜂oauth存储管理
 */
@Service
class CodeTGitOauth2TokenStoreService @Autowired constructor(
    private val dslContext: DSLContext,
    private val tGitTokenDao: TGitTokenDao
) : IOauth2TokenStoreService {

    @Value("\${aes.git:#{null}}")
    private val aesKey: String = ""

    // 兼容历史数据,直接用scmType的值代替scmCode
    override fun support(scmCode: String): Boolean {
        return scmCode == ScmType.CODE_TGIT.name
    }

    override fun get(userId: String, scmCode: String): OauthTokenInfo? {
        return tGitTokenDao.getAccessToken(dslContext, userId)?.let {
            OauthTokenInfo(
                accessToken = BkCryptoUtil.decryptSm4OrAes(aesKey, it.accessToken),
                tokenType = it.tokenType,
                expiresIn = it.expiresIn,
                refreshToken = BkCryptoUtil.decryptSm4OrAes(aesKey, it.refreshToken),
                createTime = it.createTime.timestampmilli(),
                userId = it.oauthUserId,
                operator = userId,
                updateTime = it.createTime.timestampmilli()
            )
        }
    }

    override fun store(scmCode: String, oauthTokenInfo: OauthTokenInfo) {
        with(oauthTokenInfo) {
            val gitToken = GitToken(
                accessToken = BkCryptoUtil.encryptSm4ButAes(aesKey, accessToken),
                refreshToken = refreshToken?.let { BkCryptoUtil.encryptSm4ButAes(aesKey, it) } ?: "",
                tokenType = tokenType,
                expiresIn = expiresIn ?: 0L,
                operator = operator,
                oauthUserId = userId
            )
            tGitTokenDao.saveAccessToken(
                dslContext,
                userId = operator ?: userId,
                oauthUserId = userId,
                token = gitToken
            )
        }
    }

    override fun delete(userId: String, scmCode: String, username: String) {
        tGitTokenDao.deleteToken(dslContext = dslContext, userId = username)
    }

    override fun list(userId: String, scmCode: String): List<OauthTokenInfo> = listOf()
}
/*
 * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
 *
 * Copyright (C) 2019 Tencent.  All rights reserved.
 *
 * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
 *
 * A copy of the MIT License is included in this file.
 *
 *
 * Terms of the MIT License:
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 * LIMITED TO THE


VE_aggregate_member.
AC_CHECK_MEMBERS([struct stat.st_rdev, struct stat.st_blksize])
5.8 类型

下面的宏检查c类型。

特定类型检查：下面的宏检查 sys/types.h, stdlib.h, stdint.h, inttypes.h 中得c类型。
Gnulib 的 stdint 模块定义了更好的办法。如果使用C99，建议使用 stdint。

AC_TYPE_GETGROUPS

AC_TYPE_INT8_T: 如果 stdint.h 或者 inttypes.h 没有定义 int8_t, 则定义 int8_t 。
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INTMAX_T: 检查 inttypes.h 是否定义了类型 intmax_t 并定义 HAVE_INTMAX_T
AC_TYPE_INTPTR_T: intptr_t 和 HAVE_INTPTR_T
AC_TYPE_LONG_DOUBLE
AC_TYPE_LONG_DOUBLE_WIDER
AC_TYPE_LONG_LONG_INT
AC_TYPE_MBSTATE_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UID_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINTMAX_T
AC_TYPE_UINTPTR_T
AC_TYPE_UNSIGED_LONG_LONG_INT

通用类型检查

AC_CHECK_TYPE(type, [action-if-found], [action-if-not-found], [includs='AC_INCLUDES_DEFAULT'])
检查type是否定义了。结果保存在 ac_cv_type_type 变量中。

AC_CHECK_TYPES(types, [action-if-found], [action-if-not-found], [includes='AC_INCLUDES_DEFAULT'])
对每个定义的types 类型，定义宏 HAVE_type.
AC_CHECK_TYPES([unisgned long long int, uintmax_t])
5.9 编译器和预处理器

编译器测试宏 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77) 根据编译器的输出定义输出变量 EXEEXT， OBJEXT 等。

AC_CHECK_SIZEOF
AC_CHECK_ALIGNOFF
AC_COMPUTE_INT
AC_LANG_WERROR
AC_OPENNMP
c 编译器特性检查

AC_PROG_CC([compiler-search-list])
确定使用哪个 c 编译器, 如果 CC 没有设置，则检查 gcc 和 cc，然后是其他编译器。设置输出变量 CC 为找到的编译器。
AC_PROG_CC([gcc cl cc])

AC_PROG_CC_C_O
AC_PROG_CC_STDC
AC_PROG_CC_C89
AC_PROG_CC_C99
AC_C_BACKSLASH_A
AC_C_BIGENDIAN
AC_C_CONST
AC_C_RESTRICT
AC_C_VOLATILE
AC_C_INLINE
AC_C_CHAR_UNSIGNED
AC_C_STRINGIZE
AC_C_FLEXIBLE_ARRAY_MEMBER
AC_C_VARARRAYS
AC_C_TYPEOF
AC_C_PROTOTYPES
AC_PROG_GCC_TRADITONAL
Go 编译器特性

AC_PROG_GO
AC_PATH_X
AC_PATH_XTRA
6. 实现 Autoconf 测试

若已有的特性测试满足不了要求，则可以自定义测试宏。

6.1 语言选�


ǎn"; /* 㼂 */
dict[0x3f06] = "yíng"; /* 㼆 */
dict[0x3f07] = "qióng"; /* 㼇 */
dict[0x3f08] = "luó"; /* 㼈 */
dict[0x3f09] = "yìn,zhèn"; /* 㼉 */
dict[0x3f0a] = "tún"; /* 㼊 */
dict[0x3f0b] = "gǔ,jiǔ,móu,rǔ"; /* 㼋 */
dict[0x3f0c] = "yǔ"; /* 㼌 */
dict[0x3f0d] = "lěi"; /* 㼍 */
dict[0x3f0e] = "bèi,bó,kě"; /* 㼎 */
dict[0x3f0f] = "něi"; /* 㼏 */
dict[0x3f10] = "pián"; /* 㼐 */
dict[0x3f11] = "liàn,luán"; /* 㼑 */
dict[0x3f12] = "qiǔ,tǎng"; /* 㼒 */
dict[0x3f13] = "lián,liǎn"; /* 㼓 */
dict[0x3f16] = "lì"; /* 㼖 */
dict[0x3f17] = "dǐng,tíng"; /* 㼗 */
dict[0x3f18] = "wǎ"; /* 㼘 */
dict[0x3f19] = "zhòu"; /* 㼙 */
dict[0x3f1b] = "xíng"; /* 㼛 */
dict[0x3f1c] = "àng,póu"; /* 㼜 */
dict[0x3f1d] = "fàn,wǎn"; /* 㼝 */
dict[0x3f1e] = "pèng"; /* 㼞 */
dict[0x3f1f] = "bái"; /* 㼟 */
dict[0x3f20] = "tuó"; /* 㼠 */
dict[0x3f22] = "ě,yí"; /* 㼢 */
dict[0x3f23] = "bǎi,bó"; /* 㼣 */
dict[0x3f24] = "qì,qiè,yà"; /* 㼤 */
dict[0x3f25] = "chú,kǎo,tǒu"; /* 㼥 */
dict[0x3f26] = "gǒng"; /* 㼦 */
dict[0x3f27] = "tóng"; /* 㼧 */
dict[0x3f28] = "hán"; /* 㼨 */
dict[0x3f29] = "chéng"; /* 㼩 */
dict[0x3f2a] = "jiá"; /* 㼪 */
dict[0x3f2b] = "huàn"; /* 㼫 */
dict[0x3f2c] = "xìng"; /* 㼬 */
dict[0x3f2d] = "diàn,niǎo"; /* 㼭 */
dict[0x3f2e] = "chāi,qì"; /* 㼮 */
dict[0x3f2f] = "dòng"; /* 㼯 */
dict[0x3f30] = "é,pí"; /* 㼰 */
dict[0x3f31] = "ruǎn"; /* 㼱 */
dict[0x3f32] = "liè"; /* 㼲 */
dict[0x3f33] = "shěng"; /* 㼳 */
dict[0x3f34] = "ǒu"; /* 㼴 */
dict[0x3f35] = "dì"; /*


		savedMonitor := savedMap[name]

		// Check if all key properties match for this monitor
		if currentMonitor.PxW != savedMonitor.PxW ||
			currentMonitor.PxH != savedMonitor.PxH ||
			currentMonitor.X != savedMonitor.X ||
			currentMonitor.Y != savedMonitor.Y ||
			currentMonitor.Active != savedMonitor.Active {
			return false // If any monitor doesn't match, configurations are different
		}
	}

	return true // All monitors match
}

// getCurrentActiveProfile returns the name of the currently active profile by comparing
// the current monitor configuration with all saved profiles
func getCurrentActiveProfile() (string, error) {
	// Get current monitor configuration
	currentMonitors, err := readMonitors()
	if err != nil {
		return "", fmt.Errorf("failed to read current monitors: %w", err)
	}

	// Get list of all profiles
	profiles, err := listProfiles()
	if err != nil {
		return "", fmt.Errorf("failed to list profiles: %w", err)
	}

	// Compare current configuration with each profile
	for _, profileName := range profiles {
		profile, err := loadProfile(profileName)
		if err != nil {
			continue // Skip profiles that can't be loaded
		}

		if compareMonitorConfigurations(currentMonitors, profile.Monitors) {
			return profileName, nil
		}
	}

	return "", nil // No matching profile found
}

type profileMenuModel struct {
	profiles        []string
	selected        int
	err             error
	confirmDelete   bool
	deleteCandidate string
	renaming        bool
	renameCandidate string
	renameInput     string
	renameCursor    int
	profileOrder    []string // Keep track of custom order
	showHelp        bool
	launchFullUI    bool // Flag to indicate launching full UI
	termWidth       int  // Terminal width for responsive layout
	termHeight      int  // Terminal height
}

func initialProfileMenu() (profileMenuModel, error) {
	profiles, err := listProfiles()
	if err != nil {
		return profileMenuModel{err: err}, nil
	}

	// Load saved order
	savedOrder, _ := loadProfileOrder()

	// Apply saved order if it exists
	if len(savedOrder) > 0 {
		orderedProfiles := []string{}
		remainingProfiles := make(map[string]bool)

		// Mark all profiles as remaining
		for _, p := range profiles {
			remainingProfiles[p] = true
		}

		// Add profiles in saved order
		for _, name := range savedOrder {
			if remainingProfiles[name] {
				orderedProfiles = append(orderedProfiles, name)
				delete(remainingProfiles, name)
			}
		}

		// Add any new profiles not in saved order
		for _, p := range profiles {
			if remainingProfiles[p] {
				orderedProfiles = append(orderedProfiles, p)
			}
		}

		profiles = orderedProfiles
	}

	// Store the profile order (without UI elements)
	profileOrder := make([]string, len(profiles))
	copy(profileOrder, profiles)

	// Add options at the end
	profiles = append(profiles, "──────────────────")
	profiles = append(profiles, "[ Open Full UI ]")

	// Try to get terminal size
	width, height, err := term.GetSize(int(os.Stdout.Fd()))
	if err != nil {
		// Fall back to defaults if we can't get terminal size
		width = 80
		height = 24
	}

	return profileMenuModel{
		profiles:     profiles,
		selected:     0,
		profileOrder: profileOrder,
		termWidth:    width,
		termHeight:   height,
	}, nil
}

func


t *testing.T) {
	t.Run("success", func(t *testing.T) {
		cluster := &redshifttypes.Cluster{
			ClusterIdentifier:   aws.String("mycluster"),
			ClusterNamespaceArn: aws.String("arn:aws:redshift:us-east-1:123456789012:namespace:u-u-i-d"),
			Endpoint: &redshifttypes.Endpoint{
				Address: aws.String("localhost"),
				Port:    aws.Int32(5439),
			},
			Tags: []redshifttypes.Tag{
				{
					Key:   aws.String("key"),
					Value: aws.String("val"),
				},
				{
					Key:   aws.String("elasticbeanstalk:environment-id"),
					Value: aws.String("id"),
				},
			},
		}
		expected, err := types.NewDatabaseV3(types.Metadata{
			Name:        "mycluster",
			Description: "Redshift cluster in us-east-1",
			Labels: map[string]string{
				types.DiscoveryLabelAccountID:     "123456789012",
				types.CloudLabel:                  types.CloudAWS,
				types.DiscoveryLabelRegion:        "us-east-1",
				"key":                             "val",
				"elasticbeanstalk:environment-id": "id",
			},
		}, types.DatabaseSpecV3{
			Protocol: defaults.ProtocolPostgres,
			URI:      "localhost:5439",
			AWS: types.AWS{
				AccountID: "123456789012",
				Region:    "us-east-1",
				Redshift: types.Redshift{
					ClusterID: "mycluster",
				},
			},
		})

		require.NoError(t, err)

		actual, err := NewDatabaseFromRedshiftCluster(cluster)
		require.NoError(t, err)
		require.Empty(t, cmp.Diff(expected, actual))
	})

	for _, overrideLabel := range types.AWSDatabaseNameOverrideLabels {
		t.Run("success with name override via"+overrideLabel, func(t *testing.T) {
			cluster := &redshifttypes.Cluster{
				ClusterIdentifier:   aws.String("mycluster"),
				ClusterNamespaceArn: aws.String("arn:aws:redshift:us-east-1:123456789012:namespace:u-u-i-d"),
				Endpoint: &redshifttypes.Endpoint{
					Address: aws.String("localhost"),
					Port:    aws.Int32(5439),
				},
				Tags: []redshifttypes.Tag{
					{
						Key:   aws.String("key"),
						Value: aws.String("val"),
					},
					{
						Key:   aws.String("elasticbeanstalk:environment-id"),
						Value: aws.String("id"),
					},
					{
						Key:   aws.String(overrideLabel),
						Value: aws.String("mycluster-override-2"),
					},
				},
			}
			expected, err := types.NewDatabaseV3(types.Metadata{
				Name:        "mycluster-override-2",
				Description: "Redshift cluster in us-east-1",
				Labels: map[string]string{
					types.DiscoveryLabelAccountID:     "123456789012",
					types.CloudLabel:                  types.CloudAWS,
					types.DiscoveryLabelRegion:        "us-east-1",
					overrideLabel:                     "mycluster-override-2",
					"key":                             "val",
					"elasticbeanstalk:environment-id": "id",
				},
			}, types.DatabaseSpecV3{
				Protocol: defaults.ProtocolPostgres,
				URI:      "localhost:5439",
				AWS: types.AWS{
					AccountID: "123456789012",
					Region:    "us-east-1",
					Redshift: types.Redshift{
						ClusterID: "mycluster",
					},
				},
			})

			require.NoError(t, err)

			actual, err := NewDatabaseFromRedshiftCluster(cluster)
			require.NoError(t, err)
			require.Empty(t, cmp.Diff(expected, actual


�인가요? 이러한 기능이 왜 필요할까요? CORS는 어떻게 구현될까요?

## Quest
* 이번 퀘스트는 Midterm에 해당하는 과제입니다. 분량이 제법 많으니 한 번 기능별로 세부 일정을 정해 보고, 과제 완수 후에 그 일정이 얼마나 지켜졌는지 스스로 한 번 돌아보세요.
  * 이번 퀘스트부터는 skeleton을 제공하지 않습니다!
* Quest 05에서 만든 메모장 시스템을 서버와 연동하는 어플리케이션으로 만들어 보겠습니다.
  * 클라이언트는 `fetch` API를 통해 서버와 통신합니다.
  * 서버는 8000번 포트에 REST API를 엔드포인트로 제공하여, 클라이언트의 요청에 응답합니다.
  * 클라이언트로부터 온 새 파일 저장, 삭제, 다른 이름으로 저장 등의 요청을 받아 서버의 로컬 파일시스템을 통해 저장되어야 합니다.
    * 서버에 어떤 식으로 저장하는 것이 좋을까요?
  * API 서버 외에, 클라이언트를 띄우기 위한 서버가 3000번 포트로 따로 떠서 API 서버와 서로 통신할 수 있어야 합니다.
  * Express나 Fastify 등의 프레임워크를 사용해도 무방합니다.
* 클라이언트 프로젝트와 서버 프로젝트 모두 `npm i`만으로 디펜던시를 설치하고 바로 실행될 수 있게 제출되어야 합니다.
* 이번 퀘스트부터는 앞의 퀘스트의 결과물에 의존적인 경우가 많습니다. 제출 폴더를 직접 만들어 제출해 보세요!

## Advanced
* `fetch` API는 구현할 수 없지만 `XMLHttpRequest`로는 구현할 수 있는 기능이 있을까요?
* REST 이전에는 HTTP API에 어떤 패러다임들이 있었을까요? REST의 대안으로는 어떤 것들이 제시되고 있을까요?
# Quest 17. 서비스의 운영 (1): 서버 들여다 보기

## Introduction
* 이번 퀘스트에서는 서비스 운영을 위한 리눅스 커맨드와 모니터링에 대해 다루겠습니다.

## Topics
* 리눅스의 커맨드들: `l