 '']
    ..abbreviatedMonthGenitiveNames = const ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', '']
    ..calendar = CalendarType.gregorian
    ..eraNames = const ['AD']
    ..fullDateTimePattern = 'dddd, MMMM d, yyyy h:mm:ss tt'
    ..shortDatePattern = 'M/d/yyyy'
    ..longDatePattern = 'dddd, MMMM d, yyyy'
    ..shortTimePattern = 'h:mm tt'
    ..longTimePattern = 'h:mm:ss tt').Build());
  static final Culture FrFr =
  Culture('fr-FR', (DateTimeFormatBuilder()
    ..amDesignator = 'AM'
    ..pmDesignator = 'PM'
    ..timeSeparator = ':'
    ..dateSeparator = '/'
    ..abbreviatedDayNames = const ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.']
    ..dayNames = const ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi']
    ..monthNames = const ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre', '']
    ..abbreviatedMonthNames = const ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.', '']
    ..monthGenitiveNames = const ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre', '']
    ..abbreviatedMonthGenitiveNames = const ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.', '']
    ..calendar = CalendarType.gregorian
    ..eraNames = const ['ap. J.-C.']
    ..fullDateTimePattern = 'dddd d MMMM yyyy HH:mm:ss'
    ..shortDatePattern = 'dd/MM/yyyy'
    ..longDatePattern = 'dddd d MMMM yyyy'
    ..shortTimePattern = 'HH:mm'
    ..longTimePattern = 'HH:mm:ss').Build());
  static final Culture FrCa =
  Culture('fr-CA', (DateTimeFormatBuilder()
    ..amDesignator = 'a.m.'
    ..pmDesignator = 'p.m.'
    ..timeSeparator = ' '
    ..dateSeparator = '-'
    ..abbreviatedDayNames = const ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.']
    ..dayNames = const ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi']
    ..monthNames = const ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre', '']
    ..abbreviatedMonthNames = const ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juill.', 'août', 'sept.', 'oct.', 'nov.', 'déc.', '']
    ..monthGenitiveNames = const ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre', '']
    ..abbreviatedMonthGenitiveNames = const ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juill


Container = document.createElement('div');\n                  popupContainer.style.position = 'absolute';\n      popupContainer.style.top = '0';\n      popupContainer.style.left = '0';\n      popupContainer.style.width = '100%';\n      var mountNode = props.getPopupContainer ? props.getPopupContainer(Object(__WEBPACK_IMPORTED_MODULE_3_react_dom__[\"findDOMNode\"])(instance)) : props.getDocument().body;\n      mountNode.appendChild(popupContainer);\n      return popupContainer;\n    }\n  })],\n\n  getDefaultProps: function getDefaultProps() {\n    return {\n      prefixCls: 'rc-trigger-popup',\n      getPopupClassNameFromAlign: returnEmptyString,\n      getDocument: returnDocument,\n      onPopupVisibleChange: noop,\n      afterPopupVisibleChange: noop,\n      onPopupAlign: noop,\n      popupClassName: '',\n      mouseEnterDelay: 0,\n      mouseLeaveDelay: 0.1,\n      focusDelay: 0,\n      blurDelay: 0.15,\n      popupStyle: {},\n      destroyPopupOnHide: false,\n      popupAlign: {},\n      defaultPopupVisible: false,\n      mask: false,\n      maskClosable: true,\n      action: [],\n      showAction: [],\n      hideAction: []\n    };\n  },\n  getInitialState: function getInitialState() {\n    var props = this.props;\n    var popupVisible = void 0;\n    if ('popupVisible' in props) {\n      popupVisible = !!props.popupVisible;\n    } else {\n      popupVisible = !!props.defaultPopupVisible;\n    }\n    return {\n      popupVisible: popupVisible\n    };\n  },\n  componentWillMount: function componentWillMount() {\n    var _this = this;\n\n    ALL_HANDLERS.forEach(function (h) {\n      _this['fire' + h] = function (e) {\n        _this.fireEvents(h, e);\n      };\n    });\n  },\n  componentDidMount: function componentDidMount() {\n    this.componentDidUpdate({}, {\n      popupVisible: this.state.popupVisible\n    });\n  },\n  componentWillReceiveProps: function componentWillReceiveProps(_ref) {\n    var popupVisible = _ref.popupVisible;\n\n    if (popupVisible !== undefined) {\n      this.setState({\n        popupVisible: popupVisible\n      });\n    }\n  },\n  componentDidUpdate: function componentDidUpdate(_, prevState) {\n    var props = this.props;\n    var state = this.state;\n    this.renderComponent(null, function () {\n      if (prevState.popupVisible !== state.popupVisible) {\n        props.afterPopupVisibleChange(state.popupVisible);\n      }\n    });\n\n                    if (state.popupVisible) {\n      var currentDocument = void 0;\n      if (!this.clickOutsideHandler && this.isClickToHide()) {\n        currentDocument = props.getDocument();\n        this.clickOutsideHandler = __WEBPACK_IMPORTED_MODULE_6_rc_util_lib_Dom_addEventListener___default()(currentDocument, 'mousedown', this.onDocumentClick);\n      }\n                              if (!this.touchOutsideHandler && isMobile) {\n        currentDocument = currentDocument || props.getDocument();\n        this.touchOutsideHandler = __WEBPACK_IMPORTED_MODULE_6_rc_util_lib_Dom_addEventListener___default()(currentDocument, 'click', this.onDocumentClick);\n      }\n      return;\n    }\n\n    this.clearOutsideHandler();\n  },\n  componentWillUnmount: function componentWillUnmount() {\n    this.clearDelayTimer();\n    this.clearOutsideHand


)
	for _, k := range ks {
		if _, err = wc.Write([]byte(fmt.Sprintf("- %v: %v\n", k, meta[k]))); err != nil {
			return err
		}
	}
	_, err = wc.Write([]byte("\n"))
	if err != nil {
		return err
	}
	return wc.Close()
}

func (n *Nurse) gatherCPU(now time.Time, wg *sync.WaitGroup) {
	defer wg.Done()
	n.eng.Debugf("gather cpu %d ...", now.UnixMicro())
	defer n.eng.Debugf("gather cpu %d done", now.UnixMicro())
	wc, err := n.createFile(now, cpuProfName, false)
	if err != nil {
		n.eng.Errorw("could not write cpu profile", "err", err)
		return
	}
	defer wc.Close()

	err = pprof.StartCPUProfile(wc)
	if err != nil {
		n.eng.Errorw("could not start cpu profile", "err", err)
		return
	}

	select {
	case <-n.eng.StopChan:
		n.eng.Debug("gather cpu received stop")

	case <-time.After(n.cfg.GatherDuration().Duration()):
		n.eng.Debugf("gather cpu duration elapsed %s. stoping profiling.", n.cfg.GatherDuration().Duration().String())
	}

	pprof.StopCPUProfile()

	err = wc.Close()
	if err != nil {
		n.eng.Errorw("could not close cpu profile", "err", err)
		return
	}
}

func (n *Nurse) gatherTrace(now time.Time, wg *sync.WaitGroup) {
	defer wg.Done()

	n.eng.Debugf("gather trace %d ...", now.UnixMicro())
	defer n.eng.Debugf("gather trace %d done", now.UnixMicro())
	wc, err := n.createFile(now, traceProfName, true)
	if err != nil {
		n.eng.Errorw("could not write trace profile", "err", err)
		return
	}
	defer wc.Close()

	err = trace.Start(wc)
	if err != nil {
		n.eng.Errorw("could not start trace profile", "err", err)
		return
	}

	select {
	case <-n.eng.StopChan:
	case <-time.After(n.cfg.GatherTraceDuration().Duration()):
	}

	trace.Stop()

	err = wc.Close()
	if err != nil {
		n.eng.Errorw("could not close trace profile", "err", err)
		return
	}
}

func (n *Nurse) gather(typ string, now time.Time, wg *sync.WaitGroup) {
	defer wg.Done()

	n.eng.Debugf("gather %s %d ...", typ, now.UnixMicro())
	n.eng.Debugf("gather %s %d done", typ, now.UnixMicro())

	p := pprof.Lookup(typ)
	if p == nil {
		n.eng.Errorf("Invariant violation: pprof type '%v' does not exist", typ)
		return
	}

	p0, err := collectProfile(p)
	if err != nil {
		n.eng.Errorw(fmt.Sprintf("could not collect %v profile", typ), "err", err)
		return
	}

	t := time.NewTimer(n.cfg.GatherDuration().Duration())
	defer t.Stop()

	select {
	case <-n.eng.StopChan:
		return
	case <-t.C:
	}

	p1, err := collectProfile(p)
	if err != nil {
		n.eng.Errorw(fmt.Sprintf("could not collect %v profile", typ), "err", err)
		return
	}
	ts := p1.TimeNanos
	dur := p1.TimeNanos - p0.TimeN


oses related to programming, coding, application development,
 * or information technology.  Permission for such use, copying, modification,
 * merger, publication, distribution, sublicensing, creation of derivative works,
 * or sale is expressly withheld.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

import kotlin.math.PI
import kotlin.math.sqrt

fun main() {

  /*
  1. Declare a constant `exercises` with value 9 and a variable `exercisesSolved` with value 0. Increment this variable
  every time you solve an exercise (including this one).
  */

  val exercises: Int = 9
  var exercisesSolved: Int = 0
  exercisesSolved += 1

  /*
  2. Given the following code:

  age = 16
  print(age)
  age = 30
  print(age)
  */

  var age: Int  // it is a var not a val
  age = 16
  print(age)
  age = 30
  print(age)
  exercisesSolved += 1

  /*
  3. Consider the following code:

  val a: Int = 46
  val b: Int = 10

  Work out what answer equals when you add the following lines of code:

  // 1
  val answer1: Int = (a * 100) + b
  // 2
  val answer2: Int = (a * 100) + (b * 100)
  // 3
  val answer3: Int = (a * 100) + (b / 10)
  */

  val a: Int = 46
  val b: Int = 10
  val answer1: Int = (a * 100) + b
  val answer2: Int = (a * 100) + (b * 100)
  val answer3: Int = (a * 100) + (b / 10)
  exercisesSolved += 1

  /*
  4. Add parentheses to the following calculation. The parentheses should show the order in which the operations are
  performed and should not alter the result of the calculation.

  5 * 3 - 4 / 2 * 2

  */

  (5 * 3) - ((4 / 2) * 2)
  exercisesSolved += 1

  /*
  5. Declare two constants `a` and `b` of type `Double` and assign both a value. Calculate the average of `a` and `b`
  and store the result in a constant named `average`.
  */

  val x: Double = 7.5
  val y: Double = 5.0
  val average: Double = (x + y) / 2
  exercisesSolved += 1

  /*
  Bonus: why is it important that x and y are of type Double?

  Solution: If x and y were of type Int, the result would be an Int as well, and your average might not be integer.
  */

  /*
  6. A temperature expressed in °C can be converted to °F by multiplying by 1.8 then incrementing by 32. In this
  challenge, do the reverse: convert a temperature from °F to °C.

  Declare a constant named `fahrenheit` of type `Double`
  and assign it a value. Calculate the corresponding temperature in °C and store the result in a constant named
  `celcius`.
  */

  val fahrenheit: Double = 121.0
  val celcius: Double = (fahrenheit - 32) / 1.8
  exercisesSolved += 1

  /*
  7. Suppose the squares on a chessboard are numbered left to right, top to bottom, with 0 being the top-left square
  and 63 being the bottom-right square. Rows are numbered top to bottom, 0 to 7. Columns are numbered left to right, 0
  to 7.

  Declare a constant `position` and assign it a value between 0 and 63. Calculate the corresponding row and
  column numbers and store the results in constants named `row` and `column`.
  */

  val position: Int = 54


---@class addonTableBaganator
local addonTable = select(2, ...)
BaganatorItemViewCommonBankViewMixin = {}

function BaganatorItemViewCommonBankViewMixin:OnLoad()
  ButtonFrameTemplate_HidePortrait(self)
  ButtonFrameTemplate_HideButtonBar(self)
  self.Inset:Hide()

  self:RegisterForDrag("LeftButton")
  self:SetMovable(true)
  self:SetClampedToScreen(true)
  self:SetUserPlaced(false)

  self.Anchor = addonTable.ItemViewCommon.GetAnchorSetter(self, addonTable.Config.Options.BANK_ONLY_VIEW_POSITION)

  self.tabPool = addonTable.ItemViewCommon.GetTabButtonPool(self)

  self.Tabs = {}

  if self.characterTabsTemplate and Syndicator.Constants.CharacterBankTabsActive then
    self.Character = CreateFrame("Frame", nil, self, self.characterTabsTemplate)
    self.Character:SetPoint("TOPLEFT")
  else
    self.Character = CreateFrame("Frame", nil, self, self.characterTemplate)
    self.Character:SetPoint("TOPLEFT")
  end
  self:InitializeWarband(self.warbandTemplate)

  self.currentTab = self.Character
  if addonTable.Config.Get(addonTable.Config.Options.BANK_CURRENT_TAB) == addonTable.Constants.BankTabType.Warband then
    self:SetTab(addonTable.Constants.BankTabType.Warband)
  end

  Syndicator.CallbackRegistry:RegisterCallback("BagCacheUpdate",  function()
    self.hasCharacter = true
  end)

  self:UpdateTransferButton()

  addonTable.Skins.AddFrame("ButtonFrame", self, {"bank"})
end

function BaganatorItemViewCommonBankViewMixin:SetTab(index)
  self.currentTab:Hide()
  addonTable.Config.Set(addonTable.Config.Options.BANK_CURRENT_TAB, index)

  if index == addonTable.Constants.BankTabType.Character then
    self.currentTab = self.Character
  elseif index == addonTable.Constants.BankTabType.Warband then
    self.currentTab = self.Warband
  end

  self.currentTab:Show()

  if self:IsVisible() then
    PanelTemplates_SetTab(self, index)
    addonTable.Config.Set(addonTable.Config.Options.BANK_CURRENT_TAB, index)
    self:UpdateView()
    addonTable.CallbackRegistry:TriggerEvent("BankViewChanged")
  end
end

function BaganatorItemViewCommonBankViewMixin:InitializeWarband(template)
  if Syndicator.Constants.WarbandBankActive then
    self.Warband = CreateFrame("Frame", nil, self, template)
    self.Warband:Hide()
    self.Warband:SetPoint("TOPLEFT")

    local characterTab = self.tabPool:Acquire()
    addonTable.Skins.AddFrame("TabButton", characterTab)
    characterTab:SetText(addonTable.Locales.CHARACTER)
    characterTab:Show()
    characterTab:SetScript("OnClick", function()
      self:SetTab(1)
    end)

    local warbandTab = self.tabPool:Acquire()
    warbandTab:SetText(addonTable.Locales.WARBAND)
    warbandTab:Show()
    warbandTab:SetScript("OnClick", function()
      self:SetTab(2)
    end)
    addonTable.Skins.AddFrame("TabButton", warbandTab)

    self.Tabs[1]:SetPoint("BOTTOM", 0, -30)
    PanelTemplates_SetNumTabs(self, #self.Tabs)
  end
end

function BaganatorItemViewCommonBankViewMixin:UpdateTransferButton()
  if not self.currentTab.isLive or self.currentTab.isLocked then
    self.TransferButton:Hide()
    return
  end

  self.TransferButton:ClearAllPoints()
  if self.SortButton:IsSh


cx,8)
	mov	(%rdi,%rcx,8), %r13
	add	%r11, %r12
	adc	$0, %r9
Llo0:	mov	%rdx, %r10
	mov	%r12, -8(%rdi,%rcx,8)
	add	%rax, %r13
	adc	$0, %r10
	mov	8(%rsi,%rcx,8), %rax
	add	%r8, %r13
	adc	$0, %r10
	mul	%rbx
	add	%rax, %r13
	mov	%rdx, %r11
	adc	$0, %r11
	mov	8(%rsi,%rcx,8), %rax
Llo3:	mul	%rbp
	add	%r9, %r13
	mov	8(%rdi,%rcx,8), %r12
	adc	$0, %r11
	mov	%rdx, %r8
	add	%rax, %r12
	adc	$0, %r8
	mov	16(%rsi,%rcx,8), %rax
	mul	%rbx
	add	%r10, %r12
	mov	%r13, (%rdi,%rcx,8)
	mov	%rdx, %r9
	adc	$0, %r8
	add	%rax, %r12
	adc	$0, %r9
	mov	16(%rsi,%rcx,8), %rax
	add	%r11, %r12
	adc	$0, %r9
Llo2:	mul	%rbp
	mov	16(%rdi,%rcx,8), %r13
	add	%rax, %r13
	mov	%rdx, %r10
	adc	$0, %r10
	mov	24(%rsi,%rcx,8), %rax
	mov	%r12, 8(%rdi,%rcx,8)
	mul	%rbx
	add	%r8, %r13
	mov	%rdx, %r11
	adc	$0, %r10
	add	%rax, %r13
	mov	24(%rsi,%rcx,8), %rax
	mov	24(%rdi,%rcx,8), %r12
	adc	$0, %r11
	add	$4, %rcx
	jnc	Ltop

Lend:	mul	%rbp
	add	%r9, %r13
	adc	$0, %r11
	add	%r10, %rax
	adc	$0, %rdx
	mov	%r13, -16(%rdi)
	add	%r11, %rax
	adc	$0, %rdx
	mov	%rax, -8(%rdi)
	mov	%rdx, %rax

	pop	%r13
	pop	%r12
	pop	%rbp
	pop	%rbx
	pop	%rsi
	pop	%rdi
	ret


header = f"Result: {result_obj}"
                    logger.info(f"📄 Scalar result: {header}")

                # Show only reasoning thinking in Model Thinking (collapsed by default)
                thinking_html = ""
                if raw_thinking:
                    thinking_html = (
                        ''
                        '🧠 Reasoning'
                        f'
{raw_thinking}
'
                        ''
                    )

                # Show model explanation directly
                explanation_html = reasoning_txt

                # Store code separately for proper display
                # Combine thinking and explanation
                assistant_msg = f"{thinking_html}{explanation_html}"

                # Store message with appropriate plot indices
                message_data = {
                    "role": "assistant",
                    "content": assistant_msg,
                    "code": code  # Store code separately
                }

                if is_multi_graph:
                    message_data["plot_indices"] = plot_indices
                    message_data["data_indices"] = data_indices
                else:
                    message_data["plot_index"] = plot_idx
                    message_data["data_index"] = data_idx

                st.session_state.messages.append(message_data)

                logger.info("✅ Response added to chat history, rerunning app")
                st.rerun()


.collect::<Vec<usize>>()
                .try_into()
                .unwrap();
            assert!(
                !has_duplicates(&node_ids),
                "Element's node_ids should have 4 unique values!"
            );

            let material_props: [f64; 4] = json_element["materials"]
                .members()
                .map(|mp_json| {
                    mp_json
                        .as_f64()
                        .expect("Element materials must be numerical values")
                })
                .collect::<Vec<f64>>()
                .try_into()
                .unwrap();

            (Materials::from_array(material_props), node_ids)
        })
        .unzip()
}

fn parse_node_information(mesh_file_json: &JsonValue) -> Vec<Point> {
    assert!(
        mesh_file_json["Nodes"].is_array(),
        "Nodes must be an Array!"
    );

    let node_points: Vec<Point> = mesh_file_json["Nodes"]
        .members()
        .map(|json_node_point| {
            assert!(json_node_point.is_array(), "nodes must be arrays!");
            assert_eq!(
                json_node_point.members().count(),
                2,
                "nodes must be arrays of length 2!"
            );

            let x = json_node_point[0]
                .as_f64()
                .expect("nodes must be composed of numerical values!");
            let y = json_node_point[1]
                .as_f64()
                .expect("nodes must be composed of numerical values!");

            Point::new(x, y)
        })
        .collect();

    assert!(
        !has_duplicates(&node_points),
        "All Nodes must be at unique locations!"
    );

    node_points
}

fn has_duplicates<T>(values: &[T]) -> bool
where
    T: PartialEq,
{
    for (i, val) in values.iter().enumerate() {
        for val_cmp in values.iter().skip(i + 1) {
            if val == val_cmp {
                return true;
            }
        }
    }
    false
}

#[derive(Debug)]
pub enum MeshAccessError {
    ElemDoesNotExist(usize),
    EdgeDoesNotExist(usize),
    NodeDoesNotExist(usize),
}

impl std::error::Error for MeshAccessError {}

impl fmt::Display for MeshAccessError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match self {
            Self::EdgeDoesNotExist(edge_id) => {
                write!(f, "Attempt to access non-existent edge: {}!", edge_id)
            }
            Self::ElemDoesNotExist(elem_id) => {
                write!(f, "Attempt to access non-existent elem: {}!", elem_id)
            }
            Self::NodeDoesNotExist(node_id) => {
                write!(f, "Attempt to access non-existent node: {}!", node_id)
            }
        }
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    const MESH_A_POINTS_X: [[f64; 4]; 4] = [
        [0.0, 1.0, 0.0, 1.0],
        [1.0, 2.0, 1.0, 2.0],
        [0.0, 1.0, 0.0, 1.0],
        [1.0, 2.0, 1.0, 2.0],
    ];


,
                    verticalEllipseRadius = args[1].toFloat(),
                    theta = args[2].toFloat(),
                    isMoreThanHalf = args[3].toBoolean(),
                    isPositiveArc = args[4].toBoolean(),
                    arcStartDx = args[5].toFloat(),
                    arcStartDy = args[6].toFloat(),
                )
            }
            "arcTo" -> if (args.size == 7 && args.allFloatOrBoolean()) {
                pathNodes += ArcTo(
                    horizontalEllipseRadius = args[0].toFloat(),
                    verticalEllipseRadius = args[1].toFloat(),
                    theta = args[2].toFloat(),
                    isMoreThanHalf = args[3].toBoolean(),
                    isPositiveArc = args[4].toBoolean(),
                    arcStartX = args[5].toFloat(),
                    arcStartY = args[6].toFloat(),
                )
            }
        }
    }

    return pathNodes
}

private fun List<String>.allFloat() = all(String::isFloat)
private fun List<String>.allFloatOrBoolean() = all(String::isFloatOrBoolean)

private fun String.isFloat() = toFloatOrNull() != null

private fun String.isFloatOrBoolean() = isFloat() || this == "true" || this == "false" || this == "0" || this == "1"

package io.github.composefluent.icons.filled

import androidx.compose.ui.graphics.vector.ImageVector
import io.github.composefluent.icons.Icons
import io.github.composefluent.icons.fluentIcon
import io.github.composefluent.icons.fluentPath

public val Icons.Filled.CloudLink: ImageVector
    get() {
        if (_cloudLink != null) {
            return _cloudLink!!
        }
        _cloudLink = fluentIcon(name = "Filled.CloudLink") {
            fluentPath {
                moveTo(6.08f, 9.02f)
                arcToRelative(6.0f, 6.0f, 0.0f, false, true, 11.84f, 0.0f)
                curveToRelative(2.23f, 0.2f, 4.0f, 2.04f, 4.08f, 4.31f)
                arcToRelative(4.74f, 4.74f, 0.0f, false, false, -3.75f, -1.83f)
                horizontalLineToRelative(-3.5f)
                arcToRelative(4.75f, 4.75f, 0.0f, false, false, -4.42f, 6.5f)
                lineTo(6.5f, 18.0f)
                arcToRelative(4.5f, 4.5f, 0.0f, false, true, -0.42f, -8.98f)
                close()
                moveTo(22.0f, 16.25f)
                arcToRelative(3.75f, 3.75f, 0.0f, false, false, -3.75f, -3.75f)
                horizontalLineToRelative(-0.1f)
                arcToRelative(0.75f, 0.75f, 0.0f, false, false, 0.1f, 1.5f)
                horizontalLineToRelative(0.15f)
                arcToRelative(2.25f, 2.25f, 0.0f, false, true, -0.15f, 4.5f)
                lineToRelative(-0.1f, 0.01f)
                arcToRelative(0.75f, 0.75f, 0.0f, false, false, 0.1f, 1.5f)
                lineTo(18.25f, 20.0f)
                horizontalLineToRelative(0.2f)
                arcTo(3.75f, 3.75f, 0.0f, false, false, 22.0f, 16.24f)
                close()
                moveTo(15.5f, 13.25f)
                arcToRelative(0.75f, 0.75f, 0.0f, false, false, -0.75f, -0.75f)
                horizontalLineToRelative(-0.2f)
                arcToRelative(3.75f, 3.75f, 0.0f, false, false, 0.2f, 7.5f)
                horizontalLineToRelative(0.1f)
                arcToRelative(0.75f, 0.75f, 0.0f, false, false, -0.1f, -1.5f)
                horizontalLineToRelative(-0


    }

    require(endBlockNumberInclusive - startBlockNumberInclusive < config.maxBlockCount.toLong()) {
      "difference between endBlockNumberInclusive=$endBlockNumberInclusive and " +
        "startBlockNumberInclusive=$startBlockNumberInclusive must be less " +
        "than maxBlockCount=${config.maxBlockCount}"
    }

    val newestBlock = DefaultBlockParameterNumber(endBlockNumberInclusive)
    val blockCount = (endBlockNumberInclusive - startBlockNumberInclusive).inc().toInt()

    log.debug(
      "Fetching fee history data: startBlockNumberInclusive={} " +
        "endBlockNumberInclusive={} newestBlock={} blockCount={}",
      startBlockNumberInclusive,
      endBlockNumberInclusive,
      newestBlock.blockNumber,
      blockCount,
    )

    return getFeeHistory(newestBlock, blockCount)
      .whenException { th ->
        log.warn("Get fee history data failure: errorMessage={}", th.message, th)
      }
  }
}
package net.consensys.linea.ethereum.gaspricing.staticcap

import linea.domain.FeeHistory
import org.assertj.core.api.Assertions
import org.junit.jupiter.api.Test

class GasUsageRatioWeightedAverageFeesCalculatorTest {
  private val config = GasUsageRatioWeightedAverageFeesCalculator.Config(
    baseFeeCoefficient = 0.1,
    priorityFeeCoefficient = 1.2,
    baseFeeBlobCoefficient = 0.1,
    blobSubmissionExpectedExecutionGas = 120_000,
    expectedBlobGas = 131_000,
  )
  private val feesCalculator = GasUsageRatioWeightedAverageFeesCalculator(config)

  @Test
  fun calculateFees_singleBlockHistory() {
    val feeHistory = FeeHistory(
      oldestBlock = 100uL,
      baseFeePerGas = listOf(100, 110).map { it.toULong() },
      reward = listOf(1000).map { listOf(it.toULong()) },
      gasUsedRatio = listOf(0.25),
      baseFeePerBlobGas = listOf(100, 110).map { it.toULong() },
      blobGasUsedRatio = listOf(0.16),
    )
    // (100*0.1 + 1000*1.2)*0.25/0.25 = 1210
    // ((100*0.1)*0.16)/0.16 * (131000.0 / 120000.0) = 10.9166666
    val executionGasPrice = (100.0 * 0.1 + 1000 * 1.2) * 0.25 / 0.25
    val blobGasPrice = (100.0 * 0.1 * 0.16 * 131_000.0) / (120_000.0 * 0.16)
    val expectedGasPrice = executionGasPrice + blobGasPrice
    val calculatedL2GasPrice = feesCalculator.calculateFees(feeHistory)
    Assertions.assertThat(expectedGasPrice.compareTo(calculatedL2GasPrice)).isZero()
  }

  @Test
  fun calculateFees_singleBlockHistory_zeroUsageRatio() {
    val feeHistory = FeeHistory(
      oldestBlock = 100uL,
      baseFeePerGas = listOf(100, 110).map { it.toULong() },
      reward = listOf(1000).map { listOf(it.toULong()) },
      gasUsedRatio = listOf(0.0),
      baseFeePerBlobGas = listOf(100, 110).map { it.toULong() },
      blobGasUsedRatio = listOf(0.0),
    )
    // (100*0.1 + 1000*1.2) = 1210
    // (((100*0.1) * 0.5) / 0.5 ) * (131000.0 / 120000.0) = 10.9166666
    val executionGasPrice = 100 * 0.1 + 1000 * 1.2
    val blobGasPrice = 100 * 0.1 * 0.5 * 131000 / (0.5 * 120000)
    val expectedL2GasPrice = executionGasPrice + blobGasPrice
    val calculatedL2GasPrice = feesCalculator.calculateFees(feeHistory)
    Assertions.assertThat(calculatedL2GasPrice.compareTo(expectedL2GasPrice)).isZero()
  }

  @Test
  fun calculateF


    }

    fn size(&self) -> usize {
        1 + self.left.as_ref().map_or(0, |n| n.size()) + self.right.as_ref().map_or(0, |n| n.size())
    }

    /// Left rotation. Orient a (temporarily) right-leaning red link to lean left.
    fn rotate_left(&mut self) {
        assert!(is_red(&self.right));
        let mut x = self.right.take();
        self.right = x.as_mut().unwrap().left.take();
        x.as_mut().unwrap().color = self.color;
        self.color = Red;
        let old_self = mem::replace(self, *x.unwrap());
        self.left = Some(Box::new(old_self));
    }

    /// Right rotation. Orient a left-leaning red link to (temporarily) lean right
    fn rotate_right(&mut self) {
        assert!(is_red(&self.left));
        let mut x = self.left.take();
        self.left = x.as_mut().unwrap().right.take();
        x.as_mut().unwrap().color = self.color;
        self.color = Red;
        let old_self = mem::replace(self, *x.unwrap());
        self.right = Some(Box::new(old_self));
    }

    /// Color flip. Recolor to split a (temporary) 4-node.
    fn flip_color(&mut self) {
        assert!(!self.is_red());
        assert!(is_red(&self.left));
        assert!(is_red(&self.right));
        self.color = Red;
        self.left.as_mut().map(|n| n.color = Black);
        self.right.as_mut().map(|n| n.color = Black);
    }
}

impl<K: fmt::Debug, V: fmt::Debug> Node<K, V> {
    fn dump(&self, depth: usize, f: &mut fmt::Formatter, symbol: char) {
        if depth == 0 {
            writeln!(f, "\n{:?}[{:?}]", self.key, self.val).unwrap();
        } else {
            if self.is_red () {
                writeln!(f, "{}{}=={:?}[{:?}]",
                         iter::repeat("|  ").take(depth-1).collect::<Vec<&str>>().concat(),
                         symbol, self.key, self.val).unwrap();
            } else {
                writeln!(f, "{}{}--{:?}[{:?}]",
                         iter::repeat("|  ").take(depth-1).collect::<Vec<&str>>().concat(),
                         symbol, self.key, self.val).unwrap();
            }
        }
        if self.left.is_some() {
            self.left.as_ref().unwrap().dump(depth + 1, f, '+');
        }
        if self.right.is_some() {
            self.right.as_ref().unwrap().dump(depth + 1, f, '`');
        }
    }
}

fn is_red<K,V>(x: &Option<Box<Node<K,V>>>) -> bool {
    if x.as_ref().is_none() {
        false
    } else {
        x.as_ref().unwrap().color == Red
    }
}

fn put<K: PartialOrd, V>(x: Option<Box<Node<K,V>>>, key: K, val: V) -> Option<Box<Node<K,V>>> {
    let mut x = x;
    if x.is_none() {
        return Some(Box::new(Node


CreateEvent('$path')";
}

/**
 * File system event for modifications of file system objects.
 */
class FileSystemModifyEvent extends FileSystemEvent {
  /**
   * If the content was changed and not only the attributes, [contentChanged]
   * is `true`.
   */
  final bool contentChanged;

  FileSystemModifyEvent._(path, isDirectory, this.contentChanged)
      : super._(FileSystemEvent.MODIFY, path, isDirectory);

  String toString() =>
      "FileSystemModifyEvent('$path', contentChanged=$contentChanged)";
}

/**
 * File system event for deletion of file system objects.
 */
class FileSystemDeleteEvent extends FileSystemEvent {
  FileSystemDeleteEvent._(path, isDirectory)
      : super._(FileSystemEvent.DELETE, path, isDirectory);

  String toString() => "FileSystemDeleteEvent('$path')";
}

/**
 * File system event for moving of file system objects.
 */
class FileSystemMoveEvent extends FileSystemEvent {
  /**
   * If the underlaying implementation is able to identify the destination of
   * the moved file, [destination] will be set. Otherwise, it will be `null`.
   */
  final String destination;

  FileSystemMoveEvent._(path, isDirectory, this.destination)
      : super._(FileSystemEvent.MOVE, path, isDirectory);

  String toString() {
    var buffer = new StringBuffer();
    buffer.write("FileSystemMoveEvent('$path'");
    if (destination != null) buffer.write(", '$destination'");
    buffer.write(')');
    return buffer.toString();
  }
}

class _FileSystemWatcher {
  external static Stream<FileSystemEvent> _watch(
      String path, int events, bool recursive);
  external static bool get isSupported;
}
// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of dart.collection;

/**
 * A specialized double-linked list of elements that extends [LinkedListEntry].
 *
 * This is not a generic data structure. It only accepts elements that extend
 * the [LinkedListEntry] class. See the [Queue] implementations for
 * generic collections that allow constant time adding and removing at the ends.
 *
 * This is not a [List] implementation. Despite its name, this class does not
 * implement the [List] interface. It does not allow constant time lookup by
 * index.
 *
 * Because the elements themselves contain the links of this linked list,
 * each element can be in only one list at a time. To add an element to another
 * list, it must first be removed from its current list (if any).
 *
 * In return, each element knows its own place in the linked list, as well as
 * which list it is in. This allows constant time [LinkedListEntry.addAfter],
 * [LinkedListEntry.addBefore] and [LinkedListEntry.unlink] operations
 * when all you have is the element.
 *
 * A `LinkedList` also allows constant time adding and removing at either end,
 * and a constant time length getter.
 */
class LinkedList<E extends LinkedListEntry<E>>
    extends Iterable<E> {

  int _modificationCount = 0;
  int _length = 0;
  E _first;

  /**
   * Construct a new empty linked list.
   */
  LinkedList();

  /**
   * Add [entry] to the beginning of the linked list.
   */
  void addFirst(E entry) {
    _insertBefore(_first, entry, updateFirst: true);
    _first = entry;
  }

  /**
   * Add [entry] to the end of the linked list.
   */
  void add(E entry) {
    _insertBef


, Index: k}, v),
												},
											},
										},
									},
								},
							},
						},
					}

					g.appendToCurrentBlock(loop)

					argExprs = append(argExprs, types.TypeExpr{keywordArgsWithoutParam.Type(), paramHash})
					break
				}
			}
			argExprs = append(argExprs, types.TypeExpr{keywordArgsWithoutParam.Type(), g.CompileExpr(keywordArgsWithoutParam)})
		}
	}
	return append(argExprs, splatArgs...)
}

func (g *GoProgram) CompileArg(node parser.Node) ast.Expr {
	if assignment, ok := node.(*parser.AssignmentNode); ok {
		g.CompileStmt(assignment)
		return g.CompileExpr(assignment.Left[0])
	}
	return g.CompileExpr(node)
}

func (g *GoProgram) CompileKeyFromDoubleSplatArg(key string, node parser.Node) ast.Expr {
	switch n := node.(type) {
	case *parser.HashNode:
		for _, kv := range n.Pairs {
			if kv.Label == key {
				return g.CompileExpr(kv.Value)
			}
		}
	case *parser.IdentNode:
		return &ast.IndexExpr{
			X:     g.it.Get(n.Val),
			Index: bst.String(key),
		}
	}
	return &ast.BadExpr{}
}
// Copyright 2024 Redpanda Data, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Platforms and architectures list from https://pkg.go.dev/modernc.org/sqlite?utm_source=godoc#hdr-Supported_platforms_and_architectures
// Last updated from modernc.org/sqlite@v1.19.1
//go:build (darwin && (amd64 || arm64)) || (freebsd && (amd64 || arm64)) || (linux && (386 || amd64 || arm || arm64 || riscv64)) || (windows && (amd64 || arm64))

package sql

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

// Package pure imports all component implementations that are pure, in that
// they do not interact with external systems. This includes all base component
// types such as brokers and is likely necessary as a base for all builds.
//
// EXPERIMENTAL: The specific components excluded by this package may change
// outside of major version releases. This means we may choose to remove certain
// plugins if we determine that their dependencies are likely to interfere with
// the goals of this package.
package pure

import (
	// Import only pure packages.
	_ "github.com/redpanda-data/benthos/v4/public/components/pure"
)
// Copyright 2025 Redpanda Data, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License a


687 0.0043 56.366);
  --ring: oklch(0.5854 0.2041 277.1173);
  --chart-1: oklch(0.5854 0.2041 277.1173);
  --chart-2: oklch(0.5106 0.2301 276.9656);
  --chart-3: oklch(0.4568 0.2146 277.0229);
  --chart-4: oklch(0.3984 0.1773 277.3662);
  --chart-5: oklch(0.3588 0.1354 278.6973);
  --sidebar: oklch(0.8687 0.0043 56.366);
  --sidebar-foreground: oklch(0.2795 0.0368 260.031);
  --sidebar-primary: oklch(0.5854 0.2041 277.1173);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.9376 0.026 321.9388);
  --sidebar-accent-foreground: oklch(0.3729 0.0306 259.7328);
  --sidebar-border: oklch(0.8687 0.0043 56.366);
  --sidebar-ring: oklch(0.5854 0.2041 277.1173);
  --font-sans: Plus Jakarta Sans, sans-serif;
  --font-serif: Lora, serif;
  --font-mono: Roboto Mono, monospace;
  --radius: 1.25rem;
  --shadow-2xs: 2px 2px 10px 4px hsl(240 4% 60% / 0.09);
  --shadow-xs: 2px 2px 10px 4px hsl(240 4% 60% / 0.09);
  --shadow-sm:
    2px 2px 10px 4px hsl(240 4% 60% / 0.18),
    2px 1px 2px 3px hsl(240 4% 60% / 0.18);
  --shadow:
    2px 2px 10px 4px hsl(240 4% 60% / 0.18),
    2px 1px 2px 3px hsl(240 4% 60% / 0.18);
  --shadow-md:
    2px 2px 10px 4px hsl(240 4% 60% / 0.18),
    2px 2px 4px 3px hsl(240 4% 60% / 0.18);
  --shadow-lg:
    2px 2px 10px 4px hsl(240 4% 60% / 0.18),
    2px 4px 6px 3px hsl(240 4% 60% / 0.18);
  --shadow-xl:
    2px 2px 10px 4px hsl(240 4% 60% / 0.18),
    2px 8px 10px 3px hsl(240 4% 60% / 0.18);
  --shadow-2xl: 2px 2px 10px 4px hsl(240 4% 60% / 0.45);
  --tracking-normal: 0em;
  --spacing: 0.25rem;
}

.dark {
  --background: oklch(0.2244 0.0074 67.437);
  --foreground: oklch(0.9288 0.0126 255.5078);
  --card: oklch(0.2801 0.008 59.3379);
  --card-foreground: oklch(0.9288 0.0126 255.5078);
  --popover: oklch(0.2801 0.008 59.3379);
  --popover-foreground: oklch(0.9288 0.0126 255.5078);
  --primary: oklch(0.6801 0.1583 276.9349);
  --primary-foreground: oklch(0.2244 0.0074 67.437);
  --secondary: oklch(0.3359 0.0077 59.4197);
  --secondary-foreground: oklch(0.8717 0.0093 258.338


unwrap_or(vec![]);

    assert!(union.contains(&"4".to_string()));
    assert!(union.contains(&"5".to_string()));
    assert!(union.contains(&"6".to_string()));
    assert!(union.contains(&"7".to_string()));
    assert!(union.contains(&"8".to_string()));
    assert!(union.contains(&"9".to_string()));

    assert!(cache.set_move("union", "set_1", 9).unwrap_or(false));

    assert!(cache.set_ismember("set_1", 9).unwrap_or(false));

    let inter = cache.set_inter(&["union", "set_1"]).unwrap_or(vec![]);

    assert!(inter.contains(&"4".to_string()));
    assert!(inter.contains(&"5".to_string()));
}

#[test]
fn test_redis() {
    let cache = redis("127.0.0.1:6379", None, None).expect("dahh");

    let res = cache.set_members("this_set_should_not_exists");
    println!("test 1 {:?}", res);

    let res = cache.hash_get::<String>("this_hashset_does_not_exists", "neither_this_field");
    println!("test 2 {:?}", res);
    let res = cache.hash_set("test_1", "field_1", "val");
    println!("test 3 {:?}", res);
    let res = cache.hash_get::<String>("test_1", "field_1");
    println!("test 4 {:?}", res);
    let res = cache.hash_get::<String>("test_1", "field_2");
    println!("test 5 {:?}", res);

}//
// https://docs.humio.com/language-syntax/
//
// #(tag)=(tag_value) (|:log_op)
// (path)=(path_value) (|:log_op)
// function_call(path_value, ident_like=function_call()) | function_call()
//
use combine::{
    char::{space, string},
    parser::range::take_until,
    Parse, ParseError, Stream,
};

#[derive(Debug, PartialEq, Clone)]
pub enum LogicalOp {
    And,
    Or,
}

#[derive(Debug, PartialEq, Clone)]
pub enum NegateOp {
    Not,
}

#[derive(Debug, PartialEq, Clone)]
pub struct Tag<'a> {
    name: Cow<'a, str>,
    value: Cow<'a, str>,
}

#[derive(Debug, PartialEq, Clone)]
pub struct Filter<'a> {
    name: Cow<'a, str>,
    value: Cow<'a, str>,
}

impl Tag {
    #[inline]
    pub fn new<'a, S>(name: S, value: S) -> Tag<'a>
    where
        S: Into<Cow<'a, str>>,
    {
        Tag {
            name: name.into(),
            value: value.into(),
        }
    }
}

#[inline]
pub fn tag<I>() -> impl Parser<Input = I, Ouput = Tag<'a>>
where
    I: Stream<Item = char>,
    I::Error: ParseError<I::Item, I::Range, I::Position>,
{
    char('#')
        .with(take_until('='))
        .and(take_until(' '))
        .map(|k, v| Tag::new(k, v))
}

#[inline]
pub fn filter<I>() -> impl Parser<Input = I, Output = Filter<'a>>
where
    I: Stream<Item = char>,
    I::Error: ParseError<I::Item, I::Range, I::Position>,
{
    take_until('=')
        .and(take_until(' '))
        .ma


f   flight.actype == AIRBOSS.AircraftCarrier.HORNET
    or flight.actype == AIRBOSS.AircraftCarrier.FA18C
    or flight.actype == AIRBOSS.AircraftCarrier.RHINOE
    or flight.actype == AIRBOSS.AircraftCarrier.RHINOF
    or flight.actype == AIRBOSS.AircraftCarrier.GROWLER then
    Speed = UTILS.KnotsToKmph( 200 )
  elseif flight.actype == AIRBOSS.AircraftCarrier.E2D or flight.actype == AIRBOSS.AircraftCarrier.C2A then
    Speed = UTILS.KnotsToKmph( 150 )
  elseif flight.actype == AIRBOSS.AircraftCarrier.F14A_AI or flight.actype == AIRBOSS.AircraftCarrier.F14A or flight.actype == AIRBOSS.AircraftCarrier.F14B then
    Speed = UTILS.KnotsToKmph( 175 )
  elseif flight.actype == AIRBOSS.AircraftCarrier.S3B or flight.actype == AIRBOSS.AircraftCarrier.S3BTANKER then
    Speed = UTILS.KnotsToKmph( 140 )
  elseif flight.actype == AIRBOSS.AircraftCarrier.CORSAIR or flight.actype == AIRBOSS.AircraftCarrier.CORSAIR_CW then
    Speed = UTILS.KnotsToKmph( 100 )
  end

  -- Carrier position.
  local Carrier = self:GetCoordinate()

  -- Carrier heading.
  local hdg = self:GetHeading()

  -- Waypoints array.
  local wp = {}

  local CurrentSpeed = flight.group:GetVelocityKMH()

  -- Current positon.
  wp[#wp + 1] = flight.group:GetCoordinate():WaypointAirTurningPoint( nil, CurrentSpeed, {}, "Current position" )

  -- Altitude 800 ft. Looks like this works best.
  local alt = UTILS.FeetToMeters( 800 )

  -- Landing waypoint 5 NM behind carrier at 2000 ft = 610 meters ASL.
  wp[#wp + 1] = Carrier:Translate( UTILS.NMToMeters( 4 ), hdg - 160 ):SetAltitude( alt ):WaypointAirLanding( Speed, self.airbase, nil, "Landing" )
  -- wp[#wp+1]=Carrier:Translate(UTILS.NMToMeters(4), hdg-160):SetAltitude(alt):WaypointAirLandingReFu(Speed, self.airbase, nil, "Landing")

  -- wp[#wp+1]=self:GetCoordinate():Translate(UTILS.NMToMeters(3), hdg-160):SetAltitude(alt):WaypointAirTurningPoint(nil,Speed, {}, "Before Initial") ---WaypointAirLanding(Speed, self.airbase, nil, "Landing")
  -- wp[#wp+1]=self:GetCoordinate():WaypointAirLanding(Speed, self.airbase, nil, "Landing")

  -- Reinit waypoints.
  flight.group:WayPointInitialize( wp )

  -- Route group.
  flight.group:Route( wp, 0 )
end

--- Get marshal altitude and two positions of a counter-clockwise race track pattern.
-- @param #AIRBOSS self
-- @param #number stack Assigned stack number. Counting starts at one, i.e. stack=1 is the first stack.
-- @param #number case Recovery case. Default is self.case.
-- @return #number Holding altitude in meters.
-- @return Core.Point#COORDINATE First race track coordinate.
-- @return Core.Point#COORDINATE Second race track coordinate.
function AIRBOSS:_GetMarshalAltitude( stack, case )

  -- Stack <= 0.
  if stack <= 0 then
    return 0, nil, nil
  end

  -- Recovery case.
  case = case or self.case

  -- Carrier position.
  local Carrier = self:GetCoordinate()

  -- Altitude of first stack. Depends on recovery case.
  local angels0
  local Dist
  local p1 = nil -- Core.Point#COORDINATE
  local p2 = nil -- Core.Point#COORDINATE

  -- Stack number.
  local


 of the point (0-288). */

        public PU_IGT_POINT_S() {
            this.setAlignType(ALIGN_NONE);
        }

        public PU_IGT_POINT_S(short usPointPosX,short usPointPosY){
            this.setAlignType(ALIGN_NONE);
            this.usPointPosY=usPointPosY;
            this.usPointPosX=usPointPosX;
        }

        @Override
        protected List<String> getFieldOrder() {
            return Arrays.asList("usPointPosX", "usPointPosY");
        }
    }

    /* Shadow removal mode. */
    public interface PU_IGT_SHADOW_MODE {
        int PU_IGT_SHADOW_WEAK = 0; // Weak shadow.
        int PU_IGT_SHADOW_COMMON = 1; // Common shadow.
        int PU_IGT_SHADOW_STRONG = 2; // Strong shadow.
        int PU_IGT_SHADOW_MAX = 3;
    }

    /* Intelligent object recognition mode. */
    public interface PU_IGT_TARGET_MODE_E {
        int PU_IGT_TARGETMODE_CENTRE = 0; // Center.
        int PU_IGT_TARGETMODE_BOTTOM = 1; // Bottom.
        int PU_IGT_TARGETMODE_TOP = 2; // Top.
        int PU_IGT_TARGETMODE_MAX = 3;
    }

    public static class PU_IGT_TW_LINE extends Structure {
        public WinDef.UCHAR ucDirection; /*
         * Detection direction. 0: both; 1: from left to right; 2: from right to
         * left.
         */

        public PU_IGT_POINT_S stStartPoit; /* Start point of a tripwire. */
        public PU_IGT_POINT_S stEndPoit; /* End point of a tripwire. */
        public NativeLong ulLineIndex; /* Tripwire index. */
        public BOOL bEnable; /* Indicates whether to enable the tripwire. */
        public byte[] szLineName = new byte[PU_IGT_LINE_NAME_LEN]; /* Tripwire name. */

        public PU_IGT_TW_LINE() {
            this.setAlignType(ALIGN_NONE);
        }

        @Override
        protected List<String> getFieldOrder() {
            return Arrays.asList("ucDirection", "stStartPoit", "stEndPoit", "ulLineIndex", "bEnable", "szLineName");
        }

    }

    public static class PU_IGT_TW_LINE_ITEM extends Structure {
        public ULONG ulChannelId;
        /* C type : PU_IGT_OPT_TYPE */
        public int enOptType;
        public PU_IGT_TW_LINE stIgtTwLine;
        public byte[] szReserved = new byte[PU_RESERVE_LEN];

        public PU_IGT_TW_LINE_ITEM() {
            this.setAlignType(ALIGN_NONE);
        }

        @Override
        protected List<String> getFieldOrder() {
            return Arrays.asList("ulChannelId", "enOptType", "stIgtTwLine", "szReserved");
        }
    }

    public static class PU_IGT_TW_LINE_LIST extends Structure {
        public NativeLong ulLineNum;

        public PU_IGT_TW_LINE[] szTWLineList = new PU_IGT_TW_LINE[PU_TRIPWIRE_LEN_NUM_MAX];

        public PU_IGT_TW_LINE_LIST() {
            this.setAlignType(ALIGN_NONE);
        }

        @Override
        protected List<String> getFieldOrder() {
            return Arrays.asList("ulLineNum", "szTWLineList");
        }
    }

    public static class PU_IGT_TW_LINE_LIST_S extends Structure {
        public ULONG ulLineNum;
        public PU_IGT_TW_LINE


_callback_output_]]..ID_ext.dcl.id..'('..ps..[[, CEU_TRACE(-2));
#else
1;
#endif
]]
            if set then
                local _, to = unpack(set)
                SET(me, to, cb, nil,true)
            else
                LINE(me, cb)
            end
        else
            if AST.par(me, 'Async') then
                LINE(me, [[
CEU_APP.async_pending = 1;
ceu_callback_async_pending(CEU_TRACE(0));
_ceu_mem->_trails[]]..me.trails[1]..[[].evt.id = CEU_INPUT__ASYNC;
_ceu_mem->_trails[]]..me.trails[1]..[[].lbl    = ]]..me.lbl_out.id..[[;
{
    tceu_evt   __ceu_evt   = {]]..V(ID_ext)..[[.id, {NULL}};
    tceu_range __ceu_range = { &CEU_APP.root._mem, 0, CEU_TRAILS_N-1 };
    _ceu_nxt->evt    = __ceu_evt;
    _ceu_nxt->range  = __ceu_range;
]])

                if #List_Exp > 0 then
                    LINE(me, [[
    ceu_params_cpy(_ceu_nxt, &__ceu_ps, sizeof(__ceu_ps));
]])
                else
                    LINE(me, [[
    _ceu_nxt->params_n = 0;
]])
                end
                LINE(me, [[
    return 1;
}
]])
            else
                local isr = assert(AST.par(me,'Async_Isr'))
                local exps = unpack(isr)
                local sz = (ps=='NULL' and '0') or 'sizeof(__ceu_ps)'
                LINE(me, [[
{
#ifdef CEU_FEATURES_ISR_STATIC
    tceu_isr_evt __ceu_evt = { ]]..V(ID_ext)..'.id, '..sz..', '..ps..[[ };
    ceu_callback_isr_emit(]]..isr.mems.n..[[, (void*)&__ceu_evt, CEU_TRACE(0));
#else
    tceu_evt_id_params __ceu_evt = { ]]..V(ID_ext)..'.id, '..ps..[[ };
    ceu_callback_isr_emit(]]..V(exps[1])..[[, (void*)&__ceu_evt, CEU_TRACE(0));
#endif
}
]])
            end
            if AST.par(me, 'Async') then
                HALT(me, {
                    lbl = me.lbl_out.id,
                })
            end
        end
        LINE(me, [[
}
]])
    end,

    ---------------------------------------------------------------------------

    Await_Int = function (me)
        local Loc = unpack(me)
        local alias, tp = unpack(Loc.info.dcl)
        if Loc.info.tag == 'Var' then
            assert(alias == '&?')
            if not me.__adjs_is_abs_await then
                LINE(me, [[
if (]]..V(Loc)..[[ != NULL)
]])
            end
            LINE(me, '{')
            HALT(me, {
                { ['evt.id']  = 'CEU_INPUT__CODE_TERMINATED' },
                { ['evt.mem'] = '(tceu_code_mem*)'..V(Loc) },
                { lbl = me.lbl_out.id },
                lbl = me.lbl_out.id,


b();

        blake2b.update(left.as_slice());
        blake2b.update(right.as_slice());
        blake2b.finalize(&mut hash);
        hash.into()
    }
}

pub type CBMT = ExCBMT<H256, MergeH256>;
pub type CBMTMerkleProof = ExMerkleProof<H256, MergeH256>;

pub fn calculate_ckb_merkle_root(leaves: Vec<H256>) -> Result<H256, Error> {
    let tree = CBMT::build_merkle_tree(&leaves);
    Ok(tree.root())
}

/// blake2b(index(u32) | item_hash)
pub fn ckb_merkle_leaf_hash(index: u32, item_hash: &H256) -> H256 {
    let mut hasher = new_blake2b();
    hasher.update(&index.to_le_bytes());
    hasher.update(item_hash.as_slice());
    let mut buf = [0u8; 32];
    hasher.finalize(&mut buf);
    buf.into()
}

mod tests {

    #[test]
    fn merkle_proof_test() {
        let leaves: Vec<crate::smt::H256> = vec![
            [0u8; 32].into(),
            [1u8; 32].into(),
            [2u8; 32].into(),
            [3u8; 32].into(),
            [4u8; 32].into(),
        ];
        let leaves = leaves
            .into_iter()
            .enumerate()
            .map(|(index, hash)| crate::merkle_utils::ckb_merkle_leaf_hash(index as u32, &hash))
            .collect::<Vec<_>>();
        let root = crate::merkle_utils::CBMT::build_merkle_root(&leaves);

        let indices = vec![0, 4];
        let proof = crate::merkle_utils::CBMT::build_merkle_proof(&leaves, &indices);
        assert!(proof.is_some());
        //generate proof
        let proof = proof.unwrap();

        //rebuild proof
        let proof = crate::merkle_utils::CBMTMerkleProof::new(
            proof.indices().iter().copied().collect(),
            proof.lemmas().iter().copied().collect(),
        );

        let proof_leaves: Vec<crate::smt::H256> = vec![[0u8; 32].into(), [4u8; 32].into()];
        let proof_leaves = indices
            .into_iter()
            .zip(proof_leaves)
            .map(|(i, hash)| crate::merkle_utils::ckb_merkle_leaf_hash(i, &hash))
            .collect::<Vec<_>>();

        assert!(proof.verify(&root, &proof_leaves));

        let proof_leaves = vec![[1u8; 32].into(), [3u8; 32].into()];
        assert!(!proof.verify(&root, &proof_leaves));
    }
}
<reponame>songroom2016/ferrum-fix
#[derive(Debug, Clone)]
pub struct MsgTypeMap<T> {
    phantom: std::marker::PhantomData<T>,
}
//! Generic helper functions.
extern crate fnv;
extern crate itertools;
extern crate linked_hash_map;
extern crate linked_list;
extern crate num;
extern crate serde;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate failure;
extern crate flate2;

mod cache;
mod dag;
mod iterator;
pub mod multimap;
pub mod ndarray;
mod vec_set;
#[macro_use]
pub mod unwrap;
pub mod sequence;
pub mod tfrecord;

pub use self::cache::Cache;
pub use self::dag::Dag;
pub use self::iterator::*;
pub use self::ndarray::{NDArray


:4%;--del-family-primary:"Lexend Deca", sans-serif;--del-family-secondary:"Lexend Deca", sans-serif;--del-family-code:Inconsolata, Hack, SF Mono, Roboto Mono, Source Code Pro, Ubuntu Mono, monospace;--del-size-small:0.75rem;--del-size-normal:1rem;--del-size-medium:1.25rem;--del-size-large:1.5rem;--del-weight-light:300;--del-weight-normal:400;--del-weight-medium:500;--del-weight-semibold:600;--del-weight-bold:700;--del-weight-extrabold:800;--del-block-spacing:1.5rem;--del-duration:294ms;--del-easing:ease-out;--del-radius-small:0.25rem;--del-radius:0.375rem;--del-radius-medium:0.5em;--del-radius-large:0.75rem;--del-radius-rounded:9999px;--del-speed:86ms;--del-arrow-color:var(--del-link);--del-loading-color:var(--del-border);--del-burger-h:var(--del-link-h);--del-burger-s:var(--del-link-s);--del-burger-l:var(--del-link-l);--del-burger-border-radius:0.5em;--del-burger-gap:5px;--del-burger-item-height:2px;--del-burger-item-width:20px;--del-white:hsla(var(--del-white-h), var(--del-white-s), var(--del-white-l), 1);--del-white-base:hsla(var(--del-white-h), var(--del-white-s), var(--del-white-l), 1);--del-white-rgb:255, 255, 255;--del-white-h:0deg;--del-white-s:0%;--del-white-l:100%;--del-white-invert-l:15.0980392157%;--del-white-invert:#23272A;--del-white-on-scheme-l:35%;--del-white-on-scheme:hsla(var(--del-white-h), var(--del-white-s), var(--del-white-on-scheme-l), 1);--del-black:hsla(var(--del-black-h), var(--del-black-s), var(--del-black-l), 1);--del-black-base:hsla(var(--del-black-h), var(--del-black-s), var(--del-black-l), 1);--del-black-rgb:35, 39, 42;--del-black-h:206deg;--del-black-s:9%;--del-black-l:15%;--del-black-invert-l:100%;--del-black-invert:#ffffff;--del-black-on-scheme-l:15.0980392157%;--del-black-on-scheme:hsla(var(--del-black-h), var(--del-black-s), var(--del-black-on-scheme-l), 1);--del-light:hsla(var(--del-light-h), var(--del-light-s), var(--del-light-l), 1);--del-light-base:hsla(var(--del-light-h), var(--del-light-s), var(--del-light-l), 1);--del-light-rgb:243.372, 244.2764, 246.228;--del-light-h:221deg;--del-light-s:14%;--del-light-l:96%;--d


roperty is declared as being inherited.
        /// </summary>
        Boolean IsInherited { get; }

        /// <summary>
        /// Gets if the property is in its initial value.
        /// </summary>
        Boolean IsInitial { get; }

        /// <summary>
        /// Gets if the property can be animated.
        /// </summary>
        Boolean IsAnimatable { get; }

        /// <summary>
        /// Gets if the property can be inherited.
        /// </summary>
        Boolean CanBeInherited { get; }

        /// <summary>
        /// Gets if the property is a shorthand.
        /// </summary>
        Boolean IsShorthand { get; }

        /// <summary>
        /// Creates a computed version of the property.
        /// </summary>
        /// <param name="context">The context to compute for.</param>
        /// <returns>The computed version of the property if uncomputed, otherwise the same.</returns>
        ICssProperty Compute(ICssComputeContext context);
    }
}


   private activeIndex;
    private activePanel;
    private menu;
    /**
     *
     * @param {Container} parent
     * @constructor
     */
    constructor(parent: Container);
    add(panel: Panel): void;
    /**
     * Ezzel a metódussal lehet beállítani, hogy melyik legyen az aktív panel.
     * Paraméterként egy számot kell megadnunk, ami nem lehet null, undifined, vagy negatív érték.
     * A TabPanel 0 bázisindexű, így ha azt szeretnénk, hogy az első Panel legyen aktív akkor 0-t kell
     * paraméterként megadni.
     *
     * Ha a paraméterként megadott index megegyezik az aktuális aktív index értékével, akkor a metódus kilép.
     *
     * @param {number} activeIndex
     */
    setActiveTabIndex(index: number): void;
    /**
     *
     * @param {Panel} panel
     * @private
     */
    private setActivePanel(panel);
    /**
     * Ez a metódus vissza adja az aktív panel indexét.
     * @return {number} Vissza adja a jelenleg aktív panel indexet. Ha nincs még panel hozzáadva a TabPanel-hez,
     * akkor a -1 értékkel tér vissza.
     */
    getActiveTabIndex(): number;
    /**
     * Ez a helper metódus eldönti, hogy a paraméterként kapott egész szám az megfelel-e
     * a TabPanel által megkövetelt elvárásoknak.
     *
     *  - Nem lehet null vagy undifined
     *  - Nem lehet negatív érték
     *  - Kisebb kell, hogy legyen mint a panelek száma.
     *
     * @param {number} tabIndex Az ellenőrizni kívánt index.
     * @private
     */
    private checkTabIndex(tabIndex);
    /**
     * Vissza adja a jelenleg aktív panelt. Az aktív panel módosítása
     * a setActiveTabIndex metódus meghívásával lehetséges.
     *
     * @return {Panel} Az aktív panel vagy null érték, ha a TapPanel még üres.
     */
    getActivePanel(): Panel;
    /**
     *
     * @param {number} index
     * @return {Panel}
     */
    getPanel(index: number): Panel;
}
/**
 *
 * @author Gabor Kokeny
 */
declare class TabPanelMenu extends Menu {
    constructor(parent: Container);
}
/**
 * An object that maps keys to values.  A map cannot contain duplicate keys;
 * each key can map to at most one value.
 *
 * @author Gabor Kokeny
 */
declare class HashMap<K, V> {
    private elements;
    private valuesArray;
    private keySet;
    constructor();
    get(key: K): V;
    put(key: K, value: V): void;
    /**
     * Remove an element from the HashMap by Key
     *
     * @return {boolean} Return false if the method parameter key is null, and return true
     * if the element successfully removed from the HashMap otherwise return false
     */
    remove(key: K): boolean;
    contains(key: K): boolean;
    values(): List<V>;
    keys(): List<K>;
    /**
     * Remove all elements from the HashMap
     *
     */
    clear(): void;
    /**
     * Get size of HashMap
     *
     * @return {number} Return the number of elements that contains this hashMap
     */
    size(): number;
    /**
     * Iterate on own keyset
     */
    forEach(callbackfn: (value: K, index: number, array: K[]) => void, thisArg?: any): void;
}
declare class KeyValue<K, V> {
    private key_;
    private value_;
    constructor(key


.is_err());

    Ok(())
}

#[tokio::test]
async fn getjobstatuses_none_empty() -> Result<()> {
    let mut scheduler = create_slurm_scheduler().await?;

    let result = scheduler.get_job_statuses(vec![]).await;

    assert!(result.is_ok());
    let result = result.unwrap();
    let job_status = result.first();
    assert!(job_status.is_none());

    Ok(())
}

#[tokio::test]
async fn getjobstatuses_existing_ok() -> Result<()> {
    let mut scheduler = create_slurm_scheduler().await?;

    let job_description = JobDescription {
        arguments: Some(vec![String::from("3")]),
        executable: Some(String::from("sleep")),
        ..Default::default()
    };

    let job = scheduler.submit_batch_job(job_description).await;
    assert!(job.is_ok());
    let job = job.unwrap();

    let result = scheduler.get_job_statuses(vec![job.clone()]).await;

    assert!(result.is_ok());
    let result = result.unwrap();
    let job_status = result.first();
    assert!(job_status.is_some());
    let job_status = job_status.unwrap();
    assert_eq!(job_status.error_type, JobErrorType::None);

    scheduler.wait_until_done(job, None).await?;

    Ok(())
}

#[tokio::test]
async fn getjobstatuses_nonexisting_err() -> Result<()> {
    let mut scheduler = create_slurm_scheduler().await?;
    let job = Job::new(String::from("non-existing"));

    let result = scheduler.get_job_statuses(vec![job]).await;

    assert!(result.is_ok());
    let result = result.unwrap();
    let job_status = result.first();
    assert!(job_status.is_some());
    let job_status = job_status.unwrap();
    assert_eq!(job_status.error_type, JobErrorType::NotFound);

    Ok(())
}

#[tokio::test]
async fn getjobs_none_ok() -> Result<()> {
    let mut scheduler = create_slurm_scheduler().await?;

    let result = scheduler.get_jobs(None).await;

    assert!(result.is_ok());

    Ok(())
}

#[tokio::test]
async fn getjobs_existing_ok() -> Result<()> {
    let mut scheduler = create_slurm_scheduler().await?;

    let result = scheduler.get_jobs(Some(vec![String::from("mypartition")])).await;

    assert!(result.is_ok());

    Ok(())
}

#[tokio::test]
async fn getjobs_nonexisting_err() -> Result<()> {
    let mut scheduler = create_slurm_scheduler().await?;

    let result = scheduler.get_jobs(Some(vec![String::from(";)")])).await;

    assert!(result.is_err());

    Ok(())
}

#[tokio::test]
async fn getproperties_default_ok() -> Result<()> {
    let mut scheduler = create_slurm_scheduler().await?;

    let result = scheduler.get_properties().await;

    let mut expected = HashMap::<String, String>::new();
    expected.insert(
        String::from("xenon.adaptors.schedulers.ssh.strictHostKeyChecking"),
        String::from("false"),
    );

    assert!(result.is_ok());
    assert_eq!(result.unwrap(), expected);

    Ok(())
}

#[tokio::test]
async fn getqueuenames_default_ok() -> Result<()> {
    let mut scheduler = create_slurm_schedul


us.RoundHandlerMock{}
	roundHandlerMock.RemainingTimeCalled = func(time.Time, time.Duration) time.Duration {
		return time.Until(maxTime)
	}

	r := sr.DoWork(context.Background(), roundHandlerMock)
	assert.False(t, r)
}

func TestSubround_DoWorkShouldReturnFalseWhenConsensusIsNotDone(t *testing.T) {
	t.Parallel()

	testDoWork(t, false, false)
}

func TestSubround_DoWorkShouldReturnTrueWhenJobAndConsensusAreDone(t *testing.T) {
	t.Parallel()

	testDoWork(t, true, true)
}

func testDoWork(t *testing.T, checkDone bool, shouldWork bool) {
	consensusState := initConsensusState()
	ch := make(chan bool, 1)
	container := consensus.InitConsensusCore()

	sr, _ := spos.NewSubround(
		-1,
		bls.SrStartRound,
		bls.SrBlock,
		int64(0*roundTimeDuration/100),
		int64(5*roundTimeDuration/100),
		"(START_ROUND)",
		consensusState,
		ch,
		executeStoredMessages,
		container,
		chainID,
		currentPid,
		&statusHandler.AppStatusHandlerStub{},
	)
	sr.Job = func(_ context.Context) bool {
		return true
	}
	sr.Check = func() bool {
		return checkDone
	}

	maxTime := time.Now().Add(100 * time.Millisecond)
	roundHandlerMock := &consensus.RoundHandlerMock{}
	roundHandlerMock.RemainingTimeCalled = func(time.Time, time.Duration) time.Duration {
		return time.Until(maxTime)
	}

	r := sr.DoWork(context.Background(), roundHandlerMock)
	assert.Equal(t, shouldWork, r)
}

func TestSubround_DoWorkShouldReturnTrueWhenJobIsDoneAndConsensusIsDoneAfterAWhile(t *testing.T) {
	t.Parallel()

	consensusState := initConsensusState()
	ch := make(chan bool, 1)
	container := consensus.InitConsensusCore()

	sr, _ := spos.NewSubround(
		-1,
		bls.SrStartRound,
		bls.SrBlock,
		int64(0*roundTimeDuration/100),
		int64(5*roundTimeDuration/100),
		"(START_ROUND)",
		consensusState,
		ch,
		executeStoredMessages,
		container,
		chainID,
		currentPid,
		&statusHandler.AppStatusHandlerStub{},
	)

	var mut sync.RWMutex
	mut.Lock()
	checkSuccess := false
	mut.Unlock()

	sr.Job = func(_ context.Context) bool {
		return true
	}
	sr.Check = func() bool {
		mut.RLock()
		defer mut.RUnlock()
		return checkSuccess
	}

	maxTime := time.Now().Add(2000 * time.Millisecond)
	roundHandlerMock := &consensus.RoundHandlerMock{}
	roundHandlerMock.RemainingTimeCalled = func(time.Time, time.Duration) time.Duration {
		return time.Until(maxTime)
	}

	go func() {
		time.Sleep(1000 * time.Millisecond)

		mut.Lock()
		checkSuccess = true
		mut.Unlock()

		ch <- true
	}()

	r := sr.DoWork(context.Background(), roundHandlerMock)

	assert.True(t, r)
}

func TestSubround_Previous(t *testing.T) {
	t.Parallel()

	consensusState := initConsensusState()
	ch := make(chan bool, 1)
	container := consensus.InitConsensusCore()

	sr, _ := spos.NewSubround(
		bls.SrStartRound,
		bls.Sr


Stopped:
		return "stopped"
	case ExdQualifiersEstimatedTotal:
		return "estimated_total"
	case ExdQualifiersZone9:
		return "zone_9"
	case ExdQualifiersZone8:
		return "zone_8"
	case ExdQualifiersZone7:
		return "zone_7"
	case ExdQualifiersZone6:
		return "zone_6"
	case ExdQualifiersZone5:
		return "zone_5"
	case ExdQualifiersZone4:
		return "zone_4"
	case ExdQualifiersZone3:
		return "zone_3"
	case ExdQualifiersZone2:
		return "zone_2"
	case ExdQualifiersZone1:
		return "zone_1"
	default:
		return "ExdQualifiersInvalid(" + strconv.Itoa(int(e)) + ")"
	}
}

// FromString parse string into ExdQualifiers constant it's represent, return ExdQualifiersInvalid if not found.
func ExdQualifiersFromString(s string) ExdQualifiers {
	switch s {
	case "no_qualifier":
		return ExdQualifiersNoQualifier
	case "instantaneous":
		return ExdQualifiersInstantaneous
	case "average":
		return ExdQualifiersAverage
	case "lap":
		return ExdQualifiersLap
	case "maximum":
		return ExdQualifiersMaximum
	case "maximum_average":
		return ExdQualifiersMaximumAverage
	case "maximum_lap":
		return ExdQualifiersMaximumLap
	case "last_lap":
		return ExdQualifiersLastLap
	case "average_lap":
		return ExdQualifiersAverageLap
	case "to_destination":
		return ExdQualifiersToDestination
	case "to_go":
		return ExdQualifiersToGo
	case "to_next":
		return ExdQualifiersToNext
	case "next_course_point":
		return ExdQualifiersNextCoursePoint
	case "total":
		return ExdQualifiersTotal
	case "three_second_average":
		return ExdQualifiersThreeSecondAverage
	case "ten_second_average":
		return ExdQualifiersTenSecondAverage
	case "thirty_second_average":
		return ExdQualifiersThirtySecondAverage
	case "percent_maximum":
		return ExdQualifiersPercentMaximum
	case "percent_maximum_average":
		return ExdQualifiersPercentMaximumAverage
	case "lap_percent_maximum":
		return ExdQualifiersLapPercentMaximum
	case "elapsed":
		return ExdQualifiersElapsed
	case "sunrise":
		return ExdQualifiersSunrise
	case "sunset":
		return ExdQualifiersSunset
	case "compared_to_virtual_partner":
		return ExdQualifiersComparedToVirtualPartner
	case "maximum_24h":
		return ExdQualifiersMaximum24H
	case "minimum_24h":
		return ExdQualifiersMinimum24H
	case "minimum":
		return ExdQualifiersMinimum
	case "first":
		return ExdQualifiersFirst
	case "second":
		return ExdQualifiersSecond
	case "third":
		return ExdQualifiersThird
	case "shifter":
		return ExdQualifiersShifter
	case "last_sport":
		return ExdQualifiersLastSport
	case "moving":
		return ExdQualifiersMoving
	case "stopped":
		return ExdQualifiersStopped
	case "estimated_total":
		return ExdQualifiersEstimatedTotal
	case "zone_9":
		return ExdQualifiersZone9
	case "zone_8":
		return ExdQualifiersZone8
	case "zone_7":
		return ExdQualifiersZone7
	case "zone_6":
		return ExdQualifiersZone6
	case "zone_5":
		return ExdQualifiersZone5
	case "zone_4":
		return ExdQualifiersZone4
	case "zone_3":
		return ExdQualifiersZone3
	case "zone_2":
		return ExdQualifiersZone2
	case "zone_1":
		ret


xamples

<arg value="-l -a"/>

is a single command-line argument containing a space character, not separate options <q>-l</q>
and <q>-a</q>.

<arg line="-l -a"/>

This is a command line with two separate options, <q>-l</q> and <q>-a</q>.

<arg path="/dir;/dir2:\dir3"/>

is a single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems
and /dir:/dir2:/dir3 on Unix(-like) systems.

References

Any project element can be assigned an identifier using its <var>id</var> attribute. In most cases the element can
subsequently be referenced by specifying the <var>refid</var> attribute on an element of the same type.  This can be
useful if you are going to replicate the same snippet of XML over and over again—using
a <classpath> structure more than once, for example.

The following example:

<project ... >
  <target ... >
    <rmic ...>
      <classpath>
        <pathelement location="lib/"/>
        <pathelement path="${java.class.path}/"/>
        <pathelement path="${additional.path}"/>
      </classpath>
    </rmic>
  </target>

  <target ... >
    <javac ...>
      <classpath>
        <pathelement location="lib/"/>
        <pathelement path="${java.class.path}/"/>
        <pathelement path="${additional.path}"/>
      </classpath>
    </javac>
  </target>
</project>

could be rewritten as:

<project ... >
  <path id="project.class.path">
    <pathelement location="lib/"/>
    <pathelement path="${java.class.path}/"/>
    <pathelement path="${additional.path}"/>
  </path>

  <target ... >
    <rmic ...>
      <classpath refid="project.class.path"/>
    </rmic>
  </target>

  <target ... >
    <javac ...>
      <classpath refid="project.class.path"/>
    </javac>
  </target>
</project>

All tasks that use nested elements
for PatternSets, FileSets, ZipFileSets
or path-like structures accept references to these structures as shown in the
examples. Using <var>refid</var> on a task will ordinarily have the same effect (referencing a task already declared),
but the user should be aware that the interpretation of this attribute is dependent on the implementation of the element
upon which it is specified. Some tasks (the <a href="Tasks/property.html


isChecked('allow_notifications')) {
          addr = '&notify=1';
        }
        if (isChecked('denied_email')) {
          addr = '&email_denied=1';
        }
        location.href = "https://login.vk.com/?act=grant_access&client_id=2396364&settings=4194308&redirect_uri=https%3A%2F%2Fbadoo.com%2Fexternal%2Fredirector.phtml%3Fstate%3DMTMxNTQwMjM0MHxodHRwczovL2JhZG9vLmNvbS92ay9hdXRob3JpemUucGh0bWw%252FcnQ9OWRiYmRl&response_type=code&group_ids=&token_type=0&v=&state=&display=popup&ip_h=ee6f345635db5556f8&hash=1530024614_c71f2346881fd7e00d&https=1"+addr;
        return false;
      }

      function cancel() {
        location.href = "https://login.vk.com/?act=grant_access&client_id=2396364&settings=4194308&redirect_uri=https%3A%2F%2Fbadoo.com%2Fexternal%2Fredirector.phtml%3Fstate%3DMTMxNTQwMjM0MHxodHRwczovL2JhZG9vLmNvbS92ay9hdXRob3JpemUucGh0bWw%252FcnQ9OWRiYmRl&response_type=code&group_ids=&token_type=0&v=&state=&display=popup&ip_h=ee6f345635db5556f8&hash=1530024614_c71f2346881fd7e00d&https=1&cancel=1";
        return false;
      }

      function login(button) {
        if (isButtonLocked(button)) return false;
        lockButton(button);
        ge('login_submit').submit();
      }

      function doResize(onResize) {
        onResize && setTimeout(function() {
          doResize()
        }, 100);

        if (!hasClass(document.body, 'oauth_centered') && !onResize) {
          if (window.outerHeight !== void 0) {
            var panelH = (window.outerHeight - window.innerHeight) | 0,
              panelW = (window.outerWidth - window.innerWidth) | 0;
          } else {
            var panelH = 50,
              panelW = 0;
          }
          var contentH = Math.max(ge('oauth_wrap_content').offsetHeight, 430),
            contentW = 655;
          window.resizeTo(contentW + panelW, contentH + panelH);
          window.moveTo(
            (screen.width - contentW) / 2 + (screen.availLeft | 0),
            ((screen.height - contentH) / 2) + (screen.availTop | 0)
          );
        }
      }

      function toggleEmailPrivacy() {
        checkbox('denied_email');
        if (!isChecked('denied_email')) {
          hide('denied_email');
          show('allowed_email');
        } else {
          hide('allowed_email');
          show('denied_email');
        }
      }

      if (parent && parent != window) {
        location.href = "https://oauth.vk.com/blank.html";
      }

    // ]]></script>
  </head>

  <body onload="doResize();" class="VK1 oauth_full">
    <script>
      if (window.devicePixelRatio >= 2) document.body.className += ' is_2x';
    </script>
    <div class="oauth_wrap">


�母！哼，說出來可不要太驚訝，將來的海戰一定是飛機的時代，而我齊柏林伯爵一定會是其中最耀眼的那顆星！所以快讓我回去！ ……欸，回不去了？ ……吃我一炮！",
		mission_complete = "任務獎勵好多呀",
		headtouch = "",
		feeling2 = "你那是什麼表情！明明是你這裡太大了才害我找不到回家的路！哼，你這壞蛋一定是故意的！",
		feeling4 = "喂，指揮官，今天的點心是什麼？欸，回家？ ……這個、那個……對、對了！我離長大還有很久呢，可以讓鐵血先等一等！嗯，大家不會生氣的！",
		unlock = "你是誰！這裡是哪！ ……我知道了，你也是對齊柏林圖謀不軌的傢伙吧！我可是將來要成為鐵血第一航空母艦齊柏林伯爵！居然趁我不注意把我帶到了這種地方，吃我一炮！",
		battle = "讓你們見識一下飛機的厲害！",
		login = "你突然消失到哪裡去了！吃我一炮！",
		vote = "",
		detail = "這裡為什麼也有鐵血，而且大家都好大隻，稍微有點可怕……",
		couple_encourage = {
			{
				{
					40701
				},
				1,
				"我熱愛著一切！"
			},
			{
				{
					20218,
					30406,
					30709
				},
				1,
				"我和你們才不一樣！"
			},
			{
				{
					40146
				},
				1,
				"哼哼，拜倒在我的博學之下吧！"
			}
		}
	},
	[408010] = {
		touch = "轟炸機來了！？ 啊哇哇哇哇——指揮官…有些玩笑是不能隨便開的呢…",
		feeling3 = "不是我自誇，我還是有不少戰果的呢～嘿嘿，所以再多誇誇我也沒關係喲",
		upgrade = "感覺身體變得更輕快了",
		expedition = "哦？委託組好像回來了呢，指揮官，我也能去迎接她們嗎，順便在港口潛一下水",
		win_mvp = "見識到U艇的厲害了吧！",
		home = "指揮官，給你毛巾，把汗擦一擦吧",
		mission = "指揮官，新任務來啦",
		touch2 = "嗚哇！這樣很危險的啦指揮官！差點就把魚雷射出去了…",
		feeling1 = "E


⺝己衣",
    ["𥫅"] = "糹日日立",
    ["𥫆"] = "立冂米八",
    ["𥫇"] = "立夕一丨",
    ["𥫈"] = "立日日八",
    ["𥫉"] = "立日⺸",
    ["𥫊"] = "音十日皿",
    ["𥫋"] = "屮凵屮立",
    ["𥫌"] = "立石石石",
    ["𥫍"] = "立黃土",
    ["𥫎"] = "立里厶貝",
    ["𥫏"] = "音儿一夊",
    ["𥫐"] = "立丨日口",
    ["𥫑"] = "音十丿心",
    ["𥫒"] = "音十工心",
    ["𥫓"] = "音十又又",
    ["𥫔"] = "音十夂貝",
    ["𥫕"] = "音十口又",
    ["𥫖"] = "音十口乂",
    ["𥫗"] = "⺮",
    ["𥫘"] = "⺮亅",
    ["𥫙"] = "⺮丁",
    ["𥫚"] = "⺮冂",
    ["𥫛"] = "⺮厶",
    ["𥫜"] = "⺮乂",
    ["𥫝"] = "⺮弋",
    ["𥫞"] = "⺮子",
    ["𥫟"] = "⺮己",
    ["𥫠"] = "⺮廾",
    ["𥫡"] = "⺮二ㄅ",
    ["𥫢"] = "⺮又丶",
    ["𥫣"] = "⺮一ㄅ一",
    ["𥫤"] = "⺮弓",
    ["𥫥"] = "⺮丿七",
    ["𥫦"] = "⺮土",
    ["𥫧"] = "竹",
    ["𥫨"] = "⺮川",
    ["𥫩"] = "⺮勹丶",
    ["𥫪"] = "⺮𰀠",
    ["𥫫"] = "⺮一卜",
    ["𥫬"] = "⺮丿七",
    ["𥫭"] = "⺮女",
    ["𥫮"] = "竹",
    ["𥫯"] = "⺮口丨",
    ["𥫰"] = "⺮六",
    ["𥫱"] = "⺮一",
    ["𥫲"] = "⺮",
    ["𥫳"] = "⺮方",
    ["𥫴"] = "⺮一巾",
    ["𥫵"] = "⺮大丶",
    ["𥫶"] = "⺮二",
    ["𥫷"] = "⺮勹九",
    ["𥫸"] = "⺮水",
    ["𥫹"] = "⺮冖",
    ["𥫺"] = "⺮冖几",
    ["𥫻"] = "⺮㸦",
    ["𥫼"] = "⺮⺆亠",
    ["𥫽"] = "⺮氏",


.width.into(),
                x: root.x_org.into(),
                y: root.y_org.into(),
            },
            wsid: None,
            max_window_width: None,
        }
    }
}

impl Default for Screen {
    fn default() -> Self {
        Self {
            root: WindowHandle::MockHandle(0),
            bbox: BBox {
                height: 600,
                width: 800,
                x: 0,
                y: 0,
            },
            wsid: None,
            max_window_width: None,
        }
    }
}
use std::io::{BufWriter, Write};

fn main() {
    use romu::Rng;

    let mut buffer = BufWriter::new(std::io::stdout());

    let rng = Rng::new();

    loop {
        buffer
            .write_all(&rng.u64().to_ne_bytes())
            .expect("can't write to stdout");
    }
}
<filename>src/dm42/unit.rs
use crate::dm42::functions::Function;
use crate::dm42::menu::{Menu, MenuItem, MenuItemFunction, MenuItemLayout};
use crate::dm42::screen::Screen;
use crate::dm42::state::State;
use rscalc_layout::font::Font;
use rscalc_layout::layout::Layout;
use rscalc_layout::value::ValueLayout;
use rscalc_math::functions::StackFunction;
use rscalc_math::unit::{Unit, UnitType};

#[cfg(feature = "dm42")]
use alloc::boxed::Box;
#[cfg(feature = "dm42")]
use alloc::string::ToString;
#[cfg(feature = "dm42")]
use alloc::vec::Vec;

fn value_layout() -> Box<dyn Fn(&State, &dyn Screen) -> Layout> {
	Box::new(|state, screen| {
		if let Ok(value) = state.context().top() {
			let value_layout = value.layout(
				&state.context().format(),
				Font::Large,
				screen.metrics(),
				screen.width(),
			);
			let mut layout_items = Vec::new();
			layout_items.push(Layout::HorizontalRule);
			layout_items.push(value_layout);
			Layout::Vertical(layout_items)
		} else {
			Layout::HorizontalSpace(0)
		}
	})
}

pub fn unit_menu() -> Menu {
	let mut items = Vec::new();
	for item in &[
		("Angle", UnitType::Angle),
		("Area", UnitType::Area),
		("Distance", UnitType::Distance),
		("Energy", UnitType::Energy),
		("Force", UnitType::Force),
		("Mass", UnitType::Mass),
		("Power", UnitType::Power),
		("Pressure", UnitType::Pressure),
		("Temp", UnitType::Temperature),
		("Time", UnitType::Time),
		("Volume", UnitType::Volume),
	] {
		items.push(MenuItem {
			layout: MenuItemLayout::Static(MenuItem::static_string_layout(item.0)),
			function: MenuItemFunction::InMenuActionWithDelete(
				Function::UnitMenu(item.1),
				Function::Stack(StackFunction::ClearUnits),
			),
		});
	}
	let mut menu = Menu::new_with_bottom("Units", items, value_layout());
	menu.set_columns(3);
	menu
}

pub fn unit_menu_of_type(unit_type: UnitType) -> Menu {
	let mut items = Vec::new();
	for unit in unit_type.units() {
		if unit.unit_type() == unit_type {
			let function = MenuItemFunction::ConversionAction(
				Function::Stack(StackFunction::AddUnit(*unit)),
				Function::Stack(StackFunction::AddInvUnit(*unit)),
				Function::Stack(StackFunction::ConvertToUnit(*unit)),
			);
			match unit_type {
				Unit


using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;

namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor
{
    [SetupLinkerArgument("--skip-unresolved", "true")]
    [Define("IL_ASSEMBLY_COMPILED")]
    [SetupCompileBefore("library.dll", new[] { "Dependencies/NoInstanceCtorAndAssemblyPreserveAll_Lib.il" })]

    // Interfaces should be removed because preserve fields would not normally cause an instance ctor to be marked.  This means that no instance ctor
    // sweeping logic should kick in and remove interfaces
    [RemovedInterfaceOnTypeInAssembly("library",
        "Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor.Dependencies.NoInstanceCtorAndAssemblyPreserveAll_Lib/A",
        "library",
        "Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor.Dependencies.NoInstanceCtorAndAssemblyPreserveAll_Lib/IFoo")]
    [RemovedInterfaceOnTypeInAssemblyAttribute("library",
        "Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor.Dependenci


ndex() { return RULE_packingProperty; }

		public PackingPropertyContext() { }
		public void copyFrom(PackingPropertyContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class PackingDampingContext extends PackingPropertyContext {
		public TerminalNode NUMBER() { return getToken(BedParser.NUMBER, 0); }
		public PackingDampingContext(PackingPropertyContext ctx) { copyFrom(ctx); }
	}
	public static class PackingCollisionMarginContext extends PackingPropertyContext {
		public TerminalNode NUMBER() { return getToken(BedParser.NUMBER, 0); }
		public TerminalNode UNIT() { return getToken(BedParser.UNIT, 0); }
		public PackingCollisionMarginContext(PackingPropertyContext ctx) { copyFrom(ctx); }
	}
	public static class PackingRestVelocityContext extends PackingPropertyContext {
		public TerminalNode NUMBER() { return getToken(BedParser.NUMBER, 0); }
		public TerminalNode UNIT() { return getToken(BedParser.UNIT, 0); }
		public PackingRestVelocityContext(PackingPropertyContext ctx) { copyFrom(ctx); }
	}
	public static class PackingSubstepsContext extends PackingPropertyContext {
		public TerminalNode NUMBER() { return getToken(BedParser.NUMBER, 0); }
		public PackingSubstepsContext(PackingPropertyContext ctx) { copyFrom(ctx); }
	}
	public static class PackingMaxTimeContext extends PackingPropertyContext {
		public TerminalNode NUMBER() { return getToken(BedParser.NUMBER, 0); }
		public TerminalNode UNIT() { return getToken(BedParser.UNIT, 0); }
		public PackingMaxTimeContext(PackingPropertyContext ctx) { copyFrom(ctx); }
	}
	public static class PackingIterationsContext extends PackingPropertyContext {
		public TerminalNode NUMBER() { return getToken(BedParser.NUMBER, 0); }
		public PackingIterationsContext(PackingPropertyContext ctx) { copyFrom(ctx); }
	}
	public static class PackingGravityContext extends PackingPropertyContext {
		public TerminalNode NUMBER() { return getToken(BedParser.NUMBER, 0); }
		public TerminalNode UNIT() { return getToken(BedParser.UNIT, 0); }
		public PackingGravityContext(PackingPropertyContext ctx) { copyFrom(ctx); }
	}
	public static class PackingMethodPropContext extends PackingPropertyContext {
		public PackingMethodContext packingMethod() {
			return getRuleContext(PackingMethodContext.class,0);
		}
		public PackingMethodPropContext(PackingPropertyContext ctx) { copyFrom(ctx); }
	}

	public final PackingPropertyContext packingProperty() throws RecognitionException {
		PackingPropertyContext _localctx = new PackingPropertyContext(_ctx, getState());
		enterRule(_localctx, 22, RULE_packingProperty);
		try {
			setState(246);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case T__36:
				_localctx = new PackingMethodPropContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(209);
				match(T__36);
				setState(210);
				match(T__4);
				setState(211);
				packingMethod();
				setState(212);
				match(T__5);
				}
				break;
			case T__37:
				_localctx = new PackingGravityContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(214);
				match(T__37);
				setState(215);
				match(T__4);
				setState(216);
				match


rStr, err = marshalLeaderboardRecordsListCursor(nextCursor)
			if err != nil {
				logger.Error("Error creating leaderboard records list next cursor", zap.Error(err))
				return nil, err
			}
		}

		return &api.LeaderboardRecordList{Records: records, PrevCursor: prevCursorStr, NextCursor: nextCursorStr, RankCount: rankCount}, nil
	} else {
		// If a cursor is passed, then this becomes a regular record listing operation.
		return LeaderboardRecordsList(ctx, logger, db, leaderboardCache, rankCache, leaderboardId, wrapperspb.Int32(int32(limit)), cursor, nil, expiryTime.Unix())
	}
}

func parseLeaderboardRecords(logger *zap.Logger, rows *sql.Rows) ([]*api.LeaderboardRecord, error) {
	defer rows.Close()
	records := make([]*api.LeaderboardRecord, 0, 10)

	var dbLeaderboardID string
	var dbOwnerID string
	var dbUsername sql.NullString
	var dbScore int64
	var dbSubscore int64
	var dbNumScore int32
	var dbMaxNumScore int32
	var dbMetadata string
	var dbCreateTime pgtype.Timestamptz
	var dbUpdateTime pgtype.Timestamptz
	var dbExpiryTime pgtype.Timestamptz
	for rows.Next() {
		if err := rows.Scan(&dbLeaderboardID, &dbOwnerID, &dbUsername, &dbScore, &dbSubscore, &dbNumScore, &dbMaxNumScore, &dbMetadata, &dbCreateTime, &dbUpdateTime, &dbExpiryTime); err != nil {
			logger.Error("Could not execute leaderboard records list query", zap.Error(err))
			return nil, err
		}

		record := &api.LeaderboardRecord{
			LeaderboardId: dbLeaderboardID,
			OwnerId:       dbOwnerID,
			Score:         dbScore,
			Subscore:      dbSubscore,
			NumScore:      dbNumScore,
			MaxNumScore:   uint32(dbMaxNumScore),
			Metadata:      dbMetadata,
			CreateTime:    &timestamppb.Timestamp{Seconds: dbCreateTime.Time.Unix()},
			UpdateTime:    &timestamppb.Timestamp{Seconds: dbUpdateTime.Time.Unix()},
		}
		if dbUsername.Valid {
			record.Username = &wrapperspb.StringValue{Value: dbUsername.String}
		}
		expiryTime := dbExpiryTime.Time.Unix()
		if expiryTime != 0 {
			record.ExpiryTime = &timestamppb.Timestamp{Seconds: expiryTime}
		}

		records = append(records, record)
	}

	return records, nil
}

func calculateExpiryOverride(overrideExpiry int64, leaderboard *Leaderboard) (int64, bool) {
	if overrideExpiry == 0 {
		if leaderboard.IsTournament() {
			now := time.Now().UTC()
			_, _, expiryTime := calculateTournamentDeadlines(leaderboard.StartTime, leaderboard.EndTime, int64(leaderboard.Duration), leaderboard.ResetSchedule, now)
			if expiryTime != 0 && expiryTime <= now.Unix() {
				// If the expiry time is in the past, we won't have any records to return.
				return 0, false
			}
			return expiryTime, true
		} else if leaderboard.ResetSchedule != nil {
			now := time.Now().UTC()
			return leaderboard.ResetSchedule.Next(now).UTC().Unix(), true
		}
	}
	return overrideExpiry, true
}

func disableLeaderboardRanks(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, id string) error {
	l := leaderboardCache.Get(id)
	if l == nil || l.IsTournament() {
		return runtime.ErrLeaderboardNotFound
	}

	if _, err := db.QueryContext(ctx, "UPDATE leaderboard SET enable_ranks = false WHERE id = $1", id); err !=


rrayFieldTest
 * @run build ImmutableArrayFieldTest
 * @run main ImmutableArrayFieldTest
 */

import java.util.Arrays;
import javax.management.ImmutableDescriptor;

public class ImmutableArrayFieldTest {
    public static void main(String[] args) throws Exception {
        boolean ok = true;
        ImmutableDescriptor d = new ImmutableDescriptor(
                new String[] {
                    "strings", "ints", "booleans",
                },
                new Object[] {
                    new String[] {"foo"},
                    new int[] {5},
                    new boolean[] {false},
                });

        String[] strings = (String[]) d.getFieldValue("strings");
        strings[0] = "bar";
        strings = (String[]) d.getFieldValue("strings");
        if (!strings[0].equals("foo")) {
            System.out.println("FAILED: modified string array field");
            ok = false;
        }

        int[] ints = (int[]) d.getFieldValue("ints");
        ints[0] = 0;
        ints = (int[]) d.getFieldValue("ints");
        if (ints[0] != 5) {
            System.out.println("FAILED: modified int array field");
            ok = false;
        }

        boolean[] bools = (boolean[]) d.getFieldValue("booleans");
        bools[0] = true;
        bools = (boolean[]) d.getFieldValue("booleans");
        if (bools[0]) {
            System.out.println("FAILED: modified boolean array field");
            ok = false;
        }

        Object[] values = d.getFieldValues("strings", "ints", "booleans");
        ((String[]) values[0])[0] = "bar";
        ((int[]) values[1])[0] = 0;
        ((boolean[]) values[2])[0] = true;
        values = d.getFieldValues("strings", "ints", "booleans");
        if (!((String[]) values[0])[0].equals("foo") ||
                ((int[]) values[1])[0] != 5 ||
                ((boolean[]) values[2])[0]) {
            System.out.println("FAILED: getFieldValues modifiable: " +
                    Arrays.deepToString(values));
        }

        if (ok)
            System.out.println("TEST PASSED");
        else
            throw new Exception("Array field values were modifiable");
    }
}
/*
 * Copyright (c) 2016, 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.
 *
 * 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.
 */

/**
 * @test
 * @bug 8165681
 * @summary Verify ClassLoad and ClassPrepare JVMTI event with
 * and without can_generate_early_vmstart capability
 * @requires vm.jvmti
 * @run main/othervm/native -agentlib:MAAClassLoadPrepare MAAClassLoadPrepare
 * @run main/


линский тигель",
  [123210] = "Гоблинский тигель",
  [123211] = "Наковальня литейного цеха",
  [123212] = "Наковальня литейного цеха",
  [123213] = "Наковальня литейного цеха",
  [123214] = "Сундук Сумрачного леса",
  [123215] = "Сюда",
  [123216] = "В другую сторону",
  [123217] = "Туда",
  [123244] = "Наковальня",
  [123309] = "Покрытые слизью залежи истинного серебра",
  [123310] = "Покрытые слизью мифриловые залежи",
  [123328] = "Костер",
  [123329] = "Сундук Бейлога",
  [123330] = "Сейф буканьера",
  [123331] = "Сейф буканьера",
  [123332] = "Сейф буканьера",
  [123333] = "Сейф буканьера",
  [123334] = "Каратель (DND)",
  [123355] = "Ловушка крысиной бомбы",
  [123462] = "Драгоценный камень Южного моря",
  [123463] = "Дневник Бейлога",
  [123848] = "Покрытая слизью ториевая жила",
  [124072] = "Сундук Сумрачного леса",
  [124367] = "Дверь храма",
  [124368] = "Дверь храма",
  [124369] = "Древнее подземелье",
  [124370] = "Дверь пещеры Эхомок",
  [124371] = "Краеугольный камень",
  [124372] = "Печать Хаз\'Мула",
  [124374] = "Доктор Горацио Монтгомери",
  [124388] = "Сундук семейства Гарретт",
  [124389] = "Сундук Крома Крепкорука",
  [125475] = "Большой костер",
  [125477] = "Подозрительная урна",
  [126046] = "Квартал Дворфов",
  [126049] = "Семейка грибов-малиновиков",
  [126050] = "Скамья",
  [126051] = "Скамья",
  [126052] = "Скамья",
  [126053] = "Скамья",
  [126158] = "Посудный шкаф Таллонкая",
  [126260] = "Древний сундук",
  [126312] = "Большой костер",
  [126313] = "Большой костер",
  [126314] = "Большой костер",
  [126335] = "Большой костер",
  [126337] = "Очаг",
  [126338] = "Очаг",
  [126339] = "Очаг",
  [126340] = "Очаг",
  [126341] = "Очаг",
  [126342] = "Оча


Tải xuống thành công!',
    subTitle: 'Đã tải và lưu file bài tập thành công.',
  );
  getSnackBar.show();
}
import 'package:cloudmate/src/routes/app_pages.dart';
import 'package:cloudmate/src/themes/app_colors.dart';
import 'package:flutter/material.dart';
import 'package:cloudmate/src/utils/sizer_custom/sizer.dart';

class DialogConfirm extends StatefulWidget {
  final String title;
  final String subTitle;
  final Function handleConfirm;
  final double? height;

  const DialogConfirm({
    required this.handleConfirm,
    required this.subTitle,
    required this.title,
    this.height,
  });

  @override
  State<StatefulWidget> createState() => _DialogConfirmState();
}

class _DialogConfirmState extends State<DialogConfirm> {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: 300.sp,
      height: widget.height == null ? 180.sp : widget.height,
      padding: EdgeInsets.symmetric(vertical: 16.sp),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        children: [
          SizedBox(height: 6.sp),
          Padding(
            padding: EdgeInsets.symmetric(horizontal: 15.sp),
            child: Text(
              widget.title,
              style: TextStyle(fontWeight: FontWeight.w600, fontSize: 13.sp),
            ),
          ),
          SizedBox(height: 6.sp),
          Padding(
            padding: EdgeInsets.symmetric(horizontal: 15.sp, vertical: 7.5.sp),
            child: Text(
              widget.subTitle,
              textAlign: TextAlign.center,
              style: TextStyle(fontWeight: FontWeight.w400, fontSize: 10.5.sp),
            ),
          ),
          SizedBox(height: 4.sp),
          Divider(),
          GestureDetector(
            onTap: () {
              AppNavigator.pop();
              widget.handleConfirm();
            },
            child: Container(
              color: Colors.transparent,
              width: 300.sp,
              alignment: Alignment.center,
              padding: EdgeInsets.symmetric(vertical: 5.sp),
              child: Text(
                'Đồng ý',
                style: TextStyle(
                  fontWeight: FontWeight.w600,
                  fontSize: 12.sp,
                  color: colorPrimary,
                ),
              ),
            ),
          ),
          Divider(color: Colors.grey),
          GestureDetector(
            onTap: () {
              AppNavigator.pop();
            },
            child: Container(
              color: Colors.transparent,
              width: 300.sp,
              alignment: Alignment.center,
              padding: EdgeInsets.symmetric(vertical: 5.sp),
              child: Text(
                'Từ chối',
                style: TextStyle(
                  fontWeight: FontWeight.w400,
                  fontSize: 10.5.sp,
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
import 'package:cloudmate/src/helpers/export_excel.dart';
import 'package:cloudmate/src/models/user.dart';
import 'package:cloudmate/src/routes/app_pages.dart';
import 'package:cloudmate/src/themes/font_family.dart';
import 'package:cloudmate/src/themes/theme_service.dart';
import 'package:cloudmate/src/ui/classes/widgets/user_score_card.dart';
import 'package:flutter/


emoved>,
        ReadStorage<'a, Health>,
    );

    fn run(&mut self, data: Self::SystemData) {
        let (entities, mut to_be_removed, healths) = data;

        for (entity, health) in (&entities, &healths).join() {
            if health.health() == 0 {
                to_be_removed.add(entity);
            }
        }
    }
}

#[derive(Component)]
#[storage(HashMapStorage)]
pub struct Asteroid(pub GameItem);

impl Asteroid {
    pub const HEALTH: u32 = 180;
    pub const COLLIDER_RADIUS: f32 = 0.8;
    pub const VELOCITY: f32 = 1.3;
}

pub struct AsteroidShrinkSystem;

impl<'a> System<'a> for AsteroidShrinkSystem {
    type SystemData = (
        WriteStorage<'a, Transform>,
        ReadStorage<'a, Asteroid>,
        ReadStorage<'a, Health>,
    );

    fn run(&mut self, data: Self::SystemData) {
        let (mut transforms, asteroids, healths) = data;

        for (transform, _, health) in (&mut transforms, &asteroids, &healths).join() {
            let scale = 0.5 + (health.health() as f32 / Asteroid::HEALTH as f32) / 2.0;
            transform.scale = Vector3::new(scale, scale, scale);
        }
    }
}

pub struct AsteroidMinedSystem;

impl<'a> System<'a> for AsteroidMinedSystem {
    type SystemData = (
        Read<'a, ToBeRemoved>,
        WriteExpect<'a, Inventory>,
        ReadStorage<'a, Asteroid>,
        ReadStorage<'a, Health>,
    );

    fn run(&mut self, data: Self::SystemData) {
        let (to_be_removed, mut inventory, asteroids, healths) = data;

        for (_, asteroid, health) in (to_be_removed.bitset(), &asteroids, &healths).join() {
            if health.health() == 0 {
                // Need to make sure it was actually mined (and not just removed)
                inventory.change_amount(asteroid.0, 5);
            }
        }
    }
}

#[derive(Component)]
#[storage(HashMapStorage)]
pub struct MiningMissle {
    target: Entity,
}

impl MiningMissle {
    const SPEED: f32 = 6.5;
}

pub fn build_mining_missle(
    meshes: &ObjectMeshes,
    builder: LazyBuilder,
    target: Entity,
    pos: Vector3<f32>,
) {
    builder
        .with(Transform::from_position(pos.x, pos.y, pos.z))
        .with(Model::new(meshes.mining_missle))
        .with(RigidBody {
            velocity: Vector3::new(0.0, 0.0, MiningMissle::SPEED),
        })
        .with(Collider::new(
            Hitbox::with_shape(ColliderShape::Sphere(0.2)),
            Collider::MISSLE,
            vec![Collider::ASTEROID],
        ))
        .with(MiningMissle { target })
        .build();
}

struct MiningMissleSystem;

impl<'a> System<'a> for MiningMissleSystem {
    type SystemData = (
        Entities<'a>,
        Write<'a, ToBeRemoved>,
        ReadStorage<'a, MiningMissle>,
        ReadStorage<'a, Transform>,
        WriteStorage<'a, RigidBody>,
    );

    fn run(&mut self, data: Self::SystemData) {
        let (entities, mut to_be_removed, missles, transforms, mut rigid_bodies) = data;

        for (entity, missle) in (&entities, &missles).join() {
            if !entities.is_alive(missle.target) {
                to_be_removed.add(entity