%,
		0.5
	);
	--brand-experiment-55a: hsla(
		235,
		calc(var(--saturation-factor, 1) * 85.6%),
		64.7%,
		0.55
	);
	--brand-experiment-60a: hsla(
		235,
		calc(var(--saturation-factor, 1) * 85.6%),
		64.7%,
		0.6
	);
	--brand-experiment-65a: hsla(
		235,
		calc(var(--saturation-factor, 1) * 85.6%),
		64.7%,
		0.65
	);
	--brand-experiment-70a: hsla(
		235,
		calc(var(--saturation-factor, 1) * 85.6%),
		64.7%,
		0.7
	);
	--brand-experiment-75a: hsla(
		235,
		calc(var(--saturation-factor, 1) * 85.6%),
		64.7%,
		0.75
	);
	--brand-experiment-80a: hsla(
		235,
		calc(var(--saturation-factor, 1) * 85.6%),
		64.7%,
		0.8
	);
	--brand-experiment-85a: hsla(
		235,
		calc(var(--saturation-factor, 1) * 85.6%),
		64.7%,
		0.85
	);
	--brand-experiment-90a: hsla(
		235,
		calc(var(--saturation-factor, 1) * 85.6%),
		64.7%,
		0.9
	);
	--brand-experiment-95a: hsla(
		235,
		calc(var(--saturation-factor, 1) * 85.6%),
		64.7%,
		0.95
	);
	--info-positive-background: hsla(
		139,
		calc(var(--saturation-factor, 1) * 47.3%),
		43.9%,
		0.1
	);
	--info-positive-foreground: hsl(
		139,
		calc(var(--saturation-factor, 1) * 47.3%),
		43.9%
	);
	--info-warning-background: hsla(
		38,
		calc(var(--saturation-factor, 1) * 95.7%),
		54.1%,
		0.1
	);
	--info-warning-foreground: hsl(
		38,
		calc(var(--saturation-factor, 1) * 95.7%),
		54.1%
	);
	--info-danger-background: hsla(
		359,
		calc(var(--saturation-factor, 1) * 82.6%),
		59.4%,
		0.1
	);
	--info-danger-foreground: hsl(
		359,
		calc(var(--saturation-factor, 1) * 82.6%),
		59.4%
	);
	--status-positive-background: hsl(
		139,
		calc(var(--saturation-factor, 1) * 47.3%),
		43.9%
	);
	--status-positive-text: #fff;
	--status-warning-background: hsl(
		38,
		calc(var(--saturation-factor, 1) * 95.7%),
		54.1%
	);
	--status-danger-background: hsl(
		359,
		calc(var(--saturation-factor, 1) * 82.6%),
		59.4%
	);
	--status-danger-text: #fff;
	--focus-primary: hsl(197, calc(var(--saturation-factor, 1) * 100%), 47.8%);

	--font-primary: Whitney, 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--font-display:


 == nil and default == nil

	if default == nil then
		default = Reducers.last
	end

	return function(values)
		if passthrough then
			if #values == 1 then
				return values[1]
			else
				return Util.assign({}, unpack(values))
			end
		end

		local properties = {}

		for _, value in ipairs(values) do
			for propName, propValue in pairs(value) do
				if properties[propName] == nil then
					properties[propName] = {}
				end

				table.insert(properties[propName], propValue)
			end
		end

		local reducedValue = {}

		for propName, propValues in pairs(properties) do
			reducedValue[propName] =
				(reducers[propName] or default)(propValues, properties)
		end

		return reducedValue
	end
end

-- TODO: structure with unknown fields using one
function Reducers.map(reducer, ...)
	return Reducers.structure({}, reducer, ...)
end

function Reducers.exactly(value)
	return function ()
		return value
	end
end

function Reducers.try(...)
	local reducers = {...}

	return function (values)
		for _, reducer in ipairs(reducers) do
			local result = reducer(values)

			if result ~= nil then
				return result
			end
		end

		return nil
	end
end

function Reducers.compose(...)
	local reducers = {...}

	return function (values)
		for _, reducer in ipairs(reducers) do
			values = reducer(values)
		end

		return values
	end
end

--? Should this be removed in favor of Reducers.try?
function Reducers.thisOr(reducer, defaultValue)
	return function(values)
		local result = reducer(values)

		if result == nil then
			return defaultValue
		else
			return result
		end
	end
end

local function makeOr(func)
	return function (defaultValue)
		return Reducers.thisOr(func, defaultValue)
	end
end

Reducers.truthyOr = makeOr(Reducers.truthy)
Reducers.falsyOr = makeOr(Reducers.falsy)
Reducers.lastOr = makeOr(Reducers.last)
Reducers.default = Reducers.structure()

return Reducers


navbar-header:after,#doaj-fixed-query-widget .facetview .navbar-collapse:after,#doaj-fixed-query-widget .facetview .modal-header:after,#doaj-fixed-query-widget .facetview .modal-footer:after{clear:both}#doaj-fixed-query-widget .facetview .affix{position:fixed}#doaj-fixed-query-widget .facetview .collapse{display:none}#doaj-fixed-query-widget .facetview .collapse.in{display:block}#doaj-fixed-query-widget .facetview .collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height, visibility;-o-transition-property:height, visibility;transition-property:height, visibility;-webkit-transition-duration:0.15s;-o-transition-duration:0.15s;transition-duration:0.15s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}#doaj-fixed-query-widget .facetview :root{--warm-black:     #282624;--dark-grey:      #5C5956;--light-grey:     #F6F4F4;--white:          #FFF;--sanguine:       #982E0A;--grapefruit:     #FD5A3B;--dark-green:     #3A5959;--mid-green:      #3A5959;--light-greeen:   #F9D950;--yellow:         #F9D950}#doaj-fixed-query-widget .facetview html{scroll-behavior:smooth;font-size:22px}@media (max-width: 768px){#doaj-fixed-query-widget .facetview html{font-size:18px}}#doaj-fixed-query-widget .facetview h2,#doaj-fixed-query-widget .facetview h3,#doaj-fixed-query-widget .facetview h4,#doaj-fixed-query-widget .facetview h5,#doaj-fixed-query-widget .facetview h6{margin:1.5rem 0 .75rem 0;line-height:1.05;font-weight:400}#doaj-fixed-query-widget .facetview h1{margin:1.5rem 0;font-weight:700;line-height:1.05;font-size:1.802em;font-family:'Spectral', serif;letter-spacing:-0.03em}#doaj-fixed-query-widget .facetview h2{font-size:1.602em}#doaj-fixed-query-widget .facetview h3{font-size:1.424em}#doaj-fixed-query-widget .facetview h4{font-size:1.266em}#doaj-fixed-query-widget .facetview h5{font-size:1.125em}#doaj-fixed-query-widget .facetview h6{font-size:.889em}#doaj-fixed-query-widget .facetview ul,#doaj-fixed-query-widget .facetview ol{padding-left:1.5rem}#doaj-fixed-query-widget .facetview ul ul,#doaj-fixed-query-widget .facetview ul ol,#doaj-fixed-query-widget .facetview ol ul,#doaj-fixed-query-widget .facetview ol ol{margin-left:.75rem}#doaj-fixed-query-widget .facetview ul li,#doaj-fixed-query-widget .facetview ol li{line-height:1.5}#doaj-fixed-query-widget .facetview dl{margin:0 0 1.5rem 0}#doaj-fixed-query-widget .facetview dl dt{color:#5C5956;font-size:.889em}#doaj-fixed-query-widget .facetview dl dt:not(:first-child){margin-top:1.5rem}#doaj-fixed-query-widget .facetview dl dd{margin:0}#doaj-fixed-query-widget .facetview p,#doaj-fixe


5 11B0;C531;110A 1175 11B0; # (씱; 씱; 씱; 씱; 씱; ) HANGUL SYLLABLE SSILG
C532;C532;110A 1175 11B1;C532;110A 1175 11B1; # (씲; 씲; 씲; 씲; 씲; ) HANGUL SYLLABLE SSILM
C533;C533;110A 1175 11B2;C533;110A 1175 11B2; # (씳; 씳; 씳; 씳; 씳; ) HANGUL SYLLABLE SSILB
C534;C534;110A 1175 11B3;C534;110A 1175 11B3; # (씴; 씴; 씴; 씴; 씴; ) HANGUL SYLLABLE SSILS
C535;C535;110A 1175 11B4;C535;110A 1175 11B4; # (씵; 씵; 씵; 씵; 씵; ) HANGUL SYLLABLE SSILT
C536;C536;110A 1175 11B5;C536;110A 1175 11B5; # (씶; 씶; 씶; 씶; 씶; ) HANGUL SYLLABLE SSILP
C537;C537;110A 1175 11B6;C537;110A 1175 11B6; # (씷; 씷; 씷; 씷; 씷; ) HANGUL SYLLABLE SSILH
C538;C538;110A 1175 11B7;C538;110A 1175 11B7; # (씸; 씸; 씸; 씸; 씸; ) HANGUL SYLLABLE SSIM
C539;C539;110A 1175 11B8;C539;110A 1175 11B8; # (씹; 씹; 씹; 씹; 씹; ) HANGUL SYLLABLE SSIB
C53A;C53A;110A 1175 11B9;C53A;110A 1175 11B9; # (씺; 씺; 씺; 씺; 씺; ) HANGUL SYLLABLE SSIBS
C53B;C53B;110A 1175 11BA;C53B;110A 1175 11BA; # (씻; 씻; 씻; 씻; 씻; ) HANGUL SYLLABLE SSIS
C53C;C53C;110A 1175 11BB;C53C;110A 1175 11BB; # (씼; 씼; 씼; 씼; 씼; ) HANGUL SYLLABLE SSISS
C53D;C53D;110A 1175 11BC;C53D;110A 1175 11BC; # (씽; 씽; 씽; 씽; 씽; ) HANGUL SYLLABLE SSING
C53E;C53E;110A 1175 11BD;C53E;110A 1175 11BD; # (씾; 씾; 씾; 씾; 씾; ) HANGUL SYLLABLE SSIJ
C53F;C53F;110A 1175 11BE;C53F;110A 1175 11BE; # (씿; 씿; 씿; 씿; 씿; ) HANGUL SYLLABLE SSIC
C540;C540;110A 1175 11BF;C540;110A 1175 11BF; # (앀; 앀; 앀; 앀; 앀; ) HANGUL SYLLABLE SSIK
C541;C541;110A 1175 11C0;C541;110A 1175 11C0; # (앁; 앁; 앁; 앁; 앁; ) HANGUL SYLLABLE SSIT
C542;C542;110A 1175 11C1;C542;110A 1175 11C1; # (앂; 앂; 앂; 앂; 앂; ) HANGUL SYLLABLE SSIP
C543;C543;110A 1175 11C2;C5


   // Send the command
                    logger.LogInformation("Sending PlaceOrder command, OrderId = {OrderId}", command.OrderId);
                    await messageSession.Send(command);

                    lastOrder = command.OrderId; // Store order identifier to cancel if needed.
                    break;
                case ConsoleKey.C:
                    var cancelCommand = new CancelOrder
                    {
                        OrderId = lastOrder
                    };
                    await messageSession.Send(cancelCommand);
                    logger.LogInformation("Sent a CancelOrder command, {OrderId}", cancelCommand.OrderId);
                    break;

                case ConsoleKey.Q:
                    return;

                default:
                    logger.LogInformation("Unknown input. Please try again.");
                    break;
            }
        }
    }
}


);
                entity.PositionX = posX;
                xLinks.Add(entity);
                yLinks.Remove(entity);
                entity.PositionY = poxY;
                yLinks.Add(entity);
                entity.SwapViewEntity();
                CheckEntitysNeighbor(entity);
            }
        }
        /// <summary>
        /// 对AOIZone内的实体对象进行强制更新；
        /// </summary>
        public void Refresh()
        {
            foreach (var entity in entityDict.Values)
            {
                xLinks.Remove(entity);
                xLinks.Add(entity);
                yLinks.Remove(entity);
                yLinks.Add(entity);
                entity.SwapViewEntity();
                CheckEntitysNeighbor(entity);
            }
        }
        /// <summary>
        /// 移动；
        /// </summary>
        /// <param name="key">实体的key</param>
        /// <param name="posX">X方向新的位置点</param>
        /// <param name="poxY">Y方向新的位置点</param>
        public void Move(long key, Fix64 posX, Fix64 poxY)
        {
            if (entityDict.TryGetValue(key, out var entity))
            {
                bool isMoved = false;
                if (!IsOverlapping(posX, poxY))
                    return;
                if ((entity.PositionX - posX) != Fix64.Zero)
                {
                    xLinks.Remove(entity);
                    entity.PositionX = posX;
                    xLinks.Add(entity);
                    isMoved = true;
                }
                if ((entity.PositionY - poxY) != Fix64.Zero)
                {
                    yLinks.Remove(entity);
                    entity.PositionY = poxY;
                    yLinks.Add(entity);
                    isMoved = true;
                }
                if (!isMoved)
                    return;
                entity.SwapViewEntity();
                CheckEntitysNeighbor(entity);
            }
        }
        public void Clear()
        {
            xLinks.Clear();
            yLinks.Clear();
            entityDict.Clear();
        }
        /// <summary>
        /// 获取临近的对象；
        /// </summary>
        /// <param name="key">查找的key</param>
        /// <param name="viewDistance">可视距离</param>
        /// <param name="values">临近对象值集合</param>
        public void GetNeighbors(long key, Fix64 viewDistance, ref HashSet<T> values)
        {
            if (values == null)
                return;
            if (entityDict.TryGetValue(key, out var entity))
            {
                GetNeighborNodeValue(entity, viewDistance, ref values);
                values.Remove(entity.Handle);
            }
        }
        /// <summary>
        /// 获取临近的对象；
        /// </summary>
        /// <param name="key">查找的key</param>
        /// <param name="viewDistance">可视距离</param>
        /// <param name="entities">临近对象实体集合</param>
        public void GetNeighbors(long key, Fix64 viewDistance, ref HashSet<AOIEntity> entities)
        {
            if (entities == null)
                return;
            if (entityDict.TryGetValue(key, out var entity))
            {
                GetNeighborNodeEntities(entity, viewDistance, ref entities);
                entities.Remove(entity);
            }
        }
        public void GetNeighbors(long key, ref HashSet<AOIEntity> entities)
        {
            if (entities == null)
                r


using DevExpress.Data.Filtering;
using DevExpress.Xpo;
using Gtk;
using logicpos.Classes.Enums.GenericTreeView;
using logicpos.Classes.Gui.Gtk.WidgetsGeneric;
using System;
using System.Collections.Generic;
using LogicPOS.Globalization;
using LogicPOS.Data.XPO.Settings;
using LogicPOS.Domain.Entities;

namespace logicpos.Classes.Gui.Gtk.BackOffice
{
    internal class TreeViewArticleType : GenericTreeViewXPO
    {
        //Public Parametless Constructor Required by Generics
        public TreeViewArticleType() { }

        [Obsolete]
        public TreeViewArticleType(Window pSourceWindow)
            : this(pSourceWindow, null, null, null) { }

        //XpoMode
        [Obsolete]
        public TreeViewArticleType(Window pSourceWindow, Entity pDefaultValue, CriteriaOperator pXpoCriteria, Type pDialogType, GenericTreeViewMode pGenericTreeViewMode = GenericTreeViewMode.Default, GenericTreeViewNavigatorMode pGenericTreeViewNavigatorMode = GenericTreeViewNavigatorMode.Default)
        {
            //Init Vars
            Type xpoGuidObjectType = typeof(fin_articletype);
            //Override Default Value with Parameter Default Value, this way we can have diferent Default Values for GenericTreeView
            fin_articletype defaultValue = (pDefaultValue != null) ? pDefaultValue as fin_articletype : null;
            //Override Default DialogType with Parameter Dialog Type, this way we can have diferent DialogTypes for GenericTreeView
            Type typeDialogClass = (pDialogType != null) ? pDialogType : typeof(DialogArticleType);

            //Configure columnProperties
            List<GenericTreeViewColumnProperty> columnProperties = new List<GenericTreeViewColumnProperty>
            {
                new GenericTreeViewColumnProperty("Code") { Title = CultureResources.GetResourceByLanguage(LogicPOS.Settings.CultureSettings.CurrentCultureName, "global


/span>void) = 0

For reference, the following AutoConnectUploadFS class is an implementation of AutoConnect built-in uploader and inherits from AutoConnectUploadHandler.

class AutoConnectUploadFS : public AutoConnectUploadHandler {
 public:
  explicit AutoConnectUploadFS(SPIFFST& media) : _media(&media) {}
  ~AutoConnectUploadFS() { _close(); }

 protected:
  bool _open(const char* filename, const char* mode) override {
    if (_media->begin()) {
      _file = _media-></span


rate", alias="r")
    @alias_param(name="sorted", alias="s")
    def send_pure(
        self,
        address: Optional[StringElement] | Callable[[], StringElement],
        iterator: Number | Callable[[], Number] = 0,
        divisor: NumericElement | Callable[[], NumericElement] = 1,
        rate: NumericElement | Callable[[], NumericElement] = 1,
        sort: bool | Callable[[], bool] = True,
        **rest_of_pattern: dict,
    ) -> None:

        def _util_flatten(value):
            if isinstance(value, (list, tuple)):
                return list(value)
            else:
                return [value]

        if address is None:
            return

        if self.apply_conditional_mask_to_bars(
            pattern=rest_of_pattern,
        ):
            return

        pattern = {"address": _resolve_if_callable(address)}

        # Evaluate all potential callables
        for key, value in rest_of_pattern.items():
            pattern[key] = _resolve_if_callable(value)

        deadline = self.env.clock.shifted_time
        for message in self.pattern_reduce(
            pattern,
            _resolve_if_callable(iterator),
            _resolve_if_callable(divisor),
            _resolve_if_callable(rate),
        ):
            if message["address"] is None:
                continue
            address = message.pop("address")
            if sort:
                serialized = list(
                    chain(
                        *[
                            _util_flatten(value)
                            for key, value in sorted(message.items())
                        ]
                    )
                )
            else:
                serialized = list(
                    chain(*[_util_flatten(value) for value in message.values()])
                )
            self.call_timed_with_nudge(deadline, self._send, f"/{address}", serialized)


table2=%o2+<p32=%l0],>p32=%o7
lduw [%o2+%l0],%o7

# qhasm: z3 ^= p23
# asm 1: xor <z3=int64#15,<p23=int64#11,>z3=int64#11
# asm 2: xor <z3=%o5,<p23=%o1,>z3=%o1
xor %o5,%o1,%o1

# qhasm: y0 = z0 ^ p33
# asm 1: xor <z0=int64#13,<p33=int64#18,>y0=int64#13
# asm 2: xor <z0=%o3,<p33=%l1,>y0=%o3
xor %o3,%l1,%o3

# qhasm: inint = *(swapendian uint32 *) inp
# asm 1: lduwa [<inp=int64#3] 0x88,>inint=int64#15
# asm 2: lduwa [<inp=%i2] 0x88,>inint=%o5
lduwa [%i2] 0x88,%o5

# qhasm: y2 = z2 ^ p31
# asm 1: xor <z2=int64#8,<p31=int64#19,>y2=int64#8
# asm 2: xor <z2=%g4,<p31=%l2,>y2=%g4
xor %g4,%l2,%g4

# qhasm: tmp0 = y0 & oddmask
# asm 1: and <y0=int64#13,<oddmask=int64#6,>tmp0=int64#17
# asm 2: and <y0=%o3,<oddmask=%i5,>tmp0=%l0
and %o3,%i5,%l0

# qhasm: tmp1 = y2 & oddmask
# asm 1: and <y2=int64#8,<oddmask=int64#6,>tmp1=int64#18
# asm 2: and <y2=%g4,<oddmask=%i5,>tmp1=%l1
and %g4,%i5,%l1

# qhasm: inint ^= tmp0
# asm 1: xor <inint=int64#15,<tmp0=int64#17,>inint=int64#15
# asm 2: xor <inint=%o5,<tmp0=%l0,>inint=%o5
xor %o5,%l0,%o5

# qhasm: (uint32) tmp1 >>= 8
# asm 1: srl <tmp1=int64#18,8,>tmp1=int64#17
# asm 2: srl <tmp1=%l1,8,>tmp1=%l0
srl %l1,8,%l0

# qhasm: inp += 4
# asm 1: add <inp=int64#3,4,>inp=int64#3
# asm 2: add <inp=%i2,4,>inp=%i2
add %i2,4,%i2

# qhasm: inint ^= tmp1
# asm 1: xor <inint=int64#15,<tmp1=int64#17,>inint=int64#15
# asm 2: xor <inint=%o5,<tmp1=%l0,>inint=%o5
xor %o5,%l0,%o5

# qhasm: *(swapendian uint32 *) outp = inint
# asm 1: stwa <inint=int64#15,[<outp=int64#4] 0x88
# asm 2: stwa <inint=%o5,[<outp=%i3] 0x88
stwa %o5,[%i3] 0x88

# qhasm: y3 = z3 ^ p30
# asm


0, ---@type number
		pattern = "", ---@type string
	},
	sort = {
		by = "percent", ---@type "percent"|"name"|"category"
		order = "desc", ---@type "asc"|"desc"
	},
}

---Calculate completion percentage and get detailed info for an achievement
---@param achievementID number
---@return AchievementCriteriaData
local function GetCriteriaData(achievementID)
	local total, completed = GetAchievementNumCriteria(achievementID), 0
	if not total or total == 0 then
		return { percent = 0, total = 0, details = {}, completed = 0 }
	end

	local details = {}
	for i = 1, total do
		local criteriaString, _, criteriaCompleted, quantity, reqQuantity = GetAchievementCriteriaInfo(achievementID, i)
		tinsert(
			details,
			{ text = criteriaString, completed = criteriaCompleted, quantity = quantity, reqQuantity = reqQuantity }
		)
		if criteriaCompleted then
			completed = completed + 1
		end
	end

	return { percent = (completed / total) * 100, total = total, details = details, completed = completed }
end

function AT:ScanAchievements()
	if self.states.isScanning then
		return
	end

	if self.MainFrame and self.MainFrame:IsVisible() then
		self.MainFrame.ProgressFrame.Bar:SetValue(0)
		self.MainFrame.ProgressFrame.Bar.ProgressText:SetText("")
		self.MainFrame.ProgressFrame:Show()
	end

	self.states.isScanning = true
	self.states.results = {}

	local current, scanned, total, currentCategory = 1, 0, 0, 1
	local categories = GetCategoryList()
	for _, categoryID in ipairs(categories) do
		total = total + GetCategoryNumAchievements(categoryID)
	end

	local function scanStep()
		local stepScanned = 0
		while currentCategory <= #categories and stepScanned < self.db.scan.batchSize do
			local categoryID = categories[currentCategory]
			local numAchievements = GetCategoryNumAchievements(categoryID)

			if current <= numAchievements then
				local id = select(1, GetAchievementInfo(categoryID, current))
				if id and C_AchievementInfo_IsValidAchievement(id) and not C_AchievementInfo_IsGuildAchievement(id) then
					async.WithAchievementID(id, function(data)
						local _, name, _, completed, _, _, _, description, flags, icon, rewardText = unpack(data)
						if completed then
							return
						end

						---@type AchievementData
						local result = {
							id = id,
							name = name,
							description = description,
							icon = icon,
							category = { id = categoryID, name = GetCategoryInfo(categoryID) },
							criteriaData = GetCriteriaData(id),
							flags = flags,
							reward = { itemID = C_AchievementInfo_GetRewardItemID(id), text = rewardText },
						}

						tinsert(self.states.results, result)
					end)
				end

				current, scanned, stepScanned = current + 1, scanned + 1, stepScanned + 1
				if self.MainFrame and self.MainFrame:IsVisible() then
					local progress = (scanned / total) * 100
					self.MainFrame.ProgressFrame.Bar:SetValue(progress)
					self.MainFrame.ProgressFrame.Bar.ProgressText:SetText(
						format("%d / %d  -  %.0f %%", scanned, total, progress)
					)
				end
			else
				current, currentCategory = 1, currentCategory + 1
			end
		end

		if currentCategory > #categories then
			self.states.isScanning = false
			if self.MainFrame and self.MainFrame:IsVisible() then
				self.MainFrame.ProgressFrame:Hide()
				self:UpdateView()
			end
		else
			E:Delay(self.db.scan.batchInterval, scanStep)
		end
	end

	scanStep()


able {

	public static final String TAG = Collections.class.getSimpleName ();

	public static final String PARCELABLE_KEY = TAG + ":" + "ParcelableKey";

	private List<Product> posts;

	public Posts () {
		posts = new ArrayList<> ();
	}

	public Posts (Parcel in) {
		posts = new ArrayList<> ();
		in.readList (posts, getClass ().getClassLoader ());
	}

	public List<Product> getPosts () {
		return posts;
	}

	public void setPosts (List<Product> posts) {
		this.posts = posts;
	}

	public boolean isEmpty () {
		return posts.isEmpty ();
	}

	public void clear () {
		posts.clear ();
	}

	@Override
	public int describeContents () {
		return 0;
	}

	public static Posts getParcelable (Bundle savedInstanceState) {
		if (savedInstanceState != null) {
			return savedInstanceState.getParcelable (PARCELABLE_KEY);
		} else {
			throw new IllegalArgumentException (TAG + ": \'getParcelable\' Method has null argument: savedInstanceState.");
		}
	}

	public static void putParcelable (Bundle savedInstanceState, Posts posts) {
		if (savedInstanceState != null && posts != null) {
			savedInstanceState.putParcelable (PARCELABLE_KEY, posts);
		}
	}

	@Override
	public void writeToParcel (Parcel parcel, int i) {
		parcel.writeList (posts);
	}

	public static Parcelable.Creator<Posts> getCREATOR () {
		return CREATOR;
	}

	public static final Parcelable.Creator<Posts> CREATOR = new Parcelable
			.Creator<Posts> () {
		public Posts createFromParcel (Parcel in) {
			return new Posts (in);
		}

		public Posts[] newArray (int size) {
			return new Posts[size];
		}
	};
}
/*
 * JasperReports - Free Java Reporting Library.
 * Copyright (C) 2001 - 2025 Cloud Software Group, Inc. All rights reserved.
 * http://www.jaspersoft.com
 *
 * Unless you have purchased a commercial license agreement from Jaspersoft,
 * the following license terms apply:
 *
 * This program is part of JasperReports.
 *
 * JasperReports is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * JasperReports 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with JasperReports. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.jasperreports.engine.xml;

import java.io.ByteArrayInputStream;
import java.util.Optional;

import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.events.XMLEvent;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRSimpleTemplate;
import net.sf.jasperreports.engine.JRTemplate;
import net.sf.jasperreports.engine.JasperReportsContext;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.jackson.util.JacksonUtil;

/**
 *
 * @author Lucian Chirita (lucianc@users.sourceforge.net)
 */
public class JacksonReportLoader implements ReportLoader
{

	private static final Log log = LogFactory.getLog(JacksonReportLoader.class);

	private static final Jacks


erts)
    {
        this.certs = certs;
    }

    /**
     * @return An array which contains the certs, this chain contains.
     */
    public X509CertificateStructure[] getCerts()
    {
        X509CertificateStructure[] result = new X509CertificateStructure[certs.length];
        System.arraycopy(certs, 0, result, 0, certs.length);
        return result;
    }
}
package net.jradius.tls;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * An implementation of the TLS 1.0 record layer.
 */
class RecordStream
{
    private TlsProtocolHandler handler;
    private InputStream is;
    private OutputStream os;
    private CombinedHash hash;
    private TlsCipher readCipher = null;
    private TlsCipher writeCipher = null;

    RecordStream(TlsProtocolHandler handler, InputStream is, OutputStream os)
    {
        this.handler = handler;
        this.is = is;
        this.os = os;
        this.hash = new CombinedHash();
        this.readCipher = new TlsNullCipher();
        this.writeCipher = this.readCipher;
    }

    public RecordStream(TlsProtocolHandler handler)
    {
        this.handler = handler;
        this.hash = new CombinedHash();
        this.readCipher = new TlsNullCipher();
        this.writeCipher = this.readCipher;
	}

	void clientCipherSpecDecided(TlsCipher tlsCipher)
    {
        this.writeCipher = tlsCipher;
    }

    void serverClientSpecReceived()
    {
        this.readCipher = this.writeCipher;
    }

    public void setInputStream(ByteArrayInputStream stream)
    {
    	this.is = stream;
    }

    public void setOutputStream(ByteArrayOutputStream stream)
    {
    	this.os = stream;
    }

    public void readData() throws IOException
    {
        short type = TlsUtils.readUint8(is);
        TlsUtils.checkVersion(is, handler);
        int size = TlsUtils.readUint16(is);
        byte[] buf = decodeAndVerify(type, is, size);
        handler.processData(type, buf, 0, buf.length);
    }

    protected byte[] decodeAndVerify(short type, InputStream is, int len) throws IOException
    {
        byte[] buf = new byte[len];
        TlsUtils.readFully(buf, is);
        return readCipher.decodeCiphertext(type, buf, 0, buf.length);
    }

    protected void writeMessage(short type, byte[] message, int offset, int len) throws IOException
    {
        if (type == 22) // TlsProtocolHandler.RL_HANDSHAKE
        {
            updateHandshakeData(message, offset, len);
        }
        byte[] ciphertext = writeCipher.encodePlaintext(type, message, offset, len);
        byte[] writeMessage = new byte[ciphertext.length + 5];
        TlsUtils.writeUint8(type, writeMessage, 0);
        TlsUtils.writeUint8((short)3, writeMessage, 1);
        TlsUtils.writeUint8((short)1, writeMessage, 2);
        TlsUtils.writeUint16(ciphertext.length, writeMessage, 3);
        System.arraycopy(ciphertext, 0, writeMessage, 5, ciphertext.length);
        os.write(writeMessage);
        os.flush();
    }

    public boolean hasMore() throws IOException
    {
    	return (is.available() > 0);
    }

    void updateHandshakeData(byte[] message, int offset, int len)
    {
        hash.update(message, offset, len);
    }

    byte[] getCurrentHash()
    {
        return doFinal(new CombinedHash(hash));
    }

    protected void close() throws IOException
    {
        IOException e = null;
        try
        {
            is.close();
        }
        catch (


 là một số URL mẫu với các thành phố khác nhau:
```bash
https://< your code space url >.app.github.dev/WeatherForecastByCity/Toronto

https://< your code space url >.app.github.dev/WeatherForecastByCity/Madrid

https://< your code space url >.app.github.dev/WeatherForecastByCity/<AnyCityName>
```

Cả hai bài kiểm tra đang chạy sẽ giống như thế này:

![Mở bảng Run and Debug và chọn dự án BackEnd](../../../04-Using-GitHub-Copilot-with-CSharp/images/032TestAndDebugUsingUrls.png)

🚀 Chúc mừng bạn, thông qua bài tập này, bạn không chỉ sử dụng GitHub Copilot để tạo mã mà còn làm điều đó một cách tương tác và thú vị! Bạn có thể sử dụng GitHub Copilot không chỉ để tạo mã, mà còn để viết tài liệu, kiểm thử ứng dụng của mình và nhiều hơn nữa.

### ✨ Phần thưởng: Thêm khả năng mới với GitHub Copilot Edits

Hãy sử dụng **Copilot Edits** để bắt đầu một phiên chỉnh sửa mã được hỗ trợ bởi AI và nhanh chóng thực hiện các thay đổi mã trên nhiều tệp bằng cách sử dụng ngôn ngữ tự nhiên. Copilot Edits áp dụng các chỉnh sửa trực tiếp trong trình soạn thảo, nơi bạn có thể xem xét chúng ngay tại chỗ, với ngữ cảnh đầy đủ của mã xung quanh.

Hãy thêm một số chức năng mới để người dùng có thể nhập tên thành phố họ muốn tìm kiếm và gọi API mới của chúng ta.

1. Mở cửa sổ **Edits** trong GitHub Copilot Chat.

![Chọn chế độ **Edits**](../../../04-Using-GitHub-Copilot-with-CSharp/images/OpenEditsWindows.png)
2. Chọn nút **+Add Files...** từ cửa sổ Edits và thêm **FetchData.razor** và **WeatherForecastClient.cs**.
3. Nhập vào chat: `Cập nhật giao diện người dùng để hỏi người dùng thành phố họ muốn dự báo thời tiết, sử dụng forecast client để gọi endpoint mới cho thành phố, và cập nhật bảng để hiển thị cả thành phố.`
4. Chọn nút **Send** và bây giờ Edits sẽ tạo một kế hoạch lặp lại cho các thay đổi.
5. Xem xét các chỉnh sửa và nhấn **Accept** trong cửa sổ chỉnh sửa để chấp nhận tất cả các thay đổi trong tệp.
6. Chạy ứng dụng.

> Lưu ý: Nếu ứng dụng không chạy hoặc không gọi endpoint


(world)
                chunkAccess[world.name] = access
                access
            }
        }

        @SubscribeEvent
        private fun onUnload(e: WorldUnloadEvent) {
            submitAsync { chunkAccess.remove(e.world.name) }
        }
    }
}package ink.ptms.adyeshach.impl.script

import ink.ptms.adyeshach.core.util.errorBy
import ink.ptms.adyeshach.impl.getEntities
import ink.ptms.adyeshach.impl.getManager
import ink.ptms.adyeshach.impl.isEntitySelected
import taboolib.common5.cbool
import taboolib.library.kether.ArgTypes
import taboolib.library.kether.ParsedAction
import taboolib.module.kether.*
import java.util.concurrent.CompletableFuture

/**
 * @author sky
 */
class ActionFreeze(val value: ParsedAction<*>): ScriptAction<Void>() {

    override fun run(frame: ScriptFrame): CompletableFuture<Void> {
        val script = frame.script()
        if (script.getManager() == null || !script.isEntitySelected()) {
            errorBy("error-no-manager-or-entity-selected")
        }
        frame.newFrame(value).run<Any>().thenAccept { value ->
            script.getEntities().forEach { it.isFreeze = value.cbool }
        }
        return CompletableFuture.completedFuture(null)
    }

    companion object {

        @KetherParser(["freeze"], namespace = "adyeshach", shared = true)
        fun parser() = scriptParser {
            ActionFreeze(it.next(ArgTypes.ACTION))
        }
    }
}package ink.ptms.adyeshach.impl.entity

import com.eatthepath.uuid.FastUUID
import com.google.gson.annotations.Expose
import ink.ptms.adyeshach.core.Adyeshach
import ink.ptms.adyeshach.core.bukkit.data.EntityPosition
import ink.ptms.adyeshach.core.entity.EntityBase
import ink.ptms.adyeshach.core.entity.EntityTypes
import ink.ptms.adyeshach.core.event.AdyeshachIdChangeEvent
import java.util.*
import java.util.concurrent.ConcurrentHashMap

/**
 * Adyeshach
 * ink.ptms.adyeshach.impl.entity.DefaultEntityBase
 *
 * @author 坏黑
 * @since 2022/6/19 15:59
 */
abstract class DefaultEntityBase(
    @Expose final override val entityType: EntityTypes = EntityTypes.ZOMBIE,
) : EntityBase, DefaultMetaable, DefaultTagContainer, DefaultSerializable {

    /** 临时标签 */
    val tag = ConcurrentHashMap<String, Any>()

    /** 持久化标签 */
    @Expose
    val persistentTag = ConcurrentHashMap<String, String>()

    @Expose
    val metadata = ConcurrentHashMap<String, Any>()

    @Expose
    val metadataMask = ConcurrentHashMap<String, MutableMap<String, Boolean>>()

    /**
     * 实体唯一 ID
     */
    @Expose
    final override val uniqueId = UUID.randomUUID().toString()

    /**
     * 实体鉴别 ID
     */
    @Expose
    final override var id = uniqueId.substring(0, 8)
        set(value) {
            val event = AdyeshachIdChangeEvent(this, field, value)
            if (event.call()) {
                field = event.after
            }
        }

    /**
     * 实体在服务端中的确定位置
     */
    @Expose
    override var position = EntityPosition.empty()
        get() = field.clone()

    /**
     * 将实体唯一 ID 转换为 UUID 类型
     * 历史遗留问题
     */
    final override val normalizeUniqueId: UUID
        get() = if (uniqueId.contains('-')) {
            FastUUID.parseUUID(uniqueId)
        } else {


),
                borderRadius: BorderRadius.circular(15)),
            child: DropdownButton<ActivityRole>(
              value: _selectedRole,
              isExpanded: true,
              underline: const SizedBox(),
              icon: const Icon(Icons.keyboard_arrow_down),
              itemHeight: 70,
              onChanged: (ActivityRole? value) {
                setState(() {
                  _selectedRole = value!;
                });
              },
              items: _roles.map<DropdownMenuItem<ActivityRole>>((ActivityRole value) {
                return DropdownMenuItem<ActivityRole>(
                  value: value,
                  child: ListTile(
                    title: Text(value.name),
                    subtitle: Text(value.name,
                      maxLines: 1,
                      overflow: TextOverflow.ellipsis,
                    ),
                  )
                );
              }).toList(),
            ),
          ),
          const SizedBox(height: 10,),
          TextField(
            maxLines: 4,
            controller: _txtDescription,
            decoration: const InputDecoration(
              label: Text("Lý do tham gia"),
              border: OutlineInputBorder(
                  borderRadius: BorderRadius.all(Radius.circular(10))),
            ),
          ),
          _messageError.isEmpty ? const SizedBox():
           Text(_messageError, style: const TextStyle(color: Colors.red),)
        ],
      ),
    );
  }
}
import 'package:flutter/widgets.dart';
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/common/hbbs/hbbs.dart';
import 'package:flutter_hbb/common/widgets/peers_view.dart';
import 'package:flutter_hbb/models/model.dart';
import 'package:flutter_hbb/models/peer_model.dart';
import 'package:flutter_hbb/models/platform_model.dart';
import 'package:get/get.dart';
import 'dart:convert';
import '../utils/http_service.dart' as http;

class GroupModel {
  final RxBool groupLoading = false.obs;
  final RxString groupLoadError = "".obs;
  final RxList<DeviceGroupPayload> deviceGroups = RxList.empty(growable: true);
  final RxList<UserPayload> users = RxList.empty(growable: true);
  final RxList<Peer> peers = RxList.empty(growable: true);
  final RxBool isSelectedDeviceGroup = false.obs;
  final RxString selectedAccessibleItemName = ''.obs;
  final RxString searchAccessibleItemNameText = ''.obs;
  WeakReference<FFI> parent;
  var initialized = false;
  var _cacheLoadOnceFlag = false;
  var _statusCode = 200;

  final Map<String, VoidCallback> _peerIdUpdateListeners = {};

  bool get emtpy => deviceGroups.isEmpty && users.isEmpty && peers.isEmpty;

  late final Peers peersModel;

  GroupModel(this.parent) {
    peersModel = Peers(
        name: PeersModelName.group,
        getInitPeers: () => peers,
        loadEvent: LoadEvent.group);
  }

  Future<void> pull({force = true, quiet = false}) async {
    if (bind.isDisableGroupPanel()) return;
    if (!gFFI.userModel.isLogin || groupLoading.value) return;
    if (gFFI.userModel.networkError.isNotEmpty) return;
    if (!force && initialized) return;
    if (!quiet) {
      groupLoading.value = true;
      groupLoadError.value = "";
    }
    try {
      await _pull();
      _tryHandlePullError();
    } catch (e) {
      print("pull accessibles error: $e");
    }
    groupLoading.value = false;
    initialized = true;
    platformFFI.tryHa


idth=\"400\">
\r


on: ExtensionLite<M, T>): T = getExtension(extension)

/** Sets the current value of the proto extension in this builder. */
operator fun <
  M : GeneratedMessageLite.ExtendableMessage<M, B>,
  B : GeneratedMessageLite.ExtendableBuilder<M, B>,
  T : Any
  > B.set(extension: ExtensionLite<M, T>, value: T) {
  setExtension(extension, value)
}

/** Returns true if the specified extension is set. */
operator fun <
  M : GeneratedMessageLite.ExtendableMessage<M, *>,
  MorBT : GeneratedMessageLite.ExtendableMessageOrBuilder<M, *>
  > MorBT.contains(
  extension: ExtensionLite<M, *>
): Boolean = hasExtension(extension)
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc.  All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//     * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

package com.google.protobuf.kotlin

import com.google.common.testing.EqualsTester
import com.google.common.truth.Truth.assertThat
import com.google.protobuf.kotlin.test.ExampleExtensibleMessage
import com.google.protobuf.kotlin.test.ExampleExtensibleMessageOuterClass as TestProto
import kotlin.test.assertFailsWith
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4

/** Tests for [DslList]. */
@RunWith(JUnit4::class)
@OptIn(OnlyForUseByGeneratedProtoCode::class)
class ExtensionListTest {
  class DummyProxy private constructor() : DslProxy()

  @Test
  fun matchesList() {
    assertThat(
      ExtensionList<Int, ExampleExtensibleMessage>(
        TestProto.repeatedExtension, listOf(1, 2, 3)
      )
    ).containsExactly(1, 2, 3).inOrder()
  }

  @Test
  fun reflectsChangesInList() {
    val mutableList = mutableListOf(1, 2, 3)
    val extensionList = ExtensionList<Int, ExampleExtensibleMessage>(
      TestProto.repeatedExtension, mutableList
    )
    mutableList.add(4)
    assertThat(extensionList).containsExactly(1, 2, 3, 4).inOrder()
  }

  @Test
  fun extensionListIsNotMutable() {
    val extensionList = ExtensionList<Int, ExampleExtensibleMessage>(
      TestProto.repeatedExtension, mutableListOf(1, 2, 3)
    )
    assertThat(extensionList is MutableList<*>).isFalse()
  }

  @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "UNCHECKED_CAST")
  @Test
  fun extensionListIsNotEvenSecretlyMutable() {
    val extensionList = ExtensionList<Int, ExampleExtensibleMessage>(
      TestProto.repeatedExtension, mutableList


entry group="2010" element="0376" vr="DS" vm="2" name="Printer Pixel Spacing"/>
  // <entry group="300a" element="00e9" vr="DS" vm="2" name="Compensator Pixel Spacing"/>

  typedef enum {
    DETECTOR = 0, // (0018,1164) Imager Pixel Spacing
    MAGNIFIED,    // (0018,1114) (IHE Mammo)
    CALIBRATED,   // (0028,0030) Pixel Spacing -> (0028,0a04) Pixel Spacing Calibration Description
    UNKNOWN
  } SpacingType;

  static Attribute<0x28,0x34> ComputePixelAspectRatioFromPixelSpacing(const Attribute<0x28,0x30>& pixelspacing);
};
} // end namespace gdcm
//-----------------------------------------------------------------------------
#endif //GDCMSPACING_H


 return
    console.log('Start length:', this.points.length)
    this.points = this.getDouglasPeucker(this.points, 5)
    console.log('Final length:', this.points.length)
    return this
  }

  smooth () : Stroke {
    var pts = this.points
    var cps:number[] = []

    // There will be two control points for each "middle" point, 1 ... len-2e
    var len = pts.length / 2 - 2
    for (var i = 0; i < len; i += 1) {
      cps = cps.concat(this.getControlPoints(0.5, pts[2 * i], pts[2 * i + 1], pts[2 * i + 2], pts[2 * i + 3], pts[2 * i + 4], pts[2 * i + 5]))
    }
    this.controlPoints = cps

    return this
  }

  draw (ctx:any) : void {
    ctx.beginPath()

    ctx.strokeStyle = this.color
    ctx.lineWidth = this.lineWidth
    ctx.lineJoin = ctx.lineCap = this.lineCap

    // Draw smooth bezier curves between all points
    if (this.controlPoints.length) {
      this.drawCurvedPath(ctx, this.controlPoints, this.points)

    // Draw a simple stroke using line-to for all points
    } else {
      var pts = this.points
      ctx.moveTo(pts[0], pts[1])
      for (let i = 2; i < pts.length; i += 2) {
        ctx.lineTo(pts[i], pts[i + 1])
      }
    }

    ctx.stroke()
  }

  // Line simplification using the Douglas-Peucker algorithm
  private getDouglasPeucker (points:number[], epsilon:number) : number[] {
    if (points.length === 2) return points
    let len = points.length - 2

    let x1 = points[0]
    let y1 = points[1]
    let xL = points[points.length - 2]
    let yL = points[points.length - 1]
    let maxD = 0
    let maxI = 0
    for (let i = 2; i < len; i += 2) {
      let d = this.distToLine(x1, y1, xL, yL, points[i], points[i + 1])
      if (d > maxD) {
        maxD = d
        maxI = i
      }
    }

    if (maxD > epsilon) {
      if (len == 2) return points
      let res1:number[] = this.getDouglasPeucker(points.slice(0, maxI + 2), epsilon)
      let res2:number[] = this.getDouglasPeucker(points.slice(maxI, points.length), epsilon)
      return res1.concat(res2.slice(2))
    } else {
      return [x1, y1, xL, yL]
    }
  }

  // Compute control points for 3 points given a tension
  private getControlPoints (tension:number, x1:number, y1:number, x2:number, y2:number, x3:number, y3:number) {
    var t = tension
    var v = this.diff(x1, y1, x3, y3)
    var d01 = this.dist(x1, y1, x2, y2)
    var d12 = this.dist(x2, y2, x3, y3)
    var d012 = d01 + d12
    return [x2 - v[0] * t * d01 / d012, y2 - v[1] * t * d01 / d012,
      x2 + v[0] * t * d12 / d012, y2 + v[1] * t * d12 / d012 ]
  }

  // Plot a path using curves (assumes beginPath() has been called, and stroke() will be called after)


/*//////////////////////////////////////////////////////////////////////////////
// Process Monitor Debug Output Header File
//
// History:
// - April 1, 2010 - Version 1.0 - John Robbins/Wintellect
//      - Initial release
// - March 1, 2014 - Version 1.1 - John Robbins/Wintellect
//      - Fixed an issue in DLL main where the handle could get close too
//        soon.
//      - Moved the project to VS 2013.
//
//////////////////////////////////////////////////////////////////////////////*/

#pragma once

#ifdef __cplusplus
extern "C" {
#endif

    /*//////////////////////////////////////////////////////////////////////////////
    // The defines that set up how the functions or classes are exported or
    // imported.
    //////////////////////////////////////////////////////////////////////////////*/
#ifndef PROCMONDEBUGOUTPUT_DLLINTERFACE
#ifdef PROCMONDEBUGOUTPUT_EXPORTS
#define PROCMONDEBUGOUTPUT_DLLINTERFACE __declspec ( dllexport )
#else
#define PROCMONDEBUGOUTPUT_DLLINTERFACE __declspec ( dllimport )
#endif
#endif

    /*//////////////////////////////////////////////////////////////////////////////
    // ProcMonDebugOutput
    //  Sends a string to Process Monitor for display.
    //
    // Parameters:
    //  pszOutputString
    //      The null-terminated wide character string to be displayed.
    //
    // Return Values:
    //  TRUE  - The string was sent to Process Monitor.
    //  FALSE - There was a problem sending the string to Process Monitor. To get
    //          extended error information, call GetLastError to determine the
    //          exact failure.
    //
    // Last Error Codes:
    //  ERROR_INVALID_PARAMETER - The pszOutputString parameter is NULL.
    //  ERROR_WRITE_FAULT       - The Process Monitor driver is loaded but the
    //                            Process Monitor user mode portion is not running.
    //  ERROR_BAD_DRIVER        - The Process Monitor driver is not loaded.
    //////////////////////////////////////////////////////////////////////////////*/
    PROCMONDEBUGOUTPUT_DLLINTERFACE
        _Success_(return == TRUE)
        BOOL __stdcall ProcMonDebugOutput(_In_z_ LPCWSTR pszOutputString);

#ifdef __cplusplus
}
#endif


99a88befb62637ca1abf82d2d600c03c98c1bff97ee922df1d94ca0e54f7aec6e2b59da400d4b5c666980e3cf46952a9735624037a7b7cb"
        )
        testKatHex(
            { digest() },
            "a746273228122f381c3b46e4f1",
            "83353c99afcddb4af32911c01b2724bafc1c433c3b5d3e89ceba512d655425a0bfe20bdd787e784065c177158d8937a39b8e26d9f531b3164d077059a6021291"
        )
        testKatHex(
            { digest() },
            "3c5871cd619c69a63b540eb5a625",
            "5707b902292411e8bc8b63f675d568507f98ca3c0dcca18ad72908bc2e2aa9bb9f3a9349867a6badf71bb55f2612e9f59ad25d7f00b270ed581e065089b90812"
        )
        testKatHex(
            { digest() },
            "fa22874bcc068879e8ef11a69f0722",
            "fac660712af881891ff7f9d8eebad3d7cf83c1f7ee2fa393db4aea68cb2521ac51767606493cd5710ef429008fd248c6cdbe9b8e3bd9240da2de653bdbc0098f"
        )
        testKatHex(
            { digest() },
            "52a608ab21ccdd8a4457a57ede782176",
            "4d047431c2f0c6bab89982425138a86eb042f72d59847d13c8a3cb6541a25b31383704d24c0133edf675f4011566debec0f14ccb65503056234bb11bec5e58b4"
        )
    }
}
/*
 * Copyright 2021 Appmattus Limited
 *
 * 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 com.appmattus.crypto.internal

// HMAC for Kupyna disabled as the results don't match with the tests in BC even though algorithm code is based on BC implementation

// import com.appmattus.crypto.Algorithm
// import com.appmattus.crypto.internal.core.sphlib.testHmac
// import kotlin.test.Test
//
// class HmacDSTU7564_256Test {
//
//    @Test
//    fun misc2() {
//        // From https://github.com/bcgit/bc-java/blob/master/prov/src/test/java/org/bouncycastle/jce/provider/test/HMacTest.java
//
//        testHmac(
//            Algorithm.Kupyna_256,
//            "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
//            "Hi There",
//            "98ac67aa21eaf6e8666fb748d66cfc15d5d66f5194c87fffa647e406d3375cdb"
//        )
//    }
// }
package com.appodealstack.demo.banner

import android.content.Context
import android.os.Bundle
import android.util.Log
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.appodeal.ads.Appodeal
import com.appodeal.ads.BannerCallbacks
import com.appodeal.ads.initializing.ApdInitializationError
import com.appodeal.ads.utils.Log.LogLevel
import com.appodealstack.demo.banner.databinding.ActivityBannerBinding

class BannerActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val binding = ActivityBannerBinding.inflate(layo


esES"] = "¡Actualización de la base de datos de Questie completada!",
        ["frFR"] = "La base de données Questie a été mise à jour !",
    },
    ["%s for %s!"] = {
        ["ptBR"] = "%s para %s!",
        ["ruRU"] = "%s для %s!",
        ["frFR"] = "%s pour %s !",
        ["koKR"] = "%s 위한 %s!",
        ["zhCN"] = "%s 任务： %s!",
        ["enUS"] = true,
        ["zhTW"] = "%s 任務 %s!",
        ["deDE"] = "%s für %s!",
        ["esES"] = "%s para %s!",
        ["esMX"] = "%s para %s!",
    },
    ["Picked up %s which starts %s!"] = {
        ["ptBR"] = "Pegou %s que inicia %s!",
        ["ruRU"] = "Получен предмет %s, который начинает задание %s",
        ["frFR"] = "Ramassé %s qui démarre %s !",
        ["koKR"] = "%s 를 획득하여 %s!를 시작 할 수 있습니다.",
        ["zhCN"] = "拾取 %s 自动接受任务： %s!",
        ["enUS"] = true,
        ["zhTW"] = "拾取 %s 自動接受任務 %s!",
        ["deDE"] = "%s aufgehoben, das %s startet!",
        ["esES"] = "Recogió %s que inicia %s!",
        ["esMX"] = "Recogió %s que inicia %s!",
    },
    ["You picked up %s which starts %s!"] = {
        ["ptBR"] = "Você pegou %s que inicia %s!",
        ["ruRU"] = "Вы получили предмет %s, который начинает задание %s",
        ["frFR"] = "Vous avez ramassé %s qui démarre %s !",
        ["koKR"] = "%s 을(를) 시작하는 %s 을(를) 수락했습니다",
        ["zhCN"] = "你拾取了 %s 自动接受任务 %s!",
        ["enUS"] = true,
        ["zhTW"] = "你拾取 %s 自動接受任務 %s!",
        ["deDE"] = "Du hast %s aufgehoben, das %s startet!",
        ["esES"] = "¡Recogiste %s que inicia %s!",
        ["esMX"] = "¡Recogiste %s que inicia %s!",
    },
    ["The '%s' world event is active!"] = {
        ["ptBR"] = "O evento mundial '%s' está ativo!",
        ["ruRU"] = "Игровое событие '%s' активно!",
        ["koKR"] = "월드 이벤트 '%s' 활성화",
        ["frFR"] = "L'évènement mondial '%s' est actif !",
        ["zhCN"] = "世界任务 '%s' 已开始!",
        ["enUS"] = true,
        ["zhTW"] = "世界事件 '%s' 已開始!",
        ["deDE"] = "Das '%s' Feiertag-Event ist aktiv!",
        ["esES"] = "¡El evento mundial '%s' está activo!",
        ["esMX"] = "¡El evento mundial '%s' está activo!",
    },
    ["Error during initialization!"] = {
        ["ptBR"] = "Erro durante inicialização!",
        ["koKR"] = "설치중에 에러 발생!",
        ["ruRU"] = "Ошибка во время инициа


ombDefused != null)
				BombDefused(this, args);
		}

		internal void RaiseBombExploded(BombEventArgs args)
		{
			if (BombExploded != null)
				BombExploded(this, args);
		}

		internal void RaiseBombBeginDefuse(BombDefuseEventArgs args)
		{
			if (BombBeginDefuse != null)
				BombBeginDefuse(this, args);
		}

		internal void RaiseBombAbortDefuse(BombDefuseEventArgs args)
		{
			if (BombAbortDefuse != null)
				BombAbortDefuse(this, args);
		}

		internal void RaiseSayText(SayTextEventArgs args)
		{
			if (SayText != null)
				SayText(this, args);
		}

		internal void RaiseSayText2(SayText2EventArgs args)
		{
			if (SayText2 != null)
				SayText2(this, args);
		}

		internal void RaiseRankUpdate(RankUpdateEventArgs args)
		{
			if (RankUpdate != null)
				RankUpdate(this, args);
		}

		#endregion

		/// <summary>
		/// Releases all resource used by the <see cref="DemoInfo.DemoParser"/> object. This must be called or evil things (memory leaks) happen.
		/// Sorry for that - I've debugged and I don't know why this is, but I can't fix it somehow.
		/// This is bad, I know.
		/// </summary>
		/// <remarks>Call <see cref="Dispose"/> when you are finished using the <see cref="DemoInfo.DemoParser"/>. The
		/// <see cref="Dispose"/> method leaves the <see cref="


e:%23000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1' d='m -13.819885,152.14011 c 0,0 1.295974,-4.4e-4 2.106107,0 -0.0033,-3.55259 1.408423,-6.96675 3.9241648,-9.48397 2.515742,-2.51722 5.929061,-3.93075 9.487905,-3.92975 v -2.05994' /%3E%3Cpath id='path32' style='fill:none;stroke:%23000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1' d='m -1.6629112,136.66645 v 2.48697' /%3E%3C/g%3E%3C/svg%3E%0A");
    --art-deco-h-bottom-left: url("data:image/svg+xml,%0A%3Csvg width='15.769768mm' height='15.723796mm' viewBox='0 0 15.769766 15.723796' version='1.1' xml:space='preserve' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cdefs id='defs1'%3E%3Cpattern xlink:href='%23pattern18' preserveAspectRatio='xMidYMid' id='pattern33' patternTransform='matrix(0.35355339,0.35355339,-0.35355339,0.35355339,4.8408399e-7,-289.0567)' x='1.20000005' y='0' /%3E%3Cpattern xlink:href='%23Strips1_2' preserveAspectRatio='xMidYMid' id='pattern18' patternTransform='rotate(45)' x='1.2' y='0' /%3E%3Cpattern patternUnits='userSpaceOnUse' width='3' height='1' patternTransform='translate(0,0) scale(2,2)' preserveAspectRatio='xMidYMid' id='Strips1_2' style='fill:%23000000'%3E%3Crect style='stroke:none' x='0' y='-0.5' width='1' height='2' id='rect146' /%3E%3C/pattern%3E%3C/defs%3E%3Cg id='layer1' transform='translate(13.81997,-136.66645)'%3E%3Cpath style='fill:none;stroke:%23000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1' d='M 1.9497135,148.68641 H -0.60718748' id='path18' /%3E%3Cpath style='fill:url(%23pattern33);fill-opacity:1;stroke:%23000000;stroke-width:0.5;stroke-dasharray:none;paint-order:fill markers stroke' id='path21' d='m 13.56983,-141.46983 a 10.664035,10.664035 0 0 1 -7.5453295,-3.12218 10.664035,10.664035 0 0 1 -3.1246656,-7.5443 l 10.6640341,0.002 z' transform='scale(-1)' /%3E%3Cpath id='path23' style='fill:none;stroke:%23000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1' d='m 1.9497135,152.14011 c 0,0 -1.29597398,-4.4e-4 -2


#if defined(RAMPZ)
	elpm r23,Z
#elif defined(__AVR_HAVE_LPMX__)
	lpm r23,Z
#elif defined(__AVR_TINY__)
	ld r23,Z
#else
	lpm
	mov r23,r0
#endif
	inc r30
	eor r2,r20
	eor r3,r21
	eor r4,r22
	eor r5,r23
	eor r2,r14
	eor r3,r15
	eor r4,r24
	eor r5,r25
	eor r14,r2
	eor r15,r3
	eor r24,r4
	eor r25,r5
	eor r2,r14
	eor r3,r15
	eor r4,r24
	eor r5,r25
	ret
1095:
	movw r30,r26
	sbiw r30,40
	push r5
	push r4
	push r3
	push r2
	push r9
	push r8
	push r7
	push r6
	ld r2,Z
	ldd r3,Z+1
	ldd r4,Z+2
	ldd r5,Z+3
	ldd r26,Z+4
	ldd r27,Z+5
	ldd r16,Z+6
	ldd r17,Z+7
	movw r20,r26
	movw r22,r16
	movw r20,r22
	mov r22,r1
	mov r23,r1
	eor r20,r26
	eor r21,r27
	andi r20,51
	andi r21,51
	eor r26,r20
	eor r27,r21
	mov r22,r1
	mov r23,r1
	movw r22,r20
	mov r20,r1
	mov r21,r1
	eor r26,r20
	eor r27,r21
	eor r16,r22
	eor r17,r23
	movw r20,r26
	movw r22,r16
	lsr r23
	ror r22
	ror r21
	ror r20
	eor r20,r26
	eor r21,r27
	eor r22,r16
	eor r23,r17
	andi r20,68
	andi r21,68
	andi r22,85
	andi r23,85
	eor r26,r20
	eor r27,r21
	eor r16,r22
	eor r17,r23
	lsl r20
	rol r21
	rol r22
	rol r23
	eor r26,r20
	eor r27,r21
	eor r16,r22
	eor r17,r23
	st Z,r26
	std Z+1,r27
	std Z+2,r16
	std Z+3,r17
	movw r20,r2
	movw r22,r4
	andi r20,51
	andi r21,51
	andi r22,51
	andi r23,51
	ldi r19,204
	and r2,r19
	and r3,r19
	and r4,r19
	and r5,r19
	or r4,r23
	or r5,r20
	or r2,r21
	or r3,r22
	movw r20,r4
	movw r22,r2
	lsr r23
	ror r22
	ror r21
	ror r20
	eor r20,r4
	eor r21,r5
	eor r22,r2
	eor r23,r3
	mov r20,r1
	andi r21,17
	andi r22,85
	andi r23,85
	eor


  },
  ({ a, b }) => subtract(a, b),
  [
    0.08,
    0.46,
    0.26,
    0.38,
    0.03,
    0.19,
    0.07,
    0.155,
    0.07,
    0.114,
    0.125,
    0.18,
    0.35,
    0.165,
    0.125,
    0.065,
  ]
);

intScenario(
  `subtract int int`,
  { a: int(128), b: int(27) },
  ({ a, b }) => subtract(a, b),
  101
);

ivec2Scenario(
  `subtract int ivec2`,
  { a: int(128), b: ivec2(int(27), int(104)) },
  ({ a, b }) => subtract(a, b),
  [101, 24]
);

ivec3Scenario(
  `subtract int ivec3`,
  { a: int(128), b: ivec3(int(27), int(104), int(66)) },
  ({ a, b }) => subtract(a, b),
  [101, 24, 62]
);

ivec4Scenario(
  `subtract int ivec4`,
  { a: int(128), b: ivec4(int(27), int(104), int(66), int(70)) },
  ({ a, b }) => subtract(a, b),
  [101, 24, 62, 58]
);

ivec2Scenario(
  `subtract ivec2 int`,
  { a: ivec2(int(27), int(104)), b: int(6) },
  ({ a, b }) => subtract(a, b),
  [21, 98]
);

ivec3Scenario(
  `subtract ivec3 int`,
  { a: ivec3(int(27), int(104), int(66)), b: int(6) },
  ({ a, b }) => subtract(a, b),
  [21, 98, 60]
);

ivec4Scenario(
  `subtract ivec4 int`,
  { a: ivec4(int(27), int(104), int(66), int(70)), b: int(6) },
  ({ a, b }) => subtract(a, b),
  [21, 98, 60, 64]
);

ivec2Scenario(
  `subtract ivec2 ivec2`,
  { a: ivec2(int(178), int(63)), b: ivec2(int(44), int(21)) },
  ({ a, b }) => subtract(a, b),
  [134, 42]
);

ivec3Scenario(
  `subtract ivec3 ivec3`,
  {
    a: ivec3(int(178), int(63), int(202)),
    b: ivec3(int(44), int(21), int(88)),
  },
  ({ a, b }) => subtract(a, b),
  [134, 42, 114]
);

ivec4Scenario(
  `subtract ivec4 ivec4`,
  {
    a: ivec4(int(178), int(63), int(202), int(144)),
    b: ivec4(int(44), int(21), int(88), int(37)),
  },
  ({ a, b }) => subtract(a, b),
  [134, 42, 114, 107]
);
import HtmlNode from "./HtmlNode";
import Building from "./Building";
import BuildingCreator from "./BuildingCreator";
import RoomCreator from "./RoomCreator";
import Room from "./Room";

export default class InsightHtmlParser {

    static getMainDivFromDocument(document: any): any {
        const htmlNode: any = HtmlNode.getHtml(document);
        if (htmlNode !== null) {
            const bodyNode: any = HtmlNode.getBody(htmlNode);
            if (bodyNode !== null) {
                const divs: Array<any> = HtmlNode.getDivs(bodyNode);

                let allDivs: Array<any> = [];
                for (let div of divs) {
                    const divdivs: Array<any> = HtmlNode.getDivs(div);
                    for (let divdiv of divdivs) {
                        allDivs.push(divdiv);
                    }
                }

                return HtmlNode.getMainDiv(allDivs);
            }
        }
        return null;
    }

    static getSectionDivs(document: any): Array<any> {
        const mainDiv: any = InsightHtmlParser.getMainDivFromDocument(document);
        if (mainDiv !== null) {
            const mainDivDivs = HtmlNode.getDivs(mainDiv);
            const mainContent = HtmlNode.getCo


(_streaming)
            {
                streaming = true;
                var stream = _streams[trackIndex];
                return PlatformCreateStream(stream);
            }
            else
            {
                streaming = false;
                var sound = _sounds[trackIndex];
                return sound.GetPooledInstance(true);
            }
        }

        /// <summary>
        /// This event is triggered when the WaveBank is disposed.
        /// </summary>
        public event EventHandler<EventArgs> Disposing;

        /// <summary>
        /// Is true if the WaveBank has been disposed.
        /// </summary>
        public bool IsDisposed { get; private set; }

        //


type of the instance group that you want to create. Valid values: 0: Default group. 1: Phased release is disabled for traffic management. 2: Phased release is enabled for traffic management.
        /// </summary>


****************************************************************/
extern unsigned char next_command_reusable;

#pragma pack()
/******************************************************************************/

extern const struct NamedCommand player_desc[];
/******************************************************************************/
short clear_script(void);
short load_script(long lvl_num);
TbBool script_scan_line(char *line,TbBool preloaded, long file_version);
TbBool preload_script(long lvnum);
/******************************************************************************/

long get_condition_value(PlayerNumber plyr_idx, unsigned char valtype, short validx);
void process_level_script(void);
/******************************************************************************/
#ifdef __cplusplus
}
#endif
#endif


data('role');

		if(this.checked) {
			coverfrom(role);
		}
	});

	//载入判断项
	coverfrom($('input.J_coverfrom:checked').data('role'));

	function coverfrom(role){
		if(role) {
			$('#J_coverfrom_'+ role).show().siblings('.J_coverfrom_items').hide();
		}
	}

/*
 * 提交
*/
	var protal_add_btn = $('#J_protal_btn');
	$('#J_protal_form').ajaxForm({
		dataType : 'json',
		beforeSubmit : function(){
			//global.js
			Wind.Util.ajaxBtnDisable(protal_add_btn);

			protal_add_btn.next().remove();
		},
		success : function(data){
			//global.js
			Wind.Util.ajaxBtnEnable(protal_add_btn);

			if(data.state == 'success') {
				$('' + data.message + '' ).insertAfter(protal_add_btn).fadeIn('slow').delay(1000).fadeOut(function() {
					$(this).remove();

					if(data.referer) {
						location.href = data.referer;
					}
				});
			}else if(data.state == 'fail'){
				$('' + data.message + '').insertAfter(protal_add_btn).fadeIn('slow');
			}
		}
	});

});
</script>

<!doctype html>

<template source='TPL:admin.common.head' />

系统信息

				软件版本
				{$sysinfo['wind_version']} 查看最新版本

				PHP版本
				{$sysinfo['php_version']}

				MYSQL版本
				{$sysinfo['mysql_version']}

				服务器端信息
				{$sysinfo['server_software']}

				最大上传限制
				{$sysinfo['max_upload']}

				最大执行时间
				{$sysinfo['max_excute_time']}

				邮件支持模式
				{$sysinfo['sys_mail']}

开发团队

	您正在使用旧版本的phpwind，为了获得更好的体验，请


 relative;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  background-color: #fff;
  color: rgb(14, 30, 37);
  padding: 4px;
  top: -11px;
}

.RNIW_btnProvider {
  padding-left: 40px;
  padding-right: 40px;
}

.RNIW_btnProvider::before {
  content: '';
  position: absolute;
  display: inline-block;
  vertical-align: middle;
  width: 32px;
  height: 40px;
  background-repeat: no-repeat;
  background-position: left center;
  top: -2px;
  left: 14px;
}

.providerGoogle {
  background-color: #4285f4;
  border-color: #366dc7;
}

.providerGoogle:hover,
.providerGoogle:focus {
  background-color: #366dc7;
}

.providerGitHub {
  background-color: #333;
  border-color: #000;
}

.providerGitHub:hover,
.providerGitHub:focus {
  background-color: #000;
}

.providerGitLab {
  background-color: #e24329;
  border-color: #b03320;
}

.providerGitLab:hover,
.providerGitLab:focus {
  background-color: #b03320;
}

.providerBitbucket {
  background-color: #205081;
  border-color: #14314f;
}

.providerBitbucket:hover,
.providerBitbucket:focus {
  background-color: #14314f;
}

.providerGoogle:before {
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMyIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEzIDEyIj4gIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEuNDg4IC0yKSI+ICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIvPiAgICA8cGF0aCBmaWxsPSIjRkZGRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0wLjY1MjczNDM3NSwzLjI5NTI4MjQ0IEMwLjIzNzk4NDM3NSw0LjEwNTgzMjA2IDIuODQyMTcwOTRlLTE0LDUuMDE2MDQ1OCAyLjg0MjE3MDk0ZS0xNCw1Ljk3OTM4OTMxIEMyLjg0MjE3MDk0ZS0xNCw2Ljk0MjczMjgyIDAuMjM3OTg0Mzc1LDcuODUyOTAwNzYgMC42NTI3


        size_t range),
             std::make_tuple(2U, 3U, 3U, 15)
             )
{

    std::cout<<"FC layer check with LSQ quantizer"<<std::endl;

    CudaContext::setDevice(0);

    Network net;
    DeepNet dn(net);
    Environment env(net, EmptyDatabase, {channelsWidth, channelsHeight, 1, 1});

    Tensor<Float_T> in;
    in.resize({channelsWidth, channelsHeight, 1, 1});

    ASSERT_EQUALS(in.dimZ(), 1U);
    ASSERT_EQUALS(in.dimX(), channelsWidth);
    ASSERT_EQUALS(in.dimY(), channelsHeight);

    float stepEstimated1_pytorch = 0.1442825;

    //fill input image
    int counter = 0;
    for (unsigned int b = 0; b < in.dimB(); ++b) {
        for (unsigned int z = 0; z < in.dimZ(); ++z) {
            for (unsigned int y = 0; y < in.dimY(); ++y) {
                for (unsigned int x = 0; x < in.dimX(); ++x) {
                    in(x, y, z, b) = 0.125f*counter;
                    counter++;
                }
            }
        }
    }

    std::cout << "[Input]\n" << in << std::endl;

    const std::shared_ptr<Activation>& activation1
            = std::make_shared<LinearActivation_Frame_CUDA<float> >();

    ActivationCell_Frame_CUDA<float> activation1_cell(  dn,
                                                        "activation1",
                                                        1,
                                                        activation1);

    FcCell_Frame_Test_CUDA<float> fc1(dn, "fc1",
                               nbOutputs,
                               std::shared_ptr<Activation>());

    fc1.setParameter("NoBias", true);

    LSQQuantizerCell_Frame_CUDA<float> quant;
    quant.setRange(range);
    std::shared_ptr<QuantizerCell> quantizer = std::shared_ptr<QuantizerCell>(&quant, [](QuantizerCell *) {});

    SoftmaxCell_Frame_CUDA<float> softmax1(dn, "softmax1", nbOutputs, true, 0);

    Tensor<float> out_diff({channelsWidth, channelsHeight, 1, 1});

    activation1_cell.addInput(in,out_diff);
    fc1.addInput(&activation1_cell);
    softmax1.addInput(&fc1);

    fc1.setQuantizer(quantizer);

    activation1_cell.initialize();
    fc1.initialize();
    softmax1.initialize();

    if(fc1.getQuantizer()){
        std::cout << "Added " <<  fc1.getQuantizer()->getType() <<
        " quantizer to " << fc1.getName() << std::endl;
    }

    //set weights to fc
    const unsigned int inputSize = fc1.getNbChannels() * fc1.getChannelsWidth()
                                   * fc1.getChannelsHeight();
    const unsigned int outputSize = fc1.getNbOutputs() * fc1.getOutputsWidth()
                                    * fc1.getOutputsHeight();

    ASSERT_EQUALS(inputSize, channelsWidth * channelsHeight);
    ASSERT_EQUALS(outputSize, nbOutputs);

    float weight_tmp = 0.0f;

    for (unsigned int output = 0; output < outputSize; ++output) {
        for (unsigned int channel = 0; channel < inputSize; ++channel) {
            if(output==0) weight_tmp = 0.001;
            if(output==1) weight_tmp = 0.1;
            Tensor<float> weight({1}, weight_tmp);
            fc1.setWeight(output, channel, weight);
        }
    }

    for(unsigned int iter_index = 0; iter_index < 10000; ++iter_index


>
    implements _$DhcpLeaseCopyWith<$Res> {
  __$DhcpLeaseCopyWithImpl(this._self, this._then);

  final _DhcpLease _self;
  final $Res Function(_DhcpLease) _then;

/// Create a copy of DhcpLease
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? expires = null,Object? name = null,Object? hwaddr = null,Object? ip = null,Object? clientid = null,}) {
  return _then(_DhcpLease(
expires: null == expires ? _self.expires : expires // ignore: cast_nullable_to_non_nullable
as DateTime,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,hwaddr: null == hwaddr ? _self.hwaddr : hwaddr // ignore: cast_nullable_to_non_nullable
as String,ip: null == ip ? _self.ip : ip // ignore: cast_nullable_to_non_nullable
as String,clientid: null == clientid ? _self.clientid : clientid // ignore: cast_nullable_to_non_nullable
as String,
  ));
}

}

// dart format on
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'version.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_InfoVersion _$InfoVersionFromJson(Map<String, dynamic> json) => _InfoVersion(
  core: ComponentVersion.fromJson(json['core'] as Map<String, dynamic>),
  web: ComponentVersion.fromJson(json['web'] as Map<String, dynamic>),
  ftl: ComponentVersion.fromJson(json['ftl'] as Map<String, dynamic>),
  docker: ComponentVersion.fromJson(json['docker'] as Map<String, dynamic>),
);

Map<String, dynamic> _$InfoVersionToJson(_InfoVersion instance) =>
    <String, dynamic>{
      'core': instance.core.toJson(),
      'web': instance.web.toJson(),
      'ftl': instance.ftl.toJson(),
      'docker': instance.docker.toJson(),
    };

_ComponentVersion _$ComponentVersionFromJson(Map<String, dynamic> json) =>
    _ComponentVersion(
      local: VersionDetail.fromJson(json['local'] as Map<String, dynamic>),
      remote: VersionDetail.fromJson(json['remote'] as Map<String, dynamic>),
      canUpdate: json['canUpdate'] as bool?,
    );

Map<String, dynamic> _$ComponentVersionToJson(_ComponentVersion instance) =>
    <String, dynamic>{
      'local': instance.local.toJson(),
      'remote': instance.remote.toJson(),
      'canUpdate': instance.canUpdate,
    };

_VersionDetail _$VersionDetailFromJson(Map<String, dynamic> json) =>
    _VersionDetail(
      version: json['version'] as String,
      branch: json['branch'] as String?,
    );

Map<String, dynamic> _$VersionDetailToJson(_VersionDetail instance) =>
    <String, dynamic>{'version': instance.version, 'branch': instance.branch};
import 'package:freezed_annotation/freezed_annotation.dart';

part 'version.freezed.dart';
part 'version.g.dart';

@freezed
sealed class InfoVersion with _$InfoVersion {
  @JsonSerializable(explicitToJson: true)
  const factory InfoVersion({
    required ComponentVersion core,
    required ComponentVersion web,
    required ComponentVersion ftl,
    required ComponentVersion docker,
  }) = _InfoVersion;

  factory InfoVersion.fromJson(Map<String, dynamic> json) =>
      _$InfoVersionFromJson(json);
}

@freezed
sealed class ComponentVersion with _$ComponentVersion {
  @JsonSerializable(explicitToJson: true)
  const factory ComponentVersion({
    required VersionDetail local,
    required VersionDet


ify/require"

	"github.com/cometbft/cometbft/abci/example/kvstore"
	"github.com/cometbft/cometbft/light/provider"
	lighthttp "github.com/cometbft/cometbft/light/provider/http"
	rpcclient "github.com/cometbft/cometbft/rpc/client"
	rpchttp "github.com/cometbft/cometbft/rpc/client/http"
	rpctest "github.com/cometbft/cometbft/rpc/test"
	"github.com/cometbft/cometbft/types"
)

func TestNewProvider(t *testing.T) {
	c, err := lighthttp.New("chain-test", "192.168.0.1:26657")
	require.NoError(t, err)
	require.Equal(t, fmt.Sprintf("%s", c), "http{http://192.168.0.1:26657}")

	c, err = lighthttp.New("chain-test", "http://153.200.0.1:26657")
	require.NoError(t, err)
	require.Equal(t, fmt.Sprintf("%s", c), "http{http://153.200.0.1:26657}")

	c, err = lighthttp.New("chain-test", "153.200.0.1")
	require.NoError(t, err)
	require.Equal(t, fmt.Sprintf("%s", c), "http{http://153.200.0.1}")
}

func TestProvider(t *testing.T) {
	app := kvstore.NewInMemoryApplication()
	app.RetainBlocks = 10
	node := rpctest.StartTendermint(app)

	cfg := rpctest.GetConfig()
	defer os.RemoveAll(cfg.RootDir)
	rpcAddr := cfg.RPC.ListenAddress
	genDoc, err := types.GenesisDocFromFile(cfg.GenesisFile())
	require.NoError(t, err)
	chainID := genDoc.ChainID

	c, err := rpchttp.New(rpcAddr, "/websocket")
	require.Nil(t, err)

	p := lighthttp.NewWithClient(chainID, c)
	require.NoError(t, err)
	require.NotNil(t, p)

	// let it produce some blocks
	err = rpcclient.WaitForHeight(c, 10, nil)
	require.NoError(t, err)

	// let's get the highest block
	lb, err := p.LightBlock(context.Background(), 0)
	require.NoError(t, err)
	require.NotNil(t, lb)
	assert.True(t, lb.Height < 1000)

	// let's check this is valid somehow
	assert.Nil(t, lb.ValidateBasic(chainID))

	// historical queries now work :)
	lower := lb.Height - 3
	lb, err = p.LightBlock(context.Background(), lower)
	require.NoError(t, err)
	assert.Equal(t, lower, lb.Height)

	// fetching missing heights (both future and pruned) should return appropriate errors
	lb, err = p.LightBlock(context.Background(), 1000)
	require.Error(t, err)
	require.Nil(t, lb)
	assert.Equal(t, provider.ErrHeightTooHigh, err)

	_, err = p.LightBlock(context.Background(), 1)
	require.Error(t, err)
	require.Nil(t, lb)
	assert.Equal(t, provider.ErrLightBlockNotFound, err)

	// stop the full node and check that a no response error is returned
	rpctest.StopTendermint(node)
	time.Sleep(10 * time.Second)
	lb, err = p.LightBlock(context.Background(), lower+2)
	// we should see a con


Text}";
                });
              }
            );
        }, _displayDownloadProgress);
      }
    );
  }

  AudioProcessingWhisper whisper = AudioProcessingWhisper();
  AudioProcessingWhisperStreaming whisper_streaming = AudioProcessingWhisperStreaming();

  Stream<Uint8List>? stream = null;
  StreamSubscription? listener = null;
  String mic_volume = "";
  bool terminating = false;

  void _intermediateCallback(List<SpeechText> text){
      setState(() {
        predict_result = text[0].text + "...";
      });
  }

  void _messageCallback(List<SpeechText> text){
      setState(() {
        predict_result = "";
        for (int i = 0; i < text.length; i++){
          predict_result += text[i].text;
        }
      });
  }

  void _finishCallback(){
    whisper_streaming.close();
    setState(() {
      predict_result = "Terminate success. You can run new whisper instance.";
    });
    terminating = false;
  }

  void _processSamples(samples) {
    // https://github.com/anarchuser/mic_stream/issues/94
    List<double> result = [];
    int UInt16Max = math.pow(2, 16).toInt();
    for (var i = 0; i < samples.length~/2; i++) {
      int a = samples[2*i + 1];
      int b = samples[2*i];
      int c = 256*a + b;
      if (2*c > UInt16Max) {
        c = -UInt16Max + c;
      }
      result.add(c / 32738.0);
    }

    setState(() {
      mic_volume = "mic volume : ${result.reduce(math.max)}";
    });

    int sampleRate = 44100;
    whisper_streaming.send(result, sampleRate);
  }

  void _ailiaAudioProcessingWhisper(String modelType, bool virtualMemory) async{
    ByteData data = await rootBundle.load("assets/demo.wav");
    final wav = await Wav.read(data.buffer.asUint8List());
    AudioProcessingWhisper whisper = AudioProcessingWhisper();
    List<String> modelList = whisper.getModelList(modelType);
    _displayDownloadBegin();
    downloadModelFromModelList(0, modelList, () async {
      await _displayDownloadEnd();
      File vad_file = File(await getModelPath(modelList[1]));
      File onnx_encoder_file = File(await getModelPath(modelList[3]));
      File onnx_decoder_file = File(await getModelPath(modelList[5]));
      String text = await whisper.transcribe(wav, onnx_encoder_file, onnx_decoder_file, vad_file, selectedEnvId, modelType, virtualMemory);
      setState(() {
        predict_result = text;
      });
    });
  }

  void _ailiaAudioProcessingWhisperStreaming(String modelType, bool virtualMemory) async{
    List<String> modelList = whisper.getModelList(modelType);
    _displayDownloadBegin();
    downloadModelFromModelList(0, modelList, () async {
      await _displayDownloadEnd();

      setState(() {
        predict_result = "Please speak to mic.";
      });

      File vad_file = File(await getModelPath(modelList[1]));
      File onnx_encoder_file = File(await getModelPath(modelList[3]));
      File onnx_decoder_file = File(await getModelPath(modelList[5]));

      if (terminating){
        return;
      }

      if (listener != null){
        listener!.cancel();
        listener = null;
        whisper_streaming.terminate();
        setState(() {
          predict_result = "Please wait terminate.";
        });
        terminating = true;
        return;
      }

      String lang = "ja";
      await whisper_streaming.open(onnx_encoder_file, onnx_decoder_file,


str r0, [sp]
	str r0, [sp, #4]
	mov r0, #1
	str r0, [sp, #8]
	mov r0, #0x25
	str r0, [sp, #0xc]
	ldr r0, _021E71CC ; =0x00000854
	ldr r2, [r4, #4]
	ldr r0, [r4, r0]
	mov r1, #0x39
	mov r3, #2
	bl GfGfxLoader_LoadScrnDataFromOpenNarc
	mov r0, #0
	str r0, [sp]
	mov r1, #0x85
	str r0, [sp, #4]
	lsl r1, r1, #4
	str r0, [sp, #8]
	ldr r0, [r4, r1]
	add r1, r1, #4
	ldr r1, [r4, r1]
	mov r2, #2
	mov r3, #0x25
	bl PaletteData_LoadOpenNarc
	mov r0, #0
	str r0, [sp]
	str r0, [sp, #4]
	mov r0, #1
	str r0, [sp, #8]
	mov r0, #0x25
	str r0, [sp, #0xc]
	ldr r0, _021E71CC ; =0x00000854
	ldr r2, [r4, #4]
	ldr r0, [r4, r0]
	mov r1, #0x3a
	mov r3, #6
	bl GfGfxLoader_LoadCharDataFromOpenNarc
	mov r0, #0
	str r0, [sp]
	str r0, [sp, #4]
	mov r0, #1
	str r0, [sp, #8]
	mov r0, #0x25
	str r0, [sp, #0xc]
	ldr r0, _021E71CC ; =0x00000854
	ldr r2, [r4, #4]
	ldr r0, [r4, r0]
	mov r1, #0x3a
	mov r3, #7
	bl GfGfxLoader_LoadCharDataFromOpenNarc
	mov r0, #0
	str r0, [sp]
	str r0, [sp, #4]
	mov r0, #1
	str r0, [sp, #8]
	mov r0, #0x25
	str r0, [sp, #0xc]
	ldr r0, _021E71CC ; =0x00000854
	ldr r2, [r4, #4]
	ldr r0, [r4, r0]
	mov r1, #0x3b
	mov r3, #7
	bl GfGfxLoader_LoadScrnDataFromOpenNarc
	mov r0, #0
	str r0, [sp]
	str r0, [sp, #4]
	mov r0, #1
	str r0, [sp, #8]
	mov r0, #0x25
	str r0, [sp, #0xc]
	ldr r0, _021E71CC ; =0x00000854
	ldr r2, [r4, #4]
	ldr r0, [r4, r0]
	mov r1, #0x3c
	mov r3, #6
	bl GfGfxLoader_LoadScrnDataFromOpenNarc
	mov r0, #1
	str r0, [sp]
	mov r0, #0
	mov r1, #0x85
	str r0, [sp, #4]
	lsl r1, r1, #4
	str r0, [sp, #8]
	ldr r0, [r4, r1]
	add r1, r1, #4
	ldr r1, [r4, r1]
	mov r2, #0x12
	mov r3, #0x25
	bl PaletteData_LoadOpenNarc
	ldr r0, [r4, #4]
	mov r1, #0
	bl ScheduleBgTilemapBufferTransfer
	ldr


[Time Functions Example](http://www.gnu.org/software/libc/manual/html_node/Time-Functions-Example.html)

* `man 2 stat`

		struct stat { /* when _DARWIN_FEATURE_64_BIT_INODE is NOT defined */
		     dev_t    st_dev;    /* device inode resides on */
		     ino_t    st_ino;    /* inode's number */
		     mode_t   st_mode;   /* inode protection mode */
		     nlink_t  st_nlink;  /* number of hard links to the file */
		     uid_t    st_uid;    /* user-id of owner */
		     gid_t    st_gid;    /* group-id of owner */
		     dev_t    st_rdev;   /* device type, for special file inode */
		     struct timespec st_atimespec;  /* time of last access */
		     struct timespec st_mtimespec;  /* time of last data modification */
		     struct timespec st_ctimespec;  /* time of last file status change */
		     off_t    st_size;   /* file size, in bytes */
		     quad_t   st_blocks; /* blocks allocated for file */
		     u_long   st_blksize;/* optimal file sys I/O ops blocksize */
		     u_long   st_flags;  /* user defined flags for file */
		     u_long   st_gen;    /* file generation number */
		 };

#### 常用 API

* 重要数据结构 /usr/include/time.h

		struct tm {
		        int     tm_sec;         /* seconds after the minute [0-60] */
		        int     tm_min;         /* minutes after the hour [0-59] */
		        int     tm_hour;        /* hours since midnight [0-23] */
		        int     tm_mday;        /* day of the month [1-31] */
		        int     tm_mon;         /* months since January [0-11] */
		        int     tm_year;        /* years since 1900 */
		        int     tm_wday;        /* days since Sunday [0-6] */
		        int     tm_yday;        /* days since January 1 [0-365] */
		        int     tm_isdst;       /* Daylight Savings Time flag */
		        long    tm_gmtoff;      /* offset from CUT in seconds */
		        char    *tm_zone;       /* timezone abbreviation */
		};

* 时间函数

		time(); 取得目前的时间
		ctime(); 把日期和时间转换为字符串
		localtime(); 取得当地目前时间和日期
		strftime(); 将时间格式化
		asctime(); 将时间和日期以字符串格式表示

		clock(); 确定处理器时间
		difftime(); 计算两个时刻之间的时间差
		gmtime(); 把日期和时间转换为(GMT)时间
		mktime(); 将时间结构数据转换成经过的秒数

## Lesson 45 - 最长公共子序列(LCS)问题

### 课程任务

LCS：又称最长


me, nbPoints);
	DP::Labels timeLabels;
	timeLabels.push_back(DP::Label("dummyTime", 2));

	// Construct the point cloud from the generated matrices
	DP request = DP(randFeat, featLabels, randDesc, descLabels, randTimes, timeLabels);
	DP source =  DP(randFeat, featLabels, randDesc, descLabels, randTimes, timeLabels);

	// Fake Weights
	PM::OutlierWeights weights = PM::OutlierWeights::Ones(1, nbPoints);

	// Fake Matches
	PM::Matches::Ids ids(1, nbPoints);
	PM::Matches::Dists dists(1, nbPoints);

	for(unsigned int i=0; i<nbPoints; i++)
	{
		ids(0,i) = i;
		dists(0,i) = 1.0;
	}

	// Construct matches from generated matrices
	PM::Matches matches(dists, ids);

	// Finally, the constructor for ErrorElements
	PM::ErrorMinimizer::ErrorElements mPts(request, source, weights, matches);

	// check number of points
	EXPECT_EQ(mPts.reference.getNbPoints(), nbPoints);
	EXPECT_EQ(mPts.reference.getNbPoints(), mPts.reading.getNbPoints());

	// check descriptor
	EXPECT_EQ(mPts.reference.getDescriptorDim(), dimDescriptors);

	// check time
	EXPECT_EQ(mPts.reference.getTimeDim(), dimTime);

}

#include <gtest/gtest.h>

#include <memory>
#include <queue>

#include <Eigen/Core>

#include "../../utest.h"

#include "pointmatcher/DataPointsFilters/utils/octree/Octree.h"

class OctreeTest : public ::testing::Test
{
public:
    // General aliases.
    using DataPoints = typename PM::DataPoints;
    using Label = typename DataPoints::Label;
    using Labels = typename DataPoints::Labels;
    // Octree aliases.
    using Octree = Octree_<NumericType, 3>;
    using Point = Octree::Point;
    using Vector = PM::Vector;
    using OctreeDataContainer = Octree::DataContainer;

    // Octree construction parameters.
    double maxSizeByNode{ 0.01 };
    size_t maxPointByNode{ 1 };
    bool buildParallel{ false };
    bool centerAtOrigin{ false };

    // Test data.
    std::vector<DataPoints> pointClouds_;

    void SetUp() override {}

    void printOctreeContent(Octree& octreeRoot)
    {
        // Iterative traversal of octree with Breadth-First-Search.
        std::queue<Octree*> queue;
        queue.push(&octreeRoot);
        size_t nodeIndex{ 0u };
        while (!queue.empty())
        {
            // Fetch front of the queue and pop element.
            Octree* octreeNode{ queue.front() };
            queue.pop();

            std::cout << "Node index = " << nodeIndex << "\n";
            std::cout << "Depth = " << octreeNode->getDepth() << "\n";
            std::cout << "Is root? " << octreeNode->isRoot() << "\n";
            std::cout << "Is leaf? " << octreeNode->isLeaf() << "\n";
            std::cout << "Is empty? " << octreeNode->isEmpty() << "\n";
            std::cout << "Bounding box radius = " << octreeNode->getRadius() << "\n";
            std::cout << "Bounding box center = " << octreeNode->getCenter().transpose() << "\n";
            auto* points{ octreeNode->getData() };
            size_t numPoints{ points->size() };
            std::cout << "Number of points = " << numPoints << "\n";
            if (


 ifndef MSGPACK_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
# define MSGPACK_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
#
# include <rpc/msgpack/preprocessor/arithmetic/inc.hpp>
# include <rpc/msgpack/preprocessor/arithmetic/sub.hpp>
# include <rpc/msgpack/preprocessor/comparison/less_equal.hpp>
# include <rpc/msgpack/preprocessor/config/config.hpp>
# include <rpc/msgpack/preprocessor/control/while.hpp>
# include <rpc/msgpack/preprocessor/tuple/elem.hpp>
# include <rpc/msgpack/preprocessor/tuple/rem.hpp>
#
# /* MSGPACK_PP_DIV_BASE */
#
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
#    define MSGPACK_PP_DIV_BASE(x, y) MSGPACK_PP_WHILE(MSGPACK_PP_DIV_BASE_P, MSGPACK_PP_DIV_BASE_O, (0, x, y))
# else
#    define MSGPACK_PP_DIV_BASE(x, y) MSGPACK_PP_DIV_BASE_I(x, y)
#    define MSGPACK_PP_DIV_BASE_I(x, y) MSGPACK_PP_WHILE(MSGPACK_PP_DIV_BASE_P, MSGPACK_PP_DIV_BASE_O, (0, x, y))
# endif
#
# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT()
#    define MSGPACK_PP_DIV_BASE_P(d, rxy) MSGPACK_PP_DIV_BASE_P_IM(d, MSGPACK_PP_TUPLE_REM_3 rxy)
#    define MSGPACK_PP_DIV_BASE_P_IM(d, im) MSGPACK_PP_DIV_BASE_P_I(d, im)
# else
#    define MSGPACK_PP_DIV_BASE_P(d, rxy) MSGPACK_PP_DIV_BASE_P_I(d, MSGPACK_PP_TUPLE_ELEM(3, 0, rxy), MSGPACK_PP_TUPLE_ELEM(3, 1, rxy), MSGPACK_PP_TUPLE_ELEM(3, 2, rxy))
# endif
#
# define MSGPACK_PP_DIV_BASE_P_I(d, r, x, y) MSGPACK_PP_LESS_EQUAL_D(d, y, x)
#
# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT()
#    define MSGPACK_PP_DIV_BASE_O(d, rxy) MSGPACK_PP_DIV_BASE_O_IM(d, MSGPACK_PP_TUPLE_REM_3 rxy)
#    define MSGPACK_PP_DIV_BASE_O_IM(d, im) MSGPACK_PP_DIV_BASE_O_I(d, im)
# else
#    define MSGPACK_PP_DIV_BASE_O(d, rxy) MSGPACK_PP_DIV_BASE_O_I(d, MSGPACK_PP_TUPLE_ELEM(3, 0, rxy), MSGPACK_PP_TUPLE_ELEM(3, 1, rxy), MSGPACK_PP_TUPLE_ELEM(3, 2, rxy))
# endif
#
# define MSGPACK_PP_DIV_BASE_O_I(d, r, x, y) (MSGPACK_PP_INC(r), MSGPACK_PP_SUB_D(d, x, y), y)
#
# /* MSGPACK_PP_DIV_BASE_D */
#
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
#    define MSGPACK_PP_DIV_BASE_D(d, x, y) MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_DIV_BASE_P, MSGPACK_PP_DIV_BASE_O, (0, x, y))
# else
#    define MSGPACK_PP_DIV_BASE_D(d, x, y) MSGPAC


ylenums{6}", fileName = "text_oldstylenums_6.png", description = "old style enum 6")
            add(OLDSTYLEENUMS, latex = "\\oldstylenums{7}", image = "\\oldstylenums{7}", fileName = "text_oldstylenums_7.png", description = "old style enum 7")
            add(OLDSTYLEENUMS, latex = "\\oldstylenums{8}", image = "\\oldstylenums{8}", fileName = "text_oldstylenums_8.png", description = "old style enum 8")
            add(OLDSTYLEENUMS, latex = "\\oldstylenums{9}", image = "\\oldstylenums{9}", fileName = "text_oldstylenums_9.png", description = "old style enum 9")
            add(TEXT_ONE_HALF)
            add(TEXT_ONE_QUARTER)
            add(TEXT_THREE_QUARTERS)
            add(TEXT_ONE_SUPERIOR)
            add(TEXT_TWO_SUPERIOR)
            add(TEXT_THREE_SUPERIOR)
            add(TEXT_NUMERO)
            add(TEXT_PER_MILLE)
            add(TEXT_PER_TEN_THOUSAND)
            add(TEXT_DISCOUNT)
            add(TEXT_BLANK)
            add(TEXT_RECIPE)
            add(TEXT_ESTIMATED)
            add(TEXT_REFERENCE_MARK)
            add(TEXT_MUSICAL_QUARTER_NOTE)
            add(TEXT_DAGGER)
            add(TEXT_DOUBLE_DAGGER)
            add(SECTION_SIGN)
            add(DOLLAR_SIGN)
            add(TEXT_PILCROW)
            add(CUT_RIGHT_ON_LINE)
            add(CUT_LINE)
            add(CUT_LEFT_ON_LINE)
            add(RIGHT_SCISSORS)
            add(CUT_LINE_MIDDLE)
            add(LEFT_SCISSORS)
            add(CHECKED_BOX)
            add(EMPTY_BOX)
            add(CROSSED_BOX)
            add(TEXT_BIG_CIRCLE)
            add(TEXT_OPEN_BULLET)
            add(TEXT_BULLET)
            add(CHECKMARK)
            add(MALTESE)
            add(TEXT_ORDINAL_INDICATOR_FEMININE)
            add(TEXT_ORDINAL_INDICATOR_MASCULINE)
            add(TEXT_BORN)
            add(TEXT_DIVORCED)
            add(TEXT_DIED)
            add(TEXT_MARRIED)
            add(TEXT_LEAF)
            add(TEXT_DEGREE)
            add(TEXT_OHM)
            add(TEXT_UPSIDE_DOWN_OHM)
            add(TEXT_MU)
            add(TEXT_BACKSLASH)
            add(TEXT_BAR)
            add(TEXT_BROKEN_BAR)
            add(TEXT_DOUBLE_BAR)
            add(TEXT_FRACTION_SOLIDUS)
            add(TEXT_LEFT_ANGLE_BRACKET)
            add(TEXT_RIGHT_ANGLE_BRACKET)
            add(TEXT_LEFT_DOUBLE_BRACKET)
            add(TEXT_RIGHT_DOUBLE_BRACKET)
            add(TEXT_LEFT_QUILL)
            add(TEXT_RIGHT_QUILL)
            add(TEXT_LEFT_NOT)
            add(TEXT_MINUS)
            add(TEXT_PLUS_MINUS)
            add(TEXT_LESS_THAN)
            add(TEXT_GREATER_THAN)
            add(TEXT_SURD)
            add(TEXT_TIMES)
            add(TEXT_DIVIDE)
        }

        createCategory("Misc. symbols") {
            // STMARYRD
            add(Y_UP)
            add(Y_RIGHT)
            add(Y_DOWN)
            add(Y_LEFT)
            add(BIN_AMPERS


ryCount(employee=2203):
            self.apply_ratings(5)

        with self.assertQueryCount(employee=1):
            self.record_ratings._compute_rating_last_value()
            vals = (val == 5 for val in self.record_ratings.mapped('rating_last_value'))
            self.assertTrue(all(vals), "The last rating is kept.")

@tagged('rating')
class TestRatingRoutes(HttpCase, TestRatingCommon):

    def test_open_rating_route(self):
        for record_rating, is_rating_mixin_test in ((self.record_rating_thread, False),
                                                    (self.record_rating, True)):
            with self.subTest('With rating mixin' if is_rating_mixin_test else 'Without rating mixin'):
                access_token = record_rating._rating_get_access_token()
                self.url_open(f"/rate/{access_token}/5")

                rating = record_rating.rating_ids
                self.assertTrue(rating.consumed)
                self.assertEqual(rating.rating, 5)
                if is_rating_mixin_test:
                    self.assertEqual(record_rating.rating_last_value, 5)


_label2", "* 只能删除不包含数据的个人资料" },
                            { "profile_remove_tab_button", "移除" },
                            { "profile_rounds_suffix", "轮次" },
                            { "profile_apply_change_button", "保存" },
                            { "profile_undo_change_button", "取消" },
                            { "profile_add_select_title", "添加场次" },
                            { "profile_add_select_question_prefix", "存在尚未导入的比赛记录。" },
                            { "profile_add_select_question_suffix", "选择一个个人资料来导入。" },
                            { "profile_add_select_question_suffix_linked_profiles", "数据将被添加到链接的配置文件中。" },
                            { "profile_add_select_use_linked_profiles", "使用链接的个人资料" },
                            { "profile_move_select_title", "移动游玩场次数据" },
                            { "profile_move_select_description_prefix", "选择一个个人资料来移动游玩数据。" },
                            { "profile_move_select_description_suffix", "选中的游玩数据" },
                            { "profile_move_select_question_prefix", "是否要移动选中的 " },
                            { "profile_move_select_question_infix", " 游玩数据到 " },
                            { "profile_move_select_question_suffix", "个人资料？" },
                            { "profile_move_select_button", "移动" },

                            { "custom_range_range", "范围" },
                            { "custom_range_templates", "模板" },
                            { "custom_range_legacy_season", "季节" },
                            { "custom_range_ffa_season", "季节" },
                            { "custom_range_season", "季节" },
                            { "custom_range_legacy", "季节" },
                            { "custom_range_ffa", "FFA" },
                            { "custom_range_not_set", "没有设置" },
                            { "custom_range_filter", "筛选" },
                        }
            },
            { Language.TraditionalChinese, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) {
                            { "author", "Eunma" },
                            { "main_by", "by" },
                            { "main_on_twitch", "on Twitch" },
                            { "main_multilingual", "多語言" },
                            { "main_settings", "設置" },
                            { "main_fall_guys_stats", "Fall Guys Stats" },
                            { "main_filters", "篩選" },
                            { "main_stats", "統計" },
                            { "main_all", "全部" },
                            { "main_season", "賽季" },
                            { "main_week", "週" },
                            { "main_day", "天" },
                            { "main_session", "次" },
                            { "main_custom_range", "自定" },
                            { "main_party_type", "組隊" },
                            { "main_party", "組隊" },
                            { "main_solo", "單人" },
                            { "main_profile", "個人資料" },
                            { "main_profile_setting", "個人資料設置" },
                            { "main_show_overlay", "顯示浮窗" },
                            { "main_hide_overlay", "隱藏浮窗" },


#pragma once
#include "GameObject.h"

#include "Animation.h"
#include "Animations.h"

#include "debug.h"

#define MARIO_WALKING_SPEED		0.1f
#define MARIO_RUNNING_SPEED		0.2f

#define MARIO_ACCEL_WALK_X	0.0005f
#define MARIO_ACCEL_RUN_X	0.0007f

#define MARIO_JUMP_SPEED_Y		0.5f
#define MARIO_JUMP_RUN_SPEED_Y	0.6f

#define MARIO_GRAVITY			0.002f

#define MARIO_JUMP_DEFLECT_SPEED  0.4f

#define MARIO_STATE_DIE				-10
#define MARIO_STATE_IDLE			0
#define MARIO_STATE_WALKING_RIGHT	100
#define MARIO_STATE_WALKING_LEFT	200

#define MARIO_STATE_JUMP			300
#define MARIO_STATE_RELEASE_JUMP    301

#define MARIO_STATE_RUNNING_RIGHT	400
#define MARIO_STATE_RUNNING_LEFT	500

#define MARIO_STATE_SIT				600
#define MARIO_STATE_SIT_RELEASE		601

#pragma region ANIMATION_ID

#define ID_ANI_MARIO_IDLE_RIGHT 400
#define ID_ANI_MARIO_IDLE_LEFT 401

#define ID_ANI_MARIO_WALKING_RIGHT 500
#define ID_ANI_MARIO_WALKING_LEFT 501

#define ID_ANI_MARIO_RUNNING_RIGHT 600
#define ID_ANI_MARIO_RUNNING_LEFT 601

#define ID_ANI_MARIO_JUMP_WALK_RIGHT 700
#define ID_ANI_MARIO_JUMP_WALK_LEFT 701

#define ID_ANI_MARIO_JUMP_RUN_RIGHT 800
#define ID_ANI_MARIO_JUMP_RUN_LEFT 801

#define ID_ANI_MARIO_SIT_RIGHT 900
#define ID_ANI_MARIO_SIT_LEFT 901

#define ID_ANI_MARIO_BRACE_RIGHT 1000
#define ID_ANI_MARIO_BRACE_LEFT 1001

#define ID_ANI_MARIO_DIE 999

// SMALL MARIO
#define ID_ANI_MARIO_SMALL_IDLE_RIGHT 1100
#define ID_ANI_MARIO_SMALL_IDLE_LEFT 1102

#define ID_ANI_MARIO_SMALL_WALKING_RIGHT 1200
#define ID_ANI_MARIO_SMALL_WALKING_LEFT 1201

#define ID_ANI_MARIO_SMALL_RUNNING_RIGHT 1300
#define ID_ANI_MARIO_SMALL_RUNNING_LEFT 1301

#define ID_ANI_MARIO_SMALL_BRACE_RIGHT 1400
#define ID_ANI_MARIO_SMALL_BRACE_LEFT 1401

#define ID_ANI_MARIO_SMALL_JUMP_WALK_RIGHT 1500
#define ID_ANI_MARIO_SMALL_JUMP_WALK_LEFT 1501

#define ID_ANI_MARIO_SMALL_JUMP_RUN_RIGHT 1600
#define ID_ANI_MARIO_SMALL_JUMP_RUN_LEFT 1601

#pragma endregion

#define GROUND_Y 160.0f

#define	MARIO_LEVEL_SMALL	1
#define	MARIO_LEVEL_BIG		2

#define MARIO_BIG_BBOX_WIDTH  14
#define MARIO_BIG_BBOX_HEIGHT 24
#define MARIO_BIG_SITTING_BBOX_WIDTH  14
#define MARIO_BIG_SITTING_BBOX_HEIGHT 16

#define MARIO_SIT_HEIGHT_ADJUST ((MARIO_BIG_BBOX_HEIGHT-MARIO_BIG_SITTING_BBOX_HEIGHT)/2)

#define MARIO_SMALL_BBOX_WIDTH  13
#define MARIO_SMALL_BBOX_HEIGHT 12

#define MARIO_UNTOUCHABLE_TIME 2500

class CMario : public CGameObject
{
	BOOLEAN isSitting;
	float maxVx;
	float ax;				// acceleration on x
	float ay;				// acceleration on y

	int level;
	int untouchable;
	ULONGLONG untouchable_start;
	BOOLEAN isOnPlatform;
	int coin;

	void OnCollisionWithGoomba(LPCOLLISIONEVENT e);
	void OnCollisionWithCoin(LPCOLLISIONEVENT e);
	void OnCollisionWithPortal(LPCOLLISIONEVENT e);

	int GetAniIdBig();
	int GetAniIdSmall();

public:
	CMario(float x, float y) : CGameObject(x, y)
	{
		isSitting = false;
		maxVx = 0.0f;
		ax = 0.0f;
		ay = MARIO_GRAVITY;

		level = MARIO_LEVEL_BIG;
		untouchable = 0;
		untouchable_start = -1;
		isOnPlatform = false;
		coin = 0;
	}
	void Update(DWORD dt, vector<LPGAMEOBJECT>* coObjects);
	void Render();
	void SetState(int state);

	int IsCollidable()
	{
		return (state != MARIO_STATE_DIE);
	}

	int IsBlocking() { return (state != MARIO_STATE_DIE && untouchable==0); }

	void OnNoCollision(DWORD dt);
	void OnCollisionWith(LPCOLLISIONEVENT e);

	void SetLevel(int l);
	void StartUntouchable() { untouchable = 1; untouchable_start = GetTickCount64(); }

	void GetBoundingBox(float& left, float& top, float& right, float& bottom);
};