                }

            loadClass("com.android.wm.shell.multitasking.miuimultiwinswitch.miuiwindowdecor.decoration.MiuiDecorationBottom")
                .methodFinder().filterByName("getBottomCaptionHeight").first()
                .createHook {
                    after {
                        // 只要一碰小白条这个方法就会疯狂执行，猫猫问号？
                        val mode = it.thisObject.getObjectFieldOrNullAs<Int>("mWindowingMode") ?: return@after
                        val host = it.thisObject.getObjectFieldOrNull("mMiuiDecorationRootViewHost") ?: return@after
                        val view = host.getObjectFieldOrNullAs<View>("mMiuiDecorationBottomView") ?: return@after

                        val desiredAlpha = if (mode == 5) 0f else 1f

                        val prev = lastAlpha[view]
                        if (prev != null && prev == desiredAlpha) return@after
                        lastAlpha[view] = desiredAlpha

                        view.post {
                            view.alpha = desiredAlpha
                        }
                    }
                }

        } else {
            loadClass("com.android.wm.shell.multitasking.miuimultiwinswitch.miuiwindowdecor.MiuiBottomDecoration")
                .methodFinder().filterByName("createBottomCaption").first()
                .createHook {
                    returnConstant(null)
                }
        }
    }
}
/*
 * This file is part of HyperCeiler.

 * HyperCeiler is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License.

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

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

 * Copyright (C) 2023-2025 HyperCeiler Contributions
 */
package com.sevtinge.hyperceiler.hook.module.hook.systemui.base.controlcenter

import com.sevtinge.hyperceiler.hook.utils.devicesdk.isAndroidVersion
import io.github.kyuubiran.ezxhelper.core.util.ClassUtil.loadClassOrNull

object PublicClass {

    // Android 16
    val mediaViewHolderNew by lazy {
        loadClassOrNull("com.android.systemui.statusbar.notification.mediacontrol.MiuiMediaViewHolder")
    }
    val miuiMediaViewControllerImpl by lazy {
        loadClassOrNull("com.android.systemui.statusbar.notification.mediacontrol.MiuiMediaViewControllerImpl")
    }
    val seekBarObserverNew by lazy {
        loadClassOrNull("com.android.systemui.statusbar.notification.mediacontrol.MiuiMediaViewControllerImpl\$seekBarObserver$1")
    }
    val miuiMediaNotificationControllerImpl by lazy {
        loadClassOrNull("com.android.systemui.statusbar.notification.mediacontrol.MiuiMediaNotificationControllerImpl")
    }

    // Android 15-
    val miuiMediaControlPanel by lazy {
        loadClassOrNull("com.android.systemui.statusbar.notification.mediacontrol.MiuiMediaControlPanel")
    }

    val mediaControlPanel by lazy {
        loadClassOrNull("com.android.systemui.media.controls.ui.controller.MediaControlPanel")
            ?: loadClassOrNull("com.android.systemui.media.controls.ui.MediaControlPanel")
    }

    val notificationUtil by lazy {
        loadClassOrNull("com.miui.systemui.notification.MiuiBaseNotifUtil")
    }

    val mediaViewHolder by lazy {
        loadClassOrNull("com.android.systemui.media.controls.ui.view.MediaViewHolder")
    }

    val seekBarObserver by lazy {
        loadClassOrNul


5075, 41.442803100450618 ], [ 2.246968371917171, 41.440710475321787 ], [ 2.246664362033535, 41.440242723405092 ], [ 2.246146513135824, 41.439263492651648 ], [ 2.246022961874607, 41.43885204534125 ], [ 2.246483532124641, 41.438356605347543 ], [ 2.244276061111901, 41.432254975060978 ], [ 2.243664903029885, 41.432383814792182 ], [ 2.245491624682015, 41.43756134455699 ], [ 2.242803518829471, 41.43809149972833 ], [ 2.241983545347396, 41.43712070934626 ], [ 2.241078133468225, 41.435266644796364 ], [ 2.240943991433307, 41.434904661504952 ], [ 2.240365538844565, 41.431034775582241 ], [ 2.239243050119967, 41.428903190652314 ], [ 2.23870517719088, 41.427698432274184 ], [ 2.238601092429279, 41.427347453374338 ], [ 2.238489582870493, 41.427150628520813 ], [ 2.232957220935735, 41.431939030665404 ], [ 2.225818562153746, 41.430387371025674 ], [ 2.215811325568174, 41.436068878974304 ] ] ] } } , { "type": "Feature", "properties": { "MUNICIPI": "250061", "COMARCA": "18", "PROVINCIA": "25", "NOM_MUNI": "l'Albagés", "NOMN_MUNI": "Albagés, l'", "NOMG_MUNI": "l'Albagés", "CAP_MUNI": "l'Albagés", "CAPN_MUNI": "Albagés, l'", "CAPG_MUNI": "l'Albagés", "SUP_MUNI": 26.12, "ORSUP_MUNI": "M" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.726428683002542, 41.417623584819729 ], [ 0.722530816192639, 41.442821027158331 ], [ 0.716588044494822, 41.45843738148006 ], [ 0.72494265219266, 41.471397432317545 ], [ 0.758401475161664, 41.465059047027466 ], [ 0.768168679212269, 41.468084541109846 ], [ 0.780716698364169, 41.466665666617928 ], [ 0.785954832526037, 41.469517210850796 ], [ 0.79870199532794, 41.451915579006034 ], [ 0.798660532351302, 41.447060677531042 ], [ 0.799432045296746, 41.443486378911416 ], [ 0.789750607373305, 41.44344542371055 ], [ 0.794646617357651, 41.439969547349001 ], [ 0.7869912338648, 41.430960127945951 ], [ 0.767136606949015, 41.445589120384284 ], [ 0.757910752531577, 41.433830043406935 ], [ 0.766722045619102, 41.418937339159015 ], [ 0.763243513305164, 41.417553889633865 ], [ 0.73545292390374, 41.424112450623454 ], [ 0.726428683002542, 41.417623584819729 ] ] ] } } , { "type": "Feature", "properties": { "MUNICIPI":


], 0xffff);
    assert_eq!(cpu.ex, 0);
    cpu.tick();
    assert_eq!(cpu.reg[0], 0);
    assert_eq!(cpu.ex, 1);
    cpu.tick();
    assert_eq!(cpu.reg[0], 1);
    assert_eq!(cpu.ex, 0);
}

#[test]
fn sub_underflow() {
    let mut cpu = DCPU::new();
    cpu.mem[0] = 0x8801; // SET A, 1
    cpu.mem[1] = 0x8803; // SUB A, 1
    cpu.mem[2] = 0x8803; // SUB A, 1
    cpu.mem[3] = 0x8003; // SUB A, -1
    cpu.tick();
    assert_eq!(cpu.reg[0], 1);
    assert_eq!(cpu.ex, 0);
    cpu.tick();
    assert_eq!(cpu.reg[0], 0);
    assert_eq!(cpu.ex, 0);
    cpu.tick();
    assert_eq!(cpu.reg[0], 0xffff);
    assert_eq!(cpu.ex, 0xffff);
    cpu.tick();
    assert_eq!(cpu.reg[0], 0);
    assert_eq!(cpu.ex, 0);
}
<gh_stars>1-10
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use glib::translate::*;
use gst_base_sys;

bitflags! {
    pub struct BaseParseFrameFlags: u32 {
        const NEW_FRAME = 1;
        const NO_FRAME = 2;
        const CLIP = 4;
        const DROP = 8;
        const QUEUE = 16;
    }
}

#[doc(hidden)]
impl ToGlib for BaseParseFrameFlags {
    type GlibType = gst_base_sys::GstBaseParseFrameFlags;

    fn to_glib(&self) -> gst_base_sys::GstBaseParseFrameFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_base_sys::GstBaseParseFrameFlags> for BaseParseFrameFlags {
    fn from_glib(value: gst_base_sys::GstBaseParseFrameFlags) -> BaseParseFrameFlags {
        skip_assert_initialized!();
        BaseParseFrameFlags::from_bits_truncate(value)
    }
}
include!(concat!(env!("OUT_DIR"), "/planus/enums_generated.rs"));
<reponame>oro13/i-ching
pub struct ArgTemplate {
    pub help: &'static str,
    pub long: &'static str,
    pub name: &'static str,
    pub short: &'static str,
    pub takes_value: bool,
    pub value_name: &'static str,
}

impl AsRef<str> for ArgTemplate {
    fn as_ref(&self) -> &str {
        self.name
    }
}<reponame>magiclen/html-auto-p
extern crate html_auto_p;

use std::fs::File;
use std::io::Read;
use std::path::Path;

use html_auto_p::*;

const DATA_FOLDER: &str = "data";

#[test]
fn test_files_in_the_data_folder() {
    let data_folder = Path::new("tests").join(DATA_FOLDER);

    for dir in data_folder.read_dir().unwrap().into_iter().map(|dir| dir.unwrap()) {
        if dir.file_type().unwrap().is_file() {
            let file_path = dir.path();
            let file_name = file_path.file_name().unwrap().to_str().unwrap();

            if file_name.ends_with(".test.html") {
                let html_file_path = &file_path;
                let autoped_file_path = html_file_path
                    .parent()
                    .unwrap()
                    .join(format!("{}.autoped.html", &file_name[..(file_name.len() - 10)]));

                let mut html_file = File::open(html_file_path).un


 antialiased polygons, an alpha buffer is needed and the polygons must be sorted front to back.

    // Stippling
    EN_LINE_STIPPLE, //!< If enabled, use the current line stipple pattern when drawing lines, see also LineStipple.
    EN_POLYGON_STIPPLE, //!< If enabled, use the current polygon stipple pattern when rendering polygons, see also PolygonStipple.

    // Point sprites
    EN_POINT_SPRITE, //!< If enabled, calculate texture coordinates for points based on texture environment and point parameter settings; Otherwise texture coordinates are constant across points.
    EN_PROGRAM_POINT_SIZE, //!< [GL_VERTEX_PROGRAM_POINT_SIZE/GL_PROGRAM_POINT_SIZE] If enabled, and a vertex shader is active, then the derived point size is taken from the (potentially clipped) shader builtin \p gl_PointSize and clamped to the implementation-dependent point size range|

    // Fixed function pipeline
    EN_ALPHA_TEST, //!< If enabled, performs alpha testing, see also AlphaFunc for more information.
    EN_LIGHTING, //!< If enabled, use the current lighting parameters to compute the vertex color; Otherwise, simply associate the current color with each vertex, see also Material, LightModel, and Light.
    EN_COLOR_SUM, //!< If enabled, add the secondary color value to the computed fragment color.
    EN_FOG, //!< If enabled, blend a fog color into the post-texturing color, see also Fog.
    EN_NORMALIZE, //!< If enabled, normal vectors are scaled to unit length after transformation, see also vl::EN_RESCALE_NORMAL.
    EN_RESCALE_NORMAL, //!< If enabled, normals are scaled by a scaling factor derived from the modelview matrix; vl::EN_RESCALE_NORMAL requires that the originally specified normals were of unit length, and that the modelview matrix contain only uniform scales for proper results, see also vl::EN_NORMALIZE.

    // Available only under OpenGL 2.x
    EN_VERTEX_PROGRAM_TWO_SIDE, //!< If enabled, and a vertex shader is active, it specifies that the GL will choose between front and back colors based on the polygon's face direction of which the vertex being shaded is a part; It has no effect on points or lines.

    // OpenGL 3.2
    EN_TEXTURE_CUBE_MAP_SEAMLESS, //!< If enabled, cubemap textures are sampled such that when linearly sampling from the border between two adjacent faces, texels from both faces are used to generate the final sample value. When disabled, texels from only a single face are used to construct the final sample value.

    // OpenGL 3.0
    EN_CLIP_DISTANCE0, //!< If enabled, clip geometry against user-defined half space #0.
    EN_CLIP_DISTANCE1, //!< If enabled, clip geometry against user-defined half space #1.
    EN_CLIP_DISTANCE2, //!< If enabled, clip geometry against user-defined half space #2.
    EN_CLIP_DISTANCE3, //!< If enabled, clip geometry against user-defined half space #3.
    EN_CLIP_DISTANCE4, //!< If enabled, clip geometry against user-defined half space #4.
    EN_CLIP_DISTANCE5, //!< If enabled, clip geometry against user-defined half space #5.
    EN_CLIP_DISTANCE6, //!< If enabled, clip geometry against user-defined half space #6.
    EN_CLIP_DISTANCE7, //!< If enabled, clip geometry against user-defined half space #7.

    // Multisampling
    EN_SAMPLE_ALPHA_TO_COVERAGE, //!< If enabled, compute a temporary coverage value where each bit is determined by the alpha value at the corresponding sample location; The temporary coverage value is then ANDed with the fragment coverage


(ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_IsFieldSetAndNotNull__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_IsFieldSetAndNotNull__SWIG_1(self, args);
      }
    }
  }

fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_IsFieldSetAndNotNull'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::IsFieldSetAndNotNull(int)\n"
    "    OGRFeatureShadow::IsFieldSetAndNotNull(char const *)\n");
  return 0;
}

SWIGINTERN PyObject *_wrap_Feature_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;

  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }


le:"Calendar Settings",url:"/settings.html",type:"Page"},{title:"Project Timeline",url:"/calendar.html",type:"Event"}].filter(e=>e.title.toLowerCase().includes(this.query.toLowerCase())):this.results=[]}})),h.data("themeSwitch",()=>({currentTheme:"light",init(){this.currentTheme=localStorage.getItem("theme")||"light",document.documentElement.setAttribute("data-bs-theme",this.currentTheme)},toggle(){this.currentTheme=this.currentTheme==="light"?"dark":"light",document.documentElement.setAttribute("data-bs-theme",this.currentTheme),localStorage.setItem("theme",this.currentTheme)}}))});
// Navigation Configuration
// Centralized navigation structure to avoid manual updates in multiple places

export const navigation = [
  {
    id: 'dashboard',
    label: 'Dashboard',
    icon: 'fa-chart-line',
    badge: { text: '4', color: 'primary' },
    submenu: [
      { id: 'dashboard-ecommerce', label: 'E-Commerce', href: '/' },
      { id: 'dashboard-finance', label: 'Finance', href: '/pages/dashboards/finance.html' },
      { id: 'dashboard-sales', label: 'Sales', href: '/pages/dashboards/sales.html' },
      { id: 'dashboard-influencer', label: 'Influencer', href: '/pages/dashboards/influencer.html' }
    ]
  },
  {
    id: 'ui-elements',
    label: 'UI Elements',
    icon: 'fa-palette',
    submenu: [
      { id: 'cards', label: 'Cards', href: '/pages/ui-elements/cards.html' },
      { id: 'general', label: 'General', href: '/pages/ui-elements/general.html' },
      { id: 'typography', label: 'Typography', href: '/pages/ui-elements/typography.html' }
    ]
  },
  {
    id: 'charts',
    label: 'Charts',
    icon: 'fa-chart-pie',
    href: '/pages/charts/index.html'
  },
  {
    id: 'forms',
    label: 'Forms',
    icon: 'fa-wpforms',
    iconPrefix: 'fab',
    badge: { text: '6', color: 'success' },
    submenu: [
      { id: 'form-elements', label: 'Form Elements', href: '/pages/form-elements.html' },
      { id: 'form-validation', label: 'Form Validation', href: '/pages/form-validation.html' },
      { id: 'multiselect', label: 'Multiselect', href: '/pages/multiselect.html' }
    ]
  },
  {
    id: 'tables',
    label: 'Tables',
    icon: 'fa-table',
    submenu: [
      { id: 'general-tables', label: 'General Tables', href: '/pages/tables/general-tables.html' },
      { id: 'data-tables', label: 'Data Tables', href: '/pages/tables/data-tables.html' }
    ]
  },
  {
    divider: true,
    label: 'Features'
  },
  {
    id: 'ecommerce',
    label: 'E-Commerce',
    icon: 'fa-shopping-cart',
    submenu: [
      { id: 'products', label: 'Products', href: '/pages/ecommerce/products.html' },
      {
        id: 'product-single',
        label: 'Product Details',
        href: '/pages/ecommerce/product-single.html'
      },
      { id: 'checkout', label: 'Checkout', href: '/pages/ecommerce/checkout.html' }
    ]
  },
  {
    id: 'influencer',
    label: 'Influencer',
    icon: 'fa-users',
    submenu: [
      {
        id: 'influencer-


e = Input.GetAxis("Horizontal") * SteeringWheelMaxAngle;
		_CurrentAngle = Mathf.Lerp(_CurrentAngle, _TargetAngle, Time.deltaTime * SteeringWheelSpeed);
		this.transform.localRotation = Quaternion.Euler(0.0f, _CurrentAngle, 0.0f) * Quaternion.Euler(_StartEuler);
	}

	void QuaternionRotation()
	{
		Quaternion target = Quaternion.Euler(0, Input.GetAxis("Horizontal") * SteeringWheelMaxAngle,0) * Quaternion.Euler(_StartEuler);
		this.transform.localRotation = Quaternion.Slerp(this.transform.localRotation, target, Time.deltaTime * SteeringWheelSpeed);
	}

	void Start()
	{
		LoadEulerRotation();
	}

	void Update()
	{
		EulerRotation();
	}

}


local ls = require"luasnip"
local ls_fmt = require"luasnip.extras.fmt".format_nodes
local U = require"mylib.utils"

local SU = {}

---@class SnipNodeT
---...

---@class SnipT
---@field env table
---...

---@class mysnips.FileTypeSetupArgs
---@field filetype string The filetype to extend
---@field inherits_from string[] The additional collections of snippets to use for `ft`

---@alias mysnips.ContextCondition
---| (fun(line_to_cursor: string, matched_trigger: string, captures): boolean)
---| any (for the magic condition objects, since LuaLS does not support metamethod checks..)

-- TMP, Until it is impl in LuaSnip!
---@class LS.SnipContext: table
---@field trig string
---@field trigEngine string
---@field condition? mysnips.ContextCondition
---@field resolveExpandParams? any

---@class mysnips.Context: LS.SnipContext
---@field desc? string Description of the snippet
---@field when? mysnips.ContextCondition
---@field rx? boolean Whether the trigger is a pattern
---@field resolver? any

---@class LS.FmtOpts
---@field trim_empty boolean
---@field dedent boolean
---@field delimiters string

---@class mysnips.FmtOpts: LS.FmtOpts

---@alias mysnips.MyFmtArgs {[1]: string, [2]: table, [3]: mysnips.FmtOpts?, opts: mysnips.FmtOpts?}

--- Set `filetype` as inheriting snippets from the given list of extra snippets collections.
---@param args mysnips.FileTypeSetupArgs Args table
SU.filetype_setup = function(args)
  vim.validate({
    opt_filetype = { args.filetype, "string" },
    opt_inherits_from = { args.inherits_from, "table" },
  })

  local ft_snips_collections = {args.filetype}
  vim.list_extend(ft_snips_collections, args.inherits_from)
  -- Set which snippets collection to consider for the given filetype
  -- ref: https://github.com/L3MON4D3/LuaSnip/discussions/1003 and the DOC
  ls.filetype_set(args.filetype, ft_snips_collections)
end

--- Get a function that declares a snippet inside the given list_of_snippets table.
---
--- Usage:
--- ```
--- local MYSNIPPETS = {}
--- local snip = SU.get_snip_fn(MYSNIPPETS)
---
--- snip("hi!", { desc = "Hello? o/" }, {
---   t"Hello world!",
--- })
--- ```
--
-- FIXME: support multiple triggers
--   !!! luasnip doesn't seem to support to assign the same 'context' to 2 snippets :/
---@param list_of_snippets SnipT[]
SU.get_snip_fn = function(list_of_snippets)
  --- Define snippet!
  ---@param trigger string
  ---@param context mysnips.Context
  ---@param nodes SnipNodeT|SnipNodeT[]
  ---@param opts? table
  return function(trigger, context, nodes, opts)
    context.trig = trigger
    if context.rx then
      context.trigEngine = "pattern"
    end
    context.condition = context.when or nil
    context.resolveExpandParams = context.resolveExpandParams or context.resolver or nil
    -- IDEA: add feature system, to compose context features like resolveExpandParams 🤔
    -- I want to be able to define a snip like:
    -- snip(
    --   "trig!", {desc = "some desc", feats = {SF.ignore_spaces_after}},
    --   ...
    -- )
    -- Where `feat


AGENT_EVENT = 4i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const AE_UNKNOWN: AGENT_EVENT = 5i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub type AGENT_SESSION_EVENT = i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASE_NEW_SESSION: AGENT_SESSION_EVENT = 0i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASE_NOT_READY: AGENT_SESSION_EVENT = 1i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASE_READY: AGENT_SESSION_EVENT = 2i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASE_BUSY: AGENT_SESSION_EVENT = 3i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASE_WRAPUP: AGENT_SESSION_EVENT = 4i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASE_END: AGENT_SESSION_EVENT = 5i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub type AGENT_SESSION_STATE = i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASST_NOT_READY: AGENT_SESSION_STATE = 0i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASST_READY: AGENT_SESSION_STATE = 1i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASST_BUSY_ON_CALL: AGENT_SESSION_STATE = 2i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASST_BUSY_WRAPUP: AGENT_SESSION_STATE = 3i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const ASST_SESSION_ENDED: AGENT_SESSION_STATE = 4i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub type AGENT_STATE = i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const AS_NOT_READY: AGENT_STATE = 0i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const AS_READY: AGENT_STATE = 1i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const AS_BUSY_ACD: AGENT_STATE = 2i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const AS_BUSY_INCOMING: AGENT_STATE = 3i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const AS_BUSY_OUTGOING: AGENT_STATE = 4i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const AS_UNKNOWN: AGENT_STATE = 5i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub type ASYNC_COMPLETION = ::core::option::Option<unsafe extern "system" fn(dwrequestid: u32, lresult: i32)>;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub type CALLHUB_EVENT = i32;
#[doc = "*Required features: 'Win32_Devices_Tapi'*"]
pub const CHE_CALLJOIN: CALLHUB_EVENT = 0i32;
#[doc = "*Required features


ton_checked",
                "position": 1,
                "template": template.id,
                "aux_attributes": {
                    "question": {
                        "value": "Choose the better submission",
                        "data_source": [{"type": "static", "value": "Choose the best submission", "position": 0}]
                    },
                    "layout": "column",
                    "options": [],
                    "shuffle_options": False
                },
            }
            template_item_serializer = TemplateItemSerializer(data=item)
            if template_item_serializer.is_valid():
                template_item_serializer.create()
            else:
                raise ValidationError(template_item_serializer.errors)
        else:
            for item in items:
                item.update({"template": template.id})
                template_item_serializer = TemplateItemSerializer(data=item)
                if template_item_serializer.is_valid():
                    template_item_serializer.create()
                else:
                    raise ValidationError(template_item_serializer.errors)

        return template

    @staticmethod
    def create_revision(instance):
        items = copy.copy(instance.items.all())
        template = create_copy(instance)

        for item in items:
            TemplateItemSerializer.create_revision(item, template)
        TemplateItemSerializer.rebuild_tree(template)
        return template

class TemplateItemPropertiesSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.TemplateItemProperties


 none
    // exists
    GLPipeline* GLState::pipeline(const GLuint p) { return &(m_state[p]); }

    void GLState::clearState()
    {
        glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
        TWK_GLDEBUG;
        m_state.clear();
    }

} // namespace TwkGLF
//******************************************************************************
// Copyright (c) 2002 Tweak Inc.
// All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
//******************************************************************************

#include <TwkGLF/BasicGLProgram.h>

extern const char* DefaultVertex_glsl;
extern const char* DefaultFrag_glsl;
extern const char* TextureVertex_glsl;
extern const char* TextureFrag_glsl;
extern const char* TexRectFrag_glsl;
extern const char* PaintColoredFrag_glsl;
extern const char* SoftPaintFrag_glsl;
extern const char* OldReplaceFrag_glsl;
extern const char* SoftOldReplaceFrag_glsl;
extern const char* ReplaceColoredVertex_glsl;
extern const char* ReplaceVertex_glsl;
extern const char* ReplaceFrag_glsl;
extern const char* SoftReplaceFrag_glsl;
extern const char* EraseVertex_glsl;
extern const char* EraseFrag_glsl;
extern const char* SoftEraseFrag_glsl;
extern const char* CloneVertex_glsl;
extern const char* CloneFrag_glsl;
extern const char* SoftCloneFrag_glsl;
extern const char* ScaleVertex_glsl;
extern const char* ScaleFrag_glsl;
extern const char* SoftScaleFrag_glsl;
extern const char* DirectionPaintVertex_glsl;
extern const char* DirectionPaintFrag_glsl;
extern const char* SoftDirectionPaintFrag_glsl;
extern const char* StereoScanlineFrag_glsl;
extern const char* StereoCheckerFrag_glsl;
extern const char* CrosshatchBGFrag_glsl;
extern const char* CheckerboardBGFrag_glsl;

namespace TwkGLF
{

    using namespace std;

    BasicGLProgram::ProgramCacheMap BasicGLProgram::m_programCache;

    //------------------------constructor and
    // destructor-------------------------
    BasicGLProgram::BasicGLProgram(const std::string& vertexcode,
                                   const std::string& fragmentcode)
        : m_vertexCode(vertexcode)
        , m_fragmentCode(fragmentcode)
    {
        m_identifier = vertexcode + fragmentcode;
    }

    BasicGLProgram::~BasicGLProgram() { uninstall(); }

    //------------------------public
    // functions-----------------------------------
    const char* BasicGLProgram::identifier() const
    {
        return m_identifier.c_str();
    }

    const BasicGLProgram*
    BasicGLProgram::select(const std::string& vertexcode,
                           const std::string& fragmentcode)
    {
        std::string identifier = vertexcode + fragmentcode;
        ProgramCacheMap::const_iterator i =
            m_programCache.find(identifier.c_str());

        if (i != m_programCache.end())
        {
            return i->second;
        }
        else
        {
            BasicGLProgram* p = new BasicGLProgram(vertexcode, fragmentcode);
            if (p->compile())
            {
                m_programCache[p->identifier()] = p;
            }
            else
            {
                delete p;
                p = 0;
            }
            return p;
        }
    }

    bool BasicGLProgram::compile()
    {
        GLuint v, f;
        m_programId = glCreateProgram();
        v = glCreateShader(GL_VERTEX_SHADER);
        f = glCreateShader(GL_FRAGMENT_SHADER);
        const char* vcode = m_vertexCode.c_str();
        glShaderSource(v, 1, &vcode, NULL);
        glCompileShader(v);
        const char* fcode = m_fragmentCode.c_str();
        glShaderS


bCommon.G_bEncDecTraceEnable;
    #endif
      DTRACE_CABAC_VL( TLibCommon.G_nSymbolCounter++ );
      DTRACE_CABAC_T( "\tPOC: " );
      DTRACE_CABAC_V( rpcPic.GetPOC() );
      DTRACE_CABAC_T( "\n" );
    #if ENC_DEC_TRACE
      TLibCommon.G_bJustDoIt = TLibCommon.G_bEncDecTraceDisable;
    #endif*/

    pcEncTop := this.m_pcEncTop
    pcSbacCoders := pcEncTop.getSbacCoders() //coder for each substream
    iNumSubstreams := pcSlice.GetPPS().GetNumSubstreams()
    uiBitsOriginallyInSubstreams := uint(0)
    {
        uiTilesAcross := rpcPic.GetPicSym().GetNumColumnsMinus1() + 1
        for ui := 0; ui < uiTilesAcross; ui++ {
            this.m_pcBufferSbacCoders[ui].load(this.m_pcSbacCoder) //init. state
        }

        for iSubstrmIdx := 0; iSubstrmIdx < iNumSubstreams; iSubstrmIdx++ {
            uiBitsOriginallyInSubstreams += pcSubstreams[iSubstrmIdx].GetNumberOfWrittenBits()
        }

        for ui := 0; ui < uiTilesAcross; ui++ {
            this.m_pcBufferLowLatSbacCoders[ui].load(this.m_pcSbacCoder) //init. state
        }
    }

    uiWidthInLCUs := rpcPic.GetPicSym().GetFrameWidthInCU()
    var uiCol, uiLin, uiSubStrm, uiTileCol, uiTileStartLCU, uiTileLCUX uint
    depSliceSegmentsEnabled := pcSlice.GetPPS().GetDependentSliceSegmentsEnabledFlag()
    uiCUAddr = rpcPic.GetPicSym().GetCUOrderMap(int(uiStartCUAddr / rpcPic.GetNumPartInCU())) /* for tiles, uiStartCUAddr is NOT the real raster scan address, it is actually
       an encoding order index, so we need to convert the index (uiStartCUAddr)
       into the real raster scan address (uiCUAddr) via the CUOrderMap */
    uiTileStartLCU = rpcPic.GetPicSym().GetTComTile(rpcPic.GetPicSym().GetTileIdxMap(int(uiCUAddr))).GetFirstCUAddr()
    if depSliceSegmentsEnabled {
        if pcSlice.IsNextSlice() ||
            uiCUAddr == rpcPic.GetPicSym().GetTComTile(rpcPic.GetPicSym().GetTileIdxMap(int(uiCUAddr))).GetFirstCUAddr() {
            if this.m_pcCfg.GetWaveFrontsynchro() != 0 {
                this.CTXMem[1].loadContexts(this.m_pcSbacCoder)
            }
            this.CTXMem[0].loadContexts(this.m_pcSbacCoder)
        } else {
            if this.m_pcCfg.GetWaveFrontsynchro() != 0 {
                uiTileCol = rpcPic.GetPicSym().GetTileIdxMap(int(uiCUAddr)) % uint(rpcPic.GetPicSym().GetNumColumnsMinus1()+1)
                this.m_pcBufferSbacCoders[uiTileCol].loadContexts(this.CTXMem[1])

                iNumSubstreamsPerTile := iNumSubstreams / rpcPic.GetPicSym().GetNumTiles()
                uiLin = uiCUAddr / uiWidthInLCUs
                uiSubStrm = rpcPic.GetPicSym().GetTileIdxMap(int(rpcPic.GetPicSym().GetCUOrderMap(int(uiCUAddr))))*uint(iNumSubstreamsPerTile) + uiLin%uint(iNumSubstreamsPerTile)
                if (uiCUAddr%uiWidthInLCUs + 1) >= uiWidthInLCUs {
                    uiCol = uiCUAddr % uiWidthInLCUs
                    uiTileLCUX = uiTileStartLCU


 inline-block;
    border-bottom: 2px solid transparent
}

.login-snip .sign-in:checked+.tab,
.login-snip .sign-up:checked+.tab {
    color: #fff;
    border-color: #1161ee
}

.login-space {
    min-height: 345px;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d
}

.login-space .group {
    margin-bottom: 15px
}

.login-space .group .label,
.login-space .group .input,
.login-space .group .button {
    width: 100%;
    color: #fff;
    display: block
}

.login-space .group .input,
.login-space .group .button {
    border: none;
    padding: 15px 20px;
    border-radius: 25px;
    background: rgba(255, 255, 255, .1)
}

.login-space .group input[data-type="password"] {
    text-security: circle;
    -webkit-text-security: circle
}

.login-space .group .label {
    color: #aaa;
    font-size: 12px
}

.login-space .group .button {
    background: #1161ee
}

.login-space .group label .icon {
    width: 15px;
    height: 15px;
    border-radius: 2px;
    position: relative;
    display: inline-block;
    background: rgba(255, 255, 255, .1)
}

.login-space .group label .icon:before,
.login-space .group label .icon:after {
    content: '';
    width: 10px;
    height: 2px;
    background: #fff;
    position: absolute;
    transition: all .2s ease-in-out 0s
}

.login-space .group label .icon:before {
    left: 3px;
    width: 5px;
    bottom: 6px;
    transform: scale(0) rotate(0)
}

.login-space .group label .icon:after {
    top: 6px;
    right: 0;
    transform: scale(0) rotate(0)
}

.login-space .group .check:checked+label {
    color: #fff
}

.login-space .group .check:checked+label .icon {
    background: #1161ee
}

.login-space .group .check:checked+label .icon:before {
    transform: scale(1) rotate(45deg)
}

.login-space .group .check:checked+label .icon:after {
    transform: scale(1) rotate(-45deg)
}

.login-snip .sign-in:checked+.tab+.sign-up+.tab+.login-space .login {
    transform: rotate(0)
}

.login-snip .sign-up:checked+.tab+.login-space .sign-up-form {
    transform: rotate(0)
}

*,
:after,
:before {
    box-sizing: border-box
}

.clearfix:after,
.clearfix:before {
    content: '';
    display: table
}

.clearfix:after {
    clear: both;
    display: block
}

a {
    color: inherit;
    text-decoration: none
}

.hr {
    height: 2px;
    margin: 60px 0 50px 0;
    background: rgba(255, 255, 255, .2)
}

.foot {
    text-align: center
}

.card {
    width: 500px;
    left: 100px
}

::placeholder {
    color: #b3b3b3
}.form-group.has-danger .error,
.input-group.has-


unittest(pin_history)
{
  GodmodeState* state = GODMODE();
  int myPin = 3;
  state->reset();            // pin will start LOW
  digitalWrite(myPin, HIGH);
  digitalWrite(myPin, LOW);
  digitalWrite(myPin, LOW);
  digitalWrite(myPin, HIGH);
  digitalWrite(myPin, HIGH);

  // pin history is queued in case we want to analyze it later.
  // we expect 6 values in that queue (5 that we set plus one
  // initial value), which we'll hard-code here for convenience.
  // (we'll actually assert those 6 values in the next block)
  assertEqual(6, state->digitalPin[1].queueSize());
  bool expected[6] = {LOW, HIGH, LOW, LOW, HIGH, HIGH};
  bool actual[6];

  // convert history queue into an array so we can verify it.
  // while we're at it, check that we received the amount of
  // elements that we expected.
  int numMoved = state->digitalPin[myPin].toArray(actual, 6);
  assertEqual(6, numMoved);

  // verify each element
  for (int i = 0; i < 6; ++i) {
    assertEqual(expected[i], actual[i]);
  }
}
```

### Pin Futures

Reading the pin more than once per function is also a possibility.  In that case, we want to queue up a few values for the `digitalRead` or `analogRead` to find.

```C++
unittest(pin_read_history)
{
  GodmodeState* state = GODMODE();
  state->reset();

  int future[6] = {33, 22, 55, 11, 44, 66};
  state->analogPin[1].fromArray(future, 6);
  for (int i = 0; i < 6; ++i)
  {
    assertEqual(future[i], analogRead(1));
  }

  // for digital pins, we have the added possibility of specifying
  // a stream of input bytes encoded as ASCII
  bool bigEndian = true;
  state->digitalPin[1].fromAscii("Yo", bigEndian);

  // digital history as serial data, big-endian
  bool expectedBits[16] = {
    0, 1, 0, 1, 1, 0, 0, 1,  // Y
    0, 1, 1, 0, 1, 1, 1, 1   // o
  };

  for (int i = 0; i < 16; ++i) {
    assertEqual(expectedBits[i], digitalRead(1));
  }
}
```

### Serial Data

Basic input and output verification of serial port data can be done as follows:

```c++
unittest(reading_writing_serial)
{
  GodmodeState* state = GODMODE();
  state->serialPort[0].dataIn = "";             // the queue of data waiting to be read
  state->serialPort[0].dataOut = "";            // the history of data written

  // When there is no data, nothing happens
  assertEqual(-1, Serial.peek());
  assertEqual("", state->serialPort[0].dataIn);
  assertEqual("", state->serialPort[0].dataOut);

  // if we put data on the input and peek at it, we see the value and it's not consumed
  state->serialPort[0].dataIn = "a";
  assertEqual('a', Serial.peek());
  assertEqual("a", state->serialPort[0].dataIn);
  assertEqual("", state->serialPort[0].dataOut);

  // if we read the input, we see the value and it's consumed
  assertEqual('a', Serial.read());
  assertEqual("", state->serialPort[0].dataIn);
  assertEqual("", state->serialPort[0].dataOut);

  // when we write data, it shows up in the history -- the output buffer
  Serial.write('b');
  assertEqual("", state->serialPort[0].dataIn);
  assertEqual("b", state->serialPort[0].dataOut);

  // when we print more data, note that the history
  // still contains the first thing we wrote
  Serial.print("cdefg");
  assertEqual("", state->seri


nc def process(self, data: ISocketRequest) -> List[Image.Image]:
        url = data.nodeData.src
        self.set_injection("url", data.nodeData)
        hint_type = controlnet_hint_fields.parse(data.extraData["hint_type"])
        data = dict(hint_type=hint_type, url=url)
        self.set_extra_response(DATA_MODEL_KEY, data)
        return await get_apis().get_control_hint(hint_type, data)

class MultiControlNet(IFieldsPlugin):
    @property
    def settings(self) -> IPluginSettings:
        return IPluginSettings(
            **common_styles,
            keepOpen=True,
            src=constants.CONTROLNET_ICON,
            tooltip=I18N(
                zh="使用 (multi) ControlNet 生成图片",
                en="Generate image with (multi) ControlNet",
            ),
            pluginInfo=IFieldsPluginInfo(
                header=I18N(
                    zh="ControlNet 生成",
                    en="ControlNet",
                ),
                numColumns=2,
                definitions=multi_controlnet_fields,
            ),
        )

    async def process(self, data: ISocketRequest) -> Optional[List[Image.Image]]:
        def callback(step: int, num_steps: int) -> bool:
            return self.send_progress(step / num_steps)

        def parse_control(control: dict) -> dict:
            t = controlnet_hint_fields.parse(control.pop("type"))
            return dict(type=t, data=control)

        if not data.extraData["url"]:
            data.extraData.pop("url")
        controls = list(map(parse_control, data.extraData.pop("controls")))
        if len(controls) == 0:
            msg = "should provide at least one control in the 'ControlNet' setting"
            self.send_exception(msg)
            return
        for i, control in enumerate(controls):
            if not control.get("data", {}).get("hint_url"):
                msg = f"should provide `hint_url` for control {i} in the 'ControlNet' setting"
                self.send_exception(msg)
                return
        data.extraData["controls"] = controls
        model = inject(self, data, ControlMultiModel, "base_model")
        return await get_apis().run_multi_controlnet(model, step_callback=callback)

class ImageHarmonization(IFieldsPlugin):
    @property
    def settings(self) -> IPluginSettings:
        return IPluginSettings(
            w=400,
            h=300,
            keepOpen=True,
            src=constants.HARMONIZATION_ICON,
            tooltip=I18N(
                zh="将前景区域与背景图进行风格一致化",
                en="Harmonize the foreground area with the background image",
            ),
            pluginInfo=IFieldsPluginInfo(
                header=I18N(
                    zh="风格一致化",
                    en="Image Harmonization",
                ),
                definitions=harmonization_fields,
            ),
        )

    async def process(self, data: ISocketRequest) -> Optional[List[Image.Image]]:
        if not data.extraData.get("url"):
            self.send_exception("'Image' should be provided")
            return
        if not data.extraData.get("mask_url"):
            self.send_exception("'Foreground' should be provided")
            return
        data_model = Img2ImgHarmonizationModel(**data.extraData)
        return await call_api(self, "harmonization", data_model)

class PromptEnhance(IFieldsPlugin):
    @property
    def settings(self) -> IPluginSettings:
        return IPluginSettings(
            w=240,
            h=180,
            src=constants.PROMPT_ENHANCE_ICON,
            tooltip=I18N(
                zh="提示词增强",
                en="Prompt Enhancement",
            ),
            pluginInfo=IFieldsPluginInfo(
                header=I18N(
                    zh="提示词增强",
                    en="Prompt Enhancement",
                ),
                definitions=prompt_enhance_fields,
            ),
        )

    async def process(self, data: ISocketRequest) -> List[str]:
        self.set_injection("text", data.nodeData)
        data_model = PromptEnhanceModel(text=data.nodeData.text, **data.extraData)
        return await call_api(self, "prompt_enhance", data_model)

class Txt2ImgWithText(IFieldsPlugin):
    @property
    def settings(self) -> IPluginSettings:
        return IPluginSettings(
            **common_styles,
            src=constants.TEXT_TO_IMAGE_ICON,
            tooltip=I18N(
                zh="生成符合文本节点内容的图片",
                en="Text to Image",
            ),
            pluginInfo=IFieldsPluginInfo(


.grey[100],
              child: Container(
                padding: EdgeInsets.all(20),
                decoration: BoxDecoration(
                    color: Colors.white,
                    borderRadius: BorderRadius.all(Radius.circular(12.0))),
                child: Column(
                  children: <Widget>[
                    BrnPairInfoTable(
                      children: <BrnInfoModal>[
                        BrnInfoModal(
                            keyPart: "名称：", valuePart: "加粗的内容，文字样式可配置"),
                        BrnInfoModal(keyPart: "名称名：", valuePart: "没加粗的内容"),
                        BrnInfoModal(
                            keyPart: "名称名称名：", valuePart: "内容内容内容内容内容"),
                        BrnInfoModal(
                          keyPart: "名称名称名称名称：",
                          valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
                        )
                      ],
                    ),
                    SizedBox(
                      height: 20,
                    ),
                    BrnRichInfoGrid(
                      themeData: BrnPairRichInfoGridConfig(
                          keyTextStyle: BrnTextStyle(
                              fontSize: 16,
                              fontWeight: FontWeight.w400,
                              color: Color(0xff999999)),
                          valueTextStyle: BrnTextStyle(
                            fontSize: 16,
                            fontWeight: FontWeight.w400,
                            color: Color(0xff999999),
                          )),
                      rowSpace: 10,
                      pairInfoList: <BrnRichGridInfo>[
                        BrnRichGridInfo("正常的名称：", '正常的内容'),
                        BrnRichGridInfo(
                            "名称名称名称名称名称名称名称名称名称：", '内容内容内容内容内容内容内容内容内容内容内容'),
                        BrnRichGridInfo("名称：", '内容内容内容内容内容内容内容内容内容内容内容内容'),
                        BrnRichGridInfo("名称：", ''),
                      ],
                    ),
                    SizedBox(
                      height: 20,
                    ),
                    BrnRichInfoGrid(
                      rowSpace: 10,
                      pairInfoList: <BrnRichGridInfo>[
                        BrnRichGridInfo("加粗的名称：", '加粗的内容'),
                        BrnRichGridInfo(
                            "名称名称名称名称名称名称名称名称名称：", '内容内容内容内容内容内容内容内容内容内容内容'),
                        BrnRichGridInfo("名称：", '内容内容内容内容内容内容内容内容内容内容内容内容'),
                        BrnRichGridInfo("名称：", ''),
                      ],
                    ),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
import 'dart:math';

import 'package:bruno/bruno.dart';
import 'package:example/sample/components/charts/line/db_data_node_model.dart';
import 'package:flutter/material.dart';

class BrokenLineExample extends StatefulWidget {
  final List<DBDataNodeModel> brokenData;

  BrokenLineExample(this.brokenData);

  @override
  _BrokenLineExampleState createState() => _BrokenLineExampleState();
}

class _BrokenLineExampleState extends State<BrokenLineExample> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: BrnAppBar(
        title: '折线',
      ),
      body: SafeArea(
        child: Padding(
          padding: const E


* channel = nullptr;
  foxglove_error error = foxglove_channel_create_packed_element_field(
    {topic.data(), topic.size()}, context.getInner(), &channel
  );
  if (error != foxglove_error::FOXGLOVE_ERROR_OK || channel == nullptr) {
    return tl::unexpected(FoxgloveError(error));
  }
  return PackedElementFieldChannel(ChannelUniquePtr(channel));
}

FoxgloveError PackedElementFieldChannel::log(
  const PackedElementField& msg, std::optional<uint64_t> log_time, std::optional<uint64_t> sink_id
) noexcept {
  Arena arena;
  foxglove_packed_element_field c_msg;
  packedElementFieldToC(c_msg, msg, arena);
  return FoxgloveError(foxglove_channel_log_packed_element_field(
    impl_.get(), &c_msg, log_time ? &*log_time : nullptr, sink_id ? *sink_id : 0
  ));
}

void PackedElementFieldChannel::close() noexcept {
  foxglove_channel_close(impl_.get());
}

uint64_t PackedElementFieldChannel::id() const noexcept {
  return foxglove_channel_get_id(impl_.get());
}

bool PackedElementFieldChannel::has_sinks() const noexcept {
  return foxglove_channel_has_sinks(impl_.get());
}

FoxgloveResult<Point2Channel> Point2Channel::create(
  const std::string_view& topic, const Context& context
) {
  const foxglove_channel* channel = nullptr;
  foxglove_error error =
    foxglove_channel_create_point2({topic.data(), topic.size()}, context.getInner(), &channel);
  if (error != foxglove_error::FOXGLOVE_ERROR_OK || channel == nullptr) {
    return tl::unexpected(FoxgloveError(error));
  }
  return Point2Channel(ChannelUniquePtr(channel));
}

FoxgloveError Point2Channel::log(
  const Point2& msg, std::optional<uint64_t> log_time, std::optional<uint64_t> sink_id
) noexcept {
  return FoxgloveError(foxglove_channel_log_point2(
    impl_.get(),
    reinterpret_cast<const foxglove_point2*>(&msg),
    log_time ? &*log_time : nullptr,
    sink_id ? *sink_id : 0
  ));
}

void Point2Channel::close() noexcept {
  foxglove_channel_close(impl_.get());
}

uint64_t Point2Channel::id() const noexcept {
  return foxglove_channel_get_id(impl_.get());
}

bool Point2Channel::has_sinks() const noexcept {
  return foxglove_channel_has_sinks(impl_.get());
}

FoxgloveResult<Point3Channel> Point3Channel::create(
  const std::string_view& topic, const Context& context
) {
  const foxglove_channel* channel = nullptr;
  foxglove_error error =
    foxglove_channel_create_point3({topic.data(), topic.size()}, context.getInner(), &channel);
  if (error != foxglove_error::FOXGLOVE_ERROR_OK || channel == nullptr) {
    return tl::unexpected(FoxgloveError(error));
  }
  return Point3Channel(ChannelUniquePtr(channel));
}

FoxgloveError Point3Channel::log(
  const Point3& msg, std::optional<uint64_t> log_time, std::optional<uint64_t> sink_id
) noexcept {
  return FoxgloveError(foxglove_channel_log_point3(
    impl_.get(),
    reinterpret_cast<const foxglove_point3*>(&msg),
    log_time ? &*log_time : nullptr,
    sink_id ? *sink_id : 0
  ));
}

void Po


ecializer=[Modulo]*/
@pragma('dart2js:noInline')
mod3(param) {
  var a = param ? 0xFFFFFFFF : -0.0;
  return (a + 1) % 2;
  // 'a + 1' cannot be -0.0, so we can optimize.
  // present: ' % 2'
  // absent: '$mod'
}

/*member: rem1:Specializer=[Remainder]*/
@pragma('dart2js:noInline')
rem1(param) {
  var a = param ? 0xFFFFFFFF : 1;
  return a.remainder(2);
  // Above can be compiled to '%'.
  // present: ' % 2'
  // absent: 'remainder'
}

/*member: rem2:Specializer=[Remainder]*/
@pragma('dart2js:noInline')
rem2(param) {
  var a = param ? 123.4 : -1;
  return a.remainder(3);
  // Above can be compiled to '%'.
  // present: ' % 3'
  // absent: 'remainder'
}

/*member: rem3:Specializer=[Remainder]*/
@pragma('dart2js:noInline')
rem3(param) {
  var a = param ? 123 : null;
  return 100.remainder(a!);
  // No specialization for possibly null inputs.
  // present: 'remainder'
  // absent: '%'
}

main() {
  mod1(true);
  mod1(false);
  mod2(true);
  mod2(false);
  mod3(true);
  mod3(false);

  rem1(true);
  rem1(false);
  rem2(true);
  rem2(false);
  rem3(true);
  rem3(false);
}
// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

main() {
  typesTrust();
  typesCheck();
  asTrust();
  asCheck();
  downcastTrust();
  downcastCheck();
  parameterTrust();
  parameterCheck();
  indexBoundsTrust();
  indexBoundsCheck();
}

/*member: typesTrust:types:trust*/
@pragma('dart2js:types:trust')
typesTrust() {}

/*member: typesCheck:types:check*/
@pragma('dart2js:types:check')
typesCheck() {}

/*member: asTrust:as:trust*/
@pragma('dart2js:as:trust')
asTrust() {}

/*member: asCheck:as:check*/
@pragma('dart2js:as:check')
asCheck() {}

/*member: downcastTrust:downcast:trust*/
@pragma('dart2js:downcast:trust')
downcastTrust() {}

/*member: downcastCheck:downcast:check*/
@pragma('dart2js:downcast:check')
downcastCheck() {}

/*member: parameterTrust:parameter:trust*/
@pragma('dart2js:parameter:trust')
parameterTrust() {}

/*member: parameterCheck:parameter:check*/
@pragma('dart2js:parameter:check')
parameterCheck() {}

/*member: indexBoundsTrust:index-bounds:trust*/
@pragma('dart2js:index-bounds:trust')
indexBoundsTrust() {}

/*member: indexBoundsCheck:index-bounds:check*/
@pragma('dart2js:index-bounds:check')
indexBoundsCheck() {}
// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

main() {
  var c = Class();
  c. /*1:main*/ instancePositional1


        }
    }
}
package moe.nea.firmament.features.debug.itemeditor

import kotlinx.serialization.json.JsonArray
import kotlinx.serialization.json.JsonElement
import kotlinx.serialization.json.buildJsonObject
import kotlinx.serialization.json.put
import kotlin.concurrent.thread
import kotlin.jvm.optionals.getOrNull
import net.minecraft.component.DataComponentTypes
import net.minecraft.item.ItemStack
import net.minecraft.item.Items
import net.minecraft.nbt.NbtByte
import net.minecraft.nbt.NbtCompound
import net.minecraft.nbt.NbtElement
import net.minecraft.nbt.NbtInt
import net.minecraft.nbt.NbtList
import net.minecraft.nbt.NbtOps
import net.minecraft.nbt.NbtString
import net.minecraft.registry.tag.ItemTags
import net.minecraft.text.Text
import net.minecraft.util.Unit
import moe.nea.firmament.Firmament
import moe.nea.firmament.annotations.Subscribe
import moe.nea.firmament.events.ClientStartedEvent
import moe.nea.firmament.features.debug.ExportedTestConstantMeta
import moe.nea.firmament.repo.SBItemStack
import moe.nea.firmament.util.HypixelPetInfo
import moe.nea.firmament.util.LegacyTagWriter.Companion.toLegacyString
import moe.nea.firmament.util.MC
import moe.nea.firmament.util.StringUtil.words
import moe.nea.firmament.util.directLiteralStringContent
import moe.nea.firmament.util.extraAttributes
import moe.nea.firmament.util.getLegacyFormatString
import moe.nea.firmament.util.json.toJsonArray
import moe.nea.firmament.util.mc.displayNameAccordingToNbt
import moe.nea.firmament.util.mc.loreAccordingToNbt
import moe.nea.firmament.util.mc.toNbtList
import moe.nea.firmament.util.modifyExtraAttributes
import moe.nea.firmament.util.skyBlockId
import moe.nea.firmament.util.skyblock.Rarity
import moe.nea.firmament.util.transformEachRecursively
import moe.nea.firmament.util.unformattedString

class LegacyItemExporter private constructor(var itemStack: ItemStack) {
	init {
		require(!itemStack.isEmpty)
		itemStack.count = 1
	}

	var lore = itemStack.loreAccordingToNbt
	val originalId = itemStack.extraAttributes.getString("id")
	var name = itemStack.displayNameAccordingToNbt
	val extraAttribs = itemStack.extraAttributes.copy()
	val legacyNbt = NbtCompound()
	val warnings = mutableListOf<String>()

	// TODO: check if lore contains non 1.8.9 able hex codes and emit lore in overlay files if so

	fun preprocess() {
		// TODO: split up preprocess steps into preprocess actions that can be toggled in a ui
		extraAttribs.remove("timestamp")
		extraAttribs.remove("uuid")
		extraAttribs.remove("modifier")
		extraAttribs.getString("petInfo").ifPresent { petInfoJson ->
			var petInfo = Firmament.json.decodeFromString<HypixelPetInfo>(petInfoJson)
			petInfo = petInfo.copy(candyUsed = 0, heldItem = null, exp = 0.0, active = null, uuid = null)
			extraAttribs.putString("petInfo", Firmament.tightJson.encodeToString(petInfo))
		}
		itemStack.skyBlockId?.let {
			extraAttribs.putString("id", it.neuItem)
		}


urn -EROFS;

	ovl_path_lower(dentry, &ctx.lowerpath);
	err = vfs_getattr(&ctx.lowerpath, &ctx.stat,
			  STATX_BASIC_STATS, AT_STATX_SYNC_AS_STAT);
	if (err)
		return err;

	ovl_path_upper(parent, &parentpath);
	ctx.destdir = parentpath.dentry;
	ctx.destname = dentry->d_name;

	err = vfs_getattr(&parentpath, &ctx.pstat,
			  STATX_ATIME | STATX_MTIME, AT_STATX_SYNC_AS_STAT);
	if (err)
		return err;

	/* maybe truncate regular file. this has no effect on dirs */
	if (flags & O_TRUNC)
		ctx.stat.size = 0;

	if (S_ISLNK(ctx.stat.mode)) {
		ctx.link = vfs_get_link(ctx.lowerpath.dentry, &done);
		if (IS_ERR(ctx.link))
			return PTR_ERR(ctx.link);
	}
	ovl_do_check_copy_up(ctx.lowerpath.dentry);

	err = ovl_copy_up_start(dentry);
	/* err < 0: interrupted, err > 0: raced with another copy-up */
	if (unlikely(err)) {
		if (err > 0)
			err = 0;
	} else {
		if (!ovl_dentry_upper(dentry))
			err = ovl_do_copy_up(&ctx);
		if (!err && !ovl_dentry_has_upper_alias(dentry))
			err = ovl_link_up(&ctx);
		ovl_copy_up_end(dentry);
	}
	do_delayed_call(&done);

	return err;
}

int ovl_copy_up_flags(struct dentry *dentry, int flags)
{
	int err = 0;
	const struct cred *old_cred = ovl_override_creds(dentry->d_sb);

	while (!err) {
		struct dentry *next;
		struct dentry *parent;

		/*
		 * Check if copy-up has happened as well as for upper alias (in
		 * case of hard links) is there.
		 *
		 * Both checks are lockless:
		 *  - false negatives: will recheck under oi->lock
		 *  - false positives:
		 *    + ovl_dentry_upper() uses memory barriers to ensure the
		 *      upper dentry is up-to-date
		 *    + ovl_dentry_has_upper_alias() relies on locking of
		 *      upper parent i_rwsem to prevent reordering copy-up
		 *      with rename.
		 */
		if (ovl_dentry_upper(dentry) &&
		    ovl_dentry_has_upper_alias(dentry))
			break;

		next = dget(dentry);
		/* find the topmost dentry not yet copied up */
		for (;;) {
			parent = dget_parent(next);

			if (ovl_dentry_upper(parent))
				break;

			dput(next);
			next = parent;
		}

		err = ovl_copy_up_one(parent, next, flags);

		dput(parent);
		dput(next);
	}
	ovl_revert_creds(old_cred);

	return err;
}

int ovl_copy_up(struct dentry *dentry)
{
	return ovl_copy_up_flags(dentry, 0);
}


  var alts = m[c.state];
      if (alts == null) {
        alts = BitSet();
        m[c.state] = alts;
      }
      alts.set(c.alt);
    }
    return m;
  }

  static bool hasStateAssociatedWithOneAlt(ATNConfigSet configs) {
    final x = getStateToAltMap(configs);
    for (var alts in x.values) {
      if (alts.cardinality == 1) return true;
    }
    return false;
  }

  static int getSingleViableAlt(List<BitSet> altsets) {
    final viableAlts = BitSet();
    for (var alts in altsets) {
      final minAlt = alts.nextset(0);
      viableAlts.set(minAlt);
      if (viableAlts.cardinality > 1) {
        // more than 1 viable alt
        return ATN.INVALID_ALT_NUMBER;
      }
    }
    return viableAlts.nextset(0);
  }
}
// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of dart.core;

/// An enumerated value.
///
/// This class is implemented by all types and values
/// introduced using an `enum` declaration.
/// Non-platform classes cannot implement, extend or
/// mix in this class.
@Since("2.14")
abstract class Enum {
  /// A numeric identifier for the enumerated value.
  ///
  /// The values of a single enumeration are numbered
  /// consecutively from zero to one less than the
  /// number of values.
  /// This is also the index of the value in the
  /// enumerated type's static `values` list.
  int get index;

  /// The value's "name".
  ///
  /// The name of a value is a string containing the
  /// source identifier used to declare the value.
  ///
  /// The name occurs in the [toString] of the
  /// enum value, after the enum class name and a `.`.
  /// It is exposed by then [EnumName.name] extension getter,
  /// which is an extension to allow `enum` declarations to have
  /// an element named `name` without causing a name conflict.
  ///
  /// Given an enum declaration like
  /// ```dart
  /// enum MyEnum {
  ///   value1,
  ///   value2
  /// }
  /// ```
  /// the `toString` method of that class may be implemented
  /// as
  /// ```dart
  ///   String toString() => "MyEnum.$_name";
  /// ```
  String get _name;

  /// Compares two enum values by their [index].
  ///
  /// A generic [Comparator] function for enum types which
  /// orders enum values by their [index] value, which corresponds
  /// to the source order of the enum element declarations in
  /// the `enum` declaration.
  ///
  /// Example:
  /// ```dart
  /// enum Season { spring, summer, autumn, winter }
  ///
  /// void main() {
  ///   var relationByIndex =
  ///       Enum.compareByIndex(Season.spring, Season.summer); // < 0
  ///   relationByIndex =
  ///       Enum.compareByIndex(Season.summer, Season.spring); // > 0
  ///   relationByIndex =
  ///       Enum.compareByIndex(Season.spring, Season.winter); // < 0
  ///   relationByIndex =
  ///       Enum.compareByIndex(Season.winter, Season.spring); // > 0
  /// }
  /// ```
  @Since("2.15")
  static int compareByIndex<T extends Enum>(T value1, T value2) =>
      value1.index - value2.index;

  /// Compares enum values by name.
  ///
  /// The [EnumName


top = _cgo_topofstack();
	__typeof__(a->r) r;
	_cgo_tsan_acquire();
	r = sum(a->p0, a->p1);
	_cgo_tsan_release();
	a = (void*)((char*)a + (_cgo_topofstack() - stktop));
	a->r = r;
}
```

这个函数参数只有一个 void 泛型的指针，函数没有返回值。真实的 sum 函数的函数参数和返回值均通过唯一的参数指针类实现。

`_cgo_506f45f9fa85_Cfunc_sum` 函数的指针指向的结构为：

```c
	struct {
		int p0;
		int p1;
		int r;
		char __pad12[4];
	} __attribute__((__packed__)) *a = v;
```

其中 p0 成员对应 sum 的第一个参数，p1 成员对应 sum 的第二个参数，r 成员，`__pad12` 用于填充结构体保证对齐 CPU 机器字的整倍数。

然后从参数指向的结构体获取调用参数后开始调用真实的 C 语言版 sum 函数，并且将返回值保持到结构体内返回值对应的成员。

因为 Go 语言和 C 语言有着不同的内存模型和函数调用规范。其中 `_cgo_topofstack` 函数相关的代码用于 C 函数调用后恢复调用栈。`_cgo_tsan_acquire` 和 `_cgo_tsan_release` 则是用于扫描 CGO 相关的函数则是对 CGO 相关函数的指针做相关检查。

`C.sum` 的整个调用流程图如下：

![](../images/ch2-5-call-c-sum-v1.uml.png)

*图 2-5 调用 C 函数*

其中 `runtime.cgocall` 函数是实现 Go 语言到 C 语言函数跨界调用的关键。更详细的细节可以参考 https://golang.org/src/cmd/cgo/doc.go 内部的代码注释和 `runtime.cgocall` 函数的实现。

### 2.5.3 C 调用 Go 函数

在简单分析了 Go 调用 C 函数的流程后，我们现在来分析 C 反向调用 Go 函数的流程。同样，我们现构造一个 Go 语言版本的 sum 函数，文件名同样为 `main.go`：

```
package main

//int sum(int a, int b);
import "C"

//export sum
func sum(a, b C.int) C.int {
	return a + b
}

func main() {}
```

CGO 的语法细节不再赘述。为了在 C 语言中使用 sum 函数，我们需要将 Go 代码编译为一个 C 静态库：

```
$ go build -buildmode=c-archive -o sum.a main.go
```

如果没有错误的话，以上编译命令将生成一个 `sum.a` 静态库和 `sum.h` 头文件。其中 `sum.h` 头文件将包含 sum 函数的声明，静态库中将包含 sum 函数的实现。

要分析生成的 C 语言版 sum 函数的调用流程，同样


left:auto;right:0}.rtl .itemdiv>.body{margin-right:50px;margin-left:12px}.rtl .itemdiv>.body>.time{right:auto;left:9px}.rtl .itemdiv>.body>.text{padding-left:0;padding-right:7px}.rtl .itemdiv>.body>.text:after{right:16px;left:-12px}.rtl .itemdiv>.body>.text>[class*="icon-quote-"]:first-child{margin-left:4px;margin-right:0}.rtl .itemdiv.dialogdiv:before{left:auto;right:19px}.rtl .itemdiv.dialogdiv>.body{border-left-width:1px;border-right-width:2px;margin-left:1px}.rtl .itemdiv.dialogdiv>.body:before{left:auto;right:-7px;border-width:2px 2px 0 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.rtl .itemdiv.dialogdiv>.body>.time{float:left}.rtl .itemdiv.dialogdiv>.body>.text{padding-right:0}.rtl .itemdiv.memberdiv{float:right}.rtl .itemdiv .tools{right:auto;left:4px}.rtl .itemdiv.commentdiv .tools{right:auto;left:9px}.rtl .item-list{margin:0}.rtl .item-list>li{border-left-width:1px;border-right-width:3px;border-left-color:#DDD}.rtl li[class*="item-"]{border-left-width:1px;border-right-width:3px;border-left-color:#DDD}.rtl li.item-orange{border-right-color:#e8b110}.rtl li.item-orange2{border-right-color:#f79263}.rtl li.item-red{border-right-color:#d53f40}.rtl li.item-red2{border-right-color:#d15b47}.rtl li.item-green{border-right-color:#9abc32}.rtl li.item-green2{border-right-color:#0490a6}.rtl li.item-blue{border-right-color:#4f99c6}.rtl li.item-blue2{border-right-color:#3983c2}.rtl li.item-blue3{border-right-color:#1144eb}.rtl li.item-pink{border-right-color:#cb6fd7}.rtl li.item-black{border-right-color:#505050}.rtl li.item-grey{border-right-color:#a0a0a0}.rtl li.item-brown{border-right-color:#a52a2a}.rtl li.item-default{border-right-color:#abbac3}.rtl li.item-purple{border-right-color:#6f3cc4}.rtl .profile-info-name{text-align:left;padding-right:0;padding-left:10px;left:auto;right:0}.rtl .profile-info-value{padding-right:6px;padding-left:4px;margin-left:auto;margin-right:120px}.rtl .profile-info-value>span+span:before{margin-left:3px;margin-right:1px}.rtl .profile-user-info-striped .profile-info-value{padding-left:0;padding-right:12px}.rtl .profile-activity img,.rtl .profile-activity .thumbicon{margin-right:0;margin-left:10px}.rtl .profile-activity .tools{left:12px;right:auto}.rtl .user-profile .user-title-label+.dropdown-menu{margin-left:auto;margin-right:-12px}.rtl .user-status{margin-right:auto;margin-left:1px}.rtl .tab-content.profile-edit-tab-content{-webkit-box-shadow:-1px 1px 0 0 rgba(0,0,0,0.2);box-shadow:-1px 1px 0 0 rgba(0,0,0,0.2)}.rtl .inbox-tabs.nav-tabs>li.active>a.btn-new-mail>.btn:before{left:auto;right:35%;right:calc(50% - 6px)}.rtl .inbox-tabs.nav-tabs.tab-size-bigger>li.acti


icon:"\eaac"}.mce-i-zoomin{-ie7-icon:"\eb35"}.mce-i-zoomout{-ie7-icon:"\eb36"}.mce-i-sun{-ie7-icon:"\eccc"}.mce-i-moon{-ie7-icon:"\eccd"}.mce-i-arrowleft{-ie7-icon:"\edc0"}.mce-i-arrowright{-ie7-icon:"\edb8"}.mce-i-drop{-ie7-icon:"\e934"}.mce-i-contrast{-ie7-icon:"\ecd4"}.mce-i-sharpen{-ie7-icon:"\eba7"}.mce-i-palette{-ie7-icon:"\e92a"}.mce-i-resize2{-ie7-icon:"\edf9"}.mce-i-orientation{-ie7-icon:"\e601"}.mce-i-invert{-ie7-icon:"\e602"}.mce-i-gamma{-ie7-icon:"\e600"}.mce-i-remove{-ie7-icon:"\ed6a"}.mce-i-codesample{-ie7-icon:"\e603"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#BBB}/* scoped: gsl-scope */
.gsl-scope a {
  -webkit-text-decoration-skip: objects;
}
.gsl-scope a:active,
.gsl-scope a:hover {
  outline: none;
}
.gsl-scope a,
.gsl-scope .gsl-link {
  color: #1e87f0;
  text-decoration: none;
  cursor: pointer;
}
.gsl-scope a:hover,
.gsl-scope .gsl-link:hover,
.gsl-scope .gsl-link-toggle:hover .gsl-link,
.gsl-scope .gsl-link-toggle:focus .gsl-link {
  color: #0f6ecd;
  text-decoration: underline;
}
.gsl-scope abbr[title] {
  text-decoration: underline;
  -webkit-text-decoration-style: dotted;
}
.gsl-scope b,
.gsl-scope strong {
  font-weight: bolder;
}
.gsl-scope :not(pre) > code,
.gsl-scope :not(pre) > kbd,
.gsl-scope :not(pre) > samp {
  font-family: Consolas, monaco, monospace;
  font-size: 0.875rem;
  color: #f0506e;
  white-space: nowrap;
  padding: 2px 6px;
  background: #f8f8f8;
}
.gsl-scope em {
  color: #f0506e;
}
.gsl-scope ins {
  background: #ffd;
  color: #666;
  text-decoration: none;
}
.gsl-scope mark {
  background: #ffd;
  color: #666;
}
.gsl-scope q {
  font-style: italic;
}
.gsl-scope small {
  font-size: 80%;
}
.gsl-scope sub,
.gsl-scope sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
.gsl-scope sup {
  top: -0.5em;
}
.gsl-scope sub {
  bottom: -0.25em;
}
.gsl-scope audio,
.gsl-scope canvas,
.gsl-scope iframe,
.gsl-scope img,
.gsl-scope svg,
.gsl-scope video {
  vertical-align: middle;
}
.gsl-scope canva


83cf, 0x9246, 0xa0dd, 0xb154, 0xc5eb, 0xd462, 0xe6f9, 0xf770,
	0x1f06, 0x0e8f, 0x3c14, 0x2d9d, 0x5922, 0x48ab, 0x7a30, 0x6bb9,
	0x934e, 0x82c7, 0xb05c, 0xa1d5, 0xd56a, 0xc4e3, 0xf678, 0xe7f1,

	0x2e85, 0x3f0c, 0x0d97, 0x1c1e, 0x68a1, 0x7928, 0x4bb3, 0x5a3a,
	0xa2cd, 0xb344, 0x81df, 0x9056, 0xe4e9, 0xf560, 0xc7fb, 0xd672,
	0x3e04, 0x2f8d, 0x1d16, 0x0c9f, 0x7820, 0x69a9, 0x5b32, 0x4abb,
	0xb24c, 0xa3c5, 0x915e, 0x80d7, 0xf468, 0xe5e1, 0xd77a, 0xc6f3,

	0x4d83, 0x5c0a, 0x6e91, 0x7f18, 0x0ba7, 0x1a2e, 0x28b5, 0x393c,
	0xc1cb, 0xd042, 0xe2d9, 0xf350, 0x87ef, 0x9666, 0xa4fd, 0xb574,
	0x5d02, 0x4c8b, 0x7e10, 0x6f99, 0x1b26, 0x0aaf, 0x3834, 0x29bd,
	0xd14a, 0xc0c3, 0xf258, 0xe3d1, 0x976e, 0x86e7, 0xb47c, 0xa5f5,

	0x6c81, 0x7d08, 0x4f93, 0x5e1a, 0x2aa5, 0x3b2c, 0x09b7, 0x183e,
	0xe0c9, 0xf140, 0xc3db, 0xd252, 0xa6ed, 0xb764, 0x85ff, 0x9476,
	0x7c00, 0x6d89, 0x5f12, 0x4e9b, 0x3a24, 0x2bad, 0x1936, 0x08bf,
	0xf048, 0xe1c1, 0xd35a, 0xc2d3, 0xb66c, 0xa7e5, 0x957e, 0x84f7,

	0x8b8f, 0x9a06, 0xa89d, 0xb914, 0xcdab, 0xdc22, 0xeeb9, 0xff30,
	0x07c7, 0x164e, 0x24d5, 0x355c, 0x41e3, 0x506a, 0x62f1, 0x7378,
	0x9b0e, 0x8a87, 0xb81c, 0xa995, 0xdd2a, 0xcca3, 0xfe38, 0xefb1,
	0x1746, 0x06cf, 0x3454, 0x25dd, 0x5162, 0x40eb, 0x7270, 0x63f9,

	0xaa8d, 0xbb04, 0x899f, 0x9816, 0xeca9, 0xfd20, 0xcfbb, 0xde32,
	0x26c5, 0x374c, 0x05d7, 0x145e, 0x60e1, 0x7168, 0x43f3, 0x527a,
	0xba0c, 0xab85, 0x991e, 0x8897, 0xfc28, 0xeda1, 0xdf3a, 0xceb3,
	0x3644, 0x27cd, 0x1556, 0x04df, 0x7060, 0x61e9, 0x5372, 0x42fb,

	0xc98b, 0xd802, 0xea99, 0xfb10, 0x8faf, 0x9e26, 0xacbd, 0xbd34,
	0x45c3, 0x544a, 0x66d1, 0x7758, 0x03e7, 0x126e, 0x20f5, 0x317c,
	0xd90a, 0xc883, 0xfa18, 0xeb91, 0x9f2e, 0x8ea7, 0xbc3c, 0xadb5,
	0x5542, 0x44cb, 0x7650, 0x67d9, 0x1366, 0x02ef, 0x3074, 0x21fd,

	0xe889, 0xf900, 0xcb9b, 0xda12, 0xaead, 0xbf24, 0x8dbf, 0x9c36,
	0x64c1, 0x7548, 0x47d3, 0x565a, 0x22e5, 0x336c, 0x01f7, 0x107e,
	0xf808, 0xe981, 0xdb1a, 0xca93, 0xbe2c, 0xafa5, 0x9d3e, 0x8cb7,
	0x7440, 0x65c9, 0x5752, 0x46db, 0x3264, 0x23ed, 0x1176, 0x00ff
};

uint16_t calc_crc_flex(const uint8_t *cp, int size)
{
	uint16_t crc = 0xffff;

	while (size--) {
	  uint8_t c = *cp++;
	  crc = (crc << 8) ^ crc_flex_table[((crc >> 8) ^ c) & 0xff];
	}

	return crc;
}

#if 0 // not used!
int check_crc_flex(const uint8_t *cp, int size)
{
	uint16_t crc = calc_crc_flex(cp, size);

	if (size < 3)
		return -1;

	if (crc != 0x7070)
		return -1;

	return 0;
}
#endif


bool isSameSizeAs(Rect other) =>
      other != null && width == other.width && height == other.height;

  bool isSamePositionAs(Rect other) =>
      other != null && x == other.x && y == other.y;

  bool contains(num otherX, num otherY) =>
      otherX >= x && otherX <= x + width && otherY >= y && otherY <= y + height;

  String toString() => '$x, $y, $width, $height';

  @override
  bool operator ==(other) =>
      other is Rect && isSameSizeAs(other) && isSamePositionAs(other);

  @override
  int get hashCode => hash4(x, y, width, height);
}

/// Mutable version of [Rect] class.
class MutableRect extends Rect {
  num x;
  num y;
  num width;
  num height;

  MutableRect(this.x, this.y, this.width, this.height);
  MutableRect.size(this.width, this.height);
  MutableRect.position(this.x, this.y);
}

class AbsoluteRect {
  final num start;
  final num end;
  final num top;
  final num bottom;

  const AbsoluteRect(this.top, this.end, this.bottom, this.start);

  @override
  bool operator ==(other) =>
      other is AbsoluteRect &&
      start == other.start &&
      end == other.end &&
      top == other.top &&
      bottom == other.bottom;

  @override
  int get hashCode => hash4(start, end, top, bottom);
}
//
// Copyright 2014 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
//

part of charted.charts;

/// A behavior that draws marking lines on the chart.
class LineMarker implements ChartBehavior {
  /// Position of the line markers.
  final Map<int, dynamic> positions;

  /// If true, the markers are drawn above the series
  final bool drawAboveSeries;

  /// If true, animates (grows from the axis into the chart)
  final bool animate;

  CartesianArea _area;
  bool _isLeftAxisPrimary = false;
  Rect _rect;

  bool _showing;
  Selection _parent;
  DataSelection _markers;

  StreamSubscription _axesChangeSubscription;

  LineMarker(this.positions,
      {this.drawAboveSeries: false, this.animate: false});

  void init(ChartArea area, Selection upper, Selection lower) {
    if (area is! CartesianArea) return;
    _area = area as CartesianArea;
    _parent = drawAboveSeries ? upper : lower;
    _isLeftAxisPrimary = _area.config.isLeftAxisPrimary;
    _axesChangeSubscription = _area.onChartAxesUpdated.listen((_) => _update());
    _update();
  }

  void dispose() {
    if (_axesChangeSubscription != null) _axesChangeSubscription.cancel();
    if (_markers != null) _markers.remove();
  }

  bool _isDimension(int column) => _area.config.dimensions.contains(column);

  String _pathForDimension(int column, bool initial) {
    assert(_isDimension(column));

    int index;
    for (index = 0;
        _area.config.dimensions.elementAt(index) != column;
        ++index);

    assert(index == 0 || index == 1 && _area.useTwoDimensionAxes);

    var dimensionAtBottom = index == 1 && _isLeftAxisPrimary ||
            index == 0 && !_isLeftAxisPrimary,
        scale = _area.dimensionScales.elementAt(index),
        scaled = scale.scale(positions[column]) as num,
        theme = _area.theme.getDimensionAxisTheme(),
        renderAreaRect = _area.layout.renderArea,
        left = renderAreaRect.x,
        right = initial ? left : (left + renderAreaRect.width),
        bottom = renderAreaRect.y + renderAreaRect.height,
        t


e <class U>
yes_tag is_cv_reference_wrapper_check(reference_wrapper<U> const volatile*);
no_tag is_cv_reference_wrapper_check(...);

template <class T>
struct is_cv_reference_wrapper
{
    BOOST_STATIC_CONSTANT(
        bool, value = (
            sizeof(is_cv_reference_wrapper_check((T*)0)) == sizeof(yes_tag)
        )
    );

    typedef mpl::bool_<
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
        is_cv_reference_wrapper::
#endif
    value> type;
};

#if BOOST_WORKAROUND(MSVC, == 1200)
template <>
struct is_cv_reference_wrapper<int>
  : mpl::false_ {};
#endif

// Needed for unwrap_cv_reference below. T might be const, so
// eval_if might fail because of deriving from T const on EDG.
template <class T>
struct get_type
{
    typedef typename T::type type;
};

#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
template <class T, class is_reference_wrapper = typename is_cv_reference_wrapper<T>::type>
struct unwrap_cv_reference
{
    typedef T type;
};

template <class T>
struct unwrap_cv_reference<T const, mpl::false_>
{
    typedef T const type;
};

template <class T>
struct unwrap_cv_reference<T, mpl::true_>
  : T
{};

#else
// Produces the unwrapped type to hold a reference to in named<>
// Can't use boost::unwrap_reference<> here because it
// doesn't handle the case where T = reference_wrapper<U> cv
template <class T>
struct unwrap_cv_reference
{
    typedef typename mpl::eval_if<
        is_cv_reference_wrapper<T>
      , get_type<T>
      , mpl::identity<T>
    >::type type;
};
#endif

}}} // namespace boost::parameter::aux

#endif // UNWRAP_CV_REFERENCE_050328_HPP

// Copyright Daniel Wallin 2006. Use, modification and distribution is
// subject to the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP
# define BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP

# include <boost/mpl/and.hpp>
# include <boost/mpl/not.hpp>
# include <boost/type_traits/is_convertible.hpp>
# include <boost/type_traits/is_reference.hpp>

namespace boost { namespace parameter {

namespace aux
{

  struct template_keyword_tag {};

  template <class T, class U>
  struct is_pointer_convertible
    : is_convertible<T*, U*>
  {};

  template <class T>
  struct is_template_keyword
    : mpl::and_<
          mpl::not_<is_reference<T> >
        , is_pointer_convertible<T, template_keyword_tag>
      >
  {};

} // namespace aux

template <class Tag, class T>
struct template_keyword
  : aux::template_keyword_tag
{
    typedef Tag key_type;
    typedef T value_type;
    typedef value_type reference;
};

}} // namespace boost::parameter

#endif // BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP

// Copyright Daniel Wallin 2006. Use, modification and distribution is
// subject to the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_PARAMETER_CAST_060902_HPP
# define BOOST_PARAMETER_CAST_060902_HPP

# include <boost/detail/workaround.hpp>

# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
  && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#  include <boost/type_traits/add_reference.hpp


adow 300ms ease-out;
	transition: box-shadow 300ms ease-out;
}

figure {

	vertical-align: middle;
	border-radius: 3px;
	box-shadow: 0px 0px 4px rgba(0,0,0,0.1);
	background: #fff;
	display: inline-block;
	padding: 10px;
	margin: 10px;
	height: 340px;
	width: 320px;
}

figure a {

	text-decoration: none;
	color: #111;
}

figure img {

	box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
	display: block;
	height: 240px;
	width: 320px;
}

figure figcaption {

	line-height: 1.4;
	font-size: 13px;
	padding: 0 5px;
	margin: 16px 0 0 0;
}

figure figcaption strong {

	text-transform: uppercase;
	font-weight: 300;
	font-size: 16px;
}

figure figcaption p {

	text-decoration: none;
	opacity: 0.8;
}

figure figcaption p a {

	text-decoration: underline;
}

figure:hover {

	box-shadow: 0px 0px 0px 4px rgba(0,0,0,0.1);
}

.footer {

	margin: 40px 0;
}

.footer p {

	text-transform: uppercase;
	font-weight: 300;
	font-size: 11px;
	margin: 10px 0 0 0;
	color: #555;
}

@import url(http://fonts.googleapis.com/css?family=Quantico);

html, body {

    background: #f2f2f2;
    overflow: hidden;
    margin: 0;
}

/* Info */

@-webkit-keyframes show-info {
    0% { -webkit-transform: rotateY(120deg); }
    100% { -webkit-transform: rotateY(0deg); }
}

@-moz-keyframes show-info {
    0% { -moz-transform: rotateY(120deg); }
    100% { -moz-transform: rotateY(0deg); }
}

@-ms-keyframes show-info {
    0% { -ms-transform: rotateY(120deg); }
    100% { -ms-transform: rotateY(0deg); }
}

@-o-keyframes show-info {
    0% { -o-transform: rotateY(120deg); }
    100% { -o-transform: rotateY(0deg); }
}

@keyframes show-info {
    0% { transform: rotateY(120deg); }
    100% { transform: rotateY(0deg); }
}

.info {

    -webkit-transition: all 180ms ease-out;
    -moz-transition: all 180ms ease-out;
    -ms-transition: all 180ms ease-out;
    -o-transition: all 180ms ease-out;
    transition: all 180ms ease-out;

    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    -o-transform-style: preserve-3d;
    transform-style: preserve-3d;

    -webkit-transform: perspective(800);
    -moz-transform: perspective(800);
    -ms-transform: perspective(800);
    -o-transform: perspective(800);
    transform: perspective(800);

    font-family: 'Quantico', sans-serif;
    position: absolute;
    font-size: 12px;
    opacity: 0.8;
    color: #fff;
    width: 240px;
    left: 0px;
    top: 20px;
}

.info:hover {


rc.clone();
    stream_rc.fetch_add(1, Ordering::SeqCst);

    ChannelStream {
      topic: self.topic.clone(),
      stream: WatchStream::new(self.receiver.clone()),
      rc: self.rc.clone(),
      stream_rc,
    }
  }
}

impl Drop for Channel {
  fn drop(&mut self) {
    println!("[Drop] Channel");
  }
}

#[derive(Debug)]
pub struct ChannelStream {
  topic: String,
  stream: WatchStream<ChannelPayload>,
  stream_rc: Arc<AtomicUsize>,
  rc: Arc<Mutex<SubscriberRc>>,
}

impl Stream for ChannelStream {
  type Item = ChannelPayload;

  fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
    let mut stream: Pin<Box<dyn Stream<Item = ChannelPayload>>> = Box::pin(&mut self.stream);
    Stream::poll_next(stream.as_mut(), cx)
  }
}

impl Drop for ChannelStream {
  fn drop(&mut self) {
    self.stream_rc.fetch_sub(1, Ordering::SeqCst);

    if self.stream_rc.load(Ordering::SeqCst) <= 0 {
      futures::executor::block_on(async {
        let t = self.topic.as_str();
        self.rc.lock().await.remove_subscriber(t);
        CHANNEL_MAMANGER.lock().await.remove_channel(t);
      });
    }

    println!(
      "[Drop] ChannelStream => {}",
      self.stream_rc.load(Ordering::SeqCst)
    );
  }
}

struct ChannelFactory;

impl ChannelFactory {
  pub fn build(topic: &str, rc: Arc<Mutex<SubscriberRc>>) -> Channel {
    let (sender, receiver) = watch::channel(ChannelPayload::default());
    Channel {
      topic: String::from(topic),
      sender,
      receiver,
      rc,
      stream_rc: Arc::new(AtomicUsize::new(0)),
    }
  }
}

pub struct ChannelManager {
  channels: HashMap<String, Channel>,
  rc: Option<Arc<Mutex<SubscriberRc>>>,
}

impl ChannelManager {
  pub fn new() -> Self {
    Self {
      rc: None,
      channels: HashMap::new(),
    }
  }

  pub fn set_rc(&mut self, rc: Arc<Mutex<SubscriberRc>>) {
    self.rc = Some(rc);
  }

  pub fn channel<'a>(&'a mut self, topic: &'a str) -> &'a Channel {
    let t = String::from(topic);

    if !self.channels.contains_key(&t) {
      self.channels.insert(
        String::from(topic),
        ChannelFactory::build(topic, self.rc.as_mut().unwrap().clone()),
      );
    }

    return self.channels.get(&t).unwrap();
  }

  pub fn remove_channel(&mut self, topic: &str) {
    let t = String::from(topic);
    if self.channels.contains_key(&t) {
      self.channels.remove(&String::from(topic));
    }
  }
}

unsafe impl Send for ChannelManager {}

lazy_static! {
  pub static ref CHANNEL_MAMANGER: Arc<Mutex<ChannelManager>> =
    Arc::new(Mutex::new(ChannelManager::new()));
}

pub struct SubscriberRc {
  subscribers: HashMap<String, (i32, Box<Subscriber>)>,
}

impl SubscriberRc {
  pub fn new() -> Self {
    Self {
      subscribers: HashMap::new(),
    }
  }

  pub fn is_exists(&mut self, topic: &str) -> bool {
    for (t, _) in self.subscribers.it


();
    SearchHistoryResponse result = call(request);

    assertThat(result.getPaging()).extracting(Paging::getPageIndex, Paging::getPageSize, Paging::getTotal)
      .containsExactly(1, 100, 2);
    assertThat(result.getMeasuresList()).extracting(HistoryMeasure::getMetric).hasSize(3)
      .containsExactly(complexityMetric.getKey(), nclocMetric.getKey(), newViolationMetric.getKey());
    String analysisDate = formatDateTime(analysis.getCreatedAt());
    String laterAnalysisDate = formatDateTime(laterAnalysis.getCreatedAt());
    // complexity measures
    HistoryMeasure complexityMeasures = result.getMeasures(0);
    assertThat(complexityMeasures.getMetric()).isEqualTo(complexityMetric.getKey());
    assertThat(complexityMeasures.getHistoryList()).extracting(HistoryValue::getDate, HistoryValue::getValue)
      .containsExactly(tuple(analysisDate, "101"), tuple(laterAnalysisDate, "100"));
    // ncloc measures
    HistoryMeasure nclocMeasures = result.getMeasures(1);
    assertThat(nclocMeasures.getMetric()).isEqualTo(nclocMetric.getKey());
    assertThat(nclocMeasures.getHistoryList()).extracting(HistoryValue::getDate, HistoryValue::getValue, HistoryValue::hasValue).containsExactly(
      tuple(analysisDate, "201", true), tuple(laterAnalysisDate, "", false));
    // new_violation measures
    HistoryMeasure newViolationMeasures = result.getMeasures(2);
    assertThat(newViolationMeasures.getMetric()).isEqualTo(newViolationMetric.getKey());
    assertThat(newViolationMeasures.getHistoryList()).extracting(HistoryValue::getDate, HistoryValue::getValue)
      .containsExactly(tuple(analysisDate, "5"), tuple(laterAnalysisDate, "10"));
  }

  @Test
  void pagination_applies_to_analyses() {
    project = db.components().insertPrivateProject();
    userSession.addProjectPermission(ProjectPermission.USER, project.getProjectDto())
      .registerBranches(project.getMainBranchDto());
    List<String> analysisDates = LongStream.rangeClosed(1, 9)
      .mapToObj(i -> dbClient.snapshotDao().insert(dbSession, newAnalysis(project.mainBranchUuid()).setCreatedAt(i * 1_000_000_000)))
      .peek(a -> dbClient.projectMeasureDao().insert(dbSession, newProjectMeasureDto(complexityMetric, project.mainBranchUuid(), a).setValue(101d)))
      .map(a -> formatDateTime(a.getCreatedAt()))
      .toList();
    db.commit();

    SearchHistoryRequest request = SearchHistoryRequest.builder()
      .setComponent(project.projectKey())
      .setMetrics(asList(complexityMetric.getKey(), nclocMetric.getKey(), newViolationMetric.getKey()))
      .setPage(2)
      .setPageSize(3)
      .build();
    SearchHistoryResponse result = call(request);

    assertThat(result.getPaging()).extracting(Paging::getPageIndex, Paging::getPageSize, Paging::getTotal).containsExactly(2, 3, 9);
    assertThat(result.getMeasures(0).getHistoryList()).extracting(HistoryValue::getDate).containsExactly(
      analysisDates.get(3), analysisDates.get(4), analysisDates.get(5));
  }

  @Test
  void inclusive_from_and_to_dates() {
    project = db.components().insertPrivateProject();
    userSession.addProjectPermission(ProjectPermission.USER, project.getProjectDto())
      .registerBranches(project.getMainBranchDto());
    List<String> analysisDates = LongStream.rangeClosed(1, 9)
      .mapToObj(i -> dbClient.snapshotDao().insert(dbSession, newAnalysis(project.mainBranchUuid()).setCreatedAt(System2.INSTANCE.n


	"payforpost.net": true,
	"payforpost.org": true,
	"paygo.id": true,
	"paykasabozdurma.org": true,
	"paylasimisi.com": true,
	"paylevo.net": true,
	"paym22.xyz": true,
	"paymaya.cf": true,
	"paymenex.cd": true,
	"payment.tj": true,
	"payment1ab1.com": true,
	"paymentfortoday.com": true,
	"paymentfortoday1.com": true,
	"paymentmaster.gq": true,
	"paymentsbotswana.com": true,
	"paymobet.com": true,
	"paynetcollect.com": true,
	"payo22.xyz": true,
	"payola-test.com": true,
	"payop.xyz": true,
	"payot.club": true,
	"payotta.net": true,
	"payoumoney.com": true,
	"paypalserviceirc.com": true,
	"paypaywin.fun": true,
	"paypaywin.host": true,
	"paypaywin.press": true,
	"paypaywin.site": true,
	"paypaywin.website": true,
	"payperdonation.org": true,
	"payperex2.com": true,
	"paypirus.com": true,
	"payprinar.ga": true,
	"payprinar.ml": true,
	"payprinar.tk": true,
	"payrolltax.in": true,
	"payru-avito.ru": true,
	"payseho.cf": true,
	"payseho.ga": true,
	"payseho.gq": true,
	"payseho.ml": true,
	"payseho.tk": true,
	"paysgateway.com": true,
	"payshow.website": true,
	"paysite02.icu": true,
	"payslink.best": true,
	"paysop.xyz": true,
	"payspc.com": true,
	"payspun.com": true,
	"paytakht021.com": true,
	"payterking.cf": true,
	"payterking.gq": true,
	"payterking.ml": true,
	"payterking.tk": true,
	"paytopay.xyz": true,
	"paytv.rent": true,
	"paytvgratis.click": true,
	"paytvgratis.info": true,
	"paytvgratis.net": true,
	"paytvgratis.online": true,
	"payweiner.com": true,
	"payxinsijitv.info": true,
	"pb-shelley.cf": true,
	"pb-shelley.ga": true,
	"pb-shelley.gq": true,
	"pb-shelley.ml": true,
	"pb-shelley.tk": true,
	"pb2019zone.com": true,
	"pb3rr.us": true,
	"pb5g.com": true,
	"pb641.site": true,
	"pbastaff.org": true,
	"pbbilling.com": true,
	"pbesjk.site": true,
	"pbestore.com": true,
	"pbjmpgne.shop": true,
	"pbmbill247.com": true,
	"pbqr.org": true,
	"pbs1914alabama.org": true,
	"pbs83c.us": true,
	"pbvm.ru": true,
	"pbw2.cf":


�רָצִים","xlit":"pᵉrâtsîym","pron":"per-aw-tseem'","derivation":"plural of H6556 (פֶּרֶץ); breaks;","strongs_def":"Peratsim, a mountain in Palestine","kjv_def":"Perazim."},
"H6560":{"lemma":"פֶּרֶץ עֻזָּא","xlit":"Perets ʻUzzâʼ","pron":"peh'-rets ooz-zaw'","derivation":"from H6556 (פֶּרֶץ) and H5798 (עֻזָּא); break of Uzza;","strongs_def":"Perets-Uzza, a place in Palestine","kjv_def":"Perezuzza."},
"H6561":{"lemma":"פָּרַק","xlit":"pâraq","pron":"paw-rak'","derivation":"a primitive root;","strongs_def":"to break off or crunch; figuratively, to deliver","kjv_def":"break (off), deliver, redeem, rend (in pieces), tear in pieces."},
"H6562":{"lemma":"פְּרַק","xlit":"pᵉraq","pron":"per-ak'","derivation":"(Aramaic) corresponding to H6561 (פָּרַק);","strongs_def":"to discontinue","kjv_def":"break off."},
"H6563":{"lemma":"פֶּרֶק","xlit":"pereq","pron":"peh'-rek","derivation":"from H6561 (פָּרַק);","strongs_def":"rapine; also a fork (in roads)","kjv_def":"crossway, robbery."},
"H6564":{"lemma":"פָּרָק","xlit":"pârâq","pron":"paw-rawk'","derivation":"from H6561 (פָּרַק);","strongs_def":"soup (as full of crumbed meat)","kjv_def":"broth. See also H4832 (מַרְפֵּא)."},
"H6565":{"lemma":"פָּרַר","xlit":"pârar","pron":"paw-rar'","derivation":"a primitive root;","strongs_def":"to break up (usually figuratively), i.e. to violate, frustrate","kjv_def":"[idiom] any ways, break (asunder), cast off, cause to cease, [idiom] clean, defeat, disannul, disappoint, dissolve, divide, make of none effect, fail, frustrate, bring (come) to nought, [idiom] utterly, make void."},
"H6566":{"lemma":"פָּרַשׂ","xlit":"pâras","pron":"paw-ras'","derivation":"a primitive root;","strongs_def":"to break apart, disperse, etc.","kjv_def":"break, chop in pieces, lay open, scatter, spread (abroad, forth, selves, out), stretch (forth, out)."},
"H6567":{"lemma":"פָּרָשׁ","xlit":"pârâsh","pron":"paw-rash'","derivation":"a primitive root;","strongs_def":"to separate, literally (to disperse) or figuratively (to specify); also (by implication) to wound","kjv_def":"scatter, declare, distinctly, shew, sting."},
"H6568":{"lemma":"פְּרַשׁ","xlit":"pᵉrash","pron":"per-ash'","derivation":"(Aramaic) corresponding to H65


a.brand:hover,a.brand:focus{color:#fff}.page-header,.menu a.brand{padding-top:15px;padding-bottom:15px}.page-alert{position:absolute;z-index:200;float:left;margin-left:20px;width:860px;top:-22px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.alert{background:#f5f5f5;border:1px solid #d1d1d1;border-bottom:2px solid #d1d1d1;-webkit-box-shadow:0 1px 1px rgba(255,255,255,0.8);-moz-box-shadow:0 1px 1px rgba(255,255,255,0.8);box-shadow:0 1px 1px rgba(255,255,255,0.8);color:#94a8b7}.page-header+.alert{margin-top:1em}.console{background:#3b4d59;padding:10px;color:#b2c1cc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.console .error{color:#ffc40d}h4.sep{background-color:#eee;padding:5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;clear:both}#lastest-jobs{height:190px;width:860px}.chart rect{fill:#98985e;-webkit-transition:all .1s;-moz-transition:all .1s;-o-transition:all .1s;transition:all .1s}.chart rect:hover,.chart rect:focus{fill:#33414c;cursor:pointer}.x-axis line,.x-axis path,.axis path{stroke:#666;fill:none}.y-axis line,.y-axis path{fill:none;stroke:#666}.y-axis{margin-right:2px}.y-axis,.x-axis,.axis text{shape-rendering:crispEdges;font-size:10px;color:#666}.axis-legend{fill:#888;font-size:10px}.workers-menu .head,.workers-menu .head+dd{border-top:1px solid #555}.log-area{background-color:#fff;list-style:none;margin:0 0 20px;border-top:1px solid #dedede;border-bottom:2px solid #dedede;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.log-area .type{text-transform:uppercase}.log-area .label{line-height:1em;padding:3px 4px;margin-top:2px;width:40px;float:left;text-align:center;text-transform:uppercase;margin-right:20px;margin-left:10px}.log-area .worker{color:#999;font-size:.85em;font-style:normal;width:140px;display:inline-block;float:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:20px;direction:rtl;text-align:left}.log-area li{border-bottom:1px solid #eee;padding:5px 10px 5px 0;*zoom:1}.log-area li:before,.log-area li:after{display:table;content:"";line-height:0}.log-area li:after{clear:both}.log-area li:hover,.log-area li:focus{background-color:#fff9e8}.log-area .log-message{float:left;width:300px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.log-area .li-head,.log-area .li-head:hover{background:#dedede;font-weight:bold;color:#555;padding:4px 2px 4px 10px;border-top:1px solid #f7f7f7;border-bottom:1px solid #d1d1d1}.log-area li[data-verbosity="debug"]{color:#999}.log-area .filter-event{background-col


 Haskell
[pandoc](https://github.com/jgm/pandoc)|21,049|Haskell|2,548|Universal markup converter

# haxe

Repo|star|language|fork|intro
-|-|-|-|-

# hcl

Repo|star|language|fork|intro
-|-|-|-|-
[peladonerd](https://github.com/pablokbs/peladonerd)|590|HCL|297|Repo con los archivos que uso para mi videos en youtube
[terraform-aws-eks](https://github.com/terraform-aws-modules/terraform-aws-eks)|1,546|HCL|1,233|Terraform module to create an Elastic Kubernetes (EKS) cluster and associated worker instances on AWS
[terraform-aws-s3-bucket](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket)|107|HCL|323|Terraform module which creates S3 bucket resources on AWS
[terraform-google-network](https://github.com/terraform-google-modules/terraform-google-network)|118|HCL|263|A Terraform module that makes it easy to set up a new VPC Network in GCP.
[terraform-google-kubernetes-engine](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine)|421|HCL|357|A Terraform module for configuring GKE clusters.
[flyte](https://github.com/lyft/flyte)|1,101|HCL|74|develop, execute, and monitor distributed workflows reliably at scale.
[azure_arc](https://github.com/microsoft/azure_arc)|149|HCL|72|Azure Arc demo environments bootstrapping for everyone
[terraform-guides](https://github.com/hashicorp/terraform-guides)|841|HCL|560|Example usage of HashiCorp Terraform
[terraform-aws-iam](https://github.com/terraform-aws-modules/terraform-aws-iam)|278|HCL|274|Terraform module which creates IAM resources on AWS
[terraform-aws-elastic-beanstalk-environment](https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment)|195|HCL|201|Terraform module to provision an AWS Elastic Beanstalk Environment
[terraform-aws-lambda](https://github.com/terraform-aws-modules/terraform-aws-lambda)|110|HCL|62|Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations
[terraform-google-project-factory](https://github.com/terraform-google-modules/terraform-google-project-factory)|363|HCL|262|Opinionated Google Cloud Platform project creation and configuration with Shared VPC, IAM, APIs, etc.
[viya4-iac-azure](https://github.com/sassoftware/viya4-iac-azure)|10|HCL|3|This project contains Terraform configuration files to provision infrastructure components required to deploy SAS Viya 4+ VA/VS/VDMML products on Microsoft Azure Cloud.
[terraform-aws-alb](https://github.com/terraform-aws-modules/terraform-aws-alb)|190|HCL|286|Terraform module to create


ration = duration;
        }

        fileName: string = "";
        audioSpriteIndex: number = 0;
        startTime: number = 0;
        duration: number = 0;

    }

    function getSound(soundFileName: string): Sound {
        let fn: string;
        let extIndex: number = soundFileName.lastIndexOf(".");
        if (extIndex === -1) {
            // add wav extension
            fn = (soundFileName + ".wav").toLowerCase();
        } else {
            fn = soundFileName.toLowerCase();
        }
        if (!soundDictionary.hasOwnProperty(fn)) {
            return null;
        }
        return soundDictionary[fn];
    }

    let _addAudioSpritesCalled: boolean = false;
    let _waitForJsonLoad: boolean = false; // used to fudge number of audio sprites so the game doesn't load without them being ready
    let _numAudioSpritesReady: number = 0;

    let _audioContext: AudioContext = new ((window as any).AudioContext || (window as any).webkitAudioContext)();

    let masterSFXGain: GainNode = null;
    let masterMusicGain: GainNode = null;
    let generalSFXGain: GainNode = null;
    let generalMusicGain: GainNode = null;
    if (_audioContext == null) {
        console.error("AudioContext could not be created.  This browser does not support this game's audio.");
    } else {
        // setting up nodes to link sound through
        masterSFXGain = _audioContext.createGain();
        masterSFXGain.connect(_audioContext.destination);
        generalSFXGain = _audioContext.createGain();
        generalSFXGain.connect(masterSFXGain);
        masterMusicGain = _audioContext.createGain();
        masterMusicGain.connect(_audioContext.destination);
        generalMusicGain = _audioContext.createGain();
        generalMusicGain.connect(masterMusicGain);
    }

    let dummyAudio: HTMLAudioElement = new Audio(); // only used to check if the browser can play .ogg files or not.

    let audioSprites: Array<AudioSprite> = [];
    let soundDictionary: { [filename: string]: Sound; } = {};

    let sourceNodes: Array<AudioSpriteSourceNode> = []; // record of source nodes formed.  Are removed when the source nodes stop playing.
    function audioSourceNodeOnEnd(e: Event) { // removes from record of source nodes
        let sourceNode: AudioSpriteSourceNode = (e.target as AudioSpriteSourceNode);
        let index: number = sourceNodes.indexOf(sourceNode);
        if (index !== -1) {
            sourceNodes.splice(index, 1);
        }
        sourceNode.removeEventListener("ended", audioSourceNodeOnEnd);
    }

    // https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API

}let isBoolean: boolean = true;
let isString: string = '123';
let isNumber: number = 132;
let isArray: number [] = [1,2,3];
let isArray2: Array<number> = [1,2,3];

// 元组 Tuple 一个已知元素数量和类型的数组，各元素的类型不必相同
let isTule: [number, string] = [1, '12'];

// 枚举 enum
enum Color {Red = 1, Blue = 2, Green = 3};
let color: Color = Color.Red
console.log('color:', color)

// 任意类型
let isAny: any = 123;
isAny = '321'
console.log(isAny);

// void空类型 函数没有返回时
function isVoid(): void{
  console.log('isVoid')
}

// null 与 undefined 是所有类型的子类型
let isNull: null = null;
let isUndefined: undefined = undefined;

// never类型表示的是那些永不存在的值的类型 无法存在到达的点
function isNever(message: string): never{
  throw new Error(message);
}

// object
let isObj: object = {
  name: '123'
};

function createObj(o: object | null):void{
  console.log(o);
}
createObj({name: 123})

// 断言类型 as 或者 <>

let isAs: any = 123;
// let is


t); i++)
        list->freeItem(list->arr[i]);

    list->count = 0;

}

/** This function will take the vector address as a parameter,
 * then it will destroy and free the vector and all it's items.
 *
 * @param list the vector address
 */

void destroyVector(void *list) {

    if (list == NULL) {
#ifdef C_DATASTRUCTURES_ERRORSTESTSTRUCT_H
        ERROR_TEST->errorCode = NULL_POINTER;
        return;
#else
        fprintf(stderr, NULL_POINTER_MESSAGE, "vector", "vector data structure");
        exit(NULL_POINTER);
#endif

    }

    clearVector(list);
    free(((Vector *) list)->arr);
    free(list);

}


 __DATE__, __TIME__, __FILE__);
    int i;
    struct uref *uref = NULL;
    uint8_t *buf;
    int size;

    /* uref and mem management */
    struct umem_mgr *umem_mgr = umem_alloc_mgr_alloc();
    assert(umem_mgr != NULL);
    struct udict_mgr *udict_mgr = udict_inline_mgr_alloc(UDICT_POOL_DEPTH, umem_mgr, -1, -1);
    assert(udict_mgr != NULL);
    struct uref_mgr *uref_mgr = uref_std_mgr_alloc(UREF_POOL_DEPTH, udict_mgr, 0);
    assert(uref_mgr != NULL);

    /* block */
    struct ubuf_mgr *block_mgr = ubuf_block_mem_mgr_alloc(UBUF_POOL_DEPTH,
            UBUF_POOL_DEPTH, umem_mgr,
            UBUF_PREPEND,
            UBUF_APPEND,
            UBUF_ALIGN,
            UBUF_ALIGN_OFFSET);
    assert(block_mgr);

    /* uprobe stuff */
    struct uprobe uprobe;
    uprobe_init(&uprobe, catch, NULL);
    struct uprobe *uprobe_stdio = uprobe_stdio_alloc(&uprobe, stdout,
                                                     UPROBE_LOG_DEBUG);
    assert(uprobe_stdio != NULL);

    uref = uref_block_flow_alloc_def(uref_mgr, "foo.");
    assert(uref);

    /* build skip pipe */
    struct upipe_mgr *upipe_skip_mgr = upipe_skip_mgr_alloc();
    assert(upipe_skip_mgr);
    struct upipe *skip = upipe_void_alloc(upipe_skip_mgr,
                uprobe_pfx_alloc(uprobe_use(uprobe_stdio), UPROBE_LOG_LEVEL,
                                 "skip"));
    assert(skip);
    ubase_assert(upipe_set_flow_def(skip, uref));

    uref_free(uref);
    ubase_assert(upipe_get_flow_def(skip, &uref));
    const char *def;
    ubase_assert(uref_flow_get_def(uref, &def));
    assert(!strcmp(def, "block.foo."));

    /* skip_test */
    struct upipe *skip_test = upipe_void_alloc(&skip_test_mgr,
            uprobe_pfx_alloc(uprobe_use(uprobe_stdio), UPROBE_LOG_LEVEL,
                             "skiptest"));
    assert(skip_test != NULL);
    ubase_assert(upipe_set_output(skip, skip_test));
    upipe_release(skip_test);
    ubase_assert(upipe_skip_set_offset(skip, OFFSET));

    /* Now send uref */
    for (i=0; i < ITERATIONS; i++) {
        uref = uref_block_alloc(uref_mgr, block_mgr, SIZE);
        size = -1;
        uref_block_write(uref, 0, &size, &buf);
        memcpy(buf, TESTSTR, sizeof(TESTSTR));
        uref_block_unmap(uref, 0);
        upipe_input(skip, uref, NULL);
    }

    /* release pipe */
    upipe_release(skip);
    test_free(skip_test);

    /* release managers */
    upipe_mgr_release(upipe_skip_mgr); // no-op
    uref_mgr_release(uref_mgr);
    ubuf_mgr_release(block_mgr);
    umem_mgr_release(umem_mgr);
    udict_mgr_release(udict_mgr);
    uprobe_release(uprobe_stdio);
    uprobe_clean(&uprobe);

    return 0;
}