// Copyright (c) 2011 Daniel Grunwald
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

using System;
using System.IO;

namespace ICSharpCode.NRefactory.Utils
{
	/// <summary>
	/// A binary reader that can read the output of BinaryWriterWith7BitEncodedInts.
	/// </summary>
	public sealed class BinaryReaderWith7BitEncodedInts : BinaryReader
	{
		public BinaryReaderWith7BitEncodedInts(Stream stream) : base(stream)
		{
		}

		public override short ReadInt16()
		{
			return unchecked((short)(ushort)base.Read7BitEncodedInt());
		}

		[CLSCompliant(false)]
		public override ushort ReadUInt16()
		{
			return unchecked((ushort)


Apply it.
		_MeshVertexProgram->end(drv);
	}
}

// ***************************************************************************
void	CMeshGeom::renderSkin(CTransformShape *trans, float alphaMRM)
{
	// get the mesh instance.
	CMeshBaseInstance	*mi= safe_cast<CMeshBaseInstance*>(trans);
	// get a ptr on scene
	CScene			*ownerScene= mi->getOwnerScene();
	// get a ptr on renderTrav
	CRenderTrav		*renderTrav= &ownerScene->getRenderTrav();
	// get a ptr on the driver
	IDriver			*drv= renderTrav->getDriver();
	nlassert(drv);

	// get the skeleton model to which I am binded (else NULL).
	CSkeletonModel		*skeleton;
	skeleton= mi->getSkeletonModel();
	// must be skinned for renderSkin()
	nlassert(_Skinned && mi->isSkinned() && skeleton);
	bool bMorphApplied = _MeshMorpher->BlendShapes.size() > 0;
	bool useTangentSpace = _MeshVertexProgram && _MeshVertexProgram->needTangentSpace();

	// Profiling
	//===========
	H_AUTO( NL3D_MeshGeom_RenderSkinned );

	// Morphing
	// ========
	if (bMorphApplied)
	{
		// Since Skinned we must update original skin vertices and normals because skinning use it
		_MeshMorpher->initSkinned(&_VBufferOri,
							 &_VBuffer,
							 useTangentSpace,
							 &_OriginalSkinVertices,
							 &_OriginalSkinNormals,
							 useTangentSpace ? &_OriginalTGSpace : NULL,
							 true );
		_MeshMorpher->updateSkinned (mi->getBlendShapeFactors());
	}

	// Skinning
	// ========

	// NB: the skeleton matrix has already been setuped by CSkeletonModel
	// NB: the normalize flag has already been setuped by CSkeletonModel

	// apply the skinning: _VBuffer is modified.
	applySkin(skeleton);

	// Setup meshVertexProgram
	//===========

	// use MeshVertexProgram effect?
	bool	useMeshVP= _MeshVertexProgram != NULL;
	if( useMeshVP )
	{
		CMatrix		invertedObjectMatrix;
		invertedObjectMatrix = skeleton->getWorldMatrix().inverted();
		// really ok if success to begin VP
		useMeshVP= _MeshVertexProgram->begin(drv, ownerScene, mi, invertedObjectMatrix, renderTrav->CamPos);
	}

	// Render the mesh.
	//===========
	// active VB.
	drv->activeVertexBuffer(_VBuffer);

	// For all _MatrixBlocks
	for(uint mb=0;mb<_MatrixBlocks.size();mb++)
	{
		CMatrixBlock	&mBlock= _MatrixBlocks[mb];
		if(mBlock.RdrPass.size()==0)
			continue;

		// Render all pass.
		for(uint i=0;i<mBlock.RdrPass.size();i++)
		{
			CRdrPass	&rdrPass= mBlock.RdrPass[i];

			// CMaterial Ref
			CMaterial &material=mi->Materials[rdrPass.MaterialId];

			// Setup VP material
			if (useMeshVP)
			{
				_MeshVertexProgram->setupForMaterial(material, drv, ownerScene, &_VBuffer);
			}

			// render primitives
			drv->activeIndexBuffer(rdrPass.PBlock);
			drv->renderTriangles(material, 0, rdrPass.PBlock.getNumIndexes()/3);
		}
	}

	// End VertexProgram effect
	if(useMeshVP)
	{
		// Apply it.
		_MeshVertexProgram->end(drv);
	}

}

// ***************************************************************************
void	CMeshGeom::renderSimpleWithMaterial(IDriver *


th(t, ".cassette"))
	}
}

func marshalGolden(t *testing.T, ctx *CheckFuncCtx) string {
	t.Helper()
	jsonStderr := &bytes.Buffer{}
	jsonStdout := &bytes.Buffer{}

	jsonPrinter, err := NewPrinter(&PrinterConfig{
		OutputFlag: "json=pretty",
		Stdout:     jsonStdout,
		Stderr:     jsonStderr,
	})
	require.NoError(t, err)

	if ctx.Err != nil {
		err = jsonPrinter.Print(ctx.Err, nil)
		require.NoError(t, err)
	}
	if ctx.Result != nil {
		err = jsonPrinter.Print(ctx.Result, nil)
		require.NoError(t, err)
	}

	if _, isRawResult := ctx.Result.(RawResult); !isRawResult {
		validateJSONGolden(t, jsonStdout, jsonStderr)
	}

	buffer := bytes.Buffer{}
	buffer.WriteString(
		fmt.Sprintf(
			"\U0001F3B2\U0001F3B2\U0001F3B2 EXIT CODE: %d \U0001F3B2\U0001F3B2\U0001F3B2\n",
			ctx.ExitCode,
		),
	)

	if len(ctx.Stdout) > 0 {
		buffer.WriteString(
			"\U0001F7E9\U0001F7E9\U0001F7E9 STDOUT \U0001F7E9\U0001F7E9\U0001F7E9\n",
		)
		buffer.Write(ctx.Stdout)
	}

	if len(ctx.Stderr) > 0 {
		buffer.WriteString(
			"\U0001F7E5\U0001F7E5\U0001F7E5 STDERR \U0001F7E5\U0001F7E5\U0001F7E5\n",
		)
		buffer.Write(ctx.Stderr)
	}

	if jsonStdout.Len() > 0 {
		buffer.WriteString(
			"\U0001F7E9\U0001F7E9\U0001F7E9 JSON STDOUT \U0001F7E9\U0001F7E9\U0001F7E9\n",
		)
		buffer.Write(jsonStdout.Bytes())
	}

	if jsonStderr.Len() > 0 {
		buffer.WriteString(
			"\U0001F7E5\U0001F7E5\U0001F7E5 JSON STDERR \U0001F7E5\U0001F7E5\U0001F7E5\n",
		)
		buffer.Write(jsonStderr.Bytes())
	}

	str := buffer.String()
	// In order to avoid diff in goldens we set all timestamp to the same date
	str = uniformTimestamps(str)
	// Replace Windows return carriage.
	str = strings.ReplaceAll(str, "\r", "")

	return str
}
package config

import (
	"bytes"
	"fmt"
	"os"
	"path/filepath"
	"runtime"
	"text/template"

	"github.com/scaleway/scaleway-cli/v2/internal/alias"
	"github.com/scaleway/scaleway-sdk-go/scw"
	"gopkg.in/yaml.v3"
)

const (
	ScwConfigPathEnv = "SCW_CLI_CONFIG_PATH"

	DefaultConfigFileName   = "cli.yaml"
	defaultConfigPermission = 0o644

	DefaultOutput      = "human"
	configFileTemplate = `# Scaleway CLI config file
# This config file can be used only with Scaleway CLI (>2.0.0) (https://github.com/scaleway/scaleway-cli)
# Output sets the output format for all commands you run
{{ if .Output }}output: {{ .Output }}{{ else }}# output: human{{ end }}

# Alias creates custom aliases for your Scaleway CLI commands
{{- if .Alias }}
alias:
    aliases:
        {{- range $alias, $commands := .Alias.Aliases }}
        {{ $alias }}:
        {{- range $index, $command := $commands }}
            - {{ $command }}
        {{- end }}
        {{- end }}
{{- else }}
# alias


Sink<T>(EventSink<T> disposable) {
    _disposeSinks ??= [];
    _disposeSinks.add(disposable);
    _checkIfAlreadyDisposed();
    return disposable;
  }

  /// Registers [disposable].
  DisposeFunction addFunction(DisposeFunction disposable) {
    assert(disposable != null);
    _disposeFunctions ??= [];
    _disposeFunctions.add(disposable);
    _checkIfAlreadyDisposed();
    return disposable;
  }

  // In dev-mode, throws if a oneShot disposer was already disposed.
  void _checkIfAlreadyDisposed() {
    assert(!(_oneShot && _disposeCalled), _oneShotDisposerMemoryLeakWarning);
  }

  @mustCallSuper
  @override
  void dispose() {
    if (_disposeSubs != null) {
      int len = _disposeSubs.length;
      for (var i = 0; i < len; i++) {
        _disposeSubs[i].cancel();
      }
      _disposeSubs = null;
    }
    if (_disposeSinks != null) {
      int len = _disposeSinks.length;
      for (var i = 0; i < len; i++) {
        _disposeSinks[i].close();
      }
      _disposeSinks = null;
    }
    if (_disposeDisposables != null) {
      int len = _disposeDisposables.length;
      for (var i = 0; i < len; i++) {
        _disposeDisposables[i].dispose();
      }
      _disposeDisposables = null;
    }
    if (_disposeFunctions != null) {
      int len = _disposeFunctions.length;
      for (var i = 0; i < len; i++) {
        _disposeFunctions[i]();
      }
      _disposeFunctions = null;
    }
    _disposeCalled = true;
  }
}
// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:html';
import 'dart:js' as js;

import 'package:js/js_util.dart' as js_util;

/// Provides information of current browser features.

/// Detects if the current device and platform supports hovering.
///
/// Nexus 9 is a special case here because it does not match the
/// "(hover: none)" media query.
bool supportsHover(Window window) =>
    !((window.matchMedia("(hover: none)")?.matches ?? false) ||
        window.navigator.userAgent.contains("Nexus 9"));

/// Whether the primary input mechanism on this system is touch.
///
/// Note: this check doesn't confirm the presence of a touchscreen, or that
/// [TouchEvent] is supported at all. Any device which doesn't have a mouse
/// or other fine-grained pointing device will pass this check, e.g. a TV, or
/// a PC with alternative input devices.
///
/// Checking if touch events are supported? You probably want
/// [TouchEvent.supported] instead.
final bool isTouchInterface =
    (window.matchMedia('(pointer: coarse)').matches ?? false) ||
        js.context.hasProperty('__acxForceTouchEnabled');

/// Returns true if Hammer.js is loaded in the current browser.
///
/// Hammer provides support for detection of additional touch gestures.
/// Apps that want to use Hammer's recognizers need to load
/// https://www.gstatic.com/external_hosted/hammerjs/v2_0_2/hammer.min.js
/// into the browser before bootstrapping.
bool isHammerLoaded() => js.context.hasProperty('Hammer');

/// Whether the browser supports the Web Animations API.
final bool supportsAnimationApi =
    js_util.hasProperty(DivElement(), 'animate') &&
        !js.context.hasProperty('__acxDisableWebAnimationsApi');

/// Whether the browser supports IntersectionObserver.
final bool supportsIntersectionObserver =
    js.context.hasProperty('IntersectionObserver');

/// Whether the browser supports ResizeObserver.
final bool supportsResizeObserver =


m.status, item.woodcode, item.pcode);
                if (mlmtrl_rqs.ContainsKey(key) && mlmtrl_rqs[key].Contains(item))
                {
                    mlmtrl_rqs[key].Remove(item);
                }
                return base.Remove(item);
            }
            else
            {
                return false;
            }
        }

        public override void Clear()
        {
            ml_rqs.Clear();
            mlmtrl_rqs.Clear();
            base.Clear();
        }

        public IList<RqMtrlObject> GetRqs(string ML_ID)
        {
            List<RqMtrlObject> rslt = new List<RqMtrlObject>();
            if (ml_rqs.ContainsKey(ML_ID))
            {
                foreach (var rq in ml_rqs[ML_ID])
                {
                    rslt.Add(rq);
                }
            }
            return rslt;
        }

        public string ToRqMtrl_ID(string ML_ID, int mtrlid, string status, string woodcode, string pcode)
        {
            return ML_ID + "rqmtrl:" + mtrlid + "," + status + "," + woodcode + "," + pcode;
        }

        public IList<RqMtrlObject> GetRqs(string ML_ID, int mtrlid, string status, string woodcode, string pcode)
        {
            var rslt = new List<RqMtrlObject>();
            var key = ToRqMtrl_ID(ML_ID, mtrlid, status, woodcode, pcode);
            if (mlmtrl_rqs.ContainsKey(key))
            {
                rslt.AddRange(mlmtrl_rqs[key]);
            }
            return rslt;
        }
    }
}


"""Fixtures for AI service end-to-end tests."""

import pytest

from coinbase_agentkit.action_providers.hyperboliclabs.ai.service import AIService

@pytest.fixture
def ai_service(api_key: str) -> AIService:
    """Create AIService instance for testing.

    Args:
        api_key: API key for authentication.

    Returns:
        AIService: Instance of AIService for testing.

    """
    return AIService(api_key)


return PVR_ERROR_SERVER_ERROR;
  }

  timer.GetPVRtimerinfo(timerinfo);
  return PVR_ERROR_NO_ERROR;
}

PVR_ERROR cPVRClientMediaPortal::AddTimer(const PVR_TIMER &timerinfo)
{
  string         result;

#ifdef _TIME32_T_DEFINED
  XBMC->Log(LOG_DEBUG, "->AddTimer Channel: %i, starttime: %i endtime: %i program: %s", timerinfo.iClientChannelUid, timerinfo.startTime, timerinfo.endTime, timerinfo.strTitle);
#else
  XBMC->Log(LOG_DEBUG, "->AddTimer Channel: %i, 64 bit times not yet supported!", timerinfo.iClientChannelUid);
#endif

  if (!IsUp())
    return PVR_ERROR_SERVER_ERROR;

  cTimer timer(timerinfo);

  if ((timerinfo.startTime > 0) && (timerinfo.iEpgUid != -1))
  {
    /* New scheduled recording, not an instant or manual recording
     * Present a custom dialog with advanced recording settings
     */
    std::string strChannelName;
    if (timerinfo.iClientChannelUid >= 0)
    {
      strChannelName = m_channelNames[timerinfo.iClientChannelUid];
    }
    CGUIDialogRecordSettings dlgRecSettings( timerinfo, timer, strChannelName);

    int dlogResult = dlgRecSettings.DoModal();

    if (dlogResult == 0)
      return PVR_ERROR_NO_ERROR;						// user canceled timer in dialog
  }

  result = SendCommand(timer.AddScheduleCommand());

  if(result.find("True") ==  string::npos)
  {
    XBMC->Log(LOG_DEBUG, "AddTimer for channel: %i [failed]", timerinfo.iClientChannelUid);
    return PVR_ERROR_FAILED;
  }
  XBMC->Log(LOG_DEBUG, "AddTimer for channel: %i [done]", timerinfo.iClientChannelUid);

  // Although XBMC adds this timer, we still have to trigger XBMC to update its timer list to
  // see this new timer at the XBMC side
  PVR->TriggerTimerUpdate();
  if ( timerinfo.startTime <= 0)
  {
    // Refresh the recordings list to see the newly created recording
    usleep(100000);
    PVR->TriggerRecordingUpdate();
  }

  return PVR_ERROR_NO_ERROR;
}

PVR_ERROR cPVRClientMediaPortal::DeleteTimer(const PVR_TIMER &timer, bool UNUSED(bForceDelete))
{
  char           command[256];
  string         result;

  if (!IsUp())
    return PVR_ERROR_SERVER_ERROR;

  cTimer mepotimer(timer);

  snprintf(command, 256, "DeleteSchedule:%i\n", mepotimer.Index());

  XBMC->Log(LOG_DEBUG, "DeleteTimer: About to delete MediaPortal schedule index=%i", mepotimer.Index());
  result = SendCommand(command);

  if(result.find("True") ==  string::npos)
  {
    XBMC->Log(LOG_DEBUG, "DeleteTimer %i [failed]", mepotimer.Index());
    return PVR_ERROR_FAILED;
  }
  XBMC->Log(LOG_DEBUG, "DeleteTimer %i [done]", mepotimer.Index());

  // Although XBMC deletes this timer, we still have to trigger XBMC to update its timer list to
  // remove the timer from the XBMC list
  PVR->TriggerTimerUpdate();

  return PVR_ERROR_NO_ERROR;
}

PVR_ERROR cPVRClientMediaPortal::UpdateTimer(const PVR_TIMER &timerinfo)
{
  string         result;

#ifdef _TIME32_T_DEFINED
  XBMC->Log(LOG_DEBUG, "->UpdateTimer Index: %i Channel: %i, starttime: %i endtime: %i program: %s", timerinfo.iClientIndex, timerinfo.iClientChannelUid, timerinfo.startTime, timerinfo.endTime, timerinfo.strTitle);
#else
  XBMC->Log(LOG_DEBUG, "->Up


 || op == nir_op_umax ||
          op == nir_op_iand || op == nir_op_ior || op == nir_op_fmin || op == nir_op_fmax);

   if (inc) {
      emit_uniform_subgroup(ctx, instr, get_ssa_temp(ctx, instr->src[0].ssa));
      return true;
   }

   /* Copy the source and write the reduction operation identity to the first lane. */
   Temp lane = bld.sop1(Builder::s_ff1_i32, bld.def(s1), Operand(exec, bld.lm));
   Temp src = get_ssa_temp(ctx, instr->src[0].ssa);
   ReduceOp reduce_op = get_reduce_op(op, instr->src[0].ssa->bit_size);
   if (dst.bytes() == 8) {
      Temp lo = bld.tmp(v1), hi = bld.tmp(v1);
      bld.pseudo(aco_opcode::p_split_vector, Definition(lo), Definition(hi), src);
      uint32_t identity_lo = get_reduction_identity(reduce_op, 0);
      uint32_t identity_hi = get_reduction_identity(reduce_op, 1);

      lo =
         bld.writelane(bld.def(v1), bld.copy(bld.def(s1, m0), Operand::c32(identity_lo)), lane, lo);
      hi =
         bld.writelane(bld.def(v1), bld.copy(bld.def(s1, m0), Operand::c32(identity_hi)), lane, hi);
      bld.pseudo(aco_opcode::p_create_vector, dst, lo, hi);
   } else {
      uint32_t identity = get_reduction_identity(reduce_op, 0);
      bld.writelane(dst, bld.copy(bld.def(s1, m0), Operand::c32(identity)), lane,
                    as_vgpr(ctx, src));
   }

   set_wqm(ctx);
   return true;
}

Temp
emit_reduction_instr(isel_context* ctx, aco_opcode aco_op, ReduceOp op, unsigned cluster_size,
                     Definition dst, Temp src)
{
   assert(src.bytes() <= 8);
   assert(src.type() == RegType::vgpr);

   Builder bld(ctx->program, ctx->block);

   unsigned num_defs = 0;
   Definition defs[5];
   defs[num_defs++] = dst;
   defs[num_defs++] = bld.def(bld.lm); /* used internally to save/restore exec */

   /* scalar identity temporary */
   bool need_sitmp = (ctx->program->gfx_level <= GFX7 || ctx->program->gfx_level >= GFX10) &&
                     aco_op != aco_opcode::p_reduce;
   if (aco_op == aco_opcode::p_exclusive_scan) {
      need_sitmp |= (op == imin8 || op == imin16 || op == imin32 || op == imin64 || op == imax8 ||
                     op == imax16 || op == imax32 || op == imax64 || op == fmin16 || op == fmin32 ||
                     op == fmin64 || op == fmax16 || op == fmax32 || op == fmax64 || op == fmul16 ||
                     op == fmul64);
   }
   if (need_sitmp)
      defs[num_defs++] = bld.def(RegType::sgpr, dst.size());

   /* scc clobber */
   defs[num_defs++] = bld.def(s1, scc);

   /* vcc clobber */
   bool clobber_vcc = false;
   if ((op == iadd32 || op == imul64) && ctx->program->gfx_level < GFX9)
      clobber_vcc = true;
   if ((op == iadd8 || o


s	status_;					\
									\
	if ((__VA_ARGS__)) {						\
		status_ = WFR_STATUS_CONDITION_SUCCESS;			\
	} else {							\
		status_ = WFR_STATUS_FROM_ERRNO1((errno1));		\
	}								\
									\
	(status) = status_;						\
	WFR_STATUS_SUCCESS(status);					\
})
#define WFR_STATUS_SUCCESS_ERRNO1(...)					\
	WFR_STATUS_BIND_ERRNO1(__VA_ARGS__)
#define WFR_STATUS_FAILURE_ERRNO1(...)					\
	!WFR_STATUS_BIND_ERRNO1(__VA_ARGS__)
#define WFR_SUCCESS_ERRNO1(...)						\
	WFR_STATUS_BIND_ERRNO1(__VA_ARGS__)
#define WFR_FAILURE_ERRNO1(...)						\
	!WFR_STATUS_BIND_ERRNO1(__VA_ARGS__)

/*
 * WfrStatus constructors from POSIX errno, GDI+ return codes, Windows results,
 * Windows NT NTSTATUS, Windows COM HRESults, and PCRE2 error codes
 */

#define WFR_STATUS_FROM_ERRNO()				\
	WFR_STATUS(WFR_STATUS_FACILITY_POSIX, WFR_STATUS_SEVERITY_ERROR, errno)
#define WFR_STATUS_FROM_ERRNO1(errno_)			\
	WFR_STATUS(WFR_STATUS_FACILITY_POSIX, WFR_STATUS_SEVERITY_ERROR, (errno_))
#define WFR_STATUS_FROM_GDI_PLUS(rc)			\
	WFR_STATUS(WFR_STATUS_FACILITY_GDI_PLUS, WFR_STATUS_SEVERITY_ERROR, (rc))
#define WFR_STATUS_FROM_WINDOWS()			\
	WFR_STATUS(WFR_STATUS_FACILITY_WINDOWS, WFR_STATUS_SEVERITY_ERROR, GetLastError())
#define WFR_STATUS_FROM_WINDOWS1(dwResult)		\
	WFR_STATUS(WFR_STATUS_FACILITY_WINDOWS, WFR_STATUS_SEVERITY_ERROR, (dwResult))
#define WFR_STATUS_FROM_WINDOWS_NT(ntstatus)		\
	WFR_STATUS(WFR_STATUS_FACILITY_WINDOWS_NT, WFR_STATUS_SEVERITY_ERROR, (ntstatus))
#define WFR_STATUS_FROM_WINDOWS_HRESULT(hres)		\
	WFR_STATUS(WFR_STATUS_FACILITY_WINDOWS, WFR_STATUS_SEVERITY_ERROR, (WfrStatusCondition)(hres))
#define WFR_STATUS_FROM_PCRE2(condition, severity)	\
	WFR_STATUS(WFR_STATUS_FACILITY_PCRE2, (severity), (condition))

/*
 * Check if WfrStatus is POSIX or Windows error that indicates non-existence
 * of an item, file, or resource, etc.
 */

#ifndef ERROR_FILE_NOT_FOUND
#define ERROR_FILE_NOT_FOUND	2
#endif /* !ERROR_FILE_NOT_FOUND */
#ifndef ERROR_PATH_NOT_FOUND
#define ERROR_PATH_NOT_FOUND	3
#endif /* !ERROR_PATH_NOT_FOUND */
#define WFR_STATUS_IS_NOT_FOUND(status)						\
	(   WFR_STATUS_FAILURE((status))					\
	 && (((WFR_STATUS_FACILITY((status)) == WFR_STATUS_FACILITY_POSIX)	\
	 &&   (WFR_STATUS_CONDITION((status)) == ENOENT))			\
	 ||  ((WFR_STATUS_FACILITY((status)) == WFR_STATUS_FACILITY_WINDOWS)	\
	 &&   (WFR_STATUS_CONDITION((status)) == ERROR_FILE_NOT_FOUND))		\
	 ||  ((WFR_STATUS_FACILITY((status)) == WFR_STATUS_FACILITY_WINDOWS)	\
	 &&   (WFR_STATUS_CONDITION((status)) == ERROR_PATH_NOT_FOUND))))

/*
 * Getters
 */

#define WFR_STATUS_CONDITION(status)	\
	(status).condition
#define WFR_STATUS_FACILITY(status)	\
	(status).facility
#define WFR_STATUS_SEVERITY(status)	\
	(status).severity

#define WFR_STATUS_FAILURE(status)	\
	((WFR_STATUS_SEVERITY(status) & 0x1) == 0)
#define WFR_FAILURE(status)		\
	WFR_STATUS_FAILURE(status)

#define WFR_STATUS_SUCCESS(status)	\
	((WFR_STATUS_SEVERITY(status) & 0x1) == 1)
#define WFR_SUCCESS(status)		\
	WFR_STATUS_SUCCESS(status)

#endif // !PUTTY_WINFRIP_RTL_STATUS_H

/*
 * vim:noexpandtab sw=8 ts=8 tw=0
 */


 some
// kind of voter in the next new config (potentially VOTER_DEMOTING).
//
// It is possible (and sometimes needed) that while in the joint configuration,
// the replica being removed will receive lease. This is allowed only if
// a) there is a VOTER_INCOMING replica to which the lease will be trasferred
// when transitioning out of the joint config, and b) the replica being removed
// was the last leaseholder (as indictated by wasLastLeaseholder). The
// information we use for (b) is potentially stale, but if it incorrect
// the removed node either does not need to get the lease or will not be able
// to get it. In particular, when we think we are the last leaseholder but we
// aren't, the CAS call for extending the lease will fail (see
// wasLastLeaseholder := isExtension in cmd_lease_request.go).
//
// An error is also returned is the replica is not part of `replDescs`.
// NB: This logic should be in sync with constraint_stats_report as report
// will check voter constraint violations. When changing this method, you need
// to update replica filter in report to keep it correct.
func CheckCanReceiveLease(
	wouldbeLeaseholder ReplicaDescriptor, replDescs ReplicaSet, wasLastLeaseholder bool,
) error {
	repDesc, ok := replDescs.GetReplicaDescriptorByID(wouldbeLeaseholder.ReplicaID)
	if !ok {
		return ErrReplicaNotFound
	}
	if repDesc.StoreID != wouldbeLeaseholder.StoreID {
		return errors.AssertionFailedf("store ID mismatch: %d != %d",
			repDesc.StoreID, wouldbeLeaseholder.StoreID)
	}
	if repDesc.NodeID != wouldbeLeaseholder.NodeID {
		return errors.AssertionFailedf("node ID mismatch: %d != %d",
			repDesc.NodeID, wouldbeLeaseholder.NodeID)
	}
	if !(repDesc.IsVoterNewConfig() ||
		(repDesc.IsVoterOldConfig() && replDescs.containsVoterIncoming() && wasLastLeaseholder)) {
		// We allow a demoting / incoming voter to receive the lease if there's an incoming voter.
		// In this case, when exiting the joint config, we will transfer the lease to the incoming
		// voter.
		return ErrReplicaCannotHoldLease
	}
	return nil
}
// Copyright 2022 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.

package tenantsettingswatcher

import (
	"context"
	"sort"

	"github.com/cockroachdb/cockroach/pkg/kv/kvpb"
	"github.com/cockroachdb/cockroach/pkg/roachpb"
	"github.com/cockroachdb/cockroach/pkg/settings"
	"github.com/cockroachdb/cockroach/pkg/util"
	"github.com/cockroachdb/cockroach/pkg/util/buildutil"
	"github.com/cockroachdb/cockroach/pkg/util/log"
	"github.com/cockroachdb/cockroach/pkg/util/syncutil"
	"github.com/cockroachdb/errors"
	"github.com/cockroachdb/redact"
)

// overridesStore is the data structure that maintains all the tenant overrides
// in memory.
//
// It is designed for efficient read access and to allow multiple goroutines to
// listen for changes. We expect changes to setting overrides to be rare (it is
// a manual operation), so the efficiency of updates is not very important.
//
// This data structure treats the special tenant 0 (which stores the all-tenant
// overrides) as any other tenant.
type overridesStore struct {
	mu struct {
		syncutil.RWMutex

		// The tenants map stores the current overrides for each tenant that either
		// has had an override set i


]]

---
background-image: url(../img/foundation/file-tree.svg)

---
background-image: url(../img/foundation/file-tree-stack-safety.svg)

---
# JVM memory model

---
# JVM memory model

---
.forty-seven-left[
# Explicit data structure
```scala mdoc:reset
import java.io.File
import scala.collection.mutable

def diskUsage(input: File): Long = {
  var total = 0L
  val queue = mutable.Queue(input)

  while (queue.nonEmpty) {
    val file = queue.dequeue()

    total += file.length()

    if(file.isDirectory)
      queue.addAll(file.listFiles())
  }

  total
}
```
]

.forty-seven-right[
# Implicit data structure

```scala mdoc:reset
import java.io.File

def diskUsage(file: File): Long =
  if(file.isDirectory) {
    val childrenDiskUsage = file
      .listFiles      // Array[File]
      .map(diskUsage) // Array[Long]
      .sum            // Long

    file.length() + childrenDiskUsage
  } else
    file.length()
```
]

---
background-image: url(../img/foundation/tree-elements-1.svg)

# How many elements?

---
background-image: url(../img/foundation/tree-unbalanced.svg)

# Unbalanced tree

---
background-image: url(../img/foundation/tree-elements-2.svg)

# How many elements?

---
background-image: url(../img/foundation/deep-linked-list.svg)

# List

---
# Recursive sum

```scala mdoc:reset
def sum(numbers: List[Int]): Int =
  ???
```

---
# Recursive sum

.forty-seven-left[
```scala mdoc:reset
def sum(numbers: List[Int]): Int =
  numbers match {
    case Nil          => ???
    case head :: tail => ???
  }
```
]

.forty-seven-right[
```scala
enum List[+A] {
  case Nil
  case ::(head: A, tail: List[A])
}
```
]

---
# Recursive sum

.forty-seven-left[
```scala mdoc:reset
def sum(numbers: List[Int]): Int =
  numbers match {
    case Nil          => ???
    case head :: tail => ???
  }
```

```scala mdoc:reset
def sum(numbers: List[Int]): Int =
  numbers match {
    case Nil            => ???
    case ::(head, tail) => ???
  }
```
]

.forty-seven-right[
```scala
enum List[+A] {
  case Nil
  case ::(head: A, tail: List[A])
}
```
]

---
# Recursive sum

```scala mdoc:reset
def sum(numbers: List[Int]): Int =
  numbers match {
    case Nil          => 0
    case head :: tail => sum(tail) + head
  }
```

---
# Recursive sum

```scala mdoc:reset
def sum(numbers: List[Int]): Int =
  numbers match {
    case Nil          => 0
    case head :: tail => sum(tail) + head
  }
```

```scala mdoc
sum(List(1,2,3,4,5))
```

```scala
val largeList = List.range(1, 10000)
// largeList: List[Int] = List(1,2,3,4,...,10000)

sum(largeList)
// java.lang.StackOve


ach nochmal ;)"); //Bei falscher Eingabe
            init(); //Funktionsaufruf um Eingabe einer Zahl neu zu starten
        }
    }

    function drawDiv(_x: number, _y: number, _color: string, _height: number, _width: number): void {

        let div: HTMLDivElement = document.createElement("div"); //div-Element wird erstellen
        div.style.marginLeft = _x + "px";
        div.style.marginTop = _y + "px";
        div.style.width = _width + "px";
        div.style.height = _height + "px";
        div.style.backgroundColor = _color;
        div.style.display = "inline";
        div.style.position = "absolute";
        document.body.appendChild(div); //html ELement in body hinzufgen
    }
}import * as child_process from 'child_process'
import chalk from 'chalk'
import type { PackageManagerNames } from '../src/core/packageManagers/PackageManagerStrategy'
import {
  buildDockerImage,
  createDockerImageFromContainer,
  runInsideDockerContainer,
} from './DockerHelper'
import { configurationsToTest } from './ConfigurationsToTest'
import { asyncRunCommand } from '../src/core/Utils'

const startContainer = async (imageName: string) => {
  const result = child_process
    .execSync(`docker run -d -t --rm ${imageName}`)
    .toString()
    .substr(0, 12)
  // Create container to run gwa in
  await asyncRunCommand(`docker exec ${result} mkdir /usr/src/generated`)
  return result
}

const stopContainer = async (containerID: string) => {
  await asyncRunCommand(`docker kill ${containerID}`)
}

const statusUpdate = chalk.white.inverse

export type ConfigForInstallation = {
  projectName: string
  packageManager: PackageManagerNames
  extensionOptions: string
}

const saveContainersToImages = Boolean('truthy')

/**
 * Creates a new Docker container from the GWA image, attempts to install the given setup and tries to run `npm
 * build` in the finished installation.
 * @param config
 * @returns installationWasSuccessful - True, iff the installation and build process succeeded
 */
const installAndBuildConfigInsideNewDockerContainer = async (
  config: ConfigForInstallation,
) => {
  console.log(statusUpdate('Creating new container'))
  const containerID = await startContainer('generate-web-app')
  console.log(`Container ID is ${containerID}`)

  let installationWasSuccessful = true

  try {
    console.log(statusUpdate(`Installing ${config.projectName}`))

    const command = [
      `gwa ${config.projectName}`,
      `-p ${config.packageManager}`,
      config.extensionOptions,
    ].join(' ')
    console.log(`Installation command: ${command}`)

    await runInsideDockerContainer(containerID, command)

    console.log(statusUpdate(`Attempting to build ${config.projectName}`))
    await runInsideDockerContainer(
      containerID,
      'npm run build',
      `/usr/src/generated/${config.projectName}`,
    )
    console.log(statusUpdate('Success'))
  } catch (err) {
    console.error(
      chalk.inverse.red(`Installation of ${config.projectName} failed!`),
    )
    installationWasSuccessful = false
  } finally {
    if (saveContainersToImages) {
      const imageName = `gwa-test:${config.projectName}`
      console.log(
        statusUpdate(`Saving container ${containerID} to image "${imageName}"`),
      )
      await createDockerImageFromContainer(
        containerID,
        imageName,
        config.projectName,
        config.extensionOptions.includes('--angular') ? '4200' :


apshot.Status = VoterStatus.VotedYay;
            }
            else if (ballot.Vote == Vote.Nay)
            {
                period.NayBallots++;
                period.NayVotingPower += ballot.VotingPower;
                snapshot.Status = VoterStatus.VotedNay;
            }
            else
            {
                period.PassBallots++;
                period.PassVotingPower += ballot.VotingPower;
                snapshot.Status = VoterStatus.VotedPass;
            }

            sender.BallotsCount++;

            block.Operations |= Operations.Ballots;

            Cache.AppState.Get().BallotOpsCount++;
            #endregion

            Db.BallotOps.Add(ballot);
            Context.BallotOps.Add(ballot);
        }

        public virtual async Task Revert(Block block, BallotOperation ballot)
        {
            #region entities
            var sender = Cache.Accounts.GetDelegate(ballot.SenderId);

            var snapshot = await Db.VotingSnapshots
                .FirstAsync(x => x.Period == ballot.Period && x.BakerId == ballot.SenderId);

            var period = await Cache.Periods.GetAsync(ballot.Period);

            Db.TryAttach(sender);
            Db.TryAttach(period);
            #endregion

            #region revert operation
            if (ballot.Vote == Vote.Yay)
            {
                period.YayBallots--;
                period.YayVotingPower -= ballot.VotingPower;
                snapshot.Status = VoterStatus.None;
            }
            else if (ballot.Vote == Vote.Nay)
            {
                period.NayBallots--;
                period.NayVotingPower -= ballot.VotingPower;
                snapshot.Status = VoterStatus.None;
            }
            else
            {
                period.PassBallots--;
                period.PassVotingPower -= ballot.VotingPower;
                snapshot.Status = VoterStatus.None;
            }

            sender.BallotsCount--;

            Cache.AppState.Get().BallotOpsCount--;
            #endregion

            Db.BallotOps.Remove(ballot);
            Cache.AppState.ReleaseOperationId();
        }
    }
}


w(Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28_il2cpp_TypeInfo_var, (uint32_t)4);
		((Image_t18FED07D8646917E1C563745518CF3DD57FF0B3E_StaticFields*)il2cpp_codegen_static_fields_for(Image_t18FED07D8646917E1C563745518CF3DD57FF0B3E_il2cpp_TypeInfo_var))->set_s_Uv_53(L_3);
		// static List<Image> m_TrackedTexturelessImages = new List<Image>();
		List_1_tA9C10612DACE8F188F3B35F6173354C7225A0883 * L_4 = (List_1_tA9C10612DACE8F188F3B35F6173354C7225A0883 *)il2cpp_codegen_object_new(List_1_tA9C10612DACE8F188F3B35F6173354C7225A0883_il2cpp_TypeInfo_var);
		List_1__ctor_m18CBC02B1F10B9B4680AB41044B9C5857ED08016(L_4, /*hidden argument*/List_1__ctor_m18CBC02B1F10B9B4680AB41044B9C5857ED08016_RuntimeMethod_var);
		((Image_t18FED07D8646917E1C563745518CF3DD57FF0B3E_StaticFields*)il2cpp_codegen_static_fields_for(Image_t18FED07D8646917E1C563745518CF3DD57FF0B3E_il2cpp_TypeInfo_var))->set_m_TrackedTexturelessImages_54(L_4);
		return;
	}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#


mport org.diffkt.*
import kotlin.math.abs
import kotlin.math.pow
import kotlin.random.Random
import testutils.*

class StatsTest : AnnotationSpec() {
    @Test
    fun `test DTensor stats`() {
        fun testStatsWithSeed(seed: Int) {
            val random = Random(seed)
            val mean = random.nextDouble(from = -100.0, until = 100.0).toFloat()
            val stdev = random.nextDouble(from = 1.0, until = 100.0).toFloat()
            val variance = stdev.pow(2)
            val x = FloatTensor(Shape(1000)) { nextRandom(random, mean, stdev) }
            val (computedMean, computedVariance) = x.stats()
            abs((computedMean - mean).value / mean) shouldBeLessThan 0.1F
            abs((computedVariance - variance).value / variance) shouldBeLessThan 0.1F
        }
        for (i in 0..3) testStatsWithSeed(12345 + i)
    }
}

/**
 * The standard deviation of random.nextFloat()
 */
private val stddevUniform = 1 / kotlin.math.sqrt(12F)

/**
 * Produce a random float with the given mean and standard deviation.
 * Any distribution would do, but here we implement a uniform distribution.
 */
fun nextRandom(random: Random, mean: Float, stddev: Float): Float {
    val x = (random.nextFloat() - 0.5F) / stddevUniform // mean 0, stddev 1
    return (x * stddev) + mean
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

package org.diffkt.ops

import io.kotest.assertions.throwables.shouldThrow
import io.kotest.core.spec.style.AnnotationSpec
import io.kotest.matchers.shouldBe
import org.diffkt.*
import testutils.*

class ConcatTest : AnnotationSpec() {

    @Test fun axis0() {
        val xShape = Shape(2, 3)
        val yShape = Shape(5, 3)
        val x = FloatTensor(xShape) { it.toFloat() }
        val y = FloatTensor(yShape) { it.toFloat() }
        fun f(x: DTensor, y: DTensor): DTensor = x.concat(y, axis = 0)

        val outShape = Shape(7, 3)
        checkForwardDerivatives(x, y, ::f, outShape)
        checkReverseDerivatives(x, y, ::f, outShape)
        checkMixedDerivatives(x, y, ::f, outShape)
    }

    @Test fun axis2() {
        val xShape = Shape(2, 3, 5, 2)
        val yShape = Shape(2, 3, 1, 2)
        val x = FloatTensor(xShape) { it.toFloat() }
        val y = FloatTensor(yShape) { it.toFloat() }
        fun f(x: DTensor, y: DTensor): DTensor = x.concat(y, axis = 2)

        val outShape = Shape(2, 3, 6, 2)
        checkForwardDerivatives(x, y, ::f, outShape)
        checkReverseDerivatives(x, y, ::f, outShape)
        checkMixedDerivatives(x, y, ::f, outShape)
    }

    private fun checkForwardDerivatives(x: DTensor, y: DTensor, f: (DTensor, DTensor) -> DTensor, outShape: Shape) {
        val der0 = f(x, y)
        val (dx1, dy1) = forwardDerivative(x, y


desk_id"`
	Offset int   `json:"offset"`
	Count  int   `json:"count"`
}

type HistoryLite struct {
	Id           int64  `json:"id"`
	DeskId       int64  `json:"desk_id"`
	Mode         int    `json:"mode"`
	BeginAt      int64  `json:"begin_at"`
	BeginAtStr   string `json:"begin_at_str"`
	EndAt        int64  `json:"end_at"`
	PlayerName0  string `json:"player_name0"`
	PlayerName1  string `json:"player_name1"`
	PlayerName2  string `json:"player_name2"`
	PlayerName3  string `json:"player_name3"`
	ScoreChange0 int    `json:"score_change0"`
	ScoreChange1 int    `json:"score_change1"`
	ScoreChange2 int    `json:"score_change2"`
	ScoreChange3 int    `json:"score_change3"`
}

type History struct {
	HistoryLite
	Snapshot string `json:"snapshot"`
}

type HistoryLiteListResponse struct {
	Code  int           `json:"code"`
	Total int64         `json:"total"` //总数量
	Data  []HistoryLite `json:"data"`
}

type HistoryListResponse struct {
	Code  int       `json:"code"`
	Total int64     `json:"total"` //总数量
	Data  []History `json:"data"`
}

type HistoryByIDResponse struct {
	Code int      `json:"code"`
	Data *History `json:"data"`
}
package db

import (
	"fmt"
	"strings"
)

type Option func(setting *Setting)
type Closer func()

type Setting struct {
	ShowSQL      bool
	MaxOpenConns int
	MaxIdleConns int
}

func MaxIdleConnOption(i int) Option {
	return func(s *Setting) {
		s.MaxIdleConns = i
	}
}

func MaxOpenConnOption(i int) Option {
	return func(s *Setting) {
		s.MaxOpenConns = i
	}
}

func ShowSQLOption(show bool) Option {
	return func(s *Setting) {
		s.ShowSQL = show
	}
}

// Build data source name
func BuildDSN(host string, port int, username, password, dbname, args string) string {
	return fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?%s", username, password, host, port, dbname, args)
}

//// 根据一个大区信息, 返回大区的SQL条件语句
//// 例如: area: {AreaID: 100, ServerIDs: []int{1, 2, 3, 5}}
//// 返回: (`area_id`=100 AND `server_id` IN(1,2,3,5))
//func AreaCondition(area *protocol.Area) string {
//	if len(area.ServerIDs) > 0 {
//		servers := []string{}
//		for _, id := range area.ServerIDs {
//			servers = append(servers, strconv.Itoa(id))
//		}
//		return fmt.Sprintf("(`area_id`=%d AND `server_id` IN(%s))", area.AreaID, strings.Join(servers, ","))
//	} else {
//		return fmt.Sprintf("`area_id`=%d", area.AreaID)
//	}
//}
//
//func AreaVectorCondition(areas []*protocol.Area) string {
//	conditions := []string{}
//	f


3.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { ViewCreationOptionsDto.fromList(it) }
      }
      154.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { CameraPositionDto.fromList(it) }
      }
      155.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { MarkerDto.fromList(it) }
      }
      156.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { MarkerOptionsDto.fromList(it) }
      }
      157.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { ImageDescriptorDto.fromList(it) }
      }
      158.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { InfoWindowDto.fromList(it) }
      }
      159.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { MarkerAnchorDto.fromList(it) }
      }
      160.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { PolygonDto.fromList(it) }
      }
      161.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { PolygonOptionsDto.fromList(it) }
      }
      162.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { PolygonHoleDto.fromList(it) }
      }
      163.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { StyleSpanStrokeStyleDto.fromList(it) }
      }
      164.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { StyleSpanDto.fromList(it) }
      }
      165.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { PolylineDto.fromList(it) }
      }
      166.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { PatternItemDto.fromList(it) }
      }
      167.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { PolylineOptionsDto.fromList(it) }
      }
      168.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { CircleDto.fromList(it) }
      }
      169.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { CircleOptionsDto.fromList(it) }
      }
      170.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { MapPaddingDto.fromList(it) }
      }
      171.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { RouteTokenOptionsDto.fromList(it) }
      }
      172.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { DestinationsDto.fromList(it) }
      }
      173.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { RoutingOptionsDto.fromList(it) }
      }
      174.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { NavigationDisplayOptionsDto.fromList(it) }
      }
      175.toByte() -> {
        return (readValue(buffer) as? List<Any?>)?.let { NavigationWaypointDto.fromList(it) }
      }
      176.toByte() -> {
        return (readValue(buffer) as? List<Any?>


e as the key
  type of the map.

  Default: <tt>get(vertex_index, g)</tt>.
    Note: if you use this default, make sure your graph has
    an internal <tt>vertex_index</tt> property. For example,
    <tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
    not have an internal <tt>vertex_index</tt> property.

  Python: Unsupported parameter.

Complexity

The time complexity is O(E + V).

Visitor Event Points

<tt>vis.initialize_vertex(s, g)</tt> is invoked on every
  vertex of the graph before the start of the graph search.

<tt>vis.start_vertex(s, g)</tt> is invoked on the source
  vertex once before the start of the search.

<tt>vis.discover_vertex(u, g)</tt> is invoked when a vertex
  is encountered for the first time.

<tt>vis.examine_edge(e, g)</tt> is invoked on every out-edge
  of each vertex after it is discovered.

<tt>vis.tree_edge(e, g)</tt> is invoked on each edge as it
  becomes a member of the edges that form the search tree. If you
  wish to record predecessors, do so at this event point.

<tt>vis.back_edge(e, g)</tt> is invoked on the back edges in
  the graph.

<tt>vis.forward_or_cross_edge(e, g)</tt> is invoked on
  forward or cross edges in the graph. In an undirected graph this
  method is never called.

<tt>vis.finish_edge(e, g)</tt> is invoked on the non-tree edges in
  the graph as well as on each tree edge after its target vertex is finished.

<tt>vis.finish_vertex(u, g)</tt> is invoked on a vertex after
  all of its out edges have been added to the search tree and all of
  the adjacent vertices have been discovered (but before their
  out-edges have been examined).

Example

The example in
<TT>examples/dfs-example.cpp</TT> shows DFS applied to the graph in
Figure 1.

See Also

<tt>depth_first_visit</tt>
<tt>undirected_dfs</tt>

Notes

[1]
  Since the visitor parameter is passed by value, if your visitor
  contains state then any changes to the state during the algorithm
  will be made to a copy of the visitor object, not the visitor object
  passed in. Therefore you may want the visitor to hold this state by
  pointer or reference.

Copyright © 2000-2001
Jeremy Siek,
Indiana University (jsiek@osl.iu.edu)

<A HREF="http://www.boost.org


sreg[CS].base     = 0xffff0000;
	m_sreg[CS].limit    = 0xffff;
	m_sreg[CS].flags    = 0x0093;

	m_sreg[DS].base = m_sreg[ES].base = m_sreg[FS].base = m_sreg[GS].base = m_sreg[SS].base = 0x00000000;
	m_sreg[DS].limit = m_sreg[ES].limit = m_sreg[FS].limit = m_sreg[GS].limit = m_sreg[SS].limit = 0xffff;
	m_sreg[DS].flags = m_sreg[ES].flags = m_sreg[FS].flags = m_sreg[GS].flags = m_sreg[SS].flags = 0x0093;

	m_idtr.base = 0;
	m_idtr.limit = 0x3ff;

	m_a20_mask = ~0;

	m_cr[0] = 0x60000010;
	m_eflags = 0x00200000;
	m_eflags_mask = 0x00277fd7; /* TODO: is this correct? */
	m_eip = 0xfff0;
	m_mxcsr = 0x1f80;
	m_smm = false;
	m_smi_latched = false;
	m_smbase = 0x30000;
	m_nmi_masked = false;
	m_nmi_latched = false;

	x87_reset();

	// [11:8] Family
	// [ 7:4] Model
	// [ 3:0] Stepping ID
	// Family 6, Model 8 (Pentium III / Coppermine)
	REG32(EAX) = 0;
	REG32(EDX) = (6 << 8) | (8 << 4) | (10);

	m_cpuid_id0 = 0x756e6547;   // Genu
	m_cpuid_id1 = 0x49656e69;   // ineI
	m_cpuid_id2 = 0x6c65746e;   // ntel

	m_cpuid_max_input_value_eax = 0x03;
	m_cpu_version = REG32(EDX);

	// [ 0:0] FPU on chip
	// [ 4:4] Time Stamp Counter
	// [ 8:8] CMPXCHG8B instruction
	// [ D:D] PTE Global Bit
	// [15:15] CMOV and FCMOV
	// [18:18] PSN (Processor Serial Number, P3 only)
	m_feature_flags = 0x0004a111;       // TODO: enable relevant flags here

	CHANGE_PC(m_eip);
}

/*****************************************************************************/
/* Intel Pentium 4 */

static CPU_INIT( pentium4 )
{
	// 128 dtlb, 64 itlb
	i386_common_init(196);

	build_x87_opcode_table();
	build_opcode_table(OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM | OP_PPRO | OP_MMX | OP_SSE | OP_SSE2);
#ifdef SUPPORT_RDTSC
	m_cycle_table_rm = cycle_table_rm[CPU_CYCLES_PENTIUM];  // TODO: generate own cycle tables
	m_cycle_table_pm = cycle_table_pm[CPU_CYCLES_PENTIUM];  // TODO: generate own cycle tables
#endif
}

static CPU_RESET( pentium4 )
{
	zero_state();
	vtlb_flush_dynamic(m_vtlb);

	m_sreg[CS].selector = 0xf000;
	m_sreg[CS].base     = 0xffff0000;
	m_sreg[CS].limit    = 0xffff;
	m_sreg[CS].flags    = 0x0093;

	m_sreg[DS].base = m_sreg[ES].base = m_sreg[FS].base = m_sreg[GS].base = m_sreg[SS].base = 0x00000000;
	m_sreg[DS].limit = m_sreg[ES].limit = m_sreg[FS].limit = m_sreg[GS].limit = m_sreg[SS].limit = 0xffff;
	m_sreg[DS].flags = m_sreg[ES].flags = m_sreg[FS].flags = m_sreg[GS].flags = m_sreg[SS].flags = 0x0093;

	m_idtr.base = 0;
	m_idtr.limit = 0x3ff;

	m_a20_mask = ~0;

	m_cr[0] = 0x60000010;
	m_eflags = 0x00200000;
	m_eflags_mask = 0x00277fd7; /* TODO: is this correct? */
	m_eip = 0xfff0;
	m_mxcsr = 0x1f80;
	m_smm = false;
	m_smi_latched = false;
	m_smbase = 0x30000;
	m_nmi_masked = false;
	m_nmi_latched = false;

	x87_reset();

	// [27:20] Extended family
	// [19:16] Extended model
	// [13:12] Type
	// [11: 8] Family
	// [ 7: 4] Model
	// [ 3: 0] Stepping ID
	// Family 15, Model 0 (Pentium 4 / Willamette)
	REG32(EAX) = 0;
	REG32(EDX) = (0 << 20) | (0xf << 8) | (0 << 4) | (1);

	m_cpuid_id0 = 0x756e6547;   // Genu
	m_cpuid_id1 = 0x49656e69;   // ineI
	m_cpuid_id2 = 0x6c65746e;   // ntel

	m_cpuid_max_input_value_eax = 0x02;
	m_cpu_version = REG32(EDX);

	// [ 0:0] FPU on chip
	// [ 8:8] CMPXCHG8B instruction
	// [15:15] CMOV and FCMOV
	m_feature_flags = 0x00008101;       // TODO: enable relevant flags here

	CHANGE_PC(m_eip);
}


+= `${d}\t\topm:pathRestriction ${pathRestriction} ;\n`;
        if(expression) q+= `${d}\t\topm:expression ${expression} ;\n`;

        q+= `${d}\t\tprov:generatedAtTime ?now ;\n` +
            `${d}\t\topm:inferredProperty ${propertyURI} ;\n` +
            `${d}\t\topm:argumentPaths (\n`;

        _.each(argumentPaths, (obj, i) => {
            q+= `${d}\t\t\t"${argumentPaths[i]}" `;
            q+= (argumentPaths.length == Number(i)+1) ? ') .\n' : '\n';
        })

        if(!this.mainGraph && queryType == 'insert') q+= c;

        q+= `}\n`;

        if(queryType == 'construct' && namedGraphs) namedGraphs.forEach(uri => q+= `FROM NAMED ${uri}\n`);
        if(queryType == 'insert' && namedGraphs) namedGraphs.forEach(uri => q+= `USING NAMED ${uri}\n`);

        q+= 'WHERE {\n' +
            `\t# CREATE CALCULATION URI AND GET CURRENT TIME\n` +
            `\tBIND(URI(CONCAT(STR("${host}"), "calculations/", STRUUID())) AS ?calculationURI)\n` +
            `\tBIND(now() AS ?now)\n` +
            '}';

        return this.appendPrefixesToQuery(q);
    }

    getCalcData(input: GetCalc) {

        // Global variables
        var mainGraph = this.mainGraph;
        var iGraph = this.cleanURI(this.iGraph);
        var namedGraphs = this.namedGraphs ? this.namedGraphs.map(uri => this.cleanURI(uri)) : null;

        if(input){
            if(input.calculationURI) var calculationURI = this.cleanURI(input.calculationURI);
            if(input.label) var label = this.cleanLiteral(input.label);
            if(input.foiURI) var foiURI = this.cleanURI(input.foiURI);
            if(input.property) var property = this.cleanURI(input.property);
        }

        if(foiURI && !property) return new Error('Please specify the derived property of the FoI');

        var q: string = '';

        // define a few variables to use with named graphs
        var a = mainGraph ? '' : '\tGRAPH ?g {\n';
        var b = mainGraph ? '' : '\t';
        var c = mainGraph ? '' : '\t}\n';

        q+= 'CONSTRUCT {\n' +
            '\t?calculationURI ?key ?val ;\n';

        if(!mainGraph) q+= '\t\tsd:namedGraph ?g ;\n';

        q+= '\t\topm:argumentPaths ?list .\n' +
            '\t?listRest rdf:first ?head ;\n' +
            '\t\trdf:rest ?tail .\n' +
            '}\n';

        if(namedGraphs) namedGraphs.forEach(uri => q+= `FROM NAMED ${uri}\n`);

        q+= 'WHERE {\n';

        if(calculationURI) q+= `\tBIND(${calculationURI} AS ?calculationURI)\n`;
        if(label) q+= `\tBIND(${label} AS ?label)\n`;
        if(foiURI) q+= `\tBIND(${foiURI} AS ?foiURI)\n`;

        if(foiURI && property){
            if(!mainGraph) q+= `\tGRAPH ${iGraph} {\n`;
            q+= `${b}\t?foiURI ${property}/opm:hasPropertyState [\n` +
            `${b}\t\ta opm:Derived ;\n` +
            `${b}\t\tprov:wasAttributedTo ?calculationURI ] .\n\n`;
            q+= c;
        }

        q+= a;

        q+= `${b}\t?calculationURI ?key ?val ;\n`;

        if(label) q+= `${b}\t\trdfs:label ?label ;\n`;

        q+= `


 54.5a31 31 0 0 0-24.2-30.4zM55.1 480l-23-99.6 107.4-46 59.5 72.8c103.6-48.6 159.7-104.9 208.1-208.1l-72.8-59.5 46-107.4 99.6 23A425.3 425.3 0 0 1 55.1 480z"></path>
		</symbol>

		<symbol id="email" viewbox="0 0 512 512">
			<path d="M464 64H48a48 48 0 0 0-48 48v288a48 48 0 0 0 48 48h416a48 48 0 0 0 48-48V112a48 48 0 0 0-48-48zM48 96h416a16 16 0 0 1 16 16v41.4c-21.9 18.5-53.2 44-150.6 121.3-16.9 13.4-50.2 45.7-73.4 45.3-23.2.4-56.6-31.9-73.4-45.3A6862.8 6862.8 0 0 1 32 153.4V112a16 16 0 0 1 16-16zm416 320H48a16 16 0 0 1-16-16V195a11843 11843 0 0 0 130.7 104.7c20.5 16.4 56.7 52.5 93.3 52.3 36.4.3 72.3-35.5 93.3-52.3A11843 11843 0 0 0 480 195v205a16 16 0 0 1-16 16z"></path>
		</symbol>

		</svg>

            <script>
                window.fbAsyncInit = function() {
                    FB.init({
            appId      : '379938028687793',
            xfbml      : true,
            version    : 'v2.9',
            cookie     : true
        });

                };
                (function(d, s, id) {
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) return;
                js = d.createElement(s); js.id = id;
                js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.9&appId=379938028687793";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));
            </script>

            <script>
                function loginFacebook() {
                    LS.ready.then(function(){
                        LS.facebookLogin(FB, function(status, hasEmail) {
                            if (status === 'connected') {
                                if (hasEmail) {
                                    window.location = "//www.avelart.com.br/account/facebook_login/";
                                } else {
                                    jQueryNuvem('#login-form').prepend(
                                            "<div class=\"alert alert-danger\">Tienes que compartír


-table thead tr,body.dark-mode .layui-table-click,body.dark-mode .layui-table-header,body.dark-mode .layui-table-hover,body.dark-mode .layui-table-mend,body.dark-mode .layui-table-patch,body.dark-mode .layui-table-tool,body.dark-mode .layui-table-total,body.dark-mode .layui-table-total tr,body.dark-mode .layui-table-view .layui-table,body.dark-mode .layui-table[lay-even] tr:nth-child(2n){background-color:#141414!important}body.dark-mode .power-header::before{background:repeating-linear-gradient(45deg,rgba(255,255,255,.1),rgba(255,255,255,.1) 2px,transparent 2px,transparent 10px);opacity:.6}.blank1{flex:6 1 auto}tbody tr:not(:last-child) td{border-bottom:1px solid #f0f0f0}body.dark-mode tbody tr:not(:last-child) td{border-bottom:1px solid #1a1a1a}#tab-0 .mdui-collapse-item-header{padding-left:0!important}#tab-0 .mdui-list-item-icon{display:none!important}#tab-0 .mdui-collapse-item-header{font-size:18px;color:#333;font-weight:700}body.dark-mode #tab-0 .mdui-collapse-item-header{color:#536dfe}#tab-0 .mdui-collapse-item-header .mdui-list-item-content::before{content:"▍";color:#536dfe;font-size:18px;margin-right:8px}body.dark-mode .power-button{background-color:rgba(255,255,255,.1);border:2px solid #536dfe;color:rgb(255 255 255 / 65%)}body.dark-mode .power-button svg{fill:rgb(255 255 255 / 65%)}body.dark-mode .power-button:hover{background-color:rgba(255,255,255,.2)}body.dark-mode .power-header{background:linear-gradient(135deg,#2c2f3e,#3a3f4d)}body.dark-mode .power-content{background-color:#2c2f3e;color:#f1f1f1}.power-header::before{content:"";position:absolute;top:0;left:0;width:200%;height:200%;background:repeating-linear-gradient(45deg,rgba(0,0,255,.1),rgba(0,0,255,.1) 2px,transparent 2px,transparent 10px);opacity:.5;animation:moveLines 6s linear infinite}@keyframes moveLines{from{transform:translate(-50%,-50%)}to{transform:translate(-45%,-45%)}}.power-button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:rgba(0,150,255,.1);border:2px solid #536dfe;width:30%;height:49%;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer;transition:.3s;color:#536dfe;font-size:28px;z-index:2}.power-button svg{width:39%;height:39%;fill:#536dfe}.power-button:hover{background-color:rgba(0,150,255,.2)}.power-content{padding:20px}.power-header{position:relative;height:150px;width:100%;background:linear-gradient(135deg,#eef1f5,#f9f9f9);overflow:hidden}body.glass-mode .layui-table table,body.glass-mode .layui-table tbody tr:hover,body.glass-mode .layui-table th,body.glass-mode .layui-table thead,body.glass-mode .layui-table thead tr,body.glass-mode .la


udioUnit)
	{
	}

		// *Required* overides for the process method for this effect
		// processes one channel of interleaved samples
        virtual void 		Process(	const Float32 	*inSourceP,
										Float32		 	*inDestP,
										UInt32 			inFramesToProcess,
										UInt32			inNumChannels,
										bool			&ioSilence);

        virtual void		Reset();

		private:
		Float32 lastSample;  //Float32 as this runs in pure bypass most of the time
		Float32 intermediate[16];
		bool wasPosClip;
		bool wasNegClip;
		//uint32_t fpd; //leave off
	};
};

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#endif


 = setTimeout( function () {
				clearTimeout( mshotRetryTimer );

				$( '.akismet-mshot' ).remove();
			}, 200 );
		} );

		var preloadDelayTimer = null;

		$( window ).on( 'scroll resize', function () {
			clearTimeout( preloadDelayTimer );

			preloadDelayTimer = setTimeout( preloadMshotsInViewport, 500 );
		} );

		preloadMshotsInViewport();
	}

	/**
	 * The way mShots works is if there was no screenshot already recently generated for the URL,
	 * it returns a "loading..." image for the first request. Then, some subsequent request will
	 * receive the actual screenshot, but it's unknown how long it will take. So, what we do here
	 * is continually re-request the mShot, waiting a second after every response until we get the
	 * actual screenshot.
	 */
	function retryMshotUntilLoaded() {
		clearTimeout( mshotRetryTimer );

		var imageWidth = $( '.akismet-mshot img' ).get(0).naturalWidth;

		if ( imageWidth == 0 ) {
			// It hasn't finished loading yet the first time. Check again shortly.
			setTimeout( retryMshotUntilLoaded, mshotRetryInterval );
		}
		else if ( imageWidth == 400 ) {
			// It loaded the preview image.

			if ( mshotTries == 20 ) {
				// Give up if we've requested the mShot 20 times already.
				return;
			}

			if ( ! $( '.akismet-mshot' ).data( 'pending-request' ) ) {
				$( '.akismet-mshot' ).data( 'pending-request', true );

				mshotTries++;

				$( '.akismet-mshot .mshot-image' ).attr( 'src', akismet_mshot_url( $( '.akismet-mshot' ).data( 'url' ), mshotTries ) );
			}

			mshotRetryTimer = setTimeout( retryMshotUntilLoaded, mshotRetryInterval );
		}
		else {
			// All done.
		}
	}

	function preloadMshotsInViewport() {
		var windowWidth = $( window ).width();
		var windowHeight = $( window ).height();

		$( '#the-comment-list' ).find( mshotEnabledLinkSelector ).each( function ( index, element ) {
			var linkUrl = $( this ).attr( 'href' );

			// Don't attempt to preload an mshot for a single link twice.
			if ( preloadedMshotURLs.indexOf( linkUrl ) !== -1 ) {
				// The URL is already preloaded.
				return true;
			}

			if ( typeof element.getBoundingClientRect !== 'function' ) {
				// The browser is too old. Return false to stop this preloading entirely.
				return false;
			}

			var rect = element.getBoundingClientRect();

			if ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= windowHeight && rect.right <= windowWidth ) {
				akismet_preload_mshot( linkUrl );
				$( this ).data( 'akismet-mshot-preloaded', true );
			}
		} );
	}

	$( '.checkforspam.enable-on-load' ).on( 'click', function( e ) {
		if ( $( this ).hasClass( 'ajax-disabled' ) ) {
			// Akismet hasn't been configured yet. Allow the user to proceed to the button's link.
			return;
		}

		e.preventDefault();

		if ( $( this ).hasClass( 'button-disabled' ) ) {
			window.location.href = $( this ).data( 'success-url' ).replace( '__recheck_count__', 0 ).replace( '__spam_count__', 0 );
			return;
		}

		$('.checkforspam').addClass('button-disabled').addClass( 'checking' );
		$('.checkforspam-spinner').addClass( 'spinner' ).addClass( 'is-active' );

		akismet_check_for_spam(0, 100);
	}).removeC


 {
        if(null == obj || obj.getClass() != this.getClass()) {
            return false;
        }
        CollapsedStringListRoot test = (CollapsedStringListRoot) obj;
        if(!equals(elementField, test.elementField)) {
            return false;
        }
        if(!equals(elementProperty, test.elementProperty)) {
            return false;
        }
        return true;
    }

    private boolean equals(List<String> control, List<String> test) {
        if(null == control) {
            return null == test;
        }
        if(control.size() != test.size()) {
           return false;
        }
        for(int x=0; x<control.size(); x++) {
            if(!equals(control.get(x), test.get(x))) {
                return false;
            }
        }
        return true;
    }

    private boolean equals(String control, String test) {
        if(null == control) {
            return null == test;
        }
        return control.equals(test);
    }

}
/*
 * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0, which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * This Source Code may also be made available under the following Secondary
 * Licenses when the conditions for such availability set forth in the
 * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
 * version 2 with the GNU Classpath Exception, which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 */

package org.glassfish.jms.admin.cli;

import com.sun.enterprise.config.serverbeans.Config;
import com.sun.enterprise.config.serverbeans.Domain;
import com.sun.enterprise.config.serverbeans.Server;
import com.sun.enterprise.connectors.jms.config.JmsHost;
import com.sun.enterprise.connectors.jms.config.JmsService;
import com.sun.enterprise.util.LocalStringManagerImpl;
import com.sun.enterprise.util.SystemPropertyConstants;

import jakarta.inject.Inject;

import java.util.ArrayList;

import org.glassfish.api.ActionReport;
import org.glassfish.api.I18n;
import org.glassfish.api.Param;
import org.glassfish.api.admin.AdminCommand;
import org.glassfish.api.admin.AdminCommandContext;
import org.glassfish.api.admin.CommandLock;
import org.glassfish.api.admin.ExecuteOn;
import org.glassfish.api.admin.RestEndpoint;
import org.glassfish.api.admin.RestEndpoints;
import org.glassfish.api.admin.RuntimeType;
import org.glassfish.config.support.CommandTarget;
import org.glassfish.config.support.TargetType;
import org.glassfish.hk2.api.PerLookup;
import org.jvnet.hk2.annotations.Service;

/**
 * List JMS Hosts command
 *
 */
@Service(name="list-jms-hosts")
@PerLookup
@CommandLock(CommandLock.LockType.NONE)
@I18n("list.jms.hosts")
@ExecuteOn({RuntimeType.DAS})
@TargetType({CommandTarget.DAS,CommandTarget.STANDALONE_INSTANCE,CommandTarget.CLUSTER,CommandTarget.CONFIG})
@RestEndpoints({
    @RestEndpoint(configBean=JmsService.class,
        opType=RestEndpoint.OpType.GET,
        path="list-jms-hosts",
        description="list-jms-hosts")
})
public class ListJMSHosts implements AdminCommand {
        final private static LocalStringManagerImpl localStrings = new LocalStringManagerImpl(ListJMSHosts.class);

    @Param(name="target", optional=true)
    String target = SystemPropertyConstants.DEFAULT_SERVER_INSTANCE_NAME;

    //@Inject(name = ServerEnvironment.DEFAULT_INSTANCE_NAME)


: function(current: dayjs, info: { prefixCls: string, originNode: React.ReactElement, today: dayjs, range?: 'start' \| 'end', type: PanelMode, locale?: Locale, subType?: 'hour' \| 'minute' \| 'second' \| 'meridiem' }) => React.ReactNode

默认值: -

版本: 5.4.0

### ant-design 中 Calendar - Calendar的dateFullCellRender属性如何使用？

参数: dateFullCellRender

说明: 自定义渲染日期单元格，返回内容覆盖单元格，>= 5.4.0 请用 `fullCellRender`

类型: function(date: Dayjs): ReactNode

默认值: -

版本: < 5.4.0

### ant-design 中 Calendar - Calendar的fullCellRender属性如何使用？

参数: fullCellRender

说明: 自定义单元格的内容

类型: function(current: dayjs, info: { prefixCls: string, originNode: React.ReactElement, today: dayjs, range?: 'start' \| 'end', type: PanelMode, locale?: Locale, subType?: 'hour' \| 'minute' \| 'second' \| 'meridiem' }) => React.ReactNode

默认值: -

版本: 5.4.0

### ant-design 中 Calendar - Calendar的defaultValue属性如何使用？

参数: defaultValue

说明: 默认展示的日期

类型: [dayjs](https://day.js.org/)

默认值: -

版本: -

### ant-design 中 Calendar - Calendar的disabledDate属性如何使用？

参数: disabledDate

说明: 不可选择的日期，参数为当前 `value`，注意使用时[不要直接修改](https://github.com/ant-design/ant-design/issues/30987)

类型: (currentDate: Dayjs) => boolean

默认值: -

版本: -

### ant-design 中 Calendar - Calendar的fullscreen属性如何使用？

参数: fullscreen

说明: 是否全屏显示

类型: boolean

默认值: true

版本: -

### ant-design 中 Calendar - Calendar的headerRender属性如何使用？

参数: headerRender

说明: 自定义头部内容

类型: function(object:{value: Dayjs, type: string, onChange: f(), onTypeChange: f()})

默认值: -

版本: -

### ant-design 中 Calendar - Calendar的locale属性如何使用？

参数: locale

说明: 国际化配置

类型: object

默认值: [(默认配置)](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json)

版本: -

### ant-design 中 Calendar - Calendar的mode属性如何使用？

参数: mode

说明: 初始模式

类型: `month` \| `year`

默认值: `month`

版本: -

### ant-design 中 Calendar - Calendar的validRange属性如何使用？

参数: validRange

说明: 设置可以显示的日期

类型: \[[dayjs](https://day.js.org/), [dayjs](https


 Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 *
 * @summary converted from VM Testbase nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo002.
 * VM Testbase keywords: [quick, jpda, jdwp, feature_jdk6_jpda, vm6, monitoring]
 * VM Testbase readme:
 * DESCRIPTION
 *     This test performs checking for
 *         command set: ThreadReference
 *         command: OwnedMonitorsStackDepthInfo
 *     Test checks that debuggee accept the command packet and
 *     replies with correct reply packet.
 *     Test consists of two compoments:
 *         debugger: ownedMonitorsStackDepthInfo002
 *         debuggee: nsk.share.jdwp.TestDebuggeeType2
 *     Debugger uses nsk.share support classes to launch debuggee
 *     and obtain Transport object, that represents JDWP transport channel.
 *     Also communication channel (IOPipe) is established between
 *     debugger and debuggee to exchange with execution commands.
 *     Test performs checks for cases when incorrect data is sent in command.
 *     Following cases are tested:
 *         - create command with -1 as threadID, expect INVALID_OBJECT error
 *         - create command with referenceID instead of threadID, expect INVALID_THREAD error
 *         - try execute command for thread wich has finished execution, expect INVALID_THREAD error
 *     Finally, debugger sends debuggee signal to quit, waits for it exits
 *     and exits too with the proper exit code.
 *
 * @library /vmTestbase /test/hotspot/jtreg/vmTestbase
 *          /test/lib
 * @run driver
 *      nsk.jdwp.ThreadReference.OwnedMonitorsStackDepthInfo.ownedMonitorsStackDepthInfo002.ownedMonitorsStackDepthInfo002
 *      -arch=${os.family}-${os.simpleArch}
 *      -verbose
 *      -waittime=5
 *      -debugee.vmkind=java
 *      -transport.address=dynamic
 *      -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"
 */

package nsk.jdwp.ThreadReference.OwnedMonitorsStackDepthInfo.ownedMonitorsStackDepthInfo002;

import nsk.share.Consts;
import nsk.share.jdwp.AbstractJDWPDebuggee;
import nsk.share.jdwp.CommandPacket;
import nsk.share.jdwp.JDWP;
import nsk.share.jdwp.TestDebuggerType1;
import nsk.share.jpda.AbstractDebuggeeTest;
import nsk.share.jpda.StateTestThread;

import java.io.PrintStream;

public class ownedMonitorsStackDepthInfo002 extends TestDebuggerType1 {
    protected String getDebugeeClassName() {
        return AbstractJDWPDebuggee.class.getName();
    }

    public static void main (String argv[]) {
        int result = run(argv, System.out);
        if (result != 0) {
            throw new RuntimeException("Test failed");
        }
    }

    public static int run(String[] argv, PrintStream out) {
        return new ownedMonitorsStackDepthInfo002().runIt(argv, out);
    }

    private void sendCommand(long threadID, boolean trySuspend, int errorCode) {
        try {
            int JDWP_COMMAND_ID = JDWP.Command.ThreadReference.OwnedMonitorsStackDepthInfo;

            log.display("Create command: " + JDWP.commandNames.get(JDWP_COMMAND_ID));


# -*- coding: utf-8 -*-
##############################################################################
# Copyright (c) wxmall.janedao.cn
# Author：QQ173782910
#QQ group:528289471
##############################################################################
"""start.py"""

import os
import sys
from imp import reload
from flask import Flask, request
from flask_cors import CORS

reload(sys)

path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(path)
sys.stdout = sys.stderr

from  basic import publicw
reload(publicw)

ROOT = publicw.ROOT
showadmin,showapi,showWxPay = publicw.showadmin,publicw.showapi,publicw.showWxPay#接口平台
showmanage,showmapi,showmPay=publicw.showmanage,publicw.showmapi,publicw.showmPay#btbtc平台
showsingle,showsapi,showsPay=publicw.showsingle,publicw.showsapi,publicw.showsPay#个人商城
showupload = publicw.showupload

sys.path.append(ROOT)

app=Flask(__name__)
app.config.from_object(__name__)
app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RTYj'
CORS(app)

@app.route('/', methods=['GET', 'POST'])
@app.route('/admin' , methods=['GET', 'POST'])
def admin():
    return showadmin(request)

@app.route('/api/<int:subid>', methods=['GET','POST'])
def api(subid):
    return showapi(request,subid)

@app.route('/pay/<int:subid>/notify', methods=['GET','POST'])
def pay(subid):
    return showWxPay(request,subid)

@app.route('/upload' , methods=['GET', 'POST'])
def upload():
    return showupload(request)

##################以上为接口平台
###########以下为btbtc平台
@app.route('/manage' , methods=['GET', 'POST'])
def manage():
    return showmanage(request)

@app.route('/mapi/<int:mallid>', methods=['GET','POST'])
def mapi(mallid):
    return showmapi(request,mallid)

@app.route('/mpay/<int:mallid>/notify', methods=['GET','POST'])
def mpay(mallid):
    return showmPay(request,mallid)

################################以上为btbtc
###############################以下为个人
@app.route('/single' , methods=['GET', 'POST'])
def single():
    return showsingle(request)

@app.route('/sapi', methods=['GET','POST'])
def sapi():
    return showsapi(request)

@app.route('/spay/notify', methods=['GET','POST'])
def spay():
    return showsPay(request)

if __name__ == '__main__':
    app.run(host='127.0.0.1', port=5000)

application=app


pi16
#define _m_pmaxub   _mm_max_pu8
#define _m_pminsw   _mm_min_pi16
#define _m_pminub   _mm_min_pu8
#define _m_pmovmskb _mm_movemask_pi8
#define _m_pmulhuw  _mm_mulhi_pu16
#define _m_pshufw   _mm_shuffle_pi16
#define _m_maskmovq _mm_maskmove_si64
#define _m_pavgb    _mm_avg_pu8
#define _m_pavgw    _mm_avg_pu16
#define _m_psadbw   _mm_sad_pu8
#define _m_         _mm_

#undef __DEFAULT_FN_ATTRS
#undef __DEFAULT_FN_ATTRS_MMX

/* Ugly hack for backwards-compatibility (compatible with gcc) */
#if defined(__SSE2__) && !__building_module(_Builtin_intrinsics)
#  include <emmintrin.h>
#endif

#endif /* __XMMINTRIN_H */


,c(u,v)-f(u,v)>0,h(u)=h(v)+1)$，则 push 操作适用于 $(u,v)$。

于是，我们尽可能将超额流从 $u$ 推送到 $v$，推送过程中我们只关心超额流和 $c(u,v)-f(u,v)$ 的最小值，不关心 $v$ 是否溢出。

如果 $(u,v)$ 在推送完之后满流，将其从残量网络中删除。

#### 重贴标签（Relabel）

适用条件：如果结点 $u$ 溢出，且 $\forall (u,v)\in E_f,h(u)\leq h(v)$，则 relabel 操作适用于 $u$。

则将 $h(u)$ 更新为 $\min_{(u,v)\in E_f}h(v)+1$ 即可。

#### 初始化

$$
\forall (u,v)\in E,~~f(u,v)=\begin{cases}
c(u,v),&u=s\\
0,&u\neq s
\end{cases}
$$

$$
\forall u\in V,~~h(u)=\begin{cases}
|V|,&u=s\\
0,&u\neq s
\end{cases}
$$

$$
e(u)=\sum_{(x,u)\in E}f(x,u)-\sum_{(u,y)\in E}f(u,y)
$$

上述将 $(s,v)\in E$ 充满流，并将 $h(s)$ 抬高，使得 $(s,v)\notin E_f$，因为 $h(s)>h(v)$，而且 $(s,v)$ 毕竟满流，没必要留在残量网络中；上述还将 $e(s)$ 初始化为 $\sum_{(s,v)\in E}f(s,v)$ 的相反数。

#### 过程

我们每次扫描整个图，只要存在结点 $u$ 满足 push 或 relabel 操作的条件，就执行对应的操作。

如图，每个结点中间表示编号，左下表示高度值 $h(u)$，右下表示超额流 $e(u)$，结点颜色的深度也表示结点的高度；边权表示 $c(u,v)-f(u,v)$，绿色的边表示满足 $h(u)=h(v)+1$ 的边 $(u,v)$（即残量网络的边 $E_f$）：

![p1](./images/2148.png)

整个算法我们大致浏览一下过程，这里笔者使用的是一个暴力算法，即暴力扫描是否有溢出的结点，有就更新

![p2](./images/2149.gif)

最后的结果

![p3](./images/2150.png)

可以发现，最后的超额流一部分回到了 $s$，且除了源点汇点，其他结点都没有溢出；这时的流函数 $f$ 满足流守恒性，为最大流，流量即为 $e(t)$。

但是实际上论文[^ref1]指出只处理高度小于 $n$ 的溢出节点也能获得正确的最大流值，不过这样一来算法结束的时候预流还不满足流函数性质，不能知道每条边上真实的流量。

#### 实现

???+ note "核心代码"
    ```cpp
    constexpr int N = 1e4 + 4, M = 1e5 + 5,


) =
            KeyValues(
                combined.split(ELEMENT_SEPARATOR)
                    .map { it.split(PART_SEPARATOR) }
                    .filter { it.size == 2 && it[0].isNotEmpty() && it[1].isNotEmpty() }
                    .map { it[0] to it[1] }
                    .toMap(),
                combined
            )

        /** Convert an array of items (key1, value1, ...) into pairs of items. */
        fun fromPairs(keyValues: Array<out String>) =
            keyValues.toList().windowed(2, 2).map { it[0] to it[1] }.toMap()
    }

    /** Return the contents of this map combined into an IPP string representation. */
    fun combine() =
        pairs.entries.joinToString(ELEMENT_SEPARATOR) { "${it.key}$PART_SEPARATOR${it.value}" } + ELEMENT_SEPARATOR

    override fun toString() = "{${combine()}}"
}
package org.pixeldroid.app

import android.content.Context
import android.content.Intent
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.swipeLeft
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.intent.Intents.intended
import androidx.test.espresso.intent.Intents.intending
import androidx.test.espresso.intent.matcher.IntentMatchers.hasAction
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.rule.GrantPermissionRule
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.google.android.material.tabs.TabLayout
import org.pixeldroid.app.testUtility.*
import org.pixeldroid.app.utils.db.AppDatabase
import org.hamcrest.Matcher
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.Timeout
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class PostCreationFragmentTest {

    @get:Rule
    var globalTimeout: Timeout = Timeout.seconds(30)
    @get:Rule
    var runtimePermissionRule: GrantPermissionRule =
        GrantPermissionRule.grant(android.Manifest.permission.WRITE_EXTERNAL_STORAGE, android.Manifest.permission.CAMERA)
    @get:Rule
    var intentsTestRule: IntentsTestRule<MainActivity> =
        IntentsTestRule(MainActivity::class.java)

    private lateinit var viewPager2IdlingResource: ViewPager2IdlingResource

    @Before
    fun setUp() {
        ActivityScenario.launch(MainActivity::class.java).onActivity {
            it.findViewById<BottomNavigationView>(R.id.tabs).selectedItemId = R.id.page_3
            viewPager2IdlingResource = ViewPager2IdlingResource(it.findViewById(R.id.view_pager))
            IdlingRegistry.getInstance().register(viewPager2IdlingResource)
        }
    }

    @After
    fun tearDown() {
        IdlingRegistry.getInstance().unregister(viewPager2IdlingResource)
    }

    private val expectedIntent: Matcher<Intent> = hasAction(Intent.ACTION_CHOOSER)

    // Image choosing intent
    @Test
    fun galleryButtonLaunchesGalleryIntent() {
        waitForView(R.id.photo_vie


 Time"],hu_HU:["Relative Volume at Time"]},e.exports["Session Volume_study"]={en:["Session Volume"],hu_HU:["Session Volume"]},e.exports["Session Volume HD_study"]={en:["Session Volume HD"],hu_HU:["Session Volume"]},e.exports["Session Volume Profile_study"]={en:["Session Volume Profile"],hu_HU:["Session Volume Profile"]},e.exports["Session Volume Profile HD_study"]={en:["Session Volume Profile HD"],hu_HU:["Session Volume Profile HD"]},e.exports["SMI Ergodic Indicator/Oscillator_study"]={en:["SMI Ergodic Indicator/Oscillator"],hu_HU:["SMI Ergodic Indicator/Oscillator"]},e.exports["Smoothed Moving Average_study"]={en:["Smoothed Moving Average"],hu_HU:["Simított Mozgóátlag"]},e.exports["Stochastic Momentum Index_study"]={en:["Stochastic Momentum Index"],hu_HU:["Stochastic Momentum Index"]},e.exports.Stoch_study={en:["Stoch"],hu_HU:["Stoch"]},e.exports["Stochastic RSI_study"]={en:["Stochastic RSI"],hu_HU:["Sztochasztikus RSI"]},e.exports.Stochastic_study={en:["Stochastic"],hu_HU:["Sztochasztikus"]},e.exports["Time Weighted Average Price_study"]={en:["Time Weighted Average Price"],hu_HU:["Time Weighted Average Price"]},e.exports["Triple EMA_study"]={en:["Triple EMA"],hu_HU:["Triple EMA"]},e.exports.TRIX_study={en:["TRIX"],
hu_HU:["TRIX"]},e.exports["True Strength Indicator_study"]={en:["True Strength Indicator"],hu_HU:["True Strength Indikátor"]},e.exports["Ultimate Oscillator_study"]={en:["Ultimate Oscillator"],hu_HU:["Végső Oszcillátor"]},e.exports["Visible Range_study"]={en:["Visible Range"],hu_HU:["Visible Range"]},e.exports["Visible Range Volume Profile_study"]={en:["Visible Range Volume Profile"],hu_HU:["Visible Range Volume Profile"]},e.exports["Volume Oscillator_study"]={en:["Volume Oscillator"],hu_HU:["Volumen Oszcillátor"]},e.exports.Volume_study={en:["Volume"],hu_HU:["Volumen"]},e.exports.Vol_study={en:["Vol"],hu_HU:["Vol"]},e.exports["Vortex Indicator_study"]={en:["Vortex Indicator"],hu_HU:["Vortex Indikátor"]},e.exports.VWAP_study={en:["VWAP"],hu_HU:["VWAP"]},e.exports.VWMA_study={en:["VWMA"],hu_HU:["VWMA"]},e.exports["Williams %R_study"]={en:["Williams %R"],hu_HU:["Williams %R"]},e.exports["Williams Alligator_study"]={en:["Williams Alligator"],hu_HU:["Williams Alligátor"]},e.exports["Williams Fractal_study"]={en:["Williams Fractal"],hu_HU:["Williams Fraktál"]},e.exports["Zig Zag_study"]={en:["Zig Zag"],hu_HU:["Cikk Cakk"]},e.exports["24-hour Volume_study"]={en:["24-hour Volume"],hu_HU:["24-hour Volume"]},e.exports["Ease of Movement_study"]={en:["Ease of Movement"],hu_HU:["Mozgás Könnyedség"]},e.exports["Elders Force Index_study"]={en:["Elders Force Index"],hu_HU:["Elders Force Index"]},e.exports.Envelope_study={en:["Envelope"],hu_HU:["Boríték"]},e.exports.Gaps_study={en:["Gaps"],hu_HU:["Gaps"]},e.exports["Linear Regression Channel_study"]={en:["Linear


responsibilities.

First is the stepping of the simulation, which is done simply once per run in
[`PhysicsStepperSystem`] and an advanced fixed stepper is provided in [`PhysicsBatchSystem`].
Second is the synchronization to the [`Pose`] type mentioned above, which is performed in the
[`PhysicsPoseSystem`].

The single step and pose synchronization systems are set up along with the Resources they depend on
by [`PhysicsBundle`], which is the best way to initiate your **specs-physics** simulation. You can
check out the documentation on that type's page for more details, and you can find examples for
different cases in the [examples directory].

[`PhysicsStepperSystem`]: systems/struct.PhysicsStepperSystem.html
[`PhysicsBatchSystem`]: systems/struct.PhysicsBatchSystem.html
[`PhysicsPoseSystem`]: systems/struct.PhysicsPoseSystem.html
[examples directory]: https://github.com/amethyst/specs-physics/tree/master/examples

# Interacting with the storages

So while in vanilla *nphysics* you may access your bodies, colliders, or constraint joints via
`DefaultBodySet`, `DefaultColliderSet`, or `DefaultJointConstraintSet`, this data is instead held in
[`BodyComponent`], [`ColliderComponent`], and [`JointComponent`] storages indexed with [`Entity`]
when using **specs-physics**. Sugar for inserting a new entity with a Body or Collider is provided
in [`EntityBuilderExt`] which also adds a marker component for some Body types to that body's
Entity, so that you may join over only the bodies of a specific type with automatic downcasting via
[`ReadRigidBodies`], [`WriteRigidBodies`], and [`ReadGroundBodies`], etc.

[`BodyComponent`]: bodies/struct.BodyComponent.html
[`ColliderComponent`]: colliders/struct.ColliderComponent.html
[`JointComponent`]: joints/struct.JointComponent.html
[`Entity`]: https://docs.rs/specs/latest/specs/struct.Entity.html
[`ReadRigidBodies`]: bodies/type.ReadRigidBodies.html
[`WriteRigidBodies`]: bodies/type.WriteRigidBodies.html
[`ReadGroundBodies`]: bodies/type.ReadGroundBodies.html

# Getting help

If you find any bugs or would like to contribut a pull request, visit our [Github repository].

If you'd like to ask for help, feel free to visit the `#physics` channel on our [Discord server]!

[Github repository]: https://github.com/amethyst/specs-physics
[Discord server]: https://discord.gg/amethyst
*/

#[cfg(any(
    not(any(feature = "dim2", feature = "dim3")),
    all(feature = "dim2", feature = "dim3")
))]
compile_error!(
    r#"Either the feature "dim3" or the feature "dim2" must be enabled.
You cannot enable both, and you cannot enable neither."#
);

#[macro_use]
extern crate log;

#[macro_use]
extern crate shrinkwraprs;

pub mod bodies;
pub mod colliders;
pub mod joints;
pub mod stepper;
pub mod systems;

mod builder;
mod bundle;
mod pose;
mod world;

pub use self::{
    builder::EntityBuilderExt,
    bundle::PhysicsBundle,
    pose::{Pose, SimplePosition},
    world::{ForceGeneratorSetRes, Geometrical


125rem 0.625rem;
  border-right: 0.1875rem solid;
  border-left: 0.1875rem solid;
  margin-left: 0.75em;
  margin-right: 0.75em;
}
.admonition[data-callout=pf2-summary] .admonition-content p {
  line-height: 1.2;
  margin-block-start: 0;
  margin-block-end: 0;
  margin-left: 0.5rem;
  margin-bottom: 1rem;
}
.admonition[data-callout=pf2-summary] .admonition-content > .callout {
  mix-blend-mode: normal;
  margin-bottom: 1rem;
}
.admonition[data-callout=pf2-summary] .admonition-content-copy {
  opacity: 0;
  margin: 0.3125rem;
  right: 0;
  top: 0;
  transition: 1s opacity ease-in-out;
}
.admonition[data-callout=pf2-summary] .admonition-content-copy:hover {
  color: rgba(232, 232, 232, 0.3);
}

.admonition[data-callout=statblock-pf2] {
  --callout-border-opacity: 0.3;
  --callout-color: rgb(239, 215, 143);
  --callout-content-background: rgb(239, 215, 143);
  --callout-background-alpha: 0.2;
  --callout-padding: 1rem;
  --callout-radius: 0.25rem;
  font-size: 1rem;
  overflow-wrap: break-word;
  overflow-y: scroll;
  box-shadow: 0 0 5px 0 rgba(26, 34, 77, 0.9);
  border-color: var(--pf2e-light-brown-headers);
  border-style: solid;
  border-width: 0.05rem;
  color: rgb(36, 36, 36);
  margin: 3px 0.125rem 0.125rem;
  padding: 0.125rem;
}
.admonition[data-callout=statblock-pf2] .admonition-title {
  background-color: rgb(239, 215, 143);
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  border: none;
  display: flex;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  position: relative;
}
.admonition[data-callout=statblock-pf2] .admonition-title .admonition-title-icon .svg-icon {
  display: block;
  height: 1.5rem;
  left: 0.5rem;
  margin-left: 0.5rem;
  position: absolute;
  top: 0.5rem;
  width: 1.5rem;
}
.admonition[data-callout=statblock-pf2] .admonition-title .admonition-title-icon .svg-icon:has(.content) {
  height: 1rem;
  width: 1rem;
}
.admonition[data-callout=statblock-pf2] .admonition-title .admonition-title-inner {
  font-size: clamp(1rem, 1.3125em, 1.25rem);
  font-weight: 700;
  padding-bottom: 0.125rem;
  margin-right: 0.125rem;
}
.admonition[data-callout=statblock-pf2] .admonition-title .admonition-title-inner em {
  font-weight: 500;
}
.admonition[data-callout=statblock-pf2] .admonition-content {
  background-color: rgb(239, 215, 143);
  padding: 1rem;
}
.admonition[da


          const result = await errorHandler(error)
          if (dontFail) {
            return result as TResult
          }
        }

        throw error
      }
    }
  }
}
import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-hotel-details',
  templateUrl: './hotel-details.component.html',
  styleUrls: ['./hotel-details.component.css']
})
export class HotelDetailsComponent implements OnInit {
  @Input() data;
  hotelData = {
    distance: '',
    distanceUnit: '',
    hotelName: '',
    cityName: '',
    addressLines: '',
    postalCode: '',
    price: '',
    hotelDistance: ''
  };
  constructor() { }

  ngOnInit() {
    console.log(this.data);
    this.getHotelData();
  }
  getHotelData() {
    const hotelDistance = this.data.hotel.hotelDistance;
    this.hotelData.distance = hotelDistance.distance;
    this.hotelData.distanceUnit = hotelDistance.distanceUnit;
    this.hotelData.cityName = this.data.hotel.address.cityName;
    this.hotelData.hotelName = this.data.hotel.name;
    this.hotelData.addressLines = this.getFullAddress(this.data.hotel.address.lines);
    if (this.data.hotel.address.postalCode) {
      this.hotelData.postalCode = this.data.hotel.address.postalCode;
    }
    // this.hotelData.price = Math.floor(this.randomNum(80, 100)) + '€';
    this.hotelData.price = this.data.price;
    this.hotelData.hotelDistance = this.hotelData.distance + ' ' + this.hotelData.distanceUnit;
  }
  getFullAddress(addressLines) {
    let fullAddress = '';
    for (const addressLine of addressLines) {
      fullAddress += addressLine + '';
    }
    return fullAddress;
  }
  getRandomInt(max) {
    const price = Math.floor(Math.random() * Math.floor(max)) < 80 ? 80 : Math.floor(Math.random() * Math.floor(max));
    return price;
  }
  // randomNum((a, b) => {a + (b - a + 1) * crypto.getRandomValues(new Uint32Array(1))[0] / 2 ** 32 | 0});
  randomNum(a,b) {
    return a + (b - a + 1) * crypto.getRandomValues(new Uint32Array(1))[0] / 2 ** 32 | 0;

  }
}
import dotenv from "dotenv";
import fs from "fs";

function override(envObj: any) {
  process.env = { ...process.env, ...envObj };
}

export default function loadEnvVar() {
  const enviroment = process.env.NODE_ENV || "development";

  if (enviroment !== "production") {
    dotenv.config();
  }

  if (fs.existsSync(".env.local")) {
    override(dotenv.parse(fs.readFileSync(".env.local")));
  }

  if (fs.existsSync(".env.production.local") && enviroment === "production") {
    override(dotenv.parse(fs.readFileSync(".env.production.local")));
  }
}
import { DefaultTreeNode, Attribute } from 'bundled-parse5';
import { ASTNode, isElement, isParentNode, isTextNode, isCommentNode } from './types';

const defaultIgnoresTags = ['style', 'script', '#comment'];
function filterNode(node: DefaultTreeNode, ignoredTags: string[]) {
  return !defaultIgnoresTags.includes(node.nodeName) && !ignoredTags.includes(node.nodeName);
}

function sortAttributes(attrs: Attribute[]) {
  return attrs
    // Sort attributes
    .map((attr: Attribute) => {
      if (attr.name === 'class') {
        attr.value = attr.value.trim().split(/\s+/).sort().join(' ')
      }

      return attr;
    })


arent.Enemy.transform.position, ..corners]
        );

        for (var i = 0; i < pathSegmentCount; i++)
        {
            if (i < corners.Length)
            {
                // Enable / Disable based on config
                pathDots[i].gameObject.SetActive(isShown);
                if (!isShown) continue;

                pathDots[i].transform.position = corners[i];
                pathDots[i].transform.localScale = Vector3.one * 0.15f;
            }
            else
            {
                pathDots[i].gameObject.SetActive(false);
            }
        }
    }

    private void DrawPlayerCloseSpheres()
    {
        var isShown = Imperium.Settings.Visualization.PlayerProximity.Value;

        playerCloseSphere.SetActive(isShown);

        // This is currently unused to we ignore it
        // playerVeryCloseSphere.SetActive(isShown);
    }

    private void OnDestroy()
    {
        if (hasInitializedVision)
        {
            Destroy(coneStanding);
            Destroy(coneCrouching);
            Destroy(coneCrawling);
            Destroy(proximitySphereStanding);
            Destroy(proximitySphereCrouching);
        }

        Destroy(playerCloseSphere);
        Destroy(playerVeryCloseSphere);
    }
}

internal class EntityGizmoConfig
{
    internal readonly string entityName;

    internal readonly ImpConfig<bool> Info;
    internal readonly ImpConfig<bool> Pathfinding;
    internal readonly ImpConfig<bool> Proximity;
    internal readonly ImpConfig<bool> Vision;
    internal readonly ImpConfig<bool> Hearing;
    internal readonly ImpConfig<bool> Vitality;
    internal readonly ImpConfig<bool> Custom;

    internal EntityGizmoConfig(string entityName, ConfigFile config)
    {
        this.entityName = entityName;

        var escapedEntityName = entityName
            .Replace("\"", "")
            .Replace("\'", "")
            .Replace("[", "")
            .Replace("]", "")
            .Replace("\n", "")
            .Replace("\t", "")
            .Replace("\\", "");

        Info = new ImpConfig<bool>(config, "Visualization.EntityGizmos.Info", escapedEntityName, false);
        Pathfinding = new ImpConfig<bool>(config, "Visualization.EntityGizmos.Pathfinding", escapedEntityName, false);
        Proximity = new ImpConfig<bool>(config, "Visualization.EntityGizmos.Proximity", escapedEntityName, false);
        Vision = new ImpConfig<bool>(config, "Visualization.EntityGizmos.Vision", escapedEntityName, false);
        Hearing = new ImpConfig<bool>(config, "Visualization.EntityGizmos.Hearing", escapedEntityName, false);
        Vitality = new ImpConfig<bool>(config, "Visualization.EntityGizmos.Vitality", escapedEntityName, false);
        Custom = new ImpConfig<bool>(config, "Visualization.EntityGizmos.Custom", escapedEntityName, false);
    }
}


 Project nor the names of its
 *   contributors may be used to endorse or promote products derived from this
 *   software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#include <turbojpeg.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>

#define NUMTESTS  7

struct test {
  enum TJPF pf;
  int psv, pt;
};

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
{
  tjhandle handle = NULL;
  short *srcBuf = NULL;
  unsigned char *dstBuf = NULL;
  int width = 0, height = 0, fd = -1, i, ti;
  char filename[FILENAME_MAX] = { 0 };
  struct test tests[NUMTESTS] = {
    { TJPF_RGB, 1, 0 },
    { TJPF_BGR, 2, 2 },
    { TJPF_RGBX, 3, 4 },
    { TJPF_BGRA, 4, 7 },
    { TJPF_XRGB, 5, 5 },
    { TJPF_GRAY, 6, 3 },
    { TJPF_CMYK, 7, 0 }
  };

  snprintf(filename, FILENAME_MAX, "/tmp/libjpeg-turbo_compress_fuzz.XXXXXX");
  if ((fd = mkstemp(filename)) < 0 || write(fd, data, size) < 0)
    goto bailout;

  if ((handle = tj3Init(TJINIT_COMPRESS)) == NULL)
    goto bailout;

  for (ti = 0; ti < NUMTESTS; ti++) {
    int sum = 0, pf = tests[ti].pf;
    size_t dstSize = 0, maxBufSize;

    /* Test non-default compression options on specific iterations. */
    tj3Set(handle, TJPARAM_BOTTOMUP, ti == 0);
    tj3Set(handle, TJPARAM_NOREALLOC, ti != 2);
    tj3Set(handle, TJPARAM_RESTARTROWS, ti == 0 || ti == 6 ? 1 : 0);

    tj3Set(handle, TJPARAM_MAXPIXELS, 1048576);
    /* tj3LoadImage12() will refuse to load images larger than 1 Megapixel, so
       we don't need to check the width and height here. */
    if ((srcBuf = tj3LoadImage12(handle, filename, &width, 1, &height,
                                 &pf)) == NULL)
      continue;

    maxBufSize = tj3JPEGBufSize(width, height, TJSAMP_444);
    if (tj3Get(handle, TJPARAM_NOREALLOC)) {
      if ((dstBuf = (unsigned char *)tj3Alloc(maxBufSize)) == NULL)
        goto bailout;
    } else
      dstBuf = NULL;

    tj3Set(handle, TJPARAM_LOSSLESS, 1);
    tj3Set(handle, TJPARAM_LOSSLESSPSV, tests[ti].psv);
    tj3Set(handle, TJPARAM_LOSSLESSPT, tes


social-github:before {
  content: "\e60c";
}
.icon-social-gplus:before {
  content: "\e60d";
}
.icon-social-reddit:before {
  content: "\e60e";
}
.icon-social-skype:before {
  content: "\e60f";
}
.icon-social-dribbble:before {
  content: "\e00d";
}
.icon-social-behance:before {
  content: "\e610";
}
.icon-social-foursqare:before {
  content: "\e611";
}
.icon-social-soundcloud:before {
  content: "\e612";
}
.icon-social-spotify:before {
  content: "\e613";
}
.icon-social-stumbleupon:before {
  content: "\e614";
}
.icon-social-youtube:before {
  content: "\e008";
}
.icon-social-dropbox:before {
  content: "\e00c";
}
//
// Pagination (multiple pages)
// --------------------------------------------------
.pagination {
  display: inline-block;
  padding-left: 0;
  margin: @line-height-computed 0;
  border-radius: @border-radius-base;

  > li {
    display: inline; // Remove list-style and block-level defaults
    > a,
    > span {
      position: relative;
      float: left; // Collapse white-space
      padding: @padding-base-vertical @padding-base-horizontal;
      line-height: @line-height-base;
      text-decoration: none;
      color: @pagination-color;
      background-color: @pagination-bg;
      border: 1px solid @pagination-border;
      margin-left: -1px;
    }
    &:first-child {
      > a,
      > span {
        margin-left: 0;
        .border-left-radius(@border-radius-base);
      }
    }
    &:last-child {
      > a,
      > span {
        .border-right-radius(@border-radius-base);
      }
    }
  }

  > li > a,
  > li > span {
    &:hover,
    &:focus {
      z-index: 2;
      color: @pagination-hover-color;
      background-color: @pagination-hover-bg;
      border-color: @pagination-hover-border;
    }
  }

  > .active > a,
  > .active > span {
    &,
    &:hover,
    &:focus {
      z-index: 3;
      color: @pagination-active-color;
      background-color: @pagination-active-bg;
      border-color: @pagination-active-border;
      cursor: default;
    }
  }

  > .disabled {
    > span,
    > span:hover,
    > span:focus,
    > a,
    > a:hover,
    > a:focus {
      color: @pagination-disabled-color;
      background-color: @pagination-disabled-bg;
      border-color: @pagination-disabled-border;
      cursor: @cursor-disabled;
    }
  }
}

// Sizing
// --------------------------------------------------

// Large
.pagination-lg {
  .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
}

// Small
.pagination-sm {
  .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-he


background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/OrangePencilSourceBox.gif');
}

.Home16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/Home.gif');
}

.ColorPen16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/ColorPen.gif');
}

.NestedSquare16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/NestedSquare.gif');
}

.VioletInfoWindow16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/VioletInfoWindow.gif');
}

.PageTicker16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/PageTicker.gif');
}

.GreenPlusPage16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/GreenPlusPage.gif');
}

.BlackBorderSquareBlueBall16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/BlackBorderSquareBlueBall.gif');
}

.GreenPlusDataBox16x16Icon {
 height: 16px;
	width: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/GreenPlusDatabox.gif');
}

/* TODO: Change image'name to "BlueShapeLeftArrow" */
.BlueBackArrow16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/BlueBackArrow.gif');
	cursor: pointer;
}

/* TODO: Change image'name to "BlueShapeRightArrow" */
.BlueNextArrow16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/BlueNextArrow.gif');
	cursor: pointer;
}

.Remove16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/DustBin.gif');
}

.GrayBackArrow16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/GrayShapeLeftArrow.gif');
	cursor: pointer;
}

.GrayNextArrow16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/GrayShapeRightArrow.gif');
}

.BlueCircleLeftArrow16x16Icon {
	width: 16px; height: 16px;
background: url('/eXoResources/skin/DefaultSkin/webui/component/../../skinIcons/16x16/icons/BlueC