com/cilium/hive/hivetest"
	"github.com/cilium/statedb"
	"github.com/stretchr/testify/require"

	"github.com/cilium/cilium/pkg/hive"
)

func TestForwardableIPManager(t *testing.T) {
	var (
		fim *ForwardableIPManager
		fip statedb.Table[*ForwardableIP]
		db  *statedb.DB
	)

	h := hive.New(
		ForwardableIPCell,
		cell.Provide(NewCommonTestConfig(true, false)),
		cell.Invoke(func(
			fim_ *ForwardableIPManager,
			fip_ statedb.Table[*ForwardableIP],
			db_ *statedb.DB,
		) {
			fim = fim_
			fip = fip_
			db = db_
		}),
	)

	err := h.Populate(hivetest.Logger(t))
	require.NoError(t, err, "Failed to run hive")

	nodeOwner := ForwardableIPOwner{
		Type: ForwardableIPOwnerNode,
		ID:   "node1",
	}
	serviceOwner := ForwardableIPOwner{
		Type: ForwardableIPOwnerService,
		ID:   "svc1",
	}
	ip1 := netip.MustParseAddr("10.0.0.1")
	ip2 := netip.MustParseAddr("20.0.0.2")

	// Insert ip1:nodeowner and ip2:serviceOwner
	// We expect to see these in the table
	err = fim.Insert(ip1, nodeOwner)
	require.NoError(t, err)
	err = fim.Insert(ip2, serviceOwner)
	require.NoError(t, err)

	fis := statedb.Collect(fip.All(db.ReadTxn()))
	require.ElementsMatch(t, fis, []*ForwardableIP{
		{
			IP:     ip1,
			Owners: []ForwardableIPOwner{nodeOwner},
		},
		{
			IP:     ip2,
			Owners: []ForwardableIPOwner{serviceOwner},
		},
	})

	// Delete ip2:serviceOwner, should remove it from the table
	err = fim.Delete(ip2, serviceOwner)
	require.NoError(t, err)
	fis = statedb.Collect(fip.All(db.ReadTxn()))
	require.ElementsMatch(t, fis, []*ForwardableIP{
		{
			IP:     ip1,
			Owners: []ForwardableIPOwner{nodeOwner},
		},
	})

	// Insert ip1:nodeOwner, which already exists, should not modify the table
	err = fim.Insert(ip1, nodeOwner)
	require.NoError(t, err)
	fis = statedb.Collect(fip.All(db.ReadTxn()))
	require.ElementsMatch(t, fis, []*ForwardableIP{
		{
			IP:     ip1,
			Owners: []ForwardableIPOwner{nodeOwner},
		},
	})

	// Insert ip1:serviceOwner, should add the service owner to the existing entry
	err = fim.Insert(ip1, serviceOwner)
	require.NoError(t, err)
	fis = statedb.Collect(fip.All(db.ReadTxn()))
	require.ElementsMatch(t, fis, []*ForwardableIP{
		{
			IP:     ip1,
			Owners: []ForwardableIPOwner{nodeOwner, serviceOwner},
		},
	})

	// Delete ip1:nodeOwner, should remove the node owner from the existing entry
	// but keep the entry in the table
	err = fim.Delete(ip1, nodeOwner)
	require.NoError(t, err)
	fis = statedb.Collect(fip.All(db.ReadTxn()))
	require.ElementsMatch(t, fis, []*ForwardableIP{
		{
			IP:     ip1,
			Owners: []ForwardableIPOwner{serviceOwner},
		},
	})
}
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium

package config

// Node configuration is present in all objects and doesn't have a dedicated
// ELF, so pull it out of bpf_lxc.
//go:generate go run github.com/ciliu


 string in Insert Visual mode`() {
    configureByText("123")
    typeText("i<C-O>v")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(insert) VISUAL", statusString)
  }

  @Test
  fun `test status string in Replace pending Visual mode`() {
    configureByText("123")
    typeText("R<C-O>v")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(replace) VISUAL", statusString)
  }

  @Test
  fun `test status string in Insert Visual block mode`() {
    configureByText("123")
    typeText("i<C-O><C-V>")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(insert) V-BLOCK", statusString)
  }

  @Test
  fun `test status string in Replace pending Visual block mode`() {
    configureByText("123")
    typeText("R<C-O><C-V>")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(replace) V-BLOCK", statusString)
  }

  @Test
  fun `test status string in Insert Visual line mode`() {
    configureByText("123")
    typeText("i<C-O>V")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(insert) V-LINE", statusString)
  }

  @Test
  fun `test status string in Replace pending Visual line mode`() {
    configureByText("123")
    typeText("R<C-O>V")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(replace) V-LINE", statusString)
  }

  @Test
  fun `test status string in Insert Select mode`() {
    configureByText("123")
    typeText("i<C-O>gh")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(insert) SELECT", statusString)
  }

  @Test
  fun `test status string in Insert Select mode 2`() {
    configureByText("123")
    enterCommand("set selectmode=key keymodel=startsel")
    typeText("i<S-Right>")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(insert) SELECT", statusString)
  }

  @Test
  fun `test status string in Insert Select block mode`() {
    configureByText("123")
    typeText("i<C-O>g<C-H>")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(insert) S-BLOCK", statusString)
  }

  @Test
  fun `test status string in Insert Select line mode`() {
    configureByText("123")
    typeText("i<C-O>gH")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(insert) S-LINE", statusString)
  }

  @Test
  fun `test status string in Visual with Select pending`() {
    configureByText("123")
    enterCommand("set selectmode=key keymodel=startsel")
    typeText("<S-Right><C-O>")
    val statusString = VimModeWidget.getModeText(fixture.editor.vim.mode)
    assertEquals("(select) VISUAL", statusString)
  }
}
/*
 * Copyright 2003-2023 The IdeaVim authors
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE.txt file or at
 * https://opensource.org/licenses/MIT.
 */
package org.jetbrains.plugins.ideavim.helper


上面的操作似乎已经可以匹配出数字了，但是记住，test()方法中，如果你要验证整个字符串只能是数字，必须加上正则的开始符号^和结束符号$，表示的是从字符串'123'开头匹配到结尾都必须满足数字，如果中间插入其他字符'1kk2什么3'，就匹配失败。所以最终的正则写法是 /^\d+$/，或者是/^\d+$/g，这里的g可加可不加。
```javascript
var user = '123' //可以把123改成任意字符来测试。
if (/^\d+$/g.test(user)) {} //写法1 if(true){}
if (/^[0-9]+$/g.test(user)) {} //写法2 if(true){}
```
#### 场景2：账号只能是字母

数字匹配完了，换成字母会不会呢？只要把\d或[0-9]改成字母的正则就行了。字母包含大小写，所以使用[a-zA-Z]。如果去掉^和$，那么仅仅是匹配user字符串中是否包含字母，使用indexOf()或者includes()代替。
```javascript
var user = 'hyy' //可以把hyy改成任意字符来测试。
if (/^[a-zA-Z]+$/g.test(user)) {} //if(true){}
```

#### 场景3：账号只能是字母开头，并且字母和数字的组合，长度范围是6-10。

单打了2轮，不够爽，来一套组合拳。上面学习了 ^ $ [0-9] [a-zA-Z] + 这几个正则符号的使用，一定要记下来，很常用的。这组合拳似乎有点复杂，不过不怕，遇到这种问题，我们第一步还是提取规则：
**字母开头；**
**字母和数字组合；**
**长度6-10。**

1、你脑子里要想着 **/^what❓$/.test(user)** 的结构。

2、字母开头，那么就是第一个字符必须是字母。你需要学习一个新的正则，大括号{n,m}，x{1}表示匹配前面的字符1次，x{2}表示匹配2次符合x的字符，还可以写成x{1,3}，表示匹配符合x正则的符合最少1次，最多3次。说这段话你一下子理解不了，就跳过。我们只看{1}这种情况。所以，现在加上字母开头这条规则之后，正则变成了 **/^[a-zA-Z]{1}}/**，注意，我暂时没有写结束符号，最后再加上。
```javascript
/^[a-zA-Z]{1}}/
```

3、字母和数字组合，我们是不是要写成[a-zA-Z]\d呢？其实还有一个更好的办法，你又学到了一个新的正则\w，\w和


.get(rarityName);
  }

  /**
   * Returns the number of needed cards to upgrade a card to the next level.
   * On failed lookup it will return -1.
   *
   * @param rarityName The rarity (e. g. 'Common')
   * @param currentLevel Current card level (e. g. 12)
   */
  export function getCardUpgradeCount(rarityName: Rarity, currentLevel: number): number {
    // Index -1 because card levels are not zero indexed
    return rarityByName.get(rarityName).upgradeMaterialCount[currentLevel - 1];
  }
}
/// <reference path="../../localtypings/blockly.d.ts" />

namespace pxtblockly {

    export class FieldColorWheel extends Blockly.FieldSlider implements Blockly.FieldCustom {
        public isFieldCustom_ = true;

        private params: any;

        /**
         * Class for a color wheel field.
         * @param {number|string} value The initial content of the field.
         * @param {Function=} opt_validator An optional function that is called
         *     to validate any constraints on what the user entered.  Takes the new
         *     text as an argument and returns either the accepted text, a replacement
         *     text, or null to abort the change.
         * @extends {Blockly.FieldNumber}
         * @constructor
         */
        constructor(value_: any, params: any, opt_validator?: Function) {
            super(String(value_), '0', '255', null, '10', 'Color', opt_validator);
            this.params = params;
            if (this.params['min']) this.min_ = parseFloat(this.params['min']);
            if (this.params['max']) this.max_ = parseFloat(this.params['max']);
            if (this.params['label']) this.labelText_ = this.params['label'];
        }

        /**
         * Set the gradient CSS properties for the given node and channel
         * @param {Node} node - The DOM node the gradient will be set on.
         * @private
         */
        setBackground_(node: Element) {
            let gradient = this.createColourStops_().join(',');
            goog.style.setStyle(node, 'background',
                '-moz-linear-gradient(left, ' + gradient + ')');
            goog.style.setStyle(node, 'background',
                '-webkit-linear-gradient(left, ' + gradient + ')');
            goog.style.setStyle(node, 'background',
                '-o-linear-gradient(left, ' + gradient + ')');
            goog.style.setStyle(node, 'background',
                '-ms-linear-gradient(left, ' + gradient + ')');
            goog.style.setStyle(node, 'background',
                'linear-gradient(left, ' + gradient + ')');
            if (this.params['sliderWidth'])
                goog.style.setStyle(node, 'width',
                    `${this.params['sliderWidth']}px`)
        };

        setReadout_(readout: Element, value: string) {
            const hexValue = this.colorWheel(parseInt(value));
            readout.innerHTML = `<span class="blocklyColorReadout" style="background-color: ${hexValue};"></span>`;
        }

        createColourStops_() {
            let stops: string[] = [];
            for (let n = 0; n <= 255; n += 20) {
                stops.push(this.colorWheel(n));
            }
            return stops;
        };

        colorWheel(wheelPos: number): string {
            wheelPos = 255 - wheelPos;
            if (wheelPos < 85) {
                return this.hex(wheelPos * 3, 255, 255 - wheelPos * 3);
            }
            if (wheelPos < 170) {
                wheelPos -= 85


ith D2 apply on all y sub-buffers of
        // size x (where x and y are the first and second dimensions).
        Algorithm {
            name: "moments",
            callback: callback_gen!(h,dim,dirs,bufs,param, {
                bufs!(bufs, "moments", 4,
                    src
                    tmp
                    sum
                    dst
                );
                let MomentsParam{ num, vect_dim: w, packed } = if let Ref(p) = param {
                    p.downcast_ref::<MomentsParam>().expect("Optional parameter of \"moment\" algorithm must be MomentsParam.").clone()
                } else {
                    MomentsParam{ num: 4, vect_dim: 1, packed: true }
                };
                if num < 1 { panic!("There must be at least one moment calculated in \"moments\" algorithm."); }

                let (l,size) = match dim {
                    D1(x) => (x,[x as u32,1,1]),
                    D2(x,y) => (x*y,[x as u32,y as u32,1]),
                    D3(x,y,z) => (x*y*z,[x as u32,y as u32,z as u32])
                };

                let sumsize = dirs.iter().fold(size.clone(), |mut a,dir| { a[*dir as usize] = 1; a });
                let sumlen = sumsize[0]*sumsize[1]*sumsize[2];
                let mut sizedst = [if packed { num } else { 1 },sumsize[0],sumsize[1],0];
                let mut ap = ReduceParam{ vect_dim: w, dst_size: Some(Packing::new(sizedst, packed)), window: None };
                h.run_algorithm("sum",dim,dirs,&[src,sum,dst],Ref(&ap))?;
                if num >= 1 {
                    h.run_arg("times",D1(l*w as usize),&[BufArg(&src,"a"),BufArg(&src,"b"),BufArg(&tmp,"dst")])?;
                    sizedst[3] = 1;
                    ap.dst_size = Some(Packing::new(sizedst, packed));
                    h.run_algorithm("sum",dim,dirs,&[tmp,sum,dst],Ref(&ap))?;
                    h.set_arg("times",&[BufArg(&tmp,"a")])?;
                }
                for i in 2..num {
                    h.run("times",D1(l*w as usize))?;
                    sizedst[3] = i as u32;
                    ap.dst_size = Some(Packing::new(sizedst, packed));
                    h.run_algorithm("sum",dim,dirs,&[tmp,sum,dst],Ref(&(ap)))?;
                }
                h.run_arg("ctimes",D1((num*w*sumlen) as usize),&[BufArg(&dst,"src"),Param("c",F64(sumlen as f64/l as f64)),BufArg(&dst,"dst")])?;

                Ok(None)
            }),
            needed: vec![
                KernelName("times"),
                KernelName("ctimes"),
                AlgorithmName("sum"),
            ]
        },
        gen_random!(u64 philox2x64_10,CU64,2),
        gen_random!(u64 philox4x64_10,CU64,4),
        gen_random!(u32 philox4x32_10,CU32,2),//WARNING because floating point results are f64 this 4x32 is considered to take element as if they were u64 (so two u32 count for one)
        ].into_iter().map(|a| (a.name,a)).collect()
}

#[allow(non_snake_case)]
fn C(n: usize, k: usize) -> usize {
    if k == 0 || k == n {
        1
    } else {
        C(n - 1, k - 1) + C(n - 1, k)
    }
}

// Only for D1
pub fn moments_to_cumulants(moments: &[f64], w: usize


roup = id,
    buffer = bufid,
    callback = QuitPre,
  })
  vim.api.nvim_create_autocmd({ 'WinLeave' }, {
    group = id,
    buffer = bufid,
    callback = WinLeave,
  })
  vim.api.nvim_create_autocmd({ 'WinEnter' }, {
    group = id,
    buffer = bufid,
    callback = function()
      vim.b.git_commit_quitpre = false
    end,
  })
  return bufid
end
local function on_exit(id, code, single)
  log.debug(string.format('code %d, single %d', code, single))
  if id ~= commit_jobid then
    return
  end
  if code == 0 and single == 0 then
    nt.notify('commit done!')
    return
  end
  local iscommitmsg = false
  for _, line in ipairs(commit_output) do
    if not iscommitmsg and vim.startswith(line, '1111111111111111111111') then
      iscommitmsg = true
    else
      if vim.startswith(line, '22222222222222222222') then
        break
      end
      if iscommitmsg then
        table.insert(commitmsg, line)
      end
    end
  end
  if #commitmsg > 0 then
    if
      vim.api.nvim_buf_is_valid(commit_bufnr)
      and vim.fn.index(vim.fn.tabpagebuflist(), commit_bufnr) ~= -1
    then
      local winnr = vim.fn.bufwinnr(commit_bufnr)
      vim.cmd(winnr .. 'wincmd w')
    else
      commit_bufnr = openCommitBuffer()
    end
    vim.api.nvim_buf_set_lines(commit_bufnr, 0, -1, false, commitmsg)
    vim.bo.modified = false
  else
    nt.notify(table.concat(commit_output, "\n"), 'WarningMsg')
  end
end

local function index(t, v)
  if not t then
    return -1
  end

  return vim.fn.index(t, v)
end

function M.run(argv)
  local cmd
  commit_output = {}
  commitmsg = {}

  if index(argv, '--amend') ~= -1 then
    isamend = true
  else
    isamend = false
  end
  cmd = {
    'git',
    '--no-pager',
    '-c',
    [[core.editor=nvim -u NONE --headless -n --cmd "set shada=" --cmd "call chansend(v:stderr, ['1111111111111111111111', ''])" --cmd "call chansend(v:stderr, readfile(bufname()))" --cmd "call chansend(v:stderr, ['', '22222222222222222222'])" --cmd "cq 1"]],
    '-c',
    'color.status=always',
    '-C',
    vim.fn.expand(vim.fn.getcwd(), ':p'),
    'commit',
  }
  for _, v in ipairs(argv) do
    table.insert(cmd, v)
  end
  log.debug('git-commit cmd:' .. vim.inspect(cmd))
  commit_jobid = job.start(cmd, {
    on_stdout = on_stdout,
    on_exit = on_exit,
    on_stderr = on_stderr,
  })
end

return M


mat where (x1, y1) is the
        top-left corner and (x2, y2) is the bottom-right corner.

        Args:
            boxes_xywh (np.ndarray): The input bounding box coordinates in (x, boxes_xyxy, width, height) format.

        Returns:
            boxes_xyxy (np.ndarray): The bounding box coordinates in (x1, y1, x2, y2) format.
        """
        if not boxes_xywh.shape[-1] == 4:
            raise ValueError(f"Expected input shape with last dimension 4, got {boxes_xywh.shape}")

        boxes_xyxy = np.empty_like(boxes_xywh)
        dw = boxes_xywh[..., 2] / 2  # half-width
        dh = boxes_xywh[..., 3] / 2  # half-height
        boxes_xyxy[..., 0] = boxes_xywh[..., 0] - dw  # top left x
        boxes_xyxy[..., 1] = boxes_xywh[..., 1] - dh  # top left boxes_xyxy
        boxes_xyxy[..., 2] = boxes_xywh[..., 0] + dw  # bottom right x
        boxes_xyxy[..., 3] = boxes_xywh[..., 1] + dh  # bottom right boxes_xyxy

        return boxes_xyxy


over-formatting-table {
		padding: 12px 12px 0px 12px;
	}

	.hashover .hashover-formatting-table > * {
		display: table-row;
		width: 100%;
		border-bottom: 1px solid #555555;
	}

	.hashover .hashover-formatting-table p {
		margin-bottom: 12px;
	}
}
/* @license
 * Rams <https://github.com/jacobxperez/rams/>
 * Copyright (C) 2024 Jacob Perez <jacobxperez@gmx.com>
 * Licensed under the Apache License, Version 2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 */

/* Theme Settings */
@import "settings.css";

/* Mixins */
@import "core/mixins/import.css";

/* Reset */
@import "core/reset/base.css";
@import "core/reset/typography.css";
@import "core/reset/link.css";
@import "core/reset/blockquote.css";
@import "core/reset/code.css";
@import "core/reset/list.css";
@import "core/reset/tables.css";
@import "core/reset/forms.css";
@import "core/reset/selection.css";

/* Components */
@import "core/components/layout/container.css";
@import "core/components/layout/grid.css";
@import "core/components/dropdown/dropbox.css";
@import "core/components/dropdown/menu.css";
@import "core/components/dropdown/tooltip.css";
@import "core/components/dropdown/toggle.css";
@import "core/components/dropdown/state.css";
@import "core/components/navigation/anchor.css";
@import "core/components/navigation/breadcrumb.css";
@import "core/components/navigation/line.css";
@import "core/components/navigation/navbar.css";
@import "core/components/buttons/button.css";
@import "core/components/buttons/buttons.css";
@import "core/components/buttons/link.css";
@import "core/components/buttons/disabled.css";

/* Custom Modules */
@import "custom/sections.css";
@import "custom/lexica-ultralegible.css";
/* -------------- */

/* Utilities */
@import "core/utilities/position.css";
@import "core/utilities/display.css";
@import "core/utilities/box.css";
@import "core/utilities/text.css";
@import "core/utilities/flex-box.css";

/* Breakpoints */
@import "core/breakpoints/import.css";

/* Print */
@import "custom/print.css";
:--headings {
    font-family: $headings-font-family;
    font-weight: $headings-font-weight;
    font-variant-ligatures: $headings-ligatures;
    @if $headings-color != false {
        color: $headings-color;
    }
}

@include _heading(h1, $h1-font-size, $h1-line-height);

@include _heading(h2, $h2-font-size, $h2-line-height);

@include _heading(h3, $h3-font-size, $h3-line-height);

@include _heading(h4, $h4-font-size, $h4-line-height);

@include _heading(h5, $h5-font-size, $h5-line-height);

@include _heading(h6, $h6-font-size, $h6-line-height);

b,
strong {
    font-weight: bolder;
}

i,
em,
dfn {
    font-style: italic;
}

[title]:where(abbr, dfn) {
    text-decoration: $tooltip-text-decoration;
    text-underline-offset: $tooltip-underline-offset;
    cursor: help;


EW, waterPlanarReflectionViewTm);
        d3d::settm(TM_PROJ, &waterPlanarReflectionProjTm);
        set_viewvecs_to_shader(waterPlanarReflectionViewTm, waterPlanarReflectionProjTm);

        CameraViewVisibilityMgr *camJobsMgr = cameraHndl.ref().jobsMgr;
        camJobsMgr->waitGroundReflectionVisibility();
        renderLmeshReflection(camJobsMgr->getLandMeshReflectionCullingData());
      };
    });
}

void WorldRenderer::closeWaterPlanarReflection()
{
  get_daskies()->destroy_skies_data(refl_pov_data);
  refl_pov_data = nullptr;
  waterPlanarReflectionCloudsNode = {};
  planarReflectionMipRenderer.reset();
}

void WorldRenderer::calcWaterPlanarReflectionMatrix()
{
  bool volumtetricClouds = get_daskies() && !get_daskies()->panoramaEnabled();
  if (!isWaterPlanarReflectionTerrainEnabled() && !volumtetricClouds)
    return;

  TMatrix reflection;
  reflection.setcol(0, 1.f, 0.f, 0.f);
  reflection.setcol(1, 0.f, -1.f, 0.f);
  reflection.setcol(2, 0.f, 0.f, 1.f);
  reflection.setcol(3, 0.f, 2.f * waterLevel, 0.f);

  TMatrix itm = reflection * currentFrameCamera.viewItm;
  itm.setcol(1, -itm.getcol(1)); // Flip Y to preserve culling.

  TMatrix4 proj = currentFrameCamera.noJitterProjTm; // jitter causes flickering while looking down close to the waterLevel

  proj(2, 1) *= -1; // if perspective matrix is not symmetrical, we should have the opposite y offset for waterProj matrix
  Point4 worldClipPlane(0, 1, 0, -waterLevel);
  TMatrix4 waterProj = oblique_projection_matrix_reverse<true>(proj, itm, worldClipPlane);
  if (fabs(det4x4(waterProj)) < 1e-15) // near plane is not perpendicular to water plane
    waterProj = currentFrameCamera.noJitterProjTm;

  waterPlanarReflectionViewItm = itm;
  waterPlanarReflectionViewTm = inverse(itm);
  waterPlanarReflectionProjTm = waterProj;
  // some params like star brightness depend on persp, for these we want to use the same as for sky rendering
  waterPlanarReflectionPersp = currentFrameCamera.noJitterPersp;

  Point3 reflectionPos = waterPlanarReflectionViewItm.getcol(3);
  Point3 reflectionDir = waterPlanarReflectionViewItm.getcol(2);
  Point3 farPlanePoint = reflectionPos + reflectionDir * waterPlanarReflectionPersp.zf;

  ShaderGlobal::set_color4(var::water_planar_reflection_dir, reflectionDir, 0);
  ShaderGlobal::set_color4(var::water_planar_reflection_far_plane_pos, farPlanePoint, 0);
  ShaderGlobal::set_float4x4(var::water_planar_reflection_view_proj,
    TMatrix4(waterPlanarReflectionViewTm) * waterPlanarReflectionProjTm);
}

void WorldRenderer::setupSkyPanoramaAndReflectionFromSetting(bool first_init)
{
  const DataBlock &blk = *originalLevelBlk.getBlockByNameEx("skies");
  panoramaPosition = blk.getPoint3("panoramaPosition", Point3(0, 10, 0)); // by default, set at 10meters above sea level
  bool usePanoramaLevel = blk.getBool("usePanorama", true);
  const char *cloudsQuality = ::dgs_get_settings()->getBlockByNameEx("graphics")->getStr("cloudsQuality", "default");
  bool volumetricClouds = strcmp(cloudsQuality, "volumetric") == 0;
  bool usePanorama = is_panorama_forced() || (isForwardRender() ? true : (usePanoramaLevel && !vol


VoiceDetector = new VoiceDetectorShort(samplingRate, channels);
                }
                else
                {
                    throw new Exception("VoiceLevelDetectCalibrate: type not supported: " + x[0].GetType());
                }
                calibration = new VoiceDetectorCalibration<T>(VoiceDetector, LevelMeter, samplingRate, channels);
            }

            /// <summary>Start calibration</summary>
            /// <param name="durationMs">Duration of the calibration procedure (in milliseconds).</param>
            /// <param name="onCalibrated">Called when calibration is complete. Parameter is new threshold value.</param>
            /// This activates the Calibration process.
            /// It will reset the given LevelMeter's AccumAvgPeakAmp (accumulated average peak amplitude),
            /// and when the duration h


lass="dragitem" draggable="true">item10

    <button class="fab" id="importBtn">import draggable-polyfill</button>


 License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 * @bug 8246774
 * @summary Checks that the appropriate default value is given to the canonical ctr
 * @library /test/lib
 * @modules jdk.compiler
 * @compile AssignableFrom.java Point.java DefaultValues.java SuperStreamFields.java
 * @run testng DefaultValuesTest
 */

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import org.testng.annotations.Test;
import static java.io.ObjectStreamConstants.*;
import static java.lang.System.out;
import static org.testng.Assert.*;

/**
 * Basic test to check that default primitive / reference values are
 * presented to the record's canonical constructor, for fields not in
 * the stream.
 */
public class DefaultValuesTest extends AbstractTest {

    /**
     * Returns a stream of bytes for the given class, uid, flags. The
     * stream will have no stream field values.
     */
    static byte[] byteStreamFor(String className, long uid, byte flags)
        throws Exception
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream dos = new DataOutputStream(baos);
        dos.writeShort(STREAM_MAGIC);
        dos.writeShort(STREAM_VERSION);
        dos.writeByte(TC_OBJECT);
        dos.writeByte(TC_CLASSDESC);
        dos.writeUTF(className);
        dos.writeLong(uid);
        dos.writeByte(flags);
        dos.writeShort(0);             // number of fields
        dos.writeByte(TC_ENDBLOCKDATA);   // no annotations
        dos.writeByte(TC_NULL);           // no superclasses
        dos.close();
        return baos.toByteArray();
    }

    /** Basic test with a simple Point. */
    @Test
    public void testPoint() throws Exception {
        out.println("--- testPoint ");

        byte[] bytes = byteStreamFor("PointImpl", 5L, (byte)SC_SERIALIZABLE);

        Point point = deserializeAsPlain(bytes);
        out.println("deserialized: " + point);
        assertEquals(point.x(), 0);
        assertEquals(point.y(), 0);

        point = deserializeAsRecord(bytes);
        out.println("deserialized: " + point);
        assertEquals(point.x(), 0);
        assertEquals(point.y(), 0);
    }

    // ---

    static class Defaults {  // default values
        static boolean bool;
        static byte by;
        static char ch;
        static short sh;
        static int i;
        static long l;
        static float f;
        static double d;
        static String str;
        static Object obj;
        static int[] ia;
        static Object[] oa;
    }

    /** A more comprehensive test with all primitives, reference, and array. */
    @Test
    public void testAllDefaults() throws Exception {
        out.println("--- testAllDefaults ");

        Point point = newPlainPoint(43, 98);
        DefaultValues o = newPlainDefaultValues(point);
        out.println("serialize   :" + o);
        byte[] bytes = serialize(o);
        DefaultValues o1 = deserializeAsRecord(bytes);
        out.println("deserialized: " + o1);

        assertEquals(o1.point().x(), point.x());   // sanity
        assertEquals(o1.point().y(), point.y());   // sanity
        assertTrue(o1.bool() == Defaults.bool);
        assertTrue(o1.by() == Defaults.by);
        assertTrue(o1.ch() == Defaults.ch);
        assertTrue(o1.sh() == Defaults.sh);
        assertTrue(o1.i() == Defaults.i);
        assertTrue(o1.l() == Defaults.l);
        assertTrue(o1.f() == Defaults.f);
        assertTrue(o1.d() == Defaults.d);
        assertTrue(o1.str() == Defaults.


ine input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Credential
Specifies the credentials when connecting to a remote computer.

```yaml
Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -InputObject
Accepts an iSCSI virtual disk snapshot object from the input pipeline.

```yaml
Type: IscsiVirtualDiskSnapshot
Parameter Sets: InputObject
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SnapshotId
Specifies the identifier (ID) for the snapshot.

```yaml
Type: String
Parameter Sets: SnapshotId
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### Microsoft.Iscsi.Target.Commands.IscsiVirtualDiskSnapshot

## OUTPUTS

### None

## NOTES

## RELATED LINKS

[Export-IscsiVirtualDiskSnapshot](./Export-IscsiVirtualDiskSnapshot.md)

[Get-IscsiVirtualDiskSnapshot](./Get-IscsiVirtualDiskSnapshot.md)

[Mount-IscsiVirtualDiskSnapshot](./Mount-IscsiVirtualDiskSnapshot.md)

[Remove-IscsiVirtualDiskSnapshot](./Remove-IscsiVirtualDiskSnapshot.md)

[Set-IscsiVirtualDiskSnapshot](./Set-IscsiVirtualDiskSnapshot.md)

---
UID: NS:d3dkmthk._D3DKMT_CREATEHWCONTEXT
title: _D3DKMT_CREATEHWCONTEXT (d3dkmthk.h)
description: A structure holding information to create a hardware context.
old-location: display\d3dkmt_createhwcontext.htm
ms.date: 05/10/2018
keywords: ["D3DKMT_CREATEHWCONTEXT structure"]
ms.keywords: D3DKMT_CREATEHWCONTEXT, D3DKMT_CREATEHWCONTEXT structure [Display Devices], _D3DKMT_CREATEHWCONTEXT, d3dkmthk/D3DKMT_CREATEHWCONTEXT, display.d3dkmt_createhwcontext
req.header: d3dkmthk.h
req.include-header:
req.target-type: Windows
req.target-min-winverclnt:
req.target-min-winversvr:
req.kmdf-ver:
req.umdf-ver:
req.ddi-compliance:
req.unicode-ansi:
req.idl:
req.max-support:
req.namespace:
req.assembly:
req.type-library:
req.lib:
req.dll:
req.irql:
targetos: Windows
tech.root: display
req.typenames: D3DKMT_CREATEHWCONTEXT
f1_keywords:
 - _D3DKMT_CREATEHWCONTEXT
 - d3dkmthk/_D3DKMT_CREATEHWCONTEXT
 - D3DKMT_CREATEHWCONTEXT
 - d3dkmthk/D3DKMT_CREATEHWCONTEXT
topic_type:
 - APIRef
 - kbSyntax
api_type:
 - HeaderDef
api_location:
 - d3dkmthk.h
api_name:
 - _D3DKMT_CREATEHWCONTEXT
 - D3DKMT_CREATEHWCONTEXT
---

# _D3DKMT_CREATEHWCONTEXT structure

## -description

A structure holding information to create a hardware context.

## -struct-fields

### -field hDevice

Handle to the device owning this context.

### -field NodeOrdinal

Identifier for the node targeted by this context.

### -field EngineAffinity

Engine affinity within the specified node.

### -field Flags

Context creation flags.

### -


// check if we can read values after writing using stream writer
func TestStreamWriter1(t *testing.T) {
	test := func(t *testing.T, opts *Options) {
		runBadgerTest(t, opts, func(t *testing.T, db *DB) {
			// write entries using stream writer
			noOfKeys := 10
			valueSize := 128
			list := getSortedKVList(valueSize, noOfKeys)
			sw := db.NewStreamWriter()
			require.NoError(t, sw.Prepare(), "sw.Prepare() failed")
			require.NoError(t, sw.Write(list), "sw.Write() failed")
			require.NoError(t, sw.Flush(), "sw.Flush() failed")

			err := db.View(func(txn *Txn) error {
				// read any random key from inserted keys
				keybyte := make([]byte, 8)
				keyNo := uint64(rand.Int63n(int64(noOfKeys)))
				binary.BigEndian.PutUint64(keybyte, keyNo)
				_, err := txn.Get(keybyte)
				require.Nil(t, err, "key should be found")

				// count all keys written using stream writer
				keysCount := 0
				itrOps := DefaultIteratorOptions
				it := txn.NewIterator(itrOps)
				defer it.Close()
				for it.Rewind(); it.Valid(); it.Next() {
					keysCount++
				}
				require.True(t, keysCount == noOfKeys, "count of keys should be matched")
				return nil
			})
			require.NoError(t, err, "error while retrieving key")
		})
	}
	t.Run("Normal mode", func(t *testing.T) {
		normalModeOpts := getTestOptions("")
		test(t, &normalModeOpts)
	})
	t.Run("Managed mode", func(t *testing.T) {
		managedModeOpts := getTestOptions("")
		test(t, &managedModeOpts)
	})
	t.Run("InMemory mode", func(t *testing.T) {
		diskLessModeOpts := getTestOptions("")
		diskLessModeOpts.InMemory = true
		test(t, &diskLessModeOpts)
	})
}

/*

// write more keys to db after writing keys using stream writer
func TestStreamWriter2(t *testing.T) {
	test := func(t *testing.T, opts *Options) {
		runBadgerTest(t, opts, func(t *testing.T, db *DB) {
			// write entries using stream writer
			noOfKeys := 1000
			valueSize := 128
			list := getSortedKVList(valueSize, noOfKeys)
			sw := db.NewStreamWriter()
			require.NoError(t, sw.Prepare(), "sw.Prepare() failed")
			require.NoError(t, sw.Write(list), "sw.Write() failed")
			// get max version of sw, will be used in transactions for managed mode
			maxVs := sw.maxVersion
			require.NoError(t, sw.Flush(), "sw.Flush() failed")

			// delete all the inserted keys
			val := make([]byte, valueSize)
			y.Check2(rand.Read(val))
			for i := 0; i < noOfKeys; i++ {
				txn := db.newTransaction(true, opts.managedTxns)
				if opts.managedTxns {
					txn.readTs = math.MaxUint64
					txn.commitTs = maxVs
				}
				keybyte := make([]byte, 8)
				keyNo := uint64(i)
				binary.BigEndian.PutUint64(keybyte, keyNo)
				require.NoError(t, txn.Delete(keybyte), "error while deleting keys")
				require.NoError(t, txn.Commit(), "error while commit")
			}

			// verify while iteration count of keys should be 0
			err := db.View(func(txn *Txn) error {
				key


private String parseEncoding(String xmlDeclFinal, int eqIndex) throws IOException {
        java.util.StringTokenizer strTok = new java.util.StringTokenizer(
            xmlDeclFinal.substring(eqIndex + 1));
        if (strTok.hasMoreTokens()) {
            String encodingTok = strTok.nextToken();
            int indexofQ = encodingTok.indexOf("?");
            if (indexofQ > -1) {
                return encodingTok.substring(0,indexofQ);
            } else {
                return encodingTok;
            }
        } else {
            throw new IOException("Error parsing 'encoding' attribute in XML declaration");
        }
    }

}
/*
 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

package com.sun.xml.internal.messaging.saaj.soap;

import java.io.*;
import java.util.logging.Logger;

import javax.xml.soap.*;

import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ParseException;
import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
import com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl;
import com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl;
import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
import com.sun.xml.internal.messaging.saaj.util.TeeInputStream;

/**
 * A factory for creating SOAP messages.
 *
 * Converted to a placeholder for common functionality between SOAP
 * implementations.
 *
 * @author Phil Goodwin (phil.goodwin@sun.com)
 */
public class MessageFactoryImpl extends MessageFactory {

    protected static final Logger log =
        Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
                         "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");

    protected  OutputStream listener;

    protected boolean lazyAttachments = false;

    public  OutputStream listen(OutputStream newListener) {
        OutputStream oldListener = listener;
        listener = newListener;
        return oldListener;
    }

    public SOAPMessage createMessage() throws SOAPException {
        throw new UnsupportedOperationException();
    }

    public SOAPMessage createMessage(boolean isFastInfoset,
        boolean acceptFastInfoset) throws SOAPException
    {
        throw new UnsupportedOperationException();
    }

    public SOAPMessage createMessage(MimeHeaders headers, InputStream in)
        throws SOAPException, IOException {
        String contentTypeString = MessageImpl.getContentType(headers);

        if (listener != null) {
            in = new TeeInputStream(in, listener);
        }

        try {
            ContentType contentType = new ContentType(contentTypeString);
            int stat = MessageImpl.identifyContentType(


 1, 1, 1, 1, 1, 1, 1,
		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
		2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
		3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
		4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
		4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
		0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
		5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
		6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 7,
		9, 10, 10, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 14
)
val stateTransitionLookup = intArrayOf(
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 2, 0, 0, 0, 3, 4, 6, 5, 7, 8, 9, 1, 10, 11,
		0, 2, 0, 0, 0, 3, 4, 6, 5, 7, 8, 9, 0, 0, 11,
		0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
		0, 2, 0, 0, 0, 3, 4, 6, 5, 7, 8, 9, 1, 10, 11
)

fun isValidRsv(bytes: ByteArray): Boolean {
	var lastState = 1
	for (i in bytes.indices) {
		val currentByte: Int = bytes[i].toUByte().toInt()
		val currentByteClass = byteClassLookup[currentByte]
		val newStateLookupIndex = lastState * 15 + currentByteClass
		lastState = stateTransitionLookup[newStateLookupIndex]
		if (lastState == 0) {
			return false
		}
	}
	return lastState == 1
}

// ----------------------------------------------------------------------

fun escapeJsonString(str: String): String {
	val result = StringBuilder()
	result.append("\"")
	for (i in 0 until str.length) {
		val c = str[i].toInt()
		if (c == 0x08) {
			result.append("\\b")
		} else if (c == 0x09) {
			result.append("\\t")
		} else if (c == 0x0A) {
			result.append("\\n")
		} else if (c == 0x0C) {
			result.append("\\f")
		} else if (c == 0x0D) {
			result.append("\\r")
		} else if (c == 0x22) {
			result.append("\\\"")
		} else if (c == 0x5C) {
			result.append("\\\\")


-19.9-3.2-22-8.2-6.4-15.3 9.2-22 9.2-22-8.1-5-9-9.9-9.8-8.1-2.4 5.8-3.6 20.1-10.1 26.5-8.8 8.9-25.5 5.9-35.3.8-10.8-5.7.8-19.2.8-19.2s-5.8 3.4-10.5-3.6c-6-9.3-17.1-37.3 11.5-62-1.3-10.1-4.6-53.7 40.6-85.6 0 0-20.6-22.8-12.9-43.3 5-13.4 7-13.3 8.6-13.9 5.7-2.2 11.3-4.6 15.4-9.1 20.6-22.2 46.8-18 46.8-18s12.4-37.8 23.9-30.4c3.5 2.3 16.3 30.6 16.3 30.6s13.6-7.9 15.1-5c8.2 16 9.2 46.5 5.6 65.1-6.1 30.6-21.4 47.1-27.6 57.5-1.4 2.4 16.5 10 27.8 41.3 10.4 28.6 1.1 52.7 2.8 55.3.8 1.4 13.7.8 36.4-13.2 12.8-7.9 28.1-16.9 45.4-17 16.7-.5 17.6 19.2 4.9 22.2zM496 256c0 136.9-111.1 248-248 248S0 392.9 0 256 111.1 8 248 8s248 111.1 248 248zm-79.3 75.2c-1.7-13.6-13.2-23-28-22.8-22 .3-40.5 11.7-52.8 19.2-4.8 3-8.9 5.2-12.4 6.8 3.1-44.5-22.5-73.1-28.7-79.4 7.8-11.3 18.4-27.8 23.4-53.2 4.3-21.7 3-55.5-6.9-74.5-1.6-3.1-7.4-11.2-21-7.4-9.7-20-13-22.1-15.6-23.8-1.1-.7-23.6-16.4-41.4 28-12.2.9-31.3 5.3-47.5 22.8-2 2.2-5.9 3.8-10.1 5.4h.1c-8.4 3-12.3 9.9-16.9 22.3-6.5 17.4.2 34.6 6.8 45.7-17.8 15.9-37 39.8-35.7 82.5-34 36-11.8 73-5.6 79.6-1.6 11.1 3.7 19.4 12 23.8 12.6 6.7 30.3 9.6 43.9 2.8 4.9 5.2 13.8 10.1 30 10.1 6.8 0 58-2.9 72.6-6.5 6.8-1.6 11.5-4.5 14.6-7.1 9.8-3.1 36.8-12.3 62.2-28.7 18-11.7 24.2-14.2 37.6-17.4 12.9-3.2 21-15.1 19.4-28.2z"],yelp:[384,512,[],"f1e9","M42.9 240.32l99.62 48.61c19.2 9.4 16.2 37.51-4.5 42.71L30.5 358.45a22.79 22.79 0 0 1-28.21-19.6 197.16 197.16 0 0 1 9-85.32 22.8 22.8 0 0 1 31.61-13.21zm44 239.25a199.45 199.45 0 0 0 79.42 32.11A22.78 22.78 0 0 0 192.94 490l3.9-110.82c.7-21.3-25.5-31.91-39.81-16.1l-74


';

import 'all.dart';

const kChecksumMagicNumber = 0xB1B0AFBA;

const _kMagicNumber = 0x5F0F3CF5;
const _kMacStyleRegular = 0;
const _kIndexToLocFormatShort = 0;
const _kIndexToLocFormatLong = 1;

const _kLowestRecPPEMdefault = 8;

const _kHeaderTableSize = 54;

class HeaderTable extends FontTable {
  HeaderTable(
      TableRecordEntry? entry,
      this.fontRevision,
      this.checkSumAdjustment,
      this.flags,
      this.unitsPerEm,
      this.created,
      this.modified,
      this.xMin,
      this.yMin,
      this.xMax,
      this.yMax,
      this.macStyle,
      this.lowestRecPPEM,
      this.indexToLocFormat)
      : majorVersion = 1,
        minorVersion = 0,
        fontDirectionHint = 2,
        glyphDataFormat = 0,
        magicNumber = _kMagicNumber,
        super.fromTableRecordEntry(entry);

  HeaderTable._(
      TableRecordEntry entry,
      this.majorVersion,
      this.minorVersion,
      this.fontRevision,
      this.checkSumAdjustment,
      this.magicNumber,
      this.flags,
      this.unitsPerEm,
      this.created,
      this.modified,
      this.xMin,
      this.yMin,
      this.xMax,
      this.yMax,
      this.macStyle,
      this.lowestRecPPEM,
      this.fontDirectionHint,
      this.indexToLocFormat,
      this.glyphDataFormat)
      : super.fromTableRecordEntry(entry);

  factory HeaderTable.fromByteData(ByteData data, TableRecordEntry entry) =>
      HeaderTable._(
          entry,
          data.getUint16(entry.offset),
          data.getUint16(entry.offset + 2),
          Revision.fromInt32(data.getInt32(entry.offset + 4)),
          data.getUint32(entry.offset + 8),
          data.getUint32(entry.offset + 12),
          data.getUint16(entry.offset + 16),
          data.getUint16(entry.offset + 18),
          data.getDateTime(entry.offset + 20),
          data.getDateTime(entry.offset + 28),
          data.getInt16(entry.offset + 36),
          data.getInt16(entry.offset + 38),
          data.getInt16(entry.offset + 40),
          data.getInt16(entry.offset + 42),
          data.getUint16(entry.offset + 44),
          data.getUint16(entry.offset + 46),
          data.getInt16(entry.offset + 48),
          data.getInt16(entry.offset + 50),
          data.getInt16(entry.offset + 52));

  factory HeaderTable.create(
    List<GenericGlyphMetrics> glyphMetricsList,
    GlyphDataTable? glyf,
    Revision revision,
    int unitsPerEm,
  ) {
    final now = MockableDateTime.now();

    final xMin = glyphMetricsList.fold<int>(
        kInt32Max, (prev, m) => math.min(prev, m.xMin));
    final yMin = glyphMetricsList.fold<int>(
        kInt32Max, (prev, m) => math.min(prev, m.yMin));
    final xMax = glyphMetricsList.fold<int>(
        kInt32Min, (prev, m) => math.max(prev, m.xMax));
    final yMax = glyphMetricsList.fold<int>(
        kInt32Min, (prev, m) => math.max(prev, m.yMax));

    return HeaderTable(
        null,
        revision,
        0, // Setting checkSum to zero first, calculating it at last for the entire font
        0x000B,
        unitsPerEm,
        now,


刪除點擊對象的文件鏈接或者文件夾

隨時可以點擊瀏覽器工具欄的ScrapbookQ圖標
            激活本頁面，也可以右擊圖標激活右鍵菜單

導入ScrapBook數據

修改scrapbookq\scrapbookq.conf

在rdfpath值的末尾添加ScrapBook數據文件scrapbook.rdf所在路徑

大概這個樣子： (windows): rdfpath=C:\\111\\ScrapBook\\;D:\\222\\ScrapBook\\;E:\\333\\ScrapBook\\

大概這個樣子： ( linux ): rdfpath=/111/ScrapBook/;/222/ScrapBook/;/333/ScrapBook/;

重新啟動firefox瀏覽器、如果原有ScrapBook數據比較多，第一次讀取數據會有點慢

<!DOCTYPE html>

    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Elements transition</title>

    <template id="list-a">

        A

        B

        C

    </template>
    <template id="list-b">

        D

        E

        F

    </template>


ager.fetch(fetchUrl, bucket, key, function (err, respBody, respInfo) {
    if (err) {
      console.log(err);
      res.json({
        code: 204,
        msg: err.error
      })
      return;
      //throw err;
    } else {
      if (respInfo.statusCode == 200) {
        res.json({
          code: 200,
          hash: respBody.hash,
          key: respBody.key
        })
      } else {
        console.log(respInfo)
        res.json({
          code: respInfo.status,
          error: respBody.error
        })
      }
    }
  });
}

/**
 * [getImageInfo Function]
 * @param accessKey: {{string}}
 * @param secretKey: {{string}}
 * @param bucket：: {{string}}
 * @param fileName: {{string}}
 */
function getImageInfo(req, res) {
  const accessKey = req.body.accessKey || '';
  const secretKey = req.body.secretKey || '';
  const bucket = req.body.bucket || '';

  var mac = new qiniu.auth.digest.Mac(accessKey, secretKey);
  var config = new qiniu.conf.Config();
  var bucketManager = new qiniu.rs.BucketManager(mac, config);

  var key = req.body.fileName || '';
  bucketManager.stat(bucket, key, function (err, respBody, respInfo) {
    if (err) {
      console.log(err);
      throw err;
    } else {
      if (respInfo.statusCode == 200) {
        res.json(respBody)
        console.log(respBody.hash);
        console.log(respBody.fsize);
        console.log(respBody.mimeType);
        console.log(respBody.putTime);
        console.log(respBody.type);
      } else {
        res.json({
          code: respInfo.statusCode,
          error: respBody.error
        })
        console.log(respInfo.statusCode);
        console.log(respBody.error);
      }
    }
  });
}

/**
 * [getImageList Function]
 * @param accessKey: {{string}}
 * @param secretKey: {{string}}
 * @param bucket：: {{string}}
 */
function getImageList(req, res) {
  const accessKey = req.body.accessKey || ''
  const secretKey = req.body.secretKey || ''
  const bucket = req.body.bucket || ''
  const marker = req.body.marker || ''
  const limit = req.body.limit || 20

  console.log(accessKey)
  var mac = new qiniu.auth.digest.Mac(accessKey, secretKey);

  if (!Object.keys(req.body).length) {
    req.body = "";
  }
  const accessToken = qiniuUtil.generateAccessToken(mac, "http://rsf.qbox.me/list?bucket=" + bucket + '&limit=' + limit + '&marker=' + marker)
  request
    .post('http://rsf.qbox.me/list?bucket=' + bucket + '&limit=' + limit + '&marker=' + marker)
    .timeout(10000)
    .set('Host', 'rsf.qbox.me')
    .set('Content-Type', 'application/x-www-form-urlencoded')
    .set('Authorization', accessToken)
    .end((err, resp) => {
      if (err) {
        console.log(err);
        res.json({
          code: 204,
          msg: '请求七牛资源失败，请重试'
        })
        return;
      }
      if (resp.status == 200) {
        let data = resp.text.replace(/\\/, "");
        data = JSON.parse(data)
        data.items.sort((obj1, obj2) => {
          return obj2.putTime - obj1.putTime;
        });
        res.json({
          code: 200,
          data: data
        })
      }


 is updated, the [TrmnlImageUpdateManager] will notify the observers.
 * In this case the [TrmnlMirrorDisplayScreen] will recompose and update the image.
 *
 * @see TrmnlImageUpdateManager
 * @see TrmnlMirrorDisplayScreen
 */
class TrmnlImageRefreshWorker(
    appContext: Context,
    params: WorkerParameters,
    private val displayRepository: TrmnlDisplayRepository,
    private val trmnlDeviceConfigDataStore: TrmnlDeviceConfigDataStore,
    private val refreshLogManager: TrmnlRefreshLogManager,
    private val trmnlWorkScheduler: TrmnlWorkScheduler,
    private val trmnlImageUpdateManager: TrmnlImageUpdateManager,
) : CoroutineWorker(appContext, params) {
    companion object {
        private const val TAG = "TrmnlWorker"

        const val KEY_REFRESH_RESULT = "refresh_result"
        const val KEY_NEW_IMAGE_URL = "new_image_url"
        const val KEY_ERROR_MESSAGE = "error_message"
        const val PARAM_REFRESH_WORK_TYPE = "refresh_work_type"
        const val PARAM_LOAD_NEXT_PLAYLIST_DISPLAY_IMAGE = "load_next_playlist_image"
    }

    override suspend fun doWork(): Result {
        Timber.tag(TAG).d("Starting image refresh work ($tags)")

        // Get the work type from the input data
        val workTypeValue = inputData.getString(PARAM_REFRESH_WORK_TYPE) ?: RefreshWorkType.ONE_TIME.name
        val loadNextPluginImage = inputData.getBoolean(PARAM_LOAD_NEXT_PLAYLIST_DISPLAY_IMAGE, false)

        Timber.tag(TAG).d("Work type: $workTypeValue, loadNextPluginImage: $loadNextPluginImage")

        // Get device config
        val deviceConfig: TrmnlDeviceConfig? = trmnlDeviceConfigDataStore.deviceConfigFlow.firstOrNull()

        if (deviceConfig == null) {
            Timber.tag(TAG).w("Device config and token is not set, skipping image refresh")
            refreshLogManager.addFailureLog("No device config with API token found")
            return Result.failure(
                workDataOf(
                    KEY_REFRESH_RESULT to FAILURE.name,
                    KEY_ERROR_MESSAGE to "No device config with API token found",
                ),
            )
        }

        // Fetch TRMNL display image - current or next from playlist based on request type
        // Also, if device type is BYOD or BYOS, we will always load the next playlist image
        // See https://discord.com/channels/1281055965508141100/1331360842809348106/1382865608236077086
        val trmnlDisplayInfo: TrmnlDisplayInfo =
            if (loadNextPluginImage || deviceConfig.type != TrmnlDeviceType.TRMNL) {
                displayRepository.getNextDisplayData(deviceConfig)
            } else {
                displayRepository.getCurrentDisplayData(deviceConfig)
            }

        // Check for errors
        if (trmnlDisplayInfo.status.isHttpError()) {
            Timber.tag(TAG).w("Failed to fetch display data: ${trmnlDisplayInfo.error}")
            refreshLogManager.addFailureLog(
                error = trmnlDisplayInfo.error ?: "Unknown server error",
                httpResponseMetadata = trmnlDisplayInfo.httpResponseMetadata,
            )
            return Result.failure(
                workDataOf(
                    KEY_REFRESH_RESULT to FAILURE.name,
                    KEY_ERROR_MESSAGE to (trmnlDisplayInfo.error ?: "Unknown server error"),
                ),
            )
        }

        // Check if image URL is valid
        if (trmnlDisplayInfo.imageUrl.isEmpty() || trmnlDisplayInfo.status.isHttpOk().not()) {
            Timber.tag(TAG).w("No image URL provided in response. ${trmnlDisplayInfo.error}")
            refreshLogManager.addFailureLog(
                error = "No image URL provided in response. ${trmnlDisplayInfo.error}",
                httpResponseMetadata = trmnlDisplayInfo.httpResponseMetadata,
            )
            return Result.failure(
                workDataOf(


border:none;margin-top:.75em;padding:.75em 1em}#write blockquote h6{color:var(--d-fc);margin-top:0;padding:0;font-size:1.125em}#write blockquote h6 a{margin-left:-.1em}#write blockquote h6:before{content:"";margin-left:0}.CodeMirror-scroll{border-radius:0 0 calc(var(--v-r-t) - 2px)calc(var(--v-r-t-xc) - 2px)}.CodeMirror pre{padding:0 10px}.md-fences[data-tag-group]{display:none}.md-fences.unwrap .CodeMirror-line{scrollbar-width:thin;overflow-y:auto;white-space:pre!important}.CodeMirror.cm-s-inner{background:var(--d-cb);padding:2px}.md-fences .CodeMirror.cm-s-inner[lang=math]{border-radius:var(--v-r-t)var(--v-r-t-xc)0 0}.md-fences .CodeMirror.cm-s-inner:not([lang=math]){border-radius:var(--v-r-t)var(--v-r-t-xc)}.v-caption.codeblock[data-cap-count="2"] .md-fences .CodeMirror.cm-s-inner:not([lang=math]){border-radius:0}content>#write .md-diagram .CodeMirror.cm-s-inner{border-radius:var(--v-r-t)var(--v-r-t-xc)0 0}.CodeMirror .CodeMirror-cursor{border-left:2px solid var(--cm-CodeMirror-cursor)}.CodeMirror-gutters{border-width:0;border-right:1px solid var(--pn-c);height:100%!important}.CodeMirror-linenumber{color:var(--d-fc-a);font-family:var(--v-f-fm-num);min-width:fit-content!important}content>#write .CodeMirror-focused .CodeMirror-activeline-gutter>.CodeMirror-linenumber{color:var(--h-f);font-weight:var(--v-f-w-bd)}.cm-s-inner :is(.cm-variable,.cm-operator,.cm-property){color:var(--cm-variable)}.cm-s-inner .cm-variable-2{color:var(--cm-variable-2)}.cm-s-inner .cm-variable-3{color:var(--cm-variable-3)}.cm-s-inner .cm-keyword{color:var(--cm-keyword)}.cm-s-inner .cm-tag{color:var(--cm-tag)}.cm-s-inner .cm-attribute{color:var(--cm-attribute)}.cm-s-inner .cm-string{color:var(--cm-string)}.cm-s-inner .cm-string-2{color:var(--cm-string-2)}.cm-s-inner .cm-comment,.cm-s-inner.cm-comment{color:var(--cm-comment)}.cm-s-inner :is(.cm-header,.cm-def),.cm-s-inner.cm-header,.cm-s-inner.cm-def{color:var(--cm-header)}.cm-s-inner .cm-quote,.cm-s-inner.cm-quote{color:var(--cm-quote)}.cm-s-inner .cm-hr{color:var(--cm-hr)}.cm-s-inner .cm-link{color:var(--cm-link);border-bottom:1px solid var(--cm-link);text-decoration:none}.cm-s-inner .cm-negative{color:var(--cm-negative)}.cm-s-inner .cm-positive{color:var(--cm-positive)}.cm-s-inner :is(.cm-meta,.cm-qualifier){color:var(--cm-meta)}.cm-s-inner .cm-builtin{color:var(--cm-bulidin)}.cm-s-inner .cm-bracket{color:var(--cm-bracket)}.cm-s-inner .cm-atom,.cm-s-inner.cm-atom{


p9] .ui.tiered.menu .sub.menu .active.item{
  padding-top: 0.83em;
  background-color: transparent;
  border-radius: 0 0 0 0;
  border-top: medium none;
  -webkit-box-shadow: none;
  box-shadow: none;
  color: rgba(0, 0, 0, 0.7) !important;
}
micro-app[name=test-app9] .ui.tiered.menu .sub.menu .active.item:after{
  display: none;
}
/* Inverted */
micro-app[name=test-app9] .ui.inverted.tiered.menu > .menu > .item{
  color: rgba(255, 255, 255, 0.5);
}
micro-app[name=test-app9] .ui.inverted.tiered.menu .sub.menu{
  background-color: rgba(0, 0, 0, 0.2);
}
micro-app[name=test-app9] .ui.inverted.tiered.menu .sub.menu .item{
  color: rgba(255, 255, 255, 0.6);
}
micro-app[name=test-app9] .ui.inverted.tiered.menu > .menu > .item:hover{
  color: rgba(255, 255, 255, 0.9);
}
micro-app[name=test-app9] .ui.inverted.tiered.menu .active.item:after{
  display: none;
}
micro-app[name=test-app9] .ui.inverted.tiered.menu > .sub.menu > .active.item,
micro-app[name=test-app9] .ui.inverted.tiered.menu > .menu > .active.item{
  color: #ffffff !important;
  -webkit-box-shadow: none;
  box-shadow: none;
}
/* Tiered pointing */
micro-app[name=test-app9] .ui.pointing.tiered.menu > .menu > .item:after{
  display: none;
}
micro-app[name=test-app9] .ui.pointing.tiered.menu > .sub.menu > .item:after{
  display: block;
}
/*--------------
     Tabular
---------------*/
micro-app[name=test-app9] .ui.tabular.menu{
  background-color: transparent;
  border-bottom: 1px solid #DCDDDE;
  border-radius: 0em;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}
micro-app[name=test-app9] .ui.tabular.menu .item{
  background-color: transparent;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  border-top: 1px solid transparent;
  padding-left: 1.4em;
  padding-right: 1.4em;
  color: rgba(0, 0, 0, 0.6);
}
micro-app[name=test-app9] .ui.tabular.menu .item:before{
  display: none;
}
/* Hover */
micro-app[name=test-app9] .ui.tabular.menu .item:hover{
  background-color: transparent;
  color: rgba(0, 0, 0, 0.8);
}
/* Active */
micro-app[name=test-app9] .ui.tabular.menu .active.item{
  position: relative;
  background-color: #FFFFFF;
  color: rgba(0, 0, 0, 0.8);
  border-color: #DCDDDE;
  font-weight: bold;
  margin-bottom: -1px;
  border-bottom: 1px solid #FFFFFF;
  -webkit-box-shadow: none;
  box-shadow: none;
  border-radius: 5px 5px 0 0;
}
/* Coupling with


/../testing';

// to test an attribute directive (changes the appearance of a DOM element, ex: background color when a user rolls over a row)
  // you need a host component that uses it. Host component will have a different  element per test case.
  // DISTINCT in ATTRIBUTE DIRECTIVE testing
@Component({
  template: `

  `
})
class TestComponent { }

describe('Directive: FavoriteIconDirective', () => {
  // part 1 : declare the variables

  // fixture: stores an instance of the ComponentFixture, which contains methods that help debug and test a component
  let fixture: ComponentFixture<any>; // type is any because this is our made up component as opposed to testing a real one in COMPONENT T.
  const expectedSolidStarList = constants.classes.SOLID_STAR_STYLE_LIST; // an array of classes for a solid star
  const expectedOutlineStarList = constants.classes.OUTLINE_STAR_STYLE_LIST; // an array of classes for an outlined star

  beforeEach(() => {
    // declare the testModuleMetadata to contain the information needed to configure TestBed
      // the difference from chapter 3 is that we create a variable testModuleMetadata to contain the data
      // this object will conform to the TestModuleMetadata interface and get passed in to the configureTestingModule method
      // configureTestingModule configures the TestBed on line 37
    const testModuleMetadata: TestModuleMetadata = {
      declarations: [FavoriteIconDirective, TestComponent]
    };
    // configure TestBed using the testModuleMetadata variable
      // TestBed is a class that you use to setup and configure your tests
      // use it any time you want to write a unit test that tests components, directives and services
    // the fixture variable stores the component-like object from the TestBed.createComponent method
      // createComponent is used to return an instance of ComponentFixture
    // part 2 & 3: setup the TestBed and initialize the fixture variable
    fixture = TestBed.configureTestingModule(testModuleMetadata).createComponent(TestComponent);
    // detectChanges: invoke change detection in unit tests and render updated data whenever an event occurs
    fixture.detectChanges();
  });
  afterEach(() => { fixture = null; }); // make sure the fixture object is destroyed after each test

  // every test will follow this pattern
    // create new instance of a component
    // run some kind of event
    // check that the element changed as expected

  describe('When favorite icon is set to true', () => {
    let starElement; // reference the star element, set it to null
    beforeEach(() => {
      // in TestComponent (line 17) we created a template with 4 elements in an array, for our test cases
      const defaultTrueElementIndex = 0;
      // to get startElement from fixture, we use a helper method called getStarElement
        // it extracts a child element from the fixture
      starElement = getStarElement(fixture, defaultTrueElementIndex);
    });
    afterEach(() => { starElement = null; }); // reset starElement after each test

    it('should display a solid gold star after the page loads', () => {
      // check that the element includes a solid gold star after the page loads
      expect(starElement.style.color).toBe('gold');
      // check that the colors list matches the colors in our elements list, using doClassesMatch helper method
        // the method takes an element and a list of styles, makes sure they match by looping through the styles in the list


: #007700">as $field) {
        echo "<td>$field</td>";
    }
    echo "</tr>\n";
}
echo "</table>\n";
?>

Example #3 How to handle UNBUFFERED queries

<?php

$result = dbx_query ($link, 'SELECT id, parentid, description FROM table', DBX_RESULT_UNBUFFERED);

echo "<table>\n";
while ($row = dbx_fetch_row($result)) {
    echo "<tr>\n";
    foreach ($row as $field) {
        echo "<td>$field</td>";
    }
    echo "</tr>\n";
}
echo "</table>\n";

<span style="co


GPART_TAG_INCLUDE_SEARCH_UP = 0,
	ID_CA_RIGPART_TAG_INCLUDE_SEARCH_DOWN,
	ID_CA_RIGPART_TAG_INCLUDE_SEARCH_UP_DOWN,
	ID_CA_RIGPART_TAG_INCLUDE_SEARCH_FULL,
	ID_CA_RIGPART_TAG_INCLUDE_SEARCH_UP_LEVEL,

	ID_CA_RIGPART_TAG_INSERT_RULE_ANY = 0,
	ID_CA_RIGPART_TAG_INSERT_RULE_SINGLE,
	ID_CA_RIGPART_TAG_INSERT_RULE_NO_SAMELEVEL,
	ID_CA_RIGPART_TAG_INSERT_RULE_NO_ROOT,

	ID_CA_RIGPART_TAG_INCLUDE_SEARCH_MATCH_MARKER = 0,
	ID_CA_RIGPART_TAG_INCLUDE_SEARCH_MATCH_NAME_TYPE,
	ID_CA_RIGPART_TAG_INCLUDE_SEARCH_MATCH_NAME_NOCASE,

	ID_CA_RIGPART_TAG_OBJECTLINKS_TYPE_PSR = 0,
	ID_CA_RIGPART_TAG_OBJECTLINKS_TYPE_PLANE,
	ID_CA_RIGPART_TAG_OBJECTLINKS_TYPE_AIM,
	ID_CA_RIGPART_TAG_OBJECTLINKS_TYPE_POINT,
	ID_CA_RIGPART_TAG_OBJECTLINKS_TYPE_CUSTOM,
	ID_CA_RIGPART_TAG_OBJECTLINKS_TYPE_SELECTION,

	ID_CA_RIGPART_TAG_OBJECTLINKS_PSR_MODE_OFF = 0,
	ID_CA_RIGPART_TAG_OBJECTLINKS_PSR_MODE_FREEZE,
	ID_CA_RIGPART_TAG_OBJECTLINKS_PSR_MODE_RETAIN,

	ID_CA_RIGPART_TAG_OBJECTLINKS_AIM_MODE_X = 0,
	ID_CA_RIGPART_TAG_OBJECTLINKS_AIM_MODE_Y,
	ID_CA_RIGPART_TAG_OBJECTLINKS_AIM_MODE_Z,
	ID_CA_RIGPART_TAG_OBJECTLINKS_AIM_MODE_NX,
	ID_CA_RIGPART_TAG_OBJECTLINKS_AIM_MODE_NY,
	ID_CA_RIGPART_TAG_OBJECTLINKS_AIM_MODE_NZ,

	ID_CA_RIGPART_TAG_OBJECTLINKS_SELECTION_MODE_PSR = 0,
	ID_CA_RIGPART_TAG_OBJECTLINKS_SELECTION_MODE_POS,
	ID_CA_RIGPART_TAG_OBJECTLINKS_SELECTION_MODE_POSSCL,
	ID_CA_RIGPART_TAG_OBJECTLINKS_SELECTION_MODE_SCL,

	ID_CA_RIGPART_TAG_HANDLES_INEX_INCLUDE = 0,
	ID_CA_RIGPART_TAG_HANDLES_INEX_EXCLUDE,

	ID_CA_RIGPART_TAG_EXPRESSIONS_INEX_INCLUDE = 0,
	ID_CA_RIGPART_TAG_EXPRESSIONS_INEX_EXCLUDE,

	ID_CA_RIGPART_TAG_CHARACTER_SIZE_NONE = 0,
	ID_CA_RIGPART_TAG_CHARACTER_SIZE_AUTO,
	ID_CA_RIGPART_TAG_CHARACTER_SIZE_MANUAL,

	ID_CA_RIGPART_TAG_MIRROR_SYM_COMPONENT = 0,
	ID_CA_RIGPART_TAG_MIRROR_SYM_ANY,
	ID_CA_RIGPART_TAG_MIRROR_SYM_SELF,

	ID_CA_RIGPART_TAG_HANDLES_COL_COMPONENT = 0,
	ID_CA_RIGPART_TAG_HANDLES_COL_OBJECT,
	ID_CA_RIGPART_TAG_HANDLES_COL_CUSTOM,

	ID_CA_RIGPART_TAG_LAYERS_INEX_INCLUDE = 0,
	ID_CA_RIGPART_TAG_LAYERS_INEX_EXCLUDE,

	// match tcavs.h

	ID_CA_RIGPART_TAG_HOTSPOTS_ACTION_MOVE = 0,
	ID_CA_RIGPART_TAG_HOTSPOTS_ACTION_SCALE,
	ID_CA_RIGPART_TAG_HOTSPOTS_ACTION_ROTATE,
	ID_CA_RIGPART_TAG_HOTSPOTS_ACTION_COMMAND,
	ID_CA_RIGPART_TAG_HOTSPOTS_ACTION_NONE = 6,

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

	ID_CA_RIGPART_TAG_DUMMY
};

#endif // TCARIGPART_H__


insert(&mut self, _state: &usize) {
            self.inserted += 1;
        }

        fn clear(&mut self) {
            self.cleared += 1;
        }
    }
    #[test]
    fn config_is_cleared_before_developing_any_mddtype() {
        let pb = DummyProblem;
        let rlx = DummyRelax;
        let mut heu = DummyIncrementalVarHeu::default();

        let config = mdd_builder(&pb, rlx)
            .with_branch_heuristic(Proxy::new(&mut heu))
            .build();

        let mut mdd  = DD::from(config);
        let root = mdd.config().root_node();

        assert!(mdd.restricted(&root, 100, 1000).is_ok());
        assert_eq!(1, heu.cleared);

        assert!(mdd.relaxed(&root, 100, 1000).is_ok());
        assert_eq!(2, heu.cleared);

        assert!(mdd.exact(&root, 100, 1000).is_ok());
        assert_eq!(3, heu.cleared);
    }

    #[test]
    fn upon_layer_is_called_whenever_a_new_layer_is_created() {
        let pb = DummyProblem;
        let rlx = DummyRelax;
        let mut heu = DummyIncrementalVarHeu::default();

        let config = mdd_builder(&pb, rlx)
            .with_branch_heuristic(Proxy::new(&mut heu))
            .build();

        let mut mdd  = DD::from(config);
        let root = mdd.config().root_node();

        assert!(mdd.restricted(&root, 100, 1000).is_ok());
        assert_eq!(3, heu.layers);

        assert!(mdd.relaxed(&root, 100, 1000).is_ok());
        assert_eq!(6, heu.layers);

        assert!(mdd.exact(&root, 100, 1000).is_ok());
        assert_eq!(9, heu.layers);
    }

    #[test]
    fn upon_insert_is_called_whenever_a_non_existing_node_is_added_to_next_layer() {
        let pb = DummyProblem;
        let rlx = DummyRelax;
        let mut heu = DummyIncrementalVarHeu::default();

        let config = mdd_builder(&pb, rlx)
            .with_branch_heuristic(Proxy::new(&mut heu))
            .build();

        let mut mdd  = DD::from(config);
        let root = mdd.config().root_node();

        // Exact mdd comprises 16 nodes (includes the root)
        assert!(mdd.exact(&root, -100, 1000).is_ok());
        assert_eq!(16, heu.inserted);

        assert!(mdd.restricted(&root, -100, 1000).is_ok());
        assert_eq!(30, heu.inserted);

        assert!(mdd.relaxed(&root, -100, 1000).is_ok());
        assert_eq!(48, heu.inserted);
    }

}

#[cfg(test)]
mod test_private {
    use std::cmp::Ordering;
    use std::hash::Hash;

    use mock_it::verify;

    use crate::abstraction::heuristics::SelectableNode;
    use crate::abstraction::mdd::{Config, MDD};
    use crate::common::{Decision, Variable};
    use crate::implementation::mdd::shallow::utils::Node;
    use crate::implementation::mdd::shallow::flat::FlatMDD;
    use crate::test_utils::{MockConfig, Proxy};
    use std::rc::Rc;

    #[test]
    fn branch_inserts_a_node_with_given_state_when_none_exists() {
        let mut config  = MockConfig::default();


rderService sysHotelOrderService;

    /** 分页获取房型 */
    @PostMapping("getSysHotelItemPage")
    public Result getSysHotelItemPage(@RequestBody SysHotelItem sysHotelItem) {
        Page<SysHotelItem> page = new Page<>(sysHotelItem.getPageNumber(),sysHotelItem.getPageSize());
        QueryWrapper<SysHotelItem> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda()
                .eq(StringUtils.isNotBlank(sysHotelItem.getHotelId()),SysHotelItem::getHotelId,sysHotelItem.getHotelId())
                .like(StringUtils.isNotBlank(sysHotelItem.getName()),SysHotelItem::getName,sysHotelItem.getName());
        Page<SysHotelItem> sysHotelItemPage = sysHotelItemService.page(page, queryWrapper);
        return Result.success(sysHotelItemPage);
    }

    @GetMapping("getSysHotelItemList")
    public Result getSysHotelItemList(@RequestParam("id") String id) {
        QueryWrapper<SysHotelItem> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(SysHotelItem::getHotelId,id);
        List<SysHotelItem> itemList = sysHotelItemService.list(queryWrapper);
        return Result.success(itemList);
    }

    /** 根据id获取房型 */
    @GetMapping("getSysHotelItemById")
    public Result getSysHotelItemById(@RequestParam("id")String id) {
        SysHotelItem sysHotelItem = sysHotelItemService.getById(id);
        return Result.success(sysHotelItem);
    }

    /** 保存房型 */
    @PostMapping("saveSysHotelItem")
    public Result saveSysHotelItem(@RequestBody SysHotelItem sysHotelItem) {
        boolean save = sysHotelItemService.save(sysHotelItem);
        if (save) {
            return Result.success();
        } else {
            return Result.fail(ResultCode.COMMON_DATA_OPTION_ERROR.getMessage());
        }
    }

    /** 编辑房型 */
    @PostMapping("editSysHotelItem")
    public Result editSysHotelItem(@RequestBody SysHotelItem sysHotelItem) {
        boolean save = sysHotelItemService.updateById(sysHotelItem);
        if (save) {
            return Result.success();
        } else {
            return Result.fail(ResultCode.COMMON_DATA_OPTION_ERROR.getMessage());
        }
    }

    /** 删除房型 */
    @GetMapping("removeSysHotelItem")
    @Transactional(rollbackFor = Exception.class)
    public Result removeSysHotelItem(@RequestParam("ids")String ids) {
        if (StringUtils.isNotBlank(ids)) {
            String[] asList = ids.split(",");
            for (String id : asList) {
                sysHotelItemService.removeById(id);
                QueryWrapper<SysHotelOrder> queryWrapper = new QueryWrapper<>();
                queryWrapper.lambda().eq(SysHotelOrder::getItemId,id);
                sysHotelOrderService.remove(queryWrapper);
            }
            return Result.success();
        } else {
            return Result.fail("房型id不能为空！");
        }
    }

}
package com.ape.apesystem.domain;

import com.ape.apecommon.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;


ode3: '0101045', name1: 'グルメ', name2: '和食', name3: '鉄板焼き' },
    { code1: '01', code2: '0101', code3: '0101046', name1: 'グルメ', name2: '和食', name3: '牛タン料理' },
    { code1: '01', code2: '0101', code3: '0101047', name1: 'グルメ', name2: '和食', name3: 'もつ料理' },
    { code1: '01', code2: '0101', code3: '0101048', name1: 'グルメ', name2: '和食', name3: '釜飯' },
    { code1: '01', code2: '0101', code3: '0101049', name1: 'グルメ', name2: '和食', name3: 'くじら料理' },
    { code1: '01', code2: '0101', code3: '0101050', name1: 'グルメ', name2: '和食', name3: '炉端焼き' },
    { code1: '01', code2: '0101', code3: '0101051', name1: 'グルメ', name2: '和食', name3: '野菜料理' },
    { code1: '01', code2: '0101', code3: '0101052', name1: 'グルメ', name2: '和食', name3: 'にんにく料理' },
    { code1: '01', code2: '0101', code3: '0101053', name1: 'グルメ', name2: '和食', name3: '和食（その他）' },
    { code1: '01', code2: '0102', code3: '0102001', name1: 'グルメ', name2: '洋食', name3: 'ステーキ、ハンバーグ' },
    { code1: '01', code2: '0102', code3: '0102002', name1: 'グルメ', name2: '洋食', name3: 'パスタ、ピザ' },
    { code1: '01', code2: '0102', code3: '0102003', name1: 'グルメ', name2: '洋食', name3: 'ハンバーガー' },
    { code1: '01', code2: '0102', code3: '0102004', name1: 'グルメ', name2: '洋食', name3: '洋食（その他）' },
    { code1: '01', code2: '0102', code3: '0102005', name1: 'グルメ', name2: '洋食', name3: 'フランス料理（フレンチ）' },
    { code1: '01', code2: '0102', code3: '0102006', name1: 'グルメ', name2: '洋食', name3: 'イタリア料理（イタリアン）' },
    { code1: '01', code2: '0102', code3: '0102007', name1: 'グルメ', name2: '洋食', name3: 'スペイン料理' },
    { code1: '01', code2: '0102', code3: '0102008', name1: 'グルメ', name2: '洋食', name3: 'ポルトガル料理' },
    { code1: '01', code2: '0102', code3: '0102009', name1: 'グルメ', name2: '洋食', name3: '地中海料理' },
    { code1: '01', code2: '0102', code3: '0102010', name1: 'グルメ', name2: '洋食', name3: 'ドイツ料理' },
    { code1: '01',


0.28,1.04,0.37V19h2 v-1.05c0.79-0.11,1.45-0.38,1.97-0.81c0.69-0.57,1.03-1.37,1.03-2.38c0-0.91-0.28-1.67-0.85-2.28S13.69,11.36,12.45,10.95z":"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z",
          /* Your data in Youtube */
          "m12 3.06 7 3.21v4.84c0 1.3-.25 2.6-.75 3.86-.15.37-.33.76-.55 1.17-.15.27-.31.54-.48.81-1.32 2.01-3.17 3.42-5.23 3.98-2.06-.56-3.91-1.97-5.23-3.98-.17-.27-.33-.54-.48-.81-.22-.41-.4-.79-.55-1.17-.48-1.26-.73-2.56-.73-3.86V6.27l7-3.21m0-1.1L4 5.63v5.49c0 1.47.3 2.9.81 4.22.17.44.37.86.6 1.28.16.3.34.6.52.88 1.42 2.17 3.52 3.82 5.95 4.44l.12.02.12-.03c2.43-.61 4.53-2.26 5.95-4.43.19-.29.36-.58.52-.88.22-.41.43-.84.6-1.28.51-1.33.81-2.76.81-4.23V5.63l-8-3.67zm1.08 10.15c-.32-.06-.64-.11-.96-.12A2.997 2.997 0 0012 6a2.996 2.996 0 00-.12 5.99c-.32.01-.64.06-.96.12C8.64 12.58 7 14.62 7 17h10c0-2.38-1.64-4.42-3.92-4.89zM10 9c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm1.12 4.09c.37-.08.64-.11.88-.11s.51.03.88.11c1.48.3 2.63 1.46 3 2.91H8.12c.37-1.45 1.52-2.61 3-


static Object opProductOf(final IScope scope, final String eachName, final IContainer container,
			final IExpression filter) {
		return opProduct(scope, collect(scope, eachName, container, filter));
	}

	/**
	 *
	 *
	 * @param scope
	 * @param fstat
	 * @param dfn
	 * @param dfd
	 * @return
	 */
	@operator (
			value = "pValue_for_fStat",
			can_be_const = true,
			type = IType.FLOAT,
			category = { IOperatorCategory.STATISTICAL },
			concept = { IConcept.STATISTIC })
	@doc (
			value = "Returns the P value of F statistic fstat with numerator degrees of freedom dfn and denominator degress of freedom dfd. Uses the incomplete Beta function.",
			comment = "",
			examples = { @example (
					value = "pValue_for_fStat(1.9,10,12) with_precision(3)",
					equals = "0.145") })

	public static Double opPvalueForFstat(final IScope scope, final Double fstat, final Integer dfn,
			final Integer dfd) { // see Spatial.Punctual.angle_between

		// Returns the P value of F statistic fstat with numerator degrees
		// of freedom dfn and denominator degrees of freedom dfd.
		// Uses the incomplete Beta function.

		final double x = dfd / (dfd + dfn * fstat);
		try {
			return Gamma.incompleteBeta(dfd / 2.0, dfn / 2.0, x);
		} catch (final IllegalArgumentException | ArithmeticException ex) {
			throw GamaRuntimeException.error("colt .incompleteBeta reports: " + ex, scope);
		}
	}

	/**
	 *
	 *
	 * @param scope
	 * @param tstat
	 * @param df
	 * @return
	 */
	@operator (
			value = "pValue_for_tStat",
			can_be_const = true,
			type = IType.FLOAT,
			category = { IOperatorCategory.STATISTICAL },
			concept = { IConcept.STATISTIC })
	@doc (
			value = "Returns the P value of the T statistic tstat with df degrees of freedom. "
					+ "This is a two-tailed test so we just double the right tail which is given by studentT of -|tstat|.",
			comment = "",
			examples = { @example (
					value = "pValue_for_tStat(0.9,10) with_precision(3)",
					equals = "0.389") })

	public static Double opPvalueForTstat(final IScope scope, final Double tstat, final Integer df) {

		// Returns the P value of the T statistic tstat with df degrees of
		// freedom. This is a two-tailed test so we just double the right
		// tail which is given by studentT of -|tstat|.

		final double x = Math.abs(tstat);
		try {
			final double p = Probability.studentT(df, -x);
			return 2.0 * p;
		} catch (final IllegalArgumentException | ArithmeticException ex) {
			throw GamaRuntimeException.error("colt .studentT reports: " + ex, scope);
		}
	}

	/**
	 *
	 *
	 * @param scope
	 * @param data
	 * @param phi
	 * @return
	 */
	@operator (
			value = "quantile",
			can_be_const = true,
			type = IType.FLOAT,
			expected_content_type = { IType.INT, IType.FLOAT },
			category = { IOperatorCategory.STATISTICAL },
			concept = { IConcept.STATISTIC })
	@doc (
			value = "Returns the phi-quantile; that is, an element elem for which holds that phi percent of data elements are less than elem. The quantile does not need necessarily to be contained in the data sequence, it can be a linear interpolation. Note that the container holding the values must be sorted first",
			comment = "",
			examples = { @example (
					value = "quantile([1,3,5,6,9,11,12


inv * evector[row];
			}

			Vector2d center = new Vector2d(-0.5 * coefficients[1], -0.5 * coefficients[2]);
			double r = Math.Sqrt(Math.Abs(center.LengthSquared - coefficients[0]));
			circle = new Circle2d(center, r);

			// For an exact fit, numeric round-off errors might make the minimum
			// eigenvalue just slightly negative.  Return the absolute value since
			// the application might rely on the return value being nonnegative.
			return Math.Abs(es.GetEigenvalue(0));
		}

	}
}


) {
      if(msg != null) {
         int rx = x + 12;
         int ry = y - 12;
         int width = this.fontWidth(msg);
         if(rx + width + 3 > this.right_x) {
            rx = rx - width - 20;
         }

         this.fillGradient(rx - 3, ry - 3, rx + width + 3, ry + 8 + 3, -1073741824, -1073741824);
         this.fontDrawShadow(msg, rx, ry, 16777215);
      }
   }

   private void drawServerStatus(int x, int y, int xm, int ym) {
      if(this.serverData.expired) {
         this.drawExpired(x, y, xm, ym);
      } else if(this.serverData.state == RealmsServer.State.ADMIN_LOCK) {
         this.drawLocked(x, y, xm, ym, false);
      } else if(this.serverData.state == RealmsServer.State.CLOSED) {
         this.drawLocked(x, y, xm, ym, true);
      } else if(this.serverData.state == RealmsServer.State.OPEN) {
         if(this.serverData.daysLeft < 7) {
            this.drawExpiring(x, y, xm, ym, this.serverData.daysLeft);
         } else {
            this.drawOpen(x, y, xm, ym);
         }
      }

   }

   private void drawExpiring(int x, int y, int xm, int ym, int daysLeft) {
      if(this.animTick % 20 < 10) {
         RealmsScreen.bind("realms:textures/gui/realms/on_icon.png");
         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
         GL11.glPushMatrix();
         GL11.glScalef(0.5F, 0.5F, 0.5F);
         RealmsScreen.blit(x * 2, y * 2, 0.0F, 0.0F, 15, 15, 15.0F, 15.0F);
         GL11.glPopMatrix();
      }

      if(xm >= x && xm <= x + 9 && ym >= y && ym <= y + 9) {
         if(daysLeft == 0) {
            this.toolTip = getLocalizedString("mco.selectServer.expires.soon");
         } else if(daysLeft == 1) {
            this.toolTip = getLocalizedString("mco.selectServer.expires.day");
         } else {
            this.toolTip = getLocalizedString("mco.selectServer.expires.days", new Object[]{Integer.valueOf(daysLeft)});
         }
      }

   }

   private void drawOpen(int x, int y, int xm, int ym) {
      RealmsScreen.bind("realms:textures/gui/realms/on_icon.png");
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glPushMatrix();
      GL11.glScalef(0.5F, 0.5F, 0.5F);
      RealmsScreen.blit(x * 2, y * 2, 0.0F, 0.0F, 15, 15, 15.0F, 15.0F);
      GL11.glPopMatrix();
      if(xm >= x && xm <= x + 9 && ym >= y && ym <= y + 9) {
         this.toolTip = getLocalizedString("mco.selectServer.open");
      }

   }

   private void drawExpired(int x, int y, int xm, int ym) {
      bind("realms:textures/gui/realms/expired_icon.png");
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glPushMatrix();
      GL11.glScalef(0.5F, 0.5F, 0.5F);
      RealmsScreen.blit(x * 2, y * 2, 0.0F, 0.0F, 15, 15, 15.0F, 15.0F);
      GL11.glPopMatrix();
      if(xm >= x && xm <= x + 9 && ym >= y && ym <= y + 9) {
         this.toolTip = getLocalizedString("mco.selectServer.expired");
      }

   }

   private void drawLocked(int x, int y, int xm, int ym, boolean closed) {


CVKlUZP7HAhdQgs-9iTJklQ">

{% extends 'base.html' %}

{% block title %}Registro de Usuario{% endblock %}

{% block content %}

Crear Usuario

    <form method="post">
        {% csrf_token %}
        {{ form.as_p }}
        <button type="submit">Crear Usuario</button>
    </form>
{% endblock %}<form method="POST">
    {% csrf_token %}

¿Estás seguro que deseas eliminar {{ producto.nombre }}?

    <button type="submit">Eliminar</button>
</form>
<form method="POST">
    {% csrf_token %}
    {{ form.as_p }}
    <button type="submit">Guardar</button>
</form>
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Crear Producto</title>

Crear Producto

    <form method="post">
        {% csrf_token %}
        {{ form.as_p }}
        <button type="submit">Guardar</button>
    </form>

{% extends 'base.html' %}

{% block title %}Tienda{% endblock %}

{% block content %}

Tienda

Bienvenido a la tienda.

{% endblock %}
<!DOCTYPE html>

  <title>LLM Test Frontend</title>

Talk to the Model

  <textarea id="userInput" rows="4" cols="50" placeholder="Type your message here..."></textarea>

  <button onclick="sendToModel()">Send</button>

Model Response:

Waiting for input...

      <shared-sidebar></shared-sidebar>

      <router-outlet></router-outlet>
    </di


using System;
using System.Linq;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using Rock.Data;
using Rock.Model;
using Rock.Tests.Integration.TestData;
using Rock.Tests.Shared.TestFramework;

namespace Rock.Tests.Integration.Core.Model
{
    [TestClass]
    public class MetricValueTests : DatabaseTestsBase
    {
        private string metricValueForeignKey;

        [TestInitialize]
        public void TestInitialize()
        {
            metricValueForeignKey = $"Test {Guid.NewGuid()}";
        }

        [TestCleanup]
        public void TestCleanup()
        {
            CleanUpData( metricValueForeignKey );
        }

        [TestMethod]
        public void MetricValueDateKeyGetsSetCorrectly()
        {
            var testList = TestDataHelper.GetAnalyticsSourceDateTestData();

            foreach ( var keyValue in testList )
            {
                var metricValue = new Rock.Model.MetricValue();
                metricValue.MetricValueDateTime = keyValue.Value;
                Assert.AreEqual( keyValue.Key, metricValue.MetricValueDateKey );
            }
        }

        [TestMethod]
        public void MetricValueDateKeyKeyWorksWithNullValue()
        {
            var metricValue = new Rock.Model.MetricValue();
            metricValue.MetricValueDateTime = null;
            Assert.IsNull( metricValue.MetricValueDateKey );
        }

        [TestMethod]
        public void MetricValueDateKeySavesCorrectly()
        {
            var rockContext = new RockContext();
            var metricValueService = new MetricValueService( rockContext );

            var metricValue = BuildMetricValue( rockContext, Convert.ToDateTime( "2010-3-15" ) );
            metricValueService.Add( metricValue );
            rockContext.SaveChanges();

            var metricValueId = metricValue.Id;

            // We're bypassing the model because the model doesn't user the MetricValueDateKey from the database,
            // but it still needs to be correct for inner joins to work correctly.
            var result = rockContext.Database.
                            SqlQuery<int>( $"SELECT MetricValueDateKey FROM MetricValue WHERE Id = {metricValueId}" ).First();

            Assert.AreEqual( 20100315, resu


QLParser::NotNullContext::getRuleIndex() const {
  return GQLParser::RuleNotNull;
}

std::any GQLParser::NotNullContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<GQLParserVisitor*>(visitor))
    return parserVisitor->visitNotNull(this);
  else
    return visitor->visitChildren(this);
}

GQLParser::NotNullContext* GQLParser::notNull() {
  NotNullContext *_localctx = _tracker.createInstance<NotNullContext>(_ctx, getState());
  enterRule(_localctx, 826, GQLParser::RuleNotNull);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(3549);
    match(GQLParser::NOT);
    setState(3550);
    match(GQLParser::NULL_);

  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FieldTypeContext ------------------------------------------------------------------

GQLParser::FieldTypeContext::FieldTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

GQLParser::FieldNameContext* GQLParser::FieldTypeContext::fieldName() {
  return getRuleContext<GQLParser::FieldNameContext>(0);
}

GQLParser::ValueTypeContext* GQLParser::FieldTypeContext::valueType() {
  return getRuleContext<GQLParser::ValueTypeContext>(0);
}

GQLParser::TypedContext* GQLParser::FieldTypeContext::typed() {
  return getRuleContext<GQLParser::TypedContext>(0);
}

size_t GQLParser::FieldTypeContext::getRuleIndex() const {
  return GQLParser::RuleFieldType;
}

std::any GQLParser::FieldTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<GQLParserVisitor*>(visitor))
    return parserVisitor->visitFieldType(this);
  else
    return visitor->visitChildren(this);
}

GQLParser::FieldTypeContext* GQLParser::fieldType() {
  FieldTypeContext *_localctx = _tracker.createInstance<FieldTypeContext>(_ctx, getState());
  enterRule(_localctx, 828, GQLParser::RuleFieldType);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(3552);
    fieldName();
    setState(3554);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == GQLParser::TYPED

    || _la == GQLParser::DOUBLE_COLON) {
      setState(3553);
      typed();
    }
    setState(3556);
    valueType(0);

  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SchemaReferenceContext ------------------------------------------------------------------

GQLParser::SchemaReferenceContext::SchemaReferenceContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

GQLParser::AbsoluteCatalogSchemaReferenceContext* G


 {
        return Collections.unmodifiableList(mappings);
    }

    /** {@inheritDoc} */
    @Override public void writeBinary(BinaryWriterExImpl writer,
        JdbcProtocolContext protoCtx)
        throws BinaryObjectException {
        super.writeBinary(writer, protoCtx);

        assert mappings != null;

        writer.writeInt(mappings.size());

        for (JdbcThinPartitionAwarenessMappingGroup mappingGroup : mappings)
            mappingGroup.writeBinary(writer, protoCtx);
    }

    /** {@inheritDoc} */
    @Override public void readBinary(BinaryReaderExImpl reader,
        JdbcProtocolContext protoCtx)
        throws BinaryObjectException {
        super.readBinary(reader, protoCtx);

        List<JdbcThinPartitionAwarenessMappingGroup> res = new ArrayList<>();

        int mappingsSize = reader.readInt();

        for (int i = 0; i < mappingsSize; i++)
            res.add(JdbcThinPartitionAwarenessMappingGroup.readGroup(reader, protoCtx));

        mappings = res;
    }

    /** {@inheritDoc} */
    @Override public String toString() {
        return S.toString(JdbcCachePartitionsResult.class, this);
    }
}
/*
 * Copyright 2019 GridGain Systems, Inc. and Contributors.
 *
 * Licensed under the GridGain Community Edition License (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.ignite.internal.processors.odbc.jdbc;

import org.apache.ignite.internal.binary.BinaryReaderExImpl;
import org.apache.ignite.internal.binary.BinaryWriterExImpl;
import org.apache.ignite.internal.processors.odbc.SqlListenerUtils;
import org.apache.ignite.internal.util.typedef.internal.S;

/**
 * JDBC SQL query with parameters.
 */
public class JdbcQuery implements JdbcRawBinarylizable {
    /** Query SQL. */
    private String sql;

    /** Arguments. */
    private Object[] args;

    /**
     * Default constructor is used for serialization.
     */
    public JdbcQuery() {
        // No-op.
    }

    /**
     * @param sql Query SQL.
     * @param args Arguments.
     */
    public JdbcQuery(String sql, Object[] args) {
        this.sql = sql;
        this.args = args;
    }

    /**
     * @return Query SQL string.
     */
    public String sql() {
        return sql;
    }

    /**
     * @return Query arguments.
     */
    public Object[] args() {
        return args;
    }

    /** {@inheritDoc} */
    @Override public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) {
        writer.writeString(sql);

        if (args == null || args.length == 0)
            writer.writeInt(0);
        else {
            writer.writeInt(args.length);

            for (Object arg : args)
                SqlListenerUtils.writeObject(writer, arg, protoCtx.isFeatureSupported(JdbcThinFeature.CUSTOM_OBJECT));
        }
    }

    /** {@inheritDoc} */
    @Override public void readBinary(BinaryReaderExImpl reader, JdbcProtocolContext protoCtx) {
        sql = reader.readString();

        int argsNum = reader.readInt();

        args = new Object[argsNum];

        for (int i = 0; i < argsNum; ++i)
            args[i] = SqlListenerUtils.readObject(reader, protoCtx.isFeatureSupported(JdbcThinFeat


eb8jC_NTJQ", "uHsK-9g_jw", "ppDuUmb6", "5VYp7us00TpcBz8HwYfcoukjZl1IWHFwjDOjAInVmFUYkFE-NuN5Xa1dYhKAmdXlr2tHSh8Md2OoRBHYcQFQ-026FYDTIDXOPFoc0CE", "G3A9m_hxsmsCbgc0mPu9-LhdCENSc2lmkUaKLw", "self", "R8OjR2STHsOWhaLSGkwJfjO26v-J9O_hcJ5tilJDWOjVEPv1v2Gflk7egetychAnX6_Ix7PfxJo", "11hplbZO1QF9TS8Lxr2QtK8gUxlJYmpmsA2FPs--h0tKyjskAK0eG95uRGTg9Ze8-CteTTd8bkbyUAeUZlZJ6HbuFLauE1G3CV1wgQHC43Ay9f_dzq4xWiCbgIp8_UCOcBj_vLGlwGuw7T8O_fYTCaGDUUCzhbmfAFNx2hGmeUVfxxwV3JVUMJ4", "jJrTNRrgY5LsooHtYUp5UB7Qz-qtg5uDBvF0_GdrQc7xMZfB9xXw-mKpncZRF1wLTNj664HFso1F9PRHweCiRtE7okVarKpMr62YEvRo", "7u6Oakm-Qeu7rIG6eipuGFakgMCm3sHcXZwz_jwbcp2sdYjWhn7lvUS296IKIWxYX8yi", "oIe-XjS5C9bIhriMP3U", "tSZUrZBtsg", "bdq5HBGuCuKimtk", "OKLRTkuNe5jhmJ4", "9fm1b2mDH7yWk7M", "rxhS0-Jn72Z5aio", "tYTIb1zeef__74ucHFI0WRyhgoS5wdnfFaALqGVqYqg", "join", "D1VDp5NmiiQ1PxgGvar5hsMHZWx_VEYHnmrpf7CK611os3ZaXrInZ744JEGE2e2P-ElpGRZXY22UKmeh", "getPrototypeOf", "TePGYhr4R4-t5tc", "shNunYVonxpoW2s", "8YDrUwamU6bC-5Hv", "9yZjkocGoRwLCygThIrapaM", "UE8rl8Jx", "XVA", "_5mzM2-GevPap7_DW2lWeQ", "ReferenceError", "hLzEMAvieqM", "k5aOcl7EAtrVrurG", "bind", "EpTLcBjjYan3", "sZuaKE2zbK3r39s", "tb7TMhD0Hg", "object", "5d37aBz-II4", "noDYKzTTVr3nhLHuaWZWeyri3O6Eug", "Y_iuKCvO", "documentBody", "kYXFdgvpc5Pz", "IHAikPlg_mxKKDZFhQ", "bAtN7ZB99gttIgIO-aisgtBGESJiUwMPj3mSeNHwl1R0mhcBKqcWVuIjG1LW9oA", "status", "SRUxwboMi19SBGFE8YeIg7tdGkBoGjFvmw", "YyhKsIJk8Td9PEg18--pjw", "FmAXrcFS1mg4EwZ2tNGX2bQ_VihsEk


_aw),
        op_entry!(MASK_OUT_X, OP_MULU_16_AL, mulu_16_al),
        op_entry!(MASK_OUT_X, OP_MULU_16_PCDI, mulu_16_pcdi),
        op_entry!(MASK_OUT_X, OP_MULU_16_PCIX, mulu_16_pcix),
        op_entry!(MASK_OUT_X, OP_MULU_16_IMM, mulu_16_imm),
        // Put op-entries for NBCD here
        op_entry!(MASK_OUT_Y, OP_NBCD_8_DN, nbcd_8_dn),
        op_entry!(MASK_OUT_Y, OP_NBCD_8_AI, nbcd_8_ai),
        op_entry!(MASK_OUT_Y, OP_NBCD_8_PI, nbcd_8_pi),
        op_entry!(MASK_OUT_Y, OP_NBCD_8_PD, nbcd_8_pd),
        op_entry!(MASK_OUT_Y, OP_NBCD_8_DI, nbcd_8_di),
        op_entry!(MASK_OUT_Y, OP_NBCD_8_IX, nbcd_8_ix),
        op_entry!(MASK_EXACT, OP_NBCD_8_AW, nbcd_8_aw),
        op_entry!(MASK_EXACT, OP_NBCD_8_AL, nbcd_8_al),
        // Put op-entries for NEG here
        op_entry!(MASK_OUT_Y, OP_NEG_8_DN, neg_8_dn),
        op_entry!(MASK_OUT_Y, OP_NEG_8_AI, neg_8_ai),
        op_entry!(MASK_OUT_Y, OP_NEG_8_PI, neg_8_pi),
        op_entry!(MASK_OUT_Y, OP_NEG_8_PD, neg_8_pd),
        op_entry!(MASK_OUT_Y, OP_NEG_8_DI, neg_8_di),
        op_entry!(MASK_OUT_Y, OP_NEG_8_IX, neg_8_ix),
        op_entry!(MASK_EXACT, OP_NEG_8_AW, neg_8_aw),
        op_entry!(MASK_EXACT, OP_NEG_8_AL, neg_8_al),
        op_entry!(MASK_OUT_Y, OP_NEG_16_DN, neg_16_dn),
        op_entry!(MASK_OUT_Y, OP_NEG_16_AI, neg_16_ai),
        op_entry!(MASK_OUT_Y, OP_NEG_16_PI, neg_16_pi),
        op_entry!(MASK_OUT_Y, OP_NEG_16_PD, neg_16_pd),
        op_entry!(MASK_OUT_Y, OP_NEG_16_DI, neg_16_di),
        op_entry!(MASK_OUT_Y, OP_NEG_16_IX, neg_16_ix),
        op_entry!(MASK_EXACT, OP_NEG_16_AW, neg_16_aw),
        op_entry!(MASK_EXACT, OP_NEG_16_AL, neg_16_al),
        op_entry!(MASK_OUT_Y, OP_NEG_32_DN, neg_32_dn),
        op_entry!(MASK_OUT_Y, OP_NEG_32_AI, neg_32_ai),
        op_entry!(MASK_OUT_Y, OP_NEG_32_PI, neg_32_pi),
        op_entry!(MASK_OUT_Y, OP_NEG_32_PD, neg_32_pd),
        op_entry!(MASK_OUT_Y, OP_NEG_32_DI, neg_32_di),
        op_entry!(MASK_OUT_Y, OP_NEG_32_IX, neg_32_ix),
        op_entry!(MASK_EXACT, OP_NEG_32_AW, neg_32_aw),
        op_entry!(MASK_EXA


fication types to Ecuadorian ones.
        Useful for document type domains, electronic documents, ats, others.
        """
        self.ensure_one()

        id_types_by_xmlid = {
            'l10n_ec.ec_dni': 'cedula',  # DNI
            'l10n_ec.ec_ruc': 'ruc',  # RUC
            'l10n_ec.ec_passport': 'ec_passport',  # EC passport
            'l10n_latam_base.it_pass': 'passport',  # Passport
            'l10n_latam_base.it_fid': 'foreign',  # Foreign ID
            'l10n_latam_base.it_vat': 'foreign',
        }

        # This method is orm-cached, which makes it more efficient in loops than get_external_id()
        xmlid_by_res_id = {
            self.env['ir.model.data']._xmlid_to_res_model_res_id(xmlid, raise_if_not_found=True)[1]: xmlid
            for xmlid in id_types_by_xmlid
        }

        id_type_xmlid = xmlid_by_res_id.get(self.l10n_latam_identification_type_id.id)
        if id_type_xmlid in id_types_by_xmlid:
            return id_types_by_xmlid[id_type_xmlid]

        if self.l10n_latam_identification_type_id.country_id.code != 'EC':
            return 'foreign'


ale the mix width.
            Defaults to 0.75.
    """

    def __init__(
        self,
        prob: float = 0.25,
        mix_scale_ratio: float = 0.75,
    ):
        super().__init__()

        self.prob = prob
        self.mix_scale_ratio = mix_scale_ratio

    def transform(self, results: dict) -> dict:
        if random.random() > self.prob:
            return results

        h, w = results['img_shape'][:2]
        left = int(w * random.random())
        width_ratio = self.mix_scale_ratio * random.random()
        width = int(max(1, (w - left) * width_ratio))

        img = results['img']
        depth_rescale_factor = results.get('depth_rescale_factor', 1)
        depth_map = results['gt_depth_map'] / depth_rescale_factor

        if img.ndim == 3:
            for c in range(img.shape[-1]):
                img[:, left:left + width, c] = depth_map[:, left:left + width]
        elif img.ndim == 2:
            img[:, left:left + width] = depth_map[:, left:left + width]
        else:
            raise ValueError(f'Invalid image shape ({img.shape})')

        results['img'] = img
        return results


isi ülkenin en ücra köşesine kadar uzandı. Bunun bir tür eşitlikçilik olduğu söylenebilir tabii, ama söz konusu eşitlik devlet karşısındaki mahkûmiyet haline ilişkindi. İnsanlar ‘vatandaş’ olarak yeniden takdis edilirken, devletin kendi üzerlerindeki tartışılmaz hükmi varlığını da baştan onaylamış, onun kurallarına uymayı ve aksi halde cezalandırılmayı da kabullenmiş oluyorlardı.

Kısacası imparatorluklardan ulus-devletlere geçiş, insanlar için apaçık bir özgürlük kaybıydı. Soru buna niçin razı gelindiği, bu durumun nasıl rasyonalize edildiğidir... Acaba özgürlük kaybı karşılığında ne kazanılmıştır? İlk akla gelen kavram muhtemelen ‘güvenlik’ olacaktır. Ulus-devletlerin ‘milletlerin’ kendilerini güven içinde hissetmelerini sağladığı sıkça tekrarlanır. Ne var ki bu tesbit tümüyle yanlış olup, bilinçli bir yalana dönüşmeye de çok müsaittir. Her şeyden önce imparatorluklarda güvenlik esas olarak bir toplumlar arası denge haline gönderme yapar ve nihayette de asayiş meselesi olarak somutlaşırdı. Düşmanlıklar kategorik değil, konjonktürel, geçici ve değişkendi. Oysa ulus-devletler güvenlik ihtiyacını ‘milletlerle’ ilişkilendirdiler ve tam da bu nedenle güvensiz bir dünya ürettiler. Şimdi etraf kadim düşmanlarla çevriliydi, çünkü ‘hayat’ zaten bir milletler savaşıydı. Bu ortamda dostluk ancak geçici olabilirken, diğer bütün ulus-devletler ezeli ve ebedi bir düşmanlığın taşıyıcılarıydılar. Dolayısıyla ulus-devletler kendilerini sürekli tehdit altında ve tehlikede hissettiler. ‘Milletler’ ulus-devletler sayesinde daha güvenlikli bir dünyada değil, tam aksine çok daha güvensiz bir dünyada yaşamak zorunda kaldılar.

Böylece yukarıdaki soruya geri dönüyoruz: İmparatorluklardan ulus-devletlere geçerken ödenen özgürlük kaybının karşılığı acaba neydi? Özgürlüksüzlüğün karşılığı olarak bizlere ne sunulmuştu ve biz niçin bu bedeli böylesine hevesle ödedik? Bunun sadece ‘kendimize benzeyenlerle birlikte yaşama’, kendi ‘milletimizle’ birlikte olmaktan ibaret olmadığı belli, çünkü imparatorluklarda da bu koşul önemli çapta karşılanmaktaydı. Görünen ve bizlere de ısrarla öğretilen o ki, özgürlük kaybının karşılığı ‘kendimizi yönetme’ hakkını elde etmemizdi.

Bunun ne denli gerçekle