throw new IllegalArgumentException("Invalid valiant node range [" + nodeRangeLower + ", " + nodeRangeUpper + "] for n=" + numNodes);
        }

    }

    @Override
    public NetworkDevice generate(int identifier) {
        return this.generate(identifier, null);
    }

    @Override
    public NetworkDevice generate(int identifier, TransportLayer transportLayer) {
        return new RangeValiantSwitch(identifier, transportLayer, numNodes, intermediaryGenerator.generate(identifier), nodeRangeLower, nodeRangeUpper);
    }

}
package ch.ethz.systems.netbench.ext.poissontraffic.flowsize;

import ch.ethz.systems.netbench.core.log.SimulationLogger;

/**
 * pFabric (Alizadeh, 2016) data mining flow size distribution.
 *
 * Size (byte)  Idx         Culc. prob.
 * 0            1           0
 * 180          2           0.1
 * 216          3           0.2
 * 560          4           0.3
 * 900          5           0.4
 * 1100         6           0.5
 * 1870         7           0.6
 * 3160         8           0.7
 * 10000        9           0.8
 * 400000       10          0.9
 * 3.16e+06     11          0.95
 * 1e+08        12          0.98
 * 1e+09        13          1
 *
 * Expected flow size (lower bound):
 * 0.1*1+0.1*180+0.1*216+0.1*560+0.1*900+0.1*1100+0.1*1870
   +0.1*3160+0.1*10000+0.05*400000+0.03*3160000+0.02*100000000
 * =
 * 2116598.7 bytes
 * At 10 Gbps would take 1.69ms
 *
 * NOTE: the 1 is because non-empty flows don't make any sense
 */
public class PFabricDataMiningLowerBoundFSD extends FlowSizeDistribution {

    public PFabricDataMiningLowerBoundFSD() {
        super();
        SimulationLogger.logInfo("Flow planner flow size dist.", "pFabric data mining lower bound discrete");
    }

    @Override
    public long generateFlowSizeByte() {

        double outcome = independentRng.nextDouble();

        if (outcome >= 0.0 && outcome <= 0.1) {
            return 1;
        } else if (outcome >= 0.1 && outcome <= 0.2) {
            return 180;
        } else if (outcome >= 0.2 && outcome <= 0.3) {
            return 216;
        } else if (outcome >= 0.3 && outcome <= 0.4) {
            return 560;
        } else if (outcome >= 0.4 && outcome <= 0.5) {
            return 900;
        } else if (outcome >= 0.5 && outcome <= 0.6) {
            return 1100;
        } else if (outcome >= 0.6 && outcome <= 0.7) {
            return 1870;
        } else if (outcome >= 0.7 && outcome <= 0.8) {
            return 3160;
        } else if (outcome >= 0.8 && outcome <= 0.9) {
            return 10000;
        } else if (outcome >= 0.9 && outcome <= 0.95) {
            return 400000;
        } else if (outcome >= 0.95 && outcome <= 0.98) {
            return 3160000;
        } else { // outcome >= 0.98 && outcome <= 1.0
            return 100000000;
        }

    }

}
/*
 *
 * Copyright (c) 2004-2009 Arizona State University.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. 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.
 *
 * THIS SOFTWARE IS PROVIDED BY ARIZONA STATE UNIVERSITY ``AS IS'' AND
 * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI


direction="left" class="clearfix">

Johnny Dreher  Porque boicotar o santander era ok e a natura nao? Tem que boicotar todos que compactuam com isso. A natura pode não ser a responsável pela matéria, mas é com o dinheiro dela que a Globo banca essas merdas. Mas tem que boicotar a Globo também. Enquanto eles tiverem marketshare vao ter patrocinadores

LikeShow more reactions
 · Reply · <a ajaxify="/ufi/reaction/profile/dialog/?ft_ent_identifier=704541006336712_704713502986129&av=100000633785771" data-hover="tooltip" data-tooltip-alignh="center" data-tooltip-uri="/ufi/reaction/sentence/tooltip/?ft_ent_identifier=704541006336712_704713502986129&client_id=1509532963032%3A933030414&user_count=18&av=100000633785771" href="/ufi/reaction/profile/browser/?ft_ent_identifier=704541006336712_704713502986129&av=100000633785771" rel="dialog" role="bu


lisations
;--------------------------------------------------------
	.area _HOME
	.area _GSINIT
	.area _GSFINAL
	.area _GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area _HOME
	.area _HOME
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area _CODE
;/pub/Develop/Projects/zasm-4.0/Test/SDCC/library/_printf.c:43: int printf (const char *format, ...)
;	---------------------------------
; Function printf
; ---------------------------------
_printf_start::
_printf:
	push	ix
	ld	ix,#0
	add	ix,sp
;/pub/Develop/Projects/zasm-4.0/Test/SDCC/library/_printf.c:48: va_start (arg, format);
;/pub/Develop/Projects/zasm-4.0/Test/SDCC/library/_printf.c:49: i = _print_format (put_char_to_stdout, NULL, format, arg);
	ld	hl,#0x0004+1+1
	add	hl,sp
	push	hl
	ld	l,4 (ix)
	ld	h,5 (ix)
	push	hl
	ld	hl,#0x0000
	push	hl
	ld	hl,#_put_char_to_stdout
	push	hl
	call	__print_format
	pop	af
	pop	af
	pop	af
	pop	af
;/pub/Develop/Projects/zasm-4.0/Test/SDCC/library/_printf.c:52: return i;
	pop	ix
	ret
_printf_end::
	.area _CODE
	.area _INITIALIZER
	.area _CABS (ABS)


;
        }

        &:last-child {
          @apply rounded-t-selector rounded-b-none;
        }
      }
    }
  }

  &:not(:has(.timeline-middle)) {
    :first-child {
      > hr:last-child {
        @apply rounded-t-selector rounded-b-none;
      }
    }

    :last-child {
      > hr:first-child {
        @apply rounded-b-selector rounded-t-none;
      }
    }
  }

  &:where(.timeline-snap-icon) {
    > li {
      --timeline-col-start: minmax(0, 1fr);
      --timeline-row-start: 0.5rem;
    }
  }
}

.timeline-horizontal {
  @apply flex-row;

  > li {
    @apply items-center;

    > hr {
      @apply h-[1.5px] min-h-0 w-full;

      &:first-child {
        @apply col-start-1 row-start-2;
      }

      &:last-child {
        @apply col-start-3 col-end-[none] row-start-2 row-end-auto;
      }
    }
  }

  .timeline-start {
    @apply col-start-1 col-end-4 row-start-1 row-end-2 self-end justify-self-center;
  }

  .timeline-end {
    @apply col-start-1 col-end-4 row-start-3 row-end-4 self-start justify-self-center;
  }

  &:has(.timeline-middle) {
    > li {
      > hr {
        &:first-child {
          @apply rounded-e-selector rounded-s-none;
        }

        &:last-child {
          @apply rounded-s-selector rounded-e-none;
        }
      }
    }
  }

  &:not(:has(.timeline-middle)) {
    :first-child {
      > hr:last-child {
        @apply rounded-s-selector rounded-e-none;
      }
    }

    :last-child {
      > hr:first-child {
        @apply rounded-e-selector rounded-s-none;
      }
    }
  }
}

.timeline-centered {
  .timeline-start {
    @apply self-start;
  }
  .timeline-end {
    @apply self-start;
  }
}
color-scheme: light;
--color-base-100: oklch(100% 0 0);
--color-base-200: oklch(97.8% 0.005 297.73);
--color-base-300: oklch(37.01% 0.0069 297.49);
--color-base-content: oklch(37.57% 0.022 281.8);
--color-primary: oklch(57.59% 0.247 287.24);
--color-primary-content: oklch(96.57% 0.017 289.61);
--color-secondary: oklch(55.79% 0.022 301.91);
--color-secondary-content: oklch(97.64% 0.001 286.38);
--color-accent: oklch(62.31% 0.188 259.81);
--color-accent-content: oklch(97.05% 0.014 254.6);
--color-neutral: oklch(37.57% 0.0222 281.8);
--color-neutral-content: oklch(0.98 0.0013 286.38);
--color-info: oklch(71.48% 0.126 215.22);
--color-info-content: oklch(98.41% 0.019 200.87);
--color-success: oklch(73.11% 0.217 147.04);
--color-success-content: oklch(98.1% 0.014 174.18);
--color-warning: oklch(79.87% 0.164 73.09);
--color-warning-content: oklch(99.34


local chestRooms = {
	entrances = {
		[25010] = { destination = { x = 32054, y = 31883, z = 6 } },
		[25011] = { destination = { x = 32073, y = 31883, z = 6 } },
		[25012] = { destination = { x = 32059, y = 31883, z = 6 } },
		[25013] = { destination = { x = 32068, y = 31883, z = 6 } },
	},
	exits = {
		[25014] = { vocation = VOCATION.ID.SORCERER, destination = { x = 32054, y = 31879, z = 6 } },
		[25015] = { vocation = VOCATION.ID.DRUID, destination = { x = 32073, y = 31879, z = 6 } },
		[25016] = { vocation = VOCATION.ID.PALADIN, destination = { x = 32059, y = 31879, z = 6 } },
		[25017] = { vocation = VOCATION.ID.KNIGHT, destination = { x = 32068, y = 31879, z = 6 } },
	},
}

local effects = {
	CONST_ME_TUTORIALARROW,
	CONST_ME_TUTORIALSQUARE,
}

local chestRoomTile = MoveEvent()

function chestRoomTile.onStepIn(creature, item, position, fromPosition)
	local player = creature:getPlayer()
	if not player then
		return true
	end
	local chestRoomExit = chestRooms.exits[item.actionid]
	if chestRoomExit then
		if player:getVocation():getId() == chestRoomExit.vocation then
			if player:getStorageValue(Storage.Quest.U10_55.Dawnport.VocationReward) == -1 then
				player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You should check the chest for your " .. player:getVocation():getName() .. " equipment.")
			elseif player:getStorageValue(Storage.Quest.U10_55.Dawnport.VocationReward) == 1 then
				player:teleportTo(chestRoomExit.destination, true)
				player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
				player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You should leave for the Mainland now. Go left to reach the ship.")
			end
		elseif player:getVocation():getId() ~= chestRoomExit.vocation then
			player:teleportTo(chestRoomExit.destination, true)
			player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
			player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have not the right vocation to enter this room.")
		end
		return true
	end
	local chestRoomEntrance = chestRooms.entrances[item.actionid]
	if chestRoomEntrance then
		if player:getStorageValue(Storage.Dawnport.DoorVocation) == player:getVocation():getId() then
			player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have chosen your vocation. You cannot go back.")
			player:teleportTo(chestRoomEntrance.destination, true)
			player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
		end
		return true
	end
	return true
end

for index, value in pairs(chestRooms.entrances) do
	chestRoomTile:aid(index)
end

for index, value in pairs(chestRooms.exits) do
	chestRoomTile:aid(index)
end

chestRoomTile:register()

-- Oressa stair, back if have reached level 20 or have chosen vocation
local templeStairs = MoveEvent()

function templeStairs.onStepIn(creature, item, position, fromPosition)
	local player = creature:getPlayer()
	if not player then
		return true
	end
	if player:getStorageValue(Storage.Dawnport.DoorVocation) == player:getVocation():getId() then
		player:sendTextMessage(MESSAGE_EVENT_ADVANCE


21.9-28.9-21.9h-39.6v44.8H153c15.1 0 25.8-6.6 25.8-22.9zm132.3 23.2c-18.3 0-30.5 11.4-31.7 29.7h62.2c-1.7-18.5-11.3-29.7-30.5-29.7zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zM271.7 185h77.8v-18.9h-77.8V185zm-43 110.3c0-24.1-11.4-44.9-35-51.6 17.2-8.2 26.2-17.7 26.2-37 0-38.2-28.5-47.5-61.4-47.5H68v192h93.1c34.9-.2 67.6-16.9 67.6-55.9zM380 280.5c0-41.1-24.1-75.4-67.6-75.4-42.4 0-71.1 31.8-71.1 73.6 0 43.3 27.3 73 71.1 73 33.2 0 54.7-14.9 65.1-46.8h-33.7c-3.7 11.9-18.6 18.1-30.2 18.1-22.4 0-34.1-13.1-34.1-35.3h100.2c.1-2.3.3-4.8.3-7.2z"],
    "bimobject": [448, 512, [], "f378", "M416 32H32C14.4 32 0 46.4 0 64v384c0 17.6 14.4 32 32 32h384c17.6 0 32-14.4 32-32V64c0-17.6-14.4-32-32-32zm-64 257.4c0 49.4-11.4 82.6-103.8 82.6h-16.9c-44.1 0-62.4-14.9-70.4-38.8h-.9V368H96V136h64v74.7h1.1c4.6-30.5 39.7-38.8 69.7-38.8h17.3c92.4 0 103.8 33.1 103.8 82.5v35zm-64-28.9v22.9c0 21.7-3.4 33.8-38.4 33.8h-45.3c-28.9 0-44.1-6.5-44.1-35.7v-19c0-29.3 15.2-35.7 44.1-35.7h45.3c35-.2 38.4 12 38.4 33.7z"],
    "bitbucket": [512, 512, [], "f171", "M22.2 32A16 16 0 0 0 6 47.8a26.35 26.35 0 0 0 .2 2.8l67.9 412.1a21.77 21.77 0 0 0 21.3 18.2h325.7a16 16 0 0 0 16-13.4L505 50.7a16 16 0 0 0-13.2-18.3 24.58 24.58 0 0 0-2.8-.2L22.2 32zm285.9 297.8h-104l-28.1-147h157.3l-25.2 147z"],
    "bitcoin": [512, 512, [], "f379", "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-141.651-35.33c4.937-32.999-20.191-50.739-54.55-62.573l11.146-44.702-27.213-6.781-10.851 43.524c-7.154-1.783-14.502-3.464-21.803-5.13l10.929-43.81-


object[] valueArray = element.Value.ToArray();
                for (int i = 0; i < valueArray.Length; i++)
                {
                    xml.WriteStartElement("Value");
                    xml.WriteAttributeString("order", i.ToString());
                    AddValueToXml(xml, valueArray[i], element.Value.IsDate);
                    xml.WriteEndElement();
                }
            }
            else if (element.Value.IsUid)
            {
                Uid uid = (Uid) element.Value[0];
                xml.WriteStartElement("Uid");
                xml.WriteStartElement("Value");
                AddValueToXml(xml, uid, element.Value.IsDate);
                xml.WriteEndElement();
                xml.WriteStartElement("Name");
                AddValueToXml(xml, uid.GetDictionaryEntry().Name,
                    element.Value.IsDate);
                xml.WriteEndElement();
                xml.WriteStartElement("Type");
                AddValueToXml(xml, UidType.GetName(typeof(UidType),
                    uid.GetDictionaryEntry().Type), element.Value.IsDate);
                xml.WriteEndElement();
            }
            else
            {
                xml.WriteStartElement("Value");
                if ( ! element.Value.IsEmpty)
                    AddValueToXml(xml, element.Value[0], element.Value.IsDate);
            }
            // Value
            xml.WriteEndElement();
            // DataElement
            xml.WriteEndElement();
        }

        private void AddDataSetToXml(XmlTextWriter xml, DataSet dataSet)
        {
            foreach (DataElement element in dataSet)
            {
                if (element.Tag.Group.Equals("7FE0"))
                {
                    if ( ! IsPixelDataExcluded)
                        AddDataElementToXml(xml, element);
                }
                else
                    AddDataElementToXml(xml, element);
            }
        }

        private void AddTransferSyntaxToXml(XmlTextWriter xml,
            TransferSyntax transferSyntax)
        {
            xml.WriteStartElement("TransferSyntax");
            xml.WriteElementString("Uid", transferS


 map[string]struct {
	New func(int) any
}{
	"ptr": {
		New: buildPtrObject,
	},
	"map": {
		New: buildMapObject,
	},
	"slice": {
		New: buildSliceObject,
	},
}

func buildObjects(n int, fn func(int) any) (iters int, v any) {
	// maxSize is the maximum size of an individual object below. For an N
	// larger than this, we start to return multiple objects.
	const maxSize = 1024
	if n <= maxSize {
		return 1, fn(n)
	}
	iters = (n + maxSize - 1) / maxSize
	return iters, fn(maxSize)
}

// gobSave is a version of save using gob (no stats available).
func gobSave(_ context.Context, w io.Writer, v any) (_ state.Stats, err error) {
	enc := gob.NewEncoder(w)
	err = enc.Encode(v)
	return
}

// gobLoad is a version of load using gob (no stats available).
func gobLoad(_ context.Context, r io.Reader, v any) (_ state.Stats, err error) {
	dec := gob.NewDecoder(r)
	err = dec.Decode(v)
	return
}

var allAlgos = map[string]struct {
	Save   func(context.Context, io.Writer, any) (state.Stats, error)
	Load   func(context.Context, io.Reader, any) (state.Stats, error)
	MaxPtr int
}{
	"state": {
		Save: state.Save,
		Load: state.Load,
	},
	"gob": {
		Save: gobSave,
		Load: gobLoad,
	},
}

func BenchmarkEncoding(b *testing.B) {
	for objName, objInfo := range allObjects {
		for algoName, algoInfo := range allAlgos {
			b.Run(fmt.Sprintf("%s/%s", objName, algoName), func(b *testing.B) {
				b.StopTimer()
				n, v := buildObjects(b.N, objInfo.New)
				b.ReportAllocs()
				b.StartTimer()
				for i := 0; i < n; i++ {
					if _, err := algoInfo.Save(context.Background(), io.Discard, v); err != nil {
						b.Errorf("save failed: %v", err)
					}
				}
				b.StopTimer()
			})
		}
	}
}

func BenchmarkDecoding(b *testing.B) {
	for objName, objInfo := range allObjects {
		for algoName, algoInfo := range allAlgos {
			b.Run(fmt.Sprintf("%s/%s", objName, algoName), func(b *testing.B) {
				b.StopTimer()
				n, v := buildObjects(b.N, objInfo.New)
				buf := new(bytes.Buffer)
				if _, err := algoInfo.Save(context.Background(), buf, v); err != nil {
					b.Errorf("save failed: %v", err)
				}
				b.ReportAllocs()
				b.StartTimer()
				var r bytes.Reader
				for i := 0; i < n; i++ {
					r.Reset(buf.Bytes())
					if _, err := algoInfo.Load(context.Background(), &r, v); err != nil {
						b.Errorf("load failed: %v", err)
					}
				}
				b.StopTimer()
			})
		}
	}
}
// Copyright 2018 The gVisor Authors.
//
// 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, eithe


(stat="identity", position=position_dodge()) +
          geom_text(aes(y=R+0.04, colour=Sig), label=All_res_plot[All_res_plot$Test == 'Strat_PRS',]$Val_Label_1, parse=T, vjust=-0.5, hjust=0,show.legend = FALSE) +
          geom_text(aes(y=R+0.04, colour=Sig), label=All_res_plot[All_res_plot$Test == 'Strat_PRS',]$Val_Label_2, parse=T, vjust=1, hjust=0,show.legend = FALSE) +
          scale_colour_op() +
          labs(y='Correlation', x='') +
          ylim(NA,0.65) +
          theme_half_open() +
          theme(legend.title=element_blank(),legend.position="top") +
          background_grid(major = 'x', minor = 'x') +
          coord_flip()

Plot_5<-ggplot(All_res_plot[All_res_plot$Test == 'PRScs_and_GeRS',], aes(x=Phenotype, y=R, fill=Model)) +
          geom_bar(stat="identity", position=position_dodge()) +
          geom_text(aes(y=R+0.04, colour=Sig), label=All_res_plot[All_res_plot$Test == 'PRScs_and_GeRS',]$Val_Label_1, parse=T, vjust=-0.5, hjust=0,show.legend = FALSE) +
          geom_text(aes(y=R+0.04, colour=Sig), label=All_res_plot[All_res_plot$Test == 'PRScs_and_GeRS',]$Val_Label_2, parse=T, vjust=1, hjust=0,show.legend = FALSE) +
          scale_colour_op() +
          labs(y='Correlation', x='') +
          ylim(NA,0.65) +
          theme_half_open() +
          theme(legend.title=element_blank(),legend.position="top") +
          background_grid(major = 'x', minor = 'x') +
          coord_flip()

png('/mnt/lustre/users/k1806347/Analyses/GeRS_comparison/TEDS_outcomes_for_prediction/GeRS_tests_summary_TEDS.png', units='px', res=300, width=3500, height=3000)
  plot_grid(Plot_1,Plot_2,Plot_3, Plot_5, labels = "AUTO")
dev.off()

Plot comparison results (PP4+clump)

#####
# Compare results from each approach
#####

pheno<-c('Height21', 'BMI21', 'GCSE', 'ADHD')
gwas<-c('HEIG03', 'BODY11', 'EDUC03', 'ADHD04')
weight=c('YFS.BLOOD.RNAARR')

res<-list()
for(i in 1:length(gwas)){
res_2<-re


import numpy as np

from envs import env_tr_uni
from envs.env_utils import sigmoid

DUMMY_BITS = env_tr_uni.DUMMY_BITS
DUMMY_TASKS = env_tr_uni.DUMMY_TASKS

class Env(env_tr_uni.Env):

  def __init__(
      self, area=(64, 64), view=(9, 9), size=(64, 64),
      reward=True, length=1500, seed=None, eager_task=False, **kwargs):
    super().__init__(area, view, size, reward, length, seed, **kwargs)
    # LP attributes
    self.learning_progress = np.zeros(len(self.target_achievements) + DUMMY_TASKS)
    self.task_probs = np.ones(len(self.target_achievements)  + DUMMY_TASKS) / (len(self.target_achievements) + DUMMY_TASKS)
    # PMI attributes
    self.pmi_reweigh = np.ones(len(self.target_achievements) + DUMMY_TASKS)
    for i, task in enumerate(self.target_achievements):
      task_desc = task.split("_")
      try:
        task_count = int(task_desc[-1])
        self.pmi_reweigh[i] = 0.001
      except:
        pass

  def _specify_curri_task(self):
    self.task_idx = np.random.choice(np.arange(len(self.target_achievements) + DUMMY_TASKS), size=1, p=self.task_probs)[0]
    self.task_steps = 0
    self.task_enc = self._encode_task(self.task_idx)

  def push_info(self, info):
    super().push_info(info)
    self.learning_progress = info['learning_progress']
    posidxs = [i for i, lp in enumerate(self.learning_progress) if lp > 0 or self.eval_tsr[i] > 0]
    zeroout = len(posidxs) > 0
    subprobs = self.learning_progress[posidxs] if zeroout else self.learning_progress
    std = np.std(subprobs)
    subprobs = (subprobs - np.mean(subprobs)) / (std if std else 1)  # z-score
    subprobs = sigmoid(subprobs)  # sigmoid
    subprobs = subprobs / np.sum(subprobs)  # normalize
    if zeroout:
      probs = np.zeros(len(self.learning_progress))
      probs[posidxs] = subprobs
    else:
      probs = subprobs
    # PMI: reweigh according to interestingness
    probs = probs * self.pmi_reweigh
    probs = probs / np.sum(probs)  # normalize
    self.task_probs = probs


U+1F4BB,U+1F4D4,U+1F4DA,U+1F4DE,U+1F4EA,U+1F4F1,U+1F4F6,U+1F509,U+1F511-1F512,U+1F517,U+1F525,U+1F527-1F528,U+1F547,U+1F57B,U+1F5A5,U+1F5A8,U+1F5B6,U+1F5D4,U+1F686,U+1F69A,U+1F6A2,U+1F6BF,U+1F6E1,U+1F95B,U+1F9E0,U+1FA99;
}

@font-face {
    font-family: 'Font Awesome 6 Pro';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../webfonts/pro-fa-regular-400-e41116.woff2") format("woff2"), url("../webfonts/pro-fa-regular-400-e41116.ttf") format("truetype");
    unicode-range: U+20,U+A9,U+2328,U+F02E,U+F06E,U+F086-F087,U+F097,U+F0E6,U+F0EB,U+F0F8,U+F11C,U+F164,U+F1C1,U+F1F9,U+F24D,U+F2B5,U+F2D2,U+F302,U+F47D,U+1F3E5,U+1F441,U+1F44D,U+1F4A1,U+1F516,U+1F5EA;
}

@font-face {
    font-family: 'Font Awesome 6 Pro';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../webfonts/pro-fa-regular-400-e41116.woff2") format("woff2"), url("../webfonts/pro-fa-regular-400-e41116.ttf") format("truetype");
    unicode-range: U+20,U+24-25,U+2666,U+2672,U+267A-267B,U+2693,U+26A1,U+26EA,U+E010,U+E01B,U+E020-E021,U+E02F,U+E03A,U+E042,U+E046,U+E068,U+E06E,U+E074,U+E076,U+F008,U+F018,U+F01C,U+F025,U+F02A,U+F05B,U+F078,U+F09C,U+F0A3,U+F0B1,U+F0C6,U+F0E7,U+F112,U+F126,U+F12C-F12E,U+F130-F131,U+F13D,U+F140,U+F155,U+F1AE,U+F1B2,U+F1B8,U+F1CE,U+F1DC,U+F1E5-F1E6,U+F1EC,U+F219,U+F21B,U+F22D,U+F234,U+F246,U+F275,U+F295,U+F2CD,U+F2FC,U+F31A,U+F363,U+F3E5,U+F3FB,U+F44B,U+F48A,U+F48F-F490,U+F494,U+F498,U+F4B7,U+F4CA,U+F4D7,U+F508,U+F51D-F51E,U+F521-F522,U+F530,U+F535,U+F53E,U+F541,U+F543-F545,U+F548,U+F55D,U+F564,U+F56C,U+F5


.Command("curl", "-f", "http://localhost:8080/health")
			_, err := utils.Run(cmd)
			g.Expect(err).NotTo(HaveOccurred())
		}, 2*time.Minute, 5*time.Second).Should(Succeed())

		By("waiting for PostgreSQL to be ready")
		Eventually(func(g Gomega) {
			cmd := exec.Command("pg_isready", "-h", "localhost", "-p", "5432", "-U", "testuser", "-d", "testdb")
			_, err := utils.Run(cmd)
			g.Expect(err).NotTo(HaveOccurred())
		}, 2*time.Minute, 5*time.Second).Should(Succeed())
	} else {
		By("starting local test infrastructure with docker-compose")
		cmd := exec.Command("docker-compose", "-f", "test/local/testdata/docker-compose.yml", "up", "-d")
		_, err := utils.Run(cmd)
		Expect(err).NotTo(HaveOccurred())

		By("waiting for API server to be healthy")
		Eventually(func(g Gomega) {
			cmd := exec.Command("curl", "-f", "http://localhost:8080/health")
			_, err := utils.Run(cmd)
			g.Expect(err).NotTo(HaveOccurred())
		}, 2*time.Minute, 5*time.Second).Should(Succeed())

		By("waiting for PostgreSQL to be ready")
		Eventually(func(g Gomega) {
			cmd := exec.Command("docker", "exec", "-i", "postgres", "pg_isready", "-U", "testuser", "-d", "testdb")
			_, err := utils.Run(cmd)
			g.Expect(err).NotTo(HaveOccurred())
		}, 2*time.Minute, 5*time.Second).Should(Succeed())
	}
}

func stopTestInfrastructure() {
	if !isRunningInCI() {
		By("stopping test infrastructure")
		cmd := exec.Command("docker-compose", "-f", "test/local/testdata/docker-compose.yml", "down", "-v")
		_, _ = utils.Run(cmd)
	}
	// In CI, infrastructure is managed by the workflow
}

func isRunningInCI() bool {
	return os.Getenv("CI") == "true" || os.Getenv("GITHUB_ACTIONS") == "true"
}

func getPostgreSQLHost() string {
	if isRunningInCI() {
		return "localhost"
	}
	return "postgres"
}

func getAPIServerHost() string {
	if isRunningInCI() {
		return "localhost"
	}
	return "api-server"
}
package ico

import (
	"errors"
	"fmt"
	"image"
	"os"
	"reflect"
	"testing"
)

func TestParseICO(t *testing.T) {
	assertEquals(t, 3, GetNumberOfIconsInFile(t, "favicon.ico"))
	assertDecodesImage(t, "github.ico")
	assertDecodesImage(t, "besticon.ico")
	assertDecodesImage(t, "addthis.ico")
	assertDecodesImage(t, "wowhead.ico")
}

func TestParseICODetails(t *testing.T) {
	entries := []icondirEntry{
		{Width: 0x30, Height: 0x30, PaletteCount: 0x10, Reserved: 0x0, ColorPlanes: 0x1, BitsPerPixel: 0x4, Size: 0x668, Offset: 0x36},
		{Width: 0x20, Height: 0x20, PaletteCount: 0x10, Reserved: 0x0, ColorPlanes: 0x1, BitsPerPixel: 0x4, Size: 0x2e8, Offset: 0x69e},
		{Width: 0x10, Height: 0x10, PaletteCount: 0x10,


or_reset ? 1 : 0) | shift_latch) << 22;
    const unsigned int bit0 = (bit22 ^ (shift_latch << 17)) & (1 << 22);

    shift_register = (shift_latch >> 1) | bit0;
#ifdef TRACE
    std::cout << std::hex << shift_latch << " -> " << shift_register << std::endl;
#endif
    set_noise_output();
}

void WaveformGenerator::write_shift_register()
{
    if (unlikely(waveform > 0x8))
    {
#if 0
        // FIXME this breaks SID/wf12nsr/wf12nsr
        if (waveform == 0xc)
            // fixes
            // noise_writeback_check_8_to_C_old
            // noise_writeback_check_9_to_C_old
            // noise_writeback_check_A_to_C_old
            // noise_writeback_check_C_to_C_old
            return;
#endif

        // Write changes to the shift register output caused by combined waveforms
        // back into the shift register.
        if (likely(shift_pipeline != 1) && !test)
        {
#ifdef TRACE
            std::cout << "write shift_register" << std::endl;
#endif
            // the output pulls down the SR bits
            shift_register = shift_register & (shift_mask | get_noise_writeback(waveform_output));
            noise_output &= waveform_output;
        }
        else
        {
#ifdef TRACE
            std::cout << "write shift_latch" << std::endl;
#endif
            // shift phase 1: the output drives the SR bits
            noise_output = waveform_output;
        }

        set_no_noise_or_noise_output();
    }
}

void WaveformGenerator::set_noise_output()
{
    noise_output =
        ((shift_register & (1u <<  2)) <<  9) |  // Bit 20 -> bit 11
        ((shift_register & (1u <<  4)) <<  6) |  // Bit 18 -> bit 10
        ((shift_register & (1u <<  8)) <<  1) |  // Bit 14 -> bit  9
        ((shift_register & (1u << 11)) >>  3) |  // Bit 11 -> bit  8
        ((shift_register & (1u << 13)) >>  6) |  // Bit  9 -> bit  7
        ((shift_register & (1u << 17)) >> 11) |  // Bit  5 -> bit  6
        ((shift_register & (1u << 20)) >> 15) |  // Bit  2 -> bit  5
        ((shift_register & (1u << 22)) >> 18);   // Bit  0 -> bit  4

    set_no_noise_or_noise_output();
}

void WaveformGenerator::setWaveformModels(matrix_t* models)
{
    model_wave = models;
}

void WaveformGenerator::setPulldownModels(matrix_t* models)
{
    model_pulldown = models;
}

void WaveformGenerator::synchronize() const
{
    // A special case occurs when a sync source is synced itself on the same
    // cycle as when its MSB is set high. In this case the destination will
    // not be synced. This has been verified by sampling OSC3.
    if (unlikely(msb_rising) && nextVoice->sync && !(sync && prevVoice->msb_rising))
    {
        nextVoice->accumulator = 0;
    }
}

void WaveformGenerator::set_no_noise_or_noise_output()
{
    no_noise_or_noise_output = no_noise | noise_output;
}

void WaveformGenerator::writeCONTROL_REG(unsigned char control)
{
    const unsigned int waveform_prev = waveform;
    const bool test_prev = test;

    waveform = (control >> 4) & 0x0f;
    test = (control & 0x08) != 0;
    sync = (control & 0x02) != 0;

    // Substitution of accumulator MSB wh


onDescription", g_pVGuiLocalize->Find( "#L4D360UI_Addon_None_Specified" ) ), sizeof( addonInfo.szDescription ) );
				addonInfo.bEnabled = pCur->GetInt() != 0;

				// Generate the types string based on the value of keys
				bool bCampaign = false, bMaps = false, bSkin = false, bWeapon = false, bBoss = false, bCommon = false, bSurvivor = false, bSound = false, bMusic = false, bScript = false, bProp = false;

				bCampaign = pAddonInfo->GetInt( "addonContent_Campaign" ) != 0;
				bMaps = ( pAddonInfo->GetInt( "addonContent_Map" ) != 0 ) && !bCampaign;
				bSkin = pAddonInfo->GetInt( "addonContent_Skin" ) != 0;
				bWeapon = pAddonInfo->GetInt( "addonContent_weapon" ) != 0;
				bBoss = pAddonInfo->GetInt( "addonContent_BossInfected" ) != 0;
				bCommon = pAddonInfo->GetInt( "addonContent_CommonInfected" ) != 0;
				bSurvivor = pAddonInfo->GetInt( "addonContent_Survivor" ) != 0;
				bSound = pAddonInfo->GetInt( "addonContent_Sound" ) != 0;
				bScript = pAddonInfo->GetInt( "addonContent_Script" ) != 0;
				bMusic = pAddonInfo->GetInt( "addonContent_Music" ) != 0;
				bProp = pAddonInfo->GetInt( "addonContent_prop" ) != 0;

				// Make the addon types string based on the flags
				addonInfo.szTypes[0] = NULL;
				bCampaign ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Campaign" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bMaps ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Map" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bSkin ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Skin" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bWeapon ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Weapon" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bBoss ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Boss" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bCommon ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Common" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bSurvivor ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Survivor" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bSound ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Sound" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bScript ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Script" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bMusic ? Q_wcsncat( addonInfo.szTypes, g_pVGuiLocalize->Find( "#L4D360UI_Addon_Type_Music" ), sizeof( addonInfo.szTypes ) ) : NULL;
				bPr


--

    if (this._size <= this.capacity() / 4 && this.capacity() > 1) {
      this.resize(Math.floor(this.capacity() / 2))
    }

    return front
  }

  removeLast() {
    if (this.isEmpty()) return

    this.last = this.last === 0 ? this.data.length - 1 : this.last - 1
    const ret = this.data[this.last]
    this._size--
    if (this._size <= this.capacity() / 4 && this.capacity() > 1) {
      this.resize(Math.floor(this.capacity() / 2))
    }

    return ret
  }

  front(): null | E {
    if (this.isEmpty()) return null

    return this.data[this.first]
  }

  tail(): null | E {
    if (this.isEmpty()) return null

    const last = this.last === 0 ? this.data.length - 1 : this.last - 1
    return this.data[last]
  }
}

export default Deque
import {
  PDFArray,
  PDFBool,
  PDFContext,
  PDFDict,
  PDFHexString,
  PDFName,
  PDFNull,
  PDFNumber,
  PDFRef,
  PDFString,
  PDFObject,
} from 'src/core';
import { toCharCode, typedArrayFor } from 'src/utils';

describe(`PDFDict`, () => {
  const context = PDFContext.create();

  it(`can be constructed from PDFDict.withContext(...)`, () => {
    expect(PDFDict.withContext(context)).toBeInstanceOf(PDFDict);
  });

  const pdfDict = PDFDict.withContext(context);

  const pdfBool = PDFBool.True;
  const pdfHexString = PDFHexString.of('ABC123');
  const pdfName = PDFName.of('Foo#Bar!');
  const pdfNull = PDFNull;
  const pdfNumber = PDFNumber.of(-24.179);
  const pdfString = PDFString.of('foobar');
  const pdfRef = PDFRef.of(21, 92);

  pdfDict.set(PDFName.of('Boolean'), pdfBool);
  pdfDict.set(PDFName.of('HexString'), pdfHexString);
  pdfDict.set(PDFName.of('Name'), pdfName);
  pdfDict.set(PDFName.of('Null'), pdfNull);
  pdfDict.set(PDFName.of('Number'), pdfNumber);
  pdfDict.set(PDFName.of('String'), pdfString);
  pdfDict.set(PDFName.of('Ref'), pdfRef);

  const pdfArray = PDFArray.withContext(context);
  pdfArray.push(PDFBool.True);
  pdfArray.push(PDFNull);

  const pdfSubDict = PDFDict.withContext(context);
  pdfSubDict.set(PDFName.of('Array'), pdfArray);

  pdfDict.set(PDFName.of('Dictionary'), pdfSubDict);

  it(`retains entered objects`, () => {
    expect(pdfDict.entries().length).toBe(8);

    expect(pdfDict.get(PDFName.of('Boolean'))).toBe(pdfBool);
    expect(pdfDict.get(PDFName.of('HexString'))).toBe(pdfHexString);
    expect(pdfDict.get(PDFName.of('Name'))).toBe(pdfName);
    expect(pdfDict.get(PDFName.of('Null'))).toBe(pdfNull);
    expect(pdfDict.get(PDFName.of('Number'))).toBe(pdfNumber);
    expect(pdfDict.get(PDFName.of('String'))).toBe(pdfString);
    expect(pdfDict.get(PDFName.of('Ref'))).toBe(pdfRef);
    expect(pdfDict.get(PDFName.of('Dictionary'))).toBe(pdfSubDict);
    expect(pdfSubDict.get(PDFName.of('Array'))).toBe(pdfArray);
  });

  it(`can be converted to a Map`, () => {
    expect(pdfDict.asMap()).toEqual(
      new Map<PDFName, PDFObject>([
        [PDFName.of('Boolean'), pdfBool],
        [PDFName.of('HexStr


 unblocks Run().
func (s *Server) Stop() {
	s.handler.Stop()
}

// Shutdown the server, gracefully.  Should be defered after New().
func (s *Server) Shutdown() {
	ctx, cancel := context.WithTimeout(context.Background(), s.cfg.ServerGracefulShutdownTimeout)
	defer cancel() // releases resources if httpServer.Shutdown completes before timeout elapses

	s.HTTPServer.Shutdown(ctx)
	s.GRPC.GracefulStop()
}
package balagent

import (
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"sort"
	"strings"
	"testing"
	"text/template"
	"time"

	"github.com/stretchr/testify/require"

	"github.com/weaveworks/flux/common/daemon"
	"github.com/weaveworks/flux/common/netutil"
	"github.com/weaveworks/flux/common/store"
	"github.com/weaveworks/flux/common/store/inmem"
)

type ingressInstance struct {
	Address netutil.IPPort
	store.IngressInstance
}

type ingressInstances []ingressInstance

func (iis ingressInstances) Len() int { return len(iis) }

func (iis ingressInstances) Less(i, j int) bool {
	return iis[i].Address.LessThan(iis[j].Address)
}

func (iis ingressInstances) Swap(i, j int) {
	t := iis[i]
	iis[i] = iis[j]
	iis[j] = t
}

func sortIngressInstances(iis map[netutil.IPPort]store.IngressInstance) ingressInstances {
	var a ingressInstances
	for addr, ii := range iis {
		a = append(a,
			ingressInstance{Address: addr, IngressInstance: ii})
	}

	sort.Sort(a)
	return a
}

func newBalancerAgentConfig(t *testing.T) *BalancerAgentConfig {
	dir, err := ioutil.TempDir("", "balagent_test")
	require.Nil(t, err)

	return &BalancerAgentConfig{
		store:             inmem.NewInMem().Store("test session"),
		filename:          path.Join(dir, "output"),
		reconnectInterval: 100 * time.Millisecond,
		generated:         make(chan struct{}),
	}
}

func (cf *BalancerAgentConfig) start(t *testing.T) (daemon.Component, daemon.ErrorSink) {
	start, err := cf.Prepare()
	require.Nil(t, err)
	errs := daemon.NewErrorSink()
	return start(errs), errs
}

func cleanup(cf *BalancerAgentConfig, t *testing.T) {
	require.Nil(t, os.RemoveAll(path.Dir(cf.filename)))
}

func TestBalancerAgent(t *testing.T) {
	cf := newBalancerAgentConfig(t)
	defer cleanup(cf, t)

	tmpl := template.New("template")
	tmpl.Funcs(template.FuncMap{"sortIngressInstances": sortIngressInstances})

	var err error
	cf.template, err = tmpl.Parse(`
{{$HOME := .Getenv "HOME"}}
{{if len $HOME}}{{else}}No $HOME{{end}}
{{range $svcname, $svc := .}}{{$svcname}}:{{range sortIngressInstances $svc.IngressInstances}} ({{.Address}}, {{.Weight}}){{end}}
{{end}}`)
	require.Nil(t, err)

	// Add an initial service with no instances:
	require.Nil(t, cf.store.AddService("serv


),n("table",[n("thead",[n("tr",[n("th",[t._v("字段")]),t._v(" "),n("th",[t._v("格式")]),t._v(" "),n("th",[t._v("说明")])])]),t._v(" "),n("tbody",[n("tr",[n("td",[t._v("origin")]),t._v(" "),n("td",[t._v("Object")]),t._v(" "),n("td",[t._v("中心坐标：x横坐标，y纵坐标")])]),t._v(" "),n("tr",[n("td",[t._v("radius")]),t._v(" "),n("td",[t._v("Number")]),t._v(" "),n("td",[t._v("环形/饼图半径")])]),t._v(" "),n("tr",[n("td",[t._v("sideArr")]),t._v(" "),n("td",[t._v("Array")]),t._v(" "),n("td",[t._v("对应中心坐标集合")])])])]),t._v(" "),n("h2",{attrs:{id:"配置参数onanimation-onfinish"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#配置参数onanimation-onfinish"}},[t._v("#")]),t._v(" 配置参数onAnimation/onFinish")]),t._v(" "),n("p",[t._v("为保证二次绘制与原图形动画保持同步，FundCharts开出了onAnimation以及onFinish配置字段，分别在动画过程中以及动画完成时执行。")]),t._v(" "),n("h3",{attrs:{id:"options-onanimation-rate"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#options-onanimation-rate"}},[t._v("#")]),t._v(" options.onAnimation(rate)")]),t._v(" "),n("p",[t._v("动画执行时回调函数。传入参数rate为动画执行率（0~1）。")]),t._v(" "),n("p",[t._v("使用如")]),t._v(" "),n("div",{staticClass:"language-js extra-class"},[n("pre",{pre:!0,attrs:{class:"language-js"}},[n("code",[n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// for example: pie chart weapp")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" testpie "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("pie")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    id"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'pie'")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n    datas"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",


í $F'(x)=f(x)$
	 - pokud zderivuji funkci $F$ dostanu funkci $f$
	 - $F$ nazýváme **primitivní funkcí k $f$ na $I$**

### O primitivní funkci
1. Nechť $F$ je primitivní funkce k $f$ na $I$. Pak také funkce $G$ definovaná předpisem $G(x) = F(x) + c$, $x \in I$, $c \in \mathbb{R}$ je primitivní funkcí k $f$ na $I$.
2. Nechť $F$ a $G$ jsou primitivní funkce k funkci $f$ na $I$, pak funkce $F - G$, $x \in I$ je konstantní.

- Tato nejednoznačnost primitivní funkce k $f$ vede k definici neurčitého integrálu

## Neurčitý integrál funkce $f$ na $I$
- Nechť existuje alespoň jedna primitivní funkce $F$ k funkci $f$ na intervalu $I$.
- Množinu všech primitivních funkcí k funkci $f$ na $I$ pak nazýváme **neurčitý integrál funkce $f$ na $I$** a značíme jej $$\int{f(x)dx}=\{F(x) +c\ |\ c \in \mathbb{R}\}.$$
- Primitivních funkcí $F(x)$ k funkci $f$ je nekonečně mnoho a liší se pouze konstantou $c$
	- jde o tzv. *integrační konstantu*
	- to je dáno tím, že při derivaci funkce $F$ se vyloučí veškeré konstanty
- Po integraci funkce $f$ na $F$ je vhodné tuto konstantu pro úplnost doplnit
	- (po získání primitivní funkce k $f$ - *opačná operace k derivaci*)
- Značení:
	- $\int$ - značení integrálu
	- $f(x)$ - integrovaná funkce (integrand)
	- $dx$  - proměnná podle které integrujeme (integrační proměnná)
	- $F(x)$ -  primitivní funkce
	- $c$ - integrační konstanta

>[!Example]- Isibalo - Co nám říká neurčitý integrál
><iframe width="660" height="385" src="https://www.youtube.com/embed/kC9D7iy_16U?si=Lrb78mJEXKhkfTHr" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

### O existenci primitivní funkce
- Nechť $f : \mathbb{R} \to \mathbb{R}$ je spojitá na intervalu $I \subseteq \mathbb{R}$ libovolného druhu, pak $f$ má na $I$ primitivní funkci.
- Funkce $f$, která není na R spojitá, nemusí mít na R primitivní funkci

### O linearitě primitivní funkce
- Nechť na $(a, b)$ existují primitivní funkce k funkcím $f_1$ a $f_2$ a nechť $k_1, k_2 \in \mathbb{R}$. Pak e


_FCC_MIDBAND = 0,
	REG_EXT_JAPAN_MIDBAND = 1,
	REG_EXT_FCC_DFS_HT40 = 2,
	REG_EXT_JAPAN_NONDFS_HT40 = 3,
	REG_EXT_JAPAN_DFS_HT40 = 4
};

struct ath9k_country_entry {
	u16 countryCode;
	u16 regDmnEnum;
	u16 regDmn5G;
	u16 regDmn2G;
	u8 isMultidomain;
	u8 iso[3];
};

struct eeprom_ops {
	int (*check_eeprom)(struct ath_hw *hw);
	u32 (*get_eeprom)(struct ath_hw *hw, enum eeprom_param param);
	int (*fill_eeprom)(struct ath_hw *hw);
	int (*get_eeprom_ver)(struct ath_hw *hw);
	int (*get_eeprom_rev)(struct ath_hw *hw);
	void (*set_board_values)(struct ath_hw *hw, struct ath9k_channel *chan);
	void (*set_addac)(struct ath_hw *hw, struct ath9k_channel *chan);
	void (*set_txpower)(struct ath_hw *hw, struct ath9k_channel *chan,
			   u16 cfgCtl, u8 twiceAntennaReduction,
			   u8 twiceMaxRegulatoryPower, u8 powerLimit,
			   int test);
	u16 (*get_spur_channel)(struct ath_hw *ah, u16 i, int is2GHz);
};

void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val);
void ath9k_hw_analog_shift_rmw(struct ath_hw *ah, u32 reg, u32 mask,
			       u32 shift, u32 val);
int16_t ath9k_hw_interpolate(u16 target, u16 srcLeft, u16 srcRight,
			     int16_t targetLeft,
			     int16_t targetRight);
int ath9k_hw_get_lower_upper_index(u8 target, u8 *pList, u16 listSize,
				    u16 *indexL, u16 *indexR);
int ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data);
void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data,
				  int eep_start_loc, int size);
void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList,
			     u8 *pVpdList, u16 numIntercepts,
			     u8 *pRetVpdList);
void ath9k_hw_get_legacy_target_powers(struct ath_hw *ah,
				       struct ath9k_channel *chan,
				       struct cal_target_power_leg *powInfo,
				       u16 numChannels,
				       struct cal_target_power_leg *pNewPower,
				       u16 numRates, int isExtTarget);
void ath9k_hw_get_target_powers(struct ath_hw *ah,
				struct ath9k_channel *chan,
				struct cal_target_power_ht *powInfo,
				u16 numChannels,
				struct cal_target_power_ht *pNewPower,
				u16 numRates, int isHt40Target);
u16 ath9k_hw_get_max_edge_power(u16 freq, struct cal_ctl_edges *pRdEdgesPower,
				int is2GHz, int num_band_edges);
void ath9k_hw_update_regulatory_maxpower(struct ath_hw *ah);
int ath9k_hw_eeprom_init(struct ath_hw *ah);

void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
				struct ath9k_channel *chan,
				void *pRawDataSet,
				u8 *bChans, u16 availPiers,
				u16 tPdGainOverlap,
				u16 *pPdGainBoundaries, u8 *pPDADCValues,
				u16 numXpdGains);

#define ar5416_get_ntxchains(_txchainmask)			\
	(((_txchainmask >> 2) & 1) +                            \
	 ((_txchainmask >> 1) & 1) + (_txchainmask & 1))

extern const struct eeprom_ops eep_def_ops;
extern const struct eeprom_ops eep_4k_ops;
extern const struct eeprom_ops eep_ar9287_ops;
extern const struct eeprom_ops eep_ar9287_ops;
extern const struct eeprom_ops eep_ar9300_ops;

#endif /* EEPROM_H */


difier = Modifier.padding(24.dp),
                horizontalAlignment = Alignment.CenterHorizontally
            ) {
                CircularProgressIndicator(
                    color = MaterialTheme.colorScheme.primary
                )
                Spacer(modifier = Modifier.height(16.dp))
                Text(
                    text = "Carregando níveis...",
                    style = MaterialTheme.typography.bodyMedium
                )
            }
        }
    }
}

private fun getLevelTitle(level: Int): String {
    return when {
        level <= 5 -> "Iniciante"
        level <= 10 -> "Aprendiz"
        level <= 15 -> "Intermediário"
        level <= 20 -> "Avançado"
        level <= 25 -> "Expert"
        level <= 30 -> "Mestre"
        level <= 40 -> "Lenda"
        else -> "Deus"
    }
}

private fun getLevelDescription(level: Int): String {
    return when {
        level <= 5 -> "Você está começando sua jornada mágica. Cada tarefa te aproxima de grandes conquistas!"
        level <= 10 -> "Você já aprendeu o básico. Continue assim para se tornar um verdadeiro mestre!"
        level <= 15 -> "Você está no caminho certo! Sua dedicação está sendo recompensada."
        level <= 20 -> "Você é um organizador experiente! Suas habilidades são impressionantes."
        level <= 25 -> "Você é um expert! Poucos conseguem chegar tão longe."
        level <= 30 -> "Você é um mestre! Sua sabedoria é reconhecida por todos."
        level <= 40 -> "Você é uma lenda! Suas conquistas são históricas."
        else -> "Você é um deus da organização! Nada é impossível para você!"
    }
}

data class LevelData(
    val level: Int,
    val experienceRequired: Int,
    val rewards: List<String>,
    val isUnlocked: Boolean = false
) package original.functionalProgramming

import org.junit.Test

class MemberReferences {
    val sums: (Int, Int) -> Int = ::count
    private fun count(valueA: Int, valueB
    : Int): Int {
        return valueA + valueB
    }
}

class FunctionReferences{
    private fun isEvenNumber(number: Int) = number % 2 == 0

    fun show(){
        val numbers = 1.rangeTo(10)
        val evenNumber = numbers.filter(::isEvenNumber)
        println(evenNumber)
    }
}

class PropertyReferences{
    private var message = "Kotlin"
    fun show(){
        println(::message.name)
        println(::message.get())

        ::message.set("Kotlin Academy")

        println(::message.get())
    }
}
class ReferencesTest{
    private val memberReferences = MemberReferences()
    private val functionReferences = FunctionReferences()
    private val propertyReferences = PropertyReferences()

    // Function References

    @Test
    fun memberReferencesTest(){
        println(memberReferences.sums(2,2))
        functionReferences.show()
        propertyReferences.show()
    }
}package original.dataClass

import org.junit.Test

class List {
    var numberList = emptyList<Int>()
    var charList = emptyList<Char>()
    var anyList = emptyList<Any>()
    var mutableList = mutableListOf<Any>()
    fun list(){
        numberList = listOf(1, 2, 3, 4, 5)
        charList = listOf('a', 'b', 'c')
        anyList = listOf('a', "Kotlin", 3, true)
        mutableList = mutableListOf('a', "Kotlin", 3, true)
        println(numberList)
        println(charList)
        println(anyList)

        mutableList.add('d') // Add an item at the end of the list
        mutableList.add(1, "love") // Adds items at index 1
        mutableList[3] = false // Changes the item value at the 3rd index
        mutableList.removeAt(0) // Deletes the item at index 0
        println(mutableList)
    }
}

class ListTest{
    private val list = List()

    @Test
    fun listTest(){
        list.list()
    }

}package original.oop

import org.junit.Test

class Overloading(private var name: String) {
    fun eat() {
        println("$name eat!")
    }

    fun eat(typeFood: String) {
        println("$name is eating $typeFood!")
    }

    fun eat(typeFood: String, quantity:


LE_CUDA__)
            if ((t / TILE) >= 2) { cudaStreamSynchronize(_streams[_buf_index]); }
#elif defined(__ENABLE_CANN__)
            if ((t / TILE) >= 2) { aclrtSynchronizeStream(_streams[_buf_index].stream()); }
#endif
#pragma omp parallel for
            for (size_t k = t; k < offset; k++) {
                float grad = half_precision ? (float)grads_cast_h[k] : grads[k];
                float param = half_precision ? (float)params_cast_h[k] : _params[k];
                float momentum = grads[k];
                float variance = _exp_avg_sq[k];
                if (_weight_decay > 0) { grad = param * _weight_decay + grad; }

                variance += grad * grad;

                grad = sqrt(variance);
                grad += _eps;
                grad = momentum / grad;
                param = grad * step_size + param;
#if defined(__ENABLE_CUDA__) or defined(__ENABLE_CANN__)
                if (dev_params) _doubled_buffer[_buf_index][k - t] = param;
#endif
                if (half_precision)
                    params_cast_h[k] = (ds_half_precision_t)param;
                else
                    _params[k] = param;
                // STORE UPDATE TERM TO GRAD'S MEMORY
                grads[k] = grad * step_size;
                _exp_avg_sq[k] = variance;
            }
#if defined(__ENABLE_CUDA__)
            if (dev_params) {
                launch_param_update(
                    _doubled_buffer[_buf_index], dev_params + t, (copy_size), _streams[_buf_index]);
                _buf_index = !_buf_index;
            }
#elif defined(__ENABLE_CANN__)
            if (dev_params) {
                size_t memcpy_size = copy_size * sizeof(_doubled_buffer[_buf_index][0]);
                aclrtMemcpy(dev_params + t,
                            memcpy_size,
                            _doubled_buffer[_buf_index],
                            memcpy_size,
                            aclrtMemcpyKind::ACL_MEMCPY_HOST_TO_DEVICE);

                _buf_index = !_buf_index;
            }
#endif
        }
    }
}

void Adagrad_Optimizer::Step_4(float* _params,
                               float* grads,
                               float* _exp_avg_sq,
                               size_t _param_size,
                               ds_half_precision_t* dev_params,
                               bool half_precision)
{
    size_t rounded_size = 0;
#if defined(__AVX512__) or defined(__AVX256__)
    Step_AVX<4>(
        &rounded_size, _params, grads, _exp_avg_sq, _param_size, dev_params, half_precision);
#endif
    if (_param_size > rounded_size)
        Step_1((_params + rounded_size),
               (grads + rounded_size),
               (_exp_avg_sq + rounded_size),
               (_param_size - rounded_size),
               (dev_params != nullptr ? (dev_params + rounded_size) : dev_params),
               half_precision);
}

int create_adagrad_optimizer(int optimizer_id,
                             float alpha = 1e-2,
                             float eps = 1e-8,
                             float weight_decay = 0,
                             bool should_log = false)
{
    auto opt = std::make_shared<Ad


ef (Shape Default)
            - 20.1.4.1.28 txDef (Text Default)
        - 20.1.4.2 Table Styles
            - 20.1.4.2.1 band1H (Band 1 Horizontal)
            - 20.1.4.2.2 band1V (Band 1 Vertical)
            - 20.1.4.2.3 band2H (Band 2 Horizontal)
            - 20.1.4.2.4 band2V (Band 2 Vertical)
            - 20.1.4.2.5 bevel (Bevel)
            - 20.1.4.2.6 bottom (Bottom Border)
            - 20.1.4.2.7 effect (Effect)
            - 20.1.4.2.8 effectRef (Effect Reference)
            - 20.1.4.2.9 fill (Fill)
            - 20.1.4.2.10 fillRef (Fill Reference)
            - 20.1.4.2.11 firstCol (First Column)
            - 20.1.4.2.12 firstRow (First Row)
            - 20.1.4.2.13 font (Font)
            - 20.1.4.2.14 insideH (Inside Horizontal Border)
            - 20.1.4.2.15 insideV (Inside Vertical Border)
            - 20.1.4.2.16 lastCol (Last Column)
            - 20.1.4.2.17 lastRow (Last Row)
            - 20.1.4.2.18 left (Left Border)
            - 20.1.4.2.19 lnRef (Line Reference)
            - 20.1.4.2.20 neCell (Northeast Cell)
            - 20.1.4.2.21 nwCell (Northwest Cell)
            - 20.1.4.2.22 right (Right Border)
            - 20.1.4.2.23 seCell (Southeast Cell)
            - 20.1.4.2.24 swCell (Southwest Cell)
            - 20.1.4.2.25 tblBg (Table Background)
            - 20.1.4.2.26 tblStyle (Table Style)
            - 20.1.4.2.27 tblStyleLst (Table Style List)
            - 20.1.4.2.28 tcBdr (Table Cell Borders)
            - 20.1.4.2.29 tcStyle (Table Cell Style)
            - 20.1.4.2.30 tcTxStyle (Table Cell Text Style)
            - 20.1.4.2.31 tl2br (Top Left to Bottom Right Border)
            - 20.1.4.2.32 top (Top Border)
            - 20.1.4.2.33 tr2bl (Top Right to Bottom Left Border)
            - 20.1.4.2.34 wholeTbl (Whole Table)
    - 20.1.5 3D
        - 20.1.5.1 anchor (Anchor Point)
        - 20.1.5.2 backdrop (Backdrop Plane)
        - 20.1.5.3 bevelB (Bottom Bevel)
        - 20.1.5.4 bevelT (Top Bevel)
        - 20.1.5.5 camera (Camera)
        - 20.1.5.6 contourClr (Contour Color)
        - 20.1.5.7 extrusionClr (Extrusion Color)
        - 20.1.5.8 flatTx (No text in 3D scene)
        - 20.1.5.9 lightRig (Light Rig)
        - 20.1.5.10 norm (Normal)
        - 20.1.5.11 rot (Rotation)
        - 20.1.5.12 sp3d (Apply 3D shape properties)
        - 20.1.5.13 up (Up Vector)
    - 20.1.6 Shared Style Sheet
        - 20.1.6.1 clrMap (Color Map)
        - 20.1.6.2 clrScheme (Color Scheme)
        - 20.1.6.3 custClrLst (Custom Color List)
        - 20.1.6.4 extraClrScheme (Extra


xs250Sbfilter250Sbfrom => 'Keneltä';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtitle => 'Suodata transaktiot';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbto => 'Kenelle';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype => 'Tyyppi';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbaffiliate => 'Kumppanuus komissio';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sball => 'Kaikki tyypit';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbcoupon => 'Kuponkialennus';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbfee => 'Verkkomaksu';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbinternal8722Sbreceive => 'Sisäinen vastaanotto';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbinternal8722Sbsend => 'Sisäinen lähetys';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbpending => 'Odottaa lähetystä';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbreceive => 'Vastaanota';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbreserve => 'Kauppareservi';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbreserve8722Sbreturn => 'Kauppareservin palautus';

  @override
  String get wallet250Sbtxs250Sbfilter250Sbtype250Sbsend => 'Lähetä';

  @override
  String wallet250Sbtxs250Sbtable250Sbamount(Object assetSymbol) {
    return 'Määrä $assetSymbol';
  }

  @override
  String get wallet250Sbtxs250Sbtable250Sbdate => 'Päivämäärä';

  @override
  String get wallet250Sbtxs250Sbtable250Sbdescription => 'Kuvaus';

  @override
  String wallet250Sbtxs250Sbtable250Sbreceived(Object assetSymbol) {
    return 'Vastaanotettu $assetSymbol';
  }

  @override
  String wallet250Sbtxs250Sbtable250Sbsent(Object assetSymbol) {
    return 'Lähetetty $assetSymbol';
  }

  @override
  String wallet250Sbtxs250Sbtip8722Sbtext(Object latestVersion, Object assetName) {
    return 'Jos näet kuvauksessa transaktiotunnuksen, jossa on linkki lohkoketju-exploreriin, se tarkoittaa että transaktiosi on lähetetty onnistuneesti. Varmista että lompakkosi on täysin synkronoitu, ja että käytät $assetName lompakon $latestVersion';
  }

  @override
  String get wallet250Sbtxs250Sbtip8722Sbtext8722Sblatest8722Sbversion => 'viimeisintä versiota';

  @override
  String wallet250Sbtxs250Sbtip8722Sbtitle(Object appName) {
    return 'Vinkki: nostitko varoja $appName:stä, etkä näe niitä lompakossasi?';
  }

  @override
  String get wallet250Sbtxs250Sbtitle => 'Lompakon transaktiot';

  @override
  String wallet250Sbupdate8722Sbsoft8722Sbwarn(Object update) {
    return 'Uusi versio Monero-ohjelmistosta on julkaistu! Älä unohda $update lompakko-ohjelmistoasi, muuten et voi lähettää tai


 to our video
        recommendations = np.argsort(similarities)[::-1]  # sort indices from highest to lowest rating
        # logger.info(f"User watched: {watched}")
        # logger.info(f"Likes on our video: {M[:, video_idx]}")
        # logger.info(f"Similarities: {[(video_ids[idx], int(val)) for idx, val in enumerate(similarities)]}")
        # logger.info(f"Likes: {likes}")
        # logger.info(f"Recommendations: {[(int(idx), video_ids[idx]) for idx in recommendations]}")
        watched_mask = np.isin(recommendations, watched)
        recommendations = np.concatenate((recommendations[~watched_mask], recommendations[watched_mask]))  # prioritize unwatched videos
        # logger.info(f"Recommendations: {[(int(idx), video_ids[idx]) for idx in recommendations]}")
        # logger.info(f"Total of {len(recommendations)} videos retrieved")
        processing_videos = {str(vid['_id']) for vid in db.videos.find({'status': 'processing'})} if ready_to_watch else set()
        final_video_list = list(islice((vid_id for vid_idx in recommendations if (vid_id := video_ids[vid_idx]) not in processing_videos), count))
        liked_list = [likes.get(f'{user_id},{vid_id}') for vid_id in final_video_list]
        # logger.info(f"Liked list: {liked_list}")
        like_counts = self.get_like_counts(final_video_list)
        # logger.info(f"Total of {len(final_video_list)} videos returned")
        return final_video_list, liked_list, like_counts

rec_algo = CollaborativeFiltering()


EwNjR7ZmlsbDojQTNBM0EzO30uc3QxMDY1e2ZpbGw6I0Q2QTUxRDt9PC9zdHlsZT48Zz48cG9seWdvbiBjbGFzcz0ic3QxMjMiIHBvaW50cz0iMzIsMTAgMTkuNiwxMCAxNC41LDYgMTYsNiAyMCw5IDMyLDkgIi8+PC9nPjxnPjxwb2x5Z29uIGNsYXNzPSJzdDEwNTkiIHBvaW50cz0iMjAsOSAzMiw5IDMyLDMgMjAsMyAxNiw2ICIvPjwvZz48Zz48cGF0aCBjbGFzcz0ic3QxMjIiIGQ9Ik0yMCwxN2gyYzAtMi41LDItNC41LDQuNS00LjVzNC41LDIsNC41LDQuNWgxdi03SDE5LjZsLTUuMS00SDB2MjFoMjBWMTd6Ii8+PHBhdGggY2xhc3M9InN0MTIyIiBkPSJNMjYuNSwxNS41Yy0wLjgsMC0xLjUsMC43LTEuNSwxLjVoM0MyOCwxNi4yLDI3LjMsMTUuNSwyNi41LDE1LjV6Ii8+PC9nPjxwYXRoIGNsYXNzPSJzdDEwNjMiIGQ9Ik0yOSwxOS41aC01Yy0wLjYsMC0xLTAuNC0xLTFWMTdjMC0xLjksMS42LTMuNSwzLjUtMy41UzMwLDE1LjEsMzAsMTd2MS41QzMwLDE5LjEsMjkuNiwxOS41LDI5LDE5LjV6IE0yOSwxOC41VjE5VjE4LjVDMjksMTguNSwyOSwxOC41LDI5LDE4LjV6IE0yNi41LDE0LjVjLTEuNCwwLTIuNSwxLjEtMi41LDIuNXYxLjVoNVYxN0MyOSwxNS42LDI3LjksMTQuNSwyNi41LDE0LjV6Ii8+PHJlY3QgeD0iMjEiIHk9IjE4IiBjbGFzcz0ic3QxMDYzIiB3aWR0aD0iMTEiIGhlaWdodD0iOSIvPjwvc3ZnPg==');
        }
      }
    }

    .e-address {

      .e-address-list-item {

        .e-icons::before {
          content: '\e608';
        }
      }
    }
  }

  .e-filemanager,
  .e-fe-popup {

    .e-fe-open::before {
      content: '\e609';
    }

    .e-fe-cut::before {
      content: '\e604';
    }

    .e-fe-copy::before {
      content: '\e60d';
    }

    .e-fe-paste::before {
      content: '\e601';
    }

    .e-fe-delete::before {
      content: '\e602';
    }

    .e-fe-rename::before {
      content: '\e60c';
    }


不足导致的问题

如果在 4K 的高分辨下，出现闪屏或者闪绿线的问题，确认内核 log 是否有以下打印：

```
 [drm:vop_isr] ERROR POST_BUF_EMPTY irq err
```

若有以上打印则为 DDR 带宽不足导致的问题，请参考《Rockchip_RK3399_Developer_Guide_Android7.1_Software_CN&EN.pdf》的 9.7 节进行处理。

####  4K UI 相关问题

1. 是否一定要 4K UI？

   4K UI 占用系统资源较多，最高只能支持到 4K25Hz 左右，不推荐使用 4K UI。如果只是想要播放 4K 视频或是查看 4K 图片，那可以不需要配置 4K UI，系统默认的视频播放器和图片浏览器可以支持。

2.  如何配置 4K UI？

   请参考 3.2.3 节，将 Framebuffer 分辨率配置为 4K。

3. 配置成 4K  UI 之后出现闪屏DDR 带宽问题，请参考 3.4.10 节进行处理。

#### setting 中 HDMI 分辨率列表中没有 4K 分辨率

1. 确认电视是否支持 4K 分辨率。

2. 执行以下命令，确认内核的 HDMI 分辨率列表中是否包含 4K 分辨率。

   ```
   cat /sys/class/drm/card0-HDMI-A-1/modes
   ```

3. 如果上述列表中不包含 4K 分辨率，双 VOP 平台（RK3288、RK3399）请确认 HDMI 是否绑定的是 VOPB。或是该电视的 4K-50/60Hz 不支持 YUV420，当前平台不支持这么高的分辨率（平台支持 HDMI 最高分辨率请参考第 1 章表格）。

4. 若内核的 HDMI 分辨率列表中包含 4K 分辨率，而 setting 中的分辨率列表不包含该分辨率，请确认白名单中是否包含了该分辨率（参考 3.2.4 节）。

#### HDMI 认证申请表的填写

如果要对设备进行 HDMI 认证，通常都会从认证机构获取到一份认证申请表，该表格一般都是 excel 形式。

首先关注表格下方的分页标签，如下方的例子：

![page.png](Rockchip_Developer_Guide_HDMI/page.png)

HDMI 各项功能的认证需要填写各个分页中的内容，如果设备不支持某些功能，则对应分页不必填写。常见分页说明如下：

- General：一般申请表都有类似的页面，且必须填写。通常都是关于设备 HDMI 的一些基本信息。如设备有几个 HDMI IN 口、有几个 HDMI OUT 口、设备 HDMI 是否支持 HDCP, CEC 等功能。该分页选项往往也决定了后续分页是否需要填写。如 HDMI_input_count 填 0 的话，则说明设备不支持 HDMI IN，


s ease-in-out infinite;
}

@keyframes memory-wave {
  0%, 100% {
    filter: hue-rotate(0deg) brightness(1);
  }
  50% {
    filter: hue-rotate(10deg) brightness(1.1);
  }
}

.neural-consciousness-container[data-phase="synthesis"] {
  animation: synthesis-weave 4s ease-in-out infinite;
}

@keyframes synthesis-weave {
  0%, 100% {
    filter: hue-rotate(0deg) contrast(1);
  }
  25% {
    filter: hue-rotate(-10deg) contrast(1.1);
  }
  75% {
    filter: hue-rotate(10deg) contrast(1.1);
  }
}

.neural-consciousness-container[data-phase="classification"] {
  animation: classification-spark 2s ease-in-out infinite;
}

@keyframes classification-spark {
  0%, 100% {
    filter: brightness(1) contrast(1);
  }
  50% {
    filter: brightness(1.3) contrast(1.2);
  }
}

.neural-consciousness-container[data-phase="generator"] {
  animation: generator-burst 4s ease-in-out infinite;
  background: linear-gradient(135deg,
    rgba(25, 15, 45, 0.9) 0%,
    rgba(15, 10, 35, 0.95) 50%,
    rgba(10, 5, 25, 1) 100%);
}

@keyframes generator-burst {
  0%, 100% {
    filter: hue-rotate(0deg) saturate(1);
  }
  25% {
    filter: hue-rotate(90deg) saturate(1.5);
  }
  50% {
    filter: hue-rotate(180deg) saturate(2);
  }
  75% {
    filter: hue-rotate(270deg) saturate(1.5);
  }
}

.neural-consciousness-container[data-phase="refiner"] {
  animation: refiner-crystallize 3s ease-in-out infinite;
  background: linear-gradient(135deg,
    rgba(35, 25, 15, 0.9) 0%,
    rgba(25, 20, 10, 0.95) 50%,
    rgba(15, 10, 5, 1) 100%);
}

@keyframes refiner-crystallize {
  0%, 100% {
    filter: brightness(1) contrast(1);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    filter: brightness(1.2) contrast(1.3);
    box-shadow: 0 4px 40px rgba(255, 215, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

.neural-consciousness-container[data-phase="validator"] {
  animation: validator-scan 2s linear infinite;
  background: linear-gradient(135deg,
    rgba(15, 25, 20, 0.9) 0%,
    rgba(10, 20, 15, 0.95) 50%,
    rgba(5, 10, 10, 1) 100%);
}

@keyframes validator-scan {
  0% {
    background: linear-gradient(135deg,
      rgba(15, 25, 20, 0.9) 0%,
      rgba(10, 20, 15, 0.95) 50%,
      rgba(5, 10, 10, 1) 100%);
  }
  50% {
    background: linear-gradient(135deg,
      rgba(20, 35, 25, 0.9) 0%,
      rgba(15, 25, 20, 0.95) 50%,
      rgba(10, 15, 15, 1) 100%);
  }
  100% {
    background: linear-g


/* SPDX-License-Identifier: GPL-2.0 */

#ifndef XENBUS_H__
#define XENBUS_H__

#include <xen/interface/xen.h>
#include <xen/interface/io/xenbus.h>

typedef unsigned long xenbus_transaction_t;
#define XBT_NIL ((xenbus_transaction_t)0)

extern u32 xenbus_evtchn;

/* Initialize the XenBus system. */
void init_xenbus(void);
/* Finalize the XenBus system. */
void fini_xenbus(void);

/**
 * xenbus_read() - Read the value associated with a path.
 *
 * Returns a malloc'd error string on failure and sets *value to NULL.
 * On success, *value is set to a malloc'd copy of the value.
 */
char *xenbus_read(xenbus_transaction_t xbt, const char *path, char **value);

char *xenbus_wait_for_state_change(const char *path, XenbusState *state);
char *xenbus_switch_state(xenbus_transaction_t xbt, const char *path,
			  XenbusState state);

/**
 * xenbus_write() - Associates a value with a path.
 *
 * Returns a malloc'd error string on failure.
 */
char *xenbus_write(xenbus_transaction_t xbt, const char *path,
		   const char *value);

/**
 * xenbus_rm() - Removes the value associated with a path.
 *
 * Returns a malloc'd error string on failure.
 */
char *xenbus_rm(xenbus_transaction_t xbt, const char *path);

/**
 * xenbus_ls() - List the contents of a directory.
 *
 * Returns a malloc'd error string on failure and sets *contents to NULL.
 * On success, *contents is set to a malloc'd array of pointers to malloc'd
 * strings. The array is NULL terminated. May block.
 */
char *xenbus_ls(xenbus_transaction_t xbt, const char *prefix, char ***contents);

/**
 * xenbus_get_perms() - Reads permissions associated with a path.
 *
 * Returns a malloc'd error string on failure and sets *value to NULL.
 * On success, *value is set to a malloc'd copy of the value.
 */
char *xenbus_get_perms(xenbus_transaction_t xbt, const char *path, char **value);

/**
 * xenbus_set_perms() - Sets the permissions associated with a path.
 *
 * Returns a malloc'd error string on failure.
 */
char *xenbus_set_perms(xenbus_transaction_t xbt, const char *path, domid_t dom,
		       char perm);

/**
 * xenbus_transaction_start() - Start a xenbus transaction.
 *
 * Returns the transaction in xbt on success or a malloc'd error string
 * otherwise.
 */
char *xenbus_transaction_start(xenbus_transaction_t *xbt);

/**
 * xenbus_transaction_end() - End a xenbus transaction.
 *
 * Returns a malloc'd error string if it fails. Abort says whether the
 * transaction should be aborted.
 * Returns 1 in *retry if the transaction should be retried.
 */
char *xenbus_transaction_end(xenbus_transaction_t xbt, int abort,
			     int *retry);

/**
 * xenbus_read_integer() - Read path and parse it as an integer.
 *
 * Returns -1 on error.
 */
int xenbus_read_integer(const char *path);

/**
 * xenbus_read_uuid() - Read path and parse it as 16 byte uuid.
 *
 * Returns 1 if read and parsing were successful, 0 if not
 */
int xenbus_read_uuid(const char *path, unsigned char uuid[16]);

/**
 * xenbus_printf() - Contraction of snprintf and xenbus_write(path/node).
 */
char *xenbus_printf(xenbus_transaction_t xbt,
		    const char *node, const char *path,
		    const char *fmt, ...)
	__attribute__((__format__(printf, 4, 5)));

/**
 * xenbus_get_self_id() - Utility function to figure out our domain id
 */
domid_t xenbus_get_self_id(void);

#endif /* XENBUS_H__ */


#include "FLA_lapack2flame_return_defs.h"
#include "FLA_f2c.h"
static int c__1 = 1;
static int c_n1 = -1;

int sgehrd_check(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *lwork, int *info)
{
    /* System generated locals */
    int a_dim1, a_offset, i__1, i__2;
    /* Local variables */
    int i__;
    int nb, nh;
    int lwkopt;
    logical lquery;

    /* Parameter adjustments */
    a_dim1 = *lda;
    a_offset = 1 + a_dim1;
    a -= a_offset;
    --tau;
    --work;
    /* Function Body */
    *info = 0;
    /* Computing MIN */
    i__1 = 64;
    i__2 = ilaenv_(&c__1, "SGEHRD", " ", n, ilo, ihi, &c_n1); // , expr subst
    nb = min(i__1,i__2);
    lwkopt = *n * nb;
    work[1] = (float) lwkopt;
    lquery = *lwork == -1;
    if (*n < 0)
    {
        *info = -1;
    }
    else if (*ilo < 1 || *ilo > max(1,*n))
    {
        *info = -2;
    }
    else if (*ihi < min(*ilo,*n) || *ihi > *n)
    {
        *info = -3;
    }
    else if (*lda < max(1,*n))
    {
        *info = -5;
    }
    else if (*lwork < max(1,*n) && ! lquery)
    {
        *info = -8;
    }
    if (*info != 0)
    {
        i__1 = -(*info);
        xerbla_("SGEHRD", &i__1);
        return LAPACK_FAILURE;
    }
    else if (lquery)
    {
        return LAPACK_QUERY_RETURN;
    }
    /* Set elements 1:ILO-1 and IHI:N-1 of TAU to zero */
    i__1 = *ilo - 1;
    for (i__ = 1;
            i__ <= i__1;
            ++i__)
    {
        tau[i__] = 0.f;
        /* L10: */
    }
    i__1 = *n - 1;
    for (i__ = max(1,*ihi);
            i__ <= i__1;
            ++i__)
    {
        tau[i__] = 0.f;
        /* L20: */
    }
    /* Quick return if possible */
    nh = *ihi - *ilo + 1;
    if (nh <= 1)
    {
        work[1] = 1.f;
        return LAPACK_QUICK_RETURN;
    }
    return LAPACK_SUCCESS;
}


IntObjectPair<String>> res = test.search(filename);

			if (res.size() > 1) {
				for (final IntObjectPair<String> k : res) {
					if (k.second.toString().equals(filename.toString()))
						continue;

					final DefaultWeightedEdge edge = graph.addEdge(filename.toString(), k.second);
					if (edge != null)
						graph.setEdgeWeight(edge, k.first);
				}
			}
		}

		final ConnectivityInspector<String, DefaultWeightedEdge> conn = new ConnectivityInspector<String, DefaultWeightedEdge>(
				graph);
		final List<Set<String>> sets = conn.connectedSets();

		for (final Set<String> s : sets) {
			System.out.println(s);
		}
	}
}
/**
 * Copyright (c) 2011, The University of Southampton and the individual contributors.
 * All rights reserved.
 *
 * 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 the University of Southampton 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 org.openimaj.demos.sandbox;

import java.io.File;
import java.io.IOException;
import java.util.List;

import org.openimaj.feature.local.list.FileLocalFeatureList;
import org.openimaj.feature.local.matcher.MatchingUtilities;
import org.openimaj.feature.local.matcher.quantised.BasicQuantisedKeypointMatcher;
import org.openimaj.image.DisplayUtilities;
import org.openimaj.image.ImageUtilities;
import org.openimaj.image.MBFImage;
import org.openimaj.image.colour.RGBColour;
import org.openimaj.image.feature.local.keypoints.quantised.QuantisedKeypoint;
import org.openimaj.util.pair.Pair;

public class QuantisedAffinePlay {
	static String imageRoot = "/Users/ss/Development/data/ukbench/smvs/images";
	static String quantisedRoot = "/Users/ss/Development/data/ukbench/smvs/quantised";

	public static void main(String[] args) throws IOException {
		String query = "/query/landmarks/Query/001.jpg";
		String database = "/database/landmarks/Reference/001.jpg";

		FileLocalFeatureList<QuantisedKeypoint> queryKP = FileLocalFeatureList.read(new File(quantisedRoot,query),QuantisedKeypoint.class);
		FileLocalFeatureList<QuantisedKeypoint> databaseKP = FileLocalFeatureList.read(new File(quantisedRoot,database),QuantisedKeypoint.class);

		MBFImage queryImg = ImageUtilities.readMBF(new File(imageRoot,query));
		MBFImage databaseImg = ImageUtilitie


State::Bank2 => 0x8000,
        BankingState::Bank3 => 0xc000,
    };
}

pub struct MemoryView<T> {
    pub banking_state: BankingState,
    char_rom: ROM<T>,
    ram: R2C<RAM>,
    color_ram: R2C<ColorRAM>,
}

#[derive(Clone, Copy, Debug, enum_map::Enum, PartialEq, Eq)]
pub enum BankingState {
    Bank0,
    Bank1,
    Bank2,
    Bank3,
}

impl<T: AsRef<[u8]>> MemoryView<T> {
    pub fn new(char_rom: ROM<T>, ram: R2C<RAM>, color_ram: R2C<ColorRAM>) -> Self {
        MemoryView { banking_state: BankingState::Bank0, char_rom, ram, color_ram }
    }

    pub fn read(&self, addr: U14) -> U12 {
        let color = {
            let color_idx = u16::from(addr) & 0b11_1111_1111;
            U4(self.color_ram.borrow().read(color_idx) & 0b1111)
        };
        let data = self.read_data(addr);
        U12::from((color, data))
    }

    #[inline]
    pub fn read_data(&self, addr: U14) -> u8 {
        if self.char_rom_is_mapped() && CHAR_ROM_BEGIN <= addr && addr - CHAR_ROM_BEGIN < CHAR_ROM_LEN {
            self.char_rom.read(u16::from(addr - CHAR_ROM_BEGIN))
        } else {
            self.ram.borrow().read(addr + RAM_OFFSET_MAP[self.banking_state])
        }
    }

    fn char_rom_is_mapped(&self) -> bool {
        use BankingState::*;
        self.banking_state == Bank0 || self.banking_state == Bank2
    }
}
use super::local_ip::ServerConfig;
use std::collections::HashMap;

// use this instead of `dotenv` because of the conflict
// when double clicking the app to launch in MacOS,
// dotenv doesn't work properly.
pub struct RocketEnv<'a> {
    pub vars: HashMap<&'a str, &'a str>,
}

impl<'a> RocketEnv<'a> {
    #[cfg(not(debug_assertions))]
    pub fn setup(config: &ServerConfig) {
        let ip_str = config.ip.to_string();
        let port_str = config.port.to_string();
        let tls_str;

        let mut vars = HashMap::new();
        vars.insert("ROCKET_ADDRESS", &ip_str[..]);
        vars.insert("ROCKET_PORT", &port_str[..]);
        vars.insert("ROCKET_WORKERS", "8");
        vars.insert("ROCKET_KEEP_ALIVE", "4");
        vars.insert("ROCKET_LOG_LEVEL", "off");
        vars.insert("ROCKET_LIMITS", "{file=\"8 MiB\"}");
        if config.certs.is_some() && config.key.is_some() {
            tls_str = config.get_tls_str();
            vars.insert("ROCKET_TLS", &tls_str);
        }

        let env = RocketEnv { vars };
        env.set_var();
    }

    #[cfg(debug_assertions)]
    pub fn setup(config: &ServerConfig) {
        let ip_str = config.ip.to_string();
        let port_str = config.port.to_string();
        let tls_str;

        let mut vars = HashMap::new();
        vars.insert("ROCKET_ADDRESS", &ip_str[..]);
        vars.insert("ROCKET_PORT", &port_str[..]);
        vars.insert("ROCKET_WORKERS", "2");
        vars.insert("ROCKET_


Z.ConstValue.Pivot.OnPivotUnlock, self.setMapAreaMask, self)
  Z.EventMgr:Add(Z.ConstValue.Screen.UIResolutionChange, self.onScreenResolutionChange, self)
  Z.EventMgr:Add(Z.ConstValue.PathFinding.onStageChange, self.onPathFindingStageChange, self)
end

function Map_mainView:switchMapMode()
  if self.isSwitching then
    return
  end
  self.isSwitching_ = true
  self.uiBinder.slider_zoom.enabled = false
  self.uiBinder.comp_double_touch.enabled = false
  Z.UIMgr:FadeIn({
    TimeOut = 5,
    IsInstant = true,
    OpenAnimType = Z.DOTweenAnimType.Tween_0
  })
  self:CloseRightSubView()
  self:CloseLeftSubView()
  if self.curMapMode_ == E.MapMode.Area then
    self.uiBinder.comp_mini_map_base:SwitchSceneMap(self.selectScene_)
  else
    self.uiBinder.comp_mini_map_base:SwitchWorldMap()
  end
end

function Map_mainView:switchAreaMap(targetSceneId)
  self.curMapMode_ = E.MapMode.Area
  self.selectScene_ = targetSceneId or self.selectScene_
  for index, sceneId in ipairs(self.selectableSceneList_) do
    if sceneId == self.selectScene_ then
      self.uiBinder.drop_down.value = index - 1
      break
    end
  end
  self:switchMapMode()
end

function Map_mainView:switchWorldMap()
  if not self.isCanSwitchWorldMap_ then
    return
  end
  self.curMapMode_ = E.MapMode.World
  if self.lastMapAnchorPos_ == nil then
    local info = self.worldMapInfoDict_[self.selectScene_]
    local posX = info and info.PosX or 0
    local posY = info and info.PosY or 0
    self.lastMapAnchorPos_ = {
      -posX * self.curScale_,
      -posY * self.curScale_
    }
  end
  self:switchMapMode()
end

function Map_mainView:switchAreaMapWithRevert(sceneId)
  Z.AudioMgr:Play("UI_Event_MapIn")
  self.adjustZoomValueDirty_ = true
  self.lastMapZoomValue_ = self.uiBinder.slider_zoom.value
  local lastAnchorX, lastAnchorY = self.uiBinder.trans_map_bg:GetAnchorPosition(nil, nil)
  self.lastMapAnchorPos_ = {lastAnchorX, lastAnchorY}
  self:switchAreaMap(sceneId)
end

function Map_mainView:checkSceneUnlock(sceneId)
  if self.sceneVM_.CheckSceneUnlock(sceneId, false) then
    return true
  else
    self:SwitchRightSubView(E.MapSubViewType.SceneLock, {sceneId = sceneId})
    return false
  end
end

function Map_mainView:getCenterMapSceneId()
  local centerPointerPos = Vector2.New(UnityEngine.Screen.width * 0.5, UnityEngine.Screen.height * 0.5)
  return self:getSceneIdByScreenPosition(centerPointerPos)
end

function Map_mainView:getSceneIdByScreenPosition(screenPosition)
  local isSuccess, localPos = ZTransformUtility.ScreenPointToLocalPointInRectangle(self.uiBinder.trans_map_bg, screenPosition, nil)
  if isSuccess then
    local x, y = self.uiBinder.trans_map_bg:GetSizeDelta(nil, nil)
    local clickPosX = localPos.x + x * 0.5
    local clickPosY = localPos.y + y * 0.5
    local ratioX = clickPosX / x
    local ratioY = clickPosY / y
    if 0 < ratioX and 0 < ratioY then
      local result, areaIndex = Z.MiniMapManager:GetWorldMapBitIndex(ratioX, rat


/* SPDX-License-Identifier: GPL-2.0-only */

/* Include memcmp() source code and alter its name to compare results with libc memcmp() */
#define memcmp cb_memcmp

#include "../lib/memcmp.c"

#undef cb_memcmp

#include <tests/test.h>
#include <string.h>

const char test_data1[] = "TEST_DATA @4321 !@#$%^&*\\/";
const size_t test_data1_sz = sizeof(test_data1);

const char test_data2[] = "TEST_DATA @8765 !@#$%^&*\\/";
const char test_data2_sz = sizeof(test_data2);

static void test_data_correctness(void **state)
{
	assert_int_equal(sizeof(test_data1), test_data1_sz);
	assert_int_equal(sizeof(test_data2), test_data2_sz);
	assert_int_equal(test_data1_sz, test_data2_sz);
}

static void test_memcmp_equal(void **state)
{
	const int res_cb = cb_memcmp(test_data1, test_data1, test_data1_sz);
	const int res_std = memcmp(test_data1, test_data1, test_data1_sz);

	assert_int_equal(0, res_cb);
	assert_int_equal(res_cb, res_std);
}

static void test_memcmp_first_not_matching_lower(void **state)
{
	const int res_cb = cb_memcmp(test_data1, test_data2, test_data1_sz);
	const int res_std = memcmp(test_data1, test_data2, test_data1_sz);

	assert_true(res_cb < 0);
	assert_int_equal(res_cb, res_std);
}

static void test_memcmp_first_not_matching_higher(void **state)
{
	const int res_cb = cb_memcmp(test_data2, test_data1, test_data1_sz);
	const int res_std = memcmp(test_data2, test_data1, test_data1_sz);

	assert_true(res_cb > 0);
	assert_int_equal(res_cb, res_std);
}

static void test_memcmp_zero_size(void **state)
{
	const int res_cb = cb_memcmp(test_data1, test_data2, 0);
	const int res_std = memcmp(test_data1, test_data2, 0);

	assert_int_equal(0, res_cb);
	assert_int_equal(res_cb, res_std);
}

int main(void)
{
	const struct CMUnitTest tests[] = {
		cmocka_unit_test(test_data_correctness),
		cmocka_unit_test(test_memcmp_equal),
		cmocka_unit_test(test_memcmp_first_not_matching_lower),
		cmocka_unit_test(test_memcmp_first_not_matching_higher),
		cmocka_unit_test(test_memcmp_zero_size),
	};

	return cb_run_group_tests(tests, NULL, NULL);
}


自己的第壹頭寵物。"}, {"與多蘭納爾的達紮拉談壹談。"}},
[6722] = {"獵人之道", {"妳好，年輕的獵人。看起來妳已經準備好要馴服壹頭野獸，並將其訓練成自己的同伴了。","妳必須去見壹見多蘭納爾的達紮拉，他可以幫助妳馴服自己的第壹頭寵物。"}, {"與多蘭納爾的達紮拉談壹談。"}},
[6741] = {"取之於敵", nil, nil},
[6761] = {"新的邊疆", {"我已經讓我的助手瑪斯雷·馭熊者來處理月光林地求援的事宜了。去跟他談談吧——不要找我。","不過我要給妳壹些……友好的建議。是我領導著大家走出了黑暗，不是月光林地的塞納裏奧議會。我們曾經陷入了壹無所有的困境，但是泰達希爾給了我們新的生命！他們會努力讓妳相信他們那套鬼扯，如果妳真的相信了他們，那妳無疑是個蠢貨。","妳自己來決定是不是要當壹個傻瓜吧。"}, {"與達納蘇斯的塞納裏奧區的瑪斯雷·馭熊者談壹談。"}},
[6762] = {"拉比恩·薩圖納", {"這個任務的內容是這樣的，守護者雷姆洛斯在月光林地的總管——拉比恩·薩圖納——正在征集願意去探索塔納利斯沙漠以及安戈洛爾環形山地區的冒險者，他就住在月光林地的永夜港裏。","雖然妳的工作會對我們都有好處，但是我建議妳仍然要小心行事，達納蘇斯和月光林地之間的關系最近有些緊張……而且可能會越來越緊張。"}, {"與月光林地永夜港的拉比恩·薩圖納談壹談。月光林地在費伍德森林和冬泉谷之間，可以從木喉要塞中的壹條通道抵達那裏。"}},
[6781] = {"護甲碎片", nil, nil},
[6801] = {"冰雪之王洛克霍拉", nil, nil},
[6804] = {"被囚禁的水元素", {"壹支水元素偵查部隊被派往洛丹倫的東瘟疫之地，但是那裏的瘟疫把它們感染


#include "master.h"
#include "config.h"
#include "worker.h"
#include "logger.h"

#include <unistd.h>
#include <signal.h>

struct worker {
    int pid;
};

typedef struct worker s_worker;

int run_master() {
    long nworkers = read_config_long("maxNumWorkers", "1");
    s_worker workers[nworkers];

    long numCPU = sysconf(_SC_NPROCESSORS_ONLN); //Only run on max on number of user processors
    if(nworkers > numCPU) nworkers = numCPU;

    //Create workers
    for(long i=0; i<nworkers; i++) {
        workers[i].pid = create_worker();
        if(workers[i].pid > 0)
            message_log("Created new worker", DEBUG);
        else {
            message_log("There was an error during worker creation, aborting...", ERR);
            break;
        }
    }

    //Shutdown master on any interrupt signal
    sigset_t sigset;
    sigemptyset(&sigset);
    sigaddset(&sigset, SIGTERM);
    sigaddset(&sigset, SIGINT);
    sigaddset(&sigset, SIGKILL);

    /**
     * TODO: make any specific master loop here
     */

    //Wait for shutdown signal
    int result;
    sigwait(&sigset, &result);

    /**
     * We should shutdown workers now
     */
    for(long i=0; i<nworkers; i++) {
        shutdown_worker(workers[i].pid);
        message_log("Shutdown worker", DEBUG);
    }

    return 0;
}


3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path>
			</svg>

Let's start from the simplest case - what happens when one attempts to establish a connection to a server which discards inbound SYN packets?

The scripts used here are available on our GitHub.

$ sudo ./test-syn-sent.py
			# all packets dropped
			00:00.000 IP host.2 > host.1: Flags [S] # initial SYN

			State Recv-Q Send-Q Local:Port Peer:Port
			SYN-SENT 0 1 host:2 host:1 timer:(on,940ms,0)

			00:01.028 IP host.2 > host.1: Flags [S] # first retry
			00:03.044 IP host.2 > host.1: Flags [S] # second retry
			00:07.236 IP host.2 > host.1: Flags [S] # third retry
			00:15.427 IP host.2 > host.1: Flags [S] # fourth retry
			00:31.560 IP host.2 > host.1: Flags [S] # fifth retry
			01:04.324 IP host.2 > host.1: Flags [S] # sixth retry
			02:10.000 connect ETIMEDOUT

Ok, this was easy. After the connect() syscall, the operating system sends a SYN packet. Since it didn't get any response the OS will by default retry sending it 6 times. This can be tweaked by the sysctl:

$ sysctl net.ipv4.tcp_syn_retries
			net.ipv4.tcp_syn_retries = 6

It's possible to overwrite this setting per-socket with the TCP_SYNCNT setsockopt:

setsockopt(sd, IPPROTO_TCP, TCP_SYNCNT, 6);

The retries are staggered at 1s, 3s, 7s, 15s, 31s, 63s marks (the inter-retry time starts at 2s and then doubles each time). By default, the whole process takes 130 seconds, until the kernel gives up with the ETIMEDOUT errno. At this moment in the lifetime of a connection, SO_KEEPALIVE settings are ignored, but TCP_USER_TIMEOUT is not. For example, setting it to 5000ms, will cause the following interaction:

$ sudo ./test-syn-sent.py 5000
			# all packets dropped
			00:00.000 IP host.2 > host.1: Flags [S] # initial SYN

			State Recv-Q Send-Q Local:Port Peer:Port
			SYN-SENT 0 1 host:2 host:1 timer:(on,996ms,0)

			00:01.016 IP host.2 > host.1: Flags [S] # first retry
			00:03.032 IP host.2 > host.1: Flags [S] # second retry
			00:05.016 IP host.2 > host.1: Flags [S] # what is this?
			00:05.024 IP host.2 > host.1: Flags [S] # what is this?
			00:05.036 IP host.2 > host.1: Flags [S] # what is this?
			00:05.044 IP host.2 > host.1: Flags [S] # what is this?
			00:05.050 connect ETIMEDOUT</p


a biru
2. **Theme 2 (Meta Style)**: QRIS dengan aksen warna meta

### Contoh Penggunaan Tema

```javascript
const { QRISGenerator } = require('autoft-qris');
const fs = require('fs');

const config = {
    storeName: 'Nama Toko Contoh',
    auth_username: '#',
    auth_token: '#',
    baseQrString: '#',
    logoPath: './logo-agin.png'
};

const qrGenerator1 = new QRISGenerator(config, 'theme1');
const qrString1 = qrGenerator1.generateQrString(50000);
const qrBuffer1 = await qrGenerator1.generateQRWithLogo(qrString1);
fs.writeFileSync('qris-theme1.png', qrBuffer1);

const qrGenerator2 = new QRISGenerator(config, 'theme2');
const qrString2 = qrGenerator2.generateQrString(50000);
const qrBuffer2 = await qrGenerator2.generateQRWithLogo(qrString2);
fs.writeFileSync('qris-theme2.png', qrBuffer2);

const qrGenerator = new QRISGenerator(config, 'theme1');
qrGenerator.setTheme('theme2');

const themes = QRISGenerator.getAvailableThemes();
console.log(themes);
```

## Penggunaan Complete Example

```javascript
const { QRISGenerator, PaymentChecker, ReceiptGenerator } = require('autoft-qris');
const fs = require('fs');

const config = {
    storeName: 'Nama Toko Contoh',
    auth_username: '#',
    auth_token: '#',
    baseQrString: '#',
    logoPath: './logo-agin.png'
};

const qrisGen = new QRISGenerator(config, 'theme1');
const paymentChecker = new PaymentChecker({
    auth_token: config.auth_token,
    auth_username: config.auth_username
});
const receiptGen = new ReceiptGenerator(config);

async function main() {
    try {
        console.log('=== TEST REALTIME QRIS PAYMENT ===\n');
        const randomAmount = Math.floor(Math.random() * 99) + 1;
        const amount = 100 + randomAmount;
        const reference = 'REF' + Date.now();

        const qrString = qrisGen.generateQrString(amount);
        const qrBuffer = await qrisGen.generateQRWithLogo(qrString);
        fs.writeFileSync('qr.png', qrBuffer);

        console.log('=== TRANSACTION DETAILS ===');
        console.log('Reference:', reference);
        console.log('Amount:', amount);
        console.log('QR Image:', 'qr.png');
        console.log('\nSilakan scan QR code dan lakukan pembayaran');
        console.log('\nMenunggu pembayaran...\n');

        const startTime = Date.now();
        const timeout = 5 * 60 * 1000;

        while (Date.now() - startTime < timeout) {
            const result = await paymentChecker.checkPaymentStatus(reference, amount);
            if (result.success && result.data.status === 'PAID') {
                console.log('✓ Pembayaran berhasil!');

                const receipt = await receiptGen.generateReceipt(result.data);
                console.log('✓ Bukti transaksi:', receipt.filePath);
                return;
            }
            await new Promise(resolve => setTimeout(resolve, 3000));
            console.log('Menunggu pembayaran...');
        }
        throw new Error('Timeout: Pembayaran tidak diterima dalam 5 menit');
    } catch (error) {
        console.error('Error:', error.m


, $0a
	.word @song5ref1223
	.byte $41, $0c
	.word @song5ref1221
	.byte $41, $0c
	.word @song5ref1221
	.byte $41, $0c
	.word @song5ref1221
	.byte $41, $0c
	.word @song5ref1221
	.byte $41, $0c
	.word @song5ref1221
	.byte $41, $0c
	.word @song5re


Infrared => 120,
                LightMessageType::StateInfrared => 121,
                LightMessageType::SetInfrared => 122,
            },
        }
    }
}

#[derive(Debug, Clone, Copy)]
pub(crate) enum DeviceMessageType {
    GetService,
    StateService,
    GetHostInfo,
    StateHostInfo,
    GetHostFirmware,
    StateHostFirmware,
    GetWifiInfo,
    StateWifiInfo,
    GetWifiFirmware,
    StateWifiFirmware,
    GetPower,
    SetPower,
    StatePower,
    GetLabel,
    SetLabel,
    StateLabel,
    GetVersion,
    StateVersion,
    GetInfo,
    StateInfo,
    Acknowledgement,
    GetLocation,
    SetLocation,
    StateLocation,
    GetGroup,
    SetGroup,
    StateGroup,
    EchoRequest,
}

#[derive(Debug, Clone, Copy)]
pub(crate) enum LightMessageType {
    Get,
    SetColor,
    SetWaveform,
    SetWaveformOptional,
    State,
    GetPower,
    SetPower,
    StatePower,
    GetInfrared,
    StateInfrared,
    SetInfrared,
}
<gh_stars>1-10

Reši jednačine.

@repeat(4)@

@center@ @answ@ @hspacept(15)@ x =  @lib.check_number(result)@

@vspace@

@/repeat@

<filename>reverie-process/src/seccomp/notif.rs
/*
 * Copyright (c) Meta Platforms, Inc. and its affiliates.
 *
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree.
 */

#![allow(missing_docs)]

use syscalls::Errno;

use crate::fd::Fd;

use core::pin::Pin;
use core::task::{Context, Poll};
use std::io;
use std::os::unix::io::AsRawFd;
use tokio::io::unix::AsyncFd;
use tokio::io::Interest;

/// The format the BPF program executes over.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
#[repr(C)]
pub struct seccomp_data {
    /// The system call number.
    pub nr: i32,

    /// Indicates system call convention as an AUDIT_ARCH_* value.
    pub arch: u32,

    /// The instruction pointer at the time of the system call.
    pub instruction_pointer: u64,

    /// Up to 6 system call arguments  always stored as 64-bit values regardless
    /// of the architecture.
    pub args: [u64; 6],
}

#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
#[repr(C)]
pub struct seccomp_notif_sizes {
    seccomp_notif: u16,
    seccomp_notif_resp: u16,
    seccomp_data: u16,
}

/// An incoming seccomp notification.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
#[repr(C)]
pub struct seccomp_notif {
    /// This is a cookie for the notification. Each such cookie is guaranteed to
    /// be unique for the corresponding seccomp filter.
    ///
    ///  * The cookie can be used with the SECCOMP_IOCTL_NOTIF_ID_VALID ioctl(2)
    ///    operation.
    ///  * When returning a notification response to the kernel, the supervisor
    ///    must include the cookie value in the `seccomp_notif_resp` strucutre
    ///    that is specified as the argument of the `SECCOMP_IOCTL_NOTIF_SEND`
    ///    operation.
    pub id: u64,

    /// This is the thread ID of the target thread that triggered the
    /// notification event.
    pub pid: u32,

    /// This is a bit mask of flags providing further information on the event.
    /// In the current implementation, this field is always zero.
    pub flags: u32,

    /// This struct contains information abou tht esystem call that triggered
    /// the notification. This is the same structure that is passed to the
    /// seccomp filter. See `seccomp(2)` for details on this structure.
    pub data: seccomp_data,
}

pub const SECCOMP_USER_NOTIF_FLAG_CONTINUE: u32 = 1u32 << 0;

/// A response to a seccomp notification


185]: arr.cumsum()
Out[185]: array([ 0,  1,  3,  6, 10, 15, 21, 28])
```

在多维数组中，累加函数（如cumsum）返回的是同样大小的数组，但是会根据每个低维的切片沿着标记轴计算部分聚类：
```python
In [186]: arr = np.array([[0, 1, 2], [3, 4, 5], [6, 7, 8]])

In [187]: arr
Out[187]:
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])

In [188]: arr.cumsum(axis=0)
Out[188]:
array([[ 0,  1,  2],
       [ 3,  5,  7],
       [ 9, 12, 15]])

In [189]: arr.cumprod(axis=1)
Out[189]:
array([[  0,   0,   0],
       [  3,  12,  60],
       [  6,  42, 336]])
```

表4-5列出了全部的基本数组统计方法。后续章节中有很多例子都会用到这些方法。

![](http://upload-images.jianshu.io/upload_images/7178691-a6c6df3ca8e0b98e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

![](http://upload-images.jianshu.io/upload_images/7178691-866fcde885b1d357.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

## 用于布尔型数组的方法
在上面这些方法中，布尔值会被强制转换为1（True）和0（False）。因此，sum经常被用来对布尔型数组中的True值计数：
```python
In [190]: arr = np.random.randn(100)

In [191]: (arr > 0).sum() # Number of positive values
Out[191]: 42
```

另外还有两个方法any和all，它们对布尔型数组非常有用。any用于测试数组中是否存在一个或多个True，而all则检查数组中所有值是否都是True：
```python
In [192]: bools = np.array([False, False, True, False])

In [193]: bools.any()
Out[193]: True

In [194]: bools.all()
Out[194]: False
```

这两个方法也能用于非布尔型数组，所有非0元素将会被当做True。

## 排序
跟Python内置的列表类型一样，NumPy数组也可以通过sort方法就地排序：
```python
In [195]: arr = np.random.randn(6)

In [196]: arr
Out[196]: array([ 0.6095, -0.4938,  1.24  , -0.1357,  1.43  , -0.8469])

In [197]: arr.sort()

In [198]: arr
Out[198]: array([-0.8469, -0.4938, -0.1357,  0.6095,  1.24  ,  1.43  ])
```

多维数组可以在任何一个轴向上进行排序，只需将轴编号传给sort即可：
```python
In [199]: arr = np.random.randn(5, 3)

In [200]: arr
Out[200]:
array([


だれでも]'],
  ['WHO', 'World Health Organizationの略称 / 世界保健機関'],
  ['who\'d', 'who would (should),who had の短縮形'],
  ['who\'ll', 'who will, who shallの短縮形'],
  ['who\'re', 'who are の短縮形'],
  ['who\'s', 'who is, who has の短縮形'],
  ['who\'ve', 'who have の短縮形'],
  ['whoa', '(特に馬に対して)どおどお,止まれ(stop)'],
  ['whodunit', '推理(探偵(たんてい))小説(映画),ミステリーもの'],
  ['whoe\'er', '=whoever'],
  ['whoever', '《名詞節を導く関係代名詞》(先行詞を含む)…『する[ところの]だれでも』 / 《譲歩節を導く関係代名詞》『だれが…でも』 / 《疑問代名詞whoの強調形》《話》『いったいだれが』'],
  ['whole', '《the ~,one\'s ~ の形で名詞の前に用いて》『全体の』,全部の,全… / 《名詞の前にのみ用いて》(時間・距離などが)『まる』…,満… / (物が)完全な,欠けていない;《名詞の後に置いて》丸ごとで,ひとかたまりに / 《冠詞をつけずに複数名詞の前に用いて》ひじょうに多くの / 《古》(人が)無傷の,(肉体的に)健康な / 整数の,分数を含まない / 〈U〉《the ~》(…の)『全部』,全体,全量《+of+名》 / 〈C〉完全なもの,統一体'],
  ['whole meal', '=whole wheat'],
  ['whole milk', '(しぼったままの)全乳'],
  ['whole note', '全音,全音符《英》'],
  ['whole number', '整数(1,2,3…など)(integer)'],
  ['whole-wheat', '(ふすまを取り去らない)完全小麦粉の,あらい小麦粉の(《英》wholemeal)'],
  ['wholehearted', '心を込めた,心からの'],
  ['wholesale', '『卸し[売り]』 / 『卸し[売り]の』 / 『大規模な』,大量の,多量の / 卸し[売り]で;大量(多量)に / …‘を\'卸し売りする / (…の値段で)卸し売りされる《+at+名》'],
  ['wholesaler', '卸し売り業者'],
  ['wholesome', '『体によい』,健康によい;健康そうな / (特に道徳的に)『健全な』,ためになる'],
  ['wholesomeness', '体によいこと


373

	C# Example :

	Ped player = Game.Player.Character;
	Hash h = Function.Call<Hash>(Hash.GET_HASH_OF_MAP_AREA_AT_COORDS, player.Position.X, player.Position.Y, player.Position.Z);
</summary>
]]--
native "GET_HASH_OF_MAP_AREA_AT_COORDS"
	hash "0x7EE64D51E8498728"
	jhash (0xB5C5C99B)
	arguments {
		float "x",

		float "y",

		float "z",
	}
	returns	"Hash"

--[[!
<summary>
	Creates a rope at the specific position, that extends in the specified direction when not attached to any entities.
	__

	Add_Rope(pos.x,pos.y,pos.z,0.0,0.0,0.0,20.0,4,20.0,1.0,0.0,false,false,false,5.0,false,NULL)

	When attached, Position<vector> does not matter
	When attached, Angle<vector> does not matter

	Rope Type:
	4 and bellow is a thick rope
	5 and up are small metal wires
	0 crashes the game

	Max_length - Rope is forced to this length, generally best to keep this the same as your rope length.

	Rigid - If max length is zero, and this is set to false the rope will become rigid (it will force a specific distance, what ever length is, between the objects).

	breakable - Whether or not shooting the rope will break it.

	unkPtr - unknown ptr, always 0 in orig scripts
	__

	Lengths can be calculated like so:

	float distance = abs(x1 - x2) + abs(y1 - y2) + abs(z1 - z2); // Rope length

	NOTES:

	Rope does NOT interact with anything you attach it to, in some cases it make interact with the world AFTER it breaks (seems to occur if you set the type to -1).

	Rope will sometimes contract and fall to the ground like you'd expect it to, but since it doesn't interact with the world the effect is just jaring.
</summary>
]]--
native "ADD_ROPE"
	hash "0xE832D760399EB220"
	jhash (0xA592EC74)
	arguments {
		float "x",

		float "y",

		float "z",

		float "rotX",

		float "rotY",

		float "rotZ",

		float "length",

		int "ropeType",

		float "maxLength",

		float "minLength",

		float "p10",

		BOOL "p11",

		BOOL "p12",

		BOOL "rigid",

		float "p14",

		BOOL "breakWhenShot",

		AnyPtr "unkPtr",
	}
	returns	"Object"

native "DELETE_ROPE"
	hash "0x52B4829281364649"
	jhash (0x748D72AF)
	arguments {
		ObjectPtr "rope",
	}
	returns	"void"

native "DELETE_CHILD_ROPE"
	hash "0xAA5D6B1888E4DB20"
	jhash (0xB19B4706)
	arguments {
		Object "rope",
	}
	returns	"Any"

--[[!
<summary>
	Ptr is correct
</summary>
]]--
native "DOES_ROPE_EXIST"
	hash "0xFD5448BE3111ED96"
	jhash (0x66E4A3AC)
	arguments {
		ObjectPtr "rope",
	}
	returns	"BOOL"

native "ROPE_DRAW_SHADOW_ENABLED"
	hash


ck::Command;

pub fn parse(source: &[u8]) -> Result<Vec<Command>, ParseError> {
    let mut program = Vec::new();
    let mut index = 0;
    while index < source.len() {
        match source[index] {
            43 /* + */ => program.push(Command::Increment),
            44 /* , */ => program.push(Command::Read),
            45 /* - */ => program.push(Command::Decrement),
            46 /* . */ => program.push(Command::Write),
            60 /* < */ => program.push(Command::DecrementPointer),
            62 /* > */ => program.push(Command::IncrementPointer),
            91 /* [ */ => program.push(Command::JumpAhead),
            93 /* ] */ => program.push(Command::JumpBack),
            10 /* LF */ => { /* Accept, but ignore */},
            13 /* CR */ => { /* Accept, but ignore */},
            32 /* SPACE */ => { /* Accept, but ignore */ },
            _ => return Err(ParseError::UnknownCharacter(source[index])),
        }
        index += 1;
    }
    Ok(program)
}

pub enum ParseError {
    UnknownCharacter(u8),
}

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

    #[test]
    #[allow(non_snake_case)]
    fn should_parse_Increment() {
        let source = "+".as_bytes();

        if let Ok(program) = parse(&source) {
            assert_eq!(program.len(), 1);
            assert_eq!(program, vec!(Command::Increment));
        } else {
            assert!(false);
        }
    }

    #[test]
    #[allow(non_snake_case)]
    fn should_parse_Decrement() {
        let source = "-".as_bytes();

        if let Ok(program) = parse(&source) {
            assert_eq!(program.len(), 1);
            assert_eq!(program, vec!(Command::Decrement));
        } else {
            assert!(false);
        }
    }

    #[test]
    #[allow(non_snake_case)]
    fn should_parse_IncrementPointer() {
        let source = ">".as_bytes();

        if let Ok(program) = parse(&source) {
            assert_eq!(program.len(), 1);
            assert_eq!(program, vec!(Command::IncrementPointer));
        } else {
            assert!(false);
        }
    }

    #[test]
    #[allow(non_snake_case)]
    fn should_parse_DecrementPointer() {
        let source = "<".as_bytes();

        if let Ok(program) = parse(&source) {
            assert_eq!(program.len(), 1);
            assert_eq!(program, vec!(Command::DecrementPointer));
        } else {
            assert!(false);
        }
    }

    #[test]
    #[allow(non_snake_case)]
    fn should_parse_JumpAhead() {
        let source = "[".as_bytes();

        if let Ok(program) = parse(&source) {
            assert_eq!(program.len(), 1);
            assert_eq!(program, vec!(Command::JumpAhead));
        } else {
            assert!(false);
        }
    }

    #[test]
    #[allow(non_snake_case)]
    fn should_parse_JumpBack() {
        let source = "]".as_bytes();

        if let Ok(program) = parse(&source) {
            assert_eq!(program.len(), 1);
            assert_eq!(program, vec!(Command::JumpBack));
        } else {
            assert!(false);
        }
    }

    #[test]
    #[allow(non_snake_case)]
    fn should_parse_Write() {
        let source = ".".as_bytes();

        if let Ok(program) = parse(&source) {