ối mạng
  //     if (cartDataString != null && cartDataString.isNotEmpty) {
  //       Iterable l = json.decode(cartDataString);
  //       return List<Cart>.from(l.map((model) => Cart.fromJson(model)));
  //     }
  //   }

  //   return [];
  // }

  void saveCartData() async {
    List<Map<String, dynamic>> modifiedCartData = [];
    for (var cartItem in cartProducts) {
      var modifiedCartItem = {
        'cartID': cartItem.cartID,
        'userID': cartItem.userID,
        'product': cartItem.product.toJson(),
        'quantity': cartItem.quantity,
      };
      modifiedCartData.add(modifiedCartItem);
    }
    final cartData = jsonEncode(modifiedCartData);
    await SharedPreferencesPresenter.setCartData(cartData, widget.user.userID);
  }

  void updateProductQuantity(int cartIndex, int newQuantity) async {
    var connectivityResult = await (Connectivity().checkConnectivity());
    if (connectivityResult != ConnectivityResult.none) {
      Cart currentCart = cartProducts[cartIndex];
      if (newQuantity < 1) {
        return;
      }

      if (newQuantity > currentCart.product.quantity) {
        if (mounted) {
          setState(() {
            --newQuantity;
          });
        }
        ScaffoldMessenger.of(context).clearSnackBars();
        ScaffoldMessenger.of(context).showSnackBar(
          SnackBar(
            content: Text(
                'Số lượng không đủ, chỉ còn ${currentCart.product.quantity} sản phẩm'),
            backgroundColor: Colors.red,
            behavior: SnackBarBehavior.floating,
            margin: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
            shape: const RoundedRectangleBorder(
              borderRadius: BorderRadius.all(Radius.circular(4.0)),
            ),
          ),
        );
        return;
      }

      bool result = await CartPresenter.instance
          .updateCartQuantity(currentCart.cartID, newQuantity);

      if (result) {
        if (mounted) {
          setState(() {
            currentCart.quantity = newQuantity;
          });
        }
        log('Cập nhật số lượng thành công');
      } else {
        log('Cập nhật số lượng thất bại');
        return;
      }
    } else {
      if (mounted) {
        setState(() {
          --newQuantity;
        });
      }
      ScaffoldMessenger.of(context).showSnackBar(
        const SnackBar(
          content: Text('Lỗi kết nối'),
          backgroundColor: Colors.red,
          behavior: SnackBarBehavior.floating,
          margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.all(Radius.circular(4.0)),
          ),
        ),
      );
    }
  }

  void removeProductFromCart(int index) async {
    var connectivityResult = await (Connectivity().checkConnectivity());
    if (connectivityResult != ConnectivityResult.none) {
      int productID = cartProducts[index].product.productID;
      log(productID.toString());
      bool result =
          await CartPresenter.instance.removeProductFromCart(productID);
      if (result) {
        setState(() {
          cartProducts.removeAt(index);
        });
        log('Xóa thành công');
      } else {
        log('Xóa lỗi');
        ScaffoldMessenger.of(context).showSnackBar(
          const SnackBar(
            content: Text('Lỗi kết nối'),
            backgroundColor: Colors.red,
            behavior: SnackBarBehavior.floating,
            margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
            shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.all(Radius.circular(4.0)),
            ),
          ),
        );
        return;
      }
    } else {
      ScaffoldMessenger.of(context).showSnackBar(
        const Sn


ng topic_name = "/camera/rgb/image_raw";

  MagicSubscriber magic_subscriber_object;

  magic_subscriber_object.init<sensor_msgs::Image>(_n, topic_name);

  string vallue_string = "Adventure Time!";
  int value_integer = 42;
  magic_subscriber_object.PrintGeneric<int>(value_integer);
  magic_subscriber_object.PrintGeneric<string>(vallue_string);

  ros::spin();

  return 0;
}
//------------------------------------------------------------------------------------------------------------------------------
//catkin_ws/src/template_exercises/CMakeLists.txt
cmake_minimum_required(VERSION 3.0.2)
project(template_exercises)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  sensor_msgs
)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES template_exercises
  CATKIN_DEPENDS roscpp sensor_msgs
#  DEPENDS system_lib
)

include_directories(
 include
  ${catkin_INCLUDE_DIRS}
)

add_library(subscriber_basic_library
  src/subscriber_basic.cpp
)

## Create executables
add_executable(main_subscriber_basic_node src/main_subscriber_basic.cpp)

target_link_libraries(main_subscriber_basic_node
	subscriber_basic_library
	${catkin_LIBRARIES}
)

/*

For this exercise you will have to create a new ROS package called exercises_unit_2 that depends on roscpp and robot_commander.
Inside of it create a new empty file in the src directory called robot_position_as_array.cpp.

As mentioned, your program will make use of the RobotCommander class which is already provided to you and defined
within the robot_commander ROS package located inside ~/catkin_ws/src/modern_cpp_course.
To use this class you will have to add this line to your code: #include "robot_commander/robot_commander.h".

To get the current robot position it is important that you add this line of code to your source code file:

RobotCommander my_robot;

This will create an object called my_robot. Don't worry much about what objects are, this will be explained on an upcomming unit.
What is important for you is that you can use this syntax here to get the x,y,z position of the robot:

my_robot.get_x_position();
  my_robot.get_y_position();
  my_robot.get_z_position();

Tasks:

In your code you will have to:

    Create a standard C++ main function
    Initialize a ros node named "position_array" by calling ros::init(argc, argv, "position_array");
    Create an object of type RobotCommander as shown above
    Declare an array composed of 3 float values
    Proceed to populate the array with the robot's x position by using my_robot.get_x_position(); as shown above
    Get and populate the values for the y and z coordinates similarly
    Finally print the values of all elements of the array

cd ~/catkin_ws/src
catkin_create_pkg exercises_unit_2 roscpp robot_commander
touch ~/catkin_ws/src/exercises_unit_2/src/robot_position_as_array.cpp
*/
#include "robot_commander/robot_commander.h"
#include <ros/ros.h>

int main(int argc, char **argv) {
  ros::init(argc, argv, "position_array");

  RobotCommander my_robot;

  float my_array[3];
  my_array[0] = my_robot.get_x_position();
  my_array[1] = my_robot.get_y_position();
  my_array[2] = my_robot.get_z_position();

  for (int i = 0; i < 3; i++)
    std::cout <<


ing: MacProNode", self, " ran out of memory at time ", simx.get_now()
      return false
    end
  else
    if self.memory_footprint - size > self.memorysize then
      -- We are back to normal memory use
      print ("Warning: MacProNode"..self.." has recovered from swap mode "..self.engine.now)
      return true
    end
  end
end

return module


inline fun <reified T> Context.getFromCache(
        id: String, folderName: String = T::class.java.simpleName
    ): T? {
        val fileName = id.hashCode().toString()
        val cacheDir = cacheDir(this, folderName)
        val file = File(cacheDir, fileName)
        return if (file.exists()) runCatching {
            file.readText().toData<T>().getOrThrow()
        }.getOrNull() else null
    }
}
package dev.brahmkshatriya.echo.utils

import android.content.Context
import android.os.Build
import dev.brahmkshatriya.echo.BuildConfig
import dev.brahmkshatriya.echo.R
import dev.brahmkshatriya.echo.common.helpers.ContinuationCallback.Companion.await
import dev.brahmkshatriya.echo.common.models.Message
import dev.brahmkshatriya.echo.di.App
import dev.brahmkshatriya.echo.utils.ContextUtils.appVersion
import dev.brahmkshatriya.echo.utils.ContextUtils.getTempFile
import dev.brahmkshatriya.echo.utils.Serializer.toData
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import okhttp3.OkHttpClient
import okhttp3.Request
import okio.use
import java.io.File
import java.util.zip.ZipFile

object AppUpdater {

    private val client = OkHttpClient()

    @Suppress("KotlinConstantConditions")
    suspend fun updateApp(app: App): File? {
        val throwableFlow = app.throwFlow
        val messageFlow = app.messageFlow
        val githubRepo = app.context.getString(R.string.app_github_repo)
        val appType = BuildConfig.BUILD_TYPE
        val version = appVersion()

        val url = runCatching {
            when (appType) {
                "stable" -> {
                    val currentVersion = version.substringBefore('_')
                    val updateUrl = "https://api.github.com/repos/$githubRepo/releases"
                    getGithubUpdateUrl(currentVersion, updateUrl, client) ?: return null
                }

                "nightly" -> {
                    val hash = version.substringBefore("(").substringAfter('_')
                    val id = getGithubWorkflowId(hash, githubRepo, client) ?: return null
                    "https://nightly.link/$githubRepo/actions/runs/$id/artifact.zip"
                }

                else -> return null
            }
        }.getOrElse {
            throwableFlow.emit(it)
            return null
        }

        messageFlow.emit(
            Message(
                app.context.run {
                    getString(R.string.downloading_update_for_x, getString(R.string.app_name))
                }
            )
        )
        return runCatching {
            val download = downloadUpdate(app.context, url, client).getOrThrow()
            if (appType == "stable") download else unzipApk(download)
        }.getOrElse {
            throwableFlow.emit(it)
            return null
        }
    }

    private val githubRegex = Regex("https://api\\.github\\.com/repos/([^/]*)/([^/]*)/")
    suspend fun getGithubUpdateUrl(
        currentVersion: String,
        updateUrl: String,
        client: OkHttpClient
    ) = run {
        val (user, repo) = githubRegex.find(updateUrl)?.destructured
            ?: throw Exception("Invalid Github URL")
        val url = "https://api.github.com/repos/$user/$repo/releases/latest"
        val request = Request.Builder().url(url).build()
        val res = runCatching {
            client.newCall(request).await().use {
                it.body.string().toData<GithubReleaseResponse>()
            }.getOrThrow()


 pos = self.mem_read(self.program_counter);
               let addr = pos.wrapping_add(self.register_y) as u16;
               addr
           }

           AddressingMode::Absolute_X => {
               let base = self.mem_read_u16(self.program_counter);
               let addr = base.wrapping_add(self.register_x as u16);
               addr
           }
           AddressingMode::Absolute_Y => {
               let base = self.mem_read_u16(self.program_counter);
               let addr = base.wrapping_add(self.register_y as u16);
               addr
           }

           AddressingMode::Indirect_X => {
               let base = self.mem_read(self.program_counter);

               let ptr: u8 = (base as u8).wrapping_add(self.register_x);
               let lo = self.mem_read(ptr as u16);
               let hi = self.mem_read(ptr.wrapping_add(1) as u16);
               (hi as u16) << 8 | (lo as u16)
           }

           AddressingMode::Indirect_Y => {
               let base = self.mem_read(self.program_counter);

               let lo = self.mem_read(base as u16);
               let hi = self.mem_read((base as u8).wrapping_add(1) as u16);
               let deref_base = (hi as u16) << 8 | (lo as u16);
               let deref = deref_base.wrapping_add(self.register_y as u16);
               deref
           }

           AddressingMode::NoneAddressing => {
               panic!("Addressing mode {:?} is not supported", mode);
           }
       }
   }

   /* Stack logic */
   fn stack_pop(&mut self) -> u8 {
       self.stack_pointer = self.stack_pointer.wrapping_add(1);
       self.mem_read((STACK as u16) + self.stack_pointer as u16)
   }

   fn stack_push(&mut self, data: u8) {
       self.mem_write((STACK as u16) + self.stack_pointer as u16, data);
       self.stack_pointer = self.stack_pointer.wrapping_sub(1)
   }

   fn stack_push_u16(&mut self, data: u16) {
       let hi = (data >> 8) as u8;
       let lo = (data & 0xff) as u8;
       self.stack_push(hi);
       self.stack_push(lo);
   }

   fn stack_pop_u16(&mut self) -> u16 {
       let lo = self.stack_pop() as u16;
       let hi = self.stack_pop() as u16;

       hi << 8 | lo
   }

    pub fn reset(&mut self) {
        self.register_a = 0;
        self.register_x = 0;
        self.register_y = 0;
        self.status = 0;
        //self.memory = [0; 0xFFFF];
        self.stack_pointer = STACK_RESET;
        self.program_counter = self.mem_read_u16(0xFFFC);
    }

    pub fn load(&mut self, program: Vec<u8>) {
        for i in 0..(program.len() as u16) {
            self.mem_write(0x0600 + i, program[i as usize]);
        }
        self.mem_write_u16(0xFFFC, 0x0600);
    }

    pub fn load_and_run(&mut self, program: Vec<u8>) {
        self.load(program);
        self.reset();
        self.run()
    }

    pub fn run(&mut self) {
        self.run_with_callback(|_| {});
    }

    pub fn run_with_callback<F>(&mut self, mut callback: F)
    where
        F: FnMut(&mut CPU),
    {
        let ref opcodes: HashMap<u8, &'static opcodes::OpCode> = *opcodes::OPCODES_MAP;

        loop {
            let code = self.mem_read(self.program_counter);
            println!("> P


local Players = game:GetService("Players")
local RobloxReplicatedStorage = game:GetService("RobloxReplicatedStorage")
local VoiceChatService = game:GetService("VoiceChatService")
local SoundService = game:GetService("SoundService")
local CorePackages = game:GetService("CorePackages")
local AvatarChatService = game:GetService("AvatarChatService")

local GetFFlagAvatarChatServiceEnabled =
	require(CorePackages.Workspace.Packages.SharedFlags).GetFFlagAvatarChatServiceEnabled

local FFlagDebugLogVoiceDefault = game:DefineFastFlag("DebugLogVoiceDefault", false)
local FFlagSetNewDeviceToFalse = game:DefineFastFlag("SetNewDeviceToFalse", false)
local FFlagFixNewPlayerCheck = game:DefineFastFlag("FixNewPlayerCheck", false)
local FFlagOnlyMakeInputsForVoiceUsers = game:DefineFastFlag("OnlyMakeInputsForVoiceUsers", false)
local FFlagSendLikelySpeakingUsers = game:DefineFastFlag("SendLikelySpeakingUsers", false)
local FFlagReceiveLikelySpeakingUsersEvent = game:DefineFastFlag("ReceiveLikelySpeakingUsersEventV3", false)
local FFlagUseAudioInstanceAdded = game:GetEngineFeature("AudioInstanceAddedApiEnabled")

local function log(...)
	if FFlagDebugLogVoiceDefault then
		print("[VoiceDefault]", ...)
	end
end

local legacyVoiceCurve = {}
local MIN_DISTANCE = 7
local MAX_DISTANCE = 80
local CURVE_STEP_SIZE = 2
for i = MIN_DISTANCE, MAX_DISTANCE, CURVE_STEP_SIZE do
	legacyVoiceCurve[i] = ((i - MIN_DISTANCE) - (MAX_DISTANCE - MIN_DISTANCE))^2 / (MAX_DISTANCE - MIN_DISTANCE)^2
end
legacyVoiceCurve[MAX_DISTANCE] = 0

if GetFFlagAvatarChatServiceEnabled() then
	local ok: boolean, serverFeatures: number = pcall(AvatarChatService.GetServerFeaturesAsync, AvatarChatService)

	if not ok then
		log("Failed to get GetServerFeaturesAsync, returning early")
		return
	end

	local universeVoiceEnabled =
		AvatarChatService:IsEnabled(serverFeatures, Enum.AvatarChatServiceFeature.UniverseAudio)
	local placeVoiceEnabled = AvatarChatService:IsEnabled(serverFeatures, Enum.AvatarChatServiceFeature.PlaceAudio)

	if not universeVoiceEnabled or not placeVoiceEnabled then
		log("Universe or place not voice enabled, returning early")
		return
	end
end

type AudioDeviceConnections = {
	onPlayerChanged: RBXScriptConnection,
}
type AudioDeviceSet = { [AudioDeviceInput]: boolean }
local playerDevices: { [Player]: AudioDeviceSet } = {}
local audioDevices: { [AudioDeviceInput]: AudioDeviceConnections } = {}
local playerCharacterHandlers: { [Player]: RBXScriptConnection } = {}

local function upsertDeviceList(list: AudioDeviceSet?, element: AudioDeviceInput): AudioDeviceSet
	if list == nil then
		local set = {} :: AudioDeviceSet
		set[element] = true
		return set
	else
		list[element] = true
		return list
	end
end

local function addEmitterToHead(character): Instance
	-- TODO: Figure out why the AudioEmitter disappears from the workspace when we attach it to the head
	local parent = character -- character:FindFirstChild("Head") or character
	local emitter = Instance.new("AudioEmitter")
	emitter.Parent = parent
	emitter:AddTag("RbxDefaultVoiceEmitter")
	log("Adding emitter", emitter, " to ", parent)

	if VoiceChatService.DefaultDistanceAttenuation == Enum.VoiceChatDistanceAttenuationType.Legacy then
	    emitter:SetDistanceAttenuation(legacyVoiceCurve :: any)
	end
	return emitter
end

local function hookupDeviceInputToEmitter(character: Instance, input: Instance)
	-- Does this make sense for the player? This means that when AudioDeviceInstance.Player == LocalPlayer
	-- there's going to be a wire connecting their AudioDeviceIn


oproxyserver","wsmandisp/IWSManConnectionOptionsEx2::ProxyNoProxyServer"]
old-location: winrm\iwsmanconnectionoptionsex2_proxynoproxyserver.htm
tech.root: winrm
ms.assetid: 00613052-7428-4719-9a19-fc27541af07a
ms.date: 12/05/2018
ms.keywords: IWSManConnectionOptionsEx2 interface [Windows Remote Management],ProxyNoProxyServer method, IWSManConnectionOptionsEx2.ProxyNoProxyServer, IWSManConnectionOptionsEx2::ProxyNoProxyServer, ProxyNoProxyServer, ProxyNoProxyServer method [Windows Remote Management], ProxyNoProxyServer method [Windows Remote Management],IWSManConnectionOptionsEx2 interface, winrm.iwsmanconnectionoptionsex2_proxynoproxyserver, wsmandisp/IWSManConnectionOptionsEx2::ProxyNoProxyServer
req.header: wsmandisp.h
req.include-header:
req.target-type: Windows
req.target-min-winverclnt: Windows 7
req.target-min-winversvr: Windows Server 2008 R2
req.kmdf-ver:
req.umdf-ver:
req.ddi-compliance:
req.unicode-ansi:
req.idl: WSManDisp.idl
req.max-support:
req.namespace:
req.assembly:
req.type-library:
req.lib:
req.dll:
req.irql:
targetos: Windows
req.typenames:
req.redist: Windows Management Framework on Windows Server 2008 with SP2 and Windows Vista with SP2
ms.custom: 19H1
f1_keywords:
 - IWSManConnectionOptionsEx2::ProxyNoProxyServer
 - wsmandisp/IWSManConnectionOptionsEx2::ProxyNoProxyServer
dev_langs:
 - c++
topic_type:
 - APIRef
 - kbSyntax
api_type:
 - COM
api_location:
 - WSManDisp.h
api_name:
 - IWSManConnectionOptionsEx2.ProxyNoProxyServer
---

# IWSManConnectionOptionsEx2::ProxyNoProxyServer

## -description

Returns the value of the proxy access type flag WSManProxyNoProxyServer for use in the accessType parameter of the IWSManConnectionOptionsEx2::SetProxy method.

## -parameters

### -param value [out, retval]

Specifies the value of the constant.

## -returns

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

## -see-also

IWSManConnectionOptionsEx2---
UID: NF:olectl.OleLoadPictureFileEx
title: OleLoadPictureFileEx function (olectl.h)
description: Loads a picture from a file.
helpviewer_keywords: ["LP_COLOR","LP_DEFAULT","LP_MONOCHROME","LP_VGACOLOR","OleLoadPictureFileEx","OleLoadPictureFileEx function [Automation]","_oa96_OleLoadPictureFileEx","automat.oleloadpicturefileex","olectl/OleLoadPictureFileEx"]
old-location: automat\oleloadpicturefileex.htm
tech.root: automat
ms.assetid: 39a2c814-97f6-4157-8884-8b3f268d3f7f
ms.date: 12/05/2018


ble-chart-story-total",vV={id:"topic.summary.storyTotals.title",defaultMessage:"Filtered Story Count"},bV={id:"topic.summary.storyTotals.help.title",defaultMessage:"
Any filters you choose to apply will focus in on a smaller set of the stories within this topic.  Here you can see how many stories you are looking at, from the total stories within the topic.
"},wV={id:"topic.summary.storyTotals.help.into",defaultMessage:'
This bubble chart shows you how many stories from this Topic are included in the filters you have selected.  The "filtered" bubble is the number of stories included in your filters.  The "Total" bubble is the total stories within this topic.
'},EV={id:"topic.summary.storyTotals.filtered",defaultMessage:"Filtered"},xV={id:"topic.summary.storyTotals.total",defaultMessage:"Total"};const SV=In(bt((function(e){return{fetchStatus:e.topics.selected.summary.storyTotals.fetchStatus,counts:e.topics.selected.summary.storyTotals.counts,filters:e.topics.selected.filters}}))(AU(vV,bV,wV)(KU((function(e,t){return e(Xi(t.topicId,t.filters))}))((function(e){var n=e.counts,r=e.topicName,o=e.filters,i=e.intl,a=i.formatMessage,s=i.formatNumber,l=null;if(null!==n){var c=[{value:n.count,fill:ye(),aboveText:a(EV),aboveTextColor:"rgb(255,255,255)",rolloverText:"".concat(a(EV),": ").concat(s(n.count)," stories")},{value:n.total,aboveText:a(xV),rolloverText:"".concat(a(xV),": ").concat(s(n.total)," stories")}];l=t.createElement(gV,{data:c,domId:yV})}return t.createElement(t.Fragment,null,l,t.createElement("div",{className:"actions"},t.createElement(Jz,{actionTextMsg:Ds.downloadOptions},t.createElement(ag,{className:"action-icon-menu-item",onClick:function(){return Pf("".concat(cd(r,o),"-filtered-story-count"),yV)}},t.createElement(lg,null,t.createElement(Kn,Ds.downloadSVG)),t.createElement(RU,null,t.createElement(Pc,null))))))})))));function OV(){return(OV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var CV={title:{id:"topic.summary.mapDownload.title",defaultMessage:"Download Media Link Maps"},helpIntro:{id:"topic.summary.mapDownload.help.intro",defaultMessage:"
Anayzing the content in this topic as a network can help reveal clusters of content all using the same narrative.  Links Maps show how media sources are linking to each other.
"},helpTextDetails:{id:"topic.summary.mapDownload.help.details",defaultMessage:"
Link maps are generated automatically by our system. If you don't see any here, make a small change and create a new version. That new version will include link maps for each timespan automatically.
"},none:{id:"topic.summary.mapDownload.none",defaultMessage:"
No maps available for this timespan.
"},unsupported:{id:"topic.summary.mapDownload.unsupported",defaultMessage:'Sorry, but we can\'t generate link maps when you are using a query filter.  Remove your "{q}" query filter if


Spell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Arbor Elf");
        waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
        checkHandCount("after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 3); // 2x from draw + 1x shift
        checkAbility("after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Arbor Elf", HasteAbility.class, true);

        // blink elf, so it must lose haste
        castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cloudshift", "Arbor Elf");
        waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
        checkAbility("blink", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Arbor Elf", HasteAbility.class, false);

        setStrictChooseMode(true);
        setStopAt(1, PhaseStep.END_TURN);
        execute();
    }
}
package org.mage.test.cards.single.spm;

import mage.constants.CardType;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;

/**
 *
 * @author Jmlundeen
 */
public class ArachnePsionicWeaverTest extends CardTestPlayerBase {

    /*
    Arachne, Psionic Weaver
    {2}{W}
    Legendary Creature - Spider Human Hero
    Web-slinging {W}
    As Arachne enters, look at target opponent's hand, then choose a noncreature card type.
    Spells of the chosen type cost {1} more to cast.
    3/3
    */
    private static final String arachnePsionicWeaver = "Arachne, Psionic Weaver";

    /*
    Tormod's Crypt
    {0}
    Artifact
    {tap}, Sacrifice Tormod's Crypt: Exile all cards from target player's graveyard.
    */
    private static final String tormodsCrypt = "Tormod's Crypt";

    @Test
    public void testArachnePsionicWeaver() {
        setStrictChooseMode(true);

        addCard(Zone.HAND, playerA, arachnePsionicWeaver);
        addCard(Zone.HAND, playerA, tormodsCrypt);
        addCard(Zone.HAND, playerB, tormodsCrypt);
        addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
        addCard(Zone.BATTLEFIELD, playerB, "Plains");

        castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, arachnePsionicWeaver);
        setChoice(playerA, playerB.getName());
        setChoice(playerA, CardType.ARTIFACT.toString());

        checkPlayableAbility("Player A can't cast Tormod's", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cast " + tormodsCrypt, false);

        checkPlayableAbility("Player B can cast Tormod's", 2, PhaseStep.PRECOMBAT_MAIN, playerB, "Cast " + tormodsCrypt, true);
        setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
        execute();
    }
}
package org.mage.test.cards.single.spm;

import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;

/**
 *
 * @author Jmlundeen
 */
public class BlackCatCunningThiefTest extends CardTestPlayerBase {

    /*
    Black Cat, Cunning Thief
    {3}{B}{B}
    Legendary Creature - Human Rogue Villain
    When Black Cat enters, look at the top nine cards of target opponent's library, exile two of them face down, then put the rest on the bottom of their library in a random order. You may play the exiled


Yw)NrDrErFrGrHrIrrKrJrL)rMrNdictrOrPrQupdaterRs    rvid_infor\Rs::<D::dDvH
D
Fa<EN!)IIdC(!)
GGIQ%%c!,A
qt+!D0@WTUVWTXEXKK!%OO!v!A$$9:&O
s
AC  C$cKtj|tjjtjjd{}|j	d{\}}td|d|jd|jdk(ry|rd|jS|rd|jSy7v7`w)	Nr
rEz
 exited with ]Fz	[stdout]
z	[stderr]
)asynciocreate_subprocess_shellr
rcommunicater
returncoder)rprocrrs    rrrns00!!&&!!&&((D
 ++--NFF	AcWM$//!2!
45!
FMMO,--
FMMO,--(
.s%AC	CC	&C'AC	C	c:tjj|rtj|t	j
|dd}t
|d5}|j|D]}|s|j|	ddd|S#1swY|SxYw)NT)allow_redirectsstreamr,)
chunk_size)	ospathexistsremoverequestsr1r4iter_contentr5)r8	file_namerhrfdchunks      rold_downloadrss	ww~~i
		)S$t<A
i	 "^^z^:	 E	  	 sB2BBcJdD]}|dks|dk(rn|dz}|d|ddS)N)BKBMBGBTBPBg@rz.r=rH)sizedecimal_placesunits   rhuman_readable_sizersJ3&=DDL1^$A%
&av..rctjj}tjj}|j	d}|d|dS)Nz%H%M%SrH.mp4)datetimedatetodaynowstrftime)rrcurrent_times   r	time_namersI== D

!C<<)LV1\N$''rcjK|d}t|tj|tj|d}d|vrS|j
dk7rDtdkr;tdz
atjdd{t|||d{da	tjj|r|Stjj|d	r|d	S|jd
d}tjj|dr|dStjj|dr|dStjj|d
r|d
S|S77#t$r7}tjjjdd
zdzcYd}~Sd}~wwxYww)Nza -R 25 --fragment-retries 25 --external-downloader aria2c --downloader-args "aria2c: -x 16 -j 32"Tshell	visioniasr
r_z.webmr{z.mkvrz	.mp4.webmmp4)rloggingrSr
rrcfailed_counterr`sleepdownload_videorirjisfilerNFileNotFoundErrorsplitext)r8rr9download_cmdr:excs      rrrs|U{|L	,LL|40Acalla/Nb4H!mmAS#t,,,N8
77>>$K
WW^^tfEN
+V5>!zz#q!
77>>TF$-(V4=
WW^^tfDM
*V4=
WW^^tfI.
/V9%%!	, 8ww~~&&q)C/%778sA:F3<E,=F3E.F3 E09F3:&E0 F3!:E0F3&E0F3&E0)F3*E0+F3.F30	F09,F+%F0&F3+F00F3botmcK|jd|dd{}tjdtj}	|j||d{|dz
}|j	dd{tjdtj|tjdy77d7Hw)NuUploading » ``r_)captionTrY)
reply_texttimerreply_documentdeleterirl)
rrccrAcc1progcountr9reply
start_times
          rsend_docrs,,vQ788EJJqMJ

2c

***	1H


info({test: "test"});
    requestLogger.flush();

    // THEN
    return logger.info.should.not.have.been.called;
  });
});
import { browser,protractor} from "protractor";
import { SearchPageObject } from "../pages/searchPage";
const { Given,Then,When } = require("cucumber");
const chai = require("chai").use(require("chai-as-promised"));
const expect = chai.expect;

const search: SearchPageObject = new SearchPageObject();

Given(/^I navigate to the entry page$/, async () => {
   await search.searchTextBox.clear();
    await search.searchTextBox.sendKeys("Aberdeen");
    await search.searchTextBox.sendKeys(protractor.Key.ENTER);
     browser.getTitle().then(function(title ){
      console.log(title);
      expect(title).to.eventually.equal("5 Weather Forecast");
    })

  });

  When(/^I enter the different city names$/, async () => {
    await search.searchTextBox.clear();
    await search.searchTextBox.sendKeys("Aberdeen");
    await search.searchTextBox.sendKeys(protractor.Key.ENTER);
  //  await browser.pause(8000);

});

Then(/^It should dispaly five-days weather forecast$/, async () => {

});

When(/^Select day and from displayed weather$/, async () => {

  await search.day1.click();
  await search.day2.click();
  //await search.day3.click();
  await search.day4.click();
  await search.day5.click();

});

Then(/^should summarise the three hour data$/, async () => {

});

  Then(/^The screen will display relevant forecast data for last five days inclusive$/, async () =>  {
   await search.searchTextBox.clear();
    await search.searchTextBox.sendKeys("Dundee");
    await search.searchTextBox.sendKeys(protractor.Key.ENTER);
   // await browser.pause(8000);

  });

  Then(/^All numerical data should be rounded down to the nearest integer$/, async () =>  {
    await search.searchTextBox.clear();
    await search.searchTextBox.sendKeys("Edinburgh");
    await search.searchTextBox.sendKeys(protractor.Key.ENTER);

    //console.log(browser.findElement(by.xpath('//h1')).getText());

    await search.searchButton.click();
  });export class User {
  public id: number;
  public firstName: string;
  public lastName: string;
  public email: string;
  public age: number;
  public selected: boolean;

  constructor(id: number, firstName: string, lastName: string, email: string, age: number, selected: boolean) {
    this.id = id;
    this.firstName = firstName;
    this.lastName = lastName;
    this.email = email;
    this.age = age;
    this.selected = selected;
  }
}
interface Item {
    name: string;
}
interface Item {
    code: string;
}

interface ProductsQueue<T> {
    //metoda w interfejsie przed zaimplementowaniem
    getAll(): T[];
    push(item: T): void;
}

class Queue<T extends Item> implements ProductsQueue<T>{
    private data: T[] = [];

    push(item: T) {
        this.data.push(item)
    }

    pop() {
        this.data.shift();
    }

    // implementacja metody  getAll() z interfejsu
    getAll(): any[] {
        return this.data;
    }
}

interface ProductItem {
    id: number;
}
// określenie typu w kaście <>
const productItems = new Queue<ProductItem &


-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>WinPcap: File Index</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="style.css" rel="stylesheet" type="text/css"/>

Main Page

Related Pages

Modules

Data Structures

Files

File List

Globals

File List
Here is a list of all files with brief descriptions:

daemon.h [code]

fileconf.h [code]

ioctls.h [code]

jitter.h [code]

Packet.h [code]

pcap-remote.h [code]

incs/pcap.h [code]

funcs/pcap.h [code]

remote-ext.h [code]

<a class


 stars following traditional Purple Star methods...
    _addRemainingMainStars(
      stars,
      timeBranch,
      dayBranch,
      monthBranch,
      yearBranch,
      isMale,
    );

    // Apply Four Transformations (四化) based on Year Heavenly Stem
    _applyFourTransformations(stars, yearBranch);

    return stars;
  }

  /// [_calculatePurpleStarPosition] - Calculate Purple Star position
  static int _calculatePurpleStarPosition(int dayBranch, int timeBranch) {
    // Traditional Purple Star position calculation
    // Based on day and time branches
    final base = (dayBranch + timeBranch) % 12;
    return base;
  }

  /// [_calculateSunPosition] - Calculate Sun position
  static int _calculateSunPosition(int monthBranch, int timeBranch) {
    // Sun position varies by month and time
    return (monthBranch + timeBranch + 3) % 12;
  }

  /// [_calculateMilitaryPosition] - Calculate Military Song position
  static int _calculateMilitaryPosition(int dayBranch) {
    // Military Song follows specific calculation pattern
    return (dayBranch + 4) % 12;
  }

  /// [_addRemainingMainStars] - Add the remaining 9 main stars
  static void _addRemainingMainStars(
    List<Map<String, dynamic>> stars,
    int timeBranch,
    int dayBranch,
    int monthBranch,
    int yearBranch,
    bool isMale,
  ) {
    // Add remaining main stars: 天同, 廉貞, 天府, 貪狼, 巨門, 天相, 天梁, 七殺, 破軍
    final remainingStars = [
      {'name': '天同', 'nameEn': 'Heavenly Sameness', 'offset': 2},
      {'name': '廉貞', 'nameEn': 'Integrity', 'offset': 7},
      {'name': '天府', 'nameEn': 'Heavenly Mansion', 'offset': 5},
      {'name': '貪狼', 'nameEn': 'Greedy Wolf', 'offset': 8},
      {'name': '巨門', 'nameEn': 'Giant Gate', 'offset': 3},
      {'name': '天相', 'nameEn': 'Heavenly Minister', 'offset': 9},
      {'name': '天梁', 'nameEn': 'Heavenly Beam', 'offset': 4},
      {'name': '七殺', 'nameEn': 'Seven Killings', 'offset': 10},
      {'name': '破軍', 'nameEn': 'Army Destroyer', 'offset': 6},
    ];

    for (final star in remainingStars) {
      final position = (dayBranch + timeBranch + (star['offset']! as int)) % 12;
      stars.add({
        'name': star['name'],
        'nameEn': star['nameEn'],
        'position': position,
        'palace': _getPalaceName(position),
        'brightness': _calculateBrightness(position, star['name']! as String),
        'category': '主星',
        'significance': 'Major star affecting life aspects',
      });
    }
  }

  /// [_getPalaceName] - Get palace name by position
  static String _getPalaceName(int position) {
    const palaceNames = [
      'Life', // 命宮
      'Siblings', // 兄弟宮
      'Spouse', // 夫妻宮
      'Children', // 子女宮
      'Wealth', // 財帛宮
      'Health', // 疾厄宮
      'Travel', // 遷移宮
      'Friends', // 奴僕宮
      'Career', // 官祿宮
      'Property', // 田宅宮
      'Fortune', // 福德宮
      'Parents', // 父母宮
    ];
    return palaceNames[position % 12];
  }

  /// [_calculateBrightness] - Calculate


ts[n])
#define argTermP(w, n)	(&argTerm(w, n))

#define isList(w)	hasFunctor(w, FUNCTOR_dot2)
#define isNil(w)	((w) == ATOM_nil)

		 /*******************************
		 *     ATTRIBUTED VARIABLES	*
		 *******************************/

#define isAttVar(w)	(tag(w) == TAG_ATTVAR)
#define valPAttVar(w)	((Word)valPtr2(w, STG_GLOBAL))

#define canBind(w)	needsRef(w)

		 /*******************************
		 *	      INDIRECTS		*
		 *******************************/

#if SIZEOF_VOIDP == 4			/* extend as needed */
#define PADBITS 2
#else
#if SIZEOF_VOIDP == 8
#define PADBITS 3
#endif
#endif

#define PADMASK (sizeof(word)-1)

#define mkIndHdr(n, t)	(((n)<<(LMASK_BITS+PADBITS)) | (t) | STG_LOCAL)
#define wsizeofInd(iw)	((iw)>>(LMASK_BITS+PADBITS))
#define addressIndirect(w) valPtr(w)
#define valIndirectP(w)	(((Word)valPtr(w))+1)

#define padHdr(iw)	(((iw)>>LMASK_BITS & PADMASK) ? \
			 ((iw)>>LMASK_BITS & PADMASK) : sizeof(intptr_t))
#define mkPadHdr(n)	(((n)&PADMASK) << LMASK_BITS)
#define mkStrHdr(n,p)	(mkIndHdr(n, TAG_STRING)|mkPadHdr(pad))
#define wsizeofIndirect(w) (wsizeofInd(*addressIndirect(w)))

#define isTaggedInt(w)	(tagex(w) == (TAG_INTEGER|STG_INLINE))
#define isBignum(w)	(tagex(w) == (TAG_INTEGER|STG_GLOBAL) && \
			 wsizeofIndirect(w) == sizeof(int64_t)/sizeof(word))

#define MP_RAT_MASK	(0x1)

/* valBignum(w) and valFloat(w) moved to pl-inline.h */
#define isBString(w)	(isString(w) && ((char *)valIndirectP(w))[0] == 'B')
#define isWString(w)	(isString(w) && ((char *)valIndirectP(w))[0] == 'W')

		 /*******************************
		 *	       VALUES		*
		 *******************************/

/* TODO: putting a prototype here to satisfy the compiler, but fetchAtomArray()
 * may want to be moved somewhere else.  */
static inline Atom	fetchAtomArray(size_t index);
#define indexAtom(w)	((w)>>LMASK_BITS)
#define atomValue(w)	fetchAtomArray(indexAtom(w))
#define stringAtom(w)	(atomValue(w)->name)
#define valInteger(w)	(storage(w) == STG_INLINE ? valInt(w) : valBignum(w))

		 /*******************************
		 *	      FUNCTORS		*
		 *******************************/

#define F_ARITY_BITS	5		/* upto 32 inlined arity */
#define F_ARITY_MASK	((1<<F_ARITY_BITS)-1)
#define MK_FUNCTOR(n, a) (functor_t)(((((n)<<F_ARITY_BITS)|(a))<<LMASK_BITS) | \
			  TAG_ATOM|STG_GLOBAL)
#define functorHashValue(f, n)	((f)>>(LMASK_BITS) & ((n)-1))
#define indexFunctor(w)	((w)>>(LMASK_BITS+F_ARITY_BITS))
#define valueFunctor(w) fetchFunctorArray(indexFunctor(w))
#define _arityFunc_(w)	((size_t)(((w) >> LMASK_BITS) & F_ARITY_MASK))
#define arityFunctor(w) (unlikely(_arityFunc_(w) == F_ARITY_MASK) \
				? valueFunctor(w)->arity \
				: _arityFunc_(w) )
#define isAtomFunctor(w) (arityFunctor(w) == 0)
#define nameFunctor(w)	(valueFunctor(w)->name)

		 /*******************************
		 *	  DERIVED TESTS		*
		 *******************************/

#define nonvar(w)	(!isVar(w))
#define isNumber(w)	(isRational(w) || isFloat(w))
#define isAtomic(w)	(!canBind(w) && !isTerm(w))

		 /*******************************
		 *	   CREATING WORDS	*
		 *******************************/

#define MAXTAGGEDPTR	(((word)1<<((8*sizeof(word))-5)) - 1)

#define consInt(n)	(((word)(n)<<LMASK_BITS) | TAG_INTEGER)
#define consUInt(n)	(((word)(n)<<LMASK_BITS) | TAG_INTEGER)


ljs-symbol,
.theme-base16-nebula-min .hljs-variable.constant_ {
	color: #94929e;
}
.theme-base16-nebula-min .hljs-class .hljs-title,
.theme-base16-nebula-min .hljs-title,
.theme-base16-nebula-min .hljs-title.class_ {
	color: #4f9062;
}
.theme-base16-nebula-min .hljs-strong {
	font-weight: 700;
	color: #4f9062;
}
.theme-base16-nebula-min .hljs-addition,
.theme-base16-nebula-min .hljs-code,
.theme-base16-nebula-min .hljs-string,
.theme-base16-nebula-min .hljs-title.class_.inherited__ {
	color: #6562a8;
}
.theme-base16-nebula-min .hljs-built_in,
.theme-base16-nebula-min .hljs-doctag,
.theme-base16-nebula-min .hljs-keyword.hljs-atrule,
.theme-base16-nebula-min .hljs-quote,
.theme-base16-nebula-min .hljs-regexp {
	color: #226f68;
}
.theme-base16-nebula-min .hljs-attribute,
.theme-base16-nebula-min .hljs-function .hljs-title,
.theme-base16-nebula-min .hljs-section,
.theme-base16-nebula-min .hljs-title.function_,
.theme-base16-nebula-min .ruby .hljs-property {
	color: #4d6bb6;
}
.theme-base16-nebula-min .diff .hljs-meta,
.theme-base16-nebula-min .hljs-keyword,
.theme-base16-nebula-min .hljs-template-tag,
.theme-base16-nebula-min .hljs-type {
	color: #716cae;
}
.theme-base16-nebula-min .hljs-emphasis {
	color: #716cae;
	font-style: italic;
}
.theme-base16-nebula-min .hljs-meta,
.theme-base16-nebula-min .hljs-meta .hljs-keyword,
.theme-base16-nebula-min .hljs-meta .hljs-string {
	color: #8c70a7;
}
.theme-base16-nebula-min .hljs-meta .hljs-keyword,
.theme-base16-nebula-min .hljs-meta-keyword {
	font-weight: 700;
}
.theme-base16-nord {
	/*!
  Theme: Nord
  Author: arcticicestudio
  License: ~ MIT (or more permissive) [via base16-schemes-source]
  Maintainer: @highlightjs/core-team
  Version: 2021.09.0
*/
}
.theme-base16-nord pre code.hljs {
	display: block;
	overflow-x: auto;
	padding: 1em;
}
.theme-base16-nord code.hljs {
	padding: 3px 5px;
}
.theme-base16-nord pre code.hljs {
	display: block;
	overflow-x: auto;
	padding: 1em;
}
.theme-base16-nord code.hljs {
	padding: 3px 5px;
}
.theme-base16-nord .hljs {
	color: #e5e9f0;
	background: #2e3440;
}
.theme-base16-nord .hljs::selection,
.theme-base16-nord .hljs ::selection {
	background-color: #434c5e;
	color: #e5e9f0;
}
.theme-base16-nord .hljs-comment {
	color: #4c566a;
}
.theme-base16-nord .hljs-tag {
	color: #d8dee9;
}
.theme-base16-nord .hljs-subst,


cAbsVelocity, ( 1.0f - trace.fraction ) * gpGlobals->frametime, vecVelocity );
			VectorMA( vecVelocity, ( 1.0f - trace.fraction ) * gpGlobals->frametime, GetBaseVelocity() * flScale, vecVelocity );
			PhysicsPushEntity( vecVelocity, &trace );
		}
	}
	else
	{
		// If we get *too* slow, we'll stick without ever coming to rest because
		// we'll get pushed down by gravity faster than we can escape from the wall.
		if ( flSpeedSqr < ( 30 * 30 ) )
		{
			// Reset velocities.
			SetAbsVelocity( vec3_origin );
			SetLocalAngularVelocity( vec3_angle );
		}
		else
		{
			SetAbsVelocity( vecAbsVelocity );
		}
	}

	BounceSound();
}

char *CDODBaseGrenade::GetExplodingClassname( void )
{
	Assert( !"Baseclass must implement this" );
	return NULL;
}

void CDODBaseGrenade::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
	if ( !CanBePickedUp() )
		return;

	if ( !pActivator->IsPlayer() )
		return;

	CDODPlayer *pPlayer = ToDODPlayer( pActivator );

	//Don't pick up grenades while deployed
	CBaseCombatWeapon *pWpn = pPlayer->GetActiveWeapon();
	if ( pWpn && !pWpn->CanHolster() )
	{
		return;
	}

	DODRoundState state = DODGameRules()->State_Get();

	if ( dod_bonusround.GetBool() )
	{
		int team = pPlayer->GetTeamNumber();

		// if its after the round and bonus round is on, we can only pick it up if we are winners

		if ( team == TEAM_ALLIES && state == STATE_AXIS_WIN )
			return;

		if ( team == TEAM_AXIS && state == STATE_ALLIES_WIN )
			return;
	}
	else
	{
		// if its after the round, and bonus round is off, don't allow anyone to pick it up
		if ( state != STATE_RND_RUNNING )
			return;
	}

	OnPickedUp();

	char *szClsName = GetExplodingClassname();

	Assert( szClsName );

	CBaseCombatWeapon *pWeapon = dynamic_cast<CBaseCombatWeapon *>( pPlayer->GiveNamedItem( szClsName ) );

	Assert( pWeapon && "Wpn pointer has to be valid for us to pick up this grenade" );

	if( pWeapon )
	{
		variant_t flDetTime;
		flDetTime.SetFloat( m_flDetonateTime );
		pWeapon->AcceptInput( "DetonateTime", this, this, flDetTime, 0 );

#ifdef DBGFLAG_ASSERT
		bool bSuccess =
#endif
			pPlayer->Weapon_Switch( pWeapon );

		Assert( bSuccess );

		//Remove the one we picked up
		SetThink( NULL );
		UTIL_Remove( this );
	}
}

int CDODBaseGrenade::OnTakeDamage( const CTakeDamageInfo &info )
{
	if( info.GetDamageType() & DMG_BULLET )
	{
		// Don't allow players to shoot grenades
		return 0;
	}
	else if( info.GetDamageType() & DMG_BLAST )
	{
		// Don't allow explosion force to move grenades
		return 0;
	}

	VPhysicsTakeDamage( info );

	return BaseClass::OnTakeDamage( info );
}

void CDODBaseGrenade::Detonate()
{
	// Don't explode after the round has ended
	if ( dod_bonusround.GetBool() == false && DOD


..getTypes(`[${reg}]`)] as operandType[];
        }
        const dispLength = length(disp);
        const checkBase = getMemoryType(reg)!;
        if (dispLength === '8') {
          // check is 2s complement present for 8 bit disp
          if (isNegativeDisplacement) {
            if (hex > parseInt('80', 16)) {
              is2s8bit = true;
            }
          } else {
            if (hex > parseInt('7f', 16)) {
              is2s8bit = true;
            }
          }
        }
        let dispString;
        if (checkBase.includes('mr16')) {
          dispString = `[${reg}]+disp${dispLength === '32' ? '16' : is2s8bit ? '16' : dispLength}`;
        } else {
          dispString = `[${reg}]+disp${dispLength === '16' ? '32' : is2s8bit ? '32' : dispLength}`;
        }
        return [...containsNegativeDisplacement, ...checkBase, dispString] as operandType[];
      case 'reg+reg':
        const constant = withoutBrackets.match(firstCharacterAfterStar);
        const [reg1, reg2] = withoutBrackets.split('*')[0].split('+');
        const reg1Type = getMemoryType(reg1);
        let retArr = [
          ...containsNegativeDisplacement,
          ...reg1Type!,
          '[sib]',
          `[${reg1}]`,
          `[${reg2 + (constant ? '*' + constant[1] : '')}]`,
          'reg+reg',
        ] as operandType[];
        if (reg1Type?.includes('mr16')) {
          retArr = retArr.filter((s) => s !== '[sib]');
        }
        return retArr;
      case 'reg+reg+disp':
        const [r1, r2, d] = withoutBrackets.split('+');
        const h = parseInt(d, 16);
        if (!h) {
          // check if d === 0
          return ['zero', ...containsNegativeDisplacement, ...getTypes(`[${r1}+${r2}]`)] as operandType[];
        }
        const l = length(d);
        if (l === '8') {
          // check is 2s complement present for 8 bit disp
          if (isNegativeDisplacement) {
            if (h > parseInt('80', 16)) {
              is2s8bit = true;
            }
          } else {
            if (h > parseInt('7f', 16)) {
              is2s8bit = true;
            }
          }
        }
        const t = getMemoryType(r1);
        const tempArr = [];
        if (t?.includes('mr16')) {
          //change sib and length for mr16
          tempArr.push(`[${r1}+${r2}]+disp` + (l === '32' ? '16' : is2s8bit ? '32' : l));
        } else {
          tempArr.push('[sib]+disp' + (l === '16' ? '32' : is2s8bit ? '32' : l));
        }
        return [
          ...containsNegativeDisplacement,
          ...t!,
          ...tempArr,
          `[${r1}]`,
          `[${r2}]`,
          'reg+reg+disp',
        ] as operandType[];
      case 'reg*constant+disp':
        const [s, val] = withoutBrackets.split('+');
        const hexVal = parseInt(val, 16);
        const types = getTypes(`[${s}]`);
        if (!hexVal) {
          // check if d === 0
          return ['zero', ...containsNegativeDisplacement, ...types] as operandType[];
        }
        return [
          ...containsNegativeDisplacement,
          ...types.filter((o) => o !== 'reg*constant'),
          'disp32',
        ] as operandType[];
    }
  }
  return [`imm${length(op)}` as operandType];
};

export const matchRegex = (s: string): displacement


ctivationTime:   "2014-01-15T00:00:00Z",
		},
	}
	if rcv := APItoModelRatingProfile(rp); !reflect.DeepEqual(eOut, rcv) {
		t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv))
	}
	rp = &utils.TPRatingProfile{
		TPid:     "TEST_TPID",
		LoadId:   "TEST_LOADID",
		Tenant:   "cgrates.org",
		Category: "call",
		Subject:  "*any",
	}
	eOut = RatingProfileMdls{
		RatingProfileMdl{
			Tpid:     "TEST_TPID",
			Loadid:   "TEST_LOADID",
			Tenant:   "cgrates.org",
			Category: "call",
			Subject:  "*any",
		},
	}
	if rcv := APItoModelRatingProfile(rp); !reflect.DeepEqual(eOut, rcv) {
		t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv))
	}
}

func TestAPItoModelRatingProfiles(t *testing.T) {
	var rps []*utils.TPRatingProfile
	if rcv := APItoModelRatingProfiles(rps); rcv != nil {
		t.Errorf("Expecting: nil, received: %+v", rcv)
	}
	rps = []*utils.TPRatingProfile{
		{
			TPid:     "TEST_TPID",
			LoadId:   "TEST_LOADID",
			Tenant:   "cgrates.org",
			Category: "call",
			Subject:  "*any",
		},
		{
			TPid:     "TEST_TPID2",
			LoadId:   "TEST_LOADID2",
			Tenant:   "cgrates.org",
			Category: "call",
			Subject:  "*any",
		},
	}
	eOut := RatingProfileMdls{
		RatingProfileMdl{
			Tpid:     "TEST_TPID",
			Loadid:   "TEST_LOADID",
			Tenant:   "cgrates.org",
			Category: "call",
			Subject:  "*any",
		},
		RatingProfileMdl{
			Tpid:     "TEST_TPID2",
			Loadid:   "TEST_LOADID2",
			Tenant:   "cgrates.org",
			Category: "call",
			Subject:  "*any",
		},
	}
	if rcv := APItoModelRatingProfiles(rps); !reflect.DeepEqual(eOut, rcv) {
		t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv))
	}
}

func TestTPActionsAsExportSlice(t *testing.T) {
	tpActs := &utils.TPActions{
		TPid: "TEST_TPID",
		ID:   "TEST_ACTIONS",
		Actions: []*utils.TPAction{
			{
				Identifier:      "*topup_reset",
				BalanceType:     "*monetary",
				Units:           "5.0",
				ExpiryTime:      "*never",
				DestinationIds:  "*any",
				RatingSubject:   "special1",
				Categories:      "call",
				SharedGroups:    "GROUP1",
				BalanceWeight:   "10.0",
				ExtraParameters: "",
				Weight:          10.0},
			{
				Identifier:      "*http_post",
				BalanceType:     "",
				Units:           "0.0",
				ExpiryTime:      "",
				DestinationIds:  "",
				RatingSubject:   "",
				Categories:      "",
				SharedGroups:    "",
				BalanceWeight


  font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Force readable text in active states */
.form-group input:active,
.form-group textarea:active,
.form-group select:active,
.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Ensure input text is always visible */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Webkit autofill fix */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-primary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Modern Post Editor Styles */
.post-editor.modern-editor {
    min-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Post Editor Header Actions - inherits unified header style from main.css */
.post-editor .header-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    align-items: flex-start;
}

.post-editor .editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-editor .editor-main-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: none;
    width: 100%;
    flex: 1;
}

.post-editor .content-editor-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Modern Error Alert */
.error-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: color


r1t2zi
rt2ző
1ru
ru2ac
ru2b1i2k
ru2c3h
ru2cz
2r1udv
rue2l
rue2r
ru1fr
2rugar
2r1u2gat
rug3gy
2r1ugr
ruhás1s
2r1ujj
ru1k2l
2ruktu
2ruktú
rum1agr
ru2maj
ru2mal
ru2maz
ru2m1eng
ru2mer
ru2mes
ru2mél
ru2m1i2k
rum1ill
ru2m1i2p
ru2mis
ru2m1iv
ru2miz
ru2mí
ru2mol
ru2m1o2r
ru2mö
ru2mő
ru2mü
2r1unc
run2da
ru2nit
r1u2nok
ru2pad
ru2pe
ru2p1il
ru2pü
ru2rad
ru2rai
r1u2ral
ru2ras
ru2rat
r1u2raz
ru2rán
ru2rát
2r1urb
ru2ruk
rus1abl
ru2sad
ru2sal
rusa2n
rus1any
rusa2r
rus1aro
ru2sas
ru2sál
ru2s1iz
ru2sír
ru2s1ol
ru2s1ó2
ru2ső
russ2
russz2
rust2
rus1tra
ru2s1ű2
ru2sz1é2p
ru2szip
r1u2tac
r1u2tak
r1u2tat
r1u2taz
2r1utc
r1u2tó.
r1u2tób
r1u2tód
r1u2tói
r1u2tój
r1u2tók
r1u2tón
ru2tóp
r1u2tór
r1u2tós
r1u2tót
r1u2tóv
1rú
rúda2
rú2dad
rú2d1al
rú2d1ar
rú2d1á
rú2del
rú2din
rú2du
rú2dü
rú1dy
rú2d3z
rú1gr
2r1újd
rú2jí
2r1újk
2r1újs
2r1úr.
2r1úrb
2r1úrh
2r1ú2ri
2r1úrk
2r1úrn
rú2ro
2r1úrr
2r1úrt
rú2szó
rú2t1a2l
2r1ú2t1e2
2r1ú2té.
rú2tér
rú2tit
2r1útk
2r1útle
2r1útm
rúto2
2rúts
2r1ú2tü
2r1útv
rú2zsad
rú2zse
1rü
rü2dí
rü2dü
rü2gyel
2rügyn
rü2ha
rü2la
rü2lá
rü2led
rü2les
rü2lép
rü2lér
rü2lí
rü2l1o
rü2ló
rülö2
rü2l1ön
rü2l1öz
rü2l1őg
rü2lu
rü2lú
rü2l1ül
2r1ünn
2r1ü2nő
rü2rí
rü2rü
rü2te
rü2té
rü2tö
rü2tő
rü2vö
rü2ze
rü2zé
1rű
rű1gr
rű1kl
rű1pr
2r1űr.
2r1űrh
2


mType === "login" ? "/auth/login" : "/auth/register";
      history.pushState({}, "", newPath);
    }
  });
</script>
{% endblock %}
<<<<<<>>>>>> f6c0bccf07123e2067e2d64b8baf54b2a46f5987

{{post.title}}

				{{post.content}}

{{post.price}}

				Category:
					{{post.category}}

Seller Information

{{post.creator.username}}

{{post.creator.email}}

{{post.creator.profile.contact}}

					Contact Seller

<<<<<<< HEAD

Related Posts

			{% for post in related_posts %}

				{% has_image post.images.first.image.url as post_image %}

					{{post.title}}

						₸

{{post.price}}

					Block {{post.block}}

			{% endfor %}

=======

>>>>>>> f6c0bccf07123e2067e2d64b8baf54b2a46f5987
{% endblock content %}
{% block externals %}

{% endblock externals %}{% load static %} {% load static tailwind_tags %}
<!doctype html>

		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport"


)
        info_label.pack(side="left", padx=(0, 15))

        self._display_window(monitor_geom)

    def hide_preparation_mode(self):
        self.withdraw()

    def flash_success(self):
        """Flashes the indicator green to show a successful capture."""
        if not self.winfo_exists():
            return

        original_bg = self.container.cget('bg')
        original_prep_fg = self.container.winfo_children()[0].cget('fg')

        success_color = theme["success"]
        self.container.configure(bg=success_color)
        for widget in self.container.winfo_children():
            widget.configure(bg=success_color)

        def restore_colors():
            if self.winfo_exists():
                self.container.configure(bg=original_bg)
                self.container.winfo_children()[0].configure(fg=original_prep_fg, bg=original_bg)
                for child in self.container.winfo_children()[1:]:
                    child.configure(bg=original_bg)

        self.after(150, restore_colors)


9_aimassist_head = GetConVar("arc9_aimassist_head")
local arc9_aimassist = GetConVar("arc9_aimassist")
local arc9_aimassist_lockon = GetConVar("arc9_aimassist_lockon")
local arc9_aimassist_moving = GetConVar("arc9_aimassist_moving")
local arc9_aimassist_grounded = GetConVar("arc9_aimassist_grounded")

function ARC9.StartCommand(ply, cmd)
    if !IsValid(ply) or cmd:CommandNumber() == 0 then return end
    -- commandnumber may reduce inaccurate inputs on client

    local wpn = ply:GetActiveWeapon()

    -- quicknade code before anti nonarc9 check
    -- TOO BAD  IN MULTIPLAYER
    -- if cmd:KeyDown(IN_GRENADE1) and ply:Alive() then
    --     local switchto = ply.ARC9LastSelectedGrenade or false

    --     if !switchto or !ply:HasWeapon(switchto) then
    --         print("roll")
    --         for _, v in ipairs(ply:GetWeapons()) do
    --             if v.IsQuickGrenade then switchto = v:GetClass() break end
    --         end
    --     end

    --     if switchto and ply:GetActiveWeapon() != switchto and ply:HasWeapon(switchto) then
    --         print("select")
    --         ply.ARC9QuickthrowPls = true
    --         -- ply:ConCommand("use " .. switchto)
    --         -- ply:SelectWeapon(switchto) -- idk which way better
    --         local possiblewep = ply:GetWeapon(switchto)
    --         if IsValid(possiblewep) then cmd:SelectWeapon(possiblewep) end
    --     end
    -- end
    -- end

    if !wpn.ARC9 then ARC9.RecoilRise = Angle(0, 0, 0) return end

    if ply:IsBot() then timescalefactor = 1 end -- ping is infinite for them lol

    -- Aim assist imported from ArcCW
    if CLIENT and IsValid(wpn) then
        local cone = arc9_aimassist_cone:GetFloat()
        -- local dist = arc9_aimassist_distance:GetFloat() * (wpn:GetProcessedValue("AARangeMult") or 1)
        local dist = wpn:GetProcessedValue("AimAssistRange", true) or math.min(wpn.RangeMax * 0.95, 4000) -- 4000hu is somewhat about 100m
        local inte = arc9_aimassist_intensity:GetFloat()
        local head = arc9_aimassist_head:GetBool()

        local fav = GetConVar("arc9_mod_freeaim")
        local far = wpn:GetProcessedValue("FreeAimRadius")

        -- Check if current target is beyond tracking cone
        local tgt = ply.ARC9_AATarget
        if IsValid(tgt) and (tgt_pos(tgt, head) - ply:EyePos()):Cross(ply:EyeAngles():Forward()):Length() > cone * 2 then ply.ARC9_AATarget = nil end -- lost track

        -- Try to seek target if not exists
        tgt = ply.ARC9_AATarget
        if !IsValid(tgt) or (tgt.Health and tgt:Health() <= 0) or util.QuickTrace(ply:EyePos(), tgt_pos(tgt, head) - ply:EyePos(), ply).Entity ~= tgt then
            local min_diff
            ply.ARC9_AATarget = nil
            -- for _, ent in ipairs(ents.FindInCone(ply:EyePos(), ply:EyeAngles():Forward(), 244, math.cos(math.rad(cone)))) do
            for _, ent in ipairs(ents.FindInCone(ply:EyePos(), ply:EyeAngles():Forward


8bf16 v[0:3], a0, a1, -2.0 cbsz:3 abid:2 blgp:7 ; encoding: [0x00,0x13,0xed,0xd3,0x00,0x03,0xd6,0xfb]

v_mfma_f32_32x32x4bf16_1k a[0:31], v[0:1], v[2:3], a[34:65]
// GFX90A: v_mfma_f32_32x32x4bf16_1k a[0:31], v[0:1], v[2:3], a[34:65] ; encoding: [0x00,0x80,0xe3,0xd3,0x00,0x05,0x8a,0x04]

v_mfma_f32_32x32x4bf16_1k a[0:31], v[0:1], v[2:3], a[34:65] cbsz:3 abid:2 blgp:7
// GFX90A: v_mfma_f32_32x32x4bf16_1k a[0:31], v[0:1], v[2:3], a[34:65] cbsz:3 abid:2 blgp:7 ; encoding: [0x00,0x93,0xe3,0xd3,0x00,0x05,0x8a,0xe4]

v_mfma_f32_32x32x4bf16_1k a[0:31], v[0:1], a[2:3], a[34:65]
// GFX90A: v_mfma_f32_32x32x4bf16_1k a[0:31], v[0:1], a[2:3], a[34:65] ; encoding: [0x00,0x80,0xe3,0xd3,0x00,0x05,0x8a,0x14]

v_mfma_f32_32x32x4bf16_1k a[0:31], v[0:1], a[2:3], a[34:65] cbsz:3 abid:2 blgp:7
// GFX90A: v_mfma_f32_32x32x4bf16_1k a[0:31], v[0:1], a[2:3], a[34:65] cbsz:3 abid:2 blgp:7 ; encoding: [0x00,0x93,0xe3,0xd3,0x00,0x05,0x8a,0xf4]

v_mfma_f32_32x32x4bf16_1k a[0:31], a[0:1], v[2:3], a[34:65]
// GFX90A: v_mfma_f32_32x32x4bf16_1k a[0:31], a[0:1], v[2:3], a[34:65] ; encoding: [0x00,0x80,0xe3,0xd3,0x00,0x05,0x8a,0x0c]

v_mfma_f32_32x32x4bf16_1k a[0:31], a[0:1], v[2:3], a[34:65] cbsz:3 abid:2 blgp:7
// GFX90A: v_mfma_f32_32x32x4bf16_1k a[0:31], a[0:1], v[2:3], a[34:65] cbsz:3 abid:2 blgp:7 ; encoding: [0x00,0x93,0xe3,0xd3,0x00,0x05,0x8a,0xec]

v_mfma_f32_32x32x4bf16_1k a[0:31], a[0:1], a[2:3], a[34:65]
// GFX90A: v_mfma_f32_32x32x4bf16_1k a[0:31], a


description;
  }

  /**
   * Fetches the owner and repository name, for the given module
   *
   *     await getThirdPartyRepoAndOwner("drash"); // "drashland/nest-drash"
   *
   * @param importedModuleName - The imported module in which we want to get the repository for on github
   *
   * @returns The owner and repo name, eg "<owner>/<repo>"
   */
  public static async getThirdPartyRepoURL(
    importedModuleName: string,
  ): Promise<string> {
    const res = await fetch(
      NestService.NEST_API_URL + "package/" + importedModuleName,
    );
    const json: nestModule = await res.json();
    const repositoryUrl = json.repository;
    return repositoryUrl;
  }
}
import { window } from 'vscode';
import { OutputChannel } from 'vscode';

/** Channel to output
 */
let _channel: OutputChannel;

/** Channel name
 */
const _outputChannelName = 'VMS Build';

/** Get or create new output channel named [`VMS Build`](#_outputChannelName)
 */
function GetOutputChannel(): OutputChannel {
	if (!_channel) {
		_channel = window.createOutputChannel(_outputChannelName);
	}
	return _channel;
}

/** Puts string to output channel and focuses on it
 *
 */
export function ToOutputChannel( outStr : string, endl : boolean = true) : void {
    if (endl) {
        GetOutputChannel().appendLine(outStr);
    }
    else {
        GetOutputChannel().append(outStr);
    }
    GetOutputChannel().show();
}import { ElementFinder, ElementArrayFinder, ExpectedConditions, browser, element, by, promise } from 'protractor';
import { logger } from '../common/logger.utils';

export class ElementFinderUtils {

  private static readonly LOCATOR_ID = 'id';
  private static readonly LOCATOR_CLASS_NAME = 'className';
  private static readonly LOCATOR_CSS_SELECTOR = 'css';
  private static readonly LOCATOR_XPATH = 'xpath';

  private static readonly DEFAULT_TIMEOUT: number = 60;
  private static readonly MSG_ELEMENT_NOT_FOUND: string = "Element(s) not found with locator";

  private static findElementBy(locator: string, value: string, timeout?: number): promise.Promise<ElementFinder> {
    let findingTimeout = timeout ? timeout : this.DEFAULT_TIMEOUT;
    let ele: ElementFinder = undefined;

    switch (locator) {
      case this.LOCATOR_ID:
        ele = element(by.id(value));
        break;

      case this.LOCATOR_CLASS_NAME:
        ele = element(by.className(value));
        break;

      case this.LOCATOR_CSS_SELECTOR:
        ele = element(by.css(value));
        break;

      case this.LOCATOR_XPATH:
        ele = element(by.xpath(value));
        break;
    }

    return browser.wait(ExpectedConditions.visibilityOf(ele), findingTimeout * 1000).then(() => {
      return ele;
    }, (error) => {
      logger.warn(this.MSG_ELEMENT_NOT_FOUND, `${locator} '${value}' after timeout ${findingTimeout} seconds`);
      return undefined;
    });
  }

  private static findAllElementsBy(locator: string, value: string, timeout?: number): promise.Promise<ElementArrayFinder> {
    let findingTimeout = timeout ? timeout : this.DEFAULT_TIMEOUT;
    let eleArray: ElementArrayFinder = undefined;

    switch (locator) {
      case this.LOCATOR_CLASS_NAME:
        eleArray = element.all(by.className(value));
        break;

      case this.LOCATOR_CSS_SELECTOR:
        eleArray = element.all(by.css(value));
        break;

      case this.LOCATOR_XPATH:
        eleArray = element.all(by.xpath(value));
        break;
    }

    return new promise.Promise<ElementArrayFinder>((resolve, reject) => {
      return browser.wait(ExpectedConditions.visibilityOf(eleArray


reader.readMap(BinaryReader::readKey, BinaryReader::readIntIdList))

        fun isEmpty(): Boolean = tags.isEmpty()

        override fun write(writer: BinaryWriter) {
            writer.writeMap(tags, BinaryWriter::writeKey, BinaryWriter::writeIntIdList)
        }
    }
}
/*
 * This file is part of the Krypton project, licensed under the Apache License v2.0
 *
 * Copyright (C) 2021-2023 KryptonMC and the contributors of the Krypton project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kryptonmc.krypton.world

import net.kyori.adventure.key.Key
import org.apache.logging.log4j.LogManager
import org.kryptonmc.api.resource.ResourceKey
import org.kryptonmc.api.resource.ResourceKeys
import org.kryptonmc.api.world.World
import org.kryptonmc.api.world.WorldManager
import org.kryptonmc.krypton.KryptonServer
import org.kryptonmc.krypton.world.util.ChunkProgressListener
import org.kryptonmc.krypton.coordinate.SectionPos
import org.kryptonmc.krypton.registry.KryptonDynamicRegistries
import org.kryptonmc.krypton.util.executor.DefaultPoolUncaughtExceptionHandler
import org.kryptonmc.krypton.util.executor.ThreadPoolBuilder
import org.kryptonmc.krypton.util.executor.daemonThreadFactory
import org.kryptonmc.krypton.world.chunk.ChunkLoader
import org.kryptonmc.krypton.world.data.WorldDataSerializer
import org.kryptonmc.krypton.world.dimension.KryptonDimensionType
import org.kryptonmc.krypton.world.dimension.KryptonDimensionTypes
import java.io.File
import java.time.Duration
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ConcurrentHashMap
import kotlin.math.max

class KryptonWorldManager(
    override val server: KryptonServer,
    private val dataSerializer: WorldDataSerializer,
    private val chunkLoader: ChunkLoader
) : WorldManager {

    private val worldExecutor = ThreadPoolBuilder.create()
        .coreSize(0)
        .maximumSize(max(1, Runtime.getRuntime().availableProcessors() / 2))
        .keepAlive(Duration.ofSeconds(60))
        .factory(daemonThreadFactory("World Handler #%d") { setUncaughtExceptionHandler(DefaultPoolUncaughtExceptionHandler(LOGGER)) })
        .build()
    private val data = checkNotNull(dataSerializer.load(name())) { "You must provide an existing world for Krypton!" }

    override val worlds: MutableMap<ResourceKey<World>, KryptonWorld> = ConcurrentHashMap()
    override val default: KryptonWorld
        get() = worlds.get(World.OVERWORLD) ?: error("The default world has not yet been loaded!")

    private fun name(): String = server.config.world.name

    fun init() {
        create()
        prepare()
    }

    override fun getWorld(key: Key): World? = worlds.get(ResourceKey.of(ResourceKeys.DIMENSION, key))

    override fun loadWorld(key: Key): CompletableFuture<KryptonWorld?> {
        val resourceKey = ResourceKey.of(ResourceKeys.DIMENSION, key)
        if (resourceKey === World.OVERWORLD) return failFuture(IllegalArgumentException("The default world cannot be loaded!"))
        val loaded = worlds.get(resourceKey)
        if (loaded != nu


 deployment
func (r *ReconcileIntegration) createOrUpdateHPA(config EIConfigNew) error {
	var autoScaleEnabled bool
	autoScaleEnabled, _ = strconv.ParseBool(config.integration.Spec.AutoScale.Enabled)
	if autoScaleEnabled {
		hpa := createIntegrationHPA(config)
		err := k8s.Apply(&r.client, hpa)
		return err
	}
	return nil
}

// createOrUpdateService Creates or updates k8s service for the deployment
func (r *ReconcileIntegration) createOrUpdateService(config EIConfigNew) error {
	service := &corev1.Service{}
	var integration = config.integration
	namespace := types.NamespacedName{Name: nameForService(&integration), Namespace: integration.Namespace}
	err := k8s.Get(&r.client, namespace, service)
	if err != nil {
		if errors.IsNotFound(err) {
			//service not found, create it
			serviceFromConfig := r.serviceForIntegration(config)
			err := k8s.Create(&r.client,serviceFromConfig)
			if err != nil {
				log.Error(err, "Error creating k8s service", "object", serviceFromConfig)
				return err
			}
			log.Info("Creating k8s service is success", "kind",
				serviceFromConfig.Kind, "object", serviceFromConfig)
		} else {
			log.Error(err, "Failed to get Service for integration")
			return err
		}
	} else {
		//service exists, update it
		//workaround for https://github.com/kubernetes/kubernetes/issues/36072
		serviceFromConfig := r.serviceForIntegration(config)
		serviceFromConfig.ObjectMeta.ResourceVersion = service.ObjectMeta.ResourceVersion
		serviceFromConfig.Spec.ClusterIP = service.Spec.ClusterIP
		err := k8s.Apply(&r.client,serviceFromConfig)
		if err != nil {
			log.Error(err, "Failed to update Service for integration " ,
				"serviceName", serviceFromConfig.Name)
			return err
		}
	}

	return nil
}

// createOrUpdateIngress check if the ingress already exists, if not create a new one, if yes update it
func (r *ReconcileIntegration) createOrUpdateIngress(config *EIConfigNew) error {
	autoCreateIngressInfo := config.integrationConfigMap.Data[autoIngressCreationKey]
	autoCreateIngress, err := strconv.ParseBool(autoCreateIngressInfo)
	if err != nil {
		log.Error(err, "Cannot parse autoIngressCreationKey to a boolean value. Setting false")
		autoCreateIngress = false
	}

	if autoCreateIngress {
		ingress := &networking.Ingress{}
		var integration = config.integration
		namespace := types.NamespacedName{Name: nameForIngress(), Namespace: integration.Namespace}
		err := k8s.Get(&r.client, namespace, ingress)
		if err != nil {
			if errors.IsNotFound(err) {		// No ingress found, define a new Ingress
				eiIngress := r.ingressForIntegration(config)
				err = k8s.Apply(&r.client, eiIngress)
				if err != nil {
					return err
				}
			} else {
				log.Error(err, "Failed to get Ingress")
				return err
			}

		} else {		//  ingress already exists, check and update the rules
			_, ruleExists := CheckIngressRulesExist(config, ingress)
			if !ruleExists {
				eiIngress := r.updateIngressForIntegration(config, ingress)
				log.Info("Updating a new Ingress", "Ingress.Namespace", integration.Namespace,
					"Ingress.Name", nameForIngress())
				err = r.client.Update(context.TODO(), eiIngress)
				if err != nil {
					log.Error(err, "Failed to updated new Ingress", "Ingress.Namespace",
						integration.Namespace, "Ingress.Name", nameForIngress())
					return err
				}
			}
		}
	}
	return nil
}

//updateStatus updates the status of the integration
func (r *ReconcileIntegration) updateStatus(deploy


erialName("during") val during: FhirPeriod?
)

@Serializable
internal data class FhirVzdAvailableTime(
    @SerialName("daysOfWeek") val daysOfWeek: List<String> = emptyList(),
    @SerialName("availableStartTime") val availableStartTime: String? = null,
    @SerialName("availableEndTime") val availableEndTime: String? = null,
    @SerialName("specialOpeningTimes") val specialOpeningTimesExtension: SpecialOpeningTimesExtensions? = null
) {
    companion object {
        fun List<FhirVzdAvailableTime>.toErpModel(): Map<DayOfWeek, List<OpeningTimeErpModel>> {
            val openingTimeMap = mutableMapOf<DayOfWeek, MutableList<OpeningTimeErpModel>>()

            forEach { element ->
                val dayOfWeek = element.daysOfWeek.firstOrNull()?.toDayOfWeek()
                val startTime = element.availableStartTime?.let { LocalTime.parse(it) }
                val endTime = element.availableEndTime?.let { LocalTime.parse(it) }

                letNotNull(dayOfWeek, startTime, endTime) { day, start, end ->
                    openingTimeMap
                        .getOrPut(day) { mutableListOf() }
                        .add(OpeningTimeErpModel(start, end))
                }
            }

            return openingTimeMap.mapValues { it.value.toList() }
        }

        private fun String.toDayOfWeek(): DayOfWeek? =
            mapOf(
                "mon" to DayOfWeek.MONDAY,
                "tue" to DayOfWeek.TUESDAY,
                "wed" to DayOfWeek.WEDNESDAY,
                "thu" to DayOfWeek.THURSDAY,
                "fri" to DayOfWeek.FRIDAY,
                "sat" to DayOfWeek.SATURDAY,
                "sun" to DayOfWeek.SUNDAY
            )[this.lowercase()]
    }
}

// https://gematik.de/fhir/directory/StructureDefinition/SpecialOpeningTimesEX
@Serializable
internal data class SpecialOpeningTimesExtensions(
    @SerialName("extension") val extension: List<SpecialOpeningTimes> = emptyList()
)

@Serializable
internal data class SpecialOpeningTimes(
    @SerialName("period") val period: FhirExtension?, // valuePeriod
    @SerialName("qualifier") val qualifier: String? // valueCoding
)

@Serializable
internal data class FhirVzdSpecialty(
    @SerialName("coding") val codings: List<FhirTypeCoding> = emptyList(),
    @SerialName("text") val text: String?
) {
    companion object {

        fun List<FhirVzdSpecialty>.getSpecialtyTypes(): List<FhirVzdSpecialtyType> =
            flatMap { it.codings }
                .onEach { Napier.d { "Processing code: ${it.code}" } }
                .map { FhirVzdSpecialtyType.fromCode(it.code) }
                .distinct()
    }
}
/*
 * Copyright (Change Date see Readme), gematik GmbH
 *
 * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the
 * European Commission – subsequent versions of the EUPL (the "Licence").
 * You may not use this work except in compliance with the Licence.
 *
 * You find a copy of the Licence in the "Licence" file or at
 * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.
 * In case of changes by gematik GmbH find details in the "Readme" file.
 *
 * See the Licence for the specific language governing permissions and limitations under the Licence.
 *
 * *******
 *


I32};
///
/// let mut x = FixedI32::<U18>::from_num(0);
/// let mut y = cos(x);
/// assert_eq!{ y.to_num::<f32>(), 1.0000038 };
///
/// x = FixedI32::<U18>::from_num(3.1415/2.0);
/// y = cos(x);
/// assert_eq!{ y.to_num::<f32>(), 0.00004196167 };
/// ```
///
/// ## Comparison and Error
///
/// The figure below shows the comparison between the polynomial cosine, and the `std::f32::cos` implementation.
/// The Difference between the two is plotted as the error.
///
/// ![Alt version](https://github.com/ErikBuer/Fixed-Trigonometry/blob/main/figures/polynomial_cosine_comparison.png?raw=true)
///
/// The error of the method is compared to the sine implementation in the cordic crate.
///
/// The comparison is done for U22 signed fixed point.
///
/// The figure below is missing numbers on the y axis, but it is plotted on a linear scale, showing the relative error between the two methods.
///
/// ![Alt version](https://github.com/ErikBuer/Fixed-Trigonometry/blob/main/figures/cordic_poly_cos_error_comparison.png?raw=true)
///
pub fn cos<T>( x: T ) -> T
    where T: fixed::traits::FixedSigned + MixedNum + MixedNumSigned + MixedOps + MixedPi
{
    // shift to enable use of more accurate sinepolynomial method.
    let pi_half = <T>::from_num(fixed::consts::PI/2);

    let mut x_shifted = x+pi_half;
    x_shifted = wrap_phase(x_shifted);
    return sin(x_shifted);
}

/// Wrapps θ to the -π=<x<π range.
///
/// ## Arguments
///
/// * `phi` - The unwrapped phase in radians.
///
/// ## Example
///
/// ```
/// use fixed_trigonometry::*;
/// use fixed::{types::extra::U28, FixedI32};
///
/// let phi =  FixedI32::<U28>::from_num(6);
/// let wrapped_phi = wrap_phase(phi);
/// assert_eq!{ wrapped_phi.to_num::<f32>(), -0.2831853 };
/// ```
pub fn wrap_phase<T>( phi: T ) -> T
    where T: MixedNum + MixedNumSigned + MixedNumConversion<i32> + MixedOps + MixedPi
{
    let mixed_pi  = T::mixed_pi();
    let tau = T::mixed_from_num(2)*mixed_pi;

    let mut temp_scalar = phi;

    while temp_scalar < -mixed_pi
    {
        temp_scalar = temp_scalar + tau;
    }
    while mixed_pi <= temp_scalar
    {
        temp_scalar = temp_scalar - tau;
    }
    return temp_scalar;
}// Copyright (c) 2021 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//

use std::io;
use std::io::ErrorKind;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::sync::watch::Receiver;

// Size of I/O read buffer
const BUF_SIZE: usize = 8192;

// Interruptable I/O copy using readers and writers
// (an interruptable version of "io::copy()").
pub async fn interruptable_io_copier<R: Sized, W: Sized>(
    mut reader: R,
    mut writer: W,
    mut shutdown: Receiver<bool>,
) -> io::Result<u64>
where
    R: tokio::io::AsyncRead + Unpin,
    W: tokio::io::AsyncWrite + Unpin,
{
    let mut total_bytes: u64 = 0;

    let mut buf: [u8; BUF_SIZE] = [0; BUF_SIZE];

    loop {
        tokio::select! {
            _ = shutdown.changed() => {
                eprintln!("INFO: interruptable_io_copier: got shutdown request");


;
      if (xMinus * center <= 0.0f && compare)
      {
        interpolate = center / (center - xMinus);
        sum += 1.0f / (interpolate * interpolate);
      }
      compare = (forward) ? true : xPlus < outside;
      if (xPlus * center <= 0.0f && compare)
      {
        interpolate = center / (center - xPlus);
        sum += 1.0f / (interpolate * interpolate);
      }
      compare = (forward) ? true : zMinus < outside;
      if (zMinus * center <= 0.0f && compare)
      {
        interpolate = center / (center - zMinus);
        sum += 1.0f / (interpolate * interpolate);
      }
      compare = (forward) ? true : zPlus < outside;
      if (zPlus * center <= 0.0f && compare)
      {
        interpolate = center / (center - zPlus);
        sum += 1.0f / (interpolate * interpolate);
      }

      REAL sign = (forward) ? 1.0f : -1.0f;

      if (sum > 0.0f)
      {
        REAL finalDistance = sign / sqrtf(sum);

        HEAP_ENTRY entry;
        entry.distance = finalDistance;
        entry.index = i;
        distance[i] = finalDistance;
        minHeap.insert(entry);
      }
      else
        distance[i] = sign * outside;
    }
    if (!forward && distance[i] >= outside)
      distance[i] = -outside;
  }
}

//////////////////////////////////////////////////////////////////////
// do extension in one direction
//////////////////////////////////////////////////////////////////////
void VECTOR3_FIELD_3D::extendOneway(bool forward, FIELD_3D& distance, MIN_HEAP& minHeap)
{
  int pops = 0;
  REAL outside = distance.outside();

  // do the forward marching
  while (!minHeap.empty())
  {
    // pop off the top and retire it
    HEAP_ENTRY popped = minHeap.popMin();
    _retired[popped.index] = true;

    pops++;

    // popped was just retired, calculate a new distance value for all its neighbors
    int candidate = popped.index;
    int zIndex = candidate / _slabSize;
    int yIndex = (candidate - zIndex * _slabSize) / _xRes;
    int xIndex = (candidate - zIndex * _slabSize - yIndex * _xRes);

    for (int y = 0; y < 6; y++)
    {
      candidate = popped.index;

      if (y == 0)
      {
        if (xIndex < _xRes - 1) candidate++;
        else continue;
      }

      if (y == 1)
      {
        if (xIndex > 0) candidate--;
        else continue;
      }

      if (y == 2)
      {
        if (yIndex < _yRes - 1) candidate += _xRes;
        else continue;
      }

      if (y == 3)
      {
        if (yIndex > 0) candidate -= _xRes;
        else continue;
      }

      if (y == 4)
      {
        if (zIndex < _zRes - 1) candidate += _slabSize;
        else continue;
      }

      if (y == 5)
      {
        if (zIndex > 0) candidate -= _slabSize;
        else continue;
      }

      // account for marching direction
      bool distanceTest = distance[candidate] >= 0.0 ? true : false;
      if (!forward) distanceTest = !distanceTest;

      if (distanceTest && (_retired.find(candidate) == _retired.end()))
      {
        // get the distance values
        REAL distances[3];
        VECTOR3 extensions[3];
        REAL neighbors[6];
        VECTOR3 extensionNeighbors[6


 length */
    check(krb5_chpw_message(context, &result_ad_length, &msg));
    printf("  AD length:    %s\n", msg);
    check_msg(msg, "The password must contain at least 13 characters.");
    free(msg);

    /* AD data with history requirements */
    check(krb5_chpw_message(context, &result_ad_history, &msg));
    printf("  AD history:   %s\n", msg);
    check_msg(msg, "The password must be different from the previous 9 "
              "passwords.");
    free(msg);

    /* AD data with minimum age */
    check(krb5_chpw_message(context, &result_ad_age, &msg));
    printf("  AD min age:   %s\n", msg);
    check_msg(msg, "The password can only be changed every 2 days.");
    free(msg);

    /* AD data with all */
    check(krb5_chpw_message(context, &result_ad_all, &msg));
    printf("  AD all:       %s\n", msg);
    check_msg(msg, "The password can only be changed once a day.");
    check_msg(msg, "The password must be different from the previous 13 "
              "passwords.");
    check_msg(msg, "The password must contain at least 5 characters.");
    check_msg(msg, "The password must include numbers or symbols.");
    check_msg(msg, "Don't include any part of your name in the password.");
    free(msg);

    krb5_free_context(context);
    exit(0);
}


 com.android.local.service.demo

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.android.local.service.core.ALSHelper
import com.android.local.service.core.data.ServiceConfig
import com.android.local.service.databinding.ActivityMainBinding
import com.android.local.service.demo.livedata.LiveDataHelper
import com.android.local.service.demo.service.AndroidService
import com.android.local.service.demo.service.OtherService
import com.android.local.service.demo.service.PCService
import com.android.local.service.demo.utils.getPhoneWifiIpAddress
import okhttp3.*
import java.io.IOException
import java.util.*

class MainActivity : AppCompatActivity() {
    private lateinit var binding: ActivityMainBinding
    private val client = OkHttpClient()

    private var ipAddress: String? = null

    private var androidServicePort = 1111
    private var pcServicePort = 2222

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)
        //只用之前先初始化
        ALSHelper.init(this)
        //启动单个服务用法
        ALSHelper.startService(ServiceConfig(AndroidService::class.java))
        //启动多个服务用法
        ALSHelper.startServices(
            listOf(
                ServiceConfig(PCService::class.java),
                ServiceConfig(OtherService::class.java, 4444)
            )
        )
        initIpAddress()
        initView()
        pcServiceDemoTip()
        initObserver()
    }

    private fun pcServiceDemoTip() {
        val pcBaseUrl = "http://${ipAddress}:${pcServicePort}"
        val showH5Page = "$pcBaseUrl/index"
        val queryAppInfo = "$pcBaseUrl/queryAppInfo"
        val saveData = "$pcBaseUrl/saveData?content=我是来自PC端的数据"
        binding.tvPcServiceTip.text =
            "局域网内电脑端可输入一下地址看demo效果：\n$showH5Page\n$queryAppInfo\n$saveData"
    }

    private fun initIpAddress() {
        if (ipAddress == null) {
            ipAddress = getPhoneWifiIpAddress()
        }
        pcServicePort =
            ALSHelper.serviceList.find { it.serviceName == PCService::class.java.simpleName }?.port
                ?: 0
        androidServicePort =
            ALSHelper.serviceList.find { it.serviceName == AndroidService::class.java.simpleName }?.port
                ?: 0
    }

    private fun initObserver() {
        LiveDataHelper.saveDataLiveData.observe(this) { showUIData(it) }
        LiveDataHelper.appInfoLiveData.observe(this) { showUIData(it) }
        LiveDataHelper.changeDataLiveData.observe(this) { showUIData(it) }
    }

    private fun showUIData(it: String?) {
        binding.tvContent.text = it
    }

    private fun showResultUI(it: String?) {
        binding.tvRequestResult.text = "请求本地服务器响应的结果：\n$it"
    }

    private fun initView() {
        binding.tvServiceAddress.text = "本机服务器地址：$ipAddress"

        var serviceListData = ""
        ALSHelper.serviceList.forEach { serviceListData += "服务名：${it.serviceName}   端口号：${it.port}\n" }
        binding.tvServiceList.text = serviceListData

        binding.btnQueryAppInfo.setOnClickListener {
            binding.tvContent.text = ""
            sendRequest("http://${ipAddress}:${androidServicePort}/appInfo")
        }
        binding.btnChangeData.setOnClickListener {
            send


	// 確保列顯示順序與資料庫表格相同
	dt := NewDataTable()
	validColumns := make([]*DataList, 0, len(dataLists))
	for i, dl := range dataLists {
		if i != rowNameColIndex || rowNameColIndex == -1 {
			if dl != nil && len(dl.data) > 0 {
				validColumns = append(validColumns, dl)
			}
		}
	}
	if len(validColumns) > 0 {
		dt.AppendCols(validColumns...)

		// 在這裡設置行名
		if rowNameColIndex >= 0 {
			for i, name := range rowNames {
				dt.SetRowNameByIndex(i, name)
			}
		}
	}

	return dt, nil
}
package stats

import (
	"math"

	"github.com/HazelnutParadise/insyra"
	"gonum.org/v1/gonum/stat/distuv"
)

type FTestResult struct {
	testResultBase
	DF2 float64 // degree of freedom for the second group
}

// FTestForVarianceEquality performs an F-test for variance equality
func FTestForVarianceEquality(data1, data2 insyra.IDataList) *FTestResult {
	var var1, var2 float64
	var len1, len2 int

	data1.AtomicDo(func(d1 *insyra.DataList) {
		data2.AtomicDo(func(d2 *insyra.DataList) {
			var1 = d1.Var()
			var2 = d2.Var()
			len1 = d1.Len()
			len2 = d2.Len()
		})
	})

	// 計算 F 值
	var fValue float64
	if var1 > var2 {
		fValue = var1 / var2
	} else {
		fValue = var2 / var1
	}

	// 計算自由度
	df1 := float64(len1 - 1)
	df2 := float64(len2 - 1)

	// 使用卡方分佈計算 P 值
	fDist := distuv.F{D1: df1, D2: float64(df2)}
	pValue := 2 * math.Min(fDist.CDF(fValue), 1-fDist.CDF(fValue)) // 使用雙尾檢定

	return &FTestResult{
		testResultBase: testResultBase{
			Statistic: fValue,
			PValue:    pValue,
			DF:        &df1,
		},
		DF2: df2,
	}
}

// LeveneTest performs Levene's Test for equality of variances across multiple groups.
// Input: slice of *insyra.DataList, each representing a group.
// Output: *FTestResult
func LeveneTest(groups []insyra.IDataList) *FTestResult {
	k := len(groups)
	if k < 2 {
		insyra.LogWarning("stats", "LeveneTest", "At least two groups required")
		return nil
	}

	var allDiffs []float64
	var groupLabels []int

	for i, group := range groups {
		group.AtomicDo(func(gdl *insyra.DataList) {
			median := gdl.Median()
			for _, v := range gdl.Data() {
				x, ok := insyra.ToFloat64Safe(v)
				if !ok {
					continue
				}
				allDiffs = append(allDiffs, math.Abs(x-median))
				groupLabels = append(groupLabels, i)
			}
		})
	}

	// 對 |x - median| 做單因子 ANOVA
	return oneWayANOVA(allDiffs, groupLabels, k)
}

// BartlettTest performs Bartlett's test for equality of variances.
// Input: slice of *insyra.DataList, each representing a group.
func BartlettTest(groups []insyra.IDataList) *FTestResult {
	k := len(groups


os e caixas.

- Acende um **LED indicador** sempre que uma caixa for completada.

= Exemplo de uso:

=I Automao industrial para controle de embalagens em uma linha de produo, reduzindo erros de contagem e perdas financeiras.

## = Demonstrao no Serial

Todos os projetos exibem os valores no **console serial**, como por exemplo:

- Valor de luminosidade: 356

- Ambiente escuro! Acendendo o LED.

---

## = Observaes

- O limiar de luz/proximidade pode ser alterado no cdigo.

- Ce


UMENT) + ((sizeof(DMUS_REGION) + sizeof(DMUS_ARTICULATION) + sizeof(DMUS_ARTICPARAMS)) * trueSoundCount);

				IDirectMusicDownload8* instrumentMusicDownload = NULL;
				if (FAILED(hr = mPortDownload->AllocateBuffer(sizeofInstrument,
					&instrumentMusicDownload)))
				{
					return hr;
				}

				if (FAILED(hr = instrumentMusicDownload->GetBuffer(&dataInstrument, &sizeDataInstrument)))
				{
					if (instrumentMusicDownload != NULL)
						instrumentMusicDownload->Release();
					return hr;
				}

				unsigned char* dataInstrumentByteBuffer = (unsigned char*)dataInstrument;
				ZeroMemory(dataInstrumentByteBuffer, sizeofInstrument);

				int currentDataInstBufferOffset = 0;

				DMUS_DOWNLOADINFO* dlInfo = (DMUS_DOWNLOADINFO*)(&dataInstrumentByteBuffer[currentDataInstBufferOffset]);
				dlInfo->dwDLType = DMUS_DOWNLOADINFO_INSTRUMENT;
				dlInfo->cbSize = sizeofInstrument;
				dlInfo->dwDLId = dlIdInstrument;

				dlInfo->dwNumOffsetTableEntries = 1 + (trueSoundCount * 3);

				currentDataInstBufferOffset += sizeof(DMUS_DOWNLOADINFO);

				unsigned long* ulOffsetTable = (unsigned long*)(&(dataInstrumentByteBuffer[currentDataInstBufferOffset]));

				currentDataInstBufferOffset += (sizeof(unsigned long) * (1 + (trueSoundCount * 3)));

				ulOffsetTable[0] = currentDataInstBufferOffset;

				DMUS_INSTRUMENT* instrument = (DMUS_INSTRUMENT*)(&dataInstrumentByteBuffer[currentDataInstBufferOffset]);

				currentDataInstBufferOffset += sizeof(DMUS_INSTRUMENT);

				instrument->ulPatch = F_INSTRUMENT_DRUMS | ((bankNumber << 8) | patchNumber);
				instrument->ulFirstRegionIdx = 1;
				instrument->ulGlobalArtIdx = 0; // No global

				int trueSound = 0;

				for (int y = 0; y < alBankInstr->percussion->soundCount; y++)
				{
					if (alBankInstr->percussion->sounds[y] == NULL)
						continue;

					{
						CString wavPath;
						wavPath.Format("%sSnd%02X_%04X_Perc.wav", mainFolder, writeBank, y);

						float sampleRate = (float)alBankInstr->samplerate;

						if (alBankInstr->soundBankFormat == N64DD)
						{
							sampleRate = alBankInstr->percussion->sounds[y]->wav.sampleRateNotInDefaultNintendoSpec;
						}

						if (overrideSamplingRate)
							sampleRate = samplingRate;

						if (halfSamplingRate)
							sampleRate /= 2.0;
						bool extractResult = n64Audio.ExtractPercussion(mainFolder, alBankInstr, y, wavPath, sampleRate, false);

						CStringW wavPathW(wavPath);
						LPWSTR wavPathStr = wavPathW.GetBuffer(0);

						WAVEFORMATEX waveFormatEx;

						if (FAILED(hr = waveFile.Open(wavPathStr, &waveFormatEx, WAVEFILE_READ)))
						{
							continue;
						}

						wavPathW.ReleaseBuffer();

						unsigned long append = 0;
						if (FAILED(hr = mPortDownload->GetAppend(&append)))
						{
							instrumentMusicDownload->Release();

							return hr;
						}

						IDirectMusicDownload8* waveMusicDownload = NULL;
						if (FAILED(hr = mPortDownload->AllocateBuffer(sizeof(WAVE_DOWNLOAD) +
							append * waveFile.GetFormat()->nBlockAlign + waveFile.GetSize(), &waveMusicDownload)))
						{
							instrumentMusicDownload->Release();
							if (waveMusicDownload != NULL)
								waveMusicDownload->Release();
							return hr;
						}

						void *waveDataBuffer = NULL;
						unsigned long sizeWaveBuffer = 0;


Range(0, snapshot);

        // then
        for (int i = 0; i < 128; i++) {
            int arrayIndex = i / Long.SIZE;
            int offset = i % Long.SIZE;
            assertEquals(key.get(i), (snapshot[arrayIndex] & (1L << offset)) != 0);
        }
    }

    @Test
    void shouldSetRemoveSet() {
        // given
        ConcurrentSparseLongBitSet set = new ConcurrentSparseLongBitSet(128);
        assertTrue(set.set(0, 8, true));
        assertTrue(set.set(0, 8, false));

        // when
        boolean reset = set.set(0, 8, true);

        // then
        assertTrue(reset);
    }

    @Test
    void shouldSetNonConflictingBitsConcurrently() throws Throwable {
        // given
        ConcurrentSparseLongBitSet set = new ConcurrentSparseLongBitSet(128);
        Race race = new Race().withMaxDuration(10, SECONDS);
        int numberOfThreads = 10;
        int idsPerChunk = 1 << random.nextInt(4);
        for (int i = 0; i < numberOfThreads; i++) {
            race.addContestant(setter(set, idsPerChunk, i, numberOfThreads, random.nextLong()), 1_000_000);
        }

        // when
        race.go();

        // then we're good, all assertions were made while running
    }

    @Test
    void shouldSetConflictingBitsConcurrently() throws Throwable {
        // given
        ConcurrentSparseLongBitSet set = new ConcurrentSparseLongBitSet(128);
        Race race = new Race().withMaxDuration(10, SECONDS);
        AtomicBoolean isSet = new AtomicBoolean();
        race.addContestants(
                10,
                () -> {
                    boolean wasSet = set.set(3, 10, true);
                    if (wasSet) {
                        assertTrue(isSet.compareAndSet(false, true));
                    }
                },
                1);

        // when
        race.go();

        // then
        assertTrue(isSet.get());
    }

    @Test
    void shouldRemoveEmptyRanges() {
        // given
        ConcurrentSparseLongBitSet set = new ConcurrentSparseLongBitSet(128);
        set.set(5, 2, true);
        set.set(7, 2, true);
        assertEquals(1, set.size());

        // when
        set.set(5, 4, false);

        // then
        assertEquals(0, set.size());

        // and when
        set.set(9, 5, true);
        assertEquals(1, set.size());
    }

    private static Runnable setter(
            ConcurrentSparseLongBitSet set, int idsPerChunk, int i, int numberOfThreads, long seed) {
        return new Runnable() {
            private final BitSet key = new BitSet();
            private final long[] reader = new long[2];
            private final long[] temp = new long[2];
            private final Random random = new Random(seed);

            @Override
            public void run() {
                int chunk = random.nextInt(1024);
                int id = (chunk * numberOfThreads + i) * idsPerChunk;
                boolean isSet = key.get(chunk);

                // read
                set.snapshotRange(id / set.getIdsPerEntry(), reader);
                Arrays.fill(temp, 0);
                BitsUtil.setBits(temp, id % set.getIdsPerEntry(), idsPerChunk, 0);
                assertTrue(bitsMatches(reader, temp, isSet));

                // write
                boolean actuallySet = set.set(id, idsPerChunk, !isSet);
                assertTrue(actuallySet);
                key.set(chunk, !isSet);
            }
        };
    }

    private static void set(ConcurrentSparseLongBitSet set, BitSet key, long id, int slots, boolean value) {
        boolean actuallySet = set.set(id, slots, v


/15121_319.jpg">15121_319.jpg

15121_323.jpg

15121_325.jpg

15121_328.jpg

15121_331.jpg

15121_335.jpg

15121_337.jpg

<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>Amazon and Blogger</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">


: 2
#   Ha a tachometer_pin meg van adva, ez a fordulatszámmérő jelének
#   fordulatonkénti impulzusainak száma. Egy BLDC ventilátor esetében ez általában
#   fele a pólusok számának. Az alapértelmezett érték a 2.
#tachometer_poll_interval: 0,0015
#   Ha a tachometer_pin meg van adva, ez a fordulatszámmérő tűjének lekérdezési
#   periódusa, másodpercben. Az alapértelmezett 0,0015, ami elég gyors a
#   10000 RPM alatti ventilátorok számára 2 PPR mellett. Ennek kisebbnek kell lennie,
#   mint 30/(tachometer_ppr*rpm), némi ráhagyással, ahol az rpm a ventilátor
#   maximális fordulatszáma (rpm-ben).
#enable_pin:
#   Opcionális tű a ventilátor tápellátásának biztosításához. Ez hasznos lehet a
#   dedikált PWM bemenettel rendelkező ventilátorok számára. Néhány ilyen
#   ventilátor még 0%-os PWM bemenetnél is bekapcsolva marad. Ilyenkor a PWM tű
#   normálisan használható, és pl. földkapcsolt FET (normál ventilátorcsap)
#   használható a ventilátor tápellátásának szabályozására.
```

### [heater_fan]

Fejhűtő ventilátorok (a "heater_fan" előtaggal tetszőleges számú szakasz definiálható). A "fejhűtő ventilátor" egy olyan ventilátor, amely akkor lesz engedélyezve, amikor a hozzá tartozó fűtőberendezés aktív. Alapértelmezés szerint a heater_fan alapértelmezés szerint a shutdown_speed a max_power értékkel egyenlő.

```
[heater_fan heatbreak_cooling_fan]
#pin:
#max_power:
#shutdown_speed:
#cycle_time:
#hardware_pwm:
#kick_start_time:
#off_below:
#tachometer_pin:
#tachometer_ppr:
#tachometer_poll_interval:
#enable_pin:
#       A fenti paraméterek leírását lásd a "ventilátor" részben.
#heater: extruder
#       A ventilátorhoz társított fűtést meghatározó konfigurációs
#       szakasz neve. Ha itt megadod a fűtőelemek vesszővel
#       elválasztott nevét, akkor a ventilátor engedélyezve lesz,
#       ha valamelyik adott fűtőtest engedélyezve van.
#       Az alapértelmezett az "extruder".
#heater_temp: 50,0
#       Egy hőmérséklet (Celsiusban), amely alá a fűtőelemnek
#       le kell süllyednie, mielőtt a ventilátort letiltják.
#       Az alapértelmezett 50 Celsius.
#fan_speed: 1.0
#       A ventilátor sebessége (0,0 és 1,0 kö


/*********************************************************************
Author: Soonho Kong <soonhok@cs.cmu.edu>

dReal -- Copyright (C) 2013 - 2016, the dReal Team

dReal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

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

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

#include <stdio.h>
#include "opensmt/api/opensmt_c.h"

// Related Issue: https://github.com/dreal/dreal3/issues/210

void print_r(opensmt_result r){
    if(r==l_true)
        printf("sat\n");
    else if(r==l_false)
        printf("unsat\n");
    else
        printf("unknown\n");
}

int main() {
    opensmt_init();
    opensmt_context ctx = opensmt_mk_context(qf_nra);
    opensmt_set_verbosity(ctx, 1000);
    opensmt_expr a = opensmt_mk_bool_var(ctx, "a");
    opensmt_expr not_a = opensmt_mk_not(ctx, a);
    opensmt_expr b = opensmt_mk_bool_var(ctx, "b");
    opensmt_expr i1 = opensmt_mk_bool_var(ctx, "i1");
    opensmt_expr i2 = opensmt_mk_bool_var(ctx, "i2");
    opensmt_expr i3 = opensmt_mk_bool_var(ctx, "i3");

    opensmt_assert(ctx, opensmt_mk_imply(ctx, i1, a));//i1 -> a
    opensmt_assert(ctx, opensmt_mk_imply(ctx, i2, not_a));//i2 -> not a
    opensmt_assert(ctx, opensmt_mk_imply(ctx, i3, b)); //i3 -> b

    opensmt_push(ctx);
    opensmt_assert(ctx, i1);
    opensmt_assert(ctx, i2);
    opensmt_assert(ctx, i3);
    print_r(opensmt_check(ctx)); //a /\ not a /\ b   is unsat, result is okay
    opensmt_pop(ctx);
    opensmt_push(ctx);
    opensmt_assert(ctx, i1);
    opensmt_assert(ctx, i3);
    opensmt_assert(ctx, opensmt_mk_not(ctx,i2));
    print_r(opensmt_check(ctx));//a /\ b is sat, result is okay.
    opensmt_pop(ctx);
    opensmt_push(ctx);
    opensmt_assert(ctx, i1);
    opensmt_assert(ctx, i2);
    opensmt_assert(ctx, opensmt_mk_not(ctx,i3));
    print_r(opensmt_check(ctx));// a /\ not a  is unsat while the result is sat.
    opensmt_pop(ctx);
    opensmt_del_context(ctx);
    return 0;
}